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
12 changes: 8 additions & 4 deletions docs/04-runtime-contracts.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ When a current package blocks a real Braid flow, Braid records the unavailable a
## Evidence baseline

The following published versions were resolved in this worktree.
Their installed manifests, declarations, and implementations were inspected directly on 2026-09-24.
Their installed manifests, declarations, and implementations were inspected directly on 2026-09-30.

| Package | Installed version | Braid boundary |
| --- | ---: | --- |
| [`@tangle-network/agent-interface`](https://github.com/tangle-network/agent-sdk/tree/main/packages/agent-interface) | `2.11.0` | Canonical profile, capabilities, environment, stream, portable context, native continuation, interaction, and explicitly based workspace contracts |
| [`@tangle-network/agent-interface`](https://github.com/tangle-network/agent-sdk/tree/main/packages/agent-interface) | `2.13.1` | Canonical profile, capabilities, environment, stream, portable context, native continuation, interaction, and explicitly based workspace contracts |
| [`@tangle-network/agent-runtime`](https://github.com/tangle-network/agent-runtime) | `0.263.0` | Sole execution layer; exact executor, retained-run, interactive-run, environment-provider, and terminal-monitor exports |
| [`@tangle-network/agent-eval`](https://github.com/tangle-network/agent-eval) | `0.187.2` | Run records, judges, trace analysts, comparisons, and feedback trajectories |
| `@tangle-network/agent-provider-cli-bridge` | `1.1.0` | CLI Bridge environment adapter with capability discovery, native retained sessions, bounded terminal results, live streaming, replay, retry-safe turns, retained control, exact native session close, durable interaction response, explicit cancel, and host cwd support |
| `@tangle-network/agent-provider-cli-bridge` | `1.1.1` | CLI Bridge environment adapter with capability discovery, native retained sessions, bounded terminal results, live streaming, replay, retry-safe turns, retained control, exact native session close, durable interaction response, explicit cancel, and host cwd support |
| `@tangle-network/agent-provider-tangle` | `1.6.0` | Tangle environment adapter over Sandbox, including deployment-gated retained control, interaction response, repository-relative cwd support, workspace branching, and interactive-agent operations |
| `@tangle-network/sandbox` | `0.45.0` | Tangle cloud client used by the provider, including keyed checkpoint/fork and interactive-agent operations |

Expand Down Expand Up @@ -52,7 +52,7 @@ The lockfile pins the registry integrity for every installed package.

`pnpm peers check` reports no peer dependency issues for this worktree.

The workspace overrides pin Interface `2.11.0` and Knowledge `17.1.3`.
The workspace overrides pin Interface `2.13.1`, Knowledge `17.1.3`, and Undici `8.11.2`.

Historical snapshot: [Agent-runtime issue 803](https://github.com/tangle-network/agent-runtime/issues/803) records the interface peer mismatch fixed in Runtime `0.132.11`.

Expand Down Expand Up @@ -136,6 +136,10 @@ An `AgentEnvironmentProvider` reports profile, streaming, session, workspace, br

An environment can stream or dispatch turns, expose provider sessions, read and write, execute commands, checkpoint, fork, report placement, refresh, and destroy when its adapter implements those operations.

Workspace creation from a checkpoint requires an explicit provider capability and provider support for the field.
Braid currently rejects checkpoint-bearing requests because its request identity and provider dispatch do not preserve the field.
Neither installed provider advertises `create.workspaceCheckpoint`; workspace branching checkpoints remain separate.

An `AgentSession` can report status, replay events, return a result, accept a new prompt, and cancel when implemented.

Capabilities are the only supported source for Braid feature availability.
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@
"@earendil-works/pi-tui": "0.84.4",
"@napi-rs/keyring": "2.0.0",
"@tangle-network/agent-eval": "0.187.2",
"@tangle-network/agent-interface": "2.11.0",
"@tangle-network/agent-provider-cli-bridge": "1.1.0",
"@tangle-network/agent-interface": "2.13.1",
"@tangle-network/agent-provider-cli-bridge": "1.1.1",
"@tangle-network/agent-provider-tangle": "1.6.0",
"@tangle-network/agent-runtime": "0.263.0",
"@tangle-network/sandbox": "0.45.0",
Expand Down
73 changes: 39 additions & 34 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
overrides:
'@tangle-network/agent-interface': 2.11.0
'@tangle-network/agent-interface': 2.13.1
'@tangle-network/agent-knowledge': 17.1.3
hono: 4.13.5
undici: 8.10.1
undici: 8.11.2
allowBuilds:
'@dataiku/uv': true
better-sqlite3-multiple-ciphers: true
Expand All @@ -13,10 +13,10 @@ ignoreScripts: false
minimumReleaseAgeExclude:
- '@tangle-network/agent-runtime@0.126.0 || 0.128.0 || 0.131.0 || 0.131.1 || 0.131.2 || 0.131.3 || 0.131.4 || 0.131.5 || 0.131.6 || 0.131.7 || 0.132.0 || 0.132.4 || 0.132.6 || 0.132.9 || 0.132.10 || 0.132.11 || 0.132.12 || 0.133.6 || 0.134.2 || 0.134.4 || 0.134.5 || 0.134.9 || 0.135.0 || 0.135.3 || 0.142.0 || 0.142.1 || 0.142.3 || 0.143.0 || 0.153.2 || 0.177.0 || 0.178.0 || 0.179.0 || 0.180.0 || 0.182.0 || 0.184.0 || 0.185.0 || 0.185.1 || 0.185.2 || 0.188.0 || 0.189.0 || 0.190.0 || 0.191.0 || 0.192.0 || 0.192.2 || 0.252.1 || 0.262.0 || 0.263.0'
- '@tangle-network/agent-eval@0.143.0 || 0.144.0 || 0.144.1 || 0.144.3 || 0.144.4 || 0.144.6 || 0.144.8 || 0.144.10 || 0.144.11 || 0.144.13 || 0.145.0 || 0.145.1 || 0.145.2 || 0.145.3 || 0.145.9 || 0.145.10 || 0.145.11 || 0.145.14 || 0.145.15 || 0.145.21 || 0.149.0 || 0.163.2 || 0.170.0 || 0.171.0 || 0.172.1 || 0.173.0 || 0.173.1 || 0.183.0 || 0.187.2'
- '@tangle-network/agent-interface@0.46.0 || 0.46.1 || 0.47.0 || 0.51.0 || 0.52.0 || 0.53.0 || 0.54.0 || 1.0.0 || 1.1.0 || 1.3.0 || 1.4.0 || 1.7.0 || 1.7.1 || 1.8.0 || 1.9.0 || 2.0.0 || 2.1.0 || 2.1.1 || 2.2.0 || 2.3.0 || 2.11.0'
- '@tangle-network/agent-interface@0.46.0 || 0.46.1 || 0.47.0 || 0.51.0 || 0.52.0 || 0.53.0 || 0.54.0 || 1.0.0 || 1.1.0 || 1.3.0 || 1.4.0 || 1.7.0 || 1.7.1 || 1.8.0 || 1.9.0 || 2.0.0 || 2.1.0 || 2.1.1 || 2.2.0 || 2.3.0 || 2.11.0 || 2.13.1'
- '@tangle-network/agent-knowledge@7.0.8 || 7.1.2 || 7.1.3 || 7.2.0 || 7.2.2 || 7.2.3 || 7.2.4 || 7.2.6 || 8.0.0 || 8.0.1 || 8.0.5 || 8.0.10 || 10.7.0 || 10.8.0 || 11.0.0 || 13.0.0 || 13.0.1 || 17.1.0 || 17.1.3'
- '@tangle-network/agent-profile-materialize@0.10.2 || 0.13.1 || 0.14.0 || 0.14.2 || 0.15.1 || 0.15.2 || 0.17.1 || 0.18.1 || 0.19.0'
- '@tangle-network/agent-provider-cli-bridge@0.4.2 || 0.4.3 || 0.5.0 || 0.6.0 || 0.6.4 || 0.7.1 || 0.7.2 || 0.7.3 || 0.7.6 || 0.8.0 || 0.8.1 || 0.9.0 || 0.9.2 || 0.9.3 || 0.9.4 || 0.9.5 || 0.9.6 || 0.10.0 || 0.11.0 || 0.11.1 || 1.0.0 || 1.0.3 || 1.1.0'
- '@tangle-network/agent-provider-cli-bridge@0.4.2 || 0.4.3 || 0.5.0 || 0.6.0 || 0.6.4 || 0.7.1 || 0.7.2 || 0.7.3 || 0.7.6 || 0.8.0 || 0.8.1 || 0.9.0 || 0.9.2 || 0.9.3 || 0.9.4 || 0.9.5 || 0.9.6 || 0.10.0 || 0.11.0 || 0.11.1 || 1.0.0 || 1.0.3 || 1.1.0 || 1.1.1'
- '@tangle-network/agent-provider-tangle@0.13.0 || 0.13.1 || 0.13.3 || 0.14.0 || 0.14.1 || 0.14.2 || 0.14.3 || 0.14.4 || 1.0.0 || 1.0.1 || 1.0.2 || 1.1.2 || 1.1.3 || 1.1.4 || 1.6.0'
- '@tangle-network/sandbox@0.30.1 || 0.31.0 || 0.34.0 || 0.34.3 || 0.34.4 || 0.34.6 || 0.36.1 || 0.36.3 || 0.36.4 || 0.36.5 || 0.37.0 || 0.45.0'
- hono@4.13.5
Expand Down Expand Up @@ -62,4 +62,4 @@ minimumReleaseAgeExclude:
- '@napi-rs/keyring-win32-ia32-msvc@2.0.0'
- '@napi-rs/keyring-win32-x64-msvc@2.0.0'
- '@napi-rs/keyring@2.0.0'
- undici@8.10.1
- undici@8.11.2
6 changes: 6 additions & 0 deletions src/domain/workspace-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ export function snapshotWorkspaceRequest(
'Workspace providerOptions are not persisted; use a provider credential reference',
)
}
if (parsed.checkpoint !== undefined) {
throw new Error('Workspace checkpoint restore is not supported by Braid yet')
}
if (
parsed.environment === undefined &&
parsed.image === undefined &&
Expand Down Expand Up @@ -80,6 +83,9 @@ export function workspaceRequestErrorMessage(error: unknown): string {
if (/providerOptions are not persisted/iu.test(message)) {
return 'providerOptions are not persisted'
}
if (/Workspace checkpoint restore is not supported by Braid yet/iu.test(message)) {
return 'starting a workspace from a checkpoint is not supported yet'
}
if (/must be a valid URL|Invalid URL/iu.test(message)) return 'repoUrl must be a valid URL'
return 'workspace request invalid'
}
Expand Down
27 changes: 26 additions & 1 deletion test/workspace-request.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import assert from 'node:assert/strict'
import test from 'node:test'
import { defineAgentProfile } from '@tangle-network/agent-interface'
import { defineAgentProfile, WorkspaceRequestSchema } from '@tangle-network/agent-interface'
import { exactAdmissionRequestDigest } from '../src/app/run-admission-request.js'
import { snapshotRunExecution } from '../src/app/run-execution-snapshot.js'
import { retainedExecutionRecoveryContext } from '../src/app/run-recovery-context.js'
Expand Down Expand Up @@ -70,6 +70,31 @@ test('provider options are never persisted, even when the canonical schema accep
)
})

test('checkpoint restore requests fail closed until a provider supports workspace creation from checkpoints', () => {
const checkpoint = {
checkpointId: 'checkpoint-restore',
provider: 'tangle-sandbox',
source: {
runId: 'run-checkpoint-restore',
provider: 'tangle-sandbox',
environmentId: 'environment-checkpoint-restore',
sessionId: 'session-checkpoint-restore',
executionId: 'execution-checkpoint-restore',
requestDigest: `sha256:${'0'.repeat(64)}`,
},
idempotencyKey: 'op-workspace-checkpoint',
requestDigest: `sha256:${'0'.repeat(64)}`,
createdAt: '2026-09-30T00:00:00.000Z',
} as const
for (const request of [{ checkpoint }, { environment: 'universal', checkpoint }]) {
assert.equal(WorkspaceRequestSchema.safeParse(request).success, true)
assert.equal(
thrownMessage(request),
'starting a workspace from a checkpoint is not supported yet',
)
}
})

test('canonical workspace validation reports bounded actionable messages', () => {
assert.equal(thrownMessage({ gitRef: 'main' }), 'gitRef requires repoUrl')
assert.equal(
Expand Down
Loading