@jimhoyd/urlcode 0.4.0-alpha.3 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/skills/urlcode-authoring/SKILL.md +10 -0
- package/.claude-plugin/marketplace.json +1 -1
- package/CONTRIBUTING.md +36 -0
- package/README.md +20 -15
- package/ROADMAP.md +25 -16
- package/dist/BUILD-MANIFEST.json +20 -19
- package/dist/authoring.js +15 -1
- package/dist/capability-query.js +0 -1
- package/dist/catalog.js +0 -1
- package/dist/cli.js +24 -7
- package/dist/config.js +1 -1
- package/dist/explain.js +1 -1
- package/dist/extensions.js +78 -1
- package/dist/http-response.js +1 -1
- package/dist/index.js +1 -0
- package/dist/init-with.js +36 -11
- package/dist/manifest.js +1 -1
- package/dist/mcp-authoring.js +2 -2
- package/dist/mcp.js +1 -1
- package/dist/policies/cache.js +2 -2
- package/dist/policy.js +16 -0
- package/dist/project-dependencies.js +305 -0
- package/dist/readiness.js +5 -1
- package/dist/runtime.js +1 -1
- package/dist/tooling.js +2 -1
- package/dist/trusted-functions.js +4 -5
- package/dist/types/authoring.d.ts +9 -1
- package/dist/types/capability-query.d.ts +0 -1
- package/dist/types/catalog.d.ts +0 -4
- package/dist/types/config.d.ts +1 -9
- package/dist/types/explain.d.ts +0 -1
- package/dist/types/extensions.d.ts +58 -0
- package/dist/types/http-response.d.ts +0 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/init-with.d.ts +7 -13
- package/dist/types/manifest.d.ts +0 -1
- package/dist/types/project-dependencies.d.ts +78 -0
- package/dist/types/readiness.d.ts +3 -0
- package/dist/types/tooling.d.ts +1 -0
- package/dist/types/trusted-functions.d.ts +1 -4
- package/docs/AI-AUTHORING.md +10 -5
- package/docs/AWS.md +9 -0
- package/docs/CI-FOLLOWUP-2026-09-19.md +1 -1
- package/docs/CODEBASE-AUDIT-2026-09-20.md +6 -0
- package/docs/COMPOSING-A-SITE.md +287 -0
- package/docs/CONTAINER-PROMOTION.md +74 -0
- package/docs/DEVELOPMENT-PIPELINE.md +242 -119
- package/docs/EXTENSIONS.md +88 -93
- package/docs/FRAMEWORK.md +45 -30
- package/docs/FUNCTION-SECURITY.md +5 -8
- package/docs/INSTALL.md +13 -8
- package/docs/MIDDLEWARE.md +10 -4
- package/docs/OPEN-DECISIONS.md +64 -99
- package/docs/READINESS.md +8 -4
- package/docs/README.md +18 -13
- package/docs/RELEASE-0.4.1.md +73 -0
- package/docs/RELEASE-0.4.2.md +30 -0
- package/docs/RELEASE-READINESS.md +40 -11
- package/docs/RELEASE-SECURITY.md +33 -14
- package/docs/SPECIFICATION.md +5 -1
- package/docs/SPIKE-CORE-LAYERING.md +1 -1
- package/docs/SPIKE-DEFAULT-TRUST-MODEL.md +9 -13
- package/docs/STARTERS.md +17 -5
- package/docs/TOOLING.md +7 -5
- package/docs/VERCEL.md +10 -2
- package/docs/VERSION-ALIGNMENT.md +50 -8
- package/docs/archive/2026-09-19/ROADMAP.md +1 -0
- package/docs/archive/2026-09-19/SPIKE-EXTENSION-MODEL.md +1 -0
- package/docs/{SPIKE-LAMBDA-COMPILE.md → archive/2026-09-19/SPIKE-LAMBDA-COMPILE.md} +168 -12
- package/docs/archive/2026-09-19/SPIKE-MONOREPO.md +2 -0
- package/docs/archive/2026-09-20/OPEN-DECISIONS-COMPLETED.md +116 -0
- package/docs/archive/README.md +2 -0
- package/docs/yaml/functions.md +10 -2
- package/docs/yaml/middleware.md +5 -3
- package/examples/cookbook/middleware/envelope.mjs +4 -2
- package/llms-full.txt +458 -143
- package/llms.txt +2 -1
- package/package.json +8 -5
- package/packaging/claude-plugin/.claude-plugin/plugin.json +1 -1
- package/packaging/claude-plugin/skills/urlcode-authoring/SKILL.md +10 -0
- package/recipes/middleware/middleware/envelope.mjs +4 -2
- package/skills/urlcode/SKILL.md +8 -1
package/llms.txt
CHANGED
|
@@ -66,7 +66,8 @@ fields or bypass target limits or operator grants. See [the design principle](do
|
|
|
66
66
|
- [Interchange](docs/INTERCHANGE.md), [bulk import](docs/BULK.md), [recipes](docs/RECIPES.md) (`urlcode recipes search`, `examples search`), [TypeScript guests](docs/TYPESCRIPT-AUTHORING.md).
|
|
67
67
|
|
|
68
68
|
## Extensions (accounts, administration, presentation)
|
|
69
|
-
- [Extensions](docs/EXTENSIONS.md): `extensions.<name>` blocks,
|
|
69
|
+
- [Extensions](docs/EXTENSIONS.md): `extensions.<name>` blocks, mounts, policies, operator registration, the shared trusted hook primitive and its machine-readable hook contracts. UI/auth/admin project hooks run trusted in-process; contract v1 rejects `sandbox: true`.
|
|
70
|
+
- [Composing a site](docs/COMPOSING-A-SITE.md): what `urlcode init site --with ui,auth,admin` wires, which `--with` combinations are supported, the presentation override paths under `ui/`, and per-package lifecycle hook input, verdict, timing and failure semantics. Separates declarative configuration, project functions and the TypeScript a new extension needs.
|
|
70
71
|
- [urlcode-auth](packages/auth): npm: @jimhoyd/urlcode-auth; accounts, sessions, MFA, roles, account page; its own llms.txt. Lives in this repository as a workspace package.
|
|
71
72
|
- [urlcode-admin](packages/admin): npm: @jimhoyd/urlcode-admin; users, sessions, roles, audit, cases; its own llms.txt. Lives in this repository as a workspace package.
|
|
72
73
|
- [urlcode-ui](packages/ui): npm: @jimhoyd/urlcode-ui; escaped templates, shadcn/ui partials, themes, translations; its own llms.txt. Lives in this repository as a workspace package, not in a separate repository.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jimhoyd/urlcode",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "Portable runtime for programmable URL behavior",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"workspaces": [
|
|
@@ -104,7 +104,8 @@
|
|
|
104
104
|
"typecheck": "tsc -p tsconfig.json",
|
|
105
105
|
"test": "node --conditions=development --test test/*.test.ts",
|
|
106
106
|
"lint": "eslint .",
|
|
107
|
-
"check": "
|
|
107
|
+
"check": "npm run check:code && npm run check:docs",
|
|
108
|
+
"check:code": "node scripts/check.ts && node scripts/check-release-tags.ts && node scripts/check-workspace-links.ts && npm run release:check",
|
|
108
109
|
"verify": "npm run lint && npm run typecheck && npm run check && npm run build && npm test && npm run verify:workspaces",
|
|
109
110
|
"workspace:styles": "npm run styles --workspace @jimhoyd/urlcode-ui",
|
|
110
111
|
"verify:workspaces": "npm run verify --workspace @jimhoyd/urlcode-ui && npm run verify --workspace @jimhoyd/urlcode-auth && npm run verify --workspace @jimhoyd/urlcode-admin && npm run test:workspace-integration",
|
|
@@ -128,7 +129,7 @@
|
|
|
128
129
|
"benchmark:sandbox-vs-trusted": "node benchmarks/sandbox-vs-trusted.ts",
|
|
129
130
|
"benchmark:agent": "node benchmarks/agent/run.ts",
|
|
130
131
|
"sync:agents": "node scripts/sync-agent-lists.ts",
|
|
131
|
-
"check:docs": "node scripts/check-trust-model-prose.ts && node scripts/check-guidance-claims.ts && node scripts/generate-yaml-reference.ts --check && node scripts/build-llms-full.ts --check && node scripts/build-cookbook-index.ts --check && node scripts/generate-claude-plugin.ts --check",
|
|
132
|
+
"check:docs": "node scripts/check-trust-model-prose.ts && node scripts/check-local-links.ts && node scripts/check-guidance-claims.ts && node scripts/generate-yaml-reference.ts --check && node scripts/build-llms-full.ts --check && node scripts/build-cookbook-index.ts --check && node scripts/generate-claude-plugin.ts --check",
|
|
132
133
|
"ci:plan": "node scripts/ci-plan.ts",
|
|
133
134
|
"test:package:built": "node scripts/package-smoke.ts",
|
|
134
135
|
"release:status": "node scripts/release.ts status",
|
|
@@ -136,10 +137,12 @@
|
|
|
136
137
|
"release:publish": "node scripts/release.ts publish",
|
|
137
138
|
"release:run": "node scripts/release-run.ts",
|
|
138
139
|
"release:peers": "node scripts/release.ts peers",
|
|
139
|
-
"release:check": "node scripts/release.ts check",
|
|
140
|
+
"release:check": "node scripts/release.ts check && node scripts/release-prepare.ts --check",
|
|
140
141
|
"ci:history": "node scripts/ci-history.ts",
|
|
141
142
|
"ci:report": "node scripts/ci-report.ts",
|
|
142
|
-
"test:workspace-integration": "node --test test/workspace-scaffold.integration.ts"
|
|
143
|
+
"test:workspace-integration": "node --test test/workspace-scaffold.integration.ts",
|
|
144
|
+
"release:prepare": "node scripts/release-prepare.ts",
|
|
145
|
+
"release:template": "node scripts/release-template.ts"
|
|
143
146
|
},
|
|
144
147
|
"repository": {
|
|
145
148
|
"type": "git",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "urlcode",
|
|
3
3
|
"description": "Authoring and operating URLCode projects: the implemented YAML contract, capability limits, deployment and verification commands for the pinned runtime revision.",
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.2",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "jimhoyd-com",
|
|
7
7
|
"url": "https://github.com/jimhoyd-com"
|
|
@@ -30,6 +30,11 @@ Start with `urlcode context --project <dir> --budget 4000`, then retrieve the
|
|
|
30
30
|
capability, schema fragment, recipe or example relevant to the change. Use the
|
|
31
31
|
read-only MCP equivalents when available. `llms.txt` is the index; read the
|
|
32
32
|
matching task guide from `docs/` when a query needs more explanation.
|
|
33
|
+
When the project has an operator host file, inspect `urlcode extensions
|
|
34
|
+
--project <dir> --host-file <absolute-file> --json` (MCP: `get_extensions`)
|
|
35
|
+
before writing extension configuration or project hooks. The report is the
|
|
36
|
+
machine-readable source for config/policy schemas and hook names, purposes and
|
|
37
|
+
input/output schemas.
|
|
33
38
|
`docs/SPECIFICATION.md` and `schemas/urlcode.schema.json` resolve contract
|
|
34
39
|
questions. Archived plans are historical, not valid YAML guidance.
|
|
35
40
|
|
|
@@ -49,6 +54,11 @@ questions. Archived plans are historical, not valid YAML guidance.
|
|
|
49
54
|
- Create every referenced module, page and asset **before** validating. All
|
|
50
55
|
source paths resolve from the project root. Trusted modules can import Node built-ins and npm packages;
|
|
51
56
|
only `sandbox: true` modules are restricted to the relative snapshotted graph.
|
|
57
|
+
- Customize installed extensions in this order: declarative configuration;
|
|
58
|
+
`urlcode-ui` copy, theme, template and CSS overrides; a hook declared by the
|
|
59
|
+
extension; a new extension only when the installed contract cannot express
|
|
60
|
+
the behavior. Extension hooks run trusted in-process and reject `sandbox:
|
|
61
|
+
true` in contract v1.
|
|
52
62
|
- Write exact response fixtures for success and failure, covering every active
|
|
53
63
|
method, middleware behavior, HEAD, and any range or cache semantics.
|
|
54
64
|
- Follow `docs/BEST-PRACTICES.md` for layout and readability as the project grows.
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
// Wrap successful JSON function responses in a stable envelope.
|
|
2
|
-
//
|
|
1
|
+
// Wrap successful JSON function responses in a stable envelope. Only a JSON body
|
|
2
|
+
// this chain can actually read is rewritten; everything else passes through
|
|
3
|
+
// untouched -- on a `sandbox: true` route that includes every native body, which
|
|
4
|
+
// the guest cannot read at all.
|
|
3
5
|
export default async function envelope(request, context, next) {
|
|
4
6
|
const response = await next();
|
|
5
7
|
if (!response.ok || !(response.headers.get('content-type') || '').startsWith('application/json')) return response;
|
package/skills/urlcode/SKILL.md
CHANGED
|
@@ -39,6 +39,10 @@ has registered the `urlcode` server, prefer its tools over reading documents:
|
|
|
39
39
|
and `get_schema` (one capability or YAML fragment), `search_recipes`,
|
|
40
40
|
`explain` (a route's effective behavior) and `get_manifest`. The server is
|
|
41
41
|
read-only; `--allow-authoring` is an operator opt-in you never add yourself.
|
|
42
|
+
When the MCP server was started with an operator host file, `get_extensions`
|
|
43
|
+
returns installed extension configuration/policy schemas and declared project
|
|
44
|
+
hook contracts. Otherwise use `urlcode extensions --project DIR --host-file
|
|
45
|
+
ABSOLUTE_HOST --json` when the operator has supplied that host file.
|
|
42
46
|
Without the server, run the CLI equivalents and read only the output:
|
|
43
47
|
|
|
44
48
|
```sh
|
|
@@ -65,7 +69,10 @@ need rather than reading them whole.
|
|
|
65
69
|
|
|
66
70
|
1. If a native handler expresses the behavior (`redirect`, `respond`, `page`,
|
|
67
71
|
`static`, `download`, `proxy`, `conditional`), write YAML only.
|
|
68
|
-
2. Check supported extensions and their configuration before custom code.
|
|
72
|
+
2. Check supported extensions and their configuration before custom code. For
|
|
73
|
+
an installed extension, prefer declarative config and UI copy/theme/template/
|
|
74
|
+
CSS overrides, then a hook listed in `get_extensions`. Extension hook
|
|
75
|
+
contract v1 runs trusted in-process and rejects `sandbox: true`. If a
|
|
69
76
|
recipe from `recipes list` is close, `urlcode recipes add NAME --out DIR`
|
|
70
77
|
and adapt the copy into the project's layout.
|
|
71
78
|
3. Only then write a function or middleware: one exported handler, inputs from validated `args`,
|