@molecule/api-ai-tools 1.16.3 → 1.16.5

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-04T11:19:09.206Z
6
+ Generated: 2026-11-05T15:09:26.641Z
7
7
  -->
8
8
 
9
9
  # @molecule/api-ai-tools
@@ -1266,165 +1266,76 @@ Allows consumers to customize security, callbacks, and tool selection.
1266
1266
 
1267
1267
  ```typescript
1268
1268
  interface ToolBuildConfig {
1269
- /** Which tools to include. Defaults to all. */
1269
+ /** Which tools to include. */
1270
1270
  include?: string[]
1271
1271
 
1272
- /** Which tools to exclude. Applied after include. */
1272
+ /** Which tools to exclude. */
1273
1273
  exclude?: string[]
1274
1274
 
1275
- /** Whether to validate paths stay within projectRoot. Default: true. */
1275
+ /** Whether to validate paths stay within projectRoot. */
1276
1276
  pathGuards?: boolean
1277
1277
 
1278
- /** Whether to check symlinks resolve within projectRoot. Default: false (sandbox-only). */
1278
+ /** Whether to check symlinks resolve within projectRoot. */
1279
1279
  symlinkGuards?: boolean
1280
1280
 
1281
- /** Whether to redact secrets in file reads and command output. Default: true. */
1281
+ /** Whether to redact secrets in file reads and command output. */
1282
1282
  redactSecrets?: boolean
1283
1283
 
1284
- /** Whether to block dangerous shell commands (env dumps, /proc access). Default: false. */
1284
+ /** Whether to block dangerous shell commands (env dumps, /proc access). */
1285
1285
  blockDangerousCommands?: boolean
1286
1286
 
1287
- /**
1288
- * Consumer-specific command guard for `exec_command`, checked BEFORE execution (after
1289
- * the built-in dangerous-command check). Return an error string to block the command —
1290
- * it is returned to the model verbatim, so make it actionable (say what to do instead) —
1291
- * or `null`/`undefined` to allow it. Keeps environment-specific rules (e.g. an IDE
1292
- * sandbox forbidding installs that would break its preinstalled library) out of this
1293
- * shared package.
1294
- *
1295
- * @param command - The shell command the model asked to run.
1296
- * @param cwd - The resolved working directory it would run in.
1297
- * @returns An error string to block, or null/undefined to allow.
1298
- */
1287
+ /** Consumer-specific command guard for `exec_command`, checked BEFORE execution (after the built-in dangerous-command check). */
1299
1288
  blockCommand?: (command: string, cwd: string) => string | null | undefined
1300
1289
 
1301
- /**
1302
- * Timeout (ms) for a single `exec_command` run. `exec_command` legitimately
1303
- * runs LONG — `npm install`, a production build, a test suite — so the default
1304
- * is generous (2 min); the old 30 s hardcap killed those spuriously. A consumer
1305
- * that wraps tool calls in its own outer timeout should set this to match (or
1306
- * slightly exceed) that budget so its own timeout is the effective bound and
1307
- * produces the nicer "tool timed out" message. Quick commands are unaffected —
1308
- * this is only the ceiling before a wedged command is killed.
1309
- */
1290
+ /** Timeout (ms) for a single `exec_command` run. */
1310
1291
  execTimeoutMs?: number
1311
1292
 
1312
- /**
1313
- * Budget (ms) for a single `exec_command`, passed to `backend.run` as
1314
- * `budgetMs`: the backend runs the command under `timeout` in its own shell,
1315
- * so when it overruns it is stopped there and the tool still returns
1316
- * everything it printed until then (exit code 124 plus an `error` naming
1317
- * the limit). Without this, an outer per-tool timeout races the run and
1318
- * discards minutes of build or test output along with the result. Set it a
1319
- * little under that outer timeout. Unset = no budget.
1320
- */
1293
+ /** Budget (ms) for a single `exec_command`, passed to `backend.run` as `budgetMs`: the backend runs the command under `timeout` in its own shell, so when it overr… */
1321
1294
  commandBudgetMs?: number
1322
1295
 
1323
- /**
1324
- * Maximum time (ms) one `wait_for_task` call may wait, independently of the foreground
1325
- * {@link commandBudgetMs}. The caller's requested `timeout` is honoured up to this budget.
1326
- * Leave unset to keep the legacy ceiling: `commandBudgetMs` (or 290 s) less a 10 s result
1327
- * margin. A host that raises this must also give the tool call a longer outer watchdog.
1328
- */
1296
+ /** Maximum time (ms) one `wait_for_task` call may wait, independently of the foreground {@link commandBudgetMs}. */
1329
1297
  waitBudgetMs?: number
1330
1298
 
1331
- /**
1332
- * Opt in to one partial diagnostic return for a task driving this known deployed URL.
1333
- * Return null when the task already returned a wait result or its history is unknown.
1334
- * Only a real suite command with a complete inline failure report can yield; it remains
1335
- * running, with no exit code or completed proof. Absent leaves ordinary waits unchanged.
1336
- */
1299
+ /** Opt in to one partial diagnostic return for a task driving this known deployed URL. */
1337
1300
  yieldOnFirstFailureFor?: (taskId: string) => string | null
1338
1301
 
1339
- /**
1340
- * How long (ms) exec_command waits for a command it backgrounded only because the
1341
- * command asked for more than {@link commandBudgetMs}, before handing back a task
1342
- * id; one that finishes inside it returns like a foreground run. Default 45000.
1343
- */
1302
+ /** How long (ms) exec_command waits for a command it backgrounded only because the command asked for more than {@link commandBudgetMs}, before handing back a task… */
1344
1303
  overCeilingGraceMs?: number
1345
1304
 
1346
- /**
1347
- * Directory names `search_files` and `find_files` skip (VS Code
1348
- * `search.exclude` semantics). Defaults to `DEFAULT_SEARCH_EXCLUDED_DIRS`
1349
- * (node_modules, VCS dirs, build output). Pass the consumer's per-project
1350
- * setting so every search surface shares ONE synchronized set.
1351
- */
1305
+ /** Directory names `search_files` and `find_files` skip (VS Code `search.exclude` semantics). */
1352
1306
  searchExcludedDirs?: string[]
1353
1307
 
1354
- /**
1355
- * Whether a LARGE HTML document should come back as its OUTLINE — the head's
1356
- * tags and the tags that open each body section, one line each, plus a note
1357
- * naming the offset/limit that returns the whole document — instead of its
1358
- * whole text. Over {@link MAX_HTML_INLINE_CHARS}, and only when the read named
1359
- * no line window.
1360
- *
1361
- * A getter, not a boolean, because the answer belongs to the TURN, not to the
1362
- * tool set: a host that plans first and builds after wants an outline while the
1363
- * executor is researching (where a read it cannot act on is pure context cost)
1364
- * and the document itself while it is writing the page. Unset means every big
1365
- * HTML read returns its text, which is what a host with no such phases wants.
1366
- *
1367
- * @returns True when a large HTML read should be outlined rather than returned.
1368
- */
1308
+ /** Whether a LARGE HTML document should come back as its OUTLINE — the head's tags and the tags that open each body section, one line each, plus a note naming the… */
1369
1309
  outlineLargeHtml?: () => boolean
1370
1310
 
1371
- /**
1372
- * The test titles the person's request EXCLUDES by name (molecule-dev's `excludedTestTitles`),
1373
- * asked when a finished suite run's cause note is built. Their failures are not causes to fix:
1374
- * the note drops them, says so at the end, and inverts them out of the narrowed re-run it hands
1375
- * over — a result must never name a test beside "it does not count" (an executor once spent a
1376
- * turn and an edit on the excluded test).
1377
- *
1378
- * A getter, not an array, because the request is read per turn while the tool set is built
1379
- * once. Unset means no test is excluded.
1380
- *
1381
- * @returns The quoted titles the request carves out.
1382
- */
1311
+ /** The test titles the person's request EXCLUDES by name (molecule-dev's `excludedTestTitles`), asked when a finished suite run's cause note is built. */
1383
1312
  excludedTestTitles?: () => readonly string[]
1384
1313
 
1385
- /**
1386
- * The `NAME=value` settings the person's request REQUIRES of a suite run (molecule-dev's
1387
- * `requiredRunSettings` — its mode, say), asked when the cause note composes a narrowed re-run
1388
- * of a finished run's failures. A re-run composed from the executor's own command inherits what
1389
- * that command set — and nothing it left out, so a run that measured the suite in `spa` handed
1390
- * back a re-run that would measure `spa` again (the request names `TEST_MODE=fullstack`, and
1391
- * both the run and its re-run omitted it).
1392
- *
1393
- * A getter, not an array: the request is read per turn while the tool set is built once, and
1394
- * what the suite's own files read is the consumer's reading. Unset answers "nothing required".
1395
- *
1396
- * @param command - The command the finished run was started with.
1397
- * @param cwd - The resolved working directory it ran in.
1398
- * @returns The settings to put on a re-run of that command.
1399
- */
1314
+ /** The `NAME=value` settings the person's request REQUIRES of a suite run (molecule-dev's `requiredRunSettings` — its mode, say), asked when the cause note compos… */
1400
1315
  requiredSuiteEnv?: (
1401
1316
  command: string,
1402
1317
  cwd: string,
1403
1318
  ) => Promise<readonly { name: string; value: string }[] | null | undefined>
1404
1319
 
1405
- /**
1406
- * The supplied suite's own budget, when the Playwright config a command would load sets
1407
- * different settings, asked BEFORE the run executes. The consumer knows where the suite and its
1408
- * base config live; this shared package does not, so the reading is the consumer's and the
1409
- * mechanics — putting the flags on the runner's own arguments, before the pipeline and outside
1410
- * any redirect or group closer, and pointing `--config` at the derived config that carries the
1411
- * settings no flag can — are this tool's.
1412
- *
1413
- * Called for a Playwright suite command only, and only the LAST suite step is touched. A run
1414
- * that already keeps the suite's settings, or a sandbox with no supplied suite, answers `null`.
1415
- * Unset (or a hook that throws) changes nothing: the command runs as the model wrote it.
1416
- *
1417
- * @param command - The shell command, as the model sent it.
1418
- * @param cwd - The resolved working directory it will run in.
1419
- * @returns The flags, the derived config and the sentence, or null when nothing is put back.
1420
- */
1320
+ /** The supplied suite's own budget, when the Playwright config a command would load sets different settings, asked BEFORE the run executes. */
1421
1321
  suiteBudget?: (command: string, cwd: string) => Promise<SuiteBudgetPin | null | undefined>
1422
1322
 
1423
- /**
1424
- * A whole walk's duration in ms, as the consumer measured it. A suite run the executor detached
1425
- // … truncated — the full declaration is in node_modules/@molecule/api-ai-tools/dist/types.d.ts
1323
+ /** A whole walk's duration in ms, as the consumer measured it. */
1324
+ suiteRunMs?: (command: string, cwd: string) => Promise<number | null | undefined>
1325
+
1326
+ /** Post-write hook (e.g. auto-format via Prettier/ESLint). */
1327
+ onAfterWrite?: (path: string) => Promise<void>
1328
+
1329
+ /** Diff tracking callback. */
1330
+ onFileDiff?: (event: FileDiffEvent) => void
1331
+
1332
+ /** Structural change callback. */
1333
+ onFileChange?: (event: FileChangeEvent) => void
1334
+ }
1426
1335
  ```
