Skip to content

feat: operator alias origins for every same-origin check; release-pinned add-on agent catalog (#717, #721) - #730

Merged
jimhoyd merged 3 commits into
mainfrom
claude/sleepy-shannon-xvazgl
Sep 25, 2026
Merged

jimhoyd merged 3 commits into
mainfrom
claude/sleepy-shannon-xvazgl

Conversation

@jimhoyd

@jimhoyd jimhoyd commented Sep 25, 2026

Copy link
Copy Markdown
Collaborator

Problem and change

  • Closes [Request]: allow additional Origins on an mcp mount #717: one site-wide list of alias origins, set by the operator.
    • Where it is set: repeatable --alias-origin <origin> on dev, serve, validate, test, routes, audit and benchmark; aliasOrigins on createRuntime/startServer/runProjectTests; and on AWS and Vercel, an aliasOrigins handler option or URLCODE_ALIAS_ORIGINS. Never in project or extension YAML.
    • Validation: in packages/core/src/site-origins.ts, before the project loads. Entries must be absolute https: origins (http: only for loopback), with no path, query, fragment, credentials or wildcards. There are at most 16, and --origin is required. Entries are normalized and deduplicated, and the canonical origin is always first.
    • What extensions get: ExtensionActivation.origins (frozen) and isSiteOrigin(context, value) from @jimhoyd/urlcode/extensions. Core still names no extension.
    • Checks updated:
      • mcp: Origin.
      • forms: Origin, with Referer as fallback.
      • store: write Origin.
      • auth: AuthHttp.verify.
      • admin: covered through auth.
    • Unchanged: a missing Origin is treated as before in each extension. CSRF, redirects, emails, links and passkeys use only the canonical origin; passkeys on aliases are filed as [Request]: passkey sign-in on operator alias origins #729.
    • Loopback host admission: it also admits alias Hosts, for a local reverse proxy (RIM-HOST-001).
    • Docs: new card RIM-EXT-ORIGIN-001, OPERATIONS/AWS/VERCEL/EXTENSIONS docs, per-extension READMEs, SECURITY files and CHANGELOGs, and the operations skill.
  • Closes Ship a complete release-pinned add-on agent catalog for hosted tooling #721: release-pinned add-on agent catalog.
    • What it is: dist/addon-catalog.json, next to dist/addons.json, generated at build time from every add-on's urlcode.json. For each add-on it lists name, kind, package, version, description, requires and the descriptor's agent block. It holds metadata only: no URLs, hashes, code or activation.
    • Drift checks: build-addon-manifest --check now runs in the Ubuntu action CI job as well as in verify. release-pack refuses a core tarball whose catalog differs from the packed add-on descriptors.
    • Reading it: readAddonCatalog(), exported from @jimhoyd/urlcode and @jimhoyd/urlcode/agent-context, never imports an add-on. New read-only MCP tool get_release_addon_catalog, documented as release-wide discovery, not evidence of installation.
  • Package budget: the core entry budget is raised from 450 to 460 for [Request]: allow additional Origins on an mcp mount #717's new module. Rationale is recorded next to the budget.

Verification

Run on Node v26.10.0:

  • npm run verify: exit 0. Root 835 tests; workspaces 34, 97, 232, 29, 43 and 66; then test:addons 4. All 0 failures, including build-addon-manifest --check and audit:packages. This ran on the same commits before they were moved onto main; the diff to main is unchanged.
  • npm run test:package: exit 0 on this branch. Output: "Packed installation and starter/cookbook checks passed"; 669986 packed bytes, 2748831 unpacked, 452 files.
  • New tests:
    • test/site-origins.test.ts: validation, normalization, the CLI flag and adapter env, and runtime refusal before activation.
    • Per-extension alias admitted / unlisted refused tests in mcp, forms, store, auth and admin.
    • test/addon-catalog.test.ts: generation, drift detection, refusal of malformed catalogs, and a check that no add-on module is imported. Plus MCP tool output.

Compatibility and security

  • [Request]: allow additional Origins on an mcp mount #717: opt-in. With no alias origins, every same-origin check behaves exactly as before. Aliases widen which browser origins may make state-changing requests, so they are operator-only, validated and capped.

  • Ship a complete release-pinned add-on agent catalog for hosted tooling #721: additive. One new read-only MCP tool; read-tool counts go from 33 to 34 (35 with --host-file).

  • Changes match the documented portable contract; docs/examples are updated where needed.

  • Relevant tests and package checks pass, or limitations are explained above.

  • No credentials, customer data or private project material are included.

  • Runtime/starter changes remain aligned where applicable.

🤖 Generated with Claude Code

https://claude.ai/code/session_014jmv9dMggduiprzSsNd7iP


Generated by Claude Code

…igin check (#717)

One site-wide list of additional origins, set by the operator beside the
canonical origin: repeatable `--alias-origin` on dev/serve/validate/test/
routes/audit/benchmark, `aliasOrigins` on createRuntime/startServer/
runProjectTests and the AWS/Vercel handlers (or URLCODE_ALIAS_ORIGINS).
Never project YAML.

Core validates the list before loading the project (absolute https: origins,
loopback http: allowed, no path/query/fragment/credentials/wildcards, at most
16, canonical origin required), serializes and deduplicates it, and hands it
to every extension activation as `origins` beside the unchanged canonical
`origin`. `isSiteOrigin(context, value)` from @jimhoyd/urlcode/extensions is
the one match mcp, forms, store, auth and admin now use; loopback host
admission admits alias authorities too. Generated absolute URLs, CSRF token
bindings and passkeys stay on the canonical origin.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014jmv9dMggduiprzSsNd7iP
…721)

Core's dist/ now carries addon-catalog.json beside addons.json: every
extension and artifact of the release, built from each add-on's urlcode.json
descriptor, with name, kind, package, version, description, requires and the
descriptor's agent block when declared. It is metadata only (no URL,
integrity, schema or code) and identical in a development build and a release.

- npm run build writes it; build:addons refreshes it; build-addon-manifest
  --check (npm run verify, and now CI's action job) fails when it differs from
  what the add-ons' code and descriptors say.
- release-pack refuses a core tarball whose catalog differs from the
  descriptors inside the add-on tarballs it pins.
- readAddonCatalog() is exported from @jimhoyd/urlcode and
  @jimhoyd/urlcode/agent-context; MCP get_release_addon_catalog returns it.
  Reading it opens one JSON file and imports, fetches, installs and activates
  nothing. It is release-wide discovery, not evidence of installation;
  installed components stay with get_addon_agent_tooling,
  get_extension_artifacts and get_extensions.
- package-audit requires dist/addons.json and dist/addon-catalog.json in the
  core tarball; package-smoke reads the catalog from the installed package.
- Docs: EXTENSIONS, VERSION-ALIGNMENT, AI-AUTHORING, TOOLING, TYPESCRIPT,
  RIM-ADDON-001, llms.txt/llms-full.txt.

Descriptors do not record whether an extension ships an --example, so the
catalog does not either.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014jmv9dMggduiprzSsNd7iP
@jimhoyd
jimhoyd merged commit 08c81ee into main Sep 25, 2026
23 checks passed
@jimhoyd
jimhoyd deleted the claude/sleepy-shannon-xvazgl branch September 25, 2026 04:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ship a complete release-pinned add-on agent catalog for hosted tooling [Request]: allow additional Origins on an mcp mount

2 participants