@jimhoyd/urlcode 0.4.2 → 0.4.6

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.
Files changed (214) hide show
  1. package/.claude/skills/urlcode-authoring/SKILL.md +57 -14
  2. package/.claude/skills/urlcode-operations/SKILL.md +4 -0
  3. package/README.md +19 -15
  4. package/SECURITY.md +5 -3
  5. package/dist/BUILD-MANIFEST.json +30 -27
  6. package/dist/agent-context.js +82 -0
  7. package/dist/agents-guide.js +42 -42
  8. package/dist/authoring.js +12 -2
  9. package/dist/body-schema.js +159 -0
  10. package/dist/build-cloudflare.js +2 -0
  11. package/dist/capabilities.js +1 -1
  12. package/dist/cli.js +28 -12
  13. package/dist/config.js +74 -6
  14. package/dist/context.js +4 -6
  15. package/dist/errors.js +3 -1
  16. package/dist/examples.js +1 -1
  17. package/dist/extensions.js +60 -2
  18. package/dist/http-policy.js +19 -4
  19. package/dist/http-response.js +2 -2
  20. package/dist/init-with.js +71 -9
  21. package/dist/mcp.js +15 -2
  22. package/dist/pattern-guard.js +32 -0
  23. package/dist/policies/security.js +0 -0
  24. package/dist/project-tests.js +35 -11
  25. package/dist/readiness.js +184 -32
  26. package/dist/recipes.js +1 -1
  27. package/dist/router.js +17 -0
  28. package/dist/runtime.js +26 -3
  29. package/dist/scaffold.js +0 -0
  30. package/dist/server.js +26 -3
  31. package/dist/site.js +0 -0
  32. package/dist/tooling.js +2 -1
  33. package/dist/types/agent-context.d.ts +44 -0
  34. package/dist/types/authoring.d.ts +3 -1
  35. package/dist/types/body-schema.d.ts +58 -0
  36. package/dist/types/config.d.ts +10 -2
  37. package/dist/types/context.d.ts +1 -1
  38. package/dist/types/errors.d.ts +9 -1
  39. package/dist/types/examples.d.ts +1 -1
  40. package/dist/types/extensions.d.ts +47 -2
  41. package/dist/types/http-policy.d.ts +3 -0
  42. package/dist/types/init-with.d.ts +10 -1
  43. package/dist/types/pattern-guard.d.ts +10 -0
  44. package/dist/types/project-tests.d.ts +9 -0
  45. package/dist/types/readiness.d.ts +68 -0
  46. package/dist/types/recipes.d.ts +1 -1
  47. package/dist/types/runtime.d.ts +4 -0
  48. package/dist/types/server.d.ts +9 -1
  49. package/dist/types/tooling.d.ts +1 -0
  50. package/dist/types/types.d.ts +13 -0
  51. package/dist/types.js +10 -2
  52. package/dist/typescript-authoring.js +5 -3
  53. package/dist/verify-deployment.js +16 -10
  54. package/examples/body-validation/README.md +16 -0
  55. package/examples/body-validation/example.yaml +17 -0
  56. package/examples/body-validation/tests/requests.json +15 -0
  57. package/examples/body-validation/urlcode.yaml +34 -0
  58. package/examples/coverage-waiver/README.md +8 -0
  59. package/examples/coverage-waiver/example.yaml +16 -0
  60. package/examples/coverage-waiver/functions/notes.mjs +2 -0
  61. package/examples/coverage-waiver/tests/requests.json +3 -0
  62. package/examples/coverage-waiver/urlcode.yaml +10 -0
  63. package/examples/data-dir/README.md +39 -0
  64. package/examples/data-dir/data/welcome.txt +1 -0
  65. package/examples/data-dir/example.yaml +22 -0
  66. package/examples/data-dir/functions/note.mjs +18 -0
  67. package/examples/data-dir/tests/requests.json +6 -0
  68. package/examples/data-dir/urlcode.yaml +6 -0
  69. package/examples/lifecycle/README.md +15 -0
  70. package/examples/lifecycle/example.yaml +19 -0
  71. package/examples/lifecycle/functions/notes.mjs +29 -0
  72. package/examples/lifecycle/tests/requests.json +12 -0
  73. package/examples/lifecycle/urlcode.yaml +29 -0
  74. package/examples/not-found/README.md +10 -0
  75. package/examples/not-found/example.yaml +17 -0
  76. package/examples/not-found/public/404.html +3 -0
  77. package/examples/not-found/public/index.html +3 -0
  78. package/examples/not-found/tests/requests.json +7 -0
  79. package/examples/not-found/urlcode.yaml +7 -0
  80. package/examples/shared-blocks/README.md +11 -0
  81. package/examples/shared-blocks/example.yaml +17 -0
  82. package/examples/shared-blocks/tests/requests.json +7 -0
  83. package/examples/shared-blocks/urlcode.yaml +37 -0
  84. package/llms-full.txt +364 -49
  85. package/llms.txt +43 -5
  86. package/package.json +15 -22
  87. package/recipes/static-page/README.md +9 -0
  88. package/recipes/static-page/public/index.html +11 -0
  89. package/recipes/static-page/recipe.yaml +21 -0
  90. package/recipes/static-page/tests/requests.json +22 -0
  91. package/recipes/static-page/urlcode.yaml +7 -0
  92. package/recipes/static-plus-api/README.md +6 -0
  93. package/recipes/static-plus-api/urlcode.yaml +4 -0
  94. package/recipes/store-crud/README.md +53 -0
  95. package/recipes/store-crud/recipe.yaml +31 -0
  96. package/recipes/store-crud/tests/requests.json +18 -0
  97. package/recipes/store-crud/urlcode.yaml +18 -0
  98. package/schemas/urlcode.schema.json +125 -60
  99. package/skills/urlcode/SKILL.md +47 -27
  100. package/starters/default/AGENTS.md +43 -43
  101. package/starters/page/README.md +14 -0
  102. package/starters/page/public/index.html +12 -0
  103. package/starters/page/tests/requests.json +17 -0
  104. package/starters/page/urlcode.yaml +6 -0
  105. package/.claude-plugin/marketplace.json +0 -18
  106. package/CONTRIBUTING.md +0 -148
  107. package/ROADMAP.md +0 -70
  108. package/docs/AI-AUTHORING.md +0 -339
  109. package/docs/ASSETS.md +0 -107
  110. package/docs/AUTH-BACKUP.md +0 -32
  111. package/docs/AWS.md +0 -86
  112. package/docs/BEST-PRACTICES.md +0 -276
  113. package/docs/BULK.md +0 -79
  114. package/docs/CAPABILITIES.md +0 -192
  115. package/docs/CAPACITY.md +0 -305
  116. package/docs/CI-FOLLOWUP-2026-09-19.md +0 -97
  117. package/docs/CI-RELEASE-AUDIT-2026-09-19.md +0 -322
  118. package/docs/CI.md +0 -147
  119. package/docs/CLOUDFLARE.md +0 -109
  120. package/docs/CODEBASE-AUDIT-2026-09-20.md +0 -284
  121. package/docs/COMPLIANCE.md +0 -239
  122. package/docs/COMPOSING-A-SITE.md +0 -287
  123. package/docs/CONDITIONS.md +0 -74
  124. package/docs/CONTAINER-PROMOTION.md +0 -74
  125. package/docs/DEPLOYMENT-CHECKS.md +0 -108
  126. package/docs/DEVELOPMENT-PIPELINE.md +0 -304
  127. package/docs/EGRESS.md +0 -125
  128. package/docs/EXTENSIONS.md +0 -403
  129. package/docs/FRAMEWORK.md +0 -217
  130. package/docs/FUNCTION-SECURITY.md +0 -251
  131. package/docs/HTTP.md +0 -129
  132. package/docs/INSTALL.md +0 -128
  133. package/docs/INTERCHANGE.md +0 -134
  134. package/docs/LOAD-TESTING.md +0 -91
  135. package/docs/LOCAL-DEVELOPMENT.md +0 -102
  136. package/docs/MIDDLEWARE-EXAMPLES.md +0 -75
  137. package/docs/MIDDLEWARE.md +0 -102
  138. package/docs/MONITORING.md +0 -115
  139. package/docs/OBSERVABILITY.md +0 -222
  140. package/docs/OPEN-DECISIONS.md +0 -149
  141. package/docs/OPERATIONAL-PROOF.md +0 -41
  142. package/docs/OPERATIONS.md +0 -201
  143. package/docs/ORGANIZATION.md +0 -135
  144. package/docs/PERFORMANCE.md +0 -72
  145. package/docs/PLUGINS.md +0 -271
  146. package/docs/POLICIES.md +0 -211
  147. package/docs/PRERENDER.md +0 -245
  148. package/docs/PROJECT-DIRECTION.md +0 -118
  149. package/docs/PROVIDER-VERIFICATION.md +0 -84
  150. package/docs/READINESS.md +0 -153
  151. package/docs/README.md +0 -93
  152. package/docs/RECIPES.md +0 -99
  153. package/docs/RELEASE-0.4.0-alpha.3.md +0 -50
  154. package/docs/RELEASE-0.4.1.md +0 -73
  155. package/docs/RELEASE-0.4.2.md +0 -30
  156. package/docs/RELEASE-READINESS.md +0 -146
  157. package/docs/RELEASE-SECURITY.md +0 -100
  158. package/docs/RESILIENCE.md +0 -161
  159. package/docs/ROUTING.md +0 -92
  160. package/docs/SANDBOX-REVIEW.md +0 -72
  161. package/docs/SCAFFOLDING.md +0 -70
  162. package/docs/SECURITY-AUDIT.md +0 -164
  163. package/docs/SITE.md +0 -150
  164. package/docs/SPECIFICATION.md +0 -359
  165. package/docs/SPIKE-AI-FRAMEWORK-BENCHMARK.md +0 -288
  166. package/docs/SPIKE-BUSINESS-SUITE.md +0 -1029
  167. package/docs/SPIKE-CORE-LAYERING.md +0 -368
  168. package/docs/SPIKE-DEFAULT-TRUST-MODEL.md +0 -207
  169. package/docs/STANDARDS.md +0 -311
  170. package/docs/STARTERS.md +0 -83
  171. package/docs/STATIC.md +0 -105
  172. package/docs/TOOLING.md +0 -298
  173. package/docs/TUNNELS.md +0 -72
  174. package/docs/TYPESCRIPT-AUTHORING.md +0 -87
  175. package/docs/TYPESCRIPT.md +0 -123
  176. package/docs/VERCEL.md +0 -114
  177. package/docs/VERSION-ALIGNMENT.md +0 -88
  178. package/docs/YAML-GUIDE.md +0 -57
  179. package/docs/YAML-REFERENCE.md +0 -449
  180. package/docs/archive/2026-09-19/EXTENSION-IMPLEMENTATION.md +0 -68
  181. package/docs/archive/2026-09-19/MANAGEMENT-SECURITY.md +0 -102
  182. package/docs/archive/2026-09-19/NEXT-PHASE-PLAN.md +0 -108
  183. package/docs/archive/2026-09-19/NEXT-STEPS.md +0 -646
  184. package/docs/archive/2026-09-19/OPEN-DECISIONS.md +0 -277
  185. package/docs/archive/2026-09-19/RELEASE-SECURITY.md +0 -186
  186. package/docs/archive/2026-09-19/ROADMAP.md +0 -387
  187. package/docs/archive/2026-09-19/SPIKE-EXTENSION-MODEL.md +0 -430
  188. package/docs/archive/2026-09-19/SPIKE-EXTENSIONS.md +0 -492
  189. package/docs/archive/2026-09-19/SPIKE-LAMBDA-COMPILE.md +0 -365
  190. package/docs/archive/2026-09-19/SPIKE-MONOREPO.md +0 -778
  191. package/docs/archive/2026-09-19/USABILITY-REVIEW.md +0 -139
  192. package/docs/archive/2026-09-20/OPEN-DECISIONS-COMPLETED.md +0 -116
  193. package/docs/archive/README.md +0 -29
  194. package/docs/policies/agents.md +0 -182
  195. package/docs/policies/cache.md +0 -152
  196. package/docs/policies/compression.md +0 -169
  197. package/docs/policies/contract.md +0 -52
  198. package/docs/policies/hardened.md +0 -56
  199. package/docs/policies/interoperability.md +0 -169
  200. package/docs/policies/operations.md +0 -45
  201. package/docs/policies/security.md +0 -161
  202. package/docs/policies/throttle.md +0 -103
  203. package/docs/yaml/assets.md +0 -36
  204. package/docs/yaml/conditions.md +0 -20
  205. package/docs/yaml/functions.md +0 -168
  206. package/docs/yaml/middleware.md +0 -31
  207. package/docs/yaml/organization.md +0 -74
  208. package/docs/yaml/policies.md +0 -37
  209. package/docs/yaml/redirects.md +0 -64
  210. package/docs/yaml/responses.md +0 -57
  211. package/docs/yaml/site.md +0 -24
  212. package/packaging/claude-plugin/.claude-plugin/plugin.json +0 -19
  213. package/packaging/claude-plugin/skills/urlcode-authoring/SKILL.md +0 -130
  214. package/packaging/claude-plugin/skills/urlcode-operations/SKILL.md +0 -108
