@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.
Files changed (48) hide show
  1. package/dist/cli.mjs +26 -8
  2. package/dist/cli.mjs.map +1 -1
  3. package/dist/index.d.ts +1 -5
  4. package/dist/index.mjs +15 -4
  5. package/dist/index.mjs.map +1 -1
  6. package/dist/specs/resources/aip-10/draft/KNOWLEDGE.schema.json +457 -0
  7. package/dist/specs/resources/aip-11/draft/LESSON.schema.json +149 -0
  8. package/dist/specs/resources/aip-12/draft/PLAYBOOK.schema.json +349 -0
  9. package/dist/specs/resources/aip-13/draft/WORK_ITEM.schema.json +547 -0
  10. package/dist/specs/resources/aip-14/draft/TOOL.schema.json +169 -0
  11. package/dist/specs/resources/aip-15/draft/WORKFLOW.schema.json +356 -0
  12. package/dist/specs/resources/aip-16/draft/IO.schema.json +64 -0
  13. package/dist/specs/resources/aip-17/draft/RUNNER.schema.json +81 -0
  14. package/dist/specs/resources/aip-18/draft/COLLECTION.schema.json +436 -0
  15. package/dist/specs/resources/aip-19/draft/SECRETS.schema.json +261 -0
  16. package/dist/specs/resources/aip-20/draft/WORK.schema.json +371 -0
  17. package/dist/specs/resources/aip-21/draft/AGENCY.schema.json +454 -0
  18. package/dist/specs/resources/aip-22/draft/OFFICE.schema.json +390 -0
  19. package/dist/specs/resources/aip-23/draft/IDENTITY.schema.json +358 -0
  20. package/dist/specs/resources/aip-24/draft/ASSEMBLY.schema.json +411 -0
  21. package/dist/specs/resources/aip-25/draft/PERSONA.schema.json +257 -0
  22. package/dist/specs/resources/aip-26/draft/CODE.schema.json +172 -0
  23. package/dist/specs/resources/aip-28/draft/INTENT.schema.json +215 -0
  24. package/dist/specs/resources/aip-29/draft/CLI.schema.json +339 -0
  25. package/dist/specs/resources/aip-3/draft/SKILL.schema.json +206 -0
  26. package/dist/specs/resources/aip-30/draft/DRIVER.schema.json +237 -0
  27. package/dist/specs/resources/aip-31/draft/HTTP.schema.json +80 -0
  28. package/dist/specs/resources/aip-32/draft/MCP.schema.json +88 -0
  29. package/dist/specs/resources/aip-33/draft/SDK.schema.json +60 -0
  30. package/dist/specs/resources/aip-34/draft/WORKSPACE.schema.json +252 -0
  31. package/dist/specs/resources/aip-35/draft/STORAGE.schema.json +237 -0
  32. package/dist/specs/resources/aip-36/draft/SANDBOX.schema.json +246 -0
  33. package/dist/specs/resources/aip-38/draft/POLICY.schema.json +217 -0
  34. package/dist/specs/resources/aip-39/draft/ACTION.schema.json +134 -0
  35. package/dist/specs/resources/aip-4/draft/DESIGN.schema.json +189 -0
  36. package/dist/specs/resources/aip-40/draft/EXTENSION.schema.json +116 -0
  37. package/dist/specs/resources/aip-41/draft/ROUTINE.schema.json +345 -0
  38. package/dist/specs/resources/aip-42/draft/AGENT.schema.json +268 -0
  39. package/dist/specs/resources/aip-44/draft/ACP.schema.json +170 -0
  40. package/dist/specs/resources/aip-45/draft/AGENT-CLI.schema.json +371 -0
  41. package/dist/specs/resources/aip-47/draft/ROLE.schema.json +199 -0
  42. package/dist/specs/resources/aip-48/draft/MultiAgentRuntime.schema.json +108 -0
  43. package/dist/specs/resources/aip-5/draft/TEMPLATE.schema.json +231 -0
  44. package/dist/specs/resources/aip-6/draft/COMPANY.schema.json +268 -0
  45. package/dist/specs/resources/aip-7/draft/GOVERNANCE.schema.json +581 -0
  46. package/dist/specs/resources/aip-8/draft/AGENCY.schema.json +518 -0
  47. package/dist/specs/resources/aip-9/draft/OPERATOR.schema.json +297 -0
  48. package/package.json +4 -4
