@cortexkit/opencode-magic-context 0.38.0 → 0.38.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/dist/{announcement-6c1g4es4.js → announcement-5eg4t64s.js} +6 -6
- package/dist/config/schema/magic-context.d.ts +1 -1
- package/dist/{conflict-warning-hook-an4fxhwf.js → conflict-warning-hook-f406ggbw.js} +5 -5
- package/dist/{derive-budgets-da4yg3tz.js → derive-budgets-xk8cy5e6.js} +5 -5
- package/dist/{emscripten-module-ap8t3st0.js → emscripten-module-49k43zfy.js} +1 -1
- package/dist/{emscripten-module-682pfzaa.js → emscripten-module-ex4v0x4z.js} +1 -1
- package/dist/{emscripten-module-r5h7aghp.js → emscripten-module-jfs3d1dq.js} +1 -1
- package/dist/{emscripten-module-bkktz927.js → emscripten-module-ss4g4spn.js} +1 -1
- package/dist/features/magic-context/dreamer/retrospective-orphan-sweep.d.ts +17 -6
- package/dist/features/magic-context/dreamer/retrospective-orphan-sweep.d.ts.map +1 -1
- package/dist/features/magic-context/memory/storage-memory.d.ts.map +1 -1
- package/dist/features/magic-context/memory/types.d.ts +16 -0
- package/dist/features/magic-context/memory/types.d.ts.map +1 -1
- package/dist/features/magic-context/message-index.d.ts +3 -2
- package/dist/features/magic-context/message-index.d.ts.map +1 -1
- package/dist/features/magic-context/migrations.d.ts.map +1 -1
- package/dist/features/magic-context/storage-db.d.ts +1 -1
- package/dist/features/magic-context/storage-db.d.ts.map +1 -1
- package/dist/features/magic-context/storage-embedding-measurements.d.ts +1 -1
- package/dist/features/magic-context/storage-embedding-measurements.d.ts.map +1 -1
- package/dist/features/magic-context/storage-meta-session.d.ts.map +1 -1
- package/dist/features/magic-context/storage-session-tables.d.ts +18 -0
- package/dist/features/magic-context/storage-session-tables.d.ts.map +1 -0
- package/dist/features/magic-context/transform-decision-log.d.ts +22 -0
- package/dist/features/magic-context/transform-decision-log.d.ts.map +1 -1
- package/dist/{ffi-d8pnn3mn.js → ffi-bbm9vkfa.js} +1 -1
- package/dist/{ffi-04jzypzk.js → ffi-kb5r0x1j.js} +1 -1
- package/dist/{ffi-t8b862vx.js → ffi-qnrt0y78.js} +1 -1
- package/dist/{ffi-9wvt2wwz.js → ffi-yx2hpf4p.js} +1 -1
- package/dist/hooks/magic-context/empty-task-output.d.ts +16 -0
- package/dist/hooks/magic-context/empty-task-output.d.ts.map +1 -0
- package/dist/hooks/magic-context/hook-handlers.d.ts.map +1 -1
- package/dist/hooks/magic-context/hook.d.ts.map +1 -1
- package/dist/hooks/magic-context/inject-compartments.d.ts +6 -0
- package/dist/hooks/magic-context/inject-compartments.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts +4 -0
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform.d.ts.map +1 -1
- package/dist/{index-cae89eas.js → index-1h9t9xb5.js} +2 -2
- package/dist/{index-wckvcay0.js → index-1yh8g550.js} +8 -6
- package/dist/index-22mw8km4.js +558 -0
- package/dist/{index-cgyfn1s2.js → index-2wchnyk6.js} +4 -2
- package/dist/{index-mmvhrqqb.js → index-5znjkjws.js} +6717 -5001
- package/dist/{index-4cz5nfxf.js → index-btj2qhmc.js} +5 -5
- package/dist/{index-9zhhvr4w.js → index-mg1yx1ph.js} +1 -1
- package/dist/{index-ayd60xnw.js → index-rgdqj8nj.js} +3 -3
- package/dist/{index-ygcng9t8.js → index-rpgg35ms.js} +50 -50
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +177 -88
- package/dist/{module-ES6BEMUI-atfbtnbp.js → module-ES6BEMUI-1yjdz59c.js} +4 -4
- package/dist/{module-asyncify-2EFITU5U-7xckhw8w.js → module-asyncify-2EFITU5U-fdkx4fhy.js} +1 -1
- package/dist/plugin/dream-timer.d.ts +5 -0
- package/dist/plugin/dream-timer.d.ts.map +1 -1
- package/dist/plugin/hooks/create-session-hooks.d.ts.map +1 -1
- package/dist/{prompt-context-jpe2dstn.js → prompt-context-29qkb28f.js} +1 -1
- package/dist/{recomp-orchestrator-jsde4ygw.js → recomp-orchestrator-p030kxtc.js} +15 -15
- package/dist/{resolve-fallbacks-5n5tvge1.js → resolve-fallbacks-qf0ekmz9.js} +3 -3
- package/dist/{rpc-notifications-4d22ybn5.js → rpc-notifications-1ffm755w.js} +6 -6
- package/dist/{safe-notification-target-b693f9x3.js → safe-notification-target-tepzc2xa.js} +3 -3
- package/dist/{send-session-notification-dxske5zm.js → send-session-notification-6v5b72b4.js} +7 -7
- package/dist/shared/harness-provider-map.d.ts +6 -0
- package/dist/shared/harness-provider-map.d.ts.map +1 -1
- package/dist/{storage-meta-session-mk4gsnke.js → storage-meta-session-2306t3j7.js} +8 -8
- package/dist/{task-config-gbp7r23g.js → task-config-at3adc59.js} +6 -6
- package/package.json +2 -2
- package/src/config/schema/magic-context.test.ts +1 -0
- package/src/config/schema/magic-context.ts +3 -3
- package/src/shared/harness-provider-map.test.ts +36 -0
- package/src/shared/harness-provider-map.ts +8 -0
- package/src/tui/index.tsx +1 -1
- package/src/tui/tui-compiled-runtime-imports.test.ts +3 -0
- package/src/tui-compiled/index.tsx +1 -1
- package/dist/index-crke4z5j.js +0 -3022
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
applyModuleEvalRuntimeOptions
|
|
6
6
|
} from "./index-dynqfgx1.js";
|
|
7
7
|
import"./index-9xexf8s7.js";
|
|
8
|
-
import"./index-
|
|
8
|
+
import"./index-1yh8g550.js";
|
|
9
9
|
export {
|
|
10
|
-
|
|
11
|
-
applyBaseRuntimeOptions,
|
|
10
|
+
QuickJSModuleCallbacks,
|
|
12
11
|
QuickJSWASMModule,
|
|
13
|
-
|
|
12
|
+
applyBaseRuntimeOptions,
|
|
13
|
+
applyModuleEvalRuntimeOptions
|
|
14
14
|
};
|
|
@@ -24,6 +24,11 @@ interface ProjectRegistration {
|
|
|
24
24
|
};
|
|
25
25
|
memoryEnabled?: boolean;
|
|
26
26
|
memoryInjectionBudgetTokens?: number;
|
|
27
|
+
historianChildSweep?: {
|
|
28
|
+
timeoutMs: number;
|
|
29
|
+
fallbackModelCount: number;
|
|
30
|
+
keepSubagents: boolean;
|
|
31
|
+
};
|
|
27
32
|
mural?: {
|
|
28
33
|
enabled: boolean;
|
|
29
34
|
model?: 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;
|
|
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;AAWvF,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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aAAa,CAAC;IACnB,YAAY,EAAE,wBAAwB,CAAC;IACvC,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAC5C,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;CAC/C;;;;;;;;;qBA+B+wJ,CAAC;iBAA2B,CAAC;0BAAc,CAAC;uBAAiB,CAAC;;;;;;;;;;;;;qBAAttE,CAAC;mBAAyB,CAAC;iBAAuB,CAAC;iBAAuB,CAAC;0BAAc,CAAC;uBAAiB,CAAC;;;;;;0BAA0t8D,CAAC;;;;;;;;;GAD97hE"}
|
|
@@ -9,27 +9,27 @@ import {
|
|
|
9
9
|
setRecompNote,
|
|
10
10
|
setRecompStarting,
|
|
11
11
|
setRecompTerminal
|
|
12
|
-
} from "./index-
|
|
13
|
-
import"./index-
|
|
12
|
+
} from "./index-5znjkjws.js";
|
|
13
|
+
import"./index-mg1yx1ph.js";
|
|
14
14
|
import"./index-td9depx5.js";
|
|
15
|
-
import"./index-
|
|
16
|
-
import"./index-
|
|
17
|
-
import"./index-
|
|
15
|
+
import"./index-btj2qhmc.js";
|
|
16
|
+
import"./index-22mw8km4.js";
|
|
17
|
+
import"./index-2wchnyk6.js";
|
|
18
18
|
import"./index-sw8gnq34.js";
|
|
19
19
|
import"./index-8mtsfhyg.js";
|
|
20
20
|
import"./index-d62ypazr.js";
|
|
21
21
|
import"./index-8pqfcghm.js";
|
|
22
22
|
import"./index-mmrhhk9a.js";
|
|
23
|
-
import"./index-
|
|
23
|
+
import"./index-1yh8g550.js";
|
|
24
24
|
export {
|
|
25
|
-
|
|
26
|
-
setRecompStarting,
|
|
27
|
-
setRecompNote,
|
|
28
|
-
runManagedUpgrade,
|
|
29
|
-
runManagedRecomp,
|
|
30
|
-
isRecompSkip,
|
|
31
|
-
isRecompFailure,
|
|
32
|
-
isRecompComplete,
|
|
25
|
+
contextualizeUpgradeReason,
|
|
33
26
|
extractRecompReason,
|
|
34
|
-
|
|
27
|
+
isRecompComplete,
|
|
28
|
+
isRecompFailure,
|
|
29
|
+
isRecompSkip,
|
|
30
|
+
runManagedRecomp,
|
|
31
|
+
runManagedUpgrade,
|
|
32
|
+
setRecompNote,
|
|
33
|
+
setRecompStarting,
|
|
34
|
+
setRecompTerminal
|
|
35
35
|
};
|
|
@@ -3,9 +3,9 @@ import {
|
|
|
3
3
|
parseProviderModel,
|
|
4
4
|
resolveFallbackChain
|
|
5
5
|
} from "./index-td9depx5.js";
|
|
6
|
-
import"./index-
|
|
6
|
+
import"./index-1yh8g550.js";
|
|
7
7
|
export {
|
|
8
|
-
|
|
8
|
+
modelBodyField,
|
|
9
9
|
parseProviderModel,
|
|
10
|
-
|
|
10
|
+
resolveFallbackChain
|
|
11
11
|
};
|
|
@@ -6,12 +6,12 @@ import {
|
|
|
6
6
|
pushNotification,
|
|
7
7
|
registerNotificationSink
|
|
8
8
|
} from "./index-d62ypazr.js";
|
|
9
|
-
import"./index-
|
|
9
|
+
import"./index-1yh8g550.js";
|
|
10
10
|
export {
|
|
11
|
-
|
|
12
|
-
pushNotification,
|
|
13
|
-
isTuiConnected,
|
|
14
|
-
drainNotifications,
|
|
11
|
+
__resetNotificationStateForTests,
|
|
15
12
|
acknowledgeNotifications,
|
|
16
|
-
|
|
13
|
+
drainNotifications,
|
|
14
|
+
isTuiConnected,
|
|
15
|
+
pushNotification,
|
|
16
|
+
registerNotificationSink
|
|
17
17
|
};
|
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
} from "./index-pck9vadr.js";
|
|
5
5
|
import"./index-8pqfcghm.js";
|
|
6
6
|
import"./index-mmrhhk9a.js";
|
|
7
|
-
import"./index-
|
|
7
|
+
import"./index-1yh8g550.js";
|
|
8
8
|
export {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
isDefaultSessionTitle,
|
|
10
|
+
waitForSafeNotificationTarget
|
|
11
11
|
};
|
package/dist/{send-session-notification-dxske5zm.js → send-session-notification-6v5b72b4.js}
RENAMED
|
@@ -5,16 +5,16 @@ import {
|
|
|
5
5
|
flushIgnoredMessages,
|
|
6
6
|
sendIgnoredMessage,
|
|
7
7
|
sendUserPrompt
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-btj2qhmc.js";
|
|
9
9
|
import"./index-sw8gnq34.js";
|
|
10
10
|
import"./index-8pqfcghm.js";
|
|
11
11
|
import"./index-mmrhhk9a.js";
|
|
12
|
-
import"./index-
|
|
12
|
+
import"./index-1yh8g550.js";
|
|
13
13
|
export {
|
|
14
|
-
|
|
15
|
-
sendIgnoredMessage,
|
|
16
|
-
flushIgnoredMessages,
|
|
17
|
-
clearIgnoredMessages,
|
|
14
|
+
MAX_QUEUED_IGNORED_NOTIFICATIONS,
|
|
18
15
|
__ignoredNotificationTest,
|
|
19
|
-
|
|
16
|
+
clearIgnoredMessages,
|
|
17
|
+
flushIgnoredMessages,
|
|
18
|
+
sendIgnoredMessage,
|
|
19
|
+
sendUserPrompt
|
|
20
20
|
};
|
|
@@ -16,6 +16,12 @@
|
|
|
16
16
|
* their exported functions remain distinct deliberately. A future OMP catalog
|
|
17
17
|
* rename must not silently change plain-Pi behavior (or vice versa).
|
|
18
18
|
*
|
|
19
|
+
* The OpenCode Zen gateway is the one place the two harnesses diverge: OpenCode
|
|
20
|
+
* and plain Pi both name it `opencode`, while OMP exposes the same gateway as
|
|
21
|
+
* `opencode-zen`. Only the OMP map carries that pair; plain Pi keeps `opencode`
|
|
22
|
+
* as an identity. `opencode-go` is a distinct gateway (the "go" variant at
|
|
23
|
+
* opencode.ai/zen/go) and stays unmapped on both harnesses.
|
|
24
|
+
*
|
|
19
25
|
* The mapping is intentionally not a one-to-one provider identity. Both
|
|
20
26
|
* harnesses also expose plain `openai` and `google` providers for direct API
|
|
21
27
|
* keys, while the canonical prefix does not record whether a subscription or
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harness-provider-map.d.ts","sourceRoot":"","sources":["../../src/shared/harness-provider-map.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"harness-provider-map.d.ts","sourceRoot":"","sources":["../../src/shared/harness-provider-map.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAsCH;+EAC+E;AAC/E,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED;;mFAEmF;AACnF,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAExD;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAUzD;AAED,sEAAsE;AACtE,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED,sEAAsE;AACtE,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEzD"}
|
|
@@ -5,17 +5,17 @@ import {
|
|
|
5
5
|
markSessionCleanupPending,
|
|
6
6
|
retryPendingSessionCleanups,
|
|
7
7
|
updateSessionMeta
|
|
8
|
-
} from "./index-
|
|
9
|
-
import"./index-
|
|
8
|
+
} from "./index-22mw8km4.js";
|
|
9
|
+
import"./index-2wchnyk6.js";
|
|
10
10
|
import"./index-sw8gnq34.js";
|
|
11
11
|
import"./index-8pqfcghm.js";
|
|
12
12
|
import"./index-mmrhhk9a.js";
|
|
13
|
-
import"./index-
|
|
13
|
+
import"./index-1yh8g550.js";
|
|
14
14
|
export {
|
|
15
|
-
|
|
16
|
-
retryPendingSessionCleanups,
|
|
17
|
-
markSessionCleanupPending,
|
|
18
|
-
getOrCreateSessionMeta,
|
|
15
|
+
advanceToolReclaimWatermark,
|
|
19
16
|
clearSession,
|
|
20
|
-
|
|
17
|
+
getOrCreateSessionMeta,
|
|
18
|
+
markSessionCleanupPending,
|
|
19
|
+
retryPendingSessionCleanups,
|
|
20
|
+
updateSessionMeta
|
|
21
21
|
};
|
|
@@ -7,12 +7,12 @@ import {
|
|
|
7
7
|
userMemoryPromotionThreshold
|
|
8
8
|
} from "./index-2y0ybv5x.js";
|
|
9
9
|
import"./index-td9depx5.js";
|
|
10
|
-
import"./index-
|
|
10
|
+
import"./index-1yh8g550.js";
|
|
11
11
|
export {
|
|
12
|
-
|
|
13
|
-
userMemoryCollectionEnabled,
|
|
14
|
-
summarizeDreamSchedule,
|
|
15
|
-
enabledDreamTasks,
|
|
12
|
+
buildDreamTaskRuntimeConfigs,
|
|
16
13
|
dreamTaskScheduled,
|
|
17
|
-
|
|
14
|
+
enabledDreamTasks,
|
|
15
|
+
summarizeDreamSchedule,
|
|
16
|
+
userMemoryCollectionEnabled,
|
|
17
|
+
userMemoryPromotionThreshold
|
|
18
18
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cortexkit/opencode-magic-context",
|
|
3
|
-
"version": "0.38.
|
|
3
|
+
"version": "0.38.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "OpenCode plugin for Magic Context — cross-session memory and context management",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"build:tui": "bun scripts/build-tui.ts",
|
|
40
40
|
"check:tui-compiled": "bun run build:tui && git diff --exit-code -- src/tui-compiled && test -z \"$(git status --porcelain -- src/tui-compiled)\"",
|
|
41
41
|
"typecheck": "tsc -p ../retina-local-fs/tsconfig.build.json && tsc --noEmit && tsc -p tsconfig.scripts.json",
|
|
42
|
-
"test": "bun test",
|
|
42
|
+
"test": "bun test --timeout 30000",
|
|
43
43
|
"lint": "biome check .",
|
|
44
44
|
"lint:fix": "biome check --write .",
|
|
45
45
|
"format": "biome format --write .",
|
|
@@ -41,6 +41,7 @@ describe("MagicContextConfigSchema", () => {
|
|
|
41
41
|
overlay: true,
|
|
42
42
|
},
|
|
43
43
|
});
|
|
44
|
+
expect(result.historian_timeout_ms).toBeGreaterThanOrEqual(10 * 60_000);
|
|
44
45
|
expect(result.historian).toBeUndefined();
|
|
45
46
|
expect(result.dreamer).toBeUndefined();
|
|
46
47
|
expect(result.sidekick).toBeUndefined();
|
|
@@ -16,7 +16,7 @@ export const DEFAULT_EXECUTE_THRESHOLD_PERCENTAGE = 65;
|
|
|
16
16
|
// escalation derives above the effective threshold and the 95% wall stays fixed.
|
|
17
17
|
export const EXECUTE_THRESHOLD_CAP_MESSAGE =
|
|
18
18
|
"execute_threshold is capped at 90% for cache safety: output capacity is reserved from the usable context window, and the remaining 10% absorbs mid-turn growth before the absolute 95% emergency wall. Use a value between 20 and 90.";
|
|
19
|
-
export const DEFAULT_HISTORIAN_TIMEOUT_MS =
|
|
19
|
+
export const DEFAULT_HISTORIAN_TIMEOUT_MS = 600_000;
|
|
20
20
|
export const DEFAULT_HISTORY_BUDGET_PERCENTAGE = 0.15;
|
|
21
21
|
|
|
22
22
|
export const DEFAULT_LOCAL_EMBEDDING_MODEL = "Xenova/all-MiniLM-L6-v2";
|
|
@@ -709,7 +709,7 @@ export const MagicContextConfigSchema = z
|
|
|
709
709
|
.union([z.string(), z.object({ default: z.string() }).catchall(z.string())])
|
|
710
710
|
.default("5m")
|
|
711
711
|
.describe(
|
|
712
|
-
'
|
|
712
|
+
'How long Magic Context assumes the provider\'s cached prefix stays valid. This is MC\'s own deferral gate — it does not change the provider\'s actual cache lifetime. String (e.g. "5m", "1h", "30s") or per-model object ({ default: "5m", "model-id": "10m" }). Set to "never" to mean MC never assumes expiry (for lanes kept warm externally by a cache-keep tool) — disables the idle-TTL heuristic so MC never initiates a rebuild based on elapsed time. Provider-side extended TTL is a separate request-level concern (cache_control: { ttl } in the request body).',
|
|
713
713
|
),
|
|
714
714
|
prompt_surface: PromptSurfaceConfigSchema.default({ default: "full" }).describe(
|
|
715
715
|
"Prompt-surface presets: default is full; models use bare model IDs, provider/model, or provider/* routing keys. Guidance and tool-description overrides are user-level only. On OpenCode and Pi, per-model routing applies to the guidance block only: tool descriptions are registered once per process, so they follow the default preset (a v1 plugin-surface limitation; per-model tool descriptions are planned for the OpenCode v2 plugin API once the SDK stabilizes).",
|
|
@@ -784,7 +784,7 @@ export const MagicContextConfigSchema = z
|
|
|
784
784
|
.number()
|
|
785
785
|
.min(60_000)
|
|
786
786
|
.default(DEFAULT_HISTORIAN_TIMEOUT_MS)
|
|
787
|
-
.describe("Timeout for each historian prompt call in milliseconds (default:
|
|
787
|
+
.describe("Timeout for each historian prompt call in milliseconds (default: 600000)"),
|
|
788
788
|
commit_cluster_trigger: z
|
|
789
789
|
.object({
|
|
790
790
|
enabled: z
|
|
@@ -108,6 +108,42 @@ describe("OMP provider boundary", () => {
|
|
|
108
108
|
expect(resolveModelRefForOmp(ompModelRefToCanonical(selector))).toBe(selector);
|
|
109
109
|
});
|
|
110
110
|
|
|
111
|
+
it("translates the OpenCode Zen gateway (opencode) to OMP's opencode-zen spelling", () => {
|
|
112
|
+
expect(resolveModelRefForOmp("opencode/deepseek-v4-flash-free")).toBe(
|
|
113
|
+
"opencode-zen/deepseek-v4-flash-free",
|
|
114
|
+
);
|
|
115
|
+
expect(ompModelRefToCanonical("opencode-zen/deepseek-v4-flash-free")).toBe(
|
|
116
|
+
"opencode/deepseek-v4-flash-free",
|
|
117
|
+
);
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
it("resolves an opencode/ shared ref on OMP via modelRefLookupOrder", () => {
|
|
121
|
+
expect(modelRefLookupOrder("opencode/deepseek-v4-flash-free")).toEqual([
|
|
122
|
+
"opencode/deepseek-v4-flash-free",
|
|
123
|
+
"opencode-zen/deepseek-v4-flash-free",
|
|
124
|
+
]);
|
|
125
|
+
expect(modelRefLookupOrder("opencode-zen/deepseek-v4-flash-free")).toEqual([
|
|
126
|
+
"opencode/deepseek-v4-flash-free",
|
|
127
|
+
"opencode-zen/deepseek-v4-flash-free",
|
|
128
|
+
]);
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
it("leaves the OpenCode Zen gateway unchanged on plain Pi (Pi uses opencode)", () => {
|
|
132
|
+
expect(resolveModelRefForPi("opencode/deepseek-v4-flash-free")).toBe(
|
|
133
|
+
"opencode/deepseek-v4-flash-free",
|
|
134
|
+
);
|
|
135
|
+
expect(piModelRefToCanonical("opencode/deepseek-v4-flash-free")).toBe(
|
|
136
|
+
"opencode/deepseek-v4-flash-free",
|
|
137
|
+
);
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
it("keeps opencode-go unmapped on both harnesses (distinct gateway)", () => {
|
|
141
|
+
expect(resolveModelRefForOmp("opencode-go/kimi-k2.6")).toBe("opencode-go/kimi-k2.6");
|
|
142
|
+
expect(ompModelRefToCanonical("opencode-go/kimi-k2.6")).toBe("opencode-go/kimi-k2.6");
|
|
143
|
+
expect(resolveModelRefForPi("opencode-go/kimi-k2.6")).toBe("opencode-go/kimi-k2.6");
|
|
144
|
+
expect(piModelRefToCanonical("opencode-go/kimi-k2.6")).toBe("opencode-go/kimi-k2.6");
|
|
145
|
+
});
|
|
146
|
+
|
|
111
147
|
it("passes through provider ids that collide with Object.prototype members", () => {
|
|
112
148
|
for (const ref of [
|
|
113
149
|
"constructor/model",
|
|
@@ -16,6 +16,12 @@
|
|
|
16
16
|
* their exported functions remain distinct deliberately. A future OMP catalog
|
|
17
17
|
* rename must not silently change plain-Pi behavior (or vice versa).
|
|
18
18
|
*
|
|
19
|
+
* The OpenCode Zen gateway is the one place the two harnesses diverge: OpenCode
|
|
20
|
+
* and plain Pi both name it `opencode`, while OMP exposes the same gateway as
|
|
21
|
+
* `opencode-zen`. Only the OMP map carries that pair; plain Pi keeps `opencode`
|
|
22
|
+
* as an identity. `opencode-go` is a distinct gateway (the "go" variant at
|
|
23
|
+
* opencode.ai/zen/go) and stays unmapped on both harnesses.
|
|
24
|
+
*
|
|
19
25
|
* The mapping is intentionally not a one-to-one provider identity. Both
|
|
20
26
|
* harnesses also expose plain `openai` and `google` providers for direct API
|
|
21
27
|
* keys, while the canonical prefix does not record whether a subscription or
|
|
@@ -43,11 +49,13 @@ const PI_TO_CANONICAL_PROVIDER: Readonly<Record<string, string>> = {
|
|
|
43
49
|
const CANONICAL_TO_OMP_PROVIDER: Readonly<Record<string, string>> = {
|
|
44
50
|
openai: "openai-codex",
|
|
45
51
|
google: "google-antigravity",
|
|
52
|
+
opencode: "opencode-zen",
|
|
46
53
|
};
|
|
47
54
|
|
|
48
55
|
const OMP_TO_CANONICAL_PROVIDER: Readonly<Record<string, string>> = {
|
|
49
56
|
"openai-codex": "openai",
|
|
50
57
|
"google-antigravity": "google",
|
|
58
|
+
"opencode-zen": "opencode",
|
|
51
59
|
};
|
|
52
60
|
|
|
53
61
|
/** Remap only the provider prefix (text before the first "/"), preserving the
|
package/src/tui/index.tsx
CHANGED
|
@@ -356,7 +356,7 @@ const StatusDialog = (props: { api: TuiPluginApi; s: StatusDetail }) => {
|
|
|
356
356
|
</box>
|
|
357
357
|
<R t={t()} l="Configured" v={s().cacheTtl} />
|
|
358
358
|
<R t={t()} l="Last response" v={s().lastResponseTime > 0 ? `${Math.round(elapsed() / 1000)}s ago` : "never"} />
|
|
359
|
-
<R t={t()} l="Remaining" v={s().cacheExpired ? "expired" : s().cacheNeverExpires ? "never
|
|
359
|
+
<R t={t()} l="Remaining" v={s().cacheExpired ? "expired" : s().cacheNeverExpires ? "never (MC never assumes expiry — external cache-keep)" : `${Math.round(s().cacheRemainingMs / 1000)}s`} fg={s().cacheExpired ? t().warning : t().textMuted} />
|
|
360
360
|
<R t={t()} l="Auto-execute" v={s().cacheExpired ? "yes (expired)" : s().cacheNeverExpires ? `at ≥${formatThresholdPercent(s().executeThreshold)}%` : `at TTL or ≥${formatThresholdPercent(s().executeThreshold)}%`} fg={t().textMuted} />
|
|
361
361
|
<box marginTop={1}>
|
|
362
362
|
<text fg={t().text}><b>Memory</b></text>
|
|
@@ -49,6 +49,9 @@ describe("compiled TUI runtime imports", () => {
|
|
|
49
49
|
* Built from the shared list so the test cannot cover fewer modules than the
|
|
50
50
|
* build rewrites. */
|
|
51
51
|
async function loadExportSets(): Promise<Record<string, Set<string>>> {
|
|
52
|
+
// @opentui/core/testing subclasses a core export during module initialization;
|
|
53
|
+
// warm core before the parallel imports so Bun cannot expose its TDZ.
|
|
54
|
+
await import("@opentui/core");
|
|
52
55
|
const entries = await Promise.all(
|
|
53
56
|
TUI_RUNTIME_SPECIFIERS.map(
|
|
54
57
|
async (specifier) =>
|
|
@@ -671,7 +671,7 @@ const StatusDialog = props => {
|
|
|
671
671
|
},
|
|
672
672
|
l: "Remaining",
|
|
673
673
|
get v() {
|
|
674
|
-
return _$memo(() => !!s().cacheExpired)() ? "expired" : _$memo(() => !!s().cacheNeverExpires)() ? "never
|
|
674
|
+
return _$memo(() => !!s().cacheExpired)() ? "expired" : _$memo(() => !!s().cacheNeverExpires)() ? "never (MC never assumes expiry — external cache-keep)" : `${Math.round(s().cacheRemainingMs / 1000)}s`;
|
|
675
675
|
},
|
|
676
676
|
get fg() {
|
|
677
677
|
return _$memo(() => !!s().cacheExpired)() ? t().warning : t().textMuted;
|