@cortexkit/opencode-magic-context 0.41.4 → 0.42.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -3
- package/dist/agents/hidden-agent-registrations.d.ts +1 -3
- package/dist/agents/hidden-agent-registrations.d.ts.map +1 -1
- package/dist/agents/magic-context-prompt.d.ts +1 -1
- package/dist/agents/magic-context-prompt.d.ts.map +1 -1
- package/dist/agents/permissions.d.ts +1 -22
- package/dist/agents/permissions.d.ts.map +1 -1
- package/dist/config/agent-disable.d.ts +0 -5
- package/dist/config/agent-disable.d.ts.map +1 -1
- package/dist/config/index.d.ts +5 -0
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/migrate-config-location.d.ts.map +1 -1
- package/dist/config/project-security.d.ts +20 -2
- package/dist/config/project-security.d.ts.map +1 -1
- 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/magic-context.d.ts +43 -201
- package/dist/config/schema/magic-context.d.ts.map +1 -1
- package/dist/{conflict-warning-hook-ejkc9sjn.js → conflict-warning-hook-6p3xqeac.js} +3 -3
- package/dist/{derive-budgets-bc366cz8.js → derive-budgets-s2pgnnm4.js} +1 -1
- package/dist/features/builtin-commands/commands.d.ts +0 -4
- package/dist/features/builtin-commands/commands.d.ts.map +1 -1
- package/dist/features/magic-context/compaction-marker.d.ts.map +1 -1
- package/dist/features/magic-context/compartment-chunk-embedding.d.ts +15 -4
- package/dist/features/magic-context/compartment-chunk-embedding.d.ts.map +1 -1
- package/dist/features/magic-context/compartment-storage.d.ts.map +1 -1
- package/dist/features/magic-context/context-authority.d.ts +31 -4
- package/dist/features/magic-context/context-authority.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/classify.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/evaluate-smart-notes.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/map-memories.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/open-opencode-db.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/refresh-primers.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/retrospective-orphan-sweep.d.ts +19 -9
- package/dist/features/magic-context/dreamer/retrospective-orphan-sweep.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/storage-dream-runs.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/task-executor.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/task-scheduler.d.ts +4 -0
- package/dist/features/magic-context/dreamer/task-scheduler.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/verify.d.ts.map +1 -1
- package/dist/features/magic-context/fail-closed-block.d.ts.map +1 -1
- package/dist/features/magic-context/git-commits/sweep-coordinator.d.ts.map +1 -1
- package/dist/features/magic-context/index.d.ts +0 -1
- package/dist/features/magic-context/index.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding-identity.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding-local.d.ts +13 -0
- package/dist/features/magic-context/memory/embedding-local.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding-model-match.d.ts +41 -0
- package/dist/features/magic-context/memory/embedding-model-match.d.ts.map +1 -0
- package/dist/features/magic-context/memory/embedding-openai.d.ts +7 -20
- package/dist/features/magic-context/memory/embedding-openai.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding-provider.d.ts +2 -2
- package/dist/features/magic-context/memory/embedding-provider.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding-synapse.d.ts +48 -14
- package/dist/features/magic-context/memory/embedding-synapse.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding.d.ts +1 -1
- package/dist/features/magic-context/memory/embedding.d.ts.map +1 -1
- package/dist/features/magic-context/memory/memory-migration.d.ts.map +1 -1
- package/dist/features/magic-context/memory/project-identity.d.ts +1 -0
- package/dist/features/magic-context/memory/project-identity.d.ts.map +1 -1
- package/dist/features/magic-context/memory/promotion.d.ts +7 -1
- package/dist/features/magic-context/memory/promotion.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/features/magic-context/message-index-async.d.ts +12 -0
- package/dist/features/magic-context/message-index-async.d.ts.map +1 -1
- package/dist/features/magic-context/message-index.d.ts.map +1 -1
- package/dist/features/magic-context/migrations.d.ts.map +1 -1
- package/dist/features/magic-context/mural/compress-cues.d.ts.map +1 -1
- package/dist/features/magic-context/mural/render-trigger.d.ts +6 -0
- package/dist/features/magic-context/mural/render-trigger.d.ts.map +1 -1
- 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/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-docs-hash.d.ts +4 -0
- package/dist/features/magic-context/project-docs-hash.d.ts.map +1 -1
- package/dist/features/magic-context/project-embedding-registry.d.ts +13 -4
- package/dist/features/magic-context/project-embedding-registry.d.ts.map +1 -1
- 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/search.d.ts.map +1 -1
- package/dist/features/magic-context/session-project-backfill.d.ts.map +1 -1
- package/dist/features/magic-context/shadow-backfill-state.d.ts +26 -0
- package/dist/features/magic-context/shadow-backfill-state.d.ts.map +1 -0
- package/dist/features/magic-context/smart-notes/compiler.d.ts.map +1 -1
- package/dist/features/magic-context/smart-notes/sandbox-runner.d.ts +4 -0
- package/dist/features/magic-context/smart-notes/sandbox-runner.d.ts.map +1 -1
- package/dist/features/magic-context/smart-notes/storage.d.ts.map +1 -1
- package/dist/features/magic-context/storage-clone.d.ts.map +1 -1
- package/dist/features/magic-context/storage-db.d.ts +1 -1
- package/dist/features/magic-context/storage-db.d.ts.map +1 -1
- package/dist/features/magic-context/storage-embedding-measurements.d.ts +2 -2
- package/dist/features/magic-context/storage-embedding-measurements.d.ts.map +1 -1
- package/dist/features/magic-context/storage-historian-runs.d.ts +4 -0
- package/dist/features/magic-context/storage-historian-runs.d.ts.map +1 -1
- package/dist/features/magic-context/storage-memory-mutation-log.d.ts +1 -0
- package/dist/features/magic-context/storage-memory-mutation-log.d.ts.map +1 -1
- package/dist/features/magic-context/storage-meta-persisted.d.ts +79 -13
- package/dist/features/magic-context/storage-meta-persisted.d.ts.map +1 -1
- package/dist/features/magic-context/storage-meta.d.ts +1 -1
- package/dist/features/magic-context/storage-meta.d.ts.map +1 -1
- package/dist/features/magic-context/storage-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 +6 -0
- package/dist/features/magic-context/storage-notes.d.ts.map +1 -1
- package/dist/features/magic-context/storage-replay-document.d.ts +33 -0
- package/dist/features/magic-context/storage-replay-document.d.ts.map +1 -0
- package/dist/features/magic-context/storage-subagent-invocations.d.ts +1 -1
- package/dist/features/magic-context/storage-subagent-invocations.d.ts.map +1 -1
- package/dist/features/magic-context/storage-tags.d.ts +19 -11
- package/dist/features/magic-context/storage-tags.d.ts.map +1 -1
- package/dist/features/magic-context/storage.d.ts +3 -3
- package/dist/features/magic-context/storage.d.ts.map +1 -1
- package/dist/features/magic-context/subagent-token-capture.d.ts.map +1 -1
- package/dist/features/magic-context/tagger.d.ts +13 -0
- package/dist/features/magic-context/tagger.d.ts.map +1 -1
- package/dist/features/magic-context/tool-owner-backfill.d.ts.map +1 -1
- package/dist/features/magic-context/user-memory/review-user-memories.d.ts.map +1 -1
- package/dist/features/magic-context/user-memory/storage-user-memory.d.ts.map +1 -1
- package/dist/features/magic-context/workspaces.d.ts.map +1 -1
- package/dist/hooks/magic-context/apply-operations.d.ts +11 -5
- package/dist/hooks/magic-context/apply-operations.d.ts.map +1 -1
- package/dist/hooks/magic-context/auto-search-runner.d.ts.map +1 -1
- package/dist/hooks/magic-context/cache-busting-signals.d.ts +9 -1
- package/dist/hooks/magic-context/cache-busting-signals.d.ts.map +1 -1
- package/dist/hooks/magic-context/caveman-cleanup.d.ts +1 -1
- package/dist/hooks/magic-context/caveman-cleanup.d.ts.map +1 -1
- package/dist/hooks/magic-context/channel2-delivery.d.ts.map +1 -1
- package/dist/hooks/magic-context/child-session-spawn.d.ts +3 -3
- package/dist/hooks/magic-context/child-session-spawn.d.ts.map +1 -1
- package/dist/hooks/magic-context/command-handler.d.ts +1 -10
- package/dist/hooks/magic-context/command-handler.d.ts.map +1 -1
- package/dist/hooks/magic-context/compaction-marker-manager.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-drop-queue.d.ts +10 -21
- package/dist/hooks/magic-context/compartment-runner-drop-queue.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-incremental.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-partial-recomp.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-recomp.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-validation.d.ts +1 -1
- package/dist/hooks/magic-context/compartment-runner-validation.d.ts.map +1 -1
- package/dist/hooks/magic-context/ctx-reduce-nudge.d.ts +26 -2
- package/dist/hooks/magic-context/ctx-reduce-nudge.d.ts.map +1 -1
- package/dist/hooks/magic-context/decay-render.d.ts.map +1 -1
- package/dist/hooks/magic-context/dropped-input-guard.d.ts +9 -0
- package/dist/hooks/magic-context/dropped-input-guard.d.ts.map +1 -0
- package/dist/hooks/magic-context/embed-session-state.d.ts +1 -1
- package/dist/hooks/magic-context/embed-session-state.d.ts.map +1 -1
- package/dist/hooks/magic-context/emergency-drop.d.ts +6 -1
- package/dist/hooks/magic-context/emergency-drop.d.ts.map +1 -1
- package/dist/hooks/magic-context/event-handler.d.ts +0 -1
- package/dist/hooks/magic-context/event-handler.d.ts.map +1 -1
- package/dist/hooks/magic-context/event-payloads.d.ts +7 -6
- package/dist/hooks/magic-context/event-payloads.d.ts.map +1 -1
- package/dist/hooks/magic-context/event-resolvers.d.ts +1 -1
- package/dist/hooks/magic-context/event-resolvers.d.ts.map +1 -1
- package/dist/hooks/magic-context/execute-status.d.ts +3 -1
- package/dist/hooks/magic-context/execute-status.d.ts.map +1 -1
- package/dist/hooks/magic-context/format-embed-failure.d.ts +2 -1
- package/dist/hooks/magic-context/format-embed-failure.d.ts.map +1 -1
- package/dist/hooks/magic-context/format-embed-status.d.ts.map +1 -1
- package/dist/hooks/magic-context/heuristic-cleanup.d.ts +7 -1
- package/dist/hooks/magic-context/heuristic-cleanup.d.ts.map +1 -1
- package/dist/hooks/magic-context/hook-handlers.d.ts +3 -1
- package/dist/hooks/magic-context/hook-handlers.d.ts.map +1 -1
- package/dist/hooks/magic-context/hook.d.ts +13 -4
- package/dist/hooks/magic-context/hook.d.ts.map +1 -1
- package/dist/hooks/magic-context/inject-compartments.d.ts +14 -1
- package/dist/hooks/magic-context/inject-compartments.d.ts.map +1 -1
- package/dist/hooks/magic-context/live-session-state.d.ts +1 -1
- package/dist/hooks/magic-context/lkg-slot.d.ts +34 -0
- package/dist/hooks/magic-context/lkg-slot.d.ts.map +1 -1
- package/dist/hooks/magic-context/maintenance-authority.d.ts +2 -2
- package/dist/hooks/magic-context/maintenance-authority.d.ts.map +1 -1
- package/dist/hooks/magic-context/module-state-sync-timing.d.ts +21 -0
- package/dist/hooks/magic-context/module-state-sync-timing.d.ts.map +1 -0
- package/dist/hooks/magic-context/module-state-sync.d.ts +21 -7
- package/dist/hooks/magic-context/module-state-sync.d.ts.map +1 -1
- package/dist/hooks/magic-context/module-transport.d.ts +12 -0
- package/dist/hooks/magic-context/module-transport.d.ts.map +1 -1
- package/dist/hooks/magic-context/module-wire.d.ts +8 -0
- package/dist/hooks/magic-context/module-wire.d.ts.map +1 -1
- package/dist/hooks/magic-context/note-nudger.d.ts.map +1 -1
- package/dist/hooks/magic-context/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/protected-tail-boundary.d.ts +6 -0
- package/dist/hooks/magic-context/protected-tail-boundary.d.ts.map +1 -1
- package/dist/hooks/magic-context/read-session-chunk.d.ts +18 -18
- package/dist/hooks/magic-context/read-session-chunk.d.ts.map +1 -1
- package/dist/hooks/magic-context/read-session-db.d.ts +22 -12
- package/dist/hooks/magic-context/read-session-db.d.ts.map +1 -1
- package/dist/hooks/magic-context/read-session-formatting.d.ts +8 -0
- package/dist/hooks/magic-context/read-session-formatting.d.ts.map +1 -1
- package/dist/hooks/magic-context/read-session-raw.d.ts +10 -1
- package/dist/hooks/magic-context/read-session-raw.d.ts.map +1 -1
- package/dist/hooks/magic-context/recomp-orchestrator.d.ts.map +1 -1
- package/dist/hooks/magic-context/reference-retrieval.d.ts.map +1 -1
- package/dist/hooks/magic-context/rust-mode-transform.d.ts +74 -9
- package/dist/hooks/magic-context/rust-mode-transform.d.ts.map +1 -1
- package/dist/hooks/magic-context/send-session-notification.d.ts +11 -10
- package/dist/hooks/magic-context/send-session-notification.d.ts.map +1 -1
- package/dist/hooks/magic-context/strip-content.d.ts +7 -0
- package/dist/hooks/magic-context/strip-content.d.ts.map +1 -1
- package/dist/hooks/magic-context/supersession-reclaim.d.ts +13 -0
- package/dist/hooks/magic-context/supersession-reclaim.d.ts.map +1 -1
- package/dist/hooks/magic-context/system-prompt-hash.d.ts +2 -3
- package/dist/hooks/magic-context/system-prompt-hash.d.ts.map +1 -1
- package/dist/hooks/magic-context/tail-hygiene-walk.d.ts +8 -3
- package/dist/hooks/magic-context/tail-hygiene-walk.d.ts.map +1 -1
- package/dist/hooks/magic-context/tool-drop-target.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform-compartment-phase.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform-context-state.d.ts +7 -1
- package/dist/hooks/magic-context/transform-context-state.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts +11 -4
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform.d.ts +7 -2
- package/dist/hooks/magic-context/transform.d.ts.map +1 -1
- package/dist/hooks/magic-context/upgrade-reminder.d.ts +7 -9
- package/dist/hooks/magic-context/upgrade-reminder.d.ts.map +1 -1
- package/dist/hooks/magic-context/wrapup-orchestrator.d.ts.map +1 -1
- package/dist/index-1974jvn3.js +783 -0
- package/dist/{index-0y2mcg5y.js → index-1q9kay7n.js} +18717 -16197
- package/dist/{index-4avmwfp5.js → index-36wd1d6k.js} +6 -29
- package/dist/{index-fz104x1j.js → index-jmtjh2d3.js} +3 -3
- package/dist/{index-q264erdp.js → index-nqgjwfzn.js} +70 -38
- package/dist/{index-mjv9je4e.js → index-xdtge3y2.js} +45 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6457 -5190
- package/dist/plugin/conflict-warning-hook.d.ts +5 -6
- package/dist/plugin/conflict-warning-hook.d.ts.map +1 -1
- package/dist/plugin/dream-timer.d.ts +1 -0
- package/dist/plugin/dream-timer.d.ts.map +1 -1
- package/dist/plugin/embedding-bootstrap-helpers.d.ts.map +1 -1
- package/dist/plugin/embedding-routing.d.ts +4 -1
- package/dist/plugin/embedding-routing.d.ts.map +1 -1
- package/dist/plugin/hooks/create-session-hooks.d.ts +16 -2
- package/dist/plugin/hooks/create-session-hooks.d.ts.map +1 -1
- package/dist/plugin/rpc-handlers.d.ts +31 -1
- package/dist/plugin/rpc-handlers.d.ts.map +1 -1
- package/dist/plugin/rust-tool-backends.d.ts +1 -0
- package/dist/plugin/rust-tool-backends.d.ts.map +1 -1
- package/dist/plugin/tool-registry.d.ts.map +1 -1
- package/dist/{recomp-orchestrator-q98r6rga.js → recomp-orchestrator-m33b3rk9.js} +5 -5
- package/dist/{send-session-notification-hdh02wy9.js → send-session-notification-1qeqkswb.js} +6 -4
- package/dist/shared/child-session-teardown.d.ts +34 -0
- package/dist/shared/child-session-teardown.d.ts.map +1 -0
- package/dist/shared/keep-subagents.d.ts +1 -1
- package/dist/shared/keep-subagents.d.ts.map +1 -1
- package/dist/shared/model-suggestion-retry.d.ts +1 -1
- package/dist/shared/opencode-db-path.d.ts +24 -0
- package/dist/shared/opencode-db-path.d.ts.map +1 -0
- package/dist/shared/prompt-surface-runtime.d.ts +10 -5
- package/dist/shared/prompt-surface-runtime.d.ts.map +1 -1
- package/dist/shared/resolve-fallbacks.d.ts +1 -1
- package/dist/shared/rpc-types.d.ts +121 -0
- package/dist/shared/rpc-types.d.ts.map +1 -1
- package/dist/shared/sqlite.d.ts +42 -0
- package/dist/shared/sqlite.d.ts.map +1 -1
- package/dist/shared/status-detail-text.d.ts +3 -1
- package/dist/shared/status-detail-text.d.ts.map +1 -1
- package/dist/shared/status-summary.d.ts +30 -0
- package/dist/shared/status-summary.d.ts.map +1 -0
- package/dist/shared/subagent-runner.d.ts +17 -10
- package/dist/shared/subagent-runner.d.ts.map +1 -1
- package/dist/shared/tag-transcript.d.ts.map +1 -1
- package/dist/shared/tail-hygiene-status.d.ts +1 -0
- package/dist/shared/tail-hygiene-status.d.ts.map +1 -1
- package/dist/shared/transcript.d.ts +6 -0
- package/dist/shared/transcript.d.ts.map +1 -1
- package/dist/shared/user-facing-codes.d.ts +191 -0
- package/dist/shared/user-facing-codes.d.ts.map +1 -0
- package/dist/shared/window-geometry.d.ts +23 -0
- package/dist/shared/window-geometry.d.ts.map +1 -1
- package/dist/shared/write-transaction-timing.d.ts +1 -1
- package/dist/shared/write-transaction-timing.d.ts.map +1 -1
- package/dist/{storage-meta-session-dvwfw778.js → storage-meta-session-e6g0mmec.js} +2 -2
- package/dist/tools/ctx-memory/tools.d.ts.map +1 -1
- package/dist/tools/ctx-memory/verification-recording.d.ts.map +1 -1
- package/dist/tools/ctx-note/constants.d.ts +1 -1
- package/dist/tools/ctx-note/constants.d.ts.map +1 -1
- package/dist/tools/ctx-note/tools.d.ts.map +1 -1
- package/dist/tools/ctx-note/types.d.ts +1 -0
- package/dist/tools/ctx-note/types.d.ts.map +1 -1
- package/dist/tools/ctx-reduce/tools.d.ts +10 -1
- package/dist/tools/ctx-reduce/tools.d.ts.map +1 -1
- package/dist/tools/ctx-search/constants.d.ts +1 -1
- package/dist/tools/ctx-search/constants.d.ts.map +1 -1
- package/dist/tools/light-descriptions.d.ts +2 -2
- package/dist/tools/light-descriptions.d.ts.map +1 -1
- package/package.json +2 -3
- package/src/agents/hidden-agent-registrations.ts +3 -15
- package/src/agents/magic-context-prompt.test.ts +7 -5
- package/src/agents/magic-context-prompt.ts +22 -30
- package/src/agents/permissions.test.ts +1 -42
- package/src/agents/permissions.ts +1 -24
- package/src/config/agent-disable.ts +5 -22
- package/src/config/index.test.ts +126 -15
- package/src/config/index.ts +41 -6
- package/src/config/latch-permanence-guard.test.ts +4 -0
- package/src/config/migrate-config-location.test.ts +39 -6
- package/src/config/migrate-config-location.ts +18 -31
- package/src/config/profiles.ts +1 -1
- package/src/config/project-security.hostile-matrix.test.ts +0 -8
- package/src/config/project-security.test.ts +21 -24
- package/src/config/project-security.ts +115 -14
- package/src/config/protected-tokens.test.ts +235 -0
- package/src/config/removed-agent-config.ts +45 -0
- package/src/config/removed-agent-source-fence.test.ts +56 -0
- package/src/config/schema/magic-context.test.ts +50 -42
- package/src/config/schema/magic-context.ts +70 -37
- package/src/shared/child-session-teardown.test.ts +218 -0
- package/src/shared/child-session-teardown.ts +66 -0
- package/src/shared/keep-subagents.ts +9 -14
- package/src/shared/model-suggestion-retry.ts +1 -1
- package/src/shared/opencode-db-path.test.ts +196 -0
- package/src/shared/opencode-db-path.ts +215 -0
- package/src/shared/prompt-surface-a1-golden.md +50 -35
- package/src/shared/prompt-surface-runtime.test.ts +28 -0
- package/src/shared/prompt-surface-runtime.ts +22 -5
- package/src/shared/resolve-fallbacks.ts +1 -1
- package/src/shared/rpc-types.ts +128 -0
- package/src/shared/session-messages-bounded.test.ts +1 -1
- package/src/shared/sqlite-import-fence.test.ts +19 -0
- package/src/shared/sqlite.test.ts +27 -1
- package/src/shared/sqlite.ts +204 -1
- package/src/shared/status-detail-text.test.ts +92 -20
- package/src/shared/status-detail-text.ts +24 -2
- package/src/shared/status-summary.ts +167 -0
- package/src/shared/subagent-runner.ts +17 -10
- package/src/shared/tag-transcript.ts +33 -21
- package/src/shared/tail-hygiene-status.ts +8 -0
- package/src/shared/transcript.ts +7 -0
- package/src/shared/user-facing-codes.test.ts +140 -0
- package/src/shared/user-facing-codes.ts +276 -0
- package/src/shared/window-geometry.test.ts +44 -0
- package/src/shared/window-geometry.ts +89 -11
- package/src/shared/write-transaction-attribution.test.ts +241 -0
- package/src/shared/write-transaction-timing.ts +2 -1
- package/src/tui/index.tsx +44 -11
- package/src/tui/slots/sidebar-content.tsx +12 -7
- package/src/tui-compiled/index.tsx +662 -649
- package/src/tui-compiled/slots/sidebar-content.tsx +301 -305
- package/dist/agents/sidekick.d.ts +0 -2
- package/dist/agents/sidekick.d.ts.map +0 -1
- package/dist/features/magic-context/defaults.d.ts +0 -2
- package/dist/features/magic-context/defaults.d.ts.map +0 -1
- package/dist/features/magic-context/sidekick/agent.d.ts +0 -14
- package/dist/features/magic-context/sidekick/agent.d.ts.map +0 -1
- package/dist/features/magic-context/sidekick/core.d.ts +0 -38
- package/dist/features/magic-context/sidekick/core.d.ts.map +0 -1
- package/dist/features/magic-context/sidekick/index.d.ts +0 -3
- package/dist/features/magic-context/sidekick/index.d.ts.map +0 -1
- package/dist/hooks/magic-context/boundary-execution.d.ts +0 -27
- package/dist/hooks/magic-context/boundary-execution.d.ts.map +0 -1
- package/dist/index-raatkvw5.js +0 -360
- package/src/agents/sidekick.ts +0 -1
- package/src/features/magic-context/defaults.ts +0 -1
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
log
|
|
3
3
|
} from "./index-dkv2dn46.js";
|
|
4
4
|
import {
|
|
5
|
-
|
|
6
|
-
} from "./index-
|
|
5
|
+
sendStatusNotification2
|
|
6
|
+
} from "./index-nqgjwfzn.js";
|
|
7
7
|
import {
|
|
8
8
|
readJsoncFile
|
|
9
9
|
} from "./index-sd3egckz.js";
|
|
@@ -410,7 +410,7 @@ async function sendConflictWarning2(client, directory, conflictResult) {
|
|
|
410
410
|
const warningText = formatConflictShort(conflictResult);
|
|
411
411
|
log(`[magic-context] sending conflict warning to session ${sessionId}: ${conflictResult.reasons.join(", ")}`);
|
|
412
412
|
try {
|
|
413
|
-
await
|
|
413
|
+
await sendStatusNotification2(client, sessionId, warningText, {});
|
|
414
414
|
} catch (error) {
|
|
415
415
|
log(`[magic-context] conflict-warning: failed to send: ${error instanceof Error ? error.message : String(error)}`);
|
|
416
416
|
}
|
|
@@ -455,31 +455,8 @@ async function cleanupConflictWarnings2(client, directory, serverUrl) {
|
|
|
455
455
|
}
|
|
456
456
|
}
|
|
457
457
|
const enabledText = `${ENABLED_MARKER}. Enjoy! ✨`;
|
|
458
|
-
const scheduleEnabledCleanup = () => {
|
|
459
|
-
setTimeout(async () => {
|
|
460
|
-
try {
|
|
461
|
-
const freshMessages = await getSessionMessages(client, sessionId);
|
|
462
|
-
for (let i = freshMessages.length - 1;i >= 0; i--) {
|
|
463
|
-
const msg = freshMessages[i];
|
|
464
|
-
const msgId = msg.info?.id;
|
|
465
|
-
const msgRole = msg.info?.role;
|
|
466
|
-
if (!msgId || msgRole !== "user")
|
|
467
|
-
break;
|
|
468
|
-
const parts = msg.parts ?? [];
|
|
469
|
-
const isEnabled = parts.length > 0 && parts.every((p) => p.ignored === true && p.type === "text" && typeof p.text === "string" && p.text.startsWith(ENABLED_MARKER));
|
|
470
|
-
if (isEnabled) {
|
|
471
|
-
await deleteMessage(serverUrl, sessionId, msgId);
|
|
472
|
-
} else {
|
|
473
|
-
break;
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
} catch {}
|
|
477
|
-
}, 1000);
|
|
478
|
-
};
|
|
479
458
|
try {
|
|
480
|
-
await
|
|
481
|
-
onDelivered: scheduleEnabledCleanup
|
|
482
|
-
});
|
|
459
|
+
await sendStatusNotification2(client, sessionId, enabledText, {});
|
|
483
460
|
} catch {}
|
|
484
461
|
}
|
|
485
462
|
async function cleanupEnabledMessages(messages, serverUrl, sessionId) {
|
|
@@ -521,7 +498,7 @@ async function sendSchemaFenceWarning2(client, directory, detail) {
|
|
|
521
498
|
].join(`
|
|
522
499
|
`);
|
|
523
500
|
try {
|
|
524
|
-
await
|
|
501
|
+
await sendStatusNotification2(client, sessionId, text, {});
|
|
525
502
|
} catch {
|
|
526
503
|
return;
|
|
527
504
|
}
|
|
@@ -546,7 +523,7 @@ async function sendStartupAnnouncement2(client, directory, version, features, fo
|
|
|
546
523
|
`);
|
|
547
524
|
log(`[magic-context] sending startup announcement for v${version} to session ${sessionId}`);
|
|
548
525
|
try {
|
|
549
|
-
await
|
|
526
|
+
await sendStatusNotification2(client, sessionId, text, {
|
|
550
527
|
onDelivered: () => markSeen(version)
|
|
551
528
|
});
|
|
552
529
|
} catch (error) {
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./index-dkv2dn46.js";
|
|
4
4
|
import {
|
|
5
5
|
withReadOnlySessionDb
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-1974jvn3.js";
|
|
7
7
|
import {
|
|
8
8
|
piModelRefToCanonical
|
|
9
9
|
} from "./index-avwt563y.js";
|
|
@@ -16,9 +16,9 @@ import { Buffer as Buffer2 } from "node:buffer";
|
|
|
16
16
|
|
|
17
17
|
// src/shared/write-transaction-timing.ts
|
|
18
18
|
var SLOW_WRITE_TRANSACTION_THRESHOLD_MS = 1000;
|
|
19
|
-
function logSlowWriteTransaction(site, startedAt, thresholdMs = SLOW_WRITE_TRANSACTION_THRESHOLD_MS) {
|
|
19
|
+
function logSlowWriteTransaction(site, startedAt, thresholdMs = SLOW_WRITE_TRANSACTION_THRESHOLD_MS, completedAtMs = performance.now()) {
|
|
20
20
|
try {
|
|
21
|
-
const durationMs =
|
|
21
|
+
const durationMs = completedAtMs - startedAt;
|
|
22
22
|
if (durationMs < thresholdMs)
|
|
23
23
|
return;
|
|
24
24
|
log(`[magic-context] slow write transaction: site=${site} held=${durationMs.toFixed(1)}ms`);
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./index-dkv2dn46.js";
|
|
4
4
|
import {
|
|
5
5
|
shouldHoldIgnoredNotification
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-1974jvn3.js";
|
|
7
7
|
|
|
8
8
|
// src/shared/error-message.ts
|
|
9
9
|
function getErrorMessage(error) {
|
|
@@ -85,7 +85,11 @@ function safeString(value) {
|
|
|
85
85
|
var MAX_QUEUED_IGNORED_NOTIFICATIONS = 16;
|
|
86
86
|
var queuedIgnoredNotifications = new Map;
|
|
87
87
|
var flushingIgnoredNotifications = new Set;
|
|
88
|
-
var
|
|
88
|
+
var idleSessions = new Set;
|
|
89
|
+
var lastDeliveredText = new Map;
|
|
90
|
+
var activityEpoch = new Map;
|
|
91
|
+
var defaultHoldDetector = (sessionId) => !idleSessions.has(sessionId) || shouldHoldIgnoredNotification(sessionId);
|
|
92
|
+
var holdDetector = defaultHoldDetector;
|
|
89
93
|
var notificationServerUrl;
|
|
90
94
|
var noticeDeleter;
|
|
91
95
|
var notificationDiagnosticObserverForTests;
|
|
@@ -95,6 +99,8 @@ function notificationDiagnostic(sessionId, message) {
|
|
|
95
99
|
}
|
|
96
100
|
function queueIgnoredNotification(notification) {
|
|
97
101
|
const queued = queuedIgnoredNotifications.get(notification.sessionId) ?? [];
|
|
102
|
+
if (queued.at(-1)?.text === notification.text)
|
|
103
|
+
return;
|
|
98
104
|
queued.push(notification);
|
|
99
105
|
if (queued.length > MAX_QUEUED_IGNORED_NOTIFICATIONS) {
|
|
100
106
|
queued.splice(0, queued.length - MAX_QUEUED_IGNORED_NOTIFICATIONS);
|
|
@@ -172,7 +178,8 @@ function extractToastTitle(text) {
|
|
|
172
178
|
return "Magic Context";
|
|
173
179
|
}
|
|
174
180
|
async function sendIgnoredMessageNow(client, sessionId, text, params, forcePersist) {
|
|
175
|
-
|
|
181
|
+
const epoch = activityEpoch.get(sessionId) ?? 0;
|
|
182
|
+
if (holdDetector(sessionId)) {
|
|
176
183
|
holdIgnoredNotification({ client, sessionId, text, params, forcePersist }, "during target checks");
|
|
177
184
|
return "queued";
|
|
178
185
|
}
|
|
@@ -181,7 +188,9 @@ async function sendIgnoredMessageNow(client, sessionId, text, params, forcePersi
|
|
|
181
188
|
sessionLog(sessionId, "notification skipped (session not titled yet)");
|
|
182
189
|
return "skipped";
|
|
183
190
|
}
|
|
184
|
-
if (
|
|
191
|
+
if ((activityEpoch.get(sessionId) ?? 0) !== epoch)
|
|
192
|
+
return "skipped";
|
|
193
|
+
if (holdDetector(sessionId)) {
|
|
185
194
|
holdIgnoredNotification({ client, sessionId, text, params, forcePersist }, "during target checks");
|
|
186
195
|
return "queued";
|
|
187
196
|
}
|
|
@@ -204,7 +213,9 @@ async function sendIgnoredMessageNow(client, sessionId, text, params, forcePersi
|
|
|
204
213
|
}
|
|
205
214
|
} catch {}
|
|
206
215
|
}
|
|
207
|
-
if (
|
|
216
|
+
if ((activityEpoch.get(sessionId) ?? 0) !== epoch)
|
|
217
|
+
return "skipped";
|
|
218
|
+
if (holdDetector(sessionId)) {
|
|
208
219
|
holdIgnoredNotification({ client, sessionId, text, params, forcePersist }, "before append");
|
|
209
220
|
return "queued";
|
|
210
221
|
}
|
|
@@ -241,10 +252,12 @@ async function sendIgnoredMessageNow(client, sessionId, text, params, forcePersi
|
|
|
241
252
|
text,
|
|
242
253
|
params,
|
|
243
254
|
forcePersist,
|
|
244
|
-
messageId
|
|
255
|
+
messageId,
|
|
256
|
+
epoch
|
|
245
257
|
})) {
|
|
246
|
-
return "
|
|
258
|
+
return "skipped";
|
|
247
259
|
}
|
|
260
|
+
lastDeliveredText.set(sessionId, text);
|
|
248
261
|
notifyDelivered(sessionId, params);
|
|
249
262
|
return "sent";
|
|
250
263
|
} catch (error) {
|
|
@@ -294,25 +307,20 @@ async function deleteNoticeMessage(sessionId, messageId) {
|
|
|
294
307
|
}
|
|
295
308
|
}
|
|
296
309
|
async function revertNoticeIfUnsafe(notification) {
|
|
297
|
-
|
|
310
|
+
const superseded = (activityEpoch.get(notification.sessionId) ?? 0) !== notification.epoch;
|
|
311
|
+
if (!superseded && !holdDetector(notification.sessionId))
|
|
298
312
|
return false;
|
|
299
313
|
if (notification.messageId) {
|
|
300
314
|
const deleted = await deleteNoticeMessage(notification.sessionId, notification.messageId);
|
|
301
315
|
if (deleted) {
|
|
302
|
-
notificationDiagnostic(notification.sessionId, `notice rolled back (deleted row ${notification.messageId});
|
|
316
|
+
notificationDiagnostic(notification.sessionId, `notice rolled back (deleted row ${notification.messageId}); consumed after append`);
|
|
303
317
|
} else {
|
|
304
318
|
sessionLog(notification.sessionId, "failed to roll back a notice that landed while a run was active");
|
|
305
319
|
}
|
|
306
320
|
} else {
|
|
307
321
|
sessionLog(notification.sessionId, "notice landed while a run was active but the new row id was not returned");
|
|
308
322
|
}
|
|
309
|
-
|
|
310
|
-
client: notification.client,
|
|
311
|
-
sessionId: notification.sessionId,
|
|
312
|
-
text: notification.text,
|
|
313
|
-
params: notification.params,
|
|
314
|
-
forcePersist: notification.forcePersist
|
|
315
|
-
});
|
|
323
|
+
lastDeliveredText.set(notification.sessionId, notification.text);
|
|
316
324
|
return true;
|
|
317
325
|
}
|
|
318
326
|
async function sendIgnoredMessage2(client, sessionId, text, params, forcePersist = false) {
|
|
@@ -320,22 +328,29 @@ async function sendIgnoredMessage2(client, sessionId, text, params, forcePersist
|
|
|
320
328
|
notifyDelivered(sessionId, params);
|
|
321
329
|
return "sent";
|
|
322
330
|
}
|
|
323
|
-
if (
|
|
331
|
+
if (holdDetector(sessionId)) {
|
|
324
332
|
holdIgnoredNotification({ client, sessionId, text, params, forcePersist }, "before target checks");
|
|
325
333
|
return "queued";
|
|
326
334
|
}
|
|
335
|
+
if (lastDeliveredText.get(sessionId) === text)
|
|
336
|
+
return "sent";
|
|
327
337
|
return sendIgnoredMessageNow(client, sessionId, text, params, forcePersist);
|
|
328
338
|
}
|
|
329
339
|
async function flushIgnoredMessages2(sessionId) {
|
|
330
|
-
if (flushingIgnoredNotifications.has(sessionId)
|
|
340
|
+
if (flushingIgnoredNotifications.has(sessionId))
|
|
331
341
|
return;
|
|
332
342
|
const queued = queuedIgnoredNotifications.get(sessionId);
|
|
333
343
|
if (!queued || queued.length === 0)
|
|
334
344
|
return;
|
|
345
|
+
if (holdDetector(sessionId))
|
|
346
|
+
return;
|
|
347
|
+
const epoch = activityEpoch.get(sessionId) ?? 0;
|
|
335
348
|
queuedIgnoredNotifications.delete(sessionId);
|
|
336
349
|
flushingIgnoredNotifications.add(sessionId);
|
|
337
350
|
try {
|
|
338
351
|
for (const notification of queued) {
|
|
352
|
+
if ((activityEpoch.get(sessionId) ?? 0) !== epoch)
|
|
353
|
+
break;
|
|
339
354
|
const disposition = await sendIgnoredMessage2(notification.client, notification.sessionId, notification.text, notification.params, notification.forcePersist);
|
|
340
355
|
if (disposition === "queued") {
|
|
341
356
|
for (const remaining of queued.slice(queued.indexOf(notification) + 1)) {
|
|
@@ -351,31 +366,48 @@ async function flushIgnoredMessages2(sessionId) {
|
|
|
351
366
|
function clearIgnoredMessages2(sessionId) {
|
|
352
367
|
queuedIgnoredNotifications.delete(sessionId);
|
|
353
368
|
flushingIgnoredNotifications.delete(sessionId);
|
|
369
|
+
idleSessions.delete(sessionId);
|
|
370
|
+
lastDeliveredText.delete(sessionId);
|
|
371
|
+
activityEpoch.delete(sessionId);
|
|
354
372
|
}
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
373
|
+
function observeIgnoredNotificationEvent2(event) {
|
|
374
|
+
const record = (value) => value !== null && typeof value === "object" ? value : undefined;
|
|
375
|
+
const props = record(event.properties);
|
|
376
|
+
const info = record(props?.info);
|
|
377
|
+
const part = record(props?.part);
|
|
378
|
+
const sessionId = props?.sessionID ?? info?.sessionID ?? part?.sessionID;
|
|
379
|
+
if (typeof sessionId !== "string")
|
|
380
|
+
return;
|
|
381
|
+
if (event.type === "session.idle") {
|
|
382
|
+
idleSessions.add(sessionId);
|
|
358
383
|
return;
|
|
359
384
|
}
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
385
|
+
if (event.type === "session.deleted") {
|
|
386
|
+
clearIgnoredMessages2(sessionId);
|
|
387
|
+
return;
|
|
388
|
+
}
|
|
389
|
+
const active = event.type === "session.status" && record(props?.status)?.type !== "idle" || event.type === "message.updated" && info?.role === "assistant" || event.type === "message.part.updated" && part?.ignored !== true && part?.type !== "compaction";
|
|
390
|
+
if (!active)
|
|
391
|
+
return;
|
|
392
|
+
idleSessions.delete(sessionId);
|
|
393
|
+
activityEpoch.set(sessionId, (activityEpoch.get(sessionId) ?? 0) + 1);
|
|
394
|
+
queuedIgnoredNotifications.delete(sessionId);
|
|
395
|
+
}
|
|
396
|
+
async function sendStatusNotification2(_client, sessionId, text, params) {
|
|
367
397
|
try {
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
}
|
|
398
|
+
const { pushNotification } = await import("./rpc-notifications-4amf6mf4.js");
|
|
399
|
+
pushNotification("toast", {
|
|
400
|
+
title: extractToastTitle(text),
|
|
401
|
+
message: text,
|
|
402
|
+
variant: inferToastVariant(text),
|
|
403
|
+
duration: params.toastDurationMs ?? 5000
|
|
404
|
+
}, sessionId);
|
|
405
|
+
notifyDelivered(sessionId, params);
|
|
406
|
+
return "sent";
|
|
375
407
|
} catch (error) {
|
|
376
|
-
|
|
377
|
-
|
|
408
|
+
sessionLog(sessionId, "status RPC enqueue failed:", getErrorMessage(error));
|
|
409
|
+
return "failed";
|
|
378
410
|
}
|
|
379
411
|
}
|
|
380
412
|
|
|
381
|
-
export { getErrorMessage, describeError, setNotificationServerUrl2, sendIgnoredMessage2, flushIgnoredMessages2, clearIgnoredMessages2,
|
|
413
|
+
export { getErrorMessage, describeError, setNotificationServerUrl2, sendIgnoredMessage2, flushIgnoredMessages2, clearIgnoredMessages2, observeIgnoredNotificationEvent2, sendStatusNotification2 };
|
|
@@ -294,13 +294,16 @@ function deriveWindowGeometry(providerID, modelID, catalogLimit, options = {}) {
|
|
|
294
294
|
return;
|
|
295
295
|
const providerLimit = options.providerLimit;
|
|
296
296
|
const catalogContext = isFinitePositive(catalogLimit?.context) ? catalogLimit.context : undefined;
|
|
297
|
+
const providerContext = isFinitePositive(providerLimit?.context) ? providerLimit.context : undefined;
|
|
297
298
|
const advertised = numericOverlayFact(options.overlay, "window.advertised");
|
|
298
299
|
const enforced = numericOverlayFact(options.overlay, "window.enforced");
|
|
299
|
-
let softContext = mergePositive(enforced ?? advertised ?? catalogContext,
|
|
300
|
-
let hardContext = mergePositive(enforced ?? softContext,
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
300
|
+
let softContext = mergePositive(enforced ?? advertised ?? catalogContext, providerContext);
|
|
301
|
+
let hardContext = mergePositive(enforced ?? softContext, providerContext);
|
|
302
|
+
const contextCap = isFinitePositive(options.contextCap) ? options.contextCap : undefined;
|
|
303
|
+
const hasContextCap = contextCap !== undefined;
|
|
304
|
+
if (contextCap !== undefined) {
|
|
305
|
+
softContext = isFinitePositive(softContext) ? Math.min(softContext, contextCap) : contextCap;
|
|
306
|
+
hardContext = isFinitePositive(hardContext) ? Math.min(hardContext, contextCap) : contextCap;
|
|
304
307
|
}
|
|
305
308
|
const input = mergePositive(isFinitePositive(catalogLimit?.input) ? catalogLimit.input : undefined, providerLimit?.input);
|
|
306
309
|
if (!isFinitePositive(softContext) && !isFinitePositive(input))
|
|
@@ -361,6 +364,7 @@ function deriveWindowGeometry(providerID, modelID, catalogLimit, options = {}) {
|
|
|
361
364
|
const hardWindow = hardContext ?? softContext ?? input;
|
|
362
365
|
if (!isFinitePositive(hardWindow))
|
|
363
366
|
return;
|
|
367
|
+
const windowSource = hasContextCap ? "detected" : providerContext !== undefined ? "provider" : enforced !== undefined || advertised !== undefined ? "overlay" : "catalog";
|
|
364
368
|
let usableHard;
|
|
365
369
|
if (geometry === "separate") {
|
|
366
370
|
usableHard = hardWindow;
|
|
@@ -388,7 +392,41 @@ function deriveWindowGeometry(providerID, modelID, catalogLimit, options = {}) {
|
|
|
388
392
|
window: Math.floor(resolvedWindow),
|
|
389
393
|
reserve: Math.floor(Math.max(0, resolvedWindow - usableSoft)),
|
|
390
394
|
reserveSource,
|
|
391
|
-
geometry
|
|
395
|
+
geometry,
|
|
396
|
+
windowSource,
|
|
397
|
+
absoluteWall: Math.floor(hardWindow)
|
|
398
|
+
}
|
|
399
|
+
};
|
|
400
|
+
}
|
|
401
|
+
function hasTrustedAbsoluteWall(geometry) {
|
|
402
|
+
return geometry.derivation.windowSource !== "catalog";
|
|
403
|
+
}
|
|
404
|
+
function applyProvenInputFloor(geometry, provenInputTokens) {
|
|
405
|
+
if (!isFinitePositive(provenInputTokens) || provenInputTokens < MIN_PLAUSIBLE_CONTEXT_LIMIT || provenInputTokens <= geometry.usableSoft) {
|
|
406
|
+
return { geometry };
|
|
407
|
+
}
|
|
408
|
+
if (hasTrustedAbsoluteWall(geometry) && provenInputTokens > geometry.derivation.absoluteWall) {
|
|
409
|
+
return {
|
|
410
|
+
geometry,
|
|
411
|
+
refused: {
|
|
412
|
+
reading: provenInputTokens,
|
|
413
|
+
absoluteWall: geometry.derivation.absoluteWall
|
|
414
|
+
}
|
|
415
|
+
};
|
|
416
|
+
}
|
|
417
|
+
const trustedAbsoluteWall = hasTrustedAbsoluteWall(geometry);
|
|
418
|
+
const window = trustedAbsoluteWall ? geometry.derivation.window : Math.max(geometry.derivation.window, provenInputTokens);
|
|
419
|
+
return {
|
|
420
|
+
geometry: {
|
|
421
|
+
...geometry,
|
|
422
|
+
usableSoft: provenInputTokens,
|
|
423
|
+
usableHard: trustedAbsoluteWall ? geometry.usableHard : Math.max(geometry.usableHard, provenInputTokens),
|
|
424
|
+
derivation: {
|
|
425
|
+
...geometry.derivation,
|
|
426
|
+
window,
|
|
427
|
+
reserve: Math.max(0, window - provenInputTokens),
|
|
428
|
+
absoluteWall: trustedAbsoluteWall ? geometry.derivation.absoluteWall : Math.max(geometry.derivation.absoluteWall, provenInputTokens)
|
|
429
|
+
}
|
|
392
430
|
}
|
|
393
431
|
};
|
|
394
432
|
}
|
|
@@ -739,4 +777,4 @@ function resolveHistorianContextLimit2(historianModelOverride) {
|
|
|
739
777
|
return DEFAULT_HISTORIAN_CONTEXT_FALLBACK;
|
|
740
778
|
}
|
|
741
779
|
|
|
742
|
-
export { setStoragePrivatePermissionEnforcement, shouldEnforcePrivateStoragePermissions, setWindowOverlayPath, reloadWindowOverlay, formatWindowDerivationLine, isSaneLimit, setOutputReserveConfig, refreshModelLimitsFromApi, refreshModelLimitsAfterAuthOnce, getSdkWindowGeometry, getSdkContextLimit, modelSupportsVision, deriveTriggerBudget2, deriveHistorianChunkTokens2, resolveKnownHistorianContextLimit2, resolveHistorianContextLimit2 };
|
|
780
|
+
export { setStoragePrivatePermissionEnforcement, shouldEnforcePrivateStoragePermissions, setWindowOverlayPath, reloadWindowOverlay, hasTrustedAbsoluteWall, applyProvenInputFloor, formatWindowDerivationLine, isSaneLimit, setOutputReserveConfig, refreshModelLimitsFromApi, refreshModelLimitsAfterAuthOnce, getSdkWindowGeometry, getSdkContextLimit, modelSupportsVision, deriveTriggerBudget2, deriveHistorianChunkTokens2, resolveKnownHistorianContextLimit2, resolveHistorianContextLimit2 };
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAw/BvE,QAAA,MAAM,MAAM,EAAE,YAGb,CAAC;AAEF,eAAe,MAAM,CAAC"}
|