@cortexkit/opencode-magic-context 0.37.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/README.md +2 -0
- 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-0f8xpyw2.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/classify-prompt.d.ts +5 -1
- package/dist/features/magic-context/dreamer/classify-prompt.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/classify.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/manifest-parser.d.ts +8 -0
- package/dist/features/magic-context/dreamer/manifest-parser.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/map-memories-prompt.d.ts +7 -1
- package/dist/features/magic-context/dreamer/map-memories-prompt.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/map-memories.d.ts +18 -0
- package/dist/features/magic-context/dreamer/map-memories.d.ts.map +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/dreamer/storage-dream-runs.d.ts +5 -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.map +1 -1
- package/dist/features/magic-context/dreamer/verify-prompt.d.ts +5 -1
- package/dist/features/magic-context/dreamer/verify-prompt.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 +6 -1
- package/dist/features/magic-context/fail-closed-block.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/reclaim-protection.d.ts +13 -0
- package/dist/features/magic-context/reclaim-protection.d.ts.map +1 -0
- package/dist/features/magic-context/storage-db.d.ts +7 -2
- 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-persisted.d.ts +7 -6
- package/dist/features/magic-context/storage-meta-persisted.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/storage-tags.d.ts +13 -5
- package/dist/features/magic-context/storage-tags.d.ts.map +1 -1
- 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/auto-update-checker/checker.d.ts +8 -1
- package/dist/hooks/auto-update-checker/checker.d.ts.map +1 -1
- package/dist/hooks/auto-update-checker/index.d.ts.map +1 -1
- package/dist/hooks/magic-context/channel2-cycle.d.ts +16 -0
- package/dist/hooks/magic-context/channel2-cycle.d.ts.map +1 -0
- package/dist/hooks/magic-context/channel2-delivery.d.ts +3 -9
- package/dist/hooks/magic-context/channel2-delivery.d.ts.map +1 -1
- 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/ctx-reduce-nudge.d.ts +33 -103
- package/dist/hooks/magic-context/ctx-reduce-nudge.d.ts.map +1 -1
- package/dist/hooks/magic-context/emergency-drop.d.ts.map +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/event-handler.d.ts.map +1 -1
- package/dist/hooks/magic-context/execute-status.d.ts +2 -1
- package/dist/hooks/magic-context/execute-status.d.ts.map +1 -1
- package/dist/hooks/magic-context/fold-execution-gate.d.ts +2 -0
- package/dist/hooks/magic-context/fold-execution-gate.d.ts.map +1 -0
- package/dist/hooks/magic-context/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/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/rust-mode-transform.d.ts +4 -2
- package/dist/hooks/magic-context/rust-mode-transform.d.ts.map +1 -1
- package/dist/hooks/magic-context/strip-content.d.ts +10 -8
- package/dist/hooks/magic-context/strip-content.d.ts.map +1 -1
- package/dist/hooks/magic-context/supersession-reclaim.d.ts.map +1 -1
- package/dist/hooks/magic-context/system-prompt-hash.d.ts.map +1 -1
- package/dist/hooks/magic-context/tail-hygiene-walk.d.ts +78 -0
- package/dist/hooks/magic-context/tail-hygiene-walk.d.ts.map +1 -0
- package/dist/hooks/magic-context/tool-reclaim.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts +7 -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-0ze9p983.js → index-5znjkjws.js} +9996 -7043
- package/dist/{index-4cz5nfxf.js → index-btj2qhmc.js} +5 -5
- package/dist/{index-q0t189ay.js → index-mg1yx1ph.js} +28 -36
- 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 +776 -846
- 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/plugin/messages-transform.d.ts.map +1 -1
- package/dist/plugin/rpc-handlers.d.ts +2 -0
- package/dist/plugin/rpc-handlers.d.ts.map +1 -1
- package/dist/{prompt-context-jpe2dstn.js → prompt-context-29qkb28f.js} +1 -1
- package/dist/{recomp-orchestrator-c3ff16k7.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/shared/models-dev-cache.d.ts +2 -0
- 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 +15 -0
- package/dist/shared/rpc-types.d.ts.map +1 -1
- package/dist/shared/rpc-utils.d.ts +9 -0
- package/dist/shared/rpc-utils.d.ts.map +1 -1
- package/dist/shared/tail-hygiene-status.d.ts +15 -0
- package/dist/shared/tail-hygiene-status.d.ts.map +1 -0
- package/dist/shared/window-geometry.d.ts +3 -2
- package/dist/shared/window-geometry.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 +4 -2
- package/src/config/schema/magic-context.test.ts +1 -0
- package/src/config/schema/magic-context.ts +5 -5
- package/src/shared/harness-provider-map.test.ts +36 -0
- package/src/shared/harness-provider-map.ts +8 -0
- package/src/shared/models-dev-cache.test.ts +25 -0
- package/src/shared/models-dev-cache.ts +5 -4
- package/src/shared/rpc-server.ts +1 -0
- package/src/shared/rpc-types.ts +16 -0
- package/src/shared/rpc-utils.test.ts +25 -0
- package/src/shared/rpc-utils.ts +80 -0
- package/src/shared/tail-hygiene-status.ts +57 -0
- package/src/shared/window-geometry.test.ts +34 -1
- package/src/shared/window-geometry.ts +37 -40
- package/src/tui/index.tsx +12 -2
- package/src/tui/slots/sidebar-content.tsx +17 -5
- package/src/tui/tui-compiled-runtime-imports.test.ts +3 -0
- package/src/tui-compiled/index.tsx +312 -290
- package/src/tui-compiled/slots/sidebar-content.tsx +316 -287
- package/dist/index-crke4z5j.js +0 -3022
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./index-8pqfcghm.js";
|
|
7
7
|
import {
|
|
8
8
|
__require
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-1yh8g550.js";
|
|
10
10
|
|
|
11
11
|
// src/shared/error-message.ts
|
|
12
12
|
function getErrorMessage(error) {
|
|
@@ -105,11 +105,11 @@ async function trySendTuiToast(sessionId, text, params, forcePersist) {
|
|
|
105
105
|
const message = text.length > 200 ? `${text.slice(0, 200)}…` : text;
|
|
106
106
|
const toastVariant = inferToastVariant(text);
|
|
107
107
|
const duration = params.toastDurationMs ?? 5000;
|
|
108
|
-
const { isTuiConnected: checkTui } = await import("./rpc-notifications-
|
|
108
|
+
const { isTuiConnected: checkTui } = await import("./rpc-notifications-1ffm755w.js");
|
|
109
109
|
if (!checkTui(sessionId))
|
|
110
110
|
return false;
|
|
111
111
|
try {
|
|
112
|
-
const { pushNotification } = await import("./rpc-notifications-
|
|
112
|
+
const { pushNotification } = await import("./rpc-notifications-1ffm755w.js");
|
|
113
113
|
pushNotification("toast", {
|
|
114
114
|
title,
|
|
115
115
|
message,
|
|
@@ -171,7 +171,7 @@ async function sendIgnoredMessageNow(client, sessionId, text, params, forcePersi
|
|
|
171
171
|
queueIgnoredNotification({ client, sessionId, text, params, forcePersist });
|
|
172
172
|
return "queued";
|
|
173
173
|
}
|
|
174
|
-
const { waitForSafeNotificationTarget } = await import("./safe-notification-target-
|
|
174
|
+
const { waitForSafeNotificationTarget } = await import("./safe-notification-target-tepzc2xa.js");
|
|
175
175
|
if (await waitForSafeNotificationTarget(client, sessionId) === "skip") {
|
|
176
176
|
sessionLog(sessionId, "notification skipped (session not titled yet)");
|
|
177
177
|
return "skipped";
|
|
@@ -190,7 +190,7 @@ async function sendIgnoredMessageNow(client, sessionId, text, params, forcePersi
|
|
|
190
190
|
let model = params.providerId && params.modelId ? { providerID: params.providerId, modelID: params.modelId } : undefined;
|
|
191
191
|
if (!agent || !model || !variant) {
|
|
192
192
|
try {
|
|
193
|
-
const { resolvePromptContext } = await import("./prompt-context-
|
|
193
|
+
const { resolvePromptContext } = await import("./prompt-context-29qkb28f.js");
|
|
194
194
|
const resolved = await resolvePromptContext(client, sessionId);
|
|
195
195
|
if (resolved) {
|
|
196
196
|
agent = agent ?? resolved.agent;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
modelRefLookupOrder
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-2wchnyk6.js";
|
|
4
4
|
import {
|
|
5
5
|
sessionLog
|
|
6
6
|
} from "./index-8pqfcghm.js";
|
|
@@ -71,28 +71,6 @@ function isRecord(value) {
|
|
|
71
71
|
function isFinitePositive(value) {
|
|
72
72
|
return typeof value === "number" && Number.isFinite(value) && value > 0;
|
|
73
73
|
}
|
|
74
|
-
function modelKeyLookupOrder(providerID, modelID) {
|
|
75
|
-
const candidates = [...modelRefLookupOrder(`${providerID}/${modelID}`), modelID];
|
|
76
|
-
const colon = modelID.lastIndexOf(":");
|
|
77
|
-
if (colon > 0) {
|
|
78
|
-
const bareModel = modelID.slice(0, colon);
|
|
79
|
-
candidates.push(...modelRefLookupOrder(`${providerID}/${bareModel}`), bareModel);
|
|
80
|
-
}
|
|
81
|
-
return [...new Set(candidates)];
|
|
82
|
-
}
|
|
83
|
-
function configuredOutputReserve(config, providerID, modelID) {
|
|
84
|
-
if (typeof config === "number") {
|
|
85
|
-
return Number.isFinite(config) && config >= 0 ? config : undefined;
|
|
86
|
-
}
|
|
87
|
-
if (!config)
|
|
88
|
-
return;
|
|
89
|
-
for (const candidate of modelKeyLookupOrder(providerID, modelID)) {
|
|
90
|
-
const value = config[candidate];
|
|
91
|
-
if (typeof value === "number" && Number.isFinite(value) && value >= 0)
|
|
92
|
-
return value;
|
|
93
|
-
}
|
|
94
|
-
return Number.isFinite(config.default) && config.default >= 0 ? config.default : undefined;
|
|
95
|
-
}
|
|
96
74
|
function scalarizeFact(value) {
|
|
97
75
|
if (value.kind === "stated")
|
|
98
76
|
return isFinitePositive(value.value) ? value.value : undefined;
|
|
@@ -329,21 +307,34 @@ function deriveWindowGeometry(providerID, modelID, catalogLimit, options = {}) {
|
|
|
329
307
|
const geometryFact = overlayGeometry(options.overlay);
|
|
330
308
|
const geometry = geometryFact?.kind === "stated" ? geometryFact.value : geometryFact?.kind === "unknown" ? "shared_upfront" : PROVIDER_GEOMETRY[providerID] ?? "shared_upfront";
|
|
331
309
|
const geometryOverride = geometryFact?.kind === "stated" ? geometryFact.value : undefined;
|
|
310
|
+
const preCarvedInput = isFinitePositive(input) && (!isFinitePositive(softContext) || input < softContext);
|
|
311
|
+
const outputReserveOverride = typeof options.outputReserveOverride === "number" && Number.isFinite(options.outputReserveOverride) && options.outputReserveOverride >= 0 ? options.outputReserveOverride : undefined;
|
|
312
|
+
let derivationWindow = softContext ?? input;
|
|
332
313
|
let usableSoft;
|
|
333
314
|
let softReserve = 0;
|
|
334
315
|
let reserveSource = "none";
|
|
335
|
-
if (
|
|
316
|
+
if (outputReserveOverride !== undefined) {
|
|
317
|
+
const reserveWindow = preCarvedInput ? input : softContext ?? input;
|
|
318
|
+
if (!isFinitePositive(reserveWindow))
|
|
319
|
+
return;
|
|
320
|
+
derivationWindow = reserveWindow;
|
|
321
|
+
softReserve = outputReserveOverride;
|
|
322
|
+
reserveSource = "output_config";
|
|
323
|
+
const floor = Math.max(MIN_PLAUSIBLE_CONTEXT_LIMIT, reserveWindow * 0.5);
|
|
324
|
+
const flooredReserve = Math.min(softReserve, Math.max(0, reserveWindow - floor));
|
|
325
|
+
if (flooredReserve < softReserve) {
|
|
326
|
+
logGeometryClampOnce(`soft-floor|${providerID}/${modelID}|${softReserve}|${flooredReserve}`, `output reserve clamped by the half-window floor for ${providerID}/${modelID}: reserve ${softReserve} → ${flooredReserve}`, options.log);
|
|
327
|
+
}
|
|
328
|
+
softReserve = flooredReserve;
|
|
329
|
+
usableSoft = Math.floor(reserveWindow - softReserve);
|
|
330
|
+
} else if (preCarvedInput) {
|
|
336
331
|
usableSoft = input;
|
|
337
332
|
if (isFinitePositive(softContext)) {
|
|
338
333
|
softReserve = Math.max(0, softContext - input);
|
|
339
334
|
reserveSource = "output_catalog";
|
|
340
335
|
}
|
|
341
336
|
} else if (isFinitePositive(softContext)) {
|
|
342
|
-
|
|
343
|
-
if (configuredReserve !== undefined) {
|
|
344
|
-
softReserve = configuredReserve;
|
|
345
|
-
reserveSource = "output_config";
|
|
346
|
-
} else if (geometry === "separate" && (options.overlay === undefined || options.harness === "pi" || geometryOverride !== undefined)) {
|
|
337
|
+
if (geometry === "separate" && (options.overlay === undefined || options.harness === "pi" || geometryOverride !== undefined)) {
|
|
347
338
|
softReserve = 0;
|
|
348
339
|
reserveSource = "none";
|
|
349
340
|
} else {
|
|
@@ -383,13 +374,14 @@ function deriveWindowGeometry(providerID, modelID, catalogLimit, options = {}) {
|
|
|
383
374
|
logGeometryClampOnce(`${providerID}/${modelID}|${usableSoft}|${usableHard}`, `usable hard limit clamped for ${providerID}/${modelID}: ${usableHard} → ${usableSoft} (overlay/provider inversion)`, options.log);
|
|
384
375
|
usableHard = usableSoft;
|
|
385
376
|
}
|
|
377
|
+
const resolvedWindow = derivationWindow ?? usableSoft;
|
|
386
378
|
return {
|
|
387
379
|
usableSoft,
|
|
388
380
|
usableHard,
|
|
389
381
|
geometry,
|
|
390
382
|
derivation: {
|
|
391
|
-
window: Math.floor(
|
|
392
|
-
reserve: Math.floor(Math.max(0,
|
|
383
|
+
window: Math.floor(resolvedWindow),
|
|
384
|
+
reserve: Math.floor(Math.max(0, resolvedWindow - usableSoft)),
|
|
393
385
|
reserveSource,
|
|
394
386
|
geometry
|
|
395
387
|
}
|
|
@@ -488,7 +480,7 @@ function persistApiCache() {
|
|
|
488
480
|
function isFinitePositive2(value) {
|
|
489
481
|
return typeof value === "number" && Number.isFinite(value) && value > 0;
|
|
490
482
|
}
|
|
491
|
-
function
|
|
483
|
+
function modelKeyLookupOrder(providerID, modelID) {
|
|
492
484
|
const candidates = [...modelRefLookupOrder(`${providerID}/${modelID}`), modelID];
|
|
493
485
|
const colon = modelID.lastIndexOf(":");
|
|
494
486
|
if (colon > 0) {
|
|
@@ -497,12 +489,12 @@ function modelKeyLookupOrder2(providerID, modelID) {
|
|
|
497
489
|
}
|
|
498
490
|
return [...new Set(candidates)];
|
|
499
491
|
}
|
|
500
|
-
function
|
|
492
|
+
function resolveOutputReserve(providerID, modelID, config = outputReserveConfig) {
|
|
501
493
|
if (typeof config === "number")
|
|
502
494
|
return Number.isFinite(config) && config >= 0 ? config : undefined;
|
|
503
495
|
if (!config)
|
|
504
496
|
return;
|
|
505
|
-
for (const candidate of
|
|
497
|
+
for (const candidate of modelKeyLookupOrder(providerID, modelID)) {
|
|
506
498
|
const value = config[candidate];
|
|
507
499
|
if (typeof value === "number" && Number.isFinite(value) && value >= 0)
|
|
508
500
|
return value;
|
|
@@ -527,7 +519,7 @@ function resolveLimit(limit, providerID, modelID, reserveConfig = outputReserveC
|
|
|
527
519
|
return input;
|
|
528
520
|
if (context === undefined)
|
|
529
521
|
return;
|
|
530
|
-
const configuredReserve =
|
|
522
|
+
const configuredReserve = resolveOutputReserve(providerID, modelID, reserveConfig);
|
|
531
523
|
let reserve;
|
|
532
524
|
if (configuredReserve !== undefined) {
|
|
533
525
|
reserve = configuredReserve;
|
|
@@ -640,7 +632,7 @@ function getSdkWindowGeometry(providerID, modelID, detectedContextLimit, options
|
|
|
640
632
|
output: metadata.outputLimit
|
|
641
633
|
}, {
|
|
642
634
|
overlay: resolveWindowOverlayFacts(providerID, modelID, getWindowOverlay()),
|
|
643
|
-
|
|
635
|
+
outputReserveOverride: resolveOutputReserve(providerID, modelID),
|
|
644
636
|
harness: options?.harness ?? "opencode",
|
|
645
637
|
contextCap: promptOnlyDetected === undefined && isFinitePositive2(detectedContextLimit) ? detectedContextLimit : undefined
|
|
646
638
|
});
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__commonJS,
|
|
3
3
|
__require
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-1yh8g550.js";
|
|
5
5
|
|
|
6
6
|
// ../../node_modules/.bun/@jitl+quickjs-ffi-types@0.32.0/node_modules/@jitl/quickjs-ffi-types/dist/index.js
|
|
7
|
-
var require_dist = __commonJS((exports, module)
|
|
7
|
+
var require_dist = __commonJS(function(exports, module) {
|
|
8
8
|
var __defProp = Object.defineProperty;
|
|
9
9
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
10
10
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -39,7 +39,7 @@ var require_dist = __commonJS((exports, module) => {
|
|
|
39
39
|
});
|
|
40
40
|
|
|
41
41
|
// ../../node_modules/.bun/@jitl+quickjs-singlefile-cjs-release-asyncify@0.32.0/node_modules/@jitl/quickjs-singlefile-cjs-release-asyncify/dist/index.js
|
|
42
|
-
var require_dist2 = __commonJS((exports, module)
|
|
42
|
+
var require_dist2 = __commonJS(function(exports, module) {
|
|
43
43
|
var __filename = "/home/runner/work/magic-context/magic-context/node_modules/.bun/@jitl+quickjs-singlefile-cjs-release-asyncify@0.32.0/node_modules/@jitl/quickjs-singlefile-cjs-release-asyncify/dist/index.js";
|
|
44
44
|
var __create = Object.create;
|
|
45
45
|
var __defProp = Object.defineProperty;
|
|
@@ -34,17 +34,17 @@ import {
|
|
|
34
34
|
} from "./index-9xexf8s7.js";
|
|
35
35
|
import {
|
|
36
36
|
__require
|
|
37
|
-
} from "./index-
|
|
37
|
+
} from "./index-1yh8g550.js";
|
|
38
38
|
|
|
39
39
|
// ../../node_modules/.bun/quickjs-emscripten-core@0.32.0/node_modules/quickjs-emscripten-core/dist/index.mjs
|
|
40
40
|
async function newQuickJSWASMModuleFromVariant(variantOrPromise) {
|
|
41
|
-
let variant = smartUnwrap(await variantOrPromise), [wasmModuleLoader, QuickJSFFI, { QuickJSWASMModule: QuickJSWASMModule2 }] = await Promise.all([variant.importModuleLoader().then(smartUnwrap), variant.importFFI(), import("./module-ES6BEMUI-
|
|
41
|
+
let variant = smartUnwrap(await variantOrPromise), [wasmModuleLoader, QuickJSFFI, { QuickJSWASMModule: QuickJSWASMModule2 }] = await Promise.all([variant.importModuleLoader().then(smartUnwrap), variant.importFFI(), import("./module-ES6BEMUI-1yjdz59c.js").then(smartUnwrap)]), wasmModule = await wasmModuleLoader();
|
|
42
42
|
wasmModule.type = "sync";
|
|
43
43
|
let ffi = new QuickJSFFI(wasmModule);
|
|
44
44
|
return new QuickJSWASMModule2(wasmModule, ffi);
|
|
45
45
|
}
|
|
46
46
|
async function newQuickJSAsyncWASMModuleFromVariant(variantOrPromise) {
|
|
47
|
-
let variant = smartUnwrap(await variantOrPromise), [wasmModuleLoader, QuickJSAsyncFFI, { QuickJSAsyncWASMModule: QuickJSAsyncWASMModule2 }] = await Promise.all([variant.importModuleLoader().then(smartUnwrap), variant.importFFI(), import("./module-asyncify-2EFITU5U-
|
|
47
|
+
let variant = smartUnwrap(await variantOrPromise), [wasmModuleLoader, QuickJSAsyncFFI, { QuickJSAsyncWASMModule: QuickJSAsyncWASMModule2 }] = await Promise.all([variant.importModuleLoader().then(smartUnwrap), variant.importFFI(), import("./module-asyncify-2EFITU5U-fdkx4fhy.js").then(smartUnwrap)]), wasmModule = await wasmModuleLoader();
|
|
48
48
|
wasmModule.type = "async";
|
|
49
49
|
let ffi = new QuickJSAsyncFFI(wasmModule);
|
|
50
50
|
return new QuickJSAsyncWASMModule2(wasmModule, ffi);
|
|
@@ -163,19 +163,19 @@ var TestQuickJSWASMModule = class {
|
|
|
163
163
|
};
|
|
164
164
|
|
|
165
165
|
// ../../node_modules/.bun/@jitl+quickjs-wasmfile-debug-sync@0.32.0/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/index.mjs
|
|
166
|
-
var variant = { type: "sync", importFFI: () => import("./ffi-
|
|
166
|
+
var variant = { type: "sync", importFFI: () => import("./ffi-yx2hpf4p.js").then((mod) => mod.QuickJSFFI), importModuleLoader: () => import("./emscripten-module-ss4g4spn.js").then((mod) => mod.default) };
|
|
167
167
|
var src_default = variant;
|
|
168
168
|
|
|
169
169
|
// ../../node_modules/.bun/@jitl+quickjs-wasmfile-release-sync@0.32.0/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/index.mjs
|
|
170
|
-
var variant2 = { type: "sync", importFFI: () => import("./ffi-
|
|
170
|
+
var variant2 = { type: "sync", importFFI: () => import("./ffi-qnrt0y78.js").then((mod) => mod.QuickJSFFI), importModuleLoader: () => import("./emscripten-module-49k43zfy.js").then((mod) => mod.default) };
|
|
171
171
|
var src_default2 = variant2;
|
|
172
172
|
|
|
173
173
|
// ../../node_modules/.bun/@jitl+quickjs-wasmfile-debug-asyncify@0.32.0/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/index.mjs
|
|
174
|
-
var variant3 = { type: "async", importFFI: () => import("./ffi-
|
|
174
|
+
var variant3 = { type: "async", importFFI: () => import("./ffi-bbm9vkfa.js").then((mod) => mod.QuickJSAsyncFFI), importModuleLoader: () => import("./emscripten-module-jfs3d1dq.js").then((mod) => mod.default) };
|
|
175
175
|
var src_default3 = variant3;
|
|
176
176
|
|
|
177
177
|
// ../../node_modules/.bun/@jitl+quickjs-wasmfile-release-asyncify@0.32.0/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/index.mjs
|
|
178
|
-
var variant4 = { type: "async", importFFI: () => import("./ffi-
|
|
178
|
+
var variant4 = { type: "async", importFFI: () => import("./ffi-kb5r0x1j.js").then((mod) => mod.QuickJSAsyncFFI), importModuleLoader: () => import("./emscripten-module-ex4v0x4z.js").then((mod) => mod.default) };
|
|
179
179
|
var src_default4 = variant4;
|
|
180
180
|
|
|
181
181
|
// ../../node_modules/.bun/quickjs-emscripten@0.32.0/node_modules/quickjs-emscripten/dist/chunk-OHAYRCBA.mjs
|
|
@@ -204,48 +204,48 @@ async function newAsyncContext(options) {
|
|
|
204
204
|
return (await newQuickJSAsyncWASMModule()).newContext(options);
|
|
205
205
|
}
|
|
206
206
|
export {
|
|
207
|
-
|
|
208
|
-
setDebugMode,
|
|
209
|
-
newVariant,
|
|
210
|
-
newQuickJSWASMModuleFromVariant,
|
|
211
|
-
newQuickJSWASMModule,
|
|
212
|
-
newQuickJSAsyncWASMModuleFromVariant,
|
|
213
|
-
newQuickJSAsyncWASMModule,
|
|
214
|
-
newAsyncRuntime,
|
|
215
|
-
newAsyncContext,
|
|
216
|
-
memoizePromiseFactory,
|
|
217
|
-
isSuccess,
|
|
218
|
-
isFail,
|
|
219
|
-
getQuickJSSync,
|
|
220
|
-
getQuickJS,
|
|
221
|
-
errors_exports as errors,
|
|
222
|
-
debugLog,
|
|
223
|
-
createDisposableArray,
|
|
224
|
-
assertSync,
|
|
225
|
-
WeakLifetime,
|
|
226
|
-
UsingDisposable,
|
|
227
|
-
TestQuickJSWASMModule,
|
|
228
|
-
StaticLifetime,
|
|
229
|
-
Scope,
|
|
230
|
-
src_default2 as RELEASE_SYNC,
|
|
231
|
-
src_default4 as RELEASE_ASYNC,
|
|
232
|
-
QuickJSWASMModule,
|
|
233
|
-
QuickJSRuntime,
|
|
234
|
-
QuickJSDeferredPromise,
|
|
235
|
-
QuickJSContext,
|
|
236
|
-
QuickJSAsyncWASMModule,
|
|
237
|
-
QuickJSAsyncRuntime,
|
|
238
|
-
QuickJSAsyncContext,
|
|
239
|
-
Lifetime,
|
|
240
|
-
JSPromiseStateEnum,
|
|
241
|
-
IsEqualOp,
|
|
242
|
-
IntrinsicsFlags,
|
|
243
|
-
GetOwnPropertyNamesFlags,
|
|
244
|
-
EvalFlags,
|
|
245
|
-
DisposableSuccess,
|
|
246
|
-
DisposableResult,
|
|
247
|
-
DisposableFail,
|
|
248
|
-
DefaultIntrinsics,
|
|
207
|
+
src_default3 as DEBUG_ASYNC,
|
|
249
208
|
src_default as DEBUG_SYNC,
|
|
250
|
-
|
|
209
|
+
DefaultIntrinsics,
|
|
210
|
+
DisposableFail,
|
|
211
|
+
DisposableResult,
|
|
212
|
+
DisposableSuccess,
|
|
213
|
+
EvalFlags,
|
|
214
|
+
GetOwnPropertyNamesFlags,
|
|
215
|
+
IntrinsicsFlags,
|
|
216
|
+
IsEqualOp,
|
|
217
|
+
JSPromiseStateEnum,
|
|
218
|
+
Lifetime,
|
|
219
|
+
QuickJSAsyncContext,
|
|
220
|
+
QuickJSAsyncRuntime,
|
|
221
|
+
QuickJSAsyncWASMModule,
|
|
222
|
+
QuickJSContext,
|
|
223
|
+
QuickJSDeferredPromise,
|
|
224
|
+
QuickJSRuntime,
|
|
225
|
+
QuickJSWASMModule,
|
|
226
|
+
src_default4 as RELEASE_ASYNC,
|
|
227
|
+
src_default2 as RELEASE_SYNC,
|
|
228
|
+
Scope,
|
|
229
|
+
StaticLifetime,
|
|
230
|
+
TestQuickJSWASMModule,
|
|
231
|
+
UsingDisposable,
|
|
232
|
+
WeakLifetime,
|
|
233
|
+
assertSync,
|
|
234
|
+
createDisposableArray,
|
|
235
|
+
debugLog,
|
|
236
|
+
errors_exports as errors,
|
|
237
|
+
getQuickJS,
|
|
238
|
+
getQuickJSSync,
|
|
239
|
+
isFail,
|
|
240
|
+
isSuccess,
|
|
241
|
+
memoizePromiseFactory,
|
|
242
|
+
newAsyncContext,
|
|
243
|
+
newAsyncRuntime,
|
|
244
|
+
newQuickJSAsyncWASMModule,
|
|
245
|
+
newQuickJSAsyncWASMModuleFromVariant,
|
|
246
|
+
newQuickJSWASMModule,
|
|
247
|
+
newQuickJSWASMModuleFromVariant,
|
|
248
|
+
newVariant,
|
|
249
|
+
setDebugMode,
|
|
250
|
+
shouldInterruptAfterDeadline
|
|
251
251
|
};
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAk0BvE,QAAA,MAAM,MAAM,EAAE,YAGb,CAAC;AAEF,eAAe,MAAM,CAAC"}
|