@documentation-robotics/cli 0.1.12 → 0.1.13
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 +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/version.js +1 -1
- package/dist/server/server.js +25 -6
- package/dist/server/server.js.map +2 -2
- package/dist/telemetry/index.js +1 -1
- package/dist/viewer/README.md +6 -6
- package/dist/viewer/assets/main-B7AOQXXX.js +81 -0
- package/dist/viewer/assets/main-vdrFrG7q.css +1 -0
- package/dist/viewer/index.html +2 -2
- package/dist/viewer/manifest.json +10 -10
- package/dist/viewer/version.json +1 -1
- package/package.json +1 -1
- package/dist/viewer/assets/main-BRPZyc36.css +0 -1
- package/dist/viewer/assets/main-BrpLargo.js +0 -81
package/README.md
CHANGED
|
@@ -289,7 +289,7 @@ your-project/
|
|
|
289
289
|
│ └── ...
|
|
290
290
|
```
|
|
291
291
|
|
|
292
|
-
**
|
|
292
|
+
**Spec-version migrations**: When the model's spec version is older than the CLI's bundled spec (e.g. after a layer renumbering), run `dr upgrade` to migrate the on-disk model in place — see `MigrationRegistry` in `cli/src/core/migration-registry.ts` for the supported version paths.
|
|
293
293
|
|
|
294
294
|
### Specification Reference
|
|
295
295
|
|
package/dist/cli.js
CHANGED
|
@@ -48,7 +48,7 @@ async function extractExitCode(error) {
|
|
|
48
48
|
}
|
|
49
49
|
return 1;
|
|
50
50
|
}
|
|
51
|
-
const cliVersion = "0.1.
|
|
51
|
+
const cliVersion = "0.1.13", program = new Command();
|
|
52
52
|
(process.argv.includes("--version") || process.argv.includes("-V")) && (process.argv = ["node", "dr", "version"]), program.name("dr").description("Documentation Robotics CLI - Architecture Model Management").option("-v, --verbose", "Enable verbose output").option("--debug", "Enable debug mode").exitOverride().showSuggestionAfterError().hook("preAction", async (thisCommand) => {
|
|
53
53
|
const options = thisCommand.opts();
|
|
54
54
|
setGlobalOptions({
|
package/dist/commands/version.js
CHANGED
|
@@ -2,7 +2,7 @@ import ansis from "ansis";
|
|
|
2
2
|
import { getCliBundledSpecVersion } from "../utils/spec-version.js";
|
|
3
3
|
import { isTelemetryBuiltIn, isTelemetryConfigured } from "../telemetry/detect.js";
|
|
4
4
|
import { getSpecReferencePath, getModelPath } from "../utils/project-paths.js";
|
|
5
|
-
const gitHash = "
|
|
5
|
+
const gitHash = "3ba0141", cliVersion = "0.1.13";
|
|
6
6
|
async function versionCommand() {
|
|
7
7
|
const specVersion = getCliBundledSpecVersion(), telemetryBuiltIn = isTelemetryBuiltIn(), telemetryConfigured = await isTelemetryConfigured();
|
|
8
8
|
let telemetryStatus;
|
package/dist/server/server.js
CHANGED
|
@@ -62,6 +62,8 @@ class VisualizationServer {
|
|
|
62
62
|
// Selected chat client for server
|
|
63
63
|
chatInitializationError;
|
|
64
64
|
// Store initialization error for status endpoint
|
|
65
|
+
_testClaudeCmdOverride;
|
|
66
|
+
_testCopilotCmdOverride;
|
|
65
67
|
/**
|
|
66
68
|
* Valid spec node IDs per layer
|
|
67
69
|
* Dynamically loaded from compiled spec (spec/dist/{layer}.json at module load time)
|
|
@@ -1269,7 +1271,7 @@ class VisualizationServer {
|
|
|
1269
1271
|
async launchClaudeCodeChat(ws, conversationId, message, requestId) {
|
|
1270
1272
|
try {
|
|
1271
1273
|
const cmd = ["claude", "--agent", "dr-architect", "--print"];
|
|
1272
|
-
this.withDanger && cmd.push("--dangerously-skip-permissions"), cmd.push("--verbose", "--output-format", "stream-json");
|
|
1274
|
+
this.withDanger && cmd.push("--dangerously-skip-permissions"), cmd.push("--verbose", "--output-format", "stream-json"), this._testClaudeCmdOverride && cmd.splice(0, cmd.length, ...this._testClaudeCmdOverride);
|
|
1273
1275
|
const proc = spawn(cmd[0], cmd.slice(1), {
|
|
1274
1276
|
cwd: this.model.rootPath,
|
|
1275
1277
|
stdio: ["pipe", "pipe", "pipe"]
|
|
@@ -1424,10 +1426,14 @@ class VisualizationServer {
|
|
|
1424
1426
|
async launchCopilotChat(ws, conversationId, message, requestId) {
|
|
1425
1427
|
try {
|
|
1426
1428
|
let cmd;
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1429
|
+
if (this._testCopilotCmdOverride)
|
|
1430
|
+
cmd = [...this._testCopilotCmdOverride];
|
|
1431
|
+
else {
|
|
1432
|
+
const ghResult = spawnSync("gh", ["copilot", "--version"], {
|
|
1433
|
+
stdio: ["ignore", "pipe", "pipe"]
|
|
1434
|
+
});
|
|
1435
|
+
ghResult.error ? console.warn(`[Copilot] 'gh copilot --version' probe failed to spawn: ${getErrorMessage(ghResult.error)}`) : ghResult.status !== 0 && process.env.VERBOSE && console.log(`[Copilot] 'gh copilot' unavailable (exit ${ghResult.status}), falling back to standalone 'copilot'`), ghResult.status === 0 ? (cmd = ["gh", "copilot", "explain"], this.withDanger && cmd.push("--allow-all-tools"), cmd.push(message)) : (cmd = ["copilot", "explain"], this.withDanger && cmd.push("--allow-all-tools"), cmd.push(message));
|
|
1436
|
+
}
|
|
1431
1437
|
const proc = spawn(cmd[0], cmd.slice(1), {
|
|
1432
1438
|
cwd: this.model.rootPath,
|
|
1433
1439
|
stdio: ["pipe", "pipe", "pipe"]
|
|
@@ -1497,7 +1503,20 @@ class VisualizationServer {
|
|
|
1497
1503
|
}
|
|
1498
1504
|
}
|
|
1499
1505
|
})().catch((err) => {
|
|
1500
|
-
|
|
1506
|
+
const errorMsg = getErrorMessage(err);
|
|
1507
|
+
console.error(`[Copilot] Stream error: ${errorMsg}`);
|
|
1508
|
+
try {
|
|
1509
|
+
ws.send(JSON.stringify({
|
|
1510
|
+
jsonrpc: "2.0",
|
|
1511
|
+
error: {
|
|
1512
|
+
code: JSONRPC_ERRORS.INTERNAL_ERROR,
|
|
1513
|
+
message: `Stream error: ${errorMsg}`
|
|
1514
|
+
},
|
|
1515
|
+
id: requestId
|
|
1516
|
+
}));
|
|
1517
|
+
} catch (sendError) {
|
|
1518
|
+
console.error(`[Copilot] Failed to send stream error notification: ${getErrorMessage(sendError)}`);
|
|
1519
|
+
}
|
|
1501
1520
|
});
|
|
1502
1521
|
} catch (error) {
|
|
1503
1522
|
const errorMsg = getErrorMessage(error);
|