@tangle-network/agent-provider-cli-bridge 0.9.3 → 0.9.4

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/README.md CHANGED
@@ -8,6 +8,10 @@ import { createCliBridgeProvider } from '@tangle-network/agent-provider-cli-brid
8
8
  const provider = createCliBridgeProvider({
9
9
  baseUrl: 'http://127.0.0.1:8787',
10
10
  bearerToken: process.env.CLI_BRIDGE_TOKEN,
11
+ defaultExecution: {
12
+ kind: 'host',
13
+ jail: { mode: 'fs-jail' },
14
+ },
11
15
  })
12
16
 
13
17
  const environment = await provider.create({
@@ -46,6 +50,15 @@ The lookup returns the server-issued digest only when all five planned coordinat
46
50
  The bridge model is selected from run data in this order: the turn, the provider default, or the profile's `harness` plus `model.default`.
47
51
  Execution fails before network use when none is present.
48
52
 
53
+ `defaultExecution` is the existing cli-bridge `execution` request object.
54
+ The provider forwards it unchanged to the Bridge session or chat request.
55
+ Host execution accepts `jail`, `netJail`, and `timeoutMs`.
56
+ Sandbox execution accepts `repoUrl`, `gitRef`, `capability`, `ttlSeconds`, `netJail`, and `timeoutMs`.
57
+ The Bridge validates the object and applies its operator confinement rules.
58
+ Retained native sessions currently require `kind: 'host'`.
59
+ The provider rejects a sandbox default before it creates the retained session; use one-shot execution for `kind: 'sandbox'`.
60
+ The Bridge currently refuses `netJail` with `kind: 'sandbox'`; use the sandbox's own egress policy.
61
+
49
62
  Passing the same `sessionId` on later turns continues the same CLI conversation.
50
63
  `executionId` gives a turn stable bridge identity, and `lastEventId` reattaches after a reader failure.
51
64
  `dispatch()` starts a bridge-owned durable run and returns after detaching its HTTP reader.
package/dist/index.d.ts CHANGED
@@ -3,6 +3,7 @@ import { type AgentExactRunControlRef, type HarnessType } from "@tangle-network/
3
3
  import { type CliBridgeRunLookupInput } from "./retained-control.js";
4
4
  import { type CliBridgeProviderOptions } from "./provider-options.js";
5
5
  export type { CliBridgeProviderOptions } from "./provider-options.js";
6
+ export type { CliBridgeExecution } from "./provider-options.js";
6
7
  export type { CliBridgeRunLookupInput } from "./retained-control.js";
7
8
  export { safeEndpointFromBaseUrl } from "./observation.js";
8
9
  export interface CliBridgeProvider extends AgentEnvironmentProvider {
@@ -1,19 +1,40 @@
1
1
  import type { AgentEnvironmentCapabilities } from "@tangle-network/agent-interface/environment-provider";
2
2
  export declare const MAX_CLI_BRIDGE_TIMEOUT_MS = 2147483647;
3
+ /**
4
+ * The execution object accepted by cli-bridge's request wire contract.
5
+ *
6
+ * The provider forwards this object unchanged as `execution`; cli-bridge owns
7
+ * validation, confinement resolution, and execution placement.
8
+ */
9
+ export type CliBridgeExecution = {
10
+ kind: "host";
11
+ jail?: {
12
+ mode?: "off" | "write-jail" | "fs-jail";
13
+ root?: string;
14
+ };
15
+ netJail?: {
16
+ mode?: "off" | "net-jail";
17
+ allow?: string[];
18
+ };
19
+ timeoutMs?: number;
20
+ } | {
21
+ kind: "sandbox";
22
+ repoUrl?: string;
23
+ gitRef?: string;
24
+ capability?: string;
25
+ ttlSeconds?: number;
26
+ netJail?: {
27
+ mode?: "off" | "net-jail";
28
+ allow?: string[];
29
+ };
30
+ timeoutMs?: number;
31
+ };
3
32
  export interface CliBridgeProviderOptions {
4
33
  baseUrl: string;
5
34
  bearerToken?: string;
6
35
  defaultModel?: string;
7
36
  defaultMode?: "byob" | "hosted-safe" | "hosted-sandboxed";
8
- defaultExecution?: {
9
- kind: "host";
10
- } | {
11
- kind: "sandbox";
12
- repoUrl?: string;
13
- gitRef?: string;
14
- capability?: string;
15
- ttlSeconds?: number;
16
- };
37
+ defaultExecution?: CliBridgeExecution;
17
38
  /** Maximum wait for response headers. Defaults to no timeout. */
18
39
  headersTimeoutMs?: number;
19
40
  /** Maximum idle time between response body chunks. Defaults to no timeout. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/agent-provider-cli-bridge",
3
- "version": "0.9.3",
3
+ "version": "0.9.4",
4
4
  "description": "AgentEnvironmentProvider adapter for cli-bridge retained sessions and one-shot turns",
5
5
  "type": "module",
6
6
  "license": "MIT",