@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,297 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://agentproto.sh/schemas/aip-9/OPERATOR.schema.json",
|
|
4
|
+
"title": "OPERATOR.md frontmatter (AIP-9)",
|
|
5
|
+
"description": "Validates the YAML frontmatter portion of an AIP-9 OPERATOR.md manifest.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["name", "id", "persona_summary", "version", "profile"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"name": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"minLength": 1,
|
|
13
|
+
"maxLength": 80,
|
|
14
|
+
"description": "Human-readable display name."
|
|
15
|
+
},
|
|
16
|
+
"id": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"minLength": 2,
|
|
19
|
+
"maxLength": 64,
|
|
20
|
+
"pattern": "^[a-z][a-z0-9-]*[a-z0-9]$",
|
|
21
|
+
"description": "Machine identifier and dispatch slug. Lowercase, digits, dashes."
|
|
22
|
+
},
|
|
23
|
+
"persona_summary": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"minLength": 1,
|
|
26
|
+
"maxLength": 280,
|
|
27
|
+
"description": "One-sentence role description, written for a teammate to read at a glance."
|
|
28
|
+
},
|
|
29
|
+
"version": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+(?:[-+][a-zA-Z0-9.-]+)?$",
|
|
32
|
+
"description": "Spec version of THIS file. Bump on breaking change."
|
|
33
|
+
},
|
|
34
|
+
"entry": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"description": "Relative path to the implementation file (e.g. operator.ts)."
|
|
37
|
+
},
|
|
38
|
+
"profile": {
|
|
39
|
+
"type": "object",
|
|
40
|
+
"required": ["role", "voice", "boundaries"],
|
|
41
|
+
"additionalProperties": false,
|
|
42
|
+
"properties": {
|
|
43
|
+
"role": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"minLength": 1,
|
|
46
|
+
"maxLength": 1000,
|
|
47
|
+
"description": "Job title and primary responsibility."
|
|
48
|
+
},
|
|
49
|
+
"voice": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"minLength": 1,
|
|
52
|
+
"maxLength": 1000,
|
|
53
|
+
"description": "Tone, register, and pronoun stance."
|
|
54
|
+
},
|
|
55
|
+
"boundaries": {
|
|
56
|
+
"type": "array",
|
|
57
|
+
"minItems": 0,
|
|
58
|
+
"items": { "type": "string", "maxLength": 500 },
|
|
59
|
+
"description": "Imperative MUST-NOT rules. Surface in every system-prompt synthesis."
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"skills": {
|
|
64
|
+
"type": "array",
|
|
65
|
+
"items": { "$ref": "#/$defs/skillRef" },
|
|
66
|
+
"default": [],
|
|
67
|
+
"description": "AIP-3 skill references the operator loads."
|
|
68
|
+
},
|
|
69
|
+
"tools": {
|
|
70
|
+
"type": "array",
|
|
71
|
+
"items": { "$ref": "#/$defs/toolRef" },
|
|
72
|
+
"default": [],
|
|
73
|
+
"description": "AIP-14 tool refs and MCP server bindings the operator may invoke."
|
|
74
|
+
},
|
|
75
|
+
"memory": {
|
|
76
|
+
"type": "object",
|
|
77
|
+
"required": ["kind"],
|
|
78
|
+
"additionalProperties": false,
|
|
79
|
+
"properties": {
|
|
80
|
+
"kind": {
|
|
81
|
+
"enum": ["none", "thread", "operator-context", "external"],
|
|
82
|
+
"description": "Memory scope. Default 'thread' for stateless workflows; 'operator-context' for long-running roles."
|
|
83
|
+
},
|
|
84
|
+
"policy": {
|
|
85
|
+
"enum": ["append-only", "redactable", "summarising"],
|
|
86
|
+
"default": "summarising"
|
|
87
|
+
},
|
|
88
|
+
"share_with": {
|
|
89
|
+
"type": "array",
|
|
90
|
+
"items": { "type": "string", "pattern": "^[a-z][a-z0-9-]*[a-z0-9]$" },
|
|
91
|
+
"default": [],
|
|
92
|
+
"description": "Operator ids granted READ access to this operator's memory."
|
|
93
|
+
},
|
|
94
|
+
"external": {
|
|
95
|
+
"type": "object",
|
|
96
|
+
"required": ["uri"],
|
|
97
|
+
"additionalProperties": false,
|
|
98
|
+
"properties": {
|
|
99
|
+
"uri": { "type": "string" },
|
|
100
|
+
"namespace": { "type": "string" }
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"governance": {
|
|
106
|
+
"type": "object",
|
|
107
|
+
"required": ["audit_log", "autonomy"],
|
|
108
|
+
"additionalProperties": false,
|
|
109
|
+
"properties": {
|
|
110
|
+
"policies": {
|
|
111
|
+
"type": "array",
|
|
112
|
+
"items": { "type": "string", "pattern": "^policy:[A-Za-z0-9_./-]+$" },
|
|
113
|
+
"default": [],
|
|
114
|
+
"description": "AIP-7 policy refs the operator MUST consult before privileged actions."
|
|
115
|
+
},
|
|
116
|
+
"audit_log": {
|
|
117
|
+
"type": "string",
|
|
118
|
+
"pattern": "^audit:[A-Za-z0-9_./-]+$",
|
|
119
|
+
"description": "Audit channel for state transitions, tool calls, memory writes."
|
|
120
|
+
},
|
|
121
|
+
"autonomy": {
|
|
122
|
+
"enum": ["autonomous", "supervised", "gated"],
|
|
123
|
+
"description": "Per-turn autonomy class. Default 'supervised'."
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"capabilities": {
|
|
128
|
+
"type": "array",
|
|
129
|
+
"items": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$" },
|
|
130
|
+
"default": [],
|
|
131
|
+
"description": "Capability surface the operator declares. Negotiated against runtime offer at registration."
|
|
132
|
+
},
|
|
133
|
+
"participation": {
|
|
134
|
+
"type": "object",
|
|
135
|
+
"additionalProperties": false,
|
|
136
|
+
"properties": {
|
|
137
|
+
"mode": {
|
|
138
|
+
"enum": ["mention-only", "proactive", "silent"],
|
|
139
|
+
"default": "mention-only"
|
|
140
|
+
},
|
|
141
|
+
"pass_when": {
|
|
142
|
+
"type": "string",
|
|
143
|
+
"description": "Host-evaluated predicate; when true the operator emits a 'pass' instead of a full turn."
|
|
144
|
+
},
|
|
145
|
+
"reactions": { "type": "boolean", "default": false }
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
"runtime": {
|
|
149
|
+
"type": "object",
|
|
150
|
+
"required": ["kind"],
|
|
151
|
+
"additionalProperties": false,
|
|
152
|
+
"description": "Runtime binding. When kind=in-process (default), the operator runs in the host's in-process agent runtime. When kind=agent-cli, turns are dispatched to a spawned AIP-45 agent CLI subprocess (Hermes, Claude Code, OpenCode, ...).",
|
|
153
|
+
"properties": {
|
|
154
|
+
"kind": {
|
|
155
|
+
"enum": ["in-process", "agent-cli"],
|
|
156
|
+
"default": "in-process"
|
|
157
|
+
},
|
|
158
|
+
"ref": {
|
|
159
|
+
"type": "string",
|
|
160
|
+
"description": "AIP-45 AGENT-CLI reference. Required when kind=agent-cli. Conventional shape: '<package>#<export>' (e.g. '@agentproto/adapter-hermes#hermes') or a workspace-relative path to an AGENT-CLI.md."
|
|
161
|
+
},
|
|
162
|
+
"session": {
|
|
163
|
+
"type": "object",
|
|
164
|
+
"additionalProperties": false,
|
|
165
|
+
"properties": {
|
|
166
|
+
"mode": { "enum": ["ephemeral", "persistent", "resumable"] },
|
|
167
|
+
"idle_timeout_ms": { "type": "integer", "minimum": 1000 }
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"config": {
|
|
171
|
+
"type": "object",
|
|
172
|
+
"additionalProperties": false,
|
|
173
|
+
"description": "Per-runtime configuration that the host applies when spawning / dispatching to the bound AIP-45 manifest. The host MUST validate every entry against the manifest's declared `modes` / `options` / `continuation.supported`; unknown ids are a hard load-time error.",
|
|
174
|
+
"properties": {
|
|
175
|
+
"mode": {
|
|
176
|
+
"type": "string",
|
|
177
|
+
"description": "Id of the manifest-declared mode to activate for this operator. At most one per operator (modes are mutually exclusive). Omitted = manifest's default behaviour (no mode patch applied)."
|
|
178
|
+
},
|
|
179
|
+
"options": {
|
|
180
|
+
"type": "object",
|
|
181
|
+
"additionalProperties": true,
|
|
182
|
+
"description": "Map of manifest-declared option id → value. Each value MUST satisfy the option's declared type / enum / min / max. Unknown ids are rejected at load time."
|
|
183
|
+
},
|
|
184
|
+
"continuation": {
|
|
185
|
+
"type": "string",
|
|
186
|
+
"enum": ["none", "pinned-session", "transcript", "native-resume"],
|
|
187
|
+
"description": "Continuation strategy id. MUST be a member of the manifest's `continuation.supported`. Omitted = manifest's `continuation.default`."
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
"tags": {
|
|
194
|
+
"type": "array",
|
|
195
|
+
"items": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$" },
|
|
196
|
+
"default": []
|
|
197
|
+
},
|
|
198
|
+
"metadata": {
|
|
199
|
+
"type": "object",
|
|
200
|
+
"additionalProperties": true,
|
|
201
|
+
"default": {}
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
"allOf": [
|
|
205
|
+
{
|
|
206
|
+
"if": {
|
|
207
|
+
"properties": {
|
|
208
|
+
"governance": {
|
|
209
|
+
"properties": { "autonomy": { "const": "gated" } },
|
|
210
|
+
"required": ["autonomy"]
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
"required": ["governance"]
|
|
214
|
+
},
|
|
215
|
+
"then": {
|
|
216
|
+
"properties": {
|
|
217
|
+
"participation": {
|
|
218
|
+
"properties": { "mode": { "enum": ["mention-only", "silent"] } }
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"if": {
|
|
225
|
+
"type": "object",
|
|
226
|
+
"properties": {
|
|
227
|
+
"runtime": {
|
|
228
|
+
"type": "object",
|
|
229
|
+
"properties": { "kind": { "const": "agent-cli" } },
|
|
230
|
+
"required": ["kind"]
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
"required": ["runtime"]
|
|
234
|
+
},
|
|
235
|
+
"then": {
|
|
236
|
+
"type": "object",
|
|
237
|
+
"properties": {
|
|
238
|
+
"runtime": {
|
|
239
|
+
"type": "object",
|
|
240
|
+
"required": ["ref"]
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
],
|
|
246
|
+
"$defs": {
|
|
247
|
+
"skillRef": {
|
|
248
|
+
"anyOf": [
|
|
249
|
+
{ "type": "string", "pattern": "^[a-z][a-z0-9-]*[a-z0-9]$" },
|
|
250
|
+
{
|
|
251
|
+
"type": "object",
|
|
252
|
+
"required": ["id"],
|
|
253
|
+
"additionalProperties": false,
|
|
254
|
+
"properties": {
|
|
255
|
+
"id": { "type": "string", "pattern": "^[a-z][a-z0-9-]*[a-z0-9]$" },
|
|
256
|
+
"source": { "type": "string" },
|
|
257
|
+
"version": { "type": "string" },
|
|
258
|
+
"allow": { "type": "array", "items": { "type": "string" } }
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
]
|
|
262
|
+
},
|
|
263
|
+
"toolRef": {
|
|
264
|
+
"anyOf": [
|
|
265
|
+
{ "type": "string", "pattern": "^[a-z][a-z0-9-]*[a-z0-9]$" },
|
|
266
|
+
{
|
|
267
|
+
"type": "object",
|
|
268
|
+
"required": ["id"],
|
|
269
|
+
"additionalProperties": false,
|
|
270
|
+
"properties": {
|
|
271
|
+
"id": { "type": "string" },
|
|
272
|
+
"source": { "type": "string" },
|
|
273
|
+
"scope": {
|
|
274
|
+
"type": "object",
|
|
275
|
+
"additionalProperties": false,
|
|
276
|
+
"properties": {
|
|
277
|
+
"workspace": { "type": "string" },
|
|
278
|
+
"network": { "type": "array", "items": { "type": "string" } },
|
|
279
|
+
"secrets": { "type": "array", "items": { "type": "string" } }
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
"type": "object",
|
|
286
|
+
"required": ["kind", "server"],
|
|
287
|
+
"additionalProperties": false,
|
|
288
|
+
"properties": {
|
|
289
|
+
"kind": { "const": "mcp" },
|
|
290
|
+
"server": { "type": "string" },
|
|
291
|
+
"allow": { "type": "array", "items": { "type": "string" } }
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
]
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentproto/corpus-cli",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.2",
|
|
4
4
|
"description": "@agentproto/corpus-cli — the `corpus` binary. Validate, lint, and operate an AIP-10 corpus workspace from the command line. Local-topology host for @agentproto/corpus — pair with a local backing engine (qdrant docker / gbrain) for a fully offline corpus runtime.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agentproto",
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
"gray-matter": "^4.0.3",
|
|
53
53
|
"zod": "^4.4.3",
|
|
54
54
|
"@agentproto/cli-exec": "0.1.0-alpha.1",
|
|
55
|
-
"@agentproto/corpus
|
|
56
|
-
"@agentproto/corpus": "0.1.0-alpha.1"
|
|
55
|
+
"@agentproto/corpus": "0.1.0-alpha.1",
|
|
56
|
+
"@agentproto/corpus-presets": "0.1.0-alpha.1"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@types/node": "^25.6.2",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
},
|
|
68
68
|
"scripts": {
|
|
69
69
|
"dev": "tsup --watch",
|
|
70
|
-
"build": "tsup",
|
|
70
|
+
"build": "tsup && node scripts/bundle-specs.mjs",
|
|
71
71
|
"clean": "rm -rf dist",
|
|
72
72
|
"check-types": "tsc --noEmit",
|
|
73
73
|
"test": "vitest run --passWithNoTests",
|