1427
1336
 
1337
+ _(Member comments are shortened to their first sentence to fit; the full declaration is in `node_modules/@molecule/api-ai-tools/dist/types.d.ts`.)_
1338
+
1428
1339
  #### `FileDiffEvent`
1429
1340
 
1430
1341
  Payload emitted when a tracked file changes contents.
@@ -1646,6 +1557,11 @@ interface FailureCause {
1646
1557
  * before its values had loaded). Attached to the cause so the fix needs no `cat` of the file.
1647
1558
  */
1648
1559
  pageShowed?: string[]
1560
+ /**
1561
+ * An adjacent awaited click in this failure's source frame, before its positive state wait.
1562
+ * This proves the browser action returned, not that the app accepted it or a request settled.
1563
+ */
1564
+ precedingClick?: { call: string; where?: string }
1649
1565
  }
1650
1566
  ```
1651
1567
 
@@ -2936,8 +2852,24 @@ deployed URL, where a network blip is likeliest and the retries it dropped are t
2936
2852
  absorb it).
2937
2853
 
2938
2854
  `--max-failures=0` is Playwright's own "no cap" ({@link boundsFailures}), so it is not a
2939
-
2940
- _(description truncated — read the full text in `node_modules/@molecule/api-ai-tools/dist/suite-overlap.d.ts`.)_
2855
+ diagnosis. A command that starts no Playwright run is not one either (false): the question is
2856
+ about a run already read as a Playwright suite.
2857
+
2858
+ A `--grep-invert` is only a narrowing when it excludes MORE than the request already excludes.
2859
+ When the caller passes those approved titles ({@link DiagnosisRunContext}) and the inverted
2860
+ pattern names one of them — the request's own "except …" scope written as the flag, which
2861
+ molecule-dev's `invertDecision` reads the same way — the run still walks the whole proof scope,
2862
+ and it is not a diagnosis. The deployed proof carried exactly
2863
+ that exclusion, the rewriter added `--retries=0` to it, and the run lost the suite's retries on
2864
+ the one walk where a network blip is likeliest.
2865
+
2866
+ A command the PLATFORM composed and launched AS the graded proof keeps the suite's retries for
2867
+ the SELECTION it composed — the failures a redeploy re-runs, named as files and `file:line`
2868
+ ({@link DiagnosisRunContext} `platformProof`). Only that selection is excused: a cap, a title
2869
+ filter, a last-failed set and a local targeted selection stay diagnoses, so the mark cannot turn a walk of
2870
+ part of the suite into the graded measurement. Which targets are local is
2871
+ {@link suiteCommandTarget}'s answer, and the launch rewrite asks it on the same reading
2872
+ ({@link ./utilities.js} `streamingBackgroundCommand`).
2941
2873
 
2942
2874
  ```typescript
