@technomoron/agent-run 0.99.10 → 0.99.11
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 +27 -0
- 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.11 (2026-04-27)
|
|
8
|
+
----------------------------
|
|
9
|
+
* Show the package version in `agent-run --help` and add `agent-run --version`.
|
|
10
|
+
|
|
7
11
|
Version 0.99.10 (2026-04-27)
|
|
8
12
|
----------------------------
|
|
9
13
|
* Add `paths.globalMemoryDir` to render context and expose it from default Codex, Claude, AGENTS, and CLAUDE templates.
|
package/dist/agent-run.js
CHANGED
|
@@ -22,6 +22,7 @@ const CONFIG_DIR_ENV = 'AGENT_CONFIG_DIR';
|
|
|
22
22
|
const VERBOSE_ENV = 'AGENT_RUN_VERBOSE';
|
|
23
23
|
const MANIFEST_FILE_NAME = 'agent-run.jsonc';
|
|
24
24
|
const LOCAL_TEMPLATE_FILE_NAME = 'local.md.njk';
|
|
25
|
+
const PACKAGE_VERSION = '0.99.10';
|
|
25
26
|
const UNEXPANDED_TEMPLATE_RE = /\{\{[^}]+\}\}|\{%[^%]+%\}/;
|
|
26
27
|
const agentRunEnvCache = new Map();
|
|
27
28
|
const GENERATED_GITIGNORE_ENTRIES = [
|
|
@@ -114,6 +115,9 @@ function parseInvocation(invokedTool, argv) {
|
|
|
114
115
|
if (isHelpFlag(firstArg)) {
|
|
115
116
|
printHelp('general');
|
|
116
117
|
}
|
|
118
|
+
if (isVersionFlag(firstArg)) {
|
|
119
|
+
printVersion();
|
|
120
|
+
}
|
|
117
121
|
const commandIndex = findCommandArgIndex(inputArgs);
|
|
118
122
|
if (commandIndex === -1) {
|
|
119
123
|
fail(`unknown command: ${firstArg ?? ''} (run with --help for usage)`);
|
|
@@ -341,6 +345,13 @@ function parseMigrateConfigCommand(inputArgs) {
|
|
|
341
345
|
function isHelpFlag(value) {
|
|
342
346
|
return value === '-h' || value === '--help';
|
|
343
347
|
}
|
|
348
|
+
function isVersionFlag(value) {
|
|
349
|
+
return value === '-V' || value === '--version';
|
|
350
|
+
}
|
|
351
|
+
function printVersion() {
|
|
352
|
+
process.stdout.write(`agent-run ${agentRunVersion()}\n`);
|
|
353
|
+
process.exit(0);
|
|
354
|
+
}
|
|
344
355
|
function printHelp(topic) {
|
|
345
356
|
process.stdout.write(renderHelp(topic));
|
|
346
357
|
process.exit(0);
|
|
@@ -394,6 +405,8 @@ function renderHelp(topic) {
|
|
|
394
405
|
case 'general':
|
|
395
406
|
default:
|
|
396
407
|
return [
|
|
408
|
+
`agent-run ${agentRunVersion()}`,
|
|
409
|
+
'',
|
|
397
410
|
'Usage:',
|
|
398
411
|
' agent-run <codex|claude|check|init|edit|update> [options]',
|
|
399
412
|
' agent-run --init [config-root]',
|
|
@@ -410,6 +423,7 @@ function renderHelp(topic) {
|
|
|
410
423
|
'',
|
|
411
424
|
'Global options:',
|
|
412
425
|
' -h, --help Show this help text',
|
|
426
|
+
' -V, --version Show the agent-run version',
|
|
413
427
|
' -v, --verbose Print path resolution and wrapper actions',
|
|
414
428
|
' --config-root DIR Override the agent-config root',
|
|
415
429
|
' --init [DIR] Copy the packaged starter config root to DIR (default ~/.agent-config)',
|
|
@@ -422,6 +436,19 @@ function renderHelp(topic) {
|
|
|
422
436
|
].join('\n');
|
|
423
437
|
}
|
|
424
438
|
}
|
|
439
|
+
function agentRunVersion() {
|
|
440
|
+
const packagePath = path.resolve(__dirname, '..', 'package.json');
|
|
441
|
+
try {
|
|
442
|
+
const pkg = JSON.parse(fs.readFileSync(packagePath, 'utf8'));
|
|
443
|
+
if (typeof pkg.version === 'string' && pkg.version.length > 0) {
|
|
444
|
+
return pkg.version;
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
catch {
|
|
448
|
+
return PACKAGE_VERSION;
|
|
449
|
+
}
|
|
450
|
+
return PACKAGE_VERSION;
|
|
451
|
+
}
|
|
425
452
|
function normalizeCommandName(value) {
|
|
426
453
|
if (!value) {
|
|
427
454
|
return null;
|