@tangle-network/agent-app 0.46.54 → 0.46.56

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.
@@ -791,8 +791,8 @@ export interface DriveSandboxTurnOptions extends StreamSandboxPromptOptions {
791
791
  * starting a second agent run. */
792
792
  sessionId: string;
793
793
  /** Wall-clock cap in ms from the session's start. A still-running session past
794
- * the cap is cancelled and reported `failed` — bounds an unattended run (e.g. a
795
- * turn that stalled on an interactive question nothing will answer). Omit for no cap. */
794
+ * the cap is cancelled and reported `failed` — bounds an unattended run, such as
795
+ * a turn stalled on an interactive question with no consumer. Omit for no cap. */
796
796
  wallCapMs?: number;
797
797
  }
798
798
  /** Resolve a sandbox turn by processing a message with given configuration and options */
@@ -99,7 +99,7 @@ import {
99
99
  workspaceSandboxRecoveryMessage,
100
100
  workspaceSandboxRecoveryRecommendedActions,
101
101
  writeProfileFilesToBox
102
- } from "../chunk-T374KO42.js";
102
+ } from "../chunk-LKZBMDYM.js";
103
103
  import "../chunk-MCYJON3F.js";
104
104
  import "../chunk-LWSJK546.js";
105
105
  import "../chunk-P5PIAQVS.js";
@@ -1,3 +1,6 @@
1
+ import {
2
+ InviteAcceptPage
3
+ } from "../chunk-W7P5KV6O.js";
1
4
  import {
2
5
  MembersPanel
3
6
  } from "../chunk-GRDLGQ6A.js";
@@ -5,9 +8,6 @@ import {
5
8
  InvitationsPanel
6
9
  } from "../chunk-5MI2SKQH.js";
7
10
  import "../chunk-AULM4X7U.js";
8
- import {
9
- InviteAcceptPage
10
- } from "../chunk-W7P5KV6O.js";
11
11
  import "../chunk-6XIAPIW6.js";