2943
2875
  function isDiagnosisRun(command: string, context?: DiagnosisRunContext): boolean
@@ -3128,7 +3060,11 @@ A path INSIDE the link is still decided by what resolves there: a link into a
3128
3060
  real tree is refused, because removing or writing through it reaches the
3129
3061
  install.
3130
3062
 
3131
- _(description truncated — read the full text in `node_modules/@molecule/api-ai-tools/dist/tools.d.ts`.)_
3063
+ The restore route is named because the model that has ALREADY clobbered a file
3064
+ (this refusal is too late for it) is the one who needs it, and because the
3065
+ obvious repair — `npm install <pkg>` — is itself refused in the pre-installed
3066
+ sandbox. `npm pack` + a `tar` extraction over the package directory is the
3067
+ repair both guards leave alone.
3132
3068
 
3133
3069
  ```typescript
3134
3070
  function installedPackageWriteRefusal(
@@ -3176,8 +3112,15 @@ or still in flight when the test ended; it is kept too, but as what it is, not a
3176
3112
  A trace.zip holds ONE trace member per browser context the test used (beside the runner's own
3177
3113
  `test.trace`), and the archive's member order is not the test's chronology. Each member is read
3178
3114
  as its own context: actions and requests keep their context id, requests and frame snapshots
3115
+ keep the pageId Playwright records, and the failing assertion's page — the page its own step id
3116
+ ran on — decides which actions, snapshots and requests become the test's row. What the test's
3117
+ other browser contexts recorded is reported apart, as `otherContexts`.
3179
3118
 
3180
- _(description truncated — read the full text in `node_modules/@molecule/api-ai-tools/dist/trace-artifacts.d.ts`.)_
3119
+ A request answered 4xx by the app's OWN API also keeps what the page SENT and the first of what
3120
+ came back: Playwright stores either inline (`text`) or in a resource entry (`_file`), and both
3121
+ are read. That is where a wrapped body shows: a helper passed
3122
+ `{ data: body }` as app-http's second argument, so every POST/PUT was `{"data":{…}}` and the API
3123
+ validated `{}`. Status alone said only "422".
3181
3124
 
3182
3125
  ```typescript
