@robota-sdk/agent-transport 3.0.0-beta.82 → 3.0.0-beta.84
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/CHANGELOG.md +795 -0
- package/README.md +80 -118
- package/dist/browser/client.d.ts +2 -2
- package/dist/browser/client.js +1 -1
- package/dist/browser/index.d.ts +87 -13
- package/dist/browser/index.d.ts.map +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/observer-messages-CEeisRaF.js +2 -0
- package/dist/browser/observer-messages-CEeisRaF.js.map +1 -0
- package/dist/browser/observer-messages-Dnff2Tdb.d.ts +471 -0
- package/dist/browser/observer-messages-Dnff2Tdb.d.ts.map +1 -0
- package/dist/node/index.cjs +1 -1
- package/dist/node/index.d.cts +308 -16
- package/dist/node/index.d.cts.map +1 -1
- package/dist/node/index.d.ts +308 -16
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/index.js +1 -1
- package/dist/node/index.js.map +1 -1
- package/dist/node/node.cjs +1 -1
- package/dist/node/node.d.cts +69 -1
- package/dist/node/node.d.cts.map +1 -1
- package/dist/node/node.d.ts +70 -2
- package/dist/node/node.d.ts.map +1 -1
- package/dist/node/node.js +1 -1
- package/dist/node/node.js.map +1 -1
- package/package.json +17 -14
- package/src/__tests__/bearer-resource-gate.test.ts +120 -0
- package/src/__tests__/history-attached-budget.test.ts +216 -0
- package/src/__tests__/message-decoders.test.ts +496 -6
- package/src/__tests__/project-read-messages.test.ts +118 -0
- package/src/__tests__/session-detail-loop-status.test.ts +169 -0
- package/src/__tests__/session-directory-messages.test.ts +322 -0
- package/src/__tests__/session-error-classification.test.ts +113 -0
- package/src/__tests__/session-history-wire.test.ts +342 -0
- package/src/__tests__/session-message-handler-observe.test.ts +217 -0
- package/src/__tests__/session-message-handler.test.ts +139 -4
- package/src/__tests__/settings-messages.test.ts +193 -0
- package/src/__tests__/ws-broadcast-events.test.ts +10 -0
- package/src/client.ts +9 -1
- package/src/index.ts +18 -2
- package/src/loop-control-messages.ts +34 -0
- package/src/message-decoders.ts +238 -6
- package/src/node/bearer-resource-gate.ts +291 -0
- package/src/node/index.ts +13 -0
- package/src/observer-messages.ts +47 -0
- package/src/open-prompts.ts +76 -0
- package/src/outbound-delivery.ts +11 -2
- package/src/project-read-messages.ts +74 -0
- package/src/protocol-session.ts +23 -1
- package/src/session-directory-messages.ts +162 -0
- package/src/session-error-classification.ts +91 -0
- package/src/session-events.ts +100 -19
- package/src/session-message-handler.ts +110 -15
- package/src/session-query-messages.ts +123 -5
- package/src/session-resume-bridge.ts +8 -0
- package/src/settings-messages.ts +103 -0
- package/src/wire-messages.ts +238 -11
- package/dist/browser/message-decoders-BB8n-H2X.d.ts +0 -252
- package/dist/browser/message-decoders-BB8n-H2X.d.ts.map +0 -1
- package/dist/browser/message-decoders-CDmDoZPR.js +0 -2
- package/dist/browser/message-decoders-CDmDoZPR.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/wire-messages.ts","../../src/outbound-delivery.ts","../../src/protocol-session.ts","../../src/usage-messages.ts","../../src/session-events.ts","../../src/session-message-handler.ts","../../src/message-decoders.ts","../../src/resume-buffer.ts","../../src/channel-frames.ts","../../src/session-resume-bridge.ts","../../src/peer-message-ledger.ts","../../src/handoff-chunking.ts"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/wire-messages.ts","../../src/outbound-delivery.ts","../../src/protocol-session.ts","../../src/settings-messages.ts","../../src/usage-messages.ts","../../src/session-events.ts","../../src/session-message-handler.ts","../../src/observer-messages.ts","../../src/message-decoders.ts","../../src/resume-buffer.ts","../../src/channel-frames.ts","../../src/session-resume-bridge.ts","../../src/peer-message-ledger.ts","../../src/handoff-chunking.ts"],"mappings":";;;;;;;KAyDY;KAEP,gBAAgB,WAAW;;;;;UAMf;EACf;EACA;EACA;;;;;;;UAQe,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;UAGM;WACN,KAAK;;;;;;;;WAQL;;;;;;;WAOA;;;;;;;;;iBAUK,iBACd,QAAQ,oBACR,SAAS,cACT,YAAY,wBACX;;;;;;;;iBAyEa,uBACd,QAAQ,oBACR,yBACA,aACC;;iBAWa,iBAAiB,QAAQ,oBAAoB;;;;;;;;;;UCvJ5C;WACN;;WAEA;;WAEA;;WAEA;;;;;;;;;cAUE;;;;;;;;iBASG,oBACd,mBACA,oBACA,kCACU;;KAqBA;;;;;;;;;KAUA;;;;;;;UASK;WACN,SAAS;WACT,YAAY;;WAEZ;;WAEA;;WAEA;;;;;;;;;;cAWE;mBAIkB;mBAHZ;UACT;EAEqB,YAAA;MAEzB;MAIA;;EAKJ,OAAO,OAAO,gBAAgB;;EAmD9B;;EAQA;UAKQ;;;;;;;;iBAsBM,cACd,WAAW,mBACX"}
|
package/dist/node/index.d.ts
CHANGED
|
@@ -1,11 +1,35 @@
|
|
|
1
|
+
import { IAskRequestEvent, IBranchEvent, IContextFileRefreshedEvent, IExecutionResult, IModelListGroup, IPermissionRequestEvent, IPlanApprovalEvent, IPromptResolvedEvent, ISessionAgentJobs, ISessionBackgroundGroups, ISessionBackgroundTasks, ISessionCommands, ISessionConversationRead, ISessionDirectory, ISessionDriverAttribution, ISessionEvents, ISessionExecutionDetail, ISessionExecutionState, ISessionExecutionWorkspace, ISessionListing, ISessionProjectRead, ISessionPromptResolution, ISessionRenamedEvent, ISessionSelfPacedLoopControl, ISessionStatusRead, ISessionStatusSnapshot, ISessionSwitchedEvent, ISessionTurnControl, ISessionTurnSubmission, ISettingsSnapshot, IToolState, IUiIntentEvent, TDriverId, TPermissionResultValue, TProjectDiffRead, TProjectMemoryRead, TProjectStatusRead, TSessionChangeRefusalCode, TSessionDeleteRefusalCode, TSettingsPatch, TTurnSource, TWaitingLoopStopOutcome } from "@robota-sdk/agent-interface-session";
|
|
1
2
|
import { IPersonalUsageReport, IPersonalUsageRequest, IUsageBySourceReport, TUsageSurface } from "@robota-sdk/agent-interface-analytics";
|
|
2
|
-
import { ICommandResult } from "@robota-sdk/agent-interface-command";
|
|
3
|
-
import { IBackgroundJobGroupState, IBackgroundTaskInput, IBackgroundTaskListFilter, IBackgroundTaskLogCursor, IBackgroundTaskLogPage, IBackgroundTaskState, IExecutionWorkspaceSnapshot, TBackgroundJobGroupEvent, TBackgroundTaskEvent } from "@robota-sdk/agent-interface-execution";
|
|
4
|
-
import { IAskRequestEvent, IBranchEvent, IContextFileRefreshedEvent, IExecutionResult, IPermissionRequestEvent, IPlanApprovalEvent, IPromptResolvedEvent, ISessionBackgroundGroups, ISessionBackgroundTasks, ISessionCommands, ISessionConversationRead, ISessionDriverAttribution, ISessionEvents, ISessionExecutionState, ISessionExecutionWorkspace, ISessionPromptResolution, ISessionRenamedEvent, ISessionTurnControl, ISessionTurnSubmission, IToolState, IUiIntentEvent, TDriverId, TPermissionResultValue } from "@robota-sdk/agent-interface-session";
|
|
3
|
+
import { ICommandListEntry, ICommandResult, ICommandSkillListEntry, TCommandSurfaceLocality } from "@robota-sdk/agent-interface-command";
|
|
4
|
+
import { IBackgroundJobGroupState, IBackgroundTaskInput, IBackgroundTaskListFilter, IBackgroundTaskLogCursor, IBackgroundTaskLogPage, IBackgroundTaskState, IExecutionDetailCursor, IExecutionDetailPage, IExecutionWorkspaceSnapshot, TBackgroundJobGroupEvent, TBackgroundTaskEvent } from "@robota-sdk/agent-interface-execution";
|
|
5
5
|
import { IBinaryFrame, IChannelEventFrame, TActionResponse, TChannelReceiveResult } from "@robota-sdk/agent-interface-transport";
|
|
6
6
|
import { IHandoffIntegrity, IPeerMessage, IPeerMessageAck, TPeerDeliveryState } from "@robota-sdk/agent-interface-session-mobility";
|
|
7
7
|
//#region src/wire-messages.d.ts
|
|
8
8
|
type TBackgroundControlAction = 'cancel' | 'close' | 'send';
|
|
9
|
+
type THistoryEntry = ReturnType<ISessionConversationRead['getFullHistory']>[number];
|
|
10
|
+
/**
|
|
11
|
+
* #3282 §4: one agent the switcher can offer. `definedIn` is a plain-words location — a discovered
|
|
12
|
+
* file's path, or "Built-in" — never a raw internal id.
|
|
13
|
+
*/
|
|
14
|
+
interface IWireAgentDefinitionSummary {
|
|
15
|
+
name: string;
|
|
16
|
+
description: string;
|
|
17
|
+
definedIn: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* #3189: one entry of the session's full history as it crosses the wire. The same record the session
|
|
21
|
+
* keeps, except that `timestamp` is an ISO 8601 string: a `Date` does not survive JSON, and a
|
|
22
|
+
* declared `Date` that arrives as a string would let a client call `Date` methods on a string.
|
|
23
|
+
*/
|
|
24
|
+
interface IWireHistoryEntry extends Omit<THistoryEntry, 'timestamp'> {
|
|
25
|
+
/** ISO 8601. */
|
|
26
|
+
timestamp: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* #3189: a turn's result as it crosses the wire. The session's whole history stays behind: it only
|
|
30
|
+
* grows, so a client reads it in bounded pages with `get-history` instead.
|
|
31
|
+
*/
|
|
32
|
+
type TWireExecutionResult = Omit<IExecutionResult, 'history'>;
|
|
9
33
|
/** Inbound message from client to server. */
|
|
10
34
|
type TClientMessage = {
|
|
11
35
|
type: 'submit';
|
|
@@ -14,14 +38,49 @@ type TClientMessage = {
|
|
|
14
38
|
type: 'command';
|
|
15
39
|
name: string;
|
|
16
40
|
args?: string;
|
|
41
|
+
requestId?: string;
|
|
17
42
|
} | {
|
|
18
43
|
type: 'abort';
|
|
19
44
|
} | {
|
|
20
45
|
type: 'cancel-queue';
|
|
21
46
|
} | {
|
|
22
47
|
type: 'get-messages';
|
|
48
|
+
} | {
|
|
49
|
+
type: 'get-history';
|
|
50
|
+
fromIndex?: number;
|
|
51
|
+
} | {
|
|
52
|
+
type: 'get-prompts';
|
|
23
53
|
} | {
|
|
24
54
|
type: 'get-context';
|
|
55
|
+
} | {
|
|
56
|
+
type: 'get-commands';
|
|
57
|
+
} | {
|
|
58
|
+
type: 'get-status';
|
|
59
|
+
} | {
|
|
60
|
+
type: 'list-models';
|
|
61
|
+
requestId: string;
|
|
62
|
+
} | {
|
|
63
|
+
type: 'get-agent-definitions';
|
|
64
|
+
requestId: string;
|
|
65
|
+
} | {
|
|
66
|
+
type: 'list-sessions';
|
|
67
|
+
requestId: string;
|
|
68
|
+
} | {
|
|
69
|
+
type: 'new-session';
|
|
70
|
+
requestId?: string;
|
|
71
|
+
} | {
|
|
72
|
+
type: 'switch-session';
|
|
73
|
+
sessionId: string;
|
|
74
|
+
requestId?: string;
|
|
75
|
+
} | {
|
|
76
|
+
type: 'rename-session';
|
|
77
|
+
sessionId: string;
|
|
78
|
+
name: string;
|
|
79
|
+
requestId: string;
|
|
80
|
+
} | {
|
|
81
|
+
type: 'delete-session';
|
|
82
|
+
sessionId: string;
|
|
83
|
+
requestId: string;
|
|
25
84
|
} | {
|
|
26
85
|
type: 'get-usage-report';
|
|
27
86
|
} | {
|
|
@@ -39,6 +98,24 @@ type TClientMessage = {
|
|
|
39
98
|
type: 'get-pending';
|
|
40
99
|
} | {
|
|
41
100
|
type: 'get-execution-workspace';
|
|
101
|
+
} | {
|
|
102
|
+
type: 'read-execution-detail';
|
|
103
|
+
requestId: string;
|
|
104
|
+
entryId: string;
|
|
105
|
+
cursor?: IExecutionDetailCursor;
|
|
106
|
+
} | {
|
|
107
|
+
type: 'stop-waiting-loop';
|
|
108
|
+
requestId: string;
|
|
109
|
+
} | {
|
|
110
|
+
type: 'project-status';
|
|
111
|
+
requestId: string;
|
|
112
|
+
} | {
|
|
113
|
+
type: 'project-diff';
|
|
114
|
+
requestId: string;
|
|
115
|
+
path: string;
|
|
116
|
+
} | {
|
|
117
|
+
type: 'project-memory';
|
|
118
|
+
requestId: string;
|
|
42
119
|
} | {
|
|
43
120
|
type: 'get-background-tasks';
|
|
44
121
|
filter?: IBackgroundTaskListFilter;
|
|
@@ -82,6 +159,13 @@ type TClientMessage = {
|
|
|
82
159
|
} | {
|
|
83
160
|
type: 'ack';
|
|
84
161
|
seq: number;
|
|
162
|
+
} | {
|
|
163
|
+
type: 'get-settings';
|
|
164
|
+
requestId: string;
|
|
165
|
+
} | {
|
|
166
|
+
type: 'update-settings';
|
|
167
|
+
requestId: string;
|
|
168
|
+
patch: TSettingsPatch;
|
|
85
169
|
};
|
|
86
170
|
/** Outbound message from server to client. */
|
|
87
171
|
type TServerMessage = {
|
|
@@ -106,15 +190,32 @@ type TServerMessage = {
|
|
|
106
190
|
driverId?: TDriverId;
|
|
107
191
|
} | {
|
|
108
192
|
type: 'complete';
|
|
109
|
-
result:
|
|
193
|
+
result: TWireExecutionResult;
|
|
110
194
|
driverId?: TDriverId;
|
|
111
195
|
} | {
|
|
112
196
|
type: 'interrupted';
|
|
113
|
-
result:
|
|
197
|
+
result: TWireExecutionResult;
|
|
114
198
|
driverId?: TDriverId;
|
|
115
199
|
} | {
|
|
116
200
|
type: 'error';
|
|
201
|
+
/** The raw failure text — kept for a "Details" disclosure; never the whole story on its own. */
|
|
117
202
|
message: string;
|
|
203
|
+
/**
|
|
204
|
+
* What kind of failure this was, when it's known — so a renderer can say what happened and
|
|
205
|
+
* what to do next in plain words instead of showing `message` verbatim (#3289 §3). Additive:
|
|
206
|
+
* absent for a session error this classification does not recognize (unchanged behavior).
|
|
207
|
+
*/
|
|
208
|
+
code?: 'auth' | 'rate_limit' | 'model_unavailable' | 'network' | 'provider';
|
|
209
|
+
/** The provider/profile name the failure came from, when `code` names one. */
|
|
210
|
+
provider?: string;
|
|
211
|
+
/** For `code: 'rate_limit'`, how long until a retry may succeed, when the provider said so. */
|
|
212
|
+
retryAfterSeconds?: number;
|
|
213
|
+
/**
|
|
214
|
+
* For `code: 'model_unavailable'`, the model the failed request tried — captured at the moment
|
|
215
|
+
* of failure so a renderer never has to fall back to whatever model is live by the time it
|
|
216
|
+
* draws this notice (which may already be a different one the person switched to).
|
|
217
|
+
*/
|
|
218
|
+
model?: string;
|
|
118
219
|
driverId?: TDriverId;
|
|
119
220
|
} | {
|
|
120
221
|
type: 'command_result';
|
|
@@ -122,12 +223,91 @@ type TServerMessage = {
|
|
|
122
223
|
message: string;
|
|
123
224
|
success: boolean;
|
|
124
225
|
data?: ICommandResult['data'];
|
|
226
|
+
/** The `requestId` of the `command` this answers, when it carried one. */
|
|
227
|
+
requestId?: string;
|
|
125
228
|
} | {
|
|
126
229
|
type: 'messages';
|
|
127
230
|
messages: ReturnType<ISessionConversationRead['getMessages']>;
|
|
231
|
+
/**
|
|
232
|
+
* #3288 §2: the SAME history, projected into display segments (text runs and finished tool
|
|
233
|
+
* calls, diffs included) — so a reload/reconnect/resume replay shows tool rows instead of bare
|
|
234
|
+
* text. Optional so an older host that has not grown `getMessagesDisplay()` yet still sends a
|
|
235
|
+
* valid frame; a client without this field falls back to `messages`-only (text bubbles), the
|
|
236
|
+
* same as before this existed.
|
|
237
|
+
*/
|
|
238
|
+
display?: ReturnType<ISessionConversationRead['getMessagesDisplay']>;
|
|
239
|
+
/**
|
|
240
|
+
* #3289 §3: this connection's own server-assigned driver id, carried on the first frame every
|
|
241
|
+
* connection already gets — so a client can tell its OWN turns from a co-driver's instead of
|
|
242
|
+
* treating everything but the literal `'owner'` id as someone else (REMOTE-014 E5 display-only).
|
|
243
|
+
*/
|
|
244
|
+
driverId?: TDriverId;
|
|
245
|
+
} | {
|
|
246
|
+
type: 'history';
|
|
247
|
+
startIndex: number;
|
|
248
|
+
total: number;
|
|
249
|
+
entries: IWireHistoryEntry[];
|
|
128
250
|
} | {
|
|
129
251
|
type: 'context';
|
|
130
252
|
state: ReturnType<ISessionConversationRead['getContextState']>;
|
|
253
|
+
} | {
|
|
254
|
+
type: 'history_changed';
|
|
255
|
+
} | {
|
|
256
|
+
type: 'turn_source';
|
|
257
|
+
source: TTurnSource;
|
|
258
|
+
} | {
|
|
259
|
+
type: 'commands';
|
|
260
|
+
commands: ICommandListEntry[];
|
|
261
|
+
skills: ICommandSkillListEntry[];
|
|
262
|
+
} | {
|
|
263
|
+
type: 'session_status';
|
|
264
|
+
status: ISessionStatusSnapshot;
|
|
265
|
+
} | {
|
|
266
|
+
type: 'model_list';
|
|
267
|
+
requestId: string;
|
|
268
|
+
groups: readonly IModelListGroup[];
|
|
269
|
+
currentProfile?: string;
|
|
270
|
+
currentModel: string;
|
|
271
|
+
} | {
|
|
272
|
+
type: 'agent_definitions';
|
|
273
|
+
requestId: string;
|
|
274
|
+
agents: readonly IWireAgentDefinitionSummary[];
|
|
275
|
+
current: string;
|
|
276
|
+
} | {
|
|
277
|
+
type: 'sessions';
|
|
278
|
+
requestId: string;
|
|
279
|
+
listing: ISessionListing;
|
|
280
|
+
} | {
|
|
281
|
+
type: 'sessions_error';
|
|
282
|
+
requestId: string;
|
|
283
|
+
code: 'not_available' | 'list_failed';
|
|
284
|
+
message: string;
|
|
285
|
+
} | {
|
|
286
|
+
type: 'session_switched';
|
|
287
|
+
event: ISessionSwitchedEvent;
|
|
288
|
+
} | {
|
|
289
|
+
type: 'session_change_failed';
|
|
290
|
+
code: TSessionChangeRefusalCode;
|
|
291
|
+
message: string;
|
|
292
|
+
requestId?: string;
|
|
293
|
+
} | {
|
|
294
|
+
type: 'session_renamed_in_list';
|
|
295
|
+
requestId: string;
|
|
296
|
+
sessionId: string;
|
|
297
|
+
name: string;
|
|
298
|
+
} | {
|
|
299
|
+
type: 'session_rename_failed';
|
|
300
|
+
requestId: string;
|
|
301
|
+
message: string;
|
|
302
|
+
} | {
|
|
303
|
+
type: 'session_deleted';
|
|
304
|
+
requestId: string;
|
|
305
|
+
sessionId: string;
|
|
306
|
+
} | {
|
|
307
|
+
type: 'session_delete_failed';
|
|
308
|
+
requestId: string;
|
|
309
|
+
code: TSessionDeleteRefusalCode;
|
|
310
|
+
message: string;
|
|
131
311
|
} | {
|
|
132
312
|
type: 'usage_report';
|
|
133
313
|
report: IUsageBySourceReport;
|
|
@@ -157,9 +337,34 @@ type TServerMessage = {
|
|
|
157
337
|
} | {
|
|
158
338
|
type: 'pending';
|
|
159
339
|
pending: string | null;
|
|
340
|
+
pendingCount?: number;
|
|
160
341
|
} | {
|
|
161
342
|
type: 'execution_workspace_event';
|
|
162
343
|
snapshot: IExecutionWorkspaceSnapshot;
|
|
344
|
+
} | {
|
|
345
|
+
type: 'execution_detail';
|
|
346
|
+
requestId: string;
|
|
347
|
+
page: IExecutionDetailPage;
|
|
348
|
+
} | {
|
|
349
|
+
type: 'execution_detail_error';
|
|
350
|
+
requestId: string;
|
|
351
|
+
message: string;
|
|
352
|
+
} | {
|
|
353
|
+
type: 'waiting_loop_stop';
|
|
354
|
+
requestId: string;
|
|
355
|
+
outcome: TWaitingLoopStopOutcome;
|
|
356
|
+
} | {
|
|
357
|
+
type: 'project_status';
|
|
358
|
+
requestId: string;
|
|
359
|
+
result: TProjectStatusRead;
|
|
360
|
+
} | {
|
|
361
|
+
type: 'project_diff';
|
|
362
|
+
requestId: string;
|
|
363
|
+
result: TProjectDiffRead;
|
|
364
|
+
} | {
|
|
365
|
+
type: 'project_memory';
|
|
366
|
+
requestId: string;
|
|
367
|
+
result: TProjectMemoryRead;
|
|
163
368
|
} | {
|
|
164
369
|
type: 'background_task_event';
|
|
165
370
|
event: TBackgroundTaskEvent;
|
|
@@ -219,8 +424,18 @@ type TServerMessage = {
|
|
|
219
424
|
} | {
|
|
220
425
|
type: 'protocol_error';
|
|
221
426
|
message: string;
|
|
427
|
+
requestId?: string;
|
|
222
428
|
} | {
|
|
223
429
|
type: 'resume_gap';
|
|
430
|
+
} | {
|
|
431
|
+
type: 'settings';
|
|
432
|
+
requestId: string;
|
|
433
|
+
settings: ISettingsSnapshot;
|
|
434
|
+
} | {
|
|
435
|
+
type: 'settings_error';
|
|
436
|
+
requestId: string;
|
|
437
|
+
code: 'not_available' | 'invalid' | 'refused' | 'update_failed';
|
|
438
|
+
message: string;
|
|
224
439
|
};
|
|
225
440
|
/**
|
|
226
441
|
* REMOTE-013 E4: a server message stamped with its monotonic session sequence number (added by the
|
|
@@ -262,14 +477,22 @@ type TOutboundDeliver = ((message: TServerMessage) => void) & {
|
|
|
262
477
|
};
|
|
263
478
|
/**
|
|
264
479
|
* Observe THIS connection's first outbound delivery failure. `event` is the `type` of the frame that
|
|
265
|
-
* could not be delivered — a session event
|
|
266
|
-
* reply's type for a reply (`command_result`, `protocol_error`, …).
|
|
480
|
+
* could not be delivered — for the fan-out, the frame a session event was forwarded as (usually, not
|
|
481
|
+
* always, the event's own name), and the reply's type for a reply (`command_result`, `protocol_error`, …).
|
|
267
482
|
*
|
|
268
483
|
* Required, never optional: a carrier that could opt out of observing its own delivery failures is the
|
|
269
484
|
* silent-failure shape this boundary exists to remove.
|
|
270
485
|
*/
|
|
271
486
|
type TDeliveryErrorHandler = (error: Error, event: TServerMessage['type']) => void;
|
|
272
487
|
declare const DEFAULT_MAX_PENDING_BYTES: number;
|
|
488
|
+
/**
|
|
489
|
+
* Backpressure budget for a terminal attached to a session on the same host, in either role.
|
|
490
|
+
*
|
|
491
|
+
* 1 MiB, tighter than the default: an attached terminal reads a local socket, so a backlog this large
|
|
492
|
+
* means it stopped reading rather than that a network is slow. Exceeding it closes that connection
|
|
493
|
+
* only; the session never waits for a reader, so other surfaces keep streaming.
|
|
494
|
+
*/
|
|
495
|
+
declare const ATTACHED_SURFACE_MAX_PENDING_BYTES: number;
|
|
273
496
|
/**
|
|
274
497
|
* Is this carrier holding more than the budget allows?
|
|
275
498
|
*
|
|
@@ -315,7 +538,48 @@ declare function createOutboundDelivery(send: (message: TServerMessage) => void,
|
|
|
315
538
|
//#endregion
|
|
316
539
|
//#region src/protocol-session.d.ts
|
|
317
540
|
/** Session roles required by the shared WebSocket/WebRTC protocol. */
|
|
318
|
-
interface IProtocolSession extends ISessionTurnSubmission, ISessionTurnControl, ISessionCommands, ISessionEvents, ISessionPromptResolution, ISessionConversationRead, ISessionExecutionState, ISessionDriverAttribution, ISessionBackgroundTasks, ISessionBackgroundGroups, ISessionExecutionWorkspace {}
|
|
541
|
+
interface IProtocolSession extends ISessionTurnSubmission, ISessionTurnControl, ISessionCommands, ISessionStatusRead, ISessionEvents, ISessionPromptResolution, ISessionConversationRead, ISessionExecutionState, ISessionDriverAttribution, ISessionBackgroundTasks, ISessionBackgroundGroups, ISessionExecutionWorkspace, ISessionExecutionDetail, ISessionSelfPacedLoopControl, ISessionAgentJobs {}
|
|
542
|
+
/**
|
|
543
|
+
* #3282 §4c: a protocol session that ALSO answers the Project panel's reads. `Partial` (not a fourth
|
|
544
|
+
* mandatory role on {@link IProtocolSession} itself) deliberately: every existing test double and
|
|
545
|
+
* every other host that builds an `IProtocolSession` keeps type-checking unchanged, and the panel's
|
|
546
|
+
* three methods are runtime-probed (`typeof session.readProjectStatus === 'function'`) rather than
|
|
547
|
+
* assumed — `InteractiveSession` (the one production implementation) provides all three, satisfying
|
|
548
|
+
* this type with no further wiring.
|
|
549
|
+
*/
|
|
550
|
+
type TProjectReadCapableSession = IProtocolSession & Partial<ISessionProjectRead>;
|
|
551
|
+
//#endregion
|
|
552
|
+
//#region src/settings-messages.d.ts
|
|
553
|
+
type TSettingsMessage = Extract<TClientMessage, {
|
|
554
|
+
type: 'get-settings' | 'update-settings';
|
|
555
|
+
}>;
|
|
556
|
+
declare function isSettingsMessage(msg: TClientMessage): msg is TSettingsMessage;
|
|
557
|
+
/** What applying a patch did: the fresh snapshot, or why nothing was written. */
|
|
558
|
+
type TSettingsUpdateOutcome = {
|
|
559
|
+
readonly ok: true;
|
|
560
|
+
readonly settings: ISettingsSnapshot;
|
|
561
|
+
} | {
|
|
562
|
+
readonly ok: false;
|
|
563
|
+
readonly code: 'not_available' | 'invalid' | 'refused' | 'update_failed';
|
|
564
|
+
readonly message: string;
|
|
565
|
+
};
|
|
566
|
+
/**
|
|
567
|
+
* #3282 §4a: host-owned read/write for the Settings screen, supplied by the composition root the
|
|
568
|
+
* same way `IUsageQueryReporters` supplies usage reads — this package only correlates the request
|
|
569
|
+
* and carries the result. `updateSettings` applies through the SAME function the matching slash
|
|
570
|
+
* command uses (issue #3282 §4: "one code path, so the behavior matches the TUI"), so whatever a
|
|
571
|
+
* command would refuse on this surface is refused here too.
|
|
572
|
+
*/
|
|
573
|
+
interface ISettingsReporter {
|
|
574
|
+
getSettings(session: IProtocolSession, locality?: TCommandSurfaceLocality): ISettingsSnapshot | Promise<ISettingsSnapshot>;
|
|
575
|
+
/**
|
|
576
|
+
* Applies through the SAME function the matching slash command uses. `locality` (#3282 §4 part
|
|
577
|
+
* b-2) is forwarded to that command exactly as the transport received it, so a command that
|
|
578
|
+
* refuses a remote surface (installing a plugin) refuses identically here.
|
|
579
|
+
*/
|
|
580
|
+
updateSettings(session: IProtocolSession, patch: TSettingsPatch, locality?: TCommandSurfaceLocality): TSettingsUpdateOutcome | Promise<TSettingsUpdateOutcome>;
|
|
581
|
+
}
|
|
582
|
+
declare function handleSettingsMessage(session: IProtocolSession, deliver: TOutboundDeliver, msg: TSettingsMessage, reporter: ISettingsReporter | undefined, locality?: TCommandSurfaceLocality): void;
|
|
319
583
|
//#endregion
|
|
320
584
|
//#region src/usage-messages.d.ts
|
|
321
585
|
interface IUsageQueryReporters {
|
|
@@ -334,17 +598,17 @@ declare const PROTOCOL_SESSION_EVENT_CLASSIFICATION: {
|
|
|
334
598
|
readonly thinking: "forwarded";
|
|
335
599
|
readonly complete: "forwarded";
|
|
336
600
|
readonly error: "forwarded";
|
|
337
|
-
readonly context_update: "
|
|
338
|
-
readonly compact: "
|
|
601
|
+
readonly context_update: "forwarded";
|
|
602
|
+
readonly compact: "forwarded";
|
|
339
603
|
readonly interrupted: "forwarded";
|
|
340
|
-
readonly skill_activation: "
|
|
604
|
+
readonly skill_activation: "forwarded";
|
|
341
605
|
readonly background_task_event: "forwarded";
|
|
342
606
|
readonly background_job_group_event: "forwarded";
|
|
343
607
|
readonly execution_workspace_event: "forwarded";
|
|
344
608
|
readonly user_message: "forwarded";
|
|
345
|
-
readonly turn_source: "
|
|
609
|
+
readonly turn_source: "forwarded";
|
|
346
610
|
readonly context_file_refreshed: "forwarded";
|
|
347
|
-
readonly memory_event: "
|
|
611
|
+
readonly memory_event: "forwarded";
|
|
348
612
|
readonly goal_event: "non-surface";
|
|
349
613
|
readonly plan_event: "forwarded";
|
|
350
614
|
readonly branch_event: "forwarded";
|
|
@@ -354,12 +618,20 @@ declare const PROTOCOL_SESSION_EVENT_CLASSIFICATION: {
|
|
|
354
618
|
readonly ui_intent: "requester-routed";
|
|
355
619
|
readonly session_renamed: "forwarded";
|
|
356
620
|
readonly history_cleared: "forwarded";
|
|
621
|
+
readonly session_switched: "forwarded";
|
|
622
|
+
readonly status_changed: "forwarded";
|
|
357
623
|
};
|
|
358
624
|
//#endregion
|
|
359
625
|
//#region src/session-message-handler.d.ts
|
|
626
|
+
/**
|
|
627
|
+
* What a connected surface may do. `drive` sends prompts, answers questions and controls the session.
|
|
628
|
+
* `observe` is read-only: it follows this session's conversation and state, but never submits, answers,
|
|
629
|
+
* controls, or reads another session's records, and it never counts as a surface that can answer.
|
|
630
|
+
*/
|
|
631
|
+
type TSessionSurfaceRole = 'drive' | 'observe';
|
|
360
632
|
interface ISessionMessageHandlerOptions {
|
|
361
|
-
/** IProtocolSession to expose. */
|
|
362
|
-
session:
|
|
633
|
+
/** IProtocolSession to expose — `Partial<ISessionProjectRead>` is probed, not assumed (#3282 §4c). */
|
|
634
|
+
session: TProjectReadCapableSession;
|
|
363
635
|
/**
|
|
364
636
|
* ARCH-030: the CARRIER's connection-scoped outbound delivery boundary — not a raw `send`, and not a
|
|
365
637
|
* `send` plus an error callback for this handler to assemble into one. The carrier owns both the sink
|
|
@@ -376,12 +648,25 @@ interface ISessionMessageHandlerOptions {
|
|
|
376
648
|
driverId?: TDriverId;
|
|
377
649
|
/** Trusted carrier-owned product surface, kept separate from driver identity. */
|
|
378
650
|
surface?: TUsageSurface;
|
|
651
|
+
/** Carrier-decided role of this connection; defaults to `drive`. The client never chooses it here. */
|
|
652
|
+
role?: TSessionSurfaceRole;
|
|
379
653
|
/** Host-owned cross-session read model. The protocol only correlates and carries its result. */
|
|
380
654
|
personalUsageReporter?: NonNullable<IUsageQueryReporters['personalUsageReporter']>;
|
|
381
655
|
/** Host-owned current-session trace/cost producer for the pre-existing message family. */
|
|
382
656
|
usageReporter?: NonNullable<IUsageQueryReporters['usageReporter']>;
|
|
383
657
|
/** Host-owned stored-session producer used by cross-session drill-down. */
|
|
384
658
|
storedSessionUsageReporter?: NonNullable<IUsageQueryReporters['storedSessionUsageReporter']>;
|
|
659
|
+
/** Host-owned session directory (#3189): list, start and switch the host's sessions. */
|
|
660
|
+
sessionDirectory?: ISessionDirectory;
|
|
661
|
+
/** #3282 §4a: host-owned read/write for the GUI Settings screen. */
|
|
662
|
+
settingsReporter?: ISettingsReporter;
|
|
663
|
+
/**
|
|
664
|
+
* #3282 §4 part b-2: carrier-decided, like `role` — whether THIS carrier's connections are
|
|
665
|
+
* provably on this machine. The loopback WS carrier is `'local'`; the device-mesh/WebRTC carrier
|
|
666
|
+
* sets `'remote'`. Absent → `'local'`, forwarded to `executeCommand` and the settings reporter so a
|
|
667
|
+
* command that runs code from outside the session (installing a plugin) can refuse a remote device.
|
|
668
|
+
*/
|
|
669
|
+
commandSurfaceLocality?: TCommandSurfaceLocality;
|
|
385
670
|
}
|
|
386
671
|
/**
|
|
387
672
|
* Create a carrier-neutral message handler for an IProtocolSession.
|
|
@@ -407,6 +692,10 @@ declare function createSessionMessageHandler(options: ISessionMessageHandlerOpti
|
|
|
407
692
|
cleanup: () => void;
|
|
408
693
|
};
|
|
409
694
|
//#endregion
|
|
695
|
+
//#region src/observer-messages.d.ts
|
|
696
|
+
/** Whether an observer may send a message of this type. */
|
|
697
|
+
declare function isObserverMessageType(type: string): boolean;
|
|
698
|
+
//#endregion
|
|
410
699
|
//#region src/message-decoders.d.ts
|
|
411
700
|
type TMessageDecodeResult<TMessage> = {
|
|
412
701
|
readonly ok: true;
|
|
@@ -528,6 +817,8 @@ interface ISessionResumeBridgeOptions {
|
|
|
528
817
|
readonly personalUsageReporter?: IUsageQueryReporters['personalUsageReporter'];
|
|
529
818
|
readonly usageReporter?: IUsageQueryReporters['usageReporter'];
|
|
530
819
|
readonly storedSessionUsageReporter?: IUsageQueryReporters['storedSessionUsageReporter'];
|
|
820
|
+
/** #3282 §4 part b-2: this bridge is the reconnectable WebRTC path, so it is always `'remote'`. */
|
|
821
|
+
readonly commandSurfaceLocality?: TCommandSurfaceLocality;
|
|
531
822
|
}
|
|
532
823
|
declare class SessionResumeBridge {
|
|
533
824
|
private readonly session;
|
|
@@ -535,6 +826,7 @@ declare class SessionResumeBridge {
|
|
|
535
826
|
private driverId?;
|
|
536
827
|
private readonly reporters;
|
|
537
828
|
private readonly surface?;
|
|
829
|
+
private readonly commandSurfaceLocality?;
|
|
538
830
|
private readonly unsubscribe;
|
|
539
831
|
private onDeliveryError?;
|
|
540
832
|
/**
|
|
@@ -762,5 +1054,5 @@ declare class HandoffChunkAssembler {
|
|
|
762
1054
|
*/
|
|
763
1055
|
declare function chunkCountFor(integrity: IHandoffIntegrity, maxChunkBytes?: number): number;
|
|
764
1056
|
//#endregion
|
|
765
|
-
export { CHANNEL_FRAME_MAGIC, CHANNEL_FRAME_VERSION, DEFAULT_MAX_CHUNK_BYTES, DEFAULT_MAX_PENDING_BYTES, DEFAULT_MAX_PENDING_MS, HandoffChunkAssembler, type IAttachOptions, type IBufferedFrame, type IChunkResult, type IHandoffChunk, type IPeerMessageLedger, type IPeerMessageRejection, type IPeerMessageVerdict, type IPendingStallClock, type IProtocolSession, type IResumeBufferOptions, type ISessionMessageHandlerOptions, type ISessionResumeBridgeOptions, MAX_INBOUND_FRAME_BYTES, PROTOCOL_SESSION_EVENT_CLASSIFICATION, ResumeBuffer, SessionResumeBridge, type TChunkOutcome, type TChunkRejection, type TClientMessage, type TDeliveryErrorHandler, type TMessageDecodeResult, type TOutboundDeliver, type TProtocolSessionEventClassification, type TResumeSink, type TResumeTail, type TSeqServerMessage, type TServerMessage, acknowledgePeerMessage, admitPeerMessage, chunkCountFor, chunkHandoffPayload, createOutboundDelivery, createPeerMessageLedger, createPendingStallClock, createSessionMessageHandler, decodeChannelFrame, decodeClientMessage, decodeFrame, decodeServerMessage, encodeBinaryFrame, encodeChannelEventFrame, forgetPeerOrigin, isChannelFrame, isOverPendingBudget };
|
|
1057
|
+
export { ATTACHED_SURFACE_MAX_PENDING_BYTES, CHANNEL_FRAME_MAGIC, CHANNEL_FRAME_VERSION, DEFAULT_MAX_CHUNK_BYTES, DEFAULT_MAX_PENDING_BYTES, DEFAULT_MAX_PENDING_MS, HandoffChunkAssembler, type IAttachOptions, type IBufferedFrame, type IChunkResult, type IHandoffChunk, type IPeerMessageLedger, type IPeerMessageRejection, type IPeerMessageVerdict, type IPendingStallClock, type IProtocolSession, type IResumeBufferOptions, type ISessionMessageHandlerOptions, type ISessionResumeBridgeOptions, type ISettingsReporter, type IWireAgentDefinitionSummary, type IWireHistoryEntry, MAX_INBOUND_FRAME_BYTES, PROTOCOL_SESSION_EVENT_CLASSIFICATION, ResumeBuffer, SessionResumeBridge, type TChunkOutcome, type TChunkRejection, type TClientMessage, type TDeliveryErrorHandler, type TMessageDecodeResult, type TOutboundDeliver, type TProtocolSessionEventClassification, type TResumeSink, type TResumeTail, type TSeqServerMessage, type TServerMessage, type TSessionSurfaceRole, type TSettingsUpdateOutcome, type TWireExecutionResult, acknowledgePeerMessage, admitPeerMessage, chunkCountFor, chunkHandoffPayload, createOutboundDelivery, createPeerMessageLedger, createPendingStallClock, createSessionMessageHandler, decodeChannelFrame, decodeClientMessage, decodeFrame, decodeServerMessage, encodeBinaryFrame, encodeChannelEventFrame, forgetPeerOrigin, handleSettingsMessage, isChannelFrame, isObserverMessageType, isOverPendingBudget, isSettingsMessage };
|
|
766
1058
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/node/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/wire-messages.ts","../../src/outbound-delivery.ts","../../src/protocol-session.ts","../../src/usage-messages.ts","../../src/session-events.ts","../../src/session-message-handler.ts","../../src/message-decoders.ts","../../src/resume-buffer.ts","../../src/channel-frames.ts","../../src/session-resume-bridge.ts","../../src/peer-message-ledger.ts","../../src/handoff-chunking.ts"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/wire-messages.ts","../../src/outbound-delivery.ts","../../src/protocol-session.ts","../../src/settings-messages.ts","../../src/usage-messages.ts","../../src/session-events.ts","../../src/session-message-handler.ts","../../src/observer-messages.ts","../../src/message-decoders.ts","../../src/resume-buffer.ts","../../src/channel-frames.ts","../../src/session-resume-bridge.ts","../../src/peer-message-ledger.ts","../../src/handoff-chunking.ts"],"mappings":";;;;;;;KAyDY;KAEP,gBAAgB,WAAW;;;;;UAMf;EACf;EACA;EACA;;;;;;;UAQe,0BAA0B,KAAK;;EAE9C;;;;;;KAOU,uBAAuB,KAAK;;KAG5B;EACN;EAAgB;;EAGhB;EAAiB;EAAc;EAAe;;EAC9C;;EACA;;EACA;;EAIA;EAAqB;;EAGrB;;EACA;;EAGA;;EACA;;EAIA;EAAqB;;EAIrB;EAA+B;;EAG/B;EAAuB;;EACvB;EAAqB;;EACrB;EAAwB;EAAmB;;EAG3C;EAAwB;EAAmB;EAAc;;EAGzD;EAAwB;EAAmB;;EAE3C;;EAEA;EACA;EACA,QAAQ;EACR;;EAEA;EAAyC;EAAmB;;EAC5D;;EACA;;EACA;;EAIA;EACA;EACA;EACA,SAAS;;EAGT;EAA2B;;EAG3B;EAAwB;;EAIxB;EAAsB;EAAmB;;EAGzC;EAAwB;;EACxB;EAA8B,SAAS;;EACvC;EAA6B;;EAC7B;;EACA;EAAkC;;EAClC;EAAmC;;EACnC;EAAgC;EAAgB;;EAChD;EAA+B;;EAC/B;EAA8B;EAAgB,OAAO;;EACrD;EAAkC;EAAgB,SAAS;;EAE3D;EAA6B;EAAY,QAAQ;;EACjD;EAAsB;EAAY,UAAU;;EAG5C;EAAgB;;EAChB;EAAa;;EAIb;EAAsB;;EACtB;EAAyB;EAAmB,OAAO;;;KAG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