@nuvin/nuvin-core 2.0.0-rc.2 → 2.0.0-rc.3
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/dist/VERSION +2 -2
- package/dist/index.d.ts +358 -2
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/VERSION
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -292,7 +292,17 @@ type AskUserArgs = {
|
|
|
292
292
|
}>;
|
|
293
293
|
answers?: Record<string, string | string[]>;
|
|
294
294
|
};
|
|
295
|
-
type
|
|
295
|
+
type ComputerUseArgs = {
|
|
296
|
+
action: string;
|
|
297
|
+
ref?: number;
|
|
298
|
+
app?: string;
|
|
299
|
+
text?: string;
|
|
300
|
+
key?: string;
|
|
301
|
+
direction?: string;
|
|
302
|
+
amount?: number;
|
|
303
|
+
duration?: number;
|
|
304
|
+
};
|
|
305
|
+
type ToolArguments = BashToolArgs | FileReadArgs | FileEditArgs | FileNewArgs | LsArgs | GlobArgs | GrepArgs | WebSearchArgs | WebFetchArgs | TodoWriteArgs | AssignTaskArgs | AskUserArgs | ComputerUseArgs;
|
|
296
306
|
/**
|
|
297
307
|
* Type guard to safely parse tool arguments
|
|
298
308
|
*/
|
|
@@ -311,6 +321,7 @@ declare function isWebFetchArgs(args: ToolArguments): args is WebFetchArgs;
|
|
|
311
321
|
declare function isGlobArgs(args: ToolArguments): args is GlobArgs;
|
|
312
322
|
declare function isGrepArgs(args: ToolArguments): args is GrepArgs;
|
|
313
323
|
declare function isLsArgs(args: ToolArguments): args is LsArgs;
|
|
324
|
+
declare function isComputerUseArgs(args: ToolArguments): args is ComputerUseArgs;
|
|
314
325
|
type ToolParameterMap = {
|
|
315
326
|
bash_tool: BashToolArgs;
|
|
316
327
|
file_read: FileReadArgs;
|
|
@@ -323,6 +334,7 @@ type ToolParameterMap = {
|
|
|
323
334
|
web_fetch: WebFetchArgs;
|
|
324
335
|
todo_write: TodoWriteArgs;
|
|
325
336
|
assign_task: AssignTaskArgs;
|
|
337
|
+
computer: ComputerUseArgs;
|
|
326
338
|
};
|
|
327
339
|
type ToolName = keyof ToolParameterMap;
|
|
328
340
|
type TypedToolInvocation<T extends ToolName = ToolName> = {
|
|
@@ -464,6 +476,11 @@ type AskUserMetadata = {
|
|
|
464
476
|
questionCount: number;
|
|
465
477
|
answers: Record<string, string | string[]>;
|
|
466
478
|
};
|
|
479
|
+
type ComputerUseMetadata = {
|
|
480
|
+
action?: string;
|
|
481
|
+
width?: number;
|
|
482
|
+
height?: number;
|
|
483
|
+
};
|
|
467
484
|
type ToolErrorMetadata = {
|
|
468
485
|
errorReason?: ErrorReason;
|
|
469
486
|
editInstruction?: string;
|
|
@@ -486,6 +503,7 @@ type ToolMetadataMap = {
|
|
|
486
503
|
todo_write: TodoWriteMetadata;
|
|
487
504
|
assign_task: AssignTaskMetadata;
|
|
488
505
|
ask_user_tool: AskUserMetadata;
|
|
506
|
+
computer: ComputerUseMetadata;
|
|
489
507
|
};
|
|
490
508
|
|
|
491
509
|
type ToolCall = {
|
|
@@ -1745,6 +1763,11 @@ type ExecResultSuccess = {
|
|
|
1745
1763
|
type: 'json';
|
|
1746
1764
|
result: Record<string, unknown> | unknown[];
|
|
1747
1765
|
metadata?: Record<string, unknown>;
|
|
1766
|
+
} | {
|
|
1767
|
+
status: 'success';
|
|
1768
|
+
type: 'mixed';
|
|
1769
|
+
result: Array<TextContentPart | ImageContentPart>;
|
|
1770
|
+
metadata?: Record<string, unknown>;
|
|
1748
1771
|
};
|
|
1749
1772
|
type ExecResultError = {
|
|
1750
1773
|
status: 'error';
|
|
@@ -2318,6 +2341,284 @@ declare class BashTool implements FunctionTool<BashParams, ToolExecutionContext,
|
|
|
2318
2341
|
private shellArgs;
|
|
2319
2342
|
}
|
|
2320
2343
|
|
|
2344
|
+
type Coordinate = [x: number, y: number];
|
|
2345
|
+
type ScreenshotAction = {
|
|
2346
|
+
type: 'screenshot';
|
|
2347
|
+
};
|
|
2348
|
+
type LeftClickAction = {
|
|
2349
|
+
type: 'left_click';
|
|
2350
|
+
coordinate: Coordinate;
|
|
2351
|
+
};
|
|
2352
|
+
type RightClickAction = {
|
|
2353
|
+
type: 'right_click';
|
|
2354
|
+
coordinate: Coordinate;
|
|
2355
|
+
};
|
|
2356
|
+
type MiddleClickAction = {
|
|
2357
|
+
type: 'middle_click';
|
|
2358
|
+
coordinate: Coordinate;
|
|
2359
|
+
};
|
|
2360
|
+
type DoubleClickAction = {
|
|
2361
|
+
type: 'double_click';
|
|
2362
|
+
coordinate: Coordinate;
|
|
2363
|
+
};
|
|
2364
|
+
type TripleClickAction = {
|
|
2365
|
+
type: 'triple_click';
|
|
2366
|
+
coordinate: Coordinate;
|
|
2367
|
+
};
|
|
2368
|
+
type MouseMoveAction = {
|
|
2369
|
+
type: 'mouse_move';
|
|
2370
|
+
coordinate: Coordinate;
|
|
2371
|
+
};
|
|
2372
|
+
type LeftClickDragAction = {
|
|
2373
|
+
type: 'left_click_drag';
|
|
2374
|
+
startCoordinate: Coordinate;
|
|
2375
|
+
coordinate: Coordinate;
|
|
2376
|
+
};
|
|
2377
|
+
type TypeAction = {
|
|
2378
|
+
type: 'type';
|
|
2379
|
+
text: string;
|
|
2380
|
+
};
|
|
2381
|
+
type KeyAction = {
|
|
2382
|
+
type: 'key';
|
|
2383
|
+
key: string;
|
|
2384
|
+
};
|
|
2385
|
+
type ScrollAction = {
|
|
2386
|
+
type: 'scroll';
|
|
2387
|
+
coordinate: Coordinate;
|
|
2388
|
+
direction: 'up' | 'down' | 'left' | 'right';
|
|
2389
|
+
amount: number;
|
|
2390
|
+
};
|
|
2391
|
+
type WaitAction = {
|
|
2392
|
+
type: 'wait';
|
|
2393
|
+
duration?: number;
|
|
2394
|
+
};
|
|
2395
|
+
type ComputerAction = ScreenshotAction | LeftClickAction | RightClickAction | MiddleClickAction | DoubleClickAction | TripleClickAction | MouseMoveAction | LeftClickDragAction | TypeAction | KeyAction | ScrollAction | WaitAction;
|
|
2396
|
+
type ScreenshotResult = {
|
|
2397
|
+
type: 'screenshot';
|
|
2398
|
+
data: string;
|
|
2399
|
+
mimeType: string;
|
|
2400
|
+
width: number;
|
|
2401
|
+
height: number;
|
|
2402
|
+
scaleFactor: number;
|
|
2403
|
+
};
|
|
2404
|
+
type ComputerUseResult = {
|
|
2405
|
+
status: 'success';
|
|
2406
|
+
type: 'mixed';
|
|
2407
|
+
result: Array<TextContentPart | ImageContentPart>;
|
|
2408
|
+
metadata?: Record<string, unknown>;
|
|
2409
|
+
} | {
|
|
2410
|
+
status: 'success';
|
|
2411
|
+
type: 'text';
|
|
2412
|
+
result: string;
|
|
2413
|
+
metadata?: Record<string, unknown>;
|
|
2414
|
+
} | {
|
|
2415
|
+
status: 'error';
|
|
2416
|
+
type: 'text';
|
|
2417
|
+
result: string;
|
|
2418
|
+
metadata?: Record<string, unknown>;
|
|
2419
|
+
};
|
|
2420
|
+
type AXElement = {
|
|
2421
|
+
ref?: number;
|
|
2422
|
+
role: string;
|
|
2423
|
+
title?: string | null;
|
|
2424
|
+
desc?: string | null;
|
|
2425
|
+
value?: string | null;
|
|
2426
|
+
/** Full/leafOnly mode: raw AX action names */
|
|
2427
|
+
actions?: string[] | null;
|
|
2428
|
+
/** leafCompact mode: compacted action names (Name:foo\n... → "foo", AXPress → "Press") */
|
|
2429
|
+
act?: string[] | null;
|
|
2430
|
+
pos?: [number, number] | null;
|
|
2431
|
+
size?: [number, number] | null;
|
|
2432
|
+
/** leafCompact table/list containers: uniform row size hoisted from children */
|
|
2433
|
+
rowSize?: [number, number] | null;
|
|
2434
|
+
children?: AXElement[] | null;
|
|
2435
|
+
};
|
|
2436
|
+
type AXSnapshotResult = {
|
|
2437
|
+
snapshotId: string;
|
|
2438
|
+
app: string;
|
|
2439
|
+
window: string | null;
|
|
2440
|
+
elements: AXElement[];
|
|
2441
|
+
};
|
|
2442
|
+
type AXPressResult = {
|
|
2443
|
+
status: string;
|
|
2444
|
+
ref: number;
|
|
2445
|
+
method: string;
|
|
2446
|
+
x?: number;
|
|
2447
|
+
y?: number;
|
|
2448
|
+
};
|
|
2449
|
+
type AXSetValueResult = {
|
|
2450
|
+
status: string;
|
|
2451
|
+
ref: number;
|
|
2452
|
+
value?: string;
|
|
2453
|
+
note?: string;
|
|
2454
|
+
};
|
|
2455
|
+
type AXScrollResult = {
|
|
2456
|
+
status: string;
|
|
2457
|
+
ref: number;
|
|
2458
|
+
method: string;
|
|
2459
|
+
x?: number;
|
|
2460
|
+
y?: number;
|
|
2461
|
+
lines?: number;
|
|
2462
|
+
};
|
|
2463
|
+
type AnnotateResult = {
|
|
2464
|
+
data: string;
|
|
2465
|
+
mimeType: string;
|
|
2466
|
+
};
|
|
2467
|
+
type HintMode = 'full' | 'leafOnly' | 'leafCompact';
|
|
2468
|
+
type ScreenSize = {
|
|
2469
|
+
width: number;
|
|
2470
|
+
height: number;
|
|
2471
|
+
};
|
|
2472
|
+
type ClickButton = 'left' | 'right' | 'middle';
|
|
2473
|
+
interface ComputerBackend {
|
|
2474
|
+
/** Set by the tool before each execution for abort support. */
|
|
2475
|
+
signal?: AbortSignal;
|
|
2476
|
+
/**
|
|
2477
|
+
* Capture the current screen (or a specific window) and return base64-encoded PNG with dimensions.
|
|
2478
|
+
* If windowId is provided, captures only that window.
|
|
2479
|
+
*/
|
|
2480
|
+
screenshot(windowId?: number): Promise<ScreenshotResult>;
|
|
2481
|
+
/**
|
|
2482
|
+
* Perform a mouse click at the given coordinate.
|
|
2483
|
+
*/
|
|
2484
|
+
click(x: number, y: number, button: ClickButton, clickCount: number): Promise<void>;
|
|
2485
|
+
/**
|
|
2486
|
+
* Move the mouse cursor to the given coordinate without clicking.
|
|
2487
|
+
*/
|
|
2488
|
+
mouseMove(x: number, y: number): Promise<void>;
|
|
2489
|
+
/**
|
|
2490
|
+
* Click-drag from start to end coordinate using the left button.
|
|
2491
|
+
*/
|
|
2492
|
+
clickDrag(startX: number, startY: number, endX: number, endY: number): Promise<void>;
|
|
2493
|
+
/**
|
|
2494
|
+
* Type the given text using keyboard synthesis.
|
|
2495
|
+
*/
|
|
2496
|
+
typeText(text: string): Promise<void>;
|
|
2497
|
+
/**
|
|
2498
|
+
* Press a key or key combination (e.g. "Return", "ctrl+s", "cmd+shift+4").
|
|
2499
|
+
*/
|
|
2500
|
+
pressKey(key: string): Promise<void>;
|
|
2501
|
+
/**
|
|
2502
|
+
* Scroll at the given coordinate in the given direction by the given amount.
|
|
2503
|
+
*/
|
|
2504
|
+
scroll(x: number, y: number, direction: 'up' | 'down' | 'left' | 'right', amount: number): Promise<void>;
|
|
2505
|
+
/**
|
|
2506
|
+
* Return the current screen dimensions.
|
|
2507
|
+
*/
|
|
2508
|
+
getScreenSize(): Promise<ScreenSize>;
|
|
2509
|
+
/**
|
|
2510
|
+
* Capture the accessibility tree for the given app (or frontmost if omitted).
|
|
2511
|
+
*/
|
|
2512
|
+
/**
|
|
2513
|
+
* Bring the given application to the foreground.
|
|
2514
|
+
*/
|
|
2515
|
+
activateApp(appName: string): Promise<void>;
|
|
2516
|
+
axSnapshot(appName?: string, maxDepth?: number, maxElements?: number, hintMode?: HintMode): Promise<AXSnapshotResult>;
|
|
2517
|
+
/**
|
|
2518
|
+
* Press (activate) an element identified by its ref from the last snapshot.
|
|
2519
|
+
*/
|
|
2520
|
+
axPress(ref: number, snapshotId: string, method?: 'AXPress' | 'CGEvent' | 'auto'): Promise<AXPressResult>;
|
|
2521
|
+
/**
|
|
2522
|
+
* Scroll an element into view by its ref from the last snapshot.
|
|
2523
|
+
* Uses AXScrollToVisible with CGEvent fallback.
|
|
2524
|
+
*/
|
|
2525
|
+
axScroll(ref: number, snapshotId: string): Promise<AXScrollResult>;
|
|
2526
|
+
/**
|
|
2527
|
+
* Set the value of an element identified by its ref from the last snapshot.
|
|
2528
|
+
*/
|
|
2529
|
+
axSetValue(ref: number, snapshotId: string, value: string): Promise<AXSetValueResult>;
|
|
2530
|
+
/**
|
|
2531
|
+
* Return the list of currently running application names.
|
|
2532
|
+
*/
|
|
2533
|
+
listApps(): Promise<string[]>;
|
|
2534
|
+
/**
|
|
2535
|
+
* Get the CGWindowID for an app's frontmost on-screen window.
|
|
2536
|
+
* Used by screenshot() to capture a single window with `screencapture -l`.
|
|
2537
|
+
*/
|
|
2538
|
+
getWindowId(appName?: string): Promise<{
|
|
2539
|
+
windowId: number;
|
|
2540
|
+
bounds: {
|
|
2541
|
+
x: number;
|
|
2542
|
+
y: number;
|
|
2543
|
+
width: number;
|
|
2544
|
+
height: number;
|
|
2545
|
+
};
|
|
2546
|
+
}>;
|
|
2547
|
+
/**
|
|
2548
|
+
* Annotate a screenshot with ref hint badges from the AX tree.
|
|
2549
|
+
* Returns a new PNG with red ref-number pills overlaid on interactive elements.
|
|
2550
|
+
*/
|
|
2551
|
+
annotateScreenshot(elements: AXElement[], screenshotData: string, screenshotWidth: number, screenshotHeight: number, scaleFactor: number, windowOrigin?: {
|
|
2552
|
+
x: number;
|
|
2553
|
+
y: number;
|
|
2554
|
+
}): Promise<AnnotateResult>;
|
|
2555
|
+
}
|
|
2556
|
+
|
|
2557
|
+
type ComputerUseParams = {
|
|
2558
|
+
action: 'snapshot' | 'press' | 'set_value' | 'type' | 'key' | 'scroll' | 'screenshot' | 'wait' | 'list_apps' | 'annotated_screenshot';
|
|
2559
|
+
ref?: number;
|
|
2560
|
+
app?: string;
|
|
2561
|
+
text?: string;
|
|
2562
|
+
key?: string;
|
|
2563
|
+
direction?: 'up' | 'down' | 'left' | 'right';
|
|
2564
|
+
amount?: number;
|
|
2565
|
+
duration?: number;
|
|
2566
|
+
};
|
|
2567
|
+
declare class ComputerUseTool implements FunctionTool<ComputerUseParams, ToolExecutionContext, ComputerUseResult> {
|
|
2568
|
+
name: "computer";
|
|
2569
|
+
parameters: {
|
|
2570
|
+
readonly type: "object";
|
|
2571
|
+
readonly properties: {
|
|
2572
|
+
readonly action: {
|
|
2573
|
+
readonly type: "string";
|
|
2574
|
+
readonly enum: readonly ["snapshot", "press", "set_value", "type", "key", "scroll", "screenshot", "wait", "list_apps", "annotated_screenshot"];
|
|
2575
|
+
readonly description: "The action to perform. Use `snapshot` for text-only UI tree, `annotated_screenshot` for visual screenshot with ref hints overlaid (Vimium-style), then `press` or `set_value` to interact by ref.";
|
|
2576
|
+
};
|
|
2577
|
+
readonly ref: {
|
|
2578
|
+
readonly type: "integer";
|
|
2579
|
+
readonly description: "Element ref ID from the last snapshot (for press, set_value actions).";
|
|
2580
|
+
};
|
|
2581
|
+
readonly app: {
|
|
2582
|
+
readonly type: "string";
|
|
2583
|
+
readonly description: "Target app name (for snapshot, annotated_screenshot, screenshot). Omit to use the frontmost app.";
|
|
2584
|
+
};
|
|
2585
|
+
readonly text: {
|
|
2586
|
+
readonly type: "string";
|
|
2587
|
+
readonly description: "Text to type (for type action) or value to set (for set_value action).";
|
|
2588
|
+
};
|
|
2589
|
+
readonly key: {
|
|
2590
|
+
readonly type: "string";
|
|
2591
|
+
readonly description: "Key or combo to press (for key action). Examples: \"Return\", \"cmd+s\", \"ctrl+a\".";
|
|
2592
|
+
};
|
|
2593
|
+
readonly direction: {
|
|
2594
|
+
readonly type: "string";
|
|
2595
|
+
readonly enum: readonly ["up", "down", "left", "right"];
|
|
2596
|
+
readonly description: "Scroll direction (for scroll action).";
|
|
2597
|
+
};
|
|
2598
|
+
readonly amount: {
|
|
2599
|
+
readonly type: "integer";
|
|
2600
|
+
readonly minimum: 1;
|
|
2601
|
+
readonly description: "Scroll lines (for scroll action). Defaults to 3.";
|
|
2602
|
+
};
|
|
2603
|
+
readonly duration: {
|
|
2604
|
+
readonly type: "integer";
|
|
2605
|
+
readonly minimum: 0;
|
|
2606
|
+
readonly description: "Milliseconds to wait (for wait action). Defaults to 1000.";
|
|
2607
|
+
};
|
|
2608
|
+
};
|
|
2609
|
+
readonly required: readonly ["action"];
|
|
2610
|
+
};
|
|
2611
|
+
private readonly backend;
|
|
2612
|
+
/** Snapshot ID from the most recent `snapshot` call; required by press/set_value */
|
|
2613
|
+
private lastSnapshotId;
|
|
2614
|
+
/** App name from the most recent `snapshot` call; used to activate before type/key */
|
|
2615
|
+
private lastApp;
|
|
2616
|
+
constructor(backend?: ComputerBackend);
|
|
2617
|
+
definition(): ToolDefinition['function'];
|
|
2618
|
+
execute(params: ComputerUseParams, context?: ToolExecutionContext): Promise<ComputerUseResult>;
|
|
2619
|
+
private dispatch;
|
|
2620
|
+
}
|
|
2621
|
+
|
|
2321
2622
|
type ParseResult<T = unknown> = {
|
|
2322
2623
|
success: true;
|
|
2323
2624
|
data: T;
|
|
@@ -2420,6 +2721,32 @@ declare const grepToolSchema: z.ZodObject<{
|
|
|
2420
2721
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
2421
2722
|
description: z.ZodOptional<z.ZodString>;
|
|
2422
2723
|
}, z.core.$strip>;
|
|
2724
|
+
declare const computerToolSchema: z.ZodObject<{
|
|
2725
|
+
action: z.ZodEnum<{
|
|
2726
|
+
type: "type";
|
|
2727
|
+
snapshot: "snapshot";
|
|
2728
|
+
press: "press";
|
|
2729
|
+
set_value: "set_value";
|
|
2730
|
+
key: "key";
|
|
2731
|
+
scroll: "scroll";
|
|
2732
|
+
screenshot: "screenshot";
|
|
2733
|
+
wait: "wait";
|
|
2734
|
+
list_apps: "list_apps";
|
|
2735
|
+
annotated_screenshot: "annotated_screenshot";
|
|
2736
|
+
}>;
|
|
2737
|
+
ref: z.ZodOptional<z.ZodNumber>;
|
|
2738
|
+
app: z.ZodOptional<z.ZodString>;
|
|
2739
|
+
text: z.ZodOptional<z.ZodString>;
|
|
2740
|
+
key: z.ZodOptional<z.ZodString>;
|
|
2741
|
+
direction: z.ZodOptional<z.ZodEnum<{
|
|
2742
|
+
up: "up";
|
|
2743
|
+
down: "down";
|
|
2744
|
+
left: "left";
|
|
2745
|
+
right: "right";
|
|
2746
|
+
}>>;
|
|
2747
|
+
amount: z.ZodOptional<z.ZodNumber>;
|
|
2748
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
2749
|
+
}, z.core.$strip>;
|
|
2423
2750
|
declare const toolSchemas: {
|
|
2424
2751
|
readonly bash_tool: z.ZodObject<{
|
|
2425
2752
|
cmd: z.ZodPipe<z.ZodTransform<string, unknown>, z.ZodString>;
|
|
@@ -2506,6 +2833,32 @@ declare const toolSchemas: {
|
|
|
2506
2833
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
2507
2834
|
description: z.ZodOptional<z.ZodString>;
|
|
2508
2835
|
}, z.core.$strip>;
|
|
2836
|
+
readonly computer: z.ZodObject<{
|
|
2837
|
+
action: z.ZodEnum<{
|
|
2838
|
+
type: "type";
|
|
2839
|
+
snapshot: "snapshot";
|
|
2840
|
+
press: "press";
|
|
2841
|
+
set_value: "set_value";
|
|
2842
|
+
key: "key";
|
|
2843
|
+
scroll: "scroll";
|
|
2844
|
+
screenshot: "screenshot";
|
|
2845
|
+
wait: "wait";
|
|
2846
|
+
list_apps: "list_apps";
|
|
2847
|
+
annotated_screenshot: "annotated_screenshot";
|
|
2848
|
+
}>;
|
|
2849
|
+
ref: z.ZodOptional<z.ZodNumber>;
|
|
2850
|
+
app: z.ZodOptional<z.ZodString>;
|
|
2851
|
+
text: z.ZodOptional<z.ZodString>;
|
|
2852
|
+
key: z.ZodOptional<z.ZodString>;
|
|
2853
|
+
direction: z.ZodOptional<z.ZodEnum<{
|
|
2854
|
+
up: "up";
|
|
2855
|
+
down: "down";
|
|
2856
|
+
left: "left";
|
|
2857
|
+
right: "right";
|
|
2858
|
+
}>>;
|
|
2859
|
+
amount: z.ZodOptional<z.ZodNumber>;
|
|
2860
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
2861
|
+
}, z.core.$strip>;
|
|
2509
2862
|
};
|
|
2510
2863
|
declare function validateToolParams<T extends ToolName>(toolName: T, params: Record<string, unknown>): ValidationResult<ToolParameterMap[T]>;
|
|
2511
2864
|
declare const toolValidators: {
|
|
@@ -2520,6 +2873,7 @@ declare const toolValidators: {
|
|
|
2520
2873
|
assign_task: (params: Record<string, unknown>) => ValidationResult<AssignTaskArgs>;
|
|
2521
2874
|
glob_tool: (params: Record<string, unknown>) => ValidationResult<GlobArgs>;
|
|
2522
2875
|
grep_tool: (params: Record<string, unknown>) => ValidationResult<GrepArgs>;
|
|
2876
|
+
computer: (params: Record<string, unknown>) => ValidationResult<ComputerUseArgs>;
|
|
2523
2877
|
};
|
|
2524
2878
|
|
|
2525
2879
|
type ValidationError = {
|
|
@@ -2883,6 +3237,8 @@ declare function isTodoWriteResult(result: ToolExecutionResult): result is ToolE
|
|
|
2883
3237
|
declare function isTodoWriteSuccess(result: ToolExecutionResult): result is TodoWriteSuccessResult;
|
|
2884
3238
|
declare function isAssignResult(result: ToolExecutionResult): result is ToolExecutionResult;
|
|
2885
3239
|
declare function isAssignSuccess(result: ToolExecutionResult): result is AssignSuccessResult;
|
|
3240
|
+
declare function isComputerResult(result: ToolExecutionResult): result is ToolExecutionResult;
|
|
3241
|
+
declare function isComputerSuccess(result: ToolExecutionResult): result is ToolExecutionResult;
|
|
2886
3242
|
|
|
2887
3243
|
declare function okText<M extends Record<string, unknown> = Record<string, unknown>>(result: string, metadata: M): {
|
|
2888
3244
|
status: 'success';
|
|
@@ -3574,4 +3930,4 @@ declare function resolveBackspaces(s: string): string;
|
|
|
3574
3930
|
declare function stripAnsiAndControls(s: string): string;
|
|
3575
3931
|
declare function canonicalizeTerminalPaste(raw: string): string;
|
|
3576
3932
|
|
|
3577
|
-
export { AGENT_CREATOR_SYSTEM_PROMPT, AbortError, type AgentAwareToolPort, type AgentCatalog, type AgentConfig, type AgentEvent, AgentEventTypes, AgentFilePersistence, AgentManager, AgentManagerCommandRunner, AgentOrchestrator, AgentRegistry, type AgentSession, type AgentStateManager, type AgentTemplate, AnthropicAISDKLLM, type AskUserArgs, type AskUserMetadata, AskUserTool, type AssignErrorResult, type AssignParams, type AssignResult, type AssignSuccessResult$1 as AssignSuccessResult, type AssignTaskArgs, type AssignTaskMetadata, type AuthFlowResult, type AuthServerMetadata, type BaseLLMOptions, type BashErrorResult, type BashParams, type BashResult, type BashSuccessResult$1 as BashSuccessResult, BashTool, type BashToolArgs, type BashToolMetadata, CommandFilePersistence, CommandHookExecutor, type CommandMetadata, type CommandSource, type CompleteAgent, type CompleteCustomCommand, CompositeHookPort, CompositeToolPort, type Conversation, ConversationContext, type ConversationMetadata, type ConversationSnapshot, ConversationStore, CoreMCPClient, type CustomCommandFrontmatter, type CustomCommandTemplate, DEFAULT_RETRY_CONFIG, DefaultAgentStateManager, DefaultDelegationService, DefaultSpecialistAgentFactory, type DelegationMetadata, type DelegationService, type DelegationServiceConfig, DelegationServiceFactory, type DirEntry, type ErrorMetadata, ErrorReason, type ExecResult, type ExecResultError, type ExecResultSuccess, type FileEditArgs, type FileEditMetadata, type FileEditResult, type FileEditSuccessResult$1 as FileEditSuccessResult, type FileMetadata, type FileNewArgs, type FileNewMetadata, type FileNewParams, type FileNewResult, type FileNewSuccessResult$1 as FileNewSuccessResult, type FileReadArgs, type FileReadErrorResult, type FileReadMetadata, type FileReadParams, type FileReadResult, type FileReadSuccessResult$1 as FileReadSuccessResult, type FolderTreeOptions, type FunctionTool, GithubLLM, type GlobArgs, type GlobParams, type GlobResult, type GlobSuccessResult$1 as GlobSuccessResult, type GlobToolMetadata, type GrepArgs, type GrepParams, type GrepResult, type GrepSuccessResult$1 as GrepSuccessResult, type GrepToolMetadata, type HookContext, HookDecision, type HookDecisionType, type HookDefinition, type HookEventConfig, type HookEventType, HookEventTypes, type HookPort, HookRegistry, type HookResult, type HooksConfig, InMemoryMemory, InMemoryMetadata, InMemoryMetricsPort, JsonFileMemoryPersistence, JsonFileMemoryStore, type LLMConfig, LLMError, type LLMFactory, type LLMOptions, type LLMPort, LLMResolver, type LineRangeMetadata, type LsArgs, type LsMetadata, type LsParams, type LsResult, type LsSuccessResult$1 as LsSuccessResult, type LspService, LspTool, type MCPAuthOptions, type MCPCallResult, type MCPConfig, type MCPHttpOptions, MCPOAuthClient, type MCPOAuthConfig, type MCPOptions, type MCPServerConfig, type MCPStdioOptions, type MCPToolCall, MCPToolPort, type MCPToolSchema, type MemoryCandidate, type MemoryEntry, MemoryExtractor, type MemoryPort, MemoryPortMetadataAdapter, type MemorySaveToolInput, type MemoryScope, type MemorySearchOptions, type MemorySource, type MemoryStorePort, type MemoryType, type Message, type MessageContent, type MessageContentPart, type MetadataPort, type MetricsChangeHandler, type MetricsPort, type MetricsSnapshot, type ModelInfo, type ModelLimits, NoopMetricsPort, NoopReminders, type OrchestratorAwareToolPort, type ParseResult, PersistedMemory, PersistingConsoleEventPort, type ProtectedResourceMetadata, type RetryConfig, RetryTransport, RuntimeEnv, type SendMessageOptions, SimpleContextBuilder, SimpleCost, SimpleId, type SkillErrorResult, type SkillMetadata, type SkillParams, type SkillProvider, type SkillResult, type SkillSuccessResult, SkillTool, type SkillInfo as SkillToolInfo, type SpecialistAgentConfig, type SpecialistAgentResult, type StoredTokens, type SubAgentState, type SubAgentToolCall, SystemClock, type TaskOutputMetadata, type TaskOutputParams, type TaskOutputResult, type TaskOutputSuccessResult, type TodoWriteArgs, type TodoWriteMetadata, type TodoWriteResult, type TodoWriteSuccessResult$1 as TodoWriteSuccessResult, type TokenStorage, type ToolApprovalDecision, type ToolArguments, type ToolCall, type ToolCallConversionResult, type ToolCallValidation, type ToolErrorMetadata, type ToolExecutionContext, type ToolExecutionResult, type ToolMetadataMap, type ToolName, type ToolParameterMap, type ToolPort, ToolRegistry, type ToolValidator, type TypedToolInvocation, type UsageData, type UserAttachment, type UserMessagePayload, type ValidationError, type ValidationResult, type WebFetchArgs, type WebFetchMetadata, type WebFetchParams, type WebFetchResult, type WebFetchSuccessResult$1 as WebFetchSuccessResult, type WebSearchArgs, type WebSearchMetadata, type WebSearchParams, type WebSearchResult, type WebSearchSuccessResult$1 as WebSearchSuccessResult, type WebSearchToolResult, assignTaskSchema, bashToolSchema, buildAISDKToolResultOutput, buildAgentCreationPrompt, buildInjectedSystem, canonicalizeTerminalPaste, convertToolCall, convertToolCalls, convertToolCallsWithErrorHandling, createEmptySnapshot, createLLM, deduplicateModels, err, fileEditSchema, fileNewSchema, fileReadSchema, formatMemoriesForPrompt, generateFolderTree, getAvailableProviders, getFallbackLimits, getProviderAuthMethods, getProviderDefaultModels, getProviderLabel, globToolSchema, grepToolSchema, isAssignResult, isAssignSuccess, isAssignTaskArgs, isBashResult, isBashSuccess, isBashToolArgs, isError, isFileEditArgs, isFileEditResult, isFileEditSuccess, isFileNewArgs, isFileNewResult, isFileNewSuccess, isFileReadArgs, isFileReadResult, isFileReadSuccess, isGlobArgs, isGlobResult, isGlobSuccess, isGrepArgs, isGrepResult, isGrepSuccess, isInsufficientScopeError, isJsonResult, isLsArgs, isLsToolResult, isLsToolSuccess, isRetryableError, isRetryableStatusCode, isSuccess, isSuccessJson, isSuccessText, isTextResult, isTodoWriteArgs, isTodoWriteResult, isTodoWriteSuccess, isUnauthorizedError, isValidCommandId, isWebFetchArgs, isWebFetchResult, isWebFetchSuccess, isWebSearchArgs, isWebSearchResult, isWebSearchSuccess, loadHooksFromFrontmatter, lsToolSchema, memorySaveToolDefinition, mergeAgentConfig, normalizeModelInfo, normalizeModelLimits, normalizeNewlines, okJson, okText, parseJSON, parseSubAgentToolCallArguments, parseToolArguments, parseWWWAuthenticate, rankMemories, renderTemplate, resolveBackspaces, resolveCarriageReturns, sanitizeCommandId, stripAnsiAndControls, supportsGetModels, todoWriteSchema, toolSchemas, toolValidators, validateToolParams, webFetchSchema, webSearchSchema };
|
|
3933
|
+
export { AGENT_CREATOR_SYSTEM_PROMPT, type AXElement, type AXPressResult, type AXSetValueResult, type AXSnapshotResult, AbortError, type AgentAwareToolPort, type AgentCatalog, type AgentConfig, type AgentEvent, AgentEventTypes, AgentFilePersistence, AgentManager, AgentManagerCommandRunner, AgentOrchestrator, AgentRegistry, type AgentSession, type AgentStateManager, type AgentTemplate, type AnnotateResult, AnthropicAISDKLLM, type AskUserArgs, type AskUserMetadata, AskUserTool, type AssignErrorResult, type AssignParams, type AssignResult, type AssignSuccessResult$1 as AssignSuccessResult, type AssignTaskArgs, type AssignTaskMetadata, type AuthFlowResult, type AuthServerMetadata, type BaseLLMOptions, type BashErrorResult, type BashParams, type BashResult, type BashSuccessResult$1 as BashSuccessResult, BashTool, type BashToolArgs, type BashToolMetadata, CommandFilePersistence, CommandHookExecutor, type CommandMetadata, type CommandSource, type CompleteAgent, type CompleteCustomCommand, CompositeHookPort, CompositeToolPort, type ComputerAction, type ComputerBackend, type ComputerUseArgs, type ComputerUseMetadata, type ComputerUseParams, type ComputerUseResult, ComputerUseTool, type Conversation, ConversationContext, type ConversationMetadata, type ConversationSnapshot, ConversationStore, CoreMCPClient, type CustomCommandFrontmatter, type CustomCommandTemplate, DEFAULT_RETRY_CONFIG, DefaultAgentStateManager, DefaultDelegationService, DefaultSpecialistAgentFactory, type DelegationMetadata, type DelegationService, type DelegationServiceConfig, DelegationServiceFactory, type DirEntry, type ErrorMetadata, ErrorReason, type ExecResult, type ExecResultError, type ExecResultSuccess, type FileEditArgs, type FileEditMetadata, type FileEditResult, type FileEditSuccessResult$1 as FileEditSuccessResult, type FileMetadata, type FileNewArgs, type FileNewMetadata, type FileNewParams, type FileNewResult, type FileNewSuccessResult$1 as FileNewSuccessResult, type FileReadArgs, type FileReadErrorResult, type FileReadMetadata, type FileReadParams, type FileReadResult, type FileReadSuccessResult$1 as FileReadSuccessResult, type FolderTreeOptions, type FunctionTool, GithubLLM, type GlobArgs, type GlobParams, type GlobResult, type GlobSuccessResult$1 as GlobSuccessResult, type GlobToolMetadata, type GrepArgs, type GrepParams, type GrepResult, type GrepSuccessResult$1 as GrepSuccessResult, type GrepToolMetadata, type HookContext, HookDecision, type HookDecisionType, type HookDefinition, type HookEventConfig, type HookEventType, HookEventTypes, type HookPort, HookRegistry, type HookResult, type HooksConfig, InMemoryMemory, InMemoryMetadata, InMemoryMetricsPort, JsonFileMemoryPersistence, JsonFileMemoryStore, type LLMConfig, LLMError, type LLMFactory, type LLMOptions, type LLMPort, LLMResolver, type LineRangeMetadata, type LsArgs, type LsMetadata, type LsParams, type LsResult, type LsSuccessResult$1 as LsSuccessResult, type LspService, LspTool, type MCPAuthOptions, type MCPCallResult, type MCPConfig, type MCPHttpOptions, MCPOAuthClient, type MCPOAuthConfig, type MCPOptions, type MCPServerConfig, type MCPStdioOptions, type MCPToolCall, MCPToolPort, type MCPToolSchema, type MemoryCandidate, type MemoryEntry, MemoryExtractor, type MemoryPort, MemoryPortMetadataAdapter, type MemorySaveToolInput, type MemoryScope, type MemorySearchOptions, type MemorySource, type MemoryStorePort, type MemoryType, type Message, type MessageContent, type MessageContentPart, type MetadataPort, type MetricsChangeHandler, type MetricsPort, type MetricsSnapshot, type ModelInfo, type ModelLimits, NoopMetricsPort, NoopReminders, type OrchestratorAwareToolPort, type ParseResult, PersistedMemory, PersistingConsoleEventPort, type ProtectedResourceMetadata, type RetryConfig, RetryTransport, RuntimeEnv, type SendMessageOptions, SimpleContextBuilder, SimpleCost, SimpleId, type SkillErrorResult, type SkillMetadata, type SkillParams, type SkillProvider, type SkillResult, type SkillSuccessResult, SkillTool, type SkillInfo as SkillToolInfo, type SpecialistAgentConfig, type SpecialistAgentResult, type StoredTokens, type SubAgentState, type SubAgentToolCall, SystemClock, type TaskOutputMetadata, type TaskOutputParams, type TaskOutputResult, type TaskOutputSuccessResult, type TodoWriteArgs, type TodoWriteMetadata, type TodoWriteResult, type TodoWriteSuccessResult$1 as TodoWriteSuccessResult, type TokenStorage, type ToolApprovalDecision, type ToolArguments, type ToolCall, type ToolCallConversionResult, type ToolCallValidation, type ToolErrorMetadata, type ToolExecutionContext, type ToolExecutionResult, type ToolMetadataMap, type ToolName, type ToolParameterMap, type ToolPort, ToolRegistry, type ToolValidator, type TypedToolInvocation, type UsageData, type UserAttachment, type UserMessagePayload, type ValidationError, type ValidationResult, type WebFetchArgs, type WebFetchMetadata, type WebFetchParams, type WebFetchResult, type WebFetchSuccessResult$1 as WebFetchSuccessResult, type WebSearchArgs, type WebSearchMetadata, type WebSearchParams, type WebSearchResult, type WebSearchSuccessResult$1 as WebSearchSuccessResult, type WebSearchToolResult, assignTaskSchema, bashToolSchema, buildAISDKToolResultOutput, buildAgentCreationPrompt, buildInjectedSystem, canonicalizeTerminalPaste, computerToolSchema, convertToolCall, convertToolCalls, convertToolCallsWithErrorHandling, createEmptySnapshot, createLLM, deduplicateModels, err, fileEditSchema, fileNewSchema, fileReadSchema, formatMemoriesForPrompt, generateFolderTree, getAvailableProviders, getFallbackLimits, getProviderAuthMethods, getProviderDefaultModels, getProviderLabel, globToolSchema, grepToolSchema, isAssignResult, isAssignSuccess, isAssignTaskArgs, isBashResult, isBashSuccess, isBashToolArgs, isComputerResult, isComputerSuccess, isComputerUseArgs, isError, isFileEditArgs, isFileEditResult, isFileEditSuccess, isFileNewArgs, isFileNewResult, isFileNewSuccess, isFileReadArgs, isFileReadResult, isFileReadSuccess, isGlobArgs, isGlobResult, isGlobSuccess, isGrepArgs, isGrepResult, isGrepSuccess, isInsufficientScopeError, isJsonResult, isLsArgs, isLsToolResult, isLsToolSuccess, isRetryableError, isRetryableStatusCode, isSuccess, isSuccessJson, isSuccessText, isTextResult, isTodoWriteArgs, isTodoWriteResult, isTodoWriteSuccess, isUnauthorizedError, isValidCommandId, isWebFetchArgs, isWebFetchResult, isWebFetchSuccess, isWebSearchArgs, isWebSearchResult, isWebSearchSuccess, loadHooksFromFrontmatter, lsToolSchema, memorySaveToolDefinition, mergeAgentConfig, normalizeModelInfo, normalizeModelLimits, normalizeNewlines, okJson, okText, parseJSON, parseSubAgentToolCallArguments, parseToolArguments, parseWWWAuthenticate, rankMemories, renderTemplate, resolveBackspaces, resolveCarriageReturns, sanitizeCommandId, stripAnsiAndControls, supportsGetModels, todoWriteSchema, toolSchemas, toolValidators, validateToolParams, webFetchSchema, webSearchSchema };
|