3183
3126
  function traceArtifactsScript(): string
@@ -3362,6 +3305,38 @@ is `data`, the note names the call shape that produces it.
3362
3305
  Every row opens with the test's LAST user action before the failing assertion and the requests
3363
3306
  that action caused ({@link TraceArtifact.lastAction}) — started after it, before the assertion,
3364
3307
  the app's own API calls first, each with its status and the first 200 characters of its response,
3308
+ then where the page went next. The trace's action clock and each request's `_monotonicTime` are
3309
+ the same clock, so "caused" is the trace's own fact rather than a guess from recording order.
3310
+ A run failed 13 then 12 tests on one unnamed cause while every row led with
3311
+ `GET /api/tags → 200` — the Home page's own fetch after the redirect — and filled its answered
3312
+ slots with the PWA's `/workbox-*.js` and its `/icons/*.svg`; the register `POST /api/users`
3313
+ (answered 201, the page still rendering signed-out) never appeared. With no action clock, the
3314
+ row falls back to {@link TraceArtifact.lead}: the page's last answered fetch/xhr.
3315
+
3316
+ The action, the URL and the requests are the FAILING ASSERTION'S PAGE's ({@link
3317
+ TraceArtifact.lastAction}), never the archive's last context: a test that creates its data in a
3318
+ second browser context writes that context's click and `/editor` snapshot into the same zip, and
3319
+ reading the concatenation made them the failing page. The other
3320
+ contexts' requests are named separately as set-up work. When the trace holds more than one used
3321
+ context and the assertion's page cannot be identified, the note lists the requests and makes NO
3322
+ causal claim — no "the test's last action", no "the page stayed at …" — instead of merging them.
3323
+
3324
+ A field the test filled and the page submitted EMPTY ({@link formResetOf}) leads the note: the
3325
+ trace holds both facts — the value typed into `textarea[name="bio"]` and the `PUT /api/user`
3326
+ whose body carried `"bio": ""` — so the form's state was reset between the typing and the
3327
+ submit. The note names the effect that re-seeds a form from data whose identity changed and the
3328
+ fix at the source (seed the form once). A deploy-and-walk cycle is lost to this on the
3329
+ deployed URL only, where the background session verification lands later than it does locally.
3330
+
3331
+ A write whose response said a boolean field is true and a LATER GET of the same resource that
3332
+ said it is false leads the note first ({@link readContradictionSentence}): the read route never
3333
+ saw the viewer, so the fix is on that route's middleware, not in the page. Rewriting the
3334
+ profile component over exactly that pair costs ~8 minutes — the write answered
3335
+ `{"following":true}` and the next profile GET answered `false`.
3336
+
3337
+ WHICH rows it spends is evidence, not artifact order: a row
3338
+ needs a recorded response, a real failure or a console line ({@link traceRowEvidence}), rows are
3339
+ deduplicated by the test's location, and they are ordered real failure → repeated from an
3365
3340
 
