@cortexkit/opencode-magic-context 0.41.2 → 0.41.3

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.
Files changed (138) hide show
  1. package/README.md +9 -3
  2. package/dist/announcement-3c1vertn.js +14 -0
  3. package/dist/config/project-security.d.ts.map +1 -1
  4. package/dist/config/schema/magic-context.d.ts +756 -4
  5. package/dist/config/schema/magic-context.d.ts.map +1 -1
  6. package/dist/conflict-warning-hook-z5sd697e.js +16 -0
  7. package/dist/derive-budgets-901a0pk0.js +11 -0
  8. package/dist/features/magic-context/compartment-lease.d.ts +6 -0
  9. package/dist/features/magic-context/compartment-lease.d.ts.map +1 -1
  10. package/dist/features/magic-context/migrations.d.ts.map +1 -1
  11. package/dist/features/magic-context/storage-db.d.ts +18 -1
  12. package/dist/features/magic-context/storage-db.d.ts.map +1 -1
  13. package/dist/features/magic-context/storage-meta-persisted.d.ts +11 -12
  14. package/dist/features/magic-context/storage-meta-persisted.d.ts.map +1 -1
  15. package/dist/features/magic-context/storage-meta.d.ts +1 -1
  16. package/dist/features/magic-context/storage-meta.d.ts.map +1 -1
  17. package/dist/features/magic-context/storage-subagent-invocations.d.ts +3 -2
  18. package/dist/features/magic-context/storage-subagent-invocations.d.ts.map +1 -1
  19. package/dist/features/magic-context/storage-tags.d.ts +6 -0
  20. package/dist/features/magic-context/storage-tags.d.ts.map +1 -1
  21. package/dist/features/magic-context/storage.d.ts +2 -2
  22. package/dist/features/magic-context/storage.d.ts.map +1 -1
  23. package/dist/features/magic-context/subagent-token-capture.d.ts +2 -1
  24. package/dist/features/magic-context/subagent-token-capture.d.ts.map +1 -1
  25. package/dist/hooks/magic-context/compaction-marker-manager.d.ts +6 -1
  26. package/dist/hooks/magic-context/compaction-marker-manager.d.ts.map +1 -1
  27. package/dist/hooks/magic-context/compartment-runner.d.ts +2 -1
  28. package/dist/hooks/magic-context/compartment-runner.d.ts.map +1 -1
  29. package/dist/hooks/magic-context/hook.d.ts +4 -3
  30. package/dist/hooks/magic-context/hook.d.ts.map +1 -1
  31. package/dist/hooks/magic-context/inject-compartments.d.ts +6 -0
  32. package/dist/hooks/magic-context/inject-compartments.d.ts.map +1 -1
  33. package/dist/hooks/magic-context/module-state-sync.d.ts +2 -1
  34. package/dist/hooks/magic-context/module-state-sync.d.ts.map +1 -1
  35. package/dist/hooks/magic-context/module-transport.d.ts +11 -4
  36. package/dist/hooks/magic-context/module-transport.d.ts.map +1 -1
  37. package/dist/hooks/magic-context/module-wire.d.ts +6 -1
  38. package/dist/hooks/magic-context/module-wire.d.ts.map +1 -1
  39. package/dist/hooks/magic-context/read-session-db.d.ts +15 -0
  40. package/dist/hooks/magic-context/read-session-db.d.ts.map +1 -1
  41. package/dist/hooks/magic-context/rust-mode-transform.d.ts +10 -0
  42. package/dist/hooks/magic-context/rust-mode-transform.d.ts.map +1 -1
  43. package/dist/hooks/magic-context/send-session-notification.d.ts +6 -0
  44. package/dist/hooks/magic-context/send-session-notification.d.ts.map +1 -1
  45. package/dist/hooks/magic-context/sentinel.d.ts +5 -16
  46. package/dist/hooks/magic-context/sentinel.d.ts.map +1 -1
  47. package/dist/hooks/magic-context/strip-content.d.ts.map +1 -1
  48. package/dist/hooks/magic-context/transform-postprocess-phase.d.ts +32 -0
  49. package/dist/hooks/magic-context/transform-postprocess-phase.d.ts.map +1 -1
  50. package/dist/hooks/magic-context/transform.d.ts.map +1 -1
  51. package/dist/{index-y1yr57fw.js → index-0bycg0np.js} +18 -18
  52. package/dist/{index-1yh8g550.js → index-22jkk6wg.js} +2 -15
  53. package/dist/{index-dmvy29z0.js → index-3wzdwt6p.js} +11 -15
  54. package/dist/{index-d1mxrd3p.js → index-7k55qm8a.js} +17 -12
  55. package/dist/{index-4x691bz5.js → index-dkv2dn46.js} +5 -2
  56. package/dist/{index-cvda5jb3.js → index-dn1rwpd8.js} +11 -11
  57. package/dist/{index-rgdqj8nj.js → index-e7vx3byk.js} +1 -1
  58. package/dist/{index-szf8w1p5.js → index-fmsr7v69.js} +2 -2
  59. package/dist/{index-d62ypazr.js → index-jdxxq8cz.js} +6 -11
  60. package/dist/{index-9j3tx8hy.js → index-may8skc8.js} +6 -25
  61. package/dist/{index-eq9wr75c.js → index-npx8vhmy.js} +57 -108
  62. package/dist/{index-zwjhba2r.js → index-q264erdp.js} +122 -41
  63. package/dist/{index-b9j85d29.js → index-raatkvw5.js} +49 -11
  64. package/dist/{index-9xexf8s7.js → index-rn7gafjr.js} +1 -9
  65. package/dist/index-v6t0tg85.js +13 -0
  66. package/dist/{index-j8r0ejb3.js → index-vmmjdpc0.js} +1694 -11167
  67. package/dist/index.d.ts.map +1 -1
  68. package/dist/index.js +2149 -1799
  69. package/dist/model-resolution-dxatzjde.js +12 -0
  70. package/dist/{index-dynqfgx1.js → module-asyncify-2EFITU5U-rkqjhjxd.js} +69 -8
  71. package/dist/plugin/boot-deadline.d.ts +47 -0
  72. package/dist/plugin/boot-deadline.d.ts.map +1 -0
  73. package/dist/plugin/conflict-warning-hook.d.ts +10 -0
  74. package/dist/plugin/conflict-warning-hook.d.ts.map +1 -1
  75. package/dist/plugin/hooks/create-session-hooks.d.ts +2 -0
  76. package/dist/plugin/hooks/create-session-hooks.d.ts.map +1 -1
  77. package/dist/plugin/messages-transform.d.ts.map +1 -1
  78. package/dist/prompt-context-5y5ms8f9.js +6 -0
  79. package/dist/recomp-orchestrator-f5m2wk74.js +19 -0
  80. package/dist/rpc-notifications-4amf6mf4.js +14 -0
  81. package/dist/{index-vnz6jvdc.js → safe-notification-target-q9z81zt3.js} +4 -3
  82. package/dist/send-session-notification-hdh02wy9.js +16 -0
  83. package/dist/shared/conflict-detector.d.ts +3 -1
  84. package/dist/shared/conflict-detector.d.ts.map +1 -1
  85. package/dist/shared/harness.d.ts +3 -3
  86. package/dist/shared/harness.d.ts.map +1 -1
  87. package/dist/shared/model-resolution.d.ts +3 -3
  88. package/dist/shared/model-resolution.d.ts.map +1 -1
  89. package/dist/shared/prompt-surface-runtime.d.ts +2 -2
  90. package/dist/shared/prompt-surface-runtime.d.ts.map +1 -1
  91. package/dist/shared/tag-transcript.d.ts.map +1 -1
  92. package/dist/shared/transcript.d.ts +2 -1
  93. package/dist/shared/transcript.d.ts.map +1 -1
  94. package/dist/storage-meta-session-3rxx9ekm.js +20 -0
  95. package/dist/task-config-hnv93r7p.js +9 -0
  96. package/dist/transformers-node-wasm.js +328 -328
  97. package/dist/transformers-web.js +72 -72
  98. package/dist/{transformers.node-b1wa0hgx.js → transformers.node-dpmf3wpx.js} +74 -74
  99. package/package.json +1 -1
  100. package/src/config/index.test.ts +28 -0
  101. package/src/config/project-security.hostile-matrix.test.ts +78 -9
  102. package/src/config/project-security.ts +4 -3
  103. package/src/config/schema/magic-context.test.ts +64 -0
  104. package/src/config/schema/magic-context.ts +100 -6
  105. package/src/shared/conflict-detector.test.ts +24 -0
  106. package/src/shared/conflict-detector.ts +25 -7
  107. package/src/shared/harness.ts +3 -3
  108. package/src/shared/model-resolution.test.ts +61 -0
  109. package/src/shared/model-resolution.ts +14 -5
  110. package/src/shared/prompt-surface-runtime.ts +3 -3
  111. package/src/shared/tag-transcript.ts +11 -0
  112. package/src/shared/transcript.ts +3 -1
  113. package/dist/announcement-3g9xg433.js +0 -18
  114. package/dist/conflict-warning-hook-rf17b6et.js +0 -17
  115. package/dist/derive-budgets-9q2d3r93.js +0 -14
  116. package/dist/emscripten-module-49k43zfy.js +0 -507
  117. package/dist/emscripten-module-ex4v0x4z.js +0 -606
  118. package/dist/emscripten-module-jfs3d1dq.js +0 -1536
  119. package/dist/emscripten-module-ss4g4spn.js +0 -4563
  120. package/dist/ffi-bbm9vkfa.js +0 -92
  121. package/dist/ffi-kb5r0x1j.js +0 -92
  122. package/dist/ffi-qnrt0y78.js +0 -80
  123. package/dist/ffi-yx2hpf4p.js +0 -80
  124. package/dist/index-8sseka65.js +0 -251
  125. package/dist/index-ss632za9.js +0 -77
  126. package/dist/model-resolution-6w6wzw18.js +0 -17
  127. package/dist/module-ES6BEMUI-1yjdz59c.js +0 -14
  128. package/dist/module-asyncify-2EFITU5U-fdkx4fhy.js +0 -9
  129. package/dist/prompt-context-29qkb28f.js +0 -7
  130. package/dist/recomp-orchestrator-m37p3fq6.js +0 -34
  131. package/dist/rpc-notifications-1ffm755w.js +0 -17
  132. package/dist/safe-notification-target-2a8py95v.js +0 -11
  133. package/dist/send-session-notification-bw7eex6w.js +0 -20
  134. package/dist/storage-meta-session-dse3qv6s.js +0 -23
  135. package/dist/task-config-gv6s04fp.js +0 -18
  136. /package/dist/{index-37yzyeca.js → index-3fe78beq.js} +0 -0
  137. /package/dist/{index-8mtsfhyg.js → index-jfpk81yt.js} +0 -0
  138. /package/dist/{index-2wchnyk6.js → index-kby1sng5.js} +0 -0
