UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

24 lines (23 loc) • 786 B
//#region src/agents/code-mode-node-input.ts const codeModeNodeInitialization = Symbol("code-mode-node-initialization"); /** Core catalog snapshots own these bytes; public executor inputs remain mutable. */ function prepareCodeModeNodeCatalog(e) { const { catalog: t, namespaces: n, apiFiles: r, swarmEnabled: i } = e; const a = JSON.stringify({ __openclawCatalog: t, __openclawNamespaces: n, __openclawApiFiles: r ?? [], __openclawSwarmEnabled: i === true }); const o = new SharedArrayBuffer(Buffer.byteLength(a)); new TextEncoder().encodeInto(a, new Uint8Array(o)); return { catalog: t, namespaces: n, apiFiles: r, swarmEnabled: i, [codeModeNodeInitialization]: o }; } //#endregion export { prepareCodeModeNodeCatalog as n, codeModeNodeInitialization as t };