@jimhoyd/urlcode 0.5.0 → 0.5.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 (67) hide show
  1. package/.claude/skills/urlcode-authoring/SKILL.md +1 -1
  2. package/.claude/skills/urlcode-operations/SKILL.md +1 -1
  3. package/README.md +13 -16
  4. package/dist/BUILD-MANIFEST.json +21 -18
  5. package/dist/agents-guide.js +1 -1
  6. package/dist/authoring.js +50 -9
  7. package/dist/capabilities.js +1 -1
  8. package/dist/cli.js +20 -7
  9. package/dist/ecosystem-cli.js +6 -0
  10. package/dist/explain-cli.js +1 -1
  11. package/dist/explain.js +2 -2
  12. package/dist/extension-artifacts.js +10 -23
  13. package/dist/extension-bundles.js +8 -16
  14. package/dist/extension-transport.js +41 -0
  15. package/dist/feature-plan.js +99 -0
  16. package/dist/index.js +2 -2
  17. package/dist/mcp.js +6 -2
  18. package/dist/policies/agents.js +1 -1
  19. package/dist/policies/security.js +1 -1
  20. package/dist/policies.js +1 -1
  21. package/dist/review.js +206 -0
  22. package/dist/router.js +15 -2
  23. package/dist/scripts/operational-drills.js +1 -1
  24. package/dist/tooling.js +4 -0
  25. package/dist/types/authoring.d.ts +2 -0
  26. package/dist/types/explain.d.ts +3 -0
  27. package/dist/types/extension-artifacts.d.ts +2 -4
  28. package/dist/types/extension-transport.d.ts +31 -0
  29. package/dist/types/feature-plan.d.ts +67 -0
  30. package/dist/types/index.d.ts +2 -2
  31. package/dist/types/review.d.ts +30 -0
  32. package/dist/types/tooling.d.ts +4 -0
  33. package/dist/types/types.d.ts +9 -1
  34. package/dist/types.js +10 -3
  35. package/docs/AI-AUTHORING.md +466 -0
  36. package/docs/FUNCTION-SECURITY.md +251 -0
  37. package/docs/README.md +96 -0
  38. package/docs/TOOLING.md +422 -0
  39. package/docs/YAML-REFERENCE.md +473 -0
  40. package/examples/assets/example.yaml +3 -3
  41. package/examples/aws/example.yaml +3 -3
  42. package/examples/cloudflare/example.yaml +3 -3
  43. package/examples/compliance/README.md +1 -1
  44. package/examples/compliance/example.yaml +1 -1
  45. package/examples/conditions/example.yaml +3 -3
  46. package/examples/cookbook/README.md +4 -4
  47. package/examples/cookbook/example.yaml +3 -3
  48. package/examples/coverage-waiver/example.yaml +3 -3
  49. package/examples/egress/example.yaml +2 -2
  50. package/examples/extensions/example.yaml +1 -1
  51. package/examples/lifecycle/example.yaml +2 -2
  52. package/examples/not-found/README.md +2 -2
  53. package/examples/not-found/example.yaml +3 -3
  54. package/examples/prerender/README.md +4 -4
  55. package/examples/prerender/example.yaml +2 -2
  56. package/examples/provider-conformance/example.yaml +2 -2
  57. package/examples/shared-blocks/example.yaml +3 -3
  58. package/examples/vercel/example.yaml +3 -3
  59. package/llms-full.txt +119 -84
  60. package/llms.txt +28 -19
  61. package/package.json +19 -13
  62. package/recipes/store-crud/README.md +9 -10
  63. package/recipes/store-crud/recipe.yaml +1 -1
  64. package/schemas/urlcode.schema.json +3 -0
  65. package/skills/urlcode/SKILL.md +1 -1
  66. package/starters/default/AGENTS.md +1 -1
  67. package/starters/default/README.md +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jimhoyd/urlcode",
3
- "version": "0.5.0",
3
+ "version": "0.5.6",
4
4
  "description": "Portable runtime for programmable URL behavior",
5
5
  "type": "module",
6
6
  "workspaces": [
@@ -85,30 +85,36 @@
85
85
  "llms-full.txt",
86
86
  "NOTICE",
87
87
  "recipes",
88
- "skills"
88
+ "skills",
89
+ "docs/AI-AUTHORING.md",
90
+ "docs/YAML-REFERENCE.md",
91
+ "docs/TOOLING.md",
92
+ "docs/FUNCTION-SECURITY.md"
89
93
  ],
