Repository navigation
Fixture cookie jar, init --adopt, hosted-assisted skill mode, headless ui docs (#806, #811, #812, #814) - #815
Merged
Merged
Conversation
Local-only authoring stays the default. When the user explicitly asks for URLCode AI, the skill bootstraps first, then calls urlcode_task_plan before writing YAML: over a registered hosted MCP server when there is one, else through hosted-plan.mjs, a bounded HTTP fallback shipped beside SKILL.md (initialize, notifications/initialized, tools/call against https://api.urlcode.ai/mcp; 20 s deadline, 1 MiB reply cap, structured JSON result). It sends only `task` (the published input schema's one argument), refuses secret-looking text, compares the kit's pinned runtime with the site's and withholds a mismatched kit. Only `hostedGuidance: used` may be claimed. The plugin generator now copies a skill's supporting files; the hosted endpoint pin follows the service's own llms.txt. Tests use a local mock MCP server only. Co-Authored-By: Claude Opus 5.5 <[email protected]>
) urlcode init DIR --adopt (and bootstrap DIR --create --adopt) computes init's full write set first, including npm's node_modules and package-lock.json with --with. Any collision (an existing path init writes, a file or symlink where it needs a directory, anything at app/) is refused with the colliding paths listed and nothing written. Otherwise only new files are written with exclusive creation, never through a symlink, and the top-level entries left alone are reported. An add-on scaffold file under an adopted entry refuses and undoes the whole init. Adoption keeps the app/ and inside-a-project guards; a directory that already holds a site is recognized and refused with no writes. Plain init keeps refusing user files and names --adopt when it would succeed; bootstrap's next step does the same. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The hosted-assisted work moved the documented endpoint to api.urlcode.ai/mcp after reading the served llms.txt. urlcode-ai's own source says otherwise: docs/OPERATIONS.md names https://urlcode.ai/mcp as the sole documented MCP endpoint, and app/functions/llms.mjs emits `${publicOrigin}/mcp`, moving only the skills/feedback REST endpoints to api.urlcode.ai. Restore urlcode.ai/mcp in the skill, its helper default, TOOLING/AI-AUTHORING, llms files, the agent-facts pin and the tests. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…recipe lifecycle as fixtures (#811, #812) #811: each `steps` fixture is one client with its own RFC 6265 cookie jar, created empty per fixture and never shared with another fixture or run. The jar honours Domain, Path (with the default path), Secure, Expires and Max-Age (deletion on zero, negative or past), and the __Secure-/__Host- prefixes. It is a client of the site origin (--origin, else the local loopback address; the --target for verify-deployment); Secure cookies are kept for https or loopback origins. An explicit `cookie` step header is sent as written and the jar adds only the names it does not send. A new capture form {"cookie": "name"} keeps a jar value for replay; {"header": "set-cookie"} is now refused at read time. Cookie values are redacted as <cookie NAME> in test failures, audit and verify-deployment output. recipes/headless-auth-profile now tests the signed-in lifecycle (csrf, register, login, profiles, another user denied, logout, revoked session replayed and refused) as fixtures, re-runnable against the same operator database. audit covers every /account and /api/profile method; the ui mount's content-hashed files remain uncovered, so audit is not listed. #812: document why a JSON-only auth site still declares the ui asset mount and that it is harmless (auth and ui READMEs, ui CONTRACT, recipe README). Closes #811 Closes #812 Co-Authored-By: Claude Opus 5.5 <[email protected]>
jimhoyd
enabled auto-merge (squash)
September 27, 2026 14:50
Windows CI (verify windows-latest, 24, 2) failed "an empty or missing destination is initialized exactly as before": the comparison meant to leave out package.json (it carries the directory's name, so "adopt-empty" and "empty" differ by six bytes) matched only '/package.json', and Windows snapshot paths use a backslash. Match either separator. init's output was never different. 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 four issues. The owner decided each approach on 2026-09-27, and the decisions are recorded on the issues.
#811:
urlcode testfixtures carry a cookie session between stepsstepsfixture gets its own jar (packages/core/src/cookie-jar.ts), which is dropped when the fixture ends. Jars are never shared between fixtures or runs. Arestartstep keeps the jar.Max-Agetakes precedence overExpires, and a past or zero value deletes the cookie.__Secure-and__Host-prefixes are enforced.cookieheader: takes precedence for each name it sets.{"cookie": "name"}captures a cookie value.{"header": "set-cookie"}is now refused when the file is read, where before it failed at run time.<cookie NAME>in failure diffs. Audit and verify-deployment output was already free of values, and a test asserts it stays that way.urlcode auditdoes not report the recipe ready yet. GET and HEAD on theuiasset mount stay uncovered, because it serves only content-hashed file names that a fixture can't know in advance. This is documented and asserted in the recipe test.#812: why a JSON-only auth site mounts
ui(docs only)auth requires ui, and the auth mount still serves HTML account pages to clients that don't ask for JSON. The ui mount is stateless and only answers GET or HEAD for kit files, so it's harmless. This is explained in the auth README, the ui README and CONTRACT, and the recipe README.
#814:
urlcode init --adopt(andbootstrap --create --adopt)initstill refuses a directory that holds user files; that's a documented guarantee. The refusal now says when--adoptwould work, or lists the colliding paths.--adoptcomputes init's full write set before writing anything.app, init refuses, lists the paths and writes nothing.leftAlone, bounded).app/and inside-a-project are still refused. Re-running is idempotent.--with, the add-on scaffold files are checked afternpm installhas run, and a collision undoes everything.#806: opt-in hosted-assisted mode in the urlcode-authoring skill
urlcode bootstrapruns first in both modes.urlcode_task_planbefore writing YAML. It prefers a registered hosted MCP server; the MCP setup is documented in TOOLING.hosted-plan.mjs, which ships in the npm package and the Claude plugin. It does one limited exchange withhttps://urlcode.ai/mcp:usedorversion-mismatch, or a limited failure.{task}(up to 512 characters). The runtime version is compared locally against the returned kit, and capability names go into the task text.https://urlcode.ai/mcp, checked against urlcode-ai'sdocs/OPERATIONS.md("sole documented MCP endpoint") andapp/functions/llms.mjs.api.urlcode.aiserves only the REST skills and feedback API. An earlier commit on this branch moved it toapi.urlcode.aiby mistake; that is corrected here.Verification
npm run verifyexits 0 on this exact tree:test:addons4/4.npm run test:packageexits 0: "39 packaged example commands ran from consumer copies; Packed installation and starter/cookbook checks passed".New tests:
test/fixture-cookies.test.tstest/init-adopt.test.tstest/skill-hosted-plan.test.ts, which runs against a local mock MCP server only, with no live callstest/bootstrap.test.ts,test/cli.test.ts,test/skills-export.test.tsand the headless-auth-profile recipe test.Core package budget, set from the merged measurement:
Limitations
[Request]: Add an explicit urlcode.ai-assisted workflow to the authoring skill #806: it hasn't been checked against the live hosted service: the argument name, the response shape on the deployed revision, and SSE and session behaviour are all unconfirmed. There is no evidence yet that the mode helps authoring. The secret filter is a heuristic.
[Request]: let urlcode test fixtures carry a cookie session between steps #811:
[Request]: init/bootstrap cannot create a site in a directory that already holds a frontend #814:
README.md,.gitignore,package.json) is refused, which follows the never-overwrite rule.npm install.Testing scope: tested on macOS/Node 26 locally. The Windows symlink cases in
test/init-adopt.test.tsrely on the runners allowing symlinks, as other tests already do.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 #806
Closes #811
Closes #812
Closes #814
🤖 Generated with Claude Code