refactor: narrow internal agent exports · openclaw/openclaw@8ce44b0
steipete
·
2026-05-01
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | | -export type CompiledGlobPattern = |
| 1 | +type CompiledGlobPattern = |
2 | 2 | | { kind: "all" } |
3 | 3 | | { kind: "exact"; value: string } |
4 | 4 | | { kind: "regex"; value: RegExp }; |
@@ -8,7 +8,7 @@ function escapeRegex(value: string) {
|
8 | 8 | return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); |
9 | 9 | } |
10 | 10 | |
11 | | -export function compileGlobPattern(params: { |
| 11 | +function compileGlobPattern(params: { |
12 | 12 | raw: string; |
13 | 13 | normalize: (value: string) => string; |
14 | 14 | }): CompiledGlobPattern { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -2,14 +2,14 @@ import type { OpenClawConfig } from "../config/types.openclaw.js";
|
2 | 2 | import { resolveOwningPluginIdsForProvider } from "../plugins/providers.js"; |
3 | 3 | import { normalizeProviderId } from "./provider-id.js"; |
4 | 4 | |
5 | | -export type LiveProviderOwnerContext = { |
| 5 | +type LiveProviderOwnerContext = { |
6 | 6 | config?: OpenClawConfig; |
7 | 7 | workspaceDir?: string; |
8 | 8 | env?: NodeJS.ProcessEnv; |
9 | 9 | ownerCache: Map<string, readonly string[]>; |
10 | 10 | }; |
11 | 11 | |
12 | | -export function resolveCachedOwningPluginIdsForProvider( |
| 12 | +function resolveCachedOwningPluginIdsForProvider( |
13 | 13 | provider: string, |
14 | 14 | context: LiveProviderOwnerContext, |
15 | 15 | ): readonly string[] { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -2,7 +2,7 @@ import { normalizeProviderModelIdWithManifest } from "../plugins/manifest-model-
|
2 | 2 | import { normalizeLowercaseStringOrEmpty } from "../shared/string-coerce.js"; |
3 | 3 | import { normalizeProviderId } from "./provider-id.js"; |
4 | 4 | |
5 | | -export type StaticModelRef = { |
| 5 | +type StaticModelRef = { |
6 | 6 | provider: string; |
7 | 7 | model: string; |
8 | 8 | }; |
@@ -42,7 +42,7 @@ export function normalizeStaticProviderModelId(
|
42 | 42 | ); |
43 | 43 | } |
44 | 44 | |
45 | | -export function parseStaticModelRef(raw: string, defaultProvider: string): StaticModelRef | null { |
| 45 | +function parseStaticModelRef(raw: string, defaultProvider: string): StaticModelRef | null { |
46 | 46 | const trimmed = raw.trim(); |
47 | 47 | if (!trimmed) { |
48 | 48 | return null; |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | | -export function flattenStringOnlyCompletionContent(content: unknown): unknown { |
| 1 | +function flattenStringOnlyCompletionContent(content: unknown): unknown { |
2 | 2 | if (!Array.isArray(content)) { |
3 | 3 | return content; |
4 | 4 | } |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -232,7 +232,7 @@ function buildScopedGroupIdCandidates(groupId?: string | null): string[] {
|
232 | 232 | return [raw]; |
233 | 233 | } |
234 | 234 | |
235 | | -export function resolveGroupContextFromSessionKey(sessionKey?: string | null): { |
| 235 | +function resolveGroupContextFromSessionKey(sessionKey?: string | null): { |
236 | 236 | channel?: string; |
237 | 237 | groupIds?: string[]; |
238 | 238 | } { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。