openloops 0.1.30 → 0.1.32
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/README.md +1 -1
- package/dist/clients/llm-client.d.ts +6 -1
- package/dist/clients/llm-client.js +77 -17
- package/dist/clients/llm-client.mjs +77 -17
- package/dist/clients/llm-error.d.ts +9 -0
- package/dist/clients/llm-error.js +69 -0
- package/dist/clients/llm-error.mjs +45 -0
- package/dist/clients/llm-types.d.ts +61 -0
- package/dist/clients/llm-types.js +16 -0
- package/dist/clients/llm-types.mjs +0 -0
- package/dist/clients/pi-ai-adapter.d.ts +7 -0
- package/dist/clients/pi-ai-adapter.js +137 -0
- package/dist/clients/pi-ai-adapter.mjs +113 -0
- package/dist/{agent → harness}/agent-loop.d.ts +11 -1
- package/dist/{agent → harness}/agent-state.js +1 -1
- package/dist/{agent → harness}/agent-state.mjs +1 -1
- package/dist/{agent → harness}/agent.d.ts +34 -3
- package/dist/harness/agent.js +546 -0
- package/dist/harness/agent.mjs +530 -0
- package/dist/{agent → harness}/index.js +5 -5
- package/dist/harness/native-tools.d.ts +23 -0
- package/dist/harness/native-tools.js +198 -0
- package/dist/harness/native-tools.mjs +174 -0
- package/dist/harness/tool-catalog.d.ts +16 -0
- package/dist/harness/tool-catalog.js +85 -0
- package/dist/harness/tool-catalog.mjs +59 -0
- package/dist/harness/tool-pipeline.d.ts +42 -0
- package/dist/harness/tool-pipeline.js +192 -0
- package/dist/harness/tool-pipeline.mjs +169 -0
- package/dist/harness/utils/describe-shape.d.ts +2 -0
- package/dist/harness/utils/describe-shape.js +56 -0
- package/dist/harness/utils/describe-shape.mjs +32 -0
- package/dist/harness/workspace.d.ts +44 -0
- package/dist/harness/workspace.js +95 -0
- package/dist/harness/workspace.mjs +78 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/index.mjs +1 -1
- package/dist/loops/agi/index.d.ts +1 -0
- package/dist/loops/agi/index.js +22 -0
- package/dist/loops/agi/index.mjs +1 -0
- package/dist/loops/agi/loop.d.ts +24 -0
- package/dist/loops/agi/loop.js +207 -0
- package/dist/loops/agi/loop.mjs +184 -0
- package/dist/loops/agi/skills/reasoning-engine.d.ts +14 -0
- package/dist/loops/agi/skills/reasoning-engine.js +93 -0
- package/dist/loops/agi/skills/reasoning-engine.mjs +70 -0
- package/dist/loops/index.d.ts +1 -0
- package/dist/loops/index.js +3 -1
- package/dist/loops/index.mjs +1 -0
- package/dist/loops/plan-execute/plan-execute-loop.d.ts +2 -1
- package/dist/loops/plan-execute/plan-execute-loop.js +90 -35
- package/dist/loops/plan-execute/plan-execute-loop.mjs +80 -25
- package/dist/loops/shared/skills/action-planner.js +7 -4
- package/dist/loops/shared/skills/action-planner.mjs +7 -4
- package/dist/loops/shared/skills/final-responder.js +4 -3
- package/dist/loops/shared/skills/final-responder.mjs +4 -3
- package/dist/loops/shared/skills/state-observer.js +6 -2
- package/dist/loops/shared/skills/state-observer.mjs +6 -2
- package/dist/services/chats/entities/chat-message.entity.d.ts +4 -1
- package/dist/services/chats/entities/chat-message.entity.js +7 -3
- package/dist/services/chats/entities/chat-message.entity.mjs +7 -3
- package/dist/services/chats/entities/chat.entity.d.ts +10 -11
- package/dist/services/chats/entities/chat.entity.js +17 -21
- package/dist/services/chats/entities/chat.entity.mjs +17 -21
- package/dist/services/chats/lambdas/get-chat-by-id/get-chat-by-id.use-case.d.ts +2 -0
- package/dist/services/chats/lambdas/get-chat-by-id/get-chat-by-id.use-case.js +4 -4
- package/dist/services/chats/lambdas/get-chat-by-id/get-chat-by-id.use-case.mjs +2 -2
- package/dist/services/llmcalls/entities/llmcall.entity.d.ts +1 -1
- package/dist/services/tasks/entities/agent-action.entity.d.ts +111 -0
- package/dist/services/tasks/entities/agent-action.entity.js +269 -0
- package/dist/services/tasks/entities/agent-action.entity.mjs +245 -0
- package/dist/services/tasks/entities/agent-task.entity.d.ts +172 -0
- package/dist/services/tasks/entities/agent-task.entity.js +665 -0
- package/dist/services/tasks/entities/agent-task.entity.mjs +633 -0
- package/dist/services/tasks/entities/index.d.ts +2 -0
- package/dist/services/tasks/entities/index.js +24 -0
- package/dist/services/tasks/entities/index.mjs +2 -0
- package/dist/services/tasks/index.d.ts +3 -0
- package/dist/services/tasks/index.js +26 -0
- package/dist/services/tasks/index.mjs +3 -0
- package/dist/services/tasks/lambdas/create-agent-action/create-agent-action.use-case.d.ts +14 -0
- package/dist/services/tasks/lambdas/create-agent-action/create-agent-action.use-case.js +60 -0
- package/dist/services/tasks/lambdas/create-agent-action/create-agent-action.use-case.mjs +31 -0
- package/dist/services/tasks/lambdas/create-agent-action/index.d.ts +1 -0
- package/dist/services/tasks/lambdas/create-agent-action/index.js +22 -0
- package/dist/services/tasks/lambdas/create-agent-action/index.mjs +1 -0
- package/dist/services/tasks/lambdas/create-agent-task/create-agent-task.use-case.d.ts +14 -0
- package/dist/services/tasks/lambdas/create-agent-task/create-agent-task.use-case.js +60 -0
- package/dist/services/tasks/lambdas/create-agent-task/create-agent-task.use-case.mjs +31 -0
- package/dist/services/tasks/lambdas/create-agent-task/index.d.ts +1 -0
- package/dist/services/tasks/lambdas/create-agent-task/index.js +22 -0
- package/dist/services/tasks/lambdas/create-agent-task/index.mjs +1 -0
- package/dist/services/tasks/lambdas/get-agent-task-by-id/get-agent-task-by-id.use-case.d.ts +14 -0
- package/dist/services/tasks/lambdas/get-agent-task-by-id/get-agent-task-by-id.use-case.js +55 -0
- package/dist/services/tasks/lambdas/get-agent-task-by-id/get-agent-task-by-id.use-case.mjs +26 -0
- package/dist/services/tasks/lambdas/get-agent-task-by-id/index.d.ts +1 -0
- package/dist/services/tasks/lambdas/get-agent-task-by-id/index.js +22 -0
- package/dist/services/tasks/lambdas/get-agent-task-by-id/index.mjs +1 -0
- package/dist/services/tasks/lambdas/index.d.ts +7 -0
- package/dist/services/tasks/lambdas/index.js +46 -0
- package/dist/services/tasks/lambdas/index.mjs +17 -0
- package/dist/services/tasks/lambdas/list-agent-actions-by-task/index.d.ts +1 -0
- package/dist/services/tasks/lambdas/list-agent-actions-by-task/index.js +22 -0
- package/dist/services/tasks/lambdas/list-agent-actions-by-task/index.mjs +1 -0
- package/dist/services/tasks/lambdas/list-agent-actions-by-task/list-agent-actions-by-task.use-case.d.ts +16 -0
- package/dist/services/tasks/lambdas/list-agent-actions-by-task/list-agent-actions-by-task.use-case.js +62 -0
- package/dist/services/tasks/lambdas/list-agent-actions-by-task/list-agent-actions-by-task.use-case.mjs +33 -0
- package/dist/services/tasks/lambdas/list-agent-tasks-by-chat/index.d.ts +1 -0
- package/dist/services/tasks/lambdas/list-agent-tasks-by-chat/index.js +22 -0
- package/dist/services/tasks/lambdas/list-agent-tasks-by-chat/index.mjs +1 -0
- package/dist/services/tasks/lambdas/list-agent-tasks-by-chat/list-agent-tasks-by-chat.use-case.d.ts +16 -0
- package/dist/services/tasks/lambdas/list-agent-tasks-by-chat/list-agent-tasks-by-chat.use-case.js +62 -0
- package/dist/services/tasks/lambdas/list-agent-tasks-by-chat/list-agent-tasks-by-chat.use-case.mjs +33 -0
- package/dist/services/tasks/lambdas/update-agent-action/index.d.ts +1 -0
- package/dist/services/tasks/lambdas/update-agent-action/index.js +22 -0
- package/dist/services/tasks/lambdas/update-agent-action/index.mjs +1 -0
- package/dist/services/tasks/lambdas/update-agent-action/update-agent-action.use-case.d.ts +15 -0
- package/dist/services/tasks/lambdas/update-agent-action/update-agent-action.use-case.js +67 -0
- package/dist/services/tasks/lambdas/update-agent-action/update-agent-action.use-case.mjs +38 -0
- package/dist/services/tasks/lambdas/update-agent-task/index.d.ts +1 -0
- package/dist/services/tasks/lambdas/update-agent-task/index.js +22 -0
- package/dist/services/tasks/lambdas/update-agent-task/index.mjs +1 -0
- package/dist/services/tasks/lambdas/update-agent-task/update-agent-task.use-case.d.ts +15 -0
- package/dist/services/tasks/lambdas/update-agent-task/update-agent-task.use-case.js +67 -0
- package/dist/services/tasks/lambdas/update-agent-task/update-agent-task.use-case.mjs +38 -0
- package/dist/services/tasks/module.d.ts +15 -0
- package/dist/services/tasks/module.js +76 -0
- package/dist/services/tasks/module.mjs +47 -0
- package/dist/services/tasks/repositories/agent-action.repository.d.ts +8 -0
- package/dist/services/tasks/repositories/agent-action.repository.js +62 -0
- package/dist/services/tasks/repositories/agent-action.repository.mjs +33 -0
- package/dist/services/tasks/repositories/agent-task.repository.d.ts +9 -0
- package/dist/services/tasks/repositories/agent-task.repository.js +65 -0
- package/dist/services/tasks/repositories/agent-task.repository.mjs +36 -0
- package/dist/services/tasks/repositories/index.d.ts +2 -0
- package/dist/services/tasks/repositories/index.js +24 -0
- package/dist/services/tasks/repositories/index.mjs +2 -0
- package/dist/services/traces/entities/agent-trace-entry.entity.d.ts +30 -0
- package/dist/services/traces/entities/agent-trace-entry.entity.js +85 -0
- package/dist/services/traces/entities/agent-trace-entry.entity.mjs +62 -0
- package/dist/services/traces/entities/index.d.ts +1 -0
- package/dist/services/traces/entities/index.js +22 -0
- package/dist/services/traces/entities/index.mjs +1 -0
- package/dist/services/traces/index.d.ts +3 -0
- package/dist/services/traces/index.js +26 -0
- package/dist/services/traces/index.mjs +3 -0
- package/dist/services/traces/lambdas/create-agent-traces/create-agent-traces.use-case.d.ts +16 -0
- package/dist/services/traces/lambdas/create-agent-traces/create-agent-traces.use-case.js +62 -0
- package/dist/services/traces/lambdas/create-agent-traces/create-agent-traces.use-case.mjs +33 -0
- package/dist/services/traces/lambdas/create-agent-traces/index.d.ts +1 -0
- package/dist/services/traces/lambdas/create-agent-traces/index.js +22 -0
- package/dist/services/traces/lambdas/create-agent-traces/index.mjs +1 -0
- package/dist/services/traces/lambdas/index.d.ts +2 -0
- package/dist/services/traces/lambdas/index.js +31 -0
- package/dist/services/traces/lambdas/index.mjs +7 -0
- package/dist/services/traces/lambdas/list-agent-traces-by-chat/index.d.ts +1 -0
- package/dist/services/traces/lambdas/list-agent-traces-by-chat/index.js +22 -0
- package/dist/services/traces/lambdas/list-agent-traces-by-chat/index.mjs +1 -0
- package/dist/services/traces/lambdas/list-agent-traces-by-chat/list-agent-traces-by-chat.use-case.d.ts +18 -0
- package/dist/services/traces/lambdas/list-agent-traces-by-chat/list-agent-traces-by-chat.use-case.js +67 -0
- package/dist/services/traces/lambdas/list-agent-traces-by-chat/list-agent-traces-by-chat.use-case.mjs +38 -0
- package/dist/services/traces/module.d.ts +5 -0
- package/dist/services/traces/module.js +41 -0
- package/dist/services/traces/module.mjs +17 -0
- package/dist/services/traces/repositories/agent-trace.repository.d.ts +7 -0
- package/dist/services/traces/repositories/agent-trace.repository.js +55 -0
- package/dist/services/traces/repositories/agent-trace.repository.mjs +26 -0
- package/dist/services/traces/repositories/index.d.ts +1 -0
- package/dist/services/traces/repositories/index.js +22 -0
- package/dist/services/traces/repositories/index.mjs +1 -0
- package/dist/services/workspaces/entities/index.d.ts +1 -0
- package/dist/services/workspaces/entities/index.js +22 -0
- package/dist/services/workspaces/entities/index.mjs +1 -0
- package/dist/services/workspaces/entities/workspace-item.entity.d.ts +33 -0
- package/dist/services/workspaces/entities/workspace-item.entity.js +95 -0
- package/dist/services/workspaces/entities/workspace-item.entity.mjs +72 -0
- package/dist/services/workspaces/index.d.ts +3 -0
- package/dist/services/workspaces/index.js +26 -0
- package/dist/services/workspaces/index.mjs +3 -0
- package/dist/services/workspaces/lambdas/delete-workspace-item/delete-workspace-item.use-case.d.ts +17 -0
- package/dist/services/workspaces/lambdas/delete-workspace-item/delete-workspace-item.use-case.js +68 -0
- package/dist/services/workspaces/lambdas/delete-workspace-item/delete-workspace-item.use-case.mjs +39 -0
- package/dist/services/workspaces/lambdas/delete-workspace-item/index.d.ts +1 -0
- package/dist/services/workspaces/lambdas/delete-workspace-item/index.js +22 -0
- package/dist/services/workspaces/lambdas/delete-workspace-item/index.mjs +1 -0
- package/dist/services/workspaces/lambdas/get-workspace-item/get-workspace-item.use-case.d.ts +17 -0
- package/dist/services/workspaces/lambdas/get-workspace-item/get-workspace-item.use-case.js +67 -0
- package/dist/services/workspaces/lambdas/get-workspace-item/get-workspace-item.use-case.mjs +38 -0
- package/dist/services/workspaces/lambdas/get-workspace-item/index.d.ts +1 -0
- package/dist/services/workspaces/lambdas/get-workspace-item/index.js +22 -0
- package/dist/services/workspaces/lambdas/get-workspace-item/index.mjs +1 -0
- package/dist/services/workspaces/lambdas/index.d.ts +5 -0
- package/dist/services/workspaces/lambdas/index.js +40 -0
- package/dist/services/workspaces/lambdas/index.mjs +13 -0
- package/dist/services/workspaces/lambdas/list-workspace-items/index.d.ts +1 -0
- package/dist/services/workspaces/lambdas/list-workspace-items/index.js +22 -0
- package/dist/services/workspaces/lambdas/list-workspace-items/index.mjs +1 -0
- package/dist/services/workspaces/lambdas/list-workspace-items/list-workspace-items.use-case.d.ts +18 -0
- package/dist/services/workspaces/lambdas/list-workspace-items/list-workspace-items.use-case.js +69 -0
- package/dist/services/workspaces/lambdas/list-workspace-items/list-workspace-items.use-case.mjs +40 -0
- package/dist/services/workspaces/lambdas/save-workspace-item/index.d.ts +1 -0
- package/dist/services/workspaces/lambdas/save-workspace-item/index.js +22 -0
- package/dist/services/workspaces/lambdas/save-workspace-item/index.mjs +1 -0
- package/dist/services/workspaces/lambdas/save-workspace-item/save-workspace-item.use-case.d.ts +14 -0
- package/dist/services/workspaces/lambdas/save-workspace-item/save-workspace-item.use-case.js +76 -0
- package/dist/services/workspaces/lambdas/save-workspace-item/save-workspace-item.use-case.mjs +47 -0
- package/dist/services/workspaces/lambdas/search-workspace-items/index.d.ts +1 -0
- package/dist/services/workspaces/lambdas/search-workspace-items/index.js +22 -0
- package/dist/services/workspaces/lambdas/search-workspace-items/index.mjs +1 -0
- package/dist/services/workspaces/lambdas/search-workspace-items/search-workspace-items.use-case.d.ts +19 -0
- package/dist/services/workspaces/lambdas/search-workspace-items/search-workspace-items.use-case.js +73 -0
- package/dist/services/workspaces/lambdas/search-workspace-items/search-workspace-items.use-case.mjs +44 -0
- package/dist/services/workspaces/module.d.ts +11 -0
- package/dist/services/workspaces/module.js +62 -0
- package/dist/services/workspaces/module.mjs +35 -0
- package/dist/services/workspaces/repositories/index.d.ts +1 -0
- package/dist/services/workspaces/repositories/index.js +22 -0
- package/dist/services/workspaces/repositories/index.mjs +1 -0
- package/dist/services/workspaces/repositories/workspace-item.repository.d.ts +18 -0
- package/dist/services/workspaces/repositories/workspace-item.repository.js +74 -0
- package/dist/services/workspaces/repositories/workspace-item.repository.mjs +45 -0
- package/dist/skills/runtime-context.d.ts +8 -0
- package/dist/skills/runtime-context.js +65 -0
- package/dist/skills/runtime-context.mjs +42 -0
- package/dist/skills/skill.d.ts +7 -0
- package/dist/skills/skill.js +26 -60
- package/dist/skills/skill.mjs +26 -60
- package/dist/tools/tool.d.ts +6 -0
- package/dist/tools/tool.js +56 -0
- package/dist/tools/tool.mjs +56 -0
- package/package.json +4 -4
- package/dist/agent/agent.js +0 -327
- package/dist/agent/agent.mjs +0 -303
- package/dist/services/chats/entities/agent-action.entity.d.ts +0 -58
- package/dist/services/chats/entities/agent-action.entity.js +0 -151
- package/dist/services/chats/entities/agent-action.entity.mjs +0 -128
- package/dist/services/chats/entities/agent-task.entity.d.ts +0 -59
- package/dist/services/chats/entities/agent-task.entity.js +0 -231
- package/dist/services/chats/entities/agent-task.entity.mjs +0 -207
- package/dist/services/chats/entities/chat-context.entity.d.ts +0 -39
- package/dist/services/chats/entities/chat-context.entity.js +0 -70
- package/dist/services/chats/entities/chat-context.entity.mjs +0 -47
- /package/dist/{agent → harness}/agent-loop.js +0 -0
- /package/dist/{agent → harness}/agent-loop.mjs +0 -0
- /package/dist/{agent → harness}/agent-state.d.ts +0 -0
- /package/dist/{agent → harness}/index.d.ts +0 -0
- /package/dist/{agent → harness}/index.mjs +0 -0
- /package/dist/{agent → harness}/utils/rank-tools-by-keywords.d.ts +0 -0
- /package/dist/{agent → harness}/utils/rank-tools-by-keywords.js +0 -0
- /package/dist/{agent → harness}/utils/rank-tools-by-keywords.mjs +0 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import "../chunk-CF3WOMB3.mjs";
|
|
2
|
+
function buildRuntimeContext(params) {
|
|
3
|
+
const { currentUser, currentSession, chat } = params;
|
|
4
|
+
const currentCountryCode = currentSession?.location?.country;
|
|
5
|
+
const currentCurrencyCode = currentSession?.currencyCode;
|
|
6
|
+
const now = /* @__PURE__ */ new Date();
|
|
7
|
+
const timezone = currentSession?.location?.timezone;
|
|
8
|
+
const nowLocal = timezone ? now.toLocaleString("sv-SE", { timeZone: timezone }) : void 0;
|
|
9
|
+
return {
|
|
10
|
+
now_utc: now.toISOString(),
|
|
11
|
+
now_local: nowLocal,
|
|
12
|
+
timezone,
|
|
13
|
+
day_of_week: now.toLocaleDateString("en-US", { weekday: "long" }),
|
|
14
|
+
...chat?.state?.language ? { detected_language: chat.state.language } : {},
|
|
15
|
+
...currentUser ? {
|
|
16
|
+
user_details: {
|
|
17
|
+
first_name: currentUser?.firstName,
|
|
18
|
+
last_name: currentUser?.lastName,
|
|
19
|
+
preferred_language: currentUser?.language,
|
|
20
|
+
residence_country_code: currentUser?.preferences?.country?.isoCode,
|
|
21
|
+
preferred_currency_code: currentUser?.preferences?.currency?.isoCode
|
|
22
|
+
}
|
|
23
|
+
} : {},
|
|
24
|
+
...currentSession ? {
|
|
25
|
+
session_details: {
|
|
26
|
+
current_location: {
|
|
27
|
+
country_code: currentCountryCode,
|
|
28
|
+
currency_code: currentCurrencyCode,
|
|
29
|
+
timezone_offset: currentSession?.timezoneOffset
|
|
30
|
+
},
|
|
31
|
+
client_info: {
|
|
32
|
+
platform: currentSession?.device?.os,
|
|
33
|
+
brand: currentSession?.device?.brand,
|
|
34
|
+
model: currentSession?.device?.model
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
} : {}
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export {
|
|
41
|
+
buildRuntimeContext
|
|
42
|
+
};
|
package/dist/skills/skill.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { LLMMessage, LLMToolDefinition, LLMToolChoice } from '../clients/llm-types.js';
|
|
1
2
|
import { CurrentUser, CurrentSession } from '../common/base/index.js';
|
|
2
3
|
import type { Chat } from '../services/chats/entities/chat.entity.js';
|
|
3
4
|
export interface SkillProps {
|
|
@@ -6,6 +7,7 @@ export interface SkillProps {
|
|
|
6
7
|
description?: string;
|
|
7
8
|
temperature?: number;
|
|
8
9
|
systemInstructions: Record<string, any>;
|
|
10
|
+
systemRole?: boolean;
|
|
9
11
|
}
|
|
10
12
|
export interface SkillRunOptions<TInput = Record<string, any>> {
|
|
11
13
|
provider?: string;
|
|
@@ -18,6 +20,9 @@ export interface SkillRunOptions<TInput = Record<string, any>> {
|
|
|
18
20
|
contextInjection?: Record<string, any>;
|
|
19
21
|
input?: TInput;
|
|
20
22
|
chat?: Chat;
|
|
23
|
+
history?: LLMMessage[];
|
|
24
|
+
tools?: LLMToolDefinition[];
|
|
25
|
+
toolChoice?: LLMToolChoice;
|
|
21
26
|
}
|
|
22
27
|
export declare class Skill<TResponse = Record<string, any>> {
|
|
23
28
|
readonly name: string;
|
|
@@ -25,10 +30,12 @@ export declare class Skill<TResponse = Record<string, any>> {
|
|
|
25
30
|
readonly description?: string;
|
|
26
31
|
readonly temperature?: number;
|
|
27
32
|
readonly systemInstructions: Record<string, any>;
|
|
33
|
+
readonly systemRole: boolean;
|
|
28
34
|
constructor(props: SkillProps);
|
|
29
35
|
run(options: SkillRunOptions): Promise<TResponse & {
|
|
30
36
|
responseId: string;
|
|
31
37
|
costInUsd: number;
|
|
38
|
+
opening?: string;
|
|
32
39
|
}>;
|
|
33
40
|
private parseJsonResponse;
|
|
34
41
|
}
|
package/dist/skills/skill.js
CHANGED
|
@@ -24,100 +24,66 @@ module.exports = __toCommonJS(skill_exports);
|
|
|
24
24
|
var import_tsyringe = require("tsyringe");
|
|
25
25
|
var import_helpers = require("../common/helpers/index.js");
|
|
26
26
|
var import_llm_client = require("../clients/llm-client.js");
|
|
27
|
+
var import_runtime_context = require("./runtime-context");
|
|
27
28
|
class Skill {
|
|
28
29
|
name;
|
|
29
30
|
version;
|
|
30
31
|
description;
|
|
31
32
|
temperature;
|
|
32
33
|
systemInstructions;
|
|
34
|
+
systemRole;
|
|
33
35
|
constructor(props) {
|
|
34
36
|
this.name = props.name;
|
|
35
37
|
this.version = props.version;
|
|
36
38
|
this.description = props.description;
|
|
37
39
|
this.temperature = props.temperature;
|
|
38
40
|
this.systemInstructions = props.systemInstructions;
|
|
41
|
+
this.systemRole = props.systemRole ?? false;
|
|
39
42
|
}
|
|
40
43
|
async run(options) {
|
|
41
|
-
const { provider, modelName, sessionId, answerId, userMessage, currentUser, currentSession, contextInjection = {}, input = {}, chat } = options;
|
|
44
|
+
const { provider, modelName, sessionId, answerId, userMessage, currentUser, currentSession, contextInjection = {}, input = {}, chat, history = [], tools, toolChoice } = options;
|
|
42
45
|
try {
|
|
43
46
|
const llmClient = import_tsyringe.container.resolve(import_llm_client.LLMClient);
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
const timezone = currentSession?.location?.timezone;
|
|
48
|
-
const nowLocal = timezone ? now.toLocaleString("sv-SE", { timeZone: timezone }) : void 0;
|
|
49
|
-
const payload = {
|
|
50
|
-
SYSTEM_INSTRUCTIONS: {
|
|
51
|
-
...this.systemInstructions
|
|
52
|
-
},
|
|
53
|
-
CONTEXT: {
|
|
54
|
-
now_utc: (/* @__PURE__ */ new Date()).toISOString(),
|
|
55
|
-
now_local: nowLocal,
|
|
56
|
-
timezone: currentSession?.location?.timezone,
|
|
57
|
-
day_of_week: (/* @__PURE__ */ new Date()).toLocaleDateString("en-US", { weekday: "long" }),
|
|
58
|
-
...chat?.state?.language ? { detected_language: chat.state.language } : {},
|
|
59
|
-
...currentUser ? {
|
|
60
|
-
user_details: {
|
|
61
|
-
first_name: currentUser?.firstName,
|
|
62
|
-
last_name: currentUser?.lastName,
|
|
63
|
-
// Configuración/Preferencias del usuario
|
|
64
|
-
preferred_language: currentUser?.language,
|
|
65
|
-
residence_country_code: currentUser?.preferences?.country?.isoCode,
|
|
66
|
-
preferred_currency_code: currentUser?.preferences?.currency?.isoCode
|
|
67
|
-
}
|
|
68
|
-
} : {},
|
|
69
|
-
...currentSession ? {
|
|
70
|
-
session_details: {
|
|
71
|
-
current_location: {
|
|
72
|
-
country_code: currentCountryCode,
|
|
73
|
-
currency_code: currentCurrencyCode,
|
|
74
|
-
timezone_offset: currentSession?.timezoneOffset
|
|
75
|
-
},
|
|
76
|
-
client_info: {
|
|
77
|
-
platform: currentSession?.device?.os,
|
|
78
|
-
brand: currentSession?.device?.brand,
|
|
79
|
-
model: currentSession?.device?.model
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
} : {},
|
|
83
|
-
...contextInjection
|
|
84
|
-
},
|
|
85
|
-
INPUT: {
|
|
86
|
-
...userMessage ? { user_message: userMessage } : {},
|
|
87
|
-
...input
|
|
88
|
-
}
|
|
47
|
+
const context = {
|
|
48
|
+
...(0, import_runtime_context.buildRuntimeContext)({ currentUser, currentSession, chat }),
|
|
49
|
+
...contextInjection
|
|
89
50
|
};
|
|
90
|
-
const
|
|
51
|
+
const inputPayload = {
|
|
52
|
+
...userMessage ? { user_message: userMessage } : {},
|
|
53
|
+
...input
|
|
54
|
+
};
|
|
55
|
+
const continuing = history.length > 0;
|
|
56
|
+
const opening = continuing ? void 0 : JSON.stringify(this.systemRole ? { CONTEXT: context, INPUT: inputPayload } : { SYSTEM_INSTRUCTIONS: { ...this.systemInstructions }, CONTEXT: context, INPUT: inputPayload });
|
|
57
|
+
const conversation = continuing ? history : [{ role: "user", content: opening }];
|
|
58
|
+
const messages = this.systemRole ? [{ role: "system", content: JSON.stringify(this.systemInstructions) }, ...conversation] : conversation;
|
|
59
|
+
const response = await llmClient.chat({
|
|
91
60
|
provider,
|
|
92
61
|
modelName,
|
|
93
62
|
sessionId,
|
|
94
63
|
answerId,
|
|
95
64
|
origin: this.name,
|
|
96
65
|
currentUser,
|
|
97
|
-
messages
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
timestamp: Date.now(),
|
|
101
|
-
content: [{ type: "text", text: JSON.stringify(payload) }]
|
|
102
|
-
}
|
|
103
|
-
],
|
|
66
|
+
messages,
|
|
67
|
+
tools,
|
|
68
|
+
toolChoice,
|
|
104
69
|
temperature: this.temperature ?? 0.7
|
|
105
70
|
});
|
|
71
|
+
const parsed = this.parseJsonResponse(response.text);
|
|
106
72
|
const result = {
|
|
107
|
-
...
|
|
73
|
+
...parsed,
|
|
108
74
|
responseId: response.responseId ?? "",
|
|
109
|
-
costInUsd: response
|
|
75
|
+
costInUsd: response.usage.costInUsd,
|
|
76
|
+
...opening ? { opening } : {}
|
|
110
77
|
};
|
|
111
|
-
|
|
78
|
+
const reasoning = result?.reasoning;
|
|
79
|
+
chat?.addTrace({ node: this.name, reasoning });
|
|
112
80
|
return result;
|
|
113
81
|
} catch (error) {
|
|
114
82
|
chat?.addTrace({ node: this.name, reasoning: `Failed: ${error?.message ?? error}` });
|
|
115
83
|
throw error;
|
|
116
84
|
}
|
|
117
85
|
}
|
|
118
|
-
parseJsonResponse(
|
|
119
|
-
const rawContent = response?.content ?? [];
|
|
120
|
-
const text = rawContent[0]?.type === "text" ? rawContent[0].text : void 0;
|
|
86
|
+
parseJsonResponse(text) {
|
|
121
87
|
if (!text) throw new Error("LLM response text is empty or invalid");
|
|
122
88
|
const content = (0, import_helpers.extractJSON)(text);
|
|
123
89
|
if (!content) throw new Error("Failed to extract JSON from LLM response");
|
package/dist/skills/skill.mjs
CHANGED
|
@@ -2,100 +2,66 @@ import "../chunk-CF3WOMB3.mjs";
|
|
|
2
2
|
import { container } from "tsyringe";
|
|
3
3
|
import { extractJSON } from "../common/helpers/index.js";
|
|
4
4
|
import { LLMClient } from "../clients/llm-client.js";
|
|
5
|
+
import { buildRuntimeContext } from "./runtime-context";
|
|
5
6
|
class Skill {
|
|
6
7
|
name;
|
|
7
8
|
version;
|
|
8
9
|
description;
|
|
9
10
|
temperature;
|
|
10
11
|
systemInstructions;
|
|
12
|
+
systemRole;
|
|
11
13
|
constructor(props) {
|
|
12
14
|
this.name = props.name;
|
|
13
15
|
this.version = props.version;
|
|
14
16
|
this.description = props.description;
|
|
15
17
|
this.temperature = props.temperature;
|
|
16
18
|
this.systemInstructions = props.systemInstructions;
|
|
19
|
+
this.systemRole = props.systemRole ?? false;
|
|
17
20
|
}
|
|
18
21
|
async run(options) {
|
|
19
|
-
const { provider, modelName, sessionId, answerId, userMessage, currentUser, currentSession, contextInjection = {}, input = {}, chat } = options;
|
|
22
|
+
const { provider, modelName, sessionId, answerId, userMessage, currentUser, currentSession, contextInjection = {}, input = {}, chat, history = [], tools, toolChoice } = options;
|
|
20
23
|
try {
|
|
21
24
|
const llmClient = container.resolve(LLMClient);
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
const timezone = currentSession?.location?.timezone;
|
|
26
|
-
const nowLocal = timezone ? now.toLocaleString("sv-SE", { timeZone: timezone }) : void 0;
|
|
27
|
-
const payload = {
|
|
28
|
-
SYSTEM_INSTRUCTIONS: {
|
|
29
|
-
...this.systemInstructions
|
|
30
|
-
},
|
|
31
|
-
CONTEXT: {
|
|
32
|
-
now_utc: (/* @__PURE__ */ new Date()).toISOString(),
|
|
33
|
-
now_local: nowLocal,
|
|
34
|
-
timezone: currentSession?.location?.timezone,
|
|
35
|
-
day_of_week: (/* @__PURE__ */ new Date()).toLocaleDateString("en-US", { weekday: "long" }),
|
|
36
|
-
...chat?.state?.language ? { detected_language: chat.state.language } : {},
|
|
37
|
-
...currentUser ? {
|
|
38
|
-
user_details: {
|
|
39
|
-
first_name: currentUser?.firstName,
|
|
40
|
-
last_name: currentUser?.lastName,
|
|
41
|
-
// Configuración/Preferencias del usuario
|
|
42
|
-
preferred_language: currentUser?.language,
|
|
43
|
-
residence_country_code: currentUser?.preferences?.country?.isoCode,
|
|
44
|
-
preferred_currency_code: currentUser?.preferences?.currency?.isoCode
|
|
45
|
-
}
|
|
46
|
-
} : {},
|
|
47
|
-
...currentSession ? {
|
|
48
|
-
session_details: {
|
|
49
|
-
current_location: {
|
|
50
|
-
country_code: currentCountryCode,
|
|
51
|
-
currency_code: currentCurrencyCode,
|
|
52
|
-
timezone_offset: currentSession?.timezoneOffset
|
|
53
|
-
},
|
|
54
|
-
client_info: {
|
|
55
|
-
platform: currentSession?.device?.os,
|
|
56
|
-
brand: currentSession?.device?.brand,
|
|
57
|
-
model: currentSession?.device?.model
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
} : {},
|
|
61
|
-
...contextInjection
|
|
62
|
-
},
|
|
63
|
-
INPUT: {
|
|
64
|
-
...userMessage ? { user_message: userMessage } : {},
|
|
65
|
-
...input
|
|
66
|
-
}
|
|
25
|
+
const context = {
|
|
26
|
+
...buildRuntimeContext({ currentUser, currentSession, chat }),
|
|
27
|
+
...contextInjection
|
|
67
28
|
};
|
|
68
|
-
const
|
|
29
|
+
const inputPayload = {
|
|
30
|
+
...userMessage ? { user_message: userMessage } : {},
|
|
31
|
+
...input
|
|
32
|
+
};
|
|
33
|
+
const continuing = history.length > 0;
|
|
34
|
+
const opening = continuing ? void 0 : JSON.stringify(this.systemRole ? { CONTEXT: context, INPUT: inputPayload } : { SYSTEM_INSTRUCTIONS: { ...this.systemInstructions }, CONTEXT: context, INPUT: inputPayload });
|
|
35
|
+
const conversation = continuing ? history : [{ role: "user", content: opening }];
|
|
36
|
+
const messages = this.systemRole ? [{ role: "system", content: JSON.stringify(this.systemInstructions) }, ...conversation] : conversation;
|
|
37
|
+
const response = await llmClient.chat({
|
|
69
38
|
provider,
|
|
70
39
|
modelName,
|
|
71
40
|
sessionId,
|
|
72
41
|
answerId,
|
|
73
42
|
origin: this.name,
|
|
74
43
|
currentUser,
|
|
75
|
-
messages
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
timestamp: Date.now(),
|
|
79
|
-
content: [{ type: "text", text: JSON.stringify(payload) }]
|
|
80
|
-
}
|
|
81
|
-
],
|
|
44
|
+
messages,
|
|
45
|
+
tools,
|
|
46
|
+
toolChoice,
|
|
82
47
|
temperature: this.temperature ?? 0.7
|
|
83
48
|
});
|
|
49
|
+
const parsed = this.parseJsonResponse(response.text);
|
|
84
50
|
const result = {
|
|
85
|
-
...
|
|
51
|
+
...parsed,
|
|
86
52
|
responseId: response.responseId ?? "",
|
|
87
|
-
costInUsd: response
|
|
53
|
+
costInUsd: response.usage.costInUsd,
|
|
54
|
+
...opening ? { opening } : {}
|
|
88
55
|
};
|
|
89
|
-
|
|
56
|
+
const reasoning = result?.reasoning;
|
|
57
|
+
chat?.addTrace({ node: this.name, reasoning });
|
|
90
58
|
return result;
|
|
91
59
|
} catch (error) {
|
|
92
60
|
chat?.addTrace({ node: this.name, reasoning: `Failed: ${error?.message ?? error}` });
|
|
93
61
|
throw error;
|
|
94
62
|
}
|
|
95
63
|
}
|
|
96
|
-
parseJsonResponse(
|
|
97
|
-
const rawContent = response?.content ?? [];
|
|
98
|
-
const text = rawContent[0]?.type === "text" ? rawContent[0].text : void 0;
|
|
64
|
+
parseJsonResponse(text) {
|
|
99
65
|
if (!text) throw new Error("LLM response text is empty or invalid");
|
|
100
66
|
const content = extractJSON(text);
|
|
101
67
|
if (!content) throw new Error("Failed to extract JSON from LLM response");
|
package/dist/tools/tool.d.ts
CHANGED
|
@@ -8,8 +8,13 @@ interface InputSchema {
|
|
|
8
8
|
description: string;
|
|
9
9
|
fallback?: string;
|
|
10
10
|
enum?: string[];
|
|
11
|
+
anyOf?: Array<{
|
|
12
|
+
type?: string;
|
|
13
|
+
}>;
|
|
14
|
+
[key: string]: any;
|
|
11
15
|
}>;
|
|
12
16
|
required: string[];
|
|
17
|
+
additionalProperties?: boolean;
|
|
13
18
|
}
|
|
14
19
|
interface Output {
|
|
15
20
|
data: any;
|
|
@@ -39,6 +44,7 @@ export declare class Tool {
|
|
|
39
44
|
description: string;
|
|
40
45
|
annotations: string | undefined;
|
|
41
46
|
};
|
|
47
|
+
validate(args?: Record<string, any>): string[];
|
|
42
48
|
run(...args: any[]): Promise<Output>;
|
|
43
49
|
static fromMcp(mcpTool: McpTool, mcpClient: Client, opts: {
|
|
44
50
|
namespace: string;
|
package/dist/tools/tool.js
CHANGED
|
@@ -21,6 +21,35 @@ __export(tool_exports, {
|
|
|
21
21
|
Tool: () => Tool
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(tool_exports);
|
|
24
|
+
function schemaTypes(node) {
|
|
25
|
+
if (!node) return [];
|
|
26
|
+
if (node.type) return Array.isArray(node.type) ? node.type : [node.type];
|
|
27
|
+
if (Array.isArray(node.anyOf)) {
|
|
28
|
+
const nested = node.anyOf.map(schemaTypes);
|
|
29
|
+
return nested.some((types) => !types.length) ? [] : nested.reduce((all, types) => all.concat(types), []);
|
|
30
|
+
}
|
|
31
|
+
return [];
|
|
32
|
+
}
|
|
33
|
+
function matchesType(type, value) {
|
|
34
|
+
switch (type) {
|
|
35
|
+
case "string":
|
|
36
|
+
return typeof value === "string";
|
|
37
|
+
case "integer":
|
|
38
|
+
return Number.isInteger(value);
|
|
39
|
+
case "number":
|
|
40
|
+
return typeof value === "number" && !Number.isNaN(value);
|
|
41
|
+
case "boolean":
|
|
42
|
+
return typeof value === "boolean";
|
|
43
|
+
case "array":
|
|
44
|
+
return Array.isArray(value);
|
|
45
|
+
case "object":
|
|
46
|
+
return typeof value === "object" && !Array.isArray(value);
|
|
47
|
+
case "null":
|
|
48
|
+
return value === null;
|
|
49
|
+
default:
|
|
50
|
+
return true;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
24
53
|
class Tool {
|
|
25
54
|
name;
|
|
26
55
|
description;
|
|
@@ -43,6 +72,26 @@ class Tool {
|
|
|
43
72
|
annotations: this.annotations
|
|
44
73
|
};
|
|
45
74
|
}
|
|
75
|
+
validate(args = {}) {
|
|
76
|
+
const errors = [];
|
|
77
|
+
const schema = this.parameters;
|
|
78
|
+
const properties = schema?.properties ?? {};
|
|
79
|
+
for (const key of schema?.required ?? []) {
|
|
80
|
+
if (args[key] === void 0 || args[key] === null) errors.push(`Missing required argument "${key}"`);
|
|
81
|
+
}
|
|
82
|
+
for (const [key, value] of Object.entries(args)) {
|
|
83
|
+
const property = properties[key];
|
|
84
|
+
if (!property) {
|
|
85
|
+
if (schema?.additionalProperties === false) errors.push(`Unknown argument "${key}"`);
|
|
86
|
+
continue;
|
|
87
|
+
}
|
|
88
|
+
if (value === void 0 || value === null) continue;
|
|
89
|
+
const types = schemaTypes(property);
|
|
90
|
+
if (types.length && !types.some((type) => matchesType(type, value))) errors.push(`Argument "${key}" must be of type ${types.join(" or ")}`);
|
|
91
|
+
if (Array.isArray(property.enum) && !property.enum.includes(value)) errors.push(`Argument "${key}" must be one of: ${property.enum.join(", ")}`);
|
|
92
|
+
}
|
|
93
|
+
return errors;
|
|
94
|
+
}
|
|
46
95
|
async run(...args) {
|
|
47
96
|
return this.handler(...args);
|
|
48
97
|
}
|
|
@@ -50,11 +99,18 @@ class Tool {
|
|
|
50
99
|
return new Tool({
|
|
51
100
|
name: `${opts.namespace}__${mcpTool.name}`,
|
|
52
101
|
description: mcpTool.description ?? "",
|
|
102
|
+
annotations: mcpTool.annotations ? JSON.stringify(mcpTool.annotations) : void 0,
|
|
53
103
|
destructive: mcpTool.annotations?.destructiveHint ?? false,
|
|
54
104
|
parameters: mcpTool.inputSchema,
|
|
55
105
|
handler: async (params = {}) => {
|
|
56
106
|
const { currentUser, sessionId, answerId, ...args } = params;
|
|
57
107
|
const result = await mcpClient.callTool({ name: mcpTool.name, arguments: args });
|
|
108
|
+
if (result?.isError) {
|
|
109
|
+
const text = (result.content ?? []).filter((item) => item?.type === "text").map((item) => item.text).join("\n");
|
|
110
|
+
const error = new Error(text || `Tool "${mcpTool.name}" reported an error`);
|
|
111
|
+
error.retryable = false;
|
|
112
|
+
throw error;
|
|
113
|
+
}
|
|
58
114
|
return { data: result };
|
|
59
115
|
}
|
|
60
116
|
});
|
package/dist/tools/tool.mjs
CHANGED
|
@@ -1,4 +1,33 @@
|
|
|
1
1
|
import "../chunk-CF3WOMB3.mjs";
|
|
2
|
+
function schemaTypes(node) {
|
|
3
|
+
if (!node) return [];
|
|
4
|
+
if (node.type) return Array.isArray(node.type) ? node.type : [node.type];
|
|
5
|
+
if (Array.isArray(node.anyOf)) {
|
|
6
|
+
const nested = node.anyOf.map(schemaTypes);
|
|
7
|
+
return nested.some((types) => !types.length) ? [] : nested.reduce((all, types) => all.concat(types), []);
|
|
8
|
+
}
|
|
9
|
+
return [];
|
|
10
|
+
}
|
|
11
|
+
function matchesType(type, value) {
|
|
12
|
+
switch (type) {
|
|
13
|
+
case "string":
|
|
14
|
+
return typeof value === "string";
|
|
15
|
+
case "integer":
|
|
16
|
+
return Number.isInteger(value);
|
|
17
|
+
case "number":
|
|
18
|
+
return typeof value === "number" && !Number.isNaN(value);
|
|
19
|
+
case "boolean":
|
|
20
|
+
return typeof value === "boolean";
|
|
21
|
+
case "array":
|
|
22
|
+
return Array.isArray(value);
|
|
23
|
+
case "object":
|
|
24
|
+
return typeof value === "object" && !Array.isArray(value);
|
|
25
|
+
case "null":
|
|
26
|
+
return value === null;
|
|
27
|
+
default:
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
2
31
|
class Tool {
|
|
3
32
|
name;
|
|
4
33
|
description;
|
|
@@ -21,6 +50,26 @@ class Tool {
|
|
|
21
50
|
annotations: this.annotations
|
|
22
51
|
};
|
|
23
52
|
}
|
|
53
|
+
validate(args = {}) {
|
|
54
|
+
const errors = [];
|
|
55
|
+
const schema = this.parameters;
|
|
56
|
+
const properties = schema?.properties ?? {};
|
|
57
|
+
for (const key of schema?.required ?? []) {
|
|
58
|
+
if (args[key] === void 0 || args[key] === null) errors.push(`Missing required argument "${key}"`);
|
|
59
|
+
}
|
|
60
|
+
for (const [key, value] of Object.entries(args)) {
|
|
61
|
+
const property = properties[key];
|
|
62
|
+
if (!property) {
|
|
63
|
+
if (schema?.additionalProperties === false) errors.push(`Unknown argument "${key}"`);
|
|
64
|
+
continue;
|
|
65
|
+
}
|
|
66
|
+
if (value === void 0 || value === null) continue;
|
|
67
|
+
const types = schemaTypes(property);
|
|
68
|
+
if (types.length && !types.some((type) => matchesType(type, value))) errors.push(`Argument "${key}" must be of type ${types.join(" or ")}`);
|
|
69
|
+
if (Array.isArray(property.enum) && !property.enum.includes(value)) errors.push(`Argument "${key}" must be one of: ${property.enum.join(", ")}`);
|
|
70
|
+
}
|
|
71
|
+
return errors;
|
|
72
|
+
}
|
|
24
73
|
async run(...args) {
|
|
25
74
|
return this.handler(...args);
|
|
26
75
|
}
|
|
@@ -28,11 +77,18 @@ class Tool {
|
|
|
28
77
|
return new Tool({
|
|
29
78
|
name: `${opts.namespace}__${mcpTool.name}`,
|
|
30
79
|
description: mcpTool.description ?? "",
|
|
80
|
+
annotations: mcpTool.annotations ? JSON.stringify(mcpTool.annotations) : void 0,
|
|
31
81
|
destructive: mcpTool.annotations?.destructiveHint ?? false,
|
|
32
82
|
parameters: mcpTool.inputSchema,
|
|
33
83
|
handler: async (params = {}) => {
|
|
34
84
|
const { currentUser, sessionId, answerId, ...args } = params;
|
|
35
85
|
const result = await mcpClient.callTool({ name: mcpTool.name, arguments: args });
|
|
86
|
+
if (result?.isError) {
|
|
87
|
+
const text = (result.content ?? []).filter((item) => item?.type === "text").map((item) => item.text).join("\n");
|
|
88
|
+
const error = new Error(text || `Tool "${mcpTool.name}" reported an error`);
|
|
89
|
+
error.retryable = false;
|
|
90
|
+
throw error;
|
|
91
|
+
}
|
|
36
92
|
return { data: result };
|
|
37
93
|
}
|
|
38
94
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openloops",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.32",
|
|
4
4
|
"description": "Framework to build AI Agents",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Jose Barcos",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"default": "./dist/common/index.js"
|
|
25
25
|
},
|
|
26
26
|
"./core": {
|
|
27
|
-
"types": "./dist/
|
|
28
|
-
"default": "./dist/
|
|
27
|
+
"types": "./dist/harness/index.d.ts",
|
|
28
|
+
"default": "./dist/harness/index.js"
|
|
29
29
|
},
|
|
30
30
|
"./clients": {
|
|
31
31
|
"types": "./dist/clients/index.d.ts",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"push": "git push --follow-tags"
|
|
76
76
|
},
|
|
77
77
|
"dependencies": {
|
|
78
|
-
"@
|
|
78
|
+
"@earendil-works/pi-ai": "^1.0.4",
|
|
79
79
|
"@modelcontextprotocol/sdk": "^1.30.1",
|
|
80
80
|
"@sentry/node": "^11.0.0",
|
|
81
81
|
"axios": "^1.20.0",
|