@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
|
+
# Permissions and discovery
|
|
2
|
+
|
|
3
|
+
Agent Native separates metadata visibility from permission to execute. A public read capability can be listed anonymously. The shared `evaluateCapabilityDiscovery` policy supports public reads, application-provided protected visibility checks, and exact per-surface destructive exposure. The executor checks authorization again for every call. A stale client tool list does not preserve access after a grant is revoked.
|
|
4
|
+
|
|
5
|
+
## Trusted identity
|
|
6
|
+
|
|
7
|
+
For remote MCP, configure `bearerAuth` with an `OAuthTokenVerifier` and an `expectedResource` from the official MCP server SDK. The SDK bearer gate validates the token before Agent Native receives `AuthInfo`. The application must map verifier-owned identity metadata to a `TrustedPrincipal` through `resolveTrustedPrincipal`; request headers and MCP client metadata are not identity sources. The principal includes issuer, subject, client ID, tenant ID, audience, token scopes and token expiry.
|
|
8
|
+
|
|
9
|
+
The library does not issue tokens, run an OAuth server, or refresh credentials. Browser sessions and CLI profiles have separate identity boundaries. Their host applications must establish a trusted principal before using the same grant policy; credentials are never shared across surfaces automatically.
|
|
10
|
+
|
|
11
|
+
## Durable grants
|
|
12
|
+
|
|
13
|
+
`GrantStorePort` supplies `find`, `save` and `revoke`. The host application owns persistent storage and the grant issuance flow. Each grant is bound to issuer, subject, client, tenant, application, audience and policy revision, with scopes, issue time, expiry and revocation time. A token is short lived proof of the current caller; a grant is the separately persisted permission. Protected execution requires both current token scopes and an unexpired, unrevoked matching grant.
|
|
14
|
+
|
|
15
|
+
`createGrantAuthorization` checks the store on every protected call. Every protected capability also requires `authorizeResource` so the application can enforce record ownership and tenant boundaries before its binding runs. Public reads need no grant store and remain available anonymously.
|
|
16
|
+
|
|
17
|
+
For protected MCP discovery, the application may use `hasGrantForScopes` inside `discoverProtected`. The older `canDiscover` hook only narrows public reads; it cannot expose protected metadata. `evaluateCapabilityDiscovery` returns only a visibility decision and safe denial reason; adapters do not serialize private descriptions or schemas when a capability is hidden. Refresh browser registration or remote tool discovery after login, grant, scope change and revocation. Do not put protected schemas in public static manifests or a shared public cache.
|
|
18
|
+
|
|
19
|
+
Destructive visibility also requires an explicit per-app surface allowlist, such as `surfaceExposure: { mcp: { destructive: ['account:delete@1'] } }`. The canonical identity must be listed for that surface, and the current authorization check must still pass. This configuration does not change the domain capability's risk metadata. Browser and CLI use `browser` and `cli` keys respectively. The HTTP adapter in this package remains public-read-only and emits only public read routes in OpenAPI.
|
|
20
|
+
|
|
21
|
+
The [E07 playlist fixture](https://github.com/uppercut-labs/agent-native/blob/main/examples/e07-playlist-permissions/README.md) demonstrates official SDK bearer authentication, two tenants, persistent local grants, repeated edits, restart persistence, separate delete scope and direct denial after revocation. Its static test identities and JSON store reject production mode. The JSON store is a single-process fixture; concurrent independent processes are unsupported. Replace both with the application's real verifier and durable store before deployment. E07 checks revocation at the next store lookup in its sequential fixture; a production store's consistency and cache policy determine its actual latency.
|
|
22
|
+
|
|
23
|
+
Agent Native does not suppress confirmation prompts imposed by a browser, identity provider or MCP host. Grant reuse avoids repeated *library* consent only while identity, scopes, resource, policy and expiry remain valid.
|
|
24
|
+
|
|
25
|
+
## Surface policy
|
|
26
|
+
|
|
27
|
+
The shared `evaluateCapabilityDiscovery` decision supports public reads, application-provided protected visibility checks, and exact per-surface destructive exposure. For MCP, the adapter first requires current token scopes and a matching unexpired, unrevoked grant; `discoverProtected` can only narrow that set. A stale client tool list does not preserve access after grant revocation.
|
|
28
|
+
|
|
29
|
+
Destructive capabilities also require an exact per-app surface allowlist, such as `surfaceExposure: { mcp: { destructive: ['account:delete@1'] } }`. The current authorization check must still pass, and destructive exposure is rechecked at the adapter call boundary. This configuration does not change domain risk metadata. Browser and CLI use `browser` and `cli` keys. HTTP/OpenAPI remains public-read-only and lists only capabilities with a unique server binding.
|
|
30
|
+
|
|
31
|
+
CLI help filters by usable local bindings or public remote routes. Hidden or unavailable identities receive a generic explanation. Applications should close `canDiscover` over a trusted caller from their authentication boundary, never infer identity from command arguments or user-provided text. Refresh browser sync and remote tool listing after login, grant, scope change and revocation.
|
|
32
|
+
|
|
33
|
+
## Verify revocation locally
|
|
34
|
+
|
|
35
|
+
With Node.js 22 or newer, run `npm ci` and `npm run example:e07` from the package root.
|
|
36
|
+
The single-process fixture persists grants and revokes an existing ID in its local JSON store:
|
|
37
|
+
|
|
38
|
+
<!-- source:examples/e07-playlist-permissions/project/src/grant-store.mjs#revoke-grant -->
|
|
39
|
+
~~~js
|
|
40
|
+
async revoke(grantId, revokedAt) {
|
|
41
|
+
return await this.#withWriteLock(async () => {
|
|
42
|
+
const grants = await this.#read();
|
|
43
|
+
const grant = grants.find((entry) => entry.grantId === grantId);
|
|
44
|
+
if (!grant || grant.revokedAt !== null) return false;
|
|
45
|
+
grant.revokedAt = revokedAt;
|
|
46
|
+
await this.#write(grants);
|
|
47
|
+
return true;
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
~~~
|
|
51
|
+
|
|
52
|
+
[View tested source](https://github.com/uppercut-labs/agent-native/blob/main/examples/e07-playlist-permissions/project/src/grant-store.mjs#L56)
|
|
53
|
+
<!-- /source -->
|
|
54
|
+
|
|
55
|
+
The negative test proves that a revoked ID cannot be saved again and that the next protected
|
|
56
|
+
call is denied. If the fixture refuses to start in production mode, remove
|
|
57
|
+
`NODE_ENV=production` and use the documented local test mode; this JSON store intentionally
|
|
58
|
+
rejects production use. See [E07 setup and cleanup](https://github.com/uppercut-labs/agent-native/blob/main/examples/e07-playlist-permissions/README.md).
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Programmatic harness contracts
|
|
2
|
+
|
|
3
|
+
The isolated `@uppercut-labs/agent-native/harness` export defines a provider-neutral
|
|
4
|
+
Session -> Turns control plane without runtime dependencies. This initial slice
|
|
5
|
+
includes neutral fake-adapter acceptance, a Node-only loopback MCP bridge and an
|
|
6
|
+
isolated [Codex local adapter](harness-codex.md) with real Luna acceptance.
|
|
7
|
+
Importing the neutral contracts starts no provider or inference.
|
|
8
|
+
|
|
9
|
+
Harness control and capability execution are sibling planes. Starting an agent
|
|
10
|
+
never grants permission to invoke application capabilities. The existing
|
|
11
|
+
[capability executor](capabilities-and-bindings.md) and [MCP authorization](mcp.md)
|
|
12
|
+
remain authoritative. The local bridge binds only to loopback; cloud
|
|
13
|
+
configuration must explicitly supply a reachable authenticated endpoint.
|
|
14
|
+
|
|
15
|
+
## Local MCP bridge
|
|
16
|
+
|
|
17
|
+
The isolated Node-only `/harness/mcp-bridge` helper serves an application-supplied
|
|
18
|
+
MCP handler on literal loopback, preserving its authorization and owning its
|
|
19
|
+
listener lifecycle. See [bridge configuration and cleanup](harness-mcp-bridge.md).
|
|
20
|
+
Cloud agents need an explicit reachable authenticated endpoint; no tunnel is created.
|
|
21
|
+
|
|
22
|
+
## Lifecycle
|
|
23
|
+
|
|
24
|
+
`ProgrammaticHarnessAdapter` exposes `describe`, `openSession`, `resumeSession`,
|
|
25
|
+
`runTurn`, `cancelTurn`, and `closeSession`.
|
|
26
|
+
|
|
27
|
+
- Call `describe()` before use. Its provider, targets (`local`/`cloud`), and features
|
|
28
|
+
(`resume`, `cancel`, `usage`, `mcp`) describe actual support.
|
|
29
|
+
`assertHarnessSupport(descriptor, target, feature?)` raises stable typed failures.
|
|
30
|
+
Adapters must also check support; negotiation is not authorization.
|
|
31
|
+
- Local open/resume requests require an explicit workspace. Cloud requests carry
|
|
32
|
+
only the target; the provider factory must require explicit remote/repository and
|
|
33
|
+
authentication configuration. No local workspace is implicitly uploaded.
|
|
34
|
+
- `HarnessSessionRef` contains provider, target, and an opaque session ID. Resume
|
|
35
|
+
receives this complete reference plus target/workspace. IDs are preserved verbatim;
|
|
36
|
+
no parsing, cross-provider migration, or global lookup is implied.
|
|
37
|
+
- `runTurn({ session, prompt })` yields `turn-started` with an opaque turn ID,
|
|
38
|
+
optional status/tool/usage events, then exactly one terminal event: `completed`,
|
|
39
|
+
`failed`, or `cancelled`. A rejected start throws `HarnessError`.
|
|
40
|
+
A stream ending without a terminal event is incomplete, never successful.
|
|
41
|
+
- `cancelTurn({ session, turnId })` targets one active turn and requires `cancel`.
|
|
42
|
+
`closeSession({ session })` releases only adapter-owned resources and is idempotent
|
|
43
|
+
for a known closed session. It does not imply deleting provider history.
|
|
44
|
+
Adapters define whether resume can reattach after local resource cleanup.
|
|
45
|
+
|
|
46
|
+
Adapters validate provider/target identity, workspace ownership, session state,
|
|
47
|
+
and concurrent-turn restrictions. Core contracts do not execute capabilities or
|
|
48
|
+
weaken provider permissions.
|
|
49
|
+
|
|
50
|
+
## Events and failures
|
|
51
|
+
|
|
52
|
+
`HarnessEvent` is a closed union: `session-started`, `turn-started`, `progress`,
|
|
53
|
+
`tool`, `usage`, `completed`, `failed`, `cancelled`.
|
|
54
|
+
`createHarnessEvent` constructs immutable snapshots, projects out extra provider
|
|
55
|
+
fields, and validates normalized payloads. `createHarnessStatusEvent` is the focused
|
|
56
|
+
status/tool helper. Message length is 1-240 characters, provider length 1-64,
|
|
57
|
+
session ID length 1-1024, and turn ID length 1-128; control characters are rejected.
|
|
58
|
+
These limits bound individual events, not total stream length. Consumers must apply
|
|
59
|
+
their own turn deadlines and event-count limits.
|
|
60
|
+
|
|
61
|
+
Status/tool messages must be adapter-authored, reviewed safe summaries. Length checks
|
|
62
|
+
and field projection do not detect credentials embedded in an allowed string.
|
|
63
|
+
Never forward raw model output, exception text, environment dumps, credential files,
|
|
64
|
+
or tool arguments. Treat session IDs as sensitive in external evidence unless provider
|
|
65
|
+
guidance explicitly permits sharing them.
|
|
66
|
+
|
|
67
|
+
Usage is a nonnegative safe integer in provider-reported `tokens` or `requests`.
|
|
68
|
+
Emit it only when advertised and reliable; absence means unavailable, not zero.
|
|
69
|
+
It is not a cross-provider price model.
|
|
70
|
+
|
|
71
|
+
`HarnessError.reason` is one of `unsupported-target`, `unsupported-feature`,
|
|
72
|
+
`invalid-request`, `authentication-required`, `provider-unavailable`,
|
|
73
|
+
`session-not-found`, `session-closed`, `turn-not-found`, `turn-active`, `timeout`,
|
|
74
|
+
`provider-failed`. Messages are fixed by reason and carry no raw provider cause.
|
|
75
|
+
Terminal failure events use these same reasons. Adapters translate provider failures
|
|
76
|
+
at the boundary; restricted diagnostics stay outside this normalized API.
|
|
77
|
+
|
|
78
|
+
## Acceptance and installation
|
|
79
|
+
|
|
80
|
+
`test/harness.test.mjs` checks a fake adapter opening a session, two turns with
|
|
81
|
+
same-session resume, targeted cancellation, close, unsupported operations, stream
|
|
82
|
+
failures, event bounds, and raw-field exclusion. Type checks reject local requests
|
|
83
|
+
without a workspace. `npm run check:portability` packs and installs a fresh
|
|
84
|
+
root/browser/harness consumer with optional peers absent and checks every export.
|
|
85
|
+
|
|
86
|
+
The export is not re-exported from root/core and has no provider SDK, Node, DOM,
|
|
87
|
+
framework, or MCP imports. Import contracts through `/harness`.
|
|
88
|
+
Source/tarball checks do not establish availability of a new registry release.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Framework examples for site publication
|
|
2
|
+
|
|
3
|
+
Each project pairs the same Harbor field guide with a distinct application. Start from the matching project, follow the framework's production build and inspect how its public data supplies the human page and its Markdown mirror. The field guide's original edition departs from Pier Four. The updated edition moves the departure to Pier Seven and withdraws a route.
|
|
4
|
+
|
|
5
|
+
| Integration | Production behavior exercised | Showcase |
|
|
6
|
+
| --- | --- | --- |
|
|
7
|
+
| Astro | Content collection, static HTML and a Node-rendered advisory. A second config builds a file-only version. | Breakwater field guide and tide advisory |
|
|
8
|
+
| Next.js | App Router static parameter enumeration with server route handlers for protected resources | Field recording course |
|
|
9
|
+
| React with Vite | Vite production pages, client routing, deep links and playback queue | Night Ferry track |
|
|
10
|
+
| Vue with Vite | Vue Router with generated canonical pages and query-based catalog filters | Brass coupler parts catalog |
|
|
11
|
+
| SvelteKit | Server load, dynamic event route, protected attendee route and adapter-node | Lantern workshop |
|
|
12
|
+
| Nuxt | Nuxt file routing, server-rendered locale-specific pages and Nitro's Node preset | Bilingual museum exhibit |
|
|
13
|
+
| React Router framework mode | Nested framework route modules, server loader, redirect and error response | River line transit stops |
|
|
14
|
+
| Angular | Parameterized prerendering, hydration and lazy checklist | Atlas equipment handbook |
|
|
15
|
+
|
|
16
|
+
The route and field allowlists are part of each example. Change those to match the adopting application and review them with its access rules. The examples use the shared experimental publication API and the framework integration code in their source. Version pins and lockfiles specify the tested framework and toolchain. Hosted compatibility and results from independent language models require separate evidence.
|
|
17
|
+
|
|
18
|
+
[Runnable source and native test instructions](https://github.com/uppercut-labs/agent-native/blob/main/examples/readability/README.md) · [Publication and adoption guide](site-publication.md)
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# Generated package and CLI reference
|
|
2
|
+
|
|
3
|
+
This page is generated from [package.json](../package.json) and the
|
|
4
|
+
[CLI parser](https://github.com/uppercut-labs/agent-native/blob/main/src/cli.ts). Run `node docs-site/reference.mjs` after changing those
|
|
5
|
+
sources. `npm run docs:check` fails if this page drifts. Agent Native
|
|
6
|
+
`1.1.0`. Stable and experimental entry points are listed in [stability](stability.md).
|
|
7
|
+
|
|
8
|
+
## Typed package entrypoints
|
|
9
|
+
|
|
10
|
+
| Import specifier | Type declaration | ESM implementation |
|
|
11
|
+
| --- | --- | --- |
|
|
12
|
+
| `@uppercut-labs/agent-native` | `./dist/index.d.ts` | `./dist/index.js` |
|
|
13
|
+
| `@uppercut-labs/agent-native/contracts` | `./dist/core/contracts.d.ts` | `./dist/core/contracts.js` |
|
|
14
|
+
| `@uppercut-labs/agent-native/harness` | `./dist/harness.d.ts` | `./dist/harness.js` |
|
|
15
|
+
| `@uppercut-labs/agent-native/composition` | `./dist/core/composition.d.ts` | `./dist/core/composition.js` |
|
|
16
|
+
| `@uppercut-labs/agent-native/registry` | `./dist/registry.d.ts` | `./dist/registry.js` |
|
|
17
|
+
| `@uppercut-labs/agent-native/executor` | `./dist/core/executor.d.ts` | `./dist/core/executor.js` |
|
|
18
|
+
| `@uppercut-labs/agent-native/cli` | `./dist/cli.d.ts` | `./dist/cli.js` |
|
|
19
|
+
| `@uppercut-labs/agent-native/http` | `./dist/http.d.ts` | `./dist/http.js` |
|
|
20
|
+
| `@uppercut-labs/agent-native/schema/zod` | `./dist/adapters/zod.d.ts` | `./dist/adapters/zod.js` |
|
|
21
|
+
| `@uppercut-labs/agent-native/diagnostics` | `./dist/core/diagnostics.d.ts` | `./dist/core/diagnostics.js` |
|
|
22
|
+
| `@uppercut-labs/agent-native/doctor` | `./dist/doctor.d.ts` | `./dist/doctor.js` |
|
|
23
|
+
| `@uppercut-labs/agent-native/mcp` | `./dist/mcp.d.ts` | `./dist/mcp.js` |
|
|
24
|
+
| `@uppercut-labs/agent-native/browser` | `./dist/browser.d.ts` | `./dist/browser.js` |
|
|
25
|
+
| `@uppercut-labs/agent-native/astro` | `./dist/astro.d.ts` | `./dist/astro.js` |
|
|
26
|
+
| `@uppercut-labs/agent-native/next` | `./dist/next.d.ts` | `./dist/next.js` |
|
|
27
|
+
| `@uppercut-labs/agent-native/next/browser` | `./dist/next-browser.d.ts` | `./dist/next-browser.js` |
|
|
28
|
+
| `@uppercut-labs/agent-native/init` | `./dist/init.d.ts` | `./dist/init.js` |
|
|
29
|
+
| `@uppercut-labs/agent-native/auth` | `./dist/auth.d.ts` | `./dist/auth.js` |
|
|
30
|
+
| `@uppercut-labs/agent-native/mcp-apps` | `./dist/mcp-apps.d.ts` | `./dist/mcp-apps.js` |
|
|
31
|
+
| `@uppercut-labs/agent-native/harness/mcp-bridge` | `./dist/harness-mcp-bridge.d.ts` | `./dist/harness-mcp-bridge.js` |
|
|
32
|
+
| `@uppercut-labs/agent-native/harness/codex` | `./dist/harness-codex.d.ts` | `./dist/harness-codex.js` |
|
|
33
|
+
| `@uppercut-labs/agent-native/publication` | `./dist/publication.d.ts` | `./dist/publication.js` |
|
|
34
|
+
|
|
35
|
+
The package's optional peers are listed in [installation](installation.md). Import only
|
|
36
|
+
the subpath needed by the application. The experimental [site publication CLI](site-publication.md) operates on approved public content.
|
|
37
|
+
|
|
38
|
+
## Application CLI arguments
|
|
39
|
+
|
|
40
|
+
The application calls `runCapabilityCli(argv, options, streams)`. One command or
|
|
41
|
+
canonical capability ID is positional. A command override or alias retains the
|
|
42
|
+
canonical identity and has no version fallback.
|
|
43
|
+
|
|
44
|
+
| Argument | Value and default | Boundary |
|
|
45
|
+
| --- | --- | --- |
|
|
46
|
+
| `--mode` | local or remote | Required for invocation; remote needs a profile. |
|
|
47
|
+
| `--profile` | lowercase slug (1-32 characters) | Remote only. |
|
|
48
|
+
| `--binding-id` | exact binding ID | Local only. |
|
|
49
|
+
| `--timeout-ms` | integer 1-300000 (default 10000) | Remote request deadline. |
|
|
50
|
+
| `--input-json` | JSON document or - for stdin | Cannot combine with field flags. |
|
|
51
|
+
| `--<field>` | typed scalar from input schema | Complex fields use `--input-json`. |
|
|
52
|
+
| `--help` or `-h` | no value | Lists visible capabilities. |
|
|
53
|
+
| `--version` | no value | Displays the application's supplied package version. |
|
|
54
|
+
|
|
55
|
+
For a runnable instance, use Node.js 22 or newer, `npm ci`, and
|
|
56
|
+
`npm run example:e10` from the repository root. The exported E10 CLI runs
|
|
57
|
+
`npm run search -- --query night --limit 1` successfully. An empty query exits
|
|
58
|
+
2 with `invalid-input`; provide a nonempty query to retry. See
|
|
59
|
+
[CLI behavior](cli.md) and [E10 instructions](https://github.com/uppercut-labs/agent-native/blob/main/examples/e10-existing-functions-retrofit/project/README.md).
|
|
60
|
+
|
|
61
|
+
## Typed adapter configuration
|
|
62
|
+
|
|
63
|
+
These exported declarations are copied from the checked TypeScript source at build time.
|
|
64
|
+
Framework mounts and security ownership are explained in the linked guides.
|
|
65
|
+
|
|
66
|
+
### CLI
|
|
67
|
+
|
|
68
|
+
[View source](https://github.com/uppercut-labs/agent-native/blob/main/src/cli.ts)
|
|
69
|
+
|
|
70
|
+
~~~ts
|
|
71
|
+
export type CliCredentialProfile = {
|
|
72
|
+
readonly baseUrl: string;
|
|
73
|
+
readonly token: string;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
export type CapabilityCliOptions = {
|
|
77
|
+
readonly registry: CapabilityRegistry;
|
|
78
|
+
readonly authorization: AuthorizationPort;
|
|
79
|
+
readonly caller: ExecutionCaller;
|
|
80
|
+
readonly credentialProfiles?: Readonly<Record<string, CliCredentialProfile>>;
|
|
81
|
+
readonly packageVersion?: string;
|
|
82
|
+
readonly fetcher?: typeof fetch;
|
|
83
|
+
readonly surfaceExposure?: CapabilitySurfaceExposure;
|
|
84
|
+
readonly canDiscover?: (
|
|
85
|
+
definition: CapabilityDefinition<unknown, unknown>,
|
|
86
|
+
) => boolean | Promise<boolean>;
|
|
87
|
+
};
|
|
88
|
+
~~~
|
|
89
|
+
|
|
90
|
+
### HTTP
|
|
91
|
+
|
|
92
|
+
[View source](https://github.com/uppercut-labs/agent-native/blob/main/src/http.ts)
|
|
93
|
+
|
|
94
|
+
~~~ts
|
|
95
|
+
export type HttpAdapterOptions = {
|
|
96
|
+
readonly basePath?: string;
|
|
97
|
+
readonly maxRequestBytes?: number;
|
|
98
|
+
readonly deadlineMs?: number;
|
|
99
|
+
readonly resolveExecutionContext?: (
|
|
100
|
+
request: Request,
|
|
101
|
+
) => HttpExecutionContext | Promise<HttpExecutionContext>;
|
|
102
|
+
};
|
|
103
|
+
~~~
|
|
104
|
+
|
|
105
|
+
### MCP
|
|
106
|
+
|
|
107
|
+
[View source](https://github.com/uppercut-labs/agent-native/blob/main/src/mcp-core.ts)
|
|
108
|
+
|
|
109
|
+
~~~ts
|
|
110
|
+
export type McpAdapterOptions = {
|
|
111
|
+
readonly endpoint?: string;
|
|
112
|
+
readonly surfaceExposure?: CapabilitySurfaceExposure;
|
|
113
|
+
readonly maxRequestBytes?: number;
|
|
114
|
+
readonly deadlineMs?: number;
|
|
115
|
+
readonly canDiscover?: (
|
|
116
|
+
definition: CapabilityDefinition<unknown, unknown>,
|
|
117
|
+
request: Request,
|
|
118
|
+
) => boolean | Promise<boolean>;
|
|
119
|
+
readonly discoverProtected?: (
|
|
120
|
+
definition: CapabilityDefinition<unknown, unknown>,
|
|
121
|
+
request: Request,
|
|
122
|
+
authInfo: AuthInfo,
|
|
123
|
+
) => boolean | Promise<boolean>;
|
|
124
|
+
readonly bearerAuth?: {
|
|
125
|
+
readonly verifier: OAuthTokenVerifier;
|
|
126
|
+
readonly expectedResource: URL;
|
|
127
|
+
readonly requiredScopes?: readonly string[];
|
|
128
|
+
readonly resourceMetadataUrl?: string;
|
|
129
|
+
// Answer requests without an Authorization header with the SDK's 401 challenge. Defaults to
|
|
130
|
+
// true when no capability is a public read, so hosts are prompted to authenticate instead of
|
|
131
|
+
// receiving an empty tool list.
|
|
132
|
+
readonly required?: boolean;
|
|
133
|
+
};
|
|
134
|
+
// Operator hook for tool calls that end in an error. It runs after the response is decided;
|
|
135
|
+
// a throwing or rejecting hook is ignored.
|
|
136
|
+
readonly onToolFailure?: (failure: McpToolFailure) => void | Promise<void>;
|
|
137
|
+
// Overrides the default collision-free tool name. Names must be unique and match MCP's name rules.
|
|
138
|
+
readonly toolName?: (definition: CapabilityDefinition<unknown, unknown>) => string;
|
|
139
|
+
// AuthInfo comes from the SDK verifier; issuer/subject/tenant must be supplied by that
|
|
140
|
+
// verifier's trusted metadata, never inferred from request headers or MCP clientInfo.
|
|
141
|
+
readonly resolveTrustedPrincipal?: (
|
|
142
|
+
authInfo: AuthInfo,
|
|
143
|
+
) => TrustedPrincipal | null | Promise<TrustedPrincipal | null>;
|
|
144
|
+
readonly grantAuthorization?: Omit<GrantAuthorizationOptions, 'principal'>;
|
|
145
|
+
readonly resolveExecutionContext?: (
|
|
146
|
+
request: Request,
|
|
147
|
+
authInfo?: AuthInfo,
|
|
148
|
+
) => McpExecutionContext | Promise<McpExecutionContext>;
|
|
149
|
+
};
|
|
150
|
+
~~~
|
|
151
|
+
|
|
152
|
+
### Doctor
|
|
153
|
+
|
|
154
|
+
[View source](https://github.com/uppercut-labs/agent-native/blob/main/src/doctor.ts)
|
|
155
|
+
|
|
156
|
+
~~~ts
|
|
157
|
+
export type DoctorRunOptions = {
|
|
158
|
+
readonly now?: () => Date;
|
|
159
|
+
readonly profile?: DoctorCheckProfile;
|
|
160
|
+
};
|
|
161
|
+
~~~
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Release and provider handoff
|
|
2
|
+
|
|
3
|
+
This handoff covers how a release candidate is checked and published; the current release is `1.0.1`. The public source is [uppercut-labs/agent-native](https://github.com/uppercut-labs/agent-native); `@uppercut-labs/agent-native` is its npm name and MIT is its license. Check the registry before claiming publication. Older entries below are dated release snapshots; their `latest` tags describe that publication date, not today. See [UAN-024 release evidence](evidence/UAN-024-release-readiness.md) for the earlier `0.0.0` preparation snapshot.
|
|
4
|
+
|
|
5
|
+
## Package release sequence
|
|
6
|
+
|
|
7
|
+
1. Select the version, update `src/package-version.ts` and the E08 contract peer with it, regenerate `docs/reference.md`, and align the changelog, installation guide and [upgrade notes](upgrading-to-1.0.md). Run `npm run check:api`; a stable API change needs a major version unless [stability](stability.md) allows it.
|
|
8
|
+
2. Run the Node 22/24 CI matrix on the exact candidate commit. The example negative probes and independent tarball install are part of that gate.
|
|
9
|
+
3. From a clean checkout of that commit, run `npm ci` and `npm pack --json`. Inspect the actual tarball, license, README, documentation, dependency licenses, production audit, file list, and every declared export. Record its SHA-256 digest, package file count and size, source SHA, and Node/npm versions. Install the archive in a clean consumer and run the documented first capability.
|
|
10
|
+
4. Publish that exact archive under the organization scope with public access. Record the registry URL and digest. Keep the source tag and registry artifact tied to the same source commit.
|
|
11
|
+
5. Perform a post-publish clean registry install and the documented first-run path. If publication or provenance verification fails, report the actual registry state and recovery action; never describe a local tarball as a published npm release.
|
|
12
|
+
|
|
13
|
+
The provider gates below apply to application deployments and full host claims. The released 1.0.1 package has no `bin` entry; users call its programmatic APIs or application-owned CLI runner. Do not advertise `npx agent-native init` until an executable exists and is tested.
|
|
14
|
+
|
|
15
|
+
## Native provider deployment
|
|
16
|
+
|
|
17
|
+
Agent Native supplies contracts and adapters, not a managed hosting account. The deploying application owns its provider resources and operational policy:
|
|
18
|
+
|
|
19
|
+
| Surface | Application-owned deployment work | Minimum live evidence |
|
|
20
|
+
| --- | --- | --- |
|
|
21
|
+
| Static Astro plus Worker sidecar (E01/E04) | Choose the sidecar origin, provision the Worker and routes, configure allowed Host/Origin/CORS and revision matching, bind secrets outside source control, and keep the static site independent. | Public and denied routes, cross-origin denial, OpenAPI and MCP client roundtrip through the deployed address, rollback of Worker and routing. |
|
|
22
|
+
| Astro on-demand (E02) or Next App Router (E03) | Provide a supported server runtime, own endpoint mounting and framework adapter, deploy the site and server together, and verify static/prerendered pages remain correct. | HTTP and MCP calls, auth/denial, framework build, navigation and rollback at the real deployment. |
|
|
23
|
+
| Node/Hono or another server (E05) | Own the process, TLS/front proxy, route path, limits, logs, credentials and restart behavior. | Local and remote CLI parity through the deployed endpoint, malformed input, auth denial and health evidence. |
|
|
24
|
+
| Browser and MCP Apps (E06/E09) | Choose an actual host with the needed API, obtain host consent, set resource CSP/sandbox policy, and keep server credentials out of browser assets. | Named host version and origin, visible tool registration and action, denied call, iframe/CSP behavior, cleanup after navigation. |
|
|
25
|
+
|
|
26
|
+
For protected capabilities, the application must provide token verification, issuer/audience/scope policy, resource authorization, a durable grant store, revocation consistency, idempotency for mutations, and incident response. A timeout can leave a write's completion uncertain; do not retry it blindly. The local E07 grant fixture and E11 doctor profile are examples, not production identity or persistence services. Record provider account owner, deployment ID, route/DNS owner, secret storage location (never the secret), rollback command, log/trace location, and the person who accepts live behavior in the deployment runbook.
|
|
27
|
+
|
|
28
|
+
## Open provider and full-host acceptance gates
|
|
29
|
+
|
|
30
|
+
- [x] GitHub private vulnerability reporting is enabled for the public repository; the [Security Advisories page](https://github.com/uppercut-labs/agent-native/security/advisories) is the private report channel.
|
|
31
|
+
- [x] UAN-020 security/failure-safety review and its production support limits are recorded in [negative security fixtures](evidence/UAN-020-negative-security-fixtures.md), [operational failure safety](evidence/UAN-020-operational-failure-safety.md) and [support limits](support-and-limitations.md).
|
|
32
|
+
- [x] UAN-021 guides and every E01-E12 example have checked prerequisites, expected output, a negative path, and source-backed evidence; `npm run docs:check` enforces [coverage](evidence/UAN-021-docs-coverage.md).
|
|
33
|
+
- [x] UAN-022 Windows and Linux representative install/CLI behavior, dependency license inventory, and overhead measurements have a recorded decision: [portability](evidence/UAN-022-package-portability.md), [overhead](evidence/UAN-022-overhead-license-audit.md) and the [cross-platform license and notice review](evidence/UAN-022-cross-platform-license-notices.md).
|
|
34
|
+
- [x] UAN-023 named-host evidence is recorded: [Inspector MCP Apps rendering and clean-context Astro adoption](evidence/UAN-023-inspector-web-and-astro-adoption.md) and [native Chrome 155 WebMCP](evidence/UAN-023-native-webmcp-chrome.md) with the opt-in feature. [Antigravity CLI and Claude Code](evidence/UAN-023-commercial-agent-hosts.md) invoked the flagship tool over remote MCP. MCP Apps rendering in commercial hosts and shipping browser agents remain unverified and carry no support claim.
|
|
35
|
+
- [x] The Astro/example dependency path to `http-cache-semantics@4.2.0` is assessed against [GHSA-ch52-4w7c-c8xp](https://github.com/advisories/GHSA-ch52-4w7c-c8xp): the [2026-10-10 recheck](evidence/GHSA-ch52-4w7c-c8xp-2026-10-10.md) found no upstream fix, and Astro does not use the vulnerable method. Recheck before a provider launch guide.
|
|
36
|
+
- [x] `1.0.0` was packed from a clean clone of CI-green `a7b3408`: 170 files, 187,584 bytes, SHA-256 `2d56d226791fdd7025cfec172cda83e408464b78141264a51f104f249761cf1e` (Windows 11, Node 25, npm 12.1). At its October 12, 2026 publication it was npm `latest` (integrity `sha512-8UUwdjsKxr4qk…`, shasum `3d5ef7ef…ae8e`, byte-identical to the archive) and the [v1.0.0 GitHub release](https://github.com/uppercut-labs/agent-native/releases/tag/v1.0.0). Clean registry installs on Windows 11 and macOS 27 (Node 26.9, npm 11.19) ran the quickstart, and the release archive verified against its `.sha256` on macOS. [Domain Expansion](evidence/gate-2-domain-expansion.md) runs 1.0.0 in production.
|
|
37
|
+
- [x] `0.1.3` was packed from a clean clone of CI-green `755c635`: 162 files, SHA-256 `2cf416bbdac857c00a1153cf84e444674d9495852bfe94101f4b626141eca538`. At its October 10, 2026 publication it was npm `latest` (integrity `sha512-MgIgNjB/KFJPh…`, byte-identical to the archive) and the [v0.1.3 GitHub prerelease](https://github.com/uppercut-labs/agent-native/releases/tag/v0.1.3). A clean registry install ran the quickstart, and its packaged evidence records both commercial agent hosts.
|
|
38
|
+
- [x] `0.1.2` was packed from a clean clone of CI-green `b6f31d4`: 162 files, SHA-256 `1b6c79890494dd4febb618840950301f66f75c1f3739f733b0136fc634833988`. It is published on [npm](https://www.npmjs.com/package/@uppercut-labs/agent-native/v/0.1.2), where `latest` was 0.1.2 on October 10, 2026 with integrity `sha512-UUTzWRnVE7Fbetwf…` and shasum `a0d64189…a8bc`, and the registry download is byte-identical. It is also published as the checksum-verified [v0.1.2 GitHub prerelease](https://github.com/uppercut-labs/agent-native/releases/tag/v0.1.2). Clean consumers installed it from both routes and ran the quickstart.
|
|
39
|
+
- [x] The `0.1.1` tarball's digest, source commit, clean registry install and packed proof are recorded in the [harness release evidence](evidence/codex-harness.md#registry-release---2026-10-05). Provider handoff remains the deploying application's work, described above.
|
|
40
|
+
|
|
41
|
+
See [support limits](support-and-limitations.md), [compatibility](compatibility.md), [security model](https://github.com/uppercut-labs/agent-native/blob/main/SECURITY.md), and [contributing](https://github.com/uppercut-labs/agent-native/blob/main/CONTRIBUTING.md). A green repository CI run is one gate; it does not close the deployment and host gates.
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# Publish public content for reading agents
|
|
2
|
+
|
|
3
|
+
The unreleased experimental `/publication` import and `agent-native-site` executable generate a text index, directly readable Markdown mirrors, optional aggregate text and JSON-LD for approved public pages. Your app owns its human HTML, data permissions and cache invalidation.
|
|
4
|
+
|
|
5
|
+
[Framework integrations and showcases](readability-frameworks.md)
|
|
6
|
+
|
|
7
|
+
## Try a source-backed example
|
|
8
|
+
|
|
9
|
+
Use Node 22+ and a checkout of this branch. From the repository root, run the following commands. The example creates a small workshop site in a new working directory with a private manifest, an empty state directory and a separate public output directory.
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
npm ci
|
|
13
|
+
npm run build
|
|
14
|
+
node examples/site-publication/build.mjs workshop-demo http://127.0.0.1:4173/
|
|
15
|
+
node bin/agent-native-site.mjs preview --manifest workshop-demo/site.json --out workshop-demo/public --state workshop-demo/state
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Read the proposed changes, included routes and excluded sources. Substitute the exact digest from that preview.
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
node bin/agent-native-site.mjs apply --manifest workshop-demo/site.json --out workshop-demo/public --state workshop-demo/state --approve REVIEWED_DIGEST
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
In a clean consumer that installed the candidate tarball, use `npm exec -- agent-native-site` in place of `node bin/agent-native-site.mjs`. The public site must serve the generated files verbatim with the expected media types. Configure `.md` as `text/markdown` or `text/plain`, `.jsonld` as `application/ld+json` or `application/json`, and `.txt` as `text/plain`. Unknown mirror paths should return 404 or 410. The verifier performs anonymous requests against the configured origin and checks canonical HTML, applicable JSON-LD, actual bytes, types and a missing Markdown path.
|
|
25
|
+
|
|
26
|
+
```sh
|
|
27
|
+
node bin/agent-native-site.mjs verify --manifest workshop-demo/site.json
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Discover review candidates in existing projects
|
|
31
|
+
|
|
32
|
+
Run `agent-native-site discover --framework next --project .` on an App Router app. Astro, Next.js App Router, Nuxt and SvelteKit use conventional filesystem page paths. Dynamic parameters stay unresolved, and discovery reads filenames without running loaders or opening page bodies. Angular can read an existing `dist/prerendered-routes.json`. For React/Vite, Vue/Vite, React Router framework mode and Angular, pass `--routes routes.json` with an application-exported route table (paths or nested records with path, index and children). A custom route file must be inside the project. Redirects, internationalization, custom framework directories, aliases and complex mounted routers require developer review.
|
|
33
|
+
|
|
34
|
+
The output is private review material. Every discovered route has unknown visibility, a source locator and a stable candidate ID. Enumerate the finite public routes and select their public fields to construct the manifest. An automatically discovered path cannot authorize publication.
|
|
35
|
+
|
|
36
|
+
## Supply public projections
|
|
37
|
+
|
|
38
|
+
A manifest has `config` and `candidates`. Generate these records from the same public fields that render the human site. The CLI consumes a developer-supplied route inventory. The [workshop source](https://github.com/uppercut-labs/agent-native/blob/main/examples/site-publication/build.mjs) drives both the page and its publication records.
|
|
39
|
+
|
|
40
|
+
```json
|
|
41
|
+
{
|
|
42
|
+
"config": {
|
|
43
|
+
"enabled": true,
|
|
44
|
+
"siteUrl": "https://example.org/",
|
|
45
|
+
"title": "Workshop calendar",
|
|
46
|
+
"description": "Public event information.",
|
|
47
|
+
"full": false
|
|
48
|
+
},
|
|
49
|
+
"candidates": [
|
|
50
|
+
{
|
|
51
|
+
"id": "w17",
|
|
52
|
+
"revision": "r1",
|
|
53
|
+
"route": "/events/lantern/",
|
|
54
|
+
"visibility": "public",
|
|
55
|
+
"title": "Lantern workshop",
|
|
56
|
+
"markdown": "Doors open at 10:30.",
|
|
57
|
+
"structuredType": "WebPage"
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
"verify": {
|
|
61
|
+
"responses": [
|
|
62
|
+
{"path": "/events/lantern/", "status": 200, "contains": ["Doors open at 10:30."]},
|
|
63
|
+
{"path": "/unavailable-draft/", "status": 404}
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Keep the manifest and journal outside every served directory. A public record requires a finite site-relative route, opaque ID and revision, title and Markdown prose. Use `links` with public source IDs for navigation. A protected/draft record needs only its identifier, revision, route and visibility. The engine excludes nonpublic material from generated bytes. The private preview can include opaque source IDs. Render the returned JSON-LD on the corresponding public HTML page when selecting a structured type, and set its canonical link to the reviewed URL.
|
|
70
|
+
|
|
71
|
+
`planPublication(config, candidates)` performs an in-memory preview. Its assets are UTF-8 content, relative output paths, media types and SHA-256 digests. An error diagnostic suppresses all assets. An adapter can pass a read-only verifier as a third argument for public protocol declarations. The CLI recognizes same-site OpenAPI 3 JSON descriptions with an info record and at least one HTTP operation with an inline documented response. A protocol declaration alone cannot advertise an endpoint.
|
|
72
|
+
|
|
73
|
+
A public record can also declare `facts`: up to 20 `{"label", "value"}` pairs that restate values from its prose, such as `{"label": "Doors open", "value": "10:30"}`. Each mirror lists them under **Key facts** after the body, so an agent can quote the bare value beside a citable URL. Render the same list on the human page. Each mirror states both its canonical URL and its own URL. The generated `llms.txt` opens with a coverage statement: it counts the pages in the approved projection, says that a fact outside those pages is not published by the site, and links `llms-full.txt` when the aggregate is enabled.
|
|
74
|
+
|
|
75
|
+
A server can also return a page's mirror at its canonical URL to a client that asks for Markdown. `negotiateMarkdown({ method, pathname, accept }, markdownMirrors(plan.manifest.entries))` returns the mirror path when the `Accept` header names `text/markdown` at least as strongly as HTML. Browsers never send it, so they keep the HTML. Send `Vary: Accept` from those routes whichever representation you serve. `markdownNegotiationHandler(mirrors, read)` wraps the same decision as Node `(req, res, next)` middleware; `read` returns the mirror bytes from your generated asset directory.
|
|
76
|
+
|
|
77
|
+
## Change or withdraw content
|
|
78
|
+
|
|
79
|
+
Regenerate the manifest when a source changes, preview the diff and apply the new digest. Removing a candidate, changing it to private, or disabling the aggregate withdraws owned files on the next approved apply. Publish the changed human site and assets together and invalidate the host's public caches. Check its actual URLs again, including any retired mirror paths through `verify.responses`.
|
|
80
|
+
|
|
81
|
+
`restore-preview` shows the owned files that restoration would remove. Run `restore` with the digest from that preview. Modified owned files produce a conflict and the command leaves their content intact. Resolve edits before retrying. The journal tracks only files created by the CLI. Empty generated directories may persist.
|
|
82
|
+
|
|
83
|
+
## Operational boundaries
|
|
84
|
+
|
|
85
|
+
Use an offline build or staging output under a single writer. Review first, apply, verify, then promote the complete build with the hosting platform’s deployment mechanism. The CLI checks existing path components and file digests, rejects symlinks and human-owned collisions, uses a private lock for writes and rolls back ordinary write failures. Keep a backup of the last accepted build. After a hard process or machine interruption, inspect the private recovery record and the target before resuming. The private `pending.json` includes the approved transaction digest, prior ownership, per-file before/after hashes and base64 originals. A matching transaction in `ownership.json` means the new journal was committed. Otherwise, compare each affected file to the recorded hashes before restoring an original or removing a newly created file. Preserve any unexpected human edits. Remove the recovery record and stale lock only after confirming the writer has stopped and reconciling all files. Never deploy the state directory. This executable operates independently of the app-owned capability CLI and its authorization model.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Stability and versioning
|
|
2
|
+
|
|
3
|
+
From 1.0.0, Agent Native follows [semantic versioning](https://semver.org/) for its **stable** entry points. **Experimental** entry points are published and documented, but may change in a minor release. Each change appears in the [changelog](https://github.com/uppercut-labs/agent-native/blob/main/CHANGELOG.md) with a migration note.
|
|
4
|
+
|
|
5
|
+
## Entry points
|
|
6
|
+
|
|
7
|
+
| Import specifier | Class | Covers |
|
|
8
|
+
| --- | --- | --- |
|
|
9
|
+
| `@uppercut-labs/agent-native` | Stable | Definitions, bindings, registry, executor, composition, diagnostics, discovery, grants |
|
|
10
|
+
| `@uppercut-labs/agent-native/contracts` | Stable | `defineCapability`, identities, risk and access |
|
|
11
|
+
| `@uppercut-labs/agent-native/registry` | Stable | `bindCapability`, `createCapabilityRegistry` |
|
|
12
|
+
| `@uppercut-labs/agent-native/executor` | Stable | `executeCapability`, callers, authorization port, results |
|
|
13
|
+
| `@uppercut-labs/agent-native/composition` | Stable | Capability packs, aliases, migrations, surface names |
|
|
14
|
+
| `@uppercut-labs/agent-native/diagnostics` | Stable | Diagnostic observations |
|
|
15
|
+
| `@uppercut-labs/agent-native/auth` | Stable | Trusted principals, grant store port, grant authorization |
|
|
16
|
+
| `@uppercut-labs/agent-native/schema/zod` | Stable | `fromZod` |
|
|
17
|
+
| `@uppercut-labs/agent-native/http` | Stable | Public-read HTTP and OpenAPI |
|
|
18
|
+
| `@uppercut-labs/agent-native/mcp` | Stable | Remote MCP over Streamable HTTP |
|
|
19
|
+
| `@uppercut-labs/agent-native/cli` | Stable | Application-owned CLI runner and result schema |
|
|
20
|
+
| `@uppercut-labs/agent-native/publication` | Experimental | Unreleased public-content manifest and rendering API |
|
|
21
|
+
| `@uppercut-labs/agent-native/browser` | Experimental | WebMCP follows a draft browser API |
|
|
22
|
+
| `@uppercut-labs/agent-native/mcp-apps` | Experimental | MCP Apps extension; no commercial host rendering is verified |
|
|
23
|
+
| `@uppercut-labs/agent-native/astro` | Experimental | Framework integration tied to tested Astro releases |
|
|
24
|
+
| `@uppercut-labs/agent-native/next` | Experimental | Framework integration tied to tested Next releases |
|
|
25
|
+
| `@uppercut-labs/agent-native/next/browser` | Experimental | Next browser registration |
|
|
26
|
+
| `@uppercut-labs/agent-native/init` | Experimental | Narrow existing-project init |
|
|
27
|
+
| `@uppercut-labs/agent-native/doctor` | Experimental | Diagnostics checks and report format |
|
|
28
|
+
| `@uppercut-labs/agent-native/harness` | Experimental | Provider-neutral harness contracts |
|
|
29
|
+
| `@uppercut-labs/agent-native/harness/mcp-bridge` | Experimental | Loopback MCP bridge |
|
|
30
|
+
| `@uppercut-labs/agent-native/harness/codex` | Experimental | Local Codex app-server adapter |
|
|
31
|
+
|
|
32
|
+
Paths not listed above, such as `dist/` files, are internal and may change at any time. The package's `exports` map blocks them.
|
|
33
|
+
|
|
34
|
+
## What counts as a breaking change to a stable entry point
|
|
35
|
+
|
|
36
|
+
The following need a new major version:
|
|
37
|
+
|
|
38
|
+
- Removing or renaming an export, or making a required parameter or option out of an optional one.
|
|
39
|
+
- Narrowing an accepted input type or widening a returned type in a way that breaks existing callers.
|
|
40
|
+
- Changing documented behavior a caller can rely on: execution order (input validation, then authorization, then the binding, then output validation), failure reasons, MCP tool naming by default, discovery and authorization outcomes, the result shape, and the HTTP routes and OpenAPI output for public reads.
|
|
41
|
+
- Dropping support for a Node.js major line, or for a tested optional peer version line, listed in [installation](installation.md).
|
|
42
|
+
|
|
43
|
+
The following can ship in a minor version: new exports, new optional options, new fields on returned objects, new failure reasons behind an existing generic client message, and support for new peer or runtime versions. Patch versions fix defects without changing documented behavior. A security fix may tighten behavior in a minor or patch release; the changelog marks it.
|
|
44
|
+
|
|
45
|
+
Deprecated stable APIs keep working for at least one minor release, and until the next major, with a changelog note naming the replacement.
|
|
46
|
+
|
|
47
|
+
## How the guarantee is enforced
|
|
48
|
+
|
|
49
|
+
`npm run check:api` compares the declaration files reachable from every stable entry point with `api/stable-api.txt`. Any change fails the check until the baseline is regenerated with `node scripts/check-api.mjs --update` and the change is reviewed against this policy. Comment-only edits do not count. The check runs in CI as part of `npm run check`.
|
|
50
|
+
|
|
51
|
+
## Runtime and peer support
|
|
52
|
+
|
|
53
|
+
The package requires Node.js 22 or newer. Optional peers are pinned to the versions the test suite exercises; see [installation](installation.md). Widening a peer range to a newly tested line is a minor change.
|