@happyvertical/smrt-cli 0.40.22 → 0.40.24
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 +2 -2
- package/dist/{commands-DrK9PHS4.js → commands-CR1RZCYu.js} +30 -18
- package/dist/index.js +8 -8
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -57,7 +57,7 @@ batch.
|
|
|
57
57
|
|
|
58
58
|
### Audited PostgreSQL timestamp conversion
|
|
59
59
|
|
|
60
|
-
`timestamp without time zone` values do not carry enough information for
|
|
60
|
+
`timestamp without time zone` values do not carry enough information for s-m-r-t
|
|
61
61
|
to infer their original instant. After auditing every historical writer,
|
|
62
62
|
database default, trigger, and raw SQL path, an operator may confirm that the
|
|
63
63
|
legacy values are UTC wall times and include the exact opt-in:
|
|
@@ -155,7 +155,7 @@ Custom methods on s-m-r-t objects are auto-discovered from manifests. Method par
|
|
|
155
155
|
## Usage
|
|
156
156
|
|
|
157
157
|
```bash
|
|
158
|
-
# Discover what
|
|
158
|
+
# Discover what s-m-r-t objects are available
|
|
159
159
|
smrt introspect
|
|
160
160
|
|
|
161
161
|
# Generate an MCP server
|
|
@@ -12,6 +12,7 @@ import { createLogger } from "@happyvertical/logger";
|
|
|
12
12
|
import glob from "fast-glob";
|
|
13
13
|
import { createHash } from "node:crypto";
|
|
14
14
|
import { toSnakeCase } from "@happyvertical/smrt-core/utils";
|
|
15
|
+
import { readAgentModuleDocs } from "@happyvertical/smrt-core/knowledge";
|
|
15
16
|
import { MCPGenerator } from "@happyvertical/smrt-core/generators";
|
|
16
17
|
import { generateDeclarationsFromCLI } from "@happyvertical/smrt-core/prebuild";
|
|
17
18
|
import { execSync, spawn, spawnSync } from "node:child_process";
|
|
@@ -2393,8 +2394,11 @@ function createDocsCommand(config) {
|
|
|
2393
2394
|
console.log(` ${totalPackages} packages documented`);
|
|
2394
2395
|
if (packages.length > 0) console.log(` ${packages.length} SMRT packages`);
|
|
2395
2396
|
if (sdkPackages.length > 0) console.log(` ${sdkPackages.length} SDK packages`);
|
|
2396
|
-
const
|
|
2397
|
+
const allPackages = [...packages, ...sdkPackages];
|
|
2398
|
+
const withAgentDocs = allPackages.filter((p) => p.agentMd).length;
|
|
2397
2399
|
if (withAgentDocs > 0) console.log(` ${withAgentDocs} with AGENTS.md`);
|
|
2400
|
+
const moduleDocCount = allPackages.reduce((total, p) => total + (p.moduleDocs?.length ?? 0), 0);
|
|
2401
|
+
if (moduleDocCount > 0) console.log(` ${moduleDocCount} linked module docs`);
|
|
2398
2402
|
if (rootDocs.length > 0) console.log(` ${rootDocs.length} framework documents included`);
|
|
2399
2403
|
console.log("");
|
|
2400
2404
|
} catch (error) {
|
|
@@ -2494,7 +2498,8 @@ function loadPackageInfo(packagePath, dirName) {
|
|
|
2494
2498
|
readme: existsSync(readmePath) ? readFileSync(readmePath, "utf-8") : null,
|
|
2495
2499
|
agentMd: agentDoc.content,
|
|
2496
2500
|
claudeMd: agentDoc.content,
|
|
2497
|
-
docSource: agentDoc.source
|
|
2501
|
+
docSource: agentDoc.source,
|
|
2502
|
+
moduleDocs: agentDoc.source === "AGENTS.md" ? readAgentModuleDocs(packagePath, agentDoc.content ?? void 0) : []
|
|
2498
2503
|
};
|
|
2499
2504
|
} catch {
|
|
2500
2505
|
console.warn(` ⚠️ Could not read package.json for ${dirName}`);
|
|
@@ -2573,6 +2578,27 @@ function renderAgentMd(content) {
|
|
|
2573
2578
|
if (h1Match) content = content.slice(h1Match[0].length);
|
|
2574
2579
|
return content.trim();
|
|
2575
2580
|
}
|
|
2581
|
+
/**
|
|
2582
|
+
* The package's AGENTS.md followed by every module doc it links (#2108).
|
|
2583
|
+
* The links stay in the rendered text so a reader can still map a section back
|
|
2584
|
+
* to its source path; the bodies follow so nothing is lost downstream.
|
|
2585
|
+
*/
|
|
2586
|
+
function renderPackageDoc(pkg, lines) {
|
|
2587
|
+
const content = pkg.agentMd ?? pkg.claudeMd;
|
|
2588
|
+
if (!content) {
|
|
2589
|
+
lines.push("*No AGENTS.md found for this package.*");
|
|
2590
|
+
lines.push("");
|
|
2591
|
+
return;
|
|
2592
|
+
}
|
|
2593
|
+
lines.push(renderAgentMd(content));
|
|
2594
|
+
lines.push("");
|
|
2595
|
+
for (const doc of pkg.moduleDocs ?? []) {
|
|
2596
|
+
lines.push(`#### ${doc.path}`);
|
|
2597
|
+
lines.push("");
|
|
2598
|
+
lines.push(renderAgentMd(doc.content));
|
|
2599
|
+
lines.push("");
|
|
2600
|
+
}
|
|
2601
|
+
}
|
|
2576
2602
|
function generateMarkdown(packages, rootDocs, sdkPackages, generatedBy = "smrt docs:agents") {
|
|
2577
2603
|
const lines = [];
|
|
2578
2604
|
lines.push("# SMRT Framework Context");
|
|
@@ -2616,14 +2642,7 @@ function generateMarkdown(packages, rootDocs, sdkPackages, generatedBy = "smrt d
|
|
|
2616
2642
|
lines.push("");
|
|
2617
2643
|
lines.push(`## ${pkg.name}`);
|
|
2618
2644
|
lines.push("");
|
|
2619
|
-
|
|
2620
|
-
if (content) {
|
|
2621
|
-
lines.push(renderAgentMd(content));
|
|
2622
|
-
lines.push("");
|
|
2623
|
-
} else {
|
|
2624
|
-
lines.push("*No AGENTS.md found for this package.*");
|
|
2625
|
-
lines.push("");
|
|
2626
|
-
}
|
|
2645
|
+
renderPackageDoc(pkg, lines);
|
|
2627
2646
|
}
|
|
2628
2647
|
if (sdkPackages && sdkPackages.length > 0) {
|
|
2629
2648
|
lines.push("---");
|
|
@@ -2635,14 +2654,7 @@ function generateMarkdown(packages, rootDocs, sdkPackages, generatedBy = "smrt d
|
|
|
2635
2654
|
lines.push("");
|
|
2636
2655
|
lines.push(`### ${pkg.name}`);
|
|
2637
2656
|
lines.push("");
|
|
2638
|
-
|
|
2639
|
-
if (content) {
|
|
2640
|
-
lines.push(renderAgentMd(content));
|
|
2641
|
-
lines.push("");
|
|
2642
|
-
} else {
|
|
2643
|
-
lines.push("*No AGENTS.md found for this package.*");
|
|
2644
|
-
lines.push("");
|
|
2645
|
-
}
|
|
2657
|
+
renderPackageDoc(pkg, lines);
|
|
2646
2658
|
}
|
|
2647
2659
|
}
|
|
2648
2660
|
lines.push("---");
|
package/dist/index.js
CHANGED
|
@@ -48,56 +48,56 @@ var _docsCommands = null;
|
|
|
48
48
|
var _playgroundCommands = null;
|
|
49
49
|
async function getGnodeCommands() {
|
|
50
50
|
if (!_gnodeCommands) {
|
|
51
|
-
const { gnodeCommands } = await import("./commands-
|
|
51
|
+
const { gnodeCommands } = await import("./commands-CR1RZCYu.js");
|
|
52
52
|
_gnodeCommands = gnodeCommands;
|
|
53
53
|
}
|
|
54
54
|
return _gnodeCommands;
|
|
55
55
|
}
|
|
56
56
|
async function getGitCommands() {
|
|
57
57
|
if (!_gitCommands) {
|
|
58
|
-
const { gitCommands } = await import("./commands-
|
|
58
|
+
const { gitCommands } = await import("./commands-CR1RZCYu.js");
|
|
59
59
|
_gitCommands = gitCommands;
|
|
60
60
|
}
|
|
61
61
|
return _gitCommands;
|
|
62
62
|
}
|
|
63
63
|
async function getGenerateCommands() {
|
|
64
64
|
if (!_generateCommands) {
|
|
65
|
-
const { generateCommands } = await import("./commands-
|
|
65
|
+
const { generateCommands } = await import("./commands-CR1RZCYu.js");
|
|
66
66
|
_generateCommands = generateCommands;
|
|
67
67
|
}
|
|
68
68
|
return _generateCommands;
|
|
69
69
|
}
|
|
70
70
|
async function getInitCommands() {
|
|
71
71
|
if (!_initCommands) {
|
|
72
|
-
const { initCommands } = await import("./commands-
|
|
72
|
+
const { initCommands } = await import("./commands-CR1RZCYu.js");
|
|
73
73
|
_initCommands = initCommands;
|
|
74
74
|
}
|
|
75
75
|
return _initCommands;
|
|
76
76
|
}
|
|
77
77
|
async function getUtilityCommands() {
|
|
78
78
|
if (!_utilityCommands) {
|
|
79
|
-
const { utilityCommands } = await import("./commands-
|
|
79
|
+
const { utilityCommands } = await import("./commands-CR1RZCYu.js");
|
|
80
80
|
_utilityCommands = utilityCommands;
|
|
81
81
|
}
|
|
82
82
|
return _utilityCommands;
|
|
83
83
|
}
|
|
84
84
|
async function getDispatchCommands() {
|
|
85
85
|
if (!_dispatchCommands) {
|
|
86
|
-
const { dispatchCommands } = await import("./commands-
|
|
86
|
+
const { dispatchCommands } = await import("./commands-CR1RZCYu.js");
|
|
87
87
|
_dispatchCommands = dispatchCommands;
|
|
88
88
|
}
|
|
89
89
|
return _dispatchCommands;
|
|
90
90
|
}
|
|
91
91
|
async function getDocsCommands() {
|
|
92
92
|
if (!_docsCommands) {
|
|
93
|
-
const { docsCommands } = await import("./commands-
|
|
93
|
+
const { docsCommands } = await import("./commands-CR1RZCYu.js");
|
|
94
94
|
_docsCommands = docsCommands;
|
|
95
95
|
}
|
|
96
96
|
return _docsCommands;
|
|
97
97
|
}
|
|
98
98
|
async function getPlaygroundCommands() {
|
|
99
99
|
if (!_playgroundCommands) {
|
|
100
|
-
const { playgroundCommands } = await import("./commands-
|
|
100
|
+
const { playgroundCommands } = await import("./commands-CR1RZCYu.js");
|
|
101
101
|
_playgroundCommands = playgroundCommands;
|
|
102
102
|
}
|
|
103
103
|
return _playgroundCommands;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happyvertical/smrt-cli",
|
|
3
|
-
"version": "0.40.
|
|
3
|
+
"version": "0.40.24",
|
|
4
4
|
"description": "Developer CLI for SMRT framework - introspection, testing, and project management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -32,12 +32,12 @@
|
|
|
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.
|
|
36
|
-
"@happyvertical/smrt-
|
|
37
|
-
"@happyvertical/smrt-
|
|
38
|
-
"@happyvertical/smrt-dev-mcp": "0.40.
|
|
39
|
-
"@happyvertical/smrt-playground": "0.40.
|
|
40
|
-
"@happyvertical/smrt-types": "0.40.
|
|
35
|
+
"@happyvertical/smrt-agents": "0.40.24",
|
|
36
|
+
"@happyvertical/smrt-config": "0.40.24",
|
|
37
|
+
"@happyvertical/smrt-core": "0.40.24",
|
|
38
|
+
"@happyvertical/smrt-dev-mcp": "0.40.24",
|
|
39
|
+
"@happyvertical/smrt-playground": "0.40.24",
|
|
40
|
+
"@happyvertical/smrt-types": "0.40.24"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/node": "24.13.2",
|