@love-moon/conductor-cli 0.2.12 → 0.2.14
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/bin/conductor-config.js +2 -0
- package/bin/conductor-daemon.js +2 -12
- package/bin/conductor-diagnose.js +370 -0
- package/bin/conductor-fire.js +1065 -95
- package/bin/conductor.js +5 -1
- package/package.json +3 -3
- package/src/daemon.js +11 -2
package/bin/conductor.js
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* daemon - Start long-running daemon for task orchestration
|
|
9
9
|
* config - Interactive configuration setup
|
|
10
10
|
* update - Update the CLI to the latest version
|
|
11
|
+
* diagnose - Diagnose a task in production/backend
|
|
11
12
|
*/
|
|
12
13
|
|
|
13
14
|
import { fileURLToPath } from "node:url";
|
|
@@ -43,7 +44,7 @@ if (argv[0] === "--version" || argv[0] === "-v") {
|
|
|
43
44
|
const subcommand = argv[0];
|
|
44
45
|
|
|
45
46
|
// Valid subcommands
|
|
46
|
-
const validSubcommands = ["fire", "daemon", "config", "update"];
|
|
47
|
+
const validSubcommands = ["fire", "daemon", "config", "update", "diagnose"];
|
|
47
48
|
|
|
48
49
|
if (!validSubcommands.includes(subcommand)) {
|
|
49
50
|
console.error(`Error: Unknown subcommand '${subcommand}'`);
|
|
@@ -85,6 +86,7 @@ Subcommands:
|
|
|
85
86
|
daemon Start long-running daemon for task orchestration
|
|
86
87
|
config Interactive configuration setup
|
|
87
88
|
update Update the CLI to the latest version
|
|
89
|
+
diagnose Diagnose a task and print likely root cause
|
|
88
90
|
|
|
89
91
|
Options:
|
|
90
92
|
-h, --help Show this help message
|
|
@@ -94,6 +96,7 @@ Examples:
|
|
|
94
96
|
conductor fire -- "fix the bug"
|
|
95
97
|
conductor fire --backend claude -- "add feature"
|
|
96
98
|
conductor daemon --config-file ~/.conductor/config.yaml
|
|
99
|
+
conductor diagnose <task-id>
|
|
97
100
|
conductor config
|
|
98
101
|
conductor update
|
|
99
102
|
|
|
@@ -102,6 +105,7 @@ For subcommand-specific help:
|
|
|
102
105
|
conductor daemon --help
|
|
103
106
|
conductor config --help
|
|
104
107
|
conductor update --help
|
|
108
|
+
conductor diagnose --help
|
|
105
109
|
|
|
106
110
|
Version: ${pkgJson.version}
|
|
107
111
|
`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@love-moon/conductor-cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.14",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"conductor": "bin/conductor.js"
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"test": "node --test"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@love-moon/tui-driver": "0.2.
|
|
20
|
-
"@love-moon/conductor-sdk": "0.2.
|
|
19
|
+
"@love-moon/tui-driver": "0.2.14",
|
|
20
|
+
"@love-moon/conductor-sdk": "0.2.14",
|
|
21
21
|
"dotenv": "^16.4.5",
|
|
22
22
|
"enquirer": "^2.4.1",
|
|
23
23
|
"js-yaml": "^4.1.1",
|
package/src/daemon.js
CHANGED
|
@@ -173,9 +173,18 @@ export function startDaemon(config = {}, deps = {}) {
|
|
|
173
173
|
deriveWebsocketUrlFromHttp(BACKEND_HTTP);
|
|
174
174
|
const AGENT_TOKEN =
|
|
175
175
|
config.AGENT_TOKEN || process.env.CONDUCTOR_AGENT_TOKEN || fileConfig?.agentToken || "default-agent-token";
|
|
176
|
-
const
|
|
176
|
+
const configuredDaemonName =
|
|
177
|
+
(typeof userConfig.daemon_name === "string" && userConfig.daemon_name.trim()) ||
|
|
178
|
+
(typeof fileConfig?.daemonName === "string" && fileConfig.daemonName.trim()) ||
|
|
179
|
+
"";
|
|
180
|
+
const AGENT_NAME = (
|
|
181
|
+
config.DAEMON_NAME ||
|
|
182
|
+
configuredDaemonName ||
|
|
183
|
+
process.env.CONDUCTOR_DAEMON_NAME ||
|
|
184
|
+
os.hostname()
|
|
185
|
+
).trim();
|
|
177
186
|
if (!AGENT_NAME) {
|
|
178
|
-
logError("Daemon name is required. Set
|
|
187
|
+
logError("Daemon name is required. Set daemon_name in ~/.conductor/config.yaml or CONDUCTOR_DAEMON_NAME.");
|
|
179
188
|
return exitAndReturn(1);
|
|
180
189
|
}
|
|
181
190
|
const homeDir = process.env.HOME || os.homedir() || "/tmp";
|