@documentation-robotics/cli 0.1.9 → 0.1.10
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/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/version.js +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/utils/spec-version.js +1 -1
- package/dist/utils/spec-version.js.map +2 -2
- package/dist/viewer/README.md +6 -6
- package/dist/viewer/assets/main-BRPZyc36.css +1 -0
- package/dist/viewer/assets/main-BrpLargo.js +81 -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-D114QwJo.css +0 -1
- package/dist/viewer/assets/main-DyuokeQj.js +0 -81
package/dist/cli.js
CHANGED
|
@@ -47,7 +47,7 @@ async function extractExitCode(error) {
|
|
|
47
47
|
}
|
|
48
48
|
return 1;
|
|
49
49
|
}
|
|
50
|
-
const cliVersion = "0.1.
|
|
50
|
+
const cliVersion = "0.1.10", program = new Command();
|
|
51
51
|
(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) => {
|
|
52
52
|
const options = thisCommand.opts();
|
|
53
53
|
setGlobalOptions({
|
package/dist/cli.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/cli.ts"],
|
|
4
4
|
"sourcesContent": ["#!/usr/bin/env node\n\n/**\n * Documentation Robotics CLI - Bun Implementation\n * Entry point for the command-line interface\n *\n * Instrumented with OpenTelemetry to create root spans for command execution.\n * Telemetry is controlled by the TELEMETRY_ENABLED build-time constant.\n */\n\nimport { Command, CommanderError } from \"commander\";\nimport { setGlobalOptions } from \"./utils/globals.js\";\nimport { initCommand } from \"./commands/init.js\";\nimport { addCommand } from \"./commands/add.js\";\nimport { updateCommand } from \"./commands/update.js\";\nimport { deleteCommand } from \"./commands/delete.js\";\nimport { showCommand } from \"./commands/show.js\";\nimport { listCommand } from \"./commands/list.js\";\nimport { searchCommand } from \"./commands/search.js\";\nimport { validateCommand } from \"./commands/validate.js\";\nimport { infoCommand } from \"./commands/info.js\";\nimport { relationshipCommands } from \"./commands/relationship.js\";\nimport { elementCommands } from \"./commands/element.js\";\nimport { schemaCommands } from \"./commands/schema.js\";\nimport { catalogCommands } from \"./commands/catalog.js\";\nimport { docsCommands } from \"./commands/docs.js\";\nimport { traceCommand } from \"./commands/trace.js\";\nimport { exportCommand } from \"./commands/export.js\";\nimport { importCommand } from \"./commands/import.js\";\nimport { chatCommand } from \"./commands/chat.js\";\nimport { upgradeCommand } from \"./commands/upgrade.js\";\nimport { conformanceCommand } from \"./commands/conformance.js\";\nimport { changesetCommands } from \"./commands/changeset.js\";\nimport { claudeCommands } from \"./commands/claude.js\";\nimport { copilotCommands } from \"./commands/copilot.js\";\nimport { analyzerCommands } from \"./commands/analyzer.js\";\nimport { versionCommand } from \"./commands/version.js\";\nimport { statsCommand } from \"./commands/stats.js\";\nimport { reportCommand } from \"./commands/report.js\";\nimport { reportsCommands } from \"./commands/reports.js\";\nimport { auditCommand } from \"./commands/audit.js\";\nimport { auditDiffCommand } from \"./commands/audit-diff.js\";\nimport { auditSnapshotsCommand } from \"./commands/audit-snapshots.js\";\nimport { initTelemetry, startActiveSpan, shutdownTelemetry } from \"./telemetry/index.js\";\nimport { installConsoleInterceptor } from \"./telemetry/console-interceptor.js\";\nimport { getErrorMessage } from \"./utils/errors.js\";\n\n// Declare TELEMETRY_ENABLED as a build-time constant (substituted by esbuild)\n// Provide runtime fallback when not running through esbuild\ndeclare const TELEMETRY_ENABLED: boolean;\nconst isTelemetryEnabled = typeof TELEMETRY_ENABLED !== \"undefined\" ? TELEMETRY_ENABLED : false;\n\n// Commands that require console interceptor for telemetry logging\nconst CONSOLE_LOGGING_COMMANDS = new Set(['chat', 'validate', 'import', 'export']);\n\n/**\n * Extract exit code from an error object.\n * Handles CLIError instances and duck-typed objects with exitCode property.\n */\nasync function extractExitCode(error: unknown): Promise<number> {\n const { CLIError } = await import(\"./utils/errors.js\");\n\n if (error instanceof CLIError) {\n return error.exitCode;\n }\n\n // Commander's own errors (--help, unknown commands, etc.) carry exitCode as\n // expected control flow \u2014 handle them directly without duck-typing.\n if (error instanceof CommanderError) {\n return error.exitCode;\n }\n\n // Fallback for duck-typing (handles bundling/module issues)\n if (error && typeof error === \"object\" && \"exitCode\" in error) {\n const errorObj = error as any;\n if (typeof errorObj.exitCode === \"number\") {\n // Validate this looks like a CLIError before accepting\n if (errorObj.name === \"CLIError\" || errorObj.message) {\n if (process.argv.includes(\"--debug\")) {\n console.warn(\n \"[DEBUG] Using duck-typed error object as fallback - this may indicate a module loading issue\"\n );\n }\n return errorObj.exitCode;\n }\n }\n }\n\n return 1;\n}\n\n// Declare build-time constant (substituted by esbuild)\ndeclare const CLI_VERSION: string;\nconst cliVersion = typeof CLI_VERSION !== \"undefined\" ? CLI_VERSION : \"0.1.3\";\n\nconst program = new Command();\n\n// Handle --version and -V flags by redirecting to version command\n// This ensures they go through the telemetry wrapper\nif (process.argv.includes(\"--version\") || process.argv.includes(\"-V\")) {\n process.argv = [\"node\", \"dr\", \"version\"];\n}\n\nprogram\n .name(\"dr\")\n .description(\"Documentation Robotics CLI - Architecture Model Management\")\n .option(\"-v, --verbose\", \"Enable verbose output\")\n .option(\"--debug\", \"Enable debug mode\")\n .exitOverride() // Prevent Commander from calling process.exit() - we handle exit ourselves\n .showSuggestionAfterError() // \"Did you mean X?\" on unknown commands/options\n .hook(\"preAction\", async (thisCommand) => {\n // Set up global state (verbose/debug flags)\n const options = thisCommand.opts();\n setGlobalOptions({\n verbose: options.verbose as boolean | undefined,\n debug: options.debug as boolean | undefined,\n });\n });\n\n// Model commands\nprogram\n .command(\"init [name]\")\n .description(\"Initialize a new architecture model\")\n .option(\"--name <name>\", \"Model name (overrides positional argument)\")\n .option(\"--author <author>\", \"Model author\")\n .option(\"--description <desc>\", \"Model description\")\n .addHelpText(\n \"after\",\n `\nExamples:\n $ dr init\n $ dr init claudetoreum\n $ dr init \"Enterprise Architecture\" --author \"Team A\"\n $ dr init --name \"My Project\" --description \"13-layer federated model\"`\n )\n .action((name, options) => initCommand({ ...options, name: options.name || name }));\n\nprogram\n .command(\"add <layer> <type> <name>\")\n .description(\"Add an element to a layer\")\n .option(\"--name <name>\", \"Element display name (defaults to the name argument)\")\n .option(\"--description <desc>\", \"Element description\")\n .option(\"--attributes <json>\", \"Element type-specific attributes as JSON object\")\n .option(\"--source-file <path>\", \"Source file path (relative from repository root)\")\n .option(\"--source-symbol <name>\", \"Symbol name (class, function, variable) in source file\")\n .option(\"--source-provenance <type>\", \"Provenance type: extracted, manual, inferred, generated\")\n .option(\"--source-repo-remote <url>\", \"Git remote URL for repository context\")\n .option(\"--source-repo-commit <sha>\", \"Git commit SHA (40 hex characters) for repository context\")\n .addHelpText(\n \"after\",\n `\nExamples:\n $ dr add business service \"Customer Management\"\n $ dr add api operation \"Create Customer\" --attributes '{\"operationId\":\"createCustomer\",\"summary\":\"Create a customer\",\"tags\":\"customers\"}'\n $ dr add application component \"Customer API\" --description \"REST API for customer operations\"\n $ dr add security policy \"Auth Validator\" --source-file \"src/auth/validator.ts\" --source-symbol \"validateToken\" --source-provenance \"extracted\"\n\nNote: Element IDs are generated automatically in format {layer}.{type}.{kebab-name}`\n )\n .action(addCommand);\n\nprogram\n .command(\"update <id>\")\n .description(\"Update an element\")\n .option(\"--name <name>\", \"New element name\")\n .option(\"--description <desc>\", \"New description\")\n .option(\"--type <new-type>\", \"Change element type (must be valid for the element's layer; incompatible attributes must be cleaned up manually)\")\n .option(\"--attributes <json>\", \"Updated type-specific attributes (JSON)\")\n .option(\"--source-file <path>\", \"Source file path (relative from repository root)\")\n .option(\"--source-symbol <name>\", \"Symbol name (class, function, variable) in source file\")\n .option(\"--source-provenance <type>\", \"Provenance type: extracted, manual, inferred, generated\")\n .option(\"--source-repo-remote <url>\", \"Git remote URL for repository context\")\n .option(\"--source-repo-commit <sha>\", \"Git commit SHA (40 hex characters) for repository context\")\n .option(\"--clear-source-reference\", \"Remove source reference from element\")\n .addHelpText(\n \"after\",\n `\nNote: Changes are written immediately to model files.\nTo track changes for review, activate a changeset first:\n $ dr changeset activate my-changeset\n\nExamples:\n $ dr update api-endpoint-create-customer --name \"Create Customer (v2)\"\n $ dr update business-service-order --description \"Updated description\"\n $ dr update application-applicationfunction-process-orders --type applicationservice\n $ dr update security-policy-auth --source-file \"src/auth/policy.ts\" --source-provenance \"extracted\"`\n )\n .action(updateCommand);\n\nprogram\n .command(\"delete <id>\")\n .description(\"Delete an element\")\n .option(\"--force\", \"Skip dependency checks (confirmation is also skipped in non-TTY environments)\")\n .option(\"--cascade\", \"Remove dependent elements automatically\")\n .option(\"--dry-run\", \"Show what would be removed without actually removing\")\n .addHelpText(\n \"after\",\n `\nExamples:\n $ dr delete api-endpoint-old-endpoint\n $ dr delete api-endpoint-old-endpoint --force\n $ dr delete api-endpoint-old-endpoint --cascade\n $ dr delete api-endpoint-old-endpoint --dry-run\n $ dr delete api-endpoint-old-endpoint --cascade --dry-run`\n )\n .action(deleteCommand);\n\nprogram\n .command(\"show <id>\")\n .description(\"Display element details\")\n .option(\"--model <path>\", \"Path to model root (contains model/manifest.yaml)\")\n .addHelpText(\n \"after\",\n `\nExamples:\n $ dr show api-endpoint-create-customer\n $ dr show business-service-order-mgmt`\n )\n .action((id, options) => showCommand(id, options));\n\nprogram\n .command(\"list [layer]\")\n .description(\"List elements in a layer (or all layers if omitted)\")\n .option(\"--type <type>\", \"Filter by element type\")\n .option(\"--json\", \"Output as JSON\")\n .option(\"--model <path>\", \"Path to model root (contains model/manifest.yaml)\")\n .addHelpText(\n \"after\",\n `\nExamples:\n $ dr list\n $ dr list api\n $ dr list business --type businessservice\n $ dr list api --json\n $ dr list --json`\n )\n .action(listCommand);\n\nprogram\n .command(\"search <query>\")\n .description(\"Search for elements by name or ID\")\n .option(\"--layer <layer>\", \"Limit search to specific layer\")\n .option(\"--type <type>\", \"Filter by element type\")\n .option(\n \"--source-file <path>\",\n \"Find elements referencing a source file (takes precedence over pattern matching)\"\n )\n .option(\"--json\", \"Output as JSON\")\n .addHelpText(\n \"after\",\n `\nExamples:\n $ dr search customer\n $ dr search \"order processing\" --layer business\n $ dr search create-* --type endpoint\n $ dr search \"\" --source-file src/api/customer.ts`\n )\n .action(searchCommand);\n\nprogram\n .command(\"validate\")\n .description(\"Validate the architecture model\")\n .option(\"--layers <layers...>\", \"Specific layers to validate\")\n .option(\"--strict\", \"Treat warnings as errors\")\n .option(\"--verbose\", \"Show detailed validation output with relationship breakdown\")\n .option(\"--quiet\", \"Show minimal output\")\n .option(\"--output <path>\", \"Export validation report to file (JSON or Markdown)\")\n .option(\"--model <path>\", \"Path to model root (contains model/manifest.yaml)\")\n .option(\"--orphans\", \"Show only orphaned elements grouped by layer with relationship suggestions\")\n .option(\"--all\", \"Run all validations (default behavior)\")\n .option(\"--markdown\", \"Validate markdown structure\")\n .option(\"--schemas\", \"Validate JSON schemas\")\n .option(\"--schema\", \"Validate JSON schemas (alias for --schemas)\")\n .option(\"--relationships\", \"Validate relationships\")\n .option(\"--structure\", \"Validate documentation structure\")\n .option(\"--naming\", \"Validate naming conventions\")\n .option(\"--references\", \"Validate cross-layer references\")\n .addHelpText(\n \"after\",\n `\nExamples:\n $ dr validate\n $ dr validate --all --strict\n $ dr validate --verbose\n $ dr validate --quiet\n $ dr validate --output report.json\n $ dr validate --output report.md\n $ dr validate --schemas\n $ dr validate --relationships\n $ dr validate --layers business api\n $ dr validate --orphans\n $ dr validate --orphans --output orphans.json`\n )\n .action(validateCommand);\n\nprogram\n .command(\"export <format>\")\n .description(\"Export the architecture model to various formats\")\n .option(\"--output <path>\", \"Output file path (default: print to stdout)\")\n .option(\"--layers <layers...>\", \"Specific layers to export\")\n .option(\"--model <path>\", \"Path to model root directory or manifest.yaml file\")\n .option(\"--include-sources\", \"Include source file paths in PlantUML diagrams as notes\")\n .addHelpText(\n \"after\",\n `\nSupported formats:\n archimate Export to ArchiMate XML (layers 1, 2, 5, 6)\n openapi Export to OpenAPI 3.0 specification (layer 7)\n jsonschema Export to JSON Schema (layer 8)\n plantuml Export to PlantUML diagram\n graphml Export to GraphML (graph visualization)\n markdown Export to Markdown documentation\n\nExamples:\n $ dr export archimate --output model.xml\n $ dr export openapi --layers api\n $ dr export plantuml --include-sources --output diagram.puml\n $ dr export markdown --output docs/architecture.md`\n )\n .action(async (format, options) => {\n await exportCommand({\n format,\n output: options.output,\n layers: options.layers,\n model: options.model,\n includeSources: options.includeSources,\n });\n });\n\nprogram\n .command(\"import <format>\")\n .description(\"Import architecture model from various formats\")\n .option(\"--input <path>\", \"Input file path (required)\", undefined)\n .option(\"--model <path>\", \"Path to model root directory or manifest.yaml file\")\n .option(\n \"--merge-strategy <strategy>\",\n \"How to handle existing elements: add, update, skip (default: add)\"\n )\n .addHelpText(\n \"after\",\n `\nSupported formats:\n archimate Import from ArchiMate XML (layers 1, 2, 5, 6)\n openapi Import from OpenAPI 3.0 specification (layer 7)\n\nExamples:\n $ dr import archimate --input model.xml\n $ dr import openapi --input api.json --merge-strategy add\n $ dr import archimate --input model.xml --model ./myproject`\n )\n .action(async (format, options) => {\n if (!options.input) {\n console.error(\"Error: --input path is required\");\n process.exit(1);\n }\n await importCommand({\n format,\n input: options.input,\n model: options.model,\n mergeStrategy: options.mergeStrategy as \"add\" | \"update\" | \"skip\" | undefined,\n });\n });\n\nprogram\n .command(\"info\")\n .description(\"Show model information\")\n .option(\"--layer <layer>\", \"Show specific layer details\")\n .option(\"--verbose\", \"Show detailed breakdown by element type\")\n .addHelpText(\n \"after\",\n `\nExamples:\n $ dr info\n $ dr info --layer business\n $ dr info --layer api --verbose`\n )\n .action(infoCommand);\n\nprogram\n .command(\"stats\")\n .description(\"Display model statistics and health metrics\")\n .option(\"--model <path>\", \"Path to the model directory\")\n .option(\"--format <format>\", \"Output format: text (default), json, markdown, compact\")\n .option(\"--output <path>\", \"Output file path (auto-detects format from extension)\")\n .option(\"--compact\", \"Show compact one-line summary\")\n .option(\"--verbose\", \"Show detailed information\")\n .addHelpText(\n \"after\",\n `\nOutput formats:\n text Full formatted statistics (default)\n json JSON output for automation\n markdown Markdown report format\n compact Single-line summary\n\nExamples:\n $ dr stats # Show full statistics\n $ dr stats --compact # Show one-line summary\n $ dr stats --format json # Output as JSON\n $ dr stats --output stats.md # Save as markdown file\n $ dr stats --output stats.json # Save as JSON file\n $ dr stats --verbose # Show detailed information`\n )\n .action((options) => statsCommand(options));\n\nprogram\n .command(\"report\")\n .description(\"Generate comprehensive architecture reports\")\n .option(\"--model <path>\", \"Path to the model directory\")\n .option(\"--type <type>\", \"Report type: comprehensive (default), statistics, relationships, data-model, quality\")\n .option(\"--format <format>\", \"Output format: text (default), json, markdown\")\n .option(\"--output <path>\", \"Output file path (auto-detects format from extension)\")\n .option(\"--verbose\", \"Show detailed information\")\n .option(\"--include-data-model\", \"Include data model analysis (default: true)\")\n .option(\"--include-quality\", \"Include quality metrics (default: true)\")\n .addHelpText(\n \"after\",\n `\nReport types:\n comprehensive Full report with statistics, relationships, and data model (default)\n statistics Statistics and quality metrics\n relationships Relationship analysis and classification\n data-model Layer 8 data model analysis\n quality Quality metrics and recommendations\n\nOutput formats:\n text Full formatted report (default)\n json JSON output for automation\n markdown Markdown report format\n\nExamples:\n $ dr report # Show comprehensive report\n $ dr report --type relationships # Show relationship analysis\n $ dr report --format json # Output as JSON\n $ dr report --output report.md # Save as markdown file\n $ dr report --type data-model --output dm.md # Data model report as markdown\n $ dr report --verbose # Show detailed information`\n )\n .action((options) => reportCommand(options));\n\n// Reports subcommands (managed layer report files)\nconst reportsGroup = program.command(\"reports\").description(\"Manage architecture layer reports\");\nreportsCommands(reportsGroup);\n\n// Audit command - Relationship analysis\nprogram\n .command(\"audit [layer]\")\n .description(\"Analyze relationship coverage, gaps, duplicates, and balance\")\n .option(\"--type <type>\", \"Audit type: relationships (default), nodes, all\")\n .option(\"--format <format>\", \"Output format: text (default), json, markdown\")\n .option(\"--output <path>\", \"Output file path (auto-detects format from extension)\")\n .option(\"--verbose\", \"Show detailed analysis\")\n .option(\"--save-snapshot\", \"Save audit report as snapshot for differential analysis\")\n .addHelpText(\n \"after\",\n `\nAudit types:\n relationships Relationship coverage, gaps, duplicates, balance (default)\n nodes Node type usage distribution across model layers\n all Both relationship and node audits\n\nOutput formats:\n text Full formatted audit report (default)\n json JSON output for automation\n markdown Markdown audit report format\n\nExamples:\n $ dr audit # Full relationship audit of all layers\n $ dr audit security # Audit security layer only\n $ dr audit --type nodes # Node type distribution audit\n $ dr audit --type all # Combined relationship + node audit\n $ dr audit --format json # Output as JSON\n $ dr audit --output audit.md # Save as markdown file\n $ dr audit --verbose # Show detailed analysis\n $ dr audit --save-snapshot # Save snapshot for later comparison\n $ dr audit api --output api-audit.json # API layer audit as JSON`\n )\n .action((layer, options) =>\n auditCommand({ ...options, layer, verbose: options.verbose ?? program.opts().verbose }));\n\n// Audit diff command - Compare snapshots\nprogram\n .command(\"audit:diff\")\n .description(\"Compare before/after audit snapshots\")\n .option(\"--before <id>\", \"Before snapshot ID or timestamp\")\n .option(\"--after <id>\", \"After snapshot ID or timestamp\")\n .option(\"--format <format>\", \"Output format: text (default), json, markdown\")\n .option(\"--output <path>\", \"Output file path\")\n .option(\"--verbose\", \"Show detailed comparison\")\n .addHelpText(\n \"after\",\n `\nExamples:\n $ dr audit:diff # Compare latest two snapshots\n $ dr audit:diff --before 20260220-100000 --after 20260220-150000\n $ dr audit:diff --format markdown --output diff.md\n $ dr audit:diff --verbose # Show detailed changes`\n )\n .action((options) => auditDiffCommand(options));\n\n// Audit snapshots command - Manage snapshots\nprogram\n .command(\"audit:snapshots <action>\")\n .description(\"Manage audit snapshots (list, delete, clear)\")\n .option(\"--id <id>\", \"Snapshot ID (for delete action)\")\n .addHelpText(\n \"after\",\n `\nActions:\n list List all available snapshots\n delete Delete a specific snapshot (requires --id)\n clear Delete all snapshots\n\nExamples:\n $ dr audit:snapshots list\n $ dr audit:snapshots delete --id 20260220-100000\n $ dr audit:snapshots clear`\n )\n .action((action, options) => auditSnapshotsCommand({ ...options, action }));\n\n// Relationship subcommands\nconst relationshipGroup = program.command(\"relationship\").description(\"Relationship operations\");\nrelationshipCommands(relationshipGroup);\n\n// Element subcommands\nconst elementGroup = program.command(\"element\").description(\"Element operations\");\nelementCommands(elementGroup);\n\n// Schema introspection subcommands\nschemaCommands(program);\n\n// Catalog subcommands (modern relationship catalog)\ncatalogCommands(program);\n\n// Documentation subcommands (schema-driven generation)\ndocsCommands(program);\n\n// Dependency analysis commands\nprogram\n .command(\"trace <elementId>\")\n .description(\"Trace dependencies for an element\")\n .option(\n \"--direction <dir>\",\n \"Trace direction: up (dependencies), down (dependents), both (default)\"\n )\n .option(\"--depth <num>\", \"Maximum traversal depth\")\n .option(\"--metrics\", \"Show graph and element metrics\")\n .option(\"--model <path>\", \"Path to model root (contains model/manifest.yaml)\")\n .addHelpText(\n \"after\",\n `\nExamples:\n $ dr trace api-endpoint-create-customer\n $ dr trace business-service-order --direction down --metrics\n $ dr trace application-component-api --depth 3`\n )\n .action(async (elementId, options) => {\n await traceCommand(elementId, {\n direction: options.direction as \"up\" | \"down\" | \"both\" | undefined,\n depth: options.depth ? parseInt(options.depth) : undefined,\n showMetrics: options.metrics,\n model: options.model,\n });\n });\n\nprogram\n .command(\"visualize\")\n .description(\"Launch visualization server with WebSocket support\")\n .option(\"--port <num>\", \"Server port (default: 8080)\")\n .option(\"--no-browser\", \"Do not auto-open browser\")\n .option(\"--no-auth\", \"Disable authentication (enabled by default)\")\n .option(\"--token <token>\", \"Custom auth token (auto-generated by default)\")\n .option(\"--with-danger\", \"Enable dangerous mode for chat (skip permissions)\")\n .option(\n \"--viewer-path <path>\",\n \"Path to custom viewer build (e.g., ./dist/embedded/dr-viewer-bundle)\"\n )\n .addHelpText(\n \"after\",\n `\nExamples:\n $ dr visualize\n $ dr visualize --port 3000\n $ dr visualize --no-browser\n $ dr visualize --no-auth\n $ dr visualize --token my-secret-token\n $ dr visualize --with-danger\n $ dr visualize --viewer-path ./dist/embedded/dr-viewer-bundle\n\nThe --with-danger flag enables dangerous mode for chat functionality:\n - Claude Code: --dangerously-skip-permissions\n - GitHub Copilot: --allow-all-tools\n\nThe --viewer-path option allows loading a local build of the web UI:\n - Point to a directory containing index.html and supporting files\n - Useful for developing custom viewers or using bundled distributions`\n )\n .action(async (options) => {\n const { visualizeCommand } = await import(\"./commands/visualize.js\");\n await visualizeCommand({\n port: options.port,\n noBrowser: options.browser === false, // Commander sets 'browser' to false when --no-browser is used\n noAuth: options.auth === false, // Commander sets 'auth' to false when --no-auth is used\n token: options.token,\n withDanger: options.withDanger,\n viewerPath: options.viewerPath,\n });\n });\n\n// AI Integration command\nprogram\n .command(\"chat [client] [withDanger]\")\n .description(\"Interactive chat with AI about the architecture model\")\n .addHelpText(\n \"after\",\n `\nArguments:\n client Optional AI client to use: \"claude-code\" or \"github-copilot\"\n withDanger Enable dangerous mode: \"with-danger\"\n\nExamples:\n $ dr chat # Auto-detect or use saved preference\n $ dr chat claude-code # Use Claude Code, save as preference\n $ dr chat github-copilot # Use GitHub Copilot, save as preference\n $ dr chat with-danger # Auto-detect with dangerous mode\n $ dr chat claude-code with-danger # Use Claude Code with dangerous mode\n $ dr chat github-copilot with-danger # Use GitHub Copilot with dangerous mode\n\nDangerous mode enables:\n - Claude Code: --dangerously-skip-permissions\n - GitHub Copilot: --allow-all-tools\n\nThis launches an interactive chat interface where you can ask AI questions\nabout your architecture model. Supports Claude Code CLI and GitHub Copilot CLI.\n\nInstall instructions:\n - Claude Code: https://claude.ai\n - GitHub Copilot: gh extension install github/gh-copilot`\n )\n .action(async (client?: string, withDangerArg?: string) => {\n // Parse arguments - handle both \"with-danger\" as first or second arg\n let selectedClient: string | undefined;\n let withDanger = false;\n\n if (client === \"with-danger\") {\n // Format: dr chat with-danger\n withDanger = true;\n selectedClient = undefined;\n } else if (withDangerArg === \"with-danger\") {\n // Format: dr chat <client> with-danger\n withDanger = true;\n selectedClient = client;\n } else {\n // Format: dr chat <client>\n selectedClient = client;\n }\n\n await chatCommand(selectedClient, withDanger);\n });\n\n// Advanced commands\nprogram\n .command(\"version\")\n .description(\"Show CLI and embedded spec version information\")\n .addHelpText(\n \"after\",\n `\nExamples:\n $ dr version`\n )\n .action(async () => {\n await versionCommand();\n });\n\nprogram\n .command(\"upgrade\")\n .description(\"Upgrade spec reference and migrate model to latest versions\")\n .option(\"-y, --yes\", \"Automatically upgrade without prompting\")\n .option(\"--dry-run\", \"Show what would be upgraded without making changes\")\n .option(\"--force\", \"Force all upgrades regardless of current versions; skips migration validation\")\n .addHelpText(\n \"after\",\n `\nExamples:\n $ dr upgrade # Scan, show plan, and prompt for upgrades\n $ dr upgrade --dry-run # Preview available upgrades\n $ dr upgrade --yes # Upgrade without prompting\n $ dr upgrade --force # Force all upgrades, ignoring version checks`\n )\n .action(async (options) => {\n await upgradeCommand({\n yes: options.yes,\n dryRun: options.dryRun,\n force: options.force,\n });\n });\n\nprogram\n .command(\"conformance\")\n .description(\"Check model conformance to layer specifications\")\n .option(\"--layers <layers...>\", \"Specific layers to check\")\n .option(\"--json\", \"Output as JSON\")\n .option(\"--verbose\", \"Verbose output\")\n .addHelpText(\n \"after\",\n `\nExamples:\n $ dr conformance\n $ dr conformance --layers business api application\n $ dr conformance --json\n $ dr conformance --verbose`\n )\n .action(async (options) => {\n await conformanceCommand({\n layers: options.layers,\n json: options.json,\n verbose: options.verbose ?? program.opts().verbose,\n });\n });\n\n// Changeset subcommands\nchangesetCommands(program);\n\n// Claude Code integration subcommands\nclaudeCommands(program);\n\n// GitHub Copilot integration subcommands\ncopilotCommands(program);\n\n// Analyzer integration subcommands\nanalyzerCommands(program);\n\n// Execute CLI with proper telemetry span wrapping\n// This creates a root span that all child spans will be linked to\n(async () => {\n let exitCode = 0;\n try {\n if (isTelemetryEnabled) {\n // Initialize telemetry before execution\n await initTelemetry();\n\n // Only install console interceptor for commands that need it\n const commandName = process.argv[2] || \"unknown\";\n if (CONSOLE_LOGGING_COMMANDS.has(commandName)) {\n await installConsoleInterceptor();\n }\n\n const args = process.argv.slice(3).join(\" \");\n\n // Wrap entire CLI execution in active span for proper context propagation\n await startActiveSpan(\n \"cli.execute\",\n async (span) => {\n // Attributes already set via options parameter - no duplicate setAttributes needed\n try {\n // Execute command - all child spans will now link to this root span\n await program.parseAsync(process.argv);\n\n // Set success status\n span.setStatus({ code: 0 }); // SpanStatusCode.OK\n } catch (error) {\n // Record exception and set error status\n // CommanderError with exitCode 0 is help text / unknown subcommand shown \u2014 not a real error\n if (error instanceof CommanderError) {\n if (error.exitCode === 0) {\n span.setStatus({ code: 0 }); // SpanStatusCode.OK\n } else {\n span.recordException(error as Error);\n span.setStatus({\n code: 2, // SpanStatusCode.ERROR\n message: error.message,\n });\n }\n } else {\n span.recordException(error as Error);\n span.setStatus({\n code: 2, // SpanStatusCode.ERROR\n message: getErrorMessage(error),\n });\n }\n\n // Print error message for CLIError instances\n // Skip CommanderError \u2014 Commander already printed its own output (e.g. help text, unknown command)\n const { CLIError } = await import(\"./utils/errors.js\");\n if (error instanceof CommanderError) {\n // Commander handled its own output; nothing to print\n } else if (error instanceof CLIError) {\n console.error(error.format());\n } else if (error instanceof Error) {\n console.error(error.message);\n } else {\n console.error(String(error));\n }\n\n // Extract exit code from CLIError if available\n exitCode = await extractExitCode(error);\n // Don't throw - let telemetry shutdown complete\n }\n },\n {\n \"cli.command\": commandName,\n \"cli.args\": args,\n \"cli.cwd\": process.cwd(),\n \"cli.version\": cliVersion,\n }\n );\n\n // Shutdown telemetry after execution completes\n await shutdownTelemetry();\n\n // Exit with exit code (keepAlive disabled in exporters prevents hanging)\n process.exit(exitCode);\n } else {\n // No telemetry - just parse normally with error handling\n try {\n await program.parseAsync(process.argv);\n } catch (error) {\n // Extract exit code from CLIError if available\n // Skip CommanderError \u2014 Commander already printed its own output (e.g. help text, unknown command)\n const { CLIError } = await import(\"./utils/errors.js\");\n if (error instanceof CommanderError) {\n // Commander handled its own output; nothing to print\n } else if (error instanceof CLIError) {\n console.error(error.format());\n } else {\n // Unexpected exceptions need to be printed\n if (error instanceof Error) {\n console.error(error.message);\n } else {\n console.error(String(error));\n }\n }\n const exitCodeFromError = await extractExitCode(error);\n process.exit(exitCodeFromError);\n }\n }\n } catch (error) {\n // Error during telemetry init or shutdown\n if (!isTelemetryEnabled) {\n // No telemetry - exit immediately with error\n process.exit(1);\n }\n // Telemetry enabled - try to shutdown before exit\n await shutdownTelemetry();\n process.exit(1);\n }\n})();\n"],
|
|
5
|
-
"mappings": ";AAUA,SAAS,SAAS,sBAAsB;AACxC,SAAS,wBAAwB;AACjC,SAAS,mBAAmB;AAC5B,SAAS,kBAAkB;AAC3B,SAAS,qBAAqB;AAC9B,SAAS,qBAAqB;AAC9B,SAAS,mBAAmB;AAC5B,SAAS,mBAAmB;AAC5B,SAAS,qBAAqB;AAC9B,SAAS,uBAAuB;AAChC,SAAS,mBAAmB;AAC5B,SAAS,4BAA4B;AACrC,SAAS,uBAAuB;AAChC,SAAS,sBAAsB;AAC/B,SAAS,uBAAuB;AAChC,SAAS,oBAAoB;AAC7B,SAAS,oBAAoB;AAC7B,SAAS,qBAAqB;AAC9B,SAAS,qBAAqB;AAC9B,SAAS,mBAAmB;AAC5B,SAAS,sBAAsB;AAC/B,SAAS,0BAA0B;AACnC,SAAS,yBAAyB;AAClC,SAAS,sBAAsB;AAC/B,SAAS,uBAAuB;AAChC,SAAS,wBAAwB;AACjC,SAAS,sBAAsB;AAC/B,SAAS,oBAAoB;AAC7B,SAAS,qBAAqB;AAC9B,SAAS,uBAAuB;AAChC,SAAS,oBAAoB;AAC7B,SAAS,wBAAwB;AACjC,SAAS,6BAA6B;AACtC,SAAS,eAAe,iBAAiB,yB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ACE,eAAe;QACf,YAAY;QACZ,WAAW,QAAQ,IAAG;QACtB,eAAe;OAChB,GAIH,MAAM,kBAAiB,GAGvB,QAAQ,KAAK,QAAQ;IACvB;AAEE,UAAI;AACF,cAAM,QAAQ,WAAW,QAAQ,IAAI;MACvC,SAAS,OAAO;AAGd,cAAM,EAAE,SAAQ,IAAK,MAAM,OAAO,mBAAmB;AACrD,QAAI,iBAAiB,mBAEV,iBAAiB,WAC1B,QAAQ,MAAM,MAAM,OAAM,CAAE,IAGxB,iBAAiB,QACnB,QAAQ,MAAM,MAAM,OAAO,IAE3B,QAAQ,MAAM,OAAO,KAAK,CAAC;AAG/B,cAAM,oBAAoB,MAAM,gBAAgB,KAAK;AACrD,gBAAQ,KAAK,iBAAiB;MAChC;EAEJ,QAAgB;AAEd,IAAK,sBAEH,QAAQ,KAAK,CAAC,GAGhB,MAAM,kBAAiB,GACvB,QAAQ,KAAK,CAAC;EAChB;AACF,GAAE;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
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 = "ee281fb", cliVersion = "0.1.10";
|
|
6
6
|
async function versionCommand() {
|
|
7
7
|
const specVersion = getCliBundledSpecVersion(), telemetryBuiltIn = isTelemetryBuiltIn(), telemetryConfigured = await isTelemetryConfigured();
|
|
8
8
|
let telemetryStatus;
|
package/dist/telemetry/index.js
CHANGED
|
@@ -21,7 +21,7 @@ async function initTelemetry() {
|
|
|
21
21
|
`), process.stderr.write(` - Logs endpoint: ${otlpConfig.logsEndpoint}
|
|
22
22
|
`), process.stderr.write(` - Service name: ${otlpConfig.serviceName}
|
|
23
23
|
`));
|
|
24
|
-
const cliVersion = "0.1.
|
|
24
|
+
const cliVersion = "0.1.10";
|
|
25
25
|
let projectName = "unknown";
|
|
26
26
|
try {
|
|
27
27
|
const [{ readFileSync, existsSync }, { parse }] = await Promise.all([
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/utils/spec-version.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Spec Version Utilities\n *\n * Manages spec version information for the CLI\n */\n\nimport { readJSON, fileExists } from \"./file-io.js\";\nimport { join } from \"path\";\n\n/**\n * CLI version\n * This should match the version in ../package.json\n * Updated during release process\n */\nconst CLI_VERSION = \"0.1.
|
|
5
|
-
"mappings": "AAMA,SAAS,UAAU,kBAAkB;AACrC,SAAS,YAAY;AAOrB,MAAM,cAAc,
|
|
4
|
+
"sourcesContent": ["/**\n * Spec Version Utilities\n *\n * Manages spec version information for the CLI\n */\n\nimport { readJSON, fileExists } from \"./file-io.js\";\nimport { join } from \"path\";\n\n/**\n * CLI version\n * This should match the version in ../package.json\n * Updated during release process\n */\nconst CLI_VERSION = \"0.1.10\";\n\n/**\n * Bundled spec version\n * This should match the version in ../../../spec/VERSION\n * Updated during build process\n */\nconst BUNDLED_SPEC_VERSION = \"0.9.0\";\n\n/**\n * Get the CLI version\n *\n * @returns CLI version string\n */\nexport function getCliVersion(): string {\n return CLI_VERSION;\n}\n\n/**\n * Get the CLI's bundled spec version\n *\n * This is the version of the DR specification that is bundled with this CLI.\n * It represents what version of the spec this CLI supports.\n *\n * @returns Bundled spec version string\n */\nexport function getCliBundledSpecVersion(): string {\n return BUNDLED_SPEC_VERSION;\n}\n\n/**\n * Read spec version from .dr/manifest.json (installed spec reference)\n *\n * @param drPath - Path to .dr/ directory\n * @returns Spec version from .dr/manifest.json, or null if not found\n */\nexport async function getInstalledSpecVersion(drPath: string): Promise<string | null> {\n const manifestPath = join(drPath, \"manifest.json\");\n\n if (!(await fileExists(manifestPath))) {\n return null;\n }\n\n try {\n const manifest = await readJSON<{ specVersion?: string }>(manifestPath);\n return manifest.specVersion || null;\n } catch {\n return null;\n }\n}\n\n/**\n * Read spec version from documentation_robotics/model/manifest.yaml\n *\n * @param modelPath - Path to model directory\n * @returns Spec version from model manifest, or null if not found\n */\nexport async function getModelSpecVersion(modelPath: string): Promise<string | null> {\n const manifestPath = join(modelPath, \"manifest.yaml\");\n\n if (!(await fileExists(manifestPath))) {\n return null;\n }\n\n try {\n // Use YAML parser\n const yaml = await import(\"yaml\");\n const fs = await import(\"fs/promises\");\n const content = await fs.readFile(manifestPath, \"utf-8\");\n const manifest = yaml.parse(content) as { spec_version?: string; specVersion?: string };\n // Check snake_case first (Python CLI format), then camelCase (legacy)\n return manifest.spec_version || manifest.specVersion || null;\n } catch {\n return null;\n }\n}\n"],
|
|
5
|
+
"mappings": "AAMA,SAAS,UAAU,kBAAkB;AACrC,SAAS,YAAY;AAOrB,MAAM,cAAc,UAOd,uBAAuB;AAOvB,SAAU,gBAAa;AAC3B,SAAO;AACT;AAUM,SAAU,2BAAwB;AACtC,SAAO;AACT;AAQA,eAAsB,wBAAwB,QAAc;AAC1D,QAAM,eAAe,KAAK,QAAQ,eAAe;AAEjD,MAAI,CAAE,MAAM,WAAW,YAAY;AACjC,WAAO;AAGT,MAAI;AAEF,YADiB,MAAM,SAAmC,YAAY,GACtD,eAAe;EACjC,QAAQ;AACN,WAAO;EACT;AACF;AAQA,eAAsB,oBAAoB,WAAiB;AACzD,QAAM,eAAe,KAAK,WAAW,eAAe;AAEpD,MAAI,CAAE,MAAM,WAAW,YAAY;AACjC,WAAO;AAGT,MAAI;AAEF,UAAM,OAAO,MAAM,OAAO,MAAM,GAE1B,UAAU,OADL,MAAM,OAAO,aAAa,GACZ,SAAS,cAAc,OAAO,GACjD,WAAW,KAAK,MAAM,OAAO;AAEnC,WAAO,SAAS,gBAAgB,SAAS,eAAe;EAC1D,QAAQ;AACN,WAAO;EACT;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/viewer/README.md
CHANGED
|
@@ -4,15 +4,15 @@ This directory contains the pre-built embedded viewer for the Documentation Robo
|
|
|
4
4
|
|
|
5
5
|
## Bundle Information
|
|
6
6
|
|
|
7
|
-
- **Version:** 0.
|
|
8
|
-
- **Build Date:** 2026-08-
|
|
9
|
-
- **Total Size:** 1.
|
|
10
|
-
- **Estimated Gzip:**
|
|
7
|
+
- **Version:** 0.6.0
|
|
8
|
+
- **Build Date:** 2026-08-19T11:56:19.998Z
|
|
9
|
+
- **Total Size:** 1.24 MB
|
|
10
|
+
- **Estimated Gzip:** 392.89 KB
|
|
11
11
|
|
|
12
12
|
## Files
|
|
13
13
|
|
|
14
|
-
- `assets/main-
|
|
15
|
-
- `assets/main-
|
|
14
|
+
- `assets/main-BrpLargo.js` (832.61 KB)
|
|
15
|
+
- `assets/main-BRPZyc36.css` (193.2 KB)
|
|
16
16
|
- `fonts/inter/Inter-SemiBold.woff2` (23.88 KB)
|
|
17
17
|
- `fonts/inter/Inter-ExtraBold.woff2` (23.83 KB)
|
|
18
18
|
- `fonts/inter/Inter-Bold.woff2` (23.79 KB)
|