@cortexkit/opencode-magic-context 0.42.6 → 0.43.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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/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-t2vb0wnx.js} +3 -3
- package/dist/{derive-budgets-v1fkhjjr.js → derive-budgets-0sg5vp61.js} +5 -2
- 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 +48 -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.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.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.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/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/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.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/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 +24 -3
- package/dist/hooks/magic-context/rust-mode-transform.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-8w1skpnm.js} +85 -5
- package/dist/index-99sfbrrf.js +170 -0
- package/dist/index-9skq8m9y.js +16 -0
- package/dist/{index-djp6rwz6.js → index-d0dh7v0f.js} +28130 -30282
- package/dist/{index-s61hh7gv.js → index-rpz2me0v.js} +94 -72
- package/dist/{index-ngjmj6xx.js → index-rvwvdq59.js} +1 -1
- package/dist/index-w2ety11c.js +393 -0
- package/dist/index-y5145x8k.js +619 -0
- package/dist/index-ygwdyntq.js +5407 -0
- package/dist/{index-a9ssj59b.js → index-ykg9sdzz.js} +55 -15
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5749 -3006
- package/dist/message-time-backfill-gzjer78y.js +108 -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-ec3jkvhg.js +61 -0
- package/dist/{recomp-orchestrator-0xx1364v.js → recomp-orchestrator-6akjp11f.js} +8 -8
- package/dist/{send-session-notification-jbxknvar.js → send-session-notification-f6gwkesy.js} +2 -2
- 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/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/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-ex4nt0q0.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 +1 -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 +58 -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 +141678 -111890
- 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-5akc87gr.js +16 -0
- package/package.json +8 -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/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 +43 -0
- package/src/shared/model-suggestion-retry.ts +12 -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/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/storage-meta-session-z818pn1e.js +0 -20
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/transform.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/transform.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAC;AAgBlF,OAAO,EACH,KAAK,2BAA2B,EAEnC,MAAM,kDAAkD,CAAC;AAG1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AAIxE,OAAO,EACH,KAAK,eAAe,EAQvB,MAAM,sCAAsC,CAAC;AAoB9C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sDAAsD,CAAC;AAEjG,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAMlE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,KAA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,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,sBAAsB,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;CAAE,EACrF,oBAAoB,CAAC,EAAE,MAAM,GAC9B,MAAM,GAAG,SAAS,CAqCpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wrapup-orchestrator.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/wrapup-orchestrator.ts"],"names":[],"mappings":"AA0BA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAQvE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAIlE,MAAM,WAAW,oBAAqB,SAAQ,oBAAoB;IAC9D,YAAY,EAAE,MAAM,CAAC;IACrB,0BAA0B,EAAE,MAAM,CAAC;IACnC,qBAAqB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC;IACvD,4BAA4B,CAAC,EAAE,OAAO,mBAAmB,CAAC;IAC1D,wBAAwB,CAAC,EAAE,MAAM,CAAC;CACrC;AAED,MAAM,WAAW,aAAa;IAC1B,cAAc,EAAE,MAAM,CAAC;CAC1B;
|
|
1
|
+
{"version":3,"file":"wrapup-orchestrator.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/wrapup-orchestrator.ts"],"names":[],"mappings":"AA0BA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAQvE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAIlE,MAAM,WAAW,oBAAqB,SAAQ,oBAAoB;IAC9D,YAAY,EAAE,MAAM,CAAC;IACrB,0BAA0B,EAAE,MAAM,CAAC;IACnC,qBAAqB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC;IACvD,4BAA4B,CAAC,EAAE,OAAO,mBAAmB,CAAC;IAC1D,wBAAwB,CAAC,EAAE,MAAM,CAAC;CACrC;AAED,MAAM,WAAW,aAAa;IAC1B,cAAc,EAAE,MAAM,CAAC;CAC1B;AAgOD,wBAAsB,gBAAgB,CAClC,GAAG,EAAE,oBAAoB,EACzB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,aAAa,GACvB,OAAO,CAAC,MAAM,CAAC,CAkQjB"}
|
|
@@ -2,8 +2,9 @@ import {
|
|
|
2
2
|
sessionLog
|
|
3
3
|
} from "./index-qp20p2py.js";
|
|
4
4
|
import {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
localBudget,
|
|
6
|
+
calibrationForModelKey
|
|
7
|
+
} from "./index-y5145x8k.js";
|
|
7
8
|
import {
|
|
8
9
|
getHarness,
|
|
9
10
|
getDataDir,
|
|
@@ -14,6 +15,67 @@ import {
|
|
|
14
15
|
import { mkdirSync, readFileSync as readFileSync2, renameSync, writeFileSync } from "node:fs";
|
|
15
16
|
import { join as join2 } from "node:path";
|
|
16
17
|
|
|
18
|
+
// src/shared/harness-provider-map.ts
|
|
19
|
+
var CANONICAL_TO_PI_PROVIDER = {
|
|
20
|
+
openai: "openai-codex",
|
|
21
|
+
google: "google-antigravity"
|
|
22
|
+
};
|
|
23
|
+
var PI_TO_CANONICAL_PROVIDER = {
|
|
24
|
+
"openai-codex": "openai",
|
|
25
|
+
"google-antigravity": "google"
|
|
26
|
+
};
|
|
27
|
+
var CANONICAL_TO_OMP_PROVIDER = {
|
|
28
|
+
openai: "openai-codex",
|
|
29
|
+
google: "google-antigravity",
|
|
30
|
+
opencode: "opencode-zen"
|
|
31
|
+
};
|
|
32
|
+
var OMP_TO_CANONICAL_PROVIDER = {
|
|
33
|
+
"openai-codex": "openai",
|
|
34
|
+
"google-antigravity": "google",
|
|
35
|
+
"opencode-zen": "opencode"
|
|
36
|
+
};
|
|
37
|
+
var CANONICAL_MODEL_IDENTITY_ALIASES = {
|
|
38
|
+
"github-copilot/gpt-6-astra": "openai/gpt-6-astra"
|
|
39
|
+
};
|
|
40
|
+
function remapProviderPrefix(ref, map) {
|
|
41
|
+
if (typeof ref !== "string")
|
|
42
|
+
return ref;
|
|
43
|
+
const slash = ref.indexOf("/");
|
|
44
|
+
if (slash <= 0)
|
|
45
|
+
return ref;
|
|
46
|
+
const provider = ref.slice(0, slash);
|
|
47
|
+
if (!Object.hasOwn(map, provider))
|
|
48
|
+
return ref;
|
|
49
|
+
return `${map[provider]}${ref.slice(slash)}`;
|
|
50
|
+
}
|
|
51
|
+
function canonicalModelIdentity(ref) {
|
|
52
|
+
const harnessCanonical = piModelRefToCanonical(ompModelRefToCanonical(ref));
|
|
53
|
+
return CANONICAL_MODEL_IDENTITY_ALIASES[harnessCanonical.toLowerCase()] ?? harnessCanonical;
|
|
54
|
+
}
|
|
55
|
+
function piModelRefToCanonical(ref) {
|
|
56
|
+
return remapProviderPrefix(ref, PI_TO_CANONICAL_PROVIDER);
|
|
57
|
+
}
|
|
58
|
+
function resolveModelRefForPi(ref) {
|
|
59
|
+
return remapProviderPrefix(piModelRefToCanonical(ref), CANONICAL_TO_PI_PROVIDER);
|
|
60
|
+
}
|
|
61
|
+
function modelRefLookupOrder(ref) {
|
|
62
|
+
const canonical = piModelRefToCanonical(ompModelRefToCanonical(ref));
|
|
63
|
+
return [
|
|
64
|
+
...new Set([
|
|
65
|
+
canonical,
|
|
66
|
+
ref,
|
|
67
|
+
resolveModelRefForPi(canonical),
|
|
68
|
+
resolveModelRefForOmp(canonical)
|
|
69
|
+
])
|
|
70
|
+
];
|
|
71
|
+
}
|
|
72
|
+
function ompModelRefToCanonical(ref) {
|
|
73
|
+
return remapProviderPrefix(ref, OMP_TO_CANONICAL_PROVIDER);
|
|
74
|
+
}
|
|
75
|
+
function resolveModelRefForOmp(ref) {
|
|
76
|
+
return remapProviderPrefix(ompModelRefToCanonical(ref), CANONICAL_TO_OMP_PROVIDER);
|
|
77
|
+
}
|
|
78
|
+
|
|
17
79
|
// src/shared/storage-permissions.ts
|
|
18
80
|
var enforcePrivateStoragePermissions = true;
|
|
19
81
|
function setStoragePrivatePermissionEnforcement(enforce) {
|
|
@@ -32,6 +94,9 @@ var PI_OUTPUT_FLOOR = 4096;
|
|
|
32
94
|
var OPENCODE_OUTPUT_CAP = 32000;
|
|
33
95
|
var MIN_PLAUSIBLE_CONTEXT_LIMIT = 1024;
|
|
34
96
|
var OUTPUT_RESERVE_CAP_RATIO = 0.25;
|
|
97
|
+
function catalogOutputReserve(window, output) {
|
|
98
|
+
return Math.min(output ?? 0, Math.floor(window * OUTPUT_RESERVE_CAP_RATIO));
|
|
99
|
+
}
|
|
35
100
|
var PROVIDER_GEOMETRY = {
|
|
36
101
|
anthropic: "shared_truncating",
|
|
37
102
|
xai: "shared_truncating",
|
|
@@ -431,9 +496,8 @@ function applyProvenInputFloor(geometry, provenInputTokens) {
|
|
|
431
496
|
};
|
|
432
497
|
}
|
|
433
498
|
function formatWindowDerivationLine(inputTokens, result) {
|
|
434
|
-
const percentage = result.usableSoft > 0 ? inputTokens / result.usableSoft * 100 : 0;
|
|
435
499
|
const reserveLabel = result.derivation.reserveSource === "wall_margin" ? "wall margin" : result.derivation.reserveSource === "none" ? "reserve" : "output reserve";
|
|
436
|
-
return
|
|
500
|
+
return `${formatCompactTokens(inputTokens)} / ${formatCompactTokens(result.usableSoft)} usable · window ${formatCompactTokens(result.derivation.window)} · ${formatCompactTokens(result.derivation.reserve)} ${reserveLabel}`;
|
|
437
501
|
}
|
|
438
502
|
function formatCompactTokens(value) {
|
|
439
503
|
if (Math.abs(value) >= 1e6) {
|
|
@@ -719,6 +783,10 @@ function modelSupportsVision(providerID, modelID) {
|
|
|
719
783
|
const colon = modelID.lastIndexOf(":");
|
|
720
784
|
return colon > 0 ? apiCache.get(`${providerID}/${modelID.slice(0, colon)}`)?.vision === true : false;
|
|
721
785
|
}
|
|
786
|
+
function getSdkOutputLimit(providerID, modelID) {
|
|
787
|
+
loadPersistedApiCacheOnce();
|
|
788
|
+
return lookupMetadataWithTagFallback(apiCache, providerID, modelID)?.outputLimit;
|
|
789
|
+
}
|
|
722
790
|
function lookupMetadataWithTagFallback(cache, providerID, modelID) {
|
|
723
791
|
if (!cache)
|
|
724
792
|
return;
|
|
@@ -731,6 +799,13 @@ function lookupMetadataWithTagFallback(cache, providerID, modelID) {
|
|
|
731
799
|
}
|
|
732
800
|
return;
|
|
733
801
|
}
|
|
802
|
+
function getModelsDevCacheState() {
|
|
803
|
+
return {
|
|
804
|
+
apiLoaded: apiCache !== null,
|
|
805
|
+
apiCount: apiCache?.size ?? 0,
|
|
806
|
+
apiAgeMs: apiLoadedAt > 0 ? Date.now() - apiLoadedAt : -1
|
|
807
|
+
};
|
|
808
|
+
}
|
|
734
809
|
|
|
735
810
|
// src/hooks/magic-context/derive-budgets.ts
|
|
736
811
|
var TRIGGER_BUDGET_PERCENTAGE = 0.05;
|
|
@@ -776,5 +851,10 @@ function resolveHistorianContextLimit2(historianModelOverride) {
|
|
|
776
851
|
}
|
|
777
852
|
return DEFAULT_HISTORIAN_CONTEXT_FALLBACK;
|
|
778
853
|
}
|
|
854
|
+
function producerSourceLocalBudget2(providerTokens, modelKey) {
|
|
855
|
+
const seed = calibrationForModelKey(modelKey);
|
|
856
|
+
const ratio = Math.max(seed.proseRatio, seed.toolsRatio);
|
|
857
|
+
return ratio === 1 ? providerTokens : localBudget(providerTokens, ratio);
|
|
858
|
+
}
|
|
779
859
|
|
|
780
|
-
export { setStoragePrivatePermissionEnforcement, shouldEnforcePrivateStoragePermissions, setWindowOverlayPath, reloadWindowOverlay, hasTrustedAbsoluteWall, applyProvenInputFloor, formatWindowDerivationLine, isSaneLimit, setOutputReserveConfig, refreshModelLimitsFromApi, refreshModelLimitsAfterAuthOnce, getSdkWindowGeometry, getSdkContextLimit, modelSupportsVision, deriveTriggerBudget2, deriveHistorianChunkTokens2, resolveKnownHistorianContextLimit2, resolveHistorianContextLimit2 };
|
|
860
|
+
export { canonicalModelIdentity, piModelRefToCanonical, modelRefLookupOrder, setStoragePrivatePermissionEnforcement, shouldEnforcePrivateStoragePermissions, catalogOutputReserve, setWindowOverlayPath, reloadWindowOverlay, hasTrustedAbsoluteWall, applyProvenInputFloor, formatWindowDerivationLine, isSaneLimit, setOutputReserveConfig, resolveLimit, refreshModelLimitsFromApi, refreshModelLimitsAfterAuthOnce, getSdkWindowGeometry, getSdkContextLimit, modelSupportsVision, getSdkOutputLimit, getModelsDevCacheState, deriveTriggerBudget2, deriveHistorianChunkTokens2, resolveKnownHistorianContextLimit2, resolveHistorianContextLimit2, producerSourceLocalBudget2 };
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import {
|
|
2
|
+
resolveDreamerTaskModel2
|
|
3
|
+
} from "./index-7k55qm8a.js";
|
|
4
|
+
|
|
5
|
+
// src/features/magic-context/dreamer/task-registry.ts
|
|
6
|
+
var CANONICAL_DREAM_TASKS = [
|
|
7
|
+
"map-memories",
|
|
8
|
+
"verify",
|
|
9
|
+
"verify-broad",
|
|
10
|
+
"curate",
|
|
11
|
+
"compress-cues",
|
|
12
|
+
"classify-memories",
|
|
13
|
+
"retrospective",
|
|
14
|
+
"maintain-docs",
|
|
15
|
+
"evaluate-smart-notes",
|
|
16
|
+
"review-user-memories",
|
|
17
|
+
"promote-primers",
|
|
18
|
+
"refresh-primers"
|
|
19
|
+
];
|
|
20
|
+
var DREAM_TASK_CAPABILITIES = {
|
|
21
|
+
"map-memories": {
|
|
22
|
+
requiresTools: true,
|
|
23
|
+
transport: "tool-loop",
|
|
24
|
+
toolLoopPurpose: "needs read-only file tools to locate the code each memory describes"
|
|
25
|
+
},
|
|
26
|
+
verify: {
|
|
27
|
+
requiresTools: true,
|
|
28
|
+
transport: "tool-loop",
|
|
29
|
+
toolLoopPurpose: "needs read-only file tools to re-check each memory against the code"
|
|
30
|
+
},
|
|
31
|
+
"verify-broad": {
|
|
32
|
+
requiresTools: true,
|
|
33
|
+
transport: "tool-loop",
|
|
34
|
+
toolLoopPurpose: "needs read-only file tools to re-check each memory against the code"
|
|
35
|
+
},
|
|
36
|
+
curate: {
|
|
37
|
+
requiresTools: true,
|
|
38
|
+
transport: "tool-loop",
|
|
39
|
+
toolLoopPurpose: "needs the ctx_memory tool to apply its merge and archive decisions"
|
|
40
|
+
},
|
|
41
|
+
"compress-cues": { requiresTools: false, transport: "single-shot" },
|
|
42
|
+
"classify-memories": { requiresTools: false, transport: "single-shot" },
|
|
43
|
+
retrospective: {
|
|
44
|
+
requiresTools: true,
|
|
45
|
+
transport: "tool-loop",
|
|
46
|
+
toolLoopPurpose: "needs search tools to investigate the friction it finds in past sessions"
|
|
47
|
+
},
|
|
48
|
+
"maintain-docs": {
|
|
49
|
+
requiresTools: true,
|
|
50
|
+
transport: "tool-loop",
|
|
51
|
+
toolLoopPurpose: "needs file read and write tools to update project documentation"
|
|
52
|
+
},
|
|
53
|
+
"evaluate-smart-notes": { requiresTools: false, transport: "single-shot" },
|
|
54
|
+
"review-user-memories": { requiresTools: false, transport: "single-shot" },
|
|
55
|
+
"promote-primers": { requiresTools: false, transport: "host-only" },
|
|
56
|
+
"refresh-primers": {
|
|
57
|
+
requiresTools: true,
|
|
58
|
+
transport: "tool-loop",
|
|
59
|
+
toolLoopPurpose: "needs read-only investigation tools to answer each standing question"
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
function toolLoopDreamTasks() {
|
|
63
|
+
return CANONICAL_DREAM_TASKS.filter((task) => DREAM_TASK_CAPABILITIES[task].requiresTools);
|
|
64
|
+
}
|
|
65
|
+
function formatUnsupportedDreamTasks(tasks, code) {
|
|
66
|
+
return tasks.map((task) => {
|
|
67
|
+
const purpose = DREAM_TASK_CAPABILITIES[task].toolLoopPurpose;
|
|
68
|
+
return `- ${task}: unavailable on this host (${code})${purpose ? ` — ${purpose}` : ""}`;
|
|
69
|
+
}).join(`
|
|
70
|
+
`);
|
|
71
|
+
}
|
|
72
|
+
function formatDreamTaskBacklogs(backlogs, tasks = CANONICAL_DREAM_TASKS) {
|
|
73
|
+
return tasks.filter((task) => backlogs[task] !== undefined).map((task) => {
|
|
74
|
+
const backlog = backlogs[task];
|
|
75
|
+
if (task === "curate" && backlog?.category) {
|
|
76
|
+
return `- curate: ${backlog.category} (${backlog.pending})`;
|
|
77
|
+
}
|
|
78
|
+
return `- ${task}: ${backlog?.pending ?? 0} pending / ${backlog?.total ?? 0} total`;
|
|
79
|
+
}).join(`
|
|
80
|
+
`);
|
|
81
|
+
}
|
|
82
|
+
var FAILURE_TEXT_BUDGET = 180;
|
|
83
|
+
function sinceLabel(lastSucceededAt, now) {
|
|
84
|
+
if (lastSucceededAt === null || lastSucceededAt <= 0)
|
|
85
|
+
return "never succeeded";
|
|
86
|
+
const hours = Math.max(0, Math.floor((now - lastSucceededAt) / 3600000));
|
|
87
|
+
if (hours < 1)
|
|
88
|
+
return "last succeeded under an hour ago";
|
|
89
|
+
if (hours < 48)
|
|
90
|
+
return `last succeeded ${hours}h ago`;
|
|
91
|
+
return `last succeeded ${Math.floor(hours / 24)}d ago`;
|
|
92
|
+
}
|
|
93
|
+
function formatDreamTaskFailures(failures, now = Date.now()) {
|
|
94
|
+
return failures.map((failure) => {
|
|
95
|
+
const error = failure.error.length > FAILURE_TEXT_BUDGET ? `${failure.error.slice(0, FAILURE_TEXT_BUDGET)}…` : failure.error;
|
|
96
|
+
return `- ${failure.task}: failing (${sinceLabel(failure.lastSucceededAt, now)}) — ${error}`;
|
|
97
|
+
}).join(`
|
|
98
|
+
`);
|
|
99
|
+
}
|
|
100
|
+
function processedDreamTaskItems(startPending, endPending) {
|
|
101
|
+
return Math.max(0, startPending - endPending);
|
|
102
|
+
}
|
|
103
|
+
var MEMORY_DOMAIN_TASKS = [
|
|
104
|
+
"map-memories",
|
|
105
|
+
"verify",
|
|
106
|
+
"verify-broad",
|
|
107
|
+
"curate",
|
|
108
|
+
"compress-cues",
|
|
109
|
+
"classify-memories",
|
|
110
|
+
"retrospective",
|
|
111
|
+
"promote-primers",
|
|
112
|
+
"refresh-primers"
|
|
113
|
+
];
|
|
114
|
+
var MEMORY_DOMAIN_SET = new Set(MEMORY_DOMAIN_TASKS);
|
|
115
|
+
function leaseKindFor(task) {
|
|
116
|
+
if (MEMORY_DOMAIN_SET.has(task))
|
|
117
|
+
return "memory";
|
|
118
|
+
switch (task) {
|
|
119
|
+
case "review-user-memories":
|
|
120
|
+
return "user-memories";
|
|
121
|
+
case "promote-primers":
|
|
122
|
+
case "refresh-primers":
|
|
123
|
+
return "memory";
|
|
124
|
+
case "maintain-docs":
|
|
125
|
+
return "maintain-docs";
|
|
126
|
+
case "evaluate-smart-notes":
|
|
127
|
+
return "evaluate-smart-notes";
|
|
128
|
+
default:
|
|
129
|
+
return "memory";
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
function leaseKeyFor(task, projectIdentity) {
|
|
133
|
+
const kind = leaseKindFor(task);
|
|
134
|
+
return kind === "user-memories" ? "user-memories" : `${kind}:${projectIdentity}`;
|
|
135
|
+
}
|
|
136
|
+
function isCanonicalDreamTask(value) {
|
|
137
|
+
return CANONICAL_DREAM_TASKS.includes(value);
|
|
138
|
+
}
|
|
139
|
+
function compareTaskOrder(a, b) {
|
|
140
|
+
return CANONICAL_DREAM_TASKS.indexOf(a) - CANONICAL_DREAM_TASKS.indexOf(b);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// src/features/magic-context/dreamer/task-config.ts
|
|
144
|
+
function buildDreamTaskRuntimeConfigs2(dreamer, harness, language, muralModel) {
|
|
145
|
+
return CANONICAL_DREAM_TASKS.map((task) => {
|
|
146
|
+
const resolved = resolveDreamerTaskModel2({
|
|
147
|
+
config: { dreamer },
|
|
148
|
+
harness,
|
|
149
|
+
task,
|
|
150
|
+
muralModel
|
|
151
|
+
});
|
|
152
|
+
return {
|
|
153
|
+
task,
|
|
154
|
+
schedule: resolved.schedule ?? "",
|
|
155
|
+
model: resolved.primary,
|
|
156
|
+
fallbackModels: resolved.fallbacks,
|
|
157
|
+
thinkingLevel: harness === "pi" ? resolved.primary?.qualifier : undefined,
|
|
158
|
+
language,
|
|
159
|
+
timeoutMinutes: resolved.timeoutMinutes ?? 20,
|
|
160
|
+
promotionThreshold: resolved.promotionThreshold,
|
|
161
|
+
docsMaxTokens: task === "maintain-docs" ? dreamer?.tasks?.["maintain-docs"]?.max_tokens ?? 12000 : undefined,
|
|
162
|
+
retrospectiveRecencyDays: task === "retrospective" ? dreamer?.tasks?.retrospective?.recency_days ?? 30 : undefined
|
|
163
|
+
};
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
function userMemoryCollectionEnabled2(dreamer) {
|
|
167
|
+
const schedule = dreamer?.tasks?.["review-user-memories"]?.schedule;
|
|
168
|
+
return typeof schedule === "string" && schedule.trim() !== "";
|
|
169
|
+
}
|
|
170
|
+
export { CANONICAL_DREAM_TASKS, DREAM_TASK_CAPABILITIES, toolLoopDreamTasks, formatUnsupportedDreamTasks, formatDreamTaskBacklogs, formatDreamTaskFailures, processedDreamTaskItems, leaseKindFor, leaseKeyFor, isCanonicalDreamTask, compareTaskOrder, buildDreamTaskRuntimeConfigs2, userMemoryCollectionEnabled2 };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
log
|
|
3
|
+
} from "./index-qp20p2py.js";
|
|
4
|
+
|
|
5
|
+
// src/shared/write-transaction-timing.ts
|
|
6
|
+
var SLOW_WRITE_TRANSACTION_THRESHOLD_MS = 1000;
|
|
7
|
+
function logSlowWriteTransaction(site, startedAt, thresholdMs = SLOW_WRITE_TRANSACTION_THRESHOLD_MS, completedAtMs = performance.now()) {
|
|
8
|
+
try {
|
|
9
|
+
const durationMs = completedAtMs - startedAt;
|
|
10
|
+
if (durationMs < thresholdMs)
|
|
11
|
+
return;
|
|
12
|
+
log(`[magic-context] slow write transaction: site=${site} held=${durationMs.toFixed(1)}ms`);
|
|
13
|
+
} catch {}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { logSlowWriteTransaction };
|