@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.
- package/LICENSE +21 -0
- package/README.md +164 -2
- package/agent/agent-prompt-short.md +1 -0
- package/agent/agent-prompt.md +26 -0
- package/bin/agent-native-site.mjs +269 -0
- package/bin/discover-routes.mjs +162 -0
- package/bin/verify-publication.mjs +317 -0
- package/dist/adapters/zod.d.ts +4 -0
- package/dist/adapters/zod.d.ts.map +1 -0
- package/dist/adapters/zod.js +20 -0
- package/dist/adapters/zod.js.map +1 -0
- package/dist/astro.d.ts +13 -0
- package/dist/astro.d.ts.map +1 -0
- package/dist/astro.js +41 -0
- package/dist/astro.js.map +1 -0
- package/dist/auth.d.ts +52 -0
- package/dist/auth.d.ts.map +1 -0
- package/dist/auth.js +128 -0
- package/dist/auth.js.map +1 -0
- package/dist/browser.d.ts +47 -0
- package/dist/browser.d.ts.map +1 -0
- package/dist/browser.js +219 -0
- package/dist/browser.js.map +1 -0
- package/dist/cli.d.ts +80 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +484 -0
- package/dist/cli.js.map +1 -0
- package/dist/core/assert-never.d.ts +2 -0
- package/dist/core/assert-never.d.ts.map +1 -0
- package/dist/core/assert-never.js +5 -0
- package/dist/core/assert-never.js.map +1 -0
- package/dist/core/binding-internal.d.ts +10 -0
- package/dist/core/binding-internal.d.ts.map +1 -0
- package/dist/core/binding-internal.js +15 -0
- package/dist/core/binding-internal.js.map +1 -0
- package/dist/core/composition.d.ts +119 -0
- package/dist/core/composition.d.ts.map +1 -0
- package/dist/core/composition.js +545 -0
- package/dist/core/composition.js.map +1 -0
- package/dist/core/contracts.d.ts +55 -0
- package/dist/core/contracts.d.ts.map +1 -0
- package/dist/core/contracts.js +271 -0
- package/dist/core/contracts.js.map +1 -0
- package/dist/core/diagnostics.d.ts +14 -0
- package/dist/core/diagnostics.d.ts.map +1 -0
- package/dist/core/diagnostics.js +29 -0
- package/dist/core/diagnostics.js.map +1 -0
- package/dist/core/executor.d.ts +52 -0
- package/dist/core/executor.d.ts.map +1 -0
- package/dist/core/executor.js +98 -0
- package/dist/core/executor.js.map +1 -0
- package/dist/core/registry.d.ts +37 -0
- package/dist/core/registry.d.ts.map +1 -0
- package/dist/core/registry.js +75 -0
- package/dist/core/registry.js.map +1 -0
- package/dist/core/schema.d.ts +9 -0
- package/dist/core/schema.d.ts.map +1 -0
- package/dist/core/schema.js +36 -0
- package/dist/core/schema.js.map +1 -0
- package/dist/discovery.d.ts +16 -0
- package/dist/discovery.d.ts.map +1 -0
- package/dist/discovery.js +23 -0
- package/dist/discovery.js.map +1 -0
- package/dist/doctor.d.ts +200 -0
- package/dist/doctor.d.ts.map +1 -0
- package/dist/doctor.js +287 -0
- package/dist/doctor.js.map +1 -0
- package/dist/harness-codex.d.ts +17 -0
- package/dist/harness-codex.d.ts.map +1 -0
- package/dist/harness-codex.js +485 -0
- package/dist/harness-codex.js.map +1 -0
- package/dist/harness-mcp-bridge.d.ts +14 -0
- package/dist/harness-mcp-bridge.d.ts.map +1 -0
- package/dist/harness-mcp-bridge.js +159 -0
- package/dist/harness-mcp-bridge.js.map +1 -0
- package/dist/harness.d.ts +72 -0
- package/dist/harness.d.ts.map +1 -0
- package/dist/harness.js +101 -0
- package/dist/harness.js.map +1 -0
- package/dist/http.d.ts +20 -0
- package/dist/http.d.ts.map +1 -0
- package/dist/http.js +537 -0
- package/dist/http.js.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/init.d.ts +73 -0
- package/dist/init.d.ts.map +1 -0
- package/dist/init.js +1039 -0
- package/dist/init.js.map +1 -0
- package/dist/mcp-apps.d.ts +9 -0
- package/dist/mcp-apps.d.ts.map +1 -0
- package/dist/mcp-apps.js +171 -0
- package/dist/mcp-apps.js.map +1 -0
- package/dist/mcp-core.d.ts +64 -0
- package/dist/mcp-core.d.ts.map +1 -0
- package/dist/mcp-core.js +358 -0
- package/dist/mcp-core.js.map +1 -0
- package/dist/mcp.d.ts +3 -0
- package/dist/mcp.d.ts.map +1 -0
- package/dist/mcp.js +2 -0
- package/dist/mcp.js.map +1 -0
- package/dist/next-browser.d.ts +14 -0
- package/dist/next-browser.d.ts.map +1 -0
- package/dist/next-browser.js +14 -0
- package/dist/next-browser.js.map +1 -0
- package/dist/next.d.ts +24 -0
- package/dist/next.d.ts.map +1 -0
- package/dist/next.js +28 -0
- package/dist/next.js.map +1 -0
- package/dist/package-version.d.ts +2 -0
- package/dist/package-version.d.ts.map +1 -0
- package/dist/package-version.js +3 -0
- package/dist/package-version.js.map +1 -0
- package/dist/publication.d.ts +115 -0
- package/dist/publication.d.ts.map +1 -0
- package/dist/publication.js +441 -0
- package/dist/publication.js.map +1 -0
- package/dist/registry.d.ts +3 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +2 -0
- package/dist/registry.js.map +1 -0
- package/docs/adopt-existing-site.md +189 -0
- package/docs/browser.md +70 -0
- package/docs/capabilities-and-bindings.md +141 -0
- package/docs/cli.md +88 -0
- package/docs/compatibility.md +32 -0
- package/docs/composition-and-versioning.md +113 -0
- package/docs/doctor-and-troubleshooting.md +58 -0
- package/docs/evidence/GHSA-ch52-4w7c-c8xp-2026-10-03.md +17 -0
- package/docs/evidence/GHSA-ch52-4w7c-c8xp-2026-10-10.md +30 -0
- package/docs/evidence/GHSA-ch52-4w7c-c8xp-2026-10-12.md +10 -0
- package/docs/evidence/UAN-002-house-style-review.md +29 -0
- package/docs/evidence/UAN-007-astro.md +43 -0
- package/docs/evidence/UAN-008-worker-sidecar.md +56 -0
- package/docs/evidence/UAN-009-init.md +43 -0
- package/docs/evidence/UAN-010-auth.md +17 -0
- package/docs/evidence/UAN-011-discovery.md +18 -0
- package/docs/evidence/UAN-012-mcp-apps.md +14 -0
- package/docs/evidence/UAN-013-astro-on-demand.md +47 -0
- package/docs/evidence/UAN-014-next.md +57 -0
- package/docs/evidence/UAN-015-node-hono.md +69 -0
- package/docs/evidence/UAN-016-composition.md +52 -0
- package/docs/evidence/UAN-017-version-migrations.md +50 -0
- package/docs/evidence/UAN-018-surface-overrides.md +30 -0
- package/docs/evidence/UAN-019-doctor.md +19 -0
- package/docs/evidence/UAN-020-negative-security-fixtures.md +61 -0
- package/docs/evidence/UAN-020-operational-failure-safety.md +49 -0
- package/docs/evidence/UAN-021-docs-coverage.md +30 -0
- package/docs/evidence/UAN-022-cross-platform-license-notices.md +39 -0
- package/docs/evidence/UAN-022-overhead-license-audit.md +233 -0
- package/docs/evidence/UAN-022-package-portability.md +54 -0
- package/docs/evidence/UAN-023-commercial-agent-hosts.md +36 -0
- package/docs/evidence/UAN-023-inspector-host-probe.md +37 -0
- package/docs/evidence/UAN-023-inspector-web-and-astro-adoption.md +44 -0
- package/docs/evidence/UAN-023-native-webmcp-chrome.md +44 -0
- package/docs/evidence/UAN-024-release-readiness-2026-10-10.md +33 -0
- package/docs/evidence/UAN-024-release-readiness.md +41 -0
- package/docs/evidence/codex-harness.md +56 -0
- package/docs/evidence/gate-2-domain-expansion.md +35 -0
- package/docs/evidence/recovery-and-selection-recipes-2026-10-15.md +63 -0
- package/docs/for-agents.md +50 -0
- package/docs/frameworks.md +62 -0
- package/docs/getting-started.md +109 -0
- package/docs/harness-codex.md +117 -0
- package/docs/harness-mcp-bridge.md +30 -0
- package/docs/http.md +80 -0
- package/docs/installation.md +95 -0
- package/docs/mcp-apps.md +57 -0
- package/docs/mcp.md +178 -0
- package/docs/next.md +73 -0
- package/docs/permissions-and-discovery.md +58 -0
- package/docs/programmatic-harness.md +88 -0
- package/docs/readability-frameworks.md +18 -0
- package/docs/reference.md +161 -0
- package/docs/release-handoff.md +41 -0
- package/docs/site-publication.md +85 -0
- package/docs/stability.md +53 -0
- package/docs/static-sites.md +141 -0
- package/docs/support-and-limitations.md +20 -0
- package/docs/surfaces.md +27 -0
- package/docs/upgrading-to-1.0.md +26 -0
- package/package.json +188 -4
- package/skill/agent-native/SKILL.md +54 -0
- package/skill/agent-native/references/adapter-decision.md +19 -0
- package/skill/agent-native/references/verification.md +25 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Doctor, inspect, and authorized list
|
|
2
|
+
|
|
3
|
+
To wrap a working site’s existing operation, follow [adopt an existing site](adopt-existing-site.md).
|
|
4
|
+
|
|
5
|
+
The experimental `@uppercut-labs/agent-native/doctor` entrypoint provides read-only diagnostic building blocks. Applications supply checks and observations; the package does not discover credentials, probe a host, modify project files, or invoke capability handlers on its own. It is published in `1.0.0` and remains experimental; the stable core and surface entry points are listed in [stability](stability.md).
|
|
6
|
+
|
|
7
|
+
## Machine report and exits
|
|
8
|
+
|
|
9
|
+
`runDoctor(checks, { profile })` returns a `uan.doctor-report/v1` report. `DOCTOR_REPORT_JSON_SCHEMA` describes its closed JSON shape. Every finding has a stable `checkId`, target, status, severity, timestamp, evidence kind and source, a location and references, an explanation, and a concrete next action. A profile names the selected and required check IDs, so a local-only pass cannot be confused with network or host verification.
|
|
10
|
+
|
|
11
|
+
| Exit | Meaning |
|
|
12
|
+
| --- | --- |
|
|
13
|
+
| `0` | Selected checks have no failures or required unknown/skipped findings. |
|
|
14
|
+
| `1` | At least one selected check failed. |
|
|
15
|
+
| `2` | Invalid check or profile configuration (`DoctorUsageError`). |
|
|
16
|
+
| `3` | No selected check failed, but a required check is unknown or skipped. |
|
|
17
|
+
|
|
18
|
+
An observer exception produces an `unknown` finding without copying its error text into the report. The caller should log private diagnostics through its own protected channel if needed. Evidence source distinguishes `fixture`, `mock`, and `real-host`; a configured value or loopback fixture is not real-host behavior evidence.
|
|
19
|
+
|
|
20
|
+
## Inspect and list
|
|
21
|
+
|
|
22
|
+
`inspectCapabilityRegistry(registry)` returns the effective definitions and bindings without running handlers. `listAuthorizedCapabilities(registry, { surface, exposure, authorize })` filters by the requested surface, compatible binding, discovery policy, and authorization. It does not grant access to protected capabilities or bypass execution-time authorization.
|
|
23
|
+
|
|
24
|
+
## Reproduce the local fault lab
|
|
25
|
+
|
|
26
|
+
From the repository root, run `npm run example:e11` for a fresh tarball install and eight fault/repair scenarios. In the exported E11 project, `node src/cli.mjs doctor missing-binding --repaired --profile local` selects six configuration and artifact checks, makes no network request, and exits `0`. The default `full` profile requires two more network checks. Without `--probe-loopback`, those checks are skipped and a repaired fixture exits `3`; no endpoint is `unknown` and also exits `3`. The example README explains the optional loopback health fixture and its exact commands. No default check calls the destructive canary.
|
|
27
|
+
|
|
28
|
+
A real deployment needs its own check implementations, trusted identity provider, endpoint, and evidence collection. E11 does not certify a browser, commercial MCP host, or production credential.
|
|
29
|
+
|
|
30
|
+
See [permissions and discovery](permissions-and-discovery.md), [fixture compatibility](compatibility.md), and the [E11 example README](https://github.com/uppercut-labs/agent-native/blob/main/examples/e11-diagnostics-fault-lab/project/README.md).
|
|
31
|
+
|
|
32
|
+
## Source-backed profile selection
|
|
33
|
+
|
|
34
|
+
With Node.js 22 or newer, run `npm ci` and `npm run example:e11` from the package root.
|
|
35
|
+
The fixture defines its local and full required-check profiles in source:
|
|
36
|
+
|
|
37
|
+
<!-- source:examples/e11-diagnostics-fault-lab/project/src/doctor.mjs#doctor-profiles -->
|
|
38
|
+
~~~js
|
|
39
|
+
export const E11_DOCTOR_PROFILES = Object.freeze({
|
|
40
|
+
local: Object.freeze({
|
|
41
|
+
id: 'local',
|
|
42
|
+
selectedCheckIds: Object.freeze(LOCAL_CHECK_IDS),
|
|
43
|
+
requiredCheckIds: Object.freeze([...LOCAL_CHECK_IDS]),
|
|
44
|
+
}),
|
|
45
|
+
full: Object.freeze({
|
|
46
|
+
id: 'full',
|
|
47
|
+
selectedCheckIds: Object.freeze(FULL_CHECK_IDS),
|
|
48
|
+
requiredCheckIds: Object.freeze([...FULL_CHECK_IDS]),
|
|
49
|
+
}),
|
|
50
|
+
});
|
|
51
|
+
~~~
|
|
52
|
+
|
|
53
|
+
[View tested source](https://github.com/uppercut-labs/agent-native/blob/main/examples/e11-diagnostics-fault-lab/project/src/doctor.mjs#L30)
|
|
54
|
+
<!-- /source -->
|
|
55
|
+
|
|
56
|
+
A repaired fixture under `--profile local` exits 0; the same fixture under the default
|
|
57
|
+
full profile exits 3 until the optional loopback endpoint checks are actually run. An unknown
|
|
58
|
+
scenario fails before creating a sandbox. See [E11 commands and sandbox cleanup](https://github.com/uppercut-labs/agent-native/blob/main/examples/e11-diagnostics-fault-lab/project/README.md).
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Astro cache advisory review (2026-10-03)
|
|
2
|
+
|
|
3
|
+
Source snapshot: public `main` at `79f7e4ea8324ed616d83c04715a1eaf4dd175144`. Review ran in an isolated macOS clone with Node.js 25.9.0 and npm; this is a dependency/source review, not a deployed attack test. No release dependency was changed.
|
|
4
|
+
|
|
5
|
+
## Dependency and affected surface
|
|
6
|
+
|
|
7
|
+
`npm explain http-cache-semantics` resolves `astro@7.3.5 -> http-cache-semantics@4.2.0`. The root lockfile marks this path `dev: true`; the package declares Astro as an optional peer, not a hard runtime dependency. E02's `site-before` lockfile and generated project's package template explicitly use Astro 7.3.5. In the isolated clone, `npm audit --omit=dev --json` found zero root production vulnerabilities, while the full root audit reported two high findings and the E02 baseline audit reported three high findings, including this advisory. The other findings were outside this review.
|
|
8
|
+
|
|
9
|
+
The [reviewed GitHub advisory](https://github.com/advisories/GHSA-ch52-4w7c-c8xp) covers versions through 4.2.0 and lists no patched version. It describes an attacker-controlled `Cache-Control: max-stale` request causing a shared cache to reuse a security-restricted response through `satisfiesWithoutRevalidation()`, potentially exposing another user's cached response or cookie. `npm view http-cache-semantics version` returned 4.2.0 on the review date. [Upstream fix PR #58](https://github.com/kornelski/http-cache-semantics/pull/58) was open. npm audit suggested Astro 2.10.9 as a semver-major change; it is not a compatible fix for the Astro 7 example or integration.
|
|
10
|
+
|
|
11
|
+
Inspection of the installed Astro 7.3.5 distribution found one import of this library, in `dist/assets/build/remote.js`. That code calls `storable()` and `timeToLive()` to calculate remote-image expiry; it does not call `satisfiesWithoutRevalidation()`. A search of Astro's installed `dist` found no call to the vulnerable method. E02's checked-in source uses no Astro remote-image API. These observations do not prove that other applications, caches, or future Astro versions cannot reach the vulnerable behavior.
|
|
12
|
+
|
|
13
|
+
## Release decision and recheck
|
|
14
|
+
|
|
15
|
+
This advisory is recorded as an Astro development/example dependency warning. On the inspected source path it is not a demonstrated core package exploit and does not by itself block a core npm release candidate. Do not override the dependency with an unreleased PR or downgrade the example to Astro 2. Recheck the upstream advisory and installed Astro call sites before publishing the example as a production deployment guide, and update the lockfiles when a supported patched release exists. Applications using their own shared cache must assess that cache separately.
|
|
16
|
+
|
|
17
|
+
Evidence commands: `npm explain http-cache-semantics`, `npm audit --omit=dev --json`, `npm audit --json` in the root and E02 baseline, `npm view http-cache-semantics version`, and a source search for `http-cache-semantics` and `satisfiesWithoutRevalidation` under installed `node_modules/astro/dist`.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Astro cache advisory recheck (2026-10-10)
|
|
2
|
+
|
|
3
|
+
This page rechecks the [2026-10-03 review](GHSA-ch52-4w7c-c8xp-2026-10-03.md). It is a dependency and source review, not a test against a deployed cache.
|
|
4
|
+
|
|
5
|
+
## Upstream state
|
|
6
|
+
|
|
7
|
+
- `gh api /advisories/GHSA-ch52-4w7c-c8xp` still lists `http-cache-semantics <= 4.2.0` as vulnerable and gives no patched version. The advisory was last updated 2026-10-02.
|
|
8
|
+
- Upstream fix [PR #58](https://github.com/kornelski/http-cache-semantics/pull/58) was closed without merging on 2026-10-04. The maintainer's comment disputes the report: data private to one user should use `Cache-Control: private`.
|
|
9
|
+
- `http-cache-semantics@4.3.0` was published on 2026-10-04. Comparing the published 4.2.0 and 4.3.0 `index.js` files shows changes only to `Vary` matching, inherited-property checks and a new response `status()` accessor. The `max-stale` branch in `evaluateRequest()` is unchanged. Because 4.3.0 falls outside the advisory's version range, `npm audit` would stop reporting it, but the behavior the advisory describes is unchanged.
|
|
10
|
+
- `astro@7.3.8` is current and depends on `http-cache-semantics@^4.2.0`. In its published `dist`, the library is imported only by `assets/build/remote.js`. That file calls only `storable()` and `timeToLive()` to compute remote-image expiry. It does not call `satisfiesWithoutRevalidation()` or `evaluateRequest()`.
|
|
11
|
+
|
|
12
|
+
## Decision
|
|
13
|
+
|
|
14
|
+
The repository and example lockfiles stay on `astro@7.3.5` and `http-cache-semantics@4.2.0`. Moving to 4.3.0 would silence the audit finding without changing the reported behavior, which would be a misleading green check. Agent Native and its Astro examples never let `http-cache-semantics` answer requests from a shared cache. Astro, the only consumer, uses the library to compute how long remote images may be cached, not to decide whether a cached response may be reused.
|
|
15
|
+
|
|
16
|
+
This closes the Astro advisory gate for the `0.1.1` preview, with the following limits:
|
|
17
|
+
|
|
18
|
+
- The core and browser package has no dependency on `http-cache-semantics`.
|
|
19
|
+
- The Astro integration and examples use only build-time image expiry, which is outside the reported path.
|
|
20
|
+
- An application that runs its own shared HTTP cache on `http-cache-semantics` must evaluate the `max-stale` behavior itself and mark per-user responses `Cache-Control: private`.
|
|
21
|
+
|
|
22
|
+
Recheck when the advisory changes its range, when Astro changes its use of the library, or before a provider launch guide is published.
|
|
23
|
+
|
|
24
|
+
Evidence commands:
|
|
25
|
+
|
|
26
|
+
- `gh api /advisories/GHSA-ch52-4w7c-c8xp`
|
|
27
|
+
- `gh api repos/kornelski/http-cache-semantics/pulls/58` and its comments
|
|
28
|
+
- `npm view http-cache-semantics versions` and `npm view astro@7.3.8 dependencies.http-cache-semantics`
|
|
29
|
+
- `npm pack` of both `http-cache-semantics` versions, followed by a `diff` of `index.js`
|
|
30
|
+
- `npm pack astro@7.3.8`, followed by `grep` for `http-cache-semantics`, `satisfiesWithoutRevalidation` and `evaluateRequest` under `dist`
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Astro cache advisory recheck for 1.0.0 (2026-10-12)
|
|
2
|
+
|
|
3
|
+
This page rechecks the [2026-10-10 review](GHSA-ch52-4w7c-c8xp-2026-10-10.md) for the 1.0.0 candidate.
|
|
4
|
+
|
|
5
|
+
- `gh api advisories/GHSA-ch52-4w7c-c8xp`: still severity high, vulnerable range `<= 4.2.0`, no patched version, not withdrawn, last updated 2026-10-02. Nothing changed since the previous review.
|
|
6
|
+
- `npm view http-cache-semantics version`: 4.3.0, published 2026-10-04, the same release the previous review compared.
|
|
7
|
+
- `npm view astro version`: 7.3.8, with `http-cache-semantics@^4.2.0`. In `npm pack astro@7.3.8`, only `dist/assets/build/remote.js` uses the library, through `storable()` and `timeToLive()` for build-time remote-image expiry. Nothing calls `satisfiesWithoutRevalidation` or `evaluateRequest`.
|
|
8
|
+
- `npm audit --omit=dev` on the package: zero vulnerabilities. The package has no runtime dependencies. The full tree reports only this advisory, through the `astro@7.3.5` development and example dependency.
|
|
9
|
+
|
|
10
|
+
**Decision:** the previous decision holds for 1.0.0. Agent Native and its Astro examples never let `http-cache-semantics` answer requests from a shared cache. An application that runs its own shared HTTP cache on that library must evaluate `max-stale` itself and mark per-user responses `Cache-Control: private`.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# UAN-002 house TypeScript style review
|
|
2
|
+
|
|
3
|
+
Reviewed 2026-10-10 against the owner's [TypeScript house guide](https://starter.devthomas.site/style/TypeScript) (version 1.0.0, updated 2026-09-23). The scope was all owned TypeScript in `src/` (about 6,900 lines). The examples contain no `.ts`/`.tsx` sources: their callbacks are `.mjs` with JSDoc types, which this TypeScript-only guide does not cover. The emitted Astro `export default defineConfig(...)` template in `src/init.ts` is third-party framework output and stays as Astro requires.
|
|
4
|
+
|
|
5
|
+
## Deviations found and changed
|
|
6
|
+
|
|
7
|
+
| Guide rule | Before | After |
|
|
8
|
+
| --- | --- | --- |
|
|
9
|
+
| Maximum practical compiler strictness | `noImplicitReturns` missing from the baseline | Added to `tsconfig.json`; no errors resulted |
|
|
10
|
+
| Avoid lint rules that rewrite intentional `let` | Biome `recommended` enabled `style/useConst` | `style/useConst` is off. `complexity/useLiteralKeys` is also off, because it contradicts `noPropertyAccessFromIndexSignature` bracket access. The rest of `recommended` remains |
|
|
11
|
+
| `const` means immutable; `let` means mutable | Collections were held in `const` bindings and then pushed to or set | Mutated bindings use `let`. Never-mutated ones keep `const` with `readonly T[]`, `ReadonlySet`, `ReadonlyMap` or `Readonly<Record<…>>` |
|
|
12
|
+
| No non-null assertions | 10 postfix `!` in `src/init.ts` | Replaced with visible `requireAt`/`requireValue` helpers. Each value was already established, so behavior is unchanged |
|
|
13
|
+
| Shared `assertNever` | Owned-union switches over execution failures and harness events had no compile-time exhaustiveness | `src/core/assert-never.ts` (internal) closes the switches in `http.ts`, `mcp.ts` and `browser.ts`. `harness.ts` uses a local `never` guard that keeps its `HarnessError` for untrusted input |
|
|
14
|
+
| Explicit types by default; explicit callback types | Locals, callbacks, default-valued parameters and some helpers relied on inference | About 460 locals were annotated with the types tsc inferred, plus callback parameters and returns, default-valued parameters and class fields. Async functions declare `Promise<T>`, and `runTurn` declares its `AsyncGenerator` type. A few internal aliases name repeated shapes |
|
|
15
|
+
| `interface` for implementation contracts | `HarnessMcpBridge`, `BrowserCapabilityAdapter`, `WebMcpModelContext`, `NextBrowserBootstrap` and `McpAppRegistration` were object `type`s | Now interfaces. This is structural and source-compatible for consumers |
|
|
16
|
+
|
|
17
|
+
The emitted declaration files were compared with a build of the previous source. Exported names, signatures and value types are unchanged apart from equivalent spellings.
|
|
18
|
+
|
|
19
|
+
## Deliberate exceptions
|
|
20
|
+
|
|
21
|
+
- `PACKAGE_VERSION` stays unannotated because `scripts/check-package-version.mjs` matches that exact line.
|
|
22
|
+
- `DOCTOR_REPORT_SCHEMA_VERSION` and `DOCTOR_REPORT_JSON_SCHEMA` keep their inferred types. Annotating them would change exported literal types.
|
|
23
|
+
- `as const`/`satisfies` precision sites stay as they are, which the guide allows.
|
|
24
|
+
- `HarnessEvent` is a released public union discriminated by `type` rather than `kind`. Renaming it would break the 0.1.1 API, so it is left for a future major version.
|
|
25
|
+
- Remaining `void promise.catch(handler)` calls use handlers that cannot throw, which the guide accepts.
|
|
26
|
+
|
|
27
|
+
## Verification
|
|
28
|
+
|
|
29
|
+
`npm run format:check`, `npm run lint`, `npm run typecheck` (all three tsconfig projects), `npm run build:browser-proof` and the full unit suite pass. That includes 124 non-harness tests and 6/6 Codex harness tests. The full `npm run check` and the isolated-export check repeat these on the committed source.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# UAN-007 Astro static integration evidence
|
|
2
|
+
|
|
3
|
+
## Fixture and before-state
|
|
4
|
+
|
|
5
|
+
The tracked pre-integration site at `examples/e01-album-catalog/site-before` is an Astro 7.3.5
|
|
6
|
+
static project with home, albums, and about pages; shared site layout and navigation; public album
|
|
7
|
+
data; CSS; and SVG mark. `baseline-manifest.json` contains SHA-256 hashes for its project config,
|
|
8
|
+
pages, data, and assets. The E01 check rebuilds that fixture before packaging and confirms the
|
|
9
|
+
integrated project retained byte-identical layout, home/about pages, data, CSS, and SVG. The album
|
|
10
|
+
page adds the human search form and browser capability bootstrap.
|
|
11
|
+
|
|
12
|
+
## Verification
|
|
13
|
+
|
|
14
|
+
Run `npm run example:e01` from the package root. It builds the baseline static project from a
|
|
15
|
+
temporary copy, builds/packs the package, installs the package into the standalone fixture, executes
|
|
16
|
+
the example tests, then builds and verifies the integrated static output. The checks cover:
|
|
17
|
+
|
|
18
|
+
- Static `index.html`, `albums/index.html`, and `about/index.html`, preserved navigation,
|
|
19
|
+
public album content, CSS, and SVG.
|
|
20
|
+
- Astro static output diagnostics and rejection of server output; no adapter is installed.
|
|
21
|
+
- Shared album lookup through local execution, the browser registry, and the page fixture.
|
|
22
|
+
- Astro ClientRouter page-load resync, before-swap revocation, repeat-install deduplication,
|
|
23
|
+
unsupported-WebMCP human search, Window pagehide, and back-forward cache pageshow re-entry.
|
|
24
|
+
- Browser bundle exclusion checks for the HTTP and official MCP server adapters.
|
|
25
|
+
|
|
26
|
+
The WebMCP API and Astro lifecycle are simulated in Node tests. Astro's production static build is
|
|
27
|
+
real. No graphical browser, real WebMCP implementation, agent host, deployment provider, or
|
|
28
|
+
lilgohan.com site was tested or changed. This fixture makes no production-hosting assumption.
|
|
29
|
+
|
|
30
|
+
## Dependency audit limit
|
|
31
|
+
|
|
32
|
+
The fixture pins `astro@7.3.5`, which resolves `http-cache-semantics@4.2.0`. On 2026-10-02,
|
|
33
|
+
`npm audit` reports GHSA-ch52-4w7c-c8xp as high severity for that transitive package. The root
|
|
34
|
+
development tree reports two high findings (Astro and the transitive cache package); the standalone
|
|
35
|
+
Astro fixture reports three because Agent Native's optional Astro peer is also associated with the
|
|
36
|
+
same Astro finding. `npm audit --omit=dev` on the package root reports zero vulnerabilities, and
|
|
37
|
+
the package tarball does not bundle Astro. However, Astro consumers install Astro as their own
|
|
38
|
+
dependency and may encounter the affected transitive package.
|
|
39
|
+
|
|
40
|
+
The registry has no patched `http-cache-semantics` release above 4.2.0 at this check; npm's
|
|
41
|
+
suggested Astro 2.10.9 downgrade is a breaking major rollback and was not applied. No override was
|
|
42
|
+
added without a patched version to target. Release remains gated on resolving the upstream advisory
|
|
43
|
+
or an explicit risk decision.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# UAN-008 Cloudflare Worker sidecar evidence
|
|
2
|
+
|
|
3
|
+
## Scope
|
|
4
|
+
|
|
5
|
+
E04 is a separate Worker sidecar for E01's static Astro catalog. The exporter copies E01's
|
|
6
|
+
canonical public album data, shared capability contract, and sidecar diagnostics into an isolated
|
|
7
|
+
Worker fixture. Browser and Worker bind the same definition, schema, lookup function, and data;
|
|
8
|
+
parity tests verify contract identity and input/output schemas. A SHA-256 revision is derived from
|
|
9
|
+
JSON-serialized ordered album records, and the E01 test recomputes it. Wrangler configuration is
|
|
10
|
+
checked against the shared revision.
|
|
11
|
+
|
|
12
|
+
The Worker delegates HTTP/OpenAPI and MCP to package adapters. It uses Web Request/Response APIs,
|
|
13
|
+
bounded adapter bodies/deadlines, explicit SIDECAR_HOST and ALLOWED_ORIGIN configuration, Host and
|
|
14
|
+
browser-Origin checks, and exact ACAO for the configured origin for browser health/HTTP diagnostics. Cross-origin browser MCP is not claimed; the official MCP client fixture sends no browser Origin. It exposes only the public-read
|
|
15
|
+
album capability.
|
|
16
|
+
|
|
17
|
+
## Verification
|
|
18
|
+
|
|
19
|
+
Run npm run example:e04 from the repository root. The exporter installs the standalone fixture,
|
|
20
|
+
runs 9 diagnostic/config/contract tests, then runs Wrangler locally on workerd. Local requests
|
|
21
|
+
exercise matching catalog health, OpenAPI, an HTTP invocation, exact-origin ACAO/preflight, denied
|
|
22
|
+
Origin and Host, and an official MCP SDK client discovery/call. The client records negotiated MCP
|
|
23
|
+
protocol 2025-11-25. The HTTP and MCP success paths are real local workerd exchanges; the sidecar
|
|
24
|
+
origin, missing same-origin route, missing binding, and revision mismatch classifier cases are
|
|
25
|
+
simulated/unit requests.
|
|
26
|
+
|
|
27
|
+
The same command runs Wrangler deploy --dry-run --outdir .worker-bundle. It scans all emitted JS
|
|
28
|
+
files for Node builtin import/require specifiers and verifies the Wrangler config does not enable
|
|
29
|
+
nodejs_compat. The dry-run builds and inspects only; it does not deploy. Operators can start local workerd with npx wrangler dev --local. A later, separately approved release would use npx wrangler deploy only after setting the actual host/origin/revision values and Cloudflare account; no live deployment was performed.
|
|
30
|
+
|
|
31
|
+
E01's before-state fixture and integrated site both build as Astro static output with no server
|
|
32
|
+
adapter. Its generated album page carries the shared revision. Browser sidecar diagnostics refresh
|
|
33
|
+
after Astro ClientRouter navigation and Window pageshow, deduplicate installation, and probe the
|
|
34
|
+
same-origin /mcp path only when same-origin routing is explicitly configured.
|
|
35
|
+
|
|
36
|
+
## Limits
|
|
37
|
+
|
|
38
|
+
Evidence is local workerd execution. No Cloudflare production deploy, account provisioning, paid
|
|
39
|
+
resource, DNS change, custom host, real browser, or production CORS behavior was performed or
|
|
40
|
+
verified. The fixture's SIDECAR_HOST, ALLOWED_ORIGIN, and public Astro environment values are local
|
|
41
|
+
examples and must be replaced for an operator's hosts. A sidecar URL does not create a same-origin
|
|
42
|
+
/mcp route. Cross-origin browser MCP is not claimed; the official MCP SDK fixture is server-side
|
|
43
|
+
and sends no browser Origin.
|
|
44
|
+
|
|
45
|
+
The SHA-256 revision is exposed in the static page and Worker health response. It is checked from
|
|
46
|
+
ordered public album JSON in tests rather than computed dynamically in browser runtime. These
|
|
47
|
+
diagnostic tests are simulated; the HTTP and MCP exchange against local workerd is real.
|
|
48
|
+
|
|
49
|
+
The Astro 7.3.5 transitive http-cache-semantics@4.2.0 advisory and release gate documented in
|
|
50
|
+
UAN-007 evidence remain unresolved. Astro is not bundled in the core tarball, but Astro consumers
|
|
51
|
+
may install the affected dependency.
|
|
52
|
+
|
|
53
|
+
## References
|
|
54
|
+
|
|
55
|
+
- Cloudflare Wrangler configuration: https://developers.cloudflare.com/workers/wrangler/configuration/
|
|
56
|
+
- Cloudflare local development: https://developers.cloudflare.com/workers/wrangler/commands/#dev
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# UAN-009 existing-project init evidence
|
|
2
|
+
|
|
3
|
+
The programmatic `@uppercut-labs/agent-native/init` entrypoint was implemented in
|
|
4
|
+
[`638d79f`](https://github.com/uppercut-labs/agent-native/commit/638d79f76c40a94ed728010e689db69b86e21ae4)
|
|
5
|
+
and its cross-version fixture check was corrected in
|
|
6
|
+
[`19e108f`](https://github.com/uppercut-labs/agent-native/commit/19e108f3e4fcd8fffade0295a964d1cc99f78d02).
|
|
7
|
+
Builds and fixture runs used `research` over SSH, with Node 25.9.0 and npm
|
|
8
|
+
11.12.1. [GitHub CI run 37092885820](https://github.com/uppercut-labs/agent-native/actions/runs/37092885820)
|
|
9
|
+
passed the package check and pack dry run on Node 22 and 24.
|
|
10
|
+
|
|
11
|
+
## Verified behavior
|
|
12
|
+
|
|
13
|
+
- `npm run check` passed format, lint, typecheck, browser bundle proof, 59 root
|
|
14
|
+
tests (including nine init tests), and the E01/E12/E05/E06/E04 example checks.
|
|
15
|
+
- `npm run example:e01` copied an existing Astro static site into a path with
|
|
16
|
+
spaces, installed a fresh local tarball, applied an approved plan, and built
|
|
17
|
+
three static pages. The emitted browser JavaScript included the init ready
|
|
18
|
+
event and selected sidecar origin. Existing page data, navigation, CSS, SVG,
|
|
19
|
+
and non-server output remained intact. The fixture snapshots the lockfile
|
|
20
|
+
after tarball installation and confirms init leaves it byte-identical.
|
|
21
|
+
- Init tests cover ambiguous app roots, competing lockfiles, dynamic config,
|
|
22
|
+
unsupported hosting, an existing `/mcp` route, path and symlink refusal,
|
|
23
|
+
stale plans, interruption before and after the Astro config write, rerun
|
|
24
|
+
no-op, manifest tampering, and conflict-aware restoration.
|
|
25
|
+
- `npm pack --dry-run --json` included `dist/init.js` in a 73-file package.
|
|
26
|
+
The package remains `private: true` at version `0.0.0`.
|
|
27
|
+
|
|
28
|
+
## Boundaries
|
|
29
|
+
|
|
30
|
+
Automatic config rewriting supports only the exact literal Astro static
|
|
31
|
+
template tested by E01. The exported flow is a JavaScript API, not a package
|
|
32
|
+
`init` executable. It records a selected sidecar origin and injects a browser
|
|
33
|
+
entry that signals readiness; it does not infer or register business
|
|
34
|
+
capabilities, install dependencies, create `/mcp`, deploy a Worker, or verify
|
|
35
|
+
an actual browser-agent host. E10 and E11 full standalone examples remain
|
|
36
|
+
future slices; this ticket tests their init failure cases with disposable
|
|
37
|
+
fixtures.
|
|
38
|
+
|
|
39
|
+
File checks guard normal edits and interruptions, but a concurrent external
|
|
40
|
+
writer can still change a target in the instant between its final hash check
|
|
41
|
+
and rename or removal. Pause other writers while applying or restoring. Astro
|
|
42
|
+
fixture installation still reports high severity transitive advisories;
|
|
43
|
+
dependency review remains a public release gate. No npm publication occurred.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# UAN-010: Trusted authentication and durable grants
|
|
2
|
+
|
|
3
|
+
## Scope
|
|
4
|
+
|
|
5
|
+
This slice adds `TrustedPrincipal`, `GrantStorePort`, `createGrantAuthorization`, `hasGrantForScopes` and `executionCallerForPrincipal` to the portable root API. The MCP adapter uses the official server SDK bearer gate when configured, maps verifier-owned identity through a host callback, and permits protected discovery only through an explicit callback. The E07 disposable playlist fixture supplies a local JSON grant store and static test verifier. It is not a production identity provider or grant database.
|
|
6
|
+
|
|
7
|
+
## Local evidence
|
|
8
|
+
|
|
9
|
+
On `research` with Node 25.9.0 and npm 11.12.1, `npm run check` completed successfully. That command includes format, lint, TypeScript checks, browser import boundary, root tests and standalone E01/E12/E05/E06/E04/E07 checks. `npm run example:e07` built and packed the package, installed a standalone project from the local tarball, ran its official SDK client/server tests, and printed the public sample playlist from its runnable demo.
|
|
10
|
+
|
|
11
|
+
Auth tests deny reduced token scopes, mismatched caller, expired principal or grant, revoked grant, wrong audience and cross-tenant record access before a binding runs. E07 tests anonymous public discovery, hidden protected tools before a grant, repeated edit calls, grant reuse after process restart, separate delete scope, two tenants, wrong issuer/audience/expiry, and a stale previously visible tool name after revocation. An independent review identified a protected-read object-policy gap and a concurrent fixture write race; both were corrected before completion.
|
|
12
|
+
|
|
13
|
+
## Boundaries
|
|
14
|
+
|
|
15
|
+
The fixture's static test tokens, principal mapper and JSON file store reject production mode. The JSON store supports a single process with serialized writes; it is not a cross-process database. E07 reads grant state for each protected call and checks revocation at the next sequential lookup. A production provider must define its own store consistency, revocation latency, identity verification, resource ownership and safe grant issuance. The library does not issue OAuth tokens, implement token cryptography, refresh host sessions, or suppress host confirmation prompts.
|
|
16
|
+
|
|
17
|
+
No external identity provider, provider deployment, native WebMCP browser, commercial MCP host, or real user consent flow was verified here. Astro's transitive `http-cache-semantics` advisory remains a release gate. The package is still `private: true` at `0.0.0` and is not published to npmjs.com.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# UAN-011 discovery policy evidence
|
|
2
|
+
|
|
3
|
+
This bounded slice adds a shared `evaluateCapabilityDiscovery` decision and exact destructive surface exposure checks. It is applied to browser registration, MCP tool listing, and CLI help. Public reads remain the default visible catalog. Protected MCP discovery requires current token scopes and a matching live grant; the application's `discoverProtected` callback can only narrow the result. Destructive exposure additionally requires the canonical identity in the app's per-surface allowlist. The capability definition's risk metadata is unchanged.
|
|
4
|
+
|
|
5
|
+
Adapter enforcement includes the call boundary: a stale browser callback rechecks exposure, MCP rebuilds stateless tools for each request and rejects hidden direct names before a binding, and local CLI destructive invocation fails before input parsing or handler execution unless explicitly exposed. The CLI help list filters by usable local bindings or public remote routes. MCP and OpenAPI omit definitions without exactly one compatible server binding. HTTP/OpenAPI remains public-read-only.
|
|
6
|
+
|
|
7
|
+
The E07 fixture uses the official MCP client/server and its test-only verifier/store. It demonstrates edit grant discovery, Alice/Bob tenant-isolated catalogs, a delete grant that remains invisible until explicit MCP destructive exposure, refresh after revocation, and a stale direct call denied before the binding. The CLI fixture verifies generic hidden/unknown help, default public-only help, explicit protected read help, explicit destructive help, unbound filtering, and fail-closed direct destructive invocation.
|
|
8
|
+
|
|
9
|
+
## Verification
|
|
10
|
+
|
|
11
|
+
- Environment: research SSH, Node.js `v25.9.0`, npm `11.12.1`; SDK versions are pinned by package and fixture lockfiles.
|
|
12
|
+
- `npm run build`: passed.
|
|
13
|
+
- `node --test test/discovery.test.mjs test/cli.test.mjs test/browser.test.mjs test/mcp.test.mjs test/http.test.mjs`: 34 passed.
|
|
14
|
+
- `npm run example:e07`: 3 tests passed, standalone demo returned the public sample playlist.
|
|
15
|
+
- `npm run check`: passed after all code and fixture changes, including format, lint, typecheck, browser proof, root tests, and E01/E12/E05/E06/E04/E07 example checks.
|
|
16
|
+
- `git diff --check`: passed.
|
|
17
|
+
|
|
18
|
+
Known limits: this does not implement the E11 full runnable lab, OAuth/provider integration, production grant storage, protected HTTP routes, or deployment. The E07 JSON store is only single-process test storage. Browser host prompt behavior is not verified. Astro fixture dependency audits continue to report the previously documented advisories. E11 diagnostic-lab scope remains mapped to UAN-019/020.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# UAN-012 MCP Apps adapter evidence
|
|
2
|
+
|
|
3
|
+
The implementation was pushed as `47d089e072023504d66b32dabc7b9c4950111654`. [Node 22/24 CI](https://github.com/uppercut-labs/agent-native/actions/runs/37097823731) passed the root check and package dry-run on both versions. Local work and tests ran on `research` over SSH with Node 25.9.0 and npm 11.12.1, without foreground desktop use.
|
|
4
|
+
|
|
5
|
+
## Verified behavior
|
|
6
|
+
|
|
7
|
+
- An opt-in `./mcp-apps` subpath uses the official `@modelcontextprotocol/ext-apps@2.0.3` server helpers. Core and browser imports do not load the optional UI SDK. A resource attaches only to a capability visible through ordinary MCP discovery; tool calls and `App.callServerTool` follow-ups use the existing MCP handler, shared executor, schema validation, and authorization path.
|
|
8
|
+
- E09 is a standalone album explorer built from E01's shared public catalog definition and data. The official `App` and `AppBridge` fixture receives a real MCP tool result over a local SDK client/server connection, then makes a host-mediated follow-up lookup. It also checks found, missing, denied, unavailable, malformed host input, and text-only result fallback. The denied lookup does not run its binding.
|
|
9
|
+
- The resource uses the official `text/html;profile=mcp-app` MIME type. Validation requires a declared canonical capability, unique bounded `ui://` resource mapping, HTML under 1 MiB, and no external element/CSS origins, including protocol-relative network paths. Resource metadata has empty connect, resource, frame, and base-URI CSP allowlists. The view bundles its UI assets and carries no credentials.
|
|
10
|
+
- `npm test`, `npm run example:e09` (three E09 tests), `npm run typecheck`, scoped Biome checks, `git diff --check`, and `npm pack --dry-run` passed on `research`. The test handshake has a three-second deadline and closes the view, bridge, MCP client, and server in cleanup.
|
|
11
|
+
|
|
12
|
+
## Limits
|
|
13
|
+
|
|
14
|
+
The view/host channel is a deterministic in-memory fixture paired with a real local MCP HTTP client/server connection. No commercial MCP Apps host, browser iframe sandbox, host confirmation prompt, deployment, or production identity provider was tested. Host implementations must enforce the declared CSP and their own trust and consent boundary. The package remains `private: true` at version `0.0.0`; no npm release was made. The existing Astro development/example transitive advisory remains a release gate.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# UAN-013 Astro on-demand evidence draft
|
|
2
|
+
|
|
3
|
+
## Reproducible local checks
|
|
4
|
+
|
|
5
|
+
Run `npm run example:e02`. The exporter builds and packs the current package, copies the E02
|
|
6
|
+
after-state plus immutable before-state assets into `.exported`, generates `package-lock.json`,
|
|
7
|
+
installs with `npm ci`, runs tests, builds Astro, and starts the Node standalone production server.
|
|
8
|
+
|
|
9
|
+
The live check requests `/`, `/albums/`, and `/about/`; verifies that anonymous HTTP OpenAPI and
|
|
10
|
+
MCP tool discovery expose the same public capability metadata; invokes the authenticated Agent Native
|
|
11
|
+
HTTP route; connects with the official MCP 2.3.0 client and invokes the same sample capability; checks
|
|
12
|
+
that anonymous invocation is denied and invalid input is rejected through both transports; and proves
|
|
13
|
+
a protocol-shaped POST to the static negative file produces only its inert content. Build inspection
|
|
14
|
+
requires all three unrelated human pages under `dist/client` while the protocol routes stay on demand.
|
|
15
|
+
|
|
16
|
+
## Authentication and discovery boundary
|
|
17
|
+
|
|
18
|
+
The sample album capability is intentionally marked `access: public`. Its description, input/output
|
|
19
|
+
schemas, HTTP OpenAPI operation, and MCP tool listing are therefore public metadata. For this local
|
|
20
|
+
fixture only, the shared execution-context resolver requires `Bearer e02-local-fixture`; both HTTP
|
|
21
|
+
and MCP reject anonymous invocation. This tests invocation authorization parity without claiming
|
|
22
|
+
protected discovery or production identity. The bearer value is public fixture data.
|
|
23
|
+
|
|
24
|
+
Root checks are `npm run build`, `npm run build:test-fixtures`, `node --test test/init.test.mjs`, and
|
|
25
|
+
`npm run check`. Init coverage detects the committed on-demand fixture and official adapter, then
|
|
26
|
+
uses a disposable project to diagnose a missing adapter and reject `public/mcp.json` as a static
|
|
27
|
+
protocol impostor.
|
|
28
|
+
|
|
29
|
+
In the latest focused rerun after documenting the public-metadata/authenticated-invocation
|
|
30
|
+
boundary, `npm run format:check`, `npm run typecheck`, and `npm run example:e02` all passed. The E02
|
|
31
|
+
standalone command built, installed its fresh fixture dependencies, and passed its HTTP/OpenAPI/MCP
|
|
32
|
+
smoke assertions. The earlier draft run also had 11 focused init tests pass. The full
|
|
33
|
+
`npm run check` attempt reached the root socket tests, where the sandbox began rejecting every new
|
|
34
|
+
loopback listener with `listen EPERM: operation not permitted 127.0.0.1`; a direct retry had the
|
|
35
|
+
same environmental failure. Earlier in the same run, the root 73-test suite and E02 live server had
|
|
36
|
+
both completed successfully before that restriction appeared.
|
|
37
|
+
|
|
38
|
+
## Precise limits
|
|
39
|
+
|
|
40
|
+
This is local evidence for Astro 7.3.5, `@astrojs/node` 11.1.6 standalone mode, Node 22.12 or newer,
|
|
41
|
+
and the official MCP client/server packages at 2.3.0. It does not prove another Astro release,
|
|
42
|
+
adapter, provider, TLS termination, external host, commercial MCP client, production identity,
|
|
43
|
+
rate limiting, or deployment. The checked bearer value is public fixture data. The Astro
|
|
44
|
+
integration does not install an adapter or generate endpoints. Existing-project init detects these
|
|
45
|
+
conditions but deliberately leaves complex/on-demand config changes to reviewed application code.
|
|
46
|
+
The standalone install reported four high-severity transitive audit findings; no unsafe automatic
|
|
47
|
+
or breaking dependency rewrite was applied, so dependency review remains a release gate.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# UAN-014 Next.js integration evidence
|
|
2
|
+
|
|
3
|
+
Local fixture record from October 2, 2026; deployed-host support is not established by this record.
|
|
4
|
+
|
|
5
|
+
## Scope
|
|
6
|
+
|
|
7
|
+
The preserved baseline is `examples/e03-next-reading-list/site-before`. The generated after-state
|
|
8
|
+
comes from `examples/e03-next-reading-list/project` through `npm run example:e03`; the exporter packs
|
|
9
|
+
the local package, pins the tarball in the generated manifest, creates a lockfile, installs with
|
|
10
|
+
`npm ci`, tests, and builds Next 16.3.8 for the Node runtime.
|
|
11
|
+
|
|
12
|
+
The isolated `@uppercut-labs/agent-native/next` entrypoint exposes App Router-compatible method
|
|
13
|
+
handlers around the existing HTTP and official MCP adapters. `next/browser` is separate and imports
|
|
14
|
+
only the browser adapter and core registry types. Neither core nor the Astro entrypoint imports Next.
|
|
15
|
+
The route modules explicitly select `runtime = 'nodejs'`.
|
|
16
|
+
|
|
17
|
+
## Acceptance evidence
|
|
18
|
+
|
|
19
|
+
- `reading:catalog.list@1` is defined once and registered with separate server and browser bindings.
|
|
20
|
+
HTTP and MCP use the same server registry and shared executor; supported WebMCP uses the same
|
|
21
|
+
definition through the browser registry.
|
|
22
|
+
- The official MCP 2.3.0 client connects over a real local HTTP socket, lists the catalog tool, and
|
|
23
|
+
calls it. The Next HTTP route invokes the same catalog and returns four public fake records.
|
|
24
|
+
- The original `/api/catalog`, `/api/saved-list`, layout content, and fixture identity boundary are
|
|
25
|
+
retained. Tests keep the cross-user saved-list mutation denial and forged-identity denial.
|
|
26
|
+
- Production browser source maps are enabled. The boundary script requires the fake server sentinel
|
|
27
|
+
in emitted server JavaScript and rejects it in every browser JavaScript and source-map artifact.
|
|
28
|
+
- The browser bootstrap is feature-detected and resynced from a client component on pathname changes.
|
|
29
|
+
Package tests simulate two syncs and prove stale registrations are aborted. Ordinary page content
|
|
30
|
+
remains usable when WebMCP is absent.
|
|
31
|
+
- Next init detection reads package/config/directory evidence without importing application code.
|
|
32
|
+
An existing App Router `/mcp` route yields a same-origin plan conflict with an empty proposed-file
|
|
33
|
+
list; the test verifies existing auth and layout bytes are unchanged.
|
|
34
|
+
|
|
35
|
+
## Verification record
|
|
36
|
+
|
|
37
|
+
Local verification on 2026-10-02 produced:
|
|
38
|
+
|
|
39
|
+
- `npm run format:check`: passed after generated export/build output was removed.
|
|
40
|
+
- `npm run lint`: passed with repository-existing informational diagnostics and warnings; no errors.
|
|
41
|
+
- `npm run typecheck`: passed all three TypeScript projects.
|
|
42
|
+
- `npm run build:browser-proof && npm test`: passed 76 tests after creating the browser-proof
|
|
43
|
+
output required by the existing sentinel test.
|
|
44
|
+
- `npm run example:e03`: passed two saved-list authorization tests, HTTP route invocation, an
|
|
45
|
+
official MCP client exchange, Next 16.3.8 production build, and artifact inspection. The sentinel
|
|
46
|
+
occurred in one server artifact and no browser artifacts among 20 JavaScript/maps, including nine
|
|
47
|
+
source maps.
|
|
48
|
+
- `npm_config_cache=/private/tmp/uan014-npm-cache npm pack --dry-run --json`: passed with 96 files;
|
|
49
|
+
the first attempt using the user cache was blocked by root-owned cache entries.
|
|
50
|
+
|
|
51
|
+
## Limits
|
|
52
|
+
|
|
53
|
+
Evidence is local to Node.js, Next 16.3.8, the production compiler, a loopback HTTP socket, the
|
|
54
|
+
official MCP client, and a simulated WebMCP API. No provider deployment, Edge runtime, OAuth flow,
|
|
55
|
+
durable multi-process store, commercial MCP host, physical browser, or native browser agent was
|
|
56
|
+
tested. The fixture's sessions, catalog, and sentinel are public fake data. Generated `.next`,
|
|
57
|
+
export, tarball, and installed dependency output are ignored and are not source evidence.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# UAN-015 Node/Hono evidence
|
|
2
|
+
|
|
3
|
+
This slice extends E05 into a standalone Node/Hono lab. One immutable capability registry provides
|
|
4
|
+
the local CLI binding and the server binding used by both generated protocol handlers. A single
|
|
5
|
+
Hono application mounts `createHttpHandler` under `/agent-native/v1` and `createMcpHandler` at
|
|
6
|
+
`/mcp`; `runCapabilityCli` continues to provide local and remote CLI execution.
|
|
7
|
+
|
|
8
|
+
The shared server auth boundary derives its caller only from the request and the server-owned
|
|
9
|
+
`E05_TOKEN`. HTTP requires the local demo bearer scope. MCP is deliberately anonymous public/read
|
|
10
|
+
only, with discovery and invocation still enforced by the core adapter and executor. MCP
|
|
11
|
+
`clientInfo` is not consulted for identity. Socket and CLI diagnostics go to stderr and never emit
|
|
12
|
+
credential values; successful CLI envelopes remain isolated on stdout.
|
|
13
|
+
|
|
14
|
+
## Pinned environment and upstream check
|
|
15
|
+
|
|
16
|
+
- Repository baseline: `eb7ef4f`.
|
|
17
|
+
- Project requirement: Node.js 22 or newer. The original Codex sandbox used Node.js v26.9.0 and
|
|
18
|
+
npm 11.19.1; the independent plain-SSH rerun used Node.js v24.18.0 and npm 11.16.0.
|
|
19
|
+
- Fixture runtime: `hono` 4.13.12 and `@hono/node-server` 2.1.3.
|
|
20
|
+
- Protocol client: `@modelcontextprotocol/client` 2.3.0; the packaged MCP server dependency is 2.3.0.
|
|
21
|
+
- The versions were checked against npm registry metadata on 2026-10-02. The implementation follows
|
|
22
|
+
Hono's [official Node.js guide](https://hono.dev/docs/getting-started/nodejs), which documents
|
|
23
|
+
`serve({ fetch, port })`, the returned Node server, and explicit graceful shutdown.
|
|
24
|
+
|
|
25
|
+
The export harness generated `examples/e05-node-cli/.exported/package-lock.json`; its root entries
|
|
26
|
+
pin the Hono framework, Node adapter, official MCP client, Zod, and the local package tarball. The
|
|
27
|
+
export directory is generated evidence and remains gitignored.
|
|
28
|
+
|
|
29
|
+
## Commands and outcomes
|
|
30
|
+
|
|
31
|
+
- `npm ci --offline --ignore-scripts`: passed at the repository root; 212 packages installed and 0
|
|
32
|
+
vulnerabilities reported.
|
|
33
|
+
- `node_modules/.bin/biome format --write <UAN-015 files>`: passed.
|
|
34
|
+
- Scoped Biome lint for the three changed JavaScript files: passed with no diagnostics.
|
|
35
|
+
- `npm run lint`: passed, with pre-existing informational/warning diagnostics outside UAN-015.
|
|
36
|
+
- `npm run typecheck`: passed.
|
|
37
|
+
- `npm run build:browser-proof && npm test`: passed, 72 tests.
|
|
38
|
+
- `git diff --check`: passed.
|
|
39
|
+
- `npm run format:check`: blocked by pre-existing formatting differences in the E02 baseline CSS and
|
|
40
|
+
baseline test; the UAN-015 files were formatted independently and those unrelated files were not
|
|
41
|
+
modified.
|
|
42
|
+
- Original Codex sandbox: `npm_config_cache=/tmp/uan015-cache-seeded npm_config_offline=true npm run example:e05`:
|
|
43
|
+
package build, pack, standalone lock generation, and `npm ci` passed with 0 vulnerabilities. Five
|
|
44
|
+
non-socket CLI/security tests passed. Seven socket tests were blocked because this execution
|
|
45
|
+
sandbox rejects every `listen(127.0.0.1)` with `EPERM`; this is an environment limit, not an
|
|
46
|
+
assertion failure. The harness correctly stopped before `npm start` after the test failure.
|
|
47
|
+
- In-process `app.request` checks returned HTTP 200 with the expected First Light value and MCP 400
|
|
48
|
+
for malformed JSON, confirming the Hono mount paths without opening a socket.
|
|
49
|
+
- Independent plain-SSH verification on the same clone: `npm run example:e05` passed the standalone
|
|
50
|
+
build and pack, lockfile install with 0 vulnerabilities, all 12 fixture tests, and the local CLI
|
|
51
|
+
start. The passing tests included real loopback HTTP with the official MCP client, bounded
|
|
52
|
+
shutdown, SIGTERM, and port-conflict coverage. `npm run lint`, `npm run typecheck`,
|
|
53
|
+
`npm run build:browser-proof && npm test` (72 tests), and `git diff --check` also passed there.
|
|
54
|
+
`npm run format:check` failed only on the same pre-existing E02 baseline CSS and test formatting.
|
|
55
|
+
|
|
56
|
+
The checked-in socket tests cover matching HTTP and official MCP-client lookup values, unauthorized
|
|
57
|
+
HTTP, malformed MCP, bounded-operation shutdown without unhandled rejection, SIGTERM, and sanitized
|
|
58
|
+
port-conflict reporting. Existing E05 tests retain local/remote CLI parity, authorization, missing
|
|
59
|
+
profiles, unknown versions, malformed input, shell metacharacters, timeouts, and redaction.
|
|
60
|
+
|
|
61
|
+
## Limitations
|
|
62
|
+
|
|
63
|
+
No service was deployed and no npm package was published. The fixture does not prove compatibility
|
|
64
|
+
with a commercial MCP host, a provider runtime, or Hono releases other than the pinned versions.
|
|
65
|
+
The original Codex sandbox could not execute real loopback round trips, but the independent
|
|
66
|
+
plain-SSH rerun executed them successfully on the same clone. The token and environment-backed
|
|
67
|
+
profile are synthetic local examples, not production credential storage. Production use still
|
|
68
|
+
needs TLS, trusted identity verification, secret management, rate limiting, observability, and
|
|
69
|
+
process supervision.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# UAN-016 composition evidence
|
|
2
|
+
|
|
3
|
+
## Scope
|
|
4
|
+
|
|
5
|
+
The implementation adds contract-only capability packs, explicit alias policy, stable
|
|
6
|
+
authority/namespace composition, source-located conflict diagnostics, and shared deterministic
|
|
7
|
+
HTTP/CLI/MCP/OpenAPI name mapping. Runtime execution still uses `executeCapability` and the existing
|
|
8
|
+
registry/binding types.
|
|
9
|
+
|
|
10
|
+
The exported E08 fixture contains a separately versioned `@example/e08-distance-contracts` package.
|
|
11
|
+
Two consumer modules bind its single imported definition. Its tests cover distinct provider results,
|
|
12
|
+
an authorization denial where the handler is not selected, a deliberately duplicated full identity,
|
|
13
|
+
and an ESM load trace that rejects executor, registry, HTTP, MCP, Zod, or provider loading during a
|
|
14
|
+
contract-only import.
|
|
15
|
+
|
|
16
|
+
## Reproduction
|
|
17
|
+
|
|
18
|
+
Use the required Node release from the repository root:
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
export PATH=/Users/research/.nvm/versions/node/v24.18.0/bin:$PATH
|
|
22
|
+
npm run typecheck
|
|
23
|
+
npm run lint
|
|
24
|
+
npm run format:check
|
|
25
|
+
node --test test/composition.test.mjs test/executor.test.mjs test/public-exports.test.mjs
|
|
26
|
+
node --test --test-name-pattern='operation identifiers|tool naming' test/http.test.mjs test/mcp.test.mjs
|
|
27
|
+
npm run example:e08
|
|
28
|
+
npm run example:e12
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Observed in the Codex CLI sandbox with Node 24.18.0: typecheck, focused lint/format, browser proof,
|
|
32
|
+
and build passed; the two focused root test commands passed 16/16 and 2/2; E12's direct project
|
|
33
|
+
tests passed 5/5. E08's tests passed 3/3 in an equivalent local package-link staging directory and
|
|
34
|
+
its demo returned `30.48 cm` from `precise-consumer`. The CLI sandbox blocked the standalone
|
|
35
|
+
`npm run example:e08` install because package network access was unavailable.
|
|
36
|
+
|
|
37
|
+
An independent plain-SSH run on the same isolated clone completed `npm run example:e08`: the SDK and
|
|
38
|
+
contract were packed separately, both tarballs installed in `.exported`, all four E08 tests passed,
|
|
39
|
+
and the demo returned `30.48 cm` from `precise-consumer`. The standalone install reported zero
|
|
40
|
+
vulnerabilities. The tests check matching conversion values from both consumer bindings and invoke
|
|
41
|
+
each consumer entrypoint in an independent process. E12's established canonical ID remained
|
|
42
|
+
unchanged. `npm run typecheck` and a scoped Biome check also passed after this review.
|
|
43
|
+
|
|
44
|
+
## Limits
|
|
45
|
+
|
|
46
|
+
- Pack metadata is local application data; there is no remote registry, signature verification, or
|
|
47
|
+
package provenance attestation.
|
|
48
|
+
- FNV-1a is a deterministic name qualifier, not a security primitive. Composition and adapter setup
|
|
49
|
+
still check generated names for collisions rather than assuming the digest is unique.
|
|
50
|
+
- Aliases are local lookup conveniences and do not change canonical IDs or transport routes.
|
|
51
|
+
- Composition neither elevates permissions nor establishes transaction semantics.
|
|
52
|
+
- This work does not implement v2 migration or compatibility negotiation; that is UAN-017 scope.
|