@agentproto/corpus-cli 0.11.3 → 0.11.4

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.
@@ -343,52 +343,21 @@
343
343
  "name"
344
344
  ],
345
345
  "additionalProperties": false,
346
- "oneOf": [
347
- {
348
- "required": [
349
- "entry"
350
- ],
351
- "not": {
352
- "anyOf": [
353
- {
354
- "required": [
355
- "command"
356
- ]
357
- },
358
- {
359
- "required": [
360
- "args"
361
- ]
362
- }
363
- ]
364
- }
365
- },
366
- {
367
- "required": [
368
- "command"
369
- ],
370
- "not": {
371
- "required": [
372
- "entry"
373
- ]
374
- }
375
- }
376
- ],
377
346
  "properties": {
378
347
  "name": {
379
348
  "type": "string",
380
349
  "pattern": "^[a-z][a-z0-9-]*$",
381
- "description": "Service identifier — kebab-case slug, unique across the array."
350
+ "description": "Service identifier: kebab-case slug, unique across the array (JSON Schema cannot express per-key uniqueness; `uniqueItems` only guards exact duplicates, a loader MUST also reject two entries that share a `name`)."
382
351
  },
383
352
  "entry": {
384
353
  "type": "string",
385
- "minLength": 1,
386
- "description": "Legacy shell command line that starts the service (e.g. `pnpm --filter x start`, `node dist/server.js`). Carried verbatim; the loader/`defineApp` never executes it. Exactly one of entry/command."
354
+ "pattern": "\\S",
355
+ "description": "Legacy form: a shell command line that starts the service (e.g. `pnpm --filter x start`, `node dist/server.js`), run by the host under `sh -c`. Exactly one of `entry` / `command` is required. Carried verbatim; the loader and `defineApp` never execute it."
387
356
  },
388
357
  "command": {
389
358
  "type": "string",
390
- "minLength": 1,
391
- "description": "Structured (preferred) command form: the binary/script to run, never shell-interpreted — the runner passes it as argv[0]. Exactly one of entry/command."
359
+ "pattern": "\\S",
360
+ "description": "Structured form (preferred): the binary or script to run, passed as `argv[0]` with no shell interpretation. Exactly one of `entry` / `command` is required."
392
361
  },
393
362
  "args": {
394
363
  "type": "array",
@@ -396,22 +365,41 @@
396
365
  "items": {
397
366
  "type": "string"
398
367
  },
399
- "description": "Structured command form: argv after `command`, passed verbatim. Requires `command`."
368
+ "description": "Structured form only: the argv after `command`, passed verbatim. Not valid alongside `entry`."
400
369
  },
401
370
  "cwd": {
402
371
  "type": "string",
403
- "minLength": 1,
404
- "description": "Working directory the runner starts the service in; relative paths resolve against the app's installed dir."
372
+ "pattern": "^(?!/)(?!(?:.*/)?\\.\\.(?:/|$)).*\\S",
373
+ "description": "Working directory, relative to the installed app directory (default: the app directory itself). Stricter than the reference implementation, which also resolves absolute paths and `..` segments: this schema forbids both so a service cannot start outside its app."
405
374
  },
406
375
  "port": {
407
376
  "type": "integer",
408
377
  "minimum": 1,
409
378
  "maximum": 65535,
410
- "description": "Optional TCP port the service listens on. Omitted = a service that does not listen. One process per entry, one port."
379
+ "description": "Optional TCP port the service listens on. Omitted = a service that does not listen. Bookkeeping only: the host records it and does not inject it into the service's environment."
411
380
  }
412
- }
381
+ },
382
+ "oneOf": [
383
+ {
384
+ "required": [
385
+ "entry"
386
+ ],
387
+ "properties": {
388
+ "command": false,
389
+ "args": false
390
+ }
391
+ },
392
+ {
393
+ "required": [
394
+ "command"
395
+ ],
396
+ "properties": {
397
+ "entry": false
398
+ }
399
+ }
400
+ ]
413
401
  },
