@agentproto/corpus-cli 0.2.0 → 0.4.0
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/LICENSE +202 -21
- package/README.md +2 -0
- package/dist/cli.mjs +394 -46
- package/dist/cli.mjs.map +1 -1
- package/dist/specs/resources/aip-45/draft/AGENT-CLI.schema.json +67 -0
- package/package.json +5 -5
|
@@ -36,6 +36,11 @@
|
|
|
36
36
|
"items": { "type": "string" },
|
|
37
37
|
"description": "Default argv prefix (e.g. ['acp'] for `hermes acp`)."
|
|
38
38
|
},
|
|
39
|
+
"env": {
|
|
40
|
+
"type": "object",
|
|
41
|
+
"additionalProperties": { "type": "string" },
|
|
42
|
+
"description": "Static environment variables always merged into the spawn env, before any mode/option env patch (so those can override). Always-on counterpart to modes[].env / options[].env. Primary user is a generic ACP agent whose whole config surface is bin + args + env."
|
|
43
|
+
},
|
|
39
44
|
"install": {
|
|
40
45
|
"type": "array",
|
|
41
46
|
"minItems": 1,
|
|
@@ -104,6 +109,11 @@
|
|
|
104
109
|
"items": { "$ref": "#/$defs/option" },
|
|
105
110
|
"description": "Independent typed knobs the CLI accepts. The host picks any subset per turn via OPERATOR.runtime.config.options. Patches apply in declaration order, AFTER mode patches."
|
|
106
111
|
},
|
|
112
|
+
"presets": {
|
|
113
|
+
"type": "array",
|
|
114
|
+
"items": { "$ref": "#/$defs/preset" },
|
|
115
|
+
"description": "AIP-45 gateway presets this adapter can drive (Anthropic/OpenAI-compatible backends). Merged into the provider-preset catalog (agentproto presets list / list_provider_presets) alongside the built-in registry, deduped by id (built-in wins on collision). Lets an external adapter surface a gateway the built-in registry doesn't know about."
|
|
116
|
+
},
|
|
107
117
|
"continuation": { "$ref": "#/$defs/continuation" },
|
|
108
118
|
"requires": { "$ref": "https://agentproto.sh/docs/aip-29/CLI.schema.json#/properties/requires" },
|
|
109
119
|
"examples": {
|
|
@@ -259,6 +269,11 @@
|
|
|
259
269
|
"description": "Stable id. The operator config references this id."
|
|
260
270
|
},
|
|
261
271
|
"description": { "type": "string" },
|
|
272
|
+
"bin_args_prepend": {
|
|
273
|
+
"type": "array",
|
|
274
|
+
"items": { "type": "string" },
|
|
275
|
+
"description": "Extra argv prepended before the manifest's bin_args when this mode is active."
|
|
276
|
+
},
|
|
262
277
|
"bin_args_append": {
|
|
263
278
|
"type": "array",
|
|
264
279
|
"items": { "type": "string" },
|
|
@@ -268,6 +283,19 @@
|
|
|
268
283
|
"type": "object",
|
|
269
284
|
"additionalProperties": { "type": "string" },
|
|
270
285
|
"description": "Extra env vars merged into the spawn env when this mode is active."
|
|
286
|
+
},
|
|
287
|
+
"env_unset": {
|
|
288
|
+
"type": "array",
|
|
289
|
+
"items": { "type": "string" },
|
|
290
|
+
"description": "Env keys to DELETE from the spawn env when this mode is active. Applied at the runtime's env-merge point after ambient process.env + mode/option env are combined, so a mode can scrub a credential that must never reach a non-native endpoint (e.g. a gateway mode scrubbing ANTHROPIC_API_KEY so it can't leak to a third-party Anthropic-compatible host). Unlike `env`, deletion is the only safe semantics for scrubbing."
|
|
291
|
+
},
|
|
292
|
+
"status": {
|
|
293
|
+
"enum": ["active", "noop", "planned"],
|
|
294
|
+
"description": "Honest support status surfaced to clients. active = does what its description claims; noop = declared and accepted but measured to have no effect; planned = declared surface not wired yet. Absent ⇒ treated as active."
|
|
295
|
+
},
|
|
296
|
+
"status_note": {
|
|
297
|
+
"type": "string",
|
|
298
|
+
"description": "Human-readable reason backing `status` (e.g. what was measured)."
|
|
271
299
|
}
|
|
272
300
|
}
|
|
273
301
|
},
|
|
@@ -303,6 +331,11 @@
|
|
|
303
331
|
"type": "integer",
|
|
304
332
|
"description": "Upper bound when type=integer."
|
|
305
333
|
},
|
|
334
|
+
"bin_args_prepend": {
|
|
335
|
+
"type": "array",
|
|
336
|
+
"items": { "type": "string" },
|
|
337
|
+
"description": "Argv template prepended before the manifest's bin_args when the option has a non-default value. The literal token `{value}` is replaced with the option's value (stringified)."
|
|
338
|
+
},
|
|
306
339
|
"bin_args_template": {
|
|
307
340
|
"type": "array",
|
|
308
341
|
"items": { "type": "string" },
|
|
@@ -317,6 +350,11 @@
|
|
|
317
350
|
"type": "object",
|
|
318
351
|
"additionalProperties": { "type": "string" },
|
|
319
352
|
"description": "Env vars to merge when the option has a non-default value. Values may contain `{value}` for templating."
|
|
353
|
+
},
|
|
354
|
+
"env_unset": {
|
|
355
|
+
"type": "array",
|
|
356
|
+
"items": { "type": "string" },
|
|
357
|
+
"description": "Env keys to DELETE from the spawn env when the option has a non-default value. Symmetric with mode.env_unset and applied at the same runtime env-merge point. Lets a value-bearing option (e.g. base_url pointing at a third-party Anthropic-compatible gateway) scrub the ambient credential (ANTHROPIC_API_KEY) it must displace, without forcing the operator to also pick a preset mode."
|
|
320
358
|
}
|
|
321
359
|
},
|
|
322
360
|
"allOf": [
|
|
@@ -326,6 +364,35 @@
|
|
|
326
364
|
}
|
|
327
365
|
]
|
|
328
366
|
},
|
|
367
|
+
"preset": {
|
|
368
|
+
"type": "object",
|
|
369
|
+
"additionalProperties": false,
|
|
370
|
+
"required": ["id", "label", "schemaFlavor", "baseUrl", "keyEnv"],
|
|
371
|
+
"description": "A gateway preset this adapter can drive — a backend an Anthropic/OpenAI-compatible client can front. Declared in the manifest so the catalog surfaces adapter-contributed presets alongside the built-in registry. No adapter projection (env/env_unset/bin_args) here; that stays in modes/options.",
|
|
372
|
+
"properties": {
|
|
373
|
+
"id": {
|
|
374
|
+
"type": "string",
|
|
375
|
+
"minLength": 1,
|
|
376
|
+
"description": "Stable preset id. SHOULD equal the mode id if the adapter projects this preset as a mode. Catalog dedupes built-in vs adapter-declared by id; an adapter-declared id colliding with a built-in is ignored in favor of the built-in (registry is source of truth for canonical providers)."
|
|
377
|
+
},
|
|
378
|
+
"label": { "type": "string", "minLength": 1, "description": "Human label for the catalog UI." },
|
|
379
|
+
"description": { "type": "string" },
|
|
380
|
+
"schemaFlavor": { "enum": ["anthropic", "openai"], "description": "API schema flavor — selects which adapter family can consume the preset." },
|
|
381
|
+
"baseUrl": { "type": "string", "minLength": 1, "description": "Base URL the client hits." },
|
|
382
|
+
"keyEnv": {
|
|
383
|
+
"type": "string",
|
|
384
|
+
"minLength": 1,
|
|
385
|
+
"description": "Conventional env var holding this provider's API key. Catalog status is derived from its presence in the daemon's environment (ready vs available)."
|
|
386
|
+
},
|
|
387
|
+
"scrubEnv": {
|
|
388
|
+
"type": "array",
|
|
389
|
+
"items": { "type": "string" },
|
|
390
|
+
"description": "Env vars to scrub when this preset is active. Optional — an adapter that scrubs in code may omit it. Not surfaced to catalog clients."
|
|
391
|
+
},
|
|
392
|
+
"defaultModel": { "type": "string", "description": "Conventional default model id for this provider, if any." },
|
|
393
|
+
"homepage": { "type": "string", "description": "Optional homepage/docs URL for the catalog UI." }
|
|
394
|
+
}
|
|
395
|
+
},
|
|
329
396
|
"continuation": {
|
|
330
397
|
"type": "object",
|
|
331
398
|
"additionalProperties": false,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentproto/corpus-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
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",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"bugs": {
|
|
19
19
|
"url": "https://github.com/agentproto/ts/issues"
|
|
20
20
|
},
|
|
21
|
-
"license": "
|
|
21
|
+
"license": "Apache-2.0",
|
|
22
22
|
"type": "module",
|
|
23
23
|
"main": "dist/index.mjs",
|
|
24
24
|
"module": "dist/index.mjs",
|
|
@@ -51,9 +51,9 @@
|
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"gray-matter": "^4.0.3",
|
|
53
53
|
"zod": "^4.4.3",
|
|
54
|
-
"@agentproto/cli-exec": "0.1.0
|
|
55
|
-
"@agentproto/corpus": "0.
|
|
56
|
-
"@agentproto/corpus-presets": "0.2.
|
|
54
|
+
"@agentproto/cli-exec": "0.1.0",
|
|
55
|
+
"@agentproto/corpus": "0.3.0",
|
|
56
|
+
"@agentproto/corpus-presets": "0.2.2"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@types/node": "^25.6.2",
|