@technomoron/agent-run 0.99.9 → 0.99.10
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 +19 -5
- package/examples/basic-config/agent-config/global/tool-templates/AGENTS.md.njk +1 -0
- package/examples/basic-config/agent-config/global/tool-templates/CLAUDE.md.njk +2 -0
- package/examples/basic-config/agent-config/global/tool-templates/claude-settings.json.njk +1 -0
- package/examples/basic-config/agent-config/global/tool-templates/codex-config.toml.njk +2 -1
- package/examples/basic-config/agent-config/starter/basic-project/overrides/claude-settings.json.njk +1 -0
- package/examples/basic-config/agent-config/starter/basic-project/overrides/codex-config.toml.njk +2 -1
- 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.10 (2026-04-27)
|
|
8
|
+
----------------------------
|
|
9
|
+
* Add `paths.globalMemoryDir` to render context and expose it from default Codex, Claude, AGENTS, and CLAUDE templates.
|
|
10
|
+
|
|
7
11
|
Version 0.99.9 (2026-04-26)
|
|
8
12
|
---------------------------
|
|
9
13
|
* Add `{config-root}/notes/memory` as an optional shared memory directory passed with `--add-dir` to Codex and Claude when it exists.
|
package/dist/agent-run.js
CHANGED
|
@@ -972,6 +972,7 @@ function buildRenderContext(projectRoot, agentDir, configRoot, manifest, env) {
|
|
|
972
972
|
reviewDir: resolveRuntimePath(configRoot, manifest.paths.reviewDir, env, baseContext),
|
|
973
973
|
reviewFile: resolveRuntimePath(configRoot, manifest.paths.reviewFile, env, baseContext),
|
|
974
974
|
memoriesDir: resolveRuntimePath(configRoot, manifest.paths.memoriesDir, env, baseContext),
|
|
975
|
+
globalMemoryDir: globalMemoryDir(configRoot),
|
|
975
976
|
codexHomeDir: path.join(resolveRuntimePath(configRoot, manifest.paths.memoriesDir, env, baseContext), 'codex-home'),
|
|
976
977
|
overridesDir: path.join(agentDir, 'overrides'),
|
|
977
978
|
codexSkillsDir: path.join(agentDir, '.agents', 'skills'),
|
|
@@ -1525,9 +1526,12 @@ function runClaude(realBinary, permissionArgs, agentDir, configRoot, args, proje
|
|
|
1525
1526
|
], shouldUseShell(realBinary), env, projectRoot, (code) => postflightProjectCheck(projectRoot, agentDir, code));
|
|
1526
1527
|
}
|
|
1527
1528
|
function globalMemoryArgs(configRoot) {
|
|
1528
|
-
const memoryDir =
|
|
1529
|
+
const memoryDir = globalMemoryDir(configRoot);
|
|
1529
1530
|
return fs.existsSync(memoryDir) ? ['--add-dir', memoryDir] : [];
|
|
1530
1531
|
}
|
|
1532
|
+
function globalMemoryDir(configRoot) {
|
|
1533
|
+
return path.join(configRoot, 'notes', 'memory');
|
|
1534
|
+
}
|
|
1531
1535
|
function postflightProjectCheck(projectRoot, agentDir, code) {
|
|
1532
1536
|
const localAiFiles = findLocalAiFiles(projectRoot, agentDir);
|
|
1533
1537
|
if (localAiFiles.length === 0) {
|
|
@@ -2216,6 +2220,12 @@ function defaultToolInstructionsTemplate(isClaude) {
|
|
|
2216
2220
|
'{{ paths.memoriesDir }}',
|
|
2217
2221
|
'```',
|
|
2218
2222
|
'',
|
|
2223
|
+
'Global memory directory:',
|
|
2224
|
+
'',
|
|
2225
|
+
'```text',
|
|
2226
|
+
'{{ paths.globalMemoryDir }}',
|
|
2227
|
+
'```',
|
|
2228
|
+
'',
|
|
2219
2229
|
'Changes file:',
|
|
2220
2230
|
'',
|
|
2221
2231
|
'```text',
|
|
@@ -2251,7 +2261,8 @@ function defaultCodexConfigTemplate() {
|
|
|
2251
2261
|
'[sandbox_workspace_write]',
|
|
2252
2262
|
'writable_roots = [',
|
|
2253
2263
|
' "{{ projectRoot }}",',
|
|
2254
|
-
' "{{ agentDir }}"',
|
|
2264
|
+
' "{{ agentDir }}",',
|
|
2265
|
+
' "{{ paths.globalMemoryDir }}"',
|
|
2255
2266
|
']',
|
|
2256
2267
|
'network_access = false',
|
|
2257
2268
|
''
|
|
@@ -2262,7 +2273,8 @@ function defaultClaudeSettingsTemplate() {
|
|
|
2262
2273
|
'{',
|
|
2263
2274
|
' "env": {',
|
|
2264
2275
|
' "AGENT_DIR": "{{ agentDir }}",',
|
|
2265
|
-
' "AGENT_RUN_PROJECT_ROOT": "{{ projectRoot }}"',
|
|
2276
|
+
' "AGENT_RUN_PROJECT_ROOT": "{{ projectRoot }}",',
|
|
2277
|
+
' "AGENT_GLOBAL_MEMORY_DIR": "{{ paths.globalMemoryDir }}"',
|
|
2266
2278
|
' }',
|
|
2267
2279
|
'}',
|
|
2268
2280
|
''
|
|
@@ -2278,7 +2290,8 @@ function defaultCodexConfigContent(context) {
|
|
|
2278
2290
|
'[sandbox_workspace_write]',
|
|
2279
2291
|
'writable_roots = [',
|
|
2280
2292
|
` ${jsonString(context.projectRoot)},`,
|
|
2281
|
-
` ${jsonString(context.agentDir)}
|
|
2293
|
+
` ${jsonString(context.agentDir)},`,
|
|
2294
|
+
` ${jsonString(context.paths.globalMemoryDir)}`,
|
|
2282
2295
|
']',
|
|
2283
2296
|
'network_access = false',
|
|
2284
2297
|
''
|
|
@@ -2288,7 +2301,8 @@ function defaultClaudeSettingsContent(context) {
|
|
|
2288
2301
|
return `${JSON.stringify({
|
|
2289
2302
|
env: {
|
|
2290
2303
|
AGENT_DIR: context.agentDir,
|
|
2291
|
-
AGENT_RUN_PROJECT_ROOT: context.projectRoot
|
|
2304
|
+
AGENT_RUN_PROJECT_ROOT: context.projectRoot,
|
|
2305
|
+
AGENT_GLOBAL_MEMORY_DIR: context.paths.globalMemoryDir
|
|
2292
2306
|
}
|
|
2293
2307
|
}, null, 2)}\n`;
|
|
2294
2308
|
}
|
|
@@ -12,6 +12,7 @@ Do not edit this generated file. Edit `agent-run.jsonc` and `local.md.njk`.
|
|
|
12
12
|
- agentDir: `{{ agentDir }}`
|
|
13
13
|
- reviewFile: `{{ paths.reviewFile }}`
|
|
14
14
|
- memoriesDir: `{{ paths.memoriesDir }}`
|
|
15
|
+
- globalMemoryDir: `{{ paths.globalMemoryDir }}`
|
|
15
16
|
|
|
16
17
|
## Skills
|
|
17
18
|
|