@agentproto/corpus-cli 0.10.0 → 0.10.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/dist/specs/resources/aip-14/draft/TOOL.schema.json +1 -1
- package/dist/specs/resources/aip-15/draft/WORKFLOW.schema.json +59 -47
- package/dist/specs/resources/aip-16/draft/IO.schema.json +4 -0
- package/dist/specs/resources/aip-18/draft/COLLECTION.schema.json +128 -7
- package/dist/specs/resources/aip-36/draft/SANDBOX.schema.json +13 -0
- package/dist/specs/resources/aip-41/draft/ROUTINE.schema.json +21 -2
- package/dist/specs/resources/aip-42/draft/AGENT.schema.json +1 -1
- package/dist/specs/resources/aip-44/draft/ACP.schema.json +3 -1
- package/dist/specs/resources/aip-47/draft/ROLE.schema.json +1 -1
- package/dist/specs/resources/aip-49/draft/ASSET.schema.json +232 -0
- package/dist/specs/resources/aip-50/draft/AUTH.schema.json +114 -0
- package/dist/specs/resources/aip-53/draft/APP.schema.json +211 -0
- package/dist/specs/resources/aip-54/draft/REF.schema.json +1 -1
- package/dist/specs/resources/aip-54/draft/WS-REF.schema.json +46 -0
- package/dist/specs/resources/aip-55/draft/PRODUCT.schema.json +172 -38
- package/dist/specs/resources/aip-58/draft/event.schema.json +55 -0
- package/dist/specs/resources/aip-58/draft/journal-entry.schema.json +47 -0
- package/dist/specs/resources/aip-58/draft/run.schema.json +164 -0
- package/dist/specs/resources/aip-58/draft/vectors/README.md +18 -0
- package/dist/specs/resources/aip-58/draft/vectors/v1-invalid-input.json +31 -0
- package/dist/specs/resources/aip-58/draft/vectors/v2-suspended-input-required.json +51 -0
- package/dist/specs/resources/aip-58/draft/vectors/v3-missing-artifact.json +39 -0
- package/dist/specs/resources/aip-58/draft/vectors/v4-host-restart.json +36 -0
- package/dist/specs/resources/aip-58/draft/vectors/v5-disjoint-workspaces.json +60 -0
- package/dist/specs/resources/aip-58/draft/vectors/v6-orphaned.json +29 -0
- package/dist/specs/resources/aip-58/draft/vectors/v7-replay.json +46 -0
- package/dist/specs/resources/aip-58/draft/vectors/v8-heuristic-not-suspend.json +47 -0
- package/dist/specs/resources/aip-62/draft/ATTESTATION.schema.json +184 -0
- package/dist/specs/resources/aip-62/draft/REVIEW-PACK.schema.json +70 -0
- package/dist/specs/resources/aip-62/draft/REVIEW.schema.json +180 -0
- package/dist/specs/resources/aip-7/draft/GOVERNANCE.schema.json +147 -1
- package/dist/specs/resources/{aip-52/draft → pending/harness}/HARNESS.schema.json +1 -1
- package/package.json +4 -4
- package/dist/specs/resources/aip-52/draft/ADAPTER.md +0 -193
- package/dist/specs/resources/aip-54/draft/REF.md +0 -89
- package/dist/specs/resources/aip-55/draft/PRODUCT.md +0 -143
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
# AIP-55 — Product (pricing capability) · Implementer Guide
|
|
2
|
-
|
|
3
|
-
> **Status:** Draft (v2 — capability form)
|
|
4
|
-
> **Schema:** `PRODUCT.schema.json`
|
|
5
|
-
> **Reference runtime:** `@agentproto/product`
|
|
6
|
-
> **Depends on:** AIP-54 (`ref/v1`) — this spec's `on` field IS an AIP-54 ref.
|
|
7
|
-
|
|
8
|
-
## What is a Product?
|
|
9
|
-
|
|
10
|
-
A Product is **a pricing capability attached to any referenced AIP
|
|
11
|
-
artifact**. It is not a wrapper doctype: there is no per-target-kind
|
|
12
|
-
union, no `appRef`/`packRef`, no inlined handles. The target is
|
|
13
|
-
addressed by an AIP-54 `ref/v1` and needs zero pricing awareness —
|
|
14
|
-
"sandbox has a price" is expressible without the sandbox AIP changing.
|
|
15
|
-
|
|
16
|
-
A Product IS NOT:
|
|
17
|
-
|
|
18
|
-
- an AIP-49 wallet `asset` — AIP-49 models value *movement*; AIP-55
|
|
19
|
-
models the *catalog entry*. `defineAsset` is taken.
|
|
20
|
-
- an AIP-18 collection item — no money type, no discriminated union,
|
|
21
|
-
`refKind` is collection-scoped.
|
|
22
|
-
- an AIP-40 extension of AIP-42 — pricing is not app-specific.
|
|
23
|
-
|
|
24
|
-
## Filesystem layout
|
|
25
|
-
|
|
26
|
-
```
|
|
27
|
-
products/
|
|
28
|
-
<id>.md ← one manifest per pricing capability
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
The markdown body (after the frontmatter block) is purely documentary.
|
|
32
|
-
|
|
33
|
-
## Manifest shape
|
|
34
|
-
|
|
35
|
-
```yaml
|
|
36
|
-
---
|
|
37
|
-
schema: product/v1
|
|
38
|
-
id: book1-coder
|
|
39
|
-
kind: pricing
|
|
40
|
-
title: book1 companion — coder
|
|
41
|
-
description: Open-source companion code, pay per call.
|
|
42
|
-
on: aip://14/coder # AIP-54 ref — the ONLY reference field
|
|
43
|
-
|
|
44
|
-
price:
|
|
45
|
-
model: pay-per-call
|
|
46
|
-
unitPriceMinor: 2
|
|
47
|
-
currency: usd
|
|
48
|
-
meter: agent-call
|
|
49
|
-
|
|
50
|
-
billingRail:
|
|
51
|
-
rail: stripe
|
|
52
|
-
priceId: price_metered_1
|
|
53
|
-
meterId: meter_abc
|
|
54
|
-
recurrence: month
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
## Normative fields
|
|
58
|
-
|
|
59
|
-
| Field | Req | Notes |
|
|
60
|
-
|---|---|---|
|
|
61
|
-
| `schema` | MUST | `product/v1` |
|
|
62
|
-
| `id` | MUST | kebab-case |
|
|
63
|
-
| `on` | MUST | AIP-54 `ref/v1`. May also be given as the `aip://<aip>/<id>[@version]` string form, which implementations MUST normalize (parse + validate) into `ref/v1` before storing. The target AIP needs zero pricing awareness. Hosts MUST refuse unresolvable refs. |
|
|
64
|
-
| `price` | MUST | Discriminated on `model`: `one-time` \| `prepaid-pool` \| `pay-per-call`. **Minor units are normative.** |
|
|
65
|
-
| `billingRail` | MAY | Projection config, never the price's source of truth. See § Billing rails. |
|
|
66
|
-
| `kind` | MUST | `pricing` (fixed — this AIP defines the pricing capability; future capability kinds may share the pattern). |
|
|
67
|
-
| `title`, `description`, `metadata` | MAY | |
|
|
68
|
-
|
|
69
|
-
## Billing rails
|
|
70
|
-
|
|
71
|
-
The rail is **config, not truth**. A generator derives the provider
|
|
72
|
-
objects from `price`; the ids stored on the rail are caches of the last
|
|
73
|
-
projection.
|
|
74
|
-
|
|
75
|
-
- **`stripe`** — `one-time` → Product + `one_time` Price (1:1, no leak).
|
|
76
|
-
`pay-per-call` → metered Price **plus a Stripe Meter**, created
|
|
77
|
-
out-of-band: `meterId` is REQUIRED. `prepaid-pool` has NO native
|
|
78
|
-
Stripe primitive — pool state lives host-side on every rail; Stripe
|
|
79
|
-
only initiates the top-up payment.
|
|
80
|
-
- **`autumn`** — natively models both metered usage and prepaid credit
|
|
81
|
-
grants; both metered shapes project onto one `featureId`. No leak.
|
|
82
|
-
- **`tbd`** — shape decided, provider not chosen.
|
|
83
|
-
- **Vendor rails** — open, config rides along.
|
|
84
|
-
|
|
85
|
-
## Worked examples (Agentik verticals)
|
|
86
|
-
|
|
87
|
-
```yaml
|
|
88
|
-
# book1/coder — open repo, pay-per-call
|
|
89
|
-
schema: product/v1
|
|
90
|
-
id: book1-coder
|
|
91
|
-
kind: pricing
|
|
92
|
-
on: aip://14/coder
|
|
93
|
-
price: { model: pay-per-call, unitPriceMinor: 2, currency: usd, meter: agent-call }
|
|
94
|
-
billingRail: { rail: stripe, meterId: meter_abc, recurrence: month }
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
```yaml
|
|
98
|
-
# book3/SEO — private bundle, prepaid pool
|
|
99
|
-
schema: product/v1
|
|
100
|
-
id: book3-seo
|
|
101
|
-
kind: pricing
|
|
102
|
-
on: aip://14/seo-private@1.2.0
|
|
103
|
-
price: { model: prepaid-pool, unitPriceMinor: 5, currency: usd, grantUnits: 200 }
|
|
104
|
-
billingRail: { rail: autumn, featureId: seo-credits }
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
```yaml
|
|
108
|
-
# default vertical — book + private app bundle, one-time
|
|
109
|
-
schema: product/v1
|
|
110
|
-
id: bookN-companion
|
|
111
|
-
kind: pricing
|
|
112
|
-
on: aip://42/book-companion
|
|
113
|
-
price: { model: one-time, amountMinor: 4900, currency: usd }
|
|
114
|
-
billingRail: { rail: tbd }
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
## Implementation sketch (TS path)
|
|
118
|
-
|
|
119
|
-
```ts
|
|
120
|
-
import { attachPricing } from "@agentproto/product"
|
|
121
|
-
import { refFor } from "@agentproto/ref"
|
|
122
|
-
|
|
123
|
-
const cap = attachPricing(refFor(appSpec, appHandle, "1.2.0"), {
|
|
124
|
-
model: "one-time", amountMinor: 4900, currency: "usd",
|
|
125
|
-
})
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
"a collection of priced things" = `collectPriced(products, ref =>
|
|
129
|
-
catalog.resolve(ref))` — returns `{resolved, dangling}`: `resolved` pairs
|
|
130
|
-
each product with its resolved target, and `dangling` lists the products
|
|
131
|
-
whose `on` ref did not resolve, so a host can surface them instead of
|
|
132
|
-
having them silently dropped from the collection.
|
|
133
|
-
|
|
134
|
-
## Residual risks (from dogfooding)
|
|
135
|
-
|
|
136
|
-
1. **AIP-52's legacy `pricing` block** (unitless `{ebook?, bundle,
|
|
137
|
-
step?}`) predates this spec. THIS product's price is authoritative;
|
|
138
|
-
hosts SHOULD warn when a pack's `pricing` diverges from a pricing
|
|
139
|
-
capability attached to it.
|
|
140
|
-
2. **Stripe prepaid-pool leak is inherent**: Stripe has no credit-pool
|
|
141
|
-
concept; pool state lives host-side on every rail. The schema says
|
|
142
|
-
so rather than implying a clean projection.
|
|
143
|
-
3. **Autumn composes cleanly for both metered shapes.**
|