@senpi/runtime 3.0.9-dev.20260710204324 → 3.0.9-dev.feat-strategy-compos.20260716233548

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.
Files changed (108) hide show
  1. package/dist/cli/composer-commands.d.ts +37 -0
  2. package/dist/cli/composer-commands.d.ts.map +1 -0
  3. package/dist/cli/composer-commands.js +396 -0
  4. package/dist/cli/composer-commands.js.map +1 -0
  5. package/dist/cli/senpi-commands.d.ts.map +1 -1
  6. package/dist/cli/senpi-commands.js +2 -0
  7. package/dist/cli/senpi-commands.js.map +1 -1
  8. package/dist/cli/validate-runtime-config.mjs +190 -0
  9. package/dist/composer/AUTHORING.md +435 -0
  10. package/dist/composer/__init__.py +29 -0
  11. package/dist/composer/authoring/__init__.py +59 -0
  12. package/dist/composer/authoring/answers.py +297 -0
  13. package/dist/composer/authoring/archetypes/__init__.py +26 -0
  14. package/dist/composer/authoring/archetypes/_common.py +410 -0
  15. package/dist/composer/authoring/archetypes/breakout.py +134 -0
  16. package/dist/composer/authoring/archetypes/classifier.py +109 -0
  17. package/dist/composer/authoring/archetypes/skeleton.py +76 -0
  18. package/dist/composer/authoring/archetypes/thesis_fund.py +103 -0
  19. package/dist/composer/authoring/archetypes/trend_momentum.py +132 -0
  20. package/dist/composer/authoring/builder.py +191 -0
  21. package/dist/composer/authoring/emit.py +264 -0
  22. package/dist/composer/authoring/gaps.py +115 -0
  23. package/dist/composer/authoring/generate.py +131 -0
  24. package/dist/composer/authoring/presets.py +168 -0
  25. package/dist/composer/authoring/runtime_emit.py +266 -0
  26. package/dist/composer/authoring/strategy_manifest.py +94 -0
  27. package/dist/composer/cli.py +487 -0
  28. package/dist/composer/compiler/__init__.py +22 -0
  29. package/dist/composer/compiler/compile.py +739 -0
  30. package/dist/composer/examples/breakout_swing.graph.yaml +121 -0
  31. package/dist/composer/examples/conviction_scorer.graph.yaml +216 -0
  32. package/dist/composer/examples/macro_thesis_basket.graph.yaml +247 -0
  33. package/dist/composer/examples/pre_listing_classifier.graph.yaml +204 -0
  34. package/dist/composer/examples/trend_momentum_majors.graph.yaml +133 -0
  35. package/dist/composer/generated/README.md +22 -0
  36. package/dist/composer/generated/catalog.md +118 -0
  37. package/dist/composer/generated/describe.md +1168 -0
  38. package/dist/composer/generated/graph.schema.json +1946 -0
  39. package/dist/composer/primitives/__init__.py +320 -0
  40. package/dist/composer/primitives/_candles.py +76 -0
  41. package/dist/composer/primitives/adapter.py +363 -0
  42. package/dist/composer/primitives/emitters.py +142 -0
  43. package/dist/composer/primitives/filters.py +71 -0
  44. package/dist/composer/primitives/indicators.py +326 -0
  45. package/dist/composer/primitives/rankers.py +40 -0
  46. package/dist/composer/primitives/scorers.py +100 -0
  47. package/dist/composer/primitives/sources.py +979 -0
  48. package/dist/composer/primitives/stateful.py +254 -0
  49. package/dist/composer/pure_fn/__init__.py +34 -0
  50. package/dist/composer/pure_fn/checks.py +39 -0
  51. package/dist/composer/pure_fn/models.py +177 -0
  52. package/dist/composer/pure_fn/purity.py +311 -0
  53. package/dist/composer/pure_fn/runtests.py +155 -0
  54. package/dist/composer/registry/__init__.py +40 -0
  55. package/dist/composer/registry/generate.py +425 -0
  56. package/dist/composer/registry/mcp-tools-snapshot.json +193 -0
  57. package/dist/composer/registry/mcp_closure.py +311 -0
  58. package/dist/composer/registry/models.py +417 -0
  59. package/dist/composer/registry/nodes.py +1297 -0
  60. package/dist/composer/requirements.txt +21 -0
  61. package/dist/composer/scaffold_path.py +118 -0
  62. package/dist/composer/templates/__init__.py +13 -0
  63. package/dist/composer/templates/scan.py.j2 +34 -0
  64. package/dist/composer/validator/__init__.py +29 -0
  65. package/dist/composer/validator/desugar.py +133 -0
  66. package/dist/composer/validator/errors.py +227 -0
  67. package/dist/composer/validator/graph_checks.py +443 -0
  68. package/dist/composer/validator/loader.py +110 -0
  69. package/dist/composer/validator/schema_checks.py +147 -0
  70. package/dist/composer/validator/validate.py +86 -0
  71. package/dist/composer/vendoring.py +103 -0
  72. package/dist/composer/verbs/__init__.py +49 -0
  73. package/dist/composer/verbs/_box.py +308 -0
  74. package/dist/composer/verbs/check.py +254 -0
  75. package/dist/composer/verbs/close.py +494 -0
  76. package/dist/composer/verbs/deploy.py +279 -0
  77. package/dist/composer/verbs/docs.py +30 -0
  78. package/dist/composer/verbs/fund.py +498 -0
  79. package/dist/composer/verbs/install.py +586 -0
  80. package/dist/composer/verbs/runtime_validate.py +422 -0
  81. package/dist/composer/verbs/smoke.py +134 -0
  82. package/dist/composer/verbs/status.py +383 -0
  83. package/dist/index.d.ts.map +1 -1
  84. package/dist/index.js +2 -9
  85. package/dist/index.js.map +1 -1
  86. package/dist/runtime/load-runtime-config.d.ts +17 -0
  87. package/dist/runtime/load-runtime-config.d.ts.map +1 -1
  88. package/dist/runtime/load-runtime-config.js +2 -2
  89. package/dist/runtime/load-runtime-config.js.map +1 -1
  90. package/dist/runtime-api/config.d.ts +2 -2
  91. package/dist/runtime-api/config.js +4 -4
  92. package/dist/runtime-api/config.js.map +1 -1
  93. package/dist/runtime-api/handlers/ingest-signals.d.ts +3 -5
  94. package/dist/runtime-api/handlers/ingest-signals.d.ts.map +1 -1
  95. package/dist/runtime-api/handlers/ingest-signals.js +5 -14
  96. package/dist/runtime-api/handlers/ingest-signals.js.map +1 -1
  97. package/dist/runtime-api/intake/intake-mount.d.ts.map +1 -1
  98. package/dist/runtime-api/intake/intake-mount.js +2 -8
  99. package/dist/runtime-api/intake/intake-mount.js.map +1 -1
  100. package/dist/skills-manager/manifest.d.ts.map +1 -1
  101. package/dist/skills-manager/manifest.js +1 -3
  102. package/dist/skills-manager/manifest.js.map +1 -1
  103. package/dist/skills-manager/skills-manifest.json +1 -3
  104. package/package.json +4 -2
  105. package/dist/runtime-api/intake/ingest-mutex.d.ts +0 -16
  106. package/dist/runtime-api/intake/ingest-mutex.d.ts.map +0 -1
  107. package/dist/runtime-api/intake/ingest-mutex.js +0 -18
  108. package/dist/runtime-api/intake/ingest-mutex.js.map +0 -1
