@retaw106/mmc-oc 0.0.0-stage → 1.2.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/dist/agents/historian.d.ts +4 -0
- package/dist/agents/historian.d.ts.map +1 -0
- package/dist/agents/language-directive.d.ts +26 -0
- package/dist/agents/language-directive.d.ts.map +1 -0
- package/dist/agents/magic-context-prompt.d.ts +5 -0
- package/dist/agents/magic-context-prompt.d.ts.map +1 -0
- package/dist/agents/memory-maintainer.d.ts +96 -0
- package/dist/agents/memory-maintainer.d.ts.map +1 -0
- package/dist/config/agent-disable.d.ts +29 -0
- package/dist/config/agent-disable.d.ts.map +1 -0
- package/dist/config/config-paths.d.ts +7 -0
- package/dist/config/config-paths.d.ts.map +1 -0
- package/dist/config/index.d.ts +69 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/live-run-config.d.ts +11 -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/migrate-experimental.d.ts +26 -0
- package/dist/config/migrate-experimental.d.ts.map +1 -0
- package/dist/config/profiles.d.ts +22 -0
- package/dist/config/profiles.d.ts.map +1 -0
- package/dist/config/project-security.d.ts +124 -0
- package/dist/config/project-security.d.ts.map +1 -0
- package/dist/config/prune-config-leaf.d.ts +26 -0
- package/dist/config/prune-config-leaf.d.ts.map +1 -0
- package/dist/config/raw-loader.d.ts +42 -0
- package/dist/config/raw-loader.d.ts.map +1 -0
- package/dist/config/removed-agent-config.d.ts +8 -0
- package/dist/config/removed-agent-config.d.ts.map +1 -0
- package/dist/config/schema/agent-overrides.d.ts +52 -0
- package/dist/config/schema/agent-overrides.d.ts.map +1 -0
- package/dist/config/schema/magic-context.d.ts +805 -0
- package/dist/config/schema/magic-context.d.ts.map +1 -0
- package/dist/config/variable.d.ts +48 -0
- package/dist/config/variable.d.ts.map +1 -0
- package/dist/context-a6px04s0.js +23932 -0
- package/dist/context-d7jrfd5d.js +23932 -0
- package/dist/context-m94zd2xr.js +23932 -0
- package/dist/derive-budgets-fhk00zv8.js +18 -0
- package/dist/features/magic-context/compaction-marker.d.ts +211 -0
- package/dist/features/magic-context/compaction-marker.d.ts.map +1 -0
- package/dist/features/magic-context/compaction.d.ts +7 -0
- package/dist/features/magic-context/compaction.d.ts.map +1 -0
- package/dist/features/magic-context/compartment-events.d.ts +50 -0
- package/dist/features/magic-context/compartment-events.d.ts.map +1 -0
- package/dist/features/magic-context/compartment-lease.d.ts +28 -0
- package/dist/features/magic-context/compartment-lease.d.ts.map +1 -0
- package/dist/features/magic-context/compartment-storage.d.ts +178 -0
- package/dist/features/magic-context/compartment-storage.d.ts.map +1 -0
- package/dist/features/magic-context/compression-depth-storage.d.ts +14 -0
- package/dist/features/magic-context/compression-depth-storage.d.ts.map +1 -0
- package/dist/features/magic-context/context-authority.d.ts +15 -0
- package/dist/features/magic-context/context-authority.d.ts.map +1 -0
- package/dist/features/magic-context/fail-closed-block.d.ts +117 -0
- package/dist/features/magic-context/fail-closed-block.d.ts.map +1 -0
- package/dist/features/magic-context/index.d.ts +10 -0
- package/dist/features/magic-context/index.d.ts.map +1 -0
- package/dist/features/magic-context/literal-probes.d.ts +24 -0
- package/dist/features/magic-context/literal-probes.d.ts.map +1 -0
- package/dist/features/magic-context/lkg-prefix-chunks.d.ts +53 -0
- package/dist/features/magic-context/lkg-prefix-chunks.d.ts.map +1 -0
- package/dist/features/magic-context/memory/constants.d.ts +16 -0
- package/dist/features/magic-context/memory/constants.d.ts.map +1 -0
- package/dist/features/magic-context/memory/index.d.ts +11 -0
- package/dist/features/magic-context/memory/index.d.ts.map +1 -0
- 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/normalize-hash.d.ts +3 -0
- package/dist/features/magic-context/memory/normalize-hash.d.ts.map +1 -0
- package/dist/features/magic-context/memory/project-identity-cache.d.ts +7 -0
- package/dist/features/magic-context/memory/project-identity-cache.d.ts.map +1 -0
- package/dist/features/magic-context/memory/project-identity.d.ts +97 -0
- package/dist/features/magic-context/memory/project-identity.d.ts.map +1 -0
- package/dist/features/magic-context/memory/promotion.d.ts +26 -0
- package/dist/features/magic-context/memory/promotion.d.ts.map +1 -0
- package/dist/features/magic-context/memory/relocate-memory.d.ts +58 -0
- package/dist/features/magic-context/memory/relocate-memory.d.ts.map +1 -0
- package/dist/features/magic-context/memory/storage-memory-fts.d.ts +11 -0
- package/dist/features/magic-context/memory/storage-memory-fts.d.ts.map +1 -0
- package/dist/features/magic-context/memory/storage-memory-verifications.d.ts +35 -0
- package/dist/features/magic-context/memory/storage-memory-verifications.d.ts.map +1 -0
- package/dist/features/magic-context/memory/storage-memory.d.ts +89 -0
- package/dist/features/magic-context/memory/storage-memory.d.ts.map +1 -0
- package/dist/features/magic-context/memory/types.d.ts +59 -0
- package/dist/features/magic-context/memory/types.d.ts.map +1 -0
- package/dist/features/magic-context/memory/verification-paths.d.ts +48 -0
- package/dist/features/magic-context/memory/verification-paths.d.ts.map +1 -0
- package/dist/features/magic-context/memory/visibility.d.ts +6 -0
- package/dist/features/magic-context/memory/visibility.d.ts.map +1 -0
- package/dist/features/magic-context/memory-maintainer/apply.d.ts +65 -0
- package/dist/features/magic-context/memory-maintainer/apply.d.ts.map +1 -0
- package/dist/features/magic-context/memory-maintainer/budget.d.ts +75 -0
- package/dist/features/magic-context/memory-maintainer/budget.d.ts.map +1 -0
- package/dist/features/magic-context/memory-maintainer/coverage.d.ts +91 -0
- package/dist/features/magic-context/memory-maintainer/coverage.d.ts.map +1 -0
- package/dist/features/magic-context/memory-maintainer/dream-state.d.ts +18 -0
- package/dist/features/magic-context/memory-maintainer/dream-state.d.ts.map +1 -0
- package/dist/features/magic-context/memory-maintainer/launcher.d.ts +119 -0
- package/dist/features/magic-context/memory-maintainer/launcher.d.ts.map +1 -0
- package/dist/features/magic-context/memory-maintainer/lease.d.ts +56 -0
- package/dist/features/magic-context/memory-maintainer/lease.d.ts.map +1 -0
- package/dist/features/magic-context/memory-maintainer/manifest.d.ts +127 -0
- package/dist/features/magic-context/memory-maintainer/manifest.d.ts.map +1 -0
- package/dist/features/magic-context/memory-maintainer/manual-commands.d.ts +46 -0
- package/dist/features/magic-context/memory-maintainer/manual-commands.d.ts.map +1 -0
- package/dist/features/magic-context/memory-maintainer/oc2-adapter.d.ts +79 -0
- package/dist/features/magic-context/memory-maintainer/oc2-adapter.d.ts.map +1 -0
- package/dist/features/magic-context/memory-maintainer/pause-report.d.ts +37 -0
- package/dist/features/magic-context/memory-maintainer/pause-report.d.ts.map +1 -0
- package/dist/features/magic-context/memory-maintainer/pipeline.d.ts +199 -0
- package/dist/features/magic-context/memory-maintainer/pipeline.d.ts.map +1 -0
- package/dist/features/magic-context/memory-maintainer/provider-output-failure.d.ts +15 -0
- package/dist/features/magic-context/memory-maintainer/provider-output-failure.d.ts.map +1 -0
- package/dist/features/magic-context/memory-maintainer/schedule-storage.d.ts +76 -0
- package/dist/features/magic-context/memory-maintainer/schedule-storage.d.ts.map +1 -0
- package/dist/features/magic-context/memory-maintainer/schedule.d.ts +90 -0
- package/dist/features/magic-context/memory-maintainer/schedule.d.ts.map +1 -0
- package/dist/features/magic-context/merged-reasoning-decisions.d.ts +6 -0
- package/dist/features/magic-context/merged-reasoning-decisions.d.ts.map +1 -0
- package/dist/features/magic-context/message-fts-rowid-map.d.ts +50 -0
- package/dist/features/magic-context/message-fts-rowid-map.d.ts.map +1 -0
- package/dist/features/magic-context/message-fts-session-filter.d.ts +14 -0
- package/dist/features/magic-context/message-fts-session-filter.d.ts.map +1 -0
- package/dist/features/magic-context/message-index-async.d.ts +33 -0
- package/dist/features/magic-context/message-index-async.d.ts.map +1 -0
- package/dist/features/magic-context/message-index-sweep.d.ts +11 -0
- package/dist/features/magic-context/message-index-sweep.d.ts.map +1 -0
- package/dist/features/magic-context/message-index.d.ts +88 -0
- package/dist/features/magic-context/message-index.d.ts.map +1 -0
- 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/migration-v2-write-split.d.ts +62 -0
- package/dist/features/magic-context/migration-v2-write-split.d.ts.map +1 -0
- package/dist/features/magic-context/migrations.d.ts +73 -0
- package/dist/features/magic-context/migrations.d.ts.map +1 -0
- package/dist/features/magic-context/mock-database.d.ts +3 -0
- package/dist/features/magic-context/mock-database.d.ts.map +1 -0
- package/dist/features/magic-context/mural/storage-mural-cues.d.ts +65 -0
- package/dist/features/magic-context/mural/storage-mural-cues.d.ts.map +1 -0
- package/dist/features/magic-context/no-content-compartment.d.ts +12 -0
- package/dist/features/magic-context/no-content-compartment.d.ts.map +1 -0
- 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 +108 -0
- package/dist/features/magic-context/overflow-detection.d.ts.map +1 -0
- package/dist/features/magic-context/pi-content-decisions.d.ts +9 -0
- package/dist/features/magic-context/pi-content-decisions.d.ts.map +1 -0
- package/dist/features/magic-context/project-identity.d.ts +2 -0
- package/dist/features/magic-context/project-identity.d.ts.map +1 -0
- package/dist/features/magic-context/protection-window.d.ts +79 -0
- package/dist/features/magic-context/protection-window.d.ts.map +1 -0
- package/dist/features/magic-context/range-parser.d.ts +18 -0
- package/dist/features/magic-context/range-parser.d.ts.map +1 -0
- package/dist/features/magic-context/reclaim-protection.d.ts +13 -0
- package/dist/features/magic-context/reclaim-protection.d.ts.map +1 -0
- package/dist/features/magic-context/resolve-subagent-fallback.d.ts +42 -0
- package/dist/features/magic-context/resolve-subagent-fallback.d.ts.map +1 -0
- package/dist/features/magic-context/scheduler.d.ts +20 -0
- package/dist/features/magic-context/scheduler.d.ts.map +1 -0
- package/dist/features/magic-context/schema-fence-probe.d.ts +29 -0
- package/dist/features/magic-context/schema-fence-probe.d.ts.map +1 -0
- package/dist/features/magic-context/search.d.ts +118 -0
- package/dist/features/magic-context/search.d.ts.map +1 -0
- package/dist/features/magic-context/session-cache-ttl.d.ts +10 -0
- package/dist/features/magic-context/session-cache-ttl.d.ts.map +1 -0
- 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 +37 -0
- package/dist/features/magic-context/session-project-backfill.d.ts.map +1 -0
- package/dist/features/magic-context/session-project-storage.d.ts +23 -0
- package/dist/features/magic-context/session-project-storage.d.ts.map +1 -0
- package/dist/features/magic-context/storage-caveman-rules.d.ts +21 -0
- package/dist/features/magic-context/storage-caveman-rules.d.ts.map +1 -0
- package/dist/features/magic-context/storage-clone.d.ts +44 -0
- package/dist/features/magic-context/storage-clone.d.ts.map +1 -0
- package/dist/features/magic-context/storage-db.d.ts +183 -0
- package/dist/features/magic-context/storage-db.d.ts.map +1 -0
- package/dist/features/magic-context/storage-historian-runs.d.ts +79 -0
- package/dist/features/magic-context/storage-historian-runs.d.ts.map +1 -0
- package/dist/features/magic-context/storage-identity-merge.d.ts +26 -0
- package/dist/features/magic-context/storage-identity-merge.d.ts.map +1 -0
- package/dist/features/magic-context/storage-identity-rekey-map.d.ts +11 -0
- package/dist/features/magic-context/storage-identity-rekey-map.d.ts.map +1 -0
- package/dist/features/magic-context/storage-m0-mutation-log.d.ts +22 -0
- package/dist/features/magic-context/storage-m0-mutation-log.d.ts.map +1 -0
- package/dist/features/magic-context/storage-memory-mutation-log.d.ts +29 -0
- package/dist/features/magic-context/storage-memory-mutation-log.d.ts.map +1 -0
- package/dist/features/magic-context/storage-meta-persisted.d.ts +623 -0
- package/dist/features/magic-context/storage-meta-persisted.d.ts.map +1 -0
- package/dist/features/magic-context/storage-meta-session.d.ts +14 -0
- package/dist/features/magic-context/storage-meta-session.d.ts.map +1 -0
- package/dist/features/magic-context/storage-meta-shared.d.ts +102 -0
- package/dist/features/magic-context/storage-meta-shared.d.ts.map +1 -0
- package/dist/features/magic-context/storage-meta.d.ts +4 -0
- package/dist/features/magic-context/storage-meta.d.ts.map +1 -0
- package/dist/features/magic-context/storage-native-replay.d.ts +29 -0
- package/dist/features/magic-context/storage-native-replay.d.ts.map +1 -0
- package/dist/features/magic-context/storage-notes.d.ts +80 -0
- package/dist/features/magic-context/storage-notes.d.ts.map +1 -0
- package/dist/features/magic-context/storage-ops.d.ts +14 -0
- package/dist/features/magic-context/storage-ops.d.ts.map +1 -0
- package/dist/features/magic-context/storage-primers.d.ts +96 -0
- package/dist/features/magic-context/storage-primers.d.ts.map +1 -0
- package/dist/features/magic-context/storage-project-state.d.ts +19 -0
- package/dist/features/magic-context/storage-project-state.d.ts.map +1 -0
- package/dist/features/magic-context/storage-reasoning-removal.d.ts +30 -0
- package/dist/features/magic-context/storage-reasoning-removal.d.ts.map +1 -0
- package/dist/features/magic-context/storage-replay-document.d.ts +72 -0
- package/dist/features/magic-context/storage-replay-document.d.ts.map +1 -0
- package/dist/features/magic-context/storage-schema-helpers.d.ts +31 -0
- package/dist/features/magic-context/storage-schema-helpers.d.ts.map +1 -0
- package/dist/features/magic-context/storage-session-tables.d.ts +18 -0
- package/dist/features/magic-context/storage-session-tables.d.ts.map +1 -0
- package/dist/features/magic-context/storage-source.d.ts +5 -0
- package/dist/features/magic-context/storage-source.d.ts.map +1 -0
- package/dist/features/magic-context/storage-subagent-invocations.d.ts +62 -0
- package/dist/features/magic-context/storage-subagent-invocations.d.ts.map +1 -0
- package/dist/features/magic-context/storage-tags.d.ts +542 -0
- package/dist/features/magic-context/storage-tags.d.ts.map +1 -0
- package/dist/features/magic-context/storage-unavailable-reason.d.ts +17 -0
- package/dist/features/magic-context/storage-unavailable-reason.d.ts.map +1 -0
- package/dist/features/magic-context/storage-v22-backfill-failures.d.ts +26 -0
- package/dist/features/magic-context/storage-v22-backfill-failures.d.ts.map +1 -0
- package/dist/features/magic-context/storage.d.ts +23 -0
- package/dist/features/magic-context/storage.d.ts.map +1 -0
- package/dist/features/magic-context/store-generation-rebase.d.ts +188 -0
- package/dist/features/magic-context/store-generation-rebase.d.ts.map +1 -0
- package/dist/features/magic-context/subagent-token-capture.d.ts +35 -0
- package/dist/features/magic-context/subagent-token-capture.d.ts.map +1 -0
- package/dist/features/magic-context/tag-input.d.ts +4 -0
- package/dist/features/magic-context/tag-input.d.ts.map +1 -0
- package/dist/features/magic-context/tagger.d.ts +119 -0
- package/dist/features/magic-context/tagger.d.ts.map +1 -0
- package/dist/features/magic-context/tool-definition-tokens.d.ts +90 -0
- package/dist/features/magic-context/tool-definition-tokens.d.ts.map +1 -0
- package/dist/features/magic-context/tool-owner-backfill.d.ts +93 -0
- package/dist/features/magic-context/tool-owner-backfill.d.ts.map +1 -0
- package/dist/features/magic-context/transform-decision-log.d.ts +110 -0
- package/dist/features/magic-context/transform-decision-log.d.ts.map +1 -0
- package/dist/features/magic-context/types.d.ts +133 -0
- package/dist/features/magic-context/types.d.ts.map +1 -0
- package/dist/features/magic-context/window-report-ledger.d.ts +70 -0
- package/dist/features/magic-context/window-report-ledger.d.ts.map +1 -0
- package/dist/features/magic-context/work-metrics.d.ts +79 -0
- package/dist/features/magic-context/work-metrics.d.ts.map +1 -0
- package/dist/features/magic-context/workspaces.d.ts +28 -0
- package/dist/features/magic-context/workspaces.d.ts.map +1 -0
- package/dist/hooks/auto-update-checker/semver.d.ts +26 -0
- package/dist/hooks/auto-update-checker/semver.d.ts.map +1 -0
- package/dist/hooks/magic-context/apply-operations.d.ts +158 -0
- package/dist/hooks/magic-context/apply-operations.d.ts.map +1 -0
- package/dist/hooks/magic-context/auto-search-deadline.d.ts +10 -0
- package/dist/hooks/magic-context/auto-search-deadline.d.ts.map +1 -0
- package/dist/hooks/magic-context/auto-search-hint.d.ts +36 -0
- package/dist/hooks/magic-context/auto-search-hint.d.ts.map +1 -0
- package/dist/hooks/magic-context/auto-search-runner.d.ts +60 -0
- package/dist/hooks/magic-context/auto-search-runner.d.ts.map +1 -0
- package/dist/hooks/magic-context/cache-busting-signals.d.ts +42 -0
- package/dist/hooks/magic-context/cache-busting-signals.d.ts.map +1 -0
- package/dist/hooks/magic-context/caveman-cleanup.d.ts +98 -0
- package/dist/hooks/magic-context/caveman-cleanup.d.ts.map +1 -0
- package/dist/hooks/magic-context/caveman.d.ts +90 -0
- package/dist/hooks/magic-context/caveman.d.ts.map +1 -0
- package/dist/hooks/magic-context/channel2-cycle.d.ts +16 -0
- package/dist/hooks/magic-context/channel2-cycle.d.ts.map +1 -0
- package/dist/hooks/magic-context/channel2-delivery.d.ts +32 -0
- package/dist/hooks/magic-context/channel2-delivery.d.ts.map +1 -0
- package/dist/hooks/magic-context/child-session-spawn.d.ts +27 -0
- package/dist/hooks/magic-context/child-session-spawn.d.ts.map +1 -0
- package/dist/hooks/magic-context/compaction-marker-manager.d.ts +154 -0
- package/dist/hooks/magic-context/compaction-marker-manager.d.ts.map +1 -0
- package/dist/hooks/magic-context/compaction-off-transition.d.ts +97 -0
- package/dist/hooks/magic-context/compaction-off-transition.d.ts.map +1 -0
- package/dist/hooks/magic-context/compartment-parser.d.ts +66 -0
- package/dist/hooks/magic-context/compartment-parser.d.ts.map +1 -0
- package/dist/hooks/magic-context/compartment-prompt.d.ts +33 -0
- package/dist/hooks/magic-context/compartment-prompt.d.ts.map +1 -0
- package/dist/hooks/magic-context/compartment-render-epoch.d.ts +27 -0
- package/dist/hooks/magic-context/compartment-render-epoch.d.ts.map +1 -0
- package/dist/hooks/magic-context/compartment-runner-drop-queue.d.ts +29 -0
- package/dist/hooks/magic-context/compartment-runner-drop-queue.d.ts.map +1 -0
- package/dist/hooks/magic-context/compartment-runner-historian.d.ts +43 -0
- package/dist/hooks/magic-context/compartment-runner-historian.d.ts.map +1 -0
- package/dist/hooks/magic-context/compartment-runner-incremental.d.ts +31 -0
- package/dist/hooks/magic-context/compartment-runner-incremental.d.ts.map +1 -0
- package/dist/hooks/magic-context/compartment-runner-mapping.d.ts +25 -0
- package/dist/hooks/magic-context/compartment-runner-mapping.d.ts.map +1 -0
- package/dist/hooks/magic-context/compartment-runner-partial-recomp.d.ts +29 -0
- package/dist/hooks/magic-context/compartment-runner-partial-recomp.d.ts.map +1 -0
- package/dist/hooks/magic-context/compartment-runner-recomp.d.ts +11 -0
- package/dist/hooks/magic-context/compartment-runner-recomp.d.ts.map +1 -0
- package/dist/hooks/magic-context/compartment-runner-types.d.ts +295 -0
- package/dist/hooks/magic-context/compartment-runner-types.d.ts.map +1 -0
- package/dist/hooks/magic-context/compartment-runner-validation.d.ts +83 -0
- package/dist/hooks/magic-context/compartment-runner-validation.d.ts.map +1 -0
- package/dist/hooks/magic-context/compartment-runner.d.ts +59 -0
- package/dist/hooks/magic-context/compartment-runner.d.ts.map +1 -0
- package/dist/hooks/magic-context/compartment-trigger.d.ts +77 -0
- package/dist/hooks/magic-context/compartment-trigger.d.ts.map +1 -0
- package/dist/hooks/magic-context/ctx-reduce-availability.d.ts +170 -0
- package/dist/hooks/magic-context/ctx-reduce-availability.d.ts.map +1 -0
- package/dist/hooks/magic-context/ctx-reduce-nudge.d.ts +104 -0
- package/dist/hooks/magic-context/ctx-reduce-nudge.d.ts.map +1 -0
- package/dist/hooks/magic-context/decay-curve.d.ts +84 -0
- package/dist/hooks/magic-context/decay-curve.d.ts.map +1 -0
- package/dist/hooks/magic-context/decay-render.d.ts +80 -0
- package/dist/hooks/magic-context/decay-render.d.ts.map +1 -0
- 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/degraded-pass-refusal.d.ts +35 -0
- package/dist/hooks/magic-context/degraded-pass-refusal.d.ts.map +1 -0
- package/dist/hooks/magic-context/derive-budgets.d.ts +60 -0
- package/dist/hooks/magic-context/derive-budgets.d.ts.map +1 -0
- package/dist/hooks/magic-context/drop-stale-reduce-calls.d.ts +39 -0
- package/dist/hooks/magic-context/drop-stale-reduce-calls.d.ts.map +1 -0
- package/dist/hooks/magic-context/dropped-input-guard.d.ts +55 -0
- package/dist/hooks/magic-context/dropped-input-guard.d.ts.map +1 -0
- package/dist/hooks/magic-context/dropped-token-estimate.d.ts +20 -0
- package/dist/hooks/magic-context/dropped-token-estimate.d.ts.map +1 -0
- package/dist/hooks/magic-context/edit-marker.d.ts +11 -0
- package/dist/hooks/magic-context/edit-marker.d.ts.map +1 -0
- package/dist/hooks/magic-context/emergency-drop.d.ts +112 -0
- package/dist/hooks/magic-context/emergency-drop.d.ts.map +1 -0
- package/dist/hooks/magic-context/emergency-fail-closed.d.ts +14 -0
- package/dist/hooks/magic-context/emergency-fail-closed.d.ts.map +1 -0
- package/dist/hooks/magic-context/empty-task-output.d.ts +16 -0
- package/dist/hooks/magic-context/empty-task-output.d.ts.map +1 -0
- package/dist/hooks/magic-context/event-payloads.d.ts +73 -0
- package/dist/hooks/magic-context/event-payloads.d.ts.map +1 -0
- package/dist/hooks/magic-context/event-resolvers.d.ts +114 -0
- package/dist/hooks/magic-context/event-resolvers.d.ts.map +1 -0
- package/dist/hooks/magic-context/execute-flush.d.ts +3 -0
- package/dist/hooks/magic-context/execute-flush.d.ts.map +1 -0
- package/dist/hooks/magic-context/final-wire-token-estimate.d.ts +56 -0
- package/dist/hooks/magic-context/final-wire-token-estimate.d.ts.map +1 -0
- package/dist/hooks/magic-context/fold-execution-gate.d.ts +2 -0
- package/dist/hooks/magic-context/fold-execution-gate.d.ts.map +1 -0
- package/dist/hooks/magic-context/format-bytes.d.ts +2 -0
- package/dist/hooks/magic-context/format-bytes.d.ts.map +1 -0
- package/dist/hooks/magic-context/heuristic-cleanup.d.ts +48 -0
- package/dist/hooks/magic-context/heuristic-cleanup.d.ts.map +1 -0
- 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-prompt-fit.d.ts +112 -0
- package/dist/hooks/magic-context/historian-prompt-fit.d.ts.map +1 -0
- package/dist/hooks/magic-context/historian-prompt.generated.d.ts +2 -0
- package/dist/hooks/magic-context/historian-prompt.generated.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/historian-state-file.d.ts +43 -0
- package/dist/hooks/magic-context/historian-state-file.d.ts.map +1 -0
- package/dist/hooks/magic-context/history-boundary-repair.d.ts +44 -0
- package/dist/hooks/magic-context/history-boundary-repair.d.ts.map +1 -0
- package/dist/hooks/magic-context/hook-handlers.d.ts +177 -0
- package/dist/hooks/magic-context/hook-handlers.d.ts.map +1 -0
- 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/image-token-estimate.d.ts +15 -0
- package/dist/hooks/magic-context/image-token-estimate.d.ts.map +1 -0
- package/dist/hooks/magic-context/inject-compartments.d.ts +389 -0
- package/dist/hooks/magic-context/inject-compartments.d.ts.map +1 -0
- package/dist/hooks/magic-context/issue-135-wire-fixtures.d.ts +8 -0
- package/dist/hooks/magic-context/issue-135-wire-fixtures.d.ts.map +1 -0
- package/dist/hooks/magic-context/issue-423-fixture.d.ts +37 -0
- package/dist/hooks/magic-context/issue-423-fixture.d.ts.map +1 -0
- package/dist/hooks/magic-context/issue-424-fixture.d.ts +11 -0
- package/dist/hooks/magic-context/issue-424-fixture.d.ts.map +1 -0
- 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 +68 -0
- package/dist/hooks/magic-context/live-session-state.d.ts.map +1 -0
- package/dist/hooks/magic-context/lkg-persist.d.ts +22 -0
- package/dist/hooks/magic-context/lkg-persist.d.ts.map +1 -0
- package/dist/hooks/magic-context/lkg-replay.d.ts +71 -0
- package/dist/hooks/magic-context/lkg-replay.d.ts.map +1 -0
- package/dist/hooks/magic-context/lkg-slot.d.ts +119 -0
- package/dist/hooks/magic-context/lkg-slot.d.ts.map +1 -0
- package/dist/hooks/magic-context/m0-token-breakdown.d.ts +44 -0
- package/dist/hooks/magic-context/m0-token-breakdown.d.ts.map +1 -0
- package/dist/hooks/magic-context/maintenance-authority.d.ts +2 -0
- package/dist/hooks/magic-context/maintenance-authority.d.ts.map +1 -0
- package/dist/hooks/magic-context/openai-compat-adjacency.d.ts +38 -0
- package/dist/hooks/magic-context/openai-compat-adjacency.d.ts.map +1 -0
- package/dist/hooks/magic-context/opencode-v1-store-fixture.d.ts +12 -0
- package/dist/hooks/magic-context/opencode-v1-store-fixture.d.ts.map +1 -0
- package/dist/hooks/magic-context/pass-outcome.d.ts +70 -0
- package/dist/hooks/magic-context/pass-outcome.d.ts.map +1 -0
- package/dist/hooks/magic-context/persist-filtered-noise.d.ts +5 -0
- package/dist/hooks/magic-context/persist-filtered-noise.d.ts.map +1 -0
- 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 +63 -0
- package/dist/hooks/magic-context/producer-window-guard.d.ts.map +1 -0
- 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 +234 -0
- package/dist/hooks/magic-context/protected-tail-boundary.d.ts.map +1 -0
- package/dist/hooks/magic-context/raw-fallback-context-limit.d.ts +10 -0
- package/dist/hooks/magic-context/raw-fallback-context-limit.d.ts.map +1 -0
- package/dist/hooks/magic-context/read-session-chunk.d.ts +271 -0
- package/dist/hooks/magic-context/read-session-chunk.d.ts.map +1 -0
- package/dist/hooks/magic-context/read-session-db.d.ts +66 -0
- package/dist/hooks/magic-context/read-session-db.d.ts.map +1 -0
- package/dist/hooks/magic-context/read-session-formatting.d.ts +65 -0
- package/dist/hooks/magic-context/read-session-formatting.d.ts.map +1 -0
- package/dist/hooks/magic-context/read-session-raw.d.ts +164 -0
- package/dist/hooks/magic-context/read-session-raw.d.ts.map +1 -0
- package/dist/hooks/magic-context/read-session-true-raw-tokens.d.ts +82 -0
- package/dist/hooks/magic-context/read-session-true-raw-tokens.d.ts.map +1 -0
- package/dist/hooks/magic-context/reasoning-removal.d.ts +60 -0
- package/dist/hooks/magic-context/reasoning-removal.d.ts.map +1 -0
- package/dist/hooks/magic-context/recomp-orchestrator.d.ts +93 -0
- package/dist/hooks/magic-context/recomp-orchestrator.d.ts.map +1 -0
- package/dist/hooks/magic-context/reference-retrieval.d.ts +72 -0
- package/dist/hooks/magic-context/reference-retrieval.d.ts.map +1 -0
- package/dist/hooks/magic-context/reference-seeds.generated.d.ts +8 -0
- package/dist/hooks/magic-context/reference-seeds.generated.d.ts.map +1 -0
- package/dist/hooks/magic-context/send-session-notification.d.ts +43 -0
- package/dist/hooks/magic-context/send-session-notification.d.ts.map +1 -0
- package/dist/hooks/magic-context/sentinel.d.ts +146 -0
- package/dist/hooks/magic-context/sentinel.d.ts.map +1 -0
- package/dist/hooks/magic-context/storage-busy-refusal.d.ts +20 -0
- package/dist/hooks/magic-context/storage-busy-refusal.d.ts.map +1 -0
- package/dist/hooks/magic-context/strip-content.d.ts +216 -0
- package/dist/hooks/magic-context/strip-content.d.ts.map +1 -0
- package/dist/hooks/magic-context/strip-structural-noise.d.ts +15 -0
- package/dist/hooks/magic-context/strip-structural-noise.d.ts.map +1 -0
- package/dist/hooks/magic-context/stripped-command.d.ts +56 -0
- package/dist/hooks/magic-context/stripped-command.d.ts.map +1 -0
- package/dist/hooks/magic-context/supersession-reclaim.d.ts +58 -0
- package/dist/hooks/magic-context/supersession-reclaim.d.ts.map +1 -0
- package/dist/hooks/magic-context/system-injection-stripper.d.ts +2 -0
- package/dist/hooks/magic-context/system-injection-stripper.d.ts.map +1 -0
- package/dist/hooks/magic-context/system-prompt-hash.d.ts +129 -0
- package/dist/hooks/magic-context/system-prompt-hash.d.ts.map +1 -0
- package/dist/hooks/magic-context/tag-content-primitives.d.ts +31 -0
- package/dist/hooks/magic-context/tag-content-primitives.d.ts.map +1 -0
- package/dist/hooks/magic-context/tag-id-fallback.d.ts +11 -0
- package/dist/hooks/magic-context/tag-id-fallback.d.ts.map +1 -0
- package/dist/hooks/magic-context/tag-messages.d.ts +145 -0
- package/dist/hooks/magic-context/tag-messages.d.ts.map +1 -0
- package/dist/hooks/magic-context/tag-part-guards.d.ts +23 -0
- package/dist/hooks/magic-context/tag-part-guards.d.ts.map +1 -0
- package/dist/hooks/magic-context/tail-hygiene-walk.d.ts +178 -0
- package/dist/hooks/magic-context/tail-hygiene-walk.d.ts.map +1 -0
- package/dist/hooks/magic-context/temporal-awareness.d.ts +73 -0
- package/dist/hooks/magic-context/temporal-awareness.d.ts.map +1 -0
- package/dist/hooks/magic-context/text-complete.d.ts +31 -0
- package/dist/hooks/magic-context/text-complete.d.ts.map +1 -0
- package/dist/hooks/magic-context/todo-view.d.ts +127 -0
- package/dist/hooks/magic-context/todo-view.d.ts.map +1 -0
- package/dist/hooks/magic-context/tokenizer-calibration.d.ts +92 -0
- package/dist/hooks/magic-context/tokenizer-calibration.d.ts.map +1 -0
- package/dist/hooks/magic-context/tool-drop-target.d.ts +144 -0
- package/dist/hooks/magic-context/tool-drop-target.d.ts.map +1 -0
- package/dist/hooks/magic-context/tool-input-size.d.ts +21 -0
- package/dist/hooks/magic-context/tool-input-size.d.ts.map +1 -0
- package/dist/hooks/magic-context/tool-reclaim.d.ts +12 -0
- package/dist/hooks/magic-context/tool-reclaim.d.ts.map +1 -0
- 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 +133 -0
- package/dist/hooks/magic-context/transform-compartment-phase.d.ts.map +1 -0
- package/dist/hooks/magic-context/transform-context-state.d.ts +28 -0
- package/dist/hooks/magic-context/transform-context-state.d.ts.map +1 -0
- package/dist/hooks/magic-context/transform-message-helpers.d.ts +32 -0
- package/dist/hooks/magic-context/transform-message-helpers.d.ts.map +1 -0
- package/dist/hooks/magic-context/transform-operations.d.ts +5 -0
- package/dist/hooks/magic-context/transform-operations.d.ts.map +1 -0
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts +350 -0
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts.map +1 -0
- package/dist/hooks/magic-context/transform-stage-logger.d.ts +2 -0
- package/dist/hooks/magic-context/transform-stage-logger.d.ts.map +1 -0
- package/dist/hooks/magic-context/transform.d.ts +334 -0
- package/dist/hooks/magic-context/transform.d.ts.map +1 -0
- package/dist/hooks/magic-context/unmanaged-over-window.d.ts +36 -0
- package/dist/hooks/magic-context/unmanaged-over-window.d.ts.map +1 -0
- package/dist/hooks/magic-context/unresolved-history-boundary.d.ts +15 -0
- package/dist/hooks/magic-context/unresolved-history-boundary.d.ts.map +1 -0
- package/dist/hooks/magic-context/wrapup-orchestrator.d.ts +14 -0
- package/dist/hooks/magic-context/wrapup-orchestrator.d.ts.map +1 -0
- package/dist/index-1vs6anwz.js +126 -0
- package/dist/index-2axapwjs.js +6388 -0
- package/dist/index-3wagyrnj.js +670 -0
- package/dist/index-46j0tj1s.js +27883 -0
- package/dist/index-53g38ggt.js +40 -0
- package/dist/index-5pg0acf7.js +410 -0
- package/dist/index-5s9w99sf.js +126 -0
- package/dist/index-7dgv6pzg.js +126 -0
- package/dist/index-977gxfz0.js +514 -0
- package/dist/index-by6h2pav.js +27883 -0
- package/dist/index-e1q8002h.js +16 -0
- package/dist/index-fg34g6a5.js +584 -0
- package/dist/index-jdxxq8cz.js +99 -0
- package/dist/index-me3zcj5t.js +69 -0
- package/dist/index-qbkzdkk0.js +496 -0
- package/dist/index-qkdksr6f.js +6388 -0
- package/dist/index-wgt4gamw.js +6388 -0
- package/dist/index-xyjcjq10.js +27883 -0
- package/dist/index-zx63j2e2.js +907 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +37 -0
- package/dist/message-time-backfill-5ewk0axe.js +116 -0
- package/dist/model-resolution-5haaxnpt.js +6 -0
- package/dist/plugin/boot-deadline.d.ts +47 -0
- package/dist/plugin/boot-deadline.d.ts.map +1 -0
- package/dist/plugin/boot-quiet.d.ts +12 -0
- package/dist/plugin/boot-quiet.d.ts.map +1 -0
- package/dist/plugin/normalize-tool-arg-schemas.d.ts +7 -0
- package/dist/plugin/normalize-tool-arg-schemas.d.ts.map +1 -0
- package/dist/plugin/rpc-handlers.d.ts +52 -0
- package/dist/plugin/rpc-handlers.d.ts.map +1 -0
- package/dist/plugin/sidebar-snapshot-cache.d.ts +19 -0
- package/dist/plugin/sidebar-snapshot-cache.d.ts.map +1 -0
- package/dist/plugin/subagent-tool-policy.d.ts +9 -0
- package/dist/plugin/subagent-tool-policy.d.ts.map +1 -0
- package/dist/plugin/types.d.ts +3 -0
- package/dist/plugin/types.d.ts.map +1 -0
- package/dist/prompt-context-ffa5xcfx.js +76 -0
- package/dist/read-session-chunk-apjwrttc.js +56 -0
- package/dist/read-session-chunk-s79jhs7t.js +56 -0
- package/dist/read-session-chunk-tt4vhgq3.js +56 -0
- package/dist/recomp-orchestrator-g66dssga.js +21 -0
- package/dist/recomp-orchestrator-gyeevxaw.js +21 -0
- package/dist/recomp-orchestrator-r4zzvjxc.js +21 -0
- package/dist/rpc-notifications-4amf6mf4.js +14 -0
- package/dist/safe-notification-target-ph3xd1ve.js +9 -0
- package/dist/send-session-notification-y29y9fsr.js +18 -0
- package/dist/shared/announcement.d.ts +69 -0
- package/dist/shared/announcement.d.ts.map +1 -0
- package/dist/shared/assistant-message-extractor.d.ts +13 -0
- package/dist/shared/assistant-message-extractor.d.ts.map +1 -0
- package/dist/shared/auto-update-provenance.d.ts +9 -0
- package/dist/shared/auto-update-provenance.d.ts.map +1 -0
- package/dist/shared/bounded-session-map.d.ts +45 -0
- package/dist/shared/bounded-session-map.d.ts.map +1 -0
- package/dist/shared/builtin-commands.d.ts +24 -0
- package/dist/shared/builtin-commands.d.ts.map +1 -0
- package/dist/shared/cache-ttl-display.d.ts +25 -0
- package/dist/shared/cache-ttl-display.d.ts.map +1 -0
- package/dist/shared/cache-ttl-seed.d.ts +10 -0
- package/dist/shared/cache-ttl-seed.d.ts.map +1 -0
- package/dist/shared/child-session-teardown.d.ts +34 -0
- package/dist/shared/child-session-teardown.d.ts.map +1 -0
- package/dist/shared/commit-detection.d.ts +29 -0
- package/dist/shared/commit-detection.d.ts.map +1 -0
- package/dist/shared/config-diagnostics.d.ts +30 -0
- package/dist/shared/config-diagnostics.d.ts.map +1 -0
- package/dist/shared/conflict-detector.d.ts +139 -0
- package/dist/shared/conflict-detector.d.ts.map +1 -0
- package/dist/shared/conflict-fixer.d.ts +20 -0
- package/dist/shared/conflict-fixer.d.ts.map +1 -0
- package/dist/shared/context-limit-provenance.d.ts +3 -0
- package/dist/shared/context-limit-provenance.d.ts.map +1 -0
- package/dist/shared/data-path.d.ts +176 -0
- package/dist/shared/data-path.d.ts.map +1 -0
- package/dist/shared/error-message.d.ts +32 -0
- package/dist/shared/error-message.d.ts.map +1 -0
- package/dist/shared/escalation-bands.d.ts +9 -0
- package/dist/shared/escalation-bands.d.ts.map +1 -0
- package/dist/shared/format-bytes.d.ts +2 -0
- package/dist/shared/format-bytes.d.ts.map +1 -0
- package/dist/shared/format-threshold.d.ts +43 -0
- package/dist/shared/format-threshold.d.ts.map +1 -0
- package/dist/shared/harness-provider-map.d.ts +64 -0
- package/dist/shared/harness-provider-map.d.ts.map +1 -0
- package/dist/shared/harness.d.ts +55 -0
- package/dist/shared/harness.d.ts.map +1 -0
- package/dist/shared/hidden-variant-warnings.d.ts +5 -0
- package/dist/shared/hidden-variant-warnings.d.ts.map +1 -0
- package/dist/shared/historian-tool-expansions.d.ts +5 -0
- package/dist/shared/historian-tool-expansions.d.ts.map +1 -0
- package/dist/shared/historian-tool-template.d.ts +5 -0
- package/dist/shared/historian-tool-template.d.ts.map +1 -0
- package/dist/shared/historian-transient-error.d.ts +2 -0
- package/dist/shared/historian-transient-error.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/index.d.ts +8 -0
- package/dist/shared/index.d.ts.map +1 -0
- package/dist/shared/internal-initiator-marker.d.ts +2 -0
- package/dist/shared/internal-initiator-marker.d.ts.map +1 -0
- package/dist/shared/jsonc-edit.d.ts +23 -0
- package/dist/shared/jsonc-edit.d.ts.map +1 -0
- package/dist/shared/jsonc-parser.d.ts +30 -0
- package/dist/shared/jsonc-parser.d.ts.map +1 -0
- package/dist/shared/keep-subagents.d.ts +7 -0
- package/dist/shared/keep-subagents.d.ts.map +1 -0
- package/dist/shared/logger.d.ts +18 -0
- package/dist/shared/logger.d.ts.map +1 -0
- package/dist/shared/model-cache-ttl.d.ts +9 -0
- package/dist/shared/model-cache-ttl.d.ts.map +1 -0
- package/dist/shared/model-resolution.d.ts +35 -0
- package/dist/shared/model-resolution.d.ts.map +1 -0
- package/dist/shared/model-suggestion-retry.d.ts +138 -0
- package/dist/shared/model-suggestion-retry.d.ts.map +1 -0
- package/dist/shared/models-dev-cache.d.ts +156 -0
- package/dist/shared/models-dev-cache.d.ts.map +1 -0
- package/dist/shared/normalize-sdk-response.d.ts +5 -0
- package/dist/shared/normalize-sdk-response.d.ts.map +1 -0
- package/dist/shared/opencode-config-dir-types.d.ts +14 -0
- package/dist/shared/opencode-config-dir-types.d.ts.map +1 -0
- package/dist/shared/opencode-config-dir.d.ts +57 -0
- package/dist/shared/opencode-config-dir.d.ts.map +1 -0
- package/dist/shared/opencode-db-path.d.ts +68 -0
- package/dist/shared/opencode-db-path.d.ts.map +1 -0
- package/dist/shared/pi-executable.d.ts +6 -0
- package/dist/shared/pi-executable.d.ts.map +1 -0
- package/dist/shared/plugin-package-version.d.ts +14 -0
- package/dist/shared/plugin-package-version.d.ts.map +1 -0
- package/dist/shared/project-directory-key.d.ts +26 -0
- package/dist/shared/project-directory-key.d.ts.map +1 -0
- package/dist/shared/prompt-context.d.ts +31 -0
- package/dist/shared/prompt-context.d.ts.map +1 -0
- package/dist/shared/prompt-surface-a1-golden.d.ts +28 -0
- package/dist/shared/prompt-surface-a1-golden.d.ts.map +1 -0
- package/dist/shared/prompt-surface-runtime.d.ts +62 -0
- package/dist/shared/prompt-surface-runtime.d.ts.map +1 -0
- package/dist/shared/prompt-surface.d.ts +53 -0
- package/dist/shared/prompt-surface.d.ts.map +1 -0
- package/dist/shared/provider-response-completion.d.ts +12 -0
- package/dist/shared/provider-response-completion.d.ts.map +1 -0
- package/dist/shared/record-type-guard.d.ts +2 -0
- package/dist/shared/record-type-guard.d.ts.map +1 -0
- package/dist/shared/redaction.d.ts +7 -0
- package/dist/shared/redaction.d.ts.map +1 -0
- package/dist/shared/resolve-fallbacks.d.ts +48 -0
- package/dist/shared/resolve-fallbacks.d.ts.map +1 -0
- package/dist/shared/rpc-client.d.ts +28 -0
- package/dist/shared/rpc-client.d.ts.map +1 -0
- package/dist/shared/rpc-notifications.d.ts +74 -0
- package/dist/shared/rpc-notifications.d.ts.map +1 -0
- package/dist/shared/rpc-server.d.ts +52 -0
- package/dist/shared/rpc-server.d.ts.map +1 -0
- package/dist/shared/rpc-types.d.ts +385 -0
- package/dist/shared/rpc-types.d.ts.map +1 -0
- package/dist/shared/rpc-utils.d.ts +162 -0
- package/dist/shared/rpc-utils.d.ts.map +1 -0
- package/dist/shared/run-token-log.d.ts +13 -0
- package/dist/shared/run-token-log.d.ts.map +1 -0
- package/dist/shared/safe-notification-target.d.ts +23 -0
- package/dist/shared/safe-notification-target.d.ts.map +1 -0
- package/dist/shared/sqlite-context-pragmas.d.ts +12 -0
- package/dist/shared/sqlite-context-pragmas.d.ts.map +1 -0
- package/dist/shared/sqlite-helpers.d.ts +25 -0
- package/dist/shared/sqlite-helpers.d.ts.map +1 -0
- package/dist/shared/sqlite-write-locker-test-support.d.ts +7 -0
- package/dist/shared/sqlite-write-locker-test-support.d.ts.map +1 -0
- package/dist/shared/sqlite.d.ts +163 -0
- package/dist/shared/sqlite.d.ts.map +1 -0
- package/dist/shared/stable-json.d.ts +21 -0
- package/dist/shared/stable-json.d.ts.map +1 -0
- package/dist/shared/status-detail-text.d.ts +4 -0
- package/dist/shared/status-detail-text.d.ts.map +1 -0
- package/dist/shared/status-summary.d.ts +54 -0
- package/dist/shared/status-summary.d.ts.map +1 -0
- package/dist/shared/status-view-check.d.ts +130 -0
- package/dist/shared/status-view-check.d.ts.map +1 -0
- package/dist/shared/status-view.d.ts +230 -0
- package/dist/shared/status-view.d.ts.map +1 -0
- package/dist/shared/storage-permissions.d.ts +29 -0
- package/dist/shared/storage-permissions.d.ts.map +1 -0
- package/dist/shared/subagent-runner.d.ts +231 -0
- package/dist/shared/subagent-runner.d.ts.map +1 -0
- package/dist/shared/summarize-child-stderr.d.ts +2 -0
- package/dist/shared/summarize-child-stderr.d.ts.map +1 -0
- package/dist/shared/system-directive.d.ts +3 -0
- package/dist/shared/system-directive.d.ts.map +1 -0
- package/dist/shared/tag-owner-id.d.ts +19 -0
- package/dist/shared/tag-owner-id.d.ts.map +1 -0
- package/dist/shared/tag-transcript.d.ts +103 -0
- package/dist/shared/tag-transcript.d.ts.map +1 -0
- package/dist/shared/tail-hygiene-status.d.ts +24 -0
- package/dist/shared/tail-hygiene-status.d.ts.map +1 -0
- package/dist/shared/test-temp-dir.d.ts +46 -0
- package/dist/shared/test-temp-dir.d.ts.map +1 -0
- package/dist/shared/transcript.d.ts +251 -0
- package/dist/shared/transcript.d.ts.map +1 -0
- package/dist/shared/user-answer.d.ts +4 -0
- package/dist/shared/user-answer.d.ts.map +1 -0
- package/dist/shared/user-facing-codes.d.ts +135 -0
- package/dist/shared/user-facing-codes.d.ts.map +1 -0
- package/dist/shared/window-geometry.d.ts +121 -0
- package/dist/shared/window-geometry.d.ts.map +1 -0
- package/dist/shared/write-transaction-timing.d.ts +11 -0
- package/dist/shared/write-transaction-timing.d.ts.map +1 -0
- package/dist/shared/xml-unescape.d.ts +9 -0
- package/dist/shared/xml-unescape.d.ts.map +1 -0
- package/dist/tools/ctx-expand/constants.d.ts +3 -0
- package/dist/tools/ctx-expand/constants.d.ts.map +1 -0
- package/dist/tools/ctx-expand/index.d.ts +2 -0
- package/dist/tools/ctx-expand/index.d.ts.map +1 -0
- package/dist/tools/ctx-expand/mode.d.ts +35 -0
- package/dist/tools/ctx-expand/mode.d.ts.map +1 -0
- package/dist/tools/ctx-expand/render.d.ts +47 -0
- package/dist/tools/ctx-expand/render.d.ts.map +1 -0
- package/dist/tools/ctx-expand/tools.d.ts +10 -0
- package/dist/tools/ctx-expand/tools.d.ts.map +1 -0
- package/dist/tools/ctx-expand/types.d.ts +11 -0
- package/dist/tools/ctx-expand/types.d.ts.map +1 -0
- package/dist/tools/ctx-memory/constants.d.ts +3 -0
- package/dist/tools/ctx-memory/constants.d.ts.map +1 -0
- package/dist/tools/ctx-memory/index.d.ts +4 -0
- package/dist/tools/ctx-memory/index.d.ts.map +1 -0
- package/dist/tools/ctx-memory/tools.d.ts +5 -0
- package/dist/tools/ctx-memory/tools.d.ts.map +1 -0
- package/dist/tools/ctx-memory/types.d.ts +38 -0
- package/dist/tools/ctx-memory/types.d.ts.map +1 -0
- package/dist/tools/ctx-memory/verification-recording.d.ts +8 -0
- package/dist/tools/ctx-memory/verification-recording.d.ts.map +1 -0
- package/dist/tools/ctx-note/constants.d.ts +2 -0
- package/dist/tools/ctx-note/constants.d.ts.map +1 -0
- package/dist/tools/ctx-note/index.d.ts +4 -0
- package/dist/tools/ctx-note/index.d.ts.map +1 -0
- package/dist/tools/ctx-note/render.d.ts +67 -0
- package/dist/tools/ctx-note/render.d.ts.map +1 -0
- package/dist/tools/ctx-note/tools.d.ts +13 -0
- package/dist/tools/ctx-note/tools.d.ts.map +1 -0
- package/dist/tools/ctx-note/types.d.ts +14 -0
- package/dist/tools/ctx-note/types.d.ts.map +1 -0
- package/dist/tools/ctx-reduce/constants.d.ts +4 -0
- package/dist/tools/ctx-reduce/constants.d.ts.map +1 -0
- package/dist/tools/ctx-reduce/index.d.ts +4 -0
- package/dist/tools/ctx-reduce/index.d.ts.map +1 -0
- package/dist/tools/ctx-reduce/tools.d.ts +19 -0
- package/dist/tools/ctx-reduce/tools.d.ts.map +1 -0
- package/dist/tools/ctx-reduce/types.d.ts +5 -0
- package/dist/tools/ctx-reduce/types.d.ts.map +1 -0
- package/dist/tools/ctx-search/constants.d.ts +4 -0
- package/dist/tools/ctx-search/constants.d.ts.map +1 -0
- 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/index.d.ts +4 -0
- package/dist/tools/ctx-search/index.d.ts.map +1 -0
- package/dist/tools/ctx-search/tools.d.ts +5 -0
- package/dist/tools/ctx-search/tools.d.ts.map +1 -0
- package/dist/tools/ctx-search/types.d.ts +34 -0
- package/dist/tools/ctx-search/types.d.ts.map +1 -0
- package/dist/tools/light-descriptions.d.ts +6 -0
- package/dist/tools/light-descriptions.d.ts.map +1 -0
- package/dist/tools/parameter-descriptions.d.ts +75 -0
- package/dist/tools/parameter-descriptions.d.ts.map +1 -0
- package/dist/tools/unwrap-imitated-reduced-args.d.ts +21 -0
- package/dist/tools/unwrap-imitated-reduced-args.d.ts.map +1 -0
- package/dist/v2/fold/boundary.d.ts +61 -0
- package/dist/v2/fold/boundary.d.ts.map +1 -0
- 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/markers.d.ts +7 -0
- package/dist/v2/fold/markers.d.ts.map +1 -0
- package/dist/v2/fold/owner.d.ts +40 -0
- package/dist/v2/fold/owner.d.ts.map +1 -0
- package/dist/v2/fold/restore.d.ts +31 -0
- package/dist/v2/fold/restore.d.ts.map +1 -0
- package/dist/v2/fork-inheritance.d.ts +101 -0
- package/dist/v2/fork-inheritance.d.ts.map +1 -0
- package/dist/v2/hidden-child-cleanup.d.ts +11 -0
- package/dist/v2/hidden-child-cleanup.d.ts.map +1 -0
- package/dist/v2/hidden-child-native.d.ts +29 -0
- package/dist/v2/hidden-child-native.d.ts.map +1 -0
- package/dist/v2/hidden-child-record.d.ts +137 -0
- package/dist/v2/hidden-child-record.d.ts.map +1 -0
- package/dist/v2/hidden-completion.d.ts +57 -0
- package/dist/v2/hidden-completion.d.ts.map +1 -0
- package/dist/v2/hooks/channel2.d.ts +10 -0
- package/dist/v2/hooks/channel2.d.ts.map +1 -0
- 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 +112 -0
- package/dist/v2/hooks/context.d.ts.map +1 -0
- 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/generate.d.ts +10 -0
- package/dist/v2/hooks/generate.d.ts.map +1 -0
- package/dist/v2/hooks/hidden-child.d.ts +76 -0
- package/dist/v2/hooks/hidden-child.d.ts.map +1 -0
- package/dist/v2/hooks/hidden-terminal-error.d.ts +8 -0
- package/dist/v2/hooks/hidden-terminal-error.d.ts.map +1 -0
- package/dist/v2/hooks/lkg-system.d.ts +11 -0
- package/dist/v2/hooks/lkg-system.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 +15 -0
- package/dist/v2/hooks/payload.d.ts.map +1 -0
- package/dist/v2/hooks/refusal.d.ts +15 -0
- package/dist/v2/hooks/refusal.d.ts.map +1 -0
- package/dist/v2/hooks/restore-rows.d.ts +29 -0
- package/dist/v2/hooks/restore-rows.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/session-api-gate.d.ts +4 -0
- package/dist/v2/hooks/session-api-gate.d.ts.map +1 -0
- package/dist/v2/hooks/session-project-backfill.d.ts +15 -0
- package/dist/v2/hooks/session-project-backfill.d.ts.map +1 -0
- package/dist/v2/hooks/storage-gate.d.ts +48 -0
- package/dist/v2/hooks/storage-gate.d.ts.map +1 -0
- package/dist/v2/hooks/storage-notice.d.ts +29 -0
- package/dist/v2/hooks/storage-notice.d.ts.map +1 -0
- package/dist/v2/hooks/store.d.ts +58 -0
- package/dist/v2/hooks/store.d.ts.map +1 -0
- 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 +250 -0
- package/dist/v2/hooks/types.d.ts.map +1 -0
- package/dist/v2/hooks/usage-persist.d.ts +31 -0
- package/dist/v2/hooks/usage-persist.d.ts.map +1 -0
- package/dist/v2/hooks/usage-reading.d.ts +46 -0
- package/dist/v2/hooks/usage-reading.d.ts.map +1 -0
- package/dist/v2/server.d.ts +27 -0
- package/dist/v2/server.d.ts.map +1 -0
- package/dist/v2/server.js +76235 -0
- package/dist/v2/store-reader.d.ts +218 -0
- package/dist/v2/store-reader.d.ts.map +1 -0
- package/dist/web/api.d.ts +40 -0
- package/dist/web/api.d.ts.map +1 -0
- package/dist/web/context-store.d.ts +74 -0
- package/dist/web/context-store.d.ts.map +1 -0
- package/dist/web/fixtures.d.ts +53 -0
- package/dist/web/fixtures.d.ts.map +1 -0
- package/dist/web/host-opencode.d.ts +56 -0
- package/dist/web/host-opencode.d.ts.map +1 -0
- package/dist/web/host-pi.d.ts +116 -0
- package/dist/web/host-pi.d.ts.map +1 -0
- package/dist/web/main.d.ts +24 -0
- package/dist/web/main.d.ts.map +1 -0
- package/dist/web/main.js +6071 -0
- package/dist/web/memories.d.ts +67 -0
- package/dist/web/memories.d.ts.map +1 -0
- package/dist/web/server.d.ts +42 -0
- package/dist/web/server.d.ts.map +1 -0
- package/dist/web/types.d.ts +52 -0
- package/dist/web/types.d.ts.map +1 -0
- package/dist/web/ui/favicon.svg +4 -0
- package/dist/web/ui/index.html +36 -0
- package/dist/web/ui/panel.css +8 -0
- package/dist/web/ui/panel.js +373 -0
- package/dist/web/views.d.ts +155 -0
- package/dist/web/views.d.ts.map +1 -0
- package/dist/web/writes.d.ts +86 -0
- package/dist/web/writes.d.ts.map +1 -0
- package/dist/wrapup-orchestrator-az866scb.js +420 -0
- package/dist/wrapup-orchestrator-fztjahrk.js +420 -0
- package/dist/wrapup-orchestrator-z9sqpqjf.js +420 -0
- package/index.js +1 -0
- package/package.json +76 -4
- package/src/agents/historian.ts +3 -0
- package/src/agents/language-directive.test.ts +129 -0
- package/src/agents/language-directive.ts +113 -0
- package/src/agents/magic-context-prompt.language.test.ts +37 -0
- package/src/agents/magic-context-prompt.test.ts +520 -0
- package/src/agents/magic-context-prompt.ts +196 -0
- package/src/agents/memory-maintainer.test.ts +249 -0
- package/src/agents/memory-maintainer.ts +374 -0
- package/src/config/agent-disable.ts +58 -0
- package/src/config/compaction-accessor-guard.test.ts +81 -0
- package/src/config/compaction-backcompat.test.ts +52 -0
- package/src/config/config-paths.ts +42 -0
- package/src/config/index.test.ts +1252 -0
- package/src/config/index.ts +762 -0
- package/src/config/latch-permanence-guard.test.ts +218 -0
- package/src/config/live-run-config.test.ts +139 -0
- package/src/config/live-run-config.ts +79 -0
- package/src/config/live-schema-drift.test.ts +67 -0
- package/src/config/live-snapshot.test.ts +86 -0
- package/src/config/live-snapshot.ts +187 -0
- package/src/config/migrate-experimental.ts +92 -0
- package/src/config/misplaced-agent-model.test.ts +55 -0
- package/src/config/profiles.ts +106 -0
- package/src/config/project-config-trust-boundary.test.ts +185 -0
- package/src/config/project-security.hostile-matrix.test.ts +281 -0
- package/src/config/project-security.test.ts +329 -0
- package/src/config/project-security.ts +940 -0
- package/src/config/protected-tokens.test.ts +229 -0
- package/src/config/prune-config-leaf.test.ts +78 -0
- package/src/config/prune-config-leaf.ts +67 -0
- package/src/config/raw-loader.test.ts +389 -0
- package/src/config/raw-loader.ts +435 -0
- package/src/config/removed-agent-config.ts +45 -0
- package/src/config/removed-agent-source-fence.test.ts +53 -0
- package/src/config/removed-config-keys.test.ts +106 -0
- package/src/config/schema/agent-overrides.ts +45 -0
- package/src/config/schema/magic-context.test.ts +434 -0
- package/src/config/schema/magic-context.ts +1019 -0
- package/src/config/variable.test.ts +324 -0
- package/src/config/variable.ts +192 -0
- package/src/shared/__fixtures__/window-overlay.v1.json +337 -0
- package/src/shared/announcement.test.ts +198 -0
- package/src/shared/announcement.ts +145 -0
- package/src/shared/assistant-message-extractor.test.ts +47 -0
- package/src/shared/assistant-message-extractor.ts +156 -0
- package/src/shared/auto-update-provenance.ts +42 -0
- package/src/shared/bounded-session-map.test.ts +97 -0
- package/src/shared/bounded-session-map.ts +84 -0
- package/src/shared/builtin-commands.ts +46 -0
- package/src/shared/cache-ttl-display.test.ts +84 -0
- package/src/shared/cache-ttl-display.ts +58 -0
- package/src/shared/cache-ttl-seed.ts +23 -0
- package/src/shared/child-session-teardown.test.ts +241 -0
- package/src/shared/child-session-teardown.ts +66 -0
- package/src/shared/commit-detection.test.ts +63 -0
- package/src/shared/commit-detection.ts +53 -0
- package/src/shared/config-diagnostics.test.ts +29 -0
- package/src/shared/config-diagnostics.ts +64 -0
- package/src/shared/conflict-detector.test.ts +780 -0
- package/src/shared/conflict-detector.ts +596 -0
- package/src/shared/conflict-fixer.test.ts +608 -0
- package/src/shared/conflict-fixer.ts +295 -0
- package/src/shared/context-limit-provenance.ts +6 -0
- package/src/shared/data-path.test.ts +352 -0
- package/src/shared/data-path.ts +310 -0
- package/src/shared/error-message.test.ts +94 -0
- package/src/shared/error-message.ts +115 -0
- package/src/shared/escalation-bands.test.ts +23 -0
- package/src/shared/escalation-bands.ts +18 -0
- package/src/shared/format-bytes.ts +5 -0
- package/src/shared/format-threshold.ts +54 -0
- package/src/shared/harness-provider-map.test.ts +176 -0
- package/src/shared/harness-provider-map.ts +130 -0
- package/src/shared/harness.ts +76 -0
- package/src/shared/hidden-variant-warnings.ts +21 -0
- package/src/shared/historian-tool-defaults.json +13 -0
- package/src/shared/historian-tool-expansions.ts +18 -0
- package/src/shared/historian-tool-template.ts +248 -0
- package/src/shared/historian-transient-error.test.ts +36 -0
- package/src/shared/historian-transient-error.ts +22 -0
- package/src/shared/host-limitations.ts +43 -0
- package/src/shared/index.ts +7 -0
- package/src/shared/internal-initiator-marker.ts +1 -0
- package/src/shared/jsonc-edit.ts +387 -0
- package/src/shared/jsonc-parser.test.ts +46 -0
- package/src/shared/jsonc-parser.ts +283 -0
- package/src/shared/keep-subagents.test.ts +39 -0
- package/src/shared/keep-subagents.ts +28 -0
- package/src/shared/logger.test.ts +292 -0
- package/src/shared/logger.ts +248 -0
- package/src/shared/model-cache-ttl.test.ts +40 -0
- package/src/shared/model-cache-ttl.ts +58 -0
- package/src/shared/model-resolution.test.ts +132 -0
- package/src/shared/model-resolution.ts +158 -0
- package/src/shared/model-suggestion-retry.test.ts +698 -0
- package/src/shared/model-suggestion-retry.ts +838 -0
- package/src/shared/models-dev-cache.test.ts +720 -0
- package/src/shared/models-dev-cache.ts +661 -0
- package/src/shared/normalize-sdk-response.ts +40 -0
- package/src/shared/opencode-config-dir-types.ts +15 -0
- package/src/shared/opencode-config-dir.ts +111 -0
- package/src/shared/opencode-db-path.test.ts +389 -0
- package/src/shared/opencode-db-path.ts +396 -0
- package/src/shared/opencode-host-generation.test.ts +29 -0
- package/src/shared/pi-executable.ts +20 -0
- package/src/shared/plugin-package-version.ts +52 -0
- package/src/shared/project-directory-key.test.ts +111 -0
- package/src/shared/project-directory-key.ts +54 -0
- package/src/shared/prompt-context.ts +135 -0
- package/src/shared/prompt-surface-a1-golden.md +407 -0
- package/src/shared/prompt-surface-a1-golden.ts +41 -0
- package/src/shared/prompt-surface-runtime.test.ts +190 -0
- package/src/shared/prompt-surface-runtime.ts +263 -0
- package/src/shared/prompt-surface.test.ts +195 -0
- package/src/shared/prompt-surface.ts +162 -0
- package/src/shared/provider-response-completion.ts +23 -0
- package/src/shared/record-type-guard.ts +3 -0
- package/src/shared/redaction.test.ts +134 -0
- package/src/shared/redaction.ts +298 -0
- package/src/shared/resolve-fallbacks.test.ts +114 -0
- package/src/shared/resolve-fallbacks.ts +95 -0
- package/src/shared/rpc-async-probes.test.ts +320 -0
- package/src/shared/rpc-client.test.ts +576 -0
- package/src/shared/rpc-client.ts +218 -0
- package/src/shared/rpc-notifications.test.ts +151 -0
- package/src/shared/rpc-notifications.ts +222 -0
- package/src/shared/rpc-server.ts +431 -0
- package/src/shared/rpc-types.ts +386 -0
- package/src/shared/rpc-utils.test.ts +822 -0
- package/src/shared/rpc-utils.ts +1146 -0
- package/src/shared/run-token-log.test.ts +65 -0
- package/src/shared/run-token-log.ts +39 -0
- package/src/shared/safe-notification-target.test.ts +97 -0
- package/src/shared/safe-notification-target.ts +102 -0
- package/src/shared/session-messages-bounded.test.ts +112 -0
- package/src/shared/sqlite-acquisition-fence.test.ts +133 -0
- package/src/shared/sqlite-acquisition-routing.test.ts +145 -0
- package/src/shared/sqlite-bind-style.test.ts +80 -0
- package/src/shared/sqlite-context-pragmas.ts +24 -0
- package/src/shared/sqlite-helpers.ts +44 -0
- package/src/shared/sqlite-import-fence.test.ts +19 -0
- package/src/shared/sqlite-pass-scope.test.ts +154 -0
- package/src/shared/sqlite-transaction-mode-guard.test.ts +234 -0
- package/src/shared/sqlite-write-locker-test-support.ts +63 -0
- package/src/shared/sqlite.test.ts +58 -0
- package/src/shared/sqlite.ts +988 -0
- package/src/shared/stable-json.test.ts +87 -0
- package/src/shared/stable-json.ts +37 -0
- package/src/shared/status-detail-text.test.ts +194 -0
- package/src/shared/status-detail-text.ts +7 -0
- package/src/shared/status-summary.ts +189 -0
- package/src/shared/status-view-check.test.ts +252 -0
- package/src/shared/status-view-check.ts +519 -0
- package/src/shared/status-view.test.ts +395 -0
- package/src/shared/status-view.ts +794 -0
- package/src/shared/storage-busy.test.ts +73 -0
- package/src/shared/storage-permissions.test.ts +190 -0
- package/src/shared/storage-permissions.ts +212 -0
- package/src/shared/subagent-runner.ts +240 -0
- package/src/shared/summarize-child-stderr.test.ts +55 -0
- package/src/shared/summarize-child-stderr.ts +33 -0
- package/src/shared/system-directive.ts +9 -0
- package/src/shared/tag-owner-id.test.ts +33 -0
- package/src/shared/tag-owner-id.ts +29 -0
- package/src/shared/tag-transcript.test.ts +554 -0
- package/src/shared/tag-transcript.ts +1400 -0
- package/src/shared/tail-hygiene-status.ts +73 -0
- package/src/shared/test-temp-dir.test.ts +84 -0
- package/src/shared/test-temp-dir.ts +192 -0
- package/src/shared/transcript.ts +274 -0
- package/src/shared/user-answer.test.ts +12 -0
- package/src/shared/user-answer.ts +17 -0
- package/src/shared/user-facing-codes.test.ts +82 -0
- package/src/shared/user-facing-codes.ts +180 -0
- package/src/shared/window-geometry.test.ts +405 -0
- package/src/shared/window-geometry.ts +726 -0
- package/src/shared/windows-hidden-spawns.test.ts +133 -0
- package/src/shared/write-transaction-attribution.test.ts +214 -0
- package/src/shared/write-transaction-timing.ts +26 -0
- package/src/shared/xml-unescape.ts +19 -0
- package/README.md +0 -3
|
@@ -0,0 +1,385 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared types for RPC between server and TUI plugins.
|
|
3
|
+
* Both sides import these — no SQLite dependency.
|
|
4
|
+
*/
|
|
5
|
+
import type { RunnerRefusalCanonicalCause } from "../hooks/magic-context/historian-no-fire-cause";
|
|
6
|
+
import type { ConfigParseFailure } from "./config-diagnostics";
|
|
7
|
+
import type { LoggerDiagnostics } from "./logger";
|
|
8
|
+
import type { UserFacingFailureKey } from "./user-facing-codes";
|
|
9
|
+
export interface TailHygieneStatus {
|
|
10
|
+
/** Tokens in active, non-protected tail content that the agent can reclaim. */
|
|
11
|
+
u: number;
|
|
12
|
+
/** Spent tool outputs contributing positive tokens to U in this baseline. */
|
|
13
|
+
reclaimableToolOutputCount?: number;
|
|
14
|
+
/** Tokens in rendered-tail content eligible for hygiene accounting in the same scan. */
|
|
15
|
+
t: number;
|
|
16
|
+
/** Reclaimable-to-eligible token ratio, clamped to 0–1 and shared by both nudge mechanisms. */
|
|
17
|
+
severity: number;
|
|
18
|
+
/** False until a fresh scan runs after existing tail content changes, preventing stale measurements. */
|
|
19
|
+
evaluable: boolean;
|
|
20
|
+
generationInvalidated: boolean;
|
|
21
|
+
baselineGeneration: number;
|
|
22
|
+
computedAt: number;
|
|
23
|
+
}
|
|
24
|
+
export interface SidebarSnapshot {
|
|
25
|
+
sessionId: string;
|
|
26
|
+
usagePercentage: number;
|
|
27
|
+
inputTokens: number;
|
|
28
|
+
contextLimit: number;
|
|
29
|
+
/**
|
|
30
|
+
* Raw wire-input pressure against the resolved model window. This is separate
|
|
31
|
+
* from Magic Context's execute threshold so native-compaction UI never shows
|
|
32
|
+
* a threshold-relative fill percentage.
|
|
33
|
+
*/
|
|
34
|
+
native_context_usage_percentage?: number;
|
|
35
|
+
/**
|
|
36
|
+
* Magic Context compaction mode is resolved at startup and sent in the
|
|
37
|
+
* status-detail wire payload; snake_case matches that payload's field naming.
|
|
38
|
+
*/
|
|
39
|
+
compaction_enabled?: boolean;
|
|
40
|
+
systemPromptTokens: number;
|
|
41
|
+
compartmentCount: number;
|
|
42
|
+
/** Historical compartment rows retained while native compaction owns the window. */
|
|
43
|
+
archivedCompartmentCount?: number;
|
|
44
|
+
memoryCount: number;
|
|
45
|
+
memoryBlockCount: number;
|
|
46
|
+
pendingOpsCount: number;
|
|
47
|
+
historianRunning: boolean;
|
|
48
|
+
compartmentInProgress: boolean;
|
|
49
|
+
sessionNoteCount: number;
|
|
50
|
+
cacheTtl: string;
|
|
51
|
+
/** Persistent runtime failure shown directly in the sidebar when non-null. */
|
|
52
|
+
lastTransformError: string | null;
|
|
53
|
+
/** Durable history-compression failure count used to select the stable summary warning. */
|
|
54
|
+
historianFailureCount?: number;
|
|
55
|
+
projectIdentity: string | null;
|
|
56
|
+
compartmentTokens: number;
|
|
57
|
+
factTokens: number;
|
|
58
|
+
memoryTokens: number;
|
|
59
|
+
/**
|
|
60
|
+
* Token estimate of real user/assistant discussion (text + reasoning +
|
|
61
|
+
* image parts) inside messages, excluding the injected <session-history>
|
|
62
|
+
* block. Display layer shows this as "Conversation".
|
|
63
|
+
*/
|
|
64
|
+
conversationTokens: number;
|
|
65
|
+
/**
|
|
66
|
+
* Token estimate of tool call I/O inside messages (tool_use, tool_result,
|
|
67
|
+
* tool, tool-invocation parts). Actionable — users can reduce via
|
|
68
|
+
* mmc_reduce. Display layer shows this as "Tool Calls".
|
|
69
|
+
*/
|
|
70
|
+
toolCallTokens: number;
|
|
71
|
+
/**
|
|
72
|
+
* Measured token cost of tool schemas (description + JSON-schema
|
|
73
|
+
* parameters) OpenCode sends in the request `tools` parameter. Populated
|
|
74
|
+
* by the `tool.definition` plugin hook, keyed by
|
|
75
|
+
* `{providerID, modelID, agentName}`. Zero until the first turn after
|
|
76
|
+
* plugin startup measures the current agent's tool set. Display layer
|
|
77
|
+
* shows this as "Tool Definitions".
|
|
78
|
+
*/
|
|
79
|
+
toolDefinitionTokens: number;
|
|
80
|
+
/**
|
|
81
|
+
* Named capabilities the host this plugin runs in does not have, such as an
|
|
82
|
+
* experimental mode the host cannot carry. These persist for the life of
|
|
83
|
+
* the process rather than describing one failed operation, so the status
|
|
84
|
+
* surfaces keep showing them. Absent on hosts with nothing to report and on
|
|
85
|
+
* older RPC servers.
|
|
86
|
+
*/
|
|
87
|
+
hostLimitations?: UserFacingFailureKey[];
|
|
88
|
+
/** Persisted reclaimable (U) and eligible (T) token counts used by both nudge mechanisms. */
|
|
89
|
+
tailHygiene?: TailHygieneStatus;
|
|
90
|
+
/**
|
|
91
|
+
* Effective execute-threshold percentage for this session's active model,
|
|
92
|
+
* after per-model resolution and the tokens→percentage conversion (when
|
|
93
|
+
* `execute_threshold_tokens` applies). Surfaces in the sidebar / status
|
|
94
|
+
* dialog header alongside `usagePercentage` so users can see how close
|
|
95
|
+
* the session is to triggering compaction. Defaults to `65` when no live
|
|
96
|
+
* model is known yet — matches the runtime fallback used by the
|
|
97
|
+
* scheduler and transform paths.
|
|
98
|
+
*/
|
|
99
|
+
executeThreshold: number;
|
|
100
|
+
/**
|
|
101
|
+
* True when `executeThreshold` was clamped down from a higher configured value
|
|
102
|
+
* (tokens config above 90% × contextLimit, or a percentage above the 90% cap).
|
|
103
|
+
* The sidebar/status dialog append a small marker so the user knows their
|
|
104
|
+
* configured value was reduced rather than applied verbatim (issue #241).
|
|
105
|
+
* Absent when no clamp occurred.
|
|
106
|
+
*/
|
|
107
|
+
executeThresholdClamped?: boolean;
|
|
108
|
+
/** Rust module cache boundary state, when the session uses Rust authority mode. */
|
|
109
|
+
boundaryPresent?: boolean;
|
|
110
|
+
coverageOrdinal?: number | null;
|
|
111
|
+
newWorkTokens?: number | null;
|
|
112
|
+
totalInputTokens?: number | null;
|
|
113
|
+
/**
|
|
114
|
+
* Live recomp progress for this session, or null when no recomp is running
|
|
115
|
+
* (and no recent terminal state is being shown). Drives the sidebar progress
|
|
116
|
+
* bar and the /mmc-status dialog. Mirrors the runtime `RecompProgress` shape
|
|
117
|
+
* from compartment-runner-types.ts.
|
|
118
|
+
*/
|
|
119
|
+
recompProgress?: {
|
|
120
|
+
/** "recomp" → "Recomp" labels; "upgrade" → "Upgrade" labels. */
|
|
121
|
+
kind?: "recomp" | "upgrade" | "wrapup";
|
|
122
|
+
phase: "recomp" | "migration" | "done" | "failed" | "skipped";
|
|
123
|
+
processedMessages: number;
|
|
124
|
+
totalMessages: number;
|
|
125
|
+
passCount: number;
|
|
126
|
+
compartmentsCreated: number;
|
|
127
|
+
message?: string;
|
|
128
|
+
note?: string;
|
|
129
|
+
} | null;
|
|
130
|
+
}
|
|
131
|
+
export interface MemoryImportanceHistogram {
|
|
132
|
+
total: number;
|
|
133
|
+
unclassified: number;
|
|
134
|
+
bands: {
|
|
135
|
+
"0-19": number;
|
|
136
|
+
"20-39": number;
|
|
137
|
+
"40-59": number;
|
|
138
|
+
"60-79": number;
|
|
139
|
+
"80-100": number;
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
export interface StatusDetail extends SidebarSnapshot {
|
|
143
|
+
/**
|
|
144
|
+
* Version of the Magic Context package the answering server runs. The TUI
|
|
145
|
+
* compares it with its own so the status dialog can say when the two differ
|
|
146
|
+
* (OpenCode keeps the server it started with until it restarts). Absent from
|
|
147
|
+
* servers older than this field, which the dialog reports as "older than
|
|
148
|
+
* this UI". Also sent on the `{ disabled: true }` replies.
|
|
149
|
+
*/
|
|
150
|
+
pluginVersion?: string;
|
|
151
|
+
/**
|
|
152
|
+
* Set when this server migrated the shared store at startup while another
|
|
153
|
+
* OpenCode server's RPC record named a PID it could not check. If that PID
|
|
154
|
+
* was an older build still running, it now runs against a newer store.
|
|
155
|
+
*/
|
|
156
|
+
unconfirmedMigrationHolders?: {
|
|
157
|
+
pids: number[];
|
|
158
|
+
fromVersion: number;
|
|
159
|
+
toVersion: number;
|
|
160
|
+
};
|
|
161
|
+
/** OpenCode 2 hidden-run model variants dropped because the host catalog did not declare them. */
|
|
162
|
+
hiddenVariantWarnings?: string[];
|
|
163
|
+
/** Runner refusal provenance reported by the Rust historian, including received text. */
|
|
164
|
+
historianRefusal?: {
|
|
165
|
+
stage: "credential" | "provider" | "model" | "resolution";
|
|
166
|
+
canonicalCause: RunnerRefusalCanonicalCause;
|
|
167
|
+
detail: string;
|
|
168
|
+
};
|
|
169
|
+
/** ACTIVE-memory importance distribution; unclassified is a subset of total. */
|
|
170
|
+
memoryImportanceHistogram: MemoryImportanceHistogram;
|
|
171
|
+
/** True when Rust authority has rerouted host tool and historian paths to the module. */
|
|
172
|
+
hostBackendsModuleSide?: boolean;
|
|
173
|
+
/** Host cursor compared with the module changefeed frontier. */
|
|
174
|
+
memoryMirror?: {
|
|
175
|
+
cursor: number;
|
|
176
|
+
cursorUpdatedAt: number | null;
|
|
177
|
+
cursorAgeMs: number | null;
|
|
178
|
+
liveRows: number;
|
|
179
|
+
feedHead: number | null;
|
|
180
|
+
pendingRows: number | null;
|
|
181
|
+
stalled: boolean;
|
|
182
|
+
code: "MC-M01" | null;
|
|
183
|
+
};
|
|
184
|
+
/** Health of the pending OpenCode history-boundary marker repair. */
|
|
185
|
+
compactionMarker?: {
|
|
186
|
+
code: "MC-C11" | null;
|
|
187
|
+
attempts: number;
|
|
188
|
+
lastError: string | null;
|
|
189
|
+
pendingSinceMs: number | null;
|
|
190
|
+
};
|
|
191
|
+
/** A durable host marker whose live module status no longer reports module ownership. */
|
|
192
|
+
memoryAuthorityMismatch?: boolean;
|
|
193
|
+
/** User-owned model profile selected for this project, or null for the base config. */
|
|
194
|
+
activeProfile: string | null;
|
|
195
|
+
configGeneration?: number;
|
|
196
|
+
configAdoptedAt?: number;
|
|
197
|
+
configReloadFailure?: {
|
|
198
|
+
path: string;
|
|
199
|
+
message: string;
|
|
200
|
+
};
|
|
201
|
+
tagCounter: number;
|
|
202
|
+
activeTags: number;
|
|
203
|
+
droppedTags: number;
|
|
204
|
+
totalTags: number;
|
|
205
|
+
/** False when Rust authority supplies only the exact total; active/dropped host-mirror
|
|
206
|
+
* counts are not presented as module truth. Omitted by older RPC servers means true. */
|
|
207
|
+
tagCountsAuthoritative?: boolean;
|
|
208
|
+
activeBytes: number;
|
|
209
|
+
lastResponseTime: number;
|
|
210
|
+
lastNudgeTokens: number;
|
|
211
|
+
lastTransformError: string | null;
|
|
212
|
+
isSubagent: boolean;
|
|
213
|
+
pendingOps: Array<{
|
|
214
|
+
tagId: number;
|
|
215
|
+
operation: string;
|
|
216
|
+
}>;
|
|
217
|
+
contextLimit: number;
|
|
218
|
+
windowGeometry?: {
|
|
219
|
+
usableSoft: number;
|
|
220
|
+
usableHard: number;
|
|
221
|
+
geometry: "shared_upfront" | "shared_truncating" | "separate";
|
|
222
|
+
derivation: {
|
|
223
|
+
window: number;
|
|
224
|
+
reserve: number;
|
|
225
|
+
reserveSource: "output_catalog" | "output_config" | "wall_margin" | "none";
|
|
226
|
+
geometry: "shared_upfront" | "shared_truncating" | "separate";
|
|
227
|
+
windowSource: "catalog" | "overlay" | "provider" | "detected";
|
|
228
|
+
absoluteWall: number;
|
|
229
|
+
};
|
|
230
|
+
};
|
|
231
|
+
/**
|
|
232
|
+
* Parsed cache TTL in ms. -1 = never expires (cacheTtl "never"; Infinity
|
|
233
|
+
* cannot ride JSON-RPC and 0 would be indistinguishable from unset). The
|
|
234
|
+
* values discriminate without the cacheNeverExpires flag: -1 never /
|
|
235
|
+
* N live. Falsy-value contract: see storage_versions for the precedent.
|
|
236
|
+
*/
|
|
237
|
+
cacheTtlMs: number;
|
|
238
|
+
/** Remaining ms in the idle-TTL window. -1 = never expires; 0 = expired
|
|
239
|
+
* (only meaningful when lastResponseTime > 0); N = live countdown. */
|
|
240
|
+
cacheRemainingMs: number;
|
|
241
|
+
cacheExpired: boolean;
|
|
242
|
+
/** Reports whether the displayed TTL came from config, persisted session metadata,
|
|
243
|
+
* or the default; cache scheduling still uses the TTL stored in session metadata. */
|
|
244
|
+
cacheTtlSource?: import("./cache-ttl-display").CacheTtlDisplaySource;
|
|
245
|
+
cacheTtlModelKey?: string;
|
|
246
|
+
configParseFailures?: ConfigParseFailure[];
|
|
247
|
+
/** True when cacheTtl is "never" — the idle-TTL heuristic is disabled on
|
|
248
|
+
* this lane. Redundant with cacheTtlMs === -1; kept as the readable form. */
|
|
249
|
+
cacheNeverExpires?: boolean;
|
|
250
|
+
executeThreshold: number;
|
|
251
|
+
/**
|
|
252
|
+
* Which config source produced `executeThreshold`. "tokens" means
|
|
253
|
+
* execute_threshold_tokens matched for this session's model and was
|
|
254
|
+
* converted to a percentage. "percentage" means percentage config was used.
|
|
255
|
+
*/
|
|
256
|
+
executeThresholdMode: "percentage" | "tokens";
|
|
257
|
+
/**
|
|
258
|
+
* When `executeThresholdMode === "tokens"`, the absolute clamped token value
|
|
259
|
+
* (≤ 80% × contextLimit) that will trigger execute. Undefined in percentage mode.
|
|
260
|
+
*/
|
|
261
|
+
executeThresholdTokens?: number;
|
|
262
|
+
protectedTagCount: number;
|
|
263
|
+
historyBudgetPercentage: number;
|
|
264
|
+
historyBlockTokens: number;
|
|
265
|
+
compressionBudget: number | null;
|
|
266
|
+
compressionUsage: string | null;
|
|
267
|
+
/** Effective configured toast duration in ms after config resolution. */
|
|
268
|
+
toastDurationMs: number;
|
|
269
|
+
/** Runtime logger write failures observed by this plugin process. */
|
|
270
|
+
loggerDiagnostics: LoggerDiagnostics;
|
|
271
|
+
/**
|
|
272
|
+
* Stable storage-version probe: "which schema is the DB at, which fence does
|
|
273
|
+
* this binary carry". Field names are deliberately snake_case, mirroring the
|
|
274
|
+
* `storage_versions` block of the mc-module status envelope, so fleet probes
|
|
275
|
+
* parse one shape across both surfaces. The module cannot read context.db
|
|
276
|
+
* (the plugin owns it), so this surface supplies the live DB value; the module
|
|
277
|
+
* surface supplies the module-store value instead.
|
|
278
|
+
*/
|
|
279
|
+
/** Search-indexing coverage and current command state for the default status summary. */
|
|
280
|
+
storage_versions: {
|
|
281
|
+
/**
|
|
282
|
+
* Persisted schema version of context.db (MAX of schema_migrations).
|
|
283
|
+
* null = the version probe FAILED (read threw — broken/unreachable store);
|
|
284
|
+
* 0 = probe succeeded on a fresh DB without a migrations table. Distinct so
|
|
285
|
+
* readers never conflate broken-with-empty (fleet status-surface contract).
|
|
286
|
+
*/
|
|
287
|
+
context_db_schema_version: number | null;
|
|
288
|
+
/** Highest context.db schema version this plugin build supports. */
|
|
289
|
+
plugin_supported_version: number;
|
|
290
|
+
};
|
|
291
|
+
}
|
|
292
|
+
export interface DebugProcessMemoryUsage {
|
|
293
|
+
rss: number;
|
|
294
|
+
heapTotal: number;
|
|
295
|
+
heapUsed: number;
|
|
296
|
+
external: number;
|
|
297
|
+
arrayBuffers: number;
|
|
298
|
+
}
|
|
299
|
+
export interface DebugSessionHolderCount {
|
|
300
|
+
sessionId: string;
|
|
301
|
+
lkgBytes: number;
|
|
302
|
+
taggerAssignments: number;
|
|
303
|
+
taggerToolAccounting: number;
|
|
304
|
+
wireRawMessages: number;
|
|
305
|
+
wireMessages: number;
|
|
306
|
+
wireContentSnapshots: number;
|
|
307
|
+
wireEstimatedBytes: number;
|
|
308
|
+
}
|
|
309
|
+
export interface DebugMemoryHolders {
|
|
310
|
+
lkgSlots: {
|
|
311
|
+
count: number;
|
|
312
|
+
totalBytes: number;
|
|
313
|
+
};
|
|
314
|
+
taggerCache: {
|
|
315
|
+
sessionCount: number;
|
|
316
|
+
assignmentEntries: number;
|
|
317
|
+
toolAccountingEntries: number;
|
|
318
|
+
loadSignatureEntries: number;
|
|
319
|
+
};
|
|
320
|
+
wireCache: {
|
|
321
|
+
snapshots: number;
|
|
322
|
+
rawContentSnapshots: number;
|
|
323
|
+
estimatedBytes: number;
|
|
324
|
+
};
|
|
325
|
+
compartmentMirrors: {
|
|
326
|
+
entries: number;
|
|
327
|
+
};
|
|
328
|
+
messageIndexQueue: {
|
|
329
|
+
queueLength: number;
|
|
330
|
+
reconciliationScheduled: number;
|
|
331
|
+
incrementalTimers: number;
|
|
332
|
+
pendingIncremental: number;
|
|
333
|
+
activeSessionLocks: number;
|
|
334
|
+
completedIncrementalKeys: number;
|
|
335
|
+
activeBufferMessages: number;
|
|
336
|
+
activeBufferBytes: number;
|
|
337
|
+
};
|
|
338
|
+
sessions: DebugSessionHolderCount[];
|
|
339
|
+
}
|
|
340
|
+
export interface DebugSqliteConnectionMemoryStats {
|
|
341
|
+
sequence: number;
|
|
342
|
+
filename: string;
|
|
343
|
+
readonly: boolean;
|
|
344
|
+
pageSize: number | null;
|
|
345
|
+
pageCount: number | null;
|
|
346
|
+
freelistCount: number | null;
|
|
347
|
+
cacheSize: number | null;
|
|
348
|
+
cacheSizeUnit: "pages" | "kib" | null;
|
|
349
|
+
cacheUpperBoundBytes: number | null;
|
|
350
|
+
mmapSizeBytes: number | null;
|
|
351
|
+
walFileBytes: number | null;
|
|
352
|
+
shmFileBytes: number | null;
|
|
353
|
+
fts5TableCount: number | null;
|
|
354
|
+
journalMode: string | null;
|
|
355
|
+
}
|
|
356
|
+
export interface DebugNativeMemoryUsage {
|
|
357
|
+
sqlite: {
|
|
358
|
+
connectionCount: number;
|
|
359
|
+
cacheUpperBoundBytes: number;
|
|
360
|
+
mmapUpperBoundBytes: number;
|
|
361
|
+
walFileBytes: number;
|
|
362
|
+
shmFileBytes: number;
|
|
363
|
+
sqliteStatusApi: "unavailable";
|
|
364
|
+
connections: DebugSqliteConnectionMemoryStats[];
|
|
365
|
+
};
|
|
366
|
+
tokenizer: {
|
|
367
|
+
loaded: boolean;
|
|
368
|
+
loadAttempted: boolean;
|
|
369
|
+
tableBytes: number | null;
|
|
370
|
+
tablePath: string | null;
|
|
371
|
+
};
|
|
372
|
+
}
|
|
373
|
+
export interface DebugMemoryUsageResponse {
|
|
374
|
+
pid: number;
|
|
375
|
+
bunVersion: string;
|
|
376
|
+
memoryUsage: DebugProcessMemoryUsage;
|
|
377
|
+
native: DebugNativeMemoryUsage;
|
|
378
|
+
holders: DebugMemoryHolders;
|
|
379
|
+
}
|
|
380
|
+
export interface DebugHeapSnapshotResponse extends DebugMemoryUsageResponse {
|
|
381
|
+
path: string;
|
|
382
|
+
format: "jsc" | "v8";
|
|
383
|
+
snapshotVersion?: number;
|
|
384
|
+
}
|
|
385
|
+
//# sourceMappingURL=rpc-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rpc-types.d.ts","sourceRoot":"","sources":["../../src/shared/rpc-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,gDAAgD,CAAC;AAClG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C,EAAE,MAAM,CAAC;CAC5B"}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { execFileSync } from "node:child_process";
|
|
2
|
+
import { readFileSync } from "node:fs";
|
|
3
|
+
export type ProcessKind = "OpenCode server" | "OpenCode instance (TUI/CLI)" | "Pi" | "process";
|
|
4
|
+
/** Best-effort process details captured while validating a migration blocker. */
|
|
5
|
+
export interface ProcessProbeEvidence {
|
|
6
|
+
/** Epoch milliseconds, or null when the platform/probe cannot provide it. */
|
|
7
|
+
startTime: number | null;
|
|
8
|
+
/** The raw command line, or null when the platform/probe cannot provide it. */
|
|
9
|
+
commandLine: string | null;
|
|
10
|
+
/**
|
|
11
|
+
* The executable image name when the process list reports it separately
|
|
12
|
+
* from the command line (Windows CIM and tasklist), otherwise absent.
|
|
13
|
+
*/
|
|
14
|
+
imageName?: string | null;
|
|
15
|
+
}
|
|
16
|
+
export interface RpcPortFileRecord {
|
|
17
|
+
port: number;
|
|
18
|
+
pid: number;
|
|
19
|
+
started_at: number;
|
|
20
|
+
/** Optional producer-provided kind; older records omit it. */
|
|
21
|
+
kind?: string;
|
|
22
|
+
/** Compatibility with discovery records that used the harness name. */
|
|
23
|
+
harness?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Per-process bearer token. The server requires it on all non-health RPC
|
|
26
|
+
* calls so a random local process or browser-origin script that merely
|
|
27
|
+
* discovers/guesses the port cannot drive side-effecting endpoints
|
|
28
|
+
* (recomp/upgrade/dismiss). Optional in the type for forward/backward
|
|
29
|
+
* compatibility with port files written by older builds (treated as "no
|
|
30
|
+
* auth required" only when the server itself didn't set one).
|
|
31
|
+
*/
|
|
32
|
+
token?: string;
|
|
33
|
+
/** Per-server filename nonce; prevents same-process instances from sharing one file. */
|
|
34
|
+
instance_id?: string;
|
|
35
|
+
}
|
|
36
|
+
export declare function registerOwnRpcServerInstance(instanceId: string): () => void;
|
|
37
|
+
/** Whether a discovery record belongs to an RPC server started by this process. */
|
|
38
|
+
export declare function isOwnRpcServerRecord(record: Pick<RpcPortFileRecord, "pid" | "instance_id">): boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Stable hash for a project directory — scopes RPC port files per-project
|
|
41
|
+
* so multiple OpenCode instances don't collide.
|
|
42
|
+
*
|
|
43
|
+
* The server that writes a discovery file and the TUI that looks it up often
|
|
44
|
+
* receive the same directory spelled differently (macOS `/var` vs
|
|
45
|
+
* `/private/var`; on Windows drive-letter case, separators, a trailing
|
|
46
|
+
* separator, `\\?\` prefixes, 8.3 short names). Both hash the one canonical
|
|
47
|
+
* spelling from `canonicalProjectDirectory`, so any of those spellings finds the
|
|
48
|
+
* same file.
|
|
49
|
+
*/
|
|
50
|
+
export declare function projectHash(directory: string): string;
|
|
51
|
+
/**
|
|
52
|
+
* The hash builds up to 0.44.4 used: the spelling as given, minus trailing
|
|
53
|
+
* slashes. Lookups also read that directory so a TUI can still find an older
|
|
54
|
+
* server (and tell the user it is older).
|
|
55
|
+
*/
|
|
56
|
+
export declare function legacyProjectHash(directory: string): string;
|
|
57
|
+
/** Directory containing per-process RPC discovery files for a project. */
|
|
58
|
+
export declare function rpcPortDir(storageDir: string, directory: string): string;
|
|
59
|
+
/**
|
|
60
|
+
* Every directory a lookup reads for this project: the canonical one servers
|
|
61
|
+
* write now, and the pre-canonical one older servers wrote.
|
|
62
|
+
*/
|
|
63
|
+
export declare function rpcPortDirsForLookup(storageDir: string, directory: string): string[];
|
|
64
|
+
/** Per-process RPC port file path. */
|
|
65
|
+
export declare function rpcPortFilePath(storageDir: string, directory: string, pid?: number, instanceId?: string): string;
|
|
66
|
+
/** Legacy single-port file used by v0.18.0 and earlier. */
|
|
67
|
+
export declare function legacyRpcPortFilePath(storageDir: string, directory: string): string;
|
|
68
|
+
export type PidLiveness = "alive" | "dead" | "inconclusive";
|
|
69
|
+
/**
|
|
70
|
+
* Check whether the platform confirms a PID is live without treating a denied
|
|
71
|
+
* probe as confirmation. Windows uses tasklist because MSYS2/Cygwin ps does not
|
|
72
|
+
* support the options used by the Unix probe. Sandboxes commonly reject
|
|
73
|
+
* `kill(pid, 0)` with EPERM even when the PID does not exist outside their view.
|
|
74
|
+
*/
|
|
75
|
+
export declare function isPidAlive(pid: number): PidLiveness;
|
|
76
|
+
/** Read a process start time without changing the guard's liveness decision. */
|
|
77
|
+
export declare function readProcessStartTime(pid: number): number | null;
|
|
78
|
+
/** Capture the command and start-time probes used to explain a blocker. */
|
|
79
|
+
export declare function readProcessProbeEvidence(pid: number): ProcessProbeEvidence;
|
|
80
|
+
interface ProcessListEntry {
|
|
81
|
+
pid: number;
|
|
82
|
+
command: string;
|
|
83
|
+
}
|
|
84
|
+
type ProcessSnapshotSource = "cim" | "tasklist" | "ps";
|
|
85
|
+
export declare function parseTasklistOutput(output: string): ProcessListEntry[] | null;
|
|
86
|
+
/** Reuse the platform-gated command probes used by PID identity checks. */
|
|
87
|
+
export declare function readProcessCommand(pid: number): string | null;
|
|
88
|
+
/** Classify a process command without changing the liveness decision. */
|
|
89
|
+
export declare function classifyProcessKind(command: string | null | undefined): ProcessKind;
|
|
90
|
+
/**
|
|
91
|
+
* Whether the process's image name or command line proves it cannot be a Magic
|
|
92
|
+
* Context host. Pi's image names (`pi`, `omp`) are too short to match as
|
|
93
|
+
* substrings, so they are compared as whole executable names. Missing evidence
|
|
94
|
+
* is never proof: with neither field readable this returns false.
|
|
95
|
+
*/
|
|
96
|
+
export declare function processCannotBeRpcHost(evidence: Pick<ProcessProbeEvidence, "commandLine" | "imageName">): boolean;
|
|
97
|
+
/**
|
|
98
|
+
* Verify that a live PID still belongs to the process that wrote a port record.
|
|
99
|
+
*
|
|
100
|
+
* A PID can be reused after its original process exits. On Linux, procfs gives
|
|
101
|
+
* us a process start time without spawning a helper; macOS and other Unix-like
|
|
102
|
+
* platforms use `ps`, while Windows uses `tasklist`, only on this cold
|
|
103
|
+
* database-open guard path. Legacy records without a start time use a weaker
|
|
104
|
+
* command-name check. A failed filesystem or process probe is inconclusive,
|
|
105
|
+
* not proof that this port record still belongs to OpenCode.
|
|
106
|
+
*
|
|
107
|
+
* "implausible" is returned only with proof that the live process did not write
|
|
108
|
+
* the record: it started after the record's `started_at`, or its image cannot
|
|
109
|
+
* be any Magic Context host. Callers may delete such a record on every platform.
|
|
110
|
+
*/
|
|
111
|
+
export type PidIdentityPlausibility = "plausible" | "implausible" | "inconclusive";
|
|
112
|
+
export declare function isPidIdentityPlausible(record: RpcPortFileRecord, evidence?: ProcessProbeEvidence): PidIdentityPlausibility;
|
|
113
|
+
export declare function __setRpcIdentityTestHooks(hooks: {
|
|
114
|
+
readFileSync?: typeof readFileSync;
|
|
115
|
+
execFileSync?: typeof execFileSync;
|
|
116
|
+
processKill?: typeof process.kill;
|
|
117
|
+
processListExecFileSync?: typeof execFileSync;
|
|
118
|
+
platform?: NodeJS.Platform;
|
|
119
|
+
nowMs?: () => number;
|
|
120
|
+
}): void;
|
|
121
|
+
export declare function __resetRpcIdentityTestHooks(): void;
|
|
122
|
+
/** Result of checking whether Pi/OMP processes may currently hold the shared database. */
|
|
123
|
+
export interface PiProcessDiscovery {
|
|
124
|
+
state: "known" | "unreadable" | "inconclusive";
|
|
125
|
+
processIds: number[];
|
|
126
|
+
inconclusivePids?: number[];
|
|
127
|
+
skippedAncestorPids?: number[];
|
|
128
|
+
error?: string;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Inspect Pi/OMP processes without converting a failed process-list probe into
|
|
132
|
+
* false evidence that no harness is running. Callers choose their own policy
|
|
133
|
+
* for the unreadable state: destructive maintenance can fail closed, while a
|
|
134
|
+
* migration guard can proceed after reporting that no live Pi process was confirmed.
|
|
135
|
+
*/
|
|
136
|
+
export declare function inspectLivePiProcesses(): PiProcessDiscovery;
|
|
137
|
+
/** Enumerate live Pi/OMP harness processes before deciding whether migration can proceed. */
|
|
138
|
+
export declare function discoverLivePiProcessIds(): number[];
|
|
139
|
+
export declare function parseRpcPortFile(content: string, fallbackPid?: number): RpcPortFileRecord | null;
|
|
140
|
+
/** One bounded, shared process scan for asynchronous storage opens. */
|
|
141
|
+
export interface AsyncProcessInspection {
|
|
142
|
+
pi: PiProcessDiscovery;
|
|
143
|
+
/** Includes process names and commands so offline maintenance can rule out live store users. */
|
|
144
|
+
processSnapshot?: {
|
|
145
|
+
source: ProcessSnapshotSource;
|
|
146
|
+
facts: Array<{
|
|
147
|
+
pid: number;
|
|
148
|
+
imageName: string | null;
|
|
149
|
+
commandLine: string | null;
|
|
150
|
+
}>;
|
|
151
|
+
};
|
|
152
|
+
evidence(pid: number): ProcessProbeEvidence;
|
|
153
|
+
liveness(pid: number): PidLiveness;
|
|
154
|
+
}
|
|
155
|
+
declare function execProcessListAsync(file: string, args: string[], timeout: number): Promise<string>;
|
|
156
|
+
/** Inject only the asynchronous transport; legacy synchronous probes stay isolated. */
|
|
157
|
+
export declare function __setAsyncProcessProbeForTests(probe?: typeof execProcessListAsync): void;
|
|
158
|
+
export declare function inspectProcessesAsync(forceFresh?: boolean): Promise<AsyncProcessInspection>;
|
|
159
|
+
/** Take one fresh Windows process snapshot with command time limits for synchronous callers. */
|
|
160
|
+
export declare function inspectWindowsProcessesSync(): AsyncProcessInspection;
|
|
161
|
+
export {};
|
|
162
|
+
//# sourceMappingURL=rpc-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rpc-utils.d.ts","sourceRoot":"","sources":["../../src/shared/rpc-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAE5D,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAOvC,MAAM,MAAM,WAAW,GAAG,iBAAiB,GAAG,6BAA6B,GAAG,IAAI,GAAG,SAAS,CAAC;AAE/F,iFAAiF;AACjF,MAAM,WAAW,oBAAoB;IACjC,6EAA6E;IAC7E,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,+EAA+E;IAC/E,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B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O,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAY5F;AAOD,uFAAuF;AACvF,wBAAgB,8BAA8B,CAAC,KAAK,CAAC,EAAE,OAAO,oBAAoB,GAAG,IAAI,CAKxF;AAED,wBAAgB,qBAAqB,CAAC,UAAU,UAAQ,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAsFzF;AAED,gGAAgG;AAChG,wBAAgB,2BAA2B,IAAI,sBAAsB,CAYpE"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface RunTokenLog {
|
|
2
|
+
input: number | null;
|
|
3
|
+
output: number | null;
|
|
4
|
+
reasoning: number | null;
|
|
5
|
+
cache_read: number | null;
|
|
6
|
+
cache_write: number | null;
|
|
7
|
+
max_tokens: number | null;
|
|
8
|
+
finish_reason: string | null;
|
|
9
|
+
}
|
|
10
|
+
/** Keep provider omissions distinct from measured zero in diagnostic logs. */
|
|
11
|
+
export declare function runTokenLog(tokens: unknown, maxTokens?: number, finish?: unknown): RunTokenLog;
|
|
12
|
+
export declare function formatRunTokenLog(tokens: RunTokenLog): string;
|
|
13
|
+
//# sourceMappingURL=run-token-log.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-token-log.d.ts","sourceRoot":"","sources":["../../src/shared/run-token-log.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IACxB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAMD,8EAA8E;AAC9E,wBAAgB,WAAW,CAAC,MAAM,EAAE,OAAO,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,WAAW,CAmB9F;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAE7D"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare function isDefaultSessionTitle(title: string): boolean;
|
|
2
|
+
export interface SafeTargetOptions {
|
|
3
|
+
/** Total title checks before giving up (default 4). */
|
|
4
|
+
attempts?: number;
|
|
5
|
+
/** Delay between checks in ms (default 15s). */
|
|
6
|
+
delayMs?: number;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Resolve whether `sessionId` is safe to receive an ignored-message post.
|
|
10
|
+
*
|
|
11
|
+
* - "safe": the session has a real (non-default) title, or the title is
|
|
12
|
+
* unreadable (fail-open).
|
|
13
|
+
* - "skip": the session still has OpenCode's default title after all
|
|
14
|
+
* attempts — posting now could permanently suppress its title generation.
|
|
15
|
+
* The caller must leave its delivered/seen marker unset so a later
|
|
16
|
+
* startup retries.
|
|
17
|
+
*
|
|
18
|
+
* The retry window exists for the common startup case: plugin init fires a
|
|
19
|
+
* few seconds after launch, the user prompts shortly after, and the title
|
|
20
|
+
* lands within seconds of that first prompt.
|
|
21
|
+
*/
|
|
22
|
+
export declare function waitForSafeNotificationTarget(client: unknown, sessionId: string, options?: SafeTargetOptions): Promise<"safe" | "skip">;
|
|
23
|
+
//# sourceMappingURL=safe-notification-target.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"safe-notification-target.d.ts","sourceRoot":"","sources":["../../src/shared/safe-notification-target.ts"],"names":[],"mappings":"AAkCA,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAE5D;AAyBD,MAAM,WAAW,iBAAiB;IAC9B,uDAAuD;IACvD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gDAAgD;IAChD,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,6BAA6B,CAC/C,MAAM,EAAE,OAAO,EACf,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,iBAAiB,GAC5B,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC,CAe1B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Database } from "./sqlite";
|
|
2
|
+
/**
|
|
3
|
+
* NORMAL avoids a WAL sync on each commit. WAL still recovers consistently after
|
|
4
|
+
* a crash, but the latest committed work may be lost on power failure. Never use
|
|
5
|
+
* this durability policy in a rollback journal. In-memory test stores cannot use
|
|
6
|
+
* WAL and keep their existing synchronous mode.
|
|
7
|
+
*
|
|
8
|
+
* Call after the schema fence and busy timeout, before any context-store writes.
|
|
9
|
+
* Read-only diagnostics must not switch a legacy store's journal mode.
|
|
10
|
+
*/
|
|
11
|
+
export declare function configureContextDatabasePragmas(db: Database, readonly?: boolean): void;
|
|
12
|
+
//# sourceMappingURL=sqlite-context-pragmas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sqlite-context-pragmas.d.ts","sourceRoot":"","sources":["../../src/shared/sqlite-context-pragmas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEzC;;;;;;;;GAQG;AACH,wBAAgB,+BAA+B,CAAC,EAAE,EAAE,QAAQ,EAAE,QAAQ,UAAQ,GAAG,IAAI,CAYpF"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cross-runtime helpers that smooth over the small bun:sqlite ↔ node:sqlite
|
|
3
|
+
* API differences without leaking either backend into call sites.
|
|
4
|
+
*/
|
|
5
|
+
import type { Database } from "./sqlite";
|
|
6
|
+
/**
|
|
7
|
+
* Close a database, ignoring errors.
|
|
8
|
+
*
|
|
9
|
+
* bun:sqlite supports `db.close(throwOnError = false)`. node:sqlite has only
|
|
10
|
+
* `db.close()` and throws ("database is not open") on an already-closed
|
|
11
|
+
* handle. This helper mirrors the bun "swallow errors" semantics for both
|
|
12
|
+
* runtimes — useful in test teardown and `finally` blocks where the caller
|
|
13
|
+
* doesn't care whether the close succeeded.
|
|
14
|
+
*/
|
|
15
|
+
export declare function closeQuietly(db: Database | null | undefined): void;
|
|
16
|
+
/**
|
|
17
|
+
* True only when the connection reports that no transaction is open. Caches
|
|
18
|
+
* keyed on SQLite's change counters must not keep a value read inside a
|
|
19
|
+
* transaction: a rollback restores the rows without moving total_changes(),
|
|
20
|
+
* data_version or schema_version, so the stale entry would look current.
|
|
21
|
+
* Unknown state (a proxy that cannot read the native getter) counts as "in a
|
|
22
|
+
* transaction" so callers fall back to a fresh read.
|
|
23
|
+
*/
|
|
24
|
+
export declare function isKnownAutocommit(db: Database): boolean;
|
|
25
|
+
//# sourceMappingURL=sqlite-helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sqlite-helpers.d.ts","sourceRoot":"","sources":["../../src/shared/sqlite-helpers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEzC;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,EAAE,EAAE,QAAQ,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,CAUlE;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,QAAQ,GAAG,OAAO,CAOvD"}
|