@smithers-orchestrator/cli 0.16.0 → 0.16.3
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 +17 -17
- package/src/index.js +58 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithers-orchestrator/cli",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.3",
|
|
4
4
|
"description": "Smithers command-line interface, TUI, MCP server, and local workflow tools",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -24,24 +24,24 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@effect/workflow": "^0.18.0",
|
|
27
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
28
|
-
"@opentui/core": "^0.1.
|
|
29
|
-
"@opentui/react": "^0.1.
|
|
30
|
-
"effect": "^3.21.
|
|
31
|
-
"incur": "^0.
|
|
27
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
28
|
+
"@opentui/core": "^0.1.100",
|
|
29
|
+
"@opentui/react": "^0.1.100",
|
|
30
|
+
"effect": "^3.21.1",
|
|
31
|
+
"incur": "^0.4.1",
|
|
32
32
|
"picocolors": "^1.1.1",
|
|
33
|
-
"react": "^
|
|
33
|
+
"react": "^19.2.5",
|
|
34
34
|
"zod": "^4.3.6",
|
|
35
|
-
"@smithers-orchestrator/agents": "0.16.
|
|
36
|
-
"@smithers-orchestrator/components": "0.16.
|
|
37
|
-
"@smithers-orchestrator/db": "0.16.
|
|
38
|
-
"@smithers-orchestrator/driver": "0.16.
|
|
39
|
-
"@smithers-orchestrator/
|
|
40
|
-
"@smithers-orchestrator/
|
|
41
|
-
"@smithers-orchestrator/
|
|
42
|
-
"@smithers-orchestrator/time-travel": "0.16.
|
|
43
|
-
"
|
|
44
|
-
"smithers-orchestrator": "0.16.
|
|
35
|
+
"@smithers-orchestrator/agents": "0.16.3",
|
|
36
|
+
"@smithers-orchestrator/components": "0.16.3",
|
|
37
|
+
"@smithers-orchestrator/db": "0.16.3",
|
|
38
|
+
"@smithers-orchestrator/driver": "0.16.3",
|
|
39
|
+
"@smithers-orchestrator/scheduler": "0.16.3",
|
|
40
|
+
"@smithers-orchestrator/server": "0.16.3",
|
|
41
|
+
"@smithers-orchestrator/errors": "0.16.3",
|
|
42
|
+
"@smithers-orchestrator/time-travel": "0.16.3",
|
|
43
|
+
"smithers-orchestrator": "0.16.3",
|
|
44
|
+
"@smithers-orchestrator/observability": "0.16.3"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@types/bun": "latest",
|
package/src/index.js
CHANGED
|
@@ -4566,6 +4566,39 @@ const cli = Cli.create({
|
|
|
4566
4566
|
return fail({ code: "TIMELINE_FAILED", message: err?.message ?? String(err), exitCode: 1 });
|
|
4567
4567
|
}
|
|
4568
4568
|
},
|
|
4569
|
+
})
|
|
4570
|
+
// =========================================================================
|
|
4571
|
+
// smithers gui [path]
|
|
4572
|
+
// Opens a directory as a workspace in the Smithers GUI macOS app.
|
|
4573
|
+
// =========================================================================
|
|
4574
|
+
.command("gui", {
|
|
4575
|
+
description: "Open a directory as a workspace in Smithers GUI",
|
|
4576
|
+
args: z.object({
|
|
4577
|
+
path: z.string().optional().describe("Directory path (defaults to current working directory)"),
|
|
4578
|
+
}),
|
|
4579
|
+
options: z.object({
|
|
4580
|
+
bundleId: z.string().default("com.smithers.SmithersGUI").describe("Smithers GUI app bundle identifier"),
|
|
4581
|
+
}),
|
|
4582
|
+
async run(c) {
|
|
4583
|
+
const input = c.args.path ?? process.cwd();
|
|
4584
|
+
const target = resolve(input);
|
|
4585
|
+
if (!existsSync(target)) {
|
|
4586
|
+
return c.error({ code: "PATH_NOT_FOUND", message: `Path does not exist: ${target}`, exitCode: 1 });
|
|
4587
|
+
}
|
|
4588
|
+
try {
|
|
4589
|
+
const proc = spawn("open", ["-b", c.options.bundleId, target], {
|
|
4590
|
+
stdio: "ignore",
|
|
4591
|
+
detached: true,
|
|
4592
|
+
});
|
|
4593
|
+
proc.unref();
|
|
4594
|
+
proc.on("error", () => {});
|
|
4595
|
+
console.log(`Opening ${target} in Smithers GUI…`);
|
|
4596
|
+
return c.ok({ opened: target, bundleId: c.options.bundleId });
|
|
4597
|
+
}
|
|
4598
|
+
catch (err) {
|
|
4599
|
+
return c.error({ code: "GUI_LAUNCH_FAILED", message: err?.message ?? String(err), exitCode: 1 });
|
|
4600
|
+
}
|
|
4601
|
+
},
|
|
4569
4602
|
})
|
|
4570
4603
|
.command(workflowCli)
|
|
4571
4604
|
.command(cronCli)
|
|
@@ -4584,8 +4617,31 @@ const KNOWN_COMMANDS = new Set([
|
|
|
4584
4617
|
"init", "up", "supervise", "down", "ps", "logs", "events", "chat", "inspect", "node", "why", "approve", "deny",
|
|
4585
4618
|
"cancel", "graph", "revert", "scores", "observability", "workflow", "ask", "cron",
|
|
4586
4619
|
"replay", "diff", "fork", "timeline", "memory", "openapi", "agents", "alerts",
|
|
4587
|
-
"tree", "output", "rewind",
|
|
4620
|
+
"tree", "output", "rewind", "gui",
|
|
4588
4621
|
]);
|
|
4622
|
+
/**
|
|
4623
|
+
* Rewrite `smithers .` or `smithers <path>` (when path looks like a directory) to `smithers gui <path>`.
|
|
4624
|
+
* Matches the convention of VS Code / Cursor's `code .` shortcut for opening the current directory.
|
|
4625
|
+
*
|
|
4626
|
+
* @param {string[]} argv
|
|
4627
|
+
* @returns {string[]}
|
|
4628
|
+
*/
|
|
4629
|
+
function rewriteGuiShortcutArgv(argv) {
|
|
4630
|
+
const firstPositionalIndex = findFirstPositionalIndex(argv);
|
|
4631
|
+
if (firstPositionalIndex < 0) return argv;
|
|
4632
|
+
const firstPositional = argv[firstPositionalIndex];
|
|
4633
|
+
if (KNOWN_COMMANDS.has(firstPositional)) return argv;
|
|
4634
|
+
const isDotShortcut = firstPositional === "." || firstPositional === "..";
|
|
4635
|
+
const isAbsoluteDir = firstPositional.startsWith("/") && existsSync(firstPositional);
|
|
4636
|
+
const isRelativeDir = (firstPositional.startsWith("./") || firstPositional.startsWith("../")) &&
|
|
4637
|
+
existsSync(resolve(firstPositional));
|
|
4638
|
+
if (!isDotShortcut && !isAbsoluteDir && !isRelativeDir) return argv;
|
|
4639
|
+
return [
|
|
4640
|
+
...argv.slice(0, firstPositionalIndex),
|
|
4641
|
+
"gui",
|
|
4642
|
+
...argv.slice(firstPositionalIndex),
|
|
4643
|
+
];
|
|
4644
|
+
}
|
|
4589
4645
|
/**
|
|
4590
4646
|
* Resolve the --color flag to a boolean: auto → process.stdout.isTTY.
|
|
4591
4647
|
* Honors NO_COLOR when color === "auto" to match Unix conventions.
|
|
@@ -4783,6 +4839,7 @@ function normalizeResumeOption(value) {
|
|
|
4783
4839
|
async function main() {
|
|
4784
4840
|
const rawArgv = process.argv.slice(2);
|
|
4785
4841
|
let argv = rawArgv.map((arg) => (arg === "-v" ? "--version" : arg));
|
|
4842
|
+
argv = rewriteGuiShortcutArgv(argv);
|
|
4786
4843
|
argv = rewriteWorkflowCommandArgv(argv);
|
|
4787
4844
|
argv = rewriteEventsJsonFlagArgv(argv);
|
|
4788
4845
|
// Finding #3: route `--json` to command-scoped `-j` for devtools commands.
|