@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,172 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agentproto.sh/schemas/aip-26/CODE.schema.json",
4
+ "title": "CODE blocks (AIP-26)",
5
+ "description": "Composable JSON Schema definitions for the `code` and `run` blocks reused across manifest formats. Other AIPs reference these by $ref into their own schemas.",
6
+ "type": "object",
7
+ "$defs": {
8
+ "code": {
9
+ "description": "Bundle composition. String shorthand desugars to `{ sources: [{ ref: <string> }] }`. Object form lists explicit sources merged via overlay (last wins on path collision).",
10
+ "oneOf": [
11
+ {
12
+ "description": "String shorthand — workspace-relative path to a code-workspace.",
13
+ "type": "string",
14
+ "pattern": "^[^/].*"
15
+ },
16
+ {
17
+ "description": "Object form — explicit sources list.",
18
+ "type": "object",
19
+ "required": ["sources"],
20
+ "additionalProperties": false,
21
+ "properties": {
22
+ "sources": {
23
+ "type": "array",
24
+ "minItems": 1,
25
+ "items": { "$ref": "#/$defs/source" }
26
+ }
27
+ }
28
+ }
29
+ ]
30
+ },
31
+ "source": {
32
+ "description": "One source contributing files to the bundle. Discriminator is the single populated key: inline | local | github | ref.",
33
+ "type": "object",
34
+ "oneOf": [
35
+ {
36
+ "required": ["inline"],
37
+ "properties": { "inline": { "$ref": "#/$defs/sourceInline" } }
38
+ },
39
+ {
40
+ "required": ["local"],
41
+ "properties": { "local": { "$ref": "#/$defs/sourceLocal" } }
42
+ },
43
+ {
44
+ "required": ["github"],
45
+ "properties": { "github": { "$ref": "#/$defs/sourceGithub" } }
46
+ },
47
+ {
48
+ "required": ["ref"],
49
+ "properties": { "ref": { "$ref": "#/$defs/sourceRef" } }
50
+ }
51
+ ]
52
+ },
53
+ "sourceInline": {
54
+ "description": "Embedded content. `path` is bundle-internal target; `content` is UTF-8 file body.",
55
+ "type": "object",
56
+ "required": ["path", "content"],
57
+ "additionalProperties": false,
58
+ "properties": {
59
+ "path": { "type": "string", "minLength": 1 },
60
+ "content": { "type": "string" }
61
+ }
62
+ },
63
+ "sourceLocal": {
64
+ "description": "Workspace file/directory. String shorthand desugars to `{ path: <string> }`.",
65
+ "oneOf": [
66
+ { "type": "string", "minLength": 1 },
67
+ {
68
+ "type": "object",
69
+ "required": ["path"],
70
+ "additionalProperties": false,
71
+ "properties": {
72
+ "path": { "type": "string", "minLength": 1 },
73
+ "as": { "type": "string", "minLength": 1 },
74
+ "glob": { "type": "string" }
75
+ }
76
+ }
77
+ ]
78
+ },
79
+ "sourceGithub": {
80
+ "description": "Remote git source pulled at materialization time. Cached by `(repo, ref, path)`. SHA refs cached forever; tags cached 24h; branches refetched per scan.",
81
+ "type": "object",
82
+ "required": ["repo", "ref"],
83
+ "additionalProperties": false,
84
+ "properties": {
85
+ "repo": {
86
+ "type": "string",
87
+ "pattern": "^[^/]+/[^/]+$",
88
+ "description": "<owner>/<name>"
89
+ },
90
+ "ref": {
91
+ "type": "string",
92
+ "minLength": 1,
93
+ "description": "SHA (40 hex), tag (vN.N.N), or branch."
94
+ },
95
+ "path": {
96
+ "type": "string",
97
+ "description": "Sub-folder within the repo. Default = repo root."
98
+ },
99
+ "as": {
100
+ "type": "string",
101
+ "description": "Bundle-internal target. Default = same as path."
102
+ }
103
+ }
104
+ },
105
+ "sourceRef": {
106
+ "description": "Reference to another code-workspace. Recursively resolved; cycles forbidden. String shorthand desugars to `{ path: <string> }`.",
107
+ "oneOf": [
108
+ { "type": "string", "minLength": 1 },
109
+ {
110
+ "type": "object",
111
+ "required": ["path"],
112
+ "additionalProperties": false,
113
+ "properties": {
114
+ "path": { "type": "string", "minLength": 1 }
115
+ }
116
+ }
117
+ ]
118
+ },
119
+ "run": {
120
+ "description": "What the runner invokes. String path = file (runner inferred from extension). String with shell metacharacters = bash -c. Array = exec ARGV. Object = explicit form.",
121
+ "oneOf": [
122
+ {
123
+ "description": "String form — single file path or shell command.",
124
+ "type": "string",
125
+ "minLength": 1
126
+ },
127
+ {
128
+ "description": "Array form — exec ARGV passed to execve(2).",
129
+ "type": "array",
130
+ "minItems": 1,
131
+ "items": { "type": "string" }
132
+ },
133
+ {
134
+ "description": "Explicit object form — disambiguates path/exec/shell.",
135
+ "type": "object",
136
+ "oneOf": [
137
+ {
138
+ "required": ["file"],
139
+ "properties": { "file": { "type": "string", "minLength": 1 } }
140
+ },
141
+ {
142
+ "required": ["exec"],
143
+ "properties": {
144
+ "exec": {
145
+ "type": "array",
146
+ "items": { "type": "string" },
147
+ "minItems": 1
148
+ }
149
+ }
150
+ },
151
+ {
152
+ "required": ["shell"],
153
+ "properties": { "shell": { "type": "string", "minLength": 1 } }
154
+ }
155
+ ]
156
+ }
157
+ ]
158
+ },
159
+ "codeWorkspaceManifest": {
160
+ "description": "kind: code-workspace — first-class shared bundle referenced by tools/workflows.",
161
+ "type": "object",
162
+ "required": ["kind", "name", "code"],
163
+ "properties": {
164
+ "kind": { "const": "code-workspace" },
165
+ "name": { "type": "string", "minLength": 1 },
166
+ "description": { "type": "string" },
167
+ "code": { "$ref": "#/$defs/code" },
168
+ "run": { "$ref": "#/$defs/run" }
169
+ }
170
+ }
171
+ }
172
+ }
@@ -0,0 +1,215 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agentproto.sh/docs/aip-28/INTENT.schema.json",
4
+ "title": "INTENT.md frontmatter — agentintent/v1",
5
+ "description": "JSON Schema for the YAML frontmatter of an AIP-28 INTENT.md manifest.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["name", "id", "label", "description", "version", "intent", "surfaces", "implements"],
9
+ "properties": {
10
+ "name": { "$ref": "#/$defs/i18nString", "description": "Internal display name." },
11
+ "id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9.\\-]{1,79}$" },
12
+ "label": { "$ref": "#/$defs/i18nString", "description": "User-facing button/menu label." },
13
+ "description": { "$ref": "#/$defs/i18nString", "description": "User-facing copy (≤500 chars per locale)." },
14
+ "version": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+(?:[-+][\\w.\\-]+)?$" },
15
+ "intent": {
16
+ "description": "Natural-language seeds an LLM matches against.",
17
+ "oneOf": [
18
+ { "type": "array", "items": { "type": "string" }, "minItems": 1 },
19
+ { "type": "object", "additionalProperties": { "type": "array", "items": { "type": "string" }, "minItems": 1 } }
20
+ ]
21
+ },
22
+ "surfaces": {
23
+ "type": "array",
24
+ "items": { "type": "string", "enum": ["chat", "menu", "voice", "shortcut", "api"] },
25
+ "uniqueItems": true,
26
+ "minItems": 0
27
+ },
28
+ "inputs": {
29
+ "type": "array",
30
+ "items": { "$ref": "#/$defs/inputField" }
31
+ },
32
+ "outputs": { "$ref": "#/$defs/outputs" },
33
+ "entry": {
34
+ "type": "string",
35
+ "description": "Workspace-relative path to a routing implementation."
36
+ },
37
+ "implements": {
38
+ "type": "array",
39
+ "minItems": 1,
40
+ "items": { "$ref": "#/$defs/implementsEntry" }
41
+ },
42
+ "cost_class": { "type": "string", "enum": ["trivial", "metered", "expensive"] },
43
+ "quota_key": { "type": "string", "pattern": "^[a-z0-9][a-z0-9.\\-]{1,127}$" },
44
+ "requires": { "$ref": "#/$defs/capabilities" },
45
+ "auth": {
46
+ "type": "string",
47
+ "description": "Workspace-relative path to a SECRETS.md (AIP-19)."
48
+ },
49
+ "experiments": {
50
+ "type": "array",
51
+ "items": { "$ref": "#/$defs/experimentArm" }
52
+ },
53
+ "scope": {
54
+ "description": "Publication tier. Aligns with Model Access Rules v2 scope chain. Default `app`. `platform` is reserved for host-runtime defaults and MUST NOT appear in authored manifests.",
55
+ "type": "string",
56
+ "enum": ["app", "tier", "user", "guild", "workspace", "operator"]
57
+ },
58
+ "disable": {
59
+ "description": "Intent id of a less-specific-tier intent that this manifest hides. Used when a higher-tier scope wants to remove a lower-tier intent without re-implementing it.",
60
+ "type": "string",
61
+ "pattern": "^[a-z0-9][a-z0-9.\\-]{1,79}$"
62
+ },
63
+ "preview": { "type": "string" },
64
+ "tags": {
65
+ "type": "array",
66
+ "items": { "type": "string", "pattern": "^[a-z0-9][a-z0-9\\-]{0,63}$" },
67
+ "uniqueItems": true
68
+ },
69
+ "examples": {
70
+ "type": "array",
71
+ "items": {
72
+ "type": "object",
73
+ "additionalProperties": false,
74
+ "required": ["user"],
75
+ "properties": {
76
+ "user": { "$ref": "#/$defs/i18nString" },
77
+ "note": { "$ref": "#/$defs/i18nString" }
78
+ }
79
+ }
80
+ },
81
+ "metadata": { "type": "object" }
82
+ },
83
+ "$defs": {
84
+ "i18nString": {
85
+ "description": "Either a plain string (treated as locale `en`) or a per-locale map keyed by BCP-47.",
86
+ "oneOf": [
87
+ { "type": "string" },
88
+ { "type": "object", "additionalProperties": { "type": "string" }, "propertyNames": { "pattern": "^[a-z]{2}(?:-[A-Z]{2})?$" } }
89
+ ]
90
+ },
91
+ "inputField": {
92
+ "type": "object",
93
+ "additionalProperties": false,
94
+ "required": ["name", "label", "type"],
95
+ "properties": {
96
+ "name": { "type": "string", "pattern": "^[a-zA-Z_][a-zA-Z0-9_]*$" },
97
+ "label": { "$ref": "#/$defs/i18nString" },
98
+ "type": { "type": "string", "enum": ["text", "textarea", "number", "toggle", "choice", "multi-choice", "file", "image", "date", "markdown", "code", "ref"] },
99
+ "placeholder": { "$ref": "#/$defs/i18nString" },
100
+ "hint": { "$ref": "#/$defs/i18nString" },
101
+ "required": { "type": "boolean" },
102
+ "default": {},
103
+ "min": { "type": "number" },
104
+ "max": { "type": "number" },
105
+ "min_length": { "type": "integer", "minimum": 0 },
106
+ "max_length": { "type": "integer", "minimum": 0 },
107
+ "pattern": { "type": "string" },
108
+ "values": {
109
+ "description": "For choice / multi-choice. Either a list of strings or a list of {value,label} objects.",
110
+ "oneOf": [
111
+ { "type": "array", "items": { "type": "string" } },
112
+ {
113
+ "type": "array",
114
+ "items": {
115
+ "type": "object",
116
+ "additionalProperties": false,
117
+ "required": ["value", "label"],
118
+ "properties": {
119
+ "value": {},
120
+ "label": { "$ref": "#/$defs/i18nString" }
121
+ }
122
+ }
123
+ }
124
+ ]
125
+ },
126
+ "accept": { "type": "array", "items": { "type": "string" } },
127
+ "language": { "type": "string" },
128
+ "depends_on": {
129
+ "type": "object",
130
+ "additionalProperties": { "$ref": "#/$defs/predicateValue" }
131
+ }
132
+ }
133
+ },
134
+ "outputs": {
135
+ "type": "object",
136
+ "additionalProperties": false,
137
+ "required": ["type"],
138
+ "properties": {
139
+ "type": { "type": "string", "enum": ["text", "image", "markdown", "file", "custom"] },
140
+ "template": { "type": "string" }
141
+ }
142
+ },
143
+ "implementsEntry": {
144
+ "type": "object",
145
+ "additionalProperties": false,
146
+ "properties": {
147
+ "tool": { "type": "string" },
148
+ "workflow": { "type": "string" },
149
+ "entry": { "type": "string" },
150
+ "default": { "type": "boolean" },
151
+ "when": { "type": "object", "additionalProperties": { "$ref": "#/$defs/predicateValue" } },
152
+ "mapping": { "type": "object", "additionalProperties": { "$ref": "#/$defs/mappingValue" } }
153
+ },
154
+ "oneOf": [
155
+ { "required": ["tool"] },
156
+ { "required": ["workflow"] },
157
+ { "required": ["entry"] }
158
+ ]
159
+ },
160
+ "predicateValue": {
161
+ "description": "Value shape for `when` and `depends_on`. Literal value, or comparison object.",
162
+ "oneOf": [
163
+ {},
164
+ {
165
+ "type": "object",
166
+ "additionalProperties": false,
167
+ "properties": {
168
+ "not": {},
169
+ "in": { "type": "array" },
170
+ "not_in": { "type": "array" },
171
+ "not_empty": { "type": "boolean" },
172
+ "gt": { "type": "number" },
173
+ "lt": { "type": "number" },
174
+ "gte": { "type": "number" },
175
+ "lte": { "type": "number" }
176
+ }
177
+ }
178
+ ]
179
+ },
180
+ "mappingValue": {
181
+ "oneOf": [
182
+ { "type": "string", "description": "Identity / rename: intent input → tool input key." },
183
+ {
184
+ "type": "object",
185
+ "additionalProperties": false,
186
+ "required": ["from"],
187
+ "properties": {
188
+ "from": { "type": "string" },
189
+ "transform": { "type": "string", "description": "Named transformer exported by the entry." }
190
+ }
191
+ }
192
+ ]
193
+ },
194
+ "capabilities": {
195
+ "type": "object",
196
+ "additionalProperties": false,
197
+ "properties": {
198
+ "network": { "type": "array", "items": { "type": "string" } },
199
+ "secrets": { "type": "array", "items": { "type": "string" } },
200
+ "tools": { "type": "array", "items": { "type": "string" } }
201
+ }
202
+ },
203
+ "experimentArm": {
204
+ "type": "object",
205
+ "additionalProperties": false,
206
+ "required": ["id", "weight", "implements"],
207
+ "properties": {
208
+ "id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9.\\-]{1,63}$" },
209
+ "weight": { "type": "number", "minimum": 0, "maximum": 1 },
210
+ "when": { "type": "object", "additionalProperties": { "$ref": "#/$defs/predicateValue" } },
211
+ "implements": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/implementsEntry" } }
212
+ }
213
+ }
214
+ }
215
+ }