@uppercut-labs/agent-native 0.0.0-stage → 1.1.0

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.
Files changed (187) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +164 -2
  3. package/agent/agent-prompt-short.md +1 -0
  4. package/agent/agent-prompt.md +26 -0
  5. package/bin/agent-native-site.mjs +269 -0
  6. package/bin/discover-routes.mjs +162 -0
  7. package/bin/verify-publication.mjs +317 -0
  8. package/dist/adapters/zod.d.ts +4 -0
  9. package/dist/adapters/zod.d.ts.map +1 -0
  10. package/dist/adapters/zod.js +20 -0
  11. package/dist/adapters/zod.js.map +1 -0
  12. package/dist/astro.d.ts +13 -0
  13. package/dist/astro.d.ts.map +1 -0
  14. package/dist/astro.js +41 -0
  15. package/dist/astro.js.map +1 -0
  16. package/dist/auth.d.ts +52 -0
  17. package/dist/auth.d.ts.map +1 -0
  18. package/dist/auth.js +128 -0
  19. package/dist/auth.js.map +1 -0
  20. package/dist/browser.d.ts +47 -0
  21. package/dist/browser.d.ts.map +1 -0
  22. package/dist/browser.js +219 -0
  23. package/dist/browser.js.map +1 -0
  24. package/dist/cli.d.ts +80 -0
  25. package/dist/cli.d.ts.map +1 -0
  26. package/dist/cli.js +484 -0
  27. package/dist/cli.js.map +1 -0
  28. package/dist/core/assert-never.d.ts +2 -0
  29. package/dist/core/assert-never.d.ts.map +1 -0
  30. package/dist/core/assert-never.js +5 -0
  31. package/dist/core/assert-never.js.map +1 -0
  32. package/dist/core/binding-internal.d.ts +10 -0
  33. package/dist/core/binding-internal.d.ts.map +1 -0
  34. package/dist/core/binding-internal.js +15 -0
  35. package/dist/core/binding-internal.js.map +1 -0
  36. package/dist/core/composition.d.ts +119 -0
  37. package/dist/core/composition.d.ts.map +1 -0
  38. package/dist/core/composition.js +545 -0
  39. package/dist/core/composition.js.map +1 -0
  40. package/dist/core/contracts.d.ts +55 -0
  41. package/dist/core/contracts.d.ts.map +1 -0
  42. package/dist/core/contracts.js +271 -0
  43. package/dist/core/contracts.js.map +1 -0
  44. package/dist/core/diagnostics.d.ts +14 -0
  45. package/dist/core/diagnostics.d.ts.map +1 -0
  46. package/dist/core/diagnostics.js +29 -0
  47. package/dist/core/diagnostics.js.map +1 -0
  48. package/dist/core/executor.d.ts +52 -0
  49. package/dist/core/executor.d.ts.map +1 -0
  50. package/dist/core/executor.js +98 -0
  51. package/dist/core/executor.js.map +1 -0
  52. package/dist/core/registry.d.ts +37 -0
  53. package/dist/core/registry.d.ts.map +1 -0
  54. package/dist/core/registry.js +75 -0
  55. package/dist/core/registry.js.map +1 -0
  56. package/dist/core/schema.d.ts +9 -0
  57. package/dist/core/schema.d.ts.map +1 -0
  58. package/dist/core/schema.js +36 -0
  59. package/dist/core/schema.js.map +1 -0
  60. package/dist/discovery.d.ts +16 -0
  61. package/dist/discovery.d.ts.map +1 -0
  62. package/dist/discovery.js +23 -0
  63. package/dist/discovery.js.map +1 -0
  64. package/dist/doctor.d.ts +200 -0
  65. package/dist/doctor.d.ts.map +1 -0
  66. package/dist/doctor.js +287 -0
  67. package/dist/doctor.js.map +1 -0
  68. package/dist/harness-codex.d.ts +17 -0
  69. package/dist/harness-codex.d.ts.map +1 -0
  70. package/dist/harness-codex.js +485 -0
  71. package/dist/harness-codex.js.map +1 -0
  72. package/dist/harness-mcp-bridge.d.ts +14 -0
  73. package/dist/harness-mcp-bridge.d.ts.map +1 -0
  74. package/dist/harness-mcp-bridge.js +159 -0
  75. package/dist/harness-mcp-bridge.js.map +1 -0
  76. package/dist/harness.d.ts +72 -0
  77. package/dist/harness.d.ts.map +1 -0
  78. package/dist/harness.js +101 -0
  79. package/dist/harness.js.map +1 -0
  80. package/dist/http.d.ts +20 -0
  81. package/dist/http.d.ts.map +1 -0
  82. package/dist/http.js +537 -0
  83. package/dist/http.js.map +1 -0
  84. package/dist/index.d.ts +16 -0
  85. package/dist/index.d.ts.map +1 -0
  86. package/dist/index.js +8 -0
  87. package/dist/index.js.map +1 -0
  88. package/dist/init.d.ts +73 -0
  89. package/dist/init.d.ts.map +1 -0
  90. package/dist/init.js +1039 -0
  91. package/dist/init.js.map +1 -0
  92. package/dist/mcp-apps.d.ts +9 -0
  93. package/dist/mcp-apps.d.ts.map +1 -0
  94. package/dist/mcp-apps.js +171 -0
  95. package/dist/mcp-apps.js.map +1 -0
  96. package/dist/mcp-core.d.ts +64 -0
  97. package/dist/mcp-core.d.ts.map +1 -0
  98. package/dist/mcp-core.js +358 -0
  99. package/dist/mcp-core.js.map +1 -0
  100. package/dist/mcp.d.ts +3 -0
  101. package/dist/mcp.d.ts.map +1 -0
  102. package/dist/mcp.js +2 -0
  103. package/dist/mcp.js.map +1 -0
  104. package/dist/next-browser.d.ts +14 -0
  105. package/dist/next-browser.d.ts.map +1 -0
  106. package/dist/next-browser.js +14 -0
  107. package/dist/next-browser.js.map +1 -0
  108. package/dist/next.d.ts +24 -0
  109. package/dist/next.d.ts.map +1 -0
  110. package/dist/next.js +28 -0
  111. package/dist/next.js.map +1 -0
  112. package/dist/package-version.d.ts +2 -0
  113. package/dist/package-version.d.ts.map +1 -0
  114. package/dist/package-version.js +3 -0
  115. package/dist/package-version.js.map +1 -0
  116. package/dist/publication.d.ts +115 -0
  117. package/dist/publication.d.ts.map +1 -0
  118. package/dist/publication.js +441 -0
  119. package/dist/publication.js.map +1 -0
  120. package/dist/registry.d.ts +3 -0
  121. package/dist/registry.d.ts.map +1 -0
  122. package/dist/registry.js +2 -0
  123. package/dist/registry.js.map +1 -0
  124. package/docs/adopt-existing-site.md +189 -0
  125. package/docs/browser.md +70 -0
  126. package/docs/capabilities-and-bindings.md +141 -0
  127. package/docs/cli.md +88 -0
  128. package/docs/compatibility.md +32 -0
  129. package/docs/composition-and-versioning.md +113 -0
  130. package/docs/doctor-and-troubleshooting.md +58 -0
  131. package/docs/evidence/GHSA-ch52-4w7c-c8xp-2026-10-03.md +17 -0
  132. package/docs/evidence/GHSA-ch52-4w7c-c8xp-2026-10-10.md +30 -0
  133. package/docs/evidence/GHSA-ch52-4w7c-c8xp-2026-10-12.md +10 -0
  134. package/docs/evidence/UAN-002-house-style-review.md +29 -0
  135. package/docs/evidence/UAN-007-astro.md +43 -0
  136. package/docs/evidence/UAN-008-worker-sidecar.md +56 -0
  137. package/docs/evidence/UAN-009-init.md +43 -0
  138. package/docs/evidence/UAN-010-auth.md +17 -0
  139. package/docs/evidence/UAN-011-discovery.md +18 -0
  140. package/docs/evidence/UAN-012-mcp-apps.md +14 -0
  141. package/docs/evidence/UAN-013-astro-on-demand.md +47 -0
  142. package/docs/evidence/UAN-014-next.md +57 -0
  143. package/docs/evidence/UAN-015-node-hono.md +69 -0
  144. package/docs/evidence/UAN-016-composition.md +52 -0
  145. package/docs/evidence/UAN-017-version-migrations.md +50 -0
  146. package/docs/evidence/UAN-018-surface-overrides.md +30 -0
  147. package/docs/evidence/UAN-019-doctor.md +19 -0
  148. package/docs/evidence/UAN-020-negative-security-fixtures.md +61 -0
  149. package/docs/evidence/UAN-020-operational-failure-safety.md +49 -0
  150. package/docs/evidence/UAN-021-docs-coverage.md +30 -0
  151. package/docs/evidence/UAN-022-cross-platform-license-notices.md +39 -0
  152. package/docs/evidence/UAN-022-overhead-license-audit.md +233 -0
  153. package/docs/evidence/UAN-022-package-portability.md +54 -0
  154. package/docs/evidence/UAN-023-commercial-agent-hosts.md +36 -0
  155. package/docs/evidence/UAN-023-inspector-host-probe.md +37 -0
  156. package/docs/evidence/UAN-023-inspector-web-and-astro-adoption.md +44 -0
  157. package/docs/evidence/UAN-023-native-webmcp-chrome.md +44 -0
  158. package/docs/evidence/UAN-024-release-readiness-2026-10-10.md +33 -0
  159. package/docs/evidence/UAN-024-release-readiness.md +41 -0
  160. package/docs/evidence/codex-harness.md +56 -0
  161. package/docs/evidence/gate-2-domain-expansion.md +35 -0
  162. package/docs/evidence/recovery-and-selection-recipes-2026-10-15.md +63 -0
  163. package/docs/for-agents.md +50 -0
  164. package/docs/frameworks.md +62 -0
  165. package/docs/getting-started.md +109 -0
  166. package/docs/harness-codex.md +117 -0
  167. package/docs/harness-mcp-bridge.md +30 -0
  168. package/docs/http.md +80 -0
  169. package/docs/installation.md +95 -0
  170. package/docs/mcp-apps.md +57 -0
  171. package/docs/mcp.md +178 -0
  172. package/docs/next.md +73 -0
  173. package/docs/permissions-and-discovery.md +58 -0
  174. package/docs/programmatic-harness.md +88 -0
  175. package/docs/readability-frameworks.md +18 -0
  176. package/docs/reference.md +161 -0
  177. package/docs/release-handoff.md +41 -0
  178. package/docs/site-publication.md +85 -0
  179. package/docs/stability.md +53 -0
  180. package/docs/static-sites.md +141 -0
  181. package/docs/support-and-limitations.md +20 -0
  182. package/docs/surfaces.md +27 -0
  183. package/docs/upgrading-to-1.0.md +26 -0
  184. package/package.json +188 -4
  185. package/skill/agent-native/SKILL.md +54 -0
  186. package/skill/agent-native/references/adapter-decision.md +19 -0
  187. package/skill/agent-native/references/verification.md +25 -0
