@agentproto/corpus-cli 0.8.0 → 0.9.1

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.
@@ -0,0 +1,107 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agentproto.sh/schemas/aip-55/PRODUCT.schema.json",
4
+ "title": "product/v1 frontmatter (AIP-55)",
5
+ "description": "Validates the YAML frontmatter portion of an AIP-55 PRODUCT.md — a pricing CAPABILITY attached to any referenced AIP artifact. The target is addressed by an AIP-54 ref/v1 (aip:// URI in string contexts); the target AIP needs zero pricing awareness. Price models: 'one-time', 'prepaid-pool', 'pay-per-call'. Minor units are normative. billingRail is projection config, never the source of truth.",
6
+ "$defs": {
7
+ "price": {
8
+ "oneOf": [
9
+ {
10
+ "type": "object",
11
+ "required": ["model", "amountMinor", "currency"],
12
+ "additionalProperties": false,
13
+ "properties": {
14
+ "model": { "const": "one-time", "description": "Single payment for perpetual access." },
15
+ "amountMinor": { "type": "integer", "minimum": 0, "description": "Amount in MINOR units of the currency (cents for usd). Minor units are normative — major-unit floats are the x100 bug class." },
16
+ "currency": { "type": "string", "pattern": "^[a-z]{3}$", "description": "ISO-4217 lowercase, e.g. 'usd'." }
17
+ }
18
+ },
19
+ {
20
+ "type": "object",
21
+ "required": ["model", "unitPriceMinor", "currency", "grantUnits"],
22
+ "additionalProperties": false,
23
+ "properties": {
24
+ "model": { "const": "prepaid-pool", "description": "Buy a pool of meter units up front; consumption draws the pool down. Pool STATE is host-side on every rail — the rail only initiates the top-up payment." },
25
+ "unitPriceMinor": { "type": "integer", "minimum": 0, "description": "Price per unit in minor units of the currency." },
26
+ "currency": { "type": "string", "pattern": "^[a-z]{3}$" },
27
+ "grantUnits": { "type": "integer", "minimum": 1, "description": "Meter units granted per purchase. Unit semantics are declared by the host, not the spec; if a wallet asset backs the pool, units MUST be minor units of that asset's `decimals` (AIP-49)." }
28
+ }
29
+ },
30
+ {
31
+ "type": "object",
32
+ "required": ["model", "unitPriceMinor", "currency", "meter"],
33
+ "additionalProperties": false,
34
+ "properties": {
35
+ "model": { "const": "pay-per-call", "description": "Post-paid metering: each unit consumed is billed." },
36
+ "unitPriceMinor": { "type": "integer", "minimum": 0, "description": "Price per meter unit in minor units." },
37
+ "currency": { "type": "string", "pattern": "^[a-z]{3}$" },
38
+ "meter": { "type": "string", "minLength": 1, "maxLength": 96, "description": "Host-declared meter id, e.g. 'agent-call', 'tokens-1k', 'sandbox-hour'. Open vocabulary; hosts SHOULD namespace host-specific meters." }
39
+ }
40
+ }
41
+ ]
42
+ },
43
+ "billingRail": {
44
+ "oneOf": [
45
+ {
46
+ "type": "object",
47
+ "required": ["rail"],
48
+ "additionalProperties": false,
49
+ "properties": {
50
+ "rail": { "const": "stripe" },
51
+ "productId": { "type": "string", "description": "Stripe Product id — a CACHE of the last projection, never the source of truth for the price." },
52
+ "priceId": { "type": "string", "description": "Stripe Price id." },
53
+ "meterId": { "type": "string", "description": "Stripe Meter id — REQUIRED when price.model is 'pay-per-call'; Stripe meters are created out-of-band and cannot be derived from the Price id." },
54
+ "recurrence": { "enum": ["month", "year", "week", "day"], "description": "Billing recurrence for metered prices. Absent = per-unit without period." }
55
+ }
56
+ },
57
+ {
58
+ "type": "object",
59
+ "required": ["rail"],
60
+ "additionalProperties": false,
61
+ "properties": {
62
+ "rail": { "const": "autumn" },
63
+ "featureId": { "type": "string", "description": "Autumn feature id. Autumn natively models both metered usage and prepaid credit grants, so prepaid-pool and pay-per-call both project onto one featureId." },
64
+ "grantId": { "type": "string", "description": "Autumn credit-grant id for prepaid-pool products, if distinct from featureId." }
65
+ }
66
+ },
67
+ {
68
+ "type": "object",
69
+ "required": ["rail"],
70
+ "additionalProperties": false,
71
+ "properties": {
72
+ "rail": { "const": "tbd", "description": "Commerce shape decided, provider not chosen yet." }
73
+ }
74
+ },
75
+ {
76
+ "type": "object",
77
+ "required": ["rail"],
78
+ "additionalProperties": true,
79
+ "properties": {
80
+ "rail": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$", "not": { "enum": ["stripe", "autumn", "tbd"] }, "description": "Vendor-specific rail. Rail-specific config lives under namespaced keys; unknown rails MUST be tolerated by hosts that only consume the price union." }
81
+ }
82
+ }
83
+ ]
84
+ }
85
+ },
86
+ "type": "object",
87
+ "required": ["schema", "id", "on", "price"],
88
+ "additionalProperties": false,
89
+ "properties": {
90
+ "schema": { "const": "product/v1", "description": "Doctype discriminator." },
91
+ "id": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$", "minLength": 2, "maxLength": 96, "description": "Stable kebab-case pricing-capability id." },
92
+ "kind": { "const": "pricing", "description": "Capability kind. AIP-55 v2 is a capability; other capability kinds may exist under the capability/v1 pattern without their own AIP." },
93
+ "on": {
94
+ "$ref": "https://agentproto.sh/schemas/aip-54/REF.schema.json",
95
+ "description": "The referenced artifact this pricing attaches to (AIP-54 ref/v1). String contexts use the aip:// URI form, e.g. 'aip://42/book-companion@1.2.0'. The target AIP needs zero pricing awareness; hosts MUST refuse when the ref does not resolve."
96
+ },
97
+ "title": { "type": "string", "minLength": 1, "maxLength": 200, "description": "Human-readable display name, e.g. a checkout label." },
98
+ "description": { "type": "string", "minLength": 1, "maxLength": 2000 },
99
+ "price": { "$ref": "#/$defs/price", "description": "The source of truth for what is charged. billingRail is projection config; a generator derives Stripe Prices / Autumn features FROM this." },
100
+ "billingRail": { "$ref": "#/$defs/billingRail" },
101
+ "metadata": {
102
+ "type": "object",
103
+ "additionalProperties": true,
104
+ "description": "Vendor-specific extensions, namespaced under <vendor>. Hosts MUST tolerate unknown keys."
105
+ }
106
+ }
107
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentproto/corpus-cli",
3
- "version": "0.8.0",
3
+ "version": "0.9.1",
4
4
  "description": "@agentproto/corpus-cli — the `corpus` binary. Validate, lint, and operate an AIP-10 corpus workspace from the command line. Local-topology host for @agentproto/corpus — pair with a local backing engine (qdrant docker / gbrain) for a fully offline corpus runtime.",
5
5
  "keywords": [
6
6
  "agentproto",
@@ -52,16 +52,17 @@
52
52
  "gray-matter": "^4.0.3",
53
53
  "unpdf": "~1.8.1",
54
54
  "zod": "^4.5.4",
55
+ "@agentproto/batch": "0.2.0",
55
56
  "@agentproto/cli-exec": "0.1.0",
56
- "@agentproto/corpus": "0.6.0",
57
- "@agentproto/corpus-presets": "0.2.7"
57
+ "@agentproto/corpus": "0.7.1",
58
+ "@agentproto/corpus-presets": "0.2.9"
58
59
  },
59
60
  "devDependencies": {
60
61
  "@types/node": "^25.6.2",
61
62
  "tsup": "^8.5.1",
62
63
  "typescript": "^5.9.3",
63
64
  "vitest": "^3.2.4",
64
- "@agentproto/tooling": "0.1.0-alpha.0"
65
+ "@agentproto/tooling": "0.1.0"
65
66
  },
66
67
  "engines": {
67
68
  "node": ">=20.9.0"