mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-12 20:52:54 +00:00
docs: document embedded agent barrels
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
// Embedded-agent runner barrel. Focused submodules own run orchestration,
|
||||
// compaction, queues, sandbox metadata, and SDK tool splitting.
|
||||
export { compactEmbeddedAgentSession } from "./embedded-agent-runner/compact.queued.js";
|
||||
export { applyExtraParamsToAgent } from "./embedded-agent-runner/extra-params.js";
|
||||
|
||||
|
||||
@@ -20,12 +20,15 @@ import type {
|
||||
} from "./embedded-agent-subscribe.handlers.types.js";
|
||||
import { isPromiseLike } from "./embedded-agent-subscribe.promise.js";
|
||||
|
||||
/** Create the serialized event dispatcher for subscribed embedded-agent sessions. */
|
||||
export function createEmbeddedAgentSessionEventHandler(ctx: EmbeddedAgentSubscribeContext) {
|
||||
const scheduleEvent = (
|
||||
evt: EmbeddedAgentSubscribeEvent,
|
||||
handler: () => void | Promise<void>,
|
||||
options?: { detach?: boolean },
|
||||
): void => {
|
||||
// Most stream events must preserve order across async formatting and flush
|
||||
// work. A detached event may run after the chain without blocking delivery.
|
||||
const run = () => {
|
||||
try {
|
||||
return handler();
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// Public embedded-agent barrel. Re-export the runner API used by gateway,
|
||||
// command, and plugin surfaces without exposing internal runner file layout.
|
||||
export type {
|
||||
EmbeddedAgentCompactResult,
|
||||
EmbeddedAgentMeta,
|
||||
|
||||
Reference in New Issue
Block a user