414
- "description": "Production hosting surface: one supervised service process per entry — NO dependency graph, NO scaling, NO scheduler. The host (NOT app-kit) spawns exactly one keep-alive service-owner session per entry at install time (later work item) that runs `entry`; `dev.launch` is NOT executed by the loader and is not this surface. Names MUST be unique. See the pending SERVICES schema draft (pending upstream spec PR)."
402
+ "description": "Production hosting surface: long-running processes the host starts with the app, one process per entry. No dependency graph, no scaling, no scheduler. Not `dev.launch`, which stays dev-only and is never executed. See AIP-53 § Services."
415
403
  },
416
404
  "setup": {
417
405
  "type": "array",
@@ -10,7 +10,8 @@
10
10
  "ws://wikis/platform/http-server",
11
11
  "ws://workspaces/@acme/agentik-studio",
12
12
  "ws://roles/seo-specialist",
13
- "ws://companies/acme-co/teams/growth"
13
+ "ws://companies/acme-co/teams/growth",
14
+ "ws://tools/agentproto/session_list"
14
15
  ],
15
16
  "x-collection-enum": [
16
17
  "operators",
@@ -2,24 +2,35 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://agentproto.sh/schemas/aip-6/COMPANY.schema.json",
4
4
  "title": "company/v1 doctype frontmatter (AIP-6)",
5
- "description": "Validates the YAML frontmatter portion of any company/v1 doctype file. The `doctype` field discriminates between company / role / objective; each branch enforces the doctype-specific shape. Operator doctype is sketched here but the normative definition lives in AIP-8 — only company / role / objective are normative under AIP-6.",
5
+ "description": "Validates the YAML frontmatter portion of a company/v1 doctype file. The discriminator is `doctype`, or its alias `kind`; the identifier is `id`, or its alias `slug`. Both aliases are accepted permanently (AIP-6 sets no removal date for them). Three doctypes are defined here: company, objective, and the legacy agent marker. A ROLE.md is an AIP-47 role/v1 document, an OPERATOR.md is AIP-9, an AGENT.md is AIP-42, and seats and reporting lines live in the AIP-22 office: none of these is validated by this schema.",
6
6
  "type": "object",
7
- "required": ["schema", "doctype", "id"],
7
+ "required": ["schema"],
8
8
  "properties": {
9
9
  "schema": {
10
10
  "enum": ["company/v1", "agentcompanies/v1"],
11
- "description": "Format identifier. MUST be the canonical string `company/v1`. `agentcompanies/v1` is accepted as a legacy alias (AIP-70)."
11
+ "description": "Format identifier. Writers MUST emit the canonical string `company/v1`. `agentcompanies/v1` is accepted as a legacy alias (AIP-70)."
12
12
  },
13
13
  "doctype": {
14
- "enum": ["company", "role", "objective"],
15
- "description": "Discriminator. Selects the doctype-specific branch under `oneOf`."
14
+ "enum": ["company", "objective", "agent"],
15
+ "description": "Canonical discriminator. Selects the doctype-specific branch under `oneOf`. `agent` is the legacy AIP-6 agent slot marker (see AIP-42 Backward compatibility); the shape of an agent file is AIP-42's, not this schema's. A file MUST carry `doctype` or its alias `kind`."
16
+ },
17
+ "kind": {
18
+ "enum": ["company", "objective", "agent"],
19
+ "description": "Alias of `doctype`, accepted permanently with no removal date. When a file carries both, they MUST name the same doctype."
16
20
  },
17
21
  "id": {
18
22
  "type": "string",
19
23
  "minLength": 2,
20
24
  "maxLength": 64,
21
25
  "pattern": "^[a-z][a-z0-9-]*[a-z0-9]$",
22
- "description": "Slug identifier. Lowercase, digits, dashes. Stable across renames; references use this, never database IDs."
26
+ "description": "Canonical slug identifier. Lowercase, digits, dashes. Stable across renames; references use this, never database IDs. A file MUST carry `id` or its alias `slug`."
27
+ },
28
+ "slug": {
29
+ "type": "string",
30
+ "minLength": 2,
31
+ "maxLength": 64,
32
+ "pattern": "^[a-z][a-z0-9-]*[a-z0-9]$",
33
+ "description": "Alias of `id`, accepted permanently with no removal date. When a file carries both, they MUST be equal; a JSON Schema cannot compare two values, so a host reports `alias_conflict` itself (ADAPTER.md)."
23
34
  },
24
35
  "version": {
25
36
  "type": "string",
@@ -32,11 +43,7 @@
32
43
  "maxLength": 200,
33
44
  "description": "Human-readable display name."
34
45
  },
35
- "description": {
36
- "type": "string",
37
- "maxLength": 2000,
38
- "description": "One-paragraph purpose."
39
- },
46
+ "description": { "type": "string", "maxLength": 2000, "description": "One-paragraph purpose." },
40
47
  "tags": {
41
48
  "type": "array",
42
49
  "items": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$" },
@@ -49,17 +56,16 @@
49
56
  "description": "Vendor-specific extensions. Authors stash hints under namespaced keys `metadata.<vendor>.…`; other readers MUST tolerate unknown keys."
50
57
  }
51
58
  },
52
- "oneOf": [
53
- { "$ref": "#/$defs/company" },
54
- { "$ref": "#/$defs/role" },
55
- { "$ref": "#/$defs/objective" }
56
- ],
59
+ "oneOf": [{ "$ref": "#/$defs/company" }, { "$ref": "#/$defs/objective" }, { "$ref": "#/$defs/agent" }],
57
60
  "$defs": {
58
61
  "company": {
59
62
  "type": "object",
60
- "required": ["doctype", "name", "mission"],
63
+ "anyOf": [
64
+ { "required": ["doctype"], "properties": { "doctype": { "const": "company" } } },
65
+ { "required": ["kind"], "properties": { "kind": { "const": "company" } } }
66
+ ],
67
+ "required": ["name", "mission"],
61
68
  "properties": {
62
- "doctype": { "const": "company" },
63
69
  "mission": {
64
70
  "type": "string",
65
71
  "minLength": 1,
@@ -78,40 +84,30 @@
78
84
  "properties": {
79
85
  "positions": {
80
86
  "type": "array",
81
- "items": {
82
- "type": "string",
83
- "pattern": "^[a-z][a-z0-9-]*[a-z0-9]$"
84
- },
87
+ "items": { "type": "string", "pattern": "^[a-z][a-z0-9-]*[a-z0-9]$" },
85
88
  "default": [],
86
- "description": "Slugs of the company's seats — each typically materialized as an operator under `operators/<slug>/OPERATOR.md`. A position is a seat one operator holds; several positions may share one AIP-47 catalog role. See AIP-47 §Role vs Position vs Access role."
89
+ "description": "DEPRECATED: seats live in the AIP-22 office (AIP-22 An office spans a company tree). Slugs of the company's seats. Readers MUST keep accepting it, with no removal date; when the company has an office, the office is authoritative and this list is only a seed. A position is a seat one operator holds; several positions may share one AIP-47 catalog role.",
90
+ "deprecated": true
87
91
  },
88
92
  "roles": {
89
93
  "type": "array",
90
- "items": {
91
- "type": "string",
92
- "pattern": "^[a-z][a-z0-9-]*[a-z0-9]$"
93
- },
94
+ "items": { "type": "string", "pattern": "^[a-z][a-z0-9-]*[a-z0-9]$" },
94
95
  "default": [],
95
96
  "deprecated": true,
96
- "description": "DEPRECATED alias of `positions`. Readers MUST accept both; when both are present, `positions` wins. Historically documented as role slugs but used in practice for seats."
97
+ "description": "DEPRECATED alias of `positions`, itself deprecated toward the AIP-22 office. Readers MUST accept it, with no removal date; when both are present, `positions` wins. Historically documented as role slugs but used in practice for seats."
97
98
  },
98
99
  "objectives": {
99
100
  "type": "array",
100
- "items": {
101
- "type": "string",
102
- "pattern": "^[a-z][a-z0-9-]*[a-z0-9]$"
103
- },
101
+ "items": { "type": "string", "pattern": "^[a-z][a-z0-9-]*[a-z0-9]$" },
104
102
  "default": [],
105
103
  "description": "Slugs of top-level objectives defined under `objectives/<slug>/OBJECTIVE.md`."
106
104
  },
107
105
  "reports_to": {
108
106
  "type": "object",
109
- "additionalProperties": {
110
- "type": "string",
111
- "pattern": "^[a-z][a-z0-9-]*[a-z0-9]$"
112
- },
107
+ "additionalProperties": { "type": "string", "pattern": "^[a-z][a-z0-9-]*[a-z0-9]$" },
113
108
  "default": {},
114
- "description": "Map of position-slug → position-slug expressing the reporting tree. The key reports to the value. Positions not in the map are top-level."
109
+ "description": "DEPRECATED: reporting lines live in the AIP-22 office (a seat's `reportsTo`). Map of position-slug to position-slug; the key reports to the value. Readers MUST keep accepting it, with no removal date; the office wins when both exist.",
110
+ "deprecated": true
115
111
  }
116
112
  }
117
113
  },
@@ -119,69 +115,18 @@
119
115
  "type": "array",
120
116
  "default": [],
121
117
  "items": { "$ref": "#/$defs/import" },
122
- "description": "External roles or objectives pulled from a registry. Resolved by the adapter at load time."
123
- }
124
- }
125
- },
126
- "role": {
127
- "type": "object",
128
- "required": ["doctype", "name", "mandate"],
129
- "properties": {
130
- "doctype": { "const": "role" },
131
- "mandate": {
132
- "type": "string",
133
- "minLength": 1,
134
- "maxLength": 2000,
135
- "description": "One-paragraph statement of what this role is responsible for. Defines the role's bounded autonomy."
136
- },
137
- "reports_to": {
138
- "type": "string",
139
- "pattern": "^[a-z][a-z0-9-]*[a-z0-9]$",
140
- "description": "Slug of the parent role. Omit for top-level roles."
141
- },
142
- "scope": {
143
- "type": "object",
144
- "additionalProperties": false,
145
- "properties": {
146
- "owns": {
147
- "type": "array",
148
- "items": { "type": "string", "maxLength": 200 },
149
- "default": [],
150
- "description": "Free-text list of resource classes this role owns (e.g. `outbound-email`, `q3-pipeline`)."
151
- },
152
- "capabilities": {
153
- "type": "array",
154
- "items": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$" },
155
- "default": [],
156
- "description": "Capability slugs the role grants — referenced by AIP-7 governance and AIP-8 operators."
157
- }
158
- }
159
- },
160
- "objectives": {
161
- "type": "array",
162
- "items": { "type": "string", "pattern": "^[a-z][a-z0-9-]*[a-z0-9]$" },
163
- "default": [],
164
- "description": "Slugs of objectives this role pursues. Each MUST resolve to an `objectives/<slug>/OBJECTIVE.md`."
165
- },
166
- "tools": {
167
- "type": "array",
168
- "items": { "type": "string", "pattern": "^[a-z][a-z0-9-]*[a-z0-9]$" },
169
- "default": [],
170
- "description": "Slugs of AIP-14 tools the role may call. Adapter resolves against the host's tool catalog."
171
- },
172
- "workflows": {
173
- "type": "array",
174
- "items": { "type": "string", "pattern": "^[a-z][a-z0-9-]*[a-z0-9]$" },
175
- "default": [],
176
- "description": "Slugs of AIP-15 workflows the role may execute."
118
+ "description": "External roles or objectives pulled from a registry. Resolved by the adapter at load time. An imported role is materialised as an AIP-47 `role/v1` document."
177
119
  }
178
120
  }
179
121
  },
180
122
  "objective": {
181
123
  "type": "object",
182
- "required": ["doctype", "name", "statement"],
124
+ "anyOf": [
125
+ { "required": ["doctype"], "properties": { "doctype": { "const": "objective" } } },
126
+ { "required": ["kind"], "properties": { "kind": { "const": "objective" } } }
127
+ ],
128
+ "required": ["name", "statement"],
183
129
  "properties": {
184
- "doctype": { "const": "objective" },
185
130
  "statement": {
186
131
  "type": "string",
187
132
  "minLength": 1,
@@ -191,17 +136,14 @@
191
136
  "owner": {
192
137
  "type": "string",
193
138
  "pattern": "^[a-z][a-z0-9-]*[a-z0-9]$",
194
- "description": "Slug of the role accountable for this objective."
139
+ "description": "Slug of the position (an AIP-22 office seat) or of the AIP-47 role accountable for this objective."
195
140
  },
196
141
  "horizon": {
197
142
  "enum": ["sprint", "quarter", "year", "ongoing"],
198
143
  "default": "quarter",
199
144
  "description": "Time horizon. Adapter MAY use this to surface stale objectives."
200
145
  },
201
- "status": {
202
- "enum": ["proposed", "active", "paused", "achieved", "abandoned"],
203
- "default": "active"
204
- },
146
+ "status": { "enum": ["proposed", "active", "paused", "achieved", "abandoned"], "default": "active" },
205
147
  "key_results": {
206
148
  "type": "array",
207
149
  "default": [],
@@ -210,10 +152,7 @@
210
152
  "required": ["id", "statement"],
211
153
  "additionalProperties": false,
212
154
  "properties": {
213
- "id": {
214
- "type": "string",
215
- "pattern": "^[a-z][a-z0-9-]*[a-z0-9]$"
216
- },
155
+ "id": { "type": "string", "pattern": "^[a-z][a-z0-9-]*[a-z0-9]$" },
217
156
  "statement": { "type": "string", "maxLength": 500 },
218
157
  "target": { "type": "string", "maxLength": 200 },
219
158
  "progress": { "type": "number", "minimum": 0, "maximum": 1 }
@@ -239,6 +178,14 @@
239
178
  }
240
179
  }
241
180
  },
181
+ "agent": {
182
+ "type": "object",
183
+ "anyOf": [
184
+ { "required": ["doctype"], "properties": { "doctype": { "const": "agent" } } },
185
+ { "required": ["kind"], "properties": { "kind": { "const": "agent" } } }
186
+ ],
187
+ "description": "Legacy AIP-6 agent slot (`agents/<id>/AGENT.md` with `schema: company/v1` and `kind: agent`). Only the marker is checked here: the field set of an agent is AIP-42's, and hosts read the file as an AGENT.md (`slug` is its `id`). AIP-42 sets no removal date for this form."
188
+ },
242
189
  "import": {
243
190
  "type": "object",
244
191
  "required": ["from", "as"],
@@ -250,7 +197,7 @@
250
197
  },
251
198
  "as": {
252
199
  "enum": ["role", "objective"],
253
- "description": "Imported doctype."
200
+ "description": "Imported doctype. A role is materialised as an AIP-47 `role/v1` document, an objective as a company/v1 objective."
254
201
  },
255
202
  "id": {
256
203
  "type": "string",
@@ -264,5 +211,20 @@
264
211
  }
265
212
  }
266
213
  }
267
- }
214
+ },
215
+ "allOf": [
216
+ { "anyOf": [{ "required": ["id"] }, { "required": ["slug"] }] },
217
+ {
218
+ "if": { "required": ["doctype"], "properties": { "doctype": { "const": "company" } } },
219
+ "then": { "properties": { "kind": { "const": "company" } } }
220
+ },
221
+ {
222
+ "if": { "required": ["doctype"], "properties": { "doctype": { "const": "objective" } } },
223
+ "then": { "properties": { "kind": { "const": "objective" } } }
224
+ },
225
+ {
226
+ "if": { "required": ["doctype"], "properties": { "doctype": { "const": "agent" } } },
227
+ "then": { "properties": { "kind": { "const": "agent" } } }
228
+ }
229
+ ]
268
230
  }