deepagentsdk 0.11.0 → 0.11.1
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/package.json +1 -1
- package/src/adapters/elements/index.ts +5 -5
- package/src/adapters/elements/messageAdapter.ts +2 -2
- package/src/adapters/elements/statusAdapter.ts +2 -2
- package/src/adapters/elements/useElementsAdapter.ts +6 -6
- package/src/backends/persistent.ts +3 -3
- package/src/cli/components/ApiKeyInput.tsx +1 -1
- package/src/cli/components/FilePreview.tsx +2 -2
- package/src/cli/components/Input.tsx +2 -2
- package/src/cli/components/Message.tsx +2 -2
- package/src/cli/components/ModelSelection.tsx +2 -2
- package/src/cli/components/SlashMenu.tsx +1 -1
- package/src/cli/components/StatusBar.tsx +1 -1
- package/src/cli/components/Subagent.tsx +1 -1
- package/src/cli/components/TodoList.tsx +2 -2
- package/src/cli/components/ToolCall.tsx +1 -1
- package/src/cli/components/ToolCallSummary.tsx +2 -2
- package/src/cli/components/Welcome.tsx +1 -1
- package/src/cli/components/index.ts +13 -13
- package/src/cli/hooks/index.ts +1 -1
- package/src/cli/hooks/useAgent.ts +6 -6
- package/src/cli/index.tsx +7 -7
- package/src/middleware/agent-memory.ts +1 -1
- package/src/skills/load.ts +1 -1
- package/src/types/backend.ts +1 -1
- package/src/types/core.ts +3 -3
- package/src/types/events.ts +3 -3
- package/src/types/index.ts +7 -7
- package/src/types/subagent.ts +1 -1
- package/src/utils/eviction.ts +2 -2
- package/src/utils/index.ts +5 -5
- package/src/utils/summarization.ts +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "deepagentsdk",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.1",
|
|
4
4
|
"description": "Deep Agent implementation using Vercel AI SDK - build controllable AI agents with planning, filesystem, and subagent capabilities",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"module": "./src/index.ts",
|
|
@@ -8,14 +8,14 @@
|
|
|
8
8
|
* @see https://ai-sdk.dev/elements
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
export { useElementsAdapter } from "./useElementsAdapter
|
|
12
|
-
export type { UseElementsAdapterOptions } from "./useElementsAdapter
|
|
11
|
+
export { useElementsAdapter } from "./useElementsAdapter";
|
|
12
|
+
export type { UseElementsAdapterOptions } from "./useElementsAdapter";
|
|
13
13
|
|
|
14
|
-
export { mapAgentStatusToUIStatus } from "./statusAdapter
|
|
14
|
+
export { mapAgentStatusToUIStatus } from "./statusAdapter";
|
|
15
15
|
export {
|
|
16
16
|
convertEventsToUIMessages,
|
|
17
17
|
extractToolParts,
|
|
18
|
-
} from "./messageAdapter
|
|
18
|
+
} from "./messageAdapter";
|
|
19
19
|
|
|
20
20
|
export type {
|
|
21
21
|
UIMessage,
|
|
@@ -24,4 +24,4 @@ export type {
|
|
|
24
24
|
PromptInputMessage,
|
|
25
25
|
ToolUIPart,
|
|
26
26
|
UseElementsAdapterReturn,
|
|
27
|
-
} from "./types
|
|
27
|
+
} from "./types";
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* Converts deepagentsdk events to Elements UIMessage format
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import type { AgentEventLog } from "../../cli/hooks/useAgent
|
|
8
|
-
import type { UIMessage, UIMessagePart, UIStatus } from "./types
|
|
7
|
+
import type { AgentEventLog } from "../../cli/hooks/useAgent";
|
|
8
|
+
import type { UIMessage, UIMessagePart, UIStatus } from "./types";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Converts agent event log to UIMessage format expected by Elements
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* Maps deepagentsdk AgentStatus to Elements UIStatus
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import type { AgentStatus } from "../../cli/hooks/useAgent
|
|
8
|
-
import type { UIStatus } from "./types
|
|
7
|
+
import type { AgentStatus } from "../../cli/hooks/useAgent";
|
|
8
|
+
import type { UIStatus } from "./types";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Maps deepagentsdk AgentStatus to Elements UIStatus
|
|
@@ -5,20 +5,20 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import { useState, useCallback, useRef, useMemo } from "react";
|
|
8
|
-
import { createDeepAgent } from "../../agent
|
|
8
|
+
import { createDeepAgent } from "../../agent";
|
|
9
9
|
import type { LanguageModel, ToolSet } from "ai";
|
|
10
10
|
import type {
|
|
11
11
|
BackendProtocol,
|
|
12
12
|
DeepAgentState,
|
|
13
13
|
DeepAgentEvent,
|
|
14
|
-
} from "../../types
|
|
14
|
+
} from "../../types";
|
|
15
15
|
import {
|
|
16
16
|
convertEventsToUIMessages,
|
|
17
17
|
extractToolParts,
|
|
18
|
-
} from "./messageAdapter
|
|
19
|
-
import { mapAgentStatusToUIStatus } from "./statusAdapter
|
|
20
|
-
import type { UseElementsAdapterReturn, PromptInputMessage } from "./types
|
|
21
|
-
import type { AgentStatus, AgentEventLog } from "../../cli/hooks/useAgent
|
|
18
|
+
} from "./messageAdapter";
|
|
19
|
+
import { mapAgentStatusToUIStatus } from "./statusAdapter";
|
|
20
|
+
import type { UseElementsAdapterReturn, PromptInputMessage } from "./types";
|
|
21
|
+
import type { AgentStatus, AgentEventLog } from "../../cli/hooks/useAgent";
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* Options for useElementsAdapter hook
|
|
@@ -13,7 +13,7 @@ import type {
|
|
|
13
13
|
FileInfo,
|
|
14
14
|
GrepMatch,
|
|
15
15
|
WriteResult,
|
|
16
|
-
} from "../types
|
|
16
|
+
} from "../types";
|
|
17
17
|
import {
|
|
18
18
|
createFileData,
|
|
19
19
|
fileDataToString,
|
|
@@ -22,11 +22,11 @@ import {
|
|
|
22
22
|
grepMatchesFromFiles,
|
|
23
23
|
performStringReplacement,
|
|
24
24
|
updateFileData,
|
|
25
|
-
} from "./utils
|
|
25
|
+
} from "./utils";
|
|
26
26
|
import {
|
|
27
27
|
FILE_NOT_FOUND,
|
|
28
28
|
FILE_ALREADY_EXISTS,
|
|
29
|
-
} from "../constants/errors
|
|
29
|
+
} from "../constants/errors";
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
32
|
* Generic key-value store interface for persistent storage.
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import React from "react";
|
|
5
5
|
import { Box, Text } from "ink";
|
|
6
|
-
import { emoji, colors } from "../theme
|
|
7
|
-
import type { FileInfo } from "../../types
|
|
6
|
+
import { emoji, colors } from "../theme";
|
|
7
|
+
import type { FileInfo } from "../../types";
|
|
8
8
|
|
|
9
9
|
interface FilePreviewProps {
|
|
10
10
|
/** File path */
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import React, { useState, useRef } from "react";
|
|
6
6
|
import { Box, Text, useInput } from "ink";
|
|
7
|
-
import { colors } from "../theme
|
|
8
|
-
import { SlashMenu } from "./SlashMenu
|
|
7
|
+
import { colors } from "../theme";
|
|
8
|
+
import { SlashMenu } from "./SlashMenu";
|
|
9
9
|
|
|
10
10
|
interface InputProps {
|
|
11
11
|
/** Called when user submits input */
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import React from "react";
|
|
6
6
|
import { Box, Text } from "ink";
|
|
7
|
-
import { colors } from "../theme
|
|
8
|
-
import { ToolCallSummary } from "./ToolCallSummary
|
|
7
|
+
import { colors } from "../theme";
|
|
8
|
+
import { ToolCallSummary } from "./ToolCallSummary";
|
|
9
9
|
|
|
10
10
|
export type MessageRole = "user" | "assistant";
|
|
11
11
|
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
import React, { useState, useEffect, useMemo } from "react";
|
|
6
6
|
import { Box, Text, useInput } from "ink";
|
|
7
7
|
import { Spinner } from "@inkjs/ui";
|
|
8
|
-
import { colors, emoji } from "../theme
|
|
8
|
+
import { colors, emoji } from "../theme";
|
|
9
9
|
import {
|
|
10
10
|
getModelsByProvider,
|
|
11
11
|
detectAvailableProviders,
|
|
12
12
|
type AvailableModel,
|
|
13
|
-
} from "../utils/model-list
|
|
13
|
+
} from "../utils/model-list";
|
|
14
14
|
|
|
15
15
|
interface ModelSelectionPanelProps {
|
|
16
16
|
currentModel?: string;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import React from "react";
|
|
5
5
|
import { Box, Text } from "ink";
|
|
6
|
-
import { colors, filterCommands, type SlashCommand } from "../theme
|
|
6
|
+
import { colors, filterCommands, type SlashCommand } from "../theme";
|
|
7
7
|
|
|
8
8
|
interface SlashMenuProps {
|
|
9
9
|
/** Current input value to filter commands */
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import React from "react";
|
|
5
5
|
import { Box, Text } from "ink";
|
|
6
6
|
import { Spinner, StatusMessage } from "@inkjs/ui";
|
|
7
|
-
import { emoji, colors } from "../theme
|
|
7
|
+
import { emoji, colors } from "../theme";
|
|
8
8
|
|
|
9
9
|
interface SubagentStartProps {
|
|
10
10
|
/** Subagent name */
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
import React from "react";
|
|
5
5
|
import { Box, Text } from "ink";
|
|
6
6
|
import { Badge } from "@inkjs/ui";
|
|
7
|
-
import { emoji, colors } from "../theme
|
|
8
|
-
import type { TodoItem } from "../../types
|
|
7
|
+
import { emoji, colors } from "../theme";
|
|
8
|
+
import type { TodoItem } from "../../types";
|
|
9
9
|
|
|
10
10
|
interface TodoListProps {
|
|
11
11
|
todos: TodoItem[];
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import React, { useState } from "react";
|
|
6
6
|
import { Box, Text, useInput } from "ink";
|
|
7
|
-
import { colors, emoji } from "../theme
|
|
8
|
-
import type { ToolCallData } from "./Message
|
|
7
|
+
import { colors, emoji } from "../theme";
|
|
8
|
+
import type { ToolCallData } from "./Message";
|
|
9
9
|
|
|
10
10
|
interface ToolCallSummaryProps {
|
|
11
11
|
/** Array of tool calls to display */
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Export all CLI components.
|
|
3
3
|
*/
|
|
4
|
-
export { Welcome, WelcomeHint } from "./Welcome
|
|
5
|
-
export { Input } from "./Input
|
|
6
|
-
export { SlashMenu, SlashMenuPanel } from "./SlashMenu
|
|
7
|
-
export { Message, StreamingMessage, type MessageData, type MessageRole, type ToolCallData } from "./Message
|
|
8
|
-
export { TodoList, TodosChanged } from "./TodoList
|
|
9
|
-
export { FilePreview, FileWritten, FileEdited, FileRead, LsResult, GlobResult, GrepResult, FileList } from "./FilePreview
|
|
4
|
+
export { Welcome, WelcomeHint } from "./Welcome";
|
|
5
|
+
export { Input } from "./Input";
|
|
6
|
+
export { SlashMenu, SlashMenuPanel } from "./SlashMenu";
|
|
7
|
+
export { Message, StreamingMessage, type MessageData, type MessageRole, type ToolCallData } from "./Message";
|
|
8
|
+
export { TodoList, TodosChanged } from "./TodoList";
|
|
9
|
+
export { FilePreview, FileWritten, FileEdited, FileRead, LsResult, GlobResult, GrepResult, FileList } from "./FilePreview";
|
|
10
10
|
export {
|
|
11
11
|
ToolCall,
|
|
12
12
|
ToolResult,
|
|
@@ -14,11 +14,11 @@ export {
|
|
|
14
14
|
ThinkingIndicator,
|
|
15
15
|
DoneIndicator,
|
|
16
16
|
ErrorDisplay,
|
|
17
|
-
} from "./ToolCall
|
|
18
|
-
export { SubagentStart, SubagentFinish, SubagentRunning } from "./Subagent
|
|
19
|
-
export { StatusBar } from "./StatusBar
|
|
20
|
-
export { ToolCallSummary, InlineToolCall } from "./ToolCallSummary
|
|
21
|
-
export { ModelSelectionPanel } from "./ModelSelection
|
|
22
|
-
export { ApiKeyInputPanel, ApiKeyStatus } from "./ApiKeyInput
|
|
23
|
-
export { ToolApproval } from "./ToolApproval
|
|
17
|
+
} from "./ToolCall";
|
|
18
|
+
export { SubagentStart, SubagentFinish, SubagentRunning } from "./Subagent";
|
|
19
|
+
export { StatusBar } from "./StatusBar";
|
|
20
|
+
export { ToolCallSummary, InlineToolCall } from "./ToolCallSummary";
|
|
21
|
+
export { ModelSelectionPanel } from "./ModelSelection";
|
|
22
|
+
export { ApiKeyInputPanel, ApiKeyStatus } from "./ApiKeyInput";
|
|
23
|
+
export { ToolApproval } from "./ToolApproval";
|
|
24
24
|
|
package/src/cli/hooks/index.ts
CHANGED
|
@@ -9,12 +9,12 @@ import type {
|
|
|
9
9
|
ModelMessage,
|
|
10
10
|
SummarizationConfig,
|
|
11
11
|
InterruptOnConfig,
|
|
12
|
-
} from "../../types
|
|
13
|
-
import type { BaseCheckpointSaver } from "../../checkpointer/types
|
|
14
|
-
import { createDeepAgent } from "../../agent
|
|
15
|
-
import { parseModelString } from "../../utils/model-parser
|
|
16
|
-
import type { SandboxBackendProtocol } from "../../types
|
|
17
|
-
import type { ToolCallData } from "../components/Message
|
|
12
|
+
} from "../../types";
|
|
13
|
+
import type { BaseCheckpointSaver } from "../../checkpointer/types";
|
|
14
|
+
import { createDeepAgent } from "../../agent";
|
|
15
|
+
import { parseModelString } from "../../utils/model-parser";
|
|
16
|
+
import type { SandboxBackendProtocol } from "../../types";
|
|
17
|
+
import type { ToolCallData } from "../components/Message";
|
|
18
18
|
import { useEffect } from "react";
|
|
19
19
|
|
|
20
20
|
export type AgentStatus =
|
package/src/cli/index.tsx
CHANGED
|
@@ -12,15 +12,15 @@
|
|
|
12
12
|
|
|
13
13
|
import React, { useState, useEffect, useCallback } from "react";
|
|
14
14
|
import { render, useApp, useInput, Box, Text, Static } from "ink";
|
|
15
|
-
import { LocalSandbox } from "../backends/local-sandbox
|
|
15
|
+
import { LocalSandbox } from "../backends/local-sandbox";
|
|
16
16
|
import {
|
|
17
17
|
DEFAULT_EVICTION_TOKEN_LIMIT,
|
|
18
18
|
DEFAULT_SUMMARIZATION_THRESHOLD,
|
|
19
19
|
DEFAULT_KEEP_MESSAGES,
|
|
20
20
|
CONTEXT_WINDOW,
|
|
21
21
|
} from "../constants/limits";
|
|
22
|
-
import { FileSaver } from "../checkpointer/file-saver
|
|
23
|
-
import { useAgent, type AgentEventLog } from "./hooks/useAgent
|
|
22
|
+
import { FileSaver } from "../checkpointer/file-saver";
|
|
23
|
+
import { useAgent, type AgentEventLog } from "./hooks/useAgent";
|
|
24
24
|
import {
|
|
25
25
|
Welcome,
|
|
26
26
|
WelcomeHint,
|
|
@@ -49,10 +49,10 @@ import {
|
|
|
49
49
|
ApiKeyInputPanel,
|
|
50
50
|
ToolApproval,
|
|
51
51
|
type MessageData,
|
|
52
|
-
} from "./components/index
|
|
53
|
-
import { parseCommand, colors, SLASH_COMMANDS } from "./theme
|
|
54
|
-
import type { FileInfo } from "../types
|
|
55
|
-
import { estimateMessagesTokens } from "../utils/summarization
|
|
52
|
+
} from "./components/index";
|
|
53
|
+
import { parseCommand, colors, SLASH_COMMANDS } from "./theme";
|
|
54
|
+
import type { FileInfo } from "../types";
|
|
55
|
+
import { estimateMessagesTokens } from "../utils/summarization";
|
|
56
56
|
|
|
57
57
|
// ============================================================================
|
|
58
58
|
// CLI Arguments
|
|
@@ -2,7 +2,7 @@ import * as fs from 'node:fs/promises';
|
|
|
2
2
|
import * as path from 'node:path';
|
|
3
3
|
import os from 'node:os';
|
|
4
4
|
import type { LanguageModelMiddleware } from 'ai';
|
|
5
|
-
import { findGitRoot } from '../utils/project-detection
|
|
5
|
+
import { findGitRoot } from '../utils/project-detection';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Configuration options for agent memory middleware.
|
package/src/skills/load.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as fs from "node:fs/promises";
|
|
|
2
2
|
import * as path from "node:path";
|
|
3
3
|
import os from "node:os";
|
|
4
4
|
import type { SkillMetadata, SkillLoadOptions } from "./types";
|
|
5
|
-
import { findGitRoot } from "../utils/project-detection
|
|
5
|
+
import { findGitRoot } from "../utils/project-detection";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Parse YAML frontmatter from a SKILL.md file.
|
package/src/types/backend.ts
CHANGED
package/src/types/core.ts
CHANGED
|
@@ -10,9 +10,9 @@ import type {
|
|
|
10
10
|
ToolLoopAgentSettings,
|
|
11
11
|
} from "ai";
|
|
12
12
|
import type { z } from "zod";
|
|
13
|
-
import type { BaseCheckpointSaver } from "../checkpointer/types
|
|
14
|
-
import type { BackendProtocol, BackendFactory } from "./backend
|
|
15
|
-
import type { SubAgent, InterruptOnConfig } from "./subagent
|
|
13
|
+
import type { BaseCheckpointSaver } from "../checkpointer/types";
|
|
14
|
+
import type { BackendProtocol, BackendFactory } from "./backend";
|
|
15
|
+
import type { SubAgent, InterruptOnConfig } from "./subagent";
|
|
16
16
|
|
|
17
17
|
// Re-export LanguageModel for convenience
|
|
18
18
|
export type { LanguageModel };
|
package/src/types/events.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { TodoItem } from "./core
|
|
2
|
-
import type { DeepAgentState } from "./backend
|
|
1
|
+
import type { TodoItem } from "./core";
|
|
2
|
+
import type { DeepAgentState } from "./backend";
|
|
3
3
|
import type { ModelMessage } from "ai";
|
|
4
|
-
import type { ResumeOptions } from "../checkpointer/types
|
|
4
|
+
import type { ResumeOptions } from "../checkpointer/types";
|
|
5
5
|
|
|
6
6
|
// ============================================================================
|
|
7
7
|
// Event Types for Streaming
|
package/src/types/index.ts
CHANGED
|
@@ -14,7 +14,7 @@ export type {
|
|
|
14
14
|
AdvancedAgentOptions,
|
|
15
15
|
SummarizationConfig,
|
|
16
16
|
CreateDeepAgentParams,
|
|
17
|
-
} from "./core
|
|
17
|
+
} from "./core";
|
|
18
18
|
|
|
19
19
|
// Backend types
|
|
20
20
|
export type {
|
|
@@ -28,9 +28,9 @@ export type {
|
|
|
28
28
|
BackendFactory,
|
|
29
29
|
ExecuteResponse,
|
|
30
30
|
SandboxBackendProtocol,
|
|
31
|
-
} from "./backend
|
|
31
|
+
} from "./backend";
|
|
32
32
|
|
|
33
|
-
export { isSandboxBackend } from "./backend
|
|
33
|
+
export { isSandboxBackend } from "./backend";
|
|
34
34
|
|
|
35
35
|
// Event types
|
|
36
36
|
export type {
|
|
@@ -70,7 +70,7 @@ export type {
|
|
|
70
70
|
EventCallback,
|
|
71
71
|
ToolEventContext,
|
|
72
72
|
StreamWithEventsOptions,
|
|
73
|
-
} from "./events
|
|
73
|
+
} from "./events";
|
|
74
74
|
|
|
75
75
|
// Subagent types
|
|
76
76
|
export type {
|
|
@@ -79,16 +79,16 @@ export type {
|
|
|
79
79
|
BuiltinToolCreator,
|
|
80
80
|
SubagentToolConfig,
|
|
81
81
|
SubAgent,
|
|
82
|
-
} from "./subagent
|
|
82
|
+
} from "./subagent";
|
|
83
83
|
|
|
84
84
|
// Structured output types
|
|
85
85
|
export type {
|
|
86
86
|
StructuredAgentResult,
|
|
87
|
-
} from "./structured-output
|
|
87
|
+
} from "./structured-output";
|
|
88
88
|
|
|
89
89
|
export {
|
|
90
90
|
hasStructuredOutput,
|
|
91
91
|
eventHasStructuredOutput,
|
|
92
92
|
getStructuredOutput,
|
|
93
93
|
getEventOutput,
|
|
94
|
-
} from "./structured-output
|
|
94
|
+
} from "./structured-output";
|
package/src/types/subagent.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import type { ToolSet, LanguageModel } from "ai";
|
|
6
6
|
import type { z } from "zod";
|
|
7
|
-
import type { GenerationOptions, AdvancedAgentOptions } from "./core
|
|
7
|
+
import type { GenerationOptions, AdvancedAgentOptions } from "./core";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Configuration for dynamic tool approval.
|
package/src/utils/eviction.ts
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* This prevents context overflow from large tool outputs.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import type { BackendProtocol, BackendFactory, DeepAgentState } from "../types
|
|
10
|
-
import { DEFAULT_EVICTION_TOKEN_LIMIT as CENTRALIZED_EVICTION_LIMIT } from "../constants/limits
|
|
9
|
+
import type { BackendProtocol, BackendFactory, DeepAgentState } from "../types";
|
|
10
|
+
import { DEFAULT_EVICTION_TOKEN_LIMIT as CENTRALIZED_EVICTION_LIMIT } from "../constants/limits";
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Default token limit before evicting a tool result.
|
package/src/utils/index.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Utility functions for AI SDK Deep Agent.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
export { patchToolCalls, hasDanglingToolCalls } from "./patch-tool-calls
|
|
5
|
+
export { patchToolCalls, hasDanglingToolCalls } from "./patch-tool-calls";
|
|
6
6
|
export {
|
|
7
7
|
evictToolResult,
|
|
8
8
|
createToolResultWrapper,
|
|
@@ -12,7 +12,7 @@ export {
|
|
|
12
12
|
DEFAULT_EVICTION_TOKEN_LIMIT,
|
|
13
13
|
type EvictOptions,
|
|
14
14
|
type EvictResult,
|
|
15
|
-
} from "./eviction
|
|
15
|
+
} from "./eviction";
|
|
16
16
|
export {
|
|
17
17
|
summarizeIfNeeded,
|
|
18
18
|
needsSummarization,
|
|
@@ -21,14 +21,14 @@ export {
|
|
|
21
21
|
DEFAULT_KEEP_MESSAGES,
|
|
22
22
|
type SummarizationOptions,
|
|
23
23
|
type SummarizationResult,
|
|
24
|
-
} from "./summarization
|
|
24
|
+
} from "./summarization";
|
|
25
25
|
export {
|
|
26
26
|
parseModelString,
|
|
27
|
-
} from "./model-parser
|
|
27
|
+
} from "./model-parser";
|
|
28
28
|
export {
|
|
29
29
|
applyInterruptConfig,
|
|
30
30
|
wrapToolsWithApproval,
|
|
31
31
|
hasApprovalTools,
|
|
32
32
|
type ApprovalCallback,
|
|
33
|
-
} from "./approval
|
|
33
|
+
} from "./approval";
|
|
34
34
|
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { generateText, type LanguageModel } from "ai";
|
|
9
|
-
import type { ModelMessage } from "../types
|
|
10
|
-
import { estimateTokens } from "./eviction
|
|
9
|
+
import type { ModelMessage } from "../types";
|
|
10
|
+
import { estimateTokens } from "./eviction";
|
|
11
11
|
import {
|
|
12
12
|
DEFAULT_SUMMARIZATION_THRESHOLD as CENTRALIZED_THRESHOLD,
|
|
13
13
|
DEFAULT_KEEP_MESSAGES as CENTRALIZED_KEEP,
|
|
14
|
-
} from "../constants/limits
|
|
14
|
+
} from "../constants/limits";
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Default token threshold before triggering summarization.
|