@agentproto/corpus-cli 0.1.0-alpha.1 → 0.1.0-alpha.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/cli.mjs +26 -8
- package/dist/cli.mjs.map +1 -1
- package/dist/index.d.ts +1 -5
- package/dist/index.mjs +15 -4
- package/dist/index.mjs.map +1 -1
- package/dist/specs/resources/aip-10/draft/KNOWLEDGE.schema.json +457 -0
- package/dist/specs/resources/aip-11/draft/LESSON.schema.json +149 -0
- package/dist/specs/resources/aip-12/draft/PLAYBOOK.schema.json +349 -0
- package/dist/specs/resources/aip-13/draft/WORK_ITEM.schema.json +547 -0
- package/dist/specs/resources/aip-14/draft/TOOL.schema.json +169 -0
- package/dist/specs/resources/aip-15/draft/WORKFLOW.schema.json +356 -0
- package/dist/specs/resources/aip-16/draft/IO.schema.json +64 -0
- package/dist/specs/resources/aip-17/draft/RUNNER.schema.json +81 -0
- package/dist/specs/resources/aip-18/draft/COLLECTION.schema.json +436 -0
- package/dist/specs/resources/aip-19/draft/SECRETS.schema.json +261 -0
- package/dist/specs/resources/aip-20/draft/WORK.schema.json +371 -0
- package/dist/specs/resources/aip-21/draft/AGENCY.schema.json +454 -0
- package/dist/specs/resources/aip-22/draft/OFFICE.schema.json +390 -0
- package/dist/specs/resources/aip-23/draft/IDENTITY.schema.json +358 -0
- package/dist/specs/resources/aip-24/draft/ASSEMBLY.schema.json +411 -0
- package/dist/specs/resources/aip-25/draft/PERSONA.schema.json +257 -0
- package/dist/specs/resources/aip-26/draft/CODE.schema.json +172 -0
- package/dist/specs/resources/aip-28/draft/INTENT.schema.json +215 -0
- package/dist/specs/resources/aip-29/draft/CLI.schema.json +339 -0
- package/dist/specs/resources/aip-3/draft/SKILL.schema.json +206 -0
- package/dist/specs/resources/aip-30/draft/DRIVER.schema.json +237 -0
- package/dist/specs/resources/aip-31/draft/HTTP.schema.json +80 -0
- package/dist/specs/resources/aip-32/draft/MCP.schema.json +88 -0
- package/dist/specs/resources/aip-33/draft/SDK.schema.json +60 -0
- package/dist/specs/resources/aip-34/draft/WORKSPACE.schema.json +252 -0
- package/dist/specs/resources/aip-35/draft/STORAGE.schema.json +237 -0
- package/dist/specs/resources/aip-36/draft/SANDBOX.schema.json +246 -0
- package/dist/specs/resources/aip-38/draft/POLICY.schema.json +217 -0
- package/dist/specs/resources/aip-39/draft/ACTION.schema.json +134 -0
- package/dist/specs/resources/aip-4/draft/DESIGN.schema.json +189 -0
- package/dist/specs/resources/aip-40/draft/EXTENSION.schema.json +116 -0
- package/dist/specs/resources/aip-41/draft/ROUTINE.schema.json +345 -0
- package/dist/specs/resources/aip-42/draft/AGENT.schema.json +268 -0
- package/dist/specs/resources/aip-44/draft/ACP.schema.json +170 -0
- package/dist/specs/resources/aip-45/draft/AGENT-CLI.schema.json +371 -0
- package/dist/specs/resources/aip-47/draft/ROLE.schema.json +199 -0
- package/dist/specs/resources/aip-48/draft/MultiAgentRuntime.schema.json +108 -0
- package/dist/specs/resources/aip-5/draft/TEMPLATE.schema.json +231 -0
- package/dist/specs/resources/aip-6/draft/COMPANY.schema.json +268 -0
- package/dist/specs/resources/aip-7/draft/GOVERNANCE.schema.json +581 -0
- package/dist/specs/resources/aip-8/draft/AGENCY.schema.json +518 -0
- package/dist/specs/resources/aip-9/draft/OPERATOR.schema.json +297 -0
- package/package.json +4 -4
|
@@ -0,0 +1,454 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://agentproto.sh/schemas/aip-21/AGENCY.schema.json",
|
|
4
|
+
"title": "agentagencies/v2 frontmatter (AIP-21)",
|
|
5
|
+
"description": "Validates the YAML frontmatter portion of an AIP-21 AGENCY.md (workspace root or per-context view). The single doctype 'agency.workspace/v2' is used in both modes; the host distinguishes by checking whether `extends` is set. Per-doctype schemas (service, engagement, agreement, deliverable, invoice, counterparty, procedure, pricing-model, routine, capacity) are delegated to AIP-18 (COLLECTION.md / ITEM.md).",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["schema", "name", "title", "description", "version"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"schema": {
|
|
11
|
+
"const": "agency.workspace/v2",
|
|
12
|
+
"description": "Discriminator for the AIP-21 workspace doctype."
|
|
13
|
+
},
|
|
14
|
+
"name": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"minLength": 2,
|
|
17
|
+
"maxLength": 96,
|
|
18
|
+
"pattern": "^[a-z][a-z0-9-]*[a-z0-9]$",
|
|
19
|
+
"description": "Stable kebab-case identifier for the agency or view."
|
|
20
|
+
},
|
|
21
|
+
"title": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"minLength": 1,
|
|
24
|
+
"maxLength": 200,
|
|
25
|
+
"description": "Human-readable agency title."
|
|
26
|
+
},
|
|
27
|
+
"description": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"minLength": 1,
|
|
30
|
+
"maxLength": 2000,
|
|
31
|
+
"description": "One-paragraph statement of purpose: what this agency does and who it serves."
|
|
32
|
+
},
|
|
33
|
+
"version": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+(-[A-Za-z0-9.-]+)?$",
|
|
36
|
+
"description": "Semantic version of the WORKSPACE shape. Bump on collection / scope / lifecycle / lint / defaults changes. Independent of the agency's content version."
|
|
37
|
+
},
|
|
38
|
+
"extends": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"minLength": 1,
|
|
41
|
+
"maxLength": 512,
|
|
42
|
+
"pattern": "^(\\.\\./|\\./)[^\\s]+/AGENCY\\.md$",
|
|
43
|
+
"description": "OPTIONAL — relative path to a parent AGENCY.md. Presence makes the manifest a VIEW; absence makes it a WORKSPACE ROOT. Recursive composition; maximum chain depth is 8."
|
|
44
|
+
},
|
|
45
|
+
"appliesTo": {
|
|
46
|
+
"type": "array",
|
|
47
|
+
"items": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"pattern": "^(ws://(operators|companies|skills)/[a-z][a-z0-9-]*|\\.\\./[^\\s]+)$",
|
|
50
|
+
"description": "Either a ws:// ref to an AIP-9 operator / AIP-6 company / AIP-3 skill, or a relative path to a consumer workspace folder."
|
|
51
|
+
},
|
|
52
|
+
"uniqueItems": true,
|
|
53
|
+
"description": "OPTIONAL — list of consumers this VIEW adapts the agency for. Hosts MUST refuse the view if any binding does not resolve. Not inherited; views declare their own scope."
|
|
54
|
+
},
|
|
55
|
+
"identity": {
|
|
56
|
+
"type": "object",
|
|
57
|
+
"additionalProperties": false,
|
|
58
|
+
"properties": {
|
|
59
|
+
"legalEntity": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"pattern": "^ws://companies/[a-z][a-z0-9-]*$",
|
|
62
|
+
"description": "OPTIONAL — AIP-6 ref to the company that legally signs agreements and issues invoices. When set, hosts SHOULD resolve this ref to populate legalName and taxId from the AIP-6 record."
|
|
63
|
+
},
|
|
64
|
+
"legalName": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"minLength": 1,
|
|
67
|
+
"maxLength": 200,
|
|
68
|
+
"description": "OPTIONAL — display string for the legal entity name. Used when legalEntity is absent or to override the AIP-6 record's legalName."
|
|
69
|
+
},
|
|
70
|
+
"taxId": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"minLength": 1,
|
|
73
|
+
"maxLength": 64,
|
|
74
|
+
"description": "OPTIONAL — tax identifier (VAT, EIN, GST, etc.). Hosts MUST treat this string as opaque; format validation belongs to per-jurisdiction tooling."
|
|
75
|
+
},
|
|
76
|
+
"jurisdiction": {
|
|
77
|
+
"type": "string",
|
|
78
|
+
"pattern": "^[A-Z]{2}$",
|
|
79
|
+
"description": "OPTIONAL — primary jurisdiction the agency operates under, as ISO 3166-1 alpha-2 (e.g. FR, US, GB, DE)."
|
|
80
|
+
},
|
|
81
|
+
"defaultCurrency": {
|
|
82
|
+
"type": "string",
|
|
83
|
+
"pattern": "^[A-Z]{3}$",
|
|
84
|
+
"description": "OPTIONAL — default currency for new invoices, as ISO 4217 (e.g. EUR, USD, GBP). Per-engagement overrides take precedence."
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"description": "Commercial-flavored identity block. All fields optional; agencies operating as a sole operator with no counterparty billing may omit the block entirely."
|
|
88
|
+
},
|
|
89
|
+
"executor": {
|
|
90
|
+
"type": "string",
|
|
91
|
+
"pattern": "^ws://operators/[a-z][a-z0-9-]*$",
|
|
92
|
+
"description": "OPTIONAL — AIP-9 default executor operator. The host activates this operator when an item with no explicit assignee surfaces."
|
|
93
|
+
},
|
|
94
|
+
"governance": {
|
|
95
|
+
"type": "string",
|
|
96
|
+
"minLength": 1,
|
|
97
|
+
"maxLength": 512,
|
|
98
|
+
"description": "OPTIONAL — AIP-7 policy or audit binding. May be a path to an AIP-7 policy file or a ws:// ref. Status-transition approvals, signature gates on agreements, and audit log routing flow through this ref. Agreements MUST be signed; the default policy lives here."
|
|
99
|
+
},
|
|
100
|
+
"knowledge": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"pattern": "^ws://wikis/[a-z][a-z0-9-]*(/KNOWLEDGE\\.md)?$",
|
|
103
|
+
"description": "OPTIONAL — AIP-10 KNOWLEDGE.md ref. Wiki this agency refers to (case studies, prior-art, methodology)."
|
|
104
|
+
},
|
|
105
|
+
"work": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"pattern": "^ws://workspaces/[a-z][a-z0-9-]*(/WORK\\.md)?$",
|
|
108
|
+
"description": "OPTIONAL — AIP-20 work workspace binding. Items in `deliverable` MAY be tracked as work items in the bound workspace."
|
|
109
|
+
},
|
|
110
|
+
"playbook": {
|
|
111
|
+
"type": "string",
|
|
112
|
+
"pattern": "^ws://playbooks/[a-z][a-z0-9-]*$",
|
|
113
|
+
"description": "OPTIONAL — AIP-12 active playbook. Governs the routine plays this agency runs."
|
|
114
|
+
},
|
|
115
|
+
"companies": {
|
|
116
|
+
"type": "string",
|
|
117
|
+
"pattern": "^ws://companies(/[a-z][a-z0-9-]*)?$",
|
|
118
|
+
"description": "OPTIONAL — AIP-6 companies root. Resolution root for `counterparty` items: a counterparty's companyRef resolves under this binding."
|
|
119
|
+
},
|
|
120
|
+
"collections": {
|
|
121
|
+
"type": "array",
|
|
122
|
+
"items": {
|
|
123
|
+
"$ref": "#/$defs/collectionEntry"
|
|
124
|
+
},
|
|
125
|
+
"default": [],
|
|
126
|
+
"description": "Collections enabled by this agency. Three forms supported: inline (full COLLECTION.md frontmatter), file ref, or registry import. Merge-by-effective-name (alias if set, otherwise the collection's name) across the extends chain."
|
|
127
|
+
},
|
|
128
|
+
"lifecycle": {
|
|
129
|
+
"type": "object",
|
|
130
|
+
"additionalProperties": false,
|
|
131
|
+
"properties": {
|
|
132
|
+
"enabled": {
|
|
133
|
+
"type": "boolean",
|
|
134
|
+
"default": false,
|
|
135
|
+
"description": "Whether cross-collection lifecycle propagation is active. When false, no lifecycle rules fire — items keep their stored statuses regardless of related items."
|
|
136
|
+
},
|
|
137
|
+
"rules": {
|
|
138
|
+
"type": "array",
|
|
139
|
+
"items": {
|
|
140
|
+
"type": "object",
|
|
141
|
+
"required": ["id", "when", "forCollection", "bubbleStatus"],
|
|
142
|
+
"additionalProperties": false,
|
|
143
|
+
"properties": {
|
|
144
|
+
"id": {
|
|
145
|
+
"type": "string",
|
|
146
|
+
"pattern": "^[a-z][a-z0-9-]*$",
|
|
147
|
+
"description": "Stable kebab-case rule id. Merge key when composing across extends."
|
|
148
|
+
},
|
|
149
|
+
"when": {
|
|
150
|
+
"type": "string",
|
|
151
|
+
"pattern": "^(all-items-in-collection-terminal|any-linked-item-status|linked-item-terminal|no-linked-items|custom:[a-z][a-z0-9-]*)$",
|
|
152
|
+
"description": "Predicate id from the recognised vocabulary. Custom predicates are host-defined keyed by `id`."
|
|
153
|
+
},
|
|
154
|
+
"forCollection": {
|
|
155
|
+
"type": "string",
|
|
156
|
+
"pattern": "^[a-z][a-z0-9-]*[a-z0-9]$",
|
|
157
|
+
"description": "Effective name of the collection whose items receive the bubbled status. MUST appear in the workspace's merged collections array."
|
|
158
|
+
},
|
|
159
|
+
"bubbleStatus": {
|
|
160
|
+
"type": "string",
|
|
161
|
+
"pattern": "^[a-z][a-z0-9-]*$",
|
|
162
|
+
"description": "Status id to set on the target item when the predicate holds. MUST exist on the forCollection's state machine."
|
|
163
|
+
},
|
|
164
|
+
"params": {
|
|
165
|
+
"type": "object",
|
|
166
|
+
"additionalProperties": true,
|
|
167
|
+
"default": {},
|
|
168
|
+
"description": "Predicate parameters. Common keys: sourceCollection (collection whose items the predicate inspects), linkField (field on source items pointing at the target), terminalStatuses (subset of terminal statuses to count), statusEquals (specific status to match)."
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
"default": [],
|
|
173
|
+
"description": "Cross-collection lifecycle rules. Merge-by-id vs parent. Hosts MUST detect graph cycles in the (forCollection, sourceCollection) edge set and refuse with agency_lifecycle_cycle (HARD)."
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
"description": "Engagement lifecycle helpers — workspace-level rules for cross-collection state propagation. The AIP-21 distinctive contribution."
|
|
177
|
+
},
|
|
178
|
+
"scope": {
|
|
179
|
+
"type": "object",
|
|
180
|
+
"additionalProperties": false,
|
|
181
|
+
"properties": {
|
|
182
|
+
"containment": {
|
|
183
|
+
"type": "object",
|
|
184
|
+
"additionalProperties": false,
|
|
185
|
+
"properties": {
|
|
186
|
+
"enabled": {
|
|
187
|
+
"type": "boolean",
|
|
188
|
+
"default": true,
|
|
189
|
+
"description": "Whether the containment axis is active. ONE-WAY SWITCH: once true at any ancestor, descendants MUST NOT set false (would orphan items). Refusal: agency_scope_disable (HARD)."
|
|
190
|
+
},
|
|
191
|
+
"field": {
|
|
192
|
+
"type": "string",
|
|
193
|
+
"pattern": "^[a-z][a-zA-Z0-9_]*$",
|
|
194
|
+
"default": "parent",
|
|
195
|
+
"description": "Item field name carrying the containment ref."
|
|
196
|
+
},
|
|
197
|
+
"rules": {
|
|
198
|
+
"type": "object",
|
|
199
|
+
"additionalProperties": false,
|
|
200
|
+
"properties": {
|
|
201
|
+
"allowedKinds": {
|
|
202
|
+
"type": "array",
|
|
203
|
+
"items": {
|
|
204
|
+
"type": "string",
|
|
205
|
+
"pattern": "^[a-z][a-z0-9-]*[a-z0-9]$"
|
|
206
|
+
},
|
|
207
|
+
"uniqueItems": true,
|
|
208
|
+
"description": "OPTIONAL — collection names allowed as containment parents."
|
|
209
|
+
},
|
|
210
|
+
"maxDepth": {
|
|
211
|
+
"type": "integer",
|
|
212
|
+
"minimum": 1,
|
|
213
|
+
"maximum": 32,
|
|
214
|
+
"description": "OPTIONAL — maximum containment depth."
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
"description": "OPTIONAL containment constraints."
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
"description": "Containment axis (parent/child)."
|
|
221
|
+
},
|
|
222
|
+
"applicability": {
|
|
223
|
+
"type": "object",
|
|
224
|
+
"additionalProperties": false,
|
|
225
|
+
"properties": {
|
|
226
|
+
"enabled": {
|
|
227
|
+
"type": "boolean",
|
|
228
|
+
"default": false,
|
|
229
|
+
"description": "Whether the applicability axis is active."
|
|
230
|
+
},
|
|
231
|
+
"field": {
|
|
232
|
+
"type": "string",
|
|
233
|
+
"pattern": "^[a-z][a-zA-Z0-9_]*$",
|
|
234
|
+
"default": "appliesTo",
|
|
235
|
+
"description": "Item field name carrying the applicability ref list."
|
|
236
|
+
},
|
|
237
|
+
"valueClass": {
|
|
238
|
+
"type": "string",
|
|
239
|
+
"pattern": "^[a-z][a-z0-9-]*$",
|
|
240
|
+
"description": "Class of refs the field accepts. Recognised classes: client, market, service, company, role, role-and-company, operator. ONE-WAY SWITCH: once set at any ancestor, descendants MUST NOT change. Refusal: agency_scope_value_class_drift (HARD)."
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
"description": "Applicability axis (who the item is about / scoped to)."
|
|
244
|
+
},
|
|
245
|
+
"ownership": {
|
|
246
|
+
"type": "object",
|
|
247
|
+
"additionalProperties": false,
|
|
248
|
+
"properties": {
|
|
249
|
+
"enabled": {
|
|
250
|
+
"type": "boolean",
|
|
251
|
+
"default": true,
|
|
252
|
+
"description": "Whether the ownership axis is active."
|
|
253
|
+
},
|
|
254
|
+
"field": {
|
|
255
|
+
"type": "string",
|
|
256
|
+
"pattern": "^[a-z][a-zA-Z0-9_]*$",
|
|
257
|
+
"default": "owner",
|
|
258
|
+
"description": "Workspace-level default item field name carrying the ownership ref."
|
|
259
|
+
},
|
|
260
|
+
"policy": {
|
|
261
|
+
"enum": ["strict", "inherit", "open"],
|
|
262
|
+
"default": "inherit",
|
|
263
|
+
"description": "Workspace-level ownership policy. 'strict' requires every collection's ownership.required to be true; 'inherit' delegates; 'open' permits any collection to omit ownership."
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
"description": "Ownership axis (who is doing the item)."
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
"description": "Workspace-level scope axes — three orthogonal axes (containment / applicability / ownership) declared once per agency."
|
|
270
|
+
},
|
|
271
|
+
"lints": {
|
|
272
|
+
"type": "array",
|
|
273
|
+
"items": {
|
|
274
|
+
"type": "object",
|
|
275
|
+
"required": ["id", "kind", "severity"],
|
|
276
|
+
"additionalProperties": false,
|
|
277
|
+
"properties": {
|
|
278
|
+
"id": {
|
|
279
|
+
"type": "string",
|
|
280
|
+
"pattern": "^[a-z][a-z0-9-]*$",
|
|
281
|
+
"description": "Stable kebab-case lint id. Merge key when composing with extends parent."
|
|
282
|
+
},
|
|
283
|
+
"kind": {
|
|
284
|
+
"enum": [
|
|
285
|
+
"stale-engagement",
|
|
286
|
+
"unsigned-agreement",
|
|
287
|
+
"overdue-invoice",
|
|
288
|
+
"broken-procedure-ref",
|
|
289
|
+
"orphan-across-collections",
|
|
290
|
+
"stale-tree",
|
|
291
|
+
"broken-parent-ref",
|
|
292
|
+
"scope-mismatch",
|
|
293
|
+
"custom"
|
|
294
|
+
],
|
|
295
|
+
"description": "Workspace-spanning lint algorithm. AIP-18 per-collection lints (missing-owner, overdue, required-field, etc.) live on COLLECTION.md and are NOT redeclared here. 'custom' delegates to a host-defined check identified by `id`."
|
|
296
|
+
},
|
|
297
|
+
"severity": {
|
|
298
|
+
"enum": ["error", "warn", "info"],
|
|
299
|
+
"description": "Lint severity. Children may soften; governance policies MAY forbid softening below `error`."
|
|
300
|
+
},
|
|
301
|
+
"params": {
|
|
302
|
+
"type": "object",
|
|
303
|
+
"additionalProperties": true,
|
|
304
|
+
"default": {},
|
|
305
|
+
"description": "Kind-specific parameters."
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
"default": [],
|
|
310
|
+
"description": "Workspace-spanning lints. Merge-by-id vs parent."
|
|
311
|
+
},
|
|
312
|
+
"defaults": {
|
|
313
|
+
"type": "object",
|
|
314
|
+
"additionalProperties": false,
|
|
315
|
+
"properties": {
|
|
316
|
+
"workflow": {
|
|
317
|
+
"type": "string",
|
|
318
|
+
"minLength": 1,
|
|
319
|
+
"maxLength": 512,
|
|
320
|
+
"description": "OPTIONAL — default AIP-15 WORKFLOW.md path or ref."
|
|
321
|
+
},
|
|
322
|
+
"approvalClass": {
|
|
323
|
+
"type": "string",
|
|
324
|
+
"pattern": "^(auto|always|on-mutate|policy:[A-Za-z0-9_./:-]+)$",
|
|
325
|
+
"description": "Approval class for mutations. 'auto' = no gate; 'always' = every mutation requires approval; 'on-mutate' = approval on field-level mutations; 'policy:<ref>' = delegate to an AIP-7 policy."
|
|
326
|
+
},
|
|
327
|
+
"auditMutations": {
|
|
328
|
+
"type": "boolean",
|
|
329
|
+
"default": false,
|
|
330
|
+
"description": "Whether mutations are audited. ONE-WAY SWITCH: once true at any ancestor, descendants MUST NOT set false. Refusal: agency_audit_downgrade (HARD)."
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
"description": "Routine workflow defaults. Composes with AIP-15."
|
|
334
|
+
},
|
|
335
|
+
"engagement": {
|
|
336
|
+
"type": "object",
|
|
337
|
+
"additionalProperties": false,
|
|
338
|
+
"properties": {
|
|
339
|
+
"terms": {
|
|
340
|
+
"type": "object",
|
|
341
|
+
"additionalProperties": false,
|
|
342
|
+
"properties": {
|
|
343
|
+
"contractRequired": {
|
|
344
|
+
"type": "boolean",
|
|
345
|
+
"default": false,
|
|
346
|
+
"description": "Whether engagement items require a corresponding agreement item. ONE-WAY SWITCH: once true at any ancestor, descendants MUST NOT set false (commercial protection against engagements without paperwork). Refusal: agency_contract_required_downgrade (HARD)."
|
|
347
|
+
},
|
|
348
|
+
"defaultPaymentTerms": {
|
|
349
|
+
"type": "string",
|
|
350
|
+
"pattern": "^(net-[0-9]+|due-on-receipt|prepaid|[a-z][a-z0-9-]*)$",
|
|
351
|
+
"description": "OPTIONAL — default payment terms for new invoices. Common values: net-15, net-30, net-60, due-on-receipt, prepaid. Custom kebab-case strings permitted."
|
|
352
|
+
},
|
|
353
|
+
"defaultCurrency": {
|
|
354
|
+
"type": "string",
|
|
355
|
+
"pattern": "^[A-Z]{3}$",
|
|
356
|
+
"description": "OPTIONAL — default currency for engagement-derived invoices, as ISO 4217. Falls back to identity.defaultCurrency if unset."
|
|
357
|
+
}
|
|
358
|
+
},
|
|
359
|
+
"description": "Default commercial terms applied to new engagement and invoice items."
|
|
360
|
+
}
|
|
361
|
+
},
|
|
362
|
+
"description": "Engagement-specific terms (AIP-21 distinctive)."
|
|
363
|
+
},
|
|
364
|
+
"display": {
|
|
365
|
+
"type": "object",
|
|
366
|
+
"additionalProperties": false,
|
|
367
|
+
"properties": {
|
|
368
|
+
"homePage": {
|
|
369
|
+
"type": "string",
|
|
370
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9_:-]*$",
|
|
371
|
+
"description": "OPTIONAL — id of the item to use as the agency landing page."
|
|
372
|
+
},
|
|
373
|
+
"defaultGrouping": {
|
|
374
|
+
"enum": ["kind", "status", "counterparty", "engagement"],
|
|
375
|
+
"description": "Default grouping for list views."
|
|
376
|
+
},
|
|
377
|
+
"defaultView": {
|
|
378
|
+
"enum": ["list", "board", "timeline", "dashboard"],
|
|
379
|
+
"description": "Default rendering mode."
|
|
380
|
+
}
|
|
381
|
+
},
|
|
382
|
+
"description": "Display hints for UIs that render the agency. Runtime-agnostic."
|
|
383
|
+
},
|
|
384
|
+
"metadata": {
|
|
385
|
+
"type": "object",
|
|
386
|
+
"additionalProperties": true,
|
|
387
|
+
"default": {},
|
|
388
|
+
"description": "Vendor-specific extensions, namespaced under <vendor>. Deep-merged across the extends chain. MUST NOT change the meaning of any spec field."
|
|
389
|
+
}
|
|
390
|
+
},
|
|
391
|
+
"allOf": [
|
|
392
|
+
{
|
|
393
|
+
"description": "A view (any manifest with appliesTo set) MUST extend a parent. A workspace-root manifest has neither field.",
|
|
394
|
+
"if": {
|
|
395
|
+
"required": ["appliesTo"],
|
|
396
|
+
"properties": {
|
|
397
|
+
"appliesTo": { "type": "array", "minItems": 1 }
|
|
398
|
+
}
|
|
399
|
+
},
|
|
400
|
+
"then": {
|
|
401
|
+
"required": ["extends"]
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
],
|
|
405
|
+
"$defs": {
|
|
406
|
+
"collectionEntry": {
|
|
407
|
+
"oneOf": [
|
|
408
|
+
{ "$ref": "#/$defs/collectionInline" },
|
|
409
|
+
{ "$ref": "#/$defs/collectionRef" }
|
|
410
|
+
],
|
|
411
|
+
"description": "One collection declaration. Either an inline AIP-18 collection schema, or a ref (path or ws:// URI) optionally aliased and version-pinned."
|
|
412
|
+
},
|
|
413
|
+
"collectionInline": {
|
|
414
|
+
"type": "object",
|
|
415
|
+
"required": ["inline"],
|
|
416
|
+
"additionalProperties": false,
|
|
417
|
+
"properties": {
|
|
418
|
+
"inline": {
|
|
419
|
+
"$ref": "https://agentproto.sh/schemas/aip-18/COLLECTION.schema.json#/$defs/schema",
|
|
420
|
+
"description": "Full AIP-18 collection.schema/v1 frontmatter, parsed in-place. The host registers the collection directly via AIP-18's defineCollection without loading a separate file."
|
|
421
|
+
}
|
|
422
|
+
},
|
|
423
|
+
"description": "Inline collection declaration. Full AIP-18 schema embedded; hosts MUST validate it against the AIP-18 COLLECTION schema before registration."
|
|
424
|
+
},
|
|
425
|
+
"collectionRef": {
|
|
426
|
+
"type": "object",
|
|
427
|
+
"required": ["ref"],
|
|
428
|
+
"additionalProperties": false,
|
|
429
|
+
"properties": {
|
|
430
|
+
"ref": {
|
|
431
|
+
"type": "string",
|
|
432
|
+
"minLength": 1,
|
|
433
|
+
"maxLength": 512,
|
|
434
|
+
"pattern": "^((\\.\\./|\\./)[^\\s]+/COLLECTION\\.md|ws://collections/[a-z][a-z0-9-]*)$",
|
|
435
|
+
"description": "Either a relative path to a COLLECTION.md (file ref) or a ws://collections/<slug> URI (registry import)."
|
|
436
|
+
},
|
|
437
|
+
"alias": {
|
|
438
|
+
"type": "string",
|
|
439
|
+
"pattern": "^[a-z][a-z0-9-]*[a-z0-9]$",
|
|
440
|
+
"minLength": 2,
|
|
441
|
+
"maxLength": 96,
|
|
442
|
+
"description": "OPTIONAL — workspace-local name to expose the collection under. Items in this workspace reference the alias, not the upstream name. Two collections resolving to the same effective name is a HARD failure: agency_collection_alias_conflict."
|
|
443
|
+
},
|
|
444
|
+
"version": {
|
|
445
|
+
"type": "string",
|
|
446
|
+
"minLength": 1,
|
|
447
|
+
"maxLength": 64,
|
|
448
|
+
"description": "OPTIONAL — semver range (e.g. \"1.x\", \"^1.2\", \"1.2.0\"). When set, schema bumps outside the range fail with collection_item_schema_pinned_drift (HARD) at item load time."
|
|
449
|
+
}
|
|
450
|
+
},
|
|
451
|
+
"description": "Collection ref declaration. Either a file path or a registry URI."
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
}
|