@logixjs/core-ng 0.0.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/CoreNgLayer.cjs +199 -0
- package/dist/CoreNgLayer.cjs.map +1 -0
- package/dist/CoreNgLayer.d.cts +24 -0
- package/dist/CoreNgLayer.d.ts +24 -0
- package/dist/CoreNgLayer.js +11 -0
- package/dist/CoreNgLayer.js.map +1 -0
- package/dist/ExecVmEvidence.cjs +70 -0
- package/dist/ExecVmEvidence.cjs.map +1 -0
- package/dist/ExecVmEvidence.d.cts +33 -0
- package/dist/ExecVmEvidence.d.ts +33 -0
- package/dist/ExecVmEvidence.js +13 -0
- package/dist/ExecVmEvidence.js.map +1 -0
- package/dist/RuntimeServices.impls.cjs +158 -0
- package/dist/RuntimeServices.impls.cjs.map +1 -0
- package/dist/RuntimeServices.impls.d.cts +11 -0
- package/dist/RuntimeServices.impls.d.ts +11 -0
- package/dist/RuntimeServices.impls.js +10 -0
- package/dist/RuntimeServices.impls.js.map +1 -0
- package/dist/chunk-AGDYNZ3J.js +33 -0
- package/dist/chunk-AGDYNZ3J.js.map +1 -0
- package/dist/chunk-EVS6KWPU.js +99 -0
- package/dist/chunk-EVS6KWPU.js.map +1 -0
- package/dist/chunk-HIDG4C7J.js +48 -0
- package/dist/chunk-HIDG4C7J.js.map +1 -0
- package/dist/index.cjs +205 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -0
- package/package.json +53 -0
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// src/CoreNgLayer.ts
|
|
31
|
+
var CoreNgLayer_exports = {};
|
|
32
|
+
__export(CoreNgLayer_exports, {
|
|
33
|
+
coreNgFullCutoverLayer: () => coreNgFullCutoverLayer,
|
|
34
|
+
coreNgKernelLayer: () => coreNgKernelLayer
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(CoreNgLayer_exports);
|
|
37
|
+
var import_effect3 = require("effect");
|
|
38
|
+
var Logix3 = __toESM(require("@logixjs/core"), 1);
|
|
39
|
+
|
|
40
|
+
// src/RuntimeServices.impls.ts
|
|
41
|
+
var import_effect2 = require("effect");
|
|
42
|
+
var Logix2 = __toESM(require("@logixjs/core"), 1);
|
|
43
|
+
|
|
44
|
+
// src/ExecVmEvidence.ts
|
|
45
|
+
var import_effect = require("effect");
|
|
46
|
+
var Logix = __toESM(require("@logixjs/core"), 1);
|
|
47
|
+
var EXEC_VM_EVIDENCE_TRACE_TYPE = "trace:exec-vm";
|
|
48
|
+
var EXEC_VM_EVIDENCE_MODULE_ID = "@logixjs/core-ng";
|
|
49
|
+
var EXEC_VM_EVIDENCE_INSTANCE_ID = "kernel:core-ng";
|
|
50
|
+
var recordExecVmEvidence = (evidence) => import_effect.Effect.gen(function* () {
|
|
51
|
+
const level = yield* import_effect.FiberRef.get(Logix.Debug.internal.currentDiagnosticsLevel);
|
|
52
|
+
if (level === "off") {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
const data = (() => {
|
|
56
|
+
if (level === "full") return evidence;
|
|
57
|
+
return {
|
|
58
|
+
...evidence,
|
|
59
|
+
reasonDetail: void 0
|
|
60
|
+
};
|
|
61
|
+
})();
|
|
62
|
+
yield* Logix.Debug.record({
|
|
63
|
+
type: EXEC_VM_EVIDENCE_TRACE_TYPE,
|
|
64
|
+
moduleId: EXEC_VM_EVIDENCE_MODULE_ID,
|
|
65
|
+
instanceId: EXEC_VM_EVIDENCE_INSTANCE_ID,
|
|
66
|
+
data
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
// src/RuntimeServices.impls.ts
|
|
71
|
+
var CORE_NG_IMPL_ID = "core-ng";
|
|
72
|
+
var makeBuiltinAlias = (serviceId, options) => ({
|
|
73
|
+
implId: CORE_NG_IMPL_ID,
|
|
74
|
+
implVersion: "v0",
|
|
75
|
+
make: import_effect2.Effect.gen(function* () {
|
|
76
|
+
const builtins = yield* Logix2.Kernel.RuntimeServiceBuiltinsTag;
|
|
77
|
+
const builtinMake = builtins.getBuiltinMake(serviceId);
|
|
78
|
+
const impl = yield* builtinMake;
|
|
79
|
+
if (serviceId === "transaction") {
|
|
80
|
+
const execVmMode = yield* import_effect2.Config.string("LOGIX_CORE_NG_EXEC_VM_MODE").pipe(import_effect2.Config.withDefault("on"));
|
|
81
|
+
const normalizedExecVmMode = execVmMode.trim().toLowerCase();
|
|
82
|
+
const isExecVmEnabled = normalizedExecVmMode !== "off" && normalizedExecVmMode !== "0" && normalizedExecVmMode !== "false" && normalizedExecVmMode !== "disabled";
|
|
83
|
+
const assemblyEvidence = typeof impl?.__logixGetExecVmAssemblyEvidence === "function" ? impl.__logixGetExecVmAssemblyEvidence() : void 0;
|
|
84
|
+
const convergeStaticIrDigest = typeof assemblyEvidence?.convergeStaticIrDigest === "string" ? assemblyEvidence.convergeStaticIrDigest : void 0;
|
|
85
|
+
let didRecordExecIrHash = typeof convergeStaticIrDigest === "string" && convergeStaticIrDigest.length > 0;
|
|
86
|
+
const tryReadConvergeStaticIrDigest = () => {
|
|
87
|
+
const evidence = typeof impl?.__logixGetExecVmAssemblyEvidence === "function" ? impl.__logixGetExecVmAssemblyEvidence() : void 0;
|
|
88
|
+
const digest = typeof evidence?.convergeStaticIrDigest === "string" ? evidence.convergeStaticIrDigest : void 0;
|
|
89
|
+
return typeof digest === "string" && digest.length > 0 ? digest : void 0;
|
|
90
|
+
};
|
|
91
|
+
yield* recordExecVmEvidence({
|
|
92
|
+
version: "v1",
|
|
93
|
+
stage: "assembly",
|
|
94
|
+
hit: isExecVmEnabled,
|
|
95
|
+
...!isExecVmEnabled ? {
|
|
96
|
+
reasonCode: "disabled",
|
|
97
|
+
reasonDetail: `LOGIX_CORE_NG_EXEC_VM_MODE=${execVmMode}`
|
|
98
|
+
} : null,
|
|
99
|
+
execIrVersion: convergeStaticIrDigest ? convergeStaticIrDigest.split(":")[0] : void 0,
|
|
100
|
+
execIrHash: convergeStaticIrDigest,
|
|
101
|
+
serviceId,
|
|
102
|
+
implId: CORE_NG_IMPL_ID
|
|
103
|
+
});
|
|
104
|
+
if (!isExecVmEnabled || didRecordExecIrHash) {
|
|
105
|
+
return impl;
|
|
106
|
+
}
|
|
107
|
+
const baseRunWithStateTransaction = typeof impl.runWithStateTransaction === "function" ? impl.runWithStateTransaction : void 0;
|
|
108
|
+
if (!baseRunWithStateTransaction) {
|
|
109
|
+
return impl;
|
|
110
|
+
}
|
|
111
|
+
let retryBudget = 3;
|
|
112
|
+
const runFast = (origin, body) => baseRunWithStateTransaction(origin, body);
|
|
113
|
+
let runWithStateTransaction = (origin, body) => baseRunWithStateTransaction(origin, body).pipe(
|
|
114
|
+
import_effect2.Effect.tap(() => {
|
|
115
|
+
if (didRecordExecIrHash || retryBudget <= 0) {
|
|
116
|
+
runWithStateTransaction = runFast;
|
|
117
|
+
return import_effect2.Effect.void;
|
|
118
|
+
}
|
|
119
|
+
retryBudget -= 1;
|
|
120
|
+
const digest = tryReadConvergeStaticIrDigest();
|
|
121
|
+
if (!digest) {
|
|
122
|
+
if (retryBudget <= 0) {
|
|
123
|
+
runWithStateTransaction = runFast;
|
|
124
|
+
}
|
|
125
|
+
return import_effect2.Effect.void;
|
|
126
|
+
}
|
|
127
|
+
didRecordExecIrHash = true;
|
|
128
|
+
runWithStateTransaction = runFast;
|
|
129
|
+
return recordExecVmEvidence({
|
|
130
|
+
version: "v1",
|
|
131
|
+
stage: "assembly",
|
|
132
|
+
hit: true,
|
|
133
|
+
execIrVersion: digest.split(":")[0],
|
|
134
|
+
execIrHash: digest,
|
|
135
|
+
serviceId,
|
|
136
|
+
implId: CORE_NG_IMPL_ID
|
|
137
|
+
});
|
|
138
|
+
})
|
|
139
|
+
);
|
|
140
|
+
return {
|
|
141
|
+
...impl,
|
|
142
|
+
runWithStateTransaction: (origin, body) => runWithStateTransaction(origin, body)
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
return impl;
|
|
146
|
+
}),
|
|
147
|
+
...options?.notes ? { notes: options.notes } : {}
|
|
148
|
+
});
|
|
149
|
+
var coreNgRuntimeServicesRegistry = {
|
|
150
|
+
implsByServiceId: {
|
|
151
|
+
txnQueue: [makeBuiltinAlias("txnQueue", { notes: "full-cutover: alias builtin txnQueue" })],
|
|
152
|
+
operationRunner: [makeBuiltinAlias("operationRunner", { notes: "full-cutover: alias builtin operationRunner" })],
|
|
153
|
+
transaction: [makeBuiltinAlias("transaction", { notes: "full-cutover: alias builtin transaction ops" })],
|
|
154
|
+
dispatch: [makeBuiltinAlias("dispatch", { notes: "full-cutover: alias builtin dispatch ops" })]
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
// src/CoreNgLayer.ts
|
|
159
|
+
var parseExecVmModeEnabled = (raw) => {
|
|
160
|
+
const normalized = raw.trim().toLowerCase();
|
|
161
|
+
return normalized !== "off" && normalized !== "0" && normalized !== "false" && normalized !== "disabled";
|
|
162
|
+
};
|
|
163
|
+
var coreNgExecVmModeLayer = import_effect3.Layer.unwrapEffect(
|
|
164
|
+
import_effect3.Effect.gen(function* () {
|
|
165
|
+
const execVmMode = yield* import_effect3.Config.string("LOGIX_CORE_NG_EXEC_VM_MODE").pipe(import_effect3.Config.withDefault("on"));
|
|
166
|
+
const enabled = parseExecVmModeEnabled(execVmMode);
|
|
167
|
+
return Logix3.InternalContracts.execVmModeLayer(enabled);
|
|
168
|
+
})
|
|
169
|
+
);
|
|
170
|
+
var coreNgKernelLayer = (options = {}) => import_effect3.Layer.mergeAll(
|
|
171
|
+
coreNgExecVmModeLayer,
|
|
172
|
+
Logix3.Kernel.kernelLayer({
|
|
173
|
+
kernelId: "core-ng",
|
|
174
|
+
packageName: "@logixjs/core-ng",
|
|
175
|
+
...options.packageVersion ? { packageVersion: options.packageVersion } : {},
|
|
176
|
+
...options.buildId ? { buildId: options.buildId } : {},
|
|
177
|
+
...options.capabilities ? { capabilities: options.capabilities } : {}
|
|
178
|
+
}),
|
|
179
|
+
Logix3.Kernel.runtimeServicesRegistryLayer(coreNgRuntimeServicesRegistry)
|
|
180
|
+
);
|
|
181
|
+
var coreNgFullCutoverLayer = (options = {}) => {
|
|
182
|
+
const services = Object.fromEntries(
|
|
183
|
+
Logix3.Kernel.CutoverCoverageMatrix.requiredServiceIds.map((serviceId) => [
|
|
184
|
+
serviceId,
|
|
185
|
+
{ implId: "core-ng", notes: "full-cutover: runtime_default override (SSoT=Kernel.CutoverCoverageMatrix)" }
|
|
186
|
+
])
|
|
187
|
+
);
|
|
188
|
+
return import_effect3.Layer.mergeAll(
|
|
189
|
+
coreNgKernelLayer(options),
|
|
190
|
+
Logix3.Kernel.fullCutoverGateModeLayer("fullCutover"),
|
|
191
|
+
Logix3.Kernel.runtimeDefaultServicesOverridesLayer(services)
|
|
192
|
+
);
|
|
193
|
+
};
|
|
194
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
195
|
+
0 && (module.exports = {
|
|
196
|
+
coreNgFullCutoverLayer,
|
|
197
|
+
coreNgKernelLayer
|
|
198
|
+
});
|
|
199
|
+
//# sourceMappingURL=CoreNgLayer.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/CoreNgLayer.ts","../src/RuntimeServices.impls.ts","../src/ExecVmEvidence.ts"],"sourcesContent":["import { Config, Effect, Layer } from 'effect'\nimport * as Logix from '@logixjs/core'\nimport { coreNgRuntimeServicesRegistry } from './RuntimeServices.impls.js'\n\nexport interface CoreNgKernelLayerOptions {\n readonly packageVersion?: string\n readonly buildId?: string\n readonly capabilities?: ReadonlyArray<string>\n}\n\nconst parseExecVmModeEnabled = (raw: string): boolean => {\n const normalized = raw.trim().toLowerCase()\n return normalized !== 'off' && normalized !== '0' && normalized !== 'false' && normalized !== 'disabled'\n}\n\nconst coreNgExecVmModeLayer = Layer.unwrapEffect(\n Effect.gen(function* () {\n const execVmMode = yield* Config.string('LOGIX_CORE_NG_EXEC_VM_MODE').pipe(Config.withDefault('on'))\n const enabled = parseExecVmModeEnabled(execVmMode)\n return Logix.InternalContracts.execVmModeLayer(enabled)\n }),\n) as Layer.Layer<any, never, never>\n\n/**\n * coreNgKernelLayer:\n * - Declares the requested kernel family for this runtime tree as core-ng.\n * - Provides the injectable runtime services registry for core-ng (no overrides enabled by default).\n */\nexport const coreNgKernelLayer = (options: CoreNgKernelLayerOptions = {}): Layer.Layer<any, never, never> =>\n Layer.mergeAll(\n coreNgExecVmModeLayer,\n Logix.Kernel.kernelLayer({\n kernelId: 'core-ng',\n packageName: '@logixjs/core-ng',\n ...(options.packageVersion ? { packageVersion: options.packageVersion } : {}),\n ...(options.buildId ? { buildId: options.buildId } : {}),\n ...(options.capabilities ? { capabilities: options.capabilities } : {}),\n }),\n Logix.Kernel.runtimeServicesRegistryLayer(coreNgRuntimeServicesRegistry),\n ) as Layer.Layer<any, never, never>\n\n/**\n * coreNgFullCutoverLayer:\n * - Explicitly enables the full cutover assembly (no fallback).\n * - Writes runtime_default overrides for all required serviceIds in the coverage matrix (implId=core-ng).\n *\n * Note: This layer is the entry point for \"claiming we can switch the default / enforcing perf evidence gates\".\n * For trial-only runs, keep using coreNgKernelLayer + choose overrides yourself.\n */\nexport const coreNgFullCutoverLayer = (options: CoreNgKernelLayerOptions = {}): Layer.Layer<any, never, never> => {\n const services: Logix.Kernel.RuntimeServicesOverrides = Object.fromEntries(\n Logix.Kernel.CutoverCoverageMatrix.requiredServiceIds.map((serviceId) => [\n serviceId,\n { implId: 'core-ng', notes: 'full-cutover: runtime_default override (SSoT=Kernel.CutoverCoverageMatrix)' },\n ]),\n )\n\n return Layer.mergeAll(\n coreNgKernelLayer(options),\n Logix.Kernel.fullCutoverGateModeLayer('fullCutover'),\n Logix.Kernel.runtimeDefaultServicesOverridesLayer(services),\n ) as Layer.Layer<any, never, never>\n}\n","import { Config, Effect } from 'effect'\nimport * as Logix from '@logixjs/core'\nimport { recordExecVmEvidence } from './ExecVmEvidence.js'\n\nexport const CORE_NG_IMPL_ID = 'core-ng' as const\n\nconst makeBuiltinAlias = (\n serviceId: string,\n options?: { readonly notes?: string },\n): Logix.Kernel.RuntimeServiceImpl<any> => ({\n implId: CORE_NG_IMPL_ID,\n implVersion: 'v0',\n make: Effect.gen(function* () {\n const builtins = yield* Logix.Kernel.RuntimeServiceBuiltinsTag\n const builtinMake = builtins.getBuiltinMake(serviceId)\n const impl = (yield* builtinMake) as any\n\n if (serviceId === 'transaction') {\n const execVmMode = yield* Config.string('LOGIX_CORE_NG_EXEC_VM_MODE').pipe(Config.withDefault('on'))\n const normalizedExecVmMode = execVmMode.trim().toLowerCase()\n const isExecVmEnabled =\n normalizedExecVmMode !== 'off' &&\n normalizedExecVmMode !== '0' &&\n normalizedExecVmMode !== 'false' &&\n normalizedExecVmMode !== 'disabled'\n\n const assemblyEvidence =\n typeof (impl as any)?.__logixGetExecVmAssemblyEvidence === 'function'\n ? (impl as any).__logixGetExecVmAssemblyEvidence()\n : undefined\n\n const convergeStaticIrDigest =\n typeof (assemblyEvidence as any)?.convergeStaticIrDigest === 'string'\n ? ((assemblyEvidence as any).convergeStaticIrDigest as string)\n : undefined\n let didRecordExecIrHash = typeof convergeStaticIrDigest === 'string' && convergeStaticIrDigest.length > 0\n\n const tryReadConvergeStaticIrDigest = (): string | undefined => {\n const evidence =\n typeof (impl as any)?.__logixGetExecVmAssemblyEvidence === 'function'\n ? (impl as any).__logixGetExecVmAssemblyEvidence()\n : undefined\n\n const digest =\n typeof (evidence as any)?.convergeStaticIrDigest === 'string'\n ? ((evidence as any).convergeStaticIrDigest as string)\n : undefined\n\n return typeof digest === 'string' && digest.length > 0 ? digest : undefined\n }\n\n yield* recordExecVmEvidence({\n version: 'v1',\n stage: 'assembly',\n hit: isExecVmEnabled,\n ...(!isExecVmEnabled\n ? {\n reasonCode: 'disabled',\n reasonDetail: `LOGIX_CORE_NG_EXEC_VM_MODE=${execVmMode}`,\n }\n : null),\n execIrVersion: convergeStaticIrDigest ? convergeStaticIrDigest.split(':')[0] : undefined,\n execIrHash: convergeStaticIrDigest,\n serviceId,\n implId: CORE_NG_IMPL_ID,\n })\n\n if (!isExecVmEnabled || didRecordExecIrHash) {\n return impl\n }\n\n const baseRunWithStateTransaction =\n typeof (impl as any).runWithStateTransaction === 'function' ? (impl as any).runWithStateTransaction : undefined\n\n if (!baseRunWithStateTransaction) {\n return impl\n }\n\n let retryBudget = 3\n\n const runFast = (origin: any, body: any) => baseRunWithStateTransaction(origin, body)\n\n let runWithStateTransaction: (origin: any, body: any) => any = (origin: any, body: any) =>\n baseRunWithStateTransaction(origin, body).pipe(\n Effect.tap(() => {\n if (didRecordExecIrHash || retryBudget <= 0) {\n runWithStateTransaction = runFast\n return Effect.void\n }\n\n retryBudget -= 1\n const digest = tryReadConvergeStaticIrDigest()\n if (!digest) {\n if (retryBudget <= 0) {\n runWithStateTransaction = runFast\n }\n return Effect.void\n }\n\n didRecordExecIrHash = true\n runWithStateTransaction = runFast\n return recordExecVmEvidence({\n version: 'v1',\n stage: 'assembly',\n hit: true,\n execIrVersion: digest.split(':')[0],\n execIrHash: digest,\n serviceId,\n implId: CORE_NG_IMPL_ID,\n })\n }),\n )\n\n return {\n ...impl,\n runWithStateTransaction: (origin: any, body: any) => runWithStateTransaction(origin, body),\n }\n }\n\n return impl\n }) as any,\n ...(options?.notes ? { notes: options.notes } : {}),\n})\n\n/**\n * coreNgRuntimeServicesRegistry:\n * - Registers only optional implementations on the core-ng side (no serialized override; only used at assembly time).\n * - Selection evidence is still produced and exported by @logixjs/core's RuntimeServicesEvidence.\n */\nexport const coreNgRuntimeServicesRegistry: Logix.Kernel.RuntimeServicesRegistry = {\n implsByServiceId: {\n txnQueue: [makeBuiltinAlias('txnQueue', { notes: 'full-cutover: alias builtin txnQueue' })],\n operationRunner: [makeBuiltinAlias('operationRunner', { notes: 'full-cutover: alias builtin operationRunner' })],\n transaction: [makeBuiltinAlias('transaction', { notes: 'full-cutover: alias builtin transaction ops' })],\n dispatch: [makeBuiltinAlias('dispatch', { notes: 'full-cutover: alias builtin dispatch ops' })],\n },\n}\n","import { Effect, FiberRef } from 'effect'\nimport * as Logix from '@logixjs/core'\n\nexport const EXEC_VM_EVIDENCE_TRACE_TYPE = 'trace:exec-vm' as const\nexport const EXEC_VM_EVIDENCE_MODULE_ID = '@logixjs/core-ng' as const\nexport const EXEC_VM_EVIDENCE_INSTANCE_ID = 'kernel:core-ng' as const\n\nexport type ExecVmMissReasonCode = 'not_implemented' | 'missing_capability' | 'disabled'\n\nexport interface ExecVmEvidence {\n readonly version: 'v1'\n readonly stage: 'assembly'\n /**\n * hit=true: the Exec VM mode actually took effect in this run (instead of implicitly falling back\n * to the conservative path).\n *\n * Note: for now this only wires the evidence fields and trace plumbing; the Exec VM implementation\n * will be completed in follow-up task 049.\n */\n readonly hit: boolean\n /** Miss reason code (stable enum; no free-form text). */\n readonly reasonCode?: ExecVmMissReasonCode\n /** Optional details; only emitted in light/full (not in off). */\n readonly reasonDetail?: string\n /** Exec IR version (AOT-ready; emitted in light/full, not in off). */\n readonly execIrVersion?: string\n /** Exec IR stable hash (AOT-ready; emitted in light/full, not in off). */\n readonly execIrHash?: string\n /** Evidence recording point (currently fixed to the transaction assembly phase). */\n readonly serviceId?: string\n /** The implId used by the current implementation (for diffing/debugging). */\n readonly implId?: string\n}\n\nexport const recordExecVmEvidence = (evidence: ExecVmEvidence): Effect.Effect<void, never, any> =>\n Effect.gen(function* () {\n const level = yield* FiberRef.get(Logix.Debug.internal.currentDiagnosticsLevel)\n if (level === 'off') {\n return\n }\n\n const data: ExecVmEvidence = (() => {\n if (level === 'full') return evidence\n return {\n ...evidence,\n reasonDetail: undefined,\n }\n })()\n\n yield* Logix.Debug.record({\n type: EXEC_VM_EVIDENCE_TRACE_TYPE,\n moduleId: EXEC_VM_EVIDENCE_MODULE_ID,\n instanceId: EXEC_VM_EVIDENCE_INSTANCE_ID,\n data: data as any,\n })\n })\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAA,iBAAsC;AACtC,IAAAC,SAAuB;;;ACDvB,IAAAC,iBAA+B;AAC/B,IAAAC,SAAuB;;;ACDvB,oBAAiC;AACjC,YAAuB;AAEhB,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,aAAa,IAAI,CAAC;AAAA,EACvE,CAAC;AAAA,EACK,cAAO,6BAA6B,6BAA6B;AACzE;AAUK,IAAM,yBAAyB,CAAC,UAAoC,CAAC,MAAsC;AAChH,QAAM,WAAkD,OAAO;AAAA,IACvD,cAAO,sBAAsB,mBAAmB,IAAI,CAAC,cAAc;AAAA,MACvE;AAAA,MACA,EAAE,QAAQ,WAAW,OAAO,6EAA6E;AAAA,IAC3G,CAAC;AAAA,EACH;AAEA,SAAO,qBAAM;AAAA,IACX,kBAAkB,OAAO;AAAA,IACnB,cAAO,yBAAyB,aAAa;AAAA,IAC7C,cAAO,qCAAqC,QAAQ;AAAA,EAC5D;AACF;","names":["import_effect","Logix","import_effect","Logix"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Layer } from 'effect';
|
|
2
|
+
|
|
3
|
+
interface CoreNgKernelLayerOptions {
|
|
4
|
+
readonly packageVersion?: string;
|
|
5
|
+
readonly buildId?: string;
|
|
6
|
+
readonly capabilities?: ReadonlyArray<string>;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* coreNgKernelLayer:
|
|
10
|
+
* - Declares the requested kernel family for this runtime tree as core-ng.
|
|
11
|
+
* - Provides the injectable runtime services registry for core-ng (no overrides enabled by default).
|
|
12
|
+
*/
|
|
13
|
+
declare const coreNgKernelLayer: (options?: CoreNgKernelLayerOptions) => Layer.Layer<any, never, never>;
|
|
14
|
+
/**
|
|
15
|
+
* coreNgFullCutoverLayer:
|
|
16
|
+
* - Explicitly enables the full cutover assembly (no fallback).
|
|
17
|
+
* - Writes runtime_default overrides for all required serviceIds in the coverage matrix (implId=core-ng).
|
|
18
|
+
*
|
|
19
|
+
* Note: This layer is the entry point for "claiming we can switch the default / enforcing perf evidence gates".
|
|
20
|
+
* For trial-only runs, keep using coreNgKernelLayer + choose overrides yourself.
|
|
21
|
+
*/
|
|
22
|
+
declare const coreNgFullCutoverLayer: (options?: CoreNgKernelLayerOptions) => Layer.Layer<any, never, never>;
|
|
23
|
+
|
|
24
|
+
export { type CoreNgKernelLayerOptions, coreNgFullCutoverLayer, coreNgKernelLayer };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Layer } from 'effect';
|
|
2
|
+
|
|
3
|
+
interface CoreNgKernelLayerOptions {
|
|
4
|
+
readonly packageVersion?: string;
|
|
5
|
+
readonly buildId?: string;
|
|
6
|
+
readonly capabilities?: ReadonlyArray<string>;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* coreNgKernelLayer:
|
|
10
|
+
* - Declares the requested kernel family for this runtime tree as core-ng.
|
|
11
|
+
* - Provides the injectable runtime services registry for core-ng (no overrides enabled by default).
|
|
12
|
+
*/
|
|
13
|
+
declare const coreNgKernelLayer: (options?: CoreNgKernelLayerOptions) => Layer.Layer<any, never, never>;
|
|
14
|
+
/**
|
|
15
|
+
* coreNgFullCutoverLayer:
|
|
16
|
+
* - Explicitly enables the full cutover assembly (no fallback).
|
|
17
|
+
* - Writes runtime_default overrides for all required serviceIds in the coverage matrix (implId=core-ng).
|
|
18
|
+
*
|
|
19
|
+
* Note: This layer is the entry point for "claiming we can switch the default / enforcing perf evidence gates".
|
|
20
|
+
* For trial-only runs, keep using coreNgKernelLayer + choose overrides yourself.
|
|
21
|
+
*/
|
|
22
|
+
declare const coreNgFullCutoverLayer: (options?: CoreNgKernelLayerOptions) => Layer.Layer<any, never, never>;
|
|
23
|
+
|
|
24
|
+
export { type CoreNgKernelLayerOptions, coreNgFullCutoverLayer, coreNgKernelLayer };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// src/ExecVmEvidence.ts
|
|
31
|
+
var ExecVmEvidence_exports = {};
|
|
32
|
+
__export(ExecVmEvidence_exports, {
|
|
33
|
+
EXEC_VM_EVIDENCE_INSTANCE_ID: () => EXEC_VM_EVIDENCE_INSTANCE_ID,
|
|
34
|
+
EXEC_VM_EVIDENCE_MODULE_ID: () => EXEC_VM_EVIDENCE_MODULE_ID,
|
|
35
|
+
EXEC_VM_EVIDENCE_TRACE_TYPE: () => EXEC_VM_EVIDENCE_TRACE_TYPE,
|
|
36
|
+
recordExecVmEvidence: () => recordExecVmEvidence
|
|
37
|
+
});
|
|
38
|
+
module.exports = __toCommonJS(ExecVmEvidence_exports);
|
|
39
|
+
var import_effect = require("effect");
|
|
40
|
+
var Logix = __toESM(require("@logixjs/core"), 1);
|
|
41
|
+
var EXEC_VM_EVIDENCE_TRACE_TYPE = "trace:exec-vm";
|
|
42
|
+
var EXEC_VM_EVIDENCE_MODULE_ID = "@logixjs/core-ng";
|
|
43
|
+
var EXEC_VM_EVIDENCE_INSTANCE_ID = "kernel:core-ng";
|
|
44
|
+
var recordExecVmEvidence = (evidence) => import_effect.Effect.gen(function* () {
|
|
45
|
+
const level = yield* import_effect.FiberRef.get(Logix.Debug.internal.currentDiagnosticsLevel);
|
|
46
|
+
if (level === "off") {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
const data = (() => {
|
|
50
|
+
if (level === "full") return evidence;
|
|
51
|
+
return {
|
|
52
|
+
...evidence,
|
|
53
|
+
reasonDetail: void 0
|
|
54
|
+
};
|
|
55
|
+
})();
|
|
56
|
+
yield* Logix.Debug.record({
|
|
57
|
+
type: EXEC_VM_EVIDENCE_TRACE_TYPE,
|
|
58
|
+
moduleId: EXEC_VM_EVIDENCE_MODULE_ID,
|
|
59
|
+
instanceId: EXEC_VM_EVIDENCE_INSTANCE_ID,
|
|
60
|
+
data
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
64
|
+
0 && (module.exports = {
|
|
65
|
+
EXEC_VM_EVIDENCE_INSTANCE_ID,
|
|
66
|
+
EXEC_VM_EVIDENCE_MODULE_ID,
|
|
67
|
+
EXEC_VM_EVIDENCE_TRACE_TYPE,
|
|
68
|
+
recordExecVmEvidence
|
|
69
|
+
});
|
|
70
|
+
//# sourceMappingURL=ExecVmEvidence.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/ExecVmEvidence.ts"],"sourcesContent":["import { Effect, FiberRef } from 'effect'\nimport * as Logix from '@logixjs/core'\n\nexport const EXEC_VM_EVIDENCE_TRACE_TYPE = 'trace:exec-vm' as const\nexport const EXEC_VM_EVIDENCE_MODULE_ID = '@logixjs/core-ng' as const\nexport const EXEC_VM_EVIDENCE_INSTANCE_ID = 'kernel:core-ng' as const\n\nexport type ExecVmMissReasonCode = 'not_implemented' | 'missing_capability' | 'disabled'\n\nexport interface ExecVmEvidence {\n readonly version: 'v1'\n readonly stage: 'assembly'\n /**\n * hit=true: the Exec VM mode actually took effect in this run (instead of implicitly falling back\n * to the conservative path).\n *\n * Note: for now this only wires the evidence fields and trace plumbing; the Exec VM implementation\n * will be completed in follow-up task 049.\n */\n readonly hit: boolean\n /** Miss reason code (stable enum; no free-form text). */\n readonly reasonCode?: ExecVmMissReasonCode\n /** Optional details; only emitted in light/full (not in off). */\n readonly reasonDetail?: string\n /** Exec IR version (AOT-ready; emitted in light/full, not in off). */\n readonly execIrVersion?: string\n /** Exec IR stable hash (AOT-ready; emitted in light/full, not in off). */\n readonly execIrHash?: string\n /** Evidence recording point (currently fixed to the transaction assembly phase). */\n readonly serviceId?: string\n /** The implId used by the current implementation (for diffing/debugging). */\n readonly implId?: string\n}\n\nexport const recordExecVmEvidence = (evidence: ExecVmEvidence): Effect.Effect<void, never, any> =>\n Effect.gen(function* () {\n const level = yield* FiberRef.get(Logix.Debug.internal.currentDiagnosticsLevel)\n if (level === 'off') {\n return\n }\n\n const data: ExecVmEvidence = (() => {\n if (level === 'full') return evidence\n return {\n ...evidence,\n reasonDetail: undefined,\n }\n })()\n\n yield* Logix.Debug.record({\n type: EXEC_VM_EVIDENCE_TRACE_TYPE,\n moduleId: EXEC_VM_EVIDENCE_MODULE_ID,\n instanceId: EXEC_VM_EVIDENCE_INSTANCE_ID,\n data: data as any,\n })\n })\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAiC;AACjC,YAAuB;AAEhB,IAAM,8BAA8B;AACpC,IAAM,6BAA6B;AACnC,IAAM,+BAA+B;AA6BrC,IAAM,uBAAuB,CAAC,aACnC,qBAAO,IAAI,aAAa;AACtB,QAAM,QAAQ,OAAO,uBAAS,IAAU,YAAM,SAAS,uBAAuB;AAC9E,MAAI,UAAU,OAAO;AACnB;AAAA,EACF;AAEA,QAAM,QAAwB,MAAM;AAClC,QAAI,UAAU,OAAQ,QAAO;AAC7B,WAAO;AAAA,MACL,GAAG;AAAA,MACH,cAAc;AAAA,IAChB;AAAA,EACF,GAAG;AAEH,SAAa,YAAM,OAAO;AAAA,IACxB,MAAM;AAAA,IACN,UAAU;AAAA,IACV,YAAY;AAAA,IACZ;AAAA,EACF,CAAC;AACH,CAAC;","names":[]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Effect } from 'effect';
|
|
2
|
+
|
|
3
|
+
declare const EXEC_VM_EVIDENCE_TRACE_TYPE: "trace:exec-vm";
|
|
4
|
+
declare const EXEC_VM_EVIDENCE_MODULE_ID: "@logixjs/core-ng";
|
|
5
|
+
declare const EXEC_VM_EVIDENCE_INSTANCE_ID: "kernel:core-ng";
|
|
6
|
+
type ExecVmMissReasonCode = 'not_implemented' | 'missing_capability' | 'disabled';
|
|
7
|
+
interface ExecVmEvidence {
|
|
8
|
+
readonly version: 'v1';
|
|
9
|
+
readonly stage: 'assembly';
|
|
10
|
+
/**
|
|
11
|
+
* hit=true: the Exec VM mode actually took effect in this run (instead of implicitly falling back
|
|
12
|
+
* to the conservative path).
|
|
13
|
+
*
|
|
14
|
+
* Note: for now this only wires the evidence fields and trace plumbing; the Exec VM implementation
|
|
15
|
+
* will be completed in follow-up task 049.
|
|
16
|
+
*/
|
|
17
|
+
readonly hit: boolean;
|
|
18
|
+
/** Miss reason code (stable enum; no free-form text). */
|
|
19
|
+
readonly reasonCode?: ExecVmMissReasonCode;
|
|
20
|
+
/** Optional details; only emitted in light/full (not in off). */
|
|
21
|
+
readonly reasonDetail?: string;
|
|
22
|
+
/** Exec IR version (AOT-ready; emitted in light/full, not in off). */
|
|
23
|
+
readonly execIrVersion?: string;
|
|
24
|
+
/** Exec IR stable hash (AOT-ready; emitted in light/full, not in off). */
|
|
25
|
+
readonly execIrHash?: string;
|
|
26
|
+
/** Evidence recording point (currently fixed to the transaction assembly phase). */
|
|
27
|
+
readonly serviceId?: string;
|
|
28
|
+
/** The implId used by the current implementation (for diffing/debugging). */
|
|
29
|
+
readonly implId?: string;
|
|
30
|
+
}
|
|
31
|
+
declare const recordExecVmEvidence: (evidence: ExecVmEvidence) => Effect.Effect<void, never, any>;
|
|
32
|
+
|
|
33
|
+
export { EXEC_VM_EVIDENCE_INSTANCE_ID, EXEC_VM_EVIDENCE_MODULE_ID, EXEC_VM_EVIDENCE_TRACE_TYPE, type ExecVmEvidence, type ExecVmMissReasonCode, recordExecVmEvidence };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Effect } from 'effect';
|
|
2
|
+
|
|
3
|
+
declare const EXEC_VM_EVIDENCE_TRACE_TYPE: "trace:exec-vm";
|
|
4
|
+
declare const EXEC_VM_EVIDENCE_MODULE_ID: "@logixjs/core-ng";
|
|
5
|
+
declare const EXEC_VM_EVIDENCE_INSTANCE_ID: "kernel:core-ng";
|
|
6
|
+
type ExecVmMissReasonCode = 'not_implemented' | 'missing_capability' | 'disabled';
|
|
7
|
+
interface ExecVmEvidence {
|
|
8
|
+
readonly version: 'v1';
|
|
9
|
+
readonly stage: 'assembly';
|
|
10
|
+
/**
|
|
11
|
+
* hit=true: the Exec VM mode actually took effect in this run (instead of implicitly falling back
|
|
12
|
+
* to the conservative path).
|
|
13
|
+
*
|
|
14
|
+
* Note: for now this only wires the evidence fields and trace plumbing; the Exec VM implementation
|
|
15
|
+
* will be completed in follow-up task 049.
|
|
16
|
+
*/
|
|
17
|
+
readonly hit: boolean;
|
|
18
|
+
/** Miss reason code (stable enum; no free-form text). */
|
|
19
|
+
readonly reasonCode?: ExecVmMissReasonCode;
|
|
20
|
+
/** Optional details; only emitted in light/full (not in off). */
|
|
21
|
+
readonly reasonDetail?: string;
|
|
22
|
+
/** Exec IR version (AOT-ready; emitted in light/full, not in off). */
|
|
23
|
+
readonly execIrVersion?: string;
|
|
24
|
+
/** Exec IR stable hash (AOT-ready; emitted in light/full, not in off). */
|
|
25
|
+
readonly execIrHash?: string;
|
|
26
|
+
/** Evidence recording point (currently fixed to the transaction assembly phase). */
|
|
27
|
+
readonly serviceId?: string;
|
|
28
|
+
/** The implId used by the current implementation (for diffing/debugging). */
|
|
29
|
+
readonly implId?: string;
|
|
30
|
+
}
|
|
31
|
+
declare const recordExecVmEvidence: (evidence: ExecVmEvidence) => Effect.Effect<void, never, any>;
|
|
32
|
+
|
|
33
|
+
export { EXEC_VM_EVIDENCE_INSTANCE_ID, EXEC_VM_EVIDENCE_MODULE_ID, EXEC_VM_EVIDENCE_TRACE_TYPE, type ExecVmEvidence, type ExecVmMissReasonCode, recordExecVmEvidence };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
EXEC_VM_EVIDENCE_INSTANCE_ID,
|
|
3
|
+
EXEC_VM_EVIDENCE_MODULE_ID,
|
|
4
|
+
EXEC_VM_EVIDENCE_TRACE_TYPE,
|
|
5
|
+
recordExecVmEvidence
|
|
6
|
+
} from "./chunk-AGDYNZ3J.js";
|
|
7
|
+
export {
|
|
8
|
+
EXEC_VM_EVIDENCE_INSTANCE_ID,
|
|
9
|
+
EXEC_VM_EVIDENCE_MODULE_ID,
|
|
10
|
+
EXEC_VM_EVIDENCE_TRACE_TYPE,
|
|
11
|
+
recordExecVmEvidence
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=ExecVmEvidence.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// src/RuntimeServices.impls.ts
|
|
31
|
+
var RuntimeServices_impls_exports = {};
|
|
32
|
+
__export(RuntimeServices_impls_exports, {
|
|
33
|
+
CORE_NG_IMPL_ID: () => CORE_NG_IMPL_ID,
|
|
34
|
+
coreNgRuntimeServicesRegistry: () => coreNgRuntimeServicesRegistry
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(RuntimeServices_impls_exports);
|
|
37
|
+
var import_effect2 = require("effect");
|
|
38
|
+
var Logix2 = __toESM(require("@logixjs/core"), 1);
|
|
39
|
+
|
|
40
|
+
// src/ExecVmEvidence.ts
|
|
41
|
+
var import_effect = require("effect");
|
|
42
|
+
var Logix = __toESM(require("@logixjs/core"), 1);
|
|
43
|
+
var EXEC_VM_EVIDENCE_TRACE_TYPE = "trace:exec-vm";
|
|
44
|
+
var EXEC_VM_EVIDENCE_MODULE_ID = "@logixjs/core-ng";
|
|
45
|
+
var EXEC_VM_EVIDENCE_INSTANCE_ID = "kernel:core-ng";
|
|
46
|
+
var recordExecVmEvidence = (evidence) => import_effect.Effect.gen(function* () {
|
|
47
|
+
const level = yield* import_effect.FiberRef.get(Logix.Debug.internal.currentDiagnosticsLevel);
|
|
48
|
+
if (level === "off") {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
const data = (() => {
|
|
52
|
+
if (level === "full") return evidence;
|
|
53
|
+
return {
|
|
54
|
+
...evidence,
|
|
55
|
+
reasonDetail: void 0
|
|
56
|
+
};
|
|
57
|
+
})();
|
|
58
|
+
yield* Logix.Debug.record({
|
|
59
|
+
type: EXEC_VM_EVIDENCE_TRACE_TYPE,
|
|
60
|
+
moduleId: EXEC_VM_EVIDENCE_MODULE_ID,
|
|
61
|
+
instanceId: EXEC_VM_EVIDENCE_INSTANCE_ID,
|
|
62
|
+
data
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
// src/RuntimeServices.impls.ts
|
|
67
|
+
var CORE_NG_IMPL_ID = "core-ng";
|
|
68
|
+
var makeBuiltinAlias = (serviceId, options) => ({
|
|
69
|
+
implId: CORE_NG_IMPL_ID,
|
|
70
|
+
implVersion: "v0",
|
|
71
|
+
make: import_effect2.Effect.gen(function* () {
|
|
72
|
+
const builtins = yield* Logix2.Kernel.RuntimeServiceBuiltinsTag;
|
|
73
|
+
const builtinMake = builtins.getBuiltinMake(serviceId);
|
|
74
|
+
const impl = yield* builtinMake;
|
|
75
|
+
if (serviceId === "transaction") {
|
|
76
|
+
const execVmMode = yield* import_effect2.Config.string("LOGIX_CORE_NG_EXEC_VM_MODE").pipe(import_effect2.Config.withDefault("on"));
|
|
77
|
+
const normalizedExecVmMode = execVmMode.trim().toLowerCase();
|
|
78
|
+
const isExecVmEnabled = normalizedExecVmMode !== "off" && normalizedExecVmMode !== "0" && normalizedExecVmMode !== "false" && normalizedExecVmMode !== "disabled";
|
|
79
|
+
const assemblyEvidence = typeof impl?.__logixGetExecVmAssemblyEvidence === "function" ? impl.__logixGetExecVmAssemblyEvidence() : void 0;
|
|
80
|
+
const convergeStaticIrDigest = typeof assemblyEvidence?.convergeStaticIrDigest === "string" ? assemblyEvidence.convergeStaticIrDigest : void 0;
|
|
81
|
+
let didRecordExecIrHash = typeof convergeStaticIrDigest === "string" && convergeStaticIrDigest.length > 0;
|
|
82
|
+
const tryReadConvergeStaticIrDigest = () => {
|
|
83
|
+
const evidence = typeof impl?.__logixGetExecVmAssemblyEvidence === "function" ? impl.__logixGetExecVmAssemblyEvidence() : void 0;
|
|
84
|
+
const digest = typeof evidence?.convergeStaticIrDigest === "string" ? evidence.convergeStaticIrDigest : void 0;
|
|
85
|
+
return typeof digest === "string" && digest.length > 0 ? digest : void 0;
|
|
86
|
+
};
|
|
87
|
+
yield* recordExecVmEvidence({
|
|
88
|
+
version: "v1",
|
|
89
|
+
stage: "assembly",
|
|
90
|
+
hit: isExecVmEnabled,
|
|
91
|
+
...!isExecVmEnabled ? {
|
|
92
|
+
reasonCode: "disabled",
|
|
93
|
+
reasonDetail: `LOGIX_CORE_NG_EXEC_VM_MODE=${execVmMode}`
|
|
94
|
+
} : null,
|
|
95
|
+
execIrVersion: convergeStaticIrDigest ? convergeStaticIrDigest.split(":")[0] : void 0,
|
|
96
|
+
execIrHash: convergeStaticIrDigest,
|
|
97
|
+
serviceId,
|
|
98
|
+
implId: CORE_NG_IMPL_ID
|
|
99
|
+
});
|
|
100
|
+
if (!isExecVmEnabled || didRecordExecIrHash) {
|
|
101
|
+
return impl;
|
|
102
|
+
}
|
|
103
|
+
const baseRunWithStateTransaction = typeof impl.runWithStateTransaction === "function" ? impl.runWithStateTransaction : void 0;
|
|
104
|
+
if (!baseRunWithStateTransaction) {
|
|
105
|
+
return impl;
|
|
106
|
+
}
|
|
107
|
+
let retryBudget = 3;
|
|
108
|
+
const runFast = (origin, body) => baseRunWithStateTransaction(origin, body);
|
|
109
|
+
let runWithStateTransaction = (origin, body) => baseRunWithStateTransaction(origin, body).pipe(
|
|
110
|
+
import_effect2.Effect.tap(() => {
|
|
111
|
+
if (didRecordExecIrHash || retryBudget <= 0) {
|
|
112
|
+
runWithStateTransaction = runFast;
|
|
113
|
+
return import_effect2.Effect.void;
|
|
114
|
+
}
|
|
115
|
+
retryBudget -= 1;
|
|
116
|
+
const digest = tryReadConvergeStaticIrDigest();
|
|
117
|
+
if (!digest) {
|
|
118
|
+
if (retryBudget <= 0) {
|
|
119
|
+
runWithStateTransaction = runFast;
|
|
120
|
+
}
|
|
121
|
+
return import_effect2.Effect.void;
|
|
122
|
+
}
|
|
123
|
+
didRecordExecIrHash = true;
|
|
124
|
+
runWithStateTransaction = runFast;
|
|
125
|
+
return recordExecVmEvidence({
|
|
126
|
+
version: "v1",
|
|
127
|
+
stage: "assembly",
|
|
128
|
+
hit: true,
|
|
129
|
+
execIrVersion: digest.split(":")[0],
|
|
130
|
+
execIrHash: digest,
|
|
131
|
+
serviceId,
|
|
132
|
+
implId: CORE_NG_IMPL_ID
|
|
133
|
+
});
|
|
134
|
+
})
|
|
135
|
+
);
|
|
136
|
+
return {
|
|
137
|
+
...impl,
|
|
138
|
+
runWithStateTransaction: (origin, body) => runWithStateTransaction(origin, body)
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
return impl;
|
|
142
|
+
}),
|
|
143
|
+
...options?.notes ? { notes: options.notes } : {}
|
|
144
|
+
});
|
|
145
|
+
var coreNgRuntimeServicesRegistry = {
|
|
146
|
+
implsByServiceId: {
|
|
147
|
+
txnQueue: [makeBuiltinAlias("txnQueue", { notes: "full-cutover: alias builtin txnQueue" })],
|
|
148
|
+
operationRunner: [makeBuiltinAlias("operationRunner", { notes: "full-cutover: alias builtin operationRunner" })],
|
|
149
|
+
transaction: [makeBuiltinAlias("transaction", { notes: "full-cutover: alias builtin transaction ops" })],
|
|
150
|
+
dispatch: [makeBuiltinAlias("dispatch", { notes: "full-cutover: alias builtin dispatch ops" })]
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
154
|
+
0 && (module.exports = {
|
|
155
|
+
CORE_NG_IMPL_ID,
|
|
156
|
+
coreNgRuntimeServicesRegistry
|
|
157
|
+
});
|
|
158
|
+
//# sourceMappingURL=RuntimeServices.impls.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/RuntimeServices.impls.ts","../src/ExecVmEvidence.ts"],"sourcesContent":["import { Config, Effect } from 'effect'\nimport * as Logix from '@logixjs/core'\nimport { recordExecVmEvidence } from './ExecVmEvidence.js'\n\nexport const CORE_NG_IMPL_ID = 'core-ng' as const\n\nconst makeBuiltinAlias = (\n serviceId: string,\n options?: { readonly notes?: string },\n): Logix.Kernel.RuntimeServiceImpl<any> => ({\n implId: CORE_NG_IMPL_ID,\n implVersion: 'v0',\n make: Effect.gen(function* () {\n const builtins = yield* Logix.Kernel.RuntimeServiceBuiltinsTag\n const builtinMake = builtins.getBuiltinMake(serviceId)\n const impl = (yield* builtinMake) as any\n\n if (serviceId === 'transaction') {\n const execVmMode = yield* Config.string('LOGIX_CORE_NG_EXEC_VM_MODE').pipe(Config.withDefault('on'))\n const normalizedExecVmMode = execVmMode.trim().toLowerCase()\n const isExecVmEnabled =\n normalizedExecVmMode !== 'off' &&\n normalizedExecVmMode !== '0' &&\n normalizedExecVmMode !== 'false' &&\n normalizedExecVmMode !== 'disabled'\n\n const assemblyEvidence =\n typeof (impl as any)?.__logixGetExecVmAssemblyEvidence === 'function'\n ? (impl as any).__logixGetExecVmAssemblyEvidence()\n : undefined\n\n const convergeStaticIrDigest =\n typeof (assemblyEvidence as any)?.convergeStaticIrDigest === 'string'\n ? ((assemblyEvidence as any).convergeStaticIrDigest as string)\n : undefined\n let didRecordExecIrHash = typeof convergeStaticIrDigest === 'string' && convergeStaticIrDigest.length > 0\n\n const tryReadConvergeStaticIrDigest = (): string | undefined => {\n const evidence =\n typeof (impl as any)?.__logixGetExecVmAssemblyEvidence === 'function'\n ? (impl as any).__logixGetExecVmAssemblyEvidence()\n : undefined\n\n const digest =\n typeof (evidence as any)?.convergeStaticIrDigest === 'string'\n ? ((evidence as any).convergeStaticIrDigest as string)\n : undefined\n\n return typeof digest === 'string' && digest.length > 0 ? digest : undefined\n }\n\n yield* recordExecVmEvidence({\n version: 'v1',\n stage: 'assembly',\n hit: isExecVmEnabled,\n ...(!isExecVmEnabled\n ? {\n reasonCode: 'disabled',\n reasonDetail: `LOGIX_CORE_NG_EXEC_VM_MODE=${execVmMode}`,\n }\n : null),\n execIrVersion: convergeStaticIrDigest ? convergeStaticIrDigest.split(':')[0] : undefined,\n execIrHash: convergeStaticIrDigest,\n serviceId,\n implId: CORE_NG_IMPL_ID,\n })\n\n if (!isExecVmEnabled || didRecordExecIrHash) {\n return impl\n }\n\n const baseRunWithStateTransaction =\n typeof (impl as any).runWithStateTransaction === 'function' ? (impl as any).runWithStateTransaction : undefined\n\n if (!baseRunWithStateTransaction) {\n return impl\n }\n\n let retryBudget = 3\n\n const runFast = (origin: any, body: any) => baseRunWithStateTransaction(origin, body)\n\n let runWithStateTransaction: (origin: any, body: any) => any = (origin: any, body: any) =>\n baseRunWithStateTransaction(origin, body).pipe(\n Effect.tap(() => {\n if (didRecordExecIrHash || retryBudget <= 0) {\n runWithStateTransaction = runFast\n return Effect.void\n }\n\n retryBudget -= 1\n const digest = tryReadConvergeStaticIrDigest()\n if (!digest) {\n if (retryBudget <= 0) {\n runWithStateTransaction = runFast\n }\n return Effect.void\n }\n\n didRecordExecIrHash = true\n runWithStateTransaction = runFast\n return recordExecVmEvidence({\n version: 'v1',\n stage: 'assembly',\n hit: true,\n execIrVersion: digest.split(':')[0],\n execIrHash: digest,\n serviceId,\n implId: CORE_NG_IMPL_ID,\n })\n }),\n )\n\n return {\n ...impl,\n runWithStateTransaction: (origin: any, body: any) => runWithStateTransaction(origin, body),\n }\n }\n\n return impl\n }) as any,\n ...(options?.notes ? { notes: options.notes } : {}),\n})\n\n/**\n * coreNgRuntimeServicesRegistry:\n * - Registers only optional implementations on the core-ng side (no serialized override; only used at assembly time).\n * - Selection evidence is still produced and exported by @logixjs/core's RuntimeServicesEvidence.\n */\nexport const coreNgRuntimeServicesRegistry: Logix.Kernel.RuntimeServicesRegistry = {\n implsByServiceId: {\n txnQueue: [makeBuiltinAlias('txnQueue', { notes: 'full-cutover: alias builtin txnQueue' })],\n operationRunner: [makeBuiltinAlias('operationRunner', { notes: 'full-cutover: alias builtin operationRunner' })],\n transaction: [makeBuiltinAlias('transaction', { notes: 'full-cutover: alias builtin transaction ops' })],\n dispatch: [makeBuiltinAlias('dispatch', { notes: 'full-cutover: alias builtin dispatch ops' })],\n },\n}\n","import { Effect, FiberRef } from 'effect'\nimport * as Logix from '@logixjs/core'\n\nexport const EXEC_VM_EVIDENCE_TRACE_TYPE = 'trace:exec-vm' as const\nexport const EXEC_VM_EVIDENCE_MODULE_ID = '@logixjs/core-ng' as const\nexport const EXEC_VM_EVIDENCE_INSTANCE_ID = 'kernel:core-ng' as const\n\nexport type ExecVmMissReasonCode = 'not_implemented' | 'missing_capability' | 'disabled'\n\nexport interface ExecVmEvidence {\n readonly version: 'v1'\n readonly stage: 'assembly'\n /**\n * hit=true: the Exec VM mode actually took effect in this run (instead of implicitly falling back\n * to the conservative path).\n *\n * Note: for now this only wires the evidence fields and trace plumbing; the Exec VM implementation\n * will be completed in follow-up task 049.\n */\n readonly hit: boolean\n /** Miss reason code (stable enum; no free-form text). */\n readonly reasonCode?: ExecVmMissReasonCode\n /** Optional details; only emitted in light/full (not in off). */\n readonly reasonDetail?: string\n /** Exec IR version (AOT-ready; emitted in light/full, not in off). */\n readonly execIrVersion?: string\n /** Exec IR stable hash (AOT-ready; emitted in light/full, not in off). */\n readonly execIrHash?: string\n /** Evidence recording point (currently fixed to the transaction assembly phase). */\n readonly serviceId?: string\n /** The implId used by the current implementation (for diffing/debugging). */\n readonly implId?: string\n}\n\nexport const recordExecVmEvidence = (evidence: ExecVmEvidence): Effect.Effect<void, never, any> =>\n Effect.gen(function* () {\n const level = yield* FiberRef.get(Logix.Debug.internal.currentDiagnosticsLevel)\n if (level === 'off') {\n return\n }\n\n const data: ExecVmEvidence = (() => {\n if (level === 'full') return evidence\n return {\n ...evidence,\n reasonDetail: undefined,\n }\n })()\n\n yield* Logix.Debug.record({\n type: EXEC_VM_EVIDENCE_TRACE_TYPE,\n moduleId: EXEC_VM_EVIDENCE_MODULE_ID,\n instanceId: EXEC_VM_EVIDENCE_INSTANCE_ID,\n data: data as any,\n })\n })\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAA,iBAA+B;AAC/B,IAAAC,SAAuB;;;ACDvB,oBAAiC;AACjC,YAAuB;AAEhB,IAAM,8BAA8B;AACpC,IAAM,6BAA6B;AACnC,IAAM,+BAA+B;AA6BrC,IAAM,uBAAuB,CAAC,aACnC,qBAAO,IAAI,aAAa;AACtB,QAAM,QAAQ,OAAO,uBAAS,IAAU,YAAM,SAAS,uBAAuB;AAC9E,MAAI,UAAU,OAAO;AACnB;AAAA,EACF;AAEA,QAAM,QAAwB,MAAM;AAClC,QAAI,UAAU,OAAQ,QAAO;AAC7B,WAAO;AAAA,MACL,GAAG;AAAA,MACH,cAAc;AAAA,IAChB;AAAA,EACF,GAAG;AAEH,SAAa,YAAM,OAAO;AAAA,IACxB,MAAM;AAAA,IACN,UAAU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Aa,CAAC,iBAAiB,eAAe,EAAE,OAAO,8CAA8C,CAAC,CAAC;AAAA,IACvG,UAAU,CAAC,iBAAiB,YAAY,EAAE,OAAO,2CAA2C,CAAC,CAAC;AAAA,EAChG;AACF;","names":["import_effect","Logix"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as Logix from '@logixjs/core';
|
|
2
|
+
|
|
3
|
+
declare const CORE_NG_IMPL_ID: "core-ng";
|
|
4
|
+
/**
|
|
5
|
+
* coreNgRuntimeServicesRegistry:
|
|
6
|
+
* - Registers only optional implementations on the core-ng side (no serialized override; only used at assembly time).
|
|
7
|
+
* - Selection evidence is still produced and exported by @logixjs/core's RuntimeServicesEvidence.
|
|
8
|
+
*/
|
|
9
|
+
declare const coreNgRuntimeServicesRegistry: Logix.Kernel.RuntimeServicesRegistry;
|
|
10
|
+
|
|
11
|
+
export { CORE_NG_IMPL_ID, coreNgRuntimeServicesRegistry };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as Logix from '@logixjs/core';
|
|
2
|
+
|
|
3
|
+
declare const CORE_NG_IMPL_ID: "core-ng";
|
|
4
|
+
/**
|
|
5
|
+
* coreNgRuntimeServicesRegistry:
|
|
6
|
+
* - Registers only optional implementations on the core-ng side (no serialized override; only used at assembly time).
|
|
7
|
+
* - Selection evidence is still produced and exported by @logixjs/core's RuntimeServicesEvidence.
|
|
8
|
+
*/
|
|
9
|
+
declare const coreNgRuntimeServicesRegistry: Logix.Kernel.RuntimeServicesRegistry;
|
|
10
|
+
|
|
11
|
+
export { CORE_NG_IMPL_ID, coreNgRuntimeServicesRegistry };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// src/ExecVmEvidence.ts
|
|
2
|
+
import { Effect, FiberRef } from "effect";
|
|
3
|
+
import * as Logix from "@logixjs/core";
|
|
4
|
+
var EXEC_VM_EVIDENCE_TRACE_TYPE = "trace:exec-vm";
|
|
5
|
+
var EXEC_VM_EVIDENCE_MODULE_ID = "@logixjs/core-ng";
|
|
6
|
+
var EXEC_VM_EVIDENCE_INSTANCE_ID = "kernel:core-ng";
|
|
7
|
+
var recordExecVmEvidence = (evidence) => Effect.gen(function* () {
|
|
8
|
+
const level = yield* FiberRef.get(Logix.Debug.internal.currentDiagnosticsLevel);
|
|
9
|
+
if (level === "off") {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
const data = (() => {
|
|
13
|
+
if (level === "full") return evidence;
|
|
14
|
+
return {
|
|
15
|
+
...evidence,
|
|
16
|
+
reasonDetail: void 0
|
|
17
|
+
};
|
|
18
|
+
})();
|
|
19
|
+
yield* Logix.Debug.record({
|
|
20
|
+
type: EXEC_VM_EVIDENCE_TRACE_TYPE,
|
|
21
|
+
moduleId: EXEC_VM_EVIDENCE_MODULE_ID,
|
|
22
|
+
instanceId: EXEC_VM_EVIDENCE_INSTANCE_ID,
|
|
23
|
+
data
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export {
|
|
28
|
+
EXEC_VM_EVIDENCE_TRACE_TYPE,
|
|
29
|
+
EXEC_VM_EVIDENCE_MODULE_ID,
|
|
30
|
+
EXEC_VM_EVIDENCE_INSTANCE_ID,
|
|
31
|
+
recordExecVmEvidence
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=chunk-AGDYNZ3J.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/ExecVmEvidence.ts"],"sourcesContent":["import { Effect, FiberRef } from 'effect'\nimport * as Logix from '@logixjs/core'\n\nexport const EXEC_VM_EVIDENCE_TRACE_TYPE = 'trace:exec-vm' as const\nexport const EXEC_VM_EVIDENCE_MODULE_ID = '@logixjs/core-ng' as const\nexport const EXEC_VM_EVIDENCE_INSTANCE_ID = 'kernel:core-ng' as const\n\nexport type ExecVmMissReasonCode = 'not_implemented' | 'missing_capability' | 'disabled'\n\nexport interface ExecVmEvidence {\n readonly version: 'v1'\n readonly stage: 'assembly'\n /**\n * hit=true: the Exec VM mode actually took effect in this run (instead of implicitly falling back\n * to the conservative path).\n *\n * Note: for now this only wires the evidence fields and trace plumbing; the Exec VM implementation\n * will be completed in follow-up task 049.\n */\n readonly hit: boolean\n /** Miss reason code (stable enum; no free-form text). */\n readonly reasonCode?: ExecVmMissReasonCode\n /** Optional details; only emitted in light/full (not in off). */\n readonly reasonDetail?: string\n /** Exec IR version (AOT-ready; emitted in light/full, not in off). */\n readonly execIrVersion?: string\n /** Exec IR stable hash (AOT-ready; emitted in light/full, not in off). */\n readonly execIrHash?: string\n /** Evidence recording point (currently fixed to the transaction assembly phase). */\n readonly serviceId?: string\n /** The implId used by the current implementation (for diffing/debugging). */\n readonly implId?: string\n}\n\nexport const recordExecVmEvidence = (evidence: ExecVmEvidence): Effect.Effect<void, never, any> =>\n Effect.gen(function* () {\n const level = yield* FiberRef.get(Logix.Debug.internal.currentDiagnosticsLevel)\n if (level === 'off') {\n return\n }\n\n const data: ExecVmEvidence = (() => {\n if (level === 'full') return evidence\n return {\n ...evidence,\n reasonDetail: undefined,\n }\n })()\n\n yield* Logix.Debug.record({\n type: EXEC_VM_EVIDENCE_TRACE_TYPE,\n moduleId: EXEC_VM_EVIDENCE_MODULE_ID,\n instanceId: EXEC_VM_EVIDENCE_INSTANCE_ID,\n data: data as any,\n })\n })\n"],"mappings":";AAAA,SAAS,QAAQ,gBAAgB;AACjC,YAAY,WAAW;AAEhB,IAAM,8BAA8B;AACpC,IAAM,6BAA6B;AACnC,IAAM,+BAA+B;AA6BrC,IAAM,uBAAuB,CAAC,aACnC,OAAO,IAAI,aAAa;AACtB,QAAM,QAAQ,OAAO,SAAS,IAAU,YAAM,SAAS,uBAAuB;AAC9E,MAAI,UAAU,OAAO;AACnB;AAAA,EACF;AAEA,QAAM,QAAwB,MAAM;AAClC,QAAI,UAAU,OAAQ,QAAO;AAC7B,WAAO;AAAA,MACL,GAAG;AAAA,MACH,cAAc;AAAA,IAChB;AAAA,EACF,GAAG;AAEH,SAAa,YAAM,OAAO;AAAA,IACxB,MAAM;AAAA,IACN,UAAU;AAAA,IACV,YAAY;AAAA,IACZ;AAAA,EACF,CAAC;AACH,CAAC;","names":[]}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import {
|
|
2
|
+
recordExecVmEvidence
|
|
3
|
+
} from "./chunk-AGDYNZ3J.js";
|
|
4
|
+
|
|
5
|
+
// src/RuntimeServices.impls.ts
|
|
6
|
+
import { Config, Effect } from "effect";
|
|
7
|
+
import * as Logix from "@logixjs/core";
|
|
8
|
+
var CORE_NG_IMPL_ID = "core-ng";
|
|
9
|
+
var makeBuiltinAlias = (serviceId, options) => ({
|
|
10
|
+
implId: CORE_NG_IMPL_ID,
|
|
11
|
+
implVersion: "v0",
|
|
12
|
+
make: Effect.gen(function* () {
|
|
13
|
+
const builtins = yield* Logix.Kernel.RuntimeServiceBuiltinsTag;
|
|
14
|
+
const builtinMake = builtins.getBuiltinMake(serviceId);
|
|
15
|
+
const impl = yield* builtinMake;
|
|
16
|
+
if (serviceId === "transaction") {
|
|
17
|
+
const execVmMode = yield* Config.string("LOGIX_CORE_NG_EXEC_VM_MODE").pipe(Config.withDefault("on"));
|
|
18
|
+
const normalizedExecVmMode = execVmMode.trim().toLowerCase();
|
|
19
|
+
const isExecVmEnabled = normalizedExecVmMode !== "off" && normalizedExecVmMode !== "0" && normalizedExecVmMode !== "false" && normalizedExecVmMode !== "disabled";
|
|
20
|
+
const assemblyEvidence = typeof impl?.__logixGetExecVmAssemblyEvidence === "function" ? impl.__logixGetExecVmAssemblyEvidence() : void 0;
|
|
21
|
+
const convergeStaticIrDigest = typeof assemblyEvidence?.convergeStaticIrDigest === "string" ? assemblyEvidence.convergeStaticIrDigest : void 0;
|
|
22
|
+
let didRecordExecIrHash = typeof convergeStaticIrDigest === "string" && convergeStaticIrDigest.length > 0;
|
|
23
|
+
const tryReadConvergeStaticIrDigest = () => {
|
|
24
|
+
const evidence = typeof impl?.__logixGetExecVmAssemblyEvidence === "function" ? impl.__logixGetExecVmAssemblyEvidence() : void 0;
|
|
25
|
+
const digest = typeof evidence?.convergeStaticIrDigest === "string" ? evidence.convergeStaticIrDigest : void 0;
|
|
26
|
+
return typeof digest === "string" && digest.length > 0 ? digest : void 0;
|
|
27
|
+
};
|
|
28
|
+
yield* recordExecVmEvidence({
|
|
29
|
+
version: "v1",
|
|
30
|
+
stage: "assembly",
|
|
31
|
+
hit: isExecVmEnabled,
|
|
32
|
+
...!isExecVmEnabled ? {
|
|
33
|
+
reasonCode: "disabled",
|
|
34
|
+
reasonDetail: `LOGIX_CORE_NG_EXEC_VM_MODE=${execVmMode}`
|
|
35
|
+
} : null,
|
|
36
|
+
execIrVersion: convergeStaticIrDigest ? convergeStaticIrDigest.split(":")[0] : void 0,
|
|
37
|
+
execIrHash: convergeStaticIrDigest,
|
|
38
|
+
serviceId,
|
|
39
|
+
implId: CORE_NG_IMPL_ID
|
|
40
|
+
});
|
|
41
|
+
if (!isExecVmEnabled || didRecordExecIrHash) {
|
|
42
|
+
return impl;
|
|
43
|
+
}
|
|
44
|
+
const baseRunWithStateTransaction = typeof impl.runWithStateTransaction === "function" ? impl.runWithStateTransaction : void 0;
|
|
45
|
+
if (!baseRunWithStateTransaction) {
|
|
46
|
+
return impl;
|
|
47
|
+
}
|
|
48
|
+
let retryBudget = 3;
|
|
49
|
+
const runFast = (origin, body) => baseRunWithStateTransaction(origin, body);
|
|
50
|
+
let runWithStateTransaction = (origin, body) => baseRunWithStateTransaction(origin, body).pipe(
|
|
51
|
+
Effect.tap(() => {
|
|
52
|
+
if (didRecordExecIrHash || retryBudget <= 0) {
|
|
53
|
+
runWithStateTransaction = runFast;
|
|
54
|
+
return Effect.void;
|
|
55
|
+
}
|
|
56
|
+
retryBudget -= 1;
|
|
57
|
+
const digest = tryReadConvergeStaticIrDigest();
|
|
58
|
+
if (!digest) {
|
|
59
|
+
if (retryBudget <= 0) {
|
|
60
|
+
runWithStateTransaction = runFast;
|
|
61
|
+
}
|
|
62
|
+
return Effect.void;
|
|
63
|
+
}
|
|
64
|
+
didRecordExecIrHash = true;
|
|
65
|
+
runWithStateTransaction = runFast;
|
|
66
|
+
return recordExecVmEvidence({
|
|
67
|
+
version: "v1",
|
|
68
|
+
stage: "assembly",
|
|
69
|
+
hit: true,
|
|
70
|
+
execIrVersion: digest.split(":")[0],
|
|
71
|
+
execIrHash: digest,
|
|
72
|
+
serviceId,
|
|
73
|
+
implId: CORE_NG_IMPL_ID
|
|
74
|
+
});
|
|
75
|
+
})
|
|
76
|
+
);
|
|
77
|
+
return {
|
|
78
|
+
...impl,
|
|
79
|
+
runWithStateTransaction: (origin, body) => runWithStateTransaction(origin, body)
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
return impl;
|
|
83
|
+
}),
|
|
84
|
+
...options?.notes ? { notes: options.notes } : {}
|
|
85
|
+
});
|
|
86
|
+
var coreNgRuntimeServicesRegistry = {
|
|
87
|
+
implsByServiceId: {
|
|
88
|
+
txnQueue: [makeBuiltinAlias("txnQueue", { notes: "full-cutover: alias builtin txnQueue" })],
|
|
89
|
+
operationRunner: [makeBuiltinAlias("operationRunner", { notes: "full-cutover: alias builtin operationRunner" })],
|
|
90
|
+
transaction: [makeBuiltinAlias("transaction", { notes: "full-cutover: alias builtin transaction ops" })],
|
|
91
|
+
dispatch: [makeBuiltinAlias("dispatch", { notes: "full-cutover: alias builtin dispatch ops" })]
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
export {
|
|
96
|
+
CORE_NG_IMPL_ID,
|
|
97
|
+
coreNgRuntimeServicesRegistry
|
|
98
|
+
};
|
|
99
|
+
//# sourceMappingURL=chunk-EVS6KWPU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/RuntimeServices.impls.ts"],"sourcesContent":["import { Config, Effect } from 'effect'\nimport * as Logix from '@logixjs/core'\nimport { recordExecVmEvidence } from './ExecVmEvidence.js'\n\nexport const CORE_NG_IMPL_ID = 'core-ng' as const\n\nconst makeBuiltinAlias = (\n serviceId: string,\n options?: { readonly notes?: string },\n): Logix.Kernel.RuntimeServiceImpl<any> => ({\n implId: CORE_NG_IMPL_ID,\n implVersion: 'v0',\n make: Effect.gen(function* () {\n const builtins = yield* Logix.Kernel.RuntimeServiceBuiltinsTag\n const builtinMake = builtins.getBuiltinMake(serviceId)\n const impl = (yield* builtinMake) as any\n\n if (serviceId === 'transaction') {\n const execVmMode = yield* Config.string('LOGIX_CORE_NG_EXEC_VM_MODE').pipe(Config.withDefault('on'))\n const normalizedExecVmMode = execVmMode.trim().toLowerCase()\n const isExecVmEnabled =\n normalizedExecVmMode !== 'off' &&\n normalizedExecVmMode !== '0' &&\n normalizedExecVmMode !== 'false' &&\n normalizedExecVmMode !== 'disabled'\n\n const assemblyEvidence =\n typeof (impl as any)?.__logixGetExecVmAssemblyEvidence === 'function'\n ? (impl as any).__logixGetExecVmAssemblyEvidence()\n : undefined\n\n const convergeStaticIrDigest =\n typeof (assemblyEvidence as any)?.convergeStaticIrDigest === 'string'\n ? ((assemblyEvidence as any).convergeStaticIrDigest as string)\n : undefined\n let didRecordExecIrHash = typeof convergeStaticIrDigest === 'string' && convergeStaticIrDigest.length > 0\n\n const tryReadConvergeStaticIrDigest = (): string | undefined => {\n const evidence =\n typeof (impl as any)?.__logixGetExecVmAssemblyEvidence === 'function'\n ? (impl as any).__logixGetExecVmAssemblyEvidence()\n : undefined\n\n const digest =\n typeof (evidence as any)?.convergeStaticIrDigest === 'string'\n ? ((evidence as any).convergeStaticIrDigest as string)\n : undefined\n\n return typeof digest === 'string' && digest.length > 0 ? digest : undefined\n }\n\n yield* recordExecVmEvidence({\n version: 'v1',\n stage: 'assembly',\n hit: isExecVmEnabled,\n ...(!isExecVmEnabled\n ? {\n reasonCode: 'disabled',\n reasonDetail: `LOGIX_CORE_NG_EXEC_VM_MODE=${execVmMode}`,\n }\n : null),\n execIrVersion: convergeStaticIrDigest ? convergeStaticIrDigest.split(':')[0] : undefined,\n execIrHash: convergeStaticIrDigest,\n serviceId,\n implId: CORE_NG_IMPL_ID,\n })\n\n if (!isExecVmEnabled || didRecordExecIrHash) {\n return impl\n }\n\n const baseRunWithStateTransaction =\n typeof (impl as any).runWithStateTransaction === 'function' ? (impl as any).runWithStateTransaction : undefined\n\n if (!baseRunWithStateTransaction) {\n return impl\n }\n\n let retryBudget = 3\n\n const runFast = (origin: any, body: any) => baseRunWithStateTransaction(origin, body)\n\n let runWithStateTransaction: (origin: any, body: any) => any = (origin: any, body: any) =>\n baseRunWithStateTransaction(origin, body).pipe(\n Effect.tap(() => {\n if (didRecordExecIrHash || retryBudget <= 0) {\n runWithStateTransaction = runFast\n return Effect.void\n }\n\n retryBudget -= 1\n const digest = tryReadConvergeStaticIrDigest()\n if (!digest) {\n if (retryBudget <= 0) {\n runWithStateTransaction = runFast\n }\n return Effect.void\n }\n\n didRecordExecIrHash = true\n runWithStateTransaction = runFast\n return recordExecVmEvidence({\n version: 'v1',\n stage: 'assembly',\n hit: true,\n execIrVersion: digest.split(':')[0],\n execIrHash: digest,\n serviceId,\n implId: CORE_NG_IMPL_ID,\n })\n }),\n )\n\n return {\n ...impl,\n runWithStateTransaction: (origin: any, body: any) => runWithStateTransaction(origin, body),\n }\n }\n\n return impl\n }) as any,\n ...(options?.notes ? { notes: options.notes } : {}),\n})\n\n/**\n * coreNgRuntimeServicesRegistry:\n * - Registers only optional implementations on the core-ng side (no serialized override; only used at assembly time).\n * - Selection evidence is still produced and exported by @logixjs/core's RuntimeServicesEvidence.\n */\nexport const coreNgRuntimeServicesRegistry: Logix.Kernel.RuntimeServicesRegistry = {\n implsByServiceId: {\n txnQueue: [makeBuiltinAlias('txnQueue', { notes: 'full-cutover: alias builtin txnQueue' })],\n operationRunner: [makeBuiltinAlias('operationRunner', { notes: 'full-cutover: alias builtin operationRunner' })],\n transaction: [makeBuiltinAlias('transaction', { notes: 'full-cutover: alias builtin transaction ops' })],\n dispatch: [makeBuiltinAlias('dispatch', { notes: 'full-cutover: alias builtin dispatch ops' })],\n },\n}\n"],"mappings":";;;;;AAAA,SAAS,QAAQ,cAAc;AAC/B,YAAY,WAAW;AAGhB,IAAM,kBAAkB;AAE/B,IAAM,mBAAmB,CACvB,WACA,aAC0C;AAAA,EAC1C,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,MAAM,OAAO,IAAI,aAAa;AAC5B,UAAM,WAAW,OAAa,aAAO;AACrC,UAAM,cAAc,SAAS,eAAe,SAAS;AACrD,UAAM,OAAQ,OAAO;AAErB,QAAI,cAAc,eAAe;AAC/B,YAAM,aAAa,OAAO,OAAO,OAAO,4BAA4B,EAAE,KAAK,OAAO,YAAY,IAAI,CAAC;AACnG,YAAM,uBAAuB,WAAW,KAAK,EAAE,YAAY;AAC3D,YAAM,kBACJ,yBAAyB,SACzB,yBAAyB,OACzB,yBAAyB,WACzB,yBAAyB;AAE3B,YAAM,mBACJ,OAAQ,MAAc,qCAAqC,aACtD,KAAa,iCAAiC,IAC/C;AAEN,YAAM,yBACJ,OAAQ,kBAA0B,2BAA2B,WACvD,iBAAyB,yBAC3B;AACN,UAAI,sBAAsB,OAAO,2BAA2B,YAAY,uBAAuB,SAAS;AAExG,YAAM,gCAAgC,MAA0B;AAC9D,cAAM,WACJ,OAAQ,MAAc,qCAAqC,aACtD,KAAa,iCAAiC,IAC/C;AAEN,cAAM,SACJ,OAAQ,UAAkB,2BAA2B,WAC/C,SAAiB,yBACnB;AAEN,eAAO,OAAO,WAAW,YAAY,OAAO,SAAS,IAAI,SAAS;AAAA,MACpE;AAEA,aAAO,qBAAqB;AAAA,QAC1B,SAAS;AAAA,QACT,OAAO;AAAA,QACP,KAAK;AAAA,QACL,GAAI,CAAC,kBACD;AAAA,UACE,YAAY;AAAA,UACZ,cAAc,8BAA8B,UAAU;AAAA,QACxD,IACA;AAAA,QACJ,eAAe,yBAAyB,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,CAAC,CAAC;AAAA,IAC1F,iBAAiB,CAAC,iBAAiB,mBAAmB,EAAE,OAAO,8CAA8C,CAAC,CAAC;AAAA,IAC/G,aAAa,CAAC,iBAAiB,eAAe,EAAE,OAAO,8CAA8C,CAAC,CAAC;AAAA,IACvG,UAAU,CAAC,iBAAiB,YAAY,EAAE,OAAO,2CAA2C,CAAC,CAAC;AAAA,EAChG;AACF;","names":[]}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import {
|
|
2
|
+
coreNgRuntimeServicesRegistry
|
|
3
|
+
} from "./chunk-EVS6KWPU.js";
|
|
4
|
+
|
|
5
|
+
// src/CoreNgLayer.ts
|
|
6
|
+
import { Config, Effect, Layer } from "effect";
|
|
7
|
+
import * as Logix from "@logixjs/core";
|
|
8
|
+
var parseExecVmModeEnabled = (raw) => {
|
|
9
|
+
const normalized = raw.trim().toLowerCase();
|
|
10
|
+
return normalized !== "off" && normalized !== "0" && normalized !== "false" && normalized !== "disabled";
|
|
11
|
+
};
|
|
12
|
+
var coreNgExecVmModeLayer = Layer.unwrapEffect(
|
|
13
|
+
Effect.gen(function* () {
|
|
14
|
+
const execVmMode = yield* Config.string("LOGIX_CORE_NG_EXEC_VM_MODE").pipe(Config.withDefault("on"));
|
|
15
|
+
const enabled = parseExecVmModeEnabled(execVmMode);
|
|
16
|
+
return Logix.InternalContracts.execVmModeLayer(enabled);
|
|
17
|
+
})
|
|
18
|
+
);
|
|
19
|
+
var coreNgKernelLayer = (options = {}) => Layer.mergeAll(
|
|
20
|
+
coreNgExecVmModeLayer,
|
|
21
|
+
Logix.Kernel.kernelLayer({
|
|
22
|
+
kernelId: "core-ng",
|
|
23
|
+
packageName: "@logixjs/core-ng",
|
|
24
|
+
...options.packageVersion ? { packageVersion: options.packageVersion } : {},
|
|
25
|
+
...options.buildId ? { buildId: options.buildId } : {},
|
|
26
|
+
...options.capabilities ? { capabilities: options.capabilities } : {}
|
|
27
|
+
}),
|
|
28
|
+
Logix.Kernel.runtimeServicesRegistryLayer(coreNgRuntimeServicesRegistry)
|
|
29
|
+
);
|
|
30
|
+
var coreNgFullCutoverLayer = (options = {}) => {
|
|
31
|
+
const services = Object.fromEntries(
|
|
32
|
+
Logix.Kernel.CutoverCoverageMatrix.requiredServiceIds.map((serviceId) => [
|
|
33
|
+
serviceId,
|
|
34
|
+
{ implId: "core-ng", notes: "full-cutover: runtime_default override (SSoT=Kernel.CutoverCoverageMatrix)" }
|
|
35
|
+
])
|
|
36
|
+
);
|
|
37
|
+
return Layer.mergeAll(
|
|
38
|
+
coreNgKernelLayer(options),
|
|
39
|
+
Logix.Kernel.fullCutoverGateModeLayer("fullCutover"),
|
|
40
|
+
Logix.Kernel.runtimeDefaultServicesOverridesLayer(services)
|
|
41
|
+
);
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export {
|
|
45
|
+
coreNgKernelLayer,
|
|
46
|
+
coreNgFullCutoverLayer
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=chunk-HIDG4C7J.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/CoreNgLayer.ts"],"sourcesContent":["import { Config, Effect, Layer } from 'effect'\nimport * as Logix from '@logixjs/core'\nimport { coreNgRuntimeServicesRegistry } from './RuntimeServices.impls.js'\n\nexport interface CoreNgKernelLayerOptions {\n readonly packageVersion?: string\n readonly buildId?: string\n readonly capabilities?: ReadonlyArray<string>\n}\n\nconst parseExecVmModeEnabled = (raw: string): boolean => {\n const normalized = raw.trim().toLowerCase()\n return normalized !== 'off' && normalized !== '0' && normalized !== 'false' && normalized !== 'disabled'\n}\n\nconst coreNgExecVmModeLayer = Layer.unwrapEffect(\n Effect.gen(function* () {\n const execVmMode = yield* Config.string('LOGIX_CORE_NG_EXEC_VM_MODE').pipe(Config.withDefault('on'))\n const enabled = parseExecVmModeEnabled(execVmMode)\n return Logix.InternalContracts.execVmModeLayer(enabled)\n }),\n) as Layer.Layer<any, never, never>\n\n/**\n * coreNgKernelLayer:\n * - Declares the requested kernel family for this runtime tree as core-ng.\n * - Provides the injectable runtime services registry for core-ng (no overrides enabled by default).\n */\nexport const coreNgKernelLayer = (options: CoreNgKernelLayerOptions = {}): Layer.Layer<any, never, never> =>\n Layer.mergeAll(\n coreNgExecVmModeLayer,\n Logix.Kernel.kernelLayer({\n kernelId: 'core-ng',\n packageName: '@logixjs/core-ng',\n ...(options.packageVersion ? { packageVersion: options.packageVersion } : {}),\n ...(options.buildId ? { buildId: options.buildId } : {}),\n ...(options.capabilities ? { capabilities: options.capabilities } : {}),\n }),\n Logix.Kernel.runtimeServicesRegistryLayer(coreNgRuntimeServicesRegistry),\n ) as Layer.Layer<any, never, never>\n\n/**\n * coreNgFullCutoverLayer:\n * - Explicitly enables the full cutover assembly (no fallback).\n * - Writes runtime_default overrides for all required serviceIds in the coverage matrix (implId=core-ng).\n *\n * Note: This layer is the entry point for \"claiming we can switch the default / enforcing perf evidence gates\".\n * For trial-only runs, keep using coreNgKernelLayer + choose overrides yourself.\n */\nexport const coreNgFullCutoverLayer = (options: CoreNgKernelLayerOptions = {}): Layer.Layer<any, never, never> => {\n const services: Logix.Kernel.RuntimeServicesOverrides = Object.fromEntries(\n Logix.Kernel.CutoverCoverageMatrix.requiredServiceIds.map((serviceId) => [\n serviceId,\n { implId: 'core-ng', notes: 'full-cutover: runtime_default override (SSoT=Kernel.CutoverCoverageMatrix)' },\n ]),\n )\n\n return Layer.mergeAll(\n coreNgKernelLayer(options),\n Logix.Kernel.fullCutoverGateModeLayer('fullCutover'),\n Logix.Kernel.runtimeDefaultServicesOverridesLayer(services),\n ) as Layer.Layer<any, never, never>\n}\n"],"mappings":";;;;;AAAA,SAAS,QAAQ,QAAQ,aAAa;AACtC,YAAY,WAAW;AASvB,IAAM,yBAAyB,CAAC,QAAyB;AACvD,QAAM,aAAa,IAAI,KAAK,EAAE,YAAY;AAC1C,SAAO,eAAe,SAAS,eAAe,OAAO,eAAe,WAAW,eAAe;AAChG;AAEA,IAAM,wBAAwB,MAAM;AAAA,EAClC,OAAO,IAAI,aAAa;AACtB,UAAM,aAAa,OAAO,OAAO,OAAO,4BAA4B,EAAE,KAAK,OAAO,YAAY,IAAI,CAAC;AACnG,UAAM,UAAU,uBAAuB,UAAU;AACjD,WAAa,wBAAkB,gBAAgB,OAAO;AAAA,EACxD,CAAC;AACH;AAOO,IAAM,oBAAoB,CAAC,UAAoC,CAAC,MACrE,MAAM;AAAA,EACJ;AAAA,EACM,aAAO,YAAY;AAAA,IACvB,UAAU;AAAA,IACV,aAAa;AAAA,IACb,GAAI,QAAQ,iBAAiB,EAAE,gBAAgB,QAAQ,eAAe,IAAI,CAAC;AAAA,IAC3E,GAAI,QAAQ,UAAU,EAAE,SAAS,QAAQ,QAAQ,IAAI,CAAC;AAAA,IACtD,GAAI,QAAQ,eAAe,EAAE,cAAc,QAAQ,aAAa,IAAI,CAAC;AAAA,EACvE,CAAC;AAAA,EACK,aAAO,6BAA6B,6BAA6B;AACzE;AAUK,IAAM,yBAAyB,CAAC,UAAoC,CAAC,MAAsC;AAChH,QAAM,WAAkD,OAAO;AAAA,IACvD,aAAO,sBAAsB,mBAAmB,IAAI,CAAC,cAAc;AAAA,MACvE;AAAA,MACA,EAAE,QAAQ,WAAW,OAAO,6EAA6E;AAAA,IAC3G,CAAC;AAAA,EACH;AAEA,SAAO,MAAM;AAAA,IACX,kBAAkB,OAAO;AAAA,IACnB,aAAO,yBAAyB,aAAa;AAAA,IAC7C,aAAO,qCAAqC,QAAQ;AAAA,EAC5D;AACF;","names":[]}
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// src/index.ts
|
|
31
|
+
var index_exports = {};
|
|
32
|
+
__export(index_exports, {
|
|
33
|
+
CORE_NG_IMPL_ID: () => CORE_NG_IMPL_ID,
|
|
34
|
+
coreNgFullCutoverLayer: () => coreNgFullCutoverLayer,
|
|
35
|
+
coreNgKernelLayer: () => coreNgKernelLayer,
|
|
36
|
+
coreNgRuntimeServicesRegistry: () => coreNgRuntimeServicesRegistry
|
|
37
|
+
});
|
|
38
|
+
module.exports = __toCommonJS(index_exports);
|
|
39
|
+
|
|
40
|
+
// src/CoreNgLayer.ts
|
|
41
|
+
var import_effect3 = require("effect");
|
|
42
|
+
var Logix3 = __toESM(require("@logixjs/core"), 1);
|
|
43
|
+
|
|
44
|
+
// src/RuntimeServices.impls.ts
|
|
45
|
+
var import_effect2 = require("effect");
|
|
46
|
+
var Logix2 = __toESM(require("@logixjs/core"), 1);
|
|
47
|
+
|
|
48
|
+
// src/ExecVmEvidence.ts
|
|
49
|
+
var import_effect = require("effect");
|
|
50
|
+
var Logix = __toESM(require("@logixjs/core"), 1);
|
|
51
|
+
var EXEC_VM_EVIDENCE_TRACE_TYPE = "trace:exec-vm";
|
|
52
|
+
var EXEC_VM_EVIDENCE_MODULE_ID = "@logixjs/core-ng";
|
|
53
|
+
var EXEC_VM_EVIDENCE_INSTANCE_ID = "kernel:core-ng";
|
|
54
|
+
var recordExecVmEvidence = (evidence) => import_effect.Effect.gen(function* () {
|
|
55
|
+
const level = yield* import_effect.FiberRef.get(Logix.Debug.internal.currentDiagnosticsLevel);
|
|
56
|
+
if (level === "off") {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
const data = (() => {
|
|
60
|
+
if (level === "full") return evidence;
|
|
61
|
+
return {
|
|
62
|
+
...evidence,
|
|
63
|
+
reasonDetail: void 0
|
|
64
|
+
};
|
|
65
|
+
})();
|
|
66
|
+
yield* Logix.Debug.record({
|
|
67
|
+
type: EXEC_VM_EVIDENCE_TRACE_TYPE,
|
|
68
|
+
moduleId: EXEC_VM_EVIDENCE_MODULE_ID,
|
|
69
|
+
instanceId: EXEC_VM_EVIDENCE_INSTANCE_ID,
|
|
70
|
+
data
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
// src/RuntimeServices.impls.ts
|
|
75
|
+
var CORE_NG_IMPL_ID = "core-ng";
|
|
76
|
+
var makeBuiltinAlias = (serviceId, options) => ({
|
|
77
|
+
implId: CORE_NG_IMPL_ID,
|
|
78
|
+
implVersion: "v0",
|
|
79
|
+
make: import_effect2.Effect.gen(function* () {
|
|
80
|
+
const builtins = yield* Logix2.Kernel.RuntimeServiceBuiltinsTag;
|
|
81
|
+
const builtinMake = builtins.getBuiltinMake(serviceId);
|
|
82
|
+
const impl = yield* builtinMake;
|
|
83
|
+
if (serviceId === "transaction") {
|
|
84
|
+
const execVmMode = yield* import_effect2.Config.string("LOGIX_CORE_NG_EXEC_VM_MODE").pipe(import_effect2.Config.withDefault("on"));
|
|
85
|
+
const normalizedExecVmMode = execVmMode.trim().toLowerCase();
|
|
86
|
+
const isExecVmEnabled = normalizedExecVmMode !== "off" && normalizedExecVmMode !== "0" && normalizedExecVmMode !== "false" && normalizedExecVmMode !== "disabled";
|
|
87
|
+
const assemblyEvidence = typeof impl?.__logixGetExecVmAssemblyEvidence === "function" ? impl.__logixGetExecVmAssemblyEvidence() : void 0;
|
|
88
|
+
const convergeStaticIrDigest = typeof assemblyEvidence?.convergeStaticIrDigest === "string" ? assemblyEvidence.convergeStaticIrDigest : void 0;
|
|
89
|
+
let didRecordExecIrHash = typeof convergeStaticIrDigest === "string" && convergeStaticIrDigest.length > 0;
|
|
90
|
+
const tryReadConvergeStaticIrDigest = () => {
|
|
91
|
+
const evidence = typeof impl?.__logixGetExecVmAssemblyEvidence === "function" ? impl.__logixGetExecVmAssemblyEvidence() : void 0;
|
|
92
|
+
const digest = typeof evidence?.convergeStaticIrDigest === "string" ? evidence.convergeStaticIrDigest : void 0;
|
|
93
|
+
return typeof digest === "string" && digest.length > 0 ? digest : void 0;
|
|
94
|
+
};
|
|
95
|
+
yield* recordExecVmEvidence({
|
|
96
|
+
version: "v1",
|
|
97
|
+
stage: "assembly",
|
|
98
|
+
hit: isExecVmEnabled,
|
|
99
|
+
...!isExecVmEnabled ? {
|
|
100
|
+
reasonCode: "disabled",
|
|
101
|
+
reasonDetail: `LOGIX_CORE_NG_EXEC_VM_MODE=${execVmMode}`
|
|
102
|
+
} : null,
|
|
103
|
+
execIrVersion: convergeStaticIrDigest ? convergeStaticIrDigest.split(":")[0] : void 0,
|
|
104
|
+
execIrHash: convergeStaticIrDigest,
|
|
105
|
+
serviceId,
|
|
106
|
+
implId: CORE_NG_IMPL_ID
|
|
107
|
+
});
|
|
108
|
+
if (!isExecVmEnabled || didRecordExecIrHash) {
|
|
109
|
+
return impl;
|
|
110
|
+
}
|
|
111
|
+
const baseRunWithStateTransaction = typeof impl.runWithStateTransaction === "function" ? impl.runWithStateTransaction : void 0;
|
|
112
|
+
if (!baseRunWithStateTransaction) {
|
|
113
|
+
return impl;
|
|
114
|
+
}
|
|
115
|
+
let retryBudget = 3;
|
|
116
|
+
const runFast = (origin, body) => baseRunWithStateTransaction(origin, body);
|
|
117
|
+
let runWithStateTransaction = (origin, body) => baseRunWithStateTransaction(origin, body).pipe(
|
|
118
|
+
import_effect2.Effect.tap(() => {
|
|
119
|
+
if (didRecordExecIrHash || retryBudget <= 0) {
|
|
120
|
+
runWithStateTransaction = runFast;
|
|
121
|
+
return import_effect2.Effect.void;
|
|
122
|
+
}
|
|
123
|
+
retryBudget -= 1;
|
|
124
|
+
const digest = tryReadConvergeStaticIrDigest();
|
|
125
|
+
if (!digest) {
|
|
126
|
+
if (retryBudget <= 0) {
|
|
127
|
+
runWithStateTransaction = runFast;
|
|
128
|
+
}
|
|
129
|
+
return import_effect2.Effect.void;
|
|
130
|
+
}
|
|
131
|
+
didRecordExecIrHash = true;
|
|
132
|
+
runWithStateTransaction = runFast;
|
|
133
|
+
return recordExecVmEvidence({
|
|
134
|
+
version: "v1",
|
|
135
|
+
stage: "assembly",
|
|
136
|
+
hit: true,
|
|
137
|
+
execIrVersion: digest.split(":")[0],
|
|
138
|
+
execIrHash: digest,
|
|
139
|
+
serviceId,
|
|
140
|
+
implId: CORE_NG_IMPL_ID
|
|
141
|
+
});
|
|
142
|
+
})
|
|
143
|
+
);
|
|
144
|
+
return {
|
|
145
|
+
...impl,
|
|
146
|
+
runWithStateTransaction: (origin, body) => runWithStateTransaction(origin, body)
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
return impl;
|
|
150
|
+
}),
|
|
151
|
+
...options?.notes ? { notes: options.notes } : {}
|
|
152
|
+
});
|
|
153
|
+
var coreNgRuntimeServicesRegistry = {
|
|
154
|
+
implsByServiceId: {
|
|
155
|
+
txnQueue: [makeBuiltinAlias("txnQueue", { notes: "full-cutover: alias builtin txnQueue" })],
|
|
156
|
+
operationRunner: [makeBuiltinAlias("operationRunner", { notes: "full-cutover: alias builtin operationRunner" })],
|
|
157
|
+
transaction: [makeBuiltinAlias("transaction", { notes: "full-cutover: alias builtin transaction ops" })],
|
|
158
|
+
dispatch: [makeBuiltinAlias("dispatch", { notes: "full-cutover: alias builtin dispatch ops" })]
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
// src/CoreNgLayer.ts
|
|
163
|
+
var parseExecVmModeEnabled = (raw) => {
|
|
164
|
+
const normalized = raw.trim().toLowerCase();
|
|
165
|
+
return normalized !== "off" && normalized !== "0" && normalized !== "false" && normalized !== "disabled";
|
|
166
|
+
};
|
|
167
|
+
var coreNgExecVmModeLayer = import_effect3.Layer.unwrapEffect(
|
|
168
|
+
import_effect3.Effect.gen(function* () {
|
|
169
|
+
const execVmMode = yield* import_effect3.Config.string("LOGIX_CORE_NG_EXEC_VM_MODE").pipe(import_effect3.Config.withDefault("on"));
|
|
170
|
+
const enabled = parseExecVmModeEnabled(execVmMode);
|
|
171
|
+
return Logix3.InternalContracts.execVmModeLayer(enabled);
|
|
172
|
+
})
|
|
173
|
+
);
|
|
174
|
+
var coreNgKernelLayer = (options = {}) => import_effect3.Layer.mergeAll(
|
|
175
|
+
coreNgExecVmModeLayer,
|
|
176
|
+
Logix3.Kernel.kernelLayer({
|
|
177
|
+
kernelId: "core-ng",
|
|
178
|
+
packageName: "@logixjs/core-ng",
|
|
179
|
+
...options.packageVersion ? { packageVersion: options.packageVersion } : {},
|
|
180
|
+
...options.buildId ? { buildId: options.buildId } : {},
|
|
181
|
+
...options.capabilities ? { capabilities: options.capabilities } : {}
|
|
182
|
+
}),
|
|
183
|
+
Logix3.Kernel.runtimeServicesRegistryLayer(coreNgRuntimeServicesRegistry)
|
|
184
|
+
);
|
|
185
|
+
var coreNgFullCutoverLayer = (options = {}) => {
|
|
186
|
+
const services = Object.fromEntries(
|
|
187
|
+
Logix3.Kernel.CutoverCoverageMatrix.requiredServiceIds.map((serviceId) => [
|
|
188
|
+
serviceId,
|
|
189
|
+
{ implId: "core-ng", notes: "full-cutover: runtime_default override (SSoT=Kernel.CutoverCoverageMatrix)" }
|
|
190
|
+
])
|
|
191
|
+
);
|
|
192
|
+
return import_effect3.Layer.mergeAll(
|
|
193
|
+
coreNgKernelLayer(options),
|
|
194
|
+
Logix3.Kernel.fullCutoverGateModeLayer("fullCutover"),
|
|
195
|
+
Logix3.Kernel.runtimeDefaultServicesOverridesLayer(services)
|
|
196
|
+
);
|
|
197
|
+
};
|
|
198
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
199
|
+
0 && (module.exports = {
|
|
200
|
+
CORE_NG_IMPL_ID,
|
|
201
|
+
coreNgFullCutoverLayer,
|
|
202
|
+
coreNgKernelLayer,
|
|
203
|
+
coreNgRuntimeServicesRegistry
|
|
204
|
+
});
|
|
205
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/CoreNgLayer.ts","../src/RuntimeServices.impls.ts","../src/ExecVmEvidence.ts"],"sourcesContent":["// Public barrel for @logixjs/core-ng\n// Recommended usage:\n// import * as CoreNg from \"@logixjs/core-ng\"\n// Then CoreNg exposes namespaces like coreNgKernelLayer, etc.\n\nexport { coreNgKernelLayer, coreNgFullCutoverLayer } from './CoreNgLayer.js'\nexport type * from './CoreNgLayer.js'\n\nimport { CORE_NG_IMPL_ID, coreNgRuntimeServicesRegistry } from './RuntimeServices.impls.js'\n\nexport { CORE_NG_IMPL_ID, coreNgRuntimeServicesRegistry }\nexport type * from './RuntimeServices.impls.js'\n","import { Config, Effect, Layer } from 'effect'\nimport * as Logix from '@logixjs/core'\nimport { coreNgRuntimeServicesRegistry } from './RuntimeServices.impls.js'\n\nexport interface CoreNgKernelLayerOptions {\n readonly packageVersion?: string\n readonly buildId?: string\n readonly capabilities?: ReadonlyArray<string>\n}\n\nconst parseExecVmModeEnabled = (raw: string): boolean => {\n const normalized = raw.trim().toLowerCase()\n return normalized !== 'off' && normalized !== '0' && normalized !== 'false' && normalized !== 'disabled'\n}\n\nconst coreNgExecVmModeLayer = Layer.unwrapEffect(\n Effect.gen(function* () {\n const execVmMode = yield* Config.string('LOGIX_CORE_NG_EXEC_VM_MODE').pipe(Config.withDefault('on'))\n const enabled = parseExecVmModeEnabled(execVmMode)\n return Logix.InternalContracts.execVmModeLayer(enabled)\n }),\n) as Layer.Layer<any, never, never>\n\n/**\n * coreNgKernelLayer:\n * - Declares the requested kernel family for this runtime tree as core-ng.\n * - Provides the injectable runtime services registry for core-ng (no overrides enabled by default).\n */\nexport const coreNgKernelLayer = (options: CoreNgKernelLayerOptions = {}): Layer.Layer<any, never, never> =>\n Layer.mergeAll(\n coreNgExecVmModeLayer,\n Logix.Kernel.kernelLayer({\n kernelId: 'core-ng',\n packageName: '@logixjs/core-ng',\n ...(options.packageVersion ? { packageVersion: options.packageVersion } : {}),\n ...(options.buildId ? { buildId: options.buildId } : {}),\n ...(options.capabilities ? { capabilities: options.capabilities } : {}),\n }),\n Logix.Kernel.runtimeServicesRegistryLayer(coreNgRuntimeServicesRegistry),\n ) as Layer.Layer<any, never, never>\n\n/**\n * coreNgFullCutoverLayer:\n * - Explicitly enables the full cutover assembly (no fallback).\n * - Writes runtime_default overrides for all required serviceIds in the coverage matrix (implId=core-ng).\n *\n * Note: This layer is the entry point for \"claiming we can switch the default / enforcing perf evidence gates\".\n * For trial-only runs, keep using coreNgKernelLayer + choose overrides yourself.\n */\nexport const coreNgFullCutoverLayer = (options: CoreNgKernelLayerOptions = {}): Layer.Layer<any, never, never> => {\n const services: Logix.Kernel.RuntimeServicesOverrides = Object.fromEntries(\n Logix.Kernel.CutoverCoverageMatrix.requiredServiceIds.map((serviceId) => [\n serviceId,\n { implId: 'core-ng', notes: 'full-cutover: runtime_default override (SSoT=Kernel.CutoverCoverageMatrix)' },\n ]),\n )\n\n return Layer.mergeAll(\n coreNgKernelLayer(options),\n Logix.Kernel.fullCutoverGateModeLayer('fullCutover'),\n Logix.Kernel.runtimeDefaultServicesOverridesLayer(services),\n ) as Layer.Layer<any, never, never>\n}\n","import { Config, Effect } from 'effect'\nimport * as Logix from '@logixjs/core'\nimport { recordExecVmEvidence } from './ExecVmEvidence.js'\n\nexport const CORE_NG_IMPL_ID = 'core-ng' as const\n\nconst makeBuiltinAlias = (\n serviceId: string,\n options?: { readonly notes?: string },\n): Logix.Kernel.RuntimeServiceImpl<any> => ({\n implId: CORE_NG_IMPL_ID,\n implVersion: 'v0',\n make: Effect.gen(function* () {\n const builtins = yield* Logix.Kernel.RuntimeServiceBuiltinsTag\n const builtinMake = builtins.getBuiltinMake(serviceId)\n const impl = (yield* builtinMake) as any\n\n if (serviceId === 'transaction') {\n const execVmMode = yield* Config.string('LOGIX_CORE_NG_EXEC_VM_MODE').pipe(Config.withDefault('on'))\n const normalizedExecVmMode = execVmMode.trim().toLowerCase()\n const isExecVmEnabled =\n normalizedExecVmMode !== 'off' &&\n normalizedExecVmMode !== '0' &&\n normalizedExecVmMode !== 'false' &&\n normalizedExecVmMode !== 'disabled'\n\n const assemblyEvidence =\n typeof (impl as any)?.__logixGetExecVmAssemblyEvidence === 'function'\n ? (impl as any).__logixGetExecVmAssemblyEvidence()\n : undefined\n\n const convergeStaticIrDigest =\n typeof (assemblyEvidence as any)?.convergeStaticIrDigest === 'string'\n ? ((assemblyEvidence as any).convergeStaticIrDigest as string)\n : undefined\n let didRecordExecIrHash = typeof convergeStaticIrDigest === 'string' && convergeStaticIrDigest.length > 0\n\n const tryReadConvergeStaticIrDigest = (): string | undefined => {\n const evidence =\n typeof (impl as any)?.__logixGetExecVmAssemblyEvidence === 'function'\n ? (impl as any).__logixGetExecVmAssemblyEvidence()\n : undefined\n\n const digest =\n typeof (evidence as any)?.convergeStaticIrDigest === 'string'\n ? ((evidence as any).convergeStaticIrDigest as string)\n : undefined\n\n return typeof digest === 'string' && digest.length > 0 ? digest : undefined\n }\n\n yield* recordExecVmEvidence({\n version: 'v1',\n stage: 'assembly',\n hit: isExecVmEnabled,\n ...(!isExecVmEnabled\n ? {\n reasonCode: 'disabled',\n reasonDetail: `LOGIX_CORE_NG_EXEC_VM_MODE=${execVmMode}`,\n }\n : null),\n execIrVersion: convergeStaticIrDigest ? convergeStaticIrDigest.split(':')[0] : undefined,\n execIrHash: convergeStaticIrDigest,\n serviceId,\n implId: CORE_NG_IMPL_ID,\n })\n\n if (!isExecVmEnabled || didRecordExecIrHash) {\n return impl\n }\n\n const baseRunWithStateTransaction =\n typeof (impl as any).runWithStateTransaction === 'function' ? (impl as any).runWithStateTransaction : undefined\n\n if (!baseRunWithStateTransaction) {\n return impl\n }\n\n let retryBudget = 3\n\n const runFast = (origin: any, body: any) => baseRunWithStateTransaction(origin, body)\n\n let runWithStateTransaction: (origin: any, body: any) => any = (origin: any, body: any) =>\n baseRunWithStateTransaction(origin, body).pipe(\n Effect.tap(() => {\n if (didRecordExecIrHash || retryBudget <= 0) {\n runWithStateTransaction = runFast\n return Effect.void\n }\n\n retryBudget -= 1\n const digest = tryReadConvergeStaticIrDigest()\n if (!digest) {\n if (retryBudget <= 0) {\n runWithStateTransaction = runFast\n }\n return Effect.void\n }\n\n didRecordExecIrHash = true\n runWithStateTransaction = runFast\n return recordExecVmEvidence({\n version: 'v1',\n stage: 'assembly',\n hit: true,\n execIrVersion: digest.split(':')[0],\n execIrHash: digest,\n serviceId,\n implId: CORE_NG_IMPL_ID,\n })\n }),\n )\n\n return {\n ...impl,\n runWithStateTransaction: (origin: any, body: any) => runWithStateTransaction(origin, body),\n }\n }\n\n return impl\n }) as any,\n ...(options?.notes ? { notes: options.notes } : {}),\n})\n\n/**\n * coreNgRuntimeServicesRegistry:\n * - Registers only optional implementations on the core-ng side (no serialized override; only used at assembly time).\n * - Selection evidence is still produced and exported by @logixjs/core's RuntimeServicesEvidence.\n */\nexport const coreNgRuntimeServicesRegistry: Logix.Kernel.RuntimeServicesRegistry = {\n implsByServiceId: {\n txnQueue: [makeBuiltinAlias('txnQueue', { notes: 'full-cutover: alias builtin txnQueue' })],\n operationRunner: [makeBuiltinAlias('operationRunner', { notes: 'full-cutover: alias builtin operationRunner' })],\n transaction: [makeBuiltinAlias('transaction', { notes: 'full-cutover: alias builtin transaction ops' })],\n dispatch: [makeBuiltinAlias('dispatch', { notes: 'full-cutover: alias builtin dispatch ops' })],\n },\n}\n","import { Effect, FiberRef } from 'effect'\nimport * as Logix from '@logixjs/core'\n\nexport const EXEC_VM_EVIDENCE_TRACE_TYPE = 'trace:exec-vm' as const\nexport const EXEC_VM_EVIDENCE_MODULE_ID = '@logixjs/core-ng' as const\nexport const EXEC_VM_EVIDENCE_INSTANCE_ID = 'kernel:core-ng' as const\n\nexport type ExecVmMissReasonCode = 'not_implemented' | 'missing_capability' | 'disabled'\n\nexport interface ExecVmEvidence {\n readonly version: 'v1'\n readonly stage: 'assembly'\n /**\n * hit=true: the Exec VM mode actually took effect in this run (instead of implicitly falling back\n * to the conservative path).\n *\n * Note: for now this only wires the evidence fields and trace plumbing; the Exec VM implementation\n * will be completed in follow-up task 049.\n */\n readonly hit: boolean\n /** Miss reason code (stable enum; no free-form text). */\n readonly reasonCode?: ExecVmMissReasonCode\n /** Optional details; only emitted in light/full (not in off). */\n readonly reasonDetail?: string\n /** Exec IR version (AOT-ready; emitted in light/full, not in off). */\n readonly execIrVersion?: string\n /** Exec IR stable hash (AOT-ready; emitted in light/full, not in off). */\n readonly execIrHash?: string\n /** Evidence recording point (currently fixed to the transaction assembly phase). */\n readonly serviceId?: string\n /** The implId used by the current implementation (for diffing/debugging). */\n readonly implId?: string\n}\n\nexport const recordExecVmEvidence = (evidence: ExecVmEvidence): Effect.Effect<void, never, any> =>\n Effect.gen(function* () {\n const level = yield* FiberRef.get(Logix.Debug.internal.currentDiagnosticsLevel)\n if (level === 'off') {\n return\n }\n\n const data: ExecVmEvidence = (() => {\n if (level === 'full') return evidence\n return {\n ...evidence,\n reasonDetail: undefined,\n }\n })()\n\n yield* Logix.Debug.record({\n type: EXEC_VM_EVIDENCE_TRACE_TYPE,\n moduleId: EXEC_VM_EVIDENCE_MODULE_ID,\n instanceId: EXEC_VM_EVIDENCE_INSTANCE_ID,\n data: data as any,\n })\n })\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,iBAAsC;AACtC,IAAAC,SAAuB;;;ACDvB,IAAAC,iBAA+B;AAC/B,IAAAC,SAAuB;;;ACDvB,oBAAiC;AACjC,YAAuB;AAEhB,IAAM,8BAA8B;AACpC,IAAM,6BAA6B;AACnC,IAAM,+BAA+B;AA6BrC,IAAM,uBAAuB,CAAC,aACnC,qBAAO,IAAI,aAAa;AACtB,QAAM,QAAQ,OAAO,uBAAS,IAAU,YAAM,SAAS,uBAAuB;AAC9E,MAAI,UAAU,OAAO;AACnB;AAAA,EACF;AAEA,QAAM,QAAwB,MAAM;AAClC,QAAI,UAAU,OAAQ,QAAO;AAC7B,WAAO;AAAA,MACL,GAAG;AAAA,MACH,cAAc;AAAA,IAChB;AAAA,EACF,GAAG;AAEH,SAAa,YAAM,OAAO;AAAA,IACxB,MAAM;AAAA,IACN,UAAU;AAAA,IACV,YAAY;AAAA,IACZ;AAAA,EACF,CAAC;AACH,CAAC;;;ADnDI,IAAM,kBAAkB;AAE/B,IAAM,mBAAmB,CACvB,WACA,aAC0C;AAAA,EAC1C,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,MAAM,sBAAO,IAAI,aAAa;AAC5B,UAAM,WAAW,OAAa,cAAO;AACrC,UAAM,cAAc,SAAS,eAAe,SAAS;AACrD,UAAM,OAAQ,OAAO;AAErB,QAAI,cAAc,eAAe;AAC/B,YAAM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,sBAAO,IAAI,aAAa;AACtB,UAAM,aAAa,OAAO,sBAAO,OAAO,4BAA4B,EAAE,KAAK,sBAAO,YAAY,IAAI,CAAC;AACnG,UAAM,UAAU,uBAAuB,UAAU;AACjD,WAAa,yBAAkB,gBAAgB,OAAO;AAAA,EACxD,CAAC;AACH;AAOO,IAAM,oBAAoB,CAAC,UAAoC,CAAC,MACrE,qBAAM;AAAA,EACJ;AAAA,EACM,cAAO,YAAY;AAAA,IACvB,UAAU;AAAA,IACV,aAAa;AAAA,IACb,GAAI,QAAQ,iBAAiB,EAAE,gBAAgB,QAAQ,eAAe,IAAI,CAAC;AAAA,IAC3E,GAAI,QAAQ,UAAU,EAAE,SAAS,QAAQ,QAAQ,IAAI,CAAC;AAAA,IACtD,GAAI,QAAQ,eAAe,EAAE,cAAc,QAAQ,aAAa,IAAI,CAAC;AAAA,EACvE,CAAC;AAAA,EACK,cAAO,6BAA6B,6BAA6B;AACzE;AAUK,IAAM,yBAAyB,CAAC,UAAoC,CAAC,MAAsC;AAChH,QAAM,WAAkD,OAAO;AAAA,IACvD,cAAO,sBAAsB,mBAAmB,IAAI,CAAC,cAAc;AAAA,MACvE;AAAA,MACA,EAAE,QAAQ,WAAW,OAAO,6EAA6E;AAAA,IAC3G,CAAC;AAAA,EACH;AAEA,SAAO,qBAAM;AAAA,IACX,kBAAkB,OAAO;AAAA,IACnB,cAAO,yBAAyB,aAAa;AAAA,IAC7C,cAAO,qCAAqC,QAAQ;AAAA,EAC5D;AACF;","names":["import_effect","Logix","import_effect","Logix"]}
|
package/dist/index.d.cts
ADDED
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
coreNgFullCutoverLayer,
|
|
3
|
+
coreNgKernelLayer
|
|
4
|
+
} from "./chunk-HIDG4C7J.js";
|
|
5
|
+
import {
|
|
6
|
+
CORE_NG_IMPL_ID,
|
|
7
|
+
coreNgRuntimeServicesRegistry
|
|
8
|
+
} from "./chunk-EVS6KWPU.js";
|
|
9
|
+
import "./chunk-AGDYNZ3J.js";
|
|
10
|
+
export {
|
|
11
|
+
CORE_NG_IMPL_ID,
|
|
12
|
+
coreNgFullCutoverLayer,
|
|
13
|
+
coreNgKernelLayer,
|
|
14
|
+
coreNgRuntimeServicesRegistry
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/package.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@logixjs/core-ng",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Next-gen kernel implementation package for Logix",
|
|
5
|
+
"files": [
|
|
6
|
+
"dist/**"
|
|
7
|
+
],
|
|
8
|
+
"type": "module",
|
|
9
|
+
"main": "./dist/index.cjs",
|
|
10
|
+
"module": "./dist/index.js",
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"exports": {
|
|
13
|
+
"./package.json": "./package.json",
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"import": "./dist/index.js",
|
|
17
|
+
"require": "./dist/index.cjs"
|
|
18
|
+
},
|
|
19
|
+
"./*": {
|
|
20
|
+
"types": "./dist/*.d.ts",
|
|
21
|
+
"import": "./dist/*.js",
|
|
22
|
+
"require": "./dist/*.cjs"
|
|
23
|
+
},
|
|
24
|
+
"./internal/*": null
|
|
25
|
+
},
|
|
26
|
+
"publishConfig": {
|
|
27
|
+
"access": "public"
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"effect": "^3.19.8",
|
|
31
|
+
"@logixjs/core": "0.0.1"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@effect/vitest": "^0.27.0",
|
|
35
|
+
"tsup": "^8.0.0",
|
|
36
|
+
"typescript": "^5.8.2",
|
|
37
|
+
"vitest": "^4.0.15"
|
|
38
|
+
},
|
|
39
|
+
"peerDependencies": {
|
|
40
|
+
"effect": "^3.19.8",
|
|
41
|
+
"@logixjs/core": "0.0.1"
|
|
42
|
+
},
|
|
43
|
+
"scripts": {
|
|
44
|
+
"build": "tsup",
|
|
45
|
+
"dev": "tsup --watch",
|
|
46
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
47
|
+
"typecheck:test": "tsc -p tsconfig.test.json --noEmit",
|
|
48
|
+
"test": "vitest run",
|
|
49
|
+
"test:changed": "vitest run --changed",
|
|
50
|
+
"test:cache": "vitest run --cache",
|
|
51
|
+
"test:watch": "vitest"
|
|
52
|
+
}
|
|
53
|
+
}
|