docs: update patch mapping and pluginization status / 更新 patch mapping 與插件化狀態
This commit is contained in:
58
reports/openclaw-patch-mapping-matrix.md
Normal file
58
reports/openclaw-patch-mapping-matrix.md
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
# OpenClaw Patch Mapping Matrix
|
||||||
|
|
||||||
|
## Purpose
|
||||||
|
|
||||||
|
Map the current runtime patch behaviors in `openclawtest` to the repo-side modules that should eventually own them.
|
||||||
|
|
||||||
|
This is the bridge between PoC patching and plugin-oriented implementation.
|
||||||
|
|
||||||
|
## Matrix
|
||||||
|
|
||||||
|
| Current runtime behavior | Current patched file | Intended repo-side owner | Current repo status | Notes |
|
||||||
|
|---|---|---|---|---|
|
||||||
|
| Default reply-end button injection | `send-sxDwUGaO.js` | `src/runtime/openclaw-telegram-poc.ts` + `src/telegram/reply-decorator.ts` + `src/runtime/openclaw-telegram-bridge.ts` | strong | Default buttons now exist as Telegram helper and bridge helper; tested repo-side |
|
||||||
|
| Callback data parsing (`rec:continue`, `rec:stop`) | `bot-Ce301bOE.js` | `src/core/callback-contract.ts` + `src/telegram/callback-handler.ts` | strong | Parsing and normalization logic exist and are tested |
|
||||||
|
| Resolved button state UI (`✅` / `⏹`) | `bot-Ce301bOE.js` | `src/runtime/openclaw-telegram-poc.ts` + `src/runtime/openclaw-telegram-bridge.ts` + `src/runtime/openclaw-telegram-callback-actions.ts` | strong | Helper chain now owns the resolved-button model |
|
||||||
|
| Acknowledgement reply text | `bot-Ce301bOE.js` | `src/runtime/openclaw-telegram-poc.ts` + `src/runtime/openclaw-telegram-bridge.ts` + `src/runtime/openclaw-telegram-callback-actions.ts` | strong | Ack text now has explicit repo-side helper ownership and tests |
|
||||||
|
| State file persistence (`reply-end-controls.json`) | `bot-Ce301bOE.js` | `src/core/store.ts` + `src/adapters/openclaw-state-file.ts` | strong | Store and adapter helpers exist and have tests; runtime patch still writes directly instead of delegating |
|
||||||
|
| Stop-state inbound behavior injection | `bot-Ce301bOE.js` | `src/runtime/openclaw-telegram-poc.ts` + `src/core/policy.ts` + `src/runtime/openclaw-telegram-bridge.ts` | good | Policy behavior now has repo-side helper coverage; runtime still injects literal text inline |
|
||||||
|
| Callback debug logging | `bot-Ce301bOE.js` | future adapter/runtime diagnostics module | missing | Still PoC-only runtime instrumentation with no clean repo-side abstraction yet |
|
||||||
|
|
||||||
|
## Immediate migration priority
|
||||||
|
|
||||||
|
The best first migration target is:
|
||||||
|
|
||||||
|
### Priority 1
|
||||||
|
|
||||||
|
Move button construction and acknowledgement text to repo-owned helper use.
|
||||||
|
|
||||||
|
Why:
|
||||||
|
|
||||||
|
- smallest patch surface
|
||||||
|
- easiest to verify
|
||||||
|
- repo-side helper and bridge now both exist
|
||||||
|
|
||||||
|
### Priority 2
|
||||||
|
|
||||||
|
Move state persistence to explicit adapter helper use.
|
||||||
|
|
||||||
|
Why:
|
||||||
|
|
||||||
|
- store code already exists
|
||||||
|
- adapter bridge already exists
|
||||||
|
- removes fragile duplicated inline state-writing logic
|
||||||
|
|
||||||
|
### Priority 3
|
||||||
|
|
||||||
|
Move stop-state behavior out of large inline injected strings into clearer policy-driven adapter logic.
|
||||||
|
|
||||||
|
Why:
|
||||||
|
|
||||||
|
- highest behavior importance
|
||||||
|
- also highest risk if changed too early
|
||||||
|
|
||||||
|
## Current assessment
|
||||||
|
|
||||||
|
The repo now contains meaningful building blocks for the future pluginized path, including tested core/store/helper/bridge/callback-resolution modules, but the live OpenClaw runtime still contains direct inline patch logic.
|
||||||
|
|
||||||
|
That means pluginization has started, but the current implementation is still in a hybrid state.
|
||||||
@@ -29,6 +29,8 @@ This centralizes:
|
|||||||
|
|
||||||
Both repo-side runtime helpers and the apply script now read from this source.
|
Both repo-side runtime helpers and the apply script now read from this source.
|
||||||
|
|
||||||
|
This means reply-end callback values, labels, resolved labels, acknowledgement text, and stop-policy text are no longer duplicated independently across helper code and patch tooling.
|
||||||
|
|
||||||
### 2. Reusable core modules
|
### 2. Reusable core modules
|
||||||
|
|
||||||
The project already contains reusable logic for:
|
The project already contains reusable logic for:
|
||||||
@@ -61,6 +63,8 @@ Telegram PoC behavior has already been captured into reusable helper code:
|
|||||||
- acknowledgement reply text
|
- acknowledgement reply text
|
||||||
- stop-state inbound text shaping
|
- stop-state inbound text shaping
|
||||||
|
|
||||||
|
In addition, callback-resolution behavior is now explicitly represented by a dedicated helper module, rather than being only implicit in runtime patch code.
|
||||||
|
|
||||||
### 5. Reproducible patch flow
|
### 5. Reproducible patch flow
|
||||||
|
|
||||||
The project now has:
|
The project now has:
|
||||||
|
|||||||
Reference in New Issue
Block a user