@agentproto/corpus-cli 0.1.0-alpha.1 → 0.1.0-alpha.3
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 +43 -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 +2 -2
|
@@ -0,0 +1,390 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://agentproto.sh/schemas/aip-22/OFFICE.schema.json",
|
|
4
|
+
"title": "agentoffice/v1 frontmatter (AIP-22)",
|
|
5
|
+
"description": "Validates the YAML frontmatter portion of an AIP-22 OFFICE.md (workspace root or per-context view). The single doctype 'office.workspace/v1' is used in both modes; the host distinguishes by checking whether `extends` is set. Per-item-kind schemas 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": "office.workspace/v1",
|
|
12
|
+
"description": "Discriminator for the AIP-22 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 company or view."
|
|
20
|
+
},
|
|
21
|
+
"title": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"minLength": 1,
|
|
24
|
+
"maxLength": 200,
|
|
25
|
+
"description": "Human-readable company title."
|
|
26
|
+
},
|
|
27
|
+
"description": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"minLength": 1,
|
|
30
|
+
"maxLength": 2000,
|
|
31
|
+
"description": "One-paragraph statement of purpose: what this company is, 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 / orgTree / lint / defaults changes. Independent of the company's content version."
|
|
37
|
+
},
|
|
38
|
+
"extends": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"minLength": 1,
|
|
41
|
+
"maxLength": 512,
|
|
42
|
+
"pattern": "^(\\.\\./|\\./)[^\\s]+/COMPANY\\.md$",
|
|
43
|
+
"description": "OPTIONAL — relative path to a parent OFFICE.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|skills)/[a-z][a-z0-9-]*|\\.\\./[^\\s]+)$",
|
|
50
|
+
"description": "Either a ws:// ref to an AIP-9 operator or 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 company 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
|
+
"legalName": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"minLength": 1,
|
|
62
|
+
"maxLength": 200,
|
|
63
|
+
"description": "OPTIONAL — registered legal name of the entity, if it differs from the title."
|
|
64
|
+
},
|
|
65
|
+
"legalEntity": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"pattern": "^ws://companies/[a-z][a-z0-9-]*$",
|
|
68
|
+
"description": "OPTIONAL — ws:// ref to the legal entity OFFICE.md (self-ref if this manifest IS the legal entity; parent ref if this is a subsidiary view)."
|
|
69
|
+
},
|
|
70
|
+
"jurisdiction": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"pattern": "^[A-Z]{2}$",
|
|
73
|
+
"description": "OPTIONAL — ISO 3166-1 alpha-2 country code for primary jurisdiction (e.g. US, FR, DE, GB)."
|
|
74
|
+
},
|
|
75
|
+
"foundedAt": {
|
|
76
|
+
"type": "string",
|
|
77
|
+
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
|
|
78
|
+
"description": "OPTIONAL — ISO 8601 date the entity was founded."
|
|
79
|
+
},
|
|
80
|
+
"mission": {
|
|
81
|
+
"type": "string",
|
|
82
|
+
"minLength": 1,
|
|
83
|
+
"maxLength": 2000,
|
|
84
|
+
"description": "OPTIONAL — one-paragraph mission statement."
|
|
85
|
+
},
|
|
86
|
+
"defaultCurrency": {
|
|
87
|
+
"type": "string",
|
|
88
|
+
"pattern": "^[A-Z]{3}$",
|
|
89
|
+
"description": "OPTIONAL — ISO 4217 default currency code (e.g. USD, EUR, GBP)."
|
|
90
|
+
},
|
|
91
|
+
"taxId": {
|
|
92
|
+
"type": "string",
|
|
93
|
+
"minLength": 1,
|
|
94
|
+
"maxLength": 64,
|
|
95
|
+
"description": "OPTIONAL — tax / VAT identifier."
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"description": "Organisation identity fields. Each leaf field independently overridable via merge; a divisional view MAY narrow `jurisdiction` while inheriting `mission` from the parent."
|
|
99
|
+
},
|
|
100
|
+
"executor": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"pattern": "^ws://operators/[a-z][a-z0-9-]*$",
|
|
103
|
+
"description": "OPTIONAL — AIP-9 default org-level operator. The host activates this operator for company-level prompts when no more-specific operator applies."
|
|
104
|
+
},
|
|
105
|
+
"governance": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"minLength": 1,
|
|
108
|
+
"maxLength": 512,
|
|
109
|
+
"description": "OPTIONAL — AIP-7 policy or audit binding. May be a path to an AIP-7 policy file or a ws:// ref. Org-level approvals (role creation, reporting reassignment, jurisdiction change) flow through this ref. Subject to the office_signing_downgrade one-way switch when the bound policy declares signing.required=true."
|
|
110
|
+
},
|
|
111
|
+
"work": {
|
|
112
|
+
"type": "string",
|
|
113
|
+
"pattern": "^ws://workspaces/[a-z][a-z0-9-]*$",
|
|
114
|
+
"description": "OPTIONAL — AIP-20 work tracker the company runs. Cross-references on items resolve against the bound work workspace by default."
|
|
115
|
+
},
|
|
116
|
+
"agency": {
|
|
117
|
+
"type": "string",
|
|
118
|
+
"pattern": "^ws://agencies/[a-z][a-z0-9-]*$",
|
|
119
|
+
"description": "OPTIONAL — AIP-21 agency context. Set when the company also operates as a commercial agency selling services to external counterparties."
|
|
120
|
+
},
|
|
121
|
+
"knowledge": {
|
|
122
|
+
"type": "string",
|
|
123
|
+
"pattern": "^ws://wikis/[a-z][a-z0-9-]*(/KNOWLEDGE\\.md)?$",
|
|
124
|
+
"description": "OPTIONAL — AIP-10 KNOWLEDGE.md ref. The institutional wiki — runbooks, onboarding docs, decision logs."
|
|
125
|
+
},
|
|
126
|
+
"playbook": {
|
|
127
|
+
"type": "string",
|
|
128
|
+
"pattern": "^ws://playbooks/[a-z][a-z0-9-]*$",
|
|
129
|
+
"description": "OPTIONAL — AIP-12 active playbook governing culture, values, and operating rhythm."
|
|
130
|
+
},
|
|
131
|
+
"collections": {
|
|
132
|
+
"type": "array",
|
|
133
|
+
"items": {
|
|
134
|
+
"$ref": "#/$defs/collectionEntry"
|
|
135
|
+
},
|
|
136
|
+
"default": [],
|
|
137
|
+
"description": "Collections enabled by this organisation. 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."
|
|
138
|
+
},
|
|
139
|
+
"orgTree": {
|
|
140
|
+
"type": "object",
|
|
141
|
+
"additionalProperties": false,
|
|
142
|
+
"properties": {
|
|
143
|
+
"containment": {
|
|
144
|
+
"type": "object",
|
|
145
|
+
"additionalProperties": false,
|
|
146
|
+
"properties": {
|
|
147
|
+
"enabled": {
|
|
148
|
+
"type": "boolean",
|
|
149
|
+
"default": true,
|
|
150
|
+
"description": "Whether org-tree containment is active. ONE-WAY SWITCH: once true at any ancestor, descendants MUST NOT set false (would orphan items). Refusal: office_orgtree_disable (HARD)."
|
|
151
|
+
},
|
|
152
|
+
"field": {
|
|
153
|
+
"type": "string",
|
|
154
|
+
"pattern": "^[a-z][a-zA-Z0-9_]*$",
|
|
155
|
+
"default": "parent",
|
|
156
|
+
"description": "Item field name carrying the org-parent ref. Defaults to AIP-18's universal-ish 'parent'."
|
|
157
|
+
},
|
|
158
|
+
"rules": {
|
|
159
|
+
"type": "object",
|
|
160
|
+
"additionalProperties": false,
|
|
161
|
+
"properties": {
|
|
162
|
+
"allowedKinds": {
|
|
163
|
+
"type": "array",
|
|
164
|
+
"items": {
|
|
165
|
+
"type": "string",
|
|
166
|
+
"pattern": "^[a-z][a-z0-9-]*[a-z0-9]$"
|
|
167
|
+
},
|
|
168
|
+
"uniqueItems": true,
|
|
169
|
+
"description": "OPTIONAL — collection names that participate in the org tree. Items in collections NOT listed here are outside the tree (e.g. policies, objectives) and must not carry containment refs."
|
|
170
|
+
},
|
|
171
|
+
"allowedParentKinds": {
|
|
172
|
+
"type": "object",
|
|
173
|
+
"additionalProperties": {
|
|
174
|
+
"type": "array",
|
|
175
|
+
"items": {
|
|
176
|
+
"type": "string",
|
|
177
|
+
"pattern": "^[a-z][a-z0-9-]*[a-z0-9]$"
|
|
178
|
+
},
|
|
179
|
+
"uniqueItems": true
|
|
180
|
+
},
|
|
181
|
+
"description": "OPTIONAL — containment matrix. Keys are CHILD collection names; values are arrays of allowed PARENT collection names. The host enforces this at item-write time. Per-item violations: office_orgtree_invalid_parent_kind (HARD)."
|
|
182
|
+
},
|
|
183
|
+
"maxDepth": {
|
|
184
|
+
"type": "integer",
|
|
185
|
+
"minimum": 1,
|
|
186
|
+
"maximum": 16,
|
|
187
|
+
"description": "OPTIONAL — maximum org-tree depth. ONE-WAY SWITCH on widening: once set at any ancestor, descendants may narrow (smaller value) but MUST NOT widen. Refusal: office_orgtree_depth_widen (HARD)."
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
"description": "OPTIONAL containment rules."
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
"description": "Org-tree containment axis. AIP-22's distinctive concept: which collection kinds nest under which, how deep the tree goes."
|
|
194
|
+
},
|
|
195
|
+
"reporting": {
|
|
196
|
+
"type": "object",
|
|
197
|
+
"additionalProperties": false,
|
|
198
|
+
"properties": {
|
|
199
|
+
"enabled": {
|
|
200
|
+
"type": "boolean",
|
|
201
|
+
"default": false,
|
|
202
|
+
"description": "Whether the reporting graph is active. When false, the host does not validate reportsTo refs."
|
|
203
|
+
},
|
|
204
|
+
"field": {
|
|
205
|
+
"type": "string",
|
|
206
|
+
"pattern": "^[a-z][a-zA-Z0-9_]*$",
|
|
207
|
+
"default": "reportsTo",
|
|
208
|
+
"description": "Item field name carrying the reporting (manager) ref. Distinct from the containment field — a role's manager is logically separate from its containment parent."
|
|
209
|
+
},
|
|
210
|
+
"cardinality": {
|
|
211
|
+
"enum": ["single", "multiple"],
|
|
212
|
+
"default": "single",
|
|
213
|
+
"description": "Reporting cardinality. 'single' (typical) = one manager per role; 'multiple' = matrixed (role MAY report to multiple managers, the field becomes an array)."
|
|
214
|
+
},
|
|
215
|
+
"rules": {
|
|
216
|
+
"type": "object",
|
|
217
|
+
"additionalProperties": false,
|
|
218
|
+
"properties": {
|
|
219
|
+
"mustResolveTo": {
|
|
220
|
+
"type": "string",
|
|
221
|
+
"pattern": "^[a-z][a-z0-9-]*[a-z0-9]$",
|
|
222
|
+
"default": "role",
|
|
223
|
+
"description": "Collection name the report target MUST resolve to. Typically 'role' (a role reports to another role). The host MUST refuse a reportsTo ref pointing at a different kind."
|
|
224
|
+
},
|
|
225
|
+
"circularBan": {
|
|
226
|
+
"type": "boolean",
|
|
227
|
+
"default": true,
|
|
228
|
+
"description": "Whether reporting cycles are banned. Default true. The host MUST walk the reportsTo chain on every write and refuse a write that would close a cycle (office_orgtree_circular_report, HARD)."
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
"description": "Reporting graph constraints."
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
"description": "Reporting / authority graph. Logically separate from containment; a role's manager is independent from its containment parent."
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
"description": "Org-tree declaration — the AIP-22 distinctive concept. Containment governs the structural tree; reporting governs the authority graph."
|
|
238
|
+
},
|
|
239
|
+
"lints": {
|
|
240
|
+
"type": "array",
|
|
241
|
+
"items": {
|
|
242
|
+
"type": "object",
|
|
243
|
+
"required": ["id", "kind", "severity"],
|
|
244
|
+
"additionalProperties": false,
|
|
245
|
+
"properties": {
|
|
246
|
+
"id": {
|
|
247
|
+
"type": "string",
|
|
248
|
+
"pattern": "^[a-z][a-z0-9-]*$",
|
|
249
|
+
"description": "Stable kebab-case lint id. Merge key when composing with extends parent."
|
|
250
|
+
},
|
|
251
|
+
"kind": {
|
|
252
|
+
"enum": [
|
|
253
|
+
"orphan-role",
|
|
254
|
+
"broken-report",
|
|
255
|
+
"missing-manager",
|
|
256
|
+
"unassigned-objective",
|
|
257
|
+
"stale-objective",
|
|
258
|
+
"custom"
|
|
259
|
+
],
|
|
260
|
+
"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`."
|
|
261
|
+
},
|
|
262
|
+
"severity": {
|
|
263
|
+
"enum": ["error", "warn", "info"],
|
|
264
|
+
"description": "Lint severity. Children may soften; governance policies MAY forbid softening below `error`."
|
|
265
|
+
},
|
|
266
|
+
"params": {
|
|
267
|
+
"type": "object",
|
|
268
|
+
"additionalProperties": true,
|
|
269
|
+
"default": {},
|
|
270
|
+
"description": "Kind-specific parameters. e.g. { collections: [role] } for orphan-role; { days: 30 } for stale-objective."
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
"default": [],
|
|
275
|
+
"description": "Workspace-spanning lints. Merge-by-id vs parent."
|
|
276
|
+
},
|
|
277
|
+
"defaults": {
|
|
278
|
+
"type": "object",
|
|
279
|
+
"additionalProperties": false,
|
|
280
|
+
"properties": {
|
|
281
|
+
"workflow": {
|
|
282
|
+
"type": "string",
|
|
283
|
+
"minLength": 1,
|
|
284
|
+
"maxLength": 512,
|
|
285
|
+
"description": "OPTIONAL — default AIP-15 WORKFLOW.md path or ref. Routine workflow run against company items (e.g. monthly reporting-graph integrity sweep)."
|
|
286
|
+
},
|
|
287
|
+
"approvalClass": {
|
|
288
|
+
"type": "string",
|
|
289
|
+
"pattern": "^(auto|always|on-mutate|policy:[A-Za-z0-9_./:-]+)$",
|
|
290
|
+
"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."
|
|
291
|
+
},
|
|
292
|
+
"auditMutations": {
|
|
293
|
+
"type": "boolean",
|
|
294
|
+
"default": false,
|
|
295
|
+
"description": "Whether mutations are audited. ONE-WAY SWITCH: once true at any ancestor, descendants MUST NOT set false. Refusal: office_audit_downgrade (HARD)."
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
"description": "Routine workflow defaults. Composes with AIP-15."
|
|
299
|
+
},
|
|
300
|
+
"display": {
|
|
301
|
+
"type": "object",
|
|
302
|
+
"additionalProperties": false,
|
|
303
|
+
"properties": {
|
|
304
|
+
"homePage": {
|
|
305
|
+
"type": "string",
|
|
306
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9_:-]*$",
|
|
307
|
+
"description": "OPTIONAL — id of the item to use as the company landing page (e.g. a top-level department or the founder role)."
|
|
308
|
+
},
|
|
309
|
+
"defaultGrouping": {
|
|
310
|
+
"enum": ["kind", "department", "parent"],
|
|
311
|
+
"description": "Default grouping for list views."
|
|
312
|
+
},
|
|
313
|
+
"defaultView": {
|
|
314
|
+
"enum": ["list", "tree", "board"],
|
|
315
|
+
"description": "Default rendering mode. 'tree' is the typical pick — org charts render naturally as trees."
|
|
316
|
+
}
|
|
317
|
+
},
|
|
318
|
+
"description": "Display hints for UIs that render the company. Runtime-agnostic."
|
|
319
|
+
},
|
|
320
|
+
"metadata": {
|
|
321
|
+
"type": "object",
|
|
322
|
+
"additionalProperties": true,
|
|
323
|
+
"default": {},
|
|
324
|
+
"description": "Vendor-specific extensions, namespaced under <vendor>. Deep-merged across the extends chain. MUST NOT change the meaning of any spec field."
|
|
325
|
+
}
|
|
326
|
+
},
|
|
327
|
+
"allOf": [
|
|
328
|
+
{
|
|
329
|
+
"description": "A view (any manifest with appliesTo set) MUST extend a parent. A workspace-root manifest has neither field.",
|
|
330
|
+
"if": {
|
|
331
|
+
"required": ["appliesTo"],
|
|
332
|
+
"properties": {
|
|
333
|
+
"appliesTo": { "type": "array", "minItems": 1 }
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
"then": {
|
|
337
|
+
"required": ["extends"]
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
],
|
|
341
|
+
"$defs": {
|
|
342
|
+
"collectionEntry": {
|
|
343
|
+
"oneOf": [
|
|
344
|
+
{ "$ref": "#/$defs/collectionInline" },
|
|
345
|
+
{ "$ref": "#/$defs/collectionRef" }
|
|
346
|
+
],
|
|
347
|
+
"description": "One collection declaration. Either an inline AIP-18 collection schema, or a ref (path or ws:// URI) optionally aliased and version-pinned."
|
|
348
|
+
},
|
|
349
|
+
"collectionInline": {
|
|
350
|
+
"type": "object",
|
|
351
|
+
"required": ["inline"],
|
|
352
|
+
"additionalProperties": false,
|
|
353
|
+
"properties": {
|
|
354
|
+
"inline": {
|
|
355
|
+
"$ref": "https://agentproto.sh/schemas/aip-18/COLLECTION.schema.json#/$defs/schema",
|
|
356
|
+
"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."
|
|
357
|
+
}
|
|
358
|
+
},
|
|
359
|
+
"description": "Inline collection declaration. Full AIP-18 schema embedded; hosts MUST validate it against the AIP-18 COLLECTION schema before registration."
|
|
360
|
+
},
|
|
361
|
+
"collectionRef": {
|
|
362
|
+
"type": "object",
|
|
363
|
+
"required": ["ref"],
|
|
364
|
+
"additionalProperties": false,
|
|
365
|
+
"properties": {
|
|
366
|
+
"ref": {
|
|
367
|
+
"type": "string",
|
|
368
|
+
"minLength": 1,
|
|
369
|
+
"maxLength": 512,
|
|
370
|
+
"pattern": "^((\\.\\./|\\./)[^\\s]+/COLLECTION\\.md|ws://collections/[a-z][a-z0-9-]*)$",
|
|
371
|
+
"description": "Either a relative path to a COLLECTION.md (file ref) or a ws://collections/<slug> URI (registry import). The host loads the referenced collection via AIP-18 and registers it under its name (or the alias, if set)."
|
|
372
|
+
},
|
|
373
|
+
"alias": {
|
|
374
|
+
"type": "string",
|
|
375
|
+
"pattern": "^[a-z][a-z0-9-]*[a-z0-9]$",
|
|
376
|
+
"minLength": 2,
|
|
377
|
+
"maxLength": 96,
|
|
378
|
+
"description": "OPTIONAL — workspace-local name to expose the collection under. Items in this organisation reference the alias, not the upstream name. Two collections resolving to the same effective name (alias or upstream) is a HARD failure: office_collection_alias_conflict."
|
|
379
|
+
},
|
|
380
|
+
"version": {
|
|
381
|
+
"type": "string",
|
|
382
|
+
"minLength": 1,
|
|
383
|
+
"maxLength": 64,
|
|
384
|
+
"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."
|
|
385
|
+
}
|
|
386
|
+
},
|
|
387
|
+
"description": "Collection ref declaration. Either a file path (./.. /COLLECTION.md) or a registry URI (ws://collections/<slug>)."
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
}
|