@@ -1,77 +0,0 @@
1
- import {
2
- Lifetime,
3
- QuickJSContext,
4
- QuickJSNotImplemented,
5
- QuickJSRuntime,
6
- QuickJSWASMModule,
7
- Scope,
8
- applyBaseRuntimeOptions,
9
- applyModuleEvalRuntimeOptions,
10
- evalOptionsToFlags,
11
- intrinsicsToFlags
12
- } from "./index-dynqfgx1.js";
13
-
14
- // ../../node_modules/.bun/quickjs-emscripten-core@0.32.0/node_modules/quickjs-emscripten-core/dist/chunk-TAV5CUKK.mjs
15
- var QuickJSAsyncContext = class extends QuickJSContext {
16
- async evalCodeAsync(code, filename = "eval.js", options) {
17
- let detectModule = options === undefined ? 1 : 0, flags = evalOptionsToFlags(options), resultPtr = 0;
18
- try {
19
- resultPtr = await this.memory.newHeapCharPointer(code).consume((charHandle) => this.ffi.QTS_Eval_MaybeAsync(this.ctx.value, charHandle.value.ptr, charHandle.value.strlen, filename, detectModule, flags));
20
- } catch (error) {
21
- throw this.runtime.debugLog("QTS_Eval_MaybeAsync threw", error), error;
22
- }
23
- let errorPtr = this.ffi.QTS_ResolveException(this.ctx.value, resultPtr);
24
- return errorPtr ? (this.ffi.QTS_FreeValuePointer(this.ctx.value, resultPtr), this.fail(this.memory.heapValueHandle(errorPtr))) : this.success(this.memory.heapValueHandle(resultPtr));
25
- }
26
- newAsyncifiedFunction(name, fn) {
27
- return this.newFunction(name, fn);
28
- }
29
- };
30
- var QuickJSAsyncRuntime = class extends QuickJSRuntime {
31
- constructor(args) {
32
- super(args);
33
- }
34
- newContext(options = {}) {
35
- let intrinsics = intrinsicsToFlags(options.intrinsics), ctx = new Lifetime(this.ffi.QTS_NewContext(this.rt.value, intrinsics), undefined, (ctx_ptr) => {
36
- this.contextMap.delete(ctx_ptr), this.callbacks.deleteContext(ctx_ptr), this.ffi.QTS_FreeContext(ctx_ptr);
37
- }), context = new QuickJSAsyncContext({ module: this.module, ctx, ffi: this.ffi, rt: this.rt, ownedLifetimes: [], runtime: this, callbacks: this.callbacks });
38
- return this.contextMap.set(ctx.value, context), context;
39
- }
40
- setModuleLoader(moduleLoader, moduleNormalizer) {
41
- super.setModuleLoader(moduleLoader, moduleNormalizer);
42
- }
43
- setMaxStackSize(stackSize) {
44
- return super.setMaxStackSize(stackSize);
45
- }
46
- };
47
- var QuickJSAsyncWASMModule = class extends QuickJSWASMModule {
48
- constructor(module, ffi) {
49
- super(module, ffi);
50
- this.ffi = ffi, this.module = module;
51
- }
52
- newRuntime(options = {}) {
53
- let rt = new Lifetime(this.ffi.QTS_NewRuntime(), undefined, (rt_ptr) => {
54
- this.callbacks.deleteRuntime(rt_ptr), this.ffi.QTS_FreeRuntime(rt_ptr);
55
- }), runtime = new QuickJSAsyncRuntime({ module: this.module, ffi: this.ffi, rt, callbacks: this.callbacks });
56
- return applyBaseRuntimeOptions(runtime, options), options.moduleLoader && runtime.setModuleLoader(options.moduleLoader), runtime;
57
- }
58
- newContext(options = {}) {
59
- let runtime = this.newRuntime(), lifetimes = options.ownedLifetimes ? options.ownedLifetimes.concat([runtime]) : [runtime], context = runtime.newContext({ ...options, ownedLifetimes: lifetimes });
60
- return runtime.context = context, context;
61
- }
62
- evalCode() {
63
- throw new QuickJSNotImplemented("QuickJSWASMModuleAsyncify.evalCode: use evalCodeAsync instead");
64
- }
65
- evalCodeAsync(code, options) {
66
- return Scope.withScopeAsync(async (scope) => {
67
- let vm = scope.manage(this.newContext());
68
- applyModuleEvalRuntimeOptions(vm.runtime, options);
69
- let result = await vm.evalCodeAsync(code, "eval.js");
70
- if (options.memoryLimitBytes !== undefined && vm.runtime.setMemoryLimit(-1), result.error)
71
- throw vm.dump(scope.manage(result.error));
72
- return vm.dump(scope.manage(result.value));
73
- });
74
- }
75
- };
76
-
77
- export { QuickJSAsyncContext, QuickJSAsyncRuntime, QuickJSAsyncWASMModule };
@@ -1,17 +0,0 @@
1
- import {
2
- normalizeModelEntry,
3
- resolveDreamerTaskModel,
4
- resolveFallbackEntries,
5
- resolveHistorianAgentOverrides,
6
- resolveHistorianModel,
7
- resolveOpenCodeAgentOverrides
8
- } from "./index-d1mxrd3p.js";
9
- import"./index-1yh8g550.js";
10
- export {
11
- normalizeModelEntry,
12
- resolveDreamerTaskModel,
13
- resolveFallbackEntries,
14
- resolveHistorianAgentOverrides,
15
- resolveHistorianModel,
16
- resolveOpenCodeAgentOverrides
17
- };
@@ -1,14 +0,0 @@
1
- import {
2
- QuickJSModuleCallbacks,
3
- QuickJSWASMModule,
4
- applyBaseRuntimeOptions,
5
- applyModuleEvalRuntimeOptions
6
- } from "./index-dynqfgx1.js";
7
- import"./index-9xexf8s7.js";
8
- import"./index-1yh8g550.js";
9
- export {
10
- QuickJSModuleCallbacks,
11
- QuickJSWASMModule,
12
- applyBaseRuntimeOptions,
13
- applyModuleEvalRuntimeOptions
14
- };
@@ -1,9 +0,0 @@
1
- import {
2
- QuickJSAsyncWASMModule
3
- } from "./index-ss632za9.js";
4
- import"./index-dynqfgx1.js";
5
- import"./index-9xexf8s7.js";
6
- import"./index-1yh8g550.js";
7
- export {
8
- QuickJSAsyncWASMModule
9
- };
@@ -1,7 +0,0 @@
1
- import {
2
- resolvePromptContext
3
- } from "./index-szf8w1p5.js";
4
- import"./index-1yh8g550.js";
5
- export {
6
- resolvePromptContext
7
- };
@@ -1,34 +0,0 @@
1
- import {
2
- contextualizeUpgradeReason,
3
- extractRecompReason,
4
- isRecompComplete,
5
- isRecompFailure,
6
- isRecompSkip,
7
- runManagedRecomp,
8
- runManagedUpgrade,
9
- setRecompNote,
10
- setRecompStarting,
11
- setRecompTerminal
12
- } from "./index-j8r0ejb3.js";
13
- import"./index-cvda5jb3.js";
14
- import"./index-zwjhba2r.js";
15
- import"./index-y1yr57fw.js";
16
- import"./index-2wchnyk6.js";
17
- import"./index-b9j85d29.js";
18
- import"./index-8mtsfhyg.js";
19
- import"./index-d62ypazr.js";
20
- import"./index-4x691bz5.js";
21
- import"./index-37yzyeca.js";
22
- import"./index-1yh8g550.js";
23
- export {
24
- contextualizeUpgradeReason,
25
- extractRecompReason,
26
- isRecompComplete,
27
- isRecompFailure,
28
- isRecompSkip,
29
- runManagedRecomp,
30
- runManagedUpgrade,
31
- setRecompNote,
32
- setRecompStarting,
33
- setRecompTerminal
34
- };
@@ -1,17 +0,0 @@
1
- import {
2
- __resetNotificationStateForTests,
3
- acknowledgeNotifications,
4
- drainNotifications,
5
- isTuiConnected,
6
- pushNotification,
7
- registerNotificationSink
8
- } from "./index-d62ypazr.js";
9
- import"./index-1yh8g550.js";
10
- export {
11
- __resetNotificationStateForTests,
12
- acknowledgeNotifications,
13
- drainNotifications,
14
- isTuiConnected,
15
- pushNotification,
16
- registerNotificationSink
17
- };
@@ -1,11 +0,0 @@
1
- import {
2
- isDefaultSessionTitle,
3
- waitForSafeNotificationTarget
4
- } from "./index-vnz6jvdc.js";
5
- import"./index-4x691bz5.js";
6
- import"./index-37yzyeca.js";
7
- import"./index-1yh8g550.js";
8
- export {
9
- isDefaultSessionTitle,
10
- waitForSafeNotificationTarget
11
- };
@@ -1,20 +0,0 @@
1
- import {
2
- MAX_QUEUED_IGNORED_NOTIFICATIONS,
3
- __ignoredNotificationTest,
4
- clearIgnoredMessages,
5
- flushIgnoredMessages,
6
- sendIgnoredMessage,
7
- sendUserPrompt
8
- } from "./index-zwjhba2r.js";
9
- import"./index-b9j85d29.js";
10
- import"./index-4x691bz5.js";
11
- import"./index-37yzyeca.js";
12
- import"./index-1yh8g550.js";
13
- export {
14
- MAX_QUEUED_IGNORED_NOTIFICATIONS,
15
- __ignoredNotificationTest,
16
- clearIgnoredMessages,
17
- flushIgnoredMessages,
18
- sendIgnoredMessage,
19
- sendUserPrompt
20
- };
@@ -1,23 +0,0 @@
1
- import {
2
- advanceToolReclaimWatermark,
3
- clearSession,
4
- getOrCreateSessionMeta,
5
- markSessionCleanupPending,
6
- retryPendingRustSessionCleanupsForProject,
7
- retryPendingSessionCleanups,
8
- updateSessionMeta
9
- } from "./index-y1yr57fw.js";
10
- import"./index-2wchnyk6.js";
11
- import"./index-b9j85d29.js";
12
- import"./index-4x691bz5.js";
13
- import"./index-37yzyeca.js";
14
- import"./index-1yh8g550.js";
15
- export {
16
- advanceToolReclaimWatermark,
17
- clearSession,
18
- getOrCreateSessionMeta,
19
- markSessionCleanupPending,
20
- retryPendingRustSessionCleanupsForProject,
21
- retryPendingSessionCleanups,
22
- updateSessionMeta
23
- };
@@ -1,18 +0,0 @@
1
- import {
2
- buildDreamTaskRuntimeConfigs,
3
- dreamTaskScheduled,
4
- enabledDreamTasks,
5
- summarizeDreamSchedule,
6
- userMemoryCollectionEnabled,
7
- userMemoryPromotionThreshold
8
- } from "./index-9j3tx8hy.js";
9
- import"./index-d1mxrd3p.js";
10
- import"./index-1yh8g550.js";
11
- export {
12
- buildDreamTaskRuntimeConfigs,
13
- dreamTaskScheduled,
14
- enabledDreamTasks,
15
- summarizeDreamSchedule,
16
- userMemoryCollectionEnabled,
17
- userMemoryPromotionThreshold
18
- };
File without changes
File without changes
File without changes