docs: document plugin sdk public helpers · openclaw/openclaw@a16c6ca
steipete
·
2026-06-05
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +// Access group helpers resolve plugin allowlists that reference named config groups. |
1 | 2 | import { uniqueStrings } from "../../packages/normalization-core/src/string-normalization.js"; |
2 | 3 | import { |
3 | 4 | ACCESS_GROUP_ALLOW_FROM_PREFIX, |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +// Account core contracts re-export config and account types used by plugin account flows. |
1 | 2 | export type { OpenClawConfig } from "../config/config.js"; |
2 | 3 | |
3 | 4 | export { createAccountActionGate } from "../channels/plugins/account-action-gate.js"; |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +// Agent core contracts define the minimal plugin-facing agent request and response shapes. |
1 | 2 | import { |
2 | 3 | Agent as CoreAgent, |
3 | 4 | type AgentOptions as CoreAgentOptions, |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +// Allowlist config edit helpers build safe config mutations for channel allowlists. |
1 | 2 | import type { ConfigWriteTarget } from "../channels/plugins/config-writes.js"; |
2 | 3 | import type { ChannelAllowlistAdapter } from "../channels/plugins/types.adapters.js"; |
3 | 4 | import type { ChannelId } from "../channels/plugins/types.public.js"; |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +// Approval delivery helpers format approval prompts and results for channel plugins. |
1 | 2 | import type { ExecApprovalRequest } from "../infra/exec-approvals.js"; |
2 | 3 | import type { PluginApprovalRequest } from "../infra/plugin-approvals.js"; |
3 | 4 | import type { ChannelApprovalCapability } from "./channel-contract.js"; |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +// Approval native helpers translate plugin approval requests into host-native approval records. |
1 | 2 | import { |
2 | 3 | normalizeLowercaseStringOrEmpty, |
3 | 4 | normalizeOptionalString, |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +// Channel entry contracts validate plugin channel entrypoints and runtime API facades. |
1 | 2 | import fs from "node:fs"; |
2 | 3 | import path from "node:path"; |
3 | 4 | import { fileURLToPath } from "node:url"; |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +// Channel inbound contracts define plugin ingress payloads and reply dispatch metadata. |
1 | 2 | import { |
2 | 3 | buildChannelInboundEventContext, |
3 | 4 | finalizeChannelInboundContext, |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +// Channel outbound contracts define plugin send results, media handling, and delivery metadata. |
1 | 2 | import type { |
2 | 3 | DurableMessageBatchSendResult, |
3 | 4 | DurableMessageSendContext, |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +// Channel pairing contracts describe account/device pairing state shared by channel plugins. |
1 | 2 | import type { ChannelId } from "../channels/plugins/types.public.js"; |
2 | 3 | export { |
3 | 4 | createLoggedPairingApprovalNotifier, |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。