NOTE (VS Code extension context): In VS Code we generally work locally with git, and for diffs/changes we can use the VS Code APIs (including the built-in SCM view) rather than re-implementing git plumbing in agent-sdk-ts. It’s not clear this parity work is necessary for the VS Code-first workflow — please confirm priority/need with the human overseer.
agent-sdk-ts is basically a transpilation of the original python SDK that we can find at enyst/agent-sdk (it’s a fork for our use). Clone yourself agent-sdk so you have the original codebase and you can understand the code deeply before transpiling.
Gap
Python workspace layer provides file transfer helpers, git helpers, and richer result models (e.g. CommandResult.timeout_occurred). TS LocalWorkspace supports basic exec/read/write but lacks these parity utilities.
Python reference
openhands-sdk/openhands/sdk/workspace/models.py (CommandResult, FileOperationResult)
openhands-sdk/openhands/sdk/workspace/local.py
Current TS state
packages/agent-sdk-ts/src/workspace/LocalWorkspace.ts has CommandResult but no timeoutOccurred, no upload/download/copy helpers, no git helpers/models.
Implementation plan
- Extend TS
CommandResult to include timeoutOccurred: boolean (and any other parity fields we need).
- Add
FileOperationResult + copyToWorkspace / fileUpload / fileDownload helpers (local-only acceptable initially).
- Add
gitChanges() + gitDiff() helpers and types.
- Add tests.
Acceptance criteria
- TS workspace layer exposes equivalents for the Python APIs and returns typed results.
NOTE (VS Code extension context): In VS Code we generally work locally with
git, and for diffs/changes we can use the VS Code APIs (including the built-in SCM view) rather than re-implementing git plumbing inagent-sdk-ts. It’s not clear this parity work is necessary for the VS Code-first workflow — please confirm priority/need with the human overseer.agent-sdk-ts is basically a transpilation of the original python SDK that we can find at enyst/agent-sdk (it’s a fork for our use). Clone yourself agent-sdk so you have the original codebase and you can understand the code deeply before transpiling.
Gap
Python workspace layer provides file transfer helpers, git helpers, and richer result models (e.g.
CommandResult.timeout_occurred). TS LocalWorkspace supports basic exec/read/write but lacks these parity utilities.Python reference
openhands-sdk/openhands/sdk/workspace/models.py(CommandResult,FileOperationResult)openhands-sdk/openhands/sdk/workspace/local.pyCurrent TS state
packages/agent-sdk-ts/src/workspace/LocalWorkspace.tshasCommandResultbut notimeoutOccurred, no upload/download/copy helpers, no git helpers/models.Implementation plan
CommandResultto includetimeoutOccurred: boolean(and any other parity fields we need).FileOperationResult+copyToWorkspace/fileUpload/fileDownloadhelpers (local-only acceptable initially).gitChanges()+gitDiff()helpers and types.Acceptance criteria