@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 @@
|
|
|
1
|
+
{"version":3,"file":"drop-stale-reduce-calls.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/drop-stale-reduce-calls.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAIlD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAoBvD;AA+CD,MAAM,WAAW,sBAAsB;IACnC,8DAA8D;IAC9D,OAAO,EAAE,OAAO,CAAC;IACjB,4EAA4E;IAC5E,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC9B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,oBAAoB,CAChC,QAAQ,EAAE,WAAW,EAAE,EACvB,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,EACtB,OAAO,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAC;IAAC,cAAc,CAAC,EAAE,MAAM,CAAA;CAAO,GAC5D,sBAAsB,CAiCxB"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export declare function droppedInputMarker(tagId: number): {
|
|
2
|
+
dropped: string;
|
|
3
|
+
};
|
|
4
|
+
export declare function containsDroppedInputPlaceholder(value: unknown): boolean;
|
|
5
|
+
export interface ToolParameterNames {
|
|
6
|
+
required: string[];
|
|
7
|
+
optional: string[];
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Read a tool's parameter names from its schema. Pi and OpenCode 2 hand over
|
|
11
|
+
* JSON Schema (`properties` + `required`); the OpenCode 1 `tool.definition`
|
|
12
|
+
* hook hands over the tool's zod object. Anything else yields undefined so the
|
|
13
|
+
* refusal never invents names it could not see.
|
|
14
|
+
*/
|
|
15
|
+
export declare function toolParameterNames(schema: unknown): ToolParameterNames | undefined;
|
|
16
|
+
export declare function recordToolParameters(toolName: string, schema: unknown): void;
|
|
17
|
+
export interface DroppedInputRefusal {
|
|
18
|
+
toolName?: string;
|
|
19
|
+
input: unknown;
|
|
20
|
+
/** The tool's schema when the caller can see it; names are otherwise looked up by tool name. */
|
|
21
|
+
parameters?: unknown;
|
|
22
|
+
/** How many calls in a row, including this one, carried placeholder arguments. */
|
|
23
|
+
consecutive: number;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* The tool-result text a refused call gets back. The model wrote the
|
|
27
|
+
* placeholder itself (usually by copying the dropped-call rendering from its
|
|
28
|
+
* history), so the text says exactly that, shows what was received, and names
|
|
29
|
+
* what to send instead. mmc_expand is only for recovering an earlier call's
|
|
30
|
+
* arguments, never a prerequisite for a fresh call.
|
|
31
|
+
*/
|
|
32
|
+
export declare function droppedInputRefusalMessage(refusal: DroppedInputRefusal): string;
|
|
33
|
+
export interface DroppedInputCall {
|
|
34
|
+
sessionID?: string;
|
|
35
|
+
toolName?: string;
|
|
36
|
+
input: unknown;
|
|
37
|
+
}
|
|
38
|
+
export interface DroppedInputGuardOptions {
|
|
39
|
+
/** Look up a tool's live schema by name (Pi exposes every tool's parameters). */
|
|
40
|
+
parametersFor?: (toolName: string) => unknown;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Stateful guard for one plugin instance. Detection is purely content-based;
|
|
44
|
+
* the state is only the per-session count of consecutive refusals, which a
|
|
45
|
+
* call that passes the guard resets.
|
|
46
|
+
*/
|
|
47
|
+
export declare function createDroppedInputGuard(options?: DroppedInputGuardOptions): {
|
|
48
|
+
/** Returns the refusal text for a placeholder call, or undefined when the call may run. */
|
|
49
|
+
check(call: DroppedInputCall): string | undefined;
|
|
50
|
+
};
|
|
51
|
+
export type DroppedInputGuard = ReturnType<typeof createDroppedInputGuard>;
|
|
52
|
+
/** Throw the refusal for a placeholder call; OpenCode surfaces the error as the tool result. */
|
|
53
|
+
export declare function assertExecutableToolInput(guard: DroppedInputGuard, call: DroppedInputCall): void;
|
|
54
|
+
export declare function createDroppedInputToolExecuteBeforeHook(): (input: unknown, output: unknown) => Promise<void>;
|
|
55
|
+
//# sourceMappingURL=dropped-input-guard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropped-input-guard.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/dropped-input-guard.ts"],"names":[],"mappings":"AAwBA,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAErE;AAED,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAavE;AAED,MAAM,WAAW,kBAAkB;IAC/B,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACtB;AAoBD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,OAAO,GAAG,kBAAkB,GAAG,SAAS,CA+BlF;AAOD,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,IAAI,CAI5E;AAuCD,MAAM,WAAW,mBAAmB;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;IACf,gGAAgG;IAChG,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,kFAAkF;IAClF,WAAW,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,mBAAmB,GAAG,MAAM,CAiB/E;AAED,MAAM,WAAW,gBAAgB;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,wBAAwB;IACrC,iFAAiF;IACjF,aAAa,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC;CACjD;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,GAAE,wBAA6B;IAItE,2FAA2F;gBAC/E,gBAAgB,GAAG,MAAM,GAAG,SAAS;EA6BxD;AAED,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE3E,gGAAgG;AAChG,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,iBAAiB,EAAE,IAAI,EAAE,gBAAgB,GAAG,IAAI,CAGhG;AAED,wBAAgB,uCAAuC,KAErC,OAAO,OAAO,EAAE,QAAQ,OAAO,KAAG,OAAO,CAAC,IAAI,CAAC,CAShE"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ContextDatabase } from "../../features/magic-context/storage";
|
|
2
|
+
export type DroppedTokenReduction = {
|
|
3
|
+
tagNumber: number;
|
|
4
|
+
mode: "full" | "truncated" | "edit_marker";
|
|
5
|
+
} | {
|
|
6
|
+
tagNumber: number;
|
|
7
|
+
mode: "partial";
|
|
8
|
+
removedCharacters: number;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Estimate the tokens removed by reductions first applied during this pass.
|
|
12
|
+
* Full removals use every persisted token component carried by the tag row.
|
|
13
|
+
* Tool skeletons retain invocation structure, so they count only the persisted
|
|
14
|
+
* output token_count that the skeleton removes. Partial text rewrites cannot
|
|
15
|
+
* derive their removed share from the full persisted count; only their observed
|
|
16
|
+
* removed characters use the same 3.5-characters-per-token fallback as the
|
|
17
|
+
* tokenizer's failure path. The full message array is never serialized here.
|
|
18
|
+
*/
|
|
19
|
+
export declare function estimateDroppedTokensFromTagReductions(db: ContextDatabase, sessionId: string, reductions: readonly DroppedTokenReduction[]): number;
|
|
20
|
+
//# sourceMappingURL=dropped-token-estimate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropped-token-estimate.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/dropped-token-estimate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAK5E,MAAM,MAAM,qBAAqB,GAC3B;IACI,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,aAAa,CAAC;CAC9C,GACD;IACI,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,SAAS,CAAC;IAChB,iBAAiB,EAAE,MAAM,CAAC;CAC7B,CAAC;AAmDR;;;;;;;;GAQG;AACH,wBAAgB,sCAAsC,CAClD,EAAE,EAAE,eAAe,EACnB,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,SAAS,qBAAqB,EAAE,GAC7C,MAAM,CA6CR"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** Region-hint length: enough to identify the edited section, cheap to keep. */
|
|
2
|
+
export declare const EDIT_REGION_HINT_LEN = 40;
|
|
3
|
+
/** True for the tools whose superseded older calls we compress. */
|
|
4
|
+
export declare function isEditTool(name: string | null | undefined): boolean;
|
|
5
|
+
/**
|
|
6
|
+
* Mutate a tool input object in place into its edit-marker form: preserve
|
|
7
|
+
* path-like keys verbatim, clamp the diff keys to a region-hint prefix, leave
|
|
8
|
+
* other (small) keys untouched. Idempotent.
|
|
9
|
+
*/
|
|
10
|
+
export declare function applyEditMarkerToInput(input: Record<string, unknown>): void;
|
|
11
|
+
//# sourceMappingURL=edit-marker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edit-marker.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/edit-marker.ts"],"names":[],"mappings":"AAqBA,gFAAgF;AAChF,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAoBvC,mEAAmE;AACnE,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAEnE;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAW3E"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import type { TagTarget } from "./tag-messages";
|
|
2
|
+
/** Reclaim target = fixedFloor + TARGET_FRACTION × (ceiling − fixedFloor). */
|
|
3
|
+
export declare const TARGET_FRACTION = 0.3;
|
|
4
|
+
/** Keep the newest `ceil(RESERVE × tierCount)` of T1/T2 as continuation context. */
|
|
5
|
+
export declare const TIER_RECENCY_RESERVE = 0.2;
|
|
6
|
+
/**
|
|
7
|
+
* Don't bust the cache for a trivial reclaim. If the computed reclaim is at or
|
|
8
|
+
* below this, the pass is a no-op (combined with the watermark, this prevents
|
|
9
|
+
* force-band-to-94.9% oscillation).
|
|
10
|
+
*/
|
|
11
|
+
export declare const EMERGENCY_REARM_MIN_TOKENS = 2000;
|
|
12
|
+
/**
|
|
13
|
+
* The selected candidates must together reclaim at least this many tokens, or
|
|
14
|
+
* the pass is skipped. The gap check above only proves there is something to
|
|
15
|
+
* close; it says nothing about what the candidates can actually win back. One
|
|
16
|
+
* live session spent an hour at 100% context dropping one fresh tool result
|
|
17
|
+
* per pass, 28 to 149 tokens each against a ~9,200-token gap, rewriting a
|
|
18
|
+
* cached prefix of ~300K tokens every time.
|
|
19
|
+
*/
|
|
20
|
+
export declare const EMERGENCY_MIN_ACHIEVABLE_RECLAIM_TOKENS = 2000;
|
|
21
|
+
export type Tier = 1 | 2 | 3;
|
|
22
|
+
/**
|
|
23
|
+
* Classify a tool into its drop tier. T1 (keep longest) = navigation/structure
|
|
24
|
+
* the agent re-uses; T2 (medium) = edit-class continuation context; T3 (drop
|
|
25
|
+
* first) = everything else (the default — bash, mmc_reduce, inspect, web, …).
|
|
26
|
+
*/
|
|
27
|
+
export declare function resolveToolTier(toolName: string | null): Tier;
|
|
28
|
+
/** Minimal tag shape the planner needs (subset of TagEntry, harness-agnostic). */
|
|
29
|
+
export interface EmergencyDropTag {
|
|
30
|
+
tagNumber: number;
|
|
31
|
+
type: "message" | "tool" | "file";
|
|
32
|
+
status: "active" | "dropped" | "compacted";
|
|
33
|
+
toolName: string | null;
|
|
34
|
+
byteSize: number;
|
|
35
|
+
/** Tool-arg bytes — `drop()` removes the invocation too, so these reclaim. */
|
|
36
|
+
inputByteSize: number;
|
|
37
|
+
reasoningByteSize: number;
|
|
38
|
+
/** Provider-token observations from the current representation, never persisted raw tag counts. */
|
|
39
|
+
servedTokens?: number;
|
|
40
|
+
reclaimableTokens?: number;
|
|
41
|
+
}
|
|
42
|
+
export interface EmergencyDropPlan {
|
|
43
|
+
/** Whether the caller should perform any drop this pass. */
|
|
44
|
+
shouldDrop: boolean;
|
|
45
|
+
/** Tool tag numbers to drop, in eviction order (T3→T2→T1, oldest-first). */
|
|
46
|
+
tagNumbers: number[];
|
|
47
|
+
/** Reclaim target in tokens (for logging). */
|
|
48
|
+
reclaimTokens: number;
|
|
49
|
+
/** Human-readable reason (no-op explanation or drop summary), for logs. */
|
|
50
|
+
reason: string;
|
|
51
|
+
}
|
|
52
|
+
export declare function estimateEmergencyDropReclaimTokens(tag: EmergencyDropTag): number;
|
|
53
|
+
/**
|
|
54
|
+
* Plan a tiered target-headroom emergency drop. Pure: returns the ordered set of
|
|
55
|
+
* tool tag numbers to drop, a token target, and a reason; the caller applies them.
|
|
56
|
+
*
|
|
57
|
+
* fixedFloor is estimated as current provider input minus measured active-tail mass.
|
|
58
|
+
* Content with no observable token count remains in that fixed portion. This is
|
|
59
|
+
* conservative reclaim planning, not proof that every remaining token is irreducible.
|
|
60
|
+
*
|
|
61
|
+
* The two tag sets serve DIFFERENT contracts and must not be conflated:
|
|
62
|
+
* - `floorTags`: the ENTIRE active live-window tag set (all types, including
|
|
63
|
+
* non-droppable tool tags). Their served mass determines the estimated fixed floor. Passing a narrower set (e.g.
|
|
64
|
+
* tool-only) folds real conversation/reasoning tail into the "floor",
|
|
65
|
+
* raising the target and systematically under-evicting at the derived force band.
|
|
66
|
+
* - `tags`: the evictable candidates — active tool tags whose drop target
|
|
67
|
+
* would actually reclaim bytes (caller pre-filters on `canDrop()` so no
|
|
68
|
+
* phantom tag is counted as reclaimed).
|
|
69
|
+
*/
|
|
70
|
+
export declare function planEmergencyDrop(input: {
|
|
71
|
+
/** Evictable candidates: active tool tags with a working drop target. */
|
|
72
|
+
tags: readonly EmergencyDropTag[];
|
|
73
|
+
/**
|
|
74
|
+
* FULL active live-window tag set (all types) — floor accounting only.
|
|
75
|
+
* See the fixedFloor contract above.
|
|
76
|
+
*/
|
|
77
|
+
floorTags: readonly EmergencyDropTag[];
|
|
78
|
+
maxTag: number;
|
|
79
|
+
/**
|
|
80
|
+
* Union projection form: exact tag-number cutoff directly.
|
|
81
|
+
* Coordinate space: tag-number space (number | null).
|
|
82
|
+
* Empty-window behavior: branches on absent cutoff (null), applying no tag-number threshold.
|
|
83
|
+
*/
|
|
84
|
+
protectedCutoff: number | null;
|
|
85
|
+
/** Provider-proven or estimated pressure; at 95% only open arcs and exemplars survive. */
|
|
86
|
+
usagePercentage?: number;
|
|
87
|
+
currentTotalInputTokens: number;
|
|
88
|
+
/** ceiling = contextLimit × executeThreshold%. */
|
|
89
|
+
ceilingTokens: number;
|
|
90
|
+
/**
|
|
91
|
+
* `last_emergency_input_sample` is retained as the pressure-episode latch:
|
|
92
|
+
* zero means armed, non-zero means this force-band episode already had its
|
|
93
|
+
* originating batch. The caller rearms on pressure exit or an independent
|
|
94
|
+
* bust. There is deliberately no tag-number watermark because a scalar
|
|
95
|
+
* cursor would exclude still-active lower-numbered tags after tiered drops.
|
|
96
|
+
*/
|
|
97
|
+
priorInputSample: number;
|
|
98
|
+
/** True while the persisted pressure-episode latch is non-zero. */
|
|
99
|
+
hasPriorDrop: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* True when another mutation already rewrites the cached prefix on this
|
|
102
|
+
* pass. The selection then rides that rewrite for free, so the minimum
|
|
103
|
+
* achievable reclaim does not apply.
|
|
104
|
+
*/
|
|
105
|
+
passAlreadyPriced?: boolean;
|
|
106
|
+
}): EmergencyDropPlan;
|
|
107
|
+
/** Count current content and the planned replacement without mutating either cached representation. */
|
|
108
|
+
export declare function measureEmergencyTag<T extends EmergencyDropTag>(tag: T, target: TagTarget | undefined, calibration: {
|
|
109
|
+
toolsRatio: number;
|
|
110
|
+
proseRatio: number;
|
|
111
|
+
}, skeleton: boolean): T & EmergencyDropTag;
|
|
112
|
+
//# sourceMappingURL=emergency-drop.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emergency-drop.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/emergency-drop.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,8EAA8E;AAC9E,eAAO,MAAM,eAAe,MAAM,CAAC;AAEnC,oFAAoF;AACpF,eAAO,MAAM,oBAAoB,MAAM,CAAC;AAExC;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,OAAO,CAAC;AAE/C;;;;;;;GAOG;AACH,eAAO,MAAM,uCAAuC,OAA6B,CAAC;AAElF,MAAM,MAAM,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAiB7B;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAK7D;AAED,kFAAkF;AAClF,MAAM,WAAW,gBAAgB;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;IAClC,MAAM,EAAE,QAAQ,GAAG,SAAS,GAAG,WAAW,CAAC;IAC3C,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,8EAA8E;IAC9E,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,mGAAmG;IACnG,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAaD,MAAM,WAAW,iBAAiB;IAC9B,4DAA4D;IAC5D,UAAU,EAAE,OAAO,CAAC;IACpB,4EAA4E;IAC5E,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,8CAA8C;IAC9C,aAAa,EAAE,MAAM,CAAC;IACtB,2EAA2E;IAC3E,MAAM,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,kCAAkC,CAAC,GAAG,EAAE,gBAAgB,GAAG,MAAM,CAIhF;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE;IACrC,yEAAyE;IACzE,IAAI,EAAE,SAAS,gBAAgB,EAAE,CAAC;IAClC;;;OAGG;IACH,SAAS,EAAE,SAAS,gBAAgB,EAAE,CAAC;IACvC,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,0FAA0F;IAC1F,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,uBAAuB,EAAE,MAAM,CAAC;IAChC,kDAAkD;IAClD,aAAa,EAAE,MAAM,CAAC;IACtB;;;;;;OAMG;IACH,gBAAgB,EAAE,MAAM,CAAC;IACzB,mEAAmE;IACnE,YAAY,EAAE,OAAO,CAAC;IACtB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC/B,GAAG,iBAAiB,CA+JpB;AAED,uGAAuG;AACvG,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,gBAAgB,EAC1D,GAAG,EAAE,CAAC,EACN,MAAM,EAAE,SAAS,GAAG,SAAS,EAC7B,WAAW,EAAE;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,EACvD,QAAQ,EAAE,OAAO,GAClB,CAAC,GAAG,gBAAgB,CAkBtB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calm user-facing line for fail-closed refusals caused by the engine being
|
|
3
|
+
* temporarily unreachable. States what happened and what to do; deliberately
|
|
4
|
+
* carries no token counts or internals — the numbers belong to the log lines
|
|
5
|
+
* that accompany the throw, not the primary message a user reads.
|
|
6
|
+
*/
|
|
7
|
+
export declare const ENGINE_RECONNECTING_USER_MESSAGE = "Magic Context's engine is reconnecting. Send your message again in a few seconds.";
|
|
8
|
+
export declare class EmergencyFailClosedError extends Error {
|
|
9
|
+
readonly code = "EMERGENCY_FAIL_CLOSED";
|
|
10
|
+
constructor(message: string, options?: {
|
|
11
|
+
cause?: unknown;
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=emergency-fail-closed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emergency-fail-closed.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/emergency-fail-closed.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,gCAAgC,sFAC0C,CAAC;AAExF,qBAAa,wBAAyB,SAAQ,KAAK;IAC/C,QAAQ,CAAC,IAAI,2BAA2B;gBAE5B,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE;CAI7D"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const EMPTY_TASK_OUTPUT_SENTINEL = "<magic-context-empty-task-output>";
|
|
2
|
+
/**
|
|
3
|
+
* Surface a completed native `task` tool result that returned no final text.
|
|
4
|
+
*
|
|
5
|
+
* A subagent can complete with an empty `<task_result>` when its provider
|
|
6
|
+
* emitted reasoning only (or context-fill truncation dropped the final output).
|
|
7
|
+
* OpenCode would otherwise hand the caller a silently-empty result, which is
|
|
8
|
+
* indistinguishable from a tool that legitimately returned nothing. Annotate
|
|
9
|
+
* such outputs with a diagnostic sentinel so the caller can tell the two apart.
|
|
10
|
+
*
|
|
11
|
+
* Only a completed native task with an empty result is touched; non-task tools,
|
|
12
|
+
* non-empty outputs, and non-completed task states are left unchanged. The
|
|
13
|
+
* mutation is done via `Reflect.set` so a frozen output object cannot throw.
|
|
14
|
+
*/
|
|
15
|
+
export declare function annotateEmptyTaskOutput(tool: string, output: unknown): void;
|
|
16
|
+
//# sourceMappingURL=empty-task-output.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"empty-task-output.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/empty-task-output.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,0BAA0B,sCAAsC,CAAC;AAI9E;;;;;;;;;;;;GAYG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,IAAI,CAY3E"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
export type MagicContextEventType = "session.created" | "session.error" | "message.updated" | "message.part.updated" | "message.removed" | "session.compacted" | "session.deleted";
|
|
2
|
+
export type MagicContextEvent = {
|
|
3
|
+
type: MagicContextEventType;
|
|
4
|
+
properties?: unknown;
|
|
5
|
+
};
|
|
6
|
+
export interface SessionCreatedInfo {
|
|
7
|
+
id: string;
|
|
8
|
+
parentID: string;
|
|
9
|
+
directory?: string;
|
|
10
|
+
providerID?: string;
|
|
11
|
+
modelID?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Session title set at create time. Magic Context's own hidden children
|
|
14
|
+
* (historian/dreamer) all use `magic-context-*`
|
|
15
|
+
* titles, so this is the signal used to fully exempt them from the
|
|
16
|
+
* transform + system-prompt injection pipeline.
|
|
17
|
+
*/
|
|
18
|
+
title?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface MessageUpdatedAssistantInfo {
|
|
21
|
+
role: "assistant";
|
|
22
|
+
finish?: string;
|
|
23
|
+
sessionID: string;
|
|
24
|
+
/** OpenCode assistant message id. Undefined only when the event payload
|
|
25
|
+
* doesn't include one (older SDK versions or malformed events). */
|
|
26
|
+
messageID?: string;
|
|
27
|
+
parentID?: string;
|
|
28
|
+
completedAt?: number;
|
|
29
|
+
providerID?: string;
|
|
30
|
+
modelID?: string;
|
|
31
|
+
tokens?: {
|
|
32
|
+
input?: number;
|
|
33
|
+
cache?: {
|
|
34
|
+
read?: number;
|
|
35
|
+
write?: number;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
/** Error attached to the assistant message, if any. OpenCode attaches
|
|
39
|
+
* context-overflow errors here in addition to emitting session.error. */
|
|
40
|
+
error?: unknown;
|
|
41
|
+
}
|
|
42
|
+
export interface MessageUpdatedInfo {
|
|
43
|
+
role: "user" | "assistant" | string;
|
|
44
|
+
sessionID: string;
|
|
45
|
+
messageID?: string;
|
|
46
|
+
finish?: string;
|
|
47
|
+
completedAt?: number;
|
|
48
|
+
}
|
|
49
|
+
export interface SessionErrorInfo {
|
|
50
|
+
sessionID: string;
|
|
51
|
+
error: unknown;
|
|
52
|
+
providerID?: string;
|
|
53
|
+
modelID?: string;
|
|
54
|
+
}
|
|
55
|
+
export interface MessageRemovedInfo {
|
|
56
|
+
sessionID: string;
|
|
57
|
+
messageID: string;
|
|
58
|
+
}
|
|
59
|
+
export declare function getSessionProperties(properties: unknown): {
|
|
60
|
+
info?: unknown;
|
|
61
|
+
sessionID?: string;
|
|
62
|
+
} | undefined;
|
|
63
|
+
export declare function getSessionCreatedInfo(properties: unknown): SessionCreatedInfo | null;
|
|
64
|
+
export declare function getMessageUpdatedAssistantInfo(properties: unknown): MessageUpdatedAssistantInfo | null;
|
|
65
|
+
export declare function getMessageUpdatedInfo(properties: unknown): MessageUpdatedInfo | null;
|
|
66
|
+
/**
|
|
67
|
+
* Extract `session.error` payloads without depending on a specific NamedError
|
|
68
|
+
* variant. OpenCode normally emits only `{ sessionID, error }`, while some
|
|
69
|
+
* provider errors also carry model identity at the top level or in `error.data`.
|
|
70
|
+
*/
|
|
71
|
+
export declare function getSessionErrorInfo(properties: unknown): SessionErrorInfo | null;
|
|
72
|
+
export declare function getMessageRemovedInfo(properties: unknown): MessageRemovedInfo | null;
|
|
73
|
+
//# sourceMappingURL=event-payloads.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-payloads.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/event-payloads.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,qBAAqB,GAC3B,iBAAiB,GACjB,eAAe,GACf,iBAAiB,GACjB,sBAAsB,GACtB,iBAAiB,GACjB,mBAAmB,GACnB,iBAAiB,CAAC;AAExB,MAAM,MAAM,iBAAiB,GAAG;IAC5B,IAAI,EAAE,qBAAqB,CAAC;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,MAAM,WAAW,kBAAkB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,2BAA2B;IACxC,IAAI,EAAE,WAAW,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB;wEACoE;IACpE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE;QACL,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE;YACJ,IAAI,CAAC,EAAE,MAAM,CAAC;YACd,KAAK,CAAC,EAAE,MAAM,CAAC;SAClB,CAAC;KACL,CAAC;IACF;8EAC0E;IAC1E,KAAK,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,kBAAkB;IAC/B,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,MAAM,CAAC;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,gBAAgB;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,kBAAkB;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,oBAAoB,CAChC,UAAU,EAAE,OAAO,GACpB;IAAE,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAUpD;AAED,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,OAAO,GAAG,kBAAkB,GAAG,IAAI,CAmBpF;AAED,wBAAgB,8BAA8B,CAC1C,UAAU,EAAE,OAAO,GACpB,2BAA2B,GAAG,IAAI,CAiCpC;AAED,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,OAAO,GAAG,kBAAkB,GAAG,IAAI,CAmBpF;AAMD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,OAAO,GAAG,gBAAgB,GAAG,IAAI,CAiChF;AAED,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,OAAO,GAAG,kBAAkB,GAAG,IAAI,CAapF"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { type ContextDatabase } from "../../features/magic-context/storage";
|
|
2
|
+
import { escalationBands, MAX_EXECUTE_THRESHOLD } from "../../shared/escalation-bands";
|
|
3
|
+
export { escalationBands, MAX_EXECUTE_THRESHOLD };
|
|
4
|
+
export declare const DEFAULT_CONTEXT_LIMIT = 200000;
|
|
5
|
+
export declare function resolveContextWindowGeometry(providerID: string | undefined, modelID: string | undefined, ctx?: {
|
|
6
|
+
db?: ContextDatabase;
|
|
7
|
+
sessionID?: string;
|
|
8
|
+
}): import("../../shared/window-geometry").WindowGeometryResult | undefined;
|
|
9
|
+
type CacheTtlConfig = string | Record<string, string>;
|
|
10
|
+
/**
|
|
11
|
+
* Resolve the effective context limit for a provider/model pair. By default
|
|
12
|
+
* this returns the output-reserved safe input budget. `reservation: "none"`
|
|
13
|
+
* preserves the same catalog, detected-limit, and fallback resolution while
|
|
14
|
+
* exposing the unreserved window for native-usage display metrics only.
|
|
15
|
+
*/
|
|
16
|
+
export declare function resolveContextLimit(providerID: string | undefined, modelID: string | undefined, ctx?: {
|
|
17
|
+
db?: ContextDatabase;
|
|
18
|
+
sessionID?: string;
|
|
19
|
+
reservation?: "default" | "none";
|
|
20
|
+
}): number;
|
|
21
|
+
/**
|
|
22
|
+
* Like resolveContextLimit, but returns a limit ONLY when it is TRUSTED for the
|
|
23
|
+
* current model, rather than the generic 200K `DEFAULT_CONTEXT_LIMIT`.
|
|
24
|
+
*
|
|
25
|
+
* Resolution precedence is:
|
|
26
|
+
* 1. models.dev or a user provider override.
|
|
27
|
+
* 2. A detected-overflow limit when it is smaller than the models.dev limit,
|
|
28
|
+
* or whenever models.dev has no entry.
|
|
29
|
+
* 3. A sane persisted usage-reported limit when models.dev and overflow
|
|
30
|
+
* detection are both unavailable, but only when its observed model key
|
|
31
|
+
* matches the current model key.
|
|
32
|
+
*
|
|
33
|
+
* The history-budget resolver needs this distinction: deriving the decay budget
|
|
34
|
+
* from a bare 128K guess for an UNKNOWN model would shrink history below what
|
|
35
|
+
* the live-usage back-derivation would yield for a large-context model. So the
|
|
36
|
+
* budget resolver only trusts a real, detected, or model-matched usage-reported
|
|
37
|
+
* limit and otherwise falls back to live-usage. (resolveContextLimit itself must
|
|
38
|
+
* keep returning 128K for pressure math, which needs a positive denominator.)
|
|
39
|
+
*/
|
|
40
|
+
export declare function resolveTrustedContextLimit(providerID: string | undefined, modelID: string | undefined, ctx?: {
|
|
41
|
+
db?: ContextDatabase;
|
|
42
|
+
sessionID?: string;
|
|
43
|
+
}): number | undefined;
|
|
44
|
+
export declare function resolveCacheTtl(cacheTtl: CacheTtlConfig, modelKey: string | undefined): string;
|
|
45
|
+
type ExecuteThresholdConfig = number | {
|
|
46
|
+
default: number;
|
|
47
|
+
[modelKey: string]: number;
|
|
48
|
+
};
|
|
49
|
+
type ExecuteThresholdTokensConfig = {
|
|
50
|
+
default?: number;
|
|
51
|
+
[modelKey: string]: number | undefined;
|
|
52
|
+
} | undefined;
|
|
53
|
+
export interface ExecuteThresholdOptions {
|
|
54
|
+
/** Optional tokens-based threshold config. When matched for the given modelKey,
|
|
55
|
+
* overrides the percentage-based threshold. */
|
|
56
|
+
tokensConfig?: ExecuteThresholdTokensConfig;
|
|
57
|
+
/** Required when `tokensConfig` is provided — used to convert tokens → percentage
|
|
58
|
+
* and to clamp values above 90% × context_limit. */
|
|
59
|
+
contextLimit?: number;
|
|
60
|
+
/** Session ID for warn logs when clamping. If absent, warns to global log. */
|
|
61
|
+
sessionId?: string;
|
|
62
|
+
}
|
|
63
|
+
export type ExecuteThresholdMode = "percentage" | "tokens";
|
|
64
|
+
export interface ExecuteThresholdDetail {
|
|
65
|
+
/** Effective execute threshold as a percentage (0–90). Downstream math keys off this. */
|
|
66
|
+
percentage: number;
|
|
67
|
+
/** Which source was authoritative: tokens config (when matched + valid context) or percentage. */
|
|
68
|
+
mode: ExecuteThresholdMode;
|
|
69
|
+
/** When mode is "tokens", the absolute token value after clamping (≤ 90% × contextLimit). */
|
|
70
|
+
absoluteTokens?: number;
|
|
71
|
+
/** The config key that matched, if any (for display/debugging). `"default"` when default fallback. */
|
|
72
|
+
matchedKey?: string;
|
|
73
|
+
/**
|
|
74
|
+
* True when the user's configured value exceeded the safe cap and was reduced.
|
|
75
|
+
* Tokens mode: configured tokens > 90% × contextLimit. Percentage mode:
|
|
76
|
+
* configured percentage > MAX_EXECUTE_THRESHOLD (90). Display surfaces read this
|
|
77
|
+
* to tell the user their value was clamped instead of silently ignoring it (#241).
|
|
78
|
+
* Only present (true) when a clamp actually happened; absent otherwise.
|
|
79
|
+
*/
|
|
80
|
+
clamped?: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* The raw configured value before clamping — a token count in tokens mode, a
|
|
83
|
+
* percentage in percentage mode. Populated only alongside `clamped` so display
|
|
84
|
+
* surfaces can show the math (e.g. "190,000 > 90% of 128,000").
|
|
85
|
+
*/
|
|
86
|
+
configuredValue?: number;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Single source of truth for execute-threshold resolution. Returns the effective
|
|
90
|
+
* percentage plus which config source was authoritative. Callers that only need
|
|
91
|
+
* the percentage can use `resolveExecuteThreshold` (thin wrapper below); callers
|
|
92
|
+
* that surface the mode to users (`/mmc-status`, TUI, RPC) must use this directly
|
|
93
|
+
* to avoid the "progressive lookup drift" bug where two call sites disagree on
|
|
94
|
+
* whether tokens mode is active.
|
|
95
|
+
*/
|
|
96
|
+
export declare function resolveExecuteThresholdDetail(config: ExecuteThresholdConfig, modelKey: string | undefined, fallback: number, options?: ExecuteThresholdOptions): ExecuteThresholdDetail;
|
|
97
|
+
/**
|
|
98
|
+
* Backward-compatible wrapper around `resolveExecuteThresholdDetail`.
|
|
99
|
+
* Use the detail version when you also need the mode or absolute token value.
|
|
100
|
+
*/
|
|
101
|
+
export declare function resolveExecuteThreshold(config: ExecuteThresholdConfig, modelKey: string | undefined, fallback: number, options?: ExecuteThresholdOptions): number;
|
|
102
|
+
export declare function resolveModelKey(providerID: string | undefined, modelID: string | undefined): string | undefined;
|
|
103
|
+
export declare function resolveSessionId(properties: {
|
|
104
|
+
info?: unknown;
|
|
105
|
+
sessionID?: string;
|
|
106
|
+
} | undefined): string | undefined;
|
|
107
|
+
/**
|
|
108
|
+
* Identify the configured history fraction and selected execute threshold used
|
|
109
|
+
* to size history. Catalog refreshes and accepted-input measurements can change
|
|
110
|
+
* the available window without a user config edit, so they must not invalidate
|
|
111
|
+
* the cached m[0] prefix. Actual rendering still budgets against that live window.
|
|
112
|
+
*/
|
|
113
|
+
export declare function historyBudgetPolicyIdentity(historyBudgetPercentage: number | undefined, executeThresholdPercentage: ExecuteThresholdConfig | undefined, modelKey: string | undefined, executeThresholdTokens?: ExecuteThresholdTokensConfig): string;
|
|
114
|
+
//# sourceMappingURL=event-resolvers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-resolvers.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/event-resolvers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,eAAe,EAAqB,MAAM,sCAAsC,CAAC;AAK/F,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAWvF,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,CAAC;AAClD,eAAO,MAAM,qBAAqB,SAAU,CAAC;AA8D7C,wBAAgB,4BAA4B,CACxC,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,GAAG,CAAC,EAAE;IAAE,EAAE,CAAC,EAAE,eAAe,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,2EA2BrD;AAED,KAAK,cAAc,GAAG,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEtD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAC/B,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,GAAG,CAAC,EAAE;IACF,EAAE,CAAC,EAAE,eAAe,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;CACpC,GACF,MAAM,CAuCR;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,0BAA0B,CACtC,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,GAAG,CAAC,EAAE;IAAE,EAAE,CAAC,EAAE,eAAe,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GACnD,MAAM,GAAG,SAAS,CA2CpB;AAED,wBAAgB,eAAe,CAAC,QAAQ,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAE9F;AAED,KAAK,sBAAsB,GAAG,MAAM,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAAC;AACvF,KAAK,4BAA4B,GAC3B;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;CAAE,GAC5D,SAAS,CAAC;AAEhB,MAAM,WAAW,uBAAuB;IACpC;oDACgD;IAChD,YAAY,CAAC,EAAE,4BAA4B,CAAC;IAC5C;yDACqD;IACrD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,8EAA8E;IAC9E,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,MAAM,oBAAoB,GAAG,YAAY,GAAG,QAAQ,CAAC;AAE3D,MAAM,WAAW,sBAAsB;IACnC,yFAAyF;IACzF,UAAU,EAAE,MAAM,CAAC;IACnB,kGAAkG;IAClG,IAAI,EAAE,oBAAoB,CAAC;IAC3B,6FAA6F;IAC7F,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,sGAAsG;IACtG,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B;AAiDD;;;;;;;GAOG;AACH,wBAAgB,6BAA6B,CACzC,MAAM,EAAE,sBAAsB,EAC9B,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,uBAAuB,GAClC,sBAAsB,CA4GxB;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CACnC,MAAM,EAAE,sBAAsB,EAC9B,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,uBAAuB,GAClC,MAAM,CAER;AA2BD,wBAAgB,eAAe,CAC3B,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,OAAO,EAAE,MAAM,GAAG,SAAS,GAC5B,MAAM,GAAG,SAAS,CAMpB;AAED,wBAAgB,gBAAgB,CAC5B,UAAU,EAAE;IAAE,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,GAC/D,MAAM,GAAG,SAAS,CAmBpB;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CACvC,uBAAuB,EAAE,MAAM,GAAG,SAAS,EAC3C,0BAA0B,EAAE,sBAAsB,GAAG,SAAS,EAC9D,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,sBAAsB,CAAC,EAAE,4BAA4B,GACtD,MAAM,CAYR"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execute-flush.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/execute-flush.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEpD,wBAAgB,YAAY,CAAC,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CA0BpE"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { MessageLike } from "./tag-messages";
|
|
2
|
+
export interface MessageTokenEstimate {
|
|
3
|
+
conversation: number;
|
|
4
|
+
toolCall: number;
|
|
5
|
+
}
|
|
6
|
+
/** Describe the final three post-transform messages without serializing content. */
|
|
7
|
+
export declare function describeFinalWireTail(messages: readonly MessageLike[]): string;
|
|
8
|
+
/** Count the token-bearing fields in the message representation sent to OpenCode. */
|
|
9
|
+
export declare function estimateMessageTokens(message: MessageLike): MessageTokenEstimate;
|
|
10
|
+
/**
|
|
11
|
+
* The UTF-8 bytes of the fields `messages` put on the provider wire, the same
|
|
12
|
+
* fields `estimateMessageTokens` counts; an image counts as `bytesPerToken` bytes
|
|
13
|
+
* per estimated image token, since the provider bills it by size, not by its
|
|
14
|
+
* base64 text. Stops as soon as the sum exceeds `abortAboveBytes`. Null when a
|
|
15
|
+
* field cannot be serialized.
|
|
16
|
+
*/
|
|
17
|
+
export declare function wireContentBytes(messages: readonly MessageLike[], abortAboveBytes: number, bytesPerToken: number): {
|
|
18
|
+
bytes: number;
|
|
19
|
+
aborted: boolean;
|
|
20
|
+
} | null;
|
|
21
|
+
export interface FinalWireTokenEstimateInput {
|
|
22
|
+
messages: readonly MessageLike[];
|
|
23
|
+
systemPromptTokens: number;
|
|
24
|
+
providerID: string | undefined;
|
|
25
|
+
modelID: string | undefined;
|
|
26
|
+
agentName: string | undefined;
|
|
27
|
+
}
|
|
28
|
+
export interface FinalWireTokenEstimate {
|
|
29
|
+
tokens: number;
|
|
30
|
+
trusted: boolean;
|
|
31
|
+
messageTokens: MessageTokenEstimate;
|
|
32
|
+
systemTokens: number;
|
|
33
|
+
toolDefinitionTokens: number | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* True when the tool-definition figure is this route's own measurement. When
|
|
36
|
+
* false, `toolDefinitionTokens` is either unknown or an upper envelope taken
|
|
37
|
+
* from the largest tool set measured on any route.
|
|
38
|
+
*/
|
|
39
|
+
toolDefinitionsMeasured?: boolean;
|
|
40
|
+
/** Unscaled transform-array/system/tool measurement; provider framing is unmeasured. */
|
|
41
|
+
rawTokens?: number;
|
|
42
|
+
rawComponents?: {
|
|
43
|
+
system: number;
|
|
44
|
+
tools: number;
|
|
45
|
+
prose: number;
|
|
46
|
+
};
|
|
47
|
+
completeness?: "complete" | "partial";
|
|
48
|
+
componentsComplete?: boolean;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Estimate the returned transform array plus observed system and tool definitions.
|
|
52
|
+
* This is not exact provider tokenization: provider framing remains unmeasured.
|
|
53
|
+
* Fit callers must require trusted, not merely compare a numeric partial estimate.
|
|
54
|
+
*/
|
|
55
|
+
export declare function estimateFinalWireInputTokens(input: FinalWireTokenEstimateInput): FinalWireTokenEstimate;
|
|
56
|
+
//# sourceMappingURL=final-wire-token-estimate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"final-wire-token-estimate.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/final-wire-token-estimate.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGlD,MAAM,WAAW,oBAAoB;IACjC,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;CACpB;AAwBD,oFAAoF;AACpF,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,SAAS,WAAW,EAAE,GAAG,MAAM,CAS9E;AA4GD,qFAAqF;AACrF,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,WAAW,GAAG,oBAAoB,CAWhF;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC5B,QAAQ,EAAE,SAAS,WAAW,EAAE,EAChC,eAAe,EAAE,MAAM,EACvB,aAAa,EAAE,MAAM,GACtB;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,CAkB5C;AAED,MAAM,WAAW,2BAA2B;IACxC,QAAQ,EAAE,SAAS,WAAW,EAAE,CAAC;IACjC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;CACjC;AAED,MAAM,WAAW,sBAAsB;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,EAAE,oBAAoB,CAAC;IACpC,YAAY,EAAE,MAAM,CAAC;IACrB,oBAAoB,EAAE,MAAM,GAAG,SAAS,CAAC;IACzC;;;;OAIG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,wFAAwF;IACxF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IACjE,YAAY,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IACtC,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CACxC,KAAK,EAAE,2BAA2B,GACnC,sBAAsB,CAkExB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fold-execution-gate.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/fold-execution-gate.ts"],"names":[],"mappings":"AAAA,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,GAAG,OAAO,CAErF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format-bytes.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/format-bytes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { ContextDatabase } from "../../features/magic-context/storage";
|
|
2
|
+
import type { TagEntry } from "../../features/magic-context/types";
|
|
3
|
+
import { type CavemanCleanupConfig } from "./caveman-cleanup";
|
|
4
|
+
import type { DroppedTokenReduction } from "./dropped-token-estimate";
|
|
5
|
+
import type { MessageLike, TagTarget } from "./tag-messages";
|
|
6
|
+
export declare function applyHeuristicCleanup(sessionId: string, db: ContextDatabase, targets: Map<number, TagTarget>, messageTagNumbers: Map<MessageLike, number>, config: {
|
|
7
|
+
/** Exact token-window membership in tag-number space. */
|
|
8
|
+
protectedTagNumbers: ReadonlySet<number>;
|
|
9
|
+
/**
|
|
10
|
+
* Exact token-window cutoff in tag-number space. A null cutoff means the
|
|
11
|
+
* persisted tool population is empty and applies no tag-number threshold.
|
|
12
|
+
*/
|
|
13
|
+
protectedCutoff: number | null;
|
|
14
|
+
/**
|
|
15
|
+
* Tiered target-headroom emergency drop. Provided only on force-materialization
|
|
16
|
+
* passes at or above the derived force band; undefined on routine execute
|
|
17
|
+
* passes, which do not perform age-based tool drops. When
|
|
18
|
+
* present, the emergency drop runs before dedup/injection-strip.
|
|
19
|
+
*/
|
|
20
|
+
emergency?: {
|
|
21
|
+
currentTotalInputTokens: number;
|
|
22
|
+
ceilingTokens: number;
|
|
23
|
+
usagePercentage?: number;
|
|
24
|
+
/** Another mutation already rewrites the cached prefix on this pass. */
|
|
25
|
+
passAlreadyPriced?: boolean;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Whether ordinary deduplication, injection stripping, and caveman
|
|
29
|
+
* compression may first-apply on this pass. Emergency selection remains
|
|
30
|
+
* independent so a force-band edge can still reclaim enough headroom.
|
|
31
|
+
*/
|
|
32
|
+
routine?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Age-tier caveman text compression settings. Caller is responsible
|
|
35
|
+
* for forwarding this only for primary sessions where caveman is enabled.
|
|
36
|
+
*/
|
|
37
|
+
caveman?: CavemanCleanupConfig;
|
|
38
|
+
}, preloadedTags?: TagEntry[]): {
|
|
39
|
+
droppedTools: number;
|
|
40
|
+
deduplicatedTools: number;
|
|
41
|
+
droppedInjections: number;
|
|
42
|
+
emergencyDroppedTools: number;
|
|
43
|
+
emergencyReclaimedTokens: number;
|
|
44
|
+
compressedTextTags: number;
|
|
45
|
+
mutatedTextTags: number;
|
|
46
|
+
droppedTokenReductions: DroppedTokenReduction[];
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=heuristic-cleanup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"heuristic-cleanup.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/heuristic-cleanup.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAY5E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAGnE,OAAO,EAAuB,KAAK,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACnF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAQtE,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AA6B7D,wBAAgB,qBAAqB,CACjC,SAAS,EAAE,MAAM,EACjB,EAAE,EAAE,eAAe,EACnB,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,EAC/B,iBAAiB,EAAE,GAAG,CAAC,WAAW,EAAE,MAAM,CAAC,EAC3C,MAAM,EAAE;IACJ,yDAAyD;IACzD,mBAAmB,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACzC;;;OAGG;IACH,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B;;;;;OAKG;IACH,SAAS,CAAC,EAAE;QACR,uBAAuB,EAAE,MAAM,CAAC;QAChC,aAAa,EAAE,MAAM,CAAC;QACtB,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,wEAAwE;QACxE,iBAAiB,CAAC,EAAE,OAAO,CAAC;KAC/B,CAAC;IACF;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,oBAAoB,CAAC;CAClC,EACD,aAAa,CAAC,EAAE,QAAQ,EAAE,GAC3B;IACC,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,wBAAwB,EAAE,MAAM,CAAC;IACjC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,sBAAsB,EAAE,qBAAqB,EAAE,CAAC;CACnD,CAwSA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const HISTORIAN_NO_FIRE_CAUSES: readonly ["in_flight", "cheap_skip", "no_new_raw_history", "raw_history_unavailable", "redundancy_skip", "protected_tail", "below_proactive_floor", "below_min_chunk", "drain_budget", "missing_boundary_snapshot", "stale_boundary_snapshot", "invalid_chunk_coverage", "credential_unavailable", "provider_unknown", "model_unknown", "runner_resolution_failed"];
|
|
2
|
+
export type HistorianNoFireCause = (typeof HISTORIAN_NO_FIRE_CAUSES)[number];
|
|
3
|
+
export declare const RUNNER_REFUSAL_CANONICAL_CAUSES: readonly ["credential_unavailable", "provider_unknown", "model_unknown", "runner_resolution_failed"];
|
|
4
|
+
export type RunnerRefusalCanonicalCause = (typeof RUNNER_REFUSAL_CANONICAL_CAUSES)[number];
|
|
5
|
+
//# sourceMappingURL=historian-no-fire-cause.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"historian-no-fire-cause.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/historian-no-fire-cause.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB,qWAiB3B,CAAC;AAEX,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7E,eAAO,MAAM,+BAA+B,sGAKQ,CAAC;AAErD,MAAM,MAAM,2BAA2B,GAAG,CAAC,OAAO,+BAA+B,CAAC,CAAC,MAAM,CAAC,CAAC"}
|