3366
3341
  _(description truncated — read the full text in `node_modules/@molecule/api-ai-tools/dist/trace-artifacts.d.ts`.)_
3367
3342
 
@@ -3437,8 +3412,22 @@ between passing and timing out. This flag was added for exactly that failure: it
3437
3412
  deployed proof run left only an `error-context.md` because the suite traces
3438
3413
  `on-first-retry` and the run had no retries. That need is met without the flag — the graded
3439
3414
  deployed run keeps the suite's own retries, so a failing test leaves its retry's trace — and
3415
+ the platform's re-run note carries `--trace=on` for a run that did leave none.
3440
3416
 
3441
- _(description truncated — read the full text in `node_modules/@molecule/api-ai-tools/dist/trace-artifacts.d.ts`.)_
3417
+ Which runs are proof-capable is {@link suiteCommandTarget}'s answer: a run against a deployed
3418
+ URL. A LOCAL run is never left to its config, because the launcher gives every local run
3419
+ `--retries=0` (`@molecule/api-ai-tools` `streamingBackgroundCommand`), so its retry trace would
3420
+ never happen. A run that pins `--retries=0` itself is in the same position, whatever its target.
3421
+
3422
+ A proof-capable run is left alone WHATEVER its config traces. `--trace` is a per-run override of
3423
+ the suite's own `use.trace` (Playwright merges the CLI's `use` into every project's), and a test
3424
+ record carries the project settings it ran under: a run with the flag is not the suite's own
3425
+ measurement, so it can never count as deployed proof. Added to a deployed walk, the flag made the
3426
+ walk unprovable, and the platform's own answer — "run the current selection" — was a command this
3427
+ same rewrite then flagged again: X1 P140–P173 had 22 deployed walks the executor started, and
3428
+ not one moved the native proof counts (xr-molecule-flash-l1255 walked 73/73 green twice, at
3429
+ +18.2 and +22.9, and neither counted). A failure in a suite that keeps no trace at all is still
3430
+ readable: the platform's re-run note carries `--trace=on` for a run that left none.
3442
3431
 
3443
3432
  ```typescript
3444
3433
  function diagnosisTraceCommand(args: {
@@ -3684,8 +3673,38 @@ killed (one run lost 20 of its 60 minutes this way):
3684
3673
  machine `json` report stays on the last invocation.
3685
3674
 
3686
3675
  The run ends up with exactly ONE reporter that prints each failure — `list`. A run that names
3687
-
3688
- _(description truncated — read the full text in `node_modules/@molecule/api-ai-tools/dist/utilities.d.ts`.)_
3676
+ any other printing reporter has it REPLACED, never joined: two of them write every test result
3677
+ into the log twice, which made a `--reporter=list,line` run (its
3678
+ `line` added by this function one run earlier) report two distinct failures as "4 of this run's
3679
+ tests have already failed the same way", and the executor stopped a 139-test walk at test 21
3680
+ with a single cause in hand. `line` alone is no use either: it writes `[n/N] <title>` with no
3681
+ ✓/✘ mark and no duration, so an 8.3-minute walk of one suite could never trip
3682
+ the fail-fast note. A reporter set that writes a machine format to a file (`json`, `html`,
3683
+ `junit`) is the
3684
+ executor's own and is left exactly as it is — so is any reporter this build does not know.
3685
+
3686
+ Every background command that is not a no-test invocation is also given
3687
+ {@link PLAYWRIGHT_FAILURES_INLINE_ENV} (inert except for Playwright's `list` reporter), so each
3688
+ failure's own error is in the log as that test fails rather than only at the end: a suite that is
3689
+ still walking is exactly when the executor reads the log, and without it a running log carries
3690
+ `✘` rows and nothing else (~90 s went to greps of one, then to fixing what was
3691
+ guessed; a wrapper-launched run lost 6.5 minutes to the same shape).
3692
+
3693
+ Only the step that runs the suite is touched, and only its reporter, and only when that step
3694
+ runs something: `npx playwright test --list` takes two seconds and writes nothing per test, so
3695
+ neither reporter nor `--retries=0` is added to it ({@link isPlaywrightRunCommand}). A trailing
3696
+ status step (`; echo EXIT $?`, `&& true`) is not the run and is skipped when the run step is
3697
+ found ({@link isStatusOnlyStep}); a run whose output is redirected to a file is still readable
3698
+ through that file, which the launch records as the task's own output.
3699
+
3700
+ A command that starts the suite MORE THAN ONCE is not launched at all: every run it carries is
3701
+ a whole walk of the same suite against the same app, and only the last step is rewritten, so the
3702
+ earlier walks run unmeasured for nothing. Two whole walks of one 138-test suite chained with
3703
+ `;` — 4.5 minutes each — measured nothing the first had not. The platform refuses a second CONCURRENT run against one app and database by the
3704
+ ONE rule ({@link suiteRunInTheWay}) — for every pair, whatever uid a run mints — and this is the
3705
+ same hazard inside one command ({@link suiteRunStatements}). `error` then carries the refusal,
3706
+ naming each suite step and the ONE command to send instead (the last suite step, rewritten as
3707
+ this function rewrites a run), and nothing is launched.
3689
3708
 
3690
3709
  ```typescript
