Skip to content

Commit 9153598

Browse files
committed
docs(plugins): split architecture by extracting internals (load pipeline, runtime hooks, HTTP routes, schemas)
1 parent 47372a5 commit 9153598

11 files changed

Lines changed: 1057 additions & 1029 deletions

docs/automation/hooks.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ Runs `BOOT.md` from the active workspace when the gateway starts.
207207

208208
Plugins can register hooks through the Plugin SDK for deeper integration: intercepting tool calls, modifying prompts, controlling message flow, and more. The Plugin SDK exposes 28 hooks covering model resolution, agent lifecycle, message flow, tool execution, subagent coordination, and gateway lifecycle.
209209

210-
For the complete plugin hook reference including `before_tool_call`, `before_agent_reply`, `before_install`, and all other plugin hooks, see [Plugin Architecture](/plugins/architecture#provider-runtime-hooks).
210+
For the complete plugin hook reference including `before_tool_call`, `before_agent_reply`, `before_install`, and all other plugin hooks, see [Plugin Architecture](/plugins/architecture-internals#provider-runtime-hooks).
211211

212212
## Configuration
213213

@@ -315,5 +315,5 @@ Check for missing binaries (PATH), environment variables, config values, or OS c
315315

316316
- [CLI Reference: hooks](/cli/hooks)
317317
- [Webhooks](/automation/cron-jobs#webhooks)
318-
- [Plugin Architecture](/plugins/architecture#provider-runtime-hooks) — full plugin hook reference
318+
- [Plugin Architecture](/plugins/architecture-internals#provider-runtime-hooks) — full plugin hook reference
319319
- [Configuration](/gateway/configuration-reference#hooks)

docs/cli/hooks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Running `openclaw hooks` with no subcommand is equivalent to `openclaw hooks lis
1515
Related:
1616

1717
- Hooks: [Hooks](/automation/hooks)
18-
- Plugin hooks: [Plugin hooks](/plugins/architecture#provider-runtime-hooks)
18+
- Plugin hooks: [Plugin hooks](/plugins/architecture-internals#provider-runtime-hooks)
1919

2020
## List All Hooks
2121

docs/concepts/agent-loop.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ Hook decision rules for outbound/tool guards:
112112
- `message_sending`: `{ cancel: true }` is terminal and stops lower-priority handlers.
113113
- `message_sending`: `{ cancel: false }` is a no-op and does not clear a prior cancel.
114114

115-
See [Plugin hooks](/plugins/architecture#provider-runtime-hooks) for the hook API and registration details.
115+
See [Plugin hooks](/plugins/architecture-internals#provider-runtime-hooks) for the hook API and registration details.
116116

117117
## Streaming + partial replies
118118

docs/docs.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1155,7 +1155,8 @@
11551155
"plugins/sdk-setup",
11561156
"plugins/sdk-testing",
11571157
"plugins/manifest",
1158-
"plugins/architecture"
1158+
"plugins/architecture",
1159+
"plugins/architecture-internals"
11591160
]
11601161
}
11611162
]

docs/plugins/architecture-internals.md

Lines changed: 1040 additions & 0 deletions
Large diffs are not rendered by default.

docs/plugins/architecture.md

Lines changed: 5 additions & 1018 deletions
Large diffs are not rendered by default.

docs/plugins/building-plugins.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ A single plugin can register any number of capabilities via the `api` object:
164164
| Agent tools | `api.registerTool(...)` | Below |
165165
| Custom commands | `api.registerCommand(...)` | [Entry Points](/plugins/sdk-entrypoints) |
166166
| Event hooks | `api.registerHook(...)` | [Entry Points](/plugins/sdk-entrypoints) |
167-
| HTTP routes | `api.registerHttpRoute(...)` | [Internals](/plugins/architecture#gateway-http-routes) |
167+
| HTTP routes | `api.registerHttpRoute(...)` | [Internals](/plugins/architecture-internals#gateway-http-routes) |
168168
| CLI subcommands | `api.registerCli(...)` | [Entry Points](/plugins/sdk-entrypoints) |
169169

170170
For the full registration API, see [SDK Overview](/plugins/sdk-overview#registration-api).

docs/plugins/manifest.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ See [Configuration reference](/gateway/configuration) for the full `plugins.*` s
683683
- `channels`, `providers`, `cliBackends`, and `skills` can all be omitted when a plugin does not need them.
684684
- Exclusive plugin kinds are selected through `plugins.slots.*`: `kind: "memory"` via `plugins.slots.memory`, `kind: "context-engine"` via `plugins.slots.contextEngine` (default `legacy`).
685685
- Env-var metadata (`providerAuthEnvVars`, `channelEnvVars`) is declarative only. Status, audit, cron delivery validation, and other read-only surfaces still apply plugin trust and effective activation policy before treating an env var as configured.
686-
- For runtime wizard metadata that requires provider code, see [Provider runtime hooks](/plugins/architecture#provider-runtime-hooks).
686+
- For runtime wizard metadata that requires provider code, see [Provider runtime hooks](/plugins/architecture-internals#provider-runtime-hooks).
687687
- If your plugin depends on native modules, document the build steps and any package-manager allowlist requirements (for example, pnpm `allow-build-scripts` + `pnpm rebuild <package>`).
688688

689689
## Related

docs/plugins/message-presentation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,5 +332,5 @@ messages where the provider supports those operations.
332332

333333
- [Message CLI](/cli/message)
334334
- [Plugin SDK Overview](/plugins/sdk-overview)
335-
- [Plugin Architecture](/plugins/architecture#message-tool-schemas)
335+
- [Plugin Architecture](/plugins/architecture-internals#message-tool-schemas)
336336
- [Channel Presentation Refactor Plan](/plan/ui-channels)

docs/plugins/sdk-channel-plugins.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ Write colocated tests in `src/channel.test.ts`:
631631
<Card title="Message tool integration" icon="puzzle" href="/plugins/architecture#channel-plugins-and-the-shared-message-tool">
632632
describeMessageTool and action discovery
633633
</Card>
634-
<Card title="Target resolution" icon="crosshair" href="/plugins/architecture#channel-target-resolution">
634+
<Card title="Target resolution" icon="crosshair" href="/plugins/architecture-internals#channel-target-resolution">
635635
inferTargetChatType, looksLikeId, resolveTarget
636636
</Card>
637637
<Card title="Runtime helpers" icon="settings" href="/plugins/sdk-runtime">

0 commit comments

Comments
 (0)