frontend: document runtime host bundle
This commit is contained in:
43
frontend/runtime-host/README.md
Normal file
43
frontend/runtime-host/README.md
Normal file
@@ -0,0 +1,43 @@
|
||||
# sgClaw Runtime Host Bundle
|
||||
|
||||
`frontendBundleDir` lets SuperRPA prefer an external `sgclaw-chat` bundle at
|
||||
runtime while keeping the browser host, security boundary, and `chrome.send`
|
||||
bridge inside Chromium.
|
||||
|
||||
## Contract
|
||||
|
||||
- SuperRPA remains the host and security boundary.
|
||||
- sgClaw remains the runtime and planner/execution owner.
|
||||
- The frontend bundle only renders state that comes from the existing host
|
||||
bridge.
|
||||
- Missing external files fall back to Chromium-bundled resources.
|
||||
|
||||
## Directory Layout
|
||||
|
||||
The external bundle root must mirror the Chromium resource paths under
|
||||
`functions/sgclaw-chat/`.
|
||||
|
||||
Example:
|
||||
|
||||
```text
|
||||
frontend-bundle/
|
||||
sgclaw-chat/
|
||||
sgclaw-chat.js
|
||||
sgclaw-chat.css.js
|
||||
sgclaw-chat.html.js
|
||||
components/
|
||||
sgclaw-chat-shell.js
|
||||
sgclaw-message-list.js
|
||||
```
|
||||
|
||||
When `frontendBundleDir` points at `frontend-bundle/`, the browser will try to
|
||||
serve `sgclaw-chat/*` from that directory first. Any file that is absent will
|
||||
continue loading from the built-in Chromium resource pack.
|
||||
|
||||
## Packaging Notes
|
||||
|
||||
- Keep relative import paths inside the bundle identical to the bundled
|
||||
`sgclaw-chat` tree.
|
||||
- Do not move planner or execution logic into the bundle.
|
||||
- Treat [manifest.example.json](/home/zyl/projects/sgClaw/claw/frontend/runtime-host/manifest.example.json)
|
||||
as a packaging reference for humans and tooling.
|
||||
Reference in New Issue
Block a user