@senpi/runtime 3.0.65 → 3.0.66

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 (38) hide show
  1. package/dist/cli/deploy-render.d.ts +3 -1
  2. package/dist/cli/deploy-render.d.ts.map +1 -1
  3. package/dist/cli/deploy-render.js +233 -11
  4. package/dist/cli/deploy-render.js.map +1 -1
  5. package/dist/cli/guide-commands.d.ts.map +1 -1
  6. package/dist/cli/guide-commands.js +9 -7
  7. package/dist/cli/guide-commands.js.map +1 -1
  8. package/dist/cli/senpi-commands.js +4 -4
  9. package/dist/cli/senpi-commands.js.map +1 -1
  10. package/dist/deploy/deadlines.d.ts +3 -3
  11. package/dist/deploy/deadlines.js +3 -3
  12. package/dist/deploy/job.d.ts +16 -0
  13. package/dist/deploy/job.d.ts.map +1 -1
  14. package/dist/deploy/job.js +7 -1
  15. package/dist/deploy/job.js.map +1 -1
  16. package/dist/deploy/orchestrator.d.ts +2 -1
  17. package/dist/deploy/orchestrator.d.ts.map +1 -1
  18. package/dist/deploy/orchestrator.js +402 -84
  19. package/dist/deploy/orchestrator.js.map +1 -1
  20. package/dist/deploy/proof-gate.d.ts.map +1 -1
  21. package/dist/deploy/proof-gate.js +8 -3
  22. package/dist/deploy/proof-gate.js.map +1 -1
  23. package/dist/deploy/register.js +1 -1
  24. package/dist/index.d.ts.map +1 -1
  25. package/dist/index.js +32 -3
  26. package/dist/index.js.map +1 -1
  27. package/dist/senpi/client.d.ts.map +1 -1
  28. package/dist/senpi/client.js +72 -5
  29. package/dist/senpi/client.js.map +1 -1
  30. package/dist/senpi/types.d.ts +18 -0
  31. package/dist/senpi/types.d.ts.map +1 -1
  32. package/dist/validate/proof.js +4 -1
  33. package/dist/validate/proof.js.map +1 -1
  34. package/dist/validate/run.d.ts.map +1 -1
  35. package/dist/validate/run.js +4 -1
  36. package/dist/validate/run.js.map +1 -1
  37. package/openclaw.plugin.json +1 -1
  38. package/package.json +1 -1
@@ -76,10 +76,12 @@ export interface DeploySnapshotLike {
76
76
  report?: DeployReportLike;
77
77
  live?: DeployLiveLayerLike;
78
78
  next?: string;
79
+ /** ISO, quoted from the terminal journal line — see {@link durationEndMs}. */
80
+ endedAt?: string;
79
81
  }
80
82
  export declare function renderHeader(snap: DeploySnapshotLike, now: number): string;
81
83
  export declare function renderStepTable(report: DeployReportLike): string[];
82
- export declare function renderEventsTail(events: DeployEventLike[]): string[];
84
+ export declare function renderEventsTail(events: DeployEventLike[], carried?: ReadonlyMap<string, string>): string[];
83
85
  export declare function renderReportFooter(report: DeployReportLike): string[];
84
86
  /** Fresh-read layer, printed beside (never instead of) the journal narration. */
85
87
  export declare function renderLiveLayer(live: DeployLiveLayerLike): string[];
@@ -1 +1 @@
1
- {"version":3,"file":"deploy-render.d.ts","sourceRoot":"","sources":["../../src/cli/deploy-render.ts"],"names":[],"mappings":"AAgBA,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4FAA4F;IAC5F,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;CACvC;AAED,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,kBAAkB,EAAE,CAAC;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gFAAgF;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AAW,CAAC,MAAM,EAAE,MAAM,CAAa,GAC/C,MAAM,EAAE,CAGV;AA8CD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,EAAE,CAYrE;AAED,iFAAiF;AACjF,wBAAgB,eAAe,CAAC,IAAI,EAAE,mBAAmB,GAAG,MAAM,EAAE,CAenE;AAyCD,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,kBAAkB,EAAE,GAAG,GAAE,MAAmB,GAAG,MAAM,EAAE,CAqBtG;AAmBD,oEAAoE;AACpE,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,kBAAkB,GAAG,MAAM,CAmBlE;AAED,qDAAqD;AACrD,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,kBAAkB,EAAE,GAAG,GAAE,MAAmB,GAAG,IAAI,CAE7F"}
@@ -15,27 +15,137 @@
15
15
  import { usd } from "../deploy/funding.js";
