feat(gateway): complete openclaw phase1 queue parity v2
This commit is contained in:
+14
-1
@@ -33,6 +33,8 @@ The gateway serialises agent work **per session**, not per WebSocket connection:
|
||||
|
||||
- Requests that target the same `sessionId` run one-at-a-time (FIFO) in a per-session lane.
|
||||
- Requests for different sessions can run in parallel.
|
||||
- Lane policy is configurable (`collect`, `followup`, `steer_backlog`, `interrupt`) with per-channel and per-session overrides.
|
||||
- Session-local overrides can be managed at runtime via `agent.send` commands: `/queue`, `/queue set ...`, `/queue reset`.
|
||||
|
||||
This is implemented via a per-lane queue (`LaneQueue`) in the gateway server, and used by `agent.send` and `agent.cancel`.
|
||||
|
||||
@@ -555,6 +557,8 @@ Send a message to the agent and stream response.
|
||||
}
|
||||
```
|
||||
|
||||
When queue policy rejects/supersedes a request before execution, the server emits an `error` event with `code: 3` (`AgentBusy`) and includes `data.queue` metadata (`code`, `laneId`, `mode`, `overflow`, `droppedCount`).
|
||||
|
||||
#### `agent.cancel`
|
||||
|
||||
Cancel the current agent operation.
|
||||
@@ -876,11 +880,20 @@ Error occurred during processing.
|
||||
"event": "error",
|
||||
"data": {
|
||||
"code": 5,
|
||||
"message": "Internal error: ..."
|
||||
"message": "Internal error: ...",
|
||||
"queue": {
|
||||
"code": "overflow",
|
||||
"laneId": "ws:abc123",
|
||||
"mode": "followup",
|
||||
"overflow": "drop_new",
|
||||
"droppedCount": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
`data.queue` is optional and only present for queue policy rejections/superseded requests.
|
||||
|
||||
## Error Codes
|
||||
|
||||
| Code | Name | Description |
|
||||
|
||||
+31
-4
@@ -33,12 +33,39 @@
|
||||
"test_status": "pnpm test:run src/gateway/lane-queue.test.ts src/gateway/handlers/agent.test.ts src/config/schema.test.ts + pnpm typecheck passing"
|
||||
},
|
||||
"openclaw-gap-next-steps-3phase": {
|
||||
"status": "planned",
|
||||
"status": "in_progress",
|
||||
"date": "2026-02-16",
|
||||
"updated": "2026-02-16",
|
||||
"summary": "Defined a concrete 3-phase implementation plan for remaining high-impact OpenClaw parity work: queue policy parity v2, channel reach expansion (Mattermost first), and companion-node capability negotiation foundation.",
|
||||
"summary": "Defined and began executing a concrete 3-phase implementation plan for remaining high-impact OpenClaw parity work: queue policy parity v2, channel reach expansion (Mattermost first), and companion-node capability negotiation foundation.",
|
||||
"file": "2026-02-16-openclaw-gap-next-steps-3phase.md"
|
||||
},
|
||||
"openclaw-gap-phase1-queue-parity-v2": {
|
||||
"status": "completed",
|
||||
"date": "2026-02-16",
|
||||
"updated": "2026-02-16",
|
||||
"summary": "Completed queue parity v2: added followup/steer_backlog semantics, lane debounce, overflow summarization metadata, runtime session queue controls (`/queue` show/set/reset), queue config patch keys, and docs/protocol updates.",
|
||||
"files_modified": [
|
||||
"src/gateway/lane-queue.ts",
|
||||
"src/gateway/lane-queue.test.ts",
|
||||
"src/gateway/handlers/agent.ts",
|
||||
"src/gateway/handlers/agent.test.ts",
|
||||
"src/gateway/server.ts",
|
||||
"src/gateway/protocol.ts",
|
||||
"src/gateway/handlers/config.ts",
|
||||
"src/gateway/handlers/handlers.test.ts",
|
||||
"src/commands/types.ts",
|
||||
"src/commands/builtin/index.ts",
|
||||
"src/commands/builtin/index.test.ts",
|
||||
"src/commands/index.ts",
|
||||
"src/config/schema.ts",
|
||||
"src/config/schema.test.ts",
|
||||
"src/daemon/services.ts",
|
||||
"config/default.yaml",
|
||||
"README.md",
|
||||
"docs/api/PROTOCOL.md"
|
||||
],
|
||||
"test_status": "pnpm test:run src/gateway/lane-queue.test.ts src/gateway/handlers/agent.test.ts src/gateway/handlers/handlers.test.ts src/commands/builtin/index.test.ts src/config/schema.test.ts + pnpm typecheck + pnpm build passing"
|
||||
},
|
||||
"docs-gateway-auth-config-keys": {
|
||||
"status": "completed",
|
||||
"date": "2026-02-15",
|
||||
@@ -2962,12 +2989,12 @@
|
||||
"tier2_completion": "4/4 (100%) — inbound webhooks, vector memory search, Dockerfile, heartbeat monitor",
|
||||
"tier3_completion": "5/5 (100%) — lane queue, credential redaction, web UI token dashboard, xAI (Grok) provider, Voyage AI embeddings",
|
||||
"tier4_completion": "4/4 (100%) — gateway lock, shell completion, Tailscale Serve/Funnel, DM pairing codes",
|
||||
"feature_gap_scorecard": "115/128 match (90%), 0 partial (0%), 13 missing (10%)",
|
||||
"feature_gap_scorecard": "116/128 match (91%), 0 partial (0%), 12 missing (9%)",
|
||||
"operator_dx_milestone": "Phase 3 (Live Ops Dashboard): 2/2 plans complete — milestone done",
|
||||
"gmail_auth_cli": "flynn gmail-auth command implemented with OAuth2 flow, doctor check, config routed to Telegram",
|
||||
"native_audio_support": "completed — smart routing for native audio (Gemini/OpenAI/GitHub) vs Whisper transcription fallback",
|
||||
"remaining_phases_completion": "Phase 1: 3/3 (100%) — context levels, command registry, memory structure. Phase 2: 3/3 (100%) — component registry, confidence routing, history index. Phase 3: 2/2 (100%) — adaptive memory/compaction, truthfulness/autonomy hardening",
|
||||
"next_up": "OpenClaw gap: Location access (open next scoped implementation checklist)"
|
||||
"next_up": "OpenClaw gap phase 2: Mattermost channel adapter + wiring/docs/tests"
|
||||
},
|
||||
"soul_md_and_cron_create": {
|
||||
"date": "2026-02-11",
|
||||
|
||||
Reference in New Issue
Block a user