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