@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,261 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://agentproto.sh/schemas/aip-19/SECRETS.schema.json",
|
|
4
|
+
"title": "SECRETS.md frontmatter (AIP-19)",
|
|
5
|
+
"description": "Validates the YAML frontmatter portion of an AIP-19 SECRETS.md manifest. The manifest declares secret slugs + access policy + audit metadata. Values are NEVER stored in the manifest.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["secrets"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"secrets": {
|
|
11
|
+
"type": "array",
|
|
12
|
+
"minItems": 1,
|
|
13
|
+
"items": { "$ref": "#/$defs/secretEntry" }
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"$defs": {
|
|
17
|
+
"secretEntry": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"required": ["slug", "name", "description"],
|
|
20
|
+
"additionalProperties": false,
|
|
21
|
+
"properties": {
|
|
22
|
+
"slug": {
|
|
23
|
+
"description": "Machine identifier. Lowercase, digits, dashes; optional <namespace>/ prefix. 2–80 chars total. Unique within the workspace inventory.",
|
|
24
|
+
"type": "string",
|
|
25
|
+
"minLength": 2,
|
|
26
|
+
"maxLength": 80,
|
|
27
|
+
"pattern": "^([a-z][a-z0-9-]*[a-z0-9]/)?[a-z][a-z0-9-]*[a-z0-9]$"
|
|
28
|
+
},
|
|
29
|
+
"name": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"minLength": 1,
|
|
32
|
+
"maxLength": 80
|
|
33
|
+
},
|
|
34
|
+
"description": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"minLength": 1,
|
|
37
|
+
"maxLength": 2000
|
|
38
|
+
},
|
|
39
|
+
"kind": {
|
|
40
|
+
"description": "Value shape. 'opaque' = single string. 'oauth' = { accessToken, refreshToken, expiresAt }. 'keypair' = { public, private }. 'json' = arbitrary structured.",
|
|
41
|
+
"enum": ["opaque", "oauth", "keypair", "json"],
|
|
42
|
+
"default": "opaque"
|
|
43
|
+
},
|
|
44
|
+
"backend": {
|
|
45
|
+
"description": "Vault URI (optional). Default: host-resolved by slug. Setting it explicitly exposes infra topology and SHOULD be reviewer-audited.",
|
|
46
|
+
"type": "string",
|
|
47
|
+
"pattern": "^[a-z][a-z0-9-]*://"
|
|
48
|
+
},
|
|
49
|
+
"access": { "$ref": "#/$defs/accessGrants" },
|
|
50
|
+
"audit": { "$ref": "#/$defs/auditConfig" },
|
|
51
|
+
"tags": {
|
|
52
|
+
"type": "array",
|
|
53
|
+
"items": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$" },
|
|
54
|
+
"default": []
|
|
55
|
+
},
|
|
56
|
+
"metadata": {
|
|
57
|
+
"type": "object",
|
|
58
|
+
"additionalProperties": true,
|
|
59
|
+
"default": {}
|
|
60
|
+
},
|
|
61
|
+
"exposures": {
|
|
62
|
+
"description": "How this secret is exposed to the runtime that consumes it (env var, config file, egress placeholder, …). Optional hints — hosts MAY honor or remap based on their own catalog. Discriminated by `kind`. New variants slot in without schema breakage; consumers ignore unknown kinds.",
|
|
63
|
+
"type": "array",
|
|
64
|
+
"items": { "$ref": "#/$defs/exposure" },
|
|
65
|
+
"default": []
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"allOf": [
|
|
69
|
+
{
|
|
70
|
+
"comment": "VALUE FIELDS BLOCKED. A SECRETS.md manifest MUST NOT contain plaintext values, ciphertexts, decryption keys, pre-signed URLs, or anything that decrypts.",
|
|
71
|
+
"not": {
|
|
72
|
+
"anyOf": [
|
|
73
|
+
{ "required": ["value"] },
|
|
74
|
+
{ "required": ["plaintext"] },
|
|
75
|
+
{ "required": ["ciphertext"] },
|
|
76
|
+
{ "required": ["secret"] },
|
|
77
|
+
{ "required": ["data"] },
|
|
78
|
+
{ "required": ["key"] },
|
|
79
|
+
{ "required": ["token"] }
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
"accessGrants": {
|
|
86
|
+
"type": "object",
|
|
87
|
+
"additionalProperties": false,
|
|
88
|
+
"properties": {
|
|
89
|
+
"reveal": {
|
|
90
|
+
"type": "array",
|
|
91
|
+
"items": { "$ref": "#/$defs/accessEntry" },
|
|
92
|
+
"default": []
|
|
93
|
+
},
|
|
94
|
+
"bind": {
|
|
95
|
+
"type": "array",
|
|
96
|
+
"items": { "$ref": "#/$defs/accessEntry" },
|
|
97
|
+
"default": []
|
|
98
|
+
},
|
|
99
|
+
"rotate": {
|
|
100
|
+
"description": "Reserved for a future rotation AIP. Hosts MAY ignore.",
|
|
101
|
+
"type": "array",
|
|
102
|
+
"items": { "$ref": "#/$defs/accessEntry" },
|
|
103
|
+
"default": []
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"accessEntry": {
|
|
108
|
+
"description": "A single access-grant entry. Exactly ONE of role/userId/cap/tool/workflow.",
|
|
109
|
+
"type": "object",
|
|
110
|
+
"additionalProperties": false,
|
|
111
|
+
"properties": {
|
|
112
|
+
"role": { "type": "string", "minLength": 1 },
|
|
113
|
+
"userId": { "type": "string", "minLength": 1 },
|
|
114
|
+
"cap": { "type": "string", "pattern": "^cap://" },
|
|
115
|
+
"tool": { "type": "string", "minLength": 1 },
|
|
116
|
+
"workflow": { "type": "string", "minLength": 1 }
|
|
117
|
+
},
|
|
118
|
+
"oneOf": [
|
|
119
|
+
{ "required": ["role"] },
|
|
120
|
+
{ "required": ["userId"] },
|
|
121
|
+
{ "required": ["cap"] },
|
|
122
|
+
{ "required": ["tool"] },
|
|
123
|
+
{ "required": ["workflow"] }
|
|
124
|
+
]
|
|
125
|
+
},
|
|
126
|
+
"auditConfig": {
|
|
127
|
+
"type": "object",
|
|
128
|
+
"additionalProperties": false,
|
|
129
|
+
"properties": {
|
|
130
|
+
"retention": {
|
|
131
|
+
"description": "ISO 8601 duration ('P7Y') or shorthand ('7y', '90d').",
|
|
132
|
+
"type": "string",
|
|
133
|
+
"pattern": "^(P[0-9]+[YMWD]|[0-9]+(y|m|w|d|h))$"
|
|
134
|
+
},
|
|
135
|
+
"pii": {
|
|
136
|
+
"type": "boolean",
|
|
137
|
+
"default": false
|
|
138
|
+
},
|
|
139
|
+
"classification": {
|
|
140
|
+
"type": "array",
|
|
141
|
+
"items": { "type": "string", "minLength": 1 },
|
|
142
|
+
"default": []
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
"exposure": {
|
|
147
|
+
"description": "A single exposure descriptor — declares HOW the secret value reaches the runtime consumer. Discriminated by `kind`. Hosts that don't recognize a `kind` MUST ignore the entry rather than fail.",
|
|
148
|
+
"type": "object",
|
|
149
|
+
"required": ["kind"],
|
|
150
|
+
"oneOf": [
|
|
151
|
+
{
|
|
152
|
+
"title": "env",
|
|
153
|
+
"type": "object",
|
|
154
|
+
"additionalProperties": false,
|
|
155
|
+
"required": ["kind", "name", "field"],
|
|
156
|
+
"properties": {
|
|
157
|
+
"kind": { "const": "env" },
|
|
158
|
+
"name": {
|
|
159
|
+
"description": "Env var name as the runtime sees it.",
|
|
160
|
+
"type": "string",
|
|
161
|
+
"pattern": "^[A-Z_][A-Z0-9_]*$"
|
|
162
|
+
},
|
|
163
|
+
"field": {
|
|
164
|
+
"description": "Field on the secret value (after host-side resolution) whose value seeds the env var. Required.",
|
|
165
|
+
"type": "string",
|
|
166
|
+
"minLength": 1
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"title": "file",
|
|
172
|
+
"type": "object",
|
|
173
|
+
"additionalProperties": false,
|
|
174
|
+
"required": ["kind", "path"],
|
|
175
|
+
"properties": {
|
|
176
|
+
"kind": { "const": "file" },
|
|
177
|
+
"path": {
|
|
178
|
+
"description": "Absolute path or `~`-relative path inside the runtime sandbox.",
|
|
179
|
+
"type": "string",
|
|
180
|
+
"minLength": 1
|
|
181
|
+
},
|
|
182
|
+
"field": {
|
|
183
|
+
"description": "Field whose value seeds the file body. Omit when host-side `wrap` produces synthetic content.",
|
|
184
|
+
"type": "string",
|
|
185
|
+
"minLength": 1
|
|
186
|
+
},
|
|
187
|
+
"mode": {
|
|
188
|
+
"description": "POSIX file mode. Default 0o600.",
|
|
189
|
+
"type": "integer",
|
|
190
|
+
"minimum": 0,
|
|
191
|
+
"maximum": 511,
|
|
192
|
+
"default": 384
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"title": "egress-substitute",
|
|
198
|
+
"description": "Eligible for substitution at the egress proxy (see @agentproto/egress). Agents see only `$$SECRET[<placeholderName>]$$` placeholders; the proxy materializes the real value at the network boundary.",
|
|
199
|
+
"type": "object",
|
|
200
|
+
"additionalProperties": false,
|
|
201
|
+
"required": ["kind", "placeholderName", "allowedByDefault"],
|
|
202
|
+
"properties": {
|
|
203
|
+
"kind": { "const": "egress-substitute" },
|
|
204
|
+
"placeholderName": {
|
|
205
|
+
"description": "Token agents reference. Convention: matches the env name on the same secret.",
|
|
206
|
+
"type": "string",
|
|
207
|
+
"pattern": "^[A-Z_][A-Z0-9_]*$"
|
|
208
|
+
},
|
|
209
|
+
"allowedByDefault": {
|
|
210
|
+
"description": "Default value for the per-install allowlist flag. Hosts MAY offer a per-install override.",
|
|
211
|
+
"type": "boolean"
|
|
212
|
+
},
|
|
213
|
+
"intendedProviders": {
|
|
214
|
+
"description": "Audit/UX hint — providers this secret is meant for. NOT enforced at the proxy.",
|
|
215
|
+
"type": "array",
|
|
216
|
+
"items": { "type": "string", "minLength": 1 },
|
|
217
|
+
"default": []
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
]
|
|
222
|
+
},
|
|
223
|
+
"consumerBinding": {
|
|
224
|
+
"description": "Per-manifest top-level `secrets:` block: env-var name → resolution source. Imported by TOOL.md / WORKFLOW.md / code-workspace manifests via $ref.",
|
|
225
|
+
"type": "object",
|
|
226
|
+
"additionalProperties": { "$ref": "#/$defs/consumerBindingEntry" },
|
|
227
|
+
"propertyNames": {
|
|
228
|
+
"description": "Env-var names — uppercase letters, digits, underscores; must start with a letter.",
|
|
229
|
+
"pattern": "^[A-Z][A-Z0-9_]*$"
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
"consumerBindingEntry": {
|
|
233
|
+
"description": "Resolution spec for one env-var. Exactly ONE of vault, oauth, value.",
|
|
234
|
+
"type": "object",
|
|
235
|
+
"additionalProperties": false,
|
|
236
|
+
"properties": {
|
|
237
|
+
"vault": {
|
|
238
|
+
"description": "Slug of an entry in the workspace's SECRETS.md inventory. Resolved via the AIP-19 reveal pipeline (audit + access check).",
|
|
239
|
+
"type": "string",
|
|
240
|
+
"minLength": 2,
|
|
241
|
+
"maxLength": 80,
|
|
242
|
+
"pattern": "^([a-z][a-z0-9-]*[a-z0-9]/)?[a-z][a-z0-9-]*[a-z0-9]$"
|
|
243
|
+
},
|
|
244
|
+
"oauth": {
|
|
245
|
+
"description": "Provider id of an OAuth connector configured for the workspace (e.g. 'github', 'google'). Returns a fresh access token at reveal time.",
|
|
246
|
+
"type": "string",
|
|
247
|
+
"minLength": 1
|
|
248
|
+
},
|
|
249
|
+
"value": {
|
|
250
|
+
"description": "Plain literal value. Not a secret — for non-sensitive config (region codes, feature flags, default locales) declared alongside the real secrets.",
|
|
251
|
+
"type": "string"
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
"oneOf": [
|
|
255
|
+
{ "required": ["vault"] },
|
|
256
|
+
{ "required": ["oauth"] },
|
|
257
|
+
{ "required": ["value"] }
|
|
258
|
+
]
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://agentproto.sh/schemas/aip-20/WORK.schema.json",
|
|
4
|
+
"title": "agentwork/v2 frontmatter (AIP-20)",
|
|
5
|
+
"description": "Validates the YAML frontmatter portion of an AIP-20 WORK.md (workspace root or per-context view). The single doctype 'work.workspace/v2' 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": "work.workspace/v2",
|
|
12
|
+
"description": "Discriminator for the AIP-20 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 workspace or view."
|
|
20
|
+
},
|
|
21
|
+
"title": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"minLength": 1,
|
|
24
|
+
"maxLength": 200,
|
|
25
|
+
"description": "Human-readable workspace title."
|
|
26
|
+
},
|
|
27
|
+
"description": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"minLength": 1,
|
|
30
|
+
"maxLength": 2000,
|
|
31
|
+
"description": "One-paragraph statement of purpose: what this workspace tracks and who uses it."
|
|
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 / rollup / lint / defaults changes. Independent of the tracker's content version."
|
|
37
|
+
},
|
|
38
|
+
"extends": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"minLength": 1,
|
|
41
|
+
"maxLength": 512,
|
|
42
|
+
"pattern": "^(\\.\\./|\\./)[^\\s]+/WORK\\.md$",
|
|
43
|
+
"description": "OPTIONAL — relative path to a parent WORK.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 workspace for. Hosts MUST refuse the view if any binding does not resolve. Not inherited; views declare their own scope."
|
|
54
|
+
},
|
|
55
|
+
"executor": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"pattern": "^ws://operators/[a-z][a-z0-9-]*$",
|
|
58
|
+
"description": "OPTIONAL — AIP-9 default executor operator. The host activates this operator when an item with no explicit assignee surfaces."
|
|
59
|
+
},
|
|
60
|
+
"governance": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"minLength": 1,
|
|
63
|
+
"maxLength": 512,
|
|
64
|
+
"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, owner-change audits, and scope-widening interventions flow through this ref."
|
|
65
|
+
},
|
|
66
|
+
"knowledge": {
|
|
67
|
+
"type": "string",
|
|
68
|
+
"pattern": "^ws://wikis/[a-z][a-z0-9-]*(/KNOWLEDGE\\.md)?$",
|
|
69
|
+
"description": "OPTIONAL — AIP-10 KNOWLEDGE.md ref. Lets cross-references on items resolve against the bound wiki by default."
|
|
70
|
+
},
|
|
71
|
+
"agency": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"pattern": "^ws://agencies/[a-z][a-z0-9-]*$",
|
|
74
|
+
"description": "OPTIONAL — AIP-8 agency context. Binds the workspace to an autonomous-agency engagement for billable work, time-tracking, and contractual approval."
|
|
75
|
+
},
|
|
76
|
+
"playbook": {
|
|
77
|
+
"type": "string",
|
|
78
|
+
"pattern": "^ws://playbooks/[a-z][a-z0-9-]*$",
|
|
79
|
+
"description": "OPTIONAL — AIP-12 active playbook. Governs the routine plays this workspace runs."
|
|
80
|
+
},
|
|
81
|
+
"collections": {
|
|
82
|
+
"type": "array",
|
|
83
|
+
"items": {
|
|
84
|
+
"$ref": "#/$defs/collectionEntry"
|
|
85
|
+
},
|
|
86
|
+
"default": [],
|
|
87
|
+
"description": "Collections enabled by this workspace. 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."
|
|
88
|
+
},
|
|
89
|
+
"scope": {
|
|
90
|
+
"type": "object",
|
|
91
|
+
"additionalProperties": false,
|
|
92
|
+
"properties": {
|
|
93
|
+
"containment": {
|
|
94
|
+
"type": "object",
|
|
95
|
+
"additionalProperties": false,
|
|
96
|
+
"properties": {
|
|
97
|
+
"enabled": {
|
|
98
|
+
"type": "boolean",
|
|
99
|
+
"default": true,
|
|
100
|
+
"description": "Whether the containment axis is active. ONE-WAY SWITCH: once true at any ancestor, descendants MUST NOT set false (would orphan items). Refusal: work_scope_disable (HARD)."
|
|
101
|
+
},
|
|
102
|
+
"field": {
|
|
103
|
+
"type": "string",
|
|
104
|
+
"pattern": "^[a-z][a-zA-Z0-9_]*$",
|
|
105
|
+
"default": "parent",
|
|
106
|
+
"description": "Item field name carrying the containment ref. Defaults to AIP-18's universal-ish 'parent'."
|
|
107
|
+
},
|
|
108
|
+
"rules": {
|
|
109
|
+
"type": "object",
|
|
110
|
+
"additionalProperties": false,
|
|
111
|
+
"properties": {
|
|
112
|
+
"allowedKinds": {
|
|
113
|
+
"type": "array",
|
|
114
|
+
"items": {
|
|
115
|
+
"type": "string",
|
|
116
|
+
"pattern": "^[a-z][a-z0-9-]*[a-z0-9]$"
|
|
117
|
+
},
|
|
118
|
+
"uniqueItems": true,
|
|
119
|
+
"description": "OPTIONAL — collection names allowed as containment parents. The host enforces this at item-write time."
|
|
120
|
+
},
|
|
121
|
+
"maxDepth": {
|
|
122
|
+
"type": "integer",
|
|
123
|
+
"minimum": 1,
|
|
124
|
+
"maximum": 32,
|
|
125
|
+
"description": "OPTIONAL — maximum containment depth. The host counts ancestors and refuses items past the cap."
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"description": "OPTIONAL containment constraints."
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
"description": "Containment axis (parent/child). Per-collection schemas may declare their own field name; this declaration is the workspace-level default."
|
|
132
|
+
},
|
|
133
|
+
"applicability": {
|
|
134
|
+
"type": "object",
|
|
135
|
+
"additionalProperties": false,
|
|
136
|
+
"properties": {
|
|
137
|
+
"enabled": {
|
|
138
|
+
"type": "boolean",
|
|
139
|
+
"default": false,
|
|
140
|
+
"description": "Whether the applicability axis is active."
|
|
141
|
+
},
|
|
142
|
+
"field": {
|
|
143
|
+
"type": "string",
|
|
144
|
+
"pattern": "^[a-z][a-zA-Z0-9_]*$",
|
|
145
|
+
"default": "appliesTo",
|
|
146
|
+
"description": "Item field name carrying the applicability ref list."
|
|
147
|
+
},
|
|
148
|
+
"valueClass": {
|
|
149
|
+
"type": "string",
|
|
150
|
+
"pattern": "^[a-z][a-z0-9-]*$",
|
|
151
|
+
"description": "Class of refs the field accepts. Recognised classes: company, role, role-and-company, operator. ONE-WAY SWITCH: once set at any ancestor, descendants MUST NOT change (would invalidate existing items). Refusal: work_scope_value_class_drift (HARD)."
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"description": "Applicability axis (who the item is about / scoped to)."
|
|
155
|
+
},
|
|
156
|
+
"ownership": {
|
|
157
|
+
"type": "object",
|
|
158
|
+
"additionalProperties": false,
|
|
159
|
+
"properties": {
|
|
160
|
+
"enabled": {
|
|
161
|
+
"type": "boolean",
|
|
162
|
+
"default": true,
|
|
163
|
+
"description": "Whether the ownership axis is active."
|
|
164
|
+
},
|
|
165
|
+
"field": {
|
|
166
|
+
"type": "string",
|
|
167
|
+
"pattern": "^[a-z][a-zA-Z0-9_]*$",
|
|
168
|
+
"default": "owner",
|
|
169
|
+
"description": "Workspace-level default item field name carrying the ownership ref. Per-collection AIP-18 schemas may override this with their own ownership.role."
|
|
170
|
+
},
|
|
171
|
+
"policy": {
|
|
172
|
+
"enum": ["strict", "inherit", "open"],
|
|
173
|
+
"default": "inherit",
|
|
174
|
+
"description": "Workspace-level ownership policy. 'strict' requires every collection's ownership.required to be true; 'inherit' delegates to the collection's own setting; 'open' permits any collection to omit ownership."
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
"description": "Ownership axis (who is doing the item). Composes with AIP-18 per-collection ownership rules."
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
"description": "Workspace-level scope axes — three orthogonal axes (containment / applicability / ownership) declared once per workspace, applied uniformly across enabled collections."
|
|
181
|
+
},
|
|
182
|
+
"statusRollup": {
|
|
183
|
+
"type": "object",
|
|
184
|
+
"additionalProperties": false,
|
|
185
|
+
"properties": {
|
|
186
|
+
"enabled": {
|
|
187
|
+
"type": "boolean",
|
|
188
|
+
"default": false,
|
|
189
|
+
"description": "Whether status rollup is active. When false, parent-item statuses are read directly from the item's stored status."
|
|
190
|
+
},
|
|
191
|
+
"policy": {
|
|
192
|
+
"type": "array",
|
|
193
|
+
"items": {
|
|
194
|
+
"type": "object",
|
|
195
|
+
"required": ["when", "bubbleParentStatus"],
|
|
196
|
+
"additionalProperties": false,
|
|
197
|
+
"properties": {
|
|
198
|
+
"when": {
|
|
199
|
+
"type": "string",
|
|
200
|
+
"pattern": "^(all-children-terminal|any-child-blocked|any-child-overdue|no-children|custom:[a-z][a-z0-9-]*)$",
|
|
201
|
+
"description": "Rollup predicate. Recognised values: all-children-terminal, any-child-blocked, any-child-overdue, no-children, custom:<id>. Merge key when composing."
|
|
202
|
+
},
|
|
203
|
+
"bubbleParentStatus": {
|
|
204
|
+
"type": "string",
|
|
205
|
+
"pattern": "^[a-z][a-z0-9-]*$",
|
|
206
|
+
"description": "Status id to surface on the parent when the predicate holds. MUST exist in every collection eligible to be a parent (per scope.containment.rules.allowedKinds)."
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
"default": [],
|
|
211
|
+
"description": "Rollup rules. Merge-by-`when` against the extends parent."
|
|
212
|
+
},
|
|
213
|
+
"exposeViaField": {
|
|
214
|
+
"type": "string",
|
|
215
|
+
"pattern": "^[a-z][a-zA-Z0-9_]*$",
|
|
216
|
+
"description": "OPTIONAL — item field name on parents to materialize the rolled status into. When unset, rollup is query-time only and never written to disk."
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
"description": "Status-rollup policy. Per-collection statuses live on AIP-18; this declaration is the workspace-level aggregation layer."
|
|
220
|
+
},
|
|
221
|
+
"lints": {
|
|
222
|
+
"type": "array",
|
|
223
|
+
"items": {
|
|
224
|
+
"type": "object",
|
|
225
|
+
"required": ["id", "kind", "severity"],
|
|
226
|
+
"additionalProperties": false,
|
|
227
|
+
"properties": {
|
|
228
|
+
"id": {
|
|
229
|
+
"type": "string",
|
|
230
|
+
"pattern": "^[a-z][a-z0-9-]*$",
|
|
231
|
+
"description": "Stable kebab-case lint id. Merge key when composing with extends parent."
|
|
232
|
+
},
|
|
233
|
+
"kind": {
|
|
234
|
+
"enum": [
|
|
235
|
+
"orphan-across-collections",
|
|
236
|
+
"stale-tree",
|
|
237
|
+
"broken-parent-ref",
|
|
238
|
+
"scope-mismatch",
|
|
239
|
+
"custom"
|
|
240
|
+
],
|
|
241
|
+
"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`."
|
|
242
|
+
},
|
|
243
|
+
"severity": {
|
|
244
|
+
"enum": ["error", "warn", "info"],
|
|
245
|
+
"description": "Lint severity. Children may soften; governance policies MAY forbid softening below `error`."
|
|
246
|
+
},
|
|
247
|
+
"params": {
|
|
248
|
+
"type": "object",
|
|
249
|
+
"additionalProperties": true,
|
|
250
|
+
"default": {},
|
|
251
|
+
"description": "Kind-specific parameters. e.g. { days: 14 } for stale-tree; { axis: applicability } for scope-mismatch."
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
"default": [],
|
|
256
|
+
"description": "Workspace-spanning lints. Merge-by-id vs parent."
|
|
257
|
+
},
|
|
258
|
+
"defaults": {
|
|
259
|
+
"type": "object",
|
|
260
|
+
"additionalProperties": false,
|
|
261
|
+
"properties": {
|
|
262
|
+
"workflow": {
|
|
263
|
+
"type": "string",
|
|
264
|
+
"minLength": 1,
|
|
265
|
+
"maxLength": 512,
|
|
266
|
+
"description": "OPTIONAL — default AIP-15 WORKFLOW.md path or ref. Routine workflow run against work items in this workspace."
|
|
267
|
+
},
|
|
268
|
+
"approvalClass": {
|
|
269
|
+
"type": "string",
|
|
270
|
+
"pattern": "^(auto|always|on-mutate|policy:[A-Za-z0-9_./:-]+)$",
|
|
271
|
+
"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."
|
|
272
|
+
},
|
|
273
|
+
"auditMutations": {
|
|
274
|
+
"type": "boolean",
|
|
275
|
+
"default": false,
|
|
276
|
+
"description": "Whether mutations are audited. ONE-WAY SWITCH: once true at any ancestor, descendants MUST NOT set false. Refusal: work_audit_downgrade (HARD)."
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
"description": "Routine workflow defaults. Composes with AIP-15."
|
|
280
|
+
},
|
|
281
|
+
"display": {
|
|
282
|
+
"type": "object",
|
|
283
|
+
"additionalProperties": false,
|
|
284
|
+
"properties": {
|
|
285
|
+
"homePage": {
|
|
286
|
+
"type": "string",
|
|
287
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9_:-]*$",
|
|
288
|
+
"description": "OPTIONAL — id of the item to use as the workspace landing page."
|
|
289
|
+
},
|
|
290
|
+
"defaultGrouping": {
|
|
291
|
+
"enum": ["kind", "status", "owner", "parent"],
|
|
292
|
+
"description": "Default grouping for list views."
|
|
293
|
+
},
|
|
294
|
+
"defaultView": {
|
|
295
|
+
"enum": ["list", "board", "tree", "timeline"],
|
|
296
|
+
"description": "Default rendering mode."
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
"description": "Display hints for UIs that render the workspace. Runtime-agnostic."
|
|
300
|
+
},
|
|
301
|
+
"metadata": {
|
|
302
|
+
"type": "object",
|
|
303
|
+
"additionalProperties": true,
|
|
304
|
+
"default": {},
|
|
305
|
+
"description": "Vendor-specific extensions, namespaced under <vendor>. Deep-merged across the extends chain. MUST NOT change the meaning of any spec field."
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
"allOf": [
|
|
309
|
+
{
|
|
310
|
+
"description": "A view (any manifest with appliesTo set) MUST extend a parent. A workspace-root manifest has neither field.",
|
|
311
|
+
"if": {
|
|
312
|
+
"required": ["appliesTo"],
|
|
313
|
+
"properties": {
|
|
314
|
+
"appliesTo": { "type": "array", "minItems": 1 }
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
"then": {
|
|
318
|
+
"required": ["extends"]
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
],
|
|
322
|
+
"$defs": {
|
|
323
|
+
"collectionEntry": {
|
|
324
|
+
"oneOf": [
|
|
325
|
+
{ "$ref": "#/$defs/collectionInline" },
|
|
326
|
+
{ "$ref": "#/$defs/collectionRef" }
|
|
327
|
+
],
|
|
328
|
+
"description": "One collection declaration. Either an inline AIP-18 collection schema, or a ref (path or ws:// URI) optionally aliased and version-pinned."
|
|
329
|
+
},
|
|
330
|
+
"collectionInline": {
|
|
331
|
+
"type": "object",
|
|
332
|
+
"required": ["inline"],
|
|
333
|
+
"additionalProperties": false,
|
|
334
|
+
"properties": {
|
|
335
|
+
"inline": {
|
|
336
|
+
"$ref": "https://agentproto.sh/schemas/aip-18/COLLECTION.schema.json#/$defs/schema",
|
|
337
|
+
"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."
|
|
338
|
+
}
|
|
339
|
+
},
|
|
340
|
+
"description": "Inline collection declaration. Full AIP-18 schema embedded; hosts MUST validate it against the AIP-18 COLLECTION schema before registration."
|
|
341
|
+
},
|
|
342
|
+
"collectionRef": {
|
|
343
|
+
"type": "object",
|
|
344
|
+
"required": ["ref"],
|
|
345
|
+
"additionalProperties": false,
|
|
346
|
+
"properties": {
|
|
347
|
+
"ref": {
|
|
348
|
+
"type": "string",
|
|
349
|
+
"minLength": 1,
|
|
350
|
+
"maxLength": 512,
|
|
351
|
+
"pattern": "^((\\.\\./|\\./)[^\\s]+/COLLECTION\\.md|ws://collections/[a-z][a-z0-9-]*)$",
|
|
352
|
+
"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)."
|
|
353
|
+
},
|
|
354
|
+
"alias": {
|
|
355
|
+
"type": "string",
|
|
356
|
+
"pattern": "^[a-z][a-z0-9-]*[a-z0-9]$",
|
|
357
|
+
"minLength": 2,
|
|
358
|
+
"maxLength": 96,
|
|
359
|
+
"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 (alias or upstream) is a HARD failure: work_collection_alias_conflict."
|
|
360
|
+
},
|
|
361
|
+
"version": {
|
|
362
|
+
"type": "string",
|
|
363
|
+
"minLength": 1,
|
|
364
|
+
"maxLength": 64,
|
|
365
|
+
"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."
|
|
366
|
+
}
|
|
367
|
+
},
|
|
368
|
+
"description": "Collection ref declaration. Either a file path (./.. /COLLECTION.md) or a registry URI (ws://collections/<slug>)."
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
}
|