openclaw-scheduler 0.2.11 → 0.2.12
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/CHANGELOG.md +5 -0
- package/README.md +2 -2
- package/dispatch/README.md +15 -7
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [0.2.12] -- 2026-06-23
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
- docs(dispatch): document that `dispatch done` must run from the originating local dispatch shell and that terminal-output watcher fallback requires strict clean completion evidence
|
|
9
|
+
|
|
5
10
|
## [0.2.11] -- 2026-06-23
|
|
6
11
|
|
|
7
12
|
### Fixed
|
package/README.md
CHANGED
|
@@ -1728,7 +1728,7 @@ npm test
|
|
|
1728
1728
|
|
|
1729
1729
|
## Sub-agent Dispatch
|
|
1730
1730
|
|
|
1731
|
-
The dispatch module (`dispatch/index.mjs`) spawns and steers isolated agent sessions via the OpenClaw Gateway API and tracks them by a human-readable label. Unlike the scheduler's job/run model, dispatch calls the gateway directly -- no scheduler tick delay, no DB write required to start a session. Each session is assigned a unique session key, recorded in
|
|
1731
|
+
The dispatch module (`dispatch/index.mjs`) spawns and steers isolated agent sessions via the OpenClaw Gateway API and tracks them by a human-readable label. Unlike the scheduler's job/run model, dispatch calls the gateway directly -- no scheduler tick delay, no DB write required to start a session. Each session is assigned a unique session key, recorded in the originating host's local `labels.json` ledger, and delivered back through a scheduler watcher when the agent calls `done` from that same local dispatch shell as its final action. Do not run the completion marker from inside `ssh`, Docker, tmux, or another nested shell, because that can update a different label store. The watcher normalizes completions into short human-readable summaries before posting them to chat, and it only falls back to terminal assistant output when the transcript contains strict clean completion evidence. The module also supports symlink-based branding: a wrapper directory (such as `my-brand`) contains a `config.json` with a custom name and a symlink to `dispatch/index.mjs`, giving the same CLI a different identity in notifications and logs.
|
|
1732
1732
|
|
|
1733
1733
|
### Quick Example
|
|
1734
1734
|
|
|
@@ -1785,7 +1785,7 @@ For normal chat-triggered dispatches, always pass `--deliver-to` from the inboun
|
|
|
1785
1785
|
| `stuck` | Check all running sessions against the stuck threshold. Exits 1 if genuinely stuck sessions remain after auto-resolving completed ones. |
|
|
1786
1786
|
| `result` | Retrieve the last assistant reply from a session transcript via `chat.history`. |
|
|
1787
1787
|
| `sync` | Reconcile `labels.json` with sessions store state. Auto-marks sessions as done or error based on idle time. Supports `--dry-run`. |
|
|
1788
|
-
| `done` | Agent-side completion signal. The agent calls this as its final action to mark itself done immediately (push-based; no idle timeout wait). The stored completion payload is normalized for channel-safe delivery, with checklist/sha metadata used as a fallback when the raw summary is generic or noisy. |
|
|
1788
|
+
| `done` | Agent-side completion signal. The agent calls this as its final action from the originating local dispatch shell to mark itself done immediately (push-based; no idle timeout wait). Do not call it from inside a remote or nested shell, because the label lookup is local to the dispatch host. The stored completion payload is normalized for channel-safe delivery, with checklist/sha metadata used as a fallback when the raw summary is generic or noisy. |
|
|
1789
1789
|
| `send` | Inject a message into a running session for mid-run steering. The agent sees it as a new user turn. |
|
|
1790
1790
|
| `steer` | Alias for `send`. The name makes steering intent explicit. |
|
|
1791
1791
|
| `heartbeat` | Check whether a session has been active within the last 10 minutes. Accepts `--label` or `--session-key`. |
|
package/dispatch/README.md
CHANGED
|
@@ -139,7 +139,10 @@ node dispatch/index.mjs done \
|
|
|
139
139
|
```
|
|
140
140
|
|
|
141
141
|
Marks the label as `done` immediately so the watcher can resolve the run without
|
|
142
|
-
waiting for timeout polling.
|
|
142
|
+
waiting for timeout polling. Run this command from the same local dispatch shell
|
|
143
|
+
that created the label. Do not run it from inside `ssh`, Docker, tmux, or another
|
|
144
|
+
nested shell unless that shell intentionally points at the originating dispatch
|
|
145
|
+
host and `labels.json`; otherwise it can update a different label store.
|
|
143
146
|
|
|
144
147
|
| Flag | Default | Description |
|
|
145
148
|
|---|---|---|
|
|
@@ -291,8 +294,11 @@ No manual token configuration needed on a standard OpenClaw install.
|
|
|
291
294
|
|
|
292
295
|
When `--deliver-to` is set, dispatch registers a **scheduler watcher job**
|
|
293
296
|
after dispatching the session. The watcher polls the session result every
|
|
294
|
-
minute until the agent sends the structured `done` completion signal, then
|
|
295
|
-
delivers via the scheduler's `handleDelivery` pipeline.
|
|
297
|
+
minute until the agent sends the structured local `done` completion signal, then
|
|
298
|
+
delivers via the scheduler's `handleDelivery` pipeline. If the structured signal
|
|
299
|
+
is missed but the transcript has strict clean terminal completion evidence, the
|
|
300
|
+
watcher may deliver that terminal assistant report; arbitrary mid-task replies
|
|
301
|
+
remain diagnostics.
|
|
296
302
|
|
|
297
303
|
```
|
|
298
304
|
dispatch enqueue --deliver-to <telegram-user-id>
|
|
@@ -325,10 +331,12 @@ gateway/session liveness fails open to "still monitoring" until the hard timeout
|
|
|
325
331
|
window or a clear terminal error.
|
|
326
332
|
|
|
327
333
|
While a label is still `running`, a plain assistant reply is diagnostic only.
|
|
328
|
-
Successful final delivery
|
|
329
|
-
structured completion payload.
|
|
330
|
-
|
|
331
|
-
|
|
334
|
+
Successful final delivery prefers the agent-side local `done` signal and its
|
|
335
|
+
structured completion payload. The terminal-assistant fallback is intentionally
|
|
336
|
+
narrow: it requires clean completion evidence from the transcript, not just the
|
|
337
|
+
latest assistant text. If an older watcher records an error and the worker later
|
|
338
|
+
sends a valid local `done`, the later completion is authoritative and the stale
|
|
339
|
+
error is cleared from the label.
|
|
332
340
|
|
|
333
341
|
### Progress check-ins from subagent sessions
|
|
334
342
|
|