16
16
  const STEP_ORDER = ["reconcile", "preflight", "create", "install", "observe"];
17
17
  const EVENT_TAIL = 6;
18
+ /**
19
+ * What an event line prints where the payload carried no value — see {@link eventLine}.
20
+ *
21
+ * Markers, not fallbacks: uppercase and unquotable as a timestamp or a narration, so a reader
22
+ * cannot mistake either for something the gateway said.
23
+ */
24
+ const NO_TIMESTAMP = "NO TIMESTAMP";
25
+ const NO_DETAIL = "NO DETAIL — this event arrived without one";
26
+ /**
27
+ * One rule for every field this switch interpolates, so the three arms cannot disagree about what
28
+ * an unusable value is.
29
+ *
30
+ * `state` is a structural mirror of gateway JSON, like `DeployEventLike`, and every arm read its
31
+ * field bare: an absent `phase` or `overall` printed the literal `undefined` into the header line
32
+ * an operator reads to decide whether to wait, retry or walk away, and a non-string one printed
33
+ * `[object Object]`.
34
+ *
35
+ * Two different absences, two different answers, and the difference is load-bearing. Nothing
36
+ * supplied → say nothing was supplied. Something supplied that this build cannot use → hand the
37
+ * reader the value, exactly as the `default` arm does for an unrecognised status, because "no
38
+ * outcome was reported" over a payload that DID report one is a new false sentence, not a fix.
39
+ * Markers are uppercase and unquotable as a phase or an outcome, the same discipline `NO DETAIL`
40
+ * and `NO TIMESTAMP` follow in the events tail.
41
+ */
42
+ function statePart(field, value) {
43
+ if (typeof value === "string" && value !== "")
44
+ return value;
45
+ return value === undefined || value === null || value === ""
46
+ ? `NO ${field} REPORTED — this answer carries none`
47
+ : `UNREADABLE ${field} ${describeUnreadable(value)} — this build cannot read that value`;
48
+ }
49
+ /**
50
+ * How the unreadable arm reads a value it has already decided it cannot use.
51
+ *
52
+ * `JSON.stringify` alone defeats the arm it serves in three ways, all confirmed by executing it: a
53
+ * symbol or a function makes it RETURN `undefined` — the literal word the guard exists to stop — and
54
+ * a circular object or a BigInt makes it THROW, which escapes `renderState` and `renderHeader` and
55
+ * loses the whole page. Losing the page is the worse outcome of the two: the step table, the event
56
+ * tail and the live layer that did arrive are discarded over one field in the header.
57
+ *
58
+ * `String(v)` is the fallback and NOT the rule, because the fidelity is the point of this arm:
59
+ * `["live"]` has to render as `["live"]` and not collapse to `live`, which is the very value the
60
+ * reader must not mistake for a string the payload carried. So stringify first, and fall back only
61
+ * where it cannot answer.
62
+ *
63
+ * Unreachable from the real path — a snapshot arrives via `JSON.parse` of gateway stdout, which
64
+ * cannot produce a symbol, a function, a BigInt or a cycle — so this is defence of the same class as
65
+ * the guards around it.
66
+ */
67
+ function describeUnreadable(value) {
68
+ try {
69
+ return JSON.stringify(value) ?? String(value);
70
+ }
71
+ catch {
72
+ return String(value);
73
+ }
74
+ }
18
75
  /** Human phrase for a job state — running phases stay in-progress, never triumphant. */