@@ -0,0 +1,37 @@
1
+ /**
2
+ * openclaw senpi composer — the thin TS rim over the Python Strategy Composer (D8).
3
+ *
4
+ * TS lives ONLY at the rim: this module is a verdict-passthrough wrapper. Every verb spawns
5
+ * the Python `composer` CLI (`python -m composer.cli <verb> ... --json`), parses the JSON
6
+ * verdict it prints, and surfaces GREEN/RED (+ located errors) with a matching process exit
7
+ * code. There is NO composer logic here — validation, compilation, the deploy gate, and the
8
+ * lifecycle derivation all live in Python (the emitted artifact is Python; the golden tests
9
+ * are pytest). Mirrors the existing thin-CLI pattern (src/cli/senpi-config-commands.ts:
10
+ * registerSenpiConfigCommands) and spawns through utils/safe-spawn like senpi-commands.ts.
11
+ *
12
+ * The Python package is located via resolveComposerRoot() — the dir that CONTAINS the
13
+ * `composer/` package — put on the child's PYTHONPATH (never its cwd, so caller-relative
14
+ * graph/answers/out paths keep resolving against the real working dir). Resolution order:
15
+ * COMPOSER_ROOT env (dev-checkout override) → the copy shipped inside the plugin's dist/
16
+ * (mirrors scanner-launcher's scaffoldPackageDir). Python runs via COMPOSER_PYTHON (default:
17
+ * python3). Deploy is HARD-gated on a GREEN check inside Python.
18
+ */
19
+ interface CommanderCommand {
20
+ command(name: string, desc?: string): CommanderCommand;
21
+ description(desc: string): CommanderCommand;
22
+ option(flags: string, description?: string): CommanderCommand;
23
+ action(fn: (() => void | Promise<void>) | ((opts: Record<string, unknown>) => void | Promise<void>) | ((arg: string, opts: Record<string, unknown>) => void | Promise<void>)): CommanderCommand;
24
+ }
25
+ /**
26
+ * Resolve the directory that CONTAINS the `composer/` python package.
27
+ *
28
+ * Order: COMPOSER_ROOT env (dev-checkout override — point it at the dir holding `composer/`,
29
+ * i.e. the repo root) → the copy shipped inside the plugin's dist/. This module compiles to
30
+ * dist/cli/composer-commands.js and `copy:composer` lands the package at dist/composer, so
31
+ * the containing dir is one level up (dist/). Mirrors scanner-launcher's scaffoldPackageDir
32
+ * (src/index.ts: `new URL("./scanners/external", import.meta.url)`).
33
+ */
34
+ export declare function resolveComposerRoot(): string;
35
+ export declare function registerComposerCli(senpi: CommanderCommand): void;
36
+ export {};
37
+ //# sourceMappingURL=composer-commands.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"composer-commands.d.ts","sourceRoot":"","sources":["../../src/cli/composer-commands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAMH,UAAU,gBAAgB;IACxB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,gBAAgB,CAAC;IACvD,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB,CAAC;IAC5C,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,gBAAgB,CAAC;IAC9D,MAAM,CACJ,EAAE,EACE,CAAC,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,GAC5B,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,GACzD,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,GACzE,gBAAgB,CAAC;CACrB;AAYD;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,CAI5C;AAmGD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,gBAAgB,GAAG,IAAI,CA8QjE"}
@@ -0,0 +1,396 @@
1
+ /**
2
+ * openclaw senpi composer — the thin TS rim over the Python Strategy Composer (D8).
3
+ *
4
+ * TS lives ONLY at the rim: this module is a verdict-passthrough wrapper. Every verb spawns
5
+ * the Python `composer` CLI (`python -m composer.cli <verb> ... --json`), parses the JSON
6
+ * verdict it prints, and surfaces GREEN/RED (+ located errors) with a matching process exit
7
+ * code. There is NO composer logic here — validation, compilation, the deploy gate, and the
8
+ * lifecycle derivation all live in Python (the emitted artifact is Python; the golden tests
9
+ * are pytest). Mirrors the existing thin-CLI pattern (src/cli/senpi-config-commands.ts:
10
+ * registerSenpiConfigCommands) and spawns through utils/safe-spawn like senpi-commands.ts.
11
+ *
12
+ * The Python package is located via resolveComposerRoot() — the dir that CONTAINS the
13
+ * `composer/` package — put on the child's PYTHONPATH (never its cwd, so caller-relative
14
+ * graph/answers/out paths keep resolving against the real working dir). Resolution order:
15
+ * COMPOSER_ROOT env (dev-checkout override) → the copy shipped inside the plugin's dist/
16
+ * (mirrors scanner-launcher's scaffoldPackageDir). Python runs via COMPOSER_PYTHON (default:
17
+ * python3). Deploy is HARD-gated on a GREEN check inside Python.
18
+ */
19
+ import { spawnSync } from "../utils/safe-spawn.js";
20
+ import { fileURLToPath } from "node:url";
21
+ import { delimiter as PATH_DELIMITER, join as pathJoin } from "node:path";
22
+ /**
23
+ * Resolve the directory that CONTAINS the `composer/` python package.
24
+ *
25
+ * Order: COMPOSER_ROOT env (dev-checkout override — point it at the dir holding `composer/`,
26
+ * i.e. the repo root) → the copy shipped inside the plugin's dist/. This module compiles to
27
+ * dist/cli/composer-commands.js and `copy:composer` lands the package at dist/composer, so
28
+ * the containing dir is one level up (dist/). Mirrors scanner-launcher's scaffoldPackageDir
29
+ * (src/index.ts: `new URL("./scanners/external", import.meta.url)`).
30
+ */
31
+ export function resolveComposerRoot() {
32
+ const override = process.env.COMPOSER_ROOT;
33
+ if (override)
34
+ return override;
35
+ return fileURLToPath(new URL("..", import.meta.url));
36
+ }
37
+ /** The exact remediation command for a missing composer Python dep. */
38
+ function requirementsHint(root) {
39
+ return `pip install -r ${pathJoin(root, "composer", "requirements.txt")}`;
40
+ }
41
+ /**
42
+ * Detect a box-side environment failure (missing python, missing deps, or a missing
43
+ * `composer` package) and return an actionable one-line message — never a bare stack trace.
44
+ * Returns null for a normal run (incl. a RED verdict, which exits non-zero but ran fine).
45
+ */
46
+ function detectEnvError(pythonBin, root, result) {
47
+ const err = result.error;
48
+ if (err && err.code === "ENOENT") {
49
+ return `composer: '${pythonBin}' not found — install Python 3 (or set COMPOSER_PYTHON), then the composer deps: ${requirementsHint(root)}`;
50
+ }
51
+ const stderr = result.stderr ?? "";
52
+ const missing = /No module named ['"]?([\w.]+)/.exec(stderr);
53
+ if (missing) {
54
+ const mod = missing[1];
55
+ if (mod === "composer" || mod.startsWith("composer.")) {
56
+ return `composer: the 'composer' package was not found under ${root} — on a claw run \`npm run build\` (copy:composer) or set COMPOSER_ROOT to your checkout root.`;
57
+ }
58
+ if (mod === "scaffold" || mod.startsWith("scaffold.")) {
59
+ // The scaffold harness ships WITH the runtime (copy:external-scanners), never from PyPI.
60
+ // Do NOT route this to the "pip install deps" hint — and warn off `pip install scaffold`
61
+ // (an unrelated PyPI package), the exact dead end the original dev-box run hit.
62
+ return `composer: the 'scaffold' harness package was not found — on a claw run \`npm run build\` (copy:external-scanners stages it into dist/scanners/external) or set COMPOSER_SCAFFOLD_DIR to the dir that CONTAINS scaffold/ (…/src/scanners/external). Do NOT \`pip install scaffold\` — that is an unrelated PyPI package.`;
63
+ }
64
+ return `composer: Python dependency '${mod}' is missing — install the composer deps: ${requirementsHint(root)}`;
65
+ }
66
+ return null;
67
+ }
68
+ /**
69
+ * Spawn `python -m composer.cli <args>` and (optionally) parse its --json stdout.
70
+ *
71
+ * The composer package is found via PYTHONPATH (resolveComposerRoot()), leaving the child's
72
+ * cwd as the caller's real working dir so relative graph/answers/-o paths resolve there.
73
+ * On a box-side failure (no python / missing deps) the actionable hint is printed to stderr
74
+ * here and returned as `envError`, so every verb surfaces it identically without a stack trace.
75
+ */
76
+ function runComposer(args) {
77
+ const pythonBin = process.env.COMPOSER_PYTHON ?? "python3";
78
+ const composerRoot = resolveComposerRoot();
79
+ const pythonPath = process.env.PYTHONPATH
80
+ ? `${composerRoot}${PATH_DELIMITER}${process.env.PYTHONPATH}`
81
+ : composerRoot;
82
+ const result = spawnSync(pythonBin, ["-m", "composer.cli", ...args], {
83
+ encoding: "utf8",
84
+ stdio: ["inherit", "pipe", "pipe"],
85
+ env: { ...process.env, PYTHONPATH: pythonPath },
86
+ });
87
+ const envError = detectEnvError(pythonBin, composerRoot, result);
88
+ if (envError) {
89
+ console.error(envError);
90
+ return { status: result.status ?? 1, stdout: "", stderr: "", json: null, envError };
91
+ }
92
+ const stdout = result.stdout ?? "";
93
+ const stderr = result.stderr ?? "";
94
+ let json = null;
95
+ if (args.includes("--json")) {
96
+ try {
97
+ json = JSON.parse(stdout);
98
+ }
99
+ catch {
100
+ json = null;
101
+ }
102
+ }
103
+ return { status: result.status ?? 1, stdout, stderr, json, envError: null };
104
+ }
105
+ function renderLocation(loc) {
106
+ if (!loc)
107
+ return "document";
108
+ const parts = [];
109
+ if (loc.node)
110
+ parts.push(`node ${loc.node}`);
111
+ if (loc.port)
112
+ parts.push(`port ${loc.port}`);
113
+ if (loc.line != null)
114
+ parts.push(`line ${loc.line}`);
115
+ return parts.length ? parts.join(", ") : "document";
116
+ }
117
+ function printErrors(errors) {
118
+ for (const e of errors) {
119
+ console.error(` [${e.code ?? "?"}] ${renderLocation(e.location)}: ${e.message ?? ""}`);
120
+ if (e.fix_hint)
121
+ console.error(` fix: ${e.fix_hint}`);
122
+ }
123
+ }
124
+ export function registerComposerCli(senpi) {
125
+ const composer = senpi.command("composer");
126
+ composer.description("Strategy Composer: new / validate / compile / check / deploy / fund / install / close / status a strategy graph; catalog / describe nodes");
127
+ // new / validate / compile stream Python's own (rich) human render through — teaching
128
+ // errors, gap reports, emitted scan.py — forwarding only the relevant flags. Thin: no
129
+ // TS-side interpretation; the exit code is Python's (0 ok, 2 gap report, 3 clobber-refused).
130
+ composer
131
+ .command("new <id>")
132
+ .description("Generate a COMPLETE, VALID strategy graph from interview answers (D7)")
133
+ .option("--archetype <name>", "Archetype template (trend_momentum | classifier | thesis_fund)")
134
+ .option("--answers <file>", "Path to a YAML/JSON answers-file (flags override it)")
135
+ .option("-o, --out <dir>", "Output directory (default: cwd)")
136
+ .option("--force", "Overwrite an edited graph (default: refuse to clobber edits)")
137
+ .option("--json", "Emit the structured result (path / gap report) as JSON")
138
+ .action(async (id, opts) => {
139
+ const args = ["new", id];
140
+ if (opts.archetype)
141
+ args.push("--archetype", opts.archetype);
142
+ if (opts.answers)
143
+ args.push("--answers", opts.answers);
144
+ if (opts.out)
145
+ args.push("--output", opts.out);
146
+ if (opts.force)
147
+ args.push("--force");
148
+ if (opts.json)
149
+ args.push("--json");
150
+ const { status, stdout, stderr, envError } = runComposer(args);
151
+ if (envError) {
152
+ process.exitCode = 1;
153
+ return;
154
+ }
155
+ if (stdout)
156
+ process.stdout.write(stdout);
157
+ if (stderr)
158
+ process.stderr.write(stderr);
159
+ process.exitCode = status;
160
+ });
161
+ composer
162
+ .command("validate <graph>")
163
+ .description("Validate a strategy graph (schema + graph checks) with teaching errors")
164
+ .option("--json", "Emit the structured result as JSON")
165
+ .action(async (graph, opts) => {
166
+ const args = ["validate", graph];
167
+ if (opts.json)
168
+ args.push("--json");
169
+ const { status, stdout, stderr, envError } = runComposer(args);
170
+ if (envError) {
171
+ process.exitCode = 1;
172
+ return;
173
+ }
174
+ if (stdout)
175
+ process.stdout.write(stdout);
176
+ if (stderr)
177
+ process.stderr.write(stderr);
178
+ process.exitCode = status;
179
+ });
180
+ composer
181
+ .command("compile <graph>")
182
+ .description("Compile a validated strategy graph into a scan.py on the external_scanner contract")
183
+ .option("-o, --out <file>", "Write the emitted scan.py here (default: stdout)")
184
+ .action(async (graph, opts) => {
185
+ const args = ["compile", graph];
186
+ if (opts.out)
187
+ args.push("--output", opts.out);
188
+ const { status, stdout, stderr, envError } = runComposer(args);
189
+ if (envError) {
190
+ process.exitCode = 1;
191
+ return;
192
+ }
193
+ if (stdout)
194
+ process.stdout.write(stdout);
195
+ if (stderr)
196
+ process.stderr.write(stderr);
197
+ process.exitCode = status;
198
+ });
199
+ composer
200
+ .command("check <graph>")
201
+ .description("ONE verdict: validate + pure_fn tests + compile + fixture smoke (GREEN/RED)")
202
+ .option("--json", "Print the raw Python verdict JSON")
203
+ .action(async (graph, opts) => {
204
+ const { status, stdout, json } = runComposer(["check", graph, "--json"]);
205
+ if (opts.json) {
206
+ process.stdout.write(stdout);
207
+ process.exitCode = status;
208
+ return;
209
+ }
210
+ if (!json) {
211
+ process.stdout.write(stdout);
212
+ process.exitCode = status;
213
+ return;
214
+ }
215
+ const verdict = String(json.verdict);
216
+ const errors = json.errors ?? [];
217
+ if (verdict === "GREEN") {
218
+ console.log(`GREEN: ${graph} — ready to deploy.`);
219
+ }
220
+ else {
221
+ console.log(`RED: ${graph} — ${errors.length} error(s); deploy is refused until GREEN.`);
222
+ printErrors(errors);
223
+ }
224
+ process.exitCode = status;
225
+ });
226
+ composer
227
+ .command("deploy <graph>")
228
+ .description("Stage the deployable artifact set (idempotent); hard-gated on a GREEN check")
229
+ .option("-o, --out <dir>", "Staging directory (default: dist)")
230
+ .option("--json", "Print the raw Python verdict JSON")
231
+ .action(async (graph, opts) => {
232
+ const args = ["deploy", graph, "--json"];
233
+ if (opts.out)
234
+ args.push("--out", opts.out);
235
+ const { status, stdout, json } = runComposer(args);
236
+ if (opts.json || !json) {
237
+ process.stdout.write(stdout);
238
+ process.exitCode = status;
239
+ return;
240
+ }
241
+ const verdict = String(json.verdict);
242
+ if (verdict === "REFUSED") {
243
+ const check = (json.check ?? {});
244
+ console.log(`REFUSED: ${graph} — check is ${check.verdict}; deploy needs a GREEN check.`);
245
+ printErrors(check.errors ?? []);
246
+ }
247
+ else {
248
+ // Always surface the ABSOLUTE staged dir Python resolved (a relative `-o` against an
249
+ // unexpected cwd was "deploy exited 0 but there are no files where I looked"). UNCHANGED
250
+ // says plainly that nothing was rewritten so an idempotent no-op never reads as a failure.
251
+ const staged = (json.staged ?? {});
252
+ const dir = staged.dir ?? "(no staged dir reported)";
253
+ if (verdict === "UNCHANGED") {
254
+ console.log(`UNCHANGED: ${graph} — already staged at ${dir}, nothing rewritten (idempotent no-op).`);
255
+ }
256
+ else {
257
+ console.log(`${verdict}: ${graph} — staged to ${dir}.`);
258
+ }
259
+ }
260
+ process.exitCode = status;
261
+ });
262
+ composer
263
+ .command("fund <target>")
264
+ .description("Create + fund the strategy's wallet (MCP strategy_create_custom_strategy): preflights the balance, waits for ACTIVE, safe to re-run while funding settles")
265
+ .option("--budget <usd>", "Explicit USD to fund this strategy's wallet with (>= $100; never derived/split)")
266
+ .option("-o, --out <dir>", "Staging dir (when target is a graph file, not a staged dir)")
267
+ .option("--state-dir <dir>", "Base senpi-state dir (default: $SENPI_STATE_DIR or ~/.openclaw/senpi-state)")
268
+ .option("--json", "Print the raw Python fund verdict JSON")
269
+ .action(async (target, opts) => {
270
+ const args = ["fund", target];
271
+ if (opts.budget !== undefined)
272
+ args.push("--budget", String(opts.budget));
273
+ if (opts.out)
274
+ args.push("--out", opts.out);
275
+ if (opts.stateDir)
276
+ args.push("--state-dir", opts.stateDir);
277
+ // The rim owns the wall-clock: created_at is injected as an ISO string (like install's bound-at).
278
+ args.push("--created-at", new Date().toISOString());
279
+ if (opts.json)
280
+ args.push("--json");
281
+ const { status, stdout, stderr, envError } = runComposer(args);
282
+ if (envError) {
283
+ process.exitCode = 1;
284
+ return;
285
+ }
286
+ if (stdout)
287
+ process.stdout.write(stdout);
288
+ if (stderr)
289
+ process.stderr.write(stderr);
290
+ process.exitCode = status;
291
+ });
292
+ composer
293
+ .command("install <target>")
294
+ .description("Bind a staged unit onto THIS box: copy to a canonical hash dir, bind --wallet (or auto-bind a funded wallet.json), run `openclaw senpi runtime create`")
295
+ .option("--wallet <address>", "The strategy's ACTIVE 0x… wallet to bind (omit to auto-bind a funded wallet.json)")
296
+ .option("-o, --out <dir>", "Staging dir (when target is a graph file, not a staged dir)")
297
+ .option("--state-dir <dir>", "Base senpi-state dir (default: $SENPI_STATE_DIR or ~/.openclaw/senpi-state)")
298
+ .option("--runtime-id <id>", "Override the derived runtime id (default: <strategy>-<hash8>)")
299
+ .option("--json", "Print the raw Python install verdict JSON")
300
+ .action(async (target, opts) => {
301
+ const args = ["install", target];
302
+ if (opts.wallet)
303
+ args.push("--wallet", opts.wallet);
304
+ if (opts.out)
305
+ args.push("--out", opts.out);
306
+ if (opts.stateDir)
307
+ args.push("--state-dir", opts.stateDir);
308
+ if (opts.runtimeId)
309
+ args.push("--runtime-id", opts.runtimeId);
310
+ // Inject the wall-clock here (the rim owns the clock; the Python core stays deterministic).
311
+ args.push("--bound-at", new Date().toISOString());
312
+ if (opts.json)
313
+ args.push("--json");
314
+ const { status, stdout, stderr, envError } = runComposer(args);
315
+ if (envError) {
316
+ process.exitCode = 1;
317
+ return;
318
+ }
319
+ if (stdout)
320
+ process.stdout.write(stdout);
321
+ if (stderr)
322
+ process.stderr.write(stderr);
323
+ process.exitCode = status;
324
+ });
325
+ composer
326
+ .command("close <target>")
327
+ .description("Safe teardown: stop the runtime, confirm gone, then trigger MCP strategy_close (flattens positions + returns funds). Idempotent — re-run to poll")
328
+ .option("--wallet <address>", "Close the strategy on this 0x… wallet directly")
329
+ .option("--strategy-id <id>", "Close this strategyId directly (legacy/ops-deployed strategies)")
330
+ .option("--state-dir <dir>", "Base senpi-state dir (default: $SENPI_STATE_DIR or ~/.openclaw/senpi-state)")
331
+ .option("--json", "Print the raw Python close verdict JSON")
332
+ .action(async (target, opts) => {
333
+ const args = ["close", target];
334
+ if (opts.wallet)
335
+ args.push("--wallet", opts.wallet);
336
+ if (opts.strategyId)
337
+ args.push("--strategy-id", opts.strategyId);
338
+ if (opts.stateDir)
339
+ args.push("--state-dir", opts.stateDir);
340
+ if (opts.json)
341
+ args.push("--json");
342
+ const { status, stdout, stderr, envError } = runComposer(args);
343
+ if (envError) {
344
+ process.exitCode = 1;
345
+ return;
346
+ }
347
+ if (stdout)
348
+ process.stdout.write(stdout);
349
+ if (stderr)
350
+ process.stderr.write(stderr);
351
+ process.exitCode = status;
352
+ });
353
+ composer
354
+ .command("status <target>")
355
+ .description("Derived lifecycle position + the next verb to run (graph file or staging dir)")
356
+ .option("-o, --out <dir>", "Staging directory to check for a deployed artifact")
357
+ .option("--state-dir <dir>", "Base senpi-state dir — extend status down the on-box install chain")
358
+ .option("--json", "Print the raw Python status JSON")
359
+ .action(async (target, opts) => {
360
+ const args = ["status", target, "--json"];
361
+ if (opts.out)
362
+ args.push("--out", opts.out);
363
+ if (opts.stateDir)
364
+ args.push("--state-dir", opts.stateDir);
365
+ const { status, stdout, json } = runComposer(args);
366
+ if (opts.json || !json) {
367
+ process.stdout.write(stdout);
368
+ process.exitCode = status;
369
+ return;
370
+ }
371
+ console.log(`position: ${String(json.position)}`);
372
+ console.log(`next: ${String(json.next)}`);
373
+ process.exitCode = status;
374
+ });
375
+ composer
376
+ .command("catalog")
377
+ .description("Print the registry-generated node catalog index")
378
+ .action(async () => {
379
+ const { status, stdout, stderr } = runComposer(["catalog"]);
380
+ process.stdout.write(stdout);
381
+ if (stderr)
382
+ process.stderr.write(stderr);
383
+ process.exitCode = status;
384
+ });
385
+ composer
386
+ .command("describe <node>")
387
+ .description("Print one node's full ports/params/example")
388
+ .action(async (node) => {
389
+ const { status, stdout, stderr } = runComposer(["describe", node]);
390
+ process.stdout.write(stdout);
391
+ if (stderr)
392
+ process.stderr.write(stderr);
393
+ process.exitCode = status;
394
+ });
395
+ }
396
+ //# sourceMappingURL=composer-commands.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"composer-commands.js","sourceRoot":"","sources":["../../src/cli/composer-commands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,SAAS,IAAI,cAAc,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,WAAW,CAAC;AAwB1E;;;;;;;;GAQG;AACH,MAAM,UAAU,mBAAmB;IACjC,MAAM,QAAQ,GAAG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mDD,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,WAAW,EAAE,GAAG,MAAM,CASjE;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,MAAM,CAW3E;AA8HD,kEAAkE;AAClE,UAAU,gBAAgB;IACxB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,gBAAgB,CAAC;IACvD,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB,CAAC;IAC5C,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,gBAAgB,CAAC;IAC/D,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,gBAAgB,CAAC;IAC9D,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,gBAAgB,CAAC;IACtE,MAAM,CACJ,EAAE,EACE,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,GACzD,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,GACzE,gBAAgB,CAAC;CACrB"}
@@ -11,6 +11,7 @@ import { spawnSync } from "../utils/safe-spawn.js";
11
11
  import path from "node:path";
12
12
  import { registerGuideCommands, CHEATSHEET_TEXT } from "./guide-commands.js";
13
13
  import { registerSenpiConfigCommands } from "./senpi-config-commands.js";
14
+ import { registerComposerCli } from "./composer-commands.js";
14
15
  import { VERSION } from "../version.js";
15
16
  /**
16
17
  * Register senpi subcommands on the given Commander program.
@@ -25,6 +26,7 @@ export function registerSenpiCli(program) {
25
26
  }
26
27
  });
27
28
  registerSenpiConfigCommands(senpi);
29
+ registerComposerCli(senpi);
28
30
  const runtime = senpi.command("runtime");
29
31
  runtime.description("Manage runtimes");
30
32
  runtime