@cortexkit/opencode-magic-context 0.33.1 → 0.34.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 +20 -3
- package/dist/config/agent-disable.d.ts +22 -0
- package/dist/config/agent-disable.d.ts.map +1 -1
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/migrate-experimental.d.ts +2 -1
- package/dist/config/migrate-experimental.d.ts.map +1 -1
- package/dist/config/project-security.d.ts +9 -0
- package/dist/config/project-security.d.ts.map +1 -1
- package/dist/config/schema/magic-context.d.ts +90 -17
- package/dist/config/schema/magic-context.d.ts.map +1 -1
- package/dist/config/transform-mode.d.ts +2 -0
- package/dist/config/transform-mode.d.ts.map +1 -1
- package/dist/{conflict-warning-hook-n48c783v.js → conflict-warning-hook-fvpfvt0w.js} +1 -1
- package/dist/{derive-budgets-e9j09sjr.js → derive-budgets-9crp0cvd.js} +1 -1
- package/dist/features/builtin-commands/commands.d.ts +1 -1
- package/dist/features/builtin-commands/commands.d.ts.map +1 -1
- package/dist/features/magic-context/compaction-marker.d.ts +57 -0
- package/dist/features/magic-context/compaction-marker.d.ts.map +1 -1
- package/dist/features/magic-context/compartment-chunk-embedding.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/classify.d.ts +1 -0
- 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 +1 -0
- package/dist/features/magic-context/dreamer/map-memories.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/refresh-primers.d.ts +1 -0
- package/dist/features/magic-context/dreamer/refresh-primers.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/storage-dream-runs.d.ts +2 -0
- package/dist/features/magic-context/dreamer/storage-dream-runs.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/task-executor.d.ts +4 -1
- package/dist/features/magic-context/dreamer/task-executor.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/task-gates.d.ts +19 -1
- package/dist/features/magic-context/dreamer/task-gates.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/task-registry.d.ts +28 -0
- package/dist/features/magic-context/dreamer/task-registry.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/task-scheduler.d.ts +7 -1
- package/dist/features/magic-context/dreamer/task-scheduler.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/verify.d.ts +1 -0
- package/dist/features/magic-context/dreamer/verify.d.ts.map +1 -1
- package/dist/features/magic-context/fail-closed-block.d.ts +10 -0
- package/dist/features/magic-context/fail-closed-block.d.ts.map +1 -1
- package/dist/features/magic-context/git-commits/storage-git-commit-embeddings.d.ts.map +1 -1
- package/dist/features/magic-context/git-commits/storage-git-commits.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 +7 -1
- package/dist/features/magic-context/memory/embedding-local.d.ts.map +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 +2 -6
- package/dist/features/magic-context/memory/project-identity.d.ts.map +1 -1
- package/dist/features/magic-context/memory/storage-memory-embeddings.d.ts.map +1 -1
- package/dist/features/magic-context/migrations.d.ts +23 -1
- package/dist/features/magic-context/migrations.d.ts.map +1 -1
- package/dist/features/magic-context/mural/compress-cues.d.ts +1 -0
- package/dist/features/magic-context/mural/compress-cues.d.ts.map +1 -1
- package/dist/features/magic-context/mural/render-mural.d.ts.map +1 -1
- package/dist/features/magic-context/overflow-detection.d.ts +8 -1
- package/dist/features/magic-context/overflow-detection.d.ts.map +1 -1
- package/dist/features/magic-context/project-embedding-registry.d.ts.map +1 -1
- package/dist/features/magic-context/scheduler.d.ts.map +1 -1
- package/dist/features/magic-context/schema-fence-probe.d.ts +28 -0
- package/dist/features/magic-context/schema-fence-probe.d.ts.map +1 -0
- package/dist/features/magic-context/sidekick/agent.d.ts.map +1 -1
- package/dist/features/magic-context/smart-notes/compiler.d.ts.map +1 -1
- package/dist/features/magic-context/storage-db.d.ts +37 -2
- package/dist/features/magic-context/storage-db.d.ts.map +1 -1
- package/dist/features/magic-context/storage-meta-persisted.d.ts +38 -4
- 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.d.ts +2 -2
- package/dist/features/magic-context/storage.d.ts.map +1 -1
- package/dist/features/magic-context/user-memory/review-user-memories.d.ts.map +1 -1
- package/dist/hooks/magic-context/boundary-execution.d.ts +1 -1
- package/dist/hooks/magic-context/boundary-execution.d.ts.map +1 -1
- package/dist/hooks/magic-context/cache-busting-signals.d.ts +1 -0
- package/dist/hooks/magic-context/cache-busting-signals.d.ts.map +1 -1
- package/dist/hooks/magic-context/child-session-spawn.d.ts +26 -0
- package/dist/hooks/magic-context/child-session-spawn.d.ts.map +1 -0
- package/dist/hooks/magic-context/command-handler.d.ts +3 -0
- package/dist/hooks/magic-context/command-handler.d.ts.map +1 -1
- package/dist/hooks/magic-context/compaction-off-transition.d.ts +96 -0
- package/dist/hooks/magic-context/compaction-off-transition.d.ts.map +1 -0
- package/dist/hooks/magic-context/compartment-runner-historian.d.ts +2 -0
- package/dist/hooks/magic-context/compartment-runner-historian.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-mapping.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-trigger.d.ts +12 -5
- package/dist/hooks/magic-context/compartment-trigger.d.ts.map +1 -1
- package/dist/hooks/magic-context/ctx-reduce-availability.d.ts +47 -1
- package/dist/hooks/magic-context/ctx-reduce-availability.d.ts.map +1 -1
- package/dist/hooks/magic-context/emergency-drop.d.ts +2 -2
- package/dist/hooks/magic-context/event-handler.d.ts +7 -0
- package/dist/hooks/magic-context/event-handler.d.ts.map +1 -1
- package/dist/hooks/magic-context/event-resolvers.d.ts +13 -21
- package/dist/hooks/magic-context/event-resolvers.d.ts.map +1 -1
- package/dist/hooks/magic-context/execute-status.d.ts +5 -1
- package/dist/hooks/magic-context/execute-status.d.ts.map +1 -1
- package/dist/hooks/magic-context/final-wire-token-estimate.d.ts +2 -0
- package/dist/hooks/magic-context/final-wire-token-estimate.d.ts.map +1 -1
- package/dist/hooks/magic-context/heuristic-cleanup.d.ts +1 -1
- package/dist/hooks/magic-context/hook-handlers.d.ts +1 -0
- package/dist/hooks/magic-context/hook-handlers.d.ts.map +1 -1
- package/dist/hooks/magic-context/hook.d.ts +14 -6
- package/dist/hooks/magic-context/hook.d.ts.map +1 -1
- package/dist/hooks/magic-context/inject-compartments.d.ts +10 -1
- package/dist/hooks/magic-context/inject-compartments.d.ts.map +1 -1
- package/dist/hooks/magic-context/live-session-state.d.ts +3 -0
- package/dist/hooks/magic-context/live-session-state.d.ts.map +1 -1
- package/dist/hooks/magic-context/protected-tail-boundary.d.ts.map +1 -1
- package/dist/hooks/magic-context/read-session-db.d.ts.map +1 -1
- package/dist/hooks/magic-context/read-session-true-raw-tokens.d.ts.map +1 -1
- package/dist/hooks/magic-context/rust-mode-transform.d.ts +3 -0
- package/dist/hooks/magic-context/rust-mode-transform.d.ts.map +1 -1
- package/dist/hooks/magic-context/send-session-notification.d.ts +20 -1
- package/dist/hooks/magic-context/send-session-notification.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform-compartment-phase.d.ts +3 -0
- package/dist/hooks/magic-context/transform-compartment-phase.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts +31 -1
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform.d.ts +29 -2
- package/dist/hooks/magic-context/transform.d.ts.map +1 -1
- package/dist/{index-56yjaeb2.js → index-2y0ybv5x.js} +11 -1
- package/dist/{index-ey1bc14z.js → index-b563sga5.js} +7 -264
- package/dist/{index-y1c9tcm3.js → index-cn960ffd.js} +101 -20
- package/dist/{index-xyaekybw.js → index-dtas91s5.js} +6 -4
- package/dist/index-fcyvznch.js +279 -0
- package/dist/{index-63dq2g4d.js → index-ry8rh8cv.js} +138 -24
- package/dist/{index-c2gahrks.js → index-x8spt5wy.js} +1682 -893
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1677 -723
- package/dist/plugin/dream-timer.d.ts +4 -2
- package/dist/plugin/dream-timer.d.ts.map +1 -1
- package/dist/plugin/embedding-bootstrap.d.ts.map +1 -1
- package/dist/plugin/hooks/create-session-hooks.d.ts +12 -1
- package/dist/plugin/hooks/create-session-hooks.d.ts.map +1 -1
- package/dist/plugin/messages-transform.d.ts +10 -0
- package/dist/plugin/messages-transform.d.ts.map +1 -1
- package/dist/plugin/rpc-handlers.d.ts +3 -7
- package/dist/plugin/rpc-handlers.d.ts.map +1 -1
- package/dist/plugin/tool-registry.d.ts +8 -0
- package/dist/plugin/tool-registry.d.ts.map +1 -1
- package/dist/{recomp-orchestrator-2yb2hfh2.js → recomp-orchestrator-k72ejkkh.js} +6 -4
- package/dist/send-session-notification-6njqewzk.js +20 -0
- package/dist/shared/conflict-detector.d.ts +38 -1
- package/dist/shared/conflict-detector.d.ts.map +1 -1
- package/dist/shared/conflict-fixer.d.ts +18 -1
- package/dist/shared/conflict-fixer.d.ts.map +1 -1
- package/dist/shared/context-limit-provenance.d.ts +3 -0
- package/dist/shared/context-limit-provenance.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-threshold.d.ts +1 -1
- package/dist/shared/models-dev-cache.d.ts +29 -3
- package/dist/shared/models-dev-cache.d.ts.map +1 -1
- package/dist/shared/rpc-server.d.ts.map +1 -1
- package/dist/shared/rpc-types.d.ts +51 -1
- package/dist/shared/rpc-types.d.ts.map +1 -1
- package/dist/shared/rpc-utils.d.ts +19 -0
- package/dist/shared/rpc-utils.d.ts.map +1 -1
- package/dist/shared/storage-permissions.d.ts +5 -0
- package/dist/shared/storage-permissions.d.ts.map +1 -0
- package/dist/shared/tui-runtime-specifiers.d.ts +20 -0
- package/dist/shared/tui-runtime-specifiers.d.ts.map +1 -0
- package/dist/{storage-meta-session-td6bwtky.js → storage-meta-session-xt41zbw4.js} +2 -1
- package/dist/{task-config-5nx3qfz8.js → task-config-gbp7r23g.js} +1 -1
- package/dist/tui/compaction-off.d.ts +13 -0
- package/dist/tui/compaction-off.d.ts.map +1 -0
- package/dist/tui/data/context-db.d.ts.map +1 -1
- package/dist/tui-compiled/compaction-off.d.ts +13 -0
- package/dist/tui-compiled/compaction-off.d.ts.map +1 -0
- package/dist/tui-compiled/data/context-db.d.ts.map +1 -1
- package/package.json +6 -1
- package/src/agents/dreamer.ts +68 -0
- package/src/agents/hidden-agent-registrations.ts +331 -0
- package/src/agents/historian.ts +3 -0
- package/src/agents/language-directive.test.ts +138 -0
- package/src/agents/language-directive.ts +121 -0
- package/src/agents/magic-context-prompt.language.test.ts +35 -0
- package/src/agents/magic-context-prompt.test.ts +292 -0
- package/src/agents/magic-context-prompt.ts +182 -0
- package/src/agents/permissions.test.ts +252 -0
- package/src/agents/permissions.ts +186 -0
- package/src/agents/sidekick.ts +1 -0
- package/src/agents/smart-note-compiler.ts +1 -0
- package/src/config/agent-disable.ts +106 -0
- package/src/config/compaction-accessor-guard.test.ts +82 -0
- package/src/config/compaction-backcompat.test.ts +52 -0
- package/src/config/index.test.ts +936 -0
- package/src/config/index.ts +601 -0
- package/src/config/migrate-config-location.test.ts +332 -0
- package/src/config/migrate-config-location.ts +635 -0
- package/src/config/migrate-dreamer-v2.test.ts +287 -0
- package/src/config/migrate-dreamer-v2.ts +336 -0
- package/src/config/migrate-experimental.test.ts +41 -0
- package/src/config/migrate-experimental.ts +185 -0
- package/src/config/project-security.test.ts +388 -0
- package/src/config/project-security.ts +611 -0
- package/src/config/prune-config-leaf.test.ts +78 -0
- package/src/config/prune-config-leaf.ts +68 -0
- package/src/config/removed-config-keys.test.ts +116 -0
- package/src/config/schema/agent-overrides.ts +45 -0
- package/src/config/schema/magic-context.test.ts +359 -0
- package/src/config/schema/magic-context.ts +991 -0
- package/src/config/transform-mode.test.ts +62 -0
- package/src/config/transform-mode.ts +34 -0
- package/src/config/variable.test.ts +323 -0
- package/src/config/variable.ts +192 -0
- package/src/features/magic-context/defaults.ts +1 -0
- package/src/features/magic-context/dreamer/cron.ts +243 -0
- package/src/features/magic-context/dreamer/task-registry.ts +151 -0
- package/src/shared/conflict-detector.test.ts +121 -0
- package/src/shared/conflict-detector.ts +50 -3
- package/src/shared/conflict-fixer.test.ts +309 -0
- package/src/shared/conflict-fixer.ts +82 -5
- package/src/shared/context-limit-provenance.ts +6 -0
- package/src/shared/escalation-bands.test.ts +23 -0
- package/src/shared/escalation-bands.ts +18 -0
- package/src/shared/format-threshold.ts +1 -1
- package/src/shared/models-dev-cache.test.ts +171 -0
- package/src/shared/models-dev-cache.ts +195 -38
- package/src/shared/rpc-server.ts +27 -18
- package/src/shared/rpc-types.ts +55 -1
- package/src/shared/rpc-utils.test.ts +157 -0
- package/src/shared/rpc-utils.ts +137 -0
- package/src/shared/storage-permissions.ts +20 -0
- package/src/shared/tui-runtime-specifiers.ts +32 -0
- package/src/tui/compaction-off.test.ts +56 -0
- package/src/tui/compaction-off.ts +29 -0
- package/src/tui/data/context-db.ts +6 -0
- package/src/tui/index.tsx +113 -65
- package/src/tui/slots/sidebar-content.tsx +189 -91
- package/src/tui/tui-compiled-runtime-imports.test.ts +151 -0
- package/src/tui-compiled/compaction-off.ts +29 -0
- package/src/tui-compiled/data/context-db.ts +6 -0
- package/src/tui-compiled/index.tsx +558 -455
- package/src/tui-compiled/slots/sidebar-content.tsx +334 -169
- package/dist/send-session-notification-tghq9gnh.js +0 -11
- /package/dist/{index-v7fmc1s2.js → index-ygcng9t8.js} +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { DreamerConfig } from "../config/schema/magic-context";
|
|
2
2
|
import type { ClassifyModuleClient } from "../features/magic-context/dreamer/classify";
|
|
3
3
|
import { type RetrospectiveRawProvider } from "../features/magic-context/dreamer/retrospective-raw-provider";
|
|
4
|
+
import type { DreamTaskName, DreamTaskProgress } from "../features/magic-context/dreamer/task-registry";
|
|
4
5
|
import type { RawMessageProvider } from "../hooks/magic-context/read-session-chunk";
|
|
5
6
|
import type { Database } from "../shared/sqlite";
|
|
6
7
|
import type { PluginContext } from "./types";
|
|
@@ -8,7 +9,7 @@ import type { PluginContext } from "./types";
|
|
|
8
9
|
* Per-project work registered with the timer. The timer is a process-wide
|
|
9
10
|
* singleton, but Desktop OpenCode can load the same plugin once per project
|
|
10
11
|
* within one process — every load needs its directory's git commits indexed,
|
|
11
|
-
* its dream schedule checked, and its
|
|
12
|
+
* its dream schedule checked, and its config respected.
|
|
12
13
|
*/
|
|
13
14
|
interface ProjectRegistration {
|
|
14
15
|
directory: string;
|
|
@@ -23,7 +24,7 @@ interface ProjectRegistration {
|
|
|
23
24
|
};
|
|
24
25
|
memoryEnabled?: boolean;
|
|
25
26
|
memoryInjectionBudgetTokens?: number;
|
|
26
|
-
|
|
27
|
+
mural?: {
|
|
27
28
|
enabled: boolean;
|
|
28
29
|
model?: string;
|
|
29
30
|
};
|
|
@@ -47,6 +48,7 @@ interface ProjectRegistration {
|
|
|
47
48
|
*/
|
|
48
49
|
primerRawProviderFactory?: (sessionId: string) => Promise<RawMessageProvider | null> | RawMessageProvider | null;
|
|
49
50
|
transformMode?: "ts" | "rust";
|
|
51
|
+
onDreamerProgress?: (progress: DreamTaskProgress | null, completedTask?: DreamTaskName) => void;
|
|
50
52
|
moduleClient?: ClassifyModuleClient & {
|
|
51
53
|
authorityStatus?: (args: {
|
|
52
54
|
context_store_uuid: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dream-timer.d.ts","sourceRoot":"","sources":["../../src/plugin/dream-timer.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AASvF,OAAO,EAEH,KAAK,wBAAwB,EAChC,MAAM,8DAA8D,CAAC;
|
|
1
|
+
{"version":3,"file":"dream-timer.d.ts","sourceRoot":"","sources":["../../src/plugin/dream-timer.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AASvF,OAAO,EAEH,KAAK,wBAAwB,EAChC,MAAM,8DAA8D,CAAC;AAOtE,OAAO,KAAK,EACR,aAAa,EACb,iBAAiB,EACpB,MAAM,iDAAiD,CAAC;AA4BzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AAGpF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAS7C;;;;;GAKG;AACH,UAAU,mBAAmB;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;IAChC,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iBAAiB,CAAC,EAAE;QAChB,OAAO,EAAE,OAAO,CAAC;QACjB,UAAU,EAAE,MAAM,CAAC;QACnB,WAAW,EAAE,MAAM,CAAC;KACvB,CAAC;IACF,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,2BAA2B,CA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MAAM,IAAI,CAAC,GAAG,SAAS,CAAC,CAoEnC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"embedding-bootstrap.d.ts","sourceRoot":"","sources":["../../src/plugin/embedding-bootstrap.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAIjD,wBAAsB,4CAA4C,CAC9D,SAAS,EAAE,MAAM,EACjB,EAAE,EAAE,QAAQ,GACb,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"embedding-bootstrap.d.ts","sourceRoot":"","sources":["../../src/plugin/embedding-bootstrap.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAIjD,wBAAsB,4CAA4C,CAC9D,SAAS,EAAE,MAAM,EACjB,EAAE,EAAE,QAAQ,GACb,OAAO,CAAC,IAAI,CAAC,CA8Bf"}
|
|
@@ -24,7 +24,8 @@ export declare function buildMagicContextHookConfig(pluginConfig: MagicContextPl
|
|
|
24
24
|
subtask?: boolean;
|
|
25
25
|
}>;
|
|
26
26
|
enabled: boolean;
|
|
27
|
-
|
|
27
|
+
allow_home_project: boolean;
|
|
28
|
+
mural: import("../../config/schema/magic-context").MuralConfig;
|
|
28
29
|
transform_mode: "ts" | "rust";
|
|
29
30
|
auto_update?: boolean;
|
|
30
31
|
language?: string;
|
|
@@ -34,6 +35,10 @@ export declare function buildMagicContextHookConfig(pluginConfig: MagicContextPl
|
|
|
34
35
|
default: string;
|
|
35
36
|
[modelKey: string]: string;
|
|
36
37
|
};
|
|
38
|
+
output_reserve?: number | {
|
|
39
|
+
default: number;
|
|
40
|
+
[modelKey: string]: number;
|
|
41
|
+
};
|
|
37
42
|
toast_duration_ms?: number;
|
|
38
43
|
execute_threshold_tokens?: {
|
|
39
44
|
default?: number;
|
|
@@ -50,6 +55,9 @@ export declare function buildMagicContextHookConfig(pluginConfig: MagicContextPl
|
|
|
50
55
|
cache_size_mb: number;
|
|
51
56
|
mmap_size_mb: number;
|
|
52
57
|
};
|
|
58
|
+
storage: {
|
|
59
|
+
enforce_private_permissions: boolean;
|
|
60
|
+
};
|
|
53
61
|
system_prompt_injection: {
|
|
54
62
|
enabled: boolean;
|
|
55
63
|
skip_signatures: string[];
|
|
@@ -57,6 +65,9 @@ export declare function buildMagicContextHookConfig(pluginConfig: MagicContextPl
|
|
|
57
65
|
temporal_awareness: boolean;
|
|
58
66
|
keep_subagents: boolean;
|
|
59
67
|
fail_closed_blocking: boolean;
|
|
68
|
+
compaction: {
|
|
69
|
+
enabled: boolean;
|
|
70
|
+
};
|
|
60
71
|
todowrite: {
|
|
61
72
|
enabled: boolean;
|
|
62
73
|
overlay: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-session-hooks.d.ts","sourceRoot":"","sources":["../../../src/plugin/hooks/create-session-hooks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AAO7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AACrF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+CAA+C,CAAC;AAC1F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAAC,YAAY,EAAE,wBAAwB;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"create-session-hooks.d.ts","sourceRoot":"","sources":["../../../src/plugin/hooks/create-session-hooks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AAO7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AACrF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+CAA+C,CAAC;AAC1F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAAC,YAAY,EAAE,wBAAwB;;;;;;;;;mBAC5C,CAAC;aAA2B,CAAC;aACnD,CAAC;eAA6B,CAAC;;;;;;;;;;;;;;;;;;;;eAsFq9gB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAzEpghB;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE;IACrC,GAAG,EAAE,aAAa,CAAC;IACnB,YAAY,EAAE,wBAAwB,CAAC;IACvC,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;CAC/C;;;;;;;;;qBAkE4zI,CAAC;;;;;;;;;;;;qBAA38C,CAAC;mBAAyB,CAAC;iBAAuB,CAAC;iBAAuB,CAAC;0BAAc,CAAC;uBAAiB,CAAC;;;;;;0BAAk1vD,CAAC;;;;;;;;;EArCjz1D;AAED,wBAAsB,uBAAuB,CAAC,IAAI,EAAE;IAChD,GAAG,EAAE,aAAa,CAAC;IACnB,YAAY,EAAE,wBAAwB,CAAC;IACvC,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;CAC/C;;;;;;;;;qBA8B4zI,CAAC;;;;;;;;;;;;qBAA38C,CAAC;mBAAyB,CAAC;iBAAuB,CAAC;iBAAuB,CAAC;0BAAc,CAAC;uBAAiB,CAAC;;;;;;0BAAk1vD,CAAC;;;;;;;;;GADjz1D"}
|
|
@@ -57,6 +57,16 @@ export declare function createMessagesTransformHandler(args: {
|
|
|
57
57
|
getMagicContext?: () => MagicContextTransformHooks;
|
|
58
58
|
failClosed?: FailClosedController | null;
|
|
59
59
|
failClosedBlockingEnabled?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Compaction-off mode (issue #266): the fail-closed BLOCKING wrapper is
|
|
62
|
+
* inert BY DESIGN — MC inoperability no longer risks unbounded growth
|
|
63
|
+
* because native compaction (or nothing) owns the window. A thrown or
|
|
64
|
+
* failed transform degrades to passthrough of the input messages: no
|
|
65
|
+
* blocking message, no cancelled request, one diagnostic. The enforce
|
|
66
|
+
* call still runs (its re-probe can heal storage mid-process), but any
|
|
67
|
+
* error it raises is converted to passthrough here.
|
|
68
|
+
*/
|
|
69
|
+
compactionOff?: boolean;
|
|
60
70
|
internalChildSessions?: Set<string>;
|
|
61
71
|
tryReopenStorage?: () => boolean | Promise<boolean>;
|
|
62
72
|
}): (input: Record<string, never>, output: MessagesTransformOutput) => Promise<MessageWithParts[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages-transform.d.ts","sourceRoot":"","sources":["../../src/plugin/messages-transform.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,oBAAoB,EAI5B,MAAM,6CAA6C,CAAC;AAoBrD,KAAK,gBAAgB,GAAG;IACpB,IAAI,EAAE,OAAO,kBAAkB,EAAE,OAAO,CAAC;IACzC,KAAK,EAAE,OAAO,kBAAkB,EAAE,IAAI,EAAE,CAAC;CAC5C,CAAC;AAEF,KAAK,uBAAuB,GAAG;IAAE,QAAQ,EAAE,gBAAgB,EAAE,CAAA;CAAE,CAAC;AAEhE,KAAK,0BAA0B,GAAG;IAC9B,sCAAsC,CAAC,EAAE,CACrC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EAC5B,MAAM,EAAE,uBAAuB,KAC9B,OAAO,CAAC,IAAI,CAAC,CAAC;CACtB,GAAG,IAAI,CAAC;AAMT;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAgB,8BAA8B,CAAC,IAAI,EAAE;IACjD,YAAY,EAAE,0BAA0B,CAAC;IACzC;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,0BAA0B,CAAC;IACnD,UAAU,CAAC,EAAE,oBAAoB,GAAG,IAAI,CAAC;IACzC,yBAAyB,CAAC,EAAE,OAAO,CAAC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gBAAgB,CAAC,EAAE,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACvD,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,uBAAuB,KAAK,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAsLjG"}
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Server-side RPC handlers. Queries the server's own SQLite DB
|
|
3
|
-
* and returns typed responses for TUI consumption.
|
|
4
|
-
*/
|
|
5
1
|
import type { MagicContextConfig } from "../config/schema/magic-context";
|
|
6
2
|
import { type ContextDatabase as Database } from "../features/magic-context/storage";
|
|
7
3
|
import type { LiveSessionState } from "../hooks/magic-context/live-session-state";
|
|
@@ -23,11 +19,11 @@ export interface RustSessionStatus {
|
|
|
23
19
|
wrapup_active?: boolean;
|
|
24
20
|
wrapup_rounds?: number | null;
|
|
25
21
|
}
|
|
26
|
-
export declare function buildSidebarSnapshot(db: Database, sessionId: string, directory: string, liveSessionState?: LiveSessionState, injectionBudgetTokens?: number, config?: Record<string, unknown>, moduleStatus?: RustSessionStatus): SidebarSnapshot;
|
|
22
|
+
export declare function buildSidebarSnapshot(db: Database, sessionId: string, directory: string, liveSessionState?: LiveSessionState, injectionBudgetTokens?: number, config?: Record<string, unknown>, moduleStatus?: RustSessionStatus, compactionEnabled?: boolean): SidebarSnapshot;
|
|
27
23
|
/** Convert snapshot-build failures into a transport-failure envelope. A genuine
|
|
28
24
|
* zero snapshot remains a successful value so deleted sessions stay deleted. */
|
|
29
|
-
export declare function buildSidebarSnapshotRpcResponse(db: Database, sessionId: string, directory: string, liveSessionState?: LiveSessionState, injectionBudgetTokens?: number, config?: Record<string, unknown>, moduleStatus?: RustSessionStatus): Record<string, unknown>;
|
|
30
|
-
export declare function buildStatusDetail(db: Database, sessionId: string, directory: string, modelKey?: string, config?: Record<string, unknown>, liveSessionState?: LiveSessionState, injectionBudgetTokens?: number, moduleStatus?: RustSessionStatus): StatusDetail;
|
|
25
|
+
export declare function buildSidebarSnapshotRpcResponse(db: Database, sessionId: string, directory: string, liveSessionState?: LiveSessionState, injectionBudgetTokens?: number, config?: Record<string, unknown>, moduleStatus?: RustSessionStatus, compactionEnabled?: boolean): Record<string, unknown>;
|
|
26
|
+
export declare function buildStatusDetail(db: Database, sessionId: string, directory: string, modelKey?: string, config?: Record<string, unknown>, liveSessionState?: LiveSessionState, injectionBudgetTokens?: number, moduleStatus?: RustSessionStatus, compactionEnabled?: boolean): StatusDetail;
|
|
31
27
|
/**
|
|
32
28
|
* Register all RPC handlers on the server.
|
|
33
29
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpc-handlers.d.ts","sourceRoot":"","sources":["../../src/plugin/rpc-handlers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rpc-handlers.d.ts","sourceRoot":"","sources":["../../src/plugin/rpc-handlers.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAWzE,OAAO,EACH,KAAK,eAAe,IAAI,QAAQ,EAGnC,MAAM,mCAAmC,CAAC;AAkB3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAQlF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAavF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,KAAK,EAAe,eAAe,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAUtF,MAAM,WAAW,iBAAiB;IAC9B,KAAK,CAAC,EAAE;QAAE,0BAA0B,CAAC,EAAE,MAAM,CAAC;QAAC,oBAAoB,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/E,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC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AiB,UAAO,GACzB,YAAY,CAuNd;AA4BD;;GAEG;AACH,wBAAgB,mBAAmB,CAC/B,SAAS,EAAE,qBAAqB,EAChC,IAAI,EAAE;IACF,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,MAAM,EAAE,OAAO,CAAC;IAChB,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;CAC/C,GACF,IAAI,CA2PN"}
|
|
@@ -2,6 +2,14 @@ import type { ToolDefinition } from "@opencode-ai/plugin";
|
|
|
2
2
|
import type { MagicContextPluginConfig } from "../config";
|
|
3
3
|
import type { RustToolBackends } from "./rust-tool-backends";
|
|
4
4
|
import type { PluginContext } from "./types";
|
|
5
|
+
/**
|
|
6
|
+
* The enumerated tool IDs removed in compaction-off mode (today exactly
|
|
7
|
+
* `["ctx_reduce"]`). Exported so the acceptance test diffs the mode-off tool
|
|
8
|
+
* set against the mode-on set and asserts the difference equals exactly this
|
|
9
|
+
* list — a future tool the reduce factory grows appears here and fails the
|
|
10
|
+
* diff rather than silently vanishing in compaction-off mode.
|
|
11
|
+
*/
|
|
12
|
+
export declare function getCompactionOffRemovedToolIds(): readonly string[];
|
|
5
13
|
export declare function createToolRegistry(args: {
|
|
6
14
|
ctx: PluginContext;
|
|
7
15
|
pluginConfig: MagicContextPluginConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-registry.d.ts","sourceRoot":"","sources":["../../src/plugin/tool-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"tool-registry.d.ts","sourceRoot":"","sources":["../../src/plugin/tool-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAoB1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAiB7C;;;;;;GAMG;AACH,wBAAgB,8BAA8B,IAAI,SAAS,MAAM,EAAE,CAElE;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE;IACrC,GAAG,EAAE,aAAa,CAAC;IACnB,YAAY,EAAE,wBAAwB,CAAC;IACvC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;CACvC,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAoHjC"}
|
|
@@ -9,11 +9,13 @@ import {
|
|
|
9
9
|
setRecompNote,
|
|
10
10
|
setRecompStarting,
|
|
11
11
|
setRecompTerminal
|
|
12
|
-
} from "./index-
|
|
13
|
-
import"./index-
|
|
12
|
+
} from "./index-x8spt5wy.js";
|
|
13
|
+
import"./index-ry8rh8cv.js";
|
|
14
14
|
import"./index-td9depx5.js";
|
|
15
|
-
import"./index-
|
|
16
|
-
import"./index-
|
|
15
|
+
import"./index-cn960ffd.js";
|
|
16
|
+
import"./index-b563sga5.js";
|
|
17
|
+
import"./index-fcyvznch.js";
|
|
18
|
+
import"./index-d62ypazr.js";
|
|
17
19
|
import"./index-k1esqfwk.js";
|
|
18
20
|
import"./index-kvrcg31b.js";
|
|
19
21
|
import"./index-wckvcay0.js";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
MAX_QUEUED_IGNORED_NOTIFICATIONS,
|
|
3
|
+
__ignoredNotificationTest,
|
|
4
|
+
clearIgnoredMessages,
|
|
5
|
+
flushIgnoredMessages,
|
|
6
|
+
sendIgnoredMessage,
|
|
7
|
+
sendUserPrompt
|
|
8
|
+
} from "./index-cn960ffd.js";
|
|
9
|
+
import"./index-fcyvznch.js";
|
|
10
|
+
import"./index-k1esqfwk.js";
|
|
11
|
+
import"./index-kvrcg31b.js";
|
|
12
|
+
import"./index-wckvcay0.js";
|
|
13
|
+
export {
|
|
14
|
+
sendUserPrompt,
|
|
15
|
+
sendIgnoredMessage,
|
|
16
|
+
flushIgnoredMessages,
|
|
17
|
+
clearIgnoredMessages,
|
|
18
|
+
__ignoredNotificationTest,
|
|
19
|
+
MAX_QUEUED_IGNORED_NOTIFICATIONS
|
|
20
|
+
};
|
|
@@ -12,12 +12,49 @@ export interface ConflictResult {
|
|
|
12
12
|
omoContextWindowMonitor: boolean;
|
|
13
13
|
omoAnthropicRecovery: boolean;
|
|
14
14
|
};
|
|
15
|
+
/**
|
|
16
|
+
* Resolved native compaction state observed during detection, for honest
|
|
17
|
+
* reporting in both MC modes. `auto`/`prune` reflect the OpenCode
|
|
18
|
+
* `compaction` block as resolved by the detector (env override, project
|
|
19
|
+
* then user, default-on). They are populated even when MC compaction is
|
|
20
|
+
* OFF (in which case they are NOT flagged as conflicts).
|
|
21
|
+
*/
|
|
22
|
+
nativeCompaction: {
|
|
23
|
+
auto: boolean;
|
|
24
|
+
prune: boolean;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Options for {@link detectConflicts}.
|
|
29
|
+
*
|
|
30
|
+
* `compactionEnabled` is the boot-resolved Magic Context compaction mode
|
|
31
|
+
* (the result of {@link isCompactionEnabled} on the resolved user-tier
|
|
32
|
+
* config). It MUST be threaded through every production call site — plugin
|
|
33
|
+
* boot, setup, doctor, conflict-fixer — so the MC-mode decision is never
|
|
34
|
+
* re-derived at a call site. A call site that genuinely cannot supply it
|
|
35
|
+
* (e.g. a low-level native-config reader with no MC config handle) MUST
|
|
36
|
+
* omit it and accept the default `true` (mode-on) behavior, which preserves
|
|
37
|
+
* today's conflict semantics; it must never silently skip the check.
|
|
38
|
+
*
|
|
39
|
+
* When `compactionEnabled` is `false` (compaction-off mode), OpenCode
|
|
40
|
+
* `compaction.auto=true` / `compaction.prune=true` are NOT plugin-disabling
|
|
41
|
+
* conflicts — native compaction is the user's chosen window manager. DCP
|
|
42
|
+
* and the three OMO conflict classes keep their existing policy in BOTH
|
|
43
|
+
* modes.
|
|
44
|
+
*/
|
|
45
|
+
export interface DetectConflictsOptions {
|
|
46
|
+
compactionEnabled?: boolean;
|
|
15
47
|
}
|
|
16
48
|
/**
|
|
17
49
|
* Detect all conflicts that would prevent magic-context from working correctly.
|
|
18
50
|
* Checks: OpenCode compaction, DCP plugin, OMO conflicting hooks.
|
|
51
|
+
*
|
|
52
|
+
* `compactionEnabled` (default `true`) is the resolved MC compaction mode.
|
|
53
|
+
* When `false` (compaction-off mode), native `compaction.auto`/`prune` are
|
|
54
|
+
* reported in {@link ConflictResult.nativeCompaction} but are NOT flagged as
|
|
55
|
+
* conflicts — native compaction is the intended window manager in that mode.
|
|
19
56
|
*/
|
|
20
|
-
export declare function detectConflicts(directory: string): ConflictResult;
|
|
57
|
+
export declare function detectConflicts(directory: string, options?: DetectConflictsOptions): ConflictResult;
|
|
21
58
|
/**
|
|
22
59
|
* Canonical npm package names that represent the conflicting plugin.
|
|
23
60
|
* Matched against the npm-style segment of each plugin entry, so:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conflict-detector.d.ts","sourceRoot":"","sources":["../../src/shared/conflict-detector.ts"],"names":[],"mappings":"AA0BA,MAAM,WAAW,cAAc;IAC3B,8CAA8C;IAC9C,WAAW,EAAE,OAAO,CAAC;IACrB,+CAA+C;IAC/C,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,2DAA2D;IAC3D,SAAS,EAAE;QACP,cAAc,EAAE,OAAO,CAAC;QACxB,eAAe,EAAE,OAAO,CAAC;QACzB,SAAS,EAAE,OAAO,CAAC;QACnB,uBAAuB,EAAE,OAAO,CAAC;QACjC,uBAAuB,EAAE,OAAO,CAAC;QACjC,oBAAoB,EAAE,OAAO,CAAC;KACjC,CAAC;CACL;AAED
|
|
1
|
+
{"version":3,"file":"conflict-detector.d.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ult } from "./conflict-detector";
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Options for {@link fixConflicts}.
|
|
4
|
+
*
|
|
5
|
+
* `compactionEnabled` is the boot-resolved MC compaction mode (the result of
|
|
6
|
+
* {@link isCompactionEnabled} on the resolved user-tier config). When `false`
|
|
7
|
+
* (compaction-off mode), the fixer MUST NOT flip `compaction.auto`/`prune` to
|
|
8
|
+
* `false` — native compaction fields are left byte-for-byte as found, because
|
|
9
|
+
* native compaction (or nothing) is the user's chosen window manager. DCP and
|
|
10
|
+
* OMO hook fixes keep their existing policy in BOTH modes.
|
|
11
|
+
*
|
|
12
|
+
* Default `true` (mode-on) preserves today's fix behavior for call sites that
|
|
13
|
+
* cannot supply the resolved mode; they fail toward mode-on, never silently
|
|
14
|
+
* skipping the fix.
|
|
15
|
+
*/
|
|
16
|
+
export interface FixConflictsOptions {
|
|
17
|
+
compactionEnabled?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare function fixConflicts(directory: string, conflicts: ConflictResult["conflicts"], options?: FixConflictsOptions): string[];
|
|
3
20
|
//# sourceMappingURL=conflict-fixer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conflict-fixer.d.ts","sourceRoot":"","sources":["../../src/shared/conflict-fixer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"conflict-fixer.d.ts","sourceRoot":"","sources":["../../src/shared/conflict-fixer.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,KAAK,cAAc,EAItB,MAAM,qBAAqB,CAAC;AAgJ7B;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,mBAAmB;IAChC,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,wBAAgB,YAAY,CACxB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,cAAc,CAAC,WAAW,CAAC,EACtC,OAAO,CAAC,EAAE,mBAAmB,GAC9B,MAAM,EAAE,CA0HV"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-limit-provenance.d.ts","sourceRoot":"","sources":["../../src/shared/context-limit-provenance.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,sBAAsB,GAAG,aAAa,GAAG,UAAU,GAAG,SAAS,CAAC;AAE5E,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,OAAO,GAAG,sBAAsB,CAGtF"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const MAX_EXECUTE_THRESHOLD = 90;
|
|
2
|
+
export declare const ABSOLUTE_EMERGENCY_PERCENTAGE = 95;
|
|
3
|
+
export interface EscalationBands {
|
|
4
|
+
forceMaterializationPercentage: number;
|
|
5
|
+
emergencyPercentage: number;
|
|
6
|
+
}
|
|
7
|
+
/** Keep force cleanup above normal execution while preserving the absolute 95% wall. */
|
|
8
|
+
export declare function escalationBands(effectiveThresholdPercentage: number): EscalationBands;
|
|
9
|
+
//# sourceMappingURL=escalation-bands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"escalation-bands.d.ts","sourceRoot":"","sources":["../../src/shared/escalation-bands.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,KAAK,CAAC;AACxC,eAAO,MAAM,6BAA6B,KAAK,CAAC;AAEhD,MAAM,WAAW,eAAe;IAC5B,8BAA8B,EAAE,MAAM,CAAC;IACvC,mBAAmB,EAAE,MAAM,CAAC;CAC/B;AAED,wFAAwF;AACxF,wBAAgB,eAAe,CAAC,4BAA4B,EAAE,MAAM,GAAG,eAAe,CAQrF"}
|
|
@@ -25,7 +25,7 @@ export declare function formatThresholdPercent(value: number | undefined | null)
|
|
|
25
25
|
* Build a terse "clamped" annotation for execute-threshold display, or "" when the
|
|
26
26
|
* configured value was not clamped. Status surfaces (/ctx-status text, pi status
|
|
27
27
|
* dialog) append this so a user who configured e.g. 190000 tokens on a 128K model
|
|
28
|
-
* sees that it was reduced to the
|
|
28
|
+
* sees that it was reduced to the 90% safety cap, instead of the value being
|
|
29
29
|
* silently ignored (issue #241). The note includes the configured value and the cap
|
|
30
30
|
* so the user can see the math.
|
|
31
31
|
*
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
* (instant at extension load), so `getSdkContextLimit()` returns `undefined`
|
|
25
25
|
* for Pi and Pi's own path is used.
|
|
26
26
|
*/
|
|
27
|
+
import type { ContextLimitProvenance } from "./context-limit-provenance";
|
|
27
28
|
interface OpencodeClientLike {
|
|
28
29
|
config: {
|
|
29
30
|
providers: () => Promise<{
|
|
@@ -39,6 +40,28 @@ export declare const MAX_SANE_LIMIT = 3000000;
|
|
|
39
40
|
* unconfigured-default garbage in BOTH harnesses (OpenCode's SDK values and
|
|
40
41
|
* Pi's reported `contextWindow`). Exported so Pi applies the identical bound. */
|
|
41
42
|
export declare function isSaneLimit(limit: number | undefined): limit is number;
|
|
43
|
+
export type OutputReserveConfig = number | {
|
|
44
|
+
default: number;
|
|
45
|
+
[modelKey: string]: number;
|
|
46
|
+
};
|
|
47
|
+
export interface ModelLimit {
|
|
48
|
+
context?: number;
|
|
49
|
+
input?: number;
|
|
50
|
+
output?: number;
|
|
51
|
+
}
|
|
52
|
+
/** Set the user-tier reservation override shared by every resolved-limit consumer. */
|
|
53
|
+
export declare function setOutputReserveConfig(config: OutputReserveConfig | undefined): void;
|
|
54
|
+
/**
|
|
55
|
+
* Resolve the usable prompt budget from raw provider metadata.
|
|
56
|
+
*
|
|
57
|
+
* A genuinely smaller input cap is already pre-carved and wins unchanged. All
|
|
58
|
+
* other providers reserve generated tokens from the shared context window by
|
|
59
|
+
* default, except the small allowlist whose APIs document a separate output
|
|
60
|
+
* quota. `output_reserve` overrides that shared/separate decision, including 0
|
|
61
|
+
* to disable reservation. Reservation can never leave less than half the raw
|
|
62
|
+
* context window or the module's 1024-token plausibility floor.
|
|
63
|
+
*/
|
|
64
|
+
export declare function resolveLimit(limit: ModelLimit | undefined, providerID: string, modelID: string, reserveConfig?: OutputReserveConfig | undefined): number | undefined;
|
|
42
65
|
/**
|
|
43
66
|
* Asynchronously refresh the API-layer cache from OpenCode's SDK.
|
|
44
67
|
*
|
|
@@ -94,15 +117,18 @@ export declare function resetAuthRewarmLatchForTest(): void;
|
|
|
94
117
|
*
|
|
95
118
|
* Resolution:
|
|
96
119
|
* 1. Seed `apiCache` from the persisted last-known-good file once (cold start).
|
|
97
|
-
* 2.
|
|
120
|
+
* 2. Resolve the sane raw SDK metadata into its output-reserved usable value.
|
|
98
121
|
* 3. `undefined` when the SDK hasn't reported this model yet → the caller
|
|
99
122
|
* defaults / retries (the startup warm retries when OpenCode isn't ready).
|
|
100
123
|
*
|
|
101
124
|
* OpenCode-only: Pi never warms `apiCache` (it resolves from its own
|
|
102
|
-
* `ctx.
|
|
125
|
+
* `ctx.model.contextWindow`), so for Pi this returns `undefined` and Pi's
|
|
103
126
|
* own resolution path is used.
|
|
104
127
|
*/
|
|
105
|
-
export declare function getSdkContextLimit(providerID: string, modelID: string
|
|
128
|
+
export declare function getSdkContextLimit(providerID: string, modelID: string, detectedContextLimit?: number, options?: {
|
|
129
|
+
reservation?: "default" | "none";
|
|
130
|
+
detectedLimitProvenance?: ContextLimitProvenance;
|
|
131
|
+
}): number | undefined;
|
|
106
132
|
/**
|
|
107
133
|
* Return only a provider-declared input cap. A combined context window is useful
|
|
108
134
|
* for scheduling but is not safe as a fail-closed prompt boundary.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models-dev-cache.d.ts","sourceRoot":"","sources":["../../src/shared/models-dev-cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;
|
|
1
|
+
{"version":3,"file":"models-dev-cache.d.ts","sourceRoot":"","sources":["../../src/shared/models-dev-cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAIH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAOzE,UAAU,kBAAkB;IACxB,MAAM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ED,mEAAmE;AACnE,wBAAgB,2BAA2B,IAAI,IAAI,CAElD;AA+DD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,kBAAkB,CAC9B,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,EACf,oBAAoB,CAAC,EAAE,MAAM,EAC7B,OAAO,CAAC,EAAE;IACN,WAAW,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IACjC,uBAAuB,CAAC,EAAE,sBAAsB,CAAC;CACpD,GACF,MAAM,GAAG,SAAS,CA6BpB;AAED;;;GAGG;AACH,qFAAqF;AACrF,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAShF;AAED,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAWxF;AA2BD,gFAAgF;AAChF,wBAAgB,mBAAmB,IAAI,IAAI,CAI1C;AAED,oDAAoD;AACpD,wBAAgB,sBAAsB,IAAI;IACtC,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CACpB,CAMA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpc-server.d.ts","sourceRoot":"","sources":["../../src/shared/rpc-server.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rpc-server.d.ts","sourceRoot":"","sources":["../../src/shared/rpc-server.ts"],"names":[],"mappings":"AAuBA,KAAK,UAAU,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AA8CxF;;;;;;;;;;;GAWG;AACH,qBAAa,qBAAqB;IAC9B,OAAO,CAAC,MAAM,CAA+B;IAC7C,OAAO,CAAC,IAAI,CAAK;IACjB,OAAO,CAAC,QAAQ,CAAiC;IACjD,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,SAAS,CAAc;IAC/B,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAkC;IAC7D,oEAAoE;IACpE,OAAO,CAAC,OAAO,CAAsC;IAMrD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAmC;gBAE7C,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;IAKjD,sCAAsC;IACtC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,GAAG,IAAI;IAIjD,6DAA6D;IACvD,KAAK,IAAI,OAAO,CAAC,MAAM,CAAC;IAqG9B,6EAA6E;IAC7E,IAAI,IAAI,IAAI;IAuBZ,OAAO,CAAC,uBAAuB;IAgB/B;+CAC2C;YAC7B,WAAW;IAyDzB;wFACoF;IACpF,OAAO,CAAC,eAAe;CA8H1B"}
|
|
@@ -2,13 +2,27 @@
|
|
|
2
2
|
* Shared types for RPC between server and TUI plugins.
|
|
3
3
|
* Both sides import these — no SQLite dependency.
|
|
4
4
|
*/
|
|
5
|
+
import type { DreamTaskBacklogMap, DreamTaskProgress } from "../features/magic-context/dreamer/task-registry";
|
|
5
6
|
export interface SidebarSnapshot {
|
|
6
7
|
sessionId: string;
|
|
7
8
|
usagePercentage: number;
|
|
8
9
|
inputTokens: number;
|
|
9
10
|
contextLimit: number;
|
|
11
|
+
/**
|
|
12
|
+
* Raw wire-input pressure against the resolved model window. This is separate
|
|
13
|
+
* from Magic Context's execute threshold so native-compaction UI never shows
|
|
14
|
+
* a threshold-relative fill percentage.
|
|
15
|
+
*/
|
|
16
|
+
native_context_usage_percentage?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Magic Context compaction mode is resolved at startup and sent in the
|
|
19
|
+
* status-detail wire payload; snake_case matches that payload's field naming.
|
|
20
|
+
*/
|
|
21
|
+
compaction_enabled?: boolean;
|
|
10
22
|
systemPromptTokens: number;
|
|
11
23
|
compartmentCount: number;
|
|
24
|
+
/** Historical compartment rows retained while native compaction owns the window. */
|
|
25
|
+
archivedCompartmentCount?: number;
|
|
12
26
|
memoryCount: number;
|
|
13
27
|
memoryBlockCount: number;
|
|
14
28
|
pendingOpsCount: number;
|
|
@@ -17,6 +31,8 @@ export interface SidebarSnapshot {
|
|
|
17
31
|
sessionNoteCount: number;
|
|
18
32
|
readySmartNoteCount: number;
|
|
19
33
|
cacheTtl: string;
|
|
34
|
+
/** Persistent runtime failure shown directly in the sidebar when non-null. */
|
|
35
|
+
lastTransformError: string | null;
|
|
20
36
|
lastDreamerRunAt: number | null;
|
|
21
37
|
projectIdentity: string | null;
|
|
22
38
|
compartmentTokens: number;
|
|
@@ -68,7 +84,7 @@ export interface SidebarSnapshot {
|
|
|
68
84
|
executeThreshold: number;
|
|
69
85
|
/**
|
|
70
86
|
* True when `executeThreshold` was clamped down from a higher configured value
|
|
71
|
-
* (tokens config above
|
|
87
|
+
* (tokens config above 90% × contextLimit, or a percentage above the 90% cap).
|
|
72
88
|
* The sidebar/status dialog append a small marker so the user knows their
|
|
73
89
|
* configured value was reduced rather than applied verbatim (issue #241).
|
|
74
90
|
* Absent when no clamp occurred.
|
|
@@ -85,6 +101,10 @@ export interface SidebarSnapshot {
|
|
|
85
101
|
* sidebar "Recomp"/"Upgrade" progress bar and the /ctx-status dialog. Mirrors
|
|
86
102
|
* the runtime `RecompProgress` shape from compartment-runner-types.ts.
|
|
87
103
|
*/
|
|
104
|
+
/** Read-only per-task candidate counts; populated by the server RPC. */
|
|
105
|
+
dreamerBacklog?: DreamTaskBacklogMap;
|
|
106
|
+
/** Process-local task progress; absent when no Dreamer task is running. */
|
|
107
|
+
dreamerProgress?: DreamTaskProgress | null;
|
|
88
108
|
recompProgress?: {
|
|
89
109
|
/** "recomp" → "Recomp" labels; "upgrade" → "Upgrade" labels. */
|
|
90
110
|
kind?: "recomp" | "upgrade" | "embed" | "wrapup";
|
|
@@ -112,9 +132,20 @@ export interface StatusDetail extends SidebarSnapshot {
|
|
|
112
132
|
operation: string;
|
|
113
133
|
}>;
|
|
114
134
|
contextLimit: number;
|
|
135
|
+
/**
|
|
136
|
+
* Parsed cache TTL in ms. -1 = never expires (cacheTtl "never"; Infinity
|
|
137
|
+
* cannot ride JSON-RPC and 0 would be indistinguishable from unset). The
|
|
138
|
+
* values discriminate without the cacheNeverExpires flag: -1 never /
|
|
139
|
+
* N live. Falsy-value contract: see storage_versions for the precedent.
|
|
140
|
+
*/
|
|
115
141
|
cacheTtlMs: number;
|
|
142
|
+
/** Remaining ms in the idle-TTL window. -1 = never expires; 0 = expired
|
|
143
|
+
* (only meaningful when lastResponseTime > 0); N = live countdown. */
|
|
116
144
|
cacheRemainingMs: number;
|
|
117
145
|
cacheExpired: boolean;
|
|
146
|
+
/** True when cacheTtl is "never" — the idle-TTL heuristic is disabled on
|
|
147
|
+
* this lane. Redundant with cacheTtlMs === -1; kept as the readable form. */
|
|
148
|
+
cacheNeverExpires?: boolean;
|
|
118
149
|
executeThreshold: number;
|
|
119
150
|
/**
|
|
120
151
|
* Which config source produced `executeThreshold`. "tokens" means
|
|
@@ -139,6 +170,25 @@ export interface StatusDetail extends SidebarSnapshot {
|
|
|
139
170
|
present: boolean;
|
|
140
171
|
ageMs: number | null;
|
|
141
172
|
};
|
|
173
|
+
/**
|
|
174
|
+
* Stable storage-version probe: "which schema is the DB at, which fence does
|
|
175
|
+
* this binary carry". Field names are deliberately snake_case, mirroring the
|
|
176
|
+
* `storage_versions` block of the mc-module status envelope, so fleet probes
|
|
177
|
+
* parse one shape across both surfaces. The module cannot read context.db
|
|
178
|
+
* (the plugin owns it), so this surface supplies the live DB value; the module
|
|
179
|
+
* surface supplies the module-store value instead.
|
|
180
|
+
*/
|
|
181
|
+
storage_versions: {
|
|
182
|
+
/**
|
|
183
|
+
* Persisted schema version of context.db (MAX of schema_migrations).
|
|
184
|
+
* null = the version probe FAILED (read threw — broken/unreachable store);
|
|
185
|
+
* 0 = probe succeeded on a fresh DB without a migrations table. Distinct so
|
|
186
|
+
* readers never conflate broken-with-empty (fleet status-surface contract).
|
|
187
|
+
*/
|
|
188
|
+
context_db_schema_version: number | null;
|
|
189
|
+
/** Highest context.db schema version this plugin build supports. */
|
|
190
|
+
plugin_supported_version: number;
|
|
191
|
+
};
|
|
142
192
|
}
|
|
143
193
|
/** Embedding coverage for `/ctx-embed` status (mirrors getEmbeddingCoverageStatus). */
|
|
144
194
|
export interface EmbedDetail {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpc-types.d.ts","sourceRoot":"","sources":["../../src/shared/rpc-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,eAAe;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,gBAAgB,EAAE,MAAM,CAAC;IACzB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;;;;OAKG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAC3B;;;;OAI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iB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,yEAAyE;IACzE,eAAe,EAAE,MAAM,CAAC;IACxB,8DAA8D;IAC9D,KAAK,CAAC,EAAE;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;IACnD;;;;;;;OAOG;IACH,gBAAgB,EAAE;QACd;;;;;WAKG;QACH,yBAAyB,EAAE,MAAM,GAAG,IAAI,CAAC;QACzC,oEAAoE;QACpE,wBAAwB,EAAE,MAAM,CAAC;KACpC,CAAC;CACL;AAED,uFAAuF;AACvF,MAAM,WAAW,WAAW;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IAC7C,QAAQ,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9C,OAAO,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,OAAO,CAAA;KAAE,CAAC;IAClE,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,sBAAsB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { execFileSync } from "node:child_process";
|
|
2
|
+
import { readFileSync } from "node:fs";
|
|
1
3
|
export interface RpcPortFileRecord {
|
|
2
4
|
port: number;
|
|
3
5
|
pid: number;
|
|
@@ -26,5 +28,22 @@ export declare function rpcPortFilePath(storageDir: string, directory: string, p
|
|
|
26
28
|
/** Legacy single-port file used by v0.18.0 and earlier. */
|
|
27
29
|
export declare function legacyRpcPortFilePath(storageDir: string, directory: string): string;
|
|
28
30
|
export declare function isPidAlive(pid: number): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Verify that a live PID still belongs to the process that wrote a port record.
|
|
33
|
+
*
|
|
34
|
+
* A PID can be reused after its original process exits. On Linux, procfs gives
|
|
35
|
+
* us a process start time without spawning a helper; other platforms use `ps`
|
|
36
|
+
* only on this cold database-open guard path. Legacy records without a start
|
|
37
|
+
* time use a weaker command-name check, and every probe failure stays live so
|
|
38
|
+
* this identity check cannot weaken the migration guard on uncertainty.
|
|
39
|
+
*/
|
|
40
|
+
export declare function isPidIdentityPlausible(record: RpcPortFileRecord): boolean;
|
|
41
|
+
export declare function __setRpcIdentityTestHooks(hooks: {
|
|
42
|
+
readFileSync?: typeof readFileSync;
|
|
43
|
+
execFileSync?: typeof execFileSync;
|
|
44
|
+
platform?: NodeJS.Platform;
|
|
45
|
+
nowMs?: () => number;
|
|
46
|
+
}): void;
|
|
47
|
+
export declare function __resetRpcIdentityTestHooks(): void;
|
|
29
48
|
export declare function parseRpcPortFile(content: string, fallbackPid?: number): RpcPortFileRecord | null;
|
|
30
49
|
//# sourceMappingURL=rpc-utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpc-utils.d.ts","sourceRoot":"","sources":["../../src/shared/rpc-utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rpc-utils.d.ts","sourceRoot":"","sources":["../../src/shared/rpc-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAGvC,MAAM,WAAW,iBAAiB;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wFAAwF;IACxF,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAGrD;AAED,0EAA0E;AAC1E,wBAAgB,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAExE;AAED,sCAAsC;AACtC,wBAAgB,eAAe,CAC3B,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,GAAG,SAAc,EACjB,UAAU,CAAC,EAAE,MAAM,GACpB,MAAM,CAGR;AAED,2DAA2D;AAC3D,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAEnF;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAQ/C;AAyFD;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAkBzE;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE;IAC7C,YAAY,CAAC,EAAE,OAAO,YAAY,CAAC;IACnC,YAAY,CAAC,EAAE,OAAO,YAAY,CAAC;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,MAAM,CAAC;CACxB,GAAG,IAAI,CAKP;AAED,wBAAgB,2BAA2B,IAAI,IAAI,CAKlD;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,SAAI,GAAG,iBAAiB,GAAG,IAAI,CA2B3F"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare function setStoragePrivatePermissionEnforcement(enforce: boolean): void;
|
|
2
|
+
export declare function shouldEnforcePrivateStoragePermissions(): boolean;
|
|
3
|
+
/** Test-only reset for suites that exercise both permission policies in one process. */
|
|
4
|
+
export declare function __resetStoragePrivatePermissionEnforcementForTests(): void;
|
|
5
|
+
//# sourceMappingURL=storage-permissions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage-permissions.d.ts","sourceRoot":"","sources":["../../src/shared/storage-permissions.ts"],"names":[],"mappings":"AAQA,wBAAgB,sCAAsC,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAE7E;AAED,wBAAgB,sCAAsC,IAAI,OAAO,CAEhE;AAED,wFAAwF;AACxF,wBAAgB,kDAAkD,IAAI,IAAI,CAEzE"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The module specifiers the compiled TUI is allowed to resolve through OpenCode's
|
|
3
|
+
* process-wide OpenTUI runtime registry (`opentui:runtime-module:<encoded>`).
|
|
4
|
+
*
|
|
5
|
+
* Single source of truth, shared by `scripts/build-tui.ts` (which rewrites these
|
|
6
|
+
* specifiers during the Solid transform) and
|
|
7
|
+
* `src/tui/tui-compiled-runtime-imports.test.ts` (which verifies every emitted
|
|
8
|
+
* specifier names a real export). Keeping one list means the guard test cannot
|
|
9
|
+
* drift into skipping a specifier the build actually rewrites — a skipped
|
|
10
|
+
* specifier is exactly the silent hole the test exists to close.
|
|
11
|
+
*
|
|
12
|
+
* Lives in `src/shared/` rather than `src/tui/` on purpose: `build-tui.ts` copies
|
|
13
|
+
* every file under `src/tui/` into the shipped `src/tui-compiled/` bundle, and
|
|
14
|
+
* this list is build/test tooling that the runtime bundle must not carry.
|
|
15
|
+
*/
|
|
16
|
+
export declare const TUI_RUNTIME_SPECIFIERS: readonly ["@opentui/core", "@opentui/core/testing", "@opentui/solid", "@opentui/solid/components", "@opentui/solid/jsx-runtime", "@opentui/solid/jsx-dev-runtime", "solid-js", "solid-js/store"];
|
|
17
|
+
export type TuiRuntimeSpecifier = (typeof TUI_RUNTIME_SPECIFIERS)[number];
|
|
18
|
+
/** Virtual module id OpenCode registers for a runtime specifier. */
|
|
19
|
+
export declare function runtimeModuleId(specifier: string): string;
|
|
20
|
+
//# sourceMappingURL=tui-runtime-specifiers.d.ts.map
|