@documentation-robotics/cli 0.1.7 → 0.1.9
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 +18 -17
- package/dist/audit/nodes/ai/prompts.js +1 -0
- package/dist/audit/nodes/ai/prompts.js.map +2 -2
- package/dist/audit/relationships/ai/prompts.js +20 -29
- package/dist/audit/relationships/ai/prompts.js.map +2 -2
- package/dist/audit/relationships/analysis/gap-analyzer.js.map +1 -1
- package/dist/audit/relationships/analysis/layer-templates.js +36 -0
- package/dist/audit/relationships/analysis/layer-templates.js.map +2 -2
- package/dist/cli.js +8 -8
- package/dist/cli.js.map +1 -1
- package/dist/commands/reports.js +3 -3
- package/dist/commands/reports.js.map +1 -1
- package/dist/commands/show.js.map +1 -1
- package/dist/commands/upgrade.js +1 -1
- package/dist/commands/upgrade.js.map +1 -1
- package/dist/commands/validate.js.map +1 -1
- package/dist/commands/version.js +1 -1
- package/dist/commands/visualize.js +2 -8
- package/dist/commands/visualize.js.map +2 -2
- package/dist/core/layers.js +1 -0
- package/dist/core/layers.js.map +2 -2
- package/dist/core/migration-registry.js +59 -2
- package/dist/core/migration-registry.js.map +2 -2
- package/dist/core/model.js +3 -16
- package/dist/core/model.js.map +2 -2
- package/dist/core/spec-loader.js.map +1 -1
- package/dist/core/stats-collector.js +2 -0
- package/dist/core/stats-collector.js.map +2 -2
- package/dist/export/archimate-exporter.js.map +2 -2
- package/dist/export/json-schema-exporter.js.map +1 -1
- package/dist/export/markdown-exporter.js.map +1 -1
- package/dist/export/markdown-utils.js +1 -0
- package/dist/export/markdown-utils.js.map +2 -2
- package/dist/export/mermaid-markdown-exporter.js.map +1 -1
- package/dist/export/openapi-exporter.js.map +1 -1
- package/dist/export/plantuml-exporter.js.map +1 -1
- package/dist/export/report-formatters.js +2 -2
- package/dist/export/report-formatters.js.map +1 -1
- package/dist/export/types.js +1 -0
- package/dist/export/types.js.map +2 -2
- package/dist/generated/layer-registry.js +44 -31
- package/dist/generated/layer-registry.js.map +2 -2
- package/dist/generated/layer-types.js +1 -1
- package/dist/generated/layer-types.js.map +2 -2
- package/dist/generated/node-types.js +45 -0
- package/dist/generated/node-types.js.map +2 -2
- package/dist/generated/relationship-index.js +201 -19
- package/dist/generated/relationship-index.js.map +2 -2
- package/dist/import/archimate-importer.js.map +1 -1
- package/dist/import/openapi-importer.js.map +1 -1
- package/dist/integrations/claude_code/agents/dr-advisor.md +14 -13
- package/dist/integrations/claude_code/agents/dr-extractor.md +2 -2
- package/dist/integrations/claude_code/commands/dr-info.md +1 -1
- package/dist/integrations/claude_code/commands/dr-init.md +3 -3
- package/dist/integrations/claude_code/commands/dr-map.md +2 -2
- package/dist/integrations/claude_code/commands/dr-model.md +1 -1
- package/dist/integrations/claude_code/commands/dr-relate.md +14 -4
- package/dist/integrations/claude_code/docs/END_TO_END_WALKTHROUGH.md +3 -3
- package/dist/integrations/claude_code/docs/QUICK_START.md +1 -1
- package/dist/integrations/claude_code/docs/README.md +2 -2
- package/dist/integrations/claude_code/skills/dr_01_motivation_layer/SKILL.md +2 -2
- package/dist/integrations/claude_code/skills/dr_03_product_layer/SKILL.md +679 -0
- package/dist/integrations/claude_code/skills/{dr_08_dataset_layer → dr_09_dataset_layer}/SKILL.md +1 -1
- package/dist/integrations/claude_code/skills/dr_engineering_guide/SKILL.md +2 -2
- package/dist/integrations/github_copilot/agents/dr-advisor.md +14 -13
- package/dist/integrations/github_copilot/agents/dr-architect.md +15 -14
- package/dist/integrations/github_copilot/skills/dr_01_motivation_layer/SKILL.md +2 -2
- package/dist/integrations/github_copilot/skills/dr_03_product_layer/SKILL.md +253 -0
- package/dist/reports/model-report-orchestrator.js +3 -3
- package/dist/reports/model-report-orchestrator.js.map +1 -1
- package/dist/schemas/bundled/analyzers/cbm.json +2 -2
- package/dist/schemas/bundled/analyzers/manifest.json +2 -2
- package/dist/schemas/bundled/api.json +3 -3
- package/dist/schemas/bundled/apm.json +3 -3
- package/dist/schemas/bundled/application.json +3 -3
- package/dist/schemas/bundled/base.json +29 -1
- package/dist/schemas/bundled/business.json +1 -1
- package/dist/schemas/bundled/data-model.json +3 -3
- package/dist/schemas/bundled/data-store.json +3 -3
- package/dist/schemas/bundled/manifest.json +20 -13
- package/dist/schemas/bundled/motivation.json +1 -1
- package/dist/schemas/bundled/navigation.json +3 -3
- package/dist/schemas/bundled/product.json +469 -0
- package/dist/schemas/bundled/security.json +3 -3
- package/dist/schemas/bundled/technology.json +3 -3
- package/dist/schemas/bundled/testing.json +3 -3
- package/dist/schemas/bundled/ux.json +3 -3
- package/dist/server/server.js +148 -101
- package/dist/server/server.js.map +2 -2
- package/dist/server-entry.js.map +2 -2
- package/dist/telemetry/index.js +1 -1
- package/dist/utils/spec-installer.js +2 -2
- package/dist/utils/spec-installer.js.map +1 -1
- package/dist/utils/spec-version.js +1 -1
- package/dist/utils/spec-version.js.map +1 -1
- package/dist/viewer/README.md +6 -6
- package/dist/viewer/assets/main-D114QwJo.css +1 -0
- package/dist/viewer/assets/main-DyuokeQj.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 +4 -1
- package/dist/viewer/assets/main-CY0Xufuj.css +0 -1
- package/dist/viewer/assets/main-DtgErnwF.js +0 -81
- /package/dist/integrations/claude_code/skills/{dr_03_security_layer → dr_04_security_layer}/SKILL.md +0 -0
- /package/dist/integrations/claude_code/skills/{dr_04_application_layer → dr_05_application_layer}/SKILL.md +0 -0
- /package/dist/integrations/claude_code/skills/{dr_05_technology_layer → dr_06_technology_layer}/SKILL.md +0 -0
- /package/dist/integrations/claude_code/skills/{dr_06_api_layer → dr_07_api_layer}/SKILL.md +0 -0
- /package/dist/integrations/claude_code/skills/{dr_07_data_model_layer → dr_08_data_model_layer}/SKILL.md +0 -0
- /package/dist/integrations/claude_code/skills/{dr_09_ux_layer → dr_10_ux_layer}/SKILL.md +0 -0
- /package/dist/integrations/claude_code/skills/{dr_10_navigation_layer → dr_11_navigation_layer}/SKILL.md +0 -0
- /package/dist/integrations/claude_code/skills/{dr_11_apm_layer → dr_12_apm_layer}/SKILL.md +0 -0
- /package/dist/integrations/claude_code/skills/{dr_12_testing_layer → dr_13_testing_layer}/SKILL.md +0 -0
- /package/dist/integrations/github_copilot/skills/{dr_03_security_layer → dr_04_security_layer}/SKILL.md +0 -0
- /package/dist/integrations/github_copilot/skills/{dr_04_application_layer → dr_05_application_layer}/SKILL.md +0 -0
- /package/dist/integrations/github_copilot/skills/{dr_05_technology_layer → dr_06_technology_layer}/SKILL.md +0 -0
- /package/dist/integrations/github_copilot/skills/{dr_06_api_layer → dr_07_api_layer}/SKILL.md +0 -0
- /package/dist/integrations/github_copilot/skills/{dr_07_data_model_layer → dr_08_data_model_layer}/SKILL.md +0 -0
- /package/dist/integrations/github_copilot/skills/{dr_08_dataset_layer → dr_09_dataset_layer}/SKILL.md +0 -0
- /package/dist/integrations/github_copilot/skills/{dr_09_ux_layer → dr_10_ux_layer}/SKILL.md +0 -0
- /package/dist/integrations/github_copilot/skills/{dr_10_navigation_layer → dr_11_navigation_layer}/SKILL.md +0 -0
- /package/dist/integrations/github_copilot/skills/{dr_11_apm_layer → dr_12_apm_layer}/SKILL.md +0 -0
- /package/dist/integrations/github_copilot/skills/{dr_12_testing_layer → dr_13_testing_layer}/SKILL.md +0 -0
package/dist/server-entry.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/server-entry.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Visualization Server Entry Point\n * This is a Bun
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["/**\n * Visualization Server Entry Point\n * This is spawned as a subprocess by `dr visualize` (see cli/src/commands/visualize.ts),\n * using whichever runtime (Node.js or Bun) is already running the parent CLI process.\n * It receives configuration via environment variables and starts the server.\n */\n\nimport { Model } from \"./core/model.js\";\nimport { VisualizationServer } from \"./server/server.js\";\nimport { getErrorMessage } from \"./utils/errors.js\";\n\n// Get configuration from environment variables\nconst port = parseInt(process.env.DR_VISUALIZE_PORT || \"8080\", 10);\nconst projectPath = process.env.DR_PROJECT_PATH || process.cwd();\nconst authEnabled = process.env.DR_AUTH_ENABLED !== \"false\";\n// Only pass authToken if it's a non-empty string, otherwise let server generate one\nconst authToken =\n process.env.DR_AUTH_TOKEN && process.env.DR_AUTH_TOKEN.length > 0\n ? process.env.DR_AUTH_TOKEN\n : undefined;\nconst withDanger = process.env.DR_WITH_DANGER === \"true\";\nconst viewerPath = process.env.DR_VIEWER_PATH;\n\n// Conditional telemetry import based on compile-time flag\ndeclare const TELEMETRY_ENABLED: boolean | undefined;\nconst isTelemetryEnabled = typeof TELEMETRY_ENABLED !== \"undefined\" ? TELEMETRY_ENABLED : false;\n\nlet serverInstance: VisualizationServer | null = null;\nlet isShuttingDown = false;\n\nasync function main() {\n try {\n // CRITICAL: Initialize telemetry SDK in subprocess\n // Without this, no spans will be created or exported even though TELEMETRY_ENABLED=true\n if (isTelemetryEnabled) {\n try {\n const { initTelemetry } = await import(\"./telemetry/index.js\");\n await initTelemetry();\n\n // Load and display actual OTLP configuration\n const { loadOTLPConfig } = await import(\"./telemetry/config.js\");\n const otlpConfig = await loadOTLPConfig();\n\n if (process.env.DEBUG || process.env.VERBOSE) {\n console.log(`[Telemetry] SDK initialized in server subprocess`);\n console.log(`[Telemetry] OTLP traces endpoint: ${otlpConfig.endpoint}`);\n console.log(`[Telemetry] OTLP logs endpoint: ${otlpConfig.logsEndpoint}`);\n console.log(`[Telemetry] Service name: ${otlpConfig.serviceName}`);\n\n // Runtime detection and compatibility info\n const isBun = typeof (globalThis as any).Bun !== \"undefined\";\n if (isBun) {\n console.log(`[Telemetry] Runtime: Bun (using fetch-based OTLP exporter)`);\n } else {\n console.log(`[Telemetry] Runtime: Node.js (using http-based OTLP exporter)`);\n }\n }\n } catch (error) {\n // Log telemetry initialization errors but don't fail the server\n console.error(\"[Telemetry] Failed to initialize telemetry:\", error);\n console.error(\"[Telemetry] Server will continue without telemetry\");\n }\n } else if (process.env.DEBUG || process.env.VERBOSE) {\n console.log(`[Telemetry] TELEMETRY_ENABLED is false - telemetry disabled`);\n }\n\n // Load model with full content\n const model = await Model.load(projectPath, { lazyLoad: false });\n\n // Create and start server\n const server = new VisualizationServer(model, {\n authEnabled,\n authToken,\n withDanger,\n viewerPath,\n });\n serverInstance = server; // Store for signal handlers\n await server.start(port);\n\n // Output token for parent process to read\n if (authEnabled) {\n console.log(`TOKEN:${server.getAuthToken()}`);\n }\n\n // Setup graceful shutdown handlers\n setupShutdownHandlers();\n } catch (error) {\n const message = getErrorMessage(error);\n console.error(`Error: ${message}`);\n if (error instanceof Error) {\n console.error(`Stack: ${error.stack}`);\n }\n await gracefulShutdown(1);\n }\n}\n\n/**\n * Gracefully shutdown the server and flush telemetry\n */\nasync function gracefulShutdown(exitCode: number = 0): Promise<void> {\n if (isShuttingDown) {\n return; // Prevent multiple shutdown attempts\n }\n isShuttingDown = true;\n\n try {\n // Stop the visualization server\n if (serverInstance) {\n serverInstance.stop();\n serverInstance = null;\n }\n\n // Flush telemetry spans before exit\n if (isTelemetryEnabled) {\n console.log(\"[Telemetry] Shutting down telemetry and flushing spans...\");\n const { shutdownTelemetry } = await import(\"./telemetry/index.js\");\n await shutdownTelemetry();\n console.log(\"[Telemetry] Telemetry shutdown complete\");\n } else {\n if (process.env.DEBUG) {\n console.log(\"[Telemetry] Telemetry is disabled (TELEMETRY_ENABLED=false at build time)\");\n }\n }\n } catch (error) {\n // Don't block shutdown on errors\n if (process.env.DEBUG) {\n console.error(\"Error during shutdown:\", error);\n }\n } finally {\n process.exit(exitCode);\n }\n}\n\n/**\n * Setup handlers for graceful shutdown on signals\n */\nfunction setupShutdownHandlers(): void {\n // Handle Ctrl-C (SIGINT)\n process.on(\"SIGINT\", async () => {\n console.log(\"\\n[SIGINT] Shutting down visualization server...\");\n await gracefulShutdown(0);\n });\n\n // Handle termination signal (SIGTERM)\n process.on(\"SIGTERM\", async () => {\n console.log(\"\\n[SIGTERM] Shutting down visualization server...\");\n await gracefulShutdown(0);\n });\n\n // Handle uncaught exceptions\n process.on(\"uncaughtException\", async (error) => {\n console.error(\"Uncaught exception:\", error);\n await gracefulShutdown(1);\n });\n\n // Handle unhandled promise rejections\n process.on(\"unhandledRejection\", async (reason) => {\n console.error(\"Unhandled rejection:\", reason);\n await gracefulShutdown(1);\n });\n}\n\nmain();\n"],
|
|
5
|
+
"mappings": "AAOA,SAAS,aAAa;AACtB,SAAS,2BAA2B;AACpC,SAAS,uBAAuB;AAGhC,MAAM,OAAO,SAAS,QAAQ,IAAI,qBAAqB,QAAQ,EAAE,GAC3D,cAAc,QAAQ,IAAI,mBAAmB,QAAQ,IAAG,GACxD,cAAc,QAAQ,IAAI,oBAAoB,SAE9C,YACJ,QAAQ,IAAI,iBAAiB,QAAQ,IAAI,cAAc,SAAS,IAC5D,QAAQ,IAAI,gBACZ,QACA,aAAa,QAAQ,IAAI,mBAAmB,QAC5C,aAAa,QAAQ,IAAI,gBAIzB,qBAAgE;AAEtE,IAAI,iBAA6C,MAC7C,iBAAiB;AAErB,eAAe,OAAI;AACjB,MAAI;AAGF,QAAI;AACF,UAAI;AACF,cAAM,EAAE,cAAa,IAAK,MAAM,OAAO,sBAAsB;AAC7D,cAAM,cAAa;AAGnB,cAAM,EAAE,eAAc,IAAK,MAAM,OAAO,uBAAuB,GACzD,aAAa,MAAM,eAAc;AAEvC,YAAI,QAAQ,IAAI,SAAS,QAAQ,IAAI,SAAS;AAC5C,kBAAQ,IAAI,kDAAkD,GAC9D,QAAQ,IAAI,qCAAqC,WAAW,QAAQ,EAAE,GACtE,QAAQ,IAAI,mCAAmC,WAAW,YAAY,EAAE,GACxE,QAAQ,IAAI,6BAA6B,WAAW,WAAW,EAAE;AAGjE,gBAAM,QAAQ,OAAQ,WAAmB,MAAQ;AACjD,UACE,QAAQ,IADN,QACU,+DAEA,+DAF4D;QAI5E;MACF,SAAS,OAAO;AAEd,gBAAQ,MAAM,+CAA+C,KAAK,GAClE,QAAQ,MAAM,oDAAoD;MACpE;QACK,EAAI,QAAQ,IAAI,SAAS,QAAQ,IAAI,YAC1C,QAAQ,IAAI,6DAA6D;AAI3E,UAAM,QAAQ,MAAM,MAAM,KAAK,aAAa,EAAE,UAAU,GAAK,CAAE,GAGzD,SAAS,IAAI,oBAAoB,OAAO;MAC5C;MACA;MACA;MACA;KACD;AACD,qBAAiB,QACjB,MAAM,OAAO,MAAM,IAAI,GAGnB,eACF,QAAQ,IAAI,SAAS,OAAO,aAAY,CAAE,EAAE,GAI9C,sBAAqB;EACvB,SAAS,OAAO;AACd,UAAM,UAAU,gBAAgB,KAAK;AACrC,YAAQ,MAAM,UAAU,OAAO,EAAE,GAC7B,iBAAiB,SACnB,QAAQ,MAAM,UAAU,MAAM,KAAK,EAAE,GAEvC,MAAM,iBAAiB,CAAC;EAC1B;AACF;AAKA,eAAe,iBAAiB,WAAmB,GAAC;AAClD,MAAI,iBAGJ;qBAAiB;AAEjB,QAAI;AAQF,UANI,mBACF,eAAe,KAAI,GACnB,iBAAiB,OAIf,oBAAoB;AACtB,gBAAQ,IAAI,2DAA2D;AACvE,cAAM,EAAE,kBAAiB,IAAK,MAAM,OAAO,sBAAsB;AACjE,cAAM,kBAAiB,GACvB,QAAQ,IAAI,yCAAyC;MACvD;AACE,QAAI,QAAQ,IAAI,SACd,QAAQ,IAAI,2EAA2E;IAG7F,SAAS,OAAO;AAEd,MAAI,QAAQ,IAAI,SACd,QAAQ,MAAM,0BAA0B,KAAK;IAEjD;AACE,cAAQ,KAAK,QAAQ;IACvB;;AACF;AAKA,SAAS,wBAAqB;AAE5B,UAAQ,GAAG,UAAU,YAAW;AAC9B,YAAQ,IAAI;+CAAkD,GAC9D,MAAM,iBAAiB,CAAC;EAC1B,CAAC,GAGD,QAAQ,GAAG,WAAW,YAAW;AAC/B,YAAQ,IAAI;gDAAmD,GAC/D,MAAM,iBAAiB,CAAC;EAC1B,CAAC,GAGD,QAAQ,GAAG,qBAAqB,OAAO,UAAS;AAC9C,YAAQ,MAAM,uBAAuB,KAAK,GAC1C,MAAM,iBAAiB,CAAC;EAC1B,CAAC,GAGD,QAAQ,GAAG,sBAAsB,OAAO,WAAU;AAChD,YAAQ,MAAM,wBAAwB,MAAM,GAC5C,MAAM,iBAAiB,CAAC;EAC1B,CAAC;AACH;AAEA,KAAI;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
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.9";
|
|
25
25
|
let projectName = "unknown";
|
|
26
26
|
try {
|
|
27
27
|
const [{ readFileSync, existsSync }, { parse }] = await Promise.all([
|
|
@@ -34,7 +34,7 @@ This directory is managed by the Documentation Robotics CLI.
|
|
|
34
34
|
|
|
35
35
|
## Structure
|
|
36
36
|
|
|
37
|
-
- \`spec/\` \u2014 Compiled spec files (
|
|
37
|
+
- \`spec/\` \u2014 Compiled spec files (15 JSON files: manifest, base, one per layer)
|
|
38
38
|
- \`manifest.json\` \u2014 Spec version information
|
|
39
39
|
- \`changesets/\` \u2014 Model changesets (active and saved)
|
|
40
40
|
|
|
@@ -44,7 +44,7 @@ The \`spec/\` directory contains the complete compiled specification:
|
|
|
44
44
|
|
|
45
45
|
- \`manifest.json\` \u2014 Layer index with node type and relationship counts
|
|
46
46
|
- \`base.json\` \u2014 Base schemas and predicate definitions
|
|
47
|
-
- \`{layer}.json\` \u2014 One file per layer (
|
|
47
|
+
- \`{layer}.json\` \u2014 One file per layer (13 total), each containing:
|
|
48
48
|
- \`layer\` \u2014 Layer metadata (id, name, description, node_types)
|
|
49
49
|
- \`nodeSchemas\` \u2014 JSON Schema definitions for all node types in the layer
|
|
50
50
|
- \`relationshipSchemas\` \u2014 Flat relationship definitions for all relationships in the layer
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/utils/spec-installer.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Spec Reference Installer\n *\n * Manages the .dr/ folder, which stores:\n * - The
|
|
4
|
+
"sourcesContent": ["/**\n * Spec Reference Installer\n *\n * Manages the .dr/ folder, which stores:\n * - The 15 compiled spec files in .dr/spec/ for agent and user access\n * - The installed spec version in .dr/manifest.json\n * - Changesets in .dr/changesets/\n *\n * The spec files in .dr/spec/ are the same 15 compiled JSON files bundled\n * with the CLI (manifest.json, base.json, {layer}.json x13). They are copied\n * from the CLI's bundled schemas on every install/upgrade so agents, skills,\n * and end users can read the spec directly from the project directory.\n */\n\nimport { ensureDir, writeFile } from \"./file-io.js\";\nimport { join, dirname } from \"path\";\nimport { fileURLToPath } from \"url\";\nimport { getCliBundledSpecVersion } from \"./spec-version.js\";\nimport fs from \"fs/promises\";\nimport { existsSync } from \"fs\";\n\n/**\n * Resolve the directory containing the CLI's bundled compiled spec files.\n * Mirrors the logic in SpecDataLoader.getDefaultBundledDir().\n */\nfunction getBundledSpecDir(): string {\n const currentDir = dirname(fileURLToPath(import.meta.url));\n\n // CLI installation: dist/utils \u2192 dist/schemas/bundled\n const installPath = join(currentDir, \"..\", \"schemas\", \"bundled\");\n if (existsSync(join(installPath, \"manifest.json\"))) {\n return installPath;\n }\n\n // Development monorepo: spec/dist/\n const devDistPath = join(currentDir, \"../../../spec/dist\");\n if (existsSync(join(devDistPath, \"manifest.json\"))) {\n return devDistPath;\n }\n\n throw new Error(\"Cannot find bundled spec schemas. Run 'npm run build' first.\");\n}\n\n/**\n * Install or update the .dr/ spec reference folder.\n *\n * Creates:\n * - .dr/spec/ \u2014 15 compiled spec files (manifest.json, base.json, {layer}.json x13)\n * - .dr/manifest.json \u2014 installed spec version record\n * - .dr/changesets/ \u2014 directory for model changesets\n * - .dr/README.md \u2014 informational readme\n *\n * @param projectRoot - Path to project root\n * @param _force - Reserved; kept for API compatibility\n */\nexport async function installSpecReference(\n projectRoot: string,\n _force: boolean = false\n): Promise<void> {\n const drPath = join(projectRoot, \".dr\");\n const specVersion = getCliBundledSpecVersion();\n\n await ensureDir(drPath);\n await ensureDir(join(drPath, \"changesets\"));\n\n // Copy the 15 bundled compiled spec files to .dr/spec/\n // This gives agents, skills, and end users direct file access to the spec.\n // Remove first to clear any stale files or subdirectories from old formats.\n const bundledDir = getBundledSpecDir();\n const specDestDir = join(drPath, \"spec\");\n await fs.rm(specDestDir, { recursive: true, force: true });\n await ensureDir(specDestDir);\n\n const specFiles = await fs.readdir(bundledDir);\n await Promise.all(\n specFiles\n .filter((f) => f.endsWith(\".json\"))\n .map((f) => fs.copyFile(join(bundledDir, f), join(specDestDir, f)))\n );\n\n // Write manifest.json\n const manifest = {\n specVersion: specVersion,\n installedAt: new Date().toISOString(),\n };\n await writeFile(join(drPath, \"manifest.json\"), JSON.stringify(manifest, null, 2));\n\n // Write README.md\n const readme = `# Documentation Robotics - Spec Reference\n\nThis directory is managed by the Documentation Robotics CLI.\n\n**Spec Version:** ${specVersion}\n**Installed:** ${new Date().toISOString()}\n\n## Structure\n\n- \\`spec/\\` \u2014 Compiled spec files (15 JSON files: manifest, base, one per layer)\n- \\`manifest.json\\` \u2014 Spec version information\n- \\`changesets/\\` \u2014 Model changesets (active and saved)\n\n## Spec Files\n\nThe \\`spec/\\` directory contains the complete compiled specification:\n\n- \\`manifest.json\\` \u2014 Layer index with node type and relationship counts\n- \\`base.json\\` \u2014 Base schemas and predicate definitions\n- \\`{layer}.json\\` \u2014 One file per layer (13 total), each containing:\n - \\`layer\\` \u2014 Layer metadata (id, name, description, node_types)\n - \\`nodeSchemas\\` \u2014 JSON Schema definitions for all node types in the layer\n - \\`relationshipSchemas\\` \u2014 Flat relationship definitions for all relationships in the layer\n\nThese files are regenerated on \\`dr init\\` and \\`dr upgrade\\` to match the\ncurrent CLI version. Do not manually edit them.\n\nThis directory should be git-ignored.\n`;\n await writeFile(join(drPath, \"README.md\"), readme);\n}\n\n/**\n * Check if spec reference needs to be installed or updated.\n *\n * Returns true if .dr/manifest.json is missing, unreadable, or records a\n * specVersion that doesn't match the CLI's bundled spec version.\n */\nexport async function needsSpecReferenceInstall(projectRoot: string): Promise<boolean> {\n const manifestPath = join(projectRoot, \".dr\", \"manifest.json\");\n\n try {\n const content = await fs.readFile(manifestPath, \"utf-8\");\n const manifest = JSON.parse(content) as { specVersion?: string };\n return manifest.specVersion !== getCliBundledSpecVersion();\n } catch {\n return true; // manifest missing or unreadable\n }\n}\n"],
|
|
5
5
|
"mappings": "AAcA,SAAS,WAAW,iBAAiB;AACrC,SAAS,MAAM,eAAe;AAC9B,SAAS,qBAAqB;AAC9B,SAAS,gCAAgC;AACzC,OAAO,QAAQ;AACf,SAAS,kBAAkB;AAM3B,SAAS,oBAAiB;AACxB,QAAM,aAAa,QAAQ,cAAc,YAAY,GAAG,CAAC,GAGnD,cAAc,KAAK,YAAY,MAAM,WAAW,SAAS;AAC/D,MAAI,WAAW,KAAK,aAAa,eAAe,CAAC;AAC/C,WAAO;AAIT,QAAM,cAAc,KAAK,YAAY,oBAAoB;AACzD,MAAI,WAAW,KAAK,aAAa,eAAe,CAAC;AAC/C,WAAO;AAGT,QAAM,IAAI,MAAM,8DAA8D;AAChF;AAcA,eAAsB,qBACpB,aACA,SAAkB,IAAK;AAEvB,QAAM,SAAS,KAAK,aAAa,KAAK,GAChC,cAAc,yBAAwB;AAE5C,QAAM,UAAU,MAAM,GACtB,MAAM,UAAU,KAAK,QAAQ,YAAY,CAAC;AAK1C,QAAM,aAAa,kBAAiB,GAC9B,cAAc,KAAK,QAAQ,MAAM;AACvC,QAAM,GAAG,GAAG,aAAa,EAAE,WAAW,IAAM,OAAO,GAAI,CAAE,GACzD,MAAM,UAAU,WAAW;AAE3B,QAAM,YAAY,MAAM,GAAG,QAAQ,UAAU;AAC7C,QAAM,QAAQ,IACZ,UACG,OAAO,CAAC,MAAM,EAAE,SAAS,OAAO,CAAC,EACjC,IAAI,CAAC,MAAM,GAAG,SAAS,KAAK,YAAY,CAAC,GAAG,KAAK,aAAa,CAAC,CAAC,CAAC,CAAC;AAIvE,QAAM,WAAW;IACf;IACA,cAAa,oBAAI,KAAI,GAAG,YAAW;;AAErC,QAAM,UAAU,KAAK,QAAQ,eAAe,GAAG,KAAK,UAAU,UAAU,MAAM,CAAC,CAAC;AAGhF,QAAM,SAAS;;;;oBAIG,WAAW;kBACd,oBAAI,KAAI,GAAG,YAAW,CAAE;;;;;;;;;;;;;;;;;;;;;;;;AAwBvC,QAAM,UAAU,KAAK,QAAQ,WAAW,GAAG,MAAM;AACnD;AAQA,eAAsB,0BAA0B,aAAmB;AACjE,QAAM,eAAe,KAAK,aAAa,OAAO,eAAe;AAE7D,MAAI;AACF,UAAM,UAAU,MAAM,GAAG,SAAS,cAAc,OAAO;AAEvD,WADiB,KAAK,MAAM,OAAO,EACnB,gBAAgB,yBAAwB;EAC1D,QAAQ;AACN,WAAO;EACT;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -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.
|
|
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.9\";\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
5
|
"mappings": "AAMA,SAAS,UAAU,kBAAkB;AACrC,SAAS,YAAY;AAOrB,MAAM,cAAc,SAOd,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-
|
|
9
|
-
- **Total Size:** 1.
|
|
10
|
-
- **Estimated Gzip:**
|
|
7
|
+
- **Version:** 0.5.1
|
|
8
|
+
- **Build Date:** 2026-08-14T17:01:17.395Z
|
|
9
|
+
- **Total Size:** 1.18 MB
|
|
10
|
+
- **Estimated Gzip:** 375.5 KB
|
|
11
11
|
|
|
12
12
|
## Files
|
|
13
13
|
|
|
14
|
-
- `assets/main-
|
|
15
|
-
- `assets/main-
|
|
14
|
+
- `assets/main-DyuokeQj.js` (787.76 KB)
|
|
15
|
+
- `assets/main-D114QwJo.css` (181.95 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)
|