chore: specs for unimplemented work (#70)

This commit is contained in:
Nathan Flurry 2026-02-04 13:45:31 -08:00 committed by GitHub
parent ef3e811c94
commit 8a31519786
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 367 additions and 0 deletions

View file

@ -0,0 +1,23 @@
# Spec: Command + Shell Execution
**Proposed API Changes**
- Add command execution APIs to the core session manager (non-PTY, single-shot).
- Define output capture and error handling semantics in the session event stream.
**Summary**
OpenCode routes for command/shell execution should run real commands in the session context and stream outputs to OpenCode message parts and events.
**OpenCode Endpoints (Reference)**
- `GET /opencode/command`
- `POST /opencode/session/{sessionID}/command`
- `POST /opencode/session/{sessionID}/shell`
**Core Functionality Required**
- Execute commands with cwd/env + timeout support.
- Capture stdout/stderr, exit code, and duration.
- Optional streaming output to session events.
- Map command output into OpenCode `message.part.updated` events.
**OpenCode Compat Wiring + Tests**
- Replace stubs for `/command`, `/session/{sessionID}/command`, `/session/{sessionID}/shell`.
- Add E2E tests to run a simple command and validate output is returned and events are emitted.