fix(wakeup): drop WAKEUP_OK ack-token theatre from wakeup message
The wakeup dispatcher's `deliver` callback only does `logger.info(reply.slice(0,100))` — no token detection, no scheduler state change. The "first line of your reply MUST be exactly WAKEUP_OK so the plugin records the ack" instruction was prompt theatre that nothing in this plugin (or in openclaw) acted on. Confirmed by reading openclaw/dist/plugin-sdk/src/auto-reply/tokens.d.ts which declares HEARTBEAT_OK and SILENT_REPLY tokens but nothing for wakeup. Symptom in the wild: agents would replay WAKEUP_OK every turn for no gain — costing model budget on a no-op token — and the workflow doc (`ClawSkills/workflows/hf-wakeup/flow.md`) carried a wandering appendix explaining the ack "doesn't actually do anything anyway". Rewrite the wakeup message to tell the agent the truth: drive the hf-wakeup workflow to completion; the scheduler keeps re-waking every 30s until the slot transitions out of `not_started` via harborforge_calendar_complete or _abort. No ack token expected. ClawSkills companion change (lyn/ClawSkills d0109f3) removes WAKEUP_OK from skills/hf-hangman-lab/SKILL.md and workflows/hf-wakeup/flow.md. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -307,21 +307,22 @@ function register(api: PluginAPI): void {
|
|||||||
)}\n\`\`\``;
|
)}\n\`\`\``;
|
||||||
}
|
}
|
||||||
|
|
||||||
// First-line ack `WAKEUP_OK` is the plugin's ack-receipt token; the
|
// The wakeup dispatcher's `deliver` callback below only logs the
|
||||||
// agent MUST then continue in the same session and drive the
|
// reply text — it does NOT inspect any ack token. The earlier
|
||||||
// `hf-wakeup` workflow to completion (calendar_status → task fetch →
|
// `WAKEUP_OK` first-line-ack convention was prompt-only theatre;
|
||||||
// sub-workflow → calendar_complete/abort). Without that continuation
|
// nothing in this plugin or in openclaw acted on it. The only
|
||||||
// the scheduler keeps re-waking every 30s because the slot stays
|
// thing that ends a wake cycle is the slot transitioning out of
|
||||||
// `not_started` forever.
|
// `not_started`, which happens when the agent calls
|
||||||
|
// `harborforge_calendar_complete` or `harborforge_calendar_abort`.
|
||||||
|
// Tell the agent that plainly instead of asking for a fake ack.
|
||||||
const wakeupMessage =
|
const wakeupMessage =
|
||||||
`You have due slots. **First line of your reply MUST be exactly ` +
|
`You have due slots. Drive the \`hf-wakeup\` workflow of skill ` +
|
||||||
`\`WAKEUP_OK\`** so the plugin records the ack. Then, **in this ` +
|
`\`hf-hangman-lab\` to completion in this session — read slot ` +
|
||||||
`same session**, drive the \`hf-wakeup\` workflow of skill ` +
|
`context, call the harborforge_calendar_* tools, route to the ` +
|
||||||
`\`hf-hangman-lab\` to completion — read slot context, call the ` +
|
`right sub-workflow, and finish with harborforge_calendar_complete ` +
|
||||||
`harborforge_calendar_* tools, route to the right sub-workflow, ` +
|
`or harborforge_calendar_abort. The scheduler keeps re-waking you ` +
|
||||||
`and finish with harborforge_calendar_complete or abort. Do NOT ` +
|
`every 30s until the slot transitions out of \`not_started\`, so ` +
|
||||||
`stop after the ack — the scheduler will re-wake you every 30s ` +
|
`partial work or silence just produces another wake.${slotBlock}`;
|
||||||
`until the slot transitions out of \`not_started\`.${slotBlock}`;
|
|
||||||
|
|
||||||
const result = await dispatchInboundMessageWithDispatcher({
|
const result = await dispatchInboundMessageWithDispatcher({
|
||||||
ctx: {
|
ctx: {
|
||||||
|
|||||||
Reference in New Issue
Block a user