Skip to content

Commit 5d350e7

Browse files
committed
docs: document sdk single-export contracts
1 parent de68623 commit 5d350e7

9 files changed

Lines changed: 9 additions & 0 deletions

src/plugin-sdk/agent-media-payload.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Agent media payload exports expose media roots and loaders for plugin-facing agent payloads.
22
export { getAgentScopedMediaLocalRoots } from "../media/local-roots.js";
33

4+
/** Legacy agent media payload layout consumed by older agent adapters. */
45
export type AgentMediaPayload = {
56
MediaPath?: string;
67
MediaType?: string;

src/plugin-sdk/browser-cdp.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ function hasRawExplicitPort(raw: string): boolean {
1515
return /:\d+$/.test(hostPort);
1616
}
1717

18+
/** Parsed browser/CDP endpoint details with display-safe normalized URL variants. */
1819
export type BrowserHttpUrlParseResult = {
1920
/** Parsed URL object retained for callers that need protocol, host, path, or credentials. */
2021
parsed: URL;

src/plugin-sdk/browser-control-auth.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import type { OpenClawConfig } from "../config/types.openclaw.js";
33
import { loadBundledPluginPublicSurfaceModuleSync } from "./facade-loader.js";
44

5+
/** Browser control credentials resolved from config, env, or generated setup state. */
56
export type BrowserControlAuth = {
67
/** Bearer token accepted by the browser control HTTP surface. */
78
token?: string;

src/plugin-sdk/command-status.runtime.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import type { ReplyPayload } from "../auto-reply/types.js";
1010
import type { OpenClawConfig } from "../config/types.openclaw.js";
1111
import { loadSessionEntry } from "../gateway/session-utils.js";
1212

13+
/** Inputs for rendering direct-session status replies outside the active channel turn. */
1314
export type ResolveDirectStatusReplyForSessionParams = {
1415
/** Caller config used when the target session cannot load a config snapshot. */
1516
cfg: OpenClawConfig;

src/plugin-sdk/opencode.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const OPENCODE_SHARED_WIZARD_GROUP = {
1111
groupHint: OPENCODE_SHARED_HINT,
1212
} as const;
1313

14+
/** Build a shared OpenCode API-key auth method for one OpenCode-compatible catalog. */
1415
export function createOpencodeCatalogApiKeyAuthMethod(params: {
1516
/** Provider id for the catalog being configured, such as `opencode` or `opencode-go`. */
1617
providerId: string;

src/plugin-sdk/outbound-media.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import { buildOutboundMediaLoadOptions, type OutboundMediaAccess } from "../media/load-options.js";
33
import { loadWebMedia } from "./web-media.js";
44

5+
/** Media loading policy used before plugin media is handed to channel delivery. */
56
export type OutboundMediaLoadOptions = {
67
/** Maximum allowed media payload size before the load is rejected. */
78
maxBytes?: number;

src/plugin-sdk/provider-enable-config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ type ProviderEnableConfigCarrier = {
1919
};
2020
};
2121

22+
/** Result of enabling a provider plugin while honoring plugin allow/deny policy. */
2223
export type PluginEnableResult<TConfig extends ProviderEnableConfigCarrier> = {
2324
/** Config object to persist after the enable attempt. Unchanged when policy blocks the plugin. */
2425
config: TConfig;

src/plugin-sdk/provider-web-search-contract-fields.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
import type { OpenClawConfig } from "../config/types.openclaw.js";
1212
import type { WebSearchProviderPlugin } from "../plugins/types.js";
1313

14+
/** Credential storage mode advertised by a web-search-capable provider. */
1415
export type WebSearchProviderContractCredential =
1516
| { type: "none" }
1617
| { type: "top-level" }

src/plugin-sdk/run-command.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import { formatErrorMessage } from "../infra/errors.js";
33
import { runCommandWithTimeout } from "../process/exec.js";
44

5+
/** Captured process result returned by plugin command execution helpers. */
56
export type PluginCommandRunResult = {
67
/** Process exit code, with `1` used when the command failed before spawning or did not report one. */
78
code: number;

0 commit comments

Comments
 (0)