@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":"tool-owner-backfill.d.ts","sourceRoot":"","sources":["../../../src/features/magic-context/tool-owner-backfill.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAKH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAiBpD,UAAU,gBAAgB;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED,UAAU,cAAc;IACpB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,wBAAwB,EAAE,MAAM,CAAC;IACjC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;CACtB;AAqBD;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,QAAQ,GAAG,cAAc,CAgEjE;AAED;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CAAC,EAAE,EAAE,QAAQ,GAAG,OAAO,CAkB/D;AA4FD,oEAAoE;AACpE,wBAAgB,2BAA2B,CAAC,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAEjF;AAiPD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI,CAO1F"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { Database } from "../../shared/sqlite";
|
|
2
|
+
export type TransformDecisionHarness = "opencode" | "pi";
|
|
3
|
+
export type TransformSchedulerDecision = "execute" | "defer" | "error" | "need_full_sync" | "parked" | "passthrough" | "unknown";
|
|
4
|
+
/**
|
|
5
|
+
* Max transform_decisions rows kept per (session_id, harness). Pruned newest-first
|
|
6
|
+
* after every insert so a long session's cache-affecting passes never grow this
|
|
7
|
+
* telemetry table without bound (the dashboard loads all matching rows for cause
|
|
8
|
+
* attribution).
|
|
9
|
+
*/
|
|
10
|
+
export declare const TRANSFORM_DECISIONS_RETENTION = 2000;
|
|
11
|
+
export type CanonicalMaterializeReason = "system_hash" | "model_change" | "ttl_idle" | "explicit_flush" | "max_mutation_id" | "first_render" | "pressure_refold" | "upgrade_state" | "cached_m1_missing" | "project_change" | "compartment_render_epoch" | "m1_delta" | "ttl_expiry" | "epoch_change" | "coverage_fold" | "profile_transition" | "host_compaction";
|
|
12
|
+
export interface PendingTransformDecision {
|
|
13
|
+
tsMs: number;
|
|
14
|
+
decision: TransformSchedulerDecision;
|
|
15
|
+
materialized: boolean;
|
|
16
|
+
materializeReason: CanonicalMaterializeReason | null;
|
|
17
|
+
/**
|
|
18
|
+
* `transform_decisions.system_hash_prev`: cached operand from a system-hash
|
|
19
|
+
* comparison. NULL means this pass made no system-hash comparison; an empty
|
|
20
|
+
* string is a real compared cached value and must remain distinct from NULL.
|
|
21
|
+
*/
|
|
22
|
+
systemHashPrev: string | null;
|
|
23
|
+
/**
|
|
24
|
+
* `transform_decisions.system_hash_new`: live operand from a system-hash
|
|
25
|
+
* comparison. NULL means this pass made no system-hash comparison.
|
|
26
|
+
*/
|
|
27
|
+
systemHashNew: string | null;
|
|
28
|
+
/**
|
|
29
|
+
* `transform_decisions.m0_model_key_prev`: cached canonical model-key operand.
|
|
30
|
+
* NULL means this pass made no model-key comparison; an empty string is a real
|
|
31
|
+
* compared cached value and must remain distinct from NULL.
|
|
32
|
+
*/
|
|
33
|
+
m0ModelKeyPrev: string | null;
|
|
34
|
+
/**
|
|
35
|
+
* `transform_decisions.m0_model_key_new`: live canonical model-key operand.
|
|
36
|
+
* NULL means this pass made no model-key comparison.
|
|
37
|
+
*/
|
|
38
|
+
m0ModelKeyNew: string | null;
|
|
39
|
+
/**
|
|
40
|
+
* `transform_decisions.m0_tool_set_hash_prev`: cached tool-set operand from
|
|
41
|
+
* an observed comparison. NULL means this pass made no tool-set comparison;
|
|
42
|
+
* an empty string is a real compared cached value.
|
|
43
|
+
*/
|
|
44
|
+
m0ToolSetHashPrev?: string | null;
|
|
45
|
+
/**
|
|
46
|
+
* `transform_decisions.m0_tool_set_hash_new`: live tool-set operand from an
|
|
47
|
+
* observed comparison. NULL means this pass made no tool-set comparison.
|
|
48
|
+
*/
|
|
49
|
+
m0ToolSetHashNew?: string | null;
|
|
50
|
+
emergency: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Nonnegative estimate persisted as `transform_decisions.dropped_tokens` for
|
|
53
|
+
* diagnostics only. It does not drive budgeting or scheduler decisions.
|
|
54
|
+
*/
|
|
55
|
+
droppedTokens: number;
|
|
56
|
+
droppedCount: number;
|
|
57
|
+
inputTokens: number;
|
|
58
|
+
bustedThisPass: boolean;
|
|
59
|
+
}
|
|
60
|
+
interface TransformDecisionRow extends PendingTransformDecision {
|
|
61
|
+
sessionId: string;
|
|
62
|
+
harness: TransformDecisionHarness;
|
|
63
|
+
messageId: string;
|
|
64
|
+
}
|
|
65
|
+
interface PendingPiTransformDecision extends PendingTransformDecision {
|
|
66
|
+
snapshotNewestAssistantEntryId: string | null;
|
|
67
|
+
}
|
|
68
|
+
type TransformDecisionWriter = (dbPath: string, row: TransformDecisionRow) => void;
|
|
69
|
+
export declare function normalizeMaterializeReason(harness: TransformDecisionHarness, reason: string | null | undefined, rematerialized: boolean): CanonicalMaterializeReason | null;
|
|
70
|
+
/**
|
|
71
|
+
* Stage one Rust pass for the assistant message that will receive its provider usage row.
|
|
72
|
+
* The transform runs before that assistant exists, so binding to the newest input message
|
|
73
|
+
* attributes a multi-step pass to the previous step. The ordinary OpenCode event path binds
|
|
74
|
+
* this pending record to the next completed assistant id.
|
|
75
|
+
*/
|
|
76
|
+
export declare function writeRustTransformDecision(args: {
|
|
77
|
+
sessionId: string;
|
|
78
|
+
decision: string;
|
|
79
|
+
materializeReason: string | null;
|
|
80
|
+
inputTokens: number;
|
|
81
|
+
tsMs?: number;
|
|
82
|
+
}): void;
|
|
83
|
+
export declare function clearOpenCodePendingTransformDecision(sessionId: string): void;
|
|
84
|
+
export declare function clearTransformDecisionSession(sessionId: string): void;
|
|
85
|
+
export declare function recordPendingTransformDecision(sessionId: string, decision: PendingTransformDecision): void;
|
|
86
|
+
export declare function recordPendingPiTransformDecision(sessionId: string, decision: PendingTransformDecision, snapshotNewestAssistantEntryId: string | null): void;
|
|
87
|
+
export declare function scheduleOpenCodeTransformDecisionWrite(args: {
|
|
88
|
+
db: Database;
|
|
89
|
+
sessionId: string;
|
|
90
|
+
messageId: string;
|
|
91
|
+
inputTokens: number;
|
|
92
|
+
}): boolean;
|
|
93
|
+
export declare function findNewestPiAssistantEntryId(entries: readonly unknown[] | null | undefined): string | null;
|
|
94
|
+
export declare function schedulePiTransformDecisionResolve(args: {
|
|
95
|
+
db: Database;
|
|
96
|
+
sessionId: string;
|
|
97
|
+
branchEntries: readonly unknown[] | null;
|
|
98
|
+
}): boolean;
|
|
99
|
+
declare function findNewestPiAssistantEntryIdAfter(entries: readonly unknown[] | null, snapshotNewestAssistantEntryId: string | null): string | null;
|
|
100
|
+
export declare const __test: {
|
|
101
|
+
getPending(sessionId: string): PendingTransformDecision | undefined;
|
|
102
|
+
getPendingPi(sessionId: string): PendingPiTransformDecision | undefined;
|
|
103
|
+
reset(): void;
|
|
104
|
+
setWriterForTests(writer: TransformDecisionWriter | null): void;
|
|
105
|
+
setRetentionForTests(cap: number | null): void;
|
|
106
|
+
writeRow(dbPath: string, row: TransformDecisionRow): void;
|
|
107
|
+
findNewestPiAssistantEntryIdAfter: typeof findNewestPiAssistantEntryIdAfter;
|
|
108
|
+
};
|
|
109
|
+
export {};
|
|
110
|
+
//# sourceMappingURL=transform-decision-log.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transform-decision-log.d.ts","sourceRoot":"","sources":["../../../src/features/magic-context/transform-decision-log.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAK/C,MAAM,MAAM,wBAAwB,GAAG,UAAU,GAAG,IAAI,CAAC;AACzD,MAAM,MAAM,0BAA0B,GAChC,SAAS,GACT,OAAO,GACP,OAAO,GACP,gBAAgB,GAChB,QAAQ,GACR,aAAa,GACb,SAAS,CAAC;AAEhB;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,OAAO,CAAC;AAElD,MAAM,MAAM,0BAA0B,GAChC,aAAa,GACb,cAAc,GACd,UAAU,GACV,gBAAgB,GAChB,iBAAiB,GACjB,cAAc,GACd,iBAAiB,GACjB,eAAe,GACf,mBAAmB,GACnB,gBAAgB,GAChB,0BAA0B,GAC1B,UAAU,GACV,YAAY,GACZ,cAAc,GACd,eAAe,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MAAM,GAAG,wBAAwB,GAAG,SAAS;4BAG3C,MAAM,GAAG,0BAA0B,GAAG,SAAS;aAG9D,IAAI;8BAQa,uBAAuB,GAAG,IAAI,GAAG,IAAI;8BAGrC,MAAM,GAAG,IAAI,GAAG,IAAI;qBAG7B,MAAM,OAAO,oBAAoB,GAAG,IAAI;;CAI5D,CAAC"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
export interface TagEntry {
|
|
2
|
+
tagNumber: number;
|
|
3
|
+
messageId: string;
|
|
4
|
+
type: "message" | "tool" | "file";
|
|
5
|
+
status: "active" | "dropped" | "compacted";
|
|
6
|
+
/**
|
|
7
|
+
* How a dropped tool tag is rendered on every replay pass (frozen at drop
|
|
8
|
+
* time, re-derived deterministically from the original wire part each pass):
|
|
9
|
+
* - "full": the whole tool call is removed from the transcript.
|
|
10
|
+
* - "skeleton_real": keep the tool_use call with its REAL arguments,
|
|
11
|
+
* output -> [dropped N]. Used for small inputs dropped inside the
|
|
12
|
+
* newest-call window and for the call whose result ends the request.
|
|
13
|
+
* - "truncated": legacy skeleton; keep the tool_use call, output ->
|
|
14
|
+
* [dropped N], arguments replaced by the `{"dropped": …}` marker. No
|
|
15
|
+
* longer written by new drops; existing tags replay it until a HARD fold
|
|
16
|
+
* converts them to "skeleton_real" or "full".
|
|
17
|
+
* - "edit_marker": like "truncated" but for an edit/write superseded by a
|
|
18
|
+
* later edit to the same file; keep the filePath verbatim and a short
|
|
19
|
+
* region-hint prefix of the diff, so the agent still sees WHICH file and
|
|
20
|
+
* region it edited. Only produced when the smart_drops config is on.
|
|
21
|
+
*/
|
|
22
|
+
dropMode: "full" | "truncated" | "skeleton_real" | "skeleton_stripped" | "edit_marker" | "edit_marker_stripped";
|
|
23
|
+
toolName: string | null;
|
|
24
|
+
inputByteSize: number;
|
|
25
|
+
byteSize: number;
|
|
26
|
+
reasoningByteSize: number;
|
|
27
|
+
sessionId: string;
|
|
28
|
+
/**
|
|
29
|
+
* Caveman compression depth applied to this tag's text part. 0 = none,
|
|
30
|
+
* 1 = lite, 2 = full, 3 = ultra. Only meaningful for `type: "message"`;
|
|
31
|
+
* tool/file tags stay at 0. Used by experimental age-tier caveman
|
|
32
|
+
* heuristic to avoid re-compressing text that already matches the
|
|
33
|
+
* target depth for its age band.
|
|
34
|
+
*/
|
|
35
|
+
cavemanDepth: number;
|
|
36
|
+
/**
|
|
37
|
+
* For `type: "tool"` tags: the assistant message id where the
|
|
38
|
+
* underlying tool call was invoked. Identity for a tool tag is the
|
|
39
|
+
* triple `(sessionId, messageId/callID, toolOwnerMessageId)` —
|
|
40
|
+
* including this field disambiguates collisions when OpenCode's
|
|
41
|
+
* per-turn callID counter produces the same id across turns.
|
|
42
|
+
*
|
|
43
|
+
* NULL on:
|
|
44
|
+
* - all `type: "message"` and `type: "file"` tags (not applicable)
|
|
45
|
+
* - legacy tool tags written before plugin v0.16.x (the
|
|
46
|
+
* tag-owner-fix migration v10). The runtime lazily adopts these
|
|
47
|
+
* orphan rows on first observation; backfill populates them at
|
|
48
|
+
* plugin startup against the OpenCode DB.
|
|
49
|
+
*
|
|
50
|
+
* See plan v3.3.1 in `.alfonso/plans/tag-owner-fix-plan.md`.
|
|
51
|
+
*/
|
|
52
|
+
toolOwnerMessageId: string | null;
|
|
53
|
+
}
|
|
54
|
+
export interface PendingOp {
|
|
55
|
+
id: number;
|
|
56
|
+
sessionId: string;
|
|
57
|
+
tagId: number;
|
|
58
|
+
operation: "drop";
|
|
59
|
+
queuedAt: number;
|
|
60
|
+
}
|
|
61
|
+
export interface SessionMeta {
|
|
62
|
+
sessionId: string;
|
|
63
|
+
lastResponseTime: number;
|
|
64
|
+
cacheTtl: string;
|
|
65
|
+
counter: number;
|
|
66
|
+
lastNudgeTokens: number;
|
|
67
|
+
lastNudgeBand: "far" | "near" | "urgent" | "critical" | null;
|
|
68
|
+
lastTransformError: string | null;
|
|
69
|
+
isSubagent: boolean;
|
|
70
|
+
lastContextPercentage: number;
|
|
71
|
+
lastInputTokens: number;
|
|
72
|
+
observedSafeInputTokens: number;
|
|
73
|
+
cacheAlertSent: boolean;
|
|
74
|
+
timesExecuteThresholdReached: number;
|
|
75
|
+
compartmentInProgress: boolean;
|
|
76
|
+
systemPromptHash: string;
|
|
77
|
+
systemPromptTokens: number;
|
|
78
|
+
conversationTokens: number;
|
|
79
|
+
toolCallTokens: number;
|
|
80
|
+
clearedReasoningThroughTag: number;
|
|
81
|
+
toolReclaimWatermark: number;
|
|
82
|
+
lastTodoState: string;
|
|
83
|
+
cachedM0Bytes: Buffer | null;
|
|
84
|
+
/** Frozen image payload paired atomically with cachedM0Bytes. */
|
|
85
|
+
cachedM0MuralDataUrl: string | null;
|
|
86
|
+
cachedM0MuralHash: string | null;
|
|
87
|
+
cachedM1Bytes: Buffer | null;
|
|
88
|
+
cachedM0ProjectMemoryEpoch: number | null;
|
|
89
|
+
cachedM0WorkspaceFingerprint: string | null;
|
|
90
|
+
cachedM0ProjectUserProfileVersion: number | null;
|
|
91
|
+
cachedM0MaxCompartmentSeq: number | null;
|
|
92
|
+
cachedM0MaxMemoryId: number | null;
|
|
93
|
+
/**
|
|
94
|
+
* Pi message stable-id scheme version (Pi-only; OpenCode ignores it).
|
|
95
|
+
* NULL/0 = legacy index-based `pi-msg-*` ids; >=1 = real-SessionEntry-id
|
|
96
|
+
* scheme. Drives the one-time forced execute+materialize cutover when a
|
|
97
|
+
* session's stored scheme is below PI_STABLE_ID_SCHEME.
|
|
98
|
+
*/
|
|
99
|
+
piStableIdScheme: number | null;
|
|
100
|
+
cachedM0MaxMutationId: number | null;
|
|
101
|
+
cachedM0MaxMemoryMutationId: number | null;
|
|
102
|
+
cachedM0ProjectDocsHash: string | null;
|
|
103
|
+
cachedM0MaterializedAt: number | null;
|
|
104
|
+
cachedM0SessionFactsVersion: number | null;
|
|
105
|
+
cachedM0UpgradeState: string | null;
|
|
106
|
+
/** HARD-bust markers: provider-side cache-eviction signals (system/tools/model). */
|
|
107
|
+
cachedM0SystemHash: string | null;
|
|
108
|
+
cachedM0ToolSetHash: string | null;
|
|
109
|
+
cachedM0ModelKey: string | null;
|
|
110
|
+
/** Pi-only HARD marker: project identity captured in the cached m[0] baseline. */
|
|
111
|
+
cachedM0ProjectIdentity: string | null;
|
|
112
|
+
lastObservedModelKey: string | null;
|
|
113
|
+
lastUsageContextLimit: number;
|
|
114
|
+
priorBoundaryOrdinal: number;
|
|
115
|
+
protectedTailPolicyVersion: number;
|
|
116
|
+
protectedTailDrainWindowStartedAt: number;
|
|
117
|
+
protectedTailDrainTokens: number;
|
|
118
|
+
recoveryNoEligibleHeadCount: number;
|
|
119
|
+
forceEmergencyBypassWindowStart: number;
|
|
120
|
+
forceEmergencyBypassUsed: number;
|
|
121
|
+
/** Set only after an explicit OpenCode dialog choice; keeps the fresh dialog dismissed. */
|
|
122
|
+
upgradeRemindedAt: number | null;
|
|
123
|
+
/** Most recent push reminder delivery, used for the bounded re-notification cooldown. */
|
|
124
|
+
upgradeReminderLastSentAt: number | null;
|
|
125
|
+
/** Total delivered upgrade reminders; the hard cap prevents an endless nag loop. */
|
|
126
|
+
upgradeReminderCount: number;
|
|
127
|
+
}
|
|
128
|
+
export type SchedulerDecision = "execute" | "defer";
|
|
129
|
+
export interface ContextUsage {
|
|
130
|
+
percentage: number;
|
|
131
|
+
inputTokens: number;
|
|
132
|
+
}
|
|
133
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/features/magic-context/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;IAClC,MAAM,EAAE,QAAQ,GAAG,SAAS,GAAG,WAAW,CAAC;IAC3C;;;;;;;;;;;;;;;OAeG;IACH,QAAQ,EACF,MAAM,GACN,WAAW,GAC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,CAAC;IACpC,+BAA+B,EAAE,MAAM,CAAC;IACxC,wBAAwB,EAAE,MAAM,CAAC;IACjC,2FAA2F;IAC3F,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,yFAAyF;IACzF,yBAAyB,EAAE,MAAM,GAAG,IAAI,CAAC;IACzC,oFAAoF;IACpF,oBAAoB,EAAE,MAAM,CAAC;CAChC;AAED,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,OAAO,CAAC;AAEpD,MAAM,WAAW,YAAY;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACvB"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { ContextLimitProvenance } from "../../shared/context-limit-provenance";
|
|
2
|
+
export declare const WINDOW_REPORTS_ROTATION_BYTES: number;
|
|
3
|
+
/**
|
|
4
|
+
* Fusiform's full-catalog dual-detector admit sweep (pm_d3e23fcd, 2026-08-13:
|
|
5
|
+
* 125 providers / 5,680 models whose catalogs carry other vendors' models).
|
|
6
|
+
* An ADMIT list, not a classification — membership warrants
|
|
7
|
+
* `path_may_forward: true` at capture; absence clears nobody (a provider
|
|
8
|
+
* using an id convention neither detector knows is silently missing here),
|
|
9
|
+
* which is why the emitter never writes `false`: the report schema pins
|
|
10
|
+
* absent = unknown routing (refuses promotion, same as true), while an
|
|
11
|
+
* explicit false would PERMIT promotion — a claim this set structurally
|
|
12
|
+
* cannot support.
|
|
13
|
+
*
|
|
14
|
+
* `ollama-cloud` is deliberately EXCLUDED: the detectors admit it (it
|
|
15
|
+
* carries glm/deepseek/kimi weights) but it imposes its OWN wall from its
|
|
16
|
+
* own serving stack — and this field marks whose-wall-might-fire, not
|
|
17
|
+
* who-carries-whose-models. Other own-wall gateways may hide in this list;
|
|
18
|
+
* only per-cell evidence distinguishes them, and Fusiform's adjudicator
|
|
19
|
+
* refuses promotion for every admitted provider regardless, so a wrong
|
|
20
|
+
* `true` here degrades toward refusal, never toward a wrong mint.
|
|
21
|
+
*/
|
|
22
|
+
export declare const FORWARDING_PROVIDER_IDS: ReadonlySet<string>;
|
|
23
|
+
export interface WindowReport {
|
|
24
|
+
provider_id?: string;
|
|
25
|
+
model_id?: string;
|
|
26
|
+
access_path: "api";
|
|
27
|
+
status?: number;
|
|
28
|
+
matched_pattern?: string;
|
|
29
|
+
extracted_limit?: number;
|
|
30
|
+
extracted_limit_units?: "provider";
|
|
31
|
+
attempted_tokens?: number;
|
|
32
|
+
attempted_tokens_units?: "estimate";
|
|
33
|
+
geometry: "prompt_only" | "combined" | "unknown";
|
|
34
|
+
observed_at_ms: number;
|
|
35
|
+
largest_success?: number;
|
|
36
|
+
largest_success_units?: "estimate";
|
|
37
|
+
/**
|
|
38
|
+
* Emitted ONLY as `true` (provider is a known forwarder) or omitted
|
|
39
|
+
* (unknown routing — refuses promotion by the schema's absent rule).
|
|
40
|
+
* Never `false`: this reporter has no evidence basis for asserting a
|
|
41
|
+
* path cannot forward, and explicit false is the one value that would
|
|
42
|
+
* permit promoting a measured report at a forwarded key.
|
|
43
|
+
*/
|
|
44
|
+
path_may_forward?: true;
|
|
45
|
+
/** Observed routing evidence only; never inferred from provider configuration. */
|
|
46
|
+
served_by_hint?: string;
|
|
47
|
+
}
|
|
48
|
+
export interface AppendWindowReportInput {
|
|
49
|
+
db: import("../../shared/sqlite").Database;
|
|
50
|
+
providerID?: string;
|
|
51
|
+
modelID?: string;
|
|
52
|
+
matchedPattern?: string;
|
|
53
|
+
reportedLimit?: number;
|
|
54
|
+
reportedLimitProvenance?: ContextLimitProvenance;
|
|
55
|
+
attemptedTokens?: number;
|
|
56
|
+
error?: unknown;
|
|
57
|
+
observedAtMs?: number;
|
|
58
|
+
sessionID?: string;
|
|
59
|
+
}
|
|
60
|
+
export interface WindowReportLedgerDiagnostics {
|
|
61
|
+
swallowedWriteCount: number;
|
|
62
|
+
lastErrorMessage: string | null;
|
|
63
|
+
}
|
|
64
|
+
export declare function getWindowReportsPath(): string;
|
|
65
|
+
export declare function getWindowReportLedgerDiagnostics(): WindowReportLedgerDiagnostics;
|
|
66
|
+
export declare function __resetWindowReportLedgerDiagnosticsForTests(): void;
|
|
67
|
+
export declare function buildWindowReport(input: AppendWindowReportInput): WindowReport;
|
|
68
|
+
export declare function appendWindowReport(report: WindowReport): void;
|
|
69
|
+
export declare function captureWindowReport(input: AppendWindowReportInput): void;
|
|
70
|
+
//# sourceMappingURL=window-report-ledger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"window-report-ledger.d.ts","sourceRoot":"","sources":["../../../src/features/magic-context/window-report-ledger.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AASpF,eAAO,MAAM,6BAA6B,QAAmB,CAAC;AAE9D;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,uBAAuB,EAAE,WAAW,CAAC,MAAM,CA6HtD,CAAC;AAEH,MAAM,WAAW,YAAY;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,KAAK,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,qBAAqB,CAAC,EAAE,UAAU,CAAC;IACnC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,sBAAsB,CAAC,EAAE,UAAU,CAAC;IACpC,QAAQ,EAAE,aAAa,GAAG,UAAU,GAAG,SAAS,CAAC;IACjD,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,qBAAqB,CAAC,EAAE,UAAU,CAAC;IACnC;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,IAAI,CAAC;IACxB,kFAAkF;IAClF,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,uBAAuB;IACpC,EAAE,EAAE,OAAO,qBAAqB,EAAE,QAAQ,CAAC;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,uBAAuB,CAAC,EAAE,sBAAsB,CAAC;IACjD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,6BAA6B;IAC1C,mBAAmB,EAAE,MAAM,CAAC;IAC5B,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;CACnC;AAKD,wBAAgB,oBAAoB,IAAI,MAAM,CAE7C;AAYD,wBAAgB,gCAAgC,IAAI,6BAA6B,CAEhF;AAED,wBAAgB,4CAA4C,IAAI,IAAI,CAGnE;AA2ED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,uBAAuB,GAAG,YAAY,CAqC9E;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAmB7D;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,uBAAuB,GAAG,IAAI,CAMxE"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import type { Database } from "../../shared/sqlite";
|
|
2
|
+
export interface WorkMetrics {
|
|
3
|
+
newWorkTokens: number;
|
|
4
|
+
totalInputTokens: number;
|
|
5
|
+
}
|
|
6
|
+
export interface PiSessionEntry {
|
|
7
|
+
role?: unknown;
|
|
8
|
+
usage?: unknown;
|
|
9
|
+
message?: unknown;
|
|
10
|
+
}
|
|
11
|
+
export declare function computeOpenCodeWorkMetrics(openCodeDb: Database, sessionId: string): WorkMetrics;
|
|
12
|
+
/** A single assistant row's usage, as folded by `foldWorkMetricsRows`. */
|
|
13
|
+
export interface AssistantUsageRow {
|
|
14
|
+
/** json_extract(data,'$.agent'); null when absent (its own partition). */
|
|
15
|
+
agent: string | null;
|
|
16
|
+
timeCreated: number;
|
|
17
|
+
id: string;
|
|
18
|
+
/** input + cache.read + cache.write. */
|
|
19
|
+
prompt: number;
|
|
20
|
+
output: number;
|
|
21
|
+
}
|
|
22
|
+
interface AgentCarry {
|
|
23
|
+
prevPrompt: number;
|
|
24
|
+
phaseId: number;
|
|
25
|
+
/** Max qualifying prompt in the current (open) phase. */
|
|
26
|
+
phasePeak: number;
|
|
27
|
+
/** Whether the current phase has at least one qualifying row. */
|
|
28
|
+
phaseHasQualifying: boolean;
|
|
29
|
+
/** Summed peaks of already-closed qualifying phases. */
|
|
30
|
+
closedPhaseSum: number;
|
|
31
|
+
lastOutput: number;
|
|
32
|
+
seen: boolean;
|
|
33
|
+
}
|
|
34
|
+
/** Resumable accumulator: fold new rows into this to extend the metric. */
|
|
35
|
+
export interface WorkMetricsCarry {
|
|
36
|
+
perAgent: Map<string, AgentCarry>;
|
|
37
|
+
/** Σ max(0, prompt - prevPrompt) across every folded row (metric A body). */
|
|
38
|
+
newWorkSum: number;
|
|
39
|
+
/** Watermark: last folded row's ordering key. */
|
|
40
|
+
lastTimeCreated: number;
|
|
41
|
+
lastId: string;
|
|
42
|
+
}
|
|
43
|
+
export declare function emptyWorkMetricsCarry(): WorkMetricsCarry;
|
|
44
|
+
/**
|
|
45
|
+
* Fold rows (which MUST be in (timeCreated, id) ascending order and strictly
|
|
46
|
+
* newer than `carry`'s watermark) into the carry, mutating and returning it.
|
|
47
|
+
*
|
|
48
|
+
* Mirrors OPEN_CODE_WORK_METRICS_SQL:
|
|
49
|
+
* - delta per row = max(0, prompt - LAG(prompt) per agent), default LAG 0.
|
|
50
|
+
* - phase_id = cumulative count of (prompt < prevPrompt) per agent; a dropping
|
|
51
|
+
* row starts (and belongs to) the new phase.
|
|
52
|
+
* - phase peak counts only QUALIFYING rows (prevPrompt > 0 OR phase_id == 0).
|
|
53
|
+
* - metric A = Σ deltas + Σ (last output per agent); metric B = Σ phase peaks.
|
|
54
|
+
*/
|
|
55
|
+
export declare function foldWorkMetricsRows(rows: AssistantUsageRow[], carry: WorkMetricsCarry): WorkMetricsCarry;
|
|
56
|
+
/** Current metric value implied by the carry (cheap; no DB access). */
|
|
57
|
+
export declare function metricsFromCarry(carry: WorkMetricsCarry): WorkMetrics;
|
|
58
|
+
/** Read assistant usage rows strictly newer than the carry watermark. */
|
|
59
|
+
export declare function readAssistantUsageRowsAfter(openCodeDb: Database, sessionId: string, afterTimeCreated: number, afterId: string): AssistantUsageRow[];
|
|
60
|
+
/**
|
|
61
|
+
* Extend `carry` with assistant rows newer than its watermark and return the
|
|
62
|
+
* up-to-date metrics. On a fresh carry this folds the whole session once (cold
|
|
63
|
+
* start); subsequent calls fold only new rows (≈0 when idle).
|
|
64
|
+
*
|
|
65
|
+
* The single most-recent assistant row is NEVER committed into the durable
|
|
66
|
+
* carry — OpenCode writes the row at stream start and finalizes `data.tokens`
|
|
67
|
+
* at completion, so a poll mid-stream would otherwise freeze that row at a
|
|
68
|
+
* partial/zero value. Instead the watermark is advanced only through the
|
|
69
|
+
* second-to-last row; the last row is re-read every poll and folded into a
|
|
70
|
+
* throwaway clone for the returned value, so the result always matches a full
|
|
71
|
+
* re-scan even while the latest turn is still streaming.
|
|
72
|
+
*/
|
|
73
|
+
export declare function computeOpenCodeWorkMetricsIncremental(openCodeDb: Database, sessionId: string, carry: WorkMetricsCarry): {
|
|
74
|
+
carry: WorkMetricsCarry;
|
|
75
|
+
metrics: WorkMetrics;
|
|
76
|
+
};
|
|
77
|
+
export declare function computePiWorkMetrics(sessionEntries: PiSessionEntry[] | unknown[]): WorkMetrics;
|
|
78
|
+
export {};
|
|
79
|
+
//# sourceMappingURL=work-metrics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"work-metrics.d.ts","sourceRoot":"","sources":["../../../src/features/magic-context/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gB,mBAAmB,CAC/B,IAAI,EAAE,iBAAiB,EAAE,EACzB,KAAK,EAAE,gBAAgB,GACxB,gBAAgB,CA2ClB;AAaD,uEAAuE;AACvE,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,gBAAgB,GAAG,WAAW,CAWrE;AA0BD,yEAAyE;AACzE,wBAAgB,2BAA2B,CACvC,UAAU,EAAE,QAAQ,EACpB,SAAS,EAAE,MAAM,EACjB,gBAAgB,EAAE,MAAM,EACxB,OAAO,EAAE,MAAM,GAChB,iBAAiB,EAAE,CAWrB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,qCAAqC,CACjD,UAAU,EAAE,QAAQ,EACpB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,gBAAgB,GACxB;IAAE,KAAK,EAAE,gBAAgB,CAAC;IAAC,OAAO,EAAE,WAAW,CAAA;CAAE,CAiBnD;AAED,wBAAgB,oBAAoB,CAAC,cAAc,EAAE,cAAc,EAAE,GAAG,OAAO,EAAE,GAAG,WAAW,CA8B9F"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Database } from "../../shared/sqlite";
|
|
2
|
+
export interface WorkspaceIdentitySet {
|
|
3
|
+
identities: string[];
|
|
4
|
+
namesByIdentity: Map<string, string>;
|
|
5
|
+
}
|
|
6
|
+
export interface ExpandedWorkspaceIdentitySet {
|
|
7
|
+
expandedIdentities: string[];
|
|
8
|
+
canonicalIdentityByStoredPath: Map<string, string>;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Resolve the categories this workspace shares from foreign member projects.
|
|
12
|
+
*
|
|
13
|
+
* Return null when the project is not in a workspace. For workspace members,
|
|
14
|
+
* always return a list: [] means no foreign categories are shared, malformed
|
|
15
|
+
* JSON falls back to [], and older rows with missing or NULL share_categories
|
|
16
|
+
* default to CONSTRAINTS only.
|
|
17
|
+
*/
|
|
18
|
+
export declare function resolveWorkspaceShareCategories(db: Database, projectIdentity: string): string[] | null;
|
|
19
|
+
export declare function resolveWorkspaceIdentitySet(db: Database, projectIdentity: string): WorkspaceIdentitySet;
|
|
20
|
+
export declare function expandWorkspaceIdentitySet(db: Database, identities: readonly string[]): string[];
|
|
21
|
+
export declare function expandWorkspaceIdentitySetWithAliases(db: Database, identities: readonly string[]): ExpandedWorkspaceIdentitySet;
|
|
22
|
+
export declare function resolveStoredPathWorkspaceIdentity(storedProjectPath: string, memberIdentities: readonly string[], canonicalIdentityByStoredPath: ReadonlyMap<string, string>): string | null;
|
|
23
|
+
export declare function storedPathBelongsToWorkspace(storedProjectPath: string, memberIdentities: readonly string[], expandedIdentities: readonly string[], canonicalIdentityByStoredPath: ReadonlyMap<string, string>): boolean;
|
|
24
|
+
export declare function sourceNameForMemory(storedProjectPath: string, ownIdentity: string, memberIdentities: readonly string[], namesByIdentity: ReadonlyMap<string, string>, canonicalIdentityByStoredPath: ReadonlyMap<string, string>): string | undefined;
|
|
25
|
+
export declare function computeWorkspaceEpochFingerprint(db: Database, identities: readonly string[]): string;
|
|
26
|
+
export declare function bumpEpochsForWorkspaceMembers(db: Database, identity: string, now?: number): void;
|
|
27
|
+
export declare function bumpEpochsForWorkspaceMemberSet(db: Database, identities: readonly string[], now?: number): void;
|
|
28
|
+
//# sourceMappingURL=workspaces.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspaces.d.ts","sourceRoot":"","sources":["../../../src/features/magic-context/workspaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAKpD,MAAM,WAAW,oBAAoB;IACjC,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACxC;AAED,MAAM,WAAW,4BAA4B;IACzC,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,6BAA6B,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACtD;AAqID;;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AAE,MAAM,EAChB,GAAG,SAAa,GACjB,IAAI,CAoBN;AAED,wBAAgB,+BAA+B,CAC3C,EAAE,EAAE,QAAQ,EACZ,UAAU,EAAE,SAAS,MAAM,EAAE,EAC7B,GAAG,SAAa,GACjB,IAAI,CAoBN"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Strict semver validator for the auto-update path.
|
|
3
|
+
*
|
|
4
|
+
* The plugin version string flows from the npm registry / dist-tags into
|
|
5
|
+
* package.json's dependency spec before `npm install`. A malformed or crafted
|
|
6
|
+
* value (`npm:@evil/pkg@1.0.0`, `file:/tmp/x`, `git+ssh://...`) must never be
|
|
7
|
+
* written there — this is the arbitrary-package-install / SSRF guard.
|
|
8
|
+
*
|
|
9
|
+
* Lives in its own leaf module (no imports beyond this) so both `cache.ts` and
|
|
10
|
+
* `checker.ts` can use it without creating a circular import between them
|
|
11
|
+
* (`cache.ts` imports `checker.ts` for the runtime package.json path; if
|
|
12
|
+
* `checker.ts` also imported this from `cache.ts`, the cycle breaks static
|
|
13
|
+
* export resolution on a cold module graph — CI / fresh installs — even though
|
|
14
|
+
* a warm bun cache tolerates it).
|
|
15
|
+
*/
|
|
16
|
+
export declare function isValidSemver(version: string): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Compare two semver core versions (major.minor.patch). Returns >0 if `a` is
|
|
19
|
+
* newer than `b`, <0 if older, 0 if equal. Pre-release / build metadata is
|
|
20
|
+
* IGNORED (only the numeric core is compared) — sufficient for the announcement
|
|
21
|
+
* "show only on a forward version change" gate, which never needs to order two
|
|
22
|
+
* pre-releases of the same core. Returns null if either string isn't valid
|
|
23
|
+
* semver, so callers can treat anomalous input conservatively.
|
|
24
|
+
*/
|
|
25
|
+
export declare function compareSemverCore(a: string, b: string): number | null;
|
|
26
|
+
//# sourceMappingURL=semver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"semver.d.ts","sourceRoot":"","sources":["../../../src/hooks/auto-update-checker/semver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAEtD;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAUrE"}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import type { ContextDatabase } from "../../features/magic-context/storage";
|
|
2
|
+
import { getPendingOps } from "../../features/magic-context/storage";
|
|
3
|
+
import type { PendingOp, TagEntry } from "../../features/magic-context/types";
|
|
4
|
+
import type { DroppedTokenReduction } from "./dropped-token-estimate";
|
|
5
|
+
import type { TagTarget } from "./tag-messages";
|
|
6
|
+
import type { ToolDropResult } from "./tool-drop-target";
|
|
7
|
+
/**
|
|
8
|
+
* Agent-initiated (mmc_reduce) and emergency drops of a tool call within the
|
|
9
|
+
* newest N tool calls keep a structural skeleton when the call's input is
|
|
10
|
+
* small: the tool_use/tool_result pair survives with its REAL arguments and
|
|
11
|
+
* the canonical `[dropped §N§]` placeholder as its output (`skeleton_real`).
|
|
12
|
+
* A large input is removed outright, like a drop outside the window.
|
|
13
|
+
*
|
|
14
|
+
* WHY a skeleton: when every recent tool call vanishes from the wire, models
|
|
15
|
+
* (especially smaller ones) lose the anchors showing what they actually did
|
|
16
|
+
* and start writing fake tool calls as plain text. Keeping skeletons in the
|
|
17
|
+
* recent band prevents that. Older drops still remove the full structure.
|
|
18
|
+
*
|
|
19
|
+
* WHY real arguments: every synthetic value previously put in the argument
|
|
20
|
+
* position (5-character clamps, then a `{"dropped": "[dropped §N§]"}` marker)
|
|
21
|
+
* was copied by models into new calls, which then ran with garbage arguments
|
|
22
|
+
* or looped on the dropped-input guard's refusal. A dropped call's arguments
|
|
23
|
+
* are therefore either the real ones or absent. The size rule lives in
|
|
24
|
+
* tool-input-size.ts.
|
|
25
|
+
*
|
|
26
|
+
* CACHE SAFETY: the mode is decided once, at drop time (always a
|
|
27
|
+
* cache-busting pass), persisted in `tags.drop_mode`, and replayed
|
|
28
|
+
* byte-identically by `applyFlushedStatuses` on every later pass. A skeleton
|
|
29
|
+
* is NEVER demoted to a full drop afterwards — that second mutation would be
|
|
30
|
+
* a mid-prefix rewrite on some later pass (the volatile-boundary bust class).
|
|
31
|
+
* Emergency drops use the same newest-window skeleton rule as agent drops;
|
|
32
|
+
* heuristic dedup stays full-drop because dedup keeps the newest duplicate's
|
|
33
|
+
* full content as the nearby anchor.
|
|
34
|
+
*/
|
|
35
|
+
export declare const RECENT_TOOL_SKELETON_WINDOW = 20;
|
|
36
|
+
export declare function buildReplacementContent(tagId: number): string;
|
|
37
|
+
export interface NewToolDropOutcome {
|
|
38
|
+
result: ToolDropResult;
|
|
39
|
+
/** The drop mode to persist so every later pass replays the same bytes. */
|
|
40
|
+
mode: "skeleton_real" | "skeleton_stripped" | "full";
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Apply a NEW drop of a tool call under the real-or-absent rule and report
|
|
44
|
+
* the mode to persist:
|
|
45
|
+
* 1. inside the newest-call window with a small input: keep the call with its
|
|
46
|
+
* real arguments, output -> `[dropped §N§]` (`skeleton_real`);
|
|
47
|
+
* 2. otherwise remove the call and its result (`full`);
|
|
48
|
+
* 3. except when the call cannot be removed: its result ends the request
|
|
49
|
+
* (drop() then keeps it, see ToolMutationBatch.wouldStrandConversationEnd),
|
|
50
|
+
* the host adapter cannot remove it structurally, or the caller requires a
|
|
51
|
+
* paired skeleton (`keepSkeleton`, e.g. beside native reasoning). Those keep
|
|
52
|
+
* the REAL arguments too; nothing is ever written into the argument position.
|
|
53
|
+
*/
|
|
54
|
+
export declare function applyNewToolDrop(target: TagTarget | undefined, options: {
|
|
55
|
+
inWindow: boolean;
|
|
56
|
+
keepSkeleton?: boolean;
|
|
57
|
+
}): NewToolDropOutcome;
|
|
58
|
+
/** True when a drop of this call inside the newest-call window keeps real arguments. */
|
|
59
|
+
export declare function hasSmallToolInput(target: TagTarget | undefined): boolean;
|
|
60
|
+
export type ConvertedToolDropMode = "skeleton_real" | "full";
|
|
61
|
+
/**
|
|
62
|
+
* HARD fold reasons whose trigger already loses the provider's cached prefix
|
|
63
|
+
* whatever bytes Magic Context serves: a different model has its own cache, a
|
|
64
|
+
* changed system prompt precedes every message, an idle TTL expiry means the
|
|
65
|
+
* cache was evicted, and a native host compaction replaced the conversation
|
|
66
|
+
* after the prefix. Other reasons only bust when the fold changes the served
|
|
67
|
+
* bytes (see foldChangesServedPrefix).
|
|
68
|
+
*/
|
|
69
|
+
export declare const CACHE_LOSING_FOLD_REASONS: ReadonlySet<string>;
|
|
70
|
+
/**
|
|
71
|
+
* The cached m[0]/m[1] bytes a pass serves ahead of the conversation tail.
|
|
72
|
+
* (fork divergence: the upstream mural image field is deleted — this fork
|
|
73
|
+
* removed the mural feature; see UPSTREAM.md divergence log.)
|
|
74
|
+
*/
|
|
75
|
+
export interface ServedPrefixBytes {
|
|
76
|
+
m0Bytes: Uint8Array | null;
|
|
77
|
+
m1Bytes: Uint8Array | null;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Does a HARD fold change the prefix bytes served ahead of every tool call?
|
|
81
|
+
* Any difference counts: m[0] or m[1] text. A fold that re-renders both
|
|
82
|
+
* byte-identically keeps the provider's cached prefix.
|
|
83
|
+
*/
|
|
84
|
+
export declare function foldChangesServedPrefix(before: ServedPrefixBytes, after: ServedPrefixBytes): boolean;
|
|
85
|
+
/**
|
|
86
|
+
* The single bust permission an executed HARD fold grants. True when the fold
|
|
87
|
+
* loses the provider's cached prefix anyway: its trigger evicts the cache
|
|
88
|
+
* (CACHE_LOSING_FOLD_REASONS) or it changes the m[0]/m[1] bytes served
|
|
89
|
+
* ahead of the tail. A fold that re-renders the prefix byte-identically, such
|
|
90
|
+
* as a memory epoch bump, an upgrade marker or a mutation-log entry with no
|
|
91
|
+
* rendered-content change, keeps the provider cache alive, and any lane riding
|
|
92
|
+
* it would make itself the pass's only bust. Every lane that rides a fold
|
|
93
|
+
* consults this one decision: legacy skeleton conversion, pending-op drains,
|
|
94
|
+
* heuristic cleanup, synthetic todo and sentinel first-application. OpenCode
|
|
95
|
+
* and Pi both call it.
|
|
96
|
+
*/
|
|
97
|
+
export declare function foldBustsServedPrefix(reason: string | null | undefined, before: ServedPrefixBytes, after: ServedPrefixBytes): boolean;
|
|
98
|
+
/**
|
|
99
|
+
* Convert every dropped tool call that still serves the legacy
|
|
100
|
+
* `{"dropped": "[dropped §N§]"}` argument marker to the real-or-absent rule,
|
|
101
|
+
* persisting the new mode, and return the conversions so the caller can render
|
|
102
|
+
* them on this pass's wire.
|
|
103
|
+
*
|
|
104
|
+
* Call this ONLY inside the transaction that records an executing HARD fold.
|
|
105
|
+
* That pass rebuilds the whole prefix anyway, so the changed bytes ride the
|
|
106
|
+
* same cache bust; on every other pass the legacy tags keep replaying their
|
|
107
|
+
* marker byte-identically. Deciding here and persisting the mode means later
|
|
108
|
+
* passes never re-decide (never demote, never restore).
|
|
109
|
+
*
|
|
110
|
+
* Legacy tags are `drop_mode = 'truncated'`, plus `full` tags whose host
|
|
111
|
+
* adapter cannot remove the call and so replays a marker instead (Pi). Each is
|
|
112
|
+
* re-decided from its real input: small -> `skeleton_real`; large -> `full`,
|
|
113
|
+
* unless the call cannot be removed (it ends the request, the adapter cannot
|
|
114
|
+
* remove it, or it sits beside native reasoning), which keeps real arguments.
|
|
115
|
+
* The legacy marker was only ever written inside the newest-call window or for
|
|
116
|
+
* a call that could not be removed, so every legacy tag is re-decided as an
|
|
117
|
+
* in-window drop. Tags not on this pass's wire stay as they are.
|
|
118
|
+
*
|
|
119
|
+
* `keepFullDrop` lets a host exempt `full` tags whose removal it has already
|
|
120
|
+
* recorded. Pi records the first structural removal of each arc; such a call
|
|
121
|
+
* was removed, not served as a marker, and it may only look unremovable on this
|
|
122
|
+
* pass (a model that needs tool pairs beside its reasoning). Converting it
|
|
123
|
+
* would keep the call on every later pass, including ones that can remove it.
|
|
124
|
+
*/
|
|
125
|
+
export declare function convertLegacyToolSkeletons(db: ContextDatabase, sessionId: string, targets: ReadonlyMap<number, TagTarget>, options?: {
|
|
126
|
+
keepFullDrop?: (callId: string | null) => boolean;
|
|
127
|
+
}): Map<number, ConvertedToolDropMode>;
|
|
128
|
+
/** Render conversions from convertLegacyToolSkeletons on this pass's wire. */
|
|
129
|
+
export declare function renderConvertedToolSkeletons(targets: ReadonlyMap<number, TagTarget>, converted: ReadonlyMap<number, ConvertedToolDropMode>): boolean;
|
|
130
|
+
export interface PendingOperationBatchDiagnostics {
|
|
131
|
+
source: "pending" | "synthetic" | "mixed";
|
|
132
|
+
total: number;
|
|
133
|
+
mutated: number;
|
|
134
|
+
persistedWithoutMutation: number;
|
|
135
|
+
reasons: Record<string, number>;
|
|
136
|
+
}
|
|
137
|
+
export declare function applyPendingOperations(sessionId: string, db: ContextDatabase, targets: Map<number, TagTarget>,
|
|
138
|
+
/**
|
|
139
|
+
* Union projection form: protectedTagIds (set form).
|
|
140
|
+
* Coordinate space: tag-number space (Set<number> of member tool tag numbers).
|
|
141
|
+
* Empty-window behavior: an empty set means zero tool tags are protected by the window;
|
|
142
|
+
* non-tool (message/file) tags never become reclaim targets through any window form,
|
|
143
|
+
* their eligibility remaining decided solely by the independent protections.
|
|
144
|
+
*/
|
|
145
|
+
protectedTagIds: ReadonlySet<number>, preloadedTags?: TagEntry[], preloadedPendingOps?: ReturnType<typeof getPendingOps>, syntheticPendingOps?: PendingOp[],
|
|
146
|
+
/**
|
|
147
|
+
* Smart-drops: tag ids to compress as an edit_marker (an edit/write
|
|
148
|
+
* superseded by a later edit to the same file) instead of a full/skeleton
|
|
149
|
+
* drop. Synthetic-only: these are selected for the current apply pass;
|
|
150
|
+
* replay reads the frozen drop_mode, not this set.
|
|
151
|
+
*/
|
|
152
|
+
editMarkerTagIds?: ReadonlySet<number>,
|
|
153
|
+
/** Reports only reductions that changed the live message representation. */
|
|
154
|
+
onTagReduced?: (reduction: DroppedTokenReduction) => void,
|
|
155
|
+
/** Reports why selected operations did or did not change the visible payload. */
|
|
156
|
+
onBatchComplete?: (diagnostics: PendingOperationBatchDiagnostics) => void): boolean;
|
|
157
|
+
export declare function applyFlushedStatuses(sessionId: string, db: ContextDatabase, targets: Map<number, TagTarget>, preloadedTags?: TagEntry[]): boolean;
|
|
158
|
+
//# sourceMappingURL=apply-operations.d.ts.map
|