Repository navigation
Asset reference diagnostics, local agent bootstrap, SPA and headless-auth recipes, forms inline success (#805, #807, #808, #809, #810) - #813
Merged
Conversation
…status (#805) A flow may declare `success: {mode: inline, status: 200|201}` to answer a valid POST with its confirmation (title, message, opted-in `show` values, escaped, no-store) in the response body. Redirect-after-POST (303 to <mount>/confirmation) stays the default. `status` defaults to 200 inline and is refused with `mode: redirect`; any other mode or status is refused at activation. Same-origin, CSRF token/binding cookie, abuse admission, field validation (422), onSubmit and notify run first, unchanged. Inline mode seals no handoff cookie, so a later GET shows an empty form; a filled honeypot gets the fixed inline confirmation. `success` is part of formFlowBodySchema. FormsFlow exposes `success` and confirmationPage accepts `status: 200|201` (export contract stays version 1, additive). form-records honours it: an inline create answers the saved record's confirmation (201 adds Location: <mount>/<id>), an inline edit 200. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…issing assets (#808) A missing page/download/static reference used to surface as the bare system message "Required file or directory not found". Each reference is now resolved by one check in assets.ts that fails naming the route, the YAML field and its file:line:column (recorded by the config worker), the reference as written and that references resolve relative to the selected project directory. When the reference starts with the project directory's own name (app/assets for a project at app/), it suggests the shorter reference, only when that exists inside the project. Function and middleware sources get the same hint. Absolute, `..` and symlinked references are refused before any lookup outside the project and are never echoed (#610). The sitemap walker now checks a reference before reading it: before this, `site.sitemap` with `static.directory: ../x` read outside the project and answered differently depending on whether the target existed. validate/inspect (MCP validate) and get_context check the references after the routes compile, with the same message, without reading asset bytes. Activation keeps target compatibility ahead of asset checks. Co-Authored-By: Claude Opus 5.5 <[email protected]>
URLCode has no native SPA fallback. Per the owner decision on #809, publish the proven composition as a first-party recipe instead of new YAML: native page (/), static assets (/assets/*), a respond JSON endpoint (/api/status) and a root /* static mount, plus a small operator plugin in the README's host file (composeHost(import.meta.url, [], {plugins: [spaShell()]})). The plugin acts only on the catch-all route via onRequest: extensionless GET/HEAD paths get the shell, unmatched /api paths get a JSON 404 for any method, and other methods, excluded prefixes and file-like paths fall through to the mount (405, the file or 404). It never rewrites a response, and a protected catch-all is authorized before it runs. The shell must resolve inside the project. Tests drive the README host over real HTTP (unseen deep paths, query strings, HEAD, 405s, assets/API exclusions, dot paths, a protected catch-all, containment), run the fixtures through the CLI with --host-file, and the package smoke runs them from the packed install. Docs that say "no SPA fallback" now link the recipe; the recipe index, AI authoring table, llms files and authoring skill list it. Package budget raised for the added recipe files. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Add recipes/headless-auth-profile: register, sign in, read and update the auth-owned profile, keep one application profile per user and sign out, composed from existing public contracts only. Auth's JSON endpoints serve /account/*; an ownership: owner store collection behind auth: true holds the application's profile fields, so another user's record is a 404. No function, no secret in the project; the README states every request and response shape, status code, header and owner boundary. - packages/auth/test/headless-auth-profile-recipe.test.ts composes the real audit, mail, ui, auth and store definitions through composeHost and drives register, login, both profile reads and updates, CSRF and origin refusals, cross-user 404s, logout and the revoked session's 401s, plus the recipe's signed-out fixtures. auth gains a store devDependency for it. - scripts/workspaces.ts orders an add-on after the sibling add-ons its package.json lists as devDependencies, so a clean serial verify builds store before auth's tests import it; ci-plan's per-package deps match. - Catalog, planner terms, RECIPES.md, AI-AUTHORING.md, llms.txt, the auth llms.txt and JSON API page, and the authoring skill link the recipe as the bounded entry point; the core package budget grows by the recipe's bytes. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ability catalog (#807) `urlcode bootstrap [DIR] [--capabilities a,b] [--target T] [--origin URL] [--create] [--json]`, and MCP `get_context` with `bootstrap: true`, return in one local call: whether DIR holds a site, its root, route project, entry and host file; the running runtime's version and schema digest against the site's pinned and installed runtime (a mismatch withholds the packet); exact start/dev/validate/test/context commands to run from the quoted site root; the site/project file-reference mapping with a concrete example and the site directories YAML cannot reach (a supplied frontend); and, only for named capabilities, a bounded packet (at most 8) of this runtime's schema fragments, constraints, target support and the shortest bundled example. Unknown names, add-on names and target refusals are reported, not guessed. Nothing is written unless --create names a destination, which delegates to init once; it is refused at an app/ directory and inside a project, so no app/app. No network, hosted service or MCP is needed. The authoring skills, llms.txt and AI-AUTHORING lead with it; TOOLING.md documents it. The core packed/unpacked budgets rise for the new module. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Measured on the merged branch (Node 26): 827444 packed, 3290761 unpacked, 485 entries. Budgets: 812 KiB packed, 3220 KiB unpacked, 495 entries. Co-Authored-By: Claude Opus 5.5 <[email protected]>
jimhoyd
enabled auto-merge (squash)
September 27, 2026 07:33
…xists Windows CI (verify windows-latest, 24, 1) failed two bootstrap tests with a null exit status: the emitted commands were spawned via /bin/sh, which Windows runners do not have. Skip only that shell step on win32, as test/context-commands.test.ts already does; the site/project mapping check runs there through the CLI with the same arguments, so the rest of both tests still runs on Windows. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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
This PR covers five issues. The owner decided the approach for #805, #807 and #809 on 2026-09-27; the decisions are recorded on each issue.
#808: missing file and directory references name the route, field and project root
Before:
static.directory: app/assetsprinted onlyRequired file or directory not found.Now: the error gives
urlcode.yaml:5:7: Route /assets/*: static.directory "app/assets" does not exist; … resolve relative to the selected project directory …; did you mean "assets"?together withcode,route,pointer,file,lineandcolumn.site.favicon,llmsandnotFound. Theapp/…hint appears only when the shorter path exists inside the project as the right kind (file or directory).../outsideexisted, and read that directory. The sitemap walker now checks each reference first.validate,inspectandget_contextnow check references the same way, and their text matches the CLI. They now fail where only activation did before.#809:
spa-shellrecipe (owner decision: a recipe, no new YAML)/,/assets/*,/api/statusand a root/*static mount. A minimal plugin serves the shell only for extensionless GET and HEAD on/*, and returns a JSON 404 for unmatched/api/*.#810:
headless-auth-profilerecipe@1) plus an owner-scoped store collection already cover register, login, profile read and update, logout and cross-user denial. No new API and no project code were needed.packages/auth/test/headless-auth-profile-recipe.test.ts, run against the real auth and store extensions.scripts/workspaces.tsalso orders packages by sibling devDependencies.ci-plan, auth and admin now also depend on store.#805: forms opt-in inline success (owner decision)
flows.<name>.success: {mode: redirect|inline, status?: 200|201}. The default is still the 303 redirect.no-storeand no handoff cookie, so a fresh GET shows an empty form.onSubmitandnotifyall run unchanged first.Location.success,confirmationPage({status}),FormSuccessandFormSuccessSpec.#807:
urlcode bootstrap, a local agent bootstrap (owner decision: local only; #806 deferred)urlcode bootstrap [DIR] [--capabilities …] [--target T] [--origin URL] [--create] [--json]. It is also available through MCPget_context {bootstrap: true}, which is read-only.matched,mismatchedorunverified). It also includes exact quoted commands, the site-to-project path mapping, and a packet for explicitly named capabilities (at most 8): schema fragments, constraints, target support and the smallest example.--createand an explicit directory, which hands off to init. It refuses app/app and locations inside a project, and repeated runs change nothing.Follow-ups filed
urlcode testfixtures can't carry a cookie session.uimount.Verification
npm run verifyexits 0 on this exact tree. Core: 1024 pass. Every workspace suite has 0 failures; forms has 57 and auth 266, both including the new tests.test:addonspasses 4/4.npm run test:packageexits 0: "39 packaged example commands ran from consumer copies; Packed installation and starter/cookbook checks passed".Core package budget, raised deliberately in
scripts/package-audit.tsfrom the merged measurement:New tests:
test/asset-reference-errors.test.tstest/spa-shell-recipe.test.tstest/bootstrap.test.tspackages/auth/test/headless-auth-profile-recipe.test.tsLimitations
[Gap]: Evaluate inline forms confirmation while preserving CSRF admission #805: refreshing an inline confirmation page offers to re-POST, which counts as a new submission while the token is valid. This is documented and is why redirect stays the default. The old benchmark still won't pass as a real forms test, because its fixtures send no CSRF token.
[Request]: Compose local agent bootstrap with explicit roots and revision-matched contracts #807:
--createcan't wrap a directory that already holds a frontend, because init refuses a non-empty directory.<site>/node_modules.[Request]: Support a bounded declarative SPA shell fallback or first-party composition #809:
/*route run after plugins, so they are skipped for shell answers.[Request]: Evaluate a tested headless auth and profile composition recipe #810: the
init --with ui,auth,storepath in the README was not run here, because it downloads release tarballs.General: tested in-process and on macOS/Node 26 only. There has been no independent security review.
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.
Closes #805
Closes #807
Closes #808
Closes #809
Closes #810
🤖 Generated with Claude Code