Files
deepseek-harness/examples/headless-agent/tests/fixtures/tmux-context.cordis.yml
Turtle 1ac946f747 feat(context): add tmux-context plugin injecting the agent's tmux location
Add @deepseek-ai/dsh-tmux-context: an opt-in per-turn context plugin that
reads which tmux session/window/pane this agent process runs in (plus the
window layout tree) via the ctx.bash seam, and injects it as one durable,
source-attributed user/message when the location changes.

- Pull on the first step of each turn; no tmux hook or background process.
- Detect a real pane by tty, not $TMUX_PANE alone: a terminal launched from
  a tmux shell inherits $TMUX/$TMUX_PANE from that ancestor, so the command
  also matches the pane's #{pane_tty} against this process's controlling
  terminal and emits fields only on a match.
- No-op outside a real pane, without a bash executor, or on a malformed
  reading.
- Own location and layout only: no pane sizes, no sibling-pane scraping.
- Unit tests at 100% per-file coverage, plus a keyless Loader e2e with a
  mock bash provider so it replays without tmux.
- Agent Note: 2026-07-27-tmux-location-context.
2026-07-28 21:40:13 +08:00

22 lines
679 B
YAML

# Test-only composition: keep tmux-context opt-in while exercising its real Loader/app path.
# A deterministic mock ctx.bash returns a fixed tmux reading, so the injected location
# is stable without a real tmux server on the test host.
- id: tmux-context-mock-llm
name: './tmux-context-mock-llm.ts'
- id: bash
name: './tmux-context-mock-bash.ts'
- id: tmux-context
name: '@deepseek-ai/dsh-tmux-context'
- id: cli-agent
name: '@deepseek-ai/dsh-cli-demo'
config:
provider: tmux-context-mock
model: tmux-context-mock
persona: 'Test the tmux-context plugin.'
persistenceRoot: './.sessions'
persistenceCompression: 'none'
workspaceContext: false