@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
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://agentproto.sh/schemas/aip-49/ASSET.schema.json",
|
|
4
|
+
"title": "Asset declaration — agentwallet/v1 (ERC-20-style)",
|
|
5
|
+
"description": "Validates an AIP-49 asset declaration: the registry-keyed (ref) unit of value a wallet holds. Borrows ERC-20 metadata (symbol/decimals) and ERC-1400/1410 partitioning (via the ruleSet + partitions). `standard` discriminates the settlement/valuation adapter; it is NOT a user-facing taxonomy.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["ref", "name", "symbol", "decimals", "standard", "ruleSet"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"ref": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"pattern": "^[A-Z0-9][A-Z0-9_]{1,79}$",
|
|
13
|
+
"description": "Unique, human-readable key. Convention `<ORIGIN>_<SYMBOL>` (GUILDE_CREDITS, ERC20_USDT, SPL_USDC) or a bare ISO-4217 code (USD, EUR)."
|
|
14
|
+
},
|
|
15
|
+
"name": { "type": "string", "minLength": 1, "description": "Display name, e.g. \"Guilde Credits\"." },
|
|
16
|
+
"symbol": { "type": "string", "minLength": 1, "description": "Short ticker, e.g. GCR." },
|
|
17
|
+
"decimals": {
|
|
18
|
+
"type": "integer",
|
|
19
|
+
"minimum": 0,
|
|
20
|
+
"maximum": 18,
|
|
21
|
+
"description": "Smallest-unit precision. 2 = centi (credits), 6 = USDC, 18 = most ERC-20. Amounts everywhere are minor units of the asset."
|
|
22
|
+
},
|
|
23
|
+
"standard": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"enum": ["internal", "iso4217", "erc20", "spl"],
|
|
26
|
+
"description": "Discriminator routing to a settlement/valuation adapter. Not a taxonomy."
|
|
27
|
+
},
|
|
28
|
+
"chain": { "type": "string", "minLength": 1, "description": "Chain id for on-chain standards (erc20/spl), e.g. ethereum, solana." },
|
|
29
|
+
"peg": {
|
|
30
|
+
"type": "object",
|
|
31
|
+
"additionalProperties": false,
|
|
32
|
+
"required": ["vs", "source"],
|
|
33
|
+
"description": "How this asset is valued against a reference asset; resolved by RatePort.",
|
|
34
|
+
"properties": {
|
|
35
|
+
"vs": { "type": "string", "minLength": 1, "description": "Reference asset ref (usually USD)." },
|
|
36
|
+
"source": { "type": "string", "minLength": 1, "description": "Rate source key — `fixed:<ratio>` or an oracle id." }
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"ruleSet": { "$ref": "#/$defs/ruleSet" },
|
|
40
|
+
"partitions": {
|
|
41
|
+
"type": "array",
|
|
42
|
+
"items": { "$ref": "#/$defs/partitionSpec" },
|
|
43
|
+
"description": "The asset's tranches + lifecycle policies — the partition catalog, co-located on the asset."
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"$defs": {
|
|
47
|
+
"restriction": {
|
|
48
|
+
"type": "array",
|
|
49
|
+
"items": { "type": "string", "minLength": 1 },
|
|
50
|
+
"description": "Canonical (sorted, deduped) set of restriction tags. Accumulates at the lattice meet on convert."
|
|
51
|
+
},
|
|
52
|
+
"convertEdge": {
|
|
53
|
+
"type": "object",
|
|
54
|
+
"additionalProperties": false,
|
|
55
|
+
"required": ["to", "rate"],
|
|
56
|
+
"description": "A legal conversion to another asset — the only inter-asset edge. Subject to the no-arbitrage law.",
|
|
57
|
+
"properties": {
|
|
58
|
+
"to": { "type": "string", "minLength": 1, "description": "Destination asset ref (MUST differ from the declaring asset)." },
|
|
59
|
+
"rate": {
|
|
60
|
+
"oneOf": [
|
|
61
|
+
{
|
|
62
|
+
"type": "object",
|
|
63
|
+
"additionalProperties": false,
|
|
64
|
+
"required": ["kind", "ratio"],
|
|
65
|
+
"properties": {
|
|
66
|
+
"kind": { "const": "fixed" },
|
|
67
|
+
"ratio": { "type": "number", "exclusiveMinimum": 0, "description": "Destination-major per source-major units." }
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"type": "object",
|
|
72
|
+
"additionalProperties": false,
|
|
73
|
+
"required": ["kind", "source"],
|
|
74
|
+
"properties": {
|
|
75
|
+
"kind": { "const": "oracle" },
|
|
76
|
+
"source": { "type": "string", "minLength": 1, "description": "RatePort source id resolving the rate at convert time." }
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
"addsRestriction": { "$ref": "#/$defs/restriction", "description": "Restriction added to the output (accumulated at the meet)." },
|
|
82
|
+
"cap": {
|
|
83
|
+
"type": "object",
|
|
84
|
+
"additionalProperties": false,
|
|
85
|
+
"required": ["amount", "windowSec"],
|
|
86
|
+
"description": "Throughput cap (anti-inflation; load-bearing for runtime/guild-minted assets).",
|
|
87
|
+
"properties": {
|
|
88
|
+
"amount": { "type": "number", "minimum": 0 },
|
|
89
|
+
"windowSec": { "type": "number", "exclusiveMinimum": 0 }
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"timeSpec": {
|
|
95
|
+
"description": "A point in time: relative to the lot's grant, or absolute (epoch ms).",
|
|
96
|
+
"oneOf": [
|
|
97
|
+
{
|
|
98
|
+
"type": "object",
|
|
99
|
+
"additionalProperties": false,
|
|
100
|
+
"required": ["kind", "ms"],
|
|
101
|
+
"properties": {
|
|
102
|
+
"kind": { "const": "afterGrant" },
|
|
103
|
+
"ms": { "type": "number", "minimum": 0, "description": "Offset from the lot's grant instant." }
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"type": "object",
|
|
108
|
+
"additionalProperties": false,
|
|
109
|
+
"required": ["kind", "at"],
|
|
110
|
+
"properties": {
|
|
111
|
+
"kind": { "const": "absolute" },
|
|
112
|
+
"at": { "type": "number", "minimum": 0, "description": "Absolute epoch-ms instant." }
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
]
|
|
116
|
+
},
|
|
117
|
+
"partitionRule": {
|
|
118
|
+
"description": "One lifecycle rule. `kind` discriminates; rules are serialisable data evaluated by `evaluatePolicy`.",
|
|
119
|
+
"oneOf": [
|
|
120
|
+
{
|
|
121
|
+
"type": "object",
|
|
122
|
+
"additionalProperties": false,
|
|
123
|
+
"required": ["kind", "categories"],
|
|
124
|
+
"properties": {
|
|
125
|
+
"kind": { "const": "spendOn" },
|
|
126
|
+
"categories": { "type": "array", "items": { "type": "string", "minLength": 1 }, "description": "Narrows payable categories (∩ with the asset's spendableOn)." }
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"type": "object",
|
|
131
|
+
"additionalProperties": false,
|
|
132
|
+
"required": ["kind", "tags"],
|
|
133
|
+
"properties": {
|
|
134
|
+
"kind": { "const": "restrict" },
|
|
135
|
+
"tags": { "$ref": "#/$defs/restriction" }
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"type": "object",
|
|
140
|
+
"additionalProperties": false,
|
|
141
|
+
"required": ["kind", "at"],
|
|
142
|
+
"properties": {
|
|
143
|
+
"kind": { "const": "expire" },
|
|
144
|
+
"at": { "$ref": "#/$defs/timeSpec", "description": "Hard cliff: spendable drops to 0 once this passes." }
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"type": "object",
|
|
149
|
+
"additionalProperties": false,
|
|
150
|
+
"required": ["kind", "curve", "ratePerDay"],
|
|
151
|
+
"properties": {
|
|
152
|
+
"kind": { "const": "decay" },
|
|
153
|
+
"curve": { "type": "string", "enum": ["linear", "exponential"] },
|
|
154
|
+
"ratePerDay": { "type": "number", "minimum": 0, "maximum": 1, "description": "Fraction lost per day. Linear hits 0 at 1/rate days; exponential is asymptotic." }
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"type": "object",
|
|
159
|
+
"additionalProperties": false,
|
|
160
|
+
"required": ["kind", "durationMs"],
|
|
161
|
+
"properties": {
|
|
162
|
+
"kind": { "const": "vest" },
|
|
163
|
+
"cliff": { "$ref": "#/$defs/timeSpec", "description": "No value unlocks before this instant." },
|
|
164
|
+
"durationMs": { "type": "number", "exclusiveMinimum": 0, "description": "Linear unlock completes this many ms after grant (or cliff)." }
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"type": "object",
|
|
169
|
+
"additionalProperties": false,
|
|
170
|
+
"required": ["kind", "scope"],
|
|
171
|
+
"properties": {
|
|
172
|
+
"kind": { "const": "transfer" },
|
|
173
|
+
"scope": { "type": "string", "enum": ["soulbound", "account", "open"] }
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
]
|
|
177
|
+
},
|
|
178
|
+
"partitionSpec": {
|
|
179
|
+
"type": "object",
|
|
180
|
+
"additionalProperties": false,
|
|
181
|
+
"required": ["id", "asset", "restriction"],
|
|
182
|
+
"description": "A tranche within an asset, identified `<asset>:<tranche>`. Carries its lifecycle policy.",
|
|
183
|
+
"properties": {
|
|
184
|
+
"id": { "type": "string", "minLength": 1, "description": "`<asset>:<tranche>`." },
|
|
185
|
+
"asset": { "type": "string", "minLength": 1, "description": "Owning asset ref (the prefix of `id`)." },
|
|
186
|
+
"restriction": { "$ref": "#/$defs/restriction" },
|
|
187
|
+
"spendableOn": { "type": "array", "items": { "type": "string" }, "description": "Legacy shorthand: narrows the asset's categories for this tranche." },
|
|
188
|
+
"defaultTtlMs": { "type": "number", "exclusiveMinimum": 0, "description": "Legacy shorthand: default lot lifetime." },
|
|
189
|
+
"policy": {
|
|
190
|
+
"type": "array",
|
|
191
|
+
"items": { "$ref": "#/$defs/partitionRule" },
|
|
192
|
+
"description": "The unified lifecycle policy (restrict/expire/decay/vest/transfer). Source of truth when present."
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
"ruleSet": {
|
|
197
|
+
"type": "object",
|
|
198
|
+
"additionalProperties": false,
|
|
199
|
+
"required": ["settleOut", "spendableOn", "convertEdges", "transfer"],
|
|
200
|
+
"description": "What the asset is allowed to do.",
|
|
201
|
+
"properties": {
|
|
202
|
+
"settleOut": {
|
|
203
|
+
"description": "Whether value may LEAVE the wallet and via which network. `false` = never settles out (e.g. loyalty points).",
|
|
204
|
+
"oneOf": [
|
|
205
|
+
{ "const": false },
|
|
206
|
+
{ "type": "string", "enum": ["internal-ledger", "stripe", "pawapay", "x402", "solana"] }
|
|
207
|
+
]
|
|
208
|
+
},
|
|
209
|
+
"spendableOn": {
|
|
210
|
+
"type": "array",
|
|
211
|
+
"items": { "type": "string" },
|
|
212
|
+
"description": "Spend categories payable. `[\"*\"]` = anything; `[]` = convertible-only (loyalty)."
|
|
213
|
+
},
|
|
214
|
+
"convertEdges": {
|
|
215
|
+
"type": "array",
|
|
216
|
+
"items": { "$ref": "#/$defs/convertEdge" },
|
|
217
|
+
"description": "Legal conversions to other assets."
|
|
218
|
+
},
|
|
219
|
+
"transfer": {
|
|
220
|
+
"type": "string",
|
|
221
|
+
"enum": ["none", "internal", "external"],
|
|
222
|
+
"description": "Who may move this asset between wallets."
|
|
223
|
+
},
|
|
224
|
+
"custody": {
|
|
225
|
+
"type": "string",
|
|
226
|
+
"enum": ["custodial-mirror", "on-chain-authority"],
|
|
227
|
+
"description": "Custody model for on-chain assets. Defaults to custodial-mirror."
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://agentproto.sh/schemas/aip-50/auth-provider.json",
|
|
4
|
+
"title": "AUTH.md — agentauth/v1 frontmatter",
|
|
5
|
+
"description": "AIP-50: auth-provider manifest frontmatter. Declares how a CLI tool or agent authenticates to a remote API server.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["id", "description", "apiBase", "auth"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"id": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"minLength": 2,
|
|
13
|
+
"maxLength": 80,
|
|
14
|
+
"pattern": "^[a-z0-9][a-z0-9._-]*$",
|
|
15
|
+
"description": "Vendor id — kebab/dot, 2–80 chars, leading alphanumeric."
|
|
16
|
+
},
|
|
17
|
+
"description": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"minLength": 1,
|
|
20
|
+
"maxLength": 2000,
|
|
21
|
+
"description": "Human/LLM-facing description of the vendor and its auth."
|
|
22
|
+
},
|
|
23
|
+
"apiBase": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"format": "uri",
|
|
26
|
+
"description": "Canonical API base URL (no trailing slash)."
|
|
27
|
+
},
|
|
28
|
+
"audience": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"minLength": 1,
|
|
31
|
+
"description": "Credential plane hint (recommended: 'tunnel', 'api', 'mcp'; free-form allowed). Clients SHOULD embed this in the credential store key. Enforcement is server-side; this is defense-in-depth only."
|
|
32
|
+
},
|
|
33
|
+
"auth": {
|
|
34
|
+
"description": "Authentication configuration.",
|
|
35
|
+
"oneOf": [
|
|
36
|
+
{
|
|
37
|
+
"description": "PAT flow — read existing token from Keychain or prompt.",
|
|
38
|
+
"type": "object",
|
|
39
|
+
"required": ["flow", "tokenStore"],
|
|
40
|
+
"additionalProperties": false,
|
|
41
|
+
"properties": {
|
|
42
|
+
"flow": { "const": "pat" },
|
|
43
|
+
"tokenStore": { "$ref": "#/$defs/tokenStoreSpec" }
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"description": "service-auth flow — auth.md claim ceremony (RFC 8628 + JWT-bearer).",
|
|
48
|
+
"type": "object",
|
|
49
|
+
"required": ["flow", "tokenStore"],
|
|
50
|
+
"additionalProperties": false,
|
|
51
|
+
"properties": {
|
|
52
|
+
"flow": { "const": "service-auth" },
|
|
53
|
+
"clientId": { "type": "string", "minLength": 1 },
|
|
54
|
+
"loginHint": { "type": "string", "minLength": 1 },
|
|
55
|
+
"tokenStore": { "$ref": "#/$defs/tokenStoreSpec" }
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"description": "device-code flow — plain RFC 8628 device authorization, yielding a durable access token.",
|
|
60
|
+
"type": "object",
|
|
61
|
+
"required": ["flow", "tokenStore"],
|
|
62
|
+
"additionalProperties": false,
|
|
63
|
+
"properties": {
|
|
64
|
+
"flow": { "const": "device-code" },
|
|
65
|
+
"clientId": { "type": "string", "minLength": 1 },
|
|
66
|
+
"scope": { "type": "string", "minLength": 1 },
|
|
67
|
+
"deviceLabel": { "type": "string", "minLength": 1 },
|
|
68
|
+
"tokenStore": { "$ref": "#/$defs/tokenStoreSpec" }
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
},
|
|
73
|
+
"install": {
|
|
74
|
+
"description": "AIP-19 provision target — pair auth with an install endpoint.",
|
|
75
|
+
"$ref": "#/$defs/installConfig"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"$defs": {
|
|
79
|
+
"tokenStoreSpec": {
|
|
80
|
+
"type": "object",
|
|
81
|
+
"required": ["keychain"],
|
|
82
|
+
"additionalProperties": false,
|
|
83
|
+
"properties": {
|
|
84
|
+
"keychain": {
|
|
85
|
+
"type": "string",
|
|
86
|
+
"minLength": 1,
|
|
87
|
+
"description": "macOS Keychain service name."
|
|
88
|
+
},
|
|
89
|
+
"account": {
|
|
90
|
+
"type": "string",
|
|
91
|
+
"minLength": 1,
|
|
92
|
+
"description": "Keychain account. '{server}' is substituted with the resolved server URL."
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"installConfig": {
|
|
97
|
+
"type": "object",
|
|
98
|
+
"required": ["sealKey", "secretBacked"],
|
|
99
|
+
"additionalProperties": false,
|
|
100
|
+
"properties": {
|
|
101
|
+
"sealKey": {
|
|
102
|
+
"type": "string",
|
|
103
|
+
"minLength": 1,
|
|
104
|
+
"description": "URL path for the seal-key endpoint."
|
|
105
|
+
},
|
|
106
|
+
"secretBacked": {
|
|
107
|
+
"type": "string",
|
|
108
|
+
"minLength": 1,
|
|
109
|
+
"description": "URL path template for the secret-backed install endpoint. May contain {guildId}."
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://agentproto.sh/docs/aip-53/APP.schema.json",
|
|
4
|
+
"title": "APP.md frontmatter — app/v1 (agent app bundle + UI surface)",
|
|
5
|
+
"description": "Validates the YAML frontmatter portion of an AIP-53 APP.md manifest — the on-disk form of an AppDefinition. Codifies shipped behaviour: `agents` may be empty for a UI-only app when `ui` is present (packages/app-kit/src/define-app.ts:49-52), and `data` / `category` are carried verbatim (packages/app-kit/src/types.ts).",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["schema", "version"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"schema": {
|
|
11
|
+
"const": "app/v1",
|
|
12
|
+
"description": "Exactly `app/v1`. Any other value MUST be refused by the loader."
|
|
13
|
+
},
|
|
14
|
+
"id": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"minLength": 1,
|
|
17
|
+
"description": "Machine identifier for the app itself. Optional — an anonymous bundle cannot be installed by id. Written with any `@owner/` prefix as authored."
|
|
18
|
+
},
|
|
19
|
+
"name": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"minLength": 1,
|
|
22
|
+
"description": "Human-readable app name."
|
|
23
|
+
},
|
|
24
|
+
"version": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+(?:[-+][\\w.\\-]+)?$",
|
|
27
|
+
"description": "App version. Defaulted to `0.1.0` by defineApp when `id` is set and version is omitted (conformance rule 8)."
|
|
28
|
+
},
|
|
29
|
+
"description": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"description": "App description. Also the APP.md markdown body."
|
|
32
|
+
},
|
|
33
|
+
"agents": {
|
|
34
|
+
"type": "array",
|
|
35
|
+
"items": {
|
|
36
|
+
"type": "object",
|
|
37
|
+
"required": ["id", "path"],
|
|
38
|
+
"additionalProperties": false,
|
|
39
|
+
"properties": {
|
|
40
|
+
"id": { "type": "string", "minLength": 1 },
|
|
41
|
+
"path": { "type": "string", "minLength": 1, "description": "Path to the AGENT.md, relative to the app dir." }
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"description": "`{ id, path }` refs, one per bundled agent. MAY be empty ONLY when `ui` is present (UI-only app) — see the allOf guard below."
|
|
45
|
+
},
|
|
46
|
+
"workflows": {
|
|
47
|
+
"type": "array",
|
|
48
|
+
"items": {
|
|
49
|
+
"type": "object",
|
|
50
|
+
"required": ["id", "path"],
|
|
51
|
+
"additionalProperties": false,
|
|
52
|
+
"properties": {
|
|
53
|
+
"id": { "type": "string", "minLength": 1 },
|
|
54
|
+
"path": { "type": "string", "minLength": 1, "description": "Path to the WORKFLOW.md, relative to the app dir." }
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"description": "`{ id, path }` refs, one per bundled workflow. Every bundled workflow MUST be referenced by at least one agent's workflows[] (attachment invariant, both directions)."
|
|
58
|
+
},
|
|
59
|
+
"workspace": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"minLength": 1,
|
|
62
|
+
"description": "Optional home workspace id (AIP-34). When set, a sibling WORKSPACE.md exists at the app dir root."
|
|
63
|
+
},
|
|
64
|
+
"requires": {
|
|
65
|
+
"type": "array",
|
|
66
|
+
"items": { "type": "string", "minLength": 1 },
|
|
67
|
+
"uniqueItems": true,
|
|
68
|
+
"description": "APP ids this app depends on. Bare ids — no version constraints in v1."
|
|
69
|
+
},
|
|
70
|
+
"ui": {
|
|
71
|
+
"type": "object",
|
|
72
|
+
"required": ["path"],
|
|
73
|
+
"additionalProperties": false,
|
|
74
|
+
"properties": {
|
|
75
|
+
"path": {
|
|
76
|
+
"type": "string",
|
|
77
|
+
"const": ".agentproto/ui/index.html",
|
|
78
|
+
"description": "The UI surface entry point."
|
|
79
|
+
},
|
|
80
|
+
"title": { "type": "string" },
|
|
81
|
+
"description": { "type": "string" },
|
|
82
|
+
"tools": {
|
|
83
|
+
"type": "array",
|
|
84
|
+
"items": { "type": "string", "minLength": 1 },
|
|
85
|
+
"description": "The ui_tool_call / app_tool_call allowlist — every tool a UI-originated call may reach. Enforced server-side on every call."
|
|
86
|
+
},
|
|
87
|
+
"port": {
|
|
88
|
+
"type": "integer",
|
|
89
|
+
"minimum": 1,
|
|
90
|
+
"maximum": 65535,
|
|
91
|
+
"description": "Preferred local port hint for `app serve`."
|
|
92
|
+
},
|
|
93
|
+
"csp": {
|
|
94
|
+
"type": "object",
|
|
95
|
+
"additionalProperties": false,
|
|
96
|
+
"properties": {
|
|
97
|
+
"connectDomains": { "type": "array", "items": { "type": "string" } },
|
|
98
|
+
"resourceDomains": { "type": "array", "items": { "type": "string" } }
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"description": "The UI surface. `html` (the full document) is required on the in-memory AppDefinition at defineApp time and is NOT carried in APP.md frontmatter — it is emitted to `ui.path`. Its non-emptiness is enforced by defineApp (conformance rule 5)."
|
|
103
|
+
},
|
|
104
|
+
"artifact": {
|
|
105
|
+
"type": "object",
|
|
106
|
+
"required": ["path"],
|
|
107
|
+
"additionalProperties": false,
|
|
108
|
+
"properties": {
|
|
109
|
+
"path": { "type": "string", "minLength": 1, "description": "Emitted bundle path .agentproto/artifact/index.html." },
|
|
110
|
+
"title": { "type": "string" },
|
|
111
|
+
"description": { "type": "string" }
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"skill": {
|
|
115
|
+
"type": "object",
|
|
116
|
+
"required": ["path"],
|
|
117
|
+
"additionalProperties": false,
|
|
118
|
+
"properties": {
|
|
119
|
+
"path": { "type": "string", "minLength": 1, "description": "Emitted bundle path .agentproto/skill (must contain a SKILL.md)." },
|
|
120
|
+
"title": { "type": "string" },
|
|
121
|
+
"description": { "type": "string" }
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"artifacts": {
|
|
125
|
+
"type": "array",
|
|
126
|
+
"items": {
|
|
127
|
+
"type": "object",
|
|
128
|
+
"required": ["type"],
|
|
129
|
+
"additionalProperties": false,
|
|
130
|
+
"properties": {
|
|
131
|
+
"type": { "type": "string", "minLength": 1 },
|
|
132
|
+
"description": { "type": "string" }
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"description": "Artifact types this app's agents may produce, declared for discovery."
|
|
136
|
+
},
|
|
137
|
+
"dev": {
|
|
138
|
+
"type": "object",
|
|
139
|
+
"required": ["launch"],
|
|
140
|
+
"additionalProperties": false,
|
|
141
|
+
"properties": {
|
|
142
|
+
"launch": {
|
|
143
|
+
"type": "array",
|
|
144
|
+
"minItems": 1,
|
|
145
|
+
"items": {
|
|
146
|
+
"type": "object",
|
|
147
|
+
"required": ["name", "runtimeExecutable"],
|
|
148
|
+
"additionalProperties": false,
|
|
149
|
+
"properties": {
|
|
150
|
+
"name": { "type": "string", "minLength": 1 },
|
|
151
|
+
"runtimeExecutable": { "type": "string", "minLength": 1 },
|
|
152
|
+
"runtimeArgs": { "type": "array", "items": { "type": "string" } },
|
|
153
|
+
"port": { "type": "integer", "minimum": 1, "maximum": 65535 },
|
|
154
|
+
"url": { "type": "string" }
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"description": "Dev-launch configuration, carried verbatim in frontmatter."
|
|
160
|
+
},
|
|
161
|
+
"data": {
|
|
162
|
+
"type": "object",
|
|
163
|
+
"additionalProperties": false,
|
|
164
|
+
"properties": {
|
|
165
|
+
"dir": {
|
|
166
|
+
"type": "string",
|
|
167
|
+
"minLength": 1,
|
|
168
|
+
"description": "Default data-dir hint for the app_data_* plane, RELATIVE to the app dir (e.g. `data` means `<appDir>/data`). Overridden by an explicit dataDir at install time."
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
"description": "Default data-directory hint (AppDataDefinition). See AIP-53 § The app data plane."
|
|
172
|
+
},
|
|
173
|
+
"externalReadRoots": {
|
|
174
|
+
"type": "array",
|
|
175
|
+
"items": { "type": "string", "minLength": 1 },
|
|
176
|
+
"uniqueItems": true,
|
|
177
|
+
"description": "Host directories the app is granted READ-ONLY access to outside its sandboxed dir (absolute or ~-relative). Carried verbatim in frontmatter by emit/load; validated to exist at install time. Read-only everywhere — there is no write/delete path for these roots."
|
|
178
|
+
},
|
|
179
|
+
"category": {
|
|
180
|
+
"type": "string",
|
|
181
|
+
"minLength": 1,
|
|
182
|
+
"description": "Coarse grouping surfaced in host catalogs/trees (e.g. `book`). Freeform — not validated against a fixed enum."
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
"allOf": [
|
|
186
|
+
{
|
|
187
|
+
"title": "UI-only carve-out",
|
|
188
|
+
"description": "An app with an empty or absent `agents` array is conforming ONLY when `ui` is present (codifies packages/app-kit/src/define-app.ts:49-52 and the five builtin panels in packages/apps/src/index.ts that ship as agents: []).",
|
|
189
|
+
"if": {
|
|
190
|
+
"anyOf": [
|
|
191
|
+
{ "not": { "required": ["agents"] } },
|
|
192
|
+
{ "properties": { "agents": { "maxItems": 0 } } }
|
|
193
|
+
]
|
|
194
|
+
},
|
|
195
|
+
"then": { "required": ["ui"] }
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"title": "Attachment invariant (structural part)",
|
|
199
|
+
"description": "A UI-only app bundles zero workflows: a bundled workflow with no referencing agent would be an orphan (conformance rule 3).",
|
|
200
|
+
"if": {
|
|
201
|
+
"anyOf": [
|
|
202
|
+
{ "not": { "required": ["agents"] } },
|
|
203
|
+
{ "properties": { "agents": { "maxItems": 0 } } }
|
|
204
|
+
]
|
|
205
|
+
},
|
|
206
|
+
"then": {
|
|
207
|
+
"properties": { "workflows": { "maxItems": 0 } }
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
]
|
|
211
|
+
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"aip": {
|
|
11
11
|
"type": "integer",
|
|
12
12
|
"minimum": 1,
|
|
13
|
-
"description": "The referenced artifact's owning AIP number — the type discriminator that names the registry family (
|
|
13
|
+
"description": "The referenced artifact's owning AIP number — the type discriminator that names the registry family (53 = app, 52 = adapter, 14 = tool, …)."
|
|
14
14
|
},
|
|
15
15
|
"id": {
|
|
16
16
|
"type": "string",
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://agentproto.sh/schemas/aip-54/WS-REF.schema.json",
|
|
4
|
+
"title": "ws:// resource ref (AIP-54)",
|
|
5
|
+
"description": "Validates a ws:// resource reference string — the resource scheme of AIP-54, absorbed from superseded AIP-27. A ws:// ref points at a resource in the world (a workspace file, a URL, an identity, a transaction, a persona); the collection segment maps to a kind by the normative table in AIP-54 §Reference syntax, never by string manipulation. ws:// refs are tenant-local by mandate: hosts MUST resolve them in the same tenant scope as the citing file and reject cross-tenant bindings. This schema constrains the URI envelope and the collection vocabulary only; per-kind body grammar is owned by each kind's AIP.",
|
|
6
|
+
"type": "string",
|
|
7
|
+
"pattern": "^ws://[a-z][a-z0-9-]*/\\S+$",
|
|
8
|
+
"examples": [
|
|
9
|
+
"ws://operators/atlas",
|
|
10
|
+
"ws://wikis/platform/http-server",
|
|
11
|
+
"ws://workspaces/@acme/agentik-studio",
|
|
12
|
+
"ws://roles/seo-specialist",
|
|
13
|
+
"ws://companies/acme-co/teams/growth"
|
|
14
|
+
],
|
|
15
|
+
"x-collection-enum": [
|
|
16
|
+
"operators",
|
|
17
|
+
"personas",
|
|
18
|
+
"users",
|
|
19
|
+
"companies",
|
|
20
|
+
"collections",
|
|
21
|
+
"wikis",
|
|
22
|
+
"workspaces",
|
|
23
|
+
"skills",
|
|
24
|
+
"identities",
|
|
25
|
+
"playbooks",
|
|
26
|
+
"agencies",
|
|
27
|
+
"tools",
|
|
28
|
+
"roles",
|
|
29
|
+
"assemblies",
|
|
30
|
+
"actions",
|
|
31
|
+
"policies",
|
|
32
|
+
"workflows",
|
|
33
|
+
"offices",
|
|
34
|
+
"avatars",
|
|
35
|
+
"orgs",
|
|
36
|
+
"guilds"
|
|
37
|
+
],
|
|
38
|
+
"x-collection-enum-note": "The authoritative collection→kind table is AIP-54 §Reference syntax, parsed directly from specs/aip-54.mdx by scripts/check-refs.mjs — the spec is the fixture. This enum is a convenience mirror for validators; a collection absent from the spec's table MUST be treated as unknown regardless of this list. Add a row to AIP-54's table first, then mirror it here.",
|
|
39
|
+
"x-resolution-rules": [
|
|
40
|
+
"Dispatch: take the segment up to the first '/' as the collection, map to a kind via the AIP-54 table; an unknown collection is a parse-time failure (UnknownRefCollection).",
|
|
41
|
+
"Tenant-local: hosts MUST resolve in the citing file's tenant scope and MUST reject cross-tenant bindings (AIP-23 — identity_xref_unresolvable).",
|
|
42
|
+
"Loud failure: an unresolvable ws:// ref is a typed failure, never a silent dangling string.",
|
|
43
|
+
"Round-trip: ws://<collection>/<body> and <kind>:<body> denote the same ref; rewriting MUST NOT introduce an @<workspace> suffix — the tenant-scope envelope MUST stay closed.",
|
|
44
|
+
"Source of truth: the kind's owning AIP owns what exists; the ref is only the wire shape."
|
|
45
|
+
]
|
|
46
|
+
}
|