inspector/scripts
Repository files (latest commit first)
Filename Latest commit message Latest commit date
cliffhall 7c77c2b15f fix(apps): address review of app-rendered elicitations
Eight findings from the Copilot review, all accepted.

Ownership across connections was the substantive one, in three parts. A
mid-session transport close reaches teardown only through
`clearAndAnnouncePendingPeerRequests`, whose emptiness check looked at the
native queues alone — so a lone app elicitation survived a dropped connection
with its modal still open; the check now counts the active set too. The web
bridge factory resolves its client at call time, so an entry queued by a
replaced `InspectorClient` could rebuild against the *next* one and answer
through a different server; the host now drops every entry synchronously on
the swap (`AppElicitationController.failAll`) rather than racing core's
awaited teardown. And the request id was only monotonic within one client, so
each replacement client's first request was `app-elicitation-1` — settling
that id could resolve the wrong server's request. It now carries a
per-instance prefix.

Result validation now parses the whole value with `ElicitResultSchema` before
the requested-schema check, instead of inspecting `action` by hand: a
`{ action: "decline", content: { x: {} } }` used to pass, though the standard
result permits only primitives and string arrays in `content`.

The dialog's accessible name now includes the request id and the prompt — two
concurrent elicitations can be for the same app URI, and the previous name
made those indistinguishable, which is what the comment beside it claimed to
prevent.

`observeAppCapabilities` takes a minimal structural `onmessage` contract
(generic over the message type, since a handler typed for a narrower message
is not assignable to one typed for `unknown`), removing the double cast at the
call site.

`smoke:web:elicit` now fails on an uncaught page error after a successful
drive, and captures the async half of that class off the console channel, as
its two sibling smokes do — it could otherwise print OK over a broken bundle.

Adds the tests each fix needs, including the two the review asked for
directly: that `advertiseElicitation` reaches the `AppBridge` constructor, and
that it is absent by default.

Signed-off-by: cliffhall <cliff@futurescale.com>
2026-08-22 19:43:44 -04:00
..
lib fix(scripts): keep the resolver local, complete the cmd.exe quoting 2026-08-17 00:18:40 -04:00
install-clients.mjs feat: port CLI, TUI, and launcher from v1.5 into v2 (#1452) 2026-06-14 20:27:49 -04:00
pack-and-verify.mjs fix(scripts): keep the resolver local, complete the cmd.exe quoting 2026-08-17 00:18:40 -04:00
smoke-cli.mjs fix: resolve node bins via package.json instead of spawning npx .cmd shims so the verify/smoke scripts run on Windows 2026-08-12 09:04:31 -07:00
smoke-launcher.mjs refactor: self-validating clients, fast validate + separate coverage/smoke (#1504) (#1505) 2026-06-21 11:41:33 -04:00
smoke-tui.mjs fix: resolve node bins via package.json instead of spawning npx .cmd shims so the verify/smoke scripts run on Windows 2026-08-12 09:04:31 -07:00
smoke-web-app.mjs fix: resolve node bins via package.json instead of spawning npx .cmd shims so the verify/smoke scripts run on Windows 2026-08-12 09:04:31 -07:00
smoke-web-browser.mjs fix(smoke): await the server's exit before removing its catalog, and test it 2026-08-11 14:32:20 -04:00
smoke-web-elicitation.mjs fix(apps): address review of app-rendered elicitations 2026-08-22 19:43:44 -04:00
smoke-web.mjs fix(smoke): await the server's exit before removing its catalog, and test it 2026-08-11 14:32:20 -04:00
verify-build-gate.mjs fix: resolve node bins via package.json instead of spawning npx .cmd shims so the verify/smoke scripts run on Windows 2026-08-12 09:04:31 -07:00
verify-dep-lockstep.main.test.mjs Merge origin/v2/main: move the #1939 npx fix into the shared tsc-program lib 2026-08-16 17:07:50 -07:00
verify-dep-lockstep.mjs chore(scripts): compare only the copies a program actually met 2026-08-16 12:35:38 -04:00
verify-dep-lockstep.test.mjs chore(scripts): compare only the copies a program actually met 2026-08-16 12:35:38 -04:00
verify-format-coverage.main.test.mjs test(scripts): cover verify-format-coverage's sibling-guard vouch 2026-08-10 22:16:29 -04:00
verify-format-coverage.mjs chore(deps): scope the allowlist to a major, cover vitest.shared.mts, fix the vouch comment 2026-08-10 21:00:31 -04:00
verify-typecheck-coverage.main.test.mjs Merge origin/v2/main: move the #1939 npx fix into the shared tsc-program lib 2026-08-16 17:07:50 -07:00
verify-typecheck-coverage.mjs Merge origin/v2/main: move the #1939 npx fix into the shared tsc-program lib 2026-08-16 17:07:50 -07:00
verify-typecheck-coverage.test.mjs chore(scripts): derive dep-lockstep candidates from what enters each tsc program 2026-08-16 12:17:15 -04:00