mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-02 02:11:41 +00:00
* refactor(agents): privatize subagent owner surfaces * chore(deadcode): shrink export baseline
34 lines
880 B
TypeScript
34 lines
880 B
TypeScript
export * from "./subagent-spawn.js";
|
|
|
|
type SpawnRuntime = typeof import("./subagent-spawn.runtime.js");
|
|
type SpawnDeps = Omit<
|
|
Pick<
|
|
SpawnRuntime,
|
|
| "callGateway"
|
|
| "dispatchGatewayMethodInProcess"
|
|
| "ensureContextEnginesInitialized"
|
|
| "forkSessionEntryFromParent"
|
|
| "getGlobalHookRunner"
|
|
| "getRuntimeConfig"
|
|
| "hasInProcessGatewayContext"
|
|
| "resolveContextEngine"
|
|
>,
|
|
"getGlobalHookRunner"
|
|
> & {
|
|
getGlobalHookRunner: () => import("../plugins/hooks.js").SubagentLifecycleHookRunner | null;
|
|
};
|
|
|
|
type Testing = {
|
|
setDepsForTest(overrides?: Partial<SpawnDeps>): void;
|
|
};
|
|
|
|
function getTesting(): Testing {
|
|
return (globalThis as Record<PropertyKey, unknown>)[
|
|
Symbol.for("openclaw.subagentSpawnTestApi")
|
|
] as Testing;
|
|
}
|
|
|
|
export const testing: Testing = {
|
|
setDepsForTest: (overrides) => getTesting().setDepsForTest(overrides),
|
|
};
|