@cortexkit/opencode-magic-context 0.42.5 → 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 +6 -7
- 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 +10 -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 +13 -2
- package/dist/config/schema/magic-context.d.ts.map +1 -1
- package/dist/{conflict-warning-hook-jyj54gbe.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 +37 -3
- 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/open-opencode-db.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 +1 -0
- package/dist/features/magic-context/memory/embedding-local.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding.d.ts +1 -1
- package/dist/features/magic-context/memory/embedding.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 +16 -0
- 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 +1 -0
- 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/session-project-backfill.d.ts.map +1 -1
- 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/index.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 -4
- package/dist/hooks/magic-context/cache-busting-signals.d.ts.map +1 -1
- package/dist/hooks/magic-context/channel2-delivery.d.ts +8 -0
- package/dist/hooks/magic-context/channel2-delivery.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 +19 -0
- 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 +4 -1
- package/dist/hooks/magic-context/module-state-sync.d.ts.map +1 -1
- package/dist/hooks/magic-context/module-transport.d.ts +24 -2
- package/dist/hooks/magic-context/module-transport.d.ts.map +1 -1
- package/dist/hooks/magic-context/module-wire.d.ts +43 -1
- 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 +47 -1
- 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 +51 -10
- package/dist/hooks/magic-context/read-session-chunk.d.ts.map +1 -1
- package/dist/hooks/magic-context/read-session-db.d.ts +8 -0
- package/dist/hooks/magic-context/read-session-db.d.ts.map +1 -1
- package/dist/hooks/magic-context/read-session-formatting.d.ts +6 -0
- package/dist/hooks/magic-context/read-session-formatting.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 +51 -0
- package/dist/hooks/magic-context/rust-mode-transform.d.ts.map +1 -1
- package/dist/hooks/magic-context/rust-refusal-recovery.d.ts +28 -0
- package/dist/hooks/magic-context/rust-refusal-recovery.d.ts.map +1 -0
- 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 +44 -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-3wbd8sdq.js → index-d0dh7v0f.js} +28107 -29850
- package/dist/{index-d8mgqezq.js → index-rpz2me0v.js} +133 -78
- package/dist/{index-p474rw9p.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-jkrqhc7y.js → index-ykg9sdzz.js} +147 -28
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7065 -3197
- 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/embedding-bootstrap.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 +109 -0
- package/dist/plugin/memory-id-translation.d.ts.map +1 -0
- 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/rust-tool-backends.d.ts +1 -1
- package/dist/plugin/rust-tool-backends.d.ts.map +1 -1
- 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-k20sfpm2.js → recomp-orchestrator-6akjp11f.js} +8 -8
- package/dist/{send-session-notification-xnypkxpx.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/auto-update-provenance.d.ts +9 -0
- package/dist/shared/auto-update-provenance.d.ts.map +1 -0
- package/dist/shared/conflict-detector.d.ts +14 -5
- 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 +46 -2
- package/dist/shared/opencode-db-path.d.ts.map +1 -1
- package/dist/shared/prompt-surface-runtime.d.ts +6 -6
- package/dist/shared/prompt-surface-runtime.d.ts.map +1 -1
- 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/mode.d.ts +31 -0
- package/dist/tools/ctx-expand/mode.d.ts.map +1 -0
- 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-note/types.d.ts +1 -1
- package/dist/tools/ctx-note/types.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 +3 -1
- 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 +114 -14
- 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 +58 -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 +32 -0
- package/dist/v2/hooks/hidden-child.d.ts.map +1 -0
- 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 +157 -19
- 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.d.ts +19 -0
- package/dist/v2/server.d.ts.map +1 -1
- package/dist/v2/server.js +141849 -110533
- package/dist/v2/store-reader.d.ts +78 -6
- 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 +33 -0
- package/dist/v2/tui/index.d.ts.map +1 -0
- 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 +148 -0
- package/dist/v2/tui/types.d.ts.map +1 -0
- package/dist/wrapup-orchestrator-5akc87gr.js +16 -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 +39 -4
- 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/protected-tokens.test.ts +40 -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 +109 -13
- 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/auto-update-provenance.ts +42 -0
- 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 +277 -7
- package/src/shared/conflict-detector.ts +221 -80
- 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.test.ts +25 -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 +174 -0
- package/src/shared/opencode-db-path.ts +193 -15
- package/src/shared/opencode-host-generation.test.ts +29 -0
- package/src/shared/prompt-surface-a1-golden.md +142 -215
- package/src/shared/prompt-surface-runtime.test.ts +20 -0
- package/src/shared/prompt-surface-runtime.ts +7 -5
- 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/entry.mjs +11 -1
- 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 +251 -0
- package/src/v2/tui/index.ts +526 -0
- 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 +132 -0
- 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-1ar7b3e9.js +0 -637
- package/dist/index-4wwr6cz0.js +0 -112
- package/dist/index-avwt563y.js +0 -62
- package/dist/storage-meta-session-x3j0q9qy.js +0 -20
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
/** @jsxImportSource @opentui/solid */
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
/**
|
|
4
|
+
* The `/ctx-status` dialog: one view, drawn from the shared status model.
|
|
5
|
+
*
|
|
6
|
+
* It lives in its own module so both host generations can mount the same
|
|
7
|
+
* component. OpenCode 1 imports it from here; OpenCode 2 loads the compiled
|
|
8
|
+
* copy (`src/tui-compiled/dialogs/status-dialog.tsx`) through the host's
|
|
9
|
+
* OpenTUI runtime registry and mounts it on its dialog surface, the same
|
|
10
|
+
* arrangement `src/v2/tui/sidebar-mount.ts` uses for the sidebar.
|
|
11
|
+
*/
|
|
12
|
+
import { createMemo, createSignal, onCleanup } from "solid-js"
|
|
13
|
+
import type { TuiPluginApi, TuiThemeCurrent } from "@opencode-ai/plugin/tui"
|
|
14
|
+
import packageJson from "../../../package.json"
|
|
15
|
+
import { statusSummaryFromDetail } from "../../shared/status-summary"
|
|
16
|
+
import {
|
|
17
|
+
buildStatusView,
|
|
18
|
+
distributeBarWidths,
|
|
19
|
+
statusColumnsFor,
|
|
20
|
+
type StatusRow,
|
|
21
|
+
type StatusSection,
|
|
22
|
+
type StatusTone,
|
|
23
|
+
type StatusViewSource,
|
|
24
|
+
} from "../../shared/status-view"
|
|
25
|
+
import { RUST_MODE_HOST_PATHS_LINE } from "../../shared/rust-mode-status"
|
|
26
|
+
import type { StatusDetail } from "../data/context-db"
|
|
27
|
+
|
|
28
|
+
const R = (props: { t: TuiThemeCurrent; l: string; v: string; fg?: string }) => (
|
|
29
|
+
<box width="100%" flexDirection="row" justifyContent="space-between">
|
|
30
|
+
<text fg={props.t.textMuted}>{props.l}</text>
|
|
31
|
+
<text fg={props.fg ?? props.t.text}>{props.v}</text>
|
|
32
|
+
</box>
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Resolves a shared status tone against this host's theme. Every row in the
|
|
37
|
+
* status dialog passes through here: a row drawn without an explicit colour
|
|
38
|
+
* takes the terminal's default foreground, which on a light theme is the same
|
|
39
|
+
* colour as the dialog background and reads as a blank page.
|
|
40
|
+
*/
|
|
41
|
+
function toneColor(theme: TuiThemeCurrent, tone: StatusTone): string {
|
|
42
|
+
if (tone === "accent") return theme.accent
|
|
43
|
+
if (tone === "muted") return theme.textMuted
|
|
44
|
+
if (tone === "warning") return theme.warning
|
|
45
|
+
if (tone === "error") return theme.error
|
|
46
|
+
return theme.text
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Width the dialog is actually laid out at, which is NOT the terminal width:
|
|
51
|
+
* each host sizes its own dialog surface (OpenCode 2's widest is 88 columns on
|
|
52
|
+
* a 200-column terminal), and that is the width the sections have to fit into.
|
|
53
|
+
* Renderables carry their laid-out width and emit "resized" when it changes, so
|
|
54
|
+
* the component reads it from its own root box.
|
|
55
|
+
*
|
|
56
|
+
* Until the first layout there is no width to read; the terminal width is the
|
|
57
|
+
* fallback, and an unknown terminal keeps the wide layout the dialog has always
|
|
58
|
+
* drawn rather than collapsing on a guess.
|
|
59
|
+
*/
|
|
60
|
+
function terminalColumns(): number {
|
|
61
|
+
const columns = process.stdout?.columns
|
|
62
|
+
return typeof columns === "number" && columns > 0 ? columns : Number.POSITIVE_INFINITY
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/** One label/value row, with the label column fixed so labels never wrap mid-word. */
|
|
66
|
+
const StatusRowView = (props: { t: TuiThemeCurrent; row: StatusRow; labelWidth: number }) => (
|
|
67
|
+
<box width="100%" flexDirection="row" justifyContent="space-between" gap={1}>
|
|
68
|
+
<box width={props.labelWidth} flexShrink={0}>
|
|
69
|
+
<text fg={props.t.textMuted}>{props.row.label}</text>
|
|
70
|
+
</box>
|
|
71
|
+
<text fg={toneColor(props.t, props.row.tone)}>{props.row.value}</text>
|
|
72
|
+
</box>
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
const StatusSectionView = (props: { t: TuiThemeCurrent; section: StatusSection }) => (
|
|
76
|
+
<box flexDirection="column" width="100%" marginTop={1}>
|
|
77
|
+
<text fg={props.t.text}>
|
|
78
|
+
<b>{props.section.title}</b>
|
|
79
|
+
</text>
|
|
80
|
+
{props.section.rows.map((row) => (
|
|
81
|
+
<StatusRowView t={props.t} row={row} labelWidth={props.section.labelWidth} />
|
|
82
|
+
))}
|
|
83
|
+
</box>
|
|
84
|
+
)
|
|
85
|
+
|
|
86
|
+
export const StatusDialog = (props: { api: TuiPluginApi; s: StatusDetail }) => {
|
|
87
|
+
const theme = createMemo(() => (props.api as any).theme.current)
|
|
88
|
+
const t = () => theme()
|
|
89
|
+
const s = () => props.s
|
|
90
|
+
const compactionOff = () => s().compaction_enabled === false
|
|
91
|
+
|
|
92
|
+
// Prefer the RPC-provided model context limit (what the sidebar shows) so the
|
|
93
|
+
// two surfaces never disagree. Fall back to deriving from usage% only when the
|
|
94
|
+
// RPC limit is absent (0) — and that derivation is itself undefined at 0%, so
|
|
95
|
+
// it stays "?" rather than showing a number inconsistent with the sidebar.
|
|
96
|
+
const contextLimit = () =>
|
|
97
|
+
s().contextLimit > 0
|
|
98
|
+
? s().contextLimit
|
|
99
|
+
: s().usagePercentage > 0
|
|
100
|
+
? Math.round(s().inputTokens / (s().usagePercentage / 100))
|
|
101
|
+
: 0
|
|
102
|
+
|
|
103
|
+
// Which rows exist, what they are called and which colour they carry is
|
|
104
|
+
// decided by the shared model, so this dialog and Pi's overlay cannot drift
|
|
105
|
+
// apart. This component only draws what the model returns.
|
|
106
|
+
const view = createMemo(() =>
|
|
107
|
+
buildStatusView(
|
|
108
|
+
{
|
|
109
|
+
...(s() as unknown as StatusViewSource),
|
|
110
|
+
contextLimit: contextLimit(),
|
|
111
|
+
warnings: statusSummaryFromDetail(s()).warnings,
|
|
112
|
+
},
|
|
113
|
+
{ version: packageJson.version },
|
|
114
|
+
),
|
|
115
|
+
)
|
|
116
|
+
// The dialog's own laid-out width, which is what the sections have to fit
|
|
117
|
+
// into; the terminal width is only the pre-layout fallback.
|
|
118
|
+
const [dialogWidth, setDialogWidth] = createSignal(0)
|
|
119
|
+
const measureRoot = (element: any) => {
|
|
120
|
+
const read = () => {
|
|
121
|
+
const width = Number(element?.width)
|
|
122
|
+
if (Number.isFinite(width) && width > 0) setDialogWidth(width)
|
|
123
|
+
}
|
|
124
|
+
read()
|
|
125
|
+
element?.on?.("resized", read)
|
|
126
|
+
onCleanup(() => element?.off?.("resized", read))
|
|
127
|
+
}
|
|
128
|
+
// paddingLeft + paddingRight below; what the sections get is what is left.
|
|
129
|
+
const contentWidth = () => (dialogWidth() > 0 ? dialogWidth() - 4 : terminalColumns())
|
|
130
|
+
// The shared model decides whether the sections fit in two columns at this
|
|
131
|
+
// width, and how wide each column has to be; below that the same sections
|
|
132
|
+
// are drawn in one column, in the same order, instead of being squeezed
|
|
133
|
+
// into mid-word wraps.
|
|
134
|
+
const columns = () => statusColumnsFor(view().sections, contentWidth())
|
|
135
|
+
const columnSections = (parity: number) =>
|
|
136
|
+
view().sections.filter((_section, index) => index % 2 === parity)
|
|
137
|
+
const hygiene = () => view().hygiene
|
|
138
|
+
// Integer segment widths that sum to the bar's own width. Proportional
|
|
139
|
+
// flexGrow lets the layout engine round each segment on its own, which
|
|
140
|
+
// leaves blank cells between the coloured runs; the shared helper
|
|
141
|
+
// distributes the remainder so the bar has no gaps. Before the first
|
|
142
|
+
// layout there is no width to divide, so the flex fallback stays.
|
|
143
|
+
const barWidths = () => {
|
|
144
|
+
const width = contentWidth()
|
|
145
|
+
if (!Number.isFinite(width) || width <= 0) return null
|
|
146
|
+
return distributeBarWidths(
|
|
147
|
+
view().bar.map((segment) => segment.tokens),
|
|
148
|
+
width,
|
|
149
|
+
)
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
return (
|
|
153
|
+
<box ref={measureRoot} flexDirection="column" width="100%" paddingLeft={2} paddingRight={2} paddingTop={1} paddingBottom={1}>
|
|
154
|
+
{/* Title */}
|
|
155
|
+
<box justifyContent="center" width="100%" marginBottom={1} flexDirection="row" gap={2}>
|
|
156
|
+
<text fg={t().accent}><b>{view().title}</b></text>
|
|
157
|
+
<text fg={t().textMuted}>{view().version}</text>
|
|
158
|
+
</box>
|
|
159
|
+
|
|
160
|
+
<box flexDirection="row" justifyContent="space-between" width="100%">
|
|
161
|
+
<text fg={toneColor(t(), view().headline.left.tone)}>
|
|
162
|
+
<b>{view().headline.left.text}</b>
|
|
163
|
+
</text>
|
|
164
|
+
<text fg={toneColor(t(), view().headline.right.tone)}>
|
|
165
|
+
{view().headline.right.text}
|
|
166
|
+
</text>
|
|
167
|
+
</box>
|
|
168
|
+
{view().windowLine && <text fg={t().textMuted}>{view().windowLine}</text>}
|
|
169
|
+
|
|
170
|
+
{/* Segmented breakdown bar: a flex row of colored boxes filling the
|
|
171
|
+
dialog width. Once the dialog has a laid-out width the shared
|
|
172
|
+
helper hands each segment an integer width that sums to the bar
|
|
173
|
+
width, so no blank cell can appear between the runs; before the
|
|
174
|
+
first layout the flex weights stand in. */}
|
|
175
|
+
<box width="100%" flexDirection="row" height={1}>
|
|
176
|
+
{view().bar.map((seg, index) => {
|
|
177
|
+
const widths = barWidths()
|
|
178
|
+
const fixed = widths ? (widths[index] ?? 0) : undefined
|
|
179
|
+
return (
|
|
180
|
+
<box
|
|
181
|
+
key={seg.label}
|
|
182
|
+
{...(fixed === undefined
|
|
183
|
+
? { flexGrow: Math.max(1, seg.tokens), flexBasis: 0 }
|
|
184
|
+
: { width: fixed, flexShrink: 0 })}
|
|
185
|
+
height={1}
|
|
186
|
+
backgroundColor={seg.color}
|
|
187
|
+
/>
|
|
188
|
+
)
|
|
189
|
+
})}
|
|
190
|
+
</box>
|
|
191
|
+
|
|
192
|
+
{/* Breakdown legend */}
|
|
193
|
+
<box flexDirection="column" width="100%">
|
|
194
|
+
{view().breakdown.map((row) => (
|
|
195
|
+
<box key={row.label} width="100%" flexDirection="row" justifyContent="space-between" gap={1}>
|
|
196
|
+
<text fg={row.color}>{row.label}</text>
|
|
197
|
+
<text fg={t().textMuted}>{row.value}</text>
|
|
198
|
+
</box>
|
|
199
|
+
))}
|
|
200
|
+
{hygiene() && (
|
|
201
|
+
<StatusRowView t={t()} row={hygiene()} labelWidth={9} />
|
|
202
|
+
)}
|
|
203
|
+
</box>
|
|
204
|
+
|
|
205
|
+
{/* Recomp live progress (full width, only while
|
|
206
|
+
running or just finished — dogfood 2026-05-30). This is live run
|
|
207
|
+
state rather than status content, so it stays out of the shared
|
|
208
|
+
section model. */}
|
|
209
|
+
{!compactionOff() && s().recompProgress && (() => {
|
|
210
|
+
const p = s().recompProgress!
|
|
211
|
+
// Label follows the flow that started the run, so a plain
|
|
212
|
+
// /ctx-recomp never reads as an "Upgrade" (dogfood 2026-06-04).
|
|
213
|
+
const verb = p.kind === "upgrade" ? "Upgrade" : p.kind === "embed" ? "Embed" : "Recomp"
|
|
214
|
+
return (
|
|
215
|
+
<box marginTop={1} width="100%" flexDirection="column">
|
|
216
|
+
<text fg={t().text}><b>{verb}</b></text>
|
|
217
|
+
{(() => {
|
|
218
|
+
if (p.phase === "recomp") {
|
|
219
|
+
const frac = p.totalMessages > 0 ? p.processedMessages / p.totalMessages : 0
|
|
220
|
+
const width = 24
|
|
221
|
+
const filled = Math.round(Math.max(0, Math.min(1, frac)) * width)
|
|
222
|
+
const bar = p.totalMessages > 0
|
|
223
|
+
? `[${"█".repeat(filled)}${"░".repeat(width - filled)}]`
|
|
224
|
+
: "(starting…)"
|
|
225
|
+
const activeLabel = p.kind === "upgrade" ? "upgrading" : p.kind === "embed" ? "embedding" : "comparting"
|
|
226
|
+
return (
|
|
227
|
+
<>
|
|
228
|
+
<R t={t()} l={activeLabel} v={p.totalMessages > 0 ? `${bar} ${Math.round(frac * 100)}%` : bar} fg={t().warning} />
|
|
229
|
+
{p.note ? <R t={t()} l="Status" v={p.note} fg={t().textMuted} /> : null}
|
|
230
|
+
{p.kind === "embed"
|
|
231
|
+
? <R t={t()} l="Compartments" v={`${p.processedMessages}/${p.totalMessages} embedded`} fg={t().textMuted} />
|
|
232
|
+
: <R t={t()} l="Compartments" v={`${p.compartmentsCreated} (${p.passCount} pass${p.passCount === 1 ? "" : "es"})`} fg={t().textMuted} />}
|
|
233
|
+
</>
|
|
234
|
+
)
|
|
235
|
+
}
|
|
236
|
+
if (p.phase === "migration") return <R t={t()} l="Status" v={p.note ?? "Migrating memories ⟳"} fg={t().warning} />
|
|
237
|
+
if (p.phase === "done") return <R t={t()} l="Status" v={`✓ ${verb} complete`} fg={t().accent} />
|
|
238
|
+
if (p.phase === "skipped") return <R t={t()} l="Status" v={p.message ?? `${verb} stopped early`} fg={t().textMuted} />
|
|
239
|
+
return <R t={t()} l="Status" v={`✗ ${verb} failed${p.message ? `: ${p.message}` : ""}`} fg={t().error} />
|
|
240
|
+
})()}
|
|
241
|
+
</box>
|
|
242
|
+
)
|
|
243
|
+
})()}
|
|
244
|
+
|
|
245
|
+
{s().hostBackendsModuleSide && (
|
|
246
|
+
<box marginTop={1} width="100%" flexDirection="column">
|
|
247
|
+
<text fg={t().text}><b>Rust Mode</b></text>
|
|
248
|
+
<text fg={t().textMuted}>{RUST_MODE_HOST_PATHS_LINE}</text>
|
|
249
|
+
</box>
|
|
250
|
+
)}
|
|
251
|
+
|
|
252
|
+
{columns().twoColumn ? (
|
|
253
|
+
<box flexDirection="row" width="100%" gap={4}>
|
|
254
|
+
<box flexDirection="column" width={columns().leftWidth} flexShrink={0}>
|
|
255
|
+
{columnSections(0).map((section) => (
|
|
256
|
+
<StatusSectionView t={t()} section={section} />
|
|
257
|
+
))}
|
|
258
|
+
</box>
|
|
259
|
+
<box flexDirection="column" width={columns().rightWidth} flexShrink={0}>
|
|
260
|
+
{columnSections(1).map((section) => (
|
|
261
|
+
<StatusSectionView t={t()} section={section} />
|
|
262
|
+
))}
|
|
263
|
+
</box>
|
|
264
|
+
</box>
|
|
265
|
+
) : (
|
|
266
|
+
<box flexDirection="column" width="100%">
|
|
267
|
+
{view().sections.map((section) => (
|
|
268
|
+
<StatusSectionView t={t()} section={section} />
|
|
269
|
+
))}
|
|
270
|
+
</box>
|
|
271
|
+
)}
|
|
272
|
+
|
|
273
|
+
{view().warnings.length > 0 && (
|
|
274
|
+
<box marginTop={1} width="100%" flexDirection="column">
|
|
275
|
+
{view().warnings.map((warning) => (
|
|
276
|
+
<text fg={warning.tone === "error" ? t().error : t().warning}>{warning.text}</text>
|
|
277
|
+
))}
|
|
278
|
+
</box>
|
|
279
|
+
)}
|
|
280
|
+
|
|
281
|
+
{/* Footer */}
|
|
282
|
+
<box marginTop={1} justifyContent="flex-end" width="100%">
|
|
283
|
+
<text fg={t().textMuted}>{view().footer}</text>
|
|
284
|
+
</box>
|
|
285
|
+
</box>
|
|
286
|
+
)
|
|
287
|
+
}
|
|
288
|
+
|
package/src/tui/entry.mjs
CHANGED
|
@@ -33,4 +33,14 @@ if (!mod) {
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
const v1 = mod.default;
|
|
37
|
+
|
|
38
|
+
async function setup(context) {
|
|
39
|
+
const v2 = await import("../v2/tui/index.ts");
|
|
40
|
+
return v2.setup(context);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// OpenCode 1.18.30's TUI loader reads only id/server/tui and ignores setup
|
|
44
|
+
// (packages/opencode/src/plugin/shared.ts:272-304). OpenCode 2.0.3 validates
|
|
45
|
+
// id/setup and ignores tui, so one object safely serves both package loaders.
|
|
46
|
+
export default { id: v1.id, tui: v1.tui, setup };
|