12
12
  export {
13
13
  InvitationsPanel,
@@ -48,14 +48,14 @@ export interface TurnStreamNamespaceLike {
48
48
  * instance; `listRunning` reconnect discovery rides a per-scope index
49
49
  * instance. Drops in wherever `createD1TurnEventStore(env.DB)` would.
50
50
  *
51
- * KEPT and load-bearing for AUTONOMOUS work. A detached run
52
- * (`dispatchPrompt({ detach: true })`, `driveTurn`) executes on the sandbox
53
- * run/stream lane, which publishes nothing to the session event bus — a
54
- * `SessionGatewayClient` attached to that session sees zero turn events
55
- * (measured: 0 of 71 / 0 of 527 / 0 of 408 across three session-id
56
- * strategies). So a browser that must tail a mission step, a queue job, or
57
- * an inbound-email review has no SDK path; it needs these durable rows plus
58
- * `runDetachedTurn` (`/chat-routes`). Nothing here is deprecated.
51
+ * KEPT and load-bearing for AUTONOMOUS work. A detached run driven through
52
+ * `dispatchPrompt({ detach: true })` or `streamPrompt` executes on the sandbox
53
+ * run/stream lane, which publishes nothing to the session event bus on the
54
+ * measured path (0 of 71 / 0 of 527 / 0 of 408 across three session-id
55
+ * strategies). Sandbox 0.37 `driveTurn` uses the session message lane and is
56
+ * gateway-visible by SDK contract. A browser tailing a stream/dispatch run
57
+ * needs these durable rows plus `runDetachedTurn` (`/chat-routes`). Nothing
58
+ * here is deprecated.
59
59
  */
60
60
  export declare function createDurableObjectTurnEventStore(namespace: TurnStreamNamespaceLike): TurnEventStore;
61
61
  /** Define input parameters required to acquire a durable turn lock in a workspace thread context */
@@ -190,8 +190,8 @@ export declare function createDurableTurnLock<TContext>(options: CreateDurableTu
190
190
  * the message lane delivered 297 of 297.
191
191
  *
192
192
  * Two things this deprecation does NOT cover, both still supported:
193
- * DETACHED runs (no gateway fanout at all — keep `runDetachedTurn` over the
194
- * durable turn-event rows) and the per-workspace signals
193
+ * stream/dispatch DETACHED runs (keep `runDetachedTurn` over the durable
194
+ * turn-event rows) and the per-workspace signals
195
195
  * ({@link broadcastWorkspaceActivity} / {@link broadcastThreadCreated}).
196
196
  * A SANDBOX-FREE copilot that wants a second viewer should use `/stream`'s
197
197
  * `replayTurnEvents` (`GET /chat/stream/:turnId`), which follows a running
@@ -21,12 +21,15 @@
21
21
  * | ------------------------------------ | --------------- | --------------- |
22
22
  * | `box.streamPrompt()` (run/stream) | 71 / 527 / 408 | 0 / 0 / 0 |
23
23
  * | `box.session(id).sendMessage()` | 297 | 297 |
24
+ * | `box.driveTurn()` (Sandbox 0.37+) | — | SDK contract |
24
25
  *
25
26
  * `POST /agents/run/stream` publishes nothing to the sidecar session event
26
27
  * bus, so a `SessionGatewayClient` attached to that session receives zero
27
28
  * turn events — three different session-id strategies all got 0, the id was
28
29
  * not the variable. `POST /agents/sessions/{id}/messages` publishes to the
29
30
  * bus and the gateway delivered every frame, byte-matching the sidecar tail.
31
+ * Sandbox 0.37 admits `driveTurn` through the session message lane, so the
32
+ * gateway can observe it. That is an SDK contract, not a new production count.
30
33
  *
31
34
  * Consequences for this module, and they cut both ways:
32
35
  *
@@ -37,12 +40,11 @@
37
40
  * That half is `@deprecated` (see the tags on {@link createSegmentStore},
38
41
  * {@link appendSegmentEvent}, {@link replayActiveSegment} and
39
42
  * `broadcastTurnStreamEvent` in `./adapters`).
40
- * 2. DETACHED/autonomous turns are INVISIBLE to the gateway:
41
- * `dispatchPrompt({ detach: true })` and `driveTurn` both go through
42
- * `streamPrompt` internally, i.e. the run/stream lane, which does not fan
43
- * out. A browser that must tail an unattended run still needs a buffer —
44
- * `runDetachedTurn` (`/chat-routes`) over the durable turn-event rows
45
- * below. That half is NOT deprecated and has no SDK replacement today.
43
+ * 2. Detached turns driven through `dispatchPrompt({ detach: true })` or
44
+ * `streamPrompt` remain on the run/stream lane and need a buffer when a
45
+ * browser must tail them. Sandbox 0.37 `driveTurn` is different: it uses
46
+ * the session message lane and the gateway can observe it. The buffer
47
+ * remains the path for stream/dispatch runs and has no SDK replacement.
46
48
  * 3. The LOCK and the per-workspace SIGNALS have no gateway equivalent at
47
49
  * all (the gateway is per-session and read-only). They stay canonical.
48
50
  *
@@ -90,9 +92,9 @@ export declare function workspaceChannelKey(workspaceId: string): string;
90
92
  export declare function turnLockChannelKey(workspaceId: string, threadId: string, scope: TurnLockScope): string;
91
93
  /** Generate a storage channel key string for a given turn identifier.
92
94
  *
93
- * KEPT and canonical: the DETACHED lane's durable turn-event rows live on
94
- * this instance. A detached run never reaches the session gateway, so this
95
- * is the only way a browser tails one. */
95
+ * KEPT and canonical: durable turn-event rows for stream/dispatch detached
96
+ * runs live on this instance. Those run/stream paths do not reach the
97
+ * session gateway, so this is how a browser tails one. */
96
98
  export declare function turnStorageChannelKey(turnId: string): string;
97
99
  /** Generate a unique channel key string based on the provided scope identifier.
98
100
  *
@@ -121,8 +123,8 @@ export interface SegmentStore {
121
123
  * self-heals via the final `result` event + loader revalidation).
122
124
  *
123
125
  * @deprecated Sizes the interactive turn-rebroadcast buffer only. The
124
- * DETACHED lane's durable rows (`turnEvent:` storage) are uncapped and are
125
- * not affected. */
126
+ * stream/dispatch detached lanes' durable rows (`turnEvent:` storage) are
127
+ * uncapped and are not affected. */
126
128
  export declare const MAX_SEGMENT_EVENTS = 2000;
127
129
  /** Recent `thread.created` markers kept for late-connecting sidebars.
128
130
  *
@@ -140,7 +142,8 @@ export declare const ACTIVITY_TTL_MS: number;
140
142
  * the browser attach with `box.mintScopedToken({ scope: 'session' })` +
141
143
  * `SessionGatewayClient`. Sandbox-FREE turns: `/stream`'s
142
144
  * `replayTurnEvents` (`GET /chat/stream/:turnId`) already follows a running
143
- * turn from a cursor. Detached turns keep the durable turn-event rows —
145
+ * turn from a cursor. Stream/dispatch detached turns keep the durable
146
+ * turn-event rows —
144
147
  * they are a different, non-deprecated lane. Removal is a major-version
145
148
  * change; nothing is deleted here. */
146
149
  export declare function createSegmentStore(): SegmentStore;
@@ -16,8 +16,8 @@
16
16
  * - **turn storage** (`turn:${turnId}`) — the durable `TurnEventStore` rows +
17
17
  * status for one buffered turn (replay survives DO eviction — this is what
18
18
  * graduates the vertical's `turnStore` from no-op). KEPT and load-bearing:
19
- * a DETACHED run never reaches the gateway, so this is the only way a
20
- * browser tails autonomous work.
19
+ * a stream/dispatch DETACHED run does not reach the gateway on the
20
+ * measured path, so this is how a browser tails that autonomous work.
21
21
  * - **scope index** (`scope:${scopeId}`) — the running-turn index backing
22
22
  * `TurnEventStore.listRunning` reconnect discovery. KEPT.
23
23
  *
@@ -41,10 +41,11 @@
41
41
  * `productSyncEvents`) — the gateway is per-session;
42
42
  * • the durable TURN-EVENT rows + running-turn index
43
43
  * (`createDurableObjectTurnEventStore`) that `runDetachedTurn` streams
44
- * into — a detached run (`dispatchPrompt({ detach: true })`,
45
- * `driveTurn`) goes through `streamPrompt` internally, so it never
46
- * reaches the gateway at all. Autonomous work a browser must tail has
47
- * no other path today.
44
+ * into — stream/dispatch detached runs (`dispatchPrompt({ detach: true })`,
45
+ * `streamPrompt`) do not reach the gateway on the measured path. Sandbox
46
+ * 0.37 `driveTurn` uses the session message lane and is gateway-visible
47
+ * by SDK contract. Autonomous stream/dispatch work a browser must tail
48
+ * still needs the durable rows.
48
49
  *
49
50
  * DEPRECATED — duplicates the SDK:
50
51
  * • the interactive per-turn REBROADCAST/replay on the thread channel