Repository navigation
feat: operator alias origins for every same-origin check; release-pinned add-on agent catalog (#717, #721) - #730
Merged
Merged
Conversation
…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
…module (#717) 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem and change
--alias-origin <origin>ondev,serve,validate,test,routes,auditandbenchmark;aliasOriginsoncreateRuntime/startServer/runProjectTests; and on AWS and Vercel, analiasOriginshandler option orURLCODE_ALIAS_ORIGINS. Never in project or extension YAML.packages/core/src/site-origins.ts, before the project loads. Entries must be absolutehttps:origins (http:only for loopback), with no path, query, fragment, credentials or wildcards. There are at most 16, and--originis required. Entries are normalized and deduplicated, and the canonical origin is always first.ExtensionActivation.origins(frozen) andisSiteOrigin(context, value)from@jimhoyd/urlcode/extensions. Core still names no extension.Origin.Origin, withRefereras fallback.Origin.AuthHttp.verify.Originis 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.dist/addon-catalog.json, next todist/addons.json, generated at build time from every add-on'surlcode.json. For each add-on it lists name, kind, package, version, description,requiresand the descriptor'sagentblock. It holds metadata only: no URLs, hashes, code or activation.build-addon-manifest --checknow runs in the UbuntuactionCI job as well as inverify.release-packrefuses a core tarball whose catalog differs from the packed add-on descriptors.readAddonCatalog(), exported from@jimhoyd/urlcodeand@jimhoyd/urlcode/agent-context, never imports an add-on. New read-only MCP toolget_release_addon_catalog, documented as release-wide discovery, not evidence of installation.Verification
Run on Node v26.10.0:
npm run verify: exit 0. Root 835 tests; workspaces 34, 97, 232, 29, 43 and 66; thentest:addons4. All 0 failures, includingbuild-addon-manifest --checkandaudit:packages. This ran on the same commits before they were moved ontomain; 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.test/site-origins.test.ts: validation, normalization, the CLI flag and adapter env, and runtime refusal before activation.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