@technomoron/agent-run 0.99.26 → 0.99.27

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 CHANGED
@@ -1,6 +1,15 @@
1
1
  CHANGES
2
2
  =======
3
3
 
4
+ Version 0.99.27 (2026-08-11)
5
+ ----------------------------
6
+ * Rename the unattended-run option from `--danger` to `--yolo` for Codex and
7
+ Claude.
8
+ * Add `agent-run setup [config-root]` to create the packaged starter agent
9
+ configuration files without overwriting local edits.
10
+ * Resolve plain directories without Git metadata or a package name as
11
+ `[parent]/[current]` profiles.
12
+
4
13
  Version 0.99.26 (2026-07-31)
5
14
  ----------------------------
6
15
  * Add `--danger` support for Claude so unattended runs pass
package/README.md CHANGED
@@ -97,6 +97,7 @@ The mapped path is:
97
97
  1. `AGENT_RUN_PROFILE` in `.agent-run.env`
98
98
  2. GitHub `origin` remote
99
99
  3. `package.json.name`
100
+ 4. the project path as `[parent]/[current]`
100
101
 
101
102
  Examples:
102
103
 
@@ -104,11 +105,13 @@ Examples:
104
105
  - `AGENT_RUN_PROFILE=unrelated/hello` -> `unrelated/hello`
105
106
  - `package.json.name = "@org/my-api"` -> `org/my-api`
106
107
  - `package.json.name = "my-api"` -> `my-api`
108
+ - `/work/org/my-api` with none of the above -> `org/my-api`
107
109
 
108
110
  `AGENT_RUN_PROFILE` is relative to the config root. It is not a filesystem
109
111
  path, so values like `/tmp/foo`, `C:/tmp/foo`, or `../foo` are rejected.
110
112
 
111
- If neither exists, `agent-run` fails instead of guessing.
113
+ The path fallback lets plain directories work without a Git repository or a
114
+ `package.json`. The explicit profile sources above always take precedence.
112
115
 
113
116
  ## Overrides
114
117
 
@@ -168,7 +171,7 @@ replace the user's normal `CLAUDE_CONFIG_DIR`. If Claude writes remembered
168
171
  permissions to `.claude/settings.local.json`, `agent-run` removes that file
169
172
  after the session unless `--local` was used.
170
173
 
171
- `--danger` runs either tool unattended, with no approval prompts: Codex with
174
+ `--yolo` runs either tool unattended, with no approval prompts: Codex with
172
175
  `-a never -s danger-full-access`, Claude with `--dangerously-skip-permissions`.
173
176
  Only use it when the agent may change or delete anything it can reach. Claude
174
177
  refuses `--dangerously-skip-permissions` when it runs as root, so run it as a
@@ -250,16 +253,16 @@ snippets, profile-local templates, skill templates, a personal memory skill,
250
253
  profile skill overrides, tool config overrides, guardrails, checks, and
251
254
  generated runtime paths.
252
255
 
253
- To copy the packaged starter config root into your default config location:
256
+ To create the packaged starter agent files in your resolved config root:
254
257
 
255
258
  ```sh
256
- agent-run --init
259
+ agent-run setup
257
260
  ```
258
261
 
259
262
  Or choose a destination:
260
263
 
261
264
  ```sh
262
- agent-run --init ~/.agent-config
265
+ agent-run setup ~/.agent-config
263
266
  ```
264
267
 
265
268
  The copy skips files that already exist, so local edits are preserved.