@@ -0,0 +1,237 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agentproto.sh/docs/aip-30/DRIVER.schema.json",
4
+ "title": "DRIVER.md frontmatter — agentdriver/v1",
5
+ "description": "JSON Schema for the YAML frontmatter of an AIP-30 DRIVER.md manifest. Subtype-specific fields (CLI's bin/sandbox/output, HTTP's endpoint/body, etc.) are validated by the subtype AIP's schema.",
6
+ "type": "object",
7
+ "additionalProperties": true,
8
+ "required": ["name", "id", "description", "version", "kind", "implements"],
9
+ "properties": {
10
+ "name": { "type": "string", "minLength": 1, "maxLength": 80 },
11
+ "id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9.\\-]{1,79}$" },
12
+ "description": { "type": "string", "minLength": 1, "maxLength": 2000 },
13
+ "version": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+(?:[-+][\\w.\\-]+)?$" },
14
+ "kind": { "type": "string", "enum": ["cli", "http", "mcp", "sdk", "builtin"] },
15
+ "implements": {
16
+ "type": "array",
17
+ "minItems": 1,
18
+ "items": { "$ref": "#/$defs/implementsEntry" }
19
+ },
20
+ "install": {
21
+ "type": "array",
22
+ "items": { "type": "object" },
23
+ "description": "Inherited from AIP-29 § Install methods. Methods registry validated by subtype schema."
24
+ },
25
+ "version_check": { "$ref": "#/$defs/versionCheck" },
26
+ "auth": { "$ref": "#/$defs/auth" },
27
+ "runner": {
28
+ "oneOf": [
29
+ { "type": "string", "description": "Workspace-relative path to a RUNNER.md (AIP-17)." },
30
+ { "type": "object" }
31
+ ]
32
+ },
33
+ "network": {
34
+ "type": "object",
35
+ "additionalProperties": false,
36
+ "properties": {
37
+ "egress": { "type": "array", "items": { "type": "string" } },
38
+ "ingress": { "type": "array", "items": { "type": "string" } }
39
+ }
40
+ },
41
+ "region": {
42
+ "type": "array",
43
+ "items": { "type": "string" },
44
+ "default": ["global"]
45
+ },
46
+ "policy_tags": {
47
+ "type": "array",
48
+ "items": { "type": "string", "pattern": "^[a-z0-9][a-z0-9\\-]{0,63}$" },
49
+ "uniqueItems": true
50
+ },
51
+ "cost_override": { "$ref": "#/$defs/costOverride" },
52
+ "timeout_override_ms": { "type": "integer", "minimum": 100 },
53
+ "retry_override": { "$ref": "#/$defs/retryPolicy" },
54
+ "health_check": { "$ref": "#/$defs/healthCheck" },
55
+ "requires": {
56
+ "type": "object",
57
+ "additionalProperties": false,
58
+ "properties": {
59
+ "os": { "type": "array", "items": { "type": "string", "enum": ["darwin", "linux", "windows"] } },
60
+ "arch": { "type": "array", "items": { "type": "string", "enum": ["x64", "arm64", "x86", "arm"] } },
61
+ "min_disk_mb": { "type": "integer", "minimum": 0 },
62
+ "min_memory_mb": { "type": "integer", "minimum": 0 }
63
+ }
64
+ },
65
+ "examples": {
66
+ "type": "array",
67
+ "items": {
68
+ "type": "object",
69
+ "additionalProperties": true,
70
+ "required": ["goal"],
71
+ "properties": {
72
+ "goal": { "type": "string" },
73
+ "note": { "type": "string" },
74
+ "cmd": { "type": "string", "description": "CLI subtype only" }
75
+ }
76
+ }
77
+ },
78
+ "tags": {
79
+ "type": "array",
80
+ "items": { "type": "string", "pattern": "^[a-z0-9][a-z0-9\\-]{0,63}$" },
81
+ "uniqueItems": true
82
+ },
83
+ "metadata": { "type": "object" }
84
+ },
85
+ "$defs": {
86
+ "implementsEntry": {
87
+ "type": "object",
88
+ "additionalProperties": false,
89
+ "required": ["tool", "version"],
90
+ "properties": {
91
+ "tool": { "type": "string", "description": "Workspace-relative path or registry id of a TOOL.md." },
92
+ "version": { "type": "string", "description": "Contract semver range (npm-style)." },
93
+ "schema_narrowing": {
94
+ "type": "object",
95
+ "additionalProperties": false,
96
+ "properties": {
97
+ "drop_inputs": { "type": "array", "items": { "type": "string" } },
98
+ "drop_outputs": { "type": "array", "items": { "type": "string" } }
99
+ }
100
+ },
101
+ "mapping": {
102
+ "type": "object",
103
+ "additionalProperties": { "$ref": "#/$defs/mappingValue" }
104
+ },
105
+ "cost_override": { "$ref": "#/$defs/costOverride" },
106
+ "timeout_override_ms": { "type": "integer", "minimum": 100 },
107
+ "retry_override": { "$ref": "#/$defs/retryPolicy" },
108
+ "metadata": { "type": "object" }
109
+ }
110
+ },
111
+ "mappingValue": {
112
+ "oneOf": [
113
+ { "type": "string", "description": "Identity / rename: tool input → provider input key." },
114
+ {
115
+ "type": "object",
116
+ "additionalProperties": false,
117
+ "required": ["from"],
118
+ "properties": {
119
+ "from": { "type": "string" },
120
+ "transform": { "type": "string", "description": "Named transformer exported by the provider's entry." }
121
+ }
122
+ }
123
+ ]
124
+ },
125
+ "versionCheck": {
126
+ "type": "object",
127
+ "additionalProperties": false,
128
+ "required": ["cmd", "parse", "range"],
129
+ "properties": {
130
+ "cmd": { "type": "string" },
131
+ "parse": { "type": "string" },
132
+ "range": { "type": "string" },
133
+ "timeout_ms": { "type": "integer", "minimum": 100, "default": 5000 }
134
+ }
135
+ },
136
+ "auth": {
137
+ "type": "object",
138
+ "additionalProperties": false,
139
+ "properties": {
140
+ "ref": { "type": "string" },
141
+ "state": {
142
+ "type": "object",
143
+ "additionalProperties": false,
144
+ "properties": {
145
+ "paths": { "type": "array", "items": { "type": "string" } },
146
+ "env": { "type": "array", "items": { "type": "string" } }
147
+ }
148
+ },
149
+ "login": {
150
+ "type": "object",
151
+ "additionalProperties": false,
152
+ "properties": {
153
+ "cmd": { "type": "string" },
154
+ "url": { "type": "string", "format": "uri" },
155
+ "interactive": { "type": "boolean" },
156
+ "requires_callback_url": { "type": "boolean" },
157
+ "completes_when": {
158
+ "type": "object",
159
+ "additionalProperties": false,
160
+ "properties": {
161
+ "cmd": { "type": "string" },
162
+ "exit_code": { "type": "integer" },
163
+ "http": {
164
+ "type": "object",
165
+ "additionalProperties": false,
166
+ "required": ["method", "url"],
167
+ "properties": {
168
+ "method": { "type": "string", "enum": ["GET", "POST", "HEAD"] },
169
+ "url": { "type": "string", "format": "uri" },
170
+ "expect_status": { "type": "integer", "minimum": 100, "maximum": 599 }
171
+ }
172
+ }
173
+ }
174
+ }
175
+ }
176
+ },
177
+ "refresh": {
178
+ "type": "object",
179
+ "additionalProperties": false,
180
+ "properties": {
181
+ "cmd": { "type": "string" },
182
+ "url": { "type": "string", "format": "uri" },
183
+ "every": { "type": "string", "pattern": "^P(?:T)?\\S+$" }
184
+ }
185
+ },
186
+ "expiry": {
187
+ "type": "object",
188
+ "additionalProperties": false,
189
+ "properties": {
190
+ "detect": { "type": "string", "description": "exit_code:N | http_status:N | exception:Name | header:NAME:VALUE" }
191
+ }
192
+ }
193
+ }
194
+ },
195
+ "costOverride": {
196
+ "type": "object",
197
+ "additionalProperties": false,
198
+ "properties": {
199
+ "cost_class": { "type": "string", "enum": ["trivial", "metered", "expensive"] },
200
+ "cost_units_per_call": { "type": "number", "minimum": 0, "description": "Millicents per call." },
201
+ "currency": { "type": "string", "pattern": "^[A-Z]{3}$" }
202
+ }
203
+ },
204
+ "retryPolicy": {
205
+ "type": "object",
206
+ "additionalProperties": false,
207
+ "required": ["max_attempts"],
208
+ "properties": {
209
+ "max_attempts": { "type": "integer", "minimum": 1, "maximum": 10 },
210
+ "backoff": { "type": "string", "enum": ["fixed", "exponential"] },
211
+ "initial_ms": { "type": "integer", "minimum": 0 }
212
+ }
213
+ },
214
+ "healthCheck": {
215
+ "type": "object",
216
+ "additionalProperties": false,
217
+ "required": ["method"],
218
+ "properties": {
219
+ "method": { "type": "string", "enum": ["ping", "exec", "http", "noop"] },
220
+ "cmd": { "type": "string", "description": "Used when method=exec" },
221
+ "http": {
222
+ "type": "object",
223
+ "additionalProperties": false,
224
+ "required": ["method", "url"],
225
+ "properties": {
226
+ "method": { "type": "string", "enum": ["GET", "POST", "HEAD"] },
227
+ "url": { "type": "string", "format": "uri" },
228
+ "expect_status": { "type": "integer", "minimum": 100, "maximum": 599 }
229
+ }
230
+ },
231
+ "expect_exit": { "type": "integer" },
232
+ "every": { "type": "string", "pattern": "^P(?:T)?\\S+$" },
233
+ "timeout_ms": { "type": "integer", "minimum": 100, "default": 5000 }
234
+ }
235
+ }
236
+ }
237
+ }
@@ -0,0 +1,80 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agentproto.sh/docs/aip-31/HTTP.schema.json",
4
+ "title": "HTTP.md frontmatter — agenthttp/v1 (HTTP provider specialisation)",
5
+ "description": "Validates the HTTP-specific frontmatter fields of an AIP-31 DRIVER.md (kind: http). Universal PROVIDER fields validate via AIP-30's schema.",
6
+ "type": "object",
7
+ "additionalProperties": true,
8
+ "required": ["kind", "base_url"],
9
+ "properties": {
10
+ "kind": { "const": "http" },
11
+ "base_url": { "type": "string", "format": "uri" },
12
+ "default_headers": {
13
+ "type": "object",
14
+ "additionalProperties": { "type": "string" }
15
+ },
16
+ "default_method": {
17
+ "enum": ["GET", "POST", "PUT", "PATCH", "DELETE"],
18
+ "default": "POST"
19
+ },
20
+ "streaming": {
21
+ "type": "object",
22
+ "additionalProperties": false,
23
+ "required": ["transport"],
24
+ "properties": {
25
+ "transport": { "enum": ["sse", "ndjson", "chunked"] },
26
+ "event_field": { "type": "string" },
27
+ "terminator": { "type": "string" }
28
+ }
29
+ },
30
+ "rate_limit": {
31
+ "type": "object",
32
+ "additionalProperties": false,
33
+ "properties": {
34
+ "requests_per_minute": { "type": "integer", "minimum": 1 },
35
+ "burst": { "type": "integer", "minimum": 1 }
36
+ }
37
+ },
38
+ "implements": {
39
+ "type": "array",
40
+ "items": {
41
+ "type": "object",
42
+ "required": ["tool", "version"],
43
+ "additionalProperties": true,
44
+ "properties": {
45
+ "metadata": {
46
+ "type": "object",
47
+ "properties": {
48
+ "http": { "$ref": "#/$defs/perToolHttp" }
49
+ }
50
+ }
51
+ }
52
+ }
53
+ }
54
+ },
55
+ "$defs": {
56
+ "perToolHttp": {
57
+ "type": "object",
58
+ "additionalProperties": false,
59
+ "required": ["endpoint"],
60
+ "properties": {
61
+ "endpoint": { "type": "string", "description": "Path relative to base_url, e.g. /v1/images/generations" },
62
+ "method": { "enum": ["GET", "POST", "PUT", "PATCH", "DELETE"] },
63
+ "headers": { "type": "object", "additionalProperties": { "type": "string" } },
64
+ "body_template": { "type": "object" },
65
+ "query_template": { "type": "object", "additionalProperties": { "type": "string" } },
66
+ "response_extract": { "type": "string", "description": "JSONPath-lite expression. Default: $" },
67
+ "streaming": {
68
+ "type": "object",
69
+ "additionalProperties": false,
70
+ "properties": {
71
+ "transport": { "enum": ["sse", "ndjson", "chunked"] },
72
+ "event_field": { "type": "string" },
73
+ "terminator": { "type": "string" }
74
+ }
75
+ },
76
+ "idempotency_key_header": { "type": "string" }
77
+ }
78
+ }
79
+ }
80
+ }
@@ -0,0 +1,88 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agentproto.sh/docs/aip-32/MCP.schema.json",
4
+ "title": "MCP.md frontmatter — agentmcp/v1",
5
+ "description": "Validates the MCP-specific frontmatter of an AIP-32 DRIVER.md (kind: mcp). Universal PROVIDER fields validate via AIP-30's schema.",
6
+ "type": "object",
7
+ "additionalProperties": true,
8
+ "required": ["kind", "server", "transport"],
9
+ "properties": {
10
+ "kind": { "const": "mcp" },
11
+ "server": { "$ref": "#/$defs/server" },
12
+ "transport": { "enum": ["stdio", "sse", "http"] },
13
+ "protocol_version": { "type": "string" },
14
+ "prompts": {
15
+ "type": "array",
16
+ "items": {
17
+ "type": "object",
18
+ "required": ["name", "integrate_as"],
19
+ "additionalProperties": false,
20
+ "properties": {
21
+ "name": { "type": "string" },
22
+ "description": { "type": "string" },
23
+ "integrate_as": { "enum": ["skill_block", "raw"] },
24
+ "skill_ref": { "type": "string" }
25
+ }
26
+ }
27
+ },
28
+ "resources": {
29
+ "type": "array",
30
+ "items": {
31
+ "type": "object",
32
+ "required": ["uri_template", "integrate_as"],
33
+ "additionalProperties": false,
34
+ "properties": {
35
+ "uri_template": { "type": "string" },
36
+ "description": { "type": "string" },
37
+ "integrate_as": { "enum": ["ref_kind", "raw"] },
38
+ "ref_kind_id": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$" }
39
+ }
40
+ }
41
+ },
42
+ "connection_options": {
43
+ "type": "object",
44
+ "additionalProperties": false,
45
+ "properties": {
46
+ "timeout_ms": { "type": "integer", "minimum": 100 },
47
+ "max_retries": { "type": "integer", "minimum": 0, "maximum": 10 },
48
+ "keepalive": { "type": "boolean" }
49
+ }
50
+ },
51
+ "implements": {
52
+ "type": "array",
53
+ "items": {
54
+ "type": "object",
55
+ "required": ["tool", "version"],
56
+ "additionalProperties": true,
57
+ "properties": {
58
+ "metadata": {
59
+ "type": "object",
60
+ "properties": {
61
+ "mcp": { "$ref": "#/$defs/perToolMcp" }
62
+ }
63
+ }
64
+ }
65
+ }
66
+ }
67
+ },
68
+ "$defs": {
69
+ "server": {
70
+ "oneOf": [
71
+ { "type": "object", "required": ["kind", "path"], "properties": { "kind": { "const": "binary" }, "path": { "type": "string" }, "args": { "type": "array", "items": { "type": "string" } }, "env": { "type": "object", "additionalProperties": { "type": "string" } } } },
72
+ { "type": "object", "required": ["kind", "package"], "properties": { "kind": { "const": "npm" }, "package": { "type": "string" }, "args": { "type": "array", "items": { "type": "string" } }, "env": { "type": "object", "additionalProperties": { "type": "string" } } } },
73
+ { "type": "object", "required": ["kind", "image"], "properties": { "kind": { "const": "docker" }, "image": { "type": "string" }, "args": { "type": "array", "items": { "type": "string" } }, "env": { "type": "object", "additionalProperties": { "type": "string" } } } },
74
+ { "type": "object", "required": ["kind", "url"], "properties": { "kind": { "const": "remote" }, "url": { "type": "string", "format": "uri" } } }
75
+ ]
76
+ },
77
+ "perToolMcp": {
78
+ "type": "object",
79
+ "additionalProperties": false,
80
+ "required": ["tool_name"],
81
+ "properties": {
82
+ "tool_name": { "type": "string" },
83
+ "argument_mapping": { "type": "object", "additionalProperties": { "type": "string" } },
84
+ "result_extract": { "type": "string" }
85
+ }
86
+ }
87
+ }
88
+ }
@@ -0,0 +1,60 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agentproto.sh/docs/aip-33/SDK.schema.json",
4
+ "title": "SDK.md frontmatter — agentsdk/v1",
5
+ "description": "Validates the SDK-specific frontmatter of an AIP-33 DRIVER.md (kind: sdk). Universal PROVIDER fields validate via AIP-30's schema.",
6
+ "type": "object",
7
+ "additionalProperties": true,
8
+ "required": ["kind", "package", "package_manager"],
9
+ "properties": {
10
+ "kind": { "const": "sdk" },
11
+ "package": { "type": "string", "minLength": 1 },
12
+ "package_manager": { "enum": ["npm", "pnpm", "yarn", "pip", "poetry", "cargo", "go", "local"] },
13
+ "package_version": { "type": "string" },
14
+ "entrypoint": { "type": "string" },
15
+ "import_style": { "enum": ["esm", "cjs", "python", "rust-crate", "go-module"], "default": "esm" },
16
+ "streaming": {
17
+ "type": "object",
18
+ "additionalProperties": false,
19
+ "required": ["mode"],
20
+ "properties": {
21
+ "mode": { "enum": ["async-iterator", "callback"] }
22
+ }
23
+ },
24
+ "implements": {
25
+ "type": "array",
26
+ "items": {
27
+ "type": "object",
28
+ "required": ["tool", "version"],
29
+ "additionalProperties": true,
30
+ "properties": {
31
+ "metadata": {
32
+ "type": "object",
33
+ "properties": {
34
+ "sdk": { "$ref": "#/$defs/perToolSdk" }
35
+ }
36
+ }
37
+ }
38
+ }
39
+ }
40
+ },
41
+ "$defs": {
42
+ "perToolSdk": {
43
+ "type": "object",
44
+ "additionalProperties": false,
45
+ "required": ["function_ref"],
46
+ "properties": {
47
+ "function_ref": { "type": "string", "description": "Dotted ref - 'default', 'createImage', 'images.create', 'Client.images.create'" },
48
+ "args_template": { "type": "object" },
49
+ "result_extract": { "type": "string" },
50
+ "streaming": {
51
+ "type": "object",
52
+ "additionalProperties": false,
53
+ "properties": {
54
+ "mode": { "enum": ["async-iterator", "callback"] }
55
+ }
56
+ }
57
+ }
58
+ }
59
+ }
60
+ }