external-subagent 0.4.0 → 0.4.1

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/README.md CHANGED
@@ -91,6 +91,52 @@ stale or missing binaries) and `postpack` runs the static tarball checks. A
91
91
  development checkout packs the same way (`npm pack` after `cargo` is
92
92
  available); see [docs/operations.md](docs/operations.md) for release checks.
93
93
 
94
+ ## Spawn profiles
95
+
96
+ A spawn profile is a named JSON preset for the spawn inputs, stored as one
97
+ JSON file per profile in the `profiles/` directory next to `config.json`
98
+ (`~/Library/Application Support/external-subagent/profiles/` by default;
99
+ `profile list` reports the exact path in use). Every `*.json` file in the
100
+ directory is discovered by its `name` field; the same name defined in two
101
+ files is rejected, and invalid files are reported as warnings and excluded
102
+ from the available set.
103
+
104
+ ```json
105
+ {
106
+ "name": "codex-yolo",
107
+ "subagent": "codex",
108
+ "model": "gpt-5",
109
+ "permission_mode": "yolo",
110
+ "developer_instructions": "Always reply in English."
111
+ }
112
+ ```
113
+
114
+ | Field | Meaning |
115
+ |---|---|
116
+ | `name` | Required, unique across files; trimmed, non-empty, at most 128 bytes |
117
+ | `subagent` | `zcode`, `dsh`, `codex`, or `agy` |
118
+ | `model` | Model token, named per target: `dsh` wants `provider:model`, `zcode` accepts `provider/model` or a bare token, `codex` and `agy` take a bare slug |
119
+ | `effort` | Effort token; some runtime models require one (for example `agy` rejects `gemini-3.8-flash` without `--effort`) and the spawn error surfaces the runtime's message verbatim |
120
+ | `permission_mode` | `build`, `edit`, `plan`, or `yolo`; defaults to `build` when unset |
121
+ | `developer_instructions` | Free-form instructions, delivered as described below |
122
+
123
+ `--profile` cannot be combined with `--subagent`, `--model`, `--effort`, or
124
+ `--permission_mode`; put those in the profile JSON or omit `profile`. Fields
125
+ left out of the profile fall back to the same defaults as an unprofiled
126
+ spawn. `developer_instructions` rides the codex runtime's native
127
+ `developerInstructions` channel when the effective subagent is `codex`; every
128
+ other subagent receives it silently concatenated in front of the prompt:
129
+
130
+ ```
131
+ Developer Instructions: {developer_instructions}
132
+ ----------
133
+ {prompt}
134
+ ```
135
+
136
+ Inspect what is loaded with `external-subagent profile list` and
137
+ `external-subagent profile show <name>`; an empty `profile list` result
138
+ carries a `hint` field with this format summary.
139
+
94
140
  ## Publishing
95
141
 
96
142
  Releases publish from CI via npm Trusted Publishing (OIDC): pushing a `vX.Y.Z`
@@ -499,6 +499,13 @@ export function parseProfileArgs(args) {
499
499
  throw new CliError('INVALID_ARGUMENT', `unsupported profile operation: ${operation}`, 2);
500
500
  }
501
501
 
502
+ // Attached to `profile list` only when no usable profile exists, so a fresh
503
+ // installation sees the format reference instead of an unexplained empty list.
504
+ const EMPTY_PROFILES_HINT = 'no profiles found; create one JSON file per profile in this directory, '
505
+ + 'e.g. {"name":"codex-yolo","subagent":"codex","model":"gpt-5","permission_mode":"yolo"}; '
506
+ + 'fields: name (required), subagent, model, effort, permission_mode (build|edit|plan|yolo), '
507
+ + 'developer_instructions; see the "Spawn profiles" section of README.md';
508
+
502
509
  export function profileCommand(paths, inputOrArgs, env = process.env) {
503
510
  const input = Array.isArray(inputOrArgs) ? parseProfileArgs(inputOrArgs) : inputOrArgs;
504
511
  if (!input || typeof input !== 'object' || Array.isArray(input)) {
@@ -526,6 +533,7 @@ export function profileCommand(paths, inputOrArgs, env = process.env) {
526
533
  profiles: [],
527
534
  warnings: [],
528
535
  message: `profiles directory does not exist: ${dir}`,
536
+ hint: EMPTY_PROFILES_HINT,
529
537
  };
530
538
  }
531
539
  return {
@@ -533,6 +541,7 @@ export function profileCommand(paths, inputOrArgs, env = process.env) {
533
541
  directory: dir,
534
542
  profiles: scanned.availableNames,
535
543
  warnings: scanned.warnings.map((w) => ({ file: w.file, diagnostic: w.diagnostic })),
544
+ ...(scanned.availableNames.length === 0 ? { hint: EMPTY_PROFILES_HINT } : {}),
536
545
  };
537
546
  }
538
547
 
package/cli/constants.mjs CHANGED
@@ -8,7 +8,7 @@ const IS_DEBUG_VARIANT = process.env.EXTERNAL_SUBAGENT_VARIANT === 'debug';
8
8
 
9
9
  export const PRODUCT_NAME = IS_DEBUG_VARIANT ? 'external-subagent-debug' : 'external-subagent';
10
10
  export const PRODUCT_ID = IS_DEBUG_VARIANT ? 'external_subagent_debug' : 'external_subagent';
11
- export const VERSION = '0.4.0';
11
+ export const VERSION = '0.4.1';
12
12
  export const LAUNCH_AGENT_LABEL = IS_DEBUG_VARIANT ? 'com.external-subagent-debug.daemon' : 'com.external-subagent.daemon';
13
13
  export const DAEMON_BIN_NAME = IS_DEBUG_VARIANT ? 'external-subagent-debugd' : 'external-subagentd';
14
14
  export const MCP_BIN_NAME = IS_DEBUG_VARIANT ? 'external-subagent-debug-mcp' : 'external-subagent-mcp';
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "schema_version": 1,
3
3
  "product": "external-subagent",
4
- "version": "0.4.0",
4
+ "version": "0.4.1",
5
5
  "platform": "darwin-arm64",
6
6
  "files": [
7
7
  {
8
8
  "name": "external-subagentd",
9
- "bytes": 10115152,
9
+ "bytes": 10116128,
10
10
  "mode": "755",
11
- "sha256": "2fbb31359c60e4834f3ad90733c03942cafe5fd8ab1bc5f2f9512128a8746237"
11
+ "sha256": "9c650b9c096f4060e927eced4d05665749123177e3c7d105a13a8a466633ed77"
12
12
  },
13
13
  {
14
14
  "name": "external-subagent-mcp",
15
15
  "bytes": 935888,
16
16
  "mode": "755",
17
- "sha256": "73fc786b07873983fb347af756cc316cebb071a14380442777c27c3928e6f2ec"
17
+ "sha256": "e519c71451bc27bf217316c57fe92d82e8e8fc546c13194455ad60dbc0cdc9f7"
18
18
  }
19
19
  ]
20
20
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "external-subagent",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
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",