@lazyingart/agintiflow 0.20.276 → 0.20.277

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.276",
3
+ "version": "0.20.277",
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",
@@ -871,6 +871,46 @@ try {
871
871
  "a session-generated helper circularly grounded a path claim"
872
872
  );
873
873
 
874
+ fs.writeFileSync(
875
+ reportPath,
876
+ "Verified generated helper: `notes/generated-evidence.md`.\n",
877
+ "utf8"
878
+ );
879
+ const generatedHelperPathIsDirectlyObserved = evaluateScsSemanticContract(contract, {
880
+ commandCwd: groundingRoot,
881
+ events: [
882
+ {
883
+ type: "tool.completed",
884
+ data: {
885
+ ok: true,
886
+ toolName: "write_file",
887
+ path: "notes/generated-evidence.md",
888
+ change: { path: "notes/generated-evidence.md" },
889
+ },
890
+ },
891
+ {
892
+ type: "file.changed",
893
+ data: { path: "notes/generated-evidence.md", commandCwd: groundingRoot },
894
+ },
895
+ {
896
+ type: "tool.completed",
897
+ data: {
898
+ ok: true,
899
+ toolName: "read_file",
900
+ path: "notes/generated-evidence.md",
901
+ content: helperContent,
902
+ commandEvidence: extractMarkdownCommandEvidence(helperContent, "notes/generated-evidence.md"),
903
+ pathEvidence: extractMarkdownPathEvidence(helperContent, "notes/generated-evidence.md"),
904
+ },
905
+ },
906
+ ],
907
+ });
908
+ assert.equal(
909
+ generatedHelperPathIsDirectlyObserved.ok,
910
+ true,
911
+ "a successful direct read did not ground the generated file's own path"
912
+ );
913
+
874
914
  const shellSourceContent = [
875
915
  "Verified interface:",
876
916
  "```bash",
@@ -2592,11 +2592,11 @@ function sourceEvidencePaths({ events = [], state = {}, contract = {}, commandCw
2592
2592
  commandCwd,
2593
2593
  });
2594
2594
  const paths = new Map();
2595
- const addPath = (value = "", source = "") => {
2595
+ const addPath = (value = "", source = "", { allowExcludedDirect = false } = {}) => {
2596
2596
  const cleaned = cleanPathToken(value);
2597
2597
  if (!cleaned) return;
2598
2598
  const keys = pathComparisonKeys(cleaned, commandCwd);
2599
- if (keys.some((key) => excluded.has(key))) return;
2599
+ if (!allowExcludedDirect && keys.some((key) => excluded.has(key))) return;
2600
2600
  const canonical = keys[keys.length - 1] || cleaned;
2601
2601
  if (!paths.has(canonical)) paths.set(canonical, { path: cleaned, source: String(source || "") });
2602
2602
  for (const key of keys) {
@@ -2641,8 +2641,12 @@ function sourceEvidencePaths({ events = [], state = {}, contract = {}, commandCw
2641
2641
  const payloadPath = payload.path || payload.args?.path || "";
2642
2642
  const payloadPathKeys = pathComparisonKeys(payloadPath, commandCwd);
2643
2643
  const sourceIsExcluded = payloadPathKeys.some((key) => excluded.has(key));
2644
- if (toolName === "read_file" && sourceIsExcluded) return;
2645
- if (["read_file", "list_files", "search_files", "inspect_project"].includes(toolName)) {
2644
+ if (toolName === "read_file") {
2645
+ // Reading a generated or previously mutated file proves that exact path
2646
+ // exists. Its contents still cannot ground additional claims.
2647
+ addPath(payloadPath, `${toolName} result`, { allowExcludedDirect: true });
2648
+ if (sourceIsExcluded) return;
2649
+ } else if (["list_files", "search_files", "inspect_project"].includes(toolName)) {
2646
2650
  addPath(payloadPath, `${toolName} result`);
2647
2651
  }
2648
2652
  if (toolName === "read_file") {