@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.
- package/.claude/skills/urlcode-authoring/SKILL.md +1 -1
- package/.claude/skills/urlcode-operations/SKILL.md +1 -1
- package/README.md +13 -16
- package/dist/BUILD-MANIFEST.json +21 -18
- package/dist/agents-guide.js +1 -1
- package/dist/authoring.js +50 -9
- package/dist/capabilities.js +1 -1
- package/dist/cli.js +20 -7
- package/dist/ecosystem-cli.js +6 -0
- package/dist/explain-cli.js +1 -1
- package/dist/explain.js +2 -2
- package/dist/extension-artifacts.js +10 -23
- package/dist/extension-bundles.js +8 -16
- package/dist/extension-transport.js +41 -0
- package/dist/feature-plan.js +99 -0
- package/dist/index.js +2 -2
- package/dist/mcp.js +6 -2
- package/dist/policies/agents.js +1 -1
- package/dist/policies/security.js +1 -1
- package/dist/policies.js +1 -1
- package/dist/review.js +206 -0
- package/dist/router.js +15 -2
- package/dist/scripts/operational-drills.js +1 -1
- package/dist/tooling.js +4 -0
- package/dist/types/authoring.d.ts +2 -0
- package/dist/types/explain.d.ts +3 -0
- package/dist/types/extension-artifacts.d.ts +2 -4
- package/dist/types/extension-transport.d.ts +31 -0
- package/dist/types/feature-plan.d.ts +67 -0
- package/dist/types/index.d.ts +2 -2
- package/dist/types/review.d.ts +30 -0
- package/dist/types/tooling.d.ts +4 -0
- package/dist/types/types.d.ts +9 -1
- package/dist/types.js +10 -3
- package/docs/AI-AUTHORING.md +466 -0
- package/docs/FUNCTION-SECURITY.md +251 -0
- package/docs/README.md +96 -0
- package/docs/TOOLING.md +422 -0
- package/docs/YAML-REFERENCE.md +473 -0
- package/examples/assets/example.yaml +3 -3
- package/examples/aws/example.yaml +3 -3
- package/examples/cloudflare/example.yaml +3 -3
- package/examples/compliance/README.md +1 -1
- package/examples/compliance/example.yaml +1 -1
- package/examples/conditions/example.yaml +3 -3
- package/examples/cookbook/README.md +4 -4
- package/examples/cookbook/example.yaml +3 -3
- package/examples/coverage-waiver/example.yaml +3 -3
- package/examples/egress/example.yaml +2 -2
- package/examples/extensions/example.yaml +1 -1
- package/examples/lifecycle/example.yaml +2 -2
- package/examples/not-found/README.md +2 -2
- package/examples/not-found/example.yaml +3 -3
- package/examples/prerender/README.md +4 -4
- package/examples/prerender/example.yaml +2 -2
- package/examples/provider-conformance/example.yaml +2 -2
- package/examples/shared-blocks/example.yaml +3 -3
- package/examples/vercel/example.yaml +3 -3
- package/llms-full.txt +119 -84
- package/llms.txt +28 -19
- package/package.json +19 -13
- package/recipes/store-crud/README.md +9 -10
- package/recipes/store-crud/recipe.yaml +1 -1
- package/schemas/urlcode.schema.json +3 -0
- package/skills/urlcode/SKILL.md +1 -1
- package/starters/default/AGENTS.md +1 -1
- 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.
|
|
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
|
-
|
|
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
|
|
14
|
-
|
|
15
|
-
-
|
|
16
|
-
|
|
17
|
-
|
|
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 {
|
|
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
|
|
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.
|
package/skills/urlcode/SKILL.md
CHANGED
|
@@ -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.
|