refactor(agents): hide tool helper internals · openclaw/openclaw@664948e
vincentkoc
·
2026-06-17
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -26,7 +26,7 @@ export type ToolDisplaySpec = {
|
26 | 26 | }; |
27 | 27 | |
28 | 28 | /** Normalized display target for code/search bridge tools. */ |
29 | | -export type ToolSearchCodeDisplayTarget = { |
| 29 | +type ToolSearchCodeDisplayTarget = { |
30 | 30 | toolName: string; |
31 | 31 | displayToolName?: string; |
32 | 32 | displayArgs?: Record<string, unknown>; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -31,7 +31,7 @@ export type PluginToolGroups = {
|
31 | 31 | }; |
32 | 32 | |
33 | 33 | /** Analysis of an allowlist after matching core and plugin tool ids. */ |
34 | | -export type AllowlistResolution = { |
| 34 | +type AllowlistResolution = { |
35 | 35 | policy: ToolPolicyLike | undefined; |
36 | 36 | unknownAllowlist: string[]; |
37 | 37 | pluginOnlyAllowlist: boolean; |
@@ -146,7 +146,7 @@ export function buildPluginToolGroups<T extends { name: string }>(params: {
|
146 | 146 | } |
147 | 147 | |
148 | 148 | /** Expands group:plugins and plugin-id entries into concrete plugin tool names. */ |
149 | | -export function expandPluginGroups( |
| 149 | +function expandPluginGroups( |
150 | 150 | list: string[] | undefined, |
151 | 151 | groups: PluginToolGroups, |
152 | 152 | ): string[] | undefined { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -20,7 +20,7 @@ export type RuntimeToolSchemaDiagnostic = {
|
20 | 20 | }; |
21 | 21 | |
22 | 22 | /** Runtime tool list split into compatible tools and schema diagnostics. */ |
23 | | -export type RuntimeToolSchemaInspection<TTool extends Pick<AnyAgentTool, "name" | "parameters">> = { |
| 23 | +type RuntimeToolSchemaInspection<TTool extends Pick<AnyAgentTool, "name" | "parameters">> = { |
24 | 24 | readonly tools: readonly TTool[]; |
25 | 25 | readonly diagnostics: readonly RuntimeToolSchemaDiagnostic[]; |
26 | 26 | }; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -7,7 +7,7 @@ import {
|
7 | 7 | type RuntimeHealthRecordEnvelope, |
8 | 8 | } from "../plugin-state/runtime-health-store.js"; |
9 | 9 | |
10 | | -export type RuntimeToolSchemaQuarantine = { |
| 10 | +type RuntimeToolSchemaQuarantine = { |
11 | 11 | toolName: string; |
12 | 12 | owner?: string; |
13 | 13 | reason: string; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -5,8 +5,8 @@
|
5 | 5 | import type { AgentToolResult } from "./runtime/index.js"; |
6 | 6 | import type { AnyAgentTool } from "./tools/common.js"; |
7 | 7 | |
8 | | -export type TerminalToolPresentation = { text: string }; |
9 | | -export type TerminalToolPresentationFormatter = ( |
| 8 | +type TerminalToolPresentation = { text: string }; |
| 9 | +type TerminalToolPresentationFormatter = ( |
10 | 10 | params: unknown, |
11 | 11 | result: AgentToolResult<unknown>, |
12 | 12 | ) => TerminalToolPresentation | undefined; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -33,7 +33,7 @@ export type WebSearchToolPolicyParams = {
|
33 | 33 | senderE164?: string | null; |
34 | 34 | }; |
35 | 35 | |
36 | | -export type WebSearchToolPolicyResolution = { |
| 36 | +type WebSearchToolPolicyResolution = { |
37 | 37 | allowed: boolean; |
38 | 38 | persistentAllowed: boolean; |
39 | 39 | }; |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。