@uppercut-labs/agent-native
v1.2.0
Published
Typed, permission-checked capability contracts with stable HTTP, CLI and MCP adapters and experimental browser/framework integrations.
Readme
Uppercut Agent Native
Uppercut Agent Native defines typed capability contracts once and serves them on local,
HTTP, CLI, MCP, Node/Hono, browser, and Astro static/on-demand surfaces. It is distributed as
@uppercut-labs/agent-native under the MIT license. See installation
for the first programmatic capability.
To expose a real operation from a working app, start with adopt an existing site. For a coding assistant, use the portable skill or standalone prompt. Node.js 22+ is required. Eleven entry points are stable under SemVer; browser, framework, init and harness integrations are experimental. See stability. The package ships importable capability APIs and an app-owned CLI runner. Version 1.1.0 added an experimental site publication CLI and eight native framework examples; version 1.2.0 adds experimental interactive UI patterns that run as MCP App views.
1.2.0 on npm
@uppercut-labs/[email protected] is published to npm. Install it with npm install @uppercut-labs/[email protected]. This release adds experimental /ui subpaths: a review queue, a probability explorer and a media annotation view built on a bounded A2UI 1.0 catalog, with a React renderer and MCP Apps presentation (E13). Version 1.1.0 added the experimental /publication API and agent-native-site executable for reviewed public site content, plus eight runnable framework integrations. Read the site publication guide before using either. The source changes are still in PR #10, not the default main branch; examples and build commands in this checkout apply to the 1.2.0 feature branch. A registry release does not by itself establish hosted compatibility or production deployment approval.
Current scope
UAN-001 established the strict TypeScript baseline, Zod adapter, JSON Schema projection checks, and stable diagnostic observations. UAN-002 adds immutable capability definitions, explicit runtime bindings, a checked registry, per-invocation authorization, and shared input/output validation. E01 exercises shared album lookup and a static Astro site integration; E12 is a shared unit-converter example; E05 covers local and HTTP execution through the CLI. UAN-008 adds E04, a locally verified Worker sidecar for the same E01 contract while the Astro site remains static.
UAN-009 adds a programmatic, plan-first retrofit for a narrowly recognized existing Astro static site. It tracks owned files, rechecks the plan before applying, and protects human edits during restoration. The E01 check installs a local tarball into a copied site and builds the retrofit. See the experimental init guide for its limits; no package-level init command exists.
UAN-010 adds trusted principal and durable grant contracts. E07 demonstrates a local persistent grant store with the official MCP SDK bearer gate, two fixture tenants, repeated protected edits, separate delete permission, restart persistence and revocation. See permissions and discovery. The E07 identities and store are test-only and refuse production mode.
UAN-017 adds independent major-version composition and reviewed migration policy. V1 and v2 can coexist and be selected by exact identity; aliases always target one canonical major. Structural reports cover represented schema/risk/access changes, while semantic review and lifecycle state are explicit. See composition and versioning and the E08 fixture.
Run npm run example:e01, npm run example:e08, npm run example:e12, or npm run example:e05 to build and pack the
package, install it independently into each example, and run its tests and runnable surface. E05
uses one registry in a pinned Node/Hono host for generated HTTP and MCP plus local/remote CLI. E01
also verifies a pre-existing multi-page static Astro fixture before and after integration. E04 checks a local workerd HTTP/OpenAPI roundtrip and official MCP client exchange; it does not deploy or configure DNS.
E02 verifies Astro 7.3.5 on-demand routes with the official Node standalone adapter. It keeps the human catalog and unrelated pages prerendered while serving authenticated Agent Native HTTP and MCP routes from one shared contract, binding, authorization policy, and executor path.
The root, ./contracts, ./registry, and ./executor entrypoints use only portable core modules.
They do not import Zod, Node, DOM, framework, provider, or server modules. Optional peers are
installed by the host only for the adapters it imports; see installation. npm run check compiles
and scans browser output against a fake server-secret sentinel. This is a boundary regression
check, not proof of compatibility with any real browser, client, or host.
Every execution requires an AuthorizationPort; there is no implicit allow-all path. The executor
checks input, authorization, handler, and output in that order. Runtime matching is exact, and
multiple matching bindings require a bindingId. Durable grants are available through the
application-owned GrantStorePort; production identity, persistence and resource policy remain
host responsibilities. See the capability and binding guide
for the frozen signatures and limitations.
Programmatic harness contracts
The isolated @uppercut-labs/agent-native/harness export defines provider-neutral
sessions, turns, feature negotiation, bounded normalized events, and stable failures.
Harness control is a sibling of capability execution and preserves its authorization
boundary. The Node-only /harness/mcp-bridge export serves an application-supplied
MCP handler on loopback with managed cleanup. The isolated /harness/codex adapter
controls an installed Codex app-server using managed ChatGPT sign-in; its local
Luna two-turn/resume proof passed. Cursor adapters remain future work. See
harness contracts and Codex lifecycle.
HTTP and OpenAPI
The separate @uppercut-labs/agent-native/http entrypoint provides a framework-neutral Web
Request/Response handler. It exposes deterministic invocation routes for explicit public read
capabilities, including validated GET overrides, generates OpenAPI 3.1 from those contracts, and serves protocol health evidence.
Protected capability schemas and routes are omitted from this initial HTTP projection. See
the HTTP guide for response mappings, body/deadline limits, and integration boundaries.
Browser tools
The isolated @uppercut-labs/agent-native/browser entrypoint feature-detects the current WebMCP
document.modelContext API and owns registrations with an AbortSignal. It projects only definitions
with browser bindings; public reads are exposed by default, while protected tools require an explicit
projection policy and are still authorized on every call. Unit and example fixtures use a simulated
API. E01 and E06 also passed against native WebMCP in Chrome 155 with its opt-in WebMCP feature; no
shipping browser agent is claimed. See the browser guide and the
native Chrome evidence.
Astro sites
The isolated @uppercut-labs/agent-native/astro integration injects an application-owned browser
entry with Astro's page-script hook and validates the selected static or on-demand mode. It never
installs a server adapter. E01 remains wholly static; E02 uses application-owned Astro endpoints and
the official Node standalone adapter while retaining prerendered pages and navigation. See
static-site guidance, framework support, and
UAN-007 evidence.
Next.js App Router
The isolated next entrypoint adapts the existing HTTP and official MCP handlers to Next 16.3.8
Node-runtime route exports without importing Next into core or Astro consumers. Browser bootstrap
code lives at next/browser and resyncs explicitly from usePathname() while preserving a normal
browser fallback. E03 retains its pre-integration fixture and verifies a generated, locked
after-state. See Next.js App Router and
UAN-014 evidence.
Remote MCP
The isolated @uppercut-labs/agent-native/mcp entrypoint uses the official MCP server SDK over
Streamable HTTP. It exposes explicitly public read capabilities by default and can discover
protected capabilities only with an explicit callback and verified auth integration. It filters
discovery per request and reauthorizes every call through the shared executor. Results place the
canonical value under structuredContent.result. See the MCP guide and
fixture-tested compatibility. The fixture covers the official SDK client
and server packages at version 2.3.0 and the negotiated protocol version 2025-11-25; this is not a
claim that every commercial client or deployment host is supported.
Generated CLI
The separate @uppercut-labs/agent-native/cli runner entrypoint builds help and typed field flags from registry schemas. Calls select --mode local|remote explicitly; remote calls also select a configured credential profile and use a bounded HTTP request. Invocations write one uan.cli-result/v1 JSON envelope to stdout and redacted target/failure diagnostics to stderr. No general-purpose capability CLI executable ships; applications expose that runner with their own registry. The separate experimental agent-native-site executable is available since 1.1.0 for reviewed content publication. See the CLI guide and the installed E05/E12 examples.
Diagnostics
The ./doctor entrypoint builds versioned findings, required-check profiles, read-only registry
inspection, and policy-filtered capability lists. E11 packs the package into a fault/repair lab;
its local profile reports only local evidence, and the default full profile remains incomplete
without an explicit loopback probe. See doctor and troubleshooting.
Development
Requires Node.js 22 or newer and npm.
npm ci
npm run format
npm run format:check
npm run lint
npm run typecheck
npm test
npm run build
npm run example:e01
npm run example:e02
npm run example:e12
npm run example:e05
npm run example:e07
npm run check:portability
npm run checkThe schema spike checks album lookup and unit conversion input/output shapes with Zod 4, then validates exported draft-2020-12 schemas independently with Ajv. JSON Schema projection throws for transforms that cannot be represented faithfully. The official MCP server SDK is an optional peer required by the isolated MCP adapter; the official MCP client SDK is pinned for the local protocol fixture only. See UAN-008 sidecar evidence for host/origin controls, revision matching, and local-only limits.
Status
Version 1.2.0 is published to npm under MIT; the corresponding source builds on PR #10 rather than the default main branch. Stable entry points follow semantic versioning; see stability and upgrading from 0.1.x. UAN-002 local acceptance and limitations are in
UAN-002 evidence; pinned tool versions and upstream references are in VERSION-EVIDENCE.md.
The current init acceptance and limits are in UAN-009 evidence.
The local trusted-auth and grant acceptance is in UAN-010 evidence.
