@technomoron/agent-run 0.99.5 → 0.99.6
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/CHANGES +4 -0
- package/dist/agent-run.js +21 -3
- package/package.json +1 -1
package/CHANGES
CHANGED
|
@@ -4,6 +4,10 @@ CHANGES
|
|
|
4
4
|
Unreleased (2026-04-24)
|
|
5
5
|
-----------------------
|
|
6
6
|
|
|
7
|
+
Version 0.99.6 (2026-04-26)
|
|
8
|
+
---------------------------
|
|
9
|
+
* Allow `agent-run` to find the target command after wrapper arguments, so invocations like `agent-run --sandboxed --network codex` work the same as `agent-run codex --sandboxed --network`.
|
|
10
|
+
|
|
7
11
|
Version 0.99.5 (2026-04-25)
|
|
8
12
|
---------------------------
|
|
9
13
|
* Bootstrap missing default global templates, manifests, local templates, and overrides before `agent-run codex`, `agent-run claude`, or `agent-run update` render a profile.
|
package/dist/agent-run.js
CHANGED
|
@@ -97,14 +97,20 @@ function parseInvocation(invokedTool, argv) {
|
|
|
97
97
|
if (inputArgs.length === 0) {
|
|
98
98
|
fail('usage: agent-run <codex|claude|check|init|edit|update> [options] (run with --help for details)');
|
|
99
99
|
}
|
|
100
|
-
const firstArg = inputArgs
|
|
100
|
+
const firstArg = inputArgs[0];
|
|
101
101
|
if (isHelpFlag(firstArg)) {
|
|
102
102
|
printHelp('general');
|
|
103
103
|
}
|
|
104
|
-
|
|
105
|
-
if (
|
|
104
|
+
const commandIndex = findCommandArgIndex(inputArgs);
|
|
105
|
+
if (commandIndex === -1) {
|
|
106
106
|
fail(`unknown command: ${firstArg ?? ''} (run with --help for usage)`);
|
|
107
107
|
}
|
|
108
|
+
const parsedCommand = normalizeCommandName(inputArgs[commandIndex] ?? '');
|
|
109
|
+
if (parsedCommand === null) {
|
|
110
|
+
fail(`unknown command: ${firstArg ?? ''} (run with --help for usage)`);
|
|
111
|
+
}
|
|
112
|
+
command = parsedCommand;
|
|
113
|
+
inputArgs.splice(commandIndex, 1);
|
|
108
114
|
}
|
|
109
115
|
if (command === 'check') {
|
|
110
116
|
return parseCheckCommand(inputArgs);
|
|
@@ -123,6 +129,18 @@ function parseInvocation(invokedTool, argv) {
|
|
|
123
129
|
}
|
|
124
130
|
return parseRunCommand(command, inputArgs);
|
|
125
131
|
}
|
|
132
|
+
function findCommandArgIndex(args) {
|
|
133
|
+
for (let index = 0; index < args.length; index += 1) {
|
|
134
|
+
const arg = args[index];
|
|
135
|
+
if (arg === '--') {
|
|
136
|
+
return -1;
|
|
137
|
+
}
|
|
138
|
+
if (normalizeCommandName(arg ?? '') !== null) {
|
|
139
|
+
return index;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
return -1;
|
|
143
|
+
}
|
|
126
144
|
function extractGlobalOptions(argv) {
|
|
127
145
|
const args = [];
|
|
128
146
|
let configRootOverride = null;
|