overlord-cli 3.18.0 → 3.21.0
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/README.md +3 -1
- package/bin/_cli/index.mjs +15 -1
- package/bin/_cli/new-ticket.mjs +15 -2
- package/bin/_cli/setup.mjs +18 -1
- package/package.json +2 -3
package/README.md
CHANGED
|
@@ -12,6 +12,8 @@ Install it globally so the `ovld` and `overlord` commands are available on your
|
|
|
12
12
|
npm install -g overlord-cli
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
+
Use Node.js 20 or newer for every CLI install or update.
|
|
16
|
+
|
|
15
17
|
## Usage
|
|
16
18
|
|
|
17
19
|
```bash
|
|
@@ -38,7 +40,7 @@ ovld doctor
|
|
|
38
40
|
|
|
39
41
|
## Requirements
|
|
40
42
|
|
|
41
|
-
- Node.js
|
|
43
|
+
- Node.js 20 or newer
|
|
42
44
|
- Access to an Overlord instance when using authenticated commands
|
|
43
45
|
|
|
44
46
|
## Commands
|
package/bin/_cli/index.mjs
CHANGED
|
@@ -3,13 +3,24 @@
|
|
|
3
3
|
import { runAttachCommand } from './attach.mjs';
|
|
4
4
|
import { runAuthCommand } from './auth.mjs';
|
|
5
5
|
import { runLauncherCommand } from './launcher.mjs';
|
|
6
|
-
import { runCreateCommand, runPromptCommand } from './new-ticket.mjs';
|
|
7
6
|
import { runProtocolCommand } from './protocol.mjs';
|
|
8
7
|
import { runDoctorCommand, runSetupCommand } from './setup.mjs';
|
|
9
8
|
import { runTicketCommand } from './ticket.mjs';
|
|
10
9
|
import { runTicketsCommand } from './tickets.mjs';
|
|
11
10
|
import { runVersionCommand } from './version.mjs';
|
|
12
11
|
|
|
12
|
+
const MIN_NODE_MAJOR = 20;
|
|
13
|
+
|
|
14
|
+
function assertSupportedNodeVersion() {
|
|
15
|
+
const major = Number.parseInt(process.versions.node.split('.')[0] ?? '', 10);
|
|
16
|
+
if (Number.isNaN(major) || major < MIN_NODE_MAJOR) {
|
|
17
|
+
throw new Error(
|
|
18
|
+
`Overlord CLI requires Node.js ${MIN_NODE_MAJOR} or newer. Found ${process.version}.\n` +
|
|
19
|
+
`Update Node before running \`ovld\`. If you installed the desktop wrapper, you can also point it at a newer runtime with \`OVLD_NODE_BIN=/path/to/node\`.`
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
13
24
|
function printHelp(primaryCommand) {
|
|
14
25
|
console.log(`Overlord CLI
|
|
15
26
|
|
|
@@ -53,6 +64,7 @@ Run a subcommand with --help for more detail.
|
|
|
53
64
|
}
|
|
54
65
|
|
|
55
66
|
export async function runCli({ primaryCommand }) {
|
|
67
|
+
assertSupportedNodeVersion();
|
|
56
68
|
const [command, ...rest] = process.argv.slice(2);
|
|
57
69
|
|
|
58
70
|
if (!command || command === 'help' || command === '--help' || command === '-h') {
|
|
@@ -67,11 +79,13 @@ export async function runCli({ primaryCommand }) {
|
|
|
67
79
|
}
|
|
68
80
|
|
|
69
81
|
if (command === 'create') {
|
|
82
|
+
const { runCreateCommand } = await import('./new-ticket.mjs');
|
|
70
83
|
await runCreateCommand(rest);
|
|
71
84
|
return;
|
|
72
85
|
}
|
|
73
86
|
|
|
74
87
|
if (command === 'prompt') {
|
|
88
|
+
const { runPromptCommand } = await import('./new-ticket.mjs');
|
|
75
89
|
await runPromptCommand(rest);
|
|
76
90
|
return;
|
|
77
91
|
}
|
package/bin/_cli/new-ticket.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import readline from 'node:readline
|
|
3
|
+
import readline from 'node:readline';
|
|
4
4
|
import { stdin as input, stdout as output } from 'node:process';
|
|
5
5
|
|
|
6
6
|
import { buildAuthHeaders, resolveAuth } from './credentials.mjs';
|
|
@@ -90,6 +90,19 @@ async function promptForSelection({ items, label, prompt, renderItem }) {
|
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
const rl = readline.createInterface({ input, output });
|
|
93
|
+
const question = promptText =>
|
|
94
|
+
new Promise((resolve, reject) => {
|
|
95
|
+
const handleError = error => {
|
|
96
|
+
rl.off('error', handleError);
|
|
97
|
+
reject(error);
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
rl.once('error', handleError);
|
|
101
|
+
rl.question(promptText, answer => {
|
|
102
|
+
rl.off('error', handleError);
|
|
103
|
+
resolve(answer);
|
|
104
|
+
});
|
|
105
|
+
});
|
|
93
106
|
|
|
94
107
|
try {
|
|
95
108
|
while (true) {
|
|
@@ -98,7 +111,7 @@ async function promptForSelection({ items, label, prompt, renderItem }) {
|
|
|
98
111
|
output.write(` ${index + 1}. ${renderItem(item, index)}\n`);
|
|
99
112
|
});
|
|
100
113
|
|
|
101
|
-
const answer = await
|
|
114
|
+
const answer = await question(`\n${prompt} `);
|
|
102
115
|
const selectedIndex = parseNumberedSelection(answer, items.length);
|
|
103
116
|
if (selectedIndex !== null) {
|
|
104
117
|
return items[selectedIndex];
|
package/bin/_cli/setup.mjs
CHANGED
|
@@ -32,6 +32,7 @@ const CODEX_TARGET_RULES = path.join(os.homedir(), '.codex', 'rules', 'default.r
|
|
|
32
32
|
const CODEX_LEGACY_AGENTS = path.join(os.homedir(), '.codex', 'AGENTS.md');
|
|
33
33
|
const CODEX_RULES_START = '# overlord:permissions:start';
|
|
34
34
|
const CODEX_RULES_END = '# overlord:permissions:end';
|
|
35
|
+
const REQUIRED_NODE_MAJOR = 20;
|
|
35
36
|
|
|
36
37
|
const supportedAgents = ['claude', 'codex', 'cursor', 'gemini', 'opencode'];
|
|
37
38
|
|
|
@@ -971,6 +972,10 @@ function doctorAgent(agent) {
|
|
|
971
972
|
return true;
|
|
972
973
|
}
|
|
973
974
|
|
|
975
|
+
function currentNodeMajor() {
|
|
976
|
+
return Number.parseInt(process.versions.node.split('.')[0] ?? '', 10);
|
|
977
|
+
}
|
|
978
|
+
|
|
974
979
|
// ---------------------------------------------------------------------------
|
|
975
980
|
// Public API
|
|
976
981
|
// ---------------------------------------------------------------------------
|
|
@@ -1033,6 +1038,16 @@ export async function runSetupCommand(args) {
|
|
|
1033
1038
|
export async function runDoctorCommand() {
|
|
1034
1039
|
console.log('Overlord agent bundle status:\n');
|
|
1035
1040
|
let allOk = true;
|
|
1041
|
+
const nodeMajor = currentNodeMajor();
|
|
1042
|
+
if (Number.isNaN(nodeMajor) || nodeMajor < REQUIRED_NODE_MAJOR) {
|
|
1043
|
+
console.log(
|
|
1044
|
+
` ✗ node: unsupported runtime (${process.version}; requires Node.js ${REQUIRED_NODE_MAJOR}+)`
|
|
1045
|
+
);
|
|
1046
|
+
allOk = false;
|
|
1047
|
+
} else {
|
|
1048
|
+
console.log(` ✓ node: ${process.version}`);
|
|
1049
|
+
}
|
|
1050
|
+
console.log();
|
|
1036
1051
|
for (const agent of supportedAgents) {
|
|
1037
1052
|
if (!doctorAgent(agent)) allOk = false;
|
|
1038
1053
|
}
|
|
@@ -1046,6 +1061,8 @@ export async function runDoctorCommand() {
|
|
|
1046
1061
|
if (latestCliVersion) {
|
|
1047
1062
|
console.log();
|
|
1048
1063
|
console.log(`CLI update available: ${latestCliVersion}`);
|
|
1049
|
-
console.log(
|
|
1064
|
+
console.log(
|
|
1065
|
+
`Update with Node.js ${REQUIRED_NODE_MAJOR}+ and reinstall the installed CLI wrapper if needed.`
|
|
1066
|
+
);
|
|
1050
1067
|
}
|
|
1051
1068
|
}
|
package/package.json
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "overlord-cli",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.21.0",
|
|
4
4
|
"description": "Overlord CLI — launch AI agents on tickets from anywhere",
|
|
5
|
-
"private": false,
|
|
6
5
|
"type": "module",
|
|
7
6
|
"bin": {
|
|
8
7
|
"overlord": "bin/ovld.mjs",
|
|
@@ -16,7 +15,7 @@
|
|
|
16
15
|
"plugins/"
|
|
17
16
|
],
|
|
18
17
|
"engines": {
|
|
19
|
-
"node": ">=
|
|
18
|
+
"node": ">=20"
|
|
20
19
|
},
|
|
21
20
|
"keywords": [
|
|
22
21
|
"overlord",
|