@blinkdotnew/sdk 2.3.0 → 2.3.2
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/index.d.mts +112 -316
- package/dist/index.d.ts +112 -316
- package/dist/index.js +41 -573
- package/dist/index.mjs +36 -574
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -2409,23 +2409,14 @@ declare class BlinkStorageImpl implements BlinkStorage {
|
|
|
2409
2409
|
*
|
|
2410
2410
|
* Type definitions for AI agent tools used with blink.ai.agent()
|
|
2411
2411
|
*/
|
|
2412
|
-
/**
|
|
2413
|
-
* A tool definition that can be passed to the agent
|
|
2414
|
-
*/
|
|
2415
|
-
interface AgentTool {
|
|
2416
|
-
/** Tool name (used as identifier) */
|
|
2417
|
-
name: string;
|
|
2418
|
-
/** Human-readable description for the LLM */
|
|
2419
|
-
description: string;
|
|
2420
|
-
/** JSON Schema for tool input parameters */
|
|
2421
|
-
inputSchema: JSONSchema;
|
|
2422
|
-
}
|
|
2423
2412
|
/**
|
|
2424
2413
|
* JSON Schema type for tool input definitions
|
|
2425
2414
|
*/
|
|
2426
2415
|
type JSONSchema = Record<string, any>;
|
|
2427
2416
|
/**
|
|
2428
2417
|
* A custom webhook tool definition
|
|
2418
|
+
*
|
|
2419
|
+
* Webhook tools NEED schemas because the server forwards them to your endpoint.
|
|
2429
2420
|
*/
|
|
2430
2421
|
interface WebhookTool {
|
|
2431
2422
|
/** Tool name */
|
|
@@ -2439,6 +2430,8 @@ interface WebhookTool {
|
|
|
2439
2430
|
}
|
|
2440
2431
|
/**
|
|
2441
2432
|
* A client-side tool requiring user confirmation
|
|
2433
|
+
*
|
|
2434
|
+
* Client tools NEED schemas so the AI knows what inputs to provide.
|
|
2442
2435
|
*/
|
|
2443
2436
|
interface ClientTool {
|
|
2444
2437
|
/** Tool name */
|
|
@@ -2474,8 +2467,8 @@ interface AgentConfig {
|
|
|
2474
2467
|
model: string;
|
|
2475
2468
|
/** System prompt */
|
|
2476
2469
|
system?: string;
|
|
2477
|
-
/** Built-in tools to enable (tool names
|
|
2478
|
-
tools?:
|
|
2470
|
+
/** Built-in tools to enable (tool names) */
|
|
2471
|
+
tools?: string[];
|
|
2479
2472
|
/** Custom webhook tools */
|
|
2480
2473
|
webhook_tools?: WebhookTool[];
|
|
2481
2474
|
/** Client-side tools for HITL */
|
|
@@ -2624,8 +2617,8 @@ interface AgentOptions {
|
|
|
2624
2617
|
system?: string;
|
|
2625
2618
|
/** Alias for system (Vercel AI SDK compatibility) */
|
|
2626
2619
|
instructions?: string;
|
|
2627
|
-
/** Built-in tools to enable */
|
|
2628
|
-
tools?:
|
|
2620
|
+
/** Built-in tools to enable (tool names) */
|
|
2621
|
+
tools?: string[];
|
|
2629
2622
|
/** Custom webhook tools */
|
|
2630
2623
|
webhookTools?: WebhookTool[];
|
|
2631
2624
|
/** Client-side tools for HITL */
|
|
@@ -2755,7 +2748,7 @@ declare class Agent {
|
|
|
2755
2748
|
/**
|
|
2756
2749
|
* Get the agent's tools
|
|
2757
2750
|
*/
|
|
2758
|
-
get tools():
|
|
2751
|
+
get tools(): string[] | undefined;
|
|
2759
2752
|
}
|
|
2760
2753
|
/**
|
|
2761
2754
|
* Creates a stop condition for maximum step count
|
|
@@ -3512,341 +3505,144 @@ declare class BlinkConnectorsImpl implements BlinkConnectors {
|
|
|
3512
3505
|
/**
|
|
3513
3506
|
* Core Agent Tools
|
|
3514
3507
|
*
|
|
3515
|
-
*
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
/**
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
* import { Agent, webSearch } from '@blinkdotnew/react'
|
|
3527
|
-
*
|
|
3528
|
-
* const researchAgent = new Agent({
|
|
3529
|
-
* model: 'openai/gpt-4o',
|
|
3530
|
-
* tools: [webSearch]
|
|
3531
|
-
* })
|
|
3532
|
-
*
|
|
3533
|
-
* const result = await researchAgent.generate({
|
|
3534
|
-
* prompt: 'What are the latest AI developments?'
|
|
3535
|
-
* })
|
|
3536
|
-
* ```
|
|
3537
|
-
*/
|
|
3538
|
-
declare const webSearch: AgentTool;
|
|
3539
|
-
/**
|
|
3540
|
-
* Fetch URL content as clean text (HTML stripped)
|
|
3541
|
-
*
|
|
3542
|
-
* Fast text extraction from URLs - no JavaScript rendering.
|
|
3543
|
-
* Good for Wikipedia, documentation, articles.
|
|
3544
|
-
*
|
|
3545
|
-
* @example
|
|
3546
|
-
* ```ts
|
|
3547
|
-
* import { fetchUrl } from '@blinkdotnew/react'
|
|
3548
|
-
*
|
|
3549
|
-
* const chat = useAgent({
|
|
3550
|
-
* agent: {
|
|
3551
|
-
* model: 'openai/gpt-4o',
|
|
3552
|
-
* tools: [fetchUrl]
|
|
3553
|
-
* }
|
|
3554
|
-
* })
|
|
3555
|
-
* ```
|
|
3556
|
-
*/
|
|
3557
|
-
declare const fetchUrl: AgentTool;
|
|
3558
|
-
/**
|
|
3559
|
-
* Python code interpreter for AI-generated scripts
|
|
3560
|
-
*
|
|
3561
|
-
* Executes Python code in an isolated E2B sandbox with Python 3.11+.
|
|
3562
|
-
* Pre-installed libraries: numpy, pandas, matplotlib, scipy, scikit-learn, requests.
|
|
3563
|
-
* Safe for running untrusted LLM-generated code.
|
|
3564
|
-
*
|
|
3565
|
-
* Returns:
|
|
3566
|
-
* - text: Last expression result
|
|
3567
|
-
* - stdout/stderr: Standard output streams
|
|
3568
|
-
* - results: Rich outputs (matplotlib plots as PNG/JPEG, HTML, Markdown, etc.)
|
|
3569
|
-
* - error: Execution errors with traceback
|
|
3570
|
-
*
|
|
3571
|
-
* Matplotlib plots are automatically captured and returned as base64 PNG images
|
|
3572
|
-
* in the results array. Use plt.show() or display(plt.gcf()) to generate plots.
|
|
3573
|
-
*
|
|
3574
|
-
* @example
|
|
3575
|
-
* ```ts
|
|
3576
|
-
* import { runCode } from '@blinkdotnew/react'
|
|
3577
|
-
*
|
|
3578
|
-
* const chat = useAgent({
|
|
3579
|
-
* agent: {
|
|
3580
|
-
* model: 'openai/gpt-4o',
|
|
3581
|
-
* tools: [runCode]
|
|
3582
|
-
* }
|
|
3583
|
-
* })
|
|
3584
|
-
*
|
|
3585
|
-
* // Agent can create data visualizations:
|
|
3586
|
-
* // "Create a bar chart of sales data"
|
|
3587
|
-
* // "Plot a sine wave"
|
|
3588
|
-
* // "Analyze this CSV and show trends"
|
|
3589
|
-
* ```
|
|
3590
|
-
*/
|
|
3591
|
-
declare const runCode: AgentTool;
|
|
3508
|
+
* Tool names for web search, URL fetching, and code execution.
|
|
3509
|
+
* The server has the full schemas - SDK just passes tool names.
|
|
3510
|
+
*/
|
|
3511
|
+
/** Search the web for current information (Exa AI) */
|
|
3512
|
+
declare const webSearch = "web_search";
|
|
3513
|
+
/** Fetch URL content as clean text (HTML stripped) */
|
|
3514
|
+
declare const fetchUrl = "fetch_url";
|
|
3515
|
+
/** Execute Python code in isolated sandbox */
|
|
3516
|
+
declare const runCode = "run_code";
|
|
3517
|
+
/** Core tools for research agents */
|
|
3518
|
+
declare const coreTools: readonly ["web_search", "fetch_url", "run_code"];
|
|
3592
3519
|
|
|
3593
3520
|
/**
|
|
3594
3521
|
* Sandbox Tools (Cursor-like)
|
|
3595
3522
|
*
|
|
3596
|
-
*
|
|
3597
|
-
*
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
*/
|
|
3606
|
-
declare const
|
|
3607
|
-
/**
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
*/
|
|
3618
|
-
declare const writeFile: AgentTool;
|
|
3619
|
-
/**
|
|
3620
|
-
* Search and replace in files (PREFERRED editing tool)
|
|
3621
|
-
* Cursor equivalent: search_replace
|
|
3622
|
-
*/
|
|
3623
|
-
declare const searchReplace: AgentTool;
|
|
3624
|
-
/**
|
|
3625
|
-
* Regex content search using ripgrep
|
|
3626
|
-
* Cursor equivalent: grep
|
|
3627
|
-
*/
|
|
3628
|
-
declare const grep: AgentTool;
|
|
3629
|
-
/**
|
|
3630
|
-
* Find files by name pattern
|
|
3631
|
-
* Cursor equivalent: glob_file_search
|
|
3632
|
-
*/
|
|
3633
|
-
declare const globFileSearch: AgentTool;
|
|
3634
|
-
/**
|
|
3635
|
-
* Execute shell command in sandbox
|
|
3636
|
-
* Cursor equivalent: run_terminal_cmd
|
|
3637
|
-
*/
|
|
3638
|
-
declare const runTerminalCmd: AgentTool;
|
|
3639
|
-
/**
|
|
3640
|
-
* Get public URL for a port in sandbox
|
|
3641
|
-
*/
|
|
3642
|
-
declare const getHost: AgentTool;
|
|
3643
|
-
/**
|
|
3644
|
-
* All sandbox tools bundled together (Cursor-like)
|
|
3645
|
-
*
|
|
3646
|
-
* @example
|
|
3647
|
-
* ```ts
|
|
3648
|
-
* import { sandboxTools, Agent } from '@blinkdotnew/sdk'
|
|
3649
|
-
*
|
|
3650
|
-
* const codingAgent = new Agent({
|
|
3651
|
-
* model: 'anthropic/claude-sonnet-4-20250514',
|
|
3652
|
-
* tools: sandboxTools,
|
|
3653
|
-
* })
|
|
3654
|
-
*
|
|
3655
|
-
* // Tools include:
|
|
3656
|
-
* // - read_file, list_dir
|
|
3657
|
-
* // - write_file, search_replace
|
|
3658
|
-
* // - grep, glob_file_search
|
|
3659
|
-
* // - run_terminal_cmd, get_host
|
|
3660
|
-
* ```
|
|
3661
|
-
*/
|
|
3662
|
-
declare const sandboxTools: AgentTool[];
|
|
3523
|
+
* Tool names for file and command execution in coding agents.
|
|
3524
|
+
* The server has the full schemas - SDK just passes tool names.
|
|
3525
|
+
*/
|
|
3526
|
+
/** Read file contents from sandbox */
|
|
3527
|
+
declare const readFile = "read_file";
|
|
3528
|
+
/** List files and directories */
|
|
3529
|
+
declare const listDir = "list_dir";
|
|
3530
|
+
/** Create/overwrite a file (use search_replace for existing files!) */
|
|
3531
|
+
declare const writeFile = "write_file";
|
|
3532
|
+
/** Search and replace in files (PREFERRED for editing) */
|
|
3533
|
+
declare const searchReplace = "search_replace";
|
|
3534
|
+
/** Regex content search using ripgrep */
|
|
3535
|
+
declare const grep = "grep";
|
|
3536
|
+
/** Find files by name pattern */
|
|
3537
|
+
declare const globFileSearch = "glob_file_search";
|
|
3538
|
+
/** Execute shell command in sandbox */
|
|
3539
|
+
declare const runTerminalCmd = "run_terminal_cmd";
|
|
3540
|
+
/** Get public URL for a sandbox port */
|
|
3541
|
+
declare const getHost = "get_host";
|
|
3542
|
+
/** All sandbox tools for coding agents */
|
|
3543
|
+
declare const sandboxTools: readonly ["read_file", "list_dir", "write_file", "search_replace", "grep", "glob_file_search", "run_terminal_cmd", "get_host"];
|
|
3663
3544
|
|
|
3664
3545
|
/**
|
|
3665
3546
|
* Database Tools
|
|
3666
3547
|
*
|
|
3667
|
-
* RLS-enforced database operations
|
|
3668
|
-
*
|
|
3669
|
-
*/
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
declare const dbList: AgentTool;
|
|
3683
|
-
/**
|
|
3684
|
-
* Get a single row by ID
|
|
3685
|
-
*
|
|
3686
|
-
* RLS ensures only the user's rows can be retrieved.
|
|
3687
|
-
*/
|
|
3688
|
-
declare const dbGet: AgentTool;
|
|
3689
|
-
/**
|
|
3690
|
-
* Update a row by ID
|
|
3691
|
-
*
|
|
3692
|
-
* RLS ensures only the user's rows can be updated.
|
|
3693
|
-
*/
|
|
3694
|
-
declare const dbUpdate: AgentTool;
|
|
3695
|
-
/**
|
|
3696
|
-
* Delete a row by ID
|
|
3697
|
-
*
|
|
3698
|
-
* RLS ensures only the user's rows can be deleted.
|
|
3699
|
-
*/
|
|
3700
|
-
declare const dbDelete: AgentTool;
|
|
3701
|
-
/**
|
|
3702
|
-
* All database tools bundled together
|
|
3703
|
-
*
|
|
3704
|
-
* @example
|
|
3705
|
-
* ```ts
|
|
3706
|
-
* import { dbTools } from '@blinkdotnew/react'
|
|
3707
|
-
*
|
|
3708
|
-
* const chat = useAgent({
|
|
3709
|
-
* agent: {
|
|
3710
|
-
* model: 'openai/gpt-4o',
|
|
3711
|
-
* tools: [...dbTools]
|
|
3712
|
-
* }
|
|
3713
|
-
* })
|
|
3714
|
-
* ```
|
|
3715
|
-
*/
|
|
3716
|
-
declare const dbTools: AgentTool[];
|
|
3548
|
+
* Tool names for RLS-enforced database operations.
|
|
3549
|
+
* The server has the full schemas - SDK just passes tool names.
|
|
3550
|
+
*/
|
|
3551
|
+
/** Insert a new row (user_id auto-set via RLS) */
|
|
3552
|
+
declare const dbInsert = "db_insert";
|
|
3553
|
+
/** List rows with filtering/pagination (RLS enforced) */
|
|
3554
|
+
declare const dbList = "db_list";
|
|
3555
|
+
/** Get a single row by ID (RLS enforced) */
|
|
3556
|
+
declare const dbGet = "db_get";
|
|
3557
|
+
/** Update a row by ID (RLS enforced) */
|
|
3558
|
+
declare const dbUpdate = "db_update";
|
|
3559
|
+
/** Delete a row by ID (RLS enforced) */
|
|
3560
|
+
declare const dbDelete = "db_delete";
|
|
3561
|
+
/** All database tools */
|
|
3562
|
+
declare const dbTools: readonly ["db_insert", "db_list", "db_get", "db_update", "db_delete"];
|
|
3717
3563
|
|
|
3718
3564
|
/**
|
|
3719
3565
|
* Storage Tools
|
|
3720
3566
|
*
|
|
3721
|
-
*
|
|
3722
|
-
*
|
|
3723
|
-
*/
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
* Delete file from storage
|
|
3741
|
-
*/
|
|
3742
|
-
declare const storageDelete: AgentTool;
|
|
3743
|
-
/**
|
|
3744
|
-
* Get public URL for a file
|
|
3745
|
-
*/
|
|
3746
|
-
declare const storagePublicUrl: AgentTool;
|
|
3747
|
-
/**
|
|
3748
|
-
* Move/rename a file in storage
|
|
3749
|
-
*/
|
|
3750
|
-
declare const storageMove: AgentTool;
|
|
3751
|
-
/**
|
|
3752
|
-
* Copy a file in storage
|
|
3753
|
-
*/
|
|
3754
|
-
declare const storageCopy: AgentTool;
|
|
3755
|
-
/**
|
|
3756
|
-
* All storage tools bundled together
|
|
3757
|
-
*
|
|
3758
|
-
* @example
|
|
3759
|
-
* ```ts
|
|
3760
|
-
* import { storageTools } from '@blinkdotnew/react'
|
|
3761
|
-
*
|
|
3762
|
-
* const chat = useAgent({
|
|
3763
|
-
* agent: {
|
|
3764
|
-
* model: 'openai/gpt-4o',
|
|
3765
|
-
* tools: [...storageTools]
|
|
3766
|
-
* }
|
|
3767
|
-
* })
|
|
3768
|
-
* ```
|
|
3769
|
-
*/
|
|
3770
|
-
declare const storageTools: AgentTool[];
|
|
3567
|
+
* Tool names for file storage operations.
|
|
3568
|
+
* The server has the full schemas - SDK just passes tool names.
|
|
3569
|
+
*/
|
|
3570
|
+
/** Upload a file (base64 or URL) */
|
|
3571
|
+
declare const storageUpload = "storage_upload";
|
|
3572
|
+
/** Download file from storage */
|
|
3573
|
+
declare const storageDownload = "storage_download";
|
|
3574
|
+
/** List files in a directory */
|
|
3575
|
+
declare const storageList = "storage_list";
|
|
3576
|
+
/** Delete a file */
|
|
3577
|
+
declare const storageDelete = "storage_delete";
|
|
3578
|
+
/** Get public URL for a file */
|
|
3579
|
+
declare const storagePublicUrl = "storage_public_url";
|
|
3580
|
+
/** Move/rename a file */
|
|
3581
|
+
declare const storageMove = "storage_move";
|
|
3582
|
+
/** Copy a file */
|
|
3583
|
+
declare const storageCopy = "storage_copy";
|
|
3584
|
+
/** All storage tools */
|
|
3585
|
+
declare const storageTools: readonly ["storage_upload", "storage_download", "storage_list", "storage_delete", "storage_public_url", "storage_move", "storage_copy"];
|
|
3771
3586
|
|
|
3772
3587
|
/**
|
|
3773
3588
|
* RAG Agent Tool
|
|
3774
3589
|
*
|
|
3775
|
-
*
|
|
3776
|
-
*
|
|
3777
|
-
* NOTE: Only rag_search is available as an agent tool. Agents ARE AI -
|
|
3778
|
-
* they use rag_search to get relevant chunks, then synthesize answers themselves.
|
|
3779
|
-
* The direct API /api/rag/:project_id/ai-search is available for non-agent use cases.
|
|
3590
|
+
* Tool name for knowledge base search.
|
|
3591
|
+
* The server has the full schema - SDK just passes tool name.
|
|
3780
3592
|
*/
|
|
3593
|
+
/** Search knowledge base using semantic similarity */
|
|
3594
|
+
declare const ragSearch = "rag_search";
|
|
3595
|
+
/** All RAG tools */
|
|
3596
|
+
declare const ragTools: readonly ["rag_search"];
|
|
3781
3597
|
|
|
3782
3598
|
/**
|
|
3783
|
-
*
|
|
3784
|
-
*
|
|
3785
|
-
* Performs semantic similarity search to find relevant chunks from uploaded documents.
|
|
3786
|
-
* The agent receives the chunks and synthesizes an answer from them.
|
|
3787
|
-
* Bills for embedding generation (query vectorization).
|
|
3788
|
-
*
|
|
3789
|
-
* @example
|
|
3790
|
-
* ```ts
|
|
3791
|
-
* import { Agent, ragSearch } from '@blinkdotnew/react'
|
|
3792
|
-
*
|
|
3793
|
-
* const supportAgent = new Agent({
|
|
3794
|
-
* model: 'openai/gpt-4o',
|
|
3795
|
-
* tools: [ragSearch],
|
|
3796
|
-
* system: 'You have access to a knowledge base. Use rag_search to find information, then answer based on the results.'
|
|
3797
|
-
* })
|
|
3798
|
-
*
|
|
3799
|
-
* const result = await supportAgent.generate({
|
|
3800
|
-
* prompt: 'What is our refund policy?'
|
|
3801
|
-
* })
|
|
3802
|
-
* ```
|
|
3803
|
-
*/
|
|
3804
|
-
declare const ragSearch: AgentTool;
|
|
3805
|
-
/**
|
|
3806
|
-
* All RAG tools bundled together
|
|
3599
|
+
* Media Agent Tools
|
|
3807
3600
|
*
|
|
3808
|
-
*
|
|
3809
|
-
*
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3601
|
+
* Tool names for AI image and video generation.
|
|
3602
|
+
* The server has the full schemas - SDK just passes tool names.
|
|
3603
|
+
*/
|
|
3604
|
+
/** Generate images from text prompts */
|
|
3605
|
+
declare const generateImage = "generate_image";
|
|
3606
|
+
/** Edit existing images with text prompts */
|
|
3607
|
+
declare const editImage = "edit_image";
|
|
3608
|
+
/** Generate videos from text prompts */
|
|
3609
|
+
declare const generateVideo = "generate_video";
|
|
3610
|
+
/** Animate static images into videos */
|
|
3611
|
+
declare const imageToVideo = "image_to_video";
|
|
3612
|
+
/** All media generation tools */
|
|
3613
|
+
declare const mediaTools: readonly ["generate_image", "edit_image", "generate_video", "image_to_video"];
|
|
3820
3614
|
|
|
3821
3615
|
/**
|
|
3822
3616
|
* Agent Tools
|
|
3823
3617
|
*
|
|
3824
|
-
* Tool
|
|
3618
|
+
* Tool names for use with blink.ai.agent() and useAgent()
|
|
3619
|
+
*
|
|
3620
|
+
* Built-in tools are just string names - the server has the schemas.
|
|
3825
3621
|
*
|
|
3826
3622
|
* @example
|
|
3827
3623
|
* ```ts
|
|
3828
3624
|
* import {
|
|
3829
|
-
* webSearch, fetchUrl, runCode,
|
|
3830
|
-
* ragSearch,
|
|
3831
|
-
*
|
|
3832
|
-
*
|
|
3833
|
-
*
|
|
3834
|
-
* } from '@blinkdotnew/react'
|
|
3625
|
+
* webSearch, fetchUrl, runCode, // Core tools
|
|
3626
|
+
* ragSearch, // RAG tool
|
|
3627
|
+
* sandboxTools, dbTools, storageTools, // Tool bundles
|
|
3628
|
+
* mediaTools // Media generation
|
|
3629
|
+
* } from '@blinkdotnew/sdk'
|
|
3835
3630
|
*
|
|
3836
|
-
* const
|
|
3837
|
-
*
|
|
3838
|
-
*
|
|
3839
|
-
* tools: [...sandboxTools, webSearch, ragSearch]
|
|
3840
|
-
* }
|
|
3631
|
+
* const agent = blink.ai.createAgent({
|
|
3632
|
+
* model: 'google/gemini-3-flash',
|
|
3633
|
+
* tools: [...sandboxTools, webSearch, ragSearch]
|
|
3841
3634
|
* })
|
|
3842
3635
|
* ```
|
|
3843
3636
|
*/
|
|
3844
3637
|
|
|
3845
3638
|
/**
|
|
3846
|
-
* Convert
|
|
3639
|
+
* Convert tools array for API request
|
|
3640
|
+
*
|
|
3641
|
+
* Since tools are now just strings, this is essentially an identity function.
|
|
3642
|
+
* Kept for backward compatibility.
|
|
3847
3643
|
*
|
|
3848
3644
|
* @internal Used by SDK to serialize tools for API
|
|
3849
3645
|
*/
|
|
3850
|
-
declare function serializeTools(tools:
|
|
3646
|
+
declare function serializeTools(tools: string[]): string[];
|
|
3851
3647
|
|
|
3852
|
-
export { type AISearchOptions, Agent, type AgentBilling, type AgentConfig, type AgentNonStreamMessagesRequest, type AgentNonStreamPromptRequest, type AgentOptions, type AgentRequest, type AgentResponse, type AgentStep, type AgentStreamRequest, type TokenUsage as AgentTokenUsage, type
|
|
3648
|
+
export { type AISearchOptions, Agent, type AgentBilling, type AgentConfig, type AgentNonStreamMessagesRequest, type AgentNonStreamPromptRequest, type AgentOptions, type AgentRequest, type AgentResponse, type AgentStep, type AgentStreamRequest, type TokenUsage as AgentTokenUsage, type AnalyticsEvent, AsyncStorageAdapter, type AuthState, type AuthStateChangeCallback, type AuthTokens, type BlinkAI, BlinkAIImpl, type BlinkAnalytics, BlinkAnalyticsImpl, type BlinkClient, type BlinkClientConfig, BlinkConnectorError, type BlinkConnectors, BlinkConnectorsImpl, type BlinkData, BlinkDataImpl, BlinkDatabase, type BlinkRAG, BlinkRAGImpl, type BlinkRealtime, BlinkRealtimeChannel, BlinkRealtimeError, BlinkRealtimeImpl, type BlinkSandbox, BlinkSandboxImpl, type BlinkStorage, BlinkStorageImpl, BlinkTable, type BlinkTokenType, type BlinkUser, type ClientTool, type ConnectorApiKeyRequest, type ConnectorApiKeyResponse, type ConnectorAuthMode, type ConnectorExecuteRequest, type ConnectorExecuteResponse, type ConnectorProvider, type ConnectorStatusResponse, type ContextPolicy, type CreateCollectionOptions, type CreateOptions, type DataExtraction, type FileObject, type FilterCondition, type GenerateOptions, type ImageGenerationRequest, type ImageGenerationResponse, type JSONSchema, type ListDocumentsOptions, type Message, NoOpStorageAdapter, type ObjectGenerationRequest, type ObjectGenerationResponse, type PresenceUser, type QueryOptions, type RAGAISearchResult, type RAGAISearchSource, type RAGCollection, type RAGDocument, type RAGSearchResponse, type RAGSearchResult, type RealtimeChannel, type RealtimeGetMessagesOptions, type RealtimeMessage, type RealtimePublishOptions, type RealtimeSubscribeOptions, SANDBOX_TEMPLATES, type Sandbox, type SandboxConnectOptions, SandboxConnectionError, type SandboxCreateOptions, type SandboxTemplate, type SearchOptions, type SearchRequest, type SearchResponse, type SpeechGenerationRequest, type SpeechGenerationResponse, type StopCondition, type StorageAdapter, type StorageUploadOptions, type StorageUploadResponse, type StreamOptions, type TableOperations, type TextGenerationRequest, type TextGenerationResponse, type TokenIntrospectionResult, type TokenUsage$1 as TokenUsage, type ToolCall, type ToolResult, type TranscriptionRequest, type TranscriptionResponse, type UIMessage, type UIMessagePart, type UpdateOptions, type UploadOptions, type UpsertOptions, type WaitForReadyOptions, type WebBrowserModule, WebStorageAdapter, type WebhookTool, coreTools, createClient, dbDelete, dbGet, dbInsert, dbList, dbTools, dbUpdate, editImage, fetchUrl, generateImage, generateVideo, getDefaultStorageAdapter, getHost, globFileSearch, grep, imageToVideo, isBrowser, isDeno, isNode, isReactNative, isServer, isWeb, listDir, mediaTools, platform, ragSearch, ragTools, readFile, runCode, runTerminalCmd, sandboxTools, searchReplace, serializeTools, stepCountIs, storageCopy, storageDelete, storageDownload, storageList, storageMove, storagePublicUrl, storageTools, storageUpload, webSearch, writeFile };
|