

























@@ -21,7 +21,7 @@ resources.
2121 register providers, channels, tools, hooks, or trusted runtimes.
2222</Note>
232324-## What Ships Today
24+## What ships today
25252626`@openclaw/sdk` ships with:
2727@@ -54,7 +54,7 @@ The SDK also exports the core types used by those surfaces:
5454`EnvironmentSelection`, `WorkspaceSelection`, `ApprovalMode`, and related
5555result types.
565657-## Connect To A Gateway
57+## Connect to a Gateway
58585959Create a client with an explicit Gateway URL, or inject a custom transport for
6060tests and embedded app runtimes.
@@ -89,7 +89,7 @@ const oc = new OpenClaw({
8989});
9090```
919192-## Run An Agent
92+## Run an agent
93939494Use `oc.agents.get(id)` when the app wants an agent handle, then call
9595`agent.run()`.
@@ -124,7 +124,7 @@ while the run is still active returns `status: "accepted"` instead of pretending
124124the run itself timed out. Runtime timeouts, aborted runs, and cancelled runs are
125125normalized into `timed_out` or `cancelled`.
126126127-## Create And Reuse Sessions
127+## Create and reuse sessions
128128129129Use sessions when the app wants durable transcript state.
130130@@ -147,7 +147,7 @@ await session.patch({ label: "renamed-session" });
147147await session.compact({ maxLines: 200 });
148148```
149149150-## Stream Events
150+## Stream events
151151152152The SDK normalizes raw Gateway events into a stable `OpenClawEvent` envelope:
153153@@ -208,7 +208,7 @@ for await (const event of run.events()) {
208208For app-wide streams, use `oc.events()`. For raw Gateway frames, use
209209`oc.rawEvents()`.
210210211-## Models, Tools, Artifacts, And Approvals
211+## Models, tools, artifacts, and approvals
212212213213Model helpers map to current Gateway methods:
214214@@ -261,7 +261,7 @@ const { environments } = await oc.environments.list();
261261await oc.environments.status(environments[0].id);
262262```
263263264-## Explicitly Unsupported Today
264+## Explicitly unsupported today
265265266266The SDK includes names for the product model we want, but it does not silently
267267pretend Gateway RPCs exist. These calls currently throw explicit unsupported
@@ -282,7 +282,7 @@ the `agent` RPC. If callers pass them, the SDK throws before submitting the run
282282so work does not accidentally execute with default workspace, runtime,
283283environment, or approval behavior.
284284285-## App SDK Versus Plugin SDK
285+## App SDK vs Plugin SDK
286286287287Use the App SDK when code lives outside OpenClaw:
288288@@ -304,7 +304,7 @@ Use the Plugin SDK when code runs inside OpenClaw:
304304App SDK code should import from `@openclaw/sdk`. Plugin code should import from
305305documented `openclaw/plugin-sdk/*` subpaths. Do not mix the two contracts.
306306307-## Related Docs
307+## Related
308308309309- [OpenClaw App SDK API design](/reference/openclaw-sdk-api-design)
310310- [Gateway RPC reference](/reference/rpc)
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。