@cortexkit/opencode-magic-context 0.44.4 → 0.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agents/hidden-agent-registrations.d.ts +3 -2
- package/dist/agents/hidden-agent-registrations.d.ts.map +1 -1
- package/dist/agents/magic-context-prompt.d.ts +1 -0
- package/dist/agents/magic-context-prompt.d.ts.map +1 -1
- package/dist/agents/permissions.d.ts +8 -28
- package/dist/agents/permissions.d.ts.map +1 -1
- package/dist/{announcement-n8hs7kjw.js → announcement-f75t58v9.js} +4 -2
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/project-security.d.ts +48 -0
- package/dist/config/project-security.d.ts.map +1 -1
- package/dist/config/raw-loader.d.ts.map +1 -1
- package/dist/config/schema/magic-context.d.ts +10 -7
- package/dist/config/schema/magic-context.d.ts.map +1 -1
- package/dist/{conflict-warning-hook-hmpzxep6.js → conflict-warning-hook-5yrz2r24.js} +10 -6
- package/dist/{derive-budgets-ncwn1jk9.js → derive-budgets-a63zsm5c.js} +3 -3
- package/dist/embedding-worker.js +49 -0
- package/dist/emscripten-module-0g8f45e6.js +602 -0
- package/dist/emscripten-module-0pekdjxz.js +1532 -0
- package/dist/emscripten-module-e67xwsp3.js +503 -0
- package/dist/emscripten-module-pj1vyb44.js +4559 -0
- package/dist/features/magic-context/compartment-chunk-embedding.d.ts +23 -3
- package/dist/features/magic-context/compartment-chunk-embedding.d.ts.map +1 -1
- package/dist/features/magic-context/compartment-embedding.d.ts.map +1 -1
- package/dist/features/magic-context/compartment-storage.d.ts +14 -3
- package/dist/features/magic-context/compartment-storage.d.ts.map +1 -1
- package/dist/features/magic-context/context-store-uuid.d.ts +7 -0
- package/dist/features/magic-context/context-store-uuid.d.ts.map +1 -0
- package/dist/features/magic-context/dreamer/classify.d.ts +1 -3
- package/dist/features/magic-context/dreamer/classify.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/cron.d.ts +5 -4
- package/dist/features/magic-context/dreamer/cron.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/docs-proposals.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/evaluate-smart-notes.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/expire-memories.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/idle-schedule-prune.d.ts +24 -0
- package/dist/features/magic-context/dreamer/idle-schedule-prune.d.ts.map +1 -0
- package/dist/features/magic-context/dreamer/manual-summary.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/map-memories.d.ts +5 -5
- package/dist/features/magic-context/dreamer/module-apply.d.ts +4 -25
- package/dist/features/magic-context/dreamer/module-apply.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/retrospective-learnings.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/storage-dream-runs.d.ts +5 -1
- package/dist/features/magic-context/dreamer/storage-dream-runs.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/storage-task-schedule.d.ts +12 -5
- package/dist/features/magic-context/dreamer/storage-task-schedule.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/task-executor.d.ts +6 -0
- package/dist/features/magic-context/dreamer/task-executor.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/task-gates.d.ts +34 -0
- package/dist/features/magic-context/dreamer/task-gates.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/task-prompts.d.ts +1 -1
- package/dist/features/magic-context/dreamer/task-prompts.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/task-registry.d.ts +7 -5
- package/dist/features/magic-context/dreamer/task-registry.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/task-scheduler.d.ts +10 -3
- package/dist/features/magic-context/dreamer/task-scheduler.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/token-budget.d.ts +3 -0
- package/dist/features/magic-context/dreamer/token-budget.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/verify.d.ts +2 -2
- package/dist/features/magic-context/dreamer/verify.d.ts.map +1 -1
- package/dist/features/magic-context/git-commits/git-log-reader.d.ts +11 -2
- package/dist/features/magic-context/git-commits/git-log-reader.d.ts.map +1 -1
- package/dist/features/magic-context/git-commits/indexer.d.ts.map +1 -1
- package/dist/features/magic-context/git-commits/search-git-commits.d.ts.map +1 -1
- package/dist/features/magic-context/git-commits/storage-git-commits.d.ts +2 -0
- package/dist/features/magic-context/git-commits/storage-git-commits.d.ts.map +1 -1
- package/dist/features/magic-context/legacy-authority-fixture.test-support.d.ts +6 -0
- package/dist/features/magic-context/legacy-authority-fixture.test-support.d.ts.map +1 -0
- package/dist/features/magic-context/lkg-prefix-chunks.d.ts +53 -0
- package/dist/features/magic-context/lkg-prefix-chunks.d.ts.map +1 -0
- package/dist/features/magic-context/memory/embedding-backfill.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding-local.d.ts +8 -0
- package/dist/features/magic-context/memory/embedding-local.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding-openai.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding-worker-client.d.ts +27 -0
- package/dist/features/magic-context/memory/embedding-worker-client.d.ts.map +1 -0
- package/dist/features/magic-context/memory/embedding-worker.d.ts +2 -0
- package/dist/features/magic-context/memory/embedding-worker.d.ts.map +1 -0
- package/dist/features/magic-context/memory/embedding-worker.fixture.d.ts +2 -0
- package/dist/features/magic-context/memory/embedding-worker.fixture.d.ts.map +1 -0
- package/dist/features/magic-context/memory/memory-selection.d.ts.map +1 -1
- package/dist/features/magic-context/memory/project-identity-cache.d.ts +4 -3
- package/dist/features/magic-context/memory/project-identity-cache.d.ts.map +1 -1
- package/dist/features/magic-context/memory/project-identity.d.ts.map +1 -1
- package/dist/features/magic-context/memory/storage-memory-fts.d.ts.map +1 -1
- package/dist/features/magic-context/memory/visibility.d.ts +1 -1
- package/dist/features/magic-context/memory/visibility.d.ts.map +1 -1
- package/dist/features/magic-context/message-fts-rowid-map.d.ts +14 -1
- package/dist/features/magic-context/message-fts-rowid-map.d.ts.map +1 -1
- package/dist/features/magic-context/message-fts-session-filter.d.ts +14 -0
- package/dist/features/magic-context/message-fts-session-filter.d.ts.map +1 -0
- package/dist/features/magic-context/message-index.d.ts +1 -7
- package/dist/features/magic-context/message-index.d.ts.map +1 -1
- package/dist/features/magic-context/message-time-backfill.d.ts.map +1 -1
- package/dist/features/magic-context/migration-v94-write-split.d.ts +62 -0
- package/dist/features/magic-context/migration-v94-write-split.d.ts.map +1 -0
- package/dist/features/magic-context/migration-worker-client.d.ts +23 -0
- package/dist/features/magic-context/migration-worker-client.d.ts.map +1 -0
- package/dist/features/magic-context/migration-worker-protocol.d.ts +30 -0
- package/dist/features/magic-context/migration-worker-protocol.d.ts.map +1 -0
- package/dist/features/magic-context/migration-worker.d.ts +2 -0
- package/dist/features/magic-context/migration-worker.d.ts.map +1 -0
- package/dist/features/magic-context/migrations.d.ts +7 -0
- package/dist/features/magic-context/migrations.d.ts.map +1 -1
- package/dist/features/magic-context/mural/render-mural.d.ts +24 -2
- package/dist/features/magic-context/mural/render-mural.d.ts.map +1 -1
- package/dist/features/magic-context/mural/render-trigger.d.ts +1 -1
- package/dist/features/magic-context/mural/render-trigger.d.ts.map +1 -1
- package/dist/features/magic-context/overflow-detection.d.ts +18 -7
- package/dist/features/magic-context/overflow-detection.d.ts.map +1 -1
- package/dist/features/magic-context/project-embedding-registry.d.ts +2 -0
- package/dist/features/magic-context/project-embedding-registry.d.ts.map +1 -1
- package/dist/features/magic-context/range-parser.d.ts +2 -3
- package/dist/features/magic-context/range-parser.d.ts.map +1 -1
- package/dist/features/magic-context/resolve-subagent-fallback.d.ts +2 -0
- package/dist/features/magic-context/resolve-subagent-fallback.d.ts.map +1 -1
- package/dist/features/magic-context/scheduler.d.ts +2 -0
- package/dist/features/magic-context/scheduler.d.ts.map +1 -1
- package/dist/features/magic-context/search.d.ts +7 -0
- package/dist/features/magic-context/search.d.ts.map +1 -1
- package/dist/features/magic-context/session-project-backfill.d.ts.map +1 -1
- package/dist/features/magic-context/session-project-storage.d.ts +10 -1
- package/dist/features/magic-context/session-project-storage.d.ts.map +1 -1
- package/dist/features/magic-context/smart-notes/compiler-prompt.d.ts +1 -1
- package/dist/features/magic-context/smart-notes/compiler-prompt.d.ts.map +1 -1
- package/dist/features/magic-context/smart-notes/compiler.d.ts +4 -0
- package/dist/features/magic-context/smart-notes/compiler.d.ts.map +1 -1
- package/dist/features/magic-context/smart-notes/runner.d.ts.map +1 -1
- package/dist/features/magic-context/smart-notes/sandbox-runner.d.ts +2 -0
- package/dist/features/magic-context/smart-notes/sandbox-runner.d.ts.map +1 -1
- package/dist/features/magic-context/smart-notes/ssrf-guard.d.ts +10 -8
- package/dist/features/magic-context/smart-notes/ssrf-guard.d.ts.map +1 -1
- package/dist/features/magic-context/smart-notes/storage.d.ts +2 -2
- package/dist/features/magic-context/smart-notes/storage.d.ts.map +1 -1
- package/dist/features/magic-context/smart-notes/types.d.ts +7 -2
- package/dist/features/magic-context/smart-notes/types.d.ts.map +1 -1
- package/dist/features/magic-context/storage-caveman-rules.d.ts +21 -0
- package/dist/features/magic-context/storage-caveman-rules.d.ts.map +1 -0
- package/dist/features/magic-context/storage-clone.d.ts.map +1 -1
- package/dist/features/magic-context/storage-compartment-history-version.d.ts +4 -0
- package/dist/features/magic-context/storage-compartment-history-version.d.ts.map +1 -0
- package/dist/features/magic-context/storage-db.d.ts +62 -2
- package/dist/features/magic-context/storage-db.d.ts.map +1 -1
- package/dist/features/magic-context/storage-identity-merge.d.ts +6 -0
- package/dist/features/magic-context/storage-identity-merge.d.ts.map +1 -1
- package/dist/features/magic-context/storage-meta-persisted.d.ts +15 -0
- package/dist/features/magic-context/storage-meta-persisted.d.ts.map +1 -1
- package/dist/features/magic-context/storage-meta-session.d.ts +1 -1
- package/dist/features/magic-context/storage-meta-session.d.ts.map +1 -1
- package/dist/features/magic-context/storage-meta-shared.d.ts +1 -1
- package/dist/features/magic-context/storage-meta-shared.d.ts.map +1 -1
- package/dist/features/magic-context/storage-notes.d.ts +2 -2
- package/dist/features/magic-context/storage-notes.d.ts.map +1 -1
- package/dist/features/magic-context/storage-reasoning-removal.d.ts +30 -0
- package/dist/features/magic-context/storage-reasoning-removal.d.ts.map +1 -0
- package/dist/features/magic-context/storage-replay-document.d.ts +42 -5
- package/dist/features/magic-context/storage-replay-document.d.ts.map +1 -1
- package/dist/features/magic-context/storage-session-tables.d.ts.map +1 -1
- package/dist/features/magic-context/storage-tags.d.ts +7 -1
- package/dist/features/magic-context/storage-tags.d.ts.map +1 -1
- package/dist/features/magic-context/storage.d.ts +1 -1
- package/dist/features/magic-context/storage.d.ts.map +1 -1
- package/dist/features/magic-context/store-generation-rebase.d.ts.map +1 -1
- package/dist/features/magic-context/tag-input.d.ts +4 -0
- package/dist/features/magic-context/tag-input.d.ts.map +1 -0
- package/dist/features/magic-context/transform-decision-log.d.ts.map +1 -1
- package/dist/features/magic-context/user-memory/review-user-memories.d.ts.map +1 -1
- package/dist/features/magic-context/user-memory/storage-user-memory.d.ts.map +1 -1
- package/dist/ffi-3cx1cxpk.js +78 -0
- package/dist/ffi-7bqqe4cd.js +91 -0
- package/dist/ffi-7e6gryj5.js +91 -0
- package/dist/ffi-bpvkebwr.js +78 -0
- package/dist/hooks/magic-context/apply-operations.d.ts +9 -1
- package/dist/hooks/magic-context/apply-operations.d.ts.map +1 -1
- package/dist/hooks/magic-context/auto-search-deadline.d.ts +10 -0
- package/dist/hooks/magic-context/auto-search-deadline.d.ts.map +1 -0
- package/dist/hooks/magic-context/auto-search-hint.d.ts +3 -0
- package/dist/hooks/magic-context/auto-search-hint.d.ts.map +1 -1
- package/dist/hooks/magic-context/auto-search-runner.d.ts +3 -0
- package/dist/hooks/magic-context/auto-search-runner.d.ts.map +1 -1
- package/dist/hooks/magic-context/caveman-cleanup.d.ts +8 -1
- package/dist/hooks/magic-context/caveman-cleanup.d.ts.map +1 -1
- package/dist/hooks/magic-context/caveman.d.ts +56 -1
- package/dist/hooks/magic-context/caveman.d.ts.map +1 -1
- package/dist/hooks/magic-context/child-session-spawn.d.ts +2 -0
- package/dist/hooks/magic-context/child-session-spawn.d.ts.map +1 -1
- package/dist/hooks/magic-context/command-handler.d.ts +1 -1
- package/dist/hooks/magic-context/command-handler.d.ts.map +1 -1
- package/dist/hooks/magic-context/compaction-marker-manager.d.ts +1 -1
- package/dist/hooks/magic-context/compaction-marker-manager.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-parser.d.ts +3 -3
- package/dist/hooks/magic-context/compartment-parser.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-historian.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-incremental.d.ts +0 -1
- package/dist/hooks/magic-context/compartment-runner-incremental.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-partial-recomp.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-recomp.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-types.d.ts +3 -0
- package/dist/hooks/magic-context/compartment-runner-types.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-validation.d.ts +6 -0
- package/dist/hooks/magic-context/compartment-runner-validation.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-trigger.d.ts.map +1 -1
- package/dist/hooks/magic-context/degraded-pass-refusal.d.ts +35 -0
- package/dist/hooks/magic-context/degraded-pass-refusal.d.ts.map +1 -0
- package/dist/hooks/magic-context/derive-budgets.d.ts.map +1 -1
- package/dist/hooks/magic-context/dropped-input-guard.d.ts.map +1 -1
- package/dist/hooks/magic-context/embed-history-runner.d.ts.map +1 -1
- package/dist/hooks/magic-context/emergency-drop.d.ts +15 -0
- package/dist/hooks/magic-context/emergency-drop.d.ts.map +1 -1
- package/dist/hooks/magic-context/event-handler.d.ts.map +1 -1
- package/dist/hooks/magic-context/execute-status.d.ts +1 -0
- package/dist/hooks/magic-context/execute-status.d.ts.map +1 -1
- package/dist/hooks/magic-context/final-wire-token-estimate.d.ts +17 -0
- package/dist/hooks/magic-context/final-wire-token-estimate.d.ts.map +1 -1
- package/dist/hooks/magic-context/heuristic-cleanup.d.ts +2 -0
- package/dist/hooks/magic-context/heuristic-cleanup.d.ts.map +1 -1
- package/dist/hooks/magic-context/historian-host-runner.d.ts +5 -0
- package/dist/hooks/magic-context/historian-host-runner.d.ts.map +1 -1
- package/dist/hooks/magic-context/historian-prompt-fit.d.ts +116 -0
- package/dist/hooks/magic-context/historian-prompt-fit.d.ts.map +1 -0
- package/dist/hooks/magic-context/historian-prompt.generated.d.ts +1 -1
- package/dist/hooks/magic-context/historian-prompt.generated.d.ts.map +1 -1
- package/dist/hooks/magic-context/history-boundary-repair.d.ts +44 -0
- package/dist/hooks/magic-context/history-boundary-repair.d.ts.map +1 -0
- package/dist/hooks/magic-context/hook.d.ts +4 -0
- package/dist/hooks/magic-context/hook.d.ts.map +1 -1
- package/dist/hooks/magic-context/inject-compartments.d.ts +8 -0
- package/dist/hooks/magic-context/inject-compartments.d.ts.map +1 -1
- package/dist/hooks/magic-context/lkg-persist.d.ts +12 -0
- package/dist/hooks/magic-context/lkg-persist.d.ts.map +1 -1
- package/dist/hooks/magic-context/lkg-replay-fit.d.ts +104 -0
- package/dist/hooks/magic-context/lkg-replay-fit.d.ts.map +1 -0
- package/dist/hooks/magic-context/lkg-replay.d.ts +64 -0
- package/dist/hooks/magic-context/lkg-replay.d.ts.map +1 -1
- package/dist/hooks/magic-context/module-client.d.ts.map +1 -1
- package/dist/hooks/magic-context/module-state-sync-timing.d.ts +1 -1
- package/dist/hooks/magic-context/module-state-sync-timing.d.ts.map +1 -1
- package/dist/hooks/magic-context/module-state-sync.d.ts +6 -68
- package/dist/hooks/magic-context/module-state-sync.d.ts.map +1 -1
- package/dist/hooks/magic-context/module-tool-backends.d.ts +1 -34
- package/dist/hooks/magic-context/module-tool-backends.d.ts.map +1 -1
- package/dist/hooks/magic-context/module-transport.d.ts +1 -55
- package/dist/hooks/magic-context/module-transport.d.ts.map +1 -1
- package/dist/hooks/magic-context/module-wire.d.ts.map +1 -1
- package/dist/hooks/magic-context/note-nudger.d.ts +2 -0
- package/dist/hooks/magic-context/note-nudger.d.ts.map +1 -1
- package/dist/hooks/magic-context/pass-outcome.d.ts +59 -2
- package/dist/hooks/magic-context/pass-outcome.d.ts.map +1 -1
- package/dist/hooks/magic-context/producer-window-guard.d.ts +6 -0
- package/dist/hooks/magic-context/producer-window-guard.d.ts.map +1 -1
- package/dist/hooks/magic-context/read-session-chunk.d.ts +13 -2
- package/dist/hooks/magic-context/read-session-chunk.d.ts.map +1 -1
- package/dist/hooks/magic-context/read-session-formatting.d.ts +11 -0
- package/dist/hooks/magic-context/read-session-formatting.d.ts.map +1 -1
- package/dist/hooks/magic-context/reasoning-removal.d.ts +60 -0
- package/dist/hooks/magic-context/reasoning-removal.d.ts.map +1 -0
- package/dist/hooks/magic-context/recomp-orchestrator.d.ts +1 -0
- package/dist/hooks/magic-context/recomp-orchestrator.d.ts.map +1 -1
- package/dist/hooks/magic-context/reference-retrieval.d.ts +1 -1
- package/dist/hooks/magic-context/reference-retrieval.d.ts.map +1 -1
- package/dist/hooks/magic-context/reply-pages.d.ts +3 -0
- package/dist/hooks/magic-context/reply-pages.d.ts.map +1 -0
- package/dist/hooks/magic-context/rust-lkg-freeze-registry.d.ts +62 -0
- package/dist/hooks/magic-context/rust-lkg-freeze-registry.d.ts.map +1 -0
- package/dist/hooks/magic-context/rust-mode-transform.d.ts +17 -85
- package/dist/hooks/magic-context/rust-mode-transform.d.ts.map +1 -1
- package/dist/hooks/magic-context/send-session-notification.d.ts.map +1 -1
- package/dist/hooks/magic-context/sentinel.d.ts +35 -0
- package/dist/hooks/magic-context/sentinel.d.ts.map +1 -1
- package/dist/hooks/magic-context/shared-compartment-boundaries.d.ts +28 -0
- package/dist/hooks/magic-context/shared-compartment-boundaries.d.ts.map +1 -0
- package/dist/hooks/magic-context/single-store-refusal.d.ts +14 -0
- package/dist/hooks/magic-context/single-store-refusal.d.ts.map +1 -0
- package/dist/hooks/magic-context/storage-busy-refusal.d.ts +7 -0
- package/dist/hooks/magic-context/storage-busy-refusal.d.ts.map +1 -1
- package/dist/hooks/magic-context/strip-content.d.ts.map +1 -1
- package/dist/hooks/magic-context/stripped-command.d.ts +1 -1
- package/dist/hooks/magic-context/stripped-command.d.ts.map +1 -1
- package/dist/hooks/magic-context/system-injection-stripper.d.ts +7 -0
- package/dist/hooks/magic-context/system-injection-stripper.d.ts.map +1 -1
- package/dist/hooks/magic-context/system-prompt-hash.d.ts.map +1 -1
- package/dist/hooks/magic-context/tag-content-primitives.d.ts.map +1 -1
- package/dist/hooks/magic-context/tag-id-fallback.d.ts.map +1 -1
- package/dist/hooks/magic-context/tag-messages.d.ts +18 -1
- package/dist/hooks/magic-context/tag-messages.d.ts.map +1 -1
- package/dist/hooks/magic-context/tail-hygiene-walk.d.ts.map +1 -1
- package/dist/hooks/magic-context/tool-drop-target.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform-compartment-phase.d.ts +1 -0
- package/dist/hooks/magic-context/transform-compartment-phase.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts +37 -4
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform.d.ts +12 -39
- package/dist/hooks/magic-context/transform.d.ts.map +1 -1
- package/dist/hooks/magic-context/unmanaged-over-window.d.ts +36 -0
- package/dist/hooks/magic-context/unmanaged-over-window.d.ts.map +1 -0
- package/dist/hooks/magic-context/unresolved-history-boundary.d.ts +15 -0
- package/dist/hooks/magic-context/unresolved-history-boundary.d.ts.map +1 -0
- package/dist/hooks/magic-context/user-profile-render.d.ts +3 -0
- package/dist/hooks/magic-context/user-profile-render.d.ts.map +1 -0
- package/dist/hooks/magic-context/wrapup-orchestrator.d.ts.map +1 -1
- package/dist/{index-sqp1hz9v.js → index-16ny736w.js} +10190 -25296
- package/dist/{index-mrc0twf3.js → index-2aq21j41.js} +1201 -428
- package/dist/{index-32b096cc.js → index-2ntg5sd4.js} +6 -2
- package/dist/index-4krbw8z9.js +6034 -0
- package/dist/{index-33q7s9y2.js → index-75zjgwga.js} +61 -85
- package/dist/{index-zx7pmr39.js → index-8fgkmxmy.js} +28 -10
- package/dist/index-a4m2b1yv.js +530 -0
- package/dist/index-anq4nn6f.js +131 -0
- package/dist/index-avwt563y.js +62 -0
- package/dist/index-bmzf7zxv.js +445 -0
- package/dist/index-e44zzy84.js +10 -0
- package/dist/index-en1k8h8m.js +244 -0
- package/dist/{index-638hf49n.js → index-f85teqck.js} +15 -6
- package/dist/index-fr2z4qy8.js +7810 -0
- package/dist/{index-kwe03yde.js → index-fzbvakh0.js} +1 -1
- package/dist/{module-asyncify-2EFITU5U-rkqjhjxd.js → index-g20jdh0p.js} +114 -105
- package/dist/index-gd5qx1j9.js +398 -0
- package/dist/{index-3bygzk2d.js → index-hybnrwq0.js} +169 -4
- package/dist/{index-jqcbs2k1.js → index-mc22ayvf.js} +24 -5
- package/dist/index-q7yesyk9.js +9118 -0
- package/dist/index-remp7e2g.js +214 -0
- package/dist/{index-7k55qm8a.js → index-sfpzqvdz.js} +8 -8
- package/dist/{index-msqr3x6m.js → index-vvtfyw1z.js} +12 -75
- package/dist/index-w9jwmntv.js +202 -0
- package/dist/{index-kr5qehbd.js → index-x23gah8c.js} +1 -1
- package/dist/{index-jdxxq8cz.js → index-x8a7jmkh.js} +6 -1
- package/dist/{index-wprsye9w.js → index-xgt9k6c6.js} +23 -12
- package/dist/index-y8v6yerm.js +77 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7519 -8096
- package/dist/message-time-backfill-an311pmk.js +124 -0
- package/dist/migration-worker.js +53 -0
- package/dist/{model-resolution-dxatzjde.js → model-resolution-xhfmyyvy.js} +5 -1
- package/dist/module-ES6BEMUI-3cet1pyp.js +12 -0
- package/dist/module-asyncify-2EFITU5U-c2razzd9.js +6 -0
- package/dist/plugin/boot-deadline.d.ts.map +1 -1
- package/dist/plugin/conflict-warning-hook.d.ts.map +1 -1
- package/dist/plugin/dream-timer-module-client.d.ts +1 -11
- package/dist/plugin/dream-timer-module-client.d.ts.map +1 -1
- package/dist/plugin/dream-timer.d.ts.map +1 -1
- package/dist/plugin/hooks/create-session-hooks.d.ts +8 -0
- package/dist/plugin/hooks/create-session-hooks.d.ts.map +1 -1
- package/dist/plugin/messages-transform.d.ts +20 -13
- package/dist/plugin/messages-transform.d.ts.map +1 -1
- package/dist/plugin/rpc-handlers.d.ts.map +1 -1
- package/dist/plugin/stale-build-notice.d.ts +16 -0
- package/dist/plugin/stale-build-notice.d.ts.map +1 -0
- package/dist/{read-session-chunk-339hg90t.js → read-session-chunk-8rxs0tc9.js} +24 -6
- package/dist/recomp-orchestrator-nzamtw29.js +39 -0
- package/dist/{rpc-notifications-4amf6mf4.js → rpc-notifications-3hed126v.js} +3 -1
- package/dist/{safe-notification-target-50gm9c58.js → safe-notification-target-43r8jsxw.js} +3 -3
- package/dist/send-session-notification-nqpv7cne.js +28 -0
- package/dist/shared/assistant-message-extractor.d.ts +4 -0
- package/dist/shared/assistant-message-extractor.d.ts.map +1 -1
- package/dist/shared/background-batch-drain.d.ts +8 -0
- package/dist/shared/background-batch-drain.d.ts.map +1 -0
- package/dist/{features/builtin-commands/commands.d.ts → shared/builtin-commands.d.ts} +1 -1
- package/dist/shared/builtin-commands.d.ts.map +1 -0
- package/dist/shared/embedding-activity.d.ts +13 -0
- package/dist/shared/embedding-activity.d.ts.map +1 -0
- package/dist/shared/historian-tool-expansions.d.ts +5 -0
- package/dist/shared/historian-tool-expansions.d.ts.map +1 -0
- package/dist/shared/historian-tool-template.d.ts +5 -0
- package/dist/shared/historian-tool-template.d.ts.map +1 -0
- package/dist/shared/historian-transient-error.d.ts +2 -0
- package/dist/shared/historian-transient-error.d.ts.map +1 -0
- package/dist/shared/jsonc-edit.d.ts.map +1 -1
- package/dist/shared/logger.d.ts +7 -0
- package/dist/shared/logger.d.ts.map +1 -1
- package/dist/shared/model-suggestion-retry.d.ts +2 -1
- package/dist/shared/model-suggestion-retry.d.ts.map +1 -1
- package/dist/shared/models-dev-cache.d.ts.map +1 -1
- package/dist/shared/off-thread-migration-clock.d.ts +38 -0
- package/dist/shared/off-thread-migration-clock.d.ts.map +1 -0
- package/dist/shared/plugin-package-version.d.ts +14 -0
- package/dist/shared/plugin-package-version.d.ts.map +1 -0
- package/dist/shared/project-directory-key.d.ts +26 -0
- package/dist/shared/project-directory-key.d.ts.map +1 -0
- package/dist/shared/prompt-async-transport.d.ts +4 -0
- package/dist/shared/prompt-async-transport.d.ts.map +1 -1
- package/dist/shared/prompt-surface-runtime.d.ts +3 -3
- package/dist/shared/provider-response-completion.d.ts +12 -0
- package/dist/shared/provider-response-completion.d.ts.map +1 -0
- package/dist/shared/redaction.d.ts.map +1 -1
- package/dist/shared/rpc-client.d.ts +23 -2
- package/dist/shared/rpc-client.d.ts.map +1 -1
- package/dist/shared/rpc-types.d.ts +19 -0
- package/dist/shared/rpc-types.d.ts.map +1 -1
- package/dist/shared/rpc-utils.d.ts +34 -0
- package/dist/shared/rpc-utils.d.ts.map +1 -1
- package/dist/shared/sqlite.d.ts +13 -2
- package/dist/shared/sqlite.d.ts.map +1 -1
- package/dist/shared/stale-plugin-build.d.ts +21 -0
- package/dist/shared/stale-plugin-build.d.ts.map +1 -0
- package/dist/shared/status-summary.d.ts +29 -0
- package/dist/shared/status-summary.d.ts.map +1 -1
- package/dist/shared/status-view-check.d.ts +124 -0
- package/dist/shared/status-view-check.d.ts.map +1 -0
- package/dist/shared/status-view.d.ts +38 -2
- package/dist/shared/status-view.d.ts.map +1 -1
- package/dist/shared/tag-owner-id.d.ts +19 -0
- package/dist/shared/tag-owner-id.d.ts.map +1 -0
- package/dist/shared/tag-transcript.d.ts +2 -1
- package/dist/shared/tag-transcript.d.ts.map +1 -1
- package/dist/shared/test-temp-dir.d.ts +8 -2
- package/dist/shared/test-temp-dir.d.ts.map +1 -1
- package/dist/shared/user-facing-codes.d.ts +41 -6
- package/dist/shared/user-facing-codes.d.ts.map +1 -1
- package/dist/shared/xml-unescape.d.ts +9 -0
- package/dist/shared/xml-unescape.d.ts.map +1 -0
- package/dist/task-config-v81k8jvk.js +17 -0
- package/dist/tools/ctx-expand/constants.d.ts +1 -1
- package/dist/tools/ctx-expand/constants.d.ts.map +1 -1
- package/dist/tools/ctx-expand/mode.d.ts +4 -0
- package/dist/tools/ctx-expand/mode.d.ts.map +1 -1
- package/dist/tools/ctx-expand/render.d.ts +5 -1
- package/dist/tools/ctx-expand/render.d.ts.map +1 -1
- package/dist/tools/ctx-expand/tools.d.ts +2 -0
- package/dist/tools/ctx-expand/tools.d.ts.map +1 -1
- package/dist/tools/ctx-expand/types.d.ts +1 -0
- package/dist/tools/ctx-expand/types.d.ts.map +1 -1
- package/dist/tools/ctx-memory/tools.d.ts.map +1 -1
- package/dist/tools/ctx-note/render.d.ts +2 -0
- package/dist/tools/ctx-note/render.d.ts.map +1 -1
- package/dist/tools/ctx-note/tools.d.ts.map +1 -1
- package/dist/tools/ctx-reduce/constants.d.ts +1 -1
- package/dist/tools/ctx-reduce/constants.d.ts.map +1 -1
- package/dist/tools/ctx-search/constants.d.ts +1 -1
- package/dist/tools/ctx-search/constants.d.ts.map +1 -1
- package/dist/tools/light-descriptions.d.ts +3 -3
- package/dist/tools/light-descriptions.d.ts.map +1 -1
- package/dist/tools/parameter-descriptions.d.ts +14 -14
- package/dist/transform-postprocess-phase-414phndq.js +61 -0
- package/dist/tui/data/context-db.d.ts +34 -10
- package/dist/tui/data/context-db.d.ts.map +1 -1
- package/dist/tui/data/notification-socket.d.ts +6 -0
- package/dist/tui/data/notification-socket.d.ts.map +1 -1
- package/dist/tui/data/session-directory.d.ts +16 -0
- package/dist/tui/data/session-directory.d.ts.map +1 -0
- package/dist/tui-compiled/data/context-db.d.ts +34 -10
- package/dist/tui-compiled/data/context-db.d.ts.map +1 -1
- package/dist/tui-compiled/data/notification-socket.d.ts +6 -0
- package/dist/tui-compiled/data/notification-socket.d.ts.map +1 -1
- package/dist/tui-compiled/data/session-directory.d.ts +16 -0
- package/dist/tui-compiled/data/session-directory.d.ts.map +1 -0
- package/dist/v2/derive-budgets-v0krf3t7.js +18 -0
- package/dist/v2/embedding-worker.js +47 -0
- package/dist/v2/emscripten-module-0g8f45e6.js +602 -0
- package/dist/v2/emscripten-module-0pekdjxz.js +1532 -0
- package/dist/v2/emscripten-module-e67xwsp3.js +503 -0
- package/dist/v2/emscripten-module-pj1vyb44.js +4559 -0
- package/dist/v2/ffi-3cx1cxpk.js +78 -0
- package/dist/v2/ffi-7bqqe4cd.js +91 -0
- package/dist/v2/ffi-7e6gryj5.js +91 -0
- package/dist/v2/ffi-bpvkebwr.js +78 -0
- package/dist/v2/fold/boundary.d.ts.map +1 -1
- package/dist/v2/fork-inheritance.d.ts +101 -0
- package/dist/v2/fork-inheritance.d.ts.map +1 -0
- package/dist/v2/hidden-child-cleanup.d.ts +11 -0
- package/dist/v2/hidden-child-cleanup.d.ts.map +1 -0
- package/dist/v2/hidden-child-native.d.ts +29 -0
- package/dist/v2/hidden-child-native.d.ts.map +1 -0
- package/dist/v2/hidden-child-record.d.ts +135 -0
- package/dist/v2/hidden-child-record.d.ts.map +1 -0
- package/dist/v2/hidden-completion.d.ts +12 -97
- package/dist/v2/hidden-completion.d.ts.map +1 -1
- package/dist/v2/hooks/context.d.ts +20 -8
- package/dist/v2/hooks/context.d.ts.map +1 -1
- package/dist/v2/hooks/dream-manual.d.ts.map +1 -1
- package/dist/v2/hooks/dream-trigger.d.ts +5 -0
- package/dist/v2/hooks/dream-trigger.d.ts.map +1 -1
- package/dist/v2/hooks/generate.d.ts +10 -0
- package/dist/v2/hooks/generate.d.ts.map +1 -0
- package/dist/v2/hooks/hidden-child.d.ts +33 -2
- package/dist/v2/hooks/hidden-child.d.ts.map +1 -1
- package/dist/v2/hooks/payload.d.ts +3 -0
- package/dist/v2/hooks/payload.d.ts.map +1 -1
- package/dist/v2/hooks/session-api-gate.d.ts +4 -0
- package/dist/v2/hooks/session-api-gate.d.ts.map +1 -0
- package/dist/v2/hooks/storage-gate.d.ts +3 -1
- package/dist/v2/hooks/storage-gate.d.ts.map +1 -1
- package/dist/v2/hooks/tools.d.ts.map +1 -1
- package/dist/v2/hooks/types.d.ts +10 -0
- package/dist/v2/hooks/types.d.ts.map +1 -1
- package/dist/v2/hooks/update-check.d.ts.map +1 -1
- package/dist/v2/hooks/usage-persist.d.ts.map +1 -1
- package/dist/v2/hooks/usage-reading.d.ts +4 -0
- package/dist/v2/hooks/usage-reading.d.ts.map +1 -1
- package/dist/v2/index-6e4mwffh.js +5662 -0
- package/dist/v2/index-en1k8h8m.js +244 -0
- package/dist/{message-time-backfill-q374fxc5.js → v2/message-time-backfill-0n93vrd7.js} +19 -5
- package/dist/v2/migration-worker.js +52 -0
- package/dist/v2/model-resolution-xhfmyyvy.js +16 -0
- package/dist/v2/module-ES6BEMUI-3cet1pyp.js +12 -0
- package/dist/v2/module-asyncify-2EFITU5U-c2razzd9.js +6 -0
- package/dist/v2/prompt-context-5y5ms8f9.js +6 -0
- package/dist/v2/read-session-chunk-hjza38hr.js +83 -0
- package/dist/v2/recomp-orchestrator-1aq7h44c.js +36 -0
- package/dist/v2/retrospective-raw-provider.d.ts +21 -0
- package/dist/v2/retrospective-raw-provider.d.ts.map +1 -0
- package/dist/v2/rpc-notifications-3hed126v.js +16 -0
- package/dist/v2/safe-notification-target-wtj0bbc2.js +9 -0
- package/dist/{send-session-notification-04hvd54c.js → v2/send-session-notification-mq9frrtm.js} +10 -5
- package/dist/v2/server-0jqw05sa.js +803 -0
- package/dist/v2/server-5317ykaf.js +40 -0
- package/dist/v2/server-a4m2b1yv.js +530 -0
- package/dist/v2/server-avwt563y.js +62 -0
- package/dist/v2/server-c4g2y1z8.js +28824 -0
- package/dist/v2/server-ckpc8pxy.js +662 -0
- package/dist/v2/server-e36nf2p1.js +7702 -0
- package/dist/v2/server-e44zzy84.js +10 -0
- package/dist/v2/server-fgmxwrgy.js +16 -0
- package/dist/v2/server-fmsr7v69.js +75 -0
- package/dist/v2/server-g20jdh0p.js +1273 -0
- package/dist/{index-qm36k34q.js → v2/server-hfjfbg59.js} +796 -737
- package/dist/v2/server-n96ag4rk.js +633 -0
- package/dist/v2/server-qdjnb2z1.js +181 -0
- package/dist/v2/server-qpg6wf72.js +187 -0
- package/dist/v2/server-r7cmye3k.js +131 -0
- package/dist/v2/server-remp7e2g.js +214 -0
- package/dist/v2/server-rhdgxp1t.js +398 -0
- package/dist/v2/server-sfpzqvdz.js +137 -0
- package/dist/v2/server-syahy8j8.js +50 -0
- package/dist/v2/server-v5xgft5v.js +9116 -0
- package/dist/v2/server-w99cyt6a.js +361 -0
- package/dist/v2/server-x8a7jmkh.js +104 -0
- package/dist/v2/server-y8v6yerm.js +77 -0
- package/dist/v2/server-z19x7eqz.js +423 -0
- package/dist/v2/server.d.ts.map +1 -1
- package/dist/v2/server.js +8796 -107376
- package/dist/v2/store-reader.d.ts +50 -0
- package/dist/v2/store-reader.d.ts.map +1 -1
- package/dist/v2/task-config-tbndqyny.js +17 -0
- package/dist/v2/transformers-node-wasm.js +26768 -0
- package/dist/v2/transformers-web.js +25670 -0
- package/dist/v2/transformers.node-hj754h7s.js +29997 -0
- package/dist/v2/tui/index.d.ts +10 -1
- package/dist/v2/tui/index.d.ts.map +1 -1
- package/dist/v2/tui/sidebar-mount.d.ts +6 -0
- package/dist/v2/tui/sidebar-mount.d.ts.map +1 -1
- package/dist/v2/tui/status-dialog-mount.d.ts +7 -4
- package/dist/v2/tui/status-dialog-mount.d.ts.map +1 -1
- package/dist/v2/tui/types.d.ts +12 -0
- package/dist/v2/tui/types.d.ts.map +1 -1
- package/dist/v2/wrapup-orchestrator-tbyx78dz.js +425 -0
- package/dist/wrapup-orchestrator-h28bqsy6.js +26 -0
- package/package.json +8 -8
- package/src/agents/hidden-agent-registrations.ts +24 -16
- package/src/agents/magic-context-prompt.test.ts +41 -0
- package/src/agents/magic-context-prompt.ts +8 -5
- package/src/agents/permissions.test.ts +31 -49
- package/src/agents/permissions.ts +8 -28
- package/src/config/index.test.ts +60 -20
- package/src/config/index.ts +53 -1
- package/src/config/live-run-config.test.ts +5 -5
- package/src/config/live-snapshot.test.ts +4 -4
- package/src/config/migrate-config-location.test.ts +3 -10
- package/src/config/project-config-trust-boundary.test.ts +207 -0
- package/src/config/project-security.hostile-matrix.test.ts +4 -4
- package/src/config/project-security.ts +218 -1
- package/src/config/protected-tokens.test.ts +14 -9
- package/src/config/raw-loader.test.ts +31 -3
- package/src/config/raw-loader.ts +8 -3
- package/src/config/schema/magic-context.ts +20 -3
- package/src/config/variable.test.ts +3 -2
- package/src/features/magic-context/dreamer/cron.ts +30 -9
- package/src/features/magic-context/dreamer/task-registry.ts +7 -5
- package/src/shared/announcement.test.ts +2 -1
- package/src/shared/assistant-message-extractor.test.ts +27 -1
- package/src/shared/assistant-message-extractor.ts +27 -0
- package/src/shared/background-batch-drain.test.ts +38 -0
- package/src/shared/background-batch-drain.ts +29 -0
- package/src/shared/builtin-commands.ts +50 -0
- package/src/shared/console-diagnostics-fence.test.ts +145 -0
- package/src/shared/data-path.test.ts +6 -5
- package/src/shared/embedding-activity.test.ts +21 -0
- package/src/shared/embedding-activity.ts +36 -0
- package/src/shared/historian-tool-defaults.json +13 -0
- package/src/shared/historian-tool-expansions.ts +18 -0
- package/src/shared/historian-tool-template.ts +248 -0
- package/src/shared/historian-transient-error.test.ts +36 -0
- package/src/shared/historian-transient-error.ts +22 -0
- package/src/shared/jsonc-edit.ts +20 -1
- package/src/shared/logger.test.ts +3 -2
- package/src/shared/logger.ts +40 -1
- package/src/shared/model-suggestion-retry.test.ts +46 -0
- package/src/shared/model-suggestion-retry.ts +16 -1
- package/src/shared/models-dev-cache.test.ts +74 -2
- package/src/shared/models-dev-cache.ts +5 -1
- package/src/shared/off-thread-migration-clock.test.ts +55 -0
- package/src/shared/off-thread-migration-clock.ts +124 -0
- package/src/shared/opencode-db-path.test.ts +3 -2
- package/src/shared/plugin-package-version.ts +52 -0
- package/src/shared/project-directory-key.test.ts +111 -0
- package/src/shared/project-directory-key.ts +54 -0
- package/src/shared/prompt-async-transport.test.ts +249 -72
- package/src/shared/prompt-async-transport.ts +131 -24
- package/src/shared/prompt-surface-a1-golden.md +41 -25
- package/src/shared/prompt-surface-runtime.test.ts +3 -3
- package/src/shared/provider-response-completion.ts +23 -0
- package/src/shared/redaction.test.ts +51 -1
- package/src/shared/redaction.ts +33 -0
- package/src/shared/rpc-async-probes.test.ts +32 -2
- package/src/shared/rpc-client.test.ts +3 -2
- package/src/shared/rpc-client.ts +76 -18
- package/src/shared/rpc-types.ts +15 -0
- package/src/shared/rpc-utils.test.ts +164 -10
- package/src/shared/rpc-utils.ts +144 -15
- package/src/shared/sqlite-acquisition-routing.test.ts +46 -3
- package/src/shared/sqlite-pass-scope.test.ts +3 -2
- package/src/shared/sqlite-transaction-mode-guard.test.ts +4 -0
- package/src/shared/sqlite-writer-diagnostics.test.ts +134 -0
- package/src/shared/sqlite.ts +225 -41
- package/src/shared/stale-plugin-build.test.ts +129 -0
- package/src/shared/stale-plugin-build.ts +151 -0
- package/src/shared/status-summary.ts +40 -13
- package/src/shared/status-view-check.test.ts +253 -0
- package/src/shared/status-view-check.ts +536 -0
- package/src/shared/status-view.test.ts +6 -1
- package/src/shared/status-view.ts +176 -4
- package/src/shared/storage-busy.test.ts +3 -2
- package/src/shared/tag-owner-id.test.ts +33 -0
- package/src/shared/tag-owner-id.ts +29 -0
- package/src/shared/tag-transcript.ts +13 -2
- package/src/shared/test-temp-dir-policy.test.ts +33 -0
- package/src/shared/test-temp-dir.test.ts +27 -0
- package/src/shared/test-temp-dir.ts +36 -12
- package/src/shared/tui-config.test.ts +6 -5
- package/src/shared/tui-preferences.test.ts +3 -2
- package/src/shared/user-facing-codes.ts +52 -6
- package/src/shared/window-geometry.test.ts +3 -2
- package/src/shared/write-transaction-attribution.test.ts +11 -7
- package/src/shared/write-transaction-hold-clock.test.ts +160 -0
- package/src/shared/xml-unescape.ts +19 -0
- package/src/tui/data/context-db.test.ts +92 -4
- package/src/tui/data/context-db.ts +184 -18
- package/src/tui/data/notification-socket.test.ts +49 -2
- package/src/tui/data/notification-socket.ts +47 -9
- package/src/tui/data/session-directory.ts +19 -0
- package/src/tui/dialogs/status-dialog-render.test.ts +284 -0
- package/src/tui/dialogs/status-dialog.tsx +41 -38
- package/src/tui/index.tsx +30 -18
- package/src/tui/slots/sidebar-content.tsx +9 -2
- package/src/tui-compiled/data/context-db.ts +184 -18
- package/src/tui-compiled/data/notification-socket.ts +47 -9
- package/src/tui-compiled/data/session-directory.ts +19 -0
- package/src/tui-compiled/dialogs/status-dialog.tsx +38 -29
- package/src/tui-compiled/index.tsx +29 -16
- package/src/tui-compiled/slots/sidebar-content.tsx +3 -2
- package/src/v2/tui/host-contract.test.ts +9 -10
- package/src/v2/tui/index.ts +78 -23
- package/src/v2/tui/load-compiled-sidebar.d.mts +5 -1
- package/src/v2/tui/load-compiled-status-dialog.d.mts +3 -2
- package/src/v2/tui/session-directory.test.ts +53 -0
- package/src/v2/tui/sidebar-mount.ts +19 -1
- package/src/v2/tui/status-dialog-mount.ts +10 -7
- package/src/v2/tui/types.ts +10 -0
- package/dist/features/builtin-commands/commands.d.ts.map +0 -1
- package/dist/features/builtin-commands/types.d.ts +0 -3
- package/dist/features/builtin-commands/types.d.ts.map +0 -1
- package/dist/features/magic-context/context-authority.d.ts +0 -272
- package/dist/features/magic-context/context-authority.d.ts.map +0 -1
- package/dist/features/magic-context/memory/mirror-reembed.d.ts +0 -22
- package/dist/features/magic-context/memory/mirror-reembed.d.ts.map +0 -1
- package/dist/hooks/magic-context/historian-state-file.d.ts +0 -43
- package/dist/hooks/magic-context/historian-state-file.d.ts.map +0 -1
- package/dist/index-4an2p8qa.js +0 -1056
- package/dist/index-rn7gafjr.js +0 -8
- package/dist/index-v6t0tg85.js +0 -13
- package/dist/plugin/memory-id-translation.d.ts +0 -109
- package/dist/plugin/memory-id-translation.d.ts.map +0 -1
- package/dist/plugin/rust-note-backend.d.ts +0 -84
- package/dist/plugin/rust-note-backend.d.ts.map +0 -1
- package/dist/recomp-orchestrator-0ers6smx.js +0 -22
- package/dist/task-config-2bm68628.js +0 -9
- package/dist/transform-postprocess-phase-ttdkrm6r.js +0 -36
- package/dist/v2/host-service.d.ts +0 -66
- package/dist/v2/host-service.d.ts.map +0 -1
- package/dist/wrapup-orchestrator-x0jvvrqn.js +0 -19
- /package/dist/{index-s70wtd8k.js → index-q6hef7fh.js} +0 -0
|
@@ -1,12 +1,69 @@
|
|
|
1
1
|
export type PassDegradationKind = "degraded" | "fatal";
|
|
2
|
+
/**
|
|
3
|
+
* What a recorded degradation can do to the request the pass serves, compared
|
|
4
|
+
* with the request a healthy pass would serve.
|
|
5
|
+
*
|
|
6
|
+
* - `changes-request`: the stage that failed decides bytes the request depends
|
|
7
|
+
* on (persisted drops and truncations, the history cut, the session-history
|
|
8
|
+
* head messages m[0]/m[1], and the reasoning, image and ctx_reduce strips
|
|
9
|
+
* replayed from earlier passes), so the served request can be larger than a
|
|
10
|
+
* healthy one or differ from it. With compaction enabled, failed stages
|
|
11
|
+
* replay the last-good request or refuse, regardless of the context limit.
|
|
12
|
+
* - `served`: the request equals a healthy pass's, or a healthy pass's minus
|
|
13
|
+
* text appended to a new, never-served turn, so it can be neither larger nor
|
|
14
|
+
* different in anything already served. The pass is served as a healthy one
|
|
15
|
+
* would be, over the limit or not.
|
|
16
|
+
*
|
|
17
|
+
* Every site a pass records is listed here, with its verdict from
|
|
18
|
+
* docs/reports/degraded-pass-fail-open.md. Recording a site that is not listed
|
|
19
|
+
* does not type-check, so a new site cannot join or skip the size guard
|
|
20
|
+
* without a verdict.
|
|
21
|
+
*/
|
|
22
|
+
export declare const PASS_DEGRADATION_EFFECTS: {
|
|
23
|
+
readonly "store-generation-rebase-failure": "changes-request";
|
|
24
|
+
readonly "session-meta-early-return": "changes-request";
|
|
25
|
+
readonly "compaction-mode-transition-failure": "changes-request";
|
|
26
|
+
readonly "rust-transform-unavailable": "changes-request";
|
|
27
|
+
readonly "overflow-state-read-failure": "changes-request";
|
|
28
|
+
readonly "tagging-persistence-failure": "changes-request";
|
|
29
|
+
readonly "flushed-status-failure": "changes-request";
|
|
30
|
+
readonly "session-directory-fallback": "served";
|
|
31
|
+
readonly "compartment-trigger-failure": "served";
|
|
32
|
+
readonly "invalid-cache-ttl-fallback": "served";
|
|
33
|
+
readonly "m0-m1-fold-preexecution-degradation": "changes-request";
|
|
34
|
+
readonly "pending-operation-failure": "changes-request";
|
|
35
|
+
readonly "stale-reduce-strip-exception": "changes-request";
|
|
36
|
+
readonly "image-strip-exception": "changes-request";
|
|
37
|
+
readonly "m0-m1-injection-degradation": "changes-request";
|
|
38
|
+
readonly "m0-m1-fallback-failure": "changes-request";
|
|
39
|
+
readonly "compaction-marker-drain-failure": "changes-request";
|
|
40
|
+
readonly "note-nudge-cas-failure": "served";
|
|
41
|
+
readonly "auto-search-timeout": "served";
|
|
42
|
+
readonly "auto-search-search-failure": "served";
|
|
43
|
+
readonly "auto-search-cas-exhaustion": "served";
|
|
44
|
+
readonly "auto-search-internal-failure": "served";
|
|
45
|
+
readonly "thinking-binding-recovery-persistence-failure": "changes-request";
|
|
46
|
+
readonly "merged-reasoning-strip-persistence-failure": "changes-request";
|
|
47
|
+
readonly "merged-reasoning-strip-exception": "changes-request";
|
|
48
|
+
readonly "trailing-blank-heal-persistence-failure": "changes-request";
|
|
49
|
+
readonly "trailing-blank-heal-exception": "changes-request";
|
|
50
|
+
readonly "trailing-blank-decision-persistence-failure": "changes-request";
|
|
51
|
+
readonly "trailing-blank-decision-exception": "changes-request";
|
|
52
|
+
readonly "proactive-thinking-strip-persistence-failure": "changes-request";
|
|
53
|
+
readonly "reasoning-removal-read-failure": "changes-request";
|
|
54
|
+
readonly "reasoning-removal-persistence-failure": "changes-request";
|
|
55
|
+
};
|
|
56
|
+
export type PassDegradationSite = keyof typeof PASS_DEGRADATION_EFFECTS;
|
|
57
|
+
/** Whether a degradation at `site` can make the served request larger than, or different from, a healthy pass's. */
|
|
58
|
+
export declare function degradationChangesRequest(site: PassDegradationSite): boolean;
|
|
2
59
|
export interface PassDegradation {
|
|
3
|
-
site:
|
|
60
|
+
site: PassDegradationSite;
|
|
4
61
|
kind: PassDegradationKind;
|
|
5
62
|
}
|
|
6
63
|
export interface PassOutcome {
|
|
7
64
|
degradations: PassDegradation[];
|
|
8
65
|
finalized: boolean;
|
|
9
|
-
record(site:
|
|
66
|
+
record(site: PassDegradationSite, kind?: PassDegradationKind): void;
|
|
10
67
|
markFinalized(): void;
|
|
11
68
|
readonly captureEligible: boolean;
|
|
12
69
|
isCaptureEligible(): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pass-outcome.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/pass-outcome.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAAG,UAAU,GAAG,OAAO,CAAC;AAEvD,MAAM,WAAW,eAAe;IAC5B,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"pass-outcome.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/pass-outcome.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAAG,UAAU,GAAG,OAAO,CAAC;AAEvD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6C4B,CAAC;AAElE,MAAM,MAAM,mBAAmB,GAAG,MAAM,OAAO,wBAAwB,CAAC;AAExE,oHAAoH;AACpH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAE5E;AAED,MAAM,WAAW,eAAe;IAC5B,IAAI,EAAE,mBAAmB,CAAC;IAC1B,IAAI,EAAE,mBAAmB,CAAC;CAC7B;AAED,MAAM,WAAW,WAAW;IACxB,YAAY,EAAE,eAAe,EAAE,CAAC;IAChC,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,IAAI,EAAE,mBAAmB,EAAE,IAAI,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACpE,aAAa,IAAI,IAAI,CAAC;IACtB,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;IAClC,iBAAiB,IAAI,OAAO,CAAC;CAChC;AAED,wBAAgB,iBAAiB,IAAI,WAAW,CAqB/C"}
|
|
@@ -43,6 +43,12 @@ export declare function fitAtomicHistorianSourceToProducerWindow(args: {
|
|
|
43
43
|
contextLimitTokens?: number;
|
|
44
44
|
inputLimitTokens?: number;
|
|
45
45
|
maxOutputTokens: number;
|
|
46
|
+
/**
|
|
47
|
+
* Room left for the source once the rest of the prompt is counted. Without
|
|
48
|
+
* it the source alone is fitted to the whole input limit, and the full
|
|
49
|
+
* prompt can still overflow.
|
|
50
|
+
*/
|
|
51
|
+
maxSourceTokens?: number;
|
|
46
52
|
}): FittedHistorianSource;
|
|
47
53
|
/** Evaluate after instructions and references are included and the actual producer model is selected. */
|
|
48
54
|
export declare function producerPromptFailureReason(input: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"producer-window-guard.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/producer-window-guard.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,OAAO,CAAC;AAEnD,eAAO,MAAM,2BAA2B,kFACiC,CAAC;AAE1E;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAQ7F;AAED,MAAM,WAAW,0BAA0B;IACvC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,uBAAuB;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,qBAAqB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,aAAa,EAAE,MAAM,CAAC;CACzB;AAED,wBAAgB,uBAAuB,CACnC,kBAAkB,EAAE,MAAM,GAAG,SAAS,EACtC,eAAe,EAAE,MAAM,EACvB,gBAAgB,CAAC,EAAE,MAAM,GAC1B,MAAM,GAAG,SAAS,CAmBpB;AAED,wBAAgB,wBAAwB,CACpC,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,gBAAgB,EAAE,MAAM,GAAG,SAAS,EACpC,aAAa,EAAE,MAAM,GAAG,SAAS,GAClC,MAAM,CAGR;AAED,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,0BAA0B,GAAG,MAAM,GAAG,IAAI,CAyB5F;AAMD;;;;;GAKG;AACH,wBAAgB,wCAAwC,CAAC,IAAI,EAAE;IAC3D,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,CAAC,EAAE,SAAS,uBAAuB,EAAE,CAAC;IACtD,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"producer-window-guard.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/producer-window-guard.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,OAAO,CAAC;AAEnD,eAAO,MAAM,2BAA2B,kFACiC,CAAC;AAE1E;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAQ7F;AAED,MAAM,WAAW,0BAA0B;IACvC,oBAAoB,EAAE,MAAM,CA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,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,kBAAkB,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC;CAC3B,GAAG,MAAM,GAAG,IAAI,CAgBhB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ToolExpansionMap } from "../../shared/historian-tool-template";
|
|
1
2
|
import type { Database } from "../../shared/sqlite";
|
|
2
3
|
import { type SessionChunkLine } from "./read-session-formatting";
|
|
3
4
|
import { type RawMessage, type RawMessageOrdinalAnchor, type RawMessageOrdinalEntry, type RawMessageParts } from "./read-session-raw";
|
|
@@ -74,6 +75,8 @@ export declare function hasRawMessageProvider(sessionId: string): boolean;
|
|
|
74
75
|
* unregister function. Pass-through harnesses (OpenCode) never call
|
|
75
76
|
* this; only Pi/future harnesses install themselves before triggering
|
|
76
77
|
* historian.
|
|
78
|
+
* Re-registering the current provider shares its lifetime across scopes.
|
|
79
|
+
* A different provider replaces it; cleanup never restores an older source.
|
|
77
80
|
*/
|
|
78
81
|
export declare function setRawMessageProvider(sessionId: string, provider: RawMessageProvider): () => void;
|
|
79
82
|
export declare function setBoundedRawMessageProvider(sessionId: string, provider: BoundedRawMessageProvider): () => void;
|
|
@@ -92,7 +95,12 @@ export declare function setBoundedRawMessageProvider(sessionId: string, provider
|
|
|
92
95
|
* exist at all, throwing `unable to open database file`.
|
|
93
96
|
*/
|
|
94
97
|
export declare function withRawMessageProvider<T>(sessionId: string, provider: RawMessageProvider, fn: () => T): T;
|
|
95
|
-
/**
|
|
98
|
+
/**
|
|
99
|
+
* Strip system-reminder blocks and OMO markers from user text for chunk
|
|
100
|
+
* compaction. OpenCode 1.17.8 and older wrapped a user message sent mid-run in a
|
|
101
|
+
* reminder whose body is the user's own words; that wrapper is kept verbatim,
|
|
102
|
+
* as stripSystemInjection keeps it, so the message is not dropped as noise.
|
|
103
|
+
*/
|
|
96
104
|
export declare function cleanUserText(text: string): string;
|
|
97
105
|
export interface SessionChunk {
|
|
98
106
|
startIndex: number;
|
|
@@ -253,7 +261,10 @@ export declare const RAW_SESSION_TAG_KEY_PAGE_SIZE = 32;
|
|
|
253
261
|
export declare function getRawSessionTagKeysThrough(sessionId: string, upToMessageIndex: number, options?: RawSessionTagKeyReadOptions): Promise<RawSessionTagKeys>;
|
|
254
262
|
export declare function getLegacyProtectedTailStartOrdinal(sessionId: string): number;
|
|
255
263
|
export declare function getProtectedTailStartOrdinal(sessionId: string): number;
|
|
256
|
-
export declare function readSessionChunk(sessionId: string, tokenBudget: number, offset?: number, eligibleEndOrdinal?: number
|
|
264
|
+
export declare function readSessionChunk(sessionId: string, tokenBudget: number, offset?: number, eligibleEndOrdinal?: number, options?: {
|
|
265
|
+
expandTools?: ToolExpansionMap;
|
|
266
|
+
expand?: boolean;
|
|
267
|
+
}): SessionChunk;
|
|
257
268
|
export declare function getRawSessionMessageIdsThrough(sessionId: string, endOrdinal: number): string[];
|
|
258
269
|
export declare function readRawSessionSeedTail(sessionId: string, boundaryId: string | null, onQuery?: () => void): Map<string, RawMessage>;
|
|
259
270
|
//# sourceMappingURL=read-session-chunk.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read-session-chunk.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/read-session-chunk.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AASpD,OAAO,EAYH,KAAK,gBAAgB,EACxB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAGH,KAAK,UAAU,EACf,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,eAAe,EAWvB,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"read-session-chunk.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/read-session-chunk.ts"],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AG,MAAM,EAAE,CAK9F;AAED,wBAAgB,sBAAsB,CAClC,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,GAAG,IAAI,EACzB,OAAO,CAAC,EAAE,MAAM,IAAI,GACrB,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAuBzB"}
|
|
@@ -37,6 +37,17 @@ export interface TokenizerNativeMemoryStats {
|
|
|
37
37
|
/** Serialized vocabulary bytes are the only tokenizer size exposed by ai-tokenizer. */
|
|
38
38
|
export declare function getTokenizerNativeMemoryStats(): TokenizerNativeMemoryStats;
|
|
39
39
|
export declare function preloadTokenizer(): Promise<boolean>;
|
|
40
|
+
/**
|
|
41
|
+
* Short identity of the estimator `estimateTokens` currently uses. Results that
|
|
42
|
+
* depend on token counts and outlive the process (such as where embedding
|
|
43
|
+
* windows were split) record it, so a process running a different estimator
|
|
44
|
+
* (the character heuristic after a failed tokenizer load, or a tokenizer that
|
|
45
|
+
* counts differently) recomputes them instead of trusting them. Reads the
|
|
46
|
+
* tokenizer directly so callers counting `estimateTokens` calls are unaffected.
|
|
47
|
+
*/
|
|
48
|
+
export declare function getTokenEstimatorFingerprint(): string;
|
|
49
|
+
/** Admission must refuse rather than treating a heuristic fallback as an exact count. */
|
|
50
|
+
export declare function hasTokenizerForFit(): boolean;
|
|
40
51
|
export declare function estimateTokens(text: string): number;
|
|
41
52
|
export declare function normalizeText(text: string): string;
|
|
42
53
|
export declare function compactRole(role: string): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read-session-formatting.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/read-session-formatting.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"read-session-formatting.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/read-session-formatting.ts"],"names":[],"mappings":"AAUA,MAAM,WAAW,gBAAgB;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,W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,MAAM,CAElD;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAIhD;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAQrD;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAW1D;AAED,wBAAgB,qBAAqB,CACjC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GACb;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,EAAE,CAAA;CAAE,CAmB1C;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAS9E"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { MessageLike } from "./tag-messages";
|
|
2
|
+
/**
|
|
3
|
+
* Pick assistant message ids whose reasoning should be removed on this
|
|
4
|
+
* rebuilding pass. Pure; the caller persists the result before applying it.
|
|
5
|
+
*
|
|
6
|
+
* A message qualifies when its tag is at most `maxTag - clearReasoningAge`, it
|
|
7
|
+
* carries a reasoning part (or one a drop neutralized), it is not the newest
|
|
8
|
+
* assistant (nor the newest one with replayable content), it keeps wire
|
|
9
|
+
* content after removal, and removal actually takes its reasoning payload off
|
|
10
|
+
* the wire on this route.
|
|
11
|
+
*
|
|
12
|
+
* Prefix-bound models (`prefixBound`: Fable 5.1, Opus 5.5, Sonnet 5.5, on any
|
|
13
|
+
* route) select only a contiguous oldest prefix. Anthropic's preserved-thinking
|
|
14
|
+
* page ("What counts as an edit") lists "Remove `thinking` blocks from the
|
|
15
|
+
* start of the history, from the end, or all of them" as valid, but "Remove a
|
|
16
|
+
* `thinking` block from the middle of the history and keep later ones" as
|
|
17
|
+
* invalid for every later thinking block. The walk therefore goes oldest
|
|
18
|
+
* first, passes over messages whose reasoning is already gone (`alreadyRemoved`
|
|
19
|
+
* or `alsoGone`), and stops at the first reasoning-bearing message it may not
|
|
20
|
+
* remove, so the removed set never has a gap.
|
|
21
|
+
*/
|
|
22
|
+
export declare function selectReasoningRemovals(args: {
|
|
23
|
+
messages: MessageLike[];
|
|
24
|
+
messageTagNumbers: Map<MessageLike, number>;
|
|
25
|
+
clearReasoningAge: number;
|
|
26
|
+
alreadyRemoved: ReadonlySet<string>;
|
|
27
|
+
prefixBound: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Assistants whose reasoning another lane already took off the wire for
|
|
30
|
+
* good (the binding-mismatch strip set). Only the prefix walk reads it.
|
|
31
|
+
*/
|
|
32
|
+
alsoGone?: ReadonlySet<string>;
|
|
33
|
+
}): string[];
|
|
34
|
+
/**
|
|
35
|
+
* Splice every reasoning part (including drop-neutralized ones) out of the
|
|
36
|
+
* assistant messages named in `ids`, on every pass. The newest assistant with
|
|
37
|
+
* replayable content is skipped, matching Rust's exempt-message rule; a
|
|
38
|
+
* removed message can only become that message if newer history disappears,
|
|
39
|
+
* which already rewrites the cache. On OpenRouter the message's
|
|
40
|
+
* `reasoning_details` copies leave with it. When an earlier drop has already
|
|
41
|
+
* emptied a message, a whole-message placeholder keeps it from being sent
|
|
42
|
+
* empty.
|
|
43
|
+
*/
|
|
44
|
+
export declare function removeReasoningParts(messages: MessageLike[], ids: ReadonlySet<string>, providerID: string | undefined): number;
|
|
45
|
+
/**
|
|
46
|
+
* How reasoning neutralized by a drop is served on a route other than
|
|
47
|
+
* canonical Anthropic (which keeps the empty sentinel its adapter drops):
|
|
48
|
+
*
|
|
49
|
+
* - `restore`: put the original part back. A drop leaves reasoning to the age
|
|
50
|
+
* lane, as Pi and Rust do. The tag lane links a tool to the reasoning of
|
|
51
|
+
* the step before it, so removing that reasoning would take an unrelated
|
|
52
|
+
* block off the wire.
|
|
53
|
+
* - `legacy`: put the original part back with `[cleared]` written into its
|
|
54
|
+
* text, exactly the bytes served before this lane existed. Used only until a
|
|
55
|
+
* session's first rebuilding pass after upgrade, and when the provider is
|
|
56
|
+
* unresolved, so the change first lands on a pass that already rebuilds.
|
|
57
|
+
*/
|
|
58
|
+
export type DroppedReasoningMode = "restore" | "legacy";
|
|
59
|
+
export declare function settleDroppedReasoningParts(messages: MessageLike[], mode: DroppedReasoningMode): number;
|
|
60
|
+
//# sourceMappingURL=reasoning-removal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reasoning-removal.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/reasoning-removal.ts"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAyFlD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE;IAC1C,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,iBAAiB,EAAE,GAAG,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IAC5C,iBAAiB,EAAE,MAAM,CAAC;IAC1B,cAAc,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACpC,WAAW,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,QAAQ,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAClC,GAAG,MAAM,EAAE,CAoCX;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAChC,QAAQ,EAAE,WAAW,EAAE,EACvB,GAAG,EAAE,WAAW,CAAC,MAAM,CAAC,EACxB,UAAU,EAAE,MAAM,GAAG,SAAS,GAC/B,MAAM,CAqBR;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,oBAAoB,GAAG,SAAS,GAAG,QAAQ,CAAC;AAExD,wBAAgB,2BAA2B,CACvC,QAAQ,EAAE,WAAW,EAAE,EACvB,IAAI,EAAE,oBAAoB,GAC3B,MAAM,CAUR"}
|
|
@@ -48,6 +48,7 @@ export interface ManagedRecompContext {
|
|
|
48
48
|
userMemoriesEnabled: boolean;
|
|
49
49
|
/** Two-pass historian (editor cleanup) — config `historian.two_pass`. */
|
|
50
50
|
historianTwoPass?: boolean;
|
|
51
|
+
historianExpandTools?: Record<string, string | false>;
|
|
51
52
|
getNotificationParams: (sessionId: string) => NotificationParams;
|
|
52
53
|
ensureProjectRegistered?: (directory: string, db: Database) => Promise<void>;
|
|
53
54
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recomp-orchestrator.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/recomp-orchestrator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAwB,KAAK,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACrF,OAAO,KAAK,EACR,qBAAqB,EACrB,wBAAwB,EAE3B,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAYtE;;;;;;;;;;;;GAYG;AAEH;;mBAEmB;AACnB,MAAM,WAAW,oBAAoB;IACjC,MAAM,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;IAChC,2FAA2F;IAC3F,wBAAwB,CAAC,EAAE,wBAAwB,CAAC;IACpD,EAAE,EAAE,QAAQ,CAAC;IACb,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,kFAAkF;IAClF,SAAS,EAAE,MAAM,CAAC;IAClB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,aAAa,EAAE,OAAO,CAAC;IACvB,WAAW,EAAE,OAAO,CAAC;IACrB,+EAA+E;IAC/E,cAAc,CAAC,EAAE,UAAU,CAAC;IAC5B,qBAAqB,CAAC,EAAE,MAAM,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AoB,EACzB,SAAS,EAAE,MAAM,GAClB,qBAAqB,CA+CvB;AAED;;;;GAIG;AACH,wBAAsB,gBAAgB,CAClC,GAAG,EAAE,oBAAoB,EACzB,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE;IAAE,KAAK,CAAC,EAAE,kBAAkB,CAAA;CAAE,GACzC,OAAO,CAAC,MAAM,CAAC,CA0CjB"}
|
|
@@ -41,7 +41,7 @@ export declare function renderSeedExamplesBlock(seeds: ReferenceSeed[]): string;
|
|
|
41
41
|
* list (ascending by sequence/endMessage). Empty string when the session has
|
|
42
42
|
* no prior compartments (young session — seeds carry calibration alone).
|
|
43
43
|
*/
|
|
44
|
-
export declare function renderSessionReferencesBlock(allCompartments: ReferenceCompartment[]): string;
|
|
44
|
+
export declare function renderSessionReferencesBlock(allCompartments: ReferenceCompartment[], window?: number): string;
|
|
45
45
|
export interface ReferenceBlocks {
|
|
46
46
|
/** `<compartment_examples_from_other_projects>` — always present (4-seed floor). */
|
|
47
47
|
seedExamples: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reference-retrieval.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/reference-retrieval.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAmB,KAAK,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAElF;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACjC,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAED,2EAA2E;AAC3E,eAAO,MAAM,UAAU,IAAI,CAAC;AAC5B,oFAAoF;AACpF,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAmDpC;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CACvB,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,KAAK,SAAa,GACnB,aAAa,EAAE,CAoCjB;AAED,4EAA4E;AAC5E,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,aAAa,EAAE,GAAG,MAAM,CAItE;AA0CD;;;;;GAKG;AACH,wBAAgB,4BAA4B,
|
|
1
|
+
{"version":3,"file":"reference-retrieval.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/reference-retrieval.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAmB,KAAK,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAElF;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACjC,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAED,2EAA2E;AAC3E,eAAO,MAAM,UAAU,IAAI,CAAC;AAC5B,oFAAoF;AACpF,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAmDpC;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CACvB,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,KAAK,SAAa,GACnB,aAAa,EAAE,CAoCjB;AAED,4EAA4E;AAC5E,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,aAAa,EAAE,GAAG,MAAM,CAItE;AA0CD;;;;;GAKG;AACH,wBAAgB,4BAA4B,CACxC,eAAe,EAAE,oBAAoB,EAAE,EACvC,MAAM,GAAE,MAA2B,GACpC,MAAM,CAOR;AAED,MAAM,WAAW,eAAe;IAC5B,oFAAoF;IACpF,YAAY,EAAE,MAAM,CAAC;IACrB,qFAAqF;IACrF,iBAAiB,EAAE,MAAM,CAAC;CAC7B;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,wEAAwE;IACxE,mBAAmB,EAAE,oBAAoB,EAAE,CAAC;CAC/C,GAAG,eAAe,CAMlB"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/** Reconstruct the original JSON bytes only after every ordered page and its digest agree. */
|
|
2
|
+
export declare function assembleReplyPages(response: unknown, fetchPage: (id: string, index: number) => Promise<unknown>): Promise<unknown>;
|
|
3
|
+
//# sourceMappingURL=reply-pages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reply-pages.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/reply-pages.ts"],"names":[],"mappings":"AAYA,8FAA8F;AAC9F,wBAAsB,kBAAkB,CACpC,QAAQ,EAAE,OAAO,EACjB,SAAS,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,GAC3D,OAAO,CAAC,OAAO,CAAC,CA0ClB"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { MessageLike } from "./transform-operations";
|
|
2
|
+
/**
|
|
3
|
+
* What a Rust-mode adapter exposes to code outside it that can serve its
|
|
4
|
+
* last-known-good (LKG) slot. The outer messages-transform wrapper replays the
|
|
5
|
+
* slot when the adapter's pass throws; that replay is provider-visible, so the
|
|
6
|
+
* adapter must enter its frozen representation exactly as if it had served the
|
|
7
|
+
* replay itself, and the wrapper must admit the replay the way the adapter would.
|
|
8
|
+
*/
|
|
9
|
+
export interface RustLkgReplayParticipant {
|
|
10
|
+
/**
|
|
11
|
+
* When this adapter last started a pass for the session, as a stamp from
|
|
12
|
+
* `nextRustPassStamp` (larger is later), or undefined when it never has.
|
|
13
|
+
*/
|
|
14
|
+
lastPassStamp(sessionId: string): number | undefined;
|
|
15
|
+
/** Enter or keep the freeze after an LKG replay served outside the adapter. */
|
|
16
|
+
enterFreezeFromExternalServe(sessionId: string, inputCount: number): void;
|
|
17
|
+
/**
|
|
18
|
+
* The adapter's own context-fit admission for an LKG replay of `messages`,
|
|
19
|
+
* with the model resolved from the pass's `inputMessages` as the adapter does.
|
|
20
|
+
*/
|
|
21
|
+
replayFits(sessionId: string, messages: MessageLike[], inputMessages: MessageLike[]): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* True when the adapter would fail closed for this session right now (usage in
|
|
24
|
+
* its emergency band, or a proven provider overflow), where it admits no LKG
|
|
25
|
+
* replay. True as well when that cannot be determined.
|
|
26
|
+
*/
|
|
27
|
+
emergencyFailClosed(sessionId: string, inputMessages: MessageLike[]): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Remove from a replayed array the thinking blocks this session has already
|
|
30
|
+
* stopped sending (the ids saved in its binding-mismatch set), exactly as the
|
|
31
|
+
* adapter's own replay does: same database, and the same provider (resolved
|
|
32
|
+
* from the pass's input messages) deciding how a block is removed.
|
|
33
|
+
*/
|
|
34
|
+
stripPersistedReasoning(sessionId: string, messages: MessageLike[], inputMessages: MessageLike[]): void;
|
|
35
|
+
}
|
|
36
|
+
/** A process-wide increasing stamp for the start of an adapter pass. */
|
|
37
|
+
export declare function nextRustPassStamp(): number;
|
|
38
|
+
/** Register an adapter. Returns the matching unregister function; call it on dispose. */
|
|
39
|
+
export declare function registerRustLkgReplayParticipant(participant: RustLkgReplayParticipant): () => void;
|
|
40
|
+
/**
|
|
41
|
+
* The adapter that serves this session in Rust mode, or undefined in TypeScript
|
|
42
|
+
* mode. Among adapters that have run the session, the one that ran it most
|
|
43
|
+
* recently is the live one: after an instance is disposed and opened again in the
|
|
44
|
+
* same process, the old adapter may still hold state for the session but no longer
|
|
45
|
+
* runs it. With no adapter that has run the session, a single registered adapter
|
|
46
|
+
* is the only one that can (the wrapper may have refused before the adapter ever
|
|
47
|
+
* saw it in this process); with several the session is not attributed.
|
|
48
|
+
*/
|
|
49
|
+
export declare function resolveRustLkgReplayParticipant(sessionId: string): RustLkgReplayParticipant | undefined;
|
|
50
|
+
/** True when a live Rust adapter has run a pass for this session in this process. */
|
|
51
|
+
export declare function rustAdapterHasRunSession(sessionId: string): boolean;
|
|
52
|
+
/** How many adapters are registered and still alive (for tests). */
|
|
53
|
+
export declare function liveRustLkgReplayParticipantCountForTest(): number;
|
|
54
|
+
/**
|
|
55
|
+
* Record that the wrapper just served the LKG slot for this session on
|
|
56
|
+
* `participant` (the wrapper's Rust adapter). Synchronous, so the adapter's next
|
|
57
|
+
* pass sees the freeze with no pending signal in between. A no-op without an
|
|
58
|
+
* adapter (TypeScript mode).
|
|
59
|
+
*/
|
|
60
|
+
export declare function noteExternalLkgReplay(participant: RustLkgReplayParticipant | undefined, sessionId: string, inputCount: number): void;
|
|
61
|
+
export declare function resetRustLkgReplayParticipantsForTest(): void;
|
|
62
|
+
//# sourceMappingURL=rust-lkg-freeze-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rust-lkg-freeze-registry.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/rust-lkg-freeze-registry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAE1D;;;;;;GAMG;AACH,MAAM,WAAW,wBAAwB;IACrC;;;OAGG;IACH,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IACrD,+EAA+E;IAC/E,4BAA4B,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1E;;;OAGG;IACH,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,EAAE,aAAa,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC;IAC9F;;;;OAIG;IACH,mBAAmB,CAAC,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC;IAC9E;;;;;OAKG;IACH,uBAAuB,CACnB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,WAAW,EAAE,EACvB,aAAa,EAAE,WAAW,EAAE,GAC7B,IAAI,CAAC;CACX;AASD,wEAAwE;AACxE,wBAAgB,iBAAiB,IAAI,MAAM,CAG1C;AAED,yFAAyF;AACzF,wBAAgB,gCAAgC,CAC5C,WAAW,EAAE,wBAAwB,GACtC,MAAM,IAAI,CAMZ;AAED;;;;;;;;GAQG;AACH,wBAAgB,+BAA+B,CAC3C,SAAS,EAAE,MAAM,GAClB,wBAAwB,GAAG,SAAS,CAmBtC;AAED,qFAAqF;AACrF,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAKnE;AAED,oEAAoE;AACpE,wBAAgB,wCAAwC,IAAI,MAAM,CAIjE;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACjC,WAAW,EAAE,wBAAwB,GAAG,SAAS,EACjD,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,GACnB,IAAI,CAIN;AAED,wBAAgB,qCAAqC,IAAI,IAAI,CAE5D"}
|
|
@@ -1,21 +1,17 @@
|
|
|
1
|
-
import { type AuthorityDrainResponse, type AuthorityStatus } from "../../features/magic-context/context-authority";
|
|
2
1
|
import { resolveProjectIdentity, resolveProjectIdentityForSession } from "../../features/magic-context/memory/project-identity";
|
|
3
2
|
import { resolveMuralWire } from "../../features/magic-context/mural/render-trigger";
|
|
4
3
|
import type { MuralWireOptions } from "../../features/magic-context/mural/resolve-mural";
|
|
5
|
-
import
|
|
4
|
+
import { getOrCreateSessionMeta } from "../../features/magic-context/storage";
|
|
6
5
|
import type { ContextUsage } from "../../features/magic-context/types";
|
|
7
6
|
import type { WindowGeometryResult } from "../../shared/window-geometry";
|
|
8
7
|
import { estimateFinalWireInputTokens } from "./final-wire-token-estimate";
|
|
9
8
|
import { type LkgInputSnapshot, type LkgSlot, type MessageContentSnapshot, messageContentSnapshot } from "./lkg-slot";
|
|
10
|
-
import { type
|
|
9
|
+
import { type ModuleStateSyncClient, type ModuleStateSyncState } from "./module-state-sync";
|
|
11
10
|
import { type OrdinalMemoCheckpoint, type OrdinalResolveStats } from "./module-wire";
|
|
12
11
|
import type { RawMessageOrdinalAnchor } from "./read-session-raw";
|
|
12
|
+
import { type RustLkgReplayParticipant } from "./rust-lkg-freeze-registry";
|
|
13
13
|
import type { TransformDeps } from "./transform";
|
|
14
14
|
import type { MessageLike } from "./transform-operations";
|
|
15
|
-
export declare class MemoryAuthorityUnavailableError extends Error {
|
|
16
|
-
readonly code = "MEMORY_AUTHORITY_UNAVAILABLE";
|
|
17
|
-
constructor(detail: string);
|
|
18
|
-
}
|
|
19
15
|
export declare const RUST_FAILURE_PARK_THRESHOLD = 3;
|
|
20
16
|
export declare const RUST_PARK_RETRY_INTERVAL = 5;
|
|
21
17
|
export declare const RUST_EMERGENCY_WALL_PCT = 95;
|
|
@@ -26,53 +22,8 @@ export interface RustModeModuleClient extends ModuleStateSyncClient {
|
|
|
26
22
|
call(args: Parameters<ModuleStateSyncClient["call"]>[0] & {
|
|
27
23
|
onTimings?: (timings: import("./module-transport").ModuleCallTimings) => void;
|
|
28
24
|
}): Promise<unknown>;
|
|
29
|
-
authorityStatus?(args: {
|
|
30
|
-
context_store_uuid: string;
|
|
31
|
-
project: string;
|
|
32
|
-
/** Bound route root for this authority query. */
|
|
33
|
-
projectRoot?: string;
|
|
34
|
-
/** Existing OpenCode session route used by host tools. */
|
|
35
|
-
sessionId?: string;
|
|
36
|
-
domain: "memories" | "notes";
|
|
37
|
-
}): Promise<{
|
|
38
|
-
authority: AuthorityStatus | null;
|
|
39
|
-
}>;
|
|
40
|
-
authorityPrepare?(args: Record<string, unknown>): Promise<{
|
|
41
|
-
authority: AuthorityStatus;
|
|
42
|
-
}>;
|
|
43
|
-
authoritySeed?(args: Record<string, unknown>): Promise<{
|
|
44
|
-
seeded: number;
|
|
45
|
-
module_row_ids?: number[];
|
|
46
|
-
}>;
|
|
47
|
-
authorityDrain?(args: Record<string, unknown>): Promise<AuthorityDrainResponse>;
|
|
48
|
-
mirrorPull?(args: {
|
|
49
|
-
domain: "memories" | "notes";
|
|
50
|
-
cursor: number;
|
|
51
|
-
limit: number;
|
|
52
|
-
live_only?: boolean;
|
|
53
|
-
projectRoot?: string;
|
|
54
|
-
}): Promise<{
|
|
55
|
-
page: import("../../features/magic-context/context-authority").ChangefeedPage;
|
|
56
|
-
}>;
|
|
57
|
-
mirrorMemory?(args: {
|
|
58
|
-
module_row_id: number;
|
|
59
|
-
projectRoot?: string;
|
|
60
|
-
}): Promise<{
|
|
61
|
-
row: import("../../features/magic-context/context-authority").ChangefeedRow | null;
|
|
62
|
-
}>;
|
|
63
|
-
memoryIdentityAck?(args: {
|
|
64
|
-
project: string;
|
|
65
|
-
rows: Array<{
|
|
66
|
-
module_row_id: number;
|
|
67
|
-
context_row_id: number;
|
|
68
|
-
}>;
|
|
69
|
-
projectRoot?: string;
|
|
70
|
-
}): Promise<{
|
|
71
|
-
acknowledged: number;
|
|
72
|
-
}>;
|
|
73
25
|
deleteSession?(sessionId: string, projectRoot: string): Promise<void>;
|
|
74
26
|
closeSession?(sessionId: string): void;
|
|
75
|
-
getCompartmentsAfter?(sessionId: string, afterSequence: number): Promise<ModuleCompartmentMirrorResponse>;
|
|
76
27
|
}
|
|
77
28
|
export interface RustWireCacheHeapStats {
|
|
78
29
|
snapshots: number;
|
|
@@ -88,10 +39,12 @@ export interface RustWireCacheHeapStats {
|
|
|
88
39
|
}
|
|
89
40
|
interface RustSessionState extends ModuleStateSyncState {
|
|
90
41
|
initialized: boolean;
|
|
91
|
-
/** Preserve an empty first-render hash until the host's recorded system prompt changes. */
|
|
92
|
-
baselineSystemHashOmitted: boolean;
|
|
93
42
|
todoProbeIdentity?: string;
|
|
94
43
|
todoProbeNextPass?: boolean;
|
|
44
|
+
/** Last seen compartment `max_sequence:count` for this session; a change re-arms auto-embed. */
|
|
45
|
+
autoEmbedCompartmentMark?: string;
|
|
46
|
+
/** Last transform-response compartment key; the compartment query runs only when it moves. */
|
|
47
|
+
autoEmbedCompartmentKey?: string;
|
|
95
48
|
lastAppliedAtMs?: number;
|
|
96
49
|
consecutiveFailures: number;
|
|
97
50
|
passCount: number;
|
|
@@ -122,24 +75,15 @@ interface RustSessionState extends ModuleStateSyncState {
|
|
|
122
75
|
syntheticTurnCount: number;
|
|
123
76
|
lastObservedUserMessageId: string | null;
|
|
124
77
|
syntheticLoopBreakerLogged: boolean;
|
|
125
|
-
memoryAuthorityProject: string | null;
|
|
126
|
-
memoryAuthorityRoot: string | null;
|
|
127
|
-
memoryAuthorityReady: boolean;
|
|
128
78
|
recordedSessionProjectIdentity: string | null;
|
|
129
79
|
recordedSessionDirectory: string | null;
|
|
130
80
|
resolvedMemoryProjectDirectory: string | null;
|
|
131
81
|
resolvedMemoryProjectPath: string | null;
|
|
132
82
|
stateSyncInputSignature: string | null;
|
|
133
|
-
memoryMirrorProjectionKey: string | null;
|
|
134
|
-
compartmentMirrorProjectionKey: string | null;
|
|
135
|
-
mirrorProjectionInFlight: boolean;
|
|
136
|
-
muralCuePoolVersion: number;
|
|
137
|
-
muralGeneration: number;
|
|
138
83
|
muralCache: {
|
|
139
84
|
key: string;
|
|
140
85
|
value: MuralWireOptions;
|
|
141
86
|
} | null;
|
|
142
|
-
authorityMemorySyncSkipLogged?: boolean;
|
|
143
87
|
lkgCaptureSequence: number;
|
|
144
88
|
/**
|
|
145
89
|
* Capture sequence of the snapshot prepared from the array the previous pass
|
|
@@ -160,6 +104,13 @@ interface RustSessionState extends ModuleStateSyncState {
|
|
|
160
104
|
lkgRepresentationFrozen: boolean;
|
|
161
105
|
lkgFrozenHealthyPasses: number;
|
|
162
106
|
lkgFrozenAtInputCount: number | null;
|
|
107
|
+
/**
|
|
108
|
+
* True until this process's first pass for the session applies module output.
|
|
109
|
+
* That pass checks whether the durable slot it inherited was captured from a
|
|
110
|
+
* frozen serve (a previous process froze and captured raw bytes) and, if so,
|
|
111
|
+
* resumes the freeze instead of adopting module output.
|
|
112
|
+
*/
|
|
113
|
+
lkgColdStartCheckPending: boolean;
|
|
163
114
|
/** Highest fold coverage ordinal this process has already armed the deferred-note
|
|
164
115
|
* nudge for. Null until the first committed boundary of the process is observed. */
|
|
165
116
|
noteNudgePublishedOrdinal: number | null;
|
|
@@ -173,14 +124,6 @@ export interface RustModeTransformOptions {
|
|
|
173
124
|
/** Test-only page-size override for exercising multi-page control flow with small fixtures. */
|
|
174
125
|
modulePageMaxBytes?: number;
|
|
175
126
|
memorySyncRequestedSessions?: Set<string>;
|
|
176
|
-
/**
|
|
177
|
-
* Invoked with each project that reaches rust-mode authority preparation, so the
|
|
178
|
-
* host can lazily register per-project services (the smart-note evaluator bridge)
|
|
179
|
-
* for projects other than the plugin's launch directory.
|
|
180
|
-
*/
|
|
181
|
-
onProjectPrepared?: (projectPath: string) => void;
|
|
182
|
-
/** Test-only escape hatch for transform-wire tests without an authority transport. */
|
|
183
|
-
allowAuthorityProtocolBypassForTests?: boolean;
|
|
184
127
|
/** Override only for deterministic capture scheduling in tests. */
|
|
185
128
|
scheduleLkgCapture?: (capture: () => void) => void;
|
|
186
129
|
/** Override only to exercise a failure at the native-output installation boundary. */
|
|
@@ -189,7 +132,7 @@ export interface RustModeTransformOptions {
|
|
|
189
132
|
}, messages: unknown[]) => void;
|
|
190
133
|
/** Override only to exercise raw-fallback estimator failures in tests. */
|
|
191
134
|
rawFallbackEstimatorForTests?: typeof estimateFinalWireInputTokens;
|
|
192
|
-
/** Override only to observe mural
|
|
135
|
+
/** Override only to observe mural candidate resolution in tests. */
|
|
193
136
|
muralResolverForTests?: typeof resolveMuralWire;
|
|
194
137
|
/** Override only to observe session-identity caching in tests. */
|
|
195
138
|
sessionProjectIdentityResolverForTests?: typeof resolveProjectIdentityForSession;
|
|
@@ -326,17 +269,6 @@ declare function shouldDisarmRustEmergencyRecovery(input: {
|
|
|
326
269
|
providerProvenLimitTokens: number;
|
|
327
270
|
}): "fresh-usage" | "trusted-final-wire" | null;
|
|
328
271
|
declare function directiveTextOf(response: Record<string, unknown>): string | undefined;
|
|
329
|
-
declare function authoritySeedRows(db: TransformDeps["db"], projectPath: string, domain: "memories" | "notes"): Record<string, unknown>[];
|
|
330
|
-
declare function prepareRustMemoryAuthority(args: {
|
|
331
|
-
db: TransformDeps["db"];
|
|
332
|
-
module: RustModeModuleClient;
|
|
333
|
-
projectPath: string;
|
|
334
|
-
projectRoot: string;
|
|
335
|
-
state: RustSessionState;
|
|
336
|
-
allowProtocolBypassForTests?: boolean;
|
|
337
|
-
/** Fires after authority is ready so hosts can register per-project services. */
|
|
338
|
-
onProjectPrepared?: (projectPath: string) => void;
|
|
339
|
-
}): Promise<void>;
|
|
340
272
|
export declare function applyNativeMessagesVerbatim(output: {
|
|
341
273
|
messages: unknown[];
|
|
342
274
|
}, response: Record<string, unknown>, previous?: {
|
|
@@ -382,15 +314,16 @@ export declare function createRustModeTransform(deps: TransformDeps, options: Ru
|
|
|
382
314
|
clearSession: (sessionId: string) => Promise<void>;
|
|
383
315
|
invalidateWireState: (sessionId: string) => void;
|
|
384
316
|
stopHostRunner: () => Promise<void>;
|
|
317
|
+
dispose: () => void;
|
|
385
318
|
getState: (sessionId: string) => Readonly<RustSessionState>;
|
|
386
319
|
getHeapStats: () => RustWireCacheHeapStats;
|
|
320
|
+
replayParticipant: RustLkgReplayParticipant;
|
|
387
321
|
};
|
|
388
322
|
export declare function runRustModeTransform(transform: ReturnType<typeof createRustModeTransform>, sessionId: string, messages: MessageLike[], output: {
|
|
389
323
|
messages: unknown[];
|
|
390
324
|
}, sessionMeta: ReturnType<typeof getOrCreateSessionMeta>): Promise<void>;
|
|
391
325
|
export declare const __rustModeTransformTest: {
|
|
392
326
|
applyNativeMessagesVerbatim: typeof applyNativeMessagesVerbatim;
|
|
393
|
-
authoritySeedRows: typeof authoritySeedRows;
|
|
394
327
|
contentSnapshotsFor: typeof contentSnapshotsFor;
|
|
395
328
|
rustCaptureDigests: typeof rustCaptureDigests;
|
|
396
329
|
snapshotTags: {
|
|
@@ -417,7 +350,6 @@ export declare const __rustModeTransformTest: {
|
|
|
417
350
|
shouldDisarmRustEmergencyRecovery: typeof shouldDisarmRustEmergencyRecovery;
|
|
418
351
|
createRustModeTransform: typeof createRustModeTransform;
|
|
419
352
|
directiveTextOf: typeof directiveTextOf;
|
|
420
|
-
prepareRustMemoryAuthority: typeof prepareRustMemoryAuthority;
|
|
421
353
|
};
|
|
422
354
|
export {};
|
|
423
355
|
//# sourceMappingURL=rust-mode-transform.d.ts.map
|