Commit Graph

1 Commits

Author SHA1 Message Date
unsupportedpastels
0ca88e6771 fix(gateway): serve complete.path for local sessions on the canonical connection
The Ink TUI sends every request on its canonical connection, and
AuthorityConnection had no complete.path handler, so every path and @
completion answered -32601. Sending the session's cwd (TUI-2) could not
fix that on its own.

The sidecar's listing body moves into _path_completion_items in
tui_gateway/methods_complete.py; the sidecar handler calls it unchanged.
A new canonical handler (gateway/session_complete_path.py) authorizes
session:read on the named session, as the sibling read-only session verbs
do, and lists that session's frozen policy cwd. A client-sent cwd is
ignored. A remote or sandboxed backend, or a request without a session,
lists nothing: completion is advisory, and the host tree would be the
wrong one. The TUI now names its session on complete.path.

The method was already declared in tui_gateway/contracts, so the
generated contracts do not change.

Refs NousResearch#134889
2026-10-14 20:38:25 -04:00