Reference 导读
OpenClaw App SDK 对话接口 design:把它当成随手翻的小字典
OpenClaw App SDK 对话接口 design 更像一册放在手边的小字典。别想着一口吞下去,先知道它专门回答哪类小问题、什么时候该回来看、哪些表格是现场查门牌用的。原文最响的一记鼓点,其实是:This page is the detailed 对话接口 reference design for the public OpenClaw App SDK. It is…。
先听这页的人话版
OpenClaw App SDK API design
这一页不是在堆术语,它像把“OpenClaw App SDK 对话接口 design”这台小机器搬到桌上,当着你的面拆开给你看。你先不用全记住,先抓住它到底在忙什么:This page is the detailed 对话接口 reference design for the public OpenClaw App SDK. It is intentio…。
如果把这页当成“给普通人看的版本”,你最应该带走的是:它到底在教你一件什么事、什么时候要这样做、以及哪里最容易踩坑。
第 1 站
Start Here
这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。
这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。
你理解的是能力边界,不只是功能名字。
如果这节里同时出现命令、配置和例子,优先先看例子,再回头看配置。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:This page is the detailed 对话接口 reference design for the public OpenClaw App SDK. It is intentionally separate from the…。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:This page is the detailed 对话接口 reference design for the public OpenClaw App SDK. It is intentionally separate from the…。
This page is the detailed API reference design for the public OpenClaw App SDK. It is intentionally separate from the Plugin SDK.
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Note。
Note
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:@openclaw/sdk is the external app/来帮忙的小伙伴 package for talking to the 门口的小门卫. openclaw/新本领插件-sdk/* is the in-process 新本领…。
@openclaw/sdk is the external app/client package for talking to the Gateway. openclaw/plugin-sdk/* is the in-process plugin authoring contract. Do not import Plugin SDK subpaths from apps that only need to run agents.
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:The public app SDK should be built in two layers:。
The public app SDK should be built in two layers:
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:1. A low-level generated 门口的小门卫 来帮忙的小伙伴. 2. A high-level ergonomic wrapper with OpenClaw, 机器人朋友, Session, Run, Task, Ar…。
1. A low-level generated Gateway client. 2. A high-level ergonomic wrapper with OpenClaw, Agent, Session, Run, Task, Artifact, Approval, and Environment objects.
第 2 站
Namespace design
这一节主要在解释“Namespace design”到底是干什么的,以及你什么时候会遇到它。
这一节主要在解释“Namespace design”到底是干什么的,以及你什么时候会遇到它。
如果你是第一次接触 OpenClaw,这一节最值得看的不是术语本身,而是它背后的使用场景和限制。
真正动手时,先看它有没有默认值、有没有必须打开的选项、以及会不会影响安全边界。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:The low-level namespaces should closely follow 门口的小门卫 resources: High-level wrappers should return objects that make co…。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:The low-level namespaces should closely follow 门口的小门卫 resources:。
The low-level namespaces should closely follow Gateway resources:
这段像放在桌上的操作卡,谁来照着做,现场就会动起来。
- 这一行“oc.agents.list();”是在给电脑递一张小纸条,告诉它眼下该做哪一步。
- 这一行“oc.agents.get("main");”是在给电脑递一张小纸条,告诉它眼下该做哪一步。
- 这一行“oc.agents.create(...);”是在给电脑递一张小纸条,告诉它眼下该做哪一步。
oc.agents.list();
oc.agents.get("main");
oc.agents.create(...);
oc.agents.update(...);
oc.sessions.list();
oc.sessions.create(...);
oc.sessions.resolve(...);
oc.sessions.send(...);
oc.sessions.messages(...);
oc.sessions.fork(...);
oc.sessions.compact(...);
oc.sessions.abort(...);
oc.runs.create(...);
oc.runs.get(runId);
oc.runs.events(runId, { after });
oc.runs.wait(runId);
oc.runs.cancel(runId);
oc.tasks.list({ status: "running" });
oc.tasks.get(taskId);
oc.tasks.cancel(taskId, { reason });
oc.tasks.events(taskId, { after }); // future API
oc.models.list();
oc.models.status(); // Gateway models.authStatus
oc.tools.list();
oc.tools.invoke("tool-name", { sessionKey, idempotencyKey });
oc.artifacts.list({ runId });
oc.artifacts.get(artifactId, { runId });
oc.artifacts.download(artifactId, { runId });
oc.approvals.list();
oc.approvals.respond(approvalId, ...);
oc.environments.list();
oc.environments.create(...); // future API: current SDK throws unsupported
oc.environments.status(environmentId);
oc.environments.delete(environmentId); // future API: current SDK throws unsupported
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:High-level wrappers should return objects that make common flows pleasant:。
High-level wrappers should return objects that make common flows pleasant:
这段像放在桌上的操作卡,谁来照着做,现场就会动起来。
- 这一行“const run = await agent.run(inputOrParams);”是在给电脑递一张小纸条,告诉它眼下该做哪一步。
- 这一行“await run.cancel();”是在给电脑递一张小纸条,告诉它眼下该做哪一步。
- 这一行“await run.wait();”是在给电脑递一张小纸条,告诉它眼下该做哪一步。
const run = await agent.run(inputOrParams);
await run.cancel();
await run.wait();
for await (const event of run.events()) {
// normalized event stream
}
const artifacts = await run.artifacts.list();
const session = await run.session();
第 3 站
Event contract
这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。
这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。
这种内容决定了 OpenClaw 是“能做”还是“现在还不能做”,读懂它比记术语更重要。
你可以把这一节当成权限说明书,真正配置时优先盯住 default、required、allow、deny 这几个词。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:The public SDK should expose versioned, replayable, normalized events. id is a replay cursor. Consumers should be able…。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:The public SDK should expose versioned, replayable, normalized events.
The public SDK should expose versioned, replayable, normalized events.
这段像放在桌上的操作卡,谁来照着做,现场就会动起来。
- 这一行“type OpenClawEvent = {”是在给电脑递一张小纸条,告诉它眼下该做哪一步。
- 这里在给“version”挂牌子,告诉系统它该指向“1;”。
- 这里在给“id”挂牌子,告诉系统它该指向“string;”。
type OpenClawEvent = {
version: 1;
id: string;
ts: number;
type: OpenClawEventType;
runId?: string;
sessionId?: string;
sessionKey?: string;
taskId?: string;
agentId?: string;
data: unknown;
raw?: unknown;
};
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:id is a replay cursor. Consumers should be able to reconnect with events({ after: id }) and receive missed events when…。
id is a replay cursor. Consumers should be able to reconnect with events({ after: id }) and receive missed events when retention allows.
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Recommended normalized event families:。
Recommended normalized event families:
这段是在把几种选项排成表格,左边像标签,右边像说明。手机上可以横向滑动原文表格。
| Event | Meaning |
|---|---|
run.created | Run accepted. |
run.queued | Run is waiting for a session lane, runtime, or environment. |
run.started | Runtime started execution. |
run.completed | Run finished successfully. |
run.failed | Run ended with an error. |
run.cancelled | Run was cancelled. |
run.timed_out | Run exceeded its timeout. |
assistant.delta | Assistant text delta. |
assistant.message | Complete assistant message or replacement. |
thinking.delta | Reasoning or plan delta, when policy allows exposure. |
tool.call.started | Tool call began. |
tool.call.delta | Tool call streamed progress or partial output. |
tool.call.completed | Tool call returned successfully. |
tool.call.failed | Tool call failed. |
approval.requested | A run or tool needs approval. |
approval.resolved | Approval was granted, denied, expired, or cancelled. |
question.requested | Runtime asks the user or host app for input. |
question.answered | Host app supplied an answer. |
artifact.created | New artifact available. |
artifact.updated | Existing artifact changed. |
session.created | Session created. |
session.updated | Session metadata changed. |
session.compacted | Session compaction happened. |
task.updated | Background task state changed. |
git.branch | Runtime observed or changed branch state. |
git.diff | Runtime produced or changed a diff. |
git.pr | Runtime opened, updated, or linked a pull request. |
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Runtime-native payloads should be available through raw, but apps should not have to parse raw for normal UI.
Runtime-native payloads should be available through raw, but apps should not have to parse raw for normal UI.
第 4 站
Result contract
这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。
这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。
这种内容决定了 OpenClaw 是“能做”还是“现在还不能做”,读懂它比记术语更重要。
你可以把这一节当成权限说明书,真正配置时优先盯住 default、required、allow、deny 这几个词。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Run.wait() should return a stable result envelope: The result should be boring and stable. Timestamp values preserve th…。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Run.wait() should return a stable result envelope:。
Run.wait() should return a stable result envelope:
这段像放在桌上的操作卡,谁来照着做,现场就会动起来。
- 这一行“type RunResult = {”是在给电脑递一张小纸条,告诉它眼下该做哪一步。
- 这里在给“runId”挂牌子,告诉系统它该指向“string;”。
- 这里在给“status”挂牌子,告诉系统它该指向“accepted | completed | failed | cancelled | timed_out;”。
type RunResult = {
runId: string;
status: "accepted" | "completed" | "failed" | "cancelled" | "timed_out";
sessionId?: string;
sessionKey?: string;
taskId?: string;
startedAt?: string | number;
endedAt?: string | number;
output?: {
text?: string;
messages?: SDKMessage[];
};
usage?: {
inputTokens?: number;
outputTokens?: number;
totalTokens?: number;
costUsd?: number;
};
artifacts?: ArtifactSummary[];
error?: SDKError;
};
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:The result should be boring and stable. Timestamp values preserve the 门口的小门卫 shape, so current lifecycle-backed runs us…。
The result should be boring and stable. Timestamp values preserve the Gateway shape, so current lifecycle-backed runs usually report epoch millisecond numbers while adapters may still surface ISO strings. Rich UI, tool traces, and runtime-native details belong in events and artifacts.
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:accepted is a non-terminal wait result: it means the 门口的小门卫 wait deadline expired before the run produced a lifecycle e…。
accepted is a non-terminal wait result: it means the Gateway wait deadline expired before the run produced a lifecycle end/error. It must not be treated as timed_out; timed_out is reserved for a run that exceeded its own runtime timeout.
第 5 站
Approvals and questions
这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。
这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。
这种内容决定了 OpenClaw 是“能做”还是“现在还不能做”,读懂它比记术语更重要。
你可以把这一节当成权限说明书,真正配置时优先盯住 default、required、allow、deny 这几个词。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Approvals must be first-class because coding 机器人朋友s constantly cross safety boundaries. Approval events should carry: Q…。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Approvals must be first-class because coding 机器人朋友s constantly cross safety boundaries.
Approvals must be first-class because coding agents constantly cross safety boundaries.
这段像放在桌上的操作卡,谁来照着做,现场就会动起来。
- 这一行“run.onApproval(async (request) => {”是在给电脑递一张小纸条,告诉它眼下该做哪一步。
- 这一行“if (request.kind === "tool" && request.toolName === "exec") {”是在给电脑递一张小纸条,告诉它眼下该做哪一步。
- 这里在给“return request.approveOnce({ reason”挂牌子,告诉系统它该指向“CI command allowed by policy });”。
run.onApproval(async (request) => {
if (request.kind === "tool" && request.toolName === "exec") {
return request.approveOnce({ reason: "CI command allowed by policy" });
}
return request.askUser();
});
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Approval events should carry:。
Approval events should carry:
这一串条目别硬背,把它当成“Approvals and questions”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:approval id、run id and session id、request kind、requested action summary。
- approval id
- run id and session id
- request kind
- requested action summary
- tool name or environment action
- risk level
- available decisions
- expiration
- whether the decision can be reused
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Questions are separate from approvals. A question asks the user or host app for information. An approval asks for permi…。
Questions are separate from approvals. A question asks the user or host app for information. An approval asks for permission to perform an action.
第 6 站
工具小帮手Space 聪明脑袋模型
这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。
这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。
这种内容决定了 OpenClaw 是“能做”还是“现在还不能做”,读懂它比记术语更重要。
你可以把这一节当成权限说明书,真正配置时优先盯住 default、required、allow、deny 这几个词。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Apps need to understand the 工具小帮手 surface without importing 新本领插件 internals. The SDK should expose: 工具小帮手 invocation th…。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Apps need to understand the 工具小帮手 surface without importing 新本领插件 internals.
Apps need to understand the tool surface without importing plugin internals.
这段像放在桌上的操作卡,谁来照着做,现场就会动起来。
- 这一行“const tools = await run.toolSpace();”是在给电脑递一张小纸条,告诉它眼下该做哪一步。
- 这一行“for (const tool of tools.list()) {”是在给电脑递一张小纸条,告诉它眼下该做哪一步。
- 这一行“console.log(tool.name, tool.source, tool.requiresApproval);”是在给电脑递一张小纸条,告诉它眼下该做哪一步。
const tools = await run.toolSpace();
for (const tool of tools.list()) {
console.log(tool.name, tool.source, tool.requiresApproval);
}
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:The SDK should expose:。
The SDK should expose:
这一串条目别硬背,把它当成“ToolSpace model”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:normalized 工具小帮手 metadata、source: OpenClaw, MCP, 新本领插件, 消息通道, runti…、schema summary、approval policy。
- normalized tool metadata
- source: OpenClaw, MCP, plugin, channel, runtime, or app
- schema summary
- approval policy
- runtime compatibility
- whether a tool is hidden, readonly, write capable, or host capable
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:工具小帮手 invocation through the SDK should be explicit and scoped. Most apps should run 机器人朋友s, not call arbitrary 工具小帮手s…。
Tool invocation through the SDK should be explicit and scoped. Most apps should run agents, not call arbitrary tools directly.
第 7 站
Artifact 聪明脑袋模型
这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。
这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。
你理解的是能力边界,不只是功能名字。
如果这节里同时出现命令、配置和例子,优先先看例子,再回头看配置。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Artifacts should cover more than files. Common examples: Artifact access should support redaction, retention, and downl…。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Artifacts should cover more than files.
Artifacts should cover more than files.
这段像放在桌上的操作卡,谁来照着做,现场就会动起来。
- 这一行“type ArtifactSummary = {”是在给电脑递一张小纸条,告诉它眼下该做哪一步。
- 这里在给“id”挂牌子,告诉系统它该指向“string;”。
- 这里在给“runId?”挂牌子,告诉系统它该指向“string;”。
type ArtifactSummary = {
id: string;
runId?: string;
sessionId?: string;
type:
| "file"
| "patch"
| "diff"
| "log"
| "media"
| "screenshot"
| "trajectory"
| "pull_request"
| "workspace";
title?: string;
mimeType?: string;
sizeBytes?: number;
createdAt: string;
expiresAt?: string;
};
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Common examples:。
Common examples:
这一串条目别硬背,把它当成“Artifact model”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:file edits and generated files、patch bundles、VCS diffs、screenshots and media outputs。
- file edits and generated files
- patch bundles
- VCS diffs
- screenshots and media outputs
- logs and trace bundles
- pull request links
- runtime trajectories
- managed environment workspace snapshots
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Artifact access should support redaction, retention, and download URLs without assuming every artifact is a normal loca…。
Artifact access should support redaction, retention, and download URLs without assuming every artifact is a normal local file.
第 8 站
安全守门员 聪明脑袋模型
这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。
这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。
这种内容决定了 OpenClaw 是“能做”还是“现在还不能做”,读懂它比记术语更重要。
你可以把这一节当成权限说明书,真正配置时优先盯住 default、required、allow、deny 这几个词。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:The app SDK must be explicit about authority. Recommended token scopes: Defaults: stronger diagnostic scope。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:The app SDK must be explicit about authority.
The app SDK must be explicit about authority.
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Recommended token scopes:。
Recommended token scopes:
这段是在把几种选项排成表格,左边像标签,右边像说明。手机上可以横向滑动原文表格。
| Scope | Allows |
|---|---|
agent.read | List and inspect agents. |
agent.run | Start runs. |
session.read | Read session metadata and messages. |
session.write | Create, send to, fork, compact, and abort sessions. |
task.read | Read background task state. |
task.write | Cancel or modify task notification policy. |
approval.respond | Approve or deny requests. |
tools.invoke | Invoke exposed tools directly. |
artifacts.read | List and download artifacts. |
environment.write | Create or destroy managed environments. |
admin | Administrative operations. |
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Defaults:。
Defaults:
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:stronger diagnostic scope。
stronger diagnostic scope
这一串条目别硬背,把它当成“Security model”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:no secret forwarding by default、no unrestricted environment variable pass…、secret references instead of secret values、explicit sandbox and network policy。
- no secret forwarding by default
- no unrestricted environment variable pass-through
- secret references instead of secret values
- explicit sandbox and network policy
- explicit remote environment retention
- approvals for host execution unless policy proves otherwise
- raw runtime events redacted before they leave Gateway unless the caller has a
第 9 站
Managed environment provider
这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。
这一节在讲规则和边界:什么默认允许、什么必须显式打开、什么被禁止。
这种内容决定了 OpenClaw 是“能做”还是“现在还不能做”,读懂它比记术语更重要。
你可以把这一节当成权限说明书,真正配置时优先盯住 default、required、allow、deny 这几个词。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Managed 机器人朋友s should be implemented as environment providers. The first implementation does not need to be a hosted Sa…。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Managed 机器人朋友s should be implemented as environment providers.
Managed agents should be implemented as environment providers.
这段像放在桌上的操作卡,谁来照着做,现场就会动起来。
- 这一行“type EnvironmentProvider = {”是在给电脑递一张小纸条,告诉它眼下该做哪一步。
- 这里在给“id”挂牌子,告诉系统它该指向“string;”。
- 这里在给“capabilities”挂牌子,告诉系统它该指向“{”。
type EnvironmentProvider = {
id: string;
capabilities: {
checkout?: boolean;
sandbox?: boolean;
networkPolicy?: boolean;
secrets?: boolean;
artifacts?: boolean;
logs?: boolean;
pullRequests?: boolean;
longRunning?: boolean;
};
};
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:The first implementation does not need to be a hosted SaaS. It can target existing node hosts, ephemeral workspaces, CI…。
The first implementation does not need to be a hosted SaaS. It can target existing node hosts, ephemeral workspaces, CI-style runners, or Testbox-style environments. The important contract is:
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:1. prepare workspace 2. bind safe environment and secrets 3. start run 4. 一边说一边送 events 5. collect artifacts 6. clean u…。
1. prepare workspace 2. bind safe environment and secrets 3. start run 4. stream events 5. collect artifacts 6. clean up or retain by policy
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Once this is stable, a hosted cloud service can implement the same provider contract.
Once this is stable, a hosted cloud service can implement the same provider contract.
第 10 站
Package structure
这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。
这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。
你理解的是能力边界,不只是功能名字。
如果这节里同时出现命令、配置和例子,优先先看例子,再回头看配置。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Recommended packages: The repo already has openclaw/新本领插件-sdk/* for 新本领插件s. Keep that namespace separate to avoid confu…。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Recommended packages:。
Recommended packages:
这段是在把几种选项排成表格,左边像标签,右边像说明。手机上可以横向滑动原文表格。
| Package | Purpose |
|---|---|
@openclaw/sdk | Public high-level SDK and generated low-level Gateway client. |
@openclaw/sdk-react | Optional React hooks for dashboards and app builders. |
@openclaw/sdk-testing | Test helpers and fake Gateway server for app integrations. |
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:The repo already has openclaw/新本领插件-sdk/* for 新本领插件s. Keep that namespace separate to avoid confusing 新本领插件 authors wit…。
The repo already has openclaw/plugin-sdk/* for plugins. Keep that namespace separate to avoid confusing plugin authors with app developers.
第 11 站
Generated 来帮忙的小伙伴 strategy
这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。
这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。
你理解的是能力边界,不只是功能名字。
如果这节里同时出现命令、配置和例子,优先先看例子,再回头看配置。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:The low-level 来帮忙的小伙伴 should be generated from versioned 门口的小门卫 protocol schemas, then wrapped by handwritten ergonomic…。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:The low-level 来帮忙的小伙伴 should be generated from versioned 门口的小门卫 protocol schemas, then wrapped by handwritten ergonomic…。
The low-level client should be generated from versioned Gateway protocol schemas, then wrapped by handwritten ergonomic classes.
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Layering:。
Layering:
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:1. 门口的小门卫 schema source of truth. 2. Generated low-level TypeScript 来帮忙的小伙伴. 3. Runtime validators for external inputs…。
1. Gateway schema source of truth. 2. Generated low-level TypeScript client. 3. Runtime validators for external inputs and event payloads. 4. High-level OpenClaw, Agent, Session, Run, Task, and Artifact wrappers. 5. Cookbook examples and integration tests.
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:Benefits:。
Benefits:
这一串条目别硬背,把它当成“Generated client strategy”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:protocol drift is visible、tests can compare generated methods with…、App SDK stays independent from 新本领插件 SDK…、low-level consumers still have full proto…。
- protocol drift is visible
- tests can compare generated methods with Gateway exports
- App SDK stays independent from Plugin SDK internals
- low-level consumers still have full protocol access
- high-level consumers get the small product API
第 12 站
Related
这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。
这一节在讲一类能力是怎么工作的:它能做什么、不能做什么、适合在什么场景下调用。
你理解的是能力边界,不只是功能名字。
如果这节里同时出现命令、配置和例子,优先先看例子,再回头看配置。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:---。
这一串条目别硬背,把它当成“Related”门口贴出来的几张便签就行。它们在提醒你先备好什么、别漏掉什么、哪里最容易走错:OpenClaw App SDK、门口的小门卫 RPC reference、机器人朋友 loop、机器人朋友 runtimes。
如果把这一段摆成一个小场景,你会看到几样东西正在互相打招呼、拦路或者传东西。别急着记名词,先抓住它此刻到底在发生什么:---。
---
AdSense 连接验证已经放在页面头部;广告单元等站点审批通过后再启用。
google-adsense-account: ca-pub-3833673520933536