@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,189 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://agentproto.sh/schemas/aip-4/DESIGN.schema.json",
|
|
4
|
+
"title": "DESIGN.md frontmatter (AIP-4)",
|
|
5
|
+
"description": "Validates the YAML frontmatter portion of an AIP-4 DESIGN.md design-token kit.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["kit", "title", "colors", "typography"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"schema": {
|
|
11
|
+
"const": "designkit/v1",
|
|
12
|
+
"description": "Pins the registry schema this kit conforms to. Required for registry submission."
|
|
13
|
+
},
|
|
14
|
+
"kit": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"minLength": 2,
|
|
17
|
+
"maxLength": 48,
|
|
18
|
+
"pattern": "^[a-z][a-z0-9-]*[a-z0-9]$",
|
|
19
|
+
"description": "Kebab-case kit identifier. Namespaced by the registry on publish."
|
|
20
|
+
},
|
|
21
|
+
"title": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"minLength": 1,
|
|
24
|
+
"maxLength": 80,
|
|
25
|
+
"description": "Human-readable display name."
|
|
26
|
+
},
|
|
27
|
+
"description": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"maxLength": 500,
|
|
30
|
+
"description": "One-paragraph summary surfaced in registry search results."
|
|
31
|
+
},
|
|
32
|
+
"version": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+(?:[-+][a-zA-Z0-9.-]+)?$",
|
|
35
|
+
"description": "Semver of THIS kit. Bump on token change."
|
|
36
|
+
},
|
|
37
|
+
"author": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"description": "Display name of the author / maintainer."
|
|
40
|
+
},
|
|
41
|
+
"license": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"description": "SPDX identifier or 'proprietary' for private brand kits."
|
|
44
|
+
},
|
|
45
|
+
"homepage": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"format": "uri"
|
|
48
|
+
},
|
|
49
|
+
"preview": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"format": "uri",
|
|
52
|
+
"description": "URL to a screenshot of the kit applied to a reference surface."
|
|
53
|
+
},
|
|
54
|
+
"tags": {
|
|
55
|
+
"type": "array",
|
|
56
|
+
"items": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$" },
|
|
57
|
+
"minItems": 0,
|
|
58
|
+
"maxItems": 12,
|
|
59
|
+
"default": []
|
|
60
|
+
},
|
|
61
|
+
"based-on": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"description": "URI of a parent DESIGN.md to compose on top of. Depth-limited to 3."
|
|
64
|
+
},
|
|
65
|
+
"mode": {
|
|
66
|
+
"enum": ["light", "dark", "both"],
|
|
67
|
+
"default": "light",
|
|
68
|
+
"description": "Default surface mode. 'both' requires a sibling 'variants' block."
|
|
69
|
+
},
|
|
70
|
+
"colors": { "$ref": "#/$defs/colorTokens" },
|
|
71
|
+
"typography": { "$ref": "#/$defs/typographyTokens" },
|
|
72
|
+
"spacing": { "$ref": "#/$defs/scaleTokens" },
|
|
73
|
+
"rounded": { "$ref": "#/$defs/scaleTokens" },
|
|
74
|
+
"shadows": { "$ref": "#/$defs/scaleTokens" },
|
|
75
|
+
"motion": {
|
|
76
|
+
"type": "object",
|
|
77
|
+
"additionalProperties": false,
|
|
78
|
+
"properties": {
|
|
79
|
+
"duration": { "$ref": "#/$defs/scaleTokens" },
|
|
80
|
+
"easing": { "$ref": "#/$defs/scaleTokens" }
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"variants": {
|
|
84
|
+
"type": "object",
|
|
85
|
+
"additionalProperties": false,
|
|
86
|
+
"properties": {
|
|
87
|
+
"dark": { "$ref": "#/$defs/variantDelta" },
|
|
88
|
+
"light": { "$ref": "#/$defs/variantDelta" }
|
|
89
|
+
},
|
|
90
|
+
"description": "Delta blocks per mode. Only tokens that differ from the base are listed."
|
|
91
|
+
},
|
|
92
|
+
"metadata": {
|
|
93
|
+
"type": "object",
|
|
94
|
+
"additionalProperties": true,
|
|
95
|
+
"description": "Host-namespaced extension fields. Other hosts MUST tolerate unknown keys here.",
|
|
96
|
+
"default": {}
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"allOf": [
|
|
100
|
+
{
|
|
101
|
+
"if": {
|
|
102
|
+
"properties": { "mode": { "const": "both" } },
|
|
103
|
+
"required": ["mode"]
|
|
104
|
+
},
|
|
105
|
+
"then": { "required": ["variants"] }
|
|
106
|
+
}
|
|
107
|
+
],
|
|
108
|
+
"$defs": {
|
|
109
|
+
"colorTokens": {
|
|
110
|
+
"type": "object",
|
|
111
|
+
"required": ["background", "ink", "primary"],
|
|
112
|
+
"additionalProperties": {
|
|
113
|
+
"type": "string",
|
|
114
|
+
"minLength": 1,
|
|
115
|
+
"description": "Hex (#RGB / #RRGGBB / #RRGGBBAA), rgb(a), hsl(a), or '{colors.<name>}' reference."
|
|
116
|
+
},
|
|
117
|
+
"properties": {
|
|
118
|
+
"background": { "type": "string" },
|
|
119
|
+
"surface": { "type": "string" },
|
|
120
|
+
"ink": { "type": "string" },
|
|
121
|
+
"ink-muted": { "type": "string" },
|
|
122
|
+
"primary": { "type": "string" },
|
|
123
|
+
"on-primary": { "type": "string" },
|
|
124
|
+
"accent": { "type": "string" },
|
|
125
|
+
"on-accent": { "type": "string" },
|
|
126
|
+
"muted": { "type": "string" },
|
|
127
|
+
"muted-foreground": { "type": "string" },
|
|
128
|
+
"border": { "type": "string" },
|
|
129
|
+
"link": { "type": "string" },
|
|
130
|
+
"success": { "type": "string" },
|
|
131
|
+
"warning": { "type": "string" },
|
|
132
|
+
"danger": { "type": "string" }
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"typographyTokens": {
|
|
136
|
+
"type": "object",
|
|
137
|
+
"required": ["body", "h1"],
|
|
138
|
+
"additionalProperties": { "$ref": "#/$defs/typeStyle" },
|
|
139
|
+
"properties": {
|
|
140
|
+
"body": { "$ref": "#/$defs/typeStyle" },
|
|
141
|
+
"h1": { "$ref": "#/$defs/typeStyle" },
|
|
142
|
+
"h2": { "$ref": "#/$defs/typeStyle" },
|
|
143
|
+
"h3": { "$ref": "#/$defs/typeStyle" },
|
|
144
|
+
"h4": { "$ref": "#/$defs/typeStyle" },
|
|
145
|
+
"code": { "$ref": "#/$defs/typeStyle" },
|
|
146
|
+
"small": { "$ref": "#/$defs/typeStyle" }
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
"typeStyle": {
|
|
150
|
+
"type": "object",
|
|
151
|
+
"required": ["family"],
|
|
152
|
+
"additionalProperties": false,
|
|
153
|
+
"properties": {
|
|
154
|
+
"family": { "type": "string", "minLength": 1 },
|
|
155
|
+
"size": { "type": "string" },
|
|
156
|
+
"weight": { "type": ["integer", "string"] },
|
|
157
|
+
"lineHeight": { "type": ["number", "string"] },
|
|
158
|
+
"letterSpacing": { "type": "string" }
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
"scaleTokens": {
|
|
162
|
+
"type": "object",
|
|
163
|
+
"minProperties": 1,
|
|
164
|
+
"additionalProperties": { "type": "string", "minLength": 1 }
|
|
165
|
+
},
|
|
166
|
+
"variantDelta": {
|
|
167
|
+
"type": "object",
|
|
168
|
+
"additionalProperties": false,
|
|
169
|
+
"properties": {
|
|
170
|
+
"colors": { "$ref": "#/$defs/scaleTokens" },
|
|
171
|
+
"typography": {
|
|
172
|
+
"type": "object",
|
|
173
|
+
"additionalProperties": { "$ref": "#/$defs/typeStyle" }
|
|
174
|
+
},
|
|
175
|
+
"spacing": { "$ref": "#/$defs/scaleTokens" },
|
|
176
|
+
"rounded": { "$ref": "#/$defs/scaleTokens" },
|
|
177
|
+
"shadows": { "$ref": "#/$defs/scaleTokens" },
|
|
178
|
+
"motion": {
|
|
179
|
+
"type": "object",
|
|
180
|
+
"additionalProperties": false,
|
|
181
|
+
"properties": {
|
|
182
|
+
"duration": { "$ref": "#/$defs/scaleTokens" },
|
|
183
|
+
"easing": { "$ref": "#/$defs/scaleTokens" }
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://agentproto.sh/schemas/aip-40/EXTENSION.schema.json",
|
|
4
|
+
"title": "ExtensionDefinition",
|
|
5
|
+
"description": "Validates the YAML frontmatter portion of an AIP-40 EXTENSION.md manifest. An extension declares a workspace-local doctype that inherits a public AIP's schema and may add fields, tighten constraints, set defaults, and override the path convention.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["schema", "slug", "title", "description", "version", "status", "extends"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"schema": {
|
|
11
|
+
"const": "agentproto/extension/v1",
|
|
12
|
+
"description": "Pins the spec version this manifest conforms to."
|
|
13
|
+
},
|
|
14
|
+
"slug": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"pattern": "^[a-z][a-z0-9-]*:[a-z][a-z0-9-]*[a-z0-9]$",
|
|
17
|
+
"description": "Namespaced identifier — `<namespace>:<name>`. Lowercase, digits, dashes; single colon separator. Example: `acme:deal`."
|
|
18
|
+
},
|
|
19
|
+
"title": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"minLength": 1,
|
|
22
|
+
"maxLength": 80,
|
|
23
|
+
"description": "Human-readable display name."
|
|
24
|
+
},
|
|
25
|
+
"description": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"minLength": 1,
|
|
28
|
+
"maxLength": 2000,
|
|
29
|
+
"description": "One-paragraph statement of the extension's purpose."
|
|
30
|
+
},
|
|
31
|
+
"version": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+(?:[-+][a-zA-Z0-9.-]+)?$",
|
|
34
|
+
"description": "Extension's own semver. Bump on breaking change."
|
|
35
|
+
},
|
|
36
|
+
"status": {
|
|
37
|
+
"const": "Local",
|
|
38
|
+
"description": "Extensions are perpetually Local — they never enter the public registry's Draft/Review/Final lifecycle."
|
|
39
|
+
},
|
|
40
|
+
"extends": {
|
|
41
|
+
"anyOf": [
|
|
42
|
+
{
|
|
43
|
+
"type": "string",
|
|
44
|
+
"pattern": "^aip-\\d+$",
|
|
45
|
+
"description": "Inherit a public AIP's schema (e.g. `aip-14`)."
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"const": "none",
|
|
49
|
+
"description": "Brand-new doctype, no inheritance."
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
"description": "Parent AIP this extension inherits from, or `none` for a root doctype."
|
|
53
|
+
},
|
|
54
|
+
"add_fields": {
|
|
55
|
+
"type": "object",
|
|
56
|
+
"additionalProperties": false,
|
|
57
|
+
"properties": {
|
|
58
|
+
"properties": {
|
|
59
|
+
"type": "object",
|
|
60
|
+
"additionalProperties": true,
|
|
61
|
+
"description": "JSON Schema property definitions to merge into the parent's properties. Collisions are an error — use `tighten` to narrow an existing field."
|
|
62
|
+
},
|
|
63
|
+
"required": {
|
|
64
|
+
"type": "array",
|
|
65
|
+
"items": { "type": "string" },
|
|
66
|
+
"uniqueItems": true,
|
|
67
|
+
"default": [],
|
|
68
|
+
"description": "Field names that become required in addition to parent's required[]. Unioned with parent's required, never replaces."
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"description": "Schema-level additions: new properties + new required entries."
|
|
72
|
+
},
|
|
73
|
+
"tighten": {
|
|
74
|
+
"type": "object",
|
|
75
|
+
"additionalProperties": {
|
|
76
|
+
"type": "object",
|
|
77
|
+
"additionalProperties": false,
|
|
78
|
+
"properties": {
|
|
79
|
+
"pattern": { "type": "string" },
|
|
80
|
+
"enum": { "type": "array" },
|
|
81
|
+
"minLength": { "type": "integer", "minimum": 0 },
|
|
82
|
+
"maxLength": { "type": "integer", "minimum": 0 },
|
|
83
|
+
"minimum": { "type": "number" },
|
|
84
|
+
"maximum": { "type": "number" }
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"description": "Per-field constraint overrides. Each entry MUST tighten (not loosen) the parent's constraints; runtimes verify monotonicity at registration."
|
|
88
|
+
},
|
|
89
|
+
"defaults": {
|
|
90
|
+
"type": "object",
|
|
91
|
+
"additionalProperties": true,
|
|
92
|
+
"description": "Default values applied when a field is omitted. Layered on top of parent's defaults; extension's value wins on the same key."
|
|
93
|
+
},
|
|
94
|
+
"path_convention": {
|
|
95
|
+
"type": "string",
|
|
96
|
+
"minLength": 1,
|
|
97
|
+
"description": "Filesystem convention template, e.g. `\"deals/<slug>/DEAL.md\"`. Tokens: `<slug>` (doctype identity), `<DOCTYPE>` (extension's slug name part). Falls back to parent's convention when omitted."
|
|
98
|
+
},
|
|
99
|
+
"requires": {
|
|
100
|
+
"type": "array",
|
|
101
|
+
"items": {
|
|
102
|
+
"type": "integer",
|
|
103
|
+
"minimum": 1
|
|
104
|
+
},
|
|
105
|
+
"uniqueItems": true,
|
|
106
|
+
"default": [],
|
|
107
|
+
"description": "Public AIPs the extension depends on, in addition to its parent."
|
|
108
|
+
},
|
|
109
|
+
"metadata": {
|
|
110
|
+
"type": "object",
|
|
111
|
+
"additionalProperties": true,
|
|
112
|
+
"default": {},
|
|
113
|
+
"description": "Free-form vendor extensions under namespaced keys (`metadata.<vendor>.<field>`)."
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://agentproto.sh/schemas/aip-41/ROUTINE.schema.json",
|
|
4
|
+
"title": "ROUTINE.md frontmatter — agentroutine/v1 (recurring schedule + target)",
|
|
5
|
+
"description": "Validates the YAML frontmatter portion of an AIP-41 ROUTINE.md manifest. Decouples 'when' (schedule) from 'what' (target action/workflow/tool).",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["schema", "id", "description", "schedule", "target"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"schema": {
|
|
11
|
+
"const": "routine/v1"
|
|
12
|
+
},
|
|
13
|
+
"id": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"minLength": 2,
|
|
16
|
+
"maxLength": 80,
|
|
17
|
+
"pattern": "^[a-z0-9@][a-z0-9.@/_-]*$",
|
|
18
|
+
"description": "Machine identifier. Lowercase, digits, dashes, dots, optional @owner/ prefix. Unique within the registry that hosts the routine."
|
|
19
|
+
},
|
|
20
|
+
"description": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"minLength": 1,
|
|
23
|
+
"maxLength": 2000,
|
|
24
|
+
"description": "One-paragraph purpose."
|
|
25
|
+
},
|
|
26
|
+
"version": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+(?:[-+][\\w.\\-]+)?$",
|
|
29
|
+
"default": "1.0.0",
|
|
30
|
+
"description": "Spec version of THIS file."
|
|
31
|
+
},
|
|
32
|
+
"schedule": {
|
|
33
|
+
"$ref": "#/$defs/schedule",
|
|
34
|
+
"description": "When the routine fires."
|
|
35
|
+
},
|
|
36
|
+
"target": {
|
|
37
|
+
"$ref": "#/$defs/target",
|
|
38
|
+
"description": "What the routine invokes when it fires."
|
|
39
|
+
},
|
|
40
|
+
"identity": {
|
|
41
|
+
"$ref": "#/$defs/identityRef",
|
|
42
|
+
"description": "Identity that owns the routine fire (AIP-23). Defaults to host policy."
|
|
43
|
+
},
|
|
44
|
+
"retry": {
|
|
45
|
+
"$ref": "#/$defs/retry",
|
|
46
|
+
"description": "Retry behaviour on failure."
|
|
47
|
+
},
|
|
48
|
+
"on_failure": {
|
|
49
|
+
"$ref": "#/$defs/onFailure",
|
|
50
|
+
"description": "Where to route failures after retries exhaust."
|
|
51
|
+
},
|
|
52
|
+
"history": {
|
|
53
|
+
"$ref": "#/$defs/history",
|
|
54
|
+
"description": "Run history retention."
|
|
55
|
+
},
|
|
56
|
+
"fires_events": {
|
|
57
|
+
"type": "array",
|
|
58
|
+
"items": { "type": "string", "minLength": 1 },
|
|
59
|
+
"default": ["routine-triggered", "routine-completed", "routine-failed"],
|
|
60
|
+
"description": "AIP-37 LIFECYCLE event names this routine fires."
|
|
61
|
+
},
|
|
62
|
+
"enabled": {
|
|
63
|
+
"type": "boolean",
|
|
64
|
+
"default": true,
|
|
65
|
+
"description": "If false, routine registers but does not fire. Useful for staging."
|
|
66
|
+
},
|
|
67
|
+
"tags": {
|
|
68
|
+
"type": "array",
|
|
69
|
+
"items": { "type": "string" },
|
|
70
|
+
"default": [],
|
|
71
|
+
"description": "Free-form discovery tags."
|
|
72
|
+
},
|
|
73
|
+
"metadata": {
|
|
74
|
+
"type": "object",
|
|
75
|
+
"additionalProperties": true,
|
|
76
|
+
"description": "Free-form, namespaced."
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"$defs": {
|
|
80
|
+
"schedule": {
|
|
81
|
+
"oneOf": [
|
|
82
|
+
{ "$ref": "#/$defs/scheduleCron" },
|
|
83
|
+
{ "$ref": "#/$defs/scheduleInterval" },
|
|
84
|
+
{ "$ref": "#/$defs/scheduleCalendar" },
|
|
85
|
+
{ "$ref": "#/$defs/scheduleManual" },
|
|
86
|
+
{ "$ref": "#/$defs/scheduleEvent" }
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
"scheduleCron": {
|
|
90
|
+
"type": "object",
|
|
91
|
+
"required": ["kind", "cron"],
|
|
92
|
+
"additionalProperties": false,
|
|
93
|
+
"properties": {
|
|
94
|
+
"kind": { "const": "cron" },
|
|
95
|
+
"cron": {
|
|
96
|
+
"type": "string",
|
|
97
|
+
"minLength": 9,
|
|
98
|
+
"maxLength": 100,
|
|
99
|
+
"description": "Standard 5-field cron expression."
|
|
100
|
+
},
|
|
101
|
+
"timezone": {
|
|
102
|
+
"type": "string",
|
|
103
|
+
"default": "UTC",
|
|
104
|
+
"description": "IANA tz database name. Legacy abbreviations rejected."
|
|
105
|
+
},
|
|
106
|
+
"jitter_seconds": {
|
|
107
|
+
"type": "integer",
|
|
108
|
+
"minimum": 0,
|
|
109
|
+
"maximum": 3600,
|
|
110
|
+
"default": 0
|
|
111
|
+
},
|
|
112
|
+
"catchup": {
|
|
113
|
+
"enum": ["skip", "one", "all"],
|
|
114
|
+
"default": "skip"
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"scheduleInterval": {
|
|
119
|
+
"type": "object",
|
|
120
|
+
"required": ["kind", "every"],
|
|
121
|
+
"additionalProperties": false,
|
|
122
|
+
"properties": {
|
|
123
|
+
"kind": { "const": "interval" },
|
|
124
|
+
"every": {
|
|
125
|
+
"type": "string",
|
|
126
|
+
"pattern": "^\\d+(s|m|h|d)$",
|
|
127
|
+
"description": "Duration: Ns | Nm | Nh | Nd."
|
|
128
|
+
},
|
|
129
|
+
"from": {
|
|
130
|
+
"type": "string",
|
|
131
|
+
"format": "date-time",
|
|
132
|
+
"description": "OPTIONAL anchor; default = registration time."
|
|
133
|
+
},
|
|
134
|
+
"jitter_seconds": {
|
|
135
|
+
"type": "integer",
|
|
136
|
+
"minimum": 0,
|
|
137
|
+
"maximum": 3600,
|
|
138
|
+
"default": 0
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"scheduleCalendar": {
|
|
143
|
+
"type": "object",
|
|
144
|
+
"required": ["kind", "rrule"],
|
|
145
|
+
"additionalProperties": false,
|
|
146
|
+
"properties": {
|
|
147
|
+
"kind": { "const": "calendar" },
|
|
148
|
+
"rrule": {
|
|
149
|
+
"type": "string",
|
|
150
|
+
"minLength": 1,
|
|
151
|
+
"description": "RFC 5545 RRULE."
|
|
152
|
+
},
|
|
153
|
+
"timezone": {
|
|
154
|
+
"type": "string",
|
|
155
|
+
"default": "UTC"
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"scheduleManual": {
|
|
160
|
+
"type": "object",
|
|
161
|
+
"required": ["kind"],
|
|
162
|
+
"additionalProperties": false,
|
|
163
|
+
"properties": {
|
|
164
|
+
"kind": { "const": "manual" }
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"scheduleEvent": {
|
|
168
|
+
"type": "object",
|
|
169
|
+
"required": ["kind", "on"],
|
|
170
|
+
"additionalProperties": false,
|
|
171
|
+
"properties": {
|
|
172
|
+
"kind": { "const": "event" },
|
|
173
|
+
"on": {
|
|
174
|
+
"type": "string",
|
|
175
|
+
"minLength": 1,
|
|
176
|
+
"description": "AIP-37 LIFECYCLE event name."
|
|
177
|
+
},
|
|
178
|
+
"filter": {
|
|
179
|
+
"type": "object",
|
|
180
|
+
"additionalProperties": true,
|
|
181
|
+
"description": "OPTIONAL — only fire if event payload matches filter."
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
"target": {
|
|
186
|
+
"oneOf": [
|
|
187
|
+
{ "$ref": "#/$defs/targetAction" },
|
|
188
|
+
{ "$ref": "#/$defs/targetWorkflow" },
|
|
189
|
+
{ "$ref": "#/$defs/targetTool" }
|
|
190
|
+
]
|
|
191
|
+
},
|
|
192
|
+
"targetAction": {
|
|
193
|
+
"type": "object",
|
|
194
|
+
"required": ["action"],
|
|
195
|
+
"additionalProperties": false,
|
|
196
|
+
"properties": {
|
|
197
|
+
"action": {
|
|
198
|
+
"type": "string",
|
|
199
|
+
"minLength": 1,
|
|
200
|
+
"description": "AIP-39 ACTION ref. Resolver picks tool implementation."
|
|
201
|
+
},
|
|
202
|
+
"inputs": {
|
|
203
|
+
"type": "object",
|
|
204
|
+
"additionalProperties": true,
|
|
205
|
+
"description": "Invocation payload. May reference ${{ vault.* }} and ${{ now }}."
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
"targetWorkflow": {
|
|
210
|
+
"type": "object",
|
|
211
|
+
"required": ["workflow"],
|
|
212
|
+
"additionalProperties": false,
|
|
213
|
+
"properties": {
|
|
214
|
+
"workflow": {
|
|
215
|
+
"oneOf": [
|
|
216
|
+
{ "type": "string", "minLength": 1 },
|
|
217
|
+
{ "$ref": "#/$defs/anyRef" }
|
|
218
|
+
],
|
|
219
|
+
"description": "AIP-15 WORKFLOW ref."
|
|
220
|
+
},
|
|
221
|
+
"inputs": {
|
|
222
|
+
"type": "object",
|
|
223
|
+
"additionalProperties": true
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
"targetTool": {
|
|
228
|
+
"type": "object",
|
|
229
|
+
"required": ["tool"],
|
|
230
|
+
"additionalProperties": false,
|
|
231
|
+
"properties": {
|
|
232
|
+
"tool": {
|
|
233
|
+
"type": "string",
|
|
234
|
+
"minLength": 1,
|
|
235
|
+
"description": "AIP-14 TOOL id (pin specific implementation)."
|
|
236
|
+
},
|
|
237
|
+
"inputs": {
|
|
238
|
+
"type": "object",
|
|
239
|
+
"additionalProperties": true
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
"anyRef": {
|
|
244
|
+
"type": "object",
|
|
245
|
+
"additionalProperties": false,
|
|
246
|
+
"properties": {
|
|
247
|
+
"ref": { "type": "string", "minLength": 1 },
|
|
248
|
+
"file": { "type": "string", "minLength": 1 },
|
|
249
|
+
"inline": { "type": "object", "additionalProperties": true }
|
|
250
|
+
},
|
|
251
|
+
"description": "AIP-27 ref primitive — exactly one of ref|file|inline."
|
|
252
|
+
},
|
|
253
|
+
"identityRef": {
|
|
254
|
+
"oneOf": [
|
|
255
|
+
{
|
|
256
|
+
"type": "string",
|
|
257
|
+
"minLength": 1,
|
|
258
|
+
"description": "Shorthand identity URI: operator://<id> | user://<id> | bot://<name> | @<owner>/identities/<slug>"
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"type": "object",
|
|
262
|
+
"additionalProperties": true,
|
|
263
|
+
"properties": {
|
|
264
|
+
"ref": { "type": "string", "minLength": 1 },
|
|
265
|
+
"file": { "type": "string", "minLength": 1 },
|
|
266
|
+
"inline": {
|
|
267
|
+
"type": "object",
|
|
268
|
+
"properties": {
|
|
269
|
+
"name": { "type": "string" },
|
|
270
|
+
"email": { "type": "string" }
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
]
|
|
276
|
+
},
|
|
277
|
+
"retry": {
|
|
278
|
+
"type": "object",
|
|
279
|
+
"additionalProperties": false,
|
|
280
|
+
"properties": {
|
|
281
|
+
"max_attempts": {
|
|
282
|
+
"type": "integer",
|
|
283
|
+
"minimum": 1,
|
|
284
|
+
"maximum": 10,
|
|
285
|
+
"default": 1
|
|
286
|
+
},
|
|
287
|
+
"backoff": {
|
|
288
|
+
"enum": ["exponential", "linear", "fixed"],
|
|
289
|
+
"default": "exponential"
|
|
290
|
+
},
|
|
291
|
+
"initial_ms": {
|
|
292
|
+
"type": "integer",
|
|
293
|
+
"minimum": 0,
|
|
294
|
+
"default": 60000
|
|
295
|
+
},
|
|
296
|
+
"max_ms": {
|
|
297
|
+
"type": "integer",
|
|
298
|
+
"minimum": 0,
|
|
299
|
+
"default": 3600000
|
|
300
|
+
},
|
|
301
|
+
"on": {
|
|
302
|
+
"type": "array",
|
|
303
|
+
"items": { "type": "string" },
|
|
304
|
+
"description": "OPTIONAL — only retry these failure classes."
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
"onFailure": {
|
|
309
|
+
"type": "object",
|
|
310
|
+
"additionalProperties": false,
|
|
311
|
+
"properties": {
|
|
312
|
+
"notify": {
|
|
313
|
+
"type": "array",
|
|
314
|
+
"items": { "$ref": "#/$defs/identityRef" },
|
|
315
|
+
"description": "Identity-refs to notify."
|
|
316
|
+
},
|
|
317
|
+
"create_work_item": {
|
|
318
|
+
"type": "boolean",
|
|
319
|
+
"default": false,
|
|
320
|
+
"description": "Open AIP-13/20 WORK item on retry-exhausted failure."
|
|
321
|
+
},
|
|
322
|
+
"fire_event": {
|
|
323
|
+
"type": "string",
|
|
324
|
+
"description": "OPTIONAL custom AIP-37 event to fire on failure."
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
"history": {
|
|
329
|
+
"type": "object",
|
|
330
|
+
"additionalProperties": false,
|
|
331
|
+
"properties": {
|
|
332
|
+
"retain_runs": {
|
|
333
|
+
"type": "integer",
|
|
334
|
+
"minimum": 0,
|
|
335
|
+
"default": 100
|
|
336
|
+
},
|
|
337
|
+
"retain_failed": {
|
|
338
|
+
"type": "integer",
|
|
339
|
+
"minimum": 0,
|
|
340
|
+
"default": 30
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
}
|