@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,246 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://agentproto.sh/schemas/aip-36/SANDBOX.schema.json",
|
|
4
|
+
"title": "SANDBOX.md frontmatter — agentsandbox/v1 (compute environment policy)",
|
|
5
|
+
"description": "Validates the YAML frontmatter portion of an AIP-36 SANDBOX.md manifest, OR the inline form embedded in any other manifest's `sandbox:` block. Compute-only — durable filesystem backings live in AIP-35 STORAGE.md.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["provider", "config"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"schema": {
|
|
11
|
+
"const": "sandbox/v1",
|
|
12
|
+
"description": "Standalone-only. Identifies the doctype + version. Absent when the block is inlined."
|
|
13
|
+
},
|
|
14
|
+
"id": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"pattern": "^@[a-z0-9][a-z0-9-]*/[a-z0-9][a-z0-9-]*$",
|
|
17
|
+
"description": "Standalone-only. Globally addressable id `@<owner-slug>/<sandbox-slug>`."
|
|
18
|
+
},
|
|
19
|
+
"version": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+(?:[-+][\\w.\\-]+)?$",
|
|
22
|
+
"description": "Standalone-only. Spec version of THIS file."
|
|
23
|
+
},
|
|
24
|
+
"provider": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"minLength": 1,
|
|
27
|
+
"description": "Backend kind. Day-1 enumerated set: local | mastra-e2b | mastra-modal | mastra-daytona | mastra-blaxel | node-permission. Hosts MAY register additional ids."
|
|
28
|
+
},
|
|
29
|
+
"config": {
|
|
30
|
+
"type": "object",
|
|
31
|
+
"description": "Provider-specific connection fields. Shape varies per provider (see AIP-36 §Provider config shapes)."
|
|
32
|
+
},
|
|
33
|
+
"limits": {
|
|
34
|
+
"type": "object",
|
|
35
|
+
"additionalProperties": false,
|
|
36
|
+
"properties": {
|
|
37
|
+
"timeout_ms": { "type": "integer", "minimum": 1 },
|
|
38
|
+
"memory_mb": { "type": "integer", "minimum": 1 },
|
|
39
|
+
"cpu_ms": { "type": "integer", "minimum": 1 }
|
|
40
|
+
},
|
|
41
|
+
"description": "Resource caps per command."
|
|
42
|
+
},
|
|
43
|
+
"env": {
|
|
44
|
+
"type": "object",
|
|
45
|
+
"additionalProperties": false,
|
|
46
|
+
"properties": {
|
|
47
|
+
"auth": { "$ref": "#/$defs/authBlock" },
|
|
48
|
+
"passthrough": {
|
|
49
|
+
"type": "array",
|
|
50
|
+
"items": { "type": "string" },
|
|
51
|
+
"default": [],
|
|
52
|
+
"description": "Static host env-var names to forward into the sandbox."
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"network": {
|
|
57
|
+
"type": "object",
|
|
58
|
+
"additionalProperties": false,
|
|
59
|
+
"properties": {
|
|
60
|
+
"egress": {
|
|
61
|
+
"type": "array",
|
|
62
|
+
"items": { "type": "string" },
|
|
63
|
+
"default": [],
|
|
64
|
+
"description": "Hostnames the sandbox MAY reach. Empty / missing = no egress."
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"mounts": {
|
|
69
|
+
"type": "array",
|
|
70
|
+
"items": { "$ref": "#/$defs/mountEntry" },
|
|
71
|
+
"default": [],
|
|
72
|
+
"description": "Filesystems mounted inside the sandbox at declared paths. Maps to Mastra Workspace.mounts."
|
|
73
|
+
},
|
|
74
|
+
"identity": {
|
|
75
|
+
"$ref": "#/$defs/identityRefBlock",
|
|
76
|
+
"description": "AIP-23 identity-ref — owner of the sandbox processes."
|
|
77
|
+
},
|
|
78
|
+
"policy": {
|
|
79
|
+
"$ref": "#/$defs/policyRefBlock",
|
|
80
|
+
"description": "AIP-38 POLICY block — access grants on sandbox actions."
|
|
81
|
+
},
|
|
82
|
+
"lifecycle": {
|
|
83
|
+
"type": "object",
|
|
84
|
+
"additionalProperties": false,
|
|
85
|
+
"properties": {
|
|
86
|
+
"pause_after_idle": {
|
|
87
|
+
"type": "string",
|
|
88
|
+
"minLength": 1,
|
|
89
|
+
"description": "AIP-37 event name (e.g. `idle-600` for 10 min). Provider-supported only (modal, daytona)."
|
|
90
|
+
},
|
|
91
|
+
"destroy_on": {
|
|
92
|
+
"type": "string",
|
|
93
|
+
"minLength": 1,
|
|
94
|
+
"description": "AIP-37 event name (e.g. `workspace-close`)."
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"read_only": {
|
|
99
|
+
"type": "boolean",
|
|
100
|
+
"default": false,
|
|
101
|
+
"description": "Reject command execution at the sandbox layer. Read-only sandbox calls fail with `sandbox_read_only`."
|
|
102
|
+
},
|
|
103
|
+
"metadata": {
|
|
104
|
+
"type": "object",
|
|
105
|
+
"additionalProperties": true,
|
|
106
|
+
"description": "Free-form, namespaced. Adapter hints under `metadata.<adapter>.*`."
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"$defs": {
|
|
110
|
+
"mountEntry": {
|
|
111
|
+
"type": "object",
|
|
112
|
+
"required": ["source", "at"],
|
|
113
|
+
"additionalProperties": false,
|
|
114
|
+
"properties": {
|
|
115
|
+
"source": {
|
|
116
|
+
"anyOf": [
|
|
117
|
+
{ "const": "workspace", "description": "Alias = the parent workspace's primary storage." },
|
|
118
|
+
{
|
|
119
|
+
"type": "object",
|
|
120
|
+
"required": ["ref"],
|
|
121
|
+
"additionalProperties": false,
|
|
122
|
+
"properties": { "ref": { "type": "string", "minLength": 1 } }
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"type": "object",
|
|
126
|
+
"required": ["inline"],
|
|
127
|
+
"additionalProperties": false,
|
|
128
|
+
"properties": {
|
|
129
|
+
"inline": {
|
|
130
|
+
"$ref": "https://agentproto.sh/schemas/aip-35/STORAGE.schema.json"
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"type": "object",
|
|
136
|
+
"required": ["file"],
|
|
137
|
+
"additionalProperties": false,
|
|
138
|
+
"properties": { "file": { "type": "string", "minLength": 1 } }
|
|
139
|
+
}
|
|
140
|
+
],
|
|
141
|
+
"description": "What to mount. `\"workspace\"` shortcut for the parent workspace storage."
|
|
142
|
+
},
|
|
143
|
+
"at": {
|
|
144
|
+
"type": "string",
|
|
145
|
+
"minLength": 1,
|
|
146
|
+
"pattern": "^/",
|
|
147
|
+
"description": "Absolute path inside the sandbox where the mount appears."
|
|
148
|
+
},
|
|
149
|
+
"mode": {
|
|
150
|
+
"enum": ["read-write", "read-only"],
|
|
151
|
+
"default": "read-write"
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"authBlock": {
|
|
156
|
+
"type": "object",
|
|
157
|
+
"additionalProperties": false,
|
|
158
|
+
"properties": {
|
|
159
|
+
"ref": { "type": "string", "minLength": 1 },
|
|
160
|
+
"state": {
|
|
161
|
+
"type": "object",
|
|
162
|
+
"additionalProperties": false,
|
|
163
|
+
"properties": {
|
|
164
|
+
"env": {
|
|
165
|
+
"type": "array",
|
|
166
|
+
"items": { "type": "string" }
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
"identityRefBlock": {
|
|
173
|
+
"description": "AIP-23 identity-ref. Single entry or array.",
|
|
174
|
+
"anyOf": [
|
|
175
|
+
{ "$ref": "#/$defs/identityRefEntry" },
|
|
176
|
+
{
|
|
177
|
+
"type": "array",
|
|
178
|
+
"items": { "$ref": "#/$defs/identityRefEntry" },
|
|
179
|
+
"minItems": 1
|
|
180
|
+
}
|
|
181
|
+
]
|
|
182
|
+
},
|
|
183
|
+
"policyRefEntry": {
|
|
184
|
+
"anyOf": [
|
|
185
|
+
{ "$ref": "https://agentproto.sh/schemas/aip-38/POLICY.schema.json" },
|
|
186
|
+
{
|
|
187
|
+
"type": "object",
|
|
188
|
+
"required": ["ref"],
|
|
189
|
+
"additionalProperties": false,
|
|
190
|
+
"properties": { "ref": { "type": "string", "minLength": 1 } }
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"type": "object",
|
|
194
|
+
"required": ["file"],
|
|
195
|
+
"additionalProperties": false,
|
|
196
|
+
"properties": { "file": { "type": "string", "minLength": 1 } }
|
|
197
|
+
}
|
|
198
|
+
]
|
|
199
|
+
},
|
|
200
|
+
"policyRefBlock": {
|
|
201
|
+
"anyOf": [
|
|
202
|
+
{ "$ref": "#/$defs/policyRefEntry" },
|
|
203
|
+
{
|
|
204
|
+
"type": "array",
|
|
205
|
+
"items": { "$ref": "#/$defs/policyRefEntry" },
|
|
206
|
+
"minItems": 1
|
|
207
|
+
}
|
|
208
|
+
]
|
|
209
|
+
},
|
|
210
|
+
"identityRefEntry": {
|
|
211
|
+
"anyOf": [
|
|
212
|
+
{
|
|
213
|
+
"type": "object",
|
|
214
|
+
"required": ["name", "email"],
|
|
215
|
+
"additionalProperties": true,
|
|
216
|
+
"properties": {
|
|
217
|
+
"name": { "type": "string", "minLength": 1 },
|
|
218
|
+
"email": { "type": "string", "minLength": 1 },
|
|
219
|
+
"avatar": { "type": "string" },
|
|
220
|
+
"gpg_key": { "type": "string" },
|
|
221
|
+
"role": { "type": "string" },
|
|
222
|
+
"metadata": { "type": "object" }
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"type": "object",
|
|
227
|
+
"required": ["ref"],
|
|
228
|
+
"additionalProperties": true,
|
|
229
|
+
"properties": {
|
|
230
|
+
"ref": { "type": "string", "minLength": 1 },
|
|
231
|
+
"role": { "type": "string" }
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"type": "object",
|
|
236
|
+
"required": ["file"],
|
|
237
|
+
"additionalProperties": true,
|
|
238
|
+
"properties": {
|
|
239
|
+
"file": { "type": "string", "minLength": 1 },
|
|
240
|
+
"role": { "type": "string" }
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
]
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://agentproto.sh/schemas/aip-38/POLICY.schema.json",
|
|
4
|
+
"title": "POLICY.md frontmatter — agentpolicy/v1 (composable policy block)",
|
|
5
|
+
"description": "Validates the YAML frontmatter portion of an AIP-38 POLICY.md manifest, OR the inline form embedded in any other manifest's `policy:` block. Grants on AIP-39 ACTION ids; principals via AIP-23 identity-ref schemes.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["schema"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"schema": {
|
|
11
|
+
"const": "policy/v1"
|
|
12
|
+
},
|
|
13
|
+
"id": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"pattern": "^@[a-z0-9][a-z0-9-]*/[a-z0-9][a-z0-9-]*$",
|
|
16
|
+
"description": "Standalone-only. Globally addressable id `@<owner-slug>/<policy-slug>`."
|
|
17
|
+
},
|
|
18
|
+
"version": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+(?:[-+][\\w.\\-]+)?$",
|
|
21
|
+
"description": "Standalone-only. Spec version of THIS file."
|
|
22
|
+
},
|
|
23
|
+
"default": {
|
|
24
|
+
"enum": ["allow", "deny"],
|
|
25
|
+
"default": "deny",
|
|
26
|
+
"description": "Default decision when no grant matches. `deny` strongly recommended; `allow` is audit-significant."
|
|
27
|
+
},
|
|
28
|
+
"grants": {
|
|
29
|
+
"type": "array",
|
|
30
|
+
"items": { "$ref": "#/$defs/grant" },
|
|
31
|
+
"default": [],
|
|
32
|
+
"description": "Access grants. Each grant ties a principal (AIP-23) to a set of actions (AIP-39)."
|
|
33
|
+
},
|
|
34
|
+
"defaults": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"additionalProperties": {
|
|
37
|
+
"type": "object",
|
|
38
|
+
"additionalProperties": true
|
|
39
|
+
},
|
|
40
|
+
"default": {},
|
|
41
|
+
"description": "Per-block behavioural defaults. Keys are AIP block names (storage, sandbox, code, secrets); values are partial block configs."
|
|
42
|
+
},
|
|
43
|
+
"limits": {
|
|
44
|
+
"type": "array",
|
|
45
|
+
"items": { "$ref": "#/$defs/limit" },
|
|
46
|
+
"default": [],
|
|
47
|
+
"description": "Resource limits. Each `{ kind, value, scope?, per?, applies_to? }`."
|
|
48
|
+
},
|
|
49
|
+
"requirements": {
|
|
50
|
+
"type": "array",
|
|
51
|
+
"items": { "$ref": "#/$defs/requirement" },
|
|
52
|
+
"default": [],
|
|
53
|
+
"description": "Cross-cutting must-haves (MFA, signing, approvals). ANDed across composed policies."
|
|
54
|
+
},
|
|
55
|
+
"metadata": {
|
|
56
|
+
"type": "object",
|
|
57
|
+
"additionalProperties": true,
|
|
58
|
+
"description": "Free-form, namespaced."
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"$defs": {
|
|
62
|
+
"grant": {
|
|
63
|
+
"type": "object",
|
|
64
|
+
"required": ["principal", "actions"],
|
|
65
|
+
"additionalProperties": false,
|
|
66
|
+
"properties": {
|
|
67
|
+
"principal": {
|
|
68
|
+
"$ref": "#/$defs/identityRefEntry",
|
|
69
|
+
"description": "AIP-23 identity-ref. Schemes: operator://, user://, org://, guild://, bot://, group://, role://, *."
|
|
70
|
+
},
|
|
71
|
+
"actions": {
|
|
72
|
+
"type": "array",
|
|
73
|
+
"minItems": 1,
|
|
74
|
+
"items": { "$ref": "#/$defs/actionGrant" }
|
|
75
|
+
},
|
|
76
|
+
"conditions": {
|
|
77
|
+
"type": "array",
|
|
78
|
+
"items": { "$ref": "#/$defs/condition" },
|
|
79
|
+
"description": "Conditions ANDed (all must hold). Unknown conditions skip the grant."
|
|
80
|
+
},
|
|
81
|
+
"ttl_seconds": {
|
|
82
|
+
"type": "integer",
|
|
83
|
+
"minimum": 1,
|
|
84
|
+
"description": "Time-bound grant; expires at granted_at + ttl_seconds."
|
|
85
|
+
},
|
|
86
|
+
"granted_at": {
|
|
87
|
+
"type": "string",
|
|
88
|
+
"format": "date-time",
|
|
89
|
+
"description": "ISO 8601. Audit metadata."
|
|
90
|
+
},
|
|
91
|
+
"granted_by": {
|
|
92
|
+
"$ref": "#/$defs/identityRefEntry",
|
|
93
|
+
"description": "Who issued this grant. Audit metadata."
|
|
94
|
+
},
|
|
95
|
+
"revoked": {
|
|
96
|
+
"type": "boolean",
|
|
97
|
+
"default": false,
|
|
98
|
+
"description": "Soft-revoke marker. A revoked grant evaluates as no-grant."
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"actionGrant": {
|
|
103
|
+
"type": "object",
|
|
104
|
+
"required": ["action"],
|
|
105
|
+
"additionalProperties": false,
|
|
106
|
+
"properties": {
|
|
107
|
+
"action": {
|
|
108
|
+
"type": "string",
|
|
109
|
+
"minLength": 1,
|
|
110
|
+
"description": "AIP-39 ACTION reference. Bare id (e.g. `storage:commit`), workspace-relative path, or registry slug (`@agentik/actions/standard/storage-commit`). `*` suffix permits wildcards (`storage:*`)."
|
|
111
|
+
},
|
|
112
|
+
"scope": {
|
|
113
|
+
"type": "string",
|
|
114
|
+
"description": "Optional scope narrowing for this grant (action-specific)."
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"condition": {
|
|
119
|
+
"type": "object",
|
|
120
|
+
"required": ["kind"],
|
|
121
|
+
"additionalProperties": true,
|
|
122
|
+
"properties": {
|
|
123
|
+
"kind": {
|
|
124
|
+
"type": "string",
|
|
125
|
+
"minLength": 1,
|
|
126
|
+
"description": "Condition kind. Standard: `during-business-hours`, `ip-range`, `mfa-recent`, `approval-from`, `signed-by`. Hosts MAY register custom kinds."
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"limit": {
|
|
131
|
+
"type": "object",
|
|
132
|
+
"required": ["kind", "value"],
|
|
133
|
+
"additionalProperties": true,
|
|
134
|
+
"properties": {
|
|
135
|
+
"kind": {
|
|
136
|
+
"type": "string",
|
|
137
|
+
"minLength": 1,
|
|
138
|
+
"description": "Limit kind. Standard: `max-concurrent-sandboxes`, `rate-tool-calls`, `max-egress-bytes-per-day`. Host-extensible."
|
|
139
|
+
},
|
|
140
|
+
"value": {
|
|
141
|
+
"type": "number",
|
|
142
|
+
"minimum": 0
|
|
143
|
+
},
|
|
144
|
+
"scope": {
|
|
145
|
+
"type": "string",
|
|
146
|
+
"description": "Per what? `user`, `workspace`, `org`, host-specific."
|
|
147
|
+
},
|
|
148
|
+
"per": {
|
|
149
|
+
"enum": ["second", "minute", "hour", "day"],
|
|
150
|
+
"description": "For rate-style limits."
|
|
151
|
+
},
|
|
152
|
+
"applies_to": {
|
|
153
|
+
"type": "array",
|
|
154
|
+
"items": { "type": "string" },
|
|
155
|
+
"description": "Action refs the limit applies to. Empty / missing = all actions."
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"requirement": {
|
|
160
|
+
"type": "object",
|
|
161
|
+
"required": ["kind"],
|
|
162
|
+
"additionalProperties": true,
|
|
163
|
+
"properties": {
|
|
164
|
+
"kind": {
|
|
165
|
+
"type": "string",
|
|
166
|
+
"minLength": 1,
|
|
167
|
+
"description": "Requirement kind. Standard: `mfa-recent`, `signed-by`, `approval-from`. Host-extensible."
|
|
168
|
+
},
|
|
169
|
+
"applies_to": {
|
|
170
|
+
"type": "array",
|
|
171
|
+
"items": { "type": "string" },
|
|
172
|
+
"description": "Action refs this requirement applies to. Empty / missing = all actions."
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
"identityRefEntry": {
|
|
177
|
+
"anyOf": [
|
|
178
|
+
{
|
|
179
|
+
"type": "object",
|
|
180
|
+
"required": ["name", "email"],
|
|
181
|
+
"additionalProperties": true,
|
|
182
|
+
"properties": {
|
|
183
|
+
"name": { "type": "string", "minLength": 1 },
|
|
184
|
+
"email": { "type": "string", "minLength": 1 },
|
|
185
|
+
"avatar": { "type": "string" },
|
|
186
|
+
"gpg_key": { "type": "string" },
|
|
187
|
+
"role": { "type": "string" },
|
|
188
|
+
"metadata": { "type": "object" }
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"type": "object",
|
|
193
|
+
"required": ["ref"],
|
|
194
|
+
"additionalProperties": true,
|
|
195
|
+
"properties": {
|
|
196
|
+
"ref": { "type": "string", "minLength": 1 },
|
|
197
|
+
"role": { "type": "string" }
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"type": "object",
|
|
202
|
+
"required": ["file"],
|
|
203
|
+
"additionalProperties": true,
|
|
204
|
+
"properties": {
|
|
205
|
+
"file": { "type": "string", "minLength": 1 },
|
|
206
|
+
"role": { "type": "string" }
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"type": "string",
|
|
211
|
+
"minLength": 1,
|
|
212
|
+
"description": "Shorthand: bare scheme string like `operator://bob`, `user://current`, `*`."
|
|
213
|
+
}
|
|
214
|
+
]
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://agentproto.sh/schemas/aip-39/ACTION.schema.json",
|
|
4
|
+
"title": "ACTION.md frontmatter — agentaction/v1 (verb primitive)",
|
|
5
|
+
"description": "Validates the YAML frontmatter portion of an AIP-39 ACTION.md manifest. The pivot primitive: TOOL implements it, POLICY grants on it, INTENT routes to it, WORKFLOW steps invoke it.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["schema", "id", "description"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"schema": {
|
|
11
|
+
"const": "action/v1"
|
|
12
|
+
},
|
|
13
|
+
"id": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"minLength": 2,
|
|
16
|
+
"maxLength": 80,
|
|
17
|
+
"pattern": "^[a-z0-9][a-z0-9.-]*(:[a-z0-9][a-z0-9.-]*)?$",
|
|
18
|
+
"description": "Machine identifier. Standard format `<target-kind>:<verb>` (e.g. `storage:commit`). Single colon only; multiple colons reserved for future namespacing."
|
|
19
|
+
},
|
|
20
|
+
"description": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"minLength": 1,
|
|
23
|
+
"maxLength": 2000,
|
|
24
|
+
"description": "One-paragraph purpose, written for the LLM caller."
|
|
25
|
+
},
|
|
26
|
+
"version": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+(?:[-+][\\w.\\-]+)?$",
|
|
29
|
+
"default": "1.0.0",
|
|
30
|
+
"description": "Spec version of THIS file. Bump on breaking change to mutates / risk_level."
|
|
31
|
+
},
|
|
32
|
+
"category": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"default": "",
|
|
35
|
+
"description": "Discovery category for catalog UIs. Common: filesystem, compute, messaging, vcs, payment, auth, lifecycle."
|
|
36
|
+
},
|
|
37
|
+
"verb": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"description": "The bare verb (e.g. `commit`, `execute`). Derived from `id` after the `:` if absent."
|
|
40
|
+
},
|
|
41
|
+
"target_kind": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"description": "The resource kind this action operates on (e.g. `storage`, `sandbox`, `secrets`). Derived from `id` before the `:` if absent."
|
|
44
|
+
},
|
|
45
|
+
"mutates": {
|
|
46
|
+
"type": "array",
|
|
47
|
+
"items": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"pattern": "^[a-z]+:[^\\s]+$",
|
|
50
|
+
"description": "Format: <class>:<scope>. Examples: storage:*, network:api.foo.com, database:invoices. Implementors MUST honour every entry; widening rejected at parse time."
|
|
51
|
+
},
|
|
52
|
+
"default": [],
|
|
53
|
+
"description": "Resources the action may modify. Inherited by implementors (TOOL, DRIVER); they MAY add more, never drop."
|
|
54
|
+
},
|
|
55
|
+
"requires": {
|
|
56
|
+
"type": "object",
|
|
57
|
+
"additionalProperties": false,
|
|
58
|
+
"properties": {
|
|
59
|
+
"network": { "type": "array", "items": { "type": "string" } },
|
|
60
|
+
"secrets": { "type": "array", "items": { "type": "string" } },
|
|
61
|
+
"tools": { "type": "array", "items": { "type": "string" } }
|
|
62
|
+
},
|
|
63
|
+
"description": "Capability requirements gated by AIP-7 governance. Implementors MAY add to this set; MUST NOT remove."
|
|
64
|
+
},
|
|
65
|
+
"approval": {
|
|
66
|
+
"anyOf": [
|
|
67
|
+
{ "enum": ["auto", "always", "on-mutate"] },
|
|
68
|
+
{ "type": "string", "pattern": "^policy:[A-Za-z0-9_./-]+$" }
|
|
69
|
+
],
|
|
70
|
+
"default": "auto",
|
|
71
|
+
"description": "Approval class. Implementors MAY narrow (`auto` → `always` → `on-mutate`); MUST NOT widen."
|
|
72
|
+
},
|
|
73
|
+
"risk_level": {
|
|
74
|
+
"type": "integer",
|
|
75
|
+
"minimum": 0,
|
|
76
|
+
"maximum": 3,
|
|
77
|
+
"default": 0,
|
|
78
|
+
"description": "0=read-only, 1=scoped writes, 2=external side effects, 3=irreversible. Implementors MAY raise; MUST NOT lower."
|
|
79
|
+
},
|
|
80
|
+
"fires_events": {
|
|
81
|
+
"type": "array",
|
|
82
|
+
"items": { "type": "string", "minLength": 1 },
|
|
83
|
+
"default": [],
|
|
84
|
+
"description": "AIP-37 LIFECYCLE event names this action fires when invoked. Subscribers (sync layers, audit) attach to these. Implementors MAY fire more events; MUST NOT drop any declared here."
|
|
85
|
+
},
|
|
86
|
+
"implementations": {
|
|
87
|
+
"type": "array",
|
|
88
|
+
"items": {
|
|
89
|
+
"type": "object",
|
|
90
|
+
"required": ["kind", "ref"],
|
|
91
|
+
"additionalProperties": false,
|
|
92
|
+
"properties": {
|
|
93
|
+
"kind": {
|
|
94
|
+
"enum": ["tool", "driver", "ui", "lifecycle"],
|
|
95
|
+
"description": "Kind of implementation."
|
|
96
|
+
},
|
|
97
|
+
"ref": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"minLength": 1,
|
|
100
|
+
"description": "Reference to the implementor (TOOL.md id, DRIVER.md id, UI surface name, etc.)."
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"default": [],
|
|
105
|
+
"description": "OPTIONAL discovery hint — known implementations of this action. NOT authoritative — source of truth lives on implementors via their `implements:` field. Hosts populate from scanning."
|
|
106
|
+
},
|
|
107
|
+
"tags": {
|
|
108
|
+
"type": "array",
|
|
109
|
+
"items": { "type": "string" },
|
|
110
|
+
"default": [],
|
|
111
|
+
"description": "Free-form discovery tags."
|
|
112
|
+
},
|
|
113
|
+
"examples": {
|
|
114
|
+
"type": "array",
|
|
115
|
+
"items": {
|
|
116
|
+
"type": "object",
|
|
117
|
+
"required": ["name", "scenario"],
|
|
118
|
+
"additionalProperties": false,
|
|
119
|
+
"properties": {
|
|
120
|
+
"name": { "type": "string", "minLength": 1 },
|
|
121
|
+
"scenario": { "type": "string", "minLength": 1 },
|
|
122
|
+
"note": { "type": "string" }
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"default": [],
|
|
126
|
+
"description": "Semantic examples (NOT input/output, since action has no schema). Each `{ name, scenario, note? }`."
|
|
127
|
+
},
|
|
128
|
+
"metadata": {
|
|
129
|
+
"type": "object",
|
|
130
|
+
"additionalProperties": true,
|
|
131
|
+
"description": "Free-form, namespaced. Authors MAY stash adapter-specific hints under namespaced keys."
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|