@cortexkit/opencode-magic-context 0.42.6 → 0.43.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -5
- package/dist/agents/dreamer.d.ts +7 -9
- package/dist/agents/dreamer.d.ts.map +1 -1
- package/dist/agents/hidden-agent-registrations.d.ts.map +1 -1
- package/dist/agents/magic-context-prompt.d.ts.map +1 -1
- package/dist/{announcement-8mgn61fw.js → announcement-1a8bvswd.js} +2 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/live-run-config.d.ts +12 -0
- package/dist/config/live-run-config.d.ts.map +1 -0
- package/dist/config/live-snapshot.d.ts +32 -0
- package/dist/config/live-snapshot.d.ts.map +1 -0
- package/dist/config/schema/magic-context.d.ts +12 -2
- package/dist/config/schema/magic-context.d.ts.map +1 -1
- package/dist/{conflict-warning-hook-aktepwpz.js → conflict-warning-hook-956fkedc.js} +6 -4
- package/dist/{derive-budgets-v1fkhjjr.js → derive-budgets-b8ybssh9.js} +7 -3
- package/dist/features/builtin-commands/commands.d.ts +0 -4
- package/dist/features/builtin-commands/commands.d.ts.map +1 -1
- package/dist/features/magic-context/compaction-marker.d.ts +6 -0
- package/dist/features/magic-context/compaction-marker.d.ts.map +1 -1
- package/dist/features/magic-context/compartment-chunk-embedding.d.ts +4 -1
- package/dist/features/magic-context/compartment-chunk-embedding.d.ts.map +1 -1
- package/dist/features/magic-context/compartment-lease.d.ts +8 -0
- package/dist/features/magic-context/compartment-lease.d.ts.map +1 -1
- package/dist/features/magic-context/compartment-storage.d.ts +21 -0
- package/dist/features/magic-context/compartment-storage.d.ts.map +1 -1
- package/dist/features/magic-context/context-authority.d.ts +9 -2
- package/dist/features/magic-context/context-authority.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/classify.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/docs-proposals.d.ts +23 -0
- package/dist/features/magic-context/dreamer/docs-proposals.d.ts.map +1 -0
- package/dist/features/magic-context/dreamer/evaluate-smart-notes.d.ts +5 -1
- package/dist/features/magic-context/dreamer/evaluate-smart-notes.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/hidden-single-shot.d.ts +51 -0
- package/dist/features/magic-context/dreamer/hidden-single-shot.d.ts.map +1 -0
- package/dist/features/magic-context/dreamer/manual-summary.d.ts +7 -0
- package/dist/features/magic-context/dreamer/manual-summary.d.ts.map +1 -0
- package/dist/features/magic-context/dreamer/map-memories.d.ts +3 -1
- package/dist/features/magic-context/dreamer/map-memories.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/promote-primers.d.ts +8 -1
- package/dist/features/magic-context/dreamer/promote-primers.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/refresh-primers.d.ts +3 -1
- package/dist/features/magic-context/dreamer/refresh-primers.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/retrospective-orphan-sweep.d.ts +5 -2
- package/dist/features/magic-context/dreamer/retrospective-orphan-sweep.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/retrospective-raw-provider.d.ts +22 -13
- package/dist/features/magic-context/dreamer/retrospective-raw-provider.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/storage-task-schedule.d.ts +9 -0
- package/dist/features/magic-context/dreamer/storage-task-schedule.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/task-config.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/task-executor.d.ts +3 -0
- package/dist/features/magic-context/dreamer/task-executor.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/task-prompts.d.ts +7 -4
- package/dist/features/magic-context/dreamer/task-prompts.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/task-registry.d.ts +53 -2
- package/dist/features/magic-context/dreamer/task-registry.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/task-scheduler.d.ts +3 -0
- package/dist/features/magic-context/dreamer/task-scheduler.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/tick-failure.d.ts +38 -0
- package/dist/features/magic-context/dreamer/tick-failure.d.ts.map +1 -0
- package/dist/features/magic-context/dreamer/verify.d.ts +4 -1
- package/dist/features/magic-context/dreamer/verify.d.ts.map +1 -1
- package/dist/features/magic-context/git-commits/search-git-commits.d.ts +2 -0
- package/dist/features/magic-context/git-commits/search-git-commits.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding-identity.d.ts +1 -0
- package/dist/features/magic-context/memory/embedding-identity.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding-local.d.ts.map +1 -1
- package/dist/features/magic-context/memory/memory-diagnostics.d.ts +6 -0
- package/dist/features/magic-context/memory/memory-diagnostics.d.ts.map +1 -0
- package/dist/features/magic-context/memory/memory-selection.d.ts +12 -0
- package/dist/features/magic-context/memory/memory-selection.d.ts.map +1 -0
- package/dist/features/magic-context/memory/memory-visibility.d.ts +46 -0
- package/dist/features/magic-context/memory/memory-visibility.d.ts.map +1 -0
- package/dist/features/magic-context/memory/mirror-reembed.d.ts +22 -0
- package/dist/features/magic-context/memory/mirror-reembed.d.ts.map +1 -0
- package/dist/features/magic-context/memory/project-identity.d.ts +9 -0
- package/dist/features/magic-context/memory/project-identity.d.ts.map +1 -1
- package/dist/features/magic-context/memory/storage-memory-fts.d.ts +6 -2
- package/dist/features/magic-context/memory/storage-memory-fts.d.ts.map +1 -1
- package/dist/features/magic-context/memory/storage-memory.d.ts.map +1 -1
- package/dist/features/magic-context/memory/transformers-remote-host.d.ts +6 -0
- package/dist/features/magic-context/memory/transformers-remote-host.d.ts.map +1 -0
- package/dist/features/magic-context/memory/transformers-web-entry.d.ts.map +1 -1
- package/dist/features/magic-context/memory/verification-paths.d.ts.map +1 -1
- package/dist/features/magic-context/message-fts-rowid-map.d.ts +3 -1
- package/dist/features/magic-context/message-fts-rowid-map.d.ts.map +1 -1
- package/dist/features/magic-context/message-index-async.d.ts +8 -3
- package/dist/features/magic-context/message-index-async.d.ts.map +1 -1
- package/dist/features/magic-context/message-index.d.ts +7 -1
- package/dist/features/magic-context/message-index.d.ts.map +1 -1
- package/dist/features/magic-context/message-time-backfill.d.ts +19 -0
- package/dist/features/magic-context/message-time-backfill.d.ts.map +1 -0
- package/dist/features/magic-context/migrations.d.ts +10 -6
- package/dist/features/magic-context/migrations.d.ts.map +1 -1
- package/dist/features/magic-context/mural/compress-cues.d.ts.map +1 -1
- package/dist/features/magic-context/mural/storage-mural.d.ts +5 -0
- package/dist/features/magic-context/mural/storage-mural.d.ts.map +1 -1
- package/dist/features/magic-context/opencode2-relabel.d.ts +132 -0
- package/dist/features/magic-context/opencode2-relabel.d.ts.map +1 -0
- package/dist/features/magic-context/overflow-detection.d.ts +3 -0
- package/dist/features/magic-context/overflow-detection.d.ts.map +1 -1
- package/dist/features/magic-context/project-embedding-registry.d.ts.map +1 -1
- package/dist/features/magic-context/protection-window.d.ts +1 -1
- package/dist/features/magic-context/protection-window.d.ts.map +1 -1
- package/dist/features/magic-context/search.d.ts +6 -0
- package/dist/features/magic-context/search.d.ts.map +1 -1
- package/dist/features/magic-context/session-decision-calibration.d.ts +31 -0
- package/dist/features/magic-context/session-decision-calibration.d.ts.map +1 -0
- package/dist/features/magic-context/shadow-backfill-state.d.ts +1 -1
- package/dist/features/magic-context/shadow-backfill-state.d.ts.map +1 -1
- package/dist/features/magic-context/smart-notes/compiler.d.ts +5 -1
- package/dist/features/magic-context/smart-notes/compiler.d.ts.map +1 -1
- package/dist/features/magic-context/storage-clone.d.ts.map +1 -1
- package/dist/features/magic-context/storage-db.d.ts +1 -1
- package/dist/features/magic-context/storage-db.d.ts.map +1 -1
- package/dist/features/magic-context/storage-historian-runs.d.ts +4 -2
- package/dist/features/magic-context/storage-historian-runs.d.ts.map +1 -1
- package/dist/features/magic-context/storage-meta-persisted.d.ts +16 -2
- package/dist/features/magic-context/storage-meta-persisted.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-meta.d.ts +1 -1
- package/dist/features/magic-context/storage-meta.d.ts.map +1 -1
- package/dist/features/magic-context/storage-notes.d.ts +1 -0
- package/dist/features/magic-context/storage-notes.d.ts.map +1 -1
- package/dist/features/magic-context/storage-replay-document.d.ts +2 -0
- package/dist/features/magic-context/storage-replay-document.d.ts.map +1 -1
- package/dist/features/magic-context/storage-subagent-invocations.d.ts +1 -1
- package/dist/features/magic-context/storage-subagent-invocations.d.ts.map +1 -1
- package/dist/features/magic-context/storage-tags.d.ts +42 -4
- package/dist/features/magic-context/storage-tags.d.ts.map +1 -1
- package/dist/features/magic-context/storage.d.ts +2 -2
- package/dist/features/magic-context/storage.d.ts.map +1 -1
- package/dist/features/magic-context/store-generation-rebase.d.ts +95 -0
- package/dist/features/magic-context/store-generation-rebase.d.ts.map +1 -0
- package/dist/features/magic-context/subagent-token-capture.d.ts +1 -0
- package/dist/features/magic-context/subagent-token-capture.d.ts.map +1 -1
- package/dist/features/magic-context/tagger.d.ts +2 -0
- package/dist/features/magic-context/tagger.d.ts.map +1 -1
- package/dist/features/magic-context/tool-definition-tokens.d.ts +1 -0
- package/dist/features/magic-context/tool-definition-tokens.d.ts.map +1 -1
- package/dist/features/magic-context/tool-owner-backfill.d.ts.map +1 -1
- package/dist/features/magic-context/user-memory/review-user-memories.d.ts +5 -1
- package/dist/features/magic-context/user-memory/review-user-memories.d.ts.map +1 -1
- package/dist/hooks/auto-update-checker/checker.d.ts +1 -0
- package/dist/hooks/auto-update-checker/checker.d.ts.map +1 -1
- package/dist/hooks/magic-context/apply-operations.d.ts +10 -1
- package/dist/hooks/magic-context/apply-operations.d.ts.map +1 -1
- package/dist/hooks/magic-context/cache-busting-signals.d.ts +19 -3
- package/dist/hooks/magic-context/cache-busting-signals.d.ts.map +1 -1
- package/dist/hooks/magic-context/command-handler.d.ts +5 -4
- package/dist/hooks/magic-context/command-handler.d.ts.map +1 -1
- package/dist/hooks/magic-context/compaction-marker-manager.d.ts.map +1 -1
- package/dist/hooks/magic-context/compaction-off-transition.d.ts +1 -0
- package/dist/hooks/magic-context/compaction-off-transition.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-prompt.d.ts +1 -1
- package/dist/hooks/magic-context/compartment-prompt.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-render-epoch.d.ts +3 -1
- package/dist/hooks/magic-context/compartment-render-epoch.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-drop-queue.d.ts +1 -1
- package/dist/hooks/magic-context/compartment-runner-drop-queue.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-historian.d.ts +1 -0
- package/dist/hooks/magic-context/compartment-runner-historian.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-incremental.d.ts +8 -1
- package/dist/hooks/magic-context/compartment-runner-incremental.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 +19 -11
- package/dist/hooks/magic-context/compartment-runner-types.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-validation.d.ts +4 -1
- package/dist/hooks/magic-context/compartment-runner-validation.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-trigger.d.ts +2 -1
- package/dist/hooks/magic-context/compartment-trigger.d.ts.map +1 -1
- package/dist/hooks/magic-context/decay-render.d.ts +1 -0
- package/dist/hooks/magic-context/decay-render.d.ts.map +1 -1
- package/dist/hooks/magic-context/decision-calibration.d.ts +24 -0
- package/dist/hooks/magic-context/decision-calibration.d.ts.map +1 -0
- package/dist/hooks/magic-context/derive-budgets.d.ts +2 -0
- package/dist/hooks/magic-context/derive-budgets.d.ts.map +1 -1
- package/dist/hooks/magic-context/dropped-input-guard.d.ts +50 -4
- package/dist/hooks/magic-context/dropped-input-guard.d.ts.map +1 -1
- package/dist/hooks/magic-context/embed-history-runner.d.ts +30 -0
- package/dist/hooks/magic-context/embed-history-runner.d.ts.map +1 -0
- package/dist/hooks/magic-context/emergency-drop.d.ts +13 -8
- 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/event-payloads.d.ts +2 -1
- package/dist/hooks/magic-context/event-payloads.d.ts.map +1 -1
- package/dist/hooks/magic-context/execute-status.d.ts +2 -1
- package/dist/hooks/magic-context/execute-status.d.ts.map +1 -1
- package/dist/hooks/magic-context/final-wire-token-estimate.d.ts +12 -4
- package/dist/hooks/magic-context/final-wire-token-estimate.d.ts.map +1 -1
- package/dist/hooks/magic-context/heuristic-cleanup.d.ts.map +1 -1
- package/dist/hooks/magic-context/historian-no-fire-cause.d.ts +5 -0
- package/dist/hooks/magic-context/historian-no-fire-cause.d.ts.map +1 -0
- package/dist/hooks/magic-context/historian-publish-stage-logger.d.ts +3 -0
- package/dist/hooks/magic-context/historian-publish-stage-logger.d.ts.map +1 -0
- package/dist/hooks/magic-context/hook-handlers.d.ts +0 -3
- package/dist/hooks/magic-context/hook-handlers.d.ts.map +1 -1
- package/dist/hooks/magic-context/hook.d.ts +4 -4
- package/dist/hooks/magic-context/hook.d.ts.map +1 -1
- package/dist/hooks/magic-context/host-served-rows.d.ts +58 -0
- package/dist/hooks/magic-context/host-served-rows.d.ts.map +1 -0
- package/dist/hooks/magic-context/inject-compartments.d.ts +38 -0
- package/dist/hooks/magic-context/inject-compartments.d.ts.map +1 -1
- package/dist/hooks/magic-context/legacy-compartments.d.ts +20 -0
- package/dist/hooks/magic-context/legacy-compartments.d.ts.map +1 -0
- package/dist/hooks/magic-context/live-session-state.d.ts +7 -7
- package/dist/hooks/magic-context/lkg-slot.d.ts +1 -0
- package/dist/hooks/magic-context/lkg-slot.d.ts.map +1 -1
- package/dist/hooks/magic-context/m0-token-breakdown.d.ts +6 -0
- package/dist/hooks/magic-context/m0-token-breakdown.d.ts.map +1 -1
- package/dist/hooks/magic-context/maintenance-authority.d.ts +0 -1
- package/dist/hooks/magic-context/maintenance-authority.d.ts.map +1 -1
- package/dist/hooks/magic-context/module-state-sync.d.ts +1 -1
- package/dist/hooks/magic-context/module-state-sync.d.ts.map +1 -1
- package/dist/hooks/magic-context/module-transport.d.ts +1 -1
- package/dist/hooks/magic-context/module-transport.d.ts.map +1 -1
- package/dist/hooks/magic-context/module-wire.d.ts +42 -0
- package/dist/hooks/magic-context/module-wire.d.ts.map +1 -1
- package/dist/hooks/magic-context/note-nudger.d.ts.map +1 -1
- package/dist/hooks/magic-context/postprocess-read-cache.d.ts +8 -0
- package/dist/hooks/magic-context/postprocess-read-cache.d.ts.map +1 -0
- package/dist/hooks/magic-context/producer-window-guard.d.ts +16 -0
- package/dist/hooks/magic-context/producer-window-guard.d.ts.map +1 -1
- package/dist/hooks/magic-context/producer-window-test-support.d.ts +14 -0
- package/dist/hooks/magic-context/producer-window-test-support.d.ts.map +1 -0
- package/dist/hooks/magic-context/protected-tail-boundary.d.ts +2 -0
- package/dist/hooks/magic-context/protected-tail-boundary.d.ts.map +1 -1
- package/dist/hooks/magic-context/read-session-chunk.d.ts +45 -10
- package/dist/hooks/magic-context/read-session-chunk.d.ts.map +1 -1
- package/dist/hooks/magic-context/read-session-db.d.ts.map +1 -1
- package/dist/hooks/magic-context/read-session-raw.d.ts +4 -0
- package/dist/hooks/magic-context/read-session-raw.d.ts.map +1 -1
- package/dist/hooks/magic-context/read-session-true-raw-tokens.d.ts +6 -0
- package/dist/hooks/magic-context/read-session-true-raw-tokens.d.ts.map +1 -1
- package/dist/hooks/magic-context/recomp-orchestrator.d.ts +17 -39
- package/dist/hooks/magic-context/recomp-orchestrator.d.ts.map +1 -1
- package/dist/hooks/magic-context/rust-mode-transform.d.ts +26 -3
- package/dist/hooks/magic-context/rust-mode-transform.d.ts.map +1 -1
- package/dist/hooks/magic-context/send-session-notification.d.ts +1 -0
- package/dist/hooks/magic-context/send-session-notification.d.ts.map +1 -1
- package/dist/hooks/magic-context/sentinel.d.ts.map +1 -1
- package/dist/hooks/magic-context/system-prompt-hash.d.ts +6 -7
- package/dist/hooks/magic-context/system-prompt-hash.d.ts.map +1 -1
- package/dist/hooks/magic-context/tag-messages.d.ts +21 -1
- package/dist/hooks/magic-context/tag-messages.d.ts.map +1 -1
- package/dist/hooks/magic-context/tail-hygiene-walk.d.ts +63 -0
- package/dist/hooks/magic-context/tail-hygiene-walk.d.ts.map +1 -1
- package/dist/hooks/magic-context/tokenizer-calibration.d.ts +19 -12
- package/dist/hooks/magic-context/tokenizer-calibration.d.ts.map +1 -1
- package/dist/hooks/magic-context/tool-drop-target.d.ts +52 -1
- package/dist/hooks/magic-context/tool-drop-target.d.ts.map +1 -1
- package/dist/hooks/magic-context/tool-sweep-policy.d.ts +50 -0
- package/dist/hooks/magic-context/tool-sweep-policy.d.ts.map +1 -0
- package/dist/hooks/magic-context/transform-compartment-phase.d.ts +20 -1
- package/dist/hooks/magic-context/transform-compartment-phase.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform-context-state.d.ts +9 -0
- package/dist/hooks/magic-context/transform-context-state.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts +5 -3
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform.d.ts +37 -4
- package/dist/hooks/magic-context/transform.d.ts.map +1 -1
- package/dist/hooks/magic-context/wrapup-orchestrator.d.ts.map +1 -1
- package/dist/{index-f9gem5cr.js → index-0ccmyzbj.js} +90 -10
- package/dist/index-1gtwrdc4.js +393 -0
- package/dist/{index-ntbmt6rq.js → index-4b30nf6z.js} +1 -1
- package/dist/index-6w9p73jz.js +170 -0
- package/dist/{index-4ftb5hcq.js → index-6z9g64js.js} +7 -1
- package/dist/{index-djp6rwz6.js → index-7wpwr2e2.js} +28002 -30125
- package/dist/index-9r1cbh9e.js +16 -0
- package/dist/{safe-notification-target-fepvcbsj.js → index-febg06dy.js} +6 -7
- package/dist/index-j7cnyvq1.js +5409 -0
- package/dist/{index-s61hh7gv.js → index-kpmmr8s0.js} +95 -73
- package/dist/{index-a9ssj59b.js → index-v8qr6tt2.js} +56 -16
- package/dist/{index-qp20p2py.js → index-wgzyeyf5.js} +1 -1
- package/dist/index-y5145x8k.js +619 -0
- package/dist/{index-ngjmj6xx.js → index-yc81txp4.js} +38 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6274 -3180
- package/dist/message-time-backfill-0ccvyk9n.js +109 -0
- package/dist/plugin/dream-timer.d.ts +13 -0
- package/dist/plugin/dream-timer.d.ts.map +1 -1
- package/dist/plugin/hooks/create-session-hooks.d.ts +5 -2
- package/dist/plugin/hooks/create-session-hooks.d.ts.map +1 -1
- package/dist/plugin/memory-id-translation.d.ts +86 -0
- package/dist/plugin/memory-id-translation.d.ts.map +1 -1
- package/dist/plugin/messages-transform.d.ts.map +1 -1
- package/dist/plugin/rpc-handlers.d.ts +10 -0
- package/dist/plugin/rpc-handlers.d.ts.map +1 -1
- package/dist/plugin/rust-note-backend.d.ts +84 -0
- package/dist/plugin/rust-note-backend.d.ts.map +1 -0
- package/dist/plugin/tool-registry.d.ts +1 -0
- package/dist/plugin/tool-registry.d.ts.map +1 -1
- package/dist/read-session-chunk-z7fv0qjv.js +62 -0
- package/dist/recomp-orchestrator-r00aa5t3.js +21 -0
- package/dist/safe-notification-target-vrkjrbgb.js +10 -0
- package/dist/{send-session-notification-jbxknvar.js → send-session-notification-3warjyjp.js} +7 -3
- package/dist/shared/assistant-message-extractor.d.ts +6 -0
- package/dist/shared/assistant-message-extractor.d.ts.map +1 -1
- package/dist/shared/conflict-detector.d.ts +9 -4
- package/dist/shared/conflict-detector.d.ts.map +1 -1
- package/dist/shared/data-path.d.ts.map +1 -1
- package/dist/shared/hidden-variant-warnings.d.ts +5 -0
- package/dist/shared/hidden-variant-warnings.d.ts.map +1 -0
- package/dist/shared/host-limitations.d.ts +14 -0
- package/dist/shared/host-limitations.d.ts.map +1 -0
- package/dist/shared/keep-subagents.d.ts +1 -1
- package/dist/shared/keep-subagents.d.ts.map +1 -1
- package/dist/shared/model-suggestion-retry.d.ts.map +1 -1
- package/dist/shared/models-dev-cache.d.ts +1 -0
- package/dist/shared/models-dev-cache.d.ts.map +1 -1
- package/dist/shared/opencode-config-dir.d.ts +52 -0
- package/dist/shared/opencode-config-dir.d.ts.map +1 -1
- package/dist/shared/opencode-db-path.d.ts +15 -0
- package/dist/shared/opencode-db-path.d.ts.map +1 -1
- package/dist/shared/prompt-surface-runtime.d.ts +5 -5
- package/dist/shared/rpc-server.d.ts +10 -0
- package/dist/shared/rpc-server.d.ts.map +1 -1
- package/dist/shared/rpc-types.d.ts +64 -5
- package/dist/shared/rpc-types.d.ts.map +1 -1
- package/dist/shared/status-detail-text.d.ts +1 -3
- package/dist/shared/status-detail-text.d.ts.map +1 -1
- package/dist/shared/status-summary.d.ts +7 -0
- package/dist/shared/status-summary.d.ts.map +1 -1
- package/dist/shared/status-view.d.ts +229 -0
- package/dist/shared/status-view.d.ts.map +1 -0
- package/dist/shared/tag-transcript.d.ts.map +1 -1
- package/dist/shared/tail-hygiene-status.d.ts +8 -0
- package/dist/shared/tail-hygiene-status.d.ts.map +1 -1
- package/dist/shared/test-temp-dir.d.ts +1 -1
- package/dist/shared/test-temp-dir.d.ts.map +1 -1
- package/dist/shared/user-facing-codes.d.ts +32 -7
- package/dist/shared/user-facing-codes.d.ts.map +1 -1
- package/dist/shared/window-geometry.d.ts +3 -0
- package/dist/shared/window-geometry.d.ts.map +1 -1
- package/dist/{task-config-cv8k9y8r.js → task-config-mgf5nsh3.js} +1 -1
- 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/render.d.ts.map +1 -1
- package/dist/tools/ctx-expand/tools.d.ts.map +1 -1
- package/dist/tools/ctx-memory/constants.d.ts +3 -1
- package/dist/tools/ctx-memory/constants.d.ts.map +1 -1
- package/dist/tools/ctx-memory/tools.d.ts +1 -0
- package/dist/tools/ctx-memory/tools.d.ts.map +1 -1
- package/dist/tools/ctx-memory/types.d.ts +2 -2
- package/dist/tools/ctx-note/constants.d.ts +1 -1
- package/dist/tools/ctx-note/constants.d.ts.map +1 -1
- package/dist/tools/ctx-note/render.d.ts +88 -0
- package/dist/tools/ctx-note/render.d.ts.map +1 -0
- 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/ctx-search/date-range.d.ts +9 -0
- package/dist/tools/ctx-search/date-range.d.ts.map +1 -0
- package/dist/tools/ctx-search/tools.d.ts.map +1 -1
- package/dist/tools/ctx-search/types.d.ts +2 -0
- package/dist/tools/ctx-search/types.d.ts.map +1 -1
- package/dist/tools/light-descriptions.d.ts +5 -5
- package/dist/tools/light-descriptions.d.ts.map +1 -1
- package/dist/tools/parameter-descriptions.d.ts +75 -0
- package/dist/tools/parameter-descriptions.d.ts.map +1 -0
- package/dist/transformers-node-wasm.js +1918 -826
- package/dist/transformers-web.js +1736 -636
- package/dist/{transformers.node-dpmf3wpx.js → transformers.node-3zqr6k1w.js} +4087 -2898
- package/dist/tui/data/context-db.d.ts +19 -7
- package/dist/tui/data/context-db.d.ts.map +1 -1
- package/dist/tui-compiled/data/context-db.d.ts +19 -7
- package/dist/tui-compiled/data/context-db.d.ts.map +1 -1
- package/dist/v2/fold/host-media.d.ts +36 -0
- package/dist/v2/fold/host-media.d.ts.map +1 -0
- package/dist/v2/fold/restore.d.ts +21 -1
- package/dist/v2/fold/restore.d.ts.map +1 -1
- package/dist/v2/hidden-completion.d.ts +45 -1
- package/dist/v2/hidden-completion.d.ts.map +1 -1
- package/dist/v2/hooks/commands.d.ts +29 -0
- package/dist/v2/hooks/commands.d.ts.map +1 -0
- package/dist/v2/hooks/context.d.ts +46 -2
- package/dist/v2/hooks/context.d.ts.map +1 -1
- package/dist/v2/hooks/deleted-session-tombstones.d.ts +10 -0
- package/dist/v2/hooks/deleted-session-tombstones.d.ts.map +1 -0
- package/dist/v2/hooks/dream-manual.d.ts +43 -0
- package/dist/v2/hooks/dream-manual.d.ts.map +1 -0
- package/dist/v2/hooks/dream-trigger.d.ts +7 -0
- package/dist/v2/hooks/dream-trigger.d.ts.map +1 -1
- package/dist/v2/hooks/hidden-child.d.ts +7 -0
- package/dist/v2/hooks/hidden-child.d.ts.map +1 -1
- package/dist/v2/hooks/model-limit-cache.d.ts +19 -0
- package/dist/v2/hooks/model-limit-cache.d.ts.map +1 -0
- package/dist/v2/hooks/payload.d.ts.map +1 -1
- package/dist/v2/hooks/provider-admission.d.ts +22 -0
- package/dist/v2/hooks/provider-admission.d.ts.map +1 -0
- package/dist/v2/hooks/rpc-live-state.d.ts +9 -0
- package/dist/v2/hooks/rpc-live-state.d.ts.map +1 -0
- package/dist/v2/hooks/store.d.ts +38 -2
- package/dist/v2/hooks/store.d.ts.map +1 -1
- package/dist/v2/hooks/tools.d.ts +8 -0
- package/dist/v2/hooks/tools.d.ts.map +1 -0
- package/dist/v2/hooks/types.d.ts +59 -0
- package/dist/v2/hooks/types.d.ts.map +1 -1
- package/dist/v2/hooks/usage-reading.d.ts +42 -0
- package/dist/v2/hooks/usage-reading.d.ts.map +1 -0
- package/dist/v2/host-service.d.ts +65 -0
- package/dist/v2/host-service.d.ts.map +1 -0
- package/dist/v2/server.js +142236 -112052
- package/dist/v2/store-reader.d.ts +67 -1
- package/dist/v2/store-reader.d.ts.map +1 -1
- package/dist/v2/tui/events.d.ts +7 -0
- package/dist/v2/tui/events.d.ts.map +1 -0
- package/dist/v2/tui/index.d.ts +23 -0
- package/dist/v2/tui/index.d.ts.map +1 -1
- package/dist/v2/tui/sidebar-mount.d.ts +40 -0
- package/dist/v2/tui/sidebar-mount.d.ts.map +1 -0
- package/dist/v2/tui/status-dialog-mount.d.ts +29 -0
- package/dist/v2/tui/status-dialog-mount.d.ts.map +1 -0
- package/dist/v2/tui/types.d.ts +74 -6
- package/dist/v2/tui/types.d.ts.map +1 -1
- package/dist/wrapup-orchestrator-y0bs7t5a.js +18 -0
- package/package.json +9 -7
- package/src/agents/dreamer.ts +7 -16
- package/src/agents/hidden-agent-registrations.ts +10 -22
- package/src/agents/magic-context-prompt.test.ts +29 -39
- package/src/agents/magic-context-prompt.ts +99 -122
- package/src/agents/permissions.test.ts +17 -21
- package/src/config/index.ts +8 -3
- package/src/config/live-run-config.test.ts +237 -0
- package/src/config/live-run-config.ts +80 -0
- package/src/config/live-schema-drift.test.ts +67 -0
- package/src/config/live-snapshot.test.ts +85 -0
- package/src/config/live-snapshot.ts +191 -0
- package/src/config/raw-loader.test.ts +1 -0
- package/src/config/schema/magic-context.test.ts +13 -5
- package/src/config/schema/magic-context.ts +101 -10
- package/src/features/magic-context/dreamer/task-registry.ts +137 -13
- package/src/shared/assistant-message-extractor.test.ts +21 -0
- package/src/shared/assistant-message-extractor.ts +43 -8
- package/src/shared/child-session-teardown.test.ts +38 -3
- package/src/shared/child-session-teardown.ts +3 -3
- package/src/shared/conflict-detector.test.ts +224 -7
- package/src/shared/conflict-detector.ts +161 -89
- package/src/shared/data-path.ts +6 -6
- package/src/shared/hidden-variant-warnings.ts +21 -0
- package/src/shared/host-limitations.ts +43 -0
- package/src/shared/keep-subagents.ts +6 -6
- package/src/shared/model-suggestion-retry.test.ts +86 -0
- package/src/shared/model-suggestion-retry.ts +29 -0
- package/src/shared/models-dev-cache.ts +5 -0
- package/src/shared/opencode-config-dir.ts +80 -7
- package/src/shared/opencode-db-path.test.ts +78 -0
- package/src/shared/opencode-db-path.ts +49 -2
- package/src/shared/opencode-host-generation.test.ts +29 -0
- package/src/shared/prompt-surface-a1-golden.md +142 -211
- package/src/shared/rpc-server.ts +18 -0
- package/src/shared/rpc-types.ts +63 -4
- package/src/shared/status-detail-text.test.ts +52 -18
- package/src/shared/status-detail-text.ts +1 -90
- package/src/shared/status-summary.ts +37 -2
- package/src/shared/status-view.test.ts +441 -0
- package/src/shared/status-view.ts +707 -0
- package/src/shared/tag-transcript.ts +115 -16
- package/src/shared/tail-hygiene-status.ts +9 -1
- package/src/shared/test-temp-dir.ts +3 -0
- package/src/shared/user-facing-codes.test.ts +3 -4
- package/src/shared/user-facing-codes.ts +33 -8
- package/src/shared/window-geometry.test.ts +23 -5
- package/src/shared/window-geometry.ts +13 -3
- package/src/tui/data/context-db.ts +50 -15
- package/src/tui/dialogs/status-dialog-colors.test.ts +58 -0
- package/src/tui/dialogs/status-dialog.tsx +288 -0
- package/src/tui/index.tsx +7 -464
- package/src/tui/slots/sidebar-content.tsx +21 -5
- package/src/tui-compiled/data/context-db.ts +50 -15
- package/src/tui-compiled/dialogs/status-dialog.tsx +552 -0
- package/src/tui-compiled/index.tsx +43 -1025
- package/src/tui-compiled/slots/sidebar-content.tsx +173 -152
- package/src/v2/tui/__fixtures__/ga-host-theme.json +160 -0
- package/src/v2/tui/events.ts +23 -0
- package/src/v2/tui/host-contract.test.ts +57 -8
- package/src/v2/tui/index.ts +315 -59
- package/src/v2/tui/load-compiled-sidebar.d.mts +59 -0
- package/src/v2/tui/load-compiled-sidebar.mjs +24 -0
- package/src/v2/tui/load-compiled-status-dialog.d.mts +17 -0
- package/src/v2/tui/load-compiled-status-dialog.mjs +16 -0
- package/src/v2/tui/sidebar-fallback.test.ts +100 -0
- package/src/v2/tui/sidebar-mount.ts +164 -0
- package/src/v2/tui/sidebar-text.test.ts +70 -0
- package/src/v2/tui/status-dialog-fallback.test.ts +97 -0
- package/src/v2/tui/status-dialog-mount.ts +76 -0
- package/src/v2/tui/theme-mapping.test.ts +57 -0
- package/src/v2/tui/types.ts +69 -4
- package/tui.js +1 -0
- package/dist/features/magic-context/memory/memory-migration.d.ts +0 -129
- package/dist/features/magic-context/memory/memory-migration.d.ts.map +0 -1
- package/dist/hooks/magic-context/upgrade-reminder.d.ts +0 -76
- package/dist/hooks/magic-context/upgrade-reminder.d.ts.map +0 -1
- package/dist/index-4wwr6cz0.js +0 -112
- package/dist/index-avwt563y.js +0 -62
- package/dist/index-znraa0kv.js +0 -637
- package/dist/recomp-orchestrator-0xx1364v.js +0 -19
- package/dist/storage-meta-session-z818pn1e.js +0 -20
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import"./index-6z9g64js.js";
|
|
2
|
+
import"./index-wgzyeyf5.js";
|
|
3
|
+
import {
|
|
4
|
+
logSlowWriteTransaction
|
|
5
|
+
} from "./index-9r1cbh9e.js";
|
|
6
|
+
|
|
7
|
+
// src/features/magic-context/message-time-backfill.ts
|
|
8
|
+
var MESSAGE_TIME_BACKFILL_BATCH_SIZE = 500;
|
|
9
|
+
var BACKFILL_STATE_ID = 1;
|
|
10
|
+
var activeBackfills = new WeakMap;
|
|
11
|
+
function normalizedMessageTime(value) {
|
|
12
|
+
return typeof value === "number" && Number.isSafeInteger(value) && value >= 0 ? value : null;
|
|
13
|
+
}
|
|
14
|
+
function getBackfillState(db) {
|
|
15
|
+
const row = db.prepare(`SELECT cursor_session_id AS cursorSessionId,
|
|
16
|
+
cursor_ordinal AS cursorOrdinal,
|
|
17
|
+
completed
|
|
18
|
+
FROM message_time_backfill_state
|
|
19
|
+
WHERE id = ?`).get(BACKFILL_STATE_ID);
|
|
20
|
+
return {
|
|
21
|
+
processed: 0,
|
|
22
|
+
cursorSessionId: typeof row?.cursorSessionId === "string" ? row.cursorSessionId : "",
|
|
23
|
+
cursorOrdinal: typeof row?.cursorOrdinal === "number" && Number.isSafeInteger(row.cursorOrdinal) ? row.cursorOrdinal : 0,
|
|
24
|
+
completed: row?.completed === 1
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
function readMessageTimes(reader, rows) {
|
|
28
|
+
const times = new Map;
|
|
29
|
+
const bySession = new Map;
|
|
30
|
+
for (const row of rows) {
|
|
31
|
+
const list = bySession.get(row.sessionId) ?? [];
|
|
32
|
+
list.push(row);
|
|
33
|
+
bySession.set(row.sessionId, list);
|
|
34
|
+
}
|
|
35
|
+
for (const [sessionId, sessionRows] of bySession) {
|
|
36
|
+
const ordinals = sessionRows.map((row) => Number(row.messageOrdinal));
|
|
37
|
+
const firstOrdinal = Math.min(...ordinals);
|
|
38
|
+
const lastOrdinal = Math.max(...ordinals);
|
|
39
|
+
const messages = reader.readPage ? reader.readPage(sessionId, Math.max(0, firstOrdinal - 1), Math.max(1, lastOrdinal - firstOrdinal + 1), lastOrdinal) : reader(sessionId).filter((message) => message.ordinal >= firstOrdinal && message.ordinal <= lastOrdinal);
|
|
40
|
+
const wantedIds = new Set(sessionRows.map((row) => row.messageId));
|
|
41
|
+
for (const message of messages) {
|
|
42
|
+
const time = normalizedMessageTime(message.createdAt);
|
|
43
|
+
if (time !== null && wantedIds.has(message.id))
|
|
44
|
+
times.set(message.id, time);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return times;
|
|
48
|
+
}
|
|
49
|
+
function backfillMessageTimesBatch(db, reader, batchSize = MESSAGE_TIME_BACKFILL_BATCH_SIZE) {
|
|
50
|
+
const state = getBackfillState(db);
|
|
51
|
+
if (state.completed)
|
|
52
|
+
return state;
|
|
53
|
+
const boundedBatchSize = Math.max(1, Math.floor(batchSize));
|
|
54
|
+
const rows = db.prepare(`SELECT map.session_id AS sessionId,
|
|
55
|
+
map.message_ordinal AS messageOrdinal,
|
|
56
|
+
fts.message_id AS messageId
|
|
57
|
+
FROM message_fts_rowid_map AS map
|
|
58
|
+
JOIN message_history_fts AS fts ON fts.rowid = map.fts_rowid
|
|
59
|
+
WHERE map.message_time_ms IS NULL
|
|
60
|
+
AND (map.session_id > ?
|
|
61
|
+
OR (map.session_id = ? AND map.message_ordinal > ?))
|
|
62
|
+
ORDER BY map.session_id ASC, map.message_ordinal ASC
|
|
63
|
+
LIMIT ?`).all(state.cursorSessionId, state.cursorSessionId, state.cursorOrdinal, boundedBatchSize);
|
|
64
|
+
const times = readMessageTimes(reader, rows);
|
|
65
|
+
const last = rows.at(-1);
|
|
66
|
+
const completed = rows.length < boundedBatchSize;
|
|
67
|
+
const cursorSessionId = last?.sessionId ?? state.cursorSessionId;
|
|
68
|
+
const cursorOrdinal = last ? Number(last.messageOrdinal) : state.cursorOrdinal;
|
|
69
|
+
const transactionStartedAt = performance.now();
|
|
70
|
+
db.transaction(() => {
|
|
71
|
+
const update = db.prepare(`UPDATE message_fts_rowid_map
|
|
72
|
+
SET message_time_ms = ?
|
|
73
|
+
WHERE session_id = ? AND message_ordinal = ? AND message_time_ms IS NULL`);
|
|
74
|
+
for (const row of rows) {
|
|
75
|
+
const time = times.get(row.messageId);
|
|
76
|
+
if (time !== undefined)
|
|
77
|
+
update.run(time, row.sessionId, Number(row.messageOrdinal));
|
|
78
|
+
}
|
|
79
|
+
db.prepare(`UPDATE message_time_backfill_state
|
|
80
|
+
SET cursor_session_id = ?, cursor_ordinal = ?, completed = ?, updated_at = ?
|
|
81
|
+
WHERE id = ?`).run(cursorSessionId, cursorOrdinal, completed ? 1 : 0, Date.now(), BACKFILL_STATE_ID);
|
|
82
|
+
})();
|
|
83
|
+
logSlowWriteTransaction("message_time_backfill", transactionStartedAt);
|
|
84
|
+
return {
|
|
85
|
+
processed: rows.length,
|
|
86
|
+
cursorSessionId,
|
|
87
|
+
cursorOrdinal,
|
|
88
|
+
completed
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
async function runMessageTimeBackfill(db, reader) {
|
|
92
|
+
for (;; ) {
|
|
93
|
+
const progress = backfillMessageTimesBatch(db, reader);
|
|
94
|
+
if (progress.completed)
|
|
95
|
+
return;
|
|
96
|
+
await new Promise((resolve) => setTimeout(resolve, 0));
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
function startMessageTimeBackfill(db, reader) {
|
|
100
|
+
const active = activeBackfills.get(db);
|
|
101
|
+
if (active)
|
|
102
|
+
return active;
|
|
103
|
+
const run = runMessageTimeBackfill(db, reader).finally(() => activeBackfills.delete(db));
|
|
104
|
+
activeBackfills.set(db, run);
|
|
105
|
+
return run;
|
|
106
|
+
}
|
|
107
|
+
export {
|
|
108
|
+
startMessageTimeBackfill
|
|
109
|
+
};
|
|
@@ -19,6 +19,7 @@ interface ProjectRegistration {
|
|
|
19
19
|
harness: ModelHarness;
|
|
20
20
|
client: PluginContext["client"];
|
|
21
21
|
dreamerConfig?: DreamerConfig;
|
|
22
|
+
sampleDreamRun?: () => Partial<Pick<ProjectRegistration, "dreamerConfig" | "mural" | "historianChildSweep" | "gitCommitIndexing">>;
|
|
22
23
|
language?: string;
|
|
23
24
|
gitCommitIndexing?: {
|
|
24
25
|
enabled: boolean;
|
|
@@ -88,6 +89,18 @@ interface ProjectRegistration {
|
|
|
88
89
|
* itself stops only when the last project unregisters.
|
|
89
90
|
*/
|
|
90
91
|
export declare function startDreamScheduleTimer(args: ProjectRegistration): Promise<(() => void) | undefined>;
|
|
92
|
+
/**
|
|
93
|
+
* The stages one tick runs, reached through this object so a test can replace a
|
|
94
|
+
* stage with a throwing one and prove that its failure stays local.
|
|
95
|
+
*/
|
|
96
|
+
declare const tickStages: {
|
|
97
|
+
runMessageHistoryMaintenance: typeof runMessageHistoryMaintenance;
|
|
98
|
+
runProjectMaintenance: typeof runProjectMaintenance;
|
|
99
|
+
};
|
|
100
|
+
/** Swap tick stages for a test; the returned function puts the real ones back. */
|
|
101
|
+
export declare function _setDreamTimerStagesForTests(overrides: Partial<typeof tickStages>): () => void;
|
|
102
|
+
declare function runMessageHistoryMaintenance(db: Database): Promise<void>;
|
|
103
|
+
declare function runProjectMaintenance(reg: ProjectRegistration, origin: "startup" | "interval", db: Database): Promise<void>;
|
|
91
104
|
export declare function _resetDreamTimerForTests(): void;
|
|
92
105
|
export {};
|
|
93
106
|
//# sourceMappingURL=dream-timer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dream-timer.d.ts","sourceRoot":"","sources":["../../src/plugin/dream-timer.ts"],"names":[],"mappings":"AAEA,OA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AAC;YACrB,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC;SAChC,KAAK,OAAO,CAAC;YAAE,SAAS,EAAE;gBAAE,KAAK,CAAC,EAAE,MAAM,CAAC;gBAAC,UAAU,CAAC,EAAE,MAAM,CAAA;aAAE,GAAG,IAAI,CAAA;SAAE,CAAC,CAAC;KAChF,CAAC;IACF,0BAA0B,CAAC,EAAE;QACzB,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;QACrE,YAAY,CAAC,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;KAC1C,CAAC;CACL;AAmED;;;;;;;;;;GAUG;AACH,wBAAsB,uBAAuB,CACzC,IAAI,EAAE,mBAAmB,GAC1B,OAAO,CAAC,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC,CAwEnC;AAED;;;GAGG;AACH,QAAA,MAAM,UAAU;;;CAGf,CAAC;AAEF,kFAAkF;AAClF,wBAAgB,4BAA4B,CAAC,SAAS,EAAE,OAAO,CAAC,OAAO,UAAU,CAAC,GAAG,MAAM,IAAI,CAM9F;AA2ED,iBAAe,4BAA4B,CAAC,EAAE,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAmCvE;AA0BD,iBAAe,qBAAqB,CAChC,GAAG,EAAE,mBAAmB,EACxB,MAAM,EAAE,SAAS,GAAG,UAAU,EAC9B,EAAE,EAAE,QAAQ,GACb,OAAO,CAAC,IAAI,CAAC,CAsBf;AA4KD,wBAAgB,wBAAwB,IAAI,IAAI,CAiB/C"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { MagicContextPluginConfig } from "../../config";
|
|
2
|
+
import type { LiveConfigReader } from "../../config/live-snapshot";
|
|
2
3
|
import type { DatabaseBootTimings } from "../../features/magic-context/storage-db";
|
|
3
4
|
import type { LiveSessionState } from "../../hooks/magic-context/live-session-state";
|
|
4
5
|
import type { RustModeModuleClient } from "../../hooks/magic-context/rust-mode-transform";
|
|
@@ -118,6 +119,7 @@ export declare function buildMagicContextHookConfig(pluginConfig: MagicContextPl
|
|
|
118
119
|
export declare function createSessionHooks(args: {
|
|
119
120
|
ctx: PluginContext;
|
|
120
121
|
pluginConfig: MagicContextPluginConfig;
|
|
122
|
+
liveConfigReader?: LiveConfigReader<MagicContextPluginConfig>;
|
|
121
123
|
liveSessionState: LiveSessionState;
|
|
122
124
|
rustModeModuleClient?: RustModeModuleClient;
|
|
123
125
|
promptSurfaceRuntime?: PromptSurfaceRuntime;
|
|
@@ -169,7 +171,7 @@ export declare function createSessionHooks(args: {
|
|
|
169
171
|
};
|
|
170
172
|
}) => Promise<void>;
|
|
171
173
|
"command.execute.before": (input: unknown, output: unknown) => Promise<unknown>;
|
|
172
|
-
"tool.execute.before": (
|
|
174
|
+
"tool.execute.before": (input: unknown, output: unknown) => Promise<void>;
|
|
173
175
|
"tool.execute.after": (input: unknown, output?: unknown) => Promise<void>;
|
|
174
176
|
} & {
|
|
175
177
|
rustToolBackends?: import("../rust-tool-backends").RustToolBackends;
|
|
@@ -183,6 +185,7 @@ export declare function createSessionHooks(args: {
|
|
|
183
185
|
export declare function createSessionHooksAsync(args: {
|
|
184
186
|
ctx: PluginContext;
|
|
185
187
|
pluginConfig: MagicContextPluginConfig;
|
|
188
|
+
liveConfigReader?: LiveConfigReader<MagicContextPluginConfig>;
|
|
186
189
|
liveSessionState: LiveSessionState;
|
|
187
190
|
rustModeModuleClient?: RustModeModuleClient;
|
|
188
191
|
promptSurfaceRuntime?: PromptSurfaceRuntime;
|
|
@@ -235,7 +238,7 @@ export declare function createSessionHooksAsync(args: {
|
|
|
235
238
|
};
|
|
236
239
|
}) => Promise<void>;
|
|
237
240
|
"command.execute.before": (input: unknown, output: unknown) => Promise<unknown>;
|
|
238
|
-
"tool.execute.before": (
|
|
241
|
+
"tool.execute.before": (input: unknown, output: unknown) => Promise<void>;
|
|
239
242
|
"tool.execute.after": (input: unknown, output?: unknown) => Promise<void>;
|
|
240
243
|
} & {
|
|
241
244
|
rustToolBackends?: import("../rust-tool-backends").RustToolBackends;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-session-hooks.d.ts","sourceRoot":"","sources":["../../../src/plugin/hooks/create-session-hooks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"create-session-hooks.d.ts","sourceRoot":"","sources":["../../../src/plugin/hooks/create-session-hooks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AAE7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAKnE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAGnF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AACrF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+CAA+C,CAAC;AAC1F,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAChF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAAC,YAAY,EAAE,wBAAwB;;;;;;;;;;;;;mBAQxD,CAAC;aACb,CAAC;aACE,CAAC;eACI,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;2BAoHo5gC,CAAC;;;;eAA6iB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA3Gz9hC;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE;IACrC,GAAG,EAAE,aAAa,CAAC;IACnB,YAAY,EAAE,wBAAwB,CAAC;IACvC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC,wBAAwB,CAAC,CAAC;IAC9D,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAC5C,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;CAC/C;;;;;;;;;;qBAkG2jF,CAAC;iBAA2B,CAAC;0BAAc,CAAC;uBAAiB,CAAC;;;;;;;;;;;;;qBAA3gC,CAAC;mBAA6B,CAAC;iBAA2B,CAAC;iBAA2B,CAAC;0BAAc,CAAC;uBAAiB,CAAC;;;iBAA2D,CAAC;;oBAA4D,CAAC;uBAAiC,CAAC;yBAAoC,CAAC;;;;;;0BAAyk6D,CAAC;;;;;;;;;;;;;;EAvDh/9D;AAED,wBAAsB,uBAAuB,CAAC,IAAI,EAAE;IAChD,GAAG,EAAE,aAAa,CAAC;IACnB,YAAY,EAAE,wBAAwB,CAAC;IACvC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC,wBAAwB,CAAC,CAAC;IAC9D,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAC5C,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAC5C,oBAAoB,CAAC,EAAE,CAAC,OAAO,EAAE,mBAAmB,KAAK,IAAI,CAAC;CACjE;;;;;;;;;;qBA6C2jF,CAAC;iBAA2B,CAAC;0BAAc,CAAC;uBAAiB,CAAC;;;;;;;;;;;;;qBAA3gC,CAAC;mBAA6B,CAAC;iBAA2B,CAAC;iBAA2B,CAAC;0BAAc,CAAC;uBAAiB,CAAC;;;iBAA2D,CAAC;;oBAA4D,CAAC;uBAAiC,CAAC;yBAAoC,CAAC;;;;;;0BAAyk6D,CAAC;;;;;;;;;;;;;;GADh/9D"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { type Memory } from "../features/magic-context/memory";
|
|
2
|
+
import { type MemoryVisibilityPolicy } from "../features/magic-context/memory/memory-visibility";
|
|
1
3
|
import type { Database } from "../shared/sqlite";
|
|
2
4
|
export interface ModuleMemoryOperation {
|
|
3
5
|
action: string;
|
|
@@ -7,6 +9,90 @@ export interface ModuleMemoryOperation {
|
|
|
7
9
|
category?: string;
|
|
8
10
|
}
|
|
9
11
|
export declare function unmappedMemoryIdMessage(id: number): string;
|
|
12
|
+
/**
|
|
13
|
+
* How one id from <project-memory> can be reached while the module holds
|
|
14
|
+
* memory authority.
|
|
15
|
+
*
|
|
16
|
+
* The module mirrors only the authority project's own rows, but the rendered
|
|
17
|
+
* block also carries workspace-shared memories owned by OTHER projects. Those
|
|
18
|
+
* ids are real host rows with no module counterpart, and they never gain one —
|
|
19
|
+
* so "no mapping" is three different situations needing three different reader
|
|
20
|
+
* actions, not one retry message.
|
|
21
|
+
*/
|
|
22
|
+
export type RustMemoryIdRoute =
|
|
23
|
+
/** Mirrored row of this project: the module can address it. */
|
|
24
|
+
{
|
|
25
|
+
kind: "module";
|
|
26
|
+
hostId: number;
|
|
27
|
+
moduleId: number;
|
|
28
|
+
}
|
|
29
|
+
/** Another project's memory, shared with this workspace: readable, never writable here. */
|
|
30
|
+
| {
|
|
31
|
+
kind: "host";
|
|
32
|
+
hostId: number;
|
|
33
|
+
}
|
|
34
|
+
/** This project's own row whose mirror mapping has not arrived yet: retrying helps. */
|
|
35
|
+
| {
|
|
36
|
+
kind: "pending";
|
|
37
|
+
hostId: number;
|
|
38
|
+
}
|
|
39
|
+
/** No row, or one this project may not see. One text for both, so neither can be probed for. */
|
|
40
|
+
| {
|
|
41
|
+
kind: "unknown";
|
|
42
|
+
hostId: number;
|
|
43
|
+
};
|
|
44
|
+
/** Transient: the row is this project's and its mapping is still in flight. */
|
|
45
|
+
export declare function pendingMemoryIdLine(id: number): string;
|
|
46
|
+
/** Permanent: a workspace-shared row owned elsewhere. Retrying can never change it. */
|
|
47
|
+
export declare function foreignMemoryIdLine(id: number): string;
|
|
48
|
+
/** Shared by "no such row" and "not visible from here". */
|
|
49
|
+
export declare function unknownMemoryIdLine(id: number): string;
|
|
50
|
+
export declare function memoryIdRouteLine(route: RustMemoryIdRoute): string;
|
|
51
|
+
export interface RustMemoryIdRouting {
|
|
52
|
+
routes: RustMemoryIdRoute[];
|
|
53
|
+
/** Host rows behind every `host` route, so the caller can render them. */
|
|
54
|
+
hostReadable: Map<number, Memory>;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Classify each requested host id for the Rust-backed ctx_memory facade.
|
|
58
|
+
*
|
|
59
|
+
* A mirror mapping only counts when it belongs to THIS project's module: one
|
|
60
|
+
* context store can hold two projects under module authority, and routing a
|
|
61
|
+
* neighbouring project's mapped row into this project's module call would
|
|
62
|
+
* address the wrong store.
|
|
63
|
+
*/
|
|
64
|
+
export declare function routeHostMemoryIds(args: {
|
|
65
|
+
db: Database;
|
|
66
|
+
projectIdentity: string;
|
|
67
|
+
hostIds: readonly number[];
|
|
68
|
+
visibility?: MemoryVisibilityPolicy;
|
|
69
|
+
}): RustMemoryIdRouting;
|
|
70
|
+
export interface RustMemoryRoutingPlan {
|
|
71
|
+
/** Host ids the module call should carry, in request order. */
|
|
72
|
+
moduleHostIds: number[];
|
|
73
|
+
/** Host ids to serve from the host read model instead of the module. */
|
|
74
|
+
hostReadIds: number[];
|
|
75
|
+
/** One line per id the module cannot address, in request order. */
|
|
76
|
+
unaddressableLines: string[];
|
|
77
|
+
/** True when the module must not be called at all and the reply is built locally. */
|
|
78
|
+
skipModuleCall: boolean;
|
|
79
|
+
/** Set when the whole call is refused without touching the module. */
|
|
80
|
+
refusal: string | null;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Decide what the module is asked to do once the ids are classified.
|
|
84
|
+
*
|
|
85
|
+
* Reads serve every id they can and report the rest per id, so one shared
|
|
86
|
+
* memory in a batch no longer costs the caller the ids that did resolve.
|
|
87
|
+
* Mutations never reach for the host row: the module owns those rows while it
|
|
88
|
+
* holds authority, and a host-side write behind its back would be overwritten
|
|
89
|
+
* by the next mirror page. `merge` is all-or-nothing because a partial merge
|
|
90
|
+
* would silently drop a source the caller asked to consolidate.
|
|
91
|
+
*/
|
|
92
|
+
export declare function planRustMemoryRouting(args: {
|
|
93
|
+
action: string;
|
|
94
|
+
routes: readonly RustMemoryIdRoute[];
|
|
95
|
+
}): RustMemoryRoutingPlan;
|
|
10
96
|
export declare function translateHostMemoryIds(db: Database, hostIds: readonly number[]): {
|
|
11
97
|
moduleIds: number[];
|
|
12
98
|
} | {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory-id-translation.d.ts","sourceRoot":"","sources":["../../src/plugin/memory-id-translation.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEjD,MAAM,WAAW,qBAAqB;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,uBAAuB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED,wBAAgB,sBAAsB,CAClC,EAAE,EAAE,QAAQ,EACZ,OAAO,EAAE,SAAS,MAAM,EAAE,GAC3B;IAAE,SAAS,EAAE,MAAM,EAAE,CAAA;CAAE,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAQ7C;AAED,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,SAAI,GAAG,qBAAqB,GAAG,IAAI,CAkBhG;AAED,wBAAgB,kCAAkC,CAAC,IAAI,EAAE;IACrD,EAAE,EAAE,QAAQ,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;IAClB,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC9B,GAAG,MAAM,GAAG,IAAI,CAiChB"}
|
|
1
|
+
{"version":3,"file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a,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;IAClB,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC9B,GAAG,MAAM,GAAG,IAAI,CAiChB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages-transform.d.ts","sourceRoot":"","sources":["../../src/plugin/messages-transform.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,oBAAoB,EAI5B,MAAM,6CAA6C,CAAC;AAsBrD,eAAO,MAAM,gCAAgC,qIACoF,CAAC;AAElI,qBAAa,2BAA4B,SAAQ,KAAK;IAClD,QAAQ,CAAC,IAAI,8BAA8B;IAC3C,QAAQ,CAAC,WAAW,QAAQ;;CAM/B;AAED,KAAK,gBAAgB,GAAG;IACpB,IAAI,EAAE,OAAO,kBAAkB,EAAE,OAAO,CAAC;IACzC,KAAK,EAAE,OAAO,kBAAkB,EAAE,IAAI,EAAE,CAAC;CAC5C,CAAC;AAEF,KAAK,uBAAuB,GAAG;IAAE,QAAQ,EAAE,gBAAgB,EAAE,CAAA;CAAE,CAAC;AAEhE,KAAK,0BAA0B,GAAG;IAC9B,sCAAsC,CAAC,EAAE,CACrC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EAC5B,MAAM,EAAE,uBAAuB,KAC9B,OAAO,CAAC,IAAI,CAAC,CAAC;CACtB,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"messages-transform.d.ts","sourceRoot":"","sources":["../../src/plugin/messages-transform.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,oBAAoB,EAI5B,MAAM,6CAA6C,CAAC;AAsBrD,eAAO,MAAM,gCAAgC,qIACoF,CAAC;AAElI,qBAAa,2BAA4B,SAAQ,KAAK;IAClD,QAAQ,CAAC,IAAI,8BAA8B;IAC3C,QAAQ,CAAC,WAAW,QAAQ;;CAM/B;AAED,KAAK,gBAAgB,GAAG;IACpB,IAAI,EAAE,OAAO,kBAAkB,EAAE,OAAO,CAAC;IACzC,KAAK,EAAE,OAAO,kBAAkB,EAAE,IAAI,EAAE,CAAC;CAC5C,CAAC;AAEF,KAAK,uBAAuB,GAAG;IAAE,QAAQ,EAAE,gBAAgB,EAAE,CAAA;CAAE,CAAC;AAEhE,KAAK,0BAA0B,GAAG;IAC9B,sCAAsC,CAAC,EAAE,CACrC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EAC5B,MAAM,EAAE,uBAAuB,KAC9B,OAAO,CAAC,IAAI,CAAC,CAAC;CACtB,GAAG,IAAI,CAAC;AAiJT;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,wBAAgB,8BAA8B,CAAC,IAAI,EAAE;IACjD,YAAY,EAAE,0BAA0B,CAAC;IACzC;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,0BAA0B,CAAC;IACnD,UAAU,CAAC,EAAE,oBAAoB,GAAG,IAAI,CAAC;IACzC,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC;;;;;;;;OAQG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,qBAAqB,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACpC,gBAAgB,CAAC,EAAE,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACvD,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,uBAAuB,KAAK,OAAO,CAAC,gBAAgB,EAAE,CAAC,CA+MjG"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { MagicContextConfig } from "../config/schema/magic-context";
|
|
2
2
|
import { type ContextDatabase as Database } from "../features/magic-context/storage";
|
|
3
|
+
import type { HiddenCompletionExecutor } from "../hooks/magic-context/compartment-runner-types";
|
|
4
|
+
import type { RunnerRefusalCanonicalCause } from "../hooks/magic-context/historian-no-fire-cause";
|
|
3
5
|
import type { LiveSessionState } from "../hooks/magic-context/live-session-state";
|
|
4
6
|
import type { RustModeModuleClient } from "../hooks/magic-context/rust-mode-transform";
|
|
5
7
|
import type { MagicContextRpcServer } from "../shared/rpc-server";
|
|
@@ -43,6 +45,13 @@ export interface RustSessionStatus {
|
|
|
43
45
|
pending_m1_age_ms?: number | null;
|
|
44
46
|
wrapup_active?: boolean;
|
|
45
47
|
wrapup_rounds?: number | null;
|
|
48
|
+
historian?: {
|
|
49
|
+
last_outcome?: string;
|
|
50
|
+
last_failure?: string | null;
|
|
51
|
+
last_no_fire?: string | null;
|
|
52
|
+
refusal_stage?: "credential" | "provider" | "model" | "resolution" | null;
|
|
53
|
+
canonical_cause?: RunnerRefusalCanonicalCause | null;
|
|
54
|
+
};
|
|
46
55
|
}
|
|
47
56
|
/**
|
|
48
57
|
* Coalesce only overlapping reads. Reusing a completed response would let a burst of module
|
|
@@ -91,6 +100,7 @@ export declare function registerRpcHandlers(rpcServer: MagicContextRpcServer, ar
|
|
|
91
100
|
client: unknown;
|
|
92
101
|
liveSessionState: LiveSessionState;
|
|
93
102
|
rustModeModuleClient?: RustModeModuleClient;
|
|
103
|
+
hiddenCompletionExecutor?: HiddenCompletionExecutor;
|
|
94
104
|
storageDir?: string;
|
|
95
105
|
getDebugMemoryHolders?: () => RuntimeDebugMemoryHolders | undefined;
|
|
96
106
|
}): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpc-handlers.d.ts","sourceRoot":"","sources":["../../src/plugin/rpc-handlers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rpc-handlers.d.ts","sourceRoot":"","sources":["../../src/plugin/rpc-handlers.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAgCzE,OAAO,EACH,KAAK,eAAe,IAAI,QAAQ,EAGnC,MAAM,mCAAmC,CAAC;AAe3C,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,CAAC;YAClB,WAAW,EAAE,MAAM,CAAC;YACpB,cAAc,EAAE,MAAM,CAAC;SAC1B,CAAC,CAAC;KACN,CAAC;IACF,SAAS,CAAC,EAAE;QACR,SAAS,EAAE,MAAM,CAAC;QAClB,mBAAmB,EAAE,MAAM,CAAC;QAC5B,cAAc,EAAE,MAAM,CAAC;QACvB,QAAQ,EAAE,KAAK,CAAC;YACZ,SAAS,EAAE,MAAM,CAAC;YAClB,WAAW,EAAE,MAAM,CAAC;YACpB,YAAY,EAAE,MAAM,CAAC;YACrB,mBAAmB,EAAE,MAAM,CAAC;YAC5B,cAAc,EAAE,MAAM,CAAC;SAC1B,CAAC,CAAC;KACN,CAAC;CACL;AAiBD,wBAAgB,iBAAiB,CAC7B,MAAM,EAAE,IAAI,CAAC,kBAAkB,EAAE,WAAW,CAAC,EAC7C,GAAG,GAAE,MAAM,CAAC,UAAwB,GACrC,OAAO,CAET;AAED,wBAAgB,qBAAqB,CACjC,cAAc,GAAE,yBAA8B,GAC/C,wBAAwB,CA4E1B;AAiID;;GAEG;AACH,wBAAgB,mBAAmB,CAC/B,SAAS,EAAE,qBAAqB,EAChC,IAAI,EAAE;IACF,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,MAAM,EAAE,OAAO,CAAC;IAChB,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAC5C,wBAAwB,CAAC,EAAE,wBAAwB,CAAC;IACpD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qBAAqB,CAAC,EAAE,MAAM,yBAAyB,GAAG,SAAS,CAAC;CACvE,GACF,IAAI,CA6XN"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import type { Database } from "../shared/sqlite";
|
|
2
|
+
import type { RustNoteToolRequest } from "./rust-tool-backends";
|
|
3
|
+
/** The one module route the note backend needs: a ctx_note facade call. */
|
|
4
|
+
export interface RustNoteModuleCaller {
|
|
5
|
+
call(args: {
|
|
6
|
+
sessionId: string;
|
|
7
|
+
projectRoot: string;
|
|
8
|
+
method: "ctx_note";
|
|
9
|
+
body: {
|
|
10
|
+
name: "ctx_note";
|
|
11
|
+
arguments: Record<string, unknown>;
|
|
12
|
+
};
|
|
13
|
+
}): Promise<unknown>;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The module renders a note it created before the host mirror assigned it an id
|
|
17
|
+
* with this placeholder (crates/mc-module `NOTE_ID_PENDING`).
|
|
18
|
+
*/
|
|
19
|
+
export declare const NOTE_ID_PENDING = "(id pending)";
|
|
20
|
+
/** Appended to a write reply whose host id is still unknown after the mirror pull. */
|
|
21
|
+
export declare const NOTE_WRITE_ID_PENDING_ADVICE = " Its id appears in ctx_note(action=\"read\") once the mirror catches up.";
|
|
22
|
+
/** The module row id a legacy ctx_note write reply names ("Saved session note #N", "Created smart note #N"). */
|
|
23
|
+
export declare function moduleNoteRowId(response: unknown, depth?: number): number | null;
|
|
24
|
+
export declare function moduleNoteResponseIsError(response: unknown, depth?: number): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* How one agent-typed note id reaches the module while it holds note authority.
|
|
27
|
+
*
|
|
28
|
+
* The agent is shown context.db (host) ids by the deferred-notes reminder and by
|
|
29
|
+
* every ctx_note reply, but the module stores its own row ids. The two key
|
|
30
|
+
* spaces overlap, so an id is only ever sent to the module through a mirror
|
|
31
|
+
* identity of THIS project; a raw host id reinterpreted as a module id can name
|
|
32
|
+
* an unrelated note, including one in the same project.
|
|
33
|
+
*/
|
|
34
|
+
export type NoteIdRoute =
|
|
35
|
+
/** Mirrored row of this project: the module can address it. */
|
|
36
|
+
{
|
|
37
|
+
kind: "module";
|
|
38
|
+
hostId: number;
|
|
39
|
+
moduleId: number;
|
|
40
|
+
}
|
|
41
|
+
/** The caller's own note whose mirror identity has not arrived yet: retrying helps. */
|
|
42
|
+
| {
|
|
43
|
+
kind: "pending";
|
|
44
|
+
hostId: number;
|
|
45
|
+
}
|
|
46
|
+
/** No row, or one the caller may not see. One outcome for both, so neither can be probed. */
|
|
47
|
+
| {
|
|
48
|
+
kind: "unknown";
|
|
49
|
+
hostId: number;
|
|
50
|
+
};
|
|
51
|
+
export declare function routeHostNoteIds(args: {
|
|
52
|
+
db: Database;
|
|
53
|
+
projectIdentity: string;
|
|
54
|
+
sessionId: string;
|
|
55
|
+
hostIds: readonly number[];
|
|
56
|
+
}): NoteIdRoute[];
|
|
57
|
+
/**
|
|
58
|
+
* Which module row an authoring call changed, for mirroring its compile metadata
|
|
59
|
+
* onto the host copy.
|
|
60
|
+
*
|
|
61
|
+
* A write learns the new row from the module's reply. An update changed the row
|
|
62
|
+
* whose id went on the wire to the module — never the id the agent typed, because
|
|
63
|
+
* the agent addresses notes by host ids, and those are not module row ids.
|
|
64
|
+
* Deriving the target from what the module was actually asked to change keeps
|
|
65
|
+
* the metadata on the note that was really updated.
|
|
66
|
+
*/
|
|
67
|
+
export declare function compiledNoteModuleRowId(args: {
|
|
68
|
+
action: RustNoteToolRequest["action"];
|
|
69
|
+
response: unknown;
|
|
70
|
+
moduleNoteIds: readonly number[] | undefined;
|
|
71
|
+
}): number | null;
|
|
72
|
+
/**
|
|
73
|
+
* The ctx_note backend used while the module holds notes authority: translate
|
|
74
|
+
* the agent's host ids at the boundary, forward the call to the module facade on
|
|
75
|
+
* its host id lane, refresh the host read model, and mirror compile metadata the
|
|
76
|
+
* module does not own.
|
|
77
|
+
*/
|
|
78
|
+
export declare function createRustNoteBackend(deps: {
|
|
79
|
+
db: Database;
|
|
80
|
+
module: RustNoteModuleCaller;
|
|
81
|
+
/** Pull pending note changefeed pages into context.db. */
|
|
82
|
+
syncNotes: () => Promise<void>;
|
|
83
|
+
}): (request: RustNoteToolRequest) => Promise<unknown>;
|
|
84
|
+
//# sourceMappingURL=rust-note-backend.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rust-note-backend.d.ts","sourceRoot":"","sources":["../../src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;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;CAC9B,GAAG,WAAW,EAAE,CAUhB;AA6BD;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE;IAC1C,MAAM,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IACtC,QAAQ,EAAE,OAAO,CAAC;IAClB,aAAa,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;CAChD,GAAG,MAAM,GAAG,IAAI,CAKhB;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE;IACxC,EAAE,EAAE,QAAQ,CAAC;IACb,MAAM,EAAE,oBAAoB,CAAC;IAC7B,0DAA0D;IAC1D,SAAS,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAClC,GAAG,CAAC,OAAO,EAAE,mBAAmB,KAAK,OAAO,CAAC,OAAO,CAAC,CAsGrD"}
|
|
@@ -18,5 +18,6 @@ export declare function createToolRegistry(args: {
|
|
|
18
18
|
rustToolBackends?: RustToolBackends;
|
|
19
19
|
promptSurfaceRuntime?: PromptSurfaceRuntime;
|
|
20
20
|
registrationPromptSurface?: PromptSurfaceConfig;
|
|
21
|
+
includeDreamerOnlyTools?: boolean;
|
|
21
22
|
}): Record<string, ToolDefinition>;
|
|
22
23
|
//# sourceMappingURL=tool-registry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-registry.d.ts","sourceRoot":"","sources":["../../src/plugin/tool-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAa1D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"tool-registry.d.ts","sourceRoot":"","sources":["../../src/plugin/tool-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAa1D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAe7E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAiB7C;;;;;;GAMG;AACH,wBAAgB,8BAA8B,IAAI,SAAS,MAAM,EAAE,CAElE;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE;IACrC,GAAG,EAAE,aAAa,CAAC;IACnB,YAAY,EAAE,wBAAwB,CAAC;IACvC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAC5C,yBAAyB,CAAC,EAAE,mBAAmB,CAAC;IAChD,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACrC,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CA0KjC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import {
|
|
2
|
+
hasMeaningfulUserText2,
|
|
3
|
+
extractTexts2,
|
|
4
|
+
resolveHostServedBoundaryId2,
|
|
5
|
+
hasRawMessageProvider2,
|
|
6
|
+
setRawMessageProvider2,
|
|
7
|
+
setBoundedRawMessageProvider2,
|
|
8
|
+
cleanUserText2,
|
|
9
|
+
withRawSessionMessageCache2,
|
|
10
|
+
readRawSessionMessages2,
|
|
11
|
+
readRawSessionMessagePage2,
|
|
12
|
+
getRawSessionMessageOrdinalCount2,
|
|
13
|
+
readRawSessionMessageRange2,
|
|
14
|
+
primeTailRawMessageCache2,
|
|
15
|
+
getCachedAbsoluteMessageCount2,
|
|
16
|
+
primeInMemoryTailRawMessageCache2,
|
|
17
|
+
readRawSessionMessageOrdinalPage2,
|
|
18
|
+
getRawSessionStoredMessageCount2,
|
|
19
|
+
readRawSessionMessageIdOrdinalsForRange2,
|
|
20
|
+
readRawSessionMessagePartsById2,
|
|
21
|
+
hasRawSessionMessageById2,
|
|
22
|
+
readRawSessionMessageOrdinalById2,
|
|
23
|
+
readRawSessionMessageById2,
|
|
24
|
+
getRawSessionMessageCount2,
|
|
25
|
+
getRawSessionTagKeysThrough2,
|
|
26
|
+
getLegacyProtectedTailStartOrdinal2,
|
|
27
|
+
readSessionChunk2,
|
|
28
|
+
readRawSessionSeedTail2
|
|
29
|
+
} from "./index-j7cnyvq1.js";
|
|
30
|
+
import"./index-y5145x8k.js";
|
|
31
|
+
import"./index-v8qr6tt2.js";
|
|
32
|
+
import"./index-wgzyeyf5.js";
|
|
33
|
+
import"./index-6z9g64js.js";
|
|
34
|
+
export {
|
|
35
|
+
cleanUserText2 as cleanUserText,
|
|
36
|
+
extractTexts2 as extractTexts,
|
|
37
|
+
getCachedAbsoluteMessageCount2 as getCachedAbsoluteMessageCount,
|
|
38
|
+
getLegacyProtectedTailStartOrdinal2 as getLegacyProtectedTailStartOrdinal,
|
|
39
|
+
getRawSessionMessageCount2 as getRawSessionMessageCount,
|
|
40
|
+
getRawSessionMessageOrdinalCount2 as getRawSessionMessageOrdinalCount,
|
|
41
|
+
getRawSessionStoredMessageCount2 as getRawSessionStoredMessageCount,
|
|
42
|
+
getRawSessionTagKeysThrough2 as getRawSessionTagKeysThrough,
|
|
43
|
+
hasMeaningfulUserText2 as hasMeaningfulUserText,
|
|
44
|
+
hasRawMessageProvider2 as hasRawMessageProvider,
|
|
45
|
+
hasRawSessionMessageById2 as hasRawSessionMessageById,
|
|
46
|
+
primeInMemoryTailRawMessageCache2 as primeInMemoryTailRawMessageCache,
|
|
47
|
+
primeTailRawMessageCache2 as primeTailRawMessageCache,
|
|
48
|
+
readRawSessionMessageById2 as readRawSessionMessageById,
|
|
49
|
+
readRawSessionMessageIdOrdinalsForRange2 as readRawSessionMessageIdOrdinalsForRange,
|
|
50
|
+
readRawSessionMessageOrdinalById2 as readRawSessionMessageOrdinalById,
|
|
51
|
+
readRawSessionMessageOrdinalPage2 as readRawSessionMessageOrdinalPage,
|
|
52
|
+
readRawSessionMessagePage2 as readRawSessionMessagePage,
|
|
53
|
+
readRawSessionMessagePartsById2 as readRawSessionMessagePartsById,
|
|
54
|
+
readRawSessionMessageRange2 as readRawSessionMessageRange,
|
|
55
|
+
readRawSessionMessages2 as readRawSessionMessages,
|
|
56
|
+
readRawSessionSeedTail2 as readRawSessionSeedTail,
|
|
57
|
+
readSessionChunk2 as readSessionChunk,
|
|
58
|
+
resolveHostServedBoundaryId2 as resolveHostServedBoundaryId,
|
|
59
|
+
setBoundedRawMessageProvider2 as setBoundedRawMessageProvider,
|
|
60
|
+
setRawMessageProvider2 as setRawMessageProvider,
|
|
61
|
+
withRawSessionMessageCache2 as withRawSessionMessageCache
|
|
62
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import {
|
|
2
|
+
setRecompStarting2,
|
|
3
|
+
setRecompTerminal2,
|
|
4
|
+
runManagedRecomp2
|
|
5
|
+
} from "./index-7wpwr2e2.js";
|
|
6
|
+
import"./index-sd3egckz.js";
|
|
7
|
+
import"./index-0ccmyzbj.js";
|
|
8
|
+
import"./index-yc81txp4.js";
|
|
9
|
+
import"./index-j7cnyvq1.js";
|
|
10
|
+
import"./index-y5145x8k.js";
|
|
11
|
+
import"./index-v8qr6tt2.js";
|
|
12
|
+
import"./index-9r1cbh9e.js";
|
|
13
|
+
import"./index-jdxxq8cz.js";
|
|
14
|
+
import"./index-febg06dy.js";
|
|
15
|
+
import"./index-wgzyeyf5.js";
|
|
16
|
+
import"./index-6z9g64js.js";
|
|
17
|
+
export {
|
|
18
|
+
runManagedRecomp2 as runManagedRecomp,
|
|
19
|
+
setRecompStarting2 as setRecompStarting,
|
|
20
|
+
setRecompTerminal2 as setRecompTerminal
|
|
21
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {
|
|
2
|
+
isDefaultSessionTitle2,
|
|
3
|
+
waitForSafeNotificationTarget2
|
|
4
|
+
} from "./index-febg06dy.js";
|
|
5
|
+
import"./index-wgzyeyf5.js";
|
|
6
|
+
import"./index-6z9g64js.js";
|
|
7
|
+
export {
|
|
8
|
+
isDefaultSessionTitle2 as isDefaultSessionTitle,
|
|
9
|
+
waitForSafeNotificationTarget2 as waitForSafeNotificationTarget
|
|
10
|
+
};
|
package/dist/{send-session-notification-jbxknvar.js → send-session-notification-3warjyjp.js}
RENAMED
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
setNotificationServerUrl2,
|
|
3
|
+
sendCommandResult2,
|
|
3
4
|
sendIgnoredMessage2,
|
|
4
5
|
flushIgnoredMessages2,
|
|
5
6
|
clearIgnoredMessages2,
|
|
6
7
|
observeIgnoredNotificationEvent2,
|
|
7
8
|
sendStatusNotification2
|
|
8
|
-
} from "./index-
|
|
9
|
-
import"./index-
|
|
10
|
-
import"./index-
|
|
9
|
+
} from "./index-yc81txp4.js";
|
|
10
|
+
import"./index-v8qr6tt2.js";
|
|
11
|
+
import"./index-febg06dy.js";
|
|
12
|
+
import"./index-wgzyeyf5.js";
|
|
13
|
+
import"./index-6z9g64js.js";
|
|
11
14
|
export {
|
|
12
15
|
clearIgnoredMessages2 as clearIgnoredMessages,
|
|
13
16
|
flushIgnoredMessages2 as flushIgnoredMessages,
|
|
14
17
|
observeIgnoredNotificationEvent2 as observeIgnoredNotificationEvent,
|
|
18
|
+
sendCommandResult2 as sendCommandResult,
|
|
15
19
|
sendIgnoredMessage2 as sendIgnoredMessage,
|
|
16
20
|
sendStatusNotification2 as sendStatusNotification,
|
|
17
21
|
setNotificationServerUrl2 as setNotificationServerUrl
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
export interface AssistantFailure {
|
|
2
|
+
error: unknown;
|
|
3
|
+
finish: string | null;
|
|
4
|
+
}
|
|
1
5
|
export declare function extractLatestAssistantText(messages: unknown): string | null;
|
|
6
|
+
/** Return an error persisted on the newest assistant row, including its settlement reason. */
|
|
7
|
+
export declare function extractLatestAssistantFailure(messages: unknown): AssistantFailure | null;
|
|
2
8
|
export declare function hasLengthCappedOutput(value: unknown): boolean;
|
|
3
9
|
//# sourceMappingURL=assistant-message-extractor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assistant-message-extractor.d.ts","sourceRoot":"","sources":["../../src/shared/assistant-message-extractor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"assistant-message-extractor.d.ts","sourceRoot":"","sources":["../../src/shared/assistant-message-extractor.ts"],"names":[],"mappings":"AAmBA,MAAM,WAAW,gBAAgB;IAC7B,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AA8DD,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAS3E;AAED,8FAA8F;AAC9F,wBAAgB,6BAA6B,CAAC,QAAQ,EAAE,OAAO,GAAG,gBAAgB,GAAG,IAAI,CAOxF;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAuB7D"}
|
|
@@ -116,12 +116,17 @@ export interface OpencodeConfigClientLike {
|
|
|
116
116
|
* `compaction` key, and reading that absence as `auto=true` disables the
|
|
117
117
|
* plugin — the one wrong direction, because a false disable leaves NOTHING
|
|
118
118
|
* managing the window and every long session overflows (issue #309, second
|
|
119
|
-
* arm). Only an explicit boolean from the host resolves
|
|
120
|
-
* else returns `null` so the caller falls back to the
|
|
121
|
-
* which reads the layers the user actually wrote.
|
|
119
|
+
* arm). Only an explicit `compaction.auto` boolean from the host resolves
|
|
120
|
+
* this arm; anything else returns `null` so the caller falls back to the
|
|
121
|
+
* file-based check, which reads the layers the user actually wrote.
|
|
122
|
+
*
|
|
123
|
+
* `compaction.prune` is read when present and treated as `false` when absent.
|
|
124
|
+
* OpenCode serves only the keys the user wrote, so requiring it here rejected
|
|
125
|
+
* the ordinary `{"compaction": {"auto": false}}` config and sent an
|
|
126
|
+
* answerable question to the file arm (issue #484).
|
|
122
127
|
*
|
|
123
128
|
* Returns `null` when the fetch fails, times out (bounded to `timeoutMs` so
|
|
124
|
-
* boot never hangs), or serves no explicit compaction
|
|
129
|
+
* boot never hangs), or serves no explicit `compaction.auto`.
|
|
125
130
|
*/
|
|
126
131
|
export declare function resolveCompactionForBoot(client: OpencodeConfigClientLike, timeoutMs?: number, hostGeneration?: OpenCodeHostGeneration): Promise<ResolvedCompaction | null>;
|
|
127
132
|
/**
|