@plurnk/plurnk-contracts 8.0.0 → 10.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/.env.defaults +1 -19
- package/README.md +5 -6
- package/SPEC.md +100 -65
- package/dist/schema/DaemonNotificationEnvelope.json +602 -0
- package/dist/schema/FunctionalityCandidate.json +4 -0
- package/dist/schema/FunctionalityDiscoverQuery.json +12 -0
- package/dist/schema/FunctionalityDiscoverResult.json +10 -0
- package/dist/schema/FunctionalityListQuery.json +33 -0
- package/dist/schema/FunctionalityListResult.json +16 -1
- package/dist/schema/McpServerDefinition.json +1 -1
- package/dist/schema/ModelCatalogPage.json +9 -0
- package/dist/schema/PlurnkStatement.json +42 -2
- package/dist/schema/ProposalProjection.json +0 -4
- package/dist/schema/ProviderAccounting.json +3 -3
- package/dist/schema/ProviderCost.json +1 -1
- package/dist/schema/ProviderRequestAccounting.json +3 -3
- package/dist/schema/ProviderUsage.json +1 -1
- package/dist/src/ActorIdentity.d.ts +26 -0
- package/dist/src/ActorIdentity.d.ts.map +1 -0
- package/dist/src/ActorIdentity.js +179 -0
- package/dist/src/ActorIdentity.js.map +1 -0
- package/dist/src/Application.d.ts +58 -125
- package/dist/src/Application.d.ts.map +1 -1
- package/dist/src/Application.js +372 -80
- package/dist/src/Application.js.map +1 -1
- package/dist/src/ApplicationNotifications.d.ts +77 -24
- package/dist/src/ApplicationNotifications.d.ts.map +1 -1
- package/dist/src/ApplicationNotifications.js +45 -9
- package/dist/src/ApplicationNotifications.js.map +1 -1
- package/dist/src/ApplicationPort.d.ts +53 -13
- package/dist/src/ApplicationPort.d.ts.map +1 -1
- package/dist/src/ApplicationPort.js +1 -1
- package/dist/src/ApplicationPort.js.map +1 -1
- package/dist/src/ApplicationStream.d.ts +2 -2
- package/dist/src/ApplicationStream.d.ts.map +1 -1
- package/dist/src/ApplicationStream.js.map +1 -1
- package/dist/src/CollectionCommand.d.ts +33 -0
- package/dist/src/CollectionCommand.d.ts.map +1 -0
- package/dist/src/CollectionCommand.js +277 -0
- package/dist/src/CollectionCommand.js.map +1 -0
- package/dist/src/Functionality.d.ts +7 -2
- package/dist/src/Functionality.d.ts.map +1 -1
- package/dist/src/Functionality.js.map +1 -1
- package/dist/src/HttpOrigin.d.ts +79 -10
- package/dist/src/HttpOrigin.d.ts.map +1 -1
- package/dist/src/HttpOrigin.js +286 -44
- package/dist/src/HttpOrigin.js.map +1 -1
- package/dist/src/HttpPort.d.ts +35 -0
- package/dist/src/HttpPort.d.ts.map +1 -0
- package/dist/src/HttpPort.js +106 -0
- package/dist/src/HttpPort.js.map +1 -0
- package/dist/src/InteractiveCommands.d.ts +96 -0
- package/dist/src/InteractiveCommands.d.ts.map +1 -0
- package/dist/src/InteractiveCommands.js +409 -0
- package/dist/src/InteractiveCommands.js.map +1 -0
- 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/McpWireTool.d.ts +27 -0
- package/dist/src/McpWireTool.d.ts.map +1 -0
- package/dist/src/McpWireTool.js +30 -0
- package/dist/src/McpWireTool.js.map +1 -0
- package/dist/src/OAuthClient.d.ts +64 -0
- package/dist/src/OAuthClient.d.ts.map +1 -0
- package/dist/src/OAuthClient.js +226 -0
- package/dist/src/OAuthClient.js.map +1 -0
- package/dist/src/ScheduleCommand.d.ts +60 -0
- package/dist/src/ScheduleCommand.d.ts.map +1 -0
- package/dist/src/ScheduleCommand.js +677 -0
- package/dist/src/ScheduleCommand.js.map +1 -0
- package/dist/src/SessionProjection.d.ts +91 -0
- package/dist/src/SessionProjection.d.ts.map +1 -0
- package/dist/src/SessionProjection.js +223 -0
- package/dist/src/SessionProjection.js.map +1 -0
- package/dist/src/Validator.d.ts +4 -3
- package/dist/src/Validator.d.ts.map +1 -1
- package/dist/src/Validator.js +27 -17
- package/dist/src/Validator.js.map +1 -1
- package/dist/src/index.d.ts +11 -5
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +9 -4
- package/dist/src/index.js.map +1 -1
- package/dist/src/types.generated.d.ts +814 -566
- 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 +3 -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,198 @@ 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/started";
|
|
143
|
+
timestamp: number;
|
|
144
|
+
workspaceId: (number | null);
|
|
145
|
+
sessionId: (number | null);
|
|
146
|
+
data: LoopStarted;
|
|
147
|
+
} | {
|
|
148
|
+
id: number;
|
|
149
|
+
event: "loop/parked";
|
|
150
|
+
timestamp: number;
|
|
151
|
+
workspaceId: (number | null);
|
|
152
|
+
sessionId: (number | null);
|
|
153
|
+
data: LoopParked;
|
|
154
|
+
} | {
|
|
155
|
+
id: number;
|
|
156
|
+
event: "loop/proposal";
|
|
157
|
+
timestamp: number;
|
|
158
|
+
workspaceId: (number | null);
|
|
159
|
+
sessionId: (number | null);
|
|
160
|
+
data: ProposalProjection;
|
|
161
|
+
} | {
|
|
162
|
+
id: number;
|
|
163
|
+
event: "loop/interaction";
|
|
164
|
+
timestamp: number;
|
|
165
|
+
workspaceId: (number | null);
|
|
166
|
+
sessionId: (number | null);
|
|
167
|
+
data: ClientInteractionProjection;
|
|
168
|
+
} | {
|
|
169
|
+
id: number;
|
|
170
|
+
event: "loop/gate-settled";
|
|
171
|
+
timestamp: number;
|
|
172
|
+
workspaceId: (number | null);
|
|
173
|
+
sessionId: (number | null);
|
|
174
|
+
data: LoopGateSettled;
|
|
175
|
+
} | {
|
|
176
|
+
id: number;
|
|
177
|
+
event: "loop/terminated";
|
|
178
|
+
timestamp: number;
|
|
179
|
+
workspaceId: (number | null);
|
|
180
|
+
sessionId: (number | null);
|
|
181
|
+
data: Terminated;
|
|
182
|
+
} | {
|
|
183
|
+
id: number;
|
|
184
|
+
event: "log/entry";
|
|
185
|
+
timestamp: number;
|
|
186
|
+
workspaceId: (number | null);
|
|
187
|
+
sessionId: (number | null);
|
|
188
|
+
data: LogEntry;
|
|
189
|
+
} | {
|
|
190
|
+
id: number;
|
|
191
|
+
event: "stream/concluded";
|
|
192
|
+
timestamp: number;
|
|
193
|
+
workspaceId: (number | null);
|
|
194
|
+
sessionId: (number | null);
|
|
195
|
+
data: StreamConcluded;
|
|
196
|
+
} | {
|
|
197
|
+
id: number;
|
|
198
|
+
event: "notice/event";
|
|
199
|
+
timestamp: number;
|
|
200
|
+
workspaceId: (number | null);
|
|
201
|
+
sessionId: (number | null);
|
|
202
|
+
data: NoticeEvent;
|
|
203
|
+
});
|
|
53
204
|
/**
|
|
54
|
-
* The
|
|
205
|
+
* The portable durable reasoning effort shared by provider, runtime, and client boundaries.
|
|
55
206
|
*/
|
|
56
|
-
export type
|
|
207
|
+
export type Effort = ("off" | "adaptive" | "low" | "medium" | "high" | "xhigh" | "max");
|
|
57
208
|
/**
|
|
58
|
-
*
|
|
209
|
+
* The one core-owned settlement decision. Review waits for the session's owner; accept and reject carry the automatic resolution core applies.
|
|
59
210
|
*/
|
|
60
|
-
export type
|
|
211
|
+
export type ProposalDisposition = ({
|
|
212
|
+
decision: "review";
|
|
213
|
+
} | {
|
|
214
|
+
decision: ("accept" | "reject");
|
|
215
|
+
outcome?: string;
|
|
216
|
+
});
|
|
61
217
|
/**
|
|
62
|
-
*
|
|
218
|
+
* A runtime-neutral client elicitation request in standard ACP v2 / MCP form or URL mode. Protocol-private continuation state is excluded.
|
|
63
219
|
*/
|
|
64
|
-
export type
|
|
220
|
+
export type LoopGateSettled = ({
|
|
221
|
+
kind: "proposal";
|
|
222
|
+
sessionId: number;
|
|
223
|
+
loopId: number;
|
|
224
|
+
logEntryId: number;
|
|
225
|
+
decision: ("accept" | "reject" | "cancel");
|
|
226
|
+
outcome: string;
|
|
227
|
+
} | {
|
|
228
|
+
kind: "interaction";
|
|
229
|
+
sessionId: number;
|
|
230
|
+
loopId: number;
|
|
231
|
+
interactionId: number;
|
|
232
|
+
action: ("accept" | "decline" | "cancel");
|
|
233
|
+
});
|
|
65
234
|
/**
|
|
66
235
|
* Universal PLURNK operation result. Producer-owned metadata is open, but failures always carry one RFC 9457 Problem Details object.
|
|
67
236
|
*/
|
|
@@ -83,334 +252,174 @@ export type RequestedRange = [number, number];
|
|
|
83
252
|
* @maxItems 2
|
|
84
253
|
*/
|
|
85
254
|
export type ReturnedRange = [number, number];
|
|
86
|
-
export interface FindStatement {
|
|
87
|
-
op: "find";
|
|
88
|
-
aside: (string | null);
|
|
89
|
-
/**
|
|
90
|
-
* Optional HTTP request headers (`{ [name: string]: string }`); null when omitted.
|
|
91
|
-
*/
|
|
92
|
-
headers: ({
|
|
93
|
-
[k: string]: string;
|
|
94
|
-
} | null);
|
|
95
|
-
target: (ParsedPath | null);
|
|
96
|
-
lineMarker: (LineMarker | null);
|
|
97
|
-
/**
|
|
98
|
-
* The selection matcher lifted from the `pattern` option ({§parse-recovery}); null when omitted.
|
|
99
|
-
*/
|
|
100
|
-
matcher: (MatcherBody | null);
|
|
101
|
-
/**
|
|
102
|
-
* Retrieval bodies normalize to separate `note` statements; selection belongs to the options ({§op-shapes}).
|
|
103
|
-
*/
|
|
104
|
-
body: null;
|
|
105
|
-
position: Position;
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* 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.
|
|
109
|
-
*/
|
|
110
|
-
export interface LocalPath {
|
|
111
|
-
kind: "local";
|
|
112
|
-
raw: string;
|
|
113
|
-
fragment?: (string | null);
|
|
114
|
-
}
|
|
115
255
|
/**
|
|
116
|
-
*
|
|
256
|
+
* Normalized monetary evidence for one physical provider request. Unknown is never represented as zero.
|
|
117
257
|
*/
|
|
118
|
-
export
|
|
119
|
-
kind: "
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
258
|
+
export type ProviderCost = ({
|
|
259
|
+
kind: "charged";
|
|
260
|
+
amount: MonetaryAmount;
|
|
261
|
+
usdEquivalent?: string;
|
|
262
|
+
source: string;
|
|
263
|
+
} | {
|
|
264
|
+
kind: "estimated";
|
|
265
|
+
amount: MonetaryAmount;
|
|
266
|
+
source: string;
|
|
267
|
+
} | {
|
|
268
|
+
kind: "unknown";
|
|
269
|
+
reason: string;
|
|
270
|
+
});
|
|
271
|
+
export interface WorkspaceCreated {
|
|
272
|
+
id: number;
|
|
273
|
+
name: string;
|
|
274
|
+
projectRoot: (string | null);
|
|
275
|
+
projectLabel: (string | null);
|
|
132
276
|
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
export interface LineMarker {
|
|
137
|
-
/**
|
|
138
|
-
* @minItems 1
|
|
139
|
-
*/
|
|
140
|
-
marks: [number, ...(number)[]];
|
|
277
|
+
export interface WorkspaceRenamed {
|
|
278
|
+
id: number;
|
|
279
|
+
name: string;
|
|
141
280
|
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
export interface XPathBody {
|
|
146
|
-
dialect: "xpath";
|
|
147
|
-
raw: string;
|
|
281
|
+
export interface WorkspaceArchived {
|
|
282
|
+
id: number;
|
|
283
|
+
archivedAt: (string | null);
|
|
148
284
|
}
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
dialect: "regex";
|
|
154
|
-
raw: string;
|
|
155
|
-
pattern: string;
|
|
156
|
-
flags: string;
|
|
285
|
+
export interface FunctionalityChanged {
|
|
286
|
+
workspaceId: number;
|
|
287
|
+
sessionId: (number | null);
|
|
288
|
+
family: string;
|
|
157
289
|
}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
290
|
+
export interface SessionCreated {
|
|
291
|
+
id: number;
|
|
292
|
+
workspaceId: number;
|
|
293
|
+
workspaceName: string;
|
|
294
|
+
projectRoot: (string | null);
|
|
295
|
+
projectLabel: (string | null);
|
|
296
|
+
name: string;
|
|
297
|
+
parentSessionId: (number | null);
|
|
298
|
+
origin: ("model" | "_plurnk");
|
|
299
|
+
kind: ("root" | "fork" | "work");
|
|
300
|
+
lifecycle: ("idle" | "queued" | "running" | "parked" | "completed" | "cancelled" | "failed");
|
|
301
|
+
persona?: (string | null);
|
|
302
|
+
}
|
|
303
|
+
export interface SessionArchived {
|
|
304
|
+
id: number;
|
|
305
|
+
archivedAt: (string | null);
|
|
306
|
+
sessionIds: number[];
|
|
307
|
+
}
|
|
308
|
+
export interface SessionDeleted {
|
|
309
|
+
id: number;
|
|
310
|
+
sessionIds: number[];
|
|
311
|
+
}
|
|
312
|
+
export interface SessionTitled {
|
|
313
|
+
id: number;
|
|
314
|
+
title: string;
|
|
164
315
|
}
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
raw: string;
|
|
316
|
+
export interface SessionPolicy {
|
|
317
|
+
sessionId: number;
|
|
318
|
+
model: (ModelRoute | null);
|
|
319
|
+
childModel: (ModelRoute | null);
|
|
320
|
+
persona?: (string | null);
|
|
171
321
|
}
|
|
172
322
|
/**
|
|
173
|
-
*
|
|
323
|
+
* 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.
|
|
174
324
|
*/
|
|
175
|
-
export interface
|
|
176
|
-
|
|
177
|
-
|
|
325
|
+
export interface ModelRoute {
|
|
326
|
+
alias?: string;
|
|
327
|
+
provider: string;
|
|
328
|
+
model: string;
|
|
329
|
+
effort?: Effort;
|
|
330
|
+
/**
|
|
331
|
+
* Whether effort was chosen through setSessionEffort (explicit) or seeded from the alias configuration (default). Present exactly when effort is.
|
|
332
|
+
*/
|
|
333
|
+
effortSource?: ("default" | "explicit");
|
|
178
334
|
}
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
dialect: "glob";
|
|
184
|
-
raw: string;
|
|
335
|
+
export interface LoopStarted {
|
|
336
|
+
sessionId: number;
|
|
337
|
+
loopId: number;
|
|
338
|
+
loopSeq: number;
|
|
185
339
|
}
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
raw: string;
|
|
192
|
-
message: string;
|
|
193
|
-
recovery: string;
|
|
340
|
+
export interface LoopParked {
|
|
341
|
+
sessionId: number;
|
|
342
|
+
loopId: number;
|
|
343
|
+
loopSeq: number;
|
|
344
|
+
status: 202;
|
|
194
345
|
}
|
|
195
346
|
/**
|
|
196
|
-
*
|
|
347
|
+
* The runtime-neutral client-interface projection of one durable stopped-world proposal. Live delivery and reconnect discovery expose this same shape.
|
|
197
348
|
*/
|
|
198
|
-
export interface
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
}
|
|
202
|
-
export interface ReadStatement {
|
|
203
|
-
op: "read";
|
|
204
|
-
aside: (string | null);
|
|
205
|
-
/**
|
|
206
|
-
* Optional HTTP request headers (`{ [name: string]: string }`); null when omitted.
|
|
207
|
-
*/
|
|
208
|
-
headers: ({
|
|
209
|
-
[k: string]: string;
|
|
210
|
-
} | null);
|
|
211
|
-
target: (ParsedPath | null);
|
|
212
|
-
lineMarker: (TextLineMarker | null);
|
|
349
|
+
export interface ProposalProjection {
|
|
350
|
+
logEntryId: number;
|
|
351
|
+
sessionId: number;
|
|
213
352
|
/**
|
|
214
|
-
* The
|
|
353
|
+
* The requesting session's name.
|
|
215
354
|
*/
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
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 {
|
|
355
|
+
session: string;
|
|
356
|
+
loopId: number;
|
|
357
|
+
turnId: number;
|
|
224
358
|
/**
|
|
225
|
-
*
|
|
359
|
+
* The gated operation's log coordinate, loop/turn/sequence: the id of the call it is.
|
|
226
360
|
*/
|
|
227
|
-
|
|
228
|
-
}
|
|
229
|
-
export interface EditStatement {
|
|
230
|
-
op: "edit";
|
|
231
|
-
aside: (string | null);
|
|
361
|
+
coordinate: string;
|
|
232
362
|
/**
|
|
233
|
-
*
|
|
363
|
+
* An operation keyword, or a runtime tag: an execution's operation is its runtime.
|
|
234
364
|
*/
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
365
|
+
op: "find" | "read" | "edit" | "copy" | "move" | "send" | "done" | "fail" | "bare" | "work" | "fork" | "kill" | "note" | "wait" | Lowercase<string>;
|
|
366
|
+
target: {
|
|
367
|
+
scheme: (string | null);
|
|
368
|
+
authority: (string | null);
|
|
369
|
+
pathname: (string | null);
|
|
370
|
+
};
|
|
371
|
+
body: string;
|
|
372
|
+
attrs: {
|
|
373
|
+
[k: string]: unknown;
|
|
374
|
+
};
|
|
375
|
+
owner: string;
|
|
376
|
+
disposition: ProposalDisposition;
|
|
240
377
|
/**
|
|
241
|
-
*
|
|
378
|
+
* Structured ACP v2 permission subject for the proposed operation.
|
|
242
379
|
*/
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
/**
|
|
260
|
-
* Optional HTTP request headers owned by this operand's addressed endpoint; null when omitted.
|
|
261
|
-
*/
|
|
262
|
-
headers: ({
|
|
263
|
-
[k: string]: string;
|
|
264
|
-
} | null);
|
|
265
|
-
lineMarker: (TextLineMarker | null);
|
|
266
|
-
/**
|
|
267
|
-
* Optional selection matcher on the source operand; refused by the owner on a destination.
|
|
268
|
-
*/
|
|
269
|
-
matcher: (MatcherBody | null);
|
|
270
|
-
}
|
|
271
|
-
export interface MoveStatement {
|
|
272
|
-
op: "move";
|
|
273
|
-
aside: (string | null);
|
|
274
|
-
source: ResourceSelection;
|
|
275
|
-
destination: ResourceSelection;
|
|
276
|
-
position: Position;
|
|
277
|
-
}
|
|
278
|
-
export interface SendStatement {
|
|
279
|
-
op: "send";
|
|
280
|
-
aside: (string | null);
|
|
281
|
-
/**
|
|
282
|
-
* Optional HTTP request headers (`{ [name: string]: string }`); null when omitted.
|
|
283
|
-
*/
|
|
284
|
-
headers: ({
|
|
285
|
-
[k: string]: string;
|
|
286
|
-
} | null);
|
|
380
|
+
subject?: ({
|
|
381
|
+
type: "command";
|
|
382
|
+
command: string;
|
|
383
|
+
cwd: string;
|
|
384
|
+
} | {
|
|
385
|
+
type: "tool_call";
|
|
386
|
+
kind: ("read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | "other");
|
|
387
|
+
title: string;
|
|
388
|
+
locations?: {
|
|
389
|
+
path: string;
|
|
390
|
+
}[];
|
|
391
|
+
diff?: {
|
|
392
|
+
path: string;
|
|
393
|
+
patch: string;
|
|
394
|
+
};
|
|
395
|
+
});
|
|
287
396
|
/**
|
|
288
|
-
*
|
|
397
|
+
* When the gate stops waiting and core cancels it (ISO 8601); absent while it waits indefinitely.
|
|
289
398
|
*/
|
|
290
|
-
|
|
291
|
-
target: (ParsedPath | null);
|
|
292
|
-
lineMarker: null;
|
|
293
|
-
body: (SendBody | null);
|
|
294
|
-
position: Position;
|
|
399
|
+
expiresAt?: string;
|
|
295
400
|
}
|
|
296
401
|
/**
|
|
297
|
-
*
|
|
402
|
+
* The runtime-neutral client-interface projection of one pending client interaction. Live delivery and reconnect discovery expose this same shape.
|
|
298
403
|
*/
|
|
299
|
-
export interface
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
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 {
|
|
328
|
-
/**
|
|
329
|
-
* 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.
|
|
330
|
-
*/
|
|
331
|
-
runtime: Lowercase<string>;
|
|
332
|
-
/**
|
|
333
|
-
* Never present: an execution is named by its runtime.
|
|
334
|
-
*/
|
|
335
|
-
op?: never;
|
|
336
|
-
aside: (string | null);
|
|
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;
|
|
358
|
-
}
|
|
359
|
-
export interface ForkStatement {
|
|
360
|
-
op: "fork";
|
|
361
|
-
aside: (string | null);
|
|
362
|
-
target: (ParsedPath | null);
|
|
363
|
-
lineMarker: null;
|
|
364
|
-
body: string;
|
|
365
|
-
position: Position;
|
|
366
|
-
}
|
|
367
|
-
export interface KillStatement {
|
|
368
|
-
op: "kill";
|
|
369
|
-
aside: (string | null);
|
|
370
|
-
/**
|
|
371
|
-
* Optional HTTP request headers (`{ [name: string]: string }`); null when omitted.
|
|
372
|
-
*/
|
|
373
|
-
headers: ({
|
|
374
|
-
[k: string]: string;
|
|
375
|
-
} | null);
|
|
376
|
-
/**
|
|
377
|
-
* Optional confirmation for remote HTTP DELETE (`true`); null when omitted.
|
|
378
|
-
*/
|
|
379
|
-
remote: (boolean | null);
|
|
380
|
-
target: (ParsedPath | null);
|
|
381
|
-
/**
|
|
382
|
-
* Scope of the kill: lines of a log body or of an entry ({§op-shapes}); null kills the whole target.
|
|
383
|
-
*/
|
|
384
|
-
lineMarker: (TextLineMarker | null);
|
|
385
|
-
/**
|
|
386
|
-
* The selection matcher lifted from the `pattern` option ({§parse-recovery}); null when omitted.
|
|
387
|
-
*/
|
|
388
|
-
matcher: (MatcherBody | null);
|
|
389
|
-
/**
|
|
390
|
-
* 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}).
|
|
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;
|
|
404
|
+
export interface Terminated {
|
|
405
|
+
sessionId: number;
|
|
406
|
+
loopId: number;
|
|
407
|
+
loopSeq: number;
|
|
408
|
+
result: OperationResult;
|
|
409
|
+
hitMaxTurns: boolean;
|
|
410
|
+
turnIds: number[];
|
|
411
|
+
attributions: string[];
|
|
412
|
+
terminatedAt: number;
|
|
413
|
+
usage: {
|
|
414
|
+
accounting: ProviderAccounting;
|
|
415
|
+
curationWeight: (number | null);
|
|
416
|
+
curationBudget: (number | null);
|
|
417
|
+
contextTokens: (number | null);
|
|
418
|
+
contextCapacity: (number | null);
|
|
419
|
+
meta: {
|
|
420
|
+
[k: string]: unknown;
|
|
421
|
+
};
|
|
422
|
+
};
|
|
414
423
|
}
|
|
415
424
|
/**
|
|
416
425
|
* 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.
|
|
@@ -459,105 +468,177 @@ export interface RangeExtent {
|
|
|
459
468
|
requested: RequestedRange;
|
|
460
469
|
returned?: ReturnedRange;
|
|
461
470
|
}
|
|
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
471
|
/**
|
|
479
|
-
*
|
|
472
|
+
* Ordered physical provider-request evidence and its deterministic aggregate projection.
|
|
480
473
|
*/
|
|
481
|
-
export interface
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
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;
|
|
474
|
+
export interface ProviderAccounting {
|
|
475
|
+
requests: ProviderRequestAccounting[];
|
|
476
|
+
usage: (ProviderUsage | null);
|
|
477
|
+
knownUsage: (ProviderUsage | null);
|
|
478
|
+
knownCostUsd: (string | null);
|
|
479
|
+
costUsd: (string | null);
|
|
499
480
|
}
|
|
500
481
|
/**
|
|
501
|
-
*
|
|
482
|
+
* The normalized accounting disposition of one physical provider request.
|
|
502
483
|
*/
|
|
503
|
-
export
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
}
|
|
511
|
-
toolName: string;
|
|
512
|
-
mode: "url";
|
|
513
|
-
message: string;
|
|
514
|
-
elicitationId: string;
|
|
515
|
-
url: string;
|
|
516
|
-
});
|
|
484
|
+
export interface ProviderRequestAccounting {
|
|
485
|
+
provider: string;
|
|
486
|
+
model: string;
|
|
487
|
+
outcome: ("response" | "error");
|
|
488
|
+
status?: number;
|
|
489
|
+
usage?: ProviderUsage;
|
|
490
|
+
cost: ProviderCost;
|
|
491
|
+
}
|
|
517
492
|
/**
|
|
518
|
-
*
|
|
493
|
+
* 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.
|
|
519
494
|
*/
|
|
520
|
-
export interface
|
|
521
|
-
|
|
495
|
+
export interface ProviderUsage {
|
|
496
|
+
inputTokens?: number;
|
|
497
|
+
outputTokens?: number;
|
|
498
|
+
totalTokens?: number;
|
|
499
|
+
inputTokenDetails?: {
|
|
500
|
+
noCacheTokens?: number;
|
|
501
|
+
cacheReadTokens?: number;
|
|
502
|
+
cacheWriteTokens?: number;
|
|
503
|
+
};
|
|
504
|
+
outputTokenDetails?: {
|
|
505
|
+
textTokens?: number;
|
|
506
|
+
reasoningTokens?: number;
|
|
507
|
+
};
|
|
508
|
+
}
|
|
509
|
+
export interface MonetaryAmount {
|
|
510
|
+
amount: string;
|
|
511
|
+
currency: string;
|
|
512
|
+
}
|
|
513
|
+
export interface LogEntry {
|
|
514
|
+
entry: {
|
|
515
|
+
id: number;
|
|
516
|
+
sessionId: number;
|
|
517
|
+
sessionName: string;
|
|
518
|
+
loopId: number;
|
|
519
|
+
loopSeq: number;
|
|
520
|
+
turnId: number;
|
|
521
|
+
turnSeq: number;
|
|
522
|
+
sequence: number;
|
|
523
|
+
at: string;
|
|
524
|
+
origin: string;
|
|
525
|
+
source: (string | null);
|
|
526
|
+
op: (string | null);
|
|
527
|
+
scheme: (string | null);
|
|
528
|
+
username: (string | null);
|
|
529
|
+
password: (string | null);
|
|
530
|
+
hostname: (string | null);
|
|
531
|
+
port: (number | null);
|
|
532
|
+
pathname: (string | null);
|
|
533
|
+
query: (string | null);
|
|
534
|
+
fragment: (string | null);
|
|
535
|
+
signal: unknown;
|
|
536
|
+
lineMarker: unknown;
|
|
537
|
+
tx: unknown;
|
|
538
|
+
mimetypeTx: string;
|
|
539
|
+
rx: unknown;
|
|
540
|
+
mimetypeRx: string;
|
|
541
|
+
statusRx: number;
|
|
542
|
+
weight: number;
|
|
543
|
+
attrs: unknown;
|
|
544
|
+
state: ("proposed" | "resolved" | "failed" | "cancelled");
|
|
545
|
+
reasoning?: string;
|
|
546
|
+
reasoningModelCallId?: number;
|
|
547
|
+
reasoningRequestSequence?: number;
|
|
548
|
+
invocation?: string;
|
|
549
|
+
answering?: string;
|
|
550
|
+
repliedToSources?: string[];
|
|
551
|
+
};
|
|
552
|
+
}
|
|
553
|
+
export interface StreamConcluded {
|
|
522
554
|
sessionId: number;
|
|
555
|
+
entryId: number;
|
|
556
|
+
target: string;
|
|
557
|
+
subscriptionId: number;
|
|
558
|
+
result: OperationResult;
|
|
559
|
+
scheme: string;
|
|
560
|
+
summary: string;
|
|
561
|
+
wakeAction: string;
|
|
562
|
+
loopSeq?: number;
|
|
563
|
+
turnSeq?: number;
|
|
564
|
+
sequence?: number;
|
|
565
|
+
}
|
|
566
|
+
export interface NoticeEvent {
|
|
567
|
+
sessionId: (number | null);
|
|
523
568
|
loopId: number;
|
|
524
|
-
|
|
525
|
-
recipient: string;
|
|
526
|
-
request: ClientInteractionRequest;
|
|
569
|
+
notice: Notice;
|
|
527
570
|
}
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
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 {
|
|
571
|
+
/**
|
|
572
|
+
* 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.
|
|
573
|
+
*/
|
|
574
|
+
export interface Notice {
|
|
548
575
|
/**
|
|
549
|
-
*
|
|
576
|
+
* Producer identifier. Top-level for self-contained subsystems; colon-namespaced for parameterized producers such as `provider:openai` or `exec:search`.
|
|
550
577
|
*/
|
|
551
|
-
|
|
552
|
-
target: string;
|
|
578
|
+
source: string;
|
|
553
579
|
/**
|
|
554
|
-
*
|
|
580
|
+
* Open discriminator within a source. Examples include `output_unaccounted`, `search_progress`, and `turn_awaiting_model`.
|
|
555
581
|
*/
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
582
|
+
kind: string;
|
|
583
|
+
/**
|
|
584
|
+
* Display severity set by the producer. It does not make the Notice a durable operation result.
|
|
585
|
+
*/
|
|
586
|
+
level: ("error" | "warn" | "info");
|
|
587
|
+
/**
|
|
588
|
+
* 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`.
|
|
589
|
+
*/
|
|
590
|
+
directive?: string;
|
|
591
|
+
/**
|
|
592
|
+
* Optional terse, factual display message.
|
|
593
|
+
*/
|
|
594
|
+
message?: (string | null);
|
|
595
|
+
/**
|
|
596
|
+
* Optional typed position for an observation. ContentOffset points into model output; LogCoordinate points at a durable log row without replacing it.
|
|
597
|
+
*/
|
|
598
|
+
position?: (ContentOffset | LogCoordinate | null);
|
|
599
|
+
[k: string]: unknown;
|
|
600
|
+
}
|
|
601
|
+
/**
|
|
602
|
+
* 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.
|
|
603
|
+
*/
|
|
604
|
+
export interface ContentOffset {
|
|
605
|
+
type: "content-offset";
|
|
606
|
+
line: number;
|
|
607
|
+
column: number;
|
|
608
|
+
}
|
|
609
|
+
export interface LogCoordinate {
|
|
610
|
+
type: "log-coordinate";
|
|
611
|
+
/**
|
|
612
|
+
* Log row identity, typically `log:///<loop>/<turn>/<sequence>`.
|
|
613
|
+
*/
|
|
614
|
+
coordinate: string;
|
|
615
|
+
/**
|
|
616
|
+
* Optional op token (find/read/edit/...) at the coordinate, for human-readable rendering.
|
|
617
|
+
*/
|
|
618
|
+
op?: string;
|
|
619
|
+
}
|
|
620
|
+
export type EntryReadResult = ({
|
|
621
|
+
status: 200;
|
|
622
|
+
entry: ClientEntry;
|
|
623
|
+
} | {
|
|
624
|
+
status: number;
|
|
625
|
+
problem: ProblemDetails;
|
|
626
|
+
entry: null;
|
|
627
|
+
});
|
|
628
|
+
export interface ClientEntry {
|
|
629
|
+
/**
|
|
630
|
+
* The stored entry's durable identifier, or null for a representation core computes.
|
|
631
|
+
*/
|
|
632
|
+
entryId: (number | null);
|
|
633
|
+
target: string;
|
|
634
|
+
/**
|
|
635
|
+
* Each channel by name; the empty name is the unnamed default channel of a scheme whose default is unnamed.
|
|
636
|
+
*/
|
|
637
|
+
channels: {
|
|
638
|
+
[k: string]: ClientEntryChannel;
|
|
639
|
+
};
|
|
640
|
+
}
|
|
641
|
+
export interface ClientEntryChannel {
|
|
561
642
|
content: string;
|
|
562
643
|
contentOffset: number;
|
|
563
644
|
contentLength: number;
|
|
@@ -574,6 +655,10 @@ export interface FunctionalityCandidate {
|
|
|
574
655
|
*/
|
|
575
656
|
alias?: string;
|
|
576
657
|
summary?: string;
|
|
658
|
+
/**
|
|
659
|
+
* Optional family-owned structured presentation facts (for example a members preview's match counts and sample paths). Never credentials, never authority.
|
|
660
|
+
*/
|
|
661
|
+
detail?: {};
|
|
577
662
|
/**
|
|
578
663
|
* The exact family definition, conforming to the family's definition schema.
|
|
579
664
|
*/
|
|
@@ -627,17 +712,46 @@ export interface FunctionalityDiscoverQuery {
|
|
|
627
712
|
* Caller-supplied configuration material the family interprets as candidates (a client's own PLURNK_SCHEDULE_* environment, a local directory list). It contributes candidates with client-configuration provenance; it never becomes durable authority.
|
|
628
713
|
*/
|
|
629
714
|
configuration?: {};
|
|
715
|
+
/**
|
|
716
|
+
* Opaque continuation cursor returned by a previous discover page.
|
|
717
|
+
*/
|
|
718
|
+
cursor?: string;
|
|
719
|
+
/**
|
|
720
|
+
* Maximum number of candidates or preview items to return on one page.
|
|
721
|
+
*/
|
|
722
|
+
limit?: number;
|
|
630
723
|
}
|
|
631
724
|
export interface FunctionalityDiscoverResult {
|
|
632
725
|
family: string;
|
|
633
726
|
candidates: FunctionalityCandidate[];
|
|
727
|
+
total?: number;
|
|
728
|
+
nextCursor?: string;
|
|
634
729
|
}
|
|
635
730
|
/**
|
|
636
731
|
* One inert discovery result: an exact family definition with its provenance. Discovery never installs, persists, enables, or executes it.
|
|
637
732
|
*/
|
|
733
|
+
export interface FunctionalityListQuery {
|
|
734
|
+
/**
|
|
735
|
+
* Case-insensitive substring filter over alias, provenance, and non-secret definition metadata.
|
|
736
|
+
*/
|
|
737
|
+
query?: string;
|
|
738
|
+
/**
|
|
739
|
+
* Filter by current preparation or enablement state.
|
|
740
|
+
*/
|
|
741
|
+
state?: ("disabled" | "dormant" | "active" | "unavailable" | "authorization-required");
|
|
742
|
+
/**
|
|
743
|
+
* Filter by definition ownership.
|
|
744
|
+
*/
|
|
745
|
+
origin?: ("service" | "workspace" | "session");
|
|
746
|
+
offset?: number;
|
|
747
|
+
limit?: number;
|
|
748
|
+
}
|
|
638
749
|
export interface FunctionalityListResult {
|
|
639
750
|
family: string;
|
|
640
751
|
definitions: FunctionalityDefinitionState[];
|
|
752
|
+
offset: number;
|
|
753
|
+
total: number;
|
|
754
|
+
nextOffset?: number;
|
|
641
755
|
}
|
|
642
756
|
/**
|
|
643
757
|
* The winning configuration input, when supplied by a source reader. Independent of origin and readiness; absent for locally owned definitions or host-provided resources without a configuration input.
|
|
@@ -666,6 +780,66 @@ export interface FunctionalityPreparationActivity {
|
|
|
666
780
|
phase: ("preparing" | "publishing");
|
|
667
781
|
since: string;
|
|
668
782
|
}
|
|
783
|
+
export interface LineMarker {
|
|
784
|
+
/**
|
|
785
|
+
* @minItems 1
|
|
786
|
+
*/
|
|
787
|
+
marks: [number, ...(number)[]];
|
|
788
|
+
}
|
|
789
|
+
export type MatcherBody = (XPathBody | RegexBody | JsonPathBody | FtsBody | GraphBody | GlobBody | UnreadableBody);
|
|
790
|
+
/**
|
|
791
|
+
* XPath 1.0 expression. Validated at parse time via the xpath library.
|
|
792
|
+
*/
|
|
793
|
+
export interface XPathBody {
|
|
794
|
+
dialect: "xpath";
|
|
795
|
+
raw: string;
|
|
796
|
+
}
|
|
797
|
+
/**
|
|
798
|
+
* 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.
|
|
799
|
+
*/
|
|
800
|
+
export interface RegexBody {
|
|
801
|
+
dialect: "regex";
|
|
802
|
+
raw: string;
|
|
803
|
+
pattern: string;
|
|
804
|
+
flags: string;
|
|
805
|
+
}
|
|
806
|
+
/**
|
|
807
|
+
* RFC 9535 JSONPath expression. Compiled at parse time with json-p3, the same engine used for runtime matching.
|
|
808
|
+
*/
|
|
809
|
+
export interface JsonPathBody {
|
|
810
|
+
dialect: "jsonpath";
|
|
811
|
+
raw: string;
|
|
812
|
+
}
|
|
813
|
+
/**
|
|
814
|
+
* Native SQLite FTS5 query after the `~` prefix. SQLite owns query validation, tokenization, matching and ranking; the statement's scope selects ordinary result positions.
|
|
815
|
+
*/
|
|
816
|
+
export interface FtsBody {
|
|
817
|
+
dialect: "fts";
|
|
818
|
+
raw: string;
|
|
819
|
+
}
|
|
820
|
+
/**
|
|
821
|
+
* 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.
|
|
822
|
+
*/
|
|
823
|
+
export interface GraphBody {
|
|
824
|
+
dialect: "graph";
|
|
825
|
+
raw: string;
|
|
826
|
+
}
|
|
827
|
+
/**
|
|
828
|
+
* Pattern with no dialect prefix; treated as a glob/literal match.
|
|
829
|
+
*/
|
|
830
|
+
export interface GlobBody {
|
|
831
|
+
dialect: "glob";
|
|
832
|
+
raw: string;
|
|
833
|
+
}
|
|
834
|
+
/**
|
|
835
|
+
* 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.
|
|
836
|
+
*/
|
|
837
|
+
export interface UnreadableBody {
|
|
838
|
+
dialect: "unreadable";
|
|
839
|
+
raw: string;
|
|
840
|
+
message: string;
|
|
841
|
+
recovery: string;
|
|
842
|
+
}
|
|
669
843
|
export type McpOAuth = ({
|
|
670
844
|
type: "oauth";
|
|
671
845
|
redirectUrl?: string;
|
|
@@ -803,6 +977,10 @@ export interface ModelCatalogPage {
|
|
|
803
977
|
offset: number;
|
|
804
978
|
total: number;
|
|
805
979
|
nextOffset?: number;
|
|
980
|
+
/**
|
|
981
|
+
* Sorted unique provider ids available in this availability-scoped catalog.
|
|
982
|
+
*/
|
|
983
|
+
providers?: string[];
|
|
806
984
|
}
|
|
807
985
|
export interface ModelCatalogEntry {
|
|
808
986
|
selector: string;
|
|
@@ -857,62 +1035,34 @@ export interface ModelCatalogQuery {
|
|
|
857
1035
|
offset?: number;
|
|
858
1036
|
limit?: number;
|
|
859
1037
|
}
|
|
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
|
-
}
|
|
1038
|
+
export type ParsedPath = (LocalPath | UrlPath);
|
|
897
1039
|
/**
|
|
898
|
-
* A
|
|
1040
|
+
* 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
1041
|
*/
|
|
900
|
-
export interface
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
1042
|
+
export interface LocalPath {
|
|
1043
|
+
kind: "local";
|
|
1044
|
+
raw: string;
|
|
1045
|
+
fragment?: (string | null);
|
|
904
1046
|
}
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
1047
|
+
/**
|
|
1048
|
+
* A path with a `scheme://` prefix, fully decomposed via WHATWG URL.
|
|
1049
|
+
*/
|
|
1050
|
+
export interface UrlPath {
|
|
1051
|
+
kind: "url";
|
|
1052
|
+
raw: string;
|
|
1053
|
+
scheme: string;
|
|
1054
|
+
username: (string | null);
|
|
1055
|
+
password: (string | null);
|
|
1056
|
+
hostname: (string | null);
|
|
1057
|
+
port: (number | null);
|
|
1058
|
+
pathname: string;
|
|
911
1059
|
/**
|
|
912
|
-
*
|
|
1060
|
+
* 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
1061
|
*/
|
|
914
|
-
|
|
1062
|
+
query: (string | null);
|
|
1063
|
+
fragment: (string | null);
|
|
915
1064
|
}
|
|
1065
|
+
export type PlurnkStatement = (FindStatement | ReadStatement | EditStatement | CopyStatement | MoveStatement | SendStatement | DoneStatement | FailStatement | ExecStatement | BareStatement | WorkStatement | ForkStatement | KillStatement | DispositionStatement | NoteStatement);
|
|
916
1066
|
export type AsideOrNull = (string | null);
|
|
917
1067
|
/**
|
|
918
1068
|
* Optional HTTP request headers (`{ [name: string]: string }`); null when omitted.
|
|
@@ -934,6 +1084,221 @@ export type TextLineMarkerOrNull = (TextLineMarker | null);
|
|
|
934
1084
|
*/
|
|
935
1085
|
export type AttachmentsOrNull = (string[] | null);
|
|
936
1086
|
export type SendBodyOrNull = (SendBody | null);
|
|
1087
|
+
export interface FindStatement {
|
|
1088
|
+
op: "find";
|
|
1089
|
+
aside: AsideOrNull;
|
|
1090
|
+
headers: HeadersOrNull;
|
|
1091
|
+
target: PathOrNull;
|
|
1092
|
+
lineMarker: LineMarkerOrNull;
|
|
1093
|
+
/**
|
|
1094
|
+
* The selection matcher lifted from the `pattern` option ({§parse-recovery}); null when omitted.
|
|
1095
|
+
*/
|
|
1096
|
+
matcher: (MatcherBody | null);
|
|
1097
|
+
/**
|
|
1098
|
+
* Retrieval bodies normalize to separate `note` statements; selection belongs to the options ({§op-shapes}).
|
|
1099
|
+
*/
|
|
1100
|
+
body: null;
|
|
1101
|
+
position: Position;
|
|
1102
|
+
}
|
|
1103
|
+
/**
|
|
1104
|
+
* 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.
|
|
1105
|
+
*/
|
|
1106
|
+
export interface Position {
|
|
1107
|
+
line: number;
|
|
1108
|
+
column: number;
|
|
1109
|
+
}
|
|
1110
|
+
export interface ReadStatement {
|
|
1111
|
+
op: "read";
|
|
1112
|
+
aside: AsideOrNull;
|
|
1113
|
+
headers: HeadersOrNull;
|
|
1114
|
+
target: PathOrNull;
|
|
1115
|
+
lineMarker: TextLineMarkerOrNull;
|
|
1116
|
+
/**
|
|
1117
|
+
* The selection matcher lifted from the `pattern` option ({§parse-recovery}); null when omitted.
|
|
1118
|
+
*/
|
|
1119
|
+
matcher: (MatcherBody | null);
|
|
1120
|
+
body: null;
|
|
1121
|
+
position: Position;
|
|
1122
|
+
}
|
|
1123
|
+
/**
|
|
1124
|
+
* 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.
|
|
1125
|
+
*/
|
|
1126
|
+
export interface TextLineMarker {
|
|
1127
|
+
/**
|
|
1128
|
+
* @minItems 1
|
|
1129
|
+
*/
|
|
1130
|
+
marks: [(number | string), ...((number | string))[]];
|
|
1131
|
+
}
|
|
1132
|
+
export interface EditStatement {
|
|
1133
|
+
op: "edit";
|
|
1134
|
+
aside: AsideOrNull;
|
|
1135
|
+
headers: HeadersOrNull;
|
|
1136
|
+
target: PathOrNull;
|
|
1137
|
+
lineMarker: TextLineMarkerOrNull;
|
|
1138
|
+
/**
|
|
1139
|
+
* The selection matcher lifted from the `pattern` option ({§parse-recovery}); null when omitted.
|
|
1140
|
+
*/
|
|
1141
|
+
matcher: (MatcherBody | null);
|
|
1142
|
+
body: (string | null);
|
|
1143
|
+
position: Position;
|
|
1144
|
+
}
|
|
1145
|
+
export interface CopyStatement {
|
|
1146
|
+
op: "copy";
|
|
1147
|
+
aside: AsideOrNull;
|
|
1148
|
+
source: ResourceSelection;
|
|
1149
|
+
destination: ResourceSelection;
|
|
1150
|
+
position: Position;
|
|
1151
|
+
}
|
|
1152
|
+
/**
|
|
1153
|
+
* 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.
|
|
1154
|
+
*/
|
|
1155
|
+
export interface ResourceSelection {
|
|
1156
|
+
target: ParsedPath;
|
|
1157
|
+
/**
|
|
1158
|
+
* Optional HTTP request headers owned by this operand's addressed endpoint; null when omitted.
|
|
1159
|
+
*/
|
|
1160
|
+
headers: ({
|
|
1161
|
+
[k: string]: string;
|
|
1162
|
+
} | null);
|
|
1163
|
+
lineMarker: (TextLineMarker | null);
|
|
1164
|
+
/**
|
|
1165
|
+
* Optional selection matcher on the source operand; refused by the owner on a destination.
|
|
1166
|
+
*/
|
|
1167
|
+
matcher: (MatcherBody | null);
|
|
1168
|
+
}
|
|
1169
|
+
export interface MoveStatement {
|
|
1170
|
+
op: "move";
|
|
1171
|
+
aside: AsideOrNull;
|
|
1172
|
+
source: ResourceSelection;
|
|
1173
|
+
destination: ResourceSelection;
|
|
1174
|
+
position: Position;
|
|
1175
|
+
}
|
|
1176
|
+
export interface SendStatement {
|
|
1177
|
+
op: "send";
|
|
1178
|
+
aside: AsideOrNull;
|
|
1179
|
+
headers: HeadersOrNull;
|
|
1180
|
+
attachments: AttachmentsOrNull;
|
|
1181
|
+
target: PathOrNull;
|
|
1182
|
+
lineMarker: null;
|
|
1183
|
+
body: SendBodyOrNull;
|
|
1184
|
+
actor?: (string | null);
|
|
1185
|
+
position: Position;
|
|
1186
|
+
}
|
|
1187
|
+
/**
|
|
1188
|
+
* 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.
|
|
1189
|
+
*/
|
|
1190
|
+
export interface SendBody {
|
|
1191
|
+
raw: string;
|
|
1192
|
+
json: unknown;
|
|
1193
|
+
}
|
|
1194
|
+
export interface DoneStatement {
|
|
1195
|
+
op: "done";
|
|
1196
|
+
aside: AsideOrNull;
|
|
1197
|
+
attachments: AttachmentsOrNull;
|
|
1198
|
+
target: PathOrNull;
|
|
1199
|
+
lineMarker: null;
|
|
1200
|
+
body: SendBodyOrNull;
|
|
1201
|
+
position: Position;
|
|
1202
|
+
}
|
|
1203
|
+
export interface FailStatement {
|
|
1204
|
+
op: "fail";
|
|
1205
|
+
aside: AsideOrNull;
|
|
1206
|
+
attachments: AttachmentsOrNull;
|
|
1207
|
+
target: PathOrNull;
|
|
1208
|
+
lineMarker: null;
|
|
1209
|
+
body: SendBodyOrNull;
|
|
1210
|
+
position: Position;
|
|
1211
|
+
}
|
|
1212
|
+
export interface ExecStatement {
|
|
1213
|
+
/**
|
|
1214
|
+
* 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.
|
|
1215
|
+
*/
|
|
1216
|
+
runtime: Lowercase<string>;
|
|
1217
|
+
/**
|
|
1218
|
+
* Never present: an execution is named by its runtime.
|
|
1219
|
+
*/
|
|
1220
|
+
op?: never;
|
|
1221
|
+
aside: AsideOrNull;
|
|
1222
|
+
target: PathOrNull;
|
|
1223
|
+
cwd?: (string | null);
|
|
1224
|
+
/**
|
|
1225
|
+
* Optional per-invocation environment variables (`{ [name: string]: string }`).
|
|
1226
|
+
*/
|
|
1227
|
+
env?: Readonly<Record<string, string>>;
|
|
1228
|
+
lineMarker: LineMarkerOrNull;
|
|
1229
|
+
body: (string | null);
|
|
1230
|
+
position: Position;
|
|
1231
|
+
}
|
|
1232
|
+
export interface BareStatement {
|
|
1233
|
+
op: "bare";
|
|
1234
|
+
aside: AsideOrNull;
|
|
1235
|
+
target: PathOrNull;
|
|
1236
|
+
lineMarker: null;
|
|
1237
|
+
body: string;
|
|
1238
|
+
position: Position;
|
|
1239
|
+
}
|
|
1240
|
+
export interface WorkStatement {
|
|
1241
|
+
op: "work";
|
|
1242
|
+
aside: AsideOrNull;
|
|
1243
|
+
target: PathOrNull;
|
|
1244
|
+
lineMarker: null;
|
|
1245
|
+
body: string;
|
|
1246
|
+
persona?: string;
|
|
1247
|
+
model?: string;
|
|
1248
|
+
effort?: string;
|
|
1249
|
+
position: Position;
|
|
1250
|
+
}
|
|
1251
|
+
export interface ForkStatement {
|
|
1252
|
+
op: "fork";
|
|
1253
|
+
aside: AsideOrNull;
|
|
1254
|
+
target: PathOrNull;
|
|
1255
|
+
lineMarker: null;
|
|
1256
|
+
body: string;
|
|
1257
|
+
persona?: string;
|
|
1258
|
+
model?: string;
|
|
1259
|
+
effort?: string;
|
|
1260
|
+
position: Position;
|
|
1261
|
+
}
|
|
1262
|
+
export interface KillStatement {
|
|
1263
|
+
op: "kill";
|
|
1264
|
+
aside: AsideOrNull;
|
|
1265
|
+
headers: HeadersOrNull;
|
|
1266
|
+
/**
|
|
1267
|
+
* Optional confirmation for remote HTTP DELETE (`true`); null when omitted.
|
|
1268
|
+
*/
|
|
1269
|
+
remote: (boolean | null);
|
|
1270
|
+
target: PathOrNull;
|
|
1271
|
+
/**
|
|
1272
|
+
* Scope of the kill: lines of a log body or of an entry ({§op-shapes}); null kills the whole target.
|
|
1273
|
+
*/
|
|
1274
|
+
lineMarker: (TextLineMarker | null);
|
|
1275
|
+
/**
|
|
1276
|
+
* The selection matcher lifted from the `pattern` option ({§parse-recovery}); null when omitted.
|
|
1277
|
+
*/
|
|
1278
|
+
matcher: (MatcherBody | null);
|
|
1279
|
+
body: null;
|
|
1280
|
+
position: Position;
|
|
1281
|
+
}
|
|
1282
|
+
export interface DispositionStatement {
|
|
1283
|
+
op: "wait";
|
|
1284
|
+
aside: AsideOrNull;
|
|
1285
|
+
target: PathOrNull;
|
|
1286
|
+
lineMarker: null;
|
|
1287
|
+
/**
|
|
1288
|
+
* Optional maximum park duration from `timeout` option; zero continues without parking.
|
|
1289
|
+
*/
|
|
1290
|
+
seconds: (number | null);
|
|
1291
|
+
body: (string | null);
|
|
1292
|
+
position: Position;
|
|
1293
|
+
}
|
|
1294
|
+
export interface NoteStatement {
|
|
1295
|
+
op: "note";
|
|
1296
|
+
aside: AsideOrNull;
|
|
1297
|
+
target: null;
|
|
1298
|
+
lineMarker: null;
|
|
1299
|
+
body: (string | null);
|
|
1300
|
+
position: Position;
|
|
1301
|
+
}
|
|
937
1302
|
export interface ProblemProjection {
|
|
938
1303
|
/**
|
|
939
1304
|
* Absolute URI identifying the stable problem class.
|
|
@@ -960,124 +1325,7 @@ export interface ProblemProjection {
|
|
|
960
1325
|
instance?: never;
|
|
961
1326
|
[k: string]: unknown;
|
|
962
1327
|
}
|
|
963
|
-
export type ProposalDisposition = ({
|
|
964
|
-
decision: "review";
|
|
965
|
-
} | {
|
|
966
|
-
decision: ("accept" | "reject");
|
|
967
|
-
outcome?: string;
|
|
968
|
-
});
|
|
969
1328
|
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
1329
|
export type DecimalAmount = string;
|
|
1082
1330
|
export type NonEmptyString = string;
|
|
1083
1331
|
export type Tokens = number;
|