diff --git a/.github/ISSUE_TEMPLATE/experiment.yml b/.github/ISSUE_TEMPLATE/experiment.yml
index ea600bf..47c00ff 100644
--- a/.github/ISSUE_TEMPLATE/experiment.yml
+++ b/.github/ISSUE_TEMPLATE/experiment.yml
@@ -1,5 +1,5 @@
name: Experiment feedback
-description: Share a result or problem from the sign in, invoice or settings experiment.
+description: Share a synthetic example from the actions, form review or team rule.
title: "Experiment: "
body:
- type: dropdown
@@ -12,6 +12,7 @@ body:
- Change a setting
- All three in the terminal
- Saved HTML form
+ - Team rule and CI starter
- Desktop bundle
validations:
required: true
@@ -33,6 +34,11 @@ body:
description: Browser and URL, or operating system, Node version and commit.
validations:
required: true
+ - type: textarea
+ id: first_confusion
+ attributes:
+ label: Where did you first hesitate?
+ description: Mention any help you needed. Leave out pasted content, private links and personal details.
- type: textarea
id: usefulness
attributes:
diff --git a/.github/assets/developer-pilot.mp4 b/.github/assets/developer-pilot.mp4
new file mode 100644
index 0000000..e8a07c1
Binary files /dev/null and b/.github/assets/developer-pilot.mp4 differ
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6a49565..27ce0ea 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,16 @@
## Unreleased
+* Added a separate offline first attempt kit and a keyboard accessible inspector that opens on the MCP tool. Updated the locked development copies of cross-spawn and node-forge.
+
+* Added a browser preview of the CI consent check with both starter files available offline. The opening film now shows one selectable scene at a time on phones.
+
+* Added a copyable application policy test and fixed draft compatibility vectors for implementers. Run `npm run conformance` in the source checkout.
+* Added `npm run build:demo` for the offline pilot ZIP. Integration checks rebuild it in two time zones and run the extracted demo outside the checkout.
+* Added form specific review notes for omitted inputs, unchecked choices and numeric constraints in browser review, CLI output and MCP inference. Draft contracts and scoring are unchanged.
+* Added explicit cancellation to sign in and invoice review. A double click or held Enter on Run action now stops at review.
+* Added local browser review for saved forms, JSON sample checks and copyable draft contracts and MCP descriptions. The Settings demo now leads into form review.
+
* Expanded the synthetic corpus to six cases: blog 100, legacy 60, shop 45, settings 40, sign-in 80 and invoice 40; mean 60.8/100, 2/6 at the 80 threshold. Each fixture records the contract fields inference cannot establish.
* Recorded a maintainer-run Codex CLI 0.145.0 protocol check with synthetic data; an independent outside report remains open.
* Audited the experiment by keyboard, fixed redundant live-region writes while preserving repeated error announcements, and added `npm run test:browser` with a Chrome CI workflow for playground tab order, focus, experiment journeys, film playback, reduced motion and narrow layouts.
@@ -9,7 +19,7 @@
* Added a daily maintainer guide, a scoped work queue and standalone coding assistant instructions.
* Added `npm run dev` and `npm run check:quick`; full package and bundle verification remains required before merging.
* Configured weekly dependency update proposals and made independent first run completion explicit in the feedback form.
-* Preserved the public API, contract formats, visual experience and released 0.9.0 artifacts.
+* Preserved the public API, contract formats and released 0.9.0 artifacts.
## 0.9.0
diff --git a/MAINTAINING.md b/MAINTAINING.md
index 803627b..5da925f 100644
--- a/MAINTAINING.md
+++ b/MAINTAINING.md
@@ -19,7 +19,7 @@ npm run dev
```
Open http://127.0.0.1:8787/playground/experiment.html. Run sign in, the invoice and
-the setting. The local server prints both page URLs. Stop with Ctrl+C and restart
+the setting. Choose **Review a form** and check the two samples. Stop with Ctrl+C and restart
after editing an asset. The server reads its explicit asset list at startup.
Already have a checkout? Inspect `git status` first. With a clean tree, switch
@@ -52,7 +52,8 @@ that order.
| Types and approval declarations | `src/panel-schema.mjs`, `test/panel.test.mjs` | `node --test test/panel.test.mjs test/foundation.test.mjs` |
| Corpus evidence | `examples/corpus/`, `src/score.mjs` | `node --test test/corpus.test.mjs test/score.test.mjs` |
| Sign in, invoice, settings | `playground/comparison.mjs`, `playground/experiment-model.mjs` | `npm run experiment` and `node --test test/comparison.test.mjs test/experiment.test.mjs` |
-| Visual experience | `playground/art.mjs`, `app.mjs`, `experiment.mjs`, CSS | `npm run dev`, then the checks in [CONTRIBUTING.md](CONTRIBUTING.md); `npm run test:browser` locks the experiment and film primitives in headless Chrome |
+| Offline demo | `scripts/build-demo.mjs` and `examples/demo/assets.mjs` | `npm run build:demo` then `node --test test/integration/offline-demo.test.mjs` |
+| Visual experience | `playground/art.mjs`, `app.mjs`, `experiment.mjs`, CSS | `npm run dev`, then the checks in [CONTRIBUTING.md](CONTRIBUTING.md); `npm run test:browser` locks the form review, experiment and film primitives in headless Chrome |
| MCP tools | `src/toolkit.mjs`, `src/mcp-server.mjs` | `npm run test:mcp` |
| Distribution | `scripts/check-package.mjs`, `scripts/build-bundle.mjs`, workflows | `npm run check` |
@@ -70,7 +71,7 @@ Node 22 and 24, Windows with Node 24, and the headless Chrome playground check.
Do not merge a failing job by reclassifying it as a local environment problem.
After merging, GitHub Pages builds and deploys from main. Check the `playground`
-workflow and both public routes. A source merge updates the site; it does not
+workflow and all three public routes. A source merge updates the site; it does not
replace an existing downloadable package. Roll back a source or site change with
a reviewed revert, keeping published packages immutable.
diff --git a/README.md b/README.md
index 4ae8a27..74c57cd 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,8 @@ The goal is simple: applications should tell agents what they can do, what each
action changes and which approval it needs. Hardwire provides the format and
checks. Your application supplies the authorized handler.
-[Try the three actions](https://automatron-workflows.github.io/hardwire/experiment.html)
+[Review a form](#try-a-form-in-your-browser)
+· [Try the three actions](https://automatron-workflows.github.io/hardwire/experiment.html)
· [Watch the demo](https://automatron-workflows.github.io/hardwire/)
· [Download](https://github.com/Automatron-workflows/hardwire/releases/tag/v0.9.0)
· [MCP Registry](https://registry.modelcontextprotocol.io/v0.1/servers?search=io.github.Automatron-workflows/hardwire)
@@ -20,6 +21,22 @@ checks. Your application supplies the authorized handler.
[](https://automatron-workflows.github.io/hardwire/)
+In the review build, choose **Check inputs** on the sample form and try the
+team rule. Remove confirmation to see a valid contract fail the team's
+consent check. Restore it to get the [two file CI starter](examples/ci/README.md).
+
+[Watch the captioned walkthrough](.github/assets/developer-pilot.mp4) · [Presenter script](docs/DEMO.md#presenter-script) · [Build the offline demo](docs/DEMO.md#take-the-demo-offline)
+
+## Try a form in your browser
+
+For an independent trial, use the [pilot kit](docs/DEMO.md#independent-pilot)
+before watching the walkthrough. For a guided review of this branch, run
+`npm ci --ignore-scripts` and `npm run dev` with Node 22 or newer.
+[Open the local sample](http://127.0.0.1:8787/playground/form.html)
+and choose **Check inputs**. See why a checkbox accepts `false` and rejects `"false"`.
+Open **Contract and MCP tool** to inspect the draft, or replace the sample with
+sanitized HTML. Your browser processes the text locally. Nothing is submitted.
+
## One form. One command.
With Node 22 or newer, run the bundled email preference from the demo:
@@ -82,6 +99,14 @@ npm install --ignore-scripts github:Automatron-workflows/hardwire#v0.9.0
[Use the library on one known action](docs/ADOPT.md), or use the guide’s MCP
configuration to connect without cloning the repository.
+### Catch a policy change in CI
+
+[Try the two file starter](examples/ci/README.md). Remove confirmation from a
+reversible email change. The panel stays valid, but the application test
+rejects the change because this team requires consent.
+
+[Framework launch plan](docs/LAUNCH.md) · [Draft compatibility vectors](examples/conformance/README.md)
+
## Where it fits
| You already have | Hardwire adds |
diff --git a/docs/ADOPT.md b/docs/ADOPT.md
index c385d3b..0ada9f0 100644
--- a/docs/ADOPT.md
+++ b/docs/ADOPT.md
@@ -114,6 +114,13 @@ The server exposes exactly five fixed inspection tools. It has no browse, file,
shell, login or mutation tool. [The MCP guide](MCP.md) has the checkout
alternative, a first task and troubleshooting.
+## Add a pull request check
+
+Copy the [application starter](../examples/ci/README.md) into your project
+and run `node --test contracts/action.test.mjs`. The example pairs a reviewed
+action with an independent application expectation. Try the documented policy
+change and make sure CI catches it before adapting the example.
+
## First integration checklist
1. Pick one action with a clear input and a known effect.
diff --git a/docs/API.md b/docs/API.md
index 981aa36..f7a2186 100644
--- a/docs/API.md
+++ b/docs/API.md
@@ -77,7 +77,7 @@ Lower-level exports: `traceDigest(document)` hashes everything except its own
| Export | Inputs → result |
| --- | --- |
-| `inferFromHtml(html, { origin })` | Static HTML → candidate report with evidence and limitations. No network. |
+| `inferFromHtml(html, { origin })` | Static HTML → candidate report with evidence and limitations. Optional `candidate.reviewNotes` lists detected control limitations as plain strings. No network. |
| `inferFromUrl(origin, options)` **async** | Fetch origin root once → inference report. |
| `toPanelDraft(inference)` | Candidate report → normalized draft panel; rejects empty or invalid drafts. |
| `comparePanels(expected, actual)` | Two panels → structural score, missing/invented ports and unsafe differences. |
diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md
index e8dbe03..cf1bcd6 100644
--- a/docs/ARCHITECTURE.md
+++ b/docs/ARCHITECTURE.md
@@ -25,7 +25,9 @@ flowchart TD
| `panel.mjs`, `trace.mjs` | Preserve the synchronous Node API and build or check trace digests | Node cryptography |
| `probe.mjs`, `infer.mjs`, `corpus.mjs` | Explicit network and filesystem operations | Bounded reads through documented adapters |
| `toolkit.mjs`, `mcp-server.mjs` | Expose five fixed inspection tools through the official MCP SDK | Stdio transport; no supplied action execution |
-| `playground/model.mjs`, `worker.mjs` | Keep the bounded inspection helpers available for experiments | Worker messaging only |
+| `playground/model.mjs`, `worker.mjs` | Inspect bounded input and check arguments using the portable core | Worker messaging only |
+| `playground/form.mjs` | Review HTML as text, compare JSON samples and inspect one selected output at a time | Browser memory, DOM and explicit clipboard writes |
+| `playground/policy.mjs` | Normalize a copy of the CI example and preview the team consent rule | Reads one bundled JSON asset from the same origin. No form content or execution |
| `playground/comparison.mjs` | Validate and dispatch fixed session, invoice and preference handlers; bind approval to exact requests | Local fixtures and call records |
| `playground/experiment-model.mjs`, `experiment.mjs` | Review requests, collect explicit local approval and show fixture results | Browser memory and DOM |
| `examples/experiment.mjs` | Exercise all three handlers and assert rejection, result and duplicate behavior | Local fixtures and stdout |
@@ -64,7 +66,9 @@ three fixed ports: `start-session`, `pay-invoice` and `set-preferences`. It uses
portable core to pin the contract digest, validate exact arguments and dispatch
only known local fixture handlers. It is not loaded by the public film. The separate `experiment.html` page imports
it through `experiment-model.mjs`, which snapshots reviewed arguments and cancels
-pending approval when an input changes. The UI only dispatches after a user
+pending approval when an input changes or the user cancels. The browser
+ignores repeated key presses and extra clicks in a single click sequence on
+the primary control. The UI only dispatches after a user
action, exposes actual state and records, and resets into a new fixture. Each
scenario is isolated; the sign in fixture does not authorize the payment fixture.
Visual phases follow model state. Review stops at a lock, errors stop the route,
@@ -79,6 +83,13 @@ Their levels are local assertions, not remote authentication. Concurrent duplica
calls, changed contracts and aborted requests cannot dispatch. Tests retain
coverage for these boundaries and input isolation.
+The form review runs inference in a module worker. Editing the source or origin
+terminates pending work and clears the draft. Changing the selected action
+clears prior input results. The page checks both samples with the portable
+validator. It inserts submitted and generated text through text properties,
+never renders the submitted form and has no fixture handler imports.
+The selected tool describes one action. The draft contract includes all actions.
+
The separate calendar example keeps conflict planning, atomic changes and undo.
No example connects to a real account or payment provider. The inspection worker
is also separate from the film. Page delivery uses the hosting provider.
@@ -88,10 +99,17 @@ is also separate from the film. Page delivery uses the hosting provider.
`npm run demo` serves the playground at `/playground/` and keeps the original
fixture origin at `/` for probe and inference experiments. The server serves an
explicit asset allowlist. It does not expose repository files through arbitrary
-paths. The package includes both the film and experiment. The
+paths. The package includes the film, experiment and form review. The
`hardwire-experiment` binary runs the three fixtures from an installed package.
-`npm run build:playground` copies only portable source modules, static assets and
+The dev server, static build and offline ZIP share the explicit portable asset
+list in `examples/demo/assets.mjs`. The ZIP builder reads tracked sources and
+the captioned MP4 directly. It uses the development dependency `fflate` and
+a fixed archive timestamp. The extracted launcher uses Node builtins and the
+same local server on a free loopback port. The video, invoice text and guide
+stay outside the server's asset list.
+
+`npm run build:playground` copies portable source modules, static assets, two downloadable starter files and
the license into `output/playground`. There is no bundler or third party script.
The public GitHub Pages workflow runs the full checks before deploying this
artifact from main. GitHub Pages must use GitHub Actions as its publishing source.
diff --git a/docs/DEMO.md b/docs/DEMO.md
new file mode 100644
index 0000000..9b45045
--- /dev/null
+++ b/docs/DEMO.md
@@ -0,0 +1,106 @@
+# Hardwire demo
+
+[Watch the captioned walkthrough](../.github/assets/developer-pilot.mp4).
+The recording shows the local examples, form review and team rule in Chrome. The opening
+animation illustrates the concept. Its timing does not measure performance.
+
+Run `npm run dev` and open [the film](http://127.0.0.1:8787/playground/).
+Allow about two minutes. Use only the supplied synthetic examples.
+
+## Take the demo offline
+
+From a source checkout with Node 22 or newer, run these commands.
+
+```sh
+npm ci --ignore-scripts
+npm run build:demo
+```
+
+The preview is saved as `output/Hardwire-offline-demo.zip`. Extract the whole
+archive, open a terminal in the extracted `Hardwire` folder and run
+`node start.mjs`. Use the first printed address. The server picks a free port
+on this computer. Press Ctrl+C to stop it. The extracted demo needs no npm
+installation or internet connection. Documentation links open external sites.
+
+Open `Watch.mp4` to watch without Node. Use `Invoice-example.txt` for the
+optional comparison below. The ZIP is a review preview, separate from the
+GitHub package release and desktop bundle.
+
+## Presenter script
+
+1. **Watch.** “An app can describe what an agent may request, which inputs
+ it accepts and whose approval it needs.” Pause the film. “The timing is
+ illustrative. Let’s check what actually happens.”
+2. **Try it.** Run sign in and give local consent. Advance to the invoice.
+ Choose **Try invalid input** to show the altered amount being rejected.
+ Run the original €24 request, choose **Cancel** and show that it stays
+ unpaid. Run it again and approve it locally. “These are fixed
+ examples. No account is connected and no money moves.”
+3. **Settings.** Run the preference change. “This reviewed example knows
+ how to undo the change. What could we learn from its HTML alone?”
+4. **Review a form.** Point out the write and user confirmation. “The
+ checkbox tells us the input type. A reviewer still has to establish
+ whether a change can be undone.” Choose **Check inputs**. Compare
+ `false` with `"false"`.
+5. **Contract and MCP tool.** Open the inspector. Switch between **MCP tool** and **Draft contract**. “A developer can copy this
+ description, review the proposed behavior and connect their own authorized
+ handler.” Press Escape to return to the form.
+6. **Try a team rule.** Open the sample contract link. This is a separate
+ reviewed fixture. No form content carries over. Remove confirmation.
+ “The contract still validates because the change is reversible. This team
+ requires consent anyway.” Restore confirmation and download both files.
+ Run the [Node test](../examples/ci/README.md) to reproduce the failure
+ in a project. The browser previews the consent check only.
+
+On phones, the film cycles through one scene at a time. Choose a scene to
+stay on it. With reduced motion, use the scene buttons to compare results.
+
+## Optional invoice comparison
+
+Copy the [synthetic invoice markup](../examples/corpus/invoice/page.html)
+into the form review and use `https://invoice.example.com` as the origin.
+Choose **Review form**, then **Check inputs**. The draft accepts a number and
+a text value. Compare that result with the reviewed invoice in the experiment.
+It requires a fixed ID, 2400 cents, EUR and owner approval. The differences
+explain why an inferred tool description needs review before integration.
+
+## Independent pilot
+
+Run the [offline build](#take-the-demo-offline) and give each participant
+only `output/Hardwire-developer-pilot.zip` once outreach is approved.
+The guided archive contains the answers. The pilot archive starts at the
+sample form and contains no walkthrough or video. It requires Node 22 or
+newer. Participants extract the folder, run `node start.mjs` and open the
+printed address. No package installation or account is needed.
+
+Use the [same prompt](../scripts/offline-demo/PILOT.txt) for five independent
+developers. Leave them time to try it before offering help. Record setup
+failures separately. A completed task means showing an accepted input, a
+rejected input and the matching MCP description. Record any assistance.
+A blocked attempt counts toward attempts only. Record the first confusion
+verbatim with permission. The optional [notes](../scripts/offline-demo/NOTES.txt)
+stay on the participant's computer unless they share them.
+
+Keep a copy of this table outside the repository. Use anonymous identifiers.
+Leave unknowns blank. Separate sample results from later custom form trials.
+
+| Attempt | Setup | Outcome and help | First confusion | Useful output | Next step |
+| --- | --- | --- | --- | --- | --- |
+| 01 | | | | | |
+| 02 | | | | | |
+| 03 | | | | | |
+| 04 | | | | | |
+| 05 | | | | | |
+
+After the attempt, offer the team rule and the [CI starter](../examples/ci/README.md).
+Count a repository only with evidence of integration. Use the
+[repeat use definition](LAUNCH.md#distribution-and-measurement) for follow up.
+Fix the first repeated blocker before expanding. Report totals for independent
+attempts, unassisted completions, assisted completions and blocked attempts.
+Exclude internal runs, downloads and automated checks.
+
+## Browser reference
+
+[Desktop](assets/form-1280.png) · [Mobile](assets/form-390.png)
+
+[Desktop inspector](assets/inspector-1280.png) · [Mobile inspector](assets/inspector-390.png)
diff --git a/docs/EXPERIMENT.md b/docs/EXPERIMENT.md
index 8564d45..e8250e8 100644
--- a/docs/EXPERIMENT.md
+++ b/docs/EXPERIMENT.md
@@ -4,6 +4,8 @@
invalid request before local state changes.**
[Open the experiment](https://automatron-workflows.github.io/hardwire/experiment.html).
+After Settings, choose **Review a form** to inspect the inferred version of the
+same preference, or **Replay** to return to sign in. [Demo script](DEMO.md).
Choose sign in, invoice payment or settings. Run the action, review any requested
approval, then inspect its result. Reset and try an invalid input.
@@ -65,7 +67,10 @@ Open `http://127.0.0.1:8787/playground/experiment.html`.
Open **Inputs & code** to edit the request, then choose **Use these inputs**.
The same inspector contains the actual result, call record, compiled tool and
contract. Escape closes it and returns focus to the control that opened it.
-Editing a request cancels pending approval. Reset starts a new isolated fixture.
+While reviewing sign in or an invoice, choose **Cancel** or press Escape
+outside the inspector to discard the request. The account stays signed out
+or the invoice stays unpaid. Run the action again to start a fresh review.
+Editing a request also cancels pending approval. Reset starts a new isolated fixture.
After success, **Next example** advances the journey. **Replay** starts again.
Completed actions cannot run a second time in the same fixture.
diff --git a/docs/FORM-EXPERIMENT.md b/docs/FORM-EXPERIMENT.md
index f3dbd5e..9f74532 100644
--- a/docs/FORM-EXPERIMENT.md
+++ b/docs/FORM-EXPERIMENT.md
@@ -4,6 +4,40 @@ Start with the email preference from the third demo scene. Generate a candidate
action contract, accept a boolean, reject a string and produce an MCP tool
description. Nothing is executed and no account is required.
+## In your browser
+
+Use the [offline pilot](DEMO.md#independent-pilot) or run `npm run dev`
+in this branch and open [the local form](http://127.0.0.1:8787/playground/form.html).
+
+1. Choose **Check inputs**. Compare the boolean with the quoted string.
+2. Open **Contract and MCP tool** to inspect the draft and copy the description.
+3. Replace the HTML with a permitted, sanitized form and enter its site origin.
+ Choose **Review form** and select an action if several are found.
+4. Edit the suggested JSON samples and check them again. A malformed JSON
+ sample needs correction before it can demonstrate a schema rejection.
+
+If a field name such as `order-id` cannot be represented, the page flags it
+for the selected action. A missing destination also prompts you to check the
+origin and form action. Passing samples cover only the fields in the draft.
+The browser and source CLI also flag named hidden and file inputs, radio
+buttons, select choices and explicit numeric limits when detected. These notes
+describe what the draft misses. They add no parameters or permissions.
+
+For example, the invoice fixture includes a hidden invoice ID, a fixed amount
+and a currency selector. A number and a string can satisfy the draft while
+violating all three requirements of the reviewed action. Check the actual
+units, allowed currency, effect and owner approval before using any draft.
+The source command includes `reviewNotes` in JSON when it detects limitations.
+The published 0.9.0 command predates these notes.
+
+Use only synthetic values. Remove sensitive information from markup, labels,
+URLs and inputs before pasting. The page keeps the review in memory. Copying
+a draft places it on your system clipboard. **Reset sample** clears the review
+and restores the email setting. Allow up to 512 KiB of HTML and 256 KiB per
+JSON sample.
+
+## In your terminal
+
With Node 22 or newer:
```sh
diff --git a/docs/LAUNCH-KIT.md b/docs/LAUNCH-KIT.md
index 299a28f..cebf505 100644
--- a/docs/LAUNCH-KIT.md
+++ b/docs/LAUNCH-KIT.md
@@ -74,15 +74,14 @@ Check the current submission rules before posting. Do not ask for votes.
## Personal invitation draft
-I am looking for a few developers building agent integrations to try Hardwire.
-The experiment is small: bring a saved form, check two inputs and inspect its
-MCP tool description. No API key is needed.
-
-Would you try it and tell me the first step that is confusing or unhelpful?
-https://github.com/Automatron-workflows/hardwire/blob/main/docs/FORM-EXPERIMENT.md
-
-Use only after selecting a relevant recipient. Personalize the introduction to
-work they have actually shared. One useful response matters more than a star.
+Would you try a small offline developer exercise and tell me where you
+hesitate? It uses a sample email preference form, runs locally with Node 22
+or newer and needs no account. Getting stuck is useful feedback too.
+Please try it on your own before watching the demo. You decide what notes
+to share. Please leave out private data.
+
+After outreach approval, send only the [independent pilot kit](DEMO.md#independent-pilot).
+Save the walkthrough and sample solution for the follow up.
## Distribution sequence
diff --git a/docs/LAUNCH-STATUS.md b/docs/LAUNCH-STATUS.md
index e2417f1..819bbb5 100644
--- a/docs/LAUNCH-STATUS.md
+++ b/docs/LAUNCH-STATUS.md
@@ -1,5 +1,57 @@
# Launch status
+## Release audit, 5 December 2026
+
+The review branch is ready for a [private first attempt](DEMO.md#independent-pilot).
+No independent results have been recorded here. The public film and experiment
+returned HTTP 200. The form and policy routes returned 404. Use the pilot ZIP
+until deployment, then verify both public routes and the two starter downloads.
+The published v0.9.0 package, bundle and server metadata passed all three
+release checksum checks. Separately, the MCP Registry returned version 0.9.0
+with the same bundle URL, SHA256 and stdio transport as the release metadata.
+This branch changes no published asset.
+
+A clean install with Node 24.16.0 reported eight affected packages. Updating
+the locked development copies of cross-spawn to 7.1.2 and node-forge to 1.4.4
+cleared the critical finding and one low finding. The production audit
+(`npm audit --omit=dev`) found zero. The full audit still reports three high
+and three low findings under the MCPB 2.1.2 development CLI, including its
+nested Zod 3 and the editor chain through tmp. These counts include dependent
+packages. The desktop build stages production dependencies separately.
+
+Before a public release, recheck the MCPB dependency tree and resolve or
+explicitly review the remaining risks. The compatible lockfile update left
+them in place. Do not force a different major version of the packager's
+validator without validating its manifest handling. Keep independent Windows,
+screen reader and native host checks open. CI cannot substitute for those trials.
+
+## Developer pilot review, 4 December 2026
+
+The [pilot branch](https://github.com/Automatron-workflows/hardwire/pull/47)
+connects the three local actions to browser form review. The sample matches
+the CLI draft and MCP description. Input checks apply only to the inferred
+schema. Review any skipped names or missing destination before using a draft.
+
+The review build also connects a successful form check to a separate
+email preference contract. The browser previews the consent rule and offers
+the original [starter files](../examples/ci/README.md). Chrome verified the
+failure, recovery and both downloads against repository bytes. The browser
+does not run Node tests. A download alone gives no evidence of adoption.
+
+A maintainer reproduced a double click and held Enter advancing from review
+to local approval in one gesture. With the fix, Chrome stayed at review for
+both sign in and the invoice. Cancel left the initial state and empty call
+record intact. A fresh review still allowed one deliberate approval.
+Chrome touch emulation also stopped at review on a double tap at 390 pixels.
+This is local fixture evidence. It does not verify a real account or payment.
+
+The next decision depends on five independent attempts. Use the
+[pilot instructions](DEMO.md#independent-pilot) and record the first point
+of confusion. Screen reader verification, an independent Windows first run
+and independent native client reports remain open.
+
+## Earlier launch evidence
+
Evidence updated 17 November 2026. Dated measurements below retain their original
observation date. Public availability is not evidence of outside
adoption. The first invitation remains: run one action, change one input and share
diff --git a/docs/LAUNCH.md b/docs/LAUNCH.md
index 76dc61d..fc2b874 100644
--- a/docs/LAUNCH.md
+++ b/docs/LAUNCH.md
@@ -1,77 +1,103 @@
-# Hardwire launch
+# Launch Hardwire as an action contract framework
-## The invitation
+**The first audience is a team maintaining an MCP server in a Node project.**
+Give that team a useful check on its next pull request. Start with one action
+where an approval change would matter. Keep application policy in a test and
+run it whenever the action description changes.
-Run the three actions from the demo. Change an input. Watch validation reject it
-before local state changes. Share the result and the first thing that confused you.
+## The launch demonstration
-The optional next step is [bring one saved form](FORM-EXPERIMENT.md), using the
-email preference from the third scene. It produces a candidate contract and
-checks both accepted and rejected arguments without executing an endpoint.
+Open the [captioned walkthrough](../.github/assets/developer-pilot.mp4).
+Use the [interactive demo](DEMO.md) to explain the invoice and the limits of
+inference. Choose **Try a team rule** after checking the sample inputs.
+Preview the consent change, restore it and download both files. Then show
+a real test failure with the [two file starter](../examples/ci/README.md).
-The audience is developers building agents, MCP integrations and application
-tooling. The film shows the idea; the experiment demonstrates checked local
-handlers. Keep both links together and describe the experimental boundaries.
+Change a reversible preference from user confirmation to none. The format
+still permits it. The application test fails because the team chose a stricter
+rule. Restore the rule and show the passing test. Ask the developer which
+action they would check in their own repository. This last step is the
+conversion to measure.
-## Fourteen day sequence
+## Where it fits
-| Days | Work | Evidence |
-| --- | --- | --- |
-| 1 to 3 | Cinematic experiment, versioned GitHub package, community and setup guides | Fresh installation and one complete local run |
-| 4 to 6 | Invite 20 relevant builders personally and help unblock their first attempt | Five independently completed experiments |
-| 7 to 10 | Publish a short demonstration and reproducible technical walkthrough | Useful reports, questions and outside examples |
-| 11 to 14 | Fix reported friction and ship a follow up based on evidence | Returning users and reviewed contributions |
-
-The MCP Registry path now uses a GitHub desktop bundle and repository OIDC
-identity. npm remains a separate route requiring a verified publisher and scope. A package downloaded from the GitHub release already provides
-a usable distribution route. Two independent desktop client evaluations remain
-a separate evidence goal; protocol tests alone do not satisfy it.
-
-Use [the release checklist](LAUNCH-STATUS.md) to distinguish shipped work from
-remaining publication and client checks.
-
-Track voluntary reports in GitHub. Record first run completion, return use,
-contributions and repository traffic separately. No tracking is added to the
-demo. Ten independent users, three returning users and three outside
-contributions are working goals. One thousand stars is a stretch target, not a
-forecast or a claim of adoption.
-
-## Shareable assets
-
-The README uses a [GIF capture](assets/demo.gif) of the live film. Use the
-[MP4 clip](assets/demo.mp4) for posts and link to the working experiment beside it.
-The capture shows an authored illustration, not measured browser automation or
-payment performance. It was recorded at the browser capture cadence, preserving
-elapsed timing; the interactive film is the full motion reference.
-
-[Ready to adapt: launch posts, personal invitation and first cohort checklist](LAUNCH-KIT.md).
+[OpenAPI](https://spec.openapis.org/oas/latest.html) describes API operations.
+[MCP](https://modelcontextprotocol.io/specification/2026-07-28/server/tools)
+exposes tools to clients. Hardwire can sit in the review process for both.
+It checks a declared effect, minimum confirmation and input schema, and can
+produce MCP descriptions. The application must enforce real approvals.
+[MCP's annotation guidance](https://blog.modelcontextprotocol.io/posts/2026-03-16-tool-annotations/)
+explains why a tool hint alone cannot establish behavior.
-## Draft public post
+Use reviewed contracts for integration. Treat HTML as an optional way to
+start a draft. There is no OpenAPI importer or WebMCP adapter in this pilot.
+Prioritize an adapter only after two independent teams need the same mapping.
+Require human review of effects, permissions and unsupported constraints.
-I built Hardwire to make application actions explicit before an agent uses them.
+## Proposed first 90 days
-The demo shows three familiar tasks: sign in, pay an invoice and change a setting.
-You can now run all three locally, change the inputs and see what gets blocked.
+Start the clock when the owner approves the pilot. The targets are proposed
+decisions for the team. No adoption numbers are implied.
-No app or API key needed. The examples use local fixtures, so no accounts connect
-and no money moves. The toolkit validates the contract; your app still owns its
-authentication, approvals and handlers.
-
-Try it: https://automatron-workflows.github.io/hardwire/experiment.html
-Code: https://github.com/Automatron-workflows/hardwire
-
-If you are building agents, I would like to hear where the first experiment
-breaks or becomes confusing. There are scoped contribution tasks on GitHub too.
-
-## Draft personal invitation
-
-I am testing Hardwire with developers building agent integrations. There is one
-short experiment around sign in, invoice payment and settings. It runs on local
-fixtures and needs no API key.
-
-Would you try one action, change an input and tell me the first thing that was
-unclear? Here is the experiment:
-https://automatron-workflows.github.io/hardwire/experiment.html
-
-These are drafts, not messages sent. Adapt them to a specific recipient and follow
-each community's posting rules. Do not coordinate votes or buy engagement.
+| Window | Owner and work | Evidence needed to expand |
+| --- | --- | --- |
+| Days 1 to 14 | Maintainer observes independent developers trying the saved form. Then offer the CI starter. Collect the first confusing step before providing help. | Five independent completions. Report attempts, assisted completions, failures and unassisted completions separately. Fix the first repeated blocker. |
+| Days 15 to 45 | Application partner and maintainer review one known action per team. Add the test to each team's existing CI. Check in again after a different change. | Proposed target of three outside repositories with a merged check. At least two run it again on a later change. If they stop after the demo, interview them before adding adapters. |
+| Days 46 to 90 | Maintainer publishes a technical walkthrough after approval. Invite an independent implementer to run the [fixed vectors](../examples/conformance/README.md) in another language. Review mismatches in public using synthetic inputs. | A repeatable partner case study with permission, a report from another implementation and a documented compatibility decision. Delay a stable format if results disagree. |
+
+## Distribution and measurement
+
+Use one call to action per audience. Show the film and saved form to a first
+time visitor. Give an MCP maintainer the starter and failing change. Give a
+language implementer the specification and vectors. Start with GitHub
+Discussions and one relevant developer community after outreach approval.
+Expand only once a team can describe what the check caught or saved.
+
+The primary measure is **outside repositories running a Hardwire check on
+two distinct changes within 30 days**. Count one repository once per window.
+Exclude Hardwire itself, sample forks without an integration, automated
+reruns and maintainer trials. Record voluntary reports or public links with
+consent. Use private notes for confidential teams. Unknown results remain
+unknown. Track time to first passing check, false alarms and abandoned
+integrations alongside repeat use. The demo collects no telemetry.
+
+## Release decisions
+
+1. Before promoting the pilot, review outstanding dependency advisories,
+ verify the intended package, bundle and Pages routes, and disclose open
+ accessibility and host checks. Keep the existing tagged distribution until
+ the owner verifies a scoped npm identity. Never replace an existing asset.
+2. Before calling the format stable, publish the compatibility policy,
+ migration examples and mismatch reports. Require a public proposal, tests,
+ maintainer review and input from an external implementer for changes to
+ normalization, digests or confirmation semantics. Preserve previous vectors.
+3. Keep inference claims and execution decisions separate. Follow the
+ [roadmap](ROADMAP.md) for 30 to 50 permitted real pages, reviewed outcomes,
+ failure reporting and a consenting application partner. No calendar date
+ or popularity target authorizes a general executor.
+
+## Draft public post for after the merge
+
+**Hardwire catches changes to agent action contracts in pull requests.**
+
+A developer removes user confirmation from an email preference. The action is
+reversible and its inputs still validate. Should the change ship?
+
+Our example team requires consent. Its test fails on that exact change. You
+can reproduce it with one small JSON file and one Node test. No account,
+model or connected application is required. Your app still owns identity,
+authorization and execution.
+
+[Try the example](https://github.com/Automatron-workflows/hardwire/tree/main/examples/ci).
+Which action in your project would you check first?
+
+## Draft invitation to a maintainer
+
+I'm testing a way to review changes to agent actions in CI. Would you try
+one [example](https://github.com/Automatron-workflows/hardwire/tree/main/examples/ci)
+and tell me where the test would fit in your project? A reason you would skip
+it is useful too. Please use only synthetic data.
+
+The [launch kit](LAUNCH-KIT.md) contains the separate saved form invitation
+and pilot checklist. These drafts have not been sent. Verify links after
+merge and get explicit outreach approval before posting or contacting anyone.
diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md
index 05771a9..9041ba5 100644
--- a/docs/ROADMAP.md
+++ b/docs/ROADMAP.md
@@ -139,6 +139,9 @@ normalized bytes and panel digests therefore change from 0.3.0. Regenerate
experimental fixtures, retain old panels with old traces, and never silently
reinterpret old records.
-Before external adoption, freeze the format and canonicalization, publish fixed
-test vectors, and use a new format identifier for later semantic changes. The
-current `hardwire.panel/1` is still a draft, not a stable interoperability claim.
+[Fixed draft vectors](../examples/conformance/README.md) now cover selected
+normalization, canonicalization, digest, tool naming and rejection cases.
+Both JavaScript entry points share a core. The next milestone is a report
+from an independent implementation. Before stable adoption, freeze the
+format and canonicalization and use a new format identifier for later
+semantic changes. The current `hardwire.panel/1` remains a draft.
diff --git a/docs/SPEC.md b/docs/SPEC.md
index a0088e4..45afc5c 100644
--- a/docs/SPEC.md
+++ b/docs/SPEC.md
@@ -170,6 +170,10 @@ Digests require byte-identical serialisation:
- limits: depth 32, 10,000 nodes, 262,144 characters per string, 65,536 bytes of
output.
+Compare implementations with the [fixed draft vectors](../examples/conformance/README.md).
+Run `npm run conformance` from the checkout. These examples cover selected
+normalization, digest, tool naming, approval and argument rules.
+
## 8. Error codes
| Code | Meaning |
diff --git a/docs/assets/demo.gif b/docs/assets/demo.gif
index 138778a..1112702 100644
Binary files a/docs/assets/demo.gif and b/docs/assets/demo.gif differ
diff --git a/docs/assets/demo.mp4 b/docs/assets/demo.mp4
index b2900c0..66baa0d 100644
Binary files a/docs/assets/demo.mp4 and b/docs/assets/demo.mp4 differ
diff --git a/docs/assets/demo.png b/docs/assets/demo.png
index bf6c6c5..318a350 100644
Binary files a/docs/assets/demo.png and b/docs/assets/demo.png differ
diff --git a/docs/assets/form-1280.png b/docs/assets/form-1280.png
new file mode 100644
index 0000000..5ab9235
Binary files /dev/null and b/docs/assets/form-1280.png differ
diff --git a/docs/assets/form-390.png b/docs/assets/form-390.png
new file mode 100644
index 0000000..67d3ed9
Binary files /dev/null and b/docs/assets/form-390.png differ
diff --git a/docs/assets/inspector-1280.png b/docs/assets/inspector-1280.png
new file mode 100644
index 0000000..d3cd9b5
Binary files /dev/null and b/docs/assets/inspector-1280.png differ
diff --git a/docs/assets/inspector-390.png b/docs/assets/inspector-390.png
new file mode 100644
index 0000000..d27e30e
Binary files /dev/null and b/docs/assets/inspector-390.png differ
diff --git a/examples/ci/README.md b/examples/ci/README.md
new file mode 100644
index 0000000..f47da58
--- /dev/null
+++ b/examples/ci/README.md
@@ -0,0 +1,46 @@
+# Catch an approval change in a pull request
+
+This example uses an email preference. The team wants the user to confirm
+every change, even though the app can undo it. Hardwire permits the team to
+choose a weaker setting for this reversible write. The test preserves the
+team's decision separately from the contract.
+
+## Run the example
+
+From the Hardwire source checkout with Node 22 or newer, run
+`node --test examples/ci/action.test.mjs`.
+
+In your own Node project, copy this directory as `contracts`. Install the
+pinned GitHub tag and run the test from your project root.
+
+```sh
+npm install --ignore-scripts github:Automatron-workflows/hardwire#v0.9.0
+node --test contracts/action.test.mjs
+```
+
+Avoid the unrelated package published as `hardwire` on npm. The two example
+files use the public API from the pinned tag. You do not need a running
+server, a model or credentials.
+
+## Show the regression
+
+1. Run the test. Both checks pass.
+2. In `preferences.json`, change only `"confirmation": "user"` to
+ `"confirmation": "none"`. Leave `reversible` true.
+3. From the project root, run `npm exec --offline -- hardwire validate contracts/preferences.json`.
+ The document still meets the format rules.
+4. Run `node --test contracts/action.test.mjs` again. The process exits 1
+ with “Email changes require user confirmation”. The input test still passes.
+5. Restore `"user"` and confirm both checks pass.
+
+## Keep it in CI
+
+Commit the files and lockfile. Add the same test command after your existing
+dependency installation step. Make the check required in your normal review
+process if the application owner agrees. Replace the example with one reviewed
+action and adjust the expected origin, effect, approval and arguments together
+with that owner. Require review of changes to the expectations themselves.
+
+This test checks declarations and argument shapes. Your application still
+authenticates users, authorizes requests, collects consent and calls its own
+handler. Test actual behavior separately.
diff --git a/examples/ci/action.test.mjs b/examples/ci/action.test.mjs
new file mode 100644
index 0000000..bc420a8
--- /dev/null
+++ b/examples/ci/action.test.mjs
@@ -0,0 +1,26 @@
+// Copy this test and preferences.json into the same directory in your app.
+// Keep the team's expectations separate from the contract being reviewed.
+import assert from 'node:assert/strict';
+import { readFileSync } from 'node:fs';
+import test from 'node:test';
+import { compilePanel, normalizePanel, validateParams } from 'hardwire';
+
+const panel = normalizePanel(JSON.parse(readFileSync(new URL('./preferences.json', import.meta.url), 'utf8')));
+const port = panel.ports.find(item => item.id === 'set-email');
+
+test('changing email preferences still requires user confirmation', () => {
+ assert.equal(panel.origin, 'https://app.example.com');
+ assert.ok(port, 'Missing set-email action');
+ assert.equal(port.kind, 'write');
+ // The format permits an exemption for reversible writes. This team does not.
+ assert.equal(port.confirmation, 'user', 'Email changes require user confirmation');
+});
+
+test('the agent must supply a boolean and no extra fields', () => {
+ assert.deepEqual(validateParams(port, { enabled: false }), { enabled: false });
+ for (const input of [{}, { enabled: 'false' }, { enabled: false, extra: true }]) {
+ assert.throws(() => validateParams(port, input), { code: 'hardwire_params_invalid' });
+ }
+ const tool = compilePanel(panel).find(item => item.name === 'set_email');
+ assert.deepEqual(tool.inputSchema, port.parameters);
+});
diff --git a/examples/ci/preferences.json b/examples/ci/preferences.json
new file mode 100644
index 0000000..1d02e55
--- /dev/null
+++ b/examples/ci/preferences.json
@@ -0,0 +1,19 @@
+{
+ "panel": "hardwire.panel/1",
+ "origin": "https://app.example.com",
+ "ports": [
+ {
+ "id": "set-email",
+ "kind": "write",
+ "summary": "Change the email preference.",
+ "reversible": true,
+ "confirmation": "user",
+ "parameters": {
+ "properties": {
+ "enabled": { "type": "boolean" }
+ },
+ "required": ["enabled"]
+ }
+ }
+ ]
+}
diff --git a/examples/conformance/README.md b/examples/conformance/README.md
new file mode 100644
index 0000000..90bdfb9
--- /dev/null
+++ b/examples/conformance/README.md
@@ -0,0 +1,28 @@
+# Draft panel compatibility vectors
+
+Use [panel-v1.json](panel-v1.json) to compare an implementation against fixed
+examples without importing Hardwire. Run `npm run conformance` from the source
+checkout to exercise the Node and portable JavaScript entry points. Both
+use the same normalization code. The portable entry runs under Node here.
+
+| Collection | What to compare |
+| --- | --- |
+| `canonical` | Serialize `input` directly. Compare with the decoded `expected` string, including escapes and number formatting. |
+| `panels` | Normalize `input`, serialize it, and compare the exact UTF8 bytes with the decoded `canonical` string. Hash these bytes with SHA256. Compare `digest`, including the prefix, and the ordered `toolNames`. |
+| `calls` within each panel | Resolve `port` by its original ID. Accept `params` unchanged for `accepted: true` or return the indicated `error` code. Do not invoke a handler. |
+| `invalid` | Reject each panel during normalization with the indicated `error` code. |
+
+Object keys sort by UTF16 code units. Arrays retain order during serialization.
+Panel normalization first sorts ports by ID and supplies defaults. Use the
+JSON string and finite number spelling produced by ECMAScript JSON.stringify.
+Do not append a line ending to the bytes being hashed.
+
+These cases cover selected behaviors of [the draft format](../../docs/SPEC.md).
+They do not cover every schema, origin, trace, inference or transport rule.
+Passing them cannot establish execution, permission, identity or full
+interoperability. Report the implementation, commit, runtime, vector ID and
+first difference using synthetic data.
+
+Treat the expected values as review inputs. Never regenerate them to make
+a failing implementation pass. Preserve old vectors when format semantics
+change and add a separate version for incompatible expectations.
diff --git a/examples/conformance/panel-v1.json b/examples/conformance/panel-v1.json
new file mode 100644
index 0000000..068b6d5
--- /dev/null
+++ b/examples/conformance/panel-v1.json
@@ -0,0 +1,373 @@
+{
+ "canonical": [
+ {
+ "id": "utf16-order",
+ "input": {
+ "": 1,
+ "😀": 2,
+ "a": "café"
+ },
+ "expected": "{\"a\":\"café\",\"😀\":2,\"\":1}"
+ },
+ {
+ "id": "array-and-escaping",
+ "input": [
+ true,
+ null,
+ "A\n\"B\"",
+ false
+ ],
+ "expected": "[true,null,\"A\\n\\\"B\\\"\",false]"
+ },
+ {
+ "id": "numeric-boundaries",
+ "input": [
+ 0.000001,
+ 1e-7,
+ 1e+21
+ ],
+ "expected": "[0.000001,1e-7,1e+21]"
+ }
+ ],
+ "panels": [
+ {
+ "id": "defaults-and-order",
+ "input": {
+ "panel": "hardwire.panel/1",
+ "origin": "https://SHOP.example.com:443/",
+ "revision": "v1",
+ "ports": [
+ {
+ "id": "set-email",
+ "kind": "write",
+ "summary": "Set email updates.",
+ "parameters": {
+ "properties": {
+ "enabled": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "enabled"
+ ]
+ }
+ },
+ {
+ "id": "get-total",
+ "kind": "read",
+ "summary": "Read total in €."
+ }
+ ]
+ },
+ "canonical": "{\"origin\":\"https://shop.example.com\",\"panel\":\"hardwire.panel/1\",\"ports\":[{\"confirmation\":\"none\",\"id\":\"get-total\",\"kind\":\"read\",\"parameters\":{\"additionalProperties\":false,\"properties\":{},\"required\":[],\"type\":\"object\"},\"preconditions\":[],\"reversible\":false,\"summary\":\"Read total in €.\"},{\"confirmation\":\"user\",\"id\":\"set-email\",\"kind\":\"write\",\"parameters\":{\"additionalProperties\":false,\"properties\":{\"enabled\":{\"type\":\"boolean\"}},\"required\":[\"enabled\"],\"type\":\"object\"},\"preconditions\":[],\"reversible\":false,\"summary\":\"Set email updates.\"}],\"revision\":\"v1\"}",
+ "digest": "sha256:4a144573f2772c5f8a791c864ca7f29db7372a038061e7058e46c00ebe571134",
+ "toolNames": [
+ "get_total",
+ "set_email"
+ ],
+ "calls": [
+ {
+ "port": "get-total",
+ "params": {},
+ "accepted": true
+ },
+ {
+ "port": "get-total",
+ "params": {
+ "other": 1
+ },
+ "error": "hardwire_params_invalid"
+ },
+ {
+ "port": "set-email",
+ "params": {
+ "enabled": false
+ },
+ "accepted": true
+ },
+ {
+ "port": "set-email",
+ "params": {
+ "enabled": "false"
+ },
+ "error": "hardwire_params_invalid"
+ },
+ {
+ "port": "set-email",
+ "params": {},
+ "error": "hardwire_params_invalid"
+ }
+ ]
+ },
+ {
+ "id": "reversible-write",
+ "input": {
+ "panel": "hardwire.panel/1",
+ "origin": "https://SHOP.example.com:443/",
+ "revision": "v2",
+ "ports": [
+ {
+ "id": "set-email",
+ "kind": "write",
+ "summary": "Set email updates.",
+ "parameters": {
+ "properties": {
+ "enabled": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "enabled"
+ ]
+ },
+ "reversible": true,
+ "confirmation": "none"
+ }
+ ]
+ },
+ "canonical": "{\"origin\":\"https://shop.example.com\",\"panel\":\"hardwire.panel/1\",\"ports\":[{\"confirmation\":\"none\",\"id\":\"set-email\",\"kind\":\"write\",\"parameters\":{\"additionalProperties\":false,\"properties\":{\"enabled\":{\"type\":\"boolean\"}},\"required\":[\"enabled\"],\"type\":\"object\"},\"preconditions\":[],\"reversible\":true,\"summary\":\"Set email updates.\"}],\"revision\":\"v2\"}",
+ "digest": "sha256:98dedd3fc28fd737ddbb3d7c2c69f0e556816f0a9341109de9726036d0e061d0",
+ "toolNames": [
+ "set_email"
+ ],
+ "calls": [
+ {
+ "port": "set-email",
+ "params": {
+ "enabled": true
+ },
+ "accepted": true
+ },
+ {
+ "port": "set-email",
+ "params": {
+ "enabled": true,
+ "extra": false
+ },
+ "error": "hardwire_params_invalid"
+ }
+ ]
+ },
+ {
+ "id": "owner-floors",
+ "input": {
+ "panel": "hardwire.panel/1",
+ "origin": "https://SHOP.example.com:443/",
+ "revision": "v1",
+ "ports": [
+ {
+ "id": "remove-item",
+ "kind": "destructive",
+ "summary": "Remove an item."
+ },
+ {
+ "id": "pay-invoice",
+ "kind": "payment",
+ "summary": "Pay the fixed invoice.",
+ "parameters": {
+ "properties": {
+ "currency": {
+ "type": "string",
+ "enum": [
+ "EUR"
+ ]
+ },
+ "amount": {
+ "type": "integer",
+ "enum": [
+ 2400
+ ]
+ }
+ },
+ "required": [
+ "currency",
+ "amount"
+ ]
+ }
+ }
+ ]
+ },
+ "canonical": "{\"origin\":\"https://shop.example.com\",\"panel\":\"hardwire.panel/1\",\"ports\":[{\"confirmation\":\"owner\",\"id\":\"pay-invoice\",\"kind\":\"payment\",\"parameters\":{\"additionalProperties\":false,\"properties\":{\"amount\":{\"enum\":[2400],\"type\":\"integer\"},\"currency\":{\"enum\":[\"EUR\"],\"type\":\"string\"}},\"required\":[\"amount\",\"currency\"],\"type\":\"object\"},\"preconditions\":[],\"reversible\":false,\"summary\":\"Pay the fixed invoice.\"},{\"confirmation\":\"owner\",\"id\":\"remove-item\",\"kind\":\"destructive\",\"parameters\":{\"additionalProperties\":false,\"properties\":{},\"required\":[],\"type\":\"object\"},\"preconditions\":[],\"reversible\":false,\"summary\":\"Remove an item.\"}],\"revision\":\"v1\"}",
+ "digest": "sha256:b5dd8a4873519bd0d9e077bbe590b8280eb1e9b3a9aff8a182af26d24987605d",
+ "toolNames": [
+ "pay_invoice",
+ "remove_item"
+ ],
+ "calls": [
+ {
+ "port": "pay-invoice",
+ "params": {
+ "amount": 2400,
+ "currency": "EUR"
+ },
+ "accepted": true
+ },
+ {
+ "port": "pay-invoice",
+ "params": {
+ "amount": 2500,
+ "currency": "EUR"
+ },
+ "error": "hardwire_params_invalid"
+ },
+ {
+ "port": "pay-invoice",
+ "params": {
+ "amount": 2400,
+ "currency": "USD"
+ },
+ "error": "hardwire_params_invalid"
+ },
+ {
+ "port": "remove-item",
+ "params": {},
+ "accepted": true
+ }
+ ]
+ }
+ ],
+ "invalid": [
+ {
+ "id": "weak-write",
+ "input": {
+ "panel": "hardwire.panel/1",
+ "origin": "https://SHOP.example.com:443/",
+ "revision": "v1",
+ "ports": [
+ {
+ "id": "set-email",
+ "kind": "write",
+ "summary": "Set email updates.",
+ "parameters": {
+ "properties": {
+ "enabled": {
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "enabled"
+ ]
+ },
+ "confirmation": "none"
+ }
+ ]
+ },
+ "error": "hardwire_confirmation_weakened"
+ },
+ {
+ "id": "weak-payment",
+ "input": {
+ "panel": "hardwire.panel/1",
+ "origin": "https://SHOP.example.com:443/",
+ "revision": "v1",
+ "ports": [
+ {
+ "id": "pay-invoice",
+ "kind": "payment",
+ "summary": "Pay the fixed invoice.",
+ "parameters": {
+ "properties": {
+ "currency": {
+ "type": "string",
+ "enum": [
+ "EUR"
+ ]
+ },
+ "amount": {
+ "type": "integer",
+ "enum": [
+ 2400
+ ]
+ }
+ },
+ "required": [
+ "currency",
+ "amount"
+ ]
+ },
+ "confirmation": "user"
+ }
+ ]
+ },
+ "error": "hardwire_confirmation_weakened"
+ },
+ {
+ "id": "weak-destructive",
+ "input": {
+ "panel": "hardwire.panel/1",
+ "origin": "https://SHOP.example.com:443/",
+ "revision": "v1",
+ "ports": [
+ {
+ "id": "remove-item",
+ "kind": "destructive",
+ "summary": "Remove an item.",
+ "confirmation": "user"
+ }
+ ]
+ },
+ "error": "hardwire_confirmation_weakened"
+ },
+ {
+ "id": "duplicate-id",
+ "input": {
+ "panel": "hardwire.panel/1",
+ "origin": "https://SHOP.example.com:443/",
+ "revision": "v1",
+ "ports": [
+ {
+ "id": "get-total",
+ "kind": "read",
+ "summary": "Read total in €."
+ },
+ {
+ "id": "get-total",
+ "kind": "read",
+ "summary": "Read total in €."
+ }
+ ]
+ },
+ "error": "hardwire_port_duplicate"
+ },
+ {
+ "id": "unsupported-schema",
+ "input": {
+ "panel": "hardwire.panel/1",
+ "origin": "https://SHOP.example.com:443/",
+ "revision": "v1",
+ "ports": [
+ {
+ "id": "set-email",
+ "kind": "write",
+ "summary": "Set email updates.",
+ "parameters": {
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "optional": true
+ }
+ }
+ }
+ }
+ ]
+ },
+ "error": "hardwire_schema_invalid"
+ },
+ {
+ "id": "unknown-version",
+ "input": {
+ "panel": "hardwire.panel/2",
+ "origin": "https://SHOP.example.com:443/",
+ "revision": "v1",
+ "ports": [
+ {
+ "id": "get-total",
+ "kind": "read",
+ "summary": "Read total in €."
+ }
+ ]
+ },
+ "error": "hardwire_version_unsupported"
+ }
+ ]
+}
diff --git a/examples/demo/assets.mjs b/examples/demo/assets.mjs
new file mode 100644
index 0000000..f3e038a
--- /dev/null
+++ b/examples/demo/assets.mjs
@@ -0,0 +1,6 @@
+// Shared by the local server, static site and offline preview.
+export const assets = Object.freeze([
+ ...['index.html', 'styles.css', 'app.mjs', 'art.mjs', 'model.mjs', 'worker.mjs', 'samples.mjs', 'comparison.mjs', 'experiment.html', 'experiment.css', 'experiment.mjs', 'experiment-model.mjs', 'form.html', 'form.css', 'form.mjs', 'policy.html', 'policy.css', 'policy.mjs'].map(name => `playground/${name}`),
+ 'examples/ci/preferences.json', 'examples/ci/action.test.mjs',
+ ...['browser', 'panel-schema', 'canonical', 'infer-html', 'mcp', 'score'].map(name => `src/${name}.mjs`),
+]);
diff --git a/examples/demo/server.mjs b/examples/demo/server.mjs
index 1d6be2d..16838f3 100644
--- a/examples/demo/server.mjs
+++ b/examples/demo/server.mjs
@@ -6,6 +6,7 @@
// It serves a panel at the discovery path, a page with forms for inference, and
// a robots.txt that allows the probe. Endpoints answer GET with a fixed demo
// response; nothing is written, stored or executed.
+import { assets as assetPaths } from "./assets.mjs";
import { createServer } from "node:http";
import { readFile } from "node:fs/promises";
import { dirname, join } from "node:path";
@@ -13,10 +14,6 @@ import { fileURLToPath, pathToFileURL } from "node:url";
const HERE = dirname(fileURLToPath(import.meta.url));
const ROOT = join(HERE, '../..');
-const ASSETS = [
- ...['index.html', 'styles.css', 'app.mjs', 'art.mjs', 'model.mjs', 'worker.mjs', 'samples.mjs', 'comparison.mjs', 'experiment.html', 'experiment.css', 'experiment.mjs', 'experiment-model.mjs'].map(name => `playground/${name}`),
- ...['browser', 'panel-schema', 'canonical', 'infer-html', 'mcp', 'score'].map(name => `src/${name}.mjs`),
-];
const DEFAULT_PORT = 8787;
const HOST = "127.0.0.1";
@@ -48,7 +45,7 @@ export async function createDemoServer({
readFile(pagePath, "utf8"),
]);
- const assets = new Map(await Promise.all(ASSETS.map(async path => [`/${path}`, await readFile(join(ROOT, path))])));
+ const assets = new Map(await Promise.all(assetPaths.map(async path => [`/${path}`, await readFile(join(ROOT, path))])));
const server = createServer((request, response) => {
const send = (status, headers, body) => {
response.writeHead(status, headers);
@@ -66,7 +63,7 @@ export async function createDemoServer({
const assetPath = url.pathname === '/playground/' ? '/playground/index.html' : url.pathname;
if (assets.has(assetPath)) {
- const type = assetPath.endsWith('.mjs') ? 'text/javascript' : assetPath.endsWith('.css') ? 'text/css' : 'text/html';
+ const type = assetPath.endsWith('.mjs') ? 'text/javascript' : assetPath.endsWith('.css') ? 'text/css' : assetPath.endsWith('.json') ? 'application/json' : 'text/html';
send(200, { 'content-type': `${type}; charset=utf-8`, 'cache-control': 'no-store', 'x-content-type-options': 'nosniff' }, assets.get(assetPath));
return;
}
@@ -134,6 +131,8 @@ async function main() {
process.stdout.write(`Hardwire demo serving ${origin}\n`);
process.stdout.write(` playground ${origin}/playground/\n`);
process.stdout.write(` experiment ${origin}/playground/experiment.html\n`);
+ process.stdout.write(` form ${origin}/playground/form.html\n`);
+ process.stdout.write(` policy ${origin}/playground/policy.html\n`);
process.stdout.write(` panel ${origin}/.well-known/hardwire.json\n`);
process.stdout.write("\nTry, in another terminal:\n");
process.stdout.write(` node src/cli.mjs probe ${origin} --allow-private --fail-under 30\n`);
diff --git a/examples/form.mjs b/examples/form.mjs
index 5e81502..7e8d456 100644
--- a/examples/form.mjs
+++ b/examples/form.mjs
@@ -16,6 +16,10 @@ export function inspectForm({ html, origin, valid, invalid, portId }) {
if (!portId && panel.ports.length !== 1) throw new Error('Several actions found. Select one with --port.');
const port = portId ? panel.ports.find(port => port.id === portId) : panel.ports[0];
if (!port) throw new Error('The selected port does not exist in the draft.');
+ const candidate = inference.candidates.find(item => item.id === port.id);
+ const reviewNotes = [...(candidate.reviewNotes ?? [])];
+ if (candidate.unsupported?.length) reviewNotes.push('The draft skips unsupported field names. Compare the fields with the original form.');
+ if (!port.endpoint) reviewNotes.push('No destination in the draft. Check the site origin and form action.');
const accepted = validateParams(port, valid);
let rejection;
try { validateParams(port, invalid); } catch (error) {
@@ -24,6 +28,7 @@ export function inspectForm({ html, origin, valid, invalid, portId }) {
}
if (!rejection) throw new Error('The invalid sample passed. Supply an input that violates the draft schema.');
return { executed: false, reviewRequired: true, port: port.id, draft,
+ ...(reviewNotes.length ? { reviewNotes } : {}),
accepted, rejected: { input: invalid, reason: rejection },
tool: compilePanel(panel).find(tool => tool.name === toolName(port.id)) };
}
@@ -67,10 +72,13 @@ async function main(argv) {
if (options['--json']) console.log(JSON.stringify(result, null, 2));
else {
console.log(`Candidate action: ${result.port}`);
+ for (const note of result.reviewNotes ?? []) console.log(`Review: ${note}`);
console.log(`Accepted: ${JSON.stringify(result.accepted)}`);
console.log(`Rejected: ${JSON.stringify(result.rejected.input)}`);
console.log(`MCP tool: ${result.tool.name}`);
- console.log('Review the draft. No endpoint was called and no preference changed.');
+ console.log(options['--html']
+ ? 'These checks cover the draft only. No endpoint was called.'
+ : 'Review the draft. No endpoint was called and no preference changed.');
console.log('Use --json to inspect the complete contract and tool description.');
}
}
diff --git a/package-lock.json b/package-lock.json
index 6c5cf57..84cba6e 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -20,6 +20,7 @@
"devDependencies": {
"@anthropic-ai/mcpb": "2.1.2",
"@modelcontextprotocol/client": "2.4.0",
+ "fflate": "0.8.3",
"playwright-core": "1.65.1"
},
"engines": {
@@ -439,9 +440,9 @@
}
},
"node_modules/cross-spawn": {
- "version": "7.0.6",
- "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
- "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
+ "version": "7.1.2",
+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.1.2.tgz",
+ "integrity": "sha512-8BPK2r+sKWC8sDinRwLwrFMq2lXTBBwzYYEB9LiCznfMurOi4FOvQflq3XOLGG+HPdMSVpe+k/s96+AtDEOgPg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -655,9 +656,9 @@
}
},
"node_modules/node-forge": {
- "version": "1.4.3",
- "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.4.3.tgz",
- "integrity": "sha512-P6wzfh6t70avmV8FrVEAd/36sOPJQ+hkaJVX1Laap9J/77m7M0eyozDvc8SwnDf4P7MP94gwbAAo0rg3YVXT+g==",
+ "version": "1.4.4",
+ "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.4.4.tgz",
+ "integrity": "sha512-T6VRRpF3+czIGcXW/LOeoD7Ej28d8CF1UMEAbJyJRUtYMvyXAgxUPW2kbUibumvV9LiUQAznJOFyeYclzSJMMg==",
"dev": true,
"license": "(BSD-3-Clause OR GPL-2.0)",
"engines": {
diff --git a/package.json b/package.json
index 77156c7..d88185b 100644
--- a/package.json
+++ b/package.json
@@ -51,6 +51,7 @@
],
"scripts": {
"test": "npm run test:unit && npm run test:integration",
+ "conformance": "node --test test/conformance.test.mjs",
"validate": "node src/cli.mjs validate examples/example-panel.json",
"audit": "node src/cli.mjs audit examples/example-panel.json",
"compile": "node src/cli.mjs compile examples/example-panel.json",
@@ -67,10 +68,11 @@
"test:browser": "node scripts/build-playground.mjs && node scripts/check-playground-browser.mjs",
"release:prepare": "node scripts/prepare-release.mjs",
"test:package": "node scripts/check-package.mjs",
- "test:unit": "node --test test/*.test.mjs",
+ "test:unit": "node --test test/*.test.mjs examples/ci/action.test.mjs",
"test:integration": "node --test test/integration/*.test.mjs",
"check:quick": "npm test && npm run validate && npm run experiment && npm run experiment:form && npm run walkthrough && npm run consumer && npm run test:mcp && npm run build:playground",
"check": "npm run check:quick && npm run test:package && npm run build:bundle && npm run test:bundle",
+ "build:demo": "node scripts/build-demo.mjs",
"build:playground": "node scripts/build-playground.mjs",
"experiment:form": "node examples/form.mjs",
"build:bundle": "node scripts/build-bundle.mjs",
@@ -82,6 +84,7 @@
"devDependencies": {
"@anthropic-ai/mcpb": "2.1.2",
"@modelcontextprotocol/client": "2.4.0",
+ "fflate": "0.8.3",
"playwright-core": "1.65.1"
},
"keywords": [
diff --git a/playground/app.mjs b/playground/app.mjs
index ccd783b..83d0733 100644
--- a/playground/app.mjs
+++ b/playground/app.mjs
@@ -25,16 +25,28 @@ const film = [
] },
];
const stage = document.querySelector('#film');
+const chapters = [...document.querySelectorAll('#chapters button')];
+const compact = matchMedia('(max-width: 700px)');
+let chapter = 0;
+let selectedByUser = false;
+const policies = { signin: 'User consent', payment: 'Owner approval', settings: 'Reversible change' };
for (const scene of film) {
const figure = document.createElement('figure');
figure.className = `scene ${scene.id}`;
figure.setAttribute('role', 'img'); figure.setAttribute('aria-label', scene.description);
figure.innerHTML = ``;
stage.append(figure);
}
@@ -52,6 +64,14 @@ let visible = true;
let previous = null;
let request = null;
+function showChapter(index) {
+ chapter = index;
+ chapters.forEach((button, i) => {
+ button.setAttribute('aria-pressed', String(i === index));
+ stage.children[i].classList.toggle('current', i === index);
+ });
+}
+
function render() {
const phase = elapsed < 1450 ? 0 : elapsed < 2850 ? 1 : elapsed < 4250 ? 2 : 3;
const direct = elapsed >= 660;
@@ -68,7 +88,15 @@ function render() {
}
function tick(time) {
request = null;
- if (previous !== null) elapsed = (elapsed + Math.min(time - previous, 100)) % duration;
+ if (previous !== null) {
+ elapsed += Math.min(time - previous, 100);
+ if (elapsed >= duration) {
+ elapsed %= duration;
+ if (compact.matches && !selectedByUser && !document.querySelector('#chapters:focus-within')) {
+ showChapter((chapter + 1) % film.length);
+ }
+ }
+ }
previous = time; render(); schedule();
}
function schedule() {
@@ -84,6 +112,12 @@ function syncMotion() {
}
}
function setPlaying(value) { playing = value; previous = null; render(); syncMotion(); schedule(); }
+showChapter(0);
+chapters.forEach((button, index) => button.addEventListener('click', () => {
+ selectedByUser = true;
+ showChapter(index);
+ if (playing) { elapsed = 0; previous = null; render(); }
+}));
playback.addEventListener('click', () => setPlaying(!playing));
replay.addEventListener('click', () => { elapsed = reducedMotion.matches ? 5800 : 0; setPlaying(!reducedMotion.matches); });
reducedMotion.addEventListener('change', () => { elapsed = reducedMotion.matches ? 5800 : 0; setPlaying(!reducedMotion.matches); });
diff --git a/playground/art.mjs b/playground/art.mjs
index 3b04f05..fa96123 100644
--- a/playground/art.mjs
+++ b/playground/art.mjs
@@ -15,6 +15,6 @@ export const credit = (x, y, size = 1) => `
Local demo. No accounts or payments connected.
@@ -44,7 +44,7 @@Node 22 or newer. One command, all three actions.
npx --yes --ignore-scripts --package=https://github.com/Automatron-workflows/hardwire/releases/download/v0.9.0/hardwire-0.9.0.tgz hardwire-experiment
Read the experiment ↗ · Bring a form ↗ · Share your result ↗