Skip to content

feat(server): read-only workspace and project APIs for Companion devices - #63

Merged
DimoADE merged 1 commit into
DimoADE:masterfrom
DorJay007:feat/host-companion-workspace-project-apis
Nov 7, 2026
Merged

DimoADE merged 1 commit into
DimoADE:masterfrom
DorJay007:feat/host-companion-workspace-project-apis

Conversation

@DorJay007

Copy link
Copy Markdown
Contributor

Summary

New read-only Host commands for Companion Devices:

Command Scope Returns
conversation_workspace_tree artifact.read one directory level
conversation_workspace_file artifact.read text content (≤256 KB)
conversation_workspace_diff artifact.read per-file unified diff of the working tree vs HEAD (≤200 KB each)
conversation_projects conversation.read projects with their workspace ids
path policy (tree / file)
  relative only
  no `..`, no symlink out of the root
  refuse .git, .env*, hidden files except a few project configs

conversation_projects lets a client group conversations by project (the recent list only carries workspace_id). No new scope was added.

Evidence

  • Unit tests for the path policy, file cap and diff cap; contract tests pass:
    cargo test -p application --test command_contract, cargo test -p server --test web_domains --test host_parity_contract --test mobile_contract.
  • pnpm run generate-types regenerated shared/hostCommands.ts only.

Merge Danger

Door: two-way for the code; the command names become part of the Remote surface once clients use them.

Blast Radius: Remote clients with artifact.read / conversation.read can now read files inside a workspace root. Paths cannot leave the root and credential files are refused.

Adds conversation_workspace_tree, conversation_workspace_file and conversation_workspace_diff (artifact.read) and conversation_projects (conversation.read). Paths are relative to the workspace root; .., symlink escapes, .git and .env* are refused; files are capped at 256KB and per-file diffs at 200KB. conversation_projects returns each project with its workspace ids so a client can group conversations by project. shared/hostCommands.ts regenerated.
@DimoADE
DimoADE merged commit dfe4e80 into DimoADE:master Nov 7, 2026
5 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants