@developerz.ai/ui-debugger-mcp 1.9.0 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +56 -44
- package/dist/adapters/android/adb.d.ts +19 -7
- package/dist/adapters/android/adb.js +50 -13
- package/dist/adapters/android/adb.js.map +1 -1
- package/dist/adapters/android/android-adapter.d.ts +42 -2
- package/dist/adapters/android/android-adapter.js +366 -36
- package/dist/adapters/android/android-adapter.js.map +1 -1
- package/dist/adapters/android/commands.js.map +1 -1
- package/dist/adapters/android/ports.js.map +1 -1
- package/dist/adapters/android/sdk.d.ts +65 -0
- package/dist/adapters/android/sdk.js +107 -0
- package/dist/adapters/android/sdk.js.map +1 -0
- package/dist/adapters/android/uiautomator.d.ts +23 -7
- package/dist/adapters/android/uiautomator.js +31 -7
- package/dist/adapters/android/uiautomator.js.map +1 -1
- package/dist/adapters/availability.d.ts +39 -0
- package/dist/adapters/availability.js +62 -0
- package/dist/adapters/availability.js.map +1 -0
- package/dist/adapters/browser/browser-adapter.d.ts +11 -22
- package/dist/adapters/browser/browser-adapter.js +98 -67
- package/dist/adapters/browser/browser-adapter.js.map +1 -1
- package/dist/adapters/browser/cdp.d.ts +15 -7
- package/dist/adapters/browser/cdp.js +25 -3
- package/dist/adapters/browser/cdp.js.map +1 -1
- package/dist/adapters/browser/filters.d.ts +1 -1
- package/dist/adapters/browser/filters.js.map +1 -1
- package/dist/adapters/browser/geometry.js.map +1 -1
- package/dist/adapters/browser/launch.d.ts +14 -5
- package/dist/adapters/browser/launch.js +14 -5
- package/dist/adapters/browser/launch.js.map +1 -1
- package/dist/adapters/browser/lifecycle.d.ts +58 -0
- package/dist/adapters/browser/lifecycle.js +98 -0
- package/dist/adapters/browser/lifecycle.js.map +1 -0
- package/dist/adapters/browser/log-filters.d.ts +2 -2
- package/dist/adapters/browser/log-filters.js.map +1 -1
- package/dist/adapters/browser/log-format.d.ts +14 -23
- package/dist/adapters/browser/log-format.js +16 -55
- package/dist/adapters/browser/log-format.js.map +1 -1
- package/dist/adapters/browser/tab-context.d.ts +30 -0
- package/dist/adapters/browser/tab-context.js +41 -0
- package/dist/adapters/browser/tab-context.js.map +1 -0
- package/dist/adapters/contract.d.ts +91 -5
- package/dist/adapters/contract.js +7 -2
- package/dist/adapters/contract.js.map +1 -1
- package/dist/adapters/desktop/atspi-busctl.d.ts +26 -0
- package/dist/adapters/desktop/atspi-busctl.js +330 -0
- package/dist/adapters/desktop/atspi-busctl.js.map +1 -0
- package/dist/adapters/desktop/atspi-parse.d.ts +39 -0
- package/dist/adapters/desktop/atspi-parse.js +155 -0
- package/dist/adapters/desktop/atspi-parse.js.map +1 -0
- package/dist/adapters/desktop/atspi.d.ts +75 -50
- package/dist/adapters/desktop/atspi.js +64 -285
- package/dist/adapters/desktop/atspi.js.map +1 -1
- package/dist/adapters/desktop/capture.d.ts +11 -20
- package/dist/adapters/desktop/capture.js +68 -37
- package/dist/adapters/desktop/capture.js.map +1 -1
- package/dist/adapters/desktop/desktop-adapter.d.ts +20 -2
- package/dist/adapters/desktop/desktop-adapter.js +91 -9
- package/dist/adapters/desktop/desktop-adapter.js.map +1 -1
- package/dist/adapters/desktop/input.d.ts +18 -4
- package/dist/adapters/desktop/input.js +15 -10
- package/dist/adapters/desktop/input.js.map +1 -1
- package/dist/adapters/desktop/proc.d.ts +32 -4
- package/dist/adapters/desktop/proc.js +33 -6
- package/dist/adapters/desktop/proc.js.map +1 -1
- package/dist/adapters/factory.d.ts +12 -5
- package/dist/adapters/factory.js +29 -3
- package/dist/adapters/factory.js.map +1 -1
- package/dist/adapters/log-format.d.ts +32 -0
- package/dist/adapters/log-format.js +39 -0
- package/dist/adapters/log-format.js.map +1 -0
- package/dist/agent/belt/act.d.ts +421 -21
- package/dist/agent/belt/act.js +4 -4
- package/dist/agent/belt/act.js.map +1 -1
- package/dist/agent/belt/look.d.ts +471 -14
- package/dist/agent/belt/look.js +74 -12
- package/dist/agent/belt/look.js.map +1 -1
- package/dist/agent/belt/observe.d.ts +663 -42
- package/dist/agent/belt/observe.js +76 -12
- package/dist/agent/belt/observe.js.map +1 -1
- package/dist/agent/belt/report.d.ts +754 -48
- package/dist/agent/belt/report.js +121 -38
- package/dist/agent/belt/report.js.map +1 -1
- package/dist/agent/belt/trail.d.ts +44 -16
- package/dist/agent/belt/trail.js +46 -11
- package/dist/agent/belt/trail.js.map +1 -1
- package/dist/agent/capabilities.js.map +1 -1
- package/dist/agent/fallback.d.ts +33 -0
- package/dist/agent/fallback.js +84 -0
- package/dist/agent/fallback.js.map +1 -0
- package/dist/agent/loop.d.ts +54 -52
- package/dist/agent/loop.js +173 -176
- package/dist/agent/loop.js.map +1 -1
- package/dist/agent/models.d.ts +10 -6
- package/dist/agent/models.js +15 -9
- package/dist/agent/models.js.map +1 -1
- package/dist/agent/prompts/compose.d.ts +1 -1
- package/dist/agent/prompts/debug-agent.js +45 -8
- package/dist/agent/prompts/debug-agent.js.map +1 -1
- package/dist/agent/prompts/web-addendum.d.ts +1 -1
- package/dist/agent/prompts/web-addendum.js +15 -3
- package/dist/agent/prompts/web-addendum.js.map +1 -1
- package/dist/agent/provider.d.ts +38 -0
- package/dist/agent/provider.js +55 -3
- package/dist/agent/provider.js.map +1 -1
- package/dist/boot.d.ts +64 -0
- package/dist/boot.js +145 -0
- package/dist/boot.js.map +1 -0
- package/dist/cli/chromium-libs.d.ts +262 -0
- package/dist/cli/chromium-libs.js +522 -0
- package/dist/cli/chromium-libs.js.map +1 -0
- package/dist/cli/control.js +51 -9
- package/dist/cli/control.js.map +1 -1
- package/dist/cli/init.d.ts +52 -3
- package/dist/cli/init.js +62 -10
- package/dist/cli/init.js.map +1 -1
- package/dist/config/load.d.ts +25 -8
- package/dist/config/load.js +40 -13
- package/dist/config/load.js.map +1 -1
- package/dist/config/schema.d.ts +18 -6
- package/dist/config/schema.js +22 -7
- package/dist/config/schema.js.map +1 -1
- package/dist/errors.d.ts +14 -0
- package/dist/errors.js +18 -0
- package/dist/errors.js.map +1 -1
- package/dist/findings/schema.d.ts +44 -6
- package/dist/findings/schema.js +39 -3
- package/dist/findings/schema.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/main.js +4 -82
- package/dist/main.js.map +1 -1
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/tools/describe.d.ts +5 -4
- package/dist/mcp/tools/describe.js +14 -10
- package/dist/mcp/tools/describe.js.map +1 -1
- package/dist/mcp/tools/end-session.d.ts +3 -1
- package/dist/mcp/tools/end-session.js +7 -3
- package/dist/mcp/tools/end-session.js.map +1 -1
- package/dist/mcp/tools/output.d.ts +5 -4
- package/dist/mcp/tools/output.js +10 -2
- package/dist/mcp/tools/output.js.map +1 -1
- package/dist/mcp/tools/result.d.ts +10 -1
- package/dist/mcp/tools/result.js +8 -6
- package/dist/mcp/tools/result.js.map +1 -1
- package/dist/mcp/tools/start-debug.js +7 -5
- package/dist/mcp/tools/start-debug.js.map +1 -1
- package/dist/redact.d.ts +28 -0
- package/dist/redact.js +51 -0
- package/dist/redact.js.map +1 -0
- package/dist/services/catalog.d.ts +28 -0
- package/dist/services/catalog.js +65 -0
- package/dist/services/catalog.js.map +1 -0
- package/dist/services/debug-api.d.ts +172 -0
- package/dist/services/debug-api.js +9 -0
- package/dist/services/debug-api.js.map +1 -0
- package/dist/services/debug-service.d.ts +25 -173
- package/dist/services/debug-service.js +108 -175
- package/dist/services/debug-service.js.map +1 -1
- package/dist/services/login.d.ts +7 -2
- package/dist/services/login.js +203 -29
- package/dist/services/login.js.map +1 -1
- package/dist/services/retained-snapshot.d.ts +36 -0
- package/dist/services/retained-snapshot.js +63 -0
- package/dist/services/retained-snapshot.js.map +1 -0
- package/dist/services/session-builder.d.ts +26 -0
- package/dist/services/session-builder.js +46 -19
- package/dist/services/session-builder.js.map +1 -1
- package/dist/services/start-guards.d.ts +32 -0
- package/dist/services/start-guards.js +50 -0
- package/dist/services/start-guards.js.map +1 -0
- package/dist/services/summarize.d.ts +12 -3
- package/dist/services/summarize.js +13 -5
- package/dist/services/summarize.js.map +1 -1
- package/dist/session/cleanup.js.map +1 -1
- package/dist/session/findings-store.d.ts +2 -1
- package/dist/session/findings-store.js +30 -2
- package/dist/session/findings-store.js.map +1 -1
- package/dist/session/live-pointer.d.ts +19 -0
- package/dist/session/live-pointer.js +41 -0
- package/dist/session/live-pointer.js.map +1 -0
- package/dist/session/manager.d.ts +11 -1
- package/dist/session/manager.js +46 -2
- package/dist/session/manager.js.map +1 -1
- package/dist/session/owner-lock.d.ts +208 -0
- package/dist/session/owner-lock.js +499 -0
- package/dist/session/owner-lock.js.map +1 -0
- package/dist/session/process-identity.js.map +1 -1
- package/dist/session/session.js +61 -7
- package/dist/session/session.js.map +1 -1
- package/dist/session/state-file.d.ts +74 -14
- package/dist/session/state-file.js +203 -21
- package/dist/session/state-file.js.map +1 -1
- package/package.json +7 -7
- package/dist/adapters/android/android-adapter.test-helpers.d.ts +0 -52
- package/dist/adapters/android/android-adapter.test-helpers.js +0 -115
- package/dist/adapters/android/android-adapter.test-helpers.js.map +0 -1
- package/dist/mcp/server.test-helpers.d.ts +0 -23
- package/dist/mcp/server.test-helpers.js +0 -49
- package/dist/mcp/server.test-helpers.js.map +0 -1
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
import type { LanguageModel, ModelMessage } from 'ai';
|
|
22
22
|
import { z } from 'zod';
|
|
23
23
|
import type { Adapter } from '../../adapters/contract.js';
|
|
24
|
+
import type { ActTrail } from './trail.js';
|
|
24
25
|
/** `look` input — both optional: ask a `question`, and/or state the `expect`ed look. */
|
|
25
26
|
export declare const LookInputSchema: z.ZodObject<{
|
|
26
27
|
question: z.ZodOptional<z.ZodString>;
|
|
@@ -32,9 +33,9 @@ declare const LookIssueSchema: z.ZodObject<{
|
|
|
32
33
|
what: z.ZodString;
|
|
33
34
|
where: z.ZodString;
|
|
34
35
|
severity: z.ZodEnum<{
|
|
36
|
+
high: "high";
|
|
35
37
|
low: "low";
|
|
36
38
|
medium: "medium";
|
|
37
|
-
high: "high";
|
|
38
39
|
}>;
|
|
39
40
|
}, z.core.$strip>;
|
|
40
41
|
export type LookIssue = z.infer<typeof LookIssueSchema>;
|
|
@@ -46,9 +47,9 @@ declare const VisionReplySchema: z.ZodObject<{
|
|
|
46
47
|
what: z.ZodString;
|
|
47
48
|
where: z.ZodString;
|
|
48
49
|
severity: z.ZodEnum<{
|
|
50
|
+
high: "high";
|
|
49
51
|
low: "low";
|
|
50
52
|
medium: "medium";
|
|
51
|
-
high: "high";
|
|
52
53
|
}>;
|
|
53
54
|
}, z.core.$strip>>>;
|
|
54
55
|
}, z.core.$strip>;
|
|
@@ -85,19 +86,19 @@ export interface EvidenceRecorder {
|
|
|
85
86
|
* Pins the reply to the exact JSON `look` parses, so any competent multimodal
|
|
86
87
|
* model behaves the same (never relies on a 3rd-party default).
|
|
87
88
|
*/
|
|
88
|
-
export declare const VISION_SYSTEM_PROMPT
|
|
89
|
+
export declare const VISION_SYSTEM_PROMPT: string;
|
|
89
90
|
/** Whether a provider error says the vision model rejected image input (text-only model). */
|
|
90
91
|
export declare function isImageRejection(message: string): boolean;
|
|
91
92
|
/** The latched, actionable message the driver gets when the vision model is text-only. */
|
|
92
93
|
export declare function visionUnavailableMessage(modelId: string, providerMessage: string): string;
|
|
93
|
-
export declare function runLook(adapter: Adapter, generate: VisionGenerate, recorder: EvidenceRecorder, input: LookInput, abortSignal?: AbortSignal): Promise<LookResult>;
|
|
94
|
+
export declare function runLook(adapter: Adapter, generate: VisionGenerate, recorder: EvidenceRecorder, input: LookInput, abortSignal?: AbortSignal, notes?: readonly string[]): Promise<LookResult>;
|
|
94
95
|
/**
|
|
95
96
|
* Build `look`'s execute closure with the vision-unavailable latch: once a call
|
|
96
97
|
* dies on {@link VisionUnavailableError} (text-only vision model), every later
|
|
97
98
|
* call fails fast with the same guidance — no screenshot, no provider round-trip.
|
|
98
99
|
* Exported apart from the `tool()` wrapper so the latch unit-tests against fakes.
|
|
99
100
|
*/
|
|
100
|
-
export declare function createLookExecute(adapter: Adapter, generate: VisionGenerate, recorder: EvidenceRecorder): (input: LookInput, abortSignal?: AbortSignal) => Promise<LookResult>;
|
|
101
|
+
export declare function createLookExecute(adapter: Adapter, generate: VisionGenerate, recorder: EvidenceRecorder, notes?: readonly string[]): (input: LookInput, abortSignal?: AbortSignal) => Promise<LookResult>;
|
|
101
102
|
/** Self-look output: the saved evidence plus the frame itself (base64) for the driver's own eyes. */
|
|
102
103
|
export interface SelfLookResult {
|
|
103
104
|
/** Path to the screenshot saved as evidence. */
|
|
@@ -122,13 +123,469 @@ export interface SelfLookResult {
|
|
|
122
123
|
* repeated looks never stack images in the re-sent history — only the newest frame
|
|
123
124
|
* stays live.
|
|
124
125
|
*/
|
|
125
|
-
export declare function createSelfLookTool(adapter: Adapter, recorder: EvidenceRecorder):
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
}
|
|
126
|
+
export declare function createSelfLookTool(adapter: Adapter, recorder: EvidenceRecorder): ({
|
|
127
|
+
deferLoading?: boolean;
|
|
128
|
+
title?: string;
|
|
129
|
+
providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
|
|
130
|
+
metadata?: import("@ai-sdk/provider").JSONObject;
|
|
131
|
+
inputSchema: import("ai").FlexibleSchema<{
|
|
132
|
+
question?: string | undefined;
|
|
133
|
+
expect?: string | undefined;
|
|
134
|
+
}>;
|
|
135
|
+
contextSchema?: import("ai").FlexibleSchema<import("@ai-sdk/provider-utils").Context> | undefined;
|
|
136
|
+
needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
|
|
137
|
+
question?: string | undefined;
|
|
138
|
+
expect?: string | undefined;
|
|
139
|
+
}, NoInfer<import("@ai-sdk/provider-utils").Context>> | undefined;
|
|
140
|
+
onInputStart?: ((options: import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
|
|
141
|
+
onInputDelta?: ((options: {
|
|
142
|
+
inputTextDelta: string;
|
|
143
|
+
} & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
|
|
144
|
+
onInputAvailable?: ((options: {
|
|
145
|
+
input: {
|
|
146
|
+
question?: string | undefined;
|
|
147
|
+
expect?: string | undefined;
|
|
148
|
+
};
|
|
149
|
+
} & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
|
|
150
|
+
toModelOutput?: ((options: {
|
|
151
|
+
toolCallId: string;
|
|
152
|
+
input: {
|
|
153
|
+
question?: string | undefined;
|
|
154
|
+
expect?: string | undefined;
|
|
155
|
+
};
|
|
156
|
+
output: NoInfer<SelfLookResult>;
|
|
157
|
+
}) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
|
|
158
|
+
} & {
|
|
159
|
+
outputSchema?: import("ai").FlexibleSchema<SelfLookResult> | undefined;
|
|
160
|
+
execute: import("ai").ToolExecuteFunction<{
|
|
161
|
+
question?: string | undefined;
|
|
162
|
+
expect?: string | undefined;
|
|
163
|
+
}, SelfLookResult, NoInfer<import("@ai-sdk/provider-utils").Context>>;
|
|
164
|
+
} & {
|
|
165
|
+
description?: string | ((options: {
|
|
166
|
+
context: NoInfer<import("@ai-sdk/provider-utils").Context>;
|
|
167
|
+
experimental_sandbox?: import("ai").Experimental_SandboxSession;
|
|
168
|
+
}) => string) | undefined;
|
|
169
|
+
strict?: boolean;
|
|
170
|
+
inputExamples?: {
|
|
171
|
+
input: NoInfer<{
|
|
172
|
+
question?: string | undefined;
|
|
173
|
+
expect?: string | undefined;
|
|
174
|
+
}>;
|
|
175
|
+
}[] | undefined;
|
|
176
|
+
id?: never;
|
|
177
|
+
isProviderExecuted?: never;
|
|
178
|
+
args?: never;
|
|
179
|
+
supportsDeferredResults?: never;
|
|
180
|
+
} & {
|
|
181
|
+
type?: undefined | 'function';
|
|
182
|
+
} & {
|
|
183
|
+
execute: import("ai").ToolExecuteFunction<{
|
|
184
|
+
question?: string | undefined;
|
|
185
|
+
expect?: string | undefined;
|
|
186
|
+
}, SelfLookResult, NoInfer<import("@ai-sdk/provider-utils").Context>>;
|
|
187
|
+
}) | ({
|
|
188
|
+
deferLoading?: boolean;
|
|
189
|
+
title?: string;
|
|
190
|
+
providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
|
|
191
|
+
metadata?: import("@ai-sdk/provider").JSONObject;
|
|
192
|
+
inputSchema: import("ai").FlexibleSchema<{
|
|
193
|
+
question?: string | undefined;
|
|
194
|
+
expect?: string | undefined;
|
|
195
|
+
}>;
|
|
196
|
+
contextSchema?: import("ai").FlexibleSchema<import("@ai-sdk/provider-utils").Context> | undefined;
|
|
197
|
+
needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
|
|
198
|
+
question?: string | undefined;
|
|
199
|
+
expect?: string | undefined;
|
|
200
|
+
}, NoInfer<import("@ai-sdk/provider-utils").Context>> | undefined;
|
|
201
|
+
onInputStart?: ((options: import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
|
|
202
|
+
onInputDelta?: ((options: {
|
|
203
|
+
inputTextDelta: string;
|
|
204
|
+
} & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
|
|
205
|
+
onInputAvailable?: ((options: {
|
|
206
|
+
input: {
|
|
207
|
+
question?: string | undefined;
|
|
208
|
+
expect?: string | undefined;
|
|
209
|
+
};
|
|
210
|
+
} & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
|
|
211
|
+
toModelOutput?: ((options: {
|
|
212
|
+
toolCallId: string;
|
|
213
|
+
input: {
|
|
214
|
+
question?: string | undefined;
|
|
215
|
+
expect?: string | undefined;
|
|
216
|
+
};
|
|
217
|
+
output: NoInfer<SelfLookResult>;
|
|
218
|
+
}) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
|
|
219
|
+
} & {
|
|
220
|
+
outputSchema?: import("ai").FlexibleSchema<SelfLookResult> | undefined;
|
|
221
|
+
execute: import("ai").ToolExecuteFunction<{
|
|
222
|
+
question?: string | undefined;
|
|
223
|
+
expect?: string | undefined;
|
|
224
|
+
}, SelfLookResult, NoInfer<import("@ai-sdk/provider-utils").Context>>;
|
|
225
|
+
} & {
|
|
226
|
+
description?: string | ((options: {
|
|
227
|
+
context: NoInfer<import("@ai-sdk/provider-utils").Context>;
|
|
228
|
+
experimental_sandbox?: import("ai").Experimental_SandboxSession;
|
|
229
|
+
}) => string) | undefined;
|
|
230
|
+
strict?: boolean;
|
|
231
|
+
inputExamples?: {
|
|
232
|
+
input: NoInfer<{
|
|
233
|
+
question?: string | undefined;
|
|
234
|
+
expect?: string | undefined;
|
|
235
|
+
}>;
|
|
236
|
+
}[] | undefined;
|
|
237
|
+
id?: never;
|
|
238
|
+
isProviderExecuted?: never;
|
|
239
|
+
args?: never;
|
|
240
|
+
supportsDeferredResults?: never;
|
|
241
|
+
} & {
|
|
242
|
+
type: 'dynamic';
|
|
243
|
+
} & {
|
|
244
|
+
execute: import("ai").ToolExecuteFunction<{
|
|
245
|
+
question?: string | undefined;
|
|
246
|
+
expect?: string | undefined;
|
|
247
|
+
}, SelfLookResult, NoInfer<import("@ai-sdk/provider-utils").Context>>;
|
|
248
|
+
}) | ({
|
|
249
|
+
deferLoading?: boolean;
|
|
250
|
+
title?: string;
|
|
251
|
+
providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
|
|
252
|
+
metadata?: import("@ai-sdk/provider").JSONObject;
|
|
253
|
+
inputSchema: import("ai").FlexibleSchema<{
|
|
254
|
+
question?: string | undefined;
|
|
255
|
+
expect?: string | undefined;
|
|
256
|
+
}>;
|
|
257
|
+
contextSchema?: import("ai").FlexibleSchema<import("@ai-sdk/provider-utils").Context> | undefined;
|
|
258
|
+
needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
|
|
259
|
+
question?: string | undefined;
|
|
260
|
+
expect?: string | undefined;
|
|
261
|
+
}, NoInfer<import("@ai-sdk/provider-utils").Context>> | undefined;
|
|
262
|
+
onInputStart?: ((options: import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
|
|
263
|
+
onInputDelta?: ((options: {
|
|
264
|
+
inputTextDelta: string;
|
|
265
|
+
} & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
|
|
266
|
+
onInputAvailable?: ((options: {
|
|
267
|
+
input: {
|
|
268
|
+
question?: string | undefined;
|
|
269
|
+
expect?: string | undefined;
|
|
270
|
+
};
|
|
271
|
+
} & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
|
|
272
|
+
toModelOutput?: ((options: {
|
|
273
|
+
toolCallId: string;
|
|
274
|
+
input: {
|
|
275
|
+
question?: string | undefined;
|
|
276
|
+
expect?: string | undefined;
|
|
277
|
+
};
|
|
278
|
+
output: NoInfer<SelfLookResult>;
|
|
279
|
+
}) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
|
|
280
|
+
} & {
|
|
281
|
+
outputSchema?: import("ai").FlexibleSchema<SelfLookResult> | undefined;
|
|
282
|
+
execute: import("ai").ToolExecuteFunction<{
|
|
283
|
+
question?: string | undefined;
|
|
284
|
+
expect?: string | undefined;
|
|
285
|
+
}, SelfLookResult, NoInfer<import("@ai-sdk/provider-utils").Context>>;
|
|
286
|
+
} & {
|
|
287
|
+
type: 'provider';
|
|
288
|
+
id: `${string}.${string}`;
|
|
289
|
+
args: Record<string, unknown>;
|
|
290
|
+
description?: never;
|
|
291
|
+
strict?: never;
|
|
292
|
+
inputExamples?: never;
|
|
293
|
+
} & {
|
|
294
|
+
isProviderExecuted: false;
|
|
295
|
+
supportsDeferredResults?: never;
|
|
296
|
+
} & {
|
|
297
|
+
execute: import("ai").ToolExecuteFunction<{
|
|
298
|
+
question?: string | undefined;
|
|
299
|
+
expect?: string | undefined;
|
|
300
|
+
}, SelfLookResult, NoInfer<import("@ai-sdk/provider-utils").Context>>;
|
|
301
|
+
}) | ({
|
|
302
|
+
deferLoading?: boolean;
|
|
303
|
+
title?: string;
|
|
304
|
+
providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
|
|
305
|
+
metadata?: import("@ai-sdk/provider").JSONObject;
|
|
306
|
+
inputSchema: import("ai").FlexibleSchema<{
|
|
307
|
+
question?: string | undefined;
|
|
308
|
+
expect?: string | undefined;
|
|
309
|
+
}>;
|
|
310
|
+
contextSchema?: import("ai").FlexibleSchema<import("@ai-sdk/provider-utils").Context> | undefined;
|
|
311
|
+
needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
|
|
312
|
+
question?: string | undefined;
|
|
313
|
+
expect?: string | undefined;
|
|
314
|
+
}, NoInfer<import("@ai-sdk/provider-utils").Context>> | undefined;
|
|
315
|
+
onInputStart?: ((options: import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
|
|
316
|
+
onInputDelta?: ((options: {
|
|
317
|
+
inputTextDelta: string;
|
|
318
|
+
} & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
|
|
319
|
+
onInputAvailable?: ((options: {
|
|
320
|
+
input: {
|
|
321
|
+
question?: string | undefined;
|
|
322
|
+
expect?: string | undefined;
|
|
323
|
+
};
|
|
324
|
+
} & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
|
|
325
|
+
toModelOutput?: ((options: {
|
|
326
|
+
toolCallId: string;
|
|
327
|
+
input: {
|
|
328
|
+
question?: string | undefined;
|
|
329
|
+
expect?: string | undefined;
|
|
330
|
+
};
|
|
331
|
+
output: NoInfer<SelfLookResult>;
|
|
332
|
+
}) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
|
|
333
|
+
} & {
|
|
334
|
+
outputSchema?: import("ai").FlexibleSchema<SelfLookResult> | undefined;
|
|
335
|
+
execute: import("ai").ToolExecuteFunction<{
|
|
336
|
+
question?: string | undefined;
|
|
337
|
+
expect?: string | undefined;
|
|
338
|
+
}, SelfLookResult, NoInfer<import("@ai-sdk/provider-utils").Context>>;
|
|
339
|
+
} & {
|
|
340
|
+
type: 'provider';
|
|
341
|
+
id: `${string}.${string}`;
|
|
342
|
+
args: Record<string, unknown>;
|
|
343
|
+
description?: never;
|
|
344
|
+
strict?: never;
|
|
345
|
+
inputExamples?: never;
|
|
346
|
+
} & {
|
|
347
|
+
isProviderExecuted: true;
|
|
348
|
+
supportsDeferredResults?: boolean;
|
|
349
|
+
} & {
|
|
350
|
+
execute: import("ai").ToolExecuteFunction<{
|
|
351
|
+
question?: string | undefined;
|
|
352
|
+
expect?: string | undefined;
|
|
353
|
+
}, SelfLookResult, NoInfer<import("@ai-sdk/provider-utils").Context>>;
|
|
354
|
+
});
|
|
355
|
+
/**
|
|
356
|
+
* Build the `look` tool bound to one adapter + vision model + recorder, for the belt.
|
|
357
|
+
* `trail` (when wired by the loop) is the run's evidence trail: every issue the
|
|
358
|
+
* vision guy flags is recorded there — with the frame it was judged on — BEFORE
|
|
359
|
+
* the gate releases, so a `report` racing in the SAME step carries it even when
|
|
360
|
+
* the driver's own `visual` array omits it. The trail dedupes repeats.
|
|
361
|
+
*/
|
|
362
|
+
export declare function createLookTool(adapter: Adapter, vision: LanguageModel, recorder: EvidenceRecorder, trail?: ActTrail, notes?: readonly string[]): ({
|
|
363
|
+
deferLoading?: boolean;
|
|
364
|
+
title?: string;
|
|
365
|
+
providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
|
|
366
|
+
metadata?: import("@ai-sdk/provider").JSONObject;
|
|
367
|
+
inputSchema: import("ai").FlexibleSchema<{
|
|
368
|
+
question?: string | undefined;
|
|
369
|
+
expect?: string | undefined;
|
|
370
|
+
}>;
|
|
371
|
+
contextSchema?: import("ai").FlexibleSchema<import("@ai-sdk/provider-utils").Context> | undefined;
|
|
372
|
+
needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
|
|
373
|
+
question?: string | undefined;
|
|
374
|
+
expect?: string | undefined;
|
|
375
|
+
}, NoInfer<import("@ai-sdk/provider-utils").Context>> | undefined;
|
|
376
|
+
onInputStart?: ((options: import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
|
|
377
|
+
onInputDelta?: ((options: {
|
|
378
|
+
inputTextDelta: string;
|
|
379
|
+
} & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
|
|
380
|
+
onInputAvailable?: ((options: {
|
|
381
|
+
input: {
|
|
382
|
+
question?: string | undefined;
|
|
383
|
+
expect?: string | undefined;
|
|
384
|
+
};
|
|
385
|
+
} & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
|
|
386
|
+
toModelOutput?: ((options: {
|
|
387
|
+
toolCallId: string;
|
|
388
|
+
input: {
|
|
389
|
+
question?: string | undefined;
|
|
390
|
+
expect?: string | undefined;
|
|
391
|
+
};
|
|
392
|
+
output: NoInfer<LookResult>;
|
|
393
|
+
}) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
|
|
394
|
+
} & {
|
|
395
|
+
outputSchema?: import("ai").FlexibleSchema<LookResult> | undefined;
|
|
396
|
+
execute: import("ai").ToolExecuteFunction<{
|
|
397
|
+
question?: string | undefined;
|
|
398
|
+
expect?: string | undefined;
|
|
399
|
+
}, LookResult, NoInfer<import("@ai-sdk/provider-utils").Context>>;
|
|
400
|
+
} & {
|
|
401
|
+
description?: string | ((options: {
|
|
402
|
+
context: NoInfer<import("@ai-sdk/provider-utils").Context>;
|
|
403
|
+
experimental_sandbox?: import("ai").Experimental_SandboxSession;
|
|
404
|
+
}) => string) | undefined;
|
|
405
|
+
strict?: boolean;
|
|
406
|
+
inputExamples?: {
|
|
407
|
+
input: NoInfer<{
|
|
408
|
+
question?: string | undefined;
|
|
409
|
+
expect?: string | undefined;
|
|
410
|
+
}>;
|
|
411
|
+
}[] | undefined;
|
|
412
|
+
id?: never;
|
|
413
|
+
isProviderExecuted?: never;
|
|
414
|
+
args?: never;
|
|
415
|
+
supportsDeferredResults?: never;
|
|
416
|
+
} & {
|
|
417
|
+
type?: undefined | 'function';
|
|
418
|
+
} & {
|
|
419
|
+
execute: import("ai").ToolExecuteFunction<{
|
|
420
|
+
question?: string | undefined;
|
|
421
|
+
expect?: string | undefined;
|
|
422
|
+
}, LookResult, NoInfer<import("@ai-sdk/provider-utils").Context>>;
|
|
423
|
+
}) | ({
|
|
424
|
+
deferLoading?: boolean;
|
|
425
|
+
title?: string;
|
|
426
|
+
providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
|
|
427
|
+
metadata?: import("@ai-sdk/provider").JSONObject;
|
|
428
|
+
inputSchema: import("ai").FlexibleSchema<{
|
|
429
|
+
question?: string | undefined;
|
|
430
|
+
expect?: string | undefined;
|
|
431
|
+
}>;
|
|
432
|
+
contextSchema?: import("ai").FlexibleSchema<import("@ai-sdk/provider-utils").Context> | undefined;
|
|
433
|
+
needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
|
|
434
|
+
question?: string | undefined;
|
|
435
|
+
expect?: string | undefined;
|
|
436
|
+
}, NoInfer<import("@ai-sdk/provider-utils").Context>> | undefined;
|
|
437
|
+
onInputStart?: ((options: import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
|
|
438
|
+
onInputDelta?: ((options: {
|
|
439
|
+
inputTextDelta: string;
|
|
440
|
+
} & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
|
|
441
|
+
onInputAvailable?: ((options: {
|
|
442
|
+
input: {
|
|
443
|
+
question?: string | undefined;
|
|
444
|
+
expect?: string | undefined;
|
|
445
|
+
};
|
|
446
|
+
} & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
|
|
447
|
+
toModelOutput?: ((options: {
|
|
448
|
+
toolCallId: string;
|
|
449
|
+
input: {
|
|
450
|
+
question?: string | undefined;
|
|
451
|
+
expect?: string | undefined;
|
|
452
|
+
};
|
|
453
|
+
output: NoInfer<LookResult>;
|
|
454
|
+
}) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
|
|
455
|
+
} & {
|
|
456
|
+
outputSchema?: import("ai").FlexibleSchema<LookResult> | undefined;
|
|
457
|
+
execute: import("ai").ToolExecuteFunction<{
|
|
458
|
+
question?: string | undefined;
|
|
459
|
+
expect?: string | undefined;
|
|
460
|
+
}, LookResult, NoInfer<import("@ai-sdk/provider-utils").Context>>;
|
|
461
|
+
} & {
|
|
462
|
+
description?: string | ((options: {
|
|
463
|
+
context: NoInfer<import("@ai-sdk/provider-utils").Context>;
|
|
464
|
+
experimental_sandbox?: import("ai").Experimental_SandboxSession;
|
|
465
|
+
}) => string) | undefined;
|
|
466
|
+
strict?: boolean;
|
|
467
|
+
inputExamples?: {
|
|
468
|
+
input: NoInfer<{
|
|
469
|
+
question?: string | undefined;
|
|
470
|
+
expect?: string | undefined;
|
|
471
|
+
}>;
|
|
472
|
+
}[] | undefined;
|
|
473
|
+
id?: never;
|
|
474
|
+
isProviderExecuted?: never;
|
|
475
|
+
args?: never;
|
|
476
|
+
supportsDeferredResults?: never;
|
|
477
|
+
} & {
|
|
478
|
+
type: 'dynamic';
|
|
479
|
+
} & {
|
|
480
|
+
execute: import("ai").ToolExecuteFunction<{
|
|
481
|
+
question?: string | undefined;
|
|
482
|
+
expect?: string | undefined;
|
|
483
|
+
}, LookResult, NoInfer<import("@ai-sdk/provider-utils").Context>>;
|
|
484
|
+
}) | ({
|
|
485
|
+
deferLoading?: boolean;
|
|
486
|
+
title?: string;
|
|
487
|
+
providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
|
|
488
|
+
metadata?: import("@ai-sdk/provider").JSONObject;
|
|
489
|
+
inputSchema: import("ai").FlexibleSchema<{
|
|
490
|
+
question?: string | undefined;
|
|
491
|
+
expect?: string | undefined;
|
|
492
|
+
}>;
|
|
493
|
+
contextSchema?: import("ai").FlexibleSchema<import("@ai-sdk/provider-utils").Context> | undefined;
|
|
494
|
+
needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
|
|
495
|
+
question?: string | undefined;
|
|
496
|
+
expect?: string | undefined;
|
|
497
|
+
}, NoInfer<import("@ai-sdk/provider-utils").Context>> | undefined;
|
|
498
|
+
onInputStart?: ((options: import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
|
|
499
|
+
onInputDelta?: ((options: {
|
|
500
|
+
inputTextDelta: string;
|
|
501
|
+
} & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
|
|
502
|
+
onInputAvailable?: ((options: {
|
|
503
|
+
input: {
|
|
504
|
+
question?: string | undefined;
|
|
505
|
+
expect?: string | undefined;
|
|
506
|
+
};
|
|
507
|
+
} & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
|
|
508
|
+
toModelOutput?: ((options: {
|
|
509
|
+
toolCallId: string;
|
|
510
|
+
input: {
|
|
511
|
+
question?: string | undefined;
|
|
512
|
+
expect?: string | undefined;
|
|
513
|
+
};
|
|
514
|
+
output: NoInfer<LookResult>;
|
|
515
|
+
}) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
|
|
516
|
+
} & {
|
|
517
|
+
outputSchema?: import("ai").FlexibleSchema<LookResult> | undefined;
|
|
518
|
+
execute: import("ai").ToolExecuteFunction<{
|
|
519
|
+
question?: string | undefined;
|
|
520
|
+
expect?: string | undefined;
|
|
521
|
+
}, LookResult, NoInfer<import("@ai-sdk/provider-utils").Context>>;
|
|
522
|
+
} & {
|
|
523
|
+
type: 'provider';
|
|
524
|
+
id: `${string}.${string}`;
|
|
525
|
+
args: Record<string, unknown>;
|
|
526
|
+
description?: never;
|
|
527
|
+
strict?: never;
|
|
528
|
+
inputExamples?: never;
|
|
529
|
+
} & {
|
|
530
|
+
isProviderExecuted: false;
|
|
531
|
+
supportsDeferredResults?: never;
|
|
532
|
+
} & {
|
|
533
|
+
execute: import("ai").ToolExecuteFunction<{
|
|
534
|
+
question?: string | undefined;
|
|
535
|
+
expect?: string | undefined;
|
|
536
|
+
}, LookResult, NoInfer<import("@ai-sdk/provider-utils").Context>>;
|
|
537
|
+
}) | ({
|
|
538
|
+
deferLoading?: boolean;
|
|
539
|
+
title?: string;
|
|
540
|
+
providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
|
|
541
|
+
metadata?: import("@ai-sdk/provider").JSONObject;
|
|
542
|
+
inputSchema: import("ai").FlexibleSchema<{
|
|
543
|
+
question?: string | undefined;
|
|
544
|
+
expect?: string | undefined;
|
|
545
|
+
}>;
|
|
546
|
+
contextSchema?: import("ai").FlexibleSchema<import("@ai-sdk/provider-utils").Context> | undefined;
|
|
547
|
+
needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
|
|
548
|
+
question?: string | undefined;
|
|
549
|
+
expect?: string | undefined;
|
|
550
|
+
}, NoInfer<import("@ai-sdk/provider-utils").Context>> | undefined;
|
|
551
|
+
onInputStart?: ((options: import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
|
|
552
|
+
onInputDelta?: ((options: {
|
|
553
|
+
inputTextDelta: string;
|
|
554
|
+
} & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
|
|
555
|
+
onInputAvailable?: ((options: {
|
|
556
|
+
input: {
|
|
557
|
+
question?: string | undefined;
|
|
558
|
+
expect?: string | undefined;
|
|
559
|
+
};
|
|
560
|
+
} & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
|
|
561
|
+
toModelOutput?: ((options: {
|
|
562
|
+
toolCallId: string;
|
|
563
|
+
input: {
|
|
564
|
+
question?: string | undefined;
|
|
565
|
+
expect?: string | undefined;
|
|
566
|
+
};
|
|
567
|
+
output: NoInfer<LookResult>;
|
|
568
|
+
}) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
|
|
569
|
+
} & {
|
|
570
|
+
outputSchema?: import("ai").FlexibleSchema<LookResult> | undefined;
|
|
571
|
+
execute: import("ai").ToolExecuteFunction<{
|
|
572
|
+
question?: string | undefined;
|
|
573
|
+
expect?: string | undefined;
|
|
574
|
+
}, LookResult, NoInfer<import("@ai-sdk/provider-utils").Context>>;
|
|
575
|
+
} & {
|
|
576
|
+
type: 'provider';
|
|
577
|
+
id: `${string}.${string}`;
|
|
578
|
+
args: Record<string, unknown>;
|
|
579
|
+
description?: never;
|
|
580
|
+
strict?: never;
|
|
581
|
+
inputExamples?: never;
|
|
582
|
+
} & {
|
|
583
|
+
isProviderExecuted: true;
|
|
584
|
+
supportsDeferredResults?: boolean;
|
|
585
|
+
} & {
|
|
586
|
+
execute: import("ai").ToolExecuteFunction<{
|
|
587
|
+
question?: string | undefined;
|
|
588
|
+
expect?: string | undefined;
|
|
589
|
+
}, LookResult, NoInfer<import("@ai-sdk/provider-utils").Context>>;
|
|
590
|
+
});
|
|
134
591
|
export {};
|