@eum-agent/plugin 0.0.0-stage → 1.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/dist/index-Br0Y0fFq.d.ts +26296 -0
- package/dist/index-D_4mmloq.d.ts +7835 -0
- package/dist/index.d.ts +6 -0
- package/dist/platform-files-pahy7W9H.d.ts +145 -0
- package/dist/platform-files.d.ts +2 -0
- package/dist/platform-resources-Cyx3HWbC.d.ts +1114 -0
- package/dist/platform-resources.d.ts +2 -0
- package/dist/platform.d.ts +2 -0
- package/dist/storage-CpsDibqp.d.ts +1 -0
- package/dist/storage-nG0zpW52.d.ts +878 -0
- package/dist/storage.d.ts +3 -0
- package/dist/web.d.ts +3 -0
- package/package.json +52 -3
- package/ui-build.md +95 -0
- package/README.md +0 -3
|
@@ -0,0 +1,878 @@
|
|
|
1
|
+
import { At as InboxDetail, Ci as ReadingItemHeader, Di as ReadingTurnHeader, Ei as ReadingPartHeader, Ft as InboxSettleReason, Ga as SessionId, Ka as SessionAddress, Sa as StoredEvent, Ti as ReadingMessageHeader, Ui as AuthorizationRecord, Ur as TriggerScopeItem, Ut as ModelRef, Va as Phase, ei as WatchSessionSummary, fo as RecordableEvent, gi as HistoryWindow, hi as HistoryView, jt as InboxItem, ko as Message, kt as InboxDelivery, la as Outcome, mi as ContentScope, pi as ContentRef, xa as EventStore } from "./index-Br0Y0fFq.js";
|
|
2
|
+
//#region node_modules/.cache/dts/plugin/src/storage/reading-store.d.ts
|
|
3
|
+
/** An indexed source namespace; history, summary and receipts have separate lifetimes. */
|
|
4
|
+
interface ReadingIdentity {
|
|
5
|
+
readonly sessionId: string;
|
|
6
|
+
readonly kind: 'history' | 'summary' | 'operation';
|
|
7
|
+
readonly scopeId: string;
|
|
8
|
+
}
|
|
9
|
+
/** A physical build identity, never a wire protocol version. */
|
|
10
|
+
interface ReadingBuildIdentity extends ReadingIdentity {
|
|
11
|
+
readonly buildId: string;
|
|
12
|
+
readonly sourceToken: string;
|
|
13
|
+
readonly historyGeneration: number;
|
|
14
|
+
readonly sourceSeq: number;
|
|
15
|
+
readonly sourceSha256: string;
|
|
16
|
+
}
|
|
17
|
+
/** Current cache status, including its bounded control projection. */
|
|
18
|
+
interface ReadingStatus {
|
|
19
|
+
readonly identity: ReadingBuildIdentity;
|
|
20
|
+
readonly ready: boolean;
|
|
21
|
+
readonly nextOrdinal: number;
|
|
22
|
+
readonly patchSeq: number;
|
|
23
|
+
readonly control: ReadingControl;
|
|
24
|
+
readonly summary?: WatchSessionSummary;
|
|
25
|
+
}
|
|
26
|
+
/** Persisted control facts omit all potentially unbounded request bodies. */
|
|
27
|
+
interface ReadingControl {
|
|
28
|
+
readonly phase: Phase;
|
|
29
|
+
readonly tokensUsed: number;
|
|
30
|
+
/** Latest committed context revision and auxiliary usage, without original source text. */
|
|
31
|
+
readonly contextRevision: number;
|
|
32
|
+
readonly contextAuxiliaryTokens: number;
|
|
33
|
+
/** Effective tool pairing facts; immutable tool IDs stay in indexed descriptors. */
|
|
34
|
+
readonly historyToolsValid?: boolean;
|
|
35
|
+
/** Number of unmatched calls on the effective path, defaulting to zero. */
|
|
36
|
+
readonly pendingToolCount?: number;
|
|
37
|
+
/** Next effective tool-link ordinal, shared by calls, results and Widget descriptors. */
|
|
38
|
+
readonly toolLinkCount?: number;
|
|
39
|
+
readonly waitCollectionId?: string;
|
|
40
|
+
readonly waitCount: number;
|
|
41
|
+
readonly waitRemaining: number;
|
|
42
|
+
readonly turnId?: string;
|
|
43
|
+
readonly turnCount: number;
|
|
44
|
+
readonly answeredCount: number;
|
|
45
|
+
readonly participantCount: number;
|
|
46
|
+
readonly lastMessageId?: string;
|
|
47
|
+
readonly operation?: {
|
|
48
|
+
readonly operationId: string;
|
|
49
|
+
readonly kind: 'fork' | 'rewind-send';
|
|
50
|
+
readonly refillRef?: ContentRef;
|
|
51
|
+
readonly resultRef: ContentRef;
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
/** Bounded row description; object bytes are written separately. */
|
|
55
|
+
interface ReadingItem {
|
|
56
|
+
readonly collection: 'messages' | 'parts' | 'turns' | 'answered' | 'participantChanges' | 'toolLinks' | 'wait' | 'contextUsage';
|
|
57
|
+
readonly parentId: string;
|
|
58
|
+
readonly id: string;
|
|
59
|
+
readonly ordinal: number;
|
|
60
|
+
readonly sourceSeq: number;
|
|
61
|
+
/** First physical source sequence; overwrites retain the stored original value. */
|
|
62
|
+
readonly bornSourceSeq?: number;
|
|
63
|
+
readonly header: ReadingMessageHeader | ReadingPartHeader | ReadingTurnHeader | ReadingItemHeader | Record<string, unknown>;
|
|
64
|
+
}
|
|
65
|
+
/** Immutable bytes: business transactions may provide a whole object; workers provide ordered bounded pieces. */
|
|
66
|
+
interface ReadingObject {
|
|
67
|
+
readonly ref: ContentRef;
|
|
68
|
+
readonly bytes: Uint8Array;
|
|
69
|
+
/** First physical source sequence, or -1 for summary and operation objects. */
|
|
70
|
+
readonly bornSourceSeq: number;
|
|
71
|
+
/** Absent for a whole business object; worker pieces require the next contiguous byte offset. */
|
|
72
|
+
readonly offset?: number;
|
|
73
|
+
/** Marks the final piece; the adapter closes only after validating full length and SHA-256. */
|
|
74
|
+
readonly complete?: boolean;
|
|
75
|
+
}
|
|
76
|
+
/** One ordered projection update. A failed write rolls back the authoritative batch too. */
|
|
77
|
+
interface ReadingPatch {
|
|
78
|
+
readonly identity: ReadingBuildIdentity;
|
|
79
|
+
readonly patchSeq: number;
|
|
80
|
+
readonly items: readonly ReadingItem[];
|
|
81
|
+
readonly objects: readonly ReadingObject[];
|
|
82
|
+
/** User boundaries, including trigger candidates whose messageSourceSeq is -1. */
|
|
83
|
+
readonly cuts?: readonly ReadingCut[];
|
|
84
|
+
readonly control: ReadingControl;
|
|
85
|
+
readonly nextOrdinal: number;
|
|
86
|
+
readonly summary?: WatchSessionSummary;
|
|
87
|
+
readonly complete?: boolean;
|
|
88
|
+
/** Final retained-preparation binding; the adapter checks it against the publication credential. */
|
|
89
|
+
readonly rewindPreparation?: {
|
|
90
|
+
/** Durable operation reserved for this private build. */
|
|
91
|
+
readonly operationId: string;
|
|
92
|
+
/** Immutable normalized request hash. */
|
|
93
|
+
readonly requestHash: string;
|
|
94
|
+
/** Caller-owned maintenance reservation identity. */
|
|
95
|
+
readonly reservationToken: string;
|
|
96
|
+
};
|
|
97
|
+
/** Independent trusted-worker end declaration, checked against admitted ordered patches. */
|
|
98
|
+
readonly completion?: {
|
|
99
|
+
readonly itemWrites: number;
|
|
100
|
+
readonly objects: number;
|
|
101
|
+
readonly lastPatchSeq: number;
|
|
102
|
+
readonly digest: string;
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
/** Effective control at a user boundary; actual lifetime consumption never rewinds. */
|
|
106
|
+
type RewindPrefixControl = Omit<ReadingControl, 'tokensUsed' | 'contextAuxiliaryTokens'>;
|
|
107
|
+
/** A bounded, authenticated user boundary on the physical source timeline. */
|
|
108
|
+
interface ReadingCut {
|
|
109
|
+
/** Selected user message's stable identity. */
|
|
110
|
+
readonly messageId: string;
|
|
111
|
+
/** Actual user-event sequence, or -1 while an adjacent trigger candidate awaits its message. */
|
|
112
|
+
readonly messageSourceSeq: number;
|
|
113
|
+
/** First physical event excluded by the cut, including its adjacent trigger when present. */
|
|
114
|
+
readonly cutSourceSeq: number;
|
|
115
|
+
/** Next message ordinal immediately before the cut. */
|
|
116
|
+
readonly nextOrdinal: number;
|
|
117
|
+
/** Bounded effective control, excluding both lifetime usage counters. */
|
|
118
|
+
readonly prefixControl: RewindPrefixControl;
|
|
119
|
+
/** SHA-256 of the exact persisted prefix-control JSON bytes. */
|
|
120
|
+
readonly prefixControlSha256: string;
|
|
121
|
+
/** Whether tool pairing is valid and closed at this boundary. */
|
|
122
|
+
readonly cutSafe: boolean;
|
|
123
|
+
}
|
|
124
|
+
/** Warm-path limits; a limit breach selects background preparation instead of rejecting a cut. */
|
|
125
|
+
interface RewindCaps {
|
|
126
|
+
/** Maximum combined descriptor deletions and before-image restorations. */
|
|
127
|
+
readonly itemActions: number;
|
|
128
|
+
/** Maximum sparse before-images. */
|
|
129
|
+
readonly undoActions: number;
|
|
130
|
+
/** Maximum affected complete objects. */
|
|
131
|
+
readonly objects: number;
|
|
132
|
+
/** Maximum affected physical chunks. */
|
|
133
|
+
readonly chunks: number;
|
|
134
|
+
/** Maximum affected object byte lengths, in bytes. */
|
|
135
|
+
readonly objectBytes: number;
|
|
136
|
+
}
|
|
137
|
+
/** A descriptor's indexed identity; no retained body belongs in a rewind plan. */
|
|
138
|
+
interface BoundedItemAction {
|
|
139
|
+
/** Indexed descriptor collection. */
|
|
140
|
+
readonly collection: ReadingItem['collection'];
|
|
141
|
+
/** Indexed collection parent. */
|
|
142
|
+
readonly parentId: string;
|
|
143
|
+
/** Indexed descriptor identity within its parent. */
|
|
144
|
+
readonly id: string;
|
|
145
|
+
/** Original physical creation sequence. */
|
|
146
|
+
readonly bornSourceSeq: number;
|
|
147
|
+
}
|
|
148
|
+
/** One sparse before-image, restored in descending physical mutation order. */
|
|
149
|
+
interface BoundedUndoAction extends BoundedItemAction {
|
|
150
|
+
/** Physical event that overwrote the descriptor. */
|
|
151
|
+
readonly mutationSourceSeq: number;
|
|
152
|
+
/** Write order within that physical event; restoration runs in descending order. */
|
|
153
|
+
readonly mutationOrdinal: number;
|
|
154
|
+
/** Previous descriptor ordinal. */
|
|
155
|
+
readonly previousOrdinal: number;
|
|
156
|
+
/** Previous last-modified physical sequence. */
|
|
157
|
+
readonly previousSourceSeq: number;
|
|
158
|
+
/** Exact before-image JSON, at most 2KiB. */
|
|
159
|
+
readonly previousHeaderJson: string;
|
|
160
|
+
/** SHA-256 of the before-image JSON bytes. */
|
|
161
|
+
readonly previousHeaderSha256: string;
|
|
162
|
+
}
|
|
163
|
+
/** Fixed-size object metadata; chunks are selected only by exact object membership. */
|
|
164
|
+
interface ReadingObjectMetadata {
|
|
165
|
+
/** Exact object identity; never a permission inferred from a string prefix. */
|
|
166
|
+
readonly id: string;
|
|
167
|
+
/** Complete immutable object length, in bytes. */
|
|
168
|
+
readonly byteLength: number;
|
|
169
|
+
/** Original physical creation sequence. */
|
|
170
|
+
readonly bornSourceSeq: number;
|
|
171
|
+
/** Number of existing indexed physical blocks, without reading their payloads. */
|
|
172
|
+
readonly chunkCount: number;
|
|
173
|
+
}
|
|
174
|
+
/** A bounded suffix inspection tied to a complete active build and authenticated cut. */
|
|
175
|
+
interface RewindInspection {
|
|
176
|
+
/** Exact ready build inspected before authority changes. */
|
|
177
|
+
readonly basis: ReadingBuildIdentity;
|
|
178
|
+
/** Authenticated boundary from that build. */
|
|
179
|
+
readonly cut: ReadingCut;
|
|
180
|
+
/** Bounded new-in-suffix descriptor identities. */
|
|
181
|
+
readonly itemActions: readonly BoundedItemAction[];
|
|
182
|
+
/** Bounded reverse-ordered descriptor before-images. */
|
|
183
|
+
readonly undoActions: readonly BoundedUndoAction[];
|
|
184
|
+
/** Bounded affected object metadata. */
|
|
185
|
+
readonly objects: readonly ReadingObjectMetadata[];
|
|
186
|
+
/** A cap or affected-block integrity check requires trusted preparation. */
|
|
187
|
+
readonly exceeded: boolean;
|
|
188
|
+
/** Digest of the ready receipt and exact bounded removal/restoration actions. */
|
|
189
|
+
readonly digest: string;
|
|
190
|
+
}
|
|
191
|
+
/** Links a privately prepared old authority basis to the authority committed by the caller. */
|
|
192
|
+
interface RewindCommitCredential {
|
|
193
|
+
/** Real source used during preparation; the old active cache may be absent. */
|
|
194
|
+
readonly basis: {
|
|
195
|
+
/** Authority revision, generation and physical head before the commit. */
|
|
196
|
+
readonly view: HistoryView;
|
|
197
|
+
/** Old namespace ownership token. */
|
|
198
|
+
readonly sourceToken: string;
|
|
199
|
+
/** Old source digest, when the namespace supplies one. */
|
|
200
|
+
readonly sourceSha256: string;
|
|
201
|
+
};
|
|
202
|
+
/** Authority and physical build identity assigned by the final transaction. */
|
|
203
|
+
readonly target: ReadingBuildIdentity;
|
|
204
|
+
/** First excluded physical event. */
|
|
205
|
+
readonly cutSourceSeq: number;
|
|
206
|
+
/** Durable business operation identity. */
|
|
207
|
+
readonly operationId: string;
|
|
208
|
+
/** Hash of the normalized immutable operation input. */
|
|
209
|
+
readonly requestHash: string;
|
|
210
|
+
/** Caller-owned maintenance reservation identity. */
|
|
211
|
+
readonly reservationToken: string;
|
|
212
|
+
/** Completed private build digest, or authenticated warm inspection digest. */
|
|
213
|
+
readonly preparedDigest: string;
|
|
214
|
+
}
|
|
215
|
+
/** Publication admits either a current direct source or a committed rewind basis-to-target link. */
|
|
216
|
+
type ReadingPublication = {
|
|
217
|
+
readonly kind: 'direct';
|
|
218
|
+
readonly identity: ReadingBuildIdentity;
|
|
219
|
+
} | {
|
|
220
|
+
readonly kind: 'rewind';
|
|
221
|
+
readonly credential: RewindCommitCredential;
|
|
222
|
+
};
|
|
223
|
+
/** A warm rebase continues using exactly the inspected physical build. */
|
|
224
|
+
interface ReadingRebasePlan {
|
|
225
|
+
/** Authenticated bounded suffix actions captured before authority changes. */
|
|
226
|
+
readonly inspection: RewindInspection;
|
|
227
|
+
/** New identity retaining the inspected physical build ID. */
|
|
228
|
+
readonly target: ReadingBuildIdentity;
|
|
229
|
+
/** Exact business commit binding admitted by the transaction owner. */
|
|
230
|
+
readonly credential: RewindCommitCredential;
|
|
231
|
+
}
|
|
232
|
+
/** Exclusive indexed page query. Cursor validation belongs to the framework. */
|
|
233
|
+
interface ReadingQuery {
|
|
234
|
+
readonly before?: number;
|
|
235
|
+
readonly after?: number;
|
|
236
|
+
readonly aroundMessageId?: string;
|
|
237
|
+
readonly limit: number;
|
|
238
|
+
readonly view: HistoryView;
|
|
239
|
+
}
|
|
240
|
+
/** Descriptor pages return a single extra row for hasMore. */
|
|
241
|
+
interface ReadingItemQuery {
|
|
242
|
+
readonly collection: ReadingItem['collection'];
|
|
243
|
+
readonly parentId: string;
|
|
244
|
+
readonly after: number;
|
|
245
|
+
readonly limit: number;
|
|
246
|
+
}
|
|
247
|
+
/** Synchronous adapter. No read method decodes complete source messages or transcripts. */
|
|
248
|
+
interface ReadingStore {
|
|
249
|
+
/** Lists only fixed session IDs in recent activity order. */
|
|
250
|
+
sessionIds(): readonly string[];
|
|
251
|
+
/** Reads receipt ownership and source digest without decoding the original result. */
|
|
252
|
+
operationSource(operationId: string): {
|
|
253
|
+
readonly sessionId: string;
|
|
254
|
+
readonly sha256: string;
|
|
255
|
+
readonly kind: 'fork' | 'rewind-send';
|
|
256
|
+
} | undefined;
|
|
257
|
+
/** Point-reads fixed source scalars without decoding metadata or model parameters. */
|
|
258
|
+
source(sessionId: string): {
|
|
259
|
+
readonly view: HistoryView;
|
|
260
|
+
readonly seedEndSeq: number;
|
|
261
|
+
readonly model: ModelRef | null;
|
|
262
|
+
readonly metadataEpoch?: string;
|
|
263
|
+
};
|
|
264
|
+
/** Registers pure event and metadata callbacks on the shared transaction boundary. */
|
|
265
|
+
setProjectors?(events: (sessionId: string, rows: readonly StoredEvent[]) => void, summary: (sessionId: string) => void): void;
|
|
266
|
+
/** Point-reads a build and validates its source identity against the authoritative head. */
|
|
267
|
+
status(sessionId: string, kind?: ReadingIdentity['kind'], scopeId?: string): ReadingStatus | undefined;
|
|
268
|
+
/** Opens an unpublished build in the current write transaction. */
|
|
269
|
+
beginInTransaction(identity: ReadingBuildIdentity): void;
|
|
270
|
+
/** Applies one exactly ordered batch and incrementally validates bytes and descriptors. */
|
|
271
|
+
applyInTransaction(patch: ReadingPatch): void;
|
|
272
|
+
/** Point-reads an authenticated user boundary from the active build. */
|
|
273
|
+
cut(sessionId: string, messageId: string): ReadingCut | undefined;
|
|
274
|
+
/** Point-reads the most recent call/result pairing for one tool ID. */
|
|
275
|
+
toolPending(sessionId: string, id: string): boolean;
|
|
276
|
+
/** Returns at most each cap plus one suffix candidate without reading object bytes. */
|
|
277
|
+
inspectRewind(sessionId: string, buildId: string, cutSourceSeq: number, caps: RewindCaps): RewindInspection;
|
|
278
|
+
/** Restores sparse descriptors, removes the bounded suffix, then admits a new patch epoch. */
|
|
279
|
+
rebaseInTransaction(plan: ReadingRebasePlan, newTailPatch: ReadingPatch): ReadingStatus;
|
|
280
|
+
/** Checks only the constant-size completion receipt before switching the active pointer. */
|
|
281
|
+
publishInTransaction(publication: ReadingPublication): void;
|
|
282
|
+
/** Marks an obsolete namespace unreadable in the current write transaction. */
|
|
283
|
+
invalidateInTransaction(sessionId: string, kind?: ReadingIdentity['kind'], scopeId?: string): void;
|
|
284
|
+
/** Returns bounded ordered headers using exclusive keyset queries. */
|
|
285
|
+
window(sessionId: string, query: ReadingQuery): HistoryWindow;
|
|
286
|
+
/** Reads one stable header by its indexed message identity. */
|
|
287
|
+
message(sessionId: string, messageId: string): ReadingMessageHeader | undefined;
|
|
288
|
+
/** Point-reads one descriptor by its complete indexed identity. */
|
|
289
|
+
item(sessionId: string, collection: ReadingItem['collection'], parentId: string, id: string): ReadingItem | undefined;
|
|
290
|
+
/** Returns at most limit + 1 bounded descriptors. */
|
|
291
|
+
items(sessionId: string, query: ReadingItemQuery): readonly ReadingItem[];
|
|
292
|
+
/** Merges at most 64 indexed annotation parents, returning at most limit + 1 headers. */
|
|
293
|
+
itemsAcrossParents(sessionId: string, collection: 'answered' | 'participantChanges', parentIds: readonly string[], after: number, limit: number): readonly ReadingItem[];
|
|
294
|
+
/** Reads a descriptor only if an active item references it in the requested namespace. */
|
|
295
|
+
object(scope: ContentScope, id: string): ContentRef;
|
|
296
|
+
/** Reads only physical blocks intersecting the requested byte range. */
|
|
297
|
+
content(scope: ContentScope, id: string, offset: number, maxBytes: number): Uint8Array;
|
|
298
|
+
/** Runs a synchronous cache-only transaction; authoritative writes use their existing transaction. */
|
|
299
|
+
transaction<T>(work: () => T): T;
|
|
300
|
+
/** Discards private staging rows after cancellation without changing published builds. */
|
|
301
|
+
discard(identity: ReadingBuildIdentity): void;
|
|
302
|
+
/** Removes at most 128 metadata rows or 256KiB chunks; refuses active builds. True means done. */
|
|
303
|
+
cleanup(identity: ReadingBuildIdentity): boolean;
|
|
304
|
+
/** Waits for this adapter's scheduled obsolete-build cleanup; await before closing its connection. */
|
|
305
|
+
settleCleanup(): Promise<void>;
|
|
306
|
+
}
|
|
307
|
+
//#endregion
|
|
308
|
+
//#region node_modules/.cache/dts/plugin/src/storage/agent-revisions.d.ts
|
|
309
|
+
/** Persistence contracts; physical storage is supplied by an extension. */
|
|
310
|
+
/** A committed snapshot and its source. JSON is validated by the runtime. */
|
|
311
|
+
interface AgentRevisionRow {
|
|
312
|
+
readonly agentId: string;
|
|
313
|
+
readonly revision: number;
|
|
314
|
+
readonly kind: 'initial' | 'edit' | 'restore';
|
|
315
|
+
readonly source: string;
|
|
316
|
+
readonly summary: string;
|
|
317
|
+
readonly snapshot: string;
|
|
318
|
+
readonly contentHash: string;
|
|
319
|
+
readonly createdAt: number;
|
|
320
|
+
readonly restoredFrom: number | null;
|
|
321
|
+
readonly restoreRequestId: string | null;
|
|
322
|
+
readonly restoreBaseHash: string | null;
|
|
323
|
+
}
|
|
324
|
+
/** Synchronous operations join the caller's configuration transaction. */
|
|
325
|
+
interface AgentRevisionRows {
|
|
326
|
+
head(agentId: string): AgentRevisionRow | undefined;
|
|
327
|
+
get(agentId: string, revision: number): AgentRevisionRow | undefined;
|
|
328
|
+
list(agentId: string, limit: number, before?: number): Omit<AgentRevisionRow, 'snapshot'>[];
|
|
329
|
+
request(agentId: string, requestId: string): AgentRevisionRow | undefined;
|
|
330
|
+
append(row: AgentRevisionRow): void;
|
|
331
|
+
remove(agentId: string): void;
|
|
332
|
+
}
|
|
333
|
+
//#endregion
|
|
334
|
+
//#region node_modules/.cache/dts/plugin/src/storage/approval-grants.d.ts
|
|
335
|
+
/** Persistence contracts; physical storage is supplied by an extension. */
|
|
336
|
+
type ApprovalGrantKind = 'plugin';
|
|
337
|
+
interface ApprovalGrantRow {
|
|
338
|
+
readonly agentId: string;
|
|
339
|
+
readonly workspaceId: string;
|
|
340
|
+
/** `''` permanent, a session id, or `trigger:<id>`. */
|
|
341
|
+
readonly sessionId: string;
|
|
342
|
+
readonly owner: string;
|
|
343
|
+
readonly kind: ApprovalGrantKind;
|
|
344
|
+
readonly target: string;
|
|
345
|
+
readonly label: string;
|
|
346
|
+
readonly grantedAt: number;
|
|
347
|
+
}
|
|
348
|
+
interface ApprovalGrantKey {
|
|
349
|
+
readonly agentId: string;
|
|
350
|
+
readonly workspaceId: string;
|
|
351
|
+
readonly sessionId: string;
|
|
352
|
+
readonly owner: string;
|
|
353
|
+
readonly kind: ApprovalGrantKind;
|
|
354
|
+
readonly target: string;
|
|
355
|
+
}
|
|
356
|
+
interface ApprovalGrants {
|
|
357
|
+
/** Whether one of `scopes` (the call's session, `''`, a trigger scope)
|
|
358
|
+
* holds this grant. */
|
|
359
|
+
holds(input: Omit<ApprovalGrantKey, 'sessionId'> & {
|
|
360
|
+
readonly scopes: readonly string[];
|
|
361
|
+
}): boolean;
|
|
362
|
+
/** The targets of one kind held under any of `scopes`. */
|
|
363
|
+
targets(input: Omit<ApprovalGrantKey, 'sessionId' | 'target'> & {
|
|
364
|
+
readonly scopes: readonly string[];
|
|
365
|
+
}): readonly string[];
|
|
366
|
+
/** Writes one grant, replacing its label and time when it exists. */
|
|
367
|
+
upsert(row: ApprovalGrantRow): void;
|
|
368
|
+
list(agentId?: string, workspaceId?: string): readonly ApprovalGrantRow[];
|
|
369
|
+
/** `false` when there was nothing to remove. */
|
|
370
|
+
remove(key: ApprovalGrantKey): boolean;
|
|
371
|
+
/** Every row under one scope key, for a trigger's scope. */
|
|
372
|
+
removeScope(agentId: string, workspaceId: string, sessionId: string): number;
|
|
373
|
+
/** Every row of one agent; answers the workspaces touched. */
|
|
374
|
+
removeAgent(agentId: string): readonly string[];
|
|
375
|
+
}
|
|
376
|
+
//#endregion
|
|
377
|
+
//#region node_modules/.cache/dts/plugin/src/storage/authorization-catalog.d.ts
|
|
378
|
+
/** Persisted global resources; active capability owners project policy-specific effectiveness. */
|
|
379
|
+
type ResourceGrant = Extract<AuthorizationRecord, {
|
|
380
|
+
kind: 'file' | 'host' | 'command' | 'sandbox-network';
|
|
381
|
+
}>;
|
|
382
|
+
/** Atomic resource batches. Never owns capability configuration or closes the connection. */
|
|
383
|
+
interface AuthorizationCatalog {
|
|
384
|
+
/** Lists all global resources in creation order. */
|
|
385
|
+
list(): ResourceGrant[];
|
|
386
|
+
/** Inserts a whole batch; approvals may reuse an existing identical target. */
|
|
387
|
+
add(rows: readonly ResourceGrant[], reuse?: boolean): ResourceGrant[];
|
|
388
|
+
/** Removes one resource without changing a capability owner's policy. */
|
|
389
|
+
revoke(id: string): boolean;
|
|
390
|
+
}
|
|
391
|
+
//#endregion
|
|
392
|
+
//#region node_modules/.cache/dts/plugin/src/storage/credential.d.ts
|
|
393
|
+
/** Persistence contracts; physical storage is supplied by an extension. */
|
|
394
|
+
/** One credential as a listing may see it: which name, and four characters
|
|
395
|
+
* of it. */
|
|
396
|
+
interface CredentialHintRow {
|
|
397
|
+
readonly name: string;
|
|
398
|
+
readonly hint: string;
|
|
399
|
+
}
|
|
400
|
+
/** One credential as it is written: the ciphertext and the hint shown
|
|
401
|
+
* beside it. */
|
|
402
|
+
interface CredentialRowInput extends CredentialHintRow {
|
|
403
|
+
readonly ciphertext: string;
|
|
404
|
+
}
|
|
405
|
+
interface CredentialRows {
|
|
406
|
+
upsert(owner: string, scope: string, row: CredentialRowInput): void;
|
|
407
|
+
/** Answers whether a row was there. */
|
|
408
|
+
remove(owner: string, scope: string, name: string): boolean;
|
|
409
|
+
/** Removes every credential of one instance; answers how many went. */
|
|
410
|
+
removeScope(owner: string, scope: string): number;
|
|
411
|
+
/** Which credentials of one instance are set, ordered by name. Never the
|
|
412
|
+
* ciphertext. */
|
|
413
|
+
hints(owner: string, scope: string): CredentialHintRow[];
|
|
414
|
+
/** The ciphertext, by name. The one reader is the runtime's credential
|
|
415
|
+
* manager, on its way to opening them. */
|
|
416
|
+
ciphertexts(owner: string, scope: string): Record<string, string>;
|
|
417
|
+
}
|
|
418
|
+
//#endregion
|
|
419
|
+
//#region node_modules/.cache/dts/plugin/src/storage/event-store.d.ts
|
|
420
|
+
/** `EventStore` plus the one capability the port itself has no use for:
|
|
421
|
+
* releasing the underlying file handle. Proving persistence across a
|
|
422
|
+
* restart needs a real close — reading a still-open connection back would
|
|
423
|
+
* prove nothing about a file surviving a process restart — so this is exposed
|
|
424
|
+
* on the concrete return type rather than added to the port, which every
|
|
425
|
+
* other caller (including the in-memory store) has no file to release. */
|
|
426
|
+
interface OwnedEventStore extends EventStore {
|
|
427
|
+
close(): void;
|
|
428
|
+
}
|
|
429
|
+
/** An event writer that can join an already open host transaction. */
|
|
430
|
+
interface TransactionalEventStore extends EventStore {
|
|
431
|
+
/** Projects newly committed event rows in their append transaction. */
|
|
432
|
+
setReadingProjector(projector: (sessionId: string, events: readonly StoredEvent[]) => void): void;
|
|
433
|
+
/** Requires an active transaction; returns assigned sequence numbers without committing. */
|
|
434
|
+
appendInTransaction(sessionId: string, events: readonly RecordableEvent[]): readonly StoredEvent[];
|
|
435
|
+
}
|
|
436
|
+
//#endregion
|
|
437
|
+
//#region node_modules/.cache/dts/plugin/src/storage/files.d.ts
|
|
438
|
+
/** Persistence contracts; physical storage is supplied by an extension. */
|
|
439
|
+
/** The variant a model receives, when it is not the original. */
|
|
440
|
+
interface FileVariantRow {
|
|
441
|
+
readonly fileId: string;
|
|
442
|
+
readonly mediaType: string;
|
|
443
|
+
readonly size: number;
|
|
444
|
+
readonly width?: number;
|
|
445
|
+
readonly height?: number;
|
|
446
|
+
}
|
|
447
|
+
interface FileObjectRow {
|
|
448
|
+
readonly fileId: string;
|
|
449
|
+
readonly mediaType: string;
|
|
450
|
+
readonly size: number;
|
|
451
|
+
readonly width?: number;
|
|
452
|
+
readonly height?: number;
|
|
453
|
+
readonly model?: FileVariantRow;
|
|
454
|
+
readonly createdAt: number;
|
|
455
|
+
}
|
|
456
|
+
interface FileAddress {
|
|
457
|
+
readonly workspaceId: string;
|
|
458
|
+
readonly fileId: string;
|
|
459
|
+
}
|
|
460
|
+
interface FileRows {
|
|
461
|
+
/** Commits a synchronous file batch or restores its object and use rows on failure. */
|
|
462
|
+
transaction(work: () => void): void;
|
|
463
|
+
/** Inserts a file; an existing row for the same id is left as it was. */
|
|
464
|
+
insert(workspaceId: string, row: FileObjectRow): void;
|
|
465
|
+
get(workspaceId: string, fileId: string): FileObjectRow | undefined;
|
|
466
|
+
/** Records that `sessionId` referenced the file; once per session. */
|
|
467
|
+
recordUse(workspaceId: string, fileId: string, sessionId: string, at: number): void;
|
|
468
|
+
/** Whether this exact workspace/file/session reference was recorded. */
|
|
469
|
+
hasUse(workspaceId: string, fileId: string, sessionId: string): boolean;
|
|
470
|
+
/** Files created before `before` that no session ever referenced, ordered
|
|
471
|
+
* by workspace then id. */
|
|
472
|
+
unusedBefore(before: number): FileAddress[];
|
|
473
|
+
remove(workspaceId: string, fileId: string): void;
|
|
474
|
+
/** Every id one workspace's rows keep on disk: originals and variants. */
|
|
475
|
+
kept(workspaceId: string): ReadonlySet<string>;
|
|
476
|
+
}
|
|
477
|
+
//#endregion
|
|
478
|
+
//#region node_modules/.cache/dts/plugin/src/storage/inbox.d.ts
|
|
479
|
+
interface InboxRows {
|
|
480
|
+
/** Inserts `item`, or — when an item with the same category and `ref`
|
|
481
|
+
* already exists — leaves that one as it is and answers it. */
|
|
482
|
+
add(item: InboxItem, ref: string | null): InboxItem;
|
|
483
|
+
get(id: string): InboxItem | undefined;
|
|
484
|
+
/** The item registered under `category` and `ref`, if any. */
|
|
485
|
+
byRef(category: InboxDetail['category'], ref: string): InboxItem | undefined;
|
|
486
|
+
/** Every item, newest first. */
|
|
487
|
+
list(): readonly InboxItem[];
|
|
488
|
+
/** Unsettled requests, oldest first, for the start-up reconciliation. */
|
|
489
|
+
openRequests(): readonly (InboxItem & {
|
|
490
|
+
readonly ref: string | null;
|
|
491
|
+
})[];
|
|
492
|
+
/** Settles a waiting request; answers the changed item, or `undefined` when
|
|
493
|
+
* it was not waiting. */
|
|
494
|
+
settle(id: string, reason: InboxSettleReason, at: number): InboxItem | undefined;
|
|
495
|
+
/** Marks unread items read; answers the ones that changed. */
|
|
496
|
+
read(ids: readonly string[], at: number): readonly InboxItem[];
|
|
497
|
+
/** Marks every unread notice pointing at `sessionId` read. */
|
|
498
|
+
readSession(sessionId: string, at: number): readonly InboxItem[];
|
|
499
|
+
/** Deletes items other than waiting requests; answers the deleted ids. */
|
|
500
|
+
clear(ids: readonly string[]): readonly string[];
|
|
501
|
+
/** Deletes every read notice and every settled request. */
|
|
502
|
+
clearRead(): readonly string[];
|
|
503
|
+
/** Replaces one item's delivery records. */
|
|
504
|
+
setDeliveries(id: string, deliveries: readonly InboxDelivery[]): InboxItem | undefined;
|
|
505
|
+
/**
|
|
506
|
+
* Retention: read notices and settled requests older than `before` go, and
|
|
507
|
+
* then the oldest of what is left of them until at most `cap` rows remain.
|
|
508
|
+
* Unread notices and waiting requests are never touched. Answers the
|
|
509
|
+
* deleted ids.
|
|
510
|
+
*/
|
|
511
|
+
sweep(before: number, cap: number): readonly string[];
|
|
512
|
+
}
|
|
513
|
+
//#endregion
|
|
514
|
+
//#region node_modules/.cache/dts/plugin/src/storage/scope-catalog.d.ts
|
|
515
|
+
/** Persistence contracts; physical storage is supplied by an extension. */
|
|
516
|
+
interface AgentRow {
|
|
517
|
+
readonly agentId: string;
|
|
518
|
+
readonly name: string;
|
|
519
|
+
readonly createdAt: number;
|
|
520
|
+
readonly description: string;
|
|
521
|
+
/** `null` — the ordinary value — means every tool the agent can see. */
|
|
522
|
+
readonly tools: readonly string[] | null;
|
|
523
|
+
readonly identity: string;
|
|
524
|
+
readonly style: string;
|
|
525
|
+
readonly reminder: string;
|
|
526
|
+
readonly startsSessions: boolean;
|
|
527
|
+
/** The uploaded picture's revision, or `null` for none. The bytes are
|
|
528
|
+
* read through `agentAvatar` only. */
|
|
529
|
+
readonly avatarRev: string | null;
|
|
530
|
+
}
|
|
531
|
+
/** An uploaded picture, an agent's or a workspace's: its revision and the
|
|
532
|
+
* PNG bytes. */
|
|
533
|
+
interface AvatarRow {
|
|
534
|
+
readonly rev: string;
|
|
535
|
+
readonly png: Uint8Array;
|
|
536
|
+
}
|
|
537
|
+
/** The parts of an agent's definition that can change; an omitted field is
|
|
538
|
+
* left alone. */
|
|
539
|
+
interface AgentChanges {
|
|
540
|
+
readonly name?: string;
|
|
541
|
+
readonly description?: string;
|
|
542
|
+
readonly tools?: readonly string[] | null;
|
|
543
|
+
readonly identity?: string;
|
|
544
|
+
readonly style?: string;
|
|
545
|
+
readonly reminder?: string;
|
|
546
|
+
readonly startsSessions?: boolean;
|
|
547
|
+
}
|
|
548
|
+
interface WorkspaceRow {
|
|
549
|
+
readonly workspaceId: string;
|
|
550
|
+
readonly name: string;
|
|
551
|
+
readonly createdAt: number;
|
|
552
|
+
/** The revision of the uploaded picture, or `null` when there is none. */
|
|
553
|
+
readonly avatarRev: string | null;
|
|
554
|
+
}
|
|
555
|
+
/** What `updateWorkspace` may change. An absent field is left alone. */
|
|
556
|
+
interface WorkspaceChanges {
|
|
557
|
+
readonly name?: string;
|
|
558
|
+
}
|
|
559
|
+
/** One work directory: a tree this workspace can see and read. It carries no
|
|
560
|
+
* mode — what may be *changed* is a grant in `access_grant`, answered by a
|
|
561
|
+
* person at the moment a tool asked, not a flag set when the tree was
|
|
562
|
+
* added. */
|
|
563
|
+
interface WorkspaceDirectoryRow {
|
|
564
|
+
readonly workspaceId: string;
|
|
565
|
+
readonly path: string;
|
|
566
|
+
readonly addedAt: number;
|
|
567
|
+
}
|
|
568
|
+
interface ScopeCatalog {
|
|
569
|
+
/** `INSERT OR IGNORE` — creating the same agent id twice changes nothing. */
|
|
570
|
+
createAgent(agentId: string, name: string, description?: string, alsoWrite?: () => void): void;
|
|
571
|
+
listAgents(): AgentRow[];
|
|
572
|
+
/** Writes only the fields it was given. An agent that does not exist is
|
|
573
|
+
* not created by this — nothing matches, and nothing happens. */
|
|
574
|
+
updateAgent(agentId: string, changes: AgentChanges): void;
|
|
575
|
+
/** Stores this agent's picture, replacing any earlier one, or removes it
|
|
576
|
+
* with `null`. Validating the bytes and checking the agent exists is the
|
|
577
|
+
* caller's job; the table only bounds the size. */
|
|
578
|
+
setAgentAvatar(agentId: string, avatar: {
|
|
579
|
+
readonly rev: string;
|
|
580
|
+
readonly png: Uint8Array;
|
|
581
|
+
} | null): void;
|
|
582
|
+
/** The stored picture, or `null` when the agent has none. */
|
|
583
|
+
agentAvatar(agentId: string): AvatarRow | null;
|
|
584
|
+
/** `updateAgent`, then `setAgentAvatar` unless `avatar` is omitted, then
|
|
585
|
+
* `alsoWrite`, in one transaction: either all of them are written or none
|
|
586
|
+
* is. `alsoWrite` is the caller's writes to other tables on the same
|
|
587
|
+
* connection, run after this catalog's own; a throw from it, or from
|
|
588
|
+
* `COMMIT`, rolls every write back and is rethrown. */
|
|
589
|
+
saveAgent(agentId: string, changes: AgentChanges, avatar?: {
|
|
590
|
+
readonly rev: string;
|
|
591
|
+
readonly png: Uint8Array;
|
|
592
|
+
} | null, alsoWrite?: () => void): void;
|
|
593
|
+
/** Deletes the agent's picture and its row, then runs `alsoWrite`, in one
|
|
594
|
+
* transaction: `alsoWrite` is the caller's deletes in other tables on the
|
|
595
|
+
* same connection. A throw from it, or from `COMMIT`, rolls every delete
|
|
596
|
+
* back and is rethrown. An id with no row deletes nothing. */
|
|
597
|
+
removeAgent(agentId: string, alsoWrite?: () => void): void;
|
|
598
|
+
/** `INSERT OR IGNORE` — creating the same workspace id twice changes
|
|
599
|
+
* nothing. */
|
|
600
|
+
createWorkspace(workspaceId: string, name: string): void;
|
|
601
|
+
/** Writes only the fields it was given. A workspace that does not exist is
|
|
602
|
+
* not created by this — nothing matches, and nothing happens. */
|
|
603
|
+
updateWorkspace(workspaceId: string, changes: WorkspaceChanges): void;
|
|
604
|
+
/** Stores this workspace's picture, replacing any earlier one, or removes
|
|
605
|
+
* it with `null`. Validating the bytes and checking the workspace exists
|
|
606
|
+
* is the caller's job; the table only bounds the size. */
|
|
607
|
+
setWorkspaceAvatar(workspaceId: string, avatar: {
|
|
608
|
+
readonly rev: string;
|
|
609
|
+
readonly png: Uint8Array;
|
|
610
|
+
} | null): void;
|
|
611
|
+
/** The stored picture, or `null` when the workspace has none. */
|
|
612
|
+
workspaceAvatar(workspaceId: string): AvatarRow | null;
|
|
613
|
+
listWorkspaces(): WorkspaceRow[];
|
|
614
|
+
/** An insert that ignores a repeat: adding the same directory twice is not
|
|
615
|
+
* an error and does not move `added_at`, which keeps meaning "when this
|
|
616
|
+
* directory was first added".
|
|
617
|
+
*
|
|
618
|
+
* `path` is stored exactly as given; resolving it to a real absolute path
|
|
619
|
+
* is the caller's job (packages/core/runtime/src/scope.ts),
|
|
620
|
+
* not this table's. */
|
|
621
|
+
addDirectory(workspaceId: string, path: string): void;
|
|
622
|
+
removeDirectory(workspaceId: string, path: string): void;
|
|
623
|
+
/** Empty for a workspace with no authorized directories — the normal
|
|
624
|
+
* state for a freshly created workspace. */
|
|
625
|
+
listDirectories(workspaceId: string): WorkspaceDirectoryRow[];
|
|
626
|
+
}
|
|
627
|
+
interface OwnedScopeCatalog extends ScopeCatalog {
|
|
628
|
+
close(): void;
|
|
629
|
+
}
|
|
630
|
+
//#endregion
|
|
631
|
+
//#region node_modules/.cache/dts/plugin/src/storage/session-catalog.d.ts
|
|
632
|
+
/** Parameter persistence selected by composition and joined to framework configuration transactions. */
|
|
633
|
+
interface SessionParameterProjection {
|
|
634
|
+
/** Reads the parameters for the explicitly selected execution model. */
|
|
635
|
+
parameters(sessionId: SessionId, model: {
|
|
636
|
+
readonly providerId: string;
|
|
637
|
+
readonly model: string;
|
|
638
|
+
}): Readonly<Record<string, unknown>>;
|
|
639
|
+
/** Writes parameters on the catalogue connection's current transaction. */
|
|
640
|
+
storeParameters(sessionId: SessionId, model: {
|
|
641
|
+
readonly providerId: string;
|
|
642
|
+
readonly model: string;
|
|
643
|
+
}, params: Readonly<Record<string, unknown>>): void;
|
|
644
|
+
}
|
|
645
|
+
interface SessionRow {
|
|
646
|
+
readonly sessionId: SessionId;
|
|
647
|
+
readonly address: SessionAddress;
|
|
648
|
+
/** The topic title: what the agent, or the first message before it, says
|
|
649
|
+
* this session is about. `null` until either writes one. */
|
|
650
|
+
readonly title: string | null;
|
|
651
|
+
/** The name a person gave it, independent of `title`; `null` when nobody
|
|
652
|
+
* named it or the name was cleared. */
|
|
653
|
+
readonly name: string | null;
|
|
654
|
+
/** The paragraph saying what this session is doing, and who wrote it. */
|
|
655
|
+
readonly digest: SessionDigest | null;
|
|
656
|
+
/** The pair this session is using. `null` only when nothing was reachable
|
|
657
|
+
* at the moment it was created — a session is instantiated from the
|
|
658
|
+
* templates rather than following them, so this is its own answer and not
|
|
659
|
+
* an override of anybody's. */
|
|
660
|
+
readonly model: {
|
|
661
|
+
readonly providerId: string;
|
|
662
|
+
readonly model: string;
|
|
663
|
+
} | null;
|
|
664
|
+
/** What this session will send for the model above. Empty for a session on
|
|
665
|
+
* no model, and empty is also a real answer for one that has stored
|
|
666
|
+
* nothing. */
|
|
667
|
+
readonly params: Readonly<Record<string, unknown>>;
|
|
668
|
+
/** Filed away by a person. `false` is what a row that never said reads as
|
|
669
|
+
* — the column's `DEFAULT 0` is that rule rather than a convenient
|
|
670
|
+
* initial value. */
|
|
671
|
+
readonly archived: boolean;
|
|
672
|
+
/** How the last finished turn ended, `null` for a session that has taken
|
|
673
|
+
* none. A **projection** of the log's last `turn-ended`, stored so a list
|
|
674
|
+
* costs one query instead of one per session — which is also the whole of
|
|
675
|
+
* what it costs: the same fact now lives twice, and only a list may read
|
|
676
|
+
* this copy. */
|
|
677
|
+
readonly lastOutcome: Outcome | null;
|
|
678
|
+
/** The latest committed message's visible text, whitespace-collapsed and
|
|
679
|
+
* capped by the runtime; `null` before any message carried text. A list's
|
|
680
|
+
* copy of a fact the log holds, under `lastOutcome`'s rule. */
|
|
681
|
+
readonly preview: string | null;
|
|
682
|
+
/** Increments for accepted persistent history changes. */
|
|
683
|
+
readonly historyRevision: number;
|
|
684
|
+
/** Increments when a rewind starts a replacement path. */
|
|
685
|
+
readonly historyGeneration: number;
|
|
686
|
+
/** Shared by a root and its forks for provider cache routing. */
|
|
687
|
+
readonly cacheLineageId: string;
|
|
688
|
+
/** Last copied event in a fork; -1 for a root session. */
|
|
689
|
+
readonly seedEndSeq: number;
|
|
690
|
+
readonly createdAt: number;
|
|
691
|
+
readonly updatedAt: number;
|
|
692
|
+
}
|
|
693
|
+
/** Who writes a session's digest. The agent in that session today; a
|
|
694
|
+
* background summary is the author this column leaves room for. */
|
|
695
|
+
type DigestAuthor = 'agent';
|
|
696
|
+
interface SessionDigest {
|
|
697
|
+
readonly text: string;
|
|
698
|
+
readonly author: DigestAuthor;
|
|
699
|
+
readonly updatedAt: number;
|
|
700
|
+
}
|
|
701
|
+
interface SessionCatalog {
|
|
702
|
+
/** Lists identities without decoding opaque session metadata. */
|
|
703
|
+
listIds?(): readonly string[];
|
|
704
|
+
/** Reads one session without scanning the entire catalogue. */
|
|
705
|
+
get?(sessionId: string): SessionRow | undefined;
|
|
706
|
+
/** `INSERT OR IGNORE` — creating the same session id a second time
|
|
707
|
+
* changes nothing, including its `title` and timestamps. */
|
|
708
|
+
create(sessionId: SessionId, address: SessionAddress): void;
|
|
709
|
+
/** Every known session, most recently updated first — the one query
|
|
710
|
+
* `session_by_recent` exists to serve. */
|
|
711
|
+
list(): SessionRow[];
|
|
712
|
+
/** Sets `title`. Whether it was already set is the caller's decision,
|
|
713
|
+
* not this table's — the caller fires this only when the session's first
|
|
714
|
+
* user message arrives and `title` is still null, a condition this
|
|
715
|
+
* method does not itself enforce. */
|
|
716
|
+
rename(sessionId: SessionId, title: string): void;
|
|
717
|
+
/** Sets the person's name for the session, or removes it with `null`.
|
|
718
|
+
* Leaves `title` and `updated_at` alone: naming is not session activity. */
|
|
719
|
+
setName(sessionId: SessionId, name: string | null): void;
|
|
720
|
+
/** Replaces the session's digest whole. Leaves `updated_at` alone. */
|
|
721
|
+
setDigest(sessionId: SessionId, text: string, author: DigestAuthor): void;
|
|
722
|
+
/** Sets `updated_at` to now. Called after every event batch that
|
|
723
|
+
* succeeds, so the list's sort key tracks real activity. */
|
|
724
|
+
touch(sessionId: SessionId): void;
|
|
725
|
+
/** Pins the session to a model, or unpins it with `null`. Deliberately
|
|
726
|
+
* leaves `updated_at` alone: switching models is not session activity, and
|
|
727
|
+
* the list's order should not jump because somebody opened a dropdown. */
|
|
728
|
+
setModel(sessionId: SessionId, model: {
|
|
729
|
+
readonly providerId: string;
|
|
730
|
+
readonly model: string;
|
|
731
|
+
} | null): void;
|
|
732
|
+
/** Atomically stores one pair's complete settings and makes that pair current. */
|
|
733
|
+
setModelWithParams(sessionId: SessionId, model: {
|
|
734
|
+
readonly providerId: string;
|
|
735
|
+
readonly model: string;
|
|
736
|
+
}, params: Readonly<Record<string, unknown>>): void;
|
|
737
|
+
/** Files the session away, or takes it back out. Leaves `updated_at`
|
|
738
|
+
* alone for `setModel`'s reason: filing is not session activity, and the
|
|
739
|
+
* list's order should not jump because somebody tidied up. */
|
|
740
|
+
setArchived(sessionId: SessionId, archived: boolean): void;
|
|
741
|
+
/** Records how the turn that just ended ended. Called **after** that
|
|
742
|
+
* turn's event batch has committed, never before: a crash between the two
|
|
743
|
+
* leaves the log ahead of this column by one turn, which the next ending
|
|
744
|
+
* repairs, while the reverse order leaves a list claiming a turn ended
|
|
745
|
+
* that the log has no record of — a lie nobody can find. Leaves
|
|
746
|
+
* `updated_at` to the `touch` the batch already did. */
|
|
747
|
+
setLastOutcome(sessionId: SessionId, outcome: Outcome): void;
|
|
748
|
+
/** Records the list's one-line preview. Called after the message's batch
|
|
749
|
+
* has committed, and leaves `updated_at` to that batch's `touch`. */
|
|
750
|
+
setPreview(sessionId: SessionId, preview: string): void;
|
|
751
|
+
}
|
|
752
|
+
interface OwnedSessionCatalog extends SessionCatalog {
|
|
753
|
+
close(): void;
|
|
754
|
+
}
|
|
755
|
+
//#endregion
|
|
756
|
+
//#region node_modules/.cache/dts/plugin/src/storage/session-delivery.d.ts
|
|
757
|
+
/** The two kinds of message the mailbox holds: a delegate's result and a plugin's wake-up line. */
|
|
758
|
+
type DeliveryKind = 'delegation-result' | 'notice';
|
|
759
|
+
/** Durable notifications shared by native and external delegates and by plugin notices. */
|
|
760
|
+
interface SessionDelivery {
|
|
761
|
+
/** Deduplicates a result by owner, destination and source key. Never starts a turn. */
|
|
762
|
+
enqueue(owner: string, target: string, sourceKey: string, taskId: string, message: Message, kind?: DeliveryKind, targetGeneration?: number): string;
|
|
763
|
+
/** Unconsumed messages in acceptance order. */
|
|
764
|
+
pending(target: string): readonly Message[];
|
|
765
|
+
/** Appends events and consumes their notification identities in one transaction;
|
|
766
|
+
* returns the rows written, as `EventStore.append` does. */
|
|
767
|
+
record(sessionId: string, events: readonly RecordableEvent[]): readonly StoredEvent[];
|
|
768
|
+
/** Marks old-path pending rows unusable inside an already open rewind transaction. */
|
|
769
|
+
supersedePendingInTransaction(sessionId: string, toGeneration: number): void;
|
|
770
|
+
}
|
|
771
|
+
//#endregion
|
|
772
|
+
//#region node_modules/.cache/dts/plugin/src/storage/session-history.d.ts
|
|
773
|
+
/** Persistence contracts; physical storage is supplied by an extension. */
|
|
774
|
+
/** A durable receipt for an accepted history operation. */
|
|
775
|
+
interface SessionOperationRow {
|
|
776
|
+
readonly operationId: string;
|
|
777
|
+
readonly kind: 'fork' | 'rewind-send';
|
|
778
|
+
readonly sourceSessionId: string;
|
|
779
|
+
readonly requestHash: string;
|
|
780
|
+
readonly result: unknown;
|
|
781
|
+
readonly acceptedAt: number;
|
|
782
|
+
}
|
|
783
|
+
/** The immutable source marker shown by an independent fork. */
|
|
784
|
+
interface SessionForkRow {
|
|
785
|
+
readonly sessionId: string;
|
|
786
|
+
readonly sourceSessionId: string;
|
|
787
|
+
readonly sourceMessageId: string;
|
|
788
|
+
readonly sourceTitle: string;
|
|
789
|
+
readonly sourceExcerpt: string;
|
|
790
|
+
readonly sourceHistoryRevision: number;
|
|
791
|
+
readonly createdAt: number;
|
|
792
|
+
}
|
|
793
|
+
/** Joins session history writes to the caller's single SQLite transaction. */
|
|
794
|
+
interface SessionHistoryRows {
|
|
795
|
+
transaction<T>(fn: () => T): T;
|
|
796
|
+
getOperation(operationId: string): SessionOperationRow | undefined;
|
|
797
|
+
recordOperation(row: SessionOperationRow): void;
|
|
798
|
+
getFork(sessionId: string): SessionForkRow | undefined;
|
|
799
|
+
recordFork(row: SessionForkRow): void;
|
|
800
|
+
createForkSession(sourceSessionId: string, sessionId: string): void;
|
|
801
|
+
compareAndAdvance(sessionId: string, expectedRevision: number, rewind?: boolean): boolean;
|
|
802
|
+
setSeedEndSeq(sessionId: string, seq: number): void;
|
|
803
|
+
copyFileUses(sourceSessionId: string, sessionId: string, fileIds: readonly string[]): void;
|
|
804
|
+
}
|
|
805
|
+
//#endregion
|
|
806
|
+
//#region node_modules/.cache/dts/plugin/src/storage/session-origin.d.ts
|
|
807
|
+
/** Persistence contracts; physical storage is supplied by an extension. */
|
|
808
|
+
interface SessionCreatorRow {
|
|
809
|
+
readonly origin: string;
|
|
810
|
+
readonly originRef: string | null;
|
|
811
|
+
readonly createdAt: number;
|
|
812
|
+
}
|
|
813
|
+
type ParticipantBy = 'agent' | 'user';
|
|
814
|
+
interface SessionOrigins {
|
|
815
|
+
/** Records that an agent created this session. Written once; a second
|
|
816
|
+
* call for the same session changes nothing. */
|
|
817
|
+
recordCreator(sessionId: string, origin: string, originRef: string | null, createdAt: number): void;
|
|
818
|
+
/** `undefined` means a person created it. */
|
|
819
|
+
creatorOf(sessionId: string): SessionCreatorRow | undefined;
|
|
820
|
+
/** The participants besides the creator; today at most `['user']`. */
|
|
821
|
+
participantsOf(sessionId: string): readonly 'user'[];
|
|
822
|
+
/** `true` when the person was not a participant and now is. */
|
|
823
|
+
join(sessionId: string, by: ParticipantBy, at: number): boolean;
|
|
824
|
+
/** `true` when the person was a participant and no longer is. */
|
|
825
|
+
leave(sessionId: string): boolean;
|
|
826
|
+
}
|
|
827
|
+
//#endregion
|
|
828
|
+
//#region node_modules/.cache/dts/plugin/src/storage/triggers.d.ts
|
|
829
|
+
interface TriggerRow {
|
|
830
|
+
readonly id: string;
|
|
831
|
+
readonly source: string;
|
|
832
|
+
readonly name: string;
|
|
833
|
+
readonly agentId: string;
|
|
834
|
+
readonly workspaceId: string;
|
|
835
|
+
readonly target: unknown;
|
|
836
|
+
/** Resource preauthorizations held only by sessions created by this definition. */
|
|
837
|
+
readonly scope: readonly TriggerScopeItem[];
|
|
838
|
+
readonly instruction: string;
|
|
839
|
+
readonly config: unknown;
|
|
840
|
+
readonly enabled: boolean;
|
|
841
|
+
readonly createdBy: unknown;
|
|
842
|
+
readonly createdAt: number;
|
|
843
|
+
readonly updatedAt: number;
|
|
844
|
+
}
|
|
845
|
+
type TriggerRunKind = 'scheduled' | 'catch-up' | 'fired';
|
|
846
|
+
type TriggerRunState = 'running' | 'waiting' | 'completed' | 'failed' | 'skipped';
|
|
847
|
+
interface TriggerRunRow {
|
|
848
|
+
readonly id: string;
|
|
849
|
+
readonly triggerId: string;
|
|
850
|
+
readonly kind: TriggerRunKind;
|
|
851
|
+
readonly scheduledAt: number | null;
|
|
852
|
+
readonly startedAt: number;
|
|
853
|
+
readonly state: TriggerRunState;
|
|
854
|
+
readonly reason: string | null;
|
|
855
|
+
readonly sessionId: string | null;
|
|
856
|
+
readonly endedAt: number | null;
|
|
857
|
+
}
|
|
858
|
+
interface TriggerRows {
|
|
859
|
+
list(): TriggerRow[];
|
|
860
|
+
get(id: string): TriggerRow | undefined;
|
|
861
|
+
insert(row: TriggerRow): void;
|
|
862
|
+
/** Replaces every column but `id`, `source`, `created_by` and `created_at`. */
|
|
863
|
+
update(row: TriggerRow): void;
|
|
864
|
+
setEnabled(id: string, enabled: boolean, at: number): void;
|
|
865
|
+
/** Removes the definition and its runs; `true` when it existed. */
|
|
866
|
+
remove(id: string): boolean;
|
|
867
|
+
/** Writes a run and keeps the trigger's newest `keep`. */
|
|
868
|
+
addRun(run: TriggerRunRow, keep?: number): void;
|
|
869
|
+
updateRun(id: string, changes: Partial<Pick<TriggerRunRow, 'state' | 'reason' | 'sessionId' | 'endedAt'>>): TriggerRunRow | undefined;
|
|
870
|
+
runs(triggerId: string, limit?: number): TriggerRunRow[];
|
|
871
|
+
lastRun(triggerId: string): TriggerRunRow | undefined;
|
|
872
|
+
/** The newest run that went to `sessionId` and has not ended. */
|
|
873
|
+
openRunForSession(sessionId: string): TriggerRunRow | undefined;
|
|
874
|
+
/** Every run still `running` or `waiting`. */
|
|
875
|
+
openRuns(): TriggerRunRow[];
|
|
876
|
+
}
|
|
877
|
+
//#endregion
|
|
878
|
+
export { ReadingItemQuery as $, FileObjectRow as A, ApprovalGrantKey as B, OwnedScopeCatalog as C, WorkspaceRow as D, WorkspaceDirectoryRow as E, CredentialHintRow as F, AgentRevisionRows as G, ApprovalGrantRow as H, CredentialRowInput as I, ReadingBuildIdentity as J, BoundedItemAction as K, CredentialRows as L, FileVariantRow as M, OwnedEventStore as N, InboxRows as O, TransactionalEventStore as P, ReadingItem as Q, AuthorizationCatalog as R, AvatarRow as S, WorkspaceChanges as T, ApprovalGrants as U, ApprovalGrantKind as V, AgentRevisionRow as W, ReadingCut as X, ReadingControl as Y, ReadingIdentity as Z, SessionDigest as _, TriggerRunState as a, ReadingRebasePlan as at, AgentChanges as b, SessionOrigins as c, RewindCaps as ct, SessionOperationRow as d, RewindPrefixControl as dt, ReadingObject as et, DeliveryKind as f, SessionCatalog as g, OwnedSessionCatalog as h, TriggerRunRow as i, ReadingQuery as it, FileRows as j, FileAddress as k, SessionForkRow as l, RewindCommitCredential as lt, DigestAuthor as m, TriggerRows as n, ReadingPatch as nt, ParticipantBy as o, ReadingStatus as ot, SessionDelivery as p, BoundedUndoAction as q, TriggerRunKind as r, ReadingPublication as rt, SessionCreatorRow as s, ReadingStore as st, TriggerRow as t, ReadingObjectMetadata as tt, SessionHistoryRows as u, RewindInspection as ut, SessionParameterProjection as v, ScopeCatalog as w, AgentRow as x, SessionRow as y, ResourceGrant as z };
|