@smithers-orchestrator/cli 0.16.6 → 0.16.8
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/package.json +11 -14
- package/src/index.js +5 -1
- package/src/workflow-pack.js +38 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithers-orchestrator/cli",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.8",
|
|
4
4
|
"description": "Smithers command-line interface, TUI, MCP server, and local workflow tools",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -19,9 +19,6 @@
|
|
|
19
19
|
"files": [
|
|
20
20
|
"src/"
|
|
21
21
|
],
|
|
22
|
-
"bin": {
|
|
23
|
-
"smithers": "./src/index.js"
|
|
24
|
-
},
|
|
25
22
|
"dependencies": {
|
|
26
23
|
"@effect/workflow": "^0.18.0",
|
|
27
24
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
@@ -32,16 +29,16 @@
|
|
|
32
29
|
"picocolors": "^1.1.1",
|
|
33
30
|
"react": "^19.2.5",
|
|
34
31
|
"zod": "^4.3.6",
|
|
35
|
-
"@smithers-orchestrator/
|
|
36
|
-
"@smithers-orchestrator/
|
|
37
|
-
"@smithers-orchestrator/
|
|
38
|
-
"@smithers-orchestrator/
|
|
39
|
-
"@smithers-orchestrator/
|
|
40
|
-
"@smithers-orchestrator/
|
|
41
|
-
"@smithers-orchestrator/scheduler": "0.16.
|
|
42
|
-
"@smithers-orchestrator/time-travel": "0.16.
|
|
43
|
-
"smithers-orchestrator": "0.16.
|
|
44
|
-
"
|
|
32
|
+
"@smithers-orchestrator/components": "0.16.8",
|
|
33
|
+
"@smithers-orchestrator/agents": "0.16.8",
|
|
34
|
+
"@smithers-orchestrator/observability": "0.16.8",
|
|
35
|
+
"@smithers-orchestrator/driver": "0.16.8",
|
|
36
|
+
"@smithers-orchestrator/db": "0.16.8",
|
|
37
|
+
"@smithers-orchestrator/errors": "0.16.8",
|
|
38
|
+
"@smithers-orchestrator/scheduler": "0.16.8",
|
|
39
|
+
"@smithers-orchestrator/time-travel": "0.16.8",
|
|
40
|
+
"@smithers-orchestrator/server": "0.16.8",
|
|
41
|
+
"smithers-orchestrator": "0.16.8"
|
|
45
42
|
},
|
|
46
43
|
"devDependencies": {
|
|
47
44
|
"@types/bun": "latest",
|
package/src/index.js
CHANGED
|
@@ -1320,6 +1320,7 @@ const revertOptions = z.object({
|
|
|
1320
1320
|
});
|
|
1321
1321
|
const initOptions = z.object({
|
|
1322
1322
|
force: z.boolean().default(false).describe("Overwrite existing scaffold files"),
|
|
1323
|
+
install: z.boolean().default(true).describe("Run `bun install` inside .smithers/ after scaffolding (--no-install to skip)"),
|
|
1323
1324
|
});
|
|
1324
1325
|
const workflowPathArgs = z.object({
|
|
1325
1326
|
name: z.string().describe("Workflow ID"),
|
|
@@ -2248,7 +2249,10 @@ const cli = Cli.create({
|
|
|
2248
2249
|
return c.error(opts);
|
|
2249
2250
|
};
|
|
2250
2251
|
try {
|
|
2251
|
-
const result = initWorkflowPack({
|
|
2252
|
+
const result = initWorkflowPack({
|
|
2253
|
+
force: c.options.force,
|
|
2254
|
+
skipInstall: !c.options.install,
|
|
2255
|
+
});
|
|
2252
2256
|
return c.ok(result, {
|
|
2253
2257
|
cta: {
|
|
2254
2258
|
description: "Next steps:",
|
package/src/workflow-pack.js
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
|
+
import { spawnSync } from "node:child_process";
|
|
1
2
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
2
3
|
import { dirname, resolve } from "node:path";
|
|
3
4
|
import { fileURLToPath } from "node:url";
|
|
4
5
|
import { generateAgentsTs } from "./agent-detection.js";
|
|
5
6
|
/**
|
|
6
|
-
* @typedef {{ force?: boolean; rootDir?: string; }} InitOptions
|
|
7
|
+
* @typedef {{ force?: boolean; rootDir?: string; skipInstall?: boolean; }} InitOptions
|
|
7
8
|
*/
|
|
8
9
|
/**
|
|
9
|
-
* @typedef {{
|
|
10
|
+
* @typedef {{ status: "ok" | "skipped" | "failed"; reason?: string; }} InitInstallResult
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* @typedef {{ rootDir: string; writtenFiles: string[]; skippedFiles: string[]; preservedPaths: string[]; install: InitInstallResult; }} InitResult
|
|
10
14
|
*/
|
|
11
15
|
/**
|
|
12
16
|
* @typedef {{ command: string; description: string; }} WorkflowCta
|
|
@@ -2109,13 +2113,45 @@ export function initWorkflowPack(options = {}) {
|
|
|
2109
2113
|
writeFileSync(absolutePath, file.contents, "utf8");
|
|
2110
2114
|
writtenFiles.push(absolutePath);
|
|
2111
2115
|
}
|
|
2116
|
+
const install = runBunInstall(rootDir, options.skipInstall ?? false);
|
|
2112
2117
|
return {
|
|
2113
2118
|
rootDir,
|
|
2114
2119
|
writtenFiles,
|
|
2115
2120
|
skippedFiles,
|
|
2116
2121
|
preservedPaths,
|
|
2122
|
+
install,
|
|
2117
2123
|
};
|
|
2118
2124
|
}
|
|
2125
|
+
/**
|
|
2126
|
+
* Install `.smithers/` workspace deps so git-specifier packages like
|
|
2127
|
+
* `github:mattpocock/skills` — which Bun's runtime auto-install doesn't fetch —
|
|
2128
|
+
* are available the first time a workflow runs. Failures here don't fail init:
|
|
2129
|
+
* the scaffold is on disk, the user can always re-run `bun install` by hand.
|
|
2130
|
+
*
|
|
2131
|
+
* @param {string} rootDir
|
|
2132
|
+
* @param {boolean} skip
|
|
2133
|
+
* @returns {InitInstallResult}
|
|
2134
|
+
*/
|
|
2135
|
+
function runBunInstall(rootDir, skip) {
|
|
2136
|
+
if (skip) return { status: "skipped", reason: "skip-install" };
|
|
2137
|
+
const result = spawnSync("bun", ["install"], {
|
|
2138
|
+
cwd: rootDir,
|
|
2139
|
+
stdio: "inherit",
|
|
2140
|
+
});
|
|
2141
|
+
if (result.error && /** @type {NodeJS.ErrnoException} */ (result.error).code === "ENOENT") {
|
|
2142
|
+
return {
|
|
2143
|
+
status: "failed",
|
|
2144
|
+
reason: "`bun` not found on PATH; run `bun install` inside .smithers/ manually",
|
|
2145
|
+
};
|
|
2146
|
+
}
|
|
2147
|
+
if (result.status !== 0) {
|
|
2148
|
+
return {
|
|
2149
|
+
status: "failed",
|
|
2150
|
+
reason: `bun install exited with status ${result.status ?? "unknown"}; run it manually inside .smithers/`,
|
|
2151
|
+
};
|
|
2152
|
+
}
|
|
2153
|
+
return { status: "ok" };
|
|
2154
|
+
}
|
|
2119
2155
|
const WORKFLOW_FOLLOW_UPS = {
|
|
2120
2156
|
"research": [
|
|
2121
2157
|
{ command: "workflow run write-a-prd", description: "Formalize findings into a PRD" },
|