@deepseek-ai/dsh-tool-cordis 0.1.2-alpha.3 → 0.1.2-alpha.4
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/README.i18n.yaml +2 -2
- package/README.md +2 -0
- package/README.zh.md +2 -0
- package/lib/index.js +138 -129
- package/package.json +16 -23
- package/lib/invariant.js +0 -23
- package/lib/types/invariant.d.ts +0 -16
package/README.i18n.yaml
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write packages/extensions/tool-cordis/README.md
|
|
5
|
-
README.md:
|
|
6
|
-
README.zh.md:
|
|
5
|
+
README.md: 574a98ed7fe75e8af108906d80b2cd0c2e043fe8
|
|
6
|
+
README.zh.md: d48d7539f8724834a2272eb7bed7e9b353f27edc
|
package/README.md
CHANGED
|
@@ -192,3 +192,5 @@ These limits define when the toolset is a poor fit or needs special care. They a
|
|
|
192
192
|
None.
|
|
193
193
|
|
|
194
194
|
</details>
|
|
195
|
+
|
|
196
|
+
**Runtime invariant:** No companion is published. This model-facing adapter has no independent lifecycle stream; execution relations are owned by the capability seam it calls.
|
package/README.zh.md
CHANGED
package/lib/index.js
CHANGED
|
@@ -821,7 +821,7 @@ const SERVICE_API = [
|
|
|
821
821
|
methods: [
|
|
822
822
|
{
|
|
823
823
|
signature: "abstract readonly language: string",
|
|
824
|
-
description: "The source language run expects `program` to be written in, as a lowercase identifier. Informational, not gating — a consumer that generates language-specific presentation (typed SDK stubs, usage instructions) switches on it and fails loud on a language it cannot present. Well-known values: `'typescript'` and `'python'`, those `dsh-tools` presents;
|
|
824
|
+
description: "The source language run expects `program` to be written in, as a lowercase identifier. Informational, not gating — a consumer that generates language-specific presentation (typed SDK stubs, usage instructions) switches on it and fails loud on a language it cannot present. Well-known values: `'typescript'` and `'python'`, those `dsh-tools` presents; the TypeScript backend is released, the Python backend is experimental and private (not published).",
|
|
825
825
|
parameters: []
|
|
826
826
|
},
|
|
827
827
|
{
|
|
@@ -945,7 +945,7 @@ const SERVICE_API = [
|
|
|
945
945
|
throws: ["{@link ManualCompactionError} for expected busy, agent-cancellation, changed-span, summarization/shrink, commit-stage, or persistence failures; an aborted request preserves its exact abort reason. Failed attempts remain visible in the log."]
|
|
946
946
|
},
|
|
947
947
|
{
|
|
948
|
-
signature: "abstract compactRegion( start:
|
|
948
|
+
signature: "abstract compactRegion( start: SessionSeq, end: SessionSeq, agent: CompactionAgentContext, signal?: AbortSignal, ): Promise<CompactionResult>",
|
|
949
949
|
description: "Forcibly compact a range of surface nodes into a single summary node. `start` and `end` name an inclusive span by surface position, not numeric seq order; replacements can make visible seqs non-monotonic. Both edges must be balanced so assistant tool calls remain paired with their results. A model- backed implementation forwards cancellation and rejects active, missing, reversed, or unbalanced ranges. The target session is `agent.session`. Its replacement user message must use compactCheckpointSource with the transaction's `CompactionId`. Use toolPairingBalancedBefore and toolPairingBalancedAfter for the edge checks.",
|
|
950
950
|
parameters: [
|
|
951
951
|
{
|
|
@@ -2096,7 +2096,7 @@ const SERVICE_API = [
|
|
|
2096
2096
|
returns: "the live Agent or the stable Session-domain failure."
|
|
2097
2097
|
},
|
|
2098
2098
|
{
|
|
2099
|
-
signature: "inspect( sessionId: SessionId, signal?: AbortSignal, ): Promise<
|
|
2099
|
+
signature: "inspect( sessionId: SessionId, signal?: AbortSignal, ): Promise<SessionInspection>",
|
|
2100
2100
|
description: "Inspect one attached or persisted Session without activating its Agent.",
|
|
2101
2101
|
parameters: [{
|
|
2102
2102
|
name: "sessionId",
|
|
@@ -2323,11 +2323,14 @@ const SERVICE_API = [
|
|
|
2323
2323
|
throws: ["when this backend does not expose per-session raw artifacts."]
|
|
2324
2324
|
},
|
|
2325
2325
|
{
|
|
2326
|
-
signature: "abstract create(meta: SessionHeader): Promise<void>",
|
|
2326
|
+
signature: "abstract create(meta: SessionHeader, inheritedEventCount?: SessionLogOffset): Promise<void>",
|
|
2327
2327
|
description: "Register a new session's metadata. A backend MAY defer the physical write until the first append (lazy materialization), in which case a created-but-never-appended session is absent from list — abandoned sessions leave nothing behind.",
|
|
2328
2328
|
parameters: [{
|
|
2329
2329
|
name: "meta",
|
|
2330
2330
|
description: "the immutable header (id, version, cwd, lineage) to record."
|
|
2331
|
+
}, {
|
|
2332
|
+
name: "inheritedEventCount",
|
|
2333
|
+
description: "exact fork-inherited prefix length. Required for a seeded header and omitted only for an unseeded header."
|
|
2331
2334
|
}]
|
|
2332
2335
|
},
|
|
2333
2336
|
{
|
|
@@ -2340,7 +2343,7 @@ const SERVICE_API = [
|
|
|
2340
2343
|
},
|
|
2341
2344
|
{
|
|
2342
2345
|
signature: "abstract append(id: SessionId, events: readonly SessionEvent[]): Promise<void>",
|
|
2343
|
-
description: "Durably persist a batch of events. Honors the append-only and contiguous- seq contracts: the first event's `seq` MUST equal the stored next-seq (after `load` has durably closed any interrupted turn). Rejects non-JSON- serializable `event.data` with an error naming the offending event type.",
|
|
2346
|
+
description: "Durably persist a batch of events. Honors the append-only and contiguous- seq contracts: the first event's `seq` MUST equal the stored next-seq (after `load` has durably closed any interrupted turn). Rejects non-JSON- serializable `event.data` with an error naming the offending event type. A seeded session's first materializing batch must reach its complete inherited prefix.",
|
|
2344
2347
|
parameters: [{
|
|
2345
2348
|
name: "id",
|
|
2346
2349
|
description: "the session the batch belongs to."
|
|
@@ -2395,7 +2398,7 @@ const SERVICE_API = [
|
|
|
2395
2398
|
returns: "a disposable immutable observation."
|
|
2396
2399
|
},
|
|
2397
2400
|
{
|
|
2398
|
-
signature: "abstract readFrom(id: SessionId, fromSeq:
|
|
2401
|
+
signature: "abstract readFrom(id: SessionId, fromSeq: SessionLogOffset, signal?: AbortSignal): Promise<SessionEventSuffix>",
|
|
2399
2402
|
description: "Read the stored events from `fromSeq` onward — the read-from-seq primitive for read models that resume from a watermark (e.g. a persisted projection cache folding only the tail past its checkpoint). Unlike inspect, it is a detached physical suffix read: no preparation cache, torn-tail truncation, synthetic closers, or coordinator-state publication. Only events from the valid contiguous stored prefix are returned, so a torn fragment never reaches the caller. `fromSeq` at or beyond the stored prefix returns an empty event list (never an error). A backend whose medium can seek by seq may read only the suffix; sequential media such as JSONL still parse the whole artifact and skip forward. The primitive bounds what is returned and refolded, not every backend's physical read.",
|
|
2400
2403
|
parameters: [
|
|
2401
2404
|
{
|
|
@@ -2404,14 +2407,14 @@ const SERVICE_API = [
|
|
|
2404
2407
|
},
|
|
2405
2408
|
{
|
|
2406
2409
|
name: "fromSeq",
|
|
2407
|
-
description: "first event
|
|
2410
|
+
description: "first event offset to include."
|
|
2408
2411
|
},
|
|
2409
2412
|
{
|
|
2410
2413
|
name: "signal",
|
|
2411
2414
|
description: "optional cancellation for queued and backend read work."
|
|
2412
2415
|
}
|
|
2413
2416
|
],
|
|
2414
|
-
returns: "the
|
|
2417
|
+
returns: "storage metadata, the requested offset, and stored events with `seq >= fromSeq`."
|
|
2415
2418
|
},
|
|
2416
2419
|
{
|
|
2417
2420
|
signature: "abstract list(signal?: AbortSignal): Promise<SessionHeader[]>",
|
|
@@ -2439,34 +2442,34 @@ const SERVICE_API = [
|
|
|
2439
2442
|
description: "The persisted projection cache service. Opens the `session_projcache` domain at init, checkpoints live sessions on a throttled write-behind (count/interval triggers from Config) plus three mandatory points — session creation, `turn/end`, and session disposal (the live-to-cold moment) — and serves the cached rows for a session header. Every durable write is fail-soft: failures log a warning and the cache self-heals on the next write.",
|
|
2440
2443
|
methods: [
|
|
2441
2444
|
{
|
|
2442
|
-
signature: "cachedSnapshot( meta: SessionHeader, keys?: readonly Extract<keyof SessionProjectionMap, string>[], ): ProjectionSnapshot | undefined",
|
|
2445
|
+
signature: "cachedSnapshot( meta: SessionHeader, inheritedEventCount: SessionLogOffset, keys?: readonly Extract<keyof SessionProjectionMap, string>[], ): ProjectionSnapshot | undefined",
|
|
2443
2446
|
description: "The zero-I/O listing read: whole values viewed straight from the stored rows (version-matching keys only), each cut carried with its watermark so a client value store can seed under its higher-seq-wins rule — as stale as the last durable checkpoint but never wrong, and never from an unrelated log (the caller's header is the identity witness). Fresher paths (the history tail baseline) supersede these values whenever a session is actually opened.",
|
|
2444
|
-
parameters: [{
|
|
2445
|
-
name: "meta",
|
|
2446
|
-
description: "the listed session's header (identity witness; no log read)."
|
|
2447
|
-
}, {
|
|
2448
|
-
name: "keys",
|
|
2449
|
-
description: "optional projection keys required by the caller's audience."
|
|
2450
|
-
}],
|
|
2451
|
-
returns: "the cut (`asOfSeq` = lowest served-row watermark), or `undefined` when no usable row exists for this lifecycle."
|
|
2452
|
-
},
|
|
2453
|
-
{
|
|
2454
|
-
signature: "hydratePrepared( session: Session, meta: SessionHeader, events: readonly SessionEvent[], ): ProjectionSnapshot",
|
|
2455
|
-
description: "Hydrate projection cells for an already-prepared Session without another persistence read. The cache seeds matching rows; the supplied exact log advances every unit to the observation cut. No checkpoint is written because the logical observation may contain recovery events not yet durable.",
|
|
2456
2447
|
parameters: [
|
|
2457
2448
|
{
|
|
2458
|
-
name: "
|
|
2459
|
-
description: "
|
|
2449
|
+
name: "meta",
|
|
2450
|
+
description: "the listed session's header (identity witness; no log read)."
|
|
2460
2451
|
},
|
|
2461
2452
|
{
|
|
2462
|
-
name: "
|
|
2463
|
-
description: "
|
|
2453
|
+
name: "inheritedEventCount",
|
|
2454
|
+
description: "exact inherited prefix length that completes the checkpoint identity."
|
|
2464
2455
|
},
|
|
2465
2456
|
{
|
|
2466
|
-
name: "
|
|
2467
|
-
description: "
|
|
2457
|
+
name: "keys",
|
|
2458
|
+
description: "optional projection keys required by the caller's audience."
|
|
2468
2459
|
}
|
|
2469
2460
|
],
|
|
2461
|
+
returns: "the cut (`asOfSeq` = lowest served-row watermark), or `undefined` when no usable row exists for this lifecycle."
|
|
2462
|
+
},
|
|
2463
|
+
{
|
|
2464
|
+
signature: "hydratePrepared( session: Session, events: readonly SessionEvent[], ): ProjectionSnapshot",
|
|
2465
|
+
description: "Hydrate projection cells for an already-prepared Session without another persistence read. The cache seeds matching rows; the supplied exact log advances every unit to the observation cut. No checkpoint is written because the logical observation may contain recovery events not yet durable.",
|
|
2466
|
+
parameters: [{
|
|
2467
|
+
name: "session",
|
|
2468
|
+
description: "exact unpublished Session retained by persistence."
|
|
2469
|
+
}, {
|
|
2470
|
+
name: "events",
|
|
2471
|
+
description: "exact logical event prefix represented by the observation."
|
|
2472
|
+
}],
|
|
2470
2473
|
returns: "all projection values at the event cut."
|
|
2471
2474
|
},
|
|
2472
2475
|
{
|
|
@@ -2479,15 +2482,22 @@ const SERVICE_API = [
|
|
|
2479
2482
|
returns: "resolution after durability and event emission."
|
|
2480
2483
|
},
|
|
2481
2484
|
{
|
|
2482
|
-
signature: "coldSnapshot(meta: SessionHeader, events: readonly SessionEvent[]): ProjectionSnapshot",
|
|
2485
|
+
signature: "coldSnapshot( meta: SessionHeader, inheritedEventCount: SessionLogOffset, events: readonly SessionEvent[], ): ProjectionSnapshot",
|
|
2483
2486
|
description: "Cold-read one session's projections from its complete log. Each unit is seeded from the identity-checked cached rows — the registry skips `apply` for the already-folded prefix (events at or below the row's `seq`) — and the refreshed checkpoint is written back (fail-soft, fire-and-forget), so the first cold read creates the cache row and later ones seed from it. The caller supplies the complete log in seq order: this service never consults the persistence layer.",
|
|
2484
|
-
parameters: [
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2487
|
+
parameters: [
|
|
2488
|
+
{
|
|
2489
|
+
name: "meta",
|
|
2490
|
+
description: "the stored session header (identity witness)."
|
|
2491
|
+
},
|
|
2492
|
+
{
|
|
2493
|
+
name: "inheritedEventCount",
|
|
2494
|
+
description: "exact inherited prefix length for projection initialization and identity."
|
|
2495
|
+
},
|
|
2496
|
+
{
|
|
2497
|
+
name: "events",
|
|
2498
|
+
description: "the session's complete log, in seq order."
|
|
2499
|
+
}
|
|
2500
|
+
],
|
|
2491
2501
|
returns: "the projection cut at the log end."
|
|
2492
2502
|
}
|
|
2493
2503
|
]
|
|
@@ -2570,7 +2580,7 @@ const SERVICE_API = [
|
|
|
2570
2580
|
returns: "one row per registered key."
|
|
2571
2581
|
},
|
|
2572
2582
|
{
|
|
2573
|
-
signature: "restoreFloor(checkpoint: ProjectionCheckpoint):
|
|
2583
|
+
signature: "restoreFloor(checkpoint: ProjectionCheckpoint): SessionLogOffset | undefined",
|
|
2574
2584
|
description: "The stored seq a restore tail read over `checkpoint` must start at: one event BELOW the lowest usable watermark (a row is usable when its `ver` matches the live unit's `stateVersion`; an absent or mismatched row pulls the floor to `0` — that key must refold the full log). The one-below anchor is load-bearing: the tail then proves how far the stored log still extends, so restore can detect a log that shrank below a row's watermark (crash-repair truncation) instead of serving the stale row as current — an empty tail read from the anchor yields an end below every watermark and the restore rejects for a full re-read.",
|
|
2575
2585
|
parameters: [{
|
|
2576
2586
|
name: "checkpoint",
|
|
@@ -2591,7 +2601,7 @@ const SERVICE_API = [
|
|
|
2591
2601
|
returns: "whole values per key with a usable row; empty when none."
|
|
2592
2602
|
},
|
|
2593
2603
|
{
|
|
2594
|
-
signature: "restore( checkpoint: ProjectionCheckpoint, events: readonly SessionEvent[], baseSeq:
|
|
2604
|
+
signature: "restore( checkpoint: ProjectionCheckpoint, events: readonly SessionEvent[], baseSeq: SessionLogOffset, header: SessionHeader, inheritedEventCount: SessionLogOffset, ): { snapshot: ProjectionSnapshot; checkpoint: ProjectionCheckpoint }",
|
|
2595
2605
|
description: "Cold read: fold every persisted unit over a stored log suffix, seeding each from its checkpoint row when usable — the one read recipe (cached state + forward tail replay + `view`) applied without a live `Session`. Call with the events returned by a persistence `readFrom(id, restoreFloor(checkpoint))` and that same floor as `baseSeq`; the floor's one-below anchor makes the supplied end honest, so a shrunk log is detected here. A row is usable iff its `ver` matches the live unit's `stateVersion`, it does not predate `baseSeq` (`seq >= baseSeq - 1`), and it does not claim events past the supplied end (`seq <= endSeq`); an unusable row is discarded and its key refolds from `init` — which is only sound over the full log, so a discarded row with `baseSeq > 0` throws (the caller re-reads from seq 0, e.g. after a crash-repair truncation shrank the log below a row's watermark).",
|
|
2596
2606
|
parameters: [
|
|
2597
2607
|
{
|
|
@@ -2609,12 +2619,16 @@ const SERVICE_API = [
|
|
|
2609
2619
|
{
|
|
2610
2620
|
name: "header",
|
|
2611
2621
|
description: "immutable metadata for the Session being restored."
|
|
2622
|
+
},
|
|
2623
|
+
{
|
|
2624
|
+
name: "inheritedEventCount",
|
|
2625
|
+
description: "exact fork-inherited prefix length supplied to unit initialization."
|
|
2612
2626
|
}
|
|
2613
2627
|
],
|
|
2614
2628
|
returns: "the snapshot cut at the supplied log end (`asOfSeq` is the last supplied event's seq, `baseSeq - 1` for an empty tail) plus the refreshed checkpoint rows at that cut, ready for a durable write-back."
|
|
2615
2629
|
},
|
|
2616
2630
|
{
|
|
2617
|
-
signature: "hydrate( session: Session, checkpoint: ProjectionCheckpoint, events: readonly SessionEvent[], baseSeq:
|
|
2631
|
+
signature: "hydrate( session: Session, checkpoint: ProjectionCheckpoint, events: readonly SessionEvent[], baseSeq: SessionLogOffset, ): ProjectionSnapshot",
|
|
2618
2632
|
description: "Restore an exact cut and install its states on the supplied prepared Session. A later publication reuses these cells; ordinary live reads and event drive advance any constructor-owned suffix exactly once.",
|
|
2619
2633
|
parameters: [
|
|
2620
2634
|
{
|
|
@@ -2965,7 +2979,7 @@ const SERVICE_API = [
|
|
|
2965
2979
|
returns: "a fresh array; mutating it does not affect the store."
|
|
2966
2980
|
},
|
|
2967
2981
|
{
|
|
2968
|
-
signature: "fork(source: SessionForkSource, boundary?:
|
|
2982
|
+
signature: "fork(source: SessionForkSource, boundary?: SessionSeq, childSessionId?: SessionId): Session",
|
|
2969
2983
|
description: "Create a live child session from a stable prefix of a live source. `boundary` is an inclusive source event seq; omitted means the source's current last event. The selected slice may end with a between-turn event but must not end inside an open turn.",
|
|
2970
2984
|
parameters: [
|
|
2971
2985
|
{
|
|
@@ -3553,28 +3567,28 @@ const SERVICE_API = [
|
|
|
3553
3567
|
throws: ["when continuation services are unavailable or materialization fails."]
|
|
3554
3568
|
},
|
|
3555
3569
|
{
|
|
3556
|
-
signature: "async
|
|
3557
|
-
description: "
|
|
3570
|
+
signature: "async sendMessage( sender: Agent, targetId: SessionId, content: ContentBlock[], options: SubagentSendMessageOptions, ): Promise<MessageId>",
|
|
3571
|
+
description: "Steer one model-authored message to the sender's direct parent or direct continuable child. A running target admits it at the nearest step boundary; an idle target starts a turn, and an absent direct child cold-resumes from persistence. The service derives durable sender attribution from the exact live sender. Caller cancellation stops only pre-acceptance work.",
|
|
3558
3572
|
parameters: [
|
|
3559
3573
|
{
|
|
3560
|
-
name: "
|
|
3561
|
-
description: "
|
|
3574
|
+
name: "sender",
|
|
3575
|
+
description: "exact live Agent authorizing and originating the message."
|
|
3562
3576
|
},
|
|
3563
3577
|
{
|
|
3564
|
-
name: "
|
|
3565
|
-
description: "durable child session id."
|
|
3578
|
+
name: "targetId",
|
|
3579
|
+
description: "durable direct-parent or direct-child session id."
|
|
3566
3580
|
},
|
|
3567
3581
|
{
|
|
3568
3582
|
name: "content",
|
|
3569
|
-
description: "
|
|
3583
|
+
description: "model-authored content to deliver."
|
|
3570
3584
|
},
|
|
3571
3585
|
{
|
|
3572
3586
|
name: "options",
|
|
3573
|
-
description: "
|
|
3587
|
+
description: "caller cancellation before inbox acceptance."
|
|
3574
3588
|
}
|
|
3575
3589
|
],
|
|
3576
3590
|
returns: "the accepted message's inbox id.",
|
|
3577
|
-
throws: ["when continuation services are unavailable,
|
|
3591
|
+
throws: ["when continuation services are unavailable, adjacency is rejected, or the message was not admitted."]
|
|
3578
3592
|
},
|
|
3579
3593
|
{
|
|
3580
3594
|
signature: "interrupt(targetSessionId: SessionId, authority: SubagentInterruptAuthority): void",
|
|
@@ -3588,35 +3602,6 @@ const SERVICE_API = [
|
|
|
3588
3602
|
}],
|
|
3589
3603
|
throws: ["{SubagentError} `UNAUTHORIZED` when the authority does not own the live target."]
|
|
3590
3604
|
},
|
|
3591
|
-
{
|
|
3592
|
-
signature: "async reportFrom( child: Agent, content: ContentBlock[], options: SubagentReportOptions, ): Promise<MessageId>",
|
|
3593
|
-
description: "Deliver selected content from one live continuable child to its durable direct parent. The child is the authority credential; callers cannot name a recipient. Reporting does not conclude the child's turn or Activation.",
|
|
3594
|
-
parameters: [
|
|
3595
|
-
{
|
|
3596
|
-
name: "child",
|
|
3597
|
-
description: "exact live reporting child."
|
|
3598
|
-
},
|
|
3599
|
-
{
|
|
3600
|
-
name: "content",
|
|
3601
|
-
description: "selected model-facing content."
|
|
3602
|
-
},
|
|
3603
|
-
{
|
|
3604
|
-
name: "options",
|
|
3605
|
-
description: "parent scheduling and pre-acceptance cancellation."
|
|
3606
|
-
}
|
|
3607
|
-
],
|
|
3608
|
-
returns: "the stable identity of the parent-accepted message.",
|
|
3609
|
-
throws: ["when continuation services are unavailable, sender authorization fails, or the direct parent is not live."]
|
|
3610
|
-
},
|
|
3611
|
-
{
|
|
3612
|
-
signature: "registerContinuableSetup(contribution: ContinuableSetupContribution): () => void",
|
|
3613
|
-
description: "Compose one deployment capability into every continuable child's unpublished creation context on fresh creation and cold resume. Grants wait for the next Activation; removing the contribution revokes every resident installation immediately.",
|
|
3614
|
-
parameters: [{
|
|
3615
|
-
name: "contribution",
|
|
3616
|
-
description: "synchronous child-scope installer."
|
|
3617
|
-
}],
|
|
3618
|
-
returns: "the exact Cordis effect disposer."
|
|
3619
|
-
},
|
|
3620
3605
|
{
|
|
3621
3606
|
signature: "async drainContinuableDescendants(parents: readonly Agent[]): Promise<void>",
|
|
3622
3607
|
description: "Close continuable admission below exact live parent Agents, stop only their visible descendant Activations synchronously, then await admitted scoped materializations and release those forests child-first. The scoped cutoff lasts until each exact parent leaves the registry; unrelated parent trees remain live.",
|
|
@@ -5619,9 +5604,13 @@ const TYPE_API = [
|
|
|
5619
5604
|
name: "Branded",
|
|
5620
5605
|
declaration: "export type Branded<B extends string> = string & {\n readonly [BRAND]: B;\n};"
|
|
5621
5606
|
},
|
|
5607
|
+
{
|
|
5608
|
+
name: "BrandedNumber",
|
|
5609
|
+
declaration: "export type BrandedNumber<B extends string> = number & {\n readonly [BRAND]: B;\n};"
|
|
5610
|
+
},
|
|
5622
5611
|
{
|
|
5623
5612
|
name: "ChunkRow",
|
|
5624
|
-
declaration: "export type ChunkRow = {\n type: 'text-chunks';\n seq0:
|
|
5613
|
+
declaration: "export type ChunkRow = {\n type: 'text-chunks';\n seq0: SessionSeqType;\n time0: number;\n data: TextRunData;\n} | {\n type: 'reasoning-chunks';\n seq0: SessionSeqType;\n time0: number;\n data: TextRunData;\n} | {\n type: 'tool-call-chunks';\n seq0: SessionSeqType;\n time0: number;\n data: ToolCallRunData;\n};"
|
|
5625
5614
|
},
|
|
5626
5615
|
{
|
|
5627
5616
|
name: "ChunkRowEvent",
|
|
@@ -5689,7 +5678,7 @@ const TYPE_API = [
|
|
|
5689
5678
|
},
|
|
5690
5679
|
{
|
|
5691
5680
|
name: "CommandResult",
|
|
5692
|
-
declaration: "export type CommandResult = {\n readonly kind: 'success';\n readonly text?: string;\n readonly sourceEventSeq?:
|
|
5681
|
+
declaration: "export type CommandResult = {\n readonly kind: 'success';\n readonly text?: string;\n readonly sourceEventSeq?: SessionSeq;\n} | {\n readonly kind: 'error';\n readonly text: string;\n};"
|
|
5693
5682
|
},
|
|
5694
5683
|
{
|
|
5695
5684
|
name: "CompactionAgentContext",
|
|
@@ -5701,7 +5690,7 @@ const TYPE_API = [
|
|
|
5701
5690
|
},
|
|
5702
5691
|
{
|
|
5703
5692
|
name: "CompactionResult",
|
|
5704
|
-
declaration: "export interface CompactionResult {\n compactionId: CompactionId;\n sourceCommandId?: CommandId;\n startSeq:
|
|
5693
|
+
declaration: "export interface CompactionResult {\n compactionId: CompactionId;\n sourceCommandId?: CommandId;\n startSeq: SessionSeq;\n summarySeq: SessionSeq;\n endSeq: SessionSeq;\n summary: ContentBlock[];\n shadowedRange: {\n start: SessionSeq;\n end: SessionSeq;\n };\n shadowedSeqs: SessionSeq[];\n shadowedTokenCount: number;\n}"
|
|
5705
5694
|
},
|
|
5706
5695
|
{
|
|
5707
5696
|
name: "CompactionTrigger",
|
|
@@ -5743,10 +5732,6 @@ const TYPE_API = [
|
|
|
5743
5732
|
name: "ContinuableCreateSpec",
|
|
5744
5733
|
declaration: "export interface ContinuableCreateSpec {\n readonly seed?: readonly SessionEvent[];\n}"
|
|
5745
5734
|
},
|
|
5746
|
-
{
|
|
5747
|
-
name: "ContinuableSetupContribution",
|
|
5748
|
-
declaration: "export type ContinuableSetupContribution = (childCtx: Context) => () => void;"
|
|
5749
|
-
},
|
|
5750
5735
|
{
|
|
5751
5736
|
name: "ContinuableStart",
|
|
5752
5737
|
declaration: "export interface ContinuableStart {\n readonly childId: SessionId;\n readonly messageId: MessageId;\n}"
|
|
@@ -5829,7 +5814,7 @@ const TYPE_API = [
|
|
|
5829
5814
|
},
|
|
5830
5815
|
{
|
|
5831
5816
|
name: "CreateAgentOptions",
|
|
5832
|
-
declaration: "export interface CreateAgentOptions {\n readonly sessionId: SessionId;\n readonly meta?: {\n readonly cwd?: string;\n readonly parentSession?: SessionId;\n readonly
|
|
5817
|
+
declaration: "export interface CreateAgentOptions {\n readonly sessionId: SessionId;\n readonly meta?: {\n readonly cwd?: string;\n readonly parentSession?: SessionId;\n readonly isSeeded?: boolean;\n readonly origin?: 'subagent';\n readonly delegationDepth?: number;\n readonly agentPreset?: string;\n };\n readonly inheritedEventCount?: SessionLogOffset;\n readonly seed?: readonly SessionEvent[];\n readonly agentOptions?: AgentOptions;\n readonly signal?: AbortSignal;\n readonly setup?: AgentSetup;\n}"
|
|
5833
5818
|
},
|
|
5834
5819
|
{
|
|
5835
5820
|
name: "CreateGoalRequest",
|
|
@@ -5841,7 +5826,7 @@ const TYPE_API = [
|
|
|
5841
5826
|
},
|
|
5842
5827
|
{
|
|
5843
5828
|
name: "CreateSessionOptions",
|
|
5844
|
-
declaration: "export interface CreateSessionOptions {\n readonly seed?: readonly SessionEvent[];\n readonly meta?: {\n readonly cwd?: string;\n readonly parentSession?: SessionId;\n readonly createdAt?: number;\n readonly
|
|
5829
|
+
declaration: "export interface CreateSessionOptions {\n readonly seed?: readonly SessionEvent[];\n readonly inheritedEventCount?: SessionLogOffset;\n readonly meta?: {\n readonly cwd?: string;\n readonly parentSession?: SessionId;\n readonly createdAt?: number;\n readonly isSeeded?: boolean;\n readonly origin?: 'subagent';\n readonly delegationDepth?: number;\n readonly agentPreset?: string;\n };\n}"
|
|
5845
5830
|
},
|
|
5846
5831
|
{
|
|
5847
5832
|
name: "CreateTeamTaskRequest",
|
|
@@ -6519,6 +6504,10 @@ const TYPE_API = [
|
|
|
6519
6504
|
name: "OneShotSubagentDescriptorData",
|
|
6520
6505
|
declaration: "export interface OneShotSubagentDescriptorData extends SubagentDescriptorBase {\n readonly mode: 'one-shot';\n readonly label?: string;\n}"
|
|
6521
6506
|
},
|
|
6507
|
+
{
|
|
6508
|
+
name: "OptionalSessionSeq",
|
|
6509
|
+
declaration: "export type OptionalSessionSeq = SessionSeq | null;"
|
|
6510
|
+
},
|
|
6522
6511
|
{
|
|
6523
6512
|
name: "PermissionSelect",
|
|
6524
6513
|
declaration: "export interface PermissionSelect {\n options: PresetOption[];\n currentValue: string;\n}"
|
|
@@ -6573,7 +6562,7 @@ const TYPE_API = [
|
|
|
6573
6562
|
},
|
|
6574
6563
|
{
|
|
6575
6564
|
name: "ProjectionChangeListener",
|
|
6576
|
-
declaration: "export type ProjectionChangeListener = (session: Session, key: Extract<keyof SessionProjectionMap, string>, value: unknown, seq:
|
|
6565
|
+
declaration: "export type ProjectionChangeListener = (session: Session, key: Extract<keyof SessionProjectionMap, string>, value: unknown, seq: SessionSeq) => void;"
|
|
6577
6566
|
},
|
|
6578
6567
|
{
|
|
6579
6568
|
name: "ProjectionCheckpoint",
|
|
@@ -6581,15 +6570,15 @@ const TYPE_API = [
|
|
|
6581
6570
|
},
|
|
6582
6571
|
{
|
|
6583
6572
|
name: "ProjectionCheckpointRow",
|
|
6584
|
-
declaration: "export interface ProjectionCheckpointRow {\n ver: number;\n seq:
|
|
6573
|
+
declaration: "export interface ProjectionCheckpointRow {\n ver: number;\n seq: SessionSeqCursor;\n val: unknown;\n}"
|
|
6585
6574
|
},
|
|
6586
6575
|
{
|
|
6587
6576
|
name: "ProjectionDefinition",
|
|
6588
|
-
declaration: "export interface ProjectionDefinition<K extends keyof SessionProjectionStateMap, S extends SessionProjectionStateMap[K] = SessionProjectionStateMap[K]> {\n key: K;\n stateSchema: ZodType<S>;\n init(header: SessionHeader): NoInfer<S>;\n apply(state: NoInfer<S>, event: SessionEvent): NoInfer<S>;\n wire?: K extends keyof SessionProjectionMap ? {\n viewSchema: ZodType<SessionProjectionMap[K]>;\n view(state: NoInfer<S>): SessionProjectionMap[K];\n } : never;\n stateVersion: number;\n}"
|
|
6577
|
+
declaration: "export interface ProjectionDefinition<K extends keyof SessionProjectionStateMap, S extends SessionProjectionStateMap[K] = SessionProjectionStateMap[K]> {\n key: K;\n stateSchema: ZodType<S>;\n init(header: SessionHeader, inheritedEventCount: SessionLogOffset): NoInfer<S>;\n apply(state: NoInfer<S>, event: SessionEvent): NoInfer<S>;\n wire?: K extends keyof SessionProjectionMap ? {\n viewSchema: ZodType<SessionProjectionMap[K]>;\n view(state: NoInfer<S>): SessionProjectionMap[K];\n } : never;\n stateVersion: number;\n}"
|
|
6589
6578
|
},
|
|
6590
6579
|
{
|
|
6591
6580
|
name: "ProjectionSnapshot",
|
|
6592
|
-
declaration: "export interface ProjectionSnapshot {\n asOfSeq:
|
|
6581
|
+
declaration: "export interface ProjectionSnapshot {\n asOfSeq: SessionSeqCursor;\n values: Partial<SessionProjectionMap>;\n}"
|
|
6593
6582
|
},
|
|
6594
6583
|
{
|
|
6595
6584
|
name: "PromptAssembly",
|
|
@@ -6617,7 +6606,7 @@ const TYPE_API = [
|
|
|
6617
6606
|
},
|
|
6618
6607
|
{
|
|
6619
6608
|
name: "PrunedEntry",
|
|
6620
|
-
declaration: "export interface PrunedEntry {\n readonly originalSeq:
|
|
6609
|
+
declaration: "export interface PrunedEntry {\n readonly originalSeq: SessionSeq;\n readonly replacementSeq: SessionSeq;\n readonly callId: ToolCallId;\n readonly charsBefore: number;\n readonly charsAfter: number;\n}"
|
|
6621
6610
|
},
|
|
6622
6611
|
{
|
|
6623
6612
|
name: "PruneResult",
|
|
@@ -6713,7 +6702,7 @@ const TYPE_API = [
|
|
|
6713
6702
|
},
|
|
6714
6703
|
{
|
|
6715
6704
|
name: "RestoredSessionOptions",
|
|
6716
|
-
declaration: "export interface RestoredSessionOptions {\n readonly seed: SessionEvent[];\n readonly meta: SessionHeader;\n readonly seedSource: 'persistence';\n}"
|
|
6705
|
+
declaration: "export interface RestoredSessionOptions {\n readonly seed: SessionEvent[];\n readonly meta: SessionHeader;\n readonly inheritedEventCount: SessionLogOffset;\n readonly seedSource: 'persistence';\n}"
|
|
6717
6706
|
},
|
|
6718
6707
|
{
|
|
6719
6708
|
name: "ResumeAgentOptions",
|
|
@@ -6797,7 +6786,7 @@ const TYPE_API = [
|
|
|
6797
6786
|
},
|
|
6798
6787
|
{
|
|
6799
6788
|
name: "Session",
|
|
6800
|
-
declaration: "export class Session {\n get surface(): SessionSurface;\n readonly header: SessionHeader;\n get id(): SessionId;\n readonly firstLiveSeq:
|
|
6789
|
+
declaration: "export class Session {\n get surface(): SessionSurface;\n readonly header: SessionHeader;\n readonly inheritedEventCount: SessionLogOffset;\n get id(): SessionId;\n readonly firstLiveSeq: SessionLogOffset;\n static create(id: SessionId, seed?: readonly SessionEvent[], header?: SessionHeader, inheritedEventCount?: SessionLogOffset): Session;\n static fromRestore(id: SessionId, seed: readonly SessionEvent[], header: SessionHeader, inheritedEventCount: SessionLogOffset): Session;\n eventAt(seq: SessionSeq): SessionEvent | undefined;\n snapshotEvents(fromSeq: SessionLogOffset = SessionLogOffset(0), toSeqExclusive: SessionLogOffset = this.seq): readonly SessionEvent[];\n ownEvents(): readonly SessionEvent[];\n isOwnSeq(seq: SessionSeq): boolean;\n get seq(): SessionLogOffset;\n append<T extends SessionEventType>(type: T, data: SessionEventMap[T], ...opts: T extends SurfaceEventType ? [\n opts: SurfaceIntent\n ] : [\n ]): SessionEvent<T>;\n requestHeader(): EpochHeader | undefined;\n requestContext(): RequestContext | undefined;\n deriveMessages(): Message[];\n deriveEventMessage(event: SessionEvent): Message | null;\n}"
|
|
6801
6790
|
},
|
|
6802
6791
|
{
|
|
6803
6792
|
name: "SessionAddress",
|
|
@@ -6845,7 +6834,7 @@ const TYPE_API = [
|
|
|
6845
6834
|
},
|
|
6846
6835
|
{
|
|
6847
6836
|
name: "SessionEvent",
|
|
6848
|
-
declaration: "export type SessionEvent<T extends SessionEventType = SessionEventType> = {\n [K in SessionEventType]: {\n type: K;\n seq:
|
|
6837
|
+
declaration: "export type SessionEvent<T extends SessionEventType = SessionEventType> = {\n [K in SessionEventType]: {\n type: K;\n seq: SessionSeq;\n time: number;\n data: SessionEventMap[K];\n ignorable?: true;\n } & (K extends SurfaceEventType ? {\n sourceEventSeqs?: SessionSeq[];\n surfaceOp?: SurfaceOp;\n } : object);\n}[T];"
|
|
6849
6838
|
},
|
|
6850
6839
|
{
|
|
6851
6840
|
name: "SessionEventEntry",
|
|
@@ -6861,11 +6850,11 @@ const TYPE_API = [
|
|
|
6861
6850
|
},
|
|
6862
6851
|
{
|
|
6863
6852
|
name: "SessionEventReadRequest",
|
|
6864
|
-
declaration: "export interface SessionEventReadRequest {\n sessionId: SessionId;\n seq:
|
|
6853
|
+
declaration: "export interface SessionEventReadRequest {\n sessionId: SessionId;\n seq: SessionSeq;\n before?: number;\n after?: number;\n}"
|
|
6865
6854
|
},
|
|
6866
6855
|
{
|
|
6867
6856
|
name: "SessionEventRecord",
|
|
6868
|
-
declaration: "export interface SessionEventRecord {\n sessionId: SessionId;\n seq:
|
|
6857
|
+
declaration: "export interface SessionEventRecord {\n sessionId: SessionId;\n seq: SessionSeq;\n type: SessionEventType;\n time: number;\n surface: SessionEventSurface;\n}"
|
|
6869
6858
|
},
|
|
6870
6859
|
{
|
|
6871
6860
|
name: "SessionEventResultFilter",
|
|
@@ -6887,13 +6876,17 @@ const TYPE_API = [
|
|
|
6887
6876
|
name: "SessionEventSearchRequest",
|
|
6888
6877
|
declaration: "export interface SessionEventSearchRequest {\n sessionId: SessionId;\n query: string;\n filters?: readonly SessionEventMetadataFilter[];\n limit?: number;\n cursor?: SessionSearchCursor;\n}"
|
|
6889
6878
|
},
|
|
6879
|
+
{
|
|
6880
|
+
name: "SessionEventSuffix",
|
|
6881
|
+
declaration: "export interface SessionEventSuffix extends SessionStorageMetadata {\n readonly fromSeq: SessionLogOffset;\n readonly events: readonly SessionEvent[];\n}"
|
|
6882
|
+
},
|
|
6890
6883
|
{
|
|
6891
6884
|
name: "SessionEventSurface",
|
|
6892
6885
|
declaration: "export type SessionEventSurface = 'current' | 'shadowed' | 'log-only';"
|
|
6893
6886
|
},
|
|
6894
6887
|
{
|
|
6895
6888
|
name: "SessionEventTrace",
|
|
6896
|
-
declaration: "export interface SessionEventTrace {\n target: SessionEventRecord;\n replacedBy?:
|
|
6889
|
+
declaration: "export interface SessionEventTrace {\n target: SessionEventRecord;\n replacedBy?: SessionSeq;\n replacementChain: SessionSeq[];\n replacedEventSeqs: SessionSeq[];\n sourceEventSeqs: SessionSeq[];\n derivedEventSeqs: SessionSeq[];\n}"
|
|
6897
6890
|
},
|
|
6898
6891
|
{
|
|
6899
6892
|
name: "SessionEventTraceObservation",
|
|
@@ -6901,7 +6894,7 @@ const TYPE_API = [
|
|
|
6901
6894
|
},
|
|
6902
6895
|
{
|
|
6903
6896
|
name: "SessionEventTraceRequest",
|
|
6904
|
-
declaration: "export interface SessionEventTraceRequest {\n sessionId: SessionId;\n seq:
|
|
6897
|
+
declaration: "export interface SessionEventTraceRequest {\n sessionId: SessionId;\n seq: SessionSeq;\n}"
|
|
6905
6898
|
},
|
|
6906
6899
|
{
|
|
6907
6900
|
name: "SessionEventType",
|
|
@@ -6909,11 +6902,11 @@ const TYPE_API = [
|
|
|
6909
6902
|
},
|
|
6910
6903
|
{
|
|
6911
6904
|
name: "SessionEventWindow",
|
|
6912
|
-
declaration: "export interface SessionEventWindow {\n session: SessionHeader;\n target: SessionEvent;\n events: SessionEvent[];\n startSeq:
|
|
6905
|
+
declaration: "export interface SessionEventWindow {\n session: SessionHeader;\n inheritedEventCount: SessionLogOffset;\n target: SessionEvent;\n events: SessionEvent[];\n startSeq: SessionSeq;\n endSeq: SessionSeq;\n}"
|
|
6913
6906
|
},
|
|
6914
6907
|
{
|
|
6915
6908
|
name: "SessionFollowFrame",
|
|
6916
|
-
declaration: "export type SessionFollowFrame = {\n readonly type: 'snapshot';\n readonly header:
|
|
6909
|
+
declaration: "export type SessionFollowFrame = {\n readonly type: 'snapshot';\n readonly header: SessionWireHeader;\n readonly cursor: number;\n readonly records: readonly SessionHistoryRecord[];\n readonly hasMore: boolean;\n readonly projections: SessionProjectionBaseline;\n} | SessionEventEntry;"
|
|
6917
6910
|
},
|
|
6918
6911
|
{
|
|
6919
6912
|
name: "SessionFollowRequest",
|
|
@@ -6933,7 +6926,7 @@ const TYPE_API = [
|
|
|
6933
6926
|
},
|
|
6934
6927
|
{
|
|
6935
6928
|
name: "SessionHeader",
|
|
6936
|
-
declaration: "export interface SessionHeader {\n readonly version: number;\n readonly id: SessionId;\n readonly createdAt: number;\n readonly cwd?: string;\n readonly parentSession?: SessionId;\n readonly
|
|
6929
|
+
declaration: "export interface SessionHeader {\n readonly version: number;\n readonly id: SessionId;\n readonly createdAt: number;\n readonly cwd?: string;\n readonly parentSession?: SessionId;\n readonly isSeeded: boolean;\n readonly origin?: 'subagent';\n readonly delegationDepth?: number;\n readonly agentPreset?: string;\n}"
|
|
6937
6930
|
},
|
|
6938
6931
|
{
|
|
6939
6932
|
name: "SessionHistoryRecord",
|
|
@@ -6945,7 +6938,7 @@ const TYPE_API = [
|
|
|
6945
6938
|
},
|
|
6946
6939
|
{
|
|
6947
6940
|
name: "SessionInspection",
|
|
6948
|
-
declaration: "export interface SessionInspection {\n readonly
|
|
6941
|
+
declaration: "export interface SessionInspection extends SessionStorageMetadata {\n readonly events: readonly SessionEvent[];\n}"
|
|
6949
6942
|
},
|
|
6950
6943
|
{
|
|
6951
6944
|
name: "SessionJob",
|
|
@@ -6971,13 +6964,17 @@ const TYPE_API = [
|
|
|
6971
6964
|
name: "SessionLocation",
|
|
6972
6965
|
declaration: "export interface SessionLocation {\n readonly kind: string;\n readonly path: string;\n}"
|
|
6973
6966
|
},
|
|
6967
|
+
{
|
|
6968
|
+
name: "SessionLogOffset",
|
|
6969
|
+
declaration: "export type SessionLogOffset = BrandedNumber<'SessionLogOffset'>;"
|
|
6970
|
+
},
|
|
6974
6971
|
{
|
|
6975
6972
|
name: "SessionLogSnapshot",
|
|
6976
|
-
declaration: "export interface SessionLogSnapshot {\n session: SessionHeader;\n events: SessionEvent[];\n}"
|
|
6973
|
+
declaration: "export interface SessionLogSnapshot {\n session: SessionHeader;\n inheritedEventCount: SessionLogOffset;\n events: SessionEvent[];\n}"
|
|
6977
6974
|
},
|
|
6978
6975
|
{
|
|
6979
6976
|
name: "SessionObservation",
|
|
6980
|
-
declaration: "export interface SessionObservation extends Disposable {\n readonly source: 'live' | 'prepared';\n readonly header: SessionHeader;\n readonly events: readonly SessionEvent[];\n readonly cursor:
|
|
6977
|
+
declaration: "export interface SessionObservation extends Disposable {\n readonly source: 'live' | 'prepared';\n readonly header: SessionHeader;\n readonly events: readonly SessionEvent[];\n readonly inheritedEventCount: SessionLogOffsetType;\n readonly cursor: SessionSeqCursor;\n readonly revision?: SessionPersistenceRevision;\n readonly projections?: ProjectionSnapshot;\n retain(): SessionObservation;\n}"
|
|
6981
6978
|
},
|
|
6982
6979
|
{
|
|
6983
6980
|
name: "SessionObservationOptions",
|
|
@@ -7057,7 +7054,7 @@ const TYPE_API = [
|
|
|
7057
7054
|
},
|
|
7058
7055
|
{
|
|
7059
7056
|
name: "SessionRawArtifact",
|
|
7060
|
-
declaration: "export interface SessionRawArtifact {\n readonly
|
|
7057
|
+
declaration: "export interface SessionRawArtifact extends SessionStorageMetadata {\n readonly filename: string;\n readonly content: string;\n}"
|
|
7061
7058
|
},
|
|
7062
7059
|
{
|
|
7063
7060
|
name: "SessionRecord",
|
|
@@ -7127,21 +7124,33 @@ const TYPE_API = [
|
|
|
7127
7124
|
name: "SessionSelectModelValue",
|
|
7128
7125
|
declaration: "export interface SessionSelectModelValue {\n readonly selected: ModelSelection;\n}"
|
|
7129
7126
|
},
|
|
7127
|
+
{
|
|
7128
|
+
name: "SessionSeq",
|
|
7129
|
+
declaration: "export type SessionSeq = BrandedNumber<'SessionSeq'>;"
|
|
7130
|
+
},
|
|
7131
|
+
{
|
|
7132
|
+
name: "SessionSeqCursor",
|
|
7133
|
+
declaration: "export type SessionSeqCursor = SessionSeq | -1;"
|
|
7134
|
+
},
|
|
7130
7135
|
{
|
|
7131
7136
|
name: "SessionStartSource",
|
|
7132
7137
|
declaration: "export type SessionStartSource = 'startup' | 'resume' | 'clear' | 'compact';"
|
|
7133
7138
|
},
|
|
7139
|
+
{
|
|
7140
|
+
name: "SessionStorageMetadata",
|
|
7141
|
+
declaration: "export interface SessionStorageMetadata {\n readonly meta: SessionHeader;\n readonly inheritedEventCount: SessionLogOffset;\n}"
|
|
7142
|
+
},
|
|
7134
7143
|
{
|
|
7135
7144
|
name: "SessionSummary",
|
|
7136
7145
|
declaration: "export interface SessionSummary {\n readonly sessionId: SessionId;\n readonly updatedAt: number;\n readonly running: boolean;\n readonly blank: boolean;\n readonly parentSessionId?: SessionId;\n readonly origin?: 'subagent';\n readonly cwd?: string;\n readonly projections?: SessionProjectionHints;\n}"
|
|
7137
7146
|
},
|
|
7138
7147
|
{
|
|
7139
7148
|
name: "SessionSurface",
|
|
7140
|
-
declaration: "export interface SessionSurface {\n readonly nodes: readonly
|
|
7149
|
+
declaration: "export interface SessionSurface {\n readonly nodes: readonly SessionSeq[];\n readonly replaceGeneration: number;\n}"
|
|
7141
7150
|
},
|
|
7142
7151
|
{
|
|
7143
7152
|
name: "SessionSurfaceSnapshot",
|
|
7144
|
-
declaration: "export interface SessionSurfaceSnapshot {\n session: SessionHeader;\n capturedThroughSeq:
|
|
7153
|
+
declaration: "export interface SessionSurfaceSnapshot {\n session: SessionHeader;\n inheritedEventCount: SessionLogOffset;\n capturedThroughSeq: OptionalSessionSeq;\n events: SurfaceEvent[];\n}"
|
|
7145
7154
|
},
|
|
7146
7155
|
{
|
|
7147
7156
|
name: "SessionTelemetryRecord",
|
|
@@ -7161,7 +7170,7 @@ const TYPE_API = [
|
|
|
7161
7170
|
},
|
|
7162
7171
|
{
|
|
7163
7172
|
name: "SessionTitleEventData",
|
|
7164
|
-
declaration: "export interface SessionTitleEventData {\n readonly title: string;\n readonly messageSeqs:
|
|
7173
|
+
declaration: "export interface SessionTitleEventData {\n readonly title: string;\n readonly messageSeqs: SessionSeq[];\n readonly source: SessionTitleSource;\n}"
|
|
7165
7174
|
},
|
|
7166
7175
|
{
|
|
7167
7176
|
name: "SessionTitleModelProvenance",
|
|
@@ -7185,11 +7194,11 @@ const TYPE_API = [
|
|
|
7185
7194
|
},
|
|
7186
7195
|
{
|
|
7187
7196
|
name: "SessionTitleProviderResult",
|
|
7188
|
-
declaration: "export interface SessionTitleProviderResult {\n readonly title: string;\n readonly messageSeqs: readonly
|
|
7197
|
+
declaration: "export interface SessionTitleProviderResult {\n readonly title: string;\n readonly messageSeqs: readonly SessionSeq[];\n readonly model?: SessionTitleModelProvenance;\n}"
|
|
7189
7198
|
},
|
|
7190
7199
|
{
|
|
7191
7200
|
name: "SessionTitleSnapshot",
|
|
7192
|
-
declaration: "export interface SessionTitleSnapshot extends SessionTitleEventData {\n readonly eventSeq:
|
|
7201
|
+
declaration: "export interface SessionTitleSnapshot extends SessionTitleEventData {\n readonly eventSeq: SessionSeq;\n readonly updatedAt: number;\n}"
|
|
7193
7202
|
},
|
|
7194
7203
|
{
|
|
7195
7204
|
name: "SessionTitleSource",
|
|
@@ -7197,7 +7206,7 @@ const TYPE_API = [
|
|
|
7197
7206
|
},
|
|
7198
7207
|
{
|
|
7199
7208
|
name: "SessionTitleUserMessage",
|
|
7200
|
-
declaration: "export interface SessionTitleUserMessage {\n readonly seq:
|
|
7209
|
+
declaration: "export interface SessionTitleUserMessage {\n readonly seq: SessionSeq;\n readonly text: string;\n}"
|
|
7201
7210
|
},
|
|
7202
7211
|
{
|
|
7203
7212
|
name: "SessionUpdateQueueRequest",
|
|
@@ -7209,7 +7218,15 @@ const TYPE_API = [
|
|
|
7209
7218
|
},
|
|
7210
7219
|
{
|
|
7211
7220
|
name: "SessionWireEvent",
|
|
7212
|
-
declaration: "export interface SessionWireEvent {\n readonly type: string;\n readonly seq: number;\n readonly time: number;\n readonly data: JsonValue;\n readonly ignorable?: true;\n readonly sourceEventSeqs?: number[];\n readonly surfaceOp?:
|
|
7221
|
+
declaration: "export interface SessionWireEvent {\n readonly type: string;\n readonly seq: number;\n readonly time: number;\n readonly data: JsonValue;\n readonly ignorable?: true;\n readonly sourceEventSeqs?: number[];\n readonly surfaceOp?: SessionWireSurfaceOp;\n}"
|
|
7222
|
+
},
|
|
7223
|
+
{
|
|
7224
|
+
name: "SessionWireHeader",
|
|
7225
|
+
declaration: "export interface SessionWireHeader {\n readonly version: number;\n readonly id: SessionId;\n readonly createdAt: number;\n readonly cwd?: string;\n readonly parentSession?: SessionId;\n readonly seedLength?: number;\n readonly origin?: 'subagent';\n readonly delegationDepth?: number;\n readonly agentPreset?: string;\n}"
|
|
7226
|
+
},
|
|
7227
|
+
{
|
|
7228
|
+
name: "SessionWireSurfaceOp",
|
|
7229
|
+
declaration: "export type SessionWireSurfaceOp = 'append' | {\n readonly op: 'replace';\n readonly start: number;\n readonly end: number;\n};"
|
|
7213
7230
|
},
|
|
7214
7231
|
{
|
|
7215
7232
|
name: "SettingsApplies",
|
|
@@ -7411,10 +7428,6 @@ const TYPE_API = [
|
|
|
7411
7428
|
name: "SubagentDescriptorData",
|
|
7412
7429
|
declaration: "export type SubagentDescriptorData = OneShotSubagentDescriptorData | ContinuableSubagentDescriptorData;"
|
|
7413
7430
|
},
|
|
7414
|
-
{
|
|
7415
|
-
name: "SubagentFollowupOptions",
|
|
7416
|
-
declaration: "export interface SubagentFollowupOptions {\n readonly source: MessageSource;\n readonly signal: AbortSignal;\n}"
|
|
7417
|
-
},
|
|
7418
7431
|
{
|
|
7419
7432
|
name: "SubagentInterruptAuthority",
|
|
7420
7433
|
declaration: "export type SubagentInterruptAuthority = {\n readonly kind: 'user';\n readonly parentSessionId: SessionId;\n} | {\n readonly kind: 'ancestor';\n readonly agent: Agent;\n};"
|
|
@@ -7443,14 +7456,6 @@ const TYPE_API = [
|
|
|
7443
7456
|
name: "SubagentProvider",
|
|
7444
7457
|
declaration: "export interface SubagentProvider {\n readonly name: string;\n readonly capabilities: SubagentCapabilities;\n readonly inheritsParentContext: boolean;\n readonly agentRouteDefaults?: Readonly<{\n provider: string;\n model: string;\n }>;\n start(request: ResolvedSubagentStartRequest): Promise<SubagentRun>;\n prepareContinuable?(request: ContinuableCreateRequest): Promise<ContinuableCreateSpec>;\n}"
|
|
7445
7458
|
},
|
|
7446
|
-
{
|
|
7447
|
-
name: "SubagentReportDelivery",
|
|
7448
|
-
declaration: "export type SubagentReportDelivery = 'quiet' | 'next-step';"
|
|
7449
|
-
},
|
|
7450
|
-
{
|
|
7451
|
-
name: "SubagentReportOptions",
|
|
7452
|
-
declaration: "export interface SubagentReportOptions {\n readonly delivery: SubagentReportDelivery;\n readonly signal: AbortSignal;\n}"
|
|
7453
|
-
},
|
|
7454
7459
|
{
|
|
7455
7460
|
name: "SubagentResult",
|
|
7456
7461
|
declaration: "export interface SubagentResult {\n readonly output: ContentBlock[];\n readonly structured?: unknown;\n readonly diagnostic?: string;\n readonly stopReason: SubagentStopReason;\n}"
|
|
@@ -7473,7 +7478,11 @@ const TYPE_API = [
|
|
|
7473
7478
|
},
|
|
7474
7479
|
{
|
|
7475
7480
|
name: "SubagentRuntime",
|
|
7476
|
-
declaration: "export class SubagentRuntime extends TypertRemoteService {\n constructor(ctx: Context);\n async startContinuable(spec: ContinuableStartSpec): Promise<ContinuableStart>;\n async
|
|
7481
|
+
declaration: "export class SubagentRuntime extends TypertRemoteService {\n constructor(ctx: Context);\n async startContinuable(spec: ContinuableStartSpec): Promise<ContinuableStart>;\n async sendMessage(sender: Agent, targetId: SessionId, content: ContentBlock[], options: SubagentSendMessageOptions): Promise<MessageId>;\n interrupt(targetSessionId: SessionId, authority: SubagentInterruptAuthority): void;\n async drainContinuableDescendants(parents: readonly Agent[]): Promise<void>;\n async drainContinuableChildren(parent: Agent, childIds: readonly SessionId[]): Promise<void>;\n listChildren(parentSessionId: SessionId, signal?: AbortSignal): Promise<SubagentListEntry[]>;\n listDescendants(rootSessionId: SessionId, signal?: AbortSignal): Promise<SubagentDescendantListEntry[]>;\n @Remote('list')\n async remoteExportList(parentSessionId: SessionId, signal: AbortSignal): Promise<SubagentCatalog>;\n @Remote('prompt')\n async prompt(request: SubagentPromptRequest, signal: AbortSignal): Promise<SubagentPromptReceipt>;\n @Remote('interruptByParent')\n interruptByParent(childSessionId: SessionId, parentSessionId: SessionId, mode: 'continuable'): SubagentInterruptReceipt;\n registerProvider(provider: SubagentProvider): () => void;\n getProvider(name: string): SubagentProvider | undefined;\n list(): string[];\n async start(name: string, request: SubagentStartRequest): Promise<SubagentRun>;\n}"
|
|
7482
|
+
},
|
|
7483
|
+
{
|
|
7484
|
+
name: "SubagentSendMessageOptions",
|
|
7485
|
+
declaration: "export interface SubagentSendMessageOptions {\n readonly signal: AbortSignal;\n}"
|
|
7477
7486
|
},
|
|
7478
7487
|
{
|
|
7479
7488
|
name: "SubagentStartRequest",
|
|
@@ -7553,11 +7562,11 @@ const TYPE_API = [
|
|
|
7553
7562
|
},
|
|
7554
7563
|
{
|
|
7555
7564
|
name: "SurfaceIntent",
|
|
7556
|
-
declaration: "export interface SurfaceIntent {\n surfaceOp: SurfaceOp;\n sourceEventSeqs?:
|
|
7565
|
+
declaration: "export interface SurfaceIntent {\n surfaceOp: SurfaceOp;\n sourceEventSeqs?: SessionSeq[];\n}"
|
|
7557
7566
|
},
|
|
7558
7567
|
{
|
|
7559
7568
|
name: "SurfaceOp",
|
|
7560
|
-
declaration: "export type SurfaceOp = 'append' | {\n op: 'replace';\n start:
|
|
7569
|
+
declaration: "export type SurfaceOp = 'append' | {\n op: 'replace';\n start: SessionSeq;\n end: SessionSeq;\n};"
|
|
7561
7570
|
},
|
|
7562
7571
|
{
|
|
7563
7572
|
name: "SystemPrompt",
|
|
@@ -7697,7 +7706,7 @@ const TYPE_API = [
|
|
|
7697
7706
|
},
|
|
7698
7707
|
{
|
|
7699
7708
|
name: "TokenMeasurement",
|
|
7700
|
-
declaration: "export interface TokenMeasurement {\n readonly logRevision:
|
|
7709
|
+
declaration: "export interface TokenMeasurement {\n readonly logRevision: SessionLogOffset;\n readonly baseline: TokenMeasurementBaseline;\n readonly surfaceDeltaTokens: number;\n readonly totalTokens: number;\n readonly surfaceTokens: number;\n readonly nodes: readonly TokenSurfaceNode[];\n}"
|
|
7701
7710
|
},
|
|
7702
7711
|
{
|
|
7703
7712
|
name: "TokenMeasurementBaseline",
|
|
@@ -7705,7 +7714,7 @@ const TYPE_API = [
|
|
|
7705
7714
|
},
|
|
7706
7715
|
{
|
|
7707
7716
|
name: "TokenSurfaceNode",
|
|
7708
|
-
declaration: "export interface TokenSurfaceNode {\n readonly seq:
|
|
7717
|
+
declaration: "export interface TokenSurfaceNode {\n readonly seq: SessionSeq;\n readonly tokens: number;\n readonly heuristicTokens: number;\n}"
|
|
7709
7718
|
},
|
|
7710
7719
|
{
|
|
7711
7720
|
name: "TokenUsage",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-tool-cordis",
|
|
3
3
|
"description": "Self-referential cordis toolset: inspect the live runtime, mount and dispose model-written plugins",
|
|
4
|
-
"version": "0.1.2-alpha.
|
|
4
|
+
"version": "0.1.2-alpha.4",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -18,40 +18,33 @@
|
|
|
18
18
|
"types": "./lib/types/index.d.ts",
|
|
19
19
|
"default": "./lib/index.js"
|
|
20
20
|
},
|
|
21
|
-
"./invariant": {
|
|
22
|
-
"types": "./lib/types/invariant.d.ts",
|
|
23
|
-
"default": "./lib/invariant.js"
|
|
24
|
-
},
|
|
25
21
|
"./src/*": "./src/*",
|
|
26
22
|
"./package.json": "./package.json"
|
|
27
23
|
},
|
|
28
24
|
"files": [
|
|
29
25
|
"lib/index.js",
|
|
30
|
-
"lib/invariant.js",
|
|
31
26
|
"lib/types/**/*.d.ts"
|
|
32
27
|
],
|
|
33
28
|
"license": "MIT",
|
|
34
29
|
"peerDependencies": {
|
|
35
|
-
"@deepseek-ai/dsh-agent": "^0.1.2-alpha.
|
|
36
|
-
"@deepseek-ai/dsh-cordis-host-runner": "^0.1.2-alpha.
|
|
37
|
-
"@deepseek-ai/dsh-
|
|
38
|
-
"@deepseek-ai/dsh-
|
|
39
|
-
"@deepseek-ai/dsh-
|
|
40
|
-
"@deepseek-ai/dsh-
|
|
41
|
-
"@deepseek-ai/dsh-
|
|
42
|
-
"@deepseek-ai/dsh-tools": "^0.1.2-alpha.3",
|
|
30
|
+
"@deepseek-ai/dsh-agent": "^0.1.2-alpha.4",
|
|
31
|
+
"@deepseek-ai/dsh-cordis-host-runner": "^0.1.2-alpha.4",
|
|
32
|
+
"@deepseek-ai/dsh-llm": "^0.1.2-alpha.4",
|
|
33
|
+
"@deepseek-ai/dsh-scope": "^0.1.2-alpha.4",
|
|
34
|
+
"@deepseek-ai/dsh-session": "^0.1.2-alpha.4",
|
|
35
|
+
"@deepseek-ai/dsh-system-prompt": "^0.1.2-alpha.4",
|
|
36
|
+
"@deepseek-ai/dsh-tools": "^0.1.2-alpha.4",
|
|
43
37
|
"@deepseek-ai/cordis": "^4.0.2"
|
|
44
38
|
},
|
|
45
39
|
"devDependencies": {
|
|
46
40
|
"@deepseek-ai/cordis-plugin-loader": "^1.0.3",
|
|
47
|
-
"@deepseek-ai/dsh-
|
|
48
|
-
"@deepseek-ai/dsh-
|
|
49
|
-
"@deepseek-ai/dsh-
|
|
50
|
-
"@deepseek-ai/dsh-
|
|
51
|
-
"@deepseek-ai/dsh-
|
|
52
|
-
"@deepseek-ai/dsh-
|
|
53
|
-
"@deepseek-ai/dsh-
|
|
54
|
-
"@deepseek-ai/cordis": "^4.0.2"
|
|
55
|
-
"@deepseek-ai/dsh-tools": "^0.1.2-alpha.3"
|
|
41
|
+
"@deepseek-ai/dsh-agent": "^0.1.2-alpha.4",
|
|
42
|
+
"@deepseek-ai/dsh-cordis-host-runner": "^0.1.2-alpha.4",
|
|
43
|
+
"@deepseek-ai/dsh-llm": "^0.1.2-alpha.4",
|
|
44
|
+
"@deepseek-ai/dsh-scope": "^0.1.2-alpha.4",
|
|
45
|
+
"@deepseek-ai/dsh-session": "^0.1.2-alpha.4",
|
|
46
|
+
"@deepseek-ai/dsh-system-prompt": "^0.1.2-alpha.4",
|
|
47
|
+
"@deepseek-ai/dsh-tools": "^0.1.2-alpha.4",
|
|
48
|
+
"@deepseek-ai/cordis": "^4.0.2"
|
|
56
49
|
}
|
|
57
50
|
}
|
package/lib/invariant.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
//#region lib/types/invariant.js
|
|
2
|
-
/**
|
|
3
|
-
* Package-owned invariant companion for `@deepseek-ai/dsh-tool-cordis`.
|
|
4
|
-
* @module @deepseek-ai/dsh-tool-cordis/invariant
|
|
5
|
-
*/
|
|
6
|
-
const PACKAGE_NAME = "@deepseek-ai/dsh-tool-cordis";
|
|
7
|
-
/** Cordis companion plugin name. */
|
|
8
|
-
const name = "tool-cordis-invariant";
|
|
9
|
-
/** Service required before the companion can reserve package ownership. */
|
|
10
|
-
const inject = ["invariants"];
|
|
11
|
-
/**
|
|
12
|
-
* No runtime invariant: this model-facing adapter has no independent lifecycle stream; execution
|
|
13
|
-
* relations are owned by the capability seam it calls.
|
|
14
|
-
*/
|
|
15
|
-
const install = () => {};
|
|
16
|
-
/**
|
|
17
|
-
* Register this package's invariant companion.
|
|
18
|
-
* @param ctx - Cordis context carrying the invariant service.
|
|
19
|
-
* @returns the installed registration's disposer after setup succeeds.
|
|
20
|
-
*/
|
|
21
|
-
const apply = (ctx) => Promise.resolve(ctx.invariants.register(PACKAGE_NAME, install));
|
|
22
|
-
//#endregion
|
|
23
|
-
export { apply, inject, name };
|
package/lib/types/invariant.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Package-owned invariant companion for `@deepseek-ai/dsh-tool-cordis`.
|
|
3
|
-
* @module @deepseek-ai/dsh-tool-cordis/invariant
|
|
4
|
-
*/
|
|
5
|
-
import type { Context } from '@deepseek-ai/cordis';
|
|
6
|
-
/** Cordis companion plugin name. */
|
|
7
|
-
export declare const name = "tool-cordis-invariant";
|
|
8
|
-
/** Service required before the companion can reserve package ownership. */
|
|
9
|
-
export declare const inject: string[];
|
|
10
|
-
/**
|
|
11
|
-
* Register this package's invariant companion.
|
|
12
|
-
* @param ctx - Cordis context carrying the invariant service.
|
|
13
|
-
* @returns the installed registration's disposer after setup succeeds.
|
|
14
|
-
*/
|
|
15
|
-
export declare const apply: (ctx: Context) => Promise<() => void>;
|
|
16
|
-
//# sourceMappingURL=invariant.d.ts.map
|