overlord-cli 0.2605291046.0 → 0.2605291450.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.
@@ -216,7 +216,7 @@ Overlord flags:
216
216
  --model <identifier> Preferred model (sets the ticket delegate and is forwarded to the agent)
217
217
  --thinking <level> Agent reasoning/effort level
218
218
  --flag <value> Extra agent flag (repeatable)
219
- --pre-command <command> Command to run before the agent binary (e.g. ollama)
219
+ --pre-command <command> Shell command to run before the agent binary (e.g. ollama, agent-pod)
220
220
  --project-id <uuid> Target project (skips working-directory resolution)
221
221
  --personal Create the ticket in your personal project
222
222
  --for-human Create a human-review ticket
@@ -137,24 +137,53 @@ const supportedAgents = ['claude', 'codex', 'cursor', 'antigravity', 'opencode',
137
137
  // Re-exported under clearer names for the direct-launch dispatcher in index.mjs.
138
138
  export { supportedAgents as BUILTIN_LAUNCH_AGENTS, agentIdentifierMap };
139
139
 
140
+ /** @internal Test-only overrides for launcher subprocess calls. */
141
+ export const launcherTestHooks = {
142
+ execFileSync: null,
143
+ shell: null,
144
+ platform: null
145
+ };
146
+
140
147
  function shellQuote(value) {
141
148
  return `'${String(value).replace(/'/g, `'\\''`)}'`;
142
149
  }
143
150
 
151
+ function resolveLauncherShell() {
152
+ const platform = launcherTestHooks.platform ?? process.platform;
153
+ if (platform === 'win32') {
154
+ return null;
155
+ }
156
+ return launcherTestHooks.shell ?? process.env.SHELL ?? 'sh';
157
+ }
158
+
144
159
  /**
145
160
  * Run an agent binary, optionally routed through a user-defined pre-command
146
- * (e.g. `ollama` to run claude-code through Ollama). When a pre-command is set,
147
- * its first token becomes the executable and the agent binary + args follow it:
148
- * preCommand="ollama" → ollama claude <args...>
161
+ * (e.g. `ollama` to run claude-code through Ollama). On POSIX shells, execute
162
+ * the wrapper through the user's interactive login shell so aliases, functions,
163
+ * and PATH customizations are available:
164
+ * preCommand="agent-pod" → $SHELL -ilc 'agent-pod codex <args...>'
165
+ *
166
+ * The shell must be interactive (`-i`), not just a login shell (`-l`): zsh only
167
+ * sources ~/.zshrc — and bash only sources ~/.bashrc — for interactive shells.
168
+ * Wrappers like agent-pod are commonly installed as a shell alias in ~/.zshrc
169
+ * (its documented default), so a plain `-lc` login shell never sees them and
170
+ * fails with `command not found`.
149
171
  */
150
172
  function execAgentBinary(binary, args, opts, preCommand) {
173
+ const exec = launcherTestHooks.execFileSync ?? execFileSync;
151
174
  const pre = typeof preCommand === 'string' ? preCommand.trim() : '';
152
175
  if (pre) {
176
+ const shell = resolveLauncherShell();
177
+ if (shell) {
178
+ const command = [pre, shellQuote(binary), ...args.map(arg => shellQuote(arg))].join(' ');
179
+ exec(shell, ['-ilc', command], opts);
180
+ return;
181
+ }
153
182
  const preTokens = pre.split(/\s+/).filter(Boolean);
154
- execFileSync(preTokens[0], [...preTokens.slice(1), binary, ...args], opts);
183
+ exec(preTokens[0], [...preTokens.slice(1), binary, ...args], opts);
155
184
  return;
156
185
  }
157
- execFileSync(binary, args, opts);
186
+ exec(binary, args, opts);
158
187
  }
159
188
 
160
189
  function toTomlString(value) {
@@ -292,7 +321,7 @@ Options:
292
321
  --model <identifier> Preferred model identifier
293
322
  --thinking <level> Agent reasoning/effort level
294
323
  --flag <value> Extra agent flag (repeatable)
295
- --pre-command <command> Command to run before the agent binary (e.g. ollama)
324
+ --pre-command <command> Shell command to run before the agent binary (e.g. ollama, agent-pod)
296
325
  --ssh-command <command> Launch remotely over SSH by running ovld on the target host
297
326
  --remote-working-directory <path> Change to this path on the remote host before launch
298
327
  --server-multiplexer <none|tmux> Wrap remote launches in tmux
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "overlord-cli",
3
- "version": "0.2605291046.0",
3
+ "version": "0.2605291450.0",
4
4
  "description": "Overlord CLI — launch AI agents on tickets from anywhere",
5
5
  "homepage": "https://www.ovld.ai/docs/",
6
6
  "type": "module",