@cortexkit/opencode-magic-context 0.33.1 → 0.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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/project-security.d.ts +7 -0
- package/dist/config/project-security.d.ts.map +1 -1
- package/dist/config/schema/magic-context.d.ts +82 -2
- 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.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/refresh-primers.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/task-executor.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 +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.map +1 -1
- 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 +35 -1
- 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 +1 -1
- 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 +2 -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/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 +11 -1
- package/dist/hooks/magic-context/hook.d.ts.map +1 -1
- package/dist/hooks/magic-context/inject-compartments.d.ts +9 -0
- package/dist/hooks/magic-context/inject-compartments.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 +30 -0
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform.d.ts +27 -0
- package/dist/hooks/magic-context/transform.d.ts.map +1 -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-s0mdn690.js} +1599 -892
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1292 -623
- package/dist/plugin/embedding-bootstrap.d.ts.map +1 -1
- package/dist/plugin/hooks/create-session-hooks.d.ts +11 -0
- 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-8e82vmvb.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 +46 -1
- package/dist/shared/rpc-types.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/{storage-meta-session-td6bwtky.js → storage-meta-session-xt41zbw4.js} +2 -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 +7 -2
- 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 +904 -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.ts +159 -0
- package/src/config/project-security.test.ts +366 -0
- package/src/config/project-security.ts +588 -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 +358 -0
- package/src/config/schema/magic-context.ts +1002 -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 +104 -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 +46 -1
- package/src/shared/storage-permissions.ts +20 -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 +139 -83
- 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 +237 -161
- package/dist/send-session-notification-tghq9gnh.js +0 -11
- /package/dist/{index-v7fmc1s2.js → index-ygcng9t8.js} +0 -0
|
@@ -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,6 +24,7 @@ export declare function buildMagicContextHookConfig(pluginConfig: MagicContextPl
|
|
|
24
24
|
subtask?: boolean;
|
|
25
25
|
}>;
|
|
26
26
|
enabled: boolean;
|
|
27
|
+
allow_home_project: boolean;
|
|
27
28
|
experimental: import("../../config/schema/magic-context").ExperimentalConfig;
|
|
28
29
|
transform_mode: "ts" | "rust";
|
|
29
30
|
auto_update?: boolean;
|
|
@@ -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;;;;;;;;;;;;;;;;;;;;eAsF4jhB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAzE3mhB;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;;;;;;0BAAkptD,CAAC;;;;;;;;;EArCjnzD;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;;;;;;0BAAkptD,CAAC;;;;;;;;;GADjnzD"}
|
|
@@ -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;IACpC,qBAAqB,CAAC,EAAE,GAAG,CAAC,MAAM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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;AAMzE,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,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,kBA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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-s0mdn690.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.ts","sourceRoot":"","sources":["../../src/shared/conflict-detector.ts"],"names":[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|
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,EAAE;QACJ,SAAS,EAAE,MAAM,OAAO,CAAC;YA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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"}
|
|
@@ -7,8 +7,21 @@ export interface SidebarSnapshot {
|
|
|
7
7
|
usagePercentage: number;
|
|
8
8
|
inputTokens: number;
|
|
9
9
|
contextLimit: number;
|
|
10
|
+
/**
|
|
11
|
+
* Raw wire-input pressure against the resolved model window. This is separate
|
|
12
|
+
* from Magic Context's execute threshold so native-compaction UI never shows
|
|
13
|
+
* a threshold-relative fill percentage.
|
|
14
|
+
*/
|
|
15
|
+
native_context_usage_percentage?: number;
|
|
16
|
+
/**
|
|
17
|
+
* Magic Context compaction mode is resolved at startup and sent in the
|
|
18
|
+
* status-detail wire payload; snake_case matches that payload's field naming.
|
|
19
|
+
*/
|
|
20
|
+
compaction_enabled?: boolean;
|
|
10
21
|
systemPromptTokens: number;
|
|
11
22
|
compartmentCount: number;
|
|
23
|
+
/** Historical compartment rows retained while native compaction owns the window. */
|
|
24
|
+
archivedCompartmentCount?: number;
|
|
12
25
|
memoryCount: number;
|
|
13
26
|
memoryBlockCount: number;
|
|
14
27
|
pendingOpsCount: number;
|
|
@@ -17,6 +30,8 @@ export interface SidebarSnapshot {
|
|
|
17
30
|
sessionNoteCount: number;
|
|
18
31
|
readySmartNoteCount: number;
|
|
19
32
|
cacheTtl: string;
|
|
33
|
+
/** Persistent runtime failure shown directly in the sidebar when non-null. */
|
|
34
|
+
lastTransformError: string | null;
|
|
20
35
|
lastDreamerRunAt: number | null;
|
|
21
36
|
projectIdentity: string | null;
|
|
22
37
|
compartmentTokens: number;
|
|
@@ -68,7 +83,7 @@ export interface SidebarSnapshot {
|
|
|
68
83
|
executeThreshold: number;
|
|
69
84
|
/**
|
|
70
85
|
* True when `executeThreshold` was clamped down from a higher configured value
|
|
71
|
-
* (tokens config above
|
|
86
|
+
* (tokens config above 90% × contextLimit, or a percentage above the 90% cap).
|
|
72
87
|
* The sidebar/status dialog append a small marker so the user knows their
|
|
73
88
|
* configured value was reduced rather than applied verbatim (issue #241).
|
|
74
89
|
* Absent when no clamp occurred.
|
|
@@ -112,9 +127,20 @@ export interface StatusDetail extends SidebarSnapshot {
|
|
|
112
127
|
operation: string;
|
|
113
128
|
}>;
|
|
114
129
|
contextLimit: number;
|
|
130
|
+
/**
|
|
131
|
+
* Parsed cache TTL in ms. -1 = never expires (cacheTtl "never"; Infinity
|
|
132
|
+
* cannot ride JSON-RPC and 0 would be indistinguishable from unset). The
|
|
133
|
+
* values discriminate without the cacheNeverExpires flag: -1 never /
|
|
134
|
+
* N live. Falsy-value contract: see storage_versions for the precedent.
|
|
135
|
+
*/
|
|
115
136
|
cacheTtlMs: number;
|
|
137
|
+
/** Remaining ms in the idle-TTL window. -1 = never expires; 0 = expired
|
|
138
|
+
* (only meaningful when lastResponseTime > 0); N = live countdown. */
|
|
116
139
|
cacheRemainingMs: number;
|
|
117
140
|
cacheExpired: boolean;
|
|
141
|
+
/** True when cacheTtl is "never" — the idle-TTL heuristic is disabled on
|
|
142
|
+
* this lane. Redundant with cacheTtlMs === -1; kept as the readable form. */
|
|
143
|
+
cacheNeverExpires?: boolean;
|
|
118
144
|
executeThreshold: number;
|
|
119
145
|
/**
|
|
120
146
|
* Which config source produced `executeThreshold`. "tokens" means
|
|
@@ -139,6 +165,25 @@ export interface StatusDetail extends SidebarSnapshot {
|
|
|
139
165
|
present: boolean;
|
|
140
166
|
ageMs: number | null;
|
|
141
167
|
};
|
|
168
|
+
/**
|
|
169
|
+
* Stable storage-version probe: "which schema is the DB at, which fence does
|
|
170
|
+
* this binary carry". Field names are deliberately snake_case, mirroring the
|
|
171
|
+
* `storage_versions` block of the mc-module status envelope, so fleet probes
|
|
172
|
+
* parse one shape across both surfaces. The module cannot read context.db
|
|
173
|
+
* (the plugin owns it), so this surface supplies the live DB value; the module
|
|
174
|
+
* surface supplies the module-store value instead.
|
|
175
|
+
*/
|
|
176
|
+
storage_versions: {
|
|
177
|
+
/**
|
|
178
|
+
* Persisted schema version of context.db (MAX of schema_migrations).
|
|
179
|
+
* null = the version probe FAILED (read threw — broken/unreachable store);
|
|
180
|
+
* 0 = probe succeeded on a fresh DB without a migrations table. Distinct so
|
|
181
|
+
* readers never conflate broken-with-empty (fleet status-surface contract).
|
|
182
|
+
*/
|
|
183
|
+
context_db_schema_version: number | null;
|
|
184
|
+
/** Highest context.db schema version this plugin build supports. */
|
|
185
|
+
plugin_supported_version: number;
|
|
186
|
+
};
|
|
142
187
|
}
|
|
143
188
|
/** Embedding coverage for `/ctx-embed` status (mirrors getEmbeddingCoverageStatus). */
|
|
144
189
|
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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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"}
|
|
@@ -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"}
|
|
@@ -5,7 +5,8 @@ import {
|
|
|
5
5
|
markSessionCleanupPending,
|
|
6
6
|
retryPendingSessionCleanups,
|
|
7
7
|
updateSessionMeta
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-b563sga5.js";
|
|
9
|
+
import"./index-fcyvznch.js";
|
|
9
10
|
import"./index-k1esqfwk.js";
|
|
10
11
|
import"./index-kvrcg31b.js";
|
|
11
12
|
import"./index-wckvcay0.js";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { SidebarSnapshot } from "../shared/rpc-types";
|
|
2
|
+
export interface CompactionOffSidebarRow {
|
|
3
|
+
label: "Memories" | "Notes" | "Archived compartments";
|
|
4
|
+
value: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Formats context pressure from the current wire input and the model context
|
|
8
|
+
* limit. It deliberately does not use the stored Magic Context threshold
|
|
9
|
+
* percentage, because native compaction acts on the model window instead.
|
|
10
|
+
*/
|
|
11
|
+
export declare function nativeCompactionContextLabel(snapshot: SidebarSnapshot): string;
|
|
12
|
+
export declare function compactionOffSidebarRows(snapshot: SidebarSnapshot): CompactionOffSidebarRow[];
|
|
13
|
+
//# sourceMappingURL=compaction-off.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compaction-off.d.ts","sourceRoot":"","sources":["../../src/tui/compaction-off.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,MAAM,WAAW,uBAAuB;IACpC,KAAK,EAAE,UAAU,GAAG,OAAO,GAAG,uBAAuB,CAAC;IACtD,KAAK,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAAC,QAAQ,EAAE,eAAe,GAAG,MAAM,CAI9E;AAED,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,eAAe,GAAG,uBAAuB,EAAE,CAU7F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-db.d.ts","sourceRoot":"","sources":["../../../src/tui/data/context-db.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEzF,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,YAAY,EAAE,CAAC;AAc3D,2DAA2D;AAC3D,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAOrD;AAED,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC;AAED;sCACsC;AACtC,wBAAgB,YAAY,IAAI,qBAAqB,GAAG,IAAI,CAE3D;AAED,+BAA+B;AAC/B,wBAAgB,QAAQ,IAAI,IAAI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AAsB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAQvE;AAED;mFACmF;AACnF,wBAAsB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAQxE;AAED;;iDAEiD;AACjD,wBAAsB,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAUhF;AAED,gEAAgE;AAChE,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,MAAM,CAAC,CAQ3D;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACjC,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAsB,eAAe,IAAI,OAAO,CAAC,oBAAoB,CAAC,CAkBrE;AAED,wEAAwE;AACxE,wBAAsB,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC,CAQtD"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { SidebarSnapshot } from "../shared/rpc-types";
|
|
2
|
+
export interface CompactionOffSidebarRow {
|
|
3
|
+
label: "Memories" | "Notes" | "Archived compartments";
|
|
4
|
+
value: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Formats context pressure from the current wire input and the model context
|
|
8
|
+
* limit. It deliberately does not use the stored Magic Context threshold
|
|
9
|
+
* percentage, because native compaction acts on the model window instead.
|
|
10
|
+
*/
|
|
11
|
+
export declare function nativeCompactionContextLabel(snapshot: SidebarSnapshot): string;
|
|
12
|
+
export declare function compactionOffSidebarRows(snapshot: SidebarSnapshot): CompactionOffSidebarRow[];
|
|
13
|
+
//# sourceMappingURL=compaction-off.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compaction-off.d.ts","sourceRoot":"","sources":["../../src/tui-compiled/compaction-off.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,MAAM,WAAW,uBAAuB;IACpC,KAAK,EAAE,UAAU,GAAG,OAAO,GAAG,uBAAuB,CAAC;IACtD,KAAK,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAAC,QAAQ,EAAE,eAAe,GAAG,MAAM,CAI9E;AAED,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,eAAe,GAAG,uBAAuB,EAAE,CAU7F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-db.d.ts","sourceRoot":"","sources":["../../../src/tui-compiled/data/context-db.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEzF,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,YAAY,EAAE,CAAC;AAc3D,2DAA2D;AAC3D,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAOrD;AAED,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC;AAED;sCACsC;AACtC,wBAAgB,YAAY,IAAI,qBAAqB,GAAG,IAAI,CAE3D;AAED,+BAA+B;AAC/B,wBAAgB,QAAQ,IAAI,IAAI,CAM/B;
|
|
1
|
+
{"version":3,"file":"context-db.d.ts","sourceRoot":"","sources":["../../../src/tui-compiled/data/context-db.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEzF,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,YAAY,EAAE,CAAC;AAc3D,2DAA2D;AAC3D,wBAAgB,aA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M,CAAC,CAQ3D;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACjC,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAsB,eAAe,IAAI,OAAO,CAAC,oBAAoB,CAAC,CAkBrE;AAED,wEAAwE;AACxE,wBAAsB,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC,CAQtD"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cortexkit/opencode-magic-context",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.34.0",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"description": "OpenCode plugin for Magic Context
|
|
5
|
+
"description": "OpenCode plugin for Magic Context \u2014 cross-session memory and context management",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"author": "ualtinok",
|
|
@@ -27,6 +27,11 @@
|
|
|
27
27
|
"src/tui",
|
|
28
28
|
"src/tui-compiled",
|
|
29
29
|
"src/shared",
|
|
30
|
+
"src/config",
|
|
31
|
+
"src/agents",
|
|
32
|
+
"src/features/magic-context/defaults.ts",
|
|
33
|
+
"src/features/magic-context/dreamer/cron.ts",
|
|
34
|
+
"src/features/magic-context/dreamer/task-registry.ts",
|
|
30
35
|
"README.md"
|
|
31
36
|
],
|
|
32
37
|
"scripts": {
|