refactor(plugin-sdk): add managed task flow runtime

This commit is contained in:
Peter Steinberger
2026-04-28 05:32:23 +01:00
parent d987e153fe
commit b60eb1711a
16 changed files with 35 additions and 23 deletions

View File

@@ -179,11 +179,11 @@ Internal OpenClaw runtime code has the same direction: load config once at the C
Inside the Gateway this runtime is in-process. In plugin CLI commands it calls the configured Gateway over RPC, so commands such as `openclaw googlemeet recover-tab` can inspect paired nodes from the terminal. Node commands still go through normal Gateway node pairing, command allowlists, and node-local command handling.
</Accordion>
<Accordion title="api.runtime.taskFlow">
<Accordion title="api.runtime.tasks.managedFlows">
Bind a Task Flow runtime to an existing OpenClaw session key or trusted tool context, then create and manage Task Flows without passing an owner on every call.
```typescript
const taskFlow = api.runtime.taskFlow.fromToolContext(ctx);
const taskFlow = api.runtime.tasks.managedFlows.fromToolContext(ctx);
const created = taskFlow.createManaged({
controllerId: "my-plugin/review-batch",