package/dist/cli.js CHANGED
@@ -10,15 +10,6 @@ function parseInvocation(invokedTool, argv) {
10
10
  let command = normalizeCommandName(invokedTool);
11
11
  const options = extractGlobalOptions(argv);
12
12
  applyGlobalOptions(options);
13
- if (options.initConfig) {
14
- if (options.args.length > 0) {
15
- (0, utils_1.fail)('--init cannot be combined with a command');
16
- }
17
- return {
18
- command: 'init-config',
19
- targetPath: path.resolve(options.initConfigTargetPath ?? (0, project_1.defaultConfigRoot)())
20
- };
21
- }
22
13
  if (command === null) {
23
14
  command = extractCommand(options.args);
24
15
  }
@@ -59,6 +50,8 @@ function parseCommand(command, args) {
59
50
  return parseCheckCommand(args);
60
51
  case 'init':
61
52
  return parseInitCommand(args);
53
+ case 'setup':
54
+ return parseSetupCommand(args);
62
55
  case 'edit':
63
56
  return parseEditCommand(args);
64
57
  case 'update':
@@ -73,8 +66,6 @@ function extractGlobalOptions(argv) {
73
66
  const options = {
74
67
  args: [],
75
68
  configRootOverride: null,
76
- initConfig: false,
77
- initConfigTargetPath: null,
78
69
  verbose: false
79
70
  };
80
71
  let passthrough = false;
@@ -94,14 +85,6 @@ function extractGlobalOptions(argv) {
94
85
  else if (arg === '-v' || arg === '--verbose') {
95
86
  options.verbose = true;
96
87
  }
97
- else if (arg === '--init') {
98
- options.initConfig = true;
99
- const nextArg = argv[index + 1];
100
- if (nextArg !== undefined && !nextArg.startsWith('-')) {
101
- options.initConfigTargetPath = nextArg;
102
- index += 1;
103
- }
104
- }
105
88
  else if (arg === '--config-root') {
106
89
  const nextArg = argv[index + 1];
107
90
  if (nextArg === undefined) {
@@ -154,7 +137,7 @@ function parseRunCommand(command, inputArgs) {
154
137
  args.push(arg);
155
138
  }
156
139
  if (wrapperArgs.codexNetwork && wrapperArgs.sandboxMode === 'danger') {
157
- (0, utils_1.fail)('--network cannot be combined with agent-run codex --danger');
140
+ (0, utils_1.fail)('--network cannot be combined with agent-run codex --yolo');
158
141
  }
159
142
  return { args, command, wrapperArgs };
160
143
  }
@@ -174,19 +157,19 @@ function applyCommonRunOption(arg, options) {
174
157
  return true;
175
158
  }
176
159
  function applySandboxRunOption(command, arg, options) {
177
- if (!['--danger', '--sandboxed', '--network'].includes(arg)) {
160
+ if (!['--yolo', '--sandboxed', '--network'].includes(arg)) {
178
161
  return false;
179
162
  }
180
- if (arg !== '--danger' && command !== 'codex') {
163
+ if (arg !== '--yolo' && command !== 'codex') {
181
164
  (0, utils_1.fail)(`${arg} is only supported for agent-run codex`);
182
165
  }
183
166
  if (arg === '--network') {
184
167
  options.codexNetwork = true;
185
168
  return true;
186
169
  }
187
- const mode = arg === '--danger' ? 'danger' : 'sandboxed';
170
+ const mode = arg === '--yolo' ? 'danger' : 'sandboxed';
188
171
  if (options.sandboxMode !== null && options.sandboxMode !== mode) {
189
- (0, utils_1.fail)('cannot combine --danger and --sandboxed');
172
+ (0, utils_1.fail)('cannot combine --yolo and --sandboxed');
190
173
  }
191
174
  options.sandboxMode = mode;
192
175
  return true;
@@ -213,11 +196,14 @@ function parseCheckCommand(inputArgs) {
213
196
  function parseInitCommand(inputArgs) {
214
197
  return { command: 'init', targetPath: parseSinglePath(inputArgs, 'init') };
215
198
  }
199
+ function parseSetupCommand(inputArgs) {
200
+ return { command: 'setup', targetPath: parseSinglePath(inputArgs, 'setup', (0, project_1.defaultConfigRoot)()) };
201
+ }
216
202
  function parseEditCommand(inputArgs) {
217
203
  return { command: 'edit', targetPath: parseSinglePath(inputArgs, 'edit') };
218
204
  }
219
- function parseSinglePath(inputArgs, command) {
220
- let targetPath = process.cwd();
205
+ function parseSinglePath(inputArgs, command, defaultPath = process.cwd()) {
206
+ let targetPath = defaultPath;
221
207
  for (const arg of inputArgs) {
222
208
  if (isHelpFlag(arg)) {
223
209
  printHelp(command);
@@ -289,6 +275,7 @@ function renderHelp(topic) {
289
275
  ''
290
276
  ],
291
277
  init: ['Usage:', ' agent-run init [path]', '', 'Create a minimal mapped profile marker and render generated files.', ''],
278
+ setup: ['Usage:', ' agent-run setup [config-root]', '', 'Create starter agent configuration files in the config root.', ''],
292
279
  edit: ['Usage:', ' agent-run edit [path]', '', 'Create or open the editable local profile template.', ''],
293
280
  update: [
294
281
  'Usage:',
@@ -313,14 +300,14 @@ function renderHelp(topic) {
313
300
  `agent-run ${agentRunVersion()}`,
314
301
  '',
315
302
  'Usage:',
316
- ' agent-run <codex|claude|check|init|edit|update> [options]',
317
- ' agent-run --init [config-root]',
303
+ ' agent-run <codex|claude|check|setup|init|edit|update> [options]',
318
304
  '',
319
305
  'Commands:',
320
- ' codex [--none] [--create] [--local] [--show] [--generate] [--danger|--sandboxed] [--network] [args...]',
306
+ ' codex [--none] [--create] [--local] [--show] [--generate] [--yolo|--sandboxed] [--network] [args...]',
321
307
  ' Run codex with generated private config',
322
- ' claude [--none] [--create] [--local] [--show] [--generate] [--danger] [args...]',
308
+ ' claude [--none] [--create] [--local] [--show] [--generate] [--yolo] [args...]',
323
309
  ' Run claude with generated private config',
310
+ ' setup [config-root] Create starter files in the agent-config root',
324
311
  ' check [--all] [path] Validate generated profile output',
325
312
  ' init [path] Create a sparse profile marker and render output',
326
313
  ' edit [path] Create or open local.md.njk',
@@ -332,13 +319,12 @@ function renderHelp(topic) {
332
319
  ' -V, --version Show the agent-run version',
333
320
  ' -v, --verbose Print path resolution and wrapper actions',
334
321
  ' --config-root DIR Override the agent-config root',
335
- ' --init [DIR] Copy the packaged starter config root to DIR (default ~/.agent-config)',
336
322
  '',
337
323
  'Run wrapper options:',
338
324
  ' --local Warn about local AI files instead of failing',
339
325
  ' --show Show read/include and generated files without running the tool',
340
326
  ' --generate Generate files without running the tool',
341
- ' --danger Run unattended without approval prompts:',
327
+ ' --yolo Run unattended without approval prompts:',
342
328
  ' Codex with -a never -s danger-full-access,',
343
329
  ' Claude with --dangerously-skip-permissions',
344
330
  '',
@@ -365,7 +351,7 @@ function normalizeCommandName(value) {
365
351
  if (base === 'agent-run') {
366
352
  return null;
367
353
  }
368
- return ['codex', 'claude', 'check', 'init', 'edit', 'update', 'migrate-config'].includes(base)
354
+ return ['codex', 'claude', 'check', 'setup', 'init', 'edit', 'update', 'migrate-config'].includes(base)
369
355
  ? base
370
356
  : null;
371
357
  }
package/dist/commands.js CHANGED
@@ -24,8 +24,8 @@ function dispatch(command) {
24
24
  case 'init':
25
25
  runInit(command);
26
26
  return;
27
- case 'init-config':
28
- runInitConfig(command);
27
+ case 'setup':
28
+ runSetup(command);
29
29
  return;
30
30
  case 'edit':
31
31
  runEdit(command);
@@ -154,13 +154,13 @@ function runInit(parsed) {
154
154
  const agentDir = initializeProfileSource(projectRoot, true);
155
155
  printUpdateSummary((0, renderer_1.syncAgentProfile)(projectRoot, agentDir));
156
156
  }
157
- function runInitConfig(parsed) {
157
+ function runSetup(parsed) {
158
158
  const sourcePath = (0, config_tree_1.starterConfigRootPath)();
159
159
  if (!fs.existsSync(sourcePath)) {
160
160
  (0, utils_1.fail)(`starter config skeleton not found: ${sourcePath}`);
161
161
  }
162
162
  (0, config_tree_1.copySkeletonTree)(sourcePath, path.resolve(parsed.targetPath));
163
- process.stdout.write(`OK copied starter config to ${path.resolve(parsed.targetPath)}\n`);
163
+ process.stdout.write(`OK created starter agent config in ${path.resolve(parsed.targetPath)}\n`);
164
164
  }
165
165
  function runEdit(parsed) {
166
166
  const projectRoot = activeProject(parsed.targetPath, 'edit');
package/dist/project.js CHANGED
@@ -173,10 +173,15 @@ function profileFromPackage(projectRoot) {
173
173
  return { profile: null, reason: `cannot parse package.json: ${packagePath}` };
174
174
  }
175
175
  }
176
- return {
177
- profile: null,
178
- reason: `cannot resolve agent profile for ${projectRoot}; add ${constants_1.ENV_FILE_NAME} with AGENT_RUN_PROFILE=<org/project>, add a GitHub origin remote, or set package.json.name`
179
- };
176
+ const current = path.basename(projectRoot);
177
+ const parentDir = path.dirname(projectRoot);
178
+ const parent = path.basename(parentDir);
179
+ if (current && parent && parentDir !== projectRoot) {
180
+ const inferredProfile = `${parent}/${current}`;
181
+ (0, utils_1.verbose)(`using project path profile=${inferredProfile}`);
182
+ return parseProfile(inferredProfile, 'project parent and directory name');
183
+ }
184
+ return { profile: null, reason: `cannot resolve agent profile from project path: ${projectRoot}` };
180
185
  }
181
186
  function resolveGitHubProfile(projectRoot) {
182
187
  const result = childProcess.spawnSync('git', ['-C', projectRoot, 'config', '--get', 'remote.origin.url'], {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@technomoron/agent-run",
3
- "version": "0.99.26",
3
+ "version": "0.99.27",
4
4
  "packageManager": "pnpm@10.28.1",
5
5
  "bin": {
6
6
  "agent-run": "dist/agent-run.js"