90
94
  "scripts": {
91
95
  "build": "node --disable-warning=ExperimentalWarning scripts/build.ts",
96
+ "prepare": "node --disable-warning=ExperimentalWarning scripts/build.ts --quiet",
92
97
  "typecheck": "tsc -p tsconfig.json",
93
98
  "test": "node --conditions=development --test test/*.test.ts",
99
+ "test:shard": "node --conditions=development --test",
94
100
  "lint": "eslint .",
95
101
  "check": "npm run check:code && npm run check:docs",
96
- "check:code": "node scripts/check.ts && node scripts/check-release-tags.ts && node scripts/check-workspace-links.ts && node scripts/check-issue-labels.ts && npm run release:check",
102
+ "check:code": "node scripts/check.ts && node scripts/check-core-boundaries.ts && node scripts/check-release-tags.ts && node scripts/check-workspace-links.ts && node scripts/check-issue-labels.ts && npm run release:check",
97
103
  "test:workerd": "node scripts/workerd-parity.ts",
98
104
  "verify": "npm run lint && npm run typecheck && npm run check && npm run build && npm test && npm run verify:workspaces",
99
105
  "workspace:styles": "npm run styles --workspace @jimhoyd/urlcode-ui",
100
- "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 verify --workspace @jimhoyd/urlcode-store && npm run audit:packages && npm run test:workspace-integration",
106
+ "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 verify --workspace @jimhoyd/urlcode-store && npm run verify --workspace @jimhoyd/urlcode-forms && npm run audit:packages && npm run test:workspace-integration",
101
107
  "audit:packages": "node scripts/package-audit.ts --all",
102
108
  "test:package": "npm run build && npm run test:package:built",
103
- "dev": "node src/cli.ts dev --project starters/default",
104
- "serve": "node src/cli.ts serve --project starters/default",
105
- "validate": "node src/cli.ts validate --local --project starters/default",
106
- "test:project": "node src/cli.ts test --project starters/default",
107
- "init": "node src/cli.ts init",
108
- "doctor": "node src/cli.ts doctor",
109
- "routes": "node src/cli.ts routes --project starters/default",
110
- "audit:routes": "node src/cli.ts audit --project starters/default",
111
- "benchmark:project": "node src/cli.ts benchmark --project starters/default",
109
+ "dev": "node packages/core/src/cli.ts dev --project starters/default",
110
+ "serve": "node packages/core/src/cli.ts serve --project starters/default",
111
+ "validate": "node packages/core/src/cli.ts validate --local --project starters/default",
112
+ "test:project": "node packages/core/src/cli.ts test --project starters/default",
113
+ "init": "node packages/core/src/cli.ts init",
114
+ "doctor": "node packages/core/src/cli.ts doctor",
115
+ "routes": "node packages/core/src/cli.ts routes --project starters/default",
116
+ "audit:routes": "node packages/core/src/cli.ts audit --project starters/default",
117
+ "benchmark:project": "node packages/core/src/cli.ts benchmark --project starters/default",
112
118
  "docs:reference": "node scripts/generate-yaml-reference.ts",
113
119
  "docs:plugin": "node scripts/generate-claude-plugin.ts",
114
120
  "docs:llms": "node scripts/build-llms-full.ts",
@@ -1,8 +1,8 @@
1
1
  # Store CRUD
2
2
 
3
3
  `/api/todos/*` is a persistent JSON CRUD API. The project declares one
4
- collection and its mount; the operator-installed `store` extension
5
- (`@jimhoyd/urlcode-store`) serves it and keeps the data in the operator's
4
+ collection and its mount; the operator-installed `store` extension serves it
5
+ from a verified bundle and keeps the data in the operator's
6
6
  directory. There is no handler code. Full contract, limits and guarantees:
7
7
  [docs/STORE.md](../../docs/STORE.md).
8
8
 
@@ -10,20 +10,19 @@ directory. There is no handler code. Full contract, limits and guarantees:
10
10
 
11
11
  The store is not core and does not activate on its own.
12
12
 
13
- - The operator installs `@jimhoyd/urlcode-store` next to `@jimhoyd/urlcode`
14
- and registers it in a host file kept outside the project.
15
- - The package is on npm (`@jimhoyd/urlcode-store`).
16
- `urlcode init --with ui,auth,store` scaffolds a protected site from the
17
- published packages. A no-auth `init --with store` needs `--ack store:public-write`,
18
- which the core published at the store's first release does not have, so write the host file below by hand until a
19
- newer core is released.
13
+ - The operator selects the signed `store` bundle release and registers it in a
14
+ host file kept outside the project.
15
+ - `urlcode init --with ui,auth,store --bundle-release extension-bundles@v…`
16
+ scaffolds a protected site from verified bundles. A no-auth `init --with
17
+ store` needs `--ack store:public-write`.
20
18
  - The data directory must be outside the project. It is single-writer: one
21
19
  server process per directory.
22
20
 
23
21
  ```js
24
22
  // /operator/host.mjs -- trusted operator code, never part of the project
25
23
  import {inspectExtensionRevision} from '@jimhoyd/urlcode/extensions';
26
- import {storeExtension} from '@jimhoyd/urlcode-store';
24
+ import {loadExtensionBundle} from '@jimhoyd/urlcode/extension-bundles';
25
+ const {storeExtension} = await loadExtensionBundle(process.env.URLCODE_PROJECT, 'store');
27
26
  const projectSha256 = await inspectExtensionRevision(process.env.URLCODE_PROJECT);
28
27
  export default {extensions: [storeExtension({directory: '/operator/data/store', projectSha256})]};
29
28
  ```
@@ -7,7 +7,7 @@ targets: {self-hosted: conditional, cloudflare: refused, aws: conditional, verce
7
7
  routes: 1
8
8
  services:
9
9
  - name: store extension
10
- description: An operator host file registering storeExtension from @jimhoyd/urlcode-store, with a data directory outside the project. The operator installs the package; `urlcode init --with ui,auth,store` scaffolds a protected host, and the README shows a hand-written one.
10
+ description: An operator host file registering the verified store bundle, with a data directory outside the project. `urlcode init --with ui,auth,store --bundle-release extension-bundles@v…` scaffolds a protected host, and the README shows a hand-written one.
11
11
  grants:
12
12
  - kind: extension
13
13
  description: The registration pins projectSha256 to this exact revision; editing a collection or the mount needs operator review and a new pin.
@@ -703,6 +703,9 @@
703
703
  "env": {
704
704
  "type": "string",
705
705
  "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
706
+ },
707
+ "default": {
708
+ "type": "string"
706
709
  }
707
710
  },
708
711
  "required": [
@@ -22,7 +22,7 @@ Check installed primitives, YAML configuration, policies, extensions and recipes
22
22
  policies and commands this runtime version supports.
23
23
  - Find the runtime: `urlcode` on the PATH, or
24
24
  `node node_modules/@jimhoyd/urlcode/dist/cli.js`, or
25
- `node /path/to/urlcode/src/cli.ts` for a source checkout. Use one form for
25
+ `node /path/to/urlcode/packages/core/src/cli.ts` for a source checkout. Use one form for
26
26
  every command below.
27
27
 
28
28
  ## 2. Retrieve the minimum, do not read everything
@@ -59,7 +59,7 @@ urlcode test
59
59
  urlcode audit --expect-routes 2
60
60
  ```
61
61
 
62
- Run all three after every change, updating the route count deliberately and adding `tests/requests.json` fixtures for every new route (positive/negative, every active method, HEAD). No global install: use `node /path/to/urlcode/src/cli.ts`.
62
+ Run all three after every change, updating the route count deliberately and adding `tests/requests.json` fixtures for every new route (positive/negative, every active method, HEAD). No global install: use `node /path/to/urlcode/packages/core/src/cli.ts`.
63
63
 
64
64
  ## Feedback
65
65
 
@@ -19,8 +19,8 @@ The function route uses `middleware/headers.mjs` to add a response header around
19
19
  GET/HEAD, redirect 302 and no-store defaults keep YAML short. Valid edits reload.
20
20
 
21
21
  This app uses the runtime you installed separately (compatible with 0.1.0).
22
- Without a global install, invoke `node /path/to/urlcode/src/cli.ts` instead of
23
- `urlcode`. Optional Make shortcuts accept `URLCODE='node /path/to/urlcode/src/cli.ts'`.
22
+ Without a global install, invoke `node /path/to/urlcode/packages/core/src/cli.ts` instead of
23
+ `urlcode`. Optional Make shortcuts accept `URLCODE='node /path/to/urlcode/packages/core/src/cli.ts'`.
24
24
  For a cloneable project with a pinned npm runtime dependency, use
25
25
  [urlcode-template](https://github.com/jimhoyd-com/urlcode-template). Both start
26
26
  with the same two route examples. No runtime fork or provider account is needed.