docs: document plugin sdk runtime helpers · openclaw/openclaw@feffb6d
steipete
·
2026-06-05
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +// Agent media payload exports expose media roots and loaders for plugin-facing agent payloads. |
1 | 2 | export { getAgentScopedMediaLocalRoots } from "../media/local-roots.js"; |
2 | 3 | |
3 | 4 | export type AgentMediaPayload = { |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +// Allow-from helpers parse and match plugin channel allowlist entries. |
1 | 2 | import { normalizeOptionalLowercaseString } from "../../packages/normalization-core/src/string-coerce.js"; |
2 | 3 | import { normalizeStringEntries } from "../../packages/normalization-core/src/string-normalization.js"; |
3 | 4 | import { isAllowedParsedChatSender as isAllowedParsedChatSenderShared } from "../channels/plugins/chat-target-prefixes.js"; |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +// Anthropic Vertex auth helpers detect local credential presence for provider setup flows. |
1 | 2 | import { readFileSync } from "node:fs"; |
2 | 3 | import { homedir, platform } from "node:os"; |
3 | 4 | import { join } from "node:path"; |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +// API baseline helpers hash public SDK exports for contract drift checks. |
1 | 2 | import { createHash } from "node:crypto"; |
2 | 3 | import fs from "node:fs/promises"; |
3 | 4 | import path from "node:path"; |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +// Approval auth helpers resolve actor and channel identity for approval requests. |
1 | 2 | import { normalizeOptionalString } from "../../packages/normalization-core/src/string-coerce.js"; |
2 | 3 | import type { OpenClawConfig } from "./config-runtime.js"; |
3 | 4 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +// Approval client helpers build approval URLs and status payloads for plugin clients. |
1 | 2 | import { |
2 | 3 | normalizeOptionalLowercaseString, |
3 | 4 | normalizeOptionalString, |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +// Approval renderer helpers convert approval request data into channel-safe display text. |
1 | 2 | import { normalizeOptionalString } from "../../packages/normalization-core/src/string-coerce.js"; |
2 | 3 | import { |
3 | 4 | buildApprovalPresentation, |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +// Boolean parameter helpers parse plugin-facing string flags into stable booleans. |
1 | 2 | import { normalizeOptionalLowercaseString } from "../../packages/normalization-core/src/string-coerce.js"; |
2 | 3 | |
3 | 4 | /** Read loose boolean params from tool input that may arrive as booleans or "true"/"false" strings. */ |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +// Browser control auth helpers resolve plugin browser credentials from OpenClaw config. |
1 | 2 | import type { OpenClawConfig } from "../config/types.openclaw.js"; |
2 | 3 | import { loadBundledPluginPublicSurfaceModuleSync } from "./facade-loader.js"; |
3 | 4 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +// Channel action schemas describe plugin-declared actions available through channel UIs. |
1 | 2 | import { Type } from "typebox"; |
2 | 3 | import type { TSchema } from "typebox"; |
3 | 4 | import { stringEnum as createStringEnum } from "../agents/schema/typebox.js"; |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。