smithers-orchestrator 0.16.6 → 0.16.7
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 +19 -19
- package/src/bin/smithers.js +36 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "smithers-orchestrator",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.7",
|
|
4
4
|
"description": "Public Smithers facade and workflow authoring convenience package",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -37,24 +37,24 @@
|
|
|
37
37
|
"ai": "^6.0.168",
|
|
38
38
|
"diff": "^9.0.0",
|
|
39
39
|
"zod": "^4.3.6",
|
|
40
|
-
"@smithers-orchestrator/
|
|
41
|
-
"@smithers-orchestrator/
|
|
42
|
-
"@smithers-orchestrator/agents": "0.16.
|
|
43
|
-
"@smithers-orchestrator/
|
|
44
|
-
"@smithers-orchestrator/
|
|
45
|
-
"@smithers-orchestrator/
|
|
46
|
-
"@smithers-orchestrator/
|
|
47
|
-
"@smithers-orchestrator/
|
|
48
|
-
"@smithers-orchestrator/
|
|
49
|
-
"@smithers-orchestrator/observability": "0.16.
|
|
50
|
-
"@smithers-orchestrator/
|
|
51
|
-
"@smithers-orchestrator/
|
|
52
|
-
"@smithers-orchestrator/
|
|
53
|
-
"@smithers-orchestrator/
|
|
54
|
-
"@smithers-orchestrator/
|
|
55
|
-
"@smithers-orchestrator/server": "0.16.
|
|
56
|
-
"@smithers-orchestrator/time-travel": "0.16.
|
|
57
|
-
"@smithers-orchestrator/vcs": "0.16.
|
|
40
|
+
"@smithers-orchestrator/db": "0.16.7",
|
|
41
|
+
"@smithers-orchestrator/cli": "0.16.7",
|
|
42
|
+
"@smithers-orchestrator/agents": "0.16.7",
|
|
43
|
+
"@smithers-orchestrator/components": "0.16.7",
|
|
44
|
+
"@smithers-orchestrator/driver": "0.16.7",
|
|
45
|
+
"@smithers-orchestrator/memory": "0.16.7",
|
|
46
|
+
"@smithers-orchestrator/errors": "0.16.7",
|
|
47
|
+
"@smithers-orchestrator/engine": "0.16.7",
|
|
48
|
+
"@smithers-orchestrator/graph": "0.16.7",
|
|
49
|
+
"@smithers-orchestrator/observability": "0.16.7",
|
|
50
|
+
"@smithers-orchestrator/openapi": "0.16.7",
|
|
51
|
+
"@smithers-orchestrator/sandbox": "0.16.7",
|
|
52
|
+
"@smithers-orchestrator/scheduler": "0.16.7",
|
|
53
|
+
"@smithers-orchestrator/react-reconciler": "0.16.7",
|
|
54
|
+
"@smithers-orchestrator/scorers": "0.16.7",
|
|
55
|
+
"@smithers-orchestrator/server": "0.16.7",
|
|
56
|
+
"@smithers-orchestrator/time-travel": "0.16.7",
|
|
57
|
+
"@smithers-orchestrator/vcs": "0.16.7"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@types/bun": "latest",
|
package/src/bin/smithers.js
CHANGED
|
@@ -1,2 +1,37 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
|
-
import "
|
|
2
|
+
import { spawn } from "node:child_process";
|
|
3
|
+
import { existsSync, realpathSync } from "node:fs";
|
|
4
|
+
import { resolve } from "node:path";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* When a workflow directory (`.smithers/`) exists in the user's cwd and it's
|
|
9
|
+
* installed a local `smithers` bin, re-exec against that instead of this
|
|
10
|
+
* globally-resolved copy. This is the same pattern `tsc` uses for local
|
|
11
|
+
* TypeScript installs: every module the workflow runtime touches — engine,
|
|
12
|
+
* react-reconciler, components, React itself — comes from a single tree,
|
|
13
|
+
* which avoids the "two React copies → null useContext dispatcher" trap that
|
|
14
|
+
* bunx and `.smithers/` would otherwise produce (bunx temp dir + local
|
|
15
|
+
* `.smithers/node_modules/` each install their own React).
|
|
16
|
+
*/
|
|
17
|
+
function delegateToLocalCliIfPresent() {
|
|
18
|
+
const cwd = process.cwd();
|
|
19
|
+
const localBin = resolve(cwd, ".smithers/node_modules/.bin/smithers");
|
|
20
|
+
if (!existsSync(localBin)) return false;
|
|
21
|
+
const selfPath = realpathSync(fileURLToPath(import.meta.url));
|
|
22
|
+
const localTarget = realpathSync(localBin);
|
|
23
|
+
if (localTarget === selfPath) return false;
|
|
24
|
+
const proc = spawn(process.execPath, [localTarget, ...process.argv.slice(2)], {
|
|
25
|
+
stdio: "inherit",
|
|
26
|
+
cwd,
|
|
27
|
+
});
|
|
28
|
+
proc.on("exit", (code, signal) => {
|
|
29
|
+
if (signal) process.kill(process.pid, signal);
|
|
30
|
+
else process.exit(code ?? 0);
|
|
31
|
+
});
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
if (!delegateToLocalCliIfPresent()) {
|
|
36
|
+
await import("@smithers-orchestrator/cli");
|
|
37
|
+
}
|