mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-24 08:21:18 +00:00
* fix(thread-ownership): bound 409 response read and preserve cancel semantics The thread-ownership 409 conflict path still used unbounded resp.json(), inconsistent with the bounded readers shipped across the other channel/provider success paths. A compromised or buggy forwarder returning a multi-GB 409 body would buffer the entire body before JSON.parse, OOMing the agent. Bound the 409 body via readResponseTextLimited (8 KiB cap; a 409 owner field is ~30 bytes). Wrap the parse in try/catch so a truncated or malformed 409 body still cancels the send (owner logged as "unknown") — the 409 status itself means another agent owns this thread, independent of body parseability. The discord webhook and huggingface /v1/models success reads from the original PR were superseded upstream by #98098 and #101079 (readProviderJsonResponse), so this branch now carries only the thread-ownership fix. Co-Authored-By: Claude <noreply@anthropic.com> * fix(thread-ownership): bound forwarder conflict handling --------- Co-authored-by: Claude <noreply@anthropic.com>
9 lines
437 B
TypeScript
9 lines
437 B
TypeScript
// Thread Ownership API module exposes the plugin public contract.
|
|
export type { OpenClawConfig } from "openclaw/plugin-sdk/config-contracts";
|
|
export { definePluginEntry, type OpenClawPluginApi } from "openclaw/plugin-sdk/plugin-entry";
|
|
export { readProviderJsonResponse } from "openclaw/plugin-sdk/provider-http";
|
|
export {
|
|
fetchWithSsrFGuard,
|
|
ssrfPolicyFromDangerouslyAllowPrivateNetwork,
|
|
} from "openclaw/plugin-sdk/ssrf-runtime";
|