@tangle-network/agent-app 0.46.54 → 0.46.55
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 +4 -4
- package/dist/chat-routes/index.js +1 -1
- package/dist/{chunk-T374KO42.js → chunk-LKZBMDYM.js} +4 -3
- package/dist/chunk-LKZBMDYM.js.map +1 -0
- package/dist/sandbox/index.d.ts +2 -2
- package/dist/sandbox/index.js +1 -1
- package/dist/turn-stream/adapters.d.ts +10 -10
- package/dist/turn-stream/core.d.ts +15 -12
- package/dist/turn-stream/do.d.ts +2 -2
- package/dist/turn-stream/index.d.ts +5 -4
- package/dist/turn-stream/index.js.map +1 -1
- package/package.json +5 -5
- package/dist/chunk-T374KO42.js.map +0 -1
package/dist/sandbox/index.d.ts
CHANGED
|
@@ -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
|
|
795
|
-
* turn
|
|
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 */
|
package/dist/sandbox/index.js
CHANGED
|
@@ -99,7 +99,7 @@ import {
|
|
|
99
99
|
workspaceSandboxRecoveryMessage,
|
|
100
100
|
workspaceSandboxRecoveryRecommendedActions,
|
|
101
101
|
writeProfileFilesToBox
|
|
102
|
-
} from "../chunk-
|
|
102
|
+
} from "../chunk-LKZBMDYM.js";
|
|
103
103
|
import "../chunk-MCYJON3F.js";
|
|
104
104
|
import "../chunk-LWSJK546.js";
|
|
105
105
|
import "../chunk-P5PIAQVS.js";
|
|
@@ -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
|
-
*
|
|
53
|
-
* run/stream lane, which publishes nothing to the session event bus
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
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 (
|
|
194
|
-
*
|
|
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.
|
|
41
|
-
* `
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
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:
|
|
94
|
-
* this instance.
|
|
95
|
-
*
|
|
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
|
-
*
|
|
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.
|
|
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;
|
package/dist/turn-stream/do.d.ts
CHANGED
|
@@ -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
|
|
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 —
|
|
45
|
-
* `
|
|
46
|
-
*
|
|
47
|
-
*
|
|
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
|