@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,229 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The content of the `/ctx-status` view: one section/row model that every host
|
|
3
|
+
* renders with its own drawing primitives.
|
|
4
|
+
*
|
|
5
|
+
* OpenCode 1 and OpenCode 2 paint it with the Solid/OpenTUI dialog component,
|
|
6
|
+
* Pi paints it with its own line-based overlay renderer. Neither host decides
|
|
7
|
+
* WHICH rows exist, what they are called, in which order they appear, or what
|
|
8
|
+
* colour they carry — that is decided here, once, so a row cannot appear on one
|
|
9
|
+
* host and be missing on another.
|
|
10
|
+
*
|
|
11
|
+
* Colours are semantic tones ("accent", "warning", …) rather than hex values,
|
|
12
|
+
* because each host resolves them against its own theme. The one exception is
|
|
13
|
+
* the token-breakdown palette: those colours identify a context category across
|
|
14
|
+
* the status view AND the sidebar, so they are fixed hex values shared by both.
|
|
15
|
+
*/
|
|
16
|
+
import type { DreamerTickFailure } from "../features/magic-context/dreamer/tick-failure";
|
|
17
|
+
import { type ConfigParseFailure } from "./config-diagnostics";
|
|
18
|
+
import type { TailHygieneStatus } from "./rpc-types";
|
|
19
|
+
import { type UserFacingFailureKey } from "./user-facing-codes";
|
|
20
|
+
import { type WindowGeometryResult } from "./window-geometry";
|
|
21
|
+
/** Theme-independent colour role; each host maps these onto its own palette. */
|
|
22
|
+
export type StatusTone = "accent" | "text" | "muted" | "warning" | "error";
|
|
23
|
+
export interface StatusRow {
|
|
24
|
+
readonly label: string;
|
|
25
|
+
readonly value: string;
|
|
26
|
+
readonly tone: StatusTone;
|
|
27
|
+
}
|
|
28
|
+
export interface StatusSection {
|
|
29
|
+
readonly title: string;
|
|
30
|
+
/**
|
|
31
|
+
* Characters reserved for the label column of this section. Labels are
|
|
32
|
+
* padded to it and values start after it, so a label can never be squeezed
|
|
33
|
+
* into a mid-word wrap by a long value next to it.
|
|
34
|
+
*/
|
|
35
|
+
readonly labelWidth: number;
|
|
36
|
+
readonly rows: readonly StatusRow[];
|
|
37
|
+
}
|
|
38
|
+
/** One coloured slice of the breakdown bar, sized by its token count. */
|
|
39
|
+
export interface StatusBarSegment {
|
|
40
|
+
readonly label: string;
|
|
41
|
+
readonly tokens: number;
|
|
42
|
+
readonly color: string;
|
|
43
|
+
}
|
|
44
|
+
export interface StatusBreakdownRow {
|
|
45
|
+
readonly label: string;
|
|
46
|
+
readonly value: string;
|
|
47
|
+
readonly color: string;
|
|
48
|
+
}
|
|
49
|
+
export interface StatusWarning {
|
|
50
|
+
readonly text: string;
|
|
51
|
+
readonly tone: "warning" | "error";
|
|
52
|
+
}
|
|
53
|
+
export interface StatusHeadlineCell {
|
|
54
|
+
readonly text: string;
|
|
55
|
+
readonly tone: StatusTone;
|
|
56
|
+
}
|
|
57
|
+
export interface StatusView {
|
|
58
|
+
readonly title: string;
|
|
59
|
+
readonly version: string;
|
|
60
|
+
/** Left cell is pressure against the threshold, right cell is the absolute count. */
|
|
61
|
+
readonly headline: {
|
|
62
|
+
readonly left: StatusHeadlineCell;
|
|
63
|
+
readonly right: StatusHeadlineCell;
|
|
64
|
+
};
|
|
65
|
+
readonly windowLine: string | null;
|
|
66
|
+
readonly bar: readonly StatusBarSegment[];
|
|
67
|
+
readonly breakdown: readonly StatusBreakdownRow[];
|
|
68
|
+
readonly hygiene: StatusRow | null;
|
|
69
|
+
readonly sections: readonly StatusSection[];
|
|
70
|
+
readonly warnings: readonly StatusWarning[];
|
|
71
|
+
readonly footer: string;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* The status fields the view reads. Field names follow the OpenCode RPC
|
|
75
|
+
* `StatusDetail`, so that host passes its snapshot straight in; Pi builds the
|
|
76
|
+
* same shape from its own detail (see `statusViewSourceFromPiDetail`).
|
|
77
|
+
*/
|
|
78
|
+
export interface StatusViewSource {
|
|
79
|
+
readonly usagePercentage: number;
|
|
80
|
+
readonly inputTokens: number;
|
|
81
|
+
readonly contextLimit: number;
|
|
82
|
+
readonly executeThreshold: number;
|
|
83
|
+
readonly executeThresholdClamped?: boolean;
|
|
84
|
+
readonly windowGeometry?: WindowGeometryResult;
|
|
85
|
+
readonly tailHygiene?: TailHygieneStatus;
|
|
86
|
+
readonly systemPromptTokens: number;
|
|
87
|
+
readonly docsTokens: number;
|
|
88
|
+
readonly compartmentTokens: number;
|
|
89
|
+
readonly compartmentCount: number;
|
|
90
|
+
readonly factTokens: number;
|
|
91
|
+
readonly memoryTokens: number;
|
|
92
|
+
readonly memoryBlockCount: number;
|
|
93
|
+
readonly profileTokens: number;
|
|
94
|
+
readonly conversationTokens: number;
|
|
95
|
+
readonly toolCallTokens: number;
|
|
96
|
+
readonly toolDefinitionTokens: number;
|
|
97
|
+
readonly activeTags: number;
|
|
98
|
+
readonly droppedTags: number;
|
|
99
|
+
readonly totalTags: number;
|
|
100
|
+
readonly activeBytes: number;
|
|
101
|
+
/** False when only a module-side total is authoritative; active/dropped are then unknown. */
|
|
102
|
+
readonly tagCountsAuthoritative?: boolean;
|
|
103
|
+
readonly lastNudgeTokens: number;
|
|
104
|
+
readonly pendingOpsCount: number;
|
|
105
|
+
readonly compactionMarker?: {
|
|
106
|
+
readonly code: "MC-C11" | null;
|
|
107
|
+
readonly attempts: number;
|
|
108
|
+
readonly lastError: string | null;
|
|
109
|
+
readonly pendingSinceMs: number | null;
|
|
110
|
+
};
|
|
111
|
+
readonly protectedTagCount: number;
|
|
112
|
+
readonly isSubagent: boolean;
|
|
113
|
+
readonly cacheTtl: string;
|
|
114
|
+
readonly cacheTtlSource?: "config" | "session" | "default";
|
|
115
|
+
readonly cacheTtlModelKey?: string;
|
|
116
|
+
readonly lastResponseTime: number;
|
|
117
|
+
readonly cacheRemainingMs: number;
|
|
118
|
+
readonly cacheExpired: boolean;
|
|
119
|
+
readonly cacheNeverExpires?: boolean;
|
|
120
|
+
readonly historyBlockTokens: number;
|
|
121
|
+
readonly compressionBudget: number | null;
|
|
122
|
+
readonly compressionUsage: string | null;
|
|
123
|
+
readonly lastDreamerRunAt?: number | null;
|
|
124
|
+
/**
|
|
125
|
+
* Dreamer tasks the running host cannot execute, by name. Shown so the
|
|
126
|
+
* unavailable maintenance is visible as a named list rather than as a
|
|
127
|
+
* backlog that silently never falls.
|
|
128
|
+
*/
|
|
129
|
+
readonly dreamerUnsupportedTasks?: readonly string[];
|
|
130
|
+
/**
|
|
131
|
+
* Set when the last background maintenance pass stopped before finishing.
|
|
132
|
+
* Shown so "the dreamer has nothing to do" and "the dreamer never got to
|
|
133
|
+
* its work" are not the same blank space in this view.
|
|
134
|
+
*/
|
|
135
|
+
readonly dreamerTickFailure?: DreamerTickFailure | null;
|
|
136
|
+
readonly memoryCount: number;
|
|
137
|
+
readonly sessionNoteCount?: number;
|
|
138
|
+
readonly readySmartNoteCount?: number;
|
|
139
|
+
readonly archivedCompartmentCount?: number;
|
|
140
|
+
readonly configParseFailures?: readonly ConfigParseFailure[];
|
|
141
|
+
readonly configGeneration?: number;
|
|
142
|
+
readonly configAdoptedAt?: number;
|
|
143
|
+
readonly configReloadFailure?: {
|
|
144
|
+
readonly path: string;
|
|
145
|
+
readonly message: string;
|
|
146
|
+
};
|
|
147
|
+
/** OpenCode spells this `compaction_enabled`; both spellings are accepted. */
|
|
148
|
+
readonly compaction_enabled?: boolean;
|
|
149
|
+
readonly compactionEnabled?: boolean;
|
|
150
|
+
/** Failure codes to print under the sections, already selected by the host. */
|
|
151
|
+
readonly warnings?: readonly UserFacingFailureKey[];
|
|
152
|
+
readonly hiddenVariantWarnings?: readonly string[];
|
|
153
|
+
}
|
|
154
|
+
export interface StatusViewOptions {
|
|
155
|
+
/** Plugin version shown next to the title. */
|
|
156
|
+
readonly version: string;
|
|
157
|
+
/** Clock used for the cache "last response"/"remaining" values. */
|
|
158
|
+
readonly now?: number;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Category palette, kept identical to the sidebar breakdown
|
|
162
|
+
* (`src/tui/slots/sidebar-content.tsx`) so one colour means one category
|
|
163
|
+
* wherever it is drawn.
|
|
164
|
+
*/
|
|
165
|
+
export declare const STATUS_CATEGORY_COLORS: {
|
|
166
|
+
readonly system: "#c084fc";
|
|
167
|
+
readonly docs: "#22d3ee";
|
|
168
|
+
readonly compartments: "#60a5fa";
|
|
169
|
+
readonly facts: "#fbbf24";
|
|
170
|
+
readonly memories: "#34d399";
|
|
171
|
+
readonly profile: "#a3e635";
|
|
172
|
+
readonly conversation: "#f87171";
|
|
173
|
+
readonly toolCalls: "#fb923c";
|
|
174
|
+
readonly toolDefs: "#f472b6";
|
|
175
|
+
};
|
|
176
|
+
/**
|
|
177
|
+
* Columns reserved between the two section columns when the grid is drawn.
|
|
178
|
+
* The dialog draws its two columns at equal width with this gap between them.
|
|
179
|
+
*/
|
|
180
|
+
export declare const STATUS_COLUMN_GAP = 4;
|
|
181
|
+
/**
|
|
182
|
+
* Columns one section needs so that neither its labels nor its values wrap:
|
|
183
|
+
* the label column, one separating space, and the longest value in the section.
|
|
184
|
+
*/
|
|
185
|
+
export declare function statusSectionWidth(section: StatusSection): number;
|
|
186
|
+
/** How the sections are laid out at one content width. */
|
|
187
|
+
export interface StatusColumnLayout {
|
|
188
|
+
/** True when both columns fit; false means the caller draws one column. */
|
|
189
|
+
readonly twoColumn: boolean;
|
|
190
|
+
/** Columns the widest section in the left column needs. */
|
|
191
|
+
readonly leftWidth: number;
|
|
192
|
+
/** Columns the widest section in the right column needs. */
|
|
193
|
+
readonly rightWidth: number;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Whether the sections fit in two columns at this content width, and how wide
|
|
197
|
+
* each column has to be.
|
|
198
|
+
*
|
|
199
|
+
* A value never wraps, so a section needs `labelWidth + 1 + longest value`
|
|
200
|
+
* columns and the grid is drawn only when both columns' requirements plus the
|
|
201
|
+
* gap fit the content width. When they do not, the caller draws the same
|
|
202
|
+
* sections in one column instead of squeezing values into mid-word wraps.
|
|
203
|
+
*
|
|
204
|
+
* The returned widths are the columns' own requirements, so a caller that sizes
|
|
205
|
+
* its columns from them cannot wrap a value even when the two requirements are
|
|
206
|
+
* very different. Both renderers call this so neither decides the layout on its
|
|
207
|
+
* own.
|
|
208
|
+
*/
|
|
209
|
+
export declare function statusColumnsFor(sections: readonly StatusSection[], contentWidth: number): StatusColumnLayout;
|
|
210
|
+
/**
|
|
211
|
+
* Integer column widths for the breakdown bar, summing exactly to `totalWidth`.
|
|
212
|
+
*
|
|
213
|
+
* Each segment's proportional share is rounded down and the leftover columns go
|
|
214
|
+
* to the largest fractional remainders, so the widths always add up to the bar
|
|
215
|
+
* width. Rounding every segment independently instead leaves the bar short of
|
|
216
|
+
* its container by up to one column per segment, which paints as blank cells
|
|
217
|
+
* between the coloured runs.
|
|
218
|
+
*
|
|
219
|
+
* Every segment that carries tokens keeps at least one column, so a category
|
|
220
|
+
* whose share rounds below a column stays visible in the bar.
|
|
221
|
+
*/
|
|
222
|
+
export declare function distributeBarWidths(tokens: readonly number[], totalWidth: number): number[];
|
|
223
|
+
/** Compact token count, e.g. 623K. Shared so every host prints one spelling. */
|
|
224
|
+
export declare function formatStatusTokens(value: number): string;
|
|
225
|
+
/** Builds the full status view from one snapshot. */
|
|
226
|
+
export declare function buildStatusView(source: StatusViewSource, options: StatusViewOptions): StatusView;
|
|
227
|
+
/** Pads one row to its section's label column; values print flush right. */
|
|
228
|
+
export declare function formatStatusRowText(row: StatusRow, labelWidth: number, width: number): string;
|
|
229
|
+
//# sourceMappingURL=status-view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status-view.d.ts","sourceRoot":"","sources":["../../src/shared/status-view.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;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AAE,MAAM,GAAG,MAAM,CAI7F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tag-transcript.d.ts","sourceRoot":"","sources":["../../src/shared/tag-transcript.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAQzE,OAAO,EAAwB,KAAK,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAWrF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,KAAK,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"tag-transcript.d.ts","sourceRoot":"","sources":["../../src/shared/tag-transcript.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAQzE,OAAO,EAAwB,KAAK,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAWrF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,KAAK,EAAE,UAAU,EAAqC,MAAM,cAAc,CAAC;AAElF,eAAO,MAAM,wBAAwB,iBAAiB,CAAC;AAEvD,MAAM,WAAW,oBAAoB;IACjC;;;;;;OAMG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;;;;;OAOG;IACH,2BAA2B,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1D;;;;OAIG;IACH,eAAe,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACtC;;;;;OAKG;IACH,2BAA2B,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAClD,wEAAwE;IACxE,uBAAuB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9C,gFAAgF;IAChF,cAAc,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACnE,gFAAgF;IAChF,cAAc,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACnE,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,CACP,KAAK,EAAE,UAAU,GAAG,QAAQ,GAAG,SAAS,GAAG,eAAe,EAC1D,SAAS,EAAE,MAAM,KAChB,IAAI,CAAC;CACb;AAED,MAAM,WAAW,mBAAmB;IAChC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CACnC;AA4FD,wBAAgB,aAAa,CACzB,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,MAAM,EACd,EAAE,EAAE,eAAe,EACnB,OAAO,GAAE,oBAAyB,GACnC,mBAAmB,CAqXrB"}
|
|
@@ -12,5 +12,13 @@ export interface WireTailHygieneBaseline {
|
|
|
12
12
|
}
|
|
13
13
|
/** Normalize either renderer authority's persisted baseline without dropping valid zeros. */
|
|
14
14
|
export declare function resolveTailHygieneStatus(tsBaseline: Channel1State | undefined, rustBaseline?: WireTailHygieneBaseline | null): TailHygieneStatus | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* The reclaimable share and the two masses it is computed from.
|
|
17
|
+
*
|
|
18
|
+
* The tokenizer calibration makes `u` and `t` fractional, but a token count is
|
|
19
|
+
* a whole number to the reader: `63,063.522 tok` reads as a measurement error,
|
|
20
|
+
* not as precision. Both masses are rounded here, at the one formatter every
|
|
21
|
+
* host prints, so the dialog, the sidebar and Pi cannot disagree.
|
|
22
|
+
*/
|
|
15
23
|
export declare function formatTailHygiene(status: TailHygieneStatus): string;
|
|
16
24
|
//# sourceMappingURL=tail-hygiene-status.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tail-hygiene-status.d.ts","sourceRoot":"","sources":["../../src/shared/tail-hygiene-status.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,MAAM,WAAW,uBAAuB;IACpC,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,6BAA6B,CAAC,EAAE,MAAM,CAAC;CAC1C;AAMD,6FAA6F;AAC7F,wBAAgB,wBAAwB,CACpC,UAAU,EAAE,aAAa,GAAG,SAAS,EACrC,YAAY,CAAC,EAAE,uBAAuB,GAAG,IAAI,GAC9C,iBAAiB,GAAG,SAAS,CAoC/B;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,iBAAiB,GAAG,MAAM,CAInE"}
|
|
1
|
+
{"version":3,"file":"tail-hygiene-status.d.ts","sourceRoot":"","sources":["../../src/shared/tail-hygiene-status.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,MAAM,WAAW,uBAAuB;IACpC,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,6BAA6B,CAAC,EAAE,MAAM,CAAC;CAC1C;AAMD,6FAA6F;AAC7F,wBAAgB,wBAAwB,CACpC,UAAU,EAAE,aAAa,GAAG,SAAS,EACrC,YAAY,CAAC,EAAE,uBAAuB,GAAG,IAAI,GAC9C,iBAAiB,GAAG,SAAS,CAoC/B;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,iBAAiB,GAAG,MAAM,CAInE"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const TEST_TEMP_DIR_PREFIXES: readonly ["mc-plugin-test-xdg-pid-", "mc-pi-test-xdg-", "mc-conflict-", "mc-conflict-fixer-", "mc-config-secret-", "pi-reasoning-replay-", "pi-session-api-test-", "pi-symlink-test-", "pi-running-vs-stale-", "pi-dist-metadata-", "pi-traversal-", "pi-source-mode-", "pi-source-missing-", "pi-nonprefixed-", "pi-default-cond-", "pi-array-exports-", "pi-extensionless-", "pi-tsx-source-", "pi-guidance-", "pi-system-v2-", "pi-no-guidance-", "pi-guidance-dedup-", "pi-noreduce-", "pi-language-baseline-", "pi-language-unset-", "pi-language-set-", "pi-a1-guidance-", "pi-prompt-epoch-", "pi-embedding-bootstrap-", "pi-embedding-home-", "magic-context-pi-latch-test-", "magic-context-pi-index-test-", "mc-test-temp-dir-helper-"];
|
|
1
|
+
export declare const TEST_TEMP_DIR_PREFIXES: readonly ["mc-plugin-test-xdg-pid-", "mc-pi-test-xdg-", "mc-conflict-", "mc-conflict-fixer-", "mc-config-secret-", "pi-reasoning-replay-", "pi-session-api-test-", "pi-symlink-test-", "pi-running-vs-stale-", "pi-dist-metadata-", "pi-traversal-", "pi-source-mode-", "pi-source-missing-", "pi-nonprefixed-", "pi-default-cond-", "pi-array-exports-", "pi-extensionless-", "pi-tsx-source-", "pi-guidance-", "pi-system-v2-", "pi-no-guidance-", "pi-guidance-dedup-", "pi-noreduce-", "pi-language-baseline-", "pi-language-unset-", "pi-language-set-", "pi-a1-guidance-", "pi-prompt-epoch-", "pi-embedding-bootstrap-", "pi-embedding-home-", "magic-context-pi-latch-test-", "magic-context-pi-index-test-", "mc-test-temp-dir-helper-", "mc-v2-surface-", "mc-test-db-backstop-"];
|
|
2
2
|
export type TestTempDirPrefix = (typeof TEST_TEMP_DIR_PREFIXES)[number];
|
|
3
3
|
type AfterAll = (callback: () => void) => void;
|
|
4
4
|
type SweepOptions = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-temp-dir.d.ts","sourceRoot":"","sources":["../../src/shared/test-temp-dir.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,sBAAsB,
|
|
1
|
+
{"version":3,"file":"test-temp-dir.d.ts","sourceRoot":"","sources":["../../src/shared/test-temp-dir.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,sBAAsB,6vBAqCzB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC;AAExE,KAAK,QAAQ,GAAG,CAAC,QAAQ,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;AAC/C,KAAK,YAAY,GAAG;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAkBF;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC7B,MAAM,EAAE,iBAAiB,EACzB,UAAU,SAAK,GAChB;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,CAItC;AAED,2FAA2F;AAC3F,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAe1D;AAED,kFAAkF;AAClF,wBAAgB,6BAA6B,IAAI,IAAI,CAEpD;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAC7B,MAAM,EAAE,iBAAiB,EACzB,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,CAAC,GACnC,CAAC,CAOH;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAKlE;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,EACnC,OAAkB,EAClB,KAAkB,EAClB,UAAkC,GACrC,GAAE,YAAiB,GAAG,MAAM,EAAE,CAsB9B"}
|
|
@@ -6,6 +6,11 @@ export declare const USER_FACING_FAILURES: {
|
|
|
6
6
|
readonly sentence: "History compression could not finish this turn.";
|
|
7
7
|
readonly action: "It will retry automatically.";
|
|
8
8
|
};
|
|
9
|
+
readonly hidden_cleanup_unbound: {
|
|
10
|
+
readonly code: "MC-H02";
|
|
11
|
+
readonly sentence: "Some finished background sessions could not be removed from this host.";
|
|
12
|
+
readonly action: "They are removed automatically the next time Magic Context runs inside a registered OpenCode service.";
|
|
13
|
+
};
|
|
9
14
|
readonly recomp_unavailable: {
|
|
10
15
|
readonly code: "MC-R01";
|
|
11
16
|
readonly sentence: "History compression could not be rebuilt.";
|
|
@@ -46,6 +51,16 @@ export declare const USER_FACING_FAILURES: {
|
|
|
46
51
|
readonly sentence: "Memory maintenance could not finish.";
|
|
47
52
|
readonly action: "Run /ctx-dream again.";
|
|
48
53
|
};
|
|
54
|
+
readonly dreamer_tick_blocked: {
|
|
55
|
+
readonly code: "MC-D09";
|
|
56
|
+
readonly sentence: "Background maintenance is not running: its last pass stopped before it reached the scheduled tasks.";
|
|
57
|
+
readonly action: "It is retried automatically; if it keeps happening, check the Magic Context log for the stage that stopped and run `npx @cortexkit/magic-context doctor`.";
|
|
58
|
+
};
|
|
59
|
+
readonly dream_task_needs_tool_loop: {
|
|
60
|
+
readonly code: "MC-D08";
|
|
61
|
+
readonly sentence: "Some memory maintenance tasks need a tool loop this host does not provide.";
|
|
62
|
+
readonly action: "The remaining tasks still run; the listed ones are skipped on this host.";
|
|
63
|
+
};
|
|
49
64
|
readonly embedding_substitution_rejected: {
|
|
50
65
|
readonly code: "MC-E01";
|
|
51
66
|
readonly sentence: "Search indexing could not use the selected model.";
|
|
@@ -119,7 +134,7 @@ export declare const USER_FACING_FAILURES: {
|
|
|
119
134
|
readonly configuration_warning: {
|
|
120
135
|
readonly code: "MC-S03";
|
|
121
136
|
readonly sentence: "Some configuration settings could not be applied.";
|
|
122
|
-
readonly action: "Fix the configuration warning shown in /ctx-status
|
|
137
|
+
readonly action: "Fix the configuration warning shown in /ctx-status, then restart.";
|
|
123
138
|
};
|
|
124
139
|
readonly status_log_unavailable: {
|
|
125
140
|
readonly code: "MC-S04";
|
|
@@ -156,11 +171,6 @@ export declare const USER_FACING_FAILURES: {
|
|
|
156
171
|
readonly sentence: "Partial history compression is not available in the current mode.";
|
|
157
172
|
readonly action: "Run /ctx-recomp without a range.";
|
|
158
173
|
};
|
|
159
|
-
readonly session_upgrade_unavailable: {
|
|
160
|
-
readonly code: "MC-C07";
|
|
161
|
-
readonly sentence: "Session upgrade is not available in the current mode.";
|
|
162
|
-
readonly action: "Run /ctx-recomp instead.";
|
|
163
|
-
};
|
|
164
174
|
readonly smart_note_conditions_unavailable: {
|
|
165
175
|
readonly code: "MC-C08";
|
|
166
176
|
readonly sentence: "Conditional notes are not available in the current mode.";
|
|
@@ -176,6 +186,11 @@ export declare const USER_FACING_FAILURES: {
|
|
|
176
186
|
readonly sentence: "Magic Context is temporarily unavailable.";
|
|
177
187
|
readonly action: "Retry in a moment.";
|
|
178
188
|
};
|
|
189
|
+
readonly compaction_marker_missing: {
|
|
190
|
+
readonly code: "MC-C11";
|
|
191
|
+
readonly sentence: "The history boundary marker is missing from the OpenCode store, so requests carry the full session.";
|
|
192
|
+
readonly action: "It is retried on every message; if this persists, run `/ctx-flush`.";
|
|
193
|
+
};
|
|
179
194
|
readonly memory_mirror_stalled: {
|
|
180
195
|
readonly code: "MC-M01";
|
|
181
196
|
readonly sentence: "Memory synchronization stopped before the host mirror caught up.";
|
|
@@ -186,12 +201,22 @@ export declare const USER_FACING_FAILURES: {
|
|
|
186
201
|
readonly sentence: "Memory authority is inconsistent between the host and module.";
|
|
187
202
|
readonly action: "Run `ck doctor drain-authority` before changing Rust mode.";
|
|
188
203
|
};
|
|
204
|
+
readonly rust_mode_unsupported: {
|
|
205
|
+
readonly code: "MC-S06";
|
|
206
|
+
readonly sentence: "Experimental Rust transform mode is not available on this OpenCode host.";
|
|
207
|
+
readonly action: "Magic Context is running its TypeScript mode instead; set `transform_mode` to \"ts\" to stop requesting Rust.";
|
|
208
|
+
};
|
|
209
|
+
readonly dreamer_task_failing: {
|
|
210
|
+
readonly code: "MC-S05";
|
|
211
|
+
readonly sentence: "A background maintenance task keeps failing on its schedule.";
|
|
212
|
+
readonly action: "Check the Magic Context log for the failing task and its error.";
|
|
213
|
+
};
|
|
189
214
|
};
|
|
190
215
|
export type UserFacingFailureKey = keyof typeof USER_FACING_FAILURES;
|
|
191
216
|
export type UserFacingTextStyle = "markdown" | "plain";
|
|
192
217
|
export declare function renderUserFacingFailure(key: UserFacingFailureKey, style?: UserFacingTextStyle): string;
|
|
193
218
|
export declare function userFacingFailureCode(key: UserFacingFailureKey): string;
|
|
194
|
-
export type CapabilityRefusal = "memory_write" | "memory_access" | "note_change" | "note_access" | "context_cleanup" | "partial_history" | "
|
|
219
|
+
export type CapabilityRefusal = "memory_write" | "memory_access" | "note_change" | "note_access" | "context_cleanup" | "partial_history" | "smart_note_condition" | "history_compression" | "context_service";
|
|
195
220
|
export declare function renderCapabilityRefusal(capability: CapabilityRefusal): string;
|
|
196
221
|
export declare function capabilityRefusalCode(capability: CapabilityRefusal): string;
|
|
197
222
|
export declare function renderDreamFailure(failureClass: PromptFailureClass, style?: UserFacingTextStyle): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-facing-codes.d.ts","sourceRoot":"","sources":["../../src/shared/user-facing-codes.ts"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,wBAAgB,kBAAkB,CAC9B,YAAY,EAAE,kBAAkB,EAChC,KAAK,GAAE,mBAAgC,GACxC,MAAM,CAER;AAED,wBAAgB,gBAAgB,CAAC,YAAY,EAAE,kBAAkB,GAAG,MAAM,CAEzE;AAED,wBAAgB,sBAAsB,CAClC,YAAY,EAAE,qBAAqB,EACnC,KAAK,GAAE,mBAAgC,GACxC,MAAM,CAER;AAED,wBAAgB,oBAAoB,CAAC,YAAY,EAAE,qBAAqB,GAAG,MAAM,CAEhF"}
|
|
@@ -9,6 +9,9 @@ export declare const OPENCODE_OUTPUT_CAP = 32000;
|
|
|
9
9
|
* real window, so every denominator check shares this one floor.
|
|
10
10
|
*/
|
|
11
11
|
export declare const MIN_PLAUSIBLE_CONTEXT_LIMIT = 1024;
|
|
12
|
+
export declare const OUTPUT_RESERVE_CAP_RATIO = 0.25;
|
|
13
|
+
/** Catalog output ceilings are not requested output; reserve at most a quarter of a shared window. */
|
|
14
|
+
export declare function catalogOutputReserve(window: number, output: number | undefined): number;
|
|
12
15
|
export type WindowGeometry = "shared_upfront" | "shared_truncating" | "separate";
|
|
13
16
|
export type WindowReserveSource = "output_catalog" | "output_config" | "wall_margin" | "none";
|
|
14
17
|
export type WindowOverlayGrade = "provider_asserted_runtime" | "measured" | "provider_asserted_doc" | "catalog" | "unknown";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"window-geometry.d.ts","sourceRoot":"","sources":["../../src/shared/window-geometry.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,eAAO,MAAM,qBAAqB,+BAA+B,CAAC;AAClE,eAAO,MAAM,kBAAkB,OAAQ,CAAC;AACxC,eAAO,MAAM,eAAe,OAAQ,CAAC;AACrC,eAAO,MAAM,mBAAmB,QAAS,CAAC;AAE1C;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,OAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"window-geometry.d.ts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BAAyB,CACrC,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,OAAO,EAAE,MAAM,GAAG,SAAS,GAC5B,MAAM,GAAG,SAAS,CAIpB;AAeD,wBAAgB,oBAAoB,CAChC,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,UAAU,GAAG,SAAS,EACpC,OAAO,GAAE,2BAAgC,GAC1C,oBAAoB,GAAG,SAAS,CAmLlC;AAED,MAAM,WAAW,sBAAsB;IACnC,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,OAAO,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAE,CAAC;CACvD;AAED,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,oBAAoB,GAAG,OAAO,CAE9E;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CACjC,QAAQ,EAAE,oBAAoB,EAC9B,iBAAiB,EAAE,MAAM,GAAG,SAAS,GACtC,sBAAsB,CAuCxB;AAED,wBAAgB,0BAA0B,CACtC,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,oBAAoB,GAC7B,MAAM,CAcR;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAQzD"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const CTX_EXPAND_DESCRIPTION = "Recover the original conversation
|
|
1
|
+
export declare const CTX_EXPAND_DESCRIPTION = "Recover the original conversation behind your compacted history.\n\nEarlier turns are summarized in <session-history> under `## start-end \u00B7 date \u00B7 title` headings; each heading stands for the raw messages in that ordinal range. When the summary isn't enough \u2014 exact wording, a value, an error message, the reasoning behind a decision \u2014 expand the range: ctx_expand(start=120, end=245). Also works around a ctx_search message hit: start=N-10, end=N+5. Ranges after the last compartment are your live tail \u2014 already visible, not expandable.\n\nReturns the raw transcript as [N] U:/A: lines, capped at ~15K tokens; an oversized range returns the head and says where to continue.\n\nFiner recovery:\n- verbose=true lists each message separately with its ordinal and a per-part preview (tool calls with output sizes) so you can pick one.\n- message=N returns that one message in full \u2014 every text part and every tool call's complete input and output \u2014 from stored history. This is the way back to a tool output you released with ctx_reduce; if the message was deleted from history it says so.";
|
|
2
2
|
export declare const CTX_EXPAND_TOKEN_BUDGET = 15000;
|
|
3
3
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/tools/ctx-expand/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/tools/ctx-expand/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB,umCAQ2N,CAAC;AAE/P,eAAO,MAAM,uBAAuB,QAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../../src/tools/ctx-expand/render.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;
|
|
1
|
+
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../../src/tools/ctx-expand/render.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAkMH;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAkBjF;AAED,MAAM,WAAW,kBAAkB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,kEAAkE;IAClE,WAAW,EAAE,MAAM,CAAC;IACpB,gDAAgD;IAChD,SAAS,EAAE,OAAO,CAAC;CACtB;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAC9B,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,MAAM,GACpB,kBAAkB,CA0BpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../src/tools/ctx-expand/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAQ,MAAM,qBAAqB,CAAC;AAEhE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAQ5E,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAErE,MAAM,WAAW,iBAAiB;IAC9B,EAAE,EAAE,eAAe,CAAC;CACvB;
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../src/tools/ctx-expand/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAQ,MAAM,qBAAqB,CAAC;AAEhE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAQ5E,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAErE,MAAM,WAAW,iBAAiB;IAC9B,EAAE,EAAE,eAAe,CAAC;CACvB;AAwHD,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAI5F"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export declare const CTX_MEMORY_TOOL_NAME = "ctx_memory";
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const CTX_MEMORY_LIST_TOOL_NAME = "ctx_memory_list";
|
|
3
|
+
export declare const CTX_MEMORY_LIST_DESCRIPTION = "Browse active memories, optionally filter by category.";
|
|
4
|
+
export declare const CTX_MEMORY_DESCRIPTION = "Durable facts about this project, shared with every agent working on it and kept for the months this work lasts.\n\nYour active memories are already in <project-memory> as `#id: fact` lines. Write one when you learn something that must not have to be found again \u2014 a project rule, an architectural fact, a hard-won constraint, a config value, a naming convention \u2014 and especially when it cost you turns to find. One standalone fact per memory, phrased to make sense on its own. A pending intention with its evidence (\"do X later, here is what we know\") is ctx_note, not memory.\n\nActions:\n- write: new memory (content + category).\n- update: rewrite one memory whose fact changed (ids: [one], content; category optional to recategorize).\n- archive: retire wrong or obsolete memories (ids: [one or more], optional reason).\n- merge: collapse duplicates into one (ids: [two or more], content).\n- get: fetch by id (ids: 1\u201320), readable in every status.\nExamples: category=\"CONFIG_VALUES\", content=\"OpenCode source is at ~/Work/OSS/opencode\" \u00B7 category=\"CONSTRAINTS\", content=\"Dashboard Tauri build needs RGBA PNGs, not grayscale\"";
|
|
3
5
|
export declare const DEFAULT_SEARCH_LIMIT = 10;
|
|
4
6
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/tools/ctx-memory/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,eAAe,CAAC;AACjD,eAAO,MAAM,sBAAsB
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/tools/ctx-memory/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,eAAe,CAAC;AACjD,eAAO,MAAM,yBAAyB,oBAAoB,CAAC;AAC3D,eAAO,MAAM,2BAA2B,2DAA2D,CAAC;AACpG,eAAO,MAAM,sBAAsB,8oCAU8I,CAAC;AAClL,eAAO,MAAM,oBAAoB,KAAK,CAAC"}
|
|
@@ -2,4 +2,5 @@ import { type ToolDefinition } from "@opencode-ai/plugin";
|
|
|
2
2
|
import { type CtxMemoryToolDeps } from "./types";
|
|
3
3
|
export { CTX_MEMORY_LIGHT_DESCRIPTION } from "../light-descriptions";
|
|
4
4
|
export declare function createCtxMemoryTools(deps: CtxMemoryToolDeps): Record<string, ToolDefinition>;
|
|
5
|
+
export declare function createCtxMemoryListTools(deps: CtxMemoryToolDeps): Record<string, ToolDefinition>;
|
|
5
6
|
//# sourceMappingURL=tools.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../src/tools/ctx-memory/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAQ,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../src/tools/ctx-memory/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAQ,MAAM,qBAAqB,CAAC;AA6DhE,OAAO,EAKH,KAAK,iBAAiB,EACzB,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AA8kCrE,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAI5F;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAIhG"}
|
|
@@ -2,8 +2,8 @@ import type { MemorySourceType } from "../../features/magic-context/memory";
|
|
|
2
2
|
import type { RustToolBackends } from "../../plugin/rust-tool-backends";
|
|
3
3
|
import type { Database } from "../../shared/sqlite";
|
|
4
4
|
import type { ImitatedReducedArgs } from "../unwrap-imitated-reduced-args";
|
|
5
|
-
export declare const CTX_MEMORY_ACTIONS: readonly ["write", "
|
|
6
|
-
export declare const CTX_MEMORY_DREAMER_ACTIONS: readonly ["write", "
|
|
5
|
+
export declare const CTX_MEMORY_ACTIONS: readonly ["write", "update", "archive", "merge", "get"];
|
|
6
|
+
export declare const CTX_MEMORY_DREAMER_ACTIONS: readonly ["write", "update", "archive", "merge", "get", "list"];
|
|
7
7
|
export type CtxMemoryAction = (typeof CTX_MEMORY_DREAMER_ACTIONS)[number];
|
|
8
8
|
export interface CtxMemoryArgs extends ImitatedReducedArgs {
|
|
9
9
|
action?: CtxMemoryAction;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const CTX_NOTE_DESCRIPTION = "
|
|
1
|
+
export declare const CTX_NOTE_DESCRIPTION = "Session notes are pending intentions: work you intend to return to, with its findings attached.\n\nUse notes for:\n- A finding to revisit when you return to the intended work\n- A decision with its reasoning, when follow-up work remains\n- A backlog item with evidence already found\n- Something the user explicitly asks you to note\n\nDon't use notes for: the next few steps; a plan you are actively executing; restart/fold insurance; or a record of how things stand (world-state, a design at a point in time) with nothing you intend to do about it \u2014 that goes stale silently; a fact worth keeping is memory, the rest is nothing. Use todos for active work. If the detail already lives in a file, record the path and what to inspect \u2014 don't copy the file into a note. Durable project facts belong in ctx_memory, not notes.\n\nFirst line is the title (under 80 chars), followed by detail. Operations:\n- write: save a new note (content required)\n- read: one row per note \u2014 `#id \u00B7 age \u00B7 title` \u2014 ready smart notes first, then newest; rows untouched 30+ days are marked stale. Pass note_ids to read full bodies; limit/offset page; filter selects other statuses.\n- update: change one note (note_ids=[N])\n- dismiss: retire 1\u201350 notes (note_ids). Dismiss a note when its work lands or is abandoned; a queue you never dismiss from stops being read.\n- surface_condition: make it a smart note \u2014 an outside checker periodically tests the condition using only externally verifiable signals (GitHub state, files, git, releases, web), never this conversation or future actions; the note is parked until the condition holds.";
|
|
2
2
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/tools/ctx-note/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/tools/ctx-note/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,2nDAe4O,CAAC"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rendering for the ctx_note read glance, the bodies-by-id view, the write
|
|
3
|
+
* footer, and the one-line note nudge.
|
|
4
|
+
*
|
|
5
|
+
* The OpenCode plugin, the Pi plugin, and the Rust module facade must emit the
|
|
6
|
+
* same bytes for the same rows, so every format decision lives here and is
|
|
7
|
+
* mirrored in `crates/mc-module/src/lib.rs`. Change one, change the other.
|
|
8
|
+
*/
|
|
9
|
+
/** Title clip for a glance row. */
|
|
10
|
+
export declare const GLANCE_TITLE_MAX = 80;
|
|
11
|
+
/** Title clip for the single line the note nudge shows. */
|
|
12
|
+
export declare const NUDGE_TITLE_MAX = 60;
|
|
13
|
+
/** A note untouched for this long is marked stale in the glance. */
|
|
14
|
+
export declare const STALE_AFTER_MS: number;
|
|
15
|
+
/** The reply for a read that has nothing to show. */
|
|
16
|
+
export declare const EMPTY_READ_REPLY = "## Notes\n\nNo session notes or smart notes.";
|
|
17
|
+
export interface GlanceNote {
|
|
18
|
+
id: number;
|
|
19
|
+
type: string;
|
|
20
|
+
status: string;
|
|
21
|
+
content: string;
|
|
22
|
+
createdAt: number;
|
|
23
|
+
updatedAt: number;
|
|
24
|
+
}
|
|
25
|
+
export interface NoteBodySource extends GlanceNote {
|
|
26
|
+
anchorOrdinal: number | null;
|
|
27
|
+
surfaceCondition?: string | null;
|
|
28
|
+
readyReason?: string | null;
|
|
29
|
+
}
|
|
30
|
+
/** The timestamp a note's age is measured from: its last update, or its
|
|
31
|
+
* creation when it has never been updated. */
|
|
32
|
+
export declare function noteTouchedAt(note: Pick<GlanceNote, "createdAt" | "updatedAt">): number;
|
|
33
|
+
/** Compact age: `5m`, `3h`, `2d`, `6w`. */
|
|
34
|
+
export declare function formatNoteAge(touchedAt: number, nowMs: number): string;
|
|
35
|
+
/** First line of the note content, clipped to `max` characters with `…`. */
|
|
36
|
+
export declare function clipNoteTitle(content: string, max: number): string;
|
|
37
|
+
/** One glance row: `#id · age · title`, plus `· <status>` for anything that is
|
|
38
|
+
* not active and `· stale` when the note has not been touched for 30 days. */
|
|
39
|
+
export declare function formatGlanceRow(note: GlanceNote, nowMs: number): string;
|
|
40
|
+
/** Glance order: ready smart notes first, then pending smart notes, then every
|
|
41
|
+
* other status — each group newest first. */
|
|
42
|
+
export declare function orderGlanceNotes(notes: readonly GlanceNote[]): GlanceNote[];
|
|
43
|
+
/** The whole glance: one row per note, then the one-line paging footer. */
|
|
44
|
+
export declare function renderGlance(notes: readonly GlanceNote[], options: {
|
|
45
|
+
limit: number;
|
|
46
|
+
offset: number;
|
|
47
|
+
nowMs: number;
|
|
48
|
+
}): string;
|
|
49
|
+
/** Full body for one note in the bodies-by-id view: `#id`, age, status, the
|
|
50
|
+
* content, and the `↳ @msg N` anchor when the note carries one. Smart notes
|
|
51
|
+
* also carry the condition that parked them. */
|
|
52
|
+
export declare function formatNoteBody(note: NoteBodySource, nowMs: number): string;
|
|
53
|
+
/** Bodies-by-id view. Ids that are unknown or owned by someone else render the
|
|
54
|
+
* same `not_found` line, so the reply never discloses whether an inaccessible
|
|
55
|
+
* note exists. */
|
|
56
|
+
export declare function renderNotesById(entries: ReadonlyArray<{
|
|
57
|
+
noteId: number;
|
|
58
|
+
note: NoteBodySource | null;
|
|
59
|
+
}>, nowMs: number): string;
|
|
60
|
+
/** The tray line appended to a write reply: how many active session notes the
|
|
61
|
+
* writer now holds and how old the oldest one is. Empty when the tray is
|
|
62
|
+
* empty, so a first write stays a single short line. */
|
|
63
|
+
export declare function formatTraySuffix(tray: {
|
|
64
|
+
activeCount: number;
|
|
65
|
+
oldestTouchedAt: number | null;
|
|
66
|
+
}, nowMs: number): string;
|
|
67
|
+
/** The write reply: the saved-note line plus the tray line, so the writer sees
|
|
68
|
+
* the backlog at the moment they add to it. */
|
|
69
|
+
export declare function formatWriteReply(noteId: number, tray: {
|
|
70
|
+
activeCount: number;
|
|
71
|
+
oldestTouchedAt: number | null;
|
|
72
|
+
}, nowMs: number): string;
|
|
73
|
+
/**
|
|
74
|
+
* Stateless pick over a pool of `poolSize` notes: FNV-1a over the UTF-8 bytes
|
|
75
|
+
* of `${sessionId}#${counter}`. Successive nudges use successive counters, so
|
|
76
|
+
* they surface different notes, while a replayed delivery keeps the bytes it
|
|
77
|
+
* was stored with. Mirrored in Rust.
|
|
78
|
+
*/
|
|
79
|
+
export declare function noteNudgePickIndex(sessionId: string, counter: number, poolSize: number): number;
|
|
80
|
+
/** The one-line note nudge: counts first, then one clipped title. */
|
|
81
|
+
export declare function formatNoteNudge(args: {
|
|
82
|
+
readyCount: number;
|
|
83
|
+
activeCount: number;
|
|
84
|
+
oldestActiveTouchedAt: number | null;
|
|
85
|
+
shown: GlanceNote | null;
|
|
86
|
+
nowMs: number;
|
|
87
|
+
}): string;
|
|
88
|
+
//# sourceMappingURL=render.d.ts.map
|