3691
3710
  function streamingBackgroundCommand(
@@ -4167,8 +4186,13 @@ is a directory rather than a directory name.
4167
4186
 
4168
4187
  An npm SCOPE as the first segment, under a `node_modules` root, is the one
4169
4188
  exception that parameter `root` enables: npm installs a scope only directly
4170
-
4171
- _(description truncated — read the full text in `node_modules/@molecule/api-ai-tools/dist/utilities.d.ts`.)_
4189
+ inside a `node_modules` directory, and the walk already prunes every nested
4190
+ `node_modules` (see `findPruneArgs`), so the whole-tree form can only ever
4191
+ match `<root>/@molecule/…` — the scope directory IS the directory the pattern
4192
+ names. Left un-narrowed, a scoped-package pattern walked the sandbox's entire
4193
+ dependency tree and hit the 10 s deadline with no result at all. A bare NAME stays a
4194
+ directory name at any depth:
4195
+ `helpers/*` is unchanged even under a `node_modules` root.
4172
4196
 
4173
4197
  ```typescript
4174
4198
  function literalDirPrefix(pattern: string, root?: string): string | null
@@ -4507,8 +4531,7 @@ each was the test timeout and one missing `navigate('/')` was the cause of all o
4507
4531
  The quorum is of DISTINCT tests — {@link REPEATING_FAILURE_MIN} of them — because a log that
4508
4532
  prints each failure twice (a second reporter, a retry) has told a run that four of its
4509
4533
  tests failed the same way when two had, so the executor stopped a 139-test walk at test 21
4510
-
4511
- _(description truncated — read the full text in `node_modules/@molecule/api-ai-tools/dist/utilities.d.ts`.)_
4534
+ with one cause in hand.
4512
4535
 
4513
4536
  ```typescript
4514
4537
  function repeatingFailure(log: string): RepeatingFailure | null
@@ -4641,7 +4664,11 @@ Both halves are load-bearing, each of them learned from a run that lost minutes
4641
4664
  — read the early return as "stop waiting, edit now", and voided a run that was still walking;
4642
4665
  the second cost a 224 s wait that ended with no result at all.
4643
4666
 
4644
- _(description truncated — read the full text in `node_modules/@molecule/api-ai-tools/dist/utilities.d.ts`.)_
4667
+ Neither half alone is enough, and {@link repeatingFailure} finding a signature is not either:
4668
+ that answers "is a cause repeating among this run's failures", which is worth telling the
4669
+ executor mid-run as a NOTE while the wait goes on. This answers the narrower question the wait
4670
+ needs — is the run over as a measuring instrument — and it is THE one predicate behind both
4671
+ that decision and the note's wording, so the two cannot come to different verdicts.
4645
4672
 
4646
4673
  ```typescript
4647
4674
  function earlyReturnCause(
@@ -4854,9 +4881,12 @@ for — never as a verdict with a stop command in it.
4854
4881
  The run is STILL WALKING while this note is written — both callers produce it mid-run — so a
4855
4882
  re-run of one of its tests is a second run against the same app and database, and the platform
4856
4883
  refuses that ({@link suiteRunInTheWay}, the same rule its overlap hold answers with):
4857
- an executor read *"Start on them now, while the run keeps walking.
4858
-
4859
- _(description truncated — read the full text in `node_modules/@molecule/api-ai-tools/dist/utilities.d.ts`.)_
4884
+ an executor read _"Start on them now, while the run keeps walking.
4885
+ `null-fields.spec.ts:53` alone reproduces the first one."_ and sent exactly that re-run 23 s
4886
+ later, where the hold answered _"A playwright suite is already running against this app and
4887
+ database … Wait for it."_ The note therefore hands over the read-and-fix to do NOW and the
4888
+ re-run for after the run ends — the exact command where the caller knows how the run was
4889
+ started ({@link rerunOfRunningSuite}), the timing alone where it does not.
4860
4890
 
4861
4891
  ```typescript
4862
4892
  function repeatingFailureNote(
@@ -1333,6 +1333,14 @@ export interface FailureCause {
1333
1333
  * before its values had loaded). Attached to the cause so the fix needs no `cat` of the file.
1334
1334
  */
1335
1335
  pageShowed?: string[];
1336
+ /**
1337
+ * An adjacent awaited click in this failure's source frame, before its positive state wait.
1338
+ * This proves the browser action returned, not that the app accepted it or a request settled.
1339
+ */
1340
+ precedingClick?: {
1341
+ call: string;
1342
+ where?: string;
1343
+ };
1336
1344
  }
1337
1345
  /** One failing test's page errors, as read from its `error-context.md`. */
1338
1346
  export interface CausePageErrors {
@@ -1 +1 @@
1
- {"version":3,"file":"utilities.d.ts","sourceRoot":"","sources":["../src/utilities.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAaH,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAG3E,OAAO,EACL,KAAK,mBAAmB,EAIxB,KAAK,aAAa,EAMnB,MAAM,oBAAoB,CAAA;AAE3B;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAS5C;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,GAAI,GAAG,MAAM,KAAG,MAEE,CAAA;AAuGhD;;;;;;;;;;;GAWG;AACH,wBAAg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,SAAS,CAAC,EAAE,cAAc,GAAG,IAAI,CAAA;IACjC,GAAG,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,SAAS,aAAa,EAAE,CAAA;KAAE,CAAA;IACvE,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC7B,GACA,MAAM,CAmIR;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,GAChB,MAAM,GAAG,IAAI,CAsCf;AAED,qEAAqE;AACrE,eAAO,MAAM,eAAe,QAA0C,CAAA;AAWtE;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CA+B7D;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE;IACxC,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;CACjB,GAAG,MAAM,GAAG,IAAI,CAKhB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,SAAS,CACvB,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,GAChB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAgBvC"}
package/dist/utilities.js CHANGED
@@ -2917,6 +2917,61 @@ function failureEvidence(body, message) {
2917
2917
  picked.push(detail);
2918
2918
  return picked.filter((line) => !carried(line)).slice(0, 2);
2919
2919
  }
2920
+ /**
2921
+ * A source frame can show that an awaited click returned before a state wait timed out.
2922
+ * Keep that distinction: a successful browser click does not prove the handler accepted it.
2923
+ * Only adjacent, straight-line statements on the same page qualify. Missing frames, control
2924
+ * flow, multiline calls and negative waits stay unknown. No app vocabulary is inferred.
2925
+ *
2926
+ * @param block - One native Playwright failure block, including its source frame.
2927
+ * @returns The completed click and its source location, or null without that evidence.
2928
+ */
2929
+ function completedClickBeforeWait(block) {
2930
+ const error = failureErrorLine(failureBody(block)) ?? '';
2931
+ if (!/^(?:TimeoutError:|(?:Error: )?Test timeout of |Error: expect\().*(?:exceeded|failed)/.test(error))
2932
+ return null;
2933
+ const frame = block.split('\n').flatMap((line) => {
2934
+ const match = /^\s*(>)?\s*(\d+)\s*\|\s?(.*)$/.exec(line);
2935
+ return match ? [{ failed: !!match[1], line: Number(match[2]), code: match[3].trim() }] : [];
2936
+ });
2937
+ const failed = frame.findIndex((row) => row.failed);
2938
+ if (failed < 1)
2939
+ return null;
2940
+ // Single-line arguments with quoted selectors/options. Parentheses inside strings are data;
2941
+ // nested calls, interpolations and multiple statements are deliberately not decided here.
2942
+ const args = '(?:[^()\'"`;\n]|\'(?:\\\\.|[^\'\\\\])*\'|"(?:\\\\.|[^"\\\\])*"|`[^`$]*`)*';
2943
+ const literal = '(?:\'(?:\\\\.|[^\'\\\\])*\'|"(?:\\\\.|[^"\\\\])*"|`[^`$]*`)';
2944
+ const options = '\\{[^{};]*\\}';
2945
+ const locator = `(?:locator|getByRole|getByText|getByTestId)\\(${args}\\)(?:\\.(?:first|last)\\(\\)|\\.nth\\(\\d+\\))?`;
2946
+ const page = '([$A-Z_a-z][$\\w]*)';
2947
+ const waiting = frame[failed].code;
2948
+ const wait = new RegExp(`^await\\s+${page}\\.(?:waitForSelector\\(\\s*${literal}\\s*(?:,\\s*${options}\\s*)?\\)|${locator}\\.waitFor\\(\\s*(?:${options}\\s*)?\\));?$`).exec(waiting) ??
2949
+ new RegExp(`^await\\s+expect\\(${page}\\.${locator}\\)\\.toBeVisible\\(\\s*(?:${options}\\s*)?\\);?$`).exec(waiting);
2950
+ if (!wait || waiting.includes('...'))
2951
+ return null;
2952
+ for (const state of waiting.matchAll(/(?:\bstate|['"]state['"])\s*:\s*([^,}]+)/g))
2953
+ if (!/^['"](?:visible|attached)['"]$/.test(state[1].trim()))
2954
+ return null;
2955
+ let previous = failed - 1;
2956
+ while (previous >= 0) {
2957
+ if (frame[previous].line !== frame[previous + 1].line - 1)
2958
+ return null;
2959
+ const action = frame[previous].code;
2960
+ if (!action || action.startsWith('//')) {
2961
+ previous -= 1;
2962
+ continue;
2963
+ }
2964
+ const click = new RegExp(`^await\\s+${page}\\.(?:(?:click|dblclick|tap)\\(${args}\\)|${locator}\\.(?:click|dblclick|tap)\\(${args}\\));?$`).exec(action);
2965
+ if (!click || click[1] !== wait[1])
2966
+ return null;
2967
+ const location = /^\s*at\s+(\S+?):(\d+)(?::\d+)?\s*$/m.exec(block);
2968
+ const where = location && Number(location[2]) === frame[failed].line
2969
+ ? `${location[1]}:${frame[previous].line}`
2970
+ : undefined;
2971
+ return { call: action.replace(/;$/, ''), ...(where ? { where } : {}) };
2972
+ }
2973
+ return null;
2974
+ }
2920
2975
  /**
2921
2976
  * A cause signature with the values that differ between two tests of ONE cause replaced by `<n>`:
2922
2977
  * a duration, a generated id or timestamp, a host's port.
@@ -3890,6 +3945,7 @@ function groupFailures(log, excluded, pageErrors = []) {
3890
3945
  evidence: failureEvidence(failureBody(block), message),
3891
3946
  budgetMs: failureBudgetMs(block),
3892
3947
  kind: classifyRunFailure(block)?.kind ?? 'assertion',
3948
+ precedingClick: completedClickBeforeWait(block) ?? undefined,
3893
3949
  });
3894
3950
  }
3895
3951
  const causes = [];
@@ -3918,6 +3974,7 @@ function groupFailures(log, excluded, pageErrors = []) {
3918
3974
  kind: group.kind,
3919
3975
  ...(group.budgetMs === null ? {} : { budgetMs: group.budgetMs }),
3920
3976
  ...(showed === undefined ? {} : { pageShowed: [...showed] }),
3977
+ ...(group.precedingClick ? { precedingClick: group.precedingClick } : {}),
3921
3978
  });
3922
3979
  }
3923
3980
  }
@@ -4438,11 +4495,19 @@ function failureCauseLine(cause, index) {
4438
4495
  ? ' (the action ran before the form’s values had loaded)'
4439
4496
  : '')
4440
4497
  : '';
4498
+ const click = cause.precedingClick;
4499
+ const afterClick = click
4500
+ ? `\n The preceding awaited click returned: \`${click.call.length > FAILURE_EVIDENCE_CHARS ? `${click.call.slice(0, FAILURE_EVIDENCE_CHARS - 1)}…` : click.call}\`${click.where ? ` (${click.where})` : ''}. ` +
4501
+ 'If this is an optimistic toggle, its label/class can change while the first request is still pending. ' +
4502
+ 'Check guards that ignore the next click: disable the control while pending or queue the next intent. ' +
4503
+ 'Re-test both directions with a delayed first response before redeploying.'
4504
+ : '';
4441
4505
  return (` ${index + 1}. ${cause.kind === 'connection' ? 'CONNECTION error, not the app’s — ' : ''}${signature} — ` +
4442
4506
  `${cause.tests.length} test${cause.tests.length === 1 ? '' : 's'} ` +
4443
4507
  `in ${files} file${files === 1 ? '' : 's'}: ${tests.join(', ')}${more}` +
4444
4508
  (shortened.length ? `\n ${shortened.join(' · ')}` : '') +
4445
- showed);
4509
+ showed +
4510
+ afterClick);
4446
4511
  }
4447
4512
  /**
4448
4513
  * The sentence for the causes a recap could not fit: exactly which `file:line` each one was
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@molecule/api-ai-tools",
3
- "version": "1.16.3",
3
+ "version": "1.16.5",
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",
@@ -31,7 +31,7 @@
31
31
  "@molecule/api-ai": "^1.0.1"
32
32
  },
33
33
  "devDependencies": {
34
- "@molecule/api-ai": "1.5.0",
34
+ "@molecule/api-ai": "1.6.0",
35
35
  "@types/node": "26.6.5",
36
36
  "esbuild": "0.28.2",
37
37
  "typescript": "6.0.3",