@technomoron/agent-run 0.99.20 → 0.99.22
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 +13 -0
- package/README.md +28 -19
- package/dist/agent-run.js +71 -11
- package/examples/basic-config/agent-config/global/tool-templates/codex-config.toml.njk +1 -1
- package/examples/basic-config/agent-config/starter/basic-project/overrides/codex-config.toml.njk +1 -1
- package/package.json +1 -1
package/CHANGES
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
CHANGES
|
|
2
2
|
=======
|
|
3
3
|
|
|
4
|
+
Version 0.99.22 (2026-06-27)
|
|
5
|
+
----------------------------
|
|
6
|
+
* Default generated Codex configs to `danger-full-access` while keeping `--sandboxed` as an explicit opt-in.
|
|
7
|
+
* Search common global config-root locations on Windows and Unix, including both `agent-config` and `agent-configs`.
|
|
8
|
+
* Fix release script package metadata reads under Git Bash on Windows.
|
|
9
|
+
* Document the config-root discovery order and add regression coverage for the generated sandbox mode and search candidates.
|
|
10
|
+
|
|
11
|
+
Version 0.99.21 (2026-06-27)
|
|
12
|
+
----------------------------
|
|
13
|
+
* Default project commands for `[code]/owner/repo` checkouts to `[code]/agent-config`.
|
|
14
|
+
* Make `update --all` map profiles under a colocated `agent-config` root back to their matching project roots.
|
|
15
|
+
* Expand integration coverage for the colocated config-root layout and Windows command/path behavior.
|
|
16
|
+
|
|
4
17
|
Version 0.99.20 (2026-06-03)
|
|
5
18
|
----------------------------
|
|
6
19
|
* Add systemd unit templates and install tooling for the global AI tools updater.
|
package/README.md
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Small wrapper for AI coding CLIs like Codex and Claude.
|
|
4
4
|
|
|
5
5
|
It keeps agent files out of normal repos and stores them in a separate
|
|
6
|
-
agent config tree.
|
|
7
|
-
|
|
6
|
+
agent config tree. By default, that tree lives beside owner/repo checkouts
|
|
7
|
+
under the same code root.
|
|
8
8
|
|
|
9
9
|
## Model
|
|
10
10
|
|
|
@@ -18,27 +18,26 @@ Example:
|
|
|
18
18
|
|
|
19
19
|
```text
|
|
20
20
|
~/source/
|
|
21
|
+
agent-config/
|
|
22
|
+
org/
|
|
23
|
+
my-api/
|
|
24
|
+
agent-run.jsonc
|
|
25
|
+
local.md.njk
|
|
26
|
+
overrides/
|
|
27
|
+
AGENTS.md
|
|
28
|
+
CLAUDE.md
|
|
29
|
+
config.toml
|
|
30
|
+
.agents/
|
|
31
|
+
.claude/
|
|
32
|
+
bin/
|
|
21
33
|
org/
|
|
22
34
|
my-api/
|
|
23
|
-
|
|
24
|
-
~/.agent-config/
|
|
25
|
-
org/
|
|
26
|
-
my-api/
|
|
27
|
-
agent-run.jsonc
|
|
28
|
-
local.md.njk
|
|
29
|
-
overrides/
|
|
30
|
-
AGENTS.md
|
|
31
|
-
CLAUDE.md
|
|
32
|
-
config.toml
|
|
33
|
-
.agents/
|
|
34
|
-
.claude/
|
|
35
|
-
bin/
|
|
36
35
|
```
|
|
37
36
|
|
|
38
|
-
If your source repo is `~/source/org/my-api`, `agent-run`
|
|
37
|
+
If your source repo is `~/source/org/my-api`, `agent-run` maps it to:
|
|
39
38
|
|
|
40
39
|
```text
|
|
41
|
-
|
|
40
|
+
~/source/agent-config/org/my-api
|
|
42
41
|
```
|
|
43
42
|
|
|
44
43
|
The source repo stays clean. The agent files live in the matching path under
|
|
@@ -93,12 +92,21 @@ AGENT_RUN_PROFILE=org/my-api
|
|
|
93
92
|
|
|
94
93
|
Config root:
|
|
95
94
|
|
|
96
|
-
- default
|
|
95
|
+
- default for a project at `[code]/owner/repo`: `[code]/agent-config`
|
|
97
96
|
- override with `--config-root /path/to/agent-configs`
|
|
98
97
|
- override with `AGENT_CONFIG_DIR=/path/to/agent-configs`
|
|
99
98
|
- override with `AGENT_CONFIG_ROOT=/path/to/agent-configs`
|
|
100
99
|
- or set `AGENT_CONFIG_DIR=/path/to/agent-configs` or `AGENT_CONFIG_ROOT=/path/to/agent-configs` in `.agent-run.env`
|
|
101
100
|
|
|
101
|
+
For commands without a project root, `agent-run` looks for an existing config
|
|
102
|
+
root in these locations:
|
|
103
|
+
|
|
104
|
+
- Windows: `~/Documents/code/agent-config`, `~/Documents/code/agent-configs`,
|
|
105
|
+
`~/Desktop/code/agent-config`, `~/Desktop/code/agent-configs`,
|
|
106
|
+
`C:\code\agent-config`, `C:\code\agent-configs`
|
|
107
|
+
- Unix: `~/code/agent-config`, `~/code/agent-configs`, `~/agent-config`,
|
|
108
|
+
`~/agent-configs`, `~/.agent-config`, `~/.agent-configs`
|
|
109
|
+
|
|
102
110
|
## Commands
|
|
103
111
|
|
|
104
112
|
Global flag:
|
|
@@ -169,7 +177,8 @@ agent-run update --all ~/.agent-config
|
|
|
169
177
|
```
|
|
170
178
|
|
|
171
179
|
If the config root argument is omitted, `update --all` uses the normal configured
|
|
172
|
-
root
|
|
180
|
+
root. Without a project path, that falls back to `$HOME/.agent-config`; for
|
|
181
|
+
project commands, the default is `[code]/agent-config`.
|
|
173
182
|
|
|
174
183
|
You can also generate from a tool command and stop before launch:
|
|
175
184
|
|
package/dist/agent-run.js
CHANGED
|
@@ -7,6 +7,7 @@ exports.resolveAgentDir = resolveAgentDir;
|
|
|
7
7
|
exports.findProjectRoot = findProjectRoot;
|
|
8
8
|
exports.resolveProfile = resolveProfile;
|
|
9
9
|
exports.defaultConfigRoot = defaultConfigRoot;
|
|
10
|
+
exports.defaultConfigRootSearchCandidates = defaultConfigRootSearchCandidates;
|
|
10
11
|
const childProcess = require("child_process");
|
|
11
12
|
const fs = require("fs");
|
|
12
13
|
const os = require("os");
|
|
@@ -23,7 +24,7 @@ const VERBOSE_ENV = 'AGENT_RUN_VERBOSE';
|
|
|
23
24
|
const MANIFEST_FILE_NAME = 'agent-run.jsonc';
|
|
24
25
|
const LOCAL_TEMPLATE_FILE_NAME = 'local.md.njk';
|
|
25
26
|
const LIVE_DIR_NAME = 'live';
|
|
26
|
-
const PACKAGE_VERSION = '0.99.
|
|
27
|
+
const PACKAGE_VERSION = '0.99.22';
|
|
27
28
|
const UNEXPANDED_TEMPLATE_RE = /\{\{[^}]+\}\}|\{%[^%]+%\}/;
|
|
28
29
|
const agentRunEnvCache = new Map();
|
|
29
30
|
const GENERATED_GITIGNORE_ENTRIES = [
|
|
@@ -524,15 +525,19 @@ function runTool(parsed) {
|
|
|
524
525
|
fail(profileResult.reason);
|
|
525
526
|
}
|
|
526
527
|
const profile = profileResult.profile;
|
|
527
|
-
const configRoot = defaultConfigRoot(projectRoot);
|
|
528
|
-
const agentDir = resolveAgentDir(projectRoot);
|
|
529
528
|
if (wrapperArgs.show) {
|
|
529
|
+
const configRoot = defaultConfigRoot(projectRoot);
|
|
530
|
+
const agentDir = path.join(configRoot, profile);
|
|
531
|
+
verbose(`profile=${profile} configRoot=${configRoot} agentPath=${agentDir}`);
|
|
530
532
|
showToolProfile(command, projectRoot, agentDir);
|
|
531
533
|
return;
|
|
532
534
|
}
|
|
533
535
|
if (wrapperArgs.create) {
|
|
534
536
|
runInit({ command: 'init', targetPath: projectRoot });
|
|
535
537
|
}
|
|
538
|
+
const configRoot = defaultConfigRoot(projectRoot);
|
|
539
|
+
const agentDir = path.join(configRoot, profile);
|
|
540
|
+
verbose(`profile=${profile} configRoot=${configRoot} agentPath=${agentDir}`);
|
|
536
541
|
ensureRunnableProfile(configRoot, agentDir, profile);
|
|
537
542
|
if (wrapperArgs.generate) {
|
|
538
543
|
const rendered = syncAgentProfile(projectRoot, agentDir);
|
|
@@ -588,8 +593,9 @@ function runInit(parsed) {
|
|
|
588
593
|
return;
|
|
589
594
|
}
|
|
590
595
|
const profile = resolveProfile(projectRoot);
|
|
591
|
-
const configRoot = defaultConfigRoot(projectRoot);
|
|
592
|
-
const agentDir =
|
|
596
|
+
const configRoot = defaultConfigRoot(projectRoot, { preferProjectRoot: true });
|
|
597
|
+
const agentDir = path.join(configRoot, profile);
|
|
598
|
+
verbose(`profile=${profile} configRoot=${configRoot} agentPath=${agentDir}`);
|
|
593
599
|
ensureConfigRootLayout(configRoot);
|
|
594
600
|
ensureConfigRootGitignore(configRoot);
|
|
595
601
|
ensureDefaultGlobalTemplates(configRoot);
|
|
@@ -675,7 +681,7 @@ function runUpdateAll(targetPath) {
|
|
|
675
681
|
let updated = 0;
|
|
676
682
|
for (const agentDir of profileDirs) {
|
|
677
683
|
const profile = path.relative(configRoot, agentDir).replace(/\\/g, '/');
|
|
678
|
-
const projectRoot = projectRootForProfile(profile);
|
|
684
|
+
const projectRoot = projectRootForProfile(profile, configRoot);
|
|
679
685
|
verbose(`update --all profile=${profile} syntheticProjectRoot=${projectRoot}`);
|
|
680
686
|
ensureProfileOverridesDir(agentDir);
|
|
681
687
|
convertLegacyProfileIfNeeded(configRoot, agentDir, profile);
|
|
@@ -2186,7 +2192,10 @@ function parseProfile(profile, source) {
|
|
|
2186
2192
|
}
|
|
2187
2193
|
return { profile: segments.join('/'), reason: '' };
|
|
2188
2194
|
}
|
|
2189
|
-
function projectRootForProfile(profile) {
|
|
2195
|
+
function projectRootForProfile(profile, configRoot) {
|
|
2196
|
+
if (configRoot && path.basename(configRoot) === 'agent-config') {
|
|
2197
|
+
return path.join(path.dirname(configRoot), ...profile.split('/'));
|
|
2198
|
+
}
|
|
2190
2199
|
return path.join(os.homedir(), ...profile.split('/'));
|
|
2191
2200
|
}
|
|
2192
2201
|
function readAgentRunEnv(dir) {
|
|
@@ -2229,7 +2238,7 @@ function parseBooleanEnv(value) {
|
|
|
2229
2238
|
const normalized = value.trim().toLowerCase();
|
|
2230
2239
|
return normalized === '1' || normalized === 'true' || normalized === 'yes' || normalized === 'on';
|
|
2231
2240
|
}
|
|
2232
|
-
function defaultConfigRoot(projectRoot) {
|
|
2241
|
+
function defaultConfigRoot(projectRoot, options = {}) {
|
|
2233
2242
|
const overrideRoot = process.env[CONFIG_ROOT_OVERRIDE_ENV];
|
|
2234
2243
|
if (overrideRoot) {
|
|
2235
2244
|
return path.resolve(overrideRoot);
|
|
@@ -2251,7 +2260,58 @@ function defaultConfigRoot(projectRoot) {
|
|
|
2251
2260
|
return path.resolve(projectRoot, localConfigRoot);
|
|
2252
2261
|
}
|
|
2253
2262
|
}
|
|
2254
|
-
|
|
2263
|
+
if (projectRoot) {
|
|
2264
|
+
const projectConfigRoot = defaultCodeConfigRoot(projectRoot);
|
|
2265
|
+
if (options.preferProjectRoot || fs.existsSync(projectConfigRoot)) {
|
|
2266
|
+
return projectConfigRoot;
|
|
2267
|
+
}
|
|
2268
|
+
const discoveredConfigRoot = findExistingConfigRoot(defaultConfigRootSearchCandidates());
|
|
2269
|
+
return discoveredConfigRoot ?? projectConfigRoot;
|
|
2270
|
+
}
|
|
2271
|
+
const discoveredConfigRoot = findExistingConfigRoot(defaultConfigRootSearchCandidates());
|
|
2272
|
+
return discoveredConfigRoot ?? path.join(os.homedir(), '.agent-config');
|
|
2273
|
+
}
|
|
2274
|
+
function defaultCodeConfigRoot(projectRoot) {
|
|
2275
|
+
const resolvedProjectRoot = path.resolve(projectRoot);
|
|
2276
|
+
const ownerDir = path.dirname(resolvedProjectRoot);
|
|
2277
|
+
const codeRoot = path.dirname(ownerDir);
|
|
2278
|
+
if (ownerDir === resolvedProjectRoot || codeRoot === ownerDir) {
|
|
2279
|
+
return path.join(os.homedir(), '.agent-config');
|
|
2280
|
+
}
|
|
2281
|
+
return path.join(codeRoot, 'agent-config');
|
|
2282
|
+
}
|
|
2283
|
+
function findExistingConfigRoot(candidates) {
|
|
2284
|
+
for (const candidate of candidates) {
|
|
2285
|
+
if (fs.existsSync(candidate)) {
|
|
2286
|
+
return candidate;
|
|
2287
|
+
}
|
|
2288
|
+
}
|
|
2289
|
+
return null;
|
|
2290
|
+
}
|
|
2291
|
+
function defaultConfigRootSearchCandidates(_projectRoot, options = {}) {
|
|
2292
|
+
const platform = options.platform ?? process.platform;
|
|
2293
|
+
const pathApi = platform === 'win32' ? path.win32 : path.posix;
|
|
2294
|
+
const homeDir = options.homeDir ?? os.homedir();
|
|
2295
|
+
const configNames = ['agent-config', 'agent-configs'];
|
|
2296
|
+
const candidates = [];
|
|
2297
|
+
if (platform === 'win32') {
|
|
2298
|
+
for (const codeRoot of [pathApi.join(homeDir, 'Documents', 'code'), pathApi.join(homeDir, 'Desktop', 'code'), 'C:\\code']) {
|
|
2299
|
+
for (const configName of configNames) {
|
|
2300
|
+
candidates.push(pathApi.join(codeRoot, configName));
|
|
2301
|
+
}
|
|
2302
|
+
}
|
|
2303
|
+
return candidates;
|
|
2304
|
+
}
|
|
2305
|
+
for (const configName of configNames) {
|
|
2306
|
+
candidates.push(pathApi.join(homeDir, 'code', configName));
|
|
2307
|
+
}
|
|
2308
|
+
for (const configName of configNames) {
|
|
2309
|
+
candidates.push(pathApi.join(homeDir, configName));
|
|
2310
|
+
}
|
|
2311
|
+
for (const configName of configNames) {
|
|
2312
|
+
candidates.push(pathApi.join(homeDir, `.${configName}`));
|
|
2313
|
+
}
|
|
2314
|
+
return candidates;
|
|
2255
2315
|
}
|
|
2256
2316
|
function findRealBinary(tool) {
|
|
2257
2317
|
const pathValue = process.env.PATH || '';
|
|
@@ -2725,7 +2785,7 @@ function defaultCodexConfigTemplate() {
|
|
|
2725
2785
|
'# Generated by agent-run. Do not edit directly.',
|
|
2726
2786
|
'',
|
|
2727
2787
|
'project_doc_max_bytes = 65536',
|
|
2728
|
-
'sandbox_mode = "
|
|
2788
|
+
'sandbox_mode = "danger-full-access"',
|
|
2729
2789
|
'',
|
|
2730
2790
|
'[sandbox_workspace_write]',
|
|
2731
2791
|
'writable_roots = [',
|
|
@@ -2767,7 +2827,7 @@ function defaultCodexConfigContent(context) {
|
|
|
2767
2827
|
'# Generated by agent-run. Do not edit directly.',
|
|
2768
2828
|
'',
|
|
2769
2829
|
'project_doc_max_bytes = 65536',
|
|
2770
|
-
'sandbox_mode = "
|
|
2830
|
+
'sandbox_mode = "danger-full-access"',
|
|
2771
2831
|
'',
|
|
2772
2832
|
'[sandbox_workspace_write]',
|
|
2773
2833
|
'writable_roots = [',
|