Skip to content

Commit 5b4e299

Browse files
authored
Tighten public release surface (#23)
1 parent e29573b commit 5b4e299

File tree

11 files changed

+485
-24
lines changed

11 files changed

+485
-24
lines changed

INTEGRATOR.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# INTEGRATOR — Protocol-Commercial v1.1.0
2+
3+
This document is the external-consumer quickstart for the current commercial release line.
4+
5+
## What to import
6+
7+
Use the package root or the current index directly:
8+
9+
```js
10+
import commercialIndex from '@commandlayer/commercial';
11+
```
12+
13+
The package root resolves to `schemas/v1.1.0/index.json`. That index is the current machine-readable map of every canonical verb schema in the release.
14+
15+
## What is normative vs illustrative
16+
17+
Normative machine artifacts:
18+
19+
- `schemas/v1.1.0/`
20+
- `schemas/v1.1.0/index.json`
21+
- `manifest.json`
22+
23+
Illustrative conformance fixtures:
24+
25+
- `examples/v1.1.0/commercial/<verb>/valid/`
26+
- `examples/v1.1.0/commercial/<verb>/invalid/`
27+
28+
Normative interpretive docs:
29+
30+
- `README.md`
31+
- `SPEC.md`
32+
- `POLICY.md`
33+
- `SECURITY_PROVENANCE.md`
34+
35+
## Safe consumer path
36+
37+
1. Confirm the package version is `1.1.0` and that `manifest.json` reports `status: current`.
38+
2. Load `schemas/v1.1.0/index.json` and select the request and receipt schema paths you need.
39+
3. Configure your validator from the flat per-verb schema files under `schemas/v1.1.0/commercial/<verb>/`.
40+
4. Run checksum verification before mirroring or vendoring artifacts:
41+
```bash
42+
npm run validate:integrity
43+
sha256sum -c checksums.txt
44+
```
45+
5. Use `examples/v1.1.0/` as conformance fixtures, not as a substitute for schema requirements.
46+
47+
## Choosing between v1.1.0 and v1.0.0
48+
49+
Choose `v1.1.0` unless you are maintaining compatibility with an older integration that still depends on the published historical nested `requests/` and `receipts/` paths.
50+
51+
- `v1.1.0` is the current canonical flat line.
52+
- `v1.0.0` is retained legacy for compatibility and audit.
53+
54+
Do not teach `v1.0.0` paths as current implementation guidance.
55+
56+
## Checksums and provenance
57+
58+
The checksum-covered payload for this release is intentionally narrow:
59+
60+
- `schemas/v1.1.0/`
61+
- `examples/v1.1.0/`
62+
- `manifest.json`
63+
64+
`checksums.txt` is the ledger for that payload. It is not itself inside the hashed set. Prose docs remain authoritative for interpretation and release process, but they are outside the checksum boundary.
65+
66+
## TypeScript guidance
67+
68+
There is no public `examples/v1.1.0/**/ts/` teaching surface in the current release. If a future release restores TypeScript examples, they should be explicitly governed, validated, and documented before they are treated as part of the public implementer surface.

ONBOARDING.md

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,26 @@
11
# ONBOARDING — Protocol-Commercial
22

3-
This document describes the current-line maintainer workflow for the active v1.1.0 release line.
3+
This document describes both the external-consumer path and the maintainer workflow for the active v1.1.0 release line.
44

55
## Document scope
66

7-
This document is the maintainer workflow for the current release line.
7+
This document is the operational workflow for the current release line.
8+
9+
## External consumer workflow
10+
11+
1. Install dependencies or the published package.
12+
```bash
13+
npm install @commandlayer/commercial
14+
```
15+
2. Confirm the current line in `manifest.json` and use `schemas/v1.1.0/index.json` as the authoritative schema map.
16+
3. Choose flat schemas under `schemas/v1.1.0/commercial/<verb>/` for validator configuration.
17+
4. Verify the machine-artifact set before mirroring or vendoring.
18+
```bash
19+
npm run validate:integrity
20+
sha256sum -c checksums.txt
21+
```
22+
5. Treat `examples/v1.1.0/commercial/<verb>/valid/` and `invalid/` as conformance fixtures.
23+
6. Use `v1.0.0` only when compatibility with the historical nested path model is required.
824

925
## Maintainer workflow
1026

@@ -20,7 +36,7 @@ This document is the maintainer workflow for the current release line.
2036
npm run validate:examples
2137
npm run validate:integrity
2238
```
23-
4. Regenerate checksums.
39+
4. Regenerate checksums when checksum-covered machine artifacts change.
2440
```bash
2541
npm run generate:checksums
2642
```
@@ -40,19 +56,20 @@ When editing only prose docs outside the checksum surface, do not regenerate `ch
4056
1. Create a new flat directory under `schemas/<new-version>/commercial/<verb>/`.
4157
2. Add exactly one request schema and one receipt schema.
4258
3. Create matching example folders under `examples/<new-version>/commercial/<verb>/valid` and `invalid`.
43-
4. Add at least one valid request, one valid receipt, one invalid request, and one invalid receipt.
59+
4. Add at least one valid request, one alternate valid request or receipt, one invalid request, and one invalid receipt.
4460
5. Make every invalid example isolate a single intended failure when practical.
45-
6. Do not add unvalidated TypeScript example directories to the current-line example tree.
61+
6. Do not add an ungoverned `examples/v1.1.0/**/ts/` surface to the current line.
4662
7. Update `manifest.json`, `schemas/<version>/index.json`, validation expectations, and checksums.
47-
8. Update README, SPEC, and any release-process docs if the normative surface changed.
63+
8. Update README, INTEGRATOR, SPEC, and release-process docs if the public teaching surface changed.
4864
9. Confirm public docs controlled by this repo still teach the exact current path model and current script names.
4965

5066
## Version bumps
5167

5268
1. Never mutate a published version directory in place after release.
5369
2. Create a new `schemas/vX.Y.Z/` and `examples/vX.Y.Z/` tree.
5470
3. Update `package.json`, `manifest.json`, README, SPEC, policy docs, and workflow assumptions.
55-
4. Regenerate checksums for the new current line's machine-artifact set.
71+
4. Draft release notes for the new line before publication.
72+
5. Regenerate checksums for the new current line's machine-artifact set.
5673

5774
For the current line, the canonical path model is flat:
5875

@@ -61,17 +78,19 @@ For the current line, the canonical path model is flat:
6178

6279
## Manual publication follow-up
6380

64-
The repository does not automate publication, IPFS pinning, CID capture, or mirror updates. If your release process uses those steps, perform them manually after the new version line has passed validation:
81+
The repository does not automate publication, GitHub Release publication, IPFS pinning, CID capture, or mirror updates. If your release process uses those steps, perform them manually after the new version line has passed validation:
6582

66-
1. Pin the checksum-covered release artifact set to IPFS, if that distribution channel is being used for the release.
67-
2. Capture resulting CIDs in the external release record if your publication process requires them.
68-
3. Update commandlayer.org mirrors to match the release paths exactly.
69-
4. Update any Agent Card schema bindings that reference the superseded version.
83+
1. Publish the GitHub Release using `releases/v1.1.0.md` or the corresponding new-version draft.
84+
2. Pin the checksum-covered release artifact set to IPFS, if that distribution channel is being used for the release.
85+
3. Capture resulting CIDs in the external release record if your publication process requires them.
86+
4. Update commandlayer.org mirrors to match the release paths exactly.
87+
5. Update any Agent Card schema bindings that reference the superseded version.
7088

7189
## Release hygiene
7290

7391
- Keep the current line obvious.
7492
- Keep legacy lines explicitly marked as legacy.
7593
- Keep schema paths flat and mirror-safe.
7694
- Keep checksum scope explicit.
95+
- Keep GitHub Releases and repository docs in sync.
7796
- Prefer exactness over deduplication.

README.md

Lines changed: 55 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ This README is a repo-wide orientation document for the current release line and
2424
- **Current canonical schema root:** `https://commandlayer.org/schemas/v1.1.0/`
2525
- **Current package entrypoint:** `schemas/v1.1.0/index.json`
2626
- **Historical legacy line:** `v1.0.0`, retained under `schemas/v1.0.0/` and `examples/v1.0.0/`
27+
- **Release note draft for GitHub Releases:** `releases/v1.1.0.md`
2728

2829
`v1.1.0` is flat. Its canonical schema URIs are the exact file-mirror paths published under `https://commandlayer.org/schemas/v1.1.0/commercial/<verb>/`.
2930

@@ -45,6 +46,29 @@ The stack story is singular:
4546
- Agent Cards point directly at the current commercial schema URIs.
4647
- Runtimes execute those contracts but do not redefine them.
4748

49+
## Integrator quickstart
50+
51+
For consumers who need the shortest safe path:
52+
53+
1. Install the package and import the current index entrypoint.
54+
```bash
55+
npm install @commandlayer/commercial
56+
```
57+
```js
58+
import commercialIndex from '@commandlayer/commercial';
59+
```
60+
2. Treat `schemas/v1.1.0/index.json` as the authoritative map of current schemas and verb inventory.
61+
3. Prefer `schemas/v1.1.0/commercial/<verb>/<verb>.request.schema.json` and `...receipt.schema.json` directly for validator configuration.
62+
4. Verify the machine-artifact set before mirroring or vendoring:
63+
```bash
64+
npm run validate:integrity
65+
sha256sum -c checksums.txt
66+
```
67+
5. Ignore `v1.0.0` unless you are maintaining compatibility with historical nested paths.
68+
6. Treat schemas and `manifest.json` as normative machine artifacts. Treat examples as illustrative conformance fixtures. Treat prose docs as normative interpretation and release-process guidance.
69+
70+
A longer external-consumer workflow lives in `INTEGRATOR.md`.
71+
4872
## Commercial execution model
4973

5074
Protocol-Commercial is x402-first.
@@ -86,13 +110,13 @@ The verbs use those layers intentionally:
86110

87111
## Verb set
88112

89-
| Verb | Purpose |
90-
| --- | --- |
91-
| `authorize` | Reserve payment authority before capture or settlement |
92-
| `checkout` | Finalize an order and request commercial capture |
93-
| `purchase` | Complete a one-step paid commercial action |
94-
| `ship` | Advance commercial fulfillment state for a settled checkout or purchase |
95-
| `verify` | Verify a commercial receipt, settlement, payment, or shipment target |
113+
| Verb | Purpose | Teaching note |
114+
| --- | --- | --- |
115+
| `authorize` | Reserve payment authority before capture or settlement | Teaches pre-capture approval, denial, and authorization evidence |
116+
| `checkout` | Finalize an order and request commercial capture | Teaches negotiated session state, amount binding, and settlement outcomes |
117+
| `purchase` | Complete a one-step paid commercial action | Teaches direct payment input without a separate checkout negotiation round |
118+
| `ship` | Advance commercial fulfillment state for a settled checkout or purchase | Teaches how fulfillment references upstream commercial settlement without replaying payment semantics |
119+
| `verify` | Verify a commercial receipt, settlement, payment, or shipment target | Teaches evidence-based attestation and inconclusive vs failed outcomes |
96120

97121
## Repository layout
98122

@@ -120,14 +144,21 @@ protocol-commercial/
120144
│ └── verify.receipt.schema.json
121145
├── examples/
122146
│ ├── v1.0.0/ # published legacy line
123-
│ └── v1.1.0/commercial/<verb>/{valid,invalid,ts}/
147+
│ └── v1.1.0/commercial/<verb>/{valid,invalid}/
124148
├── manifest.json
125149
├── checksums.txt
150+
├── INTEGRATOR.md
126151
└── scripts/
127152
```
128153

129154
Protocol-Commercial v1.1.0 does **not** use a current-line `_shared/` tree. Every v1.1.0 request and receipt schema is self-contained, flat, and mirror-safe.
130155

156+
Current-line example governance is equally explicit:
157+
158+
- `valid/` contains illustrative conforming request and receipt fixtures.
159+
- `invalid/` contains isolated negative fixtures intended to fail validation cleanly.
160+
- No `examples/v1.1.0/**/ts/` tree is currently part of the public release surface.
161+
131162
## Scope boundaries
132163

133164
This repository defines:
@@ -201,7 +232,6 @@ sha256sum -c checksums.txt
201232
- `npm run validate` runs the full validation suite for the current release line.
202233
- `npm run validate:schemas` checks current-line metadata, schema identity, layout, and manifest/index alignment expectations.
203234
- `npm run validate:examples` validates every current-line JSON valid and invalid example against the canonical schemas.
204-
- Current-line TypeScript example directories are intentionally excluded from the authoritative teaching surface; do not add `examples/v1.1.0/**/ts/` back without adding explicit validation and release governance for them.
205235
- `npm run validate:integrity` verifies the checksum file scope and hash coverage for the current release artifact set.
206236
- `checksums.txt` intentionally covers machine-validated release payloads only: `manifest.json`, `schemas/v1.1.0/index.json`, `schemas/v1.1.0/`, and `examples/v1.1.0/`.
207237

@@ -211,12 +241,26 @@ Agent Cards v1.1.0 should bind directly to the current flat commercial schema UR
211241

212242
Protocol-Commons and Protocol-Commercial therefore tell one coherent story:
213243

244+
- Commons defines base actions.
245+
- Commercial defines monetized overlays.
246+
- Agent Cards point at the current flat commercial schema paths.
247+
- Legacy nested v1.0.0 paths remain published only for compatibility.
248+
249+
## Checksum boundary and provenance summary
250+
214251
The v1.1.0 checksum-covered machine-artifact set is intentionally limited to:
215252

216253
- `schemas/v1.1.0/`
217254
- `examples/v1.1.0/`
218255
- `manifest.json`
219256

220-
`checksums.txt` is the generated hash ledger for that machine-artifact set; it describes that surface but is not itself part of the hashed payload. Release-defining prose docs such as `README.md`, `SPEC.md`, `POLICY.md`, `SECURITY_PROVENANCE.md`, and `ONBOARDING.md` are authoritative guidance, but they are outside the checksum surface unless the tooling is expanded deliberately in a later release.
257+
`checksums.txt` is the generated hash ledger for that machine-artifact set; it describes that surface but is not itself part of the hashed payload. Release-defining prose docs such as `README.md`, `SPEC.md`, `POLICY.md`, `SECURITY_PROVENANCE.md`, `INTEGRATOR.md`, and `ONBOARDING.md` are authoritative guidance, but they are outside the checksum surface unless the tooling is expanded deliberately in a later release.
258+
259+
For external verification, the minimal path is:
221260

222-
After any mutation to the checksum-covered set, regenerate `checksums.txt` and repin any release bundle that depends on those artifacts.
261+
1. Install or vendor the package.
262+
2. Inspect `manifest.json` to confirm the current line is `v1.1.0`.
263+
3. Validate checksum coverage with `npm run validate:integrity`.
264+
4. Verify local file hashes with `sha256sum -c checksums.txt`.
265+
5. Load `schemas/v1.1.0/index.json` and bind validators from the listed request and receipt schema paths.
266+
6. Ignore `v1.0.0` unless compatibility requires the historical line.

checksums.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,31 @@
11
930cbbb3992d01385c1e5a64a4a04de5bac7c68a8b59a25a6c0e5507a1cea33f examples/v1.1.0/commercial/authorize/invalid/001-authorize.request.invalid.json
22
ef1e7e77e6c53ef918053918a1b9243505fef02a61b4899868cad36feebe42f3 examples/v1.1.0/commercial/authorize/invalid/900-authorize.receipt.invalid.json
33
afbcee85906d0249ed0c60eecf40657832549ca8032a99154dd0e643b6d82884 examples/v1.1.0/commercial/authorize/valid/001-authorize.request.valid.json
4+
7f4a224807248e500a18544f209ad46fe8cd0d1c2ab34308d0d3087e96c76594 examples/v1.1.0/commercial/authorize/valid/002-authorize.request.valid.json
45
c0ca42d7269f82c69cdcb24a0cd19d9bfc0a30cbf9b991e3f82b58c01ac16961 examples/v1.1.0/commercial/authorize/valid/900-authorize.receipt.valid.json
56
45023d4bb512d36ee2543ffb9d3246a17f13021d7f9a115c79ae87860f391e00 examples/v1.1.0/commercial/authorize/valid/901-authorize.receipt.valid.json
67
dec8708eda1a9da3d3f54731146b2b3cbd292ab718fcc6a763062d83014b4390 examples/v1.1.0/commercial/checkout/invalid/001-checkout.request.invalid.json
78
a6fbf133ce4629ce3831d9a2929bcc5eef1844d5edf97428d20ce897d77e031e examples/v1.1.0/commercial/checkout/invalid/900-checkout.receipt.invalid.json
89
6607a0a6ceefd0ca978f7969cb1e6e326e9a8ceaedde17505d2be81a260b3c8c examples/v1.1.0/commercial/checkout/valid/001-checkout.request.valid.json
10+
c0e61562d56f2c14161f805147b00524bcd08cffff86535c523b7492760b1089 examples/v1.1.0/commercial/checkout/valid/002-checkout.request.valid.json
911
f8880c06f91c1d21a617fbe7f2b6a9d41d37db9f4fd5e9998689100c16f4000e examples/v1.1.0/commercial/checkout/valid/900-checkout.receipt.valid.json
1012
ef376639e6129b14a8444c90e5a46ca4bd87a0b0f3b793e012f4839aa46b84a8 examples/v1.1.0/commercial/checkout/valid/901-checkout.receipt.valid.json
1113
0be8ae75fc24986bdf74f096995712b847a8cced75e33fe18095bca51282b773 examples/v1.1.0/commercial/purchase/invalid/001-purchase.request.invalid.json
1214
e70a205a9d6a4ec729161508a02b3d36d69b801408eec5cf54573ddfbbdfd44d examples/v1.1.0/commercial/purchase/invalid/900-purchase.receipt.invalid.json
1315
2b235a6d567127c54da9c6c3eacf915c79a5c5127197a9aadbfb50289b122957 examples/v1.1.0/commercial/purchase/valid/001-purchase.request.valid.json
16+
b5e21819f5f9a8cd700841ad18abe45e1ff42e401648ded05c4dcfd89c350b3c examples/v1.1.0/commercial/purchase/valid/002-purchase.request.valid.json
1417
3dd86d4ca05f8d3488ec1203d451a2f263b8e8eca388a0001850d7867314a187 examples/v1.1.0/commercial/purchase/valid/900-purchase.receipt.valid.json
1518
eeee667d742c165ba4fb08014cbcf9d45b5ee35bcc228764184ffe9a04530545 examples/v1.1.0/commercial/purchase/valid/901-purchase.receipt.valid.json
1619
bee0d3a0329f17125d0c1c287b870880b836cdb35faf8f2b06a820fa91ab6571 examples/v1.1.0/commercial/ship/invalid/001-ship.request.invalid.json
1720
7012d72e9641258bdebe3534e2f0faa771fbce63cb6a8b3c0828e9fe5ec521c5 examples/v1.1.0/commercial/ship/invalid/900-ship.receipt.invalid.json
1821
576924f554079213ce078d4be6c54e5ffc58839bde4182d73d02ba3412e47f3b examples/v1.1.0/commercial/ship/valid/001-ship.request.valid.json
22+
abd0e8a97943c458a85d788b758206d05d9ccef3ba8635f613340ad526dfe496 examples/v1.1.0/commercial/ship/valid/002-ship.request.valid.json
1923
a004cb1385b1ca173b89df702e2b52d63f870521652f98f023359d30009b8df0 examples/v1.1.0/commercial/ship/valid/900-ship.receipt.valid.json
2024
f268080d0fadbd2b78ea0ab66348b137a07fe8764066af3337f8c7354335f4c7 examples/v1.1.0/commercial/ship/valid/901-ship.receipt.valid.json
2125
a2a5e61fa04e12786a848e03bbabbc3f9d066ca55a6f48cb1ae1140f6373bf94 examples/v1.1.0/commercial/verify/invalid/001-verify.request.invalid.json
2226
8933801c0b4fc007ead2e57d0a5f8e1a1b8a8b91a5c759e54778f65fff865c11 examples/v1.1.0/commercial/verify/invalid/900-verify.receipt.invalid.json
2327
56d02915471d62f7687e3f6258d75754c8e7a44ca717e4ca0906dd4bb6fc34fb examples/v1.1.0/commercial/verify/valid/001-verify.request.valid.json
28+
9492d90ea14ad35eeb8acd03248ce6061ccdc04a7aff4ed538d8c42be3abc015 examples/v1.1.0/commercial/verify/valid/002-verify.request.valid.json
2429
50874f3eea69a51ac132873b05e39318e4c2241078ca5e258e466934935ec945 examples/v1.1.0/commercial/verify/valid/900-verify.receipt.valid.json
2530
455d19ad1b7ef98e436d8f1c675fee7f2716eb17d301da8d2cc4e2e2c51e624a examples/v1.1.0/commercial/verify/valid/901-verify.receipt.valid.json
2631
80fa9124c1560d0e55b83554d83581dabf72505cc4d9c1354157f51fddd9686a manifest.json
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"protocol": "commercial",
3+
"version": "1.1.0",
4+
"verb": "authorize",
5+
"request_id": "authreq-002",
6+
"requested_at": "2026-03-19T10:03:30Z",
7+
"payer": {
8+
"role": "payer",
9+
"id": "buyer-007",
10+
"kind": "account"
11+
},
12+
"payee": {
13+
"role": "payee",
14+
"id": "merchant-settlement",
15+
"kind": "wallet"
16+
},
17+
"merchant": {
18+
"role": "merchant",
19+
"id": "merchant.example",
20+
"kind": "organization"
21+
},
22+
"amount": {
23+
"amount": "199.00",
24+
"currency": "USDC",
25+
"decimals": 2
26+
},
27+
"authorization_scope": {
28+
"capture_mode": "automatic",
29+
"valid_until": "2026-03-19T12:03:30Z",
30+
"reusable": true
31+
},
32+
"payment_requirement": {
33+
"scheme": "x402",
34+
"resource": "https://merchant.example/x402/authorize/authreq-002",
35+
"max_amount": {
36+
"amount": "199.00",
37+
"currency": "USDC",
38+
"decimals": 2
39+
},
40+
"payment_request_id": "x402-auth-002"
41+
},
42+
"order_ref": {
43+
"type": "order",
44+
"id": "ord-1002"
45+
},
46+
"merchant_reference": "renewal-batch-1002"
47+
}

0 commit comments

Comments
 (0)