omnius 1.0.963 → 1.0.964
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/memory/immutableEvidenceStore.d.ts +2 -0
- package/dist/_types/memory/memoryCapability.d.ts +1 -0
- package/dist/_types/orchestrator/agenticRunner.d.ts +6 -1
- package/dist/_types/orchestrator/liveVirtualContext.d.ts +2 -0
- package/dist/_types/orchestrator/memory-capability-context.d.ts +1 -1
- package/dist/_types/orchestrator/successful-procedure-memory.d.ts +21 -0
- package/dist/index.js +2 -2
- package/dist/library.js +456 -249
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/dist/library.js
CHANGED
|
@@ -425,7 +425,20 @@ function renderMemoryCapabilitiesForModel(capabilities2, options = {}) {
|
|
|
425
425
|
routeIds: v.routeIds.filter((name) => /^[a-zA-Z0-9_.:-]+$/.test(name))
|
|
426
426
|
}]))
|
|
427
427
|
})).sort((a, b) => a.adapterRef.localeCompare(b.adapterRef));
|
|
428
|
-
const payload2 = {
|
|
428
|
+
const payload2 = {
|
|
429
|
+
...options.compact ? { operationFields: ["operation", "status", "toolNames", "routeIds", "optionalReasonCode"] } : {},
|
|
430
|
+
capabilities: options.compact ? facts.map(({ operations: operations3, ...capability }) => ({
|
|
431
|
+
...capability,
|
|
432
|
+
operations: Object.entries(operations3).map(([name, value]) => [
|
|
433
|
+
name,
|
|
434
|
+
value.status,
|
|
435
|
+
value.toolNames,
|
|
436
|
+
value.routeIds,
|
|
437
|
+
...value.reasonCode ? [value.reasonCode] : []
|
|
438
|
+
])
|
|
439
|
+
})) : facts,
|
|
440
|
+
omittedCount: Math.max(0, capabilities2.length - facts.length)
|
|
441
|
+
};
|
|
429
442
|
const serialize3 = () => head + quotedJson(payload2) + foot;
|
|
430
443
|
while (payload2.capabilities.length && serialize3().length > max) {
|
|
431
444
|
payload2.capabilities.pop();
|
|
@@ -2342,15 +2355,13 @@ function normalizeLookup(value) {
|
|
|
2342
2355
|
return value.normalize("NFKC").trim().toLocaleLowerCase();
|
|
2343
2356
|
}
|
|
2344
2357
|
function scopePredicate(filters, documentAlias = "d") {
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
const scopeIds = [...new Set(filters.scopeIds.map((scopeId) => scopeId.trim()).filter(Boolean))];
|
|
2348
|
-
if (scopeIds.length === 0)
|
|
2358
|
+
const scopeIds = filters.scopeIds && [...new Set(filters.scopeIds.map((scopeId) => scopeId.trim()).filter(Boolean))];
|
|
2359
|
+
if (scopeIds?.length === 0)
|
|
2349
2360
|
return { sql: " AND 1 = 0", params: [] };
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
};
|
|
2361
|
+
const excluded = [...new Set(filters.excludeDocumentIds ?? [])];
|
|
2362
|
+
const scope2 = scopeIds ? ` AND ${documentAlias}.scope_id IN (${scopeIds.map(() => "?").join(", ")})` : "";
|
|
2363
|
+
const exclusion = excluded.length ? ` AND ${documentAlias}.id NOT IN (${excluded.map(() => "?").join(", ")})` : "";
|
|
2364
|
+
return { sql: scope2 + exclusion, params: [...scopeIds ?? [], ...excluded] };
|
|
2354
2365
|
}
|
|
2355
2366
|
function positiveInteger(value, name) {
|
|
2356
2367
|
if (!Number.isInteger(value) || value < 0)
|
|
@@ -34332,8 +34343,13 @@ function classifyWords(words3, depth = 0) {
|
|
|
34332
34343
|
}
|
|
34333
34344
|
return VALIDATION_ACTIONS.has(action.split(":")[0]) ? "validation" : "other";
|
|
34334
34345
|
}
|
|
34335
|
-
if (/^python(?:3(?:\.\d+)?)?$/.test(program)
|
|
34336
|
-
|
|
34346
|
+
if (/^python(?:3(?:\.\d+)?)?$/.test(program)) {
|
|
34347
|
+
const option = args.findIndex((arg) => !["-B", "-E", "-I", "-s", "-S", "-u"].includes(arg));
|
|
34348
|
+
if (option >= 0 && args[option] === "-m") {
|
|
34349
|
+
if (args[option + 1] === "unittest")
|
|
34350
|
+
return "python_unittest";
|
|
34351
|
+
return classifyWords(args.slice(option + 1), depth + 1);
|
|
34352
|
+
}
|
|
34337
34353
|
}
|
|
34338
34354
|
if (program === "node" && args.includes("--test"))
|
|
34339
34355
|
return "validation";
|
|
@@ -34368,12 +34384,26 @@ function classifyInvocation(command, receipt, depth) {
|
|
|
34368
34384
|
if (args.length !== 2 || args[0] !== "-c")
|
|
34369
34385
|
return { kind: "other", substantiveStageCount: 0 };
|
|
34370
34386
|
const nested = classifyInvocation(args[1], void 0, depth + 1);
|
|
34371
|
-
return {
|
|
34387
|
+
return { ...nested, substantiveStageCount: nested.substantiveStageCount === 0 ? 0 : stages.length - 1 + nested.substantiveStageCount };
|
|
34372
34388
|
}
|
|
34373
|
-
|
|
34374
|
-
|
|
34375
|
-
|
|
34376
|
-
|
|
34389
|
+
const kind2 = !last.writesRedirectedFile && commandIsPureReadOnlyPipeline(head) ? "inspection" : classifyWords(last.words);
|
|
34390
|
+
return kind2 === "python_unittest" ? { kind: "validation", substantiveStageCount: stages.length, framework: kind2 } : { kind: kind2, substantiveStageCount: stages.length };
|
|
34391
|
+
}
|
|
34392
|
+
function successfulPythonUnittestCount(output) {
|
|
34393
|
+
const summary2 = /^Ran (\d+) tests? in \d+(?:\.\d+)?s\r?\n\s*OK(?: \(([^\r\n]*)\))?\s*$/m.exec(output.trimEnd());
|
|
34394
|
+
if (!summary2 || summary2.index + summary2[0].length !== output.trimEnd().length)
|
|
34395
|
+
return 0;
|
|
34396
|
+
const count8 = Number(summary2[1]);
|
|
34397
|
+
if (!Number.isSafeInteger(count8) || count8 < 1)
|
|
34398
|
+
return 0;
|
|
34399
|
+
let excluded = 0;
|
|
34400
|
+
for (const item of summary2[2]?.split(", ") ?? []) {
|
|
34401
|
+
const match2 = /^(?:skipped|expected failures)=(\d+)$/.exec(item);
|
|
34402
|
+
if (!match2)
|
|
34403
|
+
return 0;
|
|
34404
|
+
excluded += Number(match2[1]);
|
|
34405
|
+
}
|
|
34406
|
+
return Math.max(0, count8 - excluded);
|
|
34377
34407
|
}
|
|
34378
34408
|
var PACKAGE_RUNNERS, EXEC_RUNNERS, VALIDATION_ACTIONS, VALIDATION_PROGRAMS, VALUE_OPTIONS, FLAG_OPTIONS, VITEST_VALUE_OPTIONS, VITEST_FLAG_OPTIONS;
|
|
34379
34409
|
var init_verificationInvocation = __esm({
|
|
@@ -97768,7 +97798,7 @@ var require_util = __commonJS({
|
|
|
97768
97798
|
exports.isAbsolute = function(aPath) {
|
|
97769
97799
|
return aPath.charAt(0) === "/" || urlRegexp.test(aPath);
|
|
97770
97800
|
};
|
|
97771
|
-
function
|
|
97801
|
+
function relative50(aRoot, aPath) {
|
|
97772
97802
|
if (aRoot === "") {
|
|
97773
97803
|
aRoot = ".";
|
|
97774
97804
|
}
|
|
@@ -97787,7 +97817,7 @@ var require_util = __commonJS({
|
|
|
97787
97817
|
}
|
|
97788
97818
|
return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
|
|
97789
97819
|
}
|
|
97790
|
-
exports.relative =
|
|
97820
|
+
exports.relative = relative50;
|
|
97791
97821
|
var supportsNullProto = (function() {
|
|
97792
97822
|
var obj3 = /* @__PURE__ */ Object.create(null);
|
|
97793
97823
|
return !("__proto__" in obj3);
|
|
@@ -109218,11 +109248,11 @@ ${lanes.join("\n")}
|
|
|
109218
109248
|
return toComponents;
|
|
109219
109249
|
}
|
|
109220
109250
|
const components = toComponents.slice(start);
|
|
109221
|
-
const
|
|
109251
|
+
const relative50 = [];
|
|
109222
109252
|
for (; start < fromComponents.length; start++) {
|
|
109223
|
-
|
|
109253
|
+
relative50.push("..");
|
|
109224
109254
|
}
|
|
109225
|
-
return ["", ...
|
|
109255
|
+
return ["", ...relative50, ...components];
|
|
109226
109256
|
}
|
|
109227
109257
|
function getRelativePathFromDirectory(fromDirectory, to, getCanonicalFileNameOrIgnoreCase) {
|
|
109228
109258
|
Debug.assert(getRootLength(fromDirectory) > 0 === getRootLength(to) > 0, "Paths must either both be absolute or both be relative");
|
|
@@ -147918,11 +147948,11 @@ ${lanes.join("\n")}
|
|
|
147918
147948
|
if (i < rootLength) {
|
|
147919
147949
|
return void 0;
|
|
147920
147950
|
}
|
|
147921
|
-
const
|
|
147922
|
-
if (
|
|
147951
|
+
const sep13 = directory3.lastIndexOf(directorySeparator, i - 1);
|
|
147952
|
+
if (sep13 === -1) {
|
|
147923
147953
|
return void 0;
|
|
147924
147954
|
}
|
|
147925
|
-
return directory3.substr(0, Math.max(
|
|
147955
|
+
return directory3.substr(0, Math.max(sep13, rootLength));
|
|
147926
147956
|
}
|
|
147927
147957
|
}
|
|
147928
147958
|
}
|
|
@@ -153765,9 +153795,9 @@ ${lanes.join("\n")}
|
|
|
153765
153795
|
if (!startsWithDirectory(target2, realPathDirectory, getCanonicalFileName)) {
|
|
153766
153796
|
return;
|
|
153767
153797
|
}
|
|
153768
|
-
const
|
|
153798
|
+
const relative50 = getRelativePathFromDirectory(realPathDirectory, target2, getCanonicalFileName);
|
|
153769
153799
|
for (const symlinkDirectory of symlinkDirectories) {
|
|
153770
|
-
const option = resolvePath(symlinkDirectory,
|
|
153800
|
+
const option = resolvePath(symlinkDirectory, relative50);
|
|
153771
153801
|
const result2 = cb(option, target2 === referenceRedirect);
|
|
153772
153802
|
shouldFilterIgnoredPaths = true;
|
|
153773
153803
|
if (result2) return result2;
|
|
@@ -313290,7 +313320,7 @@ var require_path_browserify = __commonJS({
|
|
|
313290
313320
|
}
|
|
313291
313321
|
return res;
|
|
313292
313322
|
}
|
|
313293
|
-
function _format(
|
|
313323
|
+
function _format(sep13, pathObject) {
|
|
313294
313324
|
var dir = pathObject.dir || pathObject.root;
|
|
313295
313325
|
var base = pathObject.base || (pathObject.name || "") + (pathObject.ext || "");
|
|
313296
313326
|
if (!dir) {
|
|
@@ -313299,7 +313329,7 @@ var require_path_browserify = __commonJS({
|
|
|
313299
313329
|
if (dir === pathObject.root) {
|
|
313300
313330
|
return dir + base;
|
|
313301
313331
|
}
|
|
313302
|
-
return dir +
|
|
313332
|
+
return dir + sep13 + base;
|
|
313303
313333
|
}
|
|
313304
313334
|
var posix = {
|
|
313305
313335
|
// path.resolve([from ...], to)
|
|
@@ -313368,7 +313398,7 @@ var require_path_browserify = __commonJS({
|
|
|
313368
313398
|
return ".";
|
|
313369
313399
|
return posix.normalize(joined);
|
|
313370
313400
|
},
|
|
313371
|
-
relative: function
|
|
313401
|
+
relative: function relative50(from, to) {
|
|
313372
313402
|
assertPath(from);
|
|
313373
313403
|
assertPath(to);
|
|
313374
313404
|
if (from === to) return "";
|
|
@@ -316198,12 +316228,12 @@ var require_dist2 = __commonJS({
|
|
|
316198
316228
|
return patterns.length > 0 ? buildCrawler(options, patterns) : [];
|
|
316199
316229
|
}
|
|
316200
316230
|
async function glob2(globInput, options) {
|
|
316201
|
-
const [crawler,
|
|
316202
|
-
return crawler ? formatPaths(await crawler.withPromise(),
|
|
316231
|
+
const [crawler, relative50] = getCrawler(globInput, options);
|
|
316232
|
+
return crawler ? formatPaths(await crawler.withPromise(), relative50) : [];
|
|
316203
316233
|
}
|
|
316204
316234
|
function globSync(globInput, options) {
|
|
316205
|
-
const [crawler,
|
|
316206
|
-
return crawler ? formatPaths(crawler.sync(),
|
|
316235
|
+
const [crawler, relative50] = getCrawler(globInput, options);
|
|
316236
|
+
return crawler ? formatPaths(crawler.sync(), relative50) : [];
|
|
316207
316237
|
}
|
|
316208
316238
|
exports.convertPathToPattern = convertPathToPattern;
|
|
316209
316239
|
exports.escapePath = escapePath;
|
|
@@ -351827,50 +351857,50 @@ var require_fast_uri = __commonJS({
|
|
|
351827
351857
|
schemelessOptions.skipEscape = true;
|
|
351828
351858
|
return serialize3(resolved, schemelessOptions);
|
|
351829
351859
|
}
|
|
351830
|
-
function resolveComponent(base,
|
|
351860
|
+
function resolveComponent(base, relative50, options, skipNormalization) {
|
|
351831
351861
|
const target2 = {};
|
|
351832
351862
|
if (!skipNormalization) {
|
|
351833
351863
|
base = parse3(serialize3(base, options), options);
|
|
351834
|
-
|
|
351864
|
+
relative50 = parse3(serialize3(relative50, options), options);
|
|
351835
351865
|
}
|
|
351836
351866
|
options = options || {};
|
|
351837
|
-
if (!options.tolerant &&
|
|
351838
|
-
target2.scheme =
|
|
351839
|
-
target2.userinfo =
|
|
351840
|
-
target2.host =
|
|
351841
|
-
target2.port =
|
|
351842
|
-
target2.path = removeDotSegments(
|
|
351843
|
-
target2.query =
|
|
351867
|
+
if (!options.tolerant && relative50.scheme) {
|
|
351868
|
+
target2.scheme = relative50.scheme;
|
|
351869
|
+
target2.userinfo = relative50.userinfo;
|
|
351870
|
+
target2.host = relative50.host;
|
|
351871
|
+
target2.port = relative50.port;
|
|
351872
|
+
target2.path = removeDotSegments(relative50.path || "");
|
|
351873
|
+
target2.query = relative50.query;
|
|
351844
351874
|
} else {
|
|
351845
|
-
if (
|
|
351846
|
-
target2.userinfo =
|
|
351847
|
-
target2.host =
|
|
351848
|
-
target2.port =
|
|
351849
|
-
target2.path = removeDotSegments(
|
|
351850
|
-
target2.query =
|
|
351875
|
+
if (relative50.userinfo !== void 0 || relative50.host !== void 0 || relative50.port !== void 0) {
|
|
351876
|
+
target2.userinfo = relative50.userinfo;
|
|
351877
|
+
target2.host = relative50.host;
|
|
351878
|
+
target2.port = relative50.port;
|
|
351879
|
+
target2.path = removeDotSegments(relative50.path || "");
|
|
351880
|
+
target2.query = relative50.query;
|
|
351851
351881
|
} else {
|
|
351852
|
-
if (!
|
|
351882
|
+
if (!relative50.path) {
|
|
351853
351883
|
target2.path = base.path;
|
|
351854
|
-
if (
|
|
351855
|
-
target2.query =
|
|
351884
|
+
if (relative50.query !== void 0) {
|
|
351885
|
+
target2.query = relative50.query;
|
|
351856
351886
|
} else {
|
|
351857
351887
|
target2.query = base.query;
|
|
351858
351888
|
}
|
|
351859
351889
|
} else {
|
|
351860
|
-
if (
|
|
351861
|
-
target2.path = removeDotSegments(
|
|
351890
|
+
if (relative50.path[0] === "/") {
|
|
351891
|
+
target2.path = removeDotSegments(relative50.path);
|
|
351862
351892
|
} else {
|
|
351863
351893
|
const baseHasAuthority = base.userinfo !== void 0 || base.host !== void 0 || base.port !== void 0;
|
|
351864
351894
|
if (baseHasAuthority && !base.path) {
|
|
351865
|
-
target2.path = "/" +
|
|
351895
|
+
target2.path = "/" + relative50.path;
|
|
351866
351896
|
} else if (!base.path) {
|
|
351867
|
-
target2.path =
|
|
351897
|
+
target2.path = relative50.path;
|
|
351868
351898
|
} else {
|
|
351869
|
-
target2.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) +
|
|
351899
|
+
target2.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative50.path;
|
|
351870
351900
|
}
|
|
351871
351901
|
target2.path = base.scheme === void 0 && !baseHasAuthority && target2.path[0] !== "/" ? removeDotSegmentsRelative(target2.path) : removeDotSegments(target2.path);
|
|
351872
351902
|
}
|
|
351873
|
-
target2.query =
|
|
351903
|
+
target2.query = relative50.query;
|
|
351874
351904
|
}
|
|
351875
351905
|
target2.userinfo = base.userinfo;
|
|
351876
351906
|
target2.host = base.host;
|
|
@@ -351878,7 +351908,7 @@ var require_fast_uri = __commonJS({
|
|
|
351878
351908
|
}
|
|
351879
351909
|
target2.scheme = base.scheme;
|
|
351880
351910
|
}
|
|
351881
|
-
target2.fragment =
|
|
351911
|
+
target2.fragment = relative50.fragment;
|
|
351882
351912
|
return target2;
|
|
351883
351913
|
}
|
|
351884
351914
|
function equal2(uriA, uriB, options) {
|
|
@@ -369498,12 +369528,12 @@ function parseDecision(raw) {
|
|
|
369498
369528
|
subqueries
|
|
369499
369529
|
};
|
|
369500
369530
|
}
|
|
369501
|
-
function scopedPlan(decision2, scopeId) {
|
|
369531
|
+
function scopedPlan(decision2, scopeId, excludeDocumentIds) {
|
|
369502
369532
|
return {
|
|
369503
369533
|
subqueries: decision2.subqueries.map((subquery) => ({
|
|
369504
369534
|
...subquery,
|
|
369505
369535
|
// Isolation is host authority. The inference output cannot broaden it.
|
|
369506
|
-
filters: { scopeIds: [scopeId] }
|
|
369536
|
+
filters: { scopeIds: [scopeId], excludeDocumentIds }
|
|
369507
369537
|
})),
|
|
369508
369538
|
rationale: `inference planned ${decision2.subqueries.length} scoped subqueries`
|
|
369509
369539
|
};
|
|
@@ -369572,7 +369602,7 @@ var QUERYABLE_MEMORY_CLASSES = [
|
|
|
369572
369602
|
"episode",
|
|
369573
369603
|
"open_question"
|
|
369574
369604
|
];
|
|
369575
|
-
function structuredMemorySeeds(input2, decision2) {
|
|
369605
|
+
function structuredMemorySeeds(input2, decision2, excludeDocumentIds) {
|
|
369576
369606
|
if (!input2.memoryStore)
|
|
369577
369607
|
return { candidates: [], memoryIds: [] };
|
|
369578
369608
|
const matches = /* @__PURE__ */ new Map();
|
|
@@ -369599,11 +369629,19 @@ function structuredMemorySeeds(input2, decision2) {
|
|
|
369599
369629
|
}
|
|
369600
369630
|
}
|
|
369601
369631
|
const candidates = /* @__PURE__ */ new Map();
|
|
369632
|
+
const allowedDocuments = /* @__PURE__ */ new Map();
|
|
369633
|
+
const memoryIds = /* @__PURE__ */ new Set();
|
|
369602
369634
|
for (const match2 of matches.values()) {
|
|
369603
369635
|
for (const source2 of match2.record.provenance) {
|
|
369604
369636
|
const chunk = input2.store.getChunk(source2.chunkId);
|
|
369605
|
-
if (!chunk)
|
|
369637
|
+
if (!chunk || excludeDocumentIds.has(chunk.documentId))
|
|
369638
|
+
continue;
|
|
369639
|
+
if (!allowedDocuments.has(chunk.documentId)) {
|
|
369640
|
+
allowedDocuments.set(chunk.documentId, input2.store.getDocument(chunk.documentId)?.metadata["scopeId"] === input2.scopeId);
|
|
369641
|
+
}
|
|
369642
|
+
if (!allowedDocuments.get(chunk.documentId))
|
|
369606
369643
|
continue;
|
|
369644
|
+
memoryIds.add(match2.record.id);
|
|
369607
369645
|
const candidate = {
|
|
369608
369646
|
chunk,
|
|
369609
369647
|
score: match2.score,
|
|
@@ -369617,7 +369655,7 @@ function structuredMemorySeeds(input2, decision2) {
|
|
|
369617
369655
|
}
|
|
369618
369656
|
return {
|
|
369619
369657
|
candidates: [...candidates.values()].sort((left, right) => right.score - left.score),
|
|
369620
|
-
memoryIds: [...
|
|
369658
|
+
memoryIds: [...memoryIds]
|
|
369621
369659
|
};
|
|
369622
369660
|
}
|
|
369623
369661
|
function splitProjection(body, maxChars) {
|
|
@@ -369645,7 +369683,8 @@ async function buildLiveVirtualContextProjection(input2) {
|
|
|
369645
369683
|
const query = input2.query.trim();
|
|
369646
369684
|
if (!query || !input2.scopeId)
|
|
369647
369685
|
return null;
|
|
369648
|
-
const
|
|
369686
|
+
const excludeDocumentIds = new Set(input2.excludeDocumentIds ?? []);
|
|
369687
|
+
const corpus = input2.store.corpusStats({ scopeIds: [input2.scopeId], excludeDocumentIds: [...excludeDocumentIds] });
|
|
369649
369688
|
const triggerTokens = Math.max(1, Math.floor(input2.triggerTokens ?? 9600));
|
|
369650
369689
|
if (mode === "auto" && (input2.residentInputTokens ?? 0) < triggerTokens && !input2.knownMissingKnowledge?.some((question) => question.trim()))
|
|
369651
369690
|
return null;
|
|
@@ -369662,6 +369701,7 @@ async function buildLiveVirtualContextProjection(input2) {
|
|
|
369662
369701
|
const signature = projectionSignature({
|
|
369663
369702
|
query,
|
|
369664
369703
|
scopeId: input2.scopeId,
|
|
369704
|
+
excludeDocumentIds: [...excludeDocumentIds],
|
|
369665
369705
|
corpus,
|
|
369666
369706
|
evidenceTokenBudget,
|
|
369667
369707
|
structuredMemoryVersion
|
|
@@ -369702,6 +369742,7 @@ async function buildLiveVirtualContextProjection(input2) {
|
|
|
369702
369742
|
const selectedById = /* @__PURE__ */ new Map();
|
|
369703
369743
|
const duplicateAliases = /* @__PURE__ */ new Map();
|
|
369704
369744
|
const semanticallyRankedChunkIds = /* @__PURE__ */ new Set();
|
|
369745
|
+
const validatedReranks = /* @__PURE__ */ new Map();
|
|
369705
369746
|
const literalQueries = [query];
|
|
369706
369747
|
const literalExactStrings = /* @__PURE__ */ new Set();
|
|
369707
369748
|
const maxBlockChars = Math.max(2e3, Math.floor(input2.maxBlockChars ?? 7200));
|
|
@@ -369739,13 +369780,13 @@ async function buildLiveVirtualContextProjection(input2) {
|
|
|
369739
369780
|
const candidateLimit3 = Math.max(100, Math.min(200, rerankLimit * 2));
|
|
369740
369781
|
const sourceCap = Math.max(3, Math.min(20, Math.ceil(targetEvidenceChunks / 4)));
|
|
369741
369782
|
while (decision2 && !decision2.evidenceSufficient && retrievalRounds < maxRounds) {
|
|
369742
|
-
const plan = scopedPlan(decision2, input2.scopeId);
|
|
369783
|
+
const plan = scopedPlan(decision2, input2.scopeId, [...excludeDocumentIds]);
|
|
369743
369784
|
for (const subquery of plan.subqueries) {
|
|
369744
369785
|
literalQueries.push(subquery.query, ...subquery.entities ?? [], ...subquery.symbols ?? []);
|
|
369745
369786
|
for (const exact3 of subquery.exactStrings ?? [])
|
|
369746
369787
|
literalExactStrings.add(exact3);
|
|
369747
369788
|
}
|
|
369748
|
-
const memorySeeds = structuredMemorySeeds(input2, decision2);
|
|
369789
|
+
const memorySeeds = structuredMemorySeeds(input2, decision2, excludeDocumentIds);
|
|
369749
369790
|
const retriever = new HybridEvidenceRetriever(input2.store, {
|
|
369750
369791
|
candidateLimit: candidateLimit3,
|
|
369751
369792
|
cheapRerankLimit: rerankLimit,
|
|
@@ -369764,7 +369805,7 @@ async function buildLiveVirtualContextProjection(input2) {
|
|
|
369764
369805
|
system: RERANK_SYSTEM,
|
|
369765
369806
|
input: {
|
|
369766
369807
|
active_request: query,
|
|
369767
|
-
subqueries: plan.subqueries.map((subquery) =>
|
|
369808
|
+
subqueries: plan.subqueries.map((subquery) => subquery.query),
|
|
369768
369809
|
candidates: considered.map((candidate) => ({
|
|
369769
369810
|
chunk_id: candidate.chunk.id,
|
|
369770
369811
|
document_id: candidate.chunk.documentId,
|
|
@@ -369784,8 +369825,15 @@ async function buildLiveVirtualContextProjection(input2) {
|
|
|
369784
369825
|
considered.pop();
|
|
369785
369826
|
if (considered.length === 0)
|
|
369786
369827
|
return [];
|
|
369787
|
-
const
|
|
369788
|
-
|
|
369828
|
+
const rankingRequest = request();
|
|
369829
|
+
input2.signal?.throwIfAborted();
|
|
369830
|
+
const rankingKey = createHash74("sha256").update(JSON.stringify(rankingRequest)).digest("hex");
|
|
369831
|
+
let rankings = validatedReranks.get(rankingKey);
|
|
369832
|
+
if (!rankings) {
|
|
369833
|
+
rankings = parseRerank(await bounded6.infer(rankingRequest), considered) ?? void 0;
|
|
369834
|
+
if (rankings)
|
|
369835
|
+
validatedReranks.set(rankingKey, rankings);
|
|
369836
|
+
}
|
|
369789
369837
|
if (rankings)
|
|
369790
369838
|
rankings.forEach((rank) => {
|
|
369791
369839
|
if (rank.score > 0)
|
|
@@ -370824,13 +370872,13 @@ init_dist2();
|
|
|
370824
370872
|
import { createHash as createHash80 } from "node:crypto";
|
|
370825
370873
|
import { isDeepStrictEqual as isDeepStrictEqual6 } from "node:util";
|
|
370826
370874
|
import { existsSync as existsSync36, realpathSync as realpathSync20 } from "node:fs";
|
|
370827
|
-
import { join as join53, relative as
|
|
370875
|
+
import { join as join53, relative as relative19, isAbsolute as isAbsolute21 } from "node:path";
|
|
370828
370876
|
|
|
370829
370877
|
// packages/orchestrator/dist/successful-procedure-memory.js
|
|
370830
370878
|
init_dist2();
|
|
370831
370879
|
import { createHash as createHash79 } from "node:crypto";
|
|
370832
370880
|
import { lstatSync as lstatSync11, mkdirSync as mkdirSync28, readFileSync as readFileSync38, realpathSync as realpathSync18 } from "node:fs";
|
|
370833
|
-
import { isAbsolute as isAbsolute20, join as join51, resolve as resolve30 } from "node:path";
|
|
370881
|
+
import { isAbsolute as isAbsolute20, join as join51, relative as relative17, resolve as resolve30, sep as sep6 } from "node:path";
|
|
370834
370882
|
|
|
370835
370883
|
// packages/orchestrator/dist/memory-consolidation.js
|
|
370836
370884
|
var noteIdentity = (value) => typeof value === "string" && value.length > 0 && value.length <= 4096 && value === value.trim();
|
|
@@ -371876,6 +371924,12 @@ function checkedCurrent(assertCurrent) {
|
|
|
371876
371924
|
if (typeof assertCurrent !== "function" || assertCurrent() !== void 0)
|
|
371877
371925
|
throw new Error("Current procedure owner must be checked synchronously");
|
|
371878
371926
|
}
|
|
371927
|
+
function inWorkspace(root2, path13) {
|
|
371928
|
+
if (!isAbsolute20(path13) || resolve30(path13) !== path13)
|
|
371929
|
+
return false;
|
|
371930
|
+
const local = relative17(root2, path13);
|
|
371931
|
+
return local !== ".." && !local.startsWith(`..${sep6}`) && !isAbsolute20(local);
|
|
371932
|
+
}
|
|
371879
371933
|
function validateFiles(procedure) {
|
|
371880
371934
|
validateScope(procedure.scope);
|
|
371881
371935
|
if (!["omnius.successful-procedure.v1", "omnius.successful-procedure.v2"].includes(procedure.schema) || !identifier(procedure.runId) || !Number.isSafeInteger(procedure.taskEpoch) || procedure.taskEpoch <= 0)
|
|
@@ -371904,6 +371958,7 @@ function validateFiles(procedure) {
|
|
|
371904
371958
|
}
|
|
371905
371959
|
} else
|
|
371906
371960
|
throw new Error("Unknown successful-procedure verification");
|
|
371961
|
+
return terminal;
|
|
371907
371962
|
}
|
|
371908
371963
|
var queryCache = /* @__PURE__ */ new Map();
|
|
371909
371964
|
function scrubText(text20, sanitizeText, max = 2e3) {
|
|
@@ -372037,14 +372092,54 @@ var SuccessfulProcedureMemory = class {
|
|
|
372037
372092
|
const baseUrl = config2.baseUrl, model3 = modelName(config2.model);
|
|
372038
372093
|
return { baseUrl, model: model3, sha256: sha16(json4([baseUrl, model3])) };
|
|
372039
372094
|
}
|
|
372040
|
-
|
|
372095
|
+
storedProcedure(item, scope2) {
|
|
372041
372096
|
const procedure = item.metadata.procedure;
|
|
372042
372097
|
const owner2 = this.store.getScopeById(item.scopeId);
|
|
372043
372098
|
if (item.kind !== "procedure" || item.source !== "verified_user_task" || item.deletedAt || item.expiresAt && item.expiresAt <= (/* @__PURE__ */ new Date()).toISOString() || !procedure || item.metadata.procedureSha256 !== sha16(json4(procedure)) || item.body !== formatCase(procedure) || item.title !== procedure.goal || !owner2 || owner2.name !== scopeName(procedure.scope) || owner2.repoRoot !== procedure.scope.workspaceKey || owner2.sourceSurface !== procedure.scope.surface || owner2.isolationLevel !== "owner" || owner2.metadata.ownerKey !== procedure.scope.ownerKey || scope2 && json4(scope2) !== json4(procedure.scope) || item.id !== `procedure:${sha16(json4([owner2.name, procedure.runId, procedure.taskEpoch]))}` || item.contentHash !== sha16([item.scopeId, item.kind, item.source, item.title, item.body].join("\0")))
|
|
372044
372099
|
throw new Error("Successful-procedure embedding source changed");
|
|
372100
|
+
return procedure;
|
|
372101
|
+
}
|
|
372102
|
+
checkedStoredProcedure(item, scope2) {
|
|
372103
|
+
const procedure = this.storedProcedure(item, scope2);
|
|
372045
372104
|
validateFiles(procedure);
|
|
372046
372105
|
return procedure;
|
|
372047
372106
|
}
|
|
372107
|
+
/** Exact, opt-in offline source read. Only real executed verification
|
|
372108
|
+
* retained in the committed terminal may qualify an imitation example. */
|
|
372109
|
+
readImitationExample(input2) {
|
|
372110
|
+
checkedCurrent(input2.assertCurrent);
|
|
372111
|
+
input2.signal?.throwIfAborted();
|
|
372112
|
+
validateScope(input2.scope);
|
|
372113
|
+
if (!/^procedure:[a-f0-9]{64}$/.test(input2.procedureId))
|
|
372114
|
+
throw new Error("Invalid imitation procedure identity");
|
|
372115
|
+
const item = this.store.getItem(input2.procedureId);
|
|
372116
|
+
if (!item)
|
|
372117
|
+
throw new Error("Imitation procedure unavailable");
|
|
372118
|
+
const procedure = this.storedProcedure(item, input2.scope);
|
|
372119
|
+
const stateRoot = join51(input2.scope.workspaceKey, ".omnius");
|
|
372120
|
+
for (const file of [procedure.trace, procedure.terminalReceipt, ...procedure.deliveryRecords]) {
|
|
372121
|
+
if (file.path === stateRoot || !inWorkspace(stateRoot, file.path) || lstatSync11(file.path).size > 8 * 1024 ** 2)
|
|
372122
|
+
throw new Error("Imitation source is outside owned state or exceeds its size limit");
|
|
372123
|
+
}
|
|
372124
|
+
const terminal = validateFiles(procedure);
|
|
372125
|
+
const readiness = terminal.completionReadiness;
|
|
372126
|
+
if (terminal.status !== "completed" || terminal.verificationAudit?.status !== "no_observed_gap" || terminal.verificationAudit.gaps.length || terminal.expectedOutcomeAssessment?.satisfied === false || terminal.overrideReceiptId || terminal.unresolvedIds?.length || readiness?.disposition !== "ready" || !readiness.successfulCompletionAllowed || readiness.runId !== procedure.runId || readiness.taskEpoch !== procedure.taskEpoch || readiness.readinessHash !== terminal.readinessHash || !hex.test(readiness.readinessHash) || readiness.unresolvedIds.length || !Array.isArray(terminal.evidenceIds) || !Array.isArray(terminal.commandReceipts))
|
|
372127
|
+
throw new Error("Imitation requires terminal completion with verified readiness");
|
|
372128
|
+
const verifierEvidenceIds = terminal.commandReceipts.filter((receipt) => receipt.role === "verification" && receipt.exitCode === 0 && receipt.timedOut === false && identifier(receipt.canonicalCommand) && identifier(receipt.evidenceId) && terminal.evidenceIds.includes(receipt.evidenceId) && identifier(receipt.cwd) && inWorkspace(input2.scope.workspaceKey, receipt.cwd) && Number.isFinite(Date.parse(receipt.startedAtIso)) && Date.parse(receipt.startedAtIso) <= Date.parse(receipt.finishedAtIso) && Date.parse(receipt.finishedAtIso) <= Date.parse(terminal.committedAtIso) && procedure.actions.some((action) => action.tool === receipt.toolName && action.arguments?.command === receipt.command && (action.arguments.cwd === void 0 || resolve30(input2.scope.workspaceKey, String(action.arguments.cwd)) === receipt.cwd))).map((receipt) => receipt.evidenceId);
|
|
372129
|
+
if (!verifierEvidenceIds.length)
|
|
372130
|
+
throw new Error("Imitation requires independently observed execution evidence joined to the successful trace");
|
|
372131
|
+
checkedCurrent(input2.assertCurrent);
|
|
372132
|
+
input2.signal?.throwIfAborted();
|
|
372133
|
+
return {
|
|
372134
|
+
procedureId: item.id,
|
|
372135
|
+
procedureSha256: sha16(json4(procedure)),
|
|
372136
|
+
traceSha256: procedure.trace.sha256,
|
|
372137
|
+
terminalSha256: procedure.terminalReceipt.sha256,
|
|
372138
|
+
goal: procedure.goal,
|
|
372139
|
+
successfulTools: [...new Set(procedure.actions.map((action) => action.tool))],
|
|
372140
|
+
verifierEvidenceIds: [...new Set(verifierEvidenceIds)].sort()
|
|
372141
|
+
};
|
|
372142
|
+
}
|
|
372048
372143
|
hasProcedureVector(chunk, profile3) {
|
|
372049
372144
|
return this.store.getChunkEmbeddings(chunk.id).some((embedding) => {
|
|
372050
372145
|
const set = this.store.getEmbeddingSetById(embedding.embeddingSetId);
|
|
@@ -372284,7 +372379,7 @@ var SuccessfulProcedureMemory = class {
|
|
|
372284
372379
|
input2.signal?.throwIfAborted();
|
|
372285
372380
|
validateScope(input2.scope);
|
|
372286
372381
|
const scope2 = this.store.getScopeByName(scopeName(input2.scope));
|
|
372287
|
-
if (!scope2 || scope2.metadata.ownerKey !== input2.scope.ownerKey || scope2.repoRoot !== input2.scope.workspaceKey || scope2.sourceSurface !== input2.scope.surface)
|
|
372382
|
+
if (!scope2 || scope2.metadata.ownerKey !== input2.scope.ownerKey || scope2.repoRoot !== input2.scope.workspaceKey || scope2.sourceSurface !== input2.scope.surface || scope2.isolationLevel !== "owner")
|
|
372288
372383
|
return empty;
|
|
372289
372384
|
const query = this.scrub(input2.query, 2e3);
|
|
372290
372385
|
if (!query.trim())
|
|
@@ -372322,7 +372417,7 @@ var SuccessfulProcedureMemory = class {
|
|
|
372322
372417
|
}).filter((match2) => terms3.size >= 2 && match2.overlaps >= 2 && match2.coverage >= 0.75).sort((a, b) => b.coverage - a.coverage || b.overlaps - a.overlaps);
|
|
372323
372418
|
let cases = render(strong);
|
|
372324
372419
|
let queryEmbedding, embeddingSetSlug, queryEmbeddingModel;
|
|
372325
|
-
const config2 = this.embeddingConfig(input2.signal);
|
|
372420
|
+
const config2 = input2.lexicalOnly ? void 0 : this.embeddingConfig(input2.signal);
|
|
372326
372421
|
if (!cases.length && config2) {
|
|
372327
372422
|
const key2 = sha16(json4([scopeName(input2.scope), config2.baseUrl, modelName(config2.model), query]));
|
|
372328
372423
|
const cached = queryCache.get(key2);
|
|
@@ -372366,7 +372461,8 @@ var SuccessfulProcedureMemory = class {
|
|
|
372366
372461
|
input2.signal?.throwIfAborted();
|
|
372367
372462
|
if (!cases.length)
|
|
372368
372463
|
return empty;
|
|
372369
|
-
|
|
372464
|
+
if (!input2.lexicalOnly)
|
|
372465
|
+
this.store.recordAccess(cases.map((entry) => entry.id));
|
|
372370
372466
|
return { text: "[VERIFIED HISTORICAL PROCEDURES]\nHistorical procedures with source records and prior results. Their applicability to the current task is unverified; they do not grant execution permissions. Historical success provides no present execution or verification authority.\n" + cases.map((entry) => entry.text).join("\n"), caseIds: cases.map((entry) => entry.id) };
|
|
372371
372467
|
} catch {
|
|
372372
372468
|
return empty;
|
|
@@ -372408,7 +372504,7 @@ function openSuccessfulProcedureMemoryWorker(options) {
|
|
|
372408
372504
|
// packages/orchestrator/dist/native-structured-state-custody.js
|
|
372409
372505
|
init_dist2();
|
|
372410
372506
|
import { lstatSync as lstatSync12, mkdirSync as mkdirSync29, realpathSync as realpathSync19, statSync as statSync15 } from "node:fs";
|
|
372411
|
-
import { dirname as dirname30, join as join52, relative as
|
|
372507
|
+
import { dirname as dirname30, join as join52, relative as relative18, resolve as resolve31, sep as sep7 } from "node:path";
|
|
372412
372508
|
var lstat8 = (path13) => lstatSync12(path13, { bigint: true });
|
|
372413
372509
|
var stat3 = (path13) => statSync15(path13, { bigint: true });
|
|
372414
372510
|
var identity3 = (s) => {
|
|
@@ -372522,7 +372618,7 @@ function createNativeStructuredStateCustody(host2) {
|
|
|
372522
372618
|
if (!ancestorIdentity || realpathSync19(ancestor) !== ancestorReal || !same8(stat3(ancestor), ancestorIdentity))
|
|
372523
372619
|
deny();
|
|
372524
372620
|
let next = ancestor;
|
|
372525
|
-
for (const component2 of
|
|
372621
|
+
for (const component2 of relative18(ancestor, selected).split(sep7).filter(Boolean)) {
|
|
372526
372622
|
next = join52(next, component2);
|
|
372527
372623
|
try {
|
|
372528
372624
|
const s = lstat8(next);
|
|
@@ -372616,7 +372712,7 @@ function createNativeMemoryViews(host2) {
|
|
|
372616
372712
|
const candidate = join53(root2, ".omnius", name);
|
|
372617
372713
|
if (!existsSync36(candidate))
|
|
372618
372714
|
throw new Error("store_missing");
|
|
372619
|
-
const real = realpathSync20(candidate), rel =
|
|
372715
|
+
const real = realpathSync20(candidate), rel = relative19(root2, real);
|
|
372620
372716
|
if (isAbsolute21(rel) || rel === ".." || rel.startsWith("../"))
|
|
372621
372717
|
throw new Error("scope_denied");
|
|
372622
372718
|
return real;
|
|
@@ -374080,7 +374176,7 @@ async function* parseOpenAIChatStream(response, options = {}) {
|
|
|
374080
374176
|
import { constants as constants10 } from "node:fs";
|
|
374081
374177
|
import { open as open6, realpath as realpath7, stat as stat4 } from "node:fs/promises";
|
|
374082
374178
|
import { createHash as createHash84, randomUUID as randomUUID52 } from "node:crypto";
|
|
374083
|
-
import { isAbsolute as isAbsolute22, relative as
|
|
374179
|
+
import { isAbsolute as isAbsolute22, relative as relative20, resolve as resolve33 } from "node:path";
|
|
374084
374180
|
|
|
374085
374181
|
// packages/orchestrator/dist/taskWorkDelegation.js
|
|
374086
374182
|
var hash19 = (value) => typeof value === "string" && /^[a-f0-9]{64}$/.test(value);
|
|
@@ -374227,7 +374323,7 @@ async function reopenSource(root2, source2, signal, current6) {
|
|
|
374227
374323
|
current6();
|
|
374228
374324
|
signal.throwIfAborted();
|
|
374229
374325
|
const realRoot = await realpath7(root2), path13 = resolve33(source2.path), actual = await realpath7(path13);
|
|
374230
|
-
const rel =
|
|
374326
|
+
const rel = relative20(realRoot, actual);
|
|
374231
374327
|
if (actual !== path13 || !rel || rel === ".." || rel.startsWith("../") || isAbsolute22(rel))
|
|
374232
374328
|
throw new Error("Document worker source is outside its exact workspace grant");
|
|
374233
374329
|
const handle2 = await open6(path13, constants10.O_RDONLY | (constants10.O_NOFOLLOW ?? 0));
|
|
@@ -374454,11 +374550,11 @@ var DurableDocumentWorkerCoordinator = class {
|
|
|
374454
374550
|
|
|
374455
374551
|
// packages/orchestrator/dist/document-worker-persistence.js
|
|
374456
374552
|
import { constants as constants11, closeSync as closeSync14, fstatSync as fstatSync5, openSync as openSync14, readFileSync as readFileSync40, realpathSync as realpathSync21, statSync as statSync17 } from "node:fs";
|
|
374457
|
-
import { isAbsolute as isAbsolute23, relative as
|
|
374553
|
+
import { isAbsolute as isAbsolute23, relative as relative21, resolve as resolve34 } from "node:path";
|
|
374458
374554
|
import { createHash as createHash85 } from "node:crypto";
|
|
374459
374555
|
var sha18 = (value) => createHash85("sha256").update(value).digest("hex");
|
|
374460
374556
|
function reopenBytes(root2, path13, expected) {
|
|
374461
|
-
const actualRoot = realpathSync21(root2), actual = realpathSync21(path13), rel =
|
|
374557
|
+
const actualRoot = realpathSync21(root2), actual = realpathSync21(path13), rel = relative21(actualRoot, actual);
|
|
374462
374558
|
if (actual !== resolve34(path13) || !rel || rel === ".." || rel.startsWith("../") || isAbsolute23(rel))
|
|
374463
374559
|
throw new Error("Document persistence source is outside its exact workspace");
|
|
374464
374560
|
const fd = openSync14(actual, constants11.O_RDONLY | constants11.O_NOFOLLOW);
|
|
@@ -377008,21 +377104,21 @@ function renderFeatureWorkflowStatus(plan, status2, maxChars = 2200) {
|
|
|
377008
377104
|
init_dist();
|
|
377009
377105
|
import { createHash as createHash97 } from "node:crypto";
|
|
377010
377106
|
import { readFileSync as readFileSync45, realpathSync as realpathSync24, statSync as statSync21 } from "node:fs";
|
|
377011
|
-
import { isAbsolute as isAbsolute25, relative as
|
|
377107
|
+
import { isAbsolute as isAbsolute25, relative as relative23, resolve as resolve39 } from "node:path";
|
|
377012
377108
|
|
|
377013
377109
|
// packages/orchestrator/dist/featureWorkflow.js
|
|
377014
377110
|
init_dist();
|
|
377015
377111
|
init_dist5();
|
|
377016
377112
|
import { createHash as createHash96 } from "node:crypto";
|
|
377017
377113
|
import { closeSync as closeSync18, existsSync as existsSync39, fsyncSync as fsyncSync11, lstatSync as lstatSync13, mkdirSync as mkdirSync32, openSync as openSync18, readFileSync as readFileSync44, readdirSync as readdirSync13, realpathSync as realpathSync23, renameSync as renameSync16, statSync as statSync20, unlinkSync as unlinkSync18, writeFileSync as writeFileSync29 } from "node:fs";
|
|
377018
|
-
import { dirname as dirname33, isAbsolute as isAbsolute24, join as join57, relative as
|
|
377114
|
+
import { dirname as dirname33, isAbsolute as isAbsolute24, join as join57, relative as relative22, resolve as resolve38 } from "node:path";
|
|
377019
377115
|
import { z as z25 } from "zod";
|
|
377020
377116
|
|
|
377021
377117
|
// packages/orchestrator/dist/contentAddressedArtifactStore.js
|
|
377022
377118
|
import { createHash as createHash95, randomUUID as randomUUID55 } from "node:crypto";
|
|
377023
377119
|
import { constants as constants13, closeSync as closeSync17, existsSync as existsSync38, fstatSync as fstatSync7, fsyncSync as fsyncSync10, mkdirSync as mkdirSync31, openSync as openSync17, readFileSync as readFileSync43, readSync as readSync3, readdirSync as readdirSync12, renameSync as renameSync15, statSync as statSync19, unlinkSync as unlinkSync17, writeFileSync as writeFileSync28 } from "node:fs";
|
|
377024
377120
|
import { open as open8, mkdir as mkdir7, link as link3, rename as rename3, unlink as unlink4 } from "node:fs/promises";
|
|
377025
|
-
import { join as join56, resolve as resolve37, sep as
|
|
377121
|
+
import { join as join56, resolve as resolve37, sep as sep8 } from "node:path";
|
|
377026
377122
|
var REFERENCE_PREFIX = "omnius-artifact://sha256/";
|
|
377027
377123
|
var SHA2562 = /^[a-f0-9]{64}$/;
|
|
377028
377124
|
var DEFAULT_MAX_ARTIFACT_BYTES = 32 * 1024 * 1024;
|
|
@@ -377294,7 +377390,7 @@ function sliceExactLines(content, requested, totalLines) {
|
|
|
377294
377390
|
return content.slice(startOffset, endOffset);
|
|
377295
377391
|
}
|
|
377296
377392
|
function isWithinRoot(root2, target2) {
|
|
377297
|
-
return target2 === root2 || target2.startsWith(`${root2}${
|
|
377393
|
+
return target2 === root2 || target2.startsWith(`${root2}${sep8}`);
|
|
377298
377394
|
}
|
|
377299
377395
|
function safeJoin(root2, ...segments) {
|
|
377300
377396
|
const target2 = resolve37(root2, ...segments);
|
|
@@ -378138,7 +378234,7 @@ function compileFeatureWorkflow(input2) {
|
|
|
378138
378234
|
return { plan, cards, todos };
|
|
378139
378235
|
}
|
|
378140
378236
|
function isWithinDirectory(root2, path13) {
|
|
378141
|
-
const rel =
|
|
378237
|
+
const rel = relative22(root2, path13);
|
|
378142
378238
|
return rel !== ".." && !rel.startsWith("../") && !isAbsolute24(rel);
|
|
378143
378239
|
}
|
|
378144
378240
|
function canonicalFuturePath(path13) {
|
|
@@ -378161,7 +378257,7 @@ function canonicalFuturePath(path13) {
|
|
|
378161
378257
|
const parent = dirname33(ancestor);
|
|
378162
378258
|
if (parent === ancestor)
|
|
378163
378259
|
throw error;
|
|
378164
|
-
missing3.unshift(
|
|
378260
|
+
missing3.unshift(relative22(parent, ancestor));
|
|
378165
378261
|
ancestor = parent;
|
|
378166
378262
|
}
|
|
378167
378263
|
}
|
|
@@ -378187,7 +378283,7 @@ function featureWorkflowWorkspaceRevision(workingDir, plan) {
|
|
|
378187
378283
|
let total = 0;
|
|
378188
378284
|
return hash20(paths3.map((path13) => {
|
|
378189
378285
|
const file = canonicalWorkspaceTarget(root2, path13);
|
|
378190
|
-
const rel =
|
|
378286
|
+
const rel = relative22(root2, resolve38(root2, path13));
|
|
378191
378287
|
if (!existsSync39(file))
|
|
378192
378288
|
return { path: rel, sha256: null };
|
|
378193
378289
|
const real = file;
|
|
@@ -379394,7 +379490,7 @@ Inspect feature_workflow status and reconcile the persisted operation before con
|
|
|
379394
379490
|
throw new Error("feature_workflow_invalid_artifact_owner");
|
|
379395
379491
|
const root2 = realpathSync24(this.options.workingDir);
|
|
379396
379492
|
const path13 = realpathSync24(resolve39(root2, args.path));
|
|
379397
|
-
const local =
|
|
379493
|
+
const local = relative23(root2, path13);
|
|
379398
379494
|
if (local.startsWith("..") || isAbsolute25(local))
|
|
379399
379495
|
throw new Error("feature_workflow_artifact_outside_workspace");
|
|
379400
379496
|
const stat8 = statSync21(path13);
|
|
@@ -386615,6 +386711,9 @@ function selectTaskValidationEvidence(input2) {
|
|
|
386615
386711
|
const command = input2.command.trim();
|
|
386616
386712
|
if (!successfulTaskValidationExecution(input2) || !input2.toolCallId || !Number.isInteger(input2.turn) || input2.turn < 0)
|
|
386617
386713
|
return null;
|
|
386714
|
+
const invocation = classifyVerificationInvocation(command, input2.executionReceipt);
|
|
386715
|
+
if (invocation.framework === "python_unittest" && (!input2.executionReceipt || input2.observation?.quality !== "assertive" || input2.observation.passed !== true || !(Number(input2.observation.assertionsExecuted) > 0)))
|
|
386716
|
+
return null;
|
|
386618
386717
|
const declared2 = input2.matchedDeclaredCommand?.trim();
|
|
386619
386718
|
if (declared2) {
|
|
386620
386719
|
if (!commandVerifiesFinalState(command, declared2, input2.executionReceipt))
|
|
@@ -386626,7 +386725,6 @@ function selectTaskValidationEvidence(input2) {
|
|
|
386626
386725
|
toolCallId: input2.toolCallId
|
|
386627
386726
|
};
|
|
386628
386727
|
}
|
|
386629
|
-
const invocation = classifyVerificationInvocation(command, input2.executionReceipt);
|
|
386630
386728
|
if (input2.observation?.quality !== "assertive" || input2.observation.passed !== true || invocation.kind === "inspection" || invocation.kind !== "validation" && !(invocation.substantiveStageCount === 1 && Number(input2.observation.assertionsExecuted) > 0))
|
|
386631
386729
|
return null;
|
|
386632
386730
|
return {
|
|
@@ -388663,7 +388761,7 @@ function summarizeMAST(tags) {
|
|
|
388663
388761
|
|
|
388664
388762
|
// packages/orchestrator/dist/artifact-inspector.js
|
|
388665
388763
|
import { existsSync as existsSync46, statSync as statSync23 } from "node:fs";
|
|
388666
|
-
import { isAbsolute as isAbsolute26, relative as
|
|
388764
|
+
import { isAbsolute as isAbsolute26, relative as relative24, resolve as resolve42, sep as sep9 } from "node:path";
|
|
388667
388765
|
import { tmpdir as tmpdir7 } from "node:os";
|
|
388668
388766
|
function extractCandidatePaths(content) {
|
|
388669
388767
|
const out = /* @__PURE__ */ new Set();
|
|
@@ -388682,8 +388780,8 @@ function resolveAgainstWorkingDir(workingDir, p) {
|
|
|
388682
388780
|
return isAbsolute26(p) ? p : resolve42(workingDir, p);
|
|
388683
388781
|
}
|
|
388684
388782
|
function isPathInside(path13, parent) {
|
|
388685
|
-
const rel =
|
|
388686
|
-
return rel === "" || !rel.startsWith(`..${
|
|
388783
|
+
const rel = relative24(parent, path13);
|
|
388784
|
+
return rel === "" || !rel.startsWith(`..${sep9}`) && rel !== ".." && !isAbsolute26(rel);
|
|
388687
388785
|
}
|
|
388688
388786
|
function isExternalSystemTempArtifact(workingDir, candidate) {
|
|
388689
388787
|
const resolved = resolveAgainstWorkingDir(workingDir, candidate);
|
|
@@ -388971,7 +389069,7 @@ function pruneOldCheckpoints(args) {
|
|
|
388971
389069
|
|
|
388972
389070
|
// packages/orchestrator/dist/world-state-disk-scan.js
|
|
388973
389071
|
import { existsSync as existsSync49, readFileSync as readFileSync55, readdirSync as readdirSync16, statSync as statSync24 } from "node:fs";
|
|
388974
|
-
import { join as join67, relative as
|
|
389072
|
+
import { join as join67, relative as relative25, basename as basename19 } from "node:path";
|
|
388975
389073
|
var UNIVERSAL_DEFAULTS = [
|
|
388976
389074
|
// VCS / IDE
|
|
388977
389075
|
".git",
|
|
@@ -389133,7 +389231,7 @@ function scanWorkspace(opts) {
|
|
|
389133
389231
|
const st = statSync24(dir);
|
|
389134
389232
|
dirs.push({
|
|
389135
389233
|
abs: dir,
|
|
389136
|
-
rel:
|
|
389234
|
+
rel: relative25(root2, dir) || ".",
|
|
389137
389235
|
mtimeMs: st.mtimeMs
|
|
389138
389236
|
});
|
|
389139
389237
|
} catch {
|
|
@@ -389149,7 +389247,7 @@ function scanWorkspace(opts) {
|
|
|
389149
389247
|
const dirsToVisit = [];
|
|
389150
389248
|
for (const entry of entries) {
|
|
389151
389249
|
const abs = join67(dir, entry);
|
|
389152
|
-
const rel =
|
|
389250
|
+
const rel = relative25(root2, abs);
|
|
389153
389251
|
const base = basename19(abs);
|
|
389154
389252
|
if (shouldIgnore(rel, base, abs, patterns))
|
|
389155
389253
|
continue;
|
|
@@ -399985,7 +400083,7 @@ function validateMemoryCompilationPlan(input2) {
|
|
|
399985
400083
|
// packages/orchestrator/dist/debugArtifactLibrary.js
|
|
399986
400084
|
import { appendFileSync as appendFileSync9, existsSync as existsSync61, mkdirSync as mkdirSync46, readFileSync as readFileSync66, statSync as statSync31, writeFileSync as writeFileSync42, closeSync as closeSync24, fsyncSync as fsyncSync16, openSync as openSync24, readSync as readSync5, renameSync as renameSync25, unlinkSync as unlinkSync24 } from "node:fs";
|
|
399987
400085
|
import { createHash as createHash131, randomUUID as randomUUID61 } from "node:crypto";
|
|
399988
|
-
import { basename as basename21, dirname as dirname44, join as join78, relative as
|
|
400086
|
+
import { basename as basename21, dirname as dirname44, join as join78, relative as relative26, resolve as resolve46 } from "node:path";
|
|
399989
400087
|
var DEBUG_LIBRARY_DIR = "debug-library";
|
|
399990
400088
|
var RUN_EVENTS_LIMIT = 40;
|
|
399991
400089
|
var PREVIEW_LIMIT = 4e3;
|
|
@@ -400366,7 +400464,7 @@ function writeEventAndIndexes(paths3, event, originalPath) {
|
|
|
400366
400464
|
event.anchors = event.anchors.map((anchor) => anchor.label === "event_json" ? {
|
|
400367
400465
|
...anchor,
|
|
400368
400466
|
path: eventPath,
|
|
400369
|
-
relativePath:
|
|
400467
|
+
relativePath: relative26(event.cwd, eventPath)
|
|
400370
400468
|
} : anchor);
|
|
400371
400469
|
mkdirSync46(dirname44(eventPath), { recursive: true, mode: 448 });
|
|
400372
400470
|
if (!existsSync61(paths3.contractPath))
|
|
@@ -400643,7 +400741,7 @@ function buildAnchors(cwd, runId, paths3, extra = []) {
|
|
|
400643
400741
|
return {
|
|
400644
400742
|
...item,
|
|
400645
400743
|
path: absolute3,
|
|
400646
|
-
relativePath:
|
|
400744
|
+
relativePath: relative26(cwd, absolute3) || basename21(absolute3),
|
|
400647
400745
|
exists: item.kind === "event" && item.label === "event_json" ? true : pathExists(absolute3)
|
|
400648
400746
|
};
|
|
400649
400747
|
});
|
|
@@ -400975,7 +401073,7 @@ function writeGlobalReadme(paths3, latestRun) {
|
|
|
400975
401073
|
"This directory indexes run-level debugging artifacts and links back to raw Omnius state.",
|
|
400976
401074
|
"",
|
|
400977
401075
|
`Latest run: ${latestRun.runId}`,
|
|
400978
|
-
`Contract: ${
|
|
401076
|
+
`Contract: ${relative26(paths3.root, paths3.contractPath)}`,
|
|
400979
401077
|
"",
|
|
400980
401078
|
"## Recent Runs",
|
|
400981
401079
|
"",
|
|
@@ -405048,7 +405146,7 @@ init_dist2();
|
|
|
405048
405146
|
import { createHash as createHash136 } from "node:crypto";
|
|
405049
405147
|
import { lstat as lstat10, realpath as realpath9 } from "node:fs/promises";
|
|
405050
405148
|
import { isDeepStrictEqual as isDeepStrictEqual9 } from "node:util";
|
|
405051
|
-
import { isAbsolute as isAbsolute30, join as join79, relative as
|
|
405149
|
+
import { isAbsolute as isAbsolute30, join as join79, relative as relative27, sep as sep10 } from "node:path";
|
|
405052
405150
|
var sha28 = (text20) => createHash136("sha256").update(text20).digest("hex");
|
|
405053
405151
|
function finite6(value) {
|
|
405054
405152
|
if (typeof value === "number" && !Number.isFinite(value))
|
|
@@ -405071,8 +405169,8 @@ function text15(value) {
|
|
|
405071
405169
|
throw new Error("Missing native source identity");
|
|
405072
405170
|
}
|
|
405073
405171
|
function contains2(root2, path13) {
|
|
405074
|
-
const rel =
|
|
405075
|
-
return rel !== ".." && !rel.startsWith(`..${
|
|
405172
|
+
const rel = relative27(root2, path13);
|
|
405173
|
+
return rel !== ".." && !rel.startsWith(`..${sep10}`) && !isAbsolute30(rel);
|
|
405076
405174
|
}
|
|
405077
405175
|
function stable6(value) {
|
|
405078
405176
|
if (Array.isArray(value))
|
|
@@ -405844,8 +405942,8 @@ async function planChunks(input2, facets2, deadline) {
|
|
|
405844
405942
|
if (selected <= start)
|
|
405845
405943
|
return { chunks: null, reason: "request_exceeds_context" };
|
|
405846
405944
|
if (selected < length) {
|
|
405847
|
-
const
|
|
405848
|
-
const newline =
|
|
405945
|
+
const relative50 = content.lastIndexOf("\n", selected - windowStart - 1);
|
|
405946
|
+
const newline = relative50 < 0 ? -1 : windowStart + relative50;
|
|
405849
405947
|
if (newline >= start + (selected - start) * 0.8)
|
|
405850
405948
|
selected = newline + 1;
|
|
405851
405949
|
}
|
|
@@ -405895,12 +405993,12 @@ function validateWorkerResult(value, chunk, source2, facets2, sourceStart = 0) {
|
|
|
405895
405993
|
if (claimed !== void 0 && exactAt(claimed))
|
|
405896
405994
|
start = claimed;
|
|
405897
405995
|
else {
|
|
405898
|
-
const
|
|
405899
|
-
if (
|
|
405996
|
+
const relative50 = content.indexOf(quote);
|
|
405997
|
+
if (relative50 < 0)
|
|
405900
405998
|
return { code: claimed === void 0 ? "quote_not_found" : "quote_offset_mismatch" };
|
|
405901
|
-
if (content.indexOf(quote,
|
|
405999
|
+
if (content.indexOf(quote, relative50 + 1) !== -1)
|
|
405902
406000
|
return { code: claimed === void 0 ? "quote_ambiguous" : "quote_offset_mismatch" };
|
|
405903
|
-
start = chunk.presentedCharStart +
|
|
406001
|
+
start = chunk.presentedCharStart + relative50;
|
|
405904
406002
|
if (!exactAt(start))
|
|
405905
406003
|
return { code: "quote_offset_mismatch" };
|
|
405906
406004
|
}
|
|
@@ -406615,6 +406713,24 @@ function isDestructiveFix(fix) {
|
|
|
406615
406713
|
const added = (fix.to ?? []).filter((token5) => !before.has(token5));
|
|
406616
406714
|
return added.some((token5) => DESTRUCTIVE_PROGRAMS.has(token5) || /^mkfs(\.|$)/.test(token5) || token5 === "--hard" || token5 === "--force" || token5 === "-rf" || token5 === "-fr");
|
|
406617
406715
|
}
|
|
406716
|
+
var literalCommand = (command) => typeof command !== "string" || /[|&;\r\n<>`$"'\\]/.test(command) ? [] : tokenize5(command);
|
|
406717
|
+
function fixApplies(fix, tokens3) {
|
|
406718
|
+
const example = literalCommand(fix.example?.failed ?? "");
|
|
406719
|
+
const worked = literalCommand(fix.example?.worked ?? "");
|
|
406720
|
+
if (!example.length || !worked.length || tokens3[0] !== example[0])
|
|
406721
|
+
return false;
|
|
406722
|
+
const delta = computeDelta(example, worked);
|
|
406723
|
+
if (!delta || !sameFix(fix, delta.from, delta.to, fix.errorKey))
|
|
406724
|
+
return false;
|
|
406725
|
+
if (fix.errorKey === "not found") {
|
|
406726
|
+
return fix.from.length === 1 && fix.to.length === 1 && example[0] === fix.from[0] && worked[0] === fix.to[0] && worked.slice(1).join("\0") === example.slice(1).join("\0");
|
|
406727
|
+
}
|
|
406728
|
+
if (fix.errorKey !== "bad option" || example[0] !== worked[0] || fix.from.length !== 1 || fix.to.length > 1 || !fix.from[0].startsWith("-") || fix.to.some((token5) => !token5.startsWith("-")))
|
|
406729
|
+
return false;
|
|
406730
|
+
const index = example.indexOf(fix.from[0]);
|
|
406731
|
+
const position = tokens3.indexOf(fix.from[0]);
|
|
406732
|
+
return index > 0 && position > 0 && !tokens3.slice(1, position).includes("--") && example.slice(0, index).join("\0") === worked.slice(0, index).join("\0") && example.slice(index + 1).join("\0") === worked.slice(index + fix.to.length).join("\0");
|
|
406733
|
+
}
|
|
406618
406734
|
function isNearVariant(a, b) {
|
|
406619
406735
|
if (a.length === 0 || b.length === 0)
|
|
406620
406736
|
return false;
|
|
@@ -406647,7 +406763,7 @@ var ResolutionMemory = class {
|
|
|
406647
406763
|
/** Load prior fixes (cross-session). */
|
|
406648
406764
|
loadFixes(fixes) {
|
|
406649
406765
|
for (const f of fixes) {
|
|
406650
|
-
if (Array.isArray(f.from) && Array.isArray(f.to) && f.from.length > 0 && !isPathSensitiveFix(f) && !isDestructiveFix(f)) {
|
|
406766
|
+
if (f && Array.isArray(f.from) && Array.isArray(f.to) && f.from.length > 0 && [...f.from, ...f.to].every((token5) => typeof token5 === "string") && !isPathSensitiveFix(f) && !isDestructiveFix(f) && fixApplies(f, literalCommand(f.example?.failed ?? ""))) {
|
|
406651
406767
|
this.fixes.push(f);
|
|
406652
406768
|
}
|
|
406653
406769
|
}
|
|
@@ -406700,21 +406816,23 @@ var ResolutionMemory = class {
|
|
|
406700
406816
|
this.recentFailures.splice(i, 1);
|
|
406701
406817
|
return null;
|
|
406702
406818
|
}
|
|
406703
|
-
const
|
|
406819
|
+
const candidate = {
|
|
406820
|
+
...delta,
|
|
406821
|
+
errorKey: fail6.errorKey,
|
|
406822
|
+
example: { failed: fail6.command, worked: input2.command },
|
|
406823
|
+
count: 1,
|
|
406824
|
+
lastSeen: Date.now()
|
|
406825
|
+
};
|
|
406826
|
+
if (!fixApplies(candidate, literalCommand(fail6.command)))
|
|
406827
|
+
continue;
|
|
406828
|
+
const existing = this.fixes.find((f) => sameFix(f, delta.from, delta.to, fail6.errorKey) && fixApplies(f, literalCommand(fail6.command)));
|
|
406704
406829
|
if (existing) {
|
|
406705
406830
|
existing.count++;
|
|
406706
406831
|
existing.lastSeen = Date.now();
|
|
406707
406832
|
existing.example = { failed: fail6.command, worked: input2.command };
|
|
406708
406833
|
learned = existing;
|
|
406709
406834
|
} else {
|
|
406710
|
-
learned =
|
|
406711
|
-
from: delta.from,
|
|
406712
|
-
to: delta.to,
|
|
406713
|
-
errorKey: fail6.errorKey,
|
|
406714
|
-
example: { failed: fail6.command, worked: input2.command },
|
|
406715
|
-
count: 1,
|
|
406716
|
-
lastSeen: Date.now()
|
|
406717
|
-
};
|
|
406835
|
+
learned = candidate;
|
|
406718
406836
|
this.fixes.push(learned);
|
|
406719
406837
|
}
|
|
406720
406838
|
this.recentFailures.splice(i, 1);
|
|
@@ -406727,25 +406845,25 @@ var ResolutionMemory = class {
|
|
|
406727
406845
|
return learned;
|
|
406728
406846
|
}
|
|
406729
406847
|
/**
|
|
406730
|
-
* Suggest a
|
|
406731
|
-
* command contains the fix's `from` token sequence.
|
|
406848
|
+
* Suggest a scoped historical fix. A supplied failure must match its class.
|
|
406732
406849
|
*/
|
|
406733
|
-
suggest(command) {
|
|
406850
|
+
suggest(command, error) {
|
|
406734
406851
|
if (!command)
|
|
406735
406852
|
return null;
|
|
406736
|
-
const tokens3 =
|
|
406853
|
+
const tokens3 = literalCommand(command);
|
|
406854
|
+
const errorKey = error === void 0 ? void 0 : normalizeErrorKey(error);
|
|
406737
406855
|
let best = null;
|
|
406738
406856
|
for (const f of this.fixes) {
|
|
406739
406857
|
if (isPathSensitiveFix(f) || isDestructiveFix(f))
|
|
406740
406858
|
continue;
|
|
406741
|
-
if (f.
|
|
406859
|
+
if ((errorKey === void 0 || errorKey === f.errorKey) && fixApplies(f, tokens3)) {
|
|
406742
406860
|
if (!best || f.count > best.count)
|
|
406743
406861
|
best = f;
|
|
406744
406862
|
}
|
|
406745
406863
|
}
|
|
406746
406864
|
if (!best)
|
|
406747
406865
|
return null;
|
|
406748
|
-
const message3 = `[LEARNED FIX — from a prior session] A command using \`${best.from.join(" ")}\` failed with "${best.errorKey}"; the working form replaced it with \`${best.to.join(" ")}\` (
|
|
406866
|
+
const message3 = `[LEARNED FIX — from a prior session] A command using \`${best.from.join(" ")}\` failed with "${best.errorKey}"; the working form replaced it with \`${best.to.join(" ")}\` (observed ${best.count}×). Verify that this change applies before retrying.`;
|
|
406749
406867
|
return { fix: best, message: message3 };
|
|
406750
406868
|
}
|
|
406751
406869
|
};
|
|
@@ -407050,7 +407168,7 @@ function applySystemCacheControl(system, cacheTtl = "5m") {
|
|
|
407050
407168
|
// packages/orchestrator/dist/git-progress.js
|
|
407051
407169
|
import { existsSync as existsSync62, readFileSync as readFileSync67, realpathSync as realpathSync26, statSync as statSync32 } from "node:fs";
|
|
407052
407170
|
import { createHash as createHash141 } from "node:crypto";
|
|
407053
|
-
import { dirname as dirname45, isAbsolute as isAbsolute31, relative as
|
|
407171
|
+
import { dirname as dirname45, isAbsolute as isAbsolute31, relative as relative28, resolve as resolve48 } from "node:path";
|
|
407054
407172
|
var RUNNER_OWNED_PREFIXES = [".omnius/"];
|
|
407055
407173
|
var GENERATED_ARTIFACT_PATH_RE = /(^|\/)(?:\.pio\/build|node_modules|\.pnpm-store|\.cache|coverage|\.next|\.nuxt|target\/debug|target\/release)(\/|$)/i;
|
|
407056
407174
|
function isRunnerOwnedGitPath(path13) {
|
|
@@ -407153,7 +407271,7 @@ function pathsFromStatus(entries) {
|
|
|
407153
407271
|
return normalizePathList(entries.map((entry) => entry.path));
|
|
407154
407272
|
}
|
|
407155
407273
|
function pathWithin(root2, candidate) {
|
|
407156
|
-
const rel =
|
|
407274
|
+
const rel = relative28(resolve48(root2), resolve48(candidate));
|
|
407157
407275
|
return rel === "" || rel !== ".." && !rel.startsWith(`..${process.platform === "win32" ? "\\" : "/"}`) && !isAbsolute31(rel);
|
|
407158
407276
|
}
|
|
407159
407277
|
function normalizeMutatedPath(repoRoot, path13) {
|
|
@@ -407163,7 +407281,7 @@ function normalizeMutatedPath(repoRoot, path13) {
|
|
|
407163
407281
|
const absolute3 = isAbsolute31(raw) ? resolve48(raw) : resolve48(repoRoot, raw);
|
|
407164
407282
|
if (!pathWithin(repoRoot, absolute3))
|
|
407165
407283
|
return "";
|
|
407166
|
-
return normalizeGitPath(
|
|
407284
|
+
return normalizeGitPath(relative28(repoRoot, absolute3));
|
|
407167
407285
|
}
|
|
407168
407286
|
function nearestExistingPath(path13) {
|
|
407169
407287
|
let current6 = resolve48(path13);
|
|
@@ -407582,7 +407700,7 @@ function projectObjectiveProgressState(input2) {
|
|
|
407582
407700
|
|
|
407583
407701
|
// packages/orchestrator/dist/taskEffectEvidence.js
|
|
407584
407702
|
import { constants as constants14, closeSync as closeSync25, fstatSync as fstatSync8, openSync as openSync25, readFileSync as readFileSync68, realpathSync as realpathSync27, statSync as statSync33 } from "node:fs";
|
|
407585
|
-
import { dirname as dirname46, isAbsolute as isAbsolute32, relative as
|
|
407703
|
+
import { dirname as dirname46, isAbsolute as isAbsolute32, relative as relative29, resolve as resolve49 } from "node:path";
|
|
407586
407704
|
import { createHash as createHash142 } from "node:crypto";
|
|
407587
407705
|
|
|
407588
407706
|
// packages/orchestrator/dist/background-process-effect.js
|
|
@@ -407689,7 +407807,7 @@ function reopenTaskEffectStateEvidence(input2) {
|
|
|
407689
407807
|
root2 = realpathSync27(input2.workspaceRoot);
|
|
407690
407808
|
} catch {
|
|
407691
407809
|
}
|
|
407692
|
-
const confined = (path13) => !!root2 && !isAbsolute32(
|
|
407810
|
+
const confined = (path13) => !!root2 && !isAbsolute32(relative29(root2, path13)) && relative29(root2, path13) !== ".." && !relative29(root2, path13).startsWith("../");
|
|
407693
407811
|
const artifacts = [];
|
|
407694
407812
|
for (const [path13, sourceEvidenceIds] of [...targets].sort(([a], [b]) => a.localeCompare(b))) {
|
|
407695
407813
|
const artifact5 = { path: path13, sourceEvidenceIds, status: "unavailable" };
|
|
@@ -407850,7 +407968,7 @@ import { createHash as createHash145, randomUUID as randomUUID63 } from "node:cr
|
|
|
407850
407968
|
// packages/orchestrator/dist/authored-instruction-sources.js
|
|
407851
407969
|
import { createHash as createHash144 } from "node:crypto";
|
|
407852
407970
|
import { realpathSync as realpathSync28 } from "node:fs";
|
|
407853
|
-
import { resolve as resolve50, dirname as dirname47, basename as basename22, relative as
|
|
407971
|
+
import { resolve as resolve50, dirname as dirname47, basename as basename22, relative as relative30, isAbsolute as isAbsolute33 } from "node:path";
|
|
407854
407972
|
var AUTHORED_INSTRUCTION_SOURCES_SCHEMA = "omnius.authored-instruction-sources.v1";
|
|
407855
407973
|
var AUTHORED_INSTRUCTION_MARKER = "[AUTHORED PROJECT INSTRUCTIONS v1]";
|
|
407856
407974
|
var issued12 = /* @__PURE__ */ new WeakSet();
|
|
@@ -407864,7 +407982,7 @@ function canonicalInstructionWorkspace(root2) {
|
|
|
407864
407982
|
}
|
|
407865
407983
|
}
|
|
407866
407984
|
function scopedArtifactRoot(workspaceRoot, artifactRoot) {
|
|
407867
|
-
const remainder =
|
|
407985
|
+
const remainder = relative30(resolve50(workspaceRoot, ".omnius"), artifactRoot);
|
|
407868
407986
|
return remainder === "" || !remainder.startsWith("..") && !isAbsolute33(remainder);
|
|
407869
407987
|
}
|
|
407870
407988
|
var AuthoredInstructionSourceAdmissionError = class extends Error {
|
|
@@ -407903,7 +408021,7 @@ function isAuthoredInstructionSourcesV1(value) {
|
|
|
407903
408021
|
if (!object15(source2) || typeof source2.path !== "string" || !source2.path || source2.path.length > 4096 || !isAbsolute33(source2.path) || resolve50(source2.path) !== source2.path || !ancestors.has(dirname47(source2.path)) || typeof source2.displayPath !== "string" || !source2.displayPath || source2.displayPath.length > 4096 || !["agents", "omnius", "claude"].includes(source2.kind) || !Number.isSafeInteger(source2.order) || source2.order < 0 || !["captured", "unavailable", "removed", "absent"].includes(source2.status) || source2.reasonCode !== void 0 && !/^[a-z0-9_:-]{1,96}$/.test(source2.reasonCode) || source2.snapshot !== void 0 && !isAuthoredInstructionSnapshot(source2.snapshot) || source2.status === "captured" && !source2.snapshot || paths3.has(source2.path) || orders.has(source2.order))
|
|
407904
408022
|
return false;
|
|
407905
408023
|
const allowedNames = source2.kind === "agents" ? ["AGENTS.md"] : source2.kind === "omnius" ? ["Omnius.md", ".omnius.md"] : ["CLAUDE.md"];
|
|
407906
|
-
if (!allowedNames.includes(basename22(source2.path)) || source2.displayPath !== (
|
|
408024
|
+
if (!allowedNames.includes(basename22(source2.path)) || source2.displayPath !== (relative30(value.workspaceRoot, source2.path) || basename22(source2.path)))
|
|
407907
408025
|
return false;
|
|
407908
408026
|
paths3.add(source2.path);
|
|
407909
408027
|
orders.add(source2.order);
|
|
@@ -408281,7 +408399,7 @@ ${active ? snapshot2.content : ""}
|
|
|
408281
408399
|
init_dist5();
|
|
408282
408400
|
import { createHash as createHash147, randomUUID as randomUUID64 } from "node:crypto";
|
|
408283
408401
|
import { existsSync as existsSync63, realpathSync as realpathSync29 } from "node:fs";
|
|
408284
|
-
import { basename as basename23, dirname as dirname48, isAbsolute as isAbsolute34, relative as
|
|
408402
|
+
import { basename as basename23, dirname as dirname48, isAbsolute as isAbsolute34, relative as relative31, resolve as resolve51 } from "node:path";
|
|
408285
408403
|
var EXPLICIT_WORK_MODE_MARKER = "[EXPLICIT WORK MODE v1]";
|
|
408286
408404
|
var issued13 = /* @__PURE__ */ new WeakMap();
|
|
408287
408405
|
var hash23 = (text20) => createHash147("sha256").update(text20).digest("hex");
|
|
@@ -408293,7 +408411,7 @@ var root = (path13) => {
|
|
|
408293
408411
|
}
|
|
408294
408412
|
};
|
|
408295
408413
|
var within = (parent, path13) => {
|
|
408296
|
-
const rest =
|
|
408414
|
+
const rest = relative31(parent, path13);
|
|
408297
408415
|
return rest !== "" && !rest.startsWith("..") && !isAbsolute34(rest);
|
|
408298
408416
|
};
|
|
408299
408417
|
function canonicalTarget(path13) {
|
|
@@ -408303,7 +408421,7 @@ function canonicalTarget(path13) {
|
|
|
408303
408421
|
return parent === path13 ? path13 : resolve51(canonicalTarget(parent), basename23(path13));
|
|
408304
408422
|
}
|
|
408305
408423
|
function internal(path13, workspace, controls = []) {
|
|
408306
|
-
const parts =
|
|
408424
|
+
const parts = relative31(workspace, path13).split(/[\\/]/);
|
|
408307
408425
|
return parts.some((part) => [".omnius", ".git", ".codex", ".claude", ".agents", "node_modules"].includes(part)) || ["AGENTS.md", "CLAUDE.md", "Omnius.md", ".omnius.md"].includes(basename23(path13)) || controls.some((control2) => path13 === resolve51(control2) || within(resolve51(control2), path13));
|
|
408308
408426
|
}
|
|
408309
408427
|
function readIssuedExplicitWorkMode(value, workspace, sessionId) {
|
|
@@ -408430,7 +408548,7 @@ ${JSON.stringify({
|
|
|
408430
408548
|
source: "authenticated_native_user_selection",
|
|
408431
408549
|
runId: owner2.runId,
|
|
408432
408550
|
taskEpoch: owner2.taskEpoch,
|
|
408433
|
-
artifactPaths: current6.artifactPaths.map((path13) =>
|
|
408551
|
+
artifactPaths: current6.artifactPaths.map((path13) => relative31(owner2.workspaceRoot, path13)),
|
|
408434
408552
|
restriction: current6.mode === "plan" ? "audited native reads and exact authorized artifact file writes; unclassified shell/interpreters/delegation unavailable" : "ordinary current host permissions apply; prior planning restrictions are historical"
|
|
408435
408553
|
})}
|
|
408436
408554
|
[/EXPLICIT WORK MODE]`;
|
|
@@ -408543,12 +408661,12 @@ var MemoryCapabilityContext = class {
|
|
|
408543
408661
|
result.push(...adapters.filter(isMemoryCapabilityV1).slice(0, 32));
|
|
408544
408662
|
return result;
|
|
408545
408663
|
}
|
|
408546
|
-
project(messages4, capabilities2, maxChars = 8e3) {
|
|
408664
|
+
project(messages4, capabilities2, maxChars = 8e3, compact2 = false) {
|
|
408547
408665
|
if (!this.binding)
|
|
408548
408666
|
return messages4;
|
|
408549
408667
|
const owns = (message3) => message3.role === "system" && typeof message3.content === "string" && message3.requiredSourceEvidence && this.carriers.get(message3.requiredSourceEvidence.scope)?.has(memoryContentHash(message3.content));
|
|
408550
408668
|
const projected = messages4.filter((message3) => !owns(message3));
|
|
408551
|
-
this.content = renderMemoryCapabilitiesForModel(capabilities2, { maxChars });
|
|
408669
|
+
this.content = renderMemoryCapabilitiesForModel(capabilities2, { maxChars, compact: compact2 });
|
|
408552
408670
|
this.capabilityCount = capabilities2.length;
|
|
408553
408671
|
try {
|
|
408554
408672
|
const view = JSON.parse(this.content.split("\n")[1]);
|
|
@@ -412175,8 +412293,8 @@ ${JSON.stringify({
|
|
|
412175
412293
|
try {
|
|
412176
412294
|
const root2 = _fsRealpathSync(this.authoritativeWorkingDirectory());
|
|
412177
412295
|
const path13 = _fsRealpathSync(_pathResolve(root2, args["path"]));
|
|
412178
|
-
const
|
|
412179
|
-
if (!
|
|
412296
|
+
const relative50 = _pathRelative(root2, path13);
|
|
412297
|
+
if (!relative50 || relative50 === ".." || relative50.startsWith(`..${process.platform === "win32" ? "\\" : "/"}`) || _pathResolve(root2, relative50) !== path13)
|
|
412180
412298
|
return;
|
|
412181
412299
|
const stat8 = _fsStatSync(path13);
|
|
412182
412300
|
if (!stat8.isFile() || stat8.size > 128 * 1024 * 1024)
|
|
@@ -413244,6 +413362,7 @@ runtime_module_sha256=${record11.runtimeProvenance.module.sha256 ?? "unknown"}`
|
|
|
413244
413362
|
compactionPercent: options?.compactionPercent,
|
|
413245
413363
|
deepContext: options?.deepContext ?? false,
|
|
413246
413364
|
dynamicContext: options?.dynamicContext ?? "",
|
|
413365
|
+
compactTaskContext: options?.compactTaskContext ?? false,
|
|
413247
413366
|
authoredInstructionSources: options?.authoredInstructionSources,
|
|
413248
413367
|
explicitWorkMode: options?.explicitWorkMode,
|
|
413249
413368
|
explicitWorkModeCustody: options?.explicitWorkModeCustody,
|
|
@@ -413597,6 +413716,47 @@ runtime_module_sha256=${record11.runtimeProvenance.module.sha256 ?? "unknown"}`
|
|
|
413597
413716
|
sanitizeHistoricalProcedureText(text20) {
|
|
413598
413717
|
return quarantineString(text20, { hint: "historical-procedure" }, "project", this.authoritativeWorkingDirectory()).sanitized;
|
|
413599
413718
|
}
|
|
413719
|
+
async recallTerminalProcedureHints(task) {
|
|
413720
|
+
if (this.options.surface !== "tui" || !this.options.compactTaskContext)
|
|
413721
|
+
return "";
|
|
413722
|
+
const scope2 = this.userTaskNoteScope();
|
|
413723
|
+
const uid2 = process.getuid?.();
|
|
413724
|
+
if (!scope2 || uid2 === void 0 || scope2.ownerKey !== `local-uid:${uid2}`)
|
|
413725
|
+
return "";
|
|
413726
|
+
const databasePath = _pathJoin(scope2.workspaceKey, ".omnius", "unified-memory.db");
|
|
413727
|
+
if (!_fsExistsSync(databasePath))
|
|
413728
|
+
return "";
|
|
413729
|
+
const runId = this.currentArtifactRunId(), taskEpoch = this._taskEpoch, ownerId = this._interruptionOwnerId;
|
|
413730
|
+
const signal = AbortSignal.any([this._abortController.signal, this._updateAbortController.signal]);
|
|
413731
|
+
const assertCurrent = () => {
|
|
413732
|
+
signal.throwIfAborted();
|
|
413733
|
+
if (this.aborted || this.taskRequirementInterpretationPending || this.currentArtifactRunId() !== runId || this._taskEpoch !== taskEpoch || this._interruptionOwnerId !== ownerId || !_isDeepStrictEqual(this.userTaskNoteScope(), scope2))
|
|
413734
|
+
throw new Error("Terminal procedure recall lost its current task owner");
|
|
413735
|
+
};
|
|
413736
|
+
let database;
|
|
413737
|
+
try {
|
|
413738
|
+
assertCurrent();
|
|
413739
|
+
if (_fsRealpathSync(databasePath) !== databasePath || !_fsStatSync(databasePath).isFile())
|
|
413740
|
+
return "";
|
|
413741
|
+
database = openReadOnlyDb(databasePath);
|
|
413742
|
+
database.pragma("busy_timeout = 25");
|
|
413743
|
+
const memory = new SuccessfulProcedureMemory(new UnifiedMemoryStore(database, { readOnly: true }), {
|
|
413744
|
+
sanitizeText: (text20) => this.sanitizeHistoricalProcedureText(text20),
|
|
413745
|
+
maxPromptChars: 2e3
|
|
413746
|
+
});
|
|
413747
|
+
const currentSource = this.options.taskSemanticAdmission?.nativeEvidence.find((source2) => source2.role === "current_request")?.text;
|
|
413748
|
+
const recalled = await memory.recall({ scope: scope2, query: currentSource ?? task, lexicalOnly: true, assertCurrent, signal });
|
|
413749
|
+
assertCurrent();
|
|
413750
|
+
return recalled.text;
|
|
413751
|
+
} catch {
|
|
413752
|
+
return "";
|
|
413753
|
+
} finally {
|
|
413754
|
+
try {
|
|
413755
|
+
database?.close();
|
|
413756
|
+
} catch {
|
|
413757
|
+
}
|
|
413758
|
+
}
|
|
413759
|
+
}
|
|
413600
413760
|
usesConversationProfile() {
|
|
413601
413761
|
return this.options.interactionProfile === "conversation";
|
|
413602
413762
|
}
|
|
@@ -414725,8 +414885,8 @@ ${read2.content}`;
|
|
|
414725
414885
|
for (const span of transactionSpans.values()) {
|
|
414726
414886
|
if (index <= span.start || index >= span.end)
|
|
414727
414887
|
continue;
|
|
414728
|
-
const
|
|
414729
|
-
return span.end + Math.max(0.01, Math.min(0.49,
|
|
414888
|
+
const relative50 = (index - span.start) / (span.end - span.start + 1);
|
|
414889
|
+
return span.end + Math.max(0.01, Math.min(0.49, relative50 * 0.49));
|
|
414730
414890
|
}
|
|
414731
414891
|
return index;
|
|
414732
414892
|
};
|
|
@@ -417757,7 +417917,7 @@ ${workflowStatus}` } : {}
|
|
|
417757
417917
|
if (this._taskObjectiveContinuationRequests.has(request)) {
|
|
417758
417918
|
const context = this.memoryCapabilityContext();
|
|
417759
417919
|
if (context)
|
|
417760
|
-
request.messages = context.project(request.messages, this.getMemoryCapabilitiesSnapshot(), Math.min(8e3, Math.max(512, Math.floor(this.effectiveContextWindow() / 4))));
|
|
417920
|
+
request.messages = context.project(request.messages, this.getMemoryCapabilitiesSnapshot(), Math.min(8e3, Math.max(512, Math.floor(this.effectiveContextWindow() / 4))), this.options.surface === "tui" && this.options.compactTaskContext);
|
|
417761
417921
|
}
|
|
417762
417922
|
this._applyTaskObjectiveContinuationSourceProjection(request, false);
|
|
417763
417923
|
this._applyTelegramPassiveHistoryProjection(request, turn);
|
|
@@ -417933,6 +418093,19 @@ ${workflowStatus}` } : {}
|
|
|
417933
418093
|
this._lastCanonicalRequestTrace = trace;
|
|
417934
418094
|
this._canonicalRequestTraces.set(request, trace);
|
|
417935
418095
|
}
|
|
418096
|
+
_immutableEvidenceDocumentId(input2) {
|
|
418097
|
+
const identity10 = [
|
|
418098
|
+
this._sessionId,
|
|
418099
|
+
this.currentArtifactRunId(),
|
|
418100
|
+
String(this._taskEpoch),
|
|
418101
|
+
input2.source,
|
|
418102
|
+
input2.sourceUri ?? "",
|
|
418103
|
+
input2.messageId ?? "",
|
|
418104
|
+
input2.version,
|
|
418105
|
+
input2.bodyHash
|
|
418106
|
+
].join("\0");
|
|
418107
|
+
return `runner-evidence-${_createHash("sha256").update(identity10).digest("hex").slice(0, 32)}`;
|
|
418108
|
+
}
|
|
417936
418109
|
/**
|
|
417937
418110
|
* Append exact source material to the virtual-memory backing corpus. This is
|
|
417938
418111
|
* intentionally independent of prompt compaction and generated summaries:
|
|
@@ -417944,18 +418117,10 @@ ${workflowStatus}` } : {}
|
|
|
417944
418117
|
if (!store || !input2.body)
|
|
417945
418118
|
return [];
|
|
417946
418119
|
try {
|
|
417947
|
-
const
|
|
417948
|
-
|
|
417949
|
-
|
|
417950
|
-
|
|
417951
|
-
String(this._taskEpoch),
|
|
417952
|
-
input2.source,
|
|
417953
|
-
input2.sourceUri ?? "",
|
|
417954
|
-
input2.messageId ?? "",
|
|
417955
|
-
input2.version,
|
|
417956
|
-
bodyHash
|
|
417957
|
-
].join("\0");
|
|
417958
|
-
const documentId = `runner-evidence-${_createHash("sha256").update(identity10).digest("hex").slice(0, 32)}`;
|
|
418120
|
+
const documentId = this._immutableEvidenceDocumentId({
|
|
418121
|
+
...input2,
|
|
418122
|
+
bodyHash: _createHash("sha256").update(input2.body).digest("hex")
|
|
418123
|
+
});
|
|
417959
418124
|
const result = store.appendDocument({
|
|
417960
418125
|
id: documentId,
|
|
417961
418126
|
source: input2.source,
|
|
@@ -419650,6 +419815,20 @@ ${content}`)].join("\n\n");
|
|
|
419650
419815
|
const knownMissingKnowledge = this._trajectoryCheckpoint?.groundingSource === "model" && this._trajectoryGroundingKnowledgeKey === this._liveVirtualContextKnowledgeKey() ? this._trajectoryGeneratedGrounding?.openQuestions.filter((question) => question.trim()) ?? [] : [];
|
|
419651
419816
|
if (mode === "auto" && residentInputTokens < triggerTokens && !knownMissingKnowledge.length)
|
|
419652
419817
|
return pinnedMessages;
|
|
419818
|
+
const goal = this._taskState.originalGoal;
|
|
419819
|
+
const residentGoal = mode === "auto" && goal && messages4.some((message3) => message3.role === "user" && typeof message3.content === "string" && (message3.content === goal || message3.content.endsWith(`
|
|
419820
|
+
|
|
419821
|
+
TASK: ${goal}`)));
|
|
419822
|
+
const excludeDocumentIds = residentGoal ? [this._immutableEvidenceDocumentId({
|
|
419823
|
+
source: "user",
|
|
419824
|
+
sourceUri: `omnius-run://${this.currentArtifactRunId()}/user-input`,
|
|
419825
|
+
messageId: `task-epoch:${this._taskEpoch}`,
|
|
419826
|
+
version: String(this._taskEpoch),
|
|
419827
|
+
bodyHash: _createHash("sha256").update(goal).digest("hex")
|
|
419828
|
+
})] : [];
|
|
419829
|
+
const corpus = store.corpusStats({ scopeIds: [this._sessionId], excludeDocumentIds });
|
|
419830
|
+
if (mode === "auto" && corpus.chunks === 0)
|
|
419831
|
+
return pinnedMessages;
|
|
419653
419832
|
const currentEvidence = this._liveVirtualContextCurrentEvidence(messages4);
|
|
419654
419833
|
if (this._objectiveReadBatchAuxiliaryEligible() && this._liveVirtualContextCache?.taskEpoch === this._taskEpoch && this._liveVirtualContextCache.scopeId === this._sessionId) {
|
|
419655
419834
|
this._objectiveReadBatchPreparedTurn = turn;
|
|
@@ -419673,7 +419852,6 @@ ${content}`)].join("\n\n");
|
|
|
419673
419852
|
}))
|
|
419674
419853
|
];
|
|
419675
419854
|
}
|
|
419676
|
-
const corpus = store.corpusStats({ scopeIds: [this._sessionId] });
|
|
419677
419855
|
const structuredMemoryVersion = this._structuredMemoryStore ? _createHash("sha256").update(JSON.stringify(this._structuredMemoryStore.query({
|
|
419678
419856
|
scopeIds: [this._sessionId],
|
|
419679
419857
|
includeExpired: false,
|
|
@@ -419701,6 +419879,7 @@ ${content}`)].join("\n\n");
|
|
|
419701
419879
|
pinnedTokenBudget,
|
|
419702
419880
|
physicalInputBudget,
|
|
419703
419881
|
knownMissingKnowledge,
|
|
419882
|
+
excludeDocumentIds,
|
|
419704
419883
|
structuredMemoryVersion
|
|
419705
419884
|
})).digest("hex");
|
|
419706
419885
|
const recentAttempt = this._liveVirtualContextAttempt;
|
|
@@ -419780,6 +419959,7 @@ ${content}`)].join("\n\n");
|
|
|
419780
419959
|
...this._structuredMemoryStore ? { memoryStore: this._structuredMemoryStore } : {},
|
|
419781
419960
|
query,
|
|
419782
419961
|
scopeId: this._sessionId,
|
|
419962
|
+
excludeDocumentIds,
|
|
419783
419963
|
mode,
|
|
419784
419964
|
triggerTokens,
|
|
419785
419965
|
residentInputTokens,
|
|
@@ -420156,6 +420336,15 @@ ${ctx}`,
|
|
|
420156
420336
|
tokenEstimate: Math.ceil(ctx.length / 4)
|
|
420157
420337
|
});
|
|
420158
420338
|
}
|
|
420339
|
+
const terminalProcedures = await this.recallTerminalProcedureHints(task);
|
|
420340
|
+
if (terminalProcedures)
|
|
420341
|
+
sections.push({
|
|
420342
|
+
label: "c_procedures",
|
|
420343
|
+
content: `
|
|
420344
|
+
|
|
420345
|
+
${terminalProcedures}`,
|
|
420346
|
+
tokenEstimate: Math.ceil(terminalProcedures.length / 4)
|
|
420347
|
+
});
|
|
420159
420348
|
if (!conversationProfile && this._retrievalProvider && !this._retrievalContextCache) {
|
|
420160
420349
|
try {
|
|
420161
420350
|
const tier = this.options.modelTier ?? "large";
|
|
@@ -423308,6 +423497,21 @@ ${modelVisible}` : modelVisible || result.error || displayOutput || "";
|
|
|
423308
423497
|
quality: "rejected_untrusted",
|
|
423309
423498
|
summary: "validation has inconsistent execution evidence"
|
|
423310
423499
|
};
|
|
423500
|
+
if (invocation.framework === "python_unittest") {
|
|
423501
|
+
const passed = successfulPythonUnittestCount(result.output || "");
|
|
423502
|
+
return result.executionReceipt && passed > 0 ? {
|
|
423503
|
+
quality: "assertive",
|
|
423504
|
+
passed: true,
|
|
423505
|
+
summary: `Python unittest passed ${passed} test(s)`,
|
|
423506
|
+
assertionsExecuted: passed,
|
|
423507
|
+
assertionsPassed: passed,
|
|
423508
|
+
assertionsFailed: 0
|
|
423509
|
+
} : {
|
|
423510
|
+
quality: "observational",
|
|
423511
|
+
summary: "Python unittest has no confirmed passing tests",
|
|
423512
|
+
nextAction: "Run the intended tests with the standard unittest summary visible."
|
|
423513
|
+
};
|
|
423514
|
+
}
|
|
423311
423515
|
const declared2 = declaredReceipt?.outcome ?? (/\bOMNIUS_VERIFICATION_RESULT\s*(?:=|:)\s*PASS\b/i.test(result.output || "") ? "pass" : /\bOMNIUS_VERIFICATION_RESULT\s*(?:=|:)\s*FAIL\b/i.test(result.output || "") ? "fail" : void 0);
|
|
423312
423516
|
if (declared2 === "pass" && mayAssert) {
|
|
423313
423517
|
return {
|
|
@@ -425576,9 +425780,9 @@ ${latest.output || ""}`.trim();
|
|
|
425576
425780
|
const root2 = this.authoritativeWorkingDirectory();
|
|
425577
425781
|
const stateRoot = this.omniusStateDir();
|
|
425578
425782
|
const local = (path13) => {
|
|
425579
|
-
const
|
|
425783
|
+
const relative50 = _pathRelative(root2, path13);
|
|
425580
425784
|
const stateRelative = _pathRelative(stateRoot, path13);
|
|
425581
|
-
return (
|
|
425785
|
+
return (relative50 === "" || !relative50.startsWith("..") && !_pathIsAbsolute(relative50)) && !(stateRelative === "" || !stateRelative.startsWith("..") && !_pathIsAbsolute(stateRelative));
|
|
425582
425786
|
};
|
|
425583
425787
|
const paths3 = [
|
|
425584
425788
|
...this._fileRegistry.keys(),
|
|
@@ -425738,8 +425942,8 @@ ${recentActionLines.join("\n")}` : "recent_actions=none",
|
|
|
425738
425942
|
...scan.files.map((file) => _pathResolve(root2, file.rel)),
|
|
425739
425943
|
...scan.dirs.map((dir) => _pathResolve(root2, dir.rel))
|
|
425740
425944
|
])].filter((path13) => {
|
|
425741
|
-
const
|
|
425742
|
-
return
|
|
425945
|
+
const relative50 = _pathRelative(stateRoot, path13);
|
|
425946
|
+
return relative50 !== "" && (relative50.startsWith("..") || _pathIsAbsolute(relative50));
|
|
425743
425947
|
}).sort();
|
|
425744
425948
|
this._workspaceTreeSnapshot = { scope: scope2, watchedPaths, content, stamp: this._workspaceContextStamp(watchedPaths) };
|
|
425745
425949
|
return content;
|
|
@@ -439021,23 +439225,6 @@ Root cause hypothesis: the argument family may be wrong, a prerequisite may be m
|
|
|
439021
439225
|
Corrective action: try a different approach first: read relevant files, adjust arguments, or verify prerequisites.`);
|
|
439022
439226
|
}
|
|
439023
439227
|
}
|
|
439024
|
-
if (tc.name === "shell") {
|
|
439025
|
-
const _cmd = typeof tc.arguments?.["command"] === "string" ? tc.arguments["command"] : typeof tc.arguments?.["cmd"] === "string" ? tc.arguments["cmd"] : "";
|
|
439026
|
-
const _sug = _cmd ? this._resolutionMemory.suggest(_cmd) : null;
|
|
439027
|
-
if (_sug) {
|
|
439028
|
-
const _injKey = `resfix:${_sug.fix.from.join(" ")}=>${_sug.fix.to.join(" ")}`;
|
|
439029
|
-
if (!this._errorGuidanceInjected.has(_injKey)) {
|
|
439030
|
-
this._errorGuidanceInjected.add(_injKey);
|
|
439031
|
-
this.enqueueRuntimeGuidance(_sug.message);
|
|
439032
|
-
this.emit({
|
|
439033
|
-
type: "status",
|
|
439034
|
-
content: `Resolution memory: suggested \`${_sug.fix.from.join(" ")}\`→\`${_sug.fix.to.join(" ")}\` before shell call`,
|
|
439035
|
-
turn,
|
|
439036
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
439037
|
-
});
|
|
439038
|
-
}
|
|
439039
|
-
}
|
|
439040
|
-
}
|
|
439041
439228
|
{
|
|
439042
439229
|
const errorPatternSource = this._taskRelevantErrorPatterns.size > 0 ? this._taskRelevantErrorPatterns : this._errorPatterns;
|
|
439043
439230
|
const currentRunToolAlreadySucceeded = toolCallLog.slice(-20).some((entry) => entry.name === tc.name && entry.success === true);
|
|
@@ -440834,10 +441021,26 @@ ${diagnostic}`;
|
|
|
440834
441021
|
const _cmd = typeof tc.arguments?.["command"] === "string" ? tc.arguments["command"] : typeof tc.arguments?.["cmd"] === "string" ? tc.arguments["cmd"] : "";
|
|
440835
441022
|
if (_cmd && tc.name === "shell" && !processWasStopped) {
|
|
440836
441023
|
if (!result.success) {
|
|
441024
|
+
const error = [result.error, result.output].filter(Boolean).join("\n");
|
|
441025
|
+
const suggestion = this._resolutionMemory.suggest(_cmd, error);
|
|
441026
|
+
if (suggestion) {
|
|
441027
|
+
const key2 = `resfix:${suggestion.message}`;
|
|
441028
|
+
if (!this._errorGuidanceInjected.has(key2)) {
|
|
441029
|
+
this._errorGuidanceInjected.add(key2);
|
|
441030
|
+
this.enqueueRuntimeGuidance(suggestion.message);
|
|
441031
|
+
this.emit({
|
|
441032
|
+
type: "status",
|
|
441033
|
+
visibility: "telemetry",
|
|
441034
|
+
turn,
|
|
441035
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
441036
|
+
content: "Resolution memory found an applicable historical shell repair."
|
|
441037
|
+
});
|
|
441038
|
+
}
|
|
441039
|
+
}
|
|
440837
441040
|
this._resolutionMemory.recordFailure({
|
|
440838
441041
|
tool: tc.name,
|
|
440839
441042
|
command: _cmd,
|
|
440840
|
-
error
|
|
441043
|
+
error,
|
|
440841
441044
|
turn
|
|
440842
441045
|
});
|
|
440843
441046
|
} else {
|
|
@@ -456567,7 +456770,7 @@ var INFRA_WORKER_SKILL = {
|
|
|
456567
456770
|
};
|
|
456568
456771
|
|
|
456569
456772
|
// packages/orchestrator/dist/context-references.js
|
|
456570
|
-
import { join as join82, resolve as resolve53, relative as
|
|
456773
|
+
import { join as join82, resolve as resolve53, relative as relative32, sep as sep11, extname as extname4 } from "node:path";
|
|
456571
456774
|
var SENSITIVE_HOME_FILES = [
|
|
456572
456775
|
join82(".ssh", "authorized_keys"),
|
|
456573
456776
|
join82(".ssh", "id_rsa"),
|
|
@@ -456584,6 +456787,19 @@ var SENSITIVE_HOME_FILES = [
|
|
|
456584
456787
|
".pypirc"
|
|
456585
456788
|
];
|
|
456586
456789
|
|
|
456790
|
+
// packages/orchestrator/dist/nol/sleep-replay.js
|
|
456791
|
+
init_dist();
|
|
456792
|
+
init_dist5();
|
|
456793
|
+
|
|
456794
|
+
// packages/orchestrator/dist/nol/datasets.js
|
|
456795
|
+
init_dist();
|
|
456796
|
+
init_dist5();
|
|
456797
|
+
import { createHash as createHash149 } from "node:crypto";
|
|
456798
|
+
var nolCanonicalJson = canonicalNolJson;
|
|
456799
|
+
function nolDigest(value) {
|
|
456800
|
+
return createHash149("sha256").update(nolCanonicalJson(value)).digest("hex");
|
|
456801
|
+
}
|
|
456802
|
+
|
|
456587
456803
|
// packages/orchestrator/dist/subagent-prompt.js
|
|
456588
456804
|
init_dist5();
|
|
456589
456805
|
var WORKER_PREAMBLE = [
|
|
@@ -456603,15 +456819,6 @@ var WORKER_PREAMBLE = [
|
|
|
456603
456819
|
" the orchestrator must absorb your result without re-bloating its context."
|
|
456604
456820
|
].join("\n");
|
|
456605
456821
|
|
|
456606
|
-
// packages/orchestrator/dist/nol/datasets.js
|
|
456607
|
-
init_dist();
|
|
456608
|
-
init_dist5();
|
|
456609
|
-
import { createHash as createHash149 } from "node:crypto";
|
|
456610
|
-
var nolCanonicalJson = canonicalNolJson;
|
|
456611
|
-
function nolDigest(value) {
|
|
456612
|
-
return createHash149("sha256").update(nolCanonicalJson(value)).digest("hex");
|
|
456613
|
-
}
|
|
456614
|
-
|
|
456615
456822
|
// packages/orchestrator/dist/nol/evaluation.js
|
|
456616
456823
|
var import_ajv = __toESM(require_ajv(), 1);
|
|
456617
456824
|
var import__ = __toESM(require__(), 1);
|
|
@@ -464255,7 +464462,7 @@ init_dist5();
|
|
|
464255
464462
|
import { createHash as createHash158, randomUUID as randomUUID73 } from "node:crypto";
|
|
464256
464463
|
import { realpathSync as realpathSync30, statSync as statSync36 } from "node:fs";
|
|
464257
464464
|
import { lstat as lstat12, mkdir as mkdir9, realpath as realpath11 } from "node:fs/promises";
|
|
464258
|
-
import { dirname as dirname50, isAbsolute as isAbsolute39, join as join84, relative as
|
|
464465
|
+
import { dirname as dirname50, isAbsolute as isAbsolute39, join as join84, relative as relative33, resolve as resolve56 } from "node:path";
|
|
464259
464466
|
|
|
464260
464467
|
// packages/cli/src/tui/async-process.ts
|
|
464261
464468
|
import { spawn as spawn9 } from "node:child_process";
|
|
@@ -465966,13 +466173,13 @@ var NolGneProfileService = class {
|
|
|
465966
466173
|
for (const path13 of [options.artifactRoot, options.workRoot]) {
|
|
465967
466174
|
if (!isAbsolute39(path13))
|
|
465968
466175
|
throw new Error("GNE profile storage paths must be explicit");
|
|
465969
|
-
const rel =
|
|
466176
|
+
const rel = relative33(this.projectRoot, resolve56(path13));
|
|
465970
466177
|
if (!rel || rel.startsWith("..") || isAbsolute39(rel))
|
|
465971
466178
|
throw new Error("GNE profile storage must belong to its project");
|
|
465972
466179
|
let ancestor = resolve56(path13);
|
|
465973
466180
|
while (true) {
|
|
465974
466181
|
try {
|
|
465975
|
-
const canonical10 = realpathSync30.native(ancestor), inside10 =
|
|
466182
|
+
const canonical10 = realpathSync30.native(ancestor), inside10 = relative33(this.projectRoot, canonical10);
|
|
465976
466183
|
if (inside10.startsWith("..") || isAbsolute39(inside10))
|
|
465977
466184
|
throw new Error("GNE profile storage symlink escapes its project");
|
|
465978
466185
|
break;
|
|
@@ -466624,7 +466831,7 @@ var NolGneProfileService = class {
|
|
|
466624
466831
|
const capture = object19(report3.captureFile, "capture file");
|
|
466625
466832
|
if (typeof capture.path !== "string" || !isAbsolute39(capture.path) || capture.mediaType !== "application/x-npz")
|
|
466626
466833
|
throw new Error("GNE profile capture path/media is invalid");
|
|
466627
|
-
const actualPath = await realpath11(capture.path), root2 = await realpath11(workRoot), rel =
|
|
466834
|
+
const actualPath = await realpath11(capture.path), root2 = await realpath11(workRoot), rel = relative33(root2, actualPath), state2 = await lstat12(capture.path);
|
|
466628
466835
|
if (!rel || rel.startsWith("..") || isAbsolute39(rel) || state2.isSymbolicLink() || !state2.isFile())
|
|
466629
466836
|
throw new Error("GNE native capture escaped its job-owned scratch");
|
|
466630
466837
|
const size = integer16(
|
|
@@ -467101,7 +467308,7 @@ init_dist5();
|
|
|
467101
467308
|
import { createHash as createHash159, randomUUID as randomUUID74 } from "node:crypto";
|
|
467102
467309
|
import { lstatSync as lstatSync15, realpathSync as realpathSync31, statfsSync as statfsSync5 } from "node:fs";
|
|
467103
467310
|
import { lstat as lstat13, mkdir as mkdir10, mkdtemp as mkdtemp7, readdir as readdir5, realpath as realpath12 } from "node:fs/promises";
|
|
467104
|
-
import { isAbsolute as isAbsolute40, join as join85, relative as
|
|
467311
|
+
import { isAbsolute as isAbsolute40, join as join85, relative as relative34, resolve as resolve57 } from "node:path";
|
|
467105
467312
|
var NOL_EXPORT_JOB_KIND = "nol_asset_export";
|
|
467106
467313
|
var SCOPE = "nol_export_scope";
|
|
467107
467314
|
var SLOT = "nol_export_slot";
|
|
@@ -467133,7 +467340,7 @@ function guard(callback) {
|
|
|
467133
467340
|
}
|
|
467134
467341
|
}
|
|
467135
467342
|
function contained3(root2, path13) {
|
|
467136
|
-
const part =
|
|
467343
|
+
const part = relative34(root2, path13);
|
|
467137
467344
|
return !part || !isAbsolute40(part) && part !== ".." && !part.startsWith("../");
|
|
467138
467345
|
}
|
|
467139
467346
|
function reference3(bytes5, mediaType = "application/json") {
|
|
@@ -476417,8 +476624,8 @@ var NolGneAdapter = class {
|
|
|
476417
476624
|
context.signal
|
|
476418
476625
|
);
|
|
476419
476626
|
current4(context);
|
|
476420
|
-
const absolute3 = report3.absoluteTolerance,
|
|
476421
|
-
if (typeof absolute3 !== "number" || typeof
|
|
476627
|
+
const absolute3 = report3.absoluteTolerance, relative50 = report3.relativeTolerance;
|
|
476628
|
+
if (typeof absolute3 !== "number" || typeof relative50 !== "number" || !(absolute3 > 0 && absolute3 <= 0.01 && relative50 > 0 && relative50 <= 0.01) || !Array.isArray(report3.cells) || !report3.cells.length || report3.cells.length > 8)
|
|
476422
476629
|
throw new Error("GNE conformance tolerance/cell bounds are invalid");
|
|
476423
476630
|
const cells = /* @__PURE__ */ new Map();
|
|
476424
476631
|
let tokens3 = 0;
|
|
@@ -476436,7 +476643,7 @@ var NolGneAdapter = class {
|
|
|
476436
476643
|
(value) => typeof value === "number" && Number.isFinite(value) && value >= 0
|
|
476437
476644
|
) || cell.priorMaxAbsError > absolute3 || cell.restorationMaxAbsError > absolute3 || !Array.isArray(cell.tokenIds) || !cell.tokenIds.length || cell.tokenIds.length > this.options.loadLimits.maxInputTokens)
|
|
476438
476645
|
throw new Error("GNE conformance cell is incomplete/unvalidated");
|
|
476439
|
-
if (cell.deltaMaxAbsError > absolute3 +
|
|
476646
|
+
if (cell.deltaMaxAbsError > absolute3 + relative50 * cell.vectorNorm || cell.deltaMaxRelativeL2Error > relative50 + Math.sqrt(input2.model.architecture.hiddenSize) * absolute3 / cell.vectorNorm)
|
|
476440
476647
|
throw new Error(
|
|
476441
476648
|
"GNE conformance reported delta errors exceed its frozen FP tolerances"
|
|
476442
476649
|
);
|
|
@@ -476481,14 +476688,14 @@ var NolGneAdapter = class {
|
|
|
476481
476688
|
op.neuron
|
|
476482
476689
|
);
|
|
476483
476690
|
const nominal = Math.abs(op.amount) * measured.effectiveColumnL2, observed = cell.vectorNorm;
|
|
476484
|
-
if (Math.abs(observed - nominal) > absolute3 * Math.sqrt(input2.model.architecture.hiddenSize) +
|
|
476691
|
+
if (Math.abs(observed - nominal) > absolute3 * Math.sqrt(input2.model.architecture.hiddenSize) + relative50 * nominal)
|
|
476485
476692
|
throw new Error(
|
|
476486
476693
|
"GNE actual native residual norm differs from the measured CPU column plan"
|
|
476487
476694
|
);
|
|
476488
476695
|
actualNorms.push(observed);
|
|
476489
476696
|
}
|
|
476490
476697
|
if (actualNorms.some(
|
|
476491
|
-
(norm4) => Math.abs(norm4 - actualNorms[0]) > 2 * absolute3 * Math.sqrt(input2.model.architecture.hiddenSize) + 2 *
|
|
476698
|
+
(norm4) => Math.abs(norm4 - actualNorms[0]) > 2 * absolute3 * Math.sqrt(input2.model.architecture.hiddenSize) + 2 * relative50 * actualNorms[0]
|
|
476492
476699
|
))
|
|
476493
476700
|
throw new Error(
|
|
476494
476701
|
"GNE native random controls are not residual-operand norm matched"
|
|
@@ -477265,12 +477472,12 @@ import {
|
|
|
477265
477472
|
statSync as statSync39
|
|
477266
477473
|
} from "node:fs";
|
|
477267
477474
|
import { mkdir as mkdir19, open as open21, rename as rename5, writeFile as writeFile4 } from "node:fs/promises";
|
|
477268
|
-
import { dirname as dirname62, isAbsolute as isAbsolute68, join as join107, relative as
|
|
477475
|
+
import { dirname as dirname62, isAbsolute as isAbsolute68, join as join107, relative as relative48, resolve as resolve69, sep as sep12 } from "node:path";
|
|
477269
477476
|
import { fileURLToPath as fileURLToPath19 } from "node:url";
|
|
477270
477477
|
|
|
477271
477478
|
// packages/cli/src/nol/vllm-runtime-config.ts
|
|
477272
477479
|
init_dist();
|
|
477273
|
-
import { isAbsolute as isAbsolute48, dirname as dirname53, join as join91, relative as
|
|
477480
|
+
import { isAbsolute as isAbsolute48, dirname as dirname53, join as join91, relative as relative35, resolve as resolve60 } from "node:path";
|
|
477274
477481
|
import { realpathSync as realpathSync35 } from "node:fs";
|
|
477275
477482
|
import { z as z38 } from "zod";
|
|
477276
477483
|
var positive16 = z38.number().int().positive().safe();
|
|
@@ -477372,13 +477579,13 @@ var NolVllmComputeConfigSchema = z38.object({
|
|
|
477372
477579
|
issue4("Configuration metadata ceiling");
|
|
477373
477580
|
});
|
|
477374
477581
|
function resolveNolVllmWorkRoot(projectRoot, input2) {
|
|
477375
|
-
const value = NolVllmComputeConfigSchema.parse(input2), root2 = realpathSync35.native(projectRoot), workRoot = resolve60(value.workRoot), rel =
|
|
477582
|
+
const value = NolVllmComputeConfigSchema.parse(input2), root2 = realpathSync35.native(projectRoot), workRoot = resolve60(value.workRoot), rel = relative35(root2, workRoot);
|
|
477376
477583
|
if (!rel || rel.startsWith("..") || isAbsolute48(rel))
|
|
477377
477584
|
throw Error("vLLM state must belong to the selected project");
|
|
477378
477585
|
let ancestor = workRoot;
|
|
477379
477586
|
for (; ; ) {
|
|
477380
477587
|
try {
|
|
477381
|
-
const current6 = realpathSync35.native(ancestor), inside10 =
|
|
477588
|
+
const current6 = realpathSync35.native(ancestor), inside10 = relative35(root2, current6);
|
|
477382
477589
|
if (inside10.startsWith("..") || isAbsolute48(inside10) || current6 !== ancestor)
|
|
477383
477590
|
throw Error("vLLM state has a symlink/foreign ancestor");
|
|
477384
477591
|
break;
|
|
@@ -477388,7 +477595,7 @@ function resolveNolVllmWorkRoot(projectRoot, input2) {
|
|
|
477388
477595
|
}
|
|
477389
477596
|
}
|
|
477390
477597
|
const contains3 = (a, b) => {
|
|
477391
|
-
const r =
|
|
477598
|
+
const r = relative35(a, b);
|
|
477392
477599
|
return !r || !r.startsWith("..") && !isAbsolute48(r);
|
|
477393
477600
|
};
|
|
477394
477601
|
for (const source2 of [
|
|
@@ -477415,7 +477622,7 @@ import { createHash as createHash171 } from "node:crypto";
|
|
|
477415
477622
|
import { spawn as spawn11 } from "node:child_process";
|
|
477416
477623
|
import { constants as constants20 } from "node:fs";
|
|
477417
477624
|
import { open as open12, mkdir as mkdir13, lstat as lstat15 } from "node:fs/promises";
|
|
477418
|
-
import { dirname as dirname54, join as join92, relative as
|
|
477625
|
+
import { dirname as dirname54, join as join92, relative as relative36, isAbsolute as isAbsolute49 } from "node:path";
|
|
477419
477626
|
var implementation = nolVllmModulePin(import.meta.url);
|
|
477420
477627
|
var DECODER_SHA = "213d71cf6eefcea061b28b656cf8a08af60c9f3513403e724b16876995f3de93";
|
|
477421
477628
|
var hash36 = (v) => createHash171("sha256").update(v).digest("hex");
|
|
@@ -477509,7 +477716,7 @@ var NolVllmConfiguredAuthority = class {
|
|
|
477509
477716
|
this.options = options;
|
|
477510
477717
|
this.config = resolveNolVllmWorkRoot(options.projectRoot, options.config);
|
|
477511
477718
|
const contains3 = (a, b) => {
|
|
477512
|
-
const rel =
|
|
477719
|
+
const rel = relative36(a, b);
|
|
477513
477720
|
return !rel || !rel.startsWith("..") && !isAbsolute49(rel);
|
|
477514
477721
|
};
|
|
477515
477722
|
need11(
|
|
@@ -478141,7 +478348,7 @@ import { z as z44 } from "zod";
|
|
|
478141
478348
|
init_dist5();
|
|
478142
478349
|
import { constants as constants21, lstatSync as lstatSync17, realpathSync as realpathSync37 } from "node:fs";
|
|
478143
478350
|
import { lstat as lstat16, opendir as opendir4, realpath as realpath13, readdir as readdir6, open as open13 } from "node:fs/promises";
|
|
478144
|
-
import { dirname as dirname56, isAbsolute as isAbsolute51, join as join95, relative as
|
|
478351
|
+
import { dirname as dirname56, isAbsolute as isAbsolute51, join as join95, relative as relative37 } from "node:path";
|
|
478145
478352
|
import { z as z39 } from "zod";
|
|
478146
478353
|
var count6 = z39.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER);
|
|
478147
478354
|
var sha39 = z39.string().regex(/^[a-f0-9]{64}$/);
|
|
@@ -478284,7 +478491,7 @@ var NolCpuReaderSourceGuard = class _NolCpuReaderSourceGuard {
|
|
|
478284
478491
|
scanned.add(site);
|
|
478285
478492
|
need13(
|
|
478286
478493
|
scanned.size <= 32 && profile3.runtimeRoots.some((root2) => {
|
|
478287
|
-
const part =
|
|
478494
|
+
const part = relative37(root2, site);
|
|
478288
478495
|
return part === "" || !isAbsolute51(part) && part !== ".." && !part.startsWith("../");
|
|
478289
478496
|
}),
|
|
478290
478497
|
"runtime roots omit an actual Python package site"
|
|
@@ -478481,7 +478688,7 @@ init_dist5();
|
|
|
478481
478688
|
import { createHash as createHash172 } from "node:crypto";
|
|
478482
478689
|
import { constants as constants22, lstatSync as lstatSync18, realpathSync as realpathSync38 } from "node:fs";
|
|
478483
478690
|
import { lstat as lstat17, opendir as opendir5, realpath as realpath14, open as open14 } from "node:fs/promises";
|
|
478484
|
-
import { dirname as dirname57, isAbsolute as isAbsolute52, join as join96, relative as
|
|
478691
|
+
import { dirname as dirname57, isAbsolute as isAbsolute52, join as join96, relative as relative38 } from "node:path";
|
|
478485
478692
|
import { z as z40 } from "zod";
|
|
478486
478693
|
var count7 = z40.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER);
|
|
478487
478694
|
var sha40 = z40.string().regex(/^[a-f0-9]{64}$/);
|
|
@@ -478626,7 +478833,7 @@ var NolGgufCpuReaderSourceGuard = class _NolGgufCpuReaderSourceGuard {
|
|
|
478626
478833
|
);
|
|
478627
478834
|
need14(
|
|
478628
478835
|
await realpath14(site) === site && createHash172("sha256").update(site).digest("hex") === profile3.reader.runtime.pythonEnvironment.sitePackagesPathDigest && profile3.runtimeRoots.some((root2) => {
|
|
478629
|
-
const part =
|
|
478836
|
+
const part = relative38(root2, site);
|
|
478630
478837
|
return part === "" || !isAbsolute52(part) && part !== ".." && !part.startsWith("../");
|
|
478631
478838
|
}),
|
|
478632
478839
|
"runtime roots omit the actual explicit no-site venv package directory"
|
|
@@ -478792,7 +478999,7 @@ import { createHash as createHash177, randomUUID as randomUUID82 } from "node:cr
|
|
|
478792
478999
|
import { lstatSync as lstatSync21, realpathSync as realpathSync41 } from "node:fs";
|
|
478793
479000
|
import { mkdir as mkdir15, lstat as lstat20, readFile as readFile6 } from "node:fs/promises";
|
|
478794
479001
|
import { fileURLToPath as fileURLToPath11 } from "node:url";
|
|
478795
|
-
import { join as join99, isAbsolute as isAbsolute57, relative as
|
|
479002
|
+
import { join as join99, isAbsolute as isAbsolute57, relative as relative41, resolve as resolve65 } from "node:path";
|
|
478796
479003
|
import { z as z42 } from "zod";
|
|
478797
479004
|
|
|
478798
479005
|
// packages/cli/src/nol/peft-profile.ts
|
|
@@ -478801,7 +479008,7 @@ init_dist5();
|
|
|
478801
479008
|
import { createHash as createHash174, randomUUID as randomUUID81 } from "node:crypto";
|
|
478802
479009
|
import { lstat as lstat18, realpath as realpath15 } from "node:fs/promises";
|
|
478803
479010
|
import { fileURLToPath as fileURLToPath10 } from "node:url";
|
|
478804
|
-
import { isAbsolute as isAbsolute54, relative as
|
|
479011
|
+
import { isAbsolute as isAbsolute54, relative as relative39, resolve as resolve62 } from "node:path";
|
|
478805
479012
|
|
|
478806
479013
|
// packages/cli/src/nol/peft-validation.ts
|
|
478807
479014
|
init_dist();
|
|
@@ -480282,7 +480489,7 @@ var NolPeftProofJob = class _NolPeftProofJob {
|
|
|
480282
480489
|
descriptor2 && typeof descriptor2.path === "string" && descriptor2.mediaType === "application/x-npz" && Number.isSafeInteger(descriptor2.sizeBytes) && descriptor2.sizeBytes > 0 && descriptor2.sizeBytes <= plan.limits.maxCaptureBytes && /^[a-f0-9]{64}$/.test(descriptor2.sha256),
|
|
480283
480490
|
"native capture descriptor invalid"
|
|
480284
480491
|
);
|
|
480285
|
-
const rel =
|
|
480492
|
+
const rel = relative39(resolve62(session.workRoot), resolve62(descriptor2.path));
|
|
480286
480493
|
need17(
|
|
480287
480494
|
rel && !rel.startsWith("..") && !isAbsolute54(rel) && !rel.includes("/") && !rel.includes("\\"),
|
|
480288
480495
|
"capture escaped private root"
|
|
@@ -481680,7 +481887,7 @@ init_dist5();
|
|
|
481680
481887
|
import { createHash as createHash176 } from "node:crypto";
|
|
481681
481888
|
import { lstatSync as lstatSync20, realpathSync as realpathSync40 } from "node:fs";
|
|
481682
481889
|
import { readdir as readdir8 } from "node:fs/promises";
|
|
481683
|
-
import { dirname as dirname58, isAbsolute as isAbsolute56, join as join98, relative as
|
|
481890
|
+
import { dirname as dirname58, isAbsolute as isAbsolute56, join as join98, relative as relative40, resolve as resolve64 } from "node:path";
|
|
481684
481891
|
import { z as z41 } from "zod";
|
|
481685
481892
|
var SHA7 = /^[a-f0-9]{64}$/;
|
|
481686
481893
|
var NOL_PEFT_MODEL_WORKER_SHA256 = "e8d6d1eb7daff33db8c045dc35669be5ff734bf168a23043d2a415d8cb34037a";
|
|
@@ -481771,7 +481978,7 @@ var stamp5 = (path13) => {
|
|
|
481771
481978
|
return `${s.dev}:${s.ino}:${s.size}:${s.mtimeMs}:${s.ctimeMs}`;
|
|
481772
481979
|
};
|
|
481773
481980
|
function disjoint(a, b) {
|
|
481774
|
-
const x =
|
|
481981
|
+
const x = relative40(resolve64(a), resolve64(b)), y = relative40(resolve64(b), resolve64(a));
|
|
481775
481982
|
const outside = (r) => r === ".." || r.startsWith("../") || isAbsolute56(r);
|
|
481776
481983
|
return x !== "" && outside(x) && outside(y);
|
|
481777
481984
|
}
|
|
@@ -481799,7 +482006,7 @@ async function fullInventory(root2, model3, stamps, state2, profile3, signal) {
|
|
|
481799
482006
|
let entries = 0;
|
|
481800
482007
|
const walk = async (path13) => {
|
|
481801
482008
|
need21(
|
|
481802
|
-
|
|
482009
|
+
relative40(root2, path13).split(/[\/]/).length <= 32,
|
|
481803
482010
|
"source tree depth bound"
|
|
481804
482011
|
);
|
|
481805
482012
|
for (const entry of await readdir8(path13, { withFileTypes: true })) {
|
|
@@ -481810,7 +482017,7 @@ async function fullInventory(root2, model3, stamps, state2, profile3, signal) {
|
|
|
481810
482017
|
if (entry.isDirectory()) await walk(actual);
|
|
481811
482018
|
else {
|
|
481812
482019
|
need21(entry.isFile(), "non-regular source unsupported");
|
|
481813
|
-
names2.push(
|
|
482020
|
+
names2.push(relative40(root2, actual).split("\\").join("/"));
|
|
481814
482021
|
}
|
|
481815
482022
|
need21(names2.length <= 1e4, "source inventory bound");
|
|
481816
482023
|
}
|
|
@@ -481825,7 +482032,7 @@ async function fullInventory(root2, model3, stamps, state2, profile3, signal) {
|
|
|
481825
482032
|
signal.throwIfAborted();
|
|
481826
482033
|
const actual = join98(root2, file.path);
|
|
481827
482034
|
need21(
|
|
481828
|
-
realpathSync40(actual) === actual &&
|
|
482035
|
+
realpathSync40(actual) === actual && relative40(root2, actual) !== "" && !relative40(root2, actual).startsWith(".."),
|
|
481829
482036
|
"source escaped approved root"
|
|
481830
482037
|
);
|
|
481831
482038
|
state2.bytes += file.artifact.sizeBytes;
|
|
@@ -482295,13 +482502,13 @@ var NolPeftModelAuthorityService = class {
|
|
|
482295
482502
|
root2 === options.projectRoot && realpathSync41(root2) === root2,
|
|
482296
482503
|
"canonical explicitly selected project root required"
|
|
482297
482504
|
);
|
|
482298
|
-
const cas = realpathSync41(options.artifacts.root), casRelative =
|
|
482505
|
+
const cas = realpathSync41(options.artifacts.root), casRelative = relative41(root2, cas);
|
|
482299
482506
|
need22(
|
|
482300
482507
|
cas === options.artifacts.root && casRelative !== "" && !casRelative.startsWith("..") && !isAbsolute57(casRelative) && profiles2.every((p) => p.load.artifactRoot === cas),
|
|
482301
482508
|
"producer CAS namespace must be inside the selected project"
|
|
482302
482509
|
);
|
|
482303
482510
|
for (const value of [options.stateRoot, options.workRoot]) {
|
|
482304
|
-
const rel =
|
|
482511
|
+
const rel = relative41(root2, resolve65(value));
|
|
482305
482512
|
need22(
|
|
482306
482513
|
isAbsolute57(value) && rel !== "" && !rel.startsWith("..") && !isAbsolute57(rel),
|
|
482307
482514
|
"authority/work state belongs to selected project"
|
|
@@ -482318,7 +482525,7 @@ var NolPeftModelAuthorityService = class {
|
|
|
482318
482525
|
p.plan.peft.adapterRoot,
|
|
482319
482526
|
options.workRoot
|
|
482320
482527
|
]) {
|
|
482321
|
-
const a =
|
|
482528
|
+
const a = relative41(resolve65(nativeRoot), resolve65(options.stateRoot)), b = relative41(resolve65(options.stateRoot), resolve65(nativeRoot));
|
|
482322
482529
|
need22(
|
|
482323
482530
|
(a === ".." || a.startsWith("../") || isAbsolute57(a)) && (b === ".." || b.startsWith("../") || isAbsolute57(b)),
|
|
482324
482531
|
"secret authority state must be disjoint from all worker/model/CAS roots"
|
|
@@ -482330,7 +482537,7 @@ var NolPeftModelAuthorityService = class {
|
|
|
482330
482537
|
p.load.artifactRoot,
|
|
482331
482538
|
p.plan.peft.adapterRoot
|
|
482332
482539
|
]) {
|
|
482333
|
-
const a =
|
|
482540
|
+
const a = relative41(resolve65(sourceRoot), resolve65(options.workRoot)), b = relative41(resolve65(options.workRoot), resolve65(sourceRoot));
|
|
482334
482541
|
need22(
|
|
482335
482542
|
(a === ".." || a.startsWith("../") || isAbsolute57(a)) && (b === ".." || b.startsWith("../") || isAbsolute57(b)),
|
|
482336
482543
|
"native producer work must be disjoint from immutable sources and CAS"
|
|
@@ -483562,7 +483769,7 @@ import {
|
|
|
483562
483769
|
realpathSync as realpathSync42,
|
|
483563
483770
|
writeFileSync as writeFileSync44
|
|
483564
483771
|
} from "node:fs";
|
|
483565
|
-
import { isAbsolute as isAbsolute61, join as join101, relative as
|
|
483772
|
+
import { isAbsolute as isAbsolute61, join as join101, relative as relative42, resolve as resolve66 } from "node:path";
|
|
483566
483773
|
import { createRequire as createRequire8 } from "node:module";
|
|
483567
483774
|
|
|
483568
483775
|
// packages/cli/src/nol/model-subject-adapter.ts
|
|
@@ -484278,7 +484485,7 @@ var frozen3 = (value) => {
|
|
|
484278
484485
|
return value;
|
|
484279
484486
|
};
|
|
484280
484487
|
var inside4 = (root2, path13) => {
|
|
484281
|
-
const part =
|
|
484488
|
+
const part = relative42(root2, path13);
|
|
484282
484489
|
return !part || part !== ".." && !part.startsWith("../") && !isAbsolute61(part);
|
|
484283
484490
|
};
|
|
484284
484491
|
function object26(value) {
|
|
@@ -487045,7 +487252,7 @@ init_dist5();
|
|
|
487045
487252
|
import { createHash as createHash182 } from "node:crypto";
|
|
487046
487253
|
import { constants as constants25, lstatSync as lstatSync23, realpathSync as realpathSync43 } from "node:fs";
|
|
487047
487254
|
import { lstat as lstat21, open as open16, opendir as opendir6 } from "node:fs/promises";
|
|
487048
|
-
import { join as join102, relative as
|
|
487255
|
+
import { join as join102, relative as relative43, isAbsolute as isAbsolute62 } from "node:path";
|
|
487049
487256
|
import { fileURLToPath as fileURLToPath12 } from "node:url";
|
|
487050
487257
|
import { performance as performance5 } from "node:perf_hooks";
|
|
487051
487258
|
import { setImmediate as yieldImmediate } from "node:timers/promises";
|
|
@@ -487094,7 +487301,7 @@ function integer26(value, low = 0, high = Number.MAX_SAFE_INTEGER) {
|
|
|
487094
487301
|
}
|
|
487095
487302
|
var stamp6 = (info) => `${info.dev}:${info.ino}:${info.mode}:${info.size}:${info.mtimeMs}:${info.ctimeMs}`;
|
|
487096
487303
|
var inside5 = (root2, path13) => {
|
|
487097
|
-
const part =
|
|
487304
|
+
const part = relative43(root2, path13);
|
|
487098
487305
|
return !part || !isAbsolute62(part) && part !== ".." && !part.startsWith("../");
|
|
487099
487306
|
};
|
|
487100
487307
|
function json7(bytes5) {
|
|
@@ -487288,7 +487495,7 @@ async function paths2(root2, budget) {
|
|
|
487288
487495
|
if (entry.isDirectory()) pending.push(path13);
|
|
487289
487496
|
else {
|
|
487290
487497
|
need26(entry.isFile(), "nonregular source refused");
|
|
487291
|
-
result.push(
|
|
487498
|
+
result.push(relative43(root2, path13));
|
|
487292
487499
|
}
|
|
487293
487500
|
}
|
|
487294
487501
|
} finally {
|
|
@@ -488404,7 +488611,7 @@ import {
|
|
|
488404
488611
|
realpath as realpath16,
|
|
488405
488612
|
unlink as unlink5
|
|
488406
488613
|
} from "node:fs/promises";
|
|
488407
|
-
import { dirname as dirname59, isAbsolute as isAbsolute63, join as join103, relative as
|
|
488614
|
+
import { dirname as dirname59, isAbsolute as isAbsolute63, join as join103, relative as relative44, resolve as resolve67 } from "node:path";
|
|
488408
488615
|
import { fileURLToPath as fileURLToPath14, pathToFileURL as pathToFileURL2 } from "node:url";
|
|
488409
488616
|
import { findPackageJSON } from "node:module";
|
|
488410
488617
|
var NOL_GGUF_CPU_CONTROL_READER_JOB_KIND = "nol_cpu_control_reader";
|
|
@@ -488426,7 +488633,7 @@ function need28(value, message3) {
|
|
|
488426
488633
|
if (!value) throw new Error(`CPU control reader: ${message3}`);
|
|
488427
488634
|
}
|
|
488428
488635
|
var inside6 = (root2, path13) => {
|
|
488429
|
-
const value =
|
|
488636
|
+
const value = relative44(root2, path13);
|
|
488430
488637
|
return !value || !isAbsolute63(value) && value !== ".." && !value.startsWith("../");
|
|
488431
488638
|
};
|
|
488432
488639
|
var same35 = (a, b) => canonicalNolJson(a) === canonicalNolJson(b);
|
|
@@ -488998,7 +489205,7 @@ var NolGgufCpuControlReaderService = class {
|
|
|
488998
489205
|
}
|
|
488999
489206
|
});
|
|
489000
489207
|
this.options.store.appendEvent(active.lease, "cpu_reader_call_admitted", {
|
|
489001
|
-
relativeWorkDirectory:
|
|
489208
|
+
relativeWorkDirectory: relative44(this.workRoot, active.workDirectory),
|
|
489002
489209
|
reportBytesReserved: this.limits.maxReportBytesPerJob,
|
|
489003
489210
|
helperCalls: 1,
|
|
489004
489211
|
cudaAllowed: false
|
|
@@ -489201,7 +489408,7 @@ var NolGgufCpuControlReaderService = class {
|
|
|
489201
489408
|
entry.name.endsWith(".json") ? "application/json" : "application/octet-stream"
|
|
489202
489409
|
);
|
|
489203
489410
|
files.push({
|
|
489204
|
-
path:
|
|
489411
|
+
path: relative44(active.reportsRoot, path13),
|
|
489205
489412
|
artifact: artifact5
|
|
489206
489413
|
});
|
|
489207
489414
|
}
|
|
@@ -489414,7 +489621,7 @@ init_dist5();
|
|
|
489414
489621
|
import { createHash as createHash184 } from "node:crypto";
|
|
489415
489622
|
import { constants as constants27, lstatSync as lstatSync25, realpathSync as realpathSync45 } from "node:fs";
|
|
489416
489623
|
import { lstat as lstat23, open as open18, opendir as opendir8 } from "node:fs/promises";
|
|
489417
|
-
import { isAbsolute as isAbsolute64, join as join104, relative as
|
|
489624
|
+
import { isAbsolute as isAbsolute64, join as join104, relative as relative45 } from "node:path";
|
|
489418
489625
|
import { fileURLToPath as fileURLToPath15 } from "node:url";
|
|
489419
489626
|
import { performance as performance6 } from "node:perf_hooks";
|
|
489420
489627
|
var NOL_GGUF_DENSE_CONTROL_PROTOCOL = "omnius.nol.gguf-dense-post-storage-rademacher.v1";
|
|
@@ -489446,7 +489653,7 @@ function digest20(v) {
|
|
|
489446
489653
|
}
|
|
489447
489654
|
var stamp7 = (s) => `${s.dev}:${s.ino}:${s.mode}:${s.size}:${s.mtimeMs}:${s.ctimeMs}`;
|
|
489448
489655
|
var inside7 = (root2, path13) => {
|
|
489449
|
-
const part =
|
|
489656
|
+
const part = relative45(root2, path13);
|
|
489450
489657
|
return part === "" || !isAbsolute64(part) && part !== ".." && !part.startsWith("../");
|
|
489451
489658
|
};
|
|
489452
489659
|
function keys7(v, names2) {
|
|
@@ -489628,7 +489835,7 @@ async function directory2(root2, expected, b) {
|
|
|
489628
489835
|
e.isFile() && actual.length < expected.length,
|
|
489629
489836
|
"unexpected source type/count"
|
|
489630
489837
|
);
|
|
489631
|
-
actual.push(
|
|
489838
|
+
actual.push(relative45(root2, full));
|
|
489632
489839
|
}
|
|
489633
489840
|
}
|
|
489634
489841
|
} finally {
|
|
@@ -490659,7 +490866,7 @@ init_dist5();
|
|
|
490659
490866
|
import { createHash as createHash185 } from "node:crypto";
|
|
490660
490867
|
import { constants as constants28, lstatSync as lstatSync26, realpathSync as realpathSync46 } from "node:fs";
|
|
490661
490868
|
import { lstat as lstat24, open as open19, opendir as opendir9 } from "node:fs/promises";
|
|
490662
|
-
import { isAbsolute as isAbsolute65, join as join105, relative as
|
|
490869
|
+
import { isAbsolute as isAbsolute65, join as join105, relative as relative46 } from "node:path";
|
|
490663
490870
|
import { performance as performance7 } from "node:perf_hooks";
|
|
490664
490871
|
import { fileURLToPath as fileURLToPath16 } from "node:url";
|
|
490665
490872
|
var NOL_SAFETENSORS_CONTROL_PROTOCOL = "omnius.nol.post-storage-rademacher.v1";
|
|
@@ -490738,7 +490945,7 @@ function stamp8(info) {
|
|
|
490738
490945
|
return `${info.dev}:${info.ino}:${info.mode}:${info.size}:${info.mtimeMs}:${info.ctimeMs}`;
|
|
490739
490946
|
}
|
|
490740
490947
|
function inside8(root2, path13) {
|
|
490741
|
-
const part =
|
|
490948
|
+
const part = relative46(root2, path13);
|
|
490742
490949
|
return part === "" || !isAbsolute65(part) && part !== ".." && !part.startsWith("../");
|
|
490743
490950
|
}
|
|
490744
490951
|
function parseJson2(bytes5) {
|
|
@@ -490989,7 +491196,7 @@ async function inventory3(root2, budget) {
|
|
|
490989
491196
|
if (entry.isDirectory()) dirs.push(path13);
|
|
490990
491197
|
else {
|
|
490991
491198
|
need30(entry.isFile(), "nonregular checkpoint input refused");
|
|
490992
|
-
result.push(
|
|
491199
|
+
result.push(relative46(root2, path13));
|
|
490993
491200
|
}
|
|
490994
491201
|
}
|
|
490995
491202
|
} finally {
|
|
@@ -491483,7 +491690,7 @@ async function model2(subject, options, budget, opened, readers) {
|
|
|
491483
491690
|
Object.fromEntries(
|
|
491484
491691
|
[...tensors].map(([name, value]) => [
|
|
491485
491692
|
name,
|
|
491486
|
-
|
|
491693
|
+
relative46(root2, value.file.path)
|
|
491487
491694
|
])
|
|
491488
491695
|
),
|
|
491489
491696
|
"shard index inventory mismatch"
|
|
@@ -492185,7 +492392,7 @@ import {
|
|
|
492185
492392
|
realpath as realpath17,
|
|
492186
492393
|
unlink as unlink6
|
|
492187
492394
|
} from "node:fs/promises";
|
|
492188
|
-
import { dirname as dirname60, isAbsolute as isAbsolute66, join as join106, relative as
|
|
492395
|
+
import { dirname as dirname60, isAbsolute as isAbsolute66, join as join106, relative as relative47, resolve as resolve68 } from "node:path";
|
|
492189
492396
|
import { fileURLToPath as fileURLToPath17, pathToFileURL as pathToFileURL3 } from "node:url";
|
|
492190
492397
|
import { findPackageJSON as findPackageJSON2 } from "node:module";
|
|
492191
492398
|
var NOL_CPU_CONTROL_READER_JOB_KIND = "nol_cpu_control_reader";
|
|
@@ -492207,7 +492414,7 @@ function need31(value, message3) {
|
|
|
492207
492414
|
if (!value) throw new Error(`CPU control reader: ${message3}`);
|
|
492208
492415
|
}
|
|
492209
492416
|
var inside9 = (root2, path13) => {
|
|
492210
|
-
const value =
|
|
492417
|
+
const value = relative47(root2, path13);
|
|
492211
492418
|
return !value || !isAbsolute66(value) && value !== ".." && !value.startsWith("../");
|
|
492212
492419
|
};
|
|
492213
492420
|
var same38 = (a, b) => canonicalNolJson(a) === canonicalNolJson(b);
|
|
@@ -492779,7 +492986,7 @@ var NolCpuControlReaderService = class {
|
|
|
492779
492986
|
}
|
|
492780
492987
|
});
|
|
492781
492988
|
this.options.store.appendEvent(active.lease, "cpu_reader_call_admitted", {
|
|
492782
|
-
relativeWorkDirectory:
|
|
492989
|
+
relativeWorkDirectory: relative47(this.workRoot, active.workDirectory),
|
|
492783
492990
|
reportBytesReserved: this.limits.maxReportBytesPerJob,
|
|
492784
492991
|
helperCalls: 1,
|
|
492785
492992
|
cudaAllowed: false
|
|
@@ -492982,7 +493189,7 @@ var NolCpuControlReaderService = class {
|
|
|
492982
493189
|
entry.name.endsWith(".json") ? "application/json" : "application/octet-stream"
|
|
492983
493190
|
);
|
|
492984
493191
|
files.push({
|
|
492985
|
-
path:
|
|
493192
|
+
path: relative47(active.reportsRoot, path13),
|
|
492986
493193
|
artifact: artifact5
|
|
492987
493194
|
});
|
|
492988
493195
|
}
|
|
@@ -496969,7 +497176,7 @@ function ownedPath(root2, value) {
|
|
|
496969
497176
|
400,
|
|
496970
497177
|
"NOL state paths must be explicit absolute paths"
|
|
496971
497178
|
);
|
|
496972
|
-
const path13 = resolve69(value), rel =
|
|
497179
|
+
const path13 = resolve69(value), rel = relative48(root2, path13);
|
|
496973
497180
|
if (!rel || rel.startsWith("..") || isAbsolute68(rel))
|
|
496974
497181
|
throw new NolFacadeError(
|
|
496975
497182
|
"invalid_config",
|
|
@@ -496979,7 +497186,7 @@ function ownedPath(root2, value) {
|
|
|
496979
497186
|
let ancestor = path13;
|
|
496980
497187
|
while (true) {
|
|
496981
497188
|
try {
|
|
496982
|
-
const canonical10 = realpathSync48.native(ancestor), inside10 =
|
|
497189
|
+
const canonical10 = realpathSync48.native(ancestor), inside10 = relative48(root2, canonical10);
|
|
496983
497190
|
if (inside10.startsWith("..") || isAbsolute68(inside10))
|
|
496984
497191
|
throw new NolFacadeError(
|
|
496985
497192
|
"invalid_config",
|
|
@@ -497048,7 +497255,7 @@ async function readNolRuntimeConfig(root2, configPath2) {
|
|
|
497048
497255
|
models.peft.authority.workRoot
|
|
497049
497256
|
);
|
|
497050
497257
|
const disjoint2 = (a, b) => {
|
|
497051
|
-
const contains3 = (x, y) => y === x || y.startsWith(x +
|
|
497258
|
+
const contains3 = (x, y) => y === x || y.startsWith(x + sep12);
|
|
497052
497259
|
if (contains3(a, b) || contains3(b, a))
|
|
497053
497260
|
throw new NolFacadeError(
|
|
497054
497261
|
"invalid_config",
|
|
@@ -500175,7 +500382,7 @@ init_dist();
|
|
|
500175
500382
|
init_dist5();
|
|
500176
500383
|
import { createHash as createHash195, randomUUID as randomUUID88 } from "node:crypto";
|
|
500177
500384
|
import { mkdir as mkdir21, lstat as lstat26, realpath as realpath19 } from "node:fs/promises";
|
|
500178
|
-
import { isAbsolute as isAbsolute69, join as join109, relative as
|
|
500385
|
+
import { isAbsolute as isAbsolute69, join as join109, relative as relative49, resolve as resolve71 } from "node:path";
|
|
500179
500386
|
init_gne_conformance();
|
|
500180
500387
|
var KIND2 = "nol_gne_tools_conformance";
|
|
500181
500388
|
var ISSUED2 = "nol_gne_tools_conformance_issued";
|
|
@@ -500699,7 +500906,7 @@ var NolGneToolsProofJob = class _NolGneToolsProofJob {
|
|
|
500699
500906
|
typeof file.path === "string" && isAbsolute69(file.path) && file.mediaType === "application/x-npz",
|
|
500700
500907
|
"capture private path/media missing"
|
|
500701
500908
|
);
|
|
500702
|
-
const fileState = await lstat26(file.path), actualPath = await realpath19(file.path), root2 = await realpath19(session.workRoot), rel =
|
|
500909
|
+
const fileState = await lstat26(file.path), actualPath = await realpath19(file.path), root2 = await realpath19(session.workRoot), rel = relative49(root2, actualPath);
|
|
500703
500910
|
current6();
|
|
500704
500911
|
need38(
|
|
500705
500912
|
fileState.isFile() && !fileState.isSymbolicLink() && rel && !rel.startsWith("..") && !isAbsolute69(rel),
|