@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,23 @@
|
|
|
1
|
+
declare const FILES: readonly ["ARCHITECTURE.md", "STRUCTURE.md"];
|
|
2
|
+
export declare function docsBaseHashes(projectDir: string): Record<string, string>;
|
|
3
|
+
export declare function listPendingDocsProposals(projectDir: string): string[];
|
|
4
|
+
export declare function hasCurrentDocsProposal(projectDir: string): boolean;
|
|
5
|
+
export declare function docsChangeSet(projectDir: string, storedAnchor?: string): {
|
|
6
|
+
head: string;
|
|
7
|
+
text: string;
|
|
8
|
+
} | null;
|
|
9
|
+
export interface DocsSectionChange {
|
|
10
|
+
file: (typeof FILES)[number];
|
|
11
|
+
action: "replace" | "add" | "remove";
|
|
12
|
+
heading: string;
|
|
13
|
+
text: string;
|
|
14
|
+
reason: string;
|
|
15
|
+
}
|
|
16
|
+
export declare function validateDocsProposal(projectDir: string, output: string, budget: number, expected: Record<string, string>): {
|
|
17
|
+
changes: DocsSectionChange[];
|
|
18
|
+
tokens: number;
|
|
19
|
+
diffs: string;
|
|
20
|
+
};
|
|
21
|
+
export declare function writeDocsProposal(projectDir: string, output: string, budget: number, expected: Record<string, string>, head: string): string;
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=docs-proposals.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docs-proposals.d.ts","sourceRoot":"","sources":["../../../../src/features/magic-context/dreamer/docs-proposals.ts"],"names":[],"mappings":"AAgBA,QAAA,MAAM,KAAK,8CAA+C,CAAC;AAK3D,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAWzE;AAED,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,CAQrE;AAED,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAOlE;AAWD,wBAAgB,aAAa,CACzB,UAAU,EAAE,MAAM,EAClB,YAAY,CAAC,EAAE,MAAM,GACtB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAiDvC;AAED,MAAM,WAAW,iBAAiB;IAC9B,IAAI,EAAE,CAAC,OAAO,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;IAC7B,MAAM,EAAE,SAAS,GAAG,KAAK,GAAG,QAAQ,CAAC;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAClB;AA8CD,wBAAgB,oBAAoB,CAChC,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACjC;IAAE,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAoFjE;AAED,wBAAgB,iBAAiB,CAC7B,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAChC,IAAI,EAAE,MAAM,GACb,MAAM,CAYR"}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
+
import type { HiddenCompletionExecutor } from "../../../hooks/magic-context/compartment-runner-types";
|
|
1
2
|
import type { PluginContext } from "../../../plugin/types";
|
|
2
3
|
import type { ModelInput } from "../../../shared/model-resolution";
|
|
3
4
|
import type { Database } from "../../../shared/sqlite";
|
|
4
5
|
import { type LeaseAcquisition } from "./lease";
|
|
5
6
|
export interface EvaluateSmartNotesArgs {
|
|
6
7
|
db: Database;
|
|
7
|
-
|
|
8
|
+
/** Child-session transport; absent on a host that only has a completion carrier. */
|
|
9
|
+
client?: PluginContext["client"];
|
|
10
|
+
/** Completion carrier used instead of a child session when the host has no tool loop. */
|
|
11
|
+
hiddenCompletionExecutor?: HiddenCompletionExecutor;
|
|
8
12
|
projectIdentity: string;
|
|
9
13
|
parentSessionId: string | undefined;
|
|
10
14
|
sessionDirectory: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evaluate-smart-notes.d.ts","sourceRoot":"","sources":["../../../../src/features/magic-context/dreamer/evaluate-smart-notes.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAK3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAEnE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"evaluate-smart-notes.d.ts","sourceRoot":"","sources":["../../../../src/features/magic-context/dreamer/evaluate-smart-notes.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,uDAAuD,CAAC;AACtG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAK3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAEnE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAuBvD,OAAO,EAAE,KAAK,gBAAgB,EAAiD,MAAM,SAAS,CAAC;AAE/F,MAAM,WAAW,sBAAsB;IACnC,EAAE,EAAE,QAAQ,CAAC;IACb,oFAAoF;IACpF,MAAM,CAAC,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;IACjC,yFAAyF;IACzF,wBAAwB,CAAC,EAAE,wBAAwB,CAAC;IACpD,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,yFAAyF;IACzF,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,cAAc,CAAC,EAAE,SAAS,UAAU,EAAE,CAAC;IACvC,6EAA6E;IAC7E,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CAC1D;AAED,MAAM,WAAW,wBAAwB;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,8EAA8E;IAC9E,GAAG,EAAE,OAAO,CAAC;CAChB;AA8BD;;;;;GAKG;AACH,wBAAsB,kBAAkB,CACpC,IAAI,EAAE,sBAAsB,GAC7B,OAAO,CAAC,wBAAwB,CAAC,CAoLnC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { HiddenCompletion, HiddenCompletionExecutor } from "../../../hooks/magic-context/compartment-runner-types";
|
|
2
|
+
import type { ModelInput } from "../../../shared/model-resolution";
|
|
3
|
+
export interface HiddenSingleShotArgs<T> {
|
|
4
|
+
executor: HiddenCompletionExecutor;
|
|
5
|
+
parentSessionId: string | undefined;
|
|
6
|
+
sessionDirectory: string;
|
|
7
|
+
/** Agent id the carrier should answer as; carriers that own their own agent ignore it. */
|
|
8
|
+
agent: string;
|
|
9
|
+
system: string;
|
|
10
|
+
prompt: string;
|
|
11
|
+
/** Child session title, used by carriers that create a visible session. */
|
|
12
|
+
title: string;
|
|
13
|
+
/** Log/telemetry label, e.g. "dreamer:review-user-memories". */
|
|
14
|
+
callContext: string;
|
|
15
|
+
model?: ModelInput;
|
|
16
|
+
fallbackModels?: readonly ModelInput[];
|
|
17
|
+
language?: string;
|
|
18
|
+
timeoutMs: number;
|
|
19
|
+
signal?: AbortSignal;
|
|
20
|
+
metadata?: Record<string, unknown>;
|
|
21
|
+
privacySensitive?: boolean;
|
|
22
|
+
/** The curation task can finish after completed memory updates without a final text response. */
|
|
23
|
+
allowEmpty?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Turn the complete assistant text into the caller's result. Throwing here
|
|
26
|
+
* rejects this model's answer and advances to the next configured fallback.
|
|
27
|
+
*/
|
|
28
|
+
parse: (text: string, completion: HiddenCompletion) => T;
|
|
29
|
+
}
|
|
30
|
+
export interface HiddenSingleShotResult<T> {
|
|
31
|
+
validated: T;
|
|
32
|
+
completion: HiddenCompletion;
|
|
33
|
+
childSessionId: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Run one Dreamer prompt through a hidden completion carrier and hand the
|
|
37
|
+
* caller the parsed answer. The carrier owns any tool steps for its agent.
|
|
38
|
+
*
|
|
39
|
+
* Every task routed through here answers with one self-contained document
|
|
40
|
+
* (a JSON object or an XML manifest), so a partial answer is never safe to
|
|
41
|
+
* apply. Two guards make that fail closed, matching what the memory classifier
|
|
42
|
+
* already does on this same transport:
|
|
43
|
+
* - a completion the provider cut short at the output limit is rejected before
|
|
44
|
+
* the parser sees it, so a truncated prefix can never be applied; and
|
|
45
|
+
* - an empty completion is rejected rather than parsed as "nothing to do".
|
|
46
|
+
* The caller's own parser is still responsible for rejecting a document whose
|
|
47
|
+
* structure is incomplete — for these tasks that means a JSON object that does
|
|
48
|
+
* not close, or a manifest missing its closing root tag.
|
|
49
|
+
*/
|
|
50
|
+
export declare function runHiddenSingleShotPrompt<T>(args: HiddenSingleShotArgs<T>): Promise<HiddenSingleShotResult<T>>;
|
|
51
|
+
//# sourceMappingURL=hidden-single-shot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hidden-single-shot.d.ts","sourceRoot":"","sources":["../../../../src/features/magic-context/dreamer/hidden-single-shot.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACR,gBAAgB,EAChB,wBAAwB,EAC3B,MAAM,uDAAuD,CAAC;AAG/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAInE,MAAM,WAAW,oBAAoB,CAAC,CAAC;IACnC,QAAQ,EAAE,wBAAwB,CAAC;IACnC,eAAe,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,gBAAgB,EAAE,MAAM,CAAC;IACzB,0FAA0F;IAC1F,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,2EAA2E;IAC3E,KAAK,EAAE,MAAM,CAAC;IACd,gEAAgE;IAChE,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,cAAc,CAAC,EAAE,SAAS,UAAU,EAAE,CAAC;IACvC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,iGAAiG;IACjG,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,gBAAgB,KAAK,CAAC,CAAC;CAC5D;AAED,MAAM,WAAW,sBAAsB,CAAC,CAAC;IACrC,SAAS,EAAE,CAAC,CAAC;IACb,UAAU,EAAE,gBAAgB,CAAC;IAC7B,cAAc,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,yBAAyB,CAAC,CAAC,EAC7C,IAAI,EAAE,oBAAoB,CAAC,CAAC,CAAC,GAC9B,OAAO,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CA+DpC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ManualRunResult } from "./task-scheduler";
|
|
2
|
+
/**
|
|
3
|
+
* Render a manual `/ctx-dream` run for the user. Shared by the v1 command
|
|
4
|
+
* output and the v2 RPC notification so the two surfaces stay identical.
|
|
5
|
+
*/
|
|
6
|
+
export declare function summarizeManualDream(summary: ManualRunResult): string;
|
|
7
|
+
//# sourceMappingURL=manual-summary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manual-summary.d.ts","sourceRoot":"","sources":["../../../../src/features/magic-context/dreamer/manual-summary.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExD;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CAyCrE"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { HiddenCompletionExecutor } from "../../../hooks/magic-context/compartment-runner-types";
|
|
1
2
|
import type { PluginContext } from "../../../plugin/types";
|
|
2
3
|
import type { ModelInput } from "../../../shared/model-resolution";
|
|
3
4
|
import type { Database } from "../../../shared/sqlite";
|
|
@@ -20,7 +21,8 @@ export declare const MAP_BATCH_FLOOR_MS = 240000;
|
|
|
20
21
|
export declare const MAX_INDEPENDENT_REQUEUE_PER_RUN = 80;
|
|
21
22
|
export interface MapMemoriesArgs {
|
|
22
23
|
db: Database;
|
|
23
|
-
client
|
|
24
|
+
client?: PluginContext["client"];
|
|
25
|
+
hiddenCompletionExecutor?: HiddenCompletionExecutor;
|
|
24
26
|
projectIdentity: string;
|
|
25
27
|
parentSessionId: string | undefined;
|
|
26
28
|
sessionDirectory: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"map-memories.d.ts","sourceRoot":"","sources":["../../../../src/features/magic-context/dreamer/map-memories.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAS3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAEnE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAIH,KAAK,mBAAmB,EAG3B,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"map-memories.d.ts","sourceRoot":"","sources":["../../../../src/features/magic-context/dreamer/map-memories.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,uDAAuD,CAAC;AACtG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAS3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAEnE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAIH,KAAK,mBAAmB,EAG3B,MAAM,WAAW,CAAC;AAInB,OAAO,EAAE,KAAK,gBAAgB,EAA6C,MAAM,SAAS,CAAC;AAE3F,OAAO,EAIH,KAAK,cAAc,EAItB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAEH,KAAK,kBAAkB,EAE1B,MAAM,gBAAgB,CAAC;AAyBxB;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,SAAU,CAAC;AAO1C;;;4CAG4C;AAC5C,eAAO,MAAM,+BAA+B,KAAiB,CAAC;AAE9D,MAAM,WAAW,eAAe;IAC5B,EAAE,EAAE,QAAQ,CAAC;IACb,MAAM,CAAC,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;IACjC,wBAAwB,CAAC,EAAE,wBAAwB,CAAC;IACpD,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,gBAAgB,EAAE,MAAM,CAAC;IACzB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B,KAAK,EAAE,cAAc,EAAE,EACvB,YAAY,EAAE,MAAM,GACrB,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAAC,CAElD"}
|
|
@@ -3,7 +3,14 @@ import type { Database } from "../../../shared/sqlite";
|
|
|
3
3
|
import { type LeaseAcquisition } from "./lease";
|
|
4
4
|
export interface PromotePrimersArgs {
|
|
5
5
|
db: Database;
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Unused by promotion itself. Primer promotion clusters candidate rows that
|
|
8
|
+
* are already in the database and writes the result back, so it makes no
|
|
9
|
+
* model call and needs no completion transport. The field stays optional so a
|
|
10
|
+
* caller that has a client can keep passing it without the absence of one
|
|
11
|
+
* being read as "this task cannot run here".
|
|
12
|
+
*/
|
|
13
|
+
client?: PluginContext["client"];
|
|
7
14
|
projectIdentity: string;
|
|
8
15
|
sessionDirectory: string;
|
|
9
16
|
holderId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"promote-primers.d.ts","sourceRoot":"","sources":["../../../../src/features/magic-context/dreamer/promote-primers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAmBvD,OAAO,EACH,KAAK,gBAAgB,EAIxB,MAAM,SAAS,CAAC;AAEjB,MAAM,WAAW,kBAAkB;IAC/B,EAAE,EAAE,QAAQ,CAAC;IACb,MAAM,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"promote-primers.d.ts","sourceRoot":"","sources":["../../../../src/features/magic-context/dreamer/promote-primers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAmBvD,OAAO,EACH,KAAK,gBAAgB,EAIxB,MAAM,SAAS,CAAC;AAEjB,MAAM,WAAW,kBAAkB;IAC/B,EAAE,EAAE,QAAQ,CAAC;IACb;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;IACjC,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,uBAAuB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,QAAQ,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CACvF;AAED,MAAM,WAAW,oBAAoB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;CAClB;AAoED,wBAAsB,cAAc,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAkG5F"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { HiddenCompletionExecutor } from "../../../hooks/magic-context/compartment-runner-types";
|
|
1
2
|
import { type RawMessageProvider } from "../../../hooks/magic-context/read-session-chunk";
|
|
2
3
|
import type { PluginContext } from "../../../plugin/types";
|
|
3
4
|
import type { ModelInput } from "../../../shared/model-resolution";
|
|
@@ -5,7 +6,8 @@ import type { Database } from "../../../shared/sqlite";
|
|
|
5
6
|
import { type LeaseAcquisition } from "./lease";
|
|
6
7
|
export interface RefreshPrimersArgs {
|
|
7
8
|
db: Database;
|
|
8
|
-
client
|
|
9
|
+
client?: PluginContext["client"];
|
|
10
|
+
hiddenCompletionExecutor?: HiddenCompletionExecutor;
|
|
9
11
|
projectIdentity: string;
|
|
10
12
|
parentSessionId: string | undefined;
|
|
11
13
|
sessionDirectory: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refresh-primers.d.ts","sourceRoot":"","sources":["../../../../src/features/magic-context/dreamer/refresh-primers.ts"],"names":[],"mappings":"AAGA,OAAO,EACH,KAAK,kBAAkB,EAG1B,MAAM,iDAAiD,CAAC;AAEzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAM3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAEnE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"refresh-primers.d.ts","sourceRoot":"","sources":["../../../../src/features/magic-context/dreamer/refresh-primers.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,uDAAuD,CAAC;AACtG,OAAO,EACH,KAAK,kBAAkB,EAG1B,MAAM,iDAAiD,CAAC;AAEzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAM3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAEnE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAUvD,OAAO,EAAE,KAAK,gBAAgB,EAA6C,MAAM,SAAS,CAAC;AAM3F,MAAM,WAAW,kBAAkB;IAC/B,EAAE,EAAE,QAAQ,CAAC;IACb,MAAM,CAAC,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;IACjC,wBAAwB,CAAC,EAAE,wBAAwB,CAAC;IACpD,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,cAAc,CAAC,EAAE,SAAS,UAAU,EAAE,CAAC;IACvC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC;;;;;;;OAOG;IACH,kBAAkB,CAAC,EAAE,CACjB,SAAS,EAAE,MAAM,KAChB,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC,GAAG,kBAAkB,GAAG,IAAI,CAAC;CACvE;AAED,MAAM,WAAW,oBAAoB;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACnB;AA0GD,wBAAsB,cAAc,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAiC5F"}
|
|
@@ -4,8 +4,11 @@ type OpencodeClient = PluginContext["client"];
|
|
|
4
4
|
/**
|
|
5
5
|
* Age-gated backstop for internal children that carry raw user or project text.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
* leave OpenCode's server loop writing, so
|
|
7
|
+
* Unless retention is enabled, a settled prompt deletes its child inline. A
|
|
8
|
+
* timeout, abort, or client error can leave OpenCode's server loop writing, so
|
|
9
|
+
* unsettled rows are archived and remain for this sweep. With retention enabled,
|
|
10
|
+
* only archived privacy-sensitive rows are eligible; settled children accumulate
|
|
11
|
+
* until the operator clears them manually.
|
|
9
12
|
*
|
|
10
13
|
* CONCURRENCY: `session.delete` has no cross-process "active session" lease (OC
|
|
11
14
|
* peer confirmed), so the ONLY safe filter is AGE — a child older than any
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retrospective-orphan-sweep.d.ts","sourceRoot":"","sources":["../../../../src/features/magic-context/dreamer/retrospective-orphan-sweep.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,a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AAM,8BAA8B,EAAE,iCAG5C,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,iCAM1C,CAAC;AAIF;;;;GAIG;AACH,wBAAgB,0BAA0B,CACtC,kBAAkB,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,GACzE,MAAM,CAUR;AAOD;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,GAAG,MAAM,CAY5F;AAOD;;;;;GAKG;AACH,KAAK,oBAAoB,GACnB,MAAM,GACN;IACI,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACrB,CAAC;AAgBR,wBAAsB,kCAAkC,CAAC,IAAI,EAAE;IAC3D,UAAU,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC5B,MAAM,EAAE,cAAc,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,OAAO,EAAE,oBAAoB,CAAC;IAC9B,YAAY,CAAC,EAAE,iCAAiC,CAAC;IACjD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE,OAAO,CAAC;CAC3B,GAAG,OAAO,CAAC,MAAM,CAAC,CAmFlB"}
|
|
@@ -2,6 +2,14 @@ import type { Database } from "../../../shared/sqlite";
|
|
|
2
2
|
export declare const RETROSPECTIVE_MAX_MESSAGES_PER_SESSION = 80;
|
|
3
3
|
export declare const RETROSPECTIVE_MAX_MESSAGES_PER_RUN = 240;
|
|
4
4
|
export declare const RETROSPECTIVE_MAX_SESSIONS_PER_RUN = 20;
|
|
5
|
+
/**
|
|
6
|
+
* A pasted log is one semantic message, not an entitlement to the whole child
|
|
7
|
+
* window. The 8,000 ceiling mirrors the historian's `HISTORIAN_CHUNK_MIN`
|
|
8
|
+
* convention, but applies it as a stricter character cap to avoid per-message
|
|
9
|
+
* tokenizing. Its head+tail shape is shared with the historian atomic guard.
|
|
10
|
+
*/
|
|
11
|
+
export declare const RETROSPECTIVE_MAX_USER_MESSAGE_CHARS = 8000;
|
|
12
|
+
export declare const RETROSPECTIVE_MESSAGE_TRUNCATION_MARKER = "\n[\u2026 middle of user message truncated by Magic Context \u2026]\n";
|
|
5
13
|
export type RetrospectiveMessageRole = "user" | "assistant" | "tool";
|
|
6
14
|
export interface RetrospectiveProjectSession {
|
|
7
15
|
sessionId: string;
|
|
@@ -60,26 +68,27 @@ export declare class OpenCodeRetrospectiveRawProvider implements RetrospectiveRa
|
|
|
60
68
|
dispose(): void;
|
|
61
69
|
}
|
|
62
70
|
export interface RetrospectiveScanWindow {
|
|
63
|
-
/** All
|
|
64
|
-
*
|
|
71
|
+
/** All admitted messages (user rows + tool metadata), oldest→newest. Includes
|
|
72
|
+
* only overlap rows that also fit the child prompt budget. */
|
|
65
73
|
messages: RetrospectiveRawMessage[];
|
|
66
|
-
/** The max message ts ACTUALLY
|
|
67
|
-
* persist on completion).
|
|
68
|
-
* ≤ watermark and cannot pull it back). */
|
|
74
|
+
/** The max message ts ACTUALLY admitted this run (the content watermark to
|
|
75
|
+
* persist on completion). A recency cutoff may move it past expired rows. */
|
|
69
76
|
maxScannedTs: number;
|
|
77
|
+
/** Exact estimate for the gate system+user prompt assembled from `messages`. */
|
|
78
|
+
promptTokens: number;
|
|
79
|
+
/** Usable child-model input after reserving the shared estimator's 3% safety margin. */
|
|
80
|
+
promptInputLimitTokens?: number;
|
|
81
|
+
/** True when the token budget, rather than a count cap, cut the since prefix. */
|
|
82
|
+
budgetTruncated: boolean;
|
|
70
83
|
}
|
|
71
|
-
/**
|
|
72
|
-
* The retrospective scan window for one run: everything new since the content
|
|
73
|
-
* watermark, PLUS the ~`overlapUserCount` user lines immediately before the
|
|
74
|
-
* watermark for sessions that have kept new rows (so friction straddling a run
|
|
75
|
-
* boundary isn't missed).
|
|
76
|
-
* The since portion carries user rows + tool metadata (the deepen context); the
|
|
77
|
-
* overlap portion is user-only (gate context). Ordinals are reassigned globally.
|
|
78
|
-
*/
|
|
79
84
|
export declare function readRetrospectiveScanWindow(provider: RetrospectiveRawProvider, projectIdentity: string, watermarkMs: number, overlapUserCount: number, options?: {
|
|
80
85
|
maxMessagesPerRun?: number;
|
|
81
86
|
capPerSession?: number;
|
|
82
87
|
maxSessionsPerRun?: number;
|
|
88
|
+
/** Child model's already-output-reserved usable input window. */
|
|
89
|
+
usableInputTokens?: number;
|
|
90
|
+
/** Oldest timestamp still eligible. Rows below it expire without collection. */
|
|
91
|
+
recencyCutoffMs?: number;
|
|
83
92
|
}): Promise<RetrospectiveScanWindow>;
|
|
84
93
|
export {};
|
|
85
94
|
//# sourceMappingURL=retrospective-raw-provider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retrospective-raw-provider.d.ts","sourceRoot":"","sources":["../../../../src/features/magic-context/dreamer/retrospective-raw-provider.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"retrospective-raw-provider.d.ts","sourceRoot":"","sources":["../../../../src/features/magic-context/dreamer/retrospective-raw-provider.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAKvD,eAAO,MAAM,sCAAsC,KAAK,CAAC;AACzD,eAAO,MAAM,kCAAkC,MAAM,CAAC;AAItD,eAAO,MAAM,kCAAkC,KAAK,CAAC;AACrD;;;;;GAKG;AACH,eAAO,MAAM,oCAAoC,OAAQ,CAAC;AAC1D,eAAO,MAAM,uCAAuC,0EACa,CAAC;AAElE,MAAM,MAAM,wBAAwB,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,CAAC;AAErE,MAAM,WAAW,2BAA2B;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,uBAAuB;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,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AAM,CAAC;CAC5B,GACF,OAAO,CAAC,uBAAuB,CAAC,CAyLlC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Database } from "../../../shared/sqlite";
|
|
2
|
+
import type { DreamTaskFailureState } from "./task-registry";
|
|
2
3
|
/**
|
|
3
4
|
* Per-task dreamer scheduling state (Dreamer v2). One row per (project, task):
|
|
4
5
|
* when it last ran, when it's next due, and its last outcome. Replaces the
|
|
@@ -42,6 +43,14 @@ export interface TaskScheduleStateRow {
|
|
|
42
43
|
}
|
|
43
44
|
export declare function getTaskScheduleState(db: Database, projectPath: string, task: string): TaskScheduleStateRow | null;
|
|
44
45
|
export declare function getTaskScheduleStatesForProject(db: Database, projectPath: string): TaskScheduleStateRow[];
|
|
46
|
+
/**
|
|
47
|
+
* Every dreamer task whose last scheduled run failed, in task order.
|
|
48
|
+
*
|
|
49
|
+
* The scheduler has always written `last_error`, but only the dashboard displayed it, so
|
|
50
|
+
* a task could fail on its schedule for weeks while the only in-session signal was a
|
|
51
|
+
* backlog count that never fell. The status surfaces read this to say so out loud.
|
|
52
|
+
*/
|
|
53
|
+
export declare function getFailingDreamTasks(db: Database, projectPath: string): DreamTaskFailureState[];
|
|
45
54
|
/**
|
|
46
55
|
* Most recent successful Dreamer task run for a project, as an epoch-ms value,
|
|
47
56
|
* or null if no task has run yet. `last_run_at` advances only on task success
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage-task-schedule.d.ts","sourceRoot":"","sources":["../../../../src/features/magic-context/dreamer/storage-task-schedule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"storage-task-schedule.d.ts","sourceRoot":"","sources":["../../../../src/features/magic-context/dreamer/storage-task-schedule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,KAAK,EAAE,qBAAq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,CAAC;AAC5E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAE/D;;;;;GAKG;AACH,wBAAgB,4BAA4B,CACxC,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,YAAY,EACrB,QAAQ,CAAC,EAAE,MAAM,EACjB,UAAU,CAAC,EAAE,OAAO,GACrB,sBAAsB,EAAE,
|
|
1
|
+
{"version":3,"file":"task-config.d.ts","sourceRoot":"","sources":["../../../../src/features/magic-context/dreamer/task-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAAE,KAAK,YAAY,EAA2B,MAAM,kCAAkC,CAAC;AAC9F,OAAO,EAAyB,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAE/D;;;;;GAKG;AACH,wBAAgB,4BAA4B,CACxC,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,YAAY,EACrB,QAAQ,CAAC,EAAE,MAAM,EACjB,UAAU,CAAC,EAAE,OAAO,GACrB,sBAAsB,EAAE,CAkC1B;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,aAAa,GAAG,SAAS,GAAG,OAAO,CAGvF;AAED,qFAAqF;AACrF,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,aAAa,GAAG,SAAS,GAAG,MAAM,CAEvF;AAED,4EAA4E;AAC5E,wBAAgB,kBAAkB,CAC9B,OAAO,EAAE,aAAa,GAAG,SAAS,EAClC,IAAI,EAAE,MAAM,WAAW,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,GAChD,OAAO,CAGT;AAED,sFAAsF;AACtF,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,aAAa,GAAG,SAAS,GAAG,aAAa,EAAE,CAGrF;AAED;;iBAEiB;AACjB,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,aAAa,GAAG,SAAS,GAAG,MAAM,CAIjF"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type HiddenCompletionExecutor } from "../../../hooks/magic-context/compartment-runner-types";
|
|
2
2
|
import type { RawMessageProvider } from "../../../hooks/magic-context/read-session-chunk";
|
|
3
3
|
import type { PluginContext } from "../../../plugin/types";
|
|
4
|
+
import type { ModelInput } from "../../../shared/model-resolution";
|
|
4
5
|
import type { Database } from "../../../shared/sqlite";
|
|
5
6
|
import { type ClassifyModuleClient } from "./classify";
|
|
6
7
|
import { type RetrospectiveRawProvider } from "./retrospective-raw-provider";
|
|
@@ -40,6 +41,8 @@ export interface DreamTaskExecutorDeps {
|
|
|
40
41
|
retinaHandoff?: boolean;
|
|
41
42
|
/** Process-local progress callback for user-facing status displays; it never reads from or writes to the prompt/result cache. */
|
|
42
43
|
onProgress?: (progress: DreamTaskProgress | null, completedTask?: DreamTaskName) => void;
|
|
44
|
+
/** Optional callback for tests and host integrations to resolve the smallest usable input window across child model attempts. */
|
|
45
|
+
resolveRetrospectiveUsableInputTokens?: (models: readonly ModelInput[]) => number | undefined;
|
|
43
46
|
moduleClient?: ClassifyModuleClient & {
|
|
44
47
|
authorityStatus?: (args: {
|
|
45
48
|
context_store_uuid: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task-executor.d.ts","sourceRoot":"","sources":["../../../../src/features/magic-context/dreamer/task-executor.ts"],"names":[],"mappings":"AAWA,OAAO,EACH,KAAK,wBAAwB,
|
|
1
|
+
{"version":3,"file":"task-executor.d.ts","sourceRoot":"","sources":["../../../../src/features/magic-context/dreamer/task-executor.ts"],"names":[],"mappings":"AAWA,OAAO,EACH,KAAK,wBAAwB,EAGhC,MAAM,uDAAuD,CAAC;AAC/D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iDAAiD,CAAC;AAC1F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAM3D,OAAO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IAC7F,KAAK,CAAC,EAAE;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC7C,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,iIAAiI;IACjI,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,iBAAiB,GAAG,IAAI,EAAE,aAAa,CAAC,EAAE,aAAa,KAAK,IAAI,CAAC;IACzF,iIAAiI;IACjI,qCAAqC,CAAC,EAAE,CAAC,MAAM,EAAE,SAAS,UAAU,EAAE,KAAK,MAAM,GAAG,SAAS,CAAC;IAC9F,YAAY,CAAC,EAAE,oBAAoB,GAAG;QAClC,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE;YACrB,kBAAkB,EAAE,MAAM,CAAC;YAC3B,OAAO,EAAE,MAAM,CAAC;YAChB,WAAW,CAAC,EAAE,MAAM,CAAC;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;CACL;AAoLD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,qBAAqB,GAAG,YAAY,CAqjBjF;AA4BD;;;;;;;;+EAQ+E;AAC/E,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG;IAAE,GAAG,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAE,CA+B9F"}
|
|
@@ -9,8 +9,8 @@ export interface CuratePromptMemory {
|
|
|
9
9
|
hasNoFileSentinel: boolean;
|
|
10
10
|
}
|
|
11
11
|
export declare const DREAMER_SYSTEM_PROMPT = "You are a background maintenance agent for the magic-context system, running during a scheduled dream window. Your task and its full instructions arrive in the message below. Never read or quote secrets from .env, credentials, or key files, and never commit \u2014 the user handles git.";
|
|
12
|
-
export declare const CURATE_SYSTEM_PROMPT = "You are a memory-pool curator for the magic-context system. You run during a scheduled dream window to keep a project's cross-session memory store lean and well-formed.\n\n## Memory operations
|
|
13
|
-
export declare const MAINTAIN_DOCS_SYSTEM_PROMPT = "You are a documentation
|
|
12
|
+
export declare const CURATE_SYSTEM_PROMPT = "You are a memory-pool curator for the magic-context system. You run during a scheduled dream window to keep a project's cross-session memory store lean and well-formed.\n\n## Memory operations\n- `ctx_memory_list(category=\"...\")` \u2014 browse active memories, optionally filter by category\n- `action=\"merge\", ids=[N,M,...], content=\"...\", category=\"...\"` \u2014 consolidate duplicates into one canonical memory\n- `action=\"update\", ids=[N], content=\"...\", superseded_by=M` \u2014 rewrite content; name where removed detail survives when cutting more than half\n- `action=\"write\", category=\"...\", content=\"...\"` \u2014 create a memory (SPLITS ONLY \u2014 never mint new facts)\n- `action=\"archive\", ids=[N], superseded_by=M, reason=\"...\"` \u2014 consolidate a redundant memory into the named active same-category survivor\n\n## Rules\n1. **Assume the pool is accurate.** A separate verify task checks memories against code. You handle QUALITY only \u2014 duplicates, wording, low-value entries \u2014 never correctness, and you do NOT read the codebase.\n2. **Work methodically.** Choose your own batch size.\n3. **Be conservative with archives.** Use the task's archive criteria.\n4. **Present-tense operational language.** \"X uses Y\" not \"X was changed to use Y.\"\n5. **One rule/fact per memory.**\n6. **Never mint new facts** \u2014 that is the historian's job. `write` is for splitting a compound memory only.\n\n## Memory taxonomy (5 categories)\n\nProject memory uses exactly 5 categories. Every memory belongs to one:\n- **PROJECT_RULES** \u2014 durable process/workflow rules for this repo (releases, commits, testing, debugging conventions).\n- **ARCHITECTURE** \u2014 load-bearing design decisions and WHY they hold (not WHAT a file does).\n- **CONSTRAINTS** \u2014 hard limits imposed by EXTERNAL systems (APIs, providers, platforms, protocols). Not our own code's behavior.\n- **CONFIG_VALUES** \u2014 stable configuration keys/values and conventions. Not transient measurements (test counts, sizes, versions).\n- **NAMING** \u2014 naming conventions and canonical names. Not inventories.\n\n**Legacy categories during transition:** older memories may still carry pre-v2 category names. When you touch one, map it to its 5-category home with `action=\"update\"` (or `merge`): WORKFLOW_RULES\u2192PROJECT_RULES, ARCHITECTURE_DECISIONS\u2192ARCHITECTURE, CONFIG_DEFAULTS\u2192CONFIG_VALUES, ENVIRONMENT\u2192CONFIG_VALUES (paths) or CONSTRAINTS, KNOWN_ISSUES\u2192CONSTRAINTS only if it's an external-system limit. USER_DIRECTIVES / USER_PREFERENCES are NOT project categories. Do not compare project memories with the global user profile or use it to justify an archive.";
|
|
13
|
+
export declare const MAINTAIN_DOCS_SYSTEM_PROMPT = "You are a read-only documentation investigator for the magic-context system. Use read, grep, glob and navigation tools to verify source. Never edit any file or run commands. Return only a proposed change to the project's ARCHITECTURE.md and STRUCTURE.md, not a change log. The protected regions between <!-- mc:protected START ... --> and <!-- mc:protected END --> must remain byte-identical. If the docs are accurate, return [].";
|
|
14
14
|
export declare const REVIEW_USER_MEMORIES_SYSTEM_PROMPT = "You are a user-profile reviewer for the magic-context system. You run during a scheduled dream window to decide which recurring behavioral observations about the human user are real, persistent patterns worth keeping in their global user profile.\n\nYou do NOT call any tools and you do NOT touch project memories \u2014 you read the candidate observations the host gives you and return a JSON verdict. Distill durable patterns; never transcribe a single moment. Output only the JSON the task asks for, with no surrounding prose.";
|
|
15
15
|
export declare const PRIMER_INVESTIGATOR_SYSTEM_PROMPT = "You are a read-only code investigator for the magic-context system. You run during a scheduled dream window to answer a single standing question about THIS codebase by reading its current source.\n\n## Tools (read-only)\n`read`, `grep`, `glob`, `aft_outline`, `aft_zoom`, `aft_search`. You have no write, edit, bash, or memory tools \u2014 you investigate and report, you change nothing.\n\n## Rules\n- **Ground every claim in code you actually opened this run.** Open the files the question points at and verify against them. A paraphrase that reads no files is not an answer.\n- **Answer directly and concretely** \u2014 name paths, symbols, and mechanisms, in present tense.";
|
|
16
16
|
export declare function buildCuratePrompt(args: {
|
|
@@ -36,10 +36,10 @@ export declare function buildRetrospectivePrompt(args: {
|
|
|
36
36
|
frictionWindow: string;
|
|
37
37
|
events: RetrospectivePromptEvent[];
|
|
38
38
|
}): string;
|
|
39
|
-
export declare function buildMaintainDocsPrompt(projectPath: string,
|
|
39
|
+
export declare function buildMaintainDocsPrompt(projectPath: string, changeSet: string, existingDocs: {
|
|
40
40
|
architecture: boolean;
|
|
41
41
|
structure: boolean;
|
|
42
|
-
}): string;
|
|
42
|
+
}, budget?: number, currentTokens?: number): string;
|
|
43
43
|
export declare function buildDreamTaskPrompt(task: DreamingTask, args: {
|
|
44
44
|
projectPath: string;
|
|
45
45
|
lastDreamAt?: string | null;
|
|
@@ -47,6 +47,9 @@ export declare function buildDreamTaskPrompt(task: DreamingTask, args: {
|
|
|
47
47
|
architecture: boolean;
|
|
48
48
|
structure: boolean;
|
|
49
49
|
};
|
|
50
|
+
docsChangeSet?: string;
|
|
51
|
+
docsBudget?: number;
|
|
52
|
+
docsCurrentTokens?: number;
|
|
50
53
|
curate?: {
|
|
51
54
|
category: CurateMemoryCategory;
|
|
52
55
|
memories: CuratePromptMemory[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task-prompts.d.ts","sourceRoot":"","sources":["../../../../src/features/magic-context/dreamer/task-prompts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAEvE,qFAAqF;AACrF,MAAM,WAAW,kBAAkB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,iBAAiB,EAAE,OAAO,CAAC;CAC9B;AAQD,eAAO,MAAM,qBAAqB,mSAA8R,CAAC;AAkBjU,eAAO,MAAM,oBAAoB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E;IAC3C,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,wBAAwB,EAAE,CAAC;CACtC,GAAG,MAAM,CA2BT;AAID,wBAAgB,uBAAuB,CACnC,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE;IAAE,YAAY,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,OAAO,CAAA;CAAE,EAC3D,MAAM,SAAQ,EACd,aAAa,SAAI,GAClB,MAAM,CAaR;AAED,wBAAgB,oBAAoB,CAChC,IAAI,EAAE,YAAY,EAClB,IAAI,EAAE;IACF,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,YAAY,CAAC,EAAE;QAAE,YAAY,EAAE,OAAO,CAAC;QAAC,SAAS,EAAE,OAAO,CAAA;KAAE,CAAC;IAC7D,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,MAAM,CAAC,EAAE;QACL,QAAQ,EAAE,oBAAoB,CAAC;QAC/B,QAAQ,EAAE,kBAAkB,EAAE,CAAC;KAClC,CAAC;CACL,GACF,MAAM,CAiBR"}
|
|
@@ -10,9 +10,39 @@
|
|
|
10
10
|
import type { CurateMemoryCategory } from "./curate-category-rotation";
|
|
11
11
|
export declare const CANONICAL_DREAM_TASKS: readonly ["map-memories", "verify", "verify-broad", "curate", "compress-cues", "classify-memories", "retrospective", "maintain-docs", "evaluate-smart-notes", "review-user-memories", "promote-primers", "refresh-primers"];
|
|
12
12
|
export type DreamTaskName = (typeof CANONICAL_DREAM_TASKS)[number];
|
|
13
|
-
|
|
13
|
+
/**
|
|
14
|
+
* How a Dreamer task reaches its result, which is what decides whether a host
|
|
15
|
+
* without a tool loop can run it:
|
|
16
|
+
* - "tool-loop": the task drives an agent that must call tools between model
|
|
17
|
+
* turns (reading files, searching, writing memories through `ctx_memory`).
|
|
18
|
+
* - "single-shot": one or more no-tool completions whose entire answer is the
|
|
19
|
+
* returned text. Any transport that can deliver a prompt and return text runs
|
|
20
|
+
* these, including a hidden completion carrier.
|
|
21
|
+
* - "host-only": no model call at all. The task is database work done in this
|
|
22
|
+
* process, so it needs no completion transport whatsoever.
|
|
23
|
+
*/
|
|
24
|
+
export type DreamTaskTransport = "tool-loop" | "single-shot" | "host-only";
|
|
25
|
+
export interface DreamTaskCapability {
|
|
26
|
+
/** True only when the task cannot finish without a tool loop. */
|
|
14
27
|
requiresTools: boolean;
|
|
15
|
-
|
|
28
|
+
transport: DreamTaskTransport;
|
|
29
|
+
/**
|
|
30
|
+
* What the tool loop is needed FOR, as one clause a user can read. Present
|
|
31
|
+
* only on tool-loop tasks, where it becomes the named per-task reason shown
|
|
32
|
+
* when a host refuses the task instead of a single anonymous "filtered" list.
|
|
33
|
+
*/
|
|
34
|
+
toolLoopPurpose?: string;
|
|
35
|
+
}
|
|
36
|
+
export declare const DREAM_TASK_CAPABILITIES: Record<DreamTaskName, DreamTaskCapability>;
|
|
37
|
+
/** Tasks a host without a tool loop cannot run, in canonical order. */
|
|
38
|
+
export declare function toolLoopDreamTasks(): DreamTaskName[];
|
|
39
|
+
/**
|
|
40
|
+
* One line per refused task, naming the task, the stable code and what the tool
|
|
41
|
+
* loop is needed for. A user reading /ctx-dream or /ctx-status output should be
|
|
42
|
+
* able to tell which specific task is unavailable and why, rather than seeing a
|
|
43
|
+
* single anonymous "unsupported" list.
|
|
44
|
+
*/
|
|
45
|
+
export declare function formatUnsupportedDreamTasks(tasks: readonly DreamTaskName[], code: string): string;
|
|
16
46
|
/** Cheap, read-only work counts for one Dreamer task. */
|
|
17
47
|
export interface DreamTaskBacklog {
|
|
18
48
|
/** Items selected by the task's current backlog predicate. */
|
|
@@ -26,6 +56,27 @@ export interface DreamTaskBacklog {
|
|
|
26
56
|
export type DreamTaskBacklogMap = Partial<Record<DreamTaskName, DreamTaskBacklog>>;
|
|
27
57
|
/** Stable human-readable rendering shared by /ctx-dream and status surfaces. */
|
|
28
58
|
export declare function formatDreamTaskBacklogs(backlogs: DreamTaskBacklogMap, tasks?: readonly DreamTaskName[]): string;
|
|
59
|
+
/** One dreamer task whose last scheduled run failed. */
|
|
60
|
+
export interface DreamTaskFailureState {
|
|
61
|
+
task: string;
|
|
62
|
+
/** The scheduler's recorded failure text. */
|
|
63
|
+
error: string;
|
|
64
|
+
/** Epoch ms of the last run that SUCCEEDED, or null if none ever has. A failed run
|
|
65
|
+
* never advances `last_run_at`, so this says how long the task has been stuck, not
|
|
66
|
+
* when it last failed — the scheduler keeps no failure timestamp. */
|
|
67
|
+
lastSucceededAt: number | null;
|
|
68
|
+
/** Consecutive retries queued so far; reset once the retry cap pushes the task to
|
|
69
|
+
* its next cron slot, so a long-running failure oscillates rather than climbs. */
|
|
70
|
+
retryCount: number;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* One line per failing task, shared by the status surfaces.
|
|
74
|
+
*
|
|
75
|
+
* The elapsed time is measured from the last SUCCESS, not the last failure: a failed
|
|
76
|
+
* run deliberately does not advance `last_run_at`, so that is the only timestamp the
|
|
77
|
+
* scheduler keeps and "stuck since" is what a reader needs anyway.
|
|
78
|
+
*/
|
|
79
|
+
export declare function formatDreamTaskFailures(failures: readonly DreamTaskFailureState[], now?: number): string;
|
|
29
80
|
/** Process-local progress for the task currently applying a run chunk. */
|
|
30
81
|
export interface DreamTaskProgress {
|
|
31
82
|
task: DreamTaskName;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task-registry.d.ts","sourceRoot":"","sources":["../../../../src/features/magic-context/dreamer/task-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAEvE,eAAO,MAAM,qBAAqB,6NAexB,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEnE,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,aAAa,EAAE;
|
|
1
|
+
{"version":3,"file":"task-registry.d.ts","sourceRoot":"","sources":["../../../../src/features/magic-context/dreamer/task-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAEvE,eAAO,MAAM,qBAAqB,6NAexB,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEnE;;;;;;;;;;GAUG;AACH,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAAG,aAAa,GAAG,WAAW,CAAC;AAE3E,MAAM,WAAW,mBAAmB;IAChC,iEAAiE;IACjE,aAAa,EAAE,OAAO,CAAC;IACvB,SAAS,EAAE,kBAAkB,CAAC;IAC9B;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,aAAa,EAAE,mBAAmB,CAiD9E,CAAC;AAEF,uEAAuE;AACvE,wBAAgB,kBAAkB,IAAI,aAAa,EAAE,CAEpD;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,SAAS,aAAa,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAOjG;AAED,yDAAyD;AACzD,MAAM,WAAW,gBAAgB;IAC7B,8DAA8D;IAC9D,OAAO,EAAE,MAAM,CAAC;IAChB,gDAAgD;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,uDAAuD;IACvD,QAAQ,CAAC,EAAE,oBAAoB,CAAC;CACnC;AAED,mDAAmD;AACnD,MAAM,MAAM,mBAAmB,GAAG,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,CAAC,CAAC;AAEnF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AM,SAAS,GAAG,QAAQ,GAAG,eAAe,GAAG,sBAAsB,GAAG,eAAe,CAAC;AAE9F,wBAAgB,YAAY,CAAC,IAAI,EAAE,aAAa,GAAG,SAAS,CAgB3D;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,GAAG,MAAM,CAGhF;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,aAAa,CAE1E;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,aAAa,GAAG,MAAM,CAE3E"}
|
|
@@ -19,6 +19,9 @@ export interface DreamTaskRuntimeConfig {
|
|
|
19
19
|
timeoutMinutes: number;
|
|
20
20
|
/** review-user-memories */
|
|
21
21
|
promotionThreshold?: number;
|
|
22
|
+
/** retrospective source lookback; old rows are skipped by advancing its content watermark. */
|
|
23
|
+
retrospectiveRecencyDays?: number;
|
|
24
|
+
docsMaxTokens?: number;
|
|
22
25
|
}
|
|
23
26
|
export interface TaskExecOutcome {
|
|
24
27
|
status: "completed" | "failed";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task-scheduler.d.ts","sourceRoot":"","sources":["../../../../src/features/magic-context/dreamer/task-scheduler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAE5E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,EAEH,KAAK,gBAAgB,EAGxB,MAAM,SAAS,CAAC;AASjB,OAAO,
|
|
1
|
+
{"version":3,"file":"task-scheduler.d.ts","sourceRoot":"","sources":["../../../../src/features/magic-context/dreamer/task-scheduler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM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,CAAC;IACnB,oEAAoE;IACpE,aAAa,EAAE,mBAAmB,CAAC;IACnC,oFAAoF;IACpF,YAAY,EAAE,mBAAmB,CAAC;CACrC;AAED;;;;;;;;;GASG;AACH,wBAAsB,cAAc,CAChC,IAAI,EAAE,IAAI,CAAC,eAAe,EAAE,KAAK,CAAC,GAAG;IAAE,IAAI,CAAC,EAAE,aAAa,CAAA;CAAE,GAC9D,OAAO,CAAC,eAAe,CAAC,CAkG1B;AAED;;;;;GAKG;AACH,wBAAsB,qBAAqB,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC,CAuClF"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The last maintenance tick that ended before it finished its work.
|
|
3
|
+
*
|
|
4
|
+
* A tick that dies early is otherwise invisible from outside: no task fails, no
|
|
5
|
+
* schedule row changes, and the only trace is a log line nobody reads. That
|
|
6
|
+
* makes "the background maintenance has nothing to do" and "the background
|
|
7
|
+
* maintenance is not running at all" look identical in the status view. This
|
|
8
|
+
* records the second one so both surfaces can tell them apart, and clears it as
|
|
9
|
+
* soon as a tick gets all the way through.
|
|
10
|
+
*
|
|
11
|
+
* The row lives in the shared key/value table rather than in session state: the
|
|
12
|
+
* timer is one per process, is not attached to any session, and its failures
|
|
13
|
+
* have to survive the session that happened to be open when they occurred.
|
|
14
|
+
*/
|
|
15
|
+
import type { Database } from "../../../shared/sqlite";
|
|
16
|
+
export interface DreamerTickFailure {
|
|
17
|
+
/** When the failing stage was caught, in epoch milliseconds. */
|
|
18
|
+
at: number;
|
|
19
|
+
/**
|
|
20
|
+
* Which stage of the tick failed, in words a user can act on — either
|
|
21
|
+
* "message-history maintenance" or "project <identity>".
|
|
22
|
+
*/
|
|
23
|
+
stage: string;
|
|
24
|
+
/** The error text, already flattened to a single line. */
|
|
25
|
+
message: string;
|
|
26
|
+
}
|
|
27
|
+
/** The last recorded tick failure, or null when the most recent tick was clean. */
|
|
28
|
+
export declare function getDreamerTickFailure(db: Database): DreamerTickFailure | null;
|
|
29
|
+
/** Record the stage that stopped this tick, replacing any earlier record. */
|
|
30
|
+
export declare function recordDreamerTickFailure(db: Database, failure: DreamerTickFailure): void;
|
|
31
|
+
/** Drop the record after a tick that completed every stage. */
|
|
32
|
+
export declare function clearDreamerTickFailure(db: Database): void;
|
|
33
|
+
/**
|
|
34
|
+
* One diagnostic line for a recorded failure. Shared by every harness's doctor
|
|
35
|
+
* so the three of them describe this the same way.
|
|
36
|
+
*/
|
|
37
|
+
export declare function formatDreamerTickFailure(failure: DreamerTickFailure): string;
|
|
38
|
+
//# sourceMappingURL=tick-failure.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tick-failure.d.ts","sourceRoot":"","sources":["../../../../src/features/magic-context/dreamer/tick-failure.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAKvD,MAAM,WAAW,kBAAkB;IAC/B,gEAAgE;IAChE,EAAE,EAAE,MAAM,CAAC;IACX;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd,0DAA0D;IAC1D,OAAO,EAAE,MAAM,CAAC;CACnB;AA6BD,mFAAmF;AACnF,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,QAAQ,GAAG,kBAAkB,GAAG,IAAI,CAM7E;AAED,6EAA6E;AAC7E,wBAAgB,wBAAwB,CAAC,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,kBAAkB,GAAG,IAAI,CAKxF;AAED,+DAA+D;AAC/D,wBAAgB,uBAAuB,CAAC,EAAE,EAAE,QAAQ,GAAG,IAAI,CAE1D;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,kBAAkB,GAAG,MAAM,CAS5E"}
|