19
76
  function renderState(state) {
20
77
  switch (state.status) {
21
- case "running":
78
+ case "running": {
79
+ // Third arm of the same defect, and the last one: both templates interpolated `state.phase`
80
+ // bare, so a `running` payload with no phase rendered `running (phase: undefined)`.
81
+ const phase = statePart("PHASE", state.phase);
22
82
  return state.stopRequested
23
- ? `running (phase: ${state.phase}; deploy deadline reached — stopping at the next step boundary)`
24
- : `running (phase: ${state.phase})`;
83
+ ? `running (phase: ${phase}; deploy deadline reached — stopping at the next step boundary)`
84
+ : `running (phase: ${phase})`;
85
+ }
25
86
  case "done":
26
- return `done — ${state.overall}`;
87
+ // The same defect the `default` arm below was added for, one line up and on a different
88
+ // field: `state.overall` was read unguarded, so `{ state: { status: "done" } }` rendered
89
+ // `done — undefined`. `unrenderableSnapshot` does not cover it — it checks `state.status` and
90
+ // three `meta` fields — and is deliberately not extended to, because refusing the whole page
91
+ // would discard the report and the event tail that DID arrive over one missing word in the
92
+ // header. So it is fixed the same way its neighbour was: name the absence, invent nothing.
93
+ // `exitCodeForDeploy` answers 1 for a missing overall AND for a present-but-unreadable one,
94
+ // so the line and the code now agree on every payload — see the note on the map.
95
+ return `done — ${statePart("OVERALL", state.overall)}`;
27
96
  case "interrupted":
28
97
  return "interrupted by a gateway restart (no deploy is running now)";
98
+ default:
99
+ // With no `default` arm at all, a status outside the union fell off the end, returned
100
+ // `undefined`, and the header template interpolated the literal string `undefined` into the
101
+ // line an operator reads to decide whether to wait, retry, or walk away.
102
+ //
103
+ // What replaces it must not read as a fourth state this runtime knows about and has decided:
104
+ // `unknown` or `pending` would, and that is the same fail-open the duration fix removed one
105
+ // screen up. So it reports the only two things available here — that nothing recognised the
106
+ // value, and what the value was — and leaves the reader holding the value itself.
107
+ return (`UNRECOGNISED STATE ${JSON.stringify(String(state.status))} — ` +
108
+ `this runtime build has no meaning for it`);
29
109
  }
30
110
  }
