@lazyingart/agintiflow 0.20.305 → 0.20.306
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lazyingart/agintiflow",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.306",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "AgInTiFlow is a project-aware agent workspace for hybrid wet-dry R&D, hardware-aware intelligence, software automation, and industrial workflows.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -33,6 +33,51 @@ const groupBriefingContract = deriveScsTaskContract({
|
|
|
33
33
|
].join(" "),
|
|
34
34
|
taskProfile: "research",
|
|
35
35
|
});
|
|
36
|
+
const scopedReadThenWriteRoot = fs.mkdtempSync(
|
|
37
|
+
path.join(os.tmpdir(), "aginti-scoped-read-then-write-")
|
|
38
|
+
);
|
|
39
|
+
const scopedReadThenWriteGoal = [
|
|
40
|
+
`AGINTI_EVIDENCE_SCOPE_JSON: ${JSON.stringify({
|
|
41
|
+
mode: "task",
|
|
42
|
+
request:
|
|
43
|
+
"Read AGENTS.md and configs/model-policy.json, then create provider-fallback-readiness.md in the task artifact directory.",
|
|
44
|
+
artifact_root: scopedReadThenWriteRoot,
|
|
45
|
+
})}`,
|
|
46
|
+
"Use the task artifact directory for the requested output.",
|
|
47
|
+
].join("\n");
|
|
48
|
+
const scopedReadThenWriteContract = deriveScsTaskContract({
|
|
49
|
+
goal: scopedReadThenWriteGoal,
|
|
50
|
+
taskProfile: "auto",
|
|
51
|
+
});
|
|
52
|
+
assert.deepEqual(
|
|
53
|
+
scopedReadThenWriteContract.exactInputPaths,
|
|
54
|
+
["AGENTS.md", "configs/model-policy.json"],
|
|
55
|
+
"explicit read-then-write artifact contract lost its exact source inputs"
|
|
56
|
+
);
|
|
57
|
+
assert.equal(
|
|
58
|
+
scopedReadThenWriteContract.requiresSourceGrounding,
|
|
59
|
+
true,
|
|
60
|
+
"explicit exact-file reads were not required before artifact completion"
|
|
61
|
+
);
|
|
62
|
+
fs.writeFileSync(
|
|
63
|
+
path.join(scopedReadThenWriteRoot, "provider-fallback-readiness.md"),
|
|
64
|
+
"# Provider fallback readiness\n",
|
|
65
|
+
"utf8"
|
|
66
|
+
);
|
|
67
|
+
const ungroundedScopedArtifact = evaluateScsSemanticContract(
|
|
68
|
+
scopedReadThenWriteContract,
|
|
69
|
+
{ commandCwd: scopedReadThenWriteRoot, events: [], state: {} }
|
|
70
|
+
);
|
|
71
|
+
assert.equal(
|
|
72
|
+
ungroundedScopedArtifact.ok,
|
|
73
|
+
false,
|
|
74
|
+
"artifact completion passed without the explicitly requested source reads"
|
|
75
|
+
);
|
|
76
|
+
assert.deepEqual(
|
|
77
|
+
ungroundedScopedArtifact.missingSourceReads,
|
|
78
|
+
["AGENTS.md", "configs/model-policy.json"],
|
|
79
|
+
"artifact completion did not report every unread exact input"
|
|
80
|
+
);
|
|
36
81
|
assert.deepEqual(
|
|
37
82
|
groupBriefingContract.requiredArtifactKinds.map((item) => item.id),
|
|
38
83
|
["format:.pdf"],
|
package/src/scs-evidence.js
CHANGED
|
@@ -1414,7 +1414,17 @@ function isReadOnlyReadinessTask(goal = "") {
|
|
|
1414
1414
|
|
|
1415
1415
|
function requiresSourceGrounding(goal = "") {
|
|
1416
1416
|
const text = String(goal || "");
|
|
1417
|
+
const positiveText = stripForbiddenLanguage(text);
|
|
1418
|
+
const inferredOutputs = new Set(inferExactOutputPaths(positiveText));
|
|
1419
|
+
const explicitSourceInputs = inferExactInputPaths(positiveText).filter(
|
|
1420
|
+
(item) => !inferredOutputs.has(item)
|
|
1421
|
+
);
|
|
1422
|
+
const explicitlyRequestedInputRead = Boolean(
|
|
1423
|
+
/\b(?:read|inspect|review|audit|consult|examine)\b/iu.test(positiveText) &&
|
|
1424
|
+
explicitSourceInputs.length > 0
|
|
1425
|
+
);
|
|
1417
1426
|
return (
|
|
1427
|
+
explicitlyRequestedInputRead ||
|
|
1418
1428
|
isReadOnlyReadinessTask(text) ||
|
|
1419
1429
|
/\b(?:re-?read|read|inspect|review|audit)\b[^.\n;]{0,120}\b(?:repository|project|workspace)\b[^.\n;]{0,120}\b(?:requirements?|instructions?|implementation|source|tests?)\b/i.test(
|
|
1420
1430
|
text
|
|
@@ -3580,7 +3590,10 @@ function sourceEvidencePaths({ events = [], state = {}, contract = {}, commandCw
|
|
|
3580
3590
|
}
|
|
3581
3591
|
|
|
3582
3592
|
function sourceScopeCoverage(contract = {}, { events = [], state = {}, commandCwd = process.cwd() } = {}) {
|
|
3583
|
-
const roots = (
|
|
3593
|
+
const roots = unique([
|
|
3594
|
+
...(contract.declaredSourceRoots || []),
|
|
3595
|
+
...(contract.exactInputPaths || []),
|
|
3596
|
+
]).map((rawPath) => ({
|
|
3584
3597
|
rawPath,
|
|
3585
3598
|
absolutePath: resolveContractPath(commandCwd, rawPath).replace(/\/+$/, ""),
|
|
3586
3599
|
}));
|