@happyvertical/smrt-cli 0.50.0 → 0.51.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.
@@ -14,7 +14,7 @@ import glob from "fast-glob";
14
14
  import { createHash } from "node:crypto";
15
15
  import { getPackageConfig } from "@happyvertical/smrt-config";
16
16
  import { toSnakeCase } from "@happyvertical/smrt-core/utils";
17
- import { discoverScopedPackageDirectories, readAgentModuleDocs, readPackageAgentDoc, resolveAgentModuleDocPaths } from "@happyvertical/smrt-core/knowledge";
17
+ import { checkKnowledgeGraphFreshness, discoverScopedPackageDirectories, readAgentModuleDocs, readPackageAgentDoc, resolveAgentModuleDocPaths } from "@happyvertical/smrt-core/knowledge";
18
18
  import { MCPGenerator } from "@happyvertical/smrt-core/generators";
19
19
  import { generateDeclarationsFromCLI } from "@happyvertical/smrt-core/prebuild";
20
20
  import { execFileSync, execSync, spawn, spawnSync } from "node:child_process";
@@ -3770,6 +3770,20 @@ function createDocsCommand(config) {
3770
3770
  const outputDir = dirname(outputPath);
3771
3771
  if (!existsSync(outputDir)) mkdirSync(outputDir, { recursive: true });
3772
3772
  writeFileSync(outputPath, content, "utf-8");
3773
+ let graphExported = false;
3774
+ if (monorepoRoot) {
3775
+ const graphPath = join(monorepoRoot, ".smrt", "smrt-knowledge-graph.json");
3776
+ if (existsSync(graphPath)) {
3777
+ const graphErrors = checkKnowledgeGraphFreshness(monorepoRoot, ".smrt/smrt-knowledge-graph.json", { requireArtifact: true }).filter((issue) => issue.severity === "error");
3778
+ if (graphErrors.length > 0) {
3779
+ console.error("\n❌ Cross-package knowledge graph is stale; run `pnpm knowledge:graph` first:");
3780
+ for (const issue of graphErrors) console.error(` ${issue.code}: ${issue.message}`);
3781
+ process.exit(1);
3782
+ }
3783
+ writeFileSync(join(dirname(outputPath), "smrt-knowledge-graph.json"), readFileSync(graphPath, "utf-8"));
3784
+ graphExported = true;
3785
+ }
3786
+ }
3773
3787
  const totalPackages = packages.length + sdkPackages.length;
3774
3788
  console.log(`\n✅ Generated ${outputPath}`);
3775
3789
  console.log(` ${totalPackages} packages documented`);
@@ -3781,6 +3795,7 @@ function createDocsCommand(config) {
3781
3795
  const moduleDocCount = allPackages.reduce((total, p) => total + (p.moduleDocPaths?.length ?? p.moduleDocs?.length ?? 0), 0);
3782
3796
  if (moduleDocCount > 0) console.log(` ${moduleDocCount} linked module docs`);
3783
3797
  if (rootDocs.length > 0) console.log(` ${rootDocs.length} framework documents included`);
3798
+ if (graphExported) console.log(" cross-package knowledge graph exported");
3784
3799
  console.log("");
3785
3800
  } catch (error) {
3786
3801
  console.error("\n❌ Failed to generate agent documentation:");
package/dist/index.js CHANGED
@@ -49,63 +49,63 @@ var _playgroundCommands = null;
49
49
  var _workbenchCommands = null;
50
50
  async function getGnodeCommands() {
51
51
  if (!_gnodeCommands) {
52
- const { gnodeCommands } = await import("./commands-DxvVdCOS.js");
52
+ const { gnodeCommands } = await import("./commands-CCQjTTao.js");
53
53
  _gnodeCommands = gnodeCommands;
54
54
  }
55
55
  return _gnodeCommands;
56
56
  }
57
57
  async function getGitCommands() {
58
58
  if (!_gitCommands) {
59
- const { gitCommands } = await import("./commands-DxvVdCOS.js");
59
+ const { gitCommands } = await import("./commands-CCQjTTao.js");
60
60
  _gitCommands = gitCommands;
61
61
  }
62
62
  return _gitCommands;
63
63
  }
64
64
  async function getGenerateCommands() {
65
65
  if (!_generateCommands) {
66
- const { generateCommands } = await import("./commands-DxvVdCOS.js");
66
+ const { generateCommands } = await import("./commands-CCQjTTao.js");
67
67
  _generateCommands = generateCommands;
68
68
  }
69
69
  return _generateCommands;
70
70
  }
71
71
  async function getInitCommands() {
72
72
  if (!_initCommands) {
73
- const { initCommands } = await import("./commands-DxvVdCOS.js");
73
+ const { initCommands } = await import("./commands-CCQjTTao.js");
74
74
  _initCommands = initCommands;
75
75
  }
76
76
  return _initCommands;
77
77
  }
78
78
  async function getUtilityCommands() {
79
79
  if (!_utilityCommands) {
80
- const { utilityCommands } = await import("./commands-DxvVdCOS.js");
80
+ const { utilityCommands } = await import("./commands-CCQjTTao.js");
81
81
  _utilityCommands = utilityCommands;
82
82
  }
83
83
  return _utilityCommands;
84
84
  }
85
85
  async function getDispatchCommands() {
86
86
  if (!_dispatchCommands) {
87
- const { dispatchCommands } = await import("./commands-DxvVdCOS.js");
87
+ const { dispatchCommands } = await import("./commands-CCQjTTao.js");
88
88
  _dispatchCommands = dispatchCommands;
89
89
  }
90
90
  return _dispatchCommands;
91
91
  }
92
92
  async function getDocsCommands() {
93
93
  if (!_docsCommands) {
94
- const { docsCommands } = await import("./commands-DxvVdCOS.js");
94
+ const { docsCommands } = await import("./commands-CCQjTTao.js");
95
95
  _docsCommands = docsCommands;
96
96
  }
97
97
  return _docsCommands;
98
98
  }
99
99
  async function getPlaygroundCommands() {
100
100
  if (!_playgroundCommands) {
101
- const { playgroundCommands } = await import("./commands-DxvVdCOS.js");
101
+ const { playgroundCommands } = await import("./commands-CCQjTTao.js");
102
102
  _playgroundCommands = playgroundCommands;
103
103
  }
104
104
  return _playgroundCommands;
105
105
  }
106
106
  async function getWorkbenchCommands() {
107
107
  if (!_workbenchCommands) {
108
- const { workbenchCommands } = await import("./commands-DxvVdCOS.js");
108
+ const { workbenchCommands } = await import("./commands-CCQjTTao.js");
109
109
  _workbenchCommands = workbenchCommands;
110
110
  }
111
111
  return _workbenchCommands;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@happyvertical/smrt-cli",
3
- "version": "0.50.0",
3
+ "version": "0.51.0",
4
4
  "description": "Developer CLI for SMRT framework - introspection, testing, and project management",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -28,12 +28,12 @@
28
28
  "@happyvertical/ai": "^0.89.9",
29
29
  "@happyvertical/files": "^0.89.9",
30
30
  "@happyvertical/logger": "^0.89.9",
31
- "@happyvertical/smrt-agents": "0.50.0",
32
- "@happyvertical/smrt-config": "0.50.0",
33
- "@happyvertical/smrt-core": "0.50.0",
34
- "@happyvertical/smrt-dev-mcp": "0.50.0",
35
- "@happyvertical/smrt-playground": "0.50.0",
36
- "@happyvertical/smrt-types": "0.50.0",
31
+ "@happyvertical/smrt-agents": "0.51.0",
32
+ "@happyvertical/smrt-config": "0.51.0",
33
+ "@happyvertical/smrt-core": "0.51.0",
34
+ "@happyvertical/smrt-dev-mcp": "0.51.0",
35
+ "@happyvertical/smrt-playground": "0.51.0",
36
+ "@happyvertical/smrt-types": "0.51.0",
37
37
  "@happyvertical/sql": "^0.89.9",
38
38
  "@happyvertical/utils": "^0.89.9",
39
39
  "acorn": "^8.17.0",