@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
|
@@ -33,13 +33,25 @@ export type CompartmentCountResult = {
|
|
|
33
33
|
export declare function getCompartmentCount(sessionId: string, directory?: string): Promise<CompartmentCountResult>;
|
|
34
34
|
/** Send recomp request to server via RPC. */
|
|
35
35
|
export declare function requestRecomp(sessionId: string): Promise<boolean>;
|
|
36
|
-
/**
|
|
37
|
-
*
|
|
38
|
-
export declare function
|
|
39
|
-
/**
|
|
40
|
-
*
|
|
41
|
-
|
|
42
|
-
|
|
36
|
+
/** Start a manual `/ctx-dream` run (optionally one named task) via RPC. The
|
|
37
|
+
* server starts the pass in the background and pushes the summary when done. */
|
|
38
|
+
export declare function requestDream(sessionId: string, task?: string): Promise<boolean>;
|
|
39
|
+
/** What a command RPC reports back: finished text, an acknowledgement that
|
|
40
|
+
* background work started (no text yet), or the failure. */
|
|
41
|
+
export type CommandRpcResult = {
|
|
42
|
+
ok: true;
|
|
43
|
+
message?: string;
|
|
44
|
+
started?: boolean;
|
|
45
|
+
} | {
|
|
46
|
+
ok: false;
|
|
47
|
+
error?: string;
|
|
48
|
+
};
|
|
49
|
+
/** Run `/ctx-flush` for the session: apply the queued operations now. */
|
|
50
|
+
export declare function requestFlush(sessionId: string): Promise<CommandRpcResult>;
|
|
51
|
+
/** Start `/ctx-wrapup`: compact the older live tail, keeping the newest N raw. */
|
|
52
|
+
export declare function requestWrapup(sessionId: string, messagesToKeep: number): Promise<CommandRpcResult>;
|
|
53
|
+
/** `/ctx-embed`: read coverage, or start/pause the history embedding drain. */
|
|
54
|
+
export declare function requestEmbed(sessionId: string, action: "status" | "start" | "pause", directory?: string): Promise<CommandRpcResult>;
|
|
43
55
|
/** Resolve global toast duration from server config via RPC. */
|
|
44
56
|
export declare function loadToastDurationMs(): Promise<number>;
|
|
45
57
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-db.d.ts","sourceRoot":"","sources":["../../../src/tui/data/context-db.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEzF,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,YAAY,EAAE,CAAC;AAK3D,2DAA2D;AAC3D,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAOrD;AAED,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC;AAED;sCACsC;AACtC,wBAAgB,YAAY,IAAI,qBAAqB,GAAG,IAAI,CAE3D;AAED,+BAA+B;AAC/B,wBAAgB,QAAQ,IAAI,IAAI,CAM/B;AAwFD,sDAAsD;AACtD,wBAAsB,mBAAmB,CACrC,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,GAClB,OAAO,CAAC,eAAe,CAAC,CA8B1B;AAED,MAAM,MAAM,kBAAkB,GAAG;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,YAAY,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnG,yFAAyF;AACzF,wBAAsB,gBAAgB,CAClC,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,QAAQ,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,kBAAkB,CAAC,CAc7B;AAYD,gEAAgE;AAChE,wBAAsB,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAchG;AAED,MAAM,MAAM,sBAAsB,GAAG;IAAE,EAAE,EAAE,IAAI,CAAC;I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B,YAAY,CAC9B,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,QAAQ,GAAG,OAAO,GAAG,OAAO,EACpC,SAAS,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,gBAAgB,CAAC,CAM3B;AAED,gEAAgE;AAChE,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,MAAM,CAAC,CAQ3D;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACjC,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAsB,eAAe,IAAI,OAAO,CAAC,oBAAoB,CAAC,CAkBrE;AAED,wEAAwE;AACxE,wBAAsB,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC,CAQtD"}
|
|
@@ -33,13 +33,25 @@ export type CompartmentCountResult = {
|
|
|
33
33
|
export declare function getCompartmentCount(sessionId: string, directory?: string): Promise<CompartmentCountResult>;
|
|
34
34
|
/** Send recomp request to server via RPC. */
|
|
35
35
|
export declare function requestRecomp(sessionId: string): Promise<boolean>;
|
|
36
|
-
/**
|
|
37
|
-
*
|
|
38
|
-
export declare function
|
|
39
|
-
/**
|
|
40
|
-
*
|
|
41
|
-
|
|
42
|
-
|
|
36
|
+
/** Start a manual `/ctx-dream` run (optionally one named task) via RPC. The
|
|
37
|
+
* server starts the pass in the background and pushes the summary when done. */
|
|
38
|
+
export declare function requestDream(sessionId: string, task?: string): Promise<boolean>;
|
|
39
|
+
/** What a command RPC reports back: finished text, an acknowledgement that
|
|
40
|
+
* background work started (no text yet), or the failure. */
|
|
41
|
+
export type CommandRpcResult = {
|
|
42
|
+
ok: true;
|
|
43
|
+
message?: string;
|
|
44
|
+
started?: boolean;
|
|
45
|
+
} | {
|
|
46
|
+
ok: false;
|
|
47
|
+
error?: string;
|
|
48
|
+
};
|
|
49
|
+
/** Run `/ctx-flush` for the session: apply the queued operations now. */
|
|
50
|
+
export declare function requestFlush(sessionId: string): Promise<CommandRpcResult>;
|
|
51
|
+
/** Start `/ctx-wrapup`: compact the older live tail, keeping the newest N raw. */
|
|
52
|
+
export declare function requestWrapup(sessionId: string, messagesToKeep: number): Promise<CommandRpcResult>;
|
|
53
|
+
/** `/ctx-embed`: read coverage, or start/pause the history embedding drain. */
|
|
54
|
+
export declare function requestEmbed(sessionId: string, action: "status" | "start" | "pause", directory?: string): Promise<CommandRpcResult>;
|
|
43
55
|
/** Resolve global toast duration from server config via RPC. */
|
|
44
56
|
export declare function loadToastDurationMs(): Promise<number>;
|
|
45
57
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-db.d.ts","sourceRoot":"","sources":["../../../src/tui-compiled/data/context-db.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEzF,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,YAAY,EAAE,CAAC;AAK3D,2DAA2D;AAC3D,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAOrD;AAED,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC;AAED;sCACsC;AACtC,wBAAgB,YAAY,IAAI,qBAAqB,GAAG,IAAI,CAE3D;AAED,+BAA+B;AAC/B,wBAAgB,QAAQ,IAAI,IAAI,CAM/B;AAwFD,sDAAsD;AACtD,wBAAsB,mBAAmB,CACrC,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,GAClB,OAAO,CAAC,eAAe,CAAC,CA8B1B;AAED,MAAM,MAAM,kBAAkB,GAAG;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,YAAY,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,E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C,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,GACjD;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAiBpC,yEAAyE;AACzE,wBAAsB,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAE/E;AAED,kFAAkF;AAClF,wBAAsB,aAAa,CAC/B,SAAS,EAAE,MAAM,EACjB,cAAc,EAAE,MAAM,GACvB,OAAO,CAAC,gBAAgB,CAAC,CAE3B;AAED,+EAA+E;AAC/E,wBAAsB,YAAY,CAC9B,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,QAAQ,GAAG,OAAO,GAAG,OAAO,EACpC,SAAS,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,gBAAgB,CAAC,CAM3B;AAED,gEAAgE;AAChE,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,MAAM,CAAC,CAQ3D;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACjC,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAsB,eAAe,IAAI,OAAO,CAAC,oBAAoB,CAAC,CAkBrE;AAED,wEAAwE;AACxE,wBAAsB,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC,CAQtD"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rebuilding attachment payloads in the host's own `Media.Asset` class.
|
|
3
|
+
*
|
|
4
|
+
* From OpenCode 2.0.15 a media content part carries its bytes in a `Media.Asset` class
|
|
5
|
+
* instance, and after the context hook the host rebuilds every message with
|
|
6
|
+
* `Message.make`, whose schema checks `value instanceof Asset`. Rows restored from the
|
|
7
|
+
* store after a host checkpoint are built by Magic Context, not by the host, so their
|
|
8
|
+
* attachments need a real host instance. The plugin cannot import that class: a second
|
|
9
|
+
* copy of `@opencode/ai` has a different `Asset`, which fails the host's instanceof check.
|
|
10
|
+
*
|
|
11
|
+
* Two zero-loss ways to get one, in order:
|
|
12
|
+
* 1. The constructor of any `Media.Asset` the host itself put into a draft during this
|
|
13
|
+
* process. `new Asset({ source: { type: "base64", data, mediaType } })` is exactly what
|
|
14
|
+
* the host's own `Media.base64(data, mediaType)` does when it renders a stored row.
|
|
15
|
+
* 2. The host's own schema, reached from the draft message's class:
|
|
16
|
+
* `Message.fields.content.value` (the content-part union) → the member whose `type` is
|
|
17
|
+
* the literal "media" → `fields.media` (`Media.AssetSchema`) → `ast.encoding[0]
|
|
18
|
+
* .transformation.decode`, whose `run(some(encoded))` returns `Success(some(asset))`.
|
|
19
|
+
* That transformation is the host's `new Asset(encoded)`. It depends on Effect Schema
|
|
20
|
+
* internals, so every step is checked and any mismatch counts as unavailable.
|
|
21
|
+
*/
|
|
22
|
+
/** Test hook: forget what earlier drafts taught this process. */
|
|
23
|
+
export declare function resetHostMediaForTests(): void;
|
|
24
|
+
/** Learn the host's message class and, when present, its `Media.Asset` class from a draft. */
|
|
25
|
+
export declare function rememberHostMedia(messages: ReadonlyArray<unknown>): void;
|
|
26
|
+
/**
|
|
27
|
+
* True when the remembered host message schema declares attachments as `Media.Asset`
|
|
28
|
+
* (OpenCode 2.0.15 and later). Earlier hosts take the plain `{ mediaType, data }` shape.
|
|
29
|
+
*/
|
|
30
|
+
export declare function hostUsesMediaAssets(): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* The host's own `Media.Asset` for a base64 payload, or the reason neither zero-loss way
|
|
33
|
+
* produced one.
|
|
34
|
+
*/
|
|
35
|
+
export declare function hostMediaAsset(data: string, mediaType: string): object | string;
|
|
36
|
+
//# sourceMappingURL=host-media.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host-media.d.ts","sourceRoot":"","sources":["../../../src/v2/fold/host-media.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAkBH,iEAAiE;AACjE,wBAAgB,sBAAsB,IAAI,IAAI,CAG7C;AAED,8FAA8F;AAC9F,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,aAAa,CAAC,OAAO,CAAC,GAAG,IAAI,CAgBxE;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,OAAO,CAe7C;AA6BD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAmB/E"}
|
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
import type { V2Message } from "../hooks/types";
|
|
2
2
|
import type { StoreRow } from "../store-reader";
|
|
3
|
+
/**
|
|
4
|
+
* How restored attachments are rendered. Hosts before OpenCode 2.0.15 take a plain
|
|
5
|
+
* `{ mediaType, data }` media part; later hosts need their own `Media.Asset` instance
|
|
6
|
+
* (see host-media.ts). When no instance can be produced the attachment is replaced by a
|
|
7
|
+
* short note, so the row's text still reaches the model and the host does not reject
|
|
8
|
+
* the whole request.
|
|
9
|
+
*/
|
|
10
|
+
export interface RestoreMedia {
|
|
11
|
+
/** The host's asset for a base64 payload, or why none could be built. */
|
|
12
|
+
asset(data: string, mediaType: string): object | string;
|
|
13
|
+
/** Called once per attachment replaced by the note. */
|
|
14
|
+
unavailable(detail: {
|
|
15
|
+
rowID: string;
|
|
16
|
+
name?: string;
|
|
17
|
+
mediaType: string;
|
|
18
|
+
reason: string;
|
|
19
|
+
}): void;
|
|
20
|
+
}
|
|
21
|
+
/** Depends only on the stored row, so a replay of the same row produces the same bytes. */
|
|
22
|
+
export declare function unavailableAttachmentNote(name: string | undefined, mediaType: string): string;
|
|
3
23
|
/** Render retained store rows using GA's to-llm-message representation, not the lossy
|
|
4
24
|
* historian projection. Tool results stay paired, and attachments retain their payloads.
|
|
5
25
|
* The store remains read-only; the host's bounded recent-context is not a preservation source.
|
|
@@ -7,5 +27,5 @@ import type { StoreRow } from "../store-reader";
|
|
|
7
27
|
export declare function restoreRow(row: StoreRow, model: {
|
|
8
28
|
providerID: string;
|
|
9
29
|
id: string;
|
|
10
|
-
}): V2Message[];
|
|
30
|
+
}, media?: RestoreMedia): V2Message[];
|
|
11
31
|
//# sourceMappingURL=restore.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"restore.d.ts","sourceRoot":"","sources":["../../../src/v2/fold/restore.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"restore.d.ts","sourceRoot":"","sources":["../../../src/v2/fold/restore.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAWhD;;;;;;GAMG;AACH,MAAM,WAAW,YAAY;IACzB,yEAAyE;IACzE,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IACxD,uDAAuD;IACvD,WAAW,CAAC,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;CAClG;AAED,2FAA2F;AAC3F,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAE7F;AA6ED;;;GAGG;AACH,wBAAgB,UAAU,CACtB,GAAG,EAAE,QAAQ,EACb,KAAK,EAAE;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,EACzC,KAAK,CAAC,EAAE,YAAY,GACrB,SAAS,EAAE,CA+Hb"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { HiddenCompletionExecutor } from "../hooks/magic-context/compartment-runner-types";
|
|
2
2
|
import type { Database } from "../shared/sqlite";
|
|
3
3
|
import { type HiddenChildHook } from "./hooks/hidden-child";
|
|
4
|
+
import { type HostServiceOwner } from "./host-service";
|
|
4
5
|
import type { StoreRow } from "./store-reader";
|
|
5
|
-
type HiddenChildRole = "historian" | "dreamer";
|
|
6
|
+
type HiddenChildRole = "historian" | "dreamer" | "dreamer-curate";
|
|
6
7
|
export interface HiddenChildHost {
|
|
7
8
|
create(input: {
|
|
8
9
|
title: string;
|
|
@@ -30,7 +31,13 @@ export interface HiddenChildHost {
|
|
|
30
31
|
id: string;
|
|
31
32
|
variant?: string;
|
|
32
33
|
};
|
|
34
|
+
/** Returned only when the host exposes an error for the terminal session. */
|
|
35
|
+
error?: unknown;
|
|
33
36
|
}>;
|
|
37
|
+
/** Optional event-backed error lookup for hosts that do not retain the reason on session.get. */
|
|
38
|
+
terminalError?(input: {
|
|
39
|
+
sessionID: string;
|
|
40
|
+
}): Promise<unknown>;
|
|
34
41
|
switchModel(input: {
|
|
35
42
|
sessionID: string;
|
|
36
43
|
model: {
|
|
@@ -55,10 +62,20 @@ export interface HiddenChildHost {
|
|
|
55
62
|
sessionID: string;
|
|
56
63
|
title: string;
|
|
57
64
|
}): Promise<void>;
|
|
65
|
+
/**
|
|
66
|
+
* Deletes a session and everything hanging off it, through the host that created it. Optional
|
|
67
|
+
* because the host surface this adapter is handed does not always carry it; when it is missing,
|
|
68
|
+
* a retired child keeps its entry in the retired list and the next boot sweep tries again.
|
|
69
|
+
*/
|
|
70
|
+
remove?(input: {
|
|
71
|
+
sessionID: string;
|
|
72
|
+
owner?: HostServiceOwner;
|
|
73
|
+
}): Promise<void>;
|
|
58
74
|
}
|
|
59
75
|
export interface HiddenChildRows {
|
|
60
76
|
latestSequence(sessionID: string): number;
|
|
61
77
|
latestAssistant(sessionID: string): StoreRow<"assistant"> | undefined;
|
|
78
|
+
latestIdle(sessionID: string): StoreRow<"idle"> | undefined;
|
|
62
79
|
}
|
|
63
80
|
export interface V2HiddenCompletionOptions {
|
|
64
81
|
db: Database;
|
|
@@ -69,8 +86,35 @@ export interface V2HiddenCompletionOptions {
|
|
|
69
86
|
};
|
|
70
87
|
ensureAgent?(): Promise<void>;
|
|
71
88
|
generation?: string;
|
|
89
|
+
/**
|
|
90
|
+
* Gap left between two session removals. Deleting a session walks its children one at a time
|
|
91
|
+
* inside the host and publishes an event per deletion, so a backlog is drained slowly on
|
|
92
|
+
* purpose rather than fired off in parallel.
|
|
93
|
+
*/
|
|
94
|
+
removalSpacingMs?: number;
|
|
95
|
+
/**
|
|
96
|
+
* Which host service registration, if any, owns the children this process creates. Called once
|
|
97
|
+
* per created child so a host that starts serving later still binds correctly.
|
|
98
|
+
*/
|
|
99
|
+
resolveOwner?: () => HostServiceOwner | undefined;
|
|
100
|
+
/**
|
|
101
|
+
* The user's `keep_subagents` setting. When true, retired children that the OpenCode 1 lane
|
|
102
|
+
* would keep are left in the host instead of deleted (see `keptUnderRetention`).
|
|
103
|
+
*/
|
|
104
|
+
keepSubagents?: boolean;
|
|
105
|
+
log?: (message: string) => void;
|
|
106
|
+
/** Return the host catalog when available; catalog failures leave the request unchanged. */
|
|
107
|
+
modelCatalog?: () => Promise<unknown>;
|
|
72
108
|
}
|
|
73
109
|
export declare function hiddenChildrenMetaKey(projectIdentity: string): string;
|
|
110
|
+
/**
|
|
111
|
+
* A terminal provider or model-resolution failure persisted by the host, as opposed to an unsettled
|
|
112
|
+
* dispatch error, timeout, or abort. Only this class keeps the now-idle child alive, so reuse does
|
|
113
|
+
* not depend on wording that a later editor could accidentally change.
|
|
114
|
+
*/
|
|
115
|
+
export declare class HiddenProviderError extends Error {
|
|
116
|
+
constructor(detail: string);
|
|
117
|
+
}
|
|
74
118
|
export declare function createV2HiddenCompletionExecutor(host: HiddenChildHost, options: V2HiddenCompletionOptions): Promise<HiddenCompletionExecutor>;
|
|
75
119
|
export {};
|
|
76
120
|
//# sourceMappingURL=hidden-completion.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hidden-completion.d.ts","sourceRoot":"","sources":["../../src/v2/hidden-completion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAER,wBAAwB,EAG3B,MAAM,iDAAiD,CAAC;
|
|
1
|
+
{"version":3,"file":"hidden-completion.d.ts","sourceRoot":"","sources":["../../src/v2/hidden-completion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAER,wBAAwB,EAG3B,MAAM,iDAAiD,CAAC;AAQzD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAKH,KAAK,eAAe,EAGvB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,KAAK,gBAAgB,EAA4C,MAAM,gBAAgB,CAAC;AACjG,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAU/C,KAAK,eAAe,GAAG,WAAW,GAAG,SAAS,GAAG,gBAAgB,CAAC;AA0ClE,MAAM,WAAW,eAAe;IAC5B,MAAM,CAAC,KAAK,EAAE;QACV,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE;YAAE,UAAU,EAAE,MAAM,CAAC;YAAC,EAAE,EAAE,MAAM,CAAC;YAAC,OAAO,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;QAC5D,QAAQ,EAAE;YAAE,SAAS,EAAE,MAAM,CAAA;SAAE,CAAC;QAChC,QAAQ,EAAE;YAAE,aAAa,EAAE,YAAY,CAAC;YAAC,IAAI,EAAE,eAAe,CAAA;SAAE,CAAC;KACpE,GAAG,OAAO,CAAC;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC5B,GAAG,CAAC,KA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|
+
import type { MagicContextRpcServer } from "../../shared/rpc-server";
|
|
2
|
+
import type { V2CommandDomain } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* Register the `/ctx-*` commands with the OpenCode 2 host so every client can
|
|
5
|
+
* run them, not only the terminal UI.
|
|
6
|
+
*
|
|
7
|
+
* The host keeps added definitions in a location-scoped registry that
|
|
8
|
+
* `GET /api/command` lists and `POST /api/session/:sessionID/command` executes,
|
|
9
|
+
* calling this plugin's own `execute` back. A terminal UI keymap entry, by
|
|
10
|
+
* contrast, exists only inside that one UI process, so it is not reachable from
|
|
11
|
+
* `opencode run`, the HTTP API or Desktop.
|
|
12
|
+
*
|
|
13
|
+
* Each command runs the SAME in-process RPC handler the terminal UI calls over
|
|
14
|
+
* the plugin's loopback RPC, so the two entry points cannot drift into doing
|
|
15
|
+
* different work for the same command name.
|
|
16
|
+
*
|
|
17
|
+
* Result TEXT still reaches only a connected terminal UI: the host's command
|
|
18
|
+
* contract returns no payload to the caller, and OpenCode 2 has no
|
|
19
|
+
* ignored-message carrier for writing a status report into a session without
|
|
20
|
+
* making it conversation input. The work itself runs on every client. See
|
|
21
|
+
* PARITY.md.
|
|
22
|
+
*/
|
|
23
|
+
export declare function registerV2Commands(args: {
|
|
24
|
+
command: V2CommandDomain | undefined;
|
|
25
|
+
rpc: MagicContextRpcServer;
|
|
26
|
+
directory: string;
|
|
27
|
+
compactionEnabled: boolean;
|
|
28
|
+
}): Promise<boolean>;
|
|
29
|
+
//# sourceMappingURL=commands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../../src/v2/hooks/commands.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,KAAK,EAAE,eAAe,EAAuB,MAAM,SAAS,CAAC;AAEpE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,kBAAkB,CAAC,IAAI,EAAE;IAC3C,OAAO,EAAE,eAAe,GAAG,SAAS,CAAC;IACrC,GAAG,EAAE,qBAAqB,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,OAAO,CAAC;CAC9B,GAAG,OAAO,CAAC,OAAO,CAAC,CA4BnB"}
|
|
@@ -2,17 +2,61 @@ import { type TransformDeps } from "../../hooks/magic-context/transform";
|
|
|
2
2
|
import type { PromptSurfaceConfig } from "../../shared/prompt-surface";
|
|
3
3
|
import { type PromptSurfaceRuntime } from "../../shared/prompt-surface-runtime";
|
|
4
4
|
import type { SessionContext, V2Context } from "./types";
|
|
5
|
-
export declare function
|
|
5
|
+
export declare function isBlockingV2TransformError(error: unknown): boolean;
|
|
6
|
+
export declare function createHostSeams(context: V2Context, readAllForConversion: TransformDeps["hostRawMessages"] & {}, reconciliationSource: NonNullable<TransformDeps["hostMessageReconciliationSource"]>, liveModels: NonNullable<TransformDeps["liveModelBySession"]>): Required<Pick<TransformDeps, "hostRawMessages" | "hostMessageReconciliationSource" | "hostProtectedTailBoundary" | "hostModelFallback" | "hostRefusalNotice" | "hostRefuse">>;
|
|
7
|
+
/**
|
|
8
|
+
* Record why a turn is about to be refused before the model is called.
|
|
9
|
+
*
|
|
10
|
+
* When reading the host store or the context database fails, the turn is treated
|
|
11
|
+
* as unsafe and interrupted before the provider request. The host then stores the
|
|
12
|
+
* turn as interrupted and the user simply never receives a reply — there is no
|
|
13
|
+
* error on screen and no assistant message. Without this line the reason exists
|
|
14
|
+
* only in OpenCode's own server log, so the Magic Context log that users are
|
|
15
|
+
* asked for during a support request says nothing about why their turn died
|
|
16
|
+
* (issue #493, where a store the OpenCode 2 host had migrated from OpenCode 1
|
|
17
|
+
* was refused by the v2 store reader and every turn ended in silence).
|
|
18
|
+
*/
|
|
19
|
+
export declare function reportPreProviderRefusal(sessionID: string, error: unknown): void;
|
|
6
20
|
/** Accept both a raw model array and the 2.0.5 `{ data }` list payload. */
|
|
7
|
-
export declare function catalogModels(listed: unknown): Array<{
|
|
21
|
+
export declare function catalogModels(listed: unknown, draftModel?: SessionContext["model"]): Array<{
|
|
8
22
|
id: string;
|
|
9
23
|
providerID: string;
|
|
10
24
|
limit: {
|
|
11
25
|
context: number;
|
|
26
|
+
input?: number;
|
|
27
|
+
output?: number;
|
|
12
28
|
};
|
|
13
29
|
}>;
|
|
30
|
+
export declare function removeDreamerOnlyTools(draft: SessionContext): void;
|
|
14
31
|
/** Rewrite Magic Context ctx_* tool descriptions for this draft's model. */
|
|
15
32
|
export declare function applyV2PromptSurfaceTools(draft: SessionContext, runtime: PromptSurfaceRuntime, config: PromptSurfaceConfig | undefined): void;
|
|
33
|
+
/**
|
|
34
|
+
* Experimental Rust mode is a v1-only route: the Rust transform reaches the module over a subc
|
|
35
|
+
* transport that only the v1 server lane constructs, and nothing on this lane builds or owns one.
|
|
36
|
+
* Rather than accepting the setting and quietly running something else, downgrade it here, once,
|
|
37
|
+
* where every later reader of the config sees the mode that is actually running — including the
|
|
38
|
+
* RPC status and sidebar handlers, which otherwise ask a Rust module that does not exist for the
|
|
39
|
+
* session state and answer every status request with an error.
|
|
40
|
+
*
|
|
41
|
+
* The downgrade is announced twice on purpose: once in the log for whoever is reading it, and as a
|
|
42
|
+
* named limitation that /ctx-status and the sidebar keep showing for as long as the process runs.
|
|
43
|
+
*/
|
|
44
|
+
export declare function resolveV2TransformMode<T extends {
|
|
45
|
+
transform_mode?: "ts" | "rust";
|
|
46
|
+
}>(config: T): T;
|
|
47
|
+
/**
|
|
48
|
+
* Measure the tool definitions this request is actually going to send.
|
|
49
|
+
*
|
|
50
|
+
* OpenCode 1 measures the same thing through its `tool.definition` hook; OpenCode 2 has no such
|
|
51
|
+
* hook, but the request draft carries the whole tool set, so the draft is the measurement seam.
|
|
52
|
+
* This runs after the per-model descriptions have been applied, so what is counted is what goes on
|
|
53
|
+
* the wire, and it is keyed by the same {provider, model, agent} triple the status and sidebar
|
|
54
|
+
* handlers look the measurement up by.
|
|
55
|
+
*
|
|
56
|
+
* Measuring changes no served byte: the resulting tool-set hash is an attribution marker that the
|
|
57
|
+
* m[0] materialization decision records but never folds on.
|
|
58
|
+
*/
|
|
59
|
+
export declare function recordV2ToolDefinitions(draft: SessionContext): void;
|
|
16
60
|
export declare function registerContext(context: V2Context): Promise<{
|
|
17
61
|
dispose(): Promise<void>;
|
|
18
62
|
} | undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/v2/hooks/context.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/v2/hooks/context.ts"],"names":[],"mappings":"AAsDA,OAAO,EAAmB,KAAK,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAc1F,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,EAGH,KAAK,oBAAoB,EAC5B,MAAM,qCAAqC,CAAC;AA8B7C,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAMzD,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAElE;AA4BD,wBAAgB,eAAe,CAC3B,OAAO,EAAE,SAAS,EAClB,oBAAoB,EAAE,aAAa,CAAC,iBAAiB,CAAC,GAAG,EAAE,EAC3D,oBAAoB,EAAE,WAAW,CAAC,aAAa,CAAC,iCAAiC,CAAC,CAAC,EACnF,UAAU,EAAE,WAAW,CAAC,aAAa,CAAC,oBAAoB,CAAC,CAAC,GAC7D,QAAQ,CACP,IAAI,CACA,aAAa,EACX,iBAAiB,GACjB,iCAAiC,GACjC,2BAA2B,GAC3B,mBAAmB,GACnB,mBAAmB,GACnB,YAAY,CACjB,CACJ,CAsBA;AAyBD;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAMhF;AAED,2EAA2E;AAC3E,wBAAgB,aAAa,CACzB,MAAM,EAAE,OAAO,EACf,UAAU,CAAC,EAAE,cAAc,CAAC,OAAO,CAAC,GACrC,KAAK,CAAC;IACL,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC/D,CAAC,CAyCD;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,cAAc,GAAG,IAAI,CAElE;AAED,4EAA4E;AAC5E,wBAAgB,yBAAyB,CACrC,KAAK,EAAE,cAAc,EACrB,OAAO,EAAE,oBAAoB,EAC7B,MAAM,EAAE,mBAAmB,GAAG,SAAS,GACxC,IAAI,CAUN;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,SAAS;IAAE,cAAc,CAAC,EAAE,IAAI,GAAG,MAAM,CAAA;CAAE,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,CAQjG;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,cAAc,GAAG,IAAI,CAgBnE;AAED,wBAAsB,eAAe,CAAC,OAAO,EAAE,SAAS;;eAs5BvD"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare class DeletedSessionTombstones {
|
|
2
|
+
#private;
|
|
3
|
+
readonly limit: number;
|
|
4
|
+
constructor(limit?: number);
|
|
5
|
+
add(sessionID: string): void;
|
|
6
|
+
has(sessionID: string): boolean;
|
|
7
|
+
clear(): void;
|
|
8
|
+
get size(): number;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=deleted-session-tombstones.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deleted-session-tombstones.d.ts","sourceRoot":"","sources":["../../../src/v2/hooks/deleted-session-tombstones.ts"],"names":[],"mappings":"AAAA,qBAAa,wBAAwB;;IAGrB,QAAQ,CAAC,KAAK;gBAAL,KAAK,SAAQ;IAMlC,GAAG,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAU5B,GAAG,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO;IAI/B,KAAK,IAAI,IAAI;IAIb,IAAI,IAAI,IAAI,MAAM,CAEjB;CACJ"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { DreamerConfig } from "../../config/schema/magic-context";
|
|
2
|
+
import { type DreamTaskName } from "../../features/magic-context/dreamer/task-registry";
|
|
3
|
+
import { type DreamTaskRuntimeConfig, type ManualRunResult } from "../../features/magic-context/dreamer/task-scheduler";
|
|
4
|
+
import type { ContextDatabase } from "../../features/magic-context/storage";
|
|
5
|
+
import type { HiddenCompletionExecutor } from "../../hooks/magic-context/compartment-runner-types";
|
|
6
|
+
/** Validate the optional `/ctx-dream <task>` argument (mirrors the v1 command). */
|
|
7
|
+
export declare function resolveManualDreamTask(raw: unknown): {
|
|
8
|
+
task?: DreamTaskName;
|
|
9
|
+
error?: string;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Split configured tasks into the set this host can run and tasks that need a
|
|
13
|
+
* tool loop. This keeps unsupported tasks out of failure accounting.
|
|
14
|
+
*/
|
|
15
|
+
export declare function selectRunnableDreamTasks(args: {
|
|
16
|
+
tasks: readonly DreamTaskRuntimeConfig[];
|
|
17
|
+
toolsSupported: boolean;
|
|
18
|
+
requestedTask?: DreamTaskName;
|
|
19
|
+
}): {
|
|
20
|
+
runnable: DreamTaskRuntimeConfig[];
|
|
21
|
+
unsupported: DreamTaskName[];
|
|
22
|
+
};
|
|
23
|
+
export interface ManualDreamOutcome {
|
|
24
|
+
summary: ManualRunResult;
|
|
25
|
+
/** Selected tasks skipped because this host has no tool loop. */
|
|
26
|
+
unsupportedTasks: DreamTaskName[];
|
|
27
|
+
}
|
|
28
|
+
/** Run a manual dream pass through the shared scheduler and v2 hidden executor. */
|
|
29
|
+
export declare function runManualDreamNow(args: {
|
|
30
|
+
db: ContextDatabase;
|
|
31
|
+
dreamer: DreamerConfig;
|
|
32
|
+
projectIdentity: string;
|
|
33
|
+
directory: string;
|
|
34
|
+
language?: string;
|
|
35
|
+
mural?: {
|
|
36
|
+
enabled: boolean;
|
|
37
|
+
model?: string;
|
|
38
|
+
};
|
|
39
|
+
executor: HiddenCompletionExecutor;
|
|
40
|
+
sessionId: string;
|
|
41
|
+
task?: DreamTaskName;
|
|
42
|
+
}): Promise<ManualDreamOutcome>;
|
|
43
|
+
//# sourceMappingURL=dream-manual.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dream-manual.d.ts","sourceRoot":"","sources":["../../../src/v2/hooks/dream-manual.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAGvE,OAAO,EAGH,KAAK,aAAa,EAErB,MAAM,oDAAoD,CAAC;AAC5D,OAAO,EACH,KAAK,sBAAsB,EAC3B,KAAK,eAAe,EAEvB,MAAM,qDAAqD,CAAC;AAC7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oDAAoD,CAAC;AAEnG,mFAAmF;AACnF,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,OAAO,GAAG;IAAE,IAAI,CAAC,EAAE,aAAa,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAS7F;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE;IAC3C,KAAK,EAAE,SAAS,sBAAsB,EAAE,CAAC;IACzC,cAAc,EAAE,OAAO,CAAC;IACxB,aAAa,CAAC,EAAE,aAAa,CAAC;CACjC,GAAG;IAAE,QAAQ,EAAE,sBAAsB,EAAE,CAAC;IAAC,WAAW,EAAE,aAAa,EAAE,CAAA;CAAE,CAqBvE;AAED,MAAM,WAAW,kBAAkB;IAC/B,OAAO,EAAE,eAAe,CAAC;IACzB,iEAAiE;IACjE,gBAAgB,EAAE,aAAa,EAAE,CAAC;CACrC;AAED,mFAAmF;AACnF,wBAAsB,iBAAiB,CAAC,IAAI,EAAE;IAC1C,EAAE,EAAE,eAAe,CAAC;IACpB,OAAO,EAAE,aAAa,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC7C,QAAQ,EAAE,wBAAwB,CAAC;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,aAAa,CAAC;CACxB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CA4B9B"}
|
|
@@ -6,6 +6,13 @@ import type { V2Context } from "./types";
|
|
|
6
6
|
* completion cannot recursively schedule itself through this subscription. */
|
|
7
7
|
export declare function startDreamTrigger(context: V2Context, args: {
|
|
8
8
|
config: DreamerConfig;
|
|
9
|
+
sample?: () => {
|
|
10
|
+
config: DreamerConfig;
|
|
11
|
+
mural?: {
|
|
12
|
+
enabled: boolean;
|
|
13
|
+
model?: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
9
16
|
executor: HiddenCompletionExecutor;
|
|
10
17
|
projectIdentity: () => string;
|
|
11
18
|
language?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dream-trigger.d.ts","sourceRoot":"","sources":["../../../src/v2/hooks/dream-trigger.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAKvE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oDAAoD,CAAC;
|
|
1
|
+
{"version":3,"file":"dream-trigger.d.ts","sourceRoot":"","sources":["../../../src/v2/hooks/dream-trigger.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAKvE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oDAAoD,CAAC;AAEnG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC;;8EAE8E;AAC9E,wBAAgB,iBAAiB,CAC7B,OAAO,EAAE,SAAS,EAClB,IAAI,EAAE;IACF,MAAM,EAAE,aAAa,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM;QAAE,MAAM,EAAE,aAAa,CAAC;QAAC,KAAK,CAAC,EAAE;YAAE,OAAO,EAAE,OAAO,CAAC;YAAC,KAAK,CAAC,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,CAAC;IACvF,QAAQ,EAAE,wBAAwB,CAAC;IACnC,eAAe,EAAE,MAAM,MAAM,CAAC;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAChD;;EAqDJ"}
|
|
@@ -3,12 +3,18 @@ import type { PromptArgs } from "../../shared/model-suggestion-retry";
|
|
|
3
3
|
import type { SessionContext, V2AgentDomain } from "./types";
|
|
4
4
|
export declare const HIDDEN_HISTORIAN_AGENT = "historian";
|
|
5
5
|
export declare const HIDDEN_DREAMER_AGENT = "dreamer-classifier";
|
|
6
|
+
export declare const HIDDEN_CURATE_AGENT = "dreamer";
|
|
7
|
+
export declare function hiddenAgentFor(identity: HiddenRunIdentity): string;
|
|
8
|
+
export declare function hiddenToolLoop(identity: HiddenRunIdentity): boolean;
|
|
6
9
|
export declare function registerHiddenChildAgents(agent: Pick<V2AgentDomain, "transform">): Promise<void>;
|
|
7
10
|
export interface HiddenChildAttempt {
|
|
8
11
|
childSessionId: string;
|
|
9
12
|
identity: HiddenRunIdentity;
|
|
10
13
|
request: PromptArgs;
|
|
11
14
|
shaped: boolean;
|
|
15
|
+
steps?: number;
|
|
16
|
+
observedMessages?: SessionContext["messages"];
|
|
17
|
+
marker?: string;
|
|
12
18
|
}
|
|
13
19
|
/** Last user text on a context draft. 2.0.5 may use a string body, extra parts, or input_text. */
|
|
14
20
|
export declare function newestUserText(draft: SessionContext): string | undefined;
|
|
@@ -21,6 +27,7 @@ export declare function newestUserText(draft: SessionContext): string | undefine
|
|
|
21
27
|
export declare class HiddenChildHook {
|
|
22
28
|
private readonly childIDs;
|
|
23
29
|
private readonly attempts;
|
|
30
|
+
private readonly active;
|
|
24
31
|
registerChild(sessionID: string): void;
|
|
25
32
|
registerAttempt(marker: string, attempt: HiddenChildAttempt): void;
|
|
26
33
|
releaseAttempt(marker: string): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hidden-child.d.ts","sourceRoot":"","sources":["../../../src/v2/hooks/hidden-child.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hidden-child.d.ts","sourceRoot":"","sources":["../../../src/v2/hooks/hidden-child.ts"],"names":[],"mappings":"AAOA,OAAO,EAEH,KAAK,iBAAiB,EACzB,MAAM,oDAAoD,CAAC;AAE5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7D,eAAO,MAAM,sBAAsB,cAAc,CAAC;AAClD,eAAO,MAAM,oBAAoB,uBAAuB,CAAC;AACzD,eAAO,MAAM,mBAAmB,YAAgB,CAAC;AAmBjD,wBAAgB,cAAc,CAAC,QAAQ,EAAE,iBAAiB,GAAG,MAAM,CAQlE;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,iBAAiB,GAAG,OAAO,CAEnE;AAED,wBAAsB,yBAAyB,CAC3C,KAAK,EAAE,IAAI,CAAC,aAAa,EAAE,WAAW,CAAC,GACxC,OAAO,CAAC,IAAI,CAAC,CA0Bf;AAED,MAAM,WAAW,kBAAkB;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,OAAO,EAAE,UAAU,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gBAAgB,CAAC,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,kGAAkG;AAClG,wBAAgB,cAAc,CAAC,KAAK,EAAE,cAAc,GAAG,MAAM,GAAG,SAAS,CAmBxE;AAqDD;;;;;GAKG;AACH,qBAAa,eAAe;IACxB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAqB;IAC9C,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAyC;IAClE,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAyC;IAEhE,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAItC,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,kBAAkB,GAAG,IAAI;IAMlE,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAQpC,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO;IAIhC,qFAAqF;IACrF,KAAK,CAAC,KAAK,EAAE,cAAc,GAAG,OAAO;CA2ExC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { V2Context } from "./types";
|
|
2
|
+
/** True once the harness-scoped shared cache holds at least one catalog model. */
|
|
3
|
+
export declare function modelLimitCacheWarm(): boolean;
|
|
4
|
+
/** Test-only: clear the in-process warm latch. */
|
|
5
|
+
export declare function resetModelLimitCacheWarmForTest(): void;
|
|
6
|
+
/** Convert the v2 flat model catalog into the shared cache provider shape. */
|
|
7
|
+
export declare function catalogProvidersPayload(listed: unknown): Array<{
|
|
8
|
+
id: string;
|
|
9
|
+
models: Record<string, Record<string, unknown>>;
|
|
10
|
+
}>;
|
|
11
|
+
/**
|
|
12
|
+
* Seed the shared model-limit cache from the v2 host catalog. A failed early
|
|
13
|
+
* warm releases its latch so a later context pass can retry after host startup.
|
|
14
|
+
*/
|
|
15
|
+
export declare function warmModelLimitCacheFromCatalog(context: V2Context, options?: {
|
|
16
|
+
retries?: number;
|
|
17
|
+
retryDelayMs?: number;
|
|
18
|
+
}): Promise<void>;
|
|
19
|
+
//# sourceMappingURL=model-limit-cache.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-limit-cache.d.ts","sourceRoot":"","sources":["../../../src/v2/hooks/model-limit-cache.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAIzC,kFAAkF;AAClF,wBAAgB,mBAAmB,IAAI,OAAO,CAG7C;AAED,kDAAkD;AAClD,wBAAgB,+BAA+B,IAAI,IAAI,CAEtD;AAED,8EAA8E;AAC9E,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,OAAO,GAAG,KAAK,CAAC;IAC5D,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACnD,CAAC,CAgBD;AAED;;;GAGG;AACH,wBAAsB,8BAA8B,CAChD,OAAO,EAAE,SAAS,EAClB,OAAO,GAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAO,GAC1D,OAAO,CAAC,IAAI,CAAC,CA0Bf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../src/v2/hooks/payload.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../src/v2/hooks/payload.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAG1E,OAAO,KAAK,EAAE,cAAc,EAAa,MAAM,SAAS,CAAC;AAEzD,eAAO,MAAM,QAAQ,iEAAkE,CAAC;AAiGxF;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,cAAc,EAAE,WAAW,GAAE,WAAW,CAAC,MAAM,CAAa;;;EA+R/F"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface ProviderAdmissionInput {
|
|
2
|
+
/** Input + cached-read + cached-write tokens of the newest assistant reply. */
|
|
3
|
+
inputTokens: number;
|
|
4
|
+
/** The provider's own context window for the outgoing model, when the catalog knows it. */
|
|
5
|
+
rawContextLimit: number | undefined;
|
|
6
|
+
/** True when the host wrote a compaction after the reply the tokens were read from. */
|
|
7
|
+
hostCompactionReducedUsage: boolean;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Whether the OpenCode 2 context hook must stop a request before it reaches the
|
|
11
|
+
* provider.
|
|
12
|
+
*
|
|
13
|
+
* The provider's own context window is the only admission boundary here. Every
|
|
14
|
+
* other kind of pressure — in particular usage that fits the window but not the
|
|
15
|
+
* room reserved for the reply — has to be admitted, because the work that
|
|
16
|
+
* relieves it (compacting history into a compartment, and the high-pressure
|
|
17
|
+
* handling around it) all happens further down this same pass. A request stopped
|
|
18
|
+
* here runs none of it, so a session refused for pressure Magic Context could
|
|
19
|
+
* have removed is refused again on every following turn.
|
|
20
|
+
*/
|
|
21
|
+
export declare function refusesBeforeProvider(input: ProviderAdmissionInput): boolean;
|
|
22
|
+
//# sourceMappingURL=provider-admission.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider-admission.d.ts","sourceRoot":"","sources":["../../../src/v2/hooks/provider-admission.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,sBAAsB;IACnC,+EAA+E;IAC/E,WAAW,EAAE,MAAM,CAAC;IACpB,2FAA2F;IAC3F,eAAe,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,uFAAuF;IACvF,0BAA0B,EAAE,OAAO,CAAC;CACvC;AAKD;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,sBAAsB,GAAG,OAAO,CAkB5E"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type LiveSessionState } from "../../hooks/magic-context/live-session-state";
|
|
2
|
+
/**
|
|
3
|
+
* The RPC surface must read and write the SAME live sets the v2 pass uses.
|
|
4
|
+
* `systemPromptRefreshSessions` is part of that: a `/ctx-flush` arriving over
|
|
5
|
+
* RPC signals it, and only the shared instance is the one the next
|
|
6
|
+
* system-prompt transform drains.
|
|
7
|
+
*/
|
|
8
|
+
export declare function createV2RpcLiveSessionState(overrides: Pick<LiveSessionState, "liveModelBySession" | "variantBySession" | "agentBySession" | "channel1StateBySession" | "historyRefreshSessions" | "pendingMaterializationSessions" | "systemPromptRefreshSessions">): LiveSessionState;
|
|
9
|
+
//# sourceMappingURL=rpc-live-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rpc-live-state.d.ts","sourceRoot":"","sources":["../../../src/v2/hooks/rpc-live-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,KAAK,gBAAgB,EACxB,MAAM,8CAA8C,CAAC;AAEtD;;;;;GAKG;AACH,wBAAgB,2BAA2B,CACvC,SAAS,EAAE,IAAI,CACX,gBAAgB,EACd,oBAAoB,GACpB,kBAAkB,GAClB,gBAAgB,GAChB,wBAAwB,GACxB,wBAAwB,GACxB,gCAAgC,GAChC,6BAA6B,CAClC,GACF,gBAAgB,CAElB"}
|