refactor(agents): narrow model helper exports · openclaw/openclaw@9166165
vincentkoc
·
2026-06-17
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -21,21 +21,21 @@ type CachedAgentModelCatalogPayload = {
|
21 | 21 | entries: readonly unknown[]; |
22 | 22 | }; |
23 | 23 | |
24 | | -export type AgentModelCatalogCacheKeyInput = { |
| 24 | +type AgentModelCatalogCacheKeyInput = { |
25 | 25 | agentDir: string; |
26 | 26 | cacheScope?: unknown; |
27 | 27 | config: OpenClawConfig; |
28 | 28 | metadataSnapshot?: PluginMetadataSnapshot; |
29 | 29 | workspaceDir?: string; |
30 | 30 | }; |
31 | 31 | |
32 | | -export type ReadCachedAgentModelCatalogParams = { |
| 32 | +type ReadCachedAgentModelCatalogParams = { |
33 | 33 | agentDir: string; |
34 | 34 | catalogKey: string; |
35 | 35 | nowMs?: number; |
36 | 36 | }; |
37 | 37 | |
38 | | -export type WriteCachedAgentModelCatalogParams = { |
| 38 | +type WriteCachedAgentModelCatalogParams = { |
39 | 39 | agentDir: string; |
40 | 40 | catalogKey: string; |
41 | 41 | entries: readonly unknown[]; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -11,9 +11,9 @@ type SubsystemLogger = ReturnType<typeof createSubsystemLogger>;
|
11 | 11 | type ModelTransportDebugEnv = NodeJS.ProcessEnv; |
12 | 12 | |
13 | 13 | /** Payload debug detail levels accepted by `OPENCLAW_DEBUG_MODEL_PAYLOAD`. */ |
14 | | -export type ModelPayloadDebugMode = "off" | "summary" | "tools" | "full-redacted"; |
| 14 | +type ModelPayloadDebugMode = "off" | "summary" | "tools" | "full-redacted"; |
15 | 15 | /** SSE debug detail levels accepted by `OPENCLAW_DEBUG_SSE`. */ |
16 | | -export type ModelSseDebugMode = "off" | "events" | "peek"; |
| 16 | +type ModelSseDebugMode = "off" | "events" | "peek"; |
17 | 17 | |
18 | 18 | function normalizeEnv(value: unknown): string { |
19 | 19 | return typeof value === "string" ? value.trim().toLowerCase() : ""; |
@@ -59,7 +59,7 @@ export function resolveModelSseDebugMode(
|
59 | 59 | } |
60 | 60 | |
61 | 61 | /** Returns whether any model transport debug channel is enabled. */ |
62 | | -export function isModelTransportDebugEnabled(env: ModelTransportDebugEnv = process.env): boolean { |
| 62 | +function isModelTransportDebugEnabled(env: ModelTransportDebugEnv = process.env): boolean { |
63 | 63 | return ( |
64 | 64 | isTruthyEnv(env.OPENCLAW_DEBUG_MODEL_TRANSPORT) || |
65 | 65 | resolveModelPayloadDebugMode(env) !== "off" || |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。