@senpi/runtime 1.0.95-dev.runtime-phase-2.20260508073606 → 1.1.0-dev.main.20260527104621

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 (128) hide show
  1. package/dist/actions/close-position/close-position.action.d.ts.map +1 -1
  2. package/dist/actions/close-position/close-position.action.js +4 -1
  3. package/dist/actions/close-position/close-position.action.js.map +1 -1
  4. package/dist/actions/llm-decision/openclaw-llm-decision.d.ts +30 -0
  5. package/dist/actions/llm-decision/openclaw-llm-decision.d.ts.map +1 -1
  6. package/dist/actions/llm-decision/openclaw-llm-decision.js +87 -15
  7. package/dist/actions/llm-decision/openclaw-llm-decision.js.map +1 -1
  8. package/dist/actions/open-position/open-position.action.d.ts.map +1 -1
  9. package/dist/actions/open-position/open-position.action.js +19 -2
  10. package/dist/actions/open-position/open-position.action.js.map +1 -1
  11. package/dist/actions/open-position/resolve-margin.d.ts +9 -1
  12. package/dist/actions/open-position/resolve-margin.d.ts.map +1 -1
  13. package/dist/actions/open-position/resolve-margin.js +12 -1
  14. package/dist/actions/open-position/resolve-margin.js.map +1 -1
  15. package/dist/cli/guide-commands.d.ts.map +1 -1
  16. package/dist/cli/guide-commands.js +8 -4
  17. package/dist/cli/guide-commands.js.map +1 -1
  18. package/dist/cli/senpi-cli-config.d.ts +15 -1
  19. package/dist/cli/senpi-cli-config.d.ts.map +1 -1
  20. package/dist/cli/senpi-cli-config.js +20 -4
  21. package/dist/cli/senpi-cli-config.js.map +1 -1
  22. package/dist/cli/senpi-commands.d.ts.map +1 -1
  23. package/dist/cli/senpi-commands.js +163 -0
  24. package/dist/cli/senpi-commands.js.map +1 -1
  25. package/dist/dsl/engine-client/config-mapping.d.ts +5 -0
  26. package/dist/dsl/engine-client/config-mapping.d.ts.map +1 -1
  27. package/dist/dsl/engine-client/config-mapping.js +14 -2
  28. package/dist/dsl/engine-client/config-mapping.js.map +1 -1
  29. package/dist/dsl/engine-client/event-mapping.d.ts +5 -1
  30. package/dist/dsl/engine-client/event-mapping.d.ts.map +1 -1
  31. package/dist/dsl/engine-client/event-mapping.js +6 -0
  32. package/dist/dsl/engine-client/event-mapping.js.map +1 -1
  33. package/dist/dsl/events/build-closed-event.d.ts.map +1 -1
  34. package/dist/dsl/events/build-closed-event.js +2 -0
  35. package/dist/dsl/events/build-closed-event.js.map +1 -1
  36. package/dist/dsl/events/handlers.d.ts.map +1 -1
  37. package/dist/dsl/events/handlers.js +9 -5
  38. package/dist/dsl/events/handlers.js.map +1 -1
  39. package/dist/dsl/events/initial-state.d.ts +2 -2
  40. package/dist/dsl/events/initial-state.d.ts.map +1 -1
  41. package/dist/dsl/events/initial-state.js +4 -1
  42. package/dist/dsl/events/initial-state.js.map +1 -1
  43. package/dist/dsl/monitor/process-one-position.d.ts.map +1 -1
  44. package/dist/dsl/monitor/process-one-position.js +38 -1
  45. package/dist/dsl/monitor/process-one-position.js.map +1 -1
  46. package/dist/dsl/notifications/formatter.js +1 -1
  47. package/dist/dsl/notifications/formatter.js.map +1 -1
  48. package/dist/index.d.ts +21 -0
  49. package/dist/index.d.ts.map +1 -1
  50. package/dist/index.js +248 -1
  51. package/dist/index.js.map +1 -1
  52. package/dist/runtime/auto-update/coordinator.d.ts +13 -0
  53. package/dist/runtime/auto-update/coordinator.d.ts.map +1 -1
  54. package/dist/runtime/auto-update/coordinator.js +22 -8
  55. package/dist/runtime/auto-update/coordinator.js.map +1 -1
  56. package/dist/runtime/decision-errors.d.ts +166 -0
  57. package/dist/runtime/decision-errors.d.ts.map +1 -0
  58. package/dist/runtime/decision-errors.js +328 -0
  59. package/dist/runtime/decision-errors.js.map +1 -0
  60. package/dist/runtime/notifications.d.ts +15 -1
  61. package/dist/runtime/notifications.d.ts.map +1 -1
  62. package/dist/runtime/notifications.js +16 -11
  63. package/dist/runtime/notifications.js.map +1 -1
  64. package/dist/runtime/run.d.ts +36 -0
  65. package/dist/runtime/run.d.ts.map +1 -1
  66. package/dist/runtime/run.js +9 -0
  67. package/dist/runtime/run.js.map +1 -1
  68. package/dist/runtime/runtime-schema.d.ts +1019 -1
  69. package/dist/runtime/runtime-schema.d.ts.map +1 -1
  70. package/dist/runtime/runtime-schema.js +34 -0
  71. package/dist/runtime/runtime-schema.js.map +1 -1
  72. package/dist/runtime/runtime.d.ts.map +1 -1
  73. package/dist/runtime/runtime.js +7 -4
  74. package/dist/runtime/runtime.js.map +1 -1
  75. package/dist/senpi/types.d.ts +2 -1
  76. package/dist/senpi/types.d.ts.map +1 -1
  77. package/dist/skills-manager/bootstrap.d.ts +26 -0
  78. package/dist/skills-manager/bootstrap.d.ts.map +1 -0
  79. package/dist/skills-manager/bootstrap.js +86 -0
  80. package/dist/skills-manager/bootstrap.js.map +1 -0
  81. package/dist/skills-manager/constants.d.ts +65 -0
  82. package/dist/skills-manager/constants.d.ts.map +1 -0
  83. package/dist/skills-manager/constants.js +91 -0
  84. package/dist/skills-manager/constants.js.map +1 -0
  85. package/dist/skills-manager/coordinator.d.ts +346 -0
  86. package/dist/skills-manager/coordinator.d.ts.map +1 -0
  87. package/dist/skills-manager/coordinator.js +1037 -0
  88. package/dist/skills-manager/coordinator.js.map +1 -0
  89. package/dist/skills-manager/fetcher.d.ts +28 -0
  90. package/dist/skills-manager/fetcher.d.ts.map +1 -0
  91. package/dist/skills-manager/fetcher.js +92 -0
  92. package/dist/skills-manager/fetcher.js.map +1 -0
  93. package/dist/skills-manager/index.d.ts +5 -0
  94. package/dist/skills-manager/index.d.ts.map +1 -0
  95. package/dist/skills-manager/index.js +4 -0
  96. package/dist/skills-manager/index.js.map +1 -0
  97. package/dist/skills-manager/state-store.d.ts +57 -0
  98. package/dist/skills-manager/state-store.d.ts.map +1 -0
  99. package/dist/skills-manager/state-store.js +129 -0
  100. package/dist/skills-manager/state-store.js.map +1 -0
  101. package/dist/skills-manager/types.d.ts +177 -0
  102. package/dist/skills-manager/types.d.ts.map +1 -0
  103. package/dist/skills-manager/types.js +2 -0
  104. package/dist/skills-manager/types.js.map +1 -0
  105. package/dist/skills-manager/utils.d.ts +81 -0
  106. package/dist/skills-manager/utils.d.ts.map +1 -0
  107. package/dist/skills-manager/utils.js +143 -0
  108. package/dist/skills-manager/utils.js.map +1 -0
  109. package/dist/skills-manager/version-manager.d.ts +146 -0
  110. package/dist/skills-manager/version-manager.d.ts.map +1 -0
  111. package/dist/skills-manager/version-manager.js +299 -0
  112. package/dist/skills-manager/version-manager.js.map +1 -0
  113. package/dist/skills-manager/writer.d.ts +28 -0
  114. package/dist/skills-manager/writer.d.ts.map +1 -0
  115. package/dist/skills-manager/writer.js +101 -0
  116. package/dist/skills-manager/writer.js.map +1 -0
  117. package/dist/state/state-manager.d.ts +3 -0
  118. package/dist/state/state-manager.d.ts.map +1 -1
  119. package/dist/state/state-manager.js +9 -0
  120. package/dist/state/state-manager.js.map +1 -1
  121. package/dist/types/dsl/index.d.ts +22 -3
  122. package/dist/types/dsl/index.d.ts.map +1 -1
  123. package/dist/utils/retry.d.ts +7 -0
  124. package/dist/utils/retry.d.ts.map +1 -1
  125. package/dist/utils/retry.js +5 -1
  126. package/dist/utils/retry.js.map +1 -1
  127. package/openclaw.plugin.json +28 -1
  128. package/package.json +3 -1