@@ -0,0 +1,37 @@
1
+ # UAN-023 named-client and host availability probe
2
+
3
+ Date: 2026-10-03 UTC. Isolated source commit: `076b4197e49997da190389d9e247521baa3bab50`. Host: `research`, macOS 27.0 build 26A425, Node 25.9.0, npm 11.12.1. These observations do not complete UAN-023 or the v1 release matrix.
4
+
5
+ ## Pinned named MCP client over HTTP
6
+
7
+ The independent client was the official [MCP Inspector CLI](https://github.com/modelcontextprotocol/inspector/blob/main/clients/cli/README.md), pinned to `@modelcontextprotocol/inspector@2.8.0`. It connected with Streamable HTTP to the packed E09 example's actual loopback server. This is a real named client and real HTTP transport; the server/data and identity policy remain local fixtures. No commercial service or external network endpoint was tested.
8
+
9
+ Reproduce from this checkout:
10
+
11
+ ```sh
12
+ npm ci --ignore-scripts --no-audit --no-fund
13
+ npm run build
14
+ npm run example:e09
15
+ node test/uan023-inspector-client.mjs
16
+ ```
17
+
18
+ The manual probe starts the E09 server on `127.0.0.1`, invokes the Inspector CLI four times with a 45-second per-call timeout, asserts protocol outcomes, and closes the server. It uses `npx --yes @modelcontextprotocol/inspector@2.8.0`; no credential is passed.
19
+
20
+ Observed results:
21
+
22
+ | Probe | Inspector result |
23
+ | --- | --- |
24
+ | `tools/list` | Exit 0; exactly one named album-lookup tool with input/output schemas and a `ui://uppercut/album-explorer.html` resource reference |
25
+ | `tools/call --app-info` | Exit 0; `hasApp: true`, resource MIME `text/html;profile=mcp-app` |
26
+ | `tools/call` with `{"slug":"first-light"}` | Exit 0; text and `structuredContent.result` both represent the found album |
27
+ | `tools/call` with `{"slug":"blocked-album"}` | Exit 5; `isError: true` and no successful value |
28
+
29
+ The standalone E09 packaging/build/tests also passed (3/3). The probe script is the exact assertion source. Its `.exported` E09 dependency is intentionally generated by `npm run example:e09`, not checked in. The result expands the prior SDK-only fixture evidence to a separately distributed named client CLI. Inspector CLI app metadata inspection does **not** demonstrate rendering or interaction in an MCP Apps host.
30
+
31
+ ## Browser and MCP Apps host boundary
32
+
33
+ Installed Google Chrome 154.0.8037.95 was probed in a headless, no-focus session without an origin-trial token or experimental flag. `document.modelContext` and its `registerTool` member both evaluated as `undefined` on a blank page. This shows the default local Chrome session did not expose native WebMCP; it does not test a supported WebMCP agent host. Chrome's [WebMCP origin-trial notice](https://developer.chrome.com/blog/ai-webmcp-origin-trial) describes opt-in access. The package's ordinary-site fallback was covered by earlier simulated/browser fixtures, not by this blank-page probe.
34
+
35
+ The Inspector CLI read App resource metadata and called the tool, but no Inspector web UI or other MCP Apps iframe host was opened. App rendering, host-mediated UI actions, browser sandbox/CSP enforcement, and consent behavior remain unverified. No author-independent human or clean-context Astro adoption was performed. UAN-023 cannot be marked complete from this slice.
36
+
37
+ No Windows foreground UI was used. No external credential, private package, deployment, or npm publish was involved.
@@ -0,0 +1,44 @@
1
+ # UAN-023: Inspector web host and clean-context Astro adoption
2
+
3
+ Date: 2026-10-03 UTC. Isolated public source base: `8a502b5` on `research` (macOS 27.0, build 26A425; Node 25.9.0; npm 11.12.1). This is a delegated clean-context agent using only public package docs, public example source, and official host docs. It is not an unrelated human trial. No canonical checkout was edited for these observations.
4
+
5
+ ## Named MCP Apps web host
6
+
7
+ The official `@modelcontextprotocol/inspector@2.8.0` web Apps tab connected through real loopback Streamable HTTP to the packed E09 server. The Inspector's sandbox iframe rendered in headless Google Chrome 154.0.8037.95, driven with Playwright 1.56.1. The E09 project used `@modelcontextprotocol/server@2.3.0`, `@modelcontextprotocol/client@2.3.0`, and `@modelcontextprotocol/ext-apps@2.0.3`.
8
+
9
+ Reproduce after a normal repository `npm ci`:
10
+
11
+ ~~~sh
12
+ npm run example:e09
13
+ npm install --no-save --package-lock=false --ignore-scripts --no-audit --no-fund playwright@1.56.1
14
+ node test/uan023-inspector-web.mjs
15
+ ~~~
16
+
17
+ The browser script launches the Inspector with its web, sandbox, and App-origin listeners bound to `127.0.0.1`, disables automatic foreground opening, generates a fresh token without printing it, and uses the Inspector's documented deep link. It waits for `connected` and `data-app-status="ready"`, then enters the actual iframe. The initial tool result displayed `First Light (first-light)`. Submitting `blue-hour` from the view displayed `Blue Hour (blue-hour)`; submitting `blocked-album` displayed `The host denied this request.` The app's binding ran exactly twice, so the denied call did not execute it. There were three frames (Inspector, sandbox proxy, App), no page errors, and no App CSP console errors. This is a real named local host result, beyond the earlier in-memory AppBridge fixture and Inspector CLI metadata probe.
18
+
19
+ The first host attempt connected and called the E09 tool but left the view in `loading`. Headless Chrome showed a CSP-blocked `http://127.0.0.1:6485/view.js` request. Investigation found `template.replace(marker, replacementString)` expanded `$&` tokens in esbuild's minified bundle: the generated resource had 24 opening/closing script tags and 23 copied `src="./view.js"` references. The builder now replaces through a callback, checks for exactly one marker, and escapes any closing-script token in bundled JavaScript. The focused E09 resource assertion checks one inline module script, one closing tag, and zero external view references. After this fix, standalone E09 passed 3/3 and the real Inspector iframe passed.
20
+
21
+ [Inspector MCP App review recipe](https://github.com/modelcontextprotocol/inspector/blob/main/docs/mcp-app-review.md) and [Inspector web client contract](https://github.com/modelcontextprotocol/inspector/blob/main/clients/web/README.md) describe the deep link, iframe, and sandbox host used here.
22
+
23
+ ## Fresh existing-Astro adoption
24
+
25
+ The agent followed [getting started](../getting-started.md), [static sites](../static-sites.md), [frameworks](../frameworks.md), and linked public E01/E02 example sources. Each before-state site was copied to a fresh temporary directory; no private planning instructions, private packages, credentials, or deployment were used. The local `0.0.0` package was installed from a tarball generated by `npm run example:e09`, since npmjs publication has not happened.
26
+
27
+ **E01 static Astro (Astro 7.3.5).** `npm ci` and the before-state build passed. The documented `createInitPlan` and `applyInitPlan` calls with `{ hosting: 'cloudflare', routeMode: 'sidecar', sidecarOrigin: 'http://127.0.0.1:8787' }` returned an applied plan. The detection accurately reported `hosting-unknown`; the explicit choice resolved it. The after-state build retained three static pages and the original data, pages, SVG, and CSS byte-for-byte. The init-generated browser entry only announces readiness. This proves the narrow documented init flow, not a registered capability or live sidecar.
28
+
29
+ The separate fully integrated public E01 example was exported with `npm run example:e01`. Its targeted fixture checks and three-page static build passed. A headless Chrome run initially exposed a real-browser failure hidden by simulated tests: the album form briefly displayed a result, then Astro ClientRouter navigated to `/albums/?slug=first-light` and cleared it. Adding Astro's documented `data-astro-reload` attribute to that one form let the application submit handler prevent navigation. Reproduction:
30
+
31
+ ~~~sh
32
+ npm run example:e01
33
+ node test/uan023-browser-fallback.mjs
34
+ ~~~
35
+
36
+ On Chrome 154.0.8037.95, `document.modelContext` was `undefined`. The page displayed the unavailable-agent fallback; human lookup returned `first-light`, returned `kind: missing` for an absent slug, and returned `blue-hour` after navigating About to Albums through ClientRouter. The URL stayed `/albums/` after form submissions, and page errors were empty. [Astro's ClientRouter form guidance](https://docs.astro.build/en/guides/view-transitions/#preventing-client-side-navigation) supports this form opt-out.
37
+
38
+ **E02 on-demand Astro (Astro 7.3.5, `@astrojs/node@11.1.6`).** The fresh before-state `npm ci`, build, and its six baseline tests passed. The public [E02 source](https://github.com/uppercut-labs/agent-native/blob/main/examples/e02-astro-on-demand-catalog/project/README.md) supplied the config, one registry/binding, HTTP/MCP endpoint files, browser entry, and live verification script. These files were copied into the existing site; then the public installation guide's exact MCP and Zod peers and the local package tarball were installed. The after-state Astro build and the copied public live HTTP/MCP verifier passed. The pre-existing ordinary JSON route still returned HTTP 200 for `night-bus-radio` and HTTP 404 for a missing slug. Seven unrelated source/data/asset files remained byte-identical.
39
+
40
+ The E02 integration required a source-guided intervention: the public guide links to working source but does not yet give a complete copy/edit sequence for a stranger's own project. The verification script also uses a local fixture bearer token from that public example. This is reproducibility evidence for the public example patterns, not independent design of a new site or production identity integration.
41
+
42
+ ## Limits and remaining gates
43
+
44
+ Inspector web is a genuine local MCP Apps iframe host; no commercial host, remote deployment, consent dialog, external identity provider, or arbitrary third-party MCP server was checked. Chrome's default session did not expose native WebMCP, so the browser result proves the human fallback and no native browser-agent registration. E01's sidecar origin was a local planning choice, not a running Worker. E02 relied on the linked public after-state source. UAN-023's full acceptance and npm release matrix remain open.
@@ -0,0 +1,44 @@
1
+ # UAN-023 native WebMCP in Chrome 155
2
+
3
+ Checked 2026-10-10 on macOS arm64 with Google Chrome 155.0.8059.39 (stable channel), Node 26.10.0 and npm 11.19.1. This is the first native WebMCP result for Agent Native. Earlier browser evidence used a simulated `document.modelContext`, and the [2026-10-03 probe](UAN-023-inspector-host-probe.md) found no native API in default Chrome 154.
4
+
5
+ ## Host and access
6
+
7
+ Chrome ships WebMCP behind an opt-in. Chrome's [WebMCP documentation](https://developer.chrome.com/docs/ai/webmcp) names `chrome://flags/#enable-webmcp-testing` for local testing and an origin trial for sites. The probe launches a separate headless Chrome process with a temporary profile and `--enable-features=WebMCP`, the feature behind that flag. It does not touch any user browser profile. A second run without the feature confirms that default Chrome 155 still has no `document.modelContext`.
8
+
9
+ With the feature on, Chrome exposes `document.modelContext` with `registerTool`, `getTools`, `executeTool`, `ontoolchange` and `when`. This matches the [current draft](https://webmachinelearning.github.io/webmcp/) that the adapter targets. On the host side, the experimental DevTools `WebMCP` domain reports `toolsAdded` and `toolsRemoved` and accepts `invokeTool`. Agent Native's own tests use the in-page API and that DevTools domain; an agent host would use the browser's own APIs. No AI agent, prompt or model was involved.
10
+
11
+ ## Reproduce
12
+
13
+ ```sh
14
+ npm ci
15
+ npm run example:e06
16
+ npm run example:e01
17
+ node test/uan023-native-webmcp.mjs
18
+ ```
19
+
20
+ Set `CHROME_PATH` if Chrome is not at the default macOS location. The script serves the built E06 and E01 static output on loopback and asserts every outcome below.
21
+
22
+ ## Observed results
23
+
24
+ | Example | Check | Result |
25
+ | --- | --- | --- |
26
+ | E06 | Default Chrome, no feature | No `document.modelContext`; the page shows its human-control fallback text |
27
+ | E06 | `WebMCP.enable`, then load | `toolsAdded` reports `uan.15.example.browser.9.theme.set.v1` with the draft-2020-12 input schema and annotations `readOnly: false`, `consequential: false` |
28
+ | E06 | Host `invokeTool` `{theme:"dark"}` | `Completed`; output `{ ok: true, capabilityId: "example.browser:theme.set@1", value: { theme: "dark" } }`; page theme changed |
29
+ | E06 | Host `invokeTool` `{theme:"purple"}` | `Completed` with the safe `Capability input is invalid.` envelope; theme unchanged |
30
+ | E06 | `pagehide` on the Window | The adapter's registration `AbortSignal` removed the native tool (`getTools()` count 1 to 0) |
31
+ | E01 | Static Astro `/albums/` | One read tool `uan.15.example.catalog.12.album.lookup.v1`, `readOnlyHint: true`; page status says browser agent tools are available |
32
+ | E01 | `executeTool` `first-light` / unknown slug | Found album and typed `{ kind: "missing" }` results |
33
+ | E01 | Astro client navigation to `/about/`, then back | Tool removed on `/about/` (0 tools) and registered again on `/albums/` |
34
+
35
+ ## Change made from this evidence
36
+
37
+ The draft and Chrome define the annotations `readOnlyHint`, `untrustedContentHint` and `consequentialHint`. The browser adapter previously sent MCP's `destructiveHint`, which Chrome silently dropped, so a destructive capability reached Chrome with no risk hint. The adapter now sets `consequentialHint` for `risk: 'destructive'` capabilities and keeps `readOnlyHint` for reads. The MCP adapter keeps MCP's own `destructiveHint`. Destructive browser tools still require explicit exposure and per-call authorization. The new annotation is unit-tested with the simulated API, because neither E06 nor E01 has a destructive browser tool.
38
+
39
+ ## Limits
40
+
41
+ - Native WebMCP was verified only in Chrome 155 with the opt-in feature. Default Chrome, other browsers and origin-trial tokens were not tested.
42
+ - Calls came from Chrome's DevTools protocol, not from a shipping browser agent. Agent consent, prompting and tool selection are untested.
43
+ - Leaving a document by full navigation produced no `toolsRemoved` DevTools event within five seconds. The document is discarded, and the adapter's `pagehide` cleanup was verified separately.
44
+ - Commercial MCP and MCP Apps hosts remain unverified.
@@ -0,0 +1,33 @@
1
+ # UAN-024 release-readiness update (2026-10-10)
2
+
3
+ This page supersedes the open rows in the [2026-10-03 snapshot](UAN-024-release-readiness.md), which stays as a dated record. The package is published as `0.1.1`. Every UAN acceptance item now has evidence or a recorded scope limit.
4
+
5
+ ## Closed since the earlier snapshot
6
+
7
+ | Earlier open item | Current evidence |
8
+ | --- | --- |
9
+ | UAN-020 vulnerability contact and support limits | GitHub private vulnerability reporting is enabled ([release handoff](../release-handoff.md)). Limits are in [support limits](../support-and-limitations.md) and the [operational failure-safety evidence](UAN-020-operational-failure-safety.md) |
10
+ | UAN-021/023 rendered MCP Apps, clean-context adoption and native WebMCP | [Inspector MCP Apps and Astro adoption](UAN-023-inspector-web-and-astro-adoption.md) and [native Chrome 155 WebMCP](UAN-023-native-webmcp-chrome.md) |
11
+ | UAN-022 Windows/Linux CLI, timing and license inventory | [Portability](UAN-022-package-portability.md), [overhead](UAN-022-overhead-license-audit.md) and the [cross-platform license and notice review](UAN-022-cross-platform-license-notices.md) |
12
+ | Astro advisory | [2026-10-10 recheck](GHSA-ch52-4w7c-c8xp-2026-10-10.md): disputed upstream with no fix; Astro does not call the affected method |
13
+ | Final candidate artifact | The `0.1.1` registry tarball (SHA-256 `a1ce884f…8fbb`) matches the reviewed archive for source `ab79aed`, and a clean registry install passed ([harness release evidence](codex-harness.md#registry-release---2026-10-05)) |
14
+ | UAN-002 house style | [House TypeScript style review](UAN-002-house-style-review.md) |
15
+ | UAN-018 converter parity | E12 now has local, browser and server bindings. Its HTTP route returns the same results as the local and browser bindings, and invalid input returns 422 |
16
+ | UAN-021 exports outside workspace paths | `npm run check:isolated-examples` copies every exported example to a temporary directory outside the repository. It confirms there is no `node_modules` above that directory and that the package resolves to the copy's own install. It then runs `npm ci` and the example's checks there. All twelve passed locally, and CI runs it on Node 24 |
17
+ | UAN-023 flagship CLI from one definition | E04's application-owned CLI reuses the shared E01 contract and calls the sidecar remotely. Together, E01, E04 and E09 give the flagship browser, HTTP/OpenAPI, MCP, CLI and MCP Apps surfaces from one definition |
18
+
19
+ ## Acceptance row ledger
20
+
21
+ | Row | Evidence | Disposition |
22
+ | --- | --- | --- |
23
+ | A19 sidecar routing and revision | Packed E04 route, origin, revision and protocol checks on local workerd | Passed locally. A live provider address and rollback belong to the deploying application |
24
+ | A23 docs/example coverage | The coverage manifest, source-region and link checks, and isolated example exports | Passed |
25
+ | A26 provider provisioning guard | Init plans only local edits and never provisions | Passed |
26
+ | A27 real-host compatibility | Inspector 2.8.0 MCP Apps, Chrome 155 native WebMCP with the opt-in feature, and [Antigravity CLI and Claude Code invoking the flagship tool over MCP](UAN-023-commercial-agent-hosts.md) | Passed for named hosts. MCP Apps rendering in commercial hosts and shipping browser agents are unverified and not claimed |
27
+ | A28 independent checks | Node 22/24 CI on every pushed commit | Passed |
28
+ | A29 packed install | The 0.1.1 registry install, and examples installed outside the repository | Passed |
29
+ | A30 CLI platform smoke | macOS and Linux CI packed CLI, plus the Windows packed CLI in a path with spaces | Passed |
30
+
31
+ ## Not claimed
32
+
33
+ Native WebMCP in default browsers, MCP Apps rendering in commercial hosts, provider deployments, and external identity providers. The changes listed under 0.1.2 in the changelog ship in that release.
@@ -0,0 +1,41 @@
1
+ # UAN-024 release-readiness audit update
2
+
3
+ Snapshot: 2026-10-03 07:05 UTC, public source `79f7e4ea8324ed616d83c04715a1eaf4dd175144`. This note updates the earlier isolated audit at `8a502b5`; it does not certify a release or include later commits. No package version/visibility, npm registry, provider deployment, or DNS state was changed for this update.
4
+
5
+ ## Confirmed repairs
6
+
7
+ | Earlier finding | Current observation at this snapshot |
8
+ | --- | --- |
9
+ | A clean pack omitted `dist` and all 36 export targets. | `fc4e4e2` added `prepack: npm run build`. A separate clean clone of `79f7e4e` ran `npm ci` then normal `npm pack --dry-run --json` and reported 124 files, a 127,308-byte tarball and 36/36 declared export target paths. This is a dry-run file-list check, not an immutable release tarball or digest. |
10
+ | The Worker E04 MCP path returned HTTP 500. | `24c8bab` gives the Workerd JSON Schema validator a mutable copy before it annotates schemas. A fresh packed E04 run passed its nine fixture tests, bundle/host/origin/CORS checks and official MCP client roundtrip. |
11
+ | Integration CI was red. | [Run 37104609091](https://github.com/uppercut-labs/agent-native/actions/runs/37104609091) passed `npm run check` and `npm pack --dry-run --json` in both Node 22 and Node 24 jobs for the exact `79f7e4e` SHA. This is the broad integration result; no duplicate full suite was run for this documentation update. |
12
+
13
+ The manifest names `@uppercut-labs/agent-native`, points to the public Uppercut Labs repository, and declares MIT; [LICENSE](../../LICENSE) credits Devin Thomas. `npm view @uppercut-labs/agent-native version --registry https://registry.npmjs.org/` returned E404 on 2026-10-03 07:04 UTC. That response means the target is not publicly readable at that moment; it does not reserve the name or prove publish permissions. The manifest remains `private: true` at `0.0.0`.
14
+
15
+ ## Evidence still needed for v1 acceptance
16
+
17
+ 1. **Complete UAN-020.** The [negative security fixtures](UAN-020-negative-security-fixtures.md) and later failure-safety work are valuable local evidence. A maintainer-approved private vulnerability contact is still absent from [SECURITY.md](https://github.com/uppercut-labs/agent-native/blob/main/SECURITY.md). Provider auth, grant persistence, cache isolation, CSP/iframe behavior and timeout handling need their exact supported boundaries recorded.
18
+ 2. **Complete UAN-021/023 documentation and real-host evidence.** The [coverage manifest](https://github.com/uppercut-labs/agent-native/blob/main/docs-site/coverage.json) links E01-E12 to guides and negative probes, while the [named Inspector CLI probe](UAN-023-inspector-host-probe.md) proves a real Streamable HTTP client, not rendered MCP Apps interaction. Clean-context Astro adoption and native WebMCP host behavior remain open at this snapshot. The default Chrome probe did not expose `document.modelContext`.
19
+ 3. **Complete UAN-022 portability.** [Measured macOS package evidence](UAN-022-package-portability.md) and the green Linux CI matrix cover several pieces. Windows/Linux representative installed CLI use, cold doctor/invocation timing, license inventory and consumer bundle budgets need a final support decision. A CI runner is not a Windows or production provider host.
20
+ 4. **Assess the Astro dependency advisory.** The lockfile resolves `astro@7.3.5` and `http-cache-semantics@4.2.0`. [GHSA-ch52-4w7c-c8xp](https://github.com/advisories/GHSA-ch52-4w7c-c8xp) lists versions through 4.2.0 as affected and no patched version as of this snapshot; `npm view http-cache-semantics version` returned 4.2.0. The earlier `npm audit --omit=dev --audit-level=high` found no production dependency vulnerability. Decide and document impact/mitigation for the Astro integration path before claiming a hosted support tier.
21
+ 5. **Make a final candidate artifact and provider record.** The dry-run file list and CI do not supply a tarball digest, dependency license report, published version, registry install, or live deployment. Use the [release and provider handoff](../release-handoff.md) after the remaining gates pass. The package has no `bin` entry or package-level `init` command; a programmatic v1 scope would need an explicit acceptance decision.
22
+
23
+ ## Acceptance row ledger
24
+
25
+ The internal acceptance matrix is planning context; these public results are scoped to the cited source snapshot.
26
+
27
+ | Row | Current evidence | Release disposition |
28
+ | --- | --- | --- |
29
+ | A19 sidecar routing and revision (R21) | Packed E04 route, origin and protocol fixture passed. | Live provider address and rollback remain unverified. |
30
+ | A23 docs/example coverage (R18) | Coverage manifest resolves twelve examples; the current docs build checks links. | Guide prerequisites, expected output and independent adoption review remain open. |
31
+ | A26 provider provisioning guard (R21) | Programmatic init plans local project edits and does not provision an account. | Provider handoff remains an application operation. |
32
+ | A27 real-host compatibility (R22) | Named Inspector CLI 2.8.0 exchanged MCP requests. | Rendered MCP Apps and native WebMCP host behavior remain open. |
33
+ | A28 independent checks (R23) | Node 22/24 CI passed on this SHA. | Re-run once on the final release candidate SHA. |
34
+ | A29 packed install (R24) | Existing examples and core/browser portability check use fresh local tarballs; clean pack contains all exports. | Final immutable candidate and outside-repository release install remain open. |
35
+ | A30 CLI platform smoke (R24) | macOS Node/Hono CLI fixture passed; Linux CI runs examples. | Representative Windows/Linux installed CLI invocation remains open. |
36
+
37
+ ## Documentation output in this slice
38
+
39
+ [CHANGELOG.md](https://github.com/uppercut-labs/agent-native/blob/main/CHANGELOG.md) records unreleased work and states there is no prior npm migration path. [CONTRIBUTING.md](https://github.com/uppercut-labs/agent-native/blob/main/CONTRIBUTING.md) describes scoped verification and private-data handling. The [release handoff](../release-handoff.md) maps package release steps and application-owned native-provider work without inventing a hosted service or a support address.
40
+
41
+ This is a release preparation checkpoint. UAN-024 remains open until all mandatory evidence is complete or a specific unsupported scope is explicitly accepted by the maintainer, and the final artifact is tied to a source commit.
@@ -0,0 +1,56 @@
1
+ # Codex harness evidence
2
+
3
+ Checked 2026-10-04 (America/Chicago), with the real proof completed at
4
+ `2026-10-05T03:50:19.168Z`; fresh-tarball inference passed at
5
+ `2026-10-05T03:56:16.489Z`. This records one local runtime/model route, not all CLI
6
+ versions, accounts, models or cloud targets.
7
+
8
+ | Component | Tested value |
9
+ | --- | --- |
10
+ | Local Node | 24.18.0; package floor Node 22 |
11
+ | Codex CLI/app-server | 0.145.0, stdio transport |
12
+ | Authentication | Codex-managed ChatGPT sign-in; no Platform API-key fallback |
13
+ | Model | gpt-5.6-luna, selected from this runtime's model/list catalog |
14
+ | Effort | low |
15
+ | Sandbox | workspace-write, disposable local directory |
16
+ | Result | Both exact file checks passed; same thread resumed through a new process |
17
+ | Cleanup | Both owned app-server processes closed; temporary workspace removed |
18
+
19
+ Generated protocol schemas from the installed CLI were inspected before implementation.
20
+ Official sources: [app-server](https://developers.openai.com/codex/app-server/) and
21
+ [authentication](https://developers.openai.com/codex/auth/). The adapter uses managed
22
+ CLI login rather than application-owned external token injection. No identity,
23
+ plan detail, session ID, credential or raw provider transcript is included here.
24
+
25
+ The real proof created `proof.txt` with `hello world`, closed the original process,
26
+ read/resumed the same persisted thread in another process and changed the file to
27
+ `hello Codex`. File contents and resume identity were verified by the runner, rather
28
+ than inferred from model output. Usage updates were snapshots, not billed-cost evidence.
29
+ The opt-in runner is `npm run proof:codex -- --model gpt-5.6-luna`; regular package
30
+ checks use synthetic protocol processes only.
31
+
32
+ Fresh packed-consumer acceptance verifies all export targets exist and imports
33
+ root/browser/harness/bridge/Codex without optional SDKs. Its missing-runtime probe
34
+ checks actionable guidance without launching inference. Provider fixtures test
35
+ interrupt, failures, wrong auth, malformed protocol, deadlines, concurrent turns,
36
+ workspace ownership, cross-process resume, permission denial and owned cleanup.
37
+
38
+ The checks above record pre-release source/tarball acceptance. Cursor local/cloud
39
+ acceptance remains pending. Codex programmatic MCP configuration and cloud
40
+ operation are not advertised by this adapter.
41
+
42
+ ## Registry release - 2026-10-05
43
+
44
+ [`@uppercut-labs/agent-native@0.1.1`](https://www.npmjs.com/package/@uppercut-labs/agent-native/v/0.1.1)
45
+ is published and npm `latest` resolves to 0.1.1. Its registry download matches the
46
+ reviewed GitHub release archive byte-for-byte: SHA-256
47
+ `a1ce884f89eadba319d6fbad5c9b09b05575a7ab15998bcfd4a6ad8cc8228fbb`, source
48
+ `ab79aed4b8556752b33286f2edf261a07b3921d1`, 168772 bytes / 152 files.
49
+
50
+ A fresh consumer installed this exact version from npm, imported root/browser/Codex
51
+ without optional peers and verified actionable missing-runtime guidance without
52
+ inference. The equivalent GitHub archive had already passed the installed reusable
53
+ two-turn proof with Node 24.19.0 / Codex CLI 0.145.0 / gpt-5.6-luna, same-session
54
+ cross-process resume and owned cleanup. No additional inference was needed to
55
+ verify the identical registry bytes. The checksum-verified GitHub route remains
56
+ available when a registry cannot be reached.
@@ -0,0 +1,35 @@
1
+ # Real integration: Domain Expansion
2
+
3
+ Checked 2026-10-11. Domain Expansion is an owner-only domain portfolio app on a Cloudflare Worker with Neon Postgres. Its source is the public [uppercut-labs/domain-expansion](https://github.com/uppercut-labs/domain-expansion) repository. It serves Agent Native capabilities as remote MCP at `https://domains.uppercut-labs.com/mcp`. This was the first integration outside the repository's fixtures.
4
+
5
+ ## What it exercises
6
+
7
+ - Five protected capabilities (`domains.list`, `domains.get`, `renewals.upcoming`, `domains.create`, `domains.update`) and a destructive `domains.delete` with no MCP exposure.
8
+ - The application's own personal tokens act as the bearer credential and the persisted grant, through `bearerAuth`, `resolveTrustedPrincipal`, `GrantStorePort` and `authorizeResource`.
9
+ - Bindings call the application's existing REST services, so validation, revisions, idempotency and rate limits are shared with its API and CLI.
10
+
11
+ ## Results
12
+
13
+ | Check | Where | Result |
14
+ | --- | --- | --- |
15
+ | Official SDK client discovery and calls | Deployed | Pass; protocol 2025-11-25 |
16
+ | Typed outcomes: found and not found, stale revision, duplicate name | Deployed | Pass |
17
+ | Invalid input rejected before the binding | Deployed | Pass |
18
+ | No token: 401 with `WWW-Authenticate: Bearer`; bad token: 401; foreign Origin: 403 (application check) | Deployed | Pass |
19
+ | A read-only token lists only read tools; a revoked token is refused on the next call | Local, official SDK | Pass |
20
+ | Delete neither listed nor callable | Deployed | Pass |
21
+ | Real host | Deployed | Claude Code 2.1.285 listed the tools and read real data without changes |
22
+ | Rollback to the previous Worker version and back | Deployed | Pass |
23
+ | Other MCP hosts; MCP OAuth | — | Not tested |
24
+
25
+ ## Findings fixed for 1.0
26
+
27
+ The integration ran on 0.1.3, and these changes came out of it:
28
+
29
+ - Bindings receive `context.caller`.
30
+ - Protected-only servers challenge requests that have no token.
31
+ - The adapter has `onToolFailure` and `toolName` options.
32
+ - The Zod peer accepts the 4.6.x patch line.
33
+ - The MCP guide documents the Workers stream lifecycle.
34
+
35
+ The application was then rebuilt on the packed 1.0 candidate. Its MCP tests and its Worker smoke test under workerd passed. See [upgrading from 0.1.x](../upgrading-to-1.0.md).
@@ -0,0 +1,63 @@
1
+ # Recovery and executor-selection recipes
2
+
3
+ Verified October 15, 2026 against the Agent Native 1.0.1 implementation. These
4
+ application examples extend E07 and E11 without changing package runtime code,
5
+ stable declarations, transport envelopes, tool naming or authorization policy.
6
+
7
+ ## Protected write recovery
8
+
9
+ E07's `src/recovery.mjs` defines a protected write and protected status read. The
10
+ application reserves an idempotency key scoped to subject and tenant in a local
11
+ file journal. Its write deliberately ignores abort and waits for a deferred
12
+ commit. The test advances the adapter deadline with Node mock timers, observes
13
+ the existing uncertain-write warning and one handler invocation, then reads
14
+ pending status. Releasing the original write produces committed status and one
15
+ persisted commit. Reopening the journal retains that state.
16
+
17
+ Negative paths cover missing status, an unauthorized reader, an explicitly
18
+ resubmitted matching key while pending and committed, and a conflicting value.
19
+ Explicit duplicate requests do not create another mutation. Sentinel assertions
20
+ check that the timeout and denied read expose no protected value. The demo makes
21
+ only one write invocation, reconciling its outcome through status reads.
22
+
23
+ ## Exact selection and private diagnostics
24
+
25
+ E11's `src/executor-selection.mjs` distinguishes `invalid-identity`,
26
+ `capability-missing`, `binding-unavailable` and `binding-ambiguous` before any
27
+ handler runs. Explicit `bindingId: 'primary'` invokes one binding with separate
28
+ namespace, name and major-version fields.
29
+
30
+ The same executable uses the official MCP client/server SDKs with an in-process
31
+ fetch transport. Its operator hook receives `handler-failed` and `invalid-output`
32
+ with diagnostic observations. The client receives the existing bounded error.
33
+ Neither operator events nor client results contain credential, input, output or
34
+ exception sentinels. Hidden tools cannot be listed or called, and generated tool
35
+ names remain distinct for separator-bearing identity pairs.
36
+
37
+ ## Verification
38
+
39
+ On macOS with Node 26.9.0 and npm 11.19.1:
40
+
41
+ - `npm run check` passed: 136 library tests, format/lint/type checks, API baseline,
42
+ browser proof, all twelve standalone exports, docs, portability and adoption.
43
+ - After strengthening the no-retry counter assertion, `npm run example:e07`,
44
+ `npm run format:check`, `npm run lint` and `npm run docs:check` passed again.
45
+ - `npm run check:isolated-examples -- e07-playlist-permissions e11-diagnostics-fault-lab`
46
+ passed independent installs, example tests and both executable demos outside
47
+ the repository, without ancestor dependencies.
48
+ - The three new recipe tests passed against installed tarballs on Node 22.23.3
49
+ and 24.22.0 using `npm exec --package=node@22 -- node --test` and the equivalent
50
+ Node 24 command, with the exported E07 recovery and E11 selection test paths.
51
+
52
+ The existing root CI runs the exports on Node 22 and 24. The isolated runner also
53
+ executes both demos. Source-backed snippets in the guides are checked for drift.
54
+
55
+ ## Limits
56
+
57
+ The file journal is a single-process fixture, not a production database or a
58
+ cross-process/crash-safe transaction protocol. A real application owns operation
59
+ identity, persistence, key retention, reconciliation and recovery. Missing or
60
+ pending status does not authorize blind replay. No exactly-once guarantee or
61
+ rollback on timeout is supplied by Agent Native. No paid model trials, model
62
+ efficacy measurement, commercial host verification or production deployment is
63
+ claimed by these deterministic checks.
@@ -0,0 +1,50 @@
1
+ # Let a coding agent integrate Agent Native
2
+
3
+ The quickest way to make an existing website agent-native is to give a coding agent the **website repository** and a bounded, source-grounded task. Agent Native provides **application capabilities**, not a turnkey chat overlay or magic remote execution of a site.
4
+
5
+ Canonical source assets: [portable skill](../skill/agent-native/SKILL.md),
6
+ [adapter selection](../skill/agent-native/references/adapter-decision.md),
7
+ [verification](../skill/agent-native/references/verification.md),
8
+ [full prompt](../agent/agent-prompt.md), and [short prompt](../agent/agent-prompt-short.md).
9
+
10
+ For local skill installation, keep `SKILL.md` and both reference files together:
11
+
12
+ ```text
13
+ agent-native/
14
+ SKILL.md
15
+ references/
16
+ adapter-decision.md
17
+ verification.md
18
+ ```
19
+
20
+ The npm package includes this folder under
21
+ `node_modules/@uppercut-labs/agent-native/skill/agent-native/` starting in 1.0.1.
22
+ Copy the whole folder into your coding agent’s skill directory. Downloading only
23
+ `SKILL.md` requires fetching its two linked references as well. The standalone prompt
24
+ is a single file.
25
+
26
+ There are two independent instructions paths:
27
+
28
+ - **Portable Agent Native skill:** a short `SKILL.md` for agents supporting portable Agent Skills format, with optional references for adapter selection and verification. Read the skill source from the public package, or download the canonical asset from Uppercut's documentation host when that route is available.
29
+ - **Standalone agent prompt:** copy/paste text for any coding agent with repository access. It includes necessary behavior without requiring a skill/plugin installation.
30
+
31
+ **Documentation downloads:** `https://docs.uppercut-labs.com/agent-native/skill/agent-native/SKILL.md` and `https://docs.uppercut-labs.com/agent-native/agent-prompt.md`. The installed npm package and public package repository contain the same canonical assets.
32
+
33
+ ## What the agent should accomplish
34
+
35
+ 1. Read the site's repository instructions, package manifest, lockfile, actual entry points, framework/runtime, tests, auth and human workflows. Treat a user-named stack or host as an acceptance condition: verify it against these sources, explain any mismatch and follow the explicit request.
36
+ 2. Choose a real existing public read, not arbitrary generated demo logic, and create a typed capability with honest risk/access.
37
+ 3. Bind the unchanged application function in a checked registry and enforce authorization every call.
38
+ 4. Expose one real HTTP or official MCP surface with the correct runtime and optional dependencies. A static site cannot run dynamic MCP unaided.
39
+ 5. Verify one allowed call, one schema rejection before the handler, one denial/hidden path and an unchanged human UI.
40
+ 6. Report changed files, versions, observed commands/results and remaining hosting/identity responsibilities.
41
+
42
+ Do not claim that the 1.0.1 library includes a global `agent-native init` executable, production identity service, default-enabled browser WebMCP or verified commercial MCP Apps host rendering. Review [support and limitations](support-and-limitations.md).
43
+
44
+ ## If the agent only has public docs
45
+
46
+ Start with [adopt an existing site](adopt-existing-site.md), [install the published package](installation.md), and [E10 unchanged-function retrofit](https://github.com/uppercut-labs/agent-native/tree/main/examples/e10-existing-functions-retrofit). For remote operations use [HTTP](http.md) or [MCP](mcp.md) according to app runtime. For authenticated operations read [permissions and discovery](permissions-and-discovery.md), with a real trusted auth source and record policy. Never paste user tokens into chat or code.
47
+
48
+ ## What the agent does **not** gain
49
+
50
+ The skill and prompt are just text. They do not give a coding agent automatic GitHub access, credentials, permission to deploy, cross-tenant record authorization or a general hosted MCP endpoint. The integrating owner must grant the agent appropriate repository/test access separately and approve production actions. The report must distinguish a local capability run, local protocol integration and live host verification.
@@ -0,0 +1,62 @@
1
+ # Framework support
2
+
3
+ To wrap a working site’s existing operation, follow [adopt an existing site](adopt-existing-site.md).
4
+
5
+ This table records framework surfaces actually built and checked in this package. It is not a
6
+ compatibility promise for every release in a listed major version.
7
+
8
+ | Framework | Supported shape | Verified environment | Boundary |
9
+ | --- | --- | --- | --- |
10
+ | Astro | Static browser bootstrap or application-owned on-demand HTTP/MCP routes | Astro 7.3.5, `@astrojs/node` 11.1.6, Node 22.12+ fixtures | Integration installs no adapter; on-demand mode requires a supported application adapter |
11
+ | Next App Router | App-owned HTTP/MCP route factories on the Node runtime | Next 16.3.8 E03; official MCP 2.3.0 client | Experimental adapter; keep registry server-only; local fixture only |
12
+ | Cloudflare Worker sidecar (runtime) | Separate dynamic HTTP/MCP server while Astro stays static | E04 local workerd fixture; see [static sites](static-sites.md) | No deployment or DNS claim; configure Host/Origin/CORS in the sidecar |
13
+ | Hono | One Node application mounting the Web-standard HTTP and MCP handlers | Hono 4.13.12, `@hono/node-server` 2.1.3, Node 22+ E05 fixture | Loopback lab host; no provider deployment or production identity integration |
14
+
15
+ The Astro integration uses the documented `astro:config:setup` page-script injection hook and
16
+ `astro:config:done` output diagnostic. `mode: 'on-demand'` permits Astro's server build mode while
17
+ the application owns its routes and adapter; it does not create either. E01 preserves a wholly
18
+ static build. E02 preserves prerendered pages and human navigation while live `/agent-native/v1/*`
19
+ and `/mcp` routes reuse the framework-neutral HTTP/MCP handlers.
20
+
21
+ The experimental [existing-project init](getting-started.md) can patch only an Astro config with
22
+ the recognized literal static shape. It records a reviewed sidecar origin and generates a browser
23
+ entry, then verifies the built E01 site from a local package tarball. More complex Astro config,
24
+ on-demand configs, and other frameworks require manual integration. Detection reports on-demand
25
+ routes, a missing server adapter, and protocol-looking static files; it never recommends the
26
+ historical `output: 'hybrid'` value.
27
+
28
+ The browser capability host remains experimental. E01 exercises a simulated WebMCP API in Node
29
+ tests, not a real browser or agent. Other Astro releases, deployment providers, and
30
+ real-host WebMCP behavior are unverified. E02 proves only the pinned local Node standalone adapter;
31
+ it is not a claim about other adapters or external hosts.
32
+
33
+ E05 follows Hono's official Node adapter shape: the Hono router receives Fetch API requests and
34
+ `@hono/node-server` owns the Node HTTP socket. The package's `createHttpHandler` and
35
+ `createMcpHandler` remain framework-neutral and are mounted into the same Hono app. The fixture
36
+ checks HTTP and the official MCP client against one registry, binds loopback by default, and handles
37
+ SIGINT/SIGTERM and listen errors. This verifies the pinned fixture only, not every Hono release or a
38
+ deployed host.
39
+
40
+ Astro references: [integration hooks](https://docs.astro.build/en/reference/integrations-reference/)
41
+ and [ClientRouter lifecycle](https://docs.astro.build/en/guides/view-transitions/).
42
+ Hono reference: [official Node.js adapter guide](https://hono.dev/docs/getting-started/nodejs).
43
+
44
+ ## Verify the Hono mount
45
+
46
+ With Node.js 22 or newer, run `npm ci` and `npm run example:e05` from the package root.
47
+ The standalone export mounts the package HTTP and MCP handlers into one pinned Hono app:
48
+
49
+ <!-- source:examples/e05-node-cli/project/src/server.mjs#hono-routes -->
50
+ ~~~js
51
+ app.all('/agent-native/*', (context) => httpHandler(context.req.raw));
52
+ app.all('/mcp', (context) => mcpHandler(context.req.raw));
53
+ ~~~
54
+
55
+ [View tested source](https://github.com/uppercut-labs/agent-native/blob/main/examples/e05-node-cli/project/src/server.mjs#L11)
56
+ <!-- /source -->
57
+
58
+ The harness checks the ordinary HTTP result and an official MCP client call on loopback.
59
+ If the listen address is occupied, stop the other process or choose another `PORT`; the
60
+ fixture reports `server_error=address-in-use`. See the
61
+ [E05 application instructions](https://github.com/uppercut-labs/agent-native/blob/main/examples/e05-node-cli/project/README.md) for local
62
+ start, stop, and shell-only credential cleanup.
@@ -0,0 +1,109 @@
1
+ # Optional programmatic Astro static init
2
+
3
+ For the general adoption path, begin with [adopt an existing site](adopt-existing-site.md).
4
+ This optional guide handles only a narrowly recognized static Astro configuration.
5
+
6
+ The `@uppercut-labs/agent-native/init` entrypoint is available in the
7
+ `1.0.1` package. There is no `agent-native init` executable yet. Use the E01 fixture to try the current
8
+ programmatic flow from a local package tarball:
9
+
10
+ ```sh
11
+ npm ci
12
+ npm run example:e01
13
+ ```
14
+
15
+ E01 copies an existing static Astro site into a temporary directory, installs a
16
+ local tarball, applies a reviewed plan, and builds the site. It checks the
17
+ original pages, routes, assets, data, and lockfile preservation after installation.
18
+
19
+ ## Plan before applying
20
+
21
+ The supported automatic edit is intentionally narrow: an Astro project with a
22
+ single, literal `defineConfig({ output: 'static' })` configuration. Detection
23
+ reads project files as data; it does not import the site's config or business
24
+ modules. A project with multiple apps, competing lockfiles, dynamic config, or
25
+ an unsupported host receives an unresolved action instead of a guessed edit.
26
+
27
+ Detection also distinguishes pure static output from `prerender = false` on-demand routes. It
28
+ records whether the Astro config has a server adapter, diagnoses `server-adapter-missing`, and
29
+ rejects static files placed at known HTTP/MCP protocol paths. Existing on-demand projects are
30
+ manual-integration cases: init does not rewrite their adapter or endpoint routes. Select a sidecar
31
+ for a pure static site, or review same-origin endpoints and a supported adapter explicitly. Never
32
+ rewrite an Astro 7 project to the removed historical `output: 'hybrid'` mode.
33
+
34
+ After installing this source package into a disposable Astro project, a caller
35
+ can inspect the plan and then explicitly approve the same choices:
36
+
37
+ ```js
38
+ import { applyInitPlan, createInitPlan, restoreInit } from '@uppercut-labs/agent-native/init';
39
+
40
+ const projectRoot = '/absolute/path/to/existing-astro-site';
41
+ const choices = {
42
+ hosting: 'cloudflare',
43
+ routeMode: 'sidecar',
44
+ sidecarOrigin: 'https://your-worker.example',
45
+ };
46
+ const plan = await createInitPlan(projectRoot, {}, choices);
47
+ console.log(plan);
48
+
49
+ // Review detection, unresolved actions, proposed files, and choices first.
50
+ const result = await applyInitPlan(projectRoot, plan, choices, { approved: true });
51
+ console.log(result);
52
+
53
+ // Later, if the generated files are unchanged:
54
+ // await restoreInit(projectRoot);
55
+ ```
56
+
57
+ The plan digest binds detected evidence, overrides, and selected choices.
58
+ Apply rechecks that evidence and refuses a stale plan. A second init is a
59
+ no-op. Restore checks ownership and content digests before changing any file;
60
+ it reports a conflict if a generated file was edited. Keep the ownership file
61
+ at `.agent-native/ownership.json` with the project until restoration is no
62
+ longer needed.
63
+
64
+ ## What this slice creates
65
+
66
+ The installer patches the recognized Astro config to inject
67
+ `.agent-native/browser-entry.mjs` as a page script and writes
68
+ `.agent-native/init.json` with the selected mode and sidecar origin. The browser
69
+ entry emits an `agent-native:ready` event. It does not discover site functions,
70
+ register a capability, create a server route, deploy a Worker, or edit the
71
+ project's dependencies or lockfile. Bind only reviewed application operations
72
+ using the [capability guide](capabilities-and-bindings.md), and use the
73
+ [static-site guide](static-sites.md) for the separate Worker example.
74
+
75
+ After init, these steps remain yours:
76
+
77
+ 1. Install what you import: `@uppercut-labs/agent-native`, `zod@4.6.5` for the schema adapter,
78
+ and `@modelcontextprotocol/server@2.3.0` if you expose MCP ([installation](installation.md)).
79
+ 2. Define capabilities and bind them to reviewed application operations.
80
+ 3. Pass an authorization port on every execution, including public reads.
81
+ 4. Add and deploy the server route or Worker sidecar if you expose HTTP or MCP.
82
+ 5. Test discovery, one successful call and one denied or invalid call before you publish.
83
+
84
+ E01's installed after-state explicitly executes its public album lookup through the shared
85
+ registry and authorization port. Init does not generate this application code:
86
+
87
+ <!-- source:examples/e01-album-catalog/project/src/catalog.mjs#local-album-execution -->
88
+ ~~~js
89
+ /** @param {unknown} input */
90
+ export function runAlbumLookup(input) {
91
+ return executeCapability(registry, {
92
+ identity: getAlbumCapability.identity,
93
+ runtime: 'local',
94
+ input,
95
+ caller: { kind: 'anonymous' },
96
+ authorization: publicReadAuthorization,
97
+ });
98
+ }
99
+ ~~~
100
+
101
+ [View tested source](https://github.com/uppercut-labs/agent-native/blob/main/examples/e01-album-catalog/project/src/catalog.mjs#L36)
102
+ <!-- /source -->
103
+
104
+ The `npm run example:e01` export uses Node.js 22 or newer and a root `npm ci`. It builds the
105
+ static site and checks found/missing results. A malformed album slug is rejected before the
106
+ handler runs; correct the slug and retry. See the [E01 project instructions](https://github.com/uppercut-labs/agent-native/blob/main/examples/e01-album-catalog/project/README.md).
107
+
108
+ The current init API is a tested foundation for a later interactive CLI.
109
+ It is not a production deployment or a browser-agent host test.