31
- function elapsedSeconds(startedAt, now) {
111
+ function elapsedSeconds(startedAt, endMs) {
32
112
  const started = Date.parse(startedAt);
33
113
  if (Number.isNaN(started))
34
114
  return null;
35
- return Math.max(0, Math.round((now - started) / 1000));
115
+ return Math.max(0, Math.round((endMs - started) / 1000));
116
+ }
117
+ /**
118
+ * What the duration is measured TO — the one thing that decides whether this line is a measurement
119
+ * or a fabrication.
120
+ *
121
+ * A running job measures to the read time: that number is meant to grow, and it is how an operator
122
+ * sees a deploy is still moving. A finished job measures to the end its journal recorded, so the
123
+ * duration is frozen at what the job actually took — before this, `now` was used for both, and one
124
+ * refusal that took five seconds reported 48s, 83s and 100s on three reads of the same terminal
125
+ * job, with "still going after 100s" and "finished in 5s" printing identically.
126
+ *
127
+ * `null` suppresses the duration entirely, and covers two cases that are the same claim:
128
+ *
129
+ * - A terminal journal with no parseable `endedAt` (written before the field was carried, or
130
+ * truncated). `now - startedAt` is not a worse estimate of that job's duration, it is not a
131
+ * measurement of it at all — a missing number is honest, a growing one on a finished job is the
132
+ * defect.
133
+ * - An `interrupted` job, whatever it carries. Its `endedAt` is stamped by the boot scan when it
134
+ * NOTICES the dead journal, so it measures start → next restart, not start → stop; the same
135
+ * journal read before any boot scan has no stamp at all. Nobody observed when that job stopped,
136
+ * so nothing here can report how long it ran.
137
+ */
138
+ function durationEndMs(snap, now) {
139
+ if (snap.state.status === "running")
140
+ return now;
141
+ if (snap.state.status !== "done")
142
+ return null;
143
+ const ended = Date.parse(snap.endedAt ?? "");
144
+ return Number.isNaN(ended) ? null : ended;
36
145
  }
37
146
  export function renderHeader(snap, now) {
38
- const elapsed = elapsedSeconds(snap.meta.startedAt, now);
147
+ const endMs = durationEndMs(snap, now);
148
+ const elapsed = endMs === null ? null : elapsedSeconds(snap.meta.startedAt, endMs);
39
149
  const elapsedPart = elapsed === null ? "" : `, elapsed ${elapsed}s`;
40
150
  return (`deploy ${snap.meta.deployId} — ${renderState(snap.state)} — package ` +
41
151
  `${snap.meta.packageId} v${snap.meta.version}${elapsedPart}`);
@@ -82,10 +192,70 @@ export function renderStepTable(report) {
82
192
  }
83
193
  return lines;
84
194
  }
85
- export function renderEventsTail(events) {
195
+ /**
196
+ * The step rows the table above has already printed, keyed by the exact text each one printed.
197
+ *
198
+ * `record()` in the orchestrator narrates a step by emitting an event whose `detail` IS the step
199
+ * outcome's `detail` — the same string — so a refusal lands in both places verbatim. On a refused
200
+ * deploy that rendered the whole multi-paragraph teaching block twice in one screen (~15 duplicated
201
+ * lines for `[E_UNIVERSE_NOT_LIVE]`), on the surface an agent polls, where every read pays for it.
202
+ *
203
+ * Keyed by the TEXT rather than by `(instance, step)`: byte equality is the only thing that proves
204
+ * the reader already has that body in front of them. If the two ever diverge, nothing is elided and
205
+ * the tail prints whole — the failure mode is a duplicate, never a fact that went missing.
206
+ *
207
+ * Built from the same `STEP_ORDER` walk `renderStepTable` renders from, so a step the table skips
208
+ * is never counted as on-screen.
209
+ */
210
+ function stepDetailsOnScreen(report) {
211
+ const carried = new Map();
212
+ if (!report)
213
+ return carried;
214
+ const named = report.instances.length > 1;
215
+ for (const instance of report.instances) {
216
+ for (const step of STEP_ORDER) {
217
+ const outcome = instance.steps?.[step];
218
+ if (!outcome || carried.has(outcome.detail))
219
+ continue;
220
+ carried.set(outcome.detail, named ? `the ${step} step of instance ${instance.instance}` : `the ${step} step`);
221
+ }
222
+ }
223
+ return carried;
224
+ }
225
+ /**
226
+ * One event as one line — with the body elided only where the reader can already see it.
227
+ *
228
+ * The tail is a TIMELINE, not a second transcript. An event whose text is on screen above keeps its
229
+ * timestamp and its first line — which is where the bracketed code lives, so the tail stays
230
+ * skimmable and greppable — and says where the rest of it is. An event whose text is NOT on screen
231
+ * prints whole: for an interrupted job the tail is the only place its narration exists at all, and
232
+ * truncating there would delete the fact rather than de-duplicate it.
233
+ */
234
+ function eventLine(event, carried) {
235
+ // The same presence discipline `unrenderableSnapshot` applies to the page, applied to one row:
236
+ // `DeployEventLike` mirrors gateway JSON, and the page-level guard checks `state` and `meta` and
237
+ // never reaches `events[]`. A missing field here must cost that row's content and nothing more —
238
+ // reading it unguarded took the whole page down with a TypeError, which is strictly worse than
239
+ // the line it was meant to improve.
240
+ //
241
+ // Each absence gets a marker rather than a value. Blank would read as an event that happened and
242
+ // said nothing; interpolating prints the literal `undefined` the header arm exists to remove.
243
+ const ts = typeof event?.ts === "string" && event.ts !== "" ? event.ts : NO_TIMESTAMP;
244
+ if (typeof event?.detail !== "string")
245
+ return ` ${ts} ${NO_DETAIL}`;
246
+ const where = carried.get(event.detail);
247
+ const firstLine = event.detail.split("\n", 1)[0] ?? "";
248
+ // A single-line detail has no body to elide, and one whose first line is blank has no legible
249
+ // stand-in to elide it TO — both print exactly as they always did.
250
+ if (where === undefined || firstLine.length === event.detail.length || firstLine.trim() === "") {
251
+ return ` ${ts} ${event.detail}`;
252
+ }
253
+ return ` ${ts} ${firstLine} — full text above, under ${where}`;
254
+ }
255
+ export function renderEventsTail(events, carried = new Map()) {
86
256
  if (events.length === 0)
87
257
  return [];
88
- return [" recent events:", ...events.slice(-EVENT_TAIL).map((event) => ` ${event.ts} ${event.detail}`)];
258
+ return [" recent events:", ...events.slice(-EVENT_TAIL).map((event) => eventLine(event, carried))];
89
259
  }
90
260
  /**
91
261
  * The SOFT calculated-minimum tier, rendered beside the overall — never folded INTO it.
@@ -162,14 +332,54 @@ export function renderLiveLayer(live) {
162
332
  }
163
333
  return lines;
164
334
  }
335
+ /**
336
+ * The fields this renderer cannot print one honest line without — checked at the entry point, the
337
+ * way {@link exitCodeForDeploy} already checks its own.
338
+ *
339
+ * `exitCodeForDeploy` is hardened against a shape-broken gateway payload (`{}`, `{state:{}}`) and
340
+ * answers 1, with tests pinning it. The renderer read the very same fields unguarded, and the
341
+ * status action calls BOTH on the same payload — so a malformed answer got a considered exit code
342
+ * and then a stack trace over the explanation.
343
+ *
344
+ * Refusing to render is the third option this file already prefers over a plausible fallback: a
345
+ * header reading `deploy undefined — … package undefined vundefined` is not a rougher reading of a
346
+ * broken payload, it is a fabricated one.
347
+ *
348
+ * The exit code is deliberately not re-decided here. On the payloads this actually fires for it is
349
+ * already 1 from the guard above; a payload carrying a real `state.status` but no `meta` cannot be
350
+ * produced by the in-repo gateway (`readJournal` returns null without a header line), and where the
351
+ * state IS readable an outcome derived from it is a fact this message does not contradict.
352
+ */
353
+ function unrenderableSnapshot(snap) {
354
+ const missing = [
355
+ ["state.status", snap?.state?.status],
356
+ ["meta.deployId", snap?.meta?.deployId],
357
+ ["meta.packageId", snap?.meta?.packageId],
358
+ ["meta.version", snap?.meta?.version],
359
+ ]
360
+ .filter(([, value]) => typeof value !== "string" || value === "")
361
+ .map(([field]) => field);
362
+ if (missing.length === 0)
363
+ return null;
364
+ return [
365
+ `deploy status: this answer is not a readable deploy snapshot — it carries no ${missing.join(", ")}.`,
366
+ " Nothing here can describe the job, and this says nothing about the deploy itself: a started " +
367
+ "job may be running right now.",
368
+ " Read what did arrive, verbatim: openclaw senpi deploy status --json",
369
+ " If it keeps reading like this, check the gateway log.",
370
+ ];
371
+ }
165
372
  export function renderDeploySnapshotLines(snap, now = Date.now()) {
373
+ const unrenderable = unrenderableSnapshot(snap);
374
+ if (unrenderable)
375
+ return unrenderable;
166
376
  const lines = [renderHeader(snap, now)];
167
377
  const interrupted = snap.state.status === "interrupted";
168
378
  if (snap.report)
169
379
  lines.push(...renderStepTable(snap.report));
170
380
  const events = snap.events ?? [];
171
381
  if (events.length > 0) {
172
- lines.push(...(interrupted ? [" history (journal):"] : []), ...renderEventsTail(events));
382
+ lines.push(...(interrupted ? [" history (journal):"] : []), ...renderEventsTail(events, stepDetailsOnScreen(snap.report)));
173
383
  }
174
384
  if (snap.live)
175
385
  lines.push(...renderLiveLayer(snap.live));
@@ -206,7 +416,19 @@ export function exitCodeForDeploy(snap) {
206
416
  return DEPLOY_EXIT_CODES.interrupted;
207
417
  if (snap.state.status !== "done")
208
418
  return 6; // pending — job still running
209
- return DEPLOY_EXIT_CODES[snap.state.overall ?? ""] ?? 1;
419
+ // The type guard is the fix for a divergence from the header that was filed rather than made:
420
+ // this index coerces its key, so a non-string overall that stringifies onto a known one —
421
+ // `["live"]`, `Object("live")` — answered 0, "live", while `renderState` printed
422
+ // `UNREADABLE OVERALL ["live"]` for the same payload. That is a fail-open against this map's own
423
+ // stated rule (1 is the fallback "so a future status can never silently read as success"), and it
424
+ // is the surface an agent BRANCHES on, so it is worse here than in prose. Unreadable now answers
425
+ // 1 and the two surfaces agree on every payload. Nothing real moves: `job.ts` always supplies a
426
+ // string, so only shapes no in-repo producer emits change answer. A MISSING overall is unaffected
427
+ // — `undefined ?? ""` missed the map and already answered 1, agreeing with the header.
428
+ const overall = snap.state.overall;
429
+ if (typeof overall !== "string")
430
+ return 1;
431
+ return DEPLOY_EXIT_CODES[overall] ?? 1;
210
432
  }
211
433
  /** CLI entry point: print the snapshot rendering. */
212
434
  export function renderDeploySnapshot(snap, now = Date.now()) {
@@ -1 +1 @@
1
- {"version":3,"file":"deploy-render.js","sourceRoot":"","sources":["../../src/cli/deploy-render.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAyE3C,MAAM,UAAU,GAAG,CAAC,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,CAAU,CAAC;AACvF,MAAM,UAAU,GAAG,CAAC,CAAC;AAErB,wFAAwF;AACxF,SAAS,WAAW,CAAC,KAAkC;IACrD,QAAQ,KAAK,CAAC,MAAM,EAAE,CAAC;QACrB,KAAK,SAAS;YACZ,OAAO,KAAK,CAAC,aAAa;gBACxB,CAAC,CAAC,mBAAmB,KAAK,CAAC,KAAK,iEAAiE;gBACjG,CAAC,CAAC,mBAAmB,KAAK,CAAC,KAAK,GAAG,CAAC;QACxC,KAAK,MAAM;YACT,OAAO,UAAU,KAAK,CAAC,OAAO,EAAE,CAAC;QACnC,KAAK,aAAa;YAChB,OAAO,6DAA6D,CAAC;IACzE,CAAC;AACH,CAAC;AAED,SAAS,cAAc,CAAC,SAAiB,EAAE,GAAW;IACpD,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IACtC,IAAI,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC;QAAE,OAAO,IAAI,CAAC;IACvC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;AACzD,CAAC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,iGAAiG;IACjG,kGAAkG;IAClG,iGAAiG;IACjG,gGAAgG;IAChG,kGAAkG;IAClG,uFAAuF;IACvF,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC;IACnC,IAAI,OAAO,OAAO,KAAK,QAAQ;QAAE,OAAO,CAAC,CAAC;IAC1C,OAAO,iBAAiB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AACzC,CAAC;AAED,qDAAqD;AACrD,MAAM,UAAU,oBAAoB,CAAC,IAAwB,EAAE,MAAc,IAAI,CAAC,GAAG,EAAE;IACrF,KAAK,MAAM,IAAI,IAAI,yBAAyB,CAAC,IAAI,EAAE,GAAG,CAAC;QAAE,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AAC7E,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"guide-commands.d.ts","sourceRoot":"","sources":["../../src/cli/guide-commands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AA+cH,eAAO,MAAM,eAAe,QA4RpB,CAAC;AAIT,kFAAkF;AAClF,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,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,gBAAgB,CAAC;CACxF;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,gBAAgB,EACvB,OAAO,EAAE,MAAM,GACd,IAAI,CA2CN"}
1
+ {"version":3,"file":"guide-commands.d.ts","sourceRoot":"","sources":["../../src/cli/guide-commands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AA+cH,eAAO,MAAM,eAAe,QA8RpB,CAAC;AAIT,kFAAkF;AAClF,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,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,gBAAgB,CAAC;CACxF;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,gBAAgB,EACvB,OAAO,EAAE,MAAM,GACd,IAAI,CA2CN"}
@@ -24,7 +24,7 @@ Quick commands:
24
24
  senpi guide actions Action types and decision modes
25
25
  senpi guide dsl DSL exit: phases, lock modes, tiers, time-based cuts
26
26
  senpi validate <pkg> Prove a strategy runs before funding it (static → import → live)
27
- senpi deploy -p <pkg> Take a proven package live: create+fund → install → verified tick
27
+ senpi deploy -p <pkg> Take a proven package live: create+fund → install → observe it running
28
28
  senpi scanner Per-scanner health: runs, errors, liveness, "(no signals yet)" flag
29
29
  senpi events Local domain-event log — the trade narrative
30
30
  senpi explain <asset> Stitch one asset's position lifecycle from the event log
@@ -480,12 +480,12 @@ senpi config — Manage CLI preferences (~/.openclaw/senpi-cli.json)
480
480
  config reset Clear all preferences
481
481
 
482
482
  senpi deploy — Take a strategy package live, end to end (the strategy lifecycle)
483
- openclaw senpi deploy -p <package-dir> --budget <usd> # start (detached): preflight → create+fund → install → verified tick
483
+ openclaw senpi deploy -p <package-dir> --budget <usd> # start (detached): preflight → create+fund → install → observe it running
484
484
  openclaw senpi deploy status # watch until terminal; quotes the verified report
485
485
  -p, --path <dir> Strategy package directory (contains strategy.yaml)
486
486
  --budget <usd> Total budget across the package's wallets (min $10/wallet)
487
487
  --decision-model <model> Required if the package uses decision_mode: llm
488
- --tick-wait <seconds> Wait for one verified scanner tick (default 120, 0 skips)
488
+ --tick-wait <seconds> Wait for one scanner tick, or one external liveness post (default 120, 0 skips)
489
489
  --max-wait <seconds> Wait for wallets to reach ACTIVE (default 150)
490
490
  --json Raw JSON output
491
491
  deploy returns in ~1s; the job runs detached. Poll
@@ -573,14 +573,16 @@ senpi validate — Prove a strategy can execute BEFORE it is funded
573
573
  validation can see a real read
574
574
  (exit 3) the request itself was malformed (bad flag/target) — fix the
575
575
  command, not the code
576
- A full unscoped PASS at live depth writes .senpi-proof.json beside the recipe
577
- (content-addressed, no expiry); the deploy gate verifies it via verifyProof().
576
+ A PASS at --stage live (the default), unscoped and not --no-attest, writes
577
+ .senpi-proof.json beside the recipe (content-addressed, no expiry); the deploy
578
+ gate verifies it via verifyProof(). --stage static, --stage import, --scanner
579
+ and --no-attest each write none.
578
580
  That gate REFUSES, before any money moves: [E_VALIDATE_NO_PROOF] nothing here
579
581
  was ever observed to run · [E_VALIDATE_CONTENT_CHANGED] the files moved since
580
582
  the proof, and it names which · [E_VALIDATE_RUNTIME_VERSION_CHANGED] the proof
581
583
  predates the running runtime (the package needs no edit — just re-prove it).
582
- A proof attests that this content RAN and passed, not that every check at that
583
- depth produced a verdict — deploy re-checks the live instrument universe itself.
584
+ A proof attests that this content RAN and passed, not that every check that
585
+ stage runs produced a verdict — deploy re-checks the live universe itself.
584
586
 
585
587
  senpi status — Lightweight runtime health digest
586
588
  status Overall health + scanners (with degraded count),
@@ -1 +1 @@
1
- {"version":3,"file":"guide-commands.js","sourceRoot":"","sources":["../../src/cli/guide-commands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,MAAM,aAAa,GACjB,0EAA0E,CAAC;AAE7E,+EAA+E;AAE/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sB;SAC3C,WAAW,CAAC,iCAAiC,CAAC;SAC9C,MAAM,CAAC,GAAG,EAAE;QACX,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;IAEJ,KAAK,CAAC,OAAO,CAAC,KAAK,CAAsB;SACvC,WAAW,CAAC,6DAA6D,CAAC;SAC1E,MAAM,CAAC,GAAG,EAAE;QACX,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;IAEJ,KAAK,CAAC,OAAO,CAAC,UAAU,CAAsB;SAC5C,WAAW,CAAC,uCAAuC,CAAC;SACpD,MAAM,CAAC,GAAG,EAAE;QACX,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;IAEJ,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAsB;SAC1C,WAAW,CAAC,kCAAkC,CAAC;SAC/C,MAAM,CAAC,GAAG,EAAE;QACX,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC;IAEJ,KAAK,CAAC,OAAO,CAAC,SAAS,CAAsB;SAC3C,WAAW,CAAC,kCAAkC,CAAC;SAC/C,MAAM,CAAC,GAAG,EAAE;QACX,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,sBAAsB,OAAO,KAAK,aAAa,IAAI,CAAC,CAAC;IAC5E,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -34,9 +34,9 @@ export function registerSenpiCli(program) {
34
34
  runtime.description("Manage runtimes");
35
35
  runtime
36
36
  // Demoted, not deleted: `senpi deploy` is the supported path (funds preflight + attribution +
37
- // verified tick). Hidden keeps it out of help/routing while deploy.py keeps working.
37
+ // observing it running). Hidden keeps it out of help/routing while deploy.py keeps working.
38
38
  .command("create", { hidden: true })
39
- .description("Internal — prefer `senpi deploy` (funds preflight + attribution + verified tick). Direct create skips those gates.")
39
+ .description("Internal — prefer `senpi deploy` (funds preflight + attribution + observing it running). Direct create skips those gates.")
40
40
  .option("-p, --path <path>", "Path to your strategy YAML file")
41
41
  .option("-c, --content <content>", "Paste YAML content directly")
42
42
  .option("--runtime-id <id>", "Name for this runtime (default: from file name or content)")
@@ -1129,7 +1129,7 @@ function fmtMetricNum(n) {
1129
1129
  function registerDeployCommands(senpi) {
1130
1130
  const deploy = senpi
1131
1131
  .command("deploy")
1132
- .description("Deploy a strategy package end-to-end (detached): funds preflight, wallet create+fund, install, one observed tick. " +
1132
+ .description("Deploy a strategy package end-to-end (detached): funds preflight, wallet create+fund, install, observe it running. " +
1133
1133
  "Starts the job and returns — watch with `senpi deploy status`. " +
1134
1134
  "Start exit codes: 0 job started · 2 refused (the message leads with the code) · 1 internal/transport error")
1135
1135
  // NOT `requiredOption`: Commander checks mandatory options by walking the ancestor chain from
@@ -1139,7 +1139,7 @@ function registerDeployCommands(senpi) {
1139
1139
  .option("-p, --path <dir>", "Strategy package directory (contains strategy.yaml)")
1140
1140
  .option("--budget <usd>", "Total budget in USD across the package's wallets (min $10/wallet)")
1141
1141
  .option("--decision-model <model>", "Model for llm-decision actions (required if the package uses decision_mode: llm)")
1142
- .option("--tick-wait <seconds>", "How long the job waits to observe one verified scanner tick (default 120, 0 skips)")
1142
+ .option("--tick-wait <seconds>", "How long the job waits to observe one scanner tick — or, for an external scanner, one fresh liveness post (default 120, 0 skips)")
1143
1143
  .option("--max-wait <seconds>", "How long the job waits for wallets to reach ACTIVE (default 150)")
1144
1144
  .option("--json", "Print the raw start response JSON")
1145
1145
  .action(async (opts) => {