@tangle-network/agent-provider-cli-bridge 2.0.11 → 2.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -12,9 +12,5 @@ export interface CliBridgeProvider extends AgentEnvironmentProvider {
12
12
  lookupRun(input: CliBridgeRunLookupInput): Promise<AgentExactRunControlRef | null>;
13
13
  }
14
14
  export declare function createCliBridgeProvider(options: CliBridgeProviderOptions): CliBridgeProvider;
15
- /**
16
- * Describe the bridge backend, not this adapter.
17
- *
18
- * The adapter forwards an AgentProfile but does not own harness prompt controls.
19
- */
15
+ /** Bridge capabilities. The adapter forwards an AgentProfile and does not own harness prompt controls. */
20
16
  export declare function defaultCliBridgeCapabilities(harness?: HarnessType): AgentEnvironmentCapabilities;
package/dist/index.js CHANGED
@@ -61,9 +61,6 @@ export function createCliBridgeProvider(options) {
61
61
  if (input.workspace?.snapshot !== undefined) {
62
62
  throw new Error("CLI Bridge provider does not support portable workspace snapshots");
63
63
  }
64
- if (input.runtimeAttachments !== undefined) {
65
- throw new Error("CLI Bridge provider does not support runtime MCP attachments");
66
- }
67
64
  if (typeof input.profile === "string") {
68
65
  throw new Error(`createCliBridgeProvider requires an inline AgentProfile; named profile "${input.profile}" is unsupported`);
69
66
  }
@@ -207,11 +204,7 @@ function assertRequestedEnvironmentId(value) {
207
204
  throw new Error("cli-bridge requested environment id must be 1-256 URL-safe characters");
208
205
  }
209
206
  }
210
- /**
211
- * Describe the bridge backend, not this adapter.
212
- *
213
- * The adapter forwards an AgentProfile but does not own harness prompt controls.
214
- */
207
+ /** Bridge capabilities. The adapter forwards an AgentProfile and does not own harness prompt controls. */
215
208
  export function defaultCliBridgeCapabilities(harness) {
216
209
  return {
217
210
  profile: {
@@ -284,9 +277,8 @@ export function defaultCliBridgeCapabilities(harness) {
284
277
  placement: true,
285
278
  usage: true,
286
279
  confidential: false,
287
- // cli-bridge measures what a turn cost and where it forwarded that turn.
288
- // It provisions no compute and holds no account, so the surfaces that
289
- // describe provisioned resources and billing are never claimed.
280
+ create: { runtimeAttachments: { mcp: true } },
281
+ // cli-bridge measures turn cost and forwarding. It provisions no compute and holds no account.
290
282
  observation: {
291
283
  identity: true,
292
284
  lifecycle: true,
package/dist/wire.js CHANGED
@@ -1,5 +1,10 @@
1
1
  import { createHash } from "node:crypto";
2
- import { AgentExactRunControlRefSchema, CONTRACT_MAX_ARRAY_LENGTH, RequestedInteractionsSchema, WorkspaceRequestSchema, workspaceCwdPathForBase, } from "@tangle-network/agent-interface";
2
+ import { AgentExactRunControlRefSchema, AgentRuntimeAttachmentsSchema, CONTRACT_MAX_ARRAY_LENGTH, RequestedInteractionsSchema, WorkspaceRequestSchema, workspaceCwdPathForBase, } from "@tangle-network/agent-interface";
3
+ function runtimeAttachmentsField(input) {
4
+ if (input.runtimeAttachments === undefined)
5
+ return {};
6
+ return { runtime_attachments: AgentRuntimeAttachmentsSchema.parse(input.runtimeAttachments) };
7
+ }
3
8
  export function toChatCompletionsBody(options, environmentInput, turn, coordinates) {
4
9
  const profile = inlineProfile(environmentInput.profile);
5
10
  const execution = executionFromInput(options, environmentInput);
@@ -25,6 +30,7 @@ export function toChatCompletionsBody(options, environmentInput, turn, coordinat
25
30
  ...(workspaceCwd === undefined ? {} : { cwd: workspaceCwd }),
26
31
  ...(execution ? { execution } : {}),
27
32
  ...(interactions === undefined ? {} : { interactions }),
33
+ ...runtimeAttachmentsField(environmentInput),
28
34
  ...(turn.contextTransfer === undefined
29
35
  ? {}
30
36
  : { context_transfer: turn.contextTransfer }),
@@ -72,6 +78,7 @@ export function toRetainedSessionBody(options, environmentInput, profile, sessio
72
78
  ...(environmentInput.providerOptions !== undefined
73
79
  ? { provider_options: environmentInput.providerOptions }
74
80
  : {}),
81
+ ...runtimeAttachmentsField(environmentInput),
75
82
  };
76
83
  }
77
84
  /** Encode the exact retained turn contract without moving posture into metadata. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/agent-provider-cli-bridge",
3
- "version": "2.0.11",
3
+ "version": "2.0.12",
4
4
  "description": "AgentEnvironmentProvider adapter for cli-bridge retained sessions and one-shot turns",
5
5
  "type": "module",
6
6
  "license": "MIT",