external-subagent 0.6.3 → 0.6.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.
- package/cli/commands/agents.mjs +10 -2
- package/cli/constants.mjs +1 -1
- package/cli/main.mjs +1 -1
- package/cli/rpc.mjs +5 -2
- package/npm/native/darwin-arm64/external-subagent-mcp +0 -0
- package/npm/native/darwin-arm64/external-subagentd +0 -0
- package/npm/native/darwin-arm64/payload.json +4 -4
- package/npm/native/linux-x64/external-subagent-mcp +0 -0
- package/npm/native/linux-x64/external-subagentd +0 -0
- package/npm/native/linux-x64/payload.json +5 -5
- package/package.json +1 -1
- package/schema/external-subagent-public-api.json +45 -1
package/cli/commands/agents.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import { SUBAGENT_IDS } from '../config/schema.mjs';
|
|
|
4
4
|
import path from 'node:path';
|
|
5
5
|
import { CliError } from '../errors.mjs';
|
|
6
6
|
|
|
7
|
-
const INPUT_FIELDS = new Set(['operation', 'subagent', 'through', 'workspace', 'home']);
|
|
7
|
+
const INPUT_FIELDS = new Set(['operation', 'subagent', 'through', 'workspace', 'home', 'probe']);
|
|
8
8
|
|
|
9
9
|
function validateInput(input) {
|
|
10
10
|
if (!input || typeof input !== 'object' || Array.isArray(input)) throw new CliError('INVALID_ARGUMENT', 'subagents input must be an object', 2);
|
|
@@ -71,6 +71,14 @@ export function parseSubagentsArgs(args) {
|
|
|
71
71
|
if (operation === 'probe') return parseProbeArgs(rest);
|
|
72
72
|
if (operation === 'models') return parseModelsArgs(rest);
|
|
73
73
|
if (operation === 'list' && rest.length !== 0) throw new CliError('INVALID_ARGUMENT', 'usage: subagents list', 2);
|
|
74
|
+
if (operation === 'status') {
|
|
75
|
+
// `subagents status [subagent] [--probe]`: --probe asks the daemon to
|
|
76
|
+
// refresh model-catalog evidence before projecting (bounded, no prompts).
|
|
77
|
+
const positional = rest.filter((arg) => arg !== '--probe');
|
|
78
|
+
if (rest.length - positional.length > 1) throw new CliError('INVALID_ARGUMENT', 'usage: subagents status [subagent] [--probe]', 2);
|
|
79
|
+
if (positional.length > 1) throw new CliError('INVALID_ARGUMENT', 'usage: subagents status [subagent] [--probe]', 2);
|
|
80
|
+
return { operation, ...(positional[0] ? { subagent: positional[0] } : {}), ...(rest.includes('--probe') ? { probe: true } : {}) };
|
|
81
|
+
}
|
|
74
82
|
if (operation !== 'list' && rest.length > 1) throw new CliError('INVALID_ARGUMENT', `usage: subagents ${operation} [subagent]`, 2);
|
|
75
83
|
return { operation, ...(rest[0] ? { subagent: rest[0] } : {}) };
|
|
76
84
|
}
|
|
@@ -141,7 +149,7 @@ export async function subagentsCommand(paths, input = {}, options = {}) {
|
|
|
141
149
|
}
|
|
142
150
|
if (operation !== 'status') throw new CliError('INVALID_ARGUMENT', `unsupported subagents operation: ${operation}`, 2);
|
|
143
151
|
if (typeof options.callDaemon !== 'function' || typeof options.socket !== 'string') throw new CliError('INTERNAL_ERROR', 'subagents status requires a daemon connection');
|
|
144
|
-
const status = await options.callDaemon(options.socket, 'status', {});
|
|
152
|
+
const status = await options.callDaemon(options.socket, input.probe === true ? 'status-refresh' : 'status', input.probe === true ? { probe: true } : {});
|
|
145
153
|
const entries = status.subagents ?? status.agents;
|
|
146
154
|
if (!Array.isArray(entries)) throw new CliError('PROTOCOL_ERROR', 'daemon status did not include subagent status');
|
|
147
155
|
const subagents = entries.filter((entry) => input.subagent === undefined || (entry.subagent ?? entry.agent) === input.subagent).map(subagentView);
|
package/cli/constants.mjs
CHANGED
|
@@ -12,7 +12,7 @@ const IS_DEBUG_VARIANT = process.env.EXTERNAL_SUBAGENT_VARIANT === 'debug';
|
|
|
12
12
|
|
|
13
13
|
export const PRODUCT_NAME = IS_DEBUG_VARIANT ? 'external-subagent-debug' : 'external-subagent';
|
|
14
14
|
export const PRODUCT_ID = IS_DEBUG_VARIANT ? 'external_subagent_debug' : 'external_subagent';
|
|
15
|
-
export const VERSION = '0.6.
|
|
15
|
+
export const VERSION = '0.6.4';
|
|
16
16
|
export const LAUNCH_AGENT_LABEL = IS_DEBUG_VARIANT ? 'com.external-subagent-debug.daemon' : 'com.external-subagent.daemon';
|
|
17
17
|
export const DAEMON_BIN_NAME = IS_DEBUG_VARIANT ? 'external-subagent-debugd' : 'external-subagentd';
|
|
18
18
|
export const MCP_BIN_NAME = IS_DEBUG_VARIANT ? 'external-subagent-debug-mcp' : 'external-subagent-mcp';
|
package/cli/main.mjs
CHANGED
|
@@ -24,7 +24,7 @@ import { parseProfileArgs, parseSpawnArgs, prepareSpawnInput, profileCommand } f
|
|
|
24
24
|
const SUPPORTED_PLATFORMS = new Set(['darwin', 'linux', 'win32']);
|
|
25
25
|
|
|
26
26
|
const HELP = `external-subagent ${VERSION}\n\nUsage: external-subagent <command> [options]\n\nCommands:\n help, version Show basic product information\n init [--dry-run] [--resume] [--skip-service-start]\n Install the standalone daemon service only; bind a\n host afterwards with install-plugin or install-mcp\n install-plugin [codex|zcode|dsh] [--dry-run|--uninstall] [--codex-home <path>]\n [--profile <name> [--dsh-home <path>]]\n Install or remove the managed host plugin (MCP + skill);\n the host defaults to codex, --codex-home is codex-only,\n --profile/--dsh-home are dsh-only (the dsh host appends\n one managed mcp-client entry to the profile's\n cordis.patch.yml under $DSH_HOME/profiles)\n install-mcp [--dry-run|--uninstall] [--codex-home <path>]\n Install or remove the direct Codex MCP TOML binding\n status, diagnose Inspect local service and runtime state\n start, stop Bootstrap or boot out the daemon service\n profile list | profile show <name>\n Inspect global spawn profiles (profiles/*.json);\n invalid files are reported as path-based warnings,\n and warned or duplicate files are excluded from the\n available name set\n backup --output <dir> Back up retained product data\n restore --input <dir> Verify and restore product data\n uninstall Release Codex/ZCode/DSH bindings; remove service registration; retain data\n purge --yes Explicitly delete new product data\n`;
|
|
27
|
-
const DAEMON_HELP = ` config get [key] | config set <key> <value>\n subagents list | subagents status [subagent] | subagents probe/models [subagent]\n create/spawn [--profile <name>], wait (one agent_id or a JSON array of up to 16), list, send, respond, cancel, result, close, observe\n Daemon calls accept --json '<object>' or JSON stdin\n list JSON requires repository (workspace is an alias)\n observe JSON requires only agent_id\n`;
|
|
27
|
+
const DAEMON_HELP = ` config get [key] | config set <key> <value>\n subagents list | subagents status [subagent] [--probe] | subagents probe/models [subagent]\n create/spawn [--profile <name>], wait (one agent_id or a JSON array of up to 16), list, send, respond, cancel, result, close, observe\n Daemon calls accept --json '<object>' or JSON stdin\n list JSON requires repository (workspace is an alias)\n observe JSON requires only agent_id\n`;
|
|
28
28
|
|
|
29
29
|
function structuredInput(args, parser) {
|
|
30
30
|
return args.length > 0 && !args[0].startsWith('--') ? parser(args) : parseDaemonInput(args);
|
package/cli/rpc.mjs
CHANGED
|
@@ -38,7 +38,7 @@ export function waitTransportTimeoutMs(waitTime = 290) {
|
|
|
38
38
|
|
|
39
39
|
export function daemonTransportTimeoutMs(command, params = {}) {
|
|
40
40
|
if (command === 'wait') return waitTransportTimeoutMs(params.wait_time);
|
|
41
|
-
if (command === 'agent-probe' || command === 'agent-models') return AGENT_PROBE_TRANSPORT_TIMEOUT_MS;
|
|
41
|
+
if (command === 'agent-probe' || command === 'agent-models' || command === 'status-refresh') return AGENT_PROBE_TRANSPORT_TIMEOUT_MS;
|
|
42
42
|
if (command === 'create' || command === 'spawn') return SPAWN_TRANSPORT_TIMEOUT_MS;
|
|
43
43
|
return 6000;
|
|
44
44
|
}
|
|
@@ -101,6 +101,9 @@ function rejectUnknownFields(command, input, allowed) {
|
|
|
101
101
|
function methodFor(command, input) {
|
|
102
102
|
switch (command) {
|
|
103
103
|
case 'status': return { method: 'system_status' };
|
|
104
|
+
case 'status-refresh':
|
|
105
|
+
rejectUnknownFields('status-refresh', input, new Set(['probe']));
|
|
106
|
+
return { method: 'system_status_refresh', params: { probe: input.probe === true } };
|
|
104
107
|
case 'drain': return { method: 'daemon_begin_drain', ...(input.cancel_active === true ? { params: { cancel_active: true } } : {}) };
|
|
105
108
|
case 'drain-status': return { method: 'daemon_drain_status' };
|
|
106
109
|
case 'drain-abort': return { method: 'daemon_abort_drain' };
|
|
@@ -240,7 +243,7 @@ function publicWaitBody(body) {
|
|
|
240
243
|
|
|
241
244
|
export function projectDaemonResult(command, result) {
|
|
242
245
|
switch (command) {
|
|
243
|
-
case 'status': return result.status;
|
|
246
|
+
case 'status': case 'status-refresh': return result.status;
|
|
244
247
|
case 'drain': case 'drain-status': case 'drain-abort': case 'activate-ready': return result;
|
|
245
248
|
case 'agent-probe': return { evidence: result.evidence, status: result.status };
|
|
246
249
|
case 'agent-models': return result.catalog ?? result;
|
|
Binary file
|
|
Binary file
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema_version": 1,
|
|
3
3
|
"product": "external-subagent",
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.4",
|
|
5
5
|
"platform": "darwin-arm64",
|
|
6
6
|
"files": [
|
|
7
7
|
{
|
|
8
8
|
"name": "external-subagentd",
|
|
9
|
-
"bytes":
|
|
9
|
+
"bytes": 10475760,
|
|
10
10
|
"mode": "755",
|
|
11
|
-
"sha256": "
|
|
11
|
+
"sha256": "36397c02758203261b0b5bd6b013e6351dda69a0b1b1f4cc62e00e8375defea5"
|
|
12
12
|
},
|
|
13
13
|
{
|
|
14
14
|
"name": "external-subagent-mcp",
|
|
15
15
|
"bytes": 935776,
|
|
16
16
|
"mode": "755",
|
|
17
|
-
"sha256": "
|
|
17
|
+
"sha256": "1c3c44601eb14c550e3ea336a2d021e4287944501fdb11d6708c0ae4e1b876db"
|
|
18
18
|
}
|
|
19
19
|
]
|
|
20
20
|
}
|
|
Binary file
|
|
Binary file
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema_version": 1,
|
|
3
3
|
"product": "external-subagent",
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.4",
|
|
5
5
|
"platform": "linux-x64",
|
|
6
6
|
"files": [
|
|
7
7
|
{
|
|
8
8
|
"name": "external-subagentd",
|
|
9
|
-
"bytes":
|
|
9
|
+
"bytes": 12086128,
|
|
10
10
|
"mode": "755",
|
|
11
|
-
"sha256": "
|
|
11
|
+
"sha256": "f1626011054612a995f18d86e0249f25c464fe7ca36b4c3a3d5431382e90c76e"
|
|
12
12
|
},
|
|
13
13
|
{
|
|
14
14
|
"name": "external-subagent-mcp",
|
|
15
|
-
"bytes":
|
|
15
|
+
"bytes": 1025528,
|
|
16
16
|
"mode": "755",
|
|
17
|
-
"sha256": "
|
|
17
|
+
"sha256": "4d502cfd888b493ca3e01ed420e6cb4715d36b9067055359343aecd3765ddf97"
|
|
18
18
|
}
|
|
19
19
|
]
|
|
20
20
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "external-subagent",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.4",
|
|
4
4
|
"description": "Manage bounded ZCode, DeepSeek Harness (DSH), Codex, and Google Antigravity (agy) subagent tasks through a local MCP service for any local host (Codex, ZCode, or a custom MCP client)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -115,6 +115,9 @@
|
|
|
115
115
|
},
|
|
116
116
|
"additionalProperties": false
|
|
117
117
|
},
|
|
118
|
+
"models": {
|
|
119
|
+
"$ref": "#/properties/subagent_models_status"
|
|
120
|
+
},
|
|
118
121
|
"local": {
|
|
119
122
|
"$ref": "#/properties/subagent_scope_status"
|
|
120
123
|
},
|
|
@@ -127,6 +130,45 @@
|
|
|
127
130
|
},
|
|
128
131
|
"additionalProperties": false
|
|
129
132
|
},
|
|
133
|
+
"subagent_models_status": {
|
|
134
|
+
"type": "object",
|
|
135
|
+
"description": "Passive projection of recorded model-catalog evidence. Present only when discovery ever ran (status probe=true or an explicit models call); never discovered means the field is absent. Recorded evidence whose config revision no longer matches degrades to supported=false with reason stale_config_revision.",
|
|
136
|
+
"required": [
|
|
137
|
+
"supported",
|
|
138
|
+
"tokens",
|
|
139
|
+
"source",
|
|
140
|
+
"checked_at_ms"
|
|
141
|
+
],
|
|
142
|
+
"properties": {
|
|
143
|
+
"supported": {
|
|
144
|
+
"type": "boolean"
|
|
145
|
+
},
|
|
146
|
+
"tokens": {
|
|
147
|
+
"type": "array",
|
|
148
|
+
"description": "Model selection tokens usable verbatim in spawn model (zcode provider/model, dsh provider:model, codex model id, agy bare slug). Empty when supported is false.",
|
|
149
|
+
"items": {
|
|
150
|
+
"type": "string"
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
"source": {
|
|
154
|
+
"type": "string",
|
|
155
|
+
"description": "Evidence source label, e.g. zcode_session_create_settings, codex_app_server_model_list, dsh_acp_models_list, agy_models_list."
|
|
156
|
+
},
|
|
157
|
+
"version": {
|
|
158
|
+
"type": "string",
|
|
159
|
+
"description": "Runtime version observed at discovery time; omitted when unknown."
|
|
160
|
+
},
|
|
161
|
+
"checked_at_ms": {
|
|
162
|
+
"type": "integer",
|
|
163
|
+
"description": "Epoch milliseconds when the evidence was recorded."
|
|
164
|
+
},
|
|
165
|
+
"reason": {
|
|
166
|
+
"type": "string",
|
|
167
|
+
"description": "Bounded degradation reason (stale_config_revision, auth_required, model_catalog_empty, transport, ...); omitted on success."
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"additionalProperties": false
|
|
171
|
+
},
|
|
130
172
|
"subagent_scope_status": {
|
|
131
173
|
"type": "object",
|
|
132
174
|
"description": "Readiness conclusion only. Probe evidence (scope paths, version, checked_at_ms, reason) stays on the daemon RPC view for the CLI diagnose owner.",
|
|
@@ -553,7 +595,9 @@
|
|
|
553
595
|
"additionalProperties": false,
|
|
554
596
|
"properties": {
|
|
555
597
|
"external_subagent_status": {
|
|
556
|
-
"input": [
|
|
598
|
+
"input": [
|
|
599
|
+
"probe"
|
|
600
|
+
],
|
|
557
601
|
"output": [
|
|
558
602
|
"mcp_version",
|
|
559
603
|
"components",
|