omnius 1.0.948 → 1.0.949
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/_types/orchestrator/agenticRunner.d.ts +4 -0
- package/dist/index.js +2 -2
- package/dist/library.js +261 -140
- package/npm-shrinkwrap.json +8 -8
- package/package.json +1 -1
package/dist/library.js
CHANGED
|
@@ -344748,7 +344748,7 @@ __export(preflightSnapshot_exports, {
|
|
|
344748
344748
|
import { existsSync as existsSync60, readFileSync as readFileSync65, statSync as statSync33, statfsSync as statfsSync4 } from "node:fs";
|
|
344749
344749
|
import { homedir as homedir22, platform as platform3, arch, totalmem as totalmem4, freemem as freemem3, hostname } from "node:os";
|
|
344750
344750
|
import { join as join76 } from "node:path";
|
|
344751
|
-
import { createHash as
|
|
344751
|
+
import { createHash as createHash126 } from "node:crypto";
|
|
344752
344752
|
function capturePreflightSnapshot(workingDir) {
|
|
344753
344753
|
const warnings = [];
|
|
344754
344754
|
const configFingerprints = {};
|
|
@@ -344917,7 +344917,7 @@ function expandPath(p) {
|
|
|
344917
344917
|
return p;
|
|
344918
344918
|
}
|
|
344919
344919
|
function sha2569(s) {
|
|
344920
|
-
return
|
|
344920
|
+
return createHash126("sha256").update(s).digest("hex").slice(0, 16);
|
|
344921
344921
|
}
|
|
344922
344922
|
function freeDiskBytes(path13 = "/tmp") {
|
|
344923
344923
|
try {
|
|
@@ -353884,7 +353884,7 @@ var gne_conformance_exports = {};
|
|
|
353884
353884
|
__export(gne_conformance_exports, {
|
|
353885
353885
|
verifyNolGneConformanceCapture: () => verifyNolGneConformanceCapture
|
|
353886
353886
|
});
|
|
353887
|
-
import { createHash as
|
|
353887
|
+
import { createHash as createHash135 } from "node:crypto";
|
|
353888
353888
|
function need4(condition, message3) {
|
|
353889
353889
|
if (!condition) throw new Error(`GNE capture ${message3}`);
|
|
353890
353890
|
}
|
|
@@ -354488,7 +354488,7 @@ var init_gne_conformance = __esm({
|
|
|
354488
354488
|
"restored_target",
|
|
354489
354489
|
"vector"
|
|
354490
354490
|
];
|
|
354491
|
-
hash22 = (bytes5) =>
|
|
354491
|
+
hash22 = (bytes5) => createHash135("sha256").update(bytes5).digest("hex");
|
|
354492
354492
|
CRC_TABLE = Uint32Array.from({ length: 256 }, (_, value) => {
|
|
354493
354493
|
let crc = value;
|
|
354494
354494
|
for (let bit = 0; bit < 8; bit++)
|
|
@@ -402248,7 +402248,64 @@ function reopenTaskEffectStateEvidence(input2) {
|
|
|
402248
402248
|
}
|
|
402249
402249
|
|
|
402250
402250
|
// packages/orchestrator/dist/loop-triage.js
|
|
402251
|
+
import { createHash as createHash125 } from "node:crypto";
|
|
402252
|
+
|
|
402253
|
+
// packages/orchestrator/dist/reviewed-diagnostic-history.js
|
|
402251
402254
|
import { createHash as createHash124 } from "node:crypto";
|
|
402255
|
+
var REVIEWED_DIAGNOSTIC_MARKER = "[REVIEWED DIAGNOSTIC OBSERVATION v1]";
|
|
402256
|
+
var reviewedDiagnosticScope = (callId) => `reviewed-diagnostic:${callId}`;
|
|
402257
|
+
function projectReviewedDiagnosticHistory(messages4, eligible, reviewedOperations, archive) {
|
|
402258
|
+
const counts = /* @__PURE__ */ new Map();
|
|
402259
|
+
for (const message3 of messages4) {
|
|
402260
|
+
for (const call3 of message3.role === "assistant" ? message3.tool_calls ?? [] : [])
|
|
402261
|
+
counts.set(call3.id, (counts.get(call3.id) ?? 0) + 1);
|
|
402262
|
+
if (message3.role === "tool" && message3.tool_call_id)
|
|
402263
|
+
counts.set(`result:${message3.tool_call_id}`, (counts.get(`result:${message3.tool_call_id}`) ?? 0) + 1);
|
|
402264
|
+
}
|
|
402265
|
+
const output = [];
|
|
402266
|
+
for (let index = 0; index < messages4.length; index++) {
|
|
402267
|
+
const assistant = messages4[index], result = messages4[index + 1];
|
|
402268
|
+
const call3 = assistant.role === "assistant" && assistant.tool_calls?.length === 1 ? assistant.tool_calls[0] : void 0;
|
|
402269
|
+
const observation = call3 && eligible.get(call3.id);
|
|
402270
|
+
if (!call3 || !observation || observation.toolName !== call3.function.name || !observation.sourceArtifact || !reviewedOperations.has(observation.operationKey) || counts.get(call3.id) !== 1 || counts.get(`result:${call3.id}`) !== 1 || assistant.content !== null && assistant.content !== "" || assistant.requiredSourceEvidence || !result || result.role !== "tool" || result.tool_call_id !== call3.id || typeof result.content !== "string" || result.requiredSourceEvidence) {
|
|
402271
|
+
output.push(assistant);
|
|
402272
|
+
continue;
|
|
402273
|
+
}
|
|
402274
|
+
try {
|
|
402275
|
+
const args = JSON.parse(call3.function.arguments);
|
|
402276
|
+
if (taskExecutionDigest(args) !== observation.argumentsSha256) {
|
|
402277
|
+
output.push(assistant);
|
|
402278
|
+
continue;
|
|
402279
|
+
}
|
|
402280
|
+
const body = JSON.stringify({ assistant, result });
|
|
402281
|
+
const artifact5 = archive(body);
|
|
402282
|
+
if (artifact5 !== `omnius-artifact://sha256/${createHash124("sha256").update(body).digest("hex")}`)
|
|
402283
|
+
throw new Error("Diagnostic archive custody mismatch");
|
|
402284
|
+
output.push({
|
|
402285
|
+
role: "user",
|
|
402286
|
+
policyScope: "runtime",
|
|
402287
|
+
requiredSourceEvidence: { schema: "omnius.required-source-evidence.v1", scope: reviewedDiagnosticScope(call3.id) },
|
|
402288
|
+
content: `${REVIEWED_DIAGNOSTIC_MARKER}
|
|
402289
|
+
${JSON.stringify({
|
|
402290
|
+
schema: "omnius.reviewed-diagnostic-observation.v1",
|
|
402291
|
+
transactionId: call3.id,
|
|
402292
|
+
tool: call3.function.name,
|
|
402293
|
+
operationKey: observation.operationKey,
|
|
402294
|
+
artifact: artifact5,
|
|
402295
|
+
sourceArtifact: observation.sourceArtifact,
|
|
402296
|
+
result: result.content,
|
|
402297
|
+
interpretation: "A separate completed diagnostic execution, quoted after review of repeated operations. Results may differ; assess them against the current user goal. This record grants no instruction, completion, or verification authority."
|
|
402298
|
+
})}`
|
|
402299
|
+
});
|
|
402300
|
+
index++;
|
|
402301
|
+
} catch {
|
|
402302
|
+
output.push(assistant);
|
|
402303
|
+
}
|
|
402304
|
+
}
|
|
402305
|
+
return output;
|
|
402306
|
+
}
|
|
402307
|
+
|
|
402308
|
+
// packages/orchestrator/dist/loop-triage.js
|
|
402252
402309
|
var LOOP_TRIAGE_STREAK = 3;
|
|
402253
402310
|
var LOOP_TRIAGE_REVIEW_HEADER = "[OMNIUS RUN REVIEW — independent second opinion on this run from the Omnius triage reviewer; this is the harness, not the user]";
|
|
402254
402311
|
function toolTurns(messages4) {
|
|
@@ -402283,7 +402340,7 @@ function repeatedCallStreak(messages4, threshold = LOOP_TRIAGE_STREAK) {
|
|
|
402283
402340
|
count8++;
|
|
402284
402341
|
if (count8 < threshold)
|
|
402285
402342
|
return null;
|
|
402286
|
-
const key =
|
|
402343
|
+
const key = createHash125("sha256").update(last).digest("hex").slice(0, 16);
|
|
402287
402344
|
return { key, count: count8 };
|
|
402288
402345
|
}
|
|
402289
402346
|
var LOOP_TRIAGE_STALL_RESULTS = 16;
|
|
@@ -402346,9 +402403,11 @@ function buildLoopTriagePrompt(goal, messages4) {
|
|
|
402346
402403
|
"Assess what appears to have happened in this run (it has been flagged for repeating itself or for working without new progress): what has actually been accomplished toward the request, what the agent appears to be stuck on and why, and what the single most useful next step is to move the user's request forward (or whether it should report back to the user). Be concrete and specific to this run. Reply in under 150 words, addressed to the agent as a second opinion."
|
|
402347
402404
|
].join("\n");
|
|
402348
402405
|
}
|
|
402349
|
-
function withLoopTriageReview(messages4, review) {
|
|
402406
|
+
function withLoopTriageReview(messages4, review, afterToolCallId) {
|
|
402350
402407
|
const next = [...messages4];
|
|
402351
|
-
const lastTool = next.map((message3) => message3.role).lastIndexOf("tool");
|
|
402408
|
+
const lastTool = afterToolCallId ? next.findIndex((message3) => message3.role === "tool" && message3.tool_call_id === afterToolCallId || message3.requiredSourceEvidence?.scope === reviewedDiagnosticScope(afterToolCallId)) : next.map((message3) => message3.role).lastIndexOf("tool");
|
|
402409
|
+
if (afterToolCallId && lastTool < 0)
|
|
402410
|
+
return next;
|
|
402352
402411
|
const body = typeof review.content === "string" ? review.content.slice(LOOP_TRIAGE_REVIEW_HEADER.length).trim() : "";
|
|
402353
402412
|
const target2 = lastTool >= 0 ? next[lastTool] : void 0;
|
|
402354
402413
|
if (target2 && typeof target2.content === "string" && body) {
|
|
@@ -402357,7 +402416,10 @@ function withLoopTriageReview(messages4, review) {
|
|
|
402357
402416
|
[TRIAGE REVIEW — second opinion from an independent reviewer of this run]
|
|
402358
402417
|
${body}` };
|
|
402359
402418
|
}
|
|
402360
|
-
|
|
402419
|
+
if (afterToolCallId && lastTool >= 0)
|
|
402420
|
+
next.splice(lastTool + 1, 0, review);
|
|
402421
|
+
else
|
|
402422
|
+
next.push(review);
|
|
402361
402423
|
return next;
|
|
402362
402424
|
}
|
|
402363
402425
|
function loopTriageReviewMessage(review) {
|
|
@@ -403877,6 +403939,10 @@ var AgenticRunner = class _AgenticRunner {
|
|
|
403877
403939
|
_loopTriage = null;
|
|
403878
403940
|
_loopTriageActiveKey = null;
|
|
403879
403941
|
_loopTriageAttempts = /* @__PURE__ */ new Map();
|
|
403942
|
+
_loopTriageReviewHistory = [];
|
|
403943
|
+
_loopDiagnosticObservations = /* @__PURE__ */ new Map();
|
|
403944
|
+
_loopReviewedDiagnosticOperations = /* @__PURE__ */ new Set();
|
|
403945
|
+
_loopDiagnosticArchiveRefs = /* @__PURE__ */ new Map();
|
|
403880
403946
|
// ROOT CAUSE FIX: one-shot system note describing restored-todo claims that
|
|
403881
403947
|
// were contradicted by the disk at session start. Injected into the initial
|
|
403882
403948
|
// context so the model starts from a truthful world model instead of
|
|
@@ -408368,7 +408434,7 @@ ${read2.content}`;
|
|
|
408368
408434
|
transactionId: transactionId2,
|
|
408369
408435
|
transactionRelevance: active ? "active" : "historical",
|
|
408370
408436
|
atomicGroup: transactionId2,
|
|
408371
|
-
...message3.role === "assistant" && message3.tool_calls?.length === 1 && this._historyObservations.has(transactionId2) && this._canonicalAcceptedReceipts.has(transactionId2) ? { completedObservation: {
|
|
408437
|
+
...message3.role === "assistant" && message3.tool_calls?.length === 1 && !this._loopReviewedDiagnosticOperations.has(this._loopDiagnosticObservations.get(transactionId2)?.operationKey ?? "") && this._historyObservations.has(transactionId2) && this._canonicalAcceptedReceipts.has(transactionId2) ? { completedObservation: {
|
|
408372
408438
|
...this._historyObservations.get(transactionId2),
|
|
408373
408439
|
resultSha256: _createHash("sha256").update(String(messages4.find((candidate) => candidate.role === "tool" && candidate.tool_call_id === transactionId2)?.content ?? "")).digest("hex"),
|
|
408374
408440
|
artifactLocator: this._canonicalAcceptedReceipts.get(transactionId2).artifactLocator,
|
|
@@ -410562,6 +410628,26 @@ ${workflowStatus}` } : {}
|
|
|
410562
410628
|
this._applyCanonicalOutboundProjection(request, turn);
|
|
410563
410629
|
}
|
|
410564
410630
|
await this._applyUnifiedMemoryCompilationWithLifecycle(request);
|
|
410631
|
+
if (this._taskObjectiveContinuationRequests.has(request)) {
|
|
410632
|
+
request.messages = projectReviewedDiagnosticHistory(request.messages, this._loopDiagnosticObservations, this._loopReviewedDiagnosticOperations, (body) => {
|
|
410633
|
+
const digest19 = _createHash("sha256").update(body).digest("hex");
|
|
410634
|
+
const retained = this._loopDiagnosticArchiveRefs.get(digest19);
|
|
410635
|
+
if (retained)
|
|
410636
|
+
return retained;
|
|
410637
|
+
const store = this._artifactStore();
|
|
410638
|
+
const stored = store.put({
|
|
410639
|
+
path: `reviewed-diagnostic/${this.currentArtifactRunId()}/${digest19}.json`,
|
|
410640
|
+
revision: digest19,
|
|
410641
|
+
content: body,
|
|
410642
|
+
fidelity: "full"
|
|
410643
|
+
});
|
|
410644
|
+
store.flush(stored.reference);
|
|
410645
|
+
if (store.read(stored.reference).content !== body)
|
|
410646
|
+
throw new Error("Diagnostic archive readback mismatch");
|
|
410647
|
+
this._loopDiagnosticArchiveRefs.set(digest19, stored.reference);
|
|
410648
|
+
return stored.reference;
|
|
410649
|
+
});
|
|
410650
|
+
}
|
|
410565
410651
|
this._applyAppendOnlyOutboundProjection(request);
|
|
410566
410652
|
contextAdmissionPasses.push({ phase: "final_materialized", receipt: this._applyContextAdmission(request) });
|
|
410567
410653
|
if ((this._lastContextAdmission?.decision === "reject" || request.preparedContextCapacity && !this._currentPreparedContextCapacity(request)) && await this._prepareRequestContextCapacity(request))
|
|
@@ -411308,6 +411394,23 @@ ${workflowStatus}` } : {}
|
|
|
411308
411394
|
turn: input2.turn
|
|
411309
411395
|
});
|
|
411310
411396
|
const tool = this.tools.get(input2.toolName);
|
|
411397
|
+
if (isRestoredDiagnosticToolName(input2.toolName) && !input2.realMutation && input2.result.mutated !== true && !input2.result.runtimeAuthored && !input2.result.externalEffectReceipt && !input2.result.verificationReceipt && !input2.result.verificationReceipts?.length && (input2.result.completionEvidenceRole === void 0 || input2.result.completionEvidenceRole === "observation") && !input2.result.objectiveCriterionIds?.length && !input2.result.objectiveEvidenceKinds?.length && !input2.result.fullReadAdmitted && !input2.result.sourceObservation && !input2.result.documentExtraction && !input2.result.evidenceEvents?.length && !input2.result.completionDeliveryReceipt && !input2.result.completionDeliveryReceipts?.length && !input2.result.executionReceipt?.declaredVerification && !input2.result.executionReceipts?.some((receipt) => receipt.declaredVerification) && (tool?.isReadOnly?.(input2.args) === true || tool?.isObservationOnly?.(input2.args) === true)) {
|
|
411398
|
+
const argumentsSha256 = taskExecutionDigest(input2.args);
|
|
411399
|
+
this._loopDiagnosticObservations.set(input2.toolCallId, {
|
|
411400
|
+
argumentsSha256,
|
|
411401
|
+
toolName: input2.toolName,
|
|
411402
|
+
sourceArtifact: stored.reference,
|
|
411403
|
+
operationKey: taskExecutionDigest({
|
|
411404
|
+
tool: input2.toolName,
|
|
411405
|
+
argumentsSha256,
|
|
411406
|
+
scope: this._sourceBodyProjectionScope(),
|
|
411407
|
+
goal: this._taskState.originalGoal,
|
|
411408
|
+
authority: this._activeTaskScopeBoundary?.authorityMessages,
|
|
411409
|
+
steering: this._activeSteering?.input,
|
|
411410
|
+
stateVersion: this._adversaryStateVersion
|
|
411411
|
+
})
|
|
411412
|
+
});
|
|
411413
|
+
}
|
|
411311
411414
|
const sourceEvidence = input2.toolName === "file_read" ? qualifySourceReadEvidence({ cwd: this._workingDirectory || process.cwd(), args: input2.args, result: input2.result }) : void 0;
|
|
411312
411415
|
if (sourceEvidence) {
|
|
411313
411416
|
const receipt = this._canonicalAcceptedReceipts.get(input2.toolCallId);
|
|
@@ -428237,6 +428340,10 @@ Respond with the assessment and take the selected evidence-backed action.`;
|
|
|
428237
428340
|
this._loopTriage = null;
|
|
428238
428341
|
this._loopTriageActiveKey = null;
|
|
428239
428342
|
this._loopTriageAttempts.clear();
|
|
428343
|
+
this._loopTriageReviewHistory.length = 0;
|
|
428344
|
+
this._loopDiagnosticObservations.clear();
|
|
428345
|
+
this._loopReviewedDiagnosticOperations.clear();
|
|
428346
|
+
this._loopDiagnosticArchiveRefs.clear();
|
|
428240
428347
|
if (this._reviewedInterpretationProjectionBlocked)
|
|
428241
428348
|
this.reconcileReviewedObjectiveInterpretationRevision();
|
|
428242
428349
|
if (this._reviewedInterpretationProjectionBlocked)
|
|
@@ -435031,8 +435138,8 @@ State what you've learned from the errors before trying again.`);
|
|
|
435031
435138
|
if (process.env["OMNIUS_DISABLE_ADAPTIVE_RETRIEVAL"] !== "1") {
|
|
435032
435139
|
const goalForSig = (this._taskState.goal || "").slice(0, 200);
|
|
435033
435140
|
const recentTools = this._toolSequence.slice(-5).join("|");
|
|
435034
|
-
const { createHash:
|
|
435035
|
-
const sig =
|
|
435141
|
+
const { createHash: createHash175 } = await import("node:crypto");
|
|
435142
|
+
const sig = createHash175("sha256").update(`${goalForSig}::${recentTools}`).digest("hex").slice(0, 16);
|
|
435036
435143
|
if (this._lastPprSig === sig && this._lastPprMemoryLines.length > 0) {
|
|
435037
435144
|
compacted.push({
|
|
435038
435145
|
role: "system",
|
|
@@ -435234,9 +435341,8 @@ ${memoryLines.join("\n")}`
|
|
|
435234
435341
|
if (this._toolDefsExposureRevision !== this._toolExposureRevision) {
|
|
435235
435342
|
toolDefs = textToolModeActive ? [] : await this.buildToolDefinitions(turn);
|
|
435236
435343
|
}
|
|
435237
|
-
|
|
435238
|
-
requestMessages2 = withLoopTriageReview(requestMessages2,
|
|
435239
|
-
}
|
|
435344
|
+
for (const review of this._loopTriageReviewHistory)
|
|
435345
|
+
requestMessages2 = withLoopTriageReview(requestMessages2, review.message, review.afterToolCallId);
|
|
435240
435346
|
const chatRequest = {
|
|
435241
435347
|
messages: requestMessages2,
|
|
435242
435348
|
tools: reservedFinalConversationTurn ? [] : toolDefs,
|
|
@@ -436740,7 +436846,7 @@ ${this.options.maxTurns && this.options.maxTurns > 0 ? `You have ${this.options.
|
|
|
436740
436846
|
const insertionIndex = bfRequestMessages[0]?.role === "system" ? 1 : 0;
|
|
436741
436847
|
bfRequestMessages.splice(insertionIndex, 0, ...virtualEvidenceMessages);
|
|
436742
436848
|
}
|
|
436743
|
-
|
|
436849
|
+
let modelFacingMessages = this._prepareModelFacingMessages(bfRequestMessages, turn);
|
|
436744
436850
|
this._injectTaskCloseoutReconciliationContext(modelFacingMessages);
|
|
436745
436851
|
const bfEchoBoostedTemp = this.options.temperature;
|
|
436746
436852
|
this._stripLegacyControlMessages(modelFacingMessages);
|
|
@@ -436768,6 +436874,8 @@ ${this.options.maxTurns && this.options.maxTurns > 0 ? `You have ${this.options.
|
|
|
436768
436874
|
this._refreshSelectedWorkToolExposureRevision();
|
|
436769
436875
|
if (this._featureWorkflowSchemaDirty || this._toolDefsExposureRevision !== this._toolExposureRevision)
|
|
436770
436876
|
toolDefs = textToolModeActive ? [] : await this.buildToolDefinitions(turn);
|
|
436877
|
+
for (const review of this._loopTriageReviewHistory)
|
|
436878
|
+
modelFacingMessages = withLoopTriageReview(modelFacingMessages, review.message, review.afterToolCallId);
|
|
436771
436879
|
const chatRequest = {
|
|
436772
436880
|
messages: modelFacingMessages,
|
|
436773
436881
|
tools: toolDefs,
|
|
@@ -441798,8 +441906,21 @@ ${trimmedNew}`;
|
|
|
441798
441906
|
think: false
|
|
441799
441907
|
}, "model:loop_triage", { turn, requiredForTask: true });
|
|
441800
441908
|
const message3 = loopTriageReviewMessage(String(response?.choices?.[0]?.message?.content ?? ""));
|
|
441801
|
-
if (message3)
|
|
441909
|
+
if (message3) {
|
|
441802
441910
|
this._loopTriage = { key: streak.key, message: message3 };
|
|
441911
|
+
const afterToolCallId = [...messages4].reverse().find((candidate) => candidate.role === "tool")?.tool_call_id;
|
|
441912
|
+
this._loopTriageReviewHistory.push({ message: message3, afterToolCallId });
|
|
441913
|
+
const counts = /* @__PURE__ */ new Map();
|
|
441914
|
+
for (const candidate of messages4)
|
|
441915
|
+
for (const call3 of candidate.role === "assistant" ? candidate.tool_calls ?? [] : []) {
|
|
441916
|
+
const observation = this._loopDiagnosticObservations.get(call3.id);
|
|
441917
|
+
if (observation)
|
|
441918
|
+
counts.set(observation.operationKey, (counts.get(observation.operationKey) ?? 0) + 1);
|
|
441919
|
+
}
|
|
441920
|
+
for (const [operation, count8] of counts)
|
|
441921
|
+
if (count8 >= 3)
|
|
441922
|
+
this._loopReviewedDiagnosticOperations.add(operation);
|
|
441923
|
+
}
|
|
441803
441924
|
this.emit({
|
|
441804
441925
|
type: "status",
|
|
441805
441926
|
visibility: "telemetry",
|
|
@@ -447652,17 +447773,17 @@ var WORKER_PREAMBLE = [
|
|
|
447652
447773
|
// packages/orchestrator/dist/nol/datasets.js
|
|
447653
447774
|
init_dist();
|
|
447654
447775
|
init_dist5();
|
|
447655
|
-
import { createHash as
|
|
447776
|
+
import { createHash as createHash127 } from "node:crypto";
|
|
447656
447777
|
var nolCanonicalJson = canonicalNolJson;
|
|
447657
447778
|
function nolDigest(value) {
|
|
447658
|
-
return
|
|
447779
|
+
return createHash127("sha256").update(nolCanonicalJson(value)).digest("hex");
|
|
447659
447780
|
}
|
|
447660
447781
|
|
|
447661
447782
|
// packages/orchestrator/dist/nol/evaluation.js
|
|
447662
447783
|
var import_ajv = __toESM(require_ajv(), 1);
|
|
447663
447784
|
var import__ = __toESM(require__(), 1);
|
|
447664
447785
|
var import_formats = __toESM(require_formats(), 1);
|
|
447665
|
-
import { createHash as
|
|
447786
|
+
import { createHash as createHash128 } from "node:crypto";
|
|
447666
447787
|
import { readFileSync as readFileSync67 } from "node:fs";
|
|
447667
447788
|
import { createRequire as createRequire3 } from "node:module";
|
|
447668
447789
|
import { fileURLToPath as fileURLToPath8 } from "node:url";
|
|
@@ -447775,7 +447896,7 @@ function createNolJsonSchemaValidator(schema, options = {}) {
|
|
|
447775
447896
|
const compiled = engine.compile(frozenSchema);
|
|
447776
447897
|
if ("$async" in compiled && compiled.$async)
|
|
447777
447898
|
throw new Error("nol_async_schema_forbidden");
|
|
447778
|
-
const bytesDigest = (path13) =>
|
|
447899
|
+
const bytesDigest = (path13) => createHash128("sha256").update(readFileSync67(path13)).digest("hex");
|
|
447779
447900
|
const implementationDigest = nolDigest({
|
|
447780
447901
|
implementation: "omnius.nol.ajv-frozen.v1",
|
|
447781
447902
|
draft,
|
|
@@ -448346,7 +448467,7 @@ function statisticalTrialFromResult(input2) {
|
|
|
448346
448467
|
// packages/orchestrator/dist/nol/coordinator.js
|
|
448347
448468
|
init_dist();
|
|
448348
448469
|
init_dist5();
|
|
448349
|
-
import { createHash as
|
|
448470
|
+
import { createHash as createHash129, randomUUID as randomUUID57 } from "node:crypto";
|
|
448350
448471
|
var NolComputeTrialError = class extends Error {
|
|
448351
448472
|
facts;
|
|
448352
448473
|
constructor(message3, facts) {
|
|
@@ -448507,7 +448628,7 @@ var NolCoordinator = class {
|
|
|
448507
448628
|
context.assertCurrent();
|
|
448508
448629
|
if (bytes5.byteLength > experiment.budgets.maxArtifactBytes)
|
|
448509
448630
|
throw new NolCoordinatorBudgetError("NOL artifact exceeds its aggregate byte budget");
|
|
448510
|
-
const immutable2 = Buffer.from(bytes5), sha25611 =
|
|
448631
|
+
const immutable2 = Buffer.from(bytes5), sha25611 = createHash129("sha256").update(immutable2).digest("hex");
|
|
448511
448632
|
const ref11 = NolArtifactRefSchema.parse({
|
|
448512
448633
|
uri: `omnius-artifact://sha256/${sha25611}`,
|
|
448513
448634
|
sha256: sha25611,
|
|
@@ -450529,7 +450650,7 @@ async function runNolDiscovery(input2) {
|
|
|
450529
450650
|
// packages/orchestrator/dist/nol/model-validation.js
|
|
450530
450651
|
init_dist();
|
|
450531
450652
|
init_dist5();
|
|
450532
|
-
import { createHash as
|
|
450653
|
+
import { createHash as createHash130, randomUUID as randomUUID58 } from "node:crypto";
|
|
450533
450654
|
var NOL_MODEL_VALIDATION_KIND = "nol_model_validation";
|
|
450534
450655
|
function fail5(ok2, message3) {
|
|
450535
450656
|
if (!ok2)
|
|
@@ -450620,7 +450741,7 @@ var Inputs = class {
|
|
|
450620
450741
|
await this.verify(ref11);
|
|
450621
450742
|
const bytes5 = await this.artifacts.readBytes(ref11, this.signal);
|
|
450622
450743
|
this.signal.throwIfAborted();
|
|
450623
|
-
fail5(bytes5.byteLength === ref11.sizeBytes && bytes5.byteLength <= this.limits.maxMetadataBytes &&
|
|
450744
|
+
fail5(bytes5.byteLength === ref11.sizeBytes && bytes5.byteLength <= this.limits.maxMetadataBytes && createHash130("sha256").update(bytes5).digest("hex") === ref11.sha256, "Metadata byte extent/hash mismatch");
|
|
450624
450745
|
const value = JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode(bytes5));
|
|
450625
450746
|
canonicalNolJson(value);
|
|
450626
450747
|
return value;
|
|
@@ -450973,7 +451094,7 @@ var NolModelValidationService = class {
|
|
|
450973
451094
|
active.controller.signal.throwIfAborted();
|
|
450974
451095
|
this.options.store.assertCurrent(active.lease);
|
|
450975
451096
|
}
|
|
450976
|
-
const sha25611 =
|
|
451097
|
+
const sha25611 = createHash130("sha256").update(bytes5).digest("hex");
|
|
450977
451098
|
const ref11 = NolArtifactRefSchema.parse({
|
|
450978
451099
|
uri: `omnius-artifact://sha256/${sha25611}`,
|
|
450979
451100
|
sha256: sha25611,
|
|
@@ -451515,7 +451636,7 @@ var NolModelValidationService = class {
|
|
|
451515
451636
|
// packages/orchestrator/dist/nol/variant-registry.js
|
|
451516
451637
|
init_dist();
|
|
451517
451638
|
init_dist5();
|
|
451518
|
-
import { createHash as
|
|
451639
|
+
import { createHash as createHash131, randomUUID as randomUUID59 } from "node:crypto";
|
|
451519
451640
|
var contexts = /* @__PURE__ */ new WeakMap();
|
|
451520
451641
|
var modelContexts = /* @__PURE__ */ new WeakMap();
|
|
451521
451642
|
var clone6 = (value) => JSON.parse(canonicalNolJson(value));
|
|
@@ -451823,7 +451944,7 @@ var Verification = class {
|
|
|
451823
451944
|
await this.verify(ref11);
|
|
451824
451945
|
const bytes5 = await bounded3(this.artifacts.readBytes(ref11, this.signal), this.signal);
|
|
451825
451946
|
this.signal.throwIfAborted();
|
|
451826
|
-
if (bytes5.byteLength !== ref11.sizeBytes || bytes5.byteLength > this.limits.maxMetadataBytes ||
|
|
451947
|
+
if (bytes5.byteLength !== ref11.sizeBytes || bytes5.byteLength > this.limits.maxMetadataBytes || createHash131("sha256").update(bytes5).digest("hex") !== ref11.sha256)
|
|
451827
451948
|
throw new Error("Metadata read extent/hash mismatch");
|
|
451828
451949
|
return JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode(bytes5));
|
|
451829
451950
|
}
|
|
@@ -454336,8 +454457,8 @@ function adaptExecutionTool(tool, options = {}) {
|
|
|
454336
454457
|
|
|
454337
454458
|
// packages/cli/src/computer-use/configured-planner.ts
|
|
454338
454459
|
init_dist5();
|
|
454339
|
-
import { createHash as
|
|
454340
|
-
var sha25610 = (text18) =>
|
|
454460
|
+
import { createHash as createHash132, randomUUID as randomUUID60 } from "node:crypto";
|
|
454461
|
+
var sha25610 = (text18) => createHash132("sha256").update(text18).digest("hex");
|
|
454341
454462
|
function createHostUiPlannerResponseSchema(grants) {
|
|
454342
454463
|
if (!grants?.length) return structuredClone(UI_PLAN_RESPONSE_SCHEMA);
|
|
454343
454464
|
const steps = structuredClone(grants);
|
|
@@ -454769,8 +454890,8 @@ var RunnerUiPort = class {
|
|
|
454769
454890
|
|
|
454770
454891
|
// packages/cli/src/computer-use/configured-point.ts
|
|
454771
454892
|
init_dist5();
|
|
454772
|
-
import { createHash as
|
|
454773
|
-
var hash20 = (value) =>
|
|
454893
|
+
import { createHash as createHash133, randomUUID as randomUUID61 } from "node:crypto";
|
|
454894
|
+
var hash20 = (value) => createHash133("sha256").update(value).digest("hex");
|
|
454774
454895
|
var PNG2 = Buffer.from([137, 80, 78, 71, 13, 10, 26, 10]);
|
|
454775
454896
|
function createConfiguredUiPoint(profile3, options) {
|
|
454776
454897
|
const pinned = structuredClone(profile3), url = new URL(pinned.endpoint);
|
|
@@ -455204,12 +455325,12 @@ async function runConfiguredHostUiSession(input2, options) {
|
|
|
455204
455325
|
|
|
455205
455326
|
// packages/cli/src/nol/facade.ts
|
|
455206
455327
|
import { isAbsolute as isAbsolute39, resolve as resolve51 } from "node:path";
|
|
455207
|
-
import { createHash as
|
|
455328
|
+
import { createHash as createHash145 } from "node:crypto";
|
|
455208
455329
|
|
|
455209
455330
|
// packages/cli/src/nol/gne-profile.ts
|
|
455210
455331
|
init_dist();
|
|
455211
455332
|
init_dist5();
|
|
455212
|
-
import { createHash as
|
|
455333
|
+
import { createHash as createHash136, randomUUID as randomUUID65 } from "node:crypto";
|
|
455213
455334
|
import { realpathSync as realpathSync19, statSync as statSync35 } from "node:fs";
|
|
455214
455335
|
import { lstat as lstat11, mkdir as mkdir9, realpath as realpath11 } from "node:fs/promises";
|
|
455215
455336
|
import { dirname as dirname46, isAbsolute as isAbsolute33, join as join80, relative as relative25, resolve as resolve48 } from "node:path";
|
|
@@ -455335,7 +455456,7 @@ import { connect } from "node:net";
|
|
|
455335
455456
|
// packages/cli/src/nol/cuda-mutations.ts
|
|
455336
455457
|
init_dist();
|
|
455337
455458
|
import {
|
|
455338
|
-
createHash as
|
|
455459
|
+
createHash as createHash134,
|
|
455339
455460
|
createHmac as createHmac2,
|
|
455340
455461
|
randomBytes as randomBytes9,
|
|
455341
455462
|
randomUUID as randomUUID63,
|
|
@@ -455361,7 +455482,7 @@ var uid = () => process.getuid?.();
|
|
|
455361
455482
|
var nofollow = constants14.O_NOFOLLOW ?? 0;
|
|
455362
455483
|
var tickets = /* @__PURE__ */ new WeakMap();
|
|
455363
455484
|
var missing = (error) => error?.code === "ENOENT";
|
|
455364
|
-
var hash21 = (value) =>
|
|
455485
|
+
var hash21 = (value) => createHash134("sha256").update(canonicalNolJson(value)).digest("hex");
|
|
455365
455486
|
function requestCopy(value) {
|
|
455366
455487
|
if (!value || typeof value.ownerId !== "string" || !value.ownerId || value.ownerId.length > 200 || value.ownerId !== value.ownerId.trim() || /[\x00-\x1f\x7f]/.test(value.ownerId) || typeof value.modelId !== "string" || !value.modelId || value.modelId.length > 1024 || value.modelId !== value.modelId.trim() || /[\x00-\x1f\x7f]/.test(value.modelId) || !UUID.test(value.gpuUuid) || !Number.isSafeInteger(value.requestedMiB) || value.requestedMiB <= 0 || !Number.isSafeInteger(value.expectedDurationSeconds) || value.expectedDurationSeconds <= 0)
|
|
455367
455488
|
throw new Error("Invalid private CUDA mutation identity");
|
|
@@ -456666,7 +456787,7 @@ function integer15(value, label, min = 0, max = Number.MAX_SAFE_INTEGER) {
|
|
|
456666
456787
|
throw new Error(`Invalid GNE profile ${label}`);
|
|
456667
456788
|
return value;
|
|
456668
456789
|
}
|
|
456669
|
-
var projectIdentity = (root) =>
|
|
456790
|
+
var projectIdentity = (root) => createHash136("sha256").update(root).digest("hex");
|
|
456670
456791
|
function snapshotExecution(options) {
|
|
456671
456792
|
const {
|
|
456672
456793
|
pythonPath,
|
|
@@ -456886,7 +457007,7 @@ async function bytes4(artifacts, ref11, maximum, signal) {
|
|
|
456886
457007
|
throw new Error("GNE profile artifact exceeds frozen input bound");
|
|
456887
457008
|
const value = await artifacts.readBytes(ref11, signal);
|
|
456888
457009
|
signal?.throwIfAborted();
|
|
456889
|
-
if (value.byteLength !== ref11.sizeBytes ||
|
|
457010
|
+
if (value.byteLength !== ref11.sizeBytes || createHash136("sha256").update(value).digest("hex") !== ref11.sha256)
|
|
456890
457011
|
throw new Error("GNE profile artifact hash/size changed");
|
|
456891
457012
|
return value;
|
|
456892
457013
|
}
|
|
@@ -457029,7 +457150,7 @@ var NolGneProfileService = class {
|
|
|
457029
457150
|
async publish(active, value, mediaType = "application/json", cleanup = false) {
|
|
457030
457151
|
if (!cleanup) this.current(active);
|
|
457031
457152
|
const data = value instanceof Uint8Array ? value : Buffer.from(canonicalNolJson(value));
|
|
457032
|
-
const digest19 =
|
|
457153
|
+
const digest19 = createHash136("sha256").update(data).digest("hex"), ref11 = {
|
|
457033
457154
|
uri: `omnius-artifact://sha256/${digest19}`,
|
|
457034
457155
|
sha256: digest19,
|
|
457035
457156
|
sizeBytes: data.byteLength,
|
|
@@ -458055,7 +458176,7 @@ init_dist();
|
|
|
458055
458176
|
// packages/cli/src/nol/export-service.ts
|
|
458056
458177
|
init_dist();
|
|
458057
458178
|
init_dist5();
|
|
458058
|
-
import { createHash as
|
|
458179
|
+
import { createHash as createHash137, randomUUID as randomUUID66 } from "node:crypto";
|
|
458059
458180
|
import { lstatSync as lstatSync11, realpathSync as realpathSync20, statfsSync as statfsSync5 } from "node:fs";
|
|
458060
458181
|
import { lstat as lstat12, mkdir as mkdir10, mkdtemp as mkdtemp7, readdir as readdir5, realpath as realpath12 } from "node:fs/promises";
|
|
458061
458182
|
import { isAbsolute as isAbsolute34, join as join81, relative as relative26, resolve as resolve49 } from "node:path";
|
|
@@ -458117,7 +458238,7 @@ var NolExportService = class {
|
|
|
458117
458238
|
if (!options.ownerId.trim() || options.ownerId.length > 192)
|
|
458118
458239
|
throw new Error("Export host owner required");
|
|
458119
458240
|
this.ownerId = `${options.ownerId}:${randomUUID66()}`;
|
|
458120
|
-
this.projectId =
|
|
458241
|
+
this.projectId = createHash137("sha256").update(this.root).digest("hex");
|
|
458121
458242
|
if (!/^[A-Za-z0-9][A-Za-z0-9_.-]{0,95}$/.test(options.id))
|
|
458122
458243
|
throw new Error("Export configuration ID required");
|
|
458123
458244
|
this.scopeId = nolJsonDigest({
|
|
@@ -458862,7 +458983,7 @@ init_dist5();
|
|
|
458862
458983
|
// packages/cli/src/nol/neuronary-catalog.ts
|
|
458863
458984
|
init_dist();
|
|
458864
458985
|
init_dist5();
|
|
458865
|
-
import { createHash as
|
|
458986
|
+
import { createHash as createHash138, randomUUID as randomUUID67 } from "node:crypto";
|
|
458866
458987
|
import { realpathSync as realpathSync21, statSync as statSync36 } from "node:fs";
|
|
458867
458988
|
import { isAbsolute as isAbsolute35 } from "node:path";
|
|
458868
458989
|
import { z as z30 } from "zod";
|
|
@@ -458946,7 +459067,7 @@ var LIMITATIONS = Object.freeze([
|
|
|
458946
459067
|
"Checkpoint/site mapping and required calibration need independent host verification.",
|
|
458947
459068
|
"Import grants no execution, scientific validation, promotion or activation authority."
|
|
458948
459069
|
]);
|
|
458949
|
-
var hashBytes = (bytes5) =>
|
|
459070
|
+
var hashBytes = (bytes5) => createHash138("sha256").update(bytes5).digest("hex");
|
|
458950
459071
|
var clone9 = (value) => JSON.parse(canonicalNolJson(value));
|
|
458951
459072
|
var same14 = (left, right) => canonicalNolJson(left) === canonicalNolJson(right);
|
|
458952
459073
|
function freeze7(value) {
|
|
@@ -459560,14 +459681,14 @@ import { z as z34 } from "zod";
|
|
|
459560
459681
|
// packages/cli/src/nol/vllm-profile.ts
|
|
459561
459682
|
init_dist();
|
|
459562
459683
|
init_dist5();
|
|
459563
|
-
import { createHash as
|
|
459684
|
+
import { createHash as createHash144, randomUUID as randomUUID69 } from "node:crypto";
|
|
459564
459685
|
import { realpathSync as realpathSync23 } from "node:fs";
|
|
459565
459686
|
import { mkdir as mkdir11, statfs, lstat as lstat13 } from "node:fs/promises";
|
|
459566
459687
|
import { isAbsolute as isAbsolute38, join as join85, resolve as resolve50 } from "node:path";
|
|
459567
459688
|
import { z as z33 } from "zod";
|
|
459568
459689
|
|
|
459569
459690
|
// packages/cli/src/nol/vllm-adapter.ts
|
|
459570
|
-
import { createHash as
|
|
459691
|
+
import { createHash as createHash141 } from "node:crypto";
|
|
459571
459692
|
import { isAbsolute as isAbsolute37, join as join83 } from "node:path";
|
|
459572
459693
|
init_dist();
|
|
459573
459694
|
init_dist5();
|
|
@@ -459575,7 +459696,7 @@ init_dist5();
|
|
|
459575
459696
|
// packages/cli/src/nol/vllm-startup.ts
|
|
459576
459697
|
init_dist();
|
|
459577
459698
|
init_dist5();
|
|
459578
|
-
import { createHash as
|
|
459699
|
+
import { createHash as createHash140, randomUUID as randomUUID68 } from "node:crypto";
|
|
459579
459700
|
import { spawn as spawn8 } from "node:child_process";
|
|
459580
459701
|
import { constants as constants17 } from "node:fs";
|
|
459581
459702
|
import { open as open11 } from "node:fs/promises";
|
|
@@ -459584,7 +459705,7 @@ import { isAbsolute as isAbsolute36, join as join82, dirname as dirname47 } from
|
|
|
459584
459705
|
// packages/cli/src/nol/vllm-protocol.ts
|
|
459585
459706
|
init_dist();
|
|
459586
459707
|
init_dist5();
|
|
459587
|
-
import { createHash as
|
|
459708
|
+
import { createHash as createHash139 } from "node:crypto";
|
|
459588
459709
|
import { openSync as openSync25, closeSync as closeSync25, fstatSync as fstatSync8, readSync as readSync6, constants as constants16 } from "node:fs";
|
|
459589
459710
|
import { fileURLToPath as fileURLToPath9 } from "node:url";
|
|
459590
459711
|
import { z as z31 } from "zod";
|
|
@@ -459612,7 +459733,7 @@ function nolVllmModuleDigest(url) {
|
|
|
459612
459733
|
count8 === before.size && before.dev === after.dev && before.ino === after.ino && before.size === after.size && before.mtimeMs === after.mtimeMs && before.ctimeMs === after.ctimeMs,
|
|
459613
459734
|
"host code changed during inventory"
|
|
459614
459735
|
);
|
|
459615
|
-
return
|
|
459736
|
+
return createHash139("sha256").update(bytes5.subarray(0, count8)).digest("hex");
|
|
459616
459737
|
} finally {
|
|
459617
459738
|
closeSync25(fd);
|
|
459618
459739
|
}
|
|
@@ -459635,7 +459756,7 @@ var bound = (n) => count5.max(n);
|
|
|
459635
459756
|
function need5(v, m) {
|
|
459636
459757
|
if (!v) throw Error(`NOL vLLM protocol: ${m}`);
|
|
459637
459758
|
}
|
|
459638
|
-
var hash23 = (v) =>
|
|
459759
|
+
var hash23 = (v) => createHash139("sha256").update(v).digest("hex");
|
|
459639
459760
|
var same15 = (a, b, m) => need5(canonicalNolJson(a) === canonicalNolJson(b), m);
|
|
459640
459761
|
var NolVllmSourceSchema = z31.object({ workerSha256: sha28, companionSha256: sha28, runtimeSha256: sha28 }).strict();
|
|
459641
459762
|
var NolVllmRuntimeLimitsSchema = z31.object({
|
|
@@ -460089,7 +460210,7 @@ var integer16 = (value, low, high) => {
|
|
|
460089
460210
|
};
|
|
460090
460211
|
var same16 = (a, b) => canonicalNolJson(a) === canonicalNolJson(b);
|
|
460091
460212
|
var clone10 = (value) => JSON.parse(canonicalNolJson(value));
|
|
460092
|
-
var digest12 = (value) =>
|
|
460213
|
+
var digest12 = (value) => createHash140("sha256").update(canonicalNolJson(value)).digest("hex");
|
|
460093
460214
|
var RUNTIME_ENVIRONMENT_KEYS = /* @__PURE__ */ new Set([
|
|
460094
460215
|
"PATH",
|
|
460095
460216
|
"HOME",
|
|
@@ -460527,7 +460648,7 @@ async function filePin(path13, expected) {
|
|
|
460527
460648
|
}
|
|
460528
460649
|
const after = await file.stat();
|
|
460529
460650
|
need6(
|
|
460530
|
-
length <= 1048576 && before.size === after.size && before.mtimeMs === after.mtimeMs && before.ctimeMs === after.ctimeMs &&
|
|
460651
|
+
length <= 1048576 && before.size === after.size && before.mtimeMs === after.mtimeMs && before.ctimeMs === after.ctimeMs && createHash140("sha256").update(bytes5.subarray(0, length)).digest("hex") === expected,
|
|
460531
460652
|
"source identity changed"
|
|
460532
460653
|
);
|
|
460533
460654
|
} finally {
|
|
@@ -461060,7 +461181,7 @@ function need7(v, m) {
|
|
|
461060
461181
|
}
|
|
461061
461182
|
var copy3 = (v) => JSON.parse(canonicalNolJson(v));
|
|
461062
461183
|
var same17 = (a, b, m) => need7(canonicalNolJson(a) === canonicalNolJson(b), m);
|
|
461063
|
-
var hash24 = (v) =>
|
|
461184
|
+
var hash24 = (v) => createHash141("sha256").update(v).digest("hex");
|
|
461064
461185
|
function current2(c) {
|
|
461065
461186
|
c.signal.throwIfAborted();
|
|
461066
461187
|
c.assertCurrent();
|
|
@@ -461633,7 +461754,7 @@ function prepareNolVllmRawControls(recipe, model3, seeds, evidence) {
|
|
|
461633
461754
|
let neuron, word;
|
|
461634
461755
|
do {
|
|
461635
461756
|
need7(counter < 1e4, "bounded random coordinate search exhausted");
|
|
461636
|
-
const bytes5 =
|
|
461757
|
+
const bytes5 = createHash141("sha256").update(
|
|
461637
461758
|
canonicalNolJson({
|
|
461638
461759
|
schema: "omnius.nol.vllm-control-rng.v1",
|
|
461639
461760
|
seed,
|
|
@@ -461645,7 +461766,7 @@ function prepareNolVllmRawControls(recipe, model3, seeds, evidence) {
|
|
|
461645
461766
|
neuron = word % site.width;
|
|
461646
461767
|
} while (word >= Math.floor(4294967296 / site.width) * site.width || taken.has(neuron));
|
|
461647
461768
|
taken.add(neuron);
|
|
461648
|
-
const sign =
|
|
461769
|
+
const sign = createHash141("sha256").update(
|
|
461649
461770
|
canonicalNolJson({
|
|
461650
461771
|
seed,
|
|
461651
461772
|
neuron,
|
|
@@ -462105,7 +462226,7 @@ var NolVllmAdapter = class {
|
|
|
462105
462226
|
|
|
462106
462227
|
// packages/cli/src/nol/vllm-conformance.ts
|
|
462107
462228
|
init_dist();
|
|
462108
|
-
import { createHash as
|
|
462229
|
+
import { createHash as createHash142 } from "node:crypto";
|
|
462109
462230
|
import { z as z32 } from "zod";
|
|
462110
462231
|
var nolVllmConformanceDigest = nolVllmModulePin(import.meta.url);
|
|
462111
462232
|
var NOL_VLLM_CAPTURE_MAGIC = Buffer.from("NOLVLC01");
|
|
@@ -462143,7 +462264,7 @@ var headerSchema = z32.object({
|
|
|
462143
462264
|
function need8(value, message3) {
|
|
462144
462265
|
if (!value) throw new Error(`NOL vLLM capture: ${message3}`);
|
|
462145
462266
|
}
|
|
462146
|
-
var hash25 = (value) =>
|
|
462267
|
+
var hash25 = (value) => createHash142("sha256").update(value).digest("hex");
|
|
462147
462268
|
var same18 = (a, b, message3) => need8(canonicalNolJson(a) === canonicalNolJson(b), message3);
|
|
462148
462269
|
function norm2(values) {
|
|
462149
462270
|
let scale = 0, sum2 = 0;
|
|
@@ -462365,10 +462486,10 @@ import {
|
|
|
462365
462486
|
realpathSync as realpathSync22
|
|
462366
462487
|
} from "node:fs";
|
|
462367
462488
|
import { join as join84 } from "node:path";
|
|
462368
|
-
import { createHash as
|
|
462489
|
+
import { createHash as createHash143 } from "node:crypto";
|
|
462369
462490
|
var nolVllmCustodyDigest = nolVllmModulePin(import.meta.url);
|
|
462370
462491
|
var zero = "0".repeat(64);
|
|
462371
|
-
var digest13 = (v) =>
|
|
462492
|
+
var digest13 = (v) => createHash143("sha256").update(canonicalNolJson(v)).digest("hex");
|
|
462372
462493
|
function need9(v, m) {
|
|
462373
462494
|
if (!v) throw new Error(`NOL vLLM private custody: ${m}`);
|
|
462374
462495
|
}
|
|
@@ -462813,7 +462934,7 @@ function need10(value, message3) {
|
|
|
462813
462934
|
}
|
|
462814
462935
|
var copy4 = (v) => JSON.parse(canonicalNolJson(v));
|
|
462815
462936
|
var same20 = (a, b) => canonicalNolJson(a) === canonicalNolJson(b);
|
|
462816
|
-
var hash26 = (v) =>
|
|
462937
|
+
var hash26 = (v) => createHash144("sha256").update(v).digest("hex");
|
|
462817
462938
|
function guard2(context) {
|
|
462818
462939
|
context.signal?.throwIfAborted();
|
|
462819
462940
|
need10(
|
|
@@ -462906,7 +463027,7 @@ var NolVllmProfileService = class {
|
|
|
462906
463027
|
projectRoot: realpathSync23.native(options.projectRoot),
|
|
462907
463028
|
workRoot: realpathSync23.native(options.workRoot)
|
|
462908
463029
|
};
|
|
462909
|
-
this.projectId =
|
|
463030
|
+
this.projectId = createHash144("sha256").update(this.options.projectRoot).digest("hex");
|
|
462910
463031
|
this.implementationDigest = this.hostImplementation();
|
|
462911
463032
|
const scope2 = {
|
|
462912
463033
|
schema: "omnius.nol.vllm-profile-scope.v1",
|
|
@@ -464759,7 +464880,7 @@ var NolFacade = class {
|
|
|
464759
464880
|
}
|
|
464760
464881
|
conformanceJob(jobId3) {
|
|
464761
464882
|
const job2 = this.options.store.getJob(jobId3);
|
|
464762
|
-
if (!job2 || job2.kind !== NOL_GNE_PROFILE_KIND || !job2.payload || typeof job2.payload !== "object" || job2.payload.projectId !==
|
|
464883
|
+
if (!job2 || job2.kind !== NOL_GNE_PROFILE_KIND || !job2.payload || typeof job2.payload !== "object" || job2.payload.projectId !== createHash145("sha256").update(this.projectRoot).digest("hex"))
|
|
464763
464884
|
throw new NolFacadeError(
|
|
464764
464885
|
"job_not_found",
|
|
464765
464886
|
404,
|
|
@@ -465156,11 +465277,11 @@ var NolFacade = class {
|
|
|
465156
465277
|
|
|
465157
465278
|
// packages/cli/src/nol/sqlite-store.ts
|
|
465158
465279
|
init_dist();
|
|
465159
|
-
import { createHash as
|
|
465280
|
+
import { createHash as createHash146, randomUUID as randomUUID70 } from "node:crypto";
|
|
465160
465281
|
import { mkdirSync as mkdirSync45 } from "node:fs";
|
|
465161
465282
|
import { createRequire as createRequire5 } from "node:module";
|
|
465162
465283
|
import { dirname as dirname48 } from "node:path";
|
|
465163
|
-
var hash27 = (value) =>
|
|
465284
|
+
var hash27 = (value) => createHash146("sha256").update(value).digest("hex");
|
|
465164
465285
|
var MAX_METADATA_BYTES = 16 * 1024 * 1024;
|
|
465165
465286
|
var MAX_VERIFIED_JOB_BYTES = 8 * 1024 * 1024;
|
|
465166
465287
|
function json6(value) {
|
|
@@ -466016,7 +466137,7 @@ function nolHostPerformance(input2) {
|
|
|
466016
466137
|
// packages/cli/src/nol/transformers-adapter.ts
|
|
466017
466138
|
init_dist();
|
|
466018
466139
|
init_dist5();
|
|
466019
|
-
import { createHash as
|
|
466140
|
+
import { createHash as createHash147 } from "node:crypto";
|
|
466020
466141
|
import { isAbsolute as isAbsolute40 } from "node:path";
|
|
466021
466142
|
var VERSION3 = "omnius.nol.transformers.v1";
|
|
466022
466143
|
var ZERO3 = "0".repeat(64);
|
|
@@ -466073,7 +466194,7 @@ function ids2(value, label, maximum) {
|
|
|
466073
466194
|
return value.map((id8) => integer20(id8, label, 0, 4294967295));
|
|
466074
466195
|
}
|
|
466075
466196
|
function hash28(bytes5) {
|
|
466076
|
-
return
|
|
466197
|
+
return createHash147("sha256").update(bytes5).digest("hex");
|
|
466077
466198
|
}
|
|
466078
466199
|
async function driverVersion2(gpuUuid) {
|
|
466079
466200
|
const result = await execFileText4(
|
|
@@ -466867,7 +466988,7 @@ init_dist();
|
|
|
466867
466988
|
init_dist5();
|
|
466868
466989
|
init_dist();
|
|
466869
466990
|
init_dist5();
|
|
466870
|
-
import { createHash as
|
|
466991
|
+
import { createHash as createHash148 } from "node:crypto";
|
|
466871
466992
|
import { mkdir as mkdir12, mkdtemp as mkdtemp8, rm as rm6 } from "node:fs/promises";
|
|
466872
466993
|
import { isAbsolute as isAbsolute41, join as join86 } from "node:path";
|
|
466873
466994
|
var ZERO4 = "0".repeat(64);
|
|
@@ -467135,7 +467256,7 @@ function object21(value, label) {
|
|
|
467135
467256
|
return value;
|
|
467136
467257
|
}
|
|
467137
467258
|
var clone12 = (value) => JSON.parse(canonicalNolJson(value));
|
|
467138
|
-
var hash29 = (bytes5) =>
|
|
467259
|
+
var hash29 = (bytes5) => createHash148("sha256").update(bytes5).digest("hex");
|
|
467139
467260
|
function current4(context) {
|
|
467140
467261
|
context.signal.throwIfAborted();
|
|
467141
467262
|
context.assertCurrent();
|
|
@@ -468213,7 +468334,7 @@ function inputIdentity2(input2) {
|
|
|
468213
468334
|
// packages/cli/src/nol/runtime.ts
|
|
468214
468335
|
init_dist();
|
|
468215
468336
|
init_dist5();
|
|
468216
|
-
import { createHash as
|
|
468337
|
+
import { createHash as createHash169 } from "node:crypto";
|
|
468217
468338
|
import {
|
|
468218
468339
|
constants as constants29,
|
|
468219
468340
|
mkdirSync as mkdirSync49,
|
|
@@ -468368,14 +468489,14 @@ import { randomUUID as randomUUID71 } from "node:crypto";
|
|
|
468368
468489
|
// packages/cli/src/nol/vllm-authority.ts
|
|
468369
468490
|
init_dist();
|
|
468370
468491
|
init_dist5();
|
|
468371
|
-
import { createHash as
|
|
468492
|
+
import { createHash as createHash149 } from "node:crypto";
|
|
468372
468493
|
import { spawn as spawn9 } from "node:child_process";
|
|
468373
468494
|
import { constants as constants19 } from "node:fs";
|
|
468374
468495
|
import { open as open12, mkdir as mkdir13, lstat as lstat14 } from "node:fs/promises";
|
|
468375
468496
|
import { dirname as dirname50, join as join88, relative as relative28, isAbsolute as isAbsolute43 } from "node:path";
|
|
468376
468497
|
var implementation = nolVllmModulePin(import.meta.url);
|
|
468377
468498
|
var DECODER_SHA = "213d71cf6eefcea061b28b656cf8a08af60c9f3513403e724b16876995f3de93";
|
|
468378
|
-
var hash30 = (v) =>
|
|
468499
|
+
var hash30 = (v) => createHash149("sha256").update(v).digest("hex");
|
|
468379
468500
|
function need11(value, reason) {
|
|
468380
468501
|
if (!value) throw Error(`NOL vLLM authority: ${reason}`);
|
|
468381
468502
|
}
|
|
@@ -469435,7 +469556,7 @@ var NolCpuReaderSourceGuard = class _NolCpuReaderSourceGuard {
|
|
|
469435
469556
|
|
|
469436
469557
|
// packages/cli/src/nol/gguf-cpu-control-reader-profile.ts
|
|
469437
469558
|
init_dist5();
|
|
469438
|
-
import { createHash as
|
|
469559
|
+
import { createHash as createHash150 } from "node:crypto";
|
|
469439
469560
|
import { constants as constants21, lstatSync as lstatSync14, realpathSync as realpathSync27 } from "node:fs";
|
|
469440
469561
|
import { lstat as lstat16, opendir as opendir5, realpath as realpath14, open as open14 } from "node:fs/promises";
|
|
469441
469562
|
import { dirname as dirname53, isAbsolute as isAbsolute46, join as join92, relative as relative30 } from "node:path";
|
|
@@ -469568,7 +469689,7 @@ var NolGgufCpuReaderSourceGuard = class _NolGgufCpuReaderSourceGuard {
|
|
|
469568
469689
|
const environmentRoot = dirname53(dirname53(profile3.reader.pythonPath));
|
|
469569
469690
|
const environmentConfig = join92(environmentRoot, "pyvenv.cfg");
|
|
469570
469691
|
const configFile = await frozenText2(environmentConfig, 65536);
|
|
469571
|
-
const configHash =
|
|
469692
|
+
const configHash = createHash150("sha256").update(configFile.text).digest("hex");
|
|
469572
469693
|
need14(
|
|
469573
469694
|
configHash === profile3.reader.runtime.pythonEnvironment.venvConfig.sha256 && Buffer.byteLength(configFile.text) === profile3.reader.runtime.pythonEnvironment.venvConfig.sizeBytes,
|
|
469574
469695
|
"exact isolated venv configuration changed"
|
|
@@ -469582,7 +469703,7 @@ var NolGgufCpuReaderSourceGuard = class _NolGgufCpuReaderSourceGuard {
|
|
|
469582
469703
|
"site-packages"
|
|
469583
469704
|
);
|
|
469584
469705
|
need14(
|
|
469585
|
-
await realpath14(site) === site &&
|
|
469706
|
+
await realpath14(site) === site && createHash150("sha256").update(site).digest("hex") === profile3.reader.runtime.pythonEnvironment.sitePackagesPathDigest && profile3.runtimeRoots.some((root) => {
|
|
469586
469707
|
const part = relative30(root, site);
|
|
469587
469708
|
return part === "" || !isAbsolute46(part) && part !== ".." && !part.startsWith("../");
|
|
469588
469709
|
}),
|
|
@@ -469745,7 +469866,7 @@ import { z as z42 } from "zod";
|
|
|
469745
469866
|
// packages/cli/src/nol/peft-model-authority.ts
|
|
469746
469867
|
init_dist();
|
|
469747
469868
|
init_dist5();
|
|
469748
|
-
import { createHash as
|
|
469869
|
+
import { createHash as createHash155, randomUUID as randomUUID74 } from "node:crypto";
|
|
469749
469870
|
import { lstatSync as lstatSync17, realpathSync as realpathSync30 } from "node:fs";
|
|
469750
469871
|
import { mkdir as mkdir15, lstat as lstat19, readFile as readFile6 } from "node:fs/promises";
|
|
469751
469872
|
import { fileURLToPath as fileURLToPath11 } from "node:url";
|
|
@@ -469755,7 +469876,7 @@ import { z as z41 } from "zod";
|
|
|
469755
469876
|
// packages/cli/src/nol/peft-profile.ts
|
|
469756
469877
|
init_dist();
|
|
469757
469878
|
init_dist5();
|
|
469758
|
-
import { createHash as
|
|
469879
|
+
import { createHash as createHash152, randomUUID as randomUUID73 } from "node:crypto";
|
|
469759
469880
|
import { lstat as lstat17, realpath as realpath15 } from "node:fs/promises";
|
|
469760
469881
|
import { fileURLToPath as fileURLToPath10 } from "node:url";
|
|
469761
469882
|
import { isAbsolute as isAbsolute48, relative as relative31, resolve as resolve54 } from "node:path";
|
|
@@ -469768,7 +469889,7 @@ import { isAbsolute as isAbsolute47 } from "node:path";
|
|
|
469768
469889
|
// packages/cli/src/nol/peft-conformance.ts
|
|
469769
469890
|
init_dist();
|
|
469770
469891
|
init_dist5();
|
|
469771
|
-
import { createHash as
|
|
469892
|
+
import { createHash as createHash151 } from "node:crypto";
|
|
469772
469893
|
var NOL_PEFT_VALIDATION_VERSION = "omnius.nol.transformers-peft-validation.v2";
|
|
469773
469894
|
var NOL_PEFT_VALIDATION_PEFT_SHA = "acbedcc78edf2565ce8638a85df81a1e4b8a4f98c5d0dfb49b38e2785b247682";
|
|
469774
469895
|
var NOL_PEFT_VALIDATION_BASE_SHA = "ea1950abcceda7d76c5fb54c3b10a73d5756cd947149d4b3b6d7be83ae12ebc0";
|
|
@@ -469785,7 +469906,7 @@ function integer22(value, name, min, max) {
|
|
|
469785
469906
|
function same23(a, b, label) {
|
|
469786
469907
|
need15(canonicalNolJson(a) === canonicalNolJson(b), `${label} mismatch`);
|
|
469787
469908
|
}
|
|
469788
|
-
var hash31 = (bytes5) =>
|
|
469909
|
+
var hash31 = (bytes5) => createHash151("sha256").update(bytes5).digest("hex");
|
|
469789
469910
|
var CRC_TABLE2 = Uint32Array.from({ length: 256 }, (_, value) => {
|
|
469790
469911
|
let crc = value;
|
|
469791
469912
|
for (let bit = 0; bit < 8; bit++)
|
|
@@ -470871,7 +470992,7 @@ function need17(v, m) {
|
|
|
470871
470992
|
}
|
|
470872
470993
|
var same25 = (a, b, m) => need17(canonicalNolJson(a) === canonicalNolJson(b), m);
|
|
470873
470994
|
var identity8 = (bytes5, mediaType) => {
|
|
470874
|
-
const sha25611 =
|
|
470995
|
+
const sha25611 = createHash152("sha256").update(bytes5).digest("hex");
|
|
470875
470996
|
return {
|
|
470876
470997
|
uri: `omnius-artifact://sha256/${sha25611}`,
|
|
470877
470998
|
sha256: sha25611,
|
|
@@ -471555,7 +471676,7 @@ function createNolPeftJournalAdmission(input2) {
|
|
|
471555
471676
|
// packages/cli/src/nol/transformers-peft.ts
|
|
471556
471677
|
init_dist();
|
|
471557
471678
|
init_dist5();
|
|
471558
|
-
import { createHash as
|
|
471679
|
+
import { createHash as createHash153 } from "node:crypto";
|
|
471559
471680
|
import { isAbsolute as isAbsolute49 } from "node:path";
|
|
471560
471681
|
var NOL_TRANSFORMERS_PEFT_VERSION = "omnius.nol.transformers-peft.v2";
|
|
471561
471682
|
var NOL_TRANSFORMERS_PEFT_BASE_SHA256 = "ea1950abcceda7d76c5fb54c3b10a73d5756cd947149d4b3b6d7be83ae12ebc0";
|
|
@@ -471673,7 +471794,7 @@ async function prepareNolPeftPlan(input2) {
|
|
|
471673
471794
|
const bytes5 = await input2.readArtifact(ref11, input2.signal);
|
|
471674
471795
|
input2.signal?.throwIfAborted();
|
|
471675
471796
|
need18(
|
|
471676
|
-
bytes5.byteLength === ref11.sizeBytes &&
|
|
471797
|
+
bytes5.byteLength === ref11.sizeBytes && createHash153("sha256").update(bytes5).digest("hex") === ref11.sha256,
|
|
471677
471798
|
"export receipt bytes/hash mismatch"
|
|
471678
471799
|
);
|
|
471679
471800
|
const receipt = object22(
|
|
@@ -472634,7 +472755,7 @@ var NolPeftAuthorityJournal = class {
|
|
|
472634
472755
|
// packages/cli/src/nol/peft-model-profile.ts
|
|
472635
472756
|
init_dist();
|
|
472636
472757
|
init_dist5();
|
|
472637
|
-
import { createHash as
|
|
472758
|
+
import { createHash as createHash154 } from "node:crypto";
|
|
472638
472759
|
import { lstatSync as lstatSync16, realpathSync as realpathSync29 } from "node:fs";
|
|
472639
472760
|
import { readdir as readdir8 } from "node:fs/promises";
|
|
472640
472761
|
import { dirname as dirname54, isAbsolute as isAbsolute50, join as join94, relative as relative32, resolve as resolve56 } from "node:path";
|
|
@@ -472741,7 +472862,7 @@ async function metadata(ref11, artifacts, maximum, signal) {
|
|
|
472741
472862
|
const bytes5 = await artifacts.readBytes(ref11, signal);
|
|
472742
472863
|
signal.throwIfAborted();
|
|
472743
472864
|
need21(
|
|
472744
|
-
bytes5.length === ref11.sizeBytes &&
|
|
472865
|
+
bytes5.length === ref11.sizeBytes && createHash154("sha256").update(bytes5).digest("hex") === ref11.sha256,
|
|
472745
472866
|
"metadata fullref changed"
|
|
472746
472867
|
);
|
|
472747
472868
|
const parsed = JSON.parse(
|
|
@@ -473518,7 +473639,7 @@ var NolPeftModelAuthorityService = class {
|
|
|
473518
473639
|
bytes5.length <= p.budgets.maxMetadataBytes,
|
|
473519
473640
|
"producer metadata byte cap"
|
|
473520
473641
|
);
|
|
473521
|
-
const sha25611 =
|
|
473642
|
+
const sha25611 = createHash155("sha256").update(bytes5).digest("hex"), ref11 = {
|
|
473522
473643
|
uri: `omnius-artifact://sha256/${sha25611}`,
|
|
473523
473644
|
sha256: sha25611,
|
|
473524
473645
|
sizeBytes: bytes5.length,
|
|
@@ -473558,7 +473679,7 @@ var NolPeftModelAuthorityService = class {
|
|
|
473558
473679
|
bytes5.length <= p.budgets.maxMetadataBytes,
|
|
473559
473680
|
"host source metadata cap"
|
|
473560
473681
|
);
|
|
473561
|
-
const sha25611 =
|
|
473682
|
+
const sha25611 = createHash155("sha256").update(bytes5).digest("hex"), ref11 = {
|
|
473562
473683
|
uri: `omnius-artifact://sha256/${sha25611}`,
|
|
473563
473684
|
sha256: sha25611,
|
|
473564
473685
|
sizeBytes: bytes5.length,
|
|
@@ -473592,7 +473713,7 @@ var NolPeftModelAuthorityService = class {
|
|
|
473592
473713
|
bytes5.length <= p.budgets.maxMetadataBytes,
|
|
473593
473714
|
"worker/lock source cap"
|
|
473594
473715
|
);
|
|
473595
|
-
const sha25611 =
|
|
473716
|
+
const sha25611 = createHash155("sha256").update(bytes5).digest("hex"), ref11 = {
|
|
473596
473717
|
uri: `omnius-artifact://sha256/${sha25611}`,
|
|
473597
473718
|
sha256: sha25611,
|
|
473598
473719
|
sizeBytes: bytes5.length,
|
|
@@ -474018,7 +474139,7 @@ var NolPeftModelAuthorityService = class {
|
|
|
474018
474139
|
childOwnership: child.payload.childOwnership,
|
|
474019
474140
|
observation
|
|
474020
474141
|
};
|
|
474021
|
-
const bytes5 = Buffer.from(canonicalNolJson(payload2)), sha25611 =
|
|
474142
|
+
const bytes5 = Buffer.from(canonicalNolJson(payload2)), sha25611 = createHash155("sha256").update(bytes5).digest("hex"), artifact5 = {
|
|
474022
474143
|
uri: `omnius-artifact://sha256/${sha25611}`,
|
|
474023
474144
|
sha256: sha25611,
|
|
474024
474145
|
sizeBytes: bytes5.length,
|
|
@@ -474493,14 +474614,14 @@ var NolModelRuntimeConfigSchema = z43.object({
|
|
|
474493
474614
|
|
|
474494
474615
|
// packages/cli/src/nol/model-runtime.ts
|
|
474495
474616
|
init_dist();
|
|
474496
|
-
import { createHash as
|
|
474617
|
+
import { createHash as createHash167 } from "node:crypto";
|
|
474497
474618
|
import { AsyncLocalStorage as AsyncLocalStorage5 } from "node:async_hooks";
|
|
474498
474619
|
|
|
474499
474620
|
// packages/cli/src/nol/model-validation-factory.ts
|
|
474500
474621
|
init_dist();
|
|
474501
474622
|
init_dist5();
|
|
474502
474623
|
import {
|
|
474503
|
-
createHash as
|
|
474624
|
+
createHash as createHash157,
|
|
474504
474625
|
createHmac as createHmac4,
|
|
474505
474626
|
randomBytes as randomBytes11,
|
|
474506
474627
|
randomUUID as randomUUID75,
|
|
@@ -474525,7 +474646,7 @@ import { createRequire as createRequire7 } from "node:module";
|
|
|
474525
474646
|
// packages/cli/src/nol/model-subject-adapter.ts
|
|
474526
474647
|
init_dist();
|
|
474527
474648
|
init_dist5();
|
|
474528
|
-
import { createHash as
|
|
474649
|
+
import { createHash as createHash156 } from "node:crypto";
|
|
474529
474650
|
import { mkdir as mkdir16, mkdtemp as mkdtemp9 } from "node:fs/promises";
|
|
474530
474651
|
import { isAbsolute as isAbsolute54, join as join96 } from "node:path";
|
|
474531
474652
|
var IMPLEMENTATIONS = {
|
|
@@ -474561,7 +474682,7 @@ function integer24(v, min, max = Number.MAX_SAFE_INTEGER) {
|
|
|
474561
474682
|
throw new Error("Native model subject integer out of bounds");
|
|
474562
474683
|
return v;
|
|
474563
474684
|
}
|
|
474564
|
-
var hash32 = (v) =>
|
|
474685
|
+
var hash32 = (v) => createHash156("sha256").update(v).digest("hex");
|
|
474565
474686
|
async function abortable8(work2, signal) {
|
|
474566
474687
|
signal.throwIfAborted();
|
|
474567
474688
|
let abort;
|
|
@@ -474745,7 +474866,7 @@ var NolModelWorkerAdapter = class {
|
|
|
474745
474866
|
sizeBytes: f.artifact.sizeBytes
|
|
474746
474867
|
}))
|
|
474747
474868
|
);
|
|
474748
|
-
if (
|
|
474869
|
+
if (createHash156("sha256").update(tokenizerJson).digest("hex") !== model3.tokenizerDigest)
|
|
474749
474870
|
throw new Error("Native model tokenizer identity body mismatch");
|
|
474750
474871
|
a.acquireIdentity = {
|
|
474751
474872
|
ownerId: nolCudaOwner(
|
|
@@ -475837,7 +475958,7 @@ var NolModelValidationHostFactory = class {
|
|
|
475837
475958
|
root === options.projectRoot && isAbsolute55(options.stateRoot) && inside4(root, options.stateRoot),
|
|
475838
475959
|
"Native host authority must belong to the canonical project"
|
|
475839
475960
|
);
|
|
475840
|
-
this.projectId =
|
|
475961
|
+
this.projectId = createHash157("sha256").update(root).digest("hex");
|
|
475841
475962
|
for (const n of Object.values(options.limits))
|
|
475842
475963
|
need23(
|
|
475843
475964
|
Number.isSafeInteger(n) && n > 0,
|
|
@@ -475967,7 +476088,7 @@ var NolModelValidationHostFactory = class {
|
|
|
475967
476088
|
await this.options.artifacts.verify(ref11, signal);
|
|
475968
476089
|
const bytes5 = await this.options.artifacts.readBytes(ref11, signal);
|
|
475969
476090
|
need23(
|
|
475970
|
-
bytes5.byteLength === ref11.sizeBytes &&
|
|
476091
|
+
bytes5.byteLength === ref11.sizeBytes && createHash157("sha256").update(bytes5).digest("hex") === ref11.sha256,
|
|
475971
476092
|
"Native host metadata extent/hash changed"
|
|
475972
476093
|
);
|
|
475973
476094
|
const value = JSON.parse(
|
|
@@ -476972,7 +477093,7 @@ var NolModelValidationHostFactory = class {
|
|
|
476972
477093
|
await this.options.artifacts.verify(ref11, signal);
|
|
476973
477094
|
const bytes5 = await this.options.artifacts.readBytes(ref11, signal);
|
|
476974
477095
|
need23(
|
|
476975
|
-
bytes5.byteLength === ref11.sizeBytes &&
|
|
477096
|
+
bytes5.byteLength === ref11.sizeBytes && createHash157("sha256").update(bytes5).digest("hex") === ref11.sha256,
|
|
476976
477097
|
"Native grading bytes changed"
|
|
476977
477098
|
);
|
|
476978
477099
|
return bytes5;
|
|
@@ -477095,17 +477216,17 @@ var NolModelValidationHostFactory = class {
|
|
|
477095
477216
|
// packages/cli/src/nol/peft-model-host.ts
|
|
477096
477217
|
init_dist();
|
|
477097
477218
|
init_dist5();
|
|
477098
|
-
import { createHash as
|
|
477219
|
+
import { createHash as createHash159 } from "node:crypto";
|
|
477099
477220
|
|
|
477100
477221
|
// packages/cli/src/nol/peft-model-subject-adapter.ts
|
|
477101
477222
|
init_dist();
|
|
477102
477223
|
init_dist5();
|
|
477103
|
-
import { createHash as
|
|
477224
|
+
import { createHash as createHash158 } from "node:crypto";
|
|
477104
477225
|
function need24(v, m) {
|
|
477105
477226
|
if (!v) throw new Error(`PEFT subject: ${m}`);
|
|
477106
477227
|
}
|
|
477107
477228
|
var same31 = (a, b, m) => need24(canonicalNolJson(a) === canonicalNolJson(b), m);
|
|
477108
|
-
var hash33 = (bytes5) =>
|
|
477229
|
+
var hash33 = (bytes5) => createHash158("sha256").update(bytes5).digest("hex");
|
|
477109
477230
|
var NolPeftModelSubjectAdapter = class {
|
|
477110
477231
|
profile;
|
|
477111
477232
|
host;
|
|
@@ -477621,7 +477742,7 @@ function need25(value, message3) {
|
|
|
477621
477742
|
function same32(actual, expected, message3) {
|
|
477622
477743
|
need25(canonicalNolJson(actual) === canonicalNolJson(expected), message3);
|
|
477623
477744
|
}
|
|
477624
|
-
var hash34 = (bytes5) =>
|
|
477745
|
+
var hash34 = (bytes5) => createHash159("sha256").update(bytes5).digest("hex");
|
|
477625
477746
|
var NolPeftModelHostExtension = class {
|
|
477626
477747
|
profiles;
|
|
477627
477748
|
configurationDigest;
|
|
@@ -477999,7 +478120,7 @@ import { fileURLToPath as fileURLToPath13 } from "node:url";
|
|
|
477999
478120
|
// packages/cli/src/nol/peft-control-verifier.ts
|
|
478000
478121
|
init_dist();
|
|
478001
478122
|
init_dist5();
|
|
478002
|
-
import { createHash as
|
|
478123
|
+
import { createHash as createHash160 } from "node:crypto";
|
|
478003
478124
|
import { constants as constants24, lstatSync as lstatSync19, realpathSync as realpathSync32 } from "node:fs";
|
|
478004
478125
|
import { lstat as lstat20, open as open16, opendir as opendir6 } from "node:fs/promises";
|
|
478005
478126
|
import { join as join98, relative as relative35, isAbsolute as isAbsolute56 } from "node:path";
|
|
@@ -478011,7 +478132,7 @@ import { setImmediate as yieldImmediate } from "node:timers/promises";
|
|
|
478011
478132
|
var NOL_PEFT_FACTOR_CONTROL_PROTOCOL = "omnius.nol.peft-factor-support-rademacher.v1";
|
|
478012
478133
|
|
|
478013
478134
|
// packages/cli/src/nol/peft-control-verifier.ts
|
|
478014
|
-
var sha35 = (bytes5) =>
|
|
478135
|
+
var sha35 = (bytes5) => createHash160("sha256").update(bytes5).digest("hex");
|
|
478015
478136
|
var copy9 = (value) => JSON.parse(canonicalNolJson(value));
|
|
478016
478137
|
function freeze10(value) {
|
|
478017
478138
|
if (value && typeof value === "object") {
|
|
@@ -478198,7 +478319,7 @@ async function checkedFile(path13, ref11, budget, opened) {
|
|
|
478198
478319
|
stamp6(await handle.stat()) === file.identity,
|
|
478199
478320
|
"source changed while opening"
|
|
478200
478321
|
);
|
|
478201
|
-
const digest19 =
|
|
478322
|
+
const digest19 = createHash160("sha256");
|
|
478202
478323
|
for (let offset = 0; offset < ref11.sizeBytes; offset += budget.options.limits.chunkBytes)
|
|
478203
478324
|
digest19.update(
|
|
478204
478325
|
await read(
|
|
@@ -478320,7 +478441,7 @@ async function header2(file, budget, factors2) {
|
|
|
478320
478441
|
);
|
|
478321
478442
|
file.dataStart = 8 + size;
|
|
478322
478443
|
for (const tensor of result) {
|
|
478323
|
-
const digest19 =
|
|
478444
|
+
const digest19 = createHash160("sha256");
|
|
478324
478445
|
if (factors2) {
|
|
478325
478446
|
budget.factorCoordinates += tensor.count;
|
|
478326
478447
|
integer25(
|
|
@@ -478533,7 +478654,7 @@ async function randomFactors(a, b, modulePath, seed, budget) {
|
|
|
478533
478654
|
const block = Math.floor(ordinal / 256);
|
|
478534
478655
|
if (block !== lastBlock) {
|
|
478535
478656
|
lastBlock = block;
|
|
478536
|
-
bytes5 =
|
|
478657
|
+
bytes5 = createHash160("sha256").update(
|
|
478537
478658
|
`${NOL_PEFT_FACTOR_CONTROL_PROTOCOL}\0${seed}\0${modulePath}\0${part}\0${block}`
|
|
478538
478659
|
).digest();
|
|
478539
478660
|
}
|
|
@@ -478702,7 +478823,7 @@ function createNolPeftControlVerifier(input2) {
|
|
|
478702
478823
|
stamp6(await file.handle.stat()) === file.identity,
|
|
478703
478824
|
"implementation source changed"
|
|
478704
478825
|
);
|
|
478705
|
-
const digest19 =
|
|
478826
|
+
const digest19 = createHash160("sha256");
|
|
478706
478827
|
for (let offset = 0; offset < before.size; offset += options.limits.chunkBytes)
|
|
478707
478828
|
digest19.update(
|
|
478708
478829
|
await read(
|
|
@@ -479349,7 +479470,7 @@ function createNolPeftModelControlVerifier(options) {
|
|
|
479349
479470
|
// packages/cli/src/nol/gguf-cpu-control-reader-service.ts
|
|
479350
479471
|
init_dist();
|
|
479351
479472
|
init_dist5();
|
|
479352
|
-
import { createHash as
|
|
479473
|
+
import { createHash as createHash161, randomUUID as randomUUID76 } from "node:crypto";
|
|
479353
479474
|
import { constants as constants25, lstatSync as lstatSync20, realpathSync as realpathSync33, statfsSync as statfsSync6 } from "node:fs";
|
|
479354
479475
|
import {
|
|
479355
479476
|
lstat as lstat21,
|
|
@@ -479388,7 +479509,7 @@ var inside6 = (root, path13) => {
|
|
|
479388
479509
|
};
|
|
479389
479510
|
var same34 = (a, b) => canonicalNolJson(a) === canonicalNolJson(b);
|
|
479390
479511
|
var ref8 = (bytes5, mediaType = "application/json") => {
|
|
479391
|
-
const sha25611 =
|
|
479512
|
+
const sha25611 = createHash161("sha256").update(bytes5).digest("hex");
|
|
479392
479513
|
return {
|
|
479393
479514
|
sha256: sha25611,
|
|
479394
479515
|
sizeBytes: bytes5.length,
|
|
@@ -479429,7 +479550,7 @@ var NolGgufCpuControlReaderService = class {
|
|
|
479429
479550
|
"explicit host owner required"
|
|
479430
479551
|
);
|
|
479431
479552
|
this.ownerId = `${options.ownerId}:${randomUUID76()}`;
|
|
479432
|
-
this.projectId =
|
|
479553
|
+
this.projectId = createHash161("sha256").update(this.root).digest("hex");
|
|
479433
479554
|
this.scopeId = nolJsonDigest({ projectId: this.projectId, id: options.id });
|
|
479434
479555
|
this.leaseMs = options.leaseMs ?? 3e4;
|
|
479435
479556
|
need28(
|
|
@@ -480368,14 +480489,14 @@ var NolGgufCpuControlReaderService = class {
|
|
|
480368
480489
|
// packages/cli/src/nol/gguf-model-control-verifier.ts
|
|
480369
480490
|
init_dist();
|
|
480370
480491
|
init_dist5();
|
|
480371
|
-
import { createHash as
|
|
480492
|
+
import { createHash as createHash162 } from "node:crypto";
|
|
480372
480493
|
import { constants as constants26, lstatSync as lstatSync21, realpathSync as realpathSync34 } from "node:fs";
|
|
480373
480494
|
import { lstat as lstat22, open as open18, opendir as opendir8 } from "node:fs/promises";
|
|
480374
480495
|
import { isAbsolute as isAbsolute58, join as join100, relative as relative37 } from "node:path";
|
|
480375
480496
|
import { fileURLToPath as fileURLToPath15 } from "node:url";
|
|
480376
480497
|
import { performance as performance6 } from "node:perf_hooks";
|
|
480377
480498
|
var NOL_GGUF_DENSE_CONTROL_PROTOCOL = "omnius.nol.gguf-dense-post-storage-rademacher.v1";
|
|
480378
|
-
var hash35 = (value) =>
|
|
480499
|
+
var hash35 = (value) => createHash162("sha256").update(value).digest("hex");
|
|
480379
480500
|
var copy11 = (v) => JSON.parse(canonicalNolJson(v));
|
|
480380
480501
|
function freeze12(v) {
|
|
480381
480502
|
if (v && typeof v === "object") {
|
|
@@ -480496,7 +480617,7 @@ async function readAt(file, offset, size, b) {
|
|
|
480496
480617
|
return bytes5;
|
|
480497
480618
|
}
|
|
480498
480619
|
async function rangeHash(file, offset, size, b) {
|
|
480499
|
-
const h =
|
|
480620
|
+
const h = createHash162("sha256");
|
|
480500
480621
|
for (let n = 0; n < size; n += b.limits.chunkBytes)
|
|
480501
480622
|
h.update(
|
|
480502
480623
|
await readAt(
|
|
@@ -481202,7 +481323,7 @@ var Signs = class {
|
|
|
481202
481323
|
const index = Math.floor(ordinal / 256);
|
|
481203
481324
|
if (index !== this.index) {
|
|
481204
481325
|
this.index = index;
|
|
481205
|
-
this.block =
|
|
481326
|
+
this.block = createHash162("sha256").update(
|
|
481206
481327
|
`${NOL_GGUF_DENSE_CONTROL_PROTOCOL}\0${this.seed}\0${this.tensor}\0${index}`
|
|
481207
481328
|
).digest();
|
|
481208
481329
|
}
|
|
@@ -481613,7 +481734,7 @@ init_dist();
|
|
|
481613
481734
|
// packages/cli/src/nol/model-control-verifier.ts
|
|
481614
481735
|
init_dist();
|
|
481615
481736
|
init_dist5();
|
|
481616
|
-
import { createHash as
|
|
481737
|
+
import { createHash as createHash163 } from "node:crypto";
|
|
481617
481738
|
import { constants as constants27, lstatSync as lstatSync22, realpathSync as realpathSync35 } from "node:fs";
|
|
481618
481739
|
import { lstat as lstat23, open as open19, opendir as opendir9 } from "node:fs/promises";
|
|
481619
481740
|
import { isAbsolute as isAbsolute59, join as join101, relative as relative38 } from "node:path";
|
|
@@ -481654,7 +481775,7 @@ function comparisonFiles(model3, receipts) {
|
|
|
481654
481775
|
(file) => !(file.role === "other" && Object.hasOwn(receipts, file.path) && canonicalNolJson(file.artifact) === receipts[file.path])
|
|
481655
481776
|
);
|
|
481656
481777
|
}
|
|
481657
|
-
var hash36 = (bytes5) =>
|
|
481778
|
+
var hash36 = (bytes5) => createHash163("sha256").update(bytes5).digest("hex");
|
|
481658
481779
|
var copy12 = (value) => JSON.parse(canonicalNolJson(value));
|
|
481659
481780
|
function freeze13(value) {
|
|
481660
481781
|
if (value && typeof value === "object") {
|
|
@@ -481887,7 +482008,7 @@ async function checkedFile3(path13, ref11, budget) {
|
|
|
481887
482008
|
identity: identity9,
|
|
481888
482009
|
ref: ref11
|
|
481889
482010
|
};
|
|
481890
|
-
const sha38 =
|
|
482011
|
+
const sha38 = createHash163("sha256");
|
|
481891
482012
|
for (let offset = 0; offset < file.size; offset += budget.limits.chunkBytes)
|
|
481892
482013
|
sha38.update(
|
|
481893
482014
|
await readAt2(
|
|
@@ -482287,7 +482408,7 @@ async function pytorchTensors(reader, asset2, files, tensors, options, budget) {
|
|
|
482287
482408
|
need30(ranges2.length > 0, "weight shard omitted from CPU tensor inventory");
|
|
482288
482409
|
}
|
|
482289
482410
|
for (const [name, tensor] of tensors) {
|
|
482290
|
-
const sha38 =
|
|
482411
|
+
const sha38 = createHash163("sha256");
|
|
482291
482412
|
for (let position = tensor.first; position < tensor.last; position += budget.limits.chunkBytes)
|
|
482292
482413
|
sha38.update(
|
|
482293
482414
|
await readAt2(
|
|
@@ -482599,7 +482720,7 @@ var Signs2 = class {
|
|
|
482599
482720
|
const index = Math.floor(ordinal / 256);
|
|
482600
482721
|
if (index !== this.index) {
|
|
482601
482722
|
this.index = index;
|
|
482602
|
-
this.block =
|
|
482723
|
+
this.block = createHash163("sha256").update(
|
|
482603
482724
|
`${NOL_SAFETENSORS_CONTROL_PROTOCOL}\0${this.seed}\0${this.tensorName}\0${index}`
|
|
482604
482725
|
).digest();
|
|
482605
482726
|
}
|
|
@@ -482810,7 +482931,7 @@ function commonVerifier(input2) {
|
|
|
482810
482931
|
}
|
|
482811
482932
|
};
|
|
482812
482933
|
budget.reserve(sourceInfo.size);
|
|
482813
|
-
const sha38 =
|
|
482934
|
+
const sha38 = createHash163("sha256");
|
|
482814
482935
|
for (let offset = 0; offset < sourceInfo.size; offset += options.limits.chunkBytes)
|
|
482815
482936
|
sha38.update(
|
|
482816
482937
|
await readAt2(
|
|
@@ -483130,7 +483251,7 @@ function commonVerifier(input2) {
|
|
|
483130
483251
|
// packages/cli/src/nol/cpu-control-reader-service.ts
|
|
483131
483252
|
init_dist();
|
|
483132
483253
|
init_dist5();
|
|
483133
|
-
import { createHash as
|
|
483254
|
+
import { createHash as createHash164, randomUUID as randomUUID77 } from "node:crypto";
|
|
483134
483255
|
import { constants as constants28, lstatSync as lstatSync23, realpathSync as realpathSync36, statfsSync as statfsSync7 } from "node:fs";
|
|
483135
483256
|
import {
|
|
483136
483257
|
lstat as lstat24,
|
|
@@ -483169,7 +483290,7 @@ var inside9 = (root, path13) => {
|
|
|
483169
483290
|
};
|
|
483170
483291
|
var same37 = (a, b) => canonicalNolJson(a) === canonicalNolJson(b);
|
|
483171
483292
|
var ref9 = (bytes5, mediaType = "application/json") => {
|
|
483172
|
-
const sha25611 =
|
|
483293
|
+
const sha25611 = createHash164("sha256").update(bytes5).digest("hex");
|
|
483173
483294
|
return {
|
|
483174
483295
|
sha256: sha25611,
|
|
483175
483296
|
sizeBytes: bytes5.length,
|
|
@@ -483210,7 +483331,7 @@ var NolCpuControlReaderService = class {
|
|
|
483210
483331
|
"explicit host owner required"
|
|
483211
483332
|
);
|
|
483212
483333
|
this.ownerId = `${options.ownerId}:${randomUUID77()}`;
|
|
483213
|
-
this.projectId =
|
|
483334
|
+
this.projectId = createHash164("sha256").update(this.root).digest("hex");
|
|
483214
483335
|
this.scopeId = nolJsonDigest({ projectId: this.projectId, id: options.id });
|
|
483215
483336
|
this.leaseMs = options.leaseMs ?? 3e4;
|
|
483216
483337
|
need31(
|
|
@@ -484788,12 +484909,12 @@ var SqliteNolVariantStore = class {
|
|
|
484788
484909
|
// packages/cli/src/nol/variant-service.ts
|
|
484789
484910
|
init_dist();
|
|
484790
484911
|
init_dist5();
|
|
484791
|
-
import { createHash as
|
|
484912
|
+
import { createHash as createHash166 } from "node:crypto";
|
|
484792
484913
|
|
|
484793
484914
|
// packages/cli/src/nol/model-serving.ts
|
|
484794
484915
|
init_dist();
|
|
484795
484916
|
init_dist5();
|
|
484796
|
-
import { createHash as
|
|
484917
|
+
import { createHash as createHash165 } from "node:crypto";
|
|
484797
484918
|
var NOL_SANDBOX_SERVING_KIND = "nol_sandbox_serve";
|
|
484798
484919
|
var NOL_SANDBOX_BINDING_KIND = "nol_sandbox_binding";
|
|
484799
484920
|
function need32(value, text18) {
|
|
@@ -484920,7 +485041,7 @@ var NolSandboxServingService = class {
|
|
|
484920
485041
|
"Sandbox bounded result/metadata byte limit exceeded"
|
|
484921
485042
|
);
|
|
484922
485043
|
if (!cleanup) this.options.store.assertCurrent(lease());
|
|
484923
|
-
const sha25611 =
|
|
485044
|
+
const sha25611 = createHash165("sha256").update(bytes5).digest("hex"), ref11 = NolArtifactRefSchema.parse({
|
|
484924
485045
|
uri: `omnius-artifact://sha256/${sha25611}`,
|
|
484925
485046
|
sha256: sha25611,
|
|
484926
485047
|
sizeBytes: bytes5.byteLength,
|
|
@@ -485028,7 +485149,7 @@ var NolSandboxServingService = class {
|
|
|
485028
485149
|
"nol_sandbox_prepaid_control",
|
|
485029
485150
|
record10.id,
|
|
485030
485151
|
record10.payload
|
|
485031
|
-
), sha38 =
|
|
485152
|
+
), sha38 = createHash165("sha256").update(bytes5).digest("hex"), reservations = this.options.store.listArtifactReservations(
|
|
485032
485153
|
source2.manifestSha256
|
|
485033
485154
|
), reserved = reservations.find(
|
|
485034
485155
|
(v) => v.purpose === "cleanup_artifact" && v.jobId === source2.id && v.generation === r.sourceClaimGeneration && v.artifact?.sha256 === sha38 && v.bytes === bytes5.length
|
|
@@ -485209,7 +485330,7 @@ var NolSandboxServingService = class {
|
|
|
485209
485330
|
bytes5.length <= this.options.limits.maxMetadataBytes,
|
|
485210
485331
|
"Prepaid control metadata bound exceeded"
|
|
485211
485332
|
);
|
|
485212
|
-
const sha25611 =
|
|
485333
|
+
const sha25611 = createHash165("sha256").update(bytes5).digest("hex");
|
|
485213
485334
|
this.options.store.reserveArtifact(lease, {
|
|
485214
485335
|
scopeId: source2.manifestSha256,
|
|
485215
485336
|
id: `cleanup:${sha25611}`,
|
|
@@ -485230,7 +485351,7 @@ var NolSandboxServingService = class {
|
|
|
485230
485351
|
"nol_sandbox_prepaid_control",
|
|
485231
485352
|
priorControl.id,
|
|
485232
485353
|
priorControl.payload
|
|
485233
|
-
), sha38 =
|
|
485354
|
+
), sha38 = createHash165("sha256").update(bytes5).digest("hex");
|
|
485234
485355
|
need32(
|
|
485235
485356
|
this.options.store.listArtifactReservations(source2.manifestSha256).some(
|
|
485236
485357
|
(r) => r.purpose === "cleanup_artifact" && r.jobId === source2.id && r.generation === lease.generation && r.artifact?.sha256 === sha38 && r.bytes === bytes5.length
|
|
@@ -486607,7 +486728,7 @@ var NolVariantService = class {
|
|
|
486607
486728
|
await this.options.artifacts.verify(ref11, signal);
|
|
486608
486729
|
const bytes5 = await this.options.artifacts.readBytes(ref11, signal);
|
|
486609
486730
|
need33(
|
|
486610
|
-
bytes5.byteLength === ref11.sizeBytes &&
|
|
486731
|
+
bytes5.byteLength === ref11.sizeBytes && createHash166("sha256").update(bytes5).digest("hex") === ref11.sha256,
|
|
486611
486732
|
"Variant metadata changed while reading"
|
|
486612
486733
|
);
|
|
486613
486734
|
const value = JSON.parse(
|
|
@@ -487163,7 +487284,7 @@ var NolProjectModelServices = class {
|
|
|
487163
487284
|
this.config = JSON.parse(
|
|
487164
487285
|
canonicalNolJson(options.config)
|
|
487165
487286
|
);
|
|
487166
|
-
this.projectId =
|
|
487287
|
+
this.projectId = createHash167("sha256").update(options.projectRoot).digest("hex");
|
|
487167
487288
|
const controls = this.config.controlVerification.kind === "safetensors_post_storage_rademacher_v1" ? createNolSafetensorsControlVerifier({
|
|
487168
487289
|
profiles: this.config.profiles,
|
|
487169
487290
|
artifacts: options.artifacts,
|
|
@@ -487609,14 +487730,14 @@ init_dist();
|
|
|
487609
487730
|
init_dist5();
|
|
487610
487731
|
import { readFileSync as readFileSync71 } from "node:fs";
|
|
487611
487732
|
import { fileURLToPath as fileURLToPath18 } from "node:url";
|
|
487612
|
-
import { createHash as
|
|
487733
|
+
import { createHash as createHash168 } from "node:crypto";
|
|
487613
487734
|
function buildNolModelJsonScorer(profile3) {
|
|
487614
487735
|
const validator = createNolJsonSchemaValidator(profile3.jsonSchema, {
|
|
487615
487736
|
draft: profile3.draft
|
|
487616
487737
|
});
|
|
487617
487738
|
const harnessDigest = nolJsonDigest({
|
|
487618
487739
|
schema: "omnius.nol.model-json-exact-harness.v1",
|
|
487619
|
-
implementation:
|
|
487740
|
+
implementation: createHash168("sha256").update(readFileSync71(fileURLToPath18(import.meta.url))).digest("hex"),
|
|
487620
487741
|
validator: validator.implementationDigest,
|
|
487621
487742
|
profile: profile3
|
|
487622
487743
|
});
|
|
@@ -487831,7 +487952,7 @@ function hostPlacementHook(options) {
|
|
|
487831
487952
|
);
|
|
487832
487953
|
return options.onPlacementConfirmed;
|
|
487833
487954
|
}
|
|
487834
|
-
var hash37 = (value) =>
|
|
487955
|
+
var hash37 = (value) => createHash169("sha256").update(value).digest("hex");
|
|
487835
487956
|
var MAX_CONFIG_BYTES2 = 16 * 1024 * 1024;
|
|
487836
487957
|
async function readNolJsonDocument(path13, maxBytes = MAX_CONFIG_BYTES2) {
|
|
487837
487958
|
const handle = await open21(path13, constants29.O_RDONLY | constants29.O_NONBLOCK);
|
|
@@ -489000,7 +489121,7 @@ async function shutdownNolRuntimes(options = {}) {
|
|
|
489000
489121
|
|
|
489001
489122
|
// packages/cli/src/nol/transformers-nnsight.ts
|
|
489002
489123
|
init_dist();
|
|
489003
|
-
import { createHash as
|
|
489124
|
+
import { createHash as createHash170 } from "node:crypto";
|
|
489004
489125
|
var NOL_NNSIGHT_GRADIENT_VERSION = "omnius.nol.transformers-nnsight.v2";
|
|
489005
489126
|
var NOL_NNSIGHT_GRADIENT_BASE_SHA256 = "ea1950abcceda7d76c5fb54c3b10a73d5756cd947149d4b3b6d7be83ae12ebc0";
|
|
489006
489127
|
var SHA10 = /^[a-f0-9]{64}$/;
|
|
@@ -489121,7 +489242,7 @@ function vector(value, size) {
|
|
|
489121
489242
|
return parsed;
|
|
489122
489243
|
});
|
|
489123
489244
|
need34(
|
|
489124
|
-
|
|
489245
|
+
createHash170("sha256").update(bytes5).digest("hex") === hash38(item.sha256),
|
|
489125
489246
|
"F32 vector byte identity changed"
|
|
489126
489247
|
);
|
|
489127
489248
|
return values;
|
|
@@ -489426,7 +489547,7 @@ function verifyNolNnsightGradientObservation(input2) {
|
|
|
489426
489547
|
// packages/cli/src/nol/gne-tools-transport.ts
|
|
489427
489548
|
init_dist();
|
|
489428
489549
|
init_dist5();
|
|
489429
|
-
import { createHash as
|
|
489550
|
+
import { createHash as createHash171 } from "node:crypto";
|
|
489430
489551
|
import { fileURLToPath as fileURLToPath20 } from "node:url";
|
|
489431
489552
|
|
|
489432
489553
|
// packages/cli/src/nol/native-agent-evaluation.ts
|
|
@@ -489558,7 +489679,7 @@ var names = Object.keys(NOL_NATIVE_AGENT_SCHEMAS);
|
|
|
489558
489679
|
function need36(condition, message3) {
|
|
489559
489680
|
if (!condition) throw new Error(`GNE native tools: ${message3}`);
|
|
489560
489681
|
}
|
|
489561
|
-
var hash39 = (bytes5) =>
|
|
489682
|
+
var hash39 = (bytes5) => createHash171("sha256").update(bytes5).digest("hex");
|
|
489562
489683
|
var same42 = (left, right) => canonicalNolJson(left) === canonicalNolJson(right);
|
|
489563
489684
|
function object30(value) {
|
|
489564
489685
|
need36(
|
|
@@ -490479,12 +490600,12 @@ import {
|
|
|
490479
490600
|
writeFile as writeFile5
|
|
490480
490601
|
} from "node:fs/promises";
|
|
490481
490602
|
import { join as join104, resolve as resolve62 } from "node:path";
|
|
490482
|
-
import { randomUUID as randomUUID79, createHash as
|
|
490603
|
+
import { randomUUID as randomUUID79, createHash as createHash172 } from "node:crypto";
|
|
490483
490604
|
var FILES2 = ["input.json", "result.json"];
|
|
490484
490605
|
var NAMES = Object.keys(NOL_NATIVE_AGENT_SCHEMAS);
|
|
490485
490606
|
var BEGIN = "NOL_NATIVE_AGENT_RECEIPT_BEGIN";
|
|
490486
490607
|
var END = "NOL_NATIVE_AGENT_RECEIPT_END";
|
|
490487
|
-
var hash40 = (bytes5) =>
|
|
490608
|
+
var hash40 = (bytes5) => createHash172("sha256").update(bytes5).digest("hex");
|
|
490488
490609
|
function need37(condition, message3) {
|
|
490489
490610
|
if (!condition) throw new Error(`GNE agent evaluation: ${message3}`);
|
|
490490
490611
|
}
|
|
@@ -491130,7 +491251,7 @@ ${END}`;
|
|
|
491130
491251
|
// packages/cli/src/nol/gne-tools-profile.ts
|
|
491131
491252
|
init_dist();
|
|
491132
491253
|
init_dist5();
|
|
491133
|
-
import { createHash as
|
|
491254
|
+
import { createHash as createHash173, randomUUID as randomUUID80 } from "node:crypto";
|
|
491134
491255
|
import { mkdir as mkdir21, lstat as lstat25, realpath as realpath19 } from "node:fs/promises";
|
|
491135
491256
|
import { isAbsolute as isAbsolute63, join as join105, relative as relative41, resolve as resolve63 } from "node:path";
|
|
491136
491257
|
init_gne_conformance();
|
|
@@ -491139,7 +491260,7 @@ var ISSUED2 = "nol_gne_tools_conformance_issued";
|
|
|
491139
491260
|
var POOL = "nol_gne_tools_output_admission";
|
|
491140
491261
|
var SCOPE5 = "single_private_job_owner_no_general_multijob_atomic_quota_claim";
|
|
491141
491262
|
var GNE_REVISION = "b1ded91bf1ebd903f7229e4969cc764a418336a8";
|
|
491142
|
-
var sha36 = (value) =>
|
|
491263
|
+
var sha36 = (value) => createHash173("sha256").update(value).digest("hex");
|
|
491143
491264
|
var copy15 = (value) => JSON.parse(canonicalNolJson(value));
|
|
491144
491265
|
function need38(condition, message3) {
|
|
491145
491266
|
if (!condition) throw new Error(`GNE tools proof: ${message3}`);
|
|
@@ -492127,7 +492248,7 @@ function createNolGneToolsJournalAdmission(input2) {
|
|
|
492127
492248
|
// packages/cli/src/nol/transformers-research.ts
|
|
492128
492249
|
init_dist();
|
|
492129
492250
|
init_dist5();
|
|
492130
|
-
import { createHash as
|
|
492251
|
+
import { createHash as createHash174 } from "node:crypto";
|
|
492131
492252
|
import { constants as constants31 } from "node:fs";
|
|
492132
492253
|
import { lstat as lstat26, open as open23, realpath as realpath20 } from "node:fs/promises";
|
|
492133
492254
|
import { dirname as dirname59, isAbsolute as isAbsolute64, resolve as resolve64 } from "node:path";
|
|
@@ -492141,7 +492262,7 @@ var HEADS = new Set(
|
|
|
492141
492262
|
var need39 = (value, message3) => {
|
|
492142
492263
|
if (!value) throw new Error(`NOL research capture: ${message3}`);
|
|
492143
492264
|
};
|
|
492144
|
-
var sha37 = (value) =>
|
|
492265
|
+
var sha37 = (value) => createHash174("sha256").update(value).digest("hex");
|
|
492145
492266
|
var same44 = (left, right) => canonicalNolJson(left) === canonicalNolJson(right);
|
|
492146
492267
|
function object31(value, keys8) {
|
|
492147
492268
|
need39(
|