@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,518 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://agentproto.sh/schemas/aip-8/AGENCY.schema.json",
|
|
4
|
+
"title": "agentagencies/v1 doctype frontmatter (AIP-8)",
|
|
5
|
+
"description": "Validates the YAML frontmatter portion of every AIP-8 doctype: AGENCY.md, SERVICE.md, PROCEDURE.md, PRICING-MODEL.md, COUNTERPARTY.md, ENGAGEMENT.md, AGREEMENT.md, DELIVERABLE.md, INVOICE.md, ROUTINE.md, CAPACITY.md.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["schema", "kind", "id", "version"],
|
|
8
|
+
"oneOf": [
|
|
9
|
+
{ "$ref": "#/$defs/agency" },
|
|
10
|
+
{ "$ref": "#/$defs/service" },
|
|
11
|
+
{ "$ref": "#/$defs/procedure" },
|
|
12
|
+
{ "$ref": "#/$defs/pricingModel" },
|
|
13
|
+
{ "$ref": "#/$defs/counterparty" },
|
|
14
|
+
{ "$ref": "#/$defs/engagement" },
|
|
15
|
+
{ "$ref": "#/$defs/agreement" },
|
|
16
|
+
{ "$ref": "#/$defs/deliverable" },
|
|
17
|
+
{ "$ref": "#/$defs/invoice" },
|
|
18
|
+
{ "$ref": "#/$defs/routine" },
|
|
19
|
+
{ "$ref": "#/$defs/capacity" }
|
|
20
|
+
],
|
|
21
|
+
"$defs": {
|
|
22
|
+
"schemaTag": {
|
|
23
|
+
"const": "agentagencies/v1",
|
|
24
|
+
"description": "MUST be the literal string agentagencies/v1."
|
|
25
|
+
},
|
|
26
|
+
"slug": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"minLength": 2,
|
|
29
|
+
"maxLength": 64,
|
|
30
|
+
"pattern": "^[a-z][a-z0-9-]*[a-z0-9]$",
|
|
31
|
+
"description": "Kebab-case slug. Lowercase, digits, dashes. Starts with a letter, ends with a letter or digit."
|
|
32
|
+
},
|
|
33
|
+
"version": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+(?:[-+][a-zA-Z0-9.-]+)?$",
|
|
36
|
+
"description": "Spec version of THIS file. Bump on breaking change."
|
|
37
|
+
},
|
|
38
|
+
"currency": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"pattern": "^[A-Z]{3}$",
|
|
41
|
+
"description": "ISO-4217 currency code, e.g. USD, EUR."
|
|
42
|
+
},
|
|
43
|
+
"money": {
|
|
44
|
+
"type": "object",
|
|
45
|
+
"required": ["amount", "currency"],
|
|
46
|
+
"additionalProperties": false,
|
|
47
|
+
"properties": {
|
|
48
|
+
"amount": { "type": "number", "minimum": 0 },
|
|
49
|
+
"currency": { "$ref": "#/$defs/currency" }
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"lifecycleState": {
|
|
53
|
+
"enum": [
|
|
54
|
+
"draft",
|
|
55
|
+
"proposed",
|
|
56
|
+
"agreed",
|
|
57
|
+
"in-progress",
|
|
58
|
+
"delivered",
|
|
59
|
+
"invoiced",
|
|
60
|
+
"closed",
|
|
61
|
+
"cancelled"
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
"tags": {
|
|
65
|
+
"type": "array",
|
|
66
|
+
"items": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$" },
|
|
67
|
+
"default": []
|
|
68
|
+
},
|
|
69
|
+
"metadata": {
|
|
70
|
+
"type": "object",
|
|
71
|
+
"additionalProperties": true,
|
|
72
|
+
"default": {},
|
|
73
|
+
"description": "Vendor extensions live under namespaced keys (metadata.<vendor>.*)."
|
|
74
|
+
},
|
|
75
|
+
"signatureRef": {
|
|
76
|
+
"type": "string",
|
|
77
|
+
"description": "Path or slug pointing to an AIP-7 signature event."
|
|
78
|
+
},
|
|
79
|
+
|
|
80
|
+
"agency": {
|
|
81
|
+
"type": "object",
|
|
82
|
+
"required": ["schema", "kind", "id", "version", "name"],
|
|
83
|
+
"additionalProperties": false,
|
|
84
|
+
"properties": {
|
|
85
|
+
"schema": { "$ref": "#/$defs/schemaTag" },
|
|
86
|
+
"kind": { "const": "agency" },
|
|
87
|
+
"id": { "$ref": "#/$defs/slug" },
|
|
88
|
+
"version": { "$ref": "#/$defs/version" },
|
|
89
|
+
"name": { "type": "string", "minLength": 1, "maxLength": 80 },
|
|
90
|
+
"description": { "type": "string", "maxLength": 2000 },
|
|
91
|
+
"company": {
|
|
92
|
+
"$ref": "#/$defs/slug",
|
|
93
|
+
"description": "Slug of the parent COMPANY.md (AIP-6)."
|
|
94
|
+
},
|
|
95
|
+
"billing_currency": { "$ref": "#/$defs/currency" },
|
|
96
|
+
"working_hours": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"description": "Free-form description of working hours (e.g. 'Mon-Fri 09:00-18:00 Europe/Paris')."
|
|
99
|
+
},
|
|
100
|
+
"default_policy": {
|
|
101
|
+
"$ref": "#/$defs/slug",
|
|
102
|
+
"description": "Slug of an AIP-7 POLICY.md."
|
|
103
|
+
},
|
|
104
|
+
"tags": { "$ref": "#/$defs/tags" },
|
|
105
|
+
"metadata": { "$ref": "#/$defs/metadata" }
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
|
|
109
|
+
"service": {
|
|
110
|
+
"type": "object",
|
|
111
|
+
"required": [
|
|
112
|
+
"schema",
|
|
113
|
+
"kind",
|
|
114
|
+
"id",
|
|
115
|
+
"version",
|
|
116
|
+
"name",
|
|
117
|
+
"pricing_model",
|
|
118
|
+
"procedures"
|
|
119
|
+
],
|
|
120
|
+
"additionalProperties": false,
|
|
121
|
+
"properties": {
|
|
122
|
+
"schema": { "$ref": "#/$defs/schemaTag" },
|
|
123
|
+
"kind": { "const": "service" },
|
|
124
|
+
"id": { "$ref": "#/$defs/slug" },
|
|
125
|
+
"version": { "$ref": "#/$defs/version" },
|
|
126
|
+
"name": { "type": "string", "minLength": 1, "maxLength": 80 },
|
|
127
|
+
"description": { "type": "string", "maxLength": 2000 },
|
|
128
|
+
"pricing_model": { "$ref": "#/$defs/slug" },
|
|
129
|
+
"procedures": {
|
|
130
|
+
"type": "array",
|
|
131
|
+
"items": { "$ref": "#/$defs/slug" },
|
|
132
|
+
"minItems": 1
|
|
133
|
+
},
|
|
134
|
+
"default_role": {
|
|
135
|
+
"$ref": "#/$defs/slug",
|
|
136
|
+
"description": "AIP-6 role slug."
|
|
137
|
+
},
|
|
138
|
+
"inclusions": { "type": "array", "items": { "type": "string" } },
|
|
139
|
+
"exclusions": { "type": "array", "items": { "type": "string" } },
|
|
140
|
+
"tags": { "$ref": "#/$defs/tags" },
|
|
141
|
+
"metadata": { "$ref": "#/$defs/metadata" }
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
|
|
145
|
+
"procedure": {
|
|
146
|
+
"type": "object",
|
|
147
|
+
"required": ["schema", "kind", "id", "version", "name", "service"],
|
|
148
|
+
"additionalProperties": false,
|
|
149
|
+
"properties": {
|
|
150
|
+
"schema": { "$ref": "#/$defs/schemaTag" },
|
|
151
|
+
"kind": { "const": "procedure" },
|
|
152
|
+
"id": { "$ref": "#/$defs/slug" },
|
|
153
|
+
"version": { "$ref": "#/$defs/version" },
|
|
154
|
+
"name": { "type": "string", "minLength": 1, "maxLength": 80 },
|
|
155
|
+
"description": { "type": "string", "maxLength": 2000 },
|
|
156
|
+
"service": { "$ref": "#/$defs/slug" },
|
|
157
|
+
"entry": {
|
|
158
|
+
"type": "string",
|
|
159
|
+
"description": "Relative path to procedure.ts / .py / etc."
|
|
160
|
+
},
|
|
161
|
+
"workflow": {
|
|
162
|
+
"$ref": "#/$defs/slug",
|
|
163
|
+
"description": "Slug of an AIP-15 WORKFLOW.md if delegating."
|
|
164
|
+
},
|
|
165
|
+
"assigned_to": {
|
|
166
|
+
"type": "array",
|
|
167
|
+
"items": { "$ref": "#/$defs/slug" },
|
|
168
|
+
"description": "AIP-6 operator slugs."
|
|
169
|
+
},
|
|
170
|
+
"checkpoints": {
|
|
171
|
+
"type": "array",
|
|
172
|
+
"items": {
|
|
173
|
+
"type": "object",
|
|
174
|
+
"required": ["id", "after_step"],
|
|
175
|
+
"additionalProperties": false,
|
|
176
|
+
"properties": {
|
|
177
|
+
"id": { "$ref": "#/$defs/slug" },
|
|
178
|
+
"after_step": { "type": "string" },
|
|
179
|
+
"description": { "type": "string" }
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
"default": []
|
|
183
|
+
},
|
|
184
|
+
"deliverables": {
|
|
185
|
+
"type": "array",
|
|
186
|
+
"items": {
|
|
187
|
+
"type": "object",
|
|
188
|
+
"required": ["slug", "produced_by"],
|
|
189
|
+
"additionalProperties": false,
|
|
190
|
+
"properties": {
|
|
191
|
+
"slug": { "$ref": "#/$defs/slug" },
|
|
192
|
+
"produced_by": {
|
|
193
|
+
"type": "string",
|
|
194
|
+
"description": "Step id whose completion produces this deliverable."
|
|
195
|
+
},
|
|
196
|
+
"schema": {
|
|
197
|
+
"type": "object",
|
|
198
|
+
"description": "JSON Schema for the deliverable artifact."
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
"default": []
|
|
203
|
+
},
|
|
204
|
+
"tags": { "$ref": "#/$defs/tags" },
|
|
205
|
+
"metadata": { "$ref": "#/$defs/metadata" }
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
|
|
209
|
+
"pricingModel": {
|
|
210
|
+
"type": "object",
|
|
211
|
+
"required": ["schema", "kind", "id", "version", "name", "model"],
|
|
212
|
+
"additionalProperties": false,
|
|
213
|
+
"properties": {
|
|
214
|
+
"schema": { "$ref": "#/$defs/schemaTag" },
|
|
215
|
+
"kind": { "const": "pricing-model" },
|
|
216
|
+
"id": { "$ref": "#/$defs/slug" },
|
|
217
|
+
"version": { "$ref": "#/$defs/version" },
|
|
218
|
+
"name": { "type": "string", "minLength": 1, "maxLength": 80 },
|
|
219
|
+
"description": { "type": "string", "maxLength": 2000 },
|
|
220
|
+
"model": {
|
|
221
|
+
"enum": ["fixed", "hourly", "retainer", "milestone", "usage"]
|
|
222
|
+
},
|
|
223
|
+
"fixed_price": { "$ref": "#/$defs/money" },
|
|
224
|
+
"hourly_rate": { "$ref": "#/$defs/money" },
|
|
225
|
+
"retainer": {
|
|
226
|
+
"type": "object",
|
|
227
|
+
"required": ["amount", "period"],
|
|
228
|
+
"additionalProperties": false,
|
|
229
|
+
"properties": {
|
|
230
|
+
"amount": { "$ref": "#/$defs/money" },
|
|
231
|
+
"period": { "enum": ["weekly", "monthly", "quarterly"] }
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
"milestones": {
|
|
235
|
+
"type": "array",
|
|
236
|
+
"items": {
|
|
237
|
+
"type": "object",
|
|
238
|
+
"required": ["slug", "amount"],
|
|
239
|
+
"additionalProperties": false,
|
|
240
|
+
"properties": {
|
|
241
|
+
"slug": { "$ref": "#/$defs/slug" },
|
|
242
|
+
"amount": { "$ref": "#/$defs/money" },
|
|
243
|
+
"trigger": {
|
|
244
|
+
"type": "string",
|
|
245
|
+
"description": "Checkpoint or deliverable slug that releases this milestone."
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
"tags": { "$ref": "#/$defs/tags" },
|
|
251
|
+
"metadata": { "$ref": "#/$defs/metadata" }
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
|
|
255
|
+
"counterparty": {
|
|
256
|
+
"type": "object",
|
|
257
|
+
"required": ["schema", "kind", "id", "version", "name"],
|
|
258
|
+
"additionalProperties": false,
|
|
259
|
+
"properties": {
|
|
260
|
+
"schema": { "$ref": "#/$defs/schemaTag" },
|
|
261
|
+
"kind": { "const": "counterparty" },
|
|
262
|
+
"id": { "$ref": "#/$defs/slug" },
|
|
263
|
+
"version": { "$ref": "#/$defs/version" },
|
|
264
|
+
"name": { "type": "string", "minLength": 1, "maxLength": 200 },
|
|
265
|
+
"legal_name": { "type": "string" },
|
|
266
|
+
"contact_email": { "type": "string", "format": "email" },
|
|
267
|
+
"address": { "type": "string" },
|
|
268
|
+
"tax_id": { "type": "string" },
|
|
269
|
+
"tags": { "$ref": "#/$defs/tags" },
|
|
270
|
+
"metadata": { "$ref": "#/$defs/metadata" }
|
|
271
|
+
}
|
|
272
|
+
},
|
|
273
|
+
|
|
274
|
+
"engagement": {
|
|
275
|
+
"type": "object",
|
|
276
|
+
"required": [
|
|
277
|
+
"schema",
|
|
278
|
+
"kind",
|
|
279
|
+
"id",
|
|
280
|
+
"version",
|
|
281
|
+
"service",
|
|
282
|
+
"counterparty",
|
|
283
|
+
"state"
|
|
284
|
+
],
|
|
285
|
+
"additionalProperties": false,
|
|
286
|
+
"properties": {
|
|
287
|
+
"schema": { "$ref": "#/$defs/schemaTag" },
|
|
288
|
+
"kind": { "const": "engagement" },
|
|
289
|
+
"id": { "$ref": "#/$defs/slug" },
|
|
290
|
+
"version": { "$ref": "#/$defs/version" },
|
|
291
|
+
"service": { "$ref": "#/$defs/slug" },
|
|
292
|
+
"counterparty": { "$ref": "#/$defs/slug" },
|
|
293
|
+
"state": { "$ref": "#/$defs/lifecycleState" },
|
|
294
|
+
"agreement": { "$ref": "#/$defs/slug" },
|
|
295
|
+
"objectives": {
|
|
296
|
+
"type": "array",
|
|
297
|
+
"items": { "$ref": "#/$defs/slug" },
|
|
298
|
+
"description": "AIP-6 objective slugs."
|
|
299
|
+
},
|
|
300
|
+
"deliverables": {
|
|
301
|
+
"type": "array",
|
|
302
|
+
"items": { "$ref": "#/$defs/slug" }
|
|
303
|
+
},
|
|
304
|
+
"invoices": { "type": "array", "items": { "$ref": "#/$defs/slug" } },
|
|
305
|
+
"started_at": { "type": "string", "format": "date-time" },
|
|
306
|
+
"delivered_at": { "type": "string", "format": "date-time" },
|
|
307
|
+
"closed_at": { "type": "string", "format": "date-time" },
|
|
308
|
+
"tags": { "$ref": "#/$defs/tags" },
|
|
309
|
+
"metadata": { "$ref": "#/$defs/metadata" }
|
|
310
|
+
}
|
|
311
|
+
},
|
|
312
|
+
|
|
313
|
+
"agreement": {
|
|
314
|
+
"type": "object",
|
|
315
|
+
"required": ["schema", "kind", "id", "version", "engagement", "signers"],
|
|
316
|
+
"additionalProperties": false,
|
|
317
|
+
"properties": {
|
|
318
|
+
"schema": { "$ref": "#/$defs/schemaTag" },
|
|
319
|
+
"kind": { "const": "agreement" },
|
|
320
|
+
"id": { "$ref": "#/$defs/slug" },
|
|
321
|
+
"version": { "$ref": "#/$defs/version" },
|
|
322
|
+
"engagement": { "$ref": "#/$defs/slug" },
|
|
323
|
+
"signers": {
|
|
324
|
+
"type": "array",
|
|
325
|
+
"minItems": 1,
|
|
326
|
+
"items": {
|
|
327
|
+
"type": "object",
|
|
328
|
+
"anyOf": [
|
|
329
|
+
{
|
|
330
|
+
"required": ["role"],
|
|
331
|
+
"properties": { "role": { "$ref": "#/$defs/slug" } }
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
"required": ["counterparty"],
|
|
335
|
+
"properties": { "counterparty": { "$ref": "#/$defs/slug" } }
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
"required": ["operator"],
|
|
339
|
+
"properties": { "operator": { "$ref": "#/$defs/slug" } }
|
|
340
|
+
}
|
|
341
|
+
]
|
|
342
|
+
}
|
|
343
|
+
},
|
|
344
|
+
"signatures": {
|
|
345
|
+
"type": "array",
|
|
346
|
+
"items": { "$ref": "#/$defs/signatureRef" }
|
|
347
|
+
},
|
|
348
|
+
"policy": { "$ref": "#/$defs/slug" },
|
|
349
|
+
"acceptance_policy": {
|
|
350
|
+
"enum": ["auto", "signed"],
|
|
351
|
+
"default": "signed"
|
|
352
|
+
},
|
|
353
|
+
"acceptance_signers": {
|
|
354
|
+
"type": "array",
|
|
355
|
+
"items": { "$ref": "#/$defs/slug" }
|
|
356
|
+
},
|
|
357
|
+
"effective_date": { "type": "string", "format": "date" },
|
|
358
|
+
"termination_date": { "type": "string", "format": "date" },
|
|
359
|
+
"tags": { "$ref": "#/$defs/tags" },
|
|
360
|
+
"metadata": { "$ref": "#/$defs/metadata" }
|
|
361
|
+
}
|
|
362
|
+
},
|
|
363
|
+
|
|
364
|
+
"deliverable": {
|
|
365
|
+
"type": "object",
|
|
366
|
+
"required": [
|
|
367
|
+
"schema",
|
|
368
|
+
"kind",
|
|
369
|
+
"id",
|
|
370
|
+
"version",
|
|
371
|
+
"engagement",
|
|
372
|
+
"produced_by"
|
|
373
|
+
],
|
|
374
|
+
"additionalProperties": false,
|
|
375
|
+
"properties": {
|
|
376
|
+
"schema": { "$ref": "#/$defs/schemaTag" },
|
|
377
|
+
"kind": { "const": "deliverable" },
|
|
378
|
+
"id": { "$ref": "#/$defs/slug" },
|
|
379
|
+
"version": { "$ref": "#/$defs/version" },
|
|
380
|
+
"engagement": { "$ref": "#/$defs/slug" },
|
|
381
|
+
"produced_by": {
|
|
382
|
+
"type": "string",
|
|
383
|
+
"description": "<procedure-slug>:<step-id>"
|
|
384
|
+
},
|
|
385
|
+
"produced_at": { "type": "string", "format": "date-time" },
|
|
386
|
+
"accepted_at": { "type": "string", "format": "date-time" },
|
|
387
|
+
"signatures": {
|
|
388
|
+
"type": "array",
|
|
389
|
+
"items": { "$ref": "#/$defs/signatureRef" }
|
|
390
|
+
},
|
|
391
|
+
"artifacts": {
|
|
392
|
+
"type": "array",
|
|
393
|
+
"items": {
|
|
394
|
+
"type": "object",
|
|
395
|
+
"required": ["path"],
|
|
396
|
+
"additionalProperties": false,
|
|
397
|
+
"properties": {
|
|
398
|
+
"path": { "type": "string" },
|
|
399
|
+
"content_type": { "type": "string" },
|
|
400
|
+
"checksum": { "type": "string" }
|
|
401
|
+
}
|
|
402
|
+
},
|
|
403
|
+
"default": []
|
|
404
|
+
},
|
|
405
|
+
"tags": { "$ref": "#/$defs/tags" },
|
|
406
|
+
"metadata": { "$ref": "#/$defs/metadata" }
|
|
407
|
+
}
|
|
408
|
+
},
|
|
409
|
+
|
|
410
|
+
"invoice": {
|
|
411
|
+
"type": "object",
|
|
412
|
+
"required": [
|
|
413
|
+
"schema",
|
|
414
|
+
"kind",
|
|
415
|
+
"id",
|
|
416
|
+
"version",
|
|
417
|
+
"engagement",
|
|
418
|
+
"issuer",
|
|
419
|
+
"total",
|
|
420
|
+
"line_items"
|
|
421
|
+
],
|
|
422
|
+
"additionalProperties": false,
|
|
423
|
+
"properties": {
|
|
424
|
+
"schema": { "$ref": "#/$defs/schemaTag" },
|
|
425
|
+
"kind": { "const": "invoice" },
|
|
426
|
+
"id": { "$ref": "#/$defs/slug" },
|
|
427
|
+
"version": { "$ref": "#/$defs/version" },
|
|
428
|
+
"engagement": { "$ref": "#/$defs/slug" },
|
|
429
|
+
"issuer": {
|
|
430
|
+
"$ref": "#/$defs/slug",
|
|
431
|
+
"description": "Role slug from AIP-6."
|
|
432
|
+
},
|
|
433
|
+
"issued_at": { "type": "string", "format": "date-time" },
|
|
434
|
+
"due_at": { "type": "string", "format": "date" },
|
|
435
|
+
"paid_at": { "type": "string", "format": "date-time" },
|
|
436
|
+
"currency": { "$ref": "#/$defs/currency" },
|
|
437
|
+
"total": { "$ref": "#/$defs/money" },
|
|
438
|
+
"line_items": {
|
|
439
|
+
"type": "array",
|
|
440
|
+
"minItems": 1,
|
|
441
|
+
"items": {
|
|
442
|
+
"type": "object",
|
|
443
|
+
"required": ["description", "amount"],
|
|
444
|
+
"additionalProperties": false,
|
|
445
|
+
"properties": {
|
|
446
|
+
"description": { "type": "string", "minLength": 1 },
|
|
447
|
+
"quantity": { "type": "number", "minimum": 0 },
|
|
448
|
+
"unit": { "type": "string" },
|
|
449
|
+
"amount": { "$ref": "#/$defs/money" },
|
|
450
|
+
"deliverable": { "$ref": "#/$defs/slug" }
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
},
|
|
454
|
+
"signatures": {
|
|
455
|
+
"type": "array",
|
|
456
|
+
"items": { "$ref": "#/$defs/signatureRef" }
|
|
457
|
+
},
|
|
458
|
+
"state": {
|
|
459
|
+
"enum": ["draft", "issued", "paid", "void"],
|
|
460
|
+
"default": "draft"
|
|
461
|
+
},
|
|
462
|
+
"tags": { "$ref": "#/$defs/tags" },
|
|
463
|
+
"metadata": { "$ref": "#/$defs/metadata" }
|
|
464
|
+
}
|
|
465
|
+
},
|
|
466
|
+
|
|
467
|
+
"routine": {
|
|
468
|
+
"type": "object",
|
|
469
|
+
"required": ["schema", "kind", "id", "version", "name", "schedule"],
|
|
470
|
+
"additionalProperties": false,
|
|
471
|
+
"properties": {
|
|
472
|
+
"schema": { "$ref": "#/$defs/schemaTag" },
|
|
473
|
+
"kind": { "const": "routine" },
|
|
474
|
+
"id": { "$ref": "#/$defs/slug" },
|
|
475
|
+
"version": { "$ref": "#/$defs/version" },
|
|
476
|
+
"name": { "type": "string", "minLength": 1, "maxLength": 80 },
|
|
477
|
+
"description": { "type": "string", "maxLength": 2000 },
|
|
478
|
+
"schedule": {
|
|
479
|
+
"type": "object",
|
|
480
|
+
"required": ["cron"],
|
|
481
|
+
"additionalProperties": false,
|
|
482
|
+
"properties": {
|
|
483
|
+
"cron": { "type": "string" },
|
|
484
|
+
"timezone": { "type": "string" }
|
|
485
|
+
}
|
|
486
|
+
},
|
|
487
|
+
"engagement": { "$ref": "#/$defs/slug" },
|
|
488
|
+
"procedure": { "$ref": "#/$defs/slug" },
|
|
489
|
+
"tags": { "$ref": "#/$defs/tags" },
|
|
490
|
+
"metadata": { "$ref": "#/$defs/metadata" }
|
|
491
|
+
}
|
|
492
|
+
},
|
|
493
|
+
|
|
494
|
+
"capacity": {
|
|
495
|
+
"type": "object",
|
|
496
|
+
"required": ["schema", "kind", "id", "version", "operator"],
|
|
497
|
+
"additionalProperties": false,
|
|
498
|
+
"properties": {
|
|
499
|
+
"schema": { "$ref": "#/$defs/schemaTag" },
|
|
500
|
+
"kind": { "const": "capacity" },
|
|
501
|
+
"id": { "$ref": "#/$defs/slug" },
|
|
502
|
+
"version": { "$ref": "#/$defs/version" },
|
|
503
|
+
"operator": {
|
|
504
|
+
"$ref": "#/$defs/slug",
|
|
505
|
+
"description": "AIP-6 operator slug."
|
|
506
|
+
},
|
|
507
|
+
"hours_per_week": { "type": "number", "minimum": 0, "maximum": 168 },
|
|
508
|
+
"concurrent_engagements": { "type": "integer", "minimum": 0 },
|
|
509
|
+
"blackout_dates": {
|
|
510
|
+
"type": "array",
|
|
511
|
+
"items": { "type": "string", "format": "date" }
|
|
512
|
+
},
|
|
513
|
+
"tags": { "$ref": "#/$defs/tags" },
|
|
514
|
+
"metadata": { "$ref": "#/$defs/metadata" }
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
}
|