@lazyingart/agintiflow 0.20.227 → 0.20.228

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.227",
3
+ "version": "0.20.228",
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",
@@ -1115,6 +1115,27 @@ try {
1115
1115
  assert(cdWorkspacePolicy.allowed, "cd /workspace should be allowed in docker-workspace mode");
1116
1116
  const gitCleanDryRunPolicy = evaluateCommandPolicy("git clean -nd reports", dockerWorkspacePolicy);
1117
1117
  assert(gitCleanDryRunPolicy.allowed, "git clean dry-run should be allowed as read-only inspection evidence");
1118
+ const gitRmCachedPolicy = evaluateCommandPolicy(
1119
+ "git rm --cached -q build/__pycache__/content.cpython-312.pyc",
1120
+ dockerWorkspaceNoInstallsPolicy
1121
+ );
1122
+ assert(gitRmCachedPolicy.allowed, "bounded git rm --cached should preserve the working tree and remain allowed");
1123
+ assert(gitRmCachedPolicy.category === "git-workflow", "bounded git rm --cached should be a git workflow command");
1124
+ const gitRmCachedRecursivePolicy = evaluateCommandPolicy(
1125
+ "git rm --cached -r build",
1126
+ dockerWorkspaceNoInstallsPolicy
1127
+ );
1128
+ assert(!gitRmCachedRecursivePolicy.allowed, "recursive git rm --cached should remain guarded");
1129
+ const gitRmCachedGlobPolicy = evaluateCommandPolicy(
1130
+ "git rm --cached 'build/**/*.pyc'",
1131
+ dockerWorkspaceNoInstallsPolicy
1132
+ );
1133
+ assert(!gitRmCachedGlobPolicy.allowed, "globbed git rm --cached should remain guarded");
1134
+ const gitRmWorkingTreePolicy = evaluateCommandPolicy(
1135
+ "git rm build/content.py",
1136
+ dockerWorkspaceNoInstallsPolicy
1137
+ );
1138
+ assert(!gitRmWorkingTreePolicy.allowed, "git rm without --cached must remain guarded");
1118
1139
  const localGitInitPolicy = evaluateCommandPolicy("git init", dockerWorkspaceNoInstallsPolicy);
1119
1140
  assert(localGitInitPolicy.allowed, "local git init should be allowed without package installs");
1120
1141
  assert(localGitInitPolicy.category === "git-workflow", "local git init should be classified as git-workflow");
@@ -264,6 +264,16 @@ assert(
264
264
  "excluding output filenames also removed a real required text term"
265
265
  );
266
266
 
267
+ const wordDocumentContract = deriveScsTaskContract({
268
+ goal: "Create an editable DOCX and a phone-friendly PDF, then verify both outputs.",
269
+ taskProfile: "word",
270
+ });
271
+ assert.deepEqual(
272
+ wordDocumentContract.requiredEvidence.map((item) => item.category).sort(),
273
+ ["artifact", "command", "file"],
274
+ "Word document production must require written files, validation, and durable artifacts"
275
+ );
276
+
267
277
  const groundingRoot = fs.mkdtempSync(path.join(os.tmpdir(), "aginti-source-grounding-"));
268
278
  try {
269
279
  const reportPath = path.join(groundingRoot, "READINESS.md");
@@ -1226,6 +1226,48 @@ function classifyGitCleanDryRun(normalized) {
1226
1226
  };
1227
1227
  }
1228
1228
 
1229
+ function classifyGitRmCached(normalized) {
1230
+ if (!/^git\s+rm\b/.test(normalized) || hasActiveShellExpansion(normalized)) return null;
1231
+ const tokens = tokenizeShellWords(normalized);
1232
+ if (tokens[0] !== "git" || tokens[1] !== "rm") return null;
1233
+
1234
+ let cached = false;
1235
+ const paths = [];
1236
+ let afterOptions = false;
1237
+ for (const token of tokens.slice(2)) {
1238
+ if (!afterOptions && token === "--") {
1239
+ afterOptions = true;
1240
+ continue;
1241
+ }
1242
+ if (!afterOptions && ["--cached"].includes(token)) {
1243
+ cached = true;
1244
+ continue;
1245
+ }
1246
+ if (!afterOptions && ["-q", "--quiet"].includes(token)) continue;
1247
+ if (!afterOptions && token.startsWith("-")) return null;
1248
+ paths.push(token);
1249
+ }
1250
+ if (!cached || !paths.length || paths.length > 20) return null;
1251
+ if (
1252
+ paths.some(
1253
+ (target) =>
1254
+ target === "." ||
1255
+ /[*?\[\]{}]/.test(target) ||
1256
+ !isSafeRelativeDir(target)
1257
+ )
1258
+ ) {
1259
+ return null;
1260
+ }
1261
+ return {
1262
+ category: "git-workflow",
1263
+ needsNetwork: false,
1264
+ writesWorkspace: true,
1265
+ gitOnly: true,
1266
+ reason:
1267
+ "Git rm --cached removes only bounded literal workspace paths from the index; working-tree files are preserved.",
1268
+ };
1269
+ }
1270
+
1229
1271
  function classifyGitClone(normalized) {
1230
1272
  const match = normalized.match(
1231
1273
  /^git\s+clone(?:\s+--depth\s+\d+)?(?:\s+--branch\s+[-\w./]+)?\s+(https:\/\/\S+)(?:\s+([-\w./]+))?$/
@@ -1305,6 +1347,8 @@ function classifySimpleCommand(normalized) {
1305
1347
  }
1306
1348
  const gitCleanDryRun = classifyGitCleanDryRun(normalized);
1307
1349
  if (gitCleanDryRun) return gitCleanDryRun;
1350
+ const gitRmCached = classifyGitRmCached(normalized);
1351
+ if (gitRmCached) return gitRmCached;
1308
1352
  const scopedReadOnlyGitProbe = classifyScopedReadOnlyGitProbe(normalized);
1309
1353
  if (scopedReadOnlyGitProbe) return scopedReadOnlyGitProbe;
1310
1354
  const gitWorkflowClassification = classifyGitWorkflow(normalized);
@@ -259,7 +259,7 @@ const PROFILE_REQUIREMENTS = {
259
259
  design: ["artifact", "visual"],
260
260
  image: ["artifact", "visual"],
261
261
  slides: ["artifact"],
262
- word: ["artifact"],
262
+ word: ["file", "command", "artifact"],
263
263
  data: ["file", "command", "artifact"],
264
264
  qa: ["command"],
265
265
  review: ["command"],
@@ -276,7 +276,7 @@ export const TASK_PROFILES = {
276
276
  id: "word",
277
277
  label: "Word documents",
278
278
  prompt:
279
- "Bias toward Word/docx/document workflows while still using writing, conversion, LaTeX, or scripts when useful. Preserve originals, create clear output filenames, use available local tools such as pandoc/libreoffice/python packages when present, and verify generated documents exist before reporting success.",
279
+ "Bias toward Word/docx/document workflows while still using writing, conversion, LaTeX, or scripts when useful. Preserve source material byte-for-byte and synthesize a reader-facing document from the current corrected facts instead of concatenating notes, logs, schemas, task IDs, private paths, or delivery instructions. Prefer mature editable-document tooling already available in the workspace, such as python-docx, pandoc, or LibreOffice, over hand-written OOXML; when direct OOXML is genuinely necessary, validate its package parts and openability. Keep one maintainable source of truth and a reproducible project-local build command. Verify the DOCX is structurally editable, render or convert it for visual inspection, compile the PDF, inspect every rendered page, and run pdftotext or an equivalent extraction check that rejects replacement characters and unexpected control glyphs. Resolve stale-versus-current facts explicitly, use clear descriptive filenames, exclude caches and generated debris from commits, inspect git status/diff before committing, and report success only after the editable source, reader-facing content, visual layout, searchable text, and requested artifacts all pass.",
280
280
  tools: ["files", "shell", "canvas", "sandbox"],
281
281
  },
282
282
  latex: {