@duo-director/cli 0.1.1 → 0.2.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 CHANGED
@@ -11,12 +11,15 @@ npm install -g @duo-director/cli # 1. install the duoctl executable
11
11
  cd your-git-repository
12
12
  duoctl init # 2. initialize DUO in this repository (.duo-project/, first index, adoption baseline)
13
13
  duoctl install codex # 3. connect a coding agent (or: duoctl install claude-code)
14
+ duoctl doctor # 4. check the whole setup and see what to do next (read-only)
14
15
  # optional
15
16
  duoctl ui # local read-only console on 127.0.0.1
16
17
  ```
17
18
 
18
19
  Step 3 shows the planned file changes first and asks before writing. Codex needs the project to be trusted; Claude Code asks you to approve the `duo-director` server. DUO never commits.
19
20
 
21
+ `duoctl doctor` checks Git (an initial commit is required), Project Truth, the index, the analysis level per language, connected agents (it starts their MCP server) and the optional LLM settings, then lists the first one to three things to do. It never initializes, indexes, installs or changes a file. An agent you have not connected and a disabled LLM are fine.
22
+
20
23
  `duoctl init` works on an existing repository: it observes the repository, asks a few questions, writes a minimal Project Truth, builds the first index and records an adoption baseline, so problems that existed before DUO are told apart from new ones.
21
24
 
22
25
  Language support: every Git repository gets file-level analysis (L0); TypeScript/JavaScript, Java, C#, C++ and Python get structural analysis (L1); TypeScript/JavaScript also get module and call resolution (L2). Other languages stay file-level.
@@ -0,0 +1,29 @@
1
+ // apps/cli/dist/node-version.js
2
+ function nodeVersionProblem(current, range) {
3
+ const want = /^>=\s*(\d+)\.(\d+)\.(\d+)$/u.exec(range.trim());
4
+ const have = /^v?(\d+)\.(\d+)\.(\d+)/u.exec(current);
5
+ if (want === null || have === null)
6
+ return void 0;
7
+ const a = have.slice(1, 4).map(Number);
8
+ const b = want.slice(1, 4).map(Number);
9
+ for (let i = 0; i < 3; i++) {
10
+ if (a[i] > b[i])
11
+ return void 0;
12
+ if (a[i] < b[i]) {
13
+ return `duoctl requires Node.js ${range.trim()} (this is ${current}). Install a supported Node.js release; DUO does not bundle Node.js.`;
14
+ }
15
+ }
16
+ return void 0;
17
+ }
18
+
19
+ // apps/cli/dist/version.js
20
+ import { createRequire } from "node:module";
21
+ var pkg = createRequire(import.meta.url)("../package.json");
22
+ var VERSION = pkg.version;
23
+ var NODE_ENGINE = pkg.engines?.node ?? ">=24.15.0";
24
+
25
+ export {
26
+ nodeVersionProblem,
27
+ VERSION,
28
+ NODE_ENGINE
29
+ };