openloops 0.1.8 → 0.1.9
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/agent-loop-C41Y1CGp.d.mts +60 -0
- package/dist/agent-loop-ZH4GRi4A.d.ts +60 -0
- package/dist/base.use-case-8K6_Ods0.d.mts +14 -0
- package/dist/base.use-case-ChEb3nh6.d.ts +14 -0
- package/dist/chunk-6PCVBY5G.mjs +1 -0
- package/dist/chunk-7WJ3XXSP.mjs +7 -0
- package/dist/chunk-CCRMOWMO.mjs +1 -0
- package/dist/chunk-ISOEJA2L.mjs +1 -0
- package/dist/chunk-XXB52O7H.mjs +1 -0
- package/dist/{services/app/core/current-session.d.ts → current-session-DC-SF7rl.d.mts} +5 -4
- package/dist/current-session-DC-SF7rl.d.ts +130 -0
- package/dist/current-user-4BppBUBP.d.mts +264 -0
- package/dist/current-user-4BppBUBP.d.ts +264 -0
- package/dist/index.d.mts +10 -0
- package/dist/index.d.ts +10 -1
- package/dist/index.mjs +1 -7
- package/dist/services/agent/core/index.d.mts +122 -0
- package/dist/services/agent/core/index.d.ts +122 -3
- package/dist/services/agent/core/index.js +7 -0
- package/dist/services/agent/core/index.mjs +1 -0
- package/dist/services/agent/loops/index.d.mts +116 -0
- package/dist/services/agent/loops/index.d.ts +116 -2
- package/dist/services/agent/loops/index.js +10 -0
- package/dist/services/agent/loops/index.mjs +4 -0
- package/dist/services/agent/skills/index.d.mts +14 -0
- package/dist/services/agent/skills/index.d.ts +14 -2
- package/dist/services/agent/skills/index.js +7 -0
- package/dist/services/agent/skills/index.mjs +1 -0
- package/dist/services/agent/tools/index.d.mts +12 -0
- package/dist/services/agent/tools/index.d.ts +12 -2
- package/dist/services/agent/tools/index.js +7 -0
- package/dist/services/agent/tools/index.mjs +1 -0
- package/dist/services/app/core/index.d.mts +60 -0
- package/dist/services/app/core/index.d.ts +60 -3
- package/dist/services/app/core/index.js +7 -0
- package/dist/services/app/core/index.mjs +1 -0
- package/dist/skill-CtYQbG6-.d.ts +308 -0
- package/dist/skill-DXNkK5FG.d.mts +308 -0
- package/dist/tool-BaG2a8Np.d.mts +42 -0
- package/dist/{services/agent/tools/tool.d.ts → tool-DMR_ZdjP.d.ts} +9 -7
- package/package.json +2 -2
- package/dist/common/clients/index.d.ts +0 -3
- package/dist/common/clients/llm-client.d.ts +0 -30
- package/dist/common/clients/sentry-client.d.ts +0 -10
- package/dist/common/clients/serper-client.d.ts +0 -66
- package/dist/common/core/base.app.d.ts +0 -12
- package/dist/common/core/base.entity.d.ts +0 -55
- package/dist/common/core/base.use-case.d.ts +0 -15
- package/dist/common/core/index.d.ts +0 -1
- package/dist/common/core/utils/delete-empty-fields.d.ts +0 -1
- package/dist/common/core/utils/flatten-object.d.ts +0 -1
- package/dist/common/core/utils/index.d.ts +0 -3
- package/dist/common/core/utils/is-plain-object.d.ts +0 -1
- package/dist/common/decorators/admin-only/admin-only.d.ts +0 -2
- package/dist/common/decorators/admin-only/index.d.ts +0 -1
- package/dist/common/decorators/index.d.ts +0 -3
- package/dist/common/decorators/mask-in-logs/index.d.ts +0 -1
- package/dist/common/decorators/mask-in-logs/mask-in-logs.d.ts +0 -2
- package/dist/common/decorators/owner-only/index.d.ts +0 -1
- package/dist/common/decorators/owner-only/owner-only.d.ts +0 -2
- package/dist/common/error/http-error.d.ts +0 -11
- package/dist/common/error/index.d.ts +0 -2
- package/dist/common/error/reportError.d.ts +0 -2
- package/dist/common/helpers/extract-json-from-text.d.ts +0 -1
- package/dist/common/helpers/index.d.ts +0 -2
- package/dist/common/helpers/sanitize-string.d.ts +0 -1
- package/dist/common/logger/index.d.ts +0 -1
- package/dist/common/logger/pino.d.ts +0 -12
- package/dist/common/repositories/index.d.ts +0 -2
- package/dist/common/repositories/mongo-db.client.d.ts +0 -11
- package/dist/common/repositories/mongo-db.repository.d.ts +0 -87
- package/dist/common/utils/secret-manager.d.ts +0 -15
- package/dist/services/agent/core/agent-loop.d.ts +0 -38
- package/dist/services/agent/core/agent-state.d.ts +0 -42
- package/dist/services/agent/core/agent.d.ts +0 -70
- package/dist/services/agent/loops/plan-execute/index.d.ts +0 -1
- package/dist/services/agent/loops/plan-execute/plan-execute-loop.d.ts +0 -27
- package/dist/services/agent/loops/shared/index.d.ts +0 -1
- package/dist/services/agent/loops/shared/skills/action-planner.d.ts +0 -35
- package/dist/services/agent/loops/shared/skills/confirmation-gate.d.ts +0 -9
- package/dist/services/agent/loops/shared/skills/fast-responder.d.ts +0 -9
- package/dist/services/agent/loops/shared/skills/final-responder.d.ts +0 -7
- package/dist/services/agent/loops/shared/skills/index.d.ts +0 -6
- package/dist/services/agent/loops/shared/skills/state-observer.d.ts +0 -10
- package/dist/services/agent/loops/shared/skills/strategy-engine.d.ts +0 -15
- package/dist/services/agent/modules/chats/entities/agent-action.entity.d.ts +0 -58
- package/dist/services/agent/modules/chats/entities/agent-task.entity.d.ts +0 -59
- package/dist/services/agent/modules/chats/entities/chat-context.entity.d.ts +0 -39
- package/dist/services/agent/modules/chats/entities/chat-message.entity.d.ts +0 -16
- package/dist/services/agent/modules/chats/entities/chat-settings.entity.d.ts +0 -17
- package/dist/services/agent/modules/chats/entities/chat.entity.d.ts +0 -50
- package/dist/services/agent/modules/chats/entities/index.d.ts +0 -1
- package/dist/services/agent/modules/chats/lambdas/create-chat/create-chat.use-case.d.ts +0 -14
- package/dist/services/agent/modules/chats/lambdas/create-chat/index.d.ts +0 -1
- package/dist/services/agent/modules/chats/lambdas/delete-chat/delete-chat.use-case.d.ts +0 -15
- package/dist/services/agent/modules/chats/lambdas/delete-chat/index.d.ts +0 -1
- package/dist/services/agent/modules/chats/lambdas/get-chat-by-id/get-chat-by-id.use-case.d.ts +0 -14
- package/dist/services/agent/modules/chats/lambdas/get-chat-by-id/index.d.ts +0 -1
- package/dist/services/agent/modules/chats/lambdas/interrupt-execution/index.d.ts +0 -1
- package/dist/services/agent/modules/chats/lambdas/interrupt-execution/interrupt-execution.use-case.d.ts +0 -14
- package/dist/services/agent/modules/chats/lambdas/list-chats-by-props/index.d.ts +0 -1
- package/dist/services/agent/modules/chats/lambdas/list-chats-by-props/list-chats-by-props.use-case.d.ts +0 -16
- package/dist/services/agent/modules/chats/lambdas/list-chats-by-user/index.d.ts +0 -1
- package/dist/services/agent/modules/chats/lambdas/list-chats-by-user/list-chats-by-user.use-case.d.ts +0 -16
- package/dist/services/agent/modules/chats/lambdas/update-chat/index.d.ts +0 -1
- package/dist/services/agent/modules/chats/lambdas/update-chat/update-chat.use-case.d.ts +0 -15
- package/dist/services/agent/modules/chats/repositories/chat.repository.d.ts +0 -10
- package/dist/services/agent/modules/chats/repositories/index.d.ts +0 -1
- package/dist/services/agent/modules/llmcalls/entities/index.d.ts +0 -1
- package/dist/services/agent/modules/llmcalls/entities/llmcall.entity.d.ts +0 -23
- package/dist/services/agent/modules/llmcalls/lambdas/create-llmcall/create-llmcall.use-case.d.ts +0 -14
- package/dist/services/agent/modules/llmcalls/lambdas/create-llmcall/index.d.ts +0 -1
- package/dist/services/agent/modules/llmcalls/lambdas/delete-llmcall/delete-llmcall.use-case.d.ts +0 -15
- package/dist/services/agent/modules/llmcalls/lambdas/delete-llmcall/index.d.ts +0 -1
- package/dist/services/agent/modules/llmcalls/lambdas/get-llm-usage/get-llm-usage.use-case.d.ts +0 -21
- package/dist/services/agent/modules/llmcalls/lambdas/get-llm-usage/index.d.ts +0 -1
- package/dist/services/agent/modules/llmcalls/lambdas/get-llmcall-by-id/get-llmcall-by-id.use-case.d.ts +0 -14
- package/dist/services/agent/modules/llmcalls/lambdas/get-llmcall-by-id/index.d.ts +0 -1
- package/dist/services/agent/modules/llmcalls/lambdas/list-llmcalls-by-props/index.d.ts +0 -1
- package/dist/services/agent/modules/llmcalls/lambdas/list-llmcalls-by-props/list-llmcalls-by-props.use-case.d.ts +0 -16
- package/dist/services/agent/modules/llmcalls/lambdas/update-llmcall/index.d.ts +0 -1
- package/dist/services/agent/modules/llmcalls/lambdas/update-llmcall/update-llmcall.use-case.d.ts +0 -15
- package/dist/services/agent/modules/llmcalls/repositories/index.d.ts +0 -1
- package/dist/services/agent/modules/llmcalls/repositories/llmcall.repository.d.ts +0 -10
- package/dist/services/agent/modules/mcp-servers/entities/index.d.ts +0 -1
- package/dist/services/agent/modules/mcp-servers/entities/mcpserver.entity.d.ts +0 -23
- package/dist/services/agent/modules/mcp-servers/lambdas/create-mcpserver/create-mcpserver.use-case.d.ts +0 -14
- package/dist/services/agent/modules/mcp-servers/lambdas/create-mcpserver/index.d.ts +0 -1
- package/dist/services/agent/modules/mcp-servers/lambdas/delete-mcpserver/delete-mcpserver.use-case.d.ts +0 -15
- package/dist/services/agent/modules/mcp-servers/lambdas/delete-mcpserver/index.d.ts +0 -1
- package/dist/services/agent/modules/mcp-servers/lambdas/get-mcpserver-by-id/get-mcpserver-by-id.use-case.d.ts +0 -14
- package/dist/services/agent/modules/mcp-servers/lambdas/get-mcpserver-by-id/index.d.ts +0 -1
- package/dist/services/agent/modules/mcp-servers/lambdas/list-mcpservers-by-user/index.d.ts +0 -1
- package/dist/services/agent/modules/mcp-servers/lambdas/list-mcpservers-by-user/list-mcpservers-by-user.use-case.d.ts +0 -16
- package/dist/services/agent/modules/mcp-servers/lambdas/update-mcpserver/index.d.ts +0 -1
- package/dist/services/agent/modules/mcp-servers/lambdas/update-mcpserver/update-mcpserver.use-case.d.ts +0 -15
- package/dist/services/agent/modules/mcp-servers/repositories/index.d.ts +0 -1
- package/dist/services/agent/modules/mcp-servers/repositories/mcpserver.repository.d.ts +0 -10
- package/dist/services/agent/skills/shared/index.d.ts +0 -1
- package/dist/services/agent/skills/shared/shared-rules.d.ts +0 -4
- package/dist/services/agent/skills/skill-runner.d.ts +0 -31
- package/dist/services/agent/skills/skill.d.ts +0 -33
- package/dist/services/agent/tools/core/call-ai/call-ai.skill.d.ts +0 -6
- package/dist/services/agent/tools/core/call-ai/call-ai.tool.d.ts +0 -2
- package/dist/services/agent/tools/core/call-ai/index.d.ts +0 -1
- package/dist/services/agent/tools/core/index.d.ts +0 -2
- package/dist/services/agent/tools/core/web-search/index.d.ts +0 -1
- package/dist/services/agent/tools/core/web-search/web-search.tool.d.ts +0 -2
- package/dist/services/agent/utils/rank-tools-by-keywords.d.ts +0 -12
- package/dist/services/app/core/app.d.ts +0 -14
- package/dist/services/app/core/current-user.d.ts +0 -16
- package/dist/services/app/modules/authentication/lambdas/login/index.d.ts +0 -1
- package/dist/services/app/modules/authentication/lambdas/login/login.use-case.d.ts +0 -21
- package/dist/services/app/modules/users/entities/index.d.ts +0 -1
- package/dist/services/app/modules/users/entities/user-acquisition.d.ts +0 -12
- package/dist/services/app/modules/users/entities/user-country.d.ts +0 -11
- package/dist/services/app/modules/users/entities/user-currency.d.ts +0 -13
- package/dist/services/app/modules/users/entities/user-email.value-object.d.ts +0 -6
- package/dist/services/app/modules/users/entities/user-language.d.ts +0 -11
- package/dist/services/app/modules/users/entities/user-marketing.d.ts +0 -9
- package/dist/services/app/modules/users/entities/user-notification-preferences.d.ts +0 -11
- package/dist/services/app/modules/users/entities/user-password.value-object.d.ts +0 -8
- package/dist/services/app/modules/users/entities/user-permissions.d.ts +0 -21
- package/dist/services/app/modules/users/entities/user-preferences.d.ts +0 -25
- package/dist/services/app/modules/users/entities/user-report-preferences.d.ts +0 -16
- package/dist/services/app/modules/users/entities/user-report-schedule.d.ts +0 -11
- package/dist/services/app/modules/users/entities/user-timezone.d.ts +0 -11
- package/dist/services/app/modules/users/entities/user.entity.d.ts +0 -41
- package/dist/services/app/modules/users/lambdas/create-user/create-user.use-case.d.ts +0 -14
- package/dist/services/app/modules/users/lambdas/create-user/index.d.ts +0 -1
- package/dist/services/app/modules/users/lambdas/delete-user/delete-user.use-case.d.ts +0 -16
- package/dist/services/app/modules/users/lambdas/delete-user/index.d.ts +0 -1
- package/dist/services/app/modules/users/lambdas/get-user-by-id/get-user-by-id.use-case.d.ts +0 -14
- package/dist/services/app/modules/users/lambdas/get-user-by-id/index.d.ts +0 -1
- package/dist/services/app/modules/users/lambdas/list-users-by-props/index.d.ts +0 -1
- package/dist/services/app/modules/users/lambdas/list-users-by-props/list-users-by-props.use-case.d.ts +0 -16
- package/dist/services/app/modules/users/lambdas/update-user/index.d.ts +0 -1
- package/dist/services/app/modules/users/lambdas/update-user/update-user.use-case.d.ts +0 -15
- package/dist/services/app/modules/users/repositories/index.d.ts +0 -1
- package/dist/services/app/modules/users/repositories/user.repository.d.ts +0 -12
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
import { C as CurrentSession } from './current-session-DC-SF7rl.js';
|
|
2
|
+
import { B as BaseEntityProps, b as BaseEntity, C as CurrentUser } from './current-user-4BppBUBP.js';
|
|
3
|
+
import { T as Tool, B as BaseParams } from './tool-DMR_ZdjP.js';
|
|
4
|
+
|
|
5
|
+
declare enum AgentStatus {
|
|
6
|
+
IDLE = "idle",
|
|
7
|
+
FAILED = "failed",
|
|
8
|
+
PROCESSING = "processing",
|
|
9
|
+
AWAITING_USER_INPUT = "awaiting_user_input",
|
|
10
|
+
AWAITING_USER_CONFIRMATION = "awaiting_user_confirmation"
|
|
11
|
+
}
|
|
12
|
+
interface AgentError {
|
|
13
|
+
code: string;
|
|
14
|
+
message: string;
|
|
15
|
+
isRetryable: boolean;
|
|
16
|
+
timestamp: Date;
|
|
17
|
+
}
|
|
18
|
+
type CurrentActivity = 'running' | 'stopped' | (string & {});
|
|
19
|
+
interface AgentStateProps {
|
|
20
|
+
status?: AgentStatus;
|
|
21
|
+
language?: string;
|
|
22
|
+
lastError?: AgentError;
|
|
23
|
+
activeTaskId?: string;
|
|
24
|
+
stopRequested?: boolean;
|
|
25
|
+
currentActivity?: CurrentActivity;
|
|
26
|
+
}
|
|
27
|
+
declare class AgentState {
|
|
28
|
+
status?: AgentStatus | undefined;
|
|
29
|
+
language?: string | undefined;
|
|
30
|
+
lastError?: AgentError | undefined;
|
|
31
|
+
activeTaskId?: string | undefined;
|
|
32
|
+
stopRequested?: boolean | undefined;
|
|
33
|
+
currentActivity?: CurrentActivity | undefined;
|
|
34
|
+
static fromJSON(props?: AgentStateProps): AgentState;
|
|
35
|
+
constructor(status?: AgentStatus | undefined, language?: string | undefined, lastError?: AgentError | undefined, activeTaskId?: string | undefined, stopRequested?: boolean | undefined, currentActivity?: CurrentActivity | undefined);
|
|
36
|
+
toJSON(): AgentStateProps;
|
|
37
|
+
setLanguage(language?: string): void;
|
|
38
|
+
setCurrentActivity(currentActivity: CurrentActivity): void;
|
|
39
|
+
setStatus(status: AgentStatus): void;
|
|
40
|
+
setActiveTaskId(taskId?: string): void;
|
|
41
|
+
setLastError(lastError?: AgentError): void;
|
|
42
|
+
setStopRequested(stopRequested?: boolean): void;
|
|
43
|
+
interruptExecution(): void;
|
|
44
|
+
cleanContext(): void;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
type Roles = 'user' | 'assistant';
|
|
48
|
+
interface ChatMessageProps extends BaseEntityProps {
|
|
49
|
+
role?: Roles;
|
|
50
|
+
content?: string;
|
|
51
|
+
}
|
|
52
|
+
declare class ChatMessage extends BaseEntity {
|
|
53
|
+
private readonly props;
|
|
54
|
+
role?: Roles | undefined;
|
|
55
|
+
content?: string | undefined;
|
|
56
|
+
static factory(message: ChatMessageProps): ChatMessage;
|
|
57
|
+
static fromJSON(props: ChatMessageProps): ChatMessage;
|
|
58
|
+
constructor(props: ChatMessageProps, role?: Roles | undefined, content?: string | undefined);
|
|
59
|
+
toJSON(): ChatMessageProps;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
interface ChatSettingsProps {
|
|
63
|
+
notifyOnCompletion?: boolean;
|
|
64
|
+
modelName?: string;
|
|
65
|
+
loopName?: string;
|
|
66
|
+
}
|
|
67
|
+
declare class ChatSettings {
|
|
68
|
+
private readonly props;
|
|
69
|
+
notifyOnCompletion?: boolean | undefined;
|
|
70
|
+
modelName?: string | undefined;
|
|
71
|
+
loopName?: string | undefined;
|
|
72
|
+
constructor(props: ChatSettingsProps, notifyOnCompletion?: boolean | undefined, modelName?: string | undefined, loopName?: string | undefined);
|
|
73
|
+
static fromJSON(props: ChatSettingsProps): ChatSettings;
|
|
74
|
+
toJSON(): ChatSettingsProps;
|
|
75
|
+
setLoopName(loopName: string): void;
|
|
76
|
+
setModelName(modelName: string): void;
|
|
77
|
+
setNotifyOnCompletion(notifyOnCompletion: boolean): void;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
type ContextRecordType = 'message' | 'file' | 'entity' | 'tool_output' | 'artifact' | 'summary';
|
|
81
|
+
interface ContextRecord {
|
|
82
|
+
taskId: string;
|
|
83
|
+
meta: {
|
|
84
|
+
name: string;
|
|
85
|
+
type: ContextRecordType;
|
|
86
|
+
shortDescription: string;
|
|
87
|
+
};
|
|
88
|
+
content: any;
|
|
89
|
+
}
|
|
90
|
+
interface ChatContextProps {
|
|
91
|
+
items?: ContextRecord[];
|
|
92
|
+
}
|
|
93
|
+
declare class ChatContext {
|
|
94
|
+
private readonly props;
|
|
95
|
+
items?: ContextRecord[] | undefined;
|
|
96
|
+
private readonly MEMORY_CONTEXT_MAX_CHARS;
|
|
97
|
+
static fromJSON(props: ChatContextProps): ChatContext;
|
|
98
|
+
constructor(props: ChatContextProps, items?: ContextRecord[] | undefined);
|
|
99
|
+
get length(): number;
|
|
100
|
+
get allMeta(): {
|
|
101
|
+
name: string;
|
|
102
|
+
type: ContextRecordType;
|
|
103
|
+
shortDescription: string;
|
|
104
|
+
}[] | undefined;
|
|
105
|
+
toJSON(): ChatContextProps;
|
|
106
|
+
addContext(contextRecord: any): void;
|
|
107
|
+
selectContext(filters: {
|
|
108
|
+
taskId: string;
|
|
109
|
+
name: string;
|
|
110
|
+
}): ContextRecord[] | undefined;
|
|
111
|
+
lastContext(filters: {
|
|
112
|
+
taskId: string;
|
|
113
|
+
name: string;
|
|
114
|
+
}): ContextRecord | undefined;
|
|
115
|
+
compress(): void;
|
|
116
|
+
pruneContext(): void;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
type ActionStatus = 'pending' | 'running' | 'completed' | 'failed';
|
|
120
|
+
interface ActionErrorProps {
|
|
121
|
+
message: string;
|
|
122
|
+
[key: string]: any;
|
|
123
|
+
}
|
|
124
|
+
interface AgentActionProps extends BaseEntityProps {
|
|
125
|
+
name?: string;
|
|
126
|
+
stepId?: string;
|
|
127
|
+
args?: Record<string, any>;
|
|
128
|
+
dependsOn?: string[];
|
|
129
|
+
status?: ActionStatus;
|
|
130
|
+
output?: any;
|
|
131
|
+
error?: ActionErrorProps;
|
|
132
|
+
reasoning?: string;
|
|
133
|
+
retries?: number;
|
|
134
|
+
author?: string;
|
|
135
|
+
startedAt?: Date;
|
|
136
|
+
completedAt?: Date;
|
|
137
|
+
}
|
|
138
|
+
declare class AgentAction extends BaseEntity {
|
|
139
|
+
private readonly props;
|
|
140
|
+
name?: string | undefined;
|
|
141
|
+
stepId?: string | undefined;
|
|
142
|
+
args?: Record<string, any> | undefined;
|
|
143
|
+
dependsOn?: string[] | undefined;
|
|
144
|
+
status?: ActionStatus | undefined;
|
|
145
|
+
output?: any | undefined;
|
|
146
|
+
error?: ActionErrorProps | undefined;
|
|
147
|
+
reasoning?: string | undefined;
|
|
148
|
+
retries?: number | undefined;
|
|
149
|
+
author?: string | undefined;
|
|
150
|
+
startedAt?: Date | undefined;
|
|
151
|
+
completedAt?: Date | undefined;
|
|
152
|
+
static factory(action: AgentActionProps): AgentAction;
|
|
153
|
+
static fromJSON(props: AgentActionProps): AgentAction;
|
|
154
|
+
constructor(props: AgentActionProps, name?: string | undefined, stepId?: string | undefined, args?: Record<string, any> | undefined, dependsOn?: string[] | undefined, status?: ActionStatus | undefined, output?: any | undefined, error?: ActionErrorProps | undefined, reasoning?: string | undefined, retries?: number | undefined, author?: string | undefined, startedAt?: Date | undefined, completedAt?: Date | undefined);
|
|
155
|
+
toJSON(): AgentActionProps;
|
|
156
|
+
get id(): string;
|
|
157
|
+
get isReady(): boolean;
|
|
158
|
+
get isTerminal(): boolean;
|
|
159
|
+
dependenciesSatisfiedBy(completedRefs: Set<string>): boolean;
|
|
160
|
+
markRunning(): void;
|
|
161
|
+
markCompleted(output: any): void;
|
|
162
|
+
markFailed(error: ActionErrorProps): void;
|
|
163
|
+
incrementRetries(): number;
|
|
164
|
+
resetForRetry(): void;
|
|
165
|
+
runTool(tool: Tool | undefined, args: Record<string, any>, baseParams: BaseParams): Promise<this>;
|
|
166
|
+
}
|
|
167
|
+
interface ActionDescriptor {
|
|
168
|
+
name: string;
|
|
169
|
+
stepId?: string;
|
|
170
|
+
args?: Record<string, any>;
|
|
171
|
+
dependsOn?: string[];
|
|
172
|
+
reasoning?: string;
|
|
173
|
+
author?: string;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
declare enum TaskStatus {
|
|
177
|
+
PENDING = "pending",
|
|
178
|
+
IN_PROGRESS = "in_progress",
|
|
179
|
+
AWAITING_USER = "awaiting_user",
|
|
180
|
+
COMPLETED = "completed",
|
|
181
|
+
PAUSED = "paused",
|
|
182
|
+
ABANDONED = "abandoned",
|
|
183
|
+
CANCELLED = "cancelled",
|
|
184
|
+
FAILED = "failed"
|
|
185
|
+
}
|
|
186
|
+
interface AgentTaskProps extends BaseEntityProps {
|
|
187
|
+
status?: TaskStatus;
|
|
188
|
+
goal?: string;
|
|
189
|
+
nextNode?: string;
|
|
190
|
+
threadId?: string;
|
|
191
|
+
previousTaskId?: string;
|
|
192
|
+
summary?: string;
|
|
193
|
+
loopName?: string;
|
|
194
|
+
actions?: AgentActionProps[];
|
|
195
|
+
}
|
|
196
|
+
declare class AgentTask extends BaseEntity {
|
|
197
|
+
private readonly props;
|
|
198
|
+
status?: TaskStatus | undefined;
|
|
199
|
+
goal?: string | undefined;
|
|
200
|
+
nextNode?: string | undefined;
|
|
201
|
+
threadId?: string | undefined;
|
|
202
|
+
previousTaskId?: string | undefined;
|
|
203
|
+
summary?: string | undefined;
|
|
204
|
+
loopName?: string | undefined;
|
|
205
|
+
actions: AgentAction[];
|
|
206
|
+
static factory(task: AgentTaskProps): AgentTask;
|
|
207
|
+
static fromJSON(props: AgentTaskProps): AgentTask;
|
|
208
|
+
constructor(props: AgentTaskProps, status?: TaskStatus | undefined, goal?: string | undefined, nextNode?: string | undefined, threadId?: string | undefined, previousTaskId?: string | undefined, summary?: string | undefined, loopName?: string | undefined, actions?: AgentAction[]);
|
|
209
|
+
toJSON(): AgentTaskProps;
|
|
210
|
+
get id(): string;
|
|
211
|
+
addAction(descriptor: ActionDescriptor): AgentAction;
|
|
212
|
+
getAction(ref: string): AgentAction | undefined;
|
|
213
|
+
findLastByName(name: string): AgentAction | undefined;
|
|
214
|
+
get readyActions(): AgentAction[];
|
|
215
|
+
get failedActions(): AgentAction[];
|
|
216
|
+
get lastExecutedAction(): AgentAction | undefined;
|
|
217
|
+
setNextNode(node?: string): void;
|
|
218
|
+
complete(summary?: string): void;
|
|
219
|
+
fail(): void;
|
|
220
|
+
cancel(): void;
|
|
221
|
+
pause(): void;
|
|
222
|
+
reopen(): void;
|
|
223
|
+
resolveArgs(action: AgentAction, context: ChatContext): any;
|
|
224
|
+
private resolveValue;
|
|
225
|
+
private findActionByRef;
|
|
226
|
+
private readContextValue;
|
|
227
|
+
runTool(descriptor: ActionDescriptor, tool: Tool | undefined, context: ChatContext, baseParams: BaseParams): Promise<AgentAction>;
|
|
228
|
+
runReadyAction(actionRef: string, tool: Tool | undefined, context: ChatContext, baseParams: BaseParams): Promise<AgentAction>;
|
|
229
|
+
private executeToolAction;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
interface ChatProps extends BaseEntityProps {
|
|
233
|
+
state?: AgentStateProps;
|
|
234
|
+
settings?: ChatSettingsProps;
|
|
235
|
+
messages?: ChatMessageProps[];
|
|
236
|
+
context?: ChatContextProps;
|
|
237
|
+
tasks?: AgentTaskProps[];
|
|
238
|
+
traces?: AgentTrace[];
|
|
239
|
+
}
|
|
240
|
+
interface AgentTrace {
|
|
241
|
+
node: string;
|
|
242
|
+
reasoning?: string;
|
|
243
|
+
taskId?: string;
|
|
244
|
+
timestamp?: Date | string;
|
|
245
|
+
}
|
|
246
|
+
declare class Chat extends BaseEntity {
|
|
247
|
+
private readonly props;
|
|
248
|
+
state?: AgentState | undefined;
|
|
249
|
+
settings?: ChatSettings | undefined;
|
|
250
|
+
messages?: ChatMessage[] | undefined;
|
|
251
|
+
context: ChatContext;
|
|
252
|
+
tasks: AgentTask[];
|
|
253
|
+
traces?: AgentTrace[] | undefined;
|
|
254
|
+
static withDefaults(loopName?: string): Chat;
|
|
255
|
+
static fromJSON(props: ChatProps): Chat;
|
|
256
|
+
constructor(props: ChatProps, state?: AgentState | undefined, settings?: ChatSettings | undefined, messages?: ChatMessage[] | undefined, context?: ChatContext, tasks?: AgentTask[], traces?: AgentTrace[] | undefined);
|
|
257
|
+
get lastAnswer(): string | undefined;
|
|
258
|
+
get activeTask(): AgentTask | undefined;
|
|
259
|
+
toJSON(): ChatProps;
|
|
260
|
+
pushMessage(message: ChatMessageProps): void;
|
|
261
|
+
lastHistoryMessages(count?: number): ChatMessage[] | undefined;
|
|
262
|
+
addTrace(entry: Omit<AgentTrace, 'timestamp'>): void;
|
|
263
|
+
setAgentState(contextState: AgentStateProps): void;
|
|
264
|
+
getTask(taskId: string): AgentTask | undefined;
|
|
265
|
+
lastCompletedTask(): AgentTask | undefined;
|
|
266
|
+
createTask(goal: string, opts?: {
|
|
267
|
+
continuesFrom?: string;
|
|
268
|
+
}): AgentTask;
|
|
269
|
+
reopenTask(taskId: string): AgentTask | undefined;
|
|
270
|
+
completeTask(taskId?: string, summary?: string): void;
|
|
271
|
+
failTask(taskId?: string): void;
|
|
272
|
+
cancelTask(taskId?: string): void;
|
|
273
|
+
private clearActiveTaskIdIfMatches;
|
|
274
|
+
switchLoop(loopName: string): void;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
interface SkillProps {
|
|
278
|
+
name: string;
|
|
279
|
+
version?: string;
|
|
280
|
+
description?: string;
|
|
281
|
+
temperature?: number;
|
|
282
|
+
systemInstructions: Record<string, any>;
|
|
283
|
+
}
|
|
284
|
+
interface SkillRunOptions<TInput = Record<string, any>> {
|
|
285
|
+
sessionId: string;
|
|
286
|
+
answerId: string;
|
|
287
|
+
userMessage?: string;
|
|
288
|
+
currentUser?: CurrentUser;
|
|
289
|
+
currentSession?: CurrentSession;
|
|
290
|
+
contextInjection?: Record<string, any>;
|
|
291
|
+
input?: TInput;
|
|
292
|
+
chat?: Chat;
|
|
293
|
+
}
|
|
294
|
+
declare class Skill<TResponse = Record<string, any>> {
|
|
295
|
+
readonly name: string;
|
|
296
|
+
readonly version?: string;
|
|
297
|
+
readonly description?: string;
|
|
298
|
+
readonly temperature?: number;
|
|
299
|
+
readonly systemInstructions: Record<string, any>;
|
|
300
|
+
constructor(props: SkillProps);
|
|
301
|
+
run(options: SkillRunOptions): Promise<TResponse & {
|
|
302
|
+
responseId: string;
|
|
303
|
+
costInUsd: number;
|
|
304
|
+
}>;
|
|
305
|
+
private parseJsonResponse;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
export { AgentTask as A, Chat as C, Skill as S, type SkillProps as a, type SkillRunOptions as b, type ChatProps as c, type AgentError as d, AgentState as e, type AgentStateProps as f, AgentStatus as g };
|
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
import { C as CurrentSession } from './current-session-DC-SF7rl.mjs';
|
|
2
|
+
import { B as BaseEntityProps, b as BaseEntity, C as CurrentUser } from './current-user-4BppBUBP.mjs';
|
|
3
|
+
import { T as Tool, B as BaseParams } from './tool-BaG2a8Np.mjs';
|
|
4
|
+
|
|
5
|
+
declare enum AgentStatus {
|
|
6
|
+
IDLE = "idle",
|
|
7
|
+
FAILED = "failed",
|
|
8
|
+
PROCESSING = "processing",
|
|
9
|
+
AWAITING_USER_INPUT = "awaiting_user_input",
|
|
10
|
+
AWAITING_USER_CONFIRMATION = "awaiting_user_confirmation"
|
|
11
|
+
}
|
|
12
|
+
interface AgentError {
|
|
13
|
+
code: string;
|
|
14
|
+
message: string;
|
|
15
|
+
isRetryable: boolean;
|
|
16
|
+
timestamp: Date;
|
|
17
|
+
}
|
|
18
|
+
type CurrentActivity = 'running' | 'stopped' | (string & {});
|
|
19
|
+
interface AgentStateProps {
|
|
20
|
+
status?: AgentStatus;
|
|
21
|
+
language?: string;
|
|
22
|
+
lastError?: AgentError;
|
|
23
|
+
activeTaskId?: string;
|
|
24
|
+
stopRequested?: boolean;
|
|
25
|
+
currentActivity?: CurrentActivity;
|
|
26
|
+
}
|
|
27
|
+
declare class AgentState {
|
|
28
|
+
status?: AgentStatus | undefined;
|
|
29
|
+
language?: string | undefined;
|
|
30
|
+
lastError?: AgentError | undefined;
|
|
31
|
+
activeTaskId?: string | undefined;
|
|
32
|
+
stopRequested?: boolean | undefined;
|
|
33
|
+
currentActivity?: CurrentActivity | undefined;
|
|
34
|
+
static fromJSON(props?: AgentStateProps): AgentState;
|
|
35
|
+
constructor(status?: AgentStatus | undefined, language?: string | undefined, lastError?: AgentError | undefined, activeTaskId?: string | undefined, stopRequested?: boolean | undefined, currentActivity?: CurrentActivity | undefined);
|
|
36
|
+
toJSON(): AgentStateProps;
|
|
37
|
+
setLanguage(language?: string): void;
|
|
38
|
+
setCurrentActivity(currentActivity: CurrentActivity): void;
|
|
39
|
+
setStatus(status: AgentStatus): void;
|
|
40
|
+
setActiveTaskId(taskId?: string): void;
|
|
41
|
+
setLastError(lastError?: AgentError): void;
|
|
42
|
+
setStopRequested(stopRequested?: boolean): void;
|
|
43
|
+
interruptExecution(): void;
|
|
44
|
+
cleanContext(): void;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
type Roles = 'user' | 'assistant';
|
|
48
|
+
interface ChatMessageProps extends BaseEntityProps {
|
|
49
|
+
role?: Roles;
|
|
50
|
+
content?: string;
|
|
51
|
+
}
|
|
52
|
+
declare class ChatMessage extends BaseEntity {
|
|
53
|
+
private readonly props;
|
|
54
|
+
role?: Roles | undefined;
|
|
55
|
+
content?: string | undefined;
|
|
56
|
+
static factory(message: ChatMessageProps): ChatMessage;
|
|
57
|
+
static fromJSON(props: ChatMessageProps): ChatMessage;
|
|
58
|
+
constructor(props: ChatMessageProps, role?: Roles | undefined, content?: string | undefined);
|
|
59
|
+
toJSON(): ChatMessageProps;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
interface ChatSettingsProps {
|
|
63
|
+
notifyOnCompletion?: boolean;
|
|
64
|
+
modelName?: string;
|
|
65
|
+
loopName?: string;
|
|
66
|
+
}
|
|
67
|
+
declare class ChatSettings {
|
|
68
|
+
private readonly props;
|
|
69
|
+
notifyOnCompletion?: boolean | undefined;
|
|
70
|
+
modelName?: string | undefined;
|
|
71
|
+
loopName?: string | undefined;
|
|
72
|
+
constructor(props: ChatSettingsProps, notifyOnCompletion?: boolean | undefined, modelName?: string | undefined, loopName?: string | undefined);
|
|
73
|
+
static fromJSON(props: ChatSettingsProps): ChatSettings;
|
|
74
|
+
toJSON(): ChatSettingsProps;
|
|
75
|
+
setLoopName(loopName: string): void;
|
|
76
|
+
setModelName(modelName: string): void;
|
|
77
|
+
setNotifyOnCompletion(notifyOnCompletion: boolean): void;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
type ContextRecordType = 'message' | 'file' | 'entity' | 'tool_output' | 'artifact' | 'summary';
|
|
81
|
+
interface ContextRecord {
|
|
82
|
+
taskId: string;
|
|
83
|
+
meta: {
|
|
84
|
+
name: string;
|
|
85
|
+
type: ContextRecordType;
|
|
86
|
+
shortDescription: string;
|
|
87
|
+
};
|
|
88
|
+
content: any;
|
|
89
|
+
}
|
|
90
|
+
interface ChatContextProps {
|
|
91
|
+
items?: ContextRecord[];
|
|
92
|
+
}
|
|
93
|
+
declare class ChatContext {
|
|
94
|
+
private readonly props;
|
|
95
|
+
items?: ContextRecord[] | undefined;
|
|
96
|
+
private readonly MEMORY_CONTEXT_MAX_CHARS;
|
|
97
|
+
static fromJSON(props: ChatContextProps): ChatContext;
|
|
98
|
+
constructor(props: ChatContextProps, items?: ContextRecord[] | undefined);
|
|
99
|
+
get length(): number;
|
|
100
|
+
get allMeta(): {
|
|
101
|
+
name: string;
|
|
102
|
+
type: ContextRecordType;
|
|
103
|
+
shortDescription: string;
|
|
104
|
+
}[] | undefined;
|
|
105
|
+
toJSON(): ChatContextProps;
|
|
106
|
+
addContext(contextRecord: any): void;
|
|
107
|
+
selectContext(filters: {
|
|
108
|
+
taskId: string;
|
|
109
|
+
name: string;
|
|
110
|
+
}): ContextRecord[] | undefined;
|
|
111
|
+
lastContext(filters: {
|
|
112
|
+
taskId: string;
|
|
113
|
+
name: string;
|
|
114
|
+
}): ContextRecord | undefined;
|
|
115
|
+
compress(): void;
|
|
116
|
+
pruneContext(): void;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
type ActionStatus = 'pending' | 'running' | 'completed' | 'failed';
|
|
120
|
+
interface ActionErrorProps {
|
|
121
|
+
message: string;
|
|
122
|
+
[key: string]: any;
|
|
123
|
+
}
|
|
124
|
+
interface AgentActionProps extends BaseEntityProps {
|
|
125
|
+
name?: string;
|
|
126
|
+
stepId?: string;
|
|
127
|
+
args?: Record<string, any>;
|
|
128
|
+
dependsOn?: string[];
|
|
129
|
+
status?: ActionStatus;
|
|
130
|
+
output?: any;
|
|
131
|
+
error?: ActionErrorProps;
|
|
132
|
+
reasoning?: string;
|
|
133
|
+
retries?: number;
|
|
134
|
+
author?: string;
|
|
135
|
+
startedAt?: Date;
|
|
136
|
+
completedAt?: Date;
|
|
137
|
+
}
|
|
138
|
+
declare class AgentAction extends BaseEntity {
|
|
139
|
+
private readonly props;
|
|
140
|
+
name?: string | undefined;
|
|
141
|
+
stepId?: string | undefined;
|
|
142
|
+
args?: Record<string, any> | undefined;
|
|
143
|
+
dependsOn?: string[] | undefined;
|
|
144
|
+
status?: ActionStatus | undefined;
|
|
145
|
+
output?: any | undefined;
|
|
146
|
+
error?: ActionErrorProps | undefined;
|
|
147
|
+
reasoning?: string | undefined;
|
|
148
|
+
retries?: number | undefined;
|
|
149
|
+
author?: string | undefined;
|
|
150
|
+
startedAt?: Date | undefined;
|
|
151
|
+
completedAt?: Date | undefined;
|
|
152
|
+
static factory(action: AgentActionProps): AgentAction;
|
|
153
|
+
static fromJSON(props: AgentActionProps): AgentAction;
|
|
154
|
+
constructor(props: AgentActionProps, name?: string | undefined, stepId?: string | undefined, args?: Record<string, any> | undefined, dependsOn?: string[] | undefined, status?: ActionStatus | undefined, output?: any | undefined, error?: ActionErrorProps | undefined, reasoning?: string | undefined, retries?: number | undefined, author?: string | undefined, startedAt?: Date | undefined, completedAt?: Date | undefined);
|
|
155
|
+
toJSON(): AgentActionProps;
|
|
156
|
+
get id(): string;
|
|
157
|
+
get isReady(): boolean;
|
|
158
|
+
get isTerminal(): boolean;
|
|
159
|
+
dependenciesSatisfiedBy(completedRefs: Set<string>): boolean;
|
|
160
|
+
markRunning(): void;
|
|
161
|
+
markCompleted(output: any): void;
|
|
162
|
+
markFailed(error: ActionErrorProps): void;
|
|
163
|
+
incrementRetries(): number;
|
|
164
|
+
resetForRetry(): void;
|
|
165
|
+
runTool(tool: Tool | undefined, args: Record<string, any>, baseParams: BaseParams): Promise<this>;
|
|
166
|
+
}
|
|
167
|
+
interface ActionDescriptor {
|
|
168
|
+
name: string;
|
|
169
|
+
stepId?: string;
|
|
170
|
+
args?: Record<string, any>;
|
|
171
|
+
dependsOn?: string[];
|
|
172
|
+
reasoning?: string;
|
|
173
|
+
author?: string;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
declare enum TaskStatus {
|
|
177
|
+
PENDING = "pending",
|
|
178
|
+
IN_PROGRESS = "in_progress",
|
|
179
|
+
AWAITING_USER = "awaiting_user",
|
|
180
|
+
COMPLETED = "completed",
|
|
181
|
+
PAUSED = "paused",
|
|
182
|
+
ABANDONED = "abandoned",
|
|
183
|
+
CANCELLED = "cancelled",
|
|
184
|
+
FAILED = "failed"
|
|
185
|
+
}
|
|
186
|
+
interface AgentTaskProps extends BaseEntityProps {
|
|
187
|
+
status?: TaskStatus;
|
|
188
|
+
goal?: string;
|
|
189
|
+
nextNode?: string;
|
|
190
|
+
threadId?: string;
|
|
191
|
+
previousTaskId?: string;
|
|
192
|
+
summary?: string;
|
|
193
|
+
loopName?: string;
|
|
194
|
+
actions?: AgentActionProps[];
|
|
195
|
+
}
|
|
196
|
+
declare class AgentTask extends BaseEntity {
|
|
197
|
+
private readonly props;
|
|
198
|
+
status?: TaskStatus | undefined;
|
|
199
|
+
goal?: string | undefined;
|
|
200
|
+
nextNode?: string | undefined;
|
|
201
|
+
threadId?: string | undefined;
|
|
202
|
+
previousTaskId?: string | undefined;
|
|
203
|
+
summary?: string | undefined;
|
|
204
|
+
loopName?: string | undefined;
|
|
205
|
+
actions: AgentAction[];
|
|
206
|
+
static factory(task: AgentTaskProps): AgentTask;
|
|
207
|
+
static fromJSON(props: AgentTaskProps): AgentTask;
|
|
208
|
+
constructor(props: AgentTaskProps, status?: TaskStatus | undefined, goal?: string | undefined, nextNode?: string | undefined, threadId?: string | undefined, previousTaskId?: string | undefined, summary?: string | undefined, loopName?: string | undefined, actions?: AgentAction[]);
|
|
209
|
+
toJSON(): AgentTaskProps;
|
|
210
|
+
get id(): string;
|
|
211
|
+
addAction(descriptor: ActionDescriptor): AgentAction;
|
|
212
|
+
getAction(ref: string): AgentAction | undefined;
|
|
213
|
+
findLastByName(name: string): AgentAction | undefined;
|
|
214
|
+
get readyActions(): AgentAction[];
|
|
215
|
+
get failedActions(): AgentAction[];
|
|
216
|
+
get lastExecutedAction(): AgentAction | undefined;
|
|
217
|
+
setNextNode(node?: string): void;
|
|
218
|
+
complete(summary?: string): void;
|
|
219
|
+
fail(): void;
|
|
220
|
+
cancel(): void;
|
|
221
|
+
pause(): void;
|
|
222
|
+
reopen(): void;
|
|
223
|
+
resolveArgs(action: AgentAction, context: ChatContext): any;
|
|
224
|
+
private resolveValue;
|
|
225
|
+
private findActionByRef;
|
|
226
|
+
private readContextValue;
|
|
227
|
+
runTool(descriptor: ActionDescriptor, tool: Tool | undefined, context: ChatContext, baseParams: BaseParams): Promise<AgentAction>;
|
|
228
|
+
runReadyAction(actionRef: string, tool: Tool | undefined, context: ChatContext, baseParams: BaseParams): Promise<AgentAction>;
|
|
229
|
+
private executeToolAction;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
interface ChatProps extends BaseEntityProps {
|
|
233
|
+
state?: AgentStateProps;
|
|
234
|
+
settings?: ChatSettingsProps;
|
|
235
|
+
messages?: ChatMessageProps[];
|
|
236
|
+
context?: ChatContextProps;
|
|
237
|
+
tasks?: AgentTaskProps[];
|
|
238
|
+
traces?: AgentTrace[];
|
|
239
|
+
}
|
|
240
|
+
interface AgentTrace {
|
|
241
|
+
node: string;
|
|
242
|
+
reasoning?: string;
|
|
243
|
+
taskId?: string;
|
|
244
|
+
timestamp?: Date | string;
|
|
245
|
+
}
|
|
246
|
+
declare class Chat extends BaseEntity {
|
|
247
|
+
private readonly props;
|
|
248
|
+
state?: AgentState | undefined;
|
|
249
|
+
settings?: ChatSettings | undefined;
|
|
250
|
+
messages?: ChatMessage[] | undefined;
|
|
251
|
+
context: ChatContext;
|
|
252
|
+
tasks: AgentTask[];
|
|
253
|
+
traces?: AgentTrace[] | undefined;
|
|
254
|
+
static withDefaults(loopName?: string): Chat;
|
|
255
|
+
static fromJSON(props: ChatProps): Chat;
|
|
256
|
+
constructor(props: ChatProps, state?: AgentState | undefined, settings?: ChatSettings | undefined, messages?: ChatMessage[] | undefined, context?: ChatContext, tasks?: AgentTask[], traces?: AgentTrace[] | undefined);
|
|
257
|
+
get lastAnswer(): string | undefined;
|
|
258
|
+
get activeTask(): AgentTask | undefined;
|
|
259
|
+
toJSON(): ChatProps;
|
|
260
|
+
pushMessage(message: ChatMessageProps): void;
|
|
261
|
+
lastHistoryMessages(count?: number): ChatMessage[] | undefined;
|
|
262
|
+
addTrace(entry: Omit<AgentTrace, 'timestamp'>): void;
|
|
263
|
+
setAgentState(contextState: AgentStateProps): void;
|
|
264
|
+
getTask(taskId: string): AgentTask | undefined;
|
|
265
|
+
lastCompletedTask(): AgentTask | undefined;
|
|
266
|
+
createTask(goal: string, opts?: {
|
|
267
|
+
continuesFrom?: string;
|
|
268
|
+
}): AgentTask;
|
|
269
|
+
reopenTask(taskId: string): AgentTask | undefined;
|
|
270
|
+
completeTask(taskId?: string, summary?: string): void;
|
|
271
|
+
failTask(taskId?: string): void;
|
|
272
|
+
cancelTask(taskId?: string): void;
|
|
273
|
+
private clearActiveTaskIdIfMatches;
|
|
274
|
+
switchLoop(loopName: string): void;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
interface SkillProps {
|
|
278
|
+
name: string;
|
|
279
|
+
version?: string;
|
|
280
|
+
description?: string;
|
|
281
|
+
temperature?: number;
|
|
282
|
+
systemInstructions: Record<string, any>;
|
|
283
|
+
}
|
|
284
|
+
interface SkillRunOptions<TInput = Record<string, any>> {
|
|
285
|
+
sessionId: string;
|
|
286
|
+
answerId: string;
|
|
287
|
+
userMessage?: string;
|
|
288
|
+
currentUser?: CurrentUser;
|
|
289
|
+
currentSession?: CurrentSession;
|
|
290
|
+
contextInjection?: Record<string, any>;
|
|
291
|
+
input?: TInput;
|
|
292
|
+
chat?: Chat;
|
|
293
|
+
}
|
|
294
|
+
declare class Skill<TResponse = Record<string, any>> {
|
|
295
|
+
readonly name: string;
|
|
296
|
+
readonly version?: string;
|
|
297
|
+
readonly description?: string;
|
|
298
|
+
readonly temperature?: number;
|
|
299
|
+
readonly systemInstructions: Record<string, any>;
|
|
300
|
+
constructor(props: SkillProps);
|
|
301
|
+
run(options: SkillRunOptions): Promise<TResponse & {
|
|
302
|
+
responseId: string;
|
|
303
|
+
costInUsd: number;
|
|
304
|
+
}>;
|
|
305
|
+
private parseJsonResponse;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
export { AgentTask as A, Chat as C, Skill as S, type SkillProps as a, type SkillRunOptions as b, type ChatProps as c, type AgentError as d, AgentState as e, type AgentStateProps as f, AgentStatus as g };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { C as CurrentUser } from './current-user-4BppBUBP.mjs';
|
|
2
|
+
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
3
|
+
import { Tool as Tool$1 } from '@modelcontextprotocol/sdk/types.js';
|
|
4
|
+
|
|
5
|
+
interface InputSchema {
|
|
6
|
+
type: 'object';
|
|
7
|
+
properties: Record<string, {
|
|
8
|
+
type: string;
|
|
9
|
+
description: string;
|
|
10
|
+
fallback?: string;
|
|
11
|
+
enum?: string[];
|
|
12
|
+
}>;
|
|
13
|
+
required: string[];
|
|
14
|
+
}
|
|
15
|
+
interface Output {
|
|
16
|
+
data: any;
|
|
17
|
+
}
|
|
18
|
+
interface BaseParams {
|
|
19
|
+
currentUser: CurrentUser;
|
|
20
|
+
sessionId: string;
|
|
21
|
+
answerId: string;
|
|
22
|
+
}
|
|
23
|
+
declare class Tool {
|
|
24
|
+
readonly name: string;
|
|
25
|
+
readonly description: string;
|
|
26
|
+
readonly destructive: boolean;
|
|
27
|
+
readonly parameters: InputSchema;
|
|
28
|
+
private readonly handler;
|
|
29
|
+
constructor(props: {
|
|
30
|
+
name: string;
|
|
31
|
+
description: string;
|
|
32
|
+
destructive?: boolean;
|
|
33
|
+
parameters: InputSchema;
|
|
34
|
+
handler: (...args: any[]) => Promise<Output>;
|
|
35
|
+
});
|
|
36
|
+
run(...args: any[]): Promise<Output>;
|
|
37
|
+
static fromMcp(mcpTool: Tool$1, mcpClient: Client, opts: {
|
|
38
|
+
namespace: string;
|
|
39
|
+
}): Tool;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export { type BaseParams as B, Tool as T };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { CurrentUser } from '
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { C as CurrentUser } from './current-user-4BppBUBP.js';
|
|
2
|
+
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
3
|
+
import { Tool as Tool$1 } from '@modelcontextprotocol/sdk/types.js';
|
|
4
|
+
|
|
4
5
|
interface InputSchema {
|
|
5
6
|
type: 'object';
|
|
6
7
|
properties: Record<string, {
|
|
@@ -14,12 +15,12 @@ interface InputSchema {
|
|
|
14
15
|
interface Output {
|
|
15
16
|
data: any;
|
|
16
17
|
}
|
|
17
|
-
|
|
18
|
+
interface BaseParams {
|
|
18
19
|
currentUser: CurrentUser;
|
|
19
20
|
sessionId: string;
|
|
20
21
|
answerId: string;
|
|
21
22
|
}
|
|
22
|
-
|
|
23
|
+
declare class Tool {
|
|
23
24
|
readonly name: string;
|
|
24
25
|
readonly description: string;
|
|
25
26
|
readonly destructive: boolean;
|
|
@@ -33,8 +34,9 @@ export declare class Tool {
|
|
|
33
34
|
handler: (...args: any[]) => Promise<Output>;
|
|
34
35
|
});
|
|
35
36
|
run(...args: any[]): Promise<Output>;
|
|
36
|
-
static fromMcp(mcpTool:
|
|
37
|
+
static fromMcp(mcpTool: Tool$1, mcpClient: Client, opts: {
|
|
37
38
|
namespace: string;
|
|
38
39
|
}): Tool;
|
|
39
40
|
}
|
|
40
|
-
|
|
41
|
+
|
|
42
|
+
export { type BaseParams as B, Tool as T };
|