@@ -0,0 +1,346 @@
1
+ /**
2
+ * Central lifecycle manager for Senpi skills auto-update.
3
+ *
4
+ * Mirrors AutoUpdateCoordinator from src/runtime/auto-update/coordinator.ts
5
+ * for thread-safety (runToken + stopped + running triple) and uses the same
6
+ * injectable-dependency pattern for testability.
7
+ *
8
+ * Scheduling: this coordinator does not own a timer. Ticks fire from
9
+ * outside — currently from auto-update's `onTickComplete` hook in
10
+ * `src/index.ts`, which calls {@link SkillsUpdateCoordinator.runTickOnce}
11
+ * after every auto-update cycle. Skills-manager therefore inherits the
12
+ * `autoUpdate.pollIntervalMinutes` cadence and the same failure-backoff
13
+ * cadence.
14
+ *
15
+ * On start(): load persisted state, bootstrap any missing skills, mark
16
+ * health as healthy. The first tick fires on the next external invocation
17
+ * of `runTickOnce()`.
18
+ *
19
+ * Each tick: resolve skill names (configured list or discovery), check
20
+ * remote versions in parallel, auto-apply patch/minor, notify on major
21
+ * (deduped by version), skip on none/unknown.
22
+ */
23
+ import type { SkillsManagerSnapshot, SkillsUpdateCoordinatorOptions } from "./types.js";
24
+ export declare class SkillsCoordinatorUnavailableError extends Error {
25
+ constructor(message: string);
26
+ }
27
+ export declare class SkillsUpdateCoordinator {
28
+ private readonly options;
29
+ private readonly store;
30
+ private operationChain;
31
+ private stopped;
32
+ private runToken;
33
+ private state;
34
+ private snapshot;
35
+ /** Latest remote version per skill name — populated during ticks. */
36
+ private latestVersions;
37
+ /**
38
+ * Local (pre-install) version per skill name — populated during ticks
39
+ * and manual RPC paths from `SkillVersionInfo.localVersion`. Used by the
40
+ * update-summary and major-available notifications to render the
41
+ * `prev → new` transition. Captured *before* the install runs so the
42
+ * value still reflects the on-disk version at the time the user chose to
43
+ * update; reading `state.skills[name].installedVersion` instead would
44
+ * surface the *post-install* version (recorded by `recordSuccess`) and
45
+ * collapse the transition to `vX -> vX`.
46
+ */
47
+ private previousVersions;
48
+ /**
49
+ * Cached short descriptions parsed from each skill's **remote** SKILL.md
50
+ * frontmatter — i.e. the description for the upcoming/current remote
51
+ * version, not whatever's installed locally. Used to enrich
52
+ * update-summary and major-available notifications with a one-line
53
+ * "About:" so the user gets context for the version the message is
54
+ * actually announcing.
55
+ *
56
+ * Populated during tick / updateSkill / updateAll alongside
57
+ * `latestVersions`; absent / null entries simply omit the line from the
58
+ * notification.
59
+ *
60
+ * Using the remote description (rather than the local one) keeps the
61
+ * notification description in sync with the version number it sits next
62
+ * to — e.g. when notifying about a major bump v1 → v2, the "About:" line
63
+ * reflects the v2 description, even if the v1 local copy on disk is
64
+ * stale or worded differently.
65
+ */
66
+ private skillDescriptions;
67
+ constructor(options: SkillsUpdateCoordinatorOptions);
68
+ /**
69
+ * Load persisted state and bootstrap missing skills. Does **not** schedule
70
+ * a poll loop — skills-manager runs off the auto-update coordinator's
71
+ * `onTickComplete` hook (see `src/index.ts`), which invokes
72
+ * {@link runTickOnce} on whatever cadence auto-update is configured with.
73
+ *
74
+ * Calling `start()` is still required even in the externally-scheduled
75
+ * mode so bootstrap, state load, and the "ready" snapshot all happen
76
+ * before the first external tick fires.
77
+ */
78
+ start(): Promise<void>;
79
+ /**
80
+ * Stop the coordinator: prevent any new ticks from being processed, and
81
+ * wait for any in-flight tick or manual RPC to finish so the caller can
82
+ * rely on no async work still touching state after `stop()` resolves.
83
+ *
84
+ * Since scheduling is now external (auto-update's `onTickComplete` hook),
85
+ * there's no internal timer to cancel — `stop()` just flips the `stopped`
86
+ * flag (which `runTickOnce` checks) and drains the serialised operation
87
+ * queue. The auto-update hook itself becomes a no-op for stopped
88
+ * coordinators since `runTickOnce` returns early.
89
+ */
90
+ stop(): Promise<void>;
91
+ /**
92
+ * Public one-shot tick entry point. Called externally on whatever cadence
93
+ * the host wires up — currently from the auto-update coordinator's
94
+ * `onTickComplete` hook in `src/index.ts`, which fires after each
95
+ * auto-update version check completes (success or failure).
96
+ *
97
+ * Replaces the previous internal `tick()` + `scheduleNext()` pair: the
98
+ * coordinator no longer owns a timer of its own. Manual RPCs
99
+ * (`senpi.skills.update`, `senpi.skills.updateAll`) remain independent of
100
+ * this path.
101
+ *
102
+ * Returns early as a no-op when:
103
+ * - The coordinator has been stopped (e.g. plugin teardown).
104
+ * - The runToken has rolled (e.g. a stop/start cycle invalidated this call).
105
+ * - The coordinator was disabled at start time (config.enabled === false).
106
+ *
107
+ * Tick errors are logged + recorded on the snapshot but never thrown —
108
+ * the caller (auto-update) must not have its own scheduling disturbed by
109
+ * a transient skills-manager failure.
110
+ */
111
+ runTickOnce(): Promise<void>;
112
+ /** Return the latest point-in-time snapshot for gateway RPCs. */
113
+ getSnapshot(): SkillsManagerSnapshot;
114
+ /**
115
+ * Force an immediate version check and apply for one named skill.
116
+ *
117
+ * Skips installation when the update kind is `"none"` (already current) or
118
+ * `"unknown"` (remote version could not be classified — e.g. the fetch
119
+ * failed or the remote `version` field is missing). Falling through on
120
+ * `"unknown"` would write `installedVersion: null` and lose tracking, so we
121
+ * treat it the same as `"none"` and return `updated: false`.
122
+ *
123
+ * @throws On network or install error so the gateway RPC can return ok=false.
124
+ */
125
+ updateSkill(skillName: string): Promise<{
126
+ updated: boolean;
127
+ version: string | null;
128
+ }>;
129
+ /**
130
+ * Force an immediate version check and apply for all discovered/configured skills.
131
+ * Individual failures do not abort the remaining skills.
132
+ *
133
+ * All skills share a single `git clone` — the repo is cloned once, every
134
+ * skill that needs an update is installed from that same checkout, then the
135
+ * checkout is cleaned up. A previous version called `updateSkill` in a loop,
136
+ * which caused one full clone per skill (N redundant clones for N skills);
137
+ * this mirrors the tick path's batching instead.
138
+ */
139
+ updateAll(): Promise<Array<{
140
+ name: string;
141
+ updated: boolean;
142
+ version: string | null;
143
+ error?: string;
144
+ }>>;
145
+ /**
146
+ * Run coordinator work in a global critical section so periodic ticks and
147
+ * manual RPC updates never interleave at await points.
148
+ */
149
+ private runSerialized;
150
+ /**
151
+ * Manual gateway RPCs (`updateSkill`, `updateAll`) are only valid while the
152
+ * coordinator is actively running and enabled. This prevents pre-start calls
153
+ * (e.g. when SENPI_RUNTIME_API_DISABLED=true skipped start()) from persisting
154
+ * the constructor-default empty state over a valid on-disk state file.
155
+ */
156
+ private assertManualOperationAllowed;
157
+ /**
158
+ * Core tick logic: resolve skill names, check versions in parallel, apply
159
+ * policy per skill, then run a single clone for all skills needing update.
160
+ */
161
+ private runTick;
162
+ /**
163
+ * Clone the repo once and install every skill in `skillNames`.
164
+ * Per-skill errors are recorded in state without aborting the others.
165
+ * The update summary notification distinguishes successful installs from
166
+ * failures so the user can see exactly which skills need attention.
167
+ *
168
+ * If the clone itself fails we log and return without touching state or
169
+ * sending a summary — a full-clone failure is almost always a transient
170
+ * network/git issue that affects every skill equally, so attributing it
171
+ * per-skill would be misleading. The next tick retries.
172
+ */
173
+ private applyUpdates;
174
+ /**
175
+ * Clone the remote skills repo exactly once and install every skill in
176
+ * `skillNames` from that single checkout. Returns a per-skill outcome map:
177
+ * `{ version }` on success or `{ version: null, error }` on install failure.
178
+ *
179
+ * Throws only when the clone itself fails — per-skill install failures are
180
+ * captured in the map so callers can continue processing the rest.
181
+ *
182
+ * When `deps.cloneAndInstall` is supplied (unit tests), that injector is
183
+ * called in place of the real clone+install loop; any names missing from
184
+ * its returned map are treated as install failures.
185
+ */
186
+ private cloneAndInstallMany;
187
+ /**
188
+ * Record a successful install on in-memory skill state.
189
+ *
190
+ * Resets failure tracking — a successful end-to-end install is the only
191
+ * signal we treat as "operationally healthy." A successful version check
192
+ * alone is NOT sufficient (and intentionally does not call this), because:
193
+ *
194
+ * - The version check only proves the raw SKILL.md is reachable. It does
195
+ * not exercise the clone/copy/swap pipeline that actually keeps the skill
196
+ * working.
197
+ * - Clearing failure state on every check-success would wipe install-failure
198
+ * history mid-tick: a skill failing to install on every tick would still
199
+ * report `consecutiveFailures: 1` (instead of N) because each tick's
200
+ * check-success reset would precede the install-failure increment.
201
+ *
202
+ * Consequence: a skill that's perpetually up-to-date but had a one-off
203
+ * failure in the past will retain a non-zero `consecutiveFailures` until
204
+ * the next install. We accept that trade-off — surfacing a stale failure
205
+ * counter is preferable to silently wiping real install-failure history.
206
+ */
207
+ private recordSuccess;
208
+ /**
209
+ * Record a version-check failure on in-memory skill state.
210
+ *
211
+ * Shared by `runTick` and `updateAll` — both need to bump
212
+ * `consecutiveFailures` and capture the reason when `Promise.allSettled`
213
+ * surfaces a rejected check. `lastCheckedAt` is updated too so the snapshot
214
+ * doesn't look like the skill was never polled (it was — the poll failed).
215
+ */
216
+ private recordCheckFailure;
217
+ /**
218
+ * Apply one install outcome to in-memory skill state and return a compact
219
+ * success/failure result for the caller's bookkeeping.
220
+ */
221
+ private processInstallOutcome;
222
+ /**
223
+ * Apply a single skill update (used by the manual `updateSkill` RPC path).
224
+ * Returns the installed version.
225
+ *
226
+ * Delegates to {@link cloneAndInstallMany} so the single-skill and batch
227
+ * paths share one implementation of clone+install. The per-skill install
228
+ * error is re-thrown here so `updateSkill` can surface it to the RPC
229
+ * caller via a rejected promise (batch path captures it instead).
230
+ */
231
+ private applyUpdate;
232
+ /**
233
+ * Format the per-skill nested-bullet block used in both notification
234
+ * shapes. Renders the structure suggested in PR #78 review feedback:
235
+ *
236
+ * **skill-name**
237
+ * • v1.0.0 → v2.0.0 (or "v1.0.0 (install failed)" when failed)
238
+ * • description: … (omitted when no remote description)
239
+ * • error: … (only on failure, replaces the description)
240
+ *
241
+ * **Why markdown, not HTML?**
242
+ * Openclaw's Telegram channel (`src/telegram/send.ts:sendMessageTelegram`)
243
+ * pipes outbound text through `renderTelegramHtmlText`, which defaults
244
+ * `textMode` to `"markdown"` — i.e. it expects the source to be markdown
245
+ * and runs `markdownToTelegramHtml` over it before handing the converted
246
+ * HTML to the Bot API with `parse_mode: "HTML"`. The `message` tool
247
+ * (which is what this coordinator's `notify` callback ultimately hits via
248
+ * `/tools/invoke`) does not expose `textMode`, so HTML written by us is
249
+ * treated as literal characters by the markdown step and rendered as
250
+ * visible `<b>` text in the chat (the actual production bug this docstring
251
+ * fixes — confirmed against a live notification screenshot).
252
+ *
253
+ * Using markdown source (`**bold**`, backticks) instead means the channel's
254
+ * markdown→HTML converter produces the correct `<b>` / `<code>` HTML
255
+ * payload and Telegram renders the formatting properly.
256
+ *
257
+ * @param skillName Skill identifier (rendered bold via `**name**`).
258
+ * @param toVersion Resolved upgraded-to version. `null` for failure rows
259
+ * where no install completed; renders as
260
+ * "vPREV (install failed)".
261
+ * @param errorReason Optional failure reason. When provided, replaces
262
+ * the description line with `error: …`.
263
+ */
264
+ private formatSkillBlock;
265
+ /**
266
+ * Send a one-way Telegram notification for a pending major update, deduped
267
+ * by version.
268
+ *
269
+ * The dedup key (`lastNotifiedMajorVersion`) is only set after the notify
270
+ * call resolves successfully. If the notification fails (Telegram API down,
271
+ * transient network error, etc.) the key is left unchanged so the next tick
272
+ * retries delivery instead of silently suppressing it forever.
273
+ */
274
+ private handleMajorAvailable;
275
+ /**
276
+ * Send an aggregated notification summarising the outcome of this tick's
277
+ * updates. Successful installs and failures are shown in separate sections
278
+ * so the user can tell which skills still need attention. Sections with no
279
+ * entries are omitted. If neither section has entries, no notification is
280
+ * sent.
281
+ *
282
+ * Format (markdown source — see `formatSkillBlock` for why markdown
283
+ * rather than HTML):
284
+ *
285
+ * Senpi skills update:
286
+ *
287
+ * Updated:
288
+ *
289
+ * **skill-a**
290
+ * • v1.0.0 → v1.0.1
291
+ * • description: …
292
+ *
293
+ * **skill-b**
294
+ * • v2.0.0 → v2.0.1
295
+ * • description: …
296
+ *
297
+ * Failed to update:
298
+ *
299
+ * **skill-c**
300
+ * • v1.0.0 (install failed)
301
+ * • error: clone failed: …
302
+ */
303
+ private sendUpdateSummary;
304
+ /**
305
+ * Return the version-check function for this coordinator: either the
306
+ * injected `deps.checkSkillVersion` (unit tests) or the real
307
+ * `checkSkillVersion` with the default `fetchImpl`.
308
+ *
309
+ * Extracted so the three call sites (`updateSkill`, `updateAll`, `runTick`)
310
+ * don't repeat the same resolve-and-wrap lambda — a change to the real
311
+ * `checkSkillVersion` signature now only has to land here.
312
+ */
313
+ private resolveCheckFn;
314
+ /**
315
+ * Resolve the list of skill names to check this tick.
316
+ * Uses `config.skills` when non-empty; otherwise discovers all immediate
317
+ * subdirectories across every dir in the `skillsDir` search path,
318
+ * deduped by name and sorted.
319
+ *
320
+ * Per-dir read errors (other than ENOENT) are logged but do not abort the
321
+ * scan — a misconfigured secondary dir cannot mask skills present in the
322
+ * primary.
323
+ */
324
+ private resolveSkillNames;
325
+ /**
326
+ * Build the point-in-time snapshot returned by {@link getSnapshot}.
327
+ *
328
+ * The snapshot is the single serialisable view of the coordinator's state
329
+ * consumed by gateway RPCs (`senpi.skills.status`) and any health UI. It
330
+ * fuses three data sources:
331
+ * 1. Per-skill persisted state (`this.state.skills`) — installed version,
332
+ * last check time, consecutive failures, last failure reason.
333
+ * 2. In-memory `this.latestVersions` map — the most recent remote version
334
+ * observed during a version check (may not yet be installed).
335
+ * 3. Caller-supplied lifecycle metadata — `health`, `lastAction`,
336
+ * `lastError` describing the most recent tick / manual RPC outcome.
337
+ *
338
+ * This is called at every state-mutating boundary (start, tick complete,
339
+ * tick error, manual update complete, manual update skipped, manual update
340
+ * clone failed, stop/disable) so the next RPC response reflects the latest
341
+ * state rather than stale pre-action data.
342
+ */
343
+ private buildSnapshot;
344
+ private persistState;
345
+ }
346
+ //# sourceMappingURL=coordinator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coordinator.d.ts","sourceRoot":"","sources":["../../src/skills-manager/coordinator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAQH,OAAO,KAAK,EAMV,qBAAqB,EAGrB,8BAA8B,EAC/B,MAAM,YAAY,CAAC;AASpB,qBAAa,iCAAkC,SAAQ,KAAK;gBAC9C,OAAO,EAAE,MAAM;CAI5B;AAED,qBAAa,uBAAuB;IAwCtB,OAAO,CAAC,QAAQ,CAAC,OAAO;IAvCpC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAA0B;IAChD,OAAO,CAAC,cAAc,CAAoC;IAC1D,OAAO,CAAC,OAAO,CAAQ;IACvB,OAAO,CAAC,QAAQ,CAAK;IACrB,OAAO,CAAC,KAAK,CAAyD;IACtE,OAAO,CAAC,QAAQ,CAAwB;IACxC,qEAAqE;IACrE,OAAO,CAAC,cAAc,CAAoC;IAC1D;;;;;;;;;OASG;IACH,OAAO,CAAC,gBAAgB,CAAoC;IAC5D;;;;;;;;;;;;;;;;;OAiBG;IACH,OAAO,CAAC,iBAAiB,CAAoC;gBAEhC,OAAO,EAAE,8BAA8B;IAKpE;;;;;;;;;OASG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IA4B5B;;;;;;;;;;OAUG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAW3B;;;;;;;;;;;;;;;;;;;OAmBG;IACG,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAmBlC,iEAAiE;IACjE,WAAW,IAAI,qBAAqB;IAMpC;;;;;;;;;;OAUG;IACG,WAAW,CACf,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;IAmGxD;;;;;;;;;OASG;IACG,SAAS,IAAI,OAAO,CACxB,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,OAAO,CAAC;QAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAClF;IA2ID;;;OAGG;YACW,aAAa;IAwB3B;;;;;OAKG;IACH,OAAO,CAAC,4BAA4B;IAqBpC;;;OAGG;YACW,OAAO;IAuFrB;;;;;;;;;;OAUG;YACW,YAAY;IAsC1B;;;;;;;;;;;OAWG;YACW,mBAAmB;IA4DjC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,OAAO,CAAC,aAAa;IAQrB;;;;;;;OAOG;IACH,OAAO,CAAC,kBAAkB;IAU1B;;;OAGG;IACH,OAAO,CAAC,qBAAqB;IAmB7B;;;;;;;;OAQG;YACW,WAAW;IAmDzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,OAAO,CAAC,gBAAgB;IAgCxB;;;;;;;;OAQG;YACW,oBAAoB;IAuClC;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;YACW,iBAAiB;IA8F/B;;;;;;;;OAQG;IACH,OAAO,CAAC,cAAc;IAYtB;;;;;;;;;OASG;YACW,iBAAiB;IAqC/B;;;;;;;;;;;;;;;;;OAiBG;IACH,OAAO,CAAC,aAAa;YA+BP,YAAY;CAS3B"}