@retaw106/mmc-oc 0.0.0-stage → 1.2.2
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/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-3wagyrnj.js +670 -0
- package/dist/index-53g38ggt.js +40 -0
- package/dist/index-5pg0acf7.js +410 -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-wgt4gamw.js +6388 -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/recomp-orchestrator-gyeevxaw.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-z9sqpqjf.js +420 -0
- package/index.js +1 -0
- package/package.json +84 -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,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
deriveTriggerBudget2,
|
|
3
|
+
deriveHistorianChunkTokens2,
|
|
4
|
+
resolveKnownHistorianContextLimit2,
|
|
5
|
+
resolveHistorianProducerLimits2,
|
|
6
|
+
resolveHistorianContextLimit2,
|
|
7
|
+
producerSourceLocalBudget2
|
|
8
|
+
} from "./index-zx63j2e2.js";
|
|
9
|
+
import"./index-3wagyrnj.js";
|
|
10
|
+
import"./index-qbkzdkk0.js";
|
|
11
|
+
export {
|
|
12
|
+
deriveHistorianChunkTokens2 as deriveHistorianChunkTokens,
|
|
13
|
+
deriveTriggerBudget2 as deriveTriggerBudget,
|
|
14
|
+
producerSourceLocalBudget2 as producerSourceLocalBudget,
|
|
15
|
+
resolveHistorianContextLimit2 as resolveHistorianContextLimit,
|
|
16
|
+
resolveHistorianProducerLimits2 as resolveHistorianProducerLimits,
|
|
17
|
+
resolveKnownHistorianContextLimit2 as resolveKnownHistorianContextLimit
|
|
18
|
+
};
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compaction Marker Injection
|
|
3
|
+
*
|
|
4
|
+
* Injects compaction boundaries into OpenCode's SQLite DB so that
|
|
5
|
+
* `filterCompacted` stops at the historian boundary. After injection,
|
|
6
|
+
* the transform hook receives only post-boundary messages instead
|
|
7
|
+
* of the full session history.
|
|
8
|
+
*
|
|
9
|
+
* Always-on as of v0.21.4. Previously gated behind `compaction_markers`
|
|
10
|
+
* config (default true since v0.9.0); the knob was removed because the
|
|
11
|
+
* feature is required for sane transform performance.
|
|
12
|
+
*
|
|
13
|
+
* ## What gets injected (3 rows):
|
|
14
|
+
* 1. A `compaction` part on the boundary user message
|
|
15
|
+
* 2. A summary assistant message with `parentID` → boundary user message
|
|
16
|
+
* 3. A text part on that summary message containing a static placeholder
|
|
17
|
+
*
|
|
18
|
+
* The real `<session-history>` is injected by the transform pipeline via
|
|
19
|
+
* inject-compartments.ts. The marker exists solely to make filterCompacted
|
|
20
|
+
* stop at the boundary.
|
|
21
|
+
*
|
|
22
|
+
* ## How OpenCode's filterCompacted works:
|
|
23
|
+
* - Iterates newest→oldest
|
|
24
|
+
* - Stops when it finds a user message that:
|
|
25
|
+
* (a) has a part with type: "compaction"
|
|
26
|
+
* (b) has a completed summary assistant response (summary: true, finish: "stop")
|
|
27
|
+
* whose parentID matches that user message's id
|
|
28
|
+
*/
|
|
29
|
+
export declare function generateMessageId(timestampMs: number, counter?: bigint, identity?: string): string;
|
|
30
|
+
export declare function generatePartId(timestampMs: number, counter?: bigint, identity?: string): string;
|
|
31
|
+
export declare function getOpenCodeDbPath(): string;
|
|
32
|
+
export declare function closeCompactionMarkerDb(): void;
|
|
33
|
+
export interface BoundaryUserMessage {
|
|
34
|
+
id: string;
|
|
35
|
+
timeCreated: number;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Find the nearest user message at or before the given end message id.
|
|
39
|
+
* The boundary must be a user message for filterCompacted to work.
|
|
40
|
+
*
|
|
41
|
+
* Filters out compaction summary messages (summary=true, finish="stop")
|
|
42
|
+
* so ordinals stay consistent with readRawSessionMessagesFromDb.
|
|
43
|
+
*/
|
|
44
|
+
export declare function findBoundaryUserMessage(sessionId: string, endMessageId: string): BoundaryUserMessage | null;
|
|
45
|
+
export declare function compareOpenCodeMessagesByCanonicalOrder(sessionId: string, leftMessageId: string, rightMessageId: string): number | null;
|
|
46
|
+
/**
|
|
47
|
+
* Check whether an OpenCode message ID still exists for a given session.
|
|
48
|
+
*
|
|
49
|
+
* Used by plan v6's deferred marker drain to validate that a deferred
|
|
50
|
+
* compaction-marker target hasn't been wiped by recomp / revert / partial
|
|
51
|
+
* recomp between publication and the consuming pass. Errors propagate
|
|
52
|
+
* (unlike the swallow-and-return-empty helpers in `read-session-db.ts`):
|
|
53
|
+
* the marker-manager wraps this call in its own try/catch so missing or
|
|
54
|
+
* locked OpenCode DBs become `retryable-failure` outcomes, not silent skips.
|
|
55
|
+
*
|
|
56
|
+
* Note: returns `{ id }` rather than a richer row shape because the only
|
|
57
|
+
* thing the caller needs is existence. If a future caller needs role or
|
|
58
|
+
* timestamps, widen the return type but keep the throw-on-failure contract.
|
|
59
|
+
*/
|
|
60
|
+
export declare function getOpenCodeMessageById(sessionId: string, messageId: string): {
|
|
61
|
+
id: string;
|
|
62
|
+
} | null;
|
|
63
|
+
interface CompactionMarkerState {
|
|
64
|
+
/** The user message ID that has the compaction part */
|
|
65
|
+
boundaryMessageId: string;
|
|
66
|
+
/** The summary assistant message ID we injected */
|
|
67
|
+
summaryMessageId: string;
|
|
68
|
+
/** The compaction part ID on the user message */
|
|
69
|
+
compactionPartId: string;
|
|
70
|
+
/** The text part ID on the summary message */
|
|
71
|
+
summaryPartId: string;
|
|
72
|
+
}
|
|
73
|
+
export interface InjectCompactionMarkerArgs {
|
|
74
|
+
sessionId: string;
|
|
75
|
+
/** Raw ordinal of the last compartmentalized message */
|
|
76
|
+
endOrdinal: number;
|
|
77
|
+
/** OpenCode message id of the last compartmentalized message */
|
|
78
|
+
endMessageId: string;
|
|
79
|
+
/** Summary text for the compaction summary message (static placeholder) */
|
|
80
|
+
summaryText: string;
|
|
81
|
+
/** Working directory for the session */
|
|
82
|
+
directory: string;
|
|
83
|
+
/** Boundary resolved before removing the old marker (prevents null-boundary cache busts). */
|
|
84
|
+
resolvedBoundary?: BoundaryUserMessage;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Inject a compaction marker into OpenCode's DB.
|
|
88
|
+
* Returns the marker state if successful, null if boundary couldn't be found.
|
|
89
|
+
*/
|
|
90
|
+
export declare function injectCompactionMarker(args: InjectCompactionMarkerArgs): CompactionMarkerState | null;
|
|
91
|
+
/**
|
|
92
|
+
* Replace an existing marker and inject its successor under one host-store
|
|
93
|
+
* write lock. Acquiring that lock before the first DELETE avoids SQLite's
|
|
94
|
+
* read-to-write upgrade path, where SQLITE_BUSY does not honor busy_timeout.
|
|
95
|
+
*/
|
|
96
|
+
export type CompactionMarkerReplacementOutcome = {
|
|
97
|
+
kind: "committed";
|
|
98
|
+
marker: CompactionMarkerState;
|
|
99
|
+
} | {
|
|
100
|
+
kind: "definitely-no-cut" | "uncertain";
|
|
101
|
+
error: Error;
|
|
102
|
+
};
|
|
103
|
+
export declare function replaceCompactionMarker(existing: CompactionMarkerState | null, args: InjectCompactionMarkerArgs): CompactionMarkerReplacementOutcome;
|
|
104
|
+
/**
|
|
105
|
+
* One compaction marker row-set found in opencode.db for a session.
|
|
106
|
+
*
|
|
107
|
+
* `summaryMessageIds` lists the completed summary assistant messages
|
|
108
|
+
* (summary=true, finish="stop") parented to the boundary user message and
|
|
109
|
+
* carrying magic-context's provider identity — i.e. the summaries THIS plugin
|
|
110
|
+
* injected. OpenCode-native /compact summaries carry the real provider id and
|
|
111
|
+
* are deliberately NOT listed, so callers can never delete a native compaction.
|
|
112
|
+
*/
|
|
113
|
+
export interface SessionCompactionMarkerRows {
|
|
114
|
+
/** id of the `type:"compaction"` part on the boundary user message */
|
|
115
|
+
compactionPartId: string;
|
|
116
|
+
/** the user message id the compaction part is attached to */
|
|
117
|
+
boundaryMessageId: string;
|
|
118
|
+
/** magic-context-injected summary messages parented to the boundary */
|
|
119
|
+
summaryMessageIds: string[];
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* List compaction markers that have completed Magic Context summaries.
|
|
123
|
+
*
|
|
124
|
+
* The orphan-reconciliation caller cannot act on native or part-only markers.
|
|
125
|
+
* Discovering completed summaries first bounds part reads to their parent
|
|
126
|
+
* boundaries and avoids a full-session part scan plus one message scan per row.
|
|
127
|
+
*/
|
|
128
|
+
export declare function listSessionCompactionMarkers(sessionId: string): SessionCompactionMarkerRows[];
|
|
129
|
+
/**
|
|
130
|
+
* Remove one foreign (not owned by this session's durable state) compaction
|
|
131
|
+
* marker from opencode.db: its compaction part, plus the magic-context summary
|
|
132
|
+
* lineage parented to its boundary message.
|
|
133
|
+
*
|
|
134
|
+
* Deleting the compaction part alone is sufficient to make `filterCompacted`
|
|
135
|
+
* stop ignoring our marker (it requires a compaction part to break), but the
|
|
136
|
+
* summary rows are removed too so no stale "[Compacted by magic-context]"
|
|
137
|
+
* message lingers in the fork's history.
|
|
138
|
+
*
|
|
139
|
+
* `protectedSummaryMessageId` is the caller's OWN summary message id; it is
|
|
140
|
+
* never deleted even if it happened to share the boundary (defensive — a
|
|
141
|
+
* foreign boundary newer than ours should always differ).
|
|
142
|
+
*
|
|
143
|
+
* Returns false (without throwing) when the DELETE transaction fails, e.g.
|
|
144
|
+
* SQLITE_BUSY. The hygiene caller reports failure, but its transform trigger
|
|
145
|
+
* only runs once per degraded episode, so a later-pass retry is not guaranteed.
|
|
146
|
+
*/
|
|
147
|
+
export declare function removeForeignCompactionMarker(sessionId: string, marker: SessionCompactionMarkerRows, protectedSummaryMessageId: string | null): boolean;
|
|
148
|
+
/**
|
|
149
|
+
* Result of the compaction-off flip cleanup over one session's opencode.db
|
|
150
|
+
* rows (issue #266). Counts are row-level so the transition can both gate
|
|
151
|
+
* the flip notice ("cleared something") and prove idempotence (a second run
|
|
152
|
+
* reports zero removed rows).
|
|
153
|
+
*/
|
|
154
|
+
export interface McOwnedMarkerCleanupResult {
|
|
155
|
+
/**
|
|
156
|
+
* True only when cleanup completed without skipping an MC-owned lineage.
|
|
157
|
+
* False keeps the mode transition retryable instead of recording a
|
|
158
|
+
* successful flip while a marker can still hide history.
|
|
159
|
+
*/
|
|
160
|
+
verified: boolean;
|
|
161
|
+
/** MC-owned marker lineages fully removed (compaction part + summary rows together). */
|
|
162
|
+
removedLineages: number;
|
|
163
|
+
/** Message + part rows deleted in total. */
|
|
164
|
+
removedRows: number;
|
|
165
|
+
/**
|
|
166
|
+
* Lineages deliberately LEFT in place because a surviving compaction part
|
|
167
|
+
* (or message-level compaction field) carries a `tail_start_id` that
|
|
168
|
+
* references a row the deletion would remove. A missing tail target makes
|
|
169
|
+
* OpenCode's tailIndex resolve to -1 and silently bypass its reorder, so
|
|
170
|
+
* the contract is retarget-or-retain, never blind-delete; this cleanup
|
|
171
|
+
* retains.
|
|
172
|
+
*/
|
|
173
|
+
retainedLineages: number;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Delete every Magic Context-owned compaction-marker lineage for a session
|
|
177
|
+
* from opencode.db. This is the flip-off transition's primary mechanism
|
|
178
|
+
* (issue #266 decision #7): with MC no longer injecting `<session-history>`,
|
|
179
|
+
* a surviving MC marker would keep `filterCompacted` hiding pre-boundary
|
|
180
|
+
* history with nothing to replace it — orphaned context. Deleting the MC
|
|
181
|
+
* pairs lets OpenCode recompute filtering live from the surviving rows, as if
|
|
182
|
+
* the MC markers never existed (peer-verified newest-completed-summary
|
|
183
|
+
* semantics; older markers inside the retained tail do not define the
|
|
184
|
+
* boundary). Native compaction rows are never matched: ownership keys on
|
|
185
|
+
* MC-specific signatures (the `magic-context` provider identity on summary
|
|
186
|
+
* messages, the exact MC marker summary text for legacy lineages, and the
|
|
187
|
+
* MC canonical compaction-part shape) plus session identity.
|
|
188
|
+
*
|
|
189
|
+
* Deletion caveats honored (both binding from the OpenCode peer verification):
|
|
190
|
+
* 1. The compaction part and its summary assistant rows are deleted TOGETHER
|
|
191
|
+
* in one transaction (summary parts cascade first). Deleting only the
|
|
192
|
+
* compaction part would strand the summary message in model history.
|
|
193
|
+
* The boundary USER message row itself is real user history and is never
|
|
194
|
+
* deleted — only the MC-injected compaction part attached to it.
|
|
195
|
+
* 2. tail_start_id PREFLIGHT: before deleting, every SURVIVING compaction
|
|
196
|
+
* part (and message-level compaction field) is checked for a
|
|
197
|
+
* `tail_start_id` equal to any row about to be deleted. On a hit the
|
|
198
|
+
* lineage is RETAINED, never blind-deleted.
|
|
199
|
+
*
|
|
200
|
+
* Idempotent: absent rows delete as a no-op (second run reports zeros).
|
|
201
|
+
* Errors propagate — the transition treats them as retryable and reruns the
|
|
202
|
+
* same logical cleanup on the next pass (delete-then-record protocol).
|
|
203
|
+
*/
|
|
204
|
+
export declare function removeMcOwnedCompactionMarkers(sessionId: string, summaryText: string): McOwnedMarkerCleanupResult;
|
|
205
|
+
/**
|
|
206
|
+
* Remove an existing compaction marker (all 3 rows).
|
|
207
|
+
* Used on removed-message, native-compaction and session-deletion events.
|
|
208
|
+
*/
|
|
209
|
+
export declare function removeCompactionMarker(state: CompactionMarkerState): boolean;
|
|
210
|
+
export {};
|
|
211
|
+
//# sourceMappingURL=compaction-marker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compaction-marker.d.ts","sourceRoot":"","sources":["../../../src/features/magic-context/compaction-marker.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Database } from "../../shared/sqlite";
|
|
2
|
+
interface CompactionHandler {
|
|
3
|
+
onCompacted(sessionId: string, db: Database): void;
|
|
4
|
+
}
|
|
5
|
+
export declare function createCompactionHandler(): CompactionHandler;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=compaction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compaction.d.ts","sourceRoot":"","sources":["../../../src/features/magic-context/compaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAGpD,UAAU,iBAAiB;IACvB,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,QAAQ,GAAG,IAAI,CAAC;CACtD;AAED,wBAAgB,uBAAuB,IAAI,iBAAiB,CAY3D"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { Database } from "../../shared/sqlite";
|
|
2
|
+
/**
|
|
3
|
+
* Compartment events storage (v2 / E2).
|
|
4
|
+
*
|
|
5
|
+
* The historian extracts discrete events (`causal_incident`,
|
|
6
|
+
* `trajectory_correction`, and any future kinds) while compartmentalizing. v2.0
|
|
7
|
+
* STORES these events but does NOT render them — they are a corpus for a future
|
|
8
|
+
* dreamer aggregation/steering feature (cross-session pattern detection). Parsed
|
|
9
|
+
* kind-agnostically (`kind` = element name, `fields` = child elements), so a new
|
|
10
|
+
* event kind or field needs no schema change — `fields` round-trips as JSON.
|
|
11
|
+
*
|
|
12
|
+
* Anchoring: `at_compartment="N"` is a 1-based index INTO THE CURRENT PUBLISH's
|
|
13
|
+
* emitted compartment list. We resolve it to the `compartment_id` of the matching
|
|
14
|
+
* persisted row at store time. When resolution fails (out-of-range index, e.g. an
|
|
15
|
+
* event anchored to a discard-last compartment), `compartment_id` is NULL and we
|
|
16
|
+
* keep the raw `at_compartment` for debugging.
|
|
17
|
+
*
|
|
18
|
+
* Durability caveat: `compartment_id` is a bare INTEGER (no FK). It points at the
|
|
19
|
+
* compartment row that existed at store time. Full/partial recomp deletes and
|
|
20
|
+
* re-inserts compartment rows, so a stored `compartment_id` can become stale
|
|
21
|
+
* (dangling) after recomp. This is acceptable for v2.0 because events are
|
|
22
|
+
* STORED-ONLY (not rendered or consumed yet); the future dreamer aggregation
|
|
23
|
+
* feature that reads events must re-anchor or tolerate dangling ids. Do NOT rely
|
|
24
|
+
* on `compartment_id` surviving recomp.
|
|
25
|
+
*/
|
|
26
|
+
export interface CompartmentEventInput {
|
|
27
|
+
/** Event element name, e.g. "causal_incident" | "trajectory_correction". */
|
|
28
|
+
kind: string;
|
|
29
|
+
/** 1-based index into the publish's emitted compartments; null if absent/invalid. */
|
|
30
|
+
atCompartment: number | null;
|
|
31
|
+
/** Child elements verbatim (e.g. trigger, implication). */
|
|
32
|
+
fields: Record<string, string>;
|
|
33
|
+
}
|
|
34
|
+
export interface StoredCompartmentEvent extends CompartmentEventInput {
|
|
35
|
+
id: number;
|
|
36
|
+
sessionId: string;
|
|
37
|
+
compartmentId: number | null;
|
|
38
|
+
createdAt: number;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Persist historian-extracted events for a publish.
|
|
42
|
+
*
|
|
43
|
+
* @param compartmentIds durable compartment ids for the publish's emitted
|
|
44
|
+
* compartments, in emission order (index i → the (i+1)-th emitted compartment).
|
|
45
|
+
* Used to resolve `at_compartment` (1-based) to a durable `compartment_id`.
|
|
46
|
+
*/
|
|
47
|
+
export declare function insertCompartmentEvents(db: Database, sessionId: string, events: readonly CompartmentEventInput[], compartmentIds: readonly number[]): void;
|
|
48
|
+
/** Load all stored events for a session (newest first). For diagnostics / future dreamer aggregation. */
|
|
49
|
+
export declare function getCompartmentEvents(db: Database, sessionId: string): StoredCompartmentEvent[];
|
|
50
|
+
//# sourceMappingURL=compartment-events.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compartment-events.d.ts","sourceRoot":"","sources":["../../../src/features/magic-context/compartment-events.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,MAAM,WAAW,qBAAqB;IAClC,4EAA4E;IAC5E,IAAI,EAAE,MAAM,CAAC;IACb,qFAAqF;IACrF,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,2DAA2D;IAC3D,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,sBAAuB,SAAQ,qBAAqB;IACjE,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACnC,EAAE,EAAE,QAAQ,EACZ,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,SAAS,qBAAqB,EAAE,EACxC,cAAc,EAAE,SAAS,MAAM,EAAE,GAClC,IAAI,CAqBN;AAED,yGAAyG;AACzG,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,GAAG,sBAAsB,EAAE,CAuB9F"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { sessionLog } from "../../shared/logger";
|
|
2
|
+
import type { Database } from "../../shared/sqlite";
|
|
3
|
+
export declare const COMPARTMENT_LEASE_TTL_MS: number;
|
|
4
|
+
export declare const COMPARTMENT_LEASE_RENEWAL_MS: number;
|
|
5
|
+
export interface LeaseAcquired {
|
|
6
|
+
sessionId: string;
|
|
7
|
+
holderId: string;
|
|
8
|
+
acquiredAt: number;
|
|
9
|
+
expiresAt: number;
|
|
10
|
+
ownerPid: number;
|
|
11
|
+
}
|
|
12
|
+
export interface CompartmentLeaseBlocker {
|
|
13
|
+
holderId: string;
|
|
14
|
+
ownerPid: number | null;
|
|
15
|
+
acquiredAt: number;
|
|
16
|
+
expiresAt: number;
|
|
17
|
+
}
|
|
18
|
+
export declare function getCompartmentLeaseBlocker(db: Database, sessionId: string): CompartmentLeaseBlocker | null;
|
|
19
|
+
export declare function acquireCompartmentLease(db: Database, sessionId: string, holderId: string): LeaseAcquired | null;
|
|
20
|
+
export declare function renewCompartmentLease(db: Database, sessionId: string, holderId: string): boolean;
|
|
21
|
+
export declare function releaseCompartmentLease(db: Database, sessionId: string, holderId: string): void;
|
|
22
|
+
/**
|
|
23
|
+
* A failed release is safe: another holder can reclaim the row after its TTL passes.
|
|
24
|
+
* Do not let transient SQLite contention turn cleanup into an unhandled background failure.
|
|
25
|
+
*/
|
|
26
|
+
export declare function releaseCompartmentLeaseBestEffort(db: Database, sessionId: string, holderId: string, log?: typeof sessionLog): void;
|
|
27
|
+
export declare function isCompartmentLeaseHeld(db: Database, sessionId: string, holderId: string): boolean;
|
|
28
|
+
//# sourceMappingURL=compartment-lease.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compartment-lease.d.ts","sourceRoot":"","sources":["../../../src/features/magic-context/compartment-lease.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEpD,eAAO,MAAM,wBAAwB,QAAgB,CAAC;AACtD,eAAO,MAAM,4BAA4B,QAAY,CAAC;AAEtD,MAAM,WAAW,aAAa;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,uBAAuB;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,0BAA0B,CACtC,EAAE,EAAE,QAAQ,EACZ,SAAS,EAAE,MAAM,GAClB,uBAAuB,GAAG,IAAI,CAUhC;AAED,wBAAgB,uBAAuB,CACnC,EAAE,EAAE,QAAQ,EACZ,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,GACjB,aAAa,GAAG,IAAI,CA8CtB;AAED,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAWhG;AAED,wBAAgB,uBAAuB,CAAC,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAK/F;AAED;;;GAGG;AACH,wBAAgB,iCAAiC,CAC7C,EAAE,EAAE,QAAQ,EACZ,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,GAAG,GAAE,OAAO,UAAuB,GACpC,IAAI,CASN;AAED,wBAAgB,sBAAsB,CAAC,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAOjG"}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import type { Database } from "../../shared/sqlite";
|
|
2
|
+
export interface Compartment {
|
|
3
|
+
id: number;
|
|
4
|
+
sessionId: string;
|
|
5
|
+
sequence: number;
|
|
6
|
+
startMessage: number;
|
|
7
|
+
endMessage: number;
|
|
8
|
+
startMessageId: string;
|
|
9
|
+
endMessageId: string;
|
|
10
|
+
title: string;
|
|
11
|
+
/** v2: P1 tier text (fullest). Legacy rows: flat v1 content. Always present (NOT NULL). */
|
|
12
|
+
content: string;
|
|
13
|
+
/** v2 paraphrase tiers (model B). NULL for legacy=1 rows. */
|
|
14
|
+
p1: string | null;
|
|
15
|
+
p2: string | null;
|
|
16
|
+
p3: string | null;
|
|
17
|
+
p4: string | null;
|
|
18
|
+
/** Decay-rate signal (1-100). Defaults to 50. */
|
|
19
|
+
importance: number;
|
|
20
|
+
/** Comma-separated activity types (e.g. "design,feature"). NULL for legacy rows. */
|
|
21
|
+
episodeType: string | null;
|
|
22
|
+
/** 1 = pre-v2 flat compartment (no tiers); 0 = v2 tiered. */
|
|
23
|
+
legacy: number;
|
|
24
|
+
createdAt: number;
|
|
25
|
+
/**
|
|
26
|
+
* `unresolved` when the store-projection rebase could not re-derive this
|
|
27
|
+
* compartment's ordinals, because the message its endpoint id names does not
|
|
28
|
+
* exist in the projection the running host serves. Such a row keeps its
|
|
29
|
+
* summary text (readable by id) but is excluded from anything that treats
|
|
30
|
+
* its ordinals as positions: range recovery, injection, and the boundary.
|
|
31
|
+
* Re-evaluated on every later projection change, so an endpoint that comes
|
|
32
|
+
* back returns the row to `ok`.
|
|
33
|
+
*/
|
|
34
|
+
rebaseStatus: "ok" | "unresolved";
|
|
35
|
+
}
|
|
36
|
+
export interface SessionFact {
|
|
37
|
+
id: number;
|
|
38
|
+
sessionId: string;
|
|
39
|
+
category: string;
|
|
40
|
+
content: string;
|
|
41
|
+
createdAt: number;
|
|
42
|
+
updatedAt: number;
|
|
43
|
+
}
|
|
44
|
+
export interface CompartmentInput {
|
|
45
|
+
sequence: number;
|
|
46
|
+
startMessage: number;
|
|
47
|
+
endMessage: number;
|
|
48
|
+
startMessageId: string;
|
|
49
|
+
endMessageId: string;
|
|
50
|
+
title: string;
|
|
51
|
+
/** v2: P1 tier text. Legacy/compressor inserts: flat content. */
|
|
52
|
+
content: string;
|
|
53
|
+
/** v2 paraphrase tiers (model B). Omitted/null for legacy or compressor inserts → stored NULL. */
|
|
54
|
+
p1?: string | null;
|
|
55
|
+
p2?: string | null;
|
|
56
|
+
p3?: string | null;
|
|
57
|
+
p4?: string | null;
|
|
58
|
+
/** Decay-rate signal (1-100). Omitted → stored 50. */
|
|
59
|
+
importance?: number | null;
|
|
60
|
+
/** Comma-separated activity types. Omitted/null → stored NULL. */
|
|
61
|
+
episodeType?: string | null;
|
|
62
|
+
}
|
|
63
|
+
export declare function getCompartments(db: Database, sessionId: string): Compartment[];
|
|
64
|
+
/**
|
|
65
|
+
* Highest message ordinal any compartment covers — the line between compacted
|
|
66
|
+
* history and the live tail.
|
|
67
|
+
*
|
|
68
|
+
* Rows the projection rebase could not re-derive are excluded: their stored
|
|
69
|
+
* ordinals are positions in a message list the running host no longer serves,
|
|
70
|
+
* so using one as the boundary would clamp recovery ranges and the protected
|
|
71
|
+
* tail against an arbitrary message. Excluding them moves the boundary back to
|
|
72
|
+
* the newest compartment that still resolves, which is recoverable, instead of
|
|
73
|
+
* pointing confidently at the wrong place.
|
|
74
|
+
*/
|
|
75
|
+
export declare function getLastCompartmentEndMessage(db: Database, sessionId: string): number;
|
|
76
|
+
/**
|
|
77
|
+
* The OpenCode message id at the boundary of the highest-sequence compartment —
|
|
78
|
+
* i.e. the last raw message the compartment history (m[0]+m[1]) covers. A newer
|
|
79
|
+
* compartment with no stored end id (a legacy row, or one carried into a forked
|
|
80
|
+
* session) cannot be placed, so the boundary is the newest compartment that has
|
|
81
|
+
* one: everything up to it is covered, and the rows after it stay raw. Returns
|
|
82
|
+
* null when no compartment has an end id. Used to persist the m[1]-coverage boundary so a cold post-
|
|
83
|
+
* restart pass trims the live tail to what the cached summary actually covers,
|
|
84
|
+
* not to the latest compartment (which may be newer than the cached m[1]).
|
|
85
|
+
*/
|
|
86
|
+
export declare function getLastCompartmentEndMessageId(db: Database, sessionId: string): string | null;
|
|
87
|
+
/**
|
|
88
|
+
* Look up compartments whose stored `end_message_id` matches the given
|
|
89
|
+
* OpenCode message id. Returns an ARRAY — schema only enforces
|
|
90
|
+
* `UNIQUE(session_id, sequence)`, NOT `(session_id, end_message_id)`, so
|
|
91
|
+
* a future bug could in principle leave two rows sharing a boundary. The
|
|
92
|
+
* marker drain's `validatePendingTarget` treats `length > 1` as a schema
|
|
93
|
+
* invariant violation and bails to stale-skip (plan v6 section 5).
|
|
94
|
+
*
|
|
95
|
+
* Normal path: exactly one match → caller treats it as the target row.
|
|
96
|
+
*/
|
|
97
|
+
export declare function getCompartmentsByEndMessageId(db: Database, sessionId: string, endMessageId: string): Compartment[];
|
|
98
|
+
export declare function replaceAllCompartments(db: Database, sessionId: string, compartments: CompartmentInput[]): void;
|
|
99
|
+
/**
|
|
100
|
+
* Append new compartments without deleting existing ones.
|
|
101
|
+
* Used by the incremental runner where existing compartments are preserved
|
|
102
|
+
* and only new compartments for the latest chunk are added.
|
|
103
|
+
*/
|
|
104
|
+
export declare function appendCompartments(db: Database, sessionId: string, compartments: CompartmentInput[]): void;
|
|
105
|
+
/**
|
|
106
|
+
* Replace session facts without touching compartments.
|
|
107
|
+
* Facts are fully re-normalized by the historian on each pass,
|
|
108
|
+
* so they always need a full replacement.
|
|
109
|
+
*/
|
|
110
|
+
export declare function replaceSessionFacts(db: Database, sessionId: string, facts: Array<{
|
|
111
|
+
category: string;
|
|
112
|
+
content: string;
|
|
113
|
+
}>): void;
|
|
114
|
+
export declare function getSessionFacts(db: Database, sessionId: string): SessionFact[];
|
|
115
|
+
export declare function replaceAllCompartmentState(db: Database, sessionId: string, compartments: CompartmentInput[], facts: Array<{
|
|
116
|
+
category: string;
|
|
117
|
+
content: string;
|
|
118
|
+
}>): void;
|
|
119
|
+
export declare function replaceAllCompartmentStateAndBumpDepth(db: Database, holderId: string, sessionId: string, compartments: CompartmentInput[], facts: Array<{
|
|
120
|
+
category: string;
|
|
121
|
+
content: string;
|
|
122
|
+
}>, depthStartOrdinal: number, depthEndOrdinal: number): boolean;
|
|
123
|
+
export interface CompartmentDateRanges {
|
|
124
|
+
/** Map compartment id → `{ start: "YYYY-MM-DD", end: "YYYY-MM-DD" }` */
|
|
125
|
+
byId: Map<number, {
|
|
126
|
+
start: string;
|
|
127
|
+
end: string;
|
|
128
|
+
}>;
|
|
129
|
+
}
|
|
130
|
+
export declare function buildCompartmentBlock(compartments: Compartment[], facts: SessionFact[], memoryBlock?: string, dateRanges?: CompartmentDateRanges): string;
|
|
131
|
+
export interface RecompStaging {
|
|
132
|
+
compartments: CompartmentInput[];
|
|
133
|
+
facts: Array<{
|
|
134
|
+
category: string;
|
|
135
|
+
content: string;
|
|
136
|
+
}>;
|
|
137
|
+
passCount: number;
|
|
138
|
+
lastEndMessage: number;
|
|
139
|
+
}
|
|
140
|
+
/** Append one pass's results to the staging tables. */
|
|
141
|
+
export declare function saveRecompStagingPass(db: Database, sessionId: string, passNumber: number, compartments: CompartmentInput[], facts: Array<{
|
|
142
|
+
category: string;
|
|
143
|
+
content: string;
|
|
144
|
+
}>): void;
|
|
145
|
+
/** Read existing staging data for resume. Returns null if no staging exists. */
|
|
146
|
+
export declare function getRecompStaging(db: Database, sessionId: string): RecompStaging | null;
|
|
147
|
+
/** Atomically promote staging → real tables, then clear staging. */
|
|
148
|
+
export declare function promoteRecompStaging(db: Database, sessionId: string, holderId?: string): {
|
|
149
|
+
compartments: CompartmentInput[];
|
|
150
|
+
facts: Array<{
|
|
151
|
+
category: string;
|
|
152
|
+
content: string;
|
|
153
|
+
}>;
|
|
154
|
+
} | null;
|
|
155
|
+
/** Clear staging tables for a session (on cancel/abandon or after successful promote). */
|
|
156
|
+
export declare function clearRecompStaging(db: Database, sessionId: string): void;
|
|
157
|
+
/**
|
|
158
|
+
* Returns the stored partial recomp range for this session, or null when the
|
|
159
|
+
* active staging (if any) is for a full recomp.
|
|
160
|
+
*
|
|
161
|
+
* A zero-valued row means "no partial range recorded" — either no staging or
|
|
162
|
+
* full-recomp staging.
|
|
163
|
+
*/
|
|
164
|
+
export declare function getRecompPartialRange(db: Database, sessionId: string): {
|
|
165
|
+
start: number;
|
|
166
|
+
end: number;
|
|
167
|
+
} | null;
|
|
168
|
+
/**
|
|
169
|
+
* Record the active partial recomp range. Must be called inside or alongside
|
|
170
|
+
* saveRecompStagingPass so staging and range marker stay in sync.
|
|
171
|
+
*/
|
|
172
|
+
export declare function setRecompPartialRange(db: Database, sessionId: string, range: {
|
|
173
|
+
start: number;
|
|
174
|
+
end: number;
|
|
175
|
+
} | null): void;
|
|
176
|
+
export declare function escapeXmlAttr(s: string): string;
|
|
177
|
+
export declare function escapeXmlContent(s: string): string;
|
|
178
|
+
//# sourceMappingURL=compartment-storage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compartment-storage.d.ts","sourceRoot":"","sources":["../../../src/features/magic-context/compartment-storage.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Database, Statement as PreparedStatement } from "../../shared/sqlite";
|
|
2
|
+
export declare function getIncrementDepthStatement(db: Database): PreparedStatement;
|
|
3
|
+
export declare function incrementCompressionDepth(db: Database, sessionId: string, startOrdinal: number, endOrdinal: number): void;
|
|
4
|
+
export declare function getAverageCompressionDepth(db: Database, sessionId: string, startOrdinal: number, endOrdinal: number): number;
|
|
5
|
+
export declare function getMaxCompressionDepth(db: Database, sessionId: string): number;
|
|
6
|
+
export declare function clearCompressionDepth(db: Database, sessionId: string): void;
|
|
7
|
+
/**
|
|
8
|
+
* Clear compression depth counters for a specific message range.
|
|
9
|
+
* Used by partial recomp: rebuilt compartments start fresh at depth 0, so
|
|
10
|
+
* depth rows for the rebuilt ordinals must be removed. Existing depth for
|
|
11
|
+
* ordinals outside the range (prior and tail compartments) is preserved.
|
|
12
|
+
*/
|
|
13
|
+
export declare function clearCompressionDepthRange(db: Database, sessionId: string, startOrdinal: number, endOrdinal: number): void;
|
|
14
|
+
//# sourceMappingURL=compression-depth-storage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compression-depth-storage.d.ts","sourceRoot":"","sources":["../../../src/features/magic-context/compression-depth-storage.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAepF,wBAAgB,0BAA0B,CAAC,EAAE,EAAE,QAAQ,GAAG,iBAAiB,CAS1E;AAiCD,wBAAgB,yBAAyB,CACrC,EAAE,EAAE,QAAQ,EACZ,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,GACnB,IAAI,CAWN;AAED,wBAAgB,0BAA0B,CACtC,EAAE,EAAE,QAAQ,EACZ,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,GACnB,MAAM,CAaR;AAED,wBAAgB,sBAAsB,CAAC,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAG9E;AAED,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAE3E;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CACtC,EAAE,EAAE,QAAQ,EACZ,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,GACnB,IAAI,CAON"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Database } from "../../shared/sqlite";
|
|
2
|
+
export declare function getContextStoreUuid(db: Database): string | null;
|
|
3
|
+
/** Mint the store identity once. Restoring a database restores this value too,
|
|
4
|
+
* which is what lets the module recognize a regressed marker. */
|
|
5
|
+
export declare function ensureContextStoreUuid(db: Database): string;
|
|
6
|
+
export interface AuthorityManagedMarker {
|
|
7
|
+
project_path: string;
|
|
8
|
+
context_store_uuid: string;
|
|
9
|
+
marked_at: number;
|
|
10
|
+
}
|
|
11
|
+
export declare function getAuthorityManagedMarker(db: Database, projectPath: string): AuthorityManagedMarker | null;
|
|
12
|
+
export declare function listAuthorityManagedMarkers(db: Database): AuthorityManagedMarker[];
|
|
13
|
+
export declare function installAuthorityManagedMarker(db: Database, projectPath: string, contextStoreUuid?: string): void;
|
|
14
|
+
export declare function removeAuthorityManagedMarker(db: Database, projectPath: string, onMarkerReleased?: () => void): void;
|
|
15
|
+
//# sourceMappingURL=context-authority.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-authority.d.ts","sourceRoot":"","sources":["../../../src/features/magic-context/context-authority.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAOpD,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,QAAQ,GAAG,MAAM,GAAG,IAAI,CAK/D;AAED;iEACiE;AACjE,wBAAgB,sBAAsB,CAAC,EAAE,EAAE,QAAQ,GAAG,MAAM,CAY3D;AAED,MAAM,WAAW,sBAAsB;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,yBAAyB,CACrC,EAAE,EAAE,QAAQ,EACZ,WAAW,EAAE,MAAM,GACpB,sBAAsB,GAAG,IAAI,CAQ/B;AAED,wBAAgB,2BAA2B,CAAC,EAAE,EAAE,QAAQ,GAAG,sBAAsB,EAAE,CAMlF;AAED,wBAAgB,6BAA6B,CACzC,EAAE,EAAE,QAAQ,EACZ,WAAW,EAAE,MAAM,EACnB,gBAAgB,SAA6B,GAC9C,IAAI,CAMN;AAED,wBAAgB,4BAA4B,CACxC,EAAE,EAAE,QAAQ,EACZ,WAAW,EAAE,MAAM,EACnB,gBAAgB,CAAC,EAAE,MAAM,IAAI,GAC9B,IAAI,CAQN"}
|