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
5 changes: 5 additions & 0 deletions .changeset/wise-bridges-resume.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@tangle-network/agent-provider-cli-bridge": minor
---

Make CLI bridge turns resumable, idempotent, and cancellation-safe using server-owned run state, and derive bridge selection from run data.
16 changes: 15 additions & 1 deletion packages/agent-provider-cli-bridge/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,23 @@ import { createCliBridgeProvider } from '@tangle-network/agent-provider-cli-brid
const provider = createCliBridgeProvider({
baseUrl: 'http://127.0.0.1:8787',
bearerToken: process.env.CLI_BRIDGE_TOKEN,
defaultModel: 'codex',
})

const environment = await provider.create({
profile: {
name: 'researcher',
harness: 'codex',
model: { default: 'gpt-5' },
},
})
```

The bridge model is selected from run data in this order: the turn, the provider default, or the profile's `harness` plus `model.default`.
Execution fails before network use when none is present.

Passing the same `sessionId` on later turns continues the same CLI conversation.
`executionId` gives a turn stable bridge identity, and `lastEventId` reattaches after a reader failure.
Stopping a reader or destroying the environment cancels every active bridge run and waits for terminal confirmation.

Response headers and streamed bodies have no transport timeout by default.
For unattended runs, set `headersTimeoutMs`, `bodyTimeoutMs`, or an `AbortSignal` so an unresponsive bridge cannot wait forever.
Loading
Loading