@technomoron/agent-run 0.99.7 → 0.99.9
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
|
@@ -4,6 +4,15 @@ CHANGES
|
|
|
4
4
|
Unreleased (2026-04-24)
|
|
5
5
|
-----------------------
|
|
6
6
|
|
|
7
|
+
Version 0.99.9 (2026-04-26)
|
|
8
|
+
---------------------------
|
|
9
|
+
* Add `{config-root}/notes/memory` as an optional shared memory directory passed with `--add-dir` to Codex and Claude when it exists.
|
|
10
|
+
* Add a starter `skills/personal-memory.md` file to the packaged config skeleton.
|
|
11
|
+
|
|
12
|
+
Version 0.99.8 (2026-04-26)
|
|
13
|
+
---------------------------
|
|
14
|
+
* Skip stale `codex` or `claude` PATH redirect shims that print `Run agent-run instead` when locating the real underlying tool binary.
|
|
15
|
+
|
|
7
16
|
Version 0.99.7 (2026-04-26)
|
|
8
17
|
---------------------------
|
|
9
18
|
* Add a checked-in basic starter config under `examples/basic-config` that exercises manifests, templates, snippets, skills, overrides, guardrails, checks, and generated runtime paths.
|
package/README.md
CHANGED
|
@@ -169,8 +169,9 @@ Per-profile override templates can be placed in:
|
|
|
169
169
|
|
|
170
170
|
A complete starter lives in `examples/basic-config`. It includes a minimal
|
|
171
171
|
project, `.agent-run.env`, a config root with global templates and snippets,
|
|
172
|
-
profile-local templates, skill templates,
|
|
173
|
-
overrides, guardrails, checks, and generated
|
|
172
|
+
profile-local templates, skill templates, a personal memory skill, profile
|
|
173
|
+
skill overrides, tool config overrides, guardrails, checks, and generated
|
|
174
|
+
runtime paths.
|
|
174
175
|
|
|
175
176
|
To copy the packaged starter config root into your default config location:
|
|
176
177
|
|
package/dist/agent-run.js
CHANGED
|
@@ -482,10 +482,10 @@ function runTool(parsed) {
|
|
|
482
482
|
ensureRunnableProfile(configRoot, agentDir, profile);
|
|
483
483
|
syncAgentProfile(projectRoot, agentDir);
|
|
484
484
|
if (command === 'codex') {
|
|
485
|
-
runCodex(realBinary, permissionArgs, agentDir, args, projectRoot, wrapperArgs);
|
|
485
|
+
runCodex(realBinary, permissionArgs, agentDir, configRoot, args, projectRoot, wrapperArgs);
|
|
486
486
|
return;
|
|
487
487
|
}
|
|
488
|
-
runClaude(realBinary, permissionArgs, agentDir, args, projectRoot);
|
|
488
|
+
runClaude(realBinary, permissionArgs, agentDir, configRoot, args, projectRoot);
|
|
489
489
|
}
|
|
490
490
|
function runInit(parsed) {
|
|
491
491
|
const projectRoot = findProjectRoot(parsed.targetPath);
|
|
@@ -1459,7 +1459,7 @@ function countWarnings(findings) {
|
|
|
1459
1459
|
function formatError(error) {
|
|
1460
1460
|
return error instanceof Error ? error.message : String(error);
|
|
1461
1461
|
}
|
|
1462
|
-
function runCodex(realBinary, permissionArgs, agentDir, args, projectRoot, wrapperArgs) {
|
|
1462
|
+
function runCodex(realBinary, permissionArgs, agentDir, configRoot, args, projectRoot, wrapperArgs) {
|
|
1463
1463
|
const agentsPath = path.join(agentDir, 'AGENTS.md');
|
|
1464
1464
|
if (!fs.existsSync(agentsPath)) {
|
|
1465
1465
|
failMissingConfig('codex', agentDir);
|
|
@@ -1482,6 +1482,7 @@ function runCodex(realBinary, permissionArgs, agentDir, args, projectRoot, wrapp
|
|
|
1482
1482
|
`system_prompt_file=${agentsPath}`,
|
|
1483
1483
|
'--config',
|
|
1484
1484
|
'project_doc_max_bytes=65536',
|
|
1485
|
+
...globalMemoryArgs(configRoot),
|
|
1485
1486
|
'-C',
|
|
1486
1487
|
projectRoot,
|
|
1487
1488
|
...(wrapperArgs.codexSandboxMode === 'sandboxed' && wrapperArgs.codexNetwork
|
|
@@ -1497,7 +1498,7 @@ function buildCodexRuntimeArgs(wrapperArgs) {
|
|
|
1497
1498
|
}
|
|
1498
1499
|
return ['-a', 'never', '-s', 'danger-full-access'];
|
|
1499
1500
|
}
|
|
1500
|
-
function runClaude(realBinary, permissionArgs, agentDir, args, projectRoot) {
|
|
1501
|
+
function runClaude(realBinary, permissionArgs, agentDir, configRoot, args, projectRoot) {
|
|
1501
1502
|
const claudePath = path.join(agentDir, 'CLAUDE.md');
|
|
1502
1503
|
if (!fs.existsSync(claudePath)) {
|
|
1503
1504
|
failMissingConfig('claude', agentDir);
|
|
@@ -1519,9 +1520,14 @@ function runClaude(realBinary, permissionArgs, agentDir, args, projectRoot) {
|
|
|
1519
1520
|
projectRoot,
|
|
1520
1521
|
'--add-dir',
|
|
1521
1522
|
agentDir,
|
|
1523
|
+
...globalMemoryArgs(configRoot),
|
|
1522
1524
|
...args
|
|
1523
1525
|
], shouldUseShell(realBinary), env, projectRoot, (code) => postflightProjectCheck(projectRoot, agentDir, code));
|
|
1524
1526
|
}
|
|
1527
|
+
function globalMemoryArgs(configRoot) {
|
|
1528
|
+
const memoryDir = path.join(configRoot, 'notes', 'memory');
|
|
1529
|
+
return fs.existsSync(memoryDir) ? ['--add-dir', memoryDir] : [];
|
|
1530
|
+
}
|
|
1525
1531
|
function postflightProjectCheck(projectRoot, agentDir, code) {
|
|
1526
1532
|
const localAiFiles = findLocalAiFiles(projectRoot, agentDir);
|
|
1527
1533
|
if (localAiFiles.length === 0) {
|
|
@@ -1881,11 +1887,32 @@ function findRealBinary(tool) {
|
|
|
1881
1887
|
if (resolvedCandidate === currentScript || wrapperCandidates.has(resolvedCandidate)) {
|
|
1882
1888
|
continue;
|
|
1883
1889
|
}
|
|
1890
|
+
if (isAgentRunRedirectShim(candidate)) {
|
|
1891
|
+
verbose(`skip ${tool} redirect shim: ${candidate}`);
|
|
1892
|
+
continue;
|
|
1893
|
+
}
|
|
1884
1894
|
return candidate;
|
|
1885
1895
|
}
|
|
1886
1896
|
}
|
|
1887
1897
|
fail(`no ${tool} binary found in PATH`);
|
|
1888
1898
|
}
|
|
1899
|
+
function isAgentRunRedirectShim(filePath) {
|
|
1900
|
+
try {
|
|
1901
|
+
const handle = fs.openSync(filePath, 'r');
|
|
1902
|
+
try {
|
|
1903
|
+
const buffer = Buffer.alloc(4096);
|
|
1904
|
+
const bytesRead = fs.readSync(handle, buffer, 0, buffer.length, 0);
|
|
1905
|
+
const content = buffer.subarray(0, bytesRead).toString('utf8');
|
|
1906
|
+
return content.includes('Run agent-run instead');
|
|
1907
|
+
}
|
|
1908
|
+
finally {
|
|
1909
|
+
fs.closeSync(handle);
|
|
1910
|
+
}
|
|
1911
|
+
}
|
|
1912
|
+
catch {
|
|
1913
|
+
return false;
|
|
1914
|
+
}
|
|
1915
|
+
}
|
|
1889
1916
|
function getExecutableExtensions(tool) {
|
|
1890
1917
|
if (!IS_WINDOWS || path.extname(tool)) {
|
|
1891
1918
|
return [''];
|
|
@@ -8,8 +8,8 @@ It contains two pieces:
|
|
|
8
8
|
- `project/`: a minimal project with `.agent-run.env` pointing at the bundled
|
|
9
9
|
config root.
|
|
10
10
|
- `agent-config/`: a complete config root with global templates, snippets,
|
|
11
|
-
skill templates, a profile manifest, profile-local
|
|
12
|
-
overrides.
|
|
11
|
+
skill templates, a personal memory skill, a profile manifest, profile-local
|
|
12
|
+
instructions, and profile overrides.
|
|
13
13
|
|
|
14
14
|
Try it from this repository after building:
|
|
15
15
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Read `./notes/memory/README.md` first. Follow its file index and read only the files relevant to the current task. Do not edit memory files unless the user explicitly asks.
|