deepagentsdk 0.15.0 → 0.16.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/dist/adapters/elements/index.d.cts +1 -1
- package/dist/adapters/elements/index.d.mts +1 -1
- package/dist/{agent-DHUp_-Fx.d.mts → agent-BwmAQJhR.d.mts} +8 -8
- package/dist/{agent-tfRthBvX.d.cts → agent-DuvtniwH.d.cts} +31 -31
- package/dist/cli/index.cjs +679 -88
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.mjs +680 -89
- package/dist/cli/index.mjs.map +1 -1
- package/dist/{file-saver-ZDVH1zHI.cjs → file-saver-BKNL0pg6.cjs} +115 -6
- package/dist/file-saver-BKNL0pg6.cjs.map +1 -0
- package/dist/{file-saver-CQWTIr8z.mjs → file-saver-DoXRgKBv.mjs} +106 -9
- package/dist/file-saver-DoXRgKBv.mjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +3 -1
- package/dist/file-saver-CQWTIr8z.mjs.map +0 -1
- package/dist/file-saver-ZDVH1zHI.cjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as DeepAgentEvent, r as ModelMessage$1, t as DeepAgent, yt as DeepAgentState } from "../../agent-
|
|
1
|
+
import { p as DeepAgentEvent, r as ModelMessage$1, t as DeepAgent, yt as DeepAgentState } from "../../agent-DuvtniwH.cjs";
|
|
2
2
|
import { UIMessage, UIMessage as UIMessage$1, UIMessagePart } from "ai";
|
|
3
3
|
|
|
4
4
|
//#region src/adapters/elements/createElementsRouteHandler.d.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as DeepAgentEvent, r as ModelMessage$1, t as DeepAgent, yt as DeepAgentState } from "../../agent-
|
|
1
|
+
import { p as DeepAgentEvent, r as ModelMessage$1, t as DeepAgent, yt as DeepAgentState } from "../../agent-BwmAQJhR.mjs";
|
|
2
2
|
import { UIMessage, UIMessage as UIMessage$1, UIMessagePart } from "ai";
|
|
3
3
|
|
|
4
4
|
//#region src/adapters/elements/createElementsRouteHandler.d.ts
|
|
@@ -821,14 +821,14 @@ interface AdvancedAgentOptions {
|
|
|
821
821
|
* Summarization configuration options.
|
|
822
822
|
*/
|
|
823
823
|
interface SummarizationConfig {
|
|
824
|
-
/**
|
|
824
|
+
/** Whether summarization is enabled */
|
|
825
825
|
enabled: boolean;
|
|
826
|
-
/**
|
|
827
|
-
|
|
828
|
-
/**
|
|
829
|
-
|
|
830
|
-
/**
|
|
831
|
-
|
|
826
|
+
/** Optional model to use for summarization (defaults to agent model) */
|
|
827
|
+
model?: ai2.LanguageModel;
|
|
828
|
+
/** Token count threshold at which to trigger summarization */
|
|
829
|
+
tokenThreshold: number;
|
|
830
|
+
/** Number of recent messages to keep intact (not summarized) */
|
|
831
|
+
keepMessages: number;
|
|
832
832
|
}
|
|
833
833
|
/**
|
|
834
834
|
* Configuration parameters for creating a Deep Agent.
|
|
@@ -1607,4 +1607,4 @@ declare class DeepAgent {
|
|
|
1607
1607
|
declare function createDeepAgent(params: CreateDeepAgentParams): DeepAgent;
|
|
1608
1608
|
//#endregion
|
|
1609
1609
|
export { createLsTool as $, TextEvent as A, isSandboxBackend as At, DynamicApprovalConfig as B, FileWrittenEvent as C, FileDownloadResponse as Ct, StepStartEvent as D, GrepMatch as Dt, StepFinishEvent as E, FileUploadResponse as Et, WebSearchStartEvent as F, ResumeDecision as Ft, createExecuteToolFromBackend as G, SubAgent as H, AgentMemoryOptions as I, ResumeOptions as It, write_todos as J, execute as K, CreateDeepAgentParams as L, ToolCallEvent as M, Checkpoint as Mt, ToolResultEvent as N, CheckpointSaverOptions as Nt, SubagentFinishEvent as O, SandboxBackendProtocol as Ot, WebSearchFinishEvent as P, InterruptData as Pt, createGrepTool as Q, SummarizationConfig as R, FileWriteStartEvent as S, FileData as St, HttpRequestStartEvent as T, FileOperationError as Tt, CreateExecuteToolOptions as U, InterruptOnConfig as V, createExecuteTool as W, createFilesystemTools as X, createEditFileTool as Y, createGlobTool as Z, ExecuteFinishEvent as _, BackendFactory as _t, eventHasStructuredOutput as a, ls as at, FetchUrlStartEvent as b, EditResult as bt, hasStructuredOutput as c, CreateWebToolsOptions as ct, CheckpointLoadedEvent as d, createWebSearchTool as dt, createReadFileTool as et, CheckpointSavedEvent as f, createWebTools as ft, EventCallback as g, web_search as gt, ErrorEvent as h, http_request as ht, StructuredAgentResult as i, grep as it, TodosChangedEvent as j, BaseCheckpointSaver as jt, SubagentStartEvent as k, WriteResult as kt, ApprovalRequestedEvent as l, createFetchUrlTool as lt, DoneEvent as m, htmlToMarkdown as mt, createDeepAgent as n, edit_file as nt, getEventOutput as o, read_file as ot, DeepAgentEvent as p, fetch_url as pt, createTodosTool as q, ModelMessage$1 as r, glob as rt, getStructuredOutput as s, write_file as st, DeepAgent as t, createWriteFileTool as tt, ApprovalResponseEvent as u, createHttpRequestTool as ut, ExecuteStartEvent as v, BackendProtocol as vt, HttpRequestFinishEvent as w, FileInfo as wt, FileEditedEvent as x, ExecuteResponse as xt, FetchUrlFinishEvent as y, DeepAgentState as yt, TodoItem as z };
|
|
1610
|
-
//# sourceMappingURL=agent-
|
|
1610
|
+
//# sourceMappingURL=agent-BwmAQJhR.d.mts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as ai15 from "ai";
|
|
2
2
|
import { LanguageModel, LanguageModel as LanguageModel$2, LanguageModelMiddleware, ModelMessage, ModelMessage as ModelMessage$1, StopCondition, ToolLoopAgent, ToolLoopAgentSettings, ToolSet } from "ai";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
|
|
@@ -366,7 +366,7 @@ declare function createWebSearchTool(state: DeepAgentState, options: {
|
|
|
366
366
|
onEvent?: EventCallback;
|
|
367
367
|
toolResultEvictionLimit?: number;
|
|
368
368
|
tavilyApiKey: string;
|
|
369
|
-
}):
|
|
369
|
+
}): ai15.Tool<{
|
|
370
370
|
query: string;
|
|
371
371
|
max_results: number;
|
|
372
372
|
topic: "general" | "news" | "finance";
|
|
@@ -380,7 +380,7 @@ declare function createHttpRequestTool(state: DeepAgentState, options: {
|
|
|
380
380
|
onEvent?: EventCallback;
|
|
381
381
|
toolResultEvictionLimit?: number;
|
|
382
382
|
defaultTimeout: number;
|
|
383
|
-
}):
|
|
383
|
+
}): ai15.Tool<{
|
|
384
384
|
timeout: number;
|
|
385
385
|
url: string;
|
|
386
386
|
method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
|
|
@@ -396,7 +396,7 @@ declare function createFetchUrlTool(state: DeepAgentState, options: {
|
|
|
396
396
|
onEvent?: EventCallback;
|
|
397
397
|
toolResultEvictionLimit?: number;
|
|
398
398
|
defaultTimeout: number;
|
|
399
|
-
}):
|
|
399
|
+
}): ai15.Tool<{
|
|
400
400
|
timeout: number;
|
|
401
401
|
url: string;
|
|
402
402
|
extract_article: boolean;
|
|
@@ -433,13 +433,13 @@ declare const fetch_url: typeof createFetchUrlTool;
|
|
|
433
433
|
/**
|
|
434
434
|
* Create the ls tool.
|
|
435
435
|
*/
|
|
436
|
-
declare function createLsTool(state: DeepAgentState, backend: BackendProtocol | BackendFactory, onEvent?: EventCallback):
|
|
436
|
+
declare function createLsTool(state: DeepAgentState, backend: BackendProtocol | BackendFactory, onEvent?: EventCallback): ai15.Tool<{
|
|
437
437
|
path: string;
|
|
438
438
|
}, string>;
|
|
439
439
|
/**
|
|
440
440
|
* Create the read_file tool.
|
|
441
441
|
*/
|
|
442
|
-
declare function createReadFileTool(state: DeepAgentState, backend: BackendProtocol | BackendFactory, evictionLimit?: number, onEvent?: EventCallback):
|
|
442
|
+
declare function createReadFileTool(state: DeepAgentState, backend: BackendProtocol | BackendFactory, evictionLimit?: number, onEvent?: EventCallback): ai15.Tool<{
|
|
443
443
|
file_path: string;
|
|
444
444
|
offset: number;
|
|
445
445
|
limit: number;
|
|
@@ -447,14 +447,14 @@ declare function createReadFileTool(state: DeepAgentState, backend: BackendProto
|
|
|
447
447
|
/**
|
|
448
448
|
* Create the write_file tool.
|
|
449
449
|
*/
|
|
450
|
-
declare function createWriteFileTool(state: DeepAgentState, backend: BackendProtocol | BackendFactory, onEvent?: EventCallback):
|
|
450
|
+
declare function createWriteFileTool(state: DeepAgentState, backend: BackendProtocol | BackendFactory, onEvent?: EventCallback): ai15.Tool<{
|
|
451
451
|
content: string;
|
|
452
452
|
file_path: string;
|
|
453
453
|
}, string>;
|
|
454
454
|
/**
|
|
455
455
|
* Create the edit_file tool.
|
|
456
456
|
*/
|
|
457
|
-
declare function createEditFileTool(state: DeepAgentState, backend: BackendProtocol | BackendFactory, onEvent?: EventCallback):
|
|
457
|
+
declare function createEditFileTool(state: DeepAgentState, backend: BackendProtocol | BackendFactory, onEvent?: EventCallback): ai15.Tool<{
|
|
458
458
|
file_path: string;
|
|
459
459
|
old_string: string;
|
|
460
460
|
new_string: string;
|
|
@@ -463,14 +463,14 @@ declare function createEditFileTool(state: DeepAgentState, backend: BackendProto
|
|
|
463
463
|
/**
|
|
464
464
|
* Create the glob tool.
|
|
465
465
|
*/
|
|
466
|
-
declare function createGlobTool(state: DeepAgentState, backend: BackendProtocol | BackendFactory, onEvent?: EventCallback):
|
|
466
|
+
declare function createGlobTool(state: DeepAgentState, backend: BackendProtocol | BackendFactory, onEvent?: EventCallback): ai15.Tool<{
|
|
467
467
|
path: string;
|
|
468
468
|
pattern: string;
|
|
469
469
|
}, string>;
|
|
470
470
|
/**
|
|
471
471
|
* Create the grep tool.
|
|
472
472
|
*/
|
|
473
|
-
declare function createGrepTool(state: DeepAgentState, backend: BackendProtocol | BackendFactory, evictionLimit?: number, onEvent?: EventCallback):
|
|
473
|
+
declare function createGrepTool(state: DeepAgentState, backend: BackendProtocol | BackendFactory, evictionLimit?: number, onEvent?: EventCallback): ai15.Tool<{
|
|
474
474
|
path: string;
|
|
475
475
|
pattern: string;
|
|
476
476
|
glob?: string | null | undefined;
|
|
@@ -493,29 +493,29 @@ interface CreateFilesystemToolsOptions {
|
|
|
493
493
|
* @param onEvent - Optional callback for emitting events (deprecated, use options)
|
|
494
494
|
*/
|
|
495
495
|
declare function createFilesystemTools(state: DeepAgentState, backendOrOptions?: BackendProtocol | BackendFactory | CreateFilesystemToolsOptions, onEvent?: EventCallback): {
|
|
496
|
-
ls:
|
|
496
|
+
ls: ai15.Tool<{
|
|
497
497
|
path: string;
|
|
498
498
|
}, string>;
|
|
499
|
-
read_file:
|
|
499
|
+
read_file: ai15.Tool<{
|
|
500
500
|
file_path: string;
|
|
501
501
|
offset: number;
|
|
502
502
|
limit: number;
|
|
503
503
|
}, string>;
|
|
504
|
-
write_file:
|
|
504
|
+
write_file: ai15.Tool<{
|
|
505
505
|
content: string;
|
|
506
506
|
file_path: string;
|
|
507
507
|
}, string>;
|
|
508
|
-
edit_file:
|
|
508
|
+
edit_file: ai15.Tool<{
|
|
509
509
|
file_path: string;
|
|
510
510
|
old_string: string;
|
|
511
511
|
new_string: string;
|
|
512
512
|
replace_all: boolean;
|
|
513
513
|
}, string>;
|
|
514
|
-
glob:
|
|
514
|
+
glob: ai15.Tool<{
|
|
515
515
|
path: string;
|
|
516
516
|
pattern: string;
|
|
517
517
|
}, string>;
|
|
518
|
-
grep:
|
|
518
|
+
grep: ai15.Tool<{
|
|
519
519
|
path: string;
|
|
520
520
|
pattern: string;
|
|
521
521
|
glob?: string | null | undefined;
|
|
@@ -538,7 +538,7 @@ declare const grep: typeof createGrepTool;
|
|
|
538
538
|
* @param state - The shared agent state
|
|
539
539
|
* @param onEvent - Optional callback for emitting events
|
|
540
540
|
*/
|
|
541
|
-
declare function createTodosTool(state: DeepAgentState, onEvent?: EventCallback):
|
|
541
|
+
declare function createTodosTool(state: DeepAgentState, onEvent?: EventCallback): ai15.Tool<{
|
|
542
542
|
todos: {
|
|
543
543
|
status: "pending" | "in_progress" | "completed" | "cancelled";
|
|
544
544
|
id: string;
|
|
@@ -599,7 +599,7 @@ interface CreateExecuteToolOptions {
|
|
|
599
599
|
* });
|
|
600
600
|
* ```
|
|
601
601
|
*/
|
|
602
|
-
declare function createExecuteTool(options: CreateExecuteToolOptions):
|
|
602
|
+
declare function createExecuteTool(options: CreateExecuteToolOptions): ai15.Tool<{
|
|
603
603
|
command: string;
|
|
604
604
|
}, string>;
|
|
605
605
|
/**
|
|
@@ -617,7 +617,7 @@ declare function createExecuteTool(options: CreateExecuteToolOptions): ai2.Tool<
|
|
|
617
617
|
* };
|
|
618
618
|
* ```
|
|
619
619
|
*/
|
|
620
|
-
declare function createExecuteToolFromBackend(backend: SandboxBackendProtocol):
|
|
620
|
+
declare function createExecuteToolFromBackend(backend: SandboxBackendProtocol): ai15.Tool<{
|
|
621
621
|
command: string;
|
|
622
622
|
}, string>;
|
|
623
623
|
/**
|
|
@@ -751,7 +751,7 @@ interface PrepareStepArgs {
|
|
|
751
751
|
stepNumber: number;
|
|
752
752
|
steps: unknown[];
|
|
753
753
|
model: LanguageModel$2;
|
|
754
|
-
messages:
|
|
754
|
+
messages: ai15.ModelMessage[];
|
|
755
755
|
experimental_context?: unknown;
|
|
756
756
|
}
|
|
757
757
|
/**
|
|
@@ -821,14 +821,14 @@ interface AdvancedAgentOptions {
|
|
|
821
821
|
* Summarization configuration options.
|
|
822
822
|
*/
|
|
823
823
|
interface SummarizationConfig {
|
|
824
|
-
/**
|
|
824
|
+
/** Whether summarization is enabled */
|
|
825
825
|
enabled: boolean;
|
|
826
|
-
/**
|
|
827
|
-
|
|
828
|
-
/**
|
|
829
|
-
|
|
830
|
-
/**
|
|
831
|
-
|
|
826
|
+
/** Optional model to use for summarization (defaults to agent model) */
|
|
827
|
+
model?: ai15.LanguageModel;
|
|
828
|
+
/** Token count threshold at which to trigger summarization */
|
|
829
|
+
tokenThreshold: number;
|
|
830
|
+
/** Number of recent messages to keep intact (not summarized) */
|
|
831
|
+
keepMessages: number;
|
|
832
832
|
}
|
|
833
833
|
/**
|
|
834
834
|
* Configuration parameters for creating a Deep Agent.
|
|
@@ -1334,7 +1334,7 @@ declare class DeepAgent {
|
|
|
1334
1334
|
generate(options: {
|
|
1335
1335
|
prompt: string;
|
|
1336
1336
|
maxSteps?: number;
|
|
1337
|
-
}): Promise<
|
|
1337
|
+
}): Promise<ai15.GenerateTextResult<{}, never> & {
|
|
1338
1338
|
state: DeepAgentState;
|
|
1339
1339
|
}>;
|
|
1340
1340
|
/**
|
|
@@ -1343,7 +1343,7 @@ declare class DeepAgent {
|
|
|
1343
1343
|
stream(options: {
|
|
1344
1344
|
prompt: string;
|
|
1345
1345
|
maxSteps?: number;
|
|
1346
|
-
}): Promise<
|
|
1346
|
+
}): Promise<ai15.StreamTextResult<{}, never> & {
|
|
1347
1347
|
state: DeepAgentState;
|
|
1348
1348
|
}>;
|
|
1349
1349
|
/**
|
|
@@ -1353,7 +1353,7 @@ declare class DeepAgent {
|
|
|
1353
1353
|
prompt: string;
|
|
1354
1354
|
state: DeepAgentState;
|
|
1355
1355
|
maxSteps?: number;
|
|
1356
|
-
}): Promise<
|
|
1356
|
+
}): Promise<ai15.GenerateTextResult<{}, never> & {
|
|
1357
1357
|
state: DeepAgentState;
|
|
1358
1358
|
}>;
|
|
1359
1359
|
/**
|
|
@@ -1607,4 +1607,4 @@ declare class DeepAgent {
|
|
|
1607
1607
|
declare function createDeepAgent(params: CreateDeepAgentParams): DeepAgent;
|
|
1608
1608
|
//#endregion
|
|
1609
1609
|
export { createLsTool as $, TextEvent as A, isSandboxBackend as At, DynamicApprovalConfig as B, FileWrittenEvent as C, FileDownloadResponse as Ct, StepStartEvent as D, GrepMatch as Dt, StepFinishEvent as E, FileUploadResponse as Et, WebSearchStartEvent as F, ResumeDecision as Ft, createExecuteToolFromBackend as G, SubAgent as H, AgentMemoryOptions as I, ResumeOptions as It, write_todos as J, execute as K, CreateDeepAgentParams as L, ToolCallEvent as M, Checkpoint as Mt, ToolResultEvent as N, CheckpointSaverOptions as Nt, SubagentFinishEvent as O, SandboxBackendProtocol as Ot, WebSearchFinishEvent as P, InterruptData as Pt, createGrepTool as Q, SummarizationConfig as R, FileWriteStartEvent as S, FileData as St, HttpRequestStartEvent as T, FileOperationError as Tt, CreateExecuteToolOptions as U, InterruptOnConfig as V, createExecuteTool as W, createFilesystemTools as X, createEditFileTool as Y, createGlobTool as Z, ExecuteFinishEvent as _, BackendFactory as _t, eventHasStructuredOutput as a, ls as at, FetchUrlStartEvent as b, EditResult as bt, hasStructuredOutput as c, CreateWebToolsOptions as ct, CheckpointLoadedEvent as d, createWebSearchTool as dt, createReadFileTool as et, CheckpointSavedEvent as f, createWebTools as ft, EventCallback as g, web_search as gt, ErrorEvent as h, http_request as ht, StructuredAgentResult as i, grep as it, TodosChangedEvent as j, BaseCheckpointSaver as jt, SubagentStartEvent as k, WriteResult as kt, ApprovalRequestedEvent as l, createFetchUrlTool as lt, DoneEvent as m, htmlToMarkdown as mt, createDeepAgent as n, edit_file as nt, getEventOutput as o, read_file as ot, DeepAgentEvent as p, fetch_url as pt, createTodosTool as q, ModelMessage$1 as r, glob as rt, getStructuredOutput as s, write_file as st, DeepAgent as t, createWriteFileTool as tt, ApprovalResponseEvent as u, createHttpRequestTool as ut, ExecuteStartEvent as v, BackendProtocol as vt, HttpRequestFinishEvent as w, FileInfo as wt, FileEditedEvent as x, ExecuteResponse as xt, FetchUrlFinishEvent as y, DeepAgentState as yt, TodoItem as z };
|
|
1610
|
-
//# sourceMappingURL=agent-
|
|
1610
|
+
//# sourceMappingURL=agent-DuvtniwH.d.cts.map
|