@@ -1,387 +0,0 @@
1
- # Historical record
2
-
3
- Archived 2026-09-19. This records an earlier implementation or proposal, not
4
- current instructions. See the [current roadmap](../../../ROADMAP.md),
5
- [current contract](../../SPECIFICATION.md) and [open decisions](../../OPEN-DECISIONS.md).
6
- Remaining acceptance work is not declared complete by archiving this record.
7
-
8
- <!-- trust-model-prose: historical-file -->
9
- <!-- local-links: historical-file -->
10
- <!-- guidance-claims: ignore-file -->
11
-
12
- # Public roadmap
13
-
14
- URLCode is a portable runtime for programmable URL behavior, not a URL
15
- shortener. Stored short links are an operator-installed extension, not a core
16
- handler. The
17
- [project direction](../../PROJECT-DIRECTION.md) explains how application
18
- projects and provider adapters fit without redefining or restricting the free
19
- runtime.
20
-
21
- This is the public delivery sequence. Tests accompany every feature, not a
22
- separate late phase. The stable 0.1 self-hosted release covers much of M0/M1 plus initial
23
- process/container packaging and benchmarks. Provider adapters and the remaining
24
- production-readiness gates remain open.
25
-
26
- ## 0.4.0-alpha.2 — current alpha
27
-
28
- `0.4.0-alpha.2` is a behavior-changing release on top of `0.4.0-alpha.1`:
29
- **`function` and `middleware` routes now run trusted and unsandboxed by
30
- default** — in the host process, with full Node/filesystem/network access,
31
- exactly like any other project code — instead of always dispatching through
32
- the QuickJS/WebAssembly worker pool. Sandboxing is now an explicit per-route
33
- opt-in via `sandbox: true`; a route that declares it gets exactly the
34
- isolation every earlier alpha provided, unchanged. See
35
- [docs/SPIKE-DEFAULT-TRUST-MODEL.md](../../SPIKE-DEFAULT-TRUST-MODEL.md) for
36
- the maintainer's decision and rationale, and
37
- [docs/FUNCTION-SECURITY.md](../../FUNCTION-SECURITY.md) for the resulting
38
- contract of both execution modes.
39
-
40
- **This changes existing projects with no YAML edit.** Every `function`/
41
- `middleware` route that does not declare `sandbox` — which, before this
42
- release, meant every such route in every existing project — now runs trusted
43
- instead of sandboxed the moment the runtime is upgraded to `0.4.0-alpha.2` or
44
- later. Binding grants (`env`/`secrets`) are unaffected: a route still
45
- receives only what it declares and an operator policy pins to the project
46
- revision, whether trusted or sandboxed. Review which of your project's
47
- `function`/`middleware` routes handle input or code you would not otherwise
48
- trust with full Node/filesystem/network access, and add `sandbox: true` to
49
- those specifically (docs/AI-AUTHORING.md's "Deciding when a route needs
50
- `sandbox: true`") before upgrading a project that relies on the old,
51
- always-sandboxed behavior. An operator policy pinned to a project's revision
52
- is invalidated by this upgrade regardless of whether the project's own YAML
53
- changed, since the project hash includes the trust-model-affecting change;
54
- re-derive and re-approve it (`urlcode permissions`) after upgrading.
55
-
56
- ## 0.4.0-alpha.1
57
-
58
- `0.4.0-alpha.1` is the first alpha of the extension contract and the agent
59
- tooling on top of the `0.3.0` self-hosted release. It carries: the
60
- revision-pinned extension contract, capabilities and provider conformance,
61
- strict redirect interchange, bulk import, recipes and search, TypeScript
62
- guests, conditions, bounded proxy and signals, MCP read and authoring modes,
63
- the `context`, `explain`, `manifest` and `schema` queries, short forms,
64
- route-level auth, `init --with`, the agent benchmark harness, `llms-full`,
65
- and the generated `AGENTS.md` and skill. It is an alpha: provider
66
- deployments, soak and independent security review remain open. The
67
- extension packages declare `@jimhoyd/urlcode >=0.4.0-alpha.1 <0.5.0` and
68
- are published after core.
69
-
70
- ## Extensions: accounts, administration and presentation — implemented, unreleased
71
-
72
- The runtime now carries a generic, revision-pinned extension contract
73
- (`@jimhoyd/urlcode/extensions`, [extensions](../../EXTENSIONS.md)): a project
74
- declares versioned `extensions.<name>` blocks, exclusive `extension` mounts and
75
- `policies.extensions` requirements; the operator supplies the implementations
76
- in a host file loaded with `--host-file`, outside the project. Guest requests
77
- never see `Cookie`, `Authorization` or declared credential headers. Cloudflare
78
- refuses extensions until its artifact format can run them.
79
-
80
- The implementations live in their own repositories, each with an
81
- implementation-status file that is the authoritative feature list:
82
- [urlcode-auth](https://github.com/jimhoyd-com/urlcode-auth) (accounts, sessions,
83
- MFA, roles, account page, operator CLI), [urlcode-admin](https://github.com/jimhoyd-com/urlcode-admin)
84
- (users, sessions, roles, audit, approvals, cases, impersonation) and
85
- [urlcode-ui](https://github.com/jimhoyd-com/urlcode-ui) (escaped templates,
86
- partials, themes, translations). All three are Apache-2.0 and published to
87
- npm as `0.1.0-alpha.1` while first-release acceptance is reviewed; see
88
- [issue 58](https://github.com/jimhoyd-com/urlcode/issues/58) for what remains:
89
- browser and device WebAuthn coverage, accessibility assessment, soak, backup
90
- and recovery drills on a deployment, live provider senders and independent
91
- security review. [The framework](../../FRAMEWORK.md) describes how the four
92
- packages compose, and [next steps](NEXT-STEPS.md) is the phased plan to
93
- close the remaining gaps.
94
-
95
- ## Capability foundation — implemented, unreleased
96
-
97
- `urlcode capabilities [--target self-hosted|cloudflare|aws|vercel] [--json]`
98
- and the public capability API centralize target support for handlers, bindings
99
- and effective policies. Runtime activation and Cloudflare builds use the shared
100
- preflight; unknown targets fail closed and unsupported requirements identify the
101
- route and capability before resources or artifacts are created. The existing
102
- compiled route IR is documented, not replaced. Configuration-dependent and
103
- delegated behavior remain explicit; all provider deployments remain unverified.
104
- See [capabilities](../../CAPABILITIES.md) and the
105
- [next-phase review and implementation status](NEXT-PHASE-PLAN.md).
106
-
107
- ## Portability and URL behavior — implemented, unreleased
108
-
109
- Strict redirect interchange supports CSV/JSON/YAML, Netlify and Cloudflare
110
- `_redirects`, a bounded Netlify TOML subset and Vercel redirects. Conversion
111
- reports refuse unsupported semantics; provider differences require explicit
112
- acknowledgment and are never called lossless. A synthetic conformance fixture
113
- and bounded HTTPS runner distinguish local adapter tests from observed
114
- provider deployments. Actual Cloudflare/AWS/Vercel deployment evidence remains
115
- pending; this does not complete M4.
116
-
117
- Exact query/header/cookie/origin/method conditions and disjoint conditional
118
- redirect/response cases run in the self-hosted, AWS and Vercel runtimes.
119
- Cloudflare refuses these until its compiler can preserve their semantics.
120
- Self-hosted proxy and webhook signals use explicit revision-pinned operator
121
- origin grants, connection-pinned public DNS and bounded transport. Signals
122
- have no durable delivery or retry guarantee. Other targets refuse proxy and
123
- signals. See [conditions](../../CONDITIONS.md), [egress](../../EGRESS.md),
124
- [interchange](../../INTERCHANGE.md) and
125
- [provider verification](../../PROVIDER-VERIFICATION.md).
126
-
127
- ## Developer ecosystem — implemented, unreleased
128
-
129
- Bundled Git-owned recipes, safe bulk imports into route includes, build-time
130
- TypeScript guest transpilation, read-only inspection APIs and optional stdio
131
- MCP tooling are available. The runtime still executes only JavaScript, and
132
- TypeScript authoring adds no execution mode: transpilation happens at build
133
- time, is not type checking, and a `sandbox: true` route's emitted JavaScript
134
- runs inside QuickJS/WASM exactly as before. Bulk benchmarks
135
- successfully cover 1,000, 10,000 and 100,000 routes without relaxing parser
136
- limits. See [recipes](../../RECIPES.md), [bulk evidence](../../BULK.md),
137
- [TypeScript authoring](../../TYPESCRIPT-AUTHORING.md) and
138
- [SDK/MCP](../../TOOLING.md). These features do not supply durable signals,
139
- protected downloads, a remote marketplace or provider deployment proof.
140
-
141
- ## TypeScript source and shipped declarations — implemented, unreleased
142
-
143
- The runtime, scripts, tests and benchmarks are TypeScript under a strict
144
- configuration, checked by `npm run typecheck` inside `npm run verify`. The
145
- package ships `dist/`: Node's own type stripping of the source with the
146
- specifier extension rewritten, so it is the same JavaScript line for line,
147
- plus `.d.ts` declarations for every export (`urlcode`, `@jimhoyd/urlcode/plugins`,
148
- `@jimhoyd/urlcode/policies`, `@jimhoyd/urlcode/observability`, `@jimhoyd/urlcode/compliance`,
149
- `@jimhoyd/urlcode/prerender` and the three provider entries). `dist` is never
150
- committed; the build runs in the digest-pinned release container, its hashes
151
- are recorded in the manifest, and a CI job builds twice and diffs the trees.
152
- Measured cold start, throughput and memory of `dist/` equal the previous
153
- JavaScript (see [performance](../../PERFORMANCE.md)). Contributors need Node
154
- 22.18+ to run the source directly; installed packages still run on 22.13+.
155
- See [TypeScript](../../TYPESCRIPT.md).
156
-
157
- ## Host policies and plugins — implemented, unreleased
158
-
159
- A `policies` block in YAML, reusable `profiles` and an operator plugin API
160
- close the gaps the [extensions spike](SPIKE-EXTENSIONS.md) ranked
161
- highest: no cross-cutting behavior, no per-client throttle, no bot policy, no
162
- security-header preset, no compression and no response cache. Five policies
163
- (`throttle`, `agents`, `security`, `compression`, `cache`) run in the host
164
- process after route match and before the route contract, all off by default,
165
- with a per-target table that refuses at activation what a target cannot
166
- enforce: the serverless adapters take `agents`, `security`, `cache` and
167
- route-partitioned `throttle`; the Cloudflare build compiles `agents` and
168
- `security` into the artifact and refuses the rest with the route named.
169
- `--trusted-proxies` names the hops allowed to set `X-Forwarded-For` for client
170
- identity. Plugins are host code passed to `startServer` and the adapters on
171
- the same hook seam the policies use; nothing in YAML names one. See
172
- [policies](../../POLICIES.md) and [plugins](../../PLUGINS.md).
173
-
174
- This checkpoint is on a branch and not in a published release. An
175
- interoperability review of the five policies together, the spike's `report`
176
- mode headers on every target and the audit's policy table remain open, and no
177
- deployment has exercised a policy on a provider.
178
-
179
- ## Provider adapters — Vercel and AWS Lambda native handlers
180
-
181
- `@jimhoyd/urlcode/vercel` serves a project as a Vercel Node function, reusing the
182
- runtime's transport-agnostic handle() and a shared response writer, so a
183
- deployment returns byte-identical status, body and headers to the self-hosted
184
- server. Bindings arrive through a `URLCODE_POLICY` environment variable holding
185
- the same revision-pinned grant document the operator policy file carries.
186
-
187
- Native handlers only: `function` and `middleware` routes are refused at
188
- activation, trusted or sandboxed alike, because they need the self-hosted Node
189
- lifecycle and a sandboxed one would pay worker and WASM startup on every cold
190
- start. The
191
- `@jimhoyd/urlcode/aws` does the same for a Lambda Function URL or API Gateway HTTP API.
192
- Payload format 2.0 only: format 1.0 supplies an already-decoded path and query,
193
- and this runtime rejects ambiguous encoding deliberately, so rebuilding a target
194
- from decoded parts would misrepresent the request. Response policy, including
195
- content length, now lives in one place shared by every host rather than partly
196
- relying on Node's implicit behaviour.
197
-
198
- Neither adapter has been deployed; see the [Vercel](../../VERCEL.md) and
199
- [AWS](../../AWS.md) guides, which state what stays unverified as a result.
200
-
201
- ## Provider targets — Cloudflare Workers
202
-
203
- Cloudflare Workers has no worker threads, no filesystem and no runtime code
204
- generation, so it gets a compiler rather than an adapter: `urlcode build
205
- --target cloudflare` emits a Worker, the compiled routes and Ajv standalone
206
- validators, and `@jimhoyd/urlcode/cloudflare` serves them with the same matching, request
207
- policy and response policy as every other host. Declarative routes only —
208
- redirects and declared responses with parameters, defaults, validation, response
209
- headers, `enabled` and `expires`. Functions, middleware, assets and
210
- bindings are refused at build time with the route named, so an unsupported
211
- project fails the build instead of the deployment. Bindings are refused even as
212
- literals, because a build artifact must never carry a secret.
213
-
214
- Making this possible moved request-time matching into `src/match.ts` and header
215
- validation into `src/header-validation.ts`, both free of Node imports, so one
216
- implementation now serves the Node server, the serverless adapters and the
217
- Worker. `test/header-validation.test.ts` compares the header rules against
218
- `node:http` across the full character range, because disagreeing there is header
219
- injection, and `test/cloudflare.test.ts` asserts the Worker and the self-hosted
220
- server return the same status, body and headers for the same project.
221
-
222
- This has not been deployed to Cloudflare; see the
223
- [Cloudflare guide](../../CLOUDFLARE.md) for the two request-level differences the
224
- platform imposes and what stays unverified.
225
-
226
- ## Installation and publication — 0.1.0
227
-
228
- Added a tag-driven release workflow that reuses the audited candidate build path,
229
- publishes a GitHub release with the signed tarball, SBOM, manifest, `SHA256SUMS`
230
- and a rendered Homebrew formula, and optionally publishes to npm (with
231
- provenance) and GHCR behind repository variables. Added a checksum-verifying
232
- `install.sh`, a Homebrew formula template rendered only from measured bytes, and
233
- an [installation guide](../../INSTALL.md) covering npm, Homebrew, the script, the
234
- container and provenance verification.
235
-
236
- 0.1.0 was released from this pipeline: the GitHub release carries the signed
237
- tarball, SBOM, manifest, `SHA256SUMS` and Homebrew formula, and an install from
238
- the published release was verified end to end. npm and GHCR publication stay
239
- opt-in and remain unproven until enabled, so the Homebrew formula's registry URL
240
- does not resolve yet.
241
-
242
- Added tunnel and [monitoring](../../MONITORING.md) recipes, and extended
243
- `urlcode benchmark` to measure a running deployment through its real path with
244
- warm-up and shed/transport separation; see [load testing](../../LOAD-TESTING.md).
245
- M3's remaining gap is sustained soak and slow-peer behaviour, which that tool
246
- does not cover.
247
-
248
- ## Hardening checkpoint — alpha.8
249
-
250
- Bound HTTP admission and inactive sockets, and correct management
251
- defaults/method responses.
252
- The [readiness register](../../RELEASE-READINESS.md) distinguishes tested safeguards
253
- from deployment and stable-release gates. Feature breadth does not imply stability.
254
-
255
- ## Live short links — alpha.8 (removed from core, superseded)
256
-
257
- Implemented an optional native `link` handler, local SQLite persistence, CLI CRUD
258
- and a separate authenticated management API. Links became visible without YAML
259
- changes/reloads; versioned writes prevented silent lost updates. No guest storage
260
- or network access was added. Same-host only; distributed storage, general state,
261
- user accounts and provider adapters remained open.
262
-
263
- This native `link` handler, its SQLite store, CLI and management API were
264
- removed from core in the layering work that followed. Stored short links moved
265
- to a separate `urlcode-dynamic-link` extension package (mount-based, like
266
- `auth`/`admin`), which was retired and unpublished in September 2026 without a
267
- successor. A project that used `link`/`dynamicLinks` now owns that storage
268
- itself; there is no in-core replacement and no deprecation shim.
269
-
270
- ## Middleware — alpha.7
271
-
272
- Implemented route-local ordered `next()` middleware around every handler, early
273
- responses, request-local state and shared sandbox deadlines. Plain native routes
274
- retain their fast path. Native bodies stay opaque; middleware coverage requires
275
- explicit assertions. See [middleware](../../MIDDLEWARE.md).
276
-
277
- ## One starter — alpha.6
278
-
279
- `urlcode init <directory>` always creates the same function-plus-redirect project.
280
- There is no template selector. The public urlcode-template repository mirrors
281
- those examples with a pinned npm dependency. Richer asset examples remain under
282
- examples/assets. Historical starter branches are not maintained.
283
-
284
- ## Route readiness and local project benchmarks — alpha.5
285
-
286
- Implemented route inventory, expected-count checks, active route/method coverage,
287
- generated native probes plus explicit fixtures, and bounded assertion-aware local
288
- benchmarks. [Readiness](../../READINESS.md) documents the gate and remaining deployment,
289
- soak, remote-destination and business-coverage work. This does not complete M3/M4.
290
-
291
- ## HTTP configuration and standalone starter — 0.1.0-alpha.4
292
-
293
- Implemented bounded request body/media-type/JSON checks, literal response headers
294
- and separate Set-Cookie values, and native text/JSON responses. See [HTTP](../../HTTP.md)
295
- for precise scope; automatic CORS, multipart, streaming and other listed features
296
- remain open. The public [urlcode-template](https://github.com/jimhoyd-com/urlcode-template)
297
- provides two routes with a pinned runtime dependency and cross-platform CI.
298
-
299
- ## Native assets — 0.1.0-alpha.3
300
-
301
- Implemented the page/static/download portion of M2: project-contained asset
302
- snapshots, automatic MIME types, attachment names, HEAD, cache validators and
303
- single byte ranges. Dedicated public directories, symlink/hardlink rejection and
304
- bounded memory are part of the contract. [Asset guide](../../ASSETS.md).
305
- Bulk tools, recipes and best-effort signals were added in the unreleased next-phase work above; they were not part of alpha.3.
306
-
307
- ## Security correction — 0.1.0-alpha.2
308
-
309
- <!-- trust-model-prose: historical -->
310
- All function code is untrusted. Node host execution has been replaced by
311
- QuickJS/WebAssembly isolation with fresh invocation state, no ambient host or
312
- network APIs, bounded resources, restricted module graphs and revision-pinned
313
- operator binding policy. This protection is part of the free product. See the
314
- [security model](../../FUNCTION-SECURITY.md). Full Fetch/Node
315
- API compatibility and network integrations were not part of that alpha and
316
- remain outside the 0.1 contract. That default was superseded in
317
- `0.4.0-alpha.2`, which made this isolation the per-route `sandbox: true`
318
- opt-in instead (see
319
- [docs/SPIKE-DEFAULT-TRUST-MODEL.md](../../SPIKE-DEFAULT-TRUST-MODEL.md)).
320
-
321
- ## Earlier implementation checkpoint — 0.1.0-alpha.1
322
-
323
- Implemented: versioned strict YAML/JSON Schema subset, explicit file composition,
324
- redirect/parameter semantics, JavaScript Request/Response functions with bounded
325
- workers, scoped binding context, init/add/validate/dev/serve/test/doctor, indexed
326
- snapshots, last-good reloads, graceful shutdown, health/readiness, safe request
327
- logs, two runnable starters, ESLint and unit/HTTP/package tests. Cross-platform
328
- CI and a non-root container build are included. See the [contract](../../SPECIFICATION.md)
329
- and [operations guide](../../OPERATIONS.md) for exact support and evidence limits.
330
-
331
- Still open in the early contract: host namespaces, stable identity beyond paths,
332
- fuller parameter vocabulary. Build-time TypeScript authoring and capability planning are now implemented in the unreleased work above.
333
- No claims of complete M0/M1 or stable production readiness. M2–M4 work continues
334
- in the order below; a few independently useful operational foundations shipped early.
335
-
336
-
337
- | Milestone | Scope | Completion evidence |
338
- |---|---|---|
339
- | M0 — contract/build loop | YAML schema, matching/input semantics, function API, composition, runtime/packaging prototype, CI | Fixture validates; invalid definitions fail; verification runs |
340
- | M1 — local alpha | CLI, aliases, redirects, parameters, custom functions, env/secrets, indexed routes and reload | Redirect plus function tested locally without accounts/DB; invalid reload preserves working version |
341
- | M2 — bulk/reusable behavior | CSV/YAML/JSON, safe bulk edits/checks, templates, best-effort async signals, simple pages/static/downloads | 10k-route example, local side-effect tests, safe file serving, benchmark datasets |
342
- | M3 — self-hosted beta | Process/container deployment, domain/TLS guide, packages/Homebrew, ngrok, monitoring and load tools | Install, test, deploy, observe and roll back a real project |
343
- | M4 — provider public release | Cloudflare/AWS/Vercel adapters, provider conversion, capability/limit checks and stable docs | Baseline redirect/parameter/function fixtures on each advertised initial target; additional capability gaps explicit |
344
- | M5 — advanced public features | Bounded proxies, protected/one-time downloads, durable signals/state, broader catalog and API/SDK/MCP | Feature-specific guarantees, tests and portable capability reports |
345
-
346
- The first provider-capable public release is M4; the 0.1 self-hosted release is
347
- useful within its documented scope. A marketplace and advanced stateful
348
- features are not prerequisites. No web UI/TUI or framework-hosting platform.
349
- Netlify starts as redirect interchange after the initial provider adapters.
350
-
351
- ## Launch and stabilize the free version
352
-
353
- Stability means repeatable installs/upgrades, dependable routing/functions,
354
- working deployment and rollback, useful diagnostics, and serious recurring
355
- issues from actual users addressed. Feedback begins with usable alphas, but the
356
- free version is not stable until that evidence exists; do not invent a calendar
357
- deadline or adoption-count threshold.
358
-
359
- Keep the architectural direction: reusable runtime/compiler, provider adapters,
360
- separate configuration and secrets, versioned artifacts, Git-owned definitions
361
- and observable behavior. Avoid assumptions that would force users to rewrite
362
- projects later. No artificial restrictions in the free version; it is licensed
363
- under Apache-2.0.
364
-
365
- ## Starter delivery
366
-
367
- The [starter plan](../../STARTERS.md) makes both Git clone and CLI initialization
368
- release requirements: one function-plus-redirect starter in M1, bulk-growth examples in
369
- M2, and the business foundation with self-host tooling in M3. Provider recipes
370
- follow tested M4 adapters. All use the same runtime and portable project format.
371
-
372
- ## Quality gates
373
-
374
- - Same fixtures pass on the local reference and each claimed runtime adapter.
375
- A static exporter alone is not a complete function-capable adapter.
376
- - Pure redirects avoid Lambda/per-route user functions; generated shared routing
377
- is allowed where native provider rules cannot preserve behavior.
378
- - CSV exports report unsupported nested content instead of silently losing it.
379
- - 1k/10k/100k datasets measure compile/reload, memory, latency and throughput.
380
- - Default tests run against local HTTP/fake services; ngrok is optional.
381
- - Load tests use bounded owned targets and do not follow third-party redirects.
382
- - Invalid reload preserves working config; secret values stay out of artifacts.
383
- - Installation claims match tested OS/architecture packages.
384
-
385
- Implementation runtime, exact schema/function API, first adapter order and package
386
- format are decided through early prototypes. Do not invent performance targets
387
- or advertise all providers before they pass tests.