From fb79a944f5eed29cdce0833006ac55a2478cbec4 Mon Sep 17 00:00:00 2001 From: _Kerman Date: Fri, 18 Sep 2026 13:28:36 +0800 Subject: [PATCH] refactor(llm): separate durable producer sources from request inputs Give durable user context its producer-owned source kind instead of a generic plugin wrapper. The V3-to-V4 conversion preserves the frozen rename and collision rules, all own JSON metadata, event coordinates, and historical request-only kinds. Native catalog and JSONL admission retain source validation so unknown attribution can survive without its producer while malformed owned sources are refused. Use an explicit user-only RequestUserInput for auxiliary LLM prompts that do not own durable message identity. Auto Review and compaction remove their request-only source registrations while retaining prompt content and freezing; provider serializers and projections keep the same wire data, assistant replay isolation, image ordering, and tool correlation. Session writes, Agent delivery, and recorded title requests continue to require identified durable messages. Bind the saved compatibility policy only to user sources and qualify tmux location attribution without weakening fixed system, model, or tool semantics. Rebuild the current inventory and unpublished V4 acknowledgement on the actual tool-role parent, preserving its rationale and all accepted historical records. The catalog format version records tooling metadata; Session remains V4. Developer-role policy and activation belong to their own feature. The latest-master Messages adapter, serialization, request-input typing, EpochHeader reservation, and attribution checks pass 103 tests across five files. The retained V3 Messages input-history snapshot passes through the source profile; Host/Client typechecks and all 41 documentation gates pass. The generated comparison records four changed roots and 447 unchanged type fingerprints. Latest-master ARIA changes are retained, with producer source labels applied independently; new Messages fixtures retain their producer names as declared source kinds and use the fixed system-message helper; recorded Session generations are unchanged by this regrouping. Co-authored-by: Tianyi Cui <53024+tianyicui@users.noreply.github.com> --- ...9-producer-owned-message-sources.i18n.yaml | 6 + ...26-09-09-producer-owned-message-sources.md | 33 + ...09-09-producer-owned-message-sources.zh.md | 33 + ...7-persistence-attribution-policy.i18n.yaml | 6 + ...26-09-17-persistence-attribution-policy.md | 35 + ...09-17-persistence-attribution-policy.zh.md | 35 + .../control-surface/control-surface-llm.ts | 2 +- .../profiles/acp/tests/goal.expected.e2e.ts | 2 +- .../goal-tools/stream-json.expected.jsonl | 6 +- .../stream-json.expected.jsonl | 6 +- .../stream-json.expected.jsonl | 6 +- .../provider-retry/stream-json.expected.jsonl | 6 +- .../stream-json.expected.jsonl | 6 +- .../tests/semantic-checkpoint.expected.e2e.ts | 2 +- .../tests/subagent-diagnostic.expected.e2e.ts | 2 +- .../subagent-inheritance.expected.e2e.ts | 10 +- .../workspace-context-resume.expected.e2e.ts | 2 +- apps/web/tests/agent-preset-selection.e2e.ts | 2 +- apps/web/tests/chat-scroll-fixture.ts | 5 +- apps/web/tests/complex-history.perf.ts | 5 +- .../expected/cordis-history/ui.expected.md | 2 +- .../conversation-expanded.expected.md | 2 +- .../skill-user-invoke/ui-expanded.expected.md | 2 +- .../expected/steer-all/mid-steer.expected.md | 2 +- .../steer-all/settled-expanded.expected.md | 2 +- apps/web/tests/github-ready-review.e2e.ts | 2 +- apps/web/tests/minimal-preset.snapshot.ts | 3 +- .../tests/permission-policy-context.e2e.ts | 3 +- apps/web/tests/schedule-after.e2e.ts | 15 +- apps/web/tests/seeded-history.e2e.ts | 19 +- apps/web/tests/shipped-composition.e2e.ts | 18 +- .../mid-stream.expected.md | 2 +- apps/web/tests/stats-paged-history.e2e.ts | 2 +- .../synthetic-history.bench.ts | 2 +- benchmarks/agent-continuation/workload.ts | 2 +- .../long-session-browser/synthetic-history.ts | 2 +- docs/config-catalog.i18n.yaml | 4 +- docs/config-catalog.md | 22 +- docs/config-catalog.zh.md | 22 +- docs/event-producer-consumer.i18n.yaml | 4 +- docs/event-producer-consumer.md | 6 +- docs/event-producer-consumer.zh.md | 6 +- docs/persistence-catalog.i18n.yaml | 4 +- docs/persistence-catalog.md | 1439 +- docs/persistence-catalog.zh.md | 1439 +- .../2026-09-16-session-format-v4.i18n.yaml | 4 +- .../2026-09-16-session-format-v4.md | 16 +- .../2026-09-16-session-format-v4.schema.json | 8016 ++- .../2026-09-16-session-format-v4.zh.md | 16 +- .../historical-formats/README.i18n.yaml | 4 +- .../historical-formats/README.md | 2 +- .../historical-formats/README.zh.md | 2 +- docs/persistence-schema.json | 51258 +++++++++++----- docs/subsystems/llm-streaming.i18n.yaml | 4 +- docs/subsystems/llm-streaming.md | 36 +- docs/subsystems/llm-streaming.zh.md | 36 +- packages/acp/acp/tests/edges.spec.ts | 11 +- packages/acp/acp/tests/turns.spec.ts | 19 +- .../commands-queue-attachment.host.spec.ts | 9 +- .../tests/control-queue.host.spec.ts | 9 +- .../tests/event-script.client.ts | 15 +- .../session-history-journal.host.spec.ts | 9 +- .../tests/session-models.host.spec.ts | 2 +- .../src/client/conversation-nodes/command.ts | 5 +- .../conversation-nodes/event-projection.ts | 2 - .../src/client/conversation-nodes/message.ts | 4 +- .../tests/chat-branch-tails.client.spec.tsx | 15 +- ...nversation-node-definitions.client.spec.ts | 32 +- .../tests/event-projection.client.spec.ts | Bin 5314 -> 5296 bytes .../src/client/TrajectoryTable.tsx | 6 - .../trajectory-compaction-definition.ts | 2 +- .../src/client/trajectory-event-projection.ts | 2 - .../conversation-definitions.client.spec.ts | 8 +- .../tests/event-projection.client.spec.ts | 2 +- .../compaction-basic/README.i18n.yaml | 4 +- .../compaction/compaction-basic/README.md | 2 +- .../compaction/compaction-basic/README.zh.md | 2 +- .../compaction/compaction-basic/src/region.ts | 1 - .../compaction-basic/src/summarizer.ts | 11 +- .../tests/compaction-basic.spec.ts | 32 +- .../tests/compaction-loop-repro.spec.ts | 2 +- .../tests/manual-compaction.spec.ts | 28 +- .../compaction/compaction/src/checkpoint.ts | 6 +- packages/compaction/compaction/src/index.ts | 7 + .../compaction/compaction/src/invariant.ts | 5 +- .../compaction/tests/compaction.spec.ts | 9 +- .../compaction/tests/tool-pairing.spec.ts | 13 +- .../context/agent-instructions/src/state.ts | 2 +- .../tests/agent-instructions.spec.ts | 36 +- .../tests/session-reference.spec.ts | 20 +- packages/context/time-context/src/index.ts | 11 +- .../context/time-context/src/invariant.ts | 10 +- .../time-context/tests/invariant.spec.ts | 19 +- .../time-context/tests/request-zone.spec.ts | 9 +- .../time-context/tests/time-context.e2e.ts | 6 +- .../time-context/tests/time-context.spec.ts | 27 +- packages/context/tmux-context/src/index.ts | 16 +- .../tmux-context/tests/tmux-context.spec.ts | 10 +- packages/core/agent-loop/src/index.ts | 1 + .../core/agent-loop/src/runtime-context.ts | 21 +- packages/core/agent-loop/tests/agent.spec.ts | 24 +- .../tests/config-session-id.spec.ts | 9 +- .../tests/contract-regressions.spec.ts | 50 +- .../agent-loop/tests/coverage-edges.spec.ts | 9 +- .../tests/fixtures/serial-created.mjs | 2 +- .../agent-loop/tests/interception.spec.ts | 64 +- .../core/agent-loop/tests/invariant.spec.ts | 9 +- packages/core/agent-loop/tests/loop.spec.ts | 81 +- .../tests/request-reconstruction.spec.ts | 23 +- packages/core/agent-loop/tests/resume.spec.ts | 9 +- .../agent-loop/tests/runtime-context.spec.ts | 16 +- .../tests/system-prompt-admission.spec.ts | 14 +- .../tests/system-prompt-projection.spec.ts | 21 +- .../core/agent-loop/tests/tool-calls.spec.ts | 19 +- packages/core/agent/src/model-selection.ts | 11 +- .../core/agent/tests/model-selection.spec.ts | 2 +- packages/core/session/src/index.ts | 5 +- .../session/tests/canonical-envelopes.spec.ts | 21 +- .../core/session/tests/derived-cache.spec.ts | 10 +- packages/core/session/tests/fork.spec.ts | 6 +- packages/core/session/tests/invariant.spec.ts | 11 +- packages/core/session/tests/session.spec.ts | 25 +- packages/core/session/tests/surface.spec.ts | 38 +- packages/core/tools/src/ptc.ts | 8 +- packages/core/tools/tests/ptc.spec.ts | 22 +- packages/core/tools/tests/tools.spec.ts | 78 +- .../experimental/auto-review/README.i18n.yaml | 4 +- packages/experimental/auto-review/README.md | 2 +- .../experimental/auto-review/README.zh.md | 2 +- .../experimental/auto-review/src/index.ts | 11 +- .../auto-review/tests/auto-review.e2e.ts | 6 +- .../auto-review/tests/auto-review.spec.ts | 10 +- .../tool-agent-team/tests/tool-team.spec.ts | 4 +- .../cordis-host-runner/src/index.ts | 16 +- .../extensions/tool-cordis/src/api-catalog.ts | 28 +- .../fs/tool-fs-search/tests/tools.spec.ts | 11 +- .../tests/goal-round-driver.spec.ts | 13 +- packages/goal/goal/tests/goal.spec.ts | 14 +- packages/goal/goal/tests/projection.spec.ts | 10 +- packages/goal/tool-goal/src/index.ts | 10 +- .../goal/tool-goal/tests/tool-goal.spec.ts | 14 +- .../guard/repeat-tool-reminder/src/index.ts | 17 +- .../tests/repeat-tool-reminder.spec.ts | 16 +- packages/hooks/hooks-claude-code/src/index.ts | 15 +- .../hooks-claude-code/tests/bridge.spec.ts | 2 +- .../hooks-claude-code/tests/coverage-cases.ts | 19 +- packages/hooks/hooks-codex/src/index.ts | 13 +- .../hooks/hooks-codex/tests/coverage-cases.ts | 19 +- .../interaction/user-approval/src/index.ts | 9 +- .../user-approval/tests/approval.spec.ts | 2 +- packages/jobs/tool-jobs/src/index.ts | 9 +- .../jobs/tool-jobs/tests/tool-jobs.spec.ts | 8 +- packages/llm/llm-deepseek/README.i18n.yaml | 4 +- packages/llm/llm-deepseek/README.md | 2 + packages/llm/llm-deepseek/README.zh.md | 2 + .../protocols/chat-completions/serialize.ts | 10 +- .../src/protocols/messages/images.ts | 14 +- .../src/protocols/messages/serialize.ts | 4 +- .../llm/llm-deepseek/tests/adapter.e2e.ts | 8 +- .../llm/llm-deepseek/tests/adapter.spec.ts | 11 +- .../llm-deepseek/tests/dynamic-config.spec.ts | 11 +- .../tests/messages/adapter.e2e.ts | 6 +- .../tests/messages/adapter.spec.ts | 12 +- .../tests/messages/fixtures/input-history.ts | 8 +- .../tests/messages/serialize.spec.ts | 72 +- .../llm/llm-deepseek/tests/serialize.spec.ts | 64 +- packages/llm/llm-pi-ai/README.i18n.yaml | 4 +- packages/llm/llm-pi-ai/README.md | 2 + packages/llm/llm-pi-ai/README.zh.md | 2 + packages/llm/llm-pi-ai/src/context.ts | 12 +- packages/llm/llm-pi-ai/tests/catalog.spec.ts | 9 +- packages/llm/llm-pi-ai/tests/context.spec.ts | 31 +- packages/llm/llm-pi-ai/tests/convert.spec.ts | 8 +- packages/llm/llm/README.i18n.yaml | 4 +- packages/llm/llm/README.md | 12 +- packages/llm/llm/README.zh.md | 12 +- packages/llm/llm/src/content.ts | 48 +- packages/llm/llm/src/index.ts | 18 +- packages/llm/llm/src/message.ts | 27 +- packages/llm/llm/src/types.ts | 17 +- packages/llm/llm/tests/content.spec.ts | 24 +- packages/llm/llm/tests/message.spec.ts | 25 +- packages/llm/llm/tests/service.spec.ts | 34 +- .../context-breakdown-projection.spec.ts | 33 +- .../llm/token-meter/tests/token-meter.spec.ts | 17 +- .../tests/token-usage-projection.spec.ts | 17 +- packages/plan/plan-mode/src/index.ts | 8 +- .../plan/plan-mode/tests/integration.spec.ts | 6 +- .../plan/plan-mode/tests/plan-mode.spec.ts | 2 +- packages/schedule/schedule/src/runtime.ts | 9 +- .../schedule/schedule/tests/runtime.spec.ts | 4 +- .../session-query-sqlite/tests/sqlite.spec.ts | 9 +- .../tests/search-helpers.spec.ts | 13 +- .../session-query/tests/session-query.spec.ts | 20 +- .../session-query/tests/tracing.spec.ts | 15 +- .../tests/tool-session-query.spec.ts | 13 +- .../tests/catalog.spec.ts | 4 +- .../session-format-v3-to-v4/README.i18n.yaml | 4 +- .../session/session-format-v3-to-v4/README.md | 6 +- .../session-format-v3-to-v4/README.zh.md | 6 +- .../session-format-v3-to-v4/src/codec.ts | 2 + .../src/message-sources.ts | 42 + .../session-format-v3-to-v4/src/migration.ts | 8 +- .../src/relationships.ts | 4 +- .../session-format-v3-to-v4/src/sources.ts | 108 + .../src/testing/validation.ts | 15 + .../session-format-v3-to-v4/src/validation.ts | 4 +- .../tests/attribution.spec.ts | 41 + .../tests/canonical.spec.ts | 111 + .../tests/codec.spec.ts | 7 + .../tests/corpus.spec.ts | 16 +- .../tests/message-sources.spec.ts | 54 + .../tests/migration.spec.ts | 10 +- .../tests/relationships.spec.ts | 12 +- .../tests/sources.spec.ts | 80 + .../tests/validation.spec.ts | 172 + .../session-format-v3-to-v4/tsdown.config.ts | 12 + .../session-log-deepseek/tests/upload.spec.ts | 6 +- .../session-persistence-jsonl/package.json | 4 +- .../tests/generation.spec.ts | 3 +- .../tests/jsonl.spec.ts | 2 +- .../tests/migration-refusal.spec.ts | 2 +- .../tests/native-source-admission.spec.ts | 80 + .../tests/v2-ptc-migration.spec.ts | 9 +- .../tests/v2-system-migration.spec.ts | 6 +- .../tests/zstd.spec.ts | 2 +- .../session/session-title-llm/src/index.ts | 9 +- .../session-title/tests/invariant.spec.ts | 9 +- .../session-title/tests/session-title.spec.ts | 9 +- .../tests/projection.spec.ts | 9 +- .../shell/tool-bash/tests/integration.spec.ts | 5 +- .../skill/tool-skill/tests/tool-skill.spec.ts | 23 +- .../spill-policy/tests/spill-policy.spec.ts | 9 +- .../tests/inheritance.spec.ts | 3 +- .../tests/structured.spec.ts | 2 +- .../tests/subagent-in-process-driver.spec.ts | 9 +- .../tests/continuation-inheritance.spec.ts | 3 +- .../subagent/tests/continuation.spec.ts | 6 +- .../tests/tool-subagent-control.spec.ts | 4 +- .../llm-replay/tests/llm-replay.spec.ts | 21 +- .../session-snapshot/tests/normalize.spec.ts | 2 +- .../python-snapshot-image-offload.mjs | 2 +- scripts/request-input-types.spec.ts | 110 + .../advanced/result.json | 48 +- .../advanced/session.1.v4.jsonl | 8 +- .../advanced/session.2.v4.jsonl | 8 +- .../advanced/session.v4.jsonl | 10 +- .../restart/session.1.v4.jsonl | 18 + .../restart/session.2.v4.jsonl | 18 + scripts/type-equiv.manifest.json | 10 + .../bash-tool/notifications.expected.jsonl | 4 +- .../notifications.expected.jsonl | 4 +- .../sdk/ptc-turn/notifications.expected.jsonl | 4 +- snapshots/sdk/sdk.snapshot.ts | 3 +- .../notifications.expected.jsonl | 4 +- .../notifications.expected.jsonl | 4 +- .../notifications.expected.jsonl | 8 +- .../notifications.expected.jsonl | 6 +- .../text-turn/notifications.expected.jsonl | 4 +- .../notifications.expected.jsonl | 4 +- .../sdk/tool-error-details/session.v4.jsonl | 4 +- .../cordis-inspect-jsdoc/session.v4.jsonl | 4 +- .../session/tool-call-turn/session.v4.jsonl | 4 +- snapshots/web/bash-abort-row/ui.expected.md | 2 +- .../web/changed-files-turn/ui.expected.md | 2 +- .../feedback-command/ack-expanded.expected.md | 2 +- .../feedback-release/ack-expanded.expected.md | 2 +- .../fresh-round-trip/ui-expanded.expected.md | 2 +- .../ui-expanded.expected.md | 2 +- .../reloaded-expanded.expected.md | 2 +- .../cancel-expanded.expected.md | 2 +- .../live-interactions/error-auth.expected.md | 2 +- .../web/live-interactions/loading.expected.md | 2 +- .../retry-exhausted.expected.md | 2 +- .../retry-expanded.expected.md | 2 +- .../running-draft.expected.md | 2 +- .../plan-review/approved-expanded.expected.md | 2 +- snapshots/web/present-svg/ui.expected.md | 2 +- snapshots/web/present/ui.expected.md | 2 +- snapshots/web/ptc-round/ui.expected.md | 2 +- .../answered-expanded.expected.md | 2 +- .../question-composer/cancelled.expected.md | 2 +- .../web/queue-actions/collapsed.expected.md | 2 +- .../web/queue-actions/editing.expected.md | 2 +- .../web/queue-actions/layout.expected.md | 2 +- .../preserved-expanded.expected.md | 2 +- .../web/queue-actions/sending.expected.md | 2 +- snapshots/web/queue-actions/ui.expected.md | 2 +- snapshots/web/queued-image/queued.expected.md | 2 +- snapshots/web/skill-tool-row/ui.expected.md | 2 +- snapshots/web/steering/mid-steer.expected.md | 2 +- .../web/steering/settled-expanded.expected.md | 2 +- .../ui-expanded.expected.md | 2 +- .../offline-composer.expected.md | 2 +- .../web/turn-tail-actions/focused.expected.md | 2 +- .../web/turn-tail-actions/running.expected.md | 2 +- snapshots/web/web-search-round/ui.expected.md | 2 +- snapshots/web/workflow-run/ui.expected.md | 2 +- 298 files changed, 48917 insertions(+), 17043 deletions(-) create mode 100644 .agents/notes/implemented/architecture/2026-09-09-producer-owned-message-sources.i18n.yaml create mode 100644 .agents/notes/implemented/architecture/2026-09-09-producer-owned-message-sources.md create mode 100644 .agents/notes/implemented/architecture/2026-09-09-producer-owned-message-sources.zh.md create mode 100644 .agents/notes/implemented/architecture/2026-09-17-persistence-attribution-policy.i18n.yaml create mode 100644 .agents/notes/implemented/architecture/2026-09-17-persistence-attribution-policy.md create mode 100644 .agents/notes/implemented/architecture/2026-09-17-persistence-attribution-policy.zh.md create mode 100644 packages/session/session-format-v3-to-v4/src/message-sources.ts create mode 100644 packages/session/session-format-v3-to-v4/src/sources.ts create mode 100644 packages/session/session-format-v3-to-v4/src/testing/validation.ts create mode 100644 packages/session/session-format-v3-to-v4/tests/attribution.spec.ts create mode 100644 packages/session/session-format-v3-to-v4/tests/canonical.spec.ts create mode 100644 packages/session/session-format-v3-to-v4/tests/message-sources.spec.ts create mode 100644 packages/session/session-format-v3-to-v4/tests/sources.spec.ts create mode 100644 packages/session/session-format-v3-to-v4/tests/validation.spec.ts create mode 100644 packages/session/session-format-v3-to-v4/tsdown.config.ts create mode 100644 packages/session/session-persistence-jsonl/tests/native-source-admission.spec.ts create mode 100644 scripts/request-input-types.spec.ts create mode 100644 scripts/snapshots/python-sdk-single-exe/restart/session.1.v4.jsonl create mode 100644 scripts/snapshots/python-sdk-single-exe/restart/session.2.v4.jsonl diff --git a/.agents/notes/implemented/architecture/2026-09-09-producer-owned-message-sources.i18n.yaml b/.agents/notes/implemented/architecture/2026-09-09-producer-owned-message-sources.i18n.yaml new file mode 100644 index 0000000000..3f7edfc1fa --- /dev/null +++ b/.agents/notes/implemented/architecture/2026-09-09-producer-owned-message-sources.i18n.yaml @@ -0,0 +1,6 @@ +# Bilingual-pair consistency record (docs/i18n/README.md): the git blob hash of each +# side as of the last confirmed-consistent state. Both languages carry equal authority; +# after editing either side, bring the other along and re-record with: +# pnpm run verify-translation-pairing --write .agents/notes/implemented/architecture/2026-09-09-producer-owned-message-sources.md +2026-09-09-producer-owned-message-sources.md: 9bc3e57ff2a2fa251bc72a72f9ea9e39060a0912 +2026-09-09-producer-owned-message-sources.zh.md: f587aee39828535f284c9698c8fc5d2948f28ddc diff --git a/.agents/notes/implemented/architecture/2026-09-09-producer-owned-message-sources.md b/.agents/notes/implemented/architecture/2026-09-09-producer-owned-message-sources.md new file mode 100644 index 0000000000..9bc3e57ff2 --- /dev/null +++ b/.agents/notes/implemented/architecture/2026-09-09-producer-owned-message-sources.md @@ -0,0 +1,33 @@ +# Agent Note: Producer-owned message sources at the V4 edge + +Status: implemented + +English | [中文](2026-09-09-producer-owned-message-sources.zh.md) + +## Problem + +Released V3 writers stamped every plugin-produced message with the shared wrapper `{ kind: 'plugin', plugin: '' }` plus the producer's context-form fields, so consumers had to treat one synthetic kind specially instead of switching on the producer identity. Once tool results became first-class tool-role messages and the current generation moved to V4, the format layer also had to keep reading released V3 files whose rows still carry the wrapper. + +## Decision + +Message sources are producer-owned: the producer identity is the `kind` itself, declared per plugin through `MessageSourceMap` augmentation, and the released `plugin` field no longer exists in current rows. The V3-to-V4 migration rewrites released plugin attribution onto producer kinds with a frozen rename table in `packages/session/session-format-v3-to-v4/src/sources.ts`: `@deepseek-ai/dsh-system-prompt` becomes `system-prompt` for system-role messages and `runtime-context` otherwise; `compact` becomes `compact-checkpoint`; `tools-code-mode` and `tools-ptc` become `code-mode`; `dsh-compaction-basic` becomes `compact-basic`; any other plugin string keeps its own name as the kind. The wrapper drops without losing identity, context-form fields survive, and tool results lift from released user-role wrapper rows into first-class tool-role messages in the same migration. Rename lookup uses only own keys, and reconstruction preserves every own JSON metadata property, including `__proto__`; legal external producer names cannot resolve to JavaScript prototype members. + +Native V4 source admission rejects the retired `kind: 'plugin'` wrapper in every declared durable message slot, including inbox and title-request messages. This refusal applies before recoverable scanning can discard a suffix. Complete source-slot validation runs in the shared known-event pass used by both the format catalog and native JSONL scanner, before either exposes a restored artifact or handle. Unknown nonempty attribution kinds and their extra JSON fields survive without their producer installed. Native compaction and title relationship checks use the producer kinds directly; the [mandatory validation decision](2026-09-17-native-v4-read-validation.md) owns common lifecycle rules. + +The source rewrite is owned by the V3-to-V4 migration stage and runs once while historical events become V4 events. The current V4 codec retains only the released physical framing and native V4 admission; it never sends a V4 row through the released V3 validator and has no source-conversion view in its encode, decode, restore, or row-admission paths. + +Recorded current V4 fixtures and writer, notification, and stream-json sidecars are producer-owned; released V2/V3 fixtures and sidecars keep plugin attribution and convert at read time through the migration. The [released session-format migrations](2026-08-31-released-session-format-migrations.md) note owns the versioning rules this edge follows. + +The [source-attribution policy](2026-09-17-persistence-attribution-policy.md) distinguishes durable source declarations from request-only user inputs and records the narrowly scoped compatibility promise for new attribution kinds. Frozen migration rules retain historical producer kinds even when no active producer declares them. + +## Alternatives considered + +**Keep the released plugin wrapper as the current shape.** Consumers would keep switching on one synthetic kind and the producer identity stays an untyped string; the current semantic validators would keep a second, unreleased source vocabulary. + +**Rewrite released rows only at scan time instead of migrating them.** Scan admission is deliberately shape-only and refuses, never repairs; a scan-time rewrite would blur released generations with current rows and leave the current artifact with version-inappropriate source identities. + +**Reject plugin-kind rows as ordinary corruption in the scanner.** That would let a stale released row silently truncate a current Session instead of surfacing a refusal, and would misclassify rows that full decoding still needs to diagnose. + +## Consequences + +The recorded corpus for this migration applies the frozen rename table, while current-generation validation consumes producer-owned kinds directly. Web context labels render the producer kind (`runtime-context`) instead of the released plugin string. The shared rewriter reports malformed released sources as `SessionFormatError`, so a malformed historical source is a migration refusal rather than a silent payload loss. diff --git a/.agents/notes/implemented/architecture/2026-09-09-producer-owned-message-sources.zh.md b/.agents/notes/implemented/architecture/2026-09-09-producer-owned-message-sources.zh.md new file mode 100644 index 0000000000..f587aee398 --- /dev/null +++ b/.agents/notes/implemented/architecture/2026-09-09-producer-owned-message-sources.zh.md @@ -0,0 +1,33 @@ +# Agent Note: V4 边缘上的生产者归属消息源 + +Status: implemented + +[English](2026-09-09-producer-owned-message-sources.md) | 中文 + +## Problem + +已发布的 V3 写入方把每个插件产出的消息都盖上共享包装`{ kind: 'plugin', plugin: '' }` 外加生产者的上下文形态字段,消费方因此必须特殊对待一个合成 kind,而不是直接按生产者身份切换。工具结果成为一等 tool-role 消息、当前世代进入 V4 之后,格式层还必须继续读取仍带包装的已发布 V3 文件。 + +## Decision + +消息源是生产者归属的:生产者身份就是 `kind` 本身,由各插件通过 `MessageSourceMap` 声明合并,当前行中不再存在已发布的 `plugin` 字段。V3→V4 迁移用 `packages/session/session-format-v3-to-v4/src/sources.ts`中的冻结重命名表把已发布 plugin 归属改写到生产者 kind:`@deepseek-ai/dsh-system-prompt` 在 system-role 消息上变成 `system-prompt`,否则变成 `runtime-context`;`compact` 变成 `compact-checkpoint`;`tools-code-mode` 与 `tools-ptc` 变成 `code-mode`;`dsh-compaction-basic` 变成 `compact-basic`;其它 plugin 字符串保留自身名字作为 kind。包装丢弃时不丢失身份,上下文形态字段保留,工具结果在同一迁移中从已发布的 user-role 包装行提升为一等 tool-role 消息。重命名查找只读取自有键,重建时保留所有自有 JSON 元数据属性,包括 `__proto__`;合法的外部生产者名字不会被解析为 JavaScript 原型成员。 + +原生 V4 消息源准入在每个声明的持久化消息槽位拒绝退役的 `kind: 'plugin'` 包装,包括 inbox 和标题请求消息。可恢复扫描丢弃后缀之前就会执行此拒绝。完整消息源槽位校验在格式目录和原生 JSONL 扫描器共用的已知事件校验中执行,先于两者公开恢复产物或句柄。即使生产者未安装,未知的非空归属 kind 及额外 JSON 字段仍原样保留。原生压缩和标题关系校验直接使用生产者 kind;[强制校验决策](2026-09-17-native-v4-read-validation.zh.md)负责通用生命周期规则。 + +来源重写由 V3 到 V4 迁移 Stage 负责,在历史事件转换为 V4 事件时只执行一次。当前 V4 编解码器只保留已发布的物理分帧和原生 V4 准入;它不会让 V4 行进入已发布 V3 校验器,编码、解码、恢复和行准入路径也没有来源转换视图。 + +录制的当前 V4 fixtures 与 writer、notification、stream-json 侧车是生产者归属的;已发布的 V2/V3fixtures 与侧车保留 plugin 归属,读取时经迁移转换。[released session-format migrations](2026-08-31-released-session-format-migrations.zh.md)笔记拥有本边所遵循的版本规则。 + +[消息源归属策略](2026-09-17-persistence-attribution-policy.zh.md)区分持久化 source 声明与仅用于请求的 user 输入,并记录新增归属 kind 的受限兼容性承诺。即使没有活动生产者声明,冻结迁移规则仍保留历史生产者 kind。 + +## Alternatives considered + +**保留 released plugin 包装作为当前形态。** 消费方将继续特殊对待一个合成 kind,生产者身份仍是无类型字符串;当前语义校验器也会保留第二套非发布的消息源词汇。 + +**只在扫描时重写 released 行而不是迁移它们。** 扫描准入刻意只查形态并拒绝、从不修复;扫描时重写会模糊 released 世代与当前行的界限,使当前产物保留与版本不符的来源身份。 + +**在 scanner 中把 plugin-kind 行当作普通损坏拒绝。** 这会让过期的 released 行静默截断当前 Session,而不是给出拒绝;也会把完整解码仍需要诊断的行错误分类。 + +## Consequences + +本迁移的记录语料库应用冻结重命名表,而当前代校验器直接消费生产者自有 kind。Web 上下文标签渲染生产者 kind(`runtime-context`)而不是 released plugin 字符串。共享重写器将畸形历史来源报告为 `SessionFormatError`,因此迁移会拒绝它,而不会静默丢失载荷。 diff --git a/.agents/notes/implemented/architecture/2026-09-17-persistence-attribution-policy.i18n.yaml b/.agents/notes/implemented/architecture/2026-09-17-persistence-attribution-policy.i18n.yaml new file mode 100644 index 0000000000..0c48df68ce --- /dev/null +++ b/.agents/notes/implemented/architecture/2026-09-17-persistence-attribution-policy.i18n.yaml @@ -0,0 +1,6 @@ +# Bilingual-pair consistency record (docs/i18n/README.md): the git blob hash of each +# side as of the last confirmed-consistent state. Both languages carry equal authority; +# after editing either side, bring the other along and re-record with: +# pnpm run verify-translation-pairing --write .agents/notes/implemented/architecture/2026-09-17-persistence-attribution-policy.md +2026-09-17-persistence-attribution-policy.md: fa9741ba9343d77c52c38e181a3d2b2f445293e9 +2026-09-17-persistence-attribution-policy.zh.md: 0c32adf45938889b5325d0db904be527a969fae0 diff --git a/.agents/notes/implemented/architecture/2026-09-17-persistence-attribution-policy.md b/.agents/notes/implemented/architecture/2026-09-17-persistence-attribution-policy.md new file mode 100644 index 0000000000..fa9741ba93 --- /dev/null +++ b/.agents/notes/implemented/architecture/2026-09-17-persistence-attribution-policy.md @@ -0,0 +1,35 @@ +# Agent Note: Recorded user-source attribution compatibility + +Status: implemented + +English | [中文](2026-09-17-persistence-attribution-policy.zh.md) + +## Problem + +A producer-owned message source appears transitively in several persisted event types. A new attribution kind changes their union fingerprints even when existing readers preserve its fields without the producer. Request-only prompts need no durable identity, but constructing them as Session messages adds unnecessary source alternatives to that union. + +## Decision + +The core-owned user-message source property binds the [recorded compatibility policy](../process/2026-09-17-persistence-schema-review.md). A producer separately qualifies its literal wire kind as attribution-only. Both saved schemas must carry compatible policy state before a qualified addition receives a same-version classification. Existing alternatives remain structurally compared; missing policy, unqualified additions, removals, and changes to existing semantic groups retain strict classification. Fixed system, model, and tool source fields do not participate. + +The tmux-context producer qualifies its location attribution. Its own projection uses the kind to avoid repeated injection, while readers without that producer retain the recorded content and every source JSON property. The qualification promises reader independence; it does not forbid producer-local duplicate suppression. + +`RequestMessage` accepts a durable `Message` or a user-only `RequestUserInput` with content and no `id` or `source`. The LLM service and provider serializers accept both; Session writes, Agent delivery, and persisted title-request inputs require durable messages. Auto Review's outer prompt and the compaction summarizer's final instruction use request-only inputs and retain their content and freezing. The caller receives no implicit durable conversion. Assistant replay metadata and tool-result correlation retain their existing requirements. + +The unreleased V4 acknowledgement records the user-source policy and removes the two request-only source registrations. Its original predecessors and header transition remain intact. This does not grant a general exception for removing accepted variants: the [producer-source migration](2026-09-09-producer-owned-message-sources.md) preserves its frozen rename and collision rules, including historical request-only kinds, independently of active source declarations. Catalog generation and comparison remain owned by the [persistence reference](../../../../docs/persistence-changes/README.md#compatibility-rules). + +## Alternatives considered + +**Treat every source addition as breaking.** This would require a Session-format increment for attribution that readers already retain safely, without distinguishing it from semantic changes. + +**Relax every discriminated union or infer compatibility from current names.** A generic exception would admit semantic variants. Current declarations cannot establish what an older snapshot promised, and structural equality does not establish ownership of a source property. + +**Use durable messages for every request.** Detached prompts would retain manufactured identities and unnecessary source declarations. The explicit user-only alternative permits their removal while typed Session interfaces retain durable identity requirements. + +**Narrow historical context forms to current writer examples.** Writer examples do not establish every value admitted by released readers. Those read-facing variants remain represented. + +## Consequences + +A qualified addition still changes affected event fingerprints and requires an acknowledgement. Reviewers must verify the producer's attribution promise; type analysis cannot establish replay semantics or detect behavior hidden in opaque values. + +Codec-to-Session tests retain unknown user attribution and extra JSON fields without the producer. Provider equality tests compare request-only and durable inputs, while type assertions reject request-only inputs at durable writes. Recorded Session generations and the V3-to-V4 conversion remain independent of catalog policy and rendering. diff --git a/.agents/notes/implemented/architecture/2026-09-17-persistence-attribution-policy.zh.md b/.agents/notes/implemented/architecture/2026-09-17-persistence-attribution-policy.zh.md new file mode 100644 index 0000000000..0c32adf459 --- /dev/null +++ b/.agents/notes/implemented/architecture/2026-09-17-persistence-attribution-policy.zh.md @@ -0,0 +1,35 @@ +# Agent Note:已记录的 user-source 归属兼容性 + +Status: implemented + +[English](2026-09-17-persistence-attribution-policy.md) | 中文 + +## 问题 + +生产者拥有的消息 source 会传递性地出现在多个持久化事件类型中。即使已有读取方无需该生产者也能保留字段,新增归属 kind 仍会改变这些联合类型的指纹。仅供请求使用的提示不需要持久身份,但将其构造成 Session 消息会为联合类型增加不必要的 source 分支。 + +## 决策 + +核心拥有的 user-message source 属性绑定[已记录的兼容性策略](../process/2026-09-17-persistence-schema-review.zh.md)。生产者另行将其 wire 字面量 kind 声明为仅用于归属。双方保存的 schema 必须具有兼容的策略状态,符合条件的添加才能获得同版本分类。已有分支继续接受结构比较;缺失策略、未标记的添加、删除以及已有语义分组的变更继续采用严格分类。固定的 system、model 和 tool source 字段不参与。 + +tmux-context 生产者将位置归属标记为符合条件。其自身投影使用 kind 避免重复注入,而未安装该生产者的读取方保留已记录内容及 source 的每个 JSON 属性。该标记承诺读取方不依赖生产者,并不禁止生产者内部的去重。 + +`RequestMessage` 接受持久化 `Message`,或仅含 content、没有 `id` 和 `source` 的 user 专用 `RequestUserInput`。LLM 服务和 provider 序列化器接受两者;Session 写入、Agent 交付及持久化标题请求输入要求持久化消息。Auto Review 的外层提示和压缩摘要器的最终指令使用仅供请求使用的输入,并保留内容与冻结行为。调用方不会获得隐式持久化转换。Assistant 回放元数据和工具结果关联保持原有要求。 + +未发布的 V4 确认记录保存 user-source 策略,并移除两个仅供请求使用的 source 注册。原有前驱和 header 迁移保持不变。这不构成删除已接受分支的通用例外:[producer-source 迁移](2026-09-09-producer-owned-message-sources.zh.md)独立于活动 source 声明保留冻结的重命名和冲突规则,包括历史的仅供请求使用的 kind。目录生成和比较仍由[持久化参考](../../../../docs/persistence-changes/README.zh.md#compatibility-rules)负责。 + +## 考虑过的替代方案 + +**将所有 source 添加视为破坏性变更。** 这会要求为读取方已能安全保留的归属信息提升 Session 格式版本,无法区分它与语义变更。 + +**放宽所有可辨识联合或从当前名称推断兼容性。** 通用例外会接纳语义分支。当前声明不能确定旧快照作出的承诺,结构相等也不能确定 source 属性的归属。 + +**为每个请求使用持久化消息。** 独立提示会保留人为制造的身份和不必要的 source 声明。显式的 user 专用分支允许移除它们,同时让带类型的 Session 接口继续要求持久身份。 + +**将历史 context 形式收窄到当前写入方示例。** 写入方示例不能确定已发布读取方接纳的全部值。这些面向读取的分支继续保留。 + +## 影响 + +符合条件的添加仍会改变相关事件指纹,并要求确认记录。Review 者必须验证生产者的归属承诺;类型分析不能确定回放语义,也不能发现不透明值中隐藏的行为。 + +Codec 到 Session 的测试在未安装生产者时保留未知 user 归属和额外 JSON 字段。Provider 等价测试比较仅供请求使用的输入与持久化输入,类型断言则拒绝在持久化写入处使用仅供请求使用的输入。已记录的 Session 世代及 V3→V4 转换不依赖目录策略和渲染。 diff --git a/apps/cli/tests/profiles/acp/tests/fixtures/control-surface/control-surface-llm.ts b/apps/cli/tests/profiles/acp/tests/fixtures/control-surface/control-surface-llm.ts index d3418cfc28..347389996f 100644 --- a/apps/cli/tests/profiles/acp/tests/fixtures/control-surface/control-surface-llm.ts +++ b/apps/cli/tests/profiles/acp/tests/fixtures/control-surface/control-surface-llm.ts @@ -43,7 +43,7 @@ class ControlSurfaceAdapter extends LlmAdapter { } override async * stream(options: GenerateOptions): AsyncIterable { - const lastUserIndex = options.messages.findLastIndex(message => message.source.kind === 'user') + const lastUserIndex = options.messages.findLastIndex(message => message.role === 'user' && message.source?.kind === 'user') const current = options.messages.slice(lastUserIndex) const userText = current.flatMap(message => message.content) .flatMap(block => block.type === 'text' ? [block.text] : []) diff --git a/apps/cli/tests/profiles/acp/tests/goal.expected.e2e.ts b/apps/cli/tests/profiles/acp/tests/goal.expected.e2e.ts index 852e58453c..692438ad87 100644 --- a/apps/cli/tests/profiles/acp/tests/goal.expected.e2e.ts +++ b/apps/cli/tests/profiles/acp/tests/goal.expected.e2e.ts @@ -150,7 +150,7 @@ describe('same-session goal snapshot through the ACP automation driver', () => { // The wrap-up instruction is one plugin-sourced context injected after the // terminal tool result, and the model still answers inside the same turn. const wrapups = events.filter(event => event.type === 'user/message' - && event.data.source.kind === 'plugin' && event.data.source.plugin === 'tool-goal') + && event.data.source.kind === 'tool-goal') expect(wrapups).toHaveLength(1) const wrapupText = wrapups.map(event => event.type === 'user/message' ? event.data.content : [])[0] expect(JSON.stringify(wrapupText)).toContain('') diff --git a/apps/cli/tests/profiles/headless/tests/expected/goal-tools/stream-json.expected.jsonl b/apps/cli/tests/profiles/headless/tests/expected/goal-tools/stream-json.expected.jsonl index 8e4e3485a0..36fe8fd2d4 100644 --- a/apps/cli/tests/profiles/headless/tests/expected/goal-tools/stream-json.expected.jsonl +++ b/apps/cli/tests/profiles/headless/tests/expected/goal-tools/stream-json.expected.jsonl @@ -2,13 +2,13 @@ {"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"turn/start","seq":4,"time":0,"data":{"turn":1}}} {"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"agent/inbox/spliced","seq":5,"time":0,"data":{"target":"next-turn","start":0,"removedCount":1,"inserted":[]}}} {"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"step/start","seq":6,"time":0,"data":{"turn":1,"step":1}}} -{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"system/message","seq":7,"time":0,"data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"plugin","plugin":"@deepseek-ai/dsh-system-prompt"},"id":"{{sessionId}}"}},"surfaceOp":"append"}} +{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"system/message","seq":7,"time":0,"data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"system-prompt"},"id":"{{sessionId}}"}},"surfaceOp":"append"}} {"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"user/message","seq":8,"time":0,"data":{"content":[{"type":"text","text":"Probe strict-schema fillers against missing-goal revision 1, then create a durable goal to finish the snapshot proof and inspect it."}],"source":{"kind":"user"},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}} -{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"user/message","seq":9,"time":0,"data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent DSH file policy: workspace-write. Any available operation enforced by the DSH file sandbox may modify files under the session workspace: \"{{cwd}}\". Some platform temporary areas may also be writable.\n\nApproval policy: ask. Operations that require approval may ask through the configured answerers; without an available answerer, the request fails closed."}],"source":{"kind":"plugin","plugin":"@deepseek-ai/dsh-system-prompt","form":"snapshot","sections":[{"name":"sandbox:policy","text":"Current DSH file policy: workspace-write. Any available operation enforced by the DSH file sandbox may modify files under the session workspace: \"{{cwd}}\". Some platform temporary areas may also be writable."},{"name":"approval:policy","text":"Approval policy: ask. Operations that require approval may ask through the configured answerers; without an available answerer, the request fails closed."}]},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}} +{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"user/message","seq":9,"time":0,"data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent DSH file policy: workspace-write. Any available operation enforced by the DSH file sandbox may modify files under the session workspace: \"{{cwd}}\". Some platform temporary areas may also be writable.\n\nApproval policy: ask. Operations that require approval may ask through the configured answerers; without an available answerer, the request fails closed."}],"source":{"kind":"runtime-context","form":"snapshot","sections":[{"name":"sandbox:policy","text":"Current DSH file policy: workspace-write. Any available operation enforced by the DSH file sandbox may modify files under the session workspace: \"{{cwd}}\". Some platform temporary areas may also be writable."},{"name":"approval:policy","text":"Approval policy: ask. Operations that require approval may ask through the configured answerers; without an available answerer, the request fails closed."}]},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}} {"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"request/header","seq":10,"time":0,"data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash"},"tools":"{{tools}}"},"reason":"initial"}}} {"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"request/context","seq":11,"time":0,"data":{"provider":"deepseek-official","model":"deepseek-v4-flash"}}} {"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"session/title","seq":12,"time":0,"data":{"title":"Probe strict-schema fillers against miss","messageSeqs":[8],"source":{"kind":"fallback"}}}} -{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"session/title-llm-request","seq":13,"time":0,"data":{"titleProvider":"session-title-first-prompt-llm","messageSeqs":[8],"route":{"provider":"deepseek-official","model":"deepseek-v4-flash"},"system":"Create a concise title for an AI coding-assistant session from the supplied human messages.\nReturn only the title on one line, **in plain text of natural language**, with no quotes, prefix, explanation, Markdown, XML, or terminal control codes. No code is allowed.\nUse the language of the messages.\nAim for about 5 words in non-CJK languages or 10 CJK characters.","messages":[{"content":[{"type":"text","text":"Generate the session title from this JSON array of human messages:\n[{\"seq\":8,\"text\":\"Probe strict-schema fillers against missing-goal revision 1, then create a durable goal to finish the snapshot proof and inspect it.\"}]"}],"source":{"kind":"plugin","plugin":"dsh-session-title-llm"},"role":"user","id":"{{sessionId}}"}],"maxTokens":64}}} +{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"session/title-llm-request","seq":13,"time":0,"data":{"titleProvider":"session-title-first-prompt-llm","messageSeqs":[8],"route":{"provider":"deepseek-official","model":"deepseek-v4-flash"},"system":"Create a concise title for an AI coding-assistant session from the supplied human messages.\nReturn only the title on one line, **in plain text of natural language**, with no quotes, prefix, explanation, Markdown, XML, or terminal control codes. No code is allowed.\nUse the language of the messages.\nAim for about 5 words in non-CJK languages or 10 CJK characters.","messages":[{"content":[{"type":"text","text":"Generate the session title from this JSON array of human messages:\n[{\"seq\":8,\"text\":\"Probe strict-schema fillers against missing-goal revision 1, then create a durable goal to finish the snapshot proof and inspect it.\"}]"}],"source":{"kind":"dsh-session-title-llm"},"role":"user","id":"{{sessionId}}"}],"maxTokens":64}}} {"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"assistant/message","seq":14,"time":0,"data":{"turn":1,"step":1,"message":{"role":"assistant","content":[{"type":"tool-call","id":"call_goal_probe","name":"update_goal","arguments":"{\"goal_id\":\"missing-goal\",\"revision\":1,\"action\":\"pause\",\"objective\":\"\",\"max_goal_rounds\":0,\"blocked_reason\":\"\"}"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{sessionId}}"},"usage":{"inputTokens":15,"outputTokens":6},"stream":[{"type":"chunk","time":0,"chunk":{"type":"block-start","index":0,"blockType":"tool-call"}},{"type":"tool-call-chunks","time0":0,"index":0,"dt":[],"id":"call_goal_probe","name":"update_goal","args":["{\"goal_id\":\"missing-goal\",\"revision\":1,\"action\":\"pause\",\"objective\":\"\",\"max_goal_rounds\":0,\"blocked_reason\":\"\"}"]},{"type":"chunk","time":0,"chunk":{"type":"block-end","index":0,"block":{"type":"tool-call","id":"call_goal_probe","name":"update_goal","arguments":"{\"goal_id\":\"missing-goal\",\"revision\":1,\"action\":\"pause\",\"objective\":\"\",\"max_goal_rounds\":0,\"blocked_reason\":\"\"}"}}},{"type":"chunk","time":0,"chunk":{"type":"usage","usage":{"inputTokens":15,"outputTokens":6}}},{"type":"chunk","time":0,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}]},"surfaceOp":"append"}} {"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"tool/call","seq":15,"time":0,"data":{"turn":1,"step":1,"callId":"call_goal_probe","name":"update_goal","arguments":"{\"goal_id\":\"missing-goal\",\"revision\":1,\"action\":\"pause\",\"objective\":\"\",\"max_goal_rounds\":0,\"blocked_reason\":\"\"}"}}} {"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"session/title","seq":16,"time":0,"data":{"title":"Goal tool snapshot","messageSeqs":[8],"source":{"kind":"provider","provider":"session-title-first-prompt-llm","model":{"provider":"deepseek-official","model":"deepseek-v4-flash"}}}}} diff --git a/apps/cli/tests/profiles/headless/tests/expected/invalid-credential/stream-json.expected.jsonl b/apps/cli/tests/profiles/headless/tests/expected/invalid-credential/stream-json.expected.jsonl index cf4f395dd4..0f7431a36e 100644 --- a/apps/cli/tests/profiles/headless/tests/expected/invalid-credential/stream-json.expected.jsonl +++ b/apps/cli/tests/profiles/headless/tests/expected/invalid-credential/stream-json.expected.jsonl @@ -2,13 +2,13 @@ {"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"turn/start","seq":4,"time":0,"data":{"turn":1}}} {"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"agent/inbox/spliced","seq":5,"time":0,"data":{"target":"next-turn","start":0,"removedCount":1,"inserted":[]}}} {"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"step/start","seq":6,"time":0,"data":{"turn":1,"step":1}}} -{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"system/message","seq":7,"time":0,"data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"plugin","plugin":"@deepseek-ai/dsh-system-prompt"},"id":"{{sessionId}}"}},"surfaceOp":"append"}} +{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"system/message","seq":7,"time":0,"data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"system-prompt"},"id":"{{sessionId}}"}},"surfaceOp":"append"}} {"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"user/message","seq":8,"time":0,"data":{"content":[{"type":"text","text":"say pong"}],"source":{"kind":"user"},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}} -{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"user/message","seq":9,"time":0,"data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent DSH file policy: workspace-write. Any available operation enforced by the DSH file sandbox may modify files under the session workspace: \"{{cwd}}\". Some platform temporary areas may also be writable.\n\nApproval policy: ask. Operations that require approval may ask through the configured answerers; without an available answerer, the request fails closed."}],"source":{"kind":"plugin","plugin":"@deepseek-ai/dsh-system-prompt","form":"snapshot","sections":[{"name":"sandbox:policy","text":"Current DSH file policy: workspace-write. Any available operation enforced by the DSH file sandbox may modify files under the session workspace: \"{{cwd}}\". Some platform temporary areas may also be writable."},{"name":"approval:policy","text":"Approval policy: ask. Operations that require approval may ask through the configured answerers; without an available answerer, the request fails closed."}]},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}} +{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"user/message","seq":9,"time":0,"data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent DSH file policy: workspace-write. Any available operation enforced by the DSH file sandbox may modify files under the session workspace: \"{{cwd}}\". Some platform temporary areas may also be writable.\n\nApproval policy: ask. Operations that require approval may ask through the configured answerers; without an available answerer, the request fails closed."}],"source":{"kind":"runtime-context","form":"snapshot","sections":[{"name":"sandbox:policy","text":"Current DSH file policy: workspace-write. Any available operation enforced by the DSH file sandbox may modify files under the session workspace: \"{{cwd}}\". Some platform temporary areas may also be writable."},{"name":"approval:policy","text":"Approval policy: ask. Operations that require approval may ask through the configured answerers; without an available answerer, the request fails closed."}]},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}} {"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"request/header","seq":10,"time":0,"data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash","maxTokens":256000,"reasoningEffort":"high"},"adapterDefaults":{"reasoningEffort":true,"maxTokens":true},"tools":"{{tools}}"},"reason":"initial"}}} {"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"request/context","seq":11,"time":0,"data":{"provider":"deepseek-official","model":"deepseek-v4-flash","contextWindow":1000000}}} {"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"session/title","seq":12,"time":0,"data":{"title":"say pong","messageSeqs":[8],"source":{"kind":"fallback"}}}} -{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"session/title-llm-request","seq":13,"time":0,"data":{"titleProvider":"session-title-first-prompt-llm","messageSeqs":[8],"route":{"provider":"deepseek-official","model":"deepseek-v4-flash"},"system":"Create a concise title for an AI coding-assistant session from the supplied human messages.\nReturn only the title on one line, **in plain text of natural language**, with no quotes, prefix, explanation, Markdown, XML, or terminal control codes. No code is allowed.\nUse the language of the messages.\nAim for about 5 words in non-CJK languages or 10 CJK characters.","messages":[{"content":[{"type":"text","text":"Generate the session title from this JSON array of human messages:\n[{\"seq\":8,\"text\":\"say pong\"}]"}],"source":{"kind":"plugin","plugin":"dsh-session-title-llm"},"role":"user","id":"{{sessionId}}"}],"maxTokens":64}}} +{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"session/title-llm-request","seq":13,"time":0,"data":{"titleProvider":"session-title-first-prompt-llm","messageSeqs":[8],"route":{"provider":"deepseek-official","model":"deepseek-v4-flash"},"system":"Create a concise title for an AI coding-assistant session from the supplied human messages.\nReturn only the title on one line, **in plain text of natural language**, with no quotes, prefix, explanation, Markdown, XML, or terminal control codes. No code is allowed.\nUse the language of the messages.\nAim for about 5 words in non-CJK languages or 10 CJK characters.","messages":[{"content":[{"type":"text","text":"Generate the session title from this JSON array of human messages:\n[{\"seq\":8,\"text\":\"say pong\"}]"}],"source":{"kind":"dsh-session-title-llm"},"role":"user","id":"{{sessionId}}"}],"maxTokens":64}}} {"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"assistant/attempt","seq":14,"time":0,"data":{"turn":1,"step":1,"stream":[{"type":"chunk","time":0,"chunk":{"type":"finish","reason":{"kind":"error","failure":{"message":"llm-deepseek: the API key resolved from DEEPSEEK_API_KEY contains characters no HTTP header can carry; set DEEPSEEK_API_KEY to the raw key alone (the web Models page writes it)","code":"INVALID_CREDENTIAL"}}}}]}}} {"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"step/end","seq":15,"time":0,"data":{"turn":1,"step":1}}} {"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"turn/end","seq":16,"time":0,"data":{"turn":1,"reason":{"kind":"error","error":{"message":"llm-deepseek: the API key resolved from DEEPSEEK_API_KEY contains characters no HTTP header can carry; set DEEPSEEK_API_KEY to the raw key alone (the web Models page writes it)","code":"INVALID_CREDENTIAL"}}}}} diff --git a/apps/cli/tests/profiles/headless/tests/expected/missing-credential/stream-json.expected.jsonl b/apps/cli/tests/profiles/headless/tests/expected/missing-credential/stream-json.expected.jsonl index b285bfab73..e8f421ae70 100644 --- a/apps/cli/tests/profiles/headless/tests/expected/missing-credential/stream-json.expected.jsonl +++ b/apps/cli/tests/profiles/headless/tests/expected/missing-credential/stream-json.expected.jsonl @@ -2,13 +2,13 @@ {"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"turn/start","seq":4,"time":0,"data":{"turn":1}}} {"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"agent/inbox/spliced","seq":5,"time":0,"data":{"target":"next-turn","start":0,"removedCount":1,"inserted":[]}}} {"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"step/start","seq":6,"time":0,"data":{"turn":1,"step":1}}} -{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"system/message","seq":7,"time":0,"data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"plugin","plugin":"@deepseek-ai/dsh-system-prompt"},"id":"{{sessionId}}"}},"surfaceOp":"append"}} +{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"system/message","seq":7,"time":0,"data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"system-prompt"},"id":"{{sessionId}}"}},"surfaceOp":"append"}} {"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"user/message","seq":8,"time":0,"data":{"content":[{"type":"text","text":"say pong"}],"source":{"kind":"user"},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}} -{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"user/message","seq":9,"time":0,"data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent DSH file policy: workspace-write. Any available operation enforced by the DSH file sandbox may modify files under the session workspace: \"{{cwd}}\". Some platform temporary areas may also be writable.\n\nApproval policy: ask. Operations that require approval may ask through the configured answerers; without an available answerer, the request fails closed."}],"source":{"kind":"plugin","plugin":"@deepseek-ai/dsh-system-prompt","form":"snapshot","sections":[{"name":"sandbox:policy","text":"Current DSH file policy: workspace-write. Any available operation enforced by the DSH file sandbox may modify files under the session workspace: \"{{cwd}}\". Some platform temporary areas may also be writable."},{"name":"approval:policy","text":"Approval policy: ask. Operations that require approval may ask through the configured answerers; without an available answerer, the request fails closed."}]},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}} +{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"user/message","seq":9,"time":0,"data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent DSH file policy: workspace-write. Any available operation enforced by the DSH file sandbox may modify files under the session workspace: \"{{cwd}}\". Some platform temporary areas may also be writable.\n\nApproval policy: ask. Operations that require approval may ask through the configured answerers; without an available answerer, the request fails closed."}],"source":{"kind":"runtime-context","form":"snapshot","sections":[{"name":"sandbox:policy","text":"Current DSH file policy: workspace-write. Any available operation enforced by the DSH file sandbox may modify files under the session workspace: \"{{cwd}}\". Some platform temporary areas may also be writable."},{"name":"approval:policy","text":"Approval policy: ask. Operations that require approval may ask through the configured answerers; without an available answerer, the request fails closed."}]},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}} {"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"request/header","seq":10,"time":0,"data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash","maxTokens":256000,"reasoningEffort":"high"},"adapterDefaults":{"reasoningEffort":true,"maxTokens":true},"tools":"{{tools}}"},"reason":"initial"}}} {"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"request/context","seq":11,"time":0,"data":{"provider":"deepseek-official","model":"deepseek-v4-flash","contextWindow":1000000}}} {"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"session/title","seq":12,"time":0,"data":{"title":"say pong","messageSeqs":[8],"source":{"kind":"fallback"}}}} -{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"session/title-llm-request","seq":13,"time":0,"data":{"titleProvider":"session-title-first-prompt-llm","messageSeqs":[8],"route":{"provider":"deepseek-official","model":"deepseek-v4-flash"},"system":"Create a concise title for an AI coding-assistant session from the supplied human messages.\nReturn only the title on one line, **in plain text of natural language**, with no quotes, prefix, explanation, Markdown, XML, or terminal control codes. No code is allowed.\nUse the language of the messages.\nAim for about 5 words in non-CJK languages or 10 CJK characters.","messages":[{"content":[{"type":"text","text":"Generate the session title from this JSON array of human messages:\n[{\"seq\":8,\"text\":\"say pong\"}]"}],"source":{"kind":"plugin","plugin":"dsh-session-title-llm"},"role":"user","id":"{{sessionId}}"}],"maxTokens":64}}} +{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"session/title-llm-request","seq":13,"time":0,"data":{"titleProvider":"session-title-first-prompt-llm","messageSeqs":[8],"route":{"provider":"deepseek-official","model":"deepseek-v4-flash"},"system":"Create a concise title for an AI coding-assistant session from the supplied human messages.\nReturn only the title on one line, **in plain text of natural language**, with no quotes, prefix, explanation, Markdown, XML, or terminal control codes. No code is allowed.\nUse the language of the messages.\nAim for about 5 words in non-CJK languages or 10 CJK characters.","messages":[{"content":[{"type":"text","text":"Generate the session title from this JSON array of human messages:\n[{\"seq\":8,\"text\":\"say pong\"}]"}],"source":{"kind":"dsh-session-title-llm"},"role":"user","id":"{{sessionId}}"}],"maxTokens":64}}} {"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"assistant/attempt","seq":14,"time":0,"data":{"turn":1,"step":1,"stream":[{"type":"chunk","time":0,"chunk":{"type":"finish","reason":{"kind":"error","failure":{"message":"llm-deepseek: no API key for provider route \"deepseek-official\"; store DEEPSEEK_API_KEY through the credentials service (the web Models page writes it), or export DEEPSEEK_API_KEY in the launching environment","code":"MISSING_CREDENTIAL"}}}}]}}} {"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"step/end","seq":15,"time":0,"data":{"turn":1,"step":1}}} {"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"turn/end","seq":16,"time":0,"data":{"turn":1,"reason":{"kind":"error","error":{"message":"llm-deepseek: no API key for provider route \"deepseek-official\"; store DEEPSEEK_API_KEY through the credentials service (the web Models page writes it), or export DEEPSEEK_API_KEY in the launching environment","code":"MISSING_CREDENTIAL"}}}}} diff --git a/apps/cli/tests/profiles/headless/tests/expected/provider-retry/stream-json.expected.jsonl b/apps/cli/tests/profiles/headless/tests/expected/provider-retry/stream-json.expected.jsonl index cb83ea205a..bce6fb173d 100644 --- a/apps/cli/tests/profiles/headless/tests/expected/provider-retry/stream-json.expected.jsonl +++ b/apps/cli/tests/profiles/headless/tests/expected/provider-retry/stream-json.expected.jsonl @@ -2,13 +2,13 @@ {"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"turn/start","seq":4,"time":0,"data":{"turn":1}}} {"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"agent/inbox/spliced","seq":5,"time":0,"data":{"target":"next-turn","start":0,"removedCount":1,"inserted":[]}}} {"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"step/start","seq":6,"time":0,"data":{"turn":1,"step":1}}} -{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"system/message","seq":7,"time":0,"data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"plugin","plugin":"@deepseek-ai/dsh-system-prompt"},"id":"{{sessionId}}"}},"surfaceOp":"append"}} +{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"system/message","seq":7,"time":0,"data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"system-prompt"},"id":"{{sessionId}}"}},"surfaceOp":"append"}} {"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"user/message","seq":8,"time":0,"data":{"content":[{"type":"text","text":"retry the transient provider failure"}],"source":{"kind":"user"},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}} -{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"user/message","seq":9,"time":0,"data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent DSH file policy: workspace-write. Any available operation enforced by the DSH file sandbox may modify files under the session workspace: \"{{cwd}}\". Some platform temporary areas may also be writable.\n\nApproval policy: ask. Operations that require approval may ask through the configured answerers; without an available answerer, the request fails closed."}],"source":{"kind":"plugin","plugin":"@deepseek-ai/dsh-system-prompt","form":"snapshot","sections":[{"name":"sandbox:policy","text":"Current DSH file policy: workspace-write. Any available operation enforced by the DSH file sandbox may modify files under the session workspace: \"{{cwd}}\". Some platform temporary areas may also be writable."},{"name":"approval:policy","text":"Approval policy: ask. Operations that require approval may ask through the configured answerers; without an available answerer, the request fails closed."}]},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}} +{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"user/message","seq":9,"time":0,"data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent DSH file policy: workspace-write. Any available operation enforced by the DSH file sandbox may modify files under the session workspace: \"{{cwd}}\". Some platform temporary areas may also be writable.\n\nApproval policy: ask. Operations that require approval may ask through the configured answerers; without an available answerer, the request fails closed."}],"source":{"kind":"runtime-context","form":"snapshot","sections":[{"name":"sandbox:policy","text":"Current DSH file policy: workspace-write. Any available operation enforced by the DSH file sandbox may modify files under the session workspace: \"{{cwd}}\". Some platform temporary areas may also be writable."},{"name":"approval:policy","text":"Approval policy: ask. Operations that require approval may ask through the configured answerers; without an available answerer, the request fails closed."}]},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}} {"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"request/header","seq":10,"time":0,"data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash"},"tools":"{{tools}}"},"reason":"initial"}}} {"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"request/context","seq":11,"time":0,"data":{"provider":"deepseek-official","model":"deepseek-v4-flash"}}} {"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"session/title","seq":12,"time":0,"data":{"title":"retry the transient provider failure","messageSeqs":[8],"source":{"kind":"fallback"}}}} -{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"session/title-llm-request","seq":13,"time":0,"data":{"titleProvider":"session-title-first-prompt-llm","messageSeqs":[8],"route":{"provider":"deepseek-official","model":"deepseek-v4-flash"},"system":"Create a concise title for an AI coding-assistant session from the supplied human messages.\nReturn only the title on one line, **in plain text of natural language**, with no quotes, prefix, explanation, Markdown, XML, or terminal control codes. No code is allowed.\nUse the language of the messages.\nAim for about 5 words in non-CJK languages or 10 CJK characters.","messages":[{"content":[{"type":"text","text":"Generate the session title from this JSON array of human messages:\n[{\"seq\":8,\"text\":\"retry the transient provider failure\"}]"}],"source":{"kind":"plugin","plugin":"dsh-session-title-llm"},"role":"user","id":"{{sessionId}}"}],"maxTokens":64}}} +{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"session/title-llm-request","seq":13,"time":0,"data":{"titleProvider":"session-title-first-prompt-llm","messageSeqs":[8],"route":{"provider":"deepseek-official","model":"deepseek-v4-flash"},"system":"Create a concise title for an AI coding-assistant session from the supplied human messages.\nReturn only the title on one line, **in plain text of natural language**, with no quotes, prefix, explanation, Markdown, XML, or terminal control codes. No code is allowed.\nUse the language of the messages.\nAim for about 5 words in non-CJK languages or 10 CJK characters.","messages":[{"content":[{"type":"text","text":"Generate the session title from this JSON array of human messages:\n[{\"seq\":8,\"text\":\"retry the transient provider failure\"}]"}],"source":{"kind":"dsh-session-title-llm"},"role":"user","id":"{{sessionId}}"}],"maxTokens":64}}} {"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"assistant/attempt","seq":14,"time":0,"data":{"turn":1,"step":1,"stream":[{"type":"chunk","time":0,"chunk":{"type":"finish","reason":{"kind":"error","failure":{"message":"snapshot transient failure","code":"RATE_LIMIT","status":429}}}}]}}} {"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"llm/retry","seq":15,"time":0,"data":{"retryId":"{{sessionId}}","turn":1,"step":1,"provider":"deepseek-official","mode":"normal","policyKey":"[\"normal\",1,[\"RATE_LIMIT\"],1,1,0]","retry":1,"maxRetries":1,"delayMs":1,"failure":{"message":"snapshot transient failure","code":"RATE_LIMIT","status":429}}}} {"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"llm/retry-started","seq":16,"time":0,"data":{"retryId":"{{sessionId}}","turn":1,"step":1,"retry":1}}} diff --git a/apps/cli/tests/profiles/headless/tests/expected/subagent-settlement/stream-json.expected.jsonl b/apps/cli/tests/profiles/headless/tests/expected/subagent-settlement/stream-json.expected.jsonl index 48affa5389..3c8e6615eb 100644 --- a/apps/cli/tests/profiles/headless/tests/expected/subagent-settlement/stream-json.expected.jsonl +++ b/apps/cli/tests/profiles/headless/tests/expected/subagent-settlement/stream-json.expected.jsonl @@ -2,13 +2,13 @@ {"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"turn/start","seq":4,"time":0,"data":{"turn":1}}} {"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"agent/inbox/spliced","seq":5,"time":0,"data":{"target":"next-turn","start":0,"removedCount":1,"inserted":[]}}} {"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"step/start","seq":6,"time":0,"data":{"turn":1,"step":1}}} -{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"system/message","seq":7,"time":0,"data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"plugin","plugin":"@deepseek-ai/dsh-system-prompt"},"id":"{{sessionId}}"}},"surfaceOp":"append"}} +{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"system/message","seq":7,"time":0,"data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"system-prompt"},"id":"{{sessionId}}"}},"surfaceOp":"append"}} {"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"user/message","seq":8,"time":0,"data":{"content":[{"type":"text","text":"Start one continuable background subagent and answer from its completion notice. Do not call list_agents, send_message, job_output, or job_list."}],"source":{"kind":"user"},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}} -{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"user/message","seq":9,"time":0,"data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent DSH file policy: workspace-write. Any available operation enforced by the DSH file sandbox may modify files under the session workspace: \"{{cwd}}\". Some platform temporary areas may also be writable.\n\nApproval policy: ask. Operations that require approval may ask through the configured answerers; without an available answerer, the request fails closed."}],"source":{"kind":"plugin","plugin":"@deepseek-ai/dsh-system-prompt","form":"snapshot","sections":[{"name":"sandbox:policy","text":"Current DSH file policy: workspace-write. Any available operation enforced by the DSH file sandbox may modify files under the session workspace: \"{{cwd}}\". Some platform temporary areas may also be writable."},{"name":"approval:policy","text":"Approval policy: ask. Operations that require approval may ask through the configured answerers; without an available answerer, the request fails closed."}]},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}} +{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"user/message","seq":9,"time":0,"data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent DSH file policy: workspace-write. Any available operation enforced by the DSH file sandbox may modify files under the session workspace: \"{{cwd}}\". Some platform temporary areas may also be writable.\n\nApproval policy: ask. Operations that require approval may ask through the configured answerers; without an available answerer, the request fails closed."}],"source":{"kind":"runtime-context","form":"snapshot","sections":[{"name":"sandbox:policy","text":"Current DSH file policy: workspace-write. Any available operation enforced by the DSH file sandbox may modify files under the session workspace: \"{{cwd}}\". Some platform temporary areas may also be writable."},{"name":"approval:policy","text":"Approval policy: ask. Operations that require approval may ask through the configured answerers; without an available answerer, the request fails closed."}]},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}} {"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"request/header","seq":10,"time":0,"data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash"},"tools":"{{tools}}"},"reason":"initial"}}} {"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"request/context","seq":11,"time":0,"data":{"provider":"deepseek-official","model":"deepseek-v4-flash"}}} {"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"session/title","seq":12,"time":0,"data":{"title":"Start one continuable background subagen","messageSeqs":[8],"source":{"kind":"fallback"}}}} -{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"session/title-llm-request","seq":13,"time":0,"data":{"titleProvider":"session-title-first-prompt-llm","messageSeqs":[8],"route":{"provider":"deepseek-official","model":"deepseek-v4-flash"},"system":"Create a concise title for an AI coding-assistant session from the supplied human messages.\nReturn only the title on one line, **in plain text of natural language**, with no quotes, prefix, explanation, Markdown, XML, or terminal control codes. No code is allowed.\nUse the language of the messages.\nAim for about 5 words in non-CJK languages or 10 CJK characters.","messages":[{"content":[{"type":"text","text":"Generate the session title from this JSON array of human messages:\n[{\"seq\":8,\"text\":\"Start one continuable background subagent and answer from its completion notice. Do not call list_agents, send_message, job_output, or job_list.\"}]"}],"source":{"kind":"plugin","plugin":"dsh-session-title-llm"},"role":"user","id":"{{sessionId}}"}],"maxTokens":64}}} +{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"session/title-llm-request","seq":13,"time":0,"data":{"titleProvider":"session-title-first-prompt-llm","messageSeqs":[8],"route":{"provider":"deepseek-official","model":"deepseek-v4-flash"},"system":"Create a concise title for an AI coding-assistant session from the supplied human messages.\nReturn only the title on one line, **in plain text of natural language**, with no quotes, prefix, explanation, Markdown, XML, or terminal control codes. No code is allowed.\nUse the language of the messages.\nAim for about 5 words in non-CJK languages or 10 CJK characters.","messages":[{"content":[{"type":"text","text":"Generate the session title from this JSON array of human messages:\n[{\"seq\":8,\"text\":\"Start one continuable background subagent and answer from its completion notice. Do not call list_agents, send_message, job_output, or job_list.\"}]"}],"source":{"kind":"dsh-session-title-llm"},"role":"user","id":"{{sessionId}}"}],"maxTokens":64}}} {"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"assistant/message","seq":14,"time":0,"data":{"turn":1,"step":1,"message":{"role":"assistant","content":[{"type":"tool-call","id":"start-child","name":"subagent","arguments":"{\"description\":\"Return child result\",\"prompt\":\"Reply with exactly CHILD_RESULT and nothing else. Do not call send_message.\"}"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{sessionId}}"},"usage":{"inputTokens":10,"outputTokens":5},"stream":[{"type":"chunk","time":0,"chunk":{"type":"block-start","index":0,"blockType":"tool-call"}},{"type":"tool-call-chunks","time0":0,"index":0,"dt":[],"id":"start-child","name":"subagent","args":["{\"description\":\"Return child result\",\"prompt\":\"Reply with exactly CHILD_RESULT and nothing else. Do not call send_message.\"}"]},{"type":"chunk","time":0,"chunk":{"type":"block-end","index":0,"block":{"type":"tool-call","id":"start-child","name":"subagent","arguments":"{\"description\":\"Return child result\",\"prompt\":\"Reply with exactly CHILD_RESULT and nothing else. Do not call send_message.\"}"}}},{"type":"chunk","time":0,"chunk":{"type":"usage","usage":{"inputTokens":10,"outputTokens":5}}},{"type":"chunk","time":0,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}]},"surfaceOp":"append"}} {"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"tool/call","seq":15,"time":0,"data":{"turn":1,"step":1,"callId":"start-child","name":"subagent","arguments":"{\"description\":\"Return child result\",\"prompt\":\"Reply with exactly CHILD_RESULT and nothing else. Do not call send_message.\"}"}}} {"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"session/title","seq":16,"time":0,"data":{"title":"Subagent settlement","messageSeqs":[8],"source":{"kind":"provider","provider":"session-title-first-prompt-llm","model":{"provider":"deepseek-official","model":"deepseek-v4-flash"}}}}} diff --git a/apps/cli/tests/profiles/headless/tests/semantic-checkpoint.expected.e2e.ts b/apps/cli/tests/profiles/headless/tests/semantic-checkpoint.expected.e2e.ts index c5d679484e..e2815248f0 100644 --- a/apps/cli/tests/profiles/headless/tests/semantic-checkpoint.expected.e2e.ts +++ b/apps/cli/tests/profiles/headless/tests/semantic-checkpoint.expected.e2e.ts @@ -52,7 +52,7 @@ async function seedInterruptedSession(root: string, cwd: string): Promise { { type: 'step/start', seq: SessionSeq(1), time: 11, data: { turn: 1, step: 1 } }, { type: 'system/message', seq: SessionSeq(2), time: 12, - data: { turn: 1, step: 1, message: createMessage({ role: 'system', content: [], source: { kind: 'plugin', plugin: '@deepseek-ai/dsh-system-prompt' } }) }, + data: { turn: 1, step: 1, message: createMessage({ role: 'system', content: [], source: { kind: 'system-prompt' } }) }, surfaceOp: 'append', }, { type: 'user/message', seq: SessionSeq(3), time: 13, data: createUserMessage({ content: [{ type: 'text', text: 'Tighten this session to read-only.' }], source: { kind: 'user' } }), surfaceOp: 'append' }, @@ -140,11 +141,10 @@ describe('parent-only override inheritance snapshot', () => { const runtimeContexts = (content: string): string[] => content.trimEnd().split('\n').flatMap((line) => { const record = JSON.parse(line) as { type?: string - data?: { source?: { kind?: string; plugin?: string }; content?: Array<{ type?: string; text?: unknown }> } + data?: { source?: { kind?: string }; content?: Array<{ type?: string; text?: unknown }> } } if (record.type !== 'user/message' - || record.data?.source?.kind !== 'plugin' - || record.data.source.plugin !== '@deepseek-ai/dsh-system-prompt') return [] + || record.data?.source?.kind !== 'runtime-context') return [] return record.data.content?.flatMap(block => block.type === 'text' && typeof block.text === 'string' ? [block.text] : []) ?? [] }) const policyContexts = [...runtimeContexts(parent), ...runtimeContexts(child)] diff --git a/apps/cli/tests/profiles/headless/tests/workspace-context-resume.expected.e2e.ts b/apps/cli/tests/profiles/headless/tests/workspace-context-resume.expected.e2e.ts index cb4fdea338..b873ad7d77 100644 --- a/apps/cli/tests/profiles/headless/tests/workspace-context-resume.expected.e2e.ts +++ b/apps/cli/tests/profiles/headless/tests/workspace-context-resume.expected.e2e.ts @@ -90,7 +90,7 @@ async function seedVisibleBaseline( { type: 'step/start', seq: SessionSeq(1), time: 11, data: { turn: 1, step: 1 } }, { type: 'system/message', seq: SessionSeq(2), time: 12, - data: { turn: 1, step: 1, message: createMessage({ role: 'system', content: [], source: { kind: 'plugin', plugin: '@deepseek-ai/dsh-system-prompt' } }) }, + data: { turn: 1, step: 1, message: createMessage({ role: 'system', content: [], source: { kind: 'system-prompt' } }) }, surfaceOp: 'append', }, { diff --git a/apps/web/tests/agent-preset-selection.e2e.ts b/apps/web/tests/agent-preset-selection.e2e.ts index 8cd3070c64..b7facbb598 100644 --- a/apps/web/tests/agent-preset-selection.e2e.ts +++ b/apps/web/tests/agent-preset-selection.e2e.ts @@ -101,7 +101,7 @@ function seedLog(): string { at(1, { type: 'step/start', data: { turn: 1, step: 1 } }), at(2, { type: 'system/message', - data: { turn: 1, step: 1, message: createSystemMessage('', '@deepseek-ai/dsh-system-prompt') }, + data: { turn: 1, step: 1, message: createSystemMessage('') }, surfaceOp: 'append', }), at(3, { diff --git a/apps/web/tests/chat-scroll-fixture.ts b/apps/web/tests/chat-scroll-fixture.ts index 34ebcc8d1b..109a4bcbe0 100644 --- a/apps/web/tests/chat-scroll-fixture.ts +++ b/apps/web/tests/chat-scroll-fixture.ts @@ -69,10 +69,7 @@ function appendSystemPrompt(session: Session, turn: number, step: number): void session.append('system/message', { turn, step, - message: createSystemMessage( - 'Synthetic chat-scroll system prompt.', - '@deepseek-ai/dsh-system-prompt', - ), + message: createSystemMessage('Synthetic chat-scroll system prompt.'), }, { surfaceOp: 'append' }) } diff --git a/apps/web/tests/complex-history.perf.ts b/apps/web/tests/complex-history.perf.ts index 3740698e15..c4bfeff440 100644 --- a/apps/web/tests/complex-history.perf.ts +++ b/apps/web/tests/complex-history.perf.ts @@ -201,10 +201,7 @@ function appendSystemPrompt(session: Session, turn: number, step: number): void session.append('system/message', { turn, step, - message: createSystemMessage( - 'Synthetic performance system prompt.', - '@deepseek-ai/dsh-system-prompt', - ), + message: createSystemMessage('Synthetic performance system prompt.'), }, { surfaceOp: 'append' }) } diff --git a/apps/web/tests/expected/cordis-history/ui.expected.md b/apps/web/tests/expected/cordis-history/ui.expected.md index db5236e711..2327e6714a 100644 --- a/apps/web/tests/expected/cordis-history/ui.expected.md +++ b/apps/web/tests/expected/cordis-history/ui.expected.md @@ -14,7 +14,7 @@ - text: "Use only Cordis tools. First call cordis_inspect_self with no arguments. Then call cordis_define with plugin kind \"new\", idPrefix \"snap\", name \"snapshot noop\", purpose \"does nothing, for the snapshot\", code.host exactly \"return { name: \\\"snapshot-noop\\\", apply(ctx) {} }\" and code.client exactly \"return { inject: [\\\"slots\\\"], apply(ctx) { ctx.slots.register({ name: \\\"shell.overlay\\\", id: \\\"snapshot-probe\\\" }, () => React.createElement(\\\"div\\\", { \\\"data-snapshot-probe\\\": \\\"loaded\\\" })) } }\". Read its returned pluginId and packageId, then call cordis_run with those exact IDs and mode \"run\". After the run request returns, reply exactly CORDIS_UI_READY and stop. 9/1 {{clock}}" - button "Copy" - button "3 tool calls" [expanded] -- button "Context injection @deepseek-ai/dsh-system-prompt" +- button "Context injection runtime-context" - button "Think I will inspect the current Session's dynamic Cordis Plugins before defining the snapshot Package." - button "Inspect plugins 0 dynamic plugins" - button "Think No dynamic Plugins are present, so I will define the requested Host and Client Package." diff --git a/apps/web/tests/expected/github-ready-review/conversation-expanded.expected.md b/apps/web/tests/expected/github-ready-review/conversation-expanded.expected.md index 610d173e1e..a55e225b71 100644 --- a/apps/web/tests/expected/github-ready-review/conversation-expanded.expected.md +++ b/apps/web/tests/expected/github-ready-review/conversation-expanded.expected.md @@ -18,7 +18,7 @@ - button "System prompt" - button "Thought for a while" [expanded] - button "Context injection webhook github webhook handled by review-pr-when-ready" -- button "Context injection @deepseek-ai/dsh-system-prompt" +- button "Context injection runtime-context" - paragraph: "Review complete: no actionable findings." - button "Copy" - button "Good response" diff --git a/apps/web/tests/expected/skill-user-invoke/ui-expanded.expected.md b/apps/web/tests/expected/skill-user-invoke/ui-expanded.expected.md index 49ff06f442..415692d90c 100644 --- a/apps/web/tests/expected/skill-user-invoke/ui-expanded.expected.md +++ b/apps/web/tests/expected/skill-user-invoke/ui-expanded.expected.md @@ -13,7 +13,7 @@ - text: and confirm the fixture wiring {{clock}} - button "Copy" - button "Thought for a while" [expanded] -- button "Context injection @deepseek-ai/dsh-system-prompt" +- button "Context injection runtime-context" - button "Context injection user-invoke-demo" - paragraph: USER_INVOKE_REPLY acknowledged; following the injected skill. - button "Copy" diff --git a/apps/web/tests/expected/steer-all/mid-steer.expected.md b/apps/web/tests/expected/steer-all/mid-steer.expected.md index 53fd9f27dc..253d2d65bf 100644 --- a/apps/web/tests/expected/steer-all/mid-steer.expected.md +++ b/apps/web/tests/expected/steer-all/mid-steer.expected.md @@ -10,7 +10,7 @@ - button "System prompt" - text: Use the ask_user_question tool to ask me exactly one question with id "checkpoint", question "Ready to continue?", header "Checkpoint", and options labeled "Yes" and "No". After I answer, reply with one short sentence acknowledging my answer and stop. {{clock}} - button "Copy" -- button "Context injection @deepseek-ai/dsh-system-prompt" +- button "Context injection runtime-context" - button "Think The user wants me to ask them a checkpoint question first, then continue with whatever they interject. Let me do exactly that." - status: Deep diving... - text: "Interjection: include the word BANANA in your final reply." diff --git a/apps/web/tests/expected/steer-all/settled-expanded.expected.md b/apps/web/tests/expected/steer-all/settled-expanded.expected.md index 4e6fcc0ac8..5d78fdf78c 100644 --- a/apps/web/tests/expected/steer-all/settled-expanded.expected.md +++ b/apps/web/tests/expected/steer-all/settled-expanded.expected.md @@ -11,7 +11,7 @@ - text: Use the ask_user_question tool to ask me exactly one question with id "checkpoint", question "Ready to continue?", header "Checkpoint", and options labeled "Yes" and "No". After I answer, reply with one short sentence acknowledging my answer and stop. {{clock}} - button "Copy" - button "1 tool call" [expanded] -- button "Context injection @deepseek-ai/dsh-system-prompt" +- button "Context injection runtime-context" - button "Think The user wants me to ask them a checkpoint question first, then continue with whatever they interject. Let me do exactly that." - button "Ask question 1/1 answered" - text: "Interjection: include the word BANANA in your final reply. {{clock}}" diff --git a/apps/web/tests/github-ready-review.e2e.ts b/apps/web/tests/github-ready-review.e2e.ts index 54a0e604c1..1477e2ea25 100644 --- a/apps/web/tests/github-ready-review.e2e.ts +++ b/apps/web/tests/github-ready-review.e2e.ts @@ -179,7 +179,7 @@ describe.skipIf(MODE === 'record')('web e2e: GitHub ready-for-review', () => { expect(agent).toBeDefined() const workspace = await scaffold.ctx.workspaceRegistry.resolveByPath(scaffold.workspaceCwd) expect(workspace?.sessionIds).toContain(agent?.id) - const webhookMessage = adapter.requests[0]?.messages.find(message => message.source.kind === 'webhook') + const webhookMessage = adapter.requests[0]?.messages.find(message => message.role === 'user' && message.source?.kind === 'webhook') expect(webhookMessage?.content).toHaveLength(1) const [content] = webhookMessage?.content ?? [] expect(content?.type).toBe('text') diff --git a/apps/web/tests/minimal-preset.snapshot.ts b/apps/web/tests/minimal-preset.snapshot.ts index 22ab1bc476..1c41897422 100644 --- a/apps/web/tests/minimal-preset.snapshot.ts +++ b/apps/web/tests/minimal-preset.snapshot.ts @@ -82,8 +82,7 @@ describe('minimal agent preset', () => { const systemPrompt = systemPromptText(agentHandle.agent.session) if (systemPrompt === undefined) throw new Error('the minimal agent issued no system prompt') expect(agentHandle.agent.session.snapshotEvents().some(event => event.type === 'user/message' - && event.data.source.kind === 'plugin' - && event.data.source.plugin === '@deepseek-ai/dsh-system-prompt')).toBe(false) + && event.data.source.kind === 'runtime-context')).toBe(false) expect(scaffold.ctx.agentPresets.serviceFor(agentHandle.agent, 'fs')).toBeUndefined() expect(scaffold.ctx.agentPresets.serviceFor(agentHandle.agent, 'compaction')).toBeUndefined() diff --git a/apps/web/tests/permission-policy-context.e2e.ts b/apps/web/tests/permission-policy-context.e2e.ts index e946968359..c57ee84667 100644 --- a/apps/web/tests/permission-policy-context.e2e.ts +++ b/apps/web/tests/permission-policy-context.e2e.ts @@ -43,8 +43,7 @@ function systemPrompts(events: readonly SessionEvent[]): string[] { function runtimeContexts(events: readonly SessionEvent[]): string[] { return events.flatMap((event) => { if (event.type !== 'user/message' - || event.data.source.kind !== 'plugin' - || event.data.source.plugin !== '@deepseek-ai/dsh-system-prompt') return [] + || event.data.source.kind !== 'runtime-context') return [] return event.data.content.flatMap(block => block.type === 'text' ? [block.text] : []) }) } diff --git a/apps/web/tests/schedule-after.e2e.ts b/apps/web/tests/schedule-after.e2e.ts index f20752bece..33d05f0d9c 100644 --- a/apps/web/tests/schedule-after.e2e.ts +++ b/apps/web/tests/schedule-after.e2e.ts @@ -9,7 +9,7 @@ import { afterAll, beforeAll, describe, expect, it, onTestFailed } from 'vitest' import type { Agent, AgentHandle } from '@deepseek-ai/dsh-agent' import { composeEntries, loadOverlayPatches } from '@deepseek-ai/dsh-app-boot' import { ToolCallId, createUserMessage, LlmAdapter } from '@deepseek-ai/dsh-llm' -import type { GenerateOptions, StreamChunk } from '@deepseek-ai/dsh-llm' +import type { ContextFormed, GenerateOptions, StreamChunk } from '@deepseek-ai/dsh-llm' import { SessionId, type SessionEvent } from '@deepseek-ai/dsh-session' import { ScheduleId, @@ -35,6 +35,12 @@ import { saveFailureShot, } from './support.ts' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'schedule-web-e2e': { kind: 'schedule-web-e2e' } & ContextFormed + } +} + const MODE = webSnapshotMode() const OVERLAY = fileURLToPath(new URL('../../cli/config/examples/schedule/cordis.yml', import.meta.url)) const SNAPSHOT_DIR = fileURLToPath(new URL('./expected/schedule-after', import.meta.url)) @@ -190,7 +196,7 @@ function requestText(options: GenerateOptions): string { /** Require one assembled request to preserve the reminder-content trust boundary. */ function expectReminderFraming(options: GenerateOptions): void { const reminder = options.messages.find(message => ( - message.source.kind === 'plugin' && message.source.plugin === 'schedule' + message.role === 'user' && message.source?.kind === 'schedule' )) expect(reminder?.role).toBe('user') const text = reminder?.content.find(block => block.type === 'text')?.text @@ -388,7 +394,7 @@ describe.skipIf(MODE === 'record')('web e2e: conversational reminders', () => { }) atHandle.agent.followup(createUserMessage({ content: [{ type: 'text', text: 'Prepare the reminder test session.' }], - source: { kind: 'plugin', plugin: 'schedule-web-e2e' }, + source: { kind: 'schedule-web-e2e' }, })) await atHandle.agent.whenIdle() expect(atAdapter.requests).toHaveLength(1) @@ -472,8 +478,7 @@ describe.skipIf(MODE === 'record')('web e2e: conversational reminders', () => { const batch = everyHandle.agent.session.snapshotEvents().find(event => ( event.type === 'user/message' - && event.data.source.kind === 'plugin' - && event.data.source.plugin === 'schedule' + && event.data.source.kind === 'schedule' && event.data.content.some(block => block.type === 'text' && block.text.startsWith('[SCHEDULE REMINDER BATCH]')) )) diff --git a/apps/web/tests/seeded-history.e2e.ts b/apps/web/tests/seeded-history.e2e.ts index 3fc30d72ba..b31b33bba0 100644 --- a/apps/web/tests/seeded-history.e2e.ts +++ b/apps/web/tests/seeded-history.e2e.ts @@ -17,7 +17,7 @@ import { chromium } from 'playwright' import { afterAll, beforeAll, describe, expect, it, onTestFailed } from 'vitest' import { createLaunchEnvironmentSnapshot } from '@deepseek-ai/dsh-launch-environment' import { createUserMessage } from '@deepseek-ai/dsh-llm' -import type { ContentBlock, Message } from '@deepseek-ai/dsh-llm' +import type { ContentBlock, ContextFormed, Message, MessageSource } from '@deepseek-ai/dsh-llm' import { deriveEventMessage, SessionId } from '@deepseek-ai/dsh-session' import type { SessionEvent } from '@deepseek-ai/dsh-session' import type { TokenMeter } from '@deepseek-ai/dsh-token-meter' @@ -31,6 +31,15 @@ import { } from './scaffold.ts' import { expandOwningTurnProcess, newEnglishPage, saveFailureShot } from './support.ts' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'fixture': { kind: 'fixture' } & ContextFormed + } +} + +type CheckpointSource = Extract +type CheckpointCommandId = NonNullable + const SNAPSHOT_DIR = fileURLToPath(new URL('../../../snapshots/web/seeded-history', import.meta.url)) const SEED = fileURLToPath(new URL('../../../snapshots/web/seeded-history/session.v3.jsonl', import.meta.url)) const UI_EXPECTED = fileURLToPath(new URL('../../../snapshots/web/seeded-history/ui.expected.md', import.meta.url)) @@ -105,8 +114,8 @@ function withCompaction(raw: string, meter: TokenMeter): string { events.push({ ...event, seq: taken, time: time++ }) return taken } - const commandId = 'cmd-seeded-manual-compact' - const compactionId = 'compact-seeded-manual-compact' + const commandId = 'cmd-seeded-manual-compact' as CheckpointCommandId + const compactionId = 'compact-seeded-manual-compact' as CheckpointSource['compactionId'] at({ type: 'command/run', data: { commandId, name: 'compact', args: '', source: { kind: 'user' } }, @@ -173,7 +182,7 @@ function withCompaction(raw: string, meter: TokenMeter): string { text: 'Model-only compact checkpoint.', }], source: { - kind: 'plugin', plugin: 'compact', compactionId, sourceCommandId: commandId, + kind: 'compact-checkpoint', compactionId, sourceCommandId: commandId, }, }), surfaceOp: { op: 'replace', startSeq: first, endSeq: last }, @@ -781,7 +790,7 @@ describe('web e2e: seeded history renders through cold resume', () => { if (agent === undefined) throw new Error('seeded session did not attach an agent') agent.session.append('user/message', createUserMessage({ content: [{ type: 'text', text: 'Short injected context.' }], - source: { kind: 'plugin', plugin: 'fixture' }, + source: { kind: 'fixture' }, }), { surfaceOp: 'append' }) const disclosure = page.getByRole('button', { name: 'Context injection fixture', exact: true }) diff --git a/apps/web/tests/shipped-composition.e2e.ts b/apps/web/tests/shipped-composition.e2e.ts index c278bd1e3c..65a33bee1c 100644 --- a/apps/web/tests/shipped-composition.e2e.ts +++ b/apps/web/tests/shipped-composition.e2e.ts @@ -45,6 +45,18 @@ const AUTO_PARENT_ONE_SHOT = 'AUTO_PARENT_ONE_SHOT' const AUTO_PARENT_CONTINUABLE = 'AUTO_PARENT_CONTINUABLE' const AUTO_PARENT_ADJUST = 'AUTO_PARENT_ADJUST' +/** Identify the one-shot Auto Review request and check its request-only outer input. */ +function isAutoReviewRequest(options: GenerateOptions): boolean { + if (options.system?.startsWith('REVIEW_POLICY\n') !== true) return false + expect(options.messages).toHaveLength(1) + const message = options.messages[0] + expect(message).toMatchObject({ role: 'user', content: [{ type: 'text' }] }) + expect(message?.content).toHaveLength(1) + expect(message).not.toHaveProperty('id') + expect(message).not.toHaveProperty('source') + return true +} + type RpcResult = { ok: true; value: T } | { ok: false; error: { code: string; message: string } } /** POST one generated Remote unary through the authenticated Web carrier. */ @@ -94,8 +106,7 @@ class ShippedAutoAdapter extends LlmAdapter { override async *stream(options: GenerateOptions): AsyncIterable { this.requests.push(options) - const source = options.messages[0]?.source - if (source?.kind === 'plugin' && source.plugin === 'dsh-experimental-auto-review') { + if (isAutoReviewRequest(options)) { yield* textChunks(JSON.stringify({ risk: 'medium', decision: 'deny', reason: AUTO_RAW_REASON, })) @@ -214,8 +225,7 @@ class ShippedChildAutoAdapter extends LlmAdapter { override async *stream(options: GenerateOptions): AsyncIterable { this.requests.push(options) - const source = options.messages[0]?.source - const response = source?.kind === 'plugin' && source.plugin === 'dsh-experimental-auto-review' + const response = isAutoReviewRequest(options) ? this.reviewResponse(options) : this.mainResponse(options) yield* response diff --git a/apps/web/tests/snapshots/streaming-fence-highlight/mid-stream.expected.md b/apps/web/tests/snapshots/streaming-fence-highlight/mid-stream.expected.md index 9564bc493e..210bc22511 100644 --- a/apps/web/tests/snapshots/streaming-fence-highlight/mid-stream.expected.md +++ b/apps/web/tests/snapshots/streaming-fence-highlight/mid-stream.expected.md @@ -10,7 +10,7 @@ - button "System prompt" - text: Stream one TypeScript fence for the highlighting snapshot. {{clock}} - button "Copy" -- button "Context injection @deepseek-ai/dsh-system-prompt" +- button "Context injection runtime-context" - text: ts - button "Copy" - code: "const first: number = 1 const second = \"two\" let tail" diff --git a/apps/web/tests/stats-paged-history.e2e.ts b/apps/web/tests/stats-paged-history.e2e.ts index 6fc50a5e2b..5531a4dbda 100644 --- a/apps/web/tests/stats-paged-history.e2e.ts +++ b/apps/web/tests/stats-paged-history.e2e.ts @@ -50,7 +50,7 @@ function buildSeed(turns: number): string { if (turn === 1) { at({ type: 'system/message', - data: { turn, step: 1, message: createSystemMessage('', '@deepseek-ai/dsh-system-prompt') }, + data: { turn, step: 1, message: createSystemMessage('') }, surfaceOp: 'append', }) } diff --git a/benchmarks/agent-continuation/synthetic-history.bench.ts b/benchmarks/agent-continuation/synthetic-history.bench.ts index 6329db885c..d36dfc4c13 100644 --- a/benchmarks/agent-continuation/synthetic-history.bench.ts +++ b/benchmarks/agent-continuation/synthetic-history.bench.ts @@ -23,7 +23,7 @@ for (const [name, generate] of [ session.append('turn/start', { turn }) session.append('step/start', { turn, step: 1 }) const replacement = session.append('system/message', { - turn, step: 1, message: createSystemMessage('Next synthetic prompt', '@deepseek-ai/dsh-system-prompt'), + turn, step: 1, message: createSystemMessage('Next synthetic prompt'), }, { surfaceOp: { op: 'replace', startSeq: head, endSeq: head }, sourceEventSeqs: [head] }) const restored = Session.create(SessionId(header.id), parseSessionLog([ JSON.stringify(header), ...session.snapshotEvents().map(event => JSON.stringify(event)), diff --git a/benchmarks/agent-continuation/workload.ts b/benchmarks/agent-continuation/workload.ts index b2909e7c2c..0cd4c5435b 100644 --- a/benchmarks/agent-continuation/workload.ts +++ b/benchmarks/agent-continuation/workload.ts @@ -69,7 +69,7 @@ export function syntheticHistory(turns: number): SessionEvent[] { session.append('turn/start', { turn }) session.append('step/start', { turn, step: 1 }) if (turn === 1) session.append('system/message', { - turn, step: 1, message: { id: MessageId('system-head'), role: 'system', content: [], source: { kind: 'plugin', plugin: '@deepseek-ai/dsh-system-prompt' } }, + turn, step: 1, message: { id: MessageId('system-head'), role: 'system', content: [], source: { kind: 'system-prompt' } }, }, { surfaceOp: 'append' }) session.append('user/message', { id: MessageId('prompt-' + String(turn)), role: 'user', diff --git a/benchmarks/long-session-browser/synthetic-history.ts b/benchmarks/long-session-browser/synthetic-history.ts index 32885489cb..cc2ecec551 100644 --- a/benchmarks/long-session-browser/synthetic-history.ts +++ b/benchmarks/long-session-browser/synthetic-history.ts @@ -28,7 +28,7 @@ export function syntheticHistory(): string { session.append('turn/start', { turn }) session.append('step/start', { turn, step: 1 }) if (turn === 1) session.append('system/message', { - turn, step: 1, message: createSystemMessage('', '@deepseek-ai/dsh-system-prompt'), + turn, step: 1, message: createSystemMessage(''), }, { surfaceOp: 'append' }) const user = session.append('user/message', createUserMessage({ content: [{ type: 'text', text: 'Review synthetic change ' + String(turn) + ': 检查增量渲染。 '.repeat(30) }], diff --git a/docs/config-catalog.i18n.yaml b/docs/config-catalog.i18n.yaml index 2e78d3e74b..e8b6195fc6 100644 --- a/docs/config-catalog.i18n.yaml +++ b/docs/config-catalog.i18n.yaml @@ -2,5 +2,5 @@ # side as of the last confirmed-consistent state. Both languages carry equal authority; # after editing either side, bring the other along and re-record with: # pnpm run verify-translation-pairing --write docs/config-catalog.md -config-catalog.md: 3d968a3667ca483251b5beabf1f4843518d42093 -config-catalog.zh.md: cc8a30329457181508b867663cedbf2ccef17cb8 +config-catalog.md: d617ed628bf1ca0235bc68660418c860ff952dc8 +config-catalog.zh.md: 067d5a23b699087ddaeedc96db674f807f509fbe diff --git a/docs/config-catalog.md b/docs/config-catalog.md index 3d968a3667..d617ed628b 100644 --- a/docs/config-catalog.md +++ b/docs/config-catalog.md @@ -111,7 +111,7 @@ export interface Config { Depends on: [`AgentOptions`](subsystems/core.md) · [`SessionId`](subsystems/core.md) -Source: [`packages/core/agent-loop/src/index.ts:318`](../packages/core/agent-loop/src/index.ts) +Source: [`packages/core/agent-loop/src/index.ts:319`](../packages/core/agent-loop/src/index.ts) @@ -549,7 +549,7 @@ export interface Config { } ``` -Source: [`packages/extensions/cordis-host-runner/src/index.ts:88`](../packages/extensions/cordis-host-runner/src/index.ts) +Source: [`packages/extensions/cordis-host-runner/src/index.ts:94`](../packages/extensions/cordis-host-runner/src/index.ts) @@ -996,7 +996,7 @@ export interface Config { } ``` -Source: [`packages/hooks/hooks-claude-code/src/index.ts:44`](../packages/hooks/hooks-claude-code/src/index.ts) +Source: [`packages/hooks/hooks-claude-code/src/index.ts:51`](../packages/hooks/hooks-claude-code/src/index.ts) @@ -1023,7 +1023,7 @@ export interface Config { } ``` -Source: [`packages/hooks/hooks-codex/src/index.ts:43`](../packages/hooks/hooks-codex/src/index.ts) +Source: [`packages/hooks/hooks-codex/src/index.ts:50`](../packages/hooks/hooks-codex/src/index.ts) @@ -1874,7 +1874,7 @@ export interface PlanModeConfig { } ``` -Source: [`packages/plan/plan-mode/src/index.ts:64`](../packages/plan/plan-mode/src/index.ts) +Source: [`packages/plan/plan-mode/src/index.ts:70`](../packages/plan/plan-mode/src/index.ts) @@ -2037,7 +2037,7 @@ export interface Config { } ``` -Source: [`packages/guard/repeat-tool-reminder/src/index.ts:28`](../packages/guard/repeat-tool-reminder/src/index.ts) +Source: [`packages/guard/repeat-tool-reminder/src/index.ts:35`](../packages/guard/repeat-tool-reminder/src/index.ts) @@ -2981,7 +2981,7 @@ export interface Config { } ``` -Source: [`packages/context/time-context/src/index.ts:49`](../packages/context/time-context/src/index.ts) +Source: [`packages/context/time-context/src/index.ts:56`](../packages/context/time-context/src/index.ts) @@ -2997,7 +2997,7 @@ export interface Config { } ``` -Source: [`packages/context/tmux-context/src/index.ts:36`](../packages/context/tmux-context/src/index.ts) +Source: [`packages/context/tmux-context/src/index.ts:47`](../packages/context/tmux-context/src/index.ts) @@ -3121,7 +3121,7 @@ export interface Config { } ``` -Source: [`packages/goal/tool-goal/src/index.ts:25`](../packages/goal/tool-goal/src/index.ts) +Source: [`packages/goal/tool-goal/src/index.ts:32`](../packages/goal/tool-goal/src/index.ts) @@ -3155,7 +3155,7 @@ export interface Config { export type CompletionDelivery = 'quiet' | 'wakeup' ``` -Source: [`packages/jobs/tool-jobs/src/index.ts:31`](../packages/jobs/tool-jobs/src/index.ts) +Source: [`packages/jobs/tool-jobs/src/index.ts:37`](../packages/jobs/tool-jobs/src/index.ts) @@ -3543,7 +3543,7 @@ export interface Config { export type ApprovalPolicy = 'ask' | 'never' ``` -Source: [`packages/interaction/user-approval/src/index.ts:128`](../packages/interaction/user-approval/src/index.ts) +Source: [`packages/interaction/user-approval/src/index.ts:135`](../packages/interaction/user-approval/src/index.ts) diff --git a/docs/config-catalog.zh.md b/docs/config-catalog.zh.md index cc8a303294..067d5a23b6 100644 --- a/docs/config-catalog.zh.md +++ b/docs/config-catalog.zh.md @@ -113,7 +113,7 @@ export interface Config { Depends on: [`AgentOptions`](subsystems/core.zh.md) · [`SessionId`](subsystems/core.zh.md) -来源:[`packages/core/agent-loop/src/index.ts:318`](../packages/core/agent-loop/src/index.ts) +来源:[`packages/core/agent-loop/src/index.ts:319`](../packages/core/agent-loop/src/index.ts) @@ -551,7 +551,7 @@ export interface Config { } ``` -来源:[`packages/extensions/cordis-host-runner/src/index.ts:88`](../packages/extensions/cordis-host-runner/src/index.ts) +来源:[`packages/extensions/cordis-host-runner/src/index.ts:94`](../packages/extensions/cordis-host-runner/src/index.ts) @@ -998,7 +998,7 @@ export interface Config { } ``` -来源:[`packages/hooks/hooks-claude-code/src/index.ts:44`](../packages/hooks/hooks-claude-code/src/index.ts) +来源:[`packages/hooks/hooks-claude-code/src/index.ts:51`](../packages/hooks/hooks-claude-code/src/index.ts) @@ -1025,7 +1025,7 @@ export interface Config { } ``` -来源:[`packages/hooks/hooks-codex/src/index.ts:43`](../packages/hooks/hooks-codex/src/index.ts) +来源:[`packages/hooks/hooks-codex/src/index.ts:50`](../packages/hooks/hooks-codex/src/index.ts) @@ -1876,7 +1876,7 @@ export interface PlanModeConfig { } ``` -来源:[`packages/plan/plan-mode/src/index.ts:64`](../packages/plan/plan-mode/src/index.ts) +来源:[`packages/plan/plan-mode/src/index.ts:70`](../packages/plan/plan-mode/src/index.ts) @@ -2039,7 +2039,7 @@ export interface Config { } ``` -来源:[`packages/guard/repeat-tool-reminder/src/index.ts:28`](../packages/guard/repeat-tool-reminder/src/index.ts) +来源:[`packages/guard/repeat-tool-reminder/src/index.ts:35`](../packages/guard/repeat-tool-reminder/src/index.ts) @@ -2983,7 +2983,7 @@ export interface Config { } ``` -来源:[`packages/context/time-context/src/index.ts:49`](../packages/context/time-context/src/index.ts) +来源:[`packages/context/time-context/src/index.ts:56`](../packages/context/time-context/src/index.ts) @@ -2999,7 +2999,7 @@ export interface Config { } ``` -来源:[`packages/context/tmux-context/src/index.ts:36`](../packages/context/tmux-context/src/index.ts) +来源:[`packages/context/tmux-context/src/index.ts:47`](../packages/context/tmux-context/src/index.ts) @@ -3123,7 +3123,7 @@ export interface Config { } ``` -来源:[`packages/goal/tool-goal/src/index.ts:25`](../packages/goal/tool-goal/src/index.ts) +来源:[`packages/goal/tool-goal/src/index.ts:32`](../packages/goal/tool-goal/src/index.ts) @@ -3157,7 +3157,7 @@ export interface Config { export type CompletionDelivery = 'quiet' | 'wakeup' ``` -来源:[`packages/jobs/tool-jobs/src/index.ts:31`](../packages/jobs/tool-jobs/src/index.ts) +来源:[`packages/jobs/tool-jobs/src/index.ts:37`](../packages/jobs/tool-jobs/src/index.ts) @@ -3545,7 +3545,7 @@ export interface Config { export type ApprovalPolicy = 'ask' | 'never' ``` -来源:[`packages/interaction/user-approval/src/index.ts:128`](../packages/interaction/user-approval/src/index.ts) +来源:[`packages/interaction/user-approval/src/index.ts:135`](../packages/interaction/user-approval/src/index.ts) diff --git a/docs/event-producer-consumer.i18n.yaml b/docs/event-producer-consumer.i18n.yaml index 85e0f4d3a0..2d5578ebcd 100644 --- a/docs/event-producer-consumer.i18n.yaml +++ b/docs/event-producer-consumer.i18n.yaml @@ -2,5 +2,5 @@ # side as of the last confirmed-consistent state. Both languages carry equal authority; # after editing either side, bring the other along and re-record with: # pnpm run verify-translation-pairing --write docs/event-producer-consumer.md -event-producer-consumer.md: 4addf64cc2d695ce28033a6051b63c09b5a6b0f1 -event-producer-consumer.zh.md: 9b7873a030db8f09c0acfa05c77b08f297650ba3 +event-producer-consumer.md: de9a96089397614e32487c29f34302d77f1f07a9 +event-producer-consumer.zh.md: bf668ddc86a610f05cf9f2c9a04b892a37dbcd4e diff --git a/docs/event-producer-consumer.md b/docs/event-producer-consumer.md index 4addf64cc2..de9a960893 100644 --- a/docs/event-producer-consumer.md +++ b/docs/event-producer-consumer.md @@ -7,7 +7,7 @@ This matrix shows which packages dispatch each harness-owned event and which pac | Event | Mode | Declared in | Dispatchers | Listeners | | --- | --- | --- | --- | --- | -| `agent-loop/config-start-failed` | `emit` | [`packages/core/agent-loop/src/index.ts:246`](../packages/core/agent-loop/src/index.ts) | [`agent-loop`](../packages/core/agent-loop) (`events.dispatch`) | - | +| `agent-loop/config-start-failed` | `emit` | [`packages/core/agent-loop/src/index.ts:247`](../packages/core/agent-loop/src/index.ts) | [`agent-loop`](../packages/core/agent-loop) (`events.dispatch`) | - | | `agent-preset/selected` | `emit` | [`packages/preset/agent-presets/src/types.ts:82`](../packages/preset/agent-presets/src/types.ts) | [`agent-presets`](../packages/preset/agent-presets) (`emit`) | `remotes` | | `agent/assistant-stream` | `emit` | [`packages/core/agent/src/runtime-types.ts:363`](../packages/core/agent/src/runtime-types.ts) | [`agent-loop`](../packages/core/agent-loop) (`emit`) | [`headless`](../packages/bundle/headless), `session-controller` | | `agent/created` | `serial` | [`packages/core/agent/src/runtime-types.ts:261`](../packages/core/agent/src/runtime-types.ts) | [`agent`](../packages/core/agent) (`serial`) | [`agent-presets`](../packages/preset/agent-presets), `agent-team`, `browser-use-runtime`, [`file-reference-local`](../packages/context/file-reference-local), [`goal`](../packages/goal/goal), [`goal-round-driver`](../packages/goal/goal-round-driver), [`hooks-claude-code`](../packages/hooks/hooks-claude-code), [`hooks-codex`](../packages/hooks/hooks-codex), [`loader-smoke`](../packages/test-support/loader-smoke), [`schedule`](../packages/schedule/schedule), `session-controller`, `tool-agent-team`, [`tool-subagent`](../packages/subagent/tool-subagent) | @@ -29,7 +29,7 @@ This matrix shows which packages dispatch each harness-owned event and which pac | `approval/request` | `waterfall` | [`packages/interaction/user-approval/src/types.ts:85`](../packages/interaction/user-approval/src/types.ts) | [`user-approval`](../packages/interaction/user-approval) (`waterfall`) | [`acp`](../packages/acp/acp), `remotes` | | `authorization/settled` | `emit` | [`packages/credentials/authorization/src/index.ts:57`](../packages/credentials/authorization/src/index.ts) | [`authorization`](../packages/credentials/authorization) (`events.dispatch`) | [`authorization`](../packages/credentials/authorization) | | `commands/change` | `emit` | [`packages/interaction/commands/src/types.ts:89`](../packages/interaction/commands/src/types.ts) | [`commands`](../packages/interaction/commands) (`events.dispatch`) | `remotes` | -| `compaction/summary-error` | `waterfall` | [`packages/compaction/compaction/src/index.ts:99`](../packages/compaction/compaction/src/index.ts) | [`compaction-basic`](../packages/compaction/compaction-basic) (`waterfall`) | [`compaction-image-offload`](../packages/compaction/compaction-image-offload) | +| `compaction/summary-error` | `waterfall` | [`packages/compaction/compaction/src/index.ts:106`](../packages/compaction/compaction/src/index.ts) | [`compaction-basic`](../packages/compaction/compaction-basic) (`waterfall`) | [`compaction-image-offload`](../packages/compaction/compaction-image-offload) | | `connection/request` | `waterfall` | [`packages/client/connection/src/index.ts:62`](../packages/client/connection/src/index.ts) | `connection` (`waterfall`) | - | | `cordis/dynamic-package` | `emit` | [`packages/extensions/cordis-host-runner/src/types.ts:380`](../packages/extensions/cordis-host-runner/src/types.ts) | [`cordis-host-runner`](../packages/extensions/cordis-host-runner) (`emit`) | `remotes` | | `cordis/dynamic-retract` | `emit` | [`packages/extensions/cordis-host-runner/src/types.ts:386`](../packages/extensions/cordis-host-runner/src/types.ts) | [`cordis-host-runner`](../packages/extensions/cordis-host-runner) (`emit`) | `remotes` | @@ -49,7 +49,7 @@ This matrix shows which packages dispatch each harness-owned event and which pac | `hmr/change` | `emit` | [`packages/boot/hmr/src/index.ts:30`](../packages/boot/hmr/src/index.ts) | [`hmr`](../packages/boot/hmr) (`emit`) | - | | `hmr/reload` | `emit` | [`packages/boot/hmr/src/index.ts:35`](../packages/boot/hmr/src/index.ts) | [`hmr`](../packages/boot/hmr) (`emit`) | - | | `llm/adapters-updated` | `emit` | [`packages/llm/llm/src/types.ts:23`](../packages/llm/llm/src/types.ts) | [`llm`](../packages/llm/llm) (`events.dispatch`) | [`acp`](../packages/acp/acp), [`llm`](../packages/llm/llm), `remotes` | -| `llm/stream` | `waterfall` | [`packages/llm/llm/src/index.ts:72`](../packages/llm/llm/src/index.ts) | [`llm`](../packages/llm/llm) (`waterfall`) | [`agent-loop`](../packages/core/agent-loop), [`llm`](../packages/llm/llm), [`llm-replay`](../packages/test-support/llm-replay), [`session-checkpoint-policy`](../packages/session/session-checkpoint-policy), [`session-title`](../packages/session/session-title) | +| `llm/stream` | `waterfall` | [`packages/llm/llm/src/index.ts:73`](../packages/llm/llm/src/index.ts) | [`llm`](../packages/llm/llm) (`waterfall`) | [`agent-loop`](../packages/core/agent-loop), [`llm`](../packages/llm/llm), [`llm-replay`](../packages/test-support/llm-replay), [`session-checkpoint-policy`](../packages/session/session-checkpoint-policy), [`session-title`](../packages/session/session-title) | | `permission-presets/catalog-changed` | `emit` | [`packages/interaction/permission-presets/src/types.ts:44`](../packages/interaction/permission-presets/src/types.ts) | [`permission-presets`](../packages/interaction/permission-presets) (`events.dispatch`) | `remotes` | | `plugin-manager/changed` | `emit` | [`packages/boot/plugin-manager/src/types.ts:189`](../packages/boot/plugin-manager/src/types.ts) | [`plugin-manager`](../packages/boot/plugin-manager) (`emit`) | `remotes` | | `plugin-manager/install-log` | `emit` | [`packages/boot/plugin-manager/src/types.ts:195`](../packages/boot/plugin-manager/src/types.ts) | [`plugin-manager`](../packages/boot/plugin-manager) (`emit`) | `remotes` | diff --git a/docs/event-producer-consumer.zh.md b/docs/event-producer-consumer.zh.md index 9b7873a030..bf668ddc86 100644 --- a/docs/event-producer-consumer.zh.md +++ b/docs/event-producer-consumer.zh.md @@ -9,7 +9,7 @@ | Event | Mode | Declared in | Dispatchers | Listeners | | --- | --- | --- | --- | --- | -| `agent-loop/config-start-failed` | `emit` | [`packages/core/agent-loop/src/index.ts:246`](../packages/core/agent-loop/src/index.ts) | [`agent-loop`](../packages/core/agent-loop) (`events.dispatch`) | - | +| `agent-loop/config-start-failed` | `emit` | [`packages/core/agent-loop/src/index.ts:247`](../packages/core/agent-loop/src/index.ts) | [`agent-loop`](../packages/core/agent-loop) (`events.dispatch`) | - | | `agent-preset/selected` | `emit` | [`packages/preset/agent-presets/src/types.ts:82`](../packages/preset/agent-presets/src/types.ts) | [`agent-presets`](../packages/preset/agent-presets) (`emit`) | `remotes` | | `agent/assistant-stream` | `emit` | [`packages/core/agent/src/runtime-types.ts:363`](../packages/core/agent/src/runtime-types.ts) | [`agent-loop`](../packages/core/agent-loop) (`emit`) | [`headless`](../packages/bundle/headless), `session-controller` | | `agent/created` | `serial` | [`packages/core/agent/src/runtime-types.ts:261`](../packages/core/agent/src/runtime-types.ts) | [`agent`](../packages/core/agent) (`serial`) | [`agent-presets`](../packages/preset/agent-presets), `agent-team`, `browser-use-runtime`, [`file-reference-local`](../packages/context/file-reference-local), [`goal`](../packages/goal/goal), [`goal-round-driver`](../packages/goal/goal-round-driver), [`hooks-claude-code`](../packages/hooks/hooks-claude-code), [`hooks-codex`](../packages/hooks/hooks-codex), [`loader-smoke`](../packages/test-support/loader-smoke), [`schedule`](../packages/schedule/schedule), `session-controller`, `tool-agent-team`, [`tool-subagent`](../packages/subagent/tool-subagent) | @@ -31,7 +31,7 @@ | `approval/request` | `waterfall` | [`packages/interaction/user-approval/src/types.ts:85`](../packages/interaction/user-approval/src/types.ts) | [`user-approval`](../packages/interaction/user-approval) (`waterfall`) | [`acp`](../packages/acp/acp), `remotes` | | `authorization/settled` | `emit` | [`packages/credentials/authorization/src/index.ts:57`](../packages/credentials/authorization/src/index.ts) | [`authorization`](../packages/credentials/authorization) (`events.dispatch`) | [`authorization`](../packages/credentials/authorization) | | `commands/change` | `emit` | [`packages/interaction/commands/src/types.ts:89`](../packages/interaction/commands/src/types.ts) | [`commands`](../packages/interaction/commands) (`events.dispatch`) | `remotes` | -| `compaction/summary-error` | `waterfall` | [`packages/compaction/compaction/src/index.ts:99`](../packages/compaction/compaction/src/index.ts) | [`compaction-basic`](../packages/compaction/compaction-basic) (`waterfall`) | [`compaction-image-offload`](../packages/compaction/compaction-image-offload) | +| `compaction/summary-error` | `waterfall` | [`packages/compaction/compaction/src/index.ts:106`](../packages/compaction/compaction/src/index.ts) | [`compaction-basic`](../packages/compaction/compaction-basic) (`waterfall`) | [`compaction-image-offload`](../packages/compaction/compaction-image-offload) | | `connection/request` | `waterfall` | [`packages/client/connection/src/index.ts:62`](../packages/client/connection/src/index.ts) | `connection` (`waterfall`) | - | | `cordis/dynamic-package` | `emit` | [`packages/extensions/cordis-host-runner/src/types.ts:380`](../packages/extensions/cordis-host-runner/src/types.ts) | [`cordis-host-runner`](../packages/extensions/cordis-host-runner) (`emit`) | `remotes` | | `cordis/dynamic-retract` | `emit` | [`packages/extensions/cordis-host-runner/src/types.ts:386`](../packages/extensions/cordis-host-runner/src/types.ts) | [`cordis-host-runner`](../packages/extensions/cordis-host-runner) (`emit`) | `remotes` | @@ -51,7 +51,7 @@ | `hmr/change` | `emit` | [`packages/boot/hmr/src/index.ts:30`](../packages/boot/hmr/src/index.ts) | [`hmr`](../packages/boot/hmr) (`emit`) | - | | `hmr/reload` | `emit` | [`packages/boot/hmr/src/index.ts:35`](../packages/boot/hmr/src/index.ts) | [`hmr`](../packages/boot/hmr) (`emit`) | - | | `llm/adapters-updated` | `emit` | [`packages/llm/llm/src/types.ts:23`](../packages/llm/llm/src/types.ts) | [`llm`](../packages/llm/llm) (`events.dispatch`) | [`acp`](../packages/acp/acp), [`llm`](../packages/llm/llm), `remotes` | -| `llm/stream` | `waterfall` | [`packages/llm/llm/src/index.ts:72`](../packages/llm/llm/src/index.ts) | [`llm`](../packages/llm/llm) (`waterfall`) | [`agent-loop`](../packages/core/agent-loop), [`llm`](../packages/llm/llm), [`llm-replay`](../packages/test-support/llm-replay), [`session-checkpoint-policy`](../packages/session/session-checkpoint-policy), [`session-title`](../packages/session/session-title) | +| `llm/stream` | `waterfall` | [`packages/llm/llm/src/index.ts:73`](../packages/llm/llm/src/index.ts) | [`llm`](../packages/llm/llm) (`waterfall`) | [`agent-loop`](../packages/core/agent-loop), [`llm`](../packages/llm/llm), [`llm-replay`](../packages/test-support/llm-replay), [`session-checkpoint-policy`](../packages/session/session-checkpoint-policy), [`session-title`](../packages/session/session-title) | | `permission-presets/catalog-changed` | `emit` | [`packages/interaction/permission-presets/src/types.ts:44`](../packages/interaction/permission-presets/src/types.ts) | [`permission-presets`](../packages/interaction/permission-presets) (`events.dispatch`) | `remotes` | | `plugin-manager/changed` | `emit` | [`packages/boot/plugin-manager/src/types.ts:189`](../packages/boot/plugin-manager/src/types.ts) | [`plugin-manager`](../packages/boot/plugin-manager) (`emit`) | `remotes` | | `plugin-manager/install-log` | `emit` | [`packages/boot/plugin-manager/src/types.ts:195`](../packages/boot/plugin-manager/src/types.ts) | [`plugin-manager`](../packages/boot/plugin-manager) (`emit`) | `remotes` | diff --git a/docs/persistence-catalog.i18n.yaml b/docs/persistence-catalog.i18n.yaml index fee0092bc7..9fdf4cf1bf 100644 --- a/docs/persistence-catalog.i18n.yaml +++ b/docs/persistence-catalog.i18n.yaml @@ -2,5 +2,5 @@ # side as of the last confirmed-consistent state. Both languages carry equal authority; # after editing either side, bring the other along and re-record with: # pnpm run verify-translation-pairing --write docs/persistence-catalog.md -persistence-catalog.md: 06f53ee170ae77985f1f6647a115bae217d60180 -persistence-catalog.zh.md: 4c5b640b694a91ac690110a1ec54b71624349322 +persistence-catalog.md: 0d97fb37b921effbab4988770af6e93efc360be6 +persistence-catalog.zh.md: ea5d1c8dd1691549159bcd24def1116719f0176c diff --git a/docs/persistence-catalog.md b/docs/persistence-catalog.md index 06f53ee170..0d97fb37b9 100644 --- a/docs/persistence-catalog.md +++ b/docs/persistence-catalog.md @@ -21,7 +21,7 @@ The [format references](persistence-changes/historical-formats/README.md) cover | `JsonlHeaderLine` | header | `18ee62b8900a4c3d046700f05d7a4d49d6cab2a660a020c87481d1603dd8bd4f` | [`HeaderLine`](#persistence-type-sha256-18ee62b8900a4c3d046700f05d7a4d49d6cab2a660a020c87481d1603dd8bd4f) | | `SessionEventEnvelope` | envelope | `5776e5553ff2dfe3f5bc202dbb1e7c9f93e35a531aebb7764c23b2b6153b2ccc` | [`union (3 variants)`](#persistence-type-sha256-5776e5553ff2dfe3f5bc202dbb1e7c9f93e35a531aebb7764c23b2b6153b2ccc) | | `event:agent-preset/selected` | event | `a10c17474eaf2ddab7095a099e0fe3d046fc18e56c3e344fc8894c05ff9ef97b` | [`{ type: "agent-preset/selected" }`](#persistence-type-sha256-a10c17474eaf2ddab7095a099e0fe3d046fc18e56c3e344fc8894c05ff9ef97b) | -| `event:agent/inbox/spliced` | event | `cbe418d5a3727fbd3599f90101680dae254ac1d6163b1b8b2ca30f28afb5212a` | [`{ type: "agent/inbox/spliced" }`](#persistence-type-sha256-cbe418d5a3727fbd3599f90101680dae254ac1d6163b1b8b2ca30f28afb5212a) | +| `event:agent/inbox/spliced` | event | `ab1acc0685cc410d0d1e85ff0e0bd29f4b2b4352dd170db54988319d58d4362f` | [`{ type: "agent/inbox/spliced" }`](#persistence-type-sha256-ab1acc0685cc410d0d1e85ff0e0bd29f4b2b4352dd170db54988319d58d4362f) | | `event:approval/asked` | event | `3bfeb47b58606f4661904bc723da612782214c463d01e6d61cd6d6193d7374e1` | [`{ type: "approval/asked" }`](#persistence-type-sha256-3bfeb47b58606f4661904bc723da612782214c463d01e6d61cd6d6193d7374e1) | | `event:approval/decided` | event | `bb1ab3d08f49a9f3b265f844cd78d5c49813062a7b34b54904b426f85d0ff6e3` | [`{ type: "approval/decided" }`](#persistence-type-sha256-bb1ab3d08f49a9f3b265f844cd78d5c49813062a7b34b54904b426f85d0ff6e3) | | `event:approval/policy` | event | `26718e15e7e395bce9642dba5bbe09b3b1a4ce2213d20d566cd9207d7fc5fb78` | [`{ type: "approval/policy" }`](#persistence-type-sha256-26718e15e7e395bce9642dba5bbe09b3b1a4ce2213d20d566cd9207d7fc5fb78) | @@ -53,13 +53,13 @@ The [format references](persistence-changes/historical-formats/README.md) cover | `event:session-log-deepseek/delivery-accepted` | event | `d63b8b8ffad9c02fd80c43a17df4f240c1fe8118ecca9de34f9d5871838ab5b9` | [`{ type: "session-log-deepseek/delivery-accepted" }`](#persistence-type-sha256-d63b8b8ffad9c02fd80c43a17df4f240c1fe8118ecca9de34f9d5871838ab5b9) | | `event:session/end-seed` | event | `5e6db6e24948d4a853c71cb9fabd252ad051ce93d4672c1266cf837c1c17b84e` | [`{ type: "session/end-seed" }`](#persistence-type-sha256-5e6db6e24948d4a853c71cb9fabd252ad051ce93d4672c1266cf837c1c17b84e) | | `event:session/title` | event | `1b912703e2d64f91c99c675b8f805b01076c8325b905c1218ad81ef0b24909d5` | [`{ type: "session/title" }`](#persistence-type-sha256-1b912703e2d64f91c99c675b8f805b01076c8325b905c1218ad81ef0b24909d5) | -| `event:session/title-llm-request` | event | `2a47ef7025d7dcf7e9977aadd738e7408a210b101a7dbbd37f4d87f22166eff0` | [`{ type: "session/title-llm-request" }`](#persistence-type-sha256-2a47ef7025d7dcf7e9977aadd738e7408a210b101a7dbbd37f4d87f22166eff0) | +| `event:session/title-llm-request` | event | `eb655047c0dd3f2f3aefd2c9c719df0d060dd88032ba7caf731ea39db5a6725f` | [`{ type: "session/title-llm-request" }`](#persistence-type-sha256-eb655047c0dd3f2f3aefd2c9c719df0d060dd88032ba7caf731ea39db5a6725f) | | `event:step/end` | event | `e0a787e6ec76c7c94fecbc501b489164ab0293db05bc947914077ad01e674f05` | [`{ type: "step/end" }`](#persistence-type-sha256-e0a787e6ec76c7c94fecbc501b489164ab0293db05bc947914077ad01e674f05) | | `event:step/start` | event | `4513e088d43e6c68425be30451b9f961cc264fe7318ca62681c41d4d78615986` | [`{ type: "step/start" }`](#persistence-type-sha256-4513e088d43e6c68425be30451b9f961cc264fe7318ca62681c41d4d78615986) | | `event:subagent/catalog` | event | `ae1f7110feeec697b8cab42b68f7709aa7b3279764099dfb53c25890d2e5c871` | [`{ type: "subagent/catalog" }`](#persistence-type-sha256-ae1f7110feeec697b8cab42b68f7709aa7b3279764099dfb53c25890d2e5c871) | | `event:subagent/descriptor` | event | `b79ada42962cad0190a9d465805260567621fa3a4abd757eb31e6016b52d5ab5` | [`{ type: "subagent/descriptor" }`](#persistence-type-sha256-b79ada42962cad0190a9d465805260567621fa3a4abd757eb31e6016b52d5ab5) | | `event:subagent/model-selection-policy` | event | `a6567ccb2e530606b775371eb4fa31468d72084339968e8b0440a516a23b39dc` | [`{ type: "subagent/model-selection-policy" }`](#persistence-type-sha256-a6567ccb2e530606b775371eb4fa31468d72084339968e8b0440a516a23b39dc) | -| `event:system/message` | event | `1772581b17e1fab970fda49f04ffae2a181b7992ca4efa63bffe5f8b2bd62300` | [`{ type: "system/message" }`](#persistence-type-sha256-1772581b17e1fab970fda49f04ffae2a181b7992ca4efa63bffe5f8b2bd62300) | +| `event:system/message` | event | `54a8682615a7ffc3e1e3c41ab003ae61082ae2792c57407f5bd8bb38fded3f0e` | [`{ type: "system/message" }`](#persistence-type-sha256-54a8682615a7ffc3e1e3c41ab003ae61082ae2792c57407f5bd8bb38fded3f0e) | | `event:team/member` | event | `4fb59762612c3e3ac3a3bd4f84c9c148d3c3893bd422ba2b201cc039fabd49bc` | [`{ type: "team/member" }`](#persistence-type-sha256-4fb59762612c3e3ac3a3bd4f84c9c148d3c3893bd422ba2b201cc039fabd49bc) | | `event:team/message/delivered` | event | `48f9c19417a1abbedfa59f4667bba36b93ac2db407adf5e84cb3ba0de30942cb` | [`{ type: "team/message/delivered" }`](#persistence-type-sha256-48f9c19417a1abbedfa59f4667bba36b93ac2db407adf5e84cb3ba0de30942cb) | | `event:team/message/queued` | event | `9a25c2e889855516a531dc906905ec1d88157f7c2651aed27ac4f754bb128240` | [`{ type: "team/message/queued" }`](#persistence-type-sha256-9a25c2e889855516a531dc906905ec1d88157f7c2651aed27ac4f754bb128240) | @@ -75,7 +75,7 @@ The [format references](persistence-changes/historical-formats/README.md) cover | `event:tool/result` | event | `f4c6f3eae6607f412a9023406c8c3bd351a02451848bb78c2436f409447dd60c` | [`{ type: "tool/result" }`](#persistence-type-sha256-f4c6f3eae6607f412a9023406c8c3bd351a02451848bb78c2436f409447dd60c) | | `event:turn/end` | event | `0f8512903d94f57a4748fa1a2092e64342856796684e6b8343db685b192745ce` | [`{ type: "turn/end" }`](#persistence-type-sha256-0f8512903d94f57a4748fa1a2092e64342856796684e6b8343db685b192745ce) | | `event:turn/start` | event | `aa0957eca50aeb28bcd2e6930b95809926edacb550c8c340ba526ba6b861b3d8` | [`{ type: "turn/start" }`](#persistence-type-sha256-aa0957eca50aeb28bcd2e6930b95809926edacb550c8c340ba526ba6b861b3d8) | -| `event:user/message` | event | `5274b395e7bf6660d020fba7e29a1e20ef2e77097fd7597e9debb13e45c540d6` | [`{ type: "user/message" }`](#persistence-type-sha256-5274b395e7bf6660d020fba7e29a1e20ef2e77097fd7597e9debb13e45c540d6) | +| `event:user/message` | event | `46c44941f6e93a1764c49f1487e64a57f73ee68a75a657e94c326a8de5d8ad95` | [`{ type: "user/message" }`](#persistence-type-sha256-46c44941f6e93a1764c49f1487e64a57f73ee68a75a657e94c326a8de5d8ad95) | | `event:web/deepseek-search-llm-request` | event | `cf6e3aaf1e2de6480aa0157730a41b9a492108a55304100b0f7e112711dd4331` | [`{ type: "web/deepseek-search-llm-request" }`](#persistence-type-sha256-cf6e3aaf1e2de6480aa0157730a41b9a492108a55304100b0f7e112711dd4331) | | `event:workspace/changes` | event | `e308ccf867a5398e316e0af8cb6ce238a8d33a63b9b384c8250a686786285f72` | [`{ type: "workspace/changes" }`](#persistence-type-sha256-e308ccf867a5398e316e0af8cb6ce238a8d33a63b9b384c8250a686786285f72) | @@ -263,7 +263,7 @@ Source: [`packages/interaction/user-approval/src/types.ts:55`](../packages/inter } ``` -Source: [`packages/interaction/user-approval/src/index.ts:33`](../packages/interaction/user-approval/src/index.ts) +Source: [`packages/interaction/user-approval/src/index.ts:40`](../packages/interaction/user-approval/src/index.ts) ### `assistant/*` @@ -676,7 +676,7 @@ Source: [`packages/interaction/permission-presets/src/index.ts:57`](../packages/ 'plan/mode': { active: boolean } ``` -Source: [`packages/plan/plan-mode/src/index.ts:47`](../packages/plan/plan-mode/src/index.ts) +Source: [`packages/plan/plan-mode/src/index.ts:53`](../packages/plan/plan-mode/src/index.ts) ### `request/*` @@ -819,7 +819,7 @@ Source: [`packages/session/session-title/src/index.ts:77`](../packages/session/s Types: [SessionTitleLlmRequestEventData](subsystems/session-title.md) -Source: [`packages/session/session-title-llm/src/index.ts:45`](../packages/session/session-title-llm/src/index.ts) +Source: [`packages/session/session-title-llm/src/index.ts:52`](../packages/session/session-title-llm/src/index.ts) ### `session-log-deepseek/*` @@ -1496,6 +1496,14 @@ SHA-256: `e7e154d47d5fbc5366330fb4dade1f108c6dfe4335044d21ded14b7bf1dce084` `"clear"` + + +### `"code-mode"` + +SHA-256: `1443074511c1f99aaac262e60f81282cd4f2790e7c7ca0d11499bbe7c1e769bf` + +`"code-mode"` + ### `"codex"` @@ -1520,6 +1528,14 @@ SHA-256: `f1996af2602e6f62b5ab179ca5c4af00d8753938b74cc6ef102de09e99e74a7e` `"command/run"` + + +### `"compact-checkpoint"` + +SHA-256: `6b23ed9ce1b397e602788dbe033693bf97642a69e23fcab1cc45bf6f13b6d619` + +`"compact-checkpoint"` + ### `"compaction/end"` @@ -1576,6 +1592,14 @@ SHA-256: `e5d3828df1ec3e2a66879de0659e0f4866d9cfffc00825ee731a66f8a0c03d98` `"continuable"` + + +### `"cordis-host-runner"` + +SHA-256: `c5687b1313206a6ff334066047b6a0681611467dc4df8c5a8e71d0b6df39311f` + +`"cordis-host-runner"` + ### `"create"` @@ -1640,6 +1664,14 @@ SHA-256: `b38f206d59bad891fa58c89f97a0036987b3defe7685acbd318fa55eb85f9751` `"disposed"` + + +### `"dsh-session-title-llm"` + +SHA-256: `23af3759678a30de1d11d946772da8c051c63caa67997c5da05d30d7a9fe8a97` + +`"dsh-session-title-llm"` + ### `"edit"` @@ -1784,6 +1816,22 @@ SHA-256: `a3a259a1aa5401af786ce08c4a8419681d3000d73467991b5fc563389bc4ebd2` `"hook/result"` + + +### `"hooks-claude-code"` + +SHA-256: `a9059a81430b320792bbb7c2ee1f8f6c77ff71e40ee44c18aec72e157c522694` + +`"hooks-claude-code"` + + + +### `"hooks-codex"` + +SHA-256: `bb94f3217aa56c8876bbff0b8460d6a73cbead545659abb29e76cd0cf2cb92d6` + +`"hooks-codex"` + ### `"image"` @@ -1926,6 +1974,14 @@ SHA-256: `2765e9119edf5816ac1ab4c95c5ee32c90403f3742962eff11544f7752d59d2e` `"model"` + + +### `"model-selection"` + +SHA-256: `9ac52f0f84fec2eb9f71c2937e497d759db5ca0da4836d93a679d113684141f2` + +`"model-selection"` + ### `"model/selection"` @@ -2038,6 +2094,14 @@ SHA-256: `ae63d9d1080ed8945031594d93f8d96651d7101b848719cc3e1475875cd3d649` `"permission/preset"` + + +### `"plan-mode"` + +SHA-256: `0fe52387f65052702ed9d7cd59db826468936595d1b3eec207e7a823adc719db` + +`"plan-mode"` + ### `"plan/mode"` @@ -2046,14 +2110,6 @@ SHA-256: `f634871d1e18b1eb199497ac8ab72d3964f48d03fbf611dc7521a1970cf429d9` `"plan/mode"` - - -### `"plugin"` - -SHA-256: `e654d28d1e6c471147310d2fba396d00969cfe6ed9022626d3f2c2312e0b1cbb` - -`"plugin"` - ### `"positive"` @@ -2150,6 +2206,14 @@ SHA-256: `7382c4fc95fe8c5db65ca4d9da572b115d0dbb818b7f32c22ab040318ffbb4bc` `"remove"` + + +### `"repeat-tool-reminder"` + +SHA-256: `1f1385dbc3e875c021e387c7096d671d606f22daec51b25c80348735b6bbfa10` + +`"repeat-tool-reminder"` + ### `"replace"` @@ -2190,6 +2254,14 @@ SHA-256: `34d1ab5c5df378186d6054b1a1beea9a41e41965d6f336f0bc0025c441a82e66` `"resume"` + + +### `"runtime-context"` + +SHA-256: `24b10f7cdae64928f89c49afc2eca0af9eb4a2f135e16f3416e6b8461fef1748` + +`"runtime-context"` + ### `"sandbox/mode"` @@ -2198,6 +2270,14 @@ SHA-256: `ca085dba2c877feceebf3c62f9d39c6c2a4d2314d97b94b3927a780fe8fe2bb2` `"sandbox/mode"` + + +### `"schedule"` + +SHA-256: `d9edf1862e4471d6ad8a106a3f4160e0643874368707d50ecd8e27e5ee7a2567` + +`"schedule"` + ### `"schedule/change"` @@ -2390,6 +2470,14 @@ SHA-256: `8af841fc9b265ade3441caf9fe40dd24db24226befba48150e6d0eeccc1389c3` `"system"` + + +### `"system-prompt"` + +SHA-256: `09655b34d7f3cf1e9005974de2357de2d4a60deea165d16dac1eadaa6ec539a8` + +`"system-prompt"` + ### `"system/message"` @@ -2470,6 +2558,22 @@ SHA-256: `5abab3a27fd2736660ecddd94b28d6bbf114986dd894880153bd1be3ccacb563` `"text-delta"` + + +### `"time-context"` + +SHA-256: `8067b0d232c350f189738e60ee3c9939d46ca3b32b45db5525237b077893f649` + +`"time-context"` + + + +### `"tmux-context"` + +SHA-256: `78a9be340090b735a39980e7222ce730c972fbcf1de7c9e0aef2125884b7caee` + +`"tmux-context"` + ### `"todo/write"` @@ -2518,6 +2622,22 @@ SHA-256: `6c1cccb433ddc153facb380c7dda956237ba5c31f8a532a69142dc277890cc9b` `"tool-calls"` + + +### `"tool-goal"` + +SHA-256: `2f3f201c8846e19c20bb75c02280e3d4eb3c57509e4715f0c0a4d1d4f91a7a06` + +`"tool-goal"` + + + +### `"tool-jobs"` + +SHA-256: `99e7e7d7fed55ae6a3a648b35192f16ab1248ddcb0179a0e275128ac1487d7c7` + +`"tool-jobs"` + ### `"tool-workflow/agent-end"` @@ -2622,6 +2742,14 @@ SHA-256: `68f44f59e91c41395076cb77265981a601680ec8a381bbbeb6ab754ffdc94573` `"user"` + + +### `"user-approval"` + +SHA-256: `f68c335306535a001127dae6685ece493a0ee7f4e2a851197b6054d8a9ff7394` + +`"user-approval"` + ### `"user/message"` @@ -2824,7 +2952,7 @@ One of: SHA-256: `05d2ae1e0c7f8770f83f9a09047afb39a335d8ac986df3193659aa1e581472cf` -Sources: [`packages/interaction/user-approval/src/index.ts:60`](../packages/interaction/user-approval/src/index.ts) +Sources: [`packages/interaction/user-approval/src/index.ts:67`](../packages/interaction/user-approval/src/index.ts) One of: @@ -2841,7 +2969,7 @@ One of: SHA-256: `fd796823ba99092846b017e4a9c2d8ea5a1c8e15a3125662cadba1860ceb1b05` -Sources: [`packages/llm/llm/src/message.ts:152`](../packages/llm/llm/src/message.ts) +Sources: [`packages/llm/llm/src/message.ts:162`](../packages/llm/llm/src/message.ts) | Property | Presence | Type | |---|---|---| @@ -2906,12 +3034,30 @@ Sources: [`packages/schedule/schedule/src/types.ts:27`](../packages/schedule/sch SHA-256: `ada310bf0bdb8fed51f3b56ea63f6ea6b18bbd587f04fccb63a14ab0b2a24e05` -Sources: [`packages/core/session/src/types.ts:189`](../packages/core/session/src/types.ts) · [`packages/interaction/commands/src/types.ts:75`](../packages/interaction/commands/src/types.ts) · [`packages/interaction/commands/src/types.ts:79`](../packages/interaction/commands/src/types.ts) · [`packages/llm/llm/src/message.ts:103`](../packages/llm/llm/src/message.ts) · [`packages/session/session-title/src/types.ts:35`](../packages/session/session-title/src/types.ts) +Sources: [`packages/core/session/src/types.ts:189`](../packages/core/session/src/types.ts) · [`packages/interaction/commands/src/types.ts:75`](../packages/interaction/commands/src/types.ts) · [`packages/interaction/commands/src/types.ts:79`](../packages/interaction/commands/src/types.ts) · [`packages/llm/llm/src/message.ts:111`](../packages/llm/llm/src/message.ts) · [`packages/session/session-title/src/types.ts:35`](../packages/session/session-title/src/types.ts) | Property | Presence | Type | |---|---|---| | `kind` | required | `"user"` | + + + + + + +### `CompactionCheckpointSource` + +SHA-256: `31907de9563751822af6d9be02bafaf26faa098bbd1cb412524134d577cc1648` + +Sources: [`packages/compaction/compaction/src/checkpoint.ts:22`](../packages/compaction/compaction/src/checkpoint.ts) + +| Property | Presence | Type | +|---|---|---| +| `compactionId` | required | `string` | +| `kind` | required | `"compact-checkpoint"` | +| `sourceCommandId` | optional | `string` | + @@ -2970,7 +3116,7 @@ Array of [`ContentBlock`](#persistence-type-sha256-3fb78de1c2ec9391966fe41554296 SHA-256: `86e1e384495ee09ac2d60c9db3610f1f1fddac2d248f6f1d6000e78054680219` -Sources: [`packages/llm/llm/src/message.ts:65`](../packages/llm/llm/src/message.ts) +Sources: [`packages/llm/llm/src/message.ts:70`](../packages/llm/llm/src/message.ts) | Property | Presence | Type | |---|---|---| @@ -3578,7 +3724,7 @@ Sources: [`packages/llm/llm-retry/src/types.ts:43`](../packages/llm/llm-retry/sr | `step` | required | `number` | | `turn` | required | `number` | - + @@ -3586,16 +3732,16 @@ Sources: [`packages/llm/llm-retry/src/types.ts:43`](../packages/llm/llm-retry/sr ### `Message` -SHA-256: `01bc74417fd4ff36c2840b266a5b3b51bf0e3b71eb43960a2c4aee7b7441a2aa` +SHA-256: `cc2968a9a0a95309a7d3218dcb0c55d153fe7b8c03b5648ea6fcc69d91a64a7f` -Sources: [`packages/llm/llm/src/message.ts:180`](../packages/llm/llm/src/message.ts) +Sources: [`packages/llm/llm/src/message.ts:190`](../packages/llm/llm/src/message.ts) One of: - [`ToolResultMessage`](#persistence-type-sha256-8a8b1c3cf223fe58bbe45ea57f0b80eb262a653066dfe5683a648390ed91c13c) -- [`SystemMessage`](#persistence-type-sha256-abb8be1a8972c5531c513de95c678bac414263fb5e4bf6dcf871ca913f47bd94) +- [`UserMessage`](#persistence-type-sha256-980b8f7c2576a03df48bd09fd68000d88eaec6e99ca5bec36e6448401b8e3e95) - [`AssistantMessage`](#persistence-type-sha256-fd796823ba99092846b017e4a9c2d8ea5a1c8e15a3125662cadba1860ceb1b05) -- [`UserMessage`](#persistence-type-sha256-a48b761be36821fcf456c862e321284bdd879dd796d29d20b1766e0417f7c966) +- [`SystemMessage`](#persistence-type-sha256-20a3c1c8a3154e4ae69eada1212e3216baf93454ee4c745565b9374d7539fe8b) @@ -3670,7 +3816,7 @@ One of: - `"negative"` - `"positive"` - + @@ -3678,40 +3824,128 @@ One of: ### `MessageSource` -SHA-256: `4c965666d5b42116945bc356087cd5e1fd549e6dece560785ed60511059a8283` +SHA-256: `7aae986884b7f69068d9f9d7d77910a0dbe2b265843a041576877eb1bc01f31e` -Sources: [`packages/llm/llm/src/message.ts:128`](../packages/llm/llm/src/message.ts) +Sources: [`packages/llm/llm/src/message.ts:136`](../packages/llm/llm/src/message.ts) | kind | Form property | Other required fields | Full definition | |---|---|---|---| | `agent-instructions` | `"instructions"` | `changes`: [`AgentInstructionChange[]`](#persistence-type-sha256-2ab12a0e345658f9342816d773fe610f049982bcad82631f43b9205abe43e5ee) | [`AgentInstructionSource`](#persistence-type-sha256-6f22a9d02b9a1f1157f3b0e7bdccd7e7b12b085c4efdb709dfc74a465cd4e590) | | `agent-message` | `"relay"` | `senderSessionId`: `string` | [`AgentMessageSource`](#persistence-type-sha256-4a9bef9f27a942520cc2279ca7dd3082556e4bff543f66b5c0333e1bbed1cd86) | +| `code-mode` | not declared | none | [`{ kind: "code-mode" }`](#persistence-type-sha256-b0fdf76590690063dff16e2ba5aa14cb6ed074b61980b3860c299c2e8efc7a1a) | +| `compact-checkpoint` | not declared | `compactionId`: `string` | [`CompactionCheckpointSource`](#persistence-type-sha256-31907de9563751822af6d9be02bafaf26faa098bbd1cb412524134d577cc1648) | +| `cordis-host-runner` | not declared | none | [`{ kind: "cordis-host-runner" }`](#persistence-type-sha256-02b2c23f2d94b028c9588a8faace3fce1217405db346da3389368b495457bf79) | +| `dsh-session-title-llm` | `"catalog"` | none | [`{ kind: "dsh-session-title-llm", form: "catalog" }`](#persistence-type-sha256-80677c8c8b804189a0fde8aa70dd4ad7af8bb12dfd03027e8e023c8592c838bc) | +| `dsh-session-title-llm` | `"instructions"` | none | [`{ kind: "dsh-session-title-llm", form: "instructions" }`](#persistence-type-sha256-224aa11d4d5f88c450822d01b99e6ca5e3a9c7f26a5ede10bae33384a09ef4dc) | +| `dsh-session-title-llm` | `"notice"` | `summary`: `string` | [`{ kind: "dsh-session-title-llm", form: "notice" }`](#persistence-type-sha256-8338ee303e2bd448e9e6144069942f63e3cfd5868962bddc9347d7009e8919d6) | +| `dsh-session-title-llm` | `"recall"` | none | [`{ kind: "dsh-session-title-llm", form: "recall" }`](#persistence-type-sha256-b2a5c8c008a31e3dc6c3013502f2356aca13894b31c8e70601fa92f2d40d1dba) | +| `dsh-session-title-llm` | `"relay"` | none | [`{ kind: "dsh-session-title-llm", form: "relay" }`](#persistence-type-sha256-7eaef7a763ba5b949b8464bc8add8980a3a5ab566014b69787aeba71e5dfe07b) | +| `dsh-session-title-llm` | `"snapshot"` | `sections`: [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | [`{ kind: "dsh-session-title-llm", form: "snapshot" }`](#persistence-type-sha256-ba4c40b4381e0dcdfab8fc9fc75b5c9b3e8f09ef56deeb1bec8e703b0ef8cd6d) | +| `dsh-session-title-llm` | not declared | none | [`{ kind: "dsh-session-title-llm" }`](#persistence-type-sha256-290f32bfd81ff85a8095886a8066fae06e885942b63a8bcd6a8d66d328445808) | | `goal` | not declared | `goalId`: `string`; `revision`: `number`; `round`: `number` | [`GoalMessageSource`](#persistence-type-sha256-7f959241c24128b4983b559984811861dc59774b85905c8fa57c6cb0148a3dbc) | +| `hooks-claude-code` | `"catalog"` | none | [`{ kind: "hooks-claude-code", form: "catalog" }`](#persistence-type-sha256-297fbd8067d7815adae02b89790ec6ff5fb7c2cb0d0eb026e1746c24ec857761) | +| `hooks-claude-code` | `"instructions"` | none | [`{ kind: "hooks-claude-code", form: "instructions" }`](#persistence-type-sha256-b70f3e81fe11b7a5f2504fb47a4502fb8d9c8f0731fdfe8ddcaf9b41f5a6e196) | +| `hooks-claude-code` | `"notice"` | `summary`: `string` | [`{ kind: "hooks-claude-code", form: "notice" }`](#persistence-type-sha256-edbbfff1128099fda7b792c56330d2cb04debc9790988e66d1c3f4026e813e0e) | +| `hooks-claude-code` | `"recall"` | none | [`{ kind: "hooks-claude-code", form: "recall" }`](#persistence-type-sha256-87b1a33564b9a4d63b00988a524c12259243953aebb9c9a05127d87b27464df9) | +| `hooks-claude-code` | `"relay"` | none | [`{ kind: "hooks-claude-code", form: "relay" }`](#persistence-type-sha256-6ea608bdc8a7a63d3d23b84c49721325094db88d136482e43a820945295eee3e) | +| `hooks-claude-code` | `"snapshot"` | `sections`: [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | [`{ kind: "hooks-claude-code", form: "snapshot" }`](#persistence-type-sha256-3bdb8dc6989655b0d4ec361edafb8e2629bc263e1ea591819414fdafc1a413b3) | +| `hooks-claude-code` | not declared | none | [`{ kind: "hooks-claude-code" }`](#persistence-type-sha256-0ed8d1108fe7a5e1c3078ef1faea12199a56b6b1216ccaceb0f6103b0c9a7691) | +| `hooks-codex` | `"catalog"` | none | [`{ kind: "hooks-codex", form: "catalog" }`](#persistence-type-sha256-99f0e98184709ad10f27bfdeaafb4457d9d2b413f402331764798cdb7d3cbe4d) | +| `hooks-codex` | `"instructions"` | none | [`{ kind: "hooks-codex", form: "instructions" }`](#persistence-type-sha256-b6f94c17dd9bbd7cd57015198b7c7c88407f0e3b89faab176ca3c11c3d864d3e) | +| `hooks-codex` | `"notice"` | `summary`: `string` | [`{ kind: "hooks-codex", form: "notice" }`](#persistence-type-sha256-854db3efdfb0cd39d30953b28703e519c121f1115cebfffc40369fe86c406dd1) | +| `hooks-codex` | `"recall"` | none | [`{ kind: "hooks-codex", form: "recall" }`](#persistence-type-sha256-3b4f2c9ef2c1217eac596c7b070173cb7896e2fae09e729bc7c56c801e56bb29) | +| `hooks-codex` | `"relay"` | none | [`{ kind: "hooks-codex", form: "relay" }`](#persistence-type-sha256-1fdad624334d354820dfb3a26e28d0bc9fc1b62a33f87bab63f715b3f4391bfd) | +| `hooks-codex` | `"snapshot"` | `sections`: [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | [`{ kind: "hooks-codex", form: "snapshot" }`](#persistence-type-sha256-88841202942c7683b3b7e5ea6a796047ec326b6701ac23e58cc236d85613b9fa) | +| `hooks-codex` | not declared | none | [`{ kind: "hooks-codex" }`](#persistence-type-sha256-b4ec0af39fd52ed971990e42f04e5be3204882e555c409eb330f8238eec21569) | | `model` | not declared | `model`: `string`; `provider`: `string` | [`ModelMessageSource`](#persistence-type-sha256-719c51f67074f97034a6c94297fe1f4b5d3c8d392c57586dab732aa5398c7a91) | -| `plugin` | `"catalog"` | `plugin`: `string` | [`{ kind: "plugin", form: "catalog" }`](#persistence-type-sha256-2f90a7b3646fea3e677bd7b4000aa96f3b8964f107b614e204e11ad4051c24fc) | -| `plugin` | `"instructions"` | `plugin`: `string` | [`{ kind: "plugin", form: "instructions" }`](#persistence-type-sha256-dda6e111a8ccfc12f6e742e977a1a4e3549e8c03732a5ff6c8d7c3d4bcb7a412) | -| `plugin` | `"notice"` | `plugin`: `string`; `summary`: `string` | [`{ kind: "plugin", form: "notice" }`](#persistence-type-sha256-b4d298d90c798fa4d1f5b030ce3ce8031c4c41beafdb05323bec8b2a06903b43) | -| `plugin` | `"recall"` | `plugin`: `string` | [`{ kind: "plugin", form: "recall" }`](#persistence-type-sha256-85e1bd563d6c80c1f377f99f91103fec4e315148a7330f3b3dae7c2d04e33b01) | -| `plugin` | `"relay"` | `plugin`: `string` | [`{ kind: "plugin", form: "relay" }`](#persistence-type-sha256-2ce7ef3b3daebf95815c7ae454a751d3e67ca7a22e2e0734fe2942df393bb66c) | -| `plugin` | `"snapshot"` | `plugin`: `string`; `sections`: [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | [`{ kind: "plugin", form: "snapshot" }`](#persistence-type-sha256-e8d26e6993445743e6c4342c31b284c7d8f5574369abdd6021183af1a6b3538f) | -| `plugin` | not declared | `plugin`: `string` | [`{ kind: "plugin" }`](#persistence-type-sha256-0ddab4577db37a3e0d9e3a91761735c8ef6f5629d526ab8ecaeeea19c097c8f8) | +| `model-selection` | `"catalog"` | none | [`{ kind: "model-selection", form: "catalog" }`](#persistence-type-sha256-99135d8a3937977955eaac5f8f04f930dcd1562f8450a54a51cde9b921dd59a6) | +| `model-selection` | `"instructions"` | none | [`{ kind: "model-selection", form: "instructions" }`](#persistence-type-sha256-f6605d6c57933aeaaf10911b5fbd6c61e655baa181af7192d3240f49d255b90d) | +| `model-selection` | `"notice"` | `summary`: `string` | [`{ kind: "model-selection", form: "notice" }`](#persistence-type-sha256-a3c6f1ea38e9a61d7a9706057ba65aabe02dfe6d9dd90d4736aa62325d874531) | +| `model-selection` | `"recall"` | none | [`{ kind: "model-selection", form: "recall" }`](#persistence-type-sha256-aae343bc3d663c83f2e8b5e1c7eea5d509dc7a5361bc8bd8b5ac3bb8d3b1ed56) | +| `model-selection` | `"relay"` | none | [`{ kind: "model-selection", form: "relay" }`](#persistence-type-sha256-a15a19ef63cf5d1b711db1d249821dab0cedcd3a9ad09137b47352c93841fd20) | +| `model-selection` | `"snapshot"` | `sections`: [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | [`{ kind: "model-selection", form: "snapshot" }`](#persistence-type-sha256-52c6113cb0e53f345324bf84f01928bea5d5df57ee80bc0dd65407b8bc5a3734) | +| `model-selection` | not declared | none | [`{ kind: "model-selection" }`](#persistence-type-sha256-f7283223aacdc39b0adca728c8cbd4c090a20006a6fecec74421c30e943b489c) | +| `plan-mode` | `"catalog"` | none | [`{ kind: "plan-mode", form: "catalog" }`](#persistence-type-sha256-3b04790e08b35241ffa0d38f6d7e4f8788aa921341f6c0d7574a329397c59408) | +| `plan-mode` | `"instructions"` | none | [`{ kind: "plan-mode", form: "instructions" }`](#persistence-type-sha256-408927267422a7b2beb6df354ff7c1406d929a5646554f48adf85eb8372f811c) | +| `plan-mode` | `"notice"` | `summary`: `string` | [`{ kind: "plan-mode", form: "notice" }`](#persistence-type-sha256-baccc97ec34be6c4c78e95aa88c85c29820269479445e5b13f956cd64c5e286f) | +| `plan-mode` | `"recall"` | none | [`{ kind: "plan-mode", form: "recall" }`](#persistence-type-sha256-f6329fb30c7ea8013e8975ca5e78284fb7685cc6bd620e8aa4e9a99bc81d45eb) | +| `plan-mode` | `"relay"` | none | [`{ kind: "plan-mode", form: "relay" }`](#persistence-type-sha256-deaae5cd30987d4f49398e8f9d994c125907e7f928300745fb1dbf15f145d0e7) | +| `plan-mode` | `"snapshot"` | `sections`: [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | [`{ kind: "plan-mode", form: "snapshot" }`](#persistence-type-sha256-8c1c4f72755a78ea163523a46565316e36e9b644382eb48e6635c71a6f412dd2) | +| `plan-mode` | not declared | none | [`{ kind: "plan-mode" }`](#persistence-type-sha256-f4a66f654996c093aae700ea4c434ff2ee3569fea9c0e5813ccf6afdccabd163) | +| `repeat-tool-reminder` | `"catalog"` | none | [`{ kind: "repeat-tool-reminder", form: "catalog" }`](#persistence-type-sha256-d85590a5675c6e2fd8164e5792a6cceac714605b8ac228adae5ee668facb1490) | +| `repeat-tool-reminder` | `"instructions"` | none | [`{ kind: "repeat-tool-reminder", form: "instructions" }`](#persistence-type-sha256-6f44f32be9bcd9a8bf075c3b575b06c8ed63446386e5b0995c7b73762e68ddae) | +| `repeat-tool-reminder` | `"notice"` | `summary`: `string` | [`{ kind: "repeat-tool-reminder", form: "notice" }`](#persistence-type-sha256-fe1a7acdeed4d0f5ab483396eaa5b3dc97263b7c10eb4da2f0028cb01728bfc9) | +| `repeat-tool-reminder` | `"recall"` | none | [`{ kind: "repeat-tool-reminder", form: "recall" }`](#persistence-type-sha256-8620189c8e33582708ece48fd2d20dc4d57912486a17bdbb9aea4c44f7018062) | +| `repeat-tool-reminder` | `"relay"` | none | [`{ kind: "repeat-tool-reminder", form: "relay" }`](#persistence-type-sha256-4991dfc415c9efebc36fa6969e1798c7d2e42396cc1e6e0ac7d7c89c5c5c4aea) | +| `repeat-tool-reminder` | `"snapshot"` | `sections`: [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | [`{ kind: "repeat-tool-reminder", form: "snapshot" }`](#persistence-type-sha256-db06ef35b27a38425046b2228fa6bce9582abe140d781d363137eb2f4d233a1c) | +| `repeat-tool-reminder` | not declared | none | [`{ kind: "repeat-tool-reminder" }`](#persistence-type-sha256-b062078e899958f99ae464514578b8c093924dfe34bd9a835932b420ff2150b1) | +| `runtime-context` | `"catalog"` | none | [`{ kind: "runtime-context", form: "catalog" }`](#persistence-type-sha256-58015da1c1950a66daf66ae24913d6a1fc6d1d9ac441b155f8847f7f8584ba8e) | +| `runtime-context` | `"instructions"` | none | [`{ kind: "runtime-context", form: "instructions" }`](#persistence-type-sha256-0eeb17e1df89b1ebc2902116fe7145e0d321ef0db26e6bdebc802cb8513a01c1) | +| `runtime-context` | `"notice"` | `summary`: `string` | [`{ kind: "runtime-context", form: "notice" }`](#persistence-type-sha256-cda2345a9be9d139df49ccbd16dcba716f3440178bf20ff8b801fda1f5eb77dc) | +| `runtime-context` | `"recall"` | none | [`{ kind: "runtime-context", form: "recall" }`](#persistence-type-sha256-96bfb916a727cd4445a594df264c523fc039749a31bfed924b8cc7bb308a5bb0) | +| `runtime-context` | `"relay"` | none | [`{ kind: "runtime-context", form: "relay" }`](#persistence-type-sha256-cb1c8959e1726f82f9a3d2ef2bc90bf8c451a98fd56175e956022124c770c818) | +| `runtime-context` | `"snapshot"` | `sections`: [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | [`{ kind: "runtime-context", form: "snapshot" }`](#persistence-type-sha256-2aad1179f957631477b582e57cd8f538cb82618fc3fb816bde1171154235b065) | +| `runtime-context` | not declared | none | [`{ kind: "runtime-context" }`](#persistence-type-sha256-0203243b72fc867afc81aff5f4cf2167e564ed342534eb612fc92f295cf07789) | +| `schedule` | `"catalog"` | none | [`{ kind: "schedule", form: "catalog" }`](#persistence-type-sha256-1e709346005826eb81809eeb76a3f713cf13ad6c5cec75146d07020ab9adc938) | +| `schedule` | `"instructions"` | none | [`{ kind: "schedule", form: "instructions" }`](#persistence-type-sha256-1938c8c20f1cba7c82dbedcfa4f14c3ee191cd77ed3314ee1fc676d44cadf3be) | +| `schedule` | `"notice"` | `summary`: `string` | [`{ kind: "schedule", form: "notice" }`](#persistence-type-sha256-312aee2f0c42aabbae6cc60d92d596d8453c0aeb061c5868d1755a69ef49e69a) | +| `schedule` | `"recall"` | none | [`{ kind: "schedule", form: "recall" }`](#persistence-type-sha256-a16e567c8cd2c55cf1e911aed3c200c4e1f6febb1459ff2a9e7adf159afb68cb) | +| `schedule` | `"relay"` | none | [`{ kind: "schedule", form: "relay" }`](#persistence-type-sha256-5bc66269cfaf614c0ecda8ecb469f23101a7609793fc2b693ac23c4aecdb575e) | +| `schedule` | `"snapshot"` | `sections`: [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | [`{ kind: "schedule", form: "snapshot" }`](#persistence-type-sha256-28936c614bd4e7e2774806edcbb3cbfd3ee643ac1cbf0bbdff43d915505a8fe3) | +| `schedule` | not declared | none | [`{ kind: "schedule" }`](#persistence-type-sha256-f29d63336e8266d80dd7baeab219436db86341304f6be1cd0edb36f5134c4a47) | | `session-reference` | `"recall"` | `references`: [`{ capturedFormatVersion?, capturedThroughSeq, compacted, inputIndex, … }[]`](#persistence-type-sha256-df843efd87c78cf8de98f8e0d0216956cd568d0d0e56a22c853663e274aa1a18); `version`: `1` | [`SessionReferenceSource`](#persistence-type-sha256-f56c5b59ca0161310c338d31dd16cf14287ccd602ff4181058df178c1c286d7f) | | `skill-catalog` | `"catalog"` | `entries`: [`{ description, name }[]`](#persistence-type-sha256-aba175fb20ffc71112c55efe70458ff5d7dbfb83501892b4ba8d077f0ea5d7ba) | [`SkillCatalogSource`](#persistence-type-sha256-fc2ae6962f9f8801c2b1e414668e1e17cbb7544c4f39381198977a38bd10c093) | | `skill-invocation` | `"instructions"` | `name`: `string` | [`SkillInvocationSource`](#persistence-type-sha256-672c4aa2a9b736e3d6e5da6346d2e2ed5e3573f2d0baafa18e7407c9f3fee3db) | | `subagent-settled` | `"notice"` | `senderSessionId`: `string`; `summary`: `string` | [`SubagentSettledMessageSource`](#persistence-type-sha256-4e97c3d85c0fc817ee58873c38c25a2474abaaa0af4839311b50b68db3b8cf1a) | +| `system-prompt` | not declared | none | [`SystemPromptMessageSource`](#persistence-type-sha256-65a8400e451e667e5b6e34df72ceb81fca8c12330330fa72083ad40279b189ad) | | `team-message` | not declared | `messageId`: `string`; `senderId`: `string`; `senderName`: `string`; `teamId`: `string` | [`TeamMessageSource`](#persistence-type-sha256-2152caf1a71e588e4df2358a806dea24936c1c47131134f01a12939d12cdc0c0) | +| `time-context` | `"catalog"` | none | [`{ kind: "time-context", form: "catalog" }`](#persistence-type-sha256-85fe96bf15d5c7559eec3bae4d6cf1a76fda9f5be05a29c2830cff560cab0c0d) | +| `time-context` | `"instructions"` | none | [`{ kind: "time-context", form: "instructions" }`](#persistence-type-sha256-f6afe41e3926f422fe849debe90819fddd739f0f59e20be9c71018b9554a7f09) | +| `time-context` | `"notice"` | `summary`: `string` | [`{ kind: "time-context", form: "notice" }`](#persistence-type-sha256-ee577a0cc18664c9daee50e9455153321155604f8f1817362f8f4a4b6fb9e1ad) | +| `time-context` | `"recall"` | none | [`{ kind: "time-context", form: "recall" }`](#persistence-type-sha256-756b5e23a5cb2c7f486f366a828f7461c88902af21125bd6810881f4ccbff6cc) | +| `time-context` | `"relay"` | none | [`{ kind: "time-context", form: "relay" }`](#persistence-type-sha256-5d7a64ed6aac5551ebf998dc25e1e7b48a144769913f89702840180e61dc3995) | +| `time-context` | `"snapshot"` | `sections`: [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | [`{ kind: "time-context", form: "snapshot" }`](#persistence-type-sha256-f230c0b583e23b25ee0a61dbe4c05e95c1e2ae44b27939501eb9e03696f0c278) | +| `time-context` | not declared | none | [`{ kind: "time-context" }`](#persistence-type-sha256-b79641a9d25e756636dc0c706fdf3c4583ccb7d4920e009e6e86c0759cf4de4c) | +| `tmux-context` | `"catalog"` | none | [`{ kind: "tmux-context", form: "catalog" }`](#persistence-type-sha256-7df62978a2b7de8540e714152297743e0a622209a46a5ac9513fc0fad73ca23b) | +| `tmux-context` | `"instructions"` | none | [`{ kind: "tmux-context", form: "instructions" }`](#persistence-type-sha256-9f65c43e340bba31cdc0fc37bd93ccb68d5e9b36f47a68c207e95a8e68620a5d) | +| `tmux-context` | `"notice"` | `summary`: `string` | [`{ kind: "tmux-context", form: "notice" }`](#persistence-type-sha256-b3681c026a0b98e98b103f057dfd217fbe904129c090efd668253ec9aea7fece) | +| `tmux-context` | `"recall"` | none | [`{ kind: "tmux-context", form: "recall" }`](#persistence-type-sha256-fcf81d3c58c13593bf2594e342e31734f4ab2d24938dc610875194c6079749c7) | +| `tmux-context` | `"relay"` | none | [`{ kind: "tmux-context", form: "relay" }`](#persistence-type-sha256-f97f47b0eb87905ed77cc27c5e4ed75ef805cb372c98905253709de1aab9b63c) | +| `tmux-context` | `"snapshot"` | `sections`: [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | [`{ kind: "tmux-context", form: "snapshot" }`](#persistence-type-sha256-49dab019d00e8c26f27ad2ccff7b604d69e323ae4d17e0d2a7b6b8a830b1ade2) | +| `tmux-context` | not declared | none | [`{ kind: "tmux-context" }`](#persistence-type-sha256-8a046b52331959aa3394680d6acbe09b8a5447c6b61375f263445bfcef19b7f1) | | `tool` | not declared | `callId`: `string` | [`ToolMessageSource`](#persistence-type-sha256-d9c462b9f62fdd3efc76a44b9524dc8781f6b91cd9c7e584b17d971defafebab) | +| `tool-goal` | `"catalog"` | none | [`{ kind: "tool-goal", form: "catalog" }`](#persistence-type-sha256-260523b412c19ad8c2bb00093b07f64245ff8ba6b2f76c5b545303772ac9704c) | +| `tool-goal` | `"instructions"` | none | [`{ kind: "tool-goal", form: "instructions" }`](#persistence-type-sha256-6085488d223aeffdef51d7ae17655fc26ab22ee13cbed82a50e62e2b6fb5b918) | +| `tool-goal` | `"notice"` | `summary`: `string` | [`{ kind: "tool-goal", form: "notice" }`](#persistence-type-sha256-8c627d7a45fa406cea879a3922105e27ed4c3c7966e264afaf11ea7a330f2dd1) | +| `tool-goal` | `"recall"` | none | [`{ kind: "tool-goal", form: "recall" }`](#persistence-type-sha256-7554565be416b0342053ee6a46256c9dab07c487349b4a5f10bab1edc151c619) | +| `tool-goal` | `"relay"` | none | [`{ kind: "tool-goal", form: "relay" }`](#persistence-type-sha256-8f324cea3916c0517261e88167def8efb3a9994c1135e23d40ed9fd48f8c7bd4) | +| `tool-goal` | `"snapshot"` | `sections`: [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | [`{ kind: "tool-goal", form: "snapshot" }`](#persistence-type-sha256-11638dc58a31496fb6706ced3e23e3a2db1f3b2a8845968c810827a72b5fc811) | +| `tool-goal` | not declared | none | [`{ kind: "tool-goal" }`](#persistence-type-sha256-a2066bd52f61218ba15b758def2641cc6a8bd3d4a594a488ee4c65be356d7e39) | +| `tool-jobs` | `"catalog"` | none | [`{ kind: "tool-jobs", form: "catalog" }`](#persistence-type-sha256-dd5ee8762bd8a14b6c6bffedd1753e4e78505bb0f9ea1621018d03a54eef59d5) | +| `tool-jobs` | `"instructions"` | none | [`{ kind: "tool-jobs", form: "instructions" }`](#persistence-type-sha256-53cf1704ae0709c7678bcf070c83c619fc48ca1b5c173b74cfa8702f22a8e492) | +| `tool-jobs` | `"notice"` | `summary`: `string` | [`{ kind: "tool-jobs", form: "notice" }`](#persistence-type-sha256-5bb69b88517f6214f2af4d1a6d2b771e271ad3ad695cc9c2c272069ae698c9bc) | +| `tool-jobs` | `"recall"` | none | [`{ kind: "tool-jobs", form: "recall" }`](#persistence-type-sha256-dd6cc2bb2a8f28248347021ad93565360b196a042360b4cd16b569d3a2a91f2d) | +| `tool-jobs` | `"relay"` | none | [`{ kind: "tool-jobs", form: "relay" }`](#persistence-type-sha256-ade057f4fdc387aec6426f48704a1f9359cfc6fee13f27735b07f9b215ec16ca) | +| `tool-jobs` | `"snapshot"` | `sections`: [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | [`{ kind: "tool-jobs", form: "snapshot" }`](#persistence-type-sha256-c5228b7a55498d84f529591744a0ab26e0b93ade18a70a26db1377a1ecfa6b49) | +| `tool-jobs` | not declared | none | [`{ kind: "tool-jobs" }`](#persistence-type-sha256-24ce31aa528272e59f21cd26da9eca08968bcc97529756a749bfdab71746d9c8) | | `user` | not declared | `rpcId`: `string` | [`{ kind: "user" }`](#persistence-type-sha256-6a4f72e2e179e17b922f2a9392c0e1c8f8c707f32494372454850a3eb184a6e7) | | `user` | not declared | none | [`CommandSource`](#persistence-type-sha256-ada310bf0bdb8fed51f3b56ea63f6ea6b18bbd587f04fccb63a14ab0b2a24e05) | +| `user-approval` | `"catalog"` | none | [`{ kind: "user-approval", form: "catalog" }`](#persistence-type-sha256-825ca23416b1ea9d81442afead5cf9229a6fa05842f042135cc3aa9710a6a2d8) | +| `user-approval` | `"instructions"` | none | [`{ kind: "user-approval", form: "instructions" }`](#persistence-type-sha256-aa2bf9e82b9fdeb94a42af20031fffa30e4e23f01f4ac39757427d4c64c407f0) | +| `user-approval` | `"notice"` | `summary`: `string` | [`{ kind: "user-approval", form: "notice" }`](#persistence-type-sha256-6ccb6bc423fb3952458abf9c1b1c3284208b7e660344b612cc55da773d61afe4) | +| `user-approval` | `"recall"` | none | [`{ kind: "user-approval", form: "recall" }`](#persistence-type-sha256-022623b9ef98ec47ec3c3bae0c51027c70d2601141c5e92e26a0d83d1b4cef06) | +| `user-approval` | `"relay"` | none | [`{ kind: "user-approval", form: "relay" }`](#persistence-type-sha256-5cdbf342b7748d152bc987b68f58e565e5bba4b227e076e2d2120d87662e45cd) | +| `user-approval` | `"snapshot"` | `sections`: [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | [`{ kind: "user-approval", form: "snapshot" }`](#persistence-type-sha256-5654685d7557ec747e74887237065e626a5bdfa426ca43f7fbb0b6fee9b0916c) | +| `user-approval` | not declared | none | [`{ kind: "user-approval" }`](#persistence-type-sha256-6292bcbedaa97feaec5b48a03bb8144b581b93309d9d6c905f26da7a6a7a0a4f) | | `webhook` | `"notice"` | `deliveryId`: `string`; `provider`: `string`; `ruleId`: `string`; `source`: `string`; `summary`: `string` | [`{ kind: "webhook", form: "notice" }`](#persistence-type-sha256-9edc162949abf93bd5ff049191b345454ba104f583937ce5580fb50f067d2b94) | - + ### `Message[]` -SHA-256: `ff5bcfe90a83f6e773ae72b3ec775c5af8339df8a1dbe561e8147b56bc994fdc` +SHA-256: `531c1bf918d4ce9eeb8a51d32484587bc77a62e5806d8c29e64040fcafd6517e` -Array of [`Message`](#persistence-type-sha256-01bc74417fd4ff36c2840b266a5b3b51bf0e3b71eb43960a2c4aee7b7441a2aa). +Array of [`Message`](#persistence-type-sha256-cc2968a9a0a95309a7d3218dcb0c55d153fe7b8c03b5648ea6fcc69d91a64a7f). @@ -4096,7 +4330,7 @@ Sources: [`packages/session/session-title/src/types.ts:41`](../packages/session/ | `source` | required | [`SessionTitleSource`](#persistence-type-sha256-30d5a537b296685770b1241c4b4bbde19d5a31ff81aa23df73fab5e90b8fc65f) | | `title` | required | `string` | - + @@ -4104,15 +4338,15 @@ Sources: [`packages/session/session-title/src/types.ts:41`](../packages/session/ ### `SessionTitleLlmRequestEventData` -SHA-256: `1b78e3a578a7e6d29d9564a9f5d236c2ebdcf682dbeb7b50400d8850e313b518` +SHA-256: `608866d72de8327687e3730cb213d57cf8485012419673de9e5765f4a71f7f2d` -Sources: [`packages/session/session-title-llm/src/index.ts:27`](../packages/session/session-title-llm/src/index.ts) +Sources: [`packages/session/session-title-llm/src/index.ts:34`](../packages/session/session-title-llm/src/index.ts) | Property | Presence | Type | |---|---|---| | `maxTokens` | required | `number` | | `messageSeqs` | required | [`number[]`](#persistence-type-sha256-5d03ba38734809bcbd2a55221bd938b3b3fc34b49bb686c6113e9e4931e3aa78) | -| `messages` | required | [`Message[]`](#persistence-type-sha256-ff5bcfe90a83f6e773ae72b3ec775c5af8339df8a1dbe561e8147b56bc994fdc) | +| `messages` | required | [`Message[]`](#persistence-type-sha256-531c1bf918d4ce9eeb8a51d32484587bc77a62e5806d8c29e64040fcafd6517e) | | `route` | required | [`SessionTitleModelIdentity`](#persistence-type-sha256-07e1a58c58b593f507b8e7f25723bb0aa42baae6e00f5ecfddf28cb1e64d3235) | | `system` | required | `string` | | `titleProvider` | required | `string` | @@ -4293,7 +4527,7 @@ One of: - `"append"` - [`{ endSeq, op, startSeq }`](#persistence-type-sha256-bcf0caf62d964b2fcf5404bd5c909cfa9a21c3f3c96e6b7e36d9e33565223825) - + @@ -4301,16 +4535,32 @@ One of: ### `SystemMessage` -SHA-256: `abb8be1a8972c5531c513de95c678bac414263fb5e4bf6dcf871ca913f47bd94` +SHA-256: `20a3c1c8a3154e4ae69eada1212e3216baf93454ee4c745565b9374d7539fe8b` -Sources: [`packages/llm/llm/src/message.ts:141`](../packages/llm/llm/src/message.ts) +Sources: [`packages/llm/llm/src/message.ts:151`](../packages/llm/llm/src/message.ts) | Property | Presence | Type | |---|---|---| | `content` | required | [`ContentBlock[]`](#persistence-type-sha256-a951a47d0ebf7d7ac401d1ec2fe4e138a43288c5ad2b0cf029a90b97d718f1e6) | | `id` | required | `string` | | `role` | required | `"system"` | -| `source` | required | [`union (7 variants)`](#persistence-type-sha256-23cf7e0cf3fec1283b60fa15713506169bc9c079a08e124d1cb9733baca80b40) | +| `source` | required | [`SystemPromptMessageSource`](#persistence-type-sha256-65a8400e451e667e5b6e34df72ceb81fca8c12330330fa72083ad40279b189ad) | + + + + + + + +### `SystemPromptMessageSource` + +SHA-256: `65a8400e451e667e5b6e34df72ceb81fca8c12330330fa72083ad40279b189ad` + +Sources: [`packages/llm/llm/src/message.ts:35`](../packages/llm/llm/src/message.ts) + +| Property | Presence | Type | +|---|---|---| +| `kind` | required | `"system-prompt"` | @@ -4560,7 +4810,7 @@ Sources: [`packages/core/tools/src/index.ts:682`](../packages/core/tools/src/ind SHA-256: `8a8b1c3cf223fe58bbe45ea57f0b80eb262a653066dfe5683a648390ed91c13c` -Sources: [`packages/llm/llm/src/message.ts:158`](../packages/llm/llm/src/message.ts) +Sources: [`packages/llm/llm/src/message.ts:168`](../packages/llm/llm/src/message.ts) | Property | Presence | Type | |---|---|---| @@ -4711,7 +4961,7 @@ Sources: [`packages/core/session/src/types.ts:231`](../packages/core/session/src | `interrupted` | not declared | none | [`{ kind: "interrupted" }`](#persistence-type-sha256-56b7c047694875a843ba020dfea3c8380d54ae4ff88ab349e72004dc21e07c23) | | `max-tokens` | not declared | none | [`{ kind: "max-tokens" }`](#persistence-type-sha256-ab7ec5f9eb2c6dfacca5da4c37cf7ba85d04172053ee6b1ebf1709ffcd99c1a7) | - + @@ -4719,24 +4969,28 @@ Sources: [`packages/core/session/src/types.ts:231`](../packages/core/session/src ### `UserMessage` -SHA-256: `a48b761be36821fcf456c862e321284bdd879dd796d29d20b1766e0417f7c966` +SHA-256: `980b8f7c2576a03df48bd09fd68000d88eaec6e99ca5bec36e6448401b8e3e95` -Sources: [`packages/llm/llm/src/message.ts:147`](../packages/llm/llm/src/message.ts) +Sources: [`packages/llm/llm/src/message.ts:157`](../packages/llm/llm/src/message.ts) | Property | Presence | Type | |---|---|---| | `content` | required | [`ContentBlock[]`](#persistence-type-sha256-a951a47d0ebf7d7ac401d1ec2fe4e138a43288c5ad2b0cf029a90b97d718f1e6) | | `id` | required | `string` | | `role` | required | `"user"` | -| `source` | required | [`MessageSource`](#persistence-type-sha256-4c965666d5b42116945bc356087cd5e1fd549e6dece560785ed60511059a8283) | +| `source` | required | [`MessageSource`](#persistence-type-sha256-7aae986884b7f69068d9f9d7d77910a0dbe2b265843a041576877eb1bc01f31e) | - +Source compatibility: `source` — `session-source-attribution` v1; `session.user-message.source`; `kind`; `preserve`. + +Attribution-only additions: `tmux-context`. + + ### `UserMessage[]` -SHA-256: `71225015514ed0439df95fc6e55719e1fa30bd205b99a7eefb7e18152be835ea` +SHA-256: `fc336025695a2213c63d0fe8715307c6a6ede867713bbf2ab1c8ff9760fdee1f` -Array of [`UserMessage`](#persistence-type-sha256-a48b761be36821fcf456c862e321284bdd879dd796d29d20b1766e0417f7c966). +Array of [`UserMessage`](#persistence-type-sha256-980b8f7c2576a03df48bd09fd68000d88eaec6e99ca5bec36e6448401b8e3e95). @@ -5060,22 +5314,6 @@ One of: - `"pause"` - `"resume"` - - -### `union (7 variants)` - -SHA-256: `23cf7e0cf3fec1283b60fa15713506169bc9c079a08e124d1cb9733baca80b40` - -| kind | Form property | Other required fields | Full definition | -|---|---|---|---| -| `plugin` | `"catalog"` | `plugin`: `string` | [`{ kind: "plugin", form: "catalog" }`](#persistence-type-sha256-2f90a7b3646fea3e677bd7b4000aa96f3b8964f107b614e204e11ad4051c24fc) | -| `plugin` | `"instructions"` | `plugin`: `string` | [`{ kind: "plugin", form: "instructions" }`](#persistence-type-sha256-dda6e111a8ccfc12f6e742e977a1a4e3549e8c03732a5ff6c8d7c3d4bcb7a412) | -| `plugin` | `"notice"` | `plugin`: `string`; `summary`: `string` | [`{ kind: "plugin", form: "notice" }`](#persistence-type-sha256-b4d298d90c798fa4d1f5b030ce3ce8031c4c41beafdb05323bec8b2a06903b43) | -| `plugin` | `"recall"` | `plugin`: `string` | [`{ kind: "plugin", form: "recall" }`](#persistence-type-sha256-85e1bd563d6c80c1f377f99f91103fec4e315148a7330f3b3dae7c2d04e33b01) | -| `plugin` | `"relay"` | `plugin`: `string` | [`{ kind: "plugin", form: "relay" }`](#persistence-type-sha256-2ce7ef3b3daebf95815c7ae454a751d3e67ca7a22e2e0734fe2942df393bb66c) | -| `plugin` | `"snapshot"` | `plugin`: `string`; `sections`: [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | [`{ kind: "plugin", form: "snapshot" }`](#persistence-type-sha256-e8d26e6993445743e6c4342c31b284c7d8f5574369abdd6021183af1a6b3538f) | -| `plugin` | not declared | `plugin`: `string` | [`{ kind: "plugin" }`](#persistence-type-sha256-0ddab4577db37a3e0d9e3a91761735c8ef6f5629d526ab8ecaeeea19c097c8f8) | - ### `union (7 variants)` @@ -5114,7 +5352,7 @@ Array of `unknown` (opaque). SHA-256: `20a57544bbf204dacd1ae6beb2ab29444365c3c869f2afdf489dcdcbc3d9c8c5` -Sources: [`packages/plan/plan-mode/src/index.ts:47`](../packages/plan/plan-mode/src/index.ts) +Sources: [`packages/plan/plan-mode/src/index.ts:53`](../packages/plan/plan-mode/src/index.ts) | Property | Presence | Type | |---|---|---| @@ -5633,17 +5871,17 @@ Sources: [`packages/core/session/src/types.ts:418`](../packages/core/session/src |---|---|---| | `inherited` | optional | `true` | - + ### `{ inserted, outcome?, removedCount?, start, … }` -SHA-256: `6f87000576a13d73867248c97e55c4ebe3cb3ee55ee3bd1282f26e7f40dd81c8` +SHA-256: `37af4fdde18eb8638d5037243e0ee1c617b9b1062ae9dbee086feafad852112f` Sources: [`packages/core/agent/src/types.ts:87`](../packages/core/agent/src/types.ts) | Property | Presence | Type | |---|---|---| -| `inserted` | required | [`UserMessage[]`](#persistence-type-sha256-71225015514ed0439df95fc6e55719e1fa30bd205b99a7eefb7e18152be835ea) | +| `inserted` | required | [`UserMessage[]`](#persistence-type-sha256-fc336025695a2213c63d0fe8715307c6a6ede867713bbf2ab1c8ff9760fdee1f) | | `outcome` | optional | `"canceled"` | | `removedCount` | optional | `number` | | `start` | required | `number` | @@ -5691,6 +5929,18 @@ Sources: [`packages/core/session/src/types.ts:205`](../packages/core/session/src |---|---|---| | `kind` | required | `"blocked"` | + + +### `{ kind: "code-mode" }` + +SHA-256: `b0fdf76590690063dff16e2ba5aa14cb6ed074b61980b3860c299c2e8efc7a1a` + +Sources: [`packages/core/tools/src/ptc.ts:13`](../packages/core/tools/src/ptc.ts) + +| Property | Presence | Type | +|---|---|---| +| `kind` | required | `"code-mode"` | + ### `{ kind: "completed" }` @@ -5703,6 +5953,18 @@ Sources: [`packages/core/session/src/types.ts:201`](../packages/core/session/src |---|---|---| | `kind` | required | `"completed"` | + + +### `{ kind: "cordis-host-runner" }` + +SHA-256: `02b2c23f2d94b028c9588a8faace3fce1217405db346da3389368b495457bf79` + +Sources: [`packages/extensions/cordis-host-runner/src/index.ts:14`](../packages/extensions/cordis-host-runner/src/index.ts) + +| Property | Presence | Type | +|---|---|---| +| `kind` | required | `"cordis-host-runner"` | + ### `{ kind: "disposed" }` @@ -5715,6 +5977,84 @@ Sources: [`packages/core/session/src/types.ts:192`](../packages/core/session/src |---|---|---| | `kind` | required | `"disposed"` | + + +### `{ kind: "dsh-session-title-llm" }` + +SHA-256: `290f32bfd81ff85a8095886a8066fae06e885942b63a8bcd6a8d66d328445808` + +| Property | Presence | Type | +|---|---|---| +| `kind` | required | `"dsh-session-title-llm"` | + + + +### `{ kind: "dsh-session-title-llm", form: "catalog" }` + +SHA-256: `80677c8c8b804189a0fde8aa70dd4ad7af8bb12dfd03027e8e023c8592c838bc` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"catalog"` | +| `kind` | required | `"dsh-session-title-llm"` | + + + +### `{ kind: "dsh-session-title-llm", form: "instructions" }` + +SHA-256: `224aa11d4d5f88c450822d01b99e6ca5e3a9c7f26a5ede10bae33384a09ef4dc` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"instructions"` | +| `kind` | required | `"dsh-session-title-llm"` | + + + +### `{ kind: "dsh-session-title-llm", form: "notice" }` + +SHA-256: `8338ee303e2bd448e9e6144069942f63e3cfd5868962bddc9347d7009e8919d6` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"notice"` | +| `kind` | required | `"dsh-session-title-llm"` | +| `summary` | required | `string` | + + + +### `{ kind: "dsh-session-title-llm", form: "recall" }` + +SHA-256: `b2a5c8c008a31e3dc6c3013502f2356aca13894b31c8e70601fa92f2d40d1dba` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"recall"` | +| `kind` | required | `"dsh-session-title-llm"` | + + + +### `{ kind: "dsh-session-title-llm", form: "relay" }` + +SHA-256: `7eaef7a763ba5b949b8464bc8add8980a3a5ab566014b69787aeba71e5dfe07b` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"relay"` | +| `kind` | required | `"dsh-session-title-llm"` | + + + +### `{ kind: "dsh-session-title-llm", form: "snapshot" }` + +SHA-256: `ba4c40b4381e0dcdfab8fc9fc75b5c9b3e8f09ef56deeb1bec8e703b0ef8cd6d` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"snapshot"` | +| `kind` | required | `"dsh-session-title-llm"` | +| `sections` | required | [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | + ### `{ kind: "fallback" }` @@ -5752,6 +6092,162 @@ Sources: [`packages/core/session/src/types.ts:191`](../packages/core/session/src | `kind` | required | `"hook"` | | `reason` | required | `string` | + + +### `{ kind: "hooks-claude-code" }` + +SHA-256: `0ed8d1108fe7a5e1c3078ef1faea12199a56b6b1216ccaceb0f6103b0c9a7691` + +| Property | Presence | Type | +|---|---|---| +| `kind` | required | `"hooks-claude-code"` | + + + +### `{ kind: "hooks-claude-code", form: "catalog" }` + +SHA-256: `297fbd8067d7815adae02b89790ec6ff5fb7c2cb0d0eb026e1746c24ec857761` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"catalog"` | +| `kind` | required | `"hooks-claude-code"` | + + + +### `{ kind: "hooks-claude-code", form: "instructions" }` + +SHA-256: `b70f3e81fe11b7a5f2504fb47a4502fb8d9c8f0731fdfe8ddcaf9b41f5a6e196` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"instructions"` | +| `kind` | required | `"hooks-claude-code"` | + + + +### `{ kind: "hooks-claude-code", form: "notice" }` + +SHA-256: `edbbfff1128099fda7b792c56330d2cb04debc9790988e66d1c3f4026e813e0e` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"notice"` | +| `kind` | required | `"hooks-claude-code"` | +| `summary` | required | `string` | + + + +### `{ kind: "hooks-claude-code", form: "recall" }` + +SHA-256: `87b1a33564b9a4d63b00988a524c12259243953aebb9c9a05127d87b27464df9` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"recall"` | +| `kind` | required | `"hooks-claude-code"` | + + + +### `{ kind: "hooks-claude-code", form: "relay" }` + +SHA-256: `6ea608bdc8a7a63d3d23b84c49721325094db88d136482e43a820945295eee3e` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"relay"` | +| `kind` | required | `"hooks-claude-code"` | + + + +### `{ kind: "hooks-claude-code", form: "snapshot" }` + +SHA-256: `3bdb8dc6989655b0d4ec361edafb8e2629bc263e1ea591819414fdafc1a413b3` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"snapshot"` | +| `kind` | required | `"hooks-claude-code"` | +| `sections` | required | [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | + + + +### `{ kind: "hooks-codex" }` + +SHA-256: `b4ec0af39fd52ed971990e42f04e5be3204882e555c409eb330f8238eec21569` + +| Property | Presence | Type | +|---|---|---| +| `kind` | required | `"hooks-codex"` | + + + +### `{ kind: "hooks-codex", form: "catalog" }` + +SHA-256: `99f0e98184709ad10f27bfdeaafb4457d9d2b413f402331764798cdb7d3cbe4d` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"catalog"` | +| `kind` | required | `"hooks-codex"` | + + + +### `{ kind: "hooks-codex", form: "instructions" }` + +SHA-256: `b6f94c17dd9bbd7cd57015198b7c7c88407f0e3b89faab176ca3c11c3d864d3e` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"instructions"` | +| `kind` | required | `"hooks-codex"` | + + + +### `{ kind: "hooks-codex", form: "notice" }` + +SHA-256: `854db3efdfb0cd39d30953b28703e519c121f1115cebfffc40369fe86c406dd1` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"notice"` | +| `kind` | required | `"hooks-codex"` | +| `summary` | required | `string` | + + + +### `{ kind: "hooks-codex", form: "recall" }` + +SHA-256: `3b4f2c9ef2c1217eac596c7b070173cb7896e2fae09e729bc7c56c801e56bb29` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"recall"` | +| `kind` | required | `"hooks-codex"` | + + + +### `{ kind: "hooks-codex", form: "relay" }` + +SHA-256: `1fdad624334d354820dfb3a26e28d0bc9fc1b62a33f87bab63f715b3f4391bfd` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"relay"` | +| `kind` | required | `"hooks-codex"` | + + + +### `{ kind: "hooks-codex", form: "snapshot" }` + +SHA-256: `88841202942c7683b3b7e5ea6a796047ec326b6701ac23e58cc236d85613b9fa` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"snapshot"` | +| `kind` | required | `"hooks-codex"` | +| `sections` | required | [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | + ### `{ kind: "interrupted" }` @@ -5788,6 +6284,84 @@ Sources: [`packages/core/session/src/types.ts:213`](../packages/core/session/src |---|---|---| | `kind` | required | `"max-tokens"` | + + +### `{ kind: "model-selection" }` + +SHA-256: `f7283223aacdc39b0adca728c8cbd4c090a20006a6fecec74421c30e943b489c` + +| Property | Presence | Type | +|---|---|---| +| `kind` | required | `"model-selection"` | + + + +### `{ kind: "model-selection", form: "catalog" }` + +SHA-256: `99135d8a3937977955eaac5f8f04f930dcd1562f8450a54a51cde9b921dd59a6` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"catalog"` | +| `kind` | required | `"model-selection"` | + + + +### `{ kind: "model-selection", form: "instructions" }` + +SHA-256: `f6605d6c57933aeaaf10911b5fbd6c61e655baa181af7192d3240f49d255b90d` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"instructions"` | +| `kind` | required | `"model-selection"` | + + + +### `{ kind: "model-selection", form: "notice" }` + +SHA-256: `a3c6f1ea38e9a61d7a9706057ba65aabe02dfe6d9dd90d4736aa62325d874531` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"notice"` | +| `kind` | required | `"model-selection"` | +| `summary` | required | `string` | + + + +### `{ kind: "model-selection", form: "recall" }` + +SHA-256: `aae343bc3d663c83f2e8b5e1c7eea5d509dc7a5361bc8bd8b5ac3bb8d3b1ed56` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"recall"` | +| `kind` | required | `"model-selection"` | + + + +### `{ kind: "model-selection", form: "relay" }` + +SHA-256: `a15a19ef63cf5d1b711db1d249821dab0cedcd3a9ad09137b47352c93841fd20` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"relay"` | +| `kind` | required | `"model-selection"` | + + + +### `{ kind: "model-selection", form: "snapshot" }` + +SHA-256: `52c6113cb0e53f345324bf84f01928bea5d5df57ee80bc0dd65407b8bc5a3734` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"snapshot"` | +| `kind` | required | `"model-selection"` | +| `sections` | required | [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | + ### `{ kind: "parent" }` @@ -5800,89 +6374,82 @@ Sources: [`packages/core/session/src/types.ts:190`](../packages/core/session/src |---|---|---| | `kind` | required | `"parent"` | - + -### `{ kind: "plugin" }` +### `{ kind: "plan-mode" }` -SHA-256: `0ddab4577db37a3e0d9e3a91761735c8ef6f5629d526ab8ecaeeea19c097c8f8` +SHA-256: `f4a66f654996c093aae700ea4c434ff2ee3569fea9c0e5813ccf6afdccabd163` | Property | Presence | Type | |---|---|---| -| `kind` | required | `"plugin"` | -| `plugin` | required | `string` | +| `kind` | required | `"plan-mode"` | - + -### `{ kind: "plugin", form: "catalog" }` +### `{ kind: "plan-mode", form: "catalog" }` -SHA-256: `2f90a7b3646fea3e677bd7b4000aa96f3b8964f107b614e204e11ad4051c24fc` +SHA-256: `3b04790e08b35241ffa0d38f6d7e4f8788aa921341f6c0d7574a329397c59408` | Property | Presence | Type | |---|---|---| | `form` | required | `"catalog"` | -| `kind` | required | `"plugin"` | -| `plugin` | required | `string` | +| `kind` | required | `"plan-mode"` | - + -### `{ kind: "plugin", form: "instructions" }` +### `{ kind: "plan-mode", form: "instructions" }` -SHA-256: `dda6e111a8ccfc12f6e742e977a1a4e3549e8c03732a5ff6c8d7c3d4bcb7a412` +SHA-256: `408927267422a7b2beb6df354ff7c1406d929a5646554f48adf85eb8372f811c` | Property | Presence | Type | |---|---|---| | `form` | required | `"instructions"` | -| `kind` | required | `"plugin"` | -| `plugin` | required | `string` | +| `kind` | required | `"plan-mode"` | - + -### `{ kind: "plugin", form: "notice" }` +### `{ kind: "plan-mode", form: "notice" }` -SHA-256: `b4d298d90c798fa4d1f5b030ce3ce8031c4c41beafdb05323bec8b2a06903b43` +SHA-256: `baccc97ec34be6c4c78e95aa88c85c29820269479445e5b13f956cd64c5e286f` | Property | Presence | Type | |---|---|---| | `form` | required | `"notice"` | -| `kind` | required | `"plugin"` | -| `plugin` | required | `string` | +| `kind` | required | `"plan-mode"` | | `summary` | required | `string` | - + -### `{ kind: "plugin", form: "recall" }` +### `{ kind: "plan-mode", form: "recall" }` -SHA-256: `85e1bd563d6c80c1f377f99f91103fec4e315148a7330f3b3dae7c2d04e33b01` +SHA-256: `f6329fb30c7ea8013e8975ca5e78284fb7685cc6bd620e8aa4e9a99bc81d45eb` | Property | Presence | Type | |---|---|---| | `form` | required | `"recall"` | -| `kind` | required | `"plugin"` | -| `plugin` | required | `string` | +| `kind` | required | `"plan-mode"` | - + -### `{ kind: "plugin", form: "relay" }` +### `{ kind: "plan-mode", form: "relay" }` -SHA-256: `2ce7ef3b3daebf95815c7ae454a751d3e67ca7a22e2e0734fe2942df393bb66c` +SHA-256: `deaae5cd30987d4f49398e8f9d994c125907e7f928300745fb1dbf15f145d0e7` | Property | Presence | Type | |---|---|---| | `form` | required | `"relay"` | -| `kind` | required | `"plugin"` | -| `plugin` | required | `string` | +| `kind` | required | `"plan-mode"` | - + -### `{ kind: "plugin", form: "snapshot" }` +### `{ kind: "plan-mode", form: "snapshot" }` -SHA-256: `e8d26e6993445743e6c4342c31b284c7d8f5574369abdd6021183af1a6b3538f` +SHA-256: `8c1c4f72755a78ea163523a46565316e36e9b644382eb48e6635c71a6f412dd2` | Property | Presence | Type | |---|---|---| | `form` | required | `"snapshot"` | -| `kind` | required | `"plugin"` | -| `plugin` | required | `string` | +| `kind` | required | `"plan-mode"` | | `sections` | required | [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | @@ -5899,6 +6466,240 @@ Sources: [`packages/session/session-title/src/types.ts:30`](../packages/session/ | `model` | optional | [`SessionTitleModelIdentity`](#persistence-type-sha256-07e1a58c58b593f507b8e7f25723bb0aa42baae6e00f5ecfddf28cb1e64d3235) | | `provider` | required | `string` | + + +### `{ kind: "repeat-tool-reminder" }` + +SHA-256: `b062078e899958f99ae464514578b8c093924dfe34bd9a835932b420ff2150b1` + +| Property | Presence | Type | +|---|---|---| +| `kind` | required | `"repeat-tool-reminder"` | + + + +### `{ kind: "repeat-tool-reminder", form: "catalog" }` + +SHA-256: `d85590a5675c6e2fd8164e5792a6cceac714605b8ac228adae5ee668facb1490` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"catalog"` | +| `kind` | required | `"repeat-tool-reminder"` | + + + +### `{ kind: "repeat-tool-reminder", form: "instructions" }` + +SHA-256: `6f44f32be9bcd9a8bf075c3b575b06c8ed63446386e5b0995c7b73762e68ddae` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"instructions"` | +| `kind` | required | `"repeat-tool-reminder"` | + + + +### `{ kind: "repeat-tool-reminder", form: "notice" }` + +SHA-256: `fe1a7acdeed4d0f5ab483396eaa5b3dc97263b7c10eb4da2f0028cb01728bfc9` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"notice"` | +| `kind` | required | `"repeat-tool-reminder"` | +| `summary` | required | `string` | + + + +### `{ kind: "repeat-tool-reminder", form: "recall" }` + +SHA-256: `8620189c8e33582708ece48fd2d20dc4d57912486a17bdbb9aea4c44f7018062` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"recall"` | +| `kind` | required | `"repeat-tool-reminder"` | + + + +### `{ kind: "repeat-tool-reminder", form: "relay" }` + +SHA-256: `4991dfc415c9efebc36fa6969e1798c7d2e42396cc1e6e0ac7d7c89c5c5c4aea` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"relay"` | +| `kind` | required | `"repeat-tool-reminder"` | + + + +### `{ kind: "repeat-tool-reminder", form: "snapshot" }` + +SHA-256: `db06ef35b27a38425046b2228fa6bce9582abe140d781d363137eb2f4d233a1c` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"snapshot"` | +| `kind` | required | `"repeat-tool-reminder"` | +| `sections` | required | [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | + + + +### `{ kind: "runtime-context" }` + +SHA-256: `0203243b72fc867afc81aff5f4cf2167e564ed342534eb612fc92f295cf07789` + +| Property | Presence | Type | +|---|---|---| +| `kind` | required | `"runtime-context"` | + + + +### `{ kind: "runtime-context", form: "catalog" }` + +SHA-256: `58015da1c1950a66daf66ae24913d6a1fc6d1d9ac441b155f8847f7f8584ba8e` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"catalog"` | +| `kind` | required | `"runtime-context"` | + + + +### `{ kind: "runtime-context", form: "instructions" }` + +SHA-256: `0eeb17e1df89b1ebc2902116fe7145e0d321ef0db26e6bdebc802cb8513a01c1` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"instructions"` | +| `kind` | required | `"runtime-context"` | + + + +### `{ kind: "runtime-context", form: "notice" }` + +SHA-256: `cda2345a9be9d139df49ccbd16dcba716f3440178bf20ff8b801fda1f5eb77dc` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"notice"` | +| `kind` | required | `"runtime-context"` | +| `summary` | required | `string` | + + + +### `{ kind: "runtime-context", form: "recall" }` + +SHA-256: `96bfb916a727cd4445a594df264c523fc039749a31bfed924b8cc7bb308a5bb0` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"recall"` | +| `kind` | required | `"runtime-context"` | + + + +### `{ kind: "runtime-context", form: "relay" }` + +SHA-256: `cb1c8959e1726f82f9a3d2ef2bc90bf8c451a98fd56175e956022124c770c818` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"relay"` | +| `kind` | required | `"runtime-context"` | + + + +### `{ kind: "runtime-context", form: "snapshot" }` + +SHA-256: `2aad1179f957631477b582e57cd8f538cb82618fc3fb816bde1171154235b065` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"snapshot"` | +| `kind` | required | `"runtime-context"` | +| `sections` | required | [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | + + + +### `{ kind: "schedule" }` + +SHA-256: `f29d63336e8266d80dd7baeab219436db86341304f6be1cd0edb36f5134c4a47` + +| Property | Presence | Type | +|---|---|---| +| `kind` | required | `"schedule"` | + + + +### `{ kind: "schedule", form: "catalog" }` + +SHA-256: `1e709346005826eb81809eeb76a3f713cf13ad6c5cec75146d07020ab9adc938` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"catalog"` | +| `kind` | required | `"schedule"` | + + + +### `{ kind: "schedule", form: "instructions" }` + +SHA-256: `1938c8c20f1cba7c82dbedcfa4f14c3ee191cd77ed3314ee1fc676d44cadf3be` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"instructions"` | +| `kind` | required | `"schedule"` | + + + +### `{ kind: "schedule", form: "notice" }` + +SHA-256: `312aee2f0c42aabbae6cc60d92d596d8453c0aeb061c5868d1755a69ef49e69a` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"notice"` | +| `kind` | required | `"schedule"` | +| `summary` | required | `string` | + + + +### `{ kind: "schedule", form: "recall" }` + +SHA-256: `a16e567c8cd2c55cf1e911aed3c200c4e1f6febb1459ff2a9e7adf159afb68cb` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"recall"` | +| `kind` | required | `"schedule"` | + + + +### `{ kind: "schedule", form: "relay" }` + +SHA-256: `5bc66269cfaf614c0ecda8ecb469f23101a7609793fc2b693ac23c4aecdb575e` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"relay"` | +| `kind` | required | `"schedule"` | + + + +### `{ kind: "schedule", form: "snapshot" }` + +SHA-256: `28936c614bd4e7e2774806edcbb3cbfd3ee643ac1cbf0bbdff43d915505a8fe3` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"snapshot"` | +| `kind` | required | `"schedule"` | +| `sections` | required | [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | + ### `{ kind: "stop" }` @@ -5911,6 +6712,162 @@ Sources: [`packages/llm/llm/src/types.ts:135`](../packages/llm/llm/src/types.ts) |---|---|---| | `kind` | required | `"stop"` | + + +### `{ kind: "time-context" }` + +SHA-256: `b79641a9d25e756636dc0c706fdf3c4583ccb7d4920e009e6e86c0759cf4de4c` + +| Property | Presence | Type | +|---|---|---| +| `kind` | required | `"time-context"` | + + + +### `{ kind: "time-context", form: "catalog" }` + +SHA-256: `85fe96bf15d5c7559eec3bae4d6cf1a76fda9f5be05a29c2830cff560cab0c0d` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"catalog"` | +| `kind` | required | `"time-context"` | + + + +### `{ kind: "time-context", form: "instructions" }` + +SHA-256: `f6afe41e3926f422fe849debe90819fddd739f0f59e20be9c71018b9554a7f09` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"instructions"` | +| `kind` | required | `"time-context"` | + + + +### `{ kind: "time-context", form: "notice" }` + +SHA-256: `ee577a0cc18664c9daee50e9455153321155604f8f1817362f8f4a4b6fb9e1ad` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"notice"` | +| `kind` | required | `"time-context"` | +| `summary` | required | `string` | + + + +### `{ kind: "time-context", form: "recall" }` + +SHA-256: `756b5e23a5cb2c7f486f366a828f7461c88902af21125bd6810881f4ccbff6cc` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"recall"` | +| `kind` | required | `"time-context"` | + + + +### `{ kind: "time-context", form: "relay" }` + +SHA-256: `5d7a64ed6aac5551ebf998dc25e1e7b48a144769913f89702840180e61dc3995` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"relay"` | +| `kind` | required | `"time-context"` | + + + +### `{ kind: "time-context", form: "snapshot" }` + +SHA-256: `f230c0b583e23b25ee0a61dbe4c05e95c1e2ae44b27939501eb9e03696f0c278` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"snapshot"` | +| `kind` | required | `"time-context"` | +| `sections` | required | [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | + + + +### `{ kind: "tmux-context" }` + +SHA-256: `8a046b52331959aa3394680d6acbe09b8a5447c6b61375f263445bfcef19b7f1` + +| Property | Presence | Type | +|---|---|---| +| `kind` | required | `"tmux-context"` | + + + +### `{ kind: "tmux-context", form: "catalog" }` + +SHA-256: `7df62978a2b7de8540e714152297743e0a622209a46a5ac9513fc0fad73ca23b` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"catalog"` | +| `kind` | required | `"tmux-context"` | + + + +### `{ kind: "tmux-context", form: "instructions" }` + +SHA-256: `9f65c43e340bba31cdc0fc37bd93ccb68d5e9b36f47a68c207e95a8e68620a5d` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"instructions"` | +| `kind` | required | `"tmux-context"` | + + + +### `{ kind: "tmux-context", form: "notice" }` + +SHA-256: `b3681c026a0b98e98b103f057dfd217fbe904129c090efd668253ec9aea7fece` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"notice"` | +| `kind` | required | `"tmux-context"` | +| `summary` | required | `string` | + + + +### `{ kind: "tmux-context", form: "recall" }` + +SHA-256: `fcf81d3c58c13593bf2594e342e31734f4ab2d24938dc610875194c6079749c7` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"recall"` | +| `kind` | required | `"tmux-context"` | + + + +### `{ kind: "tmux-context", form: "relay" }` + +SHA-256: `f97f47b0eb87905ed77cc27c5e4ed75ef805cb372c98905253709de1aab9b63c` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"relay"` | +| `kind` | required | `"tmux-context"` | + + + +### `{ kind: "tmux-context", form: "snapshot" }` + +SHA-256: `49dab019d00e8c26f27ad2ccff7b604d69e323ae4d17e0d2a7b6b8a830b1ade2` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"snapshot"` | +| `kind` | required | `"tmux-context"` | +| `sections` | required | [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | + ### `{ kind: "tool-calls" }` @@ -5923,6 +6880,162 @@ Sources: [`packages/llm/llm/src/types.ts:136`](../packages/llm/llm/src/types.ts) |---|---|---| | `kind` | required | `"tool-calls"` | + + +### `{ kind: "tool-goal" }` + +SHA-256: `a2066bd52f61218ba15b758def2641cc6a8bd3d4a594a488ee4c65be356d7e39` + +| Property | Presence | Type | +|---|---|---| +| `kind` | required | `"tool-goal"` | + + + +### `{ kind: "tool-goal", form: "catalog" }` + +SHA-256: `260523b412c19ad8c2bb00093b07f64245ff8ba6b2f76c5b545303772ac9704c` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"catalog"` | +| `kind` | required | `"tool-goal"` | + + + +### `{ kind: "tool-goal", form: "instructions" }` + +SHA-256: `6085488d223aeffdef51d7ae17655fc26ab22ee13cbed82a50e62e2b6fb5b918` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"instructions"` | +| `kind` | required | `"tool-goal"` | + + + +### `{ kind: "tool-goal", form: "notice" }` + +SHA-256: `8c627d7a45fa406cea879a3922105e27ed4c3c7966e264afaf11ea7a330f2dd1` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"notice"` | +| `kind` | required | `"tool-goal"` | +| `summary` | required | `string` | + + + +### `{ kind: "tool-goal", form: "recall" }` + +SHA-256: `7554565be416b0342053ee6a46256c9dab07c487349b4a5f10bab1edc151c619` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"recall"` | +| `kind` | required | `"tool-goal"` | + + + +### `{ kind: "tool-goal", form: "relay" }` + +SHA-256: `8f324cea3916c0517261e88167def8efb3a9994c1135e23d40ed9fd48f8c7bd4` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"relay"` | +| `kind` | required | `"tool-goal"` | + + + +### `{ kind: "tool-goal", form: "snapshot" }` + +SHA-256: `11638dc58a31496fb6706ced3e23e3a2db1f3b2a8845968c810827a72b5fc811` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"snapshot"` | +| `kind` | required | `"tool-goal"` | +| `sections` | required | [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | + + + +### `{ kind: "tool-jobs" }` + +SHA-256: `24ce31aa528272e59f21cd26da9eca08968bcc97529756a749bfdab71746d9c8` + +| Property | Presence | Type | +|---|---|---| +| `kind` | required | `"tool-jobs"` | + + + +### `{ kind: "tool-jobs", form: "catalog" }` + +SHA-256: `dd5ee8762bd8a14b6c6bffedd1753e4e78505bb0f9ea1621018d03a54eef59d5` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"catalog"` | +| `kind` | required | `"tool-jobs"` | + + + +### `{ kind: "tool-jobs", form: "instructions" }` + +SHA-256: `53cf1704ae0709c7678bcf070c83c619fc48ca1b5c173b74cfa8702f22a8e492` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"instructions"` | +| `kind` | required | `"tool-jobs"` | + + + +### `{ kind: "tool-jobs", form: "notice" }` + +SHA-256: `5bb69b88517f6214f2af4d1a6d2b771e271ad3ad695cc9c2c272069ae698c9bc` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"notice"` | +| `kind` | required | `"tool-jobs"` | +| `summary` | required | `string` | + + + +### `{ kind: "tool-jobs", form: "recall" }` + +SHA-256: `dd6cc2bb2a8f28248347021ad93565360b196a042360b4cd16b569d3a2a91f2d` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"recall"` | +| `kind` | required | `"tool-jobs"` | + + + +### `{ kind: "tool-jobs", form: "relay" }` + +SHA-256: `ade057f4fdc387aec6426f48704a1f9359cfc6fee13f27735b07f9b215ec16ca` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"relay"` | +| `kind` | required | `"tool-jobs"` | + + + +### `{ kind: "tool-jobs", form: "snapshot" }` + +SHA-256: `c5228b7a55498d84f529591744a0ab26e0b93ade18a70a26db1377a1ecfa6b49` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"snapshot"` | +| `kind` | required | `"tool-jobs"` | +| `sections` | required | [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | + ### `{ kind: "user" }` @@ -5937,6 +7050,84 @@ Sources: [`packages/api/session-controller/src/types.ts:385`](../packages/api/se | `kind` | required | `"user"` | | `rpcId` | required | `string` | + + +### `{ kind: "user-approval" }` + +SHA-256: `6292bcbedaa97feaec5b48a03bb8144b581b93309d9d6c905f26da7a6a7a0a4f` + +| Property | Presence | Type | +|---|---|---| +| `kind` | required | `"user-approval"` | + + + +### `{ kind: "user-approval", form: "catalog" }` + +SHA-256: `825ca23416b1ea9d81442afead5cf9229a6fa05842f042135cc3aa9710a6a2d8` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"catalog"` | +| `kind` | required | `"user-approval"` | + + + +### `{ kind: "user-approval", form: "instructions" }` + +SHA-256: `aa2bf9e82b9fdeb94a42af20031fffa30e4e23f01f4ac39757427d4c64c407f0` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"instructions"` | +| `kind` | required | `"user-approval"` | + + + +### `{ kind: "user-approval", form: "notice" }` + +SHA-256: `6ccb6bc423fb3952458abf9c1b1c3284208b7e660344b612cc55da773d61afe4` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"notice"` | +| `kind` | required | `"user-approval"` | +| `summary` | required | `string` | + + + +### `{ kind: "user-approval", form: "recall" }` + +SHA-256: `022623b9ef98ec47ec3c3bae0c51027c70d2601141c5e92e26a0d83d1b4cef06` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"recall"` | +| `kind` | required | `"user-approval"` | + + + +### `{ kind: "user-approval", form: "relay" }` + +SHA-256: `5cdbf342b7748d152bc987b68f58e565e5bba4b227e076e2d2120d87662e45cd` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"relay"` | +| `kind` | required | `"user-approval"` | + + + +### `{ kind: "user-approval", form: "snapshot" }` + +SHA-256: `5654685d7557ec747e74887237065e626a5bdfa426ca43f7fbb0b6fee9b0916c` + +| Property | Presence | Type | +|---|---|---| +| `form` | required | `"snapshot"` | +| `kind` | required | `"user-approval"` | +| `sections` | required | [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | + ### `{ kind: "webhook", form: "notice" }` @@ -5984,17 +7175,17 @@ Sources: [`packages/experimental/agent-team/src/types.ts:221`](../packages/exper | `teamId` | required | `string` | | `version` | required | `2` | - + ### `{ message, step, turn }` -SHA-256: `04e1cae61e7654890444877cb802e3b6c8c607fa8a9b4380323939951a1be9d2` +SHA-256: `0baa4dd6c2795de2454f2a20eadf1116981ae995f61a3e5b8128dcbca76c2048` Sources: [`packages/core/session/src/types.ts:321`](../packages/core/session/src/types.ts) | Property | Presence | Type | |---|---|---| -| `message` | required | [`SystemMessage`](#persistence-type-sha256-abb8be1a8972c5531c513de95c678bac414263fb5e4bf6dcf871ca913f47bd94) | +| `message` | required | [`SystemMessage`](#persistence-type-sha256-20a3c1c8a3154e4ae69eada1212e3216baf93454ee4c745565b9374d7539fe8b) | | `step` | required | `number` | | `turn` | required | `number` | @@ -6046,7 +7237,7 @@ Sources: [`packages/sandbox/sandbox-policy/src/session-mode.ts:33`](../packages/ SHA-256: `11f70b595aa76897fc4e25a352bfa718c659f44b799e5aa14e84e5a38fe72912` -Sources: [`packages/interaction/user-approval/src/index.ts:33`](../packages/interaction/user-approval/src/index.ts) +Sources: [`packages/interaction/user-approval/src/index.ts:40`](../packages/interaction/user-approval/src/index.ts) | Property | Presence | Type | |---|---|---| @@ -6212,17 +7403,17 @@ SHA-256: `a10c17474eaf2ddab7095a099e0fe3d046fc18e56c3e344fc8894c05ff9ef97b` | `time` | required | `number` | | `type` | required | `"agent-preset/selected"` | - + ### `{ type: "agent/inbox/spliced" }` -SHA-256: `cbe418d5a3727fbd3599f90101680dae254ac1d6163b1b8b2ca30f28afb5212a` +SHA-256: `ab1acc0685cc410d0d1e85ff0e0bd29f4b2b4352dd170db54988319d58d4362f` | Property | Presence | Type | |---|---|---| -| `data` | required | [`{ inserted, outcome?, removedCount?, start, … }`](#persistence-type-sha256-6f87000576a13d73867248c97e55c4ebe3cb3ee55ee3bd1282f26e7f40dd81c8) | +| `data` | required | [`{ inserted, outcome?, removedCount?, start, … }`](#persistence-type-sha256-37af4fdde18eb8638d5037243e0ee1c617b9b1062ae9dbee086feafad852112f) | | `ignorable` | optional | `true` | | `seq` | required | `number` | | `time` | required | `number` | @@ -6811,17 +8002,17 @@ SHA-256: `1b912703e2d64f91c99c675b8f805b01076c8325b905c1218ad81ef0b24909d5` | `time` | required | `number` | | `type` | required | `"session/title"` | - + ### `{ type: "session/title-llm-request" }` -SHA-256: `2a47ef7025d7dcf7e9977aadd738e7408a210b101a7dbbd37f4d87f22166eff0` +SHA-256: `eb655047c0dd3f2f3aefd2c9c719df0d060dd88032ba7caf731ea39db5a6725f` | Property | Presence | Type | |---|---|---| -| `data` | required | [`SessionTitleLlmRequestEventData`](#persistence-type-sha256-1b78e3a578a7e6d29d9564a9f5d236c2ebdcf682dbeb7b50400d8850e313b518) | +| `data` | required | [`SessionTitleLlmRequestEventData`](#persistence-type-sha256-608866d72de8327687e3730cb213d57cf8485012419673de9e5765f4a71f7f2d) | | `ignorable` | optional | `true` | | `seq` | required | `number` | | `time` | required | `number` | @@ -6907,17 +8098,17 @@ SHA-256: `a6567ccb2e530606b775371eb4fa31468d72084339968e8b0440a516a23b39dc` | `time` | required | `number` | | `type` | required | `"subagent/model-selection-policy"` | - + ### `{ type: "system/message" }` -SHA-256: `1772581b17e1fab970fda49f04ffae2a181b7992ca4efa63bffe5f8b2bd62300` +SHA-256: `54a8682615a7ffc3e1e3c41ab003ae61082ae2792c57407f5bd8bb38fded3f0e` | Property | Presence | Type | |---|---|---| -| `data` | required | [`{ message, step, turn }`](#persistence-type-sha256-04e1cae61e7654890444877cb802e3b6c8c607fa8a9b4380323939951a1be9d2) | +| `data` | required | [`{ message, step, turn }`](#persistence-type-sha256-0baa4dd6c2795de2454f2a20eadf1116981ae995f61a3e5b8128dcbca76c2048) | | `ignorable` | optional | `true` | | `seq` | required | `number` | | `sourceEventSeqs` | optional | [`number[]`](#persistence-type-sha256-5d03ba38734809bcbd2a55221bd938b3b3fc34b49bb686c6113e9e4931e3aa78) | @@ -7244,17 +8435,17 @@ Sources: [`packages/llm/llm/src/types.ts:423`](../packages/llm/llm/src/types.ts) | `type` | required | `"usage"` | | `usage` | required | [`TokenUsage`](#persistence-type-sha256-fec5442b9ee4122e10514d81d5a43648003fe8bfb7ee2ba50c0cdbdd383ed394) | - + ### `{ type: "user/message" }` -SHA-256: `5274b395e7bf6660d020fba7e29a1e20ef2e77097fd7597e9debb13e45c540d6` +SHA-256: `46c44941f6e93a1764c49f1487e64a57f73ee68a75a657e94c326a8de5d8ad95` | Property | Presence | Type | |---|---|---| -| `data` | required | [`UserMessage`](#persistence-type-sha256-a48b761be36821fcf456c862e321284bdd879dd796d29d20b1766e0417f7c966) | +| `data` | required | [`UserMessage`](#persistence-type-sha256-980b8f7c2576a03df48bd09fd68000d88eaec6e99ca5bec36e6448401b8e3e95) | | `ignorable` | optional | `true` | | `seq` | required | `number` | | `sourceEventSeqs` | optional | [`number[]`](#persistence-type-sha256-5d03ba38734809bcbd2a55221bd938b3b3fc34b49bb686c6113e9e4931e3aa78) | diff --git a/docs/persistence-catalog.zh.md b/docs/persistence-catalog.zh.md index 4c5b640b69..ea5d1c8dd1 100644 --- a/docs/persistence-catalog.zh.md +++ b/docs/persistence-catalog.zh.md @@ -23,7 +23,7 @@ | `JsonlHeaderLine` | header | `18ee62b8900a4c3d046700f05d7a4d49d6cab2a660a020c87481d1603dd8bd4f` | [`HeaderLine`](#persistence-type-sha256-18ee62b8900a4c3d046700f05d7a4d49d6cab2a660a020c87481d1603dd8bd4f) | | `SessionEventEnvelope` | envelope | `5776e5553ff2dfe3f5bc202dbb1e7c9f93e35a531aebb7764c23b2b6153b2ccc` | [`union (3 variants)`](#persistence-type-sha256-5776e5553ff2dfe3f5bc202dbb1e7c9f93e35a531aebb7764c23b2b6153b2ccc) | | `event:agent-preset/selected` | event | `a10c17474eaf2ddab7095a099e0fe3d046fc18e56c3e344fc8894c05ff9ef97b` | [`{ type: "agent-preset/selected" }`](#persistence-type-sha256-a10c17474eaf2ddab7095a099e0fe3d046fc18e56c3e344fc8894c05ff9ef97b) | -| `event:agent/inbox/spliced` | event | `cbe418d5a3727fbd3599f90101680dae254ac1d6163b1b8b2ca30f28afb5212a` | [`{ type: "agent/inbox/spliced" }`](#persistence-type-sha256-cbe418d5a3727fbd3599f90101680dae254ac1d6163b1b8b2ca30f28afb5212a) | +| `event:agent/inbox/spliced` | event | `ab1acc0685cc410d0d1e85ff0e0bd29f4b2b4352dd170db54988319d58d4362f` | [`{ type: "agent/inbox/spliced" }`](#persistence-type-sha256-ab1acc0685cc410d0d1e85ff0e0bd29f4b2b4352dd170db54988319d58d4362f) | | `event:approval/asked` | event | `3bfeb47b58606f4661904bc723da612782214c463d01e6d61cd6d6193d7374e1` | [`{ type: "approval/asked" }`](#persistence-type-sha256-3bfeb47b58606f4661904bc723da612782214c463d01e6d61cd6d6193d7374e1) | | `event:approval/decided` | event | `bb1ab3d08f49a9f3b265f844cd78d5c49813062a7b34b54904b426f85d0ff6e3` | [`{ type: "approval/decided" }`](#persistence-type-sha256-bb1ab3d08f49a9f3b265f844cd78d5c49813062a7b34b54904b426f85d0ff6e3) | | `event:approval/policy` | event | `26718e15e7e395bce9642dba5bbe09b3b1a4ce2213d20d566cd9207d7fc5fb78` | [`{ type: "approval/policy" }`](#persistence-type-sha256-26718e15e7e395bce9642dba5bbe09b3b1a4ce2213d20d566cd9207d7fc5fb78) | @@ -55,13 +55,13 @@ | `event:session-log-deepseek/delivery-accepted` | event | `d63b8b8ffad9c02fd80c43a17df4f240c1fe8118ecca9de34f9d5871838ab5b9` | [`{ type: "session-log-deepseek/delivery-accepted" }`](#persistence-type-sha256-d63b8b8ffad9c02fd80c43a17df4f240c1fe8118ecca9de34f9d5871838ab5b9) | | `event:session/end-seed` | event | `5e6db6e24948d4a853c71cb9fabd252ad051ce93d4672c1266cf837c1c17b84e` | [`{ type: "session/end-seed" }`](#persistence-type-sha256-5e6db6e24948d4a853c71cb9fabd252ad051ce93d4672c1266cf837c1c17b84e) | | `event:session/title` | event | `1b912703e2d64f91c99c675b8f805b01076c8325b905c1218ad81ef0b24909d5` | [`{ type: "session/title" }`](#persistence-type-sha256-1b912703e2d64f91c99c675b8f805b01076c8325b905c1218ad81ef0b24909d5) | -| `event:session/title-llm-request` | event | `2a47ef7025d7dcf7e9977aadd738e7408a210b101a7dbbd37f4d87f22166eff0` | [`{ type: "session/title-llm-request" }`](#persistence-type-sha256-2a47ef7025d7dcf7e9977aadd738e7408a210b101a7dbbd37f4d87f22166eff0) | +| `event:session/title-llm-request` | event | `eb655047c0dd3f2f3aefd2c9c719df0d060dd88032ba7caf731ea39db5a6725f` | [`{ type: "session/title-llm-request" }`](#persistence-type-sha256-eb655047c0dd3f2f3aefd2c9c719df0d060dd88032ba7caf731ea39db5a6725f) | | `event:step/end` | event | `e0a787e6ec76c7c94fecbc501b489164ab0293db05bc947914077ad01e674f05` | [`{ type: "step/end" }`](#persistence-type-sha256-e0a787e6ec76c7c94fecbc501b489164ab0293db05bc947914077ad01e674f05) | | `event:step/start` | event | `4513e088d43e6c68425be30451b9f961cc264fe7318ca62681c41d4d78615986` | [`{ type: "step/start" }`](#persistence-type-sha256-4513e088d43e6c68425be30451b9f961cc264fe7318ca62681c41d4d78615986) | | `event:subagent/catalog` | event | `ae1f7110feeec697b8cab42b68f7709aa7b3279764099dfb53c25890d2e5c871` | [`{ type: "subagent/catalog" }`](#persistence-type-sha256-ae1f7110feeec697b8cab42b68f7709aa7b3279764099dfb53c25890d2e5c871) | | `event:subagent/descriptor` | event | `b79ada42962cad0190a9d465805260567621fa3a4abd757eb31e6016b52d5ab5` | [`{ type: "subagent/descriptor" }`](#persistence-type-sha256-b79ada42962cad0190a9d465805260567621fa3a4abd757eb31e6016b52d5ab5) | | `event:subagent/model-selection-policy` | event | `a6567ccb2e530606b775371eb4fa31468d72084339968e8b0440a516a23b39dc` | [`{ type: "subagent/model-selection-policy" }`](#persistence-type-sha256-a6567ccb2e530606b775371eb4fa31468d72084339968e8b0440a516a23b39dc) | -| `event:system/message` | event | `1772581b17e1fab970fda49f04ffae2a181b7992ca4efa63bffe5f8b2bd62300` | [`{ type: "system/message" }`](#persistence-type-sha256-1772581b17e1fab970fda49f04ffae2a181b7992ca4efa63bffe5f8b2bd62300) | +| `event:system/message` | event | `54a8682615a7ffc3e1e3c41ab003ae61082ae2792c57407f5bd8bb38fded3f0e` | [`{ type: "system/message" }`](#persistence-type-sha256-54a8682615a7ffc3e1e3c41ab003ae61082ae2792c57407f5bd8bb38fded3f0e) | | `event:team/member` | event | `4fb59762612c3e3ac3a3bd4f84c9c148d3c3893bd422ba2b201cc039fabd49bc` | [`{ type: "team/member" }`](#persistence-type-sha256-4fb59762612c3e3ac3a3bd4f84c9c148d3c3893bd422ba2b201cc039fabd49bc) | | `event:team/message/delivered` | event | `48f9c19417a1abbedfa59f4667bba36b93ac2db407adf5e84cb3ba0de30942cb` | [`{ type: "team/message/delivered" }`](#persistence-type-sha256-48f9c19417a1abbedfa59f4667bba36b93ac2db407adf5e84cb3ba0de30942cb) | | `event:team/message/queued` | event | `9a25c2e889855516a531dc906905ec1d88157f7c2651aed27ac4f754bb128240` | [`{ type: "team/message/queued" }`](#persistence-type-sha256-9a25c2e889855516a531dc906905ec1d88157f7c2651aed27ac4f754bb128240) | @@ -77,7 +77,7 @@ | `event:tool/result` | event | `f4c6f3eae6607f412a9023406c8c3bd351a02451848bb78c2436f409447dd60c` | [`{ type: "tool/result" }`](#persistence-type-sha256-f4c6f3eae6607f412a9023406c8c3bd351a02451848bb78c2436f409447dd60c) | | `event:turn/end` | event | `0f8512903d94f57a4748fa1a2092e64342856796684e6b8343db685b192745ce` | [`{ type: "turn/end" }`](#persistence-type-sha256-0f8512903d94f57a4748fa1a2092e64342856796684e6b8343db685b192745ce) | | `event:turn/start` | event | `aa0957eca50aeb28bcd2e6930b95809926edacb550c8c340ba526ba6b861b3d8` | [`{ type: "turn/start" }`](#persistence-type-sha256-aa0957eca50aeb28bcd2e6930b95809926edacb550c8c340ba526ba6b861b3d8) | -| `event:user/message` | event | `5274b395e7bf6660d020fba7e29a1e20ef2e77097fd7597e9debb13e45c540d6` | [`{ type: "user/message" }`](#persistence-type-sha256-5274b395e7bf6660d020fba7e29a1e20ef2e77097fd7597e9debb13e45c540d6) | +| `event:user/message` | event | `46c44941f6e93a1764c49f1487e64a57f73ee68a75a657e94c326a8de5d8ad95` | [`{ type: "user/message" }`](#persistence-type-sha256-46c44941f6e93a1764c49f1487e64a57f73ee68a75a657e94c326a8de5d8ad95) | | `event:web/deepseek-search-llm-request` | event | `cf6e3aaf1e2de6480aa0157730a41b9a492108a55304100b0f7e112711dd4331` | [`{ type: "web/deepseek-search-llm-request" }`](#persistence-type-sha256-cf6e3aaf1e2de6480aa0157730a41b9a492108a55304100b0f7e112711dd4331) | | `event:workspace/changes` | event | `e308ccf867a5398e316e0af8cb6ce238a8d33a63b9b384c8250a686786285f72` | [`{ type: "workspace/changes" }`](#persistence-type-sha256-e308ccf867a5398e316e0af8cb6ce238a8d33a63b9b384c8250a686786285f72) | @@ -265,7 +265,7 @@ export type SessionEvent = { } ``` -来源:[`packages/interaction/user-approval/src/index.ts:33`](../packages/interaction/user-approval/src/index.ts) +来源:[`packages/interaction/user-approval/src/index.ts:40`](../packages/interaction/user-approval/src/index.ts) ### `assistant/*` @@ -678,7 +678,7 @@ export type SessionEvent = { 'plan/mode': { active: boolean } ``` -来源:[`packages/plan/plan-mode/src/index.ts:47`](../packages/plan/plan-mode/src/index.ts) +来源:[`packages/plan/plan-mode/src/index.ts:53`](../packages/plan/plan-mode/src/index.ts) ### `request/*` @@ -821,7 +821,7 @@ export type SessionEvent = { 类型:[SessionTitleLlmRequestEventData](subsystems/session-title.zh.md) -来源:[`packages/session/session-title-llm/src/index.ts:45`](../packages/session/session-title-llm/src/index.ts) +来源:[`packages/session/session-title-llm/src/index.ts:52`](../packages/session/session-title-llm/src/index.ts) ### `session-log-deepseek/*` @@ -1498,6 +1498,14 @@ SHA-256: `e7e154d47d5fbc5366330fb4dade1f108c6dfe4335044d21ded14b7bf1dce084` `"clear"` + + +### `"code-mode"` + +SHA-256: `1443074511c1f99aaac262e60f81282cd4f2790e7c7ca0d11499bbe7c1e769bf` + +`"code-mode"` + ### `"codex"` @@ -1522,6 +1530,14 @@ SHA-256: `f1996af2602e6f62b5ab179ca5c4af00d8753938b74cc6ef102de09e99e74a7e` `"command/run"` + + +### `"compact-checkpoint"` + +SHA-256: `6b23ed9ce1b397e602788dbe033693bf97642a69e23fcab1cc45bf6f13b6d619` + +`"compact-checkpoint"` + ### `"compaction/end"` @@ -1578,6 +1594,14 @@ SHA-256: `e5d3828df1ec3e2a66879de0659e0f4866d9cfffc00825ee731a66f8a0c03d98` `"continuable"` + + +### `"cordis-host-runner"` + +SHA-256: `c5687b1313206a6ff334066047b6a0681611467dc4df8c5a8e71d0b6df39311f` + +`"cordis-host-runner"` + ### `"create"` @@ -1642,6 +1666,14 @@ SHA-256: `b38f206d59bad891fa58c89f97a0036987b3defe7685acbd318fa55eb85f9751` `"disposed"` + + +### `"dsh-session-title-llm"` + +SHA-256: `23af3759678a30de1d11d946772da8c051c63caa67997c5da05d30d7a9fe8a97` + +`"dsh-session-title-llm"` + ### `"edit"` @@ -1786,6 +1818,22 @@ SHA-256: `a3a259a1aa5401af786ce08c4a8419681d3000d73467991b5fc563389bc4ebd2` `"hook/result"` + + +### `"hooks-claude-code"` + +SHA-256: `a9059a81430b320792bbb7c2ee1f8f6c77ff71e40ee44c18aec72e157c522694` + +`"hooks-claude-code"` + + + +### `"hooks-codex"` + +SHA-256: `bb94f3217aa56c8876bbff0b8460d6a73cbead545659abb29e76cd0cf2cb92d6` + +`"hooks-codex"` + ### `"image"` @@ -1928,6 +1976,14 @@ SHA-256: `2765e9119edf5816ac1ab4c95c5ee32c90403f3742962eff11544f7752d59d2e` `"model"` + + +### `"model-selection"` + +SHA-256: `9ac52f0f84fec2eb9f71c2937e497d759db5ca0da4836d93a679d113684141f2` + +`"model-selection"` + ### `"model/selection"` @@ -2040,6 +2096,14 @@ SHA-256: `ae63d9d1080ed8945031594d93f8d96651d7101b848719cc3e1475875cd3d649` `"permission/preset"` + + +### `"plan-mode"` + +SHA-256: `0fe52387f65052702ed9d7cd59db826468936595d1b3eec207e7a823adc719db` + +`"plan-mode"` + ### `"plan/mode"` @@ -2048,14 +2112,6 @@ SHA-256: `f634871d1e18b1eb199497ac8ab72d3964f48d03fbf611dc7521a1970cf429d9` `"plan/mode"` - - -### `"plugin"` - -SHA-256: `e654d28d1e6c471147310d2fba396d00969cfe6ed9022626d3f2c2312e0b1cbb` - -`"plugin"` - ### `"positive"` @@ -2152,6 +2208,14 @@ SHA-256: `7382c4fc95fe8c5db65ca4d9da572b115d0dbb818b7f32c22ab040318ffbb4bc` `"remove"` + + +### `"repeat-tool-reminder"` + +SHA-256: `1f1385dbc3e875c021e387c7096d671d606f22daec51b25c80348735b6bbfa10` + +`"repeat-tool-reminder"` + ### `"replace"` @@ -2192,6 +2256,14 @@ SHA-256: `34d1ab5c5df378186d6054b1a1beea9a41e41965d6f336f0bc0025c441a82e66` `"resume"` + + +### `"runtime-context"` + +SHA-256: `24b10f7cdae64928f89c49afc2eca0af9eb4a2f135e16f3416e6b8461fef1748` + +`"runtime-context"` + ### `"sandbox/mode"` @@ -2200,6 +2272,14 @@ SHA-256: `ca085dba2c877feceebf3c62f9d39c6c2a4d2314d97b94b3927a780fe8fe2bb2` `"sandbox/mode"` + + +### `"schedule"` + +SHA-256: `d9edf1862e4471d6ad8a106a3f4160e0643874368707d50ecd8e27e5ee7a2567` + +`"schedule"` + ### `"schedule/change"` @@ -2392,6 +2472,14 @@ SHA-256: `8af841fc9b265ade3441caf9fe40dd24db24226befba48150e6d0eeccc1389c3` `"system"` + + +### `"system-prompt"` + +SHA-256: `09655b34d7f3cf1e9005974de2357de2d4a60deea165d16dac1eadaa6ec539a8` + +`"system-prompt"` + ### `"system/message"` @@ -2472,6 +2560,22 @@ SHA-256: `5abab3a27fd2736660ecddd94b28d6bbf114986dd894880153bd1be3ccacb563` `"text-delta"` + + +### `"time-context"` + +SHA-256: `8067b0d232c350f189738e60ee3c9939d46ca3b32b45db5525237b077893f649` + +`"time-context"` + + + +### `"tmux-context"` + +SHA-256: `78a9be340090b735a39980e7222ce730c972fbcf1de7c9e0aef2125884b7caee` + +`"tmux-context"` + ### `"todo/write"` @@ -2520,6 +2624,22 @@ SHA-256: `6c1cccb433ddc153facb380c7dda956237ba5c31f8a532a69142dc277890cc9b` `"tool-calls"` + + +### `"tool-goal"` + +SHA-256: `2f3f201c8846e19c20bb75c02280e3d4eb3c57509e4715f0c0a4d1d4f91a7a06` + +`"tool-goal"` + + + +### `"tool-jobs"` + +SHA-256: `99e7e7d7fed55ae6a3a648b35192f16ab1248ddcb0179a0e275128ac1487d7c7` + +`"tool-jobs"` + ### `"tool-workflow/agent-end"` @@ -2624,6 +2744,14 @@ SHA-256: `68f44f59e91c41395076cb77265981a601680ec8a381bbbeb6ab754ffdc94573` `"user"` + + +### `"user-approval"` + +SHA-256: `f68c335306535a001127dae6685ece493a0ee7f4e2a851197b6054d8a9ff7394` + +`"user-approval"` + ### `"user/message"` @@ -2826,7 +2954,7 @@ SHA-256: `930c1cd289def119d443e19dd90008916bf035f0a4d23e07241e7f050f2b89b7` SHA-256: `05d2ae1e0c7f8770f83f9a09047afb39a335d8ac986df3193659aa1e581472cf` -来源:[`packages/interaction/user-approval/src/index.ts:60`](../packages/interaction/user-approval/src/index.ts) +来源:[`packages/interaction/user-approval/src/index.ts:67`](../packages/interaction/user-approval/src/index.ts) 以下类型之一: @@ -2843,7 +2971,7 @@ SHA-256: `05d2ae1e0c7f8770f83f9a09047afb39a335d8ac986df3193659aa1e581472cf` SHA-256: `fd796823ba99092846b017e4a9c2d8ea5a1c8e15a3125662cadba1860ceb1b05` -来源:[`packages/llm/llm/src/message.ts:152`](../packages/llm/llm/src/message.ts) +来源:[`packages/llm/llm/src/message.ts:162`](../packages/llm/llm/src/message.ts) | 属性 | 存在性 | 类型 | |---|---|---| @@ -2908,12 +3036,30 @@ SHA-256: `658d895d187b26d83f3b53109a3bf77bbfba9f6f9a6d4bc4ee4315b4eb36239e` SHA-256: `ada310bf0bdb8fed51f3b56ea63f6ea6b18bbd587f04fccb63a14ab0b2a24e05` -来源:[`packages/core/session/src/types.ts:189`](../packages/core/session/src/types.ts) · [`packages/interaction/commands/src/types.ts:75`](../packages/interaction/commands/src/types.ts) · [`packages/interaction/commands/src/types.ts:79`](../packages/interaction/commands/src/types.ts) · [`packages/llm/llm/src/message.ts:103`](../packages/llm/llm/src/message.ts) · [`packages/session/session-title/src/types.ts:35`](../packages/session/session-title/src/types.ts) +来源:[`packages/core/session/src/types.ts:189`](../packages/core/session/src/types.ts) · [`packages/interaction/commands/src/types.ts:75`](../packages/interaction/commands/src/types.ts) · [`packages/interaction/commands/src/types.ts:79`](../packages/interaction/commands/src/types.ts) · [`packages/llm/llm/src/message.ts:111`](../packages/llm/llm/src/message.ts) · [`packages/session/session-title/src/types.ts:35`](../packages/session/session-title/src/types.ts) | 属性 | 存在性 | 类型 | |---|---|---| | `kind` | 必需 | `"user"` | + + + + + + +### `CompactionCheckpointSource` + +SHA-256: `31907de9563751822af6d9be02bafaf26faa098bbd1cb412524134d577cc1648` + +来源:[`packages/compaction/compaction/src/checkpoint.ts:22`](../packages/compaction/compaction/src/checkpoint.ts) + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `compactionId` | 必需 | `string` | +| `kind` | 必需 | `"compact-checkpoint"` | +| `sourceCommandId` | 可选 | `string` | + @@ -2972,7 +3118,7 @@ SHA-256: `a951a47d0ebf7d7ac401d1ec2fe4e138a43288c5ad2b0cf029a90b97d718f1e6` SHA-256: `86e1e384495ee09ac2d60c9db3610f1f1fddac2d248f6f1d6000e78054680219` -来源:[`packages/llm/llm/src/message.ts:65`](../packages/llm/llm/src/message.ts) +来源:[`packages/llm/llm/src/message.ts:70`](../packages/llm/llm/src/message.ts) | 属性 | 存在性 | 类型 | |---|---|---| @@ -3580,7 +3726,7 @@ SHA-256: `6f72ece8f317cd080c4f20a93f1bf709965f5b81ac4669528f5a023191cfcf20` | `step` | 必需 | `number` | | `turn` | 必需 | `number` | - + @@ -3588,16 +3734,16 @@ SHA-256: `6f72ece8f317cd080c4f20a93f1bf709965f5b81ac4669528f5a023191cfcf20` ### `Message` -SHA-256: `01bc74417fd4ff36c2840b266a5b3b51bf0e3b71eb43960a2c4aee7b7441a2aa` +SHA-256: `cc2968a9a0a95309a7d3218dcb0c55d153fe7b8c03b5648ea6fcc69d91a64a7f` -来源:[`packages/llm/llm/src/message.ts:180`](../packages/llm/llm/src/message.ts) +来源:[`packages/llm/llm/src/message.ts:190`](../packages/llm/llm/src/message.ts) 以下类型之一: - [`ToolResultMessage`](#persistence-type-sha256-8a8b1c3cf223fe58bbe45ea57f0b80eb262a653066dfe5683a648390ed91c13c) -- [`SystemMessage`](#persistence-type-sha256-abb8be1a8972c5531c513de95c678bac414263fb5e4bf6dcf871ca913f47bd94) +- [`UserMessage`](#persistence-type-sha256-980b8f7c2576a03df48bd09fd68000d88eaec6e99ca5bec36e6448401b8e3e95) - [`AssistantMessage`](#persistence-type-sha256-fd796823ba99092846b017e4a9c2d8ea5a1c8e15a3125662cadba1860ceb1b05) -- [`UserMessage`](#persistence-type-sha256-a48b761be36821fcf456c862e321284bdd879dd796d29d20b1766e0417f7c966) +- [`SystemMessage`](#persistence-type-sha256-20a3c1c8a3154e4ae69eada1212e3216baf93454ee4c745565b9374d7539fe8b) @@ -3672,7 +3818,7 @@ SHA-256: `390eed1028aba02774f14408647acec10ec5516e97d4f15ecde2b9989d5a69f2` - `"negative"` - `"positive"` - + @@ -3680,40 +3826,128 @@ SHA-256: `390eed1028aba02774f14408647acec10ec5516e97d4f15ecde2b9989d5a69f2` ### `MessageSource` -SHA-256: `4c965666d5b42116945bc356087cd5e1fd549e6dece560785ed60511059a8283` +SHA-256: `7aae986884b7f69068d9f9d7d77910a0dbe2b265843a041576877eb1bc01f31e` -来源:[`packages/llm/llm/src/message.ts:128`](../packages/llm/llm/src/message.ts) +来源:[`packages/llm/llm/src/message.ts:136`](../packages/llm/llm/src/message.ts) | kind | form 属性 | 其他必需字段 | 完整定义 | |---|---|---|---| | `agent-instructions` | `"instructions"` | `changes`: [`AgentInstructionChange[]`](#persistence-type-sha256-2ab12a0e345658f9342816d773fe610f049982bcad82631f43b9205abe43e5ee) | [`AgentInstructionSource`](#persistence-type-sha256-6f22a9d02b9a1f1157f3b0e7bdccd7e7b12b085c4efdb709dfc74a465cd4e590) | | `agent-message` | `"relay"` | `senderSessionId`: `string` | [`AgentMessageSource`](#persistence-type-sha256-4a9bef9f27a942520cc2279ca7dd3082556e4bff543f66b5c0333e1bbed1cd86) | +| `code-mode` | 未声明 | 无 | [`{ kind: "code-mode" }`](#persistence-type-sha256-b0fdf76590690063dff16e2ba5aa14cb6ed074b61980b3860c299c2e8efc7a1a) | +| `compact-checkpoint` | 未声明 | `compactionId`: `string` | [`CompactionCheckpointSource`](#persistence-type-sha256-31907de9563751822af6d9be02bafaf26faa098bbd1cb412524134d577cc1648) | +| `cordis-host-runner` | 未声明 | 无 | [`{ kind: "cordis-host-runner" }`](#persistence-type-sha256-02b2c23f2d94b028c9588a8faace3fce1217405db346da3389368b495457bf79) | +| `dsh-session-title-llm` | `"catalog"` | 无 | [`{ kind: "dsh-session-title-llm", form: "catalog" }`](#persistence-type-sha256-80677c8c8b804189a0fde8aa70dd4ad7af8bb12dfd03027e8e023c8592c838bc) | +| `dsh-session-title-llm` | `"instructions"` | 无 | [`{ kind: "dsh-session-title-llm", form: "instructions" }`](#persistence-type-sha256-224aa11d4d5f88c450822d01b99e6ca5e3a9c7f26a5ede10bae33384a09ef4dc) | +| `dsh-session-title-llm` | `"notice"` | `summary`: `string` | [`{ kind: "dsh-session-title-llm", form: "notice" }`](#persistence-type-sha256-8338ee303e2bd448e9e6144069942f63e3cfd5868962bddc9347d7009e8919d6) | +| `dsh-session-title-llm` | `"recall"` | 无 | [`{ kind: "dsh-session-title-llm", form: "recall" }`](#persistence-type-sha256-b2a5c8c008a31e3dc6c3013502f2356aca13894b31c8e70601fa92f2d40d1dba) | +| `dsh-session-title-llm` | `"relay"` | 无 | [`{ kind: "dsh-session-title-llm", form: "relay" }`](#persistence-type-sha256-7eaef7a763ba5b949b8464bc8add8980a3a5ab566014b69787aeba71e5dfe07b) | +| `dsh-session-title-llm` | `"snapshot"` | `sections`: [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | [`{ kind: "dsh-session-title-llm", form: "snapshot" }`](#persistence-type-sha256-ba4c40b4381e0dcdfab8fc9fc75b5c9b3e8f09ef56deeb1bec8e703b0ef8cd6d) | +| `dsh-session-title-llm` | 未声明 | 无 | [`{ kind: "dsh-session-title-llm" }`](#persistence-type-sha256-290f32bfd81ff85a8095886a8066fae06e885942b63a8bcd6a8d66d328445808) | | `goal` | 未声明 | `goalId`: `string`; `revision`: `number`; `round`: `number` | [`GoalMessageSource`](#persistence-type-sha256-7f959241c24128b4983b559984811861dc59774b85905c8fa57c6cb0148a3dbc) | +| `hooks-claude-code` | `"catalog"` | 无 | [`{ kind: "hooks-claude-code", form: "catalog" }`](#persistence-type-sha256-297fbd8067d7815adae02b89790ec6ff5fb7c2cb0d0eb026e1746c24ec857761) | +| `hooks-claude-code` | `"instructions"` | 无 | [`{ kind: "hooks-claude-code", form: "instructions" }`](#persistence-type-sha256-b70f3e81fe11b7a5f2504fb47a4502fb8d9c8f0731fdfe8ddcaf9b41f5a6e196) | +| `hooks-claude-code` | `"notice"` | `summary`: `string` | [`{ kind: "hooks-claude-code", form: "notice" }`](#persistence-type-sha256-edbbfff1128099fda7b792c56330d2cb04debc9790988e66d1c3f4026e813e0e) | +| `hooks-claude-code` | `"recall"` | 无 | [`{ kind: "hooks-claude-code", form: "recall" }`](#persistence-type-sha256-87b1a33564b9a4d63b00988a524c12259243953aebb9c9a05127d87b27464df9) | +| `hooks-claude-code` | `"relay"` | 无 | [`{ kind: "hooks-claude-code", form: "relay" }`](#persistence-type-sha256-6ea608bdc8a7a63d3d23b84c49721325094db88d136482e43a820945295eee3e) | +| `hooks-claude-code` | `"snapshot"` | `sections`: [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | [`{ kind: "hooks-claude-code", form: "snapshot" }`](#persistence-type-sha256-3bdb8dc6989655b0d4ec361edafb8e2629bc263e1ea591819414fdafc1a413b3) | +| `hooks-claude-code` | 未声明 | 无 | [`{ kind: "hooks-claude-code" }`](#persistence-type-sha256-0ed8d1108fe7a5e1c3078ef1faea12199a56b6b1216ccaceb0f6103b0c9a7691) | +| `hooks-codex` | `"catalog"` | 无 | [`{ kind: "hooks-codex", form: "catalog" }`](#persistence-type-sha256-99f0e98184709ad10f27bfdeaafb4457d9d2b413f402331764798cdb7d3cbe4d) | +| `hooks-codex` | `"instructions"` | 无 | [`{ kind: "hooks-codex", form: "instructions" }`](#persistence-type-sha256-b6f94c17dd9bbd7cd57015198b7c7c88407f0e3b89faab176ca3c11c3d864d3e) | +| `hooks-codex` | `"notice"` | `summary`: `string` | [`{ kind: "hooks-codex", form: "notice" }`](#persistence-type-sha256-854db3efdfb0cd39d30953b28703e519c121f1115cebfffc40369fe86c406dd1) | +| `hooks-codex` | `"recall"` | 无 | [`{ kind: "hooks-codex", form: "recall" }`](#persistence-type-sha256-3b4f2c9ef2c1217eac596c7b070173cb7896e2fae09e729bc7c56c801e56bb29) | +| `hooks-codex` | `"relay"` | 无 | [`{ kind: "hooks-codex", form: "relay" }`](#persistence-type-sha256-1fdad624334d354820dfb3a26e28d0bc9fc1b62a33f87bab63f715b3f4391bfd) | +| `hooks-codex` | `"snapshot"` | `sections`: [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | [`{ kind: "hooks-codex", form: "snapshot" }`](#persistence-type-sha256-88841202942c7683b3b7e5ea6a796047ec326b6701ac23e58cc236d85613b9fa) | +| `hooks-codex` | 未声明 | 无 | [`{ kind: "hooks-codex" }`](#persistence-type-sha256-b4ec0af39fd52ed971990e42f04e5be3204882e555c409eb330f8238eec21569) | | `model` | 未声明 | `model`: `string`; `provider`: `string` | [`ModelMessageSource`](#persistence-type-sha256-719c51f67074f97034a6c94297fe1f4b5d3c8d392c57586dab732aa5398c7a91) | -| `plugin` | `"catalog"` | `plugin`: `string` | [`{ kind: "plugin", form: "catalog" }`](#persistence-type-sha256-2f90a7b3646fea3e677bd7b4000aa96f3b8964f107b614e204e11ad4051c24fc) | -| `plugin` | `"instructions"` | `plugin`: `string` | [`{ kind: "plugin", form: "instructions" }`](#persistence-type-sha256-dda6e111a8ccfc12f6e742e977a1a4e3549e8c03732a5ff6c8d7c3d4bcb7a412) | -| `plugin` | `"notice"` | `plugin`: `string`; `summary`: `string` | [`{ kind: "plugin", form: "notice" }`](#persistence-type-sha256-b4d298d90c798fa4d1f5b030ce3ce8031c4c41beafdb05323bec8b2a06903b43) | -| `plugin` | `"recall"` | `plugin`: `string` | [`{ kind: "plugin", form: "recall" }`](#persistence-type-sha256-85e1bd563d6c80c1f377f99f91103fec4e315148a7330f3b3dae7c2d04e33b01) | -| `plugin` | `"relay"` | `plugin`: `string` | [`{ kind: "plugin", form: "relay" }`](#persistence-type-sha256-2ce7ef3b3daebf95815c7ae454a751d3e67ca7a22e2e0734fe2942df393bb66c) | -| `plugin` | `"snapshot"` | `plugin`: `string`; `sections`: [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | [`{ kind: "plugin", form: "snapshot" }`](#persistence-type-sha256-e8d26e6993445743e6c4342c31b284c7d8f5574369abdd6021183af1a6b3538f) | -| `plugin` | 未声明 | `plugin`: `string` | [`{ kind: "plugin" }`](#persistence-type-sha256-0ddab4577db37a3e0d9e3a91761735c8ef6f5629d526ab8ecaeeea19c097c8f8) | +| `model-selection` | `"catalog"` | 无 | [`{ kind: "model-selection", form: "catalog" }`](#persistence-type-sha256-99135d8a3937977955eaac5f8f04f930dcd1562f8450a54a51cde9b921dd59a6) | +| `model-selection` | `"instructions"` | 无 | [`{ kind: "model-selection", form: "instructions" }`](#persistence-type-sha256-f6605d6c57933aeaaf10911b5fbd6c61e655baa181af7192d3240f49d255b90d) | +| `model-selection` | `"notice"` | `summary`: `string` | [`{ kind: "model-selection", form: "notice" }`](#persistence-type-sha256-a3c6f1ea38e9a61d7a9706057ba65aabe02dfe6d9dd90d4736aa62325d874531) | +| `model-selection` | `"recall"` | 无 | [`{ kind: "model-selection", form: "recall" }`](#persistence-type-sha256-aae343bc3d663c83f2e8b5e1c7eea5d509dc7a5361bc8bd8b5ac3bb8d3b1ed56) | +| `model-selection` | `"relay"` | 无 | [`{ kind: "model-selection", form: "relay" }`](#persistence-type-sha256-a15a19ef63cf5d1b711db1d249821dab0cedcd3a9ad09137b47352c93841fd20) | +| `model-selection` | `"snapshot"` | `sections`: [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | [`{ kind: "model-selection", form: "snapshot" }`](#persistence-type-sha256-52c6113cb0e53f345324bf84f01928bea5d5df57ee80bc0dd65407b8bc5a3734) | +| `model-selection` | 未声明 | 无 | [`{ kind: "model-selection" }`](#persistence-type-sha256-f7283223aacdc39b0adca728c8cbd4c090a20006a6fecec74421c30e943b489c) | +| `plan-mode` | `"catalog"` | 无 | [`{ kind: "plan-mode", form: "catalog" }`](#persistence-type-sha256-3b04790e08b35241ffa0d38f6d7e4f8788aa921341f6c0d7574a329397c59408) | +| `plan-mode` | `"instructions"` | 无 | [`{ kind: "plan-mode", form: "instructions" }`](#persistence-type-sha256-408927267422a7b2beb6df354ff7c1406d929a5646554f48adf85eb8372f811c) | +| `plan-mode` | `"notice"` | `summary`: `string` | [`{ kind: "plan-mode", form: "notice" }`](#persistence-type-sha256-baccc97ec34be6c4c78e95aa88c85c29820269479445e5b13f956cd64c5e286f) | +| `plan-mode` | `"recall"` | 无 | [`{ kind: "plan-mode", form: "recall" }`](#persistence-type-sha256-f6329fb30c7ea8013e8975ca5e78284fb7685cc6bd620e8aa4e9a99bc81d45eb) | +| `plan-mode` | `"relay"` | 无 | [`{ kind: "plan-mode", form: "relay" }`](#persistence-type-sha256-deaae5cd30987d4f49398e8f9d994c125907e7f928300745fb1dbf15f145d0e7) | +| `plan-mode` | `"snapshot"` | `sections`: [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | [`{ kind: "plan-mode", form: "snapshot" }`](#persistence-type-sha256-8c1c4f72755a78ea163523a46565316e36e9b644382eb48e6635c71a6f412dd2) | +| `plan-mode` | 未声明 | 无 | [`{ kind: "plan-mode" }`](#persistence-type-sha256-f4a66f654996c093aae700ea4c434ff2ee3569fea9c0e5813ccf6afdccabd163) | +| `repeat-tool-reminder` | `"catalog"` | 无 | [`{ kind: "repeat-tool-reminder", form: "catalog" }`](#persistence-type-sha256-d85590a5675c6e2fd8164e5792a6cceac714605b8ac228adae5ee668facb1490) | +| `repeat-tool-reminder` | `"instructions"` | 无 | [`{ kind: "repeat-tool-reminder", form: "instructions" }`](#persistence-type-sha256-6f44f32be9bcd9a8bf075c3b575b06c8ed63446386e5b0995c7b73762e68ddae) | +| `repeat-tool-reminder` | `"notice"` | `summary`: `string` | [`{ kind: "repeat-tool-reminder", form: "notice" }`](#persistence-type-sha256-fe1a7acdeed4d0f5ab483396eaa5b3dc97263b7c10eb4da2f0028cb01728bfc9) | +| `repeat-tool-reminder` | `"recall"` | 无 | [`{ kind: "repeat-tool-reminder", form: "recall" }`](#persistence-type-sha256-8620189c8e33582708ece48fd2d20dc4d57912486a17bdbb9aea4c44f7018062) | +| `repeat-tool-reminder` | `"relay"` | 无 | [`{ kind: "repeat-tool-reminder", form: "relay" }`](#persistence-type-sha256-4991dfc415c9efebc36fa6969e1798c7d2e42396cc1e6e0ac7d7c89c5c5c4aea) | +| `repeat-tool-reminder` | `"snapshot"` | `sections`: [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | [`{ kind: "repeat-tool-reminder", form: "snapshot" }`](#persistence-type-sha256-db06ef35b27a38425046b2228fa6bce9582abe140d781d363137eb2f4d233a1c) | +| `repeat-tool-reminder` | 未声明 | 无 | [`{ kind: "repeat-tool-reminder" }`](#persistence-type-sha256-b062078e899958f99ae464514578b8c093924dfe34bd9a835932b420ff2150b1) | +| `runtime-context` | `"catalog"` | 无 | [`{ kind: "runtime-context", form: "catalog" }`](#persistence-type-sha256-58015da1c1950a66daf66ae24913d6a1fc6d1d9ac441b155f8847f7f8584ba8e) | +| `runtime-context` | `"instructions"` | 无 | [`{ kind: "runtime-context", form: "instructions" }`](#persistence-type-sha256-0eeb17e1df89b1ebc2902116fe7145e0d321ef0db26e6bdebc802cb8513a01c1) | +| `runtime-context` | `"notice"` | `summary`: `string` | [`{ kind: "runtime-context", form: "notice" }`](#persistence-type-sha256-cda2345a9be9d139df49ccbd16dcba716f3440178bf20ff8b801fda1f5eb77dc) | +| `runtime-context` | `"recall"` | 无 | [`{ kind: "runtime-context", form: "recall" }`](#persistence-type-sha256-96bfb916a727cd4445a594df264c523fc039749a31bfed924b8cc7bb308a5bb0) | +| `runtime-context` | `"relay"` | 无 | [`{ kind: "runtime-context", form: "relay" }`](#persistence-type-sha256-cb1c8959e1726f82f9a3d2ef2bc90bf8c451a98fd56175e956022124c770c818) | +| `runtime-context` | `"snapshot"` | `sections`: [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | [`{ kind: "runtime-context", form: "snapshot" }`](#persistence-type-sha256-2aad1179f957631477b582e57cd8f538cb82618fc3fb816bde1171154235b065) | +| `runtime-context` | 未声明 | 无 | [`{ kind: "runtime-context" }`](#persistence-type-sha256-0203243b72fc867afc81aff5f4cf2167e564ed342534eb612fc92f295cf07789) | +| `schedule` | `"catalog"` | 无 | [`{ kind: "schedule", form: "catalog" }`](#persistence-type-sha256-1e709346005826eb81809eeb76a3f713cf13ad6c5cec75146d07020ab9adc938) | +| `schedule` | `"instructions"` | 无 | [`{ kind: "schedule", form: "instructions" }`](#persistence-type-sha256-1938c8c20f1cba7c82dbedcfa4f14c3ee191cd77ed3314ee1fc676d44cadf3be) | +| `schedule` | `"notice"` | `summary`: `string` | [`{ kind: "schedule", form: "notice" }`](#persistence-type-sha256-312aee2f0c42aabbae6cc60d92d596d8453c0aeb061c5868d1755a69ef49e69a) | +| `schedule` | `"recall"` | 无 | [`{ kind: "schedule", form: "recall" }`](#persistence-type-sha256-a16e567c8cd2c55cf1e911aed3c200c4e1f6febb1459ff2a9e7adf159afb68cb) | +| `schedule` | `"relay"` | 无 | [`{ kind: "schedule", form: "relay" }`](#persistence-type-sha256-5bc66269cfaf614c0ecda8ecb469f23101a7609793fc2b693ac23c4aecdb575e) | +| `schedule` | `"snapshot"` | `sections`: [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | [`{ kind: "schedule", form: "snapshot" }`](#persistence-type-sha256-28936c614bd4e7e2774806edcbb3cbfd3ee643ac1cbf0bbdff43d915505a8fe3) | +| `schedule` | 未声明 | 无 | [`{ kind: "schedule" }`](#persistence-type-sha256-f29d63336e8266d80dd7baeab219436db86341304f6be1cd0edb36f5134c4a47) | | `session-reference` | `"recall"` | `references`: [`{ capturedFormatVersion?, capturedThroughSeq, compacted, inputIndex, … }[]`](#persistence-type-sha256-df843efd87c78cf8de98f8e0d0216956cd568d0d0e56a22c853663e274aa1a18); `version`: `1` | [`SessionReferenceSource`](#persistence-type-sha256-f56c5b59ca0161310c338d31dd16cf14287ccd602ff4181058df178c1c286d7f) | | `skill-catalog` | `"catalog"` | `entries`: [`{ description, name }[]`](#persistence-type-sha256-aba175fb20ffc71112c55efe70458ff5d7dbfb83501892b4ba8d077f0ea5d7ba) | [`SkillCatalogSource`](#persistence-type-sha256-fc2ae6962f9f8801c2b1e414668e1e17cbb7544c4f39381198977a38bd10c093) | | `skill-invocation` | `"instructions"` | `name`: `string` | [`SkillInvocationSource`](#persistence-type-sha256-672c4aa2a9b736e3d6e5da6346d2e2ed5e3573f2d0baafa18e7407c9f3fee3db) | | `subagent-settled` | `"notice"` | `senderSessionId`: `string`; `summary`: `string` | [`SubagentSettledMessageSource`](#persistence-type-sha256-4e97c3d85c0fc817ee58873c38c25a2474abaaa0af4839311b50b68db3b8cf1a) | +| `system-prompt` | 未声明 | 无 | [`SystemPromptMessageSource`](#persistence-type-sha256-65a8400e451e667e5b6e34df72ceb81fca8c12330330fa72083ad40279b189ad) | | `team-message` | 未声明 | `messageId`: `string`; `senderId`: `string`; `senderName`: `string`; `teamId`: `string` | [`TeamMessageSource`](#persistence-type-sha256-2152caf1a71e588e4df2358a806dea24936c1c47131134f01a12939d12cdc0c0) | +| `time-context` | `"catalog"` | 无 | [`{ kind: "time-context", form: "catalog" }`](#persistence-type-sha256-85fe96bf15d5c7559eec3bae4d6cf1a76fda9f5be05a29c2830cff560cab0c0d) | +| `time-context` | `"instructions"` | 无 | [`{ kind: "time-context", form: "instructions" }`](#persistence-type-sha256-f6afe41e3926f422fe849debe90819fddd739f0f59e20be9c71018b9554a7f09) | +| `time-context` | `"notice"` | `summary`: `string` | [`{ kind: "time-context", form: "notice" }`](#persistence-type-sha256-ee577a0cc18664c9daee50e9455153321155604f8f1817362f8f4a4b6fb9e1ad) | +| `time-context` | `"recall"` | 无 | [`{ kind: "time-context", form: "recall" }`](#persistence-type-sha256-756b5e23a5cb2c7f486f366a828f7461c88902af21125bd6810881f4ccbff6cc) | +| `time-context` | `"relay"` | 无 | [`{ kind: "time-context", form: "relay" }`](#persistence-type-sha256-5d7a64ed6aac5551ebf998dc25e1e7b48a144769913f89702840180e61dc3995) | +| `time-context` | `"snapshot"` | `sections`: [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | [`{ kind: "time-context", form: "snapshot" }`](#persistence-type-sha256-f230c0b583e23b25ee0a61dbe4c05e95c1e2ae44b27939501eb9e03696f0c278) | +| `time-context` | 未声明 | 无 | [`{ kind: "time-context" }`](#persistence-type-sha256-b79641a9d25e756636dc0c706fdf3c4583ccb7d4920e009e6e86c0759cf4de4c) | +| `tmux-context` | `"catalog"` | 无 | [`{ kind: "tmux-context", form: "catalog" }`](#persistence-type-sha256-7df62978a2b7de8540e714152297743e0a622209a46a5ac9513fc0fad73ca23b) | +| `tmux-context` | `"instructions"` | 无 | [`{ kind: "tmux-context", form: "instructions" }`](#persistence-type-sha256-9f65c43e340bba31cdc0fc37bd93ccb68d5e9b36f47a68c207e95a8e68620a5d) | +| `tmux-context` | `"notice"` | `summary`: `string` | [`{ kind: "tmux-context", form: "notice" }`](#persistence-type-sha256-b3681c026a0b98e98b103f057dfd217fbe904129c090efd668253ec9aea7fece) | +| `tmux-context` | `"recall"` | 无 | [`{ kind: "tmux-context", form: "recall" }`](#persistence-type-sha256-fcf81d3c58c13593bf2594e342e31734f4ab2d24938dc610875194c6079749c7) | +| `tmux-context` | `"relay"` | 无 | [`{ kind: "tmux-context", form: "relay" }`](#persistence-type-sha256-f97f47b0eb87905ed77cc27c5e4ed75ef805cb372c98905253709de1aab9b63c) | +| `tmux-context` | `"snapshot"` | `sections`: [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | [`{ kind: "tmux-context", form: "snapshot" }`](#persistence-type-sha256-49dab019d00e8c26f27ad2ccff7b604d69e323ae4d17e0d2a7b6b8a830b1ade2) | +| `tmux-context` | 未声明 | 无 | [`{ kind: "tmux-context" }`](#persistence-type-sha256-8a046b52331959aa3394680d6acbe09b8a5447c6b61375f263445bfcef19b7f1) | | `tool` | 未声明 | `callId`: `string` | [`ToolMessageSource`](#persistence-type-sha256-d9c462b9f62fdd3efc76a44b9524dc8781f6b91cd9c7e584b17d971defafebab) | +| `tool-goal` | `"catalog"` | 无 | [`{ kind: "tool-goal", form: "catalog" }`](#persistence-type-sha256-260523b412c19ad8c2bb00093b07f64245ff8ba6b2f76c5b545303772ac9704c) | +| `tool-goal` | `"instructions"` | 无 | [`{ kind: "tool-goal", form: "instructions" }`](#persistence-type-sha256-6085488d223aeffdef51d7ae17655fc26ab22ee13cbed82a50e62e2b6fb5b918) | +| `tool-goal` | `"notice"` | `summary`: `string` | [`{ kind: "tool-goal", form: "notice" }`](#persistence-type-sha256-8c627d7a45fa406cea879a3922105e27ed4c3c7966e264afaf11ea7a330f2dd1) | +| `tool-goal` | `"recall"` | 无 | [`{ kind: "tool-goal", form: "recall" }`](#persistence-type-sha256-7554565be416b0342053ee6a46256c9dab07c487349b4a5f10bab1edc151c619) | +| `tool-goal` | `"relay"` | 无 | [`{ kind: "tool-goal", form: "relay" }`](#persistence-type-sha256-8f324cea3916c0517261e88167def8efb3a9994c1135e23d40ed9fd48f8c7bd4) | +| `tool-goal` | `"snapshot"` | `sections`: [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | [`{ kind: "tool-goal", form: "snapshot" }`](#persistence-type-sha256-11638dc58a31496fb6706ced3e23e3a2db1f3b2a8845968c810827a72b5fc811) | +| `tool-goal` | 未声明 | 无 | [`{ kind: "tool-goal" }`](#persistence-type-sha256-a2066bd52f61218ba15b758def2641cc6a8bd3d4a594a488ee4c65be356d7e39) | +| `tool-jobs` | `"catalog"` | 无 | [`{ kind: "tool-jobs", form: "catalog" }`](#persistence-type-sha256-dd5ee8762bd8a14b6c6bffedd1753e4e78505bb0f9ea1621018d03a54eef59d5) | +| `tool-jobs` | `"instructions"` | 无 | [`{ kind: "tool-jobs", form: "instructions" }`](#persistence-type-sha256-53cf1704ae0709c7678bcf070c83c619fc48ca1b5c173b74cfa8702f22a8e492) | +| `tool-jobs` | `"notice"` | `summary`: `string` | [`{ kind: "tool-jobs", form: "notice" }`](#persistence-type-sha256-5bb69b88517f6214f2af4d1a6d2b771e271ad3ad695cc9c2c272069ae698c9bc) | +| `tool-jobs` | `"recall"` | 无 | [`{ kind: "tool-jobs", form: "recall" }`](#persistence-type-sha256-dd6cc2bb2a8f28248347021ad93565360b196a042360b4cd16b569d3a2a91f2d) | +| `tool-jobs` | `"relay"` | 无 | [`{ kind: "tool-jobs", form: "relay" }`](#persistence-type-sha256-ade057f4fdc387aec6426f48704a1f9359cfc6fee13f27735b07f9b215ec16ca) | +| `tool-jobs` | `"snapshot"` | `sections`: [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | [`{ kind: "tool-jobs", form: "snapshot" }`](#persistence-type-sha256-c5228b7a55498d84f529591744a0ab26e0b93ade18a70a26db1377a1ecfa6b49) | +| `tool-jobs` | 未声明 | 无 | [`{ kind: "tool-jobs" }`](#persistence-type-sha256-24ce31aa528272e59f21cd26da9eca08968bcc97529756a749bfdab71746d9c8) | | `user` | 未声明 | `rpcId`: `string` | [`{ kind: "user" }`](#persistence-type-sha256-6a4f72e2e179e17b922f2a9392c0e1c8f8c707f32494372454850a3eb184a6e7) | | `user` | 未声明 | 无 | [`CommandSource`](#persistence-type-sha256-ada310bf0bdb8fed51f3b56ea63f6ea6b18bbd587f04fccb63a14ab0b2a24e05) | +| `user-approval` | `"catalog"` | 无 | [`{ kind: "user-approval", form: "catalog" }`](#persistence-type-sha256-825ca23416b1ea9d81442afead5cf9229a6fa05842f042135cc3aa9710a6a2d8) | +| `user-approval` | `"instructions"` | 无 | [`{ kind: "user-approval", form: "instructions" }`](#persistence-type-sha256-aa2bf9e82b9fdeb94a42af20031fffa30e4e23f01f4ac39757427d4c64c407f0) | +| `user-approval` | `"notice"` | `summary`: `string` | [`{ kind: "user-approval", form: "notice" }`](#persistence-type-sha256-6ccb6bc423fb3952458abf9c1b1c3284208b7e660344b612cc55da773d61afe4) | +| `user-approval` | `"recall"` | 无 | [`{ kind: "user-approval", form: "recall" }`](#persistence-type-sha256-022623b9ef98ec47ec3c3bae0c51027c70d2601141c5e92e26a0d83d1b4cef06) | +| `user-approval` | `"relay"` | 无 | [`{ kind: "user-approval", form: "relay" }`](#persistence-type-sha256-5cdbf342b7748d152bc987b68f58e565e5bba4b227e076e2d2120d87662e45cd) | +| `user-approval` | `"snapshot"` | `sections`: [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | [`{ kind: "user-approval", form: "snapshot" }`](#persistence-type-sha256-5654685d7557ec747e74887237065e626a5bdfa426ca43f7fbb0b6fee9b0916c) | +| `user-approval` | 未声明 | 无 | [`{ kind: "user-approval" }`](#persistence-type-sha256-6292bcbedaa97feaec5b48a03bb8144b581b93309d9d6c905f26da7a6a7a0a4f) | | `webhook` | `"notice"` | `deliveryId`: `string`; `provider`: `string`; `ruleId`: `string`; `source`: `string`; `summary`: `string` | [`{ kind: "webhook", form: "notice" }`](#persistence-type-sha256-9edc162949abf93bd5ff049191b345454ba104f583937ce5580fb50f067d2b94) | - + ### `Message[]` -SHA-256: `ff5bcfe90a83f6e773ae72b3ec775c5af8339df8a1dbe561e8147b56bc994fdc` +SHA-256: `531c1bf918d4ce9eeb8a51d32484587bc77a62e5806d8c29e64040fcafd6517e` -[`Message`](#persistence-type-sha256-01bc74417fd4ff36c2840b266a5b3b51bf0e3b71eb43960a2c4aee7b7441a2aa) 的数组。 +[`Message`](#persistence-type-sha256-cc2968a9a0a95309a7d3218dcb0c55d153fe7b8c03b5648ea6fcc69d91a64a7f) 的数组。 @@ -4098,7 +4332,7 @@ SHA-256: `b56f6a885da3dc394c69a3e3cc5c0cfc4da15601b63fda4989eee8f40efc5be4` | `source` | 必需 | [`SessionTitleSource`](#persistence-type-sha256-30d5a537b296685770b1241c4b4bbde19d5a31ff81aa23df73fab5e90b8fc65f) | | `title` | 必需 | `string` | - + @@ -4106,15 +4340,15 @@ SHA-256: `b56f6a885da3dc394c69a3e3cc5c0cfc4da15601b63fda4989eee8f40efc5be4` ### `SessionTitleLlmRequestEventData` -SHA-256: `1b78e3a578a7e6d29d9564a9f5d236c2ebdcf682dbeb7b50400d8850e313b518` +SHA-256: `608866d72de8327687e3730cb213d57cf8485012419673de9e5765f4a71f7f2d` -来源:[`packages/session/session-title-llm/src/index.ts:27`](../packages/session/session-title-llm/src/index.ts) +来源:[`packages/session/session-title-llm/src/index.ts:34`](../packages/session/session-title-llm/src/index.ts) | 属性 | 存在性 | 类型 | |---|---|---| | `maxTokens` | 必需 | `number` | | `messageSeqs` | 必需 | [`number[]`](#persistence-type-sha256-5d03ba38734809bcbd2a55221bd938b3b3fc34b49bb686c6113e9e4931e3aa78) | -| `messages` | 必需 | [`Message[]`](#persistence-type-sha256-ff5bcfe90a83f6e773ae72b3ec775c5af8339df8a1dbe561e8147b56bc994fdc) | +| `messages` | 必需 | [`Message[]`](#persistence-type-sha256-531c1bf918d4ce9eeb8a51d32484587bc77a62e5806d8c29e64040fcafd6517e) | | `route` | 必需 | [`SessionTitleModelIdentity`](#persistence-type-sha256-07e1a58c58b593f507b8e7f25723bb0aa42baae6e00f5ecfddf28cb1e64d3235) | | `system` | 必需 | `string` | | `titleProvider` | 必需 | `string` | @@ -4295,7 +4529,7 @@ SHA-256: `335e242de1fcc17b6ca920fc420d71bec2d76e53e37955c00948b65ab77f05c5` - `"append"` - [`{ endSeq, op, startSeq }`](#persistence-type-sha256-bcf0caf62d964b2fcf5404bd5c909cfa9a21c3f3c96e6b7e36d9e33565223825) - + @@ -4303,16 +4537,32 @@ SHA-256: `335e242de1fcc17b6ca920fc420d71bec2d76e53e37955c00948b65ab77f05c5` ### `SystemMessage` -SHA-256: `abb8be1a8972c5531c513de95c678bac414263fb5e4bf6dcf871ca913f47bd94` +SHA-256: `20a3c1c8a3154e4ae69eada1212e3216baf93454ee4c745565b9374d7539fe8b` -来源:[`packages/llm/llm/src/message.ts:141`](../packages/llm/llm/src/message.ts) +来源:[`packages/llm/llm/src/message.ts:151`](../packages/llm/llm/src/message.ts) | 属性 | 存在性 | 类型 | |---|---|---| | `content` | 必需 | [`ContentBlock[]`](#persistence-type-sha256-a951a47d0ebf7d7ac401d1ec2fe4e138a43288c5ad2b0cf029a90b97d718f1e6) | | `id` | 必需 | `string` | | `role` | 必需 | `"system"` | -| `source` | 必需 | [`union (7 variants)`](#persistence-type-sha256-23cf7e0cf3fec1283b60fa15713506169bc9c079a08e124d1cb9733baca80b40) | +| `source` | 必需 | [`SystemPromptMessageSource`](#persistence-type-sha256-65a8400e451e667e5b6e34df72ceb81fca8c12330330fa72083ad40279b189ad) | + + + + + + + +### `SystemPromptMessageSource` + +SHA-256: `65a8400e451e667e5b6e34df72ceb81fca8c12330330fa72083ad40279b189ad` + +来源:[`packages/llm/llm/src/message.ts:35`](../packages/llm/llm/src/message.ts) + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `kind` | 必需 | `"system-prompt"` | @@ -4562,7 +4812,7 @@ SHA-256: `3cfc3a56502da1f8c6153c2c56657bab4b749056968634dd0991d325ec1c919f` SHA-256: `8a8b1c3cf223fe58bbe45ea57f0b80eb262a653066dfe5683a648390ed91c13c` -来源:[`packages/llm/llm/src/message.ts:158`](../packages/llm/llm/src/message.ts) +来源:[`packages/llm/llm/src/message.ts:168`](../packages/llm/llm/src/message.ts) | 属性 | 存在性 | 类型 | |---|---|---| @@ -4713,7 +4963,7 @@ SHA-256: `f1687f982fa3d41ef29e159feed154ecd13af4dd209acaee16038f223f2e9402` | `interrupted` | 未声明 | 无 | [`{ kind: "interrupted" }`](#persistence-type-sha256-56b7c047694875a843ba020dfea3c8380d54ae4ff88ab349e72004dc21e07c23) | | `max-tokens` | 未声明 | 无 | [`{ kind: "max-tokens" }`](#persistence-type-sha256-ab7ec5f9eb2c6dfacca5da4c37cf7ba85d04172053ee6b1ebf1709ffcd99c1a7) | - + @@ -4721,24 +4971,28 @@ SHA-256: `f1687f982fa3d41ef29e159feed154ecd13af4dd209acaee16038f223f2e9402` ### `UserMessage` -SHA-256: `a48b761be36821fcf456c862e321284bdd879dd796d29d20b1766e0417f7c966` +SHA-256: `980b8f7c2576a03df48bd09fd68000d88eaec6e99ca5bec36e6448401b8e3e95` -来源:[`packages/llm/llm/src/message.ts:147`](../packages/llm/llm/src/message.ts) +来源:[`packages/llm/llm/src/message.ts:157`](../packages/llm/llm/src/message.ts) | 属性 | 存在性 | 类型 | |---|---|---| | `content` | 必需 | [`ContentBlock[]`](#persistence-type-sha256-a951a47d0ebf7d7ac401d1ec2fe4e138a43288c5ad2b0cf029a90b97d718f1e6) | | `id` | 必需 | `string` | | `role` | 必需 | `"user"` | -| `source` | 必需 | [`MessageSource`](#persistence-type-sha256-4c965666d5b42116945bc356087cd5e1fd549e6dece560785ed60511059a8283) | +| `source` | 必需 | [`MessageSource`](#persistence-type-sha256-7aae986884b7f69068d9f9d7d77910a0dbe2b265843a041576877eb1bc01f31e) | - +消息源兼容策略:`source` — `session-source-attribution` v1; `session.user-message.source`; `kind`; `preserve`. + +仅表示归属的新增 kind:`tmux-context`. + + ### `UserMessage[]` -SHA-256: `71225015514ed0439df95fc6e55719e1fa30bd205b99a7eefb7e18152be835ea` +SHA-256: `fc336025695a2213c63d0fe8715307c6a6ede867713bbf2ab1c8ff9760fdee1f` -[`UserMessage`](#persistence-type-sha256-a48b761be36821fcf456c862e321284bdd879dd796d29d20b1766e0417f7c966) 的数组。 +[`UserMessage`](#persistence-type-sha256-980b8f7c2576a03df48bd09fd68000d88eaec6e99ca5bec36e6448401b8e3e95) 的数组。 @@ -5062,22 +5316,6 @@ SHA-256: `62e6a429ff3f390a46ac39fb468692032f42936ca0db19b53454184189401379` - `"pause"` - `"resume"` - - -### `union (7 variants)` - -SHA-256: `23cf7e0cf3fec1283b60fa15713506169bc9c079a08e124d1cb9733baca80b40` - -| kind | form 属性 | 其他必需字段 | 完整定义 | -|---|---|---|---| -| `plugin` | `"catalog"` | `plugin`: `string` | [`{ kind: "plugin", form: "catalog" }`](#persistence-type-sha256-2f90a7b3646fea3e677bd7b4000aa96f3b8964f107b614e204e11ad4051c24fc) | -| `plugin` | `"instructions"` | `plugin`: `string` | [`{ kind: "plugin", form: "instructions" }`](#persistence-type-sha256-dda6e111a8ccfc12f6e742e977a1a4e3549e8c03732a5ff6c8d7c3d4bcb7a412) | -| `plugin` | `"notice"` | `plugin`: `string`; `summary`: `string` | [`{ kind: "plugin", form: "notice" }`](#persistence-type-sha256-b4d298d90c798fa4d1f5b030ce3ce8031c4c41beafdb05323bec8b2a06903b43) | -| `plugin` | `"recall"` | `plugin`: `string` | [`{ kind: "plugin", form: "recall" }`](#persistence-type-sha256-85e1bd563d6c80c1f377f99f91103fec4e315148a7330f3b3dae7c2d04e33b01) | -| `plugin` | `"relay"` | `plugin`: `string` | [`{ kind: "plugin", form: "relay" }`](#persistence-type-sha256-2ce7ef3b3daebf95815c7ae454a751d3e67ca7a22e2e0734fe2942df393bb66c) | -| `plugin` | `"snapshot"` | `plugin`: `string`; `sections`: [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | [`{ kind: "plugin", form: "snapshot" }`](#persistence-type-sha256-e8d26e6993445743e6c4342c31b284c7d8f5574369abdd6021183af1a6b3538f) | -| `plugin` | 未声明 | `plugin`: `string` | [`{ kind: "plugin" }`](#persistence-type-sha256-0ddab4577db37a3e0d9e3a91761735c8ef6f5629d526ab8ecaeeea19c097c8f8) | - ### `union (7 variants)` @@ -5116,7 +5354,7 @@ SHA-256: `b1664fa89f8eab49a14e7e3168d8bc4da4aa9fd76332f6c4a053d839e5276ae7` SHA-256: `20a57544bbf204dacd1ae6beb2ab29444365c3c869f2afdf489dcdcbc3d9c8c5` -来源:[`packages/plan/plan-mode/src/index.ts:47`](../packages/plan/plan-mode/src/index.ts) +来源:[`packages/plan/plan-mode/src/index.ts:53`](../packages/plan/plan-mode/src/index.ts) | 属性 | 存在性 | 类型 | |---|---|---| @@ -5635,17 +5873,17 @@ SHA-256: `17d1afb770d9941936130996da00dc86782cfef731d8d6526162c301256a4ac3` |---|---|---| | `inherited` | 可选 | `true` | - + ### `{ inserted, outcome?, removedCount?, start, … }` -SHA-256: `6f87000576a13d73867248c97e55c4ebe3cb3ee55ee3bd1282f26e7f40dd81c8` +SHA-256: `37af4fdde18eb8638d5037243e0ee1c617b9b1062ae9dbee086feafad852112f` 来源:[`packages/core/agent/src/types.ts:87`](../packages/core/agent/src/types.ts) | 属性 | 存在性 | 类型 | |---|---|---| -| `inserted` | 必需 | [`UserMessage[]`](#persistence-type-sha256-71225015514ed0439df95fc6e55719e1fa30bd205b99a7eefb7e18152be835ea) | +| `inserted` | 必需 | [`UserMessage[]`](#persistence-type-sha256-fc336025695a2213c63d0fe8715307c6a6ede867713bbf2ab1c8ff9760fdee1f) | | `outcome` | 可选 | `"canceled"` | | `removedCount` | 可选 | `number` | | `start` | 必需 | `number` | @@ -5693,6 +5931,18 @@ SHA-256: `023a355b2be0d688fb6e4df8388dadb942761d46cfe96d0f499aae9631a159d4` |---|---|---| | `kind` | 必需 | `"blocked"` | + + +### `{ kind: "code-mode" }` + +SHA-256: `b0fdf76590690063dff16e2ba5aa14cb6ed074b61980b3860c299c2e8efc7a1a` + +来源:[`packages/core/tools/src/ptc.ts:13`](../packages/core/tools/src/ptc.ts) + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `kind` | 必需 | `"code-mode"` | + ### `{ kind: "completed" }` @@ -5705,6 +5955,18 @@ SHA-256: `b6ef9c6210be8350cd465f485cf520031fffa6bf3809c61a1e713e834c5982d0` |---|---|---| | `kind` | 必需 | `"completed"` | + + +### `{ kind: "cordis-host-runner" }` + +SHA-256: `02b2c23f2d94b028c9588a8faace3fce1217405db346da3389368b495457bf79` + +来源:[`packages/extensions/cordis-host-runner/src/index.ts:14`](../packages/extensions/cordis-host-runner/src/index.ts) + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `kind` | 必需 | `"cordis-host-runner"` | + ### `{ kind: "disposed" }` @@ -5717,6 +5979,84 @@ SHA-256: `4bb451330ff699f36b45539ceb0eb2606ead72084e2c5bb637c36cc80e2252db` |---|---|---| | `kind` | 必需 | `"disposed"` | + + +### `{ kind: "dsh-session-title-llm" }` + +SHA-256: `290f32bfd81ff85a8095886a8066fae06e885942b63a8bcd6a8d66d328445808` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `kind` | 必需 | `"dsh-session-title-llm"` | + + + +### `{ kind: "dsh-session-title-llm", form: "catalog" }` + +SHA-256: `80677c8c8b804189a0fde8aa70dd4ad7af8bb12dfd03027e8e023c8592c838bc` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"catalog"` | +| `kind` | 必需 | `"dsh-session-title-llm"` | + + + +### `{ kind: "dsh-session-title-llm", form: "instructions" }` + +SHA-256: `224aa11d4d5f88c450822d01b99e6ca5e3a9c7f26a5ede10bae33384a09ef4dc` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"instructions"` | +| `kind` | 必需 | `"dsh-session-title-llm"` | + + + +### `{ kind: "dsh-session-title-llm", form: "notice" }` + +SHA-256: `8338ee303e2bd448e9e6144069942f63e3cfd5868962bddc9347d7009e8919d6` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"notice"` | +| `kind` | 必需 | `"dsh-session-title-llm"` | +| `summary` | 必需 | `string` | + + + +### `{ kind: "dsh-session-title-llm", form: "recall" }` + +SHA-256: `b2a5c8c008a31e3dc6c3013502f2356aca13894b31c8e70601fa92f2d40d1dba` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"recall"` | +| `kind` | 必需 | `"dsh-session-title-llm"` | + + + +### `{ kind: "dsh-session-title-llm", form: "relay" }` + +SHA-256: `7eaef7a763ba5b949b8464bc8add8980a3a5ab566014b69787aeba71e5dfe07b` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"relay"` | +| `kind` | 必需 | `"dsh-session-title-llm"` | + + + +### `{ kind: "dsh-session-title-llm", form: "snapshot" }` + +SHA-256: `ba4c40b4381e0dcdfab8fc9fc75b5c9b3e8f09ef56deeb1bec8e703b0ef8cd6d` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"snapshot"` | +| `kind` | 必需 | `"dsh-session-title-llm"` | +| `sections` | 必需 | [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | + ### `{ kind: "fallback" }` @@ -5754,6 +6094,162 @@ SHA-256: `6c5a37d42ebdb12db4410699259335f1e149e3a0260425684c00b153afc8990d` | `kind` | 必需 | `"hook"` | | `reason` | 必需 | `string` | + + +### `{ kind: "hooks-claude-code" }` + +SHA-256: `0ed8d1108fe7a5e1c3078ef1faea12199a56b6b1216ccaceb0f6103b0c9a7691` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `kind` | 必需 | `"hooks-claude-code"` | + + + +### `{ kind: "hooks-claude-code", form: "catalog" }` + +SHA-256: `297fbd8067d7815adae02b89790ec6ff5fb7c2cb0d0eb026e1746c24ec857761` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"catalog"` | +| `kind` | 必需 | `"hooks-claude-code"` | + + + +### `{ kind: "hooks-claude-code", form: "instructions" }` + +SHA-256: `b70f3e81fe11b7a5f2504fb47a4502fb8d9c8f0731fdfe8ddcaf9b41f5a6e196` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"instructions"` | +| `kind` | 必需 | `"hooks-claude-code"` | + + + +### `{ kind: "hooks-claude-code", form: "notice" }` + +SHA-256: `edbbfff1128099fda7b792c56330d2cb04debc9790988e66d1c3f4026e813e0e` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"notice"` | +| `kind` | 必需 | `"hooks-claude-code"` | +| `summary` | 必需 | `string` | + + + +### `{ kind: "hooks-claude-code", form: "recall" }` + +SHA-256: `87b1a33564b9a4d63b00988a524c12259243953aebb9c9a05127d87b27464df9` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"recall"` | +| `kind` | 必需 | `"hooks-claude-code"` | + + + +### `{ kind: "hooks-claude-code", form: "relay" }` + +SHA-256: `6ea608bdc8a7a63d3d23b84c49721325094db88d136482e43a820945295eee3e` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"relay"` | +| `kind` | 必需 | `"hooks-claude-code"` | + + + +### `{ kind: "hooks-claude-code", form: "snapshot" }` + +SHA-256: `3bdb8dc6989655b0d4ec361edafb8e2629bc263e1ea591819414fdafc1a413b3` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"snapshot"` | +| `kind` | 必需 | `"hooks-claude-code"` | +| `sections` | 必需 | [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | + + + +### `{ kind: "hooks-codex" }` + +SHA-256: `b4ec0af39fd52ed971990e42f04e5be3204882e555c409eb330f8238eec21569` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `kind` | 必需 | `"hooks-codex"` | + + + +### `{ kind: "hooks-codex", form: "catalog" }` + +SHA-256: `99f0e98184709ad10f27bfdeaafb4457d9d2b413f402331764798cdb7d3cbe4d` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"catalog"` | +| `kind` | 必需 | `"hooks-codex"` | + + + +### `{ kind: "hooks-codex", form: "instructions" }` + +SHA-256: `b6f94c17dd9bbd7cd57015198b7c7c88407f0e3b89faab176ca3c11c3d864d3e` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"instructions"` | +| `kind` | 必需 | `"hooks-codex"` | + + + +### `{ kind: "hooks-codex", form: "notice" }` + +SHA-256: `854db3efdfb0cd39d30953b28703e519c121f1115cebfffc40369fe86c406dd1` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"notice"` | +| `kind` | 必需 | `"hooks-codex"` | +| `summary` | 必需 | `string` | + + + +### `{ kind: "hooks-codex", form: "recall" }` + +SHA-256: `3b4f2c9ef2c1217eac596c7b070173cb7896e2fae09e729bc7c56c801e56bb29` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"recall"` | +| `kind` | 必需 | `"hooks-codex"` | + + + +### `{ kind: "hooks-codex", form: "relay" }` + +SHA-256: `1fdad624334d354820dfb3a26e28d0bc9fc1b62a33f87bab63f715b3f4391bfd` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"relay"` | +| `kind` | 必需 | `"hooks-codex"` | + + + +### `{ kind: "hooks-codex", form: "snapshot" }` + +SHA-256: `88841202942c7683b3b7e5ea6a796047ec326b6701ac23e58cc236d85613b9fa` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"snapshot"` | +| `kind` | 必需 | `"hooks-codex"` | +| `sections` | 必需 | [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | + ### `{ kind: "interrupted" }` @@ -5790,6 +6286,84 @@ SHA-256: `ab7ec5f9eb2c6dfacca5da4c37cf7ba85d04172053ee6b1ebf1709ffcd99c1a7` |---|---|---| | `kind` | 必需 | `"max-tokens"` | + + +### `{ kind: "model-selection" }` + +SHA-256: `f7283223aacdc39b0adca728c8cbd4c090a20006a6fecec74421c30e943b489c` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `kind` | 必需 | `"model-selection"` | + + + +### `{ kind: "model-selection", form: "catalog" }` + +SHA-256: `99135d8a3937977955eaac5f8f04f930dcd1562f8450a54a51cde9b921dd59a6` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"catalog"` | +| `kind` | 必需 | `"model-selection"` | + + + +### `{ kind: "model-selection", form: "instructions" }` + +SHA-256: `f6605d6c57933aeaaf10911b5fbd6c61e655baa181af7192d3240f49d255b90d` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"instructions"` | +| `kind` | 必需 | `"model-selection"` | + + + +### `{ kind: "model-selection", form: "notice" }` + +SHA-256: `a3c6f1ea38e9a61d7a9706057ba65aabe02dfe6d9dd90d4736aa62325d874531` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"notice"` | +| `kind` | 必需 | `"model-selection"` | +| `summary` | 必需 | `string` | + + + +### `{ kind: "model-selection", form: "recall" }` + +SHA-256: `aae343bc3d663c83f2e8b5e1c7eea5d509dc7a5361bc8bd8b5ac3bb8d3b1ed56` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"recall"` | +| `kind` | 必需 | `"model-selection"` | + + + +### `{ kind: "model-selection", form: "relay" }` + +SHA-256: `a15a19ef63cf5d1b711db1d249821dab0cedcd3a9ad09137b47352c93841fd20` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"relay"` | +| `kind` | 必需 | `"model-selection"` | + + + +### `{ kind: "model-selection", form: "snapshot" }` + +SHA-256: `52c6113cb0e53f345324bf84f01928bea5d5df57ee80bc0dd65407b8bc5a3734` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"snapshot"` | +| `kind` | 必需 | `"model-selection"` | +| `sections` | 必需 | [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | + ### `{ kind: "parent" }` @@ -5802,89 +6376,82 @@ SHA-256: `6c03546143cdf6ae88f1745ac98c5139efa1588d1415249bbc5f3104d32ab800` |---|---|---| | `kind` | 必需 | `"parent"` | - + -### `{ kind: "plugin" }` +### `{ kind: "plan-mode" }` -SHA-256: `0ddab4577db37a3e0d9e3a91761735c8ef6f5629d526ab8ecaeeea19c097c8f8` +SHA-256: `f4a66f654996c093aae700ea4c434ff2ee3569fea9c0e5813ccf6afdccabd163` | 属性 | 存在性 | 类型 | |---|---|---| -| `kind` | 必需 | `"plugin"` | -| `plugin` | 必需 | `string` | +| `kind` | 必需 | `"plan-mode"` | - + -### `{ kind: "plugin", form: "catalog" }` +### `{ kind: "plan-mode", form: "catalog" }` -SHA-256: `2f90a7b3646fea3e677bd7b4000aa96f3b8964f107b614e204e11ad4051c24fc` +SHA-256: `3b04790e08b35241ffa0d38f6d7e4f8788aa921341f6c0d7574a329397c59408` | 属性 | 存在性 | 类型 | |---|---|---| | `form` | 必需 | `"catalog"` | -| `kind` | 必需 | `"plugin"` | -| `plugin` | 必需 | `string` | +| `kind` | 必需 | `"plan-mode"` | - + -### `{ kind: "plugin", form: "instructions" }` +### `{ kind: "plan-mode", form: "instructions" }` -SHA-256: `dda6e111a8ccfc12f6e742e977a1a4e3549e8c03732a5ff6c8d7c3d4bcb7a412` +SHA-256: `408927267422a7b2beb6df354ff7c1406d929a5646554f48adf85eb8372f811c` | 属性 | 存在性 | 类型 | |---|---|---| | `form` | 必需 | `"instructions"` | -| `kind` | 必需 | `"plugin"` | -| `plugin` | 必需 | `string` | +| `kind` | 必需 | `"plan-mode"` | - + -### `{ kind: "plugin", form: "notice" }` +### `{ kind: "plan-mode", form: "notice" }` -SHA-256: `b4d298d90c798fa4d1f5b030ce3ce8031c4c41beafdb05323bec8b2a06903b43` +SHA-256: `baccc97ec34be6c4c78e95aa88c85c29820269479445e5b13f956cd64c5e286f` | 属性 | 存在性 | 类型 | |---|---|---| | `form` | 必需 | `"notice"` | -| `kind` | 必需 | `"plugin"` | -| `plugin` | 必需 | `string` | +| `kind` | 必需 | `"plan-mode"` | | `summary` | 必需 | `string` | - + -### `{ kind: "plugin", form: "recall" }` +### `{ kind: "plan-mode", form: "recall" }` -SHA-256: `85e1bd563d6c80c1f377f99f91103fec4e315148a7330f3b3dae7c2d04e33b01` +SHA-256: `f6329fb30c7ea8013e8975ca5e78284fb7685cc6bd620e8aa4e9a99bc81d45eb` | 属性 | 存在性 | 类型 | |---|---|---| | `form` | 必需 | `"recall"` | -| `kind` | 必需 | `"plugin"` | -| `plugin` | 必需 | `string` | +| `kind` | 必需 | `"plan-mode"` | - + -### `{ kind: "plugin", form: "relay" }` +### `{ kind: "plan-mode", form: "relay" }` -SHA-256: `2ce7ef3b3daebf95815c7ae454a751d3e67ca7a22e2e0734fe2942df393bb66c` +SHA-256: `deaae5cd30987d4f49398e8f9d994c125907e7f928300745fb1dbf15f145d0e7` | 属性 | 存在性 | 类型 | |---|---|---| | `form` | 必需 | `"relay"` | -| `kind` | 必需 | `"plugin"` | -| `plugin` | 必需 | `string` | +| `kind` | 必需 | `"plan-mode"` | - + -### `{ kind: "plugin", form: "snapshot" }` +### `{ kind: "plan-mode", form: "snapshot" }` -SHA-256: `e8d26e6993445743e6c4342c31b284c7d8f5574369abdd6021183af1a6b3538f` +SHA-256: `8c1c4f72755a78ea163523a46565316e36e9b644382eb48e6635c71a6f412dd2` | 属性 | 存在性 | 类型 | |---|---|---| | `form` | 必需 | `"snapshot"` | -| `kind` | 必需 | `"plugin"` | -| `plugin` | 必需 | `string` | +| `kind` | 必需 | `"plan-mode"` | | `sections` | 必需 | [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | @@ -5901,6 +6468,240 @@ SHA-256: `b81e9de81a481b24e1e1f9adf038bfc59e57b4f35ce62f8f1e45284186f4f812` | `model` | 可选 | [`SessionTitleModelIdentity`](#persistence-type-sha256-07e1a58c58b593f507b8e7f25723bb0aa42baae6e00f5ecfddf28cb1e64d3235) | | `provider` | 必需 | `string` | + + +### `{ kind: "repeat-tool-reminder" }` + +SHA-256: `b062078e899958f99ae464514578b8c093924dfe34bd9a835932b420ff2150b1` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `kind` | 必需 | `"repeat-tool-reminder"` | + + + +### `{ kind: "repeat-tool-reminder", form: "catalog" }` + +SHA-256: `d85590a5675c6e2fd8164e5792a6cceac714605b8ac228adae5ee668facb1490` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"catalog"` | +| `kind` | 必需 | `"repeat-tool-reminder"` | + + + +### `{ kind: "repeat-tool-reminder", form: "instructions" }` + +SHA-256: `6f44f32be9bcd9a8bf075c3b575b06c8ed63446386e5b0995c7b73762e68ddae` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"instructions"` | +| `kind` | 必需 | `"repeat-tool-reminder"` | + + + +### `{ kind: "repeat-tool-reminder", form: "notice" }` + +SHA-256: `fe1a7acdeed4d0f5ab483396eaa5b3dc97263b7c10eb4da2f0028cb01728bfc9` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"notice"` | +| `kind` | 必需 | `"repeat-tool-reminder"` | +| `summary` | 必需 | `string` | + + + +### `{ kind: "repeat-tool-reminder", form: "recall" }` + +SHA-256: `8620189c8e33582708ece48fd2d20dc4d57912486a17bdbb9aea4c44f7018062` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"recall"` | +| `kind` | 必需 | `"repeat-tool-reminder"` | + + + +### `{ kind: "repeat-tool-reminder", form: "relay" }` + +SHA-256: `4991dfc415c9efebc36fa6969e1798c7d2e42396cc1e6e0ac7d7c89c5c5c4aea` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"relay"` | +| `kind` | 必需 | `"repeat-tool-reminder"` | + + + +### `{ kind: "repeat-tool-reminder", form: "snapshot" }` + +SHA-256: `db06ef35b27a38425046b2228fa6bce9582abe140d781d363137eb2f4d233a1c` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"snapshot"` | +| `kind` | 必需 | `"repeat-tool-reminder"` | +| `sections` | 必需 | [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | + + + +### `{ kind: "runtime-context" }` + +SHA-256: `0203243b72fc867afc81aff5f4cf2167e564ed342534eb612fc92f295cf07789` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `kind` | 必需 | `"runtime-context"` | + + + +### `{ kind: "runtime-context", form: "catalog" }` + +SHA-256: `58015da1c1950a66daf66ae24913d6a1fc6d1d9ac441b155f8847f7f8584ba8e` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"catalog"` | +| `kind` | 必需 | `"runtime-context"` | + + + +### `{ kind: "runtime-context", form: "instructions" }` + +SHA-256: `0eeb17e1df89b1ebc2902116fe7145e0d321ef0db26e6bdebc802cb8513a01c1` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"instructions"` | +| `kind` | 必需 | `"runtime-context"` | + + + +### `{ kind: "runtime-context", form: "notice" }` + +SHA-256: `cda2345a9be9d139df49ccbd16dcba716f3440178bf20ff8b801fda1f5eb77dc` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"notice"` | +| `kind` | 必需 | `"runtime-context"` | +| `summary` | 必需 | `string` | + + + +### `{ kind: "runtime-context", form: "recall" }` + +SHA-256: `96bfb916a727cd4445a594df264c523fc039749a31bfed924b8cc7bb308a5bb0` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"recall"` | +| `kind` | 必需 | `"runtime-context"` | + + + +### `{ kind: "runtime-context", form: "relay" }` + +SHA-256: `cb1c8959e1726f82f9a3d2ef2bc90bf8c451a98fd56175e956022124c770c818` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"relay"` | +| `kind` | 必需 | `"runtime-context"` | + + + +### `{ kind: "runtime-context", form: "snapshot" }` + +SHA-256: `2aad1179f957631477b582e57cd8f538cb82618fc3fb816bde1171154235b065` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"snapshot"` | +| `kind` | 必需 | `"runtime-context"` | +| `sections` | 必需 | [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | + + + +### `{ kind: "schedule" }` + +SHA-256: `f29d63336e8266d80dd7baeab219436db86341304f6be1cd0edb36f5134c4a47` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `kind` | 必需 | `"schedule"` | + + + +### `{ kind: "schedule", form: "catalog" }` + +SHA-256: `1e709346005826eb81809eeb76a3f713cf13ad6c5cec75146d07020ab9adc938` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"catalog"` | +| `kind` | 必需 | `"schedule"` | + + + +### `{ kind: "schedule", form: "instructions" }` + +SHA-256: `1938c8c20f1cba7c82dbedcfa4f14c3ee191cd77ed3314ee1fc676d44cadf3be` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"instructions"` | +| `kind` | 必需 | `"schedule"` | + + + +### `{ kind: "schedule", form: "notice" }` + +SHA-256: `312aee2f0c42aabbae6cc60d92d596d8453c0aeb061c5868d1755a69ef49e69a` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"notice"` | +| `kind` | 必需 | `"schedule"` | +| `summary` | 必需 | `string` | + + + +### `{ kind: "schedule", form: "recall" }` + +SHA-256: `a16e567c8cd2c55cf1e911aed3c200c4e1f6febb1459ff2a9e7adf159afb68cb` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"recall"` | +| `kind` | 必需 | `"schedule"` | + + + +### `{ kind: "schedule", form: "relay" }` + +SHA-256: `5bc66269cfaf614c0ecda8ecb469f23101a7609793fc2b693ac23c4aecdb575e` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"relay"` | +| `kind` | 必需 | `"schedule"` | + + + +### `{ kind: "schedule", form: "snapshot" }` + +SHA-256: `28936c614bd4e7e2774806edcbb3cbfd3ee643ac1cbf0bbdff43d915505a8fe3` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"snapshot"` | +| `kind` | 必需 | `"schedule"` | +| `sections` | 必需 | [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | + ### `{ kind: "stop" }` @@ -5913,6 +6714,162 @@ SHA-256: `1d76406cbb2ddadb0dbbb51e9d8bc6cf678fed455cf8eb512f36f7c86d37a62f` |---|---|---| | `kind` | 必需 | `"stop"` | + + +### `{ kind: "time-context" }` + +SHA-256: `b79641a9d25e756636dc0c706fdf3c4583ccb7d4920e009e6e86c0759cf4de4c` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `kind` | 必需 | `"time-context"` | + + + +### `{ kind: "time-context", form: "catalog" }` + +SHA-256: `85fe96bf15d5c7559eec3bae4d6cf1a76fda9f5be05a29c2830cff560cab0c0d` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"catalog"` | +| `kind` | 必需 | `"time-context"` | + + + +### `{ kind: "time-context", form: "instructions" }` + +SHA-256: `f6afe41e3926f422fe849debe90819fddd739f0f59e20be9c71018b9554a7f09` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"instructions"` | +| `kind` | 必需 | `"time-context"` | + + + +### `{ kind: "time-context", form: "notice" }` + +SHA-256: `ee577a0cc18664c9daee50e9455153321155604f8f1817362f8f4a4b6fb9e1ad` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"notice"` | +| `kind` | 必需 | `"time-context"` | +| `summary` | 必需 | `string` | + + + +### `{ kind: "time-context", form: "recall" }` + +SHA-256: `756b5e23a5cb2c7f486f366a828f7461c88902af21125bd6810881f4ccbff6cc` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"recall"` | +| `kind` | 必需 | `"time-context"` | + + + +### `{ kind: "time-context", form: "relay" }` + +SHA-256: `5d7a64ed6aac5551ebf998dc25e1e7b48a144769913f89702840180e61dc3995` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"relay"` | +| `kind` | 必需 | `"time-context"` | + + + +### `{ kind: "time-context", form: "snapshot" }` + +SHA-256: `f230c0b583e23b25ee0a61dbe4c05e95c1e2ae44b27939501eb9e03696f0c278` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"snapshot"` | +| `kind` | 必需 | `"time-context"` | +| `sections` | 必需 | [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | + + + +### `{ kind: "tmux-context" }` + +SHA-256: `8a046b52331959aa3394680d6acbe09b8a5447c6b61375f263445bfcef19b7f1` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `kind` | 必需 | `"tmux-context"` | + + + +### `{ kind: "tmux-context", form: "catalog" }` + +SHA-256: `7df62978a2b7de8540e714152297743e0a622209a46a5ac9513fc0fad73ca23b` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"catalog"` | +| `kind` | 必需 | `"tmux-context"` | + + + +### `{ kind: "tmux-context", form: "instructions" }` + +SHA-256: `9f65c43e340bba31cdc0fc37bd93ccb68d5e9b36f47a68c207e95a8e68620a5d` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"instructions"` | +| `kind` | 必需 | `"tmux-context"` | + + + +### `{ kind: "tmux-context", form: "notice" }` + +SHA-256: `b3681c026a0b98e98b103f057dfd217fbe904129c090efd668253ec9aea7fece` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"notice"` | +| `kind` | 必需 | `"tmux-context"` | +| `summary` | 必需 | `string` | + + + +### `{ kind: "tmux-context", form: "recall" }` + +SHA-256: `fcf81d3c58c13593bf2594e342e31734f4ab2d24938dc610875194c6079749c7` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"recall"` | +| `kind` | 必需 | `"tmux-context"` | + + + +### `{ kind: "tmux-context", form: "relay" }` + +SHA-256: `f97f47b0eb87905ed77cc27c5e4ed75ef805cb372c98905253709de1aab9b63c` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"relay"` | +| `kind` | 必需 | `"tmux-context"` | + + + +### `{ kind: "tmux-context", form: "snapshot" }` + +SHA-256: `49dab019d00e8c26f27ad2ccff7b604d69e323ae4d17e0d2a7b6b8a830b1ade2` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"snapshot"` | +| `kind` | 必需 | `"tmux-context"` | +| `sections` | 必需 | [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | + ### `{ kind: "tool-calls" }` @@ -5925,6 +6882,162 @@ SHA-256: `287211846beea1eccb5f9acee00d20388a38fcb2e95858fa2332d6f58529379a` |---|---|---| | `kind` | 必需 | `"tool-calls"` | + + +### `{ kind: "tool-goal" }` + +SHA-256: `a2066bd52f61218ba15b758def2641cc6a8bd3d4a594a488ee4c65be356d7e39` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `kind` | 必需 | `"tool-goal"` | + + + +### `{ kind: "tool-goal", form: "catalog" }` + +SHA-256: `260523b412c19ad8c2bb00093b07f64245ff8ba6b2f76c5b545303772ac9704c` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"catalog"` | +| `kind` | 必需 | `"tool-goal"` | + + + +### `{ kind: "tool-goal", form: "instructions" }` + +SHA-256: `6085488d223aeffdef51d7ae17655fc26ab22ee13cbed82a50e62e2b6fb5b918` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"instructions"` | +| `kind` | 必需 | `"tool-goal"` | + + + +### `{ kind: "tool-goal", form: "notice" }` + +SHA-256: `8c627d7a45fa406cea879a3922105e27ed4c3c7966e264afaf11ea7a330f2dd1` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"notice"` | +| `kind` | 必需 | `"tool-goal"` | +| `summary` | 必需 | `string` | + + + +### `{ kind: "tool-goal", form: "recall" }` + +SHA-256: `7554565be416b0342053ee6a46256c9dab07c487349b4a5f10bab1edc151c619` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"recall"` | +| `kind` | 必需 | `"tool-goal"` | + + + +### `{ kind: "tool-goal", form: "relay" }` + +SHA-256: `8f324cea3916c0517261e88167def8efb3a9994c1135e23d40ed9fd48f8c7bd4` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"relay"` | +| `kind` | 必需 | `"tool-goal"` | + + + +### `{ kind: "tool-goal", form: "snapshot" }` + +SHA-256: `11638dc58a31496fb6706ced3e23e3a2db1f3b2a8845968c810827a72b5fc811` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"snapshot"` | +| `kind` | 必需 | `"tool-goal"` | +| `sections` | 必需 | [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | + + + +### `{ kind: "tool-jobs" }` + +SHA-256: `24ce31aa528272e59f21cd26da9eca08968bcc97529756a749bfdab71746d9c8` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `kind` | 必需 | `"tool-jobs"` | + + + +### `{ kind: "tool-jobs", form: "catalog" }` + +SHA-256: `dd5ee8762bd8a14b6c6bffedd1753e4e78505bb0f9ea1621018d03a54eef59d5` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"catalog"` | +| `kind` | 必需 | `"tool-jobs"` | + + + +### `{ kind: "tool-jobs", form: "instructions" }` + +SHA-256: `53cf1704ae0709c7678bcf070c83c619fc48ca1b5c173b74cfa8702f22a8e492` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"instructions"` | +| `kind` | 必需 | `"tool-jobs"` | + + + +### `{ kind: "tool-jobs", form: "notice" }` + +SHA-256: `5bb69b88517f6214f2af4d1a6d2b771e271ad3ad695cc9c2c272069ae698c9bc` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"notice"` | +| `kind` | 必需 | `"tool-jobs"` | +| `summary` | 必需 | `string` | + + + +### `{ kind: "tool-jobs", form: "recall" }` + +SHA-256: `dd6cc2bb2a8f28248347021ad93565360b196a042360b4cd16b569d3a2a91f2d` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"recall"` | +| `kind` | 必需 | `"tool-jobs"` | + + + +### `{ kind: "tool-jobs", form: "relay" }` + +SHA-256: `ade057f4fdc387aec6426f48704a1f9359cfc6fee13f27735b07f9b215ec16ca` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"relay"` | +| `kind` | 必需 | `"tool-jobs"` | + + + +### `{ kind: "tool-jobs", form: "snapshot" }` + +SHA-256: `c5228b7a55498d84f529591744a0ab26e0b93ade18a70a26db1377a1ecfa6b49` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"snapshot"` | +| `kind` | 必需 | `"tool-jobs"` | +| `sections` | 必需 | [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | + ### `{ kind: "user" }` @@ -5939,6 +7052,84 @@ SHA-256: `6a4f72e2e179e17b922f2a9392c0e1c8f8c707f32494372454850a3eb184a6e7` | `kind` | 必需 | `"user"` | | `rpcId` | 必需 | `string` | + + +### `{ kind: "user-approval" }` + +SHA-256: `6292bcbedaa97feaec5b48a03bb8144b581b93309d9d6c905f26da7a6a7a0a4f` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `kind` | 必需 | `"user-approval"` | + + + +### `{ kind: "user-approval", form: "catalog" }` + +SHA-256: `825ca23416b1ea9d81442afead5cf9229a6fa05842f042135cc3aa9710a6a2d8` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"catalog"` | +| `kind` | 必需 | `"user-approval"` | + + + +### `{ kind: "user-approval", form: "instructions" }` + +SHA-256: `aa2bf9e82b9fdeb94a42af20031fffa30e4e23f01f4ac39757427d4c64c407f0` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"instructions"` | +| `kind` | 必需 | `"user-approval"` | + + + +### `{ kind: "user-approval", form: "notice" }` + +SHA-256: `6ccb6bc423fb3952458abf9c1b1c3284208b7e660344b612cc55da773d61afe4` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"notice"` | +| `kind` | 必需 | `"user-approval"` | +| `summary` | 必需 | `string` | + + + +### `{ kind: "user-approval", form: "recall" }` + +SHA-256: `022623b9ef98ec47ec3c3bae0c51027c70d2601141c5e92e26a0d83d1b4cef06` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"recall"` | +| `kind` | 必需 | `"user-approval"` | + + + +### `{ kind: "user-approval", form: "relay" }` + +SHA-256: `5cdbf342b7748d152bc987b68f58e565e5bba4b227e076e2d2120d87662e45cd` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"relay"` | +| `kind` | 必需 | `"user-approval"` | + + + +### `{ kind: "user-approval", form: "snapshot" }` + +SHA-256: `5654685d7557ec747e74887237065e626a5bdfa426ca43f7fbb0b6fee9b0916c` + +| 属性 | 存在性 | 类型 | +|---|---|---| +| `form` | 必需 | `"snapshot"` | +| `kind` | 必需 | `"user-approval"` | +| `sections` | 必需 | [`ContextSnapshotSection[]`](#persistence-type-sha256-c748fb42c80a120038a8c587af80ec39924803c401364db11c8974d5bf6d0262) | + ### `{ kind: "webhook", form: "notice" }` @@ -5986,17 +7177,17 @@ SHA-256: `b1ebd5cda47d90d980bb05bffc3f970c51537b9aff15b3bc3d639811727741b1` | `teamId` | 必需 | `string` | | `version` | 必需 | `2` | - + ### `{ message, step, turn }` -SHA-256: `04e1cae61e7654890444877cb802e3b6c8c607fa8a9b4380323939951a1be9d2` +SHA-256: `0baa4dd6c2795de2454f2a20eadf1116981ae995f61a3e5b8128dcbca76c2048` 来源:[`packages/core/session/src/types.ts:321`](../packages/core/session/src/types.ts) | 属性 | 存在性 | 类型 | |---|---|---| -| `message` | 必需 | [`SystemMessage`](#persistence-type-sha256-abb8be1a8972c5531c513de95c678bac414263fb5e4bf6dcf871ca913f47bd94) | +| `message` | 必需 | [`SystemMessage`](#persistence-type-sha256-20a3c1c8a3154e4ae69eada1212e3216baf93454ee4c745565b9374d7539fe8b) | | `step` | 必需 | `number` | | `turn` | 必需 | `number` | @@ -6048,7 +7239,7 @@ SHA-256: `9890113e97dd3541787bfe6704f2b223d3a890b5325ca0acae2b0398909b413e` SHA-256: `11f70b595aa76897fc4e25a352bfa718c659f44b799e5aa14e84e5a38fe72912` -来源:[`packages/interaction/user-approval/src/index.ts:33`](../packages/interaction/user-approval/src/index.ts) +来源:[`packages/interaction/user-approval/src/index.ts:40`](../packages/interaction/user-approval/src/index.ts) | 属性 | 存在性 | 类型 | |---|---|---| @@ -6214,17 +7405,17 @@ SHA-256: `a10c17474eaf2ddab7095a099e0fe3d046fc18e56c3e344fc8894c05ff9ef97b` | `time` | 必需 | `number` | | `type` | 必需 | `"agent-preset/selected"` | - + ### `{ type: "agent/inbox/spliced" }` -SHA-256: `cbe418d5a3727fbd3599f90101680dae254ac1d6163b1b8b2ca30f28afb5212a` +SHA-256: `ab1acc0685cc410d0d1e85ff0e0bd29f4b2b4352dd170db54988319d58d4362f` | 属性 | 存在性 | 类型 | |---|---|---| -| `data` | 必需 | [`{ inserted, outcome?, removedCount?, start, … }`](#persistence-type-sha256-6f87000576a13d73867248c97e55c4ebe3cb3ee55ee3bd1282f26e7f40dd81c8) | +| `data` | 必需 | [`{ inserted, outcome?, removedCount?, start, … }`](#persistence-type-sha256-37af4fdde18eb8638d5037243e0ee1c617b9b1062ae9dbee086feafad852112f) | | `ignorable` | 可选 | `true` | | `seq` | 必需 | `number` | | `time` | 必需 | `number` | @@ -6813,17 +8004,17 @@ SHA-256: `1b912703e2d64f91c99c675b8f805b01076c8325b905c1218ad81ef0b24909d5` | `time` | 必需 | `number` | | `type` | 必需 | `"session/title"` | - + ### `{ type: "session/title-llm-request" }` -SHA-256: `2a47ef7025d7dcf7e9977aadd738e7408a210b101a7dbbd37f4d87f22166eff0` +SHA-256: `eb655047c0dd3f2f3aefd2c9c719df0d060dd88032ba7caf731ea39db5a6725f` | 属性 | 存在性 | 类型 | |---|---|---| -| `data` | 必需 | [`SessionTitleLlmRequestEventData`](#persistence-type-sha256-1b78e3a578a7e6d29d9564a9f5d236c2ebdcf682dbeb7b50400d8850e313b518) | +| `data` | 必需 | [`SessionTitleLlmRequestEventData`](#persistence-type-sha256-608866d72de8327687e3730cb213d57cf8485012419673de9e5765f4a71f7f2d) | | `ignorable` | 可选 | `true` | | `seq` | 必需 | `number` | | `time` | 必需 | `number` | @@ -6909,17 +8100,17 @@ SHA-256: `a6567ccb2e530606b775371eb4fa31468d72084339968e8b0440a516a23b39dc` | `time` | 必需 | `number` | | `type` | 必需 | `"subagent/model-selection-policy"` | - + ### `{ type: "system/message" }` -SHA-256: `1772581b17e1fab970fda49f04ffae2a181b7992ca4efa63bffe5f8b2bd62300` +SHA-256: `54a8682615a7ffc3e1e3c41ab003ae61082ae2792c57407f5bd8bb38fded3f0e` | 属性 | 存在性 | 类型 | |---|---|---| -| `data` | 必需 | [`{ message, step, turn }`](#persistence-type-sha256-04e1cae61e7654890444877cb802e3b6c8c607fa8a9b4380323939951a1be9d2) | +| `data` | 必需 | [`{ message, step, turn }`](#persistence-type-sha256-0baa4dd6c2795de2454f2a20eadf1116981ae995f61a3e5b8128dcbca76c2048) | | `ignorable` | 可选 | `true` | | `seq` | 必需 | `number` | | `sourceEventSeqs` | 可选 | [`number[]`](#persistence-type-sha256-5d03ba38734809bcbd2a55221bd938b3b3fc34b49bb686c6113e9e4931e3aa78) | @@ -7246,17 +8437,17 @@ SHA-256: `f1a96afe7503ac1817de769cd0ba13d9b80111c7034c50106b3344ecc14cc515` | `type` | 必需 | `"usage"` | | `usage` | 必需 | [`TokenUsage`](#persistence-type-sha256-fec5442b9ee4122e10514d81d5a43648003fe8bfb7ee2ba50c0cdbdd383ed394) | - + ### `{ type: "user/message" }` -SHA-256: `5274b395e7bf6660d020fba7e29a1e20ef2e77097fd7597e9debb13e45c540d6` +SHA-256: `46c44941f6e93a1764c49f1487e64a57f73ee68a75a657e94c326a8de5d8ad95` | 属性 | 存在性 | 类型 | |---|---|---| -| `data` | 必需 | [`UserMessage`](#persistence-type-sha256-a48b761be36821fcf456c862e321284bdd879dd796d29d20b1766e0417f7c966) | +| `data` | 必需 | [`UserMessage`](#persistence-type-sha256-980b8f7c2576a03df48bd09fd68000d88eaec6e99ca5bec36e6448401b8e3e95) | | `ignorable` | 可选 | `true` | | `seq` | 必需 | `number` | | `sourceEventSeqs` | 可选 | [`number[]`](#persistence-type-sha256-5d03ba38734809bcbd2a55221bd938b3b3fc34b49bb686c6113e9e4931e3aa78) | diff --git a/docs/persistence-changes/2026-09-16-session-format-v4.i18n.yaml b/docs/persistence-changes/2026-09-16-session-format-v4.i18n.yaml index 0e0366550c..5de90620a3 100644 --- a/docs/persistence-changes/2026-09-16-session-format-v4.i18n.yaml +++ b/docs/persistence-changes/2026-09-16-session-format-v4.i18n.yaml @@ -2,5 +2,5 @@ # side as of the last confirmed-consistent state. Both languages carry equal authority; # after editing either side, bring the other along and re-record with: # pnpm run verify-translation-pairing --write docs/persistence-changes/2026-09-16-session-format-v4.md -2026-09-16-session-format-v4.md: 81327a4a76751680ae5c4bd18cff930650fbe1fc -2026-09-16-session-format-v4.zh.md: dbce32b89abfe233f3ddb0a71e3f9b7594523f84 +2026-09-16-session-format-v4.md: 625e977196d0395c2a3d7c662831914f0c3e6f23 +2026-09-16-session-format-v4.zh.md: bd11a72eba0ef1b7653d32ef6f987e500d0b2ba0 diff --git a/docs/persistence-changes/2026-09-16-session-format-v4.md b/docs/persistence-changes/2026-09-16-session-format-v4.md index 81327a4a76..625e977196 100644 --- a/docs/persistence-changes/2026-09-16-session-format-v4.md +++ b/docs/persistence-changes/2026-09-16-session-format-v4.md @@ -9,7 +9,7 @@ English | [中文](2026-09-16-session-format-v4.zh.md) ## Summary -Advances the declared SessionHeader.version from 3 to 4 for the V4 integration writer, records first-class tool-role results, and adds the forked variant to turn/end.reason. +Advances the declared SessionHeader.version from 3 to 4 for the V4 integration writer, records first-class tool-role results and producer-owned sources, and adds the forked variant to turn/end.reason. ## Table of Contents @@ -32,7 +32,7 @@ changes: decision: version-bump - root: "event:agent/inbox/spliced" previous: "2026-09-14-image-offload" - after: "cbe418d5a3727fbd3599f90101680dae254ac1d6163b1b8b2ca30f28afb5212a" + after: "ab1acc0685cc410d0d1e85ff0e0bd29f4b2b4352dd170db54988319d58d4362f" decision: version-bump - root: "event:assistant/attempt" previous: "2026-09-14-image-offload" @@ -52,11 +52,11 @@ changes: decision: version-bump - root: "event:session/title-llm-request" previous: "2026-09-14-image-offload" - after: "2a47ef7025d7dcf7e9977aadd738e7408a210b101a7dbbd37f4d87f22166eff0" + after: "eb655047c0dd3f2f3aefd2c9c719df0d060dd88032ba7caf731ea39db5a6725f" decision: version-bump - root: "event:system/message" previous: "2026-09-14-image-offload" - after: "1772581b17e1fab970fda49f04ffae2a181b7992ca4efa63bffe5f8b2bd62300" + after: "54a8682615a7ffc3e1e3c41ab003ae61082ae2792c57407f5bd8bb38fded3f0e" decision: version-bump - root: "event:team/message/queued" previous: "2026-09-14-image-offload" @@ -76,7 +76,7 @@ changes: decision: version-bump - root: "event:user/message" previous: "2026-09-14-image-offload" - after: "5274b395e7bf6660d020fba7e29a1e20ef2e77097fd7597e9debb13e45c540d6" + after: "46c44941f6e93a1764c49f1487e64a57f73ee68a75a657e94c326a8de5d8ad95" decision: version-bump ``` @@ -91,6 +91,10 @@ The V3-to-V4 migration lifts released user-role tool results into tool-role mess The `request/header` schema also records the retired `system` key as forbidden. This declaration captures the existing native-reader refusal without changing stored data or prompt reconstruction; later permitting a value requires a version bump instead of being classified as an ordinary optional-field addition. +Producer-owned sources replace released plugin wrappers through the [V3-to-V4 migration](../../packages/session/session-format-v3-to-v4/README.md#v3-to-v4-specification). The frozen rename table and collision rules preserve source fields and event coordinates; unknown producer attribution retains every own JSON property. Native read and write opens validate source fields before exposing the Session. Existing V4 files do not rerun the incoming migration edge. + +The core-owned user source property records the attribution-preservation policy; tmux-context qualifies its location attribution while retaining producer-local duplicate suppression. Auto Review and the compaction summarizer use request-only user inputs, removing their active source registrations without removing historical migration support. These inputs cannot be written as durable Session messages. Catalog formatVersion 2 stores the policy metadata; it does not change the Session version or rewrite frozen schema records. System, model, and tool sources retain their strict semantic rules. + ## Verification @@ -98,6 +102,8 @@ The focused Session, agent-loop, Session Controller, V4, chat-view, and compacti The generated request-header reservation regression and existing retired-syntax and Session surface tests pass 65 tests across three files. The generated field retains optional `never`; permitting an optional string produces a version-bump diagnostic while the native reader still refuses the retired key. +The producer-source and request-input checks pass 447 tests across 12 files, including provider equality, request-only type rejection, user-attribution retention, source migration, and native source admission. Comparing the generated inventories with the tool-role parent reports four changed roots and 447 unchanged type fingerprints. + ## Dev Note diff --git a/docs/persistence-changes/2026-09-16-session-format-v4.schema.json b/docs/persistence-changes/2026-09-16-session-format-v4.schema.json index 69c4e1dd13..279b613dea 100644 --- a/docs/persistence-changes/2026-09-16-session-format-v4.schema.json +++ b/docs/persistence-changes/2026-09-16-session-format-v4.schema.json @@ -1,5 +1,5 @@ { - "formatVersion": 1, + "formatVersion": 2, "roots": [ { "key": "SessionHeader", @@ -87,7 +87,7 @@ "kind": "event", "event": "agent/inbox/spliced", "surface": false, - "digest": "cbe418d5a3727fbd3599f90101680dae254ac1d6163b1b8b2ca30f28afb5212a", + "digest": "ab1acc0685cc410d0d1e85ff0e0bd29f4b2b4352dd170db54988319d58d4362f", "schema": { "root": 0, "nodes": [ @@ -101,22 +101,22 @@ }, { "name": "ignorable", - "type": 18, + "type": 22, "optional": true }, { "name": "seq", - "type": 11, + "type": 15, "optional": false }, { "name": "time", - "type": 11, + "type": 15, "optional": false }, { "name": "type", - "type": 88, + "type": 192, "optional": false } ], @@ -132,22 +132,22 @@ }, { "name": "outcome", - "type": 84, + "type": 188, "optional": true }, { "name": "removedCount", - "type": 11, + "type": 15, "optional": true }, { "name": "start", - "type": 11, + "type": 15, "optional": false }, { "name": "target", - "type": 85, + "type": 189, "optional": false } ], @@ -178,7 +178,17 @@ { "name": "source", "type": 28, - "optional": false + "optional": false, + "compatibility": { + "version": 1, + "policy": "session-source-attribution", + "binding": "session.user-message.source", + "discriminator": "kind", + "unknownKinds": "preserve", + "attributionKinds": [ + "tmux-context" + ] + } } ], "indices": [] @@ -192,11 +202,55 @@ "types": [ 6, 9, - 20, - 23, - 25 + 11, + 13, + 24 ] }, + { + "kind": "object", + "properties": [ + { + "name": "text", + "type": 7, + "optional": false + }, + { + "name": "type", + "type": 8, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "primitive", + "type": "string" + }, + { + "kind": "literal", + "value": "reasoning" + }, + { + "kind": "object", + "properties": [ + { + "name": "text", + "type": 7, + "optional": false + }, + { + "name": "type", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "text" + }, { "kind": "object", "properties": [ @@ -217,16 +271,12 @@ }, { "name": "type", - "type": 8, + "type": 12, "optional": false } ], "indices": [] }, - { - "kind": "primitive", - "type": "string" - }, { "kind": "literal", "value": "tool-call" @@ -236,17 +286,17 @@ "properties": [ { "name": "attachment", - "type": 10, + "type": 14, "optional": false }, { "name": "offloaded", - "type": 18, + "type": 22, "optional": true }, { "name": "type", - "type": 19, + "type": 23, "optional": false } ], @@ -262,17 +312,17 @@ }, { "name": "bytes", - "type": 11, + "type": 15, "optional": false }, { "name": "height", - "type": 11, + "type": 15, "optional": false }, { "name": "mediaType", - "type": 12, + "type": 16, "optional": false }, { @@ -282,12 +332,12 @@ }, { "name": "originalDimensions", - "type": 17, + "type": 21, "optional": true }, { "name": "width", - "type": 11, + "type": 15, "optional": false } ], @@ -300,12 +350,16 @@ { "kind": "union", "types": [ - 13, - 14, - 15, - 16 + 17, + 18, + 19, + 20 ] }, + { + "kind": "literal", + "value": "image/gif" + }, { "kind": "literal", "value": "image/jpeg" @@ -314,10 +368,6 @@ "kind": "literal", "value": "image/png" }, - { - "kind": "literal", - "value": "image/gif" - }, { "kind": "literal", "value": "image/webp" @@ -327,12 +377,12 @@ "properties": [ { "name": "height", - "type": 11, + "type": 15, "optional": false }, { "name": "width", - "type": 11, + "type": 15, "optional": false } ], @@ -351,12 +401,12 @@ "properties": [ { "name": "attachment", - "type": 21, + "type": 25, "optional": false }, { "name": "type", - "type": 22, + "type": 26, "optional": false } ], @@ -372,7 +422,7 @@ }, { "name": "bytes", - "type": 11, + "type": 15, "optional": false }, { @@ -387,46 +437,6 @@ "kind": "literal", "value": "file" }, - { - "kind": "object", - "properties": [ - { - "name": "text", - "type": 7, - "optional": false - }, - { - "name": "type", - "type": 24, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "reasoning" - }, - { - "kind": "object", - "properties": [ - { - "name": "text", - "type": 7, - "optional": false - }, - { - "name": "type", - "type": 26, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "text" - }, { "kind": "literal", "value": "user" @@ -435,188 +445,126 @@ "kind": "union", "types": [ 29, - 38, - 40, + 32, + 34, + 36, + 39, 41, - 44, + 43, + 45, + 47, 49, 51, - 56, + 53, + 55, 57, 58, + 59, 60, 62, 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, 71, + 72, 73, - 75, + 74, + 76, 77, + 78, 79, + 80, + 81, 82, - 83 + 83, + 84, + 85, + 86, + 87, + 88, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97, + 98, + 99, + 100, + 101, + 102, + 104, + 106, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 126, + 128, + 129, + 137, + 139, + 140, + 142, + 144, + 148, + 150, + 158, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 172, + 173, + 174, + 176, + 178, + 179, + 180, + 181, + 182, + 183, + 184, + 185, + 186, + 187 ] }, { "kind": "object", "properties": [ { - "name": "baseline", - "type": 18, - "optional": true - }, - { - "name": "baselineIdentity", - "type": 7, - "optional": true - }, - { - "name": "changes", + "name": "form", "type": 30, "optional": false }, - { - "name": "form", - "type": 36, - "optional": false - }, { "name": "kind", - "type": 37, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "array", - "element": 31 - }, - { - "kind": "object", - "properties": [ - { - "name": "action", - "type": 32, - "optional": false - }, - { - "name": "digest", - "type": 7, - "optional": true - }, - { - "name": "path", - "type": 7, - "optional": false - }, - { - "name": "scope", - "type": 7, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "union", - "types": [ - 33, - 34, - 35 - ] - }, - { - "kind": "literal", - "value": "remove" - }, - { - "kind": "literal", - "value": "replace" - }, - { - "kind": "literal", - "value": "set" - }, - { - "kind": "literal", - "value": "instructions" - }, - { - "kind": "literal", - "value": "agent-instructions" - }, - { - "kind": "object", - "properties": [ - { - "name": "callId", - "type": 7, - "optional": false - }, - { - "name": "kind", - "type": 39, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "tool" - }, - { - "kind": "object", - "properties": [ - { - "name": "clientTimeZone", - "type": 7, - "optional": true - }, - { - "name": "kind", - "type": 27, - "optional": false - }, - { - "name": "rpcId", - "type": 7, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "deliveryId", - "type": 7, - "optional": false - }, - { - "name": "form", - "type": 42, - "optional": false - }, - { - "name": "kind", - "type": 43, - "optional": false - }, - { - "name": "provider", - "type": 7, - "optional": false - }, - { - "name": "ruleId", - "type": 7, - "optional": false - }, - { - "name": "source", - "type": 7, + "type": 31, "optional": false }, { @@ -633,157 +581,19 @@ }, { "kind": "literal", - "value": "webhook" - }, - { - "kind": "object", - "properties": [ - { - "name": "entries", - "type": 45, - "optional": false - }, - { - "name": "form", - "type": 47, - "optional": false - }, - { - "name": "kind", - "type": 48, - "optional": false - }, - { - "name": "update", - "type": 18, - "optional": true - } - ], - "indices": [] - }, - { - "kind": "array", - "element": 46 - }, - { - "kind": "object", - "properties": [ - { - "name": "description", - "type": 7, - "optional": false - }, - { - "name": "name", - "type": 7, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "catalog" - }, - { - "kind": "literal", - "value": "skill-catalog" + "value": "tool-jobs" }, { "kind": "object", "properties": [ { "name": "form", - "type": 36, + "type": 30, "optional": false }, { "name": "kind", - "type": 50, - "optional": false - }, - { - "name": "name", - "type": 7, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "skill-invocation" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 52, - "optional": false - }, - { - "name": "kind", - "type": 53, - "optional": false - }, - { - "name": "plugin", - "type": 7, - "optional": false - }, - { - "name": "sections", - "type": 54, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "snapshot" - }, - { - "kind": "literal", - "value": "plugin" - }, - { - "kind": "array", - "element": 55 - }, - { - "kind": "object", - "properties": [ - { - "name": "name", - "type": 7, - "optional": false - }, - { - "name": "text", - "type": 7, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 42, - "optional": false - }, - { - "name": "kind", - "type": 53, - "optional": false - }, - { - "name": "plugin", - "type": 7, + "type": 33, "optional": false }, { @@ -794,43 +604,298 @@ ], "indices": [] }, + { + "kind": "literal", + "value": "user-approval" + }, { "kind": "object", "properties": [ { "name": "form", - "type": 36, + "type": 30, "optional": false }, { "name": "kind", - "type": 53, + "type": 35, "optional": false }, { - "name": "plugin", + "name": "summary", "type": 7, "optional": false } ], "indices": [] }, + { + "kind": "literal", + "value": "dsh-session-title-llm" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 37, + "optional": false + }, + { + "name": "kind", + "type": 38, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "instructions" + }, + { + "kind": "literal", + "value": "hooks-claude-code" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 37, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "hooks-codex" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 37, + "optional": false + }, + { + "name": "kind", + "type": 42, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "model-selection" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 37, + "optional": false + }, + { + "name": "kind", + "type": 44, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "plan-mode" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 37, + "optional": false + }, + { + "name": "kind", + "type": 46, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "repeat-tool-reminder" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 37, + "optional": false + }, + { + "name": "kind", + "type": 48, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "runtime-context" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 37, + "optional": false + }, + { + "name": "kind", + "type": 50, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "schedule" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 37, + "optional": false + }, + { + "name": "kind", + "type": 52, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "time-context" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 37, + "optional": false + }, + { + "name": "kind", + "type": 54, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tmux-context" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 37, + "optional": false + }, + { + "name": "kind", + "type": 56, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tool-goal" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 37, + "optional": false + }, + { + "name": "kind", + "type": 31, + "optional": false + } + ], + "indices": [] + }, { "kind": "object", "properties": [ { "name": "form", - "type": 59, + "type": 37, "optional": false }, { "name": "kind", - "type": 53, + "type": 33, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 37, "optional": false }, { - "name": "plugin", - "type": 7, + "name": "kind", + "type": 35, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 61, + "optional": false + }, + { + "name": "kind", + "type": 38, "optional": false } ], @@ -850,12 +915,199 @@ }, { "name": "kind", - "type": 53, + "type": 40, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 61, "optional": false }, { - "name": "plugin", - "type": 7, + "name": "kind", + "type": 42, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 61, + "optional": false + }, + { + "name": "kind", + "type": 44, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 61, + "optional": false + }, + { + "name": "kind", + "type": 46, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 61, + "optional": false + }, + { + "name": "kind", + "type": 48, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 61, + "optional": false + }, + { + "name": "kind", + "type": 50, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 61, + "optional": false + }, + { + "name": "kind", + "type": 52, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 61, + "optional": false + }, + { + "name": "kind", + "type": 54, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 61, + "optional": false + }, + { + "name": "kind", + "type": 56, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 61, + "optional": false + }, + { + "name": "kind", + "type": 31, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 61, + "optional": false + }, + { + "name": "kind", + "type": 33, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 61, + "optional": false + }, + { + "name": "kind", + "type": 35, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 75, + "optional": false + }, + { + "name": "kind", + "type": 38, "optional": false } ], @@ -870,17 +1122,12 @@ "properties": [ { "name": "form", - "type": 47, + "type": 75, "optional": false }, { "name": "kind", - "type": 53, - "optional": false - }, - { - "name": "plugin", - "type": 7, + "type": 40, "optional": false } ], @@ -891,161 +1138,188 @@ "properties": [ { "name": "form", - "type": 59, + "type": 75, "optional": false }, { "name": "kind", - "type": 64, - "optional": false - }, - { - "name": "references", - "type": 65, - "optional": false - }, - { - "name": "version", - "type": 70, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "session-reference" - }, - { - "kind": "array", - "element": 66 - }, - { - "kind": "object", - "properties": [ - { - "name": "capturedFormatVersion", - "type": 11, - "optional": true - }, - { - "name": "capturedThroughSeq", - "type": 67, - "optional": false - }, - { - "name": "compacted", - "type": 69, - "optional": false - }, - { - "name": "inputIndex", - "type": 11, - "optional": false - }, - { - "name": "label", - "type": 7, - "optional": false - }, - { - "name": "omittedBytes", - "type": 11, - "optional": false - }, - { - "name": "omittedMessages", - "type": 11, - "optional": false - }, - { - "name": "originalMessages", - "type": 11, - "optional": false - }, - { - "name": "retainedMessages", - "type": 11, - "optional": false - }, - { - "name": "sessionId", - "type": 7, - "optional": false - }, - { - "name": "truncated", - "type": 69, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "union", - "types": [ - 11, - 68 - ] - }, - { - "kind": "primitive", - "type": "null" - }, - { - "kind": "primitive", - "type": "boolean" - }, - { - "kind": "literal", - "value": 1 - }, - { - "kind": "object", - "properties": [ - { - "name": "form", "type": 42, "optional": false - }, - { - "name": "kind", - "type": 72, - "optional": false - }, - { - "name": "senderSessionId", - "type": 7, - "optional": false - }, - { - "name": "summary", - "type": 7, - "optional": false } ], "indices": [] }, - { - "kind": "literal", - "value": "subagent-settled" - }, { "kind": "object", "properties": [ { "name": "form", - "type": 61, + "type": 75, "optional": false }, { "name": "kind", - "type": 74, + "type": 44, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 75, "optional": false }, { - "name": "senderSessionId", - "type": 7, + "name": "kind", + "type": 46, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 75, + "optional": false + }, + { + "name": "kind", + "type": 48, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 75, + "optional": false + }, + { + "name": "kind", + "type": 50, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 75, + "optional": false + }, + { + "name": "kind", + "type": 52, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 75, + "optional": false + }, + { + "name": "kind", + "type": 54, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 75, + "optional": false + }, + { + "name": "kind", + "type": 56, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 75, + "optional": false + }, + { + "name": "kind", + "type": 31, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 75, + "optional": false + }, + { + "name": "kind", + "type": 33, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 75, + "optional": false + }, + { + "name": "kind", + "type": 35, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 89, + "optional": false + }, + { + "name": "kind", + "type": 38, "optional": false } ], @@ -1053,7 +1327,199 @@ }, { "kind": "literal", - "value": "agent-message" + "value": "catalog" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 89, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 89, + "optional": false + }, + { + "name": "kind", + "type": 42, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 89, + "optional": false + }, + { + "name": "kind", + "type": 44, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 89, + "optional": false + }, + { + "name": "kind", + "type": 46, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 89, + "optional": false + }, + { + "name": "kind", + "type": 48, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 89, + "optional": false + }, + { + "name": "kind", + "type": 50, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 89, + "optional": false + }, + { + "name": "kind", + "type": 52, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 89, + "optional": false + }, + { + "name": "kind", + "type": 54, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 89, + "optional": false + }, + { + "name": "kind", + "type": 56, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 89, + "optional": false + }, + { + "name": "kind", + "type": 31, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 89, + "optional": false + }, + { + "name": "kind", + "type": 33, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 89, + "optional": false + }, + { + "name": "kind", + "type": 35, + "optional": false + } + ], + "indices": [] }, { "kind": "object", @@ -1065,17 +1531,17 @@ }, { "name": "kind", - "type": 76, + "type": 103, "optional": false }, { "name": "revision", - "type": 11, + "type": 15, "optional": false }, { "name": "round", - "type": 11, + "type": 15, "optional": false } ], @@ -1090,7 +1556,7 @@ "properties": [ { "name": "kind", - "type": 78, + "type": 105, "optional": false }, { @@ -1125,7 +1591,7 @@ "properties": [ { "name": "kind", - "type": 80, + "type": 107, "optional": false }, { @@ -1140,7 +1606,7 @@ }, { "name": "replayState", - "type": 81, + "type": 108, "optional": true } ], @@ -1159,12 +1625,132 @@ "properties": [ { "name": "kind", - "type": 53, + "type": 38, "optional": false - }, + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ { - "name": "plugin", - "type": 7, + "name": "kind", + "type": 40, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 42, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 44, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 46, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 48, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 50, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 117, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "system-prompt" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 52, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 54, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 56, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 31, "optional": false } ], @@ -1181,6 +1767,1005 @@ ], "indices": [] }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 33, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 125, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "code-mode" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 127, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "cordis-host-runner" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 35, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "baseline", + "type": 22, + "optional": true + }, + { + "name": "baselineIdentity", + "type": 7, + "optional": true + }, + { + "name": "changes", + "type": 130, + "optional": false + }, + { + "name": "form", + "type": 37, + "optional": false + }, + { + "name": "kind", + "type": 136, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "array", + "element": 131 + }, + { + "kind": "object", + "properties": [ + { + "name": "action", + "type": 132, + "optional": false + }, + { + "name": "digest", + "type": 7, + "optional": true + }, + { + "name": "path", + "type": 7, + "optional": false + }, + { + "name": "scope", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "union", + "types": [ + 133, + 134, + 135 + ] + }, + { + "kind": "literal", + "value": "remove" + }, + { + "kind": "literal", + "value": "replace" + }, + { + "kind": "literal", + "value": "set" + }, + { + "kind": "literal", + "value": "agent-instructions" + }, + { + "kind": "object", + "properties": [ + { + "name": "callId", + "type": 7, + "optional": false + }, + { + "name": "kind", + "type": 138, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tool" + }, + { + "kind": "object", + "properties": [ + { + "name": "clientTimeZone", + "type": 7, + "optional": true + }, + { + "name": "kind", + "type": 27, + "optional": false + }, + { + "name": "rpcId", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "compactionId", + "type": 7, + "optional": false + }, + { + "name": "kind", + "type": 141, + "optional": false + }, + { + "name": "sourceCommandId", + "type": 7, + "optional": true + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "compact-checkpoint" + }, + { + "kind": "object", + "properties": [ + { + "name": "deliveryId", + "type": 7, + "optional": false + }, + { + "name": "form", + "type": 30, + "optional": false + }, + { + "name": "kind", + "type": 143, + "optional": false + }, + { + "name": "provider", + "type": 7, + "optional": false + }, + { + "name": "ruleId", + "type": 7, + "optional": false + }, + { + "name": "source", + "type": 7, + "optional": false + }, + { + "name": "summary", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "webhook" + }, + { + "kind": "object", + "properties": [ + { + "name": "entries", + "type": 145, + "optional": false + }, + { + "name": "form", + "type": 89, + "optional": false + }, + { + "name": "kind", + "type": 147, + "optional": false + }, + { + "name": "update", + "type": 22, + "optional": true + } + ], + "indices": [] + }, + { + "kind": "array", + "element": 146 + }, + { + "kind": "object", + "properties": [ + { + "name": "description", + "type": 7, + "optional": false + }, + { + "name": "name", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "skill-catalog" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 37, + "optional": false + }, + { + "name": "kind", + "type": 149, + "optional": false + }, + { + "name": "name", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "skill-invocation" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 61, + "optional": false + }, + { + "name": "kind", + "type": 151, + "optional": false + }, + { + "name": "references", + "type": 152, + "optional": false + }, + { + "name": "version", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "session-reference" + }, + { + "kind": "array", + "element": 153 + }, + { + "kind": "object", + "properties": [ + { + "name": "capturedFormatVersion", + "type": 15, + "optional": true + }, + { + "name": "capturedThroughSeq", + "type": 154, + "optional": false + }, + { + "name": "compacted", + "type": 156, + "optional": false + }, + { + "name": "inputIndex", + "type": 15, + "optional": false + }, + { + "name": "label", + "type": 7, + "optional": false + }, + { + "name": "omittedBytes", + "type": 15, + "optional": false + }, + { + "name": "omittedMessages", + "type": 15, + "optional": false + }, + { + "name": "originalMessages", + "type": 15, + "optional": false + }, + { + "name": "retainedMessages", + "type": 15, + "optional": false + }, + { + "name": "sessionId", + "type": 7, + "optional": false + }, + { + "name": "truncated", + "type": 156, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "union", + "types": [ + 15, + 155 + ] + }, + { + "kind": "primitive", + "type": "null" + }, + { + "kind": "primitive", + "type": "boolean" + }, + { + "kind": "literal", + "value": 1 + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 159, + "optional": false + }, + { + "name": "kind", + "type": 38, + "optional": false + }, + { + "name": "sections", + "type": 160, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "snapshot" + }, + { + "kind": "array", + "element": 161 + }, + { + "kind": "object", + "properties": [ + { + "name": "name", + "type": 7, + "optional": false + }, + { + "name": "text", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 159, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + }, + { + "name": "sections", + "type": 160, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 159, + "optional": false + }, + { + "name": "kind", + "type": 42, + "optional": false + }, + { + "name": "sections", + "type": 160, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 159, + "optional": false + }, + { + "name": "kind", + "type": 44, + "optional": false + }, + { + "name": "sections", + "type": 160, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 159, + "optional": false + }, + { + "name": "kind", + "type": 46, + "optional": false + }, + { + "name": "sections", + "type": 160, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 159, + "optional": false + }, + { + "name": "kind", + "type": 48, + "optional": false + }, + { + "name": "sections", + "type": 160, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 159, + "optional": false + }, + { + "name": "kind", + "type": 50, + "optional": false + }, + { + "name": "sections", + "type": 160, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 159, + "optional": false + }, + { + "name": "kind", + "type": 52, + "optional": false + }, + { + "name": "sections", + "type": 160, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 159, + "optional": false + }, + { + "name": "kind", + "type": 54, + "optional": false + }, + { + "name": "sections", + "type": 160, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 159, + "optional": false + }, + { + "name": "kind", + "type": 56, + "optional": false + }, + { + "name": "sections", + "type": 160, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 159, + "optional": false + }, + { + "name": "kind", + "type": 31, + "optional": false + }, + { + "name": "sections", + "type": 160, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 159, + "optional": false + }, + { + "name": "kind", + "type": 33, + "optional": false + }, + { + "name": "sections", + "type": 160, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 159, + "optional": false + }, + { + "name": "kind", + "type": 35, + "optional": false + }, + { + "name": "sections", + "type": 160, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 30, + "optional": false + }, + { + "name": "kind", + "type": 175, + "optional": false + }, + { + "name": "senderSessionId", + "type": 7, + "optional": false + }, + { + "name": "summary", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "subagent-settled" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 75, + "optional": false + }, + { + "name": "kind", + "type": 177, + "optional": false + }, + { + "name": "senderSessionId", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "agent-message" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 30, + "optional": false + }, + { + "name": "kind", + "type": 38, + "optional": false + }, + { + "name": "summary", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 30, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + }, + { + "name": "summary", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 30, + "optional": false + }, + { + "name": "kind", + "type": 42, + "optional": false + }, + { + "name": "summary", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 30, + "optional": false + }, + { + "name": "kind", + "type": 44, + "optional": false + }, + { + "name": "summary", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 30, + "optional": false + }, + { + "name": "kind", + "type": 46, + "optional": false + }, + { + "name": "summary", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 30, + "optional": false + }, + { + "name": "kind", + "type": 48, + "optional": false + }, + { + "name": "summary", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 30, + "optional": false + }, + { + "name": "kind", + "type": 50, + "optional": false + }, + { + "name": "summary", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 30, + "optional": false + }, + { + "name": "kind", + "type": 52, + "optional": false + }, + { + "name": "summary", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 30, + "optional": false + }, + { + "name": "kind", + "type": 54, + "optional": false + }, + { + "name": "summary", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 30, + "optional": false + }, + { + "name": "kind", + "type": 56, + "optional": false + }, + { + "name": "summary", + "type": 7, + "optional": false + } + ], + "indices": [] + }, { "kind": "literal", "value": "canceled" @@ -1188,8 +2773,8 @@ { "kind": "union", "types": [ - 86, - 87 + 190, + 191 ] }, { @@ -3767,7 +5352,7 @@ "kind": "event", "event": "session/title-llm-request", "surface": false, - "digest": "2a47ef7025d7dcf7e9977aadd738e7408a210b101a7dbbd37f4d87f22166eff0", + "digest": "eb655047c0dd3f2f3aefd2c9c719df0d060dd88032ba7caf731ea39db5a6725f", "schema": { "root": 0, "nodes": [ @@ -3796,7 +5381,7 @@ }, { "name": "type", - "type": 93, + "type": 196, "optional": false } ], @@ -3822,7 +5407,7 @@ }, { "name": "route", - "type": 92, + "type": 195, "optional": false }, { @@ -3855,8 +5440,8 @@ "types": [ 6, 32, - 51, - 56 + 191, + 193 ] }, { @@ -4014,14 +5599,6 @@ 18 ] }, - { - "kind": "literal", - "value": "image/png" - }, - { - "kind": "literal", - "value": "image/webp" - }, { "kind": "literal", "value": "image/gif" @@ -4030,6 +5607,14 @@ "kind": "literal", "value": "image/jpeg" }, + { + "kind": "literal", + "value": "image/png" + }, + { + "kind": "literal", + "value": "image/webp" + }, { "kind": "object", "properties": [ @@ -4180,25 +5765,136 @@ { "name": "source", "type": 34, - "optional": false + "optional": false, + "compatibility": { + "version": 1, + "policy": "session-source-attribution", + "binding": "session.user-message.source", + "discriminator": "kind", + "unknownKinds": "preserve", + "attributionKinds": [ + "tmux-context" + ] + } } ], "indices": [] }, { "kind": "literal", - "value": "system" + "value": "user" }, { "kind": "union", "types": [ + 31, 35, + 38, 40, 42, 44, 46, - 48, - 50 + 54, + 55, + 57, + 59, + 62, + 67, + 69, + 71, + 79, + 84, + 86, + 87, + 88, + 89, + 90, + 91, + 93, + 94, + 95, + 96, + 98, + 100, + 102, + 104, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135, + 136, + 137, + 138, + 139, + 140, + 141, + 142, + 143, + 144, + 145, + 146, + 147, + 148, + 149, + 150, + 151, + 152, + 153, + 154, + 155, + 156, + 157, + 158, + 159, + 160, + 161, + 163, + 165, + 166, + 169, + 170, + 171, + 172, + 173, + 174, + 175, + 176, + 178, + 179, + 180, + 181, + 182, + 183, + 184, + 185, + 187, + 189, + 190 ] }, { @@ -4213,95 +5909,6 @@ "name": "kind", "type": 37, "optional": false - }, - { - "name": "plugin", - "type": 10, - "optional": false - }, - { - "name": "sections", - "type": 38, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "snapshot" - }, - { - "kind": "literal", - "value": "plugin" - }, - { - "kind": "array", - "element": 39 - }, - { - "kind": "object", - "properties": [ - { - "name": "name", - "type": 10, - "optional": false - }, - { - "name": "text", - "type": 10, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 41, - "optional": false - }, - { - "name": "kind", - "type": 37, - "optional": false - }, - { - "name": "plugin", - "type": 10, - "optional": false - }, - { - "name": "summary", - "type": 10, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "notice" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 43, - "optional": false - }, - { - "name": "kind", - "type": 37, - "optional": false - }, - { - "name": "plugin", - "type": 10, - "optional": false } ], "indices": [] @@ -4310,215 +5917,89 @@ "kind": "literal", "value": "instructions" }, + { + "kind": "literal", + "value": "model-selection" + }, { "kind": "object", "properties": [ { "name": "form", + "type": 36, + "optional": false + }, + { + "name": "kind", + "type": 39, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "plan-mode" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 36, + "optional": false + }, + { + "name": "kind", + "type": 41, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "repeat-tool-reminder" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 36, + "optional": false + }, + { + "name": "kind", + "type": 43, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "runtime-context" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 36, + "optional": false + }, + { + "name": "kind", "type": 45, "optional": false - }, - { - "name": "kind", - "type": 37, - "optional": false - }, - { - "name": "plugin", - "type": 10, - "optional": false } ], "indices": [] }, { "kind": "literal", - "value": "recall" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 47, - "optional": false - }, - { - "name": "kind", - "type": 37, - "optional": false - }, - { - "name": "plugin", - "type": 10, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "relay" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 49, - "optional": false - }, - { - "name": "kind", - "type": 37, - "optional": false - }, - { - "name": "plugin", - "type": 10, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "catalog" - }, - { - "kind": "object", - "properties": [ - { - "name": "kind", - "type": 37, - "optional": false - }, - { - "name": "plugin", - "type": 10, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "content", - "type": 7, - "optional": false - }, - { - "name": "id", - "type": 10, - "optional": false - }, - { - "name": "role", - "type": 52, - "optional": false - }, - { - "name": "source", - "type": 53, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "assistant" - }, - { - "kind": "object", - "properties": [ - { - "name": "kind", - "type": 54, - "optional": false - }, - { - "name": "model", - "type": 10, - "optional": false - }, - { - "name": "provider", - "type": 10, - "optional": false - }, - { - "name": "replayState", - "type": 55, - "optional": true - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "model" - }, - { - "kind": "opaque", - "reason": "unknown" - }, - { - "kind": "object", - "properties": [ - { - "name": "content", - "type": 7, - "optional": false - }, - { - "name": "id", - "type": 10, - "optional": false - }, - { - "name": "role", - "type": 57, - "optional": false - }, - { - "name": "source", - "type": 58, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "user" - }, - { - "kind": "union", - "types": [ - 31, - 35, - 40, - 42, - 44, - 46, - 48, - 50, - 53, - 59, - 67, - 68, - 70, - 74, - 76, - 83, - 85, - 87, - 89, - 91 - ] + "value": "schedule" }, { "kind": "object", @@ -4535,17 +6016,17 @@ }, { "name": "changes", - "type": 60, + "type": 47, "optional": false }, { "name": "form", - "type": 43, + "type": 36, "optional": false }, { "name": "kind", - "type": 66, + "type": 53, "optional": false } ], @@ -4553,14 +6034,14 @@ }, { "kind": "array", - "element": 61 + "element": 48 }, { "kind": "object", "properties": [ { "name": "action", - "type": 62, + "type": 49, "optional": false }, { @@ -4584,11 +6065,15 @@ { "kind": "union", "types": [ - 63, - 64, - 65 + 50, + 51, + 52 ] }, + { + "kind": "literal", + "value": "remove" + }, { "kind": "literal", "value": "replace" @@ -4597,10 +6082,6 @@ "kind": "literal", "value": "set" }, - { - "kind": "literal", - "value": "remove" - }, { "kind": "literal", "value": "agent-instructions" @@ -4615,7 +6096,7 @@ }, { "name": "kind", - "type": 57, + "type": 33, "optional": false }, { @@ -4626,6 +6107,51 @@ ], "indices": [] }, + { + "kind": "object", + "properties": [ + { + "name": "compactionId", + "type": 10, + "optional": false + }, + { + "name": "kind", + "type": 56, + "optional": false + }, + { + "name": "sourceCommandId", + "type": 10, + "optional": true + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "compact-checkpoint" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 36, + "optional": false + }, + { + "name": "kind", + "type": 58, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "time-context" + }, { "kind": "object", "properties": [ @@ -4636,12 +6162,12 @@ }, { "name": "form", - "type": 41, + "type": 60, "optional": false }, { "name": "kind", - "type": 69, + "type": 61, "optional": false }, { @@ -4667,6 +6193,10 @@ ], "indices": [] }, + { + "kind": "literal", + "value": "notice" + }, { "kind": "literal", "value": "webhook" @@ -4676,17 +6206,17 @@ "properties": [ { "name": "entries", - "type": 71, + "type": 63, "optional": false }, { "name": "form", - "type": 49, + "type": 65, "optional": false }, { "name": "kind", - "type": 73, + "type": 66, "optional": false }, { @@ -4699,7 +6229,7 @@ }, { "kind": "array", - "element": 72 + "element": 64 }, { "kind": "object", @@ -4717,6 +6247,10 @@ ], "indices": [] }, + { + "kind": "literal", + "value": "catalog" + }, { "kind": "literal", "value": "skill-catalog" @@ -4726,12 +6260,32 @@ "properties": [ { "name": "form", - "type": 43, + "type": 36, "optional": false }, { "name": "kind", - "type": 75, + "type": 68, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tmux-context" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 36, + "optional": false + }, + { + "name": "kind", + "type": 70, "optional": false }, { @@ -4751,34 +6305,38 @@ "properties": [ { "name": "form", - "type": 45, + "type": 72, "optional": false }, { "name": "kind", - "type": 77, + "type": 73, "optional": false }, { "name": "references", - "type": 78, + "type": 74, "optional": false }, { "name": "version", - "type": 82, + "type": 78, "optional": false } ], "indices": [] }, + { + "kind": "literal", + "value": "recall" + }, { "kind": "literal", "value": "session-reference" }, { "kind": "array", - "element": 79 + "element": 75 }, { "kind": "object", @@ -4790,7 +6348,7 @@ }, { "name": "capturedThroughSeq", - "type": 80, + "type": 76, "optional": false }, { @@ -4845,7 +6403,7 @@ "kind": "union", "types": [ 2, - 81 + 77 ] }, { @@ -4861,12 +6419,349 @@ "properties": [ { "name": "form", - "type": 41, + "type": 80, "optional": false }, { "name": "kind", - "type": 84, + "type": 81, + "optional": false + }, + { + "name": "sections", + "type": 82, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "snapshot" + }, + { + "kind": "literal", + "value": "hooks-claude-code" + }, + { + "kind": "array", + "element": 83 + }, + { + "kind": "object", + "properties": [ + { + "name": "name", + "type": 10, + "optional": false + }, + { + "name": "text", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 80, + "optional": false + }, + { + "name": "kind", + "type": 85, + "optional": false + }, + { + "name": "sections", + "type": 82, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "hooks-codex" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 80, + "optional": false + }, + { + "name": "kind", + "type": 37, + "optional": false + }, + { + "name": "sections", + "type": 82, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 80, + "optional": false + }, + { + "name": "kind", + "type": 39, + "optional": false + }, + { + "name": "sections", + "type": 82, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 80, + "optional": false + }, + { + "name": "kind", + "type": 41, + "optional": false + }, + { + "name": "sections", + "type": 82, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 80, + "optional": false + }, + { + "name": "kind", + "type": 43, + "optional": false + }, + { + "name": "sections", + "type": 82, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 80, + "optional": false + }, + { + "name": "kind", + "type": 45, + "optional": false + }, + { + "name": "sections", + "type": 82, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 36, + "optional": false + }, + { + "name": "kind", + "type": 92, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tool-goal" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 80, + "optional": false + }, + { + "name": "kind", + "type": 58, + "optional": false + }, + { + "name": "sections", + "type": 82, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 80, + "optional": false + }, + { + "name": "kind", + "type": 68, + "optional": false + }, + { + "name": "sections", + "type": 82, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 80, + "optional": false + }, + { + "name": "kind", + "type": 92, + "optional": false + }, + { + "name": "sections", + "type": 82, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 80, + "optional": false + }, + { + "name": "kind", + "type": 97, + "optional": false + }, + { + "name": "sections", + "type": 82, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tool-jobs" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 80, + "optional": false + }, + { + "name": "kind", + "type": 99, + "optional": false + }, + { + "name": "sections", + "type": 82, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "user-approval" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 80, + "optional": false + }, + { + "name": "kind", + "type": 101, + "optional": false + }, + { + "name": "sections", + "type": 82, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "dsh-session-title-llm" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 60, + "optional": false + }, + { + "name": "kind", + "type": 103, "optional": false }, { @@ -4891,12 +6786,12 @@ "properties": [ { "name": "form", - "type": 47, + "type": 105, "optional": false }, { "name": "kind", - "type": 86, + "type": 106, "optional": false }, { @@ -4907,10 +6802,938 @@ ], "indices": [] }, + { + "kind": "literal", + "value": "relay" + }, { "kind": "literal", "value": "agent-message" }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 60, + "optional": false + }, + { + "name": "kind", + "type": 81, + "optional": false + }, + { + "name": "summary", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 36, + "optional": false + }, + { + "name": "kind", + "type": 97, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 60, + "optional": false + }, + { + "name": "kind", + "type": 85, + "optional": false + }, + { + "name": "summary", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 60, + "optional": false + }, + { + "name": "kind", + "type": 37, + "optional": false + }, + { + "name": "summary", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 60, + "optional": false + }, + { + "name": "kind", + "type": 39, + "optional": false + }, + { + "name": "summary", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 60, + "optional": false + }, + { + "name": "kind", + "type": 41, + "optional": false + }, + { + "name": "summary", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 60, + "optional": false + }, + { + "name": "kind", + "type": 43, + "optional": false + }, + { + "name": "summary", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 60, + "optional": false + }, + { + "name": "kind", + "type": 45, + "optional": false + }, + { + "name": "summary", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 60, + "optional": false + }, + { + "name": "kind", + "type": 58, + "optional": false + }, + { + "name": "summary", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 36, + "optional": false + }, + { + "name": "kind", + "type": 99, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 36, + "optional": false + }, + { + "name": "kind", + "type": 101, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 81, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 85, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 37, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 39, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 41, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 43, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 45, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 60, + "optional": false + }, + { + "name": "kind", + "type": 68, + "optional": false + }, + { + "name": "summary", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 58, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 68, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 92, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 97, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 99, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 101, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 105, + "optional": false + }, + { + "name": "kind", + "type": 81, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 105, + "optional": false + }, + { + "name": "kind", + "type": 85, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 105, + "optional": false + }, + { + "name": "kind", + "type": 37, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 60, + "optional": false + }, + { + "name": "kind", + "type": 92, + "optional": false + }, + { + "name": "summary", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 105, + "optional": false + }, + { + "name": "kind", + "type": 39, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 105, + "optional": false + }, + { + "name": "kind", + "type": 41, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 105, + "optional": false + }, + { + "name": "kind", + "type": 43, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 105, + "optional": false + }, + { + "name": "kind", + "type": 45, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 105, + "optional": false + }, + { + "name": "kind", + "type": 58, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 105, + "optional": false + }, + { + "name": "kind", + "type": 68, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 105, + "optional": false + }, + { + "name": "kind", + "type": 92, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 105, + "optional": false + }, + { + "name": "kind", + "type": 97, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 105, + "optional": false + }, + { + "name": "kind", + "type": 99, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 60, + "optional": false + }, + { + "name": "kind", + "type": 97, + "optional": false + }, + { + "name": "summary", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 105, + "optional": false + }, + { + "name": "kind", + "type": 101, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 81, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 85, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 37, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 39, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 41, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 43, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 45, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 58, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 60, + "optional": false + }, + { + "name": "kind", + "type": 99, + "optional": false + }, + { + "name": "summary", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 68, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 92, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 97, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 99, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 101, + "optional": false + } + ], + "indices": [] + }, { "kind": "object", "properties": [ @@ -4921,7 +7744,7 @@ }, { "name": "kind", - "type": 88, + "type": 162, "optional": false }, { @@ -4946,7 +7769,7 @@ "properties": [ { "name": "kind", - "type": 90, + "type": 164, "optional": false }, { @@ -4979,14 +7802,349 @@ { "kind": "object", "properties": [ + { + "name": "form", + "type": 60, + "optional": false + }, { "name": "kind", - "type": 57, + "type": 101, + "optional": false + }, + { + "name": "summary", + "type": 10, "optional": false } ], "indices": [] }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 167, + "optional": false + }, + { + "name": "model", + "type": 10, + "optional": false + }, + { + "name": "provider", + "type": 10, + "optional": false + }, + { + "name": "replayState", + "type": 168, + "optional": true + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "model" + }, + { + "kind": "opaque", + "reason": "unknown" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 81, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 85, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 37, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 39, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 41, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 43, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 45, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 177, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "system-prompt" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 36, + "optional": false + }, + { + "name": "kind", + "type": 81, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 58, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 68, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 92, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 97, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 33, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 99, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 186, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "code-mode" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 188, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "cordis-host-runner" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 101, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 36, + "optional": false + }, + { + "name": "kind", + "type": 85, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "content", + "type": 7, + "optional": false + }, + { + "name": "id", + "type": 10, + "optional": false + }, + { + "name": "role", + "type": 192, + "optional": false + }, + { + "name": "source", + "type": 166, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "assistant" + }, + { + "kind": "object", + "properties": [ + { + "name": "content", + "type": 7, + "optional": false + }, + { + "name": "id", + "type": 10, + "optional": false + }, + { + "name": "role", + "type": 194, + "optional": false + }, + { + "name": "source", + "type": 176, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "system" + }, { "kind": "object", "properties": [ @@ -5015,7 +8173,7 @@ "kind": "event", "event": "system/message", "surface": true, - "digest": "1772581b17e1fab970fda49f04ffae2a181b7992ca4efa63bffe5f8b2bd62300", + "digest": "54a8682615a7ffc3e1e3c41ab003ae61082ae2792c57407f5bd8bb38fded3f0e", "schema": { "root": 0, "nodes": [ @@ -5029,32 +8187,32 @@ }, { "name": "ignorable", - "type": 17, + "type": 15, "optional": true }, { "name": "seq", - "type": 10, + "type": 8, "optional": false }, { "name": "sourceEventSeqs", - "type": 44, + "type": 29, "optional": true }, { "name": "surfaceOp", - "type": 45, + "type": 30, "optional": false }, { "name": "time", - "type": 10, + "type": 8, "optional": false }, { "name": "type", - "type": 49, + "type": 34, "optional": false } ], @@ -5070,12 +8228,12 @@ }, { "name": "step", - "type": 10, + "type": 8, "optional": false }, { "name": "turn", - "type": 10, + "type": 8, "optional": false } ], @@ -5091,7 +8249,7 @@ }, { "name": "id", - "type": 6, + "type": 7, "optional": false }, { @@ -5115,62 +8273,28 @@ "kind": "union", "types": [ 5, - 8, - 19, + 17, + 20, 22, 24 ] }, - { - "kind": "object", - "properties": [ - { - "name": "arguments", - "type": 6, - "optional": false - }, - { - "name": "id", - "type": 6, - "optional": false - }, - { - "name": "name", - "type": 6, - "optional": false - }, - { - "name": "type", - "type": 7, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "primitive", - "type": "string" - }, - { - "kind": "literal", - "value": "tool-call" - }, { "kind": "object", "properties": [ { "name": "attachment", - "type": 9, + "type": 6, "optional": false }, { "name": "offloaded", - "type": 17, + "type": 15, "optional": true }, { "name": "type", - "type": 18, + "type": 16, "optional": false } ], @@ -5181,42 +8305,46 @@ "properties": [ { "name": "attachmentId", - "type": 6, + "type": 7, "optional": false }, { "name": "bytes", - "type": 10, + "type": 8, "optional": false }, { "name": "height", - "type": 10, + "type": 8, "optional": false }, { "name": "mediaType", - "type": 11, + "type": 9, "optional": false }, { "name": "name", - "type": 6, + "type": 7, "optional": true }, { "name": "originalDimensions", - "type": 16, + "type": 14, "optional": true }, { "name": "width", - "type": 10, + "type": 8, "optional": false } ], "indices": [] }, + { + "kind": "primitive", + "type": "string" + }, { "kind": "primitive", "type": "number" @@ -5224,10 +8352,10 @@ { "kind": "union", "types": [ + 10, + 11, 12, - 13, - 14, - 15 + 13 ] }, { @@ -5251,12 +8379,12 @@ "properties": [ { "name": "height", - "type": 10, + "type": 8, "optional": false }, { "name": "width", - "type": 10, + "type": 8, "optional": false } ], @@ -5275,12 +8403,12 @@ "properties": [ { "name": "attachment", - "type": 20, + "type": 18, "optional": false }, { "name": "type", - "type": 21, + "type": 19, "optional": false } ], @@ -5291,17 +8419,17 @@ "properties": [ { "name": "attachmentId", - "type": 6, + "type": 7, "optional": false }, { "name": "bytes", - "type": 10, + "type": 8, "optional": false }, { "name": "name", - "type": 6, + "type": 7, "optional": false } ], @@ -5316,7 +8444,27 @@ "properties": [ { "name": "text", - "type": 6, + "type": 7, + "optional": false + }, + { + "name": "type", + "type": 21, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "text" + }, + { + "kind": "object", + "properties": [ + { + "name": "text", + "type": 7, "optional": false }, { @@ -5335,8 +8483,18 @@ "kind": "object", "properties": [ { - "name": "text", - "type": 6, + "name": "arguments", + "type": 7, + "optional": false + }, + { + "name": "id", + "type": 7, + "optional": false + }, + { + "name": "name", + "type": 7, "optional": false }, { @@ -5349,45 +8507,18 @@ }, { "kind": "literal", - "value": "text" + "value": "tool-call" }, { "kind": "literal", "value": "system" }, - { - "kind": "union", - "types": [ - 28, - 33, - 35, - 37, - 39, - 41, - 43 - ] - }, { "kind": "object", "properties": [ - { - "name": "form", - "type": 29, - "optional": false - }, { "name": "kind", - "type": 30, - "optional": false - }, - { - "name": "plugin", - "type": 6, - "optional": false - }, - { - "name": "sections", - "type": 31, + "type": 28, "optional": false } ], @@ -5395,187 +8526,17 @@ }, { "kind": "literal", - "value": "snapshot" - }, - { - "kind": "literal", - "value": "plugin" + "value": "system-prompt" }, { "kind": "array", - "element": 32 - }, - { - "kind": "object", - "properties": [ - { - "name": "name", - "type": 6, - "optional": false - }, - { - "name": "text", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 34, - "optional": false - }, - { - "name": "kind", - "type": 30, - "optional": false - }, - { - "name": "plugin", - "type": 6, - "optional": false - }, - { - "name": "summary", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "notice" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 36, - "optional": false - }, - { - "name": "kind", - "type": 30, - "optional": false - }, - { - "name": "plugin", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "recall" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 38, - "optional": false - }, - { - "name": "kind", - "type": 30, - "optional": false - }, - { - "name": "plugin", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "relay" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 40, - "optional": false - }, - { - "name": "kind", - "type": 30, - "optional": false - }, - { - "name": "plugin", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "catalog" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 42, - "optional": false - }, - { - "name": "kind", - "type": 30, - "optional": false - }, - { - "name": "plugin", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "instructions" - }, - { - "kind": "object", - "properties": [ - { - "name": "kind", - "type": 30, - "optional": false - }, - { - "name": "plugin", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "array", - "element": 10 + "element": 8 }, { "kind": "union", "types": [ - 46, - 48 + 31, + 33 ] }, { @@ -5583,17 +8544,17 @@ "properties": [ { "name": "endSeq", - "type": 10, + "type": 8, "optional": false }, { "name": "op", - "type": 47, + "type": 32, "optional": false }, { "name": "startSeq", - "type": 10, + "type": 8, "optional": false } ], @@ -7142,7 +10103,7 @@ "kind": "event", "event": "user/message", "surface": true, - "digest": "5274b395e7bf6660d020fba7e29a1e20ef2e77097fd7597e9debb13e45c540d6", + "digest": "46c44941f6e93a1764c49f1487e64a57f73ee68a75a657e94c326a8de5d8ad95", "schema": { "root": 0, "nodes": [ @@ -7156,32 +10117,32 @@ }, { "name": "ignorable", - "type": 16, + "type": 20, "optional": true }, { "name": "seq", - "type": 9, + "type": 13, "optional": false }, { "name": "sourceEventSeqs", - "type": 82, + "type": 186, "optional": true }, { "name": "surfaceOp", - "type": 83, + "type": 187, "optional": false }, { "name": "time", - "type": 9, + "type": 13, "optional": false }, { "name": "type", - "type": 86, + "type": 190, "optional": false } ], @@ -7208,7 +10169,17 @@ { "name": "source", "type": 26, - "optional": false + "optional": false, + "compatibility": { + "version": 1, + "policy": "session-source-attribution", + "binding": "session.user-message.source", + "discriminator": "kind", + "unknownKinds": "preserve", + "attributionKinds": [ + "tmux-context" + ] + } } ], "indices": [] @@ -7222,11 +10193,55 @@ "types": [ 4, 7, - 18, - 21, - 23 + 9, + 11, + 22 ] }, + { + "kind": "object", + "properties": [ + { + "name": "text", + "type": 5, + "optional": false + }, + { + "name": "type", + "type": 6, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "primitive", + "type": "string" + }, + { + "kind": "literal", + "value": "reasoning" + }, + { + "kind": "object", + "properties": [ + { + "name": "text", + "type": 5, + "optional": false + }, + { + "name": "type", + "type": 8, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "text" + }, { "kind": "object", "properties": [ @@ -7247,16 +10262,12 @@ }, { "name": "type", - "type": 6, + "type": 10, "optional": false } ], "indices": [] }, - { - "kind": "primitive", - "type": "string" - }, { "kind": "literal", "value": "tool-call" @@ -7266,17 +10277,17 @@ "properties": [ { "name": "attachment", - "type": 8, + "type": 12, "optional": false }, { "name": "offloaded", - "type": 16, + "type": 20, "optional": true }, { "name": "type", - "type": 17, + "type": 21, "optional": false } ], @@ -7292,17 +10303,17 @@ }, { "name": "bytes", - "type": 9, + "type": 13, "optional": false }, { "name": "height", - "type": 9, + "type": 13, "optional": false }, { "name": "mediaType", - "type": 10, + "type": 14, "optional": false }, { @@ -7312,12 +10323,12 @@ }, { "name": "originalDimensions", - "type": 15, + "type": 19, "optional": true }, { "name": "width", - "type": 9, + "type": 13, "optional": false } ], @@ -7330,20 +10341,12 @@ { "kind": "union", "types": [ - 11, - 12, - 13, - 14 + 15, + 16, + 17, + 18 ] }, - { - "kind": "literal", - "value": "image/png" - }, - { - "kind": "literal", - "value": "image/webp" - }, { "kind": "literal", "value": "image/gif" @@ -7352,17 +10355,25 @@ "kind": "literal", "value": "image/jpeg" }, + { + "kind": "literal", + "value": "image/png" + }, + { + "kind": "literal", + "value": "image/webp" + }, { "kind": "object", "properties": [ { "name": "height", - "type": 9, + "type": 13, "optional": false }, { "name": "width", - "type": 9, + "type": 13, "optional": false } ], @@ -7381,12 +10392,12 @@ "properties": [ { "name": "attachment", - "type": 19, + "type": 23, "optional": false }, { "name": "type", - "type": 20, + "type": 24, "optional": false } ], @@ -7402,7 +10413,7 @@ }, { "name": "bytes", - "type": 9, + "type": 13, "optional": false }, { @@ -7417,46 +10428,6 @@ "kind": "literal", "value": "file" }, - { - "kind": "object", - "properties": [ - { - "name": "text", - "type": 5, - "optional": false - }, - { - "name": "type", - "type": 22, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "reasoning" - }, - { - "kind": "object", - "properties": [ - { - "name": "text", - "type": 5, - "optional": false - }, - { - "name": "type", - "type": 24, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "text" - }, { "kind": "literal", "value": "user" @@ -7465,188 +10436,126 @@ "kind": "union", "types": [ 27, - 36, - 38, + 30, + 32, + 35, + 37, 39, - 42, + 41, + 43, + 45, 47, 49, - 54, + 51, + 53, 55, 56, - 58, + 57, + 59, 60, 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, 69, + 70, 71, 73, + 74, 75, + 76, 77, + 78, + 79, 80, - 81 + 81, + 82, + 83, + 84, + 85, + 87, + 88, + 89, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97, + 98, + 99, + 101, + 103, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 123, + 125, + 126, + 134, + 136, + 137, + 139, + 141, + 145, + 147, + 155, + 159, + 160, + 161, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 173, + 175, + 176, + 177, + 178, + 179, + 180, + 181, + 182, + 183, + 184, + 185 ] }, { "kind": "object", "properties": [ { - "name": "baseline", - "type": 16, - "optional": true - }, - { - "name": "baselineIdentity", - "type": 5, - "optional": true - }, - { - "name": "changes", + "name": "form", "type": 28, "optional": false }, - { - "name": "form", - "type": 34, - "optional": false - }, { "name": "kind", - "type": 35, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "array", - "element": 29 - }, - { - "kind": "object", - "properties": [ - { - "name": "action", - "type": 30, - "optional": false - }, - { - "name": "digest", - "type": 5, - "optional": true - }, - { - "name": "path", - "type": 5, - "optional": false - }, - { - "name": "scope", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "union", - "types": [ - 31, - 32, - 33 - ] - }, - { - "kind": "literal", - "value": "remove" - }, - { - "kind": "literal", - "value": "replace" - }, - { - "kind": "literal", - "value": "set" - }, - { - "kind": "literal", - "value": "instructions" - }, - { - "kind": "literal", - "value": "agent-instructions" - }, - { - "kind": "object", - "properties": [ - { - "name": "callId", - "type": 5, - "optional": false - }, - { - "name": "kind", - "type": 37, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "tool" - }, - { - "kind": "object", - "properties": [ - { - "name": "clientTimeZone", - "type": 5, - "optional": true - }, - { - "name": "kind", - "type": 25, - "optional": false - }, - { - "name": "rpcId", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "deliveryId", - "type": 5, - "optional": false - }, - { - "name": "form", - "type": 40, - "optional": false - }, - { - "name": "kind", - "type": 41, - "optional": false - }, - { - "name": "provider", - "type": 5, - "optional": false - }, - { - "name": "ruleId", - "type": 5, - "optional": false - }, - { - "name": "source", - "type": 5, + "type": 29, "optional": false }, { @@ -7663,157 +10572,19 @@ }, { "kind": "literal", - "value": "webhook" - }, - { - "kind": "object", - "properties": [ - { - "name": "entries", - "type": 43, - "optional": false - }, - { - "name": "form", - "type": 45, - "optional": false - }, - { - "name": "kind", - "type": 46, - "optional": false - }, - { - "name": "update", - "type": 16, - "optional": true - } - ], - "indices": [] - }, - { - "kind": "array", - "element": 44 - }, - { - "kind": "object", - "properties": [ - { - "name": "description", - "type": 5, - "optional": false - }, - { - "name": "name", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "catalog" - }, - { - "kind": "literal", - "value": "skill-catalog" + "value": "user-approval" }, { "kind": "object", "properties": [ { "name": "form", - "type": 34, + "type": 28, "optional": false }, { "name": "kind", - "type": 48, - "optional": false - }, - { - "name": "name", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "skill-invocation" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 50, - "optional": false - }, - { - "name": "kind", - "type": 51, - "optional": false - }, - { - "name": "plugin", - "type": 5, - "optional": false - }, - { - "name": "sections", - "type": 52, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "snapshot" - }, - { - "kind": "literal", - "value": "plugin" - }, - { - "kind": "array", - "element": 53 - }, - { - "kind": "object", - "properties": [ - { - "name": "name", - "type": 5, - "optional": false - }, - { - "name": "text", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 40, - "optional": false - }, - { - "name": "kind", - "type": 51, - "optional": false - }, - { - "name": "plugin", - "type": 5, + "type": 31, "optional": false }, { @@ -7824,22 +10595,245 @@ ], "indices": [] }, + { + "kind": "literal", + "value": "dsh-session-title-llm" + }, { "kind": "object", "properties": [ { "name": "form", - "type": 34, + "type": 33, "optional": false }, { "name": "kind", - "type": 51, + "type": 34, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "instructions" + }, + { + "kind": "literal", + "value": "hooks-claude-code" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 33, "optional": false }, { - "name": "plugin", - "type": 5, + "name": "kind", + "type": 36, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "hooks-codex" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 38, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "model-selection" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "plan-mode" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 42, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "repeat-tool-reminder" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 44, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "runtime-context" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 46, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "schedule" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 48, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "time-context" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 50, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tmux-context" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 52, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tool-goal" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 54, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tool-jobs" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 29, "optional": false } ], @@ -7850,17 +10844,28 @@ "properties": [ { "name": "form", - "type": 57, + "type": 33, "optional": false }, { "name": "kind", - "type": 51, + "type": 31, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, "optional": false }, { - "name": "plugin", - "type": 5, + "name": "kind", + "type": 34, "optional": false } ], @@ -7875,17 +10880,204 @@ "properties": [ { "name": "form", - "type": 59, + "type": 58, "optional": false }, { "name": "kind", - "type": 51, + "type": 36, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, "optional": false }, { - "name": "plugin", - "type": 5, + "name": "kind", + "type": 38, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, + "optional": false + }, + { + "name": "kind", + "type": 42, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, + "optional": false + }, + { + "name": "kind", + "type": 44, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, + "optional": false + }, + { + "name": "kind", + "type": 46, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, + "optional": false + }, + { + "name": "kind", + "type": 48, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, + "optional": false + }, + { + "name": "kind", + "type": 50, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, + "optional": false + }, + { + "name": "kind", + "type": 52, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, + "optional": false + }, + { + "name": "kind", + "type": 54, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, + "optional": false + }, + { + "name": "kind", + "type": 29, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, + "optional": false + }, + { + "name": "kind", + "type": 31, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 34, "optional": false } ], @@ -7900,182 +11092,204 @@ "properties": [ { "name": "form", - "type": 45, - "optional": false - }, - { - "name": "kind", - "type": 51, - "optional": false - }, - { - "name": "plugin", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 57, - "optional": false - }, - { - "name": "kind", - "type": 62, - "optional": false - }, - { - "name": "references", - "type": 63, - "optional": false - }, - { - "name": "version", - "type": 68, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "session-reference" - }, - { - "kind": "array", - "element": 64 - }, - { - "kind": "object", - "properties": [ - { - "name": "capturedFormatVersion", - "type": 9, - "optional": true - }, - { - "name": "capturedThroughSeq", - "type": 65, - "optional": false - }, - { - "name": "compacted", - "type": 67, - "optional": false - }, - { - "name": "inputIndex", - "type": 9, - "optional": false - }, - { - "name": "label", - "type": 5, - "optional": false - }, - { - "name": "omittedBytes", - "type": 9, - "optional": false - }, - { - "name": "omittedMessages", - "type": 9, - "optional": false - }, - { - "name": "originalMessages", - "type": 9, - "optional": false - }, - { - "name": "retainedMessages", - "type": 9, - "optional": false - }, - { - "name": "sessionId", - "type": 5, - "optional": false - }, - { - "name": "truncated", - "type": 67, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "union", - "types": [ - 9, - 66 - ] - }, - { - "kind": "primitive", - "type": "null" - }, - { - "kind": "primitive", - "type": "boolean" - }, - { - "kind": "literal", - "value": 1 - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 40, - "optional": false - }, - { - "name": "kind", - "type": 70, - "optional": false - }, - { - "name": "senderSessionId", - "type": 5, - "optional": false - }, - { - "name": "summary", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "subagent-settled" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 59, - "optional": false - }, - { - "name": "kind", "type": 72, "optional": false }, { - "name": "senderSessionId", - "type": 5, + "name": "kind", + "type": 36, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 38, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 42, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 44, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 46, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 48, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 50, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 52, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 54, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 29, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 31, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 34, "optional": false } ], @@ -8083,7 +11297,199 @@ }, { "kind": "literal", - "value": "agent-message" + "value": "catalog" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 36, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 38, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 42, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 44, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 46, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 48, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 50, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 52, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 54, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 29, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 31, + "optional": false + } + ], + "indices": [] }, { "kind": "object", @@ -8095,17 +11501,17 @@ }, { "name": "kind", - "type": 74, + "type": 100, "optional": false }, { "name": "revision", - "type": 9, + "type": 13, "optional": false }, { "name": "round", - "type": 9, + "type": 13, "optional": false } ], @@ -8120,7 +11526,7 @@ "properties": [ { "name": "kind", - "type": 76, + "type": 102, "optional": false }, { @@ -8155,7 +11561,7 @@ "properties": [ { "name": "kind", - "type": 78, + "type": 104, "optional": false }, { @@ -8170,7 +11576,7 @@ }, { "name": "replayState", - "type": 79, + "type": 105, "optional": true } ], @@ -8189,12 +11595,132 @@ "properties": [ { "name": "kind", - "type": 51, + "type": 34, "optional": false - }, + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ { - "name": "plugin", - "type": 5, + "name": "kind", + "type": 36, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 38, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 40, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 42, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 44, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 46, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 114, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "system-prompt" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 48, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 50, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 52, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 54, "optional": false } ], @@ -8211,15 +11737,1035 @@ ], "indices": [] }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 29, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 122, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "code-mode" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 124, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "cordis-host-runner" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 31, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "baseline", + "type": 20, + "optional": true + }, + { + "name": "baselineIdentity", + "type": 5, + "optional": true + }, + { + "name": "changes", + "type": 127, + "optional": false + }, + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 133, + "optional": false + } + ], + "indices": [] + }, { "kind": "array", - "element": 9 + "element": 128 + }, + { + "kind": "object", + "properties": [ + { + "name": "action", + "type": 129, + "optional": false + }, + { + "name": "digest", + "type": 5, + "optional": true + }, + { + "name": "path", + "type": 5, + "optional": false + }, + { + "name": "scope", + "type": 5, + "optional": false + } + ], + "indices": [] }, { "kind": "union", "types": [ - 84, - 85 + 130, + 131, + 132 + ] + }, + { + "kind": "literal", + "value": "remove" + }, + { + "kind": "literal", + "value": "replace" + }, + { + "kind": "literal", + "value": "set" + }, + { + "kind": "literal", + "value": "agent-instructions" + }, + { + "kind": "object", + "properties": [ + { + "name": "callId", + "type": 5, + "optional": false + }, + { + "name": "kind", + "type": 135, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tool" + }, + { + "kind": "object", + "properties": [ + { + "name": "clientTimeZone", + "type": 5, + "optional": true + }, + { + "name": "kind", + "type": 25, + "optional": false + }, + { + "name": "rpcId", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "compactionId", + "type": 5, + "optional": false + }, + { + "name": "kind", + "type": 138, + "optional": false + }, + { + "name": "sourceCommandId", + "type": 5, + "optional": true + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "compact-checkpoint" + }, + { + "kind": "object", + "properties": [ + { + "name": "deliveryId", + "type": 5, + "optional": false + }, + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 140, + "optional": false + }, + { + "name": "provider", + "type": 5, + "optional": false + }, + { + "name": "ruleId", + "type": 5, + "optional": false + }, + { + "name": "source", + "type": 5, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "webhook" + }, + { + "kind": "object", + "properties": [ + { + "name": "entries", + "type": 142, + "optional": false + }, + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 144, + "optional": false + }, + { + "name": "update", + "type": 20, + "optional": true + } + ], + "indices": [] + }, + { + "kind": "array", + "element": 143 + }, + { + "kind": "object", + "properties": [ + { + "name": "description", + "type": 5, + "optional": false + }, + { + "name": "name", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "skill-catalog" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 146, + "optional": false + }, + { + "name": "name", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "skill-invocation" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, + "optional": false + }, + { + "name": "kind", + "type": 148, + "optional": false + }, + { + "name": "references", + "type": 149, + "optional": false + }, + { + "name": "version", + "type": 154, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "session-reference" + }, + { + "kind": "array", + "element": 150 + }, + { + "kind": "object", + "properties": [ + { + "name": "capturedFormatVersion", + "type": 13, + "optional": true + }, + { + "name": "capturedThroughSeq", + "type": 151, + "optional": false + }, + { + "name": "compacted", + "type": 153, + "optional": false + }, + { + "name": "inputIndex", + "type": 13, + "optional": false + }, + { + "name": "label", + "type": 5, + "optional": false + }, + { + "name": "omittedBytes", + "type": 13, + "optional": false + }, + { + "name": "omittedMessages", + "type": 13, + "optional": false + }, + { + "name": "originalMessages", + "type": 13, + "optional": false + }, + { + "name": "retainedMessages", + "type": 13, + "optional": false + }, + { + "name": "sessionId", + "type": 5, + "optional": false + }, + { + "name": "truncated", + "type": 153, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "union", + "types": [ + 13, + 152 + ] + }, + { + "kind": "primitive", + "type": "null" + }, + { + "kind": "primitive", + "type": "boolean" + }, + { + "kind": "literal", + "value": 1 + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 156, + "optional": false + }, + { + "name": "kind", + "type": 34, + "optional": false + }, + { + "name": "sections", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "snapshot" + }, + { + "kind": "array", + "element": 158 + }, + { + "kind": "object", + "properties": [ + { + "name": "name", + "type": 5, + "optional": false + }, + { + "name": "text", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 156, + "optional": false + }, + { + "name": "kind", + "type": 36, + "optional": false + }, + { + "name": "sections", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 156, + "optional": false + }, + { + "name": "kind", + "type": 38, + "optional": false + }, + { + "name": "sections", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 156, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + }, + { + "name": "sections", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 156, + "optional": false + }, + { + "name": "kind", + "type": 42, + "optional": false + }, + { + "name": "sections", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 156, + "optional": false + }, + { + "name": "kind", + "type": 44, + "optional": false + }, + { + "name": "sections", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 156, + "optional": false + }, + { + "name": "kind", + "type": 46, + "optional": false + }, + { + "name": "sections", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 156, + "optional": false + }, + { + "name": "kind", + "type": 48, + "optional": false + }, + { + "name": "sections", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 156, + "optional": false + }, + { + "name": "kind", + "type": 50, + "optional": false + }, + { + "name": "sections", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 156, + "optional": false + }, + { + "name": "kind", + "type": 52, + "optional": false + }, + { + "name": "sections", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 156, + "optional": false + }, + { + "name": "kind", + "type": 54, + "optional": false + }, + { + "name": "sections", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 156, + "optional": false + }, + { + "name": "kind", + "type": 29, + "optional": false + }, + { + "name": "sections", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 156, + "optional": false + }, + { + "name": "kind", + "type": 31, + "optional": false + }, + { + "name": "sections", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 172, + "optional": false + }, + { + "name": "senderSessionId", + "type": 5, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "subagent-settled" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 174, + "optional": false + }, + { + "name": "senderSessionId", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "agent-message" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 34, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 36, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 38, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 42, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 44, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 46, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 48, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 50, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 52, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 54, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "array", + "element": 13 + }, + { + "kind": "union", + "types": [ + 188, + 189 ] }, { @@ -8231,17 +12777,17 @@ "properties": [ { "name": "endSeq", - "type": 9, + "type": 13, "optional": false }, { "name": "op", - "type": 32, + "type": 131, "optional": false }, { "name": "startSeq", - "type": 9, + "type": 13, "optional": false } ], diff --git a/docs/persistence-changes/2026-09-16-session-format-v4.zh.md b/docs/persistence-changes/2026-09-16-session-format-v4.zh.md index dbce32b89a..bd11a72eba 100644 --- a/docs/persistence-changes/2026-09-16-session-format-v4.zh.md +++ b/docs/persistence-changes/2026-09-16-session-format-v4.zh.md @@ -9,7 +9,7 @@ kind: persistence-change ## 概述 -将 V4 集成写入方声明的 SessionHeader.version 从 3 推进到 4,记录一等 tool 角色结果,并向 turn/end.reason 添加 forked 变体。 +将 V4 集成写入方声明的 SessionHeader.version 从 3 推进到 4,记录一等 tool 角色结果与生产者拥有的 source,并向 turn/end.reason 添加 forked 变体。 ## 目录 @@ -32,7 +32,7 @@ changes: decision: version-bump - root: "event:agent/inbox/spliced" previous: "2026-09-14-image-offload" - after: "cbe418d5a3727fbd3599f90101680dae254ac1d6163b1b8b2ca30f28afb5212a" + after: "ab1acc0685cc410d0d1e85ff0e0bd29f4b2b4352dd170db54988319d58d4362f" decision: version-bump - root: "event:assistant/attempt" previous: "2026-09-14-image-offload" @@ -52,11 +52,11 @@ changes: decision: version-bump - root: "event:session/title-llm-request" previous: "2026-09-14-image-offload" - after: "2a47ef7025d7dcf7e9977aadd738e7408a210b101a7dbbd37f4d87f22166eff0" + after: "eb655047c0dd3f2f3aefd2c9c719df0d060dd88032ba7caf731ea39db5a6725f" decision: version-bump - root: "event:system/message" previous: "2026-09-14-image-offload" - after: "1772581b17e1fab970fda49f04ffae2a181b7992ca4efa63bffe5f8b2bd62300" + after: "54a8682615a7ffc3e1e3c41ab003ae61082ae2792c57407f5bd8bb38fded3f0e" decision: version-bump - root: "event:team/message/queued" previous: "2026-09-14-image-offload" @@ -76,7 +76,7 @@ changes: decision: version-bump - root: "event:user/message" previous: "2026-09-14-image-offload" - after: "5274b395e7bf6660d020fba7e29a1e20ef2e77097fd7597e9debb13e45c540d6" + after: "46c44941f6e93a1764c49f1487e64a57f73ee68a75a657e94c326a8de5d8ad95" decision: version-bump ``` @@ -91,6 +91,10 @@ V3-to-V4 迁移将已发布的 user 角色工具结果提升为 tool 角色消 `request/header` schema 还将退役的 `system` 键记录为禁止字段。这项声明记录已有的原生读取拒绝规则,不改变存储数据或提示词重建;以后允许该字段携带值时,必须提升格式版本,而不能归类为普通可选字段添加。 +生产者拥有的 source 通过 [V3→V4 迁移](../../packages/session/session-format-v3-to-v4/README.zh.md#v3-to-v4-specification)替代已发布的 plugin wrapper。冻结的重命名表和冲突规则保留 source 字段与事件坐标;未知生产者归属保留每个自有 JSON 属性。原生读取和写入打开在公开 Session 之前校验 source 字段。已有 V4 文件不会重新运行迁入边。 + +核心拥有的 user source 属性记录归属保留策略;tmux-context 将位置归属标记为符合条件,同时保留生产者内部的去重。Auto Review 和压缩摘要器使用仅供请求使用的 user 输入,移除其活动 source 注册,同时保留历史迁移支持。这些输入不能写为持久化 Session 消息。目录 formatVersion 2 保存策略元数据,不改变 Session 版本,也不重写冻结的 schema 记录。System、model 和 tool source 保持严格的语义规则。 + ## 验证 @@ -98,6 +102,8 @@ V3-to-V4 迁移将已发布的 user 角色工具结果提升为 tool 角色消 生成的请求头保留字段回归测试以及已有的退役语法和 Session surface 测试共通过三个文件中的 65 项测试。生成字段保留可选的 `never`;允许可选字符串会产生必须提升版本的诊断,而原生读取方仍拒绝该退役键。 +Producer-source 与 request-input 检查共通过 12 个文件中的 447 项测试,覆盖 provider 等价性、仅供请求使用的输入的类型拒绝、user 归属保留、source 迁移及原生 source 准入。与 tool-role 父层的生成目录相比,有四个 root 发生变化,447 个类型指纹保持不变。 + ## 开发备注 diff --git a/docs/persistence-changes/historical-formats/README.i18n.yaml b/docs/persistence-changes/historical-formats/README.i18n.yaml index c840959fd3..c494a1c512 100644 --- a/docs/persistence-changes/historical-formats/README.i18n.yaml +++ b/docs/persistence-changes/historical-formats/README.i18n.yaml @@ -2,5 +2,5 @@ # side as of the last confirmed-consistent state. Both languages carry equal authority; # after editing either side, bring the other along and re-record with: # pnpm run verify-translation-pairing --write docs/persistence-changes/historical-formats/README.md -README.md: 3eb9052160ef6ce71d0a4fb8c55d5430bf47600f -README.zh.md: fb96711d673eed7bd405d41a86b84c44fbfbc490 +README.md: a4ae7ea4e92cb05b16a989de72605621307fa5bb +README.zh.md: e76ed913b79baa1d876e8dd33edeeb72223799b8 diff --git a/docs/persistence-changes/historical-formats/README.md b/docs/persistence-changes/historical-formats/README.md index 3eb9052160..a4ae7ea4e9 100644 --- a/docs/persistence-changes/historical-formats/README.md +++ b/docs/persistence-changes/historical-formats/README.md @@ -32,7 +32,7 @@ The index is generated from validated snapshots and the current writer constant. | 1 | PR #3349 | [V1](v1.md) | [JSON](v1.schema.json) | 54 / 415 | | 2 | `dsh-v0.1.3-alpha.2` | [V2](v2.md) | [JSON](v2.schema.json) | 56 / 435 | | 3 | PR #4320 | [V3](v3.md) | [JSON](v3.schema.json) | 60 / 467 | -| 4 | Current checkout | [Current catalog](../../persistence-catalog.md) | [JSON](../../persistence-schema.json) | 61 / 469 | +| 4 | Current checkout | [Current catalog](../../persistence-catalog.md) | [JSON](../../persistence-schema.json) | 61 / 572 | diff --git a/docs/persistence-changes/historical-formats/README.zh.md b/docs/persistence-changes/historical-formats/README.zh.md index fb96711d67..e76ed913b7 100644 --- a/docs/persistence-changes/historical-formats/README.zh.md +++ b/docs/persistence-changes/historical-formats/README.zh.md @@ -32,7 +32,7 @@ description: "查找从 V0 到工作区写入器版本的每个 Session 格式 | 1 | PR #3349 | [V1](v1.zh.md) | [JSON](v1.schema.json) | 54 / 415 | | 2 | `dsh-v0.1.3-alpha.2` | [V2](v2.zh.md) | [JSON](v2.schema.json) | 56 / 435 | | 3 | PR #4320 | [V3](v3.zh.md) | [JSON](v3.schema.json) | 60 / 467 | -| 4 | 当前工作树 | [当前目录](../../persistence-catalog.zh.md) | [JSON](../../persistence-schema.json) | 61 / 469 | +| 4 | 当前工作树 | [当前目录](../../persistence-catalog.zh.md) | [JSON](../../persistence-schema.json) | 61 / 572 | diff --git a/docs/persistence-schema.json b/docs/persistence-schema.json index adb8c0efe0..30934f6aaf 100644 --- a/docs/persistence-schema.json +++ b/docs/persistence-schema.json @@ -1,5 +1,5 @@ { - "formatVersion": 1, + "formatVersion": 2, "roots": [ { "key": "SessionHeader", @@ -406,7 +406,7 @@ "kind": "event", "event": "agent/inbox/spliced", "surface": false, - "digest": "cbe418d5a3727fbd3599f90101680dae254ac1d6163b1b8b2ca30f28afb5212a", + "digest": "ab1acc0685cc410d0d1e85ff0e0bd29f4b2b4352dd170db54988319d58d4362f", "schema": { "root": 0, "nodes": [ @@ -420,22 +420,22 @@ }, { "name": "ignorable", - "type": 18, + "type": 22, "optional": true }, { "name": "seq", - "type": 11, + "type": 15, "optional": false }, { "name": "time", - "type": 11, + "type": 15, "optional": false }, { "name": "type", - "type": 88, + "type": 192, "optional": false } ], @@ -451,22 +451,22 @@ }, { "name": "outcome", - "type": 84, + "type": 188, "optional": true }, { "name": "removedCount", - "type": 11, + "type": 15, "optional": true }, { "name": "start", - "type": 11, + "type": 15, "optional": false }, { "name": "target", - "type": 85, + "type": 189, "optional": false } ], @@ -497,7 +497,17 @@ { "name": "source", "type": 28, - "optional": false + "optional": false, + "compatibility": { + "version": 1, + "policy": "session-source-attribution", + "binding": "session.user-message.source", + "discriminator": "kind", + "unknownKinds": "preserve", + "attributionKinds": [ + "tmux-context" + ] + } } ], "indices": [] @@ -511,11 +521,55 @@ "types": [ 6, 9, - 20, - 23, - 25 + 11, + 13, + 24 ] }, + { + "kind": "object", + "properties": [ + { + "name": "text", + "type": 7, + "optional": false + }, + { + "name": "type", + "type": 8, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "primitive", + "type": "string" + }, + { + "kind": "literal", + "value": "reasoning" + }, + { + "kind": "object", + "properties": [ + { + "name": "text", + "type": 7, + "optional": false + }, + { + "name": "type", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "text" + }, { "kind": "object", "properties": [ @@ -536,16 +590,12 @@ }, { "name": "type", - "type": 8, + "type": 12, "optional": false } ], "indices": [] }, - { - "kind": "primitive", - "type": "string" - }, { "kind": "literal", "value": "tool-call" @@ -555,17 +605,17 @@ "properties": [ { "name": "attachment", - "type": 10, + "type": 14, "optional": false }, { "name": "offloaded", - "type": 18, + "type": 22, "optional": true }, { "name": "type", - "type": 19, + "type": 23, "optional": false } ], @@ -581,17 +631,17 @@ }, { "name": "bytes", - "type": 11, + "type": 15, "optional": false }, { "name": "height", - "type": 11, + "type": 15, "optional": false }, { "name": "mediaType", - "type": 12, + "type": 16, "optional": false }, { @@ -601,12 +651,12 @@ }, { "name": "originalDimensions", - "type": 17, + "type": 21, "optional": true }, { "name": "width", - "type": 11, + "type": 15, "optional": false } ], @@ -619,12 +669,16 @@ { "kind": "union", "types": [ - 13, - 14, - 15, - 16 + 17, + 18, + 19, + 20 ] }, + { + "kind": "literal", + "value": "image/gif" + }, { "kind": "literal", "value": "image/jpeg" @@ -633,10 +687,6 @@ "kind": "literal", "value": "image/png" }, - { - "kind": "literal", - "value": "image/gif" - }, { "kind": "literal", "value": "image/webp" @@ -646,12 +696,12 @@ "properties": [ { "name": "height", - "type": 11, + "type": 15, "optional": false }, { "name": "width", - "type": 11, + "type": 15, "optional": false } ], @@ -670,12 +720,12 @@ "properties": [ { "name": "attachment", - "type": 21, + "type": 25, "optional": false }, { "name": "type", - "type": 22, + "type": 26, "optional": false } ], @@ -691,7 +741,7 @@ }, { "name": "bytes", - "type": 11, + "type": 15, "optional": false }, { @@ -706,46 +756,6 @@ "kind": "literal", "value": "file" }, - { - "kind": "object", - "properties": [ - { - "name": "text", - "type": 7, - "optional": false - }, - { - "name": "type", - "type": 24, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "reasoning" - }, - { - "kind": "object", - "properties": [ - { - "name": "text", - "type": 7, - "optional": false - }, - { - "name": "type", - "type": 26, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "text" - }, { "kind": "literal", "value": "user" @@ -754,188 +764,126 @@ "kind": "union", "types": [ 29, - 38, - 40, + 32, + 34, + 36, + 39, 41, - 44, + 43, + 45, + 47, 49, 51, - 56, + 53, + 55, 57, 58, + 59, 60, 62, 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, 71, + 72, 73, - 75, + 74, + 76, 77, + 78, 79, + 80, + 81, 82, - 83 + 83, + 84, + 85, + 86, + 87, + 88, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97, + 98, + 99, + 100, + 101, + 102, + 104, + 106, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 126, + 128, + 129, + 137, + 139, + 140, + 142, + 144, + 148, + 150, + 158, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 172, + 173, + 174, + 176, + 178, + 179, + 180, + 181, + 182, + 183, + 184, + 185, + 186, + 187 ] }, { "kind": "object", "properties": [ { - "name": "baseline", - "type": 18, - "optional": true - }, - { - "name": "baselineIdentity", - "type": 7, - "optional": true - }, - { - "name": "changes", + "name": "form", "type": 30, "optional": false }, - { - "name": "form", - "type": 36, - "optional": false - }, { "name": "kind", - "type": 37, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "array", - "element": 31 - }, - { - "kind": "object", - "properties": [ - { - "name": "action", - "type": 32, - "optional": false - }, - { - "name": "digest", - "type": 7, - "optional": true - }, - { - "name": "path", - "type": 7, - "optional": false - }, - { - "name": "scope", - "type": 7, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "union", - "types": [ - 33, - 34, - 35 - ] - }, - { - "kind": "literal", - "value": "remove" - }, - { - "kind": "literal", - "value": "replace" - }, - { - "kind": "literal", - "value": "set" - }, - { - "kind": "literal", - "value": "instructions" - }, - { - "kind": "literal", - "value": "agent-instructions" - }, - { - "kind": "object", - "properties": [ - { - "name": "callId", - "type": 7, - "optional": false - }, - { - "name": "kind", - "type": 39, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "tool" - }, - { - "kind": "object", - "properties": [ - { - "name": "clientTimeZone", - "type": 7, - "optional": true - }, - { - "name": "kind", - "type": 27, - "optional": false - }, - { - "name": "rpcId", - "type": 7, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "deliveryId", - "type": 7, - "optional": false - }, - { - "name": "form", - "type": 42, - "optional": false - }, - { - "name": "kind", - "type": 43, - "optional": false - }, - { - "name": "provider", - "type": 7, - "optional": false - }, - { - "name": "ruleId", - "type": 7, - "optional": false - }, - { - "name": "source", - "type": 7, + "type": 31, "optional": false }, { @@ -952,157 +900,19 @@ }, { "kind": "literal", - "value": "webhook" - }, - { - "kind": "object", - "properties": [ - { - "name": "entries", - "type": 45, - "optional": false - }, - { - "name": "form", - "type": 47, - "optional": false - }, - { - "name": "kind", - "type": 48, - "optional": false - }, - { - "name": "update", - "type": 18, - "optional": true - } - ], - "indices": [] - }, - { - "kind": "array", - "element": 46 - }, - { - "kind": "object", - "properties": [ - { - "name": "description", - "type": 7, - "optional": false - }, - { - "name": "name", - "type": 7, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "catalog" - }, - { - "kind": "literal", - "value": "skill-catalog" + "value": "tool-jobs" }, { "kind": "object", "properties": [ { "name": "form", - "type": 36, + "type": 30, "optional": false }, { "name": "kind", - "type": 50, - "optional": false - }, - { - "name": "name", - "type": 7, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "skill-invocation" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 52, - "optional": false - }, - { - "name": "kind", - "type": 53, - "optional": false - }, - { - "name": "plugin", - "type": 7, - "optional": false - }, - { - "name": "sections", - "type": 54, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "snapshot" - }, - { - "kind": "literal", - "value": "plugin" - }, - { - "kind": "array", - "element": 55 - }, - { - "kind": "object", - "properties": [ - { - "name": "name", - "type": 7, - "optional": false - }, - { - "name": "text", - "type": 7, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 42, - "optional": false - }, - { - "name": "kind", - "type": 53, - "optional": false - }, - { - "name": "plugin", - "type": 7, + "type": 33, "optional": false }, { @@ -1113,43 +923,298 @@ ], "indices": [] }, + { + "kind": "literal", + "value": "user-approval" + }, { "kind": "object", "properties": [ { "name": "form", - "type": 36, + "type": 30, "optional": false }, { "name": "kind", - "type": 53, + "type": 35, "optional": false }, { - "name": "plugin", + "name": "summary", "type": 7, "optional": false } ], "indices": [] }, + { + "kind": "literal", + "value": "dsh-session-title-llm" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 37, + "optional": false + }, + { + "name": "kind", + "type": 38, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "instructions" + }, + { + "kind": "literal", + "value": "hooks-claude-code" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 37, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "hooks-codex" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 37, + "optional": false + }, + { + "name": "kind", + "type": 42, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "model-selection" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 37, + "optional": false + }, + { + "name": "kind", + "type": 44, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "plan-mode" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 37, + "optional": false + }, + { + "name": "kind", + "type": 46, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "repeat-tool-reminder" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 37, + "optional": false + }, + { + "name": "kind", + "type": 48, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "runtime-context" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 37, + "optional": false + }, + { + "name": "kind", + "type": 50, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "schedule" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 37, + "optional": false + }, + { + "name": "kind", + "type": 52, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "time-context" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 37, + "optional": false + }, + { + "name": "kind", + "type": 54, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tmux-context" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 37, + "optional": false + }, + { + "name": "kind", + "type": 56, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tool-goal" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 37, + "optional": false + }, + { + "name": "kind", + "type": 31, + "optional": false + } + ], + "indices": [] + }, { "kind": "object", "properties": [ { "name": "form", - "type": 59, + "type": 37, "optional": false }, { "name": "kind", - "type": 53, + "type": 33, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 37, "optional": false }, { - "name": "plugin", - "type": 7, + "name": "kind", + "type": 35, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 61, + "optional": false + }, + { + "name": "kind", + "type": 38, "optional": false } ], @@ -1169,12 +1234,199 @@ }, { "name": "kind", - "type": 53, + "type": 40, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 61, "optional": false }, { - "name": "plugin", - "type": 7, + "name": "kind", + "type": 42, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 61, + "optional": false + }, + { + "name": "kind", + "type": 44, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 61, + "optional": false + }, + { + "name": "kind", + "type": 46, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 61, + "optional": false + }, + { + "name": "kind", + "type": 48, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 61, + "optional": false + }, + { + "name": "kind", + "type": 50, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 61, + "optional": false + }, + { + "name": "kind", + "type": 52, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 61, + "optional": false + }, + { + "name": "kind", + "type": 54, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 61, + "optional": false + }, + { + "name": "kind", + "type": 56, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 61, + "optional": false + }, + { + "name": "kind", + "type": 31, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 61, + "optional": false + }, + { + "name": "kind", + "type": 33, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 61, + "optional": false + }, + { + "name": "kind", + "type": 35, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 75, + "optional": false + }, + { + "name": "kind", + "type": 38, "optional": false } ], @@ -1189,17 +1441,12 @@ "properties": [ { "name": "form", - "type": 47, + "type": 75, "optional": false }, { "name": "kind", - "type": 53, - "optional": false - }, - { - "name": "plugin", - "type": 7, + "type": 40, "optional": false } ], @@ -1210,161 +1457,188 @@ "properties": [ { "name": "form", - "type": 59, + "type": 75, "optional": false }, { "name": "kind", - "type": 64, - "optional": false - }, - { - "name": "references", - "type": 65, - "optional": false - }, - { - "name": "version", - "type": 70, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "session-reference" - }, - { - "kind": "array", - "element": 66 - }, - { - "kind": "object", - "properties": [ - { - "name": "capturedFormatVersion", - "type": 11, - "optional": true - }, - { - "name": "capturedThroughSeq", - "type": 67, - "optional": false - }, - { - "name": "compacted", - "type": 69, - "optional": false - }, - { - "name": "inputIndex", - "type": 11, - "optional": false - }, - { - "name": "label", - "type": 7, - "optional": false - }, - { - "name": "omittedBytes", - "type": 11, - "optional": false - }, - { - "name": "omittedMessages", - "type": 11, - "optional": false - }, - { - "name": "originalMessages", - "type": 11, - "optional": false - }, - { - "name": "retainedMessages", - "type": 11, - "optional": false - }, - { - "name": "sessionId", - "type": 7, - "optional": false - }, - { - "name": "truncated", - "type": 69, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "union", - "types": [ - 11, - 68 - ] - }, - { - "kind": "primitive", - "type": "null" - }, - { - "kind": "primitive", - "type": "boolean" - }, - { - "kind": "literal", - "value": 1 - }, - { - "kind": "object", - "properties": [ - { - "name": "form", "type": 42, "optional": false - }, - { - "name": "kind", - "type": 72, - "optional": false - }, - { - "name": "senderSessionId", - "type": 7, - "optional": false - }, - { - "name": "summary", - "type": 7, - "optional": false } ], "indices": [] }, - { - "kind": "literal", - "value": "subagent-settled" - }, { "kind": "object", "properties": [ { "name": "form", - "type": 61, + "type": 75, "optional": false }, { "name": "kind", - "type": 74, + "type": 44, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 75, "optional": false }, { - "name": "senderSessionId", - "type": 7, + "name": "kind", + "type": 46, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 75, + "optional": false + }, + { + "name": "kind", + "type": 48, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 75, + "optional": false + }, + { + "name": "kind", + "type": 50, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 75, + "optional": false + }, + { + "name": "kind", + "type": 52, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 75, + "optional": false + }, + { + "name": "kind", + "type": 54, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 75, + "optional": false + }, + { + "name": "kind", + "type": 56, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 75, + "optional": false + }, + { + "name": "kind", + "type": 31, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 75, + "optional": false + }, + { + "name": "kind", + "type": 33, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 75, + "optional": false + }, + { + "name": "kind", + "type": 35, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 89, + "optional": false + }, + { + "name": "kind", + "type": 38, "optional": false } ], @@ -1372,7 +1646,199 @@ }, { "kind": "literal", - "value": "agent-message" + "value": "catalog" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 89, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 89, + "optional": false + }, + { + "name": "kind", + "type": 42, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 89, + "optional": false + }, + { + "name": "kind", + "type": 44, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 89, + "optional": false + }, + { + "name": "kind", + "type": 46, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 89, + "optional": false + }, + { + "name": "kind", + "type": 48, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 89, + "optional": false + }, + { + "name": "kind", + "type": 50, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 89, + "optional": false + }, + { + "name": "kind", + "type": 52, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 89, + "optional": false + }, + { + "name": "kind", + "type": 54, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 89, + "optional": false + }, + { + "name": "kind", + "type": 56, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 89, + "optional": false + }, + { + "name": "kind", + "type": 31, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 89, + "optional": false + }, + { + "name": "kind", + "type": 33, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 89, + "optional": false + }, + { + "name": "kind", + "type": 35, + "optional": false + } + ], + "indices": [] }, { "kind": "object", @@ -1384,17 +1850,17 @@ }, { "name": "kind", - "type": 76, + "type": 103, "optional": false }, { "name": "revision", - "type": 11, + "type": 15, "optional": false }, { "name": "round", - "type": 11, + "type": 15, "optional": false } ], @@ -1409,7 +1875,7 @@ "properties": [ { "name": "kind", - "type": 78, + "type": 105, "optional": false }, { @@ -1444,7 +1910,7 @@ "properties": [ { "name": "kind", - "type": 80, + "type": 107, "optional": false }, { @@ -1459,7 +1925,7 @@ }, { "name": "replayState", - "type": 81, + "type": 108, "optional": true } ], @@ -1478,12 +1944,132 @@ "properties": [ { "name": "kind", - "type": 53, + "type": 38, "optional": false - }, + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ { - "name": "plugin", - "type": 7, + "name": "kind", + "type": 40, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 42, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 44, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 46, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 48, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 50, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 117, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "system-prompt" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 52, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 54, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 56, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 31, "optional": false } ], @@ -1500,6 +2086,1005 @@ ], "indices": [] }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 33, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 125, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "code-mode" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 127, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "cordis-host-runner" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 35, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "baseline", + "type": 22, + "optional": true + }, + { + "name": "baselineIdentity", + "type": 7, + "optional": true + }, + { + "name": "changes", + "type": 130, + "optional": false + }, + { + "name": "form", + "type": 37, + "optional": false + }, + { + "name": "kind", + "type": 136, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "array", + "element": 131 + }, + { + "kind": "object", + "properties": [ + { + "name": "action", + "type": 132, + "optional": false + }, + { + "name": "digest", + "type": 7, + "optional": true + }, + { + "name": "path", + "type": 7, + "optional": false + }, + { + "name": "scope", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "union", + "types": [ + 133, + 134, + 135 + ] + }, + { + "kind": "literal", + "value": "remove" + }, + { + "kind": "literal", + "value": "replace" + }, + { + "kind": "literal", + "value": "set" + }, + { + "kind": "literal", + "value": "agent-instructions" + }, + { + "kind": "object", + "properties": [ + { + "name": "callId", + "type": 7, + "optional": false + }, + { + "name": "kind", + "type": 138, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tool" + }, + { + "kind": "object", + "properties": [ + { + "name": "clientTimeZone", + "type": 7, + "optional": true + }, + { + "name": "kind", + "type": 27, + "optional": false + }, + { + "name": "rpcId", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "compactionId", + "type": 7, + "optional": false + }, + { + "name": "kind", + "type": 141, + "optional": false + }, + { + "name": "sourceCommandId", + "type": 7, + "optional": true + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "compact-checkpoint" + }, + { + "kind": "object", + "properties": [ + { + "name": "deliveryId", + "type": 7, + "optional": false + }, + { + "name": "form", + "type": 30, + "optional": false + }, + { + "name": "kind", + "type": 143, + "optional": false + }, + { + "name": "provider", + "type": 7, + "optional": false + }, + { + "name": "ruleId", + "type": 7, + "optional": false + }, + { + "name": "source", + "type": 7, + "optional": false + }, + { + "name": "summary", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "webhook" + }, + { + "kind": "object", + "properties": [ + { + "name": "entries", + "type": 145, + "optional": false + }, + { + "name": "form", + "type": 89, + "optional": false + }, + { + "name": "kind", + "type": 147, + "optional": false + }, + { + "name": "update", + "type": 22, + "optional": true + } + ], + "indices": [] + }, + { + "kind": "array", + "element": 146 + }, + { + "kind": "object", + "properties": [ + { + "name": "description", + "type": 7, + "optional": false + }, + { + "name": "name", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "skill-catalog" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 37, + "optional": false + }, + { + "name": "kind", + "type": 149, + "optional": false + }, + { + "name": "name", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "skill-invocation" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 61, + "optional": false + }, + { + "name": "kind", + "type": 151, + "optional": false + }, + { + "name": "references", + "type": 152, + "optional": false + }, + { + "name": "version", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "session-reference" + }, + { + "kind": "array", + "element": 153 + }, + { + "kind": "object", + "properties": [ + { + "name": "capturedFormatVersion", + "type": 15, + "optional": true + }, + { + "name": "capturedThroughSeq", + "type": 154, + "optional": false + }, + { + "name": "compacted", + "type": 156, + "optional": false + }, + { + "name": "inputIndex", + "type": 15, + "optional": false + }, + { + "name": "label", + "type": 7, + "optional": false + }, + { + "name": "omittedBytes", + "type": 15, + "optional": false + }, + { + "name": "omittedMessages", + "type": 15, + "optional": false + }, + { + "name": "originalMessages", + "type": 15, + "optional": false + }, + { + "name": "retainedMessages", + "type": 15, + "optional": false + }, + { + "name": "sessionId", + "type": 7, + "optional": false + }, + { + "name": "truncated", + "type": 156, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "union", + "types": [ + 15, + 155 + ] + }, + { + "kind": "primitive", + "type": "null" + }, + { + "kind": "primitive", + "type": "boolean" + }, + { + "kind": "literal", + "value": 1 + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 159, + "optional": false + }, + { + "name": "kind", + "type": 38, + "optional": false + }, + { + "name": "sections", + "type": 160, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "snapshot" + }, + { + "kind": "array", + "element": 161 + }, + { + "kind": "object", + "properties": [ + { + "name": "name", + "type": 7, + "optional": false + }, + { + "name": "text", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 159, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + }, + { + "name": "sections", + "type": 160, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 159, + "optional": false + }, + { + "name": "kind", + "type": 42, + "optional": false + }, + { + "name": "sections", + "type": 160, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 159, + "optional": false + }, + { + "name": "kind", + "type": 44, + "optional": false + }, + { + "name": "sections", + "type": 160, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 159, + "optional": false + }, + { + "name": "kind", + "type": 46, + "optional": false + }, + { + "name": "sections", + "type": 160, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 159, + "optional": false + }, + { + "name": "kind", + "type": 48, + "optional": false + }, + { + "name": "sections", + "type": 160, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 159, + "optional": false + }, + { + "name": "kind", + "type": 50, + "optional": false + }, + { + "name": "sections", + "type": 160, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 159, + "optional": false + }, + { + "name": "kind", + "type": 52, + "optional": false + }, + { + "name": "sections", + "type": 160, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 159, + "optional": false + }, + { + "name": "kind", + "type": 54, + "optional": false + }, + { + "name": "sections", + "type": 160, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 159, + "optional": false + }, + { + "name": "kind", + "type": 56, + "optional": false + }, + { + "name": "sections", + "type": 160, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 159, + "optional": false + }, + { + "name": "kind", + "type": 31, + "optional": false + }, + { + "name": "sections", + "type": 160, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 159, + "optional": false + }, + { + "name": "kind", + "type": 33, + "optional": false + }, + { + "name": "sections", + "type": 160, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 159, + "optional": false + }, + { + "name": "kind", + "type": 35, + "optional": false + }, + { + "name": "sections", + "type": 160, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 30, + "optional": false + }, + { + "name": "kind", + "type": 175, + "optional": false + }, + { + "name": "senderSessionId", + "type": 7, + "optional": false + }, + { + "name": "summary", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "subagent-settled" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 75, + "optional": false + }, + { + "name": "kind", + "type": 177, + "optional": false + }, + { + "name": "senderSessionId", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "agent-message" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 30, + "optional": false + }, + { + "name": "kind", + "type": 38, + "optional": false + }, + { + "name": "summary", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 30, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + }, + { + "name": "summary", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 30, + "optional": false + }, + { + "name": "kind", + "type": 42, + "optional": false + }, + { + "name": "summary", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 30, + "optional": false + }, + { + "name": "kind", + "type": 44, + "optional": false + }, + { + "name": "summary", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 30, + "optional": false + }, + { + "name": "kind", + "type": 46, + "optional": false + }, + { + "name": "summary", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 30, + "optional": false + }, + { + "name": "kind", + "type": 48, + "optional": false + }, + { + "name": "summary", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 30, + "optional": false + }, + { + "name": "kind", + "type": 50, + "optional": false + }, + { + "name": "summary", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 30, + "optional": false + }, + { + "name": "kind", + "type": 52, + "optional": false + }, + { + "name": "summary", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 30, + "optional": false + }, + { + "name": "kind", + "type": 54, + "optional": false + }, + { + "name": "summary", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 30, + "optional": false + }, + { + "name": "kind", + "type": 56, + "optional": false + }, + { + "name": "summary", + "type": 7, + "optional": false + } + ], + "indices": [] + }, { "kind": "literal", "value": "canceled" @@ -1507,8 +3092,8 @@ { "kind": "union", "types": [ - 86, - 87 + 190, + 191 ] }, { @@ -7166,7 +8751,7 @@ "kind": "event", "event": "session/title-llm-request", "surface": false, - "digest": "2a47ef7025d7dcf7e9977aadd738e7408a210b101a7dbbd37f4d87f22166eff0", + "digest": "eb655047c0dd3f2f3aefd2c9c719df0d060dd88032ba7caf731ea39db5a6725f", "schema": { "root": 0, "nodes": [ @@ -7195,7 +8780,7 @@ }, { "name": "type", - "type": 93, + "type": 196, "optional": false } ], @@ -7221,7 +8806,7 @@ }, { "name": "route", - "type": 92, + "type": 195, "optional": false }, { @@ -7254,8 +8839,8 @@ "types": [ 6, 32, - 51, - 56 + 191, + 193 ] }, { @@ -7413,14 +8998,6 @@ 18 ] }, - { - "kind": "literal", - "value": "image/png" - }, - { - "kind": "literal", - "value": "image/webp" - }, { "kind": "literal", "value": "image/gif" @@ -7429,6 +9006,14 @@ "kind": "literal", "value": "image/jpeg" }, + { + "kind": "literal", + "value": "image/png" + }, + { + "kind": "literal", + "value": "image/webp" + }, { "kind": "object", "properties": [ @@ -7579,25 +9164,136 @@ { "name": "source", "type": 34, - "optional": false + "optional": false, + "compatibility": { + "version": 1, + "policy": "session-source-attribution", + "binding": "session.user-message.source", + "discriminator": "kind", + "unknownKinds": "preserve", + "attributionKinds": [ + "tmux-context" + ] + } } ], "indices": [] }, { "kind": "literal", - "value": "system" + "value": "user" }, { "kind": "union", "types": [ + 31, 35, + 38, 40, 42, 44, 46, - 48, - 50 + 54, + 55, + 57, + 59, + 62, + 67, + 69, + 71, + 79, + 84, + 86, + 87, + 88, + 89, + 90, + 91, + 93, + 94, + 95, + 96, + 98, + 100, + 102, + 104, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135, + 136, + 137, + 138, + 139, + 140, + 141, + 142, + 143, + 144, + 145, + 146, + 147, + 148, + 149, + 150, + 151, + 152, + 153, + 154, + 155, + 156, + 157, + 158, + 159, + 160, + 161, + 163, + 165, + 166, + 169, + 170, + 171, + 172, + 173, + 174, + 175, + 176, + 178, + 179, + 180, + 181, + 182, + 183, + 184, + 185, + 187, + 189, + 190 ] }, { @@ -7612,95 +9308,6 @@ "name": "kind", "type": 37, "optional": false - }, - { - "name": "plugin", - "type": 10, - "optional": false - }, - { - "name": "sections", - "type": 38, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "snapshot" - }, - { - "kind": "literal", - "value": "plugin" - }, - { - "kind": "array", - "element": 39 - }, - { - "kind": "object", - "properties": [ - { - "name": "name", - "type": 10, - "optional": false - }, - { - "name": "text", - "type": 10, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 41, - "optional": false - }, - { - "name": "kind", - "type": 37, - "optional": false - }, - { - "name": "plugin", - "type": 10, - "optional": false - }, - { - "name": "summary", - "type": 10, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "notice" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 43, - "optional": false - }, - { - "name": "kind", - "type": 37, - "optional": false - }, - { - "name": "plugin", - "type": 10, - "optional": false } ], "indices": [] @@ -7709,215 +9316,89 @@ "kind": "literal", "value": "instructions" }, + { + "kind": "literal", + "value": "model-selection" + }, { "kind": "object", "properties": [ { "name": "form", + "type": 36, + "optional": false + }, + { + "name": "kind", + "type": 39, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "plan-mode" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 36, + "optional": false + }, + { + "name": "kind", + "type": 41, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "repeat-tool-reminder" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 36, + "optional": false + }, + { + "name": "kind", + "type": 43, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "runtime-context" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 36, + "optional": false + }, + { + "name": "kind", "type": 45, "optional": false - }, - { - "name": "kind", - "type": 37, - "optional": false - }, - { - "name": "plugin", - "type": 10, - "optional": false } ], "indices": [] }, { "kind": "literal", - "value": "recall" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 47, - "optional": false - }, - { - "name": "kind", - "type": 37, - "optional": false - }, - { - "name": "plugin", - "type": 10, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "relay" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 49, - "optional": false - }, - { - "name": "kind", - "type": 37, - "optional": false - }, - { - "name": "plugin", - "type": 10, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "catalog" - }, - { - "kind": "object", - "properties": [ - { - "name": "kind", - "type": 37, - "optional": false - }, - { - "name": "plugin", - "type": 10, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "content", - "type": 7, - "optional": false - }, - { - "name": "id", - "type": 10, - "optional": false - }, - { - "name": "role", - "type": 52, - "optional": false - }, - { - "name": "source", - "type": 53, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "assistant" - }, - { - "kind": "object", - "properties": [ - { - "name": "kind", - "type": 54, - "optional": false - }, - { - "name": "model", - "type": 10, - "optional": false - }, - { - "name": "provider", - "type": 10, - "optional": false - }, - { - "name": "replayState", - "type": 55, - "optional": true - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "model" - }, - { - "kind": "opaque", - "reason": "unknown" - }, - { - "kind": "object", - "properties": [ - { - "name": "content", - "type": 7, - "optional": false - }, - { - "name": "id", - "type": 10, - "optional": false - }, - { - "name": "role", - "type": 57, - "optional": false - }, - { - "name": "source", - "type": 58, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "user" - }, - { - "kind": "union", - "types": [ - 31, - 35, - 40, - 42, - 44, - 46, - 48, - 50, - 53, - 59, - 67, - 68, - 70, - 74, - 76, - 83, - 85, - 87, - 89, - 91 - ] + "value": "schedule" }, { "kind": "object", @@ -7934,17 +9415,17 @@ }, { "name": "changes", - "type": 60, + "type": 47, "optional": false }, { "name": "form", - "type": 43, + "type": 36, "optional": false }, { "name": "kind", - "type": 66, + "type": 53, "optional": false } ], @@ -7952,14 +9433,14 @@ }, { "kind": "array", - "element": 61 + "element": 48 }, { "kind": "object", "properties": [ { "name": "action", - "type": 62, + "type": 49, "optional": false }, { @@ -7983,11 +9464,15 @@ { "kind": "union", "types": [ - 63, - 64, - 65 + 50, + 51, + 52 ] }, + { + "kind": "literal", + "value": "remove" + }, { "kind": "literal", "value": "replace" @@ -7996,10 +9481,6 @@ "kind": "literal", "value": "set" }, - { - "kind": "literal", - "value": "remove" - }, { "kind": "literal", "value": "agent-instructions" @@ -8014,7 +9495,7 @@ }, { "name": "kind", - "type": 57, + "type": 33, "optional": false }, { @@ -8025,6 +9506,51 @@ ], "indices": [] }, + { + "kind": "object", + "properties": [ + { + "name": "compactionId", + "type": 10, + "optional": false + }, + { + "name": "kind", + "type": 56, + "optional": false + }, + { + "name": "sourceCommandId", + "type": 10, + "optional": true + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "compact-checkpoint" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 36, + "optional": false + }, + { + "name": "kind", + "type": 58, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "time-context" + }, { "kind": "object", "properties": [ @@ -8035,12 +9561,12 @@ }, { "name": "form", - "type": 41, + "type": 60, "optional": false }, { "name": "kind", - "type": 69, + "type": 61, "optional": false }, { @@ -8066,6 +9592,10 @@ ], "indices": [] }, + { + "kind": "literal", + "value": "notice" + }, { "kind": "literal", "value": "webhook" @@ -8075,17 +9605,17 @@ "properties": [ { "name": "entries", - "type": 71, + "type": 63, "optional": false }, { "name": "form", - "type": 49, + "type": 65, "optional": false }, { "name": "kind", - "type": 73, + "type": 66, "optional": false }, { @@ -8098,7 +9628,7 @@ }, { "kind": "array", - "element": 72 + "element": 64 }, { "kind": "object", @@ -8116,6 +9646,10 @@ ], "indices": [] }, + { + "kind": "literal", + "value": "catalog" + }, { "kind": "literal", "value": "skill-catalog" @@ -8125,12 +9659,32 @@ "properties": [ { "name": "form", - "type": 43, + "type": 36, "optional": false }, { "name": "kind", - "type": 75, + "type": 68, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tmux-context" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 36, + "optional": false + }, + { + "name": "kind", + "type": 70, "optional": false }, { @@ -8150,34 +9704,38 @@ "properties": [ { "name": "form", - "type": 45, + "type": 72, "optional": false }, { "name": "kind", - "type": 77, + "type": 73, "optional": false }, { "name": "references", - "type": 78, + "type": 74, "optional": false }, { "name": "version", - "type": 82, + "type": 78, "optional": false } ], "indices": [] }, + { + "kind": "literal", + "value": "recall" + }, { "kind": "literal", "value": "session-reference" }, { "kind": "array", - "element": 79 + "element": 75 }, { "kind": "object", @@ -8189,7 +9747,7 @@ }, { "name": "capturedThroughSeq", - "type": 80, + "type": 76, "optional": false }, { @@ -8244,7 +9802,7 @@ "kind": "union", "types": [ 2, - 81 + 77 ] }, { @@ -8260,12 +9818,349 @@ "properties": [ { "name": "form", - "type": 41, + "type": 80, "optional": false }, { "name": "kind", - "type": 84, + "type": 81, + "optional": false + }, + { + "name": "sections", + "type": 82, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "snapshot" + }, + { + "kind": "literal", + "value": "hooks-claude-code" + }, + { + "kind": "array", + "element": 83 + }, + { + "kind": "object", + "properties": [ + { + "name": "name", + "type": 10, + "optional": false + }, + { + "name": "text", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 80, + "optional": false + }, + { + "name": "kind", + "type": 85, + "optional": false + }, + { + "name": "sections", + "type": 82, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "hooks-codex" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 80, + "optional": false + }, + { + "name": "kind", + "type": 37, + "optional": false + }, + { + "name": "sections", + "type": 82, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 80, + "optional": false + }, + { + "name": "kind", + "type": 39, + "optional": false + }, + { + "name": "sections", + "type": 82, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 80, + "optional": false + }, + { + "name": "kind", + "type": 41, + "optional": false + }, + { + "name": "sections", + "type": 82, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 80, + "optional": false + }, + { + "name": "kind", + "type": 43, + "optional": false + }, + { + "name": "sections", + "type": 82, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 80, + "optional": false + }, + { + "name": "kind", + "type": 45, + "optional": false + }, + { + "name": "sections", + "type": 82, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 36, + "optional": false + }, + { + "name": "kind", + "type": 92, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tool-goal" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 80, + "optional": false + }, + { + "name": "kind", + "type": 58, + "optional": false + }, + { + "name": "sections", + "type": 82, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 80, + "optional": false + }, + { + "name": "kind", + "type": 68, + "optional": false + }, + { + "name": "sections", + "type": 82, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 80, + "optional": false + }, + { + "name": "kind", + "type": 92, + "optional": false + }, + { + "name": "sections", + "type": 82, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 80, + "optional": false + }, + { + "name": "kind", + "type": 97, + "optional": false + }, + { + "name": "sections", + "type": 82, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tool-jobs" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 80, + "optional": false + }, + { + "name": "kind", + "type": 99, + "optional": false + }, + { + "name": "sections", + "type": 82, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "user-approval" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 80, + "optional": false + }, + { + "name": "kind", + "type": 101, + "optional": false + }, + { + "name": "sections", + "type": 82, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "dsh-session-title-llm" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 60, + "optional": false + }, + { + "name": "kind", + "type": 103, "optional": false }, { @@ -8290,12 +10185,12 @@ "properties": [ { "name": "form", - "type": 47, + "type": 105, "optional": false }, { "name": "kind", - "type": 86, + "type": 106, "optional": false }, { @@ -8306,10 +10201,938 @@ ], "indices": [] }, + { + "kind": "literal", + "value": "relay" + }, { "kind": "literal", "value": "agent-message" }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 60, + "optional": false + }, + { + "name": "kind", + "type": 81, + "optional": false + }, + { + "name": "summary", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 36, + "optional": false + }, + { + "name": "kind", + "type": 97, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 60, + "optional": false + }, + { + "name": "kind", + "type": 85, + "optional": false + }, + { + "name": "summary", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 60, + "optional": false + }, + { + "name": "kind", + "type": 37, + "optional": false + }, + { + "name": "summary", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 60, + "optional": false + }, + { + "name": "kind", + "type": 39, + "optional": false + }, + { + "name": "summary", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 60, + "optional": false + }, + { + "name": "kind", + "type": 41, + "optional": false + }, + { + "name": "summary", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 60, + "optional": false + }, + { + "name": "kind", + "type": 43, + "optional": false + }, + { + "name": "summary", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 60, + "optional": false + }, + { + "name": "kind", + "type": 45, + "optional": false + }, + { + "name": "summary", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 60, + "optional": false + }, + { + "name": "kind", + "type": 58, + "optional": false + }, + { + "name": "summary", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 36, + "optional": false + }, + { + "name": "kind", + "type": 99, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 36, + "optional": false + }, + { + "name": "kind", + "type": 101, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 81, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 85, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 37, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 39, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 41, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 43, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 45, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 60, + "optional": false + }, + { + "name": "kind", + "type": 68, + "optional": false + }, + { + "name": "summary", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 58, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 68, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 92, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 97, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 99, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 101, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 105, + "optional": false + }, + { + "name": "kind", + "type": 81, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 105, + "optional": false + }, + { + "name": "kind", + "type": 85, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 105, + "optional": false + }, + { + "name": "kind", + "type": 37, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 60, + "optional": false + }, + { + "name": "kind", + "type": 92, + "optional": false + }, + { + "name": "summary", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 105, + "optional": false + }, + { + "name": "kind", + "type": 39, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 105, + "optional": false + }, + { + "name": "kind", + "type": 41, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 105, + "optional": false + }, + { + "name": "kind", + "type": 43, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 105, + "optional": false + }, + { + "name": "kind", + "type": 45, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 105, + "optional": false + }, + { + "name": "kind", + "type": 58, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 105, + "optional": false + }, + { + "name": "kind", + "type": 68, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 105, + "optional": false + }, + { + "name": "kind", + "type": 92, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 105, + "optional": false + }, + { + "name": "kind", + "type": 97, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 105, + "optional": false + }, + { + "name": "kind", + "type": 99, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 60, + "optional": false + }, + { + "name": "kind", + "type": 97, + "optional": false + }, + { + "name": "summary", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 105, + "optional": false + }, + { + "name": "kind", + "type": 101, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 81, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 85, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 37, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 39, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 41, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 43, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 45, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 58, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 60, + "optional": false + }, + { + "name": "kind", + "type": 99, + "optional": false + }, + { + "name": "summary", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 68, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 92, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 97, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 99, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 101, + "optional": false + } + ], + "indices": [] + }, { "kind": "object", "properties": [ @@ -8320,7 +11143,7 @@ }, { "name": "kind", - "type": 88, + "type": 162, "optional": false }, { @@ -8345,7 +11168,7 @@ "properties": [ { "name": "kind", - "type": 90, + "type": 164, "optional": false }, { @@ -8378,14 +11201,349 @@ { "kind": "object", "properties": [ + { + "name": "form", + "type": 60, + "optional": false + }, { "name": "kind", - "type": 57, + "type": 101, + "optional": false + }, + { + "name": "summary", + "type": 10, "optional": false } ], "indices": [] }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 167, + "optional": false + }, + { + "name": "model", + "type": 10, + "optional": false + }, + { + "name": "provider", + "type": 10, + "optional": false + }, + { + "name": "replayState", + "type": 168, + "optional": true + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "model" + }, + { + "kind": "opaque", + "reason": "unknown" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 81, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 85, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 37, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 39, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 41, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 43, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 45, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 177, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "system-prompt" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 36, + "optional": false + }, + { + "name": "kind", + "type": 81, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 58, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 68, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 92, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 97, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 33, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 99, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 186, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "code-mode" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 188, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "cordis-host-runner" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 101, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 36, + "optional": false + }, + { + "name": "kind", + "type": 85, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "content", + "type": 7, + "optional": false + }, + { + "name": "id", + "type": 10, + "optional": false + }, + { + "name": "role", + "type": 192, + "optional": false + }, + { + "name": "source", + "type": 166, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "assistant" + }, + { + "kind": "object", + "properties": [ + { + "name": "content", + "type": 7, + "optional": false + }, + { + "name": "id", + "type": 10, + "optional": false + }, + { + "name": "role", + "type": 194, + "optional": false + }, + { + "name": "source", + "type": 176, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "system" + }, { "kind": "object", "properties": [ @@ -8957,7 +12115,7 @@ "kind": "event", "event": "system/message", "surface": true, - "digest": "1772581b17e1fab970fda49f04ffae2a181b7992ca4efa63bffe5f8b2bd62300", + "digest": "54a8682615a7ffc3e1e3c41ab003ae61082ae2792c57407f5bd8bb38fded3f0e", "schema": { "root": 0, "nodes": [ @@ -8971,32 +12129,32 @@ }, { "name": "ignorable", - "type": 17, + "type": 15, "optional": true }, { "name": "seq", - "type": 10, + "type": 8, "optional": false }, { "name": "sourceEventSeqs", - "type": 44, + "type": 29, "optional": true }, { "name": "surfaceOp", - "type": 45, + "type": 30, "optional": false }, { "name": "time", - "type": 10, + "type": 8, "optional": false }, { "name": "type", - "type": 49, + "type": 34, "optional": false } ], @@ -9012,12 +12170,12 @@ }, { "name": "step", - "type": 10, + "type": 8, "optional": false }, { "name": "turn", - "type": 10, + "type": 8, "optional": false } ], @@ -9033,7 +12191,7 @@ }, { "name": "id", - "type": 6, + "type": 7, "optional": false }, { @@ -9057,62 +12215,28 @@ "kind": "union", "types": [ 5, - 8, - 19, + 17, + 20, 22, 24 ] }, - { - "kind": "object", - "properties": [ - { - "name": "arguments", - "type": 6, - "optional": false - }, - { - "name": "id", - "type": 6, - "optional": false - }, - { - "name": "name", - "type": 6, - "optional": false - }, - { - "name": "type", - "type": 7, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "primitive", - "type": "string" - }, - { - "kind": "literal", - "value": "tool-call" - }, { "kind": "object", "properties": [ { "name": "attachment", - "type": 9, + "type": 6, "optional": false }, { "name": "offloaded", - "type": 17, + "type": 15, "optional": true }, { "name": "type", - "type": 18, + "type": 16, "optional": false } ], @@ -9123,42 +12247,46 @@ "properties": [ { "name": "attachmentId", - "type": 6, + "type": 7, "optional": false }, { "name": "bytes", - "type": 10, + "type": 8, "optional": false }, { "name": "height", - "type": 10, + "type": 8, "optional": false }, { "name": "mediaType", - "type": 11, + "type": 9, "optional": false }, { "name": "name", - "type": 6, + "type": 7, "optional": true }, { "name": "originalDimensions", - "type": 16, + "type": 14, "optional": true }, { "name": "width", - "type": 10, + "type": 8, "optional": false } ], "indices": [] }, + { + "kind": "primitive", + "type": "string" + }, { "kind": "primitive", "type": "number" @@ -9166,10 +12294,10 @@ { "kind": "union", "types": [ + 10, + 11, 12, - 13, - 14, - 15 + 13 ] }, { @@ -9193,12 +12321,12 @@ "properties": [ { "name": "height", - "type": 10, + "type": 8, "optional": false }, { "name": "width", - "type": 10, + "type": 8, "optional": false } ], @@ -9217,12 +12345,12 @@ "properties": [ { "name": "attachment", - "type": 20, + "type": 18, "optional": false }, { "name": "type", - "type": 21, + "type": 19, "optional": false } ], @@ -9233,17 +12361,17 @@ "properties": [ { "name": "attachmentId", - "type": 6, + "type": 7, "optional": false }, { "name": "bytes", - "type": 10, + "type": 8, "optional": false }, { "name": "name", - "type": 6, + "type": 7, "optional": false } ], @@ -9258,7 +12386,27 @@ "properties": [ { "name": "text", - "type": 6, + "type": 7, + "optional": false + }, + { + "name": "type", + "type": 21, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "text" + }, + { + "kind": "object", + "properties": [ + { + "name": "text", + "type": 7, "optional": false }, { @@ -9277,8 +12425,18 @@ "kind": "object", "properties": [ { - "name": "text", - "type": 6, + "name": "arguments", + "type": 7, + "optional": false + }, + { + "name": "id", + "type": 7, + "optional": false + }, + { + "name": "name", + "type": 7, "optional": false }, { @@ -9291,45 +12449,18 @@ }, { "kind": "literal", - "value": "text" + "value": "tool-call" }, { "kind": "literal", "value": "system" }, - { - "kind": "union", - "types": [ - 28, - 33, - 35, - 37, - 39, - 41, - 43 - ] - }, { "kind": "object", "properties": [ - { - "name": "form", - "type": 29, - "optional": false - }, { "name": "kind", - "type": 30, - "optional": false - }, - { - "name": "plugin", - "type": 6, - "optional": false - }, - { - "name": "sections", - "type": 31, + "type": 28, "optional": false } ], @@ -9337,187 +12468,17 @@ }, { "kind": "literal", - "value": "snapshot" - }, - { - "kind": "literal", - "value": "plugin" + "value": "system-prompt" }, { "kind": "array", - "element": 32 - }, - { - "kind": "object", - "properties": [ - { - "name": "name", - "type": 6, - "optional": false - }, - { - "name": "text", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 34, - "optional": false - }, - { - "name": "kind", - "type": 30, - "optional": false - }, - { - "name": "plugin", - "type": 6, - "optional": false - }, - { - "name": "summary", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "notice" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 36, - "optional": false - }, - { - "name": "kind", - "type": 30, - "optional": false - }, - { - "name": "plugin", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "recall" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 38, - "optional": false - }, - { - "name": "kind", - "type": 30, - "optional": false - }, - { - "name": "plugin", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "relay" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 40, - "optional": false - }, - { - "name": "kind", - "type": 30, - "optional": false - }, - { - "name": "plugin", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "catalog" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 42, - "optional": false - }, - { - "name": "kind", - "type": 30, - "optional": false - }, - { - "name": "plugin", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "instructions" - }, - { - "kind": "object", - "properties": [ - { - "name": "kind", - "type": 30, - "optional": false - }, - { - "name": "plugin", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "array", - "element": 10 + "element": 8 }, { "kind": "union", "types": [ - 46, - 48 + 31, + 33 ] }, { @@ -9525,17 +12486,17 @@ "properties": [ { "name": "endSeq", - "type": 10, + "type": 8, "optional": false }, { "name": "op", - "type": 47, + "type": 32, "optional": false }, { "name": "startSeq", - "type": 10, + "type": 8, "optional": false } ], @@ -12212,7 +15173,7 @@ "kind": "event", "event": "user/message", "surface": true, - "digest": "5274b395e7bf6660d020fba7e29a1e20ef2e77097fd7597e9debb13e45c540d6", + "digest": "46c44941f6e93a1764c49f1487e64a57f73ee68a75a657e94c326a8de5d8ad95", "schema": { "root": 0, "nodes": [ @@ -12226,32 +15187,32 @@ }, { "name": "ignorable", - "type": 16, + "type": 20, "optional": true }, { "name": "seq", - "type": 9, + "type": 13, "optional": false }, { "name": "sourceEventSeqs", - "type": 82, + "type": 186, "optional": true }, { "name": "surfaceOp", - "type": 83, + "type": 187, "optional": false }, { "name": "time", - "type": 9, + "type": 13, "optional": false }, { "name": "type", - "type": 86, + "type": 190, "optional": false } ], @@ -12278,7 +15239,17 @@ { "name": "source", "type": 26, - "optional": false + "optional": false, + "compatibility": { + "version": 1, + "policy": "session-source-attribution", + "binding": "session.user-message.source", + "discriminator": "kind", + "unknownKinds": "preserve", + "attributionKinds": [ + "tmux-context" + ] + } } ], "indices": [] @@ -12292,11 +15263,55 @@ "types": [ 4, 7, - 18, - 21, - 23 + 9, + 11, + 22 ] }, + { + "kind": "object", + "properties": [ + { + "name": "text", + "type": 5, + "optional": false + }, + { + "name": "type", + "type": 6, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "primitive", + "type": "string" + }, + { + "kind": "literal", + "value": "reasoning" + }, + { + "kind": "object", + "properties": [ + { + "name": "text", + "type": 5, + "optional": false + }, + { + "name": "type", + "type": 8, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "text" + }, { "kind": "object", "properties": [ @@ -12317,16 +15332,12 @@ }, { "name": "type", - "type": 6, + "type": 10, "optional": false } ], "indices": [] }, - { - "kind": "primitive", - "type": "string" - }, { "kind": "literal", "value": "tool-call" @@ -12336,17 +15347,17 @@ "properties": [ { "name": "attachment", - "type": 8, + "type": 12, "optional": false }, { "name": "offloaded", - "type": 16, + "type": 20, "optional": true }, { "name": "type", - "type": 17, + "type": 21, "optional": false } ], @@ -12362,17 +15373,17 @@ }, { "name": "bytes", - "type": 9, + "type": 13, "optional": false }, { "name": "height", - "type": 9, + "type": 13, "optional": false }, { "name": "mediaType", - "type": 10, + "type": 14, "optional": false }, { @@ -12382,12 +15393,12 @@ }, { "name": "originalDimensions", - "type": 15, + "type": 19, "optional": true }, { "name": "width", - "type": 9, + "type": 13, "optional": false } ], @@ -12400,20 +15411,12 @@ { "kind": "union", "types": [ - 11, - 12, - 13, - 14 + 15, + 16, + 17, + 18 ] }, - { - "kind": "literal", - "value": "image/png" - }, - { - "kind": "literal", - "value": "image/webp" - }, { "kind": "literal", "value": "image/gif" @@ -12422,17 +15425,25 @@ "kind": "literal", "value": "image/jpeg" }, + { + "kind": "literal", + "value": "image/png" + }, + { + "kind": "literal", + "value": "image/webp" + }, { "kind": "object", "properties": [ { "name": "height", - "type": 9, + "type": 13, "optional": false }, { "name": "width", - "type": 9, + "type": 13, "optional": false } ], @@ -12451,12 +15462,12 @@ "properties": [ { "name": "attachment", - "type": 19, + "type": 23, "optional": false }, { "name": "type", - "type": 20, + "type": 24, "optional": false } ], @@ -12472,7 +15483,7 @@ }, { "name": "bytes", - "type": 9, + "type": 13, "optional": false }, { @@ -12487,46 +15498,6 @@ "kind": "literal", "value": "file" }, - { - "kind": "object", - "properties": [ - { - "name": "text", - "type": 5, - "optional": false - }, - { - "name": "type", - "type": 22, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "reasoning" - }, - { - "kind": "object", - "properties": [ - { - "name": "text", - "type": 5, - "optional": false - }, - { - "name": "type", - "type": 24, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "text" - }, { "kind": "literal", "value": "user" @@ -12535,188 +15506,126 @@ "kind": "union", "types": [ 27, - 36, - 38, + 30, + 32, + 35, + 37, 39, - 42, + 41, + 43, + 45, 47, 49, - 54, + 51, + 53, 55, 56, - 58, + 57, + 59, 60, 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, 69, + 70, 71, 73, + 74, 75, + 76, 77, + 78, + 79, 80, - 81 + 81, + 82, + 83, + 84, + 85, + 87, + 88, + 89, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97, + 98, + 99, + 101, + 103, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 123, + 125, + 126, + 134, + 136, + 137, + 139, + 141, + 145, + 147, + 155, + 159, + 160, + 161, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 173, + 175, + 176, + 177, + 178, + 179, + 180, + 181, + 182, + 183, + 184, + 185 ] }, { "kind": "object", "properties": [ { - "name": "baseline", - "type": 16, - "optional": true - }, - { - "name": "baselineIdentity", - "type": 5, - "optional": true - }, - { - "name": "changes", + "name": "form", "type": 28, "optional": false }, - { - "name": "form", - "type": 34, - "optional": false - }, { "name": "kind", - "type": 35, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "array", - "element": 29 - }, - { - "kind": "object", - "properties": [ - { - "name": "action", - "type": 30, - "optional": false - }, - { - "name": "digest", - "type": 5, - "optional": true - }, - { - "name": "path", - "type": 5, - "optional": false - }, - { - "name": "scope", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "union", - "types": [ - 31, - 32, - 33 - ] - }, - { - "kind": "literal", - "value": "remove" - }, - { - "kind": "literal", - "value": "replace" - }, - { - "kind": "literal", - "value": "set" - }, - { - "kind": "literal", - "value": "instructions" - }, - { - "kind": "literal", - "value": "agent-instructions" - }, - { - "kind": "object", - "properties": [ - { - "name": "callId", - "type": 5, - "optional": false - }, - { - "name": "kind", - "type": 37, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "tool" - }, - { - "kind": "object", - "properties": [ - { - "name": "clientTimeZone", - "type": 5, - "optional": true - }, - { - "name": "kind", - "type": 25, - "optional": false - }, - { - "name": "rpcId", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "deliveryId", - "type": 5, - "optional": false - }, - { - "name": "form", - "type": 40, - "optional": false - }, - { - "name": "kind", - "type": 41, - "optional": false - }, - { - "name": "provider", - "type": 5, - "optional": false - }, - { - "name": "ruleId", - "type": 5, - "optional": false - }, - { - "name": "source", - "type": 5, + "type": 29, "optional": false }, { @@ -12733,157 +15642,19 @@ }, { "kind": "literal", - "value": "webhook" - }, - { - "kind": "object", - "properties": [ - { - "name": "entries", - "type": 43, - "optional": false - }, - { - "name": "form", - "type": 45, - "optional": false - }, - { - "name": "kind", - "type": 46, - "optional": false - }, - { - "name": "update", - "type": 16, - "optional": true - } - ], - "indices": [] - }, - { - "kind": "array", - "element": 44 - }, - { - "kind": "object", - "properties": [ - { - "name": "description", - "type": 5, - "optional": false - }, - { - "name": "name", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "catalog" - }, - { - "kind": "literal", - "value": "skill-catalog" + "value": "user-approval" }, { "kind": "object", "properties": [ { "name": "form", - "type": 34, + "type": 28, "optional": false }, { "name": "kind", - "type": 48, - "optional": false - }, - { - "name": "name", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "skill-invocation" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 50, - "optional": false - }, - { - "name": "kind", - "type": 51, - "optional": false - }, - { - "name": "plugin", - "type": 5, - "optional": false - }, - { - "name": "sections", - "type": 52, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "snapshot" - }, - { - "kind": "literal", - "value": "plugin" - }, - { - "kind": "array", - "element": 53 - }, - { - "kind": "object", - "properties": [ - { - "name": "name", - "type": 5, - "optional": false - }, - { - "name": "text", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 40, - "optional": false - }, - { - "name": "kind", - "type": 51, - "optional": false - }, - { - "name": "plugin", - "type": 5, + "type": 31, "optional": false }, { @@ -12894,22 +15665,245 @@ ], "indices": [] }, + { + "kind": "literal", + "value": "dsh-session-title-llm" + }, { "kind": "object", "properties": [ { "name": "form", - "type": 34, + "type": 33, "optional": false }, { "name": "kind", - "type": 51, + "type": 34, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "instructions" + }, + { + "kind": "literal", + "value": "hooks-claude-code" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 33, "optional": false }, { - "name": "plugin", - "type": 5, + "name": "kind", + "type": 36, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "hooks-codex" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 38, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "model-selection" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "plan-mode" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 42, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "repeat-tool-reminder" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 44, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "runtime-context" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 46, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "schedule" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 48, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "time-context" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 50, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tmux-context" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 52, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tool-goal" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 54, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tool-jobs" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 29, "optional": false } ], @@ -12920,17 +15914,28 @@ "properties": [ { "name": "form", - "type": 57, + "type": 33, "optional": false }, { "name": "kind", - "type": 51, + "type": 31, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, "optional": false }, { - "name": "plugin", - "type": 5, + "name": "kind", + "type": 34, "optional": false } ], @@ -12945,17 +15950,204 @@ "properties": [ { "name": "form", - "type": 59, + "type": 58, "optional": false }, { "name": "kind", - "type": 51, + "type": 36, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, "optional": false }, { - "name": "plugin", - "type": 5, + "name": "kind", + "type": 38, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, + "optional": false + }, + { + "name": "kind", + "type": 42, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, + "optional": false + }, + { + "name": "kind", + "type": 44, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, + "optional": false + }, + { + "name": "kind", + "type": 46, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, + "optional": false + }, + { + "name": "kind", + "type": 48, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, + "optional": false + }, + { + "name": "kind", + "type": 50, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, + "optional": false + }, + { + "name": "kind", + "type": 52, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, + "optional": false + }, + { + "name": "kind", + "type": 54, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, + "optional": false + }, + { + "name": "kind", + "type": 29, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, + "optional": false + }, + { + "name": "kind", + "type": 31, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 34, "optional": false } ], @@ -12970,182 +16162,204 @@ "properties": [ { "name": "form", - "type": 45, - "optional": false - }, - { - "name": "kind", - "type": 51, - "optional": false - }, - { - "name": "plugin", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 57, - "optional": false - }, - { - "name": "kind", - "type": 62, - "optional": false - }, - { - "name": "references", - "type": 63, - "optional": false - }, - { - "name": "version", - "type": 68, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "session-reference" - }, - { - "kind": "array", - "element": 64 - }, - { - "kind": "object", - "properties": [ - { - "name": "capturedFormatVersion", - "type": 9, - "optional": true - }, - { - "name": "capturedThroughSeq", - "type": 65, - "optional": false - }, - { - "name": "compacted", - "type": 67, - "optional": false - }, - { - "name": "inputIndex", - "type": 9, - "optional": false - }, - { - "name": "label", - "type": 5, - "optional": false - }, - { - "name": "omittedBytes", - "type": 9, - "optional": false - }, - { - "name": "omittedMessages", - "type": 9, - "optional": false - }, - { - "name": "originalMessages", - "type": 9, - "optional": false - }, - { - "name": "retainedMessages", - "type": 9, - "optional": false - }, - { - "name": "sessionId", - "type": 5, - "optional": false - }, - { - "name": "truncated", - "type": 67, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "union", - "types": [ - 9, - 66 - ] - }, - { - "kind": "primitive", - "type": "null" - }, - { - "kind": "primitive", - "type": "boolean" - }, - { - "kind": "literal", - "value": 1 - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 40, - "optional": false - }, - { - "name": "kind", - "type": 70, - "optional": false - }, - { - "name": "senderSessionId", - "type": 5, - "optional": false - }, - { - "name": "summary", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "subagent-settled" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 59, - "optional": false - }, - { - "name": "kind", "type": 72, "optional": false }, { - "name": "senderSessionId", - "type": 5, + "name": "kind", + "type": 36, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 38, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 42, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 44, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 46, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 48, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 50, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 52, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 54, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 29, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 31, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 34, "optional": false } ], @@ -13153,7 +16367,199 @@ }, { "kind": "literal", - "value": "agent-message" + "value": "catalog" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 36, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 38, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 42, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 44, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 46, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 48, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 50, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 52, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 54, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 29, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 31, + "optional": false + } + ], + "indices": [] }, { "kind": "object", @@ -13165,17 +16571,17 @@ }, { "name": "kind", - "type": 74, + "type": 100, "optional": false }, { "name": "revision", - "type": 9, + "type": 13, "optional": false }, { "name": "round", - "type": 9, + "type": 13, "optional": false } ], @@ -13190,7 +16596,7 @@ "properties": [ { "name": "kind", - "type": 76, + "type": 102, "optional": false }, { @@ -13225,7 +16631,7 @@ "properties": [ { "name": "kind", - "type": 78, + "type": 104, "optional": false }, { @@ -13240,7 +16646,7 @@ }, { "name": "replayState", - "type": 79, + "type": 105, "optional": true } ], @@ -13259,12 +16665,132 @@ "properties": [ { "name": "kind", - "type": 51, + "type": 34, "optional": false - }, + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ { - "name": "plugin", - "type": 5, + "name": "kind", + "type": 36, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 38, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 40, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 42, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 44, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 46, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 114, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "system-prompt" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 48, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 50, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 52, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 54, "optional": false } ], @@ -13281,15 +16807,1035 @@ ], "indices": [] }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 29, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 122, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "code-mode" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 124, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "cordis-host-runner" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 31, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "baseline", + "type": 20, + "optional": true + }, + { + "name": "baselineIdentity", + "type": 5, + "optional": true + }, + { + "name": "changes", + "type": 127, + "optional": false + }, + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 133, + "optional": false + } + ], + "indices": [] + }, { "kind": "array", - "element": 9 + "element": 128 + }, + { + "kind": "object", + "properties": [ + { + "name": "action", + "type": 129, + "optional": false + }, + { + "name": "digest", + "type": 5, + "optional": true + }, + { + "name": "path", + "type": 5, + "optional": false + }, + { + "name": "scope", + "type": 5, + "optional": false + } + ], + "indices": [] }, { "kind": "union", "types": [ - 84, - 85 + 130, + 131, + 132 + ] + }, + { + "kind": "literal", + "value": "remove" + }, + { + "kind": "literal", + "value": "replace" + }, + { + "kind": "literal", + "value": "set" + }, + { + "kind": "literal", + "value": "agent-instructions" + }, + { + "kind": "object", + "properties": [ + { + "name": "callId", + "type": 5, + "optional": false + }, + { + "name": "kind", + "type": 135, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tool" + }, + { + "kind": "object", + "properties": [ + { + "name": "clientTimeZone", + "type": 5, + "optional": true + }, + { + "name": "kind", + "type": 25, + "optional": false + }, + { + "name": "rpcId", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "compactionId", + "type": 5, + "optional": false + }, + { + "name": "kind", + "type": 138, + "optional": false + }, + { + "name": "sourceCommandId", + "type": 5, + "optional": true + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "compact-checkpoint" + }, + { + "kind": "object", + "properties": [ + { + "name": "deliveryId", + "type": 5, + "optional": false + }, + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 140, + "optional": false + }, + { + "name": "provider", + "type": 5, + "optional": false + }, + { + "name": "ruleId", + "type": 5, + "optional": false + }, + { + "name": "source", + "type": 5, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "webhook" + }, + { + "kind": "object", + "properties": [ + { + "name": "entries", + "type": 142, + "optional": false + }, + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 144, + "optional": false + }, + { + "name": "update", + "type": 20, + "optional": true + } + ], + "indices": [] + }, + { + "kind": "array", + "element": 143 + }, + { + "kind": "object", + "properties": [ + { + "name": "description", + "type": 5, + "optional": false + }, + { + "name": "name", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "skill-catalog" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 146, + "optional": false + }, + { + "name": "name", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "skill-invocation" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, + "optional": false + }, + { + "name": "kind", + "type": 148, + "optional": false + }, + { + "name": "references", + "type": 149, + "optional": false + }, + { + "name": "version", + "type": 154, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "session-reference" + }, + { + "kind": "array", + "element": 150 + }, + { + "kind": "object", + "properties": [ + { + "name": "capturedFormatVersion", + "type": 13, + "optional": true + }, + { + "name": "capturedThroughSeq", + "type": 151, + "optional": false + }, + { + "name": "compacted", + "type": 153, + "optional": false + }, + { + "name": "inputIndex", + "type": 13, + "optional": false + }, + { + "name": "label", + "type": 5, + "optional": false + }, + { + "name": "omittedBytes", + "type": 13, + "optional": false + }, + { + "name": "omittedMessages", + "type": 13, + "optional": false + }, + { + "name": "originalMessages", + "type": 13, + "optional": false + }, + { + "name": "retainedMessages", + "type": 13, + "optional": false + }, + { + "name": "sessionId", + "type": 5, + "optional": false + }, + { + "name": "truncated", + "type": 153, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "union", + "types": [ + 13, + 152 + ] + }, + { + "kind": "primitive", + "type": "null" + }, + { + "kind": "primitive", + "type": "boolean" + }, + { + "kind": "literal", + "value": 1 + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 156, + "optional": false + }, + { + "name": "kind", + "type": 34, + "optional": false + }, + { + "name": "sections", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "snapshot" + }, + { + "kind": "array", + "element": 158 + }, + { + "kind": "object", + "properties": [ + { + "name": "name", + "type": 5, + "optional": false + }, + { + "name": "text", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 156, + "optional": false + }, + { + "name": "kind", + "type": 36, + "optional": false + }, + { + "name": "sections", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 156, + "optional": false + }, + { + "name": "kind", + "type": 38, + "optional": false + }, + { + "name": "sections", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 156, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + }, + { + "name": "sections", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 156, + "optional": false + }, + { + "name": "kind", + "type": 42, + "optional": false + }, + { + "name": "sections", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 156, + "optional": false + }, + { + "name": "kind", + "type": 44, + "optional": false + }, + { + "name": "sections", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 156, + "optional": false + }, + { + "name": "kind", + "type": 46, + "optional": false + }, + { + "name": "sections", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 156, + "optional": false + }, + { + "name": "kind", + "type": 48, + "optional": false + }, + { + "name": "sections", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 156, + "optional": false + }, + { + "name": "kind", + "type": 50, + "optional": false + }, + { + "name": "sections", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 156, + "optional": false + }, + { + "name": "kind", + "type": 52, + "optional": false + }, + { + "name": "sections", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 156, + "optional": false + }, + { + "name": "kind", + "type": 54, + "optional": false + }, + { + "name": "sections", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 156, + "optional": false + }, + { + "name": "kind", + "type": 29, + "optional": false + }, + { + "name": "sections", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 156, + "optional": false + }, + { + "name": "kind", + "type": 31, + "optional": false + }, + { + "name": "sections", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 172, + "optional": false + }, + { + "name": "senderSessionId", + "type": 5, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "subagent-settled" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 174, + "optional": false + }, + { + "name": "senderSessionId", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "agent-message" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 34, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 36, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 38, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 42, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 44, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 46, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 48, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 50, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 52, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 54, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "array", + "element": 13 + }, + { + "kind": "union", + "types": [ + 188, + 189 ] }, { @@ -13301,17 +17847,17 @@ "properties": [ { "name": "endSeq", - "type": 9, + "type": 13, "optional": false }, { "name": "op", - "type": 32, + "type": 131, "optional": false }, { "name": "startSeq", - "type": 9, + "type": 13, "optional": false } ], @@ -13763,491 +18309,47 @@ ] }, { - "digest": "01bc74417fd4ff36c2840b266a5b3b51bf0e3b71eb43960a2c4aee7b7441a2aa", + "digest": "0203243b72fc867afc81aff5f4cf2167e564ed342534eb612fc92f295cf07789", "schema": { "root": 0, "nodes": [ { - "kind": "union", - "types": [ - 1, - 28, - 47, - 52 - ] + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 1, + "optional": false + } + ], + "indices": [] }, + { + "kind": "literal", + "value": "runtime-context" + } + ] + }, + "names": [], + "sources": [] + }, + { + "digest": "022623b9ef98ec47ec3c3bae0c51027c70d2601141c5e92e26a0d83d1b4cef06", + "schema": { + "root": 0, + "nodes": [ { "kind": "object", "properties": [ { - "name": "content", + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", "type": 2, "optional": false - }, - { - "name": "id", - "type": 5, - "optional": false - }, - { - "name": "isError", - "type": 25, - "optional": true - }, - { - "name": "role", - "type": 26, - "optional": false - }, - { - "name": "source", - "type": 27, - "optional": false - }, - { - "name": "toolCallId", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "array", - "element": 3 - }, - { - "kind": "union", - "types": [ - 4, - 7, - 18, - 21, - 23 - ] - }, - { - "kind": "object", - "properties": [ - { - "name": "arguments", - "type": 5, - "optional": false - }, - { - "name": "id", - "type": 5, - "optional": false - }, - { - "name": "name", - "type": 5, - "optional": false - }, - { - "name": "type", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "primitive", - "type": "string" - }, - { - "kind": "literal", - "value": "tool-call" - }, - { - "kind": "object", - "properties": [ - { - "name": "attachment", - "type": 8, - "optional": false - }, - { - "name": "offloaded", - "type": 16, - "optional": true - }, - { - "name": "type", - "type": 17, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "attachmentId", - "type": 5, - "optional": false - }, - { - "name": "bytes", - "type": 9, - "optional": false - }, - { - "name": "height", - "type": 9, - "optional": false - }, - { - "name": "mediaType", - "type": 10, - "optional": false - }, - { - "name": "name", - "type": 5, - "optional": true - }, - { - "name": "originalDimensions", - "type": 15, - "optional": true - }, - { - "name": "width", - "type": 9, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "primitive", - "type": "number" - }, - { - "kind": "union", - "types": [ - 11, - 12, - 13, - 14 - ] - }, - { - "kind": "literal", - "value": "image/png" - }, - { - "kind": "literal", - "value": "image/webp" - }, - { - "kind": "literal", - "value": "image/gif" - }, - { - "kind": "literal", - "value": "image/jpeg" - }, - { - "kind": "object", - "properties": [ - { - "name": "height", - "type": 9, - "optional": false - }, - { - "name": "width", - "type": 9, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": true - }, - { - "kind": "literal", - "value": "image" - }, - { - "kind": "object", - "properties": [ - { - "name": "attachment", - "type": 19, - "optional": false - }, - { - "name": "type", - "type": 20, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "attachmentId", - "type": 5, - "optional": false - }, - { - "name": "bytes", - "type": 9, - "optional": false - }, - { - "name": "name", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "file" - }, - { - "kind": "object", - "properties": [ - { - "name": "text", - "type": 5, - "optional": false - }, - { - "name": "type", - "type": 22, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "reasoning" - }, - { - "kind": "object", - "properties": [ - { - "name": "text", - "type": 5, - "optional": false - }, - { - "name": "type", - "type": 24, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "text" - }, - { - "kind": "primitive", - "type": "boolean" - }, - { - "kind": "literal", - "value": "tool" - }, - { - "kind": "object", - "properties": [ - { - "name": "callId", - "type": 5, - "optional": false - }, - { - "name": "kind", - "type": 26, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "content", - "type": 2, - "optional": false - }, - { - "name": "id", - "type": 5, - "optional": false - }, - { - "name": "role", - "type": 29, - "optional": false - }, - { - "name": "source", - "type": 30, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "system" - }, - { - "kind": "union", - "types": [ - 31, - 36, - 38, - 40, - 42, - 44, - 46 - ] - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 32, - "optional": false - }, - { - "name": "kind", - "type": 33, - "optional": false - }, - { - "name": "plugin", - "type": 5, - "optional": false - }, - { - "name": "sections", - "type": 34, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "snapshot" - }, - { - "kind": "literal", - "value": "plugin" - }, - { - "kind": "array", - "element": 35 - }, - { - "kind": "object", - "properties": [ - { - "name": "name", - "type": 5, - "optional": false - }, - { - "name": "text", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 37, - "optional": false - }, - { - "name": "kind", - "type": 33, - "optional": false - }, - { - "name": "plugin", - "type": 5, - "optional": false - }, - { - "name": "summary", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "notice" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 39, - "optional": false - }, - { - "name": "kind", - "type": 33, - "optional": false - }, - { - "name": "plugin", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "instructions" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 41, - "optional": false - }, - { - "name": "kind", - "type": 33, - "optional": false - }, - { - "name": "plugin", - "type": 5, - "optional": false } ], "indices": [] @@ -14256,666 +18358,14 @@ "kind": "literal", "value": "recall" }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 43, - "optional": false - }, - { - "name": "kind", - "type": 33, - "optional": false - }, - { - "name": "plugin", - "type": 5, - "optional": false - } - ], - "indices": [] - }, { "kind": "literal", - "value": "relay" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 45, - "optional": false - }, - { - "name": "kind", - "type": 33, - "optional": false - }, - { - "name": "plugin", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "catalog" - }, - { - "kind": "object", - "properties": [ - { - "name": "kind", - "type": 33, - "optional": false - }, - { - "name": "plugin", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "content", - "type": 2, - "optional": false - }, - { - "name": "id", - "type": 5, - "optional": false - }, - { - "name": "role", - "type": 48, - "optional": false - }, - { - "name": "source", - "type": 49, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "assistant" - }, - { - "kind": "object", - "properties": [ - { - "name": "kind", - "type": 50, - "optional": false - }, - { - "name": "model", - "type": 5, - "optional": false - }, - { - "name": "provider", - "type": 5, - "optional": false - }, - { - "name": "replayState", - "type": 51, - "optional": true - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "model" - }, - { - "kind": "opaque", - "reason": "unknown" - }, - { - "kind": "object", - "properties": [ - { - "name": "content", - "type": 2, - "optional": false - }, - { - "name": "id", - "type": 5, - "optional": false - }, - { - "name": "role", - "type": 53, - "optional": false - }, - { - "name": "source", - "type": 54, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "user" - }, - { - "kind": "union", - "types": [ - 27, - 31, - 36, - 38, - 40, - 42, - 44, - 46, - 49, - 55, - 63, - 64, - 66, - 70, - 72, - 79, - 81, - 83, - 85, - 87 - ] - }, - { - "kind": "object", - "properties": [ - { - "name": "baseline", - "type": 16, - "optional": true - }, - { - "name": "baselineIdentity", - "type": 5, - "optional": true - }, - { - "name": "changes", - "type": 56, - "optional": false - }, - { - "name": "form", - "type": 39, - "optional": false - }, - { - "name": "kind", - "type": 62, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "array", - "element": 57 - }, - { - "kind": "object", - "properties": [ - { - "name": "action", - "type": 58, - "optional": false - }, - { - "name": "digest", - "type": 5, - "optional": true - }, - { - "name": "path", - "type": 5, - "optional": false - }, - { - "name": "scope", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "union", - "types": [ - 59, - 60, - 61 - ] - }, - { - "kind": "literal", - "value": "remove" - }, - { - "kind": "literal", - "value": "replace" - }, - { - "kind": "literal", - "value": "set" - }, - { - "kind": "literal", - "value": "agent-instructions" - }, - { - "kind": "object", - "properties": [ - { - "name": "clientTimeZone", - "type": 5, - "optional": true - }, - { - "name": "kind", - "type": 53, - "optional": false - }, - { - "name": "rpcId", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "deliveryId", - "type": 5, - "optional": false - }, - { - "name": "form", - "type": 37, - "optional": false - }, - { - "name": "kind", - "type": 65, - "optional": false - }, - { - "name": "provider", - "type": 5, - "optional": false - }, - { - "name": "ruleId", - "type": 5, - "optional": false - }, - { - "name": "source", - "type": 5, - "optional": false - }, - { - "name": "summary", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "webhook" - }, - { - "kind": "object", - "properties": [ - { - "name": "entries", - "type": 67, - "optional": false - }, - { - "name": "form", - "type": 45, - "optional": false - }, - { - "name": "kind", - "type": 69, - "optional": false - }, - { - "name": "update", - "type": 16, - "optional": true - } - ], - "indices": [] - }, - { - "kind": "array", - "element": 68 - }, - { - "kind": "object", - "properties": [ - { - "name": "description", - "type": 5, - "optional": false - }, - { - "name": "name", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "skill-catalog" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 39, - "optional": false - }, - { - "name": "kind", - "type": 71, - "optional": false - }, - { - "name": "name", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "skill-invocation" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 41, - "optional": false - }, - { - "name": "kind", - "type": 73, - "optional": false - }, - { - "name": "references", - "type": 74, - "optional": false - }, - { - "name": "version", - "type": 78, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "session-reference" - }, - { - "kind": "array", - "element": 75 - }, - { - "kind": "object", - "properties": [ - { - "name": "capturedFormatVersion", - "type": 9, - "optional": true - }, - { - "name": "capturedThroughSeq", - "type": 76, - "optional": false - }, - { - "name": "compacted", - "type": 25, - "optional": false - }, - { - "name": "inputIndex", - "type": 9, - "optional": false - }, - { - "name": "label", - "type": 5, - "optional": false - }, - { - "name": "omittedBytes", - "type": 9, - "optional": false - }, - { - "name": "omittedMessages", - "type": 9, - "optional": false - }, - { - "name": "originalMessages", - "type": 9, - "optional": false - }, - { - "name": "retainedMessages", - "type": 9, - "optional": false - }, - { - "name": "sessionId", - "type": 5, - "optional": false - }, - { - "name": "truncated", - "type": 25, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "union", - "types": [ - 9, - 77 - ] - }, - { - "kind": "primitive", - "type": "null" - }, - { - "kind": "literal", - "value": 1 - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 37, - "optional": false - }, - { - "name": "kind", - "type": 80, - "optional": false - }, - { - "name": "senderSessionId", - "type": 5, - "optional": false - }, - { - "name": "summary", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "subagent-settled" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 43, - "optional": false - }, - { - "name": "kind", - "type": 82, - "optional": false - }, - { - "name": "senderSessionId", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "agent-message" - }, - { - "kind": "object", - "properties": [ - { - "name": "goalId", - "type": 5, - "optional": false - }, - { - "name": "kind", - "type": 84, - "optional": false - }, - { - "name": "revision", - "type": 9, - "optional": false - }, - { - "name": "round", - "type": 9, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "goal" - }, - { - "kind": "object", - "properties": [ - { - "name": "kind", - "type": 86, - "optional": false - }, - { - "name": "messageId", - "type": 5, - "optional": false - }, - { - "name": "senderId", - "type": 5, - "optional": false - }, - { - "name": "senderName", - "type": 5, - "optional": false - }, - { - "name": "teamId", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "team-message" - }, - { - "kind": "object", - "properties": [ - { - "name": "kind", - "type": 53, - "optional": false - } - ], - "indices": [] + "value": "user-approval" } ] }, - "names": [ - "packages/llm/llm/src/message.ts#Message" - ], - "sources": [ - "packages/llm/llm/src/message.ts:180" - ] + "names": [], + "sources": [] }, { "digest": "023a355b2be0d688fb6e4df8388dadb942761d46cfe96d0f499aae9631a159d4", @@ -14944,6 +18394,33 @@ "packages/core/session/src/types.ts:205" ] }, + { + "digest": "02b2c23f2d94b028c9588a8faace3fce1217405db346da3389368b495457bf79", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 1, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "cordis-host-runner" + } + ] + }, + "names": [], + "sources": [ + "packages/extensions/cordis-host-runner/src/index.ts:14" + ] + }, { "digest": "0341d4c3dfcd53253cdc1e789d9130d3cd848b6f8b0706bf92f313a68b39ff23", "schema": { @@ -14958,525 +18435,6 @@ "names": [], "sources": [] }, - { - "digest": "04e1cae61e7654890444877cb802e3b6c8c607fa8a9b4380323939951a1be9d2", - "schema": { - "root": 0, - "nodes": [ - { - "kind": "object", - "properties": [ - { - "name": "message", - "type": 1, - "optional": false - }, - { - "name": "step", - "type": 9, - "optional": false - }, - { - "name": "turn", - "type": 9, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "content", - "type": 2, - "optional": false - }, - { - "name": "id", - "type": 5, - "optional": false - }, - { - "name": "role", - "type": 25, - "optional": false - }, - { - "name": "source", - "type": 26, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "array", - "element": 3 - }, - { - "kind": "union", - "types": [ - 4, - 7, - 18, - 21, - 23 - ] - }, - { - "kind": "object", - "properties": [ - { - "name": "arguments", - "type": 5, - "optional": false - }, - { - "name": "id", - "type": 5, - "optional": false - }, - { - "name": "name", - "type": 5, - "optional": false - }, - { - "name": "type", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "primitive", - "type": "string" - }, - { - "kind": "literal", - "value": "tool-call" - }, - { - "kind": "object", - "properties": [ - { - "name": "attachment", - "type": 8, - "optional": false - }, - { - "name": "offloaded", - "type": 16, - "optional": true - }, - { - "name": "type", - "type": 17, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "attachmentId", - "type": 5, - "optional": false - }, - { - "name": "bytes", - "type": 9, - "optional": false - }, - { - "name": "height", - "type": 9, - "optional": false - }, - { - "name": "mediaType", - "type": 10, - "optional": false - }, - { - "name": "name", - "type": 5, - "optional": true - }, - { - "name": "originalDimensions", - "type": 15, - "optional": true - }, - { - "name": "width", - "type": 9, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "primitive", - "type": "number" - }, - { - "kind": "union", - "types": [ - 11, - 12, - 13, - 14 - ] - }, - { - "kind": "literal", - "value": "image/gif" - }, - { - "kind": "literal", - "value": "image/jpeg" - }, - { - "kind": "literal", - "value": "image/png" - }, - { - "kind": "literal", - "value": "image/webp" - }, - { - "kind": "object", - "properties": [ - { - "name": "height", - "type": 9, - "optional": false - }, - { - "name": "width", - "type": 9, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": true - }, - { - "kind": "literal", - "value": "image" - }, - { - "kind": "object", - "properties": [ - { - "name": "attachment", - "type": 19, - "optional": false - }, - { - "name": "type", - "type": 20, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "attachmentId", - "type": 5, - "optional": false - }, - { - "name": "bytes", - "type": 9, - "optional": false - }, - { - "name": "name", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "file" - }, - { - "kind": "object", - "properties": [ - { - "name": "text", - "type": 5, - "optional": false - }, - { - "name": "type", - "type": 22, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "reasoning" - }, - { - "kind": "object", - "properties": [ - { - "name": "text", - "type": 5, - "optional": false - }, - { - "name": "type", - "type": 24, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "text" - }, - { - "kind": "literal", - "value": "system" - }, - { - "kind": "union", - "types": [ - 27, - 32, - 34, - 36, - 38, - 40, - 42 - ] - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 28, - "optional": false - }, - { - "name": "kind", - "type": 29, - "optional": false - }, - { - "name": "plugin", - "type": 5, - "optional": false - }, - { - "name": "sections", - "type": 30, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "snapshot" - }, - { - "kind": "literal", - "value": "plugin" - }, - { - "kind": "array", - "element": 31 - }, - { - "kind": "object", - "properties": [ - { - "name": "name", - "type": 5, - "optional": false - }, - { - "name": "text", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 33, - "optional": false - }, - { - "name": "kind", - "type": 29, - "optional": false - }, - { - "name": "plugin", - "type": 5, - "optional": false - }, - { - "name": "summary", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "notice" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 35, - "optional": false - }, - { - "name": "kind", - "type": 29, - "optional": false - }, - { - "name": "plugin", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "catalog" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 37, - "optional": false - }, - { - "name": "kind", - "type": 29, - "optional": false - }, - { - "name": "plugin", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "recall" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 39, - "optional": false - }, - { - "name": "kind", - "type": 29, - "optional": false - }, - { - "name": "plugin", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "relay" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 41, - "optional": false - }, - { - "name": "kind", - "type": 29, - "optional": false - }, - { - "name": "plugin", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "instructions" - }, - { - "kind": "object", - "properties": [ - { - "name": "kind", - "type": 29, - "optional": false - }, - { - "name": "plugin", - "type": 5, - "optional": false - } - ], - "indices": [] - } - ] - }, - "names": [], - "sources": [ - "packages/core/session/src/types.ts:321" - ] - }, { "digest": "050e0338b08a9712f3454b1e93bd7f5bb2f426ebfaf828688dd9102fc6089b70", "schema": { @@ -16307,7 +19265,7 @@ "packages/interaction/user-approval/src/index.ts#ApprovalPolicy" ], "sources": [ - "packages/interaction/user-approval/src/index.ts:60" + "packages/interaction/user-approval/src/index.ts:67" ] }, { @@ -16378,6 +19336,20 @@ "names": [], "sources": [] }, + { + "digest": "09655b34d7f3cf1e9005974de2357de2d4a60deea165d16dac1eadaa6ec539a8", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "literal", + "value": "system-prompt" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "0a30c3be336cdd4f8f34e66543a3d46d611c43986edd9b3ce6cbb9b721d3b5d3", "schema": { @@ -16636,6 +19608,328 @@ "packages/goal/goal/src/types.ts:20" ] }, + { + "digest": "0baa4dd6c2795de2454f2a20eadf1116981ae995f61a3e5b8128dcbca76c2048", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "message", + "type": 1, + "optional": false + }, + { + "name": "step", + "type": 13, + "optional": false + }, + { + "name": "turn", + "type": 13, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "content", + "type": 2, + "optional": false + }, + { + "name": "id", + "type": 5, + "optional": false + }, + { + "name": "role", + "type": 25, + "optional": false + }, + { + "name": "source", + "type": 26, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "array", + "element": 3 + }, + { + "kind": "union", + "types": [ + 4, + 7, + 9, + 11, + 22 + ] + }, + { + "kind": "object", + "properties": [ + { + "name": "text", + "type": 5, + "optional": false + }, + { + "name": "type", + "type": 6, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "primitive", + "type": "string" + }, + { + "kind": "literal", + "value": "text" + }, + { + "kind": "object", + "properties": [ + { + "name": "text", + "type": 5, + "optional": false + }, + { + "name": "type", + "type": 8, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "reasoning" + }, + { + "kind": "object", + "properties": [ + { + "name": "arguments", + "type": 5, + "optional": false + }, + { + "name": "id", + "type": 5, + "optional": false + }, + { + "name": "name", + "type": 5, + "optional": false + }, + { + "name": "type", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tool-call" + }, + { + "kind": "object", + "properties": [ + { + "name": "attachment", + "type": 12, + "optional": false + }, + { + "name": "offloaded", + "type": 20, + "optional": true + }, + { + "name": "type", + "type": 21, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "attachmentId", + "type": 5, + "optional": false + }, + { + "name": "bytes", + "type": 13, + "optional": false + }, + { + "name": "height", + "type": 13, + "optional": false + }, + { + "name": "mediaType", + "type": 14, + "optional": false + }, + { + "name": "name", + "type": 5, + "optional": true + }, + { + "name": "originalDimensions", + "type": 19, + "optional": true + }, + { + "name": "width", + "type": 13, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "primitive", + "type": "number" + }, + { + "kind": "union", + "types": [ + 15, + 16, + 17, + 18 + ] + }, + { + "kind": "literal", + "value": "image/gif" + }, + { + "kind": "literal", + "value": "image/jpeg" + }, + { + "kind": "literal", + "value": "image/png" + }, + { + "kind": "literal", + "value": "image/webp" + }, + { + "kind": "object", + "properties": [ + { + "name": "height", + "type": 13, + "optional": false + }, + { + "name": "width", + "type": 13, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": true + }, + { + "kind": "literal", + "value": "image" + }, + { + "kind": "object", + "properties": [ + { + "name": "attachment", + "type": 23, + "optional": false + }, + { + "name": "type", + "type": 24, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "attachmentId", + "type": 5, + "optional": false + }, + { + "name": "bytes", + "type": 13, + "optional": false + }, + { + "name": "name", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "file" + }, + { + "kind": "literal", + "value": "system" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 27, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "system-prompt" + } + ] + }, + "names": [], + "sources": [ + "packages/core/session/src/types.ts:321" + ] + }, { "digest": "0bcfaf5566d271028429ac7b562cb59053c9d78b8ae14708c35fac835108d1b1", "schema": { @@ -17128,40 +20422,6 @@ "packages/subagent/tool-subagent/src/model-selection-state.ts:17" ] }, - { - "digest": "0ddab4577db37a3e0d9e3a91761735c8ef6f5629d526ab8ecaeeea19c097c8f8", - "schema": { - "root": 0, - "nodes": [ - { - "kind": "object", - "properties": [ - { - "name": "kind", - "type": 1, - "optional": false - }, - { - "name": "plugin", - "type": 2, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "plugin" - }, - { - "kind": "primitive", - "type": "string" - } - ] - }, - "names": [], - "sources": [] - }, { "digest": "0e10d7c096b47e61defe372a5fc8bd37d835199410eac44367f95c45082498bd", "schema": { @@ -17233,6 +20493,65 @@ "names": [], "sources": [] }, + { + "digest": "0ed8d1108fe7a5e1c3078ef1faea12199a56b6b1216ccaceb0f6103b0c9a7691", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 1, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "hooks-claude-code" + } + ] + }, + "names": [], + "sources": [] + }, + { + "digest": "0eeb17e1df89b1ebc2902116fe7145e0d321ef0db26e6bdebc802cb8513a01c1", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "instructions" + }, + { + "kind": "literal", + "value": "runtime-context" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "0f46153645c297846a3fad3911636659ca4717a5e7d71c9f50bffacd312115ef", "schema": { @@ -17591,6 +20910,20 @@ "names": [], "sources": [] }, + { + "digest": "0fe52387f65052702ed9d7cd59db826468936595d1b3eec207e7a823adc719db", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "literal", + "value": "plan-mode" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "10e386801903f9d424602c31d3ff837a94aef623c8b391376d8d9e253525fabe", "schema": { @@ -17605,6 +20938,69 @@ "names": [], "sources": [] }, + { + "digest": "11638dc58a31496fb6706ced3e23e3a2db1f3b2a8845968c810827a72b5fc811", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + }, + { + "name": "sections", + "type": 3, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "snapshot" + }, + { + "kind": "literal", + "value": "tool-goal" + }, + { + "kind": "array", + "element": 4 + }, + { + "kind": "object", + "properties": [ + { + "name": "name", + "type": 5, + "optional": false + }, + { + "name": "text", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "primitive", + "type": "string" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "119abe2b9c0b2f46ecb31d82b9acba4d4b30e049f655e2475e8b4ae12d5a9e25", "schema": { @@ -17715,7 +21111,7 @@ }, "names": [], "sources": [ - "packages/interaction/user-approval/src/index.ts:33" + "packages/interaction/user-approval/src/index.ts:40" ] }, { @@ -17991,6 +21387,20 @@ "names": [], "sources": [] }, + { + "digest": "1443074511c1f99aaac262e60f81282cd4f2790e7c7ca0d11499bbe7c1e769bf", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "literal", + "value": "code-mode" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "15196447222782e773eb943c92b18316ce96b9af0f0cfddb6e57ba8274ecc5ff", "schema": { @@ -18192,608 +21602,6 @@ "names": [], "sources": [] }, - { - "digest": "1772581b17e1fab970fda49f04ffae2a181b7992ca4efa63bffe5f8b2bd62300", - "schema": { - "root": 0, - "nodes": [ - { - "kind": "object", - "properties": [ - { - "name": "data", - "type": 1, - "optional": false - }, - { - "name": "ignorable", - "type": 17, - "optional": true - }, - { - "name": "seq", - "type": 10, - "optional": false - }, - { - "name": "sourceEventSeqs", - "type": 44, - "optional": true - }, - { - "name": "surfaceOp", - "type": 45, - "optional": false - }, - { - "name": "time", - "type": 10, - "optional": false - }, - { - "name": "type", - "type": 49, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "message", - "type": 2, - "optional": false - }, - { - "name": "step", - "type": 10, - "optional": false - }, - { - "name": "turn", - "type": 10, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "content", - "type": 3, - "optional": false - }, - { - "name": "id", - "type": 6, - "optional": false - }, - { - "name": "role", - "type": 26, - "optional": false - }, - { - "name": "source", - "type": 27, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "array", - "element": 4 - }, - { - "kind": "union", - "types": [ - 5, - 8, - 19, - 22, - 24 - ] - }, - { - "kind": "object", - "properties": [ - { - "name": "arguments", - "type": 6, - "optional": false - }, - { - "name": "id", - "type": 6, - "optional": false - }, - { - "name": "name", - "type": 6, - "optional": false - }, - { - "name": "type", - "type": 7, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "primitive", - "type": "string" - }, - { - "kind": "literal", - "value": "tool-call" - }, - { - "kind": "object", - "properties": [ - { - "name": "attachment", - "type": 9, - "optional": false - }, - { - "name": "offloaded", - "type": 17, - "optional": true - }, - { - "name": "type", - "type": 18, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "attachmentId", - "type": 6, - "optional": false - }, - { - "name": "bytes", - "type": 10, - "optional": false - }, - { - "name": "height", - "type": 10, - "optional": false - }, - { - "name": "mediaType", - "type": 11, - "optional": false - }, - { - "name": "name", - "type": 6, - "optional": true - }, - { - "name": "originalDimensions", - "type": 16, - "optional": true - }, - { - "name": "width", - "type": 10, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "primitive", - "type": "number" - }, - { - "kind": "union", - "types": [ - 12, - 13, - 14, - 15 - ] - }, - { - "kind": "literal", - "value": "image/gif" - }, - { - "kind": "literal", - "value": "image/jpeg" - }, - { - "kind": "literal", - "value": "image/png" - }, - { - "kind": "literal", - "value": "image/webp" - }, - { - "kind": "object", - "properties": [ - { - "name": "height", - "type": 10, - "optional": false - }, - { - "name": "width", - "type": 10, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": true - }, - { - "kind": "literal", - "value": "image" - }, - { - "kind": "object", - "properties": [ - { - "name": "attachment", - "type": 20, - "optional": false - }, - { - "name": "type", - "type": 21, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "attachmentId", - "type": 6, - "optional": false - }, - { - "name": "bytes", - "type": 10, - "optional": false - }, - { - "name": "name", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "file" - }, - { - "kind": "object", - "properties": [ - { - "name": "text", - "type": 6, - "optional": false - }, - { - "name": "type", - "type": 23, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "reasoning" - }, - { - "kind": "object", - "properties": [ - { - "name": "text", - "type": 6, - "optional": false - }, - { - "name": "type", - "type": 25, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "text" - }, - { - "kind": "literal", - "value": "system" - }, - { - "kind": "union", - "types": [ - 28, - 33, - 35, - 37, - 39, - 41, - 43 - ] - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 29, - "optional": false - }, - { - "name": "kind", - "type": 30, - "optional": false - }, - { - "name": "plugin", - "type": 6, - "optional": false - }, - { - "name": "sections", - "type": 31, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "snapshot" - }, - { - "kind": "literal", - "value": "plugin" - }, - { - "kind": "array", - "element": 32 - }, - { - "kind": "object", - "properties": [ - { - "name": "name", - "type": 6, - "optional": false - }, - { - "name": "text", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 34, - "optional": false - }, - { - "name": "kind", - "type": 30, - "optional": false - }, - { - "name": "plugin", - "type": 6, - "optional": false - }, - { - "name": "summary", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "notice" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 36, - "optional": false - }, - { - "name": "kind", - "type": 30, - "optional": false - }, - { - "name": "plugin", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "recall" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 38, - "optional": false - }, - { - "name": "kind", - "type": 30, - "optional": false - }, - { - "name": "plugin", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "relay" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 40, - "optional": false - }, - { - "name": "kind", - "type": 30, - "optional": false - }, - { - "name": "plugin", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "catalog" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 42, - "optional": false - }, - { - "name": "kind", - "type": 30, - "optional": false - }, - { - "name": "plugin", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "instructions" - }, - { - "kind": "object", - "properties": [ - { - "name": "kind", - "type": 30, - "optional": false - }, - { - "name": "plugin", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "array", - "element": 10 - }, - { - "kind": "union", - "types": [ - 46, - 48 - ] - }, - { - "kind": "object", - "properties": [ - { - "name": "endSeq", - "type": 10, - "optional": false - }, - { - "name": "op", - "type": 47, - "optional": false - }, - { - "name": "startSeq", - "type": 10, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "replace" - }, - { - "kind": "literal", - "value": "append" - }, - { - "kind": "literal", - "value": "system/message" - } - ] - }, - "names": [], - "sources": [] - }, { "digest": "17aae616ef020b8b9f011ec398ec935450fb06d3e2a0722c456f63aeaf5ff728", "schema": { @@ -19014,6 +21822,40 @@ "names": [], "sources": [] }, + { + "digest": "1938c8c20f1cba7c82dbedcfa4f14c3ee191cd77ed3314ee1fc676d44cadf3be", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "instructions" + }, + { + "kind": "literal", + "value": "schedule" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "1986c2664009c99155e44795676c887fa67f7c55cd2d5e6b648ff763e0ab033a", "schema": { @@ -19179,1221 +22021,6 @@ "packages/session/session-title/src/types.ts:29" ] }, - { - "digest": "1b78e3a578a7e6d29d9564a9f5d236c2ebdcf682dbeb7b50400d8850e313b518", - "schema": { - "root": 0, - "nodes": [ - { - "kind": "object", - "properties": [ - { - "name": "maxTokens", - "type": 1, - "optional": false - }, - { - "name": "messageSeqs", - "type": 2, - "optional": false - }, - { - "name": "messages", - "type": 3, - "optional": false - }, - { - "name": "route", - "type": 91, - "optional": false - }, - { - "name": "system", - "type": 9, - "optional": false - }, - { - "name": "titleProvider", - "type": 9, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "primitive", - "type": "number" - }, - { - "kind": "array", - "element": 1 - }, - { - "kind": "array", - "element": 4 - }, - { - "kind": "union", - "types": [ - 5, - 31, - 50, - 55 - ] - }, - { - "kind": "object", - "properties": [ - { - "name": "content", - "type": 6, - "optional": false - }, - { - "name": "id", - "type": 9, - "optional": false - }, - { - "name": "isError", - "type": 28, - "optional": true - }, - { - "name": "role", - "type": 29, - "optional": false - }, - { - "name": "source", - "type": 30, - "optional": false - }, - { - "name": "toolCallId", - "type": 9, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "array", - "element": 7 - }, - { - "kind": "union", - "types": [ - 8, - 11, - 21, - 24, - 26 - ] - }, - { - "kind": "object", - "properties": [ - { - "name": "arguments", - "type": 9, - "optional": false - }, - { - "name": "id", - "type": 9, - "optional": false - }, - { - "name": "name", - "type": 9, - "optional": false - }, - { - "name": "type", - "type": 10, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "primitive", - "type": "string" - }, - { - "kind": "literal", - "value": "tool-call" - }, - { - "kind": "object", - "properties": [ - { - "name": "attachment", - "type": 12, - "optional": false - }, - { - "name": "offloaded", - "type": 19, - "optional": true - }, - { - "name": "type", - "type": 20, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "attachmentId", - "type": 9, - "optional": false - }, - { - "name": "bytes", - "type": 1, - "optional": false - }, - { - "name": "height", - "type": 1, - "optional": false - }, - { - "name": "mediaType", - "type": 13, - "optional": false - }, - { - "name": "name", - "type": 9, - "optional": true - }, - { - "name": "originalDimensions", - "type": 18, - "optional": true - }, - { - "name": "width", - "type": 1, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "union", - "types": [ - 14, - 15, - 16, - 17 - ] - }, - { - "kind": "literal", - "value": "image/png" - }, - { - "kind": "literal", - "value": "image/webp" - }, - { - "kind": "literal", - "value": "image/gif" - }, - { - "kind": "literal", - "value": "image/jpeg" - }, - { - "kind": "object", - "properties": [ - { - "name": "height", - "type": 1, - "optional": false - }, - { - "name": "width", - "type": 1, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": true - }, - { - "kind": "literal", - "value": "image" - }, - { - "kind": "object", - "properties": [ - { - "name": "attachment", - "type": 22, - "optional": false - }, - { - "name": "type", - "type": 23, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "attachmentId", - "type": 9, - "optional": false - }, - { - "name": "bytes", - "type": 1, - "optional": false - }, - { - "name": "name", - "type": 9, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "file" - }, - { - "kind": "object", - "properties": [ - { - "name": "text", - "type": 9, - "optional": false - }, - { - "name": "type", - "type": 25, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "reasoning" - }, - { - "kind": "object", - "properties": [ - { - "name": "text", - "type": 9, - "optional": false - }, - { - "name": "type", - "type": 27, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "text" - }, - { - "kind": "primitive", - "type": "boolean" - }, - { - "kind": "literal", - "value": "tool" - }, - { - "kind": "object", - "properties": [ - { - "name": "callId", - "type": 9, - "optional": false - }, - { - "name": "kind", - "type": 29, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "content", - "type": 6, - "optional": false - }, - { - "name": "id", - "type": 9, - "optional": false - }, - { - "name": "role", - "type": 32, - "optional": false - }, - { - "name": "source", - "type": 33, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "system" - }, - { - "kind": "union", - "types": [ - 34, - 39, - 41, - 43, - 45, - 47, - 49 - ] - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 35, - "optional": false - }, - { - "name": "kind", - "type": 36, - "optional": false - }, - { - "name": "plugin", - "type": 9, - "optional": false - }, - { - "name": "sections", - "type": 37, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "snapshot" - }, - { - "kind": "literal", - "value": "plugin" - }, - { - "kind": "array", - "element": 38 - }, - { - "kind": "object", - "properties": [ - { - "name": "name", - "type": 9, - "optional": false - }, - { - "name": "text", - "type": 9, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 40, - "optional": false - }, - { - "name": "kind", - "type": 36, - "optional": false - }, - { - "name": "plugin", - "type": 9, - "optional": false - }, - { - "name": "summary", - "type": 9, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "notice" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 42, - "optional": false - }, - { - "name": "kind", - "type": 36, - "optional": false - }, - { - "name": "plugin", - "type": 9, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "instructions" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 44, - "optional": false - }, - { - "name": "kind", - "type": 36, - "optional": false - }, - { - "name": "plugin", - "type": 9, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "recall" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 46, - "optional": false - }, - { - "name": "kind", - "type": 36, - "optional": false - }, - { - "name": "plugin", - "type": 9, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "relay" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 48, - "optional": false - }, - { - "name": "kind", - "type": 36, - "optional": false - }, - { - "name": "plugin", - "type": 9, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "catalog" - }, - { - "kind": "object", - "properties": [ - { - "name": "kind", - "type": 36, - "optional": false - }, - { - "name": "plugin", - "type": 9, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "content", - "type": 6, - "optional": false - }, - { - "name": "id", - "type": 9, - "optional": false - }, - { - "name": "role", - "type": 51, - "optional": false - }, - { - "name": "source", - "type": 52, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "assistant" - }, - { - "kind": "object", - "properties": [ - { - "name": "kind", - "type": 53, - "optional": false - }, - { - "name": "model", - "type": 9, - "optional": false - }, - { - "name": "provider", - "type": 9, - "optional": false - }, - { - "name": "replayState", - "type": 54, - "optional": true - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "model" - }, - { - "kind": "opaque", - "reason": "unknown" - }, - { - "kind": "object", - "properties": [ - { - "name": "content", - "type": 6, - "optional": false - }, - { - "name": "id", - "type": 9, - "optional": false - }, - { - "name": "role", - "type": 56, - "optional": false - }, - { - "name": "source", - "type": 57, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "user" - }, - { - "kind": "union", - "types": [ - 30, - 34, - 39, - 41, - 43, - 45, - 47, - 49, - 52, - 58, - 66, - 67, - 69, - 73, - 75, - 82, - 84, - 86, - 88, - 90 - ] - }, - { - "kind": "object", - "properties": [ - { - "name": "baseline", - "type": 19, - "optional": true - }, - { - "name": "baselineIdentity", - "type": 9, - "optional": true - }, - { - "name": "changes", - "type": 59, - "optional": false - }, - { - "name": "form", - "type": 42, - "optional": false - }, - { - "name": "kind", - "type": 65, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "array", - "element": 60 - }, - { - "kind": "object", - "properties": [ - { - "name": "action", - "type": 61, - "optional": false - }, - { - "name": "digest", - "type": 9, - "optional": true - }, - { - "name": "path", - "type": 9, - "optional": false - }, - { - "name": "scope", - "type": 9, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "union", - "types": [ - 62, - 63, - 64 - ] - }, - { - "kind": "literal", - "value": "replace" - }, - { - "kind": "literal", - "value": "set" - }, - { - "kind": "literal", - "value": "remove" - }, - { - "kind": "literal", - "value": "agent-instructions" - }, - { - "kind": "object", - "properties": [ - { - "name": "clientTimeZone", - "type": 9, - "optional": true - }, - { - "name": "kind", - "type": 56, - "optional": false - }, - { - "name": "rpcId", - "type": 9, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "deliveryId", - "type": 9, - "optional": false - }, - { - "name": "form", - "type": 40, - "optional": false - }, - { - "name": "kind", - "type": 68, - "optional": false - }, - { - "name": "provider", - "type": 9, - "optional": false - }, - { - "name": "ruleId", - "type": 9, - "optional": false - }, - { - "name": "source", - "type": 9, - "optional": false - }, - { - "name": "summary", - "type": 9, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "webhook" - }, - { - "kind": "object", - "properties": [ - { - "name": "entries", - "type": 70, - "optional": false - }, - { - "name": "form", - "type": 48, - "optional": false - }, - { - "name": "kind", - "type": 72, - "optional": false - }, - { - "name": "update", - "type": 19, - "optional": true - } - ], - "indices": [] - }, - { - "kind": "array", - "element": 71 - }, - { - "kind": "object", - "properties": [ - { - "name": "description", - "type": 9, - "optional": false - }, - { - "name": "name", - "type": 9, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "skill-catalog" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 42, - "optional": false - }, - { - "name": "kind", - "type": 74, - "optional": false - }, - { - "name": "name", - "type": 9, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "skill-invocation" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 44, - "optional": false - }, - { - "name": "kind", - "type": 76, - "optional": false - }, - { - "name": "references", - "type": 77, - "optional": false - }, - { - "name": "version", - "type": 81, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "session-reference" - }, - { - "kind": "array", - "element": 78 - }, - { - "kind": "object", - "properties": [ - { - "name": "capturedFormatVersion", - "type": 1, - "optional": true - }, - { - "name": "capturedThroughSeq", - "type": 79, - "optional": false - }, - { - "name": "compacted", - "type": 28, - "optional": false - }, - { - "name": "inputIndex", - "type": 1, - "optional": false - }, - { - "name": "label", - "type": 9, - "optional": false - }, - { - "name": "omittedBytes", - "type": 1, - "optional": false - }, - { - "name": "omittedMessages", - "type": 1, - "optional": false - }, - { - "name": "originalMessages", - "type": 1, - "optional": false - }, - { - "name": "retainedMessages", - "type": 1, - "optional": false - }, - { - "name": "sessionId", - "type": 9, - "optional": false - }, - { - "name": "truncated", - "type": 28, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "union", - "types": [ - 1, - 80 - ] - }, - { - "kind": "primitive", - "type": "null" - }, - { - "kind": "literal", - "value": 1 - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 40, - "optional": false - }, - { - "name": "kind", - "type": 83, - "optional": false - }, - { - "name": "senderSessionId", - "type": 9, - "optional": false - }, - { - "name": "summary", - "type": 9, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "subagent-settled" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 46, - "optional": false - }, - { - "name": "kind", - "type": 85, - "optional": false - }, - { - "name": "senderSessionId", - "type": 9, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "agent-message" - }, - { - "kind": "object", - "properties": [ - { - "name": "goalId", - "type": 9, - "optional": false - }, - { - "name": "kind", - "type": 87, - "optional": false - }, - { - "name": "revision", - "type": 1, - "optional": false - }, - { - "name": "round", - "type": 1, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "goal" - }, - { - "kind": "object", - "properties": [ - { - "name": "kind", - "type": 89, - "optional": false - }, - { - "name": "messageId", - "type": 9, - "optional": false - }, - { - "name": "senderId", - "type": 9, - "optional": false - }, - { - "name": "senderName", - "type": 9, - "optional": false - }, - { - "name": "teamId", - "type": 9, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "team-message" - }, - { - "kind": "object", - "properties": [ - { - "name": "kind", - "type": 56, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "model", - "type": 9, - "optional": false - }, - { - "name": "provider", - "type": 9, - "optional": false - } - ], - "indices": [] - } - ] - }, - "names": [ - "packages/session/session-title-llm/src/index.ts#SessionTitleLlmRequestEventData" - ], - "sources": [ - "packages/session/session-title-llm/src/index.ts:27" - ] - }, { "digest": "1b912703e2d64f91c99c675b8f805b01076c8325b905c1218ad81ef0b24909d5", "schema": { @@ -20917,6 +22544,40 @@ "names": [], "sources": [] }, + { + "digest": "1e709346005826eb81809eeb76a3f713cf13ad6c5cec75146d07020ab9adc938", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "catalog" + }, + { + "kind": "literal", + "value": "schedule" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "1ebc6f9ff3aa9e3a38f8695f49bacdab1f8b7a3832741853ca46f40af56ccd01", "schema": { @@ -20945,6 +22606,20 @@ "names": [], "sources": [] }, + { + "digest": "1f1385dbc3e875c021e387c7096d671d606f22daec51b25c80348735b6bbfa10", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "literal", + "value": "repeat-tool-reminder" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "1f8c126cfab3df812cd115cfc23e3256f0fa2383400f4ce91ecad313577e59b0", "schema": { @@ -21053,6 +22728,343 @@ "packages/core/session/src/types.ts:195" ] }, + { + "digest": "1fdad624334d354820dfb3a26e28d0bc9fc1b62a33f87bab63f715b3f4391bfd", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "relay" + }, + { + "kind": "literal", + "value": "hooks-codex" + } + ] + }, + "names": [], + "sources": [] + }, + { + "digest": "20a3c1c8a3154e4ae69eada1212e3216baf93454ee4c745565b9374d7539fe8b", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "content", + "type": 1, + "optional": false + }, + { + "name": "id", + "type": 4, + "optional": false + }, + { + "name": "role", + "type": 24, + "optional": false + }, + { + "name": "source", + "type": 25, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "array", + "element": 2 + }, + { + "kind": "union", + "types": [ + 3, + 6, + 8, + 10, + 21 + ] + }, + { + "kind": "object", + "properties": [ + { + "name": "text", + "type": 4, + "optional": false + }, + { + "name": "type", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "primitive", + "type": "string" + }, + { + "kind": "literal", + "value": "text" + }, + { + "kind": "object", + "properties": [ + { + "name": "text", + "type": 4, + "optional": false + }, + { + "name": "type", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "reasoning" + }, + { + "kind": "object", + "properties": [ + { + "name": "arguments", + "type": 4, + "optional": false + }, + { + "name": "id", + "type": 4, + "optional": false + }, + { + "name": "name", + "type": 4, + "optional": false + }, + { + "name": "type", + "type": 9, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tool-call" + }, + { + "kind": "object", + "properties": [ + { + "name": "attachment", + "type": 11, + "optional": false + }, + { + "name": "offloaded", + "type": 19, + "optional": true + }, + { + "name": "type", + "type": 20, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "attachmentId", + "type": 4, + "optional": false + }, + { + "name": "bytes", + "type": 12, + "optional": false + }, + { + "name": "height", + "type": 12, + "optional": false + }, + { + "name": "mediaType", + "type": 13, + "optional": false + }, + { + "name": "name", + "type": 4, + "optional": true + }, + { + "name": "originalDimensions", + "type": 18, + "optional": true + }, + { + "name": "width", + "type": 12, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "primitive", + "type": "number" + }, + { + "kind": "union", + "types": [ + 14, + 15, + 16, + 17 + ] + }, + { + "kind": "literal", + "value": "image/gif" + }, + { + "kind": "literal", + "value": "image/jpeg" + }, + { + "kind": "literal", + "value": "image/png" + }, + { + "kind": "literal", + "value": "image/webp" + }, + { + "kind": "object", + "properties": [ + { + "name": "height", + "type": 12, + "optional": false + }, + { + "name": "width", + "type": 12, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": true + }, + { + "kind": "literal", + "value": "image" + }, + { + "kind": "object", + "properties": [ + { + "name": "attachment", + "type": 22, + "optional": false + }, + { + "name": "type", + "type": 23, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "attachmentId", + "type": 4, + "optional": false + }, + { + "name": "bytes", + "type": 12, + "optional": false + }, + { + "name": "name", + "type": 4, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "file" + }, + { + "kind": "literal", + "value": "system" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 26, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "system-prompt" + } + ] + }, + "names": [ + "packages/llm/llm/src/message.ts#SystemMessage" + ], + "sources": [ + "packages/llm/llm/src/message.ts:151" + ] + }, { "digest": "20a57544bbf204dacd1ae6beb2ab29444365c3c869f2afdf489dcdcbc3d9c8c5", "schema": { @@ -21077,7 +23089,7 @@ }, "names": [], "sources": [ - "packages/plan/plan-mode/src/index.ts:47" + "packages/plan/plan-mode/src/index.ts:53" ] }, { @@ -21147,6 +23159,40 @@ "packages/experimental/agent-team/src/types.ts:115" ] }, + { + "digest": "224aa11d4d5f88c450822d01b99e6ca5e3a9c7f26a5ede10bae33384a09ef4dc", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "instructions" + }, + { + "kind": "literal", + "value": "dsh-session-title-llm" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "234142ee4f996f38cc9fa3b8b3e3de29b03c9aefe5ebf6c224eddd564505aa85", "schema": { @@ -21176,225 +23222,13 @@ "sources": [] }, { - "digest": "23cf7e0cf3fec1283b60fa15713506169bc9c079a08e124d1cb9733baca80b40", + "digest": "23af3759678a30de1d11d946772da8c051c63caa67997c5da05d30d7a9fe8a97", "schema": { "root": 0, "nodes": [ - { - "kind": "union", - "types": [ - 1, - 7, - 9, - 11, - 13, - 15, - 17 - ] - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 2, - "optional": false - }, - { - "name": "kind", - "type": 3, - "optional": false - }, - { - "name": "plugin", - "type": 4, - "optional": false - }, - { - "name": "sections", - "type": 5, - "optional": false - } - ], - "indices": [] - }, { "kind": "literal", - "value": "snapshot" - }, - { - "kind": "literal", - "value": "plugin" - }, - { - "kind": "primitive", - "type": "string" - }, - { - "kind": "array", - "element": 6 - }, - { - "kind": "object", - "properties": [ - { - "name": "name", - "type": 4, - "optional": false - }, - { - "name": "text", - "type": 4, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 8, - "optional": false - }, - { - "name": "kind", - "type": 3, - "optional": false - }, - { - "name": "plugin", - "type": 4, - "optional": false - }, - { - "name": "summary", - "type": 4, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "notice" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 10, - "optional": false - }, - { - "name": "kind", - "type": 3, - "optional": false - }, - { - "name": "plugin", - "type": 4, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "catalog" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 12, - "optional": false - }, - { - "name": "kind", - "type": 3, - "optional": false - }, - { - "name": "plugin", - "type": 4, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "instructions" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 14, - "optional": false - }, - { - "name": "kind", - "type": 3, - "optional": false - }, - { - "name": "plugin", - "type": 4, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "recall" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 16, - "optional": false - }, - { - "name": "kind", - "type": 3, - "optional": false - }, - { - "name": "plugin", - "type": 4, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "relay" - }, - { - "kind": "object", - "properties": [ - { - "name": "kind", - "type": 3, - "optional": false - }, - { - "name": "plugin", - "type": 4, - "optional": false - } - ], - "indices": [] + "value": "dsh-session-title-llm" } ] }, @@ -21845,6 +23679,45 @@ "names": [], "sources": [] }, + { + "digest": "24b10f7cdae64928f89c49afc2eca0af9eb4a2f135e16f3416e6b8461fef1748", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "literal", + "value": "runtime-context" + } + ] + }, + "names": [], + "sources": [] + }, + { + "digest": "24ce31aa528272e59f21cd26da9eca08968bcc97529756a749bfdab71746d9c8", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 1, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tool-jobs" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "2517ba143a271508d3ca35126d5aca8f7f1facf5aaddce4adf011832042fa2b9", "schema": { @@ -22027,6 +23900,40 @@ "names": [], "sources": [] }, + { + "digest": "260523b412c19ad8c2bb00093b07f64245ff8ba6b2f76c5b545303772ac9704c", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "catalog" + }, + { + "kind": "literal", + "value": "tool-goal" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "26718e15e7e395bce9642dba5bbe09b3b1a4ce2213d20d566cd9207d7fc5fb78", "schema": { @@ -22242,7 +24149,7 @@ ] }, { - "digest": "2a47ef7025d7dcf7e9977aadd738e7408a210b101a7dbbd37f4d87f22166eff0", + "digest": "28936c614bd4e7e2774806edcbb3cbfd3ee643ac1cbf0bbdff43d915505a8fe3", "schema": { "root": 0, "nodes": [ @@ -22250,453 +24157,18 @@ "kind": "object", "properties": [ { - "name": "data", + "name": "form", "type": 1, "optional": false }, - { - "name": "ignorable", - "type": 20, - "optional": true - }, - { - "name": "seq", - "type": 2, - "optional": false - }, - { - "name": "time", - "type": 2, - "optional": false - }, - { - "name": "type", - "type": 93, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "maxTokens", - "type": 2, - "optional": false - }, - { - "name": "messageSeqs", - "type": 3, - "optional": false - }, - { - "name": "messages", - "type": 4, - "optional": false - }, - { - "name": "route", - "type": 92, - "optional": false - }, - { - "name": "system", - "type": 10, - "optional": false - }, - { - "name": "titleProvider", - "type": 10, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "primitive", - "type": "number" - }, - { - "kind": "array", - "element": 2 - }, - { - "kind": "array", - "element": 5 - }, - { - "kind": "union", - "types": [ - 6, - 32, - 51, - 56 - ] - }, - { - "kind": "object", - "properties": [ - { - "name": "content", - "type": 7, - "optional": false - }, - { - "name": "id", - "type": 10, - "optional": false - }, - { - "name": "isError", - "type": 29, - "optional": true - }, - { - "name": "role", - "type": 30, - "optional": false - }, - { - "name": "source", - "type": 31, - "optional": false - }, - { - "name": "toolCallId", - "type": 10, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "array", - "element": 8 - }, - { - "kind": "union", - "types": [ - 9, - 12, - 22, - 25, - 27 - ] - }, - { - "kind": "object", - "properties": [ - { - "name": "arguments", - "type": 10, - "optional": false - }, - { - "name": "id", - "type": 10, - "optional": false - }, - { - "name": "name", - "type": 10, - "optional": false - }, - { - "name": "type", - "type": 11, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "primitive", - "type": "string" - }, - { - "kind": "literal", - "value": "tool-call" - }, - { - "kind": "object", - "properties": [ - { - "name": "attachment", - "type": 13, - "optional": false - }, - { - "name": "offloaded", - "type": 20, - "optional": true - }, - { - "name": "type", - "type": 21, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "attachmentId", - "type": 10, - "optional": false - }, - { - "name": "bytes", - "type": 2, - "optional": false - }, - { - "name": "height", - "type": 2, - "optional": false - }, - { - "name": "mediaType", - "type": 14, - "optional": false - }, - { - "name": "name", - "type": 10, - "optional": true - }, - { - "name": "originalDimensions", - "type": 19, - "optional": true - }, - { - "name": "width", - "type": 2, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "union", - "types": [ - 15, - 16, - 17, - 18 - ] - }, - { - "kind": "literal", - "value": "image/png" - }, - { - "kind": "literal", - "value": "image/webp" - }, - { - "kind": "literal", - "value": "image/gif" - }, - { - "kind": "literal", - "value": "image/jpeg" - }, - { - "kind": "object", - "properties": [ - { - "name": "height", - "type": 2, - "optional": false - }, - { - "name": "width", - "type": 2, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": true - }, - { - "kind": "literal", - "value": "image" - }, - { - "kind": "object", - "properties": [ - { - "name": "attachment", - "type": 23, - "optional": false - }, - { - "name": "type", - "type": 24, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "attachmentId", - "type": 10, - "optional": false - }, - { - "name": "bytes", - "type": 2, - "optional": false - }, - { - "name": "name", - "type": 10, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "file" - }, - { - "kind": "object", - "properties": [ - { - "name": "text", - "type": 10, - "optional": false - }, - { - "name": "type", - "type": 26, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "reasoning" - }, - { - "kind": "object", - "properties": [ - { - "name": "text", - "type": 10, - "optional": false - }, - { - "name": "type", - "type": 28, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "text" - }, - { - "kind": "primitive", - "type": "boolean" - }, - { - "kind": "literal", - "value": "tool" - }, - { - "kind": "object", - "properties": [ - { - "name": "callId", - "type": 10, - "optional": false - }, { "name": "kind", - "type": 30, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "content", - "type": 7, - "optional": false - }, - { - "name": "id", - "type": 10, - "optional": false - }, - { - "name": "role", - "type": 33, - "optional": false - }, - { - "name": "source", - "type": 34, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "system" - }, - { - "kind": "union", - "types": [ - 35, - 40, - 42, - 44, - 46, - 48, - 50 - ] - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 36, - "optional": false - }, - { - "name": "kind", - "type": 37, - "optional": false - }, - { - "name": "plugin", - "type": 10, + "type": 2, "optional": false }, { "name": "sections", - "type": 38, + "type": 3, "optional": false } ], @@ -22708,49 +24180,48 @@ }, { "kind": "literal", - "value": "plugin" + "value": "schedule" }, { "kind": "array", - "element": 39 + "element": 4 }, { "kind": "object", "properties": [ { "name": "name", - "type": 10, + "type": 5, "optional": false }, { "name": "text", - "type": 10, + "type": 5, "optional": false } ], "indices": [] }, + { + "kind": "primitive", + "type": "string" + } + ] + }, + "names": [], + "sources": [] + }, + { + "digest": "290f32bfd81ff85a8095886a8066fae06e885942b63a8bcd6a8d66d328445808", + "schema": { + "root": 0, + "nodes": [ { "kind": "object", "properties": [ - { - "name": "form", - "type": 41, - "optional": false - }, { "name": "kind", - "type": 37, - "optional": false - }, - { - "name": "plugin", - "type": 10, - "optional": false - }, - { - "name": "summary", - "type": 10, + "type": 1, "optional": false } ], @@ -22758,99 +24229,29 @@ }, { "kind": "literal", - "value": "notice" - }, + "value": "dsh-session-title-llm" + } + ] + }, + "names": [], + "sources": [] + }, + { + "digest": "297fbd8067d7815adae02b89790ec6ff5fb7c2cb0d0eb026e1746c24ec857761", + "schema": { + "root": 0, + "nodes": [ { "kind": "object", "properties": [ { "name": "form", - "type": 43, + "type": 1, "optional": false }, { "name": "kind", - "type": 37, - "optional": false - }, - { - "name": "plugin", - "type": 10, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "instructions" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 45, - "optional": false - }, - { - "name": "kind", - "type": 37, - "optional": false - }, - { - "name": "plugin", - "type": 10, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "recall" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 47, - "optional": false - }, - { - "name": "kind", - "type": 37, - "optional": false - }, - { - "name": "plugin", - "type": 10, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "relay" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 49, - "optional": false - }, - { - "name": "kind", - "type": 37, - "optional": false - }, - { - "name": "plugin", - "type": 10, + "type": 2, "optional": false } ], @@ -22860,627 +24261,9 @@ "kind": "literal", "value": "catalog" }, - { - "kind": "object", - "properties": [ - { - "name": "kind", - "type": 37, - "optional": false - }, - { - "name": "plugin", - "type": 10, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "content", - "type": 7, - "optional": false - }, - { - "name": "id", - "type": 10, - "optional": false - }, - { - "name": "role", - "type": 52, - "optional": false - }, - { - "name": "source", - "type": 53, - "optional": false - } - ], - "indices": [] - }, { "kind": "literal", - "value": "assistant" - }, - { - "kind": "object", - "properties": [ - { - "name": "kind", - "type": 54, - "optional": false - }, - { - "name": "model", - "type": 10, - "optional": false - }, - { - "name": "provider", - "type": 10, - "optional": false - }, - { - "name": "replayState", - "type": 55, - "optional": true - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "model" - }, - { - "kind": "opaque", - "reason": "unknown" - }, - { - "kind": "object", - "properties": [ - { - "name": "content", - "type": 7, - "optional": false - }, - { - "name": "id", - "type": 10, - "optional": false - }, - { - "name": "role", - "type": 57, - "optional": false - }, - { - "name": "source", - "type": 58, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "user" - }, - { - "kind": "union", - "types": [ - 31, - 35, - 40, - 42, - 44, - 46, - 48, - 50, - 53, - 59, - 67, - 68, - 70, - 74, - 76, - 83, - 85, - 87, - 89, - 91 - ] - }, - { - "kind": "object", - "properties": [ - { - "name": "baseline", - "type": 20, - "optional": true - }, - { - "name": "baselineIdentity", - "type": 10, - "optional": true - }, - { - "name": "changes", - "type": 60, - "optional": false - }, - { - "name": "form", - "type": 43, - "optional": false - }, - { - "name": "kind", - "type": 66, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "array", - "element": 61 - }, - { - "kind": "object", - "properties": [ - { - "name": "action", - "type": 62, - "optional": false - }, - { - "name": "digest", - "type": 10, - "optional": true - }, - { - "name": "path", - "type": 10, - "optional": false - }, - { - "name": "scope", - "type": 10, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "union", - "types": [ - 63, - 64, - 65 - ] - }, - { - "kind": "literal", - "value": "replace" - }, - { - "kind": "literal", - "value": "set" - }, - { - "kind": "literal", - "value": "remove" - }, - { - "kind": "literal", - "value": "agent-instructions" - }, - { - "kind": "object", - "properties": [ - { - "name": "clientTimeZone", - "type": 10, - "optional": true - }, - { - "name": "kind", - "type": 57, - "optional": false - }, - { - "name": "rpcId", - "type": 10, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "deliveryId", - "type": 10, - "optional": false - }, - { - "name": "form", - "type": 41, - "optional": false - }, - { - "name": "kind", - "type": 69, - "optional": false - }, - { - "name": "provider", - "type": 10, - "optional": false - }, - { - "name": "ruleId", - "type": 10, - "optional": false - }, - { - "name": "source", - "type": 10, - "optional": false - }, - { - "name": "summary", - "type": 10, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "webhook" - }, - { - "kind": "object", - "properties": [ - { - "name": "entries", - "type": 71, - "optional": false - }, - { - "name": "form", - "type": 49, - "optional": false - }, - { - "name": "kind", - "type": 73, - "optional": false - }, - { - "name": "update", - "type": 20, - "optional": true - } - ], - "indices": [] - }, - { - "kind": "array", - "element": 72 - }, - { - "kind": "object", - "properties": [ - { - "name": "description", - "type": 10, - "optional": false - }, - { - "name": "name", - "type": 10, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "skill-catalog" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 43, - "optional": false - }, - { - "name": "kind", - "type": 75, - "optional": false - }, - { - "name": "name", - "type": 10, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "skill-invocation" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 45, - "optional": false - }, - { - "name": "kind", - "type": 77, - "optional": false - }, - { - "name": "references", - "type": 78, - "optional": false - }, - { - "name": "version", - "type": 82, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "session-reference" - }, - { - "kind": "array", - "element": 79 - }, - { - "kind": "object", - "properties": [ - { - "name": "capturedFormatVersion", - "type": 2, - "optional": true - }, - { - "name": "capturedThroughSeq", - "type": 80, - "optional": false - }, - { - "name": "compacted", - "type": 29, - "optional": false - }, - { - "name": "inputIndex", - "type": 2, - "optional": false - }, - { - "name": "label", - "type": 10, - "optional": false - }, - { - "name": "omittedBytes", - "type": 2, - "optional": false - }, - { - "name": "omittedMessages", - "type": 2, - "optional": false - }, - { - "name": "originalMessages", - "type": 2, - "optional": false - }, - { - "name": "retainedMessages", - "type": 2, - "optional": false - }, - { - "name": "sessionId", - "type": 10, - "optional": false - }, - { - "name": "truncated", - "type": 29, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "union", - "types": [ - 2, - 81 - ] - }, - { - "kind": "primitive", - "type": "null" - }, - { - "kind": "literal", - "value": 1 - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 41, - "optional": false - }, - { - "name": "kind", - "type": 84, - "optional": false - }, - { - "name": "senderSessionId", - "type": 10, - "optional": false - }, - { - "name": "summary", - "type": 10, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "subagent-settled" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 47, - "optional": false - }, - { - "name": "kind", - "type": 86, - "optional": false - }, - { - "name": "senderSessionId", - "type": 10, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "agent-message" - }, - { - "kind": "object", - "properties": [ - { - "name": "goalId", - "type": 10, - "optional": false - }, - { - "name": "kind", - "type": 88, - "optional": false - }, - { - "name": "revision", - "type": 2, - "optional": false - }, - { - "name": "round", - "type": 2, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "goal" - }, - { - "kind": "object", - "properties": [ - { - "name": "kind", - "type": 90, - "optional": false - }, - { - "name": "messageId", - "type": 10, - "optional": false - }, - { - "name": "senderId", - "type": 10, - "optional": false - }, - { - "name": "senderName", - "type": 10, - "optional": false - }, - { - "name": "teamId", - "type": 10, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "team-message" - }, - { - "kind": "object", - "properties": [ - { - "name": "kind", - "type": 57, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "model", - "type": 10, - "optional": false - }, - { - "name": "provider", - "type": 10, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "session/title-llm-request" + "value": "hooks-claude-code" } ] }, @@ -23766,6 +24549,69 @@ "names": [], "sources": [] }, + { + "digest": "2aad1179f957631477b582e57cd8f538cb82618fc3fb816bde1171154235b065", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + }, + { + "name": "sections", + "type": 3, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "snapshot" + }, + { + "kind": "literal", + "value": "runtime-context" + }, + { + "kind": "array", + "element": 4 + }, + { + "kind": "object", + "properties": [ + { + "name": "name", + "type": 5, + "optional": false + }, + { + "name": "text", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "primitive", + "type": "string" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "2ab12a0e345658f9342816d773fe610f049982bcad82631f43b9205abe43e5ee", "schema": { @@ -23917,49 +24763,6 @@ "names": [], "sources": [] }, - { - "digest": "2ce7ef3b3daebf95815c7ae454a751d3e67ca7a22e2e0734fe2942df393bb66c", - "schema": { - "root": 0, - "nodes": [ - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 1, - "optional": false - }, - { - "name": "kind", - "type": 2, - "optional": false - }, - { - "name": "plugin", - "type": 3, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "relay" - }, - { - "kind": "literal", - "value": "plugin" - }, - { - "kind": "primitive", - "type": "string" - } - ] - }, - "names": [], - "sources": [] - }, { "digest": "2d11ca7b0d4493e244b74eba093227866b33249841e59a1e9bf56afed38604c3", "schema": { @@ -25760,42 +26563,13 @@ ] }, { - "digest": "2f90a7b3646fea3e677bd7b4000aa96f3b8964f107b614e204e11ad4051c24fc", + "digest": "2f3f201c8846e19c20bb75c02280e3d4eb3c57509e4715f0c0a4d1d4f91a7a06", "schema": { "root": 0, "nodes": [ - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 1, - "optional": false - }, - { - "name": "kind", - "type": 2, - "optional": false - }, - { - "name": "plugin", - "type": 3, - "optional": false - } - ], - "indices": [] - }, { "kind": "literal", - "value": "catalog" - }, - { - "kind": "literal", - "value": "plugin" - }, - { - "kind": "primitive", - "type": "string" + "value": "tool-goal" } ] }, @@ -25952,6 +26726,92 @@ "packages/session/session-title/src/types.ts:28" ] }, + { + "digest": "312aee2f0c42aabbae6cc60d92d596d8453c0aeb061c5868d1755a69ef49e69a", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + }, + { + "name": "summary", + "type": 3, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "notice" + }, + { + "kind": "literal", + "value": "schedule" + }, + { + "kind": "primitive", + "type": "string" + } + ] + }, + "names": [], + "sources": [] + }, + { + "digest": "31907de9563751822af6d9be02bafaf26faa098bbd1cb412524134d577cc1648", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "compactionId", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + }, + { + "name": "sourceCommandId", + "type": 1, + "optional": true + } + ], + "indices": [] + }, + { + "kind": "primitive", + "type": "string" + }, + { + "kind": "literal", + "value": "compact-checkpoint" + } + ] + }, + "names": [ + "packages/compaction/compaction/src/checkpoint.ts#CompactionCheckpointSource" + ], + "sources": [ + "packages/compaction/compaction/src/checkpoint.ts:22" + ] + }, { "digest": "326a9bfda27dda5882fb3cbe6e715df41dae2298fdae3d66437457268a665693", "schema": { @@ -26419,6 +27279,2681 @@ "names": [], "sources": [] }, + { + "digest": "37af4fdde18eb8638d5037243e0ee1c617b9b1062ae9dbee086feafad852112f", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "inserted", + "type": 1, + "optional": false + }, + { + "name": "outcome", + "type": 187, + "optional": true + }, + { + "name": "removedCount", + "type": 14, + "optional": true + }, + { + "name": "start", + "type": 14, + "optional": false + }, + { + "name": "target", + "type": 188, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "array", + "element": 2 + }, + { + "kind": "object", + "properties": [ + { + "name": "content", + "type": 3, + "optional": false + }, + { + "name": "id", + "type": 6, + "optional": false + }, + { + "name": "role", + "type": 26, + "optional": false + }, + { + "name": "source", + "type": 27, + "optional": false, + "compatibility": { + "version": 1, + "policy": "session-source-attribution", + "binding": "session.user-message.source", + "discriminator": "kind", + "unknownKinds": "preserve", + "attributionKinds": [ + "tmux-context" + ] + } + } + ], + "indices": [] + }, + { + "kind": "array", + "element": 4 + }, + { + "kind": "union", + "types": [ + 5, + 8, + 10, + 12, + 23 + ] + }, + { + "kind": "object", + "properties": [ + { + "name": "text", + "type": 6, + "optional": false + }, + { + "name": "type", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "primitive", + "type": "string" + }, + { + "kind": "literal", + "value": "reasoning" + }, + { + "kind": "object", + "properties": [ + { + "name": "text", + "type": 6, + "optional": false + }, + { + "name": "type", + "type": 9, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "text" + }, + { + "kind": "object", + "properties": [ + { + "name": "arguments", + "type": 6, + "optional": false + }, + { + "name": "id", + "type": 6, + "optional": false + }, + { + "name": "name", + "type": 6, + "optional": false + }, + { + "name": "type", + "type": 11, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tool-call" + }, + { + "kind": "object", + "properties": [ + { + "name": "attachment", + "type": 13, + "optional": false + }, + { + "name": "offloaded", + "type": 21, + "optional": true + }, + { + "name": "type", + "type": 22, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "attachmentId", + "type": 6, + "optional": false + }, + { + "name": "bytes", + "type": 14, + "optional": false + }, + { + "name": "height", + "type": 14, + "optional": false + }, + { + "name": "mediaType", + "type": 15, + "optional": false + }, + { + "name": "name", + "type": 6, + "optional": true + }, + { + "name": "originalDimensions", + "type": 20, + "optional": true + }, + { + "name": "width", + "type": 14, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "primitive", + "type": "number" + }, + { + "kind": "union", + "types": [ + 16, + 17, + 18, + 19 + ] + }, + { + "kind": "literal", + "value": "image/gif" + }, + { + "kind": "literal", + "value": "image/jpeg" + }, + { + "kind": "literal", + "value": "image/png" + }, + { + "kind": "literal", + "value": "image/webp" + }, + { + "kind": "object", + "properties": [ + { + "name": "height", + "type": 14, + "optional": false + }, + { + "name": "width", + "type": 14, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": true + }, + { + "kind": "literal", + "value": "image" + }, + { + "kind": "object", + "properties": [ + { + "name": "attachment", + "type": 24, + "optional": false + }, + { + "name": "type", + "type": 25, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "attachmentId", + "type": 6, + "optional": false + }, + { + "name": "bytes", + "type": 14, + "optional": false + }, + { + "name": "name", + "type": 6, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "file" + }, + { + "kind": "literal", + "value": "user" + }, + { + "kind": "union", + "types": [ + 28, + 31, + 34, + 36, + 38, + 40, + 42, + 44, + 46, + 48, + 50, + 52, + 54, + 56, + 57, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 87, + 88, + 89, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97, + 98, + 99, + 101, + 103, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 123, + 125, + 126, + 134, + 136, + 137, + 139, + 141, + 145, + 147, + 155, + 159, + 160, + 161, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 173, + 175, + 176, + 177, + 178, + 179, + 180, + 181, + 182, + 183, + 184, + 185, + 186 + ] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 29, + "optional": false + }, + { + "name": "kind", + "type": 30, + "optional": false + }, + { + "name": "summary", + "type": 6, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "notice" + }, + { + "kind": "literal", + "value": "dsh-session-title-llm" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 32, + "optional": false + }, + { + "name": "kind", + "type": 33, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "instructions" + }, + { + "kind": "literal", + "value": "hooks-claude-code" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 32, + "optional": false + }, + { + "name": "kind", + "type": 35, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "hooks-codex" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 32, + "optional": false + }, + { + "name": "kind", + "type": 37, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "model-selection" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 32, + "optional": false + }, + { + "name": "kind", + "type": 39, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "plan-mode" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 32, + "optional": false + }, + { + "name": "kind", + "type": 41, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "repeat-tool-reminder" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 32, + "optional": false + }, + { + "name": "kind", + "type": 43, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "runtime-context" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 32, + "optional": false + }, + { + "name": "kind", + "type": 45, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "schedule" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 32, + "optional": false + }, + { + "name": "kind", + "type": 47, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "time-context" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 32, + "optional": false + }, + { + "name": "kind", + "type": 49, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tmux-context" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 32, + "optional": false + }, + { + "name": "kind", + "type": 51, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tool-goal" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 32, + "optional": false + }, + { + "name": "kind", + "type": 53, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tool-jobs" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 32, + "optional": false + }, + { + "name": "kind", + "type": 55, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "user-approval" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 32, + "optional": false + }, + { + "name": "kind", + "type": 30, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, + "optional": false + }, + { + "name": "kind", + "type": 33, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "recall" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, + "optional": false + }, + { + "name": "kind", + "type": 35, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, + "optional": false + }, + { + "name": "kind", + "type": 37, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, + "optional": false + }, + { + "name": "kind", + "type": 39, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, + "optional": false + }, + { + "name": "kind", + "type": 41, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, + "optional": false + }, + { + "name": "kind", + "type": 43, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, + "optional": false + }, + { + "name": "kind", + "type": 45, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, + "optional": false + }, + { + "name": "kind", + "type": 47, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, + "optional": false + }, + { + "name": "kind", + "type": 49, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, + "optional": false + }, + { + "name": "kind", + "type": 51, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, + "optional": false + }, + { + "name": "kind", + "type": 53, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, + "optional": false + }, + { + "name": "kind", + "type": 55, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, + "optional": false + }, + { + "name": "kind", + "type": 30, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 33, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "relay" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 35, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 37, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 39, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 41, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 43, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 45, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 47, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 49, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 51, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 53, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 55, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 30, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 33, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "catalog" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 35, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 37, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 39, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 41, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 43, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 45, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 47, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 49, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 51, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 53, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 55, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 30, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "goalId", + "type": 6, + "optional": false + }, + { + "name": "kind", + "type": 100, + "optional": false + }, + { + "name": "revision", + "type": 14, + "optional": false + }, + { + "name": "round", + "type": 14, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "goal" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 102, + "optional": false + }, + { + "name": "messageId", + "type": 6, + "optional": false + }, + { + "name": "senderId", + "type": 6, + "optional": false + }, + { + "name": "senderName", + "type": 6, + "optional": false + }, + { + "name": "teamId", + "type": 6, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "team-message" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 104, + "optional": false + }, + { + "name": "model", + "type": 6, + "optional": false + }, + { + "name": "provider", + "type": 6, + "optional": false + }, + { + "name": "replayState", + "type": 105, + "optional": true + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "model" + }, + { + "kind": "opaque", + "reason": "unknown" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 33, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 35, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 37, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 39, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 41, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 43, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 45, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 114, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "system-prompt" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 47, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 49, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 51, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 53, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 26, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 55, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 122, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "code-mode" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 124, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "cordis-host-runner" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 30, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "baseline", + "type": 21, + "optional": true + }, + { + "name": "baselineIdentity", + "type": 6, + "optional": true + }, + { + "name": "changes", + "type": 127, + "optional": false + }, + { + "name": "form", + "type": 32, + "optional": false + }, + { + "name": "kind", + "type": 133, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "array", + "element": 128 + }, + { + "kind": "object", + "properties": [ + { + "name": "action", + "type": 129, + "optional": false + }, + { + "name": "digest", + "type": 6, + "optional": true + }, + { + "name": "path", + "type": 6, + "optional": false + }, + { + "name": "scope", + "type": 6, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "union", + "types": [ + 130, + 131, + 132 + ] + }, + { + "kind": "literal", + "value": "remove" + }, + { + "kind": "literal", + "value": "replace" + }, + { + "kind": "literal", + "value": "set" + }, + { + "kind": "literal", + "value": "agent-instructions" + }, + { + "kind": "object", + "properties": [ + { + "name": "callId", + "type": 6, + "optional": false + }, + { + "name": "kind", + "type": 135, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tool" + }, + { + "kind": "object", + "properties": [ + { + "name": "clientTimeZone", + "type": 6, + "optional": true + }, + { + "name": "kind", + "type": 26, + "optional": false + }, + { + "name": "rpcId", + "type": 6, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "compactionId", + "type": 6, + "optional": false + }, + { + "name": "kind", + "type": 138, + "optional": false + }, + { + "name": "sourceCommandId", + "type": 6, + "optional": true + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "compact-checkpoint" + }, + { + "kind": "object", + "properties": [ + { + "name": "deliveryId", + "type": 6, + "optional": false + }, + { + "name": "form", + "type": 29, + "optional": false + }, + { + "name": "kind", + "type": 140, + "optional": false + }, + { + "name": "provider", + "type": 6, + "optional": false + }, + { + "name": "ruleId", + "type": 6, + "optional": false + }, + { + "name": "source", + "type": 6, + "optional": false + }, + { + "name": "summary", + "type": 6, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "webhook" + }, + { + "kind": "object", + "properties": [ + { + "name": "entries", + "type": 142, + "optional": false + }, + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 144, + "optional": false + }, + { + "name": "update", + "type": 21, + "optional": true + } + ], + "indices": [] + }, + { + "kind": "array", + "element": 143 + }, + { + "kind": "object", + "properties": [ + { + "name": "description", + "type": 6, + "optional": false + }, + { + "name": "name", + "type": 6, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "skill-catalog" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 32, + "optional": false + }, + { + "name": "kind", + "type": 146, + "optional": false + }, + { + "name": "name", + "type": 6, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "skill-invocation" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, + "optional": false + }, + { + "name": "kind", + "type": 148, + "optional": false + }, + { + "name": "references", + "type": 149, + "optional": false + }, + { + "name": "version", + "type": 154, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "session-reference" + }, + { + "kind": "array", + "element": 150 + }, + { + "kind": "object", + "properties": [ + { + "name": "capturedFormatVersion", + "type": 14, + "optional": true + }, + { + "name": "capturedThroughSeq", + "type": 151, + "optional": false + }, + { + "name": "compacted", + "type": 153, + "optional": false + }, + { + "name": "inputIndex", + "type": 14, + "optional": false + }, + { + "name": "label", + "type": 6, + "optional": false + }, + { + "name": "omittedBytes", + "type": 14, + "optional": false + }, + { + "name": "omittedMessages", + "type": 14, + "optional": false + }, + { + "name": "originalMessages", + "type": 14, + "optional": false + }, + { + "name": "retainedMessages", + "type": 14, + "optional": false + }, + { + "name": "sessionId", + "type": 6, + "optional": false + }, + { + "name": "truncated", + "type": 153, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "union", + "types": [ + 14, + 152 + ] + }, + { + "kind": "primitive", + "type": "null" + }, + { + "kind": "primitive", + "type": "boolean" + }, + { + "kind": "literal", + "value": 1 + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 156, + "optional": false + }, + { + "name": "kind", + "type": 33, + "optional": false + }, + { + "name": "sections", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "snapshot" + }, + { + "kind": "array", + "element": 158 + }, + { + "kind": "object", + "properties": [ + { + "name": "name", + "type": 6, + "optional": false + }, + { + "name": "text", + "type": 6, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 156, + "optional": false + }, + { + "name": "kind", + "type": 35, + "optional": false + }, + { + "name": "sections", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 156, + "optional": false + }, + { + "name": "kind", + "type": 37, + "optional": false + }, + { + "name": "sections", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 156, + "optional": false + }, + { + "name": "kind", + "type": 39, + "optional": false + }, + { + "name": "sections", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 156, + "optional": false + }, + { + "name": "kind", + "type": 41, + "optional": false + }, + { + "name": "sections", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 156, + "optional": false + }, + { + "name": "kind", + "type": 43, + "optional": false + }, + { + "name": "sections", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 156, + "optional": false + }, + { + "name": "kind", + "type": 45, + "optional": false + }, + { + "name": "sections", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 156, + "optional": false + }, + { + "name": "kind", + "type": 47, + "optional": false + }, + { + "name": "sections", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 156, + "optional": false + }, + { + "name": "kind", + "type": 49, + "optional": false + }, + { + "name": "sections", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 156, + "optional": false + }, + { + "name": "kind", + "type": 51, + "optional": false + }, + { + "name": "sections", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 156, + "optional": false + }, + { + "name": "kind", + "type": 53, + "optional": false + }, + { + "name": "sections", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 156, + "optional": false + }, + { + "name": "kind", + "type": 55, + "optional": false + }, + { + "name": "sections", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 156, + "optional": false + }, + { + "name": "kind", + "type": 30, + "optional": false + }, + { + "name": "sections", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 29, + "optional": false + }, + { + "name": "kind", + "type": 172, + "optional": false + }, + { + "name": "senderSessionId", + "type": 6, + "optional": false + }, + { + "name": "summary", + "type": 6, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "subagent-settled" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 174, + "optional": false + }, + { + "name": "senderSessionId", + "type": 6, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "agent-message" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 29, + "optional": false + }, + { + "name": "kind", + "type": 33, + "optional": false + }, + { + "name": "summary", + "type": 6, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 29, + "optional": false + }, + { + "name": "kind", + "type": 35, + "optional": false + }, + { + "name": "summary", + "type": 6, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 29, + "optional": false + }, + { + "name": "kind", + "type": 37, + "optional": false + }, + { + "name": "summary", + "type": 6, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 29, + "optional": false + }, + { + "name": "kind", + "type": 39, + "optional": false + }, + { + "name": "summary", + "type": 6, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 29, + "optional": false + }, + { + "name": "kind", + "type": 41, + "optional": false + }, + { + "name": "summary", + "type": 6, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 29, + "optional": false + }, + { + "name": "kind", + "type": 43, + "optional": false + }, + { + "name": "summary", + "type": 6, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 29, + "optional": false + }, + { + "name": "kind", + "type": 45, + "optional": false + }, + { + "name": "summary", + "type": 6, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 29, + "optional": false + }, + { + "name": "kind", + "type": 47, + "optional": false + }, + { + "name": "summary", + "type": 6, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 29, + "optional": false + }, + { + "name": "kind", + "type": 49, + "optional": false + }, + { + "name": "summary", + "type": 6, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 29, + "optional": false + }, + { + "name": "kind", + "type": 51, + "optional": false + }, + { + "name": "summary", + "type": 6, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 29, + "optional": false + }, + { + "name": "kind", + "type": 53, + "optional": false + }, + { + "name": "summary", + "type": 6, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 29, + "optional": false + }, + { + "name": "kind", + "type": 55, + "optional": false + }, + { + "name": "summary", + "type": 6, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "canceled" + }, + { + "kind": "union", + "types": [ + 189, + 190 + ] + }, + { + "kind": "literal", + "value": "next-step" + }, + { + "kind": "literal", + "value": "next-turn" + } + ] + }, + "names": [], + "sources": [ + "packages/core/agent/src/types.ts:87" + ] + }, { "digest": "37cbc9cf06d494cfe5c67f078af1605eacb8e4c2c853e9e26455b73de0ee7ccf", "schema": { @@ -27037,6 +30572,40 @@ "packages/subagent/subagent/src/catalog.ts:24" ] }, + { + "digest": "3b04790e08b35241ffa0d38f6d7e4f8788aa921341f6c0d7574a329397c59408", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "catalog" + }, + { + "kind": "literal", + "value": "plan-mode" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "3b1be838223869fe0a08210db85bf773796ed3f2373ac16555dff227cade0c48", "schema": { @@ -27125,6 +30694,40 @@ "names": [], "sources": [] }, + { + "digest": "3b4f2c9ef2c1217eac596c7b070173cb7896e2fae09e729bc7c56c801e56bb29", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "recall" + }, + { + "kind": "literal", + "value": "hooks-codex" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "3bc287e765d58dc3a22672a0495a6cfd561220dd38fbaecef80aa95b96caed79", "schema": { @@ -27168,6 +30771,69 @@ "packages/core/session/src/types.ts:64" ] }, + { + "digest": "3bdb8dc6989655b0d4ec361edafb8e2629bc263e1ea591819414fdafc1a413b3", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + }, + { + "name": "sections", + "type": 3, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "snapshot" + }, + { + "kind": "literal", + "value": "hooks-claude-code" + }, + { + "kind": "array", + "element": 4 + }, + { + "kind": "object", + "properties": [ + { + "name": "name", + "type": 5, + "optional": false + }, + { + "name": "text", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "primitive", + "type": "string" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "3bfeb47b58606f4661904bc723da612782214c463d01e6d61cd6d6193d7374e1", "schema": { @@ -27842,6 +31508,40 @@ "packages/llm/llm/src/types.ts:128" ] }, + { + "digest": "408927267422a7b2beb6df354ff7c1406d929a5646554f48adf85eb8372f811c", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "instructions" + }, + { + "kind": "literal", + "value": "plan-mode" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "42e0916e0dda5f6d1e7bb05d8514717147c036a79c9f36085683469516c1fd3f", "schema": { @@ -28088,6 +31788,2706 @@ "packages/interaction/user-approval/src/types.ts:44" ] }, + { + "digest": "46c44941f6e93a1764c49f1487e64a57f73ee68a75a657e94c326a8de5d8ad95", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "data", + "type": 1, + "optional": false + }, + { + "name": "ignorable", + "type": 20, + "optional": true + }, + { + "name": "seq", + "type": 13, + "optional": false + }, + { + "name": "sourceEventSeqs", + "type": 186, + "optional": true + }, + { + "name": "surfaceOp", + "type": 187, + "optional": false + }, + { + "name": "time", + "type": 13, + "optional": false + }, + { + "name": "type", + "type": 190, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "content", + "type": 2, + "optional": false + }, + { + "name": "id", + "type": 5, + "optional": false + }, + { + "name": "role", + "type": 25, + "optional": false + }, + { + "name": "source", + "type": 26, + "optional": false, + "compatibility": { + "version": 1, + "policy": "session-source-attribution", + "binding": "session.user-message.source", + "discriminator": "kind", + "unknownKinds": "preserve", + "attributionKinds": [ + "tmux-context" + ] + } + } + ], + "indices": [] + }, + { + "kind": "array", + "element": 3 + }, + { + "kind": "union", + "types": [ + 4, + 7, + 9, + 11, + 22 + ] + }, + { + "kind": "object", + "properties": [ + { + "name": "text", + "type": 5, + "optional": false + }, + { + "name": "type", + "type": 6, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "primitive", + "type": "string" + }, + { + "kind": "literal", + "value": "reasoning" + }, + { + "kind": "object", + "properties": [ + { + "name": "text", + "type": 5, + "optional": false + }, + { + "name": "type", + "type": 8, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "text" + }, + { + "kind": "object", + "properties": [ + { + "name": "arguments", + "type": 5, + "optional": false + }, + { + "name": "id", + "type": 5, + "optional": false + }, + { + "name": "name", + "type": 5, + "optional": false + }, + { + "name": "type", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tool-call" + }, + { + "kind": "object", + "properties": [ + { + "name": "attachment", + "type": 12, + "optional": false + }, + { + "name": "offloaded", + "type": 20, + "optional": true + }, + { + "name": "type", + "type": 21, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "attachmentId", + "type": 5, + "optional": false + }, + { + "name": "bytes", + "type": 13, + "optional": false + }, + { + "name": "height", + "type": 13, + "optional": false + }, + { + "name": "mediaType", + "type": 14, + "optional": false + }, + { + "name": "name", + "type": 5, + "optional": true + }, + { + "name": "originalDimensions", + "type": 19, + "optional": true + }, + { + "name": "width", + "type": 13, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "primitive", + "type": "number" + }, + { + "kind": "union", + "types": [ + 15, + 16, + 17, + 18 + ] + }, + { + "kind": "literal", + "value": "image/gif" + }, + { + "kind": "literal", + "value": "image/jpeg" + }, + { + "kind": "literal", + "value": "image/png" + }, + { + "kind": "literal", + "value": "image/webp" + }, + { + "kind": "object", + "properties": [ + { + "name": "height", + "type": 13, + "optional": false + }, + { + "name": "width", + "type": 13, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": true + }, + { + "kind": "literal", + "value": "image" + }, + { + "kind": "object", + "properties": [ + { + "name": "attachment", + "type": 23, + "optional": false + }, + { + "name": "type", + "type": 24, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "attachmentId", + "type": 5, + "optional": false + }, + { + "name": "bytes", + "type": 13, + "optional": false + }, + { + "name": "name", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "file" + }, + { + "kind": "literal", + "value": "user" + }, + { + "kind": "union", + "types": [ + 27, + 30, + 32, + 35, + 37, + 39, + 41, + 43, + 45, + 47, + 49, + 51, + 53, + 55, + 56, + 57, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 87, + 88, + 89, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97, + 98, + 99, + 101, + 103, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 123, + 125, + 126, + 134, + 136, + 137, + 139, + 141, + 145, + 147, + 155, + 159, + 160, + 161, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 173, + 175, + 176, + 177, + 178, + 179, + 180, + 181, + 182, + 183, + 184, + 185 + ] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 29, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "notice" + }, + { + "kind": "literal", + "value": "user-approval" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 31, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "dsh-session-title-llm" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 34, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "instructions" + }, + { + "kind": "literal", + "value": "hooks-claude-code" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 36, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "hooks-codex" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 38, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "model-selection" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "plan-mode" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 42, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "repeat-tool-reminder" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 44, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "runtime-context" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 46, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "schedule" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 48, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "time-context" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 50, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tmux-context" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 52, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tool-goal" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 54, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tool-jobs" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 29, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 31, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, + "optional": false + }, + { + "name": "kind", + "type": 34, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "recall" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, + "optional": false + }, + { + "name": "kind", + "type": 36, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, + "optional": false + }, + { + "name": "kind", + "type": 38, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, + "optional": false + }, + { + "name": "kind", + "type": 42, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, + "optional": false + }, + { + "name": "kind", + "type": 44, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, + "optional": false + }, + { + "name": "kind", + "type": 46, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, + "optional": false + }, + { + "name": "kind", + "type": 48, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, + "optional": false + }, + { + "name": "kind", + "type": 50, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, + "optional": false + }, + { + "name": "kind", + "type": 52, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, + "optional": false + }, + { + "name": "kind", + "type": 54, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, + "optional": false + }, + { + "name": "kind", + "type": 29, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, + "optional": false + }, + { + "name": "kind", + "type": 31, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 34, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "relay" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 36, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 38, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 42, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 44, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 46, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 48, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 50, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 52, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 54, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 29, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 31, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 34, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "catalog" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 36, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 38, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 42, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 44, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 46, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 48, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 50, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 52, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 54, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 29, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 31, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "goalId", + "type": 5, + "optional": false + }, + { + "name": "kind", + "type": 100, + "optional": false + }, + { + "name": "revision", + "type": 13, + "optional": false + }, + { + "name": "round", + "type": 13, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "goal" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 102, + "optional": false + }, + { + "name": "messageId", + "type": 5, + "optional": false + }, + { + "name": "senderId", + "type": 5, + "optional": false + }, + { + "name": "senderName", + "type": 5, + "optional": false + }, + { + "name": "teamId", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "team-message" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 104, + "optional": false + }, + { + "name": "model", + "type": 5, + "optional": false + }, + { + "name": "provider", + "type": 5, + "optional": false + }, + { + "name": "replayState", + "type": 105, + "optional": true + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "model" + }, + { + "kind": "opaque", + "reason": "unknown" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 34, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 36, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 38, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 40, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 42, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 44, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 46, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 114, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "system-prompt" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 48, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 50, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 52, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 54, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 25, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 29, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 122, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "code-mode" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 124, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "cordis-host-runner" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 31, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "baseline", + "type": 20, + "optional": true + }, + { + "name": "baselineIdentity", + "type": 5, + "optional": true + }, + { + "name": "changes", + "type": 127, + "optional": false + }, + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 133, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "array", + "element": 128 + }, + { + "kind": "object", + "properties": [ + { + "name": "action", + "type": 129, + "optional": false + }, + { + "name": "digest", + "type": 5, + "optional": true + }, + { + "name": "path", + "type": 5, + "optional": false + }, + { + "name": "scope", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "union", + "types": [ + 130, + 131, + 132 + ] + }, + { + "kind": "literal", + "value": "remove" + }, + { + "kind": "literal", + "value": "replace" + }, + { + "kind": "literal", + "value": "set" + }, + { + "kind": "literal", + "value": "agent-instructions" + }, + { + "kind": "object", + "properties": [ + { + "name": "callId", + "type": 5, + "optional": false + }, + { + "name": "kind", + "type": 135, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tool" + }, + { + "kind": "object", + "properties": [ + { + "name": "clientTimeZone", + "type": 5, + "optional": true + }, + { + "name": "kind", + "type": 25, + "optional": false + }, + { + "name": "rpcId", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "compactionId", + "type": 5, + "optional": false + }, + { + "name": "kind", + "type": 138, + "optional": false + }, + { + "name": "sourceCommandId", + "type": 5, + "optional": true + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "compact-checkpoint" + }, + { + "kind": "object", + "properties": [ + { + "name": "deliveryId", + "type": 5, + "optional": false + }, + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 140, + "optional": false + }, + { + "name": "provider", + "type": 5, + "optional": false + }, + { + "name": "ruleId", + "type": 5, + "optional": false + }, + { + "name": "source", + "type": 5, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "webhook" + }, + { + "kind": "object", + "properties": [ + { + "name": "entries", + "type": 142, + "optional": false + }, + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 144, + "optional": false + }, + { + "name": "update", + "type": 20, + "optional": true + } + ], + "indices": [] + }, + { + "kind": "array", + "element": 143 + }, + { + "kind": "object", + "properties": [ + { + "name": "description", + "type": 5, + "optional": false + }, + { + "name": "name", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "skill-catalog" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 146, + "optional": false + }, + { + "name": "name", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "skill-invocation" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 58, + "optional": false + }, + { + "name": "kind", + "type": 148, + "optional": false + }, + { + "name": "references", + "type": 149, + "optional": false + }, + { + "name": "version", + "type": 154, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "session-reference" + }, + { + "kind": "array", + "element": 150 + }, + { + "kind": "object", + "properties": [ + { + "name": "capturedFormatVersion", + "type": 13, + "optional": true + }, + { + "name": "capturedThroughSeq", + "type": 151, + "optional": false + }, + { + "name": "compacted", + "type": 153, + "optional": false + }, + { + "name": "inputIndex", + "type": 13, + "optional": false + }, + { + "name": "label", + "type": 5, + "optional": false + }, + { + "name": "omittedBytes", + "type": 13, + "optional": false + }, + { + "name": "omittedMessages", + "type": 13, + "optional": false + }, + { + "name": "originalMessages", + "type": 13, + "optional": false + }, + { + "name": "retainedMessages", + "type": 13, + "optional": false + }, + { + "name": "sessionId", + "type": 5, + "optional": false + }, + { + "name": "truncated", + "type": 153, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "union", + "types": [ + 13, + 152 + ] + }, + { + "kind": "primitive", + "type": "null" + }, + { + "kind": "primitive", + "type": "boolean" + }, + { + "kind": "literal", + "value": 1 + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 156, + "optional": false + }, + { + "name": "kind", + "type": 34, + "optional": false + }, + { + "name": "sections", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "snapshot" + }, + { + "kind": "array", + "element": 158 + }, + { + "kind": "object", + "properties": [ + { + "name": "name", + "type": 5, + "optional": false + }, + { + "name": "text", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 156, + "optional": false + }, + { + "name": "kind", + "type": 36, + "optional": false + }, + { + "name": "sections", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 156, + "optional": false + }, + { + "name": "kind", + "type": 38, + "optional": false + }, + { + "name": "sections", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 156, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + }, + { + "name": "sections", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 156, + "optional": false + }, + { + "name": "kind", + "type": 42, + "optional": false + }, + { + "name": "sections", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 156, + "optional": false + }, + { + "name": "kind", + "type": 44, + "optional": false + }, + { + "name": "sections", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 156, + "optional": false + }, + { + "name": "kind", + "type": 46, + "optional": false + }, + { + "name": "sections", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 156, + "optional": false + }, + { + "name": "kind", + "type": 48, + "optional": false + }, + { + "name": "sections", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 156, + "optional": false + }, + { + "name": "kind", + "type": 50, + "optional": false + }, + { + "name": "sections", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 156, + "optional": false + }, + { + "name": "kind", + "type": 52, + "optional": false + }, + { + "name": "sections", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 156, + "optional": false + }, + { + "name": "kind", + "type": 54, + "optional": false + }, + { + "name": "sections", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 156, + "optional": false + }, + { + "name": "kind", + "type": 29, + "optional": false + }, + { + "name": "sections", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 156, + "optional": false + }, + { + "name": "kind", + "type": 31, + "optional": false + }, + { + "name": "sections", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 172, + "optional": false + }, + { + "name": "senderSessionId", + "type": 5, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "subagent-settled" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 174, + "optional": false + }, + { + "name": "senderSessionId", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "agent-message" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 34, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 36, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 38, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 42, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 44, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 46, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 48, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 50, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 52, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 54, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "array", + "element": 13 + }, + { + "kind": "union", + "types": [ + 188, + 189 + ] + }, + { + "kind": "literal", + "value": "append" + }, + { + "kind": "object", + "properties": [ + { + "name": "endSeq", + "type": 13, + "optional": false + }, + { + "name": "op", + "type": 131, + "optional": false + }, + { + "name": "startSeq", + "type": 13, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "user/message" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "477614bca595a9e7adb5a1870be446b9a8684f3ba8950259d6289f2d3b74f028", "schema": { @@ -28323,6 +34723,103 @@ "names": [], "sources": [] }, + { + "digest": "4991dfc415c9efebc36fa6969e1798c7d2e42396cc1e6e0ac7d7c89c5c5c4aea", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "relay" + }, + { + "kind": "literal", + "value": "repeat-tool-reminder" + } + ] + }, + "names": [], + "sources": [] + }, + { + "digest": "49dab019d00e8c26f27ad2ccff7b604d69e323ae4d17e0d2a7b6b8a830b1ade2", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + }, + { + "name": "sections", + "type": 3, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "snapshot" + }, + { + "kind": "literal", + "value": "tmux-context" + }, + { + "kind": "array", + "element": 4 + }, + { + "kind": "object", + "properties": [ + { + "name": "name", + "type": 5, + "optional": false + }, + { + "name": "text", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "primitive", + "type": "string" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "4a9bef9f27a942520cc2279ca7dd3082556e4bff543f66b5c0333e1bbed1cd86", "schema": { @@ -28518,786 +35015,6 @@ "packages/core/session/src/types.ts:192" ] }, - { - "digest": "4c965666d5b42116945bc356087cd5e1fd549e6dece560785ed60511059a8283", - "schema": { - "root": 0, - "nodes": [ - { - "kind": "union", - "types": [ - 1, - 12, - 14, - 16, - 19, - 24, - 26, - 31, - 32, - 34, - 35, - 36, - 38, - 47, - 49, - 51, - 53, - 55, - 58, - 59 - ] - }, - { - "kind": "object", - "properties": [ - { - "name": "baseline", - "type": 2, - "optional": true - }, - { - "name": "baselineIdentity", - "type": 3, - "optional": true - }, - { - "name": "changes", - "type": 4, - "optional": false - }, - { - "name": "form", - "type": 10, - "optional": false - }, - { - "name": "kind", - "type": 11, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": true - }, - { - "kind": "primitive", - "type": "string" - }, - { - "kind": "array", - "element": 5 - }, - { - "kind": "object", - "properties": [ - { - "name": "action", - "type": 6, - "optional": false - }, - { - "name": "digest", - "type": 3, - "optional": true - }, - { - "name": "path", - "type": 3, - "optional": false - }, - { - "name": "scope", - "type": 3, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "union", - "types": [ - 7, - 8, - 9 - ] - }, - { - "kind": "literal", - "value": "remove" - }, - { - "kind": "literal", - "value": "replace" - }, - { - "kind": "literal", - "value": "set" - }, - { - "kind": "literal", - "value": "instructions" - }, - { - "kind": "literal", - "value": "agent-instructions" - }, - { - "kind": "object", - "properties": [ - { - "name": "callId", - "type": 3, - "optional": false - }, - { - "name": "kind", - "type": 13, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "tool" - }, - { - "kind": "object", - "properties": [ - { - "name": "clientTimeZone", - "type": 3, - "optional": true - }, - { - "name": "kind", - "type": 15, - "optional": false - }, - { - "name": "rpcId", - "type": 3, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "user" - }, - { - "kind": "object", - "properties": [ - { - "name": "deliveryId", - "type": 3, - "optional": false - }, - { - "name": "form", - "type": 17, - "optional": false - }, - { - "name": "kind", - "type": 18, - "optional": false - }, - { - "name": "provider", - "type": 3, - "optional": false - }, - { - "name": "ruleId", - "type": 3, - "optional": false - }, - { - "name": "source", - "type": 3, - "optional": false - }, - { - "name": "summary", - "type": 3, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "notice" - }, - { - "kind": "literal", - "value": "webhook" - }, - { - "kind": "object", - "properties": [ - { - "name": "entries", - "type": 20, - "optional": false - }, - { - "name": "form", - "type": 22, - "optional": false - }, - { - "name": "kind", - "type": 23, - "optional": false - }, - { - "name": "update", - "type": 2, - "optional": true - } - ], - "indices": [] - }, - { - "kind": "array", - "element": 21 - }, - { - "kind": "object", - "properties": [ - { - "name": "description", - "type": 3, - "optional": false - }, - { - "name": "name", - "type": 3, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "catalog" - }, - { - "kind": "literal", - "value": "skill-catalog" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 10, - "optional": false - }, - { - "name": "kind", - "type": 25, - "optional": false - }, - { - "name": "name", - "type": 3, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "skill-invocation" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 27, - "optional": false - }, - { - "name": "kind", - "type": 28, - "optional": false - }, - { - "name": "plugin", - "type": 3, - "optional": false - }, - { - "name": "sections", - "type": 29, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "snapshot" - }, - { - "kind": "literal", - "value": "plugin" - }, - { - "kind": "array", - "element": 30 - }, - { - "kind": "object", - "properties": [ - { - "name": "name", - "type": 3, - "optional": false - }, - { - "name": "text", - "type": 3, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 17, - "optional": false - }, - { - "name": "kind", - "type": 28, - "optional": false - }, - { - "name": "plugin", - "type": 3, - "optional": false - }, - { - "name": "summary", - "type": 3, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 33, - "optional": false - }, - { - "name": "kind", - "type": 28, - "optional": false - }, - { - "name": "plugin", - "type": 3, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "relay" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 22, - "optional": false - }, - { - "name": "kind", - "type": 28, - "optional": false - }, - { - "name": "plugin", - "type": 3, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 10, - "optional": false - }, - { - "name": "kind", - "type": 28, - "optional": false - }, - { - "name": "plugin", - "type": 3, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 37, - "optional": false - }, - { - "name": "kind", - "type": 28, - "optional": false - }, - { - "name": "plugin", - "type": 3, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "recall" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 37, - "optional": false - }, - { - "name": "kind", - "type": 39, - "optional": false - }, - { - "name": "references", - "type": 40, - "optional": false - }, - { - "name": "version", - "type": 46, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "session-reference" - }, - { - "kind": "array", - "element": 41 - }, - { - "kind": "object", - "properties": [ - { - "name": "capturedFormatVersion", - "type": 42, - "optional": true - }, - { - "name": "capturedThroughSeq", - "type": 43, - "optional": false - }, - { - "name": "compacted", - "type": 45, - "optional": false - }, - { - "name": "inputIndex", - "type": 42, - "optional": false - }, - { - "name": "label", - "type": 3, - "optional": false - }, - { - "name": "omittedBytes", - "type": 42, - "optional": false - }, - { - "name": "omittedMessages", - "type": 42, - "optional": false - }, - { - "name": "originalMessages", - "type": 42, - "optional": false - }, - { - "name": "retainedMessages", - "type": 42, - "optional": false - }, - { - "name": "sessionId", - "type": 3, - "optional": false - }, - { - "name": "truncated", - "type": 45, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "primitive", - "type": "number" - }, - { - "kind": "union", - "types": [ - 42, - 44 - ] - }, - { - "kind": "primitive", - "type": "null" - }, - { - "kind": "primitive", - "type": "boolean" - }, - { - "kind": "literal", - "value": 1 - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 17, - "optional": false - }, - { - "name": "kind", - "type": 48, - "optional": false - }, - { - "name": "senderSessionId", - "type": 3, - "optional": false - }, - { - "name": "summary", - "type": 3, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "subagent-settled" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 33, - "optional": false - }, - { - "name": "kind", - "type": 50, - "optional": false - }, - { - "name": "senderSessionId", - "type": 3, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "agent-message" - }, - { - "kind": "object", - "properties": [ - { - "name": "goalId", - "type": 3, - "optional": false - }, - { - "name": "kind", - "type": 52, - "optional": false - }, - { - "name": "revision", - "type": 42, - "optional": false - }, - { - "name": "round", - "type": 42, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "goal" - }, - { - "kind": "object", - "properties": [ - { - "name": "kind", - "type": 54, - "optional": false - }, - { - "name": "messageId", - "type": 3, - "optional": false - }, - { - "name": "senderId", - "type": 3, - "optional": false - }, - { - "name": "senderName", - "type": 3, - "optional": false - }, - { - "name": "teamId", - "type": 3, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "team-message" - }, - { - "kind": "object", - "properties": [ - { - "name": "kind", - "type": 56, - "optional": false - }, - { - "name": "model", - "type": 3, - "optional": false - }, - { - "name": "provider", - "type": 3, - "optional": false - }, - { - "name": "replayState", - "type": 57, - "optional": true - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "model" - }, - { - "kind": "opaque", - "reason": "unknown" - }, - { - "kind": "object", - "properties": [ - { - "name": "kind", - "type": 28, - "optional": false - }, - { - "name": "plugin", - "type": 3, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "kind", - "type": 15, - "optional": false - } - ], - "indices": [] - } - ] - }, - "names": [ - "packages/llm/llm/src/message.ts#MessageSource" - ], - "sources": [ - "packages/llm/llm/src/message.ts:128" - ] - }, { "digest": "4cd48f3e5108bd6ebedf7301c3638839b8b2b9db8dbd493974177fbdeb91a01b", "schema": { @@ -30191,1121 +35908,6 @@ "names": [], "sources": [] }, - { - "digest": "5274b395e7bf6660d020fba7e29a1e20ef2e77097fd7597e9debb13e45c540d6", - "schema": { - "root": 0, - "nodes": [ - { - "kind": "object", - "properties": [ - { - "name": "data", - "type": 1, - "optional": false - }, - { - "name": "ignorable", - "type": 16, - "optional": true - }, - { - "name": "seq", - "type": 9, - "optional": false - }, - { - "name": "sourceEventSeqs", - "type": 82, - "optional": true - }, - { - "name": "surfaceOp", - "type": 83, - "optional": false - }, - { - "name": "time", - "type": 9, - "optional": false - }, - { - "name": "type", - "type": 86, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "content", - "type": 2, - "optional": false - }, - { - "name": "id", - "type": 5, - "optional": false - }, - { - "name": "role", - "type": 25, - "optional": false - }, - { - "name": "source", - "type": 26, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "array", - "element": 3 - }, - { - "kind": "union", - "types": [ - 4, - 7, - 18, - 21, - 23 - ] - }, - { - "kind": "object", - "properties": [ - { - "name": "arguments", - "type": 5, - "optional": false - }, - { - "name": "id", - "type": 5, - "optional": false - }, - { - "name": "name", - "type": 5, - "optional": false - }, - { - "name": "type", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "primitive", - "type": "string" - }, - { - "kind": "literal", - "value": "tool-call" - }, - { - "kind": "object", - "properties": [ - { - "name": "attachment", - "type": 8, - "optional": false - }, - { - "name": "offloaded", - "type": 16, - "optional": true - }, - { - "name": "type", - "type": 17, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "attachmentId", - "type": 5, - "optional": false - }, - { - "name": "bytes", - "type": 9, - "optional": false - }, - { - "name": "height", - "type": 9, - "optional": false - }, - { - "name": "mediaType", - "type": 10, - "optional": false - }, - { - "name": "name", - "type": 5, - "optional": true - }, - { - "name": "originalDimensions", - "type": 15, - "optional": true - }, - { - "name": "width", - "type": 9, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "primitive", - "type": "number" - }, - { - "kind": "union", - "types": [ - 11, - 12, - 13, - 14 - ] - }, - { - "kind": "literal", - "value": "image/png" - }, - { - "kind": "literal", - "value": "image/webp" - }, - { - "kind": "literal", - "value": "image/gif" - }, - { - "kind": "literal", - "value": "image/jpeg" - }, - { - "kind": "object", - "properties": [ - { - "name": "height", - "type": 9, - "optional": false - }, - { - "name": "width", - "type": 9, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": true - }, - { - "kind": "literal", - "value": "image" - }, - { - "kind": "object", - "properties": [ - { - "name": "attachment", - "type": 19, - "optional": false - }, - { - "name": "type", - "type": 20, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "attachmentId", - "type": 5, - "optional": false - }, - { - "name": "bytes", - "type": 9, - "optional": false - }, - { - "name": "name", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "file" - }, - { - "kind": "object", - "properties": [ - { - "name": "text", - "type": 5, - "optional": false - }, - { - "name": "type", - "type": 22, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "reasoning" - }, - { - "kind": "object", - "properties": [ - { - "name": "text", - "type": 5, - "optional": false - }, - { - "name": "type", - "type": 24, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "text" - }, - { - "kind": "literal", - "value": "user" - }, - { - "kind": "union", - "types": [ - 27, - 36, - 38, - 39, - 42, - 47, - 49, - 54, - 55, - 56, - 58, - 60, - 61, - 69, - 71, - 73, - 75, - 77, - 80, - 81 - ] - }, - { - "kind": "object", - "properties": [ - { - "name": "baseline", - "type": 16, - "optional": true - }, - { - "name": "baselineIdentity", - "type": 5, - "optional": true - }, - { - "name": "changes", - "type": 28, - "optional": false - }, - { - "name": "form", - "type": 34, - "optional": false - }, - { - "name": "kind", - "type": 35, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "array", - "element": 29 - }, - { - "kind": "object", - "properties": [ - { - "name": "action", - "type": 30, - "optional": false - }, - { - "name": "digest", - "type": 5, - "optional": true - }, - { - "name": "path", - "type": 5, - "optional": false - }, - { - "name": "scope", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "union", - "types": [ - 31, - 32, - 33 - ] - }, - { - "kind": "literal", - "value": "remove" - }, - { - "kind": "literal", - "value": "replace" - }, - { - "kind": "literal", - "value": "set" - }, - { - "kind": "literal", - "value": "instructions" - }, - { - "kind": "literal", - "value": "agent-instructions" - }, - { - "kind": "object", - "properties": [ - { - "name": "callId", - "type": 5, - "optional": false - }, - { - "name": "kind", - "type": 37, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "tool" - }, - { - "kind": "object", - "properties": [ - { - "name": "clientTimeZone", - "type": 5, - "optional": true - }, - { - "name": "kind", - "type": 25, - "optional": false - }, - { - "name": "rpcId", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "deliveryId", - "type": 5, - "optional": false - }, - { - "name": "form", - "type": 40, - "optional": false - }, - { - "name": "kind", - "type": 41, - "optional": false - }, - { - "name": "provider", - "type": 5, - "optional": false - }, - { - "name": "ruleId", - "type": 5, - "optional": false - }, - { - "name": "source", - "type": 5, - "optional": false - }, - { - "name": "summary", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "notice" - }, - { - "kind": "literal", - "value": "webhook" - }, - { - "kind": "object", - "properties": [ - { - "name": "entries", - "type": 43, - "optional": false - }, - { - "name": "form", - "type": 45, - "optional": false - }, - { - "name": "kind", - "type": 46, - "optional": false - }, - { - "name": "update", - "type": 16, - "optional": true - } - ], - "indices": [] - }, - { - "kind": "array", - "element": 44 - }, - { - "kind": "object", - "properties": [ - { - "name": "description", - "type": 5, - "optional": false - }, - { - "name": "name", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "catalog" - }, - { - "kind": "literal", - "value": "skill-catalog" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 34, - "optional": false - }, - { - "name": "kind", - "type": 48, - "optional": false - }, - { - "name": "name", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "skill-invocation" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 50, - "optional": false - }, - { - "name": "kind", - "type": 51, - "optional": false - }, - { - "name": "plugin", - "type": 5, - "optional": false - }, - { - "name": "sections", - "type": 52, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "snapshot" - }, - { - "kind": "literal", - "value": "plugin" - }, - { - "kind": "array", - "element": 53 - }, - { - "kind": "object", - "properties": [ - { - "name": "name", - "type": 5, - "optional": false - }, - { - "name": "text", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 40, - "optional": false - }, - { - "name": "kind", - "type": 51, - "optional": false - }, - { - "name": "plugin", - "type": 5, - "optional": false - }, - { - "name": "summary", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 34, - "optional": false - }, - { - "name": "kind", - "type": 51, - "optional": false - }, - { - "name": "plugin", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 57, - "optional": false - }, - { - "name": "kind", - "type": 51, - "optional": false - }, - { - "name": "plugin", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "recall" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 59, - "optional": false - }, - { - "name": "kind", - "type": 51, - "optional": false - }, - { - "name": "plugin", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "relay" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 45, - "optional": false - }, - { - "name": "kind", - "type": 51, - "optional": false - }, - { - "name": "plugin", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 57, - "optional": false - }, - { - "name": "kind", - "type": 62, - "optional": false - }, - { - "name": "references", - "type": 63, - "optional": false - }, - { - "name": "version", - "type": 68, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "session-reference" - }, - { - "kind": "array", - "element": 64 - }, - { - "kind": "object", - "properties": [ - { - "name": "capturedFormatVersion", - "type": 9, - "optional": true - }, - { - "name": "capturedThroughSeq", - "type": 65, - "optional": false - }, - { - "name": "compacted", - "type": 67, - "optional": false - }, - { - "name": "inputIndex", - "type": 9, - "optional": false - }, - { - "name": "label", - "type": 5, - "optional": false - }, - { - "name": "omittedBytes", - "type": 9, - "optional": false - }, - { - "name": "omittedMessages", - "type": 9, - "optional": false - }, - { - "name": "originalMessages", - "type": 9, - "optional": false - }, - { - "name": "retainedMessages", - "type": 9, - "optional": false - }, - { - "name": "sessionId", - "type": 5, - "optional": false - }, - { - "name": "truncated", - "type": 67, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "union", - "types": [ - 9, - 66 - ] - }, - { - "kind": "primitive", - "type": "null" - }, - { - "kind": "primitive", - "type": "boolean" - }, - { - "kind": "literal", - "value": 1 - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 40, - "optional": false - }, - { - "name": "kind", - "type": 70, - "optional": false - }, - { - "name": "senderSessionId", - "type": 5, - "optional": false - }, - { - "name": "summary", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "subagent-settled" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 59, - "optional": false - }, - { - "name": "kind", - "type": 72, - "optional": false - }, - { - "name": "senderSessionId", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "agent-message" - }, - { - "kind": "object", - "properties": [ - { - "name": "goalId", - "type": 5, - "optional": false - }, - { - "name": "kind", - "type": 74, - "optional": false - }, - { - "name": "revision", - "type": 9, - "optional": false - }, - { - "name": "round", - "type": 9, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "goal" - }, - { - "kind": "object", - "properties": [ - { - "name": "kind", - "type": 76, - "optional": false - }, - { - "name": "messageId", - "type": 5, - "optional": false - }, - { - "name": "senderId", - "type": 5, - "optional": false - }, - { - "name": "senderName", - "type": 5, - "optional": false - }, - { - "name": "teamId", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "team-message" - }, - { - "kind": "object", - "properties": [ - { - "name": "kind", - "type": 78, - "optional": false - }, - { - "name": "model", - "type": 5, - "optional": false - }, - { - "name": "provider", - "type": 5, - "optional": false - }, - { - "name": "replayState", - "type": 79, - "optional": true - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "model" - }, - { - "kind": "opaque", - "reason": "unknown" - }, - { - "kind": "object", - "properties": [ - { - "name": "kind", - "type": 51, - "optional": false - }, - { - "name": "plugin", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "kind", - "type": 25, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "array", - "element": 9 - }, - { - "kind": "union", - "types": [ - 84, - 85 - ] - }, - { - "kind": "literal", - "value": "append" - }, - { - "kind": "object", - "properties": [ - { - "name": "endSeq", - "type": 9, - "optional": false - }, - { - "name": "op", - "type": 32, - "optional": false - }, - { - "name": "startSeq", - "type": 9, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "user/message" - } - ] - }, - "names": [], - "sources": [] - }, { "digest": "529e0ccd0e34079ab4ff21ed87f810cee0388246263bf22e8aba5986b56fae05", "schema": { @@ -31359,6 +35961,69 @@ "packages/util/values/src/index.ts:4" ] }, + { + "digest": "52c6113cb0e53f345324bf84f01928bea5d5df57ee80bc0dd65407b8bc5a3734", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + }, + { + "name": "sections", + "type": 3, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "snapshot" + }, + { + "kind": "literal", + "value": "model-selection" + }, + { + "kind": "array", + "element": 4 + }, + { + "kind": "object", + "properties": [ + { + "name": "name", + "type": 5, + "optional": false + }, + { + "name": "text", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "primitive", + "type": "string" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "530da6c0267813bb4511af72883cc518834e624e3b3220a7062955fd57a788a6", "schema": { @@ -31398,6 +36063,2768 @@ "packages/core/session/src/types.ts:272" ] }, + { + "digest": "531c1bf918d4ce9eeb8a51d32484587bc77a62e5806d8c29e64040fcafd6517e", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "array", + "element": 1 + }, + { + "kind": "union", + "types": [ + 2, + 29, + 188, + 190 + ] + }, + { + "kind": "object", + "properties": [ + { + "name": "content", + "type": 3, + "optional": false + }, + { + "name": "id", + "type": 6, + "optional": false + }, + { + "name": "isError", + "type": 26, + "optional": true + }, + { + "name": "role", + "type": 27, + "optional": false + }, + { + "name": "source", + "type": 28, + "optional": false + }, + { + "name": "toolCallId", + "type": 6, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "array", + "element": 4 + }, + { + "kind": "union", + "types": [ + 5, + 8, + 19, + 22, + 24 + ] + }, + { + "kind": "object", + "properties": [ + { + "name": "arguments", + "type": 6, + "optional": false + }, + { + "name": "id", + "type": 6, + "optional": false + }, + { + "name": "name", + "type": 6, + "optional": false + }, + { + "name": "type", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "primitive", + "type": "string" + }, + { + "kind": "literal", + "value": "tool-call" + }, + { + "kind": "object", + "properties": [ + { + "name": "attachment", + "type": 9, + "optional": false + }, + { + "name": "offloaded", + "type": 17, + "optional": true + }, + { + "name": "type", + "type": 18, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "attachmentId", + "type": 6, + "optional": false + }, + { + "name": "bytes", + "type": 10, + "optional": false + }, + { + "name": "height", + "type": 10, + "optional": false + }, + { + "name": "mediaType", + "type": 11, + "optional": false + }, + { + "name": "name", + "type": 6, + "optional": true + }, + { + "name": "originalDimensions", + "type": 16, + "optional": true + }, + { + "name": "width", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "primitive", + "type": "number" + }, + { + "kind": "union", + "types": [ + 12, + 13, + 14, + 15 + ] + }, + { + "kind": "literal", + "value": "image/jpeg" + }, + { + "kind": "literal", + "value": "image/gif" + }, + { + "kind": "literal", + "value": "image/png" + }, + { + "kind": "literal", + "value": "image/webp" + }, + { + "kind": "object", + "properties": [ + { + "name": "height", + "type": 10, + "optional": false + }, + { + "name": "width", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": true + }, + { + "kind": "literal", + "value": "image" + }, + { + "kind": "object", + "properties": [ + { + "name": "attachment", + "type": 20, + "optional": false + }, + { + "name": "type", + "type": 21, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "attachmentId", + "type": 6, + "optional": false + }, + { + "name": "bytes", + "type": 10, + "optional": false + }, + { + "name": "name", + "type": 6, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "file" + }, + { + "kind": "object", + "properties": [ + { + "name": "text", + "type": 6, + "optional": false + }, + { + "name": "type", + "type": 23, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "reasoning" + }, + { + "kind": "object", + "properties": [ + { + "name": "text", + "type": 6, + "optional": false + }, + { + "name": "type", + "type": 25, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "text" + }, + { + "kind": "primitive", + "type": "boolean" + }, + { + "kind": "literal", + "value": "tool" + }, + { + "kind": "object", + "properties": [ + { + "name": "callId", + "type": 6, + "optional": false + }, + { + "name": "kind", + "type": 27, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "content", + "type": 3, + "optional": false + }, + { + "name": "id", + "type": 6, + "optional": false + }, + { + "name": "role", + "type": 30, + "optional": false + }, + { + "name": "source", + "type": 31, + "optional": false, + "compatibility": { + "version": 1, + "policy": "session-source-attribution", + "binding": "session.user-message.source", + "discriminator": "kind", + "unknownKinds": "preserve", + "attributionKinds": [ + "tmux-context" + ] + } + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "user" + }, + { + "kind": "union", + "types": [ + 28, + 32, + 35, + 37, + 39, + 41, + 49, + 51, + 52, + 54, + 57, + 59, + 64, + 66, + 74, + 79, + 81, + 83, + 85, + 87, + 88, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 98, + 100, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135, + 136, + 137, + 138, + 139, + 140, + 141, + 142, + 143, + 144, + 145, + 146, + 147, + 148, + 149, + 150, + 151, + 152, + 153, + 154, + 155, + 156, + 157, + 158, + 160, + 162, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 172, + 173, + 175, + 176, + 177, + 178, + 179, + 180, + 181, + 182, + 184, + 186, + 187 + ] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 34, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "instructions" + }, + { + "kind": "literal", + "value": "runtime-context" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 36, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "schedule" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 38, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "time-context" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tmux-context" + }, + { + "kind": "object", + "properties": [ + { + "name": "baseline", + "type": 17, + "optional": true + }, + { + "name": "baselineIdentity", + "type": 6, + "optional": true + }, + { + "name": "changes", + "type": 42, + "optional": false + }, + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 48, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "array", + "element": 43 + }, + { + "kind": "object", + "properties": [ + { + "name": "action", + "type": 44, + "optional": false + }, + { + "name": "digest", + "type": 6, + "optional": true + }, + { + "name": "path", + "type": 6, + "optional": false + }, + { + "name": "scope", + "type": 6, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "union", + "types": [ + 45, + 46, + 47 + ] + }, + { + "kind": "literal", + "value": "remove" + }, + { + "kind": "literal", + "value": "replace" + }, + { + "kind": "literal", + "value": "set" + }, + { + "kind": "literal", + "value": "agent-instructions" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 50, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tool-goal" + }, + { + "kind": "object", + "properties": [ + { + "name": "clientTimeZone", + "type": 6, + "optional": true + }, + { + "name": "kind", + "type": 30, + "optional": false + }, + { + "name": "rpcId", + "type": 6, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "compactionId", + "type": 6, + "optional": false + }, + { + "name": "kind", + "type": 53, + "optional": false + }, + { + "name": "sourceCommandId", + "type": 6, + "optional": true + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "compact-checkpoint" + }, + { + "kind": "object", + "properties": [ + { + "name": "deliveryId", + "type": 6, + "optional": false + }, + { + "name": "form", + "type": 55, + "optional": false + }, + { + "name": "kind", + "type": 56, + "optional": false + }, + { + "name": "provider", + "type": 6, + "optional": false + }, + { + "name": "ruleId", + "type": 6, + "optional": false + }, + { + "name": "source", + "type": 6, + "optional": false + }, + { + "name": "summary", + "type": 6, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "notice" + }, + { + "kind": "literal", + "value": "webhook" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 58, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tool-jobs" + }, + { + "kind": "object", + "properties": [ + { + "name": "entries", + "type": 60, + "optional": false + }, + { + "name": "form", + "type": 62, + "optional": false + }, + { + "name": "kind", + "type": 63, + "optional": false + }, + { + "name": "update", + "type": 17, + "optional": true + } + ], + "indices": [] + }, + { + "kind": "array", + "element": 61 + }, + { + "kind": "object", + "properties": [ + { + "name": "description", + "type": 6, + "optional": false + }, + { + "name": "name", + "type": 6, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "catalog" + }, + { + "kind": "literal", + "value": "skill-catalog" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 65, + "optional": false + }, + { + "name": "name", + "type": 6, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "skill-invocation" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 67, + "optional": false + }, + { + "name": "kind", + "type": 68, + "optional": false + }, + { + "name": "references", + "type": 69, + "optional": false + }, + { + "name": "version", + "type": 73, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "recall" + }, + { + "kind": "literal", + "value": "session-reference" + }, + { + "kind": "array", + "element": 70 + }, + { + "kind": "object", + "properties": [ + { + "name": "capturedFormatVersion", + "type": 10, + "optional": true + }, + { + "name": "capturedThroughSeq", + "type": 71, + "optional": false + }, + { + "name": "compacted", + "type": 26, + "optional": false + }, + { + "name": "inputIndex", + "type": 10, + "optional": false + }, + { + "name": "label", + "type": 6, + "optional": false + }, + { + "name": "omittedBytes", + "type": 10, + "optional": false + }, + { + "name": "omittedMessages", + "type": 10, + "optional": false + }, + { + "name": "originalMessages", + "type": 10, + "optional": false + }, + { + "name": "retainedMessages", + "type": 10, + "optional": false + }, + { + "name": "sessionId", + "type": 6, + "optional": false + }, + { + "name": "truncated", + "type": 26, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "union", + "types": [ + 10, + 72 + ] + }, + { + "kind": "primitive", + "type": "null" + }, + { + "kind": "literal", + "value": 1 + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 75, + "optional": false + }, + { + "name": "kind", + "type": 76, + "optional": false + }, + { + "name": "sections", + "type": 77, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "snapshot" + }, + { + "kind": "literal", + "value": "hooks-claude-code" + }, + { + "kind": "array", + "element": 78 + }, + { + "kind": "object", + "properties": [ + { + "name": "name", + "type": 6, + "optional": false + }, + { + "name": "text", + "type": 6, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 75, + "optional": false + }, + { + "name": "kind", + "type": 80, + "optional": false + }, + { + "name": "sections", + "type": 77, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "hooks-codex" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 75, + "optional": false + }, + { + "name": "kind", + "type": 82, + "optional": false + }, + { + "name": "sections", + "type": 77, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "model-selection" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 75, + "optional": false + }, + { + "name": "kind", + "type": 84, + "optional": false + }, + { + "name": "sections", + "type": 77, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "plan-mode" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 75, + "optional": false + }, + { + "name": "kind", + "type": 86, + "optional": false + }, + { + "name": "sections", + "type": 77, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "repeat-tool-reminder" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 75, + "optional": false + }, + { + "name": "kind", + "type": 34, + "optional": false + }, + { + "name": "sections", + "type": 77, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 89, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "user-approval" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 75, + "optional": false + }, + { + "name": "kind", + "type": 36, + "optional": false + }, + { + "name": "sections", + "type": 77, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 75, + "optional": false + }, + { + "name": "kind", + "type": 38, + "optional": false + }, + { + "name": "sections", + "type": 77, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 75, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + }, + { + "name": "sections", + "type": 77, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 75, + "optional": false + }, + { + "name": "kind", + "type": 50, + "optional": false + }, + { + "name": "sections", + "type": 77, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 75, + "optional": false + }, + { + "name": "kind", + "type": 58, + "optional": false + }, + { + "name": "sections", + "type": 77, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 75, + "optional": false + }, + { + "name": "kind", + "type": 89, + "optional": false + }, + { + "name": "sections", + "type": 77, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 75, + "optional": false + }, + { + "name": "kind", + "type": 97, + "optional": false + }, + { + "name": "sections", + "type": 77, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "dsh-session-title-llm" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 55, + "optional": false + }, + { + "name": "kind", + "type": 99, + "optional": false + }, + { + "name": "senderSessionId", + "type": 6, + "optional": false + }, + { + "name": "summary", + "type": 6, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "subagent-settled" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 101, + "optional": false + }, + { + "name": "kind", + "type": 102, + "optional": false + }, + { + "name": "senderSessionId", + "type": 6, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "relay" + }, + { + "kind": "literal", + "value": "agent-message" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 97, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 55, + "optional": false + }, + { + "name": "kind", + "type": 76, + "optional": false + }, + { + "name": "summary", + "type": 6, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 55, + "optional": false + }, + { + "name": "kind", + "type": 80, + "optional": false + }, + { + "name": "summary", + "type": 6, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 55, + "optional": false + }, + { + "name": "kind", + "type": 82, + "optional": false + }, + { + "name": "summary", + "type": 6, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 55, + "optional": false + }, + { + "name": "kind", + "type": 84, + "optional": false + }, + { + "name": "summary", + "type": 6, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 55, + "optional": false + }, + { + "name": "kind", + "type": 86, + "optional": false + }, + { + "name": "summary", + "type": 6, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 55, + "optional": false + }, + { + "name": "kind", + "type": 34, + "optional": false + }, + { + "name": "summary", + "type": 6, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 55, + "optional": false + }, + { + "name": "kind", + "type": 36, + "optional": false + }, + { + "name": "summary", + "type": 6, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 55, + "optional": false + }, + { + "name": "kind", + "type": 38, + "optional": false + }, + { + "name": "summary", + "type": 6, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 55, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + }, + { + "name": "summary", + "type": 6, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 67, + "optional": false + }, + { + "name": "kind", + "type": 76, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 55, + "optional": false + }, + { + "name": "kind", + "type": 50, + "optional": false + }, + { + "name": "summary", + "type": 6, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 55, + "optional": false + }, + { + "name": "kind", + "type": 58, + "optional": false + }, + { + "name": "summary", + "type": 6, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 67, + "optional": false + }, + { + "name": "kind", + "type": 80, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 67, + "optional": false + }, + { + "name": "kind", + "type": 82, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 67, + "optional": false + }, + { + "name": "kind", + "type": 84, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 67, + "optional": false + }, + { + "name": "kind", + "type": 86, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 67, + "optional": false + }, + { + "name": "kind", + "type": 34, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 67, + "optional": false + }, + { + "name": "kind", + "type": 36, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 67, + "optional": false + }, + { + "name": "kind", + "type": 38, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 67, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 67, + "optional": false + }, + { + "name": "kind", + "type": 50, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 55, + "optional": false + }, + { + "name": "kind", + "type": 89, + "optional": false + }, + { + "name": "summary", + "type": 6, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 67, + "optional": false + }, + { + "name": "kind", + "type": 58, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 67, + "optional": false + }, + { + "name": "kind", + "type": 89, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 67, + "optional": false + }, + { + "name": "kind", + "type": 97, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 101, + "optional": false + }, + { + "name": "kind", + "type": 76, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 101, + "optional": false + }, + { + "name": "kind", + "type": 80, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 101, + "optional": false + }, + { + "name": "kind", + "type": 82, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 101, + "optional": false + }, + { + "name": "kind", + "type": 84, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 101, + "optional": false + }, + { + "name": "kind", + "type": 86, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 101, + "optional": false + }, + { + "name": "kind", + "type": 34, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 55, + "optional": false + }, + { + "name": "kind", + "type": 97, + "optional": false + }, + { + "name": "summary", + "type": 6, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 101, + "optional": false + }, + { + "name": "kind", + "type": 36, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 101, + "optional": false + }, + { + "name": "kind", + "type": 38, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 101, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 101, + "optional": false + }, + { + "name": "kind", + "type": 50, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 101, + "optional": false + }, + { + "name": "kind", + "type": 58, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 101, + "optional": false + }, + { + "name": "kind", + "type": 89, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 101, + "optional": false + }, + { + "name": "kind", + "type": 97, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 62, + "optional": false + }, + { + "name": "kind", + "type": 76, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 62, + "optional": false + }, + { + "name": "kind", + "type": 80, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 76, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 62, + "optional": false + }, + { + "name": "kind", + "type": 82, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 62, + "optional": false + }, + { + "name": "kind", + "type": 84, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 62, + "optional": false + }, + { + "name": "kind", + "type": 86, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 62, + "optional": false + }, + { + "name": "kind", + "type": 34, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 62, + "optional": false + }, + { + "name": "kind", + "type": 36, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 62, + "optional": false + }, + { + "name": "kind", + "type": 38, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 62, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 62, + "optional": false + }, + { + "name": "kind", + "type": 50, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 62, + "optional": false + }, + { + "name": "kind", + "type": 58, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 80, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 62, + "optional": false + }, + { + "name": "kind", + "type": 89, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 62, + "optional": false + }, + { + "name": "kind", + "type": 97, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "goalId", + "type": 6, + "optional": false + }, + { + "name": "kind", + "type": 159, + "optional": false + }, + { + "name": "revision", + "type": 10, + "optional": false + }, + { + "name": "round", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "goal" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 161, + "optional": false + }, + { + "name": "messageId", + "type": 6, + "optional": false + }, + { + "name": "senderId", + "type": 6, + "optional": false + }, + { + "name": "senderName", + "type": 6, + "optional": false + }, + { + "name": "teamId", + "type": 6, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "team-message" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 163, + "optional": false + }, + { + "name": "model", + "type": 6, + "optional": false + }, + { + "name": "provider", + "type": 6, + "optional": false + }, + { + "name": "replayState", + "type": 164, + "optional": true + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "model" + }, + { + "kind": "opaque", + "reason": "unknown" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 76, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 80, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 82, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 82, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 84, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 86, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 34, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 36, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 174, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "system-prompt" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 38, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 40, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 50, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 84, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 58, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 30, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 89, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 183, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "code-mode" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 185, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "cordis-host-runner" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 97, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 33, + "optional": false + }, + { + "name": "kind", + "type": 86, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "content", + "type": 3, + "optional": false + }, + { + "name": "id", + "type": 6, + "optional": false + }, + { + "name": "role", + "type": 189, + "optional": false + }, + { + "name": "source", + "type": 162, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "assistant" + }, + { + "kind": "object", + "properties": [ + { + "name": "content", + "type": 3, + "optional": false + }, + { + "name": "id", + "type": 6, + "optional": false + }, + { + "name": "role", + "type": 191, + "optional": false + }, + { + "name": "source", + "type": 173, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "system" + } + ] + }, + "names": [], + "sources": [] + }, + { + "digest": "53cf1704ae0709c7678bcf070c83c619fc48ca1b5c173b74cfa8702f22a8e492", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "instructions" + }, + { + "kind": "literal", + "value": "tool-jobs" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "544d9f25d6224883513a9d6c0d0a185764d5fa8aebb24e20f87710b6f284a540", "schema": { @@ -32304,6 +39731,411 @@ "packages/core/session/src/types.ts:332" ] }, + { + "digest": "54a8682615a7ffc3e1e3c41ab003ae61082ae2792c57407f5bd8bb38fded3f0e", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "data", + "type": 1, + "optional": false + }, + { + "name": "ignorable", + "type": 15, + "optional": true + }, + { + "name": "seq", + "type": 8, + "optional": false + }, + { + "name": "sourceEventSeqs", + "type": 29, + "optional": true + }, + { + "name": "surfaceOp", + "type": 30, + "optional": false + }, + { + "name": "time", + "type": 8, + "optional": false + }, + { + "name": "type", + "type": 34, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "message", + "type": 2, + "optional": false + }, + { + "name": "step", + "type": 8, + "optional": false + }, + { + "name": "turn", + "type": 8, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "content", + "type": 3, + "optional": false + }, + { + "name": "id", + "type": 7, + "optional": false + }, + { + "name": "role", + "type": 26, + "optional": false + }, + { + "name": "source", + "type": 27, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "array", + "element": 4 + }, + { + "kind": "union", + "types": [ + 5, + 17, + 20, + 22, + 24 + ] + }, + { + "kind": "object", + "properties": [ + { + "name": "attachment", + "type": 6, + "optional": false + }, + { + "name": "offloaded", + "type": 15, + "optional": true + }, + { + "name": "type", + "type": 16, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "attachmentId", + "type": 7, + "optional": false + }, + { + "name": "bytes", + "type": 8, + "optional": false + }, + { + "name": "height", + "type": 8, + "optional": false + }, + { + "name": "mediaType", + "type": 9, + "optional": false + }, + { + "name": "name", + "type": 7, + "optional": true + }, + { + "name": "originalDimensions", + "type": 14, + "optional": true + }, + { + "name": "width", + "type": 8, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "primitive", + "type": "string" + }, + { + "kind": "primitive", + "type": "number" + }, + { + "kind": "union", + "types": [ + 10, + 11, + 12, + 13 + ] + }, + { + "kind": "literal", + "value": "image/gif" + }, + { + "kind": "literal", + "value": "image/jpeg" + }, + { + "kind": "literal", + "value": "image/png" + }, + { + "kind": "literal", + "value": "image/webp" + }, + { + "kind": "object", + "properties": [ + { + "name": "height", + "type": 8, + "optional": false + }, + { + "name": "width", + "type": 8, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": true + }, + { + "kind": "literal", + "value": "image" + }, + { + "kind": "object", + "properties": [ + { + "name": "attachment", + "type": 18, + "optional": false + }, + { + "name": "type", + "type": 19, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "attachmentId", + "type": 7, + "optional": false + }, + { + "name": "bytes", + "type": 8, + "optional": false + }, + { + "name": "name", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "file" + }, + { + "kind": "object", + "properties": [ + { + "name": "text", + "type": 7, + "optional": false + }, + { + "name": "type", + "type": 21, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "text" + }, + { + "kind": "object", + "properties": [ + { + "name": "text", + "type": 7, + "optional": false + }, + { + "name": "type", + "type": 23, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "reasoning" + }, + { + "kind": "object", + "properties": [ + { + "name": "arguments", + "type": 7, + "optional": false + }, + { + "name": "id", + "type": 7, + "optional": false + }, + { + "name": "name", + "type": 7, + "optional": false + }, + { + "name": "type", + "type": 25, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tool-call" + }, + { + "kind": "literal", + "value": "system" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 28, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "system-prompt" + }, + { + "kind": "array", + "element": 8 + }, + { + "kind": "union", + "types": [ + 31, + 33 + ] + }, + { + "kind": "object", + "properties": [ + { + "name": "endSeq", + "type": 8, + "optional": false + }, + { + "name": "op", + "type": 32, + "optional": false + }, + { + "name": "startSeq", + "type": 8, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "replace" + }, + { + "kind": "literal", + "value": "append" + }, + { + "kind": "literal", + "value": "system/message" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "557e148d30b79ee48645850832b30c717d7c3b64641deb5d6133b8b4e91ee0b8", "schema": { @@ -32318,6 +40150,69 @@ "names": [], "sources": [] }, + { + "digest": "5654685d7557ec747e74887237065e626a5bdfa426ca43f7fbb0b6fee9b0916c", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + }, + { + "name": "sections", + "type": 3, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "snapshot" + }, + { + "kind": "literal", + "value": "user-approval" + }, + { + "kind": "array", + "element": 4 + }, + { + "kind": "object", + "properties": [ + { + "name": "name", + "type": 5, + "optional": false + }, + { + "name": "text", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "primitive", + "type": "string" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "56b7c047694875a843ba020dfea3c8380d54ae4ff88ab349e72004dc21e07c23", "schema": { @@ -32536,6 +40431,40 @@ "names": [], "sources": [] }, + { + "digest": "58015da1c1950a66daf66ae24913d6a1fc6d1d9ac441b155f8847f7f8584ba8e", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "catalog" + }, + { + "kind": "literal", + "value": "runtime-context" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "5808e36c95355f0e745201b5db1b6bcec4ebf5adb75d3e82d7d59cc89635ab80", "schema": { @@ -32806,6 +40735,83 @@ "packages/interaction/commands/src/types.ts:112" ] }, + { + "digest": "5bb69b88517f6214f2af4d1a6d2b771e271ad3ad695cc9c2c272069ae698c9bc", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + }, + { + "name": "summary", + "type": 3, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "notice" + }, + { + "kind": "literal", + "value": "tool-jobs" + }, + { + "kind": "primitive", + "type": "string" + } + ] + }, + "names": [], + "sources": [] + }, + { + "digest": "5bc66269cfaf614c0ecda8ecb469f23101a7609793fc2b693ac23c4aecdb575e", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "relay" + }, + { + "kind": "literal", + "value": "schedule" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "5bd310104cfe448e530beb11422d2f791e2e32e8e95fdc528a15f9ca693dae75", "schema": { @@ -32888,6 +40894,40 @@ "names": [], "sources": [] }, + { + "digest": "5cdbf342b7748d152bc987b68f58e565e5bba4b227e076e2d2120d87662e45cd", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "relay" + }, + { + "kind": "literal", + "value": "user-approval" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "5d03ba38734809bcbd2a55221bd938b3b3fc34b49bb686c6113e9e4931e3aa78", "schema": { @@ -32977,6 +41017,40 @@ "names": [], "sources": [] }, + { + "digest": "5d7a64ed6aac5551ebf998dc25e1e7b48a144769913f89702840180e61dc3995", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "relay" + }, + { + "kind": "literal", + "value": "time-context" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "5dd766ccd1702a1142ad8b4bd44f2242f8e8a6752669ad3de0a5d224329b1438", "schema": { @@ -33310,6 +41384,2828 @@ "packages/subagent/subagent/src/descriptor.ts:61" ] }, + { + "digest": "6085488d223aeffdef51d7ae17655fc26ab22ee13cbed82a50e62e2b6fb5b918", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "instructions" + }, + { + "kind": "literal", + "value": "tool-goal" + } + ] + }, + "names": [], + "sources": [] + }, + { + "digest": "608866d72de8327687e3730cb213d57cf8485012419673de9e5765f4a71f7f2d", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "maxTokens", + "type": 1, + "optional": false + }, + { + "name": "messageSeqs", + "type": 2, + "optional": false + }, + { + "name": "messages", + "type": 3, + "optional": false + }, + { + "name": "route", + "type": 194, + "optional": false + }, + { + "name": "system", + "type": 9, + "optional": false + }, + { + "name": "titleProvider", + "type": 9, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "primitive", + "type": "number" + }, + { + "kind": "array", + "element": 1 + }, + { + "kind": "array", + "element": 4 + }, + { + "kind": "union", + "types": [ + 5, + 31, + 190, + 192 + ] + }, + { + "kind": "object", + "properties": [ + { + "name": "content", + "type": 6, + "optional": false + }, + { + "name": "id", + "type": 9, + "optional": false + }, + { + "name": "isError", + "type": 28, + "optional": true + }, + { + "name": "role", + "type": 29, + "optional": false + }, + { + "name": "source", + "type": 30, + "optional": false + }, + { + "name": "toolCallId", + "type": 9, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "array", + "element": 7 + }, + { + "kind": "union", + "types": [ + 8, + 11, + 21, + 24, + 26 + ] + }, + { + "kind": "object", + "properties": [ + { + "name": "arguments", + "type": 9, + "optional": false + }, + { + "name": "id", + "type": 9, + "optional": false + }, + { + "name": "name", + "type": 9, + "optional": false + }, + { + "name": "type", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "primitive", + "type": "string" + }, + { + "kind": "literal", + "value": "tool-call" + }, + { + "kind": "object", + "properties": [ + { + "name": "attachment", + "type": 12, + "optional": false + }, + { + "name": "offloaded", + "type": 19, + "optional": true + }, + { + "name": "type", + "type": 20, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "attachmentId", + "type": 9, + "optional": false + }, + { + "name": "bytes", + "type": 1, + "optional": false + }, + { + "name": "height", + "type": 1, + "optional": false + }, + { + "name": "mediaType", + "type": 13, + "optional": false + }, + { + "name": "name", + "type": 9, + "optional": true + }, + { + "name": "originalDimensions", + "type": 18, + "optional": true + }, + { + "name": "width", + "type": 1, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "union", + "types": [ + 14, + 15, + 16, + 17 + ] + }, + { + "kind": "literal", + "value": "image/gif" + }, + { + "kind": "literal", + "value": "image/jpeg" + }, + { + "kind": "literal", + "value": "image/png" + }, + { + "kind": "literal", + "value": "image/webp" + }, + { + "kind": "object", + "properties": [ + { + "name": "height", + "type": 1, + "optional": false + }, + { + "name": "width", + "type": 1, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": true + }, + { + "kind": "literal", + "value": "image" + }, + { + "kind": "object", + "properties": [ + { + "name": "attachment", + "type": 22, + "optional": false + }, + { + "name": "type", + "type": 23, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "attachmentId", + "type": 9, + "optional": false + }, + { + "name": "bytes", + "type": 1, + "optional": false + }, + { + "name": "name", + "type": 9, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "file" + }, + { + "kind": "object", + "properties": [ + { + "name": "text", + "type": 9, + "optional": false + }, + { + "name": "type", + "type": 25, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "reasoning" + }, + { + "kind": "object", + "properties": [ + { + "name": "text", + "type": 9, + "optional": false + }, + { + "name": "type", + "type": 27, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "text" + }, + { + "kind": "primitive", + "type": "boolean" + }, + { + "kind": "literal", + "value": "tool" + }, + { + "kind": "object", + "properties": [ + { + "name": "callId", + "type": 9, + "optional": false + }, + { + "name": "kind", + "type": 29, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "content", + "type": 6, + "optional": false + }, + { + "name": "id", + "type": 9, + "optional": false + }, + { + "name": "role", + "type": 32, + "optional": false + }, + { + "name": "source", + "type": 33, + "optional": false, + "compatibility": { + "version": 1, + "policy": "session-source-attribution", + "binding": "session.user-message.source", + "discriminator": "kind", + "unknownKinds": "preserve", + "attributionKinds": [ + "tmux-context" + ] + } + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "user" + }, + { + "kind": "union", + "types": [ + 30, + 34, + 37, + 39, + 41, + 43, + 45, + 53, + 54, + 56, + 58, + 61, + 66, + 68, + 76, + 81, + 83, + 85, + 87, + 89, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 98, + 99, + 101, + 103, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135, + 136, + 137, + 138, + 139, + 140, + 141, + 142, + 143, + 144, + 145, + 146, + 147, + 148, + 149, + 150, + 151, + 152, + 153, + 154, + 155, + 156, + 157, + 158, + 159, + 160, + 162, + 164, + 167, + 168, + 169, + 170, + 171, + 172, + 173, + 174, + 175, + 177, + 178, + 179, + 180, + 181, + 182, + 183, + 184, + 186, + 188, + 189 + ] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 35, + "optional": false + }, + { + "name": "kind", + "type": 36, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "instructions" + }, + { + "kind": "literal", + "value": "repeat-tool-reminder" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 35, + "optional": false + }, + { + "name": "kind", + "type": 38, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "runtime-context" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 35, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "schedule" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 35, + "optional": false + }, + { + "name": "kind", + "type": 42, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "time-context" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 35, + "optional": false + }, + { + "name": "kind", + "type": 44, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tmux-context" + }, + { + "kind": "object", + "properties": [ + { + "name": "baseline", + "type": 19, + "optional": true + }, + { + "name": "baselineIdentity", + "type": 9, + "optional": true + }, + { + "name": "changes", + "type": 46, + "optional": false + }, + { + "name": "form", + "type": 35, + "optional": false + }, + { + "name": "kind", + "type": 52, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "array", + "element": 47 + }, + { + "kind": "object", + "properties": [ + { + "name": "action", + "type": 48, + "optional": false + }, + { + "name": "digest", + "type": 9, + "optional": true + }, + { + "name": "path", + "type": 9, + "optional": false + }, + { + "name": "scope", + "type": 9, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "union", + "types": [ + 49, + 50, + 51 + ] + }, + { + "kind": "literal", + "value": "remove" + }, + { + "kind": "literal", + "value": "replace" + }, + { + "kind": "literal", + "value": "set" + }, + { + "kind": "literal", + "value": "agent-instructions" + }, + { + "kind": "object", + "properties": [ + { + "name": "clientTimeZone", + "type": 9, + "optional": true + }, + { + "name": "kind", + "type": 32, + "optional": false + }, + { + "name": "rpcId", + "type": 9, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "compactionId", + "type": 9, + "optional": false + }, + { + "name": "kind", + "type": 55, + "optional": false + }, + { + "name": "sourceCommandId", + "type": 9, + "optional": true + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "compact-checkpoint" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 35, + "optional": false + }, + { + "name": "kind", + "type": 57, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tool-goal" + }, + { + "kind": "object", + "properties": [ + { + "name": "deliveryId", + "type": 9, + "optional": false + }, + { + "name": "form", + "type": 59, + "optional": false + }, + { + "name": "kind", + "type": 60, + "optional": false + }, + { + "name": "provider", + "type": 9, + "optional": false + }, + { + "name": "ruleId", + "type": 9, + "optional": false + }, + { + "name": "source", + "type": 9, + "optional": false + }, + { + "name": "summary", + "type": 9, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "notice" + }, + { + "kind": "literal", + "value": "webhook" + }, + { + "kind": "object", + "properties": [ + { + "name": "entries", + "type": 62, + "optional": false + }, + { + "name": "form", + "type": 64, + "optional": false + }, + { + "name": "kind", + "type": 65, + "optional": false + }, + { + "name": "update", + "type": 19, + "optional": true + } + ], + "indices": [] + }, + { + "kind": "array", + "element": 63 + }, + { + "kind": "object", + "properties": [ + { + "name": "description", + "type": 9, + "optional": false + }, + { + "name": "name", + "type": 9, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "catalog" + }, + { + "kind": "literal", + "value": "skill-catalog" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 35, + "optional": false + }, + { + "name": "kind", + "type": 67, + "optional": false + }, + { + "name": "name", + "type": 9, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "skill-invocation" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 69, + "optional": false + }, + { + "name": "kind", + "type": 70, + "optional": false + }, + { + "name": "references", + "type": 71, + "optional": false + }, + { + "name": "version", + "type": 75, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "recall" + }, + { + "kind": "literal", + "value": "session-reference" + }, + { + "kind": "array", + "element": 72 + }, + { + "kind": "object", + "properties": [ + { + "name": "capturedFormatVersion", + "type": 1, + "optional": true + }, + { + "name": "capturedThroughSeq", + "type": 73, + "optional": false + }, + { + "name": "compacted", + "type": 28, + "optional": false + }, + { + "name": "inputIndex", + "type": 1, + "optional": false + }, + { + "name": "label", + "type": 9, + "optional": false + }, + { + "name": "omittedBytes", + "type": 1, + "optional": false + }, + { + "name": "omittedMessages", + "type": 1, + "optional": false + }, + { + "name": "originalMessages", + "type": 1, + "optional": false + }, + { + "name": "retainedMessages", + "type": 1, + "optional": false + }, + { + "name": "sessionId", + "type": 9, + "optional": false + }, + { + "name": "truncated", + "type": 28, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "union", + "types": [ + 1, + 74 + ] + }, + { + "kind": "primitive", + "type": "null" + }, + { + "kind": "literal", + "value": 1 + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 77, + "optional": false + }, + { + "name": "kind", + "type": 78, + "optional": false + }, + { + "name": "sections", + "type": 79, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "snapshot" + }, + { + "kind": "literal", + "value": "hooks-claude-code" + }, + { + "kind": "array", + "element": 80 + }, + { + "kind": "object", + "properties": [ + { + "name": "name", + "type": 9, + "optional": false + }, + { + "name": "text", + "type": 9, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 77, + "optional": false + }, + { + "name": "kind", + "type": 82, + "optional": false + }, + { + "name": "sections", + "type": 79, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "hooks-codex" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 35, + "optional": false + }, + { + "name": "kind", + "type": 84, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tool-jobs" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 77, + "optional": false + }, + { + "name": "kind", + "type": 86, + "optional": false + }, + { + "name": "sections", + "type": 79, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "model-selection" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 77, + "optional": false + }, + { + "name": "kind", + "type": 88, + "optional": false + }, + { + "name": "sections", + "type": 79, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "plan-mode" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 77, + "optional": false + }, + { + "name": "kind", + "type": 36, + "optional": false + }, + { + "name": "sections", + "type": 79, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 77, + "optional": false + }, + { + "name": "kind", + "type": 38, + "optional": false + }, + { + "name": "sections", + "type": 79, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 77, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + }, + { + "name": "sections", + "type": 79, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 77, + "optional": false + }, + { + "name": "kind", + "type": 42, + "optional": false + }, + { + "name": "sections", + "type": 79, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 77, + "optional": false + }, + { + "name": "kind", + "type": 44, + "optional": false + }, + { + "name": "sections", + "type": 79, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 77, + "optional": false + }, + { + "name": "kind", + "type": 57, + "optional": false + }, + { + "name": "sections", + "type": 79, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 77, + "optional": false + }, + { + "name": "kind", + "type": 84, + "optional": false + }, + { + "name": "sections", + "type": 79, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 35, + "optional": false + }, + { + "name": "kind", + "type": 97, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "user-approval" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 77, + "optional": false + }, + { + "name": "kind", + "type": 97, + "optional": false + }, + { + "name": "sections", + "type": 79, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 77, + "optional": false + }, + { + "name": "kind", + "type": 100, + "optional": false + }, + { + "name": "sections", + "type": 79, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "dsh-session-title-llm" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 59, + "optional": false + }, + { + "name": "kind", + "type": 102, + "optional": false + }, + { + "name": "senderSessionId", + "type": 9, + "optional": false + }, + { + "name": "summary", + "type": 9, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "subagent-settled" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 104, + "optional": false + }, + { + "name": "kind", + "type": 105, + "optional": false + }, + { + "name": "senderSessionId", + "type": 9, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "relay" + }, + { + "kind": "literal", + "value": "agent-message" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 59, + "optional": false + }, + { + "name": "kind", + "type": 78, + "optional": false + }, + { + "name": "summary", + "type": 9, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 59, + "optional": false + }, + { + "name": "kind", + "type": 82, + "optional": false + }, + { + "name": "summary", + "type": 9, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 59, + "optional": false + }, + { + "name": "kind", + "type": 86, + "optional": false + }, + { + "name": "summary", + "type": 9, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 59, + "optional": false + }, + { + "name": "kind", + "type": 88, + "optional": false + }, + { + "name": "summary", + "type": 9, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 59, + "optional": false + }, + { + "name": "kind", + "type": 36, + "optional": false + }, + { + "name": "summary", + "type": 9, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 35, + "optional": false + }, + { + "name": "kind", + "type": 100, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 59, + "optional": false + }, + { + "name": "kind", + "type": 38, + "optional": false + }, + { + "name": "summary", + "type": 9, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 59, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + }, + { + "name": "summary", + "type": 9, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 59, + "optional": false + }, + { + "name": "kind", + "type": 42, + "optional": false + }, + { + "name": "summary", + "type": 9, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 59, + "optional": false + }, + { + "name": "kind", + "type": 44, + "optional": false + }, + { + "name": "summary", + "type": 9, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 59, + "optional": false + }, + { + "name": "kind", + "type": 57, + "optional": false + }, + { + "name": "summary", + "type": 9, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 69, + "optional": false + }, + { + "name": "kind", + "type": 78, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 69, + "optional": false + }, + { + "name": "kind", + "type": 82, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 69, + "optional": false + }, + { + "name": "kind", + "type": 86, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 69, + "optional": false + }, + { + "name": "kind", + "type": 88, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 69, + "optional": false + }, + { + "name": "kind", + "type": 36, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 69, + "optional": false + }, + { + "name": "kind", + "type": 38, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 69, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 69, + "optional": false + }, + { + "name": "kind", + "type": 42, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 69, + "optional": false + }, + { + "name": "kind", + "type": 44, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 59, + "optional": false + }, + { + "name": "kind", + "type": 84, + "optional": false + }, + { + "name": "summary", + "type": 9, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 69, + "optional": false + }, + { + "name": "kind", + "type": 57, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 69, + "optional": false + }, + { + "name": "kind", + "type": 84, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 69, + "optional": false + }, + { + "name": "kind", + "type": 97, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 69, + "optional": false + }, + { + "name": "kind", + "type": 100, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 104, + "optional": false + }, + { + "name": "kind", + "type": 78, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 104, + "optional": false + }, + { + "name": "kind", + "type": 82, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 104, + "optional": false + }, + { + "name": "kind", + "type": 86, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 104, + "optional": false + }, + { + "name": "kind", + "type": 88, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 104, + "optional": false + }, + { + "name": "kind", + "type": 36, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 59, + "optional": false + }, + { + "name": "kind", + "type": 97, + "optional": false + }, + { + "name": "summary", + "type": 9, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 104, + "optional": false + }, + { + "name": "kind", + "type": 38, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 104, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 104, + "optional": false + }, + { + "name": "kind", + "type": 42, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 104, + "optional": false + }, + { + "name": "kind", + "type": 44, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 104, + "optional": false + }, + { + "name": "kind", + "type": 57, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 104, + "optional": false + }, + { + "name": "kind", + "type": 84, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 104, + "optional": false + }, + { + "name": "kind", + "type": 97, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 104, + "optional": false + }, + { + "name": "kind", + "type": 100, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 64, + "optional": false + }, + { + "name": "kind", + "type": 78, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 59, + "optional": false + }, + { + "name": "kind", + "type": 100, + "optional": false + }, + { + "name": "summary", + "type": 9, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 64, + "optional": false + }, + { + "name": "kind", + "type": 82, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 64, + "optional": false + }, + { + "name": "kind", + "type": 86, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 64, + "optional": false + }, + { + "name": "kind", + "type": 88, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 64, + "optional": false + }, + { + "name": "kind", + "type": 36, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 64, + "optional": false + }, + { + "name": "kind", + "type": 38, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 64, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 64, + "optional": false + }, + { + "name": "kind", + "type": 42, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 64, + "optional": false + }, + { + "name": "kind", + "type": 44, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 64, + "optional": false + }, + { + "name": "kind", + "type": 57, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 35, + "optional": false + }, + { + "name": "kind", + "type": 78, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 64, + "optional": false + }, + { + "name": "kind", + "type": 84, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 64, + "optional": false + }, + { + "name": "kind", + "type": 97, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 64, + "optional": false + }, + { + "name": "kind", + "type": 100, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "goalId", + "type": 9, + "optional": false + }, + { + "name": "kind", + "type": 161, + "optional": false + }, + { + "name": "revision", + "type": 1, + "optional": false + }, + { + "name": "round", + "type": 1, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "goal" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 163, + "optional": false + }, + { + "name": "messageId", + "type": 9, + "optional": false + }, + { + "name": "senderId", + "type": 9, + "optional": false + }, + { + "name": "senderName", + "type": 9, + "optional": false + }, + { + "name": "teamId", + "type": 9, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "team-message" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 165, + "optional": false + }, + { + "name": "model", + "type": 9, + "optional": false + }, + { + "name": "provider", + "type": 9, + "optional": false + }, + { + "name": "replayState", + "type": 166, + "optional": true + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "model" + }, + { + "kind": "opaque", + "reason": "unknown" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 78, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 35, + "optional": false + }, + { + "name": "kind", + "type": 82, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 82, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 86, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 88, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 36, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 38, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 40, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 176, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "system-prompt" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 42, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 44, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 35, + "optional": false + }, + { + "name": "kind", + "type": 86, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 57, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 84, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 32, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 97, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 185, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "code-mode" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 187, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "cordis-host-runner" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 100, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 35, + "optional": false + }, + { + "name": "kind", + "type": 88, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "content", + "type": 6, + "optional": false + }, + { + "name": "id", + "type": 9, + "optional": false + }, + { + "name": "role", + "type": 191, + "optional": false + }, + { + "name": "source", + "type": 164, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "assistant" + }, + { + "kind": "object", + "properties": [ + { + "name": "content", + "type": 6, + "optional": false + }, + { + "name": "id", + "type": 9, + "optional": false + }, + { + "name": "role", + "type": 193, + "optional": false + }, + { + "name": "source", + "type": 175, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "system" + }, + { + "kind": "object", + "properties": [ + { + "name": "model", + "type": 9, + "optional": false + }, + { + "name": "provider", + "type": 9, + "optional": false + } + ], + "indices": [] + } + ] + }, + "names": [ + "packages/session/session-title-llm/src/index.ts#SessionTitleLlmRequestEventData" + ], + "sources": [ + "packages/session/session-title-llm/src/index.ts:34" + ] + }, { "digest": "611cae9a3539733aa0c42f66035a7d90f19dcbbdfb5d9e3b628b13705253942d", "schema": { @@ -33615,6 +44511,31 @@ "packages/llm/llm/src/types.ts:422" ] }, + { + "digest": "6292bcbedaa97feaec5b48a03bb8144b581b93309d9d6c905f26da7a6a7a0a4f", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 1, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "user-approval" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "62e6a429ff3f390a46ac39fb468692032f42936ca0db19b53454184189401379", "schema": { @@ -33913,6 +44834,35 @@ "packages/experimental/agent-team/src/types.ts:47" ] }, + { + "digest": "65a8400e451e667e5b6e34df72ceb81fca8c12330330fa72083ad40279b189ad", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 1, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "system-prompt" + } + ] + }, + "names": [ + "packages/llm/llm/src/message.ts#SystemPromptMessageSource" + ], + "sources": [ + "packages/llm/llm/src/message.ts:35" + ] + }, { "digest": "66ece68282d8c06330fb83329a24ae54c386d5ccfab296bbf18369da8beb7d14", "schema": { @@ -34266,6 +45216,20 @@ "names": [], "sources": [] }, + { + "digest": "6b23ed9ce1b397e602788dbe033693bf97642a69e23fcab1cc45bf6f13b6d619", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "literal", + "value": "compact-checkpoint" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "6bbe793f6a93dc8d50a4d4d3fbb6f8ed15650bcb7e151d28669628f7b7c3fc25", "schema": { @@ -34442,6 +45406,49 @@ "packages/core/session/src/types.ts:191" ] }, + { + "digest": "6ccb6bc423fb3952458abf9c1b1c3284208b7e660344b612cc55da773d61afe4", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + }, + { + "name": "summary", + "type": 3, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "notice" + }, + { + "kind": "literal", + "value": "user-approval" + }, + { + "kind": "primitive", + "type": "string" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "6cda0d6d3b4336d83998fe580628426df81c2afbab5d768b8813b56d569120e8", "schema": { @@ -34536,6 +45543,40 @@ "packages/preset/agent-presets/src/session.ts:28" ] }, + { + "digest": "6ea608bdc8a7a63d3d23b84c49721325094db88d136482e43a820945295eee3e", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "relay" + }, + { + "kind": "literal", + "value": "hooks-claude-code" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "6ebcc2dbec9f2dabca9f668ae6d39e877899b180740570f453409db339221df3", "schema": { @@ -34675,6 +45716,40 @@ "packages/context/agent-instructions/src/state.ts:37" ] }, + { + "digest": "6f44f32be9bcd9a8bf075c3b575b06c8ed63446386e5b0995c7b73762e68ddae", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "instructions" + }, + { + "kind": "literal", + "value": "repeat-tool-reminder" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "6f611bed14b2106542480c4a230b4a83baf76dc0d8ac0cd13319a7cb8dae7675", "schema": { @@ -34737,1096 +45812,6 @@ "packages/llm/llm-retry/src/types.ts:43" ] }, - { - "digest": "6f87000576a13d73867248c97e55c4ebe3cb3ee55ee3bd1282f26e7f40dd81c8", - "schema": { - "root": 0, - "nodes": [ - { - "kind": "object", - "properties": [ - { - "name": "inserted", - "type": 1, - "optional": false - }, - { - "name": "outcome", - "type": 83, - "optional": true - }, - { - "name": "removedCount", - "type": 10, - "optional": true - }, - { - "name": "start", - "type": 10, - "optional": false - }, - { - "name": "target", - "type": 84, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "array", - "element": 2 - }, - { - "kind": "object", - "properties": [ - { - "name": "content", - "type": 3, - "optional": false - }, - { - "name": "id", - "type": 6, - "optional": false - }, - { - "name": "role", - "type": 26, - "optional": false - }, - { - "name": "source", - "type": 27, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "array", - "element": 4 - }, - { - "kind": "union", - "types": [ - 5, - 8, - 19, - 22, - 24 - ] - }, - { - "kind": "object", - "properties": [ - { - "name": "arguments", - "type": 6, - "optional": false - }, - { - "name": "id", - "type": 6, - "optional": false - }, - { - "name": "name", - "type": 6, - "optional": false - }, - { - "name": "type", - "type": 7, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "primitive", - "type": "string" - }, - { - "kind": "literal", - "value": "tool-call" - }, - { - "kind": "object", - "properties": [ - { - "name": "attachment", - "type": 9, - "optional": false - }, - { - "name": "offloaded", - "type": 17, - "optional": true - }, - { - "name": "type", - "type": 18, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "attachmentId", - "type": 6, - "optional": false - }, - { - "name": "bytes", - "type": 10, - "optional": false - }, - { - "name": "height", - "type": 10, - "optional": false - }, - { - "name": "mediaType", - "type": 11, - "optional": false - }, - { - "name": "name", - "type": 6, - "optional": true - }, - { - "name": "originalDimensions", - "type": 16, - "optional": true - }, - { - "name": "width", - "type": 10, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "primitive", - "type": "number" - }, - { - "kind": "union", - "types": [ - 12, - 13, - 14, - 15 - ] - }, - { - "kind": "literal", - "value": "image/png" - }, - { - "kind": "literal", - "value": "image/webp" - }, - { - "kind": "literal", - "value": "image/gif" - }, - { - "kind": "literal", - "value": "image/jpeg" - }, - { - "kind": "object", - "properties": [ - { - "name": "height", - "type": 10, - "optional": false - }, - { - "name": "width", - "type": 10, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": true - }, - { - "kind": "literal", - "value": "image" - }, - { - "kind": "object", - "properties": [ - { - "name": "attachment", - "type": 20, - "optional": false - }, - { - "name": "type", - "type": 21, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "attachmentId", - "type": 6, - "optional": false - }, - { - "name": "bytes", - "type": 10, - "optional": false - }, - { - "name": "name", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "file" - }, - { - "kind": "object", - "properties": [ - { - "name": "text", - "type": 6, - "optional": false - }, - { - "name": "type", - "type": 23, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "reasoning" - }, - { - "kind": "object", - "properties": [ - { - "name": "text", - "type": 6, - "optional": false - }, - { - "name": "type", - "type": 25, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "text" - }, - { - "kind": "literal", - "value": "user" - }, - { - "kind": "union", - "types": [ - 28, - 37, - 39, - 40, - 43, - 48, - 50, - 55, - 56, - 57, - 59, - 61, - 62, - 70, - 72, - 74, - 76, - 78, - 81, - 82 - ] - }, - { - "kind": "object", - "properties": [ - { - "name": "baseline", - "type": 17, - "optional": true - }, - { - "name": "baselineIdentity", - "type": 6, - "optional": true - }, - { - "name": "changes", - "type": 29, - "optional": false - }, - { - "name": "form", - "type": 35, - "optional": false - }, - { - "name": "kind", - "type": 36, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "array", - "element": 30 - }, - { - "kind": "object", - "properties": [ - { - "name": "action", - "type": 31, - "optional": false - }, - { - "name": "digest", - "type": 6, - "optional": true - }, - { - "name": "path", - "type": 6, - "optional": false - }, - { - "name": "scope", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "union", - "types": [ - 32, - 33, - 34 - ] - }, - { - "kind": "literal", - "value": "remove" - }, - { - "kind": "literal", - "value": "replace" - }, - { - "kind": "literal", - "value": "set" - }, - { - "kind": "literal", - "value": "instructions" - }, - { - "kind": "literal", - "value": "agent-instructions" - }, - { - "kind": "object", - "properties": [ - { - "name": "callId", - "type": 6, - "optional": false - }, - { - "name": "kind", - "type": 38, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "tool" - }, - { - "kind": "object", - "properties": [ - { - "name": "clientTimeZone", - "type": 6, - "optional": true - }, - { - "name": "kind", - "type": 26, - "optional": false - }, - { - "name": "rpcId", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "deliveryId", - "type": 6, - "optional": false - }, - { - "name": "form", - "type": 41, - "optional": false - }, - { - "name": "kind", - "type": 42, - "optional": false - }, - { - "name": "provider", - "type": 6, - "optional": false - }, - { - "name": "ruleId", - "type": 6, - "optional": false - }, - { - "name": "source", - "type": 6, - "optional": false - }, - { - "name": "summary", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "notice" - }, - { - "kind": "literal", - "value": "webhook" - }, - { - "kind": "object", - "properties": [ - { - "name": "entries", - "type": 44, - "optional": false - }, - { - "name": "form", - "type": 46, - "optional": false - }, - { - "name": "kind", - "type": 47, - "optional": false - }, - { - "name": "update", - "type": 17, - "optional": true - } - ], - "indices": [] - }, - { - "kind": "array", - "element": 45 - }, - { - "kind": "object", - "properties": [ - { - "name": "description", - "type": 6, - "optional": false - }, - { - "name": "name", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "catalog" - }, - { - "kind": "literal", - "value": "skill-catalog" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 35, - "optional": false - }, - { - "name": "kind", - "type": 49, - "optional": false - }, - { - "name": "name", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "skill-invocation" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 51, - "optional": false - }, - { - "name": "kind", - "type": 52, - "optional": false - }, - { - "name": "plugin", - "type": 6, - "optional": false - }, - { - "name": "sections", - "type": 53, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "snapshot" - }, - { - "kind": "literal", - "value": "plugin" - }, - { - "kind": "array", - "element": 54 - }, - { - "kind": "object", - "properties": [ - { - "name": "name", - "type": 6, - "optional": false - }, - { - "name": "text", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 41, - "optional": false - }, - { - "name": "kind", - "type": 52, - "optional": false - }, - { - "name": "plugin", - "type": 6, - "optional": false - }, - { - "name": "summary", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 35, - "optional": false - }, - { - "name": "kind", - "type": 52, - "optional": false - }, - { - "name": "plugin", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 58, - "optional": false - }, - { - "name": "kind", - "type": 52, - "optional": false - }, - { - "name": "plugin", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "recall" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 60, - "optional": false - }, - { - "name": "kind", - "type": 52, - "optional": false - }, - { - "name": "plugin", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "relay" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 46, - "optional": false - }, - { - "name": "kind", - "type": 52, - "optional": false - }, - { - "name": "plugin", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 58, - "optional": false - }, - { - "name": "kind", - "type": 63, - "optional": false - }, - { - "name": "references", - "type": 64, - "optional": false - }, - { - "name": "version", - "type": 69, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "session-reference" - }, - { - "kind": "array", - "element": 65 - }, - { - "kind": "object", - "properties": [ - { - "name": "capturedFormatVersion", - "type": 10, - "optional": true - }, - { - "name": "capturedThroughSeq", - "type": 66, - "optional": false - }, - { - "name": "compacted", - "type": 68, - "optional": false - }, - { - "name": "inputIndex", - "type": 10, - "optional": false - }, - { - "name": "label", - "type": 6, - "optional": false - }, - { - "name": "omittedBytes", - "type": 10, - "optional": false - }, - { - "name": "omittedMessages", - "type": 10, - "optional": false - }, - { - "name": "originalMessages", - "type": 10, - "optional": false - }, - { - "name": "retainedMessages", - "type": 10, - "optional": false - }, - { - "name": "sessionId", - "type": 6, - "optional": false - }, - { - "name": "truncated", - "type": 68, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "union", - "types": [ - 10, - 67 - ] - }, - { - "kind": "primitive", - "type": "null" - }, - { - "kind": "primitive", - "type": "boolean" - }, - { - "kind": "literal", - "value": 1 - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 41, - "optional": false - }, - { - "name": "kind", - "type": 71, - "optional": false - }, - { - "name": "senderSessionId", - "type": 6, - "optional": false - }, - { - "name": "summary", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "subagent-settled" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 60, - "optional": false - }, - { - "name": "kind", - "type": 73, - "optional": false - }, - { - "name": "senderSessionId", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "agent-message" - }, - { - "kind": "object", - "properties": [ - { - "name": "goalId", - "type": 6, - "optional": false - }, - { - "name": "kind", - "type": 75, - "optional": false - }, - { - "name": "revision", - "type": 10, - "optional": false - }, - { - "name": "round", - "type": 10, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "goal" - }, - { - "kind": "object", - "properties": [ - { - "name": "kind", - "type": 77, - "optional": false - }, - { - "name": "messageId", - "type": 6, - "optional": false - }, - { - "name": "senderId", - "type": 6, - "optional": false - }, - { - "name": "senderName", - "type": 6, - "optional": false - }, - { - "name": "teamId", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "team-message" - }, - { - "kind": "object", - "properties": [ - { - "name": "kind", - "type": 79, - "optional": false - }, - { - "name": "model", - "type": 6, - "optional": false - }, - { - "name": "provider", - "type": 6, - "optional": false - }, - { - "name": "replayState", - "type": 80, - "optional": true - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "model" - }, - { - "kind": "opaque", - "reason": "unknown" - }, - { - "kind": "object", - "properties": [ - { - "name": "kind", - "type": 52, - "optional": false - }, - { - "name": "plugin", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "kind", - "type": 26, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "canceled" - }, - { - "kind": "union", - "types": [ - 85, - 86 - ] - }, - { - "kind": "literal", - "value": "next-step" - }, - { - "kind": "literal", - "value": "next-turn" - } - ] - }, - "names": [], - "sources": [ - "packages/core/agent/src/types.ts:87" - ] - }, { "digest": "6f9e00383836275e46c0a9915767f9bb561be5fc30aae490174908a93e99a912", "schema": { @@ -35855,1044 +45840,6 @@ "names": [], "sources": [] }, - { - "digest": "71225015514ed0439df95fc6e55719e1fa30bd205b99a7eefb7e18152be835ea", - "schema": { - "root": 0, - "nodes": [ - { - "kind": "array", - "element": 1 - }, - { - "kind": "object", - "properties": [ - { - "name": "content", - "type": 2, - "optional": false - }, - { - "name": "id", - "type": 5, - "optional": false - }, - { - "name": "role", - "type": 25, - "optional": false - }, - { - "name": "source", - "type": 26, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "array", - "element": 3 - }, - { - "kind": "union", - "types": [ - 4, - 7, - 18, - 21, - 23 - ] - }, - { - "kind": "object", - "properties": [ - { - "name": "arguments", - "type": 5, - "optional": false - }, - { - "name": "id", - "type": 5, - "optional": false - }, - { - "name": "name", - "type": 5, - "optional": false - }, - { - "name": "type", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "primitive", - "type": "string" - }, - { - "kind": "literal", - "value": "tool-call" - }, - { - "kind": "object", - "properties": [ - { - "name": "attachment", - "type": 8, - "optional": false - }, - { - "name": "offloaded", - "type": 16, - "optional": true - }, - { - "name": "type", - "type": 17, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "attachmentId", - "type": 5, - "optional": false - }, - { - "name": "bytes", - "type": 9, - "optional": false - }, - { - "name": "height", - "type": 9, - "optional": false - }, - { - "name": "mediaType", - "type": 10, - "optional": false - }, - { - "name": "name", - "type": 5, - "optional": true - }, - { - "name": "originalDimensions", - "type": 15, - "optional": true - }, - { - "name": "width", - "type": 9, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "primitive", - "type": "number" - }, - { - "kind": "union", - "types": [ - 11, - 12, - 13, - 14 - ] - }, - { - "kind": "literal", - "value": "image/webp" - }, - { - "kind": "literal", - "value": "image/gif" - }, - { - "kind": "literal", - "value": "image/jpeg" - }, - { - "kind": "literal", - "value": "image/png" - }, - { - "kind": "object", - "properties": [ - { - "name": "height", - "type": 9, - "optional": false - }, - { - "name": "width", - "type": 9, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": true - }, - { - "kind": "literal", - "value": "image" - }, - { - "kind": "object", - "properties": [ - { - "name": "attachment", - "type": 19, - "optional": false - }, - { - "name": "type", - "type": 20, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "attachmentId", - "type": 5, - "optional": false - }, - { - "name": "bytes", - "type": 9, - "optional": false - }, - { - "name": "name", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "file" - }, - { - "kind": "object", - "properties": [ - { - "name": "text", - "type": 5, - "optional": false - }, - { - "name": "type", - "type": 22, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "reasoning" - }, - { - "kind": "object", - "properties": [ - { - "name": "text", - "type": 5, - "optional": false - }, - { - "name": "type", - "type": 24, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "text" - }, - { - "kind": "literal", - "value": "user" - }, - { - "kind": "union", - "types": [ - 27, - 36, - 38, - 39, - 42, - 47, - 49, - 54, - 55, - 56, - 58, - 60, - 61, - 69, - 71, - 73, - 75, - 77, - 80, - 81 - ] - }, - { - "kind": "object", - "properties": [ - { - "name": "baseline", - "type": 16, - "optional": true - }, - { - "name": "baselineIdentity", - "type": 5, - "optional": true - }, - { - "name": "changes", - "type": 28, - "optional": false - }, - { - "name": "form", - "type": 34, - "optional": false - }, - { - "name": "kind", - "type": 35, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "array", - "element": 29 - }, - { - "kind": "object", - "properties": [ - { - "name": "action", - "type": 30, - "optional": false - }, - { - "name": "digest", - "type": 5, - "optional": true - }, - { - "name": "path", - "type": 5, - "optional": false - }, - { - "name": "scope", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "union", - "types": [ - 31, - 32, - 33 - ] - }, - { - "kind": "literal", - "value": "remove" - }, - { - "kind": "literal", - "value": "replace" - }, - { - "kind": "literal", - "value": "set" - }, - { - "kind": "literal", - "value": "instructions" - }, - { - "kind": "literal", - "value": "agent-instructions" - }, - { - "kind": "object", - "properties": [ - { - "name": "callId", - "type": 5, - "optional": false - }, - { - "name": "kind", - "type": 37, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "tool" - }, - { - "kind": "object", - "properties": [ - { - "name": "clientTimeZone", - "type": 5, - "optional": true - }, - { - "name": "kind", - "type": 25, - "optional": false - }, - { - "name": "rpcId", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "deliveryId", - "type": 5, - "optional": false - }, - { - "name": "form", - "type": 40, - "optional": false - }, - { - "name": "kind", - "type": 41, - "optional": false - }, - { - "name": "provider", - "type": 5, - "optional": false - }, - { - "name": "ruleId", - "type": 5, - "optional": false - }, - { - "name": "source", - "type": 5, - "optional": false - }, - { - "name": "summary", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "notice" - }, - { - "kind": "literal", - "value": "webhook" - }, - { - "kind": "object", - "properties": [ - { - "name": "entries", - "type": 43, - "optional": false - }, - { - "name": "form", - "type": 45, - "optional": false - }, - { - "name": "kind", - "type": 46, - "optional": false - }, - { - "name": "update", - "type": 16, - "optional": true - } - ], - "indices": [] - }, - { - "kind": "array", - "element": 44 - }, - { - "kind": "object", - "properties": [ - { - "name": "description", - "type": 5, - "optional": false - }, - { - "name": "name", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "catalog" - }, - { - "kind": "literal", - "value": "skill-catalog" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 34, - "optional": false - }, - { - "name": "kind", - "type": 48, - "optional": false - }, - { - "name": "name", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "skill-invocation" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 50, - "optional": false - }, - { - "name": "kind", - "type": 51, - "optional": false - }, - { - "name": "plugin", - "type": 5, - "optional": false - }, - { - "name": "sections", - "type": 52, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "snapshot" - }, - { - "kind": "literal", - "value": "plugin" - }, - { - "kind": "array", - "element": 53 - }, - { - "kind": "object", - "properties": [ - { - "name": "name", - "type": 5, - "optional": false - }, - { - "name": "text", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 40, - "optional": false - }, - { - "name": "kind", - "type": 51, - "optional": false - }, - { - "name": "plugin", - "type": 5, - "optional": false - }, - { - "name": "summary", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 34, - "optional": false - }, - { - "name": "kind", - "type": 51, - "optional": false - }, - { - "name": "plugin", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 57, - "optional": false - }, - { - "name": "kind", - "type": 51, - "optional": false - }, - { - "name": "plugin", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "recall" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 59, - "optional": false - }, - { - "name": "kind", - "type": 51, - "optional": false - }, - { - "name": "plugin", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "relay" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 45, - "optional": false - }, - { - "name": "kind", - "type": 51, - "optional": false - }, - { - "name": "plugin", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 57, - "optional": false - }, - { - "name": "kind", - "type": 62, - "optional": false - }, - { - "name": "references", - "type": 63, - "optional": false - }, - { - "name": "version", - "type": 68, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "session-reference" - }, - { - "kind": "array", - "element": 64 - }, - { - "kind": "object", - "properties": [ - { - "name": "capturedFormatVersion", - "type": 9, - "optional": true - }, - { - "name": "capturedThroughSeq", - "type": 65, - "optional": false - }, - { - "name": "compacted", - "type": 67, - "optional": false - }, - { - "name": "inputIndex", - "type": 9, - "optional": false - }, - { - "name": "label", - "type": 5, - "optional": false - }, - { - "name": "omittedBytes", - "type": 9, - "optional": false - }, - { - "name": "omittedMessages", - "type": 9, - "optional": false - }, - { - "name": "originalMessages", - "type": 9, - "optional": false - }, - { - "name": "retainedMessages", - "type": 9, - "optional": false - }, - { - "name": "sessionId", - "type": 5, - "optional": false - }, - { - "name": "truncated", - "type": 67, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "union", - "types": [ - 9, - 66 - ] - }, - { - "kind": "primitive", - "type": "null" - }, - { - "kind": "primitive", - "type": "boolean" - }, - { - "kind": "literal", - "value": 1 - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 40, - "optional": false - }, - { - "name": "kind", - "type": 70, - "optional": false - }, - { - "name": "senderSessionId", - "type": 5, - "optional": false - }, - { - "name": "summary", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "subagent-settled" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 59, - "optional": false - }, - { - "name": "kind", - "type": 72, - "optional": false - }, - { - "name": "senderSessionId", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "agent-message" - }, - { - "kind": "object", - "properties": [ - { - "name": "goalId", - "type": 5, - "optional": false - }, - { - "name": "kind", - "type": 74, - "optional": false - }, - { - "name": "revision", - "type": 9, - "optional": false - }, - { - "name": "round", - "type": 9, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "goal" - }, - { - "kind": "object", - "properties": [ - { - "name": "kind", - "type": 76, - "optional": false - }, - { - "name": "messageId", - "type": 5, - "optional": false - }, - { - "name": "senderId", - "type": 5, - "optional": false - }, - { - "name": "senderName", - "type": 5, - "optional": false - }, - { - "name": "teamId", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "team-message" - }, - { - "kind": "object", - "properties": [ - { - "name": "kind", - "type": 78, - "optional": false - }, - { - "name": "model", - "type": 5, - "optional": false - }, - { - "name": "provider", - "type": 5, - "optional": false - }, - { - "name": "replayState", - "type": 79, - "optional": true - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "model" - }, - { - "kind": "opaque", - "reason": "unknown" - }, - { - "kind": "object", - "properties": [ - { - "name": "kind", - "type": 51, - "optional": false - }, - { - "name": "plugin", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "kind", - "type": 25, - "optional": false - } - ], - "indices": [] - } - ] - }, - "names": [], - "sources": [] - }, { "digest": "7180844e1066230c5e891f1b9ccd942423b0fe48aac6ded7eef2a285b288a732", "schema": { @@ -37757,6 +46704,74 @@ "names": [], "sources": [] }, + { + "digest": "7554565be416b0342053ee6a46256c9dab07c487349b4a5f10bab1edc151c619", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "recall" + }, + { + "kind": "literal", + "value": "tool-goal" + } + ] + }, + "names": [], + "sources": [] + }, + { + "digest": "756b5e23a5cb2c7f486f366a828f7461c88902af21125bd6810881f4ccbff6cc", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "recall" + }, + { + "kind": "literal", + "value": "time-context" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "75f1d59512dd2e6468bed27c6203a721b116ef7869e291e3fee34c977d013185", "schema": { @@ -38417,6 +47432,20 @@ "names": [], "sources": [] }, + { + "digest": "78a9be340090b735a39980e7222ce730c972fbcf1de7c9e0aef2125884b7caee", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "literal", + "value": "tmux-context" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "79650cfa10aa3c52440328d85e8a25f0ffadc8d7efd784e3c0819d8bb74a1985", "schema": { @@ -38574,6 +47603,2361 @@ "names": [], "sources": [] }, + { + "digest": "7aae986884b7f69068d9f9d7d77910a0dbe2b265843a041576877eb1bc01f31e", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "union", + "types": [ + 1, + 4, + 6, + 8, + 10, + 12, + 15, + 17, + 19, + 21, + 23, + 25, + 27, + 29, + 30, + 31, + 32, + 33, + 34, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 52, + 54, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 65, + 66, + 67, + 68, + 69, + 71, + 72, + 74, + 76, + 77, + 78, + 88, + 90, + 91, + 93, + 96, + 100, + 102, + 110, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 128, + 130, + 131, + 132, + 133, + 134, + 135, + 136, + 137, + 138, + 139, + 140, + 141, + 142, + 143, + 144, + 145, + 146, + 147, + 148, + 149, + 150, + 151, + 152, + 153, + 154, + 155, + 156, + 157, + 158, + 159, + 160, + 161, + 162, + 163 + ] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 2, + "optional": false + }, + { + "name": "kind", + "type": 3, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "recall" + }, + { + "kind": "literal", + "value": "tool-goal" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 2, + "optional": false + }, + { + "name": "kind", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tool-jobs" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 2, + "optional": false + }, + { + "name": "kind", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "user-approval" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 2, + "optional": false + }, + { + "name": "kind", + "type": 9, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "dsh-session-title-llm" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 2, + "optional": false + }, + { + "name": "kind", + "type": 11, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "hooks-claude-code" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 13, + "optional": false + }, + { + "name": "kind", + "type": 14, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "relay" + }, + { + "kind": "literal", + "value": "hooks-codex" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 13, + "optional": false + }, + { + "name": "kind", + "type": 16, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "model-selection" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 13, + "optional": false + }, + { + "name": "kind", + "type": 18, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "plan-mode" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 13, + "optional": false + }, + { + "name": "kind", + "type": 20, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "repeat-tool-reminder" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 13, + "optional": false + }, + { + "name": "kind", + "type": 22, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "runtime-context" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 13, + "optional": false + }, + { + "name": "kind", + "type": 24, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "schedule" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 13, + "optional": false + }, + { + "name": "kind", + "type": 26, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "time-context" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 13, + "optional": false + }, + { + "name": "kind", + "type": 28, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tmux-context" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 13, + "optional": false + }, + { + "name": "kind", + "type": 3, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 13, + "optional": false + }, + { + "name": "kind", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 13, + "optional": false + }, + { + "name": "kind", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 13, + "optional": false + }, + { + "name": "kind", + "type": 9, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 13, + "optional": false + }, + { + "name": "kind", + "type": 11, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 35, + "optional": false + }, + { + "name": "kind", + "type": 14, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "catalog" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 35, + "optional": false + }, + { + "name": "kind", + "type": 16, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 35, + "optional": false + }, + { + "name": "kind", + "type": 18, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 35, + "optional": false + }, + { + "name": "kind", + "type": 20, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 35, + "optional": false + }, + { + "name": "kind", + "type": 22, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 35, + "optional": false + }, + { + "name": "kind", + "type": 24, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 35, + "optional": false + }, + { + "name": "kind", + "type": 26, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 35, + "optional": false + }, + { + "name": "kind", + "type": 28, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 35, + "optional": false + }, + { + "name": "kind", + "type": 3, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 35, + "optional": false + }, + { + "name": "kind", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 35, + "optional": false + }, + { + "name": "kind", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 35, + "optional": false + }, + { + "name": "kind", + "type": 9, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 35, + "optional": false + }, + { + "name": "kind", + "type": 11, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "goalId", + "type": 49, + "optional": false + }, + { + "name": "kind", + "type": 50, + "optional": false + }, + { + "name": "revision", + "type": 51, + "optional": false + }, + { + "name": "round", + "type": 51, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "primitive", + "type": "string" + }, + { + "kind": "literal", + "value": "goal" + }, + { + "kind": "primitive", + "type": "number" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 53, + "optional": false + }, + { + "name": "messageId", + "type": 49, + "optional": false + }, + { + "name": "senderId", + "type": 49, + "optional": false + }, + { + "name": "senderName", + "type": 49, + "optional": false + }, + { + "name": "teamId", + "type": 49, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "team-message" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 55, + "optional": false + }, + { + "name": "model", + "type": 49, + "optional": false + }, + { + "name": "provider", + "type": 49, + "optional": false + }, + { + "name": "replayState", + "type": 56, + "optional": true + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "model" + }, + { + "kind": "opaque", + "reason": "unknown" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 14, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 16, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 18, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 20, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 22, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 24, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 64, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "system-prompt" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 26, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 28, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 3, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 70, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "user" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 73, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "code-mode" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 75, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "cordis-host-runner" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 9, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 11, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "baseline", + "type": 79, + "optional": true + }, + { + "name": "baselineIdentity", + "type": 49, + "optional": true + }, + { + "name": "changes", + "type": 80, + "optional": false + }, + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 87, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": true + }, + { + "kind": "array", + "element": 81 + }, + { + "kind": "object", + "properties": [ + { + "name": "action", + "type": 82, + "optional": false + }, + { + "name": "digest", + "type": 49, + "optional": true + }, + { + "name": "path", + "type": 49, + "optional": false + }, + { + "name": "scope", + "type": 49, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "union", + "types": [ + 83, + 84, + 85 + ] + }, + { + "kind": "literal", + "value": "remove" + }, + { + "kind": "literal", + "value": "replace" + }, + { + "kind": "literal", + "value": "set" + }, + { + "kind": "literal", + "value": "instructions" + }, + { + "kind": "literal", + "value": "agent-instructions" + }, + { + "kind": "object", + "properties": [ + { + "name": "callId", + "type": 49, + "optional": false + }, + { + "name": "kind", + "type": 89, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tool" + }, + { + "kind": "object", + "properties": [ + { + "name": "clientTimeZone", + "type": 49, + "optional": true + }, + { + "name": "kind", + "type": 70, + "optional": false + }, + { + "name": "rpcId", + "type": 49, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "compactionId", + "type": 49, + "optional": false + }, + { + "name": "kind", + "type": 92, + "optional": false + }, + { + "name": "sourceCommandId", + "type": 49, + "optional": true + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "compact-checkpoint" + }, + { + "kind": "object", + "properties": [ + { + "name": "deliveryId", + "type": 49, + "optional": false + }, + { + "name": "form", + "type": 94, + "optional": false + }, + { + "name": "kind", + "type": 95, + "optional": false + }, + { + "name": "provider", + "type": 49, + "optional": false + }, + { + "name": "ruleId", + "type": 49, + "optional": false + }, + { + "name": "source", + "type": 49, + "optional": false + }, + { + "name": "summary", + "type": 49, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "notice" + }, + { + "kind": "literal", + "value": "webhook" + }, + { + "kind": "object", + "properties": [ + { + "name": "entries", + "type": 97, + "optional": false + }, + { + "name": "form", + "type": 35, + "optional": false + }, + { + "name": "kind", + "type": 99, + "optional": false + }, + { + "name": "update", + "type": 79, + "optional": true + } + ], + "indices": [] + }, + { + "kind": "array", + "element": 98 + }, + { + "kind": "object", + "properties": [ + { + "name": "description", + "type": 49, + "optional": false + }, + { + "name": "name", + "type": 49, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "skill-catalog" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 101, + "optional": false + }, + { + "name": "name", + "type": 49, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "skill-invocation" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 2, + "optional": false + }, + { + "name": "kind", + "type": 103, + "optional": false + }, + { + "name": "references", + "type": 104, + "optional": false + }, + { + "name": "version", + "type": 109, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "session-reference" + }, + { + "kind": "array", + "element": 105 + }, + { + "kind": "object", + "properties": [ + { + "name": "capturedFormatVersion", + "type": 51, + "optional": true + }, + { + "name": "capturedThroughSeq", + "type": 106, + "optional": false + }, + { + "name": "compacted", + "type": 108, + "optional": false + }, + { + "name": "inputIndex", + "type": 51, + "optional": false + }, + { + "name": "label", + "type": 49, + "optional": false + }, + { + "name": "omittedBytes", + "type": 51, + "optional": false + }, + { + "name": "omittedMessages", + "type": 51, + "optional": false + }, + { + "name": "originalMessages", + "type": 51, + "optional": false + }, + { + "name": "retainedMessages", + "type": 51, + "optional": false + }, + { + "name": "sessionId", + "type": 49, + "optional": false + }, + { + "name": "truncated", + "type": 108, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "union", + "types": [ + 51, + 107 + ] + }, + { + "kind": "primitive", + "type": "null" + }, + { + "kind": "primitive", + "type": "boolean" + }, + { + "kind": "literal", + "value": 1 + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 111, + "optional": false + }, + { + "name": "kind", + "type": 14, + "optional": false + }, + { + "name": "sections", + "type": 112, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "snapshot" + }, + { + "kind": "array", + "element": 113 + }, + { + "kind": "object", + "properties": [ + { + "name": "name", + "type": 49, + "optional": false + }, + { + "name": "text", + "type": 49, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 111, + "optional": false + }, + { + "name": "kind", + "type": 16, + "optional": false + }, + { + "name": "sections", + "type": 112, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 111, + "optional": false + }, + { + "name": "kind", + "type": 18, + "optional": false + }, + { + "name": "sections", + "type": 112, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 111, + "optional": false + }, + { + "name": "kind", + "type": 20, + "optional": false + }, + { + "name": "sections", + "type": 112, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 111, + "optional": false + }, + { + "name": "kind", + "type": 22, + "optional": false + }, + { + "name": "sections", + "type": 112, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 111, + "optional": false + }, + { + "name": "kind", + "type": 24, + "optional": false + }, + { + "name": "sections", + "type": 112, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 111, + "optional": false + }, + { + "name": "kind", + "type": 26, + "optional": false + }, + { + "name": "sections", + "type": 112, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 111, + "optional": false + }, + { + "name": "kind", + "type": 28, + "optional": false + }, + { + "name": "sections", + "type": 112, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 111, + "optional": false + }, + { + "name": "kind", + "type": 3, + "optional": false + }, + { + "name": "sections", + "type": 112, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 111, + "optional": false + }, + { + "name": "kind", + "type": 5, + "optional": false + }, + { + "name": "sections", + "type": 112, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 111, + "optional": false + }, + { + "name": "kind", + "type": 7, + "optional": false + }, + { + "name": "sections", + "type": 112, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 111, + "optional": false + }, + { + "name": "kind", + "type": 9, + "optional": false + }, + { + "name": "sections", + "type": 112, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 111, + "optional": false + }, + { + "name": "kind", + "type": 11, + "optional": false + }, + { + "name": "sections", + "type": 112, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 94, + "optional": false + }, + { + "name": "kind", + "type": 127, + "optional": false + }, + { + "name": "senderSessionId", + "type": 49, + "optional": false + }, + { + "name": "summary", + "type": 49, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "subagent-settled" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 13, + "optional": false + }, + { + "name": "kind", + "type": 129, + "optional": false + }, + { + "name": "senderSessionId", + "type": 49, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "agent-message" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 94, + "optional": false + }, + { + "name": "kind", + "type": 14, + "optional": false + }, + { + "name": "summary", + "type": 49, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 94, + "optional": false + }, + { + "name": "kind", + "type": 16, + "optional": false + }, + { + "name": "summary", + "type": 49, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 94, + "optional": false + }, + { + "name": "kind", + "type": 18, + "optional": false + }, + { + "name": "summary", + "type": 49, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 94, + "optional": false + }, + { + "name": "kind", + "type": 20, + "optional": false + }, + { + "name": "summary", + "type": 49, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 94, + "optional": false + }, + { + "name": "kind", + "type": 22, + "optional": false + }, + { + "name": "summary", + "type": 49, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 94, + "optional": false + }, + { + "name": "kind", + "type": 24, + "optional": false + }, + { + "name": "summary", + "type": 49, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 94, + "optional": false + }, + { + "name": "kind", + "type": 26, + "optional": false + }, + { + "name": "summary", + "type": 49, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 94, + "optional": false + }, + { + "name": "kind", + "type": 28, + "optional": false + }, + { + "name": "summary", + "type": 49, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 94, + "optional": false + }, + { + "name": "kind", + "type": 3, + "optional": false + }, + { + "name": "summary", + "type": 49, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 94, + "optional": false + }, + { + "name": "kind", + "type": 5, + "optional": false + }, + { + "name": "summary", + "type": 49, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 94, + "optional": false + }, + { + "name": "kind", + "type": 7, + "optional": false + }, + { + "name": "summary", + "type": 49, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 94, + "optional": false + }, + { + "name": "kind", + "type": 9, + "optional": false + }, + { + "name": "summary", + "type": 49, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 94, + "optional": false + }, + { + "name": "kind", + "type": 11, + "optional": false + }, + { + "name": "summary", + "type": 49, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 14, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 16, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 18, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 20, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 22, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 24, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 26, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 28, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 3, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 9, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 86, + "optional": false + }, + { + "name": "kind", + "type": 11, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 2, + "optional": false + }, + { + "name": "kind", + "type": 14, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 2, + "optional": false + }, + { + "name": "kind", + "type": 16, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 2, + "optional": false + }, + { + "name": "kind", + "type": 18, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 2, + "optional": false + }, + { + "name": "kind", + "type": 20, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 2, + "optional": false + }, + { + "name": "kind", + "type": 22, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 2, + "optional": false + }, + { + "name": "kind", + "type": 24, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 2, + "optional": false + }, + { + "name": "kind", + "type": 26, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 2, + "optional": false + }, + { + "name": "kind", + "type": 28, + "optional": false + } + ], + "indices": [] + } + ] + }, + "names": [ + "packages/llm/llm/src/message.ts#MessageSource" + ], + "sources": [ + "packages/llm/llm/src/message.ts:136" + ] + }, { "digest": "7af85bf70d4eafce63e739adae38ea85501e68df3a0e22f97f3a0be90fd9e4cb", "schema": { @@ -39008,6 +50392,74 @@ "packages/feedback/command-feedback/src/types.ts:27" ] }, + { + "digest": "7df62978a2b7de8540e714152297743e0a622209a46a5ac9513fc0fad73ca23b", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "catalog" + }, + { + "kind": "literal", + "value": "tmux-context" + } + ] + }, + "names": [], + "sources": [] + }, + { + "digest": "7eaef7a763ba5b949b8464bc8add8980a3a5ab566014b69787aeba71e5dfe07b", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "relay" + }, + { + "kind": "literal", + "value": "dsh-session-title-llm" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "7f13860ee89a2d35ce09f958e85a04566cd59cb1de1d73a9619a9b631961dc71", "schema": { @@ -39275,6 +50727,54 @@ "packages/goal/goal/src/domain.ts:47" ] }, + { + "digest": "80677c8c8b804189a0fde8aa70dd4ad7af8bb12dfd03027e8e023c8592c838bc", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "catalog" + }, + { + "kind": "literal", + "value": "dsh-session-title-llm" + } + ] + }, + "names": [], + "sources": [] + }, + { + "digest": "8067b0d232c350f189738e60ee3c9939d46ca3b32b45db5525237b077893f649", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "literal", + "value": "time-context" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "811229eedcec57979dbadca7dbea832a59f8580cff30cb217fca5e2da16314bd", "schema": { @@ -39341,6 +50841,40 @@ "names": [], "sources": [] }, + { + "digest": "825ca23416b1ea9d81442afead5cf9229a6fa05842f042135cc3aa9710a6a2d8", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "catalog" + }, + { + "kind": "literal", + "value": "user-approval" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "829a2fb3be6efd4ba36aef8ed2d381a4c6fb2a0aaf50c823a6f3f8290786b809", "schema": { @@ -39387,6 +50921,49 @@ "packages/skill/tool-skill/src/index.ts:40" ] }, + { + "digest": "8338ee303e2bd448e9e6144069942f63e3cfd5868962bddc9347d7009e8919d6", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + }, + { + "name": "summary", + "type": 3, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "notice" + }, + { + "kind": "literal", + "value": "dsh-session-title-llm" + }, + { + "kind": "primitive", + "type": "string" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "83da72c6857601c75da11212ef847f57d457b9c99f0a82246dcdff3e26700239", "schema": { @@ -39715,7 +51292,7 @@ ] }, { - "digest": "85e1bd563d6c80c1f377f99f91103fec4e315148a7330f3b3dae7c2d04e33b01", + "digest": "854db3efdfb0cd39d30953b28703e519c121f1115cebfffc40369fe86c406dd1", "schema": { "root": 0, "nodes": [ @@ -39733,24 +51310,92 @@ "optional": false }, { - "name": "plugin", + "name": "summary", "type": 3, "optional": false } ], "indices": [] }, + { + "kind": "literal", + "value": "notice" + }, + { + "kind": "literal", + "value": "hooks-codex" + }, + { + "kind": "primitive", + "type": "string" + } + ] + }, + "names": [], + "sources": [] + }, + { + "digest": "85fe96bf15d5c7559eec3bae4d6cf1a76fda9f5be05a29c2830cff560cab0c0d", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "catalog" + }, + { + "kind": "literal", + "value": "time-context" + } + ] + }, + "names": [], + "sources": [] + }, + { + "digest": "8620189c8e33582708ece48fd2d20dc4d57912486a17bdbb9aea4c44f7018062", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + } + ], + "indices": [] + }, { "kind": "literal", "value": "recall" }, { "kind": "literal", - "value": "plugin" - }, - { - "kind": "primitive", - "type": "string" + "value": "repeat-tool-reminder" } ] }, @@ -40401,7 +52046,7 @@ "packages/llm/llm/src/message.ts#ContextSnapshotSection" ], "sources": [ - "packages/llm/llm/src/message.ts:65" + "packages/llm/llm/src/message.ts:70" ] }, { @@ -40418,6 +52063,103 @@ "names": [], "sources": [] }, + { + "digest": "87b1a33564b9a4d63b00988a524c12259243953aebb9c9a05127d87b27464df9", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "recall" + }, + { + "kind": "literal", + "value": "hooks-claude-code" + } + ] + }, + "names": [], + "sources": [] + }, + { + "digest": "88841202942c7683b3b7e5ea6a796047ec326b6701ac23e58cc236d85613b9fa", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + }, + { + "name": "sections", + "type": 3, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "snapshot" + }, + { + "kind": "literal", + "value": "hooks-codex" + }, + { + "kind": "array", + "element": 4 + }, + { + "kind": "object", + "properties": [ + { + "name": "name", + "type": 5, + "optional": false + }, + { + "name": "text", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "primitive", + "type": "string" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "88a610b831be6d92612a464be5c7d0b88ec24d97bd299837bf74bf7672183c9a", "schema": { @@ -40473,6 +52215,31 @@ "packages/llm/llm/src/types.ts:421" ] }, + { + "digest": "8a046b52331959aa3394680d6acbe09b8a5447c6b61375f263445bfcef19b7f1", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 1, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tmux-context" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "8a6e1ec9e8db346b0e02f027db73c07a94f067a26d40c1aef1abd09c47ce7ba0", "schema": { @@ -40891,7 +52658,7 @@ "packages/llm/llm/src/message.ts#ToolResultMessage" ], "sources": [ - "packages/llm/llm/src/message.ts:158" + "packages/llm/llm/src/message.ts:168" ] }, { @@ -41037,6 +52804,112 @@ "packages/session/session-log-deepseek/src/types.ts:81" ] }, + { + "digest": "8c1c4f72755a78ea163523a46565316e36e9b644382eb48e6635c71a6f412dd2", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + }, + { + "name": "sections", + "type": 3, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "snapshot" + }, + { + "kind": "literal", + "value": "plan-mode" + }, + { + "kind": "array", + "element": 4 + }, + { + "kind": "object", + "properties": [ + { + "name": "name", + "type": 5, + "optional": false + }, + { + "name": "text", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "primitive", + "type": "string" + } + ] + }, + "names": [], + "sources": [] + }, + { + "digest": "8c627d7a45fa406cea879a3922105e27ed4c3c7966e264afaf11ea7a330f2dd1", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + }, + { + "name": "summary", + "type": 3, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "notice" + }, + { + "kind": "literal", + "value": "tool-goal" + }, + { + "kind": "primitive", + "type": "string" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "8cdd3fdd295cee53035de16a1b23411716f75e9f994fe9510cac5d7fef605c76", "schema": { @@ -41188,6 +53061,40 @@ "packages/schedule/schedule/src/types.ts:86" ] }, + { + "digest": "8f324cea3916c0517261e88167def8efb3a9994c1135e23d40ed9fd48f8c7bd4", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "relay" + }, + { + "kind": "literal", + "value": "tool-goal" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "8f6d609794bf5afc01d7ccf3e03811d32f4b8047f58a2c9a98db0154c2ad7cb9", "schema": { @@ -41864,6 +53771,40 @@ "names": [], "sources": [] }, + { + "digest": "96bfb916a727cd4445a594df264c523fc039749a31bfed924b8cc7bb308a5bb0", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "recall" + }, + { + "kind": "literal", + "value": "runtime-context" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "96f4a9c81fc0f940ef71528a8cc66731ae4cf1f40d79680c5fe3c39f96d7723c", "schema": { @@ -41893,6 +53834,2629 @@ "packages/core/agent/src/types.ts:30" ] }, + { + "digest": "980b8f7c2576a03df48bd09fd68000d88eaec6e99ca5bec36e6448401b8e3e95", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "content", + "type": 1, + "optional": false + }, + { + "name": "id", + "type": 4, + "optional": false + }, + { + "name": "role", + "type": 24, + "optional": false + }, + { + "name": "source", + "type": 25, + "optional": false, + "compatibility": { + "version": 1, + "policy": "session-source-attribution", + "binding": "session.user-message.source", + "discriminator": "kind", + "unknownKinds": "preserve", + "attributionKinds": [ + "tmux-context" + ] + } + } + ], + "indices": [] + }, + { + "kind": "array", + "element": 2 + }, + { + "kind": "union", + "types": [ + 3, + 6, + 8, + 10, + 21 + ] + }, + { + "kind": "object", + "properties": [ + { + "name": "text", + "type": 4, + "optional": false + }, + { + "name": "type", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "primitive", + "type": "string" + }, + { + "kind": "literal", + "value": "reasoning" + }, + { + "kind": "object", + "properties": [ + { + "name": "text", + "type": 4, + "optional": false + }, + { + "name": "type", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "text" + }, + { + "kind": "object", + "properties": [ + { + "name": "arguments", + "type": 4, + "optional": false + }, + { + "name": "id", + "type": 4, + "optional": false + }, + { + "name": "name", + "type": 4, + "optional": false + }, + { + "name": "type", + "type": 9, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tool-call" + }, + { + "kind": "object", + "properties": [ + { + "name": "attachment", + "type": 11, + "optional": false + }, + { + "name": "offloaded", + "type": 19, + "optional": true + }, + { + "name": "type", + "type": 20, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "attachmentId", + "type": 4, + "optional": false + }, + { + "name": "bytes", + "type": 12, + "optional": false + }, + { + "name": "height", + "type": 12, + "optional": false + }, + { + "name": "mediaType", + "type": 13, + "optional": false + }, + { + "name": "name", + "type": 4, + "optional": true + }, + { + "name": "originalDimensions", + "type": 18, + "optional": true + }, + { + "name": "width", + "type": 12, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "primitive", + "type": "number" + }, + { + "kind": "union", + "types": [ + 14, + 15, + 16, + 17 + ] + }, + { + "kind": "literal", + "value": "image/jpeg" + }, + { + "kind": "literal", + "value": "image/png" + }, + { + "kind": "literal", + "value": "image/webp" + }, + { + "kind": "literal", + "value": "image/gif" + }, + { + "kind": "object", + "properties": [ + { + "name": "height", + "type": 12, + "optional": false + }, + { + "name": "width", + "type": 12, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": true + }, + { + "kind": "literal", + "value": "image" + }, + { + "kind": "object", + "properties": [ + { + "name": "attachment", + "type": 22, + "optional": false + }, + { + "name": "type", + "type": 23, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "attachmentId", + "type": 4, + "optional": false + }, + { + "name": "bytes", + "type": 12, + "optional": false + }, + { + "name": "name", + "type": 4, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "file" + }, + { + "kind": "literal", + "value": "user" + }, + { + "kind": "union", + "types": [ + 26, + 29, + 31, + 33, + 35, + 37, + 39, + 41, + 43, + 45, + 47, + 50, + 52, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 91, + 92, + 94, + 96, + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 108, + 109, + 111, + 112, + 113, + 114, + 115, + 116, + 118, + 119, + 127, + 129, + 130, + 132, + 135, + 139, + 141, + 149, + 153, + 154, + 155, + 156, + 157, + 158, + 159, + 160, + 161, + 162, + 163, + 164, + 165, + 167, + 169, + 170, + 171, + 172, + 173, + 174, + 175, + 176, + 177, + 178, + 179, + 180, + 181, + 182, + 183, + 184 + ] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 27, + "optional": false + }, + { + "name": "kind", + "type": 28, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "instructions" + }, + { + "kind": "literal", + "value": "plan-mode" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 27, + "optional": false + }, + { + "name": "kind", + "type": 30, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "repeat-tool-reminder" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 27, + "optional": false + }, + { + "name": "kind", + "type": 32, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "runtime-context" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 27, + "optional": false + }, + { + "name": "kind", + "type": 34, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "schedule" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 27, + "optional": false + }, + { + "name": "kind", + "type": 36, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "time-context" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 27, + "optional": false + }, + { + "name": "kind", + "type": 38, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tmux-context" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 27, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tool-goal" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 27, + "optional": false + }, + { + "name": "kind", + "type": 42, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tool-jobs" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 27, + "optional": false + }, + { + "name": "kind", + "type": 44, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "user-approval" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 27, + "optional": false + }, + { + "name": "kind", + "type": 46, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "dsh-session-title-llm" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 48, + "optional": false + }, + { + "name": "kind", + "type": 49, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "recall" + }, + { + "kind": "literal", + "value": "hooks-claude-code" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 48, + "optional": false + }, + { + "name": "kind", + "type": 51, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "hooks-codex" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 48, + "optional": false + }, + { + "name": "kind", + "type": 53, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "model-selection" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 48, + "optional": false + }, + { + "name": "kind", + "type": 28, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 48, + "optional": false + }, + { + "name": "kind", + "type": 30, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 48, + "optional": false + }, + { + "name": "kind", + "type": 32, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 48, + "optional": false + }, + { + "name": "kind", + "type": 34, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 48, + "optional": false + }, + { + "name": "kind", + "type": 36, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 48, + "optional": false + }, + { + "name": "kind", + "type": 38, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 48, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 48, + "optional": false + }, + { + "name": "kind", + "type": 42, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 48, + "optional": false + }, + { + "name": "kind", + "type": 44, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 48, + "optional": false + }, + { + "name": "kind", + "type": 46, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 49, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "relay" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 51, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 53, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 28, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 30, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 32, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 34, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 36, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 38, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 42, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 44, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 46, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 79, + "optional": false + }, + { + "name": "kind", + "type": 49, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "catalog" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 79, + "optional": false + }, + { + "name": "kind", + "type": 51, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 79, + "optional": false + }, + { + "name": "kind", + "type": 53, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 79, + "optional": false + }, + { + "name": "kind", + "type": 28, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 79, + "optional": false + }, + { + "name": "kind", + "type": 30, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 79, + "optional": false + }, + { + "name": "kind", + "type": 32, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 79, + "optional": false + }, + { + "name": "kind", + "type": 34, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 79, + "optional": false + }, + { + "name": "kind", + "type": 36, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 79, + "optional": false + }, + { + "name": "kind", + "type": 38, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 79, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 79, + "optional": false + }, + { + "name": "kind", + "type": 42, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 79, + "optional": false + }, + { + "name": "kind", + "type": 44, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 79, + "optional": false + }, + { + "name": "kind", + "type": 46, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "goalId", + "type": 4, + "optional": false + }, + { + "name": "kind", + "type": 93, + "optional": false + }, + { + "name": "revision", + "type": 12, + "optional": false + }, + { + "name": "round", + "type": 12, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "goal" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 95, + "optional": false + }, + { + "name": "messageId", + "type": 4, + "optional": false + }, + { + "name": "senderId", + "type": 4, + "optional": false + }, + { + "name": "senderName", + "type": 4, + "optional": false + }, + { + "name": "teamId", + "type": 4, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "team-message" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 97, + "optional": false + }, + { + "name": "model", + "type": 4, + "optional": false + }, + { + "name": "provider", + "type": 4, + "optional": false + }, + { + "name": "replayState", + "type": 98, + "optional": true + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "model" + }, + { + "kind": "opaque", + "reason": "unknown" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 49, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 51, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 53, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 28, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 30, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 32, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 34, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 107, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "system-prompt" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 36, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 110, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "code-mode" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 38, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 40, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 42, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 24, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 44, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 117, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "cordis-host-runner" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 46, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "baseline", + "type": 19, + "optional": true + }, + { + "name": "baselineIdentity", + "type": 4, + "optional": true + }, + { + "name": "changes", + "type": 120, + "optional": false + }, + { + "name": "form", + "type": 27, + "optional": false + }, + { + "name": "kind", + "type": 126, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "array", + "element": 121 + }, + { + "kind": "object", + "properties": [ + { + "name": "action", + "type": 122, + "optional": false + }, + { + "name": "digest", + "type": 4, + "optional": true + }, + { + "name": "path", + "type": 4, + "optional": false + }, + { + "name": "scope", + "type": 4, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "union", + "types": [ + 123, + 124, + 125 + ] + }, + { + "kind": "literal", + "value": "remove" + }, + { + "kind": "literal", + "value": "replace" + }, + { + "kind": "literal", + "value": "set" + }, + { + "kind": "literal", + "value": "agent-instructions" + }, + { + "kind": "object", + "properties": [ + { + "name": "callId", + "type": 4, + "optional": false + }, + { + "name": "kind", + "type": 128, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tool" + }, + { + "kind": "object", + "properties": [ + { + "name": "clientTimeZone", + "type": 4, + "optional": true + }, + { + "name": "kind", + "type": 24, + "optional": false + }, + { + "name": "rpcId", + "type": 4, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "compactionId", + "type": 4, + "optional": false + }, + { + "name": "kind", + "type": 131, + "optional": false + }, + { + "name": "sourceCommandId", + "type": 4, + "optional": true + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "compact-checkpoint" + }, + { + "kind": "object", + "properties": [ + { + "name": "deliveryId", + "type": 4, + "optional": false + }, + { + "name": "form", + "type": 133, + "optional": false + }, + { + "name": "kind", + "type": 134, + "optional": false + }, + { + "name": "provider", + "type": 4, + "optional": false + }, + { + "name": "ruleId", + "type": 4, + "optional": false + }, + { + "name": "source", + "type": 4, + "optional": false + }, + { + "name": "summary", + "type": 4, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "notice" + }, + { + "kind": "literal", + "value": "webhook" + }, + { + "kind": "object", + "properties": [ + { + "name": "entries", + "type": 136, + "optional": false + }, + { + "name": "form", + "type": 79, + "optional": false + }, + { + "name": "kind", + "type": 138, + "optional": false + }, + { + "name": "update", + "type": 19, + "optional": true + } + ], + "indices": [] + }, + { + "kind": "array", + "element": 137 + }, + { + "kind": "object", + "properties": [ + { + "name": "description", + "type": 4, + "optional": false + }, + { + "name": "name", + "type": 4, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "skill-catalog" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 27, + "optional": false + }, + { + "name": "kind", + "type": 140, + "optional": false + }, + { + "name": "name", + "type": 4, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "skill-invocation" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 48, + "optional": false + }, + { + "name": "kind", + "type": 142, + "optional": false + }, + { + "name": "references", + "type": 143, + "optional": false + }, + { + "name": "version", + "type": 148, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "session-reference" + }, + { + "kind": "array", + "element": 144 + }, + { + "kind": "object", + "properties": [ + { + "name": "capturedFormatVersion", + "type": 12, + "optional": true + }, + { + "name": "capturedThroughSeq", + "type": 145, + "optional": false + }, + { + "name": "compacted", + "type": 147, + "optional": false + }, + { + "name": "inputIndex", + "type": 12, + "optional": false + }, + { + "name": "label", + "type": 4, + "optional": false + }, + { + "name": "omittedBytes", + "type": 12, + "optional": false + }, + { + "name": "omittedMessages", + "type": 12, + "optional": false + }, + { + "name": "originalMessages", + "type": 12, + "optional": false + }, + { + "name": "retainedMessages", + "type": 12, + "optional": false + }, + { + "name": "sessionId", + "type": 4, + "optional": false + }, + { + "name": "truncated", + "type": 147, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "union", + "types": [ + 12, + 146 + ] + }, + { + "kind": "primitive", + "type": "null" + }, + { + "kind": "primitive", + "type": "boolean" + }, + { + "kind": "literal", + "value": 1 + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 150, + "optional": false + }, + { + "name": "kind", + "type": 49, + "optional": false + }, + { + "name": "sections", + "type": 151, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "snapshot" + }, + { + "kind": "array", + "element": 152 + }, + { + "kind": "object", + "properties": [ + { + "name": "name", + "type": 4, + "optional": false + }, + { + "name": "text", + "type": 4, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 150, + "optional": false + }, + { + "name": "kind", + "type": 51, + "optional": false + }, + { + "name": "sections", + "type": 151, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 150, + "optional": false + }, + { + "name": "kind", + "type": 53, + "optional": false + }, + { + "name": "sections", + "type": 151, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 150, + "optional": false + }, + { + "name": "kind", + "type": 28, + "optional": false + }, + { + "name": "sections", + "type": 151, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 150, + "optional": false + }, + { + "name": "kind", + "type": 30, + "optional": false + }, + { + "name": "sections", + "type": 151, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 150, + "optional": false + }, + { + "name": "kind", + "type": 32, + "optional": false + }, + { + "name": "sections", + "type": 151, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 150, + "optional": false + }, + { + "name": "kind", + "type": 34, + "optional": false + }, + { + "name": "sections", + "type": 151, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 150, + "optional": false + }, + { + "name": "kind", + "type": 36, + "optional": false + }, + { + "name": "sections", + "type": 151, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 150, + "optional": false + }, + { + "name": "kind", + "type": 38, + "optional": false + }, + { + "name": "sections", + "type": 151, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 150, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + }, + { + "name": "sections", + "type": 151, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 150, + "optional": false + }, + { + "name": "kind", + "type": 42, + "optional": false + }, + { + "name": "sections", + "type": 151, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 150, + "optional": false + }, + { + "name": "kind", + "type": 44, + "optional": false + }, + { + "name": "sections", + "type": 151, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 150, + "optional": false + }, + { + "name": "kind", + "type": 46, + "optional": false + }, + { + "name": "sections", + "type": 151, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 133, + "optional": false + }, + { + "name": "kind", + "type": 166, + "optional": false + }, + { + "name": "senderSessionId", + "type": 4, + "optional": false + }, + { + "name": "summary", + "type": 4, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "subagent-settled" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 168, + "optional": false + }, + { + "name": "senderSessionId", + "type": 4, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "agent-message" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 133, + "optional": false + }, + { + "name": "kind", + "type": 49, + "optional": false + }, + { + "name": "summary", + "type": 4, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 133, + "optional": false + }, + { + "name": "kind", + "type": 51, + "optional": false + }, + { + "name": "summary", + "type": 4, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 133, + "optional": false + }, + { + "name": "kind", + "type": 53, + "optional": false + }, + { + "name": "summary", + "type": 4, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 133, + "optional": false + }, + { + "name": "kind", + "type": 28, + "optional": false + }, + { + "name": "summary", + "type": 4, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 133, + "optional": false + }, + { + "name": "kind", + "type": 30, + "optional": false + }, + { + "name": "summary", + "type": 4, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 133, + "optional": false + }, + { + "name": "kind", + "type": 32, + "optional": false + }, + { + "name": "summary", + "type": 4, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 133, + "optional": false + }, + { + "name": "kind", + "type": 34, + "optional": false + }, + { + "name": "summary", + "type": 4, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 133, + "optional": false + }, + { + "name": "kind", + "type": 36, + "optional": false + }, + { + "name": "summary", + "type": 4, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 133, + "optional": false + }, + { + "name": "kind", + "type": 38, + "optional": false + }, + { + "name": "summary", + "type": 4, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 133, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + }, + { + "name": "summary", + "type": 4, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 133, + "optional": false + }, + { + "name": "kind", + "type": 42, + "optional": false + }, + { + "name": "summary", + "type": 4, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 133, + "optional": false + }, + { + "name": "kind", + "type": 44, + "optional": false + }, + { + "name": "summary", + "type": 4, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 133, + "optional": false + }, + { + "name": "kind", + "type": 46, + "optional": false + }, + { + "name": "summary", + "type": 4, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 27, + "optional": false + }, + { + "name": "kind", + "type": 49, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 27, + "optional": false + }, + { + "name": "kind", + "type": 51, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 27, + "optional": false + }, + { + "name": "kind", + "type": 53, + "optional": false + } + ], + "indices": [] + } + ] + }, + "names": [ + "packages/llm/llm/src/message.ts#UserMessage" + ], + "sources": [ + "packages/llm/llm/src/message.ts:157" + ] + }, { "digest": "9890113e97dd3541787bfe6704f2b223d3a890b5325ca0acae2b0398909b413e", "schema": { @@ -41945,6 +56509,40 @@ "packages/sandbox/sandbox-policy/src/session-mode.ts:33" ] }, + { + "digest": "99135d8a3937977955eaac5f8f04f930dcd1562f8450a54a51cde9b921dd59a6", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "catalog" + }, + { + "kind": "literal", + "value": "model-selection" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "998f22585a5d73ec005365e203f07fc3b3a029e82323fdda3fd7f13b0a9639d0", "schema": { @@ -42043,6 +56641,54 @@ "names": [], "sources": [] }, + { + "digest": "99e7e7d7fed55ae6a3a648b35192f16ab1248ddcb0179a0e275128ac1487d7c7", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "literal", + "value": "tool-jobs" + } + ] + }, + "names": [], + "sources": [] + }, + { + "digest": "99f0e98184709ad10f27bfdeaafb4457d9d2b413f402331764798cdb7d3cbe4d", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "catalog" + }, + { + "kind": "literal", + "value": "hooks-codex" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "9a25c2e889855516a531dc906905ec1d88157f7c2651aed27ac4f754bb128240", "schema": { @@ -42507,6 +57153,20 @@ "packages/workflow/tool-workflow/src/types.ts:20" ] }, + { + "digest": "9ac52f0f84fec2eb9f71c2937e497d759db5ca0da4836d93a679d113684141f2", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "literal", + "value": "model-selection" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "9acbe713f3f641921dd3333b240aa72e176d795327c24e8d9db9b68b16771b49", "schema": { @@ -42988,6 +57648,40 @@ "packages/experimental/agent-team/src/types.ts:106" ] }, + { + "digest": "9f65c43e340bba31cdc0fc37bd93ccb68d5e9b36f47a68c207e95a8e68620a5d", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "instructions" + }, + { + "kind": "literal", + "value": "tmux-context" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "a0f906856fc06f1c6f2083eb970e5a657a82b1a84c06c095445e5d6d161cda80", "schema": { @@ -43084,6 +57778,99 @@ "names": [], "sources": [] }, + { + "digest": "a15a19ef63cf5d1b711db1d249821dab0cedcd3a9ad09137b47352c93841fd20", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "relay" + }, + { + "kind": "literal", + "value": "model-selection" + } + ] + }, + "names": [], + "sources": [] + }, + { + "digest": "a16e567c8cd2c55cf1e911aed3c200c4e1f6febb1459ff2a9e7adf159afb68cb", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "recall" + }, + { + "kind": "literal", + "value": "schedule" + } + ] + }, + "names": [], + "sources": [] + }, + { + "digest": "a2066bd52f61218ba15b758def2641cc6a8bd3d4a594a488ee4c65be356d7e39", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 1, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tool-goal" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "a2b49331716ba0a7078b026d145306a70eae64b7313c3e6204bd931e75ec3bb1", "schema": { @@ -43312,6 +58099,49 @@ "names": [], "sources": [] }, + { + "digest": "a3c6f1ea38e9a61d7a9706057ba65aabe02dfe6d9dd90d4736aa62325d874531", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + }, + { + "name": "summary", + "type": 3, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "notice" + }, + { + "kind": "literal", + "value": "model-selection" + }, + { + "kind": "primitive", + "type": "string" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "a3edd1efd1fef21b72c55e213c8a8b24196b091abde2b89db52be0b2aaae3cfa", "schema": { @@ -43446,1044 +58276,6 @@ "packages/experimental/agent-team/src/types.ts:223" ] }, - { - "digest": "a48b761be36821fcf456c862e321284bdd879dd796d29d20b1766e0417f7c966", - "schema": { - "root": 0, - "nodes": [ - { - "kind": "object", - "properties": [ - { - "name": "content", - "type": 1, - "optional": false - }, - { - "name": "id", - "type": 4, - "optional": false - }, - { - "name": "role", - "type": 24, - "optional": false - }, - { - "name": "source", - "type": 25, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "array", - "element": 2 - }, - { - "kind": "union", - "types": [ - 3, - 6, - 17, - 20, - 22 - ] - }, - { - "kind": "object", - "properties": [ - { - "name": "arguments", - "type": 4, - "optional": false - }, - { - "name": "id", - "type": 4, - "optional": false - }, - { - "name": "name", - "type": 4, - "optional": false - }, - { - "name": "type", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "primitive", - "type": "string" - }, - { - "kind": "literal", - "value": "tool-call" - }, - { - "kind": "object", - "properties": [ - { - "name": "attachment", - "type": 7, - "optional": false - }, - { - "name": "offloaded", - "type": 15, - "optional": true - }, - { - "name": "type", - "type": 16, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "attachmentId", - "type": 4, - "optional": false - }, - { - "name": "bytes", - "type": 8, - "optional": false - }, - { - "name": "height", - "type": 8, - "optional": false - }, - { - "name": "mediaType", - "type": 9, - "optional": false - }, - { - "name": "name", - "type": 4, - "optional": true - }, - { - "name": "originalDimensions", - "type": 14, - "optional": true - }, - { - "name": "width", - "type": 8, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "primitive", - "type": "number" - }, - { - "kind": "union", - "types": [ - 10, - 11, - 12, - 13 - ] - }, - { - "kind": "literal", - "value": "image/webp" - }, - { - "kind": "literal", - "value": "image/gif" - }, - { - "kind": "literal", - "value": "image/jpeg" - }, - { - "kind": "literal", - "value": "image/png" - }, - { - "kind": "object", - "properties": [ - { - "name": "height", - "type": 8, - "optional": false - }, - { - "name": "width", - "type": 8, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": true - }, - { - "kind": "literal", - "value": "image" - }, - { - "kind": "object", - "properties": [ - { - "name": "attachment", - "type": 18, - "optional": false - }, - { - "name": "type", - "type": 19, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "attachmentId", - "type": 4, - "optional": false - }, - { - "name": "bytes", - "type": 8, - "optional": false - }, - { - "name": "name", - "type": 4, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "file" - }, - { - "kind": "object", - "properties": [ - { - "name": "text", - "type": 4, - "optional": false - }, - { - "name": "type", - "type": 21, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "reasoning" - }, - { - "kind": "object", - "properties": [ - { - "name": "text", - "type": 4, - "optional": false - }, - { - "name": "type", - "type": 23, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "text" - }, - { - "kind": "literal", - "value": "user" - }, - { - "kind": "union", - "types": [ - 26, - 35, - 37, - 38, - 41, - 46, - 48, - 53, - 54, - 55, - 57, - 59, - 60, - 68, - 70, - 72, - 74, - 76, - 79, - 80 - ] - }, - { - "kind": "object", - "properties": [ - { - "name": "baseline", - "type": 15, - "optional": true - }, - { - "name": "baselineIdentity", - "type": 4, - "optional": true - }, - { - "name": "changes", - "type": 27, - "optional": false - }, - { - "name": "form", - "type": 33, - "optional": false - }, - { - "name": "kind", - "type": 34, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "array", - "element": 28 - }, - { - "kind": "object", - "properties": [ - { - "name": "action", - "type": 29, - "optional": false - }, - { - "name": "digest", - "type": 4, - "optional": true - }, - { - "name": "path", - "type": 4, - "optional": false - }, - { - "name": "scope", - "type": 4, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "union", - "types": [ - 30, - 31, - 32 - ] - }, - { - "kind": "literal", - "value": "remove" - }, - { - "kind": "literal", - "value": "replace" - }, - { - "kind": "literal", - "value": "set" - }, - { - "kind": "literal", - "value": "instructions" - }, - { - "kind": "literal", - "value": "agent-instructions" - }, - { - "kind": "object", - "properties": [ - { - "name": "callId", - "type": 4, - "optional": false - }, - { - "name": "kind", - "type": 36, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "tool" - }, - { - "kind": "object", - "properties": [ - { - "name": "clientTimeZone", - "type": 4, - "optional": true - }, - { - "name": "kind", - "type": 24, - "optional": false - }, - { - "name": "rpcId", - "type": 4, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "deliveryId", - "type": 4, - "optional": false - }, - { - "name": "form", - "type": 39, - "optional": false - }, - { - "name": "kind", - "type": 40, - "optional": false - }, - { - "name": "provider", - "type": 4, - "optional": false - }, - { - "name": "ruleId", - "type": 4, - "optional": false - }, - { - "name": "source", - "type": 4, - "optional": false - }, - { - "name": "summary", - "type": 4, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "notice" - }, - { - "kind": "literal", - "value": "webhook" - }, - { - "kind": "object", - "properties": [ - { - "name": "entries", - "type": 42, - "optional": false - }, - { - "name": "form", - "type": 44, - "optional": false - }, - { - "name": "kind", - "type": 45, - "optional": false - }, - { - "name": "update", - "type": 15, - "optional": true - } - ], - "indices": [] - }, - { - "kind": "array", - "element": 43 - }, - { - "kind": "object", - "properties": [ - { - "name": "description", - "type": 4, - "optional": false - }, - { - "name": "name", - "type": 4, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "catalog" - }, - { - "kind": "literal", - "value": "skill-catalog" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 33, - "optional": false - }, - { - "name": "kind", - "type": 47, - "optional": false - }, - { - "name": "name", - "type": 4, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "skill-invocation" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 49, - "optional": false - }, - { - "name": "kind", - "type": 50, - "optional": false - }, - { - "name": "plugin", - "type": 4, - "optional": false - }, - { - "name": "sections", - "type": 51, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "snapshot" - }, - { - "kind": "literal", - "value": "plugin" - }, - { - "kind": "array", - "element": 52 - }, - { - "kind": "object", - "properties": [ - { - "name": "name", - "type": 4, - "optional": false - }, - { - "name": "text", - "type": 4, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 39, - "optional": false - }, - { - "name": "kind", - "type": 50, - "optional": false - }, - { - "name": "plugin", - "type": 4, - "optional": false - }, - { - "name": "summary", - "type": 4, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 33, - "optional": false - }, - { - "name": "kind", - "type": 50, - "optional": false - }, - { - "name": "plugin", - "type": 4, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 56, - "optional": false - }, - { - "name": "kind", - "type": 50, - "optional": false - }, - { - "name": "plugin", - "type": 4, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "recall" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 58, - "optional": false - }, - { - "name": "kind", - "type": 50, - "optional": false - }, - { - "name": "plugin", - "type": 4, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "relay" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 44, - "optional": false - }, - { - "name": "kind", - "type": 50, - "optional": false - }, - { - "name": "plugin", - "type": 4, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 56, - "optional": false - }, - { - "name": "kind", - "type": 61, - "optional": false - }, - { - "name": "references", - "type": 62, - "optional": false - }, - { - "name": "version", - "type": 67, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "session-reference" - }, - { - "kind": "array", - "element": 63 - }, - { - "kind": "object", - "properties": [ - { - "name": "capturedFormatVersion", - "type": 8, - "optional": true - }, - { - "name": "capturedThroughSeq", - "type": 64, - "optional": false - }, - { - "name": "compacted", - "type": 66, - "optional": false - }, - { - "name": "inputIndex", - "type": 8, - "optional": false - }, - { - "name": "label", - "type": 4, - "optional": false - }, - { - "name": "omittedBytes", - "type": 8, - "optional": false - }, - { - "name": "omittedMessages", - "type": 8, - "optional": false - }, - { - "name": "originalMessages", - "type": 8, - "optional": false - }, - { - "name": "retainedMessages", - "type": 8, - "optional": false - }, - { - "name": "sessionId", - "type": 4, - "optional": false - }, - { - "name": "truncated", - "type": 66, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "union", - "types": [ - 8, - 65 - ] - }, - { - "kind": "primitive", - "type": "null" - }, - { - "kind": "primitive", - "type": "boolean" - }, - { - "kind": "literal", - "value": 1 - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 39, - "optional": false - }, - { - "name": "kind", - "type": 69, - "optional": false - }, - { - "name": "senderSessionId", - "type": 4, - "optional": false - }, - { - "name": "summary", - "type": 4, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "subagent-settled" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 58, - "optional": false - }, - { - "name": "kind", - "type": 71, - "optional": false - }, - { - "name": "senderSessionId", - "type": 4, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "agent-message" - }, - { - "kind": "object", - "properties": [ - { - "name": "goalId", - "type": 4, - "optional": false - }, - { - "name": "kind", - "type": 73, - "optional": false - }, - { - "name": "revision", - "type": 8, - "optional": false - }, - { - "name": "round", - "type": 8, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "goal" - }, - { - "kind": "object", - "properties": [ - { - "name": "kind", - "type": 75, - "optional": false - }, - { - "name": "messageId", - "type": 4, - "optional": false - }, - { - "name": "senderId", - "type": 4, - "optional": false - }, - { - "name": "senderName", - "type": 4, - "optional": false - }, - { - "name": "teamId", - "type": 4, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "team-message" - }, - { - "kind": "object", - "properties": [ - { - "name": "kind", - "type": 77, - "optional": false - }, - { - "name": "model", - "type": 4, - "optional": false - }, - { - "name": "provider", - "type": 4, - "optional": false - }, - { - "name": "replayState", - "type": 78, - "optional": true - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "model" - }, - { - "kind": "opaque", - "reason": "unknown" - }, - { - "kind": "object", - "properties": [ - { - "name": "kind", - "type": 50, - "optional": false - }, - { - "name": "plugin", - "type": 4, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "kind", - "type": 24, - "optional": false - } - ], - "indices": [] - } - ] - }, - "names": [ - "packages/llm/llm/src/message.ts#UserMessage" - ], - "sources": [ - "packages/llm/llm/src/message.ts:147" - ] - }, { "digest": "a6567ccb2e530606b775371eb4fa31468d72084339968e8b0440a516a23b39dc", "schema": { @@ -45145,6 +58937,20 @@ "packages/core/tools/src/types.ts:20" ] }, + { + "digest": "a9059a81430b320792bbb7c2ee1f8f6c77ff71e40ee44c18aec72e157c522694", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "literal", + "value": "hooks-claude-code" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "a951a47d0ebf7d7ac401d1ec2fe4e138a43288c5ad2b0cf029a90b97d718f1e6", "schema": { @@ -45517,6 +59323,40 @@ "names": [], "sources": [] }, + { + "digest": "aa2bf9e82b9fdeb94a42af20031fffa30e4e23f01f4ac39757427d4c64c407f0", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "instructions" + }, + { + "kind": "literal", + "value": "user-approval" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "aa7bc2817014ca6c45719b1c193c5c131be718a0921f34345098ff250f444626", "schema": { @@ -45679,6 +59519,2748 @@ "names": [], "sources": [] }, + { + "digest": "aae343bc3d663c83f2e8b5e1c7eea5d509dc7a5361bc8bd8b5ac3bb8d3b1ed56", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "recall" + }, + { + "kind": "literal", + "value": "model-selection" + } + ] + }, + "names": [], + "sources": [] + }, + { + "digest": "ab1acc0685cc410d0d1e85ff0e0bd29f4b2b4352dd170db54988319d58d4362f", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "data", + "type": 1, + "optional": false + }, + { + "name": "ignorable", + "type": 22, + "optional": true + }, + { + "name": "seq", + "type": 15, + "optional": false + }, + { + "name": "time", + "type": 15, + "optional": false + }, + { + "name": "type", + "type": 192, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "inserted", + "type": 2, + "optional": false + }, + { + "name": "outcome", + "type": 188, + "optional": true + }, + { + "name": "removedCount", + "type": 15, + "optional": true + }, + { + "name": "start", + "type": 15, + "optional": false + }, + { + "name": "target", + "type": 189, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "array", + "element": 3 + }, + { + "kind": "object", + "properties": [ + { + "name": "content", + "type": 4, + "optional": false + }, + { + "name": "id", + "type": 7, + "optional": false + }, + { + "name": "role", + "type": 27, + "optional": false + }, + { + "name": "source", + "type": 28, + "optional": false, + "compatibility": { + "version": 1, + "policy": "session-source-attribution", + "binding": "session.user-message.source", + "discriminator": "kind", + "unknownKinds": "preserve", + "attributionKinds": [ + "tmux-context" + ] + } + } + ], + "indices": [] + }, + { + "kind": "array", + "element": 5 + }, + { + "kind": "union", + "types": [ + 6, + 9, + 11, + 13, + 24 + ] + }, + { + "kind": "object", + "properties": [ + { + "name": "text", + "type": 7, + "optional": false + }, + { + "name": "type", + "type": 8, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "primitive", + "type": "string" + }, + { + "kind": "literal", + "value": "reasoning" + }, + { + "kind": "object", + "properties": [ + { + "name": "text", + "type": 7, + "optional": false + }, + { + "name": "type", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "text" + }, + { + "kind": "object", + "properties": [ + { + "name": "arguments", + "type": 7, + "optional": false + }, + { + "name": "id", + "type": 7, + "optional": false + }, + { + "name": "name", + "type": 7, + "optional": false + }, + { + "name": "type", + "type": 12, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tool-call" + }, + { + "kind": "object", + "properties": [ + { + "name": "attachment", + "type": 14, + "optional": false + }, + { + "name": "offloaded", + "type": 22, + "optional": true + }, + { + "name": "type", + "type": 23, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "attachmentId", + "type": 7, + "optional": false + }, + { + "name": "bytes", + "type": 15, + "optional": false + }, + { + "name": "height", + "type": 15, + "optional": false + }, + { + "name": "mediaType", + "type": 16, + "optional": false + }, + { + "name": "name", + "type": 7, + "optional": true + }, + { + "name": "originalDimensions", + "type": 21, + "optional": true + }, + { + "name": "width", + "type": 15, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "primitive", + "type": "number" + }, + { + "kind": "union", + "types": [ + 17, + 18, + 19, + 20 + ] + }, + { + "kind": "literal", + "value": "image/gif" + }, + { + "kind": "literal", + "value": "image/jpeg" + }, + { + "kind": "literal", + "value": "image/png" + }, + { + "kind": "literal", + "value": "image/webp" + }, + { + "kind": "object", + "properties": [ + { + "name": "height", + "type": 15, + "optional": false + }, + { + "name": "width", + "type": 15, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": true + }, + { + "kind": "literal", + "value": "image" + }, + { + "kind": "object", + "properties": [ + { + "name": "attachment", + "type": 25, + "optional": false + }, + { + "name": "type", + "type": 26, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "attachmentId", + "type": 7, + "optional": false + }, + { + "name": "bytes", + "type": 15, + "optional": false + }, + { + "name": "name", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "file" + }, + { + "kind": "literal", + "value": "user" + }, + { + "kind": "union", + "types": [ + 29, + 32, + 34, + 36, + 39, + 41, + 43, + 45, + 47, + 49, + 51, + 53, + 55, + 57, + 58, + 59, + 60, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97, + 98, + 99, + 100, + 101, + 102, + 104, + 106, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 126, + 128, + 129, + 137, + 139, + 140, + 142, + 144, + 148, + 150, + 158, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 172, + 173, + 174, + 176, + 178, + 179, + 180, + 181, + 182, + 183, + 184, + 185, + 186, + 187 + ] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 30, + "optional": false + }, + { + "name": "kind", + "type": 31, + "optional": false + }, + { + "name": "summary", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "notice" + }, + { + "kind": "literal", + "value": "tool-jobs" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 30, + "optional": false + }, + { + "name": "kind", + "type": 33, + "optional": false + }, + { + "name": "summary", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "user-approval" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 30, + "optional": false + }, + { + "name": "kind", + "type": 35, + "optional": false + }, + { + "name": "summary", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "dsh-session-title-llm" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 37, + "optional": false + }, + { + "name": "kind", + "type": 38, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "instructions" + }, + { + "kind": "literal", + "value": "hooks-claude-code" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 37, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "hooks-codex" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 37, + "optional": false + }, + { + "name": "kind", + "type": 42, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "model-selection" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 37, + "optional": false + }, + { + "name": "kind", + "type": 44, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "plan-mode" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 37, + "optional": false + }, + { + "name": "kind", + "type": 46, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "repeat-tool-reminder" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 37, + "optional": false + }, + { + "name": "kind", + "type": 48, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "runtime-context" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 37, + "optional": false + }, + { + "name": "kind", + "type": 50, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "schedule" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 37, + "optional": false + }, + { + "name": "kind", + "type": 52, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "time-context" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 37, + "optional": false + }, + { + "name": "kind", + "type": 54, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tmux-context" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 37, + "optional": false + }, + { + "name": "kind", + "type": 56, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tool-goal" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 37, + "optional": false + }, + { + "name": "kind", + "type": 31, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 37, + "optional": false + }, + { + "name": "kind", + "type": 33, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 37, + "optional": false + }, + { + "name": "kind", + "type": 35, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 61, + "optional": false + }, + { + "name": "kind", + "type": 38, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "recall" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 61, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 61, + "optional": false + }, + { + "name": "kind", + "type": 42, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 61, + "optional": false + }, + { + "name": "kind", + "type": 44, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 61, + "optional": false + }, + { + "name": "kind", + "type": 46, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 61, + "optional": false + }, + { + "name": "kind", + "type": 48, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 61, + "optional": false + }, + { + "name": "kind", + "type": 50, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 61, + "optional": false + }, + { + "name": "kind", + "type": 52, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 61, + "optional": false + }, + { + "name": "kind", + "type": 54, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 61, + "optional": false + }, + { + "name": "kind", + "type": 56, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 61, + "optional": false + }, + { + "name": "kind", + "type": 31, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 61, + "optional": false + }, + { + "name": "kind", + "type": 33, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 61, + "optional": false + }, + { + "name": "kind", + "type": 35, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 75, + "optional": false + }, + { + "name": "kind", + "type": 38, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "relay" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 75, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 75, + "optional": false + }, + { + "name": "kind", + "type": 42, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 75, + "optional": false + }, + { + "name": "kind", + "type": 44, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 75, + "optional": false + }, + { + "name": "kind", + "type": 46, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 75, + "optional": false + }, + { + "name": "kind", + "type": 48, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 75, + "optional": false + }, + { + "name": "kind", + "type": 50, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 75, + "optional": false + }, + { + "name": "kind", + "type": 52, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 75, + "optional": false + }, + { + "name": "kind", + "type": 54, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 75, + "optional": false + }, + { + "name": "kind", + "type": 56, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 75, + "optional": false + }, + { + "name": "kind", + "type": 31, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 75, + "optional": false + }, + { + "name": "kind", + "type": 33, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 75, + "optional": false + }, + { + "name": "kind", + "type": 35, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 89, + "optional": false + }, + { + "name": "kind", + "type": 38, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "catalog" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 89, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 89, + "optional": false + }, + { + "name": "kind", + "type": 42, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 89, + "optional": false + }, + { + "name": "kind", + "type": 44, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 89, + "optional": false + }, + { + "name": "kind", + "type": 46, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 89, + "optional": false + }, + { + "name": "kind", + "type": 48, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 89, + "optional": false + }, + { + "name": "kind", + "type": 50, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 89, + "optional": false + }, + { + "name": "kind", + "type": 52, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 89, + "optional": false + }, + { + "name": "kind", + "type": 54, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 89, + "optional": false + }, + { + "name": "kind", + "type": 56, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 89, + "optional": false + }, + { + "name": "kind", + "type": 31, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 89, + "optional": false + }, + { + "name": "kind", + "type": 33, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 89, + "optional": false + }, + { + "name": "kind", + "type": 35, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "goalId", + "type": 7, + "optional": false + }, + { + "name": "kind", + "type": 103, + "optional": false + }, + { + "name": "revision", + "type": 15, + "optional": false + }, + { + "name": "round", + "type": 15, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "goal" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 105, + "optional": false + }, + { + "name": "messageId", + "type": 7, + "optional": false + }, + { + "name": "senderId", + "type": 7, + "optional": false + }, + { + "name": "senderName", + "type": 7, + "optional": false + }, + { + "name": "teamId", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "team-message" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 107, + "optional": false + }, + { + "name": "model", + "type": 7, + "optional": false + }, + { + "name": "provider", + "type": 7, + "optional": false + }, + { + "name": "replayState", + "type": 108, + "optional": true + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "model" + }, + { + "kind": "opaque", + "reason": "unknown" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 38, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 40, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 42, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 44, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 46, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 48, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 50, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 117, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "system-prompt" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 52, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 54, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 56, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 31, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 27, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 33, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 125, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "code-mode" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 127, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "cordis-host-runner" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 35, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "baseline", + "type": 22, + "optional": true + }, + { + "name": "baselineIdentity", + "type": 7, + "optional": true + }, + { + "name": "changes", + "type": 130, + "optional": false + }, + { + "name": "form", + "type": 37, + "optional": false + }, + { + "name": "kind", + "type": 136, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "array", + "element": 131 + }, + { + "kind": "object", + "properties": [ + { + "name": "action", + "type": 132, + "optional": false + }, + { + "name": "digest", + "type": 7, + "optional": true + }, + { + "name": "path", + "type": 7, + "optional": false + }, + { + "name": "scope", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "union", + "types": [ + 133, + 134, + 135 + ] + }, + { + "kind": "literal", + "value": "remove" + }, + { + "kind": "literal", + "value": "replace" + }, + { + "kind": "literal", + "value": "set" + }, + { + "kind": "literal", + "value": "agent-instructions" + }, + { + "kind": "object", + "properties": [ + { + "name": "callId", + "type": 7, + "optional": false + }, + { + "name": "kind", + "type": 138, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tool" + }, + { + "kind": "object", + "properties": [ + { + "name": "clientTimeZone", + "type": 7, + "optional": true + }, + { + "name": "kind", + "type": 27, + "optional": false + }, + { + "name": "rpcId", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "compactionId", + "type": 7, + "optional": false + }, + { + "name": "kind", + "type": 141, + "optional": false + }, + { + "name": "sourceCommandId", + "type": 7, + "optional": true + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "compact-checkpoint" + }, + { + "kind": "object", + "properties": [ + { + "name": "deliveryId", + "type": 7, + "optional": false + }, + { + "name": "form", + "type": 30, + "optional": false + }, + { + "name": "kind", + "type": 143, + "optional": false + }, + { + "name": "provider", + "type": 7, + "optional": false + }, + { + "name": "ruleId", + "type": 7, + "optional": false + }, + { + "name": "source", + "type": 7, + "optional": false + }, + { + "name": "summary", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "webhook" + }, + { + "kind": "object", + "properties": [ + { + "name": "entries", + "type": 145, + "optional": false + }, + { + "name": "form", + "type": 89, + "optional": false + }, + { + "name": "kind", + "type": 147, + "optional": false + }, + { + "name": "update", + "type": 22, + "optional": true + } + ], + "indices": [] + }, + { + "kind": "array", + "element": 146 + }, + { + "kind": "object", + "properties": [ + { + "name": "description", + "type": 7, + "optional": false + }, + { + "name": "name", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "skill-catalog" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 37, + "optional": false + }, + { + "name": "kind", + "type": 149, + "optional": false + }, + { + "name": "name", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "skill-invocation" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 61, + "optional": false + }, + { + "name": "kind", + "type": 151, + "optional": false + }, + { + "name": "references", + "type": 152, + "optional": false + }, + { + "name": "version", + "type": 157, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "session-reference" + }, + { + "kind": "array", + "element": 153 + }, + { + "kind": "object", + "properties": [ + { + "name": "capturedFormatVersion", + "type": 15, + "optional": true + }, + { + "name": "capturedThroughSeq", + "type": 154, + "optional": false + }, + { + "name": "compacted", + "type": 156, + "optional": false + }, + { + "name": "inputIndex", + "type": 15, + "optional": false + }, + { + "name": "label", + "type": 7, + "optional": false + }, + { + "name": "omittedBytes", + "type": 15, + "optional": false + }, + { + "name": "omittedMessages", + "type": 15, + "optional": false + }, + { + "name": "originalMessages", + "type": 15, + "optional": false + }, + { + "name": "retainedMessages", + "type": 15, + "optional": false + }, + { + "name": "sessionId", + "type": 7, + "optional": false + }, + { + "name": "truncated", + "type": 156, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "union", + "types": [ + 15, + 155 + ] + }, + { + "kind": "primitive", + "type": "null" + }, + { + "kind": "primitive", + "type": "boolean" + }, + { + "kind": "literal", + "value": 1 + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 159, + "optional": false + }, + { + "name": "kind", + "type": 38, + "optional": false + }, + { + "name": "sections", + "type": 160, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "snapshot" + }, + { + "kind": "array", + "element": 161 + }, + { + "kind": "object", + "properties": [ + { + "name": "name", + "type": 7, + "optional": false + }, + { + "name": "text", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 159, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + }, + { + "name": "sections", + "type": 160, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 159, + "optional": false + }, + { + "name": "kind", + "type": 42, + "optional": false + }, + { + "name": "sections", + "type": 160, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 159, + "optional": false + }, + { + "name": "kind", + "type": 44, + "optional": false + }, + { + "name": "sections", + "type": 160, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 159, + "optional": false + }, + { + "name": "kind", + "type": 46, + "optional": false + }, + { + "name": "sections", + "type": 160, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 159, + "optional": false + }, + { + "name": "kind", + "type": 48, + "optional": false + }, + { + "name": "sections", + "type": 160, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 159, + "optional": false + }, + { + "name": "kind", + "type": 50, + "optional": false + }, + { + "name": "sections", + "type": 160, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 159, + "optional": false + }, + { + "name": "kind", + "type": 52, + "optional": false + }, + { + "name": "sections", + "type": 160, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 159, + "optional": false + }, + { + "name": "kind", + "type": 54, + "optional": false + }, + { + "name": "sections", + "type": 160, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 159, + "optional": false + }, + { + "name": "kind", + "type": 56, + "optional": false + }, + { + "name": "sections", + "type": 160, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 159, + "optional": false + }, + { + "name": "kind", + "type": 31, + "optional": false + }, + { + "name": "sections", + "type": 160, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 159, + "optional": false + }, + { + "name": "kind", + "type": 33, + "optional": false + }, + { + "name": "sections", + "type": 160, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 159, + "optional": false + }, + { + "name": "kind", + "type": 35, + "optional": false + }, + { + "name": "sections", + "type": 160, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 30, + "optional": false + }, + { + "name": "kind", + "type": 175, + "optional": false + }, + { + "name": "senderSessionId", + "type": 7, + "optional": false + }, + { + "name": "summary", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "subagent-settled" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 75, + "optional": false + }, + { + "name": "kind", + "type": 177, + "optional": false + }, + { + "name": "senderSessionId", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "agent-message" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 30, + "optional": false + }, + { + "name": "kind", + "type": 38, + "optional": false + }, + { + "name": "summary", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 30, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + }, + { + "name": "summary", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 30, + "optional": false + }, + { + "name": "kind", + "type": 42, + "optional": false + }, + { + "name": "summary", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 30, + "optional": false + }, + { + "name": "kind", + "type": 44, + "optional": false + }, + { + "name": "summary", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 30, + "optional": false + }, + { + "name": "kind", + "type": 46, + "optional": false + }, + { + "name": "summary", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 30, + "optional": false + }, + { + "name": "kind", + "type": 48, + "optional": false + }, + { + "name": "summary", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 30, + "optional": false + }, + { + "name": "kind", + "type": 50, + "optional": false + }, + { + "name": "summary", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 30, + "optional": false + }, + { + "name": "kind", + "type": 52, + "optional": false + }, + { + "name": "summary", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 30, + "optional": false + }, + { + "name": "kind", + "type": 54, + "optional": false + }, + { + "name": "summary", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 30, + "optional": false + }, + { + "name": "kind", + "type": 56, + "optional": false + }, + { + "name": "summary", + "type": 7, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "canceled" + }, + { + "kind": "union", + "types": [ + 190, + 191 + ] + }, + { + "kind": "literal", + "value": "next-step" + }, + { + "kind": "literal", + "value": "next-turn" + }, + { + "kind": "literal", + "value": "agent/inbox/spliced" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "ab7ec5f9eb2c6dfacca5da4c37cf7ba85d04172053ee6b1ebf1709ffcd99c1a7", "schema": { @@ -45741,506 +62323,6 @@ "names": [], "sources": [] }, - { - "digest": "abb8be1a8972c5531c513de95c678bac414263fb5e4bf6dcf871ca913f47bd94", - "schema": { - "root": 0, - "nodes": [ - { - "kind": "object", - "properties": [ - { - "name": "content", - "type": 1, - "optional": false - }, - { - "name": "id", - "type": 4, - "optional": false - }, - { - "name": "role", - "type": 24, - "optional": false - }, - { - "name": "source", - "type": 25, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "array", - "element": 2 - }, - { - "kind": "union", - "types": [ - 3, - 6, - 17, - 20, - 22 - ] - }, - { - "kind": "object", - "properties": [ - { - "name": "arguments", - "type": 4, - "optional": false - }, - { - "name": "id", - "type": 4, - "optional": false - }, - { - "name": "name", - "type": 4, - "optional": false - }, - { - "name": "type", - "type": 5, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "primitive", - "type": "string" - }, - { - "kind": "literal", - "value": "tool-call" - }, - { - "kind": "object", - "properties": [ - { - "name": "attachment", - "type": 7, - "optional": false - }, - { - "name": "offloaded", - "type": 15, - "optional": true - }, - { - "name": "type", - "type": 16, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "attachmentId", - "type": 4, - "optional": false - }, - { - "name": "bytes", - "type": 8, - "optional": false - }, - { - "name": "height", - "type": 8, - "optional": false - }, - { - "name": "mediaType", - "type": 9, - "optional": false - }, - { - "name": "name", - "type": 4, - "optional": true - }, - { - "name": "originalDimensions", - "type": 14, - "optional": true - }, - { - "name": "width", - "type": 8, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "primitive", - "type": "number" - }, - { - "kind": "union", - "types": [ - 10, - 11, - 12, - 13 - ] - }, - { - "kind": "literal", - "value": "image/gif" - }, - { - "kind": "literal", - "value": "image/jpeg" - }, - { - "kind": "literal", - "value": "image/png" - }, - { - "kind": "literal", - "value": "image/webp" - }, - { - "kind": "object", - "properties": [ - { - "name": "height", - "type": 8, - "optional": false - }, - { - "name": "width", - "type": 8, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": true - }, - { - "kind": "literal", - "value": "image" - }, - { - "kind": "object", - "properties": [ - { - "name": "attachment", - "type": 18, - "optional": false - }, - { - "name": "type", - "type": 19, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "attachmentId", - "type": 4, - "optional": false - }, - { - "name": "bytes", - "type": 8, - "optional": false - }, - { - "name": "name", - "type": 4, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "file" - }, - { - "kind": "object", - "properties": [ - { - "name": "text", - "type": 4, - "optional": false - }, - { - "name": "type", - "type": 21, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "reasoning" - }, - { - "kind": "object", - "properties": [ - { - "name": "text", - "type": 4, - "optional": false - }, - { - "name": "type", - "type": 23, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "text" - }, - { - "kind": "literal", - "value": "system" - }, - { - "kind": "union", - "types": [ - 26, - 31, - 33, - 35, - 37, - 39, - 41 - ] - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 27, - "optional": false - }, - { - "name": "kind", - "type": 28, - "optional": false - }, - { - "name": "plugin", - "type": 4, - "optional": false - }, - { - "name": "sections", - "type": 29, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "snapshot" - }, - { - "kind": "literal", - "value": "plugin" - }, - { - "kind": "array", - "element": 30 - }, - { - "kind": "object", - "properties": [ - { - "name": "name", - "type": 4, - "optional": false - }, - { - "name": "text", - "type": 4, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 32, - "optional": false - }, - { - "name": "kind", - "type": 28, - "optional": false - }, - { - "name": "plugin", - "type": 4, - "optional": false - }, - { - "name": "summary", - "type": 4, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "notice" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 34, - "optional": false - }, - { - "name": "kind", - "type": 28, - "optional": false - }, - { - "name": "plugin", - "type": 4, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "catalog" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 36, - "optional": false - }, - { - "name": "kind", - "type": 28, - "optional": false - }, - { - "name": "plugin", - "type": 4, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "recall" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 38, - "optional": false - }, - { - "name": "kind", - "type": 28, - "optional": false - }, - { - "name": "plugin", - "type": 4, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "relay" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 40, - "optional": false - }, - { - "name": "kind", - "type": 28, - "optional": false - }, - { - "name": "plugin", - "type": 4, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "instructions" - }, - { - "kind": "object", - "properties": [ - { - "name": "kind", - "type": 28, - "optional": false - }, - { - "name": "plugin", - "type": 4, - "optional": false - } - ], - "indices": [] - } - ] - }, - "names": [ - "packages/llm/llm/src/message.ts#SystemMessage" - ], - "sources": [ - "packages/llm/llm/src/message.ts:141" - ] - }, { "digest": "ad22a5ca5bbaab2e1440779cd3648e85ddfc6f73b5207394eda699555cf31430", "schema": { @@ -46312,10 +62394,44 @@ "packages/core/session/src/types.ts:189", "packages/interaction/commands/src/types.ts:75", "packages/interaction/commands/src/types.ts:79", - "packages/llm/llm/src/message.ts:103", + "packages/llm/llm/src/message.ts:111", "packages/session/session-title/src/types.ts:35" ] }, + { + "digest": "ade057f4fdc387aec6426f48704a1f9359cfc6fee13f27735b07f9b215ec16ca", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "relay" + }, + { + "kind": "literal", + "value": "tool-jobs" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "ae1f7110feeec697b8cab42b68f7709aa7b3279764099dfb53c25890d2e5c871", "schema": { @@ -46618,6 +62734,31 @@ "names": [], "sources": [] }, + { + "digest": "b062078e899958f99ae464514578b8c093924dfe34bd9a835932b420ff2150b1", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 1, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "repeat-tool-reminder" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "b0b0eb1b16490f6bee135b2377e8f8c39227974c799ad7d49ff418af23ecbc35", "schema": { @@ -46722,6 +62863,33 @@ "packages/attachment/attachment/src/types.ts:11" ] }, + { + "digest": "b0fdf76590690063dff16e2ba5aa14cb6ed074b61980b3860c299c2e8efc7a1a", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 1, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "code-mode" + } + ] + }, + "names": [], + "sources": [ + "packages/core/tools/src/ptc.ts:13" + ] + }, { "digest": "b158f3ff6923714807c0d73882f0b05dc87f8fa85c9e90814852d48bbc866081", "schema": { @@ -47025,6 +63193,40 @@ "names": [], "sources": [] }, + { + "digest": "b2a5c8c008a31e3dc6c3013502f2356aca13894b31c8e70601fa92f2d40d1dba", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "recall" + }, + { + "kind": "literal", + "value": "dsh-session-title-llm" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "b2d2a01e51341a3bfec809198952c8c830a7899f4cb6ecd3c1dc0b5d9a2af943", "schema": { @@ -47065,21 +63267,7 @@ ] }, { - "digest": "b38f206d59bad891fa58c89f97a0036987b3defe7685acbd318fa55eb85f9751", - "schema": { - "root": 0, - "nodes": [ - { - "kind": "literal", - "value": "disposed" - } - ] - }, - "names": [], - "sources": [] - }, - { - "digest": "b4d298d90c798fa4d1f5b030ce3ce8031c4c41beafdb05323bec8b2a06903b43", + "digest": "b3681c026a0b98e98b103f057dfd217fbe904129c090efd668253ec9aea7fece", "schema": { "root": 0, "nodes": [ @@ -47096,11 +63284,6 @@ "type": 2, "optional": false }, - { - "name": "plugin", - "type": 3, - "optional": false - }, { "name": "summary", "type": 3, @@ -47115,7 +63298,7 @@ }, { "kind": "literal", - "value": "plugin" + "value": "tmux-context" }, { "kind": "primitive", @@ -47126,6 +63309,45 @@ "names": [], "sources": [] }, + { + "digest": "b38f206d59bad891fa58c89f97a0036987b3defe7685acbd318fa55eb85f9751", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "literal", + "value": "disposed" + } + ] + }, + "names": [], + "sources": [] + }, + { + "digest": "b4ec0af39fd52ed971990e42f04e5be3204882e555c409eb330f8238eec21569", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 1, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "hooks-codex" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "b5086d249e8502e9ead1d39156bb8d559bde7951cac0f14ce150345b4e42a2bf", "schema": { @@ -47589,6 +63811,74 @@ "packages/core/session/src/types.ts:201" ] }, + { + "digest": "b6f94c17dd9bbd7cd57015198b7c7c88407f0e3b89faab176ca3c11c3d864d3e", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "instructions" + }, + { + "kind": "literal", + "value": "hooks-codex" + } + ] + }, + "names": [], + "sources": [] + }, + { + "digest": "b70f3e81fe11b7a5f2504fb47a4502fb8d9c8f0731fdfe8ddcaf9b41f5a6e196", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "instructions" + }, + { + "kind": "literal", + "value": "hooks-claude-code" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "b765ee31033cea463863faf3fc6a0a1b85c47c6a2f13fe1ce833abe56105114b", "schema": { @@ -47603,6 +63893,31 @@ "names": [], "sources": [] }, + { + "digest": "b79641a9d25e756636dc0c706fdf3c4583ccb7d4920e009e6e86c0759cf4de4c", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 1, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "time-context" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "b79ada42962cad0190a9d465805260567621fa3a4abd757eb31e6016b52d5ab5", "schema": { @@ -48112,6 +64427,69 @@ "names": [], "sources": [] }, + { + "digest": "ba4c40b4381e0dcdfab8fc9fc75b5c9b3e8f09ef56deeb1bec8e703b0ef8cd6d", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + }, + { + "name": "sections", + "type": 3, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "snapshot" + }, + { + "kind": "literal", + "value": "dsh-session-title-llm" + }, + { + "kind": "array", + "element": 4 + }, + { + "kind": "object", + "properties": [ + { + "name": "name", + "type": 5, + "optional": false + }, + { + "name": "text", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "primitive", + "type": "string" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "ba77b58995e36f14bb13886b0493d0a1a63d5db10b1a6cd9f6ac65a72cf832ec", "schema": { @@ -48244,6 +64622,49 @@ "names": [], "sources": [] }, + { + "digest": "baccc97ec34be6c4c78e95aa88c85c29820269479445e5b13f956cd64c5e286f", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + }, + { + "name": "summary", + "type": 3, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "notice" + }, + { + "kind": "literal", + "value": "plan-mode" + }, + { + "kind": "primitive", + "type": "string" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "bb1ab3d08f49a9f3b265f844cd78d5c49813062a7b34b54904b426f85d0ff6e3", "schema": { @@ -48342,6 +64763,20 @@ "names": [], "sources": [] }, + { + "digest": "bb94f3217aa56c8876bbff0b8460d6a73cbead545659abb29e76cd0cf2cb92d6", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "literal", + "value": "hooks-codex" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "bbc5696e3f13c758237b316e3cf08cda0b9fd51ffe672539883457769faa185d", "schema": { @@ -48851,6 +65286,83 @@ "names": [], "sources": [] }, + { + "digest": "c5228b7a55498d84f529591744a0ab26e0b93ade18a70a26db1377a1ecfa6b49", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + }, + { + "name": "sections", + "type": 3, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "snapshot" + }, + { + "kind": "literal", + "value": "tool-jobs" + }, + { + "kind": "array", + "element": 4 + }, + { + "kind": "object", + "properties": [ + { + "name": "name", + "type": 5, + "optional": false + }, + { + "name": "text", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "primitive", + "type": "string" + } + ] + }, + "names": [], + "sources": [] + }, + { + "digest": "c5687b1313206a6ff334066047b6a0681611467dc4df8c5a8e71d0b6df39311f", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "literal", + "value": "cordis-host-runner" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "c589e938cc0e4989df8b82abef6339de621f0dc4fe62c230d145b94996af7f92", "schema": { @@ -49859,6 +66371,40 @@ "packages/schedule/schedule/src/types.ts:72" ] }, + { + "digest": "cb1c8959e1726f82f9a3d2ef2bc90bf8c451a98fd56175e956022124c770c818", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "relay" + }, + { + "kind": "literal", + "value": "runtime-context" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "cbca49bde16b656d5b8fbe4a8a507769f7b594c6287782b809c03814941bc5e3", "schema": { @@ -49874,67 +66420,50 @@ "sources": [] }, { - "digest": "cbe418d5a3727fbd3599f90101680dae254ac1d6163b1b8b2ca30f28afb5212a", + "digest": "cc2968a9a0a95309a7d3218dcb0c55d153fe7b8c03b5648ea6fcc69d91a64a7f", "schema": { "root": 0, "nodes": [ { - "kind": "object", - "properties": [ - { - "name": "data", - "type": 1, - "optional": false - }, - { - "name": "ignorable", - "type": 18, - "optional": true - }, - { - "name": "seq", - "type": 11, - "optional": false - }, - { - "name": "time", - "type": 11, - "optional": false - }, - { - "name": "type", - "type": 88, - "optional": false - } - ], - "indices": [] + "kind": "union", + "types": [ + 1, + 28, + 187, + 189 + ] }, { "kind": "object", "properties": [ { - "name": "inserted", + "name": "content", "type": 2, "optional": false }, { - "name": "outcome", - "type": 84, - "optional": true - }, - { - "name": "removedCount", - "type": 11, - "optional": true - }, - { - "name": "start", - "type": 11, + "name": "id", + "type": 5, "optional": false }, { - "name": "target", - "type": 85, + "name": "isError", + "type": 25, + "optional": true + }, + { + "name": "role", + "type": 26, + "optional": false + }, + { + "name": "source", + "type": 27, + "optional": false + }, + { + "name": "toolCallId", + "type": 5, "optional": false } ], @@ -49944,67 +66473,27 @@ "kind": "array", "element": 3 }, - { - "kind": "object", - "properties": [ - { - "name": "content", - "type": 4, - "optional": false - }, - { - "name": "id", - "type": 7, - "optional": false - }, - { - "name": "role", - "type": 27, - "optional": false - }, - { - "name": "source", - "type": 28, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "array", - "element": 5 - }, { "kind": "union", "types": [ - 6, + 4, + 7, 9, - 20, - 23, - 25 + 11, + 22 ] }, { "kind": "object", "properties": [ { - "name": "arguments", - "type": 7, - "optional": false - }, - { - "name": "id", - "type": 7, - "optional": false - }, - { - "name": "name", - "type": 7, + "name": "text", + "type": 5, "optional": false }, { "name": "type", - "type": 8, + "type": 6, "optional": false } ], @@ -50014,6 +66503,56 @@ "kind": "primitive", "type": "string" }, + { + "kind": "literal", + "value": "reasoning" + }, + { + "kind": "object", + "properties": [ + { + "name": "text", + "type": 5, + "optional": false + }, + { + "name": "type", + "type": 8, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "text" + }, + { + "kind": "object", + "properties": [ + { + "name": "arguments", + "type": 5, + "optional": false + }, + { + "name": "id", + "type": 5, + "optional": false + }, + { + "name": "name", + "type": 5, + "optional": false + }, + { + "name": "type", + "type": 10, + "optional": false + } + ], + "indices": [] + }, { "kind": "literal", "value": "tool-call" @@ -50023,17 +66562,17 @@ "properties": [ { "name": "attachment", - "type": 10, + "type": 12, "optional": false }, { "name": "offloaded", - "type": 18, + "type": 20, "optional": true }, { "name": "type", - "type": 19, + "type": 21, "optional": false } ], @@ -50044,37 +66583,37 @@ "properties": [ { "name": "attachmentId", - "type": 7, + "type": 5, "optional": false }, { "name": "bytes", - "type": 11, + "type": 13, "optional": false }, { "name": "height", - "type": 11, + "type": 13, "optional": false }, { "name": "mediaType", - "type": 12, + "type": 14, "optional": false }, { "name": "name", - "type": 7, + "type": 5, "optional": true }, { "name": "originalDimensions", - "type": 17, + "type": 19, "optional": true }, { "name": "width", - "type": 11, + "type": 13, "optional": false } ], @@ -50087,12 +66626,16 @@ { "kind": "union", "types": [ - 13, - 14, 15, - 16 + 16, + 17, + 18 ] }, + { + "kind": "literal", + "value": "image/gif" + }, { "kind": "literal", "value": "image/jpeg" @@ -50101,10 +66644,6 @@ "kind": "literal", "value": "image/png" }, - { - "kind": "literal", - "value": "image/gif" - }, { "kind": "literal", "value": "image/webp" @@ -50114,12 +66653,12 @@ "properties": [ { "name": "height", - "type": 11, + "type": 13, "optional": false }, { "name": "width", - "type": 11, + "type": 13, "optional": false } ], @@ -50138,48 +66677,7 @@ "properties": [ { "name": "attachment", - "type": 21, - "optional": false - }, - { - "name": "type", - "type": 22, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "attachmentId", - "type": 7, - "optional": false - }, - { - "name": "bytes", - "type": 11, - "optional": false - }, - { - "name": "name", - "type": 7, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "file" - }, - { - "kind": "object", - "properties": [ - { - "name": "text", - "type": 7, + "type": 23, "optional": false }, { @@ -50190,21 +66688,22 @@ ], "indices": [] }, - { - "kind": "literal", - "value": "reasoning" - }, { "kind": "object", "properties": [ { - "name": "text", - "type": 7, + "name": "attachmentId", + "type": 5, "optional": false }, { - "name": "type", - "type": 26, + "name": "bytes", + "type": 13, + "optional": false + }, + { + "name": "name", + "type": 5, "optional": false } ], @@ -50212,141 +66711,11 @@ }, { "kind": "literal", - "value": "text" + "value": "file" }, { - "kind": "literal", - "value": "user" - }, - { - "kind": "union", - "types": [ - 29, - 38, - 40, - 41, - 44, - 49, - 51, - 56, - 57, - 58, - 60, - 62, - 63, - 71, - 73, - 75, - 77, - 79, - 82, - 83 - ] - }, - { - "kind": "object", - "properties": [ - { - "name": "baseline", - "type": 18, - "optional": true - }, - { - "name": "baselineIdentity", - "type": 7, - "optional": true - }, - { - "name": "changes", - "type": 30, - "optional": false - }, - { - "name": "form", - "type": 36, - "optional": false - }, - { - "name": "kind", - "type": 37, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "array", - "element": 31 - }, - { - "kind": "object", - "properties": [ - { - "name": "action", - "type": 32, - "optional": false - }, - { - "name": "digest", - "type": 7, - "optional": true - }, - { - "name": "path", - "type": 7, - "optional": false - }, - { - "name": "scope", - "type": 7, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "union", - "types": [ - 33, - 34, - 35 - ] - }, - { - "kind": "literal", - "value": "remove" - }, - { - "kind": "literal", - "value": "replace" - }, - { - "kind": "literal", - "value": "set" - }, - { - "kind": "literal", - "value": "instructions" - }, - { - "kind": "literal", - "value": "agent-instructions" - }, - { - "kind": "object", - "properties": [ - { - "name": "callId", - "type": 7, - "optional": false - }, - { - "name": "kind", - "type": 39, - "optional": false - } - ], - "indices": [] + "kind": "primitive", + "type": "boolean" }, { "kind": "literal", @@ -50356,18 +66725,13 @@ "kind": "object", "properties": [ { - "name": "clientTimeZone", - "type": 7, - "optional": true - }, - { - "name": "kind", - "type": 27, + "name": "callId", + "type": 5, "optional": false }, { - "name": "rpcId", - "type": 7, + "name": "kind", + "type": 26, "optional": false } ], @@ -50377,38 +66741,171 @@ "kind": "object", "properties": [ { - "name": "deliveryId", - "type": 7, + "name": "content", + "type": 2, "optional": false }, { - "name": "form", - "type": 42, + "name": "id", + "type": 5, "optional": false }, { - "name": "kind", - "type": 43, - "optional": false - }, - { - "name": "provider", - "type": 7, - "optional": false - }, - { - "name": "ruleId", - "type": 7, + "name": "role", + "type": 29, "optional": false }, { "name": "source", - "type": 7, + "type": 30, + "optional": false, + "compatibility": { + "version": 1, + "policy": "session-source-attribution", + "binding": "session.user-message.source", + "discriminator": "kind", + "unknownKinds": "preserve", + "attributionKinds": [ + "tmux-context" + ] + } + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "user" + }, + { + "kind": "union", + "types": [ + 27, + 31, + 34, + 36, + 39, + 41, + 43, + 45, + 47, + 49, + 51, + 53, + 55, + 57, + 59, + 60, + 61, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 91, + 92, + 93, + 94, + 95, + 96, + 97, + 98, + 99, + 100, + 101, + 102, + 103, + 105, + 107, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 127, + 129, + 130, + 138, + 139, + 141, + 143, + 147, + 149, + 156, + 160, + 161, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 172, + 174, + 176, + 177, + 178, + 179, + 180, + 181, + 182, + 183, + 184, + 185, + 186 + ] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 32, + "optional": false + }, + { + "name": "kind", + "type": 33, "optional": false }, { "name": "summary", - "type": 7, + "type": 5, "optional": false } ], @@ -50420,78 +66917,188 @@ }, { "kind": "literal", - "value": "webhook" + "value": "user-approval" }, { "kind": "object", "properties": [ { - "name": "entries", - "type": 45, + "name": "form", + "type": 32, "optional": false }, + { + "name": "kind", + "type": 35, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "dsh-session-title-llm" + }, + { + "kind": "object", + "properties": [ { "name": "form", - "type": 47, + "type": 37, + "optional": false + }, + { + "name": "kind", + "type": 38, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "instructions" + }, + { + "kind": "literal", + "value": "hooks-claude-code" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 37, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "hooks-codex" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 37, + "optional": false + }, + { + "name": "kind", + "type": 42, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "model-selection" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 37, + "optional": false + }, + { + "name": "kind", + "type": 44, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "plan-mode" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 37, + "optional": false + }, + { + "name": "kind", + "type": 46, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "repeat-tool-reminder" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 37, "optional": false }, { "name": "kind", "type": 48, "optional": false - }, - { - "name": "update", - "type": 18, - "optional": true - } - ], - "indices": [] - }, - { - "kind": "array", - "element": 46 - }, - { - "kind": "object", - "properties": [ - { - "name": "description", - "type": 7, - "optional": false - }, - { - "name": "name", - "type": 7, - "optional": false } ], "indices": [] }, { "kind": "literal", - "value": "catalog" - }, - { - "kind": "literal", - "value": "skill-catalog" + "value": "runtime-context" }, { "kind": "object", "properties": [ { "name": "form", - "type": 36, + "type": 37, "optional": false }, { "name": "kind", "type": 50, "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "schedule" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 37, + "optional": false }, { - "name": "name", - "type": 7, + "name": "kind", + "type": 52, "optional": false } ], @@ -50499,28 +67106,18 @@ }, { "kind": "literal", - "value": "skill-invocation" + "value": "time-context" }, { "kind": "object", "properties": [ { "name": "form", - "type": 52, + "type": 37, "optional": false }, { "name": "kind", - "type": 53, - "optional": false - }, - { - "name": "plugin", - "type": 7, - "optional": false - }, - { - "name": "sections", "type": 54, "optional": false } @@ -50529,27 +67126,59 @@ }, { "kind": "literal", - "value": "snapshot" + "value": "tmux-context" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 37, + "optional": false + }, + { + "name": "kind", + "type": 56, + "optional": false + } + ], + "indices": [] }, { "kind": "literal", - "value": "plugin" - }, - { - "kind": "array", - "element": 55 + "value": "tool-goal" }, { "kind": "object", "properties": [ { - "name": "name", - "type": 7, + "name": "form", + "type": 37, "optional": false }, { - "name": "text", - "type": 7, + "name": "kind", + "type": 58, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tool-jobs" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 37, + "optional": false + }, + { + "name": "kind", + "type": 33, "optional": false } ], @@ -50560,22 +67189,12 @@ "properties": [ { "name": "form", - "type": 42, + "type": 37, "optional": false }, { "name": "kind", - "type": 53, - "optional": false - }, - { - "name": "plugin", - "type": 7, - "optional": false - }, - { - "name": "summary", - "type": 7, + "type": 35, "optional": false } ], @@ -50586,38 +67205,12 @@ "properties": [ { "name": "form", - "type": 36, + "type": 62, "optional": false }, { "name": "kind", - "type": 53, - "optional": false - }, - { - "name": "plugin", - "type": 7, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 59, - "optional": false - }, - { - "name": "kind", - "type": 53, - "optional": false - }, - { - "name": "plugin", - "type": 7, + "type": 38, "optional": false } ], @@ -50632,17 +67225,204 @@ "properties": [ { "name": "form", - "type": 61, + "type": 62, "optional": false }, { "name": "kind", - "type": 53, + "type": 40, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 62, "optional": false }, { - "name": "plugin", - "type": 7, + "name": "kind", + "type": 42, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 62, + "optional": false + }, + { + "name": "kind", + "type": 44, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 62, + "optional": false + }, + { + "name": "kind", + "type": 46, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 62, + "optional": false + }, + { + "name": "kind", + "type": 48, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 62, + "optional": false + }, + { + "name": "kind", + "type": 50, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 62, + "optional": false + }, + { + "name": "kind", + "type": 52, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 62, + "optional": false + }, + { + "name": "kind", + "type": 54, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 62, + "optional": false + }, + { + "name": "kind", + "type": 56, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 62, + "optional": false + }, + { + "name": "kind", + "type": 58, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 62, + "optional": false + }, + { + "name": "kind", + "type": 33, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 62, + "optional": false + }, + { + "name": "kind", + "type": 35, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 76, + "optional": false + }, + { + "name": "kind", + "type": 38, "optional": false } ], @@ -50657,17 +67437,12 @@ "properties": [ { "name": "form", - "type": 47, + "type": 76, "optional": false }, { "name": "kind", - "type": 53, - "optional": false - }, - { - "name": "plugin", - "type": 7, + "type": 40, "optional": false } ], @@ -50678,161 +67453,188 @@ "properties": [ { "name": "form", - "type": 59, + "type": 76, "optional": false }, { "name": "kind", - "type": 64, - "optional": false - }, - { - "name": "references", - "type": 65, - "optional": false - }, - { - "name": "version", - "type": 70, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "session-reference" - }, - { - "kind": "array", - "element": 66 - }, - { - "kind": "object", - "properties": [ - { - "name": "capturedFormatVersion", - "type": 11, - "optional": true - }, - { - "name": "capturedThroughSeq", - "type": 67, - "optional": false - }, - { - "name": "compacted", - "type": 69, - "optional": false - }, - { - "name": "inputIndex", - "type": 11, - "optional": false - }, - { - "name": "label", - "type": 7, - "optional": false - }, - { - "name": "omittedBytes", - "type": 11, - "optional": false - }, - { - "name": "omittedMessages", - "type": 11, - "optional": false - }, - { - "name": "originalMessages", - "type": 11, - "optional": false - }, - { - "name": "retainedMessages", - "type": 11, - "optional": false - }, - { - "name": "sessionId", - "type": 7, - "optional": false - }, - { - "name": "truncated", - "type": 69, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "union", - "types": [ - 11, - 68 - ] - }, - { - "kind": "primitive", - "type": "null" - }, - { - "kind": "primitive", - "type": "boolean" - }, - { - "kind": "literal", - "value": 1 - }, - { - "kind": "object", - "properties": [ - { - "name": "form", "type": 42, "optional": false - }, - { - "name": "kind", - "type": 72, - "optional": false - }, - { - "name": "senderSessionId", - "type": 7, - "optional": false - }, - { - "name": "summary", - "type": 7, - "optional": false } ], "indices": [] }, - { - "kind": "literal", - "value": "subagent-settled" - }, { "kind": "object", "properties": [ { "name": "form", - "type": 61, + "type": 76, "optional": false }, { "name": "kind", - "type": 74, + "type": 44, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 76, "optional": false }, { - "name": "senderSessionId", - "type": 7, + "name": "kind", + "type": 46, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 76, + "optional": false + }, + { + "name": "kind", + "type": 48, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 76, + "optional": false + }, + { + "name": "kind", + "type": 50, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 76, + "optional": false + }, + { + "name": "kind", + "type": 52, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 76, + "optional": false + }, + { + "name": "kind", + "type": 54, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 76, + "optional": false + }, + { + "name": "kind", + "type": 56, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 76, + "optional": false + }, + { + "name": "kind", + "type": 58, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 76, + "optional": false + }, + { + "name": "kind", + "type": 33, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 76, + "optional": false + }, + { + "name": "kind", + "type": 35, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 90, + "optional": false + }, + { + "name": "kind", + "type": 38, "optional": false } ], @@ -50840,29 +67642,221 @@ }, { "kind": "literal", - "value": "agent-message" + "value": "catalog" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 90, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 90, + "optional": false + }, + { + "name": "kind", + "type": 42, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 90, + "optional": false + }, + { + "name": "kind", + "type": 44, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 90, + "optional": false + }, + { + "name": "kind", + "type": 46, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 90, + "optional": false + }, + { + "name": "kind", + "type": 48, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 90, + "optional": false + }, + { + "name": "kind", + "type": 50, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 90, + "optional": false + }, + { + "name": "kind", + "type": 52, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 90, + "optional": false + }, + { + "name": "kind", + "type": 54, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 90, + "optional": false + }, + { + "name": "kind", + "type": 56, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 90, + "optional": false + }, + { + "name": "kind", + "type": 58, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 90, + "optional": false + }, + { + "name": "kind", + "type": 33, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 90, + "optional": false + }, + { + "name": "kind", + "type": 35, + "optional": false + } + ], + "indices": [] }, { "kind": "object", "properties": [ { "name": "goalId", - "type": 7, + "type": 5, "optional": false }, { "name": "kind", - "type": 76, + "type": 104, "optional": false }, { "name": "revision", - "type": 11, + "type": 13, "optional": false }, { "name": "round", - "type": 11, + "type": 13, "optional": false } ], @@ -50877,27 +67871,27 @@ "properties": [ { "name": "kind", - "type": 78, + "type": 106, "optional": false }, { "name": "messageId", - "type": 7, + "type": 5, "optional": false }, { "name": "senderId", - "type": 7, + "type": 5, "optional": false }, { "name": "senderName", - "type": 7, + "type": 5, "optional": false }, { "name": "teamId", - "type": 7, + "type": 5, "optional": false } ], @@ -50912,22 +67906,22 @@ "properties": [ { "name": "kind", - "type": 80, + "type": 108, "optional": false }, { "name": "model", - "type": 7, + "type": 5, "optional": false }, { "name": "provider", - "type": 7, + "type": 5, "optional": false }, { "name": "replayState", - "type": 81, + "type": 109, "optional": true } ], @@ -50946,12 +67940,7 @@ "properties": [ { "name": "kind", - "type": 53, - "optional": false - }, - { - "name": "plugin", - "type": 7, + "type": 38, "optional": false } ], @@ -50962,7 +67951,73 @@ "properties": [ { "name": "kind", - "type": 27, + "type": 40, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 42, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 44, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 46, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 48, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 50, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 118, "optional": false } ], @@ -50970,31 +68025,1127 @@ }, { "kind": "literal", - "value": "canceled" + "value": "system-prompt" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 52, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 54, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 56, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 58, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 29, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 33, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 126, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "code-mode" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 128, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "cordis-host-runner" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 35, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "baseline", + "type": 20, + "optional": true + }, + { + "name": "baselineIdentity", + "type": 5, + "optional": true + }, + { + "name": "changes", + "type": 131, + "optional": false + }, + { + "name": "form", + "type": 37, + "optional": false + }, + { + "name": "kind", + "type": 137, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "array", + "element": 132 + }, + { + "kind": "object", + "properties": [ + { + "name": "action", + "type": 133, + "optional": false + }, + { + "name": "digest", + "type": 5, + "optional": true + }, + { + "name": "path", + "type": 5, + "optional": false + }, + { + "name": "scope", + "type": 5, + "optional": false + } + ], + "indices": [] }, { "kind": "union", "types": [ - 86, - 87 + 134, + 135, + 136 ] }, { "kind": "literal", - "value": "next-step" + "value": "remove" }, { "kind": "literal", - "value": "next-turn" + "value": "replace" }, { "kind": "literal", - "value": "agent/inbox/spliced" + "value": "set" + }, + { + "kind": "literal", + "value": "agent-instructions" + }, + { + "kind": "object", + "properties": [ + { + "name": "clientTimeZone", + "type": 5, + "optional": true + }, + { + "name": "kind", + "type": 29, + "optional": false + }, + { + "name": "rpcId", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "compactionId", + "type": 5, + "optional": false + }, + { + "name": "kind", + "type": 140, + "optional": false + }, + { + "name": "sourceCommandId", + "type": 5, + "optional": true + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "compact-checkpoint" + }, + { + "kind": "object", + "properties": [ + { + "name": "deliveryId", + "type": 5, + "optional": false + }, + { + "name": "form", + "type": 32, + "optional": false + }, + { + "name": "kind", + "type": 142, + "optional": false + }, + { + "name": "provider", + "type": 5, + "optional": false + }, + { + "name": "ruleId", + "type": 5, + "optional": false + }, + { + "name": "source", + "type": 5, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "webhook" + }, + { + "kind": "object", + "properties": [ + { + "name": "entries", + "type": 144, + "optional": false + }, + { + "name": "form", + "type": 90, + "optional": false + }, + { + "name": "kind", + "type": 146, + "optional": false + }, + { + "name": "update", + "type": 20, + "optional": true + } + ], + "indices": [] + }, + { + "kind": "array", + "element": 145 + }, + { + "kind": "object", + "properties": [ + { + "name": "description", + "type": 5, + "optional": false + }, + { + "name": "name", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "skill-catalog" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 37, + "optional": false + }, + { + "name": "kind", + "type": 148, + "optional": false + }, + { + "name": "name", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "skill-invocation" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 62, + "optional": false + }, + { + "name": "kind", + "type": 150, + "optional": false + }, + { + "name": "references", + "type": 151, + "optional": false + }, + { + "name": "version", + "type": 155, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "session-reference" + }, + { + "kind": "array", + "element": 152 + }, + { + "kind": "object", + "properties": [ + { + "name": "capturedFormatVersion", + "type": 13, + "optional": true + }, + { + "name": "capturedThroughSeq", + "type": 153, + "optional": false + }, + { + "name": "compacted", + "type": 25, + "optional": false + }, + { + "name": "inputIndex", + "type": 13, + "optional": false + }, + { + "name": "label", + "type": 5, + "optional": false + }, + { + "name": "omittedBytes", + "type": 13, + "optional": false + }, + { + "name": "omittedMessages", + "type": 13, + "optional": false + }, + { + "name": "originalMessages", + "type": 13, + "optional": false + }, + { + "name": "retainedMessages", + "type": 13, + "optional": false + }, + { + "name": "sessionId", + "type": 5, + "optional": false + }, + { + "name": "truncated", + "type": 25, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "union", + "types": [ + 13, + 154 + ] + }, + { + "kind": "primitive", + "type": "null" + }, + { + "kind": "literal", + "value": 1 + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 157, + "optional": false + }, + { + "name": "kind", + "type": 38, + "optional": false + }, + { + "name": "sections", + "type": 158, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "snapshot" + }, + { + "kind": "array", + "element": 159 + }, + { + "kind": "object", + "properties": [ + { + "name": "name", + "type": 5, + "optional": false + }, + { + "name": "text", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 157, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + }, + { + "name": "sections", + "type": 158, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 157, + "optional": false + }, + { + "name": "kind", + "type": 42, + "optional": false + }, + { + "name": "sections", + "type": 158, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 157, + "optional": false + }, + { + "name": "kind", + "type": 44, + "optional": false + }, + { + "name": "sections", + "type": 158, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 157, + "optional": false + }, + { + "name": "kind", + "type": 46, + "optional": false + }, + { + "name": "sections", + "type": 158, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 157, + "optional": false + }, + { + "name": "kind", + "type": 48, + "optional": false + }, + { + "name": "sections", + "type": 158, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 157, + "optional": false + }, + { + "name": "kind", + "type": 50, + "optional": false + }, + { + "name": "sections", + "type": 158, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 157, + "optional": false + }, + { + "name": "kind", + "type": 52, + "optional": false + }, + { + "name": "sections", + "type": 158, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 157, + "optional": false + }, + { + "name": "kind", + "type": 54, + "optional": false + }, + { + "name": "sections", + "type": 158, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 157, + "optional": false + }, + { + "name": "kind", + "type": 56, + "optional": false + }, + { + "name": "sections", + "type": 158, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 157, + "optional": false + }, + { + "name": "kind", + "type": 58, + "optional": false + }, + { + "name": "sections", + "type": 158, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 157, + "optional": false + }, + { + "name": "kind", + "type": 33, + "optional": false + }, + { + "name": "sections", + "type": 158, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 157, + "optional": false + }, + { + "name": "kind", + "type": 35, + "optional": false + }, + { + "name": "sections", + "type": 158, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 32, + "optional": false + }, + { + "name": "kind", + "type": 173, + "optional": false + }, + { + "name": "senderSessionId", + "type": 5, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "subagent-settled" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 76, + "optional": false + }, + { + "name": "kind", + "type": 175, + "optional": false + }, + { + "name": "senderSessionId", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "agent-message" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 32, + "optional": false + }, + { + "name": "kind", + "type": 38, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 32, + "optional": false + }, + { + "name": "kind", + "type": 40, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 32, + "optional": false + }, + { + "name": "kind", + "type": 42, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 32, + "optional": false + }, + { + "name": "kind", + "type": 44, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 32, + "optional": false + }, + { + "name": "kind", + "type": 46, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 32, + "optional": false + }, + { + "name": "kind", + "type": 48, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 32, + "optional": false + }, + { + "name": "kind", + "type": 50, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 32, + "optional": false + }, + { + "name": "kind", + "type": 52, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 32, + "optional": false + }, + { + "name": "kind", + "type": 54, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 32, + "optional": false + }, + { + "name": "kind", + "type": 56, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 32, + "optional": false + }, + { + "name": "kind", + "type": 58, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "content", + "type": 2, + "optional": false + }, + { + "name": "id", + "type": 5, + "optional": false + }, + { + "name": "role", + "type": 188, + "optional": false + }, + { + "name": "source", + "type": 107, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "assistant" + }, + { + "kind": "object", + "properties": [ + { + "name": "content", + "type": 2, + "optional": false + }, + { + "name": "id", + "type": 5, + "optional": false + }, + { + "name": "role", + "type": 190, + "optional": false + }, + { + "name": "source", + "type": 117, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "system" } ] }, - "names": [], - "sources": [] + "names": [ + "packages/llm/llm/src/message.ts#Message" + ], + "sources": [ + "packages/llm/llm/src/message.ts:190" + ] }, { "digest": "ccca7d237e176afec87877c379035a69e715ae0fb4e859015d29f14cc4376588", @@ -51054,6 +69205,49 @@ "names": [], "sources": [] }, + { + "digest": "cda2345a9be9d139df49ccbd16dcba716f3440178bf20ff8b801fda1f5eb77dc", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + }, + { + "name": "summary", + "type": 3, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "notice" + }, + { + "kind": "literal", + "value": "runtime-context" + }, + { + "kind": "primitive", + "type": "string" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "cdca80b8dad24d4e7b1d5a288a8475ba8d8d46be385bd2da85f122ee836f1670", "schema": { @@ -51759,6 +69953,40 @@ "names": [], "sources": [] }, + { + "digest": "d85590a5675c6e2fd8164e5792a6cceac714605b8ac228adae5ee668facb1490", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "catalog" + }, + { + "kind": "literal", + "value": "repeat-tool-reminder" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "d8704810efe22c47f7062870e0d30ef1e9a1a9cc34edd10f71461b944d34e878", "schema": { @@ -52745,6 +70973,20 @@ "packages/llm/llm/src/message.ts:29" ] }, + { + "digest": "d9edf1862e4471d6ad8a106a3f4160e0643874368707d50ecd8e27e5ee7a2567", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "literal", + "value": "schedule" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "dacf3d5f3e4ff619c1320e64a48dec5e7ecd7870bece65fbd449a0e63adfa521", "schema": { @@ -52759,6 +71001,69 @@ "names": [], "sources": [] }, + { + "digest": "db06ef35b27a38425046b2228fa6bce9582abe140d781d363137eb2f4d233a1c", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + }, + { + "name": "sections", + "type": 3, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "snapshot" + }, + { + "kind": "literal", + "value": "repeat-tool-reminder" + }, + { + "kind": "array", + "element": 4 + }, + { + "kind": "object", + "properties": [ + { + "name": "name", + "type": 5, + "optional": false + }, + { + "name": "text", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "primitive", + "type": "string" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "db6c5246911d47a7969f6b4cb47c7d0dbbde75c402710b22ace3672fa97bebe0", "schema": { @@ -52891,7 +71196,7 @@ "sources": [] }, { - "digest": "dda6e111a8ccfc12f6e742e977a1a4e3549e8c03732a5ff6c8d7c3d4bcb7a412", + "digest": "dd5ee8762bd8a14b6c6bffedd1753e4e78505bb0f9ea1621018d03a54eef59d5", "schema": { "root": 0, "nodes": [ @@ -52907,10 +71212,39 @@ "name": "kind", "type": 2, "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "catalog" + }, + { + "kind": "literal", + "value": "tool-jobs" + } + ] + }, + "names": [], + "sources": [] + }, + { + "digest": "dd6cc2bb2a8f28248347021ad93565360b196a042360b4cd16b569d3a2a91f2d", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false }, { - "name": "plugin", - "type": 3, + "name": "kind", + "type": 2, "optional": false } ], @@ -52918,15 +71252,11 @@ }, { "kind": "literal", - "value": "instructions" + "value": "recall" }, { "kind": "literal", - "value": "plugin" - }, - { - "kind": "primitive", - "type": "string" + "value": "tool-jobs" } ] }, @@ -52961,6 +71291,40 @@ "names": [], "sources": [] }, + { + "digest": "deaae5cd30987d4f49398e8f9d994c125907e7f928300745fb1dbf15f145d0e7", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "relay" + }, + { + "kind": "literal", + "value": "plan-mode" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "df5d9709b7db2a72510dc52052a23f0c38f39730af1504bab8bccabc14fae528", "schema": { @@ -54412,20 +72776,6 @@ "names": [], "sources": [] }, - { - "digest": "e654d28d1e6c471147310d2fba396d00969cfe6ed9022626d3f2c2312e0b1cbb", - "schema": { - "root": 0, - "nodes": [ - { - "kind": "literal", - "value": "plugin" - } - ] - }, - "names": [], - "sources": [] - }, { "digest": "e72269f931559e901e5e8fe1cfcbd0669fb795f43cc038ff39fba62f60403c33", "schema": { @@ -54700,74 +73050,6 @@ "packages/llm/llm/src/types.ts:418" ] }, - { - "digest": "e8d26e6993445743e6c4342c31b284c7d8f5574369abdd6021183af1a6b3538f", - "schema": { - "root": 0, - "nodes": [ - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 1, - "optional": false - }, - { - "name": "kind", - "type": 2, - "optional": false - }, - { - "name": "plugin", - "type": 3, - "optional": false - }, - { - "name": "sections", - "type": 4, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "snapshot" - }, - { - "kind": "literal", - "value": "plugin" - }, - { - "kind": "primitive", - "type": "string" - }, - { - "kind": "array", - "element": 5 - }, - { - "kind": "object", - "properties": [ - { - "name": "name", - "type": 3, - "optional": false - }, - { - "name": "text", - "type": 3, - "optional": false - } - ], - "indices": [] - } - ] - }, - "names": [], - "sources": [] - }, { "digest": "e8de0f457fed5b9ff94dc4950b59ef75fd8ba8af665cc7899485924a62653367", "schema": { @@ -54823,6 +73105,2825 @@ "packages/core/session/src/types.ts:195" ] }, + { + "digest": "eb655047c0dd3f2f3aefd2c9c719df0d060dd88032ba7caf731ea39db5a6725f", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "data", + "type": 1, + "optional": false + }, + { + "name": "ignorable", + "type": 20, + "optional": true + }, + { + "name": "seq", + "type": 2, + "optional": false + }, + { + "name": "time", + "type": 2, + "optional": false + }, + { + "name": "type", + "type": 196, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "maxTokens", + "type": 2, + "optional": false + }, + { + "name": "messageSeqs", + "type": 3, + "optional": false + }, + { + "name": "messages", + "type": 4, + "optional": false + }, + { + "name": "route", + "type": 195, + "optional": false + }, + { + "name": "system", + "type": 10, + "optional": false + }, + { + "name": "titleProvider", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "primitive", + "type": "number" + }, + { + "kind": "array", + "element": 2 + }, + { + "kind": "array", + "element": 5 + }, + { + "kind": "union", + "types": [ + 6, + 32, + 191, + 193 + ] + }, + { + "kind": "object", + "properties": [ + { + "name": "content", + "type": 7, + "optional": false + }, + { + "name": "id", + "type": 10, + "optional": false + }, + { + "name": "isError", + "type": 29, + "optional": true + }, + { + "name": "role", + "type": 30, + "optional": false + }, + { + "name": "source", + "type": 31, + "optional": false + }, + { + "name": "toolCallId", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "array", + "element": 8 + }, + { + "kind": "union", + "types": [ + 9, + 12, + 22, + 25, + 27 + ] + }, + { + "kind": "object", + "properties": [ + { + "name": "arguments", + "type": 10, + "optional": false + }, + { + "name": "id", + "type": 10, + "optional": false + }, + { + "name": "name", + "type": 10, + "optional": false + }, + { + "name": "type", + "type": 11, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "primitive", + "type": "string" + }, + { + "kind": "literal", + "value": "tool-call" + }, + { + "kind": "object", + "properties": [ + { + "name": "attachment", + "type": 13, + "optional": false + }, + { + "name": "offloaded", + "type": 20, + "optional": true + }, + { + "name": "type", + "type": 21, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "attachmentId", + "type": 10, + "optional": false + }, + { + "name": "bytes", + "type": 2, + "optional": false + }, + { + "name": "height", + "type": 2, + "optional": false + }, + { + "name": "mediaType", + "type": 14, + "optional": false + }, + { + "name": "name", + "type": 10, + "optional": true + }, + { + "name": "originalDimensions", + "type": 19, + "optional": true + }, + { + "name": "width", + "type": 2, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "union", + "types": [ + 15, + 16, + 17, + 18 + ] + }, + { + "kind": "literal", + "value": "image/gif" + }, + { + "kind": "literal", + "value": "image/jpeg" + }, + { + "kind": "literal", + "value": "image/png" + }, + { + "kind": "literal", + "value": "image/webp" + }, + { + "kind": "object", + "properties": [ + { + "name": "height", + "type": 2, + "optional": false + }, + { + "name": "width", + "type": 2, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": true + }, + { + "kind": "literal", + "value": "image" + }, + { + "kind": "object", + "properties": [ + { + "name": "attachment", + "type": 23, + "optional": false + }, + { + "name": "type", + "type": 24, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "attachmentId", + "type": 10, + "optional": false + }, + { + "name": "bytes", + "type": 2, + "optional": false + }, + { + "name": "name", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "file" + }, + { + "kind": "object", + "properties": [ + { + "name": "text", + "type": 10, + "optional": false + }, + { + "name": "type", + "type": 26, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "reasoning" + }, + { + "kind": "object", + "properties": [ + { + "name": "text", + "type": 10, + "optional": false + }, + { + "name": "type", + "type": 28, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "text" + }, + { + "kind": "primitive", + "type": "boolean" + }, + { + "kind": "literal", + "value": "tool" + }, + { + "kind": "object", + "properties": [ + { + "name": "callId", + "type": 10, + "optional": false + }, + { + "name": "kind", + "type": 30, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "content", + "type": 7, + "optional": false + }, + { + "name": "id", + "type": 10, + "optional": false + }, + { + "name": "role", + "type": 33, + "optional": false + }, + { + "name": "source", + "type": 34, + "optional": false, + "compatibility": { + "version": 1, + "policy": "session-source-attribution", + "binding": "session.user-message.source", + "discriminator": "kind", + "unknownKinds": "preserve", + "attributionKinds": [ + "tmux-context" + ] + } + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "user" + }, + { + "kind": "union", + "types": [ + 31, + 35, + 38, + 40, + 42, + 44, + 46, + 54, + 55, + 57, + 59, + 62, + 67, + 69, + 71, + 79, + 84, + 86, + 87, + 88, + 89, + 90, + 91, + 93, + 94, + 95, + 96, + 98, + 100, + 102, + 104, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135, + 136, + 137, + 138, + 139, + 140, + 141, + 142, + 143, + 144, + 145, + 146, + 147, + 148, + 149, + 150, + 151, + 152, + 153, + 154, + 155, + 156, + 157, + 158, + 159, + 160, + 161, + 163, + 165, + 166, + 169, + 170, + 171, + 172, + 173, + 174, + 175, + 176, + 178, + 179, + 180, + 181, + 182, + 183, + 184, + 185, + 187, + 189, + 190 + ] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 36, + "optional": false + }, + { + "name": "kind", + "type": 37, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "instructions" + }, + { + "kind": "literal", + "value": "model-selection" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 36, + "optional": false + }, + { + "name": "kind", + "type": 39, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "plan-mode" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 36, + "optional": false + }, + { + "name": "kind", + "type": 41, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "repeat-tool-reminder" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 36, + "optional": false + }, + { + "name": "kind", + "type": 43, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "runtime-context" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 36, + "optional": false + }, + { + "name": "kind", + "type": 45, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "schedule" + }, + { + "kind": "object", + "properties": [ + { + "name": "baseline", + "type": 20, + "optional": true + }, + { + "name": "baselineIdentity", + "type": 10, + "optional": true + }, + { + "name": "changes", + "type": 47, + "optional": false + }, + { + "name": "form", + "type": 36, + "optional": false + }, + { + "name": "kind", + "type": 53, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "array", + "element": 48 + }, + { + "kind": "object", + "properties": [ + { + "name": "action", + "type": 49, + "optional": false + }, + { + "name": "digest", + "type": 10, + "optional": true + }, + { + "name": "path", + "type": 10, + "optional": false + }, + { + "name": "scope", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "union", + "types": [ + 50, + 51, + 52 + ] + }, + { + "kind": "literal", + "value": "remove" + }, + { + "kind": "literal", + "value": "replace" + }, + { + "kind": "literal", + "value": "set" + }, + { + "kind": "literal", + "value": "agent-instructions" + }, + { + "kind": "object", + "properties": [ + { + "name": "clientTimeZone", + "type": 10, + "optional": true + }, + { + "name": "kind", + "type": 33, + "optional": false + }, + { + "name": "rpcId", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "compactionId", + "type": 10, + "optional": false + }, + { + "name": "kind", + "type": 56, + "optional": false + }, + { + "name": "sourceCommandId", + "type": 10, + "optional": true + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "compact-checkpoint" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 36, + "optional": false + }, + { + "name": "kind", + "type": 58, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "time-context" + }, + { + "kind": "object", + "properties": [ + { + "name": "deliveryId", + "type": 10, + "optional": false + }, + { + "name": "form", + "type": 60, + "optional": false + }, + { + "name": "kind", + "type": 61, + "optional": false + }, + { + "name": "provider", + "type": 10, + "optional": false + }, + { + "name": "ruleId", + "type": 10, + "optional": false + }, + { + "name": "source", + "type": 10, + "optional": false + }, + { + "name": "summary", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "notice" + }, + { + "kind": "literal", + "value": "webhook" + }, + { + "kind": "object", + "properties": [ + { + "name": "entries", + "type": 63, + "optional": false + }, + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 66, + "optional": false + }, + { + "name": "update", + "type": 20, + "optional": true + } + ], + "indices": [] + }, + { + "kind": "array", + "element": 64 + }, + { + "kind": "object", + "properties": [ + { + "name": "description", + "type": 10, + "optional": false + }, + { + "name": "name", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "catalog" + }, + { + "kind": "literal", + "value": "skill-catalog" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 36, + "optional": false + }, + { + "name": "kind", + "type": 68, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tmux-context" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 36, + "optional": false + }, + { + "name": "kind", + "type": 70, + "optional": false + }, + { + "name": "name", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "skill-invocation" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 73, + "optional": false + }, + { + "name": "references", + "type": 74, + "optional": false + }, + { + "name": "version", + "type": 78, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "recall" + }, + { + "kind": "literal", + "value": "session-reference" + }, + { + "kind": "array", + "element": 75 + }, + { + "kind": "object", + "properties": [ + { + "name": "capturedFormatVersion", + "type": 2, + "optional": true + }, + { + "name": "capturedThroughSeq", + "type": 76, + "optional": false + }, + { + "name": "compacted", + "type": 29, + "optional": false + }, + { + "name": "inputIndex", + "type": 2, + "optional": false + }, + { + "name": "label", + "type": 10, + "optional": false + }, + { + "name": "omittedBytes", + "type": 2, + "optional": false + }, + { + "name": "omittedMessages", + "type": 2, + "optional": false + }, + { + "name": "originalMessages", + "type": 2, + "optional": false + }, + { + "name": "retainedMessages", + "type": 2, + "optional": false + }, + { + "name": "sessionId", + "type": 10, + "optional": false + }, + { + "name": "truncated", + "type": 29, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "union", + "types": [ + 2, + 77 + ] + }, + { + "kind": "primitive", + "type": "null" + }, + { + "kind": "literal", + "value": 1 + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 80, + "optional": false + }, + { + "name": "kind", + "type": 81, + "optional": false + }, + { + "name": "sections", + "type": 82, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "snapshot" + }, + { + "kind": "literal", + "value": "hooks-claude-code" + }, + { + "kind": "array", + "element": 83 + }, + { + "kind": "object", + "properties": [ + { + "name": "name", + "type": 10, + "optional": false + }, + { + "name": "text", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 80, + "optional": false + }, + { + "name": "kind", + "type": 85, + "optional": false + }, + { + "name": "sections", + "type": 82, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "hooks-codex" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 80, + "optional": false + }, + { + "name": "kind", + "type": 37, + "optional": false + }, + { + "name": "sections", + "type": 82, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 80, + "optional": false + }, + { + "name": "kind", + "type": 39, + "optional": false + }, + { + "name": "sections", + "type": 82, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 80, + "optional": false + }, + { + "name": "kind", + "type": 41, + "optional": false + }, + { + "name": "sections", + "type": 82, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 80, + "optional": false + }, + { + "name": "kind", + "type": 43, + "optional": false + }, + { + "name": "sections", + "type": 82, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 80, + "optional": false + }, + { + "name": "kind", + "type": 45, + "optional": false + }, + { + "name": "sections", + "type": 82, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 36, + "optional": false + }, + { + "name": "kind", + "type": 92, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tool-goal" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 80, + "optional": false + }, + { + "name": "kind", + "type": 58, + "optional": false + }, + { + "name": "sections", + "type": 82, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 80, + "optional": false + }, + { + "name": "kind", + "type": 68, + "optional": false + }, + { + "name": "sections", + "type": 82, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 80, + "optional": false + }, + { + "name": "kind", + "type": 92, + "optional": false + }, + { + "name": "sections", + "type": 82, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 80, + "optional": false + }, + { + "name": "kind", + "type": 97, + "optional": false + }, + { + "name": "sections", + "type": 82, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tool-jobs" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 80, + "optional": false + }, + { + "name": "kind", + "type": 99, + "optional": false + }, + { + "name": "sections", + "type": 82, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "user-approval" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 80, + "optional": false + }, + { + "name": "kind", + "type": 101, + "optional": false + }, + { + "name": "sections", + "type": 82, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "dsh-session-title-llm" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 60, + "optional": false + }, + { + "name": "kind", + "type": 103, + "optional": false + }, + { + "name": "senderSessionId", + "type": 10, + "optional": false + }, + { + "name": "summary", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "subagent-settled" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 105, + "optional": false + }, + { + "name": "kind", + "type": 106, + "optional": false + }, + { + "name": "senderSessionId", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "relay" + }, + { + "kind": "literal", + "value": "agent-message" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 60, + "optional": false + }, + { + "name": "kind", + "type": 81, + "optional": false + }, + { + "name": "summary", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 36, + "optional": false + }, + { + "name": "kind", + "type": 97, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 60, + "optional": false + }, + { + "name": "kind", + "type": 85, + "optional": false + }, + { + "name": "summary", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 60, + "optional": false + }, + { + "name": "kind", + "type": 37, + "optional": false + }, + { + "name": "summary", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 60, + "optional": false + }, + { + "name": "kind", + "type": 39, + "optional": false + }, + { + "name": "summary", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 60, + "optional": false + }, + { + "name": "kind", + "type": 41, + "optional": false + }, + { + "name": "summary", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 60, + "optional": false + }, + { + "name": "kind", + "type": 43, + "optional": false + }, + { + "name": "summary", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 60, + "optional": false + }, + { + "name": "kind", + "type": 45, + "optional": false + }, + { + "name": "summary", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 60, + "optional": false + }, + { + "name": "kind", + "type": 58, + "optional": false + }, + { + "name": "summary", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 36, + "optional": false + }, + { + "name": "kind", + "type": 99, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 36, + "optional": false + }, + { + "name": "kind", + "type": 101, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 81, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 85, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 37, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 39, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 41, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 43, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 45, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 60, + "optional": false + }, + { + "name": "kind", + "type": 68, + "optional": false + }, + { + "name": "summary", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 58, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 68, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 92, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 97, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 99, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 72, + "optional": false + }, + { + "name": "kind", + "type": 101, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 105, + "optional": false + }, + { + "name": "kind", + "type": 81, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 105, + "optional": false + }, + { + "name": "kind", + "type": 85, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 105, + "optional": false + }, + { + "name": "kind", + "type": 37, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 60, + "optional": false + }, + { + "name": "kind", + "type": 92, + "optional": false + }, + { + "name": "summary", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 105, + "optional": false + }, + { + "name": "kind", + "type": 39, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 105, + "optional": false + }, + { + "name": "kind", + "type": 41, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 105, + "optional": false + }, + { + "name": "kind", + "type": 43, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 105, + "optional": false + }, + { + "name": "kind", + "type": 45, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 105, + "optional": false + }, + { + "name": "kind", + "type": 58, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 105, + "optional": false + }, + { + "name": "kind", + "type": 68, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 105, + "optional": false + }, + { + "name": "kind", + "type": 92, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 105, + "optional": false + }, + { + "name": "kind", + "type": 97, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 105, + "optional": false + }, + { + "name": "kind", + "type": 99, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 60, + "optional": false + }, + { + "name": "kind", + "type": 97, + "optional": false + }, + { + "name": "summary", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 105, + "optional": false + }, + { + "name": "kind", + "type": 101, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 81, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 85, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 37, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 39, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 41, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 43, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 45, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 58, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 60, + "optional": false + }, + { + "name": "kind", + "type": 99, + "optional": false + }, + { + "name": "summary", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 68, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 92, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 97, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 99, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 65, + "optional": false + }, + { + "name": "kind", + "type": 101, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "goalId", + "type": 10, + "optional": false + }, + { + "name": "kind", + "type": 162, + "optional": false + }, + { + "name": "revision", + "type": 2, + "optional": false + }, + { + "name": "round", + "type": 2, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "goal" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 164, + "optional": false + }, + { + "name": "messageId", + "type": 10, + "optional": false + }, + { + "name": "senderId", + "type": 10, + "optional": false + }, + { + "name": "senderName", + "type": 10, + "optional": false + }, + { + "name": "teamId", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "team-message" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 60, + "optional": false + }, + { + "name": "kind", + "type": 101, + "optional": false + }, + { + "name": "summary", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 167, + "optional": false + }, + { + "name": "model", + "type": 10, + "optional": false + }, + { + "name": "provider", + "type": 10, + "optional": false + }, + { + "name": "replayState", + "type": 168, + "optional": true + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "model" + }, + { + "kind": "opaque", + "reason": "unknown" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 81, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 85, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 37, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 39, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 41, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 43, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 45, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 177, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "system-prompt" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 36, + "optional": false + }, + { + "name": "kind", + "type": 81, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 58, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 68, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 92, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 97, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 33, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 99, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 186, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "code-mode" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 188, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "cordis-host-runner" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 101, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 36, + "optional": false + }, + { + "name": "kind", + "type": 85, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "content", + "type": 7, + "optional": false + }, + { + "name": "id", + "type": 10, + "optional": false + }, + { + "name": "role", + "type": 192, + "optional": false + }, + { + "name": "source", + "type": 166, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "assistant" + }, + { + "kind": "object", + "properties": [ + { + "name": "content", + "type": 7, + "optional": false + }, + { + "name": "id", + "type": 10, + "optional": false + }, + { + "name": "role", + "type": 194, + "optional": false + }, + { + "name": "source", + "type": 176, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "system" + }, + { + "kind": "object", + "properties": [ + { + "name": "model", + "type": 10, + "optional": false + }, + { + "name": "provider", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "session/title-llm-request" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "ebb768d85ec87fb68e42fc14fd7d8535b5ac11791b14d04c6770180f0a719bf8", "schema": { @@ -54956,6 +76057,92 @@ "packages/core/session/src/types.ts:227" ] }, + { + "digest": "edbbfff1128099fda7b792c56330d2cb04debc9790988e66d1c3f4026e813e0e", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + }, + { + "name": "summary", + "type": 3, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "notice" + }, + { + "kind": "literal", + "value": "hooks-claude-code" + }, + { + "kind": "primitive", + "type": "string" + } + ] + }, + "names": [], + "sources": [] + }, + { + "digest": "ee577a0cc18664c9daee50e9455153321155604f8f1817362f8f4a4b6fb9e1ad", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + }, + { + "name": "summary", + "type": 3, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "notice" + }, + { + "kind": "literal", + "value": "time-context" + }, + { + "kind": "primitive", + "type": "string" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "eefbea819caeeea91ccb02dfafc16c68dd7f961cf9c1b2be25a2084509cf5c5a", "schema": { @@ -56454,6 +77641,94 @@ "names": [], "sources": [] }, + { + "digest": "f230c0b583e23b25ee0a61dbe4c05e95c1e2ae44b27939501eb9e03696f0c278", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + }, + { + "name": "sections", + "type": 3, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "snapshot" + }, + { + "kind": "literal", + "value": "time-context" + }, + { + "kind": "array", + "element": 4 + }, + { + "kind": "object", + "properties": [ + { + "name": "name", + "type": 5, + "optional": false + }, + { + "name": "text", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "primitive", + "type": "string" + } + ] + }, + "names": [], + "sources": [] + }, + { + "digest": "f29d63336e8266d80dd7baeab219436db86341304f6be1cd0edb36f5134c4a47", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 1, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "schedule" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "f2da0f27c1e6add59982c37b15e4a4912c5b33466859cce3b13d503600e24aef", "schema": { @@ -56535,6 +77810,31 @@ "packages/llm/llm/src/types.ts:374" ] }, + { + "digest": "f4a66f654996c093aae700ea4c434ff2ee3569fea9c0e5813ccf6afdccabd163", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 1, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "plan-mode" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "f4c6f3eae6607f412a9023406c8c3bd351a02451848bb78c2436f409447dd60c", "schema": { @@ -57155,6 +78455,40 @@ "packages/context/session-reference/src/types.ts:13" ] }, + { + "digest": "f6329fb30c7ea8013e8975ca5e78284fb7685cc6bd620e8aa4e9a99bc81d45eb", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "recall" + }, + { + "kind": "literal", + "value": "plan-mode" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "f634871d1e18b1eb199497ac8ab72d3964f48d03fbf611dc7521a1970cf429d9", "schema": { @@ -57169,6 +78503,88 @@ "names": [], "sources": [] }, + { + "digest": "f6605d6c57933aeaaf10911b5fbd6c61e655baa181af7192d3240f49d255b90d", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "instructions" + }, + { + "kind": "literal", + "value": "model-selection" + } + ] + }, + "names": [], + "sources": [] + }, + { + "digest": "f68c335306535a001127dae6685ece493a0ee7f4e2a851197b6054d8a9ff7394", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "literal", + "value": "user-approval" + } + ] + }, + "names": [], + "sources": [] + }, + { + "digest": "f6afe41e3926f422fe849debe90819fddd739f0f59e20be9c71018b9554a7f09", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "instructions" + }, + { + "kind": "literal", + "value": "time-context" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "f6cb462f808309e315fea634f1ed86268b8346bbcee6774d9097ca6eed7ac1f8", "schema": { @@ -57183,6 +78599,31 @@ "names": [], "sources": [] }, + { + "digest": "f7283223aacdc39b0adca728c8cbd4c090a20006a6fecec74421c30e943b489c", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 1, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "model-selection" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "f789af5ab844827eb5a4f357c0afae1eeed108c6c22d8ca1a56e586b349a7c85", "schema": { @@ -57239,6 +78680,40 @@ "packages/deliverables/workspace-changes/src/types.ts:106" ] }, + { + "digest": "f97f47b0eb87905ed77cc27c5e4ed75ef805cb372c98905253709de1aab9b63c", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "relay" + }, + { + "kind": "literal", + "value": "tmux-context" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "f9cfc89e8fe085b4fcc9cd32b74b6f103608c54d7d8cd97b47c01de34f252ba3", "schema": { @@ -57816,6 +79291,2629 @@ "packages/skill/tool-skill/src/index.ts:34" ] }, + { + "digest": "fc336025695a2213c63d0fe8715307c6a6ede867713bbf2ab1c8ff9760fdee1f", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "array", + "element": 1 + }, + { + "kind": "object", + "properties": [ + { + "name": "content", + "type": 2, + "optional": false + }, + { + "name": "id", + "type": 5, + "optional": false + }, + { + "name": "role", + "type": 25, + "optional": false + }, + { + "name": "source", + "type": 26, + "optional": false, + "compatibility": { + "version": 1, + "policy": "session-source-attribution", + "binding": "session.user-message.source", + "discriminator": "kind", + "unknownKinds": "preserve", + "attributionKinds": [ + "tmux-context" + ] + } + } + ], + "indices": [] + }, + { + "kind": "array", + "element": 3 + }, + { + "kind": "union", + "types": [ + 4, + 7, + 9, + 11, + 22 + ] + }, + { + "kind": "object", + "properties": [ + { + "name": "text", + "type": 5, + "optional": false + }, + { + "name": "type", + "type": 6, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "primitive", + "type": "string" + }, + { + "kind": "literal", + "value": "reasoning" + }, + { + "kind": "object", + "properties": [ + { + "name": "text", + "type": 5, + "optional": false + }, + { + "name": "type", + "type": 8, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "text" + }, + { + "kind": "object", + "properties": [ + { + "name": "arguments", + "type": 5, + "optional": false + }, + { + "name": "id", + "type": 5, + "optional": false + }, + { + "name": "name", + "type": 5, + "optional": false + }, + { + "name": "type", + "type": 10, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tool-call" + }, + { + "kind": "object", + "properties": [ + { + "name": "attachment", + "type": 12, + "optional": false + }, + { + "name": "offloaded", + "type": 20, + "optional": true + }, + { + "name": "type", + "type": 21, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "attachmentId", + "type": 5, + "optional": false + }, + { + "name": "bytes", + "type": 13, + "optional": false + }, + { + "name": "height", + "type": 13, + "optional": false + }, + { + "name": "mediaType", + "type": 14, + "optional": false + }, + { + "name": "name", + "type": 5, + "optional": true + }, + { + "name": "originalDimensions", + "type": 19, + "optional": true + }, + { + "name": "width", + "type": 13, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "primitive", + "type": "number" + }, + { + "kind": "union", + "types": [ + 15, + 16, + 17, + 18 + ] + }, + { + "kind": "literal", + "value": "image/gif" + }, + { + "kind": "literal", + "value": "image/jpeg" + }, + { + "kind": "literal", + "value": "image/png" + }, + { + "kind": "literal", + "value": "image/webp" + }, + { + "kind": "object", + "properties": [ + { + "name": "height", + "type": 13, + "optional": false + }, + { + "name": "width", + "type": 13, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": true + }, + { + "kind": "literal", + "value": "image" + }, + { + "kind": "object", + "properties": [ + { + "name": "attachment", + "type": 23, + "optional": false + }, + { + "name": "type", + "type": 24, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "attachmentId", + "type": 5, + "optional": false + }, + { + "name": "bytes", + "type": 13, + "optional": false + }, + { + "name": "name", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "file" + }, + { + "kind": "literal", + "value": "user" + }, + { + "kind": "union", + "types": [ + 27, + 30, + 32, + 34, + 36, + 38, + 40, + 42, + 44, + 46, + 48, + 50, + 53, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 91, + 92, + 93, + 94, + 96, + 98, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 110, + 111, + 113, + 114, + 115, + 116, + 117, + 118, + 120, + 121, + 129, + 131, + 132, + 134, + 137, + 141, + 143, + 151, + 155, + 156, + 157, + 158, + 159, + 160, + 161, + 162, + 163, + 164, + 165, + 166, + 167, + 169, + 171, + 172, + 173, + 174, + 175, + 176, + 177, + 178, + 179, + 180, + 181, + 182, + 183, + 184, + 185 + ] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 29, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "instructions" + }, + { + "kind": "literal", + "value": "model-selection" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 31, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "plan-mode" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 33, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "repeat-tool-reminder" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 35, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "runtime-context" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 37, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "schedule" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 39, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "time-context" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 41, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tmux-context" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 43, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tool-goal" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 45, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tool-jobs" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 47, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "user-approval" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 49, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "dsh-session-title-llm" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 51, + "optional": false + }, + { + "name": "kind", + "type": 52, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "recall" + }, + { + "kind": "literal", + "value": "hooks-claude-code" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 51, + "optional": false + }, + { + "name": "kind", + "type": 54, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "hooks-codex" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 51, + "optional": false + }, + { + "name": "kind", + "type": 29, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 51, + "optional": false + }, + { + "name": "kind", + "type": 31, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 51, + "optional": false + }, + { + "name": "kind", + "type": 33, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 51, + "optional": false + }, + { + "name": "kind", + "type": 35, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 51, + "optional": false + }, + { + "name": "kind", + "type": 37, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 51, + "optional": false + }, + { + "name": "kind", + "type": 39, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 51, + "optional": false + }, + { + "name": "kind", + "type": 41, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 51, + "optional": false + }, + { + "name": "kind", + "type": 43, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 51, + "optional": false + }, + { + "name": "kind", + "type": 45, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 51, + "optional": false + }, + { + "name": "kind", + "type": 47, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 51, + "optional": false + }, + { + "name": "kind", + "type": 49, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 67, + "optional": false + }, + { + "name": "kind", + "type": 52, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "relay" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 67, + "optional": false + }, + { + "name": "kind", + "type": 54, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 67, + "optional": false + }, + { + "name": "kind", + "type": 29, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 67, + "optional": false + }, + { + "name": "kind", + "type": 31, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 67, + "optional": false + }, + { + "name": "kind", + "type": 33, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 67, + "optional": false + }, + { + "name": "kind", + "type": 35, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 67, + "optional": false + }, + { + "name": "kind", + "type": 37, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 67, + "optional": false + }, + { + "name": "kind", + "type": 39, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 67, + "optional": false + }, + { + "name": "kind", + "type": 41, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 67, + "optional": false + }, + { + "name": "kind", + "type": 43, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 67, + "optional": false + }, + { + "name": "kind", + "type": 45, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 67, + "optional": false + }, + { + "name": "kind", + "type": 47, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 67, + "optional": false + }, + { + "name": "kind", + "type": 49, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 81, + "optional": false + }, + { + "name": "kind", + "type": 52, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "catalog" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 81, + "optional": false + }, + { + "name": "kind", + "type": 54, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 81, + "optional": false + }, + { + "name": "kind", + "type": 29, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 81, + "optional": false + }, + { + "name": "kind", + "type": 31, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 81, + "optional": false + }, + { + "name": "kind", + "type": 33, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 81, + "optional": false + }, + { + "name": "kind", + "type": 35, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 81, + "optional": false + }, + { + "name": "kind", + "type": 37, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 81, + "optional": false + }, + { + "name": "kind", + "type": 39, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 81, + "optional": false + }, + { + "name": "kind", + "type": 41, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 81, + "optional": false + }, + { + "name": "kind", + "type": 43, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 81, + "optional": false + }, + { + "name": "kind", + "type": 45, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 81, + "optional": false + }, + { + "name": "kind", + "type": 47, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 81, + "optional": false + }, + { + "name": "kind", + "type": 49, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "goalId", + "type": 5, + "optional": false + }, + { + "name": "kind", + "type": 95, + "optional": false + }, + { + "name": "revision", + "type": 13, + "optional": false + }, + { + "name": "round", + "type": 13, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "goal" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 97, + "optional": false + }, + { + "name": "messageId", + "type": 5, + "optional": false + }, + { + "name": "senderId", + "type": 5, + "optional": false + }, + { + "name": "senderName", + "type": 5, + "optional": false + }, + { + "name": "teamId", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "team-message" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 99, + "optional": false + }, + { + "name": "model", + "type": 5, + "optional": false + }, + { + "name": "provider", + "type": 5, + "optional": false + }, + { + "name": "replayState", + "type": 100, + "optional": true + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "model" + }, + { + "kind": "opaque", + "reason": "unknown" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 52, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 54, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 29, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 31, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 33, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 35, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 37, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 109, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "system-prompt" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 39, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 112, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "code-mode" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 41, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 43, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 45, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 25, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 47, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 119, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "cordis-host-runner" + }, + { + "kind": "object", + "properties": [ + { + "name": "kind", + "type": 49, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "baseline", + "type": 20, + "optional": true + }, + { + "name": "baselineIdentity", + "type": 5, + "optional": true + }, + { + "name": "changes", + "type": 122, + "optional": false + }, + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 128, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "array", + "element": 123 + }, + { + "kind": "object", + "properties": [ + { + "name": "action", + "type": 124, + "optional": false + }, + { + "name": "digest", + "type": 5, + "optional": true + }, + { + "name": "path", + "type": 5, + "optional": false + }, + { + "name": "scope", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "union", + "types": [ + 125, + 126, + 127 + ] + }, + { + "kind": "literal", + "value": "remove" + }, + { + "kind": "literal", + "value": "replace" + }, + { + "kind": "literal", + "value": "set" + }, + { + "kind": "literal", + "value": "agent-instructions" + }, + { + "kind": "object", + "properties": [ + { + "name": "callId", + "type": 5, + "optional": false + }, + { + "name": "kind", + "type": 130, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "tool" + }, + { + "kind": "object", + "properties": [ + { + "name": "clientTimeZone", + "type": 5, + "optional": true + }, + { + "name": "kind", + "type": 25, + "optional": false + }, + { + "name": "rpcId", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "compactionId", + "type": 5, + "optional": false + }, + { + "name": "kind", + "type": 133, + "optional": false + }, + { + "name": "sourceCommandId", + "type": 5, + "optional": true + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "compact-checkpoint" + }, + { + "kind": "object", + "properties": [ + { + "name": "deliveryId", + "type": 5, + "optional": false + }, + { + "name": "form", + "type": 135, + "optional": false + }, + { + "name": "kind", + "type": 136, + "optional": false + }, + { + "name": "provider", + "type": 5, + "optional": false + }, + { + "name": "ruleId", + "type": 5, + "optional": false + }, + { + "name": "source", + "type": 5, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "notice" + }, + { + "kind": "literal", + "value": "webhook" + }, + { + "kind": "object", + "properties": [ + { + "name": "entries", + "type": 138, + "optional": false + }, + { + "name": "form", + "type": 81, + "optional": false + }, + { + "name": "kind", + "type": 140, + "optional": false + }, + { + "name": "update", + "type": 20, + "optional": true + } + ], + "indices": [] + }, + { + "kind": "array", + "element": 139 + }, + { + "kind": "object", + "properties": [ + { + "name": "description", + "type": 5, + "optional": false + }, + { + "name": "name", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "skill-catalog" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 142, + "optional": false + }, + { + "name": "name", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "skill-invocation" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 51, + "optional": false + }, + { + "name": "kind", + "type": 144, + "optional": false + }, + { + "name": "references", + "type": 145, + "optional": false + }, + { + "name": "version", + "type": 150, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "session-reference" + }, + { + "kind": "array", + "element": 146 + }, + { + "kind": "object", + "properties": [ + { + "name": "capturedFormatVersion", + "type": 13, + "optional": true + }, + { + "name": "capturedThroughSeq", + "type": 147, + "optional": false + }, + { + "name": "compacted", + "type": 149, + "optional": false + }, + { + "name": "inputIndex", + "type": 13, + "optional": false + }, + { + "name": "label", + "type": 5, + "optional": false + }, + { + "name": "omittedBytes", + "type": 13, + "optional": false + }, + { + "name": "omittedMessages", + "type": 13, + "optional": false + }, + { + "name": "originalMessages", + "type": 13, + "optional": false + }, + { + "name": "retainedMessages", + "type": 13, + "optional": false + }, + { + "name": "sessionId", + "type": 5, + "optional": false + }, + { + "name": "truncated", + "type": 149, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "union", + "types": [ + 13, + 148 + ] + }, + { + "kind": "primitive", + "type": "null" + }, + { + "kind": "primitive", + "type": "boolean" + }, + { + "kind": "literal", + "value": 1 + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 152, + "optional": false + }, + { + "name": "kind", + "type": 52, + "optional": false + }, + { + "name": "sections", + "type": 153, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "snapshot" + }, + { + "kind": "array", + "element": 154 + }, + { + "kind": "object", + "properties": [ + { + "name": "name", + "type": 5, + "optional": false + }, + { + "name": "text", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 152, + "optional": false + }, + { + "name": "kind", + "type": 54, + "optional": false + }, + { + "name": "sections", + "type": 153, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 152, + "optional": false + }, + { + "name": "kind", + "type": 29, + "optional": false + }, + { + "name": "sections", + "type": 153, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 152, + "optional": false + }, + { + "name": "kind", + "type": 31, + "optional": false + }, + { + "name": "sections", + "type": 153, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 152, + "optional": false + }, + { + "name": "kind", + "type": 33, + "optional": false + }, + { + "name": "sections", + "type": 153, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 152, + "optional": false + }, + { + "name": "kind", + "type": 35, + "optional": false + }, + { + "name": "sections", + "type": 153, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 152, + "optional": false + }, + { + "name": "kind", + "type": 37, + "optional": false + }, + { + "name": "sections", + "type": 153, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 152, + "optional": false + }, + { + "name": "kind", + "type": 39, + "optional": false + }, + { + "name": "sections", + "type": 153, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 152, + "optional": false + }, + { + "name": "kind", + "type": 41, + "optional": false + }, + { + "name": "sections", + "type": 153, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 152, + "optional": false + }, + { + "name": "kind", + "type": 43, + "optional": false + }, + { + "name": "sections", + "type": 153, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 152, + "optional": false + }, + { + "name": "kind", + "type": 45, + "optional": false + }, + { + "name": "sections", + "type": 153, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 152, + "optional": false + }, + { + "name": "kind", + "type": 47, + "optional": false + }, + { + "name": "sections", + "type": 153, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 152, + "optional": false + }, + { + "name": "kind", + "type": 49, + "optional": false + }, + { + "name": "sections", + "type": 153, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 135, + "optional": false + }, + { + "name": "kind", + "type": 168, + "optional": false + }, + { + "name": "senderSessionId", + "type": 5, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "subagent-settled" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 67, + "optional": false + }, + { + "name": "kind", + "type": 170, + "optional": false + }, + { + "name": "senderSessionId", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "agent-message" + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 135, + "optional": false + }, + { + "name": "kind", + "type": 52, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 135, + "optional": false + }, + { + "name": "kind", + "type": 54, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 135, + "optional": false + }, + { + "name": "kind", + "type": 29, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 135, + "optional": false + }, + { + "name": "kind", + "type": 31, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 135, + "optional": false + }, + { + "name": "kind", + "type": 33, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 135, + "optional": false + }, + { + "name": "kind", + "type": 35, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 135, + "optional": false + }, + { + "name": "kind", + "type": 37, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 135, + "optional": false + }, + { + "name": "kind", + "type": 39, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 135, + "optional": false + }, + { + "name": "kind", + "type": 41, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 135, + "optional": false + }, + { + "name": "kind", + "type": 43, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 135, + "optional": false + }, + { + "name": "kind", + "type": 45, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 135, + "optional": false + }, + { + "name": "kind", + "type": 47, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 135, + "optional": false + }, + { + "name": "kind", + "type": 49, + "optional": false + }, + { + "name": "summary", + "type": 5, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 52, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 28, + "optional": false + }, + { + "name": "kind", + "type": 54, + "optional": false + } + ], + "indices": [] + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "fcf427290c6213c2a7feb57492d832ce324f5b9737a759f424dab69e6bd101a0", "schema": { @@ -57830,6 +81928,40 @@ "names": [], "sources": [] }, + { + "digest": "fcf81d3c58c13593bf2594e342e31734f4ab2d24938dc610875194c6079749c7", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "recall" + }, + { + "kind": "literal", + "value": "tmux-context" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "fd0d91a1f9dd2efb8959bdf5e07f8f0a98b1cdfa38ce8d4732ebde0b44c3abd4", "schema": { @@ -58179,9 +82311,52 @@ "packages/llm/llm/src/message.ts#AssistantMessage" ], "sources": [ - "packages/llm/llm/src/message.ts:152" + "packages/llm/llm/src/message.ts:162" ] }, + { + "digest": "fe1a7acdeed4d0f5ab483396eaa5b3dc97263b7c10eb4da2f0028cb01728bfc9", + "schema": { + "root": 0, + "nodes": [ + { + "kind": "object", + "properties": [ + { + "name": "form", + "type": 1, + "optional": false + }, + { + "name": "kind", + "type": 2, + "optional": false + }, + { + "name": "summary", + "type": 3, + "optional": false + } + ], + "indices": [] + }, + { + "kind": "literal", + "value": "notice" + }, + { + "kind": "literal", + "value": "repeat-tool-reminder" + }, + { + "kind": "primitive", + "type": "string" + } + ] + }, + "names": [], + "sources": [] + }, { "digest": "fe792a6cd430494503837e21e79f91677704ccdd9e870c679aabd7d43ed47ddd", "schema": { @@ -58263,1161 +82438,6 @@ }, "names": [], "sources": [] - }, - { - "digest": "ff5bcfe90a83f6e773ae72b3ec775c5af8339df8a1dbe561e8147b56bc994fdc", - "schema": { - "root": 0, - "nodes": [ - { - "kind": "array", - "element": 1 - }, - { - "kind": "union", - "types": [ - 2, - 29, - 48, - 53 - ] - }, - { - "kind": "object", - "properties": [ - { - "name": "content", - "type": 3, - "optional": false - }, - { - "name": "id", - "type": 6, - "optional": false - }, - { - "name": "isError", - "type": 26, - "optional": true - }, - { - "name": "role", - "type": 27, - "optional": false - }, - { - "name": "source", - "type": 28, - "optional": false - }, - { - "name": "toolCallId", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "array", - "element": 4 - }, - { - "kind": "union", - "types": [ - 5, - 8, - 19, - 22, - 24 - ] - }, - { - "kind": "object", - "properties": [ - { - "name": "arguments", - "type": 6, - "optional": false - }, - { - "name": "id", - "type": 6, - "optional": false - }, - { - "name": "name", - "type": 6, - "optional": false - }, - { - "name": "type", - "type": 7, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "primitive", - "type": "string" - }, - { - "kind": "literal", - "value": "tool-call" - }, - { - "kind": "object", - "properties": [ - { - "name": "attachment", - "type": 9, - "optional": false - }, - { - "name": "offloaded", - "type": 17, - "optional": true - }, - { - "name": "type", - "type": 18, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "attachmentId", - "type": 6, - "optional": false - }, - { - "name": "bytes", - "type": 10, - "optional": false - }, - { - "name": "height", - "type": 10, - "optional": false - }, - { - "name": "mediaType", - "type": 11, - "optional": false - }, - { - "name": "name", - "type": 6, - "optional": true - }, - { - "name": "originalDimensions", - "type": 16, - "optional": true - }, - { - "name": "width", - "type": 10, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "primitive", - "type": "number" - }, - { - "kind": "union", - "types": [ - 12, - 13, - 14, - 15 - ] - }, - { - "kind": "literal", - "value": "image/png" - }, - { - "kind": "literal", - "value": "image/webp" - }, - { - "kind": "literal", - "value": "image/gif" - }, - { - "kind": "literal", - "value": "image/jpeg" - }, - { - "kind": "object", - "properties": [ - { - "name": "height", - "type": 10, - "optional": false - }, - { - "name": "width", - "type": 10, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": true - }, - { - "kind": "literal", - "value": "image" - }, - { - "kind": "object", - "properties": [ - { - "name": "attachment", - "type": 20, - "optional": false - }, - { - "name": "type", - "type": 21, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "attachmentId", - "type": 6, - "optional": false - }, - { - "name": "bytes", - "type": 10, - "optional": false - }, - { - "name": "name", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "file" - }, - { - "kind": "object", - "properties": [ - { - "name": "text", - "type": 6, - "optional": false - }, - { - "name": "type", - "type": 23, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "reasoning" - }, - { - "kind": "object", - "properties": [ - { - "name": "text", - "type": 6, - "optional": false - }, - { - "name": "type", - "type": 25, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "text" - }, - { - "kind": "primitive", - "type": "boolean" - }, - { - "kind": "literal", - "value": "tool" - }, - { - "kind": "object", - "properties": [ - { - "name": "callId", - "type": 6, - "optional": false - }, - { - "name": "kind", - "type": 27, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "content", - "type": 3, - "optional": false - }, - { - "name": "id", - "type": 6, - "optional": false - }, - { - "name": "role", - "type": 30, - "optional": false - }, - { - "name": "source", - "type": 31, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "system" - }, - { - "kind": "union", - "types": [ - 32, - 37, - 39, - 41, - 43, - 45, - 47 - ] - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 33, - "optional": false - }, - { - "name": "kind", - "type": 34, - "optional": false - }, - { - "name": "plugin", - "type": 6, - "optional": false - }, - { - "name": "sections", - "type": 35, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "snapshot" - }, - { - "kind": "literal", - "value": "plugin" - }, - { - "kind": "array", - "element": 36 - }, - { - "kind": "object", - "properties": [ - { - "name": "name", - "type": 6, - "optional": false - }, - { - "name": "text", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 38, - "optional": false - }, - { - "name": "kind", - "type": 34, - "optional": false - }, - { - "name": "plugin", - "type": 6, - "optional": false - }, - { - "name": "summary", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "notice" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 40, - "optional": false - }, - { - "name": "kind", - "type": 34, - "optional": false - }, - { - "name": "plugin", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "instructions" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 42, - "optional": false - }, - { - "name": "kind", - "type": 34, - "optional": false - }, - { - "name": "plugin", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "recall" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 44, - "optional": false - }, - { - "name": "kind", - "type": 34, - "optional": false - }, - { - "name": "plugin", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "relay" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 46, - "optional": false - }, - { - "name": "kind", - "type": 34, - "optional": false - }, - { - "name": "plugin", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "catalog" - }, - { - "kind": "object", - "properties": [ - { - "name": "kind", - "type": 34, - "optional": false - }, - { - "name": "plugin", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "content", - "type": 3, - "optional": false - }, - { - "name": "id", - "type": 6, - "optional": false - }, - { - "name": "role", - "type": 49, - "optional": false - }, - { - "name": "source", - "type": 50, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "assistant" - }, - { - "kind": "object", - "properties": [ - { - "name": "kind", - "type": 51, - "optional": false - }, - { - "name": "model", - "type": 6, - "optional": false - }, - { - "name": "provider", - "type": 6, - "optional": false - }, - { - "name": "replayState", - "type": 52, - "optional": true - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "model" - }, - { - "kind": "opaque", - "reason": "unknown" - }, - { - "kind": "object", - "properties": [ - { - "name": "content", - "type": 3, - "optional": false - }, - { - "name": "id", - "type": 6, - "optional": false - }, - { - "name": "role", - "type": 54, - "optional": false - }, - { - "name": "source", - "type": 55, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "user" - }, - { - "kind": "union", - "types": [ - 28, - 32, - 37, - 39, - 41, - 43, - 45, - 47, - 50, - 56, - 64, - 65, - 67, - 71, - 73, - 80, - 82, - 84, - 86, - 88 - ] - }, - { - "kind": "object", - "properties": [ - { - "name": "baseline", - "type": 17, - "optional": true - }, - { - "name": "baselineIdentity", - "type": 6, - "optional": true - }, - { - "name": "changes", - "type": 57, - "optional": false - }, - { - "name": "form", - "type": 40, - "optional": false - }, - { - "name": "kind", - "type": 63, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "array", - "element": 58 - }, - { - "kind": "object", - "properties": [ - { - "name": "action", - "type": 59, - "optional": false - }, - { - "name": "digest", - "type": 6, - "optional": true - }, - { - "name": "path", - "type": 6, - "optional": false - }, - { - "name": "scope", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "union", - "types": [ - 60, - 61, - 62 - ] - }, - { - "kind": "literal", - "value": "set" - }, - { - "kind": "literal", - "value": "remove" - }, - { - "kind": "literal", - "value": "replace" - }, - { - "kind": "literal", - "value": "agent-instructions" - }, - { - "kind": "object", - "properties": [ - { - "name": "clientTimeZone", - "type": 6, - "optional": true - }, - { - "name": "kind", - "type": 54, - "optional": false - }, - { - "name": "rpcId", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "object", - "properties": [ - { - "name": "deliveryId", - "type": 6, - "optional": false - }, - { - "name": "form", - "type": 38, - "optional": false - }, - { - "name": "kind", - "type": 66, - "optional": false - }, - { - "name": "provider", - "type": 6, - "optional": false - }, - { - "name": "ruleId", - "type": 6, - "optional": false - }, - { - "name": "source", - "type": 6, - "optional": false - }, - { - "name": "summary", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "webhook" - }, - { - "kind": "object", - "properties": [ - { - "name": "entries", - "type": 68, - "optional": false - }, - { - "name": "form", - "type": 46, - "optional": false - }, - { - "name": "kind", - "type": 70, - "optional": false - }, - { - "name": "update", - "type": 17, - "optional": true - } - ], - "indices": [] - }, - { - "kind": "array", - "element": 69 - }, - { - "kind": "object", - "properties": [ - { - "name": "description", - "type": 6, - "optional": false - }, - { - "name": "name", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "skill-catalog" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 40, - "optional": false - }, - { - "name": "kind", - "type": 72, - "optional": false - }, - { - "name": "name", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "skill-invocation" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 42, - "optional": false - }, - { - "name": "kind", - "type": 74, - "optional": false - }, - { - "name": "references", - "type": 75, - "optional": false - }, - { - "name": "version", - "type": 79, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "session-reference" - }, - { - "kind": "array", - "element": 76 - }, - { - "kind": "object", - "properties": [ - { - "name": "capturedFormatVersion", - "type": 10, - "optional": true - }, - { - "name": "capturedThroughSeq", - "type": 77, - "optional": false - }, - { - "name": "compacted", - "type": 26, - "optional": false - }, - { - "name": "inputIndex", - "type": 10, - "optional": false - }, - { - "name": "label", - "type": 6, - "optional": false - }, - { - "name": "omittedBytes", - "type": 10, - "optional": false - }, - { - "name": "omittedMessages", - "type": 10, - "optional": false - }, - { - "name": "originalMessages", - "type": 10, - "optional": false - }, - { - "name": "retainedMessages", - "type": 10, - "optional": false - }, - { - "name": "sessionId", - "type": 6, - "optional": false - }, - { - "name": "truncated", - "type": 26, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "union", - "types": [ - 10, - 78 - ] - }, - { - "kind": "primitive", - "type": "null" - }, - { - "kind": "literal", - "value": 1 - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 38, - "optional": false - }, - { - "name": "kind", - "type": 81, - "optional": false - }, - { - "name": "senderSessionId", - "type": 6, - "optional": false - }, - { - "name": "summary", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "subagent-settled" - }, - { - "kind": "object", - "properties": [ - { - "name": "form", - "type": 44, - "optional": false - }, - { - "name": "kind", - "type": 83, - "optional": false - }, - { - "name": "senderSessionId", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "agent-message" - }, - { - "kind": "object", - "properties": [ - { - "name": "goalId", - "type": 6, - "optional": false - }, - { - "name": "kind", - "type": 85, - "optional": false - }, - { - "name": "revision", - "type": 10, - "optional": false - }, - { - "name": "round", - "type": 10, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "goal" - }, - { - "kind": "object", - "properties": [ - { - "name": "kind", - "type": 87, - "optional": false - }, - { - "name": "messageId", - "type": 6, - "optional": false - }, - { - "name": "senderId", - "type": 6, - "optional": false - }, - { - "name": "senderName", - "type": 6, - "optional": false - }, - { - "name": "teamId", - "type": 6, - "optional": false - } - ], - "indices": [] - }, - { - "kind": "literal", - "value": "team-message" - }, - { - "kind": "object", - "properties": [ - { - "name": "kind", - "type": 54, - "optional": false - } - ], - "indices": [] - } - ] - }, - "names": [], - "sources": [] } ] } diff --git a/docs/subsystems/llm-streaming.i18n.yaml b/docs/subsystems/llm-streaming.i18n.yaml index e5d61a2fd3..94a40838c8 100644 --- a/docs/subsystems/llm-streaming.i18n.yaml +++ b/docs/subsystems/llm-streaming.i18n.yaml @@ -2,5 +2,5 @@ # side as of the last confirmed-consistent state. Both languages carry equal authority; # after editing either side, bring the other along and re-record with: # pnpm run verify-translation-pairing --write docs/subsystems/llm-streaming.md -llm-streaming.md: a5a42ef50dccebbc40b0c35e0dd4e76f7a8f764b -llm-streaming.zh.md: 653a216de81fd2a11f45d8bbcb04231f7dd3f7fb +llm-streaming.md: 55976c9724413eea2230929747e27152011f2c1e +llm-streaming.zh.md: 43583597ff356d067869356b64d71d373f610682 diff --git a/docs/subsystems/llm-streaming.md b/docs/subsystems/llm-streaming.md index a5a42ef50d..55976c9724 100644 --- a/docs/subsystems/llm-streaming.md +++ b/docs/subsystems/llm-streaming.md @@ -2,7 +2,7 @@ English | [中文](llm-streaming.zh.md) -The conversation and streaming types from [`packages/llm`](../../packages/llm/README.md): the `Message`/`ContentBlock` variants every request and durable history share, the fully assembled model request, the raw `StreamChunk` protocol, the adapter contract every adapter must implement, and the shared assembler. The [core packages](core.md) hold and log these values on every turn; this page declares them. +The conversation and streaming types from [`packages/llm`](../../packages/llm/README.md): durable `Message` values, request-only user inputs, shared `ContentBlock` variants, the fully assembled model request, the raw `StreamChunk` protocol, the adapter contract every adapter must implement, and the shared assembler. The [core packages](core.md) hold and log these values on every turn; this page declares them. Source: [`packages/llm/llm/src/types.ts`](../../packages/llm/llm/src/types.ts) @@ -71,14 +71,17 @@ Where a message came from is itself a merge-extensible sum type: ```ts type-equiv /** - * Where a message (or injected content) came from. - * Merge-extensible sum type — plugins add their own `kind`s. + * Where a message (or injected content) came from, in the harness's own + * vocabulary. Merge-extensible sum type — each producer declares its own + * `kind` in its own module; there is no shared catch-all `plugin` kind. + * Model and tool sources answer their role messages; user messages carry any + * producer's kind, and consumers fall through unknown kinds. */ interface MessageSourceMap { user: { kind: 'user' } - plugin: { kind: 'plugin'; plugin: string } & ContextFormed model: ModelMessageSource tool: ToolMessageSource + 'system-prompt': SystemPromptMessageSource } ``` @@ -567,6 +570,23 @@ interface LlmResolvedModelInfo extends LlmModelInfo { } ``` +Auxiliary callers can provide user content without a durable identity or source. Existing `Message[]` histories remain valid request inputs. Session writes, Agent delivery, and recorded title requests continue to require durable messages. + +```ts type-equiv +/** User input for one LLM request; it has no durable Session identity or source. */ +interface RequestUserInput { + readonly role: 'user' + readonly content: UserMessage['content'] + readonly id?: never + readonly source?: never +} +``` + +```ts type-equiv +/** A durable conversation message or a user input used only for one request. */ +type RequestMessage = Message | RequestUserInput +``` + ```ts type-equiv /** A single model request, fully assembled. */ interface GenerateOptions { @@ -579,9 +599,9 @@ interface GenerateOptions { * Ordered conversation messages, exactly as the provider sees them. A * loop-built request passes the derived history (dsh-agent-loop), whose * leading system-role message carries the system prompt; a hand-built - * one-shot passes any list. + * one-shot may include identity-free user inputs. */ - messages: Message[] + messages: RequestMessage[] /** * System prompt text for one-shot callers; adapters map it to the provider's * system slot ahead of `messages`. Loop-built requests leave it undefined. @@ -1079,8 +1099,8 @@ Waterfall around every streaming model call (retry, replay, routing). Bound to t * process-local {@link markAgentLoopRequest} identity and arrives deep-frozen * (mutation throws): its content is a pure function of the session log (the * reconstructability Agent Note), so listeners read it, never rewrite it. - * Hand-built calls do not carry that marker; their messages already obey - * the immutable creation contract. + * Hand-built calls do not carry that marker; callers own their request + * inputs and must keep them unchanged until the stream settles. * @mode waterfall */ 'llm/stream'(this: LlmRuntime, options: GenerateOptions, next: () => AsyncIterable): AsyncIterable diff --git a/docs/subsystems/llm-streaming.zh.md b/docs/subsystems/llm-streaming.zh.md index 653a216de8..43583597ff 100644 --- a/docs/subsystems/llm-streaming.zh.md +++ b/docs/subsystems/llm-streaming.zh.md @@ -2,7 +2,7 @@ [English](llm-streaming.md) | 中文 -[`packages/llm`](../../packages/llm/README.zh.md) 提供对话与流式输出类型:每个请求和持久历史共用的 `Message`/`ContentBlock` 变体、完整组装的模型请求、原始 `StreamChunk` 协议、每个适配器必须实现的适配器约定(adapter contract),以及共享的 assembler。[核心包](core.zh.md)在每个轮次持有并记录这些值;本页声明它们。 +[`packages/llm`](../../packages/llm/README.zh.md) 提供对话与流式输出类型:持久 `Message` 值、仅供请求使用的 user 输入、共用的 `ContentBlock` 变体、完整组装的模型请求、原始 `StreamChunk` 协议、每个适配器必须实现的适配器约定(adapter contract),以及共享的 assembler。[核心包](core.zh.md)在每个轮次持有并记录这些值;本页声明它们。 源码:[`packages/llm/llm/src/types.ts`](../../packages/llm/llm/src/types.ts) @@ -71,14 +71,17 @@ type Message = MessageRoleMap[keyof MessageRoleMap] ```ts type-equiv /** - * Where a message (or injected content) came from. - * Merge-extensible sum type — plugins add their own `kind`s. + * Where a message (or injected content) came from, in the harness's own + * vocabulary. Merge-extensible sum type — each producer declares its own + * `kind` in its own module; there is no shared catch-all `plugin` kind. + * Model and tool sources answer their role messages; user messages carry any + * producer's kind, and consumers fall through unknown kinds. */ interface MessageSourceMap { user: { kind: 'user' } - plugin: { kind: 'plugin'; plugin: string } & ContextFormed model: ModelMessageSource tool: ToolMessageSource + 'system-prompt': SystemPromptMessageSource } ``` @@ -573,6 +576,23 @@ interface LlmResolvedModelInfo extends LlmModelInfo { } ``` +辅助调用方可以提供不含持久身份或来源的 user 内容。既有 `Message[]` 历史仍然是有效的请求输入。Session 写入、Agent 投递和已记录的标题请求仍然要求持久消息。 + +```ts type-equiv +/** User input for one LLM request; it has no durable Session identity or source. */ +interface RequestUserInput { + readonly role: 'user' + readonly content: UserMessage['content'] + readonly id?: never + readonly source?: never +} +``` + +```ts type-equiv +/** A durable conversation message or a user input used only for one request. */ +type RequestMessage = Message | RequestUserInput +``` + ```ts type-equiv /** A single model request, fully assembled. */ interface GenerateOptions { @@ -585,9 +605,9 @@ interface GenerateOptions { * Ordered conversation messages, exactly as the provider sees them. A * loop-built request passes the derived history (dsh-agent-loop), whose * leading system-role message carries the system prompt; a hand-built - * one-shot passes any list. + * one-shot may include identity-free user inputs. */ - messages: Message[] + messages: RequestMessage[] /** * System prompt text for one-shot callers; adapters map it to the provider's * system slot ahead of `messages`. Loop-built requests leave it undefined. @@ -1085,8 +1105,8 @@ Waterfall around every streaming model call (retry, replay, routing). Bound to t * process-local {@link markAgentLoopRequest} identity and arrives deep-frozen * (mutation throws): its content is a pure function of the session log (the * reconstructability Agent Note), so listeners read it, never rewrite it. - * Hand-built calls do not carry that marker; their messages already obey - * the immutable creation contract. + * Hand-built calls do not carry that marker; callers own their request + * inputs and must keep them unchanged until the stream settles. * @mode waterfall */ 'llm/stream'(this: LlmRuntime, options: GenerateOptions, next: () => AsyncIterable): AsyncIterable diff --git a/packages/acp/acp/tests/edges.spec.ts b/packages/acp/acp/tests/edges.spec.ts index 073a5893c9..8df1a98ad5 100644 --- a/packages/acp/acp/tests/edges.spec.ts +++ b/packages/acp/acp/tests/edges.spec.ts @@ -1,10 +1,17 @@ import { afterEach, describe, expect, it, vi } from 'vitest' import { PROTOCOL_VERSION } from '@agentclientprotocol/sdk' import { createUserMessage, ToolCallId, type StreamChunk } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' import { SessionId } from '@deepseek-ai/dsh-session' import { defineContentToolFixture } from '@deepseek-ai/dsh-tools' import { makeBridgeHarness, textResponse, type BridgeHarness } from './harness.ts' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'test': { kind: 'test' } & ContextFormed + } +} + function toolCallResponse(): StreamChunk[] { return [ { type: 'block-start', index: 0, blockType: 'reasoning' }, @@ -98,7 +105,7 @@ describe('ACP automation output boundary', () => { const { sessionId } = await harness.client.newSession({ cwd: process.cwd(), mcpServers: [] }) const agent = harness.ctx.agents.get(SessionId(sessionId))! - agent.followup(createUserMessage({ content: [{ type: 'text', text: 'go' }], source: { kind: 'plugin', plugin: 'test' } })) + agent.followup(createUserMessage({ content: [{ type: 'text', text: 'go' }], source: { kind: 'test' } })) await agent.whenIdle() await vi.waitFor(() => { expect(harness!.updates.at(-1)?.sessionUpdate).toBe('usage_update') }) @@ -133,7 +140,7 @@ describe('ACP automation output boundary', () => { const { sessionId } = await harness.client.newSession({ cwd: process.cwd(), mcpServers: [] }) const agent = harness.ctx.agents.get(SessionId(sessionId))! - agent.followup(createUserMessage({ content: [{ type: 'text', text: 'go' }], source: { kind: 'plugin', plugin: 'test' } })) + agent.followup(createUserMessage({ content: [{ type: 'text', text: 'go' }], source: { kind: 'test' } })) await agent.whenIdle() await vi.waitFor(() => { expect(warn).toHaveBeenCalledWith(expect.stringContaining('output conversion failed')) }) expect(harness.updates).toEqual([]) diff --git a/packages/acp/acp/tests/turns.spec.ts b/packages/acp/acp/tests/turns.spec.ts index a17223750f..0dffdc5836 100644 --- a/packages/acp/acp/tests/turns.spec.ts +++ b/packages/acp/acp/tests/turns.spec.ts @@ -1,4 +1,5 @@ import { createUserMessage, type StreamChunk } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' import { afterEach, describe, expect, it, vi } from 'vitest' import { PROTOCOL_VERSION } from '@agentclientprotocol/sdk' import { SessionId } from '@deepseek-ai/dsh-session' @@ -10,6 +11,12 @@ import { type BridgeHarness, } from './harness.ts' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'test': { kind: 'test' } & ContextFormed + } +} + async function newSession(harness: BridgeHarness): Promise { await harness.client.initialize({ protocolVersion: PROTOCOL_VERSION, clientCapabilities: {} }) return (await harness.client.newSession({ cwd: process.cwd(), mcpServers: [] })).sessionId @@ -188,7 +195,7 @@ describe('ACP prompt lifecycle', () => { harness.ctx.on('agent/inbox/inserted', ({ agent: subject, message }) => { if (subject === agent && message.source.kind === 'user' && !injected) { injected = true - agent.inject(createUserMessage({ content: [{ type: 'text', text: 'context' }], source: { kind: 'plugin', plugin: 'test' } })) + agent.inject(createUserMessage({ content: [{ type: 'text', text: 'context' }], source: { kind: 'test' } })) } }) @@ -208,7 +215,7 @@ describe('ACP prompt lifecycle', () => { }) agent.followup(createUserMessage({ content: [{ type: 'text', text: 'autonomous work' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, })) await started @@ -230,7 +237,7 @@ describe('ACP prompt lifecycle', () => { kind: 'enter', messages: [createUserMessage({ content: [{ type: 'text', text: 'rewritten prompt' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, })], })) const sessionId = await newSession(harness) @@ -332,7 +339,7 @@ describe('ACP prompt lifecycle', () => { const agent = harness.ctx.agents.get(SessionId(sessionId))! agent.followup(createUserMessage({ content: [{ type: 'text', text: 'unrelated work' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, })) await vi.waitFor(() => { expect(harness!.adapter.requests).toHaveLength(1) }) @@ -375,7 +382,7 @@ describe('ACP prompt lifecycle', () => { agent.followup(createUserMessage({ content: [{ type: 'text', text: 'unrelated work' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, })) await agent.whenIdle() releaseValidation.resolve(undefined) @@ -465,7 +472,7 @@ describe('ACP prompt lifecycle', () => { const agent = harness.ctx.agents.get(SessionId(sessionId))! agent.followup(createUserMessage({ content: [{ type: 'text', text: 'autonomous work' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, })) await vi.waitFor(() => { expect(agent.session.snapshotEvents().some(event => event.type === 'turn/start')).toBe(true) diff --git a/packages/api/session-controller/tests/commands-queue-attachment.host.spec.ts b/packages/api/session-controller/tests/commands-queue-attachment.host.spec.ts index 06c831db1c..34fa28e8f3 100644 --- a/packages/api/session-controller/tests/commands-queue-attachment.host.spec.ts +++ b/packages/api/session-controller/tests/commands-queue-attachment.host.spec.ts @@ -5,6 +5,7 @@ import type { Agent, Inbox, ModelSelectionRef } from '@deepseek-ai/dsh-agent' import { AttachmentError, AttachmentId } from '@deepseek-ai/dsh-attachment' import type { ImageAttachmentRef } from '@deepseek-ai/dsh-attachment' import { createAssistantMessage, createUserMessage, MessageId } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' import SessionStore, { SESSION_FORMAT_VERSION, Session, SessionId, SessionLogOffset, SessionSeq, } from '@deepseek-ai/dsh-session' @@ -17,6 +18,12 @@ import { SessionCommandController } from '../src/commands.ts' import { createInboxStub } from '@deepseek-ai/dsh-agent-loop-testkit' import { installSessionReadTestServices, testSessionPersistence } from './test-remote.ts' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'test': { kind: 'test' } & ContextFormed + } +} + async function commandHarness( childMode?: 'continuable' | 'seeded-continuable' | 'seed-only' | 'one-shot' | 'unknown' | 'corrupt', ): Promise<{ @@ -229,7 +236,7 @@ describe('Session queue commands', () => { content: [{ type: 'text', text: 'queued' }], source: { kind: 'user' }, }) const context = createUserMessage({ - content: [{ type: 'text', text: 'context' }], source: { kind: 'plugin', plugin: 'test' }, + content: [{ type: 'text', text: 'context' }], source: { kind: 'test' }, }) inbox.append('next-turn', queued) inbox.append('next-step', context) diff --git a/packages/api/session-controller/tests/control-queue.host.spec.ts b/packages/api/session-controller/tests/control-queue.host.spec.ts index 3a44506ea6..0c635753ea 100644 --- a/packages/api/session-controller/tests/control-queue.host.spec.ts +++ b/packages/api/session-controller/tests/control-queue.host.spec.ts @@ -1,6 +1,7 @@ import { Context } from '@deepseek-ai/cordis' import type { Agent, Inbox, InboxState } from '@deepseek-ai/dsh-agent' import { createUserMessage } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' import { SessionId } from '@deepseek-ai/dsh-session' import { afterEach, describe, expect, it } from 'vitest' import { SessionControlController } from '../src/control.ts' @@ -10,6 +11,12 @@ import { mountAgentLoopTestHarness, } from '@deepseek-ai/dsh-agent-loop-testkit' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'fixture': { kind: 'fixture' } & ContextFormed + } +} + const ownedContexts = new Set() afterEach(async () => { await Promise.all([...ownedContexts].map(ctx => ctx.fiber.dispose())) @@ -33,7 +40,7 @@ async function harness(): Promise<{ function message(text: string, source: 'user' | 'plugin' = 'user') { return createUserMessage({ content: [{ type: 'text', text }], - source: source === 'user' ? { kind: 'user' } : { kind: 'plugin', plugin: 'fixture' }, + source: source === 'user' ? { kind: 'user' } : { kind: 'fixture' }, }) } diff --git a/packages/api/session-controller/tests/event-script.client.ts b/packages/api/session-controller/tests/event-script.client.ts index 67a7c4026c..0e7eaed7d1 100644 --- a/packages/api/session-controller/tests/event-script.client.ts +++ b/packages/api/session-controller/tests/event-script.client.ts @@ -12,6 +12,19 @@ import type { SessionWireEvent, } from '../src/types.ts' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'compact-checkpoint': { kind: 'compact-checkpoint'; compactionId: string } + } +} + +type CheckpointSource = { kind: 'compact-checkpoint'; compactionId: string } + +/** Build a typed checkpoint source for the history event script. */ +function checkpointSource(): CheckpointSource { + return { kind: 'compact-checkpoint', compactionId: 'event-script-compaction' } +} + /** One text content block (local helper). */ const text = (t: string): ContentBlock[] => [{ type: 'text', text: t }] @@ -149,7 +162,7 @@ export const ev = { sourceEventSeqs: [summarySeq, start, end], data: createUserMessage({ content: text('model only'), - source: { kind: 'plugin', plugin: 'compact' }, + source: checkpointSource(), }), }), } diff --git a/packages/api/session-controller/tests/session-history-journal.host.spec.ts b/packages/api/session-controller/tests/session-history-journal.host.spec.ts index b8bed4b26a..d836aa9734 100644 --- a/packages/api/session-controller/tests/session-history-journal.host.spec.ts +++ b/packages/api/session-controller/tests/session-history-journal.host.spec.ts @@ -5,11 +5,18 @@ import { Context } from '@deepseek-ai/cordis' import AgentRegistry, { type Agent, type AssistantStreamFrame } from '@deepseek-ai/dsh-agent' import SessionStore from '@deepseek-ai/dsh-session' import { LlmAttemptId, ToolCallId, createMessage, createToolResultMessage, createUserMessage } from '@deepseek-ai/dsh-llm' +import type { MessageSource } from '@deepseek-ai/dsh-llm' import type { Session, SessionEvent, SessionId } from '@deepseek-ai/dsh-session' import { SessionHistoryController } from '@deepseek-ai/dsh-api-session-controller/src/history.ts' import type { SessionFollowFrame, SessionPage, SessionWireEvent } from '@deepseek-ai/dsh-api-session-controller/types' import { createSessionTestRemote, installSessionReadTestServices } from './test-remote.ts' +type CheckpointSource = Extract + +/** Build a typed checkpoint source for a journal fixture without owning compaction. */ +function checkpointSource(compactionId: string): CheckpointSource { + return { kind: 'compact-checkpoint', compactionId: compactionId as CheckpointSource['compactionId'] } +} /** Append a production-shaped human prompt to the session surface. */ function appendUserText(session: Session, text: string): SessionEvent { return session.append('user/message', createUserMessage({ @@ -768,7 +775,7 @@ describe('Session history raw journal', () => { }) session.append('user/message', createUserMessage({ content: [{ type: 'text', text: 'summary' }], - source: { kind: 'plugin', plugin: 'compact' }, + source: checkpointSource('journal-compaction'), }), { surfaceOp: { op: 'replace', startSeq: shadowedStart, endSeq: shadowedEnd }, sourceEventSeqs: [...shadowed, summary.seq], diff --git a/packages/api/session-controller/tests/session-models.host.spec.ts b/packages/api/session-controller/tests/session-models.host.spec.ts index bb9e77b4e2..51133aafde 100644 --- a/packages/api/session-controller/tests/session-models.host.spec.ts +++ b/packages/api/session-controller/tests/session-models.host.spec.ts @@ -298,7 +298,7 @@ describe('Web session model selection', () => { }))).selected).toEqual({ provider: 'text-only', model: 'plain' }) agent.session.append('user/message', { - id: 'summary', role: 'user', source: { kind: 'plugin', plugin: 'compact' }, + id: 'summary', role: 'user', source: { kind: 'compact-checkpoint', compactionId: 'model-selection-compaction' }, content: [{ type: 'text', text: 'image summarized' }], } as never, { surfaceOp: { op: 'replace', startSeq: imageEvent.seq, endSeq: imageEvent.seq }, diff --git a/packages/client/ui-chat/src/client/conversation-nodes/command.ts b/packages/client/ui-chat/src/client/conversation-nodes/command.ts index e21f50c5f5..7604d88edc 100644 --- a/packages/client/ui-chat/src/client/conversation-nodes/command.ts +++ b/packages/client/ui-chat/src/client/conversation-nodes/command.ts @@ -20,7 +20,7 @@ declare module '../contract/chat-nodes.ts' { type CommandId = CommandNode['commandId'] -const COMPACT_PLUGIN: CompactionCheckpointSource['plugin'] = 'compact' +const COMPACT_KIND: CompactionCheckpointSource['kind'] = 'compact-checkpoint' interface CommandState { readonly command: CommandNode @@ -82,11 +82,10 @@ function compactSource(event: Parameters[0] if (event.type !== 'user/message' || !isReplacementSurfaceEvent(event)) return undefined const source = event.data.source as unknown as { kind?: unknown - plugin?: unknown compactionId?: unknown sourceCommandId?: CommandId } - if (source.kind !== 'plugin' || source.plugin !== COMPACT_PLUGIN || typeof source.compactionId !== 'string') return undefined + if (source.kind !== COMPACT_KIND || typeof source.compactionId !== 'string') return undefined return { compactionId: source.compactionId, ...source.sourceCommandId === undefined ? {} : { sourceCommandId: source.sourceCommandId }, diff --git a/packages/client/ui-chat/src/client/conversation-nodes/event-projection.ts b/packages/client/ui-chat/src/client/conversation-nodes/event-projection.ts index 5995638194..e61bb53109 100644 --- a/packages/client/ui-chat/src/client/conversation-nodes/event-projection.ts +++ b/packages/client/ui-chat/src/client/conversation-nodes/event-projection.ts @@ -66,8 +66,6 @@ export function contextProducer(source: unknown): ContextProducerView { return { role: 'recall', label: joined(collect(record, 'references', 'label')) ?? kind } case 'agent-instructions': return { role: 'inject', label: joined(collect(record, 'changes', 'path')) ?? kind } - case 'plugin': - return { role: 'inject', label: readString(record, 'plugin') ?? kind } case 'skill-invocation': return { role: 'inject', label: readString(record, 'name') ?? kind } default: diff --git a/packages/client/ui-chat/src/client/conversation-nodes/message.ts b/packages/client/ui-chat/src/client/conversation-nodes/message.ts index 823bbe3c93..bd8f720a4d 100644 --- a/packages/client/ui-chat/src/client/conversation-nodes/message.ts +++ b/packages/client/ui-chat/src/client/conversation-nodes/message.ts @@ -36,8 +36,8 @@ declare module '../contract/chat-nodes.ts' { function isCompactionCheckpoint(event: Parameters[0]): boolean { if (event.type !== 'user/message' || !isReplacementSurfaceEvent(event)) return false - const source = event.data.source - return source.kind === 'plugin' && source.plugin === 'compact' + const source = event.data.source as { kind?: unknown } + return source.kind === 'compact-checkpoint' } /** User, steering, and injected-context message classification Definition. */ diff --git a/packages/client/ui-chat/tests/chat-branch-tails.client.spec.tsx b/packages/client/ui-chat/tests/chat-branch-tails.client.spec.tsx index 4e2493d17c..013ed04786 100644 --- a/packages/client/ui-chat/tests/chat-branch-tails.client.spec.tsx +++ b/packages/client/ui-chat/tests/chat-branch-tails.client.spec.tsx @@ -331,7 +331,7 @@ describe('MessageItem arms', () => { kind: 'context', seq: 3, content: [{ type: 'text', text: 'line one\n\nline two' }], - source: { kind: 'plugin', plugin: 'fixture', empty: {}, list: [] }, + source: { kind: 'fixture', empty: {}, list: [] }, producer: { role: 'inject', label: 'fixture' }, form: null, } as never} @@ -351,7 +351,7 @@ describe('MessageItem arms', () => { expect(ctxView.container.querySelector('[data-context-text]')?.textContent) .toBe('line one\n\nline two') const fields = [...ctxView.container.querySelectorAll('[data-context-fields] dt')].map(node => node.textContent) - expect(fields).toEqual(['plugin', 'empty', 'list']) + expect(fields).toEqual(['empty', 'list']) fireEvent.keyDown(disclosure, { key: ' ' }) expect(disclosure.getAttribute('aria-expanded')).toBe('false') @@ -650,7 +650,7 @@ describe('MessageItem arms', () => { const view = render( { ) fireEvent.click(view.getByRole('button', { name: /^上下文注入\s*later$/ })) const fields = [...view.container.querySelectorAll('[data-context-fields] dt')].map(node => node.textContent) - expect(fields).toEqual(['plugin', 'form']) + expect(fields).toEqual(['form']) }) it('the snapshot form attributes each part to the subsystem that produced it', () => { @@ -668,8 +668,7 @@ describe('MessageItem arms', () => { seq: 3, content: [{ type: 'text', text: 'Current runtime context.\n\nsandbox\n\nworkspace' }], source: { - kind: 'plugin', - plugin: '@deepseek-ai/dsh-system-prompt', + kind: 'runtime-context', form: 'snapshot', sections: [{ name: 'sandbox:policy', text: 'workspace-write' }, { name: 'workspace', text: '/repo' }], }, @@ -690,7 +689,7 @@ describe('MessageItem arms', () => { kind: 'context', seq: 3, content: [{ type: 'text', text: 'background job bash-1 finished.' }], - source: { kind: 'plugin', plugin: 'tool-jobs', form: 'notice', summary: 'bash pnpm test [status: completed]' }, + source: { kind: 'tool-jobs', form: 'notice', summary: 'bash pnpm test [status: completed]' }, producer: { role: 'inject', label: 'tool-jobs' }, form: 'notice', } as never} @@ -705,7 +704,7 @@ describe('MessageItem arms', () => { const view = render( { ...textMessage('context-1', 'workspace context'), turn: 1, step: 1, - source: { kind: 'plugin', plugin: 'context' }, + source: { kind: 'context' }, }, { surfaceOp: 'append' }), at(4, 'assistant/live-chunk', { turn: 1, step: 1, chunk: { type: 'reasoning-delta', index: 0, text: 'thinking' }, @@ -453,7 +453,7 @@ describe('built-in conversation node Definitions', () => { at(1, 'turn/start', { turn: 1 }), at(2, 'user/message', { ...textMessage('context-1', 'runtime context'), - source: { kind: 'plugin', plugin: 'context' }, + source: { kind: 'context' }, }, { surfaceOp: 'append' }), at(3, 'user/message', textMessage('user-1', 'question'), { surfaceOp: 'append' }), at(4, 'step/start', { turn: 1, step: 1 }), @@ -619,7 +619,7 @@ describe('built-in conversation node Definitions', () => { at(1, 'turn/start', { turn: 1 }), at(2, 'user/message', { ...textMessage('context-1', 'runtime context'), - source: { kind: 'plugin', plugin: 'context' }, + source: { kind: 'context' }, }, { surfaceOp: 'append' }), at(3, 'step/start', { turn: 1, step: 1 }), at(4, 'assistant/live-chunk', { @@ -1609,7 +1609,7 @@ describe('built-in conversation node Definitions', () => { at(4, 'user/message', textMessage('direct-user', 'prompt'), { surfaceOp: 'append' }), at(5, 'user/message', { ...textMessage('runtime-context', 'runtime facts'), - source: { kind: 'plugin', plugin: '@deepseek-ai/dsh-system-prompt', form: 'snapshot' }, + source: { kind: 'runtime-context', form: 'snapshot' }, }, { surfaceOp: 'append' }), at(6, 'request/header', { reason: 'initial', @@ -1644,7 +1644,7 @@ describe('built-in conversation node Definitions', () => { at(11, 'step/start', { turn: 1, step: 3 }), at(12, 'user/message', { turn: 1, step: 3, id: 'summary', role: 'user', - content: [{ type: 'text', text: 'summary' }], source: { kind: 'plugin', plugin: 'compaction' }, + content: [{ type: 'text', text: 'summary' }], source: { kind: 'compact-checkpoint', compactionId: 'compaction-1' }, }, { surfaceOp: { op: 'replace', startSeq: 5, endSeq: 9 }, sourceEventSeqs: [5, 8, 9] }), at(13, 'request/header', { reason: 'series', header: { config: { provider: 'test', model: 'test' }, tools: [] }, @@ -1788,7 +1788,7 @@ describe('built-in conversation node Definitions', () => { at(4, 'user/message', textMessage('direct-user', 'prompt'), { surfaceOp: 'append' }), at(5, 'user/message', { ...textMessage('runtime-context', 'runtime facts'), - source: { kind: 'plugin', plugin: 'context' }, + source: { kind: 'context' }, }, { surfaceOp: 'append' }), at(6, 'request/header', { reason: 'initial', @@ -1907,7 +1907,7 @@ describe('built-in conversation node Definitions', () => { }), at(6, 'user/message', { ...textMessage('compacted', 'summary'), - source: { kind: 'plugin', plugin: 'compact' }, + source: { kind: 'compact-checkpoint', compactionId: 'chat-compaction-1' }, }, { surfaceOp: { op: 'replace', startSeq: 4, endSeq: 4 } }), at(7, 'request/header', { reason: 'series', @@ -2088,7 +2088,7 @@ describe('built-in conversation node Definitions', () => { at(2, 'step/start', { turn: 1, step: 1 }), at(3, 'user/message', { ...textMessage('replacement-user', 'model-only context'), - source: { kind: 'plugin', plugin: 'foreign' }, + source: { kind: 'foreign' }, }, { surfaceOp: { op: 'replace', startSeq: 1, endSeq: 1 } }), at(4, 'assistant/message', { turn: 1, @@ -2176,8 +2176,7 @@ describe('built-in conversation node Definitions', () => { at(13, 'user/message', { ...textMessage('manual-checkpoint', 'checkpoint'), source: { - kind: 'plugin', - plugin: 'compact', + kind: 'compact-checkpoint', compactionId: 'manual-1', sourceCommandId: 'command-1', }, @@ -2201,7 +2200,7 @@ describe('built-in conversation node Definitions', () => { }), at(22, 'user/message', { ...textMessage('automatic-checkpoint', 'checkpoint'), - source: { kind: 'plugin', plugin: 'compact', compactionId: 'automatic-1' }, + source: { kind: 'compact-checkpoint', compactionId: 'automatic-1' }, }, { surfaceOp: { op: 'replace', startSeq: 3, endSeq: 4 } }), at(23, 'compaction/end', { compactionId: 'automatic-1', turn: null }), ]) @@ -2220,7 +2219,7 @@ describe('built-in conversation node Definitions', () => { const value = assembler([ at(13, 'user/message', { ...textMessage('checkpoint', 'checkpoint'), - source: { kind: 'plugin', plugin: 'compact', compactionId: 'compact-1' }, + source: { kind: 'compact-checkpoint', compactionId: 'compact-1' }, }, { surfaceOp: { op: 'replace', startSeq: 1, endSeq: 8 } }), ], true) const before = node(snapshot(value), 'compaction') @@ -2261,7 +2260,7 @@ describe('built-in conversation node Definitions', () => { }), at(11, 'user/message', { ...textMessage('checkpoint-windowed', 'checkpoint'), - source: { kind: 'plugin', plugin: 'compact', compactionId: 'compact-windowed' }, + source: { kind: 'compact-checkpoint', compactionId: 'compact-windowed' }, }, { surfaceOp: { op: 'replace', startSeq: 1, endSeq: 3 } }), ], true) @@ -2285,7 +2284,7 @@ describe('built-in conversation node Definitions', () => { }), at(22, 'user/message', { ...textMessage('legacy-checkpoint', 'checkpoint'), - source: { kind: 'plugin', plugin: 'compact' }, + source: { kind: 'compact-checkpoint' }, }, { surfaceOp: { op: 'replace', startSeq: 1, endSeq: 3 } }), at(23, 'compaction/end', { turn: null }), ], true) @@ -2491,8 +2490,7 @@ describe('built-in conversation node Definitions', () => { at(21, 'user/message', { ...textMessage('manual-checkpoint', 'checkpoint'), source: { - kind: 'plugin', - plugin: 'compact', + kind: 'compact-checkpoint', compactionId: 'manual-1', sourceCommandId: 'command-1', }, diff --git a/packages/client/ui-chat/tests/event-projection.client.spec.ts b/packages/client/ui-chat/tests/event-projection.client.spec.ts index f1818da09c113e747fe4b08b3918d6beb97080ca..c895f8a3bc2016574bab9ea4e448b8f702fd71d6 100644 GIT binary patch delta 16 YcmX@4xj}QoHO9%Cd4xCrW;`wg06<>{IRF3v delta 20 ccmdm>c}R1^HO9%;IRqyk5D?k?lJU3@0AM-@yZ`_I diff --git a/packages/client/ui-trajectory/src/client/TrajectoryTable.tsx b/packages/client/ui-trajectory/src/client/TrajectoryTable.tsx index fb765dca97..30bd1f98c6 100644 --- a/packages/client/ui-trajectory/src/client/TrajectoryTable.tsx +++ b/packages/client/ui-trajectory/src/client/TrajectoryTable.tsx @@ -887,12 +887,6 @@ function messageSourceLabel(source: unknown, t: TrajectoryTranslate): string { const properties = source as Record const kind = properties.kind if (kind === 'user') return t('source.user') - if (kind === 'plugin') { - const plugin = properties.plugin - return typeof plugin === 'string' && plugin !== '' - ? t('source.pluginNamed', { plugin }) - : t('source.plugin') - } if (kind === 'goal') { const round = properties.round return typeof round === 'number' && round > 0 diff --git a/packages/client/ui-trajectory/src/client/trajectory-compaction-definition.ts b/packages/client/ui-trajectory/src/client/trajectory-compaction-definition.ts index 32916af141..3d16b6eb70 100644 --- a/packages/client/ui-trajectory/src/client/trajectory-compaction-definition.ts +++ b/packages/client/ui-trajectory/src/client/trajectory-compaction-definition.ts @@ -21,7 +21,7 @@ function checkpointId( readonly plugin?: unknown readonly compactionId?: unknown } - return source.kind === 'plugin' && source.plugin === 'compact' + return source.kind === 'compact-checkpoint' && typeof source.compactionId === 'string' && source.compactionId !== '' ? source.compactionId : undefined diff --git a/packages/client/ui-trajectory/src/client/trajectory-event-projection.ts b/packages/client/ui-trajectory/src/client/trajectory-event-projection.ts index c132e88747..0f3d538233 100644 --- a/packages/client/ui-trajectory/src/client/trajectory-event-projection.ts +++ b/packages/client/ui-trajectory/src/client/trajectory-event-projection.ts @@ -66,8 +66,6 @@ export function contextProducer(source: unknown): ContextProducerView { return { role: 'recall', label: joined(collect(record, 'references', 'label')) ?? kind } case 'agent-instructions': return { role: 'inject', label: joined(collect(record, 'changes', 'path')) ?? kind } - case 'plugin': - return { role: 'inject', label: readString(record, 'plugin') ?? kind } case 'skill-invocation': return { role: 'inject', label: readString(record, 'name') ?? kind } default: diff --git a/packages/client/ui-trajectory/tests/conversation-definitions.client.spec.ts b/packages/client/ui-trajectory/tests/conversation-definitions.client.spec.ts index f30c8048d8..6c24b527dc 100644 --- a/packages/client/ui-trajectory/tests/conversation-definitions.client.spec.ts +++ b/packages/client/ui-trajectory/tests/conversation-definitions.client.spec.ts @@ -167,7 +167,7 @@ function systemMessage(text: string) { id: `system-${text}`, role: 'system', content: [{ type: 'text', text }], - source: { kind: 'plugin', plugin: '@deepseek-ai/dsh-system-prompt' }, + source: { kind: 'system-prompt' }, } } @@ -510,7 +510,7 @@ describe('Trajectory conversation Definitions', () => { id: 'checkpoint', role: 'user', content: [{ type: 'text', text: 'summary checkpoint' }], - source: { kind: 'plugin', plugin: 'compact', compactionId: 'complete' }, + source: { kind: 'compact-checkpoint', compactionId: 'complete' }, }), at(4, 'compaction/end', { compactionId: 'complete', turn: null }), at(5, 'compaction/start', { compactionId: 'orphan', turn: null }), @@ -803,7 +803,7 @@ describe('Trajectory conversation Definitions', () => { at(11, 'step/start', { turn: 1, step: 3 }), at(12, 'user/message', { turn: 1, step: 3, id: 'summary', role: 'user', - content: [{ type: 'text', text: 'summary' }], source: { kind: 'plugin', plugin: 'compaction' }, + content: [{ type: 'text', text: 'summary' }], source: { kind: 'compact-checkpoint', compactionId: 'compaction-1' }, }, { surfaceOp: { op: 'replace', startSeq: 5, endSeq: 9 }, sourceEventSeqs: [5, 8, 9] }), at(13, 'request/header', { reason: 'series', header: { config: { provider: 'test', model: 'test' }, tools: [] }, @@ -856,7 +856,7 @@ describe('Trajectory conversation Definitions', () => { at(6, 'system/message', { turn: 1, step: 1, message: systemMessage('B') }, { surfaceOp: 'append' }), at(7, 'request/header', { reason: 'resume', header: { config: { provider: 'test', model: 'test' } } }), at(8, 'user/message', { - ...systemMessage('summary'), role: 'user', source: { kind: 'plugin', plugin: 'compaction' }, + ...systemMessage('summary'), role: 'user', source: { kind: 'compact-checkpoint', compactionId: 'compaction-1' }, }, { surfaceOp: { op: 'replace', startSeq: 2, endSeq: 6 } }), at(9, 'assistant/message', { turn: 1, step: 1, message: assistantMessage('reply', 'reply') }), ]) diff --git a/packages/client/ui-trajectory/tests/event-projection.client.spec.ts b/packages/client/ui-trajectory/tests/event-projection.client.spec.ts index 0405cd9cc5..75ccac4052 100644 --- a/packages/client/ui-trajectory/tests/event-projection.client.spec.ts +++ b/packages/client/ui-trajectory/tests/event-projection.client.spec.ts @@ -15,7 +15,7 @@ describe('Trajectory event projection', () => { .toEqual({ role: 'inject', label: 'AGENTS.md' }) expect(contextProducer({ kind: 'agent-instructions', changes: 'bad' }).label) .toBe('agent-instructions') - expect(contextProducer({ kind: 'plugin', plugin: 'p' }).label).toBe('p') + expect(contextProducer({ kind: 'p' }).label).toBe('p') expect(contextProducer({ kind: 'plugin', plugin: 1 }).label).toBe('plugin') expect(contextProducer({ kind: 'skill-invocation', name: 's' }).label).toBe('s') expect(contextProducer({ kind: 'future' }).label).toBe('future') diff --git a/packages/compaction/compaction-basic/README.i18n.yaml b/packages/compaction/compaction-basic/README.i18n.yaml index fba8635a73..51b885763b 100644 --- a/packages/compaction/compaction-basic/README.i18n.yaml +++ b/packages/compaction/compaction-basic/README.i18n.yaml @@ -2,5 +2,5 @@ # side as of the last confirmed-consistent state. Both languages carry equal authority; # after editing either side, bring the other along and re-record with: # pnpm run verify-translation-pairing --write packages/compaction/compaction-basic/README.md -README.md: 68d5a321e04a90bfb726392d1fb179612f6e0626 -README.zh.md: f941cac74053a680cad859b68c7836e181065bc9 +README.md: cb31438816088070fe996e7f3d38b8480404aa84 +README.zh.md: a038fecc9880160a4fc23377cd5fec6e931a7b01 diff --git a/packages/compaction/compaction-basic/README.md b/packages/compaction/compaction-basic/README.md index 68d5a321e0..cb31438816 100644 --- a/packages/compaction/compaction-basic/README.md +++ b/packages/compaction/compaction-basic/README.md @@ -115,7 +115,7 @@ Pressure policy resolves capacity from the adapter that owns the durable route. ### Summarization mechanics -A direct `ctx.llm.stream()` call uses the configured provider/model pair and cap, falling back to the latest logged request target and then the `AgentOptions` pair, without running the loop-only `agent/request` extension point. The call replays the derived `system/message` at surface node 0 as the leading entry of `messages`, followed by the shadowed-region messages (including a shadowed in-history `system/message` in its surface position), and carries the header's tools verbatim — including image references, which the selected adapter must resolve or explicitly reject — and appends the compaction instruction as the final user message, so it reuses the provider's warm prefix cache instead of invalidating it. An empty-content system head contributes no message but remains outside the compacted range. The call sets `GenerateOptions.purpose` to `compaction`; only returned text enters the checkpoint, excluding reasoning and tool calls. Image output fails with `UNSUPPORTED_CONTENT` rather than disappearing. The replacement user message frames the summary with `` tags; the raw summary remains on the `compaction/summary` event. +A direct `ctx.llm.stream()` call uses the configured provider/model pair and cap, falling back to the latest logged request target and then the `AgentOptions` pair, without running the loop-only `agent/request` extension point. The call replays the derived `system/message` at surface node 0 as the leading entry of `messages`, followed by the shadowed-region messages (including a shadowed in-history `system/message` in its surface position), and carries the header's tools verbatim — including image references, which the selected adapter must resolve or explicitly reject — and appends the compaction instruction as the final user message, so it reuses the provider's warm prefix cache instead of invalidating it. An empty-content system head contributes no message but remains outside the compacted range. The final instruction is a frozen `RequestUserInput` without durable identity or source; the replayed history and persisted checkpoint remain durable messages. The call sets `GenerateOptions.purpose` to `compaction`; only returned text enters the checkpoint, excluding reasoning and tool calls. Image output fails with `UNSUPPORTED_CONTENT` rather than disappearing. The replacement user message frames the summary with `` tags; the raw summary remains on the `compaction/summary` event. ### The region transaction diff --git a/packages/compaction/compaction-basic/README.zh.md b/packages/compaction/compaction-basic/README.zh.md index f941cac740..a038fecc98 100644 --- a/packages/compaction/compaction-basic/README.zh.md +++ b/packages/compaction/compaction-basic/README.zh.md @@ -115,7 +115,7 @@ kind: "package-reference" ### 摘要机制 -直接 `ctx.llm.stream()` 调用使用已配置的提供方/模型对与上限,回退到最新已记录请求目标,然后再回退到 `AgentOptions` 对,而不运行仅用于 agent loop 的 `agent/request` 扩展点。该调用将 surface 节点 0 处派生的 `system/message` 作为 `messages` 的首项回放,后接已遮蔽区域消息(包括位于其 surface 位置的被遮蔽历史内 `system/message`),并逐字携带 header 的工具——包括所选适配器必须解析或明确拒绝的图片引用——并将压缩指令作为最后一条 user 消息追加,从而复用提供方的热前缀 cache,而非使它失效。空内容系统头节点不贡献消息,但仍处于压缩范围之外。调用将 `GenerateOptions.purpose` 设为 `compaction`;只有返回文本进入检查点,推理与工具调用都会被排除。图片输出会以 `UNSUPPORTED_CONTENT` 失败,而不是消失。替换 user 消息用 `` 标签框定摘要;原始摘要保留在 `compaction/summary` 事件上。 +直接 `ctx.llm.stream()` 调用使用已配置的提供方/模型对与上限,回退到最新已记录请求目标,然后再回退到 `AgentOptions` 对,而不运行仅用于 agent loop 的 `agent/request` 扩展点。该调用将 surface 节点 0 处派生的 `system/message` 作为 `messages` 的首项回放,后接已遮蔽区域消息(包括位于其 surface 位置的被遮蔽历史内 `system/message`),并逐字携带 header 的工具——包括所选适配器必须解析或明确拒绝的图片引用——并将压缩指令作为最后一条 user 消息追加,从而复用提供方的热前缀 cache,而非使它失效。空内容系统头节点不贡献消息,但仍处于压缩范围之外。最终指令是冻结的 `RequestUserInput`,不含持久身份或来源;回放历史和持久化检查点仍然使用持久消息。调用将 `GenerateOptions.purpose` 设为 `compaction`;只有返回文本进入检查点,推理与工具调用都会被排除。图片输出会以 `UNSUPPORTED_CONTENT` 失败,而不是消失。替换 user 消息用 `` 标签框定摘要;原始摘要保留在 `compaction/summary` 事件上。 ### 区域事务 diff --git a/packages/compaction/compaction-basic/src/region.ts b/packages/compaction/compaction-basic/src/region.ts index b4ba4ae380..7b3d77d299 100644 --- a/packages/compaction/compaction-basic/src/region.ts +++ b/packages/compaction/compaction-basic/src/region.ts @@ -23,7 +23,6 @@ import { SessionSeq, type Session, type SessionEvent } from '@deepseek-ai/dsh-se import type { Agent } from '@deepseek-ai/dsh-agent' import { frameSummary } from './summarizer.ts' import type { SummarizationInput, SummaryResult } from './summarizer.ts' - interface RegionDependencies { readonly meter: TokenMeter summarize(input: SummarizationInput, agent: Agent, signal?: AbortSignal): Promise diff --git a/packages/compaction/compaction-basic/src/summarizer.ts b/packages/compaction/compaction-basic/src/summarizer.ts index e015bf887d..2b85f6470e 100644 --- a/packages/compaction/compaction-basic/src/summarizer.ts +++ b/packages/compaction/compaction-basic/src/summarizer.ts @@ -5,9 +5,10 @@ */ import type { Context } from '@deepseek-ai/cordis' -import { contentHasImage, createUserMessage, BlockAssembler, LlmError } from '@deepseek-ai/dsh-llm' +import { contentHasImage, BlockAssembler, LlmError } from '@deepseek-ai/dsh-llm' +import { deepFreeze } from '@deepseek-ai/dsh-util-values' import type { - ContentBlock, FinishReason, GenerateOptions, Message, TokenUsage, ToolSchema, + ContentBlock, FinishReason, GenerateOptions, Message, RequestMessage, TokenUsage, ToolSchema, } from '@deepseek-ai/dsh-llm' import type { Agent } from '@deepseek-ai/dsh-agent' @@ -141,11 +142,11 @@ export async function summarizeWithLlm( } const assembler = new BlockAssembler() - const messages: Message[] = [ + const messages: RequestMessage[] = [ ...input.messages, - createUserMessage({ + deepFreeze({ + role: 'user', content: [{ type: 'text', text: COMPACTION_INSTRUCTION }], - source: { kind: 'plugin', plugin: 'dsh-compaction-basic' }, }), ] const options: GenerateOptions = { diff --git a/packages/compaction/compaction-basic/tests/compaction-basic.spec.ts b/packages/compaction/compaction-basic/tests/compaction-basic.spec.ts index 90c6c21b01..9c36961f81 100644 --- a/packages/compaction/compaction-basic/tests/compaction-basic.spec.ts +++ b/packages/compaction/compaction-basic/tests/compaction-basic.spec.ts @@ -14,6 +14,7 @@ import { } from '@deepseek-ai/dsh-compaction-basic/src/config.ts' import type { CompactionResult } from '@deepseek-ai/dsh-compaction' import LlmRuntime, { createUserMessage, ToolCallId, CONTEXT_WINDOW_EXCEEDED_CODE, createSystemMessage, createToolResultMessage, LlmAdapter , createMessage } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' import type { ContentBlock, GenerateOptions, @@ -29,6 +30,12 @@ import TokenMeter from '@deepseek-ai/dsh-token-meter' import { agentEvents, type Agent, type RequestErrorAction } from '@deepseek-ai/dsh-agent' import ToolResultPruner from '@deepseek-ai/dsh-compaction-tool-result-pruner' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'test': { kind: 'test' } & ContextFormed + } +} + const SIGNAL = new AbortController().signal const MODEL = 'test-model' @@ -100,12 +107,10 @@ function summarizedText(input: SummarizationInput): string { function promptInput(text: string): SummarizationInput { return { messages: [createUserMessage({ content: [{ type: 'text', text }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, })] } } -const SYSTEM_PROMPT_PLUGIN = '@deepseek-ai/dsh-system-prompt' - /** * Closed two-message turns followed by one open turn for durable compaction events. * A `system` text puts a `system/message` at surface node 0 before turn 1's user message. @@ -118,7 +123,7 @@ function conversation(turns = 4, text = 'fixture '.repeat(40).trim(), system?: s session.append('system/message', { turn, step: 1, - message: createSystemMessage(system, SYSTEM_PROMPT_PLUGIN), + message: createSystemMessage(system), }, { surfaceOp: 'append' }) } session.append('user/message', createUserMessage({ @@ -1132,7 +1137,7 @@ describe('compaction region transaction', () => { compact.mutateDuringSummary = () => { session.append('user/message', createUserMessage({ content: [{ type: 'text', text: 'concurrent surface mutation' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, }), { surfaceOp: 'append' }) } const nodes = session.surface.nodes @@ -1272,7 +1277,12 @@ describe('default one-shot summarizer', () => { expect(adapter.lastOptions).not.toHaveProperty('system') expect(adapter.lastOptions?.tools).toEqual(tools) expect(adapter.lastOptions?.messages.slice(0, -1)).toEqual(prefix) - expect(adapter.lastOptions?.messages.at(-1)).toMatchObject({ role: 'user' }) + const instruction = adapter.lastOptions?.messages.at(-1) + expect(instruction).toMatchObject({ role: 'user' }) + expect(instruction).not.toHaveProperty('id') + expect(instruction).not.toHaveProperty('source') + expect(Object.isFrozen(instruction)).toBe(true) + expect(Object.isFrozen(instruction?.content[0])).toBe(true) expect(result.shadowedSeqs).toEqual(nodes.slice(start, start + 2)) if (system !== undefined) expect(session.surface.nodes[0]).toBe(nodes[0]) }) @@ -1343,9 +1353,9 @@ describe('default one-shot summarizer', () => { }, }, ], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, }) - const system = createSystemMessage('REPLAYED SYSTEM', SYSTEM_PROMPT_PLUGIN) + const system = createSystemMessage('REPLAYED SYSTEM') await compact.runSummarize({ tools, messages: [system, prefix], @@ -1383,10 +1393,10 @@ describe('default one-shot summarizer', () => { ctx.llm.registerAdapter(['policy-summary'], policyAdapter) const prefix: Message = createUserMessage({ content: [{ type: 'text', text: 'warm prefix' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, }) - const system = createSystemMessage('WARM SYSTEM', SYSTEM_PROMPT_PLUGIN) + const system = createSystemMessage('WARM SYSTEM') const output = await compact.runSummarize({ messages: [system, prefix], }, agent(conversation(1), 'fallback')) @@ -2091,7 +2101,7 @@ describe('route-priced image pressure', () => { }] const framed = ctx.tokenMeter.estimateMessage(createUserMessage({ content: frameSummary(compact.summary), - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, })) expect(framed).toBeGreaterThan(imageNode.heuristicTokens) expect(framed).toBeLessThan(imageNode.tokens) diff --git a/packages/compaction/compaction-basic/tests/compaction-loop-repro.spec.ts b/packages/compaction/compaction-basic/tests/compaction-loop-repro.spec.ts index a527226c03..decedf019e 100644 --- a/packages/compaction/compaction-basic/tests/compaction-loop-repro.spec.ts +++ b/packages/compaction/compaction-basic/tests/compaction-loop-repro.spec.ts @@ -336,7 +336,7 @@ describe('token pressure after loop-admitted system prompts', () => { agent.session.append('system/message', { turn, step, - message: createSystemMessage('retry guidance', '@deepseek-ai/dsh-system-prompt'), + message: createSystemMessage('retry guidance'), }, { surfaceOp: { op: 'replace', startSeq: node, endSeq: node }, sourceEventSeqs: [node] }) return { kind: 'retry' } }) diff --git a/packages/compaction/compaction-basic/tests/manual-compaction.spec.ts b/packages/compaction/compaction-basic/tests/manual-compaction.spec.ts index a420cee61f..744416e219 100644 --- a/packages/compaction/compaction-basic/tests/manual-compaction.spec.ts +++ b/packages/compaction/compaction-basic/tests/manual-compaction.spec.ts @@ -21,12 +21,14 @@ import type { ContentBlock, LlmResolvedModelInfo, Message, + RequestMessage, StreamChunk, TokenUsage, } from '@deepseek-ai/dsh-llm' import SessionStore, { buildForkSeed, Session, SessionId, type SessionEvent } from '@deepseek-ai/dsh-session' import SessionProjectionRegistry from '@deepseek-ai/dsh-session-projection' import LlmRuntime from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' import TokenMeter from '@deepseek-ai/dsh-token-meter' import type { Agent } from '@deepseek-ai/dsh-agent' import type { @@ -34,6 +36,14 @@ import type { SummaryResult, } from '@deepseek-ai/dsh-compaction-basic/src/summarizer.ts' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'listener': { kind: 'listener' } & ContextFormed + 'rival': { kind: 'rival' } & ContextFormed + 'test': { kind: 'test' } & ContextFormed + } +} + const MODEL = 'mock' const SIGNAL = new AbortController().signal const PROMPT = 'older conversation history '.repeat(60) @@ -69,7 +79,7 @@ class GatedCompactionEngine extends BasicCompactionEngine { /** One text answer per request, with a context window large enough to avoid pressure. */ class TextAdapter extends LlmAdapter { - readonly requests: Message[][] = [] + readonly requests: RequestMessage[][] = [] override resolveModel(provider: string, model: string): Promise { return Promise.resolve({ @@ -80,7 +90,7 @@ class TextAdapter extends LlmAdapter { }) } - override async * stream(options: { messages: readonly Message[] }): AsyncIterable { + override async * stream(options: { messages: readonly RequestMessage[] }): AsyncIterable { this.requests.push([...options.messages]) yield { type: 'block-start', index: 0, blockType: 'text' } yield { type: 'block-end', index: 0, block: { type: 'text', text: 'answer' } } @@ -312,7 +322,7 @@ describe('compactNow through the real loop', () => { compact.duringSummary = () => { agent.inject(createUserMessage({ content: [{ type: 'text', text: 'INJECTED CONTEXT' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, })) } @@ -321,7 +331,7 @@ describe('compactNow through the real loop', () => { expect(result).not.toBeNull() const start = agent.session.snapshotEvents().findLast(event => event.type === 'compaction/start') const injected = agent.inbox.nextStep.find(message => - message.source.kind === 'plugin' && message.source.plugin === 'test') + message.source.kind === 'test') const end = agent.session.snapshotEvents().findLast(event => event.type === 'compaction/end') expect(start).toBeDefined() expect(injected).toBeDefined() @@ -350,7 +360,7 @@ describe('compactNow through the real loop', () => { attempts.push(event.type) agent.inject(createUserMessage({ content: [{ type: 'text', text: `from ${event.type}` }], - source: { kind: 'plugin', plugin: 'listener' }, + source: { kind: 'listener' }, })) }) @@ -361,7 +371,7 @@ describe('compactNow through the real loop', () => { expect(agent.session.deriveMessages()[0]?.role).toBe('system') expect(derivedText(agent.session)[1]).toContain('checkpoint') expect(agent.session.snapshotEvents().filter(event => event.type === 'user/message' - && event.data.source.kind === 'plugin' && event.data.source.plugin === 'listener')).toHaveLength(0) + && event.data.source.kind === 'listener')).toHaveLength(0) const types = compactEvents(agent.session).map(event => event.type) expect(types).toEqual(['compaction/start', 'compaction/summary', 'compaction/end']) }) @@ -543,7 +553,7 @@ describe('compactNow transaction and failure classification', () => { const [head] = session.surface.nodes session.append('user/message', createUserMessage({ content: [{ type: 'text', text: 'competing replacement' }], - source: { kind: 'plugin', plugin: 'rival' }, + source: { kind: 'rival' }, }), { surfaceOp: { op: 'replace', startSeq: head!, endSeq: head! }, sourceEventSeqs: [head!], @@ -564,7 +574,7 @@ describe('compactNow transaction and failure classification', () => { const middle = session.surface.nodes[1] session.append('user/message', createUserMessage({ content: [{ type: 'text', text: 'rewritten middle node' }], - source: { kind: 'plugin', plugin: 'rival' }, + source: { kind: 'rival' }, }), { surfaceOp: { op: 'replace', startSeq: middle!, endSeq: middle! }, sourceEventSeqs: [middle!], @@ -595,7 +605,7 @@ describe('compactNow transaction and failure classification', () => { queueMicrotask(() => { session.append('user/message', createUserMessage({ content: [{ type: 'text', text: 'late competing replacement' }], - source: { kind: 'plugin', plugin: 'rival' }, + source: { kind: 'rival' }, }), { surfaceOp: { op: 'replace', startSeq: head, endSeq: head }, sourceEventSeqs: [head], diff --git a/packages/compaction/compaction/src/checkpoint.ts b/packages/compaction/compaction/src/checkpoint.ts index 395a70c1f6..5cba6ca14c 100644 --- a/packages/compaction/compaction/src/checkpoint.ts +++ b/packages/compaction/compaction/src/checkpoint.ts @@ -16,7 +16,7 @@ import type { MessageSource } from '@deepseek-ai/dsh-llm/message' import type { CommandId } from '@deepseek-ai/dsh-commands/brand' import type { CompactionId } from './brand.ts' -const COMPACT_CHECKPOINT_MARKER = Object.freeze({ kind: 'plugin', plugin: 'compact' } as const) +const COMPACT_CHECKPOINT_MARKER = Object.freeze({ kind: 'compact-checkpoint' } as const) /** Message source carried by a concrete compaction checkpoint. */ export type CompactionCheckpointSource = typeof COMPACT_CHECKPOINT_MARKER & { @@ -46,6 +46,6 @@ export function compactCheckpointSource( * @param source - source restored from a surface user message. * @returns whether the source carries the backend-independent checkpoint marker. */ -export function isCompactCheckpointSource(source: MessageSource): boolean { - return source.kind === 'plugin' && source.plugin === COMPACT_CHECKPOINT_MARKER.plugin +export function isCompactCheckpointSource(source: MessageSource): source is CompactionCheckpointSource { + return source.kind === 'compact-checkpoint' } diff --git a/packages/compaction/compaction/src/index.ts b/packages/compaction/compaction/src/index.ts index eb8263f200..3efe4e87eb 100644 --- a/packages/compaction/compaction/src/index.ts +++ b/packages/compaction/compaction/src/index.ts @@ -11,6 +11,7 @@ import { Context, Service } from '@deepseek-ai/cordis' import type { Session, SessionSeq } from '@deepseek-ai/dsh-session' import type { CommandId } from '@deepseek-ai/dsh-commands/brand' import type { CompactionResult } from './types.ts' +import type { CompactionCheckpointSource } from './checkpoint.ts' export type { CompactionResult } from './types.ts' export { CompactionId } from './brand.ts' @@ -21,6 +22,12 @@ export { toolPairingBalancedAfter, toolPairingBalancedBefore } from './tool-pair export { compactCheckpointSource, isCompactCheckpointSource } from './checkpoint.ts' export type { CompactionCheckpointSource } from './checkpoint.ts' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'compact-checkpoint': CompactionCheckpointSource + } +} + /** Why automatic policy is asking a backend to consider compaction. */ export type CompactionTrigger = 'pressure' | 'context-overflow' diff --git a/packages/compaction/compaction/src/invariant.ts b/packages/compaction/compaction/src/invariant.ts index 7880e5fb24..0b347a71eb 100644 --- a/packages/compaction/compaction/src/invariant.ts +++ b/packages/compaction/compaction/src/invariant.ts @@ -97,10 +97,9 @@ function validateSourceCommandId( /** Validate one replacement checkpoint against its open compaction transaction. */ function validateCheckpoint( trace: SessionTrace, - event: SessionEvent<'user/message'>, + source: CompactionCheckpointSource, fail: InvariantFailure, ): void { - const source = event.data.source as typeof event.data.source & Partial validateId(source.compactionId, 'compaction checkpoint compactionId', fail) if (source.sourceCommandId !== undefined) { validateId(source.sourceCommandId, 'compaction checkpoint sourceCommandId', fail) @@ -190,7 +189,7 @@ function validateCompactionEvent( if (event.type === 'user/message' && isReplacementSurfaceEvent(event) && isCompactCheckpointSource(event.data.source)) { - validateCheckpoint(trace, event, fail) + validateCheckpoint(trace, event.data.source, fail) return undefined } if (event.type !== 'compaction/start' && event.type !== 'compaction/summary' && event.type !== 'compaction/end') { diff --git a/packages/compaction/compaction/tests/compaction.spec.ts b/packages/compaction/compaction/tests/compaction.spec.ts index 350d4b8308..3178125b1b 100644 --- a/packages/compaction/compaction/tests/compaction.spec.ts +++ b/packages/compaction/compaction/tests/compaction.spec.ts @@ -1,4 +1,5 @@ import { createUserMessage } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' import { describe, expect, it } from 'vitest' import { Context } from '@deepseek-ai/cordis' import { @@ -13,6 +14,12 @@ import type { SessionSeq } from '@deepseek-ai/dsh-session' import type { CompactionAgentContext } from '@deepseek-ai/dsh-compaction' import type { ManualCompactAgentContext } from '@deepseek-ai/dsh-compaction' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'other': { kind: 'other' } & ContextFormed + } +} + /** * A trivial concrete CompactionEngine implementing the abstract contract. The * Service Definition package owns no algorithm — these tests exercise its contract: @@ -146,7 +153,7 @@ describe('CompactionEngine seam', () => { && isCompactCheckpointSource(event.data.source)) expect(checkpoint?.type === 'user/message' && checkpoint.data.source) .toEqual(compactCheckpointSource(result.compactionId)) - expect(isCompactCheckpointSource({ kind: 'plugin', plugin: 'other' })).toBe(false) + expect(isCompactCheckpointSource({ kind: 'other' })).toBe(false) expect(isCompactCheckpointSource({ kind: 'user' })).toBe(false) expect(session.snapshotEvents().filter(e => e.type.startsWith('compaction/')).map(e => e.type)) .toEqual(['compaction/start', 'compaction/summary', 'compaction/end']) diff --git a/packages/compaction/compaction/tests/tool-pairing.spec.ts b/packages/compaction/compaction/tests/tool-pairing.spec.ts index a5694d1514..f47c39a9ee 100644 --- a/packages/compaction/compaction/tests/tool-pairing.spec.ts +++ b/packages/compaction/compaction/tests/tool-pairing.spec.ts @@ -1,9 +1,16 @@ import { describe, expect, it } from 'vitest' import { createUserMessage, ToolCallId , createMessage, createToolResultMessage } from '@deepseek-ai/dsh-llm' -import { toolPairingBalancedAfter, toolPairingBalancedBefore } from '@deepseek-ai/dsh-compaction' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' +import { CompactionId, compactCheckpointSource, toolPairingBalancedAfter, toolPairingBalancedBefore } from '@deepseek-ai/dsh-compaction' import { Session, SessionId, SessionSeq } from '@deepseek-ai/dsh-session' import type { SessionEvent, SessionSeq as SessionSeqType } from '@deepseek-ai/dsh-session' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'test': { kind: 'test' } & ContextFormed + } +} + const SURFACE = { surfaceOp: 'append' as const } function seqOf(session: Session, type: SessionEvent['type'], nth = 0): SessionSeqType { @@ -138,7 +145,7 @@ describe('tool-pairing boundaries', () => { }, SURFACE) midStep.append('user/message', createUserMessage({ content: [{ type: 'text', text: 'background update' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, }), SURFACE) midStep.append('tool/result', { turn: 1, step: 1, @@ -170,7 +177,7 @@ describe('tool-pairing surface identity', () => { const nodes = session.surface.nodes session.append('user/message', createUserMessage({ content: [{ type: 'text', text: 'checkpoint' }], - source: { kind: 'plugin', plugin: 'compact' }, + source: compactCheckpointSource(CompactionId('tool-pairing-compaction')), }), { surfaceOp: { op: 'replace', startSeq: nodes[0]!, endSeq: nodes.at(-1)! }, sourceEventSeqs: [...nodes], diff --git a/packages/context/agent-instructions/src/state.ts b/packages/context/agent-instructions/src/state.ts index b7638f86eb..61d8fa4237 100644 --- a/packages/context/agent-instructions/src/state.ts +++ b/packages/context/agent-instructions/src/state.ts @@ -93,7 +93,7 @@ function agentInstructionsHook(text: string, changes: AgentInstructionChange[]): export function agentInstructionsMessage(text: string): Message { return createUserMessage({ content: [{ type: 'text', text }], - source: { kind: 'plugin', plugin: name }, + source: { kind: name, form: 'instructions', changes: [] }, }) } diff --git a/packages/context/agent-instructions/tests/agent-instructions.spec.ts b/packages/context/agent-instructions/tests/agent-instructions.spec.ts index af41ed006f..c3cf46e0f9 100644 --- a/packages/context/agent-instructions/tests/agent-instructions.spec.ts +++ b/packages/context/agent-instructions/tests/agent-instructions.spec.ts @@ -5,11 +5,12 @@ import { afterAll, describe, expect, it, vi } from 'vitest' import { Context } from '@deepseek-ai/cordis' import Loader from '@deepseek-ai/cordis-plugin-loader' import * as AgentInstructions from '@deepseek-ai/dsh-agent-instructions' -import LlmRuntime, { createUserMessage, ToolCallId, type Message, type StreamChunk } from '@deepseek-ai/dsh-llm' +import LlmRuntime, { createUserMessage, ToolCallId, type Message, type MessageSource, type StreamChunk } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' import SessionStore, { SessionId, SessionSeq, type SessionEvent, type SurfaceIntent, type UserMessage } from '@deepseek-ai/dsh-session' +import SessionProjectionRegistry from '@deepseek-ai/dsh-session-projection' import AgentRegistry, { agentEvents, type Agent } from '@deepseek-ai/dsh-agent' import AgentLoop, { turnBoundaryProjectionDefinition } from '@deepseek-ai/dsh-agent-loop' -import SessionProjectionRegistry from '@deepseek-ai/dsh-session-projection' import { FileSystem, FsTargetKey, FsVersion } from '@deepseek-ai/dsh-fs' import type { FsDirEntry, @@ -48,6 +49,21 @@ import { mountAgentLoopTestHarness, } from '@deepseek-ai/dsh-agent-loop-testkit' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'downstream': { kind: 'downstream' } & ContextFormed + 'other': { kind: 'other' } & ContextFormed + 'test-skills': { kind: 'test-skills' } & ContextFormed + } +} + +type CheckpointSource = Extract + +/** Build a typed checkpoint source for an instruction projection fixture. */ +function checkpointSource(compactionId: string): CheckpointSource { + return { kind: 'compact-checkpoint', compactionId: compactionId as CheckpointSource['compactionId'] } +} + /** Per-candidate reconciliation scope key: directory paired with the file name. */ const sk = (directory: string, candidateName: string): string => candidateScopeKey(directory, candidateName) @@ -1746,7 +1762,7 @@ describe('workspace context request injection', () => { agent.session.append('user/message', createUserMessage({ content: [{ type: 'text', text: 'compacted summary' }], - source: { kind: 'plugin', plugin: 'compact' }, + source: checkpointSource('instruction-compaction-1'), }), { surfaceOp: { op: 'replace', startSeq: baseline!.seq, endSeq: baseline!.seq }, sourceEventSeqs: [baseline!.seq], @@ -1779,7 +1795,7 @@ describe('workspace context request injection', () => { agent.session.append('user/message', createUserMessage({ content: [{ type: 'text', text: 'compacted summary' }], - source: { kind: 'plugin', plugin: 'compact' }, + source: checkpointSource('instruction-compaction-2'), }), { surfaceOp: { op: 'replace', startSeq: baseline!.seq, endSeq: baseline!.seq }, sourceEventSeqs: [baseline!.seq], @@ -1882,7 +1898,7 @@ describe('workspace context request injection', () => { ...decision, messages: [ ...decision.messages, - createUserMessage({ content: [{ type: 'text', text: 'Available skills' }], source: { kind: 'plugin', plugin: 'test-skills' } }), + createUserMessage({ content: [{ type: 'text', text: 'Available skills' }], source: { kind: 'test-skills' } }), ], } }) @@ -3710,7 +3726,7 @@ describe('dynamic nested workspace context injection', () => { agent.session.append('user/message', createUserMessage({ content: [{ type: 'text', text: 'compacted summary' }], - source: { kind: 'plugin', plugin: 'compact' }, + source: checkpointSource('instruction-compaction-3'), }), { surfaceOp: { op: 'replace', startSeq: SessionSeq(contextSeq), endSeq: SessionSeq(contextSeq) }, sourceEventSeqs: [SessionSeq(contextSeq)], @@ -3757,7 +3773,7 @@ describe('dynamic nested workspace context injection', () => { }) agent.session.append('user/message', createUserMessage({ content: [{ type: 'text', text: 'compacted summary' }], - source: { kind: 'plugin', plugin: 'compact' }, + source: checkpointSource('instruction-compaction-4'), }), { surfaceOp: { op: 'replace', startSeq: baseline!.seq, endSeq: baseline!.seq }, sourceEventSeqs: [baseline!.seq], @@ -3901,7 +3917,7 @@ describe('dynamic nested workspace context injection', () => { }), { surfaceOp: 'append' }) agent.session.append('user/message', createUserMessage({ content: [{ type: 'text', text: 'foreign plugin context' }], - source: { kind: 'plugin', plugin: 'other' }, + source: { kind: 'other' }, }), { surfaceOp: 'append' }) await ctx.tools.execute({ @@ -4015,7 +4031,7 @@ describe('dynamic nested workspace context injection', () => { }, additionalContexts: [createUserMessage({ content: [{ type: 'text' as const, text: 'downstream context' }], - source: { kind: 'plugin' as const, plugin: 'downstream' }, + source: { kind: 'downstream' as const }, })], })) @@ -4049,7 +4065,7 @@ describe('dynamic nested workspace context injection', () => { id: expect.any(String) as unknown, role: 'user', content: [{ type: 'text', text: 'downstream context' }], - source: { kind: 'plugin', plugin: 'downstream' }, + source: { kind: 'downstream' }, }) } finally { await rm(root, { recursive: true, force: true }) diff --git a/packages/context/session-reference/tests/session-reference.spec.ts b/packages/context/session-reference/tests/session-reference.spec.ts index 98da2c861b..319af3db78 100644 --- a/packages/context/session-reference/tests/session-reference.spec.ts +++ b/packages/context/session-reference/tests/session-reference.spec.ts @@ -3,6 +3,7 @@ import { Context } from '@deepseek-ai/cordis' import { agentEvents, installModelSelection, type Agent, type ModelSelectionRef } from '@deepseek-ai/dsh-agent' import { CompactionId, compactCheckpointSource } from '@deepseek-ai/dsh-compaction' import LlmRuntime, { createMessage, createSystemMessage, createToolResultMessage, createUserMessage, LlmError, ToolCallId } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' import SessionStore, { Session, SessionId, SessionSeq } from '@deepseek-ai/dsh-session' import SessionProjectionRegistry from '@deepseek-ai/dsh-session-projection' import SessionQueryEngine from '@deepseek-ai/dsh-session-query' @@ -19,6 +20,15 @@ import SessionReferenceResolver, { import { stringifyTagSafeJson } from '../src/serialization.ts' import { SpillLocator, SpillStore, type SaveTextSpill, type SpillRef } from '@deepseek-ai/dsh-spill' +import type { MessageSource } from '@deepseek-ai/dsh-llm' + +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'test': { kind: 'test' } & ContextFormed + 'workspace': { kind: 'workspace' } & ContextFormed + } +} + class TestSessionQueryEngine extends SessionQueryEngine { override searchSessions( ..._args: Parameters @@ -92,7 +102,7 @@ function checkpointSource(id: string) { function appendConversation(session: Session): void { session.append( 'system/message', - { turn: 1, step: 1, message: createSystemMessage('system prompt secret', 'system-prompt') }, + { turn: 1, step: 1, message: createSystemMessage('system prompt secret') }, { surfaceOp: 'append' }, ) const oldUser = session.append( @@ -140,7 +150,7 @@ function appendConversation(session: Session): void { session.append( 'user/message', createUserMessage({ - content: [{ type: 'text', text: 'workspace secret' }], source: { kind: 'plugin', plugin: 'workspace' }, + content: [{ type: 'text', text: 'workspace secret' }], source: { kind: 'workspace' }, }), { surfaceOp: 'append' }, ) @@ -156,7 +166,7 @@ function appendConversation(session: Session): void { 'user/message', createUserMessage({ content: [{ type: 'text', text: 'plugin steer' }], - source: { kind: 'plugin', plugin: 'goal' }, + source: { kind: 'goal' } as unknown as MessageSource, }), { surfaceOp: 'append' }, ) @@ -192,7 +202,7 @@ function appendConversation(session: Session): void { session.append( 'user/message', createUserMessage({ - content: [{ type: 'text', text: 'plugin-generated user' }], source: { kind: 'plugin', plugin: 'goal' }, + content: [{ type: 'text', text: 'plugin-generated user' }], source: { kind: 'goal' } as unknown as MessageSource, }), { surfaceOp: 'append' }, ) @@ -863,7 +873,7 @@ describe('session reference discovery and preparation', () => { }) const plugin = createUserMessage({ content: [{ type: 'text', text: formatSessionReferenceMention({ sessionId: source.id, label: 'Ignored' }) }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, }) const signal = new AbortController().signal diff --git a/packages/context/time-context/src/index.ts b/packages/context/time-context/src/index.ts index f626342546..8a215b87f7 100644 --- a/packages/context/time-context/src/index.ts +++ b/packages/context/time-context/src/index.ts @@ -10,6 +10,13 @@ import z from '@deepseek-ai/schemastery' import { z as zod } from 'zod' import type { Agent, PreStepDecision } from '@deepseek-ai/dsh-agent' import { createUserMessage } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'time-context': { kind: 'time-context' } & ContextFormed + } +} + import type { UserMessage } from '@deepseek-ai/dsh-llm' import { SessionSeq } from '@deepseek-ai/dsh-session' import type {} from '@deepseek-ai/dsh-session-projection' @@ -160,7 +167,7 @@ export function apply(ctx: Context, config: Config): void { return state.lastTurnInjectionTime === null ? state : { ...state, lastTurnInjectionTime: null } } if (event.type === 'user/message') { - const injected = event.data.source.kind === 'plugin' && event.data.source.plugin === name + const injected = event.data.source.kind === name const withMessage = state.lastMessageTime === event.time ? state : { ...state, lastMessageTime: event.time } @@ -214,7 +221,7 @@ export function apply(ctx: Context, config: Config): void { ...decision.messages, createUserMessage({ content: [{ type: 'text', text }], - source: { kind: 'plugin', plugin: name, form: 'snapshot', sections: [{ name, text }] }, + source: { kind: name, form: 'snapshot', sections: [{ name, text }] }, }), ], } diff --git a/packages/context/time-context/src/invariant.ts b/packages/context/time-context/src/invariant.ts index 2fa686a4f4..e9f362c7e4 100644 --- a/packages/context/time-context/src/invariant.ts +++ b/packages/context/time-context/src/invariant.ts @@ -105,7 +105,7 @@ function validateReading( } const source = event.data.source /* v8 ignore next 2 -- replay and dispatch callers select this exact package-owned source before validation. */ - if (source.kind !== 'plugin' || source.plugin !== SOURCE_NAME) { + if (source.kind !== SOURCE_NAME) { fail('time-context source must retain package ownership') } const sections: unknown = 'sections' in source ? source.sections : undefined @@ -113,7 +113,7 @@ function validateReading( const section = typeof sectionValue === 'object' && sectionValue !== null ? sectionValue as Record : undefined - if (Object.keys(source).length !== 4 + if (Object.keys(source).length !== 3 || source.form !== 'snapshot' || !Array.isArray(sections) || sections.length !== 1 @@ -165,8 +165,7 @@ function validateSession(session: Session, fail: InvariantFailure): void { const events = session.snapshotEvents() for (const [index, event] of events.entries()) { if (event.type !== 'user/message' - || event.data.source.kind !== 'plugin' - || event.data.source.plugin !== SOURCE_NAME) continue + || event.data.source.kind !== SOURCE_NAME) continue validateReading(events.slice(0, index), event, fail) } } @@ -179,8 +178,7 @@ const install: InvariantInstaller = Object.assign((ctx: Context, fail: Invariant if (eventName !== 'session/event') return const [session, event] = args as [Session, SessionEvent] if (event.type !== 'user/message' - || event.data.source.kind !== 'plugin' - || event.data.source.plugin !== SOURCE_NAME) return + || event.data.source.kind !== SOURCE_NAME) return // oxlint-disable-next-line typescript/no-deprecated -- Existing Session history read; migration deferred. validateReading(session.snapshotEvents(), event, fail) }, { global: true }) diff --git a/packages/context/time-context/tests/invariant.spec.ts b/packages/context/time-context/tests/invariant.spec.ts index 74ab8b5241..cba6fc48d0 100644 --- a/packages/context/time-context/tests/invariant.spec.ts +++ b/packages/context/time-context/tests/invariant.spec.ts @@ -31,12 +31,11 @@ function event( content: (content ?? [{ type: 'text', text }]) as ContentBlock[], source: plugin === 'time-context' ? { - kind: 'plugin', - plugin, + kind: 'time-context', form: 'snapshot', sections: [{ name: plugin, text }], } - : { kind: 'plugin', plugin }, + : { kind: 'other' }, }), } } @@ -78,8 +77,7 @@ function appendReading(session: Session, text: string): void { session.append('user/message', createUserMessage({ content: [{ type: 'text', text }], source: { - kind: 'plugin', - plugin: 'time-context', + kind: 'time-context', form: 'snapshot', sections: [{ name: 'time-context', text }], }, @@ -287,23 +285,20 @@ describe('time-context invariants', () => { const ctx = await setup() const base = event(reading()) for (const source of [ - { kind: 'plugin', plugin: 'time-context' }, + { kind: 'time-context' }, { ...base.data.source, authority: {} }, { - kind: 'plugin', - plugin: 'time-context', + kind: 'time-context', form: 'snapshot', sections: [{ name: 'time-context', text: 'different' }], }, { - kind: 'plugin', - plugin: 'time-context', + kind: 'time-context', form: 'snapshot', sections: { 0: { name: 'time-context', text: reading() }, length: 1 }, }, { - kind: 'plugin', - plugin: 'time-context', + kind: 'time-context', form: 'snapshot', sections: [{ name: 'time-context', text: reading(), extra: true }], }, diff --git a/packages/context/time-context/tests/request-zone.spec.ts b/packages/context/time-context/tests/request-zone.spec.ts index 5fed54d7cb..a4752eea73 100644 --- a/packages/context/time-context/tests/request-zone.spec.ts +++ b/packages/context/time-context/tests/request-zone.spec.ts @@ -1,11 +1,18 @@ import { describe, expect, it } from 'vitest' import { createUserMessage } from '@deepseek-ai/dsh-llm' import type { UserMessage } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' import { deriveBrowserTimeZoneContext, renderBrowserTimeZoneContext, } from '../src/request-zone.ts' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'test': { kind: 'test' } & ContextFormed + } +} + function browserMessage(timeZone: string): UserMessage { return createUserMessage({ content: [{ type: 'text', text: timeZone }], @@ -17,7 +24,7 @@ describe('browser request-zone context', () => { it('derives missing, unique, and sorted mixed zones from user-rpc messages only', () => { const plugin = createUserMessage({ content: [{ type: 'text', text: 'plugin' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, }) expect(deriveBrowserTimeZoneContext([plugin])).toEqual({ kind: 'missing' }) expect(deriveBrowserTimeZoneContext([ diff --git a/packages/context/time-context/tests/time-context.e2e.ts b/packages/context/time-context/tests/time-context.e2e.ts index fbc999af05..1844872db9 100644 --- a/packages/context/time-context/tests/time-context.e2e.ts +++ b/packages/context/time-context/tests/time-context.e2e.ts @@ -50,8 +50,7 @@ describe('time-context through the production headless profile', () => { const contexts = events.filter( (event): event is SessionEvent<'user/message'> => event.type === 'user/message' - && event.data.source.kind === 'plugin' - && event.data.source.plugin === 'time-context') + && event.data.source.kind === 'time-context') const starts = events.filter(event => event.type === 'step/start') expect(contexts).toHaveLength(2) expect(starts).toHaveLength(2) @@ -61,8 +60,7 @@ describe('time-context through the production headless profile', () => { // `snapshot` form: one named contribution whose text is exactly what the // model read, so a consumer attributes it without re-splitting prose. expect(contexts[index]!.data.source).toMatchObject({ - kind: 'plugin', - plugin: 'time-context', + kind: 'time-context', form: 'snapshot', sections: [{ name: 'time-context' }], }) diff --git a/packages/context/time-context/tests/time-context.spec.ts b/packages/context/time-context/tests/time-context.spec.ts index 52700e6d62..454baf309b 100644 --- a/packages/context/time-context/tests/time-context.spec.ts +++ b/packages/context/time-context/tests/time-context.spec.ts @@ -3,6 +3,7 @@ import { Context } from '@deepseek-ai/cordis' import Loader from '@deepseek-ai/cordis-plugin-loader' import { createUserMessage, ToolCallId, LlmAdapter } from '@deepseek-ai/dsh-llm' import type { GenerateOptions, StreamChunk } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' import { Session, SessionId, type SessionEvent } from '@deepseek-ai/dsh-session' import AgentRegistry, { agentEvents, type Agent } from '@deepseek-ai/dsh-agent' import { defineContentToolFixture } from '@deepseek-ai/dsh-tools' @@ -12,6 +13,13 @@ import { unsupportedInbox, mountAgentLoopTestDependencies } from '@deepseek-ai/d import * as timeContext from '@deepseek-ai/dsh-time-context' import type { Config } from '@deepseek-ai/dsh-time-context' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'compaction-basic': { kind: 'compaction-basic' } & ContextFormed + 'time-context-test': { kind: 'time-context-test' } & ContextFormed + } +} + const BASE = Date.parse('2026-07-14T00:00:00.000Z') const ORIGINAL_TIME_ZONE = process.env['TZ'] const SIGNAL = new AbortController().signal @@ -70,8 +78,7 @@ function contextTexts(session: Session): string[] { const texts: string[] = [] for (const event of session.snapshotEvents()) { if (event.type === 'user/message' - && event.data.source.kind === 'plugin' - && event.data.source.plugin === 'time-context') { + && event.data.source.kind === 'time-context') { texts.push(event.data.content.find(block => block.type === 'text')?.text ?? '') } } @@ -87,7 +94,7 @@ async function fire( ): Promise { const proposed = createUserMessage({ content: [{ type: 'text', text: 'request proposal' }], - source: { kind: 'plugin', plugin: 'time-context-test' }, + source: { kind: 'time-context-test' }, }) const decision = await agentEvents(ctx, agent).waterfall( 'agent/pre-step', @@ -175,8 +182,7 @@ describe('durable step context', () => { // text is exactly what the model read, so a consumer attributes it without // re-splitting prose. expect(event.data.source).toEqual({ - kind: 'plugin', - plugin: 'time-context', + kind: 'time-context', form: 'snapshot', sections: [{ name: 'time-context', @@ -292,11 +298,11 @@ describe('durable step context', () => { openMessageTurn(original, 1) await fire(ctx, sessionAgent(original), 1, 1) const user = original.snapshotEvents().find(event => event.type === 'user/message' && event.data.source.kind === 'user') - const reading = original.snapshotEvents().find(event => event.type === 'user/message' && event.data.source.kind === 'plugin') + const reading = original.snapshotEvents().find(event => event.type === 'user/message' && event.data.source.kind === 'time-context') if (user === undefined || reading === undefined) throw new Error('missing source surface events') original.append('user/message', createUserMessage({ content: [{ type: 'text', text: 'compacted history' }], - source: { kind: 'plugin', plugin: 'compaction-basic' }, + source: { kind: 'compaction-basic' }, }), { surfaceOp: { op: 'replace', startSeq: user.seq, endSeq: reading.seq }, sourceEventSeqs: [user.seq, reading.seq], @@ -421,7 +427,7 @@ describe('time-context projection fold edges', () => { session.append('turn/start', { turn: 1 }) session.append('user/message', createUserMessage({ content: [{ type: 'text', text: 'reading' }], - source: { kind: 'plugin', plugin: 'time-context' }, + source: { kind: 'time-context' }, }), { surfaceOp: 'append' }) expect(typeof ctx.sessionProjections.stateOf(session, 'timeContext')?.lastTurnInjectionTime).toBe('number') session.append('turn/end', { turn: 1, reason: { kind: 'completed' } }) @@ -483,15 +489,14 @@ describe('real agent-loop request history', () => { expect(adapter.requests).toHaveLength(2) const contexts = agent.session.snapshotEvents().filter( - (event): event is SessionEvent<'user/message'> => event.type === 'user/message' && event.data.source.kind === 'plugin') + (event): event is SessionEvent<'user/message'> => event.type === 'user/message' && event.data.source.kind !== 'user') const starts = agent.session.snapshotEvents().filter(event => event.type === 'step/start') expect(contexts).toHaveLength(adapter.requests.length) expect(starts).toHaveLength(adapter.requests.length) for (let index = 0; index < contexts.length; index += 1) { expect(contexts[index]!.seq).toBeGreaterThan(starts[index]!.seq) } - expect(contexts.every(event => event.data.source.kind === 'plugin' - && event.data.source.plugin === 'time-context' + expect(contexts.every(event => event.data.source.kind === 'time-context' && event.surfaceOp === 'append')).toBe(true) const firstRequestText = requestText(adapter.requests[0]!) diff --git a/packages/context/tmux-context/src/index.ts b/packages/context/tmux-context/src/index.ts index bfcec10247..42cee71277 100644 --- a/packages/context/tmux-context/src/index.ts +++ b/packages/context/tmux-context/src/index.ts @@ -25,6 +25,17 @@ import type { PreStepDecision } from '@deepseek-ai/dsh-agent' import type {} from '@deepseek-ai/dsh-session-projection' import type { ShellExecutor, ShellRunResult } from '@deepseek-ai/dsh-shell' import { createUserMessage } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + /** Location attribution; readers preserve the content without this producer. + * Its projection uses the kind to avoid repeated injection. + * @persistenceAttribution + */ + 'tmux-context': { kind: 'tmux-context' } & ContextFormed + } +} + /** Cordis plugin name used by loader diagnostics. */ export const name = 'tmux-context' @@ -223,8 +234,7 @@ export function apply(ctx: Context, config: Config): void { init: () => null, apply: (state, event) => { if (event.type !== 'user/message' - || event.data.source.kind !== 'plugin' - || event.data.source.plugin !== name) return state + || event.data.source.kind !== name) return state const [block] = event.data.content if (block?.type !== 'text') return state const newline = block.text.indexOf('\n') @@ -256,7 +266,7 @@ export function apply(ctx: Context, config: Config): void { messages: [ createUserMessage({ content: [{ type: 'text', text }], - source: { kind: 'plugin', plugin: name, form: 'snapshot', sections: [{ name, text }] }, + source: { kind: name, form: 'snapshot', sections: [{ name, text }] }, }), ...decision.messages, ], diff --git a/packages/context/tmux-context/tests/tmux-context.spec.ts b/packages/context/tmux-context/tests/tmux-context.spec.ts index 535cf596ed..28d7b1027d 100644 --- a/packages/context/tmux-context/tests/tmux-context.spec.ts +++ b/packages/context/tmux-context/tests/tmux-context.spec.ts @@ -125,8 +125,7 @@ function contextTexts(session: Session): string[] { const texts: string[] = [] for (const event of session.snapshotEvents()) { if (event.type === 'user/message' - && event.data.source.kind === 'plugin' - && event.data.source.plugin === 'tmux-context') { + && event.data.source.kind === 'tmux-context') { texts.push(event.data.content.find(block => block.type === 'text')?.text ?? '') } } @@ -176,8 +175,7 @@ describe('tmux-context injection', () => { // `snapshot` form: one named contribution carrying exactly the reading the // model saw, so a consumer attributes it without re-splitting prose. expect(event.data.source).toMatchObject({ - kind: 'plugin', - plugin: 'tmux-context', + kind: 'tmux-context', form: 'snapshot', sections: [{ name: 'tmux-context' }], }) @@ -275,7 +273,7 @@ describe('tmux-context prior-reading resilience', () => { openMessageTurn(session, 1) session.append('user/message', createUserMessage({ content: [{ type: 'reasoning', text: 'not a location' }], - source: { kind: 'plugin', plugin: 'tmux-context' }, + source: { kind: 'tmux-context' }, }), { surfaceOp: 'append' }) await fire(ctx, agent, 1, 1) @@ -291,7 +289,7 @@ describe('tmux-context prior-reading resilience', () => { openMessageTurn(session, 1) session.append('user/message', createUserMessage({ content: [{ type: 'text', text: 'single line, no newline' }], - source: { kind: 'plugin', plugin: 'tmux-context' }, + source: { kind: 'tmux-context' }, }), { surfaceOp: 'append' }) await fire(ctx, agent, 1, 1) diff --git a/packages/core/agent-loop/src/index.ts b/packages/core/agent-loop/src/index.ts index d39a26a6e9..2f15f60bf0 100644 --- a/packages/core/agent-loop/src/index.ts +++ b/packages/core/agent-loop/src/index.ts @@ -34,6 +34,7 @@ import type { SessionHandle, SessionPersistence } from '@deepseek-ai/dsh-session import { ReactLoopAgent } from './agent.ts' import { inboxProjectionDefinition } from './inbox.ts' import { DEFAULT_MAX_PARALLEL_TOOL_CALLS } from './constants.ts' +import type {} from './runtime-context.ts' /** Fiber states that cannot own or serve a new lifecycle. */ const INACTIVE_STATES: ReadonlySet = new Set([ diff --git a/packages/core/agent-loop/src/runtime-context.ts b/packages/core/agent-loop/src/runtime-context.ts index af9f3fa640..828d377edd 100644 --- a/packages/core/agent-loop/src/runtime-context.ts +++ b/packages/core/agent-loop/src/runtime-context.ts @@ -6,16 +6,21 @@ */ import { createSystemMessage, createUserMessage } from '@deepseek-ai/dsh-llm' -import type { ContextSnapshotSection, Message } from '@deepseek-ai/dsh-llm' +import type { ContextFormed, ContextSnapshotSection, Message } from '@deepseek-ai/dsh-llm' import type { Session, SessionEvent, SessionSeq, SurfaceIntent, SystemMessage, UserMessage } from '@deepseek-ai/dsh-session' import { isReplacementSurfaceEvent } from '@deepseek-ai/dsh-session' import type { Context } from '@deepseek-ai/cordis' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'runtime-context': { kind: 'runtime-context' } & ContextFormed + } +} -const SOURCE = '@deepseek-ai/dsh-system-prompt' +const SOURCE = 'runtime-context' const CLEARED = 'Current runtime context: none. Earlier runtime-context snapshots no longer apply.' function isOwned(message: UserMessage): boolean { - return message.source.kind === 'plugin' && message.source.plugin === SOURCE + return message.source.kind === SOURCE } function textOf(message: Message): string | undefined { @@ -84,7 +89,7 @@ export class SystemPromptProjection { const nodes = this.systemNodes() const head = nodes[0] if (head === undefined) { - return [{ message: createSystemMessage(rendered, SOURCE), intent: { surfaceOp: 'append' } }] + return [{ message: createSystemMessage(rendered), intent: { surfaceOp: 'append' } }] } const latest = nodes.findLast(node => node.text !== '') ?? head if (!input.inHistory || input.startsSeries || rendered.length === 0) { @@ -94,12 +99,12 @@ export class SystemPromptProjection { return updates } if (latest.text === rendered) return [] - return [{ message: createSystemMessage(rendered, SOURCE), intent: { surfaceOp: 'append' } }] + return [{ message: createSystemMessage(rendered), intent: { surfaceOp: 'append' } }] } private replace(seq: SessionSeq, text: string): SystemPromptCommit { return { - message: createSystemMessage(text, SOURCE), + message: createSystemMessage(text), intent: { surfaceOp: { op: 'replace', startSeq: seq, endSeq: seq }, sourceEventSeqs: [seq] }, } } @@ -152,8 +157,8 @@ export class RuntimeContextProjection { content: [{ type: 'text', text: snapshot }], // The cleared marker has no contributions left to attribute. source: sections.length === 0 - ? { kind: 'plugin', plugin: SOURCE } - : { kind: 'plugin', plugin: SOURCE, form: 'snapshot', sections }, + ? { kind: SOURCE } + : { kind: SOURCE, form: 'snapshot', sections }, }) } } diff --git a/packages/core/agent-loop/tests/agent.spec.ts b/packages/core/agent-loop/tests/agent.spec.ts index 2ec5bcf01c..180edf291d 100644 --- a/packages/core/agent-loop/tests/agent.spec.ts +++ b/packages/core/agent-loop/tests/agent.spec.ts @@ -5,11 +5,20 @@ import AgentRegistry, { type Agent } from '@deepseek-ai/dsh-agent' import AgentLoop from '@deepseek-ai/dsh-agent-loop' import SessionProjectionRegistry from '@deepseek-ai/dsh-session-projection' import LlmRuntime from '@deepseek-ai/dsh-llm' +import type { MessageSource } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' import SessionStore, { SessionId } from '@deepseek-ai/dsh-session' import SystemPrompt from '@deepseek-ai/dsh-system-prompt' import ToolRuntime from '@deepseek-ai/dsh-tools' import { MockAdapter, textResponse } from './mock-adapter.ts' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'p': { kind: 'p' } & ContextFormed + 'test': { kind: 'test' } & ContextFormed + } +} + async function harness(adapter: MockAdapter): Promise { const ctx = new Context() await ctx.plugin(LlmRuntime) @@ -33,7 +42,7 @@ describe('Agent', () => { const ctx = await harness(adapter) const agent = await ctx.agentLoop.create(SessionId('a1'), { provider: 'mock', model: 'mock' }) - agent.inject(createUserMessage({ content: [{ type: 'text', text: 'context' }], source: { kind: 'plugin', plugin: 'p' } })) + agent.inject(createUserMessage({ content: [{ type: 'text', text: 'context' }], source: { kind: 'p' } })) expect(agent.session.snapshotEvents().map(event => event.type)).toEqual(['agent/inbox/spliced']) expect(agent.status).toBe('idle') @@ -41,15 +50,16 @@ describe('Agent', () => { await agent.whenIdle() }) - it('inject() preserves an explicitly empty plugin source', async () => { + it('inject() preserves an unknown producer source', async () => { const ctx = await harness(new MockAdapter([textResponse('ok')])) const agent = await ctx.agentLoop.create(SessionId('a1'), { provider: 'mock', model: 'mock' }) - agent.inject(createUserMessage({ content: [{ type: 'text', text: 'empty plugin source' }], source: { kind: 'plugin', plugin: '' } })) + const source = { kind: 'unknown-producer' } as unknown as MessageSource + agent.inject(createUserMessage({ content: [{ type: 'text', text: 'empty plugin source' }], source })) const injected = agent.session.snapshotEvents().at(-1) expect(injected?.type === 'agent/inbox/spliced' && injected.data.inserted[0]?.source) - .toEqual({ kind: 'plugin', plugin: '' }) + .toEqual({ kind: 'unknown-producer' }) }) it('emits exact inserted, claimed, and discarded inbox messages', async () => { @@ -76,7 +86,7 @@ describe('Agent', () => { }) const context = createUserMessage({ content: [{ type: 'text', text: 'discard me' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, }) agent.inject(context) agent.inbox.remove(context.id) @@ -95,7 +105,7 @@ describe('Agent', () => { const agent = await ctx.agentLoop.create(SessionId('a1'), { provider: 'mock', model: 'mock' }) expect(() => { - agent.inject(createUserMessage({ content: [{ type: 'text', text: 'x', bad: 1n } as never], source: { kind: 'plugin', plugin: 'p' } })) + agent.inject(createUserMessage({ content: [{ type: 'text', text: 'x', bad: 1n } as never], source: { kind: 'p' } })) }).toThrow(/non-JSON-serializable/) expect(agent.session.snapshotEvents()).toHaveLength(0) }) @@ -105,7 +115,7 @@ describe('Agent', () => { const ctx = await harness(adapter) const agent = await ctx.agentLoop.create(SessionId('a1'), { provider: 'mock', model: 'mock' }) - agent.steer(createUserMessage({ content: [{ type: 'text', text: 'steer idle' }], source: { kind: 'plugin', plugin: 'test' } })) + agent.steer(createUserMessage({ content: [{ type: 'text', text: 'steer idle' }], source: { kind: 'test' } })) await agent.whenIdle() expect(agent.session.snapshotEvents().some(event => event.type === 'user/message')).toBe(true) diff --git a/packages/core/agent-loop/tests/config-session-id.spec.ts b/packages/core/agent-loop/tests/config-session-id.spec.ts index 7e4d1a5d3a..4ca1264f5d 100644 --- a/packages/core/agent-loop/tests/config-session-id.spec.ts +++ b/packages/core/agent-loop/tests/config-session-id.spec.ts @@ -5,6 +5,7 @@ import { mkdtemp, rm } from 'node:fs/promises' import { tmpdir } from 'node:os' import { join } from 'node:path' import LlmRuntime from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' import SessionStore, { SessionId } from '@deepseek-ai/dsh-session' import type { SessionEvent } from '@deepseek-ai/dsh-session' import SystemPrompt from '@deepseek-ai/dsh-system-prompt' @@ -17,6 +18,12 @@ import AgentLoop, { CONFIGURED_AGENT_IDENTITIES_KEY } from '@deepseek-ai/dsh-age import SessionProjectionRegistry from '@deepseek-ai/dsh-session-projection' import { MockAdapter, textResponse } from './mock-adapter.ts' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'test': { kind: 'test' } & ContextFormed + } +} + const dirs: string[] = [] afterEach(async () => { for (const d of dirs.splice(0)) await rm(d, { recursive: true, force: true }) }) @@ -214,7 +221,7 @@ describe('config-driven session id', () => { cleanupStarted.resolve(undefined) await cleanupGate.promise }) - first.inject(createUserMessage({ content: [{ type: 'text', text: 'persist before cancellation' }], source: { kind: 'plugin', plugin: 'test' } })) + first.inject(createUserMessage({ content: [{ type: 'text', text: 'persist before cancellation' }], source: { kind: 'test' } })) await ctx.sessions.flush(first.session) expect(JSON.stringify(await readStoredEvents(ctx, sessionId))) .toContain('persist before cancellation') diff --git a/packages/core/agent-loop/tests/contract-regressions.spec.ts b/packages/core/agent-loop/tests/contract-regressions.spec.ts index 5611a93a0c..c5c606ae54 100644 --- a/packages/core/agent-loop/tests/contract-regressions.spec.ts +++ b/packages/core/agent-loop/tests/contract-regressions.spec.ts @@ -1,6 +1,7 @@ import { describe, expect, it } from 'vitest' import { Context } from '@deepseek-ai/cordis' -import LlmRuntime, { type Message, createUserMessage, ToolCallId, LlmError, MessageSource, ProviderRequestId, StreamChunk } from '@deepseek-ai/dsh-llm' +import LlmRuntime, { type RequestMessage, createUserMessage, ToolCallId, LlmError, MessageSource, ProviderRequestId, StreamChunk } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' import SessionStore, { Session, SessionEvent, SessionId, TurnEndReason, type UserMessage } from '@deepseek-ai/dsh-session' import SystemPrompt from '@deepseek-ai/dsh-system-prompt' import ToolRuntime, { defineContentToolFixture, type PostToolDecision } from '@deepseek-ai/dsh-tools' @@ -13,6 +14,12 @@ import * as AgentInvariant from '@deepseek-ai/dsh-agent/invariant' import * as AgentLoopInvariant from '@deepseek-ai/dsh-agent-loop/invariant' import { MockAdapter, textResponse, toolCallResponse } from './mock-adapter.ts' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'test': { kind: 'test' } & ContextFormed + } +} + async function mountInvariants(ctx: Context): Promise { await ctx.plugin(InvariantRegistry) await ctx.plugin(SessionInvariant) @@ -95,7 +102,7 @@ describe('abort during tool execution ends the turn', () => { description: '', parameters: {}, async execute() { - agent.inject(createUserMessage({ content: [{ type: 'text', text: 'accepted before abort' }], source: { kind: 'plugin', plugin: 'test' } })) + agent.inject(createUserMessage({ content: [{ type: 'text', text: 'accepted before abort' }], source: { kind: 'test' } })) agent.cancel({ kind: 'user' }) return [{ type: 'text', text: 'done' }] }, @@ -104,7 +111,7 @@ describe('abort during tool execution ends the turn', () => { kind: 'accept', additionalContexts: [createUserMessage({ content: [{ type: 'text', text: 'accepted result context after abort' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, })], })) @@ -113,7 +120,7 @@ describe('abort during tool execution ends the turn', () => { expect(agent.session.snapshotEvents() .filter(event => event.type === 'tool/result' - || (event.type === 'user/message' && event.data.source.kind === 'plugin') + || (event.type === 'user/message' && event.data.source.kind !== 'user') || event.type === 'step/end' || event.type === 'turn/end') .map(event => event.type)) .toEqual(['tool/result', 'step/end', 'turn/end']) @@ -125,7 +132,7 @@ describe('abort during tool execution ends the turn', () => { await idle expect(agent.session.snapshotEvents() - .flatMap(event => event.type === 'user/message' && event.data.source.kind === 'plugin' + .flatMap(event => event.type === 'user/message' && event.data.source.kind !== 'user' ? [event.data.content] : [])) .toEqual([ @@ -166,7 +173,7 @@ describe('abort during tool execution ends the turn', () => { kind: 'accept', additionalContexts: [createUserMessage({ content: [{ type: 'text', text: 'accepted after first result' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, })], } }) @@ -177,12 +184,12 @@ describe('abort during tool execution ends the turn', () => { const events = agent.session.snapshotEvents() expect(events .filter(event => event.type === 'tool/result' - || (event.type === 'user/message' && event.data.source.kind === 'plugin') + || (event.type === 'user/message' && event.data.source.kind !== 'user') || event.type === 'step/end' || event.type === 'turn/end') .map(event => event.type)) .toEqual(['tool/result', 'tool/result', 'step/end', 'turn/end']) expect(events.flatMap(event => - event.type === 'user/message' && event.data.source.kind === 'plugin' + event.type === 'user/message' && event.data.source.kind !== 'user' ? [event.data.content] : [])[0]) .toBeUndefined() @@ -220,7 +227,7 @@ describe('abort during tool execution ends the turn', () => { description: '', parameters: {}, async execute(_args, exec) { - agent.inject(createUserMessage({ content: [{ type: 'text', text: 'accepted before disposal' }], source: { kind: 'plugin', plugin: 'test' } })) + agent.inject(createUserMessage({ content: [{ type: 'text', text: 'accepted before disposal' }], source: { kind: 'test' } })) started.resolve(undefined) const signal = exec.signal if (!signal) throw new Error('tool execution signal is missing') @@ -235,7 +242,7 @@ describe('abort during tool execution ends the turn', () => { kind: 'accept', additionalContexts: [createUserMessage({ content: [{ type: 'text', text: 'accepted result context during disposal' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, })], })) @@ -244,7 +251,7 @@ describe('abort during tool execution ends the turn', () => { await fiber.dispose() expect(agent.session.snapshotEvents() - .flatMap(event => event.type === 'user/message' && event.data.source.kind === 'plugin' + .flatMap(event => event.type === 'user/message' && event.data.source.kind !== 'user' ? [event.data.content] : [])) .toEqual([]) @@ -301,7 +308,7 @@ describe('abort during tool execution ends the turn', () => { kind: 'enter' as const, messages: [...decision.messages, createUserMessage({ content: [{ type: 'text', text: 'new turn context' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, })], } } @@ -311,7 +318,7 @@ describe('abort during tool execution ends the turn', () => { await waitForIdle(ctx, agent) expect(agent.session.snapshotEvents().flatMap(event => - event.type === 'user/message' && event.data.source.kind === 'plugin' + event.type === 'user/message' && event.data.source.kind !== 'user' ? [event.data.content] : [])[0]) .toEqual([{ type: 'text', text: 'new turn context' }]) @@ -481,7 +488,7 @@ describe('adapter registration, routing, and accepted-input ownership', () => { description: '', parameters: {}, async execute() { - agent.steer(createUserMessage({ content: [{ type: 'text', text: 's' }], source: { kind: 'plugin', plugin: 'goal' } })) + agent.steer(createUserMessage({ content: [{ type: 'text', text: 's' }], source: { kind: 'goal' } as unknown as MessageSource })) return [] }, })) @@ -503,7 +510,7 @@ describe('adapter registration, routing, and accepted-input ownership', () => { expect(insertedSources).toEqual([ { kind: 'user' }, - { kind: 'plugin', plugin: 'goal' }, + { kind: 'goal' }, ]) expect(insertedShapes).toEqual([ ['content', 'id', 'role', 'source'], @@ -511,8 +518,8 @@ describe('adapter registration, routing, and accepted-input ownership', () => { ]) expect(targets).toEqual(['next-turn', 'next-step']) const steeringSources = agent.session.snapshotEvents().flatMap(e => - e.type === 'user/message' && e.data.source.kind === 'plugin' ? [e.data.source] : []) - expect(steeringSources).toEqual([{ kind: 'plugin', plugin: 'goal' }]) + e.type === 'user/message' && e.data.source.kind !== 'user' ? [e.data.source] : []) + expect(steeringSources).toEqual([{ kind: 'goal' }]) }) it('records each admitted next-step batch before the following claim', async () => { @@ -655,11 +662,12 @@ describe('turn numbering continues across seeded sessions', () => { }) /** Assert the call/result ordering delivered to the model, including missing results. */ -function expectPairedTools(messages: readonly Message[]): void { +function expectPairedTools(messages: readonly RequestMessage[]): void { const pending = new Set() for (const message of messages) { - if (pending.size > 0) expect(message.source.kind).toBe('tool') + if (pending.size > 0) expect(message.role).toBe('tool') if (message.role === 'tool') { + expect(message.source.kind).toBe('tool') expect(pending.delete(message.toolCallId)).toBe(true) continue } @@ -734,11 +742,11 @@ describe('forked tool history reaches the next model request', () => { const request = adapter.requests[2] if (request === undefined) throw new Error('child never reached the adapter') expectPairedTools(request.messages) - expect(request.messages.filter(message => message.source.kind === 'tool')).toEqual(expectedResults) + expect(request.messages.filter(message => message.role === 'tool')).toEqual(expectedResults) expect(expectedResults.map(message => message.source.callId)).toEqual([ToolCallId('call-first'), ToolCallId('call-second')]) expect(() => { expectPairedTools(request.messages.filter(message => ( - message.source.kind !== 'tool' || message.source.callId !== ToolCallId('call-second') + message.role !== 'tool' || message.source.callId !== ToolCallId('call-second') ))) }).toThrow() expect(executions).toEqual(['first', 'second']) diff --git a/packages/core/agent-loop/tests/coverage-edges.spec.ts b/packages/core/agent-loop/tests/coverage-edges.spec.ts index 319f396c07..38387dc3ad 100644 --- a/packages/core/agent-loop/tests/coverage-edges.spec.ts +++ b/packages/core/agent-loop/tests/coverage-edges.spec.ts @@ -1,6 +1,7 @@ import { describe, expect, it } from 'vitest' import { Context } from '@deepseek-ai/cordis' import LlmRuntime, { createUserMessage, ToolCallId, LlmError, StreamChunk, errorChain } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' import SessionStore, { SessionId, TurnEndReason } from '@deepseek-ai/dsh-session' import type { SessionEvent } from '@deepseek-ai/dsh-session' import SystemPrompt from '@deepseek-ai/dsh-system-prompt' @@ -11,6 +12,12 @@ import AgentLoop from '@deepseek-ai/dsh-agent-loop' import SessionProjectionRegistry from '@deepseek-ai/dsh-session-projection' import { MockAdapter, textResponse, toolCallResponse } from './mock-adapter.ts' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'test': { kind: 'test' } & ContextFormed + } +} + function driverDone(agent: Agent): Promise { return (agent as Agent & { done: Promise }).done } @@ -493,7 +500,7 @@ describe('driver bookkeeping edges', () => { ctx.on('agent/turn-stopping', ({ agent: subject }) => { subject.inject(createUserMessage({ content: [{ type: 'text', text: 'do not enter the next step' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, })) }) diff --git a/packages/core/agent-loop/tests/fixtures/serial-created.mjs b/packages/core/agent-loop/tests/fixtures/serial-created.mjs index 3ddc41b52b..ee18fd04a1 100644 --- a/packages/core/agent-loop/tests/fixtures/serial-created.mjs +++ b/packages/core/agent-loop/tests/fixtures/serial-created.mjs @@ -14,7 +14,7 @@ export function apply(ctx) { id: randomUUID(), role: 'user', content: [{ type: 'text', text: 'Serial agent creation completed.' }], - source: { kind: 'plugin', plugin: name }, + source: { kind: name }, }) ready.add(agent) }) diff --git a/packages/core/agent-loop/tests/interception.spec.ts b/packages/core/agent-loop/tests/interception.spec.ts index b052fd2783..352583df36 100644 --- a/packages/core/agent-loop/tests/interception.spec.ts +++ b/packages/core/agent-loop/tests/interception.spec.ts @@ -1,6 +1,7 @@ import { describe, expect, it, vi } from 'vitest' import { Context } from '@deepseek-ai/cordis' import LlmRuntime, { createUserMessage, ToolCallId } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' import SessionStore, { SessionId, type SessionEvent, @@ -19,6 +20,17 @@ import AgentLoop from '@deepseek-ai/dsh-agent-loop' import SessionProjectionRegistry from '@deepseek-ai/dsh-session-projection' import { MockAdapter, textResponse, toolCallResponse } from './mock-adapter.ts' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'a': { kind: 'a' } & ContextFormed + 'accepted source': { kind: 'accepted source' } & ContextFormed + 'b': { kind: 'b' } & ContextFormed + 'native-guard': { kind: 'native-guard' } & ContextFormed + 'p': { kind: 'p' } & ContextFormed + 'test': { kind: 'test' } & ContextFormed + } +} + /** * The interception points introduced by the hooks taxonomy: `agent/pre-step`, * `agent/created`, `agent/turn-stopping`, and the @@ -132,7 +144,7 @@ describe('agent/pre-step', () => { }) const input: UserMessage = createUserMessage({ content: [{ type: 'text', text: 'accepted text' }], - source: { kind: 'plugin', plugin: 'accepted source' }, + source: { kind: 'accepted source' }, }) const idle = waitForIdle(ctx, agent) @@ -143,7 +155,9 @@ describe('agent/pre-step', () => { if (block?.type === 'text') block.text = 'caller mutation' }).toThrow(TypeError) expect(() => { - if (input.source.kind === 'plugin') input.source.plugin = 'caller mutation' + if (input.source.kind === 'accepted source') { + (input.source as unknown as { plugin?: string }).plugin = 'caller mutation' + } }).toThrow(TypeError) decision.resolve({ kind: 'enter', messages: [input] }) await idle @@ -152,7 +166,7 @@ describe('agent/pre-step', () => { expect(observed[0]).not.toBe(input) expect(observed[0]).toMatchObject({ content: [{ type: 'text', text: 'accepted text' }], - source: { kind: 'plugin', plugin: 'accepted source' }, + source: { kind: 'accepted source' }, }) const userMsg = events(agent).find(event => event.type === 'user/message') expect(userMsg?.type === 'user/message' && userMsg.data).toEqual(input) @@ -189,7 +203,7 @@ describe('agent/pre-step', () => { kind: 'enter', messages: [...messages, createUserMessage({ content: [{ type: 'text', text: 'extra ctx' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, })], })) @@ -198,10 +212,10 @@ describe('agent/pre-step', () => { const log = events(agent) const userMsg = log.find(e => e.type === 'user/message' && e.data.source.kind === 'user') - const ctxMsg = log.find(e => e.type === 'user/message' && e.data.source.kind === 'plugin') + const ctxMsg = log.find(e => e.type === 'user/message' && e.data.source.kind !== 'user') expect(userMsg).toBeDefined() expect(ctxMsg?.type === 'user/message' && ctxMsg.data.content).toEqual([{ type: 'text', text: 'extra ctx' }]) - expect(ctxMsg?.type === 'user/message' && ctxMsg.data.source).toEqual({ kind: 'plugin', plugin: 'test' }) + expect(ctxMsg?.type === 'user/message' && ctxMsg.data.source).toEqual({ kind: 'test' }) const sent = JSON.stringify(adapter.requests[0]!.messages) expect(sent).toContain('extra ctx') }) @@ -216,7 +230,7 @@ describe('agent/pre-step', () => { ctx.on('agent/turn-stopping', ({ agent: subject }) => { subject.inject(createUserMessage({ content: [{ type: 'text', text: 'pending context' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, })) }) ctx.on('agent/pre-step', async ({ step }, next) => { @@ -280,7 +294,7 @@ describe('agent/pre-step', () => { agent.inject(createUserMessage({ content: [{ type: 'text', text: 'attached context' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, })) agent.steer(createUserMessage({ content: [{ type: 'text', text: 'pre-step steering' }], source: { kind: 'user' } })) expect(events(agent).some(event => event.type === 'user/message')).toBe(false) @@ -334,7 +348,7 @@ describe('agent/pre-step', () => { await entered.promise agent.inject(createUserMessage({ content: [{ type: 'text', text: 'staged context' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, })) agent.steer(createUserMessage({ content: [{ type: 'text', text: 'staged steering' }], source: { kind: 'user' } })) decision.resolve({ kind: 'reject' }) @@ -387,7 +401,7 @@ describe('agent/pre-step', () => { message.content.some(block => block.type === 'text' && block.text === 'blocked prompt'))) { subject.inject(createUserMessage({ content: [{ type: 'text', text: 'earlier state change' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, })) subject.steer(createUserMessage({ content: [{ type: 'text', text: 'earlier steering' }], @@ -439,7 +453,7 @@ describe('agent/pre-step', () => { await entered.promise agent.inject(createUserMessage({ content: [{ type: 'text', text: 'independent context' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, })) decision.resolve({ kind: 'reject' }) await idle @@ -579,7 +593,7 @@ describe('agent/created', () => { const ctx = await harness(adapter) ctx.on('agent/created', ({ agent }) => { - agent.inject(createUserMessage({ content: [{ type: 'text', text: 'session preamble' }], source: { kind: 'plugin', plugin: 'test' } })) + agent.inject(createUserMessage({ content: [{ type: 'text', text: 'session preamble' }], source: { kind: 'test' } })) }) const agent = await ctx.agentLoop.create(SessionId('a1'), { provider: 'mock', model: 'mock' }) @@ -589,8 +603,8 @@ describe('agent/created', () => { // the injected context reached the model on the first (only) request expect(JSON.stringify(adapter.requests[0]!.messages)).toContain('session preamble') // and is recorded with the plugin source, never mislabeled as a user prompt - const ctxMsg = events(agent).find(e => e.type === 'user/message' && e.data.source.kind === 'plugin') - expect(ctxMsg?.type === 'user/message' && ctxMsg.data.source).toEqual({ kind: 'plugin', plugin: 'test' }) + const ctxMsg = events(agent).find(e => e.type === 'user/message' && e.data.source.kind !== 'user') + expect(ctxMsg?.type === 'user/message' && ctxMsg.data.source).toEqual({ kind: 'test' }) }) it('a throwing creation listener rolls back the agent before its first turn', async () => { @@ -632,7 +646,7 @@ describe('tool additionalContexts buffering across a step', () => { kind: 'accept', additionalContexts: [createUserMessage({ content: [{ type: 'text', text: `ctx-${exec.callId}` }], - source: { kind: 'plugin', plugin: 'p' }, + source: { kind: 'p' }, })], })) @@ -641,7 +655,7 @@ describe('tool additionalContexts buffering across a step', () => { // Event order in the log: both tool/results, THEN both injected contexts — // never interleaved (which would break tool-call/result adjacency). - const injected = events(agent).filter(e => e.type === 'user/message' && e.data.source.kind === 'plugin') + const injected = events(agent).filter(e => e.type === 'user/message' && e.data.source.kind !== 'user') const seqs = events(agent) const firstResult = seqs.findIndex(e => e.type === 'tool/result') const lastResult = seqs.map(e => e.type).lastIndexOf('tool/result') @@ -663,10 +677,10 @@ describe('tool additionalContexts buffering across a step', () => { name: 'composite', description: 'composite', parameters: {}, async execute(_args, exec) { exec.deferContext(createUserMessage({ - content: [{ type: 'text', text: 'nested-a' }], source: { kind: 'plugin', plugin: 'a' }, + content: [{ type: 'text', text: 'nested-a' }], source: { kind: 'a' }, })) exec.deferContext(createUserMessage({ - content: [{ type: 'text', text: 'nested-b' }], source: { kind: 'plugin', plugin: 'b' }, + content: [{ type: 'text', text: 'nested-b' }], source: { kind: 'b' }, })) return [{ type: 'text', text: 'outer result' }] }, @@ -678,12 +692,12 @@ describe('tool additionalContexts buffering across a step', () => { const log = events(agent) const resultIndex = log.findIndex(event => event.type === 'tool/result') - const contextEvents = log.filter(event => event.type === 'user/message' && event.data.source.kind === 'plugin') + const contextEvents = log.filter(event => event.type === 'user/message' && event.data.source.kind !== 'user') expect(resultIndex).toBeGreaterThanOrEqual(0) expect(log.findIndex(event => event === contextEvents[0])).toBeGreaterThan(resultIndex) expect(contextEvents.map(event => event.type === 'user/message' && event.data.source)).toEqual([ - { kind: 'plugin', plugin: 'a' }, - { kind: 'plugin', plugin: 'b' }, + { kind: 'a' }, + { kind: 'b' }, ]) }) }) @@ -724,7 +738,7 @@ describe('worked example: a native hook plugin is just a cordis plugin on the se apply(ctx: Context) { // 1. SessionStart: seed a standing instruction. ctx.on('agent/created', ({ agent, source }) => { - agent.inject(createUserMessage({ content: [{ type: 'text', text: `policy active (started: ${source})` }], source: { kind: 'plugin', plugin: 'native-guard' } })) + agent.inject(createUserMessage({ content: [{ type: 'text', text: `policy active (started: ${source})` }], source: { kind: 'native-guard' } })) }) // 2. PreStep: reject a forbidden prompt, annotate the rest. ctx.on('agent/pre-step', async ({ messages }, next): Promise => { @@ -745,7 +759,7 @@ describe('worked example: a native hook plugin is just a cordis plugin on the se const decision = await next() if (decision.kind === 'accept') { return { kind: 'accept', additionalContexts: [createUserMessage({ - content: [{ type: 'text', text: 'audited' }], source: { kind: 'plugin', plugin: 'native-guard' }, + content: [{ type: 'text', text: 'audited' }], source: { kind: 'native-guard' }, })] } } return decision @@ -768,13 +782,13 @@ describe('worked example: a native hook plugin is just a cordis plugin on the se const log = events(agent) // session-start preamble injected - expect(log.some(e => e.type === 'user/message' && e.data.source.kind === 'plugin' + expect(log.some(e => e.type === 'user/message' && e.data.source.kind !== 'user' && e.data.content.some(b => b.type === 'text' && b.text.includes('policy active (started: startup)')))).toBe(true) // prompt allowed → user-sourced user/message recorded expect(log.some(e => e.type === 'user/message' && e.data.source.kind === 'user')).toBe(true) // tool ran (echo allowed) and post-execute attached "audited" context expect(log.some(e => e.type === 'tool/result' && !e.data.message.isError)).toBe(true) - expect(log.some(e => e.type === 'user/message' && e.data.source.kind === 'plugin' + expect(log.some(e => e.type === 'user/message' && e.data.source.kind !== 'user' && e.data.content.some(b => b.type === 'text' && b.text === 'audited'))).toBe(true) // NO hook/* events — a native plugin needs none expect(log.some(e => e.type.startsWith('hook/'))).toBe(false) diff --git a/packages/core/agent-loop/tests/invariant.spec.ts b/packages/core/agent-loop/tests/invariant.spec.ts index 6a71629711..14ca873c8c 100644 --- a/packages/core/agent-loop/tests/invariant.spec.ts +++ b/packages/core/agent-loop/tests/invariant.spec.ts @@ -4,6 +4,13 @@ import SessionStore, { SessionId } from '@deepseek-ai/dsh-session' import InvariantRegistry from '@deepseek-ai/dsh-invariants' import * as AgentLoopInvariant from '@deepseek-ai/dsh-agent-loop/invariant' import { createUserMessage, markAgentLoopRequest, type GenerateOptions } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' + +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'x': { kind: 'x' } & ContextFormed + } +} async function setup(): Promise { const ctx = new Context() @@ -45,7 +52,7 @@ describe('request-reconstruction invariant', () => { it('includes context appended inside the open step before dispatch', async () => { const { ctx, session } = await requestSetup() session.append('user/message', createUserMessage({ - content: [{ type: 'text', text: '[step context]' }], source: { kind: 'plugin', plugin: 'x' }, + content: [{ type: 'text', text: '[step context]' }], source: { kind: 'x' }, }), { surfaceOp: 'append' }) const options = loopRequest({ model: 'm', diff --git a/packages/core/agent-loop/tests/loop.spec.ts b/packages/core/agent-loop/tests/loop.spec.ts index e8e0d7f116..7587f1da7b 100644 --- a/packages/core/agent-loop/tests/loop.spec.ts +++ b/packages/core/agent-loop/tests/loop.spec.ts @@ -1,6 +1,7 @@ import { describe, expect, it, vi } from 'vitest' import { Context } from '@deepseek-ai/cordis' import LlmRuntime, { createUserMessage, ToolCallId, LlmError, ReasoningEffortId, StreamChunk, expandAssistantStream } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' import type { GenerateOptions } from '@deepseek-ai/dsh-llm' import SessionStore, { SessionId, TurnEndReason } from '@deepseek-ai/dsh-session' import SystemPrompt from '@deepseek-ai/dsh-system-prompt' @@ -11,6 +12,18 @@ import AgentLoop from '@deepseek-ai/dsh-agent-loop' import SessionProjectionRegistry from '@deepseek-ai/dsh-session-projection' import { MockAdapter, maxTokensResponse, textResponse, toolCallResponse } from './mock-adapter.ts' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'loop-test': { kind: 'loop-test' } & ContextFormed + 'max-tokens-test': { kind: 'max-tokens-test' } & ContextFormed + 'test': { kind: 'test' } & ContextFormed + 'test-compaction': { kind: 'test-compaction' } & ContextFormed + 'test-context': { kind: 'test-context' } & ContextFormed + 'watcher': { kind: 'watcher' } & ContextFormed + 'x': { kind: 'x' } & ContextFormed + } +} + function driverDone(agent: Agent): Promise { return (agent as Agent & { done: Promise }).done } @@ -682,8 +695,7 @@ describe('agent loop', () => { const agent = await ctx.agentLoop.create(SessionId('a-runtime-context'), { provider: 'mock', model: 'mock' }) const contextEvents = () => agent.session.snapshotEvents().flatMap(event => event.type === 'user/message' - && event.data.source.kind === 'plugin' - && event.data.source.plugin === '@deepseek-ai/dsh-system-prompt' + && event.data.source.kind === 'runtime-context' ? [event] : []) @@ -736,12 +748,11 @@ describe('agent loop', () => { await waitForIdle(ctx, agent) const contextEvent = agent.session.snapshotEvents().find(event => event.type === 'user/message' - && event.data.source.kind === 'plugin' - && event.data.source.plugin === '@deepseek-ai/dsh-system-prompt') + && event.data.source.kind === 'runtime-context') if (contextEvent?.type !== 'user/message') throw new Error('first turn did not materialize runtime context') agent.session.append('user/message', createUserMessage({ content: [{ type: 'text', text: 'compacted summary' }], - source: { kind: 'plugin', plugin: 'test-compaction' }, + source: { kind: 'test-compaction' }, }), { surfaceOp: { op: 'replace', startSeq: contextEvent.seq, endSeq: contextEvent.seq }, sourceEventSeqs: [contextEvent.seq], @@ -751,14 +762,12 @@ describe('agent loop', () => { await waitForIdle(ctx, agent) const runtimeContexts = agent.session.snapshotEvents().flatMap(event => event.type === 'user/message' - && event.data.source.kind === 'plugin' - && event.data.source.plugin === '@deepseek-ai/dsh-system-prompt' + && event.data.source.kind === 'runtime-context' ? [event] : []) expect(runtimeContexts).toHaveLength(2) expect(adapter.requests[1]?.messages.some(message => - message.source.kind === 'plugin' - && message.source.plugin === '@deepseek-ai/dsh-system-prompt')).toBe(true) + message.role === 'user' && message.source?.kind === 'runtime-context')).toBe(true) }) it('clears compacted runtime context after the active set becomes empty', async () => { @@ -771,12 +780,11 @@ describe('agent loop', () => { await waitForIdle(ctx, agent) const contextEvent = agent.session.snapshotEvents().find(event => event.type === 'user/message' - && event.data.source.kind === 'plugin' - && event.data.source.plugin === '@deepseek-ai/dsh-system-prompt') + && event.data.source.kind === 'runtime-context') if (contextEvent?.type !== 'user/message') throw new Error('first turn did not materialize runtime context') agent.session.append('user/message', createUserMessage({ content: [{ type: 'text', text: 'summary retaining old mode: read-only' }], - source: { kind: 'plugin', plugin: 'test-compaction' }, + source: { kind: 'test-compaction' }, }), { surfaceOp: { op: 'replace', startSeq: contextEvent.seq, endSeq: contextEvent.seq }, sourceEventSeqs: [contextEvent.seq], @@ -786,9 +794,7 @@ describe('agent loop', () => { send(agent, 'after compaction') await waitForIdle(ctx, agent) const clearing = adapter.requests[1]?.messages.find(message => - message.role === 'user' - && message.source.kind === 'plugin' - && message.source.plugin === '@deepseek-ai/dsh-system-prompt') + message.role === 'user' && message.source?.kind === 'runtime-context') expect(clearing?.content).toEqual([{ type: 'text', text: 'Current runtime context: none. Earlier runtime-context snapshots no longer apply.', @@ -801,11 +807,11 @@ describe('agent loop', () => { const agent = await ctx.agentLoop.create(SessionId('a-runtime-context-unrelated-compaction'), { provider: 'mock', model: 'mock' }) const original = agent.session.append('user/message', createUserMessage({ content: [{ type: 'text', text: 'old context' }], - source: { kind: 'plugin', plugin: 'test-context' }, + source: { kind: 'test-context' }, }), { surfaceOp: 'append' }) agent.session.append('user/message', createUserMessage({ content: [{ type: 'text', text: 'compacted summary' }], - source: { kind: 'plugin', plugin: 'test-compaction' }, + source: { kind: 'test-compaction' }, }), { surfaceOp: { op: 'replace', startSeq: original.seq, endSeq: original.seq }, sourceEventSeqs: [original.seq], @@ -814,9 +820,7 @@ describe('agent loop', () => { send(agent, 'after compaction') await waitForIdle(ctx, agent) expect(adapter.requests[0]?.messages.some(message => - message.role === 'user' - && message.source.kind === 'plugin' - && message.source.plugin === '@deepseek-ai/dsh-system-prompt')).toBe(false) + message.role === 'user' && message.source?.kind === 'runtime-context')).toBe(false) }) it('replaces a malformed retained runtime-context message with the current complete snapshot', async () => { @@ -826,15 +830,14 @@ describe('agent loop', () => { const agent = await ctx.agentLoop.create(SessionId('a-runtime-context-malformed'), { provider: 'mock', model: 'mock' }) agent.session.append('user/message', createUserMessage({ content: [{ type: 'text', text: 'broken' }, { type: 'text', text: 'snapshot' }], - source: { kind: 'plugin', plugin: '@deepseek-ai/dsh-system-prompt' }, + source: { kind: 'runtime-context' }, }), { surfaceOp: 'append' }) send(agent, 'repair context') await waitForIdle(ctx, agent) const runtimeContexts = agent.session.snapshotEvents().flatMap(event => event.type === 'user/message' - && event.data.source.kind === 'plugin' - && event.data.source.plugin === '@deepseek-ai/dsh-system-prompt' + && event.data.source.kind === 'runtime-context' ? [event] : []) expect(runtimeContexts).toHaveLength(2) @@ -960,7 +963,7 @@ describe('agent loop', () => { const ctx = await harness(adapter) const agent = await ctx.agentLoop.create(SessionId('a1'), { provider: 'mock', model: 'mock' }) - agent.inject(createUserMessage({ content: [{ type: 'text', text: 'file changed: a.ts' }], source: { kind: 'plugin', plugin: 'watcher' } })) + agent.inject(createUserMessage({ content: [{ type: 'text', text: 'file changed: a.ts' }], source: { kind: 'watcher' } })) expect(agent.status).toBe('idle') expect(adapter.requests).toHaveLength(0) expect(agent.session.snapshotEvents().filter(event => event.type === 'turn/start')).toHaveLength(0) @@ -971,7 +974,7 @@ describe('agent loop', () => { inserted: [{ role: 'user', content: [{ type: 'text', text: 'file changed: a.ts' }], - source: { kind: 'plugin', plugin: 'watcher' }, + source: { kind: 'watcher' }, }], }, }) @@ -989,13 +992,13 @@ describe('agent loop', () => { const ctx = await harness(adapter) const agent = await ctx.agentLoop.create(SessionId('raw-context'), { provider: 'mock', model: 'mock' }) const text = 'Additional instructions from: pkg/AGENTS.md' - agent.inject(createUserMessage({ content: [{ type: 'text', text }], source: { kind: 'plugin', plugin: 'agent-instructions' } })) + agent.inject(createUserMessage({ content: [{ type: 'text', text }], source: { kind: 'agent-instructions', form: 'instructions', changes: [] } })) send(agent, 'go') await waitForIdle(ctx, agent) - const contextEvent = agent.session.snapshotEvents().find(event => event.type === 'user/message' && event.data.source.kind === 'plugin') + const contextEvent = agent.session.snapshotEvents().find(event => event.type === 'user/message' && event.data.source.kind === 'agent-instructions') expect(contextEvent?.type === 'user/message' && contextEvent.data.source) - .toEqual({ kind: 'plugin', plugin: 'agent-instructions' }) + .toEqual({ kind: 'agent-instructions', form: 'instructions', changes: [] }) const requestText = JSON.stringify(adapter.requests[0]!.messages) expect(requestText).toContain('Additional instructions from: pkg/AGENTS.md') expect(requestText).not.toContain(' { async execute() { await Promise.resolve() const first = { type: 'text' as const, text: 'mid-turn notice' } - agent.inject(createUserMessage({ content: [first], source: { kind: 'plugin', plugin: 'x' } })) + agent.inject(createUserMessage({ content: [first], source: { kind: 'x' } })) first.text = 'mutated after inject' - agent.inject(createUserMessage({ content: [{ type: 'text', text: 'second notice' }], source: { kind: 'plugin', plugin: 'x' } })) - visibleDuringTool = agent.session.snapshotEvents().some(e => e.type === 'user/message' && e.data.source.kind === 'plugin') + agent.inject(createUserMessage({ content: [{ type: 'text', text: 'second notice' }], source: { kind: 'x' } })) + visibleDuringTool = agent.session.snapshotEvents().some(e => e.type === 'user/message' && e.data.source.kind === 'x') return [{ type: 'text', text: 'ok' }] }, })) @@ -1034,7 +1037,7 @@ describe('agent loop', () => { const turnStarts = agent.session.snapshotEvents().filter(e => e.type === 'turn/start') expect(turnStarts).toHaveLength(1) const result = agent.session.snapshotEvents().find(e => e.type === 'tool/result')! - const contexts = agent.session.snapshotEvents().filter(e => e.type === 'user/message' && e.data.source.kind === 'plugin') + const contexts = agent.session.snapshotEvents().filter(e => e.type === 'user/message' && e.data.source.kind === 'x') expect(contexts).toHaveLength(2) expect(result.seq).toBeLessThan(contexts[0]!.seq) expect(contexts.flatMap(event => event.type === 'user/message' ? event.data.content : [])) @@ -1068,7 +1071,7 @@ describe('agent loop', () => { parameters: {}, async execute() { expect(() => { - agent.inject(createUserMessage({ content: [{ type: 'text', text: 'invalid' }], source: { kind: 'plugin', plugin: 'test', bigint: 1n } as never })) + agent.inject(createUserMessage({ content: [{ type: 'text', text: 'invalid' }], source: { kind: 'test', bigint: 1n } as never })) }).toThrow('agent context must be losslessly JSON-serializable') return [{ type: 'text', text: 'rejected invalid context' }] }, @@ -1077,7 +1080,7 @@ describe('agent loop', () => { send(agent, 'go') await waitForIdle(ctx, agent) - expect(agent.session.snapshotEvents().some(event => event.type === 'user/message' && event.data.source.kind === 'plugin')).toBe(false) + expect(agent.session.snapshotEvents().some(event => event.type === 'user/message' && event.data.source.kind === 'test')).toBe(false) }) it('agent/turn-stopping can steer another step (/loop pattern)', async () => { @@ -1093,7 +1096,7 @@ describe('agent loop', () => { ctx.on('session/event', (_session, event) => { if (event.type === 'step/end') steps++ }) ctx.on('agent/turn-stopping', ({ agent: subject }) => { if (steps < 3) { - subject.steer(createUserMessage({ content: [{ type: 'text', text: 'continue' }], source: { kind: 'plugin', plugin: 'loop-test' } })) + subject.steer(createUserMessage({ content: [{ type: 'text', text: 'continue' }], source: { kind: 'loop-test' } })) } }) @@ -1321,7 +1324,7 @@ describe('agent loop', () => { // (step 2 is a plain stop with no tool calls → stops). ctx.on('agent/turn-stopping', ({ agent: subject }) => { if (steps < 2) { - subject.steer(createUserMessage({ content: [{ type: 'text', text: 'continue after truncation' }], source: { kind: 'plugin', plugin: 'max-tokens-test' } })) + subject.steer(createUserMessage({ content: [{ type: 'text', text: 'continue after truncation' }], source: { kind: 'max-tokens-test' } })) } }) @@ -1350,7 +1353,7 @@ describe('agent loop', () => { id: expect.any(String) as unknown, role: 'user', content: [{ type: 'text', text: 'continue after truncation' }], - source: { kind: 'plugin', plugin: 'max-tokens-test' }, + source: { kind: 'max-tokens-test' }, }, ]) // A max-token step is sticky: the later completed step must not @@ -1638,7 +1641,7 @@ describe('agent loop', () => { const idle = waitForIdle(ctx, agent) agent.followup(createUserMessage({ content: [{ type: 'text', text: 'user message' }], source: { kind: 'user' } })) await Promise.resolve() - agent.followup(createUserMessage({ content: [{ type: 'text', text: 'plugin message' }], source: { kind: 'plugin', plugin: 'test' } })) + agent.followup(createUserMessage({ content: [{ type: 'text', text: 'plugin message' }], source: { kind: 'test' } })) await idle const turns = agent.session.snapshotEvents().filter(event => event.type === 'turn/start') @@ -1648,7 +1651,7 @@ describe('agent loop', () => { expect(turns).toHaveLength(2) expect(sources).toEqual([ { kind: 'user' }, - { kind: 'plugin', plugin: 'test' }, + { kind: 'test' }, ]) }) diff --git a/packages/core/agent-loop/tests/request-reconstruction.spec.ts b/packages/core/agent-loop/tests/request-reconstruction.spec.ts index 2450a21999..69014d400d 100644 --- a/packages/core/agent-loop/tests/request-reconstruction.spec.ts +++ b/packages/core/agent-loop/tests/request-reconstruction.spec.ts @@ -9,6 +9,7 @@ import { describe, expect, it } from 'vitest' import { Context } from '@deepseek-ai/cordis' import LlmRuntime, { createUserMessage, LlmError, ReasoningEffortId } from '@deepseek-ai/dsh-llm' import type { GenerateOptions, LlmModelReasoningInfo, LlmResolvedModelInfo, StreamChunk } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' import SessionStore, { Session, SessionId, foldRequestHeader } from '@deepseek-ai/dsh-session' import SystemPrompt from '@deepseek-ai/dsh-system-prompt' import ToolRuntime, { defineContentToolFixture } from '@deepseek-ai/dsh-tools' @@ -18,6 +19,14 @@ import AgentLoop from '@deepseek-ai/dsh-agent-loop' import SessionProjectionRegistry from '@deepseek-ai/dsh-session-projection' import { MockAdapter, textResponse, toolCallResponse } from './mock-adapter.ts' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'outer-wrapper': { kind: 'outer-wrapper' } & ContextFormed + 'test': { kind: 'test' } & ContextFormed + 'test-compact': { kind: 'test-compact' } & ContextFormed + } +} + async function harness(adapter: MockAdapter, persona = 'stable base') { return harnessRoutes([['mock', adapter]], persona) } @@ -177,7 +186,7 @@ describe('request stability across the loop', () => { if (decision.kind === 'reject') return decision const appended = createUserMessage({ content: [{ type: 'text', text: 'appended reference context' }], - source: { kind: 'plugin', plugin: 'outer-wrapper' }, + source: { kind: 'outer-wrapper' }, }) return { ...decision, messages: [...decision.messages, appended] } }, { prepend: true }) @@ -508,7 +517,7 @@ describe('request stability across the loop', () => { const nodes = agent.session.surface.nodes agent.session.append('user/message', createUserMessage({ content: [{ type: 'text', text: '[summary of turn 1]' }], - source: { kind: 'plugin', plugin: 'test-compact' }, + source: { kind: 'test-compact' }, }), { surfaceOp: { op: 'replace', startSeq: nodes[1]!, endSeq: nodes[2]! }, sourceEventSeqs: [nodes[1]!, nodes[2]!], @@ -544,7 +553,7 @@ describe('request stability across the loop', () => { if (first === undefined) throw new Error('request has no surface message to compact') subject.session.append('user/message', createUserMessage({ content: [{ type: 'text', text: '[summary for retry]' }], - source: { kind: 'plugin', plugin: 'test-compact' }, + source: { kind: 'test-compact' }, }), { surfaceOp: { op: 'replace', startSeq: first, endSeq: first }, sourceEventSeqs: [first], @@ -694,7 +703,7 @@ describe('request stability across the loop', () => { const nodes = agent.session.surface.nodes agent.session.append('user/message', createUserMessage({ content: [{ type: 'text', text: '[summary of turn 1]' }], - source: { kind: 'plugin', plugin: 'test-compact' }, + source: { kind: 'test-compact' }, }), { surfaceOp: { op: 'replace', startSeq: nodes[1]!, endSeq: nodes[2]! }, sourceEventSeqs: [nodes[1]!, nodes[2]!], @@ -742,7 +751,7 @@ describe('request stability across the loop', () => { ctx.on('agent/request', async (_payload, next) => { if (!injected) { injected = true - agent.inject(createUserMessage({ content: [{ type: 'text', text: '[late context]' }], source: { kind: 'plugin', plugin: 'test' } })) + agent.inject(createUserMessage({ content: [{ type: 'text', text: '[late context]' }], source: { kind: 'test' } })) } return next() }) @@ -752,7 +761,7 @@ describe('request stability across the loop', () => { const first = adapter.requests[0]! // The inject landed in the log after the boundary: not in THIS request… expect(first.messages.some(m => m.content.some(b => b.type === 'text' && b.text.includes('[late context]')))).toBe(false) - expect(agent.session.snapshotEvents().some(e => e.type === 'user/message' && e.data.source.kind === 'plugin')).toBe(true) + expect(agent.session.snapshotEvents().some(e => e.type === 'user/message' && e.data.source.kind !== 'user')).toBe(true) send(agent, 'second') await waitForIdle(ctx, agent) @@ -771,7 +780,7 @@ describe('request stability across the loop', () => { // request content in place. The freeze turns it into a loud error. options.messages.push(createUserMessage({ content: [{ type: 'text', text: 'sneaky' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, })) return next() }) diff --git a/packages/core/agent-loop/tests/resume.spec.ts b/packages/core/agent-loop/tests/resume.spec.ts index 9a9d80c91b..9a5326df9a 100644 --- a/packages/core/agent-loop/tests/resume.spec.ts +++ b/packages/core/agent-loop/tests/resume.spec.ts @@ -5,6 +5,7 @@ import { appendFile, mkdtemp, readdir, rm } from 'node:fs/promises' import { tmpdir } from 'node:os' import { join } from 'node:path' import LlmRuntime from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' import SessionStore, { SessionLogOffset, SessionSeq, Session, SessionId, TOOL_OUTCOME_UNKNOWN } from '@deepseek-ai/dsh-session' import type { SessionEvent } from '@deepseek-ai/dsh-session' import SystemPrompt from '@deepseek-ai/dsh-system-prompt' @@ -17,6 +18,12 @@ import AgentLoop from '@deepseek-ai/dsh-agent-loop' import SessionProjectionRegistry from '@deepseek-ai/dsh-session-projection' import { MockAdapter, textResponse } from './mock-adapter.ts' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'tool-bash': { kind: 'tool-bash' } & ContextFormed + } +} + const dirs: string[] = [] afterEach(async () => { for (const d of dirs.splice(0)) await rm(d, { recursive: true, force: true }) }) @@ -943,7 +950,7 @@ describe('the session-persistence Agent Note: AgentLoop factory create/resume', const a1 = (await ctx1.agents.create({ sessionId: SessionId('inject-sess'), meta: { cwd: '/w' }, agentOptions: { provider: 'mock', model: 'mock' } })).agent a1.followup(createUserMessage({ content: [{ type: 'text', text: 'q' }], source: { kind: 'user' } })) await waitForIdle(ctx1, a1) - a1.inject(createUserMessage({ content: [{ type: 'text', text: 'background job 42 finished' }], source: { kind: 'plugin', plugin: 'tool-bash' } })) + a1.inject(createUserMessage({ content: [{ type: 'text', text: 'background job 42 finished' }], source: { kind: 'tool-bash' } })) await a1.whenIdle() await ctx1.sessions.flush(a1.session) // Simulate a wedged first lifecycle: a graceful dispose would durably diff --git a/packages/core/agent-loop/tests/runtime-context.spec.ts b/packages/core/agent-loop/tests/runtime-context.spec.ts index 37c13bdc60..2883d1f7b0 100644 --- a/packages/core/agent-loop/tests/runtime-context.spec.ts +++ b/packages/core/agent-loop/tests/runtime-context.spec.ts @@ -1,15 +1,22 @@ import { describe, expect, it } from 'vitest' import { Context } from '@deepseek-ai/cordis' import { createUserMessage } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' import SessionStore, { SessionId } from '@deepseek-ai/dsh-session' import { RuntimeContextProjection } from '../src/runtime-context.ts' -const SOURCE = '@deepseek-ai/dsh-system-prompt' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'test-compaction': { kind: 'test-compaction' } & ContextFormed + } +} + +const SOURCE = 'runtime-context' function contextMessage(text: string) { return createUserMessage({ content: [{ type: 'text', text }], - source: { kind: 'plugin', plugin: SOURCE }, + source: { kind: SOURCE }, }) } @@ -22,7 +29,7 @@ describe('RuntimeContextProjection', () => { const shadowed = session.append('user/message', contextMessage('shadowed'), { surfaceOp: 'append' }) session.append('user/message', createUserMessage({ content: [{ type: 'text', text: 'summary' }], - source: { kind: 'plugin', plugin: 'test-compaction' }, + source: { kind: 'test-compaction' }, }), { surfaceOp: { op: 'replace', startSeq: shadowed.seq, endSeq: shadowed.seq }, sourceEventSeqs: [shadowed.seq], @@ -32,8 +39,7 @@ describe('RuntimeContextProjection', () => { expect(session.surface.nodes).toContain(retained.seq) expect(projection.project('retained', [])).toBeUndefined() expect(projection.project('next', [{ name: 'sandbox:policy', text: 'policy' }])?.source).toEqual({ - kind: 'plugin', - plugin: SOURCE, + kind: SOURCE, form: 'snapshot', sections: [{ name: 'sandbox:policy', text: 'policy' }], }) diff --git a/packages/core/agent-loop/tests/system-prompt-admission.spec.ts b/packages/core/agent-loop/tests/system-prompt-admission.spec.ts index d3702147f6..25051e26ee 100644 --- a/packages/core/agent-loop/tests/system-prompt-admission.spec.ts +++ b/packages/core/agent-loop/tests/system-prompt-admission.spec.ts @@ -10,6 +10,12 @@ import SystemPrompt from '@deepseek-ai/dsh-system-prompt' import ToolRuntime, { defineContentToolFixture } from '@deepseek-ai/dsh-tools' import { MockAdapter, textResponse } from './mock-adapter.ts' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'test-compaction': { kind: 'test-compaction' } & import('@deepseek-ai/dsh-llm').ContextFormed + } +} + const contexts: Context[] = [] afterEach(async () => { for (const ctx of contexts.splice(0)) await ctx.fiber.dispose() @@ -151,7 +157,7 @@ describe('prepared-route prompt admission', () => { const start = retainOlder ? latest : nodes[1]! const replaced = nodes.slice(nodes.indexOf(start), nodes.indexOf(latest) + 1) h.agent.session.append('user/message', createUserMessage({ - content: [{ type: 'text', text: 'compacted history' }], source: { kind: 'plugin', plugin: 'test-compaction' }, + content: [{ type: 'text', text: 'compacted history' }], source: { kind: 'test-compaction' }, }), { surfaceOp: { op: 'replace', startSeq: start, endSeq: latest }, sourceEventSeqs: replaced }) // A retry must retain the assembly accepted for this step, not pick up new sections. h.setPrompt('not admitted until next step') @@ -215,11 +221,11 @@ describe('prepared-route prompt admission', () => { [{ type: 'text', text: 'second' }], notice, ]) const notices = h.agent.session.snapshotEvents().filter(event => event.type === 'user/message' - && event.data.source.kind === 'plugin' && event.data.source.plugin === 'model-selection') + && event.data.source.kind === 'model-selection') expect(notices).toHaveLength(1) expect(notices[0]!.data).toMatchObject({ content: notice, - source: { kind: 'plugin', plugin: 'model-selection', form: 'notice', summary: 'plain/model → capable/model' }, + source: { kind: 'model-selection', form: 'notice', summary: 'plain/model → capable/model' }, }) }) @@ -236,7 +242,7 @@ describe('prepared-route prompt admission', () => { if (agent === resumed && replace) { const seq = agent.session.surface.nodes.find(seq => agent.session.eventAt(seq)?.type === 'user/message')! agent.session.append('user/message', createUserMessage({ - content: [{ type: 'text', text: 'compacted history' }], source: { kind: 'plugin', plugin: 'test-compaction' }, + content: [{ type: 'text', text: 'compacted history' }], source: { kind: 'test-compaction' }, }), { surfaceOp: { op: 'replace', startSeq: seq, endSeq: seq }, sourceEventSeqs: [seq] }) } return next() diff --git a/packages/core/agent-loop/tests/system-prompt-projection.spec.ts b/packages/core/agent-loop/tests/system-prompt-projection.spec.ts index c50b064557..65ec74c486 100644 --- a/packages/core/agent-loop/tests/system-prompt-projection.spec.ts +++ b/packages/core/agent-loop/tests/system-prompt-projection.spec.ts @@ -6,7 +6,12 @@ import type { Session, SurfaceIntent } from '@deepseek-ai/dsh-session' import { SystemPromptProjection } from '../src/runtime-context.ts' import type { SystemPromptCommit, SystemPromptDecisionInput } from '../src/runtime-context.ts' -const SOURCE = '@deepseek-ai/dsh-system-prompt' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'test-compaction': { kind: 'test-compaction' } & import('@deepseek-ai/dsh-llm').ContextFormed + } +} + const REPLACING: SystemPromptDecisionInput = { inHistory: false, startsSeries: false } const CONTINUING: SystemPromptDecisionInput = { inHistory: true, startsSeries: false } const NEW_SERIES: SystemPromptDecisionInput = { inHistory: true, startsSeries: true } @@ -39,13 +44,13 @@ describe('SystemPromptProjection', () => { const ctx = await sessionStore() try { const session = ctx.sessions.create(SessionId('system-prompt-multiblock')) - const base = createSystemMessage('old', SOURCE) + const base = createSystemMessage('old') session.append('system/message', { turn: 1, step: 1, message: { ...base, content: [{ type: 'text', text: 'old ' }, { type: 'text', text: 'instructions' }], } }, { surfaceOp: 'append' }) appendUser(session, 'hello') session.append('system/message', { turn: 1, step: 1, message: { - ...createSystemMessage('tail', SOURCE), content: [{ type: 'reasoning', text: 'retained content' }], + ...createSystemMessage('tail'), content: [{ type: 'reasoning', text: 'retained content' }], } }, { surfaceOp: 'append' }) const projection = new SystemPromptProjection(session) for (const update of projection.project('', CONTINUING)) commit(session, 2, update) @@ -64,7 +69,7 @@ describe('SystemPromptProjection', () => { const first = projection.project('v1', REPLACING)[0] expect(first?.intent).toEqual({ surfaceOp: 'append' }) expect(first?.message.role).toBe('system') - expect(first?.message.source).toEqual({ kind: 'plugin', plugin: SOURCE }) + expect(first?.message.source).toEqual({ kind: 'system-prompt' }) const head = commit(session, 1, first) appendUser(session, 'hello') @@ -114,16 +119,16 @@ describe('SystemPromptProjection', () => { it('reads the surviving system node from the log, including one restored as "no prompt"', async () => { const ctx = await sessionStore() const session = ctx.sessions.create(SessionId('system-prompt-replay')) - const stale = session.append('system/message', { turn: 1, step: 1, message: createSystemMessage('stale', SOURCE) }, { surfaceOp: 'append' }) + const stale = session.append('system/message', { turn: 1, step: 1, message: createSystemMessage('stale') }, { surfaceOp: 'append' }) appendUser(session, 'hello') - const current = session.append('system/message', { turn: 2, step: 1, message: createSystemMessage('current', SOURCE) }, replaceOf(stale.seq)) + const current = session.append('system/message', { turn: 2, step: 1, message: createSystemMessage('current') }, replaceOf(stale.seq)) const projection = new SystemPromptProjection(session) expect(projection.project('current', REPLACING)[0]).toBeUndefined() expect(projection.project('next', REPLACING)[0]?.intent).toEqual(replaceOf(current.seq)) const emptySession = ctx.sessions.create(SessionId('system-prompt-empty-replay')) - const empty = emptySession.append('system/message', { turn: 1, step: 1, message: createSystemMessage('', SOURCE) }, { surfaceOp: 'append' }) + const empty = emptySession.append('system/message', { turn: 1, step: 1, message: createSystemMessage('') }, { surfaceOp: 'append' }) appendUser(emptySession, 'hello') const emptyProjection = new SystemPromptProjection(emptySession) expect(emptyProjection.project('', REPLACING)[0]).toBeUndefined() @@ -143,7 +148,7 @@ describe('SystemPromptProjection', () => { session.append('user/message', createUserMessage({ content: [{ type: 'text', text: 'summary' }], - source: { kind: 'plugin', plugin: 'test-compaction' }, + source: { kind: 'test-compaction' }, }), replaceOf(node.seq)) expect(projection.project('late prompt', REPLACING)[0]?.intent).toEqual({ surfaceOp: 'append' }) }) diff --git a/packages/core/agent-loop/tests/tool-calls.spec.ts b/packages/core/agent-loop/tests/tool-calls.spec.ts index 6aba2b409e..29c4cc3230 100644 --- a/packages/core/agent-loop/tests/tool-calls.spec.ts +++ b/packages/core/agent-loop/tests/tool-calls.spec.ts @@ -9,6 +9,7 @@ import { createUserMessage, ToolCallId, StreamChunk } from '@deepseek-ai/dsh-ll import SessionStore, { SessionEvent, SessionId } from '@deepseek-ai/dsh-session' import SystemPrompt from '@deepseek-ai/dsh-system-prompt' import LlmRuntime from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' import ToolRuntime, { defineContentToolFixture, TOOL_ABORTED_BEFORE_DISPATCH, TOOL_RUNTIME_SCHEDULER, type PostToolDecision, type PreToolDecision } from '@deepseek-ai/dsh-tools' import AgentRegistry, { type Agent } from '@deepseek-ai/dsh-agent' import AgentLoop, { DEFAULT_MAX_PARALLEL_TOOL_CALLS } from '@deepseek-ai/dsh-agent-loop' @@ -17,6 +18,12 @@ import { MockAdapter, textResponse } from './mock-adapter.ts' import { PtcRuntime } from '@deepseek-ai/dsh-ptc-runtime' import type { PtcRunRequest, PtcRunResult } from '@deepseek-ai/dsh-ptc-runtime' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'p': { kind: 'p' } & ContextFormed + } +} + async function harness(adapter: MockAdapter, maxParallelToolCalls?: number) { const ctx = new Context() await ctx.plugin(LlmRuntime) @@ -406,7 +413,7 @@ describe('tool-call scheduler: ordered middleware and additional contexts', () = ctx.tools.register(gated.tool) ctx.on('tools/post-execute', async (exec, _result): Promise => ({ kind: 'accept', additionalContexts: [createUserMessage({ - content: [{ type: 'text', text: `ctx-${exec.callId}` }], source: { kind: 'plugin', plugin: 'p' }, + content: [{ type: 'text', text: `ctx-${exec.callId}` }], source: { kind: 'p' }, })] })) const agent = await ctx.agentLoop.create(SessionId('a1'), { provider: 'mock', model: 'mock' }) @@ -416,11 +423,11 @@ describe('tool-call scheduler: ordered middleware and additional contexts', () = await waitForIdle(ctx, agent) const log = events(agent) - const contextTexts = log.filter(e => e.type === 'user/message' && e.data.source.kind === 'plugin') + const contextTexts = log.filter(e => e.type === 'user/message' && e.data.source.kind !== 'user') .map(e => ((e.data as { content: { text: string }[] }).content[0]!).text) expect(contextTexts).toEqual(['ctx-c1', 'ctx-c2']) const lastResult = log.findLastIndex(e => e.type === 'tool/result') - const firstContext = log.findIndex(e => e.type === 'user/message' && e.data.source.kind === 'plugin') + const firstContext = log.findIndex(e => e.type === 'user/message' && e.data.source.kind !== 'user') expect(lastResult).toBeLessThan(firstContext) }) @@ -546,7 +553,7 @@ describe('tool-call scheduler: abort handling', () => { ctx.on('tools/post-execute', async (exec, _result, next): Promise => ({ ...await next(), additionalContexts: [createUserMessage({ - content: [{ type: 'text', text: `ctx-${exec.callId}` }], source: { kind: 'plugin', plugin: 'p' }, + content: [{ type: 'text', text: `ctx-${exec.callId}` }], source: { kind: 'p' }, })], })) const agent = await ctx.agentLoop.create(SessionId('a1'), { provider: 'mock', model: 'mock' }) @@ -581,7 +588,7 @@ describe('tool-call scheduler: abort handling', () => { }, ]) const settled = events(agent).filter(e => e.type === 'tool/result' - || (e.type === 'user/message' && e.data.source.kind === 'plugin')) + || (e.type === 'user/message' && e.data.source.kind !== 'user')) expect(settled.map(e => e.type)) .toEqual(['tool/result', 'tool/result', 'tool/result', 'tool/result']) expect(agent.inbox.nextStep.map(message => message.content[0])) @@ -596,7 +603,7 @@ describe('tool-call scheduler: abort handling', () => { expect(events(agent).flatMap(e => e.type === 'user/message' - && e.data.source.kind === 'plugin' + && e.data.source.kind !== 'user' && e.data.content[0]?.type === 'text' ? [e.data.content[0].text] : [])) diff --git a/packages/core/agent/src/model-selection.ts b/packages/core/agent/src/model-selection.ts index 172423afc0..8921bc12a4 100644 --- a/packages/core/agent/src/model-selection.ts +++ b/packages/core/agent/src/model-selection.ts @@ -11,6 +11,12 @@ import { type ReasoningEffortId, } from '@deepseek-ai/dsh-llm' import type { PreStepDecision } from './runtime-types.ts' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'model-selection': { kind: 'model-selection' } & ContextFormed + } +} /** Complete provider, model, and optional reasoning effort selected for one live Agent. */ export interface ModelSelection { @@ -47,9 +53,8 @@ function modelSwitchNotice(previous: ModelSelection, selected: ModelSelection) { text: `[model changed: assistant turns above this point were generated by ${from}; the session continues with ${to}]`, }], source: { - kind: 'plugin' as const, - plugin: 'model-selection', - form: 'notice' as const, + kind: 'model-selection', + form: 'notice', summary: boundContextSummary(`${from} → ${to}`), }, }) diff --git a/packages/core/agent/tests/model-selection.spec.ts b/packages/core/agent/tests/model-selection.spec.ts index 5bddd71019..27b2a7bffd 100644 --- a/packages/core/agent/tests/model-selection.spec.ts +++ b/packages/core/agent/tests/model-selection.spec.ts @@ -32,7 +32,7 @@ function expectedNotice(from: string, to: string) { type: 'text', text: `[model changed: assistant turns above this point were generated by ${from}; the session continues with ${to}]`, }], - source: { kind: 'plugin', plugin: 'model-selection', form: 'notice', summary: `${from} → ${to}` }, + source: { kind: 'model-selection', form: 'notice', summary: `${from} → ${to}` }, } } diff --git a/packages/core/session/src/index.ts b/packages/core/session/src/index.ts index 536e686bb9..c6df35d529 100644 --- a/packages/core/session/src/index.ts +++ b/packages/core/session/src/index.ts @@ -357,9 +357,8 @@ function assertMessageEventShape(event: Record, subject: string } const sourceRecord = source as Record if (type === 'system/message') { - if (sourceRecord['kind'] !== 'plugin' || typeof sourceRecord['plugin'] !== 'string' - || sourceRecord['plugin'] === '') { - throw new Error(`${subject} message must have plugin source`) + if (sourceRecord['kind'] !== 'system-prompt') { + throw new Error(`${subject} message must have system-prompt source`) } return } diff --git a/packages/core/session/tests/canonical-envelopes.spec.ts b/packages/core/session/tests/canonical-envelopes.spec.ts index c9e6fa8d84..1c52750edb 100644 --- a/packages/core/session/tests/canonical-envelopes.spec.ts +++ b/packages/core/session/tests/canonical-envelopes.spec.ts @@ -80,6 +80,21 @@ const invalidData = [ ] describe('canonical event payload acceptance', () => { + it('restores system prompts only with system-prompt producer attribution', () => { + const message = createSystemMessage('prompt') + const event: SessionEvent<'system/message'> = { + type: 'system/message', seq: SessionSeq(0), time: 1, surfaceOp: 'append', + data: { turn: 1, step: 1, message }, + } + for (const accept of [entryPaths.seed!, entryPaths.restore!, entryPaths.adopt!, entryPaths.snapshot!]) { + expect(() => accept(structuredClone(event))).not.toThrow() + for (const source of [{ kind: 'runtime-context' }, { kind: 'plugin', plugin: '@deepseek-ai/dsh-system-prompt' }, { kind: 'user' }]) { + const invalid = { ...event, data: { ...event.data, message: { ...message, source } } } + expect(() => accept(invalid as unknown as SessionEvent)).toThrow(/system-prompt source/) + } + } + }) + for (const [path, accept] of Object.entries(entryPaths)) { describe(path, () => { it.each(invalidData)('rejects $name with a located error', ({ event, rule }) => { @@ -107,7 +122,7 @@ describe('canonical event payload acceptance', () => { } it('preserves nested header, source, and data extras without normalizing accepted events', () => { - const message = createSystemMessage('prompt', 'fixture') + const message = createSystemMessage('prompt') const events: SessionEvent[] = [ requestEvent({ header: { config, extra: { nested: [true, null] } }, reason: 'initial', extra: ['retained'] }), { type: 'system/message', seq: SessionSeq(0), time: 1, surfaceOp: 'append', data: { @@ -295,9 +310,9 @@ describe('canonical event-local surface metadata', () => { it('requires system placement and preserves system data and source-event references on head replacements', () => { const session = Session.create(id) - const data = { turn: 1, step: 1, message: createSystemMessage('head', 'fixture'), extra: { nested: true } } + const data = { turn: 1, step: 1, message: createSystemMessage('head'), extra: { nested: true } } const head = session.append('system/message', data, { surfaceOp: 'append' }) - const next = session.append('system/message', { ...data, message: createSystemMessage('next', 'fixture') }, { + const next = session.append('system/message', { ...data, message: createSystemMessage('next') }, { surfaceOp: { op: 'replace', startSeq: head.seq, endSeq: head.seq }, sourceEventSeqs: [head.seq], }) expect(next.data).toEqual({ ...data, message: next.data.message }) diff --git a/packages/core/session/tests/derived-cache.spec.ts b/packages/core/session/tests/derived-cache.spec.ts index 21d2b7153b..d37ea4e190 100644 --- a/packages/core/session/tests/derived-cache.spec.ts +++ b/packages/core/session/tests/derived-cache.spec.ts @@ -1,4 +1,5 @@ import { createUserMessage, createMessage } from '@deepseek-ai/dsh-llm' +import type { MessageSource } from '@deepseek-ai/dsh-llm' /** * Derived-message cache contract against a scratch oracle: project new nodes * once, rebuild on surface replacements, return fresh arrays over shared @@ -8,6 +9,13 @@ import { createUserMessage, createMessage } from '@deepseek-ai/dsh-llm' import { describe, expect, it } from 'vitest' import { Session, SessionId } from '@deepseek-ai/dsh-session' +type CheckpointSource = Extract + +/** Build a typed checkpoint source for a derived-message fixture. */ +function checkpointSource(compactionId: string): CheckpointSource { + return { kind: 'compact-checkpoint', compactionId: compactionId as CheckpointSource['compactionId'] } +} + function userText(session: Session, text: string): void { session.append('user/message', createUserMessage({ content: [{ type: 'text', text }], source: { kind: 'user' }, @@ -65,7 +73,7 @@ describe('derived-message cache', () => { const nodes = session.surface.nodes session.append('user/message', createUserMessage({ - content: [{ type: 'text', text: 'summary' }], source: { kind: 'plugin', plugin: 'compact' }, + content: [{ type: 'text', text: 'summary' }], source: checkpointSource('derived-cache-compaction'), }), { surfaceOp: { op: 'replace', startSeq: nodes[0]!, endSeq: nodes[1]! }, sourceEventSeqs: [nodes[0]!, nodes[1]!] }) expect(session.deriveMessages()).toHaveLength(1) diff --git a/packages/core/session/tests/fork.spec.ts b/packages/core/session/tests/fork.spec.ts index feeda44e90..1fa38bc2e1 100644 --- a/packages/core/session/tests/fork.spec.ts +++ b/packages/core/session/tests/fork.spec.ts @@ -1,6 +1,7 @@ import { describe, expect, it } from 'vitest' import { Context } from '@deepseek-ai/cordis' import { createUserMessage, ToolCallId, createMessage } from '@deepseek-ai/dsh-llm' +import type { MessageSource } from '@deepseek-ai/dsh-llm' import SessionStore, { Session, SessionForkError, SessionId, SessionLogOffset, SessionSeq, TOOL_NOT_STARTED, TOOL_OUTCOME_UNKNOWN } from '@deepseek-ai/dsh-session' import type { SessionEvent, SurfaceEvent, TurnEndReason } from '@deepseek-ai/dsh-session' @@ -434,7 +435,10 @@ describe('fork boundaries around a surface replacement', () => { source.append('turn/start', { turn: 2 }) const replacement = source.append('user/message', createUserMessage({ content: [{ type: 'text', text: 'summary of earlier work' }], - source: { kind: 'plugin', plugin: 'compaction' }, + source: { + kind: 'compact-checkpoint', + compactionId: 'open-bracket' as Extract['compactionId'], + }, }), { surfaceOp: { op: 'replace', startSeq: replacedSeq, endSeq: replacedSeq }, sourceEventSeqs: [replacedSeq], diff --git a/packages/core/session/tests/invariant.spec.ts b/packages/core/session/tests/invariant.spec.ts index df34fdc3d7..85488b404e 100644 --- a/packages/core/session/tests/invariant.spec.ts +++ b/packages/core/session/tests/invariant.spec.ts @@ -2,10 +2,17 @@ import { describe, expect, it } from 'vitest' import { Context } from '@deepseek-ai/cordis' import { createScope, scopeTarget } from '@deepseek-ai/dsh-scope' import { createSystemMessage, createUserMessage, ToolCallId, createMessage, createToolResultMessage, freezeMessage } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' import SessionStore, { SessionId, SessionSeq, TOOL_NOT_STARTED } from '@deepseek-ai/dsh-session' import * as SessionInvariant from '@deepseek-ai/dsh-session/invariant' import InvariantRegistry, { InvariantError } from '@deepseek-ai/dsh-invariants' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'test': { kind: 'test' } & ContextFormed + } +} + async function setup(): Promise<{ ctx: Context; fiber: Awaited> }> { const ctx = new Context() await ctx.plugin(SessionStore) @@ -156,7 +163,7 @@ describe('session-log invariants', () => { const outside = (await setup()).ctx.sessions.create() expect(() => outside.append('user/message', createUserMessage({ content: [{ type: 'text', text: 'idle context' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, }), { surfaceOp: 'append' })).not.toThrow() // Route capacity is core execution state like the header beside it. expect(() => outside.append('request/context', { @@ -237,7 +244,7 @@ describe('session-log invariants', () => { it('requires a system/message to name the open step', async () => { const session = (await setup()).ctx.sessions.create() session.append('turn/start', { turn: 1 }) - const message = createSystemMessage('You are terse.', '@deepseek-ai/dsh-system-prompt') + const message = createSystemMessage('You are terse.') expect(() => session.append('system/message', { turn: 1, step: 1, message }, { surfaceOp: 'append' })) .toThrow(/open is turn 1\/step null/) session.append('step/start', { turn: 1, step: 1 }) diff --git a/packages/core/session/tests/session.spec.ts b/packages/core/session/tests/session.spec.ts index 6ed648f7d0..f0acfcb42d 100644 --- a/packages/core/session/tests/session.spec.ts +++ b/packages/core/session/tests/session.spec.ts @@ -2,6 +2,7 @@ import { describe, expect, expectTypeOf, it, vi } from 'vitest' import { Context } from '@deepseek-ai/cordis' import { createSystemMessage, createUserMessage, ToolCallId, createMessage, createToolResultMessage, MessageId, ReasoningEffortId } from '@deepseek-ai/dsh-llm' import type { ContentBlock } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' import SessionStore, { adoptSessionEvent, SESSION_FORMAT_VERSION, @@ -14,6 +15,13 @@ import SessionStore, { } from '@deepseek-ai/dsh-session' import type { CreateSessionOptions, SessionEventType, SessionHeader, SessionSurface } from '@deepseek-ai/dsh-session' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'test': { kind: 'test' } & ContextFormed + 'watcher': { kind: 'watcher' } & ContextFormed + } +} + describe('Session', () => { it('exposes one stable readonly surface view', () => { const session = Session.create(SessionId('surface-view')) @@ -93,7 +101,7 @@ describe('Session', () => { const session = Session.create(SessionId('s2')) session.append('user/message', createUserMessage({ content: [{ type: 'text', text: 'file changed: a.ts' }], - source: { kind: 'plugin', plugin: 'watcher' }, + source: { kind: 'watcher' }, }), { surfaceOp: 'append' }) session.append('user/message', createUserMessage({ content: [{ type: 'text', text: 'focus on tests' }], @@ -111,13 +119,14 @@ describe('Session', () => { const session = Session.create(SessionId('s2-raw')) const message = createUserMessage({ content: [{ type: 'text', text: 'Additional instructions from: pkg/AGENTS.md' }], - source: { kind: 'plugin', plugin: 'agent-instructions' }, + source: { kind: 'agent-instructions', form: 'instructions', changes: [] }, }) session.append('user/message', message, { surfaceOp: 'append' }) expect(session.deriveMessages()).toEqual([message]) const event = session.snapshotEvents()[0] - expect(event?.type === 'user/message' && event.data.source).toEqual({ kind: 'plugin', plugin: 'agent-instructions' }) + expect(event?.type === 'user/message' && event.data.source) + .toEqual({ kind: 'agent-instructions', form: 'instructions', changes: [] }) }) it('replays identically from a seeded event log', () => { @@ -360,7 +369,7 @@ describe('Session', () => { data: { turn: 1, step: 1, - message: { ...user, id: 'system', source: { kind: 'plugin', plugin: 'prompt' } }, + message: { ...user, id: 'system', source: { kind: 'system-prompt' } }, }, }, message: 'message must have role "system"', @@ -372,10 +381,10 @@ describe('Session', () => { data: { turn: 1, step: 1, - message: { ...user, id: 'system', role: 'system', source: { kind: 'plugin', plugin: '' } }, + message: { ...user, id: 'system', role: 'system', source: { kind: 'runtime-context' } }, }, }, - message: 'message must have plugin source', + message: 'message must have system-prompt source', }, { name: 'tool role', @@ -477,7 +486,7 @@ describe('Session', () => { data: { turn: 1, step: 1, - message: createSystemMessage('You are terse.', '@deepseek-ai/dsh-system-prompt'), + message: createSystemMessage('You are terse.'), }, } as unknown as SessionEvent const adopted = adoptSessionEvent(event) @@ -1621,7 +1630,7 @@ describe('SessionStore', () => { expect(() => session.append('user/message', createUserMessage({ content: [{ type: 'text', text: 'replacement' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, }), { surfaceOp: { op: 'replace', startSeq: SessionSeq(2), endSeq: SessionSeq(2) }, sourceEventSeqs: [SessionSeq(2)], diff --git a/packages/core/session/tests/surface.spec.ts b/packages/core/session/tests/surface.spec.ts index bf95a59c17..c6a2944d30 100644 --- a/packages/core/session/tests/surface.spec.ts +++ b/packages/core/session/tests/surface.spec.ts @@ -13,16 +13,30 @@ import { } from '@deepseek-ai/dsh-session' import { SurfaceManager } from '@deepseek-ai/dsh-session/surface' import { + MessageId, + ToolCallId, createMessage, createSystemMessage, createToolResultMessage, createUserMessage, freezeMessage, - ToolCallId, - MessageId, } from '@deepseek-ai/dsh-llm' +import type { ContextFormed, MessageSource } from '@deepseek-ai/dsh-llm' + +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'test': { kind: 'test' } & ContextFormed + 'watcher': { kind: 'watcher' } & ContextFormed + } +} type TestSurfaceOp = 'append' | { op: 'replace'; startSeq: number; endSeq: number } +type CheckpointSource = Extract + +/** Build a typed checkpoint source for a surface replacement fixture. */ +function checkpointSource(compactionId: string): CheckpointSource { + return { kind: 'compact-checkpoint', compactionId: compactionId as CheckpointSource['compactionId'] } +} function surfaceOp(value: TestSurfaceOp): SurfaceEvent['surfaceOp'] { return value === 'append' @@ -33,7 +47,7 @@ function surfaceOp(value: TestSurfaceOp): SurfaceEvent['surfaceOp'] { function replacementMessage(text: string) { return createUserMessage({ content: [{ type: 'text', text }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, }) } @@ -689,7 +703,7 @@ describe('deriveMessages with surface', () => { it('injected-context and user messages appear on surface', () => { const s = Session.create(SessionId('ctx')) s.append('user/message', createUserMessage({ - content: [{ type: 'text', text: 'file changed' }], source: { kind: 'plugin', plugin: 'watcher' }, + content: [{ type: 'text', text: 'file changed' }], source: { kind: 'watcher' }, }), { surfaceOp: 'append' }) s.append('user/message', createUserMessage({ content: [{ type: 'text', text: 'focus' }], @@ -711,7 +725,7 @@ describe('Session.append surface opts', () => { 'user/message', createUserMessage({ content: [{ type: 'text', text: 'h' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, }), { surfaceOp: 'append', sourceEventSeqs: sourceSeqs(0, 1) }, ) @@ -832,7 +846,7 @@ describe('surface type guards', () => { it('splits surface events into append-origin and replacement by their marker', () => { const s = surfaceSession() s.append('user/message', createUserMessage({ - content: [{ type: 'text', text: 'checkpoint' }], source: { kind: 'plugin', plugin: 'compact' }, + content: [{ type: 'text', text: 'checkpoint' }], source: checkpointSource('surface-compaction-1'), }), { surfaceOp: surfaceOp({ op: 'replace', startSeq: 1, endSeq: 2 }), sourceEventSeqs: sourceSeqs(1, 2) }) const appended = s.snapshotEvents().find(e => e.type === 'user/message')! const replacement = s.snapshotEvents().at(-1)! @@ -880,7 +894,7 @@ describe('SurfaceManager.replaceGeneration', () => { const nodes = s.surface.nodes s.append('user/message', createUserMessage({ - content: [{ type: 'text', text: 'summary' }], source: { kind: 'plugin', plugin: 'compact' }, + content: [{ type: 'text', text: 'summary' }], source: checkpointSource('surface-compaction-2'), }), { surfaceOp: { op: 'replace', startSeq: nodes[0]!, endSeq: nodes[1]! }, sourceEventSeqs: [nodes[0]!, nodes[1]!] }) expect(s.surface.replaceGeneration).toBe(1) }) @@ -892,7 +906,7 @@ describe('system/message surface node', () => { type: 'system/message', seq: SessionSeq(seq), time: seq, - data: { turn: 1, step: 1, message: createSystemMessage(text, 'test-plugin') }, + data: { turn: 1, step: 1, message: createSystemMessage(text) }, surfaceOp: surfaceOp(op), ...sources === undefined ? {} : { sourceEventSeqs: sourceSeqs(...sources) }, } @@ -912,13 +926,13 @@ describe('system/message surface node', () => { const s = Session.create(SessionId('sys')) s.append('turn/start', { turn: 1 }) s.append('step/start', { turn: 1, step: 1 }) - s.append('system/message', { turn: 1, step: 1, message: createSystemMessage('be brief', 'p') }, { surfaceOp: 'append' }) + s.append('system/message', { turn: 1, step: 1, message: createSystemMessage('be brief') }, { surfaceOp: 'append' }) s.append('user/message', createUserMessage({ content: [{ type: 'text', text: 'hi' }], source: { kind: 'user' } }), { surfaceOp: 'append' }) expect(s.deriveMessages().map(message => message.role)).toEqual(['system', 'user']) expect(s.deriveMessages()[0]?.content).toEqual([{ type: 'text', text: 'be brief' }]) const head = s.surface.nodes[0] as SessionSeq - s.append('system/message', { turn: 1, step: 1, message: createSystemMessage('', 'p') }, { + s.append('system/message', { turn: 1, step: 1, message: createSystemMessage('') }, { surfaceOp: { op: 'replace', startSeq: head, endSeq: head }, sourceEventSeqs: [head], }) @@ -954,11 +968,11 @@ describe('system/message surface node', () => { expect(plainHead.nodes).toEqual(sourceSeqs(2)) }) - it('rejects a seeded system/message with a non-system role or non-plugin source', () => { + it('rejects a seeded system/message with a non-system role or non-system-prompt source', () => { const good = systemEvent(0, 'v1') const badRole = { ...good, data: { ...good.data, message: { ...(good.data as { message: object }).message, role: 'user' } } } expect(() => Session.create(SessionId('bad-role'), [badRole as SessionEvent])).toThrow(/role "system"/) const badSource = { ...good, data: { ...good.data, message: { ...(good.data as { message: object }).message, source: { kind: 'user' } } } } - expect(() => Session.create(SessionId('bad-source'), [badSource as SessionEvent])).toThrow(/plugin source/) + expect(() => Session.create(SessionId('bad-source'), [badSource as SessionEvent])).toThrow(/system-prompt source/) }) }) diff --git a/packages/core/tools/src/ptc.ts b/packages/core/tools/src/ptc.ts index 7c7a80c6fe..5487ca7152 100644 --- a/packages/core/tools/src/ptc.ts +++ b/packages/core/tools/src/ptc.ts @@ -8,6 +8,12 @@ import { brandString } from '@deepseek-ai/dsh-brand' import { createUserMessage, HarnessError } from '@deepseek-ai/dsh-llm' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'code-mode': { kind: 'code-mode' } + } +} + import type { ContentBlock, ToolCallId, ToolSchema } from '@deepseek-ai/dsh-llm' import type { PtcBindingFunction, PtcRunResult, PtcRunSandbox, PtcRuntime } from '@deepseek-ai/dsh-ptc-runtime' import { approveEscalation, ESCALATION_TARGETS, validateEscalationArgs } from '@deepseek-ai/dsh-sandbox' @@ -632,7 +638,7 @@ export function createRunCodeTool(registry: ToolRuntime, options: RunCodeBridgeO if (!result.isError && result.content.some(block => block.type === 'image')) { exec.deferContext(createUserMessage({ content: result.content, - source: { kind: 'plugin', plugin: 'tools-ptc' }, + source: { kind: 'code-mode' }, })) } for (const context of result.additionalContexts ?? []) { diff --git a/packages/core/tools/tests/ptc.spec.ts b/packages/core/tools/tests/ptc.spec.ts index a4bf2e2182..154d945883 100644 --- a/packages/core/tools/tests/ptc.spec.ts +++ b/packages/core/tools/tests/ptc.spec.ts @@ -1,6 +1,7 @@ import { describe, expect, it, vi } from 'vitest' import { Context } from '@deepseek-ai/cordis' import { createUserMessage, ToolCallId } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' import type { ToolSchema } from '@deepseek-ai/dsh-llm' import { createScope } from '@deepseek-ai/dsh-scope' import type { Scope } from '@deepseek-ai/dsh-scope' @@ -17,6 +18,13 @@ import type { JsonValue } from '@deepseek-ai/dsh-util-values' import SandboxPolicy from '@deepseek-ai/dsh-sandbox-policy' import SessionProjections from '@deepseek-ai/dsh-session-projection' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'order-probe': { kind: 'order-probe' } & ContextFormed + 'test': { kind: 'test' } & ContextFormed + } +} + const testToolSignal = new AbortController().signal /** @@ -818,7 +826,7 @@ describe('the sub-dispatch scheduler (native concurrency contract)', () => { kind: 'accept' as const, additionalContexts: [createUserMessage({ content: [{ type: 'text' as const, text: `ctx:${String(postExec.callId)}` }], - source: { kind: 'plugin' as const, plugin: 'order-probe' }, + source: { kind: 'order-probe' as const }, })], } } @@ -1322,7 +1330,7 @@ describe('the run_code dispatch bridge', () => { kind: 'accept' as const, additionalContexts: [createUserMessage({ content: [{ type: 'text' as const, text: `context for ${exec.callId}` }], - source: { kind: 'plugin' as const, plugin: 'test' }, + source: { kind: 'test' as const }, })], }) } @@ -1339,12 +1347,12 @@ describe('the run_code dispatch bridge', () => { { role: 'user', content: [{ type: 'text', text: 'context for call-1:ptc:1' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, }, { role: 'user', content: [{ type: 'text', text: 'context for call-1:ptc:2' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, }, ]) }) @@ -1375,7 +1383,7 @@ describe('the run_code dispatch bridge', () => { expect(result.additionalContexts).toMatchObject([{ role: 'user', - source: { kind: 'plugin', plugin: 'tools-ptc' }, + source: { kind: 'code-mode' }, content: [ { type: 'text', text: 'image result' }, { type: 'image', attachment: { mediaType: 'image/png', bytes: 1, width: 1, height: 1 } }, @@ -1425,7 +1433,7 @@ describe('the run_code dispatch bridge', () => { kind: 'accept', additionalContexts: [createUserMessage({ content: [{ type: 'text', text: 'nested context' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, })], }) }) @@ -1441,7 +1449,7 @@ describe('the run_code dispatch bridge', () => { id: expect.any(String) as unknown, role: 'user', content: [{ type: 'text', text: 'nested context' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, }]) }) diff --git a/packages/core/tools/tests/tools.spec.ts b/packages/core/tools/tests/tools.spec.ts index 6caf233ce9..3166008acd 100644 --- a/packages/core/tools/tests/tools.spec.ts +++ b/packages/core/tools/tests/tools.spec.ts @@ -1,6 +1,7 @@ import { describe, expect, expectTypeOf, it } from 'vitest' import { Context } from '@deepseek-ai/cordis' import LlmRuntime, { createUserMessage, ToolCallId, HarnessError, type ContentBlock } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' import SessionStore, { Session, SessionId } from '@deepseek-ai/dsh-session' import SessionProjectionRegistry from '@deepseek-ai/dsh-session-projection' import SystemPrompt from '@deepseek-ai/dsh-system-prompt' @@ -15,6 +16,19 @@ import ToolRuntime, { } from '@deepseek-ai/dsh-tools' import type { JsonValue } from '@deepseek-ai/dsh-util-values' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'blocker': { kind: 'blocker' } & ContextFormed + 'child': { kind: 'child' } & ContextFormed + 'nested': { kind: 'nested' } & ContextFormed + 'nested-1': { kind: 'nested-1' } & ContextFormed + 'nested-2': { kind: 'nested-2' } & ContextFormed + 'post': { kind: 'post' } & ContextFormed + 'test': { kind: 'test' } & ContextFormed + 'wrapper': { kind: 'wrapper' } & ContextFormed + } +} + const testToolSignal = new AbortController().signal async function setup() { @@ -369,7 +383,7 @@ describe('ToolRuntime', () => { kind: 'accept', value: { text: 'policy value' }, additionalContexts: [createUserMessage({ - content: [{ type: 'text', text: 'value context' }], source: { kind: 'plugin', plugin: 'test' }, + content: [{ type: 'text', text: 'value context' }], source: { kind: 'test' }, })], } }) @@ -393,7 +407,7 @@ describe('ToolRuntime', () => { id: expect.any(String) as unknown, role: 'user', content: [{ type: 'text', text: 'value context' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, }], }) }) @@ -517,7 +531,7 @@ describe('ToolRuntime', () => { content: [{ type: 'text', text: 'wrapper content' }], meta: { wrapped: true }, additionalContexts: [createUserMessage({ - content: [{ type: 'text', text: 'wrapper context' }], source: { kind: 'plugin', plugin: 'test' }, + content: [{ type: 'text', text: 'wrapper context' }], source: { kind: 'test' }, })], })) @@ -531,7 +545,7 @@ describe('ToolRuntime', () => { id: expect.any(String) as unknown, role: 'user', content: [{ type: 'text', text: 'wrapper context' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, }], }) }) @@ -951,14 +965,14 @@ describe('ToolRuntime', () => { kind: 'block', feedback: [{ type: 'text', text: 'rejected' }], additionalContexts: [createUserMessage({ - content: [{ type: 'text', text: 'why it was rejected' }], source: { kind: 'plugin', plugin: 'test' }, + content: [{ type: 'text', text: 'why it was rejected' }], source: { kind: 'test' }, })], })) const result = await ctx.tools.execute({ signal: testToolSignal, callId: ToolCallId('c1'), name: 'echo', arguments: { text: 'hi' } }) expect(result.isError).toBe(true) expect(result.content[0]).toMatchObject({ text: 'rejected' }) - expect(result.additionalContexts).toMatchObject([{ content: [{ text: 'why it was rejected' }], source: { kind: 'plugin', plugin: 'test' } }]) + expect(result.additionalContexts).toMatchObject([{ content: [{ text: 'why it was rejected' }], source: { kind: 'test' } }]) }) it('post-execute additionalContexts ride on the result for the loop to buffer', async () => { @@ -967,11 +981,11 @@ describe('ToolRuntime', () => { ctx.on('tools/post-execute', async (_exec, _result, _next): Promise => ({ kind: 'accept', additionalContexts: [createUserMessage({ - content: [{ type: 'text', text: 'fyi' }], source: { kind: 'plugin', plugin: 'test' }, + content: [{ type: 'text', text: 'fyi' }], source: { kind: 'test' }, })] })) const result = await ctx.tools.execute({ signal: testToolSignal, callId: ToolCallId('c1'), name: 'echo', arguments: { text: 'hi' } }) - expect(result.additionalContexts).toMatchObject([{ content: [{ text: 'fyi' }], source: { kind: 'plugin', plugin: 'test' } }]) + expect(result.additionalContexts).toMatchObject([{ content: [{ text: 'fyi' }], source: { kind: 'test' } }]) }) it('preserves tool-deferred, execute-wrapper, and post-execute contexts in order', async () => { @@ -982,10 +996,10 @@ describe('ToolRuntime', () => { parameters: {}, async execute(_args, exec) { exec.deferContext(createUserMessage({ - content: [{ type: 'text', text: 'nested-1' }], source: { kind: 'plugin', plugin: 'nested-1' }, + content: [{ type: 'text', text: 'nested-1' }], source: { kind: 'nested-1' }, })) exec.deferContext(createUserMessage({ - content: [{ type: 'text', text: 'nested-2' }], source: { kind: 'plugin', plugin: 'nested-2' }, + content: [{ type: 'text', text: 'nested-2' }], source: { kind: 'nested-2' }, })) return [{ type: 'text', text: 'done' }] }, @@ -997,7 +1011,7 @@ describe('ToolRuntime', () => { additionalContexts: [ ...result.additionalContexts ?? [], createUserMessage({ - content: [{ type: 'text', text: 'wrapper' }], source: { kind: 'plugin', plugin: 'wrapper' }, + content: [{ type: 'text', text: 'wrapper' }], source: { kind: 'wrapper' }, }), ], } @@ -1008,7 +1022,7 @@ describe('ToolRuntime', () => { ...downstream, additionalContexts: [ createUserMessage({ - content: [{ type: 'text', text: 'post' }], source: { kind: 'plugin', plugin: 'post' }, + content: [{ type: 'text', text: 'post' }], source: { kind: 'post' }, }), ...downstream.additionalContexts ?? [], ], @@ -1018,10 +1032,10 @@ describe('ToolRuntime', () => { const result = await ctx.tools.execute({ signal: testToolSignal, callId: ToolCallId('composite'), name: 'composite', arguments: {} }) expect(result.additionalContexts?.map(context => context.source)).toEqual([ - { kind: 'plugin', plugin: 'nested-1' }, - { kind: 'plugin', plugin: 'nested-2' }, - { kind: 'plugin', plugin: 'wrapper' }, - { kind: 'plugin', plugin: 'post' }, + { kind: 'nested-1' }, + { kind: 'nested-2' }, + { kind: 'wrapper' }, + { kind: 'post' }, ]) }) @@ -1033,7 +1047,7 @@ describe('ToolRuntime', () => { parameters: {}, async execute(_args, exec) { exec.deferContext(createUserMessage({ - content: [{ type: 'text', text: 'nested' }], source: { kind: 'plugin', plugin: 'nested' }, + content: [{ type: 'text', text: 'nested' }], source: { kind: 'nested' }, })) throw new Error('outer failure') }, @@ -1041,18 +1055,18 @@ describe('ToolRuntime', () => { const failed = await ctx.tools.execute({ signal: testToolSignal, callId: ToolCallId('failed'), name: 'failing-composite', arguments: {} }) expect(failed.isError).toBe(true) - expect(failed.additionalContexts?.map(context => context.source)).toEqual([{ kind: 'plugin', plugin: 'nested' }]) + expect(failed.additionalContexts?.map(context => context.source)).toEqual([{ kind: 'nested' }]) ctx.on('tools/post-execute', async (): Promise => ({ kind: 'block', feedback: [{ type: 'text', text: 'blocked' }], additionalContexts: [createUserMessage({ - content: [{ type: 'text', text: 'block-only' }], source: { kind: 'plugin', plugin: 'blocker' }, + content: [{ type: 'text', text: 'block-only' }], source: { kind: 'blocker' }, })], })) const blocked = await ctx.tools.execute({ signal: testToolSignal, callId: ToolCallId('blocked'), name: 'failing-composite', arguments: {} }) expect(blocked.isError).toBe(true) - expect(blocked.additionalContexts?.map(context => context.source)).toEqual([{ kind: 'plugin', plugin: 'blocker' }]) + expect(blocked.additionalContexts?.map(context => context.source)).toEqual([{ kind: 'blocker' }]) }) it('composes pre + post waterfalls around dispatch (sandbox-wrap pattern)', async () => { @@ -1317,7 +1331,7 @@ describe('ToolRuntime', () => { isError: false, additionalContexts: [createUserMessage({ content: [{ type: 'text', text: 'wrapper context' }], - source: { kind: 'plugin', plugin: 'wrapper' }, + source: { kind: 'wrapper' }, })], } }) @@ -1337,7 +1351,7 @@ describe('ToolRuntime', () => { content: [{ type: 'text', text: 'Error: tool call aborted before dispatch' }], isError: true, error: { info: { name: 'AbortError', code: TOOL_ABORTED_BEFORE_DISPATCH } }, - additionalContexts: [{ source: { kind: 'plugin', plugin: 'wrapper' } }], + additionalContexts: [{ source: { kind: 'wrapper' } }], }) expect(dispatched).toBe(0) }) @@ -1350,7 +1364,7 @@ describe('ToolRuntime', () => { async execute(_args, exec) { exec.deferContext(createUserMessage({ content: [{ type: 'text', text: 'completed child work' }], - source: { kind: 'plugin', plugin: 'child' }, + source: { kind: 'child' }, })) return 'body complete' }, @@ -1375,7 +1389,7 @@ describe('ToolRuntime', () => { content: [{ type: 'text', text: 'Error: tool call aborted' }], isError: true, error: { info: { name: 'AbortError', code: TOOL_ABORTED } }, - additionalContexts: [{ source: { kind: 'plugin', plugin: 'child' } }], + additionalContexts: [{ source: { kind: 'child' } }], }) }) @@ -1387,7 +1401,7 @@ describe('ToolRuntime', () => { async execute(_args, exec) { exec.deferContext(createUserMessage({ content: [{ type: 'text', text: 'completed child work' }], - source: { kind: 'plugin', plugin: 'child' }, + source: { kind: 'child' }, })) return 'body complete' }, @@ -1402,7 +1416,7 @@ describe('ToolRuntime', () => { ...decision, additionalContexts: [createUserMessage({ content: [{ type: 'text', text: 'post context' }], - source: { kind: 'plugin', plugin: 'post' }, + source: { kind: 'post' }, })], } }) @@ -1419,8 +1433,8 @@ describe('ToolRuntime', () => { isError: true, error: { info: { name: 'AbortError', code: TOOL_ABORTED } }, additionalContexts: [ - { source: { kind: 'plugin', plugin: 'child' } }, - { source: { kind: 'plugin', plugin: 'post' } }, + { source: { kind: 'child' } }, + { source: { kind: 'post' } }, ], }) }) @@ -1592,7 +1606,7 @@ describe('ToolRuntime', () => { execute(_args, exec) { exec.deferContext(createUserMessage({ content: [{ type: 'text', text: 'nested outcome' }], - source: { kind: 'plugin', plugin: 'nested' }, + source: { kind: 'nested' }, })) entered.resolve(undefined) return release.promise @@ -1614,7 +1628,7 @@ describe('ToolRuntime', () => { await expect(pending).resolves.toMatchObject({ isError: true, error: { info: { name: 'AbortError', code: TOOL_ABORTED } }, - additionalContexts: [{ source: { kind: 'plugin', plugin: 'nested' } }], + additionalContexts: [{ source: { kind: 'nested' } }], }) }) @@ -1882,7 +1896,7 @@ describe('ToolRuntime', () => { value: 'short-circuited with context', additionalContexts: [createUserMessage({ content: [{ type: 'text', text: 'from around dispatch' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, })], })) @@ -1894,7 +1908,7 @@ describe('ToolRuntime', () => { id: expect.any(String) as unknown, role: 'user', content: [{ type: 'text', text: 'from around dispatch' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, }]) }) diff --git a/packages/experimental/auto-review/README.i18n.yaml b/packages/experimental/auto-review/README.i18n.yaml index 654d67557a..c35679716a 100644 --- a/packages/experimental/auto-review/README.i18n.yaml +++ b/packages/experimental/auto-review/README.i18n.yaml @@ -2,5 +2,5 @@ # side as of the last confirmed-consistent state. Both languages carry equal authority; # after editing either side, bring the other along and re-record with: # pnpm run verify-translation-pairing --write packages/experimental/auto-review/README.md -README.md: db4d1d3c5a8ace23f41b3d522824b3163156fc7a -README.zh.md: c4fd7e59b25f22adb4b1947fc0b27ff844c3ebf2 +README.md: 73ee9e5aaff00f1160f647218b5714b63c23684b +README.zh.md: 40fe6f48cae4854c5cfd5ea8f3ae4276dd540e82 diff --git a/packages/experimental/auto-review/README.md b/packages/experimental/auto-review/README.md index db4d1d3c5a..73ee9e5aaf 100644 --- a/packages/experimental/auto-review/README.md +++ b/packages/experimental/auto-review/README.md @@ -57,7 +57,7 @@ A denied call uses the ordinary tool card. The collapsed row identifies Auto rev [`cordis.patch.yml`](cordis.patch.yml) inserts the package itself as the `auto-review` row. [`src/index.ts`](src/index.ts) requires the LLM, permission, Session, and tools services, then installs the preset contribution and prepended pre-execute listener in one effect. The [permission owner](../../interaction/permission-presets/README.md) supplies the current identity and process catalog; Auto shares Full access's existing sandbox and approval values without changing tool definitions. -The reviewer reconstructs five sections from the current Session surface and pending execution: fixed policy, cwd-only environment, sourced project constraints, filtered sourced history, and the complete pending action. Native schema comes from the latest request header. A PTC binding freezes its schema and carries it through the scheduler into transient execution metadata; start and settle events never serialize description or parameters. Main-agent `system/message` nodes, assistant text and reasoning, and tool results are excluded. [The decision record](../../../.agents/notes/implemented/feature/2026-08-28-auto-review.md) owns authority, lifecycle, and child-inheritance rationale. +The reviewer reconstructs five sections from the current Session surface and pending execution: fixed policy, cwd-only environment, sourced project constraints, filtered sourced history, and the complete pending action. Native schema comes from the latest request header. A PTC binding freezes its schema and carries it through the scheduler into transient execution metadata; start and settle events never serialize description or parameters. Main-agent `system/message` nodes, assistant text and reasoning, and tool results are excluded. The outer review input is a frozen `RequestUserInput` without durable identity or source; retained history keeps its original source attribution in the review text. [The decision record](../../../.agents/notes/implemented/feature/2026-08-28-auto-review.md) owns authority, lifecycle, and child-inheritance rationale. Unloading closes selection and review admission, migrates live Auto Sessions to Full access through the existing preset writer, then aborts and drains reviews before withdrawing the listener and contribution. Knobs and persistent terminals survive that migration. A persisted Auto Session cannot publish without the complete integration; reopening it after installation is an explicit user action. Reinstalling the layer restores the option but does not switch live Sessions back to Auto. diff --git a/packages/experimental/auto-review/README.zh.md b/packages/experimental/auto-review/README.zh.md index c4fd7e59b2..40fe6f48ca 100644 --- a/packages/experimental/auto-review/README.zh.md +++ b/packages/experimental/auto-review/README.zh.md @@ -57,7 +57,7 @@ Auto 在每个受支持调用的 body 执行前审查一次,包括每个已开 [`cordis.patch.yml`](cordis.patch.yml)把本包自身插入为 `auto-review` 行。[`src/index.ts`](src/index.ts)要求 LLM、permission、Session 与 tools 服务,然后在同一个 effect 中安装 preset contribution 和置前的 pre-execute listener。[权限 owner](../../interaction/permission-presets/README.zh.md)提供当前身份和进程目录;Auto 共用 Full access 既有沙箱与审批值,不改变工具定义。 -Reviewer 从当前 Session surface 与待执行调用重建五个分区:固定策略、仅 cwd 的环境、带来源的项目约束、过滤后带来源的历史,以及完整待审动作。原生 schema 来自最新 request header。PTC binding 冻结其 schema,经由调度器传入临时执行元数据;开始与结算事件都不序列化描述或参数 schema。主 agent 的 `system/message` 节点、assistant 正文与 reasoning、tool results 全部排除。[决策记录](../../../.agents/notes/implemented/feature/2026-08-28-auto-review.zh.md)拥有权威、生命周期与 child 继承的理由。 +Reviewer 从当前 Session surface 与待执行调用重建五个分区:固定策略、仅 cwd 的环境、带来源的项目约束、过滤后带来源的历史,以及完整待审动作。原生 schema 来自最新 request header。PTC binding 冻结其 schema,经由调度器传入临时执行元数据;开始与结算事件都不序列化描述或参数 schema。主 agent 的 `system/message` 节点、assistant 正文与 reasoning、tool results 全部排除。外层评审输入是冻结的 `RequestUserInput`,不含持久身份或来源;保留历史在评审文本中仍携带原始来源。[决策记录](../../../.agents/notes/implemented/feature/2026-08-28-auto-review.zh.md)拥有权威、生命周期与 child 继承的理由。 卸载时先关闭选择与 review admission,经由既有 preset writer 将存活 Auto Session 迁移到 Full access,再中止并等待在途 review 结清,最后撤回 listener 与 contribution。旋钮与持久终端在迁移中保持不变。持久 Auto Session 缺少完整 integration 时不能发布;安装后重新打开需要用户显式操作。重装只恢复选项,不把存活 Session 切回 Auto。 diff --git a/packages/experimental/auto-review/src/index.ts b/packages/experimental/auto-review/src/index.ts index ff90ff61f2..14c9f67ff5 100644 --- a/packages/experimental/auto-review/src/index.ts +++ b/packages/experimental/auto-review/src/index.ts @@ -11,7 +11,6 @@ import type { Agent } from '@deepseek-ai/dsh-agent' import type {} from '@deepseek-ai/dsh-agent-instructions' import { BlockAssembler, - createUserMessage, type ContentBlock, type GenerateOptions, type MessageSource, @@ -185,7 +184,8 @@ function isProjectInstruction(source: MessageSource): boolean { /** Whether this source is a compaction checkpoint. */ function isCheckpoint(source: MessageSource): boolean { - return source.kind === 'plugin' && source.plugin === 'compact' + const kind: string = source.kind + return kind === 'compact-checkpoint' } /** Whether this message was durably attributed to the child's direct parent. */ @@ -615,14 +615,15 @@ async function classifyRisk( signal: AbortSignal, ): Promise { const snapshot = snapshotAutoReview(agent, exec) + // This review prompt is sent only through ctx.llm.stream and never enters a Session log. const options: GenerateOptions = deepFreeze({ provider: snapshot.provider, model: snapshot.model, system: REVIEW_POLICY, - messages: [createUserMessage({ + messages: [{ + role: 'user', content: [{ type: 'text', text: reviewUserText(snapshot) }], - source: { kind: 'plugin', plugin: 'dsh-experimental-auto-review' }, - })], + }], temperature: 0, signal, }) diff --git a/packages/experimental/auto-review/tests/auto-review.e2e.ts b/packages/experimental/auto-review/tests/auto-review.e2e.ts index dfd32a85a4..69de19fa97 100644 --- a/packages/experimental/auto-review/tests/auto-review.e2e.ts +++ b/packages/experimental/auto-review/tests/auto-review.e2e.ts @@ -171,9 +171,9 @@ function orchestrate(ctx: Context, real: boolean) { return next() }) ctx.on('llm/stream', (options, next) => { - const source = options.messages[0]?.source - if (options.system?.startsWith('REVIEW_POLICY\n') === true - && source?.kind === 'plugin' && source.plugin === 'dsh-experimental-auto-review') { + if (options.system?.startsWith('REVIEW_POLICY\n') === true) { + expect(options.messages[0]).not.toHaveProperty('source') + expect(options.messages[0]).not.toHaveProperty('id') if (expected === undefined || mainAgent === undefined) throw new Error('Unexpected reviewer call outside a case') reviewCalls += 1 expect(options.provider === PROVIDER && options.model === mainAgent.options.model).toBe(true) diff --git a/packages/experimental/auto-review/tests/auto-review.spec.ts b/packages/experimental/auto-review/tests/auto-review.spec.ts index af64fcdc91..6007f789b3 100644 --- a/packages/experimental/auto-review/tests/auto-review.spec.ts +++ b/packages/experimental/auto-review/tests/auto-review.spec.ts @@ -278,7 +278,7 @@ describe('native review request', () => { }) appendHeader(session, [loggedSchema]) session.append('system/message', { - turn: 1, step: 1, message: createSystemMessage('main-system secret', 'main'), + turn: 1, step: 1, message: createSystemMessage('main-system secret'), }, { surfaceOp: 'append' }) session.append('user/message', createUserMessage({ content: [ @@ -298,7 +298,7 @@ describe('native review request', () => { appendUser(session, 'parent-authored evidence', { kind: 'user' }) session.append('user/message', createUserMessage({ content: [{ type: 'text', text: 'plugin evidence' }], - source: { kind: 'plugin', plugin: 'evidence' }, + source: { kind: 'test' }, }), { surfaceOp: 'append' }) appendUser(session, 'checkpoint authority', compactCheckpointSource(CompactionId('checkpoint-1'))) appendUser(session, 'project authority', { @@ -382,7 +382,9 @@ describe('native review request', () => { expect(request.maxTokens).toBeUndefined() expect(request.tools).toBeUndefined() expect(request.messages).toHaveLength(1) - expect(request.messages[0]?.source).toEqual({ kind: 'plugin', plugin: 'dsh-experimental-auto-review' }) + expect(request.messages[0]).not.toHaveProperty('source') + expect(request.messages[0]).not.toHaveProperty('id') + expect(Object.isFrozen(request.messages[0]?.content[0])).toBe(true) expect(Object.isFrozen(request)).toBe(true) const sections = requestSections(request) @@ -420,7 +422,7 @@ describe('native review request', () => { source: compactCheckpointSource(CompactionId('checkpoint-1')), }), expect.objectContaining({ - kind: 'user-message', role: 'fact', source: { kind: 'plugin', plugin: 'evidence' }, + kind: 'user-message', role: 'fact', source: { kind: 'test' }, content: [{ type: 'text', text: 'plugin evidence' }], }), expect.objectContaining({ diff --git a/packages/experimental/tool-agent-team/tests/tool-team.spec.ts b/packages/experimental/tool-agent-team/tests/tool-team.spec.ts index 0f6182d149..2c1f188bc2 100644 --- a/packages/experimental/tool-agent-team/tests/tool-team.spec.ts +++ b/packages/experimental/tool-agent-team/tests/tool-team.spec.ts @@ -357,7 +357,7 @@ describe('dsh-tool-team', () => { if (identity === undefined) throw new Error('expected initial teammate reminder') agent.session.append('user/message', createUserMessage({ content: [{ type: 'text', text: 'Compacted earlier context.' }], - source: { kind: 'plugin', plugin: 'test-compaction' }, + source: { kind: 'test-compaction' }, }), { surfaceOp: { op: 'replace', startSeq: identity.seq, endSeq: identity.seq }, sourceEventSeqs: [identity.seq], @@ -379,7 +379,7 @@ describe('dsh-tool-team', () => { await using persisted = await ctx.sessionPersistence.open(childId, 'read') const { events } = await persisted.read() expect(events.filter(event => event.type === 'user/message' - && event.data.source.kind === 'plugin' && event.data.source.plugin === toolTeam.name)).toHaveLength(0) + && (event.data.source as { readonly kind?: unknown }).kind === toolTeam.name)).toHaveLength(0) }) it.each(['reject', 'empty', 'abort'] as const)('does not revive a teammate step after %s', async (mode) => { diff --git a/packages/extensions/cordis-host-runner/src/index.ts b/packages/extensions/cordis-host-runner/src/index.ts index db56327a2d..3177924f88 100644 --- a/packages/extensions/cordis-host-runner/src/index.ts +++ b/packages/extensions/cordis-host-runner/src/index.ts @@ -9,6 +9,12 @@ import type { Fiber } from '@deepseek-ai/cordis' import z from '@deepseek-ai/schemastery' import type { Agent } from '@deepseek-ai/dsh-agent' import { createUserMessage } from '@deepseek-ai/dsh-llm' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'cordis-host-runner': { kind: 'cordis-host-runner' } + } +} + import { TypertRemoteService, Remote } from '@deepseek-ai/dsh-typert-protocol' import type { JsonValue } from '@deepseek-ai/dsh-util-values' import { isPlugin, normalizeHandler } from './guard.ts' @@ -1042,7 +1048,7 @@ export class DynamicCordisRunnerService extends TypertRemoteService { } agent.steer(createUserMessage({ content: [{ type: 'text', text }], - source: { kind: 'plugin', plugin: 'cordis-host-runner' }, + source: { kind: 'cordis-host-runner' }, })) } @@ -1062,7 +1068,7 @@ export class DynamicCordisRunnerService extends TypertRemoteService { + `entryAbdicated: ${failure.abdicated}\n` + 'Report the Client render failure to the user; the definition can be stopped through the Cordis panel.', }], - source: { kind: 'plugin', plugin: 'cordis-host-runner' }, + source: { kind: 'cordis-host-runner' }, })) } @@ -1086,7 +1092,7 @@ export class DynamicCordisRunnerService extends TypertRemoteService { + 'The Plugin remains running. Report the Host handler failure to the user. If the handler needs a Service, either declare ' + 'that Service in the returned Plugin inject list or read it with ctx.get(name) and handle undefined.', }], - source: { kind: 'plugin', plugin: 'cordis-host-runner' }, + source: { kind: 'cordis-host-runner' }, })) } @@ -1109,7 +1115,7 @@ export class DynamicCordisRunnerService extends TypertRemoteService { + `(${run.pluginRunId}) after activation.\n${formatErrorDetails(failure)}\n` + 'The Plugin remains running. Report the guard rejection to the user; it can be stopped through the Cordis panel.', }], - source: { kind: 'plugin', plugin: 'cordis-host-runner' }, + source: { kind: 'cordis-host-runner' }, })) } /* jscpd:ignore-end */ @@ -1149,7 +1155,7 @@ export class DynamicCordisRunnerService extends TypertRemoteService { if (agents?.get(agent.id) !== agent) return agent.inject(createUserMessage({ content: [{ type: 'text', text }], - source: { kind: 'plugin', plugin: 'cordis-host-runner' }, + source: { kind: 'cordis-host-runner' }, })) } diff --git a/packages/extensions/tool-cordis/src/api-catalog.ts b/packages/extensions/tool-cordis/src/api-catalog.ts index bb0a11282a..a4cb8be029 100644 --- a/packages/extensions/tool-cordis/src/api-catalog.ts +++ b/packages/extensions/tool-cordis/src/api-catalog.ts @@ -3725,7 +3725,7 @@ export const EVENT_API: readonly EventApiEntry[] = [ signature: '\'llm/stream\'(this: LlmRuntime, options: GenerateOptions, next: () => AsyncIterable): AsyncIterable', summary: 'Waterfall around every streaming model call (retry, replay, routing).', description: 'Waterfall around every streaming model call (retry, replay, routing). Bound to the LlmRuntime; call `next()` to reach the resolved adapter\'s stream, or yield your own chunks to short-circuit.', - parameters: [{ name: 'options', description: 'the full request. A LOOP-built request carries the process-local {@link markAgentLoopRequest} identity and arrives deep-frozen (mutation throws): its content is a pure function of the session log (the reconstructability Agent Note), so listeners read it, never rewrite it. Hand-built calls do not carry that marker; their messages already obey the immutable creation contract.' }], + parameters: [{ name: 'options', description: 'the full request. A LOOP-built request carries the process-local {@link markAgentLoopRequest} identity and arrives deep-frozen (mutation throws): its content is a pure function of the session log (the reconstructability Agent Note), so listeners read it, never rewrite it. Hand-built calls do not carry that marker; callers own their request inputs and must keep them unchanged until the stream settles.' }], }, { name: 'permission-presets/catalog-changed', @@ -4383,14 +4383,6 @@ export const TYPE_API: readonly TypeApiEntry[] = [ name: 'ContentBlockType', declaration: 'export type ContentBlockType = keyof ContentBlockMap;', }, - { - name: 'ContextFormed', - declaration: 'export type ContextFormed = {\n readonly form?: never;\n} | {\n readonly form: \'instructions\';\n} | {\n readonly form: \'catalog\';\n} | {\n readonly form: \'snapshot\';\n readonly sections: readonly ContextSnapshotSection[];\n} | {\n readonly form: \'notice\';\n readonly summary: string;\n} | {\n readonly form: \'relay\';\n} | {\n readonly form: \'recall\';\n};', - }, - { - name: 'ContextSnapshotSection', - declaration: 'export interface ContextSnapshotSection {\n readonly name: string;\n readonly text: string;\n}', - }, { name: 'ContinuableCreateRequest', declaration: 'export interface ContinuableCreateRequest {\n readonly sessionId: SessionId;\n readonly parent: Agent;\n readonly signal: AbortSignal;\n}', @@ -4753,7 +4745,7 @@ export const TYPE_API: readonly TypeApiEntry[] = [ }, { name: 'GenerateOptions', - declaration: 'export interface GenerateOptions {\n provider: string;\n model: string;\n reasoningEffort?: ReasoningEffortId;\n messages: Message[];\n system?: string;\n tools?: ToolSchema[];\n temperature?: number;\n maxTokens?: number;\n stop?: string[];\n signal?: AbortSignal;\n sessionId?: Branded<\'SessionId\'>;\n purpose?: \'compaction\' | \'session-title\';\n}', + declaration: 'export interface GenerateOptions {\n provider: string;\n model: string;\n reasoningEffort?: ReasoningEffortId;\n messages: RequestMessage[];\n system?: string;\n tools?: ToolSchema[];\n temperature?: number;\n maxTokens?: number;\n stop?: string[];\n signal?: AbortSignal;\n sessionId?: Branded<\'SessionId\'>;\n purpose?: \'compaction\' | \'session-title\';\n}', }, { name: 'GenericCallView', @@ -5185,7 +5177,7 @@ export const TYPE_API: readonly TypeApiEntry[] = [ }, { name: 'MessageSourceMap', - declaration: 'export interface MessageSourceMap {\n user: {\n kind: \'user\';\n };\n plugin: {\n kind: \'plugin\';\n plugin: string;\n } & ContextFormed;\n model: ModelMessageSource;\n tool: ToolMessageSource;\n}', + declaration: 'export interface MessageSourceMap {\n user: {\n kind: \'user\';\n };\n model: ModelMessageSource;\n tool: ToolMessageSource;\n \'system-prompt\': SystemPromptMessageSource;\n}', }, { name: 'ModelCatalog', @@ -5539,10 +5531,18 @@ export const TYPE_API: readonly TypeApiEntry[] = [ name: 'RequestImageAttachment', declaration: 'export interface RequestImageAttachment {\n variantId: ImageVariantId;\n attachment: ImageAttachmentRef;\n data: Uint8Array;\n mediaType: ImageMediaType;\n bytes: number;\n width: number;\n height: number;\n depth: \'uchar\';\n space: \'srgb\';\n hasAlpha: boolean;\n}', }, + { + name: 'RequestMessage', + declaration: 'export type RequestMessage = Message | RequestUserInput;', + }, { name: 'RequestRunOutcome', declaration: 'export type RequestRunOutcome = \'approved\' | \'completed\' | \'rejected\' | \'cancelled\' | \'failed\';', }, + { + name: 'RequestUserInput', + declaration: 'export interface RequestUserInput {\n readonly role: \'user\';\n readonly content: UserMessage[\'content\'];\n readonly id?: never;\n readonly source?: never;\n}', + }, { name: 'ResolvedAlwaysRetryPolicy', declaration: 'export interface ResolvedAlwaysRetryPolicy extends ResolvedRetryBackoff {\n readonly mode: \'always\';\n}', @@ -6525,12 +6525,16 @@ export const TYPE_API: readonly TypeApiEntry[] = [ }, { name: 'SystemMessage', - declaration: 'export interface SystemMessage extends MessageBase {\n readonly role: \'system\';\n readonly source: MessageSourceMap[\'plugin\'];\n}', + declaration: 'export interface SystemMessage extends MessageBase {\n readonly role: \'system\';\n readonly source: MessageSourceMap[\'system-prompt\'];\n}', }, { name: 'SystemPrompt', declaration: 'export class SystemPrompt extends Service {\n static Config: z;\n constructor(ctx: Context, config: Config);\n section(section: PromptSection): () => void;\n getSectionOrder(name: PromptSectionOrderName): number;\n getContextOrder(name: PromptContextOrderName): number;\n context(context: PromptContext): () => void;\n suppressRuntimeContext(): () => void;\n tools(provider: (context: AssembleContext) => ToolProviderResult): () => void;\n variable(name: string, provider: (context: AssembleContext) => string | undefined): () => void;\n async assemble(context: AssembleContext = {}): Promise;\n}', }, + { + name: 'SystemPromptMessageSource', + declaration: 'export interface SystemPromptMessageSource {\n kind: \'system-prompt\';\n}', + }, { name: 'SystemPromptUpdate', declaration: 'export type SystemPromptUpdate = \'in-history\';', diff --git a/packages/fs/tool-fs-search/tests/tools.spec.ts b/packages/fs/tool-fs-search/tests/tools.spec.ts index 22511aef39..fd64cf16d3 100644 --- a/packages/fs/tool-fs-search/tests/tools.spec.ts +++ b/packages/fs/tool-fs-search/tests/tools.spec.ts @@ -15,6 +15,7 @@ import { Context } from '@deepseek-ai/cordis' import { createScope, type Scope } from '@deepseek-ai/dsh-scope' import { join, sep } from 'node:path' import { createUserMessage, ToolCallId } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' import SystemPrompt, { renderPrompt } from '@deepseek-ai/dsh-system-prompt' import ToolRuntime, { TOOL_ABORTED_BEFORE_DISPATCH, type ToolExecution, type ToolExecutionToken } from '@deepseek-ai/dsh-tools' import { SubprocessRuntime } from '@deepseek-ai/dsh-subprocess' @@ -40,6 +41,12 @@ import { toWorkdirRelative, } from '@deepseek-ai/dsh-tool-fs-search' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'test': { kind: 'test' } & ContextFormed + } +} + const testToolSignal = new AbortController().signal /** @@ -765,7 +772,7 @@ describe('glob results', () => { ctx.on('tools/post-execute', async () => ({ kind: 'accept', additionalContexts: [createUserMessage({ - content: [{ type: 'text', text: 'glob context' }], source: { kind: 'plugin', plugin: 'test' }, + content: [{ type: 'text', text: 'glob context' }], source: { kind: 'test' }, })], })) subprocess.handler = () => runResult('a.ts\nb.ts\nc.ts\nd.ts\n') @@ -977,7 +984,7 @@ describe('grep results', () => { ctx.on('tools/post-execute', async () => ({ kind: 'accept', additionalContexts: [createUserMessage({ - content: [{ type: 'text', text: 'grep context' }], source: { kind: 'plugin', plugin: 'test' }, + content: [{ type: 'text', text: 'grep context' }], source: { kind: 'test' }, })], })) subprocess.handler = () => runResult([ diff --git a/packages/goal/goal-round-driver/tests/goal-round-driver.spec.ts b/packages/goal/goal-round-driver/tests/goal-round-driver.spec.ts index c7c5ff41f6..e9b9edc481 100644 --- a/packages/goal/goal-round-driver/tests/goal-round-driver.spec.ts +++ b/packages/goal/goal-round-driver/tests/goal-round-driver.spec.ts @@ -8,10 +8,17 @@ import GoalService, { GoalId } from '@deepseek-ai/dsh-goal' import type { GoalView } from '@deepseek-ai/dsh-goal' import { createUserMessage, LlmAdapter, LlmError } from '@deepseek-ai/dsh-llm' import type { GenerateOptions, StreamChunk } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' import { SessionId } from '@deepseek-ai/dsh-session' import type { UserMessage } from '@deepseek-ai/dsh-session' import * as goalSession from '../src/index.ts' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'test': { kind: 'test' } & ContextFormed + } +} + type ScriptEntry = StreamChunk[] | Error | 'hang' | ((options: GenerateOptions) => StreamChunk[]) /** Small request-recording adapter with controllable failure and cancellation. */ @@ -481,7 +488,7 @@ describe('same-session goal driving', () => { const test = await harness([textResponse('side contexts'), textResponse('revised goal')]) const claimedContext = createUserMessage({ content: [{ type: 'text', text: 'claimed context to restore' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, }) const roundZeroContext = createUserMessage({ content: [{ type: 'text', text: 'obsolete goal context' }], @@ -489,11 +496,11 @@ describe('same-session goal driving', () => { }) const queuedStepContext = createUserMessage({ content: [{ type: 'text', text: 'context already queued for the next step' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, }) const queuedTurnContext = createUserMessage({ content: [{ type: 'text', text: 'context already queued for the next turn' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, }) let staged = false const stopInserted = onInboxMessage(test.ctx, test.agent, (message) => { diff --git a/packages/goal/goal/tests/goal.spec.ts b/packages/goal/goal/tests/goal.spec.ts index 5bf72d11bf..06e31d7196 100644 --- a/packages/goal/goal/tests/goal.spec.ts +++ b/packages/goal/goal/tests/goal.spec.ts @@ -3,6 +3,7 @@ import { Context } from '@deepseek-ai/cordis' import AgentRegistry, { agentEvents } from '@deepseek-ai/dsh-agent' import type { Agent } from '@deepseek-ai/dsh-agent' import { createUserMessage, HarnessError } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' import SessionStore, { Session, SessionId, type UserMessage } from '@deepseek-ai/dsh-session' import SessionProjectionRegistry from '@deepseek-ai/dsh-session-projection' import GoalService, { @@ -14,6 +15,13 @@ import GoalService, { import type { GoalChangeMeta, GoalRef, GoalSnapshotChangeMeta } from '@deepseek-ai/dsh-goal' import { createInboxStub } from '@deepseek-ai/dsh-agent-loop-testkit' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'test': { kind: 'test' } & ContextFormed + 'ordinary-user-message': { kind: 'ordinary-user-message' } & ContextFormed + } +} + interface StubAgent { agent: Agent session: Session @@ -618,7 +626,7 @@ describe('goal replay validation', () => { expect(foldGoal(session.snapshotEvents())).toMatchObject({ goal: { id: change.goal.id, revision: 1 } }) const message = createUserMessage({ content: [{ type: 'text', text: 'unrelated pending context' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, }) const inbox = stubAgentForSession(session).agent.inbox inbox.append('next-step', message) @@ -639,10 +647,10 @@ describe('goal replay validation', () => { const session = Session.create(SessionId('unrelated')) appendInjection(session, createUserMessage({ content: [{ type: 'text', text: 'other' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, })) expect(foldGoal(session.snapshotEvents())).toEqual({ roundsStarted: 0 }) - const source = { kind: 'plugin', plugin: 'ordinary-user-message' } as const + const source = { kind: 'ordinary-user-message' } as const const turn = nextTurn(session) session.append('turn/start', { turn }) session.append('user/message', createUserMessage({ diff --git a/packages/goal/goal/tests/projection.spec.ts b/packages/goal/goal/tests/projection.spec.ts index 7a9d85d844..227da38ad8 100644 --- a/packages/goal/goal/tests/projection.spec.ts +++ b/packages/goal/goal/tests/projection.spec.ts @@ -13,6 +13,7 @@ import { Context } from '@deepseek-ai/cordis' import AgentRegistry, { agentEvents } from '@deepseek-ai/dsh-agent' import type { Agent, AgentStatus } from '@deepseek-ai/dsh-agent' import { createUserMessage } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' import SessionStore from '@deepseek-ai/dsh-session' import type { Session } from '@deepseek-ai/dsh-session' import SessionProjectionRegistry from '@deepseek-ai/dsh-session-projection' @@ -20,6 +21,12 @@ import GoalService, { GoalId, applyGoalProjection, foldGoal, goalProjectionDefin import type { GoalProjection, GoalProjectionState, GoalRef } from '@deepseek-ai/dsh-goal' import { unsupportedInbox } from '@deepseek-ai/dsh-agent-loop-testkit' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'test': { kind: 'test' } & ContextFormed + } +} + interface Bench { ctx: Context session: Session @@ -132,10 +139,11 @@ describe('goal projection unit', () => { start: 0, inserted: [createUserMessage({ content: [{ type: 'text', text: 'unrelated pending context' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, })], }) + expect(bench.tailValues().goal).toBeNull() expect(foldGoal(bench.session.snapshotEvents()).goal).toBeUndefined() }) diff --git a/packages/goal/tool-goal/src/index.ts b/packages/goal/tool-goal/src/index.ts index a63f066aa4..c706741c5a 100644 --- a/packages/goal/tool-goal/src/index.ts +++ b/packages/goal/tool-goal/src/index.ts @@ -9,6 +9,13 @@ import z from '@deepseek-ai/schemastery' import { GoalId } from '@deepseek-ai/dsh-goal' import type { GoalRef, GoalView } from '@deepseek-ai/dsh-goal' import { boundContextSummary, createUserMessage, HarnessError } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'tool-goal': { kind: 'tool-goal' } & ContextFormed + } +} + import { defineTool } from '@deepseek-ai/dsh-tools' import type { GenericCallView } from '@deepseek-ai/dsh-tools' import { @@ -323,8 +330,7 @@ export function apply(ctx: Context, config: Config): void { ? renderWrapupContext(goal.objective) : renderWrapupContext(goal.objective, args.blocked_reason as string), source: { - kind: 'plugin', - plugin: 'tool-goal', + kind: 'tool-goal', form: 'notice', summary: boundContextSummary(`${args.action as string}: ${goal.objective}`), }, diff --git a/packages/goal/tool-goal/tests/tool-goal.spec.ts b/packages/goal/tool-goal/tests/tool-goal.spec.ts index 50949298ba..ecc7822bce 100644 --- a/packages/goal/tool-goal/tests/tool-goal.spec.ts +++ b/packages/goal/tool-goal/tests/tool-goal.spec.ts @@ -8,6 +8,7 @@ import GoalService, { GoalId } from '@deepseek-ai/dsh-goal' import type { GoalRef } from '@deepseek-ai/dsh-goal' import { createUserMessage, ToolCallId } from '@deepseek-ai/dsh-llm' import type { MessageSource } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' import SessionStore, { SESSION_FORMAT_VERSION, Session, @@ -21,6 +22,12 @@ import type { ToolExecutionResult } from '@deepseek-ai/dsh-tools' import * as toolGoal from '@deepseek-ai/dsh-tool-goal' import { createInboxStub } from '@deepseek-ai/dsh-agent-loop-testkit' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'test': { kind: 'test' } & ContextFormed + } +} + const testToolSignal = new AbortController().signal interface StubAgent { @@ -249,7 +256,7 @@ describe('goal tool execution authority', () => { expect(driverless.error?.info?.code).toBe('GOAL_TOOL_DRIVER_REQUIRED') closeTurn(root, 1) - openTurn(root, { kind: 'plugin', plugin: 'test' }) + openTurn(root, { kind: 'test' }) const nonHuman = await execute(ctx, 'create_goal', { objective: 'forged' }, root.agent) expect(nonHuman.error?.info?.code).toBe('GOAL_TOOL_AUTHORITY_REQUIRED') closeTurn(root, 2) @@ -313,7 +320,7 @@ describe('goal tool execution authority', () => { it('rejects terminal reporting without human input or a current goal round', async () => { const { ctx, root } = await harness() - openTurn(root, { kind: 'plugin', plugin: 'test' }) + openTurn(root, { kind: 'test' }) const result = await execute(ctx, 'update_goal', { goal_id: 'goal-missing', revision: 1, action: 'complete', }, root.agent) @@ -418,8 +425,7 @@ describe('goal tool state transitions', () => { const contexts = complete.additionalContexts ?? [] expect(contexts).toHaveLength(1) expect(contexts[0]?.source).toEqual({ - kind: 'plugin', - plugin: 'tool-goal', + kind: 'tool-goal', form: 'notice', summary: 'complete: pause cleanly', }) diff --git a/packages/guard/repeat-tool-reminder/src/index.ts b/packages/guard/repeat-tool-reminder/src/index.ts index dc7ad52834..a79722aad0 100644 --- a/packages/guard/repeat-tool-reminder/src/index.ts +++ b/packages/guard/repeat-tool-reminder/src/index.ts @@ -10,6 +10,13 @@ import type { Context } from '@deepseek-ai/cordis' import z from '@deepseek-ai/schemastery' import type { Agent, PreStepDecision } from '@deepseek-ai/dsh-agent' import { createUserMessage } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'repeat-tool-reminder': { kind: 'repeat-tool-reminder' } & ContextFormed + } +} + import type { MessageSource } from '@deepseek-ai/dsh-llm' import type { UserMessage } from '@deepseek-ai/dsh-session' import type { PostToolDecision, ToolExecution } from '@deepseek-ai/dsh-tools' @@ -50,11 +57,11 @@ export const Config: z = z.object({ }) /** - * The `{kind:'plugin'}` source stamped on every reminder this guard injects — - * the label is load-bearing (an unlabeled context would render as a user - * prompt in derived history). + * The `{kind:'repeat-tool-reminder'}` producer source stamped on every reminder + * this guard injects — the label is load-bearing (an unlabeled context would + * render as a user prompt in derived history). */ -const PLUGIN_SOURCE: MessageSource = { kind: 'plugin', plugin: 'repeat-tool-reminder' } +const REMINDER_SOURCE: MessageSource = { kind: 'repeat-tool-reminder' } /** * The gentle first-threshold reminder. Keyed to `thresholds[0]`, not a literal @@ -202,7 +209,7 @@ export function apply(ctx: Context, config: Config): void { : detailedReminder(exec.name, count, previewArguments(canonical, argumentsPreviewChars)) return createUserMessage({ content: [{ type: 'text', text }], - source: { ...PLUGIN_SOURCE, form: 'notice', summary: `${exec.name} × ${count}` }, + source: { ...REMINDER_SOURCE, form: 'notice', summary: `${exec.name} × ${count}` }, }) } diff --git a/packages/guard/repeat-tool-reminder/tests/repeat-tool-reminder.spec.ts b/packages/guard/repeat-tool-reminder/tests/repeat-tool-reminder.spec.ts index 7ce965ba25..ccaad2300b 100644 --- a/packages/guard/repeat-tool-reminder/tests/repeat-tool-reminder.spec.ts +++ b/packages/guard/repeat-tool-reminder/tests/repeat-tool-reminder.spec.ts @@ -1,6 +1,7 @@ import { describe, expect, it } from 'vitest' import { Context } from '@deepseek-ai/cordis' import { createUserMessage, ToolCallId } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' import { SessionId, type SessionEvent } from '@deepseek-ai/dsh-session' import { defineContentToolFixture } from '@deepseek-ai/dsh-tools' import type { Agent } from '@deepseek-ai/dsh-agent' @@ -10,6 +11,12 @@ import * as RepeatToolGuard from '@deepseek-ai/dsh-repeat-tool-reminder' import type { Config } from '@deepseek-ai/dsh-repeat-tool-reminder' import { MockAdapter, textResponse, toolCallResponse } from '../../../core/agent-loop/tests/mock-adapter.ts' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'test': { kind: 'test' } & ContextFormed + } +} + const testToolSignal = new AbortController().signal /** @@ -48,8 +55,7 @@ function reminders(agent: Agent): { text: string; source: unknown }[] { // The reminder is a `notice`-form context; its summary names the repeated // call so a reader sees it without expanding the row. const guardSource = (tool: string, count: number) => ({ - kind: 'plugin', - plugin: 'repeat-tool-reminder', + kind: 'repeat-tool-reminder', form: 'notice', summary: `${tool} × ${count}`, }) @@ -315,7 +321,7 @@ describe('fold onto the downstream decision', () => { kind: 'block' as const, feedback: [{ type: 'text' as const, text: 'nope' }], additionalContexts: [createUserMessage({ - content: [{ type: 'text' as const, text: 'downstream-ctx' }], source: { kind: 'plugin' as const, plugin: 'test' }, + content: [{ type: 'text' as const, text: 'downstream-ctx' }], source: { kind: 'test' as const }, })], })) const adapter = new MockAdapter([ @@ -332,10 +338,10 @@ describe('fold onto the downstream decision', () => { expect(found).toHaveLength(3) // Only the repeated call adds guard context; downstream source fields survive. expect(found[0]!.text).toBe('downstream-ctx') - expect(found[0]!.source).toEqual({ kind: 'plugin', plugin: 'test' }) + expect(found[0]!.source).toEqual({ kind: 'test' }) expect(found[1]!.text).toContain('repeating the exact same tool call') expect(found[1]!.source).toEqual(guardSource('probe', 2)) - expect(found[2]).toEqual({ text: 'downstream-ctx', source: { kind: 'plugin', plugin: 'test' } }) + expect(found[2]).toEqual({ text: 'downstream-ctx', source: { kind: 'test' } }) // The block's feedback reached the tool result unchanged. const results = agent.session.snapshotEvents().filter((e): e is SessionEvent<'tool/result'> => e.type === 'tool/result') expect(results.every(r => r.data.message.isError)).toBe(true) diff --git a/packages/hooks/hooks-claude-code/src/index.ts b/packages/hooks/hooks-claude-code/src/index.ts index 469c1c0dc4..3d5fd95229 100644 --- a/packages/hooks/hooks-claude-code/src/index.ts +++ b/packages/hooks/hooks-claude-code/src/index.ts @@ -14,6 +14,13 @@ import z from '@deepseek-ai/schemastery' import type { Agent, PreStepDecision, TurnBoundaryProjection } from '@deepseek-ai/dsh-agent' import type {} from '@deepseek-ai/dsh-session-projection' import { createUserMessage } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'hooks-claude-code': { kind: 'hooks-claude-code' } & ContextFormed + } +} + import type { ContentBlock, MessageSource } from '@deepseek-ai/dsh-llm' import type { UserMessage } from '@deepseek-ai/dsh-session' import type { PostToolDecision, PreToolDecision, ToolExecution, ToolExecutionResult } from '@deepseek-ai/dsh-tools' @@ -82,8 +89,8 @@ function nextHandlerId(point: string): string { return `claude-code:${point}:${++handlerCounter}` } -/** The `{kind:'plugin'}` source stamped on every context this bridge injects. */ -const PLUGIN_SOURCE: MessageSource = { kind: 'plugin', plugin: 'hooks-claude-code' } +/** The `{kind:'hooks-claude-code'}` producer source stamped on every context this bridge injects. */ +const CONTEXT_SOURCE: MessageSource = { kind: 'hooks-claude-code' } /** The summary cap bounds a persisted event field — a positive integer or the slice misbehaves silently. */ function assertPositiveInteger(name: string, value: number): void { @@ -191,7 +198,7 @@ export function apply(ctx: Context, config: Config): void { function contextFrom(merged: MergedHookOutcome): UserMessage | undefined { if (merged.additionalContext.length === 0) return undefined const content: ContentBlock[] = merged.additionalContext.map(text => ({ type: 'text', text })) - return createUserMessage({ content, source: PLUGIN_SOURCE }) + return createUserMessage({ content, source: CONTEXT_SOURCE }) } /** Prepend one context without flattening source fields or other downstream metadata. */ @@ -271,7 +278,7 @@ export function apply(ctx: Context, config: Config): void { if (merged.decision === 'deny') { // A blocking Stop hook forces continuation. const text = merged.reason ?? 'continue: blocked by Stop hook' - agent.steer(createUserMessage({ content: [{ type: 'text', text }], source: PLUGIN_SOURCE })) + agent.steer(createUserMessage({ content: [{ type: 'text', text }], source: CONTEXT_SOURCE })) } }) diff --git a/packages/hooks/hooks-claude-code/tests/bridge.spec.ts b/packages/hooks/hooks-claude-code/tests/bridge.spec.ts index c5780a7490..dab06cabca 100644 --- a/packages/hooks/hooks-claude-code/tests/bridge.spec.ts +++ b/packages/hooks/hooks-claude-code/tests/bridge.spec.ts @@ -129,7 +129,7 @@ describe('hooks-claude-code bridge — UserPromptSubmit', () => { // The injected context reached the model and is recorded with the plugin source. expect(JSON.stringify(adapter.requests[0]!.messages)).toContain('remember: be brief') const ctxMsg = events(agent).find(e => e.type === 'user/message' && e.data.source.kind !== 'user') - expect(ctxMsg?.type === 'user/message' && ctxMsg.data.source).toEqual({ kind: 'plugin', plugin: 'hooks-claude-code' }) + expect(ctxMsg?.type === 'user/message' && ctxMsg.data.source).toEqual({ kind: 'hooks-claude-code' }) }) }) diff --git a/packages/hooks/hooks-claude-code/tests/coverage-cases.ts b/packages/hooks/hooks-claude-code/tests/coverage-cases.ts index cdadb753ca..8a5a068efa 100644 --- a/packages/hooks/hooks-claude-code/tests/coverage-cases.ts +++ b/packages/hooks/hooks-claude-code/tests/coverage-cases.ts @@ -1,4 +1,5 @@ import { createUserMessage } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' import { afterEach, describe, expect, it, vi } from 'vitest' import { mkdtempSync, rmSync, writeFileSync, chmodSync, existsSync, readFileSync } from 'node:fs' import { tmpdir } from 'node:os' @@ -17,6 +18,12 @@ import SubagentRuntime, { SubagentRunId } from '@deepseek-ai/dsh-subagent' import * as HooksClaude from '@deepseek-ai/dsh-hooks-claude-code' import { MockAdapter, textResponse, toolCallResponse } from '../../../core/agent-loop/tests/mock-adapter.ts' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'policy': { kind: 'policy' } & ContextFormed + } +} + const testToolSignal = new AbortController().signal /** Targeted branch coverage for the CC bridge: option arms, warn paths, no-agent @@ -525,7 +532,7 @@ export function defineCoverageCases(group: CoverageGroup): void { content: [{ type: 'text' as const, text: 'rewritten-prompt' }], }, createUserMessage({ content: [{ type: 'text' as const, text: 'from-downstream' }], - source: { kind: 'plugin' as const, plugin: 'policy' }, + source: { kind: 'policy' as const }, })], })) const agent = await ctx.agentLoop.create(SessionId('a1'), { provider: 'mock', model: 'mock' }) @@ -540,8 +547,8 @@ export function defineCoverageCases(group: CoverageGroup): void { expect(userMsg?.type === 'user/message' && userMsg.data.content.some(b => b.type === 'text' && b.text === 'rewritten-prompt')).toBe(true) const contexts = events(agent).filter(event => event.type === 'user/message' && event.data.source.kind !== 'user') expect(contexts.map(event => event.type === 'user/message' && event.data.source)).toEqual([ - { kind: 'plugin', plugin: 'policy' }, - { kind: 'plugin', plugin: 'hooks-claude-code' }, + { kind: 'policy' }, + { kind: 'hooks-claude-code' }, ]) }) @@ -574,7 +581,7 @@ export function defineCoverageCases(group: CoverageGroup): void { kind: 'accept' as const, additionalContexts: [createUserMessage({ content: [{ type: 'text' as const, text: 'downstream-note' }], - source: { kind: 'plugin' as const, plugin: 'policy' }, + source: { kind: 'policy' as const }, })], })) const agent = await ctx.agentLoop.create(SessionId('a1'), { provider: 'mock', model: 'mock' }) @@ -583,8 +590,8 @@ export function defineCoverageCases(group: CoverageGroup): void { const contexts = events(agent).filter(event => event.type === 'user/message' && event.data.source.kind !== 'user') expect(contexts.map(event => event.type === 'user/message' && event.data.source)).toEqual([ - { kind: 'plugin', plugin: 'hooks-claude-code' }, - { kind: 'plugin', plugin: 'policy' }, + { kind: 'hooks-claude-code' }, + { kind: 'policy' }, ]) }) diff --git a/packages/hooks/hooks-codex/src/index.ts b/packages/hooks/hooks-codex/src/index.ts index 037252dcde..1599ceee70 100644 --- a/packages/hooks/hooks-codex/src/index.ts +++ b/packages/hooks/hooks-codex/src/index.ts @@ -17,6 +17,13 @@ import z from '@deepseek-ai/schemastery' import type { Agent, PreStepDecision } from '@deepseek-ai/dsh-agent' import type {} from '@deepseek-ai/dsh-session-projection' import { createUserMessage } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'hooks-codex': { kind: 'hooks-codex' } & ContextFormed + } +} + import type { ContentBlock, MessageSource } from '@deepseek-ai/dsh-llm' import type { UserMessage } from '@deepseek-ai/dsh-session' import type { PostToolDecision, PreToolDecision, ToolExecution, ToolExecutionResult } from '@deepseek-ai/dsh-tools' @@ -68,7 +75,7 @@ function nextHandlerId(point: string): string { return `codex:${point}:${++handlerCounter}` } -const PLUGIN_SOURCE: MessageSource = { kind: 'plugin', plugin: 'hooks-codex' } +const CONTEXT_SOURCE: MessageSource = { kind: 'hooks-codex' } /** The summary cap bounds a persisted event field — a positive integer or the slice misbehaves silently. */ function assertPositiveInteger(name: string, value: number): void { @@ -173,7 +180,7 @@ export function apply(ctx: Context, config: Config): void { function contextFrom(merged: MergedHookOutcome): UserMessage | undefined { if (merged.additionalContext.length === 0) return undefined const content: ContentBlock[] = merged.additionalContext.map(text => ({ type: 'text', text })) - return createUserMessage({ content, source: PLUGIN_SOURCE }) + return createUserMessage({ content, source: CONTEXT_SOURCE }) } /** Prepend one context without flattening source fields or other downstream metadata. */ @@ -264,7 +271,7 @@ export function apply(ctx: Context, config: Config): void { // empty stderr) still forces it — fall back to a generic steering line // rather than letting the turn stop. const text = merged.reason ?? 'continue: blocked by Stop hook' - agent.steer(createUserMessage({ content: [{ type: 'text', text }], source: PLUGIN_SOURCE })) + agent.steer(createUserMessage({ content: [{ type: 'text', text }], source: CONTEXT_SOURCE })) } }) } diff --git a/packages/hooks/hooks-codex/tests/coverage-cases.ts b/packages/hooks/hooks-codex/tests/coverage-cases.ts index 508f674ff2..80c5e42bd3 100644 --- a/packages/hooks/hooks-codex/tests/coverage-cases.ts +++ b/packages/hooks/hooks-codex/tests/coverage-cases.ts @@ -1,4 +1,5 @@ import { createUserMessage } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' import { afterEach, describe, expect, it, vi } from 'vitest' import { mkdtempSync, rmSync, writeFileSync, chmodSync, existsSync, readFileSync } from 'node:fs' import { tmpdir } from 'node:os' @@ -15,6 +16,12 @@ import LocalSubprocessRuntime from '@deepseek-ai/dsh-subprocess-local' import * as HooksCodex from '@deepseek-ai/dsh-hooks-codex' import { MockAdapter, textResponse, toolCallResponse } from '../../../core/agent-loop/tests/mock-adapter.ts' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'policy': { kind: 'policy' } & ContextFormed + } +} + const testToolSignal = new AbortController().signal const dirs: string[] = [] @@ -133,7 +140,7 @@ export function defineCoverageCases(groups: CoverageGroup | readonly CoverageGro content: [{ type: 'text' as const, text: 'rewritten-prompt' }], }, createUserMessage({ content: [{ type: 'text' as const, text: 'from-downstream' }], - source: { kind: 'plugin' as const, plugin: 'policy' }, + source: { kind: 'policy' as const }, })], })) const agent = await ctx.agentLoop.create(SessionId('a1'), { provider: 'mock', model: 'mock' }) @@ -144,8 +151,8 @@ export function defineCoverageCases(groups: CoverageGroup | readonly CoverageGro expect(req).toContain('rewritten-prompt') const contexts = events(agent).filter(event => event.type === 'user/message' && event.data.source.kind !== 'user') expect(contexts.map(event => event.type === 'user/message' && event.data.source)).toEqual([ - { kind: 'plugin', plugin: 'policy' }, - { kind: 'plugin', plugin: 'hooks-codex' }, + { kind: 'policy' }, + { kind: 'hooks-codex' }, ]) }) }) @@ -175,7 +182,7 @@ export function defineCoverageCases(groups: CoverageGroup | readonly CoverageGro kind: 'accept' as const, additionalContexts: [createUserMessage({ content: [{ type: 'text' as const, text: 'downstream-note' }], - source: { kind: 'plugin' as const, plugin: 'policy' }, + source: { kind: 'policy' as const }, })], })) const agent = await ctx.agentLoop.create(SessionId('a1'), { provider: 'mock', model: 'mock' }) @@ -183,8 +190,8 @@ export function defineCoverageCases(groups: CoverageGroup | readonly CoverageGro const contexts = events(agent).filter(event => event.type === 'user/message' && event.data.source.kind !== 'user') expect(contexts.map(event => event.type === 'user/message' && event.data.source)).toEqual([ - { kind: 'plugin', plugin: 'hooks-codex' }, - { kind: 'plugin', plugin: 'policy' }, + { kind: 'hooks-codex' }, + { kind: 'policy' }, ]) }) diff --git a/packages/interaction/user-approval/src/index.ts b/packages/interaction/user-approval/src/index.ts index 8a5f506bf1..9a14f04d0b 100644 --- a/packages/interaction/user-approval/src/index.ts +++ b/packages/interaction/user-approval/src/index.ts @@ -9,6 +9,13 @@ import { Context, Service } from '@deepseek-ai/cordis' import z from '@deepseek-ai/schemastery' import type { Agent } from '@deepseek-ai/dsh-agent' import { createUserMessage, type ToolCallId } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'user-approval': { kind: 'user-approval' } & ContextFormed + } +} + import { scopeTarget } from '@deepseek-ai/dsh-scope' import type { Session } from '@deepseek-ai/dsh-session' import { SessionSeq } from '@deepseek-ai/dsh-session' @@ -183,7 +190,7 @@ export class ApprovalService extends Service { type: 'text', text: `The approval policy changed from "${previous}" to "${policy}" (changed by the user).`, }], - source: { kind: 'plugin', plugin: 'user-approval' }, + source: { kind: 'user-approval' }, })) } diff --git a/packages/interaction/user-approval/tests/approval.spec.ts b/packages/interaction/user-approval/tests/approval.spec.ts index 70e1abcf4e..0ec3b9580b 100644 --- a/packages/interaction/user-approval/tests/approval.spec.ts +++ b/packages/interaction/user-approval/tests/approval.spec.ts @@ -471,7 +471,7 @@ describe('approval policy (the approval/policy fold)', () => { type: 'text', text: 'The approval policy changed from "ask" to "never" (changed by the user).', }], - source: { kind: 'plugin', plugin: 'user-approval' }, + source: { kind: 'user-approval' }, }) }) diff --git a/packages/jobs/tool-jobs/src/index.ts b/packages/jobs/tool-jobs/src/index.ts index 277d7181a4..210005be6a 100644 --- a/packages/jobs/tool-jobs/src/index.ts +++ b/packages/jobs/tool-jobs/src/index.ts @@ -10,12 +10,18 @@ import type { Context } from '@deepseek-ai/cordis' import z from '@deepseek-ai/schemastery' import { boundContextSummary, createUserMessage, type ContentBlock } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' import { TextRetainer } from '@deepseek-ai/dsh-output-retention' import { defineTool } from '@deepseek-ai/dsh-tools' import type { GenericCallView, ToolDefinition, ToolExecution } from '@deepseek-ai/dsh-tools' import { JobId } from '@deepseek-ai/dsh-jobs' import type { JobSnapshot } from '@deepseek-ai/dsh-jobs' import type { Agent } from '@deepseek-ai/dsh-agent' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'tool-jobs': { kind: 'tool-jobs' } & ContextFormed + } +} export const name = 'tool-jobs' export const inject = ['tools', 'jobs', 'systemPrompt'] @@ -283,8 +289,7 @@ export function apply(ctx: Context, config: Config): void { text: fitCompletionNotice(snapshot), }], source: { - kind: 'plugin', - plugin: 'tool-jobs', + kind: 'tool-jobs', form: 'notice', summary: completionSummary(snapshot), }, diff --git a/packages/jobs/tool-jobs/tests/tool-jobs.spec.ts b/packages/jobs/tool-jobs/tests/tool-jobs.spec.ts index 6f32878207..f7c543c024 100644 --- a/packages/jobs/tool-jobs/tests/tool-jobs.spec.ts +++ b/packages/jobs/tool-jobs/tests/tool-jobs.spec.ts @@ -672,7 +672,7 @@ describe('completion notice delivery', () => { emitAgentEvent(ctx, owner, 'agent/inbox/claimed', { message: createUserMessage({ content: [{ type: 'text', text: 'background job bash-1 finished' }], - source: { kind: 'plugin', plugin: 'tool-jobs', form: 'notice', summary: 'bash' }, + source: { kind: 'tool-jobs', form: 'notice', summary: 'bash' }, }), turn: 1, }) @@ -697,8 +697,7 @@ describe('completion notices', () => { role: 'user', content: [{ type: 'text', text: 'background job bash-1 (bash: pnpm test) finished [status: completed, exit code: 0]. Read its output with job_output.' }], source: { - kind: 'plugin', - plugin: 'tool-jobs', + kind: 'tool-jobs', form: 'notice', summary: 'bash pnpm test [status: completed, exit code: 0]', }, @@ -728,8 +727,7 @@ describe('completion notices', () => { // The label and status detail are unbounded caller text, so the durable // one-line account caps itself rather than committing their full length. source: { - kind: 'plugin', - plugin: 'tool-jobs', + kind: 'tool-jobs', form: 'notice', summary: `subagent ${'x'.repeat(110)}…`, }, diff --git a/packages/llm/llm-deepseek/README.i18n.yaml b/packages/llm/llm-deepseek/README.i18n.yaml index cc43d12297..607a582e94 100644 --- a/packages/llm/llm-deepseek/README.i18n.yaml +++ b/packages/llm/llm-deepseek/README.i18n.yaml @@ -2,5 +2,5 @@ # side as of the last confirmed-consistent state. Both languages carry equal authority; # after editing either side, bring the other along and re-record with: # pnpm run verify-translation-pairing --write packages/llm/llm-deepseek/README.md -README.md: 33a76a316fd6f89e5d011ab3aa7a933331bd1e7b -README.zh.md: dbc7282140268985f215efcac0b4e602cd5b0e44 +README.md: 3dfd14b888c98196927e280a2c1e7cbf1d499e3a +README.zh.md: 7442caf49d491c0aac76a6b7f20fbfc767dc856b diff --git a/packages/llm/llm-deepseek/README.md b/packages/llm/llm-deepseek/README.md index 33a76a316f..3dfd14b888 100644 --- a/packages/llm/llm-deepseek/README.md +++ b/packages/llm/llm-deepseek/README.md @@ -27,6 +27,8 @@ Stream DeepSeek models through `deepseek-official` with Messages by default, or Mount this plugin when a composition streams DeepSeek models through the harness LLM service. It registers the single `deepseek-official` route and resolves connection facts per request, so a composition entry plus an optional user settings section drive the whole adapter. +Both protocols accept the LLM service's [request-only user inputs](../llm/README.md#use-this-package) alongside durable history; omitting request-only identity and attribution does not alter provider content. + ### When to choose it Choose this adapter for DeepSeek's official API or a gateway that supports the selected protocol through `baseURL`. Choose `dsh-llm-pi-ai` when the same composition also routes other providers or hand-declared gateways through pi-ai's catalogs; the two adapters can be mounted together because their route names do not collide. Registering any other adapter for `deepseek-official` fails with `DUPLICATE_ADAPTER`. diff --git a/packages/llm/llm-deepseek/README.zh.md b/packages/llm/llm-deepseek/README.zh.md index dbc7282140..7442caf49d 100644 --- a/packages/llm/llm-deepseek/README.zh.md +++ b/packages/llm/llm-deepseek/README.zh.md @@ -27,6 +27,8 @@ kind: "package-reference" 当组合需要通过 harness LLM(大语言模型)服务流式调用 DeepSeek 模型时挂载本插件。它注册唯一的 `deepseek-official` 路由,并按请求解析连接事实,因此组合条目加可选用户设置分节即可驱动整个适配器。 +两种协议都接受 LLM 服务的[仅供请求使用的 user 输入](../llm/README.zh.md#use-this-package),并可将其与持久历史混用;省略请求输入的身份与来源不会改变提供方内容。 + ### 何时选择 面向 DeepSeek 官方 API,或通过 `baseURL` 连接支持所选协议的网关时,选择本适配器。当同一组合还要通过 pi-ai 目录路由其他提供方或手工声明的网关时,选择 `dsh-llm-pi-ai`;两个适配器可以同时挂载,因为它们的路由名不冲突。为 `deepseek-official` 注册任何其他适配器会以 `DUPLICATE_ADAPTER` 失败。 diff --git a/packages/llm/llm-deepseek/src/protocols/chat-completions/serialize.ts b/packages/llm/llm-deepseek/src/protocols/chat-completions/serialize.ts index d20042b848..a078b42389 100644 --- a/packages/llm/llm-deepseek/src/protocols/chat-completions/serialize.ts +++ b/packages/llm/llm-deepseek/src/protocols/chat-completions/serialize.ts @@ -8,7 +8,7 @@ */ import { contentHasImage, IMAGE_OFFLOAD_REQUIRED_CODE, LlmError, offloadedImageText, projectOffloadedImages, requestImageHandleText, requiredImageOffload } from '@deepseek-ai/dsh-llm' -import type { ContentBlock, GenerateOptions, ImageAttachmentAccessResolver, Message } from '@deepseek-ai/dsh-llm' +import type { ContentBlock, GenerateOptions, ImageAttachmentAccessResolver, Message, RequestMessage } from '@deepseek-ai/dsh-llm' import type { ImageAttachmentRef, RequestImageAttachment } from '@deepseek-ai/dsh-attachment' import type { WireImageContentPart, @@ -108,7 +108,7 @@ function assertTextOnly(blocks: readonly ContentBlock[]): void { } /** Reject roles whose DeepSeek history format cannot carry image input. */ -function assertSupportedImageRoles(messages: readonly Message[]): void { +function assertSupportedImageRoles(messages: readonly RequestMessage[]): void { for (const message of messages) { if (message.role !== 'user' && message.role !== 'tool' && contentHasImage(message.content)) { throw new LlmError( @@ -233,7 +233,7 @@ function serializeAssistant(message: Message): WireMessage { * @param messages - the harness conversation, in order. * @returns the wire messages; order preserved. */ -export function serializeMessages(messages: Message[]): WireMessage[] { +export function serializeMessages(messages: RequestMessage[]): WireMessage[] { const wire: WireMessage[] = [] for (const message of messages) { assertTextOnly(message.content) @@ -269,7 +269,7 @@ export function serializeMessages(messages: Message[]): WireMessage[] { * @returns ordered DeepSeek wire messages. */ export async function serializeMessagesWithImages( - messages: readonly Message[], + messages: readonly RequestMessage[], images: ImageSerializationOptions, ): Promise { assertSupportedImageRoles(messages) @@ -376,7 +376,7 @@ export function serializeRequest( * failure names how many more oldest retained occurrences need durable * omission before the request can be retried. */ -function assertRetainedImagesFit(messages: readonly Message[], images: ImageSerializationOptions): void { +function assertRetainedImagesFit(messages: readonly RequestMessage[], images: ImageSerializationOptions): void { const representation = images.representation.kind === 'file' ? 'raw' : 'base64' const offloadImages = requiredImageOffload(messages, { representation, diff --git a/packages/llm/llm-deepseek/src/protocols/messages/images.ts b/packages/llm/llm-deepseek/src/protocols/messages/images.ts index a00354f69a..f2f32f003e 100644 --- a/packages/llm/llm-deepseek/src/protocols/messages/images.ts +++ b/packages/llm/llm-deepseek/src/protocols/messages/images.ts @@ -2,7 +2,7 @@ import type { AttachmentStore, ImageAttachmentRef, RequestImageAttachment } from '@deepseek-ai/dsh-attachment' import { contentHasImage, IMAGE_OFFLOAD_REQUIRED_CODE, LlmError, offloadedImageText, projectOffloadedImages, requiredImageOffload } from '@deepseek-ai/dsh-llm' -import type { ContentBlock, ImageAttachmentAccessResolver, Message } from '@deepseek-ai/dsh-llm' +import type { ContentBlock, ImageAttachmentAccessResolver, RequestMessage } from '@deepseek-ai/dsh-llm' import type { DeepSeekConnectionOptions as Connection } from '../../common/types.ts' import { resolveRequestImageTarget } from '../../common/request-pricing.ts' import type { DeepSeekFileId } from '../../common/file-id.ts' @@ -36,9 +36,9 @@ function* imageRefs(blocks: readonly ContentBlock[]): Generator }> { +): Promise<{ messages: readonly RequestMessage[]; versions: Map }> { const versions = new Map() const messages = projectOffloadedImages(history, ref => offloadedImageText(ref, access(ref))) if (!messages.some(message => contentHasImage(message.content))) return { messages, versions } @@ -67,16 +67,16 @@ export async function prepareImages( * @returns unchanged history within both byte and image-count limits. */ export function inlineImages( - messages: readonly Message[], versions: ReadonlyMap, + messages: readonly RequestMessage[], versions: ReadonlyMap, connection: Connection, -): readonly Message[] { +): readonly RequestMessage[] { assertImagesFit(messages, versions, connection, 'base64') return messages } /** Count additional oldest occurrences requiring durable offload at their exact represented bytes. */ function assertImagesFit( - messages: readonly Message[], versions: ReadonlyMap, + messages: readonly RequestMessage[], versions: ReadonlyMap, connection: Connection, representation: 'raw' | 'base64', ): void { const offloadImages = requiredImageOffload(messages, bounds(connection, representation), @@ -97,7 +97,7 @@ function assertImagesFit( * @returns ids keyed by durable attachment identity. */ export async function prepareFileIds( - messages: readonly Message[], versions: ReadonlyMap, files: RequestFiles, + messages: readonly RequestMessage[], versions: ReadonlyMap, files: RequestFiles, ): Promise> { const ids = new Map() for (const [index, message] of messages.entries()) { diff --git a/packages/llm/llm-deepseek/src/protocols/messages/serialize.ts b/packages/llm/llm-deepseek/src/protocols/messages/serialize.ts index a50361cf0a..f3602e79e9 100644 --- a/packages/llm/llm-deepseek/src/protocols/messages/serialize.ts +++ b/packages/llm/llm-deepseek/src/protocols/messages/serialize.ts @@ -1,7 +1,7 @@ /** Map system snapshots and conversation turns to Messages using the configured route capability. */ import { LlmError, requestImageHandleText } from '@deepseek-ai/dsh-llm' -import type { ContentBlock, GenerateOptions, ImageAttachmentAccessResolver, Message } from '@deepseek-ai/dsh-llm' +import type { ContentBlock, GenerateOptions, ImageAttachmentAccessResolver, Message, RequestMessage } from '@deepseek-ai/dsh-llm' import type { ImageAttachmentRef, RequestImageAttachment } from '@deepseek-ai/dsh-attachment' import type { DeepSeekConnectionOptions as Connection } from '../../common/types.ts' import type { DeepSeekFileId } from '../../common/file-id.ts' @@ -51,7 +51,7 @@ function assistant(message: Message, model: string, onReplayDegrade?: (reason: s * @returns the Messages API JSON body. */ export function serialize( - options: GenerateOptions, connection: Connection, history: readonly Message[], + options: GenerateOptions, connection: Connection, history: readonly RequestMessage[], images: ReadonlyMap, access: ImageAttachmentAccessResolver, onReplayDegrade?: (reason: string) => void, fileIds?: ReadonlyMap, diff --git a/packages/llm/llm-deepseek/tests/adapter.e2e.ts b/packages/llm/llm-deepseek/tests/adapter.e2e.ts index cc8a564027..2a68e915cc 100644 --- a/packages/llm/llm-deepseek/tests/adapter.e2e.ts +++ b/packages/llm/llm-deepseek/tests/adapter.e2e.ts @@ -128,7 +128,7 @@ afterEach(async () => { function ask(text: string): Message[] { return [createUserMessage({ content: [{ type: 'text', text }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'user' }, })] } @@ -163,7 +163,7 @@ describe.skipIf(!process.env.DEEPSEEK_API_KEY)('llm-deepseek e2e (real API)', () const attachment = await ctx.attachments.saveImage({ data: readFileSync(new URL('fixtures/red.png', import.meta.url)), mediaType: 'image/png' }) const message = ask('What is the dominant color of this image?')[0]! const history: Message[] = [ - createSystemMessage('Answer with one English color word.', 'test'), + createSystemMessage('Answer with one English color word.'), { ...message, content: [...message.content, { type: 'image', attachment }] }, ] const reply = async () => { @@ -173,7 +173,7 @@ describe.skipIf(!process.env.DEEPSEEK_API_KEY)('llm-deepseek e2e (real API)', () return textOf(response).trim().toLowerCase() } expect(await reply()).toMatch(/^red[.!]?$/) - history.push(createSystemMessage('Reply to every user message with exactly banana.', 'test'), ...ask('Answer now.')) + history.push(createSystemMessage('Reply to every user message with exactly banana.'), ...ask('Answer now.')) expect(await reply()).toBe('banana') history.push(...ask('Answer again.')) expect(await reply()).toBe('banana') @@ -364,7 +364,7 @@ describe.skipIf(!process.env.DEEPSEEK_API_KEY)('llm-deepseek e2e (real API)', () }) await expect(ctx.llm.resolveModelInfo('deepseek-official', model)) .resolves.toMatchObject({ systemPromptUpdate: 'in-history' }) - const system = (text: string) => createSystemMessage(text, 'test') + const system = (text: string) => createSystemMessage(text) // A nonce before the padding isolates the provider cache across runs and retries. const nonce = randomBytes(16).toString('hex') const padding = Array.from({ length: 40 }, (_, index) => `Rule ${String(index + 1)}: keep every answer short and factual.`).join('\n') diff --git a/packages/llm/llm-deepseek/tests/adapter.spec.ts b/packages/llm/llm-deepseek/tests/adapter.spec.ts index 3951cd1ff3..f3d48533ad 100644 --- a/packages/llm/llm-deepseek/tests/adapter.spec.ts +++ b/packages/llm/llm-deepseek/tests/adapter.spec.ts @@ -22,12 +22,19 @@ import DeepSeekLlmApiExtensionRegistry from '@deepseek-ai/dsh-deepseek-llm-api-e import type { PreparedDeepSeekLlmApiExtensions } from '@deepseek-ai/dsh-deepseek-llm-api-extensions' import * as LlmDeepSeek from '@deepseek-ai/dsh-llm-deepseek' import { DeepSeekAdapter, resolveAdapterOptions } from '@deepseek-ai/dsh-llm-deepseek' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' import { httpErrorCode } from '../src/protocols/chat-completions/adapter.ts' import { resolveRequestImageTarget } from '../src/common/request-pricing.ts' import { assemble } from './assemble.ts' import { closeMockServers, mockServer, textEvents } from './mock-server.ts' import type { Behavior } from './mock-server.ts' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'test': { kind: 'test' } & ContextFormed + } +} + const TEST_USER_ID = '00000000-0000-4000-8000-000000000001' as AnonymousUserId let testHome: string @@ -694,7 +701,7 @@ describe('DeepSeekAdapter against a mock server', () => { }, attachments) const messages = [createUserMessage({ content: [{ type: 'image' as const, attachment: imageRef }], - source: { kind: 'plugin' as const, plugin: 'test' }, + source: { kind: 'test' as const }, })] await drain(adapter.stream({ provider: 'deepseek-official', model: 'deepseek-v4-flash-vision-exp', messages })) @@ -832,7 +839,7 @@ describe('DeepSeekAdapter against a mock server', () => { model: 'deepseek-v4-flash-vision-exp', messages: [createUserMessage({ content: [{ type: 'image' as const, attachment: imageRef }], - source: { kind: 'plugin' as const, plugin: 'test' }, + source: { kind: 'test' as const }, })], } diff --git a/packages/llm/llm-deepseek/tests/dynamic-config.spec.ts b/packages/llm/llm-deepseek/tests/dynamic-config.spec.ts index 505d933a61..7288bb9bfb 100644 --- a/packages/llm/llm-deepseek/tests/dynamic-config.spec.ts +++ b/packages/llm/llm-deepseek/tests/dynamic-config.spec.ts @@ -17,9 +17,16 @@ import { credentialRef } from '@deepseek-ai/dsh-credentials' import { LocalCredentialProvider } from '@deepseek-ai/dsh-credentials-local' import { FileSettingsProvider } from '@deepseek-ai/dsh-settings-file' import * as LlmDeepSeek from '@deepseek-ai/dsh-llm-deepseek' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' import { assemble } from './assemble.ts' import { closeMockServers, mockServer, textEvents } from './mock-server.ts' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'test': { kind: 'test' } & ContextFormed + } +} + const NS = 'llm-deepseek' const KEY_REF = credentialRef('DEEPSEEK_API_KEY') const IMAGE_REF: ImageAttachmentRef = { @@ -214,7 +221,7 @@ describe('request-level dynamic configuration', () => { { type: 'image', attachment: IMAGE_REF }, { type: 'image', attachment: IMAGE_REF }, ], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, })] await assemble(ctx, { model: 'deepseek-flash', messages }) @@ -232,7 +239,7 @@ describe('request-level dynamic configuration', () => { { type: 'image', attachment: IMAGE_REF, offloaded: true }, { type: 'image', attachment: IMAGE_REF }, ], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, })], }) diff --git a/packages/llm/llm-deepseek/tests/messages/adapter.e2e.ts b/packages/llm/llm-deepseek/tests/messages/adapter.e2e.ts index fd085e373c..aeb6ebe3e8 100644 --- a/packages/llm/llm-deepseek/tests/messages/adapter.e2e.ts +++ b/packages/llm/llm-deepseek/tests/messages/adapter.e2e.ts @@ -50,7 +50,7 @@ describe.skipIf(!process.env.DEEPSEEK_API_KEY)('DeepSeek Messages real API', () const model = IN_HISTORY_MODEL as string // Each case owns the capability, even for a model with an in-history catalog default. const ctx = await boot([{ id: model, ...inHistory ? { systemPromptUpdate: 'in-history' as const } : {} }]) - const history: Message[] = [createSystemMessage('Reply to every user message with exactly PROMPT_FIRST.', 'test'), user('Answer now.')] + const history: Message[] = [createSystemMessage('Reply to every user message with exactly PROMPT_FIRST.'), user('Answer now.')] const reply = async (expected: string) => { const saved = JSON.stringify(history) const response = await assemble(ctx.llm.stream(options({ model, messages: history, reasoningEffort: ReasoningEffortId('high') })), model) @@ -60,10 +60,10 @@ describe.skipIf(!process.env.DEEPSEEK_API_KEY)('DeepSeek Messages real API', () history.push(response.message) } await reply('PROMPT_FIRST') - history.push(createSystemMessage('Reply to every user message with exactly PROMPT_SECOND.', 'test'), user('Answer again.')) + history.push(createSystemMessage('Reply to every user message with exactly PROMPT_SECOND.'), user('Answer again.')) await reply('PROMPT_SECOND') const withoutSystem = history.filter(message => message.role !== 'system') - history.splice(0, history.length, createSystemMessage('', 'test'), ...withoutSystem, user('Reply with exactly PROMPT_CLEARED.')) + history.splice(0, history.length, createSystemMessage(''), ...withoutSystem, user('Reply with exactly PROMPT_CLEARED.')) await reply('PROMPT_CLEARED') }) diff --git a/packages/llm/llm-deepseek/tests/messages/adapter.spec.ts b/packages/llm/llm-deepseek/tests/messages/adapter.spec.ts index 6819dd5cd4..6a9fa25af6 100644 --- a/packages/llm/llm-deepseek/tests/messages/adapter.spec.ts +++ b/packages/llm/llm-deepseek/tests/messages/adapter.spec.ts @@ -52,10 +52,16 @@ async function send(agent: Agent, text: string) { expect(agent.session.snapshotEvents().at(-1)).toMatchObject({ type: 'turn/end', data: { reason: { kind: 'completed' } } }) } +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'saved-notice': { kind: 'saved-notice' } + } +} + describe('direct Messages HTTP', () => { it('continues through Messages with assistant blocks in saved user history', async () => { const http = await endpoint() - const notice = createUserMessage({ source: { kind: 'plugin', plugin: 'saved-notice' }, content: [ + const notice = createUserMessage({ source: { kind: 'saved-notice' }, content: [ { type: 'text', text: 'Background subagent finished.' }, { type: 'reasoning', text: 'child reasoning' }, { type: 'tool-call', id: ToolCallId('child-call'), name: 'read', arguments: '{}' }, @@ -353,9 +359,9 @@ describe('Cordis provider composition', () => { it('maps multiple system snapshots on direct compaction calls to the latest prompt', async () => { const { ctx, http } = await boot() - const history = [createSystemMessage('old', 'test'), user(), + const history = [createSystemMessage('old'), user(), createAssistantMessage({ content: [{ type: 'text', text: 'OK' }], source: { provider: 'deepseek-official', model: MODEL } }), - createSystemMessage('current', 'test'), user('summarize')] + createSystemMessage('current'), user('summarize')] const saved = JSON.stringify(history) const response = await assemble(ctx.llm.stream(options({ messages: history, purpose: 'compaction' }))) expect(response.assembler.finish.kind).toBe('stop') diff --git a/packages/llm/llm-deepseek/tests/messages/fixtures/input-history.ts b/packages/llm/llm-deepseek/tests/messages/fixtures/input-history.ts index dbfbad61bf..ca1d75e50b 100644 --- a/packages/llm/llm-deepseek/tests/messages/fixtures/input-history.ts +++ b/packages/llm/llm-deepseek/tests/messages/fixtures/input-history.ts @@ -6,6 +6,12 @@ import { createUserMessage, ToolCallId } from '@deepseek-ai/dsh-llm' import { resolveAdapterOptions } from '../../../src/config.ts' import { serialize } from '../../../src/protocols/messages/serialize.ts' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'messages-input-history-snapshot': { kind: 'messages-input-history-snapshot' } + } +} + export const name = 'messages-input-history-snapshot' export const inject = ['llm'] @@ -14,7 +20,7 @@ export function apply(ctx: Context): void { ctx.on('agent/pre-step', async (_input, next) => { const decision = await next() if (decision.kind !== 'enter') return decision - const source = { kind: 'plugin' as const, plugin: name } + const source = { kind: name } as const return { ...decision, messages: [ ...decision.messages, createUserMessage({ source, content: [ diff --git a/packages/llm/llm-deepseek/tests/messages/serialize.spec.ts b/packages/llm/llm-deepseek/tests/messages/serialize.spec.ts index 817f7ed8ea..63b4bb2518 100644 --- a/packages/llm/llm-deepseek/tests/messages/serialize.spec.ts +++ b/packages/llm/llm-deepseek/tests/messages/serialize.spec.ts @@ -1,7 +1,7 @@ /** Request conversion and durable replay validation. */ import { describe, expect, it, vi } from 'vitest' -import { createAssistantMessage, createMessage, createSystemMessage, createToolResultMessage, ReasoningEffortId, ToolCallId } from '@deepseek-ai/dsh-llm' -import type { ContentBlock, GenerateOptions, ImageBlock, Message } from '@deepseek-ai/dsh-llm' +import { createUserMessage, createAssistantMessage, createMessage, createSystemMessage, createToolResultMessage, ReasoningEffortId, ToolCallId } from '@deepseek-ai/dsh-llm' +import type { ContentBlock, GenerateOptions, ImageBlock, Message, RequestMessage, RequestUserInput } from '@deepseek-ai/dsh-llm' import { AttachmentId, ImageVariantId } from '@deepseek-ai/dsh-attachment' import type { AttachmentStore, ImageAttachmentRef, RequestImageAttachment } from '@deepseek-ai/dsh-attachment' import { resolveAdapterOptions } from '../../src/config.ts' @@ -16,17 +16,47 @@ const connection = resolveAdapterOptions({}) const call = (id = 'a'): ContentBlock => ({ type: 'tool-call', id: ToolCallId(id), name: 'read', arguments: '{"path":"a"}' }) const assistant = (content: ContentBlock[]) => createAssistantMessage({ content, source: { provider: 'deepseek-official', model: MODEL } }) const result = (id = 'a', content: ContentBlock[] = [{ type: 'text', text: 'result' }]) => createToolResultMessage({ callId: ToolCallId(id), content, isError: false }) -const body = (messages: Message[] = [user()], overrides: Partial = {}) => serialize( +const body = (messages: RequestMessage[] = [user()], overrides: Partial = {}) => serialize( options({ messages, ...overrides }), connection, messages, new Map(), () => undefined, ) const capable = resolveAdapterOptions({ models: [{ id: MODEL, systemPromptUpdate: 'in-history' }] }) const nativeBody = (messages: Message[]) => serialize(options({ messages }), capable, messages, new Map(), () => undefined) describe('Messages request conversion', () => { + it('preserves the exact request with request-only text after durable tool results', () => { + const prefix = [user(), assistant([call()]), result()] + const input: RequestUserInput = { role: 'user', content: [{ type: 'text', text: 'review or summarize this input' }] } + const durable = createUserMessage({ content: input.content, source: { kind: 'user' } }) + expect(body([...prefix, input], { system: 'policy' })).toEqual(body([...prefix, durable], { system: 'policy' })) + }) + + it('preserves request-only image content through image preparation and wire conversion', async () => { + const attachment: ImageAttachmentRef = { + attachmentId: AttachmentId(`sha256:${'e'.repeat(64)}`), mediaType: 'image/png', bytes: 3, width: 1, height: 1, + } + const version: RequestImageAttachment = { + variantId: ImageVariantId(`sha256:${'f'.repeat(64)}`), attachment, data: Uint8Array.of(1, 2, 3), + mediaType: 'image/png', bytes: 3, width: 1, height: 1, depth: 'uchar', space: 'srgb', hasAlpha: true, + } + const input: RequestUserInput = { role: 'user', content: [ + { type: 'text', text: 'before' }, { type: 'image', attachment }, { type: 'text', text: 'after' }, + ] } + const store = { readImageRequest: async () => version } as unknown as AttachmentStore + const vision = resolveAdapterOptions({ models: [{ id: MODEL, inputModalities: ['text', 'image'] }] }) + const durable = createUserMessage({ content: input.content, source: { kind: 'user' } }) + const actual = await prepareImages([input], vision, MODEL, store, () => undefined, new AbortController().signal) + const expected = await prepareImages([durable], vision, MODEL, store, () => undefined, new AbortController().signal) + expect(serialize(options({ messages: [input] }), vision, actual.messages, actual.versions, () => undefined)) + .toEqual(serialize(options({ messages: [durable] }), vision, expected.messages, expected.versions, () => undefined)) + expect(actual.messages[0]).toBe(input) + expect(input).not.toHaveProperty('id') + expect(input).not.toHaveProperty('source') + }) + it('keeps the original top-level prompt and cached prefix while appending native system updates', () => { - const head = createSystemMessage('original', 'test') + const head = createSystemMessage('original') const first = [head, user('first')] - const update = createSystemMessage('updated', 'test') + const update = createSystemMessage('updated') const second = [...first, assistant([{ type: 'text', text: 'one' }]), update, user('second')] const saved = JSON.stringify(second) const before = nativeBody(first) @@ -43,8 +73,8 @@ describe('Messages request conversion', () => { }) it('places system updates after all parallel tool results and before the next assistant', () => { - const history = [createSystemMessage('original', 'test'), user(), assistant([call(), call('b')]), - createSystemMessage('first update', 'test'), result(), createSystemMessage('second update', 'test'), result('b'), + const history = [createSystemMessage('original'), user(), assistant([call(), call('b')]), + createSystemMessage('first update'), result(), createSystemMessage('second update'), result('b'), user('more input'), assistant([{ type: 'text', text: 'done' }])] const request = nativeBody(history) expect(request.messages.map(message => message.role)).toEqual(['user', 'assistant', 'user', 'system', 'system', 'assistant']) @@ -55,20 +85,20 @@ describe('Messages request conversion', () => { }) it('accepts native trailing updates without a top-level prompt and rejects unrepresentable positions', () => { - const update = createSystemMessage('update', 'test') + const update = createSystemMessage('update') expect(nativeBody([user(), update])).toMatchObject({ messages: [ { role: 'user' }, { role: 'system', content: [{ type: 'text', text: 'update' }] }, ] }) expect(nativeBody([user(), update]).system).toBeUndefined() expect(() => nativeBody([user(), assistant([{ type: 'text', text: 'done' }]), update])).toThrow(/preceding user/) - expect(() => nativeBody([user(), createSystemMessage('', 'test')])).toThrow(/empty in-history/) + expect(() => nativeBody([user(), createSystemMessage('')])).toThrow(/empty in-history/) expect(() => nativeBody([user(), assistant([call(), call('b')]), update, result()])).toThrow(/immediate results/) }) it.each([[], [{ type: 'reasoning', text: 'child reasoning' }], [call('child-call')]] satisfies ContentBlock[][])( 'rejects native system updates when their user input is omitted %#', (...content) => { const empty = createMessage({ role: 'user', source: { kind: 'user' }, content }) - const history = [user(), assistant([{ type: 'text', text: 'answer' }]), createSystemMessage('updated', 'test'), empty] + const history = [user(), assistant([{ type: 'text', text: 'answer' }]), createSystemMessage('updated'), empty] const saved = JSON.stringify(history) for (const messages of [history, [...history, assistant([{ type: 'text', text: 'next answer' }])]]) { expect(() => nativeBody(messages)).toThrow(expect.objectContaining({ @@ -83,7 +113,7 @@ describe('Messages request conversion', () => { it('keeps native system updates after retained text or tool results beside omitted user input', () => { const reasoning: ContentBlock = { type: 'reasoning', text: 'child reasoning' } const empty = createMessage({ role: 'user', source: { kind: 'user' }, content: [reasoning] }) - const update = createSystemMessage('updated', 'test') + const update = createSystemMessage('updated') for (const [previous, retained, expected] of [ [assistant([{ type: 'text', text: 'answer' }]), user('continue'), [{ type: 'text', text: 'continue' }]], [assistant([call()]), result('a', [reasoning]), [{ type: 'tool_result', tool_use_id: 'a', content: [], is_error: false }]], @@ -167,7 +197,7 @@ describe('Messages request conversion', () => { }) it('collects leading system text and maps tools, stop sequences and explicit output cap', () => { - const system = createMessage({ role: 'system', source: { kind: 'plugin', plugin: 'test' }, content: [{ type: 'text', text: 'instructions' }] }) + const system = createMessage({ role: 'system', source: { kind: 'system-prompt' }, content: [{ type: 'text', text: 'instructions' }] }) expect(body([system, user()], { system: 'top', maxTokens: 123, stop: ['END'], tools: [{ name: 'read', description: 'Read a file', parameters: { type: 'object' } }] })).toMatchObject({ system: 'top\n\ninstructions', max_tokens: 123, stop_sequences: ['END'], tools: [{ name: 'read', description: 'Read a file', input_schema: { type: 'object' } }], }) @@ -176,9 +206,9 @@ describe('Messages request conversion', () => { it('uses the latest complete system snapshot without changing tool history or durable messages', () => { const conversation = [user(), assistant([call()]), result(), assistant([{ type: 'text', text: 'done' }]), user('continue')] - const history = [createSystemMessage('obsolete', 'test'), ...conversation.slice(0, 2), - createSystemMessage('intermediate', 'test'), ...conversation.slice(2, 4), - createSystemMessage('current', 'test'), conversation[4]!] + const history = [createSystemMessage('obsolete'), ...conversation.slice(0, 2), + createSystemMessage('intermediate'), ...conversation.slice(2, 4), + createSystemMessage('current'), conversation[4]!] const saved = JSON.stringify(history) expect(body(history)).toEqual({ ...body(conversation), system: 'current' }) expect(body(history, { system: 'one-shot prefix' }).system).toBe('one-shot prefix\n\ncurrent') @@ -186,22 +216,22 @@ describe('Messages request conversion', () => { }) it('replaces adjacent system snapshots and joins blocks only within the current snapshot', () => { - const latest = createMessage({ role: 'system', source: { kind: 'plugin', plugin: 'test' }, + const latest = createMessage({ role: 'system', source: { kind: 'system-prompt' }, content: [{ type: 'text', text: 'part one' }, { type: 'text', text: ' and part two' }] }) - expect(body([createSystemMessage('old', 'test'), latest, user()]).system).toBe('part one and part two') + expect(body([createSystemMessage('old'), latest, user()]).system).toBe('part one and part two') }) it.each([[], [{ type: 'text' as const, text: '' }]].map(content => ({ content })))('clears earlier prompt snapshots with empty content %#', ({ content }) => { - const cleared = createMessage({ role: 'system', source: { kind: 'plugin', plugin: 'test' }, content }) - const history = [createSystemMessage('old', 'test'), user(), cleared] + const cleared = createMessage({ role: 'system', source: { kind: 'system-prompt' }, content }) + const history = [createSystemMessage('old'), user(), cleared] expect(body(history).system).toBeUndefined() expect(body(history, { system: 'one-shot prefix' }).system).toBe('one-shot prefix') expect(body(history, { system: '' }).system).toBeUndefined() }) it('rejects non-text system content even when a later snapshot supersedes it', () => { - const invalid = createMessage({ role: 'system', source: { kind: 'plugin', plugin: 'test' }, content: [{ type: 'reasoning', text: 'bad' }] }) - expect(() => body([invalid, user(), createSystemMessage('current', 'test')])).toThrow(/non-text system/) + const invalid = createMessage({ role: 'system', source: { kind: 'system-prompt' }, content: [{ type: 'reasoning', text: 'bad' }] }) + expect(() => body([invalid, user(), createSystemMessage('current')])).toThrow(/non-text system/) }) it.each(['off', 'low', 'high', 'max'])('maps reasoning effort %s', (effort) => { diff --git a/packages/llm/llm-deepseek/tests/serialize.spec.ts b/packages/llm/llm-deepseek/tests/serialize.spec.ts index 59ec241f40..1765d6c866 100644 --- a/packages/llm/llm-deepseek/tests/serialize.spec.ts +++ b/packages/llm/llm-deepseek/tests/serialize.spec.ts @@ -2,7 +2,8 @@ import { describe, expect, it, vi } from 'vitest' import { AttachmentId, ImageVariantId } from '@deepseek-ai/dsh-attachment' import type { ImageAttachmentRef, ImageMediaType, RequestImageAttachment } from '@deepseek-ai/dsh-attachment' import { createToolResultMessage, createUserMessage, ToolCallId, ReasoningEffortId, createMessage } from '@deepseek-ai/dsh-llm' -import type { ContentBlock, GenerateOptions, Message } from '@deepseek-ai/dsh-llm' +import type { ContentBlock, GenerateOptions, Message, RequestUserInput } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' import { serializeMessages, serializeMessagesWithImages, @@ -11,6 +12,12 @@ import { } from '../src/protocols/chat-completions/serialize.ts' import type { ImageSerializationOptions } from '../src/protocols/chat-completions/serialize.ts' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'test': { kind: 'test' } & ContextFormed + } +} + type FileResolver = Extract['resolveFileId'] function request(overrides: Partial = {}): GenerateOptions { @@ -78,6 +85,33 @@ function inlineImageOptions( } } +describe('request-only user input', () => { + it('preserves the exact text request and durable tool-result prefix', () => { + const prefix = [ + createMessage({ role: 'assistant', content: [{ type: 'tool-call', id: ToolCallId('lookup'), name: 'lookup', arguments: '{}' }], + source: { kind: 'model', provider: 'deepseek-official', model: 'deepseek-v4-flash' } }), + createToolResultMessage({ callId: ToolCallId('lookup'), content: [{ type: 'text', text: 'result' }], isError: false }), + ] + const input: RequestUserInput = { role: 'user', content: [{ type: 'text', text: 'review or summarize this input' }] } + const durable = createUserMessage({ content: input.content, source: { kind: 'test' } }) + expect(serializeRequest(request({ messages: [...prefix, input], system: 'policy' }))) + .toEqual(serializeRequest(request({ messages: [...prefix, durable], system: 'policy' }))) + }) + + it('preserves image ordering and bytes without manufacturing durable metadata', async () => { + const ref = imageRef() + const input: RequestUserInput = { role: 'user', content: [ + { type: 'text', text: 'before' }, { type: 'image', attachment: ref }, { type: 'text', text: 'after' }, + ] } + const durable = createUserMessage({ content: input.content, source: { kind: 'test' } }) + const actual = await serializeRequestWithImages(request({ messages: [input] }), inlineImageOptions([ref])) + const expected = await serializeRequestWithImages(request({ messages: [durable] }), inlineImageOptions([ref])) + expect(actual).toEqual(expected) + expect(input).not.toHaveProperty('id') + expect(input).not.toHaveProperty('source') + }) +}) + describe('serializeMessages', () => { it('maps user text to string content', () => { const wire = serializeMessages([ @@ -93,7 +127,7 @@ describe('serializeMessages', () => { const wire = serializeMessages([ createMessage({ role: 'system', content: [{ type: 'text', text: 'be brief' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'system-prompt' }, }), ]) expect(wire).toEqual([{ role: 'system', content: 'be brief' }]) @@ -174,7 +208,7 @@ describe('serializeMessages', () => { const wire = serializeMessages([ createUserMessage({ content: [{ type: 'text', text: 'context note' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, }), createToolResultMessage({ callId: ToolCallId('call-1'), @@ -210,14 +244,14 @@ describe('serializeMessages', () => { mediaType: 'image/png', bytes: 68, width: 1, height: 1, }, }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, })])).toThrow(expect.objectContaining({ code: 'UNSUPPORTED_CONTENT' })) }) it('emits an empty user message rather than dropping block-less messages', () => { const wire = serializeMessages([createUserMessage({ content: [], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, })]) expect(wire).toEqual([{ role: 'user', content: '' }]) }) @@ -226,7 +260,7 @@ describe('serializeMessages', () => { describe('serializeRequest', () => { const history: Message[] = [createUserMessage({ content: [{ type: 'text', text: 'hi' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, })] it('always streams with usage and maps the basics', () => { @@ -249,7 +283,7 @@ describe('serializeRequest', () => { const systemMessage = createMessage({ role: 'system', content: [{ type: 'text', text: 'be helpful' }], - source: { kind: 'plugin', plugin: '@deepseek-ai/dsh-system-prompt' }, + source: { kind: 'system-prompt' }, }) const tools = [{ name: 'f', description: 'F', parameters: { type: 'object', properties: {} } }] const fromHistory = serializeRequest(request({ messages: [systemMessage, ...history], tools })) @@ -463,7 +497,7 @@ describe('image serialization', () => { const ref = imageRef() await expect(serializeMessagesWithImages([createUserMessage({ content: [{ type: 'image', attachment: ref }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, })], imageOptions([]))).rejects.toMatchObject({ code: 'INVALID_REQUEST' }) }) @@ -518,7 +552,7 @@ describe('image serialization', () => { { type: 'text', text: '' }, { type: 'chart', data: 'ignored' } as unknown as ContentBlock, ], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, }), createToolResultMessage({ callId: ToolCallId('result'), @@ -560,7 +594,7 @@ describe('image serialization', () => { createMessage({ role: 'system', content: [{ type: 'text', text: 'system history' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'system-prompt' }, }), imageResult('before-assistant'), createMessage({ @@ -647,7 +681,7 @@ describe('image serialization', () => { ...Array.from({ length: 11 }, () => ({ type: 'image' as const, attachment: ref, offloaded: true as const })), ...Array.from({ length: 10 }, () => ({ type: 'image' as const, attachment: ref })), ], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, })], }), inlineImageOptions([ref], 80, 40)) const content = wire.messages[0]?.content @@ -669,7 +703,7 @@ describe('image serialization', () => { const resolveFileId = vi.fn() const content: ContentBlock[] = [{ type: 'image', attachment: imageRef() }] const message = role === 'system' - ? createMessage({ role, content, source: { kind: 'plugin', plugin: 'test' } }) + ? createMessage({ role, content, source: { kind: 'system-prompt' } }) : createMessage({ role, content, source: { kind: 'model', provider: 'deepseek-official', model: 'deepseek-v4-flash' } }) await expect(serializeMessagesWithImages([message], imageOptions([imageRef()], resolveFileId))) .rejects.toMatchObject({ code: 'UNSUPPORTED_CONTENT' }) @@ -682,7 +716,7 @@ describe('image serialization', () => { messages: [createMessage({ role: 'system', content: [{ type: 'image', attachment: imageRef('image/png', 300) }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'system-prompt' }, })], }), imageOptions([imageRef('image/png', 300)], resolveFileId, 1))) .rejects.toMatchObject({ code: 'UNSUPPORTED_CONTENT' }) @@ -707,7 +741,7 @@ describe('image serialization', () => { const resolveFileId = vi.fn(() => Promise.reject(failure)) await expect(serializeMessagesWithImages([createUserMessage({ content: [{ type: 'image', attachment: imageRef() }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, })], imageOptions([imageRef()], resolveFileId))) .rejects.toMatchObject({ code: 'ATTACHMENT_CORRUPT' }) }) @@ -717,7 +751,7 @@ describe('image serialization', () => { const resolveFileId = vi.fn(() => Promise.reject(failure)) await expect(serializeMessagesWithImages([createUserMessage({ content: [{ type: 'image', attachment: imageRef() }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, })], imageOptions([imageRef()], resolveFileId))).rejects.toBe(failure) }) }) diff --git a/packages/llm/llm-pi-ai/README.i18n.yaml b/packages/llm/llm-pi-ai/README.i18n.yaml index b601bf978c..175e1ab36e 100644 --- a/packages/llm/llm-pi-ai/README.i18n.yaml +++ b/packages/llm/llm-pi-ai/README.i18n.yaml @@ -2,5 +2,5 @@ # side as of the last confirmed-consistent state. Both languages carry equal authority; # after editing either side, bring the other along and re-record with: # pnpm run verify-translation-pairing --write packages/llm/llm-pi-ai/README.md -README.md: 2d43d17a381b73991f5bfc5ee0112fdbbfade119 -README.zh.md: abd26b01d088f6dcae697f242a60bea605c2c7a7 +README.md: 4b3297ab96c2c691f9bbf849d8e49cb10a126a6a +README.zh.md: b33381468891fa81b199cca40f22a59183f5076a diff --git a/packages/llm/llm-pi-ai/README.md b/packages/llm/llm-pi-ai/README.md index 2d43d17a38..4b3297ab96 100644 --- a/packages/llm/llm-pi-ai/README.md +++ b/packages/llm/llm-pi-ai/README.md @@ -27,6 +27,8 @@ English | [中文](README.zh.md) Mount this plugin when a composition routes model requests through pi-ai's provider catalogs or through gateways that pi-ai's installed catalog does not describe. The `providers` dictionary is the whole configuration surface: each key is the provider route name a request selects with `GenerateOptions.provider`. +The adapter accepts the LLM service's [request-only user inputs](../llm/README.md#use-this-package) alongside durable history. User identity and attribution do not enter pi-ai content; assistant replay metadata and tool-call correlation remain attached to durable messages. + ### When to choose it Choose this adapter when the same composition serves several providers, when a route needs pi-ai's catalog defaults with a few fields corrected, or when a hand-declared gateway must be reached through its own endpoint and protocol. Choose `dsh-llm-deepseek` for the direct DeepSeek route when the deployment needs no other provider. Both adapters can be mounted together because their route names do not collide; registering a route another adapter already owns fails plugin loading. diff --git a/packages/llm/llm-pi-ai/README.zh.md b/packages/llm/llm-pi-ai/README.zh.md index abd26b01d0..b333814688 100644 --- a/packages/llm/llm-pi-ai/README.zh.md +++ b/packages/llm/llm-pi-ai/README.zh.md @@ -27,6 +27,8 @@ kind: "package-reference" 当组合需要通过 pi-ai 的提供方目录、或通过 pi-ai 已安装目录未描述的网关路由模型请求时挂载本插件。`providers` 字典就是整个配置面:每个键都是请求用 `GenerateOptions.provider` 选择的提供方路由名。 +适配器接受 LLM 服务的[仅供请求使用的 user 输入](../llm/README.zh.md#use-this-package),并可将其与持久历史混用。user 身份与来源不会进入 pi-ai 内容;assistant 回放元数据和工具调用关联仍由持久消息携带。 + ### 何时选择 当同一组合服务多个提供方、某条路由需要 pi-ai 目录默认值并修正少数字段、或必须通过自有端点与协议到达手工声明网关时,选择本适配器。当部署不需要其他提供方时,选择 `dsh-llm-deepseek` 直连 DeepSeek 路由。两个适配器可以同时挂载,因为它们的路由名不冲突;注册其他适配器已拥有的路由会导致插件加载失败。 diff --git a/packages/llm/llm-pi-ai/src/context.ts b/packages/llm/llm-pi-ai/src/context.ts index 7d9aab7db4..20f2bd60c4 100644 --- a/packages/llm/llm-pi-ai/src/context.ts +++ b/packages/llm/llm-pi-ai/src/context.ts @@ -6,7 +6,7 @@ import { brandString } from '@deepseek-ai/dsh-brand' import { contentHasImage, IMAGE_OFFLOAD_REQUIRED_CODE, LlmError, offloadedImageText, projectOffloadedImages, requestImageHandleText, requiredImageOffload } from '@deepseek-ai/dsh-llm' -import type { ContentBlock, GenerateOptions, ImageAttachmentAccessResolver, Message, ToolCallId } from '@deepseek-ai/dsh-llm' +import type { ContentBlock, GenerateOptions, ImageAttachmentAccessResolver, Message, RequestMessage, ToolCallId } from '@deepseek-ai/dsh-llm' import type { AttachmentId, AttachmentStore, @@ -20,7 +20,7 @@ import { requestImageDimensions } from '@deepseek-ai/dsh-attachment' import { DEFAULT_REQUEST_IMAGE_MAX_BYTES, DEFAULT_REQUEST_IMAGE_PIXEL_BUDGET } from './config.ts' /** Join the text blocks of a harness message. */ -function flattenText(message: Message): string { +function flattenText(message: RequestMessage): string { return message.content .filter(block => block.type === 'text') .map(block => block.text) @@ -47,7 +47,7 @@ function toolResultOf( } /** Reject image roles that pi-ai cannot replay before request-size offloading can replace them. */ -function assertSupportedImageRoles(messages: readonly Message[]): void { +function assertSupportedImageRoles(messages: readonly RequestMessage[]): void { for (const message of messages) { if (message.role !== 'user' && message.role !== 'tool' && contentHasImage(message.content)) { throw new LlmError( @@ -103,7 +103,7 @@ function collectImageRefs( } async function prepareRequestImages( - messages: readonly Message[], + messages: readonly RequestMessage[], attachments: AttachmentStore, budget: PiImageRequestBudget, signal?: AbortSignal, @@ -136,7 +136,7 @@ interface SystemPromptSplit { /** Text for pi-ai's `systemPrompt`; `undefined` sends no system prompt. */ systemPrompt: string | undefined /** History messages that convert to pi-ai `messages`. */ - messages: readonly Message[] + messages: readonly RequestMessage[] } /** @@ -179,7 +179,7 @@ function appendAssistant( /** Append the system and assistant roles both context builders treat identically; true when consumed. */ function appendSystemOrAssistant( - message: Message, + message: RequestMessage, messages: PiMessage[], toolNames: Map, onReplayDegrade?: (reason: string) => void, diff --git a/packages/llm/llm-pi-ai/tests/catalog.spec.ts b/packages/llm/llm-pi-ai/tests/catalog.spec.ts index db40b17ed5..85534d6773 100644 --- a/packages/llm/llm-pi-ai/tests/catalog.spec.ts +++ b/packages/llm/llm-pi-ai/tests/catalog.spec.ts @@ -8,6 +8,7 @@ import type { StreamChunk } from '@deepseek-ai/dsh-llm' import FileSettingsProvider from '@deepseek-ai/dsh-settings-file' import * as LlmPiAi from '@deepseek-ai/dsh-llm-pi-ai' import { PiAiAdapter } from '@deepseek-ai/dsh-llm-pi-ai' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' import { getBuiltinModels } from '@earendil-works/pi-ai/providers/all' import { AssistantMessageEventStream } from '@earendil-works/pi-ai/utils/event-stream' import type { Api, Model, OpenAICompletionsCompat, Provider } from '@earendil-works/pi-ai' @@ -18,6 +19,12 @@ import { assemble } from './assemble.ts' import { memoryAuth } from './auth-double.ts' import { closeMockServers, mockServer, textEvents } from './mock-server.ts' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'test': { kind: 'test' } & ContextFormed + } +} + const homes: string[] = [] // Routes name their credential by reference; the value lives in the @@ -85,7 +92,7 @@ describe('hand-declared providers', () => { model: 'acme-large', messages: [createUserMessage({ content: [{ type: 'text', text: 'hi' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, })], }) diff --git a/packages/llm/llm-pi-ai/tests/context.spec.ts b/packages/llm/llm-pi-ai/tests/context.spec.ts index e39ae7ea7d..42f9024b63 100644 --- a/packages/llm/llm-pi-ai/tests/context.spec.ts +++ b/packages/llm/llm-pi-ai/tests/context.spec.ts @@ -7,11 +7,18 @@ import type { RequestImageAttachment, } from '@deepseek-ai/dsh-attachment' import { ToolCallId, createAssistantMessage, createMessage, createToolResultMessage, createUserMessage, offloadedImageText } from '@deepseek-ai/dsh-llm' -import type { ContentBlock, GenerateOptions, Message } from '@deepseek-ai/dsh-llm' +import type { ContentBlock, GenerateOptions, Message, RequestUserInput } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' import { toPiContext } from '../src/context.ts' import type { PiImageRequestContext } from '../src/context.ts' import { toPiAssistant } from '../src/replay.ts' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'test': { kind: 'test' } & ContextFormed + } +} + const ref: ImageAttachmentRef = { attachmentId: AttachmentId(`sha256:${'a'.repeat(64)}`), mediaType: 'image/png', @@ -67,16 +74,34 @@ function request(messages: GenerateOptions['messages']): GenerateOptions { } function user(content: ContentBlock[]): Message { - return createUserMessage({ content, source: { kind: 'plugin', plugin: 'test' } }) + return createUserMessage({ content, source: { kind: 'test' } }) } function history(role: 'system' | 'assistant', content: ContentBlock[]): Message { return role === 'system' - ? createMessage({ role, content, source: { kind: 'plugin', plugin: 'test' } }) + ? createMessage({ role, content, source: { kind: 'system-prompt' } }) : createMessage({ role, content, source: { kind: 'model', provider: 'openai', model: 'gpt-4.1' } }) } describe('pi-ai request context conversion', () => { + it('preserves the exact context for request-only input after durable tool history', async () => { + const prefix = [ + history('assistant', [{ type: 'tool-call', id: ToolCallId('lookup'), name: 'lookup', arguments: '{}' }]), + createToolResultMessage({ callId: ToolCallId('lookup'), content: [{ type: 'text', text: 'result' }], isError: false }), + ] + const input: RequestUserInput = { role: 'user', content: [{ type: 'text', text: 'review or summarize this input' }] } + const durable = createUserMessage({ content: input.content, source: { kind: 'test' } }) + expect(toPiContext(request([...prefix, input]))).toEqual(toPiContext(request([...prefix, durable]))) + const withImage: RequestUserInput = { role: 'user', content: [ + { type: 'text', text: 'before' }, { type: 'image', attachment: ref }, { type: 'text', text: 'after' }, + ] } + const durableImage = createUserMessage({ content: withImage.content, source: { kind: 'test' } }) + expect(await toPiContext(request([...prefix, withImage]), imageContext(attachments))) + .toEqual(await toPiContext(request([...prefix, durableImage]), imageContext(attachments))) + expect(withImage).not.toHaveProperty('id') + expect(withImage).not.toHaveProperty('source') + }) + it('omits absent and empty request-level optional fields', () => { const base = { provider: 'openai', model: 'gpt-4.1', messages: [] } expect(toPiContext(base)).toEqual({ messages: [] }) diff --git a/packages/llm/llm-pi-ai/tests/convert.spec.ts b/packages/llm/llm-pi-ai/tests/convert.spec.ts index c08e2eac34..4ca36d762a 100644 --- a/packages/llm/llm-pi-ai/tests/convert.spec.ts +++ b/packages/llm/llm-pi-ai/tests/convert.spec.ts @@ -80,7 +80,7 @@ describe('toPiContext', () => { system: 'be helpful', messages: [createUserMessage({ content: [{ type: 'text', text: 'hi' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, })], tools: [{ name: 'f', description: 'F', parameters: { type: 'object', properties: {} } }], }) @@ -113,7 +113,7 @@ describe('toPiContext', () => { model: 'gpt-4.1', messages: [createUserMessage({ content: [{ type: 'text', text: 'describe' }, { type: 'image', attachment }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, })], }, imageContext(attachmentStore(readImageRequest))) @@ -186,7 +186,7 @@ describe('toPiContext', () => { mediaType: 'image/png', bytes: 1, width: 1, height: 1, }, }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, })], })).toThrow(expect.objectContaining({ code: 'UNSUPPORTED_CONTENT' })) }) @@ -324,7 +324,7 @@ describe('toPiContext', () => { messages: [ createMessage({ role: 'system', content: [{ type: 'text', text: 'rule' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'system-prompt' }, }), createUserMessage({ content: [{ type: 'text', text: 'note' }], diff --git a/packages/llm/llm/README.i18n.yaml b/packages/llm/llm/README.i18n.yaml index 983bf7f806..dd6c4ee64e 100644 --- a/packages/llm/llm/README.i18n.yaml +++ b/packages/llm/llm/README.i18n.yaml @@ -2,5 +2,5 @@ # side as of the last confirmed-consistent state. Both languages carry equal authority; # after editing either side, bring the other along and re-record with: # pnpm run verify-translation-pairing --write packages/llm/llm/README.md -README.md: 3374d3cfde00face3f9f4c24d48019f309d3892e -README.zh.md: d59eeed383d86c1c43682de46ba893065c9186c9 +README.md: c2b79c08484cc9e321f8775ae5eb016859dac452 +README.zh.md: 798977588f3add0db37b90ff221bd843b3b15f3d diff --git a/packages/llm/llm/README.md b/packages/llm/llm/README.md index 3374d3cfde..c2b79c0848 100644 --- a/packages/llm/llm/README.md +++ b/packages/llm/llm/README.md @@ -9,7 +9,7 @@ English | [中文](README.zh.md) ## Summary -Use `@deepseek-ai/dsh-llm` to stream model calls through configured provider adapters, discover models, and resolve model capabilities and call defaults. Every dispatched request remains reconstructable from the session log. Requests are deep-frozen before dispatch, so extensions and adapters can read them but cannot rewrite them. Each stream is one provider attempt: provider-specific translation stays with its adapter, while the optional `@deepseek-ai/dsh-llm-retry` package re-runs failed requests. Streams always end with a terminal result, so callers can handle success, failure, and cancellation consistently. +Use `@deepseek-ai/dsh-llm` to stream model calls through configured provider adapters, discover models, and resolve model capabilities and call defaults. Callers must keep all model-visible input reconstructable from the session log. Loop-built requests arrive deep-frozen, so extensions and adapters cannot rewrite them. Each stream is one provider attempt: provider-specific translation stays with its adapter, while the optional `@deepseek-ai/dsh-llm-retry` package re-runs failed requests. Streams always end with a terminal result, so callers can handle success, failure, and cancellation consistently. ## Table of Contents @@ -48,7 +48,7 @@ A stream returns token-level chunks and always ends with one terminal `finish` c for await (const chunk of ctx.llm.stream({ provider: 'deepseek-official', model: 'deepseek-v4-flash', - messages: [createUserMessage({ content: [{ type: 'text', text: 'Hello' }] })], + messages: [{ role: 'user', content: [{ type: 'text', text: 'Hello' }] }], })) { // chunks: block-start, text-delta, ..., usage, finish } @@ -56,6 +56,8 @@ for await (const chunk of ctx.llm.stream({ After a successful mount, `ctx.llm.listProviders()` reports the registered routes in registration order. +`GenerateOptions.messages` accepts durable `Message` values and request-only `RequestUserInput` values. Request-only inputs carry user-role content with no `id` or `source`; Session writes and Agent delivery still require durable messages. Callers keep auxiliary inputs unchanged until the stream settles. A caller that records its exact request, such as session-title generation, must use durable messages. + ### What you can do - **Stream one model call** — `ctx.llm.stream(options)` yields raw chunks (token-level deltas) for any registered provider and model; consumers assemble them with `BlockAssembler`. @@ -81,7 +83,7 @@ This section explains the design behind the service; the observable behavior is ### Design philosophy -The service is built on one separation: **the logical contract is provider-neutral, adapters own the wire.** It defines the canonical message, content-block, and stream-chunk vocabulary once, and every provider adapter translates only its own wire format into that vocabulary. The registry is the topology owner — adapter routes, configurable-provider entries, and discovery offers all register here and are disposed with their fiber — while a request stays a pure function of the session log: loop-built requests arrive deep-frozen, so listeners and adapters read them and never rewrite them. +The service is built on one separation: **the logical contract is provider-neutral, adapters own the wire.** It defines the canonical message, content-block, and stream-chunk vocabulary once, and every provider adapter translates only its own wire format into that vocabulary. The registry is the topology owner — adapter routes, configurable-provider entries, and discovery offers all register here and are disposed with their fiber — while an agent-loop request stays a pure function of the session log: loop-built requests arrive deep-frozen, so listeners and adapters read them and never rewrite them. ### Source map @@ -101,13 +103,13 @@ The service is built on one separation: **the logical contract is provider-neutr ### Main flow -A request is validated against its exact model's capability — context window, output default, reasoning efforts, input modalities, and `systemPromptUpdate` mode — and any adapter-configured defaults are materialized, then the whole request is deep-frozen. `prepareCall()` binds those facts, detached context, and retry policy to the exact adapter generation that performs terminal dispatch, so HMR or dynamic settings cannot combine one generation's image capability with another generation's endpoint. An image-capable adapter projects durable references into route-specific request versions; `resolveImageAttachmentAccess()` separately maps an attachment provider's optional host object into the current tool execution world without changing the request image or its `variantId`. A text-only route receives deterministic per-image placeholders, including tool-role result images, without rewriting append-only session history. Durable `FileBlock` references never reach any adapter: request assembly replaces each one, including tool-role result occurrences, with deterministic handle text naming the file and its saved read-only path, resolved through the mounted attachment and filesystem providers. `ctx.llm.fileRequestText(ref)` exposes that exact synchronous projection to request measurement. An image occurrence derived with `offloaded: true` reaches every route as placeholder text through `projectOffloadedImages()`. An image-capable route whose retained occurrences exceed its `LlmImageRequestBudget` at their exact bytes fails with `IMAGE_OFFLOAD_REQUIRED` naming the additional oldest occurrences (`requiredImageOffload()`), never with an unlogged projection; `dsh-compaction-image-offload` logs the selected occurrences in one `image/offload` event and retries. Adapters that charge visual tokens declare per-route `imageRequestPricing`, which `ctx.llm.imageRequestPricing(provider, model)` resolves synchronously for the token meter. Dispatch goes through the `llm/stream` waterfall, then chunks return as token-level deltas and every adapter outcome reaches the consumer as one terminal `finish` chunk. +A request is validated against its exact model's capability — context window, output default, reasoning efforts, input modalities, and `systemPromptUpdate` mode — and any adapter-configured defaults are materialized. The runtime preserves freezing for already-frozen input; hand-built callers own input immutability. `prepareCall()` binds those facts, detached context, and retry policy to the exact adapter generation that performs terminal dispatch, so HMR or dynamic settings cannot combine one generation's image capability with another generation's endpoint. An image-capable adapter projects durable references into route-specific request versions; `resolveImageAttachmentAccess()` separately maps an attachment provider's optional host object into the current tool execution world without changing the request image or its `variantId`. A text-only route receives deterministic per-image placeholders, including tool-role result images, without rewriting append-only session history. Durable `FileBlock` references never reach any adapter: request assembly replaces each one, including tool-role result occurrences, with deterministic handle text naming the file and its saved read-only path, resolved through the mounted attachment and filesystem providers. `ctx.llm.fileRequestText(ref)` exposes that exact synchronous projection to request measurement. An image occurrence derived with `offloaded: true` reaches every route as placeholder text through `projectOffloadedImages()`. An image-capable route whose retained occurrences exceed its `LlmImageRequestBudget` at their exact bytes fails with `IMAGE_OFFLOAD_REQUIRED` naming the additional oldest occurrences (`requiredImageOffload()`), never with an unlogged projection; `dsh-compaction-image-offload` logs the selected occurrences in one `image/offload` event and retries. Adapters that charge visual tokens declare per-route `imageRequestPricing`, which `ctx.llm.imageRequestPricing(provider, model)` resolves synchronously for the token meter. Dispatch goes through the `llm/stream` waterfall, then chunks return as token-level deltas and every adapter outcome reaches the consumer as one terminal `finish` chunk. File detection reads current content, including tool-role result content, on every request without caching message identities or freeze state. The [file-scan decision](../../../.agents/notes/implemented/simplification/2026-09-07-file-content-scan.md) records the measured traversal cost. ### Invariants -- **Model-visible ⟺ logged** — anything that reaches a provider request is reconstructable from the session log; loop-built requests are deep-frozen and never rewritten. +- **Model-visible ⟺ logged** — callers must keep every provider request's model-visible input reconstructable from the session log; loop-built requests arrive deep-frozen and cannot be rewritten. - **Replay state travels only within one adapter** — assistant replay state rides along only when the same adapter instance owns the historical and target routes; otherwise it is dropped before dispatch. - **Prepared calls are one-shot** — a prepared call can be dispatched exactly once, and its call-config fields must match the prepared config. - **Image projection follows the captured route** — durable `ImageBlock` references become route-specific request versions only for image-capable models; text-only models receive stable placeholders. diff --git a/packages/llm/llm/README.zh.md b/packages/llm/llm/README.zh.md index d59eeed383..798977588f 100644 --- a/packages/llm/llm/README.zh.md +++ b/packages/llm/llm/README.zh.md @@ -9,7 +9,7 @@ kind: "package-reference" ## 概述 -使用 `@deepseek-ai/dsh-llm` 可通过已配置的提供方适配器流式调用模型、发现模型,并解析模型能力与调用默认值。每个已分发请求都可以从会话日志重建。请求在分发前会被深度冻结,因此扩展与适配器可以读取但不能改写。每个流只尝试调用提供方一次:提供方特定的转换由对应适配器完成,可选包 `@deepseek-ai/dsh-llm-retry` 负责重跑失败的请求。流始终以终止结果结束,因此调用方可以一致地处理成功、失败与取消。 +使用 `@deepseek-ai/dsh-llm` 可通过已配置的提供方适配器流式调用模型、发现模型,并解析模型能力与调用默认值。调用方必须确保所有模型可见输入都可以从会话日志重建。Loop 构建的请求以深度冻结状态到达,因此扩展与适配器不能改写。每个流只尝试调用提供方一次:提供方特定的转换由对应适配器完成,可选包 `@deepseek-ai/dsh-llm-retry` 负责重跑失败的请求。流始终以终止结果结束,因此调用方可以一致地处理成功、失败与取消。 ## 目录 @@ -48,7 +48,7 @@ kind: "package-reference" for await (const chunk of ctx.llm.stream({ provider: 'deepseek-official', model: 'deepseek-v4-flash', - messages: [createUserMessage({ content: [{ type: 'text', text: 'Hello' }] })], + messages: [{ role: 'user', content: [{ type: 'text', text: 'Hello' }] }], })) { // chunks: block-start, text-delta, ..., usage, finish } @@ -56,6 +56,8 @@ for await (const chunk of ctx.llm.stream({ 挂载成功后,`ctx.llm.listProviders()` 会按注册顺序报告已注册路由。 +`GenerateOptions.messages` 接受持久 `Message` 值和仅供请求使用的 `RequestUserInput` 值。仅供请求使用的输入包含 user-role 内容,不含 `id` 或 `source`;Session 写入和 Agent 投递仍然要求持久消息。调用方必须在流结束前保持辅助输入不变。会记录完整请求的调用方(例如会话标题生成)必须使用持久消息。 + ### 你可以做什么 - **流式发起一次模型调用**——`ctx.llm.stream(options)` 为任何已注册提供方与模型产出原始分片(token 级增量);消费方用 `BlockAssembler` 组装。 @@ -81,7 +83,7 @@ for await (const chunk of ctx.llm.stream({ ### 设计理念 -本服务基于一项职责分离原则:**逻辑约定是提供方无关的,适配器拥有协议。** 它一次性地定义规范消息、内容块与流式分片词汇,每个提供方适配器只把自己的协议格式翻译为该词汇。注册表是拓扑的拥有者——适配器路由、可配置提供方条目与发现 offer 都在这里注册,并随其 fiber 一起 dispose(资源释放)——而请求始终是会话日志的纯函数:loop 构建的请求以深度冻结状态到达,因此监听器与适配器只能读取,绝不能改写。 +本服务基于一项职责分离原则:**逻辑约定是提供方无关的,适配器拥有协议。** 它一次性地定义规范消息、内容块与流式分片词汇,每个提供方适配器只把自己的协议格式翻译为该词汇。注册表是拓扑的拥有者——适配器路由、可配置提供方条目与发现 offer 都在这里注册,并随其 fiber 一起 dispose(资源释放)——而 agent loop 的请求始终是会话日志的纯函数:loop 构建的请求以深度冻结状态到达,因此监听器与适配器只能读取,绝不能改写。 ### 源码地图 @@ -101,13 +103,13 @@ for await (const chunk of ctx.llm.stream({ ### 主流程 -请求会对照其精确模型的能力校验,包括上下文窗口、输出默认值、推理强度、输入模态与 `systemPromptUpdate` 模式,填入任何适配器配置的默认值,然后整个请求被深度冻结。`prepareCall()` 把这些事实、分离的上下文与重试策略绑定到执行最终分发的精确适配器代次,因此 HMR(热模块替换)或动态设置无法把一个代次的图片能力与另一代次的端点混用。支持图片的适配器把持久引用投影为路由专用请求版本;`resolveImageAttachmentAccess()` 会单独把附件提供方的可选宿主对象映射进当前工具执行世界,而不改变请求图片或其 `variantId`。纯文本路由接收确定性的逐图片占位符,包括 tool-role 结果图片,而不会改写仅追加会话历史。持久 `FileBlock` 引用永远不会到达任何适配器:请求组装把每个引用(包括 tool-role 结果中的出现)替换为确定性句柄文本,指出文件与其只读保存路径,路径经由挂载的附件与文件系统提供方解析。`ctx.llm.fileRequestText(ref)` 向请求计量公开相同的同步投影。派生后带有 `offloaded: true` 的图片出现位置,经 `projectOffloadedImages()` 以占位文本到达每条路由。支持图片的路由在保留的出现位置按精确字节超过其 `LlmImageRequestBudget` 时,以 `IMAGE_OFFLOAD_REQUIRED` 失败并说明还需省略多少最老的出现位置(`requiredImageOffload()`),绝不发送未记录的投影;`dsh-compaction-image-offload` 用一条 `image/offload` 事件记录所选位置并重试。对视觉 token 收费的适配器声明按路由的 `imageRequestPricing`,`ctx.llm.imageRequestPricing(provider, model)` 为 token meter 同步解析它。分发经过 `llm/stream` waterfall(瀑布式事件),随后分片以 token 级增量返回,每个适配器结果都以唯一一个终止 `finish` 分片到达消费方。 +请求会对照其精确模型的能力校验,包括上下文窗口、输出默认值、推理强度、输入模态与 `systemPromptUpdate` 模式,并填入任何适配器配置的默认值。运行时保留已冻结输入的冻结状态;手动构建请求的调用方负责保证输入不可变。`prepareCall()` 把这些事实、分离的上下文与重试策略绑定到执行最终分发的精确适配器代次,因此 HMR(热模块替换)或动态设置无法把一个代次的图片能力与另一代次的端点混用。支持图片的适配器把持久引用投影为路由专用请求版本;`resolveImageAttachmentAccess()` 会单独把附件提供方的可选宿主对象映射进当前工具执行世界,而不改变请求图片或其 `variantId`。纯文本路由接收确定性的逐图片占位符,包括 tool-role 结果图片,而不会改写仅追加会话历史。持久 `FileBlock` 引用永远不会到达任何适配器:请求组装把每个引用(包括 tool-role 结果中的出现)替换为确定性句柄文本,指出文件与其只读保存路径,路径经由挂载的附件与文件系统提供方解析。`ctx.llm.fileRequestText(ref)` 向请求计量公开相同的同步投影。派生后带有 `offloaded: true` 的图片出现位置,经 `projectOffloadedImages()` 以占位文本到达每条路由。支持图片的路由在保留的出现位置按精确字节超过其 `LlmImageRequestBudget` 时,以 `IMAGE_OFFLOAD_REQUIRED` 失败并说明还需省略多少最老的出现位置(`requiredImageOffload()`),绝不发送未记录的投影;`dsh-compaction-image-offload` 用一条 `image/offload` 事件记录所选位置并重试。对视觉 token 收费的适配器声明按路由的 `imageRequestPricing`,`ctx.llm.imageRequestPricing(provider, model)` 为 token meter 同步解析它。分发经过 `llm/stream` waterfall(瀑布式事件),随后分片以 token 级增量返回,每个适配器结果都以唯一一个终止 `finish` 分片到达消费方。 文件检测在每次请求时读取当前内容,包括 tool-role 结果内容,不缓存消息身份或冻结状态。[文件扫描决策](../../../.agents/notes/implemented/simplification/2026-09-07-file-content-scan.zh.md)记录了实测遍历成本。 ### 不变式 -- **模型可见 ⟺ 已记录**——到达提供方请求的任何内容都可以从会话日志重建;loop 构建的请求被深度冻结,绝不改写。 +- **模型可见 ⟺ 已记录**——调用方必须确保每个提供方请求中的模型可见输入都可以从会话日志重建;loop 构建的请求以深度冻结状态到达,不可改写。 - **回放状态只在同一适配器内流动**——仅当同一适配器实例同时拥有历史路由与目标路由时,assistant 回放状态才会随行;否则在分发前被丢弃。 - **已准备调用是一次性的**——已准备调用只能分发一次,且其调用配置字段必须与准备好的配置一致。 - **图片投影遵循捕获的路由**——只有支持图片的模型会把持久 `ImageBlock` 引用转换为路由专用请求版本;纯文本模型接收稳定占位符。 diff --git a/packages/llm/llm/src/content.ts b/packages/llm/llm/src/content.ts index 817660d91b..9d3758b209 100644 --- a/packages/llm/llm/src/content.ts +++ b/packages/llm/llm/src/content.ts @@ -1,6 +1,7 @@ /** Content-block structure helpers. @module @deepseek-ai/dsh-llm/content */ import type { ContentBlock, ImageBlock, LlmImageRequestBudget } from './types.ts' +import type { RequestMessage } from './types.ts' import type { Message } from './message.ts' import type { AttachmentStore, FileAttachmentRef, ImageAttachmentRef, ImageMediaType, RequestImageAttachment, @@ -174,7 +175,7 @@ function replaceFilesWithHandles( } /** - * Project durable file history into deterministic handle text for every model + * Project request file content into deterministic handle text for every model * route. Unlike images, no provider receives file blocks natively, so this * projection is unconditional in request assembly. * @param messages - complete request history. @@ -184,7 +185,21 @@ function replaceFilesWithHandles( export function projectFilesToText( messages: readonly Message[], resolvePath: (ref: FileAttachmentRef) => string | undefined, -): readonly Message[] { +): readonly Message[] +/** + * Project file content in mixed durable and request-only inputs. + * @param messages - complete request inputs. + * @param resolvePath - resolve a reference's execution-world read path. + * @returns original inputs without files, otherwise copies with handle text. + */ +export function projectFilesToText( + messages: readonly RequestMessage[], + resolvePath: (ref: FileAttachmentRef) => string | undefined, +): readonly RequestMessage[] +export function projectFilesToText( + messages: readonly RequestMessage[], + resolvePath: (ref: FileAttachmentRef) => string | undefined, +): readonly RequestMessage[] { if (!messages.some(message => contentHasFile(message.content))) return messages return messages.map((message) => { const content = replaceFilesWithHandles(message.content, resolvePath) @@ -236,7 +251,21 @@ function replaceOffloadedImages( export function projectOffloadedImages( messages: readonly Message[], placeholder: (ref: ImageAttachmentRef) => string, -): readonly Message[] { +): readonly Message[] +/** + * Project offloaded images in mixed durable and request-only inputs. + * @param messages - complete request inputs. + * @param placeholder - replacement text for an offloaded attachment. + * @returns original messages or shallow copies with placeholders. + */ +export function projectOffloadedImages( + messages: readonly RequestMessage[], + placeholder: (ref: ImageAttachmentRef) => string, +): readonly RequestMessage[] +export function projectOffloadedImages( + messages: readonly RequestMessage[], + placeholder: (ref: ImageAttachmentRef) => string, +): readonly RequestMessage[] { return messages.map((message) => { const content = replaceOffloadedImages(message.content, placeholder) return content === message.content ? message : { ...message, content } @@ -287,7 +316,7 @@ function offloadedImagePrefixCount( * @returns how many more leading retained occurrences to offload. */ export function requiredImageOffload( - messages: readonly Message[], + messages: readonly RequestMessage[], budget: Pick, versionBytes: (block: ImageBlock) => number, ): number { @@ -317,11 +346,18 @@ function replaceImagesForTextModel(blocks: readonly ContentBlock[]): ContentBloc } /** - * Project durable image history into deterministic text for an exact text-only model. + * Project request image content into deterministic text for an exact text-only model. * @param messages - complete request history. * @returns the original list without images, otherwise shallow message copies with stable placeholders. */ -export function projectImagesForTextModel(messages: readonly Message[]): readonly Message[] { +export function projectImagesForTextModel(messages: readonly Message[]): readonly Message[] +/** + * Project image content in mixed durable and request-only inputs for a text-only model. + * @param messages - complete request inputs. + * @returns original inputs without images, otherwise copies with stable placeholders. + */ +export function projectImagesForTextModel(messages: readonly RequestMessage[]): readonly RequestMessage[] +export function projectImagesForTextModel(messages: readonly RequestMessage[]): readonly RequestMessage[] { if (!messages.some(message => contentHasImage(message.content))) return messages return messages.map((message) => { const content = replaceImagesForTextModel(message.content) diff --git a/packages/llm/llm/src/index.ts b/packages/llm/llm/src/index.ts index e17e2011e7..5f633619ff 100644 --- a/packages/llm/llm/src/index.ts +++ b/packages/llm/llm/src/index.ts @@ -11,6 +11,7 @@ import { Remote, RemoteError, TypertRemoteService } from '@deepseek-ai/dsh-typer import { deepFreeze } from '@deepseek-ai/dsh-util-values' import type { GenerateOptions, + RequestMessage, LlmConfigurableProvider, LlmDiscoveredModel, LlmFailure, @@ -24,7 +25,7 @@ import type { StreamChunk, SystemPromptUpdate, } from './types.ts' -import { freezeMessage, type Message } from './message.ts' +import { freezeMessage } from './message.ts' import { resolveRetryPolicy } from './retry-policy.ts' import type { ResolvedRetryPolicy } from './retry-policy.ts' import type { ProviderRequestId } from './brand.ts' @@ -65,8 +66,8 @@ declare module '@deepseek-ai/cordis' { * process-local {@link markAgentLoopRequest} identity and arrives deep-frozen * (mutation throws): its content is a pure function of the session log (the * reconstructability Agent Note), so listeners read it, never rewrite it. - * Hand-built calls do not carry that marker; their messages already obey - * the immutable creation contract. + * Hand-built calls do not carry that marker; callers own their request + * inputs and must keep them unchanged until the stream settles. * @mode waterfall */ 'llm/stream'(this: LlmRuntime, options: GenerateOptions, next: () => AsyncIterable): AsyncIterable @@ -973,9 +974,10 @@ export class LlmRuntime extends TypertRemoteService { /** Remove replay state whose historical route is owned by another adapter. */ private forAdapter(options: GenerateOptions, adapter: LlmAdapter): GenerateOptions { - const messages: Message[] = options.messages.map((message) => { + const messages: RequestMessage[] = options.messages.map((message) => { + if (message.role !== 'assistant') return message const source = message.source - if (message.role !== 'assistant' || source.kind !== 'model' || source.replayState === undefined) return message + if (source.replayState === undefined) return message if (this.adapters.get(source.provider)?.adapter === adapter) return message return freezeMessage({ ...message, @@ -1045,7 +1047,7 @@ export class LlmRuntime extends TypertRemoteService { ? deepFreeze({ ...options, ...resolvedConfig }) : { ...options, ...resolvedConfig } // Files are never dispatched natively: every route receives handle text. - let projectedMessages: readonly Message[] = resolvedOptions.messages + let projectedMessages: readonly RequestMessage[] = resolvedOptions.messages if (projectedMessages.some(message => contentHasFile(message.content))) { projectedMessages = projectFilesToText(projectedMessages, ref => this.fileReadPath(ref)) } @@ -1057,8 +1059,8 @@ export class LlmRuntime extends TypertRemoteService { const projectedOptions = projectedMessages === resolvedOptions.messages ? resolvedOptions : Object.isFrozen(resolvedOptions) - ? deepFreeze({ ...resolvedOptions, messages: projectedMessages as Message[] }) - : { ...resolvedOptions, messages: projectedMessages as Message[] } + ? deepFreeze({ ...resolvedOptions, messages: projectedMessages as RequestMessage[] }) + : { ...resolvedOptions, messages: projectedMessages as RequestMessage[] } const stream = dispatch(this.forAdapter(projectedOptions, adapter)) iterator = stream[Symbol.asyncIterator]() } catch (error: unknown) { diff --git a/packages/llm/llm/src/message.ts b/packages/llm/llm/src/message.ts index 129bcc02ea..7d6698bb05 100644 --- a/packages/llm/llm/src/message.ts +++ b/packages/llm/llm/src/message.ts @@ -31,6 +31,11 @@ export interface ToolMessageSource { callId: ToolCallId } +/** Required source of a system-role message produced by the system-prompt plugin. */ +export interface SystemPromptMessageSource { + kind: 'system-prompt' +} + /** * The kind of information in producer-supplied context, declared by the * producer in the same `MessageSource`. @@ -96,14 +101,17 @@ export type ContextFormed = | { readonly form: 'recall' } /** - * Where a message (or injected content) came from. - * Merge-extensible sum type — plugins add their own `kind`s. + * Where a message (or injected content) came from, in the harness's own + * vocabulary. Merge-extensible sum type — each producer declares its own + * `kind` in its own module; there is no shared catch-all `plugin` kind. + * Model and tool sources answer their role messages; user messages carry any + * producer's kind, and consumers fall through unknown kinds. */ export interface MessageSourceMap { user: { kind: 'user' } - plugin: { kind: 'plugin'; plugin: string } & ContextFormed model: ModelMessageSource tool: ToolMessageSource + 'system-prompt': SystemPromptMessageSource } /** @@ -133,14 +141,16 @@ interface MessageBase { readonly id: MessageId /** Exact model-facing blocks. */ readonly content: readonly ContentBlock[] - /** Required source fields supplied by the producer. */ + /** Required source fields supplied by the producer. + * @persistenceSource user + */ readonly source: MessageSource } -/** A rendered system prompt attributed to its assembling plugin; empty content sends no prompt. */ +/** A rendered system prompt attributed to the system-prompt producer; empty content sends no prompt. */ export interface SystemMessage extends MessageBase { readonly role: 'system' - readonly source: MessageSourceMap['plugin'] + readonly source: MessageSourceMap['system-prompt'] } /** A user-role specialization of the shared message representation. */ @@ -246,14 +256,13 @@ export function createAssistantMessage( * Create and freeze one identified system-role message holding a rendered * system prompt. * @param text - the complete rendered prompt; `''` records "no system prompt". - * @param plugin - the plugin that assembled the prompt. * @returns an immutable system message with a fresh stable identity. */ -export function createSystemMessage(text: string, plugin: string): SystemMessage { +export function createSystemMessage(text: string): SystemMessage { return createMessage({ role: 'system', content: text.length === 0 ? [] : [{ type: 'text', text }], - source: { kind: 'plugin', plugin }, + source: { kind: 'system-prompt' }, }) } diff --git a/packages/llm/llm/src/types.ts b/packages/llm/llm/src/types.ts index cb1757f028..5e4145575b 100644 --- a/packages/llm/llm/src/types.ts +++ b/packages/llm/llm/src/types.ts @@ -7,7 +7,7 @@ import type { Branded } from '@deepseek-ai/dsh-brand' import type { FileAttachmentRef, ImageAttachmentRef } from '@deepseek-ai/dsh-attachment' import type { ToolCallId, ProviderRequestId, ReasoningEffortId } from './brand.ts' -import type { Message } from './message.ts' +import type { Message, UserMessage } from './message.ts' declare module '@deepseek-ai/cordis' { interface Events { @@ -442,6 +442,17 @@ export interface ToolSchema { parameters: Record } +/** User input for one LLM request; it has no durable Session identity or source. */ +export interface RequestUserInput { + readonly role: 'user' + readonly content: UserMessage['content'] + readonly id?: never + readonly source?: never +} + +/** A durable conversation message or a user input used only for one request. */ +export type RequestMessage = Message | RequestUserInput + /** A single model request, fully assembled. */ export interface GenerateOptions { /** Registered provider route selecting the adapter instance. */ @@ -453,9 +464,9 @@ export interface GenerateOptions { * Ordered conversation messages, exactly as the provider sees them. A * loop-built request passes the derived history (dsh-agent-loop), whose * leading system-role message carries the system prompt; a hand-built - * one-shot passes any list. + * one-shot may include identity-free user inputs. */ - messages: Message[] + messages: RequestMessage[] /** * System prompt text for one-shot callers; adapters map it to the provider's * system slot ahead of `messages`. Loop-built requests leave it undefined. diff --git a/packages/llm/llm/tests/content.spec.ts b/packages/llm/llm/tests/content.spec.ts index c01b3dbf1d..8e00ecfb44 100644 --- a/packages/llm/llm/tests/content.spec.ts +++ b/packages/llm/llm/tests/content.spec.ts @@ -15,9 +15,9 @@ import { resolveImageAttachmentAccess, requestImageHandleText, } from '../src/index.ts' -import type { ContentBlock } from '../src/index.ts' +import type { ContentBlock, RequestUserInput } from '../src/index.ts' -const source = { kind: 'plugin' as const, plugin: 'test' } +const source = { kind: 'test' as const } const OMITTED = '[omitted]' @@ -61,6 +61,17 @@ describe('requiredImageOffload traversal', () => { }) describe('projectOffloadedImages', () => { + it('keeps request-only inputs identity-free when replacing image content', () => { + const input: RequestUserInput = { role: 'user', content: [image(3, true)] } + expect(projectOffloadedImages([input], () => OMITTED)).toEqual([ + { role: 'user', content: [{ type: 'text', text: OMITTED }] }, + ]) + expect(projectImagesForTextModel([input])).toEqual([ + { role: 'user', content: [{ type: 'text', text: '[image omitted because this model accepts text only; attachment sha256:aaaaaaaa]' }] }, + ]) + expect(input.content).toEqual([image(3, true)]) + }) + it('keeps messages without offloaded occurrences by identity', () => { const messages = [createUserMessage({ content: [image(300)], source })] const projected = projectOffloadedImages(messages, () => OMITTED) @@ -313,6 +324,15 @@ describe('file projection', () => { } } + it('keeps request-only inputs identity-free when replacing file content', () => { + const block = fileBlock('review.txt') + const input: RequestUserInput = { role: 'user', content: [block] } + expect(projectFilesToText([input], () => '/copies/review.txt')).toEqual([ + { role: 'user', content: [{ type: 'text', text: fileHandleText(block.attachment, '/copies/review.txt') }] }, + ]) + expect(input.content).toEqual([block]) + }) + it('detects file blocks anywhere in message content', () => { expect(contentHasFile([{ type: 'text', text: 'x' }])).toBe(false) expect(contentHasFile([fileBlock('a.txt')])).toBe(true) diff --git a/packages/llm/llm/tests/message.spec.ts b/packages/llm/llm/tests/message.spec.ts index e600f6902f..54e532cc79 100644 --- a/packages/llm/llm/tests/message.spec.ts +++ b/packages/llm/llm/tests/message.spec.ts @@ -1,7 +1,10 @@ -import { describe, expect, it } from 'vitest' +import { describe, expect, expectTypeOf, it } from 'vitest' import { ToolCallId, + boundContextSummary, + CONTEXT_SUMMARY_MAX_CHARS, createAssistantMessage, + createSystemMessage, createToolResultMessage, createUserMessage, freezeMessage, @@ -9,10 +12,28 @@ import { } from '@deepseek-ai/dsh-llm' describe('message construction', () => { + it('bounds producer summaries while preserving summaries at the exact limit', () => { + const exact = 'x'.repeat(CONTEXT_SUMMARY_MAX_CHARS) + expect(boundContextSummary(exact)).toBe(exact) + expect(boundContextSummary(exact + 'x')).toBe(exact.slice(0, -1) + '…') + }) + + it('preserves system-prompt attribution on immutable system messages', () => { + const expectedSource: { kind: 'system-prompt' } = { kind: 'system-prompt' } + const message = createSystemMessage('rule') + expectTypeOf(message.source).toEqualTypeOf(expectedSource) + expect(message.role).toBe('system') + expect(message.content).toEqual([{ type: 'text', text: 'rule' }]) + expect(message.source).toEqual(expectedSource) + expect(Object.isFrozen(message)).toBe(true) + expect(Object.isFrozen(message.source)).toBe(true) + expect(createSystemMessage('').content).toEqual([]) + }) + it('assigns identity immediately and returns a detached deep-frozen message', () => { const input = { content: [{ type: 'text' as const, text: 'original' }], - source: { kind: 'plugin' as const, plugin: 'test' }, + source: { kind: 'test' as const }, } const message = createUserMessage(input) diff --git a/packages/llm/llm/tests/service.spec.ts b/packages/llm/llm/tests/service.spec.ts index 74265c6510..11011c5018 100644 --- a/packages/llm/llm/tests/service.spec.ts +++ b/packages/llm/llm/tests/service.spec.ts @@ -25,6 +25,13 @@ import type { SystemPromptUpdate, } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'test': { kind: 'test' } & ContextFormed + } +} + class ScriptedAdapter extends LlmAdapter { constructor(private script: StreamChunk[]) { super() @@ -1056,7 +1063,7 @@ describe('LlmRuntime', () => { model: 'text-only', messages: [createUserMessage({ content: [{ type: 'image', attachment }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, })], })) @@ -1071,7 +1078,7 @@ describe('LlmRuntime', () => { model: 'text-only', messages: [createUserMessage({ content: [{ type: 'image', attachment }], - source: { kind: 'plugin' as const, plugin: 'test' }, + source: { kind: 'test' as const }, })], }) await collect(ctx.llm.stream(frozen)) @@ -1229,6 +1236,29 @@ describe('LlmRuntime', () => { expect(adapter.lastOptions?.provider).toBe('routed') }) + it('dispatches identity-free user input beside durable assistant history', async () => { + const ctx = new Context() + await ctx.plugin(LlmRuntime) + ctx.llm.registerAdapter(['historical'], new RecordingAdapter(SCRIPT)) + const target = new RecordingAdapter(SCRIPT) + ctx.llm.registerAdapter(['target'], target) + const input = { role: 'user' as const, content: [{ type: 'text' as const, text: 'summarize' }] } + const assistant = createMessage({ + role: 'assistant', + content: [{ type: 'text', text: 'old response' }], + source: { kind: 'model', provider: 'historical', model: 'old-model', replayState: { private: 'state' } }, + }) + for await (const _chunk of ctx.llm.stream({ + provider: 'target', model: 'new-model', messages: [assistant, input], + })) { /* drain */ } + expect(target.lastOptions?.messages[1]).toBe(input) + expect(target.lastOptions?.messages[1]).toEqual({ role: 'user', content: [{ type: 'text', text: 'summarize' }] }) + expect(target.lastOptions?.messages[0]).toEqual({ + ...assistant, source: { kind: 'model', provider: 'historical', model: 'old-model' }, + }) + expect(assistant.source.replayState).toEqual({ private: 'state' }) + }) + it('keeps replay state when historical and target providers belong to the same adapter instance', async () => { const ctx = new Context() await ctx.plugin(LlmRuntime) diff --git a/packages/llm/token-meter/tests/context-breakdown-projection.spec.ts b/packages/llm/token-meter/tests/context-breakdown-projection.spec.ts index 3f172bd776..d6fee3cb04 100644 --- a/packages/llm/token-meter/tests/context-breakdown-projection.spec.ts +++ b/packages/llm/token-meter/tests/context-breakdown-projection.spec.ts @@ -5,6 +5,7 @@ import { afterEach, describe, expect, it } from 'vitest' import { Context } from '@deepseek-ai/cordis' import { createMessage, createSystemMessage, createUserMessage } from '@deepseek-ai/dsh-llm' import type { ContentBlock, ToolSchema } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' import SessionStore, { SessionLogOffset, SessionSeq } from '@deepseek-ai/dsh-session' import type { Session, SessionEvent, SessionSeq as SessionSeqType } from '@deepseek-ai/dsh-session' import SessionProjectionRegistry from '@deepseek-ai/dsh-session-projection' @@ -19,6 +20,12 @@ import { estimateToolsTokens, } from '../src/estimate.ts' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'test': { kind: 'test' } & ContextFormed + } +} + const contexts: Context[] = [] afterEach(async () => { await Promise.all(contexts.splice(0).map(ctx => ctx.fiber.dispose())) @@ -32,6 +39,8 @@ const TOOLS: ToolSchema[] = [{ parameters: { type: 'object', properties: {} }, }] +const SYSTEM_SOURCE = { kind: 'system-prompt' } as const + async function harness(): Promise<{ ctx: Context; session: Session }> { const ctx = new Context() contexts.push(ctx) @@ -54,14 +63,12 @@ function appendUser(session: Session, text: string): SessionSeqType { }), { surfaceOp: 'append' }).seq } -const SYSTEM_PLUGIN = '@deepseek-ai/dsh-system-prompt' - /** Append the rendered system prompt as surface node 0, the way the loop does before the first user message. */ function appendSystem(session: Session, text: string): SessionSeqType { return session.append('system/message', { turn: 1, step: 1, - message: createSystemMessage(text, SYSTEM_PLUGIN), + message: createSystemMessage(text), }, { surfaceOp: 'append' }).seq } @@ -70,7 +77,7 @@ function replaceSystem(session: Session, node: SessionSeqType, text: string): Se return session.append('system/message', { turn: 1, step: 1, - message: createSystemMessage(text, SYSTEM_PLUGIN), + message: createSystemMessage(text), }, { surfaceOp: { op: 'replace', startSeq: node, endSeq: node }, sourceEventSeqs: [node] }).seq } @@ -179,7 +186,7 @@ describe('contextBreakdown session projection', () => { appendSummaryMeter(ctx, session, question, followUp) const summary = createUserMessage({ content: [{ type: 'text', text: 'summary' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, }) session.append('user/message', summary, { surfaceOp: { op: 'replace', startSeq: question, endSeq: followUp }, @@ -231,7 +238,7 @@ describe('contextBreakdown session projection', () => { const second = appendUser(session, 'and a second entry') const summary = createUserMessage({ content: [{ type: 'text', text: 'summary' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, }) appendSummaryMeter(ctx, session, first, second) session.append('user/message', summary, { @@ -279,7 +286,7 @@ describe('contextBreakdown session projection', () => { expect(agree()).toBe(grown) session.append('user/message', createUserMessage({ content: [{ type: 'text', text: 'summary' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, }), { surfaceOp: { op: 'replace', startSeq: question, endSeq: answer }, sourceEventSeqs: [question, answer], @@ -313,7 +320,7 @@ describe('contextBreakdown session projection', () => { head = replaceSystem(session, head, 'head rewritten at a newer event seq') const agree = (text: string): void => { const view = projected(ctx, session) - expect(view.systemTokens).toBe(estimateSystemMessage(createSystemMessage(text, SYSTEM_PLUGIN))) + expect(view.systemTokens).toBe(estimateSystemMessage(createSystemMessage(text))) expect(view.messageTokens).toBeGreaterThanOrEqual(0) expect(view.systemTokens + view.messageTokens) .toBe(ctx.tokenMeter.measure(session).nodes.reduce((total, node) => total + node.heuristicTokens, 0)) @@ -372,7 +379,7 @@ describe('contextBreakdown session projection', () => { expect(Object.keys(state().nodes[0]!).sort()).toEqual(['heuristicTokens', 'seq', 'system']) const shadowed = [...session.surface.nodes] session.append('user/message', createUserMessage({ - content: [{ type: 'text', text: 'summary' }], source: { kind: 'user' }, + content: [{ type: 'text', text: 'summary' }], source: { kind: 'test' }, }), { surfaceOp: { op: 'replace', startSeq: first, endSeq: last }, sourceEventSeqs: shadowed }) expect(state().nodes).toHaveLength(1) expect(projected(ctx, session).messageTokens).toBe(10) @@ -500,16 +507,16 @@ describe('shared estimator', () => { }) it('prices the system node without block overhead and an empty prompt to zero', () => { - expect(estimateSystemMessage(createSystemMessage('', SYSTEM_PLUGIN))).toBe(0) - expect(estimateSystemMessage(createSystemMessage('abcdefgh', SYSTEM_PLUGIN))).toBe(6) + expect(estimateSystemMessage(createSystemMessage(''))).toBe(0) + expect(estimateSystemMessage(createSystemMessage('abcdefgh'))).toBe(6) // estimateMessage routes the system role to the same figure. - expect(estimateMessage(createSystemMessage('abcdefgh', SYSTEM_PLUGIN))).toBe(6) + expect(estimateMessage(createSystemMessage('abcdefgh'))).toBe(6) // A non-text block in a system message keeps a conservative JSON price. const image = { type: 'image', attachment: { attachmentId: 'a' } } as unknown as ContentBlock expect(estimateSystemMessage(createMessage({ role: 'system', content: [{ type: 'text', text: 'abcd' }, image], - source: { kind: 'plugin', plugin: SYSTEM_PLUGIN }, + source: SYSTEM_SOURCE, }))).toBe(Math.ceil((4 + JSON.stringify(image).length) / 4) + 4) }) diff --git a/packages/llm/token-meter/tests/token-meter.spec.ts b/packages/llm/token-meter/tests/token-meter.spec.ts index 08599680e1..b5a719fd3b 100644 --- a/packages/llm/token-meter/tests/token-meter.spec.ts +++ b/packages/llm/token-meter/tests/token-meter.spec.ts @@ -2,12 +2,19 @@ import { describe, expect, expectTypeOf, it } from 'vitest' import { Context } from '@deepseek-ai/cordis' import { AssistantStreamAccumulator, createAssistantMessage, createUserMessage, createSystemMessage, ToolCallId, createMessage } from '@deepseek-ai/dsh-llm' import type { ContentBlock, Message, TokenUsage } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' import SessionStore, { Session, SessionId, SessionSeq, canonicalHeader } from '@deepseek-ai/dsh-session' import type { EpochHeader, SessionEvent, SessionSeq as SessionSeqType } from '@deepseek-ai/dsh-session' import SessionProjectionRegistry from '@deepseek-ai/dsh-session-projection' import TokenMeter from '@deepseek-ai/dsh-token-meter' import type { TokenMeasurement, TokenMeterConfig } from '@deepseek-ai/dsh-token-meter' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'test': { kind: 'test' } & ContextFormed + } +} + function header(model: string, extras: Omit = {}): EpochHeader { return canonicalHeader({ config: { provider: 'mock', model }, ...extras }) } @@ -22,14 +29,12 @@ function appendHeader(session: Session, value: EpochHeader): void { session.append('request/header', { header: value, reason: 'initial' }) } -const SYSTEM_PLUGIN = '@deepseek-ai/dsh-system-prompt' - /** Append the rendered system prompt as surface node 0, the way the loop does. */ function appendSystem(session: Session, text: string): SessionSeqType { return session.append('system/message', { turn: 1, step: 1, - message: createSystemMessage(text, SYSTEM_PLUGIN), + message: createSystemMessage(text), }, { surfaceOp: 'append' }).seq } @@ -38,7 +43,7 @@ function replaceSystem(session: Session, node: SessionSeqType, text: string): Se return session.append('system/message', { turn: 1, step: 1, - message: createSystemMessage(text, SYSTEM_PLUGIN), + message: createSystemMessage(text), }, { surfaceOp: { op: 'replace', startSeq: node, endSeq: node }, sourceEventSeqs: [node] }).seq } @@ -321,7 +326,7 @@ describe('replay anchors and surface folds', () => { const assistant = anchored.nodes[1]!.seq session.append('user/message', createUserMessage({ content: [{ type: 'text', text: 'short' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, }), { surfaceOp: { op: 'replace', startSeq: assistant, endSeq: assistant }, sourceEventSeqs: [assistant], @@ -423,7 +428,7 @@ describe('replay anchors and surface folds', () => { const first = seeded.surface.nodes[0]! seeded.append('user/message', createUserMessage({ content: [{ type: 'text', text: 'replacement' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, }), { surfaceOp: { op: 'replace', startSeq: first, endSeq: first }, sourceEventSeqs: [first] }) const after = service.measure(seeded) expect(after.nodes).toHaveLength(2) diff --git a/packages/llm/token-meter/tests/token-usage-projection.spec.ts b/packages/llm/token-meter/tests/token-usage-projection.spec.ts index 34c00ab3dc..b34e6e31ff 100644 --- a/packages/llm/token-meter/tests/token-usage-projection.spec.ts +++ b/packages/llm/token-meter/tests/token-usage-projection.spec.ts @@ -8,8 +8,15 @@ import SessionProjectionRegistry from '@deepseek-ai/dsh-session-projection' import TokenMeter from '@deepseek-ai/dsh-token-meter' import type { ContextPressureProjection, TokenUsageProjection } from '@deepseek-ai/dsh-token-meter/client' import { RetryId } from '@deepseek-ai/dsh-llm-retry' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' import { CompactionId } from '@deepseek-ai/dsh-compaction' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'test': { kind: 'test' } & ContextFormed + } +} + const ZERO: TokenUsageProjection = { uncachedInputTokens: 0, outputTokens: 0, @@ -273,7 +280,7 @@ describe('tokenUsage session projection', () => { appendSummaryMeter(ctx, session, before.seq, before.seq) session.append('user/message', createUserMessage({ content: [{ type: 'text', text: 'compacted' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, }), { surfaceOp: { op: 'replace', startSeq: before.seq, endSeq: before.seq }, sourceEventSeqs: [before.seq], @@ -476,7 +483,7 @@ describe('contextPressure session projection', () => { appendSummaryMeter(ctx, session, question, grown) session.append('user/message', createUserMessage({ content: [{ type: 'text', text: 'summary' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, }), { surfaceOp: { op: 'replace', startSeq: question, endSeq: grown }, sourceEventSeqs: [question, answer, grown], @@ -494,7 +501,7 @@ describe('contextPressure session projection', () => { appendSummaryMeter(ctx, session, first, last) const target = endpoint === 'start' ? last : first session.append('user/message', createUserMessage({ - content: [{ type: 'text', text: 'summary' }], source: { kind: 'plugin', plugin: 'test' }, + content: [{ type: 'text', text: 'summary' }], source: { kind: 'test' }, }), { surfaceOp: { op: 'replace', startSeq: target, endSeq: target }, sourceEventSeqs: [target] }) expect(() => pressure(ctx, session)).toThrow('has no adjacent shadow price') } finally { @@ -512,7 +519,7 @@ describe('contextPressure session projection', () => { session.append('user/message', createUserMessage({ content: [{ type: 'text', text: 'summary without a preceding claim' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, }), { surfaceOp: { op: 'replace', startSeq: question, endSeq: question }, sourceEventSeqs: [question], @@ -533,7 +540,7 @@ describe('contextPressure session projection', () => { appendSummaryMeter(ctx, session, question, question) session.append('user/message', createUserMessage({ content: [{ type: 'text', text: '.' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, }), { surfaceOp: { op: 'replace', startSeq: question, endSeq: question }, sourceEventSeqs: [question], diff --git a/packages/plan/plan-mode/src/index.ts b/packages/plan/plan-mode/src/index.ts index f2c53c27a4..fd950296df 100644 --- a/packages/plan/plan-mode/src/index.ts +++ b/packages/plan/plan-mode/src/index.ts @@ -28,6 +28,7 @@ import { z as zod } from 'zod' import type { ZodType } from 'zod' import type { Agent, PreStepDecision } from '@deepseek-ai/dsh-agent' import { createUserMessage } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' import type { Session, UserMessage } from '@deepseek-ai/dsh-session' import { defineTool } from '@deepseek-ai/dsh-tools' import { UserQuestionError } from '@deepseek-ai/dsh-user-questions' @@ -35,6 +36,11 @@ import type { CommandDefinitionId, CommandId } from '@deepseek-ai/dsh-commands' import type {} from '@deepseek-ai/dsh-session-projection' import type { ProjectionDefinition } from '@deepseek-ai/dsh-session-projection' import type { PlanProjection, PlanUnitState } from './types.ts' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'plan-mode': { kind: 'plan-mode' } & ContextFormed + } +} export type * from './types.ts' declare module '@deepseek-ai/dsh-session/types' { @@ -458,7 +464,7 @@ export class PlanModeController extends Service { return createUserMessage({ content: [{ type: 'text', text }], // The narration is already one sentence, so it is its own summary. - source: { kind: 'plugin', plugin: 'plan-mode', form: 'notice', summary: text }, + source: { kind: 'plan-mode', form: 'notice', summary: text }, }) } } diff --git a/packages/plan/plan-mode/tests/integration.spec.ts b/packages/plan/plan-mode/tests/integration.spec.ts index ac0f22bc18..b1742a1ba2 100644 --- a/packages/plan/plan-mode/tests/integration.spec.ts +++ b/packages/plan/plan-mode/tests/integration.spec.ts @@ -124,7 +124,7 @@ describe('plan mode through the agent loop', () => { const result = findEvent(log, 'tool/result') expect(result.data.message.isError).toBe(false) expect(planActive(ctx, agent)).toBe(true) - expect(log.some(event => event.type === 'user/message' && event.data.source.kind === 'plugin')).toBe(false) + expect(log.some(event => event.type === 'user/message' && event.data.source.kind !== 'user')).toBe(false) }) it('a user flip between turns lands at the boundary: one notice and a replaced system node with stable tool schemas', async () => { @@ -149,7 +149,7 @@ describe('plan mode through the agent loop', () => { const log = agent.session.snapshotEvents() expect(planActive(ctx, agent)).toBe(true) - const notices = log.filter(event => event.type === 'user/message' && event.data.source.kind === 'plugin') + const notices = log.filter(event => event.type === 'user/message' && event.data.source.kind !== 'user') expect(notices).toHaveLength(1) expect(notices[0]?.type === 'user/message' && notices[0].data.content).toEqual([ { type: 'text', text: 'The user switched this session to plan mode.' }, @@ -218,7 +218,7 @@ describe('plan mode through the agent loop', () => { expect(systemNodes[1]?.sourceEventSeqs).toEqual([systemNodes[0]?.seq]) expect(nextStart?.seq).toBeLessThan(systemNodes[1]?.seq ?? 0) expect(systemText(agent)).toContain(PLAN_CONFIG.section) - const notice = log.find(event => event.type === 'user/message' && event.data.source.kind === 'plugin') + const notice = log.find(event => event.type === 'user/message' && event.data.source.kind !== 'user') expect(notice?.type === 'user/message' && notice.data.content).toEqual([ { type: 'text', text: 'The user switched this session to plan mode.' }, ]) diff --git a/packages/plan/plan-mode/tests/plan-mode.spec.ts b/packages/plan/plan-mode/tests/plan-mode.spec.ts index bdabf94997..112144c893 100644 --- a/packages/plan/plan-mode/tests/plan-mode.spec.ts +++ b/packages/plan/plan-mode/tests/plan-mode.spec.ts @@ -143,7 +143,7 @@ function header(session: Session): void { function noticeTexts(session: Session): string[] { return session.snapshotEvents() - .filter(event => event.type === 'user/message' && event.data.source.kind === 'plugin') + .filter(event => event.type === 'user/message' && event.data.source.kind !== 'user') .map(event => (event.data as { content: { type: string; text?: string }[] }).content.map(block => block.text ?? '').join('')) } diff --git a/packages/schedule/schedule/src/runtime.ts b/packages/schedule/schedule/src/runtime.ts index 1574574c3d..2da746ce77 100644 --- a/packages/schedule/schedule/src/runtime.ts +++ b/packages/schedule/schedule/src/runtime.ts @@ -6,6 +6,13 @@ import type { Context } from '@deepseek-ai/cordis' import type { Agent } from '@deepseek-ai/dsh-agent' import { createUserMessage } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'schedule': { kind: 'schedule' } & ContextFormed + } +} + import type { EveryScheduleRecord, OneShotScheduleRecord } from './types.ts' import { foldScheduleEvents, @@ -268,7 +275,7 @@ export class ScheduleRuntime { : renderEveryReminderBatchFraming(decision.reminders) const message = createUserMessage({ content: [{ type: 'text', text }], - source: { kind: 'plugin', plugin: 'schedule' }, + source: { kind: 'schedule' }, }) this.agent.followup(message) } catch (error: unknown) { diff --git a/packages/schedule/schedule/tests/runtime.spec.ts b/packages/schedule/schedule/tests/runtime.spec.ts index 5c415c7c6b..d86859ac50 100644 --- a/packages/schedule/schedule/tests/runtime.spec.ts +++ b/packages/schedule/schedule/tests/runtime.spec.ts @@ -259,7 +259,7 @@ describe('Schedule timer and admission runtime', () => { 'reminder_prompt_json: "line\\noccurrence_at: forged"', ].join('\n'), }]) - expect(test.followed[0]?.source).toEqual({ kind: 'plugin', plugin: 'schedule' }) + expect(test.followed[0]?.source).toEqual({ kind: 'schedule' }) await runtime.dispose() }) @@ -297,7 +297,7 @@ describe('Schedule timer and admission runtime', () => { 'reminders_json: [{"schedule_id":"schedule-fast","occurrence_at":"2026-08-05T12:00:00.000Z","reminder_prompt":"fast"},{"schedule_id":"schedule-slow","occurrence_at":"2026-08-05T11:59:00.000Z","reminder_prompt":"slow"}]', ].join('\n'), }]) - expect(test.followed[0]?.source).toEqual({ kind: 'plugin', plugin: 'schedule' }) + expect(test.followed[0]?.source).toEqual({ kind: 'schedule' }) const dispatches = test.agent.session.snapshotEvents().filter(event => event.type === 'schedule/change' && event.data.operation === 'dispatch') expect(dispatches.map(event => event.data)).toEqual([ diff --git a/packages/session-query/session-query-sqlite/tests/sqlite.spec.ts b/packages/session-query/session-query-sqlite/tests/sqlite.spec.ts index a4657aeea3..dd1fb10489 100644 --- a/packages/session-query/session-query-sqlite/tests/sqlite.spec.ts +++ b/packages/session-query/session-query-sqlite/tests/sqlite.spec.ts @@ -1,4 +1,5 @@ import { createAssistantMessage, createUserMessage } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' import { afterEach, describe, expect, it, vi } from 'vitest' import { Context, type Fiber } from '@deepseek-ai/cordis' import { DatabaseSync } from 'node:sqlite' @@ -34,6 +35,12 @@ import { type SessionSearchRequest, } from '@deepseek-ai/dsh-session-query' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'test': { kind: 'test' } & ContextFormed + } +} + const temporaryDirectories: string[] = [] afterEach(async () => { @@ -407,7 +414,7 @@ describe('SQLite session search', () => { }, }, { type: 'user/message', seq: SessionSeq(2), time: 12, data: createUserMessage({ - content: [{ type: 'text', text: 'needle summary' }], source: { kind: 'plugin', plugin: 'test' }, + content: [{ type: 'text', text: 'needle summary' }], source: { kind: 'test' }, }), surfaceOp: { op: 'replace', startSeq: SessionSeq(0), endSeq: SessionSeq(0) }, sourceEventSeqs: [SessionSeq(0)] }, { type: 'turn/end', seq: SessionSeq(3), time: 13, data: { turn: 1, reason: { kind: 'error', error: { message: 'needle failure', code: 'UNKNOWN' } } } }, ] diff --git a/packages/session-query/session-query/tests/search-helpers.spec.ts b/packages/session-query/session-query/tests/search-helpers.spec.ts index 4dac95c5c9..9f87f266c3 100644 --- a/packages/session-query/session-query/tests/search-helpers.spec.ts +++ b/packages/session-query/session-query/tests/search-helpers.spec.ts @@ -1,6 +1,7 @@ import { describe, expect, it } from 'vitest' import { Context } from '@deepseek-ai/cordis' import { createUserMessage, ToolCallId , createMessage, createToolResultMessage } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' import SessionStore, { SESSION_FORMAT_VERSION, SessionId, @@ -21,6 +22,12 @@ import { } from '@deepseek-ai/dsh-session-query' import { TestSessionQueryEngine } from './test-service.ts' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'test': { kind: 'test' } & ContextFormed + } +} + const id = SessionId('session') function header(value: string, extra: Partial = {}): SessionHeader { @@ -58,7 +65,7 @@ describe('session-query semantic extraction', () => { }), }, surfaceOp: 'append' }, { type: 'user/message', seq: SessionSeq(2), time: 3, data: createUserMessage({ - content: messageContent, source: { kind: 'plugin', plugin: 'test' }, + content: messageContent, source: { kind: 'test' }, }), surfaceOp: 'append' }, { type: 'tool/call', seq: SessionSeq(3), time: 5, data: { turn: 1, step: 1, callId, name: 'bash', arguments: '{"cmd":"pwd"}' } }, { @@ -169,7 +176,7 @@ describe('session-query document and filter helpers', () => { { type: 'user/message', seq: SessionSeq(2), time: 12, data: createUserMessage({ content: [{ type: 'text', text: 'replacement' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, }), surfaceOp: { op: 'replace', startSeq: SessionSeq(0), endSeq: SessionSeq(0) }, sourceEventSeqs: [SessionSeq(0)] }, @@ -245,7 +252,7 @@ describe('session-query document and filter helpers', () => { time: 1, data: createUserMessage({ content: [{ type: 'text', text: 'bad' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, }), surfaceOp: { op: 'replace', startSeq: SessionSeq(9), endSeq: SessionSeq(9) }, }] diff --git a/packages/session-query/session-query/tests/session-query.spec.ts b/packages/session-query/session-query/tests/session-query.spec.ts index e8837dc4b9..d6650e81b3 100644 --- a/packages/session-query/session-query/tests/session-query.spec.ts +++ b/packages/session-query/session-query/tests/session-query.spec.ts @@ -1,4 +1,5 @@ import { createUserMessage, createMessage } from '@deepseek-ai/dsh-llm' +import type { ContextFormed, MessageSource } from '@deepseek-ai/dsh-llm' import { describe, expect, it, vi } from 'vitest' import { Context, type Fiber } from '@deepseek-ai/cordis' import SessionStore, { SessionLogOffset, SessionSeq, SESSION_FORMAT_VERSION, SessionId } from '@deepseek-ai/dsh-session' @@ -25,6 +26,19 @@ import SessionQueryEngine, { import { SessionTitleProviderId, SessionTitleService } from '@deepseek-ai/dsh-session-title' import { TestSessionQueryEngine } from './test-service.ts' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'test': { kind: 'test' } & ContextFormed + } +} + +type CheckpointSource = Extract + +/** Build a typed checkpoint source for a query fixture without owning compaction. */ +function checkpointSource(compactionId: string): CheckpointSource { + return { kind: 'compact-checkpoint', compactionId: compactionId as CheckpointSource['compactionId'] } +} + const TITLE_SERVICE_CONFIG = { fallbackMaxWords: 8, fallbackMaxBytes: 64, maxTitleBytes: 256 } function header(id: string, createdAt = 1, extra: Partial = {}): SessionHeader { @@ -959,7 +973,7 @@ describe('session-query exact reads', () => { 'user/message', createUserMessage({ content: [{ type: 'text', text: 'replacement' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, }), { surfaceOp: { op: 'replace', startSeq: first.seq, endSeq: first.seq }, sourceEventSeqs: [first.seq] }, ) @@ -986,7 +1000,7 @@ describe('session-query exact reads', () => { session.append( 'user/message', createUserMessage({ - content: [{ type: 'text', text: 'checkpoint' }], source: { kind: 'plugin', plugin: 'compact' }, + content: [{ type: 'text', text: 'checkpoint' }], source: checkpointSource('query-compaction-1'), }), { surfaceOp: { op: 'replace', startSeq: first.seq, endSeq: first.seq }, sourceEventSeqs: [first.seq] }, ) @@ -1000,7 +1014,7 @@ describe('session-query exact reads', () => { session.append( 'user/message', createUserMessage({ - content: [{ type: 'text', text: 'latest checkpoint' }], source: { kind: 'plugin', plugin: 'compact' }, + content: [{ type: 'text', text: 'latest checkpoint' }], source: checkpointSource('query-compaction-2'), }), { surfaceOp: { op: 'replace', startSeq: SessionSeq(2), endSeq: retained.seq }, sourceEventSeqs: [SessionSeq(2), retained.seq] }, ) diff --git a/packages/session-query/session-query/tests/tracing.spec.ts b/packages/session-query/session-query/tests/tracing.spec.ts index 177edad1d7..8cdd8c4b84 100644 --- a/packages/session-query/session-query/tests/tracing.spec.ts +++ b/packages/session-query/session-query/tests/tracing.spec.ts @@ -1,4 +1,5 @@ import { createUserMessage, createMessage } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' import { describe, expect, it } from 'vitest' import { Context } from '@deepseek-ai/cordis' import SessionStore, { SessionLogOffset, SessionSeq, SESSION_FORMAT_VERSION, SessionId } from '@deepseek-ai/dsh-session' @@ -18,6 +19,12 @@ import type { import { type SessionQueryErrorCode } from '@deepseek-ai/dsh-session-query' import { TestSessionQueryEngine } from './test-service.ts' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'test': { kind: 'test' } & ContextFormed + } +} + type MutableSessionHeader = { -readonly [K in keyof SessionHeader]: SessionHeader[K] } /** Test-only mutable view used to verify detached returned metadata. */ @@ -158,7 +165,7 @@ function appendTraceEvents(session: Session): void { 'user/message', createUserMessage({ content: [{ type: 'text', text: 'summary one' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, }), { surfaceOp: { op: 'replace', startSeq: SessionSeq(3), endSeq: SessionSeq(3) }, @@ -168,7 +175,7 @@ function appendTraceEvents(session: Session): void { session.append( 'user/message', createUserMessage({ - content: [{ type: 'text', text: 'context' }], source: { kind: 'plugin', plugin: 'test' }, + content: [{ type: 'text', text: 'context' }], source: { kind: 'test' }, }), { surfaceOp: 'append' }, ) @@ -178,7 +185,7 @@ function appendTraceEvents(session: Session): void { 'user/message', createUserMessage({ content: [{ type: 'text', text: 'summary two' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, }), { surfaceOp: { op: 'replace', startSeq: SessionSeq(4), endSeq: SessionSeq(4) }, @@ -378,7 +385,7 @@ describe('session event tracing', () => { live.append( 'user/message', createUserMessage({ - content: [{ type: 'text', text: 'live' }], source: { kind: 'plugin', plugin: 'test' }, + content: [{ type: 'text', text: 'live' }], source: { kind: 'test' }, }), { surfaceOp: 'append' }, ) diff --git a/packages/session-query/tool-session-query/tests/tool-session-query.spec.ts b/packages/session-query/tool-session-query/tests/tool-session-query.spec.ts index c127c2a127..3d11ad3f85 100644 --- a/packages/session-query/tool-session-query/tests/tool-session-query.spec.ts +++ b/packages/session-query/tool-session-query/tests/tool-session-query.spec.ts @@ -2,6 +2,7 @@ import { afterEach, describe, expect, it, vi } from 'vitest' import { Context, type Fiber } from '@deepseek-ai/cordis' import type { Agent } from '@deepseek-ai/dsh-agent' import { createUserMessage, ToolCallId, HarnessError , createMessage } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' import { MAX_TIMER_DELAY_MS, TimeoutReason } from '@deepseek-ai/dsh-timeout' import * as TimeoutPolicy from '@deepseek-ai/dsh-tool-call-timeout-policy' import SessionStore, { @@ -32,6 +33,12 @@ import SystemPrompt from '@deepseek-ai/dsh-system-prompt' import ToolRuntime, { type ToolExecutionResult } from '@deepseek-ai/dsh-tools' import * as ToolSessionQuery from '@deepseek-ai/dsh-tool-session-query' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'test': { kind: 'test' } & ContextFormed + } +} + const activeContexts: Context[] = [] afterEach(async () => { @@ -1221,7 +1228,7 @@ describe('workspace authority and lineage redaction', () => { 'context/message', { content: [{ type: 'text', text: 'same-id moved secret' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, }, ) const window = await mounted.ctx.sessionQuery.readEvent({ @@ -1995,7 +2002,7 @@ describe('trace and exact read rendering', () => { 'user/message', createUserMessage({ content: [{ type: 'text', text: 'replacement' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, }), { surfaceOp: { op: 'replace', startSeq: SessionSeq(0), endSeq: SessionSeq(0) }, @@ -2042,7 +2049,7 @@ describe('trace and exact read rendering', () => { ) => SessionEvent appendLegacy( 'context/message', - { content: [{ type: 'text', text: 'after semantic text' }], source: { kind: 'plugin', plugin: 'test' } }, + { content: [{ type: 'text', text: 'after semantic text' }], source: { kind: 'test' } }, ) const result = await mounted.call('session_event_read', { session_id: session.id, diff --git a/packages/session/session-format-catalog/tests/catalog.spec.ts b/packages/session/session-format-catalog/tests/catalog.spec.ts index 5740dc9f8b..ebe0d27522 100644 --- a/packages/session/session-format-catalog/tests/catalog.spec.ts +++ b/packages/session/session-format-catalog/tests/catalog.spec.ts @@ -134,7 +134,7 @@ describe('first-party Session format catalog', () => { turn: 1, step: 1, message: { id: 'v2-to-v3-system-9673c4ed630de6c21ea6bd6b573094ea8e5e216843a1b572a68657499ad9667b', - role: 'system', source: { kind: 'plugin', plugin: '@deepseek-ai/dsh-system-prompt' }, content: [], + role: 'system', source: { kind: 'system-prompt' }, content: [], }, }, }, @@ -187,7 +187,7 @@ describe('first-party Session format catalog', () => { const restore = createSessionFormatCatalogWithChildren([]).createRestore(sourceHeader, { recovery: 'strict', validation: 'current' }) for (const row of rows) restore.decodeRow(row) const artifact = restore.finish() - const renamedMessage = (id: string) => ({ ...message(id), source: { kind: 'plugin', plugin: 'tools-ptc' } }) + const renamedMessage = (id: string) => ({ ...message(id), source: { kind: 'code-mode' } }) const expected = [ rows[0], rows[1], expect.objectContaining({ type: 'system/message', seq: 2 }), diff --git a/packages/session/session-format-v3-to-v4/README.i18n.yaml b/packages/session/session-format-v3-to-v4/README.i18n.yaml index e5925d4d64..a3461be636 100644 --- a/packages/session/session-format-v3-to-v4/README.i18n.yaml +++ b/packages/session/session-format-v3-to-v4/README.i18n.yaml @@ -2,5 +2,5 @@ # side as of the last confirmed-consistent state. Both languages carry equal authority; # after editing either side, bring the other along and re-record with: # pnpm run verify-translation-pairing --write packages/session/session-format-v3-to-v4/README.md -README.md: 7c749ecc6cfd721947b18f0458e796325bdb3ecd -README.zh.md: 0746528e52bf211eee8b2617bd28b4f07a7cf0a9 +README.md: 2d9e7065bcc4a0eaaa6716ccfce9cf11d6c0157d +README.zh.md: 4dc20acf5d43b6afb0d1cc1ca315322bf033601c diff --git a/packages/session/session-format-v3-to-v4/README.md b/packages/session/session-format-v3-to-v4/README.md index 7c749ecc6c..2d9e7065bc 100644 --- a/packages/session/session-format-v3-to-v4/README.md +++ b/packages/session/session-format-v3-to-v4/README.md @@ -41,7 +41,7 @@ Complete restoration decodes rows, passes them through a fresh stage, and valida ## V3-to-V4 specification -The logical header changes only `version: 3` to `version: 4`. Released user-role tool-result wrappers become tool-role messages with `toolCallId`, optional `isError`, and direct result content. Every admitted source event retains its type, timestamp, sequence, message identity, surface operation, references, and all non-migrated payload fields; the stage appends only missing own parent catalog records after processing the source events. The released V3 codec remains owned by [V2-to-V3](../session-format-v2-to-v3/README.md); this package reuses it without changing earlier migration semantics. +The logical header changes only `version: 3` to `version: 4`. Released user-role tool-result wrappers become tool-role messages with `toolCallId`, optional `isError`, and direct result content. Released `{ kind: 'plugin', plugin }` message sources become producer-owned kinds through the frozen rename table in [sources.ts](src/sources.ts), retaining producer-specific fields. Every admitted source event retains its type, timestamp, sequence, message identity, surface operation, references, and all non-migrated payload fields; the stage appends only missing own parent catalog records after processing the source events. The released V3 codec remains owned by [V2-to-V3](../session-format-v2-to-v3/README.md); this package reuses it only for the historical source side without changing earlier migration semantics. Source events must be dense from zero. A seeded Session's last `session/end-seed` carrying `inherited: true` determines its inherited event count, excluding the marker. A supplied source cut must agree. Missing seeded markers and inherited markers in unseeded Sessions are refused. Each stage owns its counters and cut; seeded stages leave the cut unknown before EOF, including when preceding migrations change event count. @@ -49,6 +49,8 @@ Complete restoration validates native V4 tool and fork results, turn/step order, A `session-log-deepseek/delivery-accepted` event must identify a nonnegative safe-integer generation; omission identifies V0. A source marker claiming V4 is refused because advancing the header would activate it. Source V3 markers require a nonempty Session id and a `throughSeq` that names an earlier event. A foreign V3 marker is permitted only inside the inherited prefix of a Session with `parentSession`. Other generations retain their recorded coordinates and ids. No delivery payload is rewritten. +V4 source admission rejects retired plugin wrappers in surface, inbox, and title-request messages before recoverable scanning can discard rows. The catalog and native JSONL scanner validate every known message-source slot before exposing restored data. Unknown nonempty attribution kinds and every own JSON metadata field remain intact; external names such as `constructor` and `__proto__` are ordinary producer strings. + V4 restoration validates V4 delivery coordinates and ownership under the same rules. V3 deliveries are historical in V4 and do not become V4 watermarks. The V4 codec retains the released V2 physical framing and performs native tool-result and system-message field admission before recovery; complete vocabulary, delivery, and relationship checks require the target restorer or catalog `validation: 'current'`. Retired `header.system` fields and required predecessor PTC tags are refused even in a recoverable suffix; ignorable predecessor PTC records remain opaque. Recoverable codec reads alone do not establish strict restoration. ----- @@ -78,7 +80,7 @@ V4 also admits fork-generated `TOOL_NOT_STARTED` results with deterministic `for
Implementation internals — click to expand -The migration declaration creates independent streaming stages. Compact runs expand as iterables without an intermediate event array. The V4 codec uses the released V2 codec only for physical header and source-range framing, and validates native tool-role rows directly. JSONL scanners call `assertV4RowAdmission` before suppressing recoverable rows and the shared mandatory relationship validator before returning the completed logical prefix. +The migration declaration creates independent streaming stages. Compact runs expand as iterables without an intermediate event array. The V3-to-V4 stage rewrites historical message sources and lifts historical tool-result wrappers once while emitting V4 events. The V4 codec uses the released V2 codec only for physical header and source-range framing, and validates native tool-role rows directly; it does not invoke the released V3 validator or source-conversion views. JSONL scanners call `assertV4RowAdmission` before suppressing recoverable rows and the shared mandatory relationship validator before returning the completed logical prefix. The target restorer validates native fields and mandatory cross-event relationships, then returns the original artifact. Unknown ignorable events remain opaque, and unfinished inherited compactions expire at the end-seed marker. No runtime invariant companion is published because this pure library owns no independently maintained runtime observations. diff --git a/packages/session/session-format-v3-to-v4/README.zh.md b/packages/session/session-format-v3-to-v4/README.zh.md index 0746528e52..4dc20acf5d 100644 --- a/packages/session/session-format-v3-to-v4/README.zh.md +++ b/packages/session/session-format-v3-to-v4/README.zh.md @@ -41,7 +41,7 @@ const targetHeader = sessionFormatV3ToV4.migrateHeader(sourceHeader) ## V3 到 V4 规范 -逻辑头部只将 `version: 3` 改为 `version: 4`。已发布的用户角色工具结果包装转换为工具角色消息,包含 `toolCallId`、可选的 `isError` 和直接结果内容。每个获准源事件都保留其类型、时间戳、序号、消息身份、surface 操作、引用和所有未迁移的载荷字段;Stage 处理源事件之后只追加缺失的自身父目录记录。已发布 V3 编解码器仍由 [V2 到 V3](../session-format-v2-to-v3/README.zh.md)拥有;本包复用它,不改变较早迁移的语义。 +逻辑头部只将 `version: 3` 改为 `version: 4`。已发布的用户角色工具结果包装转换为工具角色消息,包含 `toolCallId`、可选的 `isError` 和直接结果内容。已发布的 `{ kind: 'plugin', plugin }` 消息来源通过 [sources.ts](src/sources.ts) 中的冻结重命名表转换为生产者自有 kind,并保留生产者专属字段。每个获准源事件都保留其类型、时间戳、序号、消息身份、surface 操作、引用和所有未迁移的载荷字段;Stage 处理源事件之后只追加缺失的自身父目录记录。已发布 V3 编解码器仍由 [V2 到 V3](../session-format-v2-to-v3/README.zh.md)拥有;本包仅在历史源端复用它,不改变较早迁移的语义。 源事件必须从零开始连续编号。带种子的 Session 中,最后一个携带 `inherited: true` 的 `session/end-seed` 决定继承事件数,不包含该标记本身。传入的源切分点必须与之相符。带种子却缺少标记,或不带种子却出现继承标记的 Session 均被拒绝。每个 Stage 独立拥有计数器和切分点;带种子的 Stage 在 EOF 前保持切分点未知,包括前序迁移改变事件数的情况。 @@ -49,6 +49,8 @@ const targetHeader = sessionFormatV3ToV4.migrateHeader(sourceHeader) `session-log-deepseek/delivery-accepted` 事件必须标识非负安全整数代际;省略时表示 V0。声称属于 V4 的源标记会被拒绝,因为推进头部会使它生效。源 V3 标记要求非空 Session id,以及指向较早事件的 `throughSeq`。属于其他 Session 的 V3 标记只允许出现在带有 `parentSession` 的 Session 的继承前缀中。其他代际保留记录的坐标和 id。任何投递载荷都不会被重写。 +V4 消息源准入在可恢复扫描丢弃行之前拒绝 surface、inbox 和标题请求消息中的退役 plugin 包装。目录和原生 JSONL 扫描器在公开恢复数据之前校验所有已知消息源槽位。未知的非空归属 kind 和所有自有 JSON 元数据字段保持不变;`constructor`、`__proto__` 等外部名字只是普通的生产者字符串。 + V4 恢复按相同规则校验 V4 投递坐标和归属。V3 投递在 V4 中属于历史数据,不会成为 V4 水位。V4 编解码器只复用已发布 V2 的物理分帧,并在恢复前直接执行原生工具结果和 system 消息字段准入;完整的词表、投递和关系校验需要目标恢复器或目录的 `validation: 'current'`。即使位于可恢复的后缀,退役的 `header.system` 字段和必需的前代 PTC 标签也会被拒绝;可忽略的前代 PTC 记录保持不透明。仅执行可恢复编解码读取不能证明严格恢复成功。 ----- @@ -78,7 +80,7 @@ V4 还接受 fork 生成的 `TOOL_NOT_STARTED` 结果,使用确定性的 `fork
实现内部机制 — 点击展开 -迁移声明创建相互独立的流式 Stage。紧凑事件段通过迭代器展开,不生成中间事件数组。V4 编解码器只为物理头部和源范围分帧使用已发布 V2 编解码器,并直接校验原生工具角色行。JSONL 扫描器在抑制可恢复行之前调用 `assertV4RowAdmission`,并在返回完整逻辑前缀之前调用共用的强制关系校验器。 +迁移声明创建相互独立的流式 Stage。紧凑事件段通过迭代器展开,不生成中间事件数组。V3 到 V4 Stage 在发出 V4 事件时一次性重写历史消息来源并提升历史工具结果包装。V4 编解码器只为物理头部和源范围分帧使用已发布 V2 编解码器,并直接校验原生工具角色行;它不会调用已发布 V3 校验器或源转换视图。JSONL 扫描器在抑制可恢复行之前调用 `assertV4RowAdmission`,并在返回完整逻辑前缀之前调用共用的强制关系校验器。 目标恢复器校验原生字段和强制跨事件关系,然后返回原始产物。未知的可忽略事件保持不透明,未完成的继承压缩事务在 end-seed 标记处结束。本包不发布运行时不变量伴随插件,因为这个纯函数库不拥有独立维护的运行时观测。 diff --git a/packages/session/session-format-v3-to-v4/src/codec.ts b/packages/session/session-format-v3-to-v4/src/codec.ts index 10d577d3e4..25d99beeed 100644 --- a/packages/session/session-format-v3-to-v4/src/codec.ts +++ b/packages/session/session-format-v3-to-v4/src/codec.ts @@ -3,6 +3,7 @@ import { SessionFormatError, isSessionFormatJsonObject } from '@deepseek-ai/dsh-session-format' import type { SessionFormatCodec, SessionFormatCurrentEncoder, SessionFormatHeader, SessionFormatEvent } from '@deepseek-ai/dsh-session-format' import { releasedV2SessionFormatCodec } from '@deepseek-ai/dsh-session-format-v2-to-v3' +import { assertV4SourceRowAdmission } from './message-sources.ts' import { assertV4RetiredSyntax } from './retired-syntax.ts' import { assertV4SystemMessageFields } from './system-message.ts' import { assertV4ForkResult } from './fork-result.ts' @@ -52,6 +53,7 @@ export const releasedV4SessionFormatCodec = Object.freeze({ * @param row - parsed physical row before framing and source-event range decoding. */ export function assertV4RowAdmission(row: unknown): void { + assertV4SourceRowAdmission(row) assertV4RetiredSyntax(row) assertV4SystemMessageFields(row) if (!isSessionFormatJsonObject(row) || row['type'] !== 'tool/result') return diff --git a/packages/session/session-format-v3-to-v4/src/message-sources.ts b/packages/session/session-format-v3-to-v4/src/message-sources.ts new file mode 100644 index 0000000000..9cf580b265 --- /dev/null +++ b/packages/session/session-format-v3-to-v4/src/message-sources.ts @@ -0,0 +1,42 @@ +/** Native source admission preserves unknown attribution and refuses retired plugin wrappers. */ + +import { SessionFormatError, isSessionFormatJsonObject } from '@deepseek-ai/dsh-session-format' +import type { SessionFormatEvent } from '@deepseek-ai/dsh-session-format' +import { mapEventMessages } from './sources.ts' + +function source(message: Readonly>): void { + const value = message['source'] + if (!isSessionFormatJsonObject(value) || typeof value['kind'] !== 'string' || value['kind'].length === 0 || value['kind'] === 'plugin') { + throw new SessionFormatError('format v4 message requires a producer-owned source kind') + } +} + +/** + * Validate producer attribution in every declared durable message slot. + * @param event - complete native V4 event before Session adoption. + */ +export function assertV4MessageSources(event: SessionFormatEvent): void { + mapEventMessages(event, (message) => { + source(message) + return message + }) +} + +/** + * Refuse retired source syntax even after a malformed recoverable row; leave incomplete messages to decoding. + * @param row - parsed row whose incomplete values have not been classified by the scanner. + */ +export function assertV4SourceRowAdmission(row: unknown): void { + if (!isSessionFormatJsonObject(row) || !isSessionFormatJsonObject(row['data'])) return + const data = row['data'] + const messages = row['type'] === 'user/message' ? [data] + : row['type'] === 'system/message' || row['type'] === 'assistant/message' || row['type'] === 'tool/result' ? [data['message']] + : row['type'] === 'agent/inbox/spliced' ? data['inserted'] + : row['type'] === 'session/title-llm-request' ? data['messages'] : [] + if (!Array.isArray(messages)) return + for (const message of messages) { + if (!isSessionFormatJsonObject(message)) continue + const value = message['source'] + if (isSessionFormatJsonObject(value) && value['kind'] === 'plugin') source(message) + } +} diff --git a/packages/session/session-format-v3-to-v4/src/migration.ts b/packages/session/session-format-v3-to-v4/src/migration.ts index 72c77219cd..b8059965fa 100644 --- a/packages/session/session-format-v3-to-v4/src/migration.ts +++ b/packages/session/session-format-v3-to-v4/src/migration.ts @@ -3,6 +3,7 @@ import { defineSessionFormatMigration, SessionFormatError, SessionFormatUnsupportedMigrationError, isSessionFormatJsonObject, sessionFormatCount } from '@deepseek-ai/dsh-session-format' import type { SessionFormatEvent, SessionFormatEventRun, SessionFormatJsonObject, SessionFormatJsonValue, SessionFormatMigration, SessionFormatMigrationContext, SessionFormatMigrationStage, SessionFormatMigrationStageInput } from '@deepseek-ai/dsh-session-format' import { assertReleasedV3Header } from '@deepseek-ai/dsh-session-format-v2-to-v3' +import { mapEventMessages, rewritePluginSource } from './sources.ts' import { liftToolResult } from './tool-role.ts' import { assertReleasedV4Header, validateDeliveryAccepted } from './validation.ts' import { catalogFact, childCatalogSource, childCatalogFact, childCatalogSubject } from './facts.ts' @@ -69,7 +70,12 @@ class ReleasedV3ToV4Stage implements SessionFormatMigrationStage { } if (deliveryId !== undefined && deliveryId !== this.input.sourceHeader.id) this.foreignDeliverySeq = event.seq } - context.emitEvent(liftToolResult(event)) + const rewritten = mapEventMessages(event, (message) => { + const source = message['source'] + if (!isSessionFormatJsonObject(source) || source['kind'] !== 'plugin') return message + return { ...message, source: rewritePluginSource(source, event.seq, message['role']) } + }) + context.emitEvent(liftToolResult(rewritten)) } transformRun(run: SessionFormatEventRun, context: SessionFormatMigrationContext): void { diff --git a/packages/session/session-format-v3-to-v4/src/relationships.ts b/packages/session/session-format-v3-to-v4/src/relationships.ts index 6da2a8898c..fbcd6b86db 100644 --- a/packages/session/session-format-v3-to-v4/src/relationships.ts +++ b/packages/session/session-format-v3-to-v4/src/relationships.ts @@ -292,7 +292,7 @@ class Relationships { case 'compaction/start': case 'compaction/summary': case 'compaction/end': case 'compaction/prune': this.compact(event, data); break case 'user/message': { const source = record(data['source'], 'user message source') - if (event['surfaceOp'] !== 'append' && source['kind'] === 'plugin' && source['plugin'] === 'compact') this.compactionOwner(source, 'compaction checkpoint') + if (event['surfaceOp'] !== 'append' && source['kind'] === 'compact-checkpoint') this.compactionOwner(source, 'compaction checkpoint') break } case 'session/end-seed': this.compaction = undefined; break @@ -339,7 +339,7 @@ function titleSources( const content = array(message['content'], 'title content') const block = content[0] if (references.length === 0 || messages.length !== 1 || message['role'] !== 'user' - || (record(message['source'], 'title source')['kind'] !== 'plugin' || record(message['source'], 'title source')['plugin'] !== 'dsh-session-title-llm') + || record(message['source'], 'title source')['kind'] !== 'dsh-session-title-llm' || content.length !== 1 || !isSessionFormatJsonObject(block) || block['type'] !== 'text') { throw new SessionFormatError('session/title-llm-request messages do not represent messageSeqs') } diff --git a/packages/session/session-format-v3-to-v4/src/sources.ts b/packages/session/session-format-v3-to-v4/src/sources.ts new file mode 100644 index 0000000000..7b54f9d467 --- /dev/null +++ b/packages/session/session-format-v3-to-v4/src/sources.ts @@ -0,0 +1,108 @@ +/** V3 source migration; tool arguments, content and extension payloads remain opaque. */ + +import { SessionFormatError, SessionFormatUnsupportedMigrationError, isSessionFormatJsonObject } from '@deepseek-ai/dsh-session-format' +import type { SessionFormatEvent, SessionFormatJsonObject, SessionFormatJsonValue } from '@deepseek-ai/dsh-session-format' + +/** + * Visit only messages carried by first-party event payloads. + * @param event - source or target logical event. + * @param transform - message transform preserving unchanged identity. + * @returns the event sharing all untouched payloads. + */ +export function mapEventMessages( + event: SessionFormatEvent, + transform: (message: SessionFormatJsonObject) => SessionFormatJsonObject, +): SessionFormatEvent { + const data = event.data + if (!isSessionFormatJsonObject(data)) return event + if (event.type === 'user/message') { + const message = transform(data) + return message === data ? event : { ...event, data: message } + } + if (event.type === 'system/message' || event.type === 'assistant/message' || event.type === 'tool/result') { + if (!isSessionFormatJsonObject(data['message'])) throw new SessionFormatError(event.type + ' requires a message') + const message = transform(data['message']) + return message === data['message'] ? event : { ...event, data: { ...data, message } } + } + const key = event.type === 'agent/inbox/spliced' ? 'inserted' : event.type === 'session/title-llm-request' ? 'messages' : undefined + if (key === undefined) return event + const messages = data[key] + if (!Array.isArray(messages)) throw new SessionFormatError(event.type + ' requires message array') + const mapped = (messages as readonly SessionFormatJsonValue[]).map((message) => { + if (!isSessionFormatJsonObject(message)) throw new SessionFormatError(event.type + ' requires message objects') + return transform(message) + }) + return mapped.every((message, index) => message === messages[index]) ? event : { ...event, data: { ...data, [key]: mapped } } +} + +/** Released V3 plugin names whose current producer kind is not the plugin string. */ +const RENAMED_PRODUCERS: Readonly> = Object.freeze({ + 'compact': 'compact-checkpoint', + 'tools-code-mode': 'code-mode', + 'tools-ptc': 'code-mode', + 'dsh-compaction-basic': 'compact-basic', + '@deepseek-ai/dsh-system-prompt': 'runtime-context', +}) + +/** Current producer kinds whose names are not released V3 plugin identities. */ +const CURRENT_PRODUCER_KINDS: ReadonlySet = new Set([ + 'user', 'model', 'tool', 'system-prompt', + 'runtime-context', 'compact-checkpoint', 'code-mode', 'compact-basic', + 'agent-instructions', 'session-reference', 'team-message', 'goal', + 'skill-invocation', 'skill-catalog', 'coordinator', 'subagent-report', + 'subagent-settled', 'webhook', 'agent-message', 'model-selection', + 'plan-mode', 'time-context', 'tmux-context', 'user-approval', + 'repeat-tool-reminder', 'tool-cordis', 'cordis-host-runner', 'tool-goal', + 'tool-jobs', 'hooks-codex', 'hooks-claude-code', 'schedule', + 'dsh-session-title-llm', 'auto-review', +]) + +/** First-party V3 plugin identities that intentionally keep their current kind. */ +const RELEASED_SAME_NAME_PRODUCERS: ReadonlySet = new Set([ + 'agent-instructions', 'session-reference', 'team-message', 'goal', + 'skill-invocation', 'skill-catalog', 'coordinator', 'subagent-report', + 'subagent-settled', 'webhook', 'agent-message', 'model-selection', + 'plan-mode', 'time-context', 'tmux-context', 'user-approval', + 'repeat-tool-reminder', 'tool-cordis', 'cordis-host-runner', 'tool-goal', + 'tool-jobs', 'hooks-codex', 'hooks-claude-code', 'schedule', + 'dsh-session-title-llm', +]) + +/** Resolve the current producer kind for one released V3 plugin string. */ +function producerKind(plugin: string, role: SessionFormatJsonValue | undefined): string { + if (plugin === '@deepseek-ai/dsh-system-prompt' && role === 'system') return 'system-prompt' + const renamed = Object.hasOwn(RENAMED_PRODUCERS, plugin) ? RENAMED_PRODUCERS[plugin] : undefined + if (renamed !== undefined) return renamed + if (RELEASED_SAME_NAME_PRODUCERS.has(plugin)) return plugin + if (CURRENT_PRODUCER_KINDS.has(plugin) || plugin === 'plugin') { + throw new SessionFormatUnsupportedMigrationError( + `V3 plugin source ${JSON.stringify(plugin)} collides with a current producer kind`, + ) + } + return plugin +} + +/** + * Lift one released V3 plugin source into the current producer-owned shape. + * @param source - source record whose `kind` is `'plugin'`. + * @param seq - event seq for diagnostics. + * @param role - carried message role for role-sensitive renames. + * @returns a copy whose kind is the producer's own kind and whose `plugin` field is dropped. + */ +export function rewritePluginSource( + source: SessionFormatJsonObject, + seq: number, + role: SessionFormatJsonValue | undefined, +): SessionFormatJsonObject { + const plugin = source['plugin'] + if (typeof plugin !== 'string' || plugin.length === 0) { + throw new SessionFormatError( + `plugin source at seq ${seq} is not canonical: plugin requires a non-empty string`, + ) + } + const kind = producerKind(plugin, role) + if (Object.keys(source).length === 2) return { kind } + return Object.fromEntries(Object.entries(source) + .filter(([key]) => key !== 'plugin') + .map(([key, item]) => [key, key === 'kind' ? kind : item])) +} diff --git a/packages/session/session-format-v3-to-v4/src/testing/validation.ts b/packages/session/session-format-v3-to-v4/src/testing/validation.ts new file mode 100644 index 0000000000..08ec7fa8c6 --- /dev/null +++ b/packages/session/session-format-v3-to-v4/src/testing/validation.ts @@ -0,0 +1,15 @@ +import { SessionFormatEventCollector } from '@deepseek-ai/dsh-session-format' +import type { SessionFormatArtifact } from '@deepseek-ai/dsh-session-format' +import { releasedV4SessionFormatCodec } from '../codec.ts' + +/** + * Validate an artifact through the native codec without vocabulary-aware restoration. + * @param artifact - current-generation artifact to encode and decode. + */ +export function assertReleasedV4Artifact(artifact: SessionFormatArtifact): void { + const codec = releasedV4SessionFormatCodec + const decoder = codec.createDecoder(codec.encodeHeader(artifact.header, artifact.inheritedEventCount), 'strict') + const output = new SessionFormatEventCollector() + for (const event of artifact.events) decoder.decodeRow(codec.encodeEvent(event), output) + decoder.finish(output) +} diff --git a/packages/session/session-format-v3-to-v4/src/validation.ts b/packages/session/session-format-v3-to-v4/src/validation.ts index c2964776e4..41c70c3855 100644 --- a/packages/session/session-format-v3-to-v4/src/validation.ts +++ b/packages/session/session-format-v3-to-v4/src/validation.ts @@ -4,6 +4,7 @@ import { isAbsolute } from 'node:path' import { SessionFormatError, SessionFormatUnsupportedMigrationError, isSessionFormatJsonObject, sessionFormatCount } from '@deepseek-ai/dsh-session-format' import type { SessionFormatArtifact, SessionFormatEvent } from '@deepseek-ai/dsh-session-format' import { assertV4LifecycleRelationships } from './relationships.ts' +import { assertV4MessageSources } from './message-sources.ts' import { catalogFact } from './facts.ts' import { assertV4RetiredSyntax } from './retired-syntax.ts' import { assertV4SystemMessageFields } from './system-message.ts' @@ -98,7 +99,7 @@ export function validateDeliveryAccepted(event: SessionFormatEvent, currentVersi } /** - * Validate mandatory native lifecycle, catalog, and delivery relationships without changing event vocabulary or tail recovery. + * Validate native message sources, lifecycle, catalog, and delivery relationships without changing event vocabulary or tail recovery. * The owning admission stage rejects unknown required events; * unknown ignorable records retain their uninterpreted payloads. * @param artifact - decoded artifact with its final inherited cut. @@ -108,6 +109,7 @@ export function assertReleasedV4Relationships(artifact: SessionFormatArtifact, k const ids = new Set() for (const event of artifact.events) { if (!knownEventTypes.has(event.type)) continue + assertV4MessageSources(event) const deliveryId = validateDeliveryAccepted(event, 4) if (deliveryId !== undefined && !(artifact.header.parentSession !== undefined && event.seq < artifact.inheritedEventCount) diff --git a/packages/session/session-format-v3-to-v4/tests/attribution.spec.ts b/packages/session/session-format-v3-to-v4/tests/attribution.spec.ts new file mode 100644 index 0000000000..b6721ab6ef --- /dev/null +++ b/packages/session/session-format-v3-to-v4/tests/attribution.spec.ts @@ -0,0 +1,41 @@ +/** Unknown producer attribution survives the native codec and detached Session reader. */ +import { describe, expect, it } from 'vitest' +import { Session, SessionId, SessionLogOffset } from '@deepseek-ai/dsh-session' +import type { SessionEvent, SessionHeader } from '@deepseek-ai/dsh-session' +import { SessionFormatEventCollector } from '@deepseek-ai/dsh-session-format' +import type { SessionFormatEvent } from '@deepseek-ai/dsh-session-format' +import { releasedV4SessionFormatCodec as codec, restoreReleasedV4Artifact } from '../src/index.ts' + +const header = { version: 4, id: 'unknown-attribution', createdAt: 1, isSeeded: false, delegationDepth: 0 } + +describe('uninstalled producer attribution', () => { + it('preserves user source metadata through decoding, adoption and derivation', () => { + const message = { + id: 'attributed-message', role: 'user', + source: { kind: 'external-attribution', location: { file: 'notes.txt', lines: [2, 5] }, enabled: false }, + content: [{ type: 'text', text: 'Retain this context.' }], + } + const input: SessionFormatEvent[] = [ + { type: 'turn/start', seq: 0, time: 1, data: { turn: 1 } }, + { type: 'step/start', seq: 1, time: 2, data: { turn: 1, step: 1 } }, + { type: 'user/message', seq: 2, time: 3, surfaceOp: 'append', data: message }, + { type: 'step/end', seq: 3, time: 4, data: { turn: 1, step: 1 } }, + { type: 'turn/end', seq: 4, time: 5, data: { turn: 1, reason: { kind: 'completed' } } }, + ] + const physical = input.map(event => JSON.stringify(codec.encodeEvent(event))) + const output = new SessionFormatEventCollector() + const decoder = codec.createDecoder(codec.encodeHeader(header, 0), 'strict') + for (const row of physical) decoder.decodeRow(JSON.parse(row), output) + const inheritedEventCount = decoder.finish(output) + const artifact = { header, events: output.values, inheritedEventCount } + const restored = restoreReleasedV4Artifact(artifact, new Set(input.map(event => event.type))) + expect(restored.events).toEqual(input) + // The format reader validates stored JSON; adoption validates the current Session fields. + const session = Session.fromRestore( + SessionId(header.id), restored.events as readonly SessionEvent[], restored.header as unknown as SessionHeader, + SessionLogOffset(restored.inheritedEventCount), 'detached', + ) + expect(session.deriveMessages()).toEqual([message]) + expect(restored.events.map(event => JSON.stringify(codec.encodeEvent(event)))).toEqual(physical) + }) +}) diff --git a/packages/session/session-format-v3-to-v4/tests/canonical.spec.ts b/packages/session/session-format-v3-to-v4/tests/canonical.spec.ts new file mode 100644 index 0000000000..dc37e99bce --- /dev/null +++ b/packages/session/session-format-v3-to-v4/tests/canonical.spec.ts @@ -0,0 +1,111 @@ +import { describe, expect, it } from 'vitest' +import { createSessionFormatCatalogWithChildren, sessionFormatCatalog } from '@deepseek-ai/dsh-session-format-catalog' +import { SessionFormatEventCollector } from '@deepseek-ai/dsh-session-format' +import type { SessionFormatArtifact, SessionFormatEvent } from '@deepseek-ai/dsh-session-format' +import { releasedV4SessionFormatCodec, restoreReleasedV4Artifact } from '../src/index.ts' + +const header = { type: 'session', version: 2, id: 'canonical-v4', createdAt: 1, isSeeded: true, parentSession: 'parent', delegationDepth: 0 } +function source() { + const user = { id: 'context', role: 'user', source: { kind: 'plugin', plugin: '@deepseek-ai/dsh-system-prompt' }, content: [{ type: 'text', text: 'context' }] } + const dispatch = { rootCallId: 'root', parentCallId: 'root', subCallId: 'child', name: 'test', arguments: { kind: 'plugin', plugin: 'tools-ptc' } } + const rows = [ + { type: 'turn/start', data: { turn: 1 } }, + { type: 'step/start', data: { turn: 1, step: 1 } }, + { type: 'request/header', data: { reason: 'initial', header: { config: { provider: 'mock', model: 'mock' }, system: 'system', tools: [] } } }, + { type: 'user/message', surfaceOp: 'append', data: user }, + { type: 'tool/code-dispatch-start', data: dispatch }, + { type: 'tool/code-dispatch', data: { ...dispatch, isError: false, content: [] } }, + { type: 'user/message', surfaceOp: { op: 'replace', start: 3, end: 3 }, sourceEventSeqs: [3], data: { ...user, id: 'replacement', source: { kind: 'plugin', plugin: 'tools-code-mode' } } }, + { type: 'request/header', data: { reason: 'change', header: { config: { provider: 'mock', model: 'mock' }, system: '' } } }, + { type: 'step/end', data: { turn: 1, step: 1 } }, + { type: 'turn/end', data: { turn: 1, reason: { kind: 'completed' } } }, + { type: 'session/end-seed', data: { inherited: true } }, + ] + return rows.map((row, seq) => ({ ...row, seq, time: seq + 1 })) as SessionFormatEvent[] +} +function migrated() { + const restore = createSessionFormatCatalogWithChildren([]).createRestore(header, { recovery: 'strict', validation: 'current' }) + for (const row of source()) restore.decodeRow(row) + return restore.finish() +} + +function reopen(artifact: SessionFormatArtifact) { + const header = sessionFormatCatalog.encodeCurrentHeader(artifact.header, artifact.inheritedEventCount) + const restore = sessionFormatCatalog.createRestore(header, { + recovery: 'strict', validation: 'current', + }) + for (const event of artifact.events) restore.decodeRow(sessionFormatCatalog.encodeCurrentEvent(event)) + return restore.finish() +} + +describe('canonical V4 integration', () => { + it('composes seeded systems, source ownership, PTC, canonical replacements and native round-trip', () => { + const target = migrated() + expect(target.header.version).toBe(4) + expect(target.inheritedEventCount).toBe(13) + const systems = target.events.filter(event => event.type === 'system/message') + expect(systems).toHaveLength(3) + for (const system of systems) expect(system.data).toMatchObject({ message: { role: 'system', source: { kind: 'system-prompt' } } }) + const users = target.events.filter(event => event.type === 'user/message') + expect(users[0]?.data).toMatchObject({ source: { kind: 'runtime-context' } }) + expect(users[1]).toMatchObject({ surfaceOp: { op: 'replace', startSeq: 5, endSeq: 5 }, sourceEventSeqs: [5], data: { source: { kind: 'code-mode' } } }) + expect(target.events.find(event => event.type === 'tool/ptc-dispatch')?.data).toMatchObject({ arguments: { kind: 'plugin', plugin: 'tools-ptc' } }) + const before = JSON.stringify(target) + expect(restoreReleasedV4Artifact(target, new Set(target.events.map(event => event.type)))).toBe(target) + expect(reopen(target)).toEqual(target) + expect(JSON.stringify(target)).toBe(before) + }) + + it.each([{ sourceEventSeqs: [] }, { surfaceOp: { op: 'replace', start: 0, end: 0 } }])('rejects noncanonical native metadata %j', (override) => { + const target = migrated() + const system = target.events.find(event => event.type === 'system/message')! + const bad = { ...system, ...override } + const invalid = { ...target, events: target.events.map(event => event === system ? bad : event) } + expect(() => reopen(invalid)).toThrow() + }) + + it('leaves common event and message validation to current Session restoration', () => { + const decoder = releasedV4SessionFormatCodec.createDecoder({ ...header, version: 4, isSeeded: false }, 'recoverable') + const output = new SessionFormatEventCollector() + decoder.decodeRow(null, output) + expect(decoder.finish(output)).toBe(0) + }) + + it('keeps earlier-generation delivery markers ignored and validates native current ownership', () => { + const marker = (version: number): SessionFormatEvent => ({ type: 'session-log-deepseek/delivery-accepted', seq: 0, time: 1, data: { sessionId: 'other', throughSeq: 0, sessionFormatVersion: version } }) + const { type: _type, ...logical } = header + const artifact = { header: { ...logical, version: 4, isSeeded: false }, inheritedEventCount: 0, events: [marker(3)] } + expect(restoreReleasedV4Artifact(artifact, new Set([marker(3).type]))).toBe(artifact) + expect(() => restoreReleasedV4Artifact({ ...artifact, events: [{ type: 'feedback/record', seq: 0, time: 1, ignorable: true, data: {} }, { ...marker(4), seq: 1 }] }, new Set(['feedback/record', marker(4).type]))).toThrow(/wrong Session/) + const reader = createSessionFormatCatalogWithChildren([]).createRestore({ ...header, version: 3, isSeeded: false }, { recovery: 'strict', validation: 'current' }) + reader.decodeRow({ type: 'turn/start', seq: 0, time: 1, data: { turn: 1 } }) + reader.decodeRow({ ...marker(3), seq: 1, time: 2 }) + expect(() => reader.finish()).toThrow(/wrong Session/) + }) + + it('retains native compaction checkpoint sources during restoration', () => { + const artifact: SessionFormatArtifact = { + header: { version: 4, id: 'compact-v4', createdAt: 1, isSeeded: false, delegationDepth: 0 }, + inheritedEventCount: 0, + events: [ + { type: 'turn/start', seq: 0, time: 1, data: { turn: 1 } }, + { type: 'user/message', seq: 1, time: 2, data: { id: 'input', role: 'user', source: { kind: 'user' }, content: [{ type: 'text', text: 'input' }] }, surfaceOp: 'append' }, + { type: 'compaction/start', seq: 2, time: 3, data: { compactionId: 'compact-1', turn: 1 } }, + { type: 'compaction/summary', seq: 3, time: 4, data: { + compactionId: 'compact-1', summary: [{ type: 'text', text: 'summary' }], + shadowedRange: { start: 1, end: 1 }, shadowedSeqs: [1], shadowedTokenCount: 1, + provider: 'mock', model: 'mock', + } }, + { type: 'user/message', seq: 4, time: 5, data: { + id: 'checkpoint', role: 'user', + source: { kind: 'compact-checkpoint', compactionId: 'compact-1' }, + content: [{ type: 'text', text: 'summary' }], + }, surfaceOp: { op: 'replace', startSeq: 1, endSeq: 1 }, sourceEventSeqs: [2, 3, 1] }, + { type: 'compaction/end', seq: 5, time: 6, data: { compactionId: 'compact-1', turn: 1 } }, + { type: 'turn/end', seq: 6, time: 7, data: { turn: 1, reason: { kind: 'completed' } } }, + ], + } + expect(restoreReleasedV4Artifact(artifact, new Set(artifact.events.map(event => event.type)))).toBe(artifact) + expect(artifact.events[4]?.data).toMatchObject({ source: { kind: 'compact-checkpoint', compactionId: 'compact-1' } }) + }) +}) diff --git a/packages/session/session-format-v3-to-v4/tests/codec.spec.ts b/packages/session/session-format-v3-to-v4/tests/codec.spec.ts index 1efaa9ff28..7a3f8cac20 100644 --- a/packages/session/session-format-v3-to-v4/tests/codec.spec.ts +++ b/packages/session/session-format-v3-to-v4/tests/codec.spec.ts @@ -61,6 +61,13 @@ describe('V4 framing and restoration', () => { } }) + it('rejects released wrapper rows before structural recovery can admit them', () => { + const wrapperRow: SessionFormatEvent = { + type: 'tool/result', seq: 0, time: 1, data: { message: { role: 'user' } }, + } + expect(() => { assertV4RowAdmission(wrapperRow) }).toThrow(/first-class message/) + }) + it('retains predecessor and future delivery generations without activating their watermarks', () => { for (const version of [undefined, 0, 1, 2, 3, 5]) { const marker = { ...delivery(version, 'foreign'), data: { ...delivery(version).data as SessionFormatJsonObject, sessionId: 'foreign', throughSeq: 500 } } diff --git a/packages/session/session-format-v3-to-v4/tests/corpus.spec.ts b/packages/session/session-format-v3-to-v4/tests/corpus.spec.ts index 34ab1ff418..e13675fd0f 100644 --- a/packages/session/session-format-v3-to-v4/tests/corpus.spec.ts +++ b/packages/session/session-format-v3-to-v4/tests/corpus.spec.ts @@ -2,8 +2,9 @@ import { readFileSync, readdirSync } from 'node:fs' import { join, resolve } from 'node:path' import { expect, it } from 'vitest' import { createSessionFormatCatalogWithChildren, historicalSessionFormatCatalog } from '@deepseek-ai/dsh-session-format-catalog' -import { isSessionFormatJsonObject, type SessionFormatArtifact, type SessionFormatJsonObject, type SessionFormatJsonValue } from '@deepseek-ai/dsh-session-format' +import { isSessionFormatJsonObject, type SessionFormatArtifact, type SessionFormatEvent, type SessionFormatJsonObject, type SessionFormatJsonValue } from '@deepseek-ai/dsh-session-format' import { historicalChildCatalogSource } from '../src/index.ts' +import { mapEventMessages, rewritePluginSource } from '../src/sources.ts' import { liftToolResult } from '../src/tool-role.ts' const root = resolve(import.meta.dirname, '../../../..') @@ -35,6 +36,15 @@ function migrate(parent: SessionFormatArtifact, children: SessionFormatArtifact[ return restore.finish() } +function migrateEvent(event: SessionFormatEvent): SessionFormatEvent { + const rewritten = mapEventMessages(event, (message) => { + const source = message['source'] + if (!isSessionFormatJsonObject(source) || source['kind'] !== 'plugin') return message + return { ...message, source: rewritePluginSource(source, event.seq, message['role']) } + }) + return liftToolResult(rewritten) +} + it('refuses recorded parent/child clock conflicts and migrates consistent copies including failed startup', () => { const conflicts: string[] = [] let pairs = 0 @@ -64,13 +74,13 @@ it('refuses recorded parent/child clock conflicts and migrates consistent copies expect(() => migrate(parent.artifact, children.map(child => child.artifact)), parent.path).toThrow('conflicts with its parent catalog') } else { expect(migrate(parent.artifact, children.map(child => child.artifact)).events, parent.path).toEqual( - parent.artifact.events.map(liftToolResult), + parent.artifact.events.map(migrateEvent), ) } expect(migrate(parent.artifact, aligned), parent.path).toEqual({ ...parent.artifact, header: { ...parent.artifact.header, version: 4 }, - events: parent.artifact.events.map(liftToolResult), + events: parent.artifact.events.map(migrateEvent), }) } } diff --git a/packages/session/session-format-v3-to-v4/tests/message-sources.spec.ts b/packages/session/session-format-v3-to-v4/tests/message-sources.spec.ts new file mode 100644 index 0000000000..52198013d6 --- /dev/null +++ b/packages/session/session-format-v3-to-v4/tests/message-sources.spec.ts @@ -0,0 +1,54 @@ +import { describe, expect, it } from 'vitest' +import { SessionFormatEventCollector } from '@deepseek-ai/dsh-session-format' +import type { SessionFormatEvent, SessionFormatJsonObject } from '@deepseek-ai/dsh-session-format' +import { createSessionFormatCatalogWithChildren, sessionFormatCatalog } from '@deepseek-ai/dsh-session-format-catalog' +import { assertV4MessageSources, assertV4SourceRowAdmission } from '../src/message-sources.ts' +import { releasedV4SessionFormatCodec } from '../src/codec.ts' + +const header = { type: 'session', version: 4, id: 'sources', createdAt: 1, delegationDepth: 0, isSeeded: false } +function event(source: unknown): SessionFormatEvent { + return { type: 'user/message', seq: 0, time: 1, surfaceOp: 'append', data: { id: 'u', role: 'user', source, content: [{ type: 'text', text: 'hello' }] } } as SessionFormatEvent +} + +function restore(source: unknown, version: 3 | 4 = 4) { + const reader = createSessionFormatCatalogWithChildren([]).createRestore({ ...header, version }, { recovery: 'strict', validation: 'current' }) + reader.decodeRow(JSON.parse(JSON.stringify(event(source)))) + return reader.finish() +} + +describe('V4 source admission', () => { + it.each(['constructor', 'toString', '__proto__'])('migrates external producer %s without interpreting inherited object keys', (plugin) => { + const before = JSON.parse(`{"kind":"plugin","plugin":"${plugin}","__proto__":{"tag":"metadata"},"nested":{"kind":"plugin","plugin":"opaque"}}`) as SessionFormatJsonObject + const expected = JSON.parse(`{"kind":"${plugin}","__proto__":{"tag":"metadata"},"nested":{"kind":"plugin","plugin":"opaque"}}`) as SessionFormatJsonObject + const migrated = restore(before, 3) + expect(migrated.events[0]?.data).toMatchObject({ source: expected }) + expect(Object.hasOwn((migrated.events[0]?.data as { source: object }).source, '__proto__')).toBe(true) + expect(JSON.stringify(restore(expected))).toBe(JSON.stringify(migrated)) + expect(before['kind']).toBe('plugin') + }) + + it('rejects missing, malformed, empty, and retired source kinds', () => { + for (const source of [null, [], {}, { kind: '' }, { kind: 1 }, { kind: 'plugin', plugin: 'compact' }]) { + expect(() => restore(source)).toThrow(/producer-owned source kind/) + expect(() => { assertV4MessageSources(event(source)) }).toThrow(/producer-owned source kind/) + } + }) + + it('rejects retired wrappers in every declared message slot before recovery can discard them', () => { + const message = event({ kind: 'plugin', plugin: 'compact' }).data + const rows = [event({ kind: 'plugin', plugin: 'compact' }), ...['system/message', 'assistant/message', 'tool/result'].map(type => ({ type, seq: 0, time: 1, data: { message } })), { type: 'agent/inbox/spliced', seq: 0, time: 1, data: { inserted: [message] } }, { type: 'session/title-llm-request', seq: 0, time: 1, data: { messages: [message] } }] + for (const row of rows) { + const decoder = releasedV4SessionFormatCodec.createDecoder(header, 'recoverable') + const output = new SessionFormatEventCollector() + decoder.decodeRow(null, output) + expect(() => { decoder.decodeRow(row, output) }).toThrow(/producer-owned source kind/) + expect(() => sessionFormatCatalog.encodeCurrentEvent(row)).toThrow(/producer-owned source kind/) + } + }) + + it('leaves malformed incomplete rows for normal scanner corruption handling', () => { + for (const row of [null, { type: 'user/message', data: null }, { type: 'system/message', data: {} }, { type: 'agent/inbox/spliced', data: { inserted: false } }, { type: 'agent/inbox/spliced', data: { inserted: [null] } }, { type: 'session/title-llm-request', data: { messages: [event({ kind: 'user' }).data] } }, { type: 'external/event', data: { source: { kind: 'plugin' } } }]) { + expect(() => { assertV4SourceRowAdmission(row) }).not.toThrow() + } + }) +}) diff --git a/packages/session/session-format-v3-to-v4/tests/migration.spec.ts b/packages/session/session-format-v3-to-v4/tests/migration.spec.ts index 53ee1435f9..741807837a 100644 --- a/packages/session/session-format-v3-to-v4/tests/migration.spec.ts +++ b/packages/session/session-format-v3-to-v4/tests/migration.spec.ts @@ -2,7 +2,7 @@ import { describe, expect, it } from 'vitest' import { restoreReleasedV3Artifact } from '@deepseek-ai/dsh-session-format-v2-to-v3' import { SessionFormatEventCollector } from '@deepseek-ai/dsh-session-format' import type { SessionFormatEvent, SessionFormatHeader, SessionFormatJsonObject } from '@deepseek-ai/dsh-session-format' -import { createSessionFormatCatalogWithChildren, sessionFormatCatalog } from '@deepseek-ai/dsh-session-format-catalog' +import { createSessionFormatCatalogWithChildren, historicalSessionFormatCatalog, sessionFormatCatalog } from '@deepseek-ai/dsh-session-format-catalog' import { releasedV3SessionFormatCodec, createSessionFormatV3ToV4, sessionFormatV3ToV4 } from '../src/index.ts' const header: SessionFormatHeader = { version: 3, id: 'identity', createdAt: 1, isSeeded: false, delegationDepth: 0 } @@ -33,6 +33,12 @@ function restore(events: readonly SessionFormatEvent[], sourceHeader = header) { return reader.finish() } +function restoreHistorical(events: readonly SessionFormatEvent[], sourceHeader: SessionFormatHeader) { + const reader = historicalSessionFormatCatalog.createRestore({ type: 'session', ...sourceHeader }, { recovery: 'strict', validation: 'current' }) + for (const event of events) reader.decodeRow(event) + return reader.finish() +} + describe('V3 to V4 source preservation', () => { it('changes only the header version and retains event objects, payloads, timestamps, and coordinates', () => { const rows = [fact, delivery(3)] @@ -133,7 +139,7 @@ describe('V3 to V4 source preservation', () => { { type: 'turn/end', data: { turn: 1, reason: { kind: 'completed' } } }, { type: 'session/end-seed', data: version < 2 ? {} : { inherited: true } }, ].map((event, seq): SessionFormatEvent => ({ ...event, seq, time: seq + 1 })) - const source = version === 3 ? restore(rows, { ...header, version: 2, isSeeded: true }).events : rows + const source = version === 3 ? restoreHistorical(rows, { ...header, version: 2, isSeeded: true }).events : rows const physical = version < 2 ? { type: 'session', version, id: header.id, createdAt: 1, delegationDepth: 0, parentSession: 'ancestor', seedLength: 6 } : { type: 'session', ...header, version, isSeeded: true, parentSession: 'ancestor' } diff --git a/packages/session/session-format-v3-to-v4/tests/relationships.spec.ts b/packages/session/session-format-v3-to-v4/tests/relationships.spec.ts index 15b5641d30..5103fa8bf8 100644 --- a/packages/session/session-format-v3-to-v4/tests/relationships.spec.ts +++ b/packages/session/session-format-v3-to-v4/tests/relationships.spec.ts @@ -40,7 +40,7 @@ const compact = (): Row[] => [ row('compaction/start', { compactionId: 'c', turn: 1, sourceCommandId: 'cmd' }), row('compaction/summary', { compactionId: 'c', sourceCommandId: 'cmd', summary: [{ type: 'text', text: 'summary' }], shadowedRange: { start: 1, end: 1 }, shadowedSeqs: [1], shadowedTokenCount: 1, provider: 'mock', model: 'mock' }), { ...input('compact-checkpoint'), data: { - ...user('compact-checkpoint'), id: 'checkpoint', source: { kind: 'plugin', plugin: 'compact', compactionId: 'c', sourceCommandId: 'cmd' }, + ...user('compact-checkpoint'), id: 'checkpoint', source: { kind: 'compact-checkpoint', compactionId: 'c', sourceCommandId: 'cmd' }, }, surfaceOp: { op: 'replace', startSeq: 1, endSeq: 1 }, sourceEventSeqs: [1, 2, 3] }, row('compaction/end', { compactionId: 'c', sourceCommandId: 'cmd', turn: 1 }), row('turn/end', { turn: 1, reason: { kind: 'completed' } }), @@ -108,7 +108,7 @@ describe('mandatory V4 lifecycle restoration', () => { describe('mandatory V4 compaction restoration', () => { it('retains matching checkpoint sources and inherited unfinished compactions', () => { - expect(reopen(compact()).messages[0]?.source).toEqual({ kind: 'plugin', plugin: 'compact', compactionId: 'c', sourceCommandId: 'cmd' }) + expect(reopen(compact()).messages[0]?.source).toEqual({ kind: 'compact-checkpoint', compactionId: 'c', sourceCommandId: 'cmd' }) const inherited = [row('compaction/start', { compactionId: 'old', turn: null }), ...begin(), ...end(), row('session/end-seed', { inherited: true })] expect(() => reopen(inherited, 5, true)).not.toThrow() expect(() => reopen([row('compaction/start', { compactionId: 'c', turn: null }), row('compaction/end', { compactionId: 'c', turn: null, error: 'cancelled' })])).not.toThrow() @@ -116,8 +116,8 @@ describe('mandatory V4 compaction restoration', () => { }) it.each([ - ['checkpoint identity', change(compact(), 4, { source: { kind: 'plugin', plugin: 'compact', compactionId: 'WRONG', sourceCommandId: 'cmd' } })], - ['checkpoint command', change(compact(), 4, { source: { kind: 'plugin', plugin: 'compact', compactionId: 'c', sourceCommandId: 'WRONG' } })], + ['checkpoint identity', change(compact(), 4, { source: { kind: 'compact-checkpoint', compactionId: 'WRONG', sourceCommandId: 'cmd' } })], + ['checkpoint command', change(compact(), 4, { source: { kind: 'compact-checkpoint', compactionId: 'c', sourceCommandId: 'WRONG' } })], ['summary identity', change(compact(), 3, { compactionId: 'WRONG' })], ['end identity', change(compact(), 5, { compactionId: 'WRONG' })], ['end turn', change(compact(), 5, { turn: null })], @@ -177,7 +177,7 @@ describe('mandatory V4 dependent event restoration', () => { it('requires titles and durable title requests to cite earlier human messages', () => { const title = row('session/title', { title: 'Example', source: { kind: 'generated' }, messageSeqs: [0] }) - const requestTitle = row('session/title-llm-request', { messageSeqs: [0], messages: [{ ...user(), source: { kind: 'plugin', plugin: 'dsh-session-title-llm' }, content: [{ type: 'text', text: 'historical frame with original coordinates' }] }] }) + const requestTitle = row('session/title-llm-request', { messageSeqs: [0], messages: [{ ...user('dsh-session-title-llm'), content: [{ type: 'text', text: 'historical frame with original coordinates' }] }] }) expect(() => reopen([input(), title, requestTitle, row('session/title', { title: 'Manual', source: { kind: 'user' }, messageSeqs: [] })])).not.toThrow() for (const rows of [[input('external'), title], [input(), { ...title, data: { ...title.data, source: { kind: 'user' } } }], [input(), { ...title, data: { ...title.data, messageSeqs: [0, 0] } }], [input(), { ...title, data: { ...title.data, messageSeqs: [1] } }], [input(), { ...requestTitle, data: { ...requestTitle.data, messages: [user()] } }], [input(), { ...requestTitle, data: { ...requestTitle.data, messageSeqs: [] } }]]) { expect(() => reopen(rows)).toThrow() @@ -187,7 +187,7 @@ describe('mandatory V4 dependent event restoration', () => { describe('V4 protected system surface and malformed relationship inputs', () => { - const system = (): Row => ({ ...row('system/message', { ...step, message: { id: 'system', role: 'system', source: { kind: 'plugin', plugin: '@deepseek-ai/dsh-system-prompt' }, content: [{ type: 'text', text: 'system' }] } }), surfaceOp: 'append' }) + const system = (): Row => ({ ...row('system/message', { ...step, message: { id: 'system', role: 'system', source: { kind: 'system-prompt' }, content: [{ type: 'text', text: 'system' }] } }), surfaceOp: 'append' }) it('keeps the first system head protected across exact replacements', () => { const replacement = { ...system(), surfaceOp: { op: 'replace', startSeq: 2, endSeq: 2 }, sourceEventSeqs: [2] } expect(() => reopen([...begin(), system(), input(), replacement, system(), ...end()])).not.toThrow() diff --git a/packages/session/session-format-v3-to-v4/tests/sources.spec.ts b/packages/session/session-format-v3-to-v4/tests/sources.spec.ts new file mode 100644 index 0000000000..910bc81bb6 --- /dev/null +++ b/packages/session/session-format-v3-to-v4/tests/sources.spec.ts @@ -0,0 +1,80 @@ +import { describe, expect, it } from 'vitest' +import type { SessionFormatEvent, SessionFormatJsonObject, SessionFormatJsonValue } from '@deepseek-ai/dsh-session-format' +import { mapEventMessages, rewritePluginSource } from '../src/sources.ts' + +function event(type: string, data: SessionFormatJsonObject): SessionFormatEvent { + return { type, seq: 0, time: 1, data } +} + +const identity = (message: SessionFormatJsonObject): SessionFormatJsonObject => message + +describe('mapEventMessages', () => { + it('returns events whose data is not an object', () => { + const row = { type: 'turn/start', seq: 0, time: 1, data: 'nope' } as unknown as SessionFormatEvent + expect(mapEventMessages(row, identity)).toBe(row) + }) + + it('transforms the user/message payload and preserves identity when unchanged', () => { + const message: SessionFormatJsonObject = { id: 'u', role: 'user', source: { kind: 'user' }, content: [] } + const row = event('user/message', message) + expect(mapEventMessages(row, identity)).toBe(row) + expect(mapEventMessages(row, value => ({ ...value, id: 'u2' })).data).toEqual({ ...message, id: 'u2' }) + }) + + it('transforms the message payload of system, assistant, and tool/result rows', () => { + const message: SessionFormatJsonObject = { id: 's', role: 'system', source: { kind: 'system-prompt' }, content: [] } + const row = event('system/message', { turn: 1, step: 1, message }) + expect(mapEventMessages(row, identity)).toBe(row) + expect((mapEventMessages(row, value => ({ ...value, id: 's2' })).data as SessionFormatJsonObject)['message']).toEqual({ ...message, id: 's2' }) + }) + + it('refuses a message payload that is not an object', () => { + expect(() => mapEventMessages(event('system/message', { message: 'nope' }), identity)).toThrow(/requires a message/) + }) + + it('transforms message arrays on spliced and title-request rows', () => { + const message: SessionFormatJsonObject = { id: 'u', role: 'user', source: { kind: 'user' }, content: [] } + const spliced = event('agent/inbox/spliced', { target: 'next-turn', start: 0, inserted: [message] }) + expect(mapEventMessages(spliced, identity)).toBe(spliced) + expect((mapEventMessages(spliced, value => ({ ...value, id: 'u2' })).data as SessionFormatJsonObject)['inserted']).toEqual([{ ...message, id: 'u2' }]) + const title = event('session/title-llm-request', { messages: [message] }) + expect(mapEventMessages(title, identity)).toBe(title) + expect((mapEventMessages(title, value => ({ ...value, id: 'u2' })).data as SessionFormatJsonObject)['messages']).toEqual([{ ...message, id: 'u2' }]) + }) + + it('refuses a message array that is not an array and members that are not objects', () => { + expect(() => mapEventMessages(event('agent/inbox/spliced', { inserted: 'nope' }), identity)).toThrow(/requires message array/) + expect(() => mapEventMessages(event('agent/inbox/spliced', { inserted: ['nope'] }), identity)).toThrow(/requires message objects/) + }) + + it('returns unrelated events unchanged', () => { + const row = event('turn/start', { turn: 1 }) + expect(mapEventMessages(row, identity)).toBe(row) + }) +}) + +describe('rewritePluginSource', () => { + it('rewrites renamed and role-sensitive producers, dropping the plugin field', () => { + expect(rewritePluginSource({ kind: 'plugin', plugin: 'tools-ptc' }, 1, 'user')).toEqual({ kind: 'code-mode' }) + expect(rewritePluginSource({ kind: 'plugin', plugin: '@deepseek-ai/dsh-system-prompt' }, 1, 'system')).toEqual({ kind: 'system-prompt' }) + expect(rewritePluginSource({ kind: 'plugin', plugin: '@deepseek-ai/dsh-system-prompt' }, 1, 'user')).toEqual({ kind: 'runtime-context' }) + expect(rewritePluginSource({ kind: 'plugin', plugin: 'external', extra: true }, 1, 'user')).toEqual({ kind: 'external', extra: true }) + }) + + it('refuses a plugin field that is not a non-empty string', () => { + const plugins: readonly SessionFormatJsonValue[] = [null, '', 7] + for (const plugin of plugins) { + expect(() => rewritePluginSource({ kind: 'plugin', plugin }, 3, 'user')).toThrow(/not canonical/) + } + }) + + it('refuses external plugin names that collide with current producer kinds', () => { + for (const plugin of ['plugin', 'user', 'model', 'tool', 'system-prompt', 'runtime-context', 'compact-checkpoint', 'code-mode', 'compact-basic', 'auto-review']) { + expect(() => rewritePluginSource({ kind: 'plugin', plugin }, 3, 'user')).toThrow(/collides with a current producer kind/) + } + expect(rewritePluginSource({ kind: 'plugin', plugin: 'agent-instructions', form: 'instructions', changes: [] }, 3, 'user')) + .toEqual({ kind: 'agent-instructions', form: 'instructions', changes: [] }) + expect(rewritePluginSource({ kind: 'plugin', plugin: 'tool-jobs' }, 3, 'user')).toEqual({ kind: 'tool-jobs' }) + expect(rewritePluginSource({ kind: 'plugin', plugin: '@deepseek-ai/dsh-system-prompt' }, 3, 'system')).toEqual({ kind: 'system-prompt' }) + }) +}) diff --git a/packages/session/session-format-v3-to-v4/tests/validation.spec.ts b/packages/session/session-format-v3-to-v4/tests/validation.spec.ts new file mode 100644 index 0000000000..2d3c447842 --- /dev/null +++ b/packages/session/session-format-v3-to-v4/tests/validation.spec.ts @@ -0,0 +1,172 @@ +import { describe, expect, it } from 'vitest' +import type { + SessionFormatArtifact, + SessionFormatHeader, + SessionFormatJsonObject, +} from '@deepseek-ai/dsh-session-format' +import { + assertReleasedV4Header, + restoreReleasedV4Artifact, +} from '@deepseek-ai/dsh-session-format-v3-to-v4' +import { assertReleasedV4Artifact as assertReleasedV4PhysicalArtifact } from '../src/testing/validation.ts' + +const KNOWN = new Set(['turn/start', 'step/start', 'assistant/message', 'tool/call', 'tool/result', 'step/end', 'turn/end', 'user/message', 'session/end-seed']) + +function header(overrides: Partial> = {}): SessionFormatHeader { + return { + version: 4, + id: 'v4-session', + createdAt: 1, + isSeeded: false, + delegationDepth: 0, + ...overrides, + } +} + +function artifact(events: readonly Record[], h = header(), inherited = 0): SessionFormatArtifact { + return { + header: h, + inheritedEventCount: inherited, + events: events as unknown as SessionFormatArtifact['events'], + } +} + +/** One canonical released-v4 turn: call a tool and receive its result. */ +function conversation(): Record[] { + const message = ( + id: string, + role: string, + content: SessionFormatJsonObject[], + source: SessionFormatJsonObject, + ): SessionFormatJsonObject => ( + { id, role, content, source } + ) + return [ + { type: 'turn/start', seq: 0, time: 1, data: { turn: 1 } }, + { type: 'step/start', seq: 1, time: 2, data: { turn: 1, step: 1 } }, + { + type: 'assistant/message', seq: 2, time: 3, surfaceOp: 'append', + data: { + turn: 1, step: 1, + message: message('assistant-1', 'assistant', [ + { type: 'text', text: 'calling' }, + { type: 'tool-call', id: 'call-1', name: 'bash', arguments: '{}' }, + ], { kind: 'model', provider: 'mock', model: 'mock' }), + stream: [{ type: 'chunk', time: 3, chunk: { type: 'block-end', index: 1, block: { type: 'tool-call', id: 'call-1', name: 'bash', arguments: '{}' } } }], + }, + }, + { + type: 'tool/call', seq: 3, time: 4, + data: { turn: 1, step: 1, callId: 'call-1', name: 'bash', arguments: '{}' }, + }, + { + type: 'tool/result', seq: 4, time: 5, surfaceOp: 'append', + data: { + turn: 1, step: 1, + message: { ...message('tool-1', 'tool', [{ type: 'text', text: 'ok' }], { kind: 'tool', callId: 'call-1' }), + toolCallId: 'call-1', isError: false }, + }, + }, + { type: 'step/end', seq: 5, time: 6, data: { turn: 1, step: 1 } }, + { type: 'turn/end', seq: 6, time: 7, data: { turn: 1, reason: { kind: 'completed' } } }, + ] +} + +describe('assertReleasedV4Header', () => { + it('accepts the minimal and complete header images', () => { + expect(() => { assertReleasedV4Header(header()) }).not.toThrow() + expect(() => { assertReleasedV4Header(header({ + cwd: '/work', parentSession: 'parent', origin: 'subagent', agentPreset: 'headless', isSeeded: true, + })) }).not.toThrow() + }) + + it('refuses malformed headers', () => { + const malformed: Array<[string, Record, RegExp]> = [ + ['wrong version', { ...header(), version: 2 }, /expected format v4/], + ['non-string id', { ...header(), id: 3 }, /id must be a string/], + ['non-count createdAt', { ...header(), createdAt: 'x' }, /createdAt/], + ['non-count delegationDepth', { ...header(), delegationDepth: -1 }, /delegationDepth/], + ['non-boolean isSeeded', { ...header(), isSeeded: 1 }, /isSeeded must be boolean/], + ['relative cwd', { ...header(), cwd: 'work' }, /cwd must be absolute/], + ['non-string parentSession', { ...header(), parentSession: 3 }, /parentSession must be a string/], + ['non-string agentPreset', { ...header(), agentPreset: 3 }, /agentPreset must be a string/], + ['invalid origin', { ...header(), origin: 'other' }, /origin must be "subagent"/], + ] + for (const [name, value, message] of malformed) { + expect(() => { assertReleasedV4Header(value) }, name).toThrow(message) + } + }) +}) + +describe('restoreReleasedV4Artifact', () => { + it('validates dense envelopes, cuts, and event vocabulary', () => { + const valid = artifact(conversation()) + expect(restoreReleasedV4Artifact(valid, KNOWN)).toBe(valid) + + expect(() => restoreReleasedV4Artifact(artifact(conversation(), header({ isSeeded: true }), 20), KNOWN)) + .toThrow(/inherited event count exceeds its events/) + expect(() => restoreReleasedV4Artifact(artifact([ + { type: 'session/end-seed', seq: 0, time: 1, data: { inherited: true } }, + ], header(), 0), KNOWN)) + .toThrow(/format v4 unseeded Session contains an inherited end-seed marker/) + expect(() => restoreReleasedV4Artifact(artifact(conversation(), header(), 1), KNOWN)) + .toThrow(/unseeded format v4 Session has inherited events/) + }) + + it('validates only the envelope in physical mode', () => { + const unknown = conversation() + unknown.splice(2, 0, { type: 'campaign/unknown', seq: 0, time: 1, data: { x: 1 } }) + for (const [index, item] of unknown.entries()) (item as { seq: number }).seq = index + expect(() => { assertReleasedV4PhysicalArtifact(artifact(unknown)) }).not.toThrow() + expect(() => restoreReleasedV4Artifact(artifact(unknown), KNOWN)) + .toThrow(/unknown event type/) + }) + + it('refuses unknown non-ignorable types and admits ignorable ones', () => { + const unknown = conversation() + unknown.splice(2, 0, { type: 'campaign/unknown', seq: 99, time: 1, data: { x: 1 } }) + expect(() => restoreReleasedV4Artifact(artifact(unknown), KNOWN)) + .toThrow(/unknown event type/) + const ignorable = conversation() + ignorable.splice(0, 0, { + type: 'campaign/unknown', seq: 0, time: 1, ignorable: true, data: { x: 1 }, + }) + for (const [index, item] of ignorable.entries()) (item as { seq: number }).seq = index + expect(() => restoreReleasedV4Artifact(artifact(ignorable), new Set([...KNOWN, 'campaign/unknown']))) + .not.toThrow() + }) + + it('enforces V4-owned event density', () => { + expect(() => restoreReleasedV4Artifact(artifact([ + { type: 'turn/start', time: 1, data: {} }, + ]), KNOWN)).toThrow(/is not dense/) + expect(() => restoreReleasedV4Artifact(artifact([ + conversation()[0]!, { ...conversation()[1]!, seq: 3 }, + ]), KNOWN)).toThrow(/is not dense/) + }) + + it('enforces end-seed marker agreement', () => { + const marker = (seq: number, inherited: boolean) => ({ + type: 'session/end-seed', seq, time: 1, data: { ...(inherited ? { inherited: true } : {}) }, + }) + expect(() => restoreReleasedV4Artifact( + artifact([marker(0, true)], header({ isSeeded: true }), 0), + new Set([...KNOWN, 'session/end-seed']), + )).not.toThrow() + expect(() => restoreReleasedV4Artifact( + artifact([marker(0, false), marker(1, true)], header({ isSeeded: true }), 0), + new Set([...KNOWN, 'session/end-seed']), + )).toThrow(/seeded header disagrees/) + expect(() => restoreReleasedV4Artifact( + artifact([marker(0, true)], header(), 0), + new Set([...KNOWN, 'session/end-seed']), + )).toThrow(/unseeded Session contains an inherited end-seed marker/) + }) + + it('refuses non-object records and non-string event types', () => { + expect(() => restoreReleasedV4Artifact(artifact([{ type: 3, seq: 0, time: 1, data: {} }]), KNOWN)) + .toThrow(/unknown event type/) + expect(() => restoreReleasedV4Artifact(artifact([null as never]), KNOWN)) + .toThrow() + }) +}) diff --git a/packages/session/session-format-v3-to-v4/tsdown.config.ts b/packages/session/session-format-v3-to-v4/tsdown.config.ts new file mode 100644 index 0000000000..caaa1aefad --- /dev/null +++ b/packages/session/session-format-v3-to-v4/tsdown.config.ts @@ -0,0 +1,12 @@ +import { defineConfig } from 'tsdown' + +export default defineConfig({ + entry: ['lib/types/index.js'], + outDir: 'lib', + format: ['esm'], + platform: 'node', + target: 'es2024', + fixedExtension: false, + dts: false, + clean: false, +}) diff --git a/packages/session/session-log-deepseek/tests/upload.spec.ts b/packages/session/session-log-deepseek/tests/upload.spec.ts index 25e58bb5f2..262f458f92 100644 --- a/packages/session/session-log-deepseek/tests/upload.spec.ts +++ b/packages/session/session-log-deepseek/tests/upload.spec.ts @@ -110,13 +110,13 @@ describe('incremental DeepSeek session-log upload', () => { it('uploads system append and replacement placement with unchanged data and source-event references', async () => { const { ctx, session } = await harness('wire-system') - const headData = { turn: 1, step: 1, message: createSystemMessage('head', 'fixture'), extra: { retained: true } } + const headData = { turn: 1, step: 1, message: createSystemMessage('head'), extra: { retained: true } } const head = session.append('system/message', headData, { surfaceOp: 'append' }) session.append('system/message', { - turn: 1, step: 2, message: createSystemMessage('later', 'fixture'), + turn: 1, step: 2, message: createSystemMessage('later'), }, { surfaceOp: 'append' }) session.append('system/message', { - turn: 1, step: 3, message: createSystemMessage('new head', 'fixture'), + turn: 1, step: 3, message: createSystemMessage('new head'), }, { surfaceOp: { op: 'replace', startSeq: head.seq, endSeq: head.seq }, sourceEventSeqs: [head.seq] }) const prepared = await ctx.deepseekLlmApiExtensions.prepare({ body: body(), signal: SIGNAL, sessionId: session.id }) expect(prepared.fields.dsh_session_log?.events).toEqual(session.snapshotEvents()) diff --git a/packages/session/session-persistence-jsonl/package.json b/packages/session/session-persistence-jsonl/package.json index 46241212d7..0966adcd58 100644 --- a/packages/session/session-persistence-jsonl/package.json +++ b/packages/session/session-persistence-jsonl/package.json @@ -38,8 +38,8 @@ "@deepseek-ai/dsh-session-format-catalog": "workspace:^", "@deepseek-ai/dsh-session-format-v3-to-v4": "workspace:^", "@deepseek-ai/node-addon-system": "workspace:^", - "koffi": "^3.1.0", - "@deepseek-ai/schemastery": "workspace:^" + "@deepseek-ai/schemastery": "workspace:^", + "koffi": "^3.1.0" }, "devDependencies": { "@deepseek-ai/dsh-session": "workspace:^", diff --git a/packages/session/session-persistence-jsonl/tests/generation.spec.ts b/packages/session/session-persistence-jsonl/tests/generation.spec.ts index c42603eb92..fa7ef5408b 100644 --- a/packages/session/session-persistence-jsonl/tests/generation.spec.ts +++ b/packages/session/session-persistence-jsonl/tests/generation.spec.ts @@ -376,7 +376,8 @@ describe('JSONL immutable generation publication', () => { events[0], events[1], expect.objectContaining({ type: 'system/message', seq: 2, surfaceOp: 'append', data: expect.objectContaining({ message: expect.objectContaining({ role: 'system', content: [] }) as unknown }) as unknown }) as unknown, ...events.slice(2).map(event => event.seq === 3 - ? { ...event, seq: 4, surfaceOp: { op: 'replace', startSeq: 3, endSeq: 3 }, sourceEventSeqs: [3] } + ? { ...event, seq: 4, surfaceOp: { op: 'replace', startSeq: 3, endSeq: 3 }, sourceEventSeqs: [3], + data: { ...event.data as Record, source: { kind: 'summary-fixture' } } } : event.seq === 4 ? { ...event, seq: 5, data: { header: { config }, reason: 'initial' } } : { ...event, seq: event.seq + 1 }), ] diff --git a/packages/session/session-persistence-jsonl/tests/jsonl.spec.ts b/packages/session/session-persistence-jsonl/tests/jsonl.spec.ts index 8ee6fc2138..9fad5af0e9 100644 --- a/packages/session/session-persistence-jsonl/tests/jsonl.spec.ts +++ b/packages/session/session-persistence-jsonl/tests/jsonl.spec.ts @@ -199,7 +199,7 @@ function withMigratedEmptyHead(log: readonly SessionEvent[]): readonly unknown[] type: 'system/message', seq: 2, time: log[1]!.time, surfaceOp: 'append', data: { turn: 1, step: 1, message: { id: expect.stringMatching(/^v2-to-v3-system-[0-9a-f]{64}$/) as unknown, - role: 'system', content: [], source: { kind: 'plugin', plugin: '@deepseek-ai/dsh-system-prompt' }, + role: 'system', content: [], source: { kind: 'system-prompt' }, } }, }, ...log.slice(2).map(event => ({ ...event, seq: SessionSeq(event.seq + 1) })), diff --git a/packages/session/session-persistence-jsonl/tests/migration-refusal.spec.ts b/packages/session/session-persistence-jsonl/tests/migration-refusal.spec.ts index 8821cdf873..c73b7e5483 100644 --- a/packages/session/session-persistence-jsonl/tests/migration-refusal.spec.ts +++ b/packages/session/session-persistence-jsonl/tests/migration-refusal.spec.ts @@ -46,7 +46,7 @@ const nativePrefix: readonly SessionFormatJsonObject[] = [ ...prefix.slice(0, 2), { type: 'system/message', surfaceOp: 'append', data: { turn: 1, step: 1, message: { - id: 'native-system', role: 'system', source: { kind: 'plugin', plugin: '@deepseek-ai/dsh-system-prompt' }, + id: 'native-system', role: 'system', source: { kind: 'system-prompt' }, content: [{ type: 'text', text: 'Inspect the durable audit.' }], }, } }, diff --git a/packages/session/session-persistence-jsonl/tests/native-source-admission.spec.ts b/packages/session/session-persistence-jsonl/tests/native-source-admission.spec.ts new file mode 100644 index 0000000000..4e9cf2c22b --- /dev/null +++ b/packages/session/session-persistence-jsonl/tests/native-source-admission.spec.ts @@ -0,0 +1,80 @@ +import { Context } from '@deepseek-ai/cordis' +import { SESSION_FORMAT_VERSION, SessionId } from '@deepseek-ai/dsh-session' +import { SessionPersistenceCorruptionError } from '@deepseek-ai/dsh-session-persistence' +import JsonlSessionPersistence from '@deepseek-ai/dsh-session-persistence-jsonl' +import { mkdir, mkdtemp, readFile, readdir, rm, writeFile } from 'node:fs/promises' +import { tmpdir } from 'node:os' +import { dirname, join } from 'node:path' +import { afterEach, beforeEach, describe, expect, it } from 'vitest' +import { generationLogPath } from '../src/format.ts' +import { compressZstdFrame } from '../src/zstd.ts' + +const id = SessionId('native-source-admission') +const modes = (['none', 'zstd'] as const).flatMap(compression => (['read', 'write'] as const).map(access => ({ compression, access }))) +let root: string +const contexts: Context[] = [] +beforeEach(async () => { root = await mkdtemp(join(tmpdir(), 'dsh-native-source-')) }) +afterEach(async () => { + try { + for (const ctx of contexts.splice(0).reverse()) await ctx.fiber.dispose() + } finally { + await rm(root, { recursive: true, force: true }) + } +}) + +describe.each(modes)('native message-source admission ($compression, $access)', ({ compression, access }) => { + async function stored(source: unknown, type = 'agent/inbox/spliced', ignorable = false) { + const header = { type: 'session', version: SESSION_FORMAT_VERSION, id, createdAt: 1, delegationDepth: 0, isSeeded: false } + const event = { type, seq: 0, time: 1, ...(ignorable ? { ignorable: true } : {}), data: { + target: 'next-turn', start: 0, inserted: [{ id: 'input', role: 'user', source, content: [{ type: 'text', text: 'queued' }] }], + } } + const lines = [header, event].map(value => JSON.stringify(value) + '\n') + const bytes = compression === 'none' ? Buffer.from(lines.join('')) : Buffer.concat(await Promise.all(lines.map(compressZstdFrame))) + const path = generationLogPath(root, undefined, id, SESSION_FORMAT_VERSION, compression) + await mkdir(dirname(path), { recursive: true }) + await writeFile(path, bytes) + const ctx = new Context() + contexts.push(ctx) + await ctx.plugin(JsonlSessionPersistence, { root, compression }) + return { ctx, path, bytes, event } + } + + it.each([null, {}, [], { kind: '' }, { kind: 1 }].map(source => ({ source })))('refuses malformed queued source $source before exposing a handle', async ({ source }) => { + const { ctx, path, bytes } = await stored(source) + const opened = ctx.sessionPersistence.open(id, access).then(async (handle) => { await handle.close() }) + await expect(opened).rejects.toBeInstanceOf(SessionPersistenceCorruptionError) + await expect(opened).rejects.toThrow('producer-owned source kind') + expect(await readFile(path)).toEqual(bytes) + expect((await readdir(dirname(path))).filter(name => name !== 'session.lock')).toHaveLength(1) + }) + + it('still validates known queued events marked ignorable', async () => { + const { ctx, path, bytes } = await stored({}, 'agent/inbox/spliced', true) + const opened = ctx.sessionPersistence.open(id, access).then(async (handle) => { await handle.close() }) + await expect(opened).rejects.toThrow('producer-owned source kind') + expect(await readFile(path)).toEqual(bytes) + }) + + it('preserves external attribution and own JSON metadata without a producer installed', async () => { + const source = JSON.parse('{"kind":"external-producer","__proto__":{"retain":true},"metadata":{"count":1}}') as unknown + const { ctx, path, bytes, event } = await stored(source) + const handle = await ctx.sessionPersistence.open(id, access) + try { + expect((await handle.read()).events[0]).toEqual(event) + } finally { + await handle.close() + } + expect(await readFile(path)).toEqual(bytes) + }) + + it('leaves unknown ignorable queued payloads opaque', async () => { + const { ctx, path, bytes, event } = await stored(null, 'external/inbox', true) + const handle = await ctx.sessionPersistence.open(id, access) + try { + expect((await handle.read()).events[0]).toEqual(event) + } finally { + await handle.close() + } + expect(await readFile(path)).toEqual(bytes) + }) +}) diff --git a/packages/session/session-persistence-jsonl/tests/v2-ptc-migration.spec.ts b/packages/session/session-persistence-jsonl/tests/v2-ptc-migration.spec.ts index c3d2689eb6..00cc5c8f77 100644 --- a/packages/session/session-persistence-jsonl/tests/v2-ptc-migration.spec.ts +++ b/packages/session/session-persistence-jsonl/tests/v2-ptc-migration.spec.ts @@ -57,7 +57,8 @@ const imageMessage = { ], } const currentImageMessage = { - ...imageMessage, source: { ...imageMessage.source, plugin: 'tools-ptc' }, + ...imageMessage, + source: { kind: 'code-mode', form: imageMessage.source.form, summary: imageMessage.source.summary }, } const dispatch = { rootCallId: toolCall.id, parentCallId: toolCall.id, subCallId: 'tools-code-mode:child-call', @@ -166,13 +167,17 @@ describe('JSONL V2 PTC publication and restore', () => { target: 'next-step', start: 0, removedCount: 0, inserted: [currentImageMessage], } } as SessionFormatEvent expectedEvents[9] = { ...expectedEvents[9], data: currentImageMessage } as SessionFormatEvent + const titleRequestData = events[10]?.data as { messages: Array> } expectedEvents[10] = { ...expectedEvents[10], data: { ...(events[10]?.data as Record), messageSeqs: [3], + messages: titleRequestData.messages.map(message => ({ + ...message, source: { kind: 'dsh-session-title-llm' }, + })), } } as SessionFormatEvent const systemMessage = { id: 'v2-to-v3-system-' + createHash('sha256') .update(JSON.stringify(['session-format-v2-to-v3', id, 1, 'step/start'])).digest('hex'), - role: 'system', source: { kind: 'plugin', plugin: '@deepseek-ai/dsh-system-prompt' }, content: [], + role: 'system', source: { kind: 'system-prompt' }, content: [], } expectedEvents.splice(2, 0, { type: 'system/message', seq: 2, time: 1002, surfaceOp: 'append', diff --git a/packages/session/session-persistence-jsonl/tests/v2-system-migration.spec.ts b/packages/session/session-persistence-jsonl/tests/v2-system-migration.spec.ts index 300eee0a76..416f04e3eb 100644 --- a/packages/session/session-persistence-jsonl/tests/v2-system-migration.spec.ts +++ b/packages/session/session-persistence-jsonl/tests/v2-system-migration.spec.ts @@ -223,7 +223,7 @@ describe('V2 system prompts through current Session and JSONL persistence', () = session.append('step/start', { turn: 2, step: 1 }) session.append('system/message', { turn: 2, step: 1, - message: freezeMessage({ role: 'system', id: MessageId('resumed-system'), content: [{ type: 'text', text: 'resumed prompt' }], source: { kind: 'plugin', plugin: '@deepseek-ai/dsh-system-prompt' } }), + message: freezeMessage({ role: 'system', id: MessageId('resumed-system'), content: [{ type: 'text', text: 'resumed prompt' }], source: { kind: 'system-prompt' } }), }, { surfaceOp: { op: 'replace', startSeq: SessionSeq(4), endSeq: SessionSeq(4) }, sourceEventSeqs: [SessionSeq(4)] }) session.append('step/end', { turn: 2, step: 1 }) session.append('turn/end', { turn: 2, reason: { kind: 'completed' } }) @@ -277,12 +277,12 @@ describe('V2 system prompts through current Session and JSONL persistence', () = session.append('step/start', { turn: 1, step: 1 }) session.append('system/message', { turn: 1, step: 1, - message: freezeMessage({ role: 'system', id: MessageId('head'), content: [{ type: 'text', text: 'head prompt' }], source: { kind: 'plugin', plugin: '@deepseek-ai/dsh-system-prompt' } }), + message: freezeMessage({ role: 'system', id: MessageId('head'), content: [{ type: 'text', text: 'head prompt' }], source: { kind: 'system-prompt' } }), }, { surfaceOp: 'append' }) session.append('user/message', freezeMessage({ role: 'user', id: MessageId('question'), content: human.content, source: { kind: 'user' } }), { surfaceOp: 'append' }) session.append('system/message', { turn: 1, step: 1, - message: freezeMessage({ role: 'system', id: MessageId('context'), content: [{ type: 'text', text: 'tail context' }], source: { kind: 'plugin', plugin: 'context-plugin' } }), + message: freezeMessage({ role: 'system', id: MessageId('context'), content: [{ type: 'text', text: 'tail context' }], source: { kind: 'system-prompt' } }), }, { surfaceOp: 'append' }) session.append('step/end', { turn: 1, step: 1 }) session.append('turn/end', { turn: 1, reason: { kind: 'completed' } }) diff --git a/packages/session/session-persistence-jsonl/tests/zstd.spec.ts b/packages/session/session-persistence-jsonl/tests/zstd.spec.ts index 222ffbb3bd..4ec279ac61 100644 --- a/packages/session/session-persistence-jsonl/tests/zstd.spec.ts +++ b/packages/session/session-persistence-jsonl/tests/zstd.spec.ts @@ -440,7 +440,7 @@ describe('JsonlSessionPersistence: default Zstandard encoding', () => { turn: 1, step: 1, message: { id: 'v2-to-v3-system-fc06c3f7720f3bc94ea7a2b7fadde6a5b100c6ab6ca342d2222bd017184a0b67', - role: 'system', source: { kind: 'plugin', plugin: '@deepseek-ai/dsh-system-prompt' }, content: [], + role: 'system', source: { kind: 'system-prompt' }, content: [], }, }, }, diff --git a/packages/session/session-title-llm/src/index.ts b/packages/session/session-title-llm/src/index.ts index d0092ec956..837160a50d 100644 --- a/packages/session/session-title-llm/src/index.ts +++ b/packages/session/session-title-llm/src/index.ts @@ -7,6 +7,13 @@ import type { Context } from '@deepseek-ai/cordis' import z from '@deepseek-ai/schemastery' import { createUserMessage, BlockAssembler } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'dsh-session-title-llm': { kind: 'dsh-session-title-llm' } & ContextFormed + } +} + import type { FinishReason, GenerateOptions, Message } from '@deepseek-ai/dsh-llm' import { deadline, MAX_TIMER_DELAY_MS } from '@deepseek-ai/dsh-timeout' import { deepFreeze } from '@deepseek-ai/dsh-util-values' @@ -247,7 +254,7 @@ export async function generateSessionTitleWithLlm( const route = resolveRoute(config, request) const messages: Message[] = [createUserMessage({ content: [{ type: 'text', text: framedInput }], - source: { kind: 'plugin', plugin: 'dsh-session-title-llm' }, + source: { kind: 'dsh-session-title-llm' }, })] const system = systemPrompt(config) using callDeadline = deadline(request.signal, config.timeoutMs, SESSION_TITLE_TIMEOUT_CODE) diff --git a/packages/session/session-title/tests/invariant.spec.ts b/packages/session/session-title/tests/invariant.spec.ts index 5903c63250..246bd8c67f 100644 --- a/packages/session/session-title/tests/invariant.spec.ts +++ b/packages/session/session-title/tests/invariant.spec.ts @@ -6,6 +6,13 @@ import * as SessionTitleInvariantCompanion from '@deepseek-ai/dsh-session-title/ import InvariantRegistry, { InvariantError } from '@deepseek-ai/dsh-invariants' import SessionStore, { SessionId, SessionSeq } from '@deepseek-ai/dsh-session' import { createUserMessage } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' + +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'test': { kind: 'test' } & ContextFormed + } +} async function setup(): Promise { const ctx = new Context() @@ -64,7 +71,7 @@ describe('session-title source invariant', () => { })).toThrow(/invalid message seq/) const pluginMessage = session.append('user/message', createUserMessage({ content: [{ type: 'text', text: 'plugin context' }], - source: { kind: 'plugin', plugin: 'test' }, + source: { kind: 'test' }, }), { surfaceOp: 'append' }) expect(() => session.append('session/title', { title: 'plugin source', messageSeqs: [pluginMessage.seq], source: { kind: 'fallback' }, diff --git a/packages/session/session-title/tests/session-title.spec.ts b/packages/session/session-title/tests/session-title.spec.ts index 69edbb84ff..1349c52d4b 100644 --- a/packages/session/session-title/tests/session-title.spec.ts +++ b/packages/session/session-title/tests/session-title.spec.ts @@ -1,4 +1,5 @@ import { createUserMessage } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' import { Context } from '@deepseek-ai/cordis' import { describe, expect, it } from 'vitest' import SessionStore, { Session, SessionId, SessionSeq } from '@deepseek-ai/dsh-session' @@ -11,6 +12,12 @@ import SessionTitleService, { truncateTitleUtf8, } from '@deepseek-ai/dsh-session-title' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'seed': { kind: 'seed' } & ContextFormed + } +} + const CONFIG = { fallbackMaxWords: 5, fallbackMaxBytes: 40, @@ -113,7 +120,7 @@ describe('SessionTitleService', () => { }) session.append('user/message', createUserMessage({ content: [{ type: 'text', text: 'plugin text' }], - source: { kind: 'plugin', plugin: 'seed' }, + source: { kind: 'seed' }, }), { surfaceOp: 'append' }) session.append('user/message', createUserMessage({ content: [{ type: 'reasoning', text: 'not visible text' }], diff --git a/packages/session/session-turn-outline/tests/projection.spec.ts b/packages/session/session-turn-outline/tests/projection.spec.ts index 959e5587b4..c01acf8aa5 100644 --- a/packages/session/session-turn-outline/tests/projection.spec.ts +++ b/packages/session/session-turn-outline/tests/projection.spec.ts @@ -12,6 +12,7 @@ import { describe, expect, expectTypeOf, it } from 'vitest' import { Context } from '@deepseek-ai/cordis' import { createAssistantMessage, createUserMessage } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' import SessionStore, { SessionId, SessionLogOffset, SessionSeq } from '@deepseek-ai/dsh-session' import type { Session, SessionEvent } from '@deepseek-ai/dsh-session' import SessionProjectionRegistry from '@deepseek-ai/dsh-session-projection' @@ -19,6 +20,12 @@ import * as SessionTurnOutlinePlugin from '@deepseek-ai/dsh-session-turn-outline import { turnOutlineProjectionDefinition } from '@deepseek-ai/dsh-session-turn-outline/src/projection.ts' import type { TurnOutlineEntry, TurnOutlineState } from '@deepseek-ai/dsh-session-turn-outline/types' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'test-injector': { kind: 'test-injector' } & ContextFormed + } +} + async function harness(withOutlinePlugin: boolean): Promise<{ ctx: Context; session: Session }> { const ctx = new Context() await ctx.plugin(SessionStore) @@ -136,7 +143,7 @@ describe('turn outline projection unit', () => { session.append('turn/start', { turn: 1 }) session.append('user/message', createUserMessage({ content: [{ type: 'text', text: 'injected context' }], - source: { kind: 'plugin', plugin: 'test-injector', form: 'relay' }, + source: { kind: 'test-injector', form: 'relay' }, }), { surfaceOp: 'append' }) expect(outlineOf(ctx, session)).toEqual([ { turn: 1, seq: 1, prompt: '', response: '' }, diff --git a/packages/shell/tool-bash/tests/integration.spec.ts b/packages/shell/tool-bash/tests/integration.spec.ts index a75b7370d4..0aa4ad7925 100644 --- a/packages/shell/tool-bash/tests/integration.spec.ts +++ b/packages/shell/tool-bash/tests/integration.spec.ts @@ -199,7 +199,7 @@ describe('bash tool through the agent loop', () => { expect(resultText(firstResult)).toBe('started background job bash-1') // The turn closed with the task still running, so the notice cannot exist yet. const isNotice = (e: SessionEvent): e is SessionEvent<'user/message'> => - e.type === 'user/message' && e.data.source.kind === 'plugin' + e.type === 'user/message' && e.data.source.kind !== 'user' expect(events(agent).some(isNotice)).toBe(false) // Releasing the command now settles it against a provably idle owner. No @@ -222,8 +222,7 @@ describe('bash tool through the agent loop', () => { expect(noticeText).toContain('background job bash-1 (bash: ') expect(noticeText).toContain('finished [status: completed, exit code: 0]') expect(notice.data.source).toMatchObject({ - kind: 'plugin', - plugin: 'tool-jobs', + kind: 'tool-jobs', form: 'notice', }) const readResult = findEvent(events(agent), 'tool/result', 'last') diff --git a/packages/skill/tool-skill/tests/tool-skill.spec.ts b/packages/skill/tool-skill/tests/tool-skill.spec.ts index 603166de04..7d9fb0d2f0 100644 --- a/packages/skill/tool-skill/tests/tool-skill.spec.ts +++ b/packages/skill/tool-skill/tests/tool-skill.spec.ts @@ -4,6 +4,7 @@ import { join } from 'node:path' import { tmpdir } from 'node:os' import { Context } from '@deepseek-ai/cordis' import { createUserMessage, ToolCallId, type Message } from '@deepseek-ai/dsh-llm' +import type { ContextFormed, MessageSource } from '@deepseek-ai/dsh-llm' import { createScope, type Scope } from '@deepseek-ai/dsh-scope' import { SESSION_FORMAT_VERSION, Session, SessionId, type SessionEvent, type UserMessage, @@ -16,6 +17,20 @@ import * as SkillFileSystem from '@deepseek-ai/dsh-skill-filesystem' import * as toolSkill from '@deepseek-ai/dsh-tool-skill' import { unsupportedInbox } from '@deepseek-ai/dsh-agent-loop-testkit' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'dsh-tool-skill': { kind: 'dsh-tool-skill' } & ContextFormed + 'later-contribution': { kind: 'later-contribution' } & ContextFormed + } +} + +type CheckpointSource = Extract + +/** Build a typed checkpoint source for a skill projection fixture. */ +function checkpointSource(compactionId: string): CheckpointSource { + return { kind: 'compact-checkpoint', compactionId: compactionId as CheckpointSource['compactionId'] } +} + const testToolSignal = new AbortController().signal /** Every temp dir created by this file, removed after each test. */ @@ -261,7 +276,7 @@ describe('dsh-tool-skill', () => { ...decision.messages, createUserMessage({ content: [{ type: 'text', text: 'later contribution' }], - source: { kind: 'plugin', plugin: 'later-contribution' }, + source: { kind: 'later-contribution' }, }), ], } @@ -274,7 +289,7 @@ describe('dsh-tool-skill', () => { id: expect.any(String) as unknown, role: 'user', content: [{ type: 'text', text: 'later contribution' }], - source: { kind: 'plugin', plugin: 'later-contribution' }, + source: { kind: 'later-contribution' }, }, { id: expect.any(String) as unknown, @@ -534,7 +549,7 @@ describe('dsh-tool-skill', () => { }), { surfaceOp: 'append' }) session.append('user/message', createUserMessage({ content: catalogContent(['- `resumed-skill`: Resumed skill']), - source: { kind: 'plugin', plugin: 'dsh-tool-skill' }, + source: { kind: 'dsh-tool-skill' }, }), { surfaceOp: 'append' }) await fireStep(ctx, agent, 1, 1) @@ -628,7 +643,7 @@ describe('dsh-tool-skill', () => { if (initial === undefined) throw new Error('expected initial catalog') session.append('user/message', createUserMessage({ content: [{ type: 'text', text: 'compacted history' }], - source: { kind: 'plugin', plugin: 'compact' }, + source: checkpointSource('skill-compaction'), }), { surfaceOp: { op: 'replace', startSeq: initial.seq, endSeq: initial.seq }, sourceEventSeqs: [initial.seq], diff --git a/packages/spill/spill-policy/tests/spill-policy.spec.ts b/packages/spill/spill-policy/tests/spill-policy.spec.ts index add76c1882..9cbf9f605b 100644 --- a/packages/spill/spill-policy/tests/spill-policy.spec.ts +++ b/packages/spill/spill-policy/tests/spill-policy.spec.ts @@ -13,6 +13,7 @@ import { Context } from '@deepseek-ai/cordis' import Loader from '@deepseek-ai/cordis-plugin-loader' import { createUserMessage, ToolCallId } from '@deepseek-ai/dsh-llm' import type { ContentBlock } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' import SessionStore, { SessionId } from '@deepseek-ai/dsh-session' import SystemPrompt from '@deepseek-ai/dsh-system-prompt' import ToolRuntime, { defineContentToolFixture } from '@deepseek-ai/dsh-tools' @@ -28,6 +29,12 @@ import Sandbox from '@deepseek-ai/dsh-sandbox-local' import SandboxPolicy from '@deepseek-ai/dsh-sandbox-policy' import SessionProjections from '@deepseek-ai/dsh-session-projection' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'test': { kind: 'test' } & ContextFormed + } +} + async function mountRuntime(ctx: Context, config: NodeRuntimeConfig = {}): Promise { onTestFinished(async () => { await ctx.fiber.dispose() }) if (!ctx.get('sessions')) await ctx.plugin(SessionStore) @@ -539,7 +546,7 @@ describe('composition', () => { const { ctx } = await setup({ maxInlineBytes: 200 }) const context = createUserMessage({ content: [{ type: 'text' as const, text: 'note' }], - source: { kind: 'plugin' as const, plugin: 'test' }, + source: { kind: 'test' as const }, }) ctx.on('tools/post-execute', async (_e, _r, _next) => ({ kind: 'accept', additionalContexts: [context] })) diff --git a/packages/subagent/subagent-in-process-driver/tests/inheritance.spec.ts b/packages/subagent/subagent-in-process-driver/tests/inheritance.spec.ts index d3c22b2ac7..ac20f24f99 100644 --- a/packages/subagent/subagent-in-process-driver/tests/inheritance.spec.ts +++ b/packages/subagent/subagent-in-process-driver/tests/inheritance.spec.ts @@ -172,8 +172,7 @@ describe('in-process policy inheritance', () => { ) const runtimeContext = child.session.snapshotEvents().find( (event): event is SessionEvent<'user/message'> => event.type === 'user/message' - && event.data.source.kind === 'plugin' - && event.data.source.plugin === '@deepseek-ai/dsh-system-prompt', + && event.data.source.kind === 'runtime-context', ) if (request === undefined || systemNode === undefined || runtimeContext === undefined) { throw new Error('child request lacks its system node or runtime policy context') diff --git a/packages/subagent/subagent-in-process-driver/tests/structured.spec.ts b/packages/subagent/subagent-in-process-driver/tests/structured.spec.ts index 404c4da097..9d06368496 100644 --- a/packages/subagent/subagent-in-process-driver/tests/structured.spec.ts +++ b/packages/subagent/subagent-in-process-driver/tests/structured.spec.ts @@ -259,7 +259,7 @@ describe('in-process structured output', () => { // Exactly one model request and one caller-supplied user message: no nudge turn exists. expect(adapter.requests.length).toBe(1) const child = ctx.agents.get(run.id)! - expect(child.session.snapshotEvents().filter(e => e.type === 'user/message' && e.data.source.kind !== 'plugin').length).toBe(1) + expect(child.session.snapshotEvents().filter(e => e.type === 'user/message' && e.data.source.kind !== 'runtime-context').length).toBe(1) await run.dispose() }) diff --git a/packages/subagent/subagent-in-process-driver/tests/subagent-in-process-driver.spec.ts b/packages/subagent/subagent-in-process-driver/tests/subagent-in-process-driver.spec.ts index d11fa73b05..3c50c9debf 100644 --- a/packages/subagent/subagent-in-process-driver/tests/subagent-in-process-driver.spec.ts +++ b/packages/subagent/subagent-in-process-driver/tests/subagent-in-process-driver.spec.ts @@ -1,4 +1,5 @@ import { ToolCallId, createUserMessage } from '@deepseek-ai/dsh-llm' +import type { ContextFormed } from '@deepseek-ai/dsh-llm' import { describe, expect, it } from 'vitest' import { Context } from '@deepseek-ai/cordis' import { type Agent, type AgentOptions } from '@deepseek-ai/dsh-agent' @@ -14,6 +15,12 @@ import { defineContentToolFixture } from '@deepseek-ai/dsh-tools' import { maxTokensResponse, MockAdapter, textResponse, toolCallResponse } from '../../../core/agent-loop/tests/mock-adapter.ts' import { startInProcessRun } from '../src/index.ts' +declare module '@deepseek-ai/dsh-llm' { + interface MessageSourceMap { + 'late-metadata': { kind: 'late-metadata' } & ContextFormed + } +} + type Script = ConstructorParameters[0] async function mountInvariants(ctx: Context): Promise { @@ -155,7 +162,7 @@ describe('startInProcessRun', () => { injected = true session.append('user/message', createUserMessage({ content: [{ type: 'text', text: 'late metadata' }], - source: { kind: 'plugin', plugin: 'late-metadata' }, + source: { kind: 'late-metadata' }, }), { surfaceOp: 'append' }) }) diff --git a/packages/subagent/subagent/tests/continuation-inheritance.spec.ts b/packages/subagent/subagent/tests/continuation-inheritance.spec.ts index b4458c3d2e..fcb98097c0 100644 --- a/packages/subagent/subagent/tests/continuation-inheritance.spec.ts +++ b/packages/subagent/subagent/tests/continuation-inheritance.spec.ts @@ -184,8 +184,7 @@ describe('continuable policy inheritance', () => { expect(ctx.approval.overrideOf(parent.session)).toBeUndefined() const runtimeContext = loaded.events.find( (event): event is SessionEvent<'user/message'> => event.type === 'user/message' - && event.data.source.kind === 'plugin' - && event.data.source.plugin === '@deepseek-ai/dsh-system-prompt', + && event.data.source.kind === 'runtime-context', ) const contextText = runtimeContext?.data.content .flatMap(block => block.type === 'text' ? [block.text] : []) diff --git a/packages/subagent/subagent/tests/continuation.spec.ts b/packages/subagent/subagent/tests/continuation.spec.ts index 7f37523cd7..2f8fe9f57e 100644 --- a/packages/subagent/subagent/tests/continuation.spec.ts +++ b/packages/subagent/subagent/tests/continuation.spec.ts @@ -144,7 +144,7 @@ function hasAssistantText(events: readonly SessionEvent[], text: string): boolea /** Caller-supplied user message texts in log order (runtime-context snapshots excluded). */ function userTexts(events: readonly SessionEvent[]): string[] { - return events.flatMap(event => event.type === 'user/message' && event.data.source.kind !== 'plugin' + return events.flatMap(event => event.type === 'user/message' && event.data.source.kind !== 'runtime-context' ? event.data.content.flatMap(block => block.type === 'text' && !block.text.startsWith('Your parent agent id is ') ? [block.text] @@ -2421,7 +2421,7 @@ describe('continuable review regressions', () => { }) it.each([ - { label: 'plugin', source: { kind: 'plugin' as const, plugin: 'tool-jobs' } }, + { label: 'plugin', source: { kind: 'tool-jobs' as const } }, { label: 'non-plugin', source: { kind: 'team-message', teamId: 't-1' } as never }, ])('keeps an idle child resident while its Inbox holds $label injected context', async ({ source }) => { const release = Promise.withResolvers() @@ -2455,7 +2455,7 @@ describe('continuable review regressions', () => { // a driver, so residency must survive until that turn claims the message. const steered = createUserMessage({ content: message('Cordis Host handler failed'), - source: { kind: 'plugin', plugin: 'cordis-host-runner' }, + source: { kind: 'cordis-host-runner' }, }) child.steer(steered) ctx.subagents.interrupt(started.childId, { kind: 'user', parentSessionId: parent.id }) diff --git a/packages/subagent/tool-subagent-control/tests/tool-subagent-control.spec.ts b/packages/subagent/tool-subagent-control/tests/tool-subagent-control.spec.ts index 6408b9e6f8..13ce0714ca 100644 --- a/packages/subagent/tool-subagent-control/tests/tool-subagent-control.spec.ts +++ b/packages/subagent/tool-subagent-control/tests/tool-subagent-control.spec.ts @@ -283,7 +283,7 @@ describe('dsh-tool-subagent-control', () => { await waitNoActivation(ctx, started.childId) const loaded = await loadStoredSession(ctx.sessionPersistence, started.childId) - const prompts = loaded.events.flatMap(event => event.type === 'user/message' && event.data.source.kind !== 'plugin' + const prompts = loaded.events.flatMap(event => event.type === 'user/message' && event.data.source.kind !== 'runtime-context' ? event.data.content.flatMap(block => block.type === 'text' && !block.text.startsWith('Your parent agent id is ') ? [block.text] @@ -406,7 +406,7 @@ describe('dsh-tool-subagent-control interrupt_agent', () => { expect(waking.isError).toBe(false) await waitNoActivation(ctx, started.childId) const loaded = await loadStoredSession(ctx.sessionPersistence, started.childId) - const prompts = loaded.events.flatMap(event => event.type === 'user/message' && event.data.source.kind !== 'plugin' + const prompts = loaded.events.flatMap(event => event.type === 'user/message' && event.data.source.kind !== 'runtime-context' ? event.data.content.flatMap(block => block.type === 'text' && !block.text.startsWith('Your parent agent id is ') ? [block.text] diff --git a/packages/test-support/llm-replay/tests/llm-replay.spec.ts b/packages/test-support/llm-replay/tests/llm-replay.spec.ts index d92172b459..bb8f62f159 100644 --- a/packages/test-support/llm-replay/tests/llm-replay.spec.ts +++ b/packages/test-support/llm-replay/tests/llm-replay.spec.ts @@ -433,6 +433,13 @@ describe('parseSessionLog', () => { }, surfaceOp: 'append', } + const migratedSystemHead = { + ...emptySystemHead, + data: { + ...emptySystemHead.data, + message: { ...emptySystemHead.data.message, source: { kind: 'system-prompt' } }, + }, + } it('reports invalid JSON at its physical source line', () => { const header = JSON.stringify({ type: 'session', version: 0, id: 's1', createdAt: 0 }) @@ -535,7 +542,7 @@ describe('parseSessionLog', () => { type: 'text-chunks', seq0: 2, time0: 0, data: { turn: 1, step: 1, index: 0, dt: [0, 0], texts: ['a', 'b', 'c'] }, }) - expect(parseSessionLog(`${header}\n${turn}\n${step}\n${row}\n`).slice(2)).toEqual([emptySystemHead, { + expect(parseSessionLog(`${header}\n${turn}\n${step}\n${row}\n`).slice(2)).toEqual([migratedSystemHead, { type: 'assistant/attempt', seq: 3, time: 0, @@ -558,7 +565,7 @@ describe('parseSessionLog', () => { expect(parseSessionLog(`${header}\n${ordinary}\n${step}\n${packed}\n`)).toEqual([ { type: 'turn/start', seq: 0, time: 0, data: { turn: 1 } }, { type: 'step/start', seq: 1, time: 0, data: { turn: 1, step: 1 } }, - emptySystemHead, + migratedSystemHead, { type: 'assistant/attempt', seq: 3, @@ -587,13 +594,13 @@ describe('parseSessionLog', () => { ].join('\n') expect(parseSessionLog(source).slice(2)).toEqual([ - emptySystemHead, + migratedSystemHead, { - ...emptySystemHead, + ...migratedSystemHead, seq: 3, data: { - ...emptySystemHead.data, - message: { ...emptySystemHead.data.message, content: [{ type: 'text', text: '{{system}}' }] }, + ...migratedSystemHead.data, + message: { ...migratedSystemHead.data.message, content: [{ type: 'text', text: '{{system}}' }] }, }, surfaceOp: { op: 'replace', startSeq: 2, endSeq: 2 }, sourceEventSeqs: [2], @@ -713,7 +720,7 @@ describe('parseSessionLog', () => { }), ].join('\n') - expect(parseSessionLog(source).slice(2)).toEqual([emptySystemHead, { + expect(parseSessionLog(source).slice(2)).toEqual([migratedSystemHead, { type: 'assistant/attempt', seq: 3, time: 0, diff --git a/packages/test-support/session-snapshot/tests/normalize.spec.ts b/packages/test-support/session-snapshot/tests/normalize.spec.ts index 13dd684ea3..c752cd9df5 100644 --- a/packages/test-support/session-snapshot/tests/normalize.spec.ts +++ b/packages/test-support/session-snapshot/tests/normalize.spec.ts @@ -708,7 +708,7 @@ describe('normalizeSessionSnapshot', () => { message: { id: 'v2-to-v3-system-590b72aa4994fd6d3c6e61bb4bf5bf2f80bae0bc7564d388378ba4f51b816fd6', role: 'system', - source: { kind: 'plugin', plugin: '@deepseek-ai/dsh-system-prompt' }, + source: { kind: 'system-prompt' }, content: [], }, }, diff --git a/scripts/fixtures/python-snapshot-image-offload.mjs b/scripts/fixtures/python-snapshot-image-offload.mjs index a4b767ccdf..778e596ab9 100644 --- a/scripts/fixtures/python-snapshot-image-offload.mjs +++ b/scripts/fixtures/python-snapshot-image-offload.mjs @@ -24,7 +24,7 @@ export function apply(ctx, config) { injected = true return { ...decision, - messages: [...decision.messages, { id: 'python-snapshot-image', role: 'user', content, source: { kind: 'plugin', plugin: name } }], + messages: [...decision.messages, { id: 'python-snapshot-image', role: 'user', content, source: { kind: name } }], } }) ctx.on('llm/stream', async function* (options, next) { diff --git a/scripts/request-input-types.spec.ts b/scripts/request-input-types.spec.ts new file mode 100644 index 0000000000..1af94db212 --- /dev/null +++ b/scripts/request-input-types.spec.ts @@ -0,0 +1,110 @@ +/** Compile request-only inputs against the actual LLM and durable write interfaces. */ +import { resolve } from 'node:path' +import ts from 'typescript' +import { expect, it } from 'vitest' + +const root = resolve(import.meta.dirname, '..') +const probePath = resolve(import.meta.dirname, '__request_input_probe.ts') + +const probe = ` +import type { Agent } from '@deepseek-ai/dsh-agent' +import type { Session } from '@deepseek-ai/dsh-session' +import type { SessionTitleLlmRequestEventData } from '@deepseek-ai/dsh-session-title-llm' +import { createUserMessage, projectFilesToText, projectImagesForTextModel, projectOffloadedImages } from '@deepseek-ai/dsh-llm' +import type { GenerateOptions, Message, MessageId, MessageSource, RequestMessage, RequestUserInput } from '@deepseek-ai/dsh-llm' + +declare const session: Session +declare const agent: Agent +declare const durable: Message +declare const id: MessageId +declare const source: MessageSource +declare const title: SessionTitleLlmRequestEventData +const input: RequestUserInput = { role: 'user', content: [{ type: 'text', text: 'request' }] } +const request: GenerateOptions = { provider: 'test', model: 'test', messages: [durable, input] } +const files: readonly RequestMessage[] = projectFilesToText([input], () => undefined) +const images: readonly RequestMessage[] = projectImagesForTextModel([input]) +const offloaded: readonly RequestMessage[] = projectOffloadedImages([input], () => 'offloaded') +const durableProjection: readonly Message[] = projectImagesForTextModel([durable]) +const existing: RequestMessage = durable +type IsAny = 0 extends (1 & T) ? true : false +const requestIsAny: IsAny = false +const messageIsAny: IsAny = false +const inputIsAny: IsAny = false +// @ts-expect-error -- request inputs cannot provide identity without attribution. +const onlyId: RequestMessage = { role: 'user', content: [], id } +// @ts-expect-error -- request inputs cannot provide attribution without identity. +const onlySource: RequestMessage = { role: 'user', content: [], source } +// @ts-expect-error -- exact optional fields reject explicitly undefined identity. +const undefinedId: RequestUserInput = { ...input, id: undefined } +// @ts-expect-error -- exact optional fields reject explicitly undefined attribution. +const undefinedSource: RequestUserInput = { ...input, source: undefined } +// @ts-expect-error -- only user inputs have a request-only alternative. +const assistant: RequestMessage = { role: 'assistant', content: [] } +// @ts-expect-error -- system prompts retain their durable identity and source. +const system: RequestMessage = { role: 'system', content: [] } +// @ts-expect-error -- tool results retain their durable identity and correlation. +const tool: RequestMessage = { role: 'tool', content: [] } +// @ts-expect-error -- constructing a durable user message requires its source. +createUserMessage(input) +// @ts-expect-error -- Session writes require a durable user message. +session.append('user/message', input, { surfaceOp: 'append' }) +// @ts-expect-error -- followups enter durable Session history. +agent.followup(input) +// @ts-expect-error -- injected context enters durable Session history. +agent.inject(input) +// @ts-expect-error -- title requests record their exact durable messages. +const titleMessages: SessionTitleLlmRequestEventData['messages'] = [input] +// @ts-expect-error -- the title event cannot write a request-only input. +session.append('session/title-llm-request', { ...title, messages: [input] }) +// @ts-expect-error -- image projections retain request-only inputs and cannot manufacture identity. +const projectedDurable: Message = images[0]! +// @ts-expect-error -- adding an id to a request input does not create a durable message. +session.append('user/message', { ...input, id }, { surfaceOp: 'append' }) +// @ts-expect-error -- adding a source to a request input does not create a durable message. +session.append('user/message', { ...input, source }, { surfaceOp: 'append' }) +const narrowed = [{ role: 'user', content: [{ type: 'text', text: 'fixed' }] }] as const +// @ts-expect-error -- projections may replace content and cannot preserve narrower content types. +const narrowedProjection: typeof narrowed = projectImagesForTextModel(narrowed) +void [request, files, images, offloaded, durableProjection, existing] +` + +it('accepts mixed requests and rejects lightweight inputs at durable message writes', { timeout: 60_000 }, () => { + const parsed = ts.getParsedCommandLineOfConfigFile(resolve(root, 'tsconfig.host.json'), {}, { + ...ts.sys, + onUnRecoverableConfigFileDiagnostic(diagnostic) { + throw new Error(ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n')) + }, + }) + expect(parsed).toBeDefined() + const options: ts.CompilerOptions = { + ...parsed!.options, + composite: false, + incremental: false, + noEmit: true, + declaration: false, + declarationMap: false, + noUnusedLocals: false, + noUnusedParameters: false, + } + const base = ts.createCompilerHost(options, true) + const host: ts.CompilerHost = { + ...base, + fileExists: path => resolve(path) === probePath || base.fileExists(path), + readFile: path => resolve(path) === probePath ? probe : base.readFile(path), + getSourceFile(path, languageVersion, onError, shouldCreateNewSourceFile) { + return resolve(path) === probePath + ? ts.createSourceFile(path, probe, languageVersion, true) + : base.getSourceFile(path, languageVersion, onError, shouldCreateNewSourceFile) + }, + } + const program = ts.createProgram([probePath], options, host) + for (const path of ['packages/llm/llm/src/types.ts', 'packages/core/session/src/index.ts', 'packages/session/session-title-llm/src/index.ts']) { + expect(program.getSourceFile(resolve(root, path)), path).toBeDefined() + } + const source = program.getSourceFile(probePath)! + const diagnostics = [...program.getSyntacticDiagnostics(source), ...program.getSemanticDiagnostics(source)] + expect(diagnostics.map((diagnostic) => { + const line = source.getLineAndCharacterOfPosition(diagnostic.start ?? 0).line + 1 + return `${line}: ${ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n')}` + })).toEqual([]) +}) diff --git a/scripts/snapshots/python-sdk-single-exe/advanced/result.json b/scripts/snapshots/python-sdk-single-exe/advanced/result.json index c3629c2115..095fcd2f65 100644 --- a/scripts/snapshots/python-sdk-single-exe/advanced/result.json +++ b/scripts/snapshots/python-sdk-single-exe/advanced/result.json @@ -81,8 +81,7 @@ } ], "source": { - "kind": "plugin", - "plugin": "@deepseek-ai/dsh-system-prompt" + "kind": "system-prompt" }, "id": "{{messageId}}" } @@ -103,8 +102,7 @@ } ], "source": { - "kind": "plugin", - "plugin": "serial-created-fixture" + "kind": "serial-created-fixture" } }, "surfaceOp": "append" @@ -140,8 +138,7 @@ } ], "source": { - "kind": "plugin", - "plugin": "@deepseek-ai/dsh-system-prompt", + "kind": "runtime-context", "form": "snapshot", "sections": [ { @@ -179,8 +176,7 @@ } ], "source": { - "kind": "plugin", - "plugin": "python-snapshot-image-offload" + "kind": "python-snapshot-image-offload" } }, "surfaceOp": "append" @@ -1760,8 +1756,7 @@ } ], "source": { - "kind": "plugin", - "plugin": "@deepseek-ai/dsh-system-prompt" + "kind": "system-prompt" }, "id": "{{messageId}}" } @@ -1788,8 +1783,7 @@ } ], "source": { - "kind": "plugin", - "plugin": "serial-created-fixture" + "kind": "serial-created-fixture" } }, "surfaceOp": "append" @@ -1837,8 +1831,7 @@ } ], "source": { - "kind": "plugin", - "plugin": "@deepseek-ai/dsh-system-prompt", + "kind": "runtime-context", "form": "snapshot", "sections": [ { @@ -1882,8 +1875,7 @@ } ], "source": { - "kind": "plugin", - "plugin": "python-snapshot-image-offload" + "kind": "python-snapshot-image-offload" } }, "surfaceOp": "append" @@ -3037,8 +3029,7 @@ } ], "source": { - "kind": "plugin", - "plugin": "serial-created-fixture" + "kind": "serial-created-fixture" } } ] @@ -3201,8 +3192,7 @@ } ], "source": { - "kind": "plugin", - "plugin": "@deepseek-ai/dsh-system-prompt" + "kind": "system-prompt" }, "id": "{{messageId}}" } @@ -3229,8 +3219,7 @@ } ], "source": { - "kind": "plugin", - "plugin": "serial-created-fixture" + "kind": "serial-created-fixture" } }, "surfaceOp": "append" @@ -3278,8 +3267,7 @@ } ], "source": { - "kind": "plugin", - "plugin": "@deepseek-ai/dsh-system-prompt", + "kind": "runtime-context", "form": "snapshot", "sections": [ { @@ -3834,8 +3822,7 @@ } ], "source": { - "kind": "plugin", - "plugin": "serial-created-fixture" + "kind": "serial-created-fixture" } } ] @@ -4014,8 +4001,7 @@ } ], "source": { - "kind": "plugin", - "plugin": "@deepseek-ai/dsh-system-prompt" + "kind": "system-prompt" }, "id": "{{messageId}}" } @@ -4042,8 +4028,7 @@ } ], "source": { - "kind": "plugin", - "plugin": "serial-created-fixture" + "kind": "serial-created-fixture" } }, "surfaceOp": "append" @@ -4091,8 +4076,7 @@ } ], "source": { - "kind": "plugin", - "plugin": "@deepseek-ai/dsh-system-prompt", + "kind": "runtime-context", "form": "snapshot", "sections": [ { diff --git a/scripts/snapshots/python-sdk-single-exe/advanced/session.1.v4.jsonl b/scripts/snapshots/python-sdk-single-exe/advanced/session.1.v4.jsonl index 291a8f2695..0002b43606 100644 --- a/scripts/snapshots/python-sdk-single-exe/advanced/session.1.v4.jsonl +++ b/scripts/snapshots/python-sdk-single-exe/advanced/session.1.v4.jsonl @@ -2,17 +2,17 @@ {"type":"sandbox/mode","data":{"mode":"danger-full-access","source":"delegation"}} {"type":"approval/policy","data":{"policy":"never","source":"delegation"}} {"type":"permission/preset","data":{"preset":"danger-full-access"}} -{"type":"agent/inbox/spliced","data":{"target":"next-step","start":0,"inserted":[{"id":"{{messageId}}","role":"user","content":[{"type":"text","text":"Serial agent creation completed."}],"source":{"kind":"plugin","plugin":"serial-created-fixture"}}]}} +{"type":"agent/inbox/spliced","data":{"target":"next-step","start":0,"inserted":[{"id":"{{messageId}}","role":"user","content":[{"type":"text","text":"Serial agent creation completed."}],"source":{"kind":"serial-created-fixture"}}]}} {"type":"agent/inbox/spliced","data":{"target":"next-turn","start":0,"inserted":[{"content":[{"type":"text","text":"Reply with exactly DIRECT_CHILD_OK and nothing else."}],"source":{"kind":"user"},"role":"user","id":"{{messageId}}"}]}} {"type":"turn/start","data":{"turn":1}} {"type":"agent/inbox/spliced","data":{"target":"next-step","start":0,"removedCount":1,"inserted":[]}} {"type":"agent/inbox/spliced","data":{"target":"next-turn","start":0,"removedCount":1,"inserted":[]}} {"type":"subagent/descriptor","data":{"version":3,"mode":"one-shot","provider":"spawn","label":"Check direct child"}} {"type":"step/start","data":{"turn":1,"step":1}} -{"type":"system/message","data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"plugin","plugin":"@deepseek-ai/dsh-system-prompt"},"id":"{{messageId}}"}},"surfaceOp":"append"} -{"type":"user/message","data":{"id":"{{messageId}}","role":"user","content":[{"type":"text","text":"Serial agent creation completed."}],"source":{"kind":"plugin","plugin":"serial-created-fixture"}},"surfaceOp":"append"} +{"type":"system/message","data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"system-prompt"},"id":"{{messageId}}"}},"surfaceOp":"append"} +{"type":"user/message","data":{"id":"{{messageId}}","role":"user","content":[{"type":"text","text":"Serial agent creation completed."}],"source":{"kind":"serial-created-fixture"}},"surfaceOp":"append"} {"type":"user/message","data":{"content":[{"type":"text","text":"Reply with exactly DIRECT_CHILD_OK and nothing else."}],"source":{"kind":"user"},"role":"user","id":"{{messageId}}"},"surfaceOp":"append"} -{"type":"user/message","data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`).\n\nYou are a delegated subagent: your permission scope was fixed when you were started and cannot be widened from inside this session — operations that require approval are rejected automatically. When the task needs access beyond that scope, do not retry the denied operation; state the limitation in your reply so the delegating agent can handle it."}],"source":{"kind":"plugin","plugin":"@deepseek-ai/dsh-system-prompt","form":"snapshot","sections":[{"name":"sandbox:policy","text":"Current DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations."},{"name":"approval:policy","text":"Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."},{"name":"subagent:delegation","text":"You are a delegated subagent: your permission scope was fixed when you were started and cannot be widened from inside this session — operations that require approval are rejected automatically. When the task needs access beyond that scope, do not retry the denied operation; state the limitation in your reply so the delegating agent can handle it."}]},"role":"user","id":"{{messageId}}"},"surfaceOp":"append"} +{"type":"user/message","data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`).\n\nYou are a delegated subagent: your permission scope was fixed when you were started and cannot be widened from inside this session — operations that require approval are rejected automatically. When the task needs access beyond that scope, do not retry the denied operation; state the limitation in your reply so the delegating agent can handle it."}],"source":{"kind":"runtime-context","form":"snapshot","sections":[{"name":"sandbox:policy","text":"Current DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations."},{"name":"approval:policy","text":"Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."},{"name":"subagent:delegation","text":"You are a delegated subagent: your permission scope was fixed when you were started and cannot be widened from inside this session — operations that require approval are rejected automatically. When the task needs access beyond that scope, do not retry the denied operation; state the limitation in your reply so the delegating agent can handle it."}]},"role":"user","id":"{{messageId}}"},"surfaceOp":"append"} {"type":"request/header","data":{"header":{"config":{"provider":"deepseek-official","model":"smoke-model","reasoningEffort":"high","maxTokens":256000},"adapterDefaults":{"maxTokens":true},"tools":["cordis_inspect_list","cordis_inspect_query","job_kill","job_list","job_output","run_code","snapshot_double","subagent","workflow"]},"reason":"initial"}} {"type":"request/context","data":{"provider":"deepseek-official","model":"smoke-model","contextWindow":1000000}} {"type":"session/title","data":{"title":"Reply with exactly DIRECT_CHILD_OK and","messageSeqs":[12],"source":{"kind":"fallback"}}} diff --git a/scripts/snapshots/python-sdk-single-exe/advanced/session.2.v4.jsonl b/scripts/snapshots/python-sdk-single-exe/advanced/session.2.v4.jsonl index c36218feac..05338dd916 100644 --- a/scripts/snapshots/python-sdk-single-exe/advanced/session.2.v4.jsonl +++ b/scripts/snapshots/python-sdk-single-exe/advanced/session.2.v4.jsonl @@ -2,17 +2,17 @@ {"type":"sandbox/mode","data":{"mode":"danger-full-access","source":"delegation"}} {"type":"approval/policy","data":{"policy":"never","source":"delegation"}} {"type":"permission/preset","data":{"preset":"danger-full-access"}} -{"type":"agent/inbox/spliced","data":{"target":"next-step","start":0,"inserted":[{"id":"{{messageId}}","role":"user","content":[{"type":"text","text":"Serial agent creation completed."}],"source":{"kind":"plugin","plugin":"serial-created-fixture"}}]}} +{"type":"agent/inbox/spliced","data":{"target":"next-step","start":0,"inserted":[{"id":"{{messageId}}","role":"user","content":[{"type":"text","text":"Serial agent creation completed."}],"source":{"kind":"serial-created-fixture"}}]}} {"type":"agent/inbox/spliced","data":{"target":"next-turn","start":0,"inserted":[{"content":[{"type":"text","text":"Reply with exactly WORKFLOW_CHILD_OK and nothing else."}],"source":{"kind":"user"},"role":"user","id":"{{messageId}}"}]}} {"type":"turn/start","data":{"turn":1}} {"type":"agent/inbox/spliced","data":{"target":"next-step","start":0,"removedCount":1,"inserted":[]}} {"type":"agent/inbox/spliced","data":{"target":"next-turn","start":0,"removedCount":1,"inserted":[]}} {"type":"subagent/descriptor","data":{"version":3,"mode":"one-shot","provider":"spawn"}} {"type":"step/start","data":{"turn":1,"step":1}} -{"type":"system/message","data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"plugin","plugin":"@deepseek-ai/dsh-system-prompt"},"id":"{{messageId}}"}},"surfaceOp":"append"} -{"type":"user/message","data":{"id":"{{messageId}}","role":"user","content":[{"type":"text","text":"Serial agent creation completed."}],"source":{"kind":"plugin","plugin":"serial-created-fixture"}},"surfaceOp":"append"} +{"type":"system/message","data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"system-prompt"},"id":"{{messageId}}"}},"surfaceOp":"append"} +{"type":"user/message","data":{"id":"{{messageId}}","role":"user","content":[{"type":"text","text":"Serial agent creation completed."}],"source":{"kind":"serial-created-fixture"}},"surfaceOp":"append"} {"type":"user/message","data":{"content":[{"type":"text","text":"Reply with exactly WORKFLOW_CHILD_OK and nothing else."}],"source":{"kind":"user"},"role":"user","id":"{{messageId}}"},"surfaceOp":"append"} -{"type":"user/message","data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`).\n\nYou are a delegated subagent: your permission scope was fixed when you were started and cannot be widened from inside this session — operations that require approval are rejected automatically. When the task needs access beyond that scope, do not retry the denied operation; state the limitation in your reply so the delegating agent can handle it."}],"source":{"kind":"plugin","plugin":"@deepseek-ai/dsh-system-prompt","form":"snapshot","sections":[{"name":"sandbox:policy","text":"Current DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations."},{"name":"approval:policy","text":"Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."},{"name":"subagent:delegation","text":"You are a delegated subagent: your permission scope was fixed when you were started and cannot be widened from inside this session — operations that require approval are rejected automatically. When the task needs access beyond that scope, do not retry the denied operation; state the limitation in your reply so the delegating agent can handle it."}]},"role":"user","id":"{{messageId}}"},"surfaceOp":"append"} +{"type":"user/message","data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`).\n\nYou are a delegated subagent: your permission scope was fixed when you were started and cannot be widened from inside this session — operations that require approval are rejected automatically. When the task needs access beyond that scope, do not retry the denied operation; state the limitation in your reply so the delegating agent can handle it."}],"source":{"kind":"runtime-context","form":"snapshot","sections":[{"name":"sandbox:policy","text":"Current DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations."},{"name":"approval:policy","text":"Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."},{"name":"subagent:delegation","text":"You are a delegated subagent: your permission scope was fixed when you were started and cannot be widened from inside this session — operations that require approval are rejected automatically. When the task needs access beyond that scope, do not retry the denied operation; state the limitation in your reply so the delegating agent can handle it."}]},"role":"user","id":"{{messageId}}"},"surfaceOp":"append"} {"type":"request/header","data":{"header":{"config":{"provider":"deepseek-official","model":"smoke-model","reasoningEffort":"high","maxTokens":256000},"adapterDefaults":{"maxTokens":true},"tools":["cordis_inspect_list","cordis_inspect_query","job_kill","job_list","job_output","run_code","snapshot_double","subagent","workflow"]},"reason":"initial"}} {"type":"request/context","data":{"provider":"deepseek-official","model":"smoke-model","contextWindow":1000000}} {"type":"session/title","data":{"title":"Reply with exactly WORKFLOW_CHILD_OK and","messageSeqs":[12],"source":{"kind":"fallback"}}} diff --git a/scripts/snapshots/python-sdk-single-exe/advanced/session.v4.jsonl b/scripts/snapshots/python-sdk-single-exe/advanced/session.v4.jsonl index a3d4cad70e..55745f88d3 100644 --- a/scripts/snapshots/python-sdk-single-exe/advanced/session.v4.jsonl +++ b/scripts/snapshots/python-sdk-single-exe/advanced/session.v4.jsonl @@ -2,17 +2,17 @@ {"type":"permission/preset","data":{"preset":"danger-full-access"}} {"type":"sandbox/mode","data":{"mode":"danger-full-access"}} {"type":"approval/policy","data":{"policy":"never"}} -{"type":"agent/inbox/spliced","data":{"target":"next-step","start":0,"inserted":[{"id":"{{messageId}}","role":"user","content":[{"type":"text","text":"Serial agent creation completed."}],"source":{"kind":"plugin","plugin":"serial-created-fixture"}}]}} +{"type":"agent/inbox/spliced","data":{"target":"next-step","start":0,"inserted":[{"id":"{{messageId}}","role":"user","content":[{"type":"text","text":"Serial agent creation completed."}],"source":{"kind":"serial-created-fixture"}}]}} {"type":"agent/inbox/spliced","data":{"target":"next-turn","start":0,"inserted":[{"content":[{"type":"text","text":"Run the advanced packaged-runtime snapshot scenario."}],"source":{"kind":"user"},"role":"user","id":"{{messageId}}"}]}} {"type":"turn/start","data":{"turn":1}} {"type":"agent/inbox/spliced","data":{"target":"next-step","start":0,"removedCount":1,"inserted":[]}} {"type":"agent/inbox/spliced","data":{"target":"next-turn","start":0,"removedCount":1,"inserted":[]}} {"type":"step/start","data":{"turn":1,"step":1}} -{"type":"system/message","data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"plugin","plugin":"@deepseek-ai/dsh-system-prompt"},"id":"{{messageId}}"}},"surfaceOp":"append"} -{"type":"user/message","data":{"id":"{{messageId}}","role":"user","content":[{"type":"text","text":"Serial agent creation completed."}],"source":{"kind":"plugin","plugin":"serial-created-fixture"}},"surfaceOp":"append"} +{"type":"system/message","data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"system-prompt"},"id":"{{messageId}}"}},"surfaceOp":"append"} +{"type":"user/message","data":{"id":"{{messageId}}","role":"user","content":[{"type":"text","text":"Serial agent creation completed."}],"source":{"kind":"serial-created-fixture"}},"surfaceOp":"append"} {"type":"user/message","data":{"content":[{"type":"text","text":"Run the advanced packaged-runtime snapshot scenario."}],"source":{"kind":"user"},"role":"user","id":"{{messageId}}"},"surfaceOp":"append"} -{"type":"user/message","data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}],"source":{"kind":"plugin","plugin":"@deepseek-ai/dsh-system-prompt","form":"snapshot","sections":[{"name":"sandbox:policy","text":"Current DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations."},{"name":"approval:policy","text":"Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}]},"role":"user","id":"{{messageId}}"},"surfaceOp":"append"} -{"type":"user/message","data":{"id":"{{messageId}}","role":"user","content":[{"type":"image","attachment":{"attachmentId":"sha256:b1ff9c8ea3a780bad09b346c423d2d0e46815926879b18e841d928376a946640","mediaType":"image/png","width":1,"height":1,"bytes":69}}],"source":{"kind":"plugin","plugin":"python-snapshot-image-offload"}},"surfaceOp":"append"} +{"type":"user/message","data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}],"source":{"kind":"runtime-context","form":"snapshot","sections":[{"name":"sandbox:policy","text":"Current DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations."},{"name":"approval:policy","text":"Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}]},"role":"user","id":"{{messageId}}"},"surfaceOp":"append"} +{"type":"user/message","data":{"id":"{{messageId}}","role":"user","content":[{"type":"image","attachment":{"attachmentId":"sha256:b1ff9c8ea3a780bad09b346c423d2d0e46815926879b18e841d928376a946640","mediaType":"image/png","width":1,"height":1,"bytes":69}}],"source":{"kind":"python-snapshot-image-offload"}},"surfaceOp":"append"} {"type":"request/header","data":{"header":{"config":{"provider":"deepseek-official","model":"smoke-model","maxTokens":256000,"reasoningEffort":"high"},"adapterDefaults":{"reasoningEffort":true,"maxTokens":true},"tools":["cordis_inspect_list","cordis_inspect_query","job_kill","job_list","job_output","run_code","snapshot_double","subagent","workflow"]},"reason":"initial"}} {"type":"request/context","data":{"provider":"deepseek-official","model":"smoke-model","contextWindow":1000000}} {"type":"session/title","data":{"title":"Run the advanced packaged-runtime snapsh","messageSeqs":[11],"source":{"kind":"fallback"}}} diff --git a/scripts/snapshots/python-sdk-single-exe/restart/session.1.v4.jsonl b/scripts/snapshots/python-sdk-single-exe/restart/session.1.v4.jsonl new file mode 100644 index 0000000000..197836e0a1 --- /dev/null +++ b/scripts/snapshots/python-sdk-single-exe/restart/session.1.v4.jsonl @@ -0,0 +1,18 @@ +{"type":"session","version":4,"id":"{{session-1}}","createdAt":0,"cwd":"{{cwd}}","isSeeded":false,"delegationDepth":0} +{"type":"permission/preset","data":{"preset":"danger-full-access"}} +{"type":"sandbox/mode","data":{"mode":"danger-full-access"}} +{"type":"approval/policy","data":{"policy":"never"}} +{"type":"agent/inbox/spliced","data":{"target":"next-turn","start":0,"inserted":[{"content":[{"type":"text","text":"Complete the first isolated Python SDK process turn."}],"source":{"kind":"user"},"role":"user","id":"{{messageId}}"}]}} +{"type":"turn/start","data":{"turn":1}} +{"type":"agent/inbox/spliced","data":{"target":"next-turn","start":0,"removedCount":1,"inserted":[]}} +{"type":"step/start","data":{"turn":1,"step":1}} +{"type":"system/message","data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"system-prompt"},"id":"{{messageId}}"}},"surfaceOp":"append"} +{"type":"user/message","data":{"content":[{"type":"text","text":"Complete the first isolated Python SDK process turn."}],"source":{"kind":"user"},"role":"user","id":"{{messageId}}"},"surfaceOp":"append"} +{"type":"user/message","data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}],"source":{"kind":"runtime-context","form":"snapshot","sections":[{"name":"sandbox:policy","text":"Current DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations."},{"name":"approval:policy","text":"Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}]},"role":"user","id":"{{messageId}}"},"surfaceOp":"append"} +{"type":"request/header","data":{"header":{"config":{"provider":"deepseek-official","model":"smoke-model","maxTokens":256000,"reasoningEffort":"high"},"adapterDefaults":{"reasoningEffort":true,"maxTokens":true},"tools":["cordis_inspect_list","cordis_inspect_query","job_kill","job_list","job_output","run_code","subagent","workflow"]},"reason":"initial"}} +{"type":"request/context","data":{"provider":"deepseek-official","model":"smoke-model","contextWindow":1000000}} +{"type":"session/title","data":{"title":"Complete the first isolated Python","messageSeqs":[8],"source":{"kind":"fallback"}}} +{"type":"session-log-deepseek/delivery-accepted","data":{"sessionId":"{{session-1}}","sessionFormatVersion":4,"throughSeq":12}} +{"type":"assistant/message","data":{"turn":1,"step":1,"message":{"role":"assistant","content":[{"type":"text","text":"PROCESS_ONE_OK"}],"source":{"kind":"model","provider":"deepseek-official","model":"smoke-model","replayState":{"response":{"kind":"deepseek-messages","version":1,"model":"smoke-model"},"blocks":[{"type":"text"}]}},"id":"{{messageId}}"},"usage":{"inputTokens":3,"outputTokens":3,"totalTokens":6},"stream":[{"type":"chunk","time":0,"chunk":{"type":"block-start","index":0,"blockType":"text"}},{"type":"text-chunks","time0":0,"index":0,"dt":[],"texts":["PROCESS_ONE_OK"]},{"type":"chunk","time":0,"chunk":{"type":"block-end","index":0,"block":{"type":"text","text":"PROCESS_ONE_OK"}}},{"type":"chunk","time":0,"chunk":{"type":"usage","usage":{"inputTokens":3,"outputTokens":3,"totalTokens":6}}},{"type":"chunk","time":0,"chunk":{"type":"finish","reason":{"kind":"stop"},"replayState":{"response":{"kind":"deepseek-messages","version":1,"model":"smoke-model"},"blocks":[{"type":"text"}]}}}]},"surfaceOp":"append"} +{"type":"step/end","data":{"turn":1,"step":1}} +{"type":"turn/end","data":{"turn":1,"reason":{"kind":"completed"}}} diff --git a/scripts/snapshots/python-sdk-single-exe/restart/session.2.v4.jsonl b/scripts/snapshots/python-sdk-single-exe/restart/session.2.v4.jsonl new file mode 100644 index 0000000000..94c6f79f50 --- /dev/null +++ b/scripts/snapshots/python-sdk-single-exe/restart/session.2.v4.jsonl @@ -0,0 +1,18 @@ +{"type":"session","version":4,"id":"{{session-2}}","createdAt":0,"cwd":"{{cwd}}","isSeeded":false,"delegationDepth":0} +{"type":"permission/preset","data":{"preset":"danger-full-access"}} +{"type":"sandbox/mode","data":{"mode":"danger-full-access"}} +{"type":"approval/policy","data":{"policy":"never"}} +{"type":"agent/inbox/spliced","data":{"target":"next-turn","start":0,"inserted":[{"content":[{"type":"text","text":"Complete the second isolated Python SDK process turn."}],"source":{"kind":"user"},"role":"user","id":"{{messageId}}"}]}} +{"type":"turn/start","data":{"turn":1}} +{"type":"agent/inbox/spliced","data":{"target":"next-turn","start":0,"removedCount":1,"inserted":[]}} +{"type":"step/start","data":{"turn":1,"step":1}} +{"type":"system/message","data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"system-prompt"},"id":"{{messageId}}"}},"surfaceOp":"append"} +{"type":"user/message","data":{"content":[{"type":"text","text":"Complete the second isolated Python SDK process turn."}],"source":{"kind":"user"},"role":"user","id":"{{messageId}}"},"surfaceOp":"append"} +{"type":"user/message","data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}],"source":{"kind":"runtime-context","form":"snapshot","sections":[{"name":"sandbox:policy","text":"Current DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations."},{"name":"approval:policy","text":"Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}]},"role":"user","id":"{{messageId}}"},"surfaceOp":"append"} +{"type":"request/header","data":{"header":{"config":{"provider":"deepseek-official","model":"smoke-model","maxTokens":256000,"reasoningEffort":"high"},"adapterDefaults":{"reasoningEffort":true,"maxTokens":true},"tools":["cordis_inspect_list","cordis_inspect_query","job_kill","job_list","job_output","run_code","subagent","workflow"]},"reason":"initial"}} +{"type":"request/context","data":{"provider":"deepseek-official","model":"smoke-model","contextWindow":1000000}} +{"type":"session/title","data":{"title":"Complete the second isolated Python","messageSeqs":[8],"source":{"kind":"fallback"}}} +{"type":"session-log-deepseek/delivery-accepted","data":{"sessionId":"{{session-2}}","sessionFormatVersion":4,"throughSeq":12}} +{"type":"assistant/message","data":{"turn":1,"step":1,"message":{"role":"assistant","content":[{"type":"text","text":"PROCESS_TWO_OK"}],"source":{"kind":"model","provider":"deepseek-official","model":"smoke-model","replayState":{"response":{"kind":"deepseek-messages","version":1,"model":"smoke-model"},"blocks":[{"type":"text"}]}},"id":"{{messageId}}"},"usage":{"inputTokens":3,"outputTokens":3,"totalTokens":6},"stream":[{"type":"chunk","time":0,"chunk":{"type":"block-start","index":0,"blockType":"text"}},{"type":"text-chunks","time0":0,"index":0,"dt":[],"texts":["PROCESS_TWO_OK"]},{"type":"chunk","time":0,"chunk":{"type":"block-end","index":0,"block":{"type":"text","text":"PROCESS_TWO_OK"}}},{"type":"chunk","time":0,"chunk":{"type":"usage","usage":{"inputTokens":3,"outputTokens":3,"totalTokens":6}}},{"type":"chunk","time":0,"chunk":{"type":"finish","reason":{"kind":"stop"},"replayState":{"response":{"kind":"deepseek-messages","version":1,"model":"smoke-model"},"blocks":[{"type":"text"}]}}}]},"surfaceOp":"append"} +{"type":"step/end","data":{"turn":1,"step":1}} +{"type":"turn/end","data":{"turn":1,"reason":{"kind":"completed"}}} diff --git a/scripts/type-equiv.manifest.json b/scripts/type-equiv.manifest.json index d0bb2b04cc..5e4807e188 100644 --- a/scripts/type-equiv.manifest.json +++ b/scripts/type-equiv.manifest.json @@ -101,6 +101,16 @@ "symbol": "LlmResolvedModelInfo", "source": "packages/llm/llm/src/types.ts" }, + { + "doc": "docs/subsystems/llm-streaming.md", + "symbol": "RequestUserInput", + "source": "packages/llm/llm/src/types.ts" + }, + { + "doc": "docs/subsystems/llm-streaming.md", + "symbol": "RequestMessage", + "source": "packages/llm/llm/src/types.ts" + }, { "doc": "docs/subsystems/llm-streaming.md", "symbol": "GenerateOptions", diff --git a/snapshots/sdk/bash-tool/notifications.expected.jsonl b/snapshots/sdk/bash-tool/notifications.expected.jsonl index 3ee7dd795a..3f16b144cb 100644 --- a/snapshots/sdk/bash-tool/notifications.expected.jsonl +++ b/snapshots/sdk/bash-tool/notifications.expected.jsonl @@ -3,9 +3,9 @@ {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"turn/start","seq":4,"time":0,"data":{"turn":1}}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"agent/inbox/spliced","seq":5,"time":0,"data":{"target":"next-turn","start":0,"removedCount":1,"inserted":[]}}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"step/start","seq":6,"time":0,"data":{"turn":1,"step":1}}}} -{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"system/message","seq":7,"time":0,"data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"plugin","plugin":"@deepseek-ai/dsh-system-prompt"},"id":"{{sessionId}}"}},"surfaceOp":"append"}}} +{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"system/message","seq":7,"time":0,"data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"system-prompt"},"id":"{{sessionId}}"}},"surfaceOp":"append"}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"user/message","seq":8,"time":0,"data":{"content":[{"type":"text","text":"Run this exact command with your bash tool, then reply with its stdout only: echo dsh-sdk-proof-7391"}],"source":{"kind":"user"},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}}} -{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"user/message","seq":9,"time":0,"data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent DSH file policy: workspace-write. Any available operation enforced by the DSH file sandbox may modify files under the session workspace: \"{{cwd}}\". Some platform temporary areas may also be writable.\n\nApproval policy: ask. Operations that require approval may ask through the configured answerers; without an available answerer, the request fails closed."}],"source":{"kind":"plugin","plugin":"@deepseek-ai/dsh-system-prompt","form":"snapshot","sections":[{"name":"sandbox:policy","text":"Current DSH file policy: workspace-write. Any available operation enforced by the DSH file sandbox may modify files under the session workspace: \"{{cwd}}\". Some platform temporary areas may also be writable."},{"name":"approval:policy","text":"Approval policy: ask. Operations that require approval may ask through the configured answerers; without an available answerer, the request fails closed."}]},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}}} +{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"user/message","seq":9,"time":0,"data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent DSH file policy: workspace-write. Any available operation enforced by the DSH file sandbox may modify files under the session workspace: \"{{cwd}}\". Some platform temporary areas may also be writable.\n\nApproval policy: ask. Operations that require approval may ask through the configured answerers; without an available answerer, the request fails closed."}],"source":{"kind":"runtime-context","form":"snapshot","sections":[{"name":"sandbox:policy","text":"Current DSH file policy: workspace-write. Any available operation enforced by the DSH file sandbox may modify files under the session workspace: \"{{cwd}}\". Some platform temporary areas may also be writable."},{"name":"approval:policy","text":"Approval policy: ask. Operations that require approval may ask through the configured answerers; without an available answerer, the request fails closed."}]},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"request/header","seq":10,"time":0,"data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash"},"tools":"{{tools}}"},"reason":"initial"}}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"request/context","seq":11,"time":0,"data":{"provider":"deepseek-official","model":"deepseek-v4-flash"}}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"session/title","seq":12,"time":0,"data":{"title":"Run this exact command with","messageSeqs":[8],"source":{"kind":"fallback"}}}}} diff --git a/snapshots/sdk/persistent-tools/notifications.expected.jsonl b/snapshots/sdk/persistent-tools/notifications.expected.jsonl index 84dde87b80..45dd7fabd0 100644 --- a/snapshots/sdk/persistent-tools/notifications.expected.jsonl +++ b/snapshots/sdk/persistent-tools/notifications.expected.jsonl @@ -3,9 +3,9 @@ {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"turn/start","seq":1,"time":0,"data":{"turn":1}}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"agent/inbox/spliced","seq":2,"time":0,"data":{"target":"next-turn","start":0,"removedCount":1,"inserted":[]}}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"step/start","seq":3,"time":0,"data":{"turn":1,"step":1}}}} -{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"system/message","seq":4,"time":0,"data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"plugin","plugin":"@deepseek-ai/dsh-system-prompt"},"id":"{{sessionId}}"}},"surfaceOp":"append"}}} +{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"system/message","seq":4,"time":0,"data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"system-prompt"},"id":"{{sessionId}}"}},"surfaceOp":"append"}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"user/message","seq":5,"time":0,"data":{"content":[{"type":"text","text":"Prove that bash state persists. After the persistence checks, run exactly `{ sleep 0.1; echo delayed; } | cat` as its own bash call and observe `delayed`. Then create {{cwd}}/note.txt with a tab-indented line, view it, replace that literal tab-indented line, and make the persistent shell exit with code 9."}],"source":{"kind":"user"},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}}} -{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"user/message","seq":6,"time":0,"data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}],"source":{"kind":"plugin","plugin":"@deepseek-ai/dsh-system-prompt","form":"snapshot","sections":[{"name":"sandbox:policy","text":"Current DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations."},{"name":"approval:policy","text":"Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}]},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}}} +{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"user/message","seq":6,"time":0,"data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}],"source":{"kind":"runtime-context","form":"snapshot","sections":[{"name":"sandbox:policy","text":"Current DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations."},{"name":"approval:policy","text":"Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}]},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"request/header","seq":7,"time":0,"data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash"},"tools":"{{tools}}"},"reason":"initial"}}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"request/context","seq":8,"time":0,"data":{"provider":"deepseek-official","model":"deepseek-v4-flash"}}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"session/title","seq":9,"time":0,"data":{"title":"Prove that bash state persists.","messageSeqs":[5],"source":{"kind":"fallback"}}}}} diff --git a/snapshots/sdk/ptc-turn/notifications.expected.jsonl b/snapshots/sdk/ptc-turn/notifications.expected.jsonl index 02655a9e0b..a71d7a1e2d 100644 --- a/snapshots/sdk/ptc-turn/notifications.expected.jsonl +++ b/snapshots/sdk/ptc-turn/notifications.expected.jsonl @@ -3,9 +3,9 @@ {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"turn/start","seq":4,"time":0,"data":{"turn":1}}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"agent/inbox/spliced","seq":5,"time":0,"data":{"target":"next-turn","start":0,"removedCount":1,"inserted":[]}}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"step/start","seq":6,"time":0,"data":{"turn":1,"step":1}}}} -{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"system/message","seq":7,"time":0,"data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"plugin","plugin":"@deepseek-ai/dsh-system-prompt"},"id":"{{sessionId}}"}},"surfaceOp":"append"}}} +{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"system/message","seq":7,"time":0,"data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"system-prompt"},"id":"{{sessionId}}"}},"surfaceOp":"append"}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"user/message","seq":8,"time":0,"data":{"content":[{"type":"text","text":"Using ONE run_code program: call the bash tool twice — exactly `echo CODE_ONE` then exactly `echo CODE_TWO`. Inside that same program, console.log exactly `captured output`, then return the two outputs joined with a plus sign. Reply with that joined string only and stop."}],"source":{"kind":"user"},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}}} -{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"user/message","seq":9,"time":0,"data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}],"source":{"kind":"plugin","plugin":"@deepseek-ai/dsh-system-prompt","form":"snapshot","sections":[{"name":"sandbox:policy","text":"Current DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations."},{"name":"approval:policy","text":"Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}]},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}}} +{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"user/message","seq":9,"time":0,"data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}],"source":{"kind":"runtime-context","form":"snapshot","sections":[{"name":"sandbox:policy","text":"Current DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations."},{"name":"approval:policy","text":"Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}]},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"request/header","seq":10,"time":0,"data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash"},"tools":"{{tools}}"},"reason":"initial"}}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"request/context","seq":11,"time":0,"data":{"provider":"deepseek-official","model":"deepseek-v4-flash"}}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"session/title","seq":12,"time":0,"data":{"title":"Using ONE run_code program: call","messageSeqs":[8],"source":{"kind":"fallback"}}}}} diff --git a/snapshots/sdk/sdk.snapshot.ts b/snapshots/sdk/sdk.snapshot.ts index 952619af21..5b2584a6f4 100644 --- a/snapshots/sdk/sdk.snapshot.ts +++ b/snapshots/sdk/sdk.snapshot.ts @@ -312,8 +312,7 @@ function assembledRuntimeContexts(log: PersistedLog): string[] { data?: { source?: { kind?: string; plugin?: string }; content?: Array<{ type?: string; text?: unknown }> } } if (event.type !== 'user/message' - || event.data?.source?.kind !== 'plugin' - || event.data.source.plugin !== '@deepseek-ai/dsh-system-prompt') return [] + || event.data?.source?.kind !== 'runtime-context') return [] return event.data.content?.flatMap(block => block.type === 'text' && typeof block.text === 'string' ? [block.text] : []) ?? [] }) } diff --git a/snapshots/sdk/subagent-dsh-sdk-diagnostic/notifications.expected.jsonl b/snapshots/sdk/subagent-dsh-sdk-diagnostic/notifications.expected.jsonl index 1d0739374b..a2da0028df 100644 --- a/snapshots/sdk/subagent-dsh-sdk-diagnostic/notifications.expected.jsonl +++ b/snapshots/sdk/subagent-dsh-sdk-diagnostic/notifications.expected.jsonl @@ -3,9 +3,9 @@ {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"turn/start","seq":4,"time":0,"data":{"turn":1}}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"agent/inbox/spliced","seq":5,"time":0,"data":{"target":"next-turn","start":0,"removedCount":1,"inserted":[]}}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"step/start","seq":6,"time":0,"data":{"turn":1,"step":1}}}} -{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"system/message","seq":7,"time":0,"data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"plugin","plugin":"@deepseek-ai/dsh-system-prompt"},"id":"{{sessionId}}"}},"surfaceOp":"append"}}} +{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"system/message","seq":7,"time":0,"data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"system-prompt"},"id":"{{sessionId}}"}},"surfaceOp":"append"}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"user/message","seq":8,"time":0,"data":{"content":[{"type":"text","text":"Observe the DSH SDK diagnostic twice. First call subagent_dsh_sdk in the foreground. Then call subagent_dsh_sdk_background in the background and collect subagent-1 with job_output using wait true. After both failures, reply with exactly PARENT_OBSERVED_DSH_SDK_DIAGNOSTIC. Do not call any other tools."}],"source":{"kind":"user"},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}}} -{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"user/message","seq":9,"time":0,"data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent DSH file policy: workspace-write. Any available operation enforced by the DSH file sandbox may modify files under the session workspace: \"{{cwd}}\". Some platform temporary areas may also be writable.\n\nApproval policy: ask. Operations that require approval may ask through the configured answerers; without an available answerer, the request fails closed."}],"source":{"kind":"plugin","plugin":"@deepseek-ai/dsh-system-prompt","form":"snapshot","sections":[{"name":"sandbox:policy","text":"Current DSH file policy: workspace-write. Any available operation enforced by the DSH file sandbox may modify files under the session workspace: \"{{cwd}}\". Some platform temporary areas may also be writable."},{"name":"approval:policy","text":"Approval policy: ask. Operations that require approval may ask through the configured answerers; without an available answerer, the request fails closed."}]},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}}} +{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"user/message","seq":9,"time":0,"data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent DSH file policy: workspace-write. Any available operation enforced by the DSH file sandbox may modify files under the session workspace: \"{{cwd}}\". Some platform temporary areas may also be writable.\n\nApproval policy: ask. Operations that require approval may ask through the configured answerers; without an available answerer, the request fails closed."}],"source":{"kind":"runtime-context","form":"snapshot","sections":[{"name":"sandbox:policy","text":"Current DSH file policy: workspace-write. Any available operation enforced by the DSH file sandbox may modify files under the session workspace: \"{{cwd}}\". Some platform temporary areas may also be writable."},{"name":"approval:policy","text":"Approval policy: ask. Operations that require approval may ask through the configured answerers; without an available answerer, the request fails closed."}]},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"request/header","seq":10,"time":0,"data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash"},"tools":"{{tools}}"},"reason":"initial"}}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"request/context","seq":11,"time":0,"data":{"provider":"deepseek-official","model":"deepseek-v4-flash"}}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"session/title","seq":12,"time":0,"data":{"title":"Observe the DSH SDK diagnostic","messageSeqs":[8],"source":{"kind":"fallback"}}}}} diff --git a/snapshots/sdk/subagent-dsh-sdk-dynamic-route/notifications.expected.jsonl b/snapshots/sdk/subagent-dsh-sdk-dynamic-route/notifications.expected.jsonl index 45ac6eed74..67f47b75bd 100644 --- a/snapshots/sdk/subagent-dsh-sdk-dynamic-route/notifications.expected.jsonl +++ b/snapshots/sdk/subagent-dsh-sdk-dynamic-route/notifications.expected.jsonl @@ -3,9 +3,9 @@ {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"turn/start","seq":5,"time":0,"data":{"turn":1}}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"agent/inbox/spliced","seq":6,"time":0,"data":{"target":"next-turn","start":0,"removedCount":1,"inserted":[]}}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"step/start","seq":7,"time":0,"data":{"turn":1,"step":1}}}} -{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"system/message","seq":8,"time":0,"data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"plugin","plugin":"@deepseek-ai/dsh-system-prompt"},"id":"{{sessionId}}"}},"surfaceOp":"append"}}} +{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"system/message","seq":8,"time":0,"data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"system-prompt"},"id":"{{sessionId}}"}},"surfaceOp":"append"}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"user/message","seq":9,"time":0,"data":{"content":[{"type":"text","text":"Delegate once using the requested child route."}],"source":{"kind":"user"},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}}} -{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"user/message","seq":10,"time":0,"data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent DSH file policy: workspace-write. Any available operation enforced by the DSH file sandbox may modify files under the session workspace: \"{{cwd}}\". Some platform temporary areas may also be writable.\n\nApproval policy: ask. Operations that require approval may ask through the configured answerers; without an available answerer, the request fails closed."}],"source":{"kind":"plugin","plugin":"@deepseek-ai/dsh-system-prompt","form":"snapshot","sections":[{"name":"sandbox:policy","text":"Current DSH file policy: workspace-write. Any available operation enforced by the DSH file sandbox may modify files under the session workspace: \"{{cwd}}\". Some platform temporary areas may also be writable."},{"name":"approval:policy","text":"Approval policy: ask. Operations that require approval may ask through the configured answerers; without an available answerer, the request fails closed."}]},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}}} +{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"user/message","seq":10,"time":0,"data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent DSH file policy: workspace-write. Any available operation enforced by the DSH file sandbox may modify files under the session workspace: \"{{cwd}}\". Some platform temporary areas may also be writable.\n\nApproval policy: ask. Operations that require approval may ask through the configured answerers; without an available answerer, the request fails closed."}],"source":{"kind":"runtime-context","form":"snapshot","sections":[{"name":"sandbox:policy","text":"Current DSH file policy: workspace-write. Any available operation enforced by the DSH file sandbox may modify files under the session workspace: \"{{cwd}}\". Some platform temporary areas may also be writable."},{"name":"approval:policy","text":"Approval policy: ask. Operations that require approval may ask through the configured answerers; without an available answerer, the request fails closed."}]},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"request/header","seq":11,"time":0,"data":{"header":{"config":{"provider":"deepseek-official","model":"mock-delegate"},"tools":"{{tools}}"},"reason":"initial"}}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"request/context","seq":12,"time":0,"data":{"provider":"deepseek-official","model":"mock-delegate"}}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"session/title","seq":13,"time":0,"data":{"title":"Delegate once using the requested","messageSeqs":[9],"source":{"kind":"fallback"}}}}} diff --git a/snapshots/sdk/subagent-spawn-in-process/notifications.expected.jsonl b/snapshots/sdk/subagent-spawn-in-process/notifications.expected.jsonl index d9944cb242..009a97f17c 100644 --- a/snapshots/sdk/subagent-spawn-in-process/notifications.expected.jsonl +++ b/snapshots/sdk/subagent-spawn-in-process/notifications.expected.jsonl @@ -3,9 +3,9 @@ {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"turn/start","seq":4,"time":0,"data":{"turn":1}}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"agent/inbox/spliced","seq":5,"time":0,"data":{"target":"next-turn","start":0,"removedCount":1,"inserted":[]}}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"step/start","seq":6,"time":0,"data":{"turn":1,"step":1}}}} -{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"system/message","seq":7,"time":0,"data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"plugin","plugin":"@deepseek-ai/dsh-system-prompt"},"id":"{{sessionId}}"}},"surfaceOp":"append"}}} +{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"system/message","seq":7,"time":0,"data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"system-prompt"},"id":"{{sessionId}}"}},"surfaceOp":"append"}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"user/message","seq":8,"time":0,"data":{"content":[{"type":"text","text":"Use the subagent tool exactly once with description 'echo probe' and prompt: Reply with exactly: child answer 42. Then reply with the subagent's final answer verbatim."}],"source":{"kind":"user"},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}}} -{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"user/message","seq":9,"time":0,"data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent DSH file policy: workspace-write. Any available operation enforced by the DSH file sandbox may modify files under the session workspace: \"{{cwd}}\". Some platform temporary areas may also be writable.\n\nApproval policy: ask. Operations that require approval may ask through the configured answerers; without an available answerer, the request fails closed."}],"source":{"kind":"plugin","plugin":"@deepseek-ai/dsh-system-prompt","form":"snapshot","sections":[{"name":"sandbox:policy","text":"Current DSH file policy: workspace-write. Any available operation enforced by the DSH file sandbox may modify files under the session workspace: \"{{cwd}}\". Some platform temporary areas may also be writable."},{"name":"approval:policy","text":"Approval policy: ask. Operations that require approval may ask through the configured answerers; without an available answerer, the request fails closed."}]},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}}} +{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"user/message","seq":9,"time":0,"data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent DSH file policy: workspace-write. Any available operation enforced by the DSH file sandbox may modify files under the session workspace: \"{{cwd}}\". Some platform temporary areas may also be writable.\n\nApproval policy: ask. Operations that require approval may ask through the configured answerers; without an available answerer, the request fails closed."}],"source":{"kind":"runtime-context","form":"snapshot","sections":[{"name":"sandbox:policy","text":"Current DSH file policy: workspace-write. Any available operation enforced by the DSH file sandbox may modify files under the session workspace: \"{{cwd}}\". Some platform temporary areas may also be writable."},{"name":"approval:policy","text":"Approval policy: ask. Operations that require approval may ask through the configured answerers; without an available answerer, the request fails closed."}]},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"request/header","seq":10,"time":0,"data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash"},"tools":"{{tools}}"},"reason":"initial"}}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"request/context","seq":11,"time":0,"data":{"provider":"deepseek-official","model":"deepseek-v4-flash"}}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"session/title","seq":12,"time":0,"data":{"title":"Use the subagent tool exactly","messageSeqs":[8],"source":{"kind":"fallback"}}}}} @@ -19,9 +19,9 @@ {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"subagent/catalog","seq":15,"time":0,"data":{"version":0,"childId":"{{sessionId}}","childCreatedAt":0,"mode":"one-shot","label":"echo probe"}}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"subagent/descriptor","seq":5,"time":0,"data":{"version":3,"mode":"one-shot","provider":"spawn","label":"echo probe"}}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"step/start","seq":6,"time":0,"data":{"turn":1,"step":1}}}} -{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"system/message","seq":7,"time":0,"data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"plugin","plugin":"@deepseek-ai/dsh-system-prompt"},"id":"{{sessionId}}"}},"surfaceOp":"append"}}} +{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"system/message","seq":7,"time":0,"data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"system-prompt"},"id":"{{sessionId}}"}},"surfaceOp":"append"}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"user/message","seq":8,"time":0,"data":{"content":[{"type":"text","text":"Reply with exactly: child answer 42."}],"source":{"kind":"user"},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}}} -{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"user/message","seq":9,"time":0,"data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent DSH file policy: workspace-write. Any available operation enforced by the DSH file sandbox may modify files under the session workspace: \"{{cwd}}\". Some platform temporary areas may also be writable.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`).\n\nYou are a delegated subagent: your permission scope was fixed when you were started and cannot be widened from inside this session — operations that require approval are rejected automatically. When the task needs access beyond that scope, do not retry the denied operation; state the limitation in your reply so the delegating agent can handle it."}],"source":{"kind":"plugin","plugin":"@deepseek-ai/dsh-system-prompt","form":"snapshot","sections":[{"name":"sandbox:policy","text":"Current DSH file policy: workspace-write. Any available operation enforced by the DSH file sandbox may modify files under the session workspace: \"{{cwd}}\". Some platform temporary areas may also be writable."},{"name":"approval:policy","text":"Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."},{"name":"subagent:delegation","text":"You are a delegated subagent: your permission scope was fixed when you were started and cannot be widened from inside this session — operations that require approval are rejected automatically. When the task needs access beyond that scope, do not retry the denied operation; state the limitation in your reply so the delegating agent can handle it."}]},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}}} +{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"user/message","seq":9,"time":0,"data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent DSH file policy: workspace-write. Any available operation enforced by the DSH file sandbox may modify files under the session workspace: \"{{cwd}}\". Some platform temporary areas may also be writable.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`).\n\nYou are a delegated subagent: your permission scope was fixed when you were started and cannot be widened from inside this session — operations that require approval are rejected automatically. When the task needs access beyond that scope, do not retry the denied operation; state the limitation in your reply so the delegating agent can handle it."}],"source":{"kind":"runtime-context","form":"snapshot","sections":[{"name":"sandbox:policy","text":"Current DSH file policy: workspace-write. Any available operation enforced by the DSH file sandbox may modify files under the session workspace: \"{{cwd}}\". Some platform temporary areas may also be writable."},{"name":"approval:policy","text":"Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."},{"name":"subagent:delegation","text":"You are a delegated subagent: your permission scope was fixed when you were started and cannot be widened from inside this session — operations that require approval are rejected automatically. When the task needs access beyond that scope, do not retry the denied operation; state the limitation in your reply so the delegating agent can handle it."}]},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"request/header","seq":10,"time":0,"data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash"},"tools":"{{tools}}"},"reason":"initial"}}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"request/context","seq":11,"time":0,"data":{"provider":"deepseek-official","model":"deepseek-v4-flash"}}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"session/title","seq":12,"time":0,"data":{"title":"Reply with exactly: child answer","messageSeqs":[8],"source":{"kind":"fallback"}}}}} diff --git a/snapshots/sdk/system-prompt-in-history/notifications.expected.jsonl b/snapshots/sdk/system-prompt-in-history/notifications.expected.jsonl index 1b8458c0b8..c22ffef1ad 100644 --- a/snapshots/sdk/system-prompt-in-history/notifications.expected.jsonl +++ b/snapshots/sdk/system-prompt-in-history/notifications.expected.jsonl @@ -3,9 +3,9 @@ {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"turn/start","seq":4,"time":0,"data":{"turn":1}}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"agent/inbox/spliced","seq":5,"time":0,"data":{"target":"next-turn","start":0,"removedCount":1,"inserted":[]}}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"step/start","seq":6,"time":0,"data":{"turn":1,"step":1}}}} -{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"system/message","seq":7,"time":0,"data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"plugin","plugin":"@deepseek-ai/dsh-system-prompt"},"id":"{{sessionId}}"}},"surfaceOp":"append"}}} +{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"system/message","seq":7,"time":0,"data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"system-prompt"},"id":"{{sessionId}}"}},"surfaceOp":"append"}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"user/message","seq":8,"time":0,"data":{"content":[{"type":"text","text":"Read task.txt with the read tool, then reply DONE."}],"source":{"kind":"user"},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}}} -{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"user/message","seq":9,"time":0,"data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}],"source":{"kind":"plugin","plugin":"@deepseek-ai/dsh-system-prompt","form":"snapshot","sections":[{"name":"sandbox:policy","text":"Current DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations."},{"name":"approval:policy","text":"Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}]},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}}} +{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"user/message","seq":9,"time":0,"data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}],"source":{"kind":"runtime-context","form":"snapshot","sections":[{"name":"sandbox:policy","text":"Current DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations."},{"name":"approval:policy","text":"Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}]},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"request/header","seq":10,"time":0,"data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-flash"},"tools":"{{tools}}"},"reason":"initial"}}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"request/context","seq":11,"time":0,"data":{"provider":"deepseek-official","model":"deepseek-flash","systemPromptUpdate":"in-history"}}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"session/title","seq":12,"time":0,"data":{"title":"Read task.txt with the read","messageSeqs":[8],"source":{"kind":"fallback"}}}}} @@ -14,7 +14,7 @@ {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"tool/result","seq":15,"time":0,"data":{"turn":1,"step":1,"message":{"role":"tool","source":{"kind":"tool","callId":"call_task_read"},"toolCallId":"call_task_read","content":[{"type":"text","text":"{{cwd}}/task.txt\nfile\n\n1: Reply with the single word DONE after reading this file.\n\n(End of file - total 1 lines)\n"}],"isError":false,"id":"{{sessionId}}"},"meta":{"path":"{{cwd}}/task.txt","offset":1,"lines":[{"number":1,"text":"Reply with the single word DONE after reading this file."}],"totalLines":1}},"sourceEventSeqs":[14],"surfaceOp":"append"}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"step/end","seq":16,"time":0,"data":{"turn":1,"step":1}}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"step/start","seq":17,"time":0,"data":{"turn":1,"step":2}}}} -{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"system/message","seq":18,"time":0,"data":{"turn":1,"step":2,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"plugin","plugin":"@deepseek-ai/dsh-system-prompt"},"id":"{{sessionId}}"}},"surfaceOp":"append"}}} +{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"system/message","seq":18,"time":0,"data":{"turn":1,"step":2,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"system-prompt"},"id":"{{sessionId}}"}},"surfaceOp":"append"}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"assistant/message","seq":19,"time":0,"data":{"turn":1,"step":2,"message":{"role":"assistant","content":[{"type":"text","text":"DONE"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-flash"},"id":"{{sessionId}}"},"usage":{"inputTokens":12,"outputTokens":2,"cacheReadTokens":10},"stream":[{"type":"chunk","time":0,"chunk":{"type":"block-start","index":0,"blockType":"text"}},{"type":"text-chunks","time0":0,"index":0,"dt":[],"texts":["DONE"]},{"type":"chunk","time":0,"chunk":{"type":"block-end","index":0,"block":{"type":"text","text":"DONE"}}},{"type":"chunk","time":0,"chunk":{"type":"usage","usage":{"inputTokens":12,"outputTokens":2,"cacheReadTokens":10}}},{"type":"chunk","time":0,"chunk":{"type":"finish","reason":{"kind":"stop"}}}]},"surfaceOp":"append"}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"step/end","seq":20,"time":0,"data":{"turn":1,"step":2}}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"turn/end","seq":21,"time":0,"data":{"turn":1,"reason":{"kind":"completed"}}}}} diff --git a/snapshots/sdk/text-turn/notifications.expected.jsonl b/snapshots/sdk/text-turn/notifications.expected.jsonl index c5167d049e..d1d977a43f 100644 --- a/snapshots/sdk/text-turn/notifications.expected.jsonl +++ b/snapshots/sdk/text-turn/notifications.expected.jsonl @@ -3,9 +3,9 @@ {"method":"session.event","params":{"sessionId":"{{session:1}}","event":{"type":"turn/start","seq":4,"time":0,"data":{"turn":1}}}} {"method":"session.event","params":{"sessionId":"{{session:1}}","event":{"type":"agent/inbox/spliced","seq":5,"time":0,"data":{"target":"next-turn","start":0,"removedCount":1,"inserted":[]}}}} {"method":"session.event","params":{"sessionId":"{{session:1}}","event":{"type":"step/start","seq":6,"time":0,"data":{"turn":1,"step":1}}}} -{"method":"session.event","params":{"sessionId":"{{session:1}}","event":{"type":"system/message","seq":7,"time":0,"data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"plugin","plugin":"@deepseek-ai/dsh-system-prompt"},"id":"{{message:2}}"}},"surfaceOp":"append"}}} +{"method":"session.event","params":{"sessionId":"{{session:1}}","event":{"type":"system/message","seq":7,"time":0,"data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"system-prompt"},"id":"{{message:2}}"}},"surfaceOp":"append"}}} {"method":"session.event","params":{"sessionId":"{{session:1}}","event":{"type":"user/message","seq":8,"time":0,"data":{"content":[{"type":"text","text":"Reply with exactly: SDK snapshot OK"}],"source":{"kind":"user"},"role":"user","id":"{{message:1}}"},"surfaceOp":"append"}}} -{"method":"session.event","params":{"sessionId":"{{session:1}}","event":{"type":"user/message","seq":9,"time":0,"data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent DSH file policy: workspace-write. Any available operation enforced by the DSH file sandbox may modify files under the session workspace: \"{{cwd}}\". Some platform temporary areas may also be writable.\n\nApproval policy: ask. Operations that require approval may ask through the configured answerers; without an available answerer, the request fails closed."}],"source":{"kind":"plugin","plugin":"@deepseek-ai/dsh-system-prompt","form":"snapshot","sections":[{"name":"sandbox:policy","text":"Current DSH file policy: workspace-write. Any available operation enforced by the DSH file sandbox may modify files under the session workspace: \"{{cwd}}\". Some platform temporary areas may also be writable."},{"name":"approval:policy","text":"Approval policy: ask. Operations that require approval may ask through the configured answerers; without an available answerer, the request fails closed."}]},"role":"user","id":"{{message:3}}"},"surfaceOp":"append"}}} +{"method":"session.event","params":{"sessionId":"{{session:1}}","event":{"type":"user/message","seq":9,"time":0,"data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent DSH file policy: workspace-write. Any available operation enforced by the DSH file sandbox may modify files under the session workspace: \"{{cwd}}\". Some platform temporary areas may also be writable.\n\nApproval policy: ask. Operations that require approval may ask through the configured answerers; without an available answerer, the request fails closed."}],"source":{"kind":"runtime-context","form":"snapshot","sections":[{"name":"sandbox:policy","text":"Current DSH file policy: workspace-write. Any available operation enforced by the DSH file sandbox may modify files under the session workspace: \"{{cwd}}\". Some platform temporary areas may also be writable."},{"name":"approval:policy","text":"Approval policy: ask. Operations that require approval may ask through the configured answerers; without an available answerer, the request fails closed."}]},"role":"user","id":"{{message:3}}"},"surfaceOp":"append"}}} {"method":"session.event","params":{"sessionId":"{{session:1}}","event":{"type":"request/header","seq":10,"time":0,"data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash"},"tools":"{{tools}}"},"reason":"initial"}}}} {"method":"session.event","params":{"sessionId":"{{session:1}}","event":{"type":"request/context","seq":11,"time":0,"data":{"provider":"deepseek-official","model":"deepseek-v4-flash"}}}} {"method":"session.event","params":{"sessionId":"{{session:1}}","event":{"type":"session/title","seq":12,"time":0,"data":{"title":"Reply with exactly: SDK snapshot","messageSeqs":[8],"source":{"kind":"fallback"}}}}} diff --git a/snapshots/sdk/tool-error-details/notifications.expected.jsonl b/snapshots/sdk/tool-error-details/notifications.expected.jsonl index 2c7604fab8..d2c2efd431 100644 --- a/snapshots/sdk/tool-error-details/notifications.expected.jsonl +++ b/snapshots/sdk/tool-error-details/notifications.expected.jsonl @@ -3,9 +3,9 @@ {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"turn/start","seq":4,"time":0,"data":{"turn":1}}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"agent/inbox/spliced","seq":5,"time":0,"data":{"target":"next-turn","start":0,"removedCount":1,"inserted":[]}}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"step/start","seq":6,"time":0,"data":{"turn":1,"step":1}}}} -{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"system/message","seq":7,"time":0,"data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"plugin","plugin":"@deepseek-ai/dsh-system-prompt"},"id":"{{sessionId}}"}},"surfaceOp":"append"}}} +{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"system/message","seq":7,"time":0,"data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"system-prompt"},"id":"{{sessionId}}"}},"surfaceOp":"append"}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"user/message","seq":8,"time":0,"data":{"content":[{"type":"text","text":"Exercise a native denial and a caught PTC inner denial, then reply ERROR_DETAILS_OK."}],"source":{"kind":"user"},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}}} -{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"user/message","seq":9,"time":0,"data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}],"source":{"kind":"plugin","plugin":"@deepseek-ai/dsh-system-prompt","form":"snapshot","sections":[{"name":"sandbox:policy","text":"Current DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations."},{"name":"approval:policy","text":"Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}]},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}}} +{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"user/message","seq":9,"time":0,"data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}],"source":{"kind":"runtime-context","form":"snapshot","sections":[{"name":"sandbox:policy","text":"Current DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations."},{"name":"approval:policy","text":"Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}]},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"request/header","seq":10,"time":0,"data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash"},"tools":"{{tools}}"},"reason":"initial"}}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"request/context","seq":11,"time":0,"data":{"provider":"deepseek-official","model":"deepseek-v4-flash"}}}} {"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"session/title","seq":12,"time":0,"data":{"title":"Exercise a native denial and","messageSeqs":[8],"source":{"kind":"fallback"}}}}} diff --git a/snapshots/sdk/tool-error-details/session.v4.jsonl b/snapshots/sdk/tool-error-details/session.v4.jsonl index 6e400afbfc..7c5258f23f 100644 --- a/snapshots/sdk/tool-error-details/session.v4.jsonl +++ b/snapshots/sdk/tool-error-details/session.v4.jsonl @@ -6,9 +6,9 @@ {"type":"turn/start","data":{"turn":1}} {"type":"agent/inbox/spliced","data":{"target":"next-turn","start":0,"removedCount":1,"inserted":[]}} {"type":"step/start","data":{"turn":1,"step":1}} -{"type":"system/message","data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"plugin","plugin":"@deepseek-ai/dsh-system-prompt"},"id":"{{message:2}}"}},"surfaceOp":"append"} +{"type":"system/message","data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"system-prompt"},"id":"{{message:2}}"}},"surfaceOp":"append"} {"type":"user/message","data":{"content":[{"type":"text","text":"Exercise a native denial and a caught PTC inner denial, then reply ERROR_DETAILS_OK."}],"source":{"kind":"user"},"role":"user","id":"{{message:1}}"},"surfaceOp":"append"} -{"type":"user/message","data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}],"source":{"kind":"plugin","plugin":"@deepseek-ai/dsh-system-prompt","form":"snapshot","sections":[{"name":"sandbox:policy","text":"Current DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations."},{"name":"approval:policy","text":"Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}]},"role":"user","id":"{{message:3}}"},"surfaceOp":"append"} +{"type":"user/message","data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}],"source":{"kind":"runtime-context","form":"snapshot","sections":[{"name":"sandbox:policy","text":"Current DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations."},{"name":"approval:policy","text":"Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}]},"role":"user","id":"{{message:3}}"},"surfaceOp":"append"} {"type":"request/header","data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash"},"tools":"{{tools}}"},"reason":"initial"}} {"type":"request/context","data":{"provider":"deepseek-official","model":"deepseek-v4-flash"}} {"type":"session/title","data":{"title":"Exercise a native denial and","messageSeqs":[8],"source":{"kind":"fallback"}}} diff --git a/snapshots/session/cordis-inspect-jsdoc/session.v4.jsonl b/snapshots/session/cordis-inspect-jsdoc/session.v4.jsonl index 03ae3bb966..049676f31a 100644 --- a/snapshots/session/cordis-inspect-jsdoc/session.v4.jsonl +++ b/snapshots/session/cordis-inspect-jsdoc/session.v4.jsonl @@ -6,9 +6,9 @@ {"type":"turn/start","data":{"turn":1}} {"type":"agent/inbox/spliced","data":{"target":"next-turn","start":0,"removedCount":1,"inserted":[]}} {"type":"step/start","data":{"turn":1,"step":1}} -{"type":"system/message","data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"plugin","plugin":"@deepseek-ai/dsh-system-prompt"},"id":"{{message:2}}"}},"surfaceOp":"append"} +{"type":"system/message","data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"system-prompt"},"id":"{{message:2}}"}},"surfaceOp":"append"} {"type":"user/message","data":{"content":[{"type":"text","text":"Inspect the exact tools service API, tools/pre-execute event, and subprocess service API with cordis_inspect_query, then reply with exactly CORDIS_INSPECT_JSDOC_OK."}],"source":{"kind":"user"},"role":"user","id":"{{message:1}}"},"surfaceOp":"append"} -{"type":"user/message","data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}],"source":{"kind":"plugin","plugin":"@deepseek-ai/dsh-system-prompt","form":"snapshot","sections":[{"name":"sandbox:policy","text":"Current DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations."},{"name":"approval:policy","text":"Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}]},"role":"user","id":"{{message:3}}"},"surfaceOp":"append"} +{"type":"user/message","data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}],"source":{"kind":"runtime-context","form":"snapshot","sections":[{"name":"sandbox:policy","text":"Current DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations."},{"name":"approval:policy","text":"Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}]},"role":"user","id":"{{message:3}}"},"surfaceOp":"append"} {"type":"request/header","data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash"},"tools":"{{tools}}"},"reason":"initial"}} {"type":"request/context","data":{"provider":"deepseek-official","model":"deepseek-v4-flash"}} {"type":"session/title","data":{"title":"Inspect the exact tools service","messageSeqs":[8],"source":{"kind":"fallback"}}} diff --git a/snapshots/session/tool-call-turn/session.v4.jsonl b/snapshots/session/tool-call-turn/session.v4.jsonl index d671ed51dc..5b59aca08f 100644 --- a/snapshots/session/tool-call-turn/session.v4.jsonl +++ b/snapshots/session/tool-call-turn/session.v4.jsonl @@ -6,9 +6,9 @@ {"type":"turn/start","data":{"turn":1}} {"type":"agent/inbox/spliced","data":{"target":"next-turn","start":0,"removedCount":1,"inserted":[]}} {"type":"step/start","data":{"turn":1,"step":1}} -{"type":"system/message","data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"plugin","plugin":"@deepseek-ai/dsh-system-prompt"},"id":"{{message:2}}"}},"surfaceOp":"append"} +{"type":"system/message","data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"system-prompt"},"id":"{{message:2}}"}},"surfaceOp":"append"} {"type":"user/message","data":{"content":[{"type":"text","text":"Use the bash tool to run exactly: echo SNAPSHOT_OK. Then reply with the single word DONE and stop."}],"source":{"kind":"user"},"role":"user","id":"{{message:1}}"},"surfaceOp":"append"} -{"type":"user/message","data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}],"source":{"kind":"plugin","plugin":"@deepseek-ai/dsh-system-prompt","form":"snapshot","sections":[{"name":"sandbox:policy","text":"Current DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations."},{"name":"approval:policy","text":"Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}]},"role":"user","id":"{{message:3}}"},"surfaceOp":"append"} +{"type":"user/message","data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}],"source":{"kind":"runtime-context","form":"snapshot","sections":[{"name":"sandbox:policy","text":"Current DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations."},{"name":"approval:policy","text":"Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}]},"role":"user","id":"{{message:3}}"},"surfaceOp":"append"} {"type":"request/header","data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash"},"tools":"{{tools}}"},"reason":"initial"}} {"type":"request/context","data":{"provider":"deepseek-official","model":"deepseek-v4-flash"}} {"type":"session/title","data":{"title":"Use the bash tool to","messageSeqs":[8],"source":{"kind":"fallback"}}} diff --git a/snapshots/web/bash-abort-row/ui.expected.md b/snapshots/web/bash-abort-row/ui.expected.md index 90fbaa8f11..1a8add8380 100644 --- a/snapshots/web/bash-abort-row/ui.expected.md +++ b/snapshots/web/bash-abort-row/ui.expected.md @@ -9,7 +9,7 @@ - button "System prompt" - text: "Run two shell commands: wait for cancellation, then write skipped.txt. {{clock}}" - button "Copy" -- button "Context injection @deepseek-ai/dsh-system-prompt" +- button "Context injection runtime-context" - 'button "Failed Bash Error: tool call aborted" [expanded]' - text: "IN { \"command\": \"node -e \\\"const fs=require('node:fs'); fs.writeFileSync('started.tmp', 'started'); fs.renameSync('started.tmp', 'started.txt'); setInterval(() => {}, 1000)\\\"\", \"description\": \"Wait until cancellation\" } OUT Error: tool call aborted" - button "Inspect" diff --git a/snapshots/web/changed-files-turn/ui.expected.md b/snapshots/web/changed-files-turn/ui.expected.md index cd3aa40ebf..197e8c92f5 100644 --- a/snapshots/web/changed-files-turn/ui.expected.md +++ b/snapshots/web/changed-files-turn/ui.expected.md @@ -2,7 +2,7 @@ - text: 不用先查看目录,直接做四件事:把 intro.md 里的标题「示例项目」改成「项目说明」,新建 src/util.ts 导出一个两数相加的 add 函数,新建 app.local 写一行 mode=demo,最后用 bash 在 notes.txt 末尾追加一行 done。 {{clock}} - button "复制" - button "7 次工具调用" [expanded] -- button "上下文注入 @deepseek-ai/dsh-system-prompt" +- button "上下文注入 runtime-context" - button "思考 The user wants four things done directly. But I need to read intro.md before editing (fs-observation-policy requires reading existing file first). The user says don't look at the directory first, but reading intro.md is needed for the edit tool. Let me just do it." - button "读取 intro.md": - text: 读取 diff --git a/snapshots/web/feedback-command/ack-expanded.expected.md b/snapshots/web/feedback-command/ack-expanded.expected.md index 193f1e1cff..ba63fa0507 100644 --- a/snapshots/web/feedback-command/ack-expanded.expected.md +++ b/snapshots/web/feedback-command/ack-expanded.expected.md @@ -11,7 +11,7 @@ - text: Reply with the single word LIGHTHOUSE and stop. {{clock}} - button "Copy" - button "Thought for a while" [expanded] -- button "Context injection @deepseek-ai/dsh-system-prompt" +- button "Context injection runtime-context" - button "Think The user wants me to reply with a single word. Let me comply." - paragraph: LIGHTHOUSE - button "Copy" diff --git a/snapshots/web/feedback-release/ack-expanded.expected.md b/snapshots/web/feedback-release/ack-expanded.expected.md index 193f1e1cff..ba63fa0507 100644 --- a/snapshots/web/feedback-release/ack-expanded.expected.md +++ b/snapshots/web/feedback-release/ack-expanded.expected.md @@ -11,7 +11,7 @@ - text: Reply with the single word LIGHTHOUSE and stop. {{clock}} - button "Copy" - button "Thought for a while" [expanded] -- button "Context injection @deepseek-ai/dsh-system-prompt" +- button "Context injection runtime-context" - button "Think The user wants me to reply with a single word. Let me comply." - paragraph: LIGHTHOUSE - button "Copy" diff --git a/snapshots/web/fresh-round-trip/ui-expanded.expected.md b/snapshots/web/fresh-round-trip/ui-expanded.expected.md index aaa7617775..2ec5da70af 100644 --- a/snapshots/web/fresh-round-trip/ui-expanded.expected.md +++ b/snapshots/web/fresh-round-trip/ui-expanded.expected.md @@ -11,7 +11,7 @@ - text: "Use the bash tool to run exactly: echo WEB_E2E_OK. Then reply with the single word DONE and stop. {{clock}}" - button "Copy" - button "1 tool call" [expanded] -- button "Context injection @deepseek-ai/dsh-system-prompt" +- button "Context injection runtime-context" - button "Think The user wants me to run a simple bash command and reply with \"DONE\"." - button "Bash Echo the test string" - button "Think The command executed successfully and output \"WEB_E2E_OK\". I just need to reply with \"DONE\"." diff --git a/snapshots/web/goal-multi-turn-actions/ui-expanded.expected.md b/snapshots/web/goal-multi-turn-actions/ui-expanded.expected.md index 439bfe0fed..855ebe9a7d 100644 --- a/snapshots/web/goal-multi-turn-actions/ui-expanded.expected.md +++ b/snapshots/web/goal-multi-turn-actions/ui-expanded.expected.md @@ -15,7 +15,7 @@ - button "System prompt" - button "6 tool calls" [expanded] - button "Context injection goal" -- button "Context injection @deepseek-ai/dsh-system-prompt" +- button "Context injection runtime-context" - 'button "Think The user''s goal is: \"做两个turn,每个turn输出随机一个包的文件结构。注意你做完一个turn之后,直接输出内容,停止,我们的系统会帮你再开一个turn,你看着做一个类似的\" — which translates to: \"Do two turns, each turn output the file structure of a random package. Note that after you finish one turn, directly output the content and stop; our system will help you open another turn, and you just do something similar.\""' - button "Bash List package directories deterministically" - button "View goal 做两个turn,每个turn输出随机一个包的文件结构。注意你做完一个turn之后,直接输出内容,停止,我们的系统会帮你再开一个turn,你看着做一个类似的" diff --git a/snapshots/web/lifecycle-chrome/reloaded-expanded.expected.md b/snapshots/web/lifecycle-chrome/reloaded-expanded.expected.md index bb2569da3d..cf4926f6df 100644 --- a/snapshots/web/lifecycle-chrome/reloaded-expanded.expected.md +++ b/snapshots/web/lifecycle-chrome/reloaded-expanded.expected.md @@ -11,7 +11,7 @@ - text: Reply with the single word LIGHTHOUSE and stop. {{clock}} - button "Copy" - button "Thought for a while" [expanded] -- button "Context injection @deepseek-ai/dsh-system-prompt" +- button "Context injection runtime-context" - button "Think The user wants me to reply with a single word. Let me comply." - paragraph: LIGHTHOUSE - button "Copy" diff --git a/snapshots/web/live-interactions/cancel-expanded.expected.md b/snapshots/web/live-interactions/cancel-expanded.expected.md index 38df9a295c..fb713503be 100644 --- a/snapshots/web/live-interactions/cancel-expanded.expected.md +++ b/snapshots/web/live-interactions/cancel-expanded.expected.md @@ -11,7 +11,7 @@ - text: Reply with a one-sentence description of event sourcing, then stop. {{clock}} - button "Copy" - button "Thought for a while" [expanded] -- button "Context injection @deepseek-ai/dsh-system-prompt" +- button "Context injection runtime-context" - paragraph: partial - text: Stopped - button "Copy" diff --git a/snapshots/web/live-interactions/error-auth.expected.md b/snapshots/web/live-interactions/error-auth.expected.md index f9a7c1eb37..3f1ca8f061 100644 --- a/snapshots/web/live-interactions/error-auth.expected.md +++ b/snapshots/web/live-interactions/error-auth.expected.md @@ -10,7 +10,7 @@ - button "System prompt" - text: Reply with a one-sentence description of event sourcing, then stop. {{clock}} - button "Copy" -- button "Context injection @deepseek-ai/dsh-system-prompt" +- button "Context injection runtime-context" - status: - text: This turn failedAPI key is invalid - code: AUTH diff --git a/snapshots/web/live-interactions/loading.expected.md b/snapshots/web/live-interactions/loading.expected.md index 4d5591c3d5..af5082e65b 100644 --- a/snapshots/web/live-interactions/loading.expected.md +++ b/snapshots/web/live-interactions/loading.expected.md @@ -10,7 +10,7 @@ - button "System prompt" - text: Reply with a one-sentence description of event sourcing, then stop. {{clock}} - button "Copy" -- button "Context injection @deepseek-ai/dsh-system-prompt" +- button "Context injection runtime-context" - paragraph: partial - status: Deep diving... - textbox "Message or run a task, / commands, @ files or sessions" diff --git a/snapshots/web/live-interactions/retry-exhausted.expected.md b/snapshots/web/live-interactions/retry-exhausted.expected.md index d4a77f298a..6eed77a7cf 100644 --- a/snapshots/web/live-interactions/retry-exhausted.expected.md +++ b/snapshots/web/live-interactions/retry-exhausted.expected.md @@ -10,7 +10,7 @@ - button "System prompt" - text: Reply with a one-sentence description of event sourcing, then stop. {{clock}} - button "Copy" -- button "Context injection @deepseek-ai/dsh-system-prompt" +- button "Context injection runtime-context" - group: - status: Retried model request (2/2) · {{duration}} - status: diff --git a/snapshots/web/live-interactions/retry-expanded.expected.md b/snapshots/web/live-interactions/retry-expanded.expected.md index 72429a5f1d..1444cca162 100644 --- a/snapshots/web/live-interactions/retry-expanded.expected.md +++ b/snapshots/web/live-interactions/retry-expanded.expected.md @@ -11,7 +11,7 @@ - text: Reply with a one-sentence description of event sourcing, then stop. {{clock}} - button "Copy" - button "Thought for a while" [expanded] -- button "Context injection @deepseek-ai/dsh-system-prompt" +- button "Context injection runtime-context" - group: - status: Retried model request (1/5) · {{duration}} - button "Think The user is asking for a one-sentence description of event sourcing. This is a straightforward knowledge question that doesn't require any skill loading or tool calls." diff --git a/snapshots/web/live-interactions/running-draft.expected.md b/snapshots/web/live-interactions/running-draft.expected.md index 077e94936c..7dcb2dc2f9 100644 --- a/snapshots/web/live-interactions/running-draft.expected.md +++ b/snapshots/web/live-interactions/running-draft.expected.md @@ -10,7 +10,7 @@ - button "System prompt" - text: Reply with a one-sentence description of event sourcing, then stop. {{clock}} - button "Copy" -- button "Context injection @deepseek-ai/dsh-system-prompt" +- button "Context injection runtime-context" - paragraph: partial - status: Deep diving... - textbox "Message or run a task, / commands, @ files or sessions": diff --git a/snapshots/web/plan-review/approved-expanded.expected.md b/snapshots/web/plan-review/approved-expanded.expected.md index 742e32348d..de1a76aed0 100644 --- a/snapshots/web/plan-review/approved-expanded.expected.md +++ b/snapshots/web/plan-review/approved-expanded.expected.md @@ -11,7 +11,7 @@ - text: "Plan a small change: add a --greeting flag to a CLI. Do not read or write any files. Call exit_plan_mode with a short plan of at most five bullet points. Once the plan is approved, reply with the single word DONE and stop. {{clock}}" - button "Copy" - button "1 tool call · 1 message" [expanded] -- button "Context injection @deepseek-ai/dsh-system-prompt" +- button "Context injection runtime-context" - 'button "Think The user wants me to plan a small change to add a `--greeting` flag to a CLI. They explicitly told me not to read or write any files, and to call exit_plan_mode with a short plan. Let me do that directly."' - paragraph: - text: Since the user has explicitly asked me not to read or write any files and to go straight to planning, I'll proceed with diff --git a/snapshots/web/present-svg/ui.expected.md b/snapshots/web/present-svg/ui.expected.md index 3a6f85583c..c867d85c45 100644 --- a/snapshots/web/present-svg/ui.expected.md +++ b/snapshots/web/present-svg/ui.expected.md @@ -2,7 +2,7 @@ - text: 简单画一个 SVG 表示冯诺依曼架构, 保存为 von-neumann.svg {{clock}} - button "复制" - button "2 次工具调用 · 1 条消息" [expanded] -- button "上下文注入 @deepseek-ai/dsh-system-prompt" +- button "上下文注入 runtime-context" - button "思考 The user wants a simple SVG diagram of the von Neumann architecture, saved as von-neumann.svg. Let me create a clean SVG showing CPU (control unit, ALU), memory, input, and output with bidirectional data/control buses." - paragraph: 我来创建一个冯诺依曼架构的 SVG 示意图。 - button "写入 von-neumann.svg +83 -0": diff --git a/snapshots/web/present/ui.expected.md b/snapshots/web/present/ui.expected.md index 20ec6c8afe..452a842352 100644 --- a/snapshots/web/present/ui.expected.md +++ b/snapshots/web/present/ui.expected.md @@ -11,7 +11,7 @@ - text: "Use one run_code program to do the following in order. Call present for missing.txt and catch its error without creating that file. Use bash to run exactly `printf \"DELIVERED_REPORT\\n\" > report.txt; printf \"DELIVERED_NOTE\\n\" > 说明.txt`. Call present for report.txt and 说明.txt. After present succeeds, deliberately throw the string \"AFTER_PRESENT\" (not an Error object) from that same run_code program. Do not retry the program or create any other files. Finish by mentioning `report.txt` and `说明.txt` in inline code, and put PRESENT_DONE in a separate paragraph. {{clock}}" - button "Copy" - button "1 tool call" [expanded] -- button "Context injection @deepseek-ai/dsh-system-prompt" +- button "Context injection runtime-context" - button "Think The user wants one run_code program that:" - text: Failed - 'button "Code Error: code run failed (exception): AFTER_PRESENT"' diff --git a/snapshots/web/ptc-round/ui.expected.md b/snapshots/web/ptc-round/ui.expected.md index 77daf41f67..dbfe01ae06 100644 --- a/snapshots/web/ptc-round/ui.expected.md +++ b/snapshots/web/ptc-round/ui.expected.md @@ -11,7 +11,7 @@ - text: "Using ONE run_code program: run bash `echo CODE_ROUND_OK`, then read the file missing.txt catching its error in the program. Return an object with both outcomes. Then reply DONE and stop. {{clock}}" - button "Copy" - button "1 tool call" [expanded] -- button "Context injection @deepseek-ai/dsh-system-prompt" +- button "Context injection runtime-context" - 'button "Think The user wants me to write a single `run_code` program that:"' - button "Code Run bash echo and catch missing file read" - button "Bash Echo CODE_ROUND_OK" [expanded] diff --git a/snapshots/web/question-composer/answered-expanded.expected.md b/snapshots/web/question-composer/answered-expanded.expected.md index 58b3ed28b3..eeb050167f 100644 --- a/snapshots/web/question-composer/answered-expanded.expected.md +++ b/snapshots/web/question-composer/answered-expanded.expected.md @@ -11,7 +11,7 @@ - text: "Use the ask_user_question tool to ask me exactly one multi-select question with id \"color\", question \"Which color do you prefer?\", header \"Pick one\", and two options: label \"Blue\" with description \"A cool recessive hue that reads as calm and trustworthy in long reading sessions and dense dashboards.\", and label \"Green\" with description \"A restful mid-spectrum hue with the highest perceived brightness, easiest on the eye over long sessions.\" Set multi_select to true. After I answer, reply with the single word DONE and stop. {{clock}}" - button "Copy" - button "1 tool call" [expanded] -- button "Context injection @deepseek-ai/dsh-system-prompt" +- button "Context injection runtime-context" - button "Think The user wants me to use the ask_user_question tool with specific parameters. Let me do exactly that." - button "Ask question 1/1 answered" [expanded] - term: Which color do you prefer? diff --git a/snapshots/web/question-composer/cancelled.expected.md b/snapshots/web/question-composer/cancelled.expected.md index 97591ecba3..532ff0ebf1 100644 --- a/snapshots/web/question-composer/cancelled.expected.md +++ b/snapshots/web/question-composer/cancelled.expected.md @@ -9,7 +9,7 @@ - button "System prompt" - text: "Use the ask_user_question tool to ask me exactly one multi-select question with id \"color\", question \"Which color do you prefer?\", header \"Pick one\", and two options: label \"Blue\" with description \"A cool recessive hue that reads as calm and trustworthy in long reading sessions and dense dashboards.\", and label \"Green\" with description \"A restful mid-spectrum hue with the highest perceived brightness, easiest on the eye over long sessions.\" Set multi_select to true. After I answer, reply with the single word DONE and stop. {{clock}}" - button "Copy" -- button "Context injection @deepseek-ai/dsh-system-prompt" +- button "Context injection runtime-context" - button "Think The user wants me to use the ask_user_question tool with specific parameters. Let me do exactly that." - button "Ask question cancelled" [expanded] - paragraph: This question set was cancelled before answers were submitted. diff --git a/snapshots/web/queue-actions/collapsed.expected.md b/snapshots/web/queue-actions/collapsed.expected.md index e34a92efa9..59a81e6864 100644 --- a/snapshots/web/queue-actions/collapsed.expected.md +++ b/snapshots/web/queue-actions/collapsed.expected.md @@ -10,7 +10,7 @@ - button "System prompt" - text: Reply with a one-sentence description of event sourcing, then stop. {{clock}} - button "Copy" -- button "Context injection @deepseek-ai/dsh-system-prompt" +- button "Context injection runtime-context" - paragraph: partial - status: Deep diving... - button "2 queued messages" diff --git a/snapshots/web/queue-actions/editing.expected.md b/snapshots/web/queue-actions/editing.expected.md index 1d790c53f4..be9dfc391f 100644 --- a/snapshots/web/queue-actions/editing.expected.md +++ b/snapshots/web/queue-actions/editing.expected.md @@ -10,7 +10,7 @@ - button "System prompt" - text: Reply with a one-sentence description of event sourcing, then stop. {{clock}} - button "Copy" -- button "Context injection @deepseek-ai/dsh-system-prompt" +- button "Context injection runtime-context" - paragraph: partial - status: Deep diving... - button "2 queued messages" [disabled] [expanded] diff --git a/snapshots/web/queue-actions/layout.expected.md b/snapshots/web/queue-actions/layout.expected.md index ac54c9cb25..8f72d4167e 100644 --- a/snapshots/web/queue-actions/layout.expected.md +++ b/snapshots/web/queue-actions/layout.expected.md @@ -11,7 +11,7 @@ - 'button "goal Goal created Status: active Objective: Keep the composer context panels aligned Rounds: 0/256 Activation: armed Commands: /goal edit , /goal pause, /goal clear"' - button "System prompt" - button "Context injection goal" -- button "Context injection @deepseek-ai/dsh-system-prompt" +- button "Context injection runtime-context" - paragraph: partial - status: Deep diving... - region "To-dos": diff --git a/snapshots/web/queue-actions/preserved-expanded.expected.md b/snapshots/web/queue-actions/preserved-expanded.expected.md index 4efa97d7c0..68e79378fc 100644 --- a/snapshots/web/queue-actions/preserved-expanded.expected.md +++ b/snapshots/web/queue-actions/preserved-expanded.expected.md @@ -11,7 +11,7 @@ - text: Reply with a one-sentence description of event sourcing, then stop. {{clock}} - button "Copy" - button "Thought for a while" [expanded] -- button "Context injection @deepseek-ai/dsh-system-prompt" +- button "Context injection runtime-context" - paragraph: partial - text: Stopped - button "Copy" diff --git a/snapshots/web/queue-actions/sending.expected.md b/snapshots/web/queue-actions/sending.expected.md index 7d3eb1c9c4..54b3b9d7e3 100644 --- a/snapshots/web/queue-actions/sending.expected.md +++ b/snapshots/web/queue-actions/sending.expected.md @@ -10,7 +10,7 @@ - button "System prompt" - text: Reply with a one-sentence description of event sourcing, then stop. {{clock}} - button "Copy" -- button "Context injection @deepseek-ai/dsh-system-prompt" +- button "Context injection runtime-context" - paragraph: partial - status: Deep diving... - list: diff --git a/snapshots/web/queue-actions/ui.expected.md b/snapshots/web/queue-actions/ui.expected.md index 35cfdc5eb4..460fa0d74e 100644 --- a/snapshots/web/queue-actions/ui.expected.md +++ b/snapshots/web/queue-actions/ui.expected.md @@ -10,7 +10,7 @@ - button "System prompt" - text: Reply with a one-sentence description of event sourcing, then stop. {{clock}} - button "Copy" -- button "Context injection @deepseek-ai/dsh-system-prompt" +- button "Context injection runtime-context" - paragraph: partial - status: Deep diving... - list: diff --git a/snapshots/web/queued-image/queued.expected.md b/snapshots/web/queued-image/queued.expected.md index f74ae43b62..a95034a4c8 100644 --- a/snapshots/web/queued-image/queued.expected.md +++ b/snapshots/web/queued-image/queued.expected.md @@ -10,7 +10,7 @@ - button "System prompt" - text: Reply with a one-sentence description of event sourcing, then stop. {{clock}} - button "Copy" -- button "Context injection @deepseek-ai/dsh-system-prompt" +- button "Context injection runtime-context" - paragraph: partial - status: Deep diving... - list: diff --git a/snapshots/web/skill-tool-row/ui.expected.md b/snapshots/web/skill-tool-row/ui.expected.md index d0d16efd83..7d49827d5a 100644 --- a/snapshots/web/skill-tool-row/ui.expected.md +++ b/snapshots/web/skill-tool-row/ui.expected.md @@ -10,7 +10,7 @@ - text: Load the editing-cordis-compositions skill with the skill tool, then reply DONE. {{date}} {{clock}} - button "Copy" - button "1 tool call" [expanded] -- button "Context injection @deepseek-ai/dsh-system-prompt" +- button "Context injection runtime-context" - button "Context injection skill-catalog" - button "Think Load the requested skill." - button "Skill editing-cordis-compositions" [expanded] diff --git a/snapshots/web/steering/mid-steer.expected.md b/snapshots/web/steering/mid-steer.expected.md index 755176ac89..93fad593d4 100644 --- a/snapshots/web/steering/mid-steer.expected.md +++ b/snapshots/web/steering/mid-steer.expected.md @@ -10,7 +10,7 @@ - button "System prompt" - text: Use the ask_user_question tool to ask me exactly one question with id "checkpoint", question "Ready to continue?", header "Checkpoint", and options labeled "Yes" and "No". After I answer, reply with one short sentence acknowledging my answer and stop. {{clock}} - button "Copy" -- button "Context injection @deepseek-ai/dsh-system-prompt" +- button "Context injection runtime-context" - text: Running - button "Ask question waiting" - status: Deep diving... diff --git a/snapshots/web/steering/settled-expanded.expected.md b/snapshots/web/steering/settled-expanded.expected.md index a1427d9404..6964c343be 100644 --- a/snapshots/web/steering/settled-expanded.expected.md +++ b/snapshots/web/steering/settled-expanded.expected.md @@ -11,7 +11,7 @@ - text: Use the ask_user_question tool to ask me exactly one question with id "checkpoint", question "Ready to continue?", header "Checkpoint", and options labeled "Yes" and "No". After I answer, reply with one short sentence acknowledging my answer and stop. {{clock}} - button "Copy" - button "1 tool call" [expanded] -- button "Context injection @deepseek-ai/dsh-system-prompt" +- button "Context injection runtime-context" - button "Ask question 1/1 answered" - text: "Interjection: include the word BANANA in your final reply. {{clock}}" - button "Copy" diff --git a/snapshots/web/subagent-conversation/ui-expanded.expected.md b/snapshots/web/subagent-conversation/ui-expanded.expected.md index 5e7253e2fe..958a6e5041 100644 --- a/snapshots/web/subagent-conversation/ui-expanded.expected.md +++ b/snapshots/web/subagent-conversation/ui-expanded.expected.md @@ -17,7 +17,7 @@ - text: "Explain event sourcing in one sentence.Your parent agent id is \"session-{{uuid}}\". Before you finish, send your result to that agent with send_message({ agent_id: \"session-{{uuid}}\", message: \"\" }). The parent shares your workspace but does not automatically receive your transcript, tool output, or reasoning. Send earlier messages as well when a finding changes what the parent should do next; sending a message does not end your turn. {{clock}}" - button "Copy" - button "Thought for a while" [expanded] -- button "Context injection @deepseek-ai/dsh-system-prompt" +- button "Context injection runtime-context" - button "Think The user is asking for a one-sentence description of event sourcing. This is a straightforward knowledge question that doesn't require any skill loading or tool calls." - paragraph: Event sourcing is a pattern where all changes to an application's state are stored as an immutable, append-only sequence of events, rather than persisting only the current state, enabling full auditability, temporal queries, and event-driven architectures. - button "Copy" diff --git a/snapshots/web/subagent-interrupt/offline-composer.expected.md b/snapshots/web/subagent-interrupt/offline-composer.expected.md index 55a2af25bc..32ef6d7bd7 100644 --- a/snapshots/web/subagent-interrupt/offline-composer.expected.md +++ b/snapshots/web/subagent-interrupt/offline-composer.expected.md @@ -12,7 +12,7 @@ - button "System prompt" - text: "Explain event sourcing in one sentence.Your parent agent id is \"session-{{uuid}}\". Before you finish, send your result to that agent with send_message({ agent_id: \"session-{{uuid}}\", message: \"\" }). The parent shares your workspace but does not automatically receive your transcript, tool output, or reasoning. Send earlier messages as well when a finding changes what the parent should do next; sending a message does not end your turn. {{clock}}" - button "Copy" -- button "Context injection @deepseek-ai/dsh-system-prompt" +- button "Context injection runtime-context" - paragraph: partial - status: Deep diving... - list: diff --git a/snapshots/web/turn-tail-actions/focused.expected.md b/snapshots/web/turn-tail-actions/focused.expected.md index 860191368f..3e0c193e31 100644 --- a/snapshots/web/turn-tail-actions/focused.expected.md +++ b/snapshots/web/turn-tail-actions/focused.expected.md @@ -11,7 +11,7 @@ - text: Begin your reply with the plain sentence "Reading the workspace now." as text, and in that same message call the bash tool with the command "echo alpha". After the tool result, reply with the single word DONE and stop. {{clock}} - button "Copy" - button "1 tool call · 1 message" [expanded] -- button "Context injection @deepseek-ai/dsh-system-prompt" +- button "Context injection runtime-context" - button "Think The user wants me to begin with \"Reading the workspace now.\" and call bash with \"echo alpha\" in the same message. Then after the tool result, reply with the single word DONE and stop." - paragraph: Reading the workspace now. - button "Bash Print alpha to stdout" diff --git a/snapshots/web/turn-tail-actions/running.expected.md b/snapshots/web/turn-tail-actions/running.expected.md index bb0ce72149..7ec908b972 100644 --- a/snapshots/web/turn-tail-actions/running.expected.md +++ b/snapshots/web/turn-tail-actions/running.expected.md @@ -11,7 +11,7 @@ - text: Begin your reply with the plain sentence "Reading the workspace now." as text, and in that same message call the bash tool with the command "echo alpha". After the tool result, reply with the single word DONE and stop. {{clock}} - button "Copy" - tooltip "Copy" -- button "Context injection @deepseek-ai/dsh-system-prompt" +- button "Context injection runtime-context" - button "Think The user wants me to begin with \"Reading the workspace now.\" and call bash with \"echo alpha\" in the same message. Then after the tool result, reply with the single word DONE and stop." - paragraph: Reading the workspace now. - button "Bash Print alpha to stdout" diff --git a/snapshots/web/web-search-round/ui.expected.md b/snapshots/web/web-search-round/ui.expected.md index 27d0cce32c..bc6f17f5f4 100644 --- a/snapshots/web/web-search-round/ui.expected.md +++ b/snapshots/web/web-search-round/ui.expected.md @@ -11,7 +11,7 @@ - text: Use web_search once with queries ["DeepSeek Harness snapshot search","DeepSeek Harness multi-query search"]. Then reply exactly SEARCH_DONE and stop. {{clock}} - button "Copy" - button "1 tool call" [expanded] -- button "Context injection @deepseek-ai/dsh-system-prompt" +- button "Context injection runtime-context" - button "Search DeepSeek Harness snapshot search, DeepSeek Harness multi-query search" - paragraph: SEARCH_DONE - button "Copy" diff --git a/snapshots/web/workflow-run/ui.expected.md b/snapshots/web/workflow-run/ui.expected.md index 40d39e64cf..da34c06fd8 100644 --- a/snapshots/web/workflow-run/ui.expected.md +++ b/snapshots/web/workflow-run/ui.expected.md @@ -2,7 +2,7 @@ - text: "Use the workflow tool exactly once, with args omitted, meta set to { \"name\": \"snapshot-flow\", \"description\": \"one child for the snapshot\" }, and this EXACT script body (copy it verbatim): phase('Run') const reply = await agent('Reply with exactly the word WF_CHILD_OK and nothing else.') return { reply } After the workflow returns, reply with the single word WORKFLOW_DONE and stop. Do not use any other tool. {{clock}}" - button "Copy" - button "1 tool call" [expanded] -- button "Context injection @deepseek-ai/dsh-system-prompt" +- button "Context injection runtime-context" - button "Think The user wants me to use the workflow tool exactly once with specific parameters. Let me carefully follow the instructions:" - button "Run workflow snapshot-flow" - button "snapshot-flow 1 member Completed"