Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ concurrency:
jobs:
publish:
name: Publish release
# A GitHub prerelease is a beta for testing, so it stays off npm.
if: ${{ !github.event.release.prerelease }}
runs-on: ubuntu-latest
timeout-minutes: 20

Expand Down
16 changes: 12 additions & 4 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,28 @@
# AGENTS.md

This repository owns the standalone `t3code` handover CLI.
This repository owns the standalone `t3code` CLI, which lets agents, scripts, and apps outside T3 Code hand work to T3 threads and steer them.

## Workflow

1. Inspect `git status --short --branch` and the files being changed.
2. Keep the command's JSON envelope backward compatible.
2. Keep the command's JSON envelope backward compatible within a major version. Document every breaking change under "Upgrading" in README.md.
3. Run `pnpm check` before claiming completion.
4. Re-run `npm link` only when the package bin mapping changes; ordinary builds update the linked command in place.

## Boundaries

- Never print or persist T3 bearer tokens. Issue them through the upstream `t3 auth session` command and revoke them in `finally`.
- Speak orchestration protocol 2 (orchestrator V2) only. Check the server's protocol before signing in, and refuse other protocols with `T3_PROTOCOL_UNSUPPORTED`. Version 0.2 serves protocol 1.
- Never print or persist T3 bearer tokens. Issue them through the upstream `t3 auth session` command whose version matches the server, and revoke them in `finally`.
- Keep local project discovery read-only. Fall back to authenticated HTTP when the projection database or schema is unavailable.
- Pass handover prompts as process arguments or stdin arrays, never by concatenating them into an executable shell command.
- Preserve explicit failures for unsupported worktree preparation and exact-thread desktop navigation until upstream T3 exposes stable contracts.
- Launch threads, including new-worktree handovers, through `orchestration.launchThread`, and send every other write through `orchestration.dispatchCommand`. Verify each write in T3's projection before reporting success.
- Preserve the explicit `exactThread: false` result for desktop navigation until upstream T3 registers a deep link to a thread.
- Approve, decline, and permission or plan-mode changes act with the user's authority. Keep them explicit commands; never make them a side effect of another command.

## Testing

- `src/testing/fakeT3.ts` is an in-memory protocol 2 server for tests. Extend it when a test needs new server behavior.
- For live checks, run an isolated server with its own data directory, for example `t3 serve --port 3999 --base-dir <temp>`, and point the CLI at it with `--origin` and `--t3-home`. Never test write commands against a user's real T3 home.

## Commands

Expand Down
303 changes: 235 additions & 68 deletions README.md

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
"name": "@bvdm/t3code-cli",
"version": "0.2.0",
"description": "Manage T3 Code projects, handover threads, and cross-thread messages.",
"version": "0.3.0",
"description": "Manage T3 Code projects, handover threads, and cross-thread messages. Requires a T3 Code build with orchestrator V2; for older T3 builds, install @bvdm/t3code-cli@0.2.",
"license": "MIT",
"keywords": [
"t3-code",
"orchestrator-v2",
"cli",
"handover",
"codex",
Expand Down Expand Up @@ -45,8 +46,7 @@
"node": "^22.16 || ^23.11 || >=24.10"
},
"dependencies": {
"commander": "^14.0.1",
"t3": "0.0.28"
"commander": "^14.0.1"
},
"devDependencies": {
"@types/node": "^24.10.1",
Expand Down
Loading
Loading