@happyvertical/smrt-cli 0.40.66 → 0.40.68

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/AGENTS.md CHANGED
@@ -6,6 +6,7 @@ Developer CLI with lazy-loaded commands, manifest discovery, and class introspec
6
6
 
7
7
  ```
8
8
  smrt introspect # Discover SMRT objects in project
9
+ smrt doctor # Umbrella diagnostics; can verify a generation snapshot
9
10
  smrt db:status # Pending schema changes + failed migration classification
10
11
  smrt db:migrate # Apply migrations
11
12
  smrt db:migrate --force-migration <exact-id> [--force-migration <exact-id>...] # Force exact generated migrations in one atomic batch
package/README.md CHANGED
@@ -19,6 +19,25 @@ pnpm add -D @happyvertical/smrt-cli
19
19
  | `smrt objects` | List all registered s-m-r-t objects |
20
20
  | `smrt schema <object>` | Show detailed schema for an object |
21
21
  | `smrt status` | Show system status (database, AI, registry) |
22
+ | `smrt doctor` | Run the umbrella project-health diagnostics (aliases: `check`, `diagnose`) |
23
+
24
+ `smrt doctor` reports project-health and integration problems. Noun-scoped
25
+ validators such as `smrt db:validate` retain their narrower contracts; do not
26
+ use a generic `smrt validate` command as a second project-health entry point.
27
+ Artifact consumers must still verify their own inputs and fail closed—running
28
+ `doctor` is an observability aid, not a prerequisite for safe loading.
29
+
30
+ To inspect the same generation-snapshot contract used by the Vite plugins:
31
+
32
+ ```bash
33
+ smrt doctor \
34
+ --generation-snapshot .ci/smrt-generation-snapshot.json \
35
+ --generation-snapshot-sha256 "$SMRT_GENERATION_SNAPSHOT_SHA256" \
36
+ --generation-snapshot-provenance "$GITHUB_SHA" \
37
+ --generation-snapshot-source-root "$GITHUB_WORKSPACE"
38
+ ```
39
+
40
+ The four snapshot options are atomic: supplying any one requires all four.
22
41
 
23
42
  ### Database
24
43
 
@@ -6441,8 +6441,7 @@ function getRowCount(result) {
6441
6441
  }
6442
6442
  function buildNullSafeIdentityPredicate(columns) {
6443
6443
  return columns.map((column) => {
6444
- const quoted = quoteIdentifier(column);
6445
- return `(${quoted} = ? OR (${quoted} IS NULL AND ? IS NULL))`;
6444
+ return `${quoteIdentifier(column)} IS NOT DISTINCT FROM ?`;
6446
6445
  }).join(" AND ");
6447
6446
  }
6448
6447
  /**
@@ -6455,9 +6454,7 @@ function getRowId(row) {
6455
6454
  return id == null ? null : id;
6456
6455
  }
6457
6456
  function getIdentityParams(row, columns) {
6458
- const params = [];
6459
- for (const column of columns) params.push(row[column], row[column]);
6460
- return params;
6457
+ return columns.map((column) => row[column]);
6461
6458
  }
6462
6459
  function getStiConflictIdentityColumns(className) {
6463
6460
  return ObjectRegistry.getConflictColumns(className).filter((column) => column !== "_meta_type");
@@ -7603,12 +7600,30 @@ export default testManifest;
7603
7600
  description: "Diagnose and report on SMRT project health",
7604
7601
  aliases: ["check", "diagnose"],
7605
7602
  args: [],
7606
- options: { fix: {
7607
- type: "boolean",
7608
- description: "Attempt to fix issues automatically",
7609
- default: false,
7610
- short: "f"
7611
- } },
7603
+ options: {
7604
+ fix: {
7605
+ type: "boolean",
7606
+ description: "Attempt to fix issues automatically",
7607
+ default: false,
7608
+ short: "f"
7609
+ },
7610
+ "generation-snapshot": {
7611
+ type: "string",
7612
+ description: "Verify a transported SMRT generation snapshot"
7613
+ },
7614
+ "generation-snapshot-sha256": {
7615
+ type: "string",
7616
+ description: "Expected sha256:<hex> digest for the generation snapshot"
7617
+ },
7618
+ "generation-snapshot-provenance": {
7619
+ type: "string",
7620
+ description: "Expected source provenance for the generation snapshot"
7621
+ },
7622
+ "generation-snapshot-source-root": {
7623
+ type: "string",
7624
+ description: "Absolute current checkout root for portable snapshot paths"
7625
+ }
7626
+ },
7612
7627
  handler: async (_args, options) => {
7613
7628
  const { existsSync, readFileSync } = await import("node:fs");
7614
7629
  const { resolve, join } = await import("node:path");
@@ -7666,6 +7681,30 @@ export default testManifest;
7666
7681
  } else check("Packed publish artifact verification", false, void 0, "Pack verifier is unavailable in this SMRT CLI build");
7667
7682
  console.log();
7668
7683
  }
7684
+ const snapshotOptionNames = [
7685
+ "generation-snapshot",
7686
+ "generation-snapshot-sha256",
7687
+ "generation-snapshot-provenance",
7688
+ "generation-snapshot-source-root"
7689
+ ];
7690
+ if (snapshotOptionNames.some((name) => options[name] !== void 0)) {
7691
+ console.log("📸 Generation Snapshot\n");
7692
+ const missingOptions = snapshotOptionNames.filter((name) => !options[name]?.trim());
7693
+ if (missingOptions.length > 0) check("Generation snapshot verified", false, `Missing required option(s): ${missingOptions.map((name) => `--${name}`).join(", ")}`);
7694
+ else try {
7695
+ const { loadVerifiedSmrtGenerationSnapshot } = await import("@happyvertical/smrt-core/vite-plugin");
7696
+ const snapshot = loadVerifiedSmrtGenerationSnapshot({
7697
+ path: options["generation-snapshot"] ?? "",
7698
+ sha256: options["generation-snapshot-sha256"] ?? "",
7699
+ provenance: options["generation-snapshot-provenance"] ?? "",
7700
+ sourceRoot: options["generation-snapshot-source-root"] ?? ""
7701
+ }, cwd);
7702
+ check(`Generation snapshot verified (${Object.keys(snapshot.objects).length} object(s))`, true);
7703
+ } catch (error) {
7704
+ check("Generation snapshot verified", false, error instanceof Error ? error.message : String(error));
7705
+ }
7706
+ console.log();
7707
+ }
7669
7708
  console.log("⚙️ Configuration\n");
7670
7709
  const smrtConfigTs = resolve(cwd, "smrt.config.ts");
7671
7710
  const smrtConfigJs = resolve(cwd, "smrt.config.js");
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-BMFrPkA-.js");
52
+ const { gnodeCommands } = await import("./commands-U7gYv14z.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-BMFrPkA-.js");
59
+ const { gitCommands } = await import("./commands-U7gYv14z.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-BMFrPkA-.js");
66
+ const { generateCommands } = await import("./commands-U7gYv14z.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-BMFrPkA-.js");
73
+ const { initCommands } = await import("./commands-U7gYv14z.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-BMFrPkA-.js");
80
+ const { utilityCommands } = await import("./commands-U7gYv14z.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-BMFrPkA-.js");
87
+ const { dispatchCommands } = await import("./commands-U7gYv14z.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-BMFrPkA-.js");
94
+ const { docsCommands } = await import("./commands-U7gYv14z.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-BMFrPkA-.js");
101
+ const { playgroundCommands } = await import("./commands-U7gYv14z.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-BMFrPkA-.js");
108
+ const { workbenchCommands } = await import("./commands-U7gYv14z.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.40.66",
3
+ "version": "0.40.68",
4
4
  "description": "Developer CLI for SMRT framework - introspection, testing, and project management",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -24,20 +24,20 @@
24
24
  }
25
25
  },
26
26
  "dependencies": {
27
- "@happyvertical/ai": "^0.86.3",
28
- "@happyvertical/files": "^0.86.3",
29
- "@happyvertical/logger": "^0.86.3",
30
- "@happyvertical/sql": "^0.86.3",
31
- "@happyvertical/utils": "^0.86.3",
27
+ "@happyvertical/ai": "^0.87.0",
28
+ "@happyvertical/files": "^0.87.0",
29
+ "@happyvertical/logger": "^0.87.0",
30
+ "@happyvertical/sql": "^0.87.0",
31
+ "@happyvertical/utils": "^0.87.0",
32
32
  "acorn": "^8.17.0",
33
33
  "fast-glob": "3.3.3",
34
34
  "tar": "^7.5.19",
35
- "@happyvertical/smrt-agents": "0.40.66",
36
- "@happyvertical/smrt-playground": "0.40.66",
37
- "@happyvertical/smrt-config": "0.40.66",
38
- "@happyvertical/smrt-types": "0.40.66",
39
- "@happyvertical/smrt-dev-mcp": "0.40.66",
40
- "@happyvertical/smrt-core": "0.40.66"
35
+ "@happyvertical/smrt-agents": "0.40.68",
36
+ "@happyvertical/smrt-config": "0.40.68",
37
+ "@happyvertical/smrt-core": "0.40.68",
38
+ "@happyvertical/smrt-dev-mcp": "0.40.68",
39
+ "@happyvertical/smrt-playground": "0.40.68",
40
+ "@happyvertical/smrt-types": "0.40.68"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@types/node": "24.13.2",
@@ -72,7 +72,7 @@
72
72
  "clean": "rm -rf dist",
73
73
  "dev": "npm run build:watch",
74
74
  "test": "vitest run",
75
- "test:postgres": "node ../../scripts/run-with-ci-postgres.mjs -- pnpm exec vitest run src/commands/__tests__/db-migrate-uuid.test.ts src/commands/__tests__/db-migrate-force-postgres.test.ts",
75
+ "test:postgres": "node ../../scripts/run-with-ci-postgres.mjs -- pnpm exec vitest run src/commands/__tests__/db-migrate-uuid.test.ts src/commands/__tests__/db-migrate-force-postgres.test.ts src/commands/__tests__/sti-upgrade.test.ts",
76
76
  "test:watch": "vitest",
77
77
  "typecheck": "tsc -p tsconfig.typecheck.json",
78
78
  "cli": "tsx src/index.ts"