@molecule/api-ai-tools 1.17.11 → 1.17.12

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/README.md CHANGED
@@ -3,7 +3,7 @@ AUTO-GENERATED — DO NOT EDIT THIS FILE.
3
3
  Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
4
4
  Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
5
5
  To change this document, edit the module-level JSDoc in src/index.ts.
6
- Generated: 2026-11-12T08:35:53.429Z
6
+ Generated: 2026-11-12T09:30:47.522Z
7
7
  -->
8
8
 
9
9
  # @molecule/api-ai-tools
@@ -6020,7 +6020,8 @@ Peer dependencies:
6020
6020
  - `typescript`
6021
6021
 
6022
6022
  - `outputFilterAfterRunner` returns only removable output cuts. File redirects, in-place
6023
- edits and filter programs with write or execution effects retain their pipelines.
6023
+ edits, command substitutions and filter programs with write or execution effects retain
6024
+ their pipelines. Dynamic/external filter scripts and unrecognized awk options stay unchanged.
6024
6025
  - Playwright commands apply `excludedTestTitles` before launch. Existing
6025
6026
  literal filters remain in effect. Dynamic filters and opaque launchers stay unchanged.
6026
6027
  - **Trimmed test output keeps every failure named.** Shared log cuts prioritize capped
package/dist/index.d.ts CHANGED
@@ -13,7 +13,8 @@
13
13
  *
14
14
  * @remarks
15
15
  * - `outputFilterAfterRunner` returns only removable output cuts. File redirects, in-place
16
- * edits and filter programs with write or execution effects retain their pipelines.
16
+ * edits, command substitutions and filter programs with write or execution effects retain
17
+ * their pipelines. Dynamic/external filter scripts and unrecognized awk options stay unchanged.
17
18
  * - Playwright commands apply `excludedTestTitles` before launch. Existing
18
19
  * literal filters remain in effect. Dynamic filters and opaque launchers stay unchanged.
19
20
  * - **Trimmed test output keeps every failure named.** Shared log cuts prioritize capped
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;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;;;;;;;;;;GAyLG;AAEH,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AACjC,cAAc,uBAAuB,CAAA;AACrC,cAAc,cAAc,CAAA;AAC5B,cAAc,mBAAmB,CAAA;AACjC,cAAc,oBAAoB,CAAA;AAClC,cAAc,uBAAuB,CAAA;AACrC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,oBAAoB,CAAA;AAClC,cAAc,yBAAyB,CAAA;AACvC,cAAc,0BAA0B,CAAA;AACxC,cAAc,oCAAoC,CAAA;AAClD,cAAc,gCAAgC,CAAA;AAC9C,cAAc,wBAAwB,CAAA;AACtC,cAAc,cAAc,CAAA;AAC5B,cAAc,qBAAqB,CAAA;AACnC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AACjC,cAAc,YAAY,CAAA;AAC1B,cAAc,sBAAsB,CAAA;AACpC,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA"}
package/dist/index.js CHANGED
@@ -13,7 +13,8 @@
13
13
  *
14
14
  * @remarks
15
15
  * - `outputFilterAfterRunner` returns only removable output cuts. File redirects, in-place
16
- * edits and filter programs with write or execution effects retain their pipelines.
16
+ * edits, command substitutions and filter programs with write or execution effects retain
17
+ * their pipelines. Dynamic/external filter scripts and unrecognized awk options stay unchanged.
17
18
  * - Playwright commands apply `excludedTestTitles` before launch. Existing
18
19
  * literal filters remain in effect. Dynamic filters and opaque launchers stay unchanged.
19
20
  * - **Trimmed test output keeps every failure named.** Shared log cuts prioritize capped
@@ -1 +1 @@
1
- {"version":3,"file":"output-filter-safety.d.ts","sourceRoot":"","sources":["../src/output-filter-safety.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AA2B3D;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAanE"}
1
+ {"version":3,"file":"output-filter-safety.d.ts","sourceRoot":"","sources":["../src/output-filter-safety.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AA2B3D;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAyCnE"}
@@ -32,13 +32,38 @@ export function isOutputOnlyFilter(segment) {
32
32
  return false;
33
33
  if (segment.args.some((arg) => OUTPUT_REDIRECT.test(arg)))
34
34
  return false;
35
+ // Filter arguments can run commands before the filter starts. Keep opaque expansions
36
+ // rather than erase their effects; a quoted literal containing the same syntax may stay too.
37
+ if (segment.args.some((arg) => /\$\(|`|[<>]\(/.test(arg)))
38
+ return false;
39
+ if (segment.args.some((arg) => {
40
+ if (/^'[^']*'$/.test(arg))
41
+ return false;
42
+ const word = arg.endsWith('"') ? arg.slice(0, -1) : arg;
43
+ return /\$[A-Za-z0-9_('"{?$!#*@-]/.test(word) || word.includes('$[');
44
+ }))
45
+ return false;
35
46
  if (segment.program === 'sed' &&
36
47
  segment.args.some((arg) => /^(?:--in-place\b|-[A-Za-z]*i)/.test(arg)))
37
48
  return false;
38
49
  if (segment.program === 'awk' || segment.program === 'sed') {
50
+ // Implementation-specific awk options can load code or write auxiliary files. Only the
51
+ // ordinary field-separator/variable options are understood here; preserve all other flags.
52
+ if (segment.program === 'awk' &&
53
+ segment.args.some((arg) => arg.startsWith('-') && !/^(?:-[Fv]|--(?:field-separator|assign)(?:=|$)|--$)/.test(arg)))
54
+ return false;
55
+ // External programs cannot be proved output-only from this invocation's text.
56
+ if (segment.args.some((arg) => /^(?:-[fEiIl]|--(?:file|include|load))(?:=|$|[^-])/.test(arg)))
57
+ return false;
39
58
  const program = segment.args.map((arg) => arg.replace(/^['"]|['"]$/g, '')).join(' ');
40
59
  if (/\bsystem\s*\(|>|\bw\s+\S/.test(program))
41
60
  return false;
61
+ // awk can execute a pipe through getline without system(). sed can execute or write text.
62
+ // Keep ambiguous sed command letters rather than parse its language here.
63
+ if (segment.program === 'awk' && /\||@/.test(program))
64
+ return false;
65
+ if (segment.program === 'sed' && /[ewW]/.test(program))
66
+ return false;
42
67
  }
43
68
  return true;
44
69
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@molecule/api-ai-tools",
3
- "version": "1.17.11",
3
+ "version": "1.17.12",
4
4
  "description": "Shared AI agent tools with backend abstraction for sandbox and local execution",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",