@plurnk/plurnk-contracts 8.0.0 → 9.0.0
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/SPEC.md +10 -24
- package/dist/schema/DaemonNotificationEnvelope.json +555 -0
- package/dist/schema/McpServerDefinition.json +1 -1
- package/dist/schema/PlurnkStatement.json +24 -0
- package/dist/schema/ProposalProjection.json +0 -4
- package/dist/src/Application.d.ts +22 -1
- package/dist/src/Application.d.ts.map +1 -1
- package/dist/src/Application.js +480 -15
- package/dist/src/Application.js.map +1 -1
- package/dist/src/ApplicationNotifications.d.ts +59 -19
- package/dist/src/ApplicationNotifications.d.ts.map +1 -1
- package/dist/src/ApplicationNotifications.js +40 -7
- package/dist/src/ApplicationNotifications.js.map +1 -1
- package/dist/src/ApplicationPort.d.ts +26 -7
- package/dist/src/ApplicationPort.d.ts.map +1 -1
- package/dist/src/ApplicationPort.js.map +1 -1
- package/dist/src/LogRow.d.ts +1 -1
- package/dist/src/LogRow.js +1 -1
- package/dist/src/LogRow.js.map +1 -1
- package/dist/src/Validator.d.ts +3 -3
- package/dist/src/Validator.d.ts.map +1 -1
- package/dist/src/Validator.js +8 -16
- package/dist/src/Validator.js.map +1 -1
- package/dist/src/index.d.ts +2 -3
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +2 -3
- package/dist/src/index.js.map +1 -1
- package/dist/src/types.generated.d.ts +820 -636
- package/dist/src/types.generated.d.ts.map +1 -1
- package/dist/src/types.generated.js.map +1 -1
- package/dist/src/types.js +1 -1
- package/dist/src/types.js.map +1 -1
- package/package.json +2 -2
- package/dist/schema/ApplicationOperationEvent.json +0 -27
- package/dist/schema/CapabilityDescriptor.json +0 -28
- package/dist/schema/CapabilityPolicy.json +0 -22
- package/dist/schema/CapabilityProjection.json +0 -14
- package/dist/schema/CapabilitySelector.json +0 -29
- package/dist/src/CapabilityAdmission.d.ts +0 -11
- package/dist/src/CapabilityAdmission.d.ts.map +0 -1
- package/dist/src/CapabilityAdmission.js +0 -108
- package/dist/src/CapabilityAdmission.js.map +0 -1
|
@@ -39,29 +39,184 @@ export interface MimetypeDisplayCapability {
|
|
|
39
39
|
mimetype: string;
|
|
40
40
|
display: CapabilityDisplay;
|
|
41
41
|
}
|
|
42
|
-
export type
|
|
42
|
+
export type ClientInteractionRequest = ({
|
|
43
|
+
toolName: string;
|
|
44
|
+
mode: "form";
|
|
45
|
+
message: string;
|
|
46
|
+
requestedSchema: {
|
|
47
|
+
[k: string]: unknown;
|
|
48
|
+
};
|
|
49
|
+
} | {
|
|
50
|
+
toolName: string;
|
|
51
|
+
mode: "url";
|
|
52
|
+
message: string;
|
|
53
|
+
elicitationId: string;
|
|
54
|
+
url: string;
|
|
55
|
+
});
|
|
56
|
+
/**
|
|
57
|
+
* The runtime-neutral client-interface projection of one pending client interaction. Live delivery and reconnect discovery expose this same shape.
|
|
58
|
+
*/
|
|
59
|
+
export interface ClientInteractionProjection {
|
|
60
|
+
interactionId: number;
|
|
43
61
|
sessionId: number;
|
|
44
62
|
loopId: number;
|
|
45
63
|
turnId: number;
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
64
|
+
recipient: string;
|
|
65
|
+
request: ClientInteractionRequest;
|
|
66
|
+
}
|
|
67
|
+
export type ClientInteractionResolution = ({
|
|
68
|
+
action: "accept";
|
|
69
|
+
content?: {
|
|
70
|
+
[k: string]: unknown;
|
|
71
|
+
};
|
|
72
|
+
} | {
|
|
73
|
+
action: "decline";
|
|
74
|
+
} | {
|
|
75
|
+
action: "cancel";
|
|
76
|
+
});
|
|
77
|
+
export type DaemonNotificationEnvelope = ({
|
|
78
|
+
id: number;
|
|
79
|
+
event: "workspace/created";
|
|
80
|
+
timestamp: number;
|
|
81
|
+
workspaceId: (number | null);
|
|
82
|
+
sessionId: null;
|
|
83
|
+
data: WorkspaceCreated;
|
|
84
|
+
} | {
|
|
85
|
+
id: number;
|
|
86
|
+
event: "workspace/renamed";
|
|
87
|
+
timestamp: number;
|
|
88
|
+
workspaceId: (number | null);
|
|
89
|
+
sessionId: null;
|
|
90
|
+
data: WorkspaceRenamed;
|
|
91
|
+
} | {
|
|
92
|
+
id: number;
|
|
93
|
+
event: "workspace/archived";
|
|
94
|
+
timestamp: number;
|
|
95
|
+
workspaceId: (number | null);
|
|
96
|
+
sessionId: null;
|
|
97
|
+
data: WorkspaceArchived;
|
|
98
|
+
} | {
|
|
99
|
+
id: number;
|
|
100
|
+
event: "functionality/changed";
|
|
101
|
+
timestamp: number;
|
|
102
|
+
workspaceId: (number | null);
|
|
103
|
+
sessionId: (number | null);
|
|
104
|
+
data: FunctionalityChanged;
|
|
105
|
+
} | {
|
|
106
|
+
id: number;
|
|
107
|
+
event: "session/created";
|
|
108
|
+
timestamp: number;
|
|
109
|
+
workspaceId: (number | null);
|
|
110
|
+
sessionId: (number | null);
|
|
111
|
+
data: SessionCreated;
|
|
112
|
+
} | {
|
|
113
|
+
id: number;
|
|
114
|
+
event: "session/archived";
|
|
115
|
+
timestamp: number;
|
|
116
|
+
workspaceId: (number | null);
|
|
117
|
+
sessionId: (number | null);
|
|
118
|
+
data: SessionArchived;
|
|
119
|
+
} | {
|
|
120
|
+
id: number;
|
|
121
|
+
event: "session/deleted";
|
|
122
|
+
timestamp: number;
|
|
123
|
+
workspaceId: (number | null);
|
|
124
|
+
sessionId: (number | null);
|
|
125
|
+
data: SessionDeleted;
|
|
126
|
+
} | {
|
|
127
|
+
id: number;
|
|
128
|
+
event: "session/titled";
|
|
129
|
+
timestamp: number;
|
|
130
|
+
workspaceId: (number | null);
|
|
131
|
+
sessionId: (number | null);
|
|
132
|
+
data: SessionTitled;
|
|
133
|
+
} | {
|
|
134
|
+
id: number;
|
|
135
|
+
event: "session/policy";
|
|
136
|
+
timestamp: number;
|
|
137
|
+
workspaceId: (number | null);
|
|
138
|
+
sessionId: (number | null);
|
|
139
|
+
data: SessionPolicy;
|
|
140
|
+
} | {
|
|
141
|
+
id: number;
|
|
142
|
+
event: "loop/proposal";
|
|
143
|
+
timestamp: number;
|
|
144
|
+
workspaceId: (number | null);
|
|
145
|
+
sessionId: (number | null);
|
|
146
|
+
data: ProposalProjection;
|
|
147
|
+
} | {
|
|
148
|
+
id: number;
|
|
149
|
+
event: "loop/interaction";
|
|
150
|
+
timestamp: number;
|
|
151
|
+
workspaceId: (number | null);
|
|
152
|
+
sessionId: (number | null);
|
|
153
|
+
data: ClientInteractionProjection;
|
|
154
|
+
} | {
|
|
155
|
+
id: number;
|
|
156
|
+
event: "loop/gate-settled";
|
|
157
|
+
timestamp: number;
|
|
158
|
+
workspaceId: (number | null);
|
|
159
|
+
sessionId: (number | null);
|
|
160
|
+
data: LoopGateSettled;
|
|
161
|
+
} | {
|
|
162
|
+
id: number;
|
|
163
|
+
event: "loop/terminated";
|
|
164
|
+
timestamp: number;
|
|
165
|
+
workspaceId: (number | null);
|
|
166
|
+
sessionId: (number | null);
|
|
167
|
+
data: Terminated;
|
|
168
|
+
} | {
|
|
169
|
+
id: number;
|
|
170
|
+
event: "log/entry";
|
|
171
|
+
timestamp: number;
|
|
172
|
+
workspaceId: (number | null);
|
|
173
|
+
sessionId: (number | null);
|
|
174
|
+
data: LogEntry;
|
|
175
|
+
} | {
|
|
176
|
+
id: number;
|
|
177
|
+
event: "stream/concluded";
|
|
178
|
+
timestamp: number;
|
|
179
|
+
workspaceId: (number | null);
|
|
180
|
+
sessionId: (number | null);
|
|
181
|
+
data: StreamConcluded;
|
|
182
|
+
} | {
|
|
183
|
+
id: number;
|
|
184
|
+
event: "notice/event";
|
|
185
|
+
timestamp: number;
|
|
186
|
+
workspaceId: (number | null);
|
|
187
|
+
sessionId: (number | null);
|
|
188
|
+
data: NoticeEvent;
|
|
189
|
+
});
|
|
53
190
|
/**
|
|
54
|
-
* The
|
|
191
|
+
* The portable durable reasoning effort shared by provider, runtime, and client boundaries.
|
|
55
192
|
*/
|
|
56
|
-
export type
|
|
193
|
+
export type Effort = ("off" | "adaptive" | "low" | "medium" | "high" | "xhigh" | "max");
|
|
57
194
|
/**
|
|
58
|
-
*
|
|
195
|
+
* The one core-owned settlement decision. Review waits for the session's owner; accept and reject carry the automatic resolution core applies.
|
|
59
196
|
*/
|
|
60
|
-
export type
|
|
197
|
+
export type ProposalDisposition = ({
|
|
198
|
+
decision: "review";
|
|
199
|
+
} | {
|
|
200
|
+
decision: ("accept" | "reject");
|
|
201
|
+
outcome?: string;
|
|
202
|
+
});
|
|
61
203
|
/**
|
|
62
|
-
*
|
|
204
|
+
* A runtime-neutral client elicitation request in standard ACP v2 / MCP form or URL mode. Protocol-private continuation state is excluded.
|
|
63
205
|
*/
|
|
64
|
-
export type
|
|
206
|
+
export type LoopGateSettled = ({
|
|
207
|
+
kind: "proposal";
|
|
208
|
+
sessionId: number;
|
|
209
|
+
loopId: number;
|
|
210
|
+
logEntryId: number;
|
|
211
|
+
decision: ("accept" | "reject" | "cancel");
|
|
212
|
+
outcome: string;
|
|
213
|
+
} | {
|
|
214
|
+
kind: "interaction";
|
|
215
|
+
sessionId: number;
|
|
216
|
+
loopId: number;
|
|
217
|
+
interactionId: number;
|
|
218
|
+
action: ("accept" | "decline" | "cancel");
|
|
219
|
+
});
|
|
65
220
|
/**
|
|
66
221
|
* Universal PLURNK operation result. Producer-owned metadata is open, but failures always carry one RFC 9457 Problem Details object.
|
|
67
222
|
*/
|
|
@@ -83,534 +238,435 @@ export type RequestedRange = [number, number];
|
|
|
83
238
|
* @maxItems 2
|
|
84
239
|
*/
|
|
85
240
|
export type ReturnedRange = [number, number];
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
241
|
+
/**
|
|
242
|
+
* Normalized monetary evidence for one physical provider request. Unknown is never represented as zero.
|
|
243
|
+
*/
|
|
244
|
+
export type ProviderCost = ({
|
|
245
|
+
kind: "charged";
|
|
246
|
+
amount: MonetaryAmount;
|
|
247
|
+
usdEquivalent?: string;
|
|
248
|
+
source: string;
|
|
249
|
+
} | {
|
|
250
|
+
kind: "estimated";
|
|
251
|
+
amount: MonetaryAmount;
|
|
252
|
+
source: string;
|
|
253
|
+
} | {
|
|
254
|
+
kind: "unknown";
|
|
255
|
+
reason: string;
|
|
256
|
+
});
|
|
257
|
+
export interface WorkspaceCreated {
|
|
258
|
+
id: number;
|
|
259
|
+
name: string;
|
|
260
|
+
projectRoot: (string | null);
|
|
261
|
+
projectLabel: (string | null);
|
|
262
|
+
}
|
|
263
|
+
export interface WorkspaceRenamed {
|
|
264
|
+
id: number;
|
|
265
|
+
name: string;
|
|
266
|
+
}
|
|
267
|
+
export interface WorkspaceArchived {
|
|
268
|
+
id: number;
|
|
269
|
+
archived_at: (string | null);
|
|
270
|
+
}
|
|
271
|
+
export interface FunctionalityChanged {
|
|
272
|
+
workspaceId: number;
|
|
273
|
+
sessionId: (number | null);
|
|
274
|
+
family: string;
|
|
275
|
+
}
|
|
276
|
+
export interface SessionCreated {
|
|
277
|
+
id: number;
|
|
278
|
+
workspaceId: number;
|
|
279
|
+
workspaceName: string;
|
|
280
|
+
projectRoot: (string | null);
|
|
281
|
+
projectLabel: (string | null);
|
|
282
|
+
name: string;
|
|
283
|
+
parentSessionId: (number | null);
|
|
284
|
+
origin: ("model" | "_plurnk");
|
|
285
|
+
kind: ("root" | "fork" | "work");
|
|
286
|
+
lifecycle: ("idle" | "queued" | "running" | "parked" | "completed" | "cancelled" | "failed");
|
|
287
|
+
persona?: (string | null);
|
|
288
|
+
}
|
|
289
|
+
export interface SessionArchived {
|
|
290
|
+
id: number;
|
|
291
|
+
archived_at: (string | null);
|
|
292
|
+
sessionIds: number[];
|
|
293
|
+
}
|
|
294
|
+
export interface SessionDeleted {
|
|
295
|
+
id: number;
|
|
296
|
+
sessionIds: number[];
|
|
297
|
+
}
|
|
298
|
+
export interface SessionTitled {
|
|
299
|
+
id: number;
|
|
300
|
+
title: string;
|
|
301
|
+
}
|
|
302
|
+
export interface SessionPolicy {
|
|
303
|
+
sessionId: number;
|
|
304
|
+
model: (ModelRoute | null);
|
|
305
|
+
spawnModel: (ModelRoute | null);
|
|
306
|
+
persona?: (string | null);
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* A client-visible resolved provider/model identity. Alias is present only when a declared alias supplied the route; provider configuration remains private to the daemon. effort is the session's durable effort selection — absent when the model has no reasoning dimension.
|
|
310
|
+
*/
|
|
311
|
+
export interface ModelRoute {
|
|
312
|
+
alias?: string;
|
|
313
|
+
provider: string;
|
|
314
|
+
model: string;
|
|
315
|
+
effort?: Effort;
|
|
89
316
|
/**
|
|
90
|
-
*
|
|
317
|
+
* Whether effort was chosen through setSessionEffort (explicit) or seeded from the alias configuration (default). Present exactly when effort is.
|
|
91
318
|
*/
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
319
|
+
effortSource?: ("default" | "explicit");
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* The runtime-neutral client-interface projection of one durable stopped-world proposal. Live delivery and reconnect discovery expose this same shape.
|
|
323
|
+
*/
|
|
324
|
+
export interface ProposalProjection {
|
|
325
|
+
logEntryId: number;
|
|
326
|
+
sessionId: number;
|
|
97
327
|
/**
|
|
98
|
-
* The
|
|
328
|
+
* The requesting session's name.
|
|
99
329
|
*/
|
|
100
|
-
|
|
330
|
+
session: string;
|
|
331
|
+
loopId: number;
|
|
332
|
+
turnId: number;
|
|
101
333
|
/**
|
|
102
|
-
*
|
|
334
|
+
* The gated operation's log coordinate, loop/turn/sequence: the id of the call it is.
|
|
103
335
|
*/
|
|
104
|
-
|
|
105
|
-
|
|
336
|
+
coordinate: string;
|
|
337
|
+
/**
|
|
338
|
+
* An operation keyword, or a runtime tag: an execution's operation is its runtime.
|
|
339
|
+
*/
|
|
340
|
+
op: "find" | "read" | "edit" | "copy" | "move" | "send" | "done" | "fail" | "bare" | "work" | "fork" | "kill" | "note" | "wait" | Lowercase<string>;
|
|
341
|
+
target: {
|
|
342
|
+
scheme: (string | null);
|
|
343
|
+
authority: (string | null);
|
|
344
|
+
pathname: (string | null);
|
|
345
|
+
};
|
|
346
|
+
body: string;
|
|
347
|
+
attrs: {
|
|
348
|
+
[k: string]: unknown;
|
|
349
|
+
};
|
|
350
|
+
owner: string;
|
|
351
|
+
disposition: ProposalDisposition;
|
|
352
|
+
/**
|
|
353
|
+
* Structured ACP v2 permission subject for the proposed operation.
|
|
354
|
+
*/
|
|
355
|
+
subject?: ({
|
|
356
|
+
type: "command";
|
|
357
|
+
command: string;
|
|
358
|
+
cwd: string;
|
|
359
|
+
} | {
|
|
360
|
+
type: "tool_call";
|
|
361
|
+
kind: ("read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | "other");
|
|
362
|
+
title: string;
|
|
363
|
+
locations?: {
|
|
364
|
+
path: string;
|
|
365
|
+
}[];
|
|
366
|
+
diff?: {
|
|
367
|
+
path: string;
|
|
368
|
+
patch: string;
|
|
369
|
+
};
|
|
370
|
+
});
|
|
371
|
+
/**
|
|
372
|
+
* When the gate stops waiting and core cancels it (ISO 8601); absent while it waits indefinitely.
|
|
373
|
+
*/
|
|
374
|
+
expiresAt?: string;
|
|
106
375
|
}
|
|
107
376
|
/**
|
|
108
|
-
*
|
|
377
|
+
* The runtime-neutral client-interface projection of one pending client interaction. Live delivery and reconnect discovery expose this same shape.
|
|
109
378
|
*/
|
|
110
|
-
export interface
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
379
|
+
export interface Terminated {
|
|
380
|
+
sessionId: number;
|
|
381
|
+
loopId: number;
|
|
382
|
+
loopSeq: number;
|
|
383
|
+
result: OperationResult;
|
|
384
|
+
hitMaxTurns: boolean;
|
|
385
|
+
turnIds: number[];
|
|
386
|
+
attributions: string[];
|
|
387
|
+
terminatedAt: number;
|
|
388
|
+
usage: {
|
|
389
|
+
accounting: ProviderAccounting;
|
|
390
|
+
curationWeight: (number | null);
|
|
391
|
+
curationBudget: (number | null);
|
|
392
|
+
contextTokens: (number | null);
|
|
393
|
+
contextCapacity: (number | null);
|
|
394
|
+
meta: {
|
|
395
|
+
[k: string]: unknown;
|
|
396
|
+
};
|
|
397
|
+
};
|
|
114
398
|
}
|
|
115
399
|
/**
|
|
116
|
-
*
|
|
400
|
+
* PLURNK operation failure using RFC 9457 Problem Details. Extension members are permitted so an owning boundary can add structured causal and recovery facts without inventing a second error envelope.
|
|
117
401
|
*/
|
|
118
|
-
export interface
|
|
119
|
-
kind: "url";
|
|
120
|
-
raw: string;
|
|
121
|
-
scheme: string;
|
|
122
|
-
username: (string | null);
|
|
123
|
-
password: (string | null);
|
|
124
|
-
hostname: (string | null);
|
|
125
|
-
port: (number | null);
|
|
126
|
-
pathname: string;
|
|
402
|
+
export interface ProblemDetails {
|
|
127
403
|
/**
|
|
128
|
-
*
|
|
404
|
+
* Absolute URI identifying the stable problem class.
|
|
129
405
|
*/
|
|
130
|
-
|
|
131
|
-
fragment: (string | null);
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* The ordered numeric components parsed from a `<scope>` slot. AstBuilder converts each lexical number to a JavaScript number; the operation owner assigns arity and meaning, including text coordinates, result positions, timing, and mutation anchors.
|
|
135
|
-
*/
|
|
136
|
-
export interface LineMarker {
|
|
406
|
+
type: string;
|
|
137
407
|
/**
|
|
138
|
-
*
|
|
408
|
+
* Short, stable summary for this problem type.
|
|
139
409
|
*/
|
|
140
|
-
|
|
410
|
+
title: string;
|
|
411
|
+
/**
|
|
412
|
+
* Operation status. It must equal the containing result status.
|
|
413
|
+
*/
|
|
414
|
+
status: number;
|
|
415
|
+
/**
|
|
416
|
+
* Specific, causal explanation of this occurrence.
|
|
417
|
+
*/
|
|
418
|
+
detail: string;
|
|
419
|
+
/**
|
|
420
|
+
* Absolute URI identifying the failed durable operation, normally its log URI. Core adds it at persistence when an extension cannot know the durable coordinate.
|
|
421
|
+
*/
|
|
422
|
+
instance?: string;
|
|
423
|
+
/**
|
|
424
|
+
* Stable producer-owned stage at which the operation failed, when the operation has multiple independently recoverable stages.
|
|
425
|
+
*/
|
|
426
|
+
stage?: string;
|
|
427
|
+
/**
|
|
428
|
+
* One generally valid next action. It is omitted when recovery depends on facts the producer does not know.
|
|
429
|
+
*/
|
|
430
|
+
recovery?: string;
|
|
431
|
+
/**
|
|
432
|
+
* Whether the producer recommends automatically retrying the identical request.
|
|
433
|
+
*/
|
|
434
|
+
retryable?: boolean;
|
|
435
|
+
[k: string]: unknown;
|
|
141
436
|
}
|
|
142
437
|
/**
|
|
143
|
-
*
|
|
438
|
+
* A compact projection of one line or ordered-result selection. Requested and returned positions are inclusive; total is the complete available cardinality.
|
|
144
439
|
*/
|
|
145
|
-
export interface
|
|
146
|
-
|
|
147
|
-
|
|
440
|
+
export interface RangeExtent {
|
|
441
|
+
unit: ("line" | "result" | "resource" | "matchLocation" | "byte");
|
|
442
|
+
total: number;
|
|
443
|
+
requested: RequestedRange;
|
|
444
|
+
returned?: ReturnedRange;
|
|
148
445
|
}
|
|
149
446
|
/**
|
|
150
|
-
*
|
|
447
|
+
* Ordered physical provider-request evidence and its deterministic aggregate projection.
|
|
151
448
|
*/
|
|
152
|
-
export interface
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
449
|
+
export interface ProviderAccounting {
|
|
450
|
+
requests: ProviderRequestAccounting[];
|
|
451
|
+
usage: (ProviderUsage | null);
|
|
452
|
+
knownUsage: (ProviderUsage | null);
|
|
453
|
+
knownCostUsd: (string | null);
|
|
454
|
+
costUsd: (string | null);
|
|
157
455
|
}
|
|
158
456
|
/**
|
|
159
|
-
*
|
|
457
|
+
* The normalized accounting disposition of one physical provider request.
|
|
160
458
|
*/
|
|
161
|
-
export interface
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
export interface FtsBody {
|
|
169
|
-
dialect: "fts";
|
|
170
|
-
raw: string;
|
|
459
|
+
export interface ProviderRequestAccounting {
|
|
460
|
+
provider: string;
|
|
461
|
+
model: string;
|
|
462
|
+
outcome: ("response" | "error");
|
|
463
|
+
status?: number;
|
|
464
|
+
usage?: ProviderUsage;
|
|
465
|
+
cost: ProviderCost;
|
|
171
466
|
}
|
|
172
467
|
/**
|
|
173
|
-
*
|
|
468
|
+
* Token quantities. Physical-request instances enforce their partition identities. ProviderAccounting distinguishes complete usage from knownUsage subtotals. Omitted fields are unknown; explicit zero is observed or exactly derived.
|
|
174
469
|
*/
|
|
175
|
-
export interface
|
|
176
|
-
|
|
177
|
-
|
|
470
|
+
export interface ProviderUsage {
|
|
471
|
+
inputTokens?: number;
|
|
472
|
+
outputTokens?: number;
|
|
473
|
+
totalTokens?: number;
|
|
474
|
+
inputTokenDetails?: {
|
|
475
|
+
noCacheTokens?: number;
|
|
476
|
+
cacheReadTokens?: number;
|
|
477
|
+
cacheWriteTokens?: number;
|
|
478
|
+
};
|
|
479
|
+
outputTokenDetails?: {
|
|
480
|
+
textTokens?: number;
|
|
481
|
+
reasoningTokens?: number;
|
|
482
|
+
};
|
|
178
483
|
}
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
export interface GlobBody {
|
|
183
|
-
dialect: "glob";
|
|
184
|
-
raw: string;
|
|
484
|
+
export interface MonetaryAmount {
|
|
485
|
+
amount: string;
|
|
486
|
+
currency: string;
|
|
185
487
|
}
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
488
|
+
export interface LogEntry {
|
|
489
|
+
entry: {
|
|
490
|
+
id: number;
|
|
491
|
+
session_id: number;
|
|
492
|
+
session_name: string;
|
|
493
|
+
loop_id: number;
|
|
494
|
+
loop_seq: number;
|
|
495
|
+
turn_id: number;
|
|
496
|
+
turn_seq: number;
|
|
497
|
+
sequence: number;
|
|
498
|
+
at: string;
|
|
499
|
+
origin: string;
|
|
500
|
+
source: (string | null);
|
|
501
|
+
op: (string | null);
|
|
502
|
+
scheme: (string | null);
|
|
503
|
+
username: (string | null);
|
|
504
|
+
password: (string | null);
|
|
505
|
+
hostname: (string | null);
|
|
506
|
+
port: (number | null);
|
|
507
|
+
pathname: (string | null);
|
|
508
|
+
query: (string | null);
|
|
509
|
+
fragment: (string | null);
|
|
510
|
+
signal: unknown;
|
|
511
|
+
lineMarker: unknown;
|
|
512
|
+
tx: unknown;
|
|
513
|
+
mimetype_tx: string;
|
|
514
|
+
rx: unknown;
|
|
515
|
+
mimetype_rx: string;
|
|
516
|
+
status_rx: number;
|
|
517
|
+
weight: number;
|
|
518
|
+
attrs: unknown;
|
|
519
|
+
state: ("proposed" | "resolved" | "failed" | "cancelled");
|
|
520
|
+
reasoning?: string;
|
|
521
|
+
reasoning_model_call_id?: number;
|
|
522
|
+
reasoning_request_sequence?: number;
|
|
523
|
+
invocation?: string;
|
|
524
|
+
answering?: string;
|
|
525
|
+
replied_to_sources?: string[];
|
|
526
|
+
};
|
|
527
|
+
}
|
|
528
|
+
export interface StreamConcluded {
|
|
529
|
+
sessionId: number;
|
|
530
|
+
entryId: number;
|
|
531
|
+
target: string;
|
|
532
|
+
subscriptionId: number;
|
|
533
|
+
result: OperationResult;
|
|
534
|
+
scheme: string;
|
|
535
|
+
summary: string;
|
|
536
|
+
wakeAction: string;
|
|
537
|
+
loop_seq?: number;
|
|
538
|
+
turn_seq?: number;
|
|
539
|
+
sequence?: number;
|
|
540
|
+
}
|
|
541
|
+
export interface NoticeEvent {
|
|
542
|
+
sessionId: (number | null);
|
|
543
|
+
loopId: number;
|
|
544
|
+
notice: Notice;
|
|
194
545
|
}
|
|
195
546
|
/**
|
|
196
|
-
* A
|
|
547
|
+
* A transient, nonterminal observation for clients and the next model packet. A Notice is never operation-failure truth and cannot determine durable history, lifecycle, scheduling, or recovery. Producers use the open `source` + `kind` discriminator; clients render the producer-owned `level` without inferring semantics from kind names.
|
|
197
548
|
*/
|
|
198
|
-
export interface
|
|
199
|
-
line: number;
|
|
200
|
-
column: number;
|
|
201
|
-
}
|
|
202
|
-
export interface ReadStatement {
|
|
203
|
-
op: "read";
|
|
204
|
-
aside: (string | null);
|
|
549
|
+
export interface Notice {
|
|
205
550
|
/**
|
|
206
|
-
*
|
|
551
|
+
* Producer identifier. Top-level for self-contained subsystems; colon-namespaced for parameterized producers such as `provider:openai` or `exec:search`.
|
|
207
552
|
*/
|
|
208
|
-
|
|
209
|
-
[k: string]: string;
|
|
210
|
-
} | null);
|
|
211
|
-
target: (ParsedPath | null);
|
|
212
|
-
lineMarker: (TextLineMarker | null);
|
|
553
|
+
source: string;
|
|
213
554
|
/**
|
|
214
|
-
*
|
|
555
|
+
* Open discriminator within a source. Examples include `output_unaccounted`, `search_progress`, and `turn_awaiting_model`.
|
|
215
556
|
*/
|
|
216
|
-
|
|
217
|
-
body: null;
|
|
218
|
-
position: Position;
|
|
219
|
-
}
|
|
220
|
-
/**
|
|
221
|
-
* The ordered components parsed from a text-coordinate <scope>. A line position may be numeric or a rendered five-character Base62 line anchor; columns remain numeric. Core resolves anchors against the addressed current text before a numeric scope reaches its operation owner.
|
|
222
|
-
*/
|
|
223
|
-
export interface TextLineMarker {
|
|
557
|
+
kind: string;
|
|
224
558
|
/**
|
|
225
|
-
*
|
|
559
|
+
* Display severity set by the producer. It does not make the Notice a durable operation result.
|
|
226
560
|
*/
|
|
227
|
-
|
|
228
|
-
}
|
|
229
|
-
export interface EditStatement {
|
|
230
|
-
op: "edit";
|
|
231
|
-
aside: (string | null);
|
|
561
|
+
level: ("error" | "warn" | "info");
|
|
232
562
|
/**
|
|
233
|
-
* Optional
|
|
563
|
+
* Optional model-facing imperative for an observation of the model's own output: `YOU MUST`, `YOU MUST NOT`, `YOU MUST ONLY`, `YOU SHOULD` or `YOU SHOULD NOT`, then the rule. The model packet leads with it; clients display `message`.
|
|
234
564
|
*/
|
|
235
|
-
|
|
236
|
-
[k: string]: string;
|
|
237
|
-
} | null);
|
|
238
|
-
target: (ParsedPath | null);
|
|
239
|
-
lineMarker: (TextLineMarker | null);
|
|
565
|
+
directive?: string;
|
|
240
566
|
/**
|
|
241
|
-
*
|
|
567
|
+
* Optional terse, factual display message.
|
|
242
568
|
*/
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
aside: (string | null);
|
|
250
|
-
source: ResourceSelection;
|
|
251
|
-
destination: ResourceSelection;
|
|
252
|
-
position: Position;
|
|
569
|
+
message?: (string | null);
|
|
570
|
+
/**
|
|
571
|
+
* Optional typed position for an observation. ContentOffset points into model output; LogCoordinate points at a durable log row without replacing it.
|
|
572
|
+
*/
|
|
573
|
+
position?: (ContentOffset | LogCoordinate | null);
|
|
574
|
+
[k: string]: unknown;
|
|
253
575
|
}
|
|
254
576
|
/**
|
|
255
|
-
*
|
|
577
|
+
* A point in model output using the parser-point convention: 1-based line and 0-based Unicode-code-point column. Absence or a null Notice.position represents an unknown location.
|
|
256
578
|
*/
|
|
257
|
-
export interface
|
|
258
|
-
|
|
579
|
+
export interface ContentOffset {
|
|
580
|
+
type: "content-offset";
|
|
581
|
+
line: number;
|
|
582
|
+
column: number;
|
|
583
|
+
}
|
|
584
|
+
export interface LogCoordinate {
|
|
585
|
+
type: "log-coordinate";
|
|
259
586
|
/**
|
|
260
|
-
*
|
|
587
|
+
* Log row identity, typically `log:///<loop>/<turn>/<sequence>`.
|
|
261
588
|
*/
|
|
262
|
-
|
|
263
|
-
[k: string]: string;
|
|
264
|
-
} | null);
|
|
265
|
-
lineMarker: (TextLineMarker | null);
|
|
589
|
+
coordinate: string;
|
|
266
590
|
/**
|
|
267
|
-
* Optional
|
|
591
|
+
* Optional op token (find/read/edit/...) at the coordinate, for human-readable rendering.
|
|
268
592
|
*/
|
|
269
|
-
|
|
270
|
-
}
|
|
271
|
-
export interface MoveStatement {
|
|
272
|
-
op: "move";
|
|
273
|
-
aside: (string | null);
|
|
274
|
-
source: ResourceSelection;
|
|
275
|
-
destination: ResourceSelection;
|
|
276
|
-
position: Position;
|
|
593
|
+
op?: string;
|
|
277
594
|
}
|
|
278
|
-
export
|
|
279
|
-
|
|
280
|
-
|
|
595
|
+
export type EntryReadResult = ({
|
|
596
|
+
status: 200;
|
|
597
|
+
entry: ClientEntry;
|
|
598
|
+
} | {
|
|
599
|
+
status: number;
|
|
600
|
+
problem: ProblemDetails;
|
|
601
|
+
entry: null;
|
|
602
|
+
});
|
|
603
|
+
export interface ClientEntry {
|
|
281
604
|
/**
|
|
282
|
-
*
|
|
605
|
+
* The stored entry's durable identifier, or null for a representation core computes.
|
|
283
606
|
*/
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
} | null);
|
|
607
|
+
entryId: (number | null);
|
|
608
|
+
target: string;
|
|
287
609
|
/**
|
|
288
|
-
*
|
|
610
|
+
* Each channel by name; the empty name is the unnamed default channel of a scheme whose default is unnamed.
|
|
289
611
|
*/
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
612
|
+
channels: {
|
|
613
|
+
[k: string]: ClientEntryChannel;
|
|
614
|
+
};
|
|
615
|
+
}
|
|
616
|
+
export interface ClientEntryChannel {
|
|
617
|
+
content: string;
|
|
618
|
+
contentOffset: number;
|
|
619
|
+
contentLength: number;
|
|
620
|
+
mimetype: string;
|
|
621
|
+
weight: number;
|
|
622
|
+
state: ("static" | "active" | "closed" | "errored");
|
|
295
623
|
}
|
|
296
624
|
/**
|
|
297
|
-
*
|
|
625
|
+
* PLURNK operation failure using RFC 9457 Problem Details. Extension members are permitted so an owning boundary can add structured causal and recovery facts without inventing a second error envelope.
|
|
298
626
|
*/
|
|
299
|
-
export interface
|
|
300
|
-
raw: string;
|
|
301
|
-
json: unknown;
|
|
302
|
-
}
|
|
303
|
-
export interface DoneStatement {
|
|
304
|
-
op: "done";
|
|
305
|
-
aside: (string | null);
|
|
306
|
-
/**
|
|
307
|
-
* Optional resource addresses attached to a message; null when omitted.
|
|
308
|
-
*/
|
|
309
|
-
attachments: (string[] | null);
|
|
310
|
-
target: (ParsedPath | null);
|
|
311
|
-
lineMarker: null;
|
|
312
|
-
body: (SendBody | null);
|
|
313
|
-
position: Position;
|
|
314
|
-
}
|
|
315
|
-
export interface FailStatement {
|
|
316
|
-
op: "fail";
|
|
317
|
-
aside: (string | null);
|
|
318
|
-
/**
|
|
319
|
-
* Optional resource addresses attached to a message; null when omitted.
|
|
320
|
-
*/
|
|
321
|
-
attachments: (string[] | null);
|
|
322
|
-
target: (ParsedPath | null);
|
|
323
|
-
lineMarker: null;
|
|
324
|
-
body: (SendBody | null);
|
|
325
|
-
position: Position;
|
|
326
|
-
}
|
|
327
|
-
export interface ExecStatement {
|
|
627
|
+
export interface FunctionalityCandidate {
|
|
328
628
|
/**
|
|
329
|
-
* The
|
|
629
|
+
* The alias the candidate would take if added; a suggestion, never authority.
|
|
330
630
|
*/
|
|
331
|
-
|
|
631
|
+
alias?: string;
|
|
632
|
+
summary?: string;
|
|
332
633
|
/**
|
|
333
|
-
*
|
|
634
|
+
* The exact family definition, conforming to the family's definition schema.
|
|
334
635
|
*/
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
target: (ParsedPath | null);
|
|
338
|
-
cwd?: (string | null);
|
|
339
|
-
lineMarker: (LineMarker | null);
|
|
340
|
-
body: (string | null);
|
|
341
|
-
position: Position;
|
|
342
|
-
}
|
|
343
|
-
export interface BareStatement {
|
|
344
|
-
op: "bare";
|
|
345
|
-
aside: (string | null);
|
|
346
|
-
target: (ParsedPath | null);
|
|
347
|
-
lineMarker: null;
|
|
348
|
-
body: string;
|
|
349
|
-
position: Position;
|
|
350
|
-
}
|
|
351
|
-
export interface WorkStatement {
|
|
352
|
-
op: "work";
|
|
353
|
-
aside: (string | null);
|
|
354
|
-
target: (ParsedPath | null);
|
|
355
|
-
lineMarker: null;
|
|
356
|
-
body: string;
|
|
357
|
-
position: Position;
|
|
636
|
+
definition: {};
|
|
637
|
+
provenance: FunctionalityProvenance;
|
|
358
638
|
}
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
639
|
+
/**
|
|
640
|
+
* The input supplying a definition or discovery candidate, separate from ownership, preparation and authority.
|
|
641
|
+
*/
|
|
642
|
+
export interface FunctionalityProvenance {
|
|
643
|
+
kind: string;
|
|
644
|
+
source: string;
|
|
645
|
+
reference?: string;
|
|
366
646
|
}
|
|
367
|
-
export
|
|
368
|
-
|
|
369
|
-
aside: (string | null);
|
|
647
|
+
export type FunctionalityDefinitionState = {
|
|
648
|
+
alias: string;
|
|
370
649
|
/**
|
|
371
|
-
*
|
|
650
|
+
* Who owns this definition: the service baseline, the workspace, or one session. A session-scoped family (env) owns its definitions per session, so origin names ownership rather than scope.
|
|
372
651
|
*/
|
|
373
|
-
|
|
374
|
-
[k: string]: string;
|
|
375
|
-
} | null);
|
|
652
|
+
origin: ("service" | "workspace" | "session");
|
|
376
653
|
/**
|
|
377
|
-
*
|
|
654
|
+
* disabled: available, model-invisible. dormant: enabled without a resident publication. active: enabled and prepared. unavailable: enabled but preparation has an exact Problem. authorization-required: enabled and awaiting a protocol continuation.
|
|
378
655
|
*/
|
|
379
|
-
|
|
380
|
-
|
|
656
|
+
state: ("disabled" | "dormant" | "active" | "unavailable" | "authorization-required");
|
|
657
|
+
definition?: {};
|
|
658
|
+
provenance?: FunctionalityProvenance;
|
|
381
659
|
/**
|
|
382
|
-
*
|
|
660
|
+
* The Session this entry was copied from when this Session was created (`work` or `fork`), preserved across generations until this Session changes the entry. Absent for an entry this Session set itself. Session-scoped families only.
|
|
383
661
|
*/
|
|
384
|
-
|
|
662
|
+
inherited?: string;
|
|
385
663
|
/**
|
|
386
|
-
*
|
|
664
|
+
* Family-owned presentation facts about an active definition (a server's protocol version and tool names, an agent card summary). Never credentials, never authority.
|
|
387
665
|
*/
|
|
388
|
-
|
|
666
|
+
detail?: {};
|
|
667
|
+
problem?: ProblemDetails;
|
|
389
668
|
/**
|
|
390
|
-
* A
|
|
391
|
-
*/
|
|
392
|
-
body: (string | null);
|
|
393
|
-
position: Position;
|
|
394
|
-
}
|
|
395
|
-
export interface DispositionStatement {
|
|
396
|
-
op: "wait";
|
|
397
|
-
aside: (string | null);
|
|
398
|
-
target: (ParsedPath | null);
|
|
399
|
-
lineMarker: null;
|
|
400
|
-
/**
|
|
401
|
-
* Optional maximum park duration from `timeout` option; zero continues without parking.
|
|
402
|
-
*/
|
|
403
|
-
seconds: (number | null);
|
|
404
|
-
body: (string | null);
|
|
405
|
-
position: Position;
|
|
406
|
-
}
|
|
407
|
-
export interface NoteStatement {
|
|
408
|
-
op: "note";
|
|
409
|
-
aside: (string | null);
|
|
410
|
-
target: null;
|
|
411
|
-
lineMarker: null;
|
|
412
|
-
body: (string | null);
|
|
413
|
-
position: Position;
|
|
414
|
-
}
|
|
415
|
-
/**
|
|
416
|
-
* PLURNK operation failure using RFC 9457 Problem Details. Extension members are permitted so an owning boundary can add structured causal and recovery facts without inventing a second error envelope.
|
|
417
|
-
*/
|
|
418
|
-
export interface ProblemDetails {
|
|
419
|
-
/**
|
|
420
|
-
* Absolute URI identifying the stable problem class.
|
|
421
|
-
*/
|
|
422
|
-
type: string;
|
|
423
|
-
/**
|
|
424
|
-
* Short, stable summary for this problem type.
|
|
425
|
-
*/
|
|
426
|
-
title: string;
|
|
427
|
-
/**
|
|
428
|
-
* Operation status. It must equal the containing result status.
|
|
429
|
-
*/
|
|
430
|
-
status: number;
|
|
431
|
-
/**
|
|
432
|
-
* Specific, causal explanation of this occurrence.
|
|
433
|
-
*/
|
|
434
|
-
detail: string;
|
|
435
|
-
/**
|
|
436
|
-
* Absolute URI identifying the failed durable operation, normally its log URI. Core adds it at persistence when an extension cannot know the durable coordinate.
|
|
437
|
-
*/
|
|
438
|
-
instance?: string;
|
|
439
|
-
/**
|
|
440
|
-
* Stable producer-owned stage at which the operation failed, when the operation has multiple independently recoverable stages.
|
|
441
|
-
*/
|
|
442
|
-
stage?: string;
|
|
443
|
-
/**
|
|
444
|
-
* One generally valid next action. It is omitted when recovery depends on facts the producer does not know.
|
|
445
|
-
*/
|
|
446
|
-
recovery?: string;
|
|
447
|
-
/**
|
|
448
|
-
* Whether the producer recommends automatically retrying the identical request.
|
|
449
|
-
*/
|
|
450
|
-
retryable?: boolean;
|
|
451
|
-
[k: string]: unknown;
|
|
452
|
-
}
|
|
453
|
-
/**
|
|
454
|
-
* A compact projection of one line or ordered-result selection. Requested and returned positions are inclusive; total is the complete available cardinality.
|
|
455
|
-
*/
|
|
456
|
-
export interface RangeExtent {
|
|
457
|
-
unit: ("line" | "result" | "resource" | "matchLocation" | "byte");
|
|
458
|
-
total: number;
|
|
459
|
-
requested: RequestedRange;
|
|
460
|
-
returned?: ReturnedRange;
|
|
461
|
-
}
|
|
462
|
-
export interface CapabilityDescriptor {
|
|
463
|
-
/**
|
|
464
|
-
* An operation keyword, or a runtime tag: an execution's operation is its runtime.
|
|
465
|
-
*/
|
|
466
|
-
operation: "find" | "read" | "edit" | "copy" | "move" | "send" | "bare" | "work" | "fork" | "kill" | Lowercase<string>;
|
|
467
|
-
scheme?: string;
|
|
468
|
-
runtime?: string;
|
|
469
|
-
tool?: string;
|
|
470
|
-
access: ("observe" | "mutate" | "execute" | "interact" | "control");
|
|
471
|
-
traits: string[];
|
|
472
|
-
}
|
|
473
|
-
export interface CapabilityPolicy {
|
|
474
|
-
allow?: CapabilitySelector[];
|
|
475
|
-
only?: CapabilitySelector[];
|
|
476
|
-
deny?: CapabilitySelector[];
|
|
477
|
-
}
|
|
478
|
-
/**
|
|
479
|
-
* One exact, conjunctive selector over a routed PLURNK capability demand. Omitted fields are wildcards; at least one field is required.
|
|
480
|
-
*/
|
|
481
|
-
export interface CapabilitySelector {
|
|
482
|
-
/**
|
|
483
|
-
* An operation keyword, or a runtime tag: an execution's operation is its runtime.
|
|
484
|
-
*/
|
|
485
|
-
operation?: "find" | "read" | "edit" | "copy" | "move" | "send" | "bare" | "work" | "fork" | "kill" | Lowercase<string>;
|
|
486
|
-
scheme?: string;
|
|
487
|
-
runtime?: string;
|
|
488
|
-
tool?: string;
|
|
489
|
-
access?: ("observe" | "mutate" | "execute" | "interact" | "control");
|
|
490
|
-
/**
|
|
491
|
-
* @minItems 1
|
|
492
|
-
*/
|
|
493
|
-
traits?: [string, ...(string)[]];
|
|
494
|
-
}
|
|
495
|
-
export interface CapabilityProjection {
|
|
496
|
-
service: CapabilityPolicy;
|
|
497
|
-
workspace: CapabilityPolicy;
|
|
498
|
-
effective: CapabilityPolicy;
|
|
499
|
-
}
|
|
500
|
-
/**
|
|
501
|
-
* One capability-policy layer. Deny wins; when only is present, a demand must match at least one selector; allow pre-approves matching admitted proposals.
|
|
502
|
-
*/
|
|
503
|
-
export type ClientInteractionRequest = ({
|
|
504
|
-
toolName: string;
|
|
505
|
-
mode: "form";
|
|
506
|
-
message: string;
|
|
507
|
-
requestedSchema: {
|
|
508
|
-
[k: string]: unknown;
|
|
509
|
-
};
|
|
510
|
-
} | {
|
|
511
|
-
toolName: string;
|
|
512
|
-
mode: "url";
|
|
513
|
-
message: string;
|
|
514
|
-
elicitationId: string;
|
|
515
|
-
url: string;
|
|
516
|
-
});
|
|
517
|
-
/**
|
|
518
|
-
* The runtime-neutral client-interface projection of one pending client interaction. Live delivery and reconnect discovery expose this same shape.
|
|
519
|
-
*/
|
|
520
|
-
export interface ClientInteractionProjection {
|
|
521
|
-
interactionId: number;
|
|
522
|
-
sessionId: number;
|
|
523
|
-
loopId: number;
|
|
524
|
-
turnId: number;
|
|
525
|
-
recipient: string;
|
|
526
|
-
request: ClientInteractionRequest;
|
|
527
|
-
}
|
|
528
|
-
export type ClientInteractionResolution = ({
|
|
529
|
-
action: "accept";
|
|
530
|
-
content?: {
|
|
531
|
-
[k: string]: unknown;
|
|
532
|
-
};
|
|
533
|
-
} | {
|
|
534
|
-
action: "decline";
|
|
535
|
-
} | {
|
|
536
|
-
action: "cancel";
|
|
537
|
-
});
|
|
538
|
-
export type Effort = ("off" | "adaptive" | "low" | "medium" | "high" | "xhigh" | "max");
|
|
539
|
-
export type EntryReadResult = ({
|
|
540
|
-
status: 200;
|
|
541
|
-
entry: ClientEntry;
|
|
542
|
-
} | {
|
|
543
|
-
status: number;
|
|
544
|
-
problem: ProblemDetails;
|
|
545
|
-
entry: null;
|
|
546
|
-
});
|
|
547
|
-
export interface ClientEntry {
|
|
548
|
-
/**
|
|
549
|
-
* The stored entry's durable identifier, or null for a representation core computes.
|
|
550
|
-
*/
|
|
551
|
-
entryId: (number | null);
|
|
552
|
-
target: string;
|
|
553
|
-
/**
|
|
554
|
-
* Each channel by name; the empty name is the unnamed default channel of a scheme whose default is unnamed.
|
|
555
|
-
*/
|
|
556
|
-
channels: {
|
|
557
|
-
[k: string]: ClientEntryChannel;
|
|
558
|
-
};
|
|
559
|
-
}
|
|
560
|
-
export interface ClientEntryChannel {
|
|
561
|
-
content: string;
|
|
562
|
-
contentOffset: number;
|
|
563
|
-
contentLength: number;
|
|
564
|
-
mimetype: string;
|
|
565
|
-
weight: number;
|
|
566
|
-
state: ("static" | "active" | "closed" | "errored");
|
|
567
|
-
}
|
|
568
|
-
/**
|
|
569
|
-
* PLURNK operation failure using RFC 9457 Problem Details. Extension members are permitted so an owning boundary can add structured causal and recovery facts without inventing a second error envelope.
|
|
570
|
-
*/
|
|
571
|
-
export interface FunctionalityCandidate {
|
|
572
|
-
/**
|
|
573
|
-
* The alias the candidate would take if added; a suggestion, never authority.
|
|
574
|
-
*/
|
|
575
|
-
alias?: string;
|
|
576
|
-
summary?: string;
|
|
577
|
-
/**
|
|
578
|
-
* The exact family definition, conforming to the family's definition schema.
|
|
579
|
-
*/
|
|
580
|
-
definition: {};
|
|
581
|
-
provenance: FunctionalityProvenance;
|
|
582
|
-
}
|
|
583
|
-
/**
|
|
584
|
-
* The input supplying a definition or discovery candidate, separate from ownership, preparation and authority.
|
|
585
|
-
*/
|
|
586
|
-
export interface FunctionalityProvenance {
|
|
587
|
-
kind: string;
|
|
588
|
-
source: string;
|
|
589
|
-
reference?: string;
|
|
590
|
-
}
|
|
591
|
-
export type FunctionalityDefinitionState = {
|
|
592
|
-
alias: string;
|
|
593
|
-
/**
|
|
594
|
-
* Who owns this definition: the service baseline, the workspace, or one session. A session-scoped family (env) owns its definitions per session, so origin names ownership rather than scope.
|
|
595
|
-
*/
|
|
596
|
-
origin: ("service" | "workspace" | "session");
|
|
597
|
-
/**
|
|
598
|
-
* disabled: available, model-invisible. dormant: enabled without a resident publication. active: enabled and prepared. unavailable: enabled but preparation has an exact Problem. authorization-required: enabled and awaiting a protocol continuation.
|
|
599
|
-
*/
|
|
600
|
-
state: ("disabled" | "dormant" | "active" | "unavailable" | "authorization-required");
|
|
601
|
-
definition?: {};
|
|
602
|
-
provenance?: FunctionalityProvenance;
|
|
603
|
-
/**
|
|
604
|
-
* The Session this entry was copied from when this Session was created (`work` or `fork`), preserved across generations until this Session changes the entry. Absent for an entry this Session set itself. Session-scoped families only.
|
|
605
|
-
*/
|
|
606
|
-
inherited?: string;
|
|
607
|
-
/**
|
|
608
|
-
* Family-owned presentation facts about an active definition (a server's protocol version and tool names, an agent card summary). Never credentials, never authority.
|
|
609
|
-
*/
|
|
610
|
-
detail?: {};
|
|
611
|
-
problem?: ProblemDetails;
|
|
612
|
-
/**
|
|
613
|
-
* A protocol continuation is needed. A URL is present only after an authorization attempt has begun.
|
|
669
|
+
* A protocol continuation is needed. A URL is present only after an authorization attempt has begun.
|
|
614
670
|
*/
|
|
615
671
|
authorization?: {
|
|
616
672
|
url?: string;
|
|
@@ -666,6 +722,66 @@ export interface FunctionalityPreparationActivity {
|
|
|
666
722
|
phase: ("preparing" | "publishing");
|
|
667
723
|
since: string;
|
|
668
724
|
}
|
|
725
|
+
export interface LineMarker {
|
|
726
|
+
/**
|
|
727
|
+
* @minItems 1
|
|
728
|
+
*/
|
|
729
|
+
marks: [number, ...(number)[]];
|
|
730
|
+
}
|
|
731
|
+
export type MatcherBody = (XPathBody | RegexBody | JsonPathBody | FtsBody | GraphBody | GlobBody | UnreadableBody);
|
|
732
|
+
/**
|
|
733
|
+
* XPath 1.0 expression. Validated at parse time via the xpath library.
|
|
734
|
+
*/
|
|
735
|
+
export interface XPathBody {
|
|
736
|
+
dialect: "xpath";
|
|
737
|
+
raw: string;
|
|
738
|
+
}
|
|
739
|
+
/**
|
|
740
|
+
* ECMAScript regex literal `/pattern/flags`. Escape a literal delimiter as `\/`. Pattern and flags are split out for direct use. `raw` preserves the literal form for round-tripping.
|
|
741
|
+
*/
|
|
742
|
+
export interface RegexBody {
|
|
743
|
+
dialect: "regex";
|
|
744
|
+
raw: string;
|
|
745
|
+
pattern: string;
|
|
746
|
+
flags: string;
|
|
747
|
+
}
|
|
748
|
+
/**
|
|
749
|
+
* RFC 9535 JSONPath expression. Compiled at parse time with json-p3, the same engine used for runtime matching.
|
|
750
|
+
*/
|
|
751
|
+
export interface JsonPathBody {
|
|
752
|
+
dialect: "jsonpath";
|
|
753
|
+
raw: string;
|
|
754
|
+
}
|
|
755
|
+
/**
|
|
756
|
+
* Native SQLite FTS5 query after the `~` prefix. SQLite owns query validation, tokenization, matching and ranking; the statement's scope selects ordinary result positions.
|
|
757
|
+
*/
|
|
758
|
+
export interface FtsBody {
|
|
759
|
+
dialect: "fts";
|
|
760
|
+
raw: string;
|
|
761
|
+
}
|
|
762
|
+
/**
|
|
763
|
+
* Code-graph selection. Body is `&symbol` for definitions, `&<symbol` for references to that name, or `&>symbol` for definitions of its one-hop dependencies. Shape is validated during language admission; resolution happens service-side through the symbol index.
|
|
764
|
+
*/
|
|
765
|
+
export interface GraphBody {
|
|
766
|
+
dialect: "graph";
|
|
767
|
+
raw: string;
|
|
768
|
+
}
|
|
769
|
+
/**
|
|
770
|
+
* Pattern with no dialect prefix; treated as a glob/literal match.
|
|
771
|
+
*/
|
|
772
|
+
export interface GlobBody {
|
|
773
|
+
dialect: "glob";
|
|
774
|
+
raw: string;
|
|
775
|
+
}
|
|
776
|
+
/**
|
|
777
|
+
* A matcher the parser could not read in the dialect its prefix claims ({§matcher-prefix-claims}): the authored text, the diagnostic, and the working form. The statement is admitted and the operation refuses with that message and recovery; it is never a contract strike.
|
|
778
|
+
*/
|
|
779
|
+
export interface UnreadableBody {
|
|
780
|
+
dialect: "unreadable";
|
|
781
|
+
raw: string;
|
|
782
|
+
message: string;
|
|
783
|
+
recovery: string;
|
|
784
|
+
}
|
|
669
785
|
export type McpOAuth = ({
|
|
670
786
|
type: "oauth";
|
|
671
787
|
redirectUrl?: string;
|
|
@@ -857,62 +973,34 @@ export interface ModelCatalogQuery {
|
|
|
857
973
|
offset?: number;
|
|
858
974
|
limit?: number;
|
|
859
975
|
}
|
|
860
|
-
export
|
|
861
|
-
alias?: string;
|
|
862
|
-
provider: string;
|
|
863
|
-
model: string;
|
|
864
|
-
effort?: Effort;
|
|
865
|
-
/**
|
|
866
|
-
* Whether effort was chosen through setSessionEffort (explicit) or seeded from the alias configuration (default). Present exactly when effort is.
|
|
867
|
-
*/
|
|
868
|
-
effortSource?: ("default" | "explicit");
|
|
869
|
-
}
|
|
870
|
-
export interface Notice {
|
|
871
|
-
/**
|
|
872
|
-
* Producer identifier. Top-level for self-contained subsystems; colon-namespaced for parameterized producers such as `provider:openai` or `exec:search`.
|
|
873
|
-
*/
|
|
874
|
-
source: string;
|
|
875
|
-
/**
|
|
876
|
-
* Open discriminator within a source. Examples include `output_unaccounted`, `search_progress`, and `turn_awaiting_model`.
|
|
877
|
-
*/
|
|
878
|
-
kind: string;
|
|
879
|
-
/**
|
|
880
|
-
* Display severity set by the producer. It does not make the Notice a durable operation result.
|
|
881
|
-
*/
|
|
882
|
-
level: ("error" | "warn" | "info");
|
|
883
|
-
/**
|
|
884
|
-
* Optional model-facing imperative for an observation of the model's own output: `YOU MUST`, `YOU MUST NOT`, `YOU MUST ONLY`, `YOU SHOULD` or `YOU SHOULD NOT`, then the rule. The model packet leads with it; clients display `message`.
|
|
885
|
-
*/
|
|
886
|
-
directive?: string;
|
|
887
|
-
/**
|
|
888
|
-
* Optional terse, factual display message.
|
|
889
|
-
*/
|
|
890
|
-
message?: (string | null);
|
|
891
|
-
/**
|
|
892
|
-
* Optional typed position for an observation. ContentOffset points into model output; LogCoordinate points at a durable log row without replacing it.
|
|
893
|
-
*/
|
|
894
|
-
position?: (ContentOffset | LogCoordinate | null);
|
|
895
|
-
[k: string]: unknown;
|
|
896
|
-
}
|
|
976
|
+
export type ParsedPath = (LocalPath | UrlPath);
|
|
897
977
|
/**
|
|
898
|
-
* A
|
|
978
|
+
* A bare local path with no `scheme://` prefix. `raw` is the path as authored, minus any `#channel`, which is `fragment` exactly as on a URL; resolution is the runtime's job.
|
|
899
979
|
*/
|
|
900
|
-
export interface
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
980
|
+
export interface LocalPath {
|
|
981
|
+
kind: "local";
|
|
982
|
+
raw: string;
|
|
983
|
+
fragment?: (string | null);
|
|
904
984
|
}
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
985
|
+
/**
|
|
986
|
+
* A path with a `scheme://` prefix, fully decomposed via WHATWG URL.
|
|
987
|
+
*/
|
|
988
|
+
export interface UrlPath {
|
|
989
|
+
kind: "url";
|
|
990
|
+
raw: string;
|
|
991
|
+
scheme: string;
|
|
992
|
+
username: (string | null);
|
|
993
|
+
password: (string | null);
|
|
994
|
+
hostname: (string | null);
|
|
995
|
+
port: (number | null);
|
|
996
|
+
pathname: string;
|
|
911
997
|
/**
|
|
912
|
-
*
|
|
998
|
+
* Canonical serialized WHATWG query component without the leading `?`. Null means no query; the empty string means an explicit empty query (`?`). Ordering, duplicate names, and encoded spelling are preserved.
|
|
913
999
|
*/
|
|
914
|
-
|
|
1000
|
+
query: (string | null);
|
|
1001
|
+
fragment: (string | null);
|
|
915
1002
|
}
|
|
1003
|
+
export type PlurnkStatement = (FindStatement | ReadStatement | EditStatement | CopyStatement | MoveStatement | SendStatement | DoneStatement | FailStatement | ExecStatement | BareStatement | WorkStatement | ForkStatement | KillStatement | DispositionStatement | NoteStatement);
|
|
916
1004
|
export type AsideOrNull = (string | null);
|
|
917
1005
|
/**
|
|
918
1006
|
* Optional HTTP request headers (`{ [name: string]: string }`); null when omitted.
|
|
@@ -934,6 +1022,219 @@ export type TextLineMarkerOrNull = (TextLineMarker | null);
|
|
|
934
1022
|
*/
|
|
935
1023
|
export type AttachmentsOrNull = (string[] | null);
|
|
936
1024
|
export type SendBodyOrNull = (SendBody | null);
|
|
1025
|
+
export interface FindStatement {
|
|
1026
|
+
op: "find";
|
|
1027
|
+
aside: AsideOrNull;
|
|
1028
|
+
headers: HeadersOrNull;
|
|
1029
|
+
target: PathOrNull;
|
|
1030
|
+
lineMarker: LineMarkerOrNull;
|
|
1031
|
+
/**
|
|
1032
|
+
* The selection matcher lifted from the `pattern` option ({§parse-recovery}); null when omitted.
|
|
1033
|
+
*/
|
|
1034
|
+
matcher: (MatcherBody | null);
|
|
1035
|
+
/**
|
|
1036
|
+
* Retrieval bodies normalize to separate `note` statements; selection belongs to the options ({§op-shapes}).
|
|
1037
|
+
*/
|
|
1038
|
+
body: null;
|
|
1039
|
+
position: Position;
|
|
1040
|
+
}
|
|
1041
|
+
/**
|
|
1042
|
+
* A bare local path with no `scheme://` prefix. `raw` is the path as authored, minus any `#channel`, which is `fragment` exactly as on a URL; resolution is the runtime's job.
|
|
1043
|
+
*/
|
|
1044
|
+
export interface Position {
|
|
1045
|
+
line: number;
|
|
1046
|
+
column: number;
|
|
1047
|
+
}
|
|
1048
|
+
export interface ReadStatement {
|
|
1049
|
+
op: "read";
|
|
1050
|
+
aside: AsideOrNull;
|
|
1051
|
+
headers: HeadersOrNull;
|
|
1052
|
+
target: PathOrNull;
|
|
1053
|
+
lineMarker: TextLineMarkerOrNull;
|
|
1054
|
+
/**
|
|
1055
|
+
* The selection matcher lifted from the `pattern` option ({§parse-recovery}); null when omitted.
|
|
1056
|
+
*/
|
|
1057
|
+
matcher: (MatcherBody | null);
|
|
1058
|
+
body: null;
|
|
1059
|
+
position: Position;
|
|
1060
|
+
}
|
|
1061
|
+
/**
|
|
1062
|
+
* The ordered components parsed from a text-coordinate <scope>. A line position may be numeric or a rendered five-character Base62 line anchor; columns remain numeric. Core resolves anchors against the addressed current text before a numeric scope reaches its operation owner.
|
|
1063
|
+
*/
|
|
1064
|
+
export interface TextLineMarker {
|
|
1065
|
+
/**
|
|
1066
|
+
* @minItems 1
|
|
1067
|
+
*/
|
|
1068
|
+
marks: [(number | string), ...((number | string))[]];
|
|
1069
|
+
}
|
|
1070
|
+
export interface EditStatement {
|
|
1071
|
+
op: "edit";
|
|
1072
|
+
aside: AsideOrNull;
|
|
1073
|
+
headers: HeadersOrNull;
|
|
1074
|
+
target: PathOrNull;
|
|
1075
|
+
lineMarker: TextLineMarkerOrNull;
|
|
1076
|
+
/**
|
|
1077
|
+
* The selection matcher lifted from the `pattern` option ({§parse-recovery}); null when omitted.
|
|
1078
|
+
*/
|
|
1079
|
+
matcher: (MatcherBody | null);
|
|
1080
|
+
body: (string | null);
|
|
1081
|
+
position: Position;
|
|
1082
|
+
}
|
|
1083
|
+
export interface CopyStatement {
|
|
1084
|
+
op: "copy";
|
|
1085
|
+
aside: AsideOrNull;
|
|
1086
|
+
source: ResourceSelection;
|
|
1087
|
+
destination: ResourceSelection;
|
|
1088
|
+
position: Position;
|
|
1089
|
+
}
|
|
1090
|
+
/**
|
|
1091
|
+
* One `copy`/`move` resource operand. A target without a fragment selects the scheme's default channel; a fragment selects a named channel; headers belong to an HTTP(S) endpoint; lineMarker scopes the selected textual content.
|
|
1092
|
+
*/
|
|
1093
|
+
export interface ResourceSelection {
|
|
1094
|
+
target: ParsedPath;
|
|
1095
|
+
/**
|
|
1096
|
+
* Optional HTTP request headers owned by this operand's addressed endpoint; null when omitted.
|
|
1097
|
+
*/
|
|
1098
|
+
headers: ({
|
|
1099
|
+
[k: string]: string;
|
|
1100
|
+
} | null);
|
|
1101
|
+
lineMarker: (TextLineMarker | null);
|
|
1102
|
+
/**
|
|
1103
|
+
* Optional selection matcher on the source operand; refused by the owner on a destination.
|
|
1104
|
+
*/
|
|
1105
|
+
matcher: (MatcherBody | null);
|
|
1106
|
+
}
|
|
1107
|
+
export interface MoveStatement {
|
|
1108
|
+
op: "move";
|
|
1109
|
+
aside: AsideOrNull;
|
|
1110
|
+
source: ResourceSelection;
|
|
1111
|
+
destination: ResourceSelection;
|
|
1112
|
+
position: Position;
|
|
1113
|
+
}
|
|
1114
|
+
export interface SendStatement {
|
|
1115
|
+
op: "send";
|
|
1116
|
+
aside: AsideOrNull;
|
|
1117
|
+
headers: HeadersOrNull;
|
|
1118
|
+
attachments: AttachmentsOrNull;
|
|
1119
|
+
target: PathOrNull;
|
|
1120
|
+
lineMarker: null;
|
|
1121
|
+
body: SendBodyOrNull;
|
|
1122
|
+
position: Position;
|
|
1123
|
+
}
|
|
1124
|
+
/**
|
|
1125
|
+
* Parsed body of a `send`, `done`, or `fail` statement. `raw` is the literal body text; `json` is the best-effort `JSON.parse(raw)` result, or null when the body isn't valid JSON.
|
|
1126
|
+
*/
|
|
1127
|
+
export interface SendBody {
|
|
1128
|
+
raw: string;
|
|
1129
|
+
json: unknown;
|
|
1130
|
+
}
|
|
1131
|
+
export interface DoneStatement {
|
|
1132
|
+
op: "done";
|
|
1133
|
+
aside: AsideOrNull;
|
|
1134
|
+
attachments: AttachmentsOrNull;
|
|
1135
|
+
target: PathOrNull;
|
|
1136
|
+
lineMarker: null;
|
|
1137
|
+
body: SendBodyOrNull;
|
|
1138
|
+
position: Position;
|
|
1139
|
+
}
|
|
1140
|
+
export interface FailStatement {
|
|
1141
|
+
op: "fail";
|
|
1142
|
+
aside: AsideOrNull;
|
|
1143
|
+
attachments: AttachmentsOrNull;
|
|
1144
|
+
target: PathOrNull;
|
|
1145
|
+
lineMarker: null;
|
|
1146
|
+
body: SendBodyOrNull;
|
|
1147
|
+
position: Position;
|
|
1148
|
+
}
|
|
1149
|
+
export interface ExecStatement {
|
|
1150
|
+
/**
|
|
1151
|
+
* The runtime tag the call names, in its registered lowercase spelling. An execution has no operation keyword: the call name is the runtime, and the log row's op shows it as written.
|
|
1152
|
+
*/
|
|
1153
|
+
runtime: Lowercase<string>;
|
|
1154
|
+
/**
|
|
1155
|
+
* Never present: an execution is named by its runtime.
|
|
1156
|
+
*/
|
|
1157
|
+
op?: never;
|
|
1158
|
+
aside: AsideOrNull;
|
|
1159
|
+
target: PathOrNull;
|
|
1160
|
+
cwd?: (string | null);
|
|
1161
|
+
lineMarker: LineMarkerOrNull;
|
|
1162
|
+
body: (string | null);
|
|
1163
|
+
position: Position;
|
|
1164
|
+
}
|
|
1165
|
+
export interface BareStatement {
|
|
1166
|
+
op: "bare";
|
|
1167
|
+
aside: AsideOrNull;
|
|
1168
|
+
target: PathOrNull;
|
|
1169
|
+
lineMarker: null;
|
|
1170
|
+
body: string;
|
|
1171
|
+
position: Position;
|
|
1172
|
+
}
|
|
1173
|
+
export interface WorkStatement {
|
|
1174
|
+
op: "work";
|
|
1175
|
+
aside: AsideOrNull;
|
|
1176
|
+
target: PathOrNull;
|
|
1177
|
+
lineMarker: null;
|
|
1178
|
+
body: string;
|
|
1179
|
+
persona?: string;
|
|
1180
|
+
model?: string;
|
|
1181
|
+
effort?: string;
|
|
1182
|
+
position: Position;
|
|
1183
|
+
}
|
|
1184
|
+
export interface ForkStatement {
|
|
1185
|
+
op: "fork";
|
|
1186
|
+
aside: AsideOrNull;
|
|
1187
|
+
target: PathOrNull;
|
|
1188
|
+
lineMarker: null;
|
|
1189
|
+
body: string;
|
|
1190
|
+
persona?: string;
|
|
1191
|
+
model?: string;
|
|
1192
|
+
effort?: string;
|
|
1193
|
+
position: Position;
|
|
1194
|
+
}
|
|
1195
|
+
export interface KillStatement {
|
|
1196
|
+
op: "kill";
|
|
1197
|
+
aside: AsideOrNull;
|
|
1198
|
+
headers: HeadersOrNull;
|
|
1199
|
+
/**
|
|
1200
|
+
* Optional confirmation for remote HTTP DELETE (`true`); null when omitted.
|
|
1201
|
+
*/
|
|
1202
|
+
remote: (boolean | null);
|
|
1203
|
+
target: PathOrNull;
|
|
1204
|
+
/**
|
|
1205
|
+
* Scope of the kill: lines of a log body or of an entry ({§op-shapes}); null kills the whole target.
|
|
1206
|
+
*/
|
|
1207
|
+
lineMarker: (TextLineMarker | null);
|
|
1208
|
+
/**
|
|
1209
|
+
* The selection matcher lifted from the `pattern` option ({§parse-recovery}); null when omitted.
|
|
1210
|
+
*/
|
|
1211
|
+
matcher: (MatcherBody | null);
|
|
1212
|
+
/**
|
|
1213
|
+
* A `log:///` `kill` carries its optional distillation, kept as the model's own `note` row ({§log-kill-scope}). Other `kill` statements take no body; their matcher rides on the `pattern` option ({§parse-recovery}).
|
|
1214
|
+
*/
|
|
1215
|
+
body: (string | null);
|
|
1216
|
+
position: Position;
|
|
1217
|
+
}
|
|
1218
|
+
export interface DispositionStatement {
|
|
1219
|
+
op: "wait";
|
|
1220
|
+
aside: AsideOrNull;
|
|
1221
|
+
target: PathOrNull;
|
|
1222
|
+
lineMarker: null;
|
|
1223
|
+
/**
|
|
1224
|
+
* Optional maximum park duration from `timeout` option; zero continues without parking.
|
|
1225
|
+
*/
|
|
1226
|
+
seconds: (number | null);
|
|
1227
|
+
body: (string | null);
|
|
1228
|
+
position: Position;
|
|
1229
|
+
}
|
|
1230
|
+
export interface NoteStatement {
|
|
1231
|
+
op: "note";
|
|
1232
|
+
aside: AsideOrNull;
|
|
1233
|
+
target: null;
|
|
1234
|
+
lineMarker: null;
|
|
1235
|
+
body: (string | null);
|
|
1236
|
+
position: Position;
|
|
1237
|
+
}
|
|
937
1238
|
export interface ProblemProjection {
|
|
938
1239
|
/**
|
|
939
1240
|
* Absolute URI identifying the stable problem class.
|
|
@@ -960,124 +1261,7 @@ export interface ProblemProjection {
|
|
|
960
1261
|
instance?: never;
|
|
961
1262
|
[k: string]: unknown;
|
|
962
1263
|
}
|
|
963
|
-
export type ProposalDisposition = ({
|
|
964
|
-
decision: "review";
|
|
965
|
-
} | {
|
|
966
|
-
decision: ("accept" | "reject");
|
|
967
|
-
outcome?: string;
|
|
968
|
-
});
|
|
969
1264
|
export type ProposalPolicy = ("review" | "accept" | "reject");
|
|
970
|
-
export interface ProposalProjection {
|
|
971
|
-
logEntryId: number;
|
|
972
|
-
sessionId: number;
|
|
973
|
-
/**
|
|
974
|
-
* The requesting session's name.
|
|
975
|
-
*/
|
|
976
|
-
session: string;
|
|
977
|
-
loopId: number;
|
|
978
|
-
turnId: number;
|
|
979
|
-
/**
|
|
980
|
-
* The gated operation's log coordinate, loop/turn/sequence: the id of the call it is.
|
|
981
|
-
*/
|
|
982
|
-
coordinate: string;
|
|
983
|
-
/**
|
|
984
|
-
* An operation keyword, or a runtime tag: an execution's operation is its runtime.
|
|
985
|
-
*/
|
|
986
|
-
op: "find" | "read" | "edit" | "copy" | "move" | "send" | "done" | "fail" | "bare" | "work" | "fork" | "kill" | "note" | "wait" | Lowercase<string>;
|
|
987
|
-
target: {
|
|
988
|
-
scheme: (string | null);
|
|
989
|
-
authority: (string | null);
|
|
990
|
-
pathname: (string | null);
|
|
991
|
-
};
|
|
992
|
-
body: string;
|
|
993
|
-
attrs: {
|
|
994
|
-
[k: string]: unknown;
|
|
995
|
-
};
|
|
996
|
-
owner: string;
|
|
997
|
-
disposition: ProposalDisposition;
|
|
998
|
-
selector?: CapabilitySelector;
|
|
999
|
-
/**
|
|
1000
|
-
* Structured ACP v2 permission subject for the proposed operation.
|
|
1001
|
-
*/
|
|
1002
|
-
subject?: ({
|
|
1003
|
-
type: "command";
|
|
1004
|
-
command: string;
|
|
1005
|
-
cwd: string;
|
|
1006
|
-
} | {
|
|
1007
|
-
type: "tool_call";
|
|
1008
|
-
kind: ("read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | "other");
|
|
1009
|
-
title: string;
|
|
1010
|
-
locations?: {
|
|
1011
|
-
path: string;
|
|
1012
|
-
}[];
|
|
1013
|
-
diff?: {
|
|
1014
|
-
path: string;
|
|
1015
|
-
patch: string;
|
|
1016
|
-
};
|
|
1017
|
-
});
|
|
1018
|
-
/**
|
|
1019
|
-
* When the gate stops waiting and core cancels it (ISO 8601); absent while it waits indefinitely.
|
|
1020
|
-
*/
|
|
1021
|
-
expiresAt?: string;
|
|
1022
|
-
}
|
|
1023
|
-
/**
|
|
1024
|
-
* The capability selector for the proposed operation, persisted on allow_always / reject_always.
|
|
1025
|
-
*/
|
|
1026
|
-
export type ProviderCost = ({
|
|
1027
|
-
kind: "charged";
|
|
1028
|
-
amount: MonetaryAmount;
|
|
1029
|
-
usdEquivalent?: string;
|
|
1030
|
-
source: string;
|
|
1031
|
-
} | {
|
|
1032
|
-
kind: "estimated";
|
|
1033
|
-
amount: MonetaryAmount;
|
|
1034
|
-
source: string;
|
|
1035
|
-
} | {
|
|
1036
|
-
kind: "unknown";
|
|
1037
|
-
reason: string;
|
|
1038
|
-
});
|
|
1039
|
-
/**
|
|
1040
|
-
* Ordered physical provider-request evidence and its deterministic aggregate projection.
|
|
1041
|
-
*/
|
|
1042
|
-
export interface ProviderAccounting {
|
|
1043
|
-
requests: ProviderRequestAccounting[];
|
|
1044
|
-
usage: (ProviderUsage | null);
|
|
1045
|
-
knownUsage: (ProviderUsage | null);
|
|
1046
|
-
knownCostUsd: (string | null);
|
|
1047
|
-
costUsd: (string | null);
|
|
1048
|
-
}
|
|
1049
|
-
/**
|
|
1050
|
-
* The normalized accounting disposition of one physical provider request.
|
|
1051
|
-
*/
|
|
1052
|
-
export interface ProviderRequestAccounting {
|
|
1053
|
-
provider: string;
|
|
1054
|
-
model: string;
|
|
1055
|
-
outcome: ("response" | "error");
|
|
1056
|
-
status?: number;
|
|
1057
|
-
usage?: ProviderUsage;
|
|
1058
|
-
cost: ProviderCost;
|
|
1059
|
-
}
|
|
1060
|
-
/**
|
|
1061
|
-
* Token quantities. Physical-request instances enforce their partition identities. ProviderAccounting distinguishes complete usage from knownUsage subtotals. Omitted fields are unknown; explicit zero is observed or exactly derived.
|
|
1062
|
-
*/
|
|
1063
|
-
export interface ProviderUsage {
|
|
1064
|
-
inputTokens?: number;
|
|
1065
|
-
outputTokens?: number;
|
|
1066
|
-
totalTokens?: number;
|
|
1067
|
-
inputTokenDetails?: {
|
|
1068
|
-
noCacheTokens?: number;
|
|
1069
|
-
cacheReadTokens?: number;
|
|
1070
|
-
cacheWriteTokens?: number;
|
|
1071
|
-
};
|
|
1072
|
-
outputTokenDetails?: {
|
|
1073
|
-
textTokens?: number;
|
|
1074
|
-
reasoningTokens?: number;
|
|
1075
|
-
};
|
|
1076
|
-
}
|
|
1077
|
-
export interface MonetaryAmount {
|
|
1078
|
-
amount: string;
|
|
1079
|
-
currency: string;
|
|
1080
|
-
}
|
|
1081
1265
|
export type DecimalAmount = string;
|
|
1082
1266
|
export type NonEmptyString = string;
|
|
1083
1267
|
export type Tokens = number;
|