Files
openclaw/src/plugin-sdk/fetch-runtime.ts
Peter Steinberger 7c4601ec73 feat(slack): render progress as native task cards
Render Slack progress-mode updates as native task-card progress blocks, with bounded Slack chunk text and stable fallback behavior.

Also deep-merge Slack account streaming objects over top-level defaults while preserving legacy scalar account overrides, and keep the plugin SDK fetch runtime import path from evaluating guarded-fetch dispatcher code.

Verification:
- pnpm test extensions/slack/src/progress-blocks.test.ts extensions/slack/src/accounts.test.ts src/plugin-sdk/fetch-runtime.test.ts
- pnpm lint --threads=8
- git diff --check
- .agents/skills/autoreview/scripts/autoreview --mode local
- GitHub PR checks green on #87748 at 4803e98820

Refs #82258

Co-authored-by: Simon van Laak <32648751+simonvanlaak@users.noreply.github.com>
2026-05-28 20:08:51 +01:00

39 lines
1.3 KiB
TypeScript

// Public fetch/proxy helpers for plugins that need wrapped fetch behavior.
import type { GuardedFetchOptions } from "../infra/net/fetch-guard.js";
export { resolveFetch, wrapFetchWithAbortSignal } from "../infra/fetch.js";
export {
createHttp1EnvHttpProxyAgent,
createHttp1ProxyAgent,
} from "../infra/net/undici-runtime.js";
export {
addActiveManagedProxyTlsOptions,
resolveActiveManagedProxyTlsOptions,
} from "../infra/net/proxy/managed-proxy-undici.js";
export {
createNodeProxyAgent,
type CreateNodeProxyAgentOptions,
} from "../infra/net/node-proxy-agent.js";
export {
hasEnvHttpProxyConfigured,
hasEnvHttpProxyAgentConfigured,
resolveEnvHttpProxyAgentOptions,
resolveEnvHttpProxyUrl,
shouldUseEnvHttpProxyForUrl,
} from "../infra/net/proxy-env.js";
export { getProxyUrlFromFetch, makeProxyFetch } from "../infra/net/proxy-fetch.js";
export { createPinnedLookup } from "../infra/net/ssrf.js";
export type { PinnedDispatcherPolicy } from "../infra/net/ssrf.js";
type GuardedFetchPresetOptions = Omit<
GuardedFetchOptions,
"mode" | "proxy" | "dangerouslyAllowEnvProxyWithoutPinnedDns"
>;
export function withTrustedEnvProxyGuardedFetchMode(
params: GuardedFetchPresetOptions,
): GuardedFetchOptions {
return { ...params, mode: "trusted_env_proxy" };
}