Document runtime integration for /ac command
This commit is contained in:
36
README.md
36
README.md
@@ -73,16 +73,31 @@ cp -R openclaw-auto-continue ~/.openclaw/workspace/skills/
|
|||||||
- destructive action confirmation
|
- destructive action confirmation
|
||||||
- user decision points
|
- user decision points
|
||||||
|
|
||||||
|
### 如果其他電腦出現 `/ac` unknown
|
||||||
|
這通常代表目標機器的 **live OpenClaw runtime 還沒有真正實作這個 command**。
|
||||||
|
|
||||||
|
所以這個 repo 不只要教怎麼用,還要教怎麼把 `/ac` 接進 runtime。
|
||||||
|
請看:
|
||||||
|
|
||||||
|
- `openclaw-auto-continue/references/runtime-integration.md`
|
||||||
|
|
||||||
|
這份文件會說明:
|
||||||
|
- runtime handler 應該做什麼
|
||||||
|
- `/ac status`、`/ac on`、`/ac off` 應該如何改變 session
|
||||||
|
- 如何驗證另一台真實機器
|
||||||
|
- 如果 skill 存在但 command 不存在,應該怎麼排查
|
||||||
|
|
||||||
### 給 Agent 看
|
### 給 Agent 看
|
||||||
如果 OpenClaw agent 要判斷怎麼使用這個 repo:
|
如果 OpenClaw agent 要判斷怎麼使用這個 repo:
|
||||||
|
|
||||||
1. 讀 `openclaw-auto-continue/SKILL.md`
|
1. 先讀 `openclaw-auto-continue/SKILL.md`
|
||||||
2. 依照裡面的 trigger conditions 與 command usage 使用
|
2. 如果目標機器不認得 `/ac`,再讀 `openclaw-auto-continue/references/runtime-integration.md`
|
||||||
3. 在對應 chat / session 中使用 `/ac on`、`/ac off`、`/ac status`
|
3. 在對應 chat / session 中使用 `/ac on`、`/ac off`、`/ac status`
|
||||||
|
|
||||||
一句話:
|
一句話:
|
||||||
- `README.md` 是給人 / operator 看的
|
- `README.md` 是給人 / operator 看的
|
||||||
- `openclaw-auto-continue/SKILL.md` 是給 agent 看的
|
- `openclaw-auto-continue/SKILL.md` 是給 agent 看的
|
||||||
|
- `references/runtime-integration.md` 是給要落地 runtime 的人 / agent 看的
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -155,13 +170,28 @@ It also does **not** bypass:
|
|||||||
- destructive action confirmation
|
- destructive action confirmation
|
||||||
- user decision points
|
- user decision points
|
||||||
|
|
||||||
|
### If another machine says `/ac` is unknown
|
||||||
|
That usually means the target machine's **live OpenClaw runtime does not actually implement the command yet**.
|
||||||
|
|
||||||
|
So this repo should teach not only usage, but also how to integrate `/ac` into the runtime.
|
||||||
|
See:
|
||||||
|
|
||||||
|
- `openclaw-auto-continue/references/runtime-integration.md`
|
||||||
|
|
||||||
|
That file explains:
|
||||||
|
- what the runtime handler must do
|
||||||
|
- what `/ac status`, `/ac on`, `/ac off` should change
|
||||||
|
- how to verify a real target machine
|
||||||
|
- how to troubleshoot a machine where the skill exists but the command does not
|
||||||
|
|
||||||
### For agents
|
### For agents
|
||||||
If an OpenClaw agent is deciding how to use this repo:
|
If an OpenClaw agent is deciding how to use this repo:
|
||||||
|
|
||||||
1. Read `openclaw-auto-continue/SKILL.md`
|
1. Read `openclaw-auto-continue/SKILL.md`
|
||||||
2. Follow the trigger conditions and command usage there
|
2. If the target machine does not recognize `/ac`, read `openclaw-auto-continue/references/runtime-integration.md`
|
||||||
3. Use `/ac on`, `/ac off`, and `/ac status` in the relevant chat/session
|
3. Use `/ac on`, `/ac off`, and `/ac status` in the relevant chat/session
|
||||||
|
|
||||||
In short:
|
In short:
|
||||||
- `README.md` is the human/operator guide
|
- `README.md` is the human/operator guide
|
||||||
- `openclaw-auto-continue/SKILL.md` is the agent-facing guide
|
- `openclaw-auto-continue/SKILL.md` is the agent-facing guide
|
||||||
|
- `references/runtime-integration.md` is for runtime integration work
|
||||||
|
|||||||
@@ -124,6 +124,8 @@ A practical verification flow:
|
|||||||
3. Give the agent a multi-step but low-risk task
|
3. Give the agent a multi-step but low-risk task
|
||||||
4. Confirm the agent continues without waiting after every intermediate step
|
4. Confirm the agent continues without waiting after every intermediate step
|
||||||
|
|
||||||
|
If the target machine does not recognize `/ac`, read `references/runtime-integration.md` and treat it as a runtime integration problem, not a skill-discovery problem.
|
||||||
|
|
||||||
If you need concrete implementation evidence, the verified live installation path was:
|
If you need concrete implementation evidence, the verified live installation path was:
|
||||||
- `/home/chchang/.nvm/versions/node/v22.22.0/lib/node_modules/openclaw/dist/commands-handlers.runtime-Akj_Dqoi.js`
|
- `/home/chchang/.nvm/versions/node/v22.22.0/lib/node_modules/openclaw/dist/commands-handlers.runtime-Akj_Dqoi.js`
|
||||||
|
|
||||||
|
|||||||
95
openclaw-auto-continue/references/runtime-integration.md
Normal file
95
openclaw-auto-continue/references/runtime-integration.md
Normal file
@@ -0,0 +1,95 @@
|
|||||||
|
# Runtime Integration: how to actually add `/ac` support
|
||||||
|
|
||||||
|
This document is for maintainers/operators who want an OpenClaw installation to truly support `/auto-continue` (`/ac`) at runtime.
|
||||||
|
|
||||||
|
## Key point
|
||||||
|
|
||||||
|
Installing this skill does **not** automatically add the `/ac` command to a target OpenClaw runtime.
|
||||||
|
|
||||||
|
To make `/ac` work on another machine, the running OpenClaw installation must include:
|
||||||
|
|
||||||
|
1. command recognition for `/auto-continue` and `/ac`
|
||||||
|
2. a command handler that updates the current session's queue settings
|
||||||
|
3. persistence of those session settings
|
||||||
|
4. queue clearing on disable
|
||||||
|
|
||||||
|
## Verified live behavior
|
||||||
|
|
||||||
|
The verified implementation used these semantics:
|
||||||
|
|
||||||
|
### `/ac status`
|
||||||
|
Return the current session queue mode.
|
||||||
|
|
||||||
|
### `/ac on`
|
||||||
|
Set the current session to:
|
||||||
|
- `queueMode = "followup"`
|
||||||
|
- `queueDebounceMs = 0`
|
||||||
|
- `queueCap = 1`
|
||||||
|
- `queueDrop = "summarize"`
|
||||||
|
|
||||||
|
### `/ac off`
|
||||||
|
- remove those queue settings from the current session
|
||||||
|
- clear queued followup/lane items for that session
|
||||||
|
|
||||||
|
## Implementation shape
|
||||||
|
|
||||||
|
In the verified installation, the runtime had a command handler equivalent to:
|
||||||
|
|
||||||
|
- detect `/auto-continue`, `/auto-continue ...`, `/ac`, `/ac ...`
|
||||||
|
- authorize sender
|
||||||
|
- parse one of: `status | on | off`
|
||||||
|
- update `sessionEntry`
|
||||||
|
- persist the updated session entry
|
||||||
|
- clear queues when switching off
|
||||||
|
|
||||||
|
## Verified implementation evidence
|
||||||
|
|
||||||
|
A verified live installation contained the handler in:
|
||||||
|
|
||||||
|
- `/home/chchang/.nvm/versions/node/v22.22.0/lib/node_modules/openclaw/dist/commands-handlers.runtime-Akj_Dqoi.js`
|
||||||
|
|
||||||
|
Observed behavior:
|
||||||
|
- `/ac status` returns current queue mode
|
||||||
|
- `/ac on` sets followup config
|
||||||
|
- `/ac off` clears config and queued items
|
||||||
|
|
||||||
|
## What to check on another machine
|
||||||
|
|
||||||
|
### 1. Does the running runtime contain the command?
|
||||||
|
Do **not** assume a checked-out repo is the active runtime.
|
||||||
|
Check the actual installation that the service is using.
|
||||||
|
|
||||||
|
### 2. Does the chat surface route commands?
|
||||||
|
A skill can exist and still fail if the current surface/runtime path does not process slash commands.
|
||||||
|
|
||||||
|
### 3. Does the sender have command permission?
|
||||||
|
If command authorization fails, `/ac` may appear to do nothing.
|
||||||
|
|
||||||
|
## Minimal verification flow on target machine
|
||||||
|
|
||||||
|
1. Install/deploy the runtime that includes `/ac`
|
||||||
|
2. In the target chat/session, run:
|
||||||
|
- `/ac status`
|
||||||
|
3. If recognized, run:
|
||||||
|
- `/ac on`
|
||||||
|
4. Run:
|
||||||
|
- `/ac status`
|
||||||
|
5. Give a low-risk multi-step task and verify reduced pausing between steps
|
||||||
|
|
||||||
|
## Troubleshooting
|
||||||
|
|
||||||
|
### `/ac` is unknown
|
||||||
|
Most likely causes:
|
||||||
|
- target machine runtime does not include the command yet
|
||||||
|
- wrong installation is running
|
||||||
|
- command path is unavailable on that surface
|
||||||
|
|
||||||
|
### `/ac` exists but does not change behavior
|
||||||
|
Check:
|
||||||
|
- whether the session setting is actually persisted
|
||||||
|
- whether the session is the same one you enabled
|
||||||
|
- whether the next step is being blocked by approvals/safety
|
||||||
|
|
||||||
|
## One-line deploy rule
|
||||||
|
|
||||||
|
**This repo teaches both usage and integration, but `/ac` only works when the target machine's live OpenClaw runtime actually implements the command.**
|
||||||
Reference in New Issue
Block a user