beddel 0.2.2 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +50 -0
- package/README.md +117 -14
- package/dist/agents/chat/chat.handler.d.ts +12 -0
- package/dist/agents/chat/chat.handler.d.ts.map +1 -0
- package/dist/agents/chat/chat.handler.js +145 -0
- package/dist/agents/chat/chat.handler.js.map +1 -0
- package/dist/agents/chat/chat.schema.d.ts +38 -0
- package/dist/agents/chat/chat.schema.d.ts.map +1 -0
- package/dist/agents/chat/chat.schema.js +31 -0
- package/dist/agents/chat/chat.schema.js.map +1 -0
- package/dist/agents/chat/chat.types.d.ts +42 -0
- package/dist/agents/chat/chat.types.d.ts.map +1 -0
- package/dist/agents/chat/chat.types.js +6 -0
- package/dist/agents/chat/chat.types.js.map +1 -0
- package/dist/agents/chat/chat.yaml +148 -0
- package/dist/agents/chat/index.d.ts +16 -0
- package/dist/agents/chat/index.d.ts.map +1 -0
- package/dist/agents/chat/index.js +21 -0
- package/dist/agents/chat/index.js.map +1 -0
- package/dist/agents/chromadb/chromadb.handler.d.ts +12 -0
- package/dist/agents/chromadb/chromadb.handler.d.ts.map +1 -0
- package/dist/agents/chromadb/chromadb.handler.js +139 -0
- package/dist/agents/chromadb/chromadb.handler.js.map +1 -0
- package/dist/agents/chromadb/chromadb.schema.d.ts +36 -0
- package/dist/agents/chromadb/chromadb.schema.d.ts.map +1 -0
- package/dist/agents/chromadb/chromadb.schema.js +33 -0
- package/dist/agents/chromadb/chromadb.schema.js.map +1 -0
- package/dist/agents/chromadb/chromadb.types.d.ts +49 -0
- package/dist/agents/chromadb/chromadb.types.d.ts.map +1 -0
- package/dist/agents/chromadb/chromadb.types.js +6 -0
- package/dist/agents/chromadb/chromadb.types.js.map +1 -0
- package/dist/agents/chromadb/chromadb.yaml +128 -0
- package/dist/agents/chromadb/index.d.ts +15 -0
- package/dist/agents/chromadb/index.d.ts.map +1 -0
- package/dist/agents/chromadb/index.js +20 -0
- package/dist/agents/chromadb/index.js.map +1 -0
- package/dist/agents/gemini-vectorize/gemini-vectorize.handler.d.ts +8 -0
- package/dist/agents/gemini-vectorize/gemini-vectorize.handler.d.ts.map +1 -0
- package/dist/agents/gemini-vectorize/gemini-vectorize.handler.js +61 -0
- package/dist/agents/gemini-vectorize/gemini-vectorize.handler.js.map +1 -0
- package/dist/agents/gemini-vectorize/gemini-vectorize.schema.d.ts +22 -0
- package/dist/agents/gemini-vectorize/gemini-vectorize.schema.d.ts.map +1 -0
- package/dist/agents/gemini-vectorize/gemini-vectorize.schema.js +20 -0
- package/dist/agents/gemini-vectorize/gemini-vectorize.schema.js.map +1 -0
- package/dist/agents/gemini-vectorize/gemini-vectorize.types.d.ts +32 -0
- package/dist/agents/gemini-vectorize/gemini-vectorize.types.d.ts.map +1 -0
- package/dist/agents/gemini-vectorize/gemini-vectorize.types.js +6 -0
- package/dist/agents/gemini-vectorize/gemini-vectorize.types.js.map +1 -0
- package/dist/agents/gemini-vectorize/gemini-vectorize.yaml +84 -0
- package/dist/agents/gemini-vectorize/index.d.ts +15 -0
- package/dist/agents/gemini-vectorize/index.d.ts.map +1 -0
- package/dist/agents/gemini-vectorize/index.js +20 -0
- package/dist/agents/gemini-vectorize/index.js.map +1 -0
- package/dist/agents/gitmcp/gitmcp.handler.d.ts +12 -0
- package/dist/agents/gitmcp/gitmcp.handler.d.ts.map +1 -0
- package/dist/agents/gitmcp/gitmcp.handler.js +95 -0
- package/dist/agents/gitmcp/gitmcp.handler.js.map +1 -0
- package/dist/agents/gitmcp/gitmcp.schema.d.ts +17 -0
- package/dist/agents/gitmcp/gitmcp.schema.d.ts.map +1 -0
- package/dist/agents/gitmcp/gitmcp.schema.js +18 -0
- package/dist/agents/gitmcp/gitmcp.schema.js.map +1 -0
- package/dist/agents/gitmcp/gitmcp.types.d.ts +31 -0
- package/dist/agents/gitmcp/gitmcp.types.d.ts.map +1 -0
- package/dist/agents/gitmcp/gitmcp.types.js +6 -0
- package/dist/agents/gitmcp/gitmcp.types.js.map +1 -0
- package/dist/agents/gitmcp/gitmcp.yaml +71 -0
- package/dist/agents/gitmcp/index.d.ts +16 -0
- package/dist/agents/gitmcp/index.d.ts.map +1 -0
- package/dist/agents/gitmcp/index.js +21 -0
- package/dist/agents/gitmcp/index.js.map +1 -0
- package/dist/agents/image/image.handler.d.ts +8 -0
- package/dist/agents/image/image.handler.d.ts.map +1 -0
- package/dist/agents/image/image.handler.js +69 -0
- package/dist/agents/image/image.handler.js.map +1 -0
- package/dist/agents/image/image.schema.d.ts +29 -0
- package/dist/agents/image/image.schema.d.ts.map +1 -0
- package/dist/agents/image/image.schema.js +26 -0
- package/dist/agents/image/image.schema.js.map +1 -0
- package/dist/agents/image/image.types.d.ts +43 -0
- package/dist/agents/image/image.types.d.ts.map +1 -0
- package/dist/agents/image/image.types.js +6 -0
- package/dist/agents/image/image.types.js.map +1 -0
- package/{src/agents/image-agent.yaml → dist/agents/image/image.yaml} +21 -21
- package/dist/agents/image/index.d.ts +14 -0
- package/dist/agents/image/index.d.ts.map +1 -0
- package/dist/agents/image/index.js +19 -0
- package/dist/agents/image/index.js.map +1 -0
- package/dist/agents/index.d.ts +104 -0
- package/dist/agents/index.d.ts.map +1 -0
- package/dist/agents/index.js +82 -0
- package/dist/agents/index.js.map +1 -0
- package/dist/agents/joker/index.d.ts +14 -0
- package/dist/agents/joker/index.d.ts.map +1 -0
- package/dist/agents/joker/index.js +19 -0
- package/dist/agents/joker/index.js.map +1 -0
- package/dist/agents/joker/joker.handler.d.ts +8 -0
- package/dist/agents/joker/joker.handler.d.ts.map +1 -0
- package/dist/agents/joker/joker.handler.js +44 -0
- package/dist/agents/joker/joker.handler.js.map +1 -0
- package/dist/agents/joker/joker.schema.d.ts +12 -0
- package/dist/agents/joker/joker.schema.d.ts.map +1 -0
- package/dist/agents/joker/joker.schema.js +13 -0
- package/dist/agents/joker/joker.schema.js.map +1 -0
- package/dist/agents/joker/joker.types.d.ts +36 -0
- package/dist/agents/joker/joker.types.d.ts.map +1 -0
- package/dist/agents/joker/joker.types.js +6 -0
- package/dist/agents/joker/joker.types.js.map +1 -0
- package/{src/agents/joker-agent.yaml → dist/agents/joker/joker.yaml} +4 -4
- package/dist/agents/llm/index.d.ts +15 -0
- package/dist/agents/llm/index.d.ts.map +1 -0
- package/dist/agents/llm/index.js +20 -0
- package/dist/agents/llm/index.js.map +1 -0
- package/dist/agents/llm/llm.handler.d.ts +8 -0
- package/dist/agents/llm/llm.handler.d.ts.map +1 -0
- package/dist/agents/llm/llm.handler.js +64 -0
- package/dist/agents/llm/llm.handler.js.map +1 -0
- package/dist/agents/llm/llm.schema.d.ts +26 -0
- package/dist/agents/llm/llm.schema.d.ts.map +1 -0
- package/dist/agents/llm/llm.schema.js +23 -0
- package/dist/agents/llm/llm.schema.js.map +1 -0
- package/dist/agents/llm/llm.types.d.ts +34 -0
- package/dist/agents/llm/llm.types.d.ts.map +1 -0
- package/dist/agents/llm/llm.types.js +7 -0
- package/dist/agents/llm/llm.types.js.map +1 -0
- package/dist/agents/llm/llm.yaml +87 -0
- package/dist/agents/mcp-tool/index.d.ts +14 -0
- package/dist/agents/mcp-tool/index.d.ts.map +1 -0
- package/dist/agents/mcp-tool/index.js +19 -0
- package/dist/agents/mcp-tool/index.js.map +1 -0
- package/dist/agents/mcp-tool/mcp-tool.handler.d.ts +12 -0
- package/dist/agents/mcp-tool/mcp-tool.handler.d.ts.map +1 -0
- package/dist/agents/mcp-tool/mcp-tool.handler.js +116 -0
- package/dist/agents/mcp-tool/mcp-tool.handler.js.map +1 -0
- package/dist/agents/mcp-tool/mcp-tool.schema.d.ts +19 -0
- package/dist/agents/mcp-tool/mcp-tool.schema.d.ts.map +1 -0
- package/dist/agents/mcp-tool/mcp-tool.schema.js +20 -0
- package/dist/agents/mcp-tool/mcp-tool.schema.js.map +1 -0
- package/dist/agents/mcp-tool/mcp-tool.types.d.ts +31 -0
- package/dist/agents/mcp-tool/mcp-tool.types.d.ts.map +1 -0
- package/dist/agents/mcp-tool/mcp-tool.types.js +6 -0
- package/dist/agents/mcp-tool/mcp-tool.types.js.map +1 -0
- package/dist/agents/mcp-tool/mcp-tool.yaml +71 -0
- package/dist/agents/rag/index.d.ts +15 -0
- package/dist/agents/rag/index.d.ts.map +1 -0
- package/dist/agents/rag/index.js +20 -0
- package/dist/agents/rag/index.js.map +1 -0
- package/dist/agents/rag/rag.handler.d.ts +9 -0
- package/dist/agents/rag/rag.handler.d.ts.map +1 -0
- package/dist/agents/rag/rag.handler.js +78 -0
- package/dist/agents/rag/rag.handler.js.map +1 -0
- package/dist/agents/rag/rag.schema.d.ts +27 -0
- package/dist/agents/rag/rag.schema.d.ts.map +1 -0
- package/dist/agents/rag/rag.schema.js +24 -0
- package/dist/agents/rag/rag.schema.js.map +1 -0
- package/dist/agents/rag/rag.types.d.ts +42 -0
- package/dist/agents/rag/rag.types.d.ts.map +1 -0
- package/dist/agents/rag/rag.types.js +7 -0
- package/dist/agents/rag/rag.types.js.map +1 -0
- package/dist/agents/rag/rag.yaml +89 -0
- package/dist/agents/{agentRegistry.d.ts → registry/agentRegistry.d.ts} +30 -1
- package/dist/agents/registry/agentRegistry.d.ts.map +1 -0
- package/dist/agents/{agentRegistry.js → registry/agentRegistry.js} +187 -5
- package/dist/agents/registry/agentRegistry.js.map +1 -0
- package/dist/agents/registry/index.d.ts +6 -0
- package/dist/agents/registry/index.d.ts.map +1 -0
- package/dist/agents/registry/index.js +10 -0
- package/dist/agents/registry/index.js.map +1 -0
- package/dist/agents/translator/index.d.ts +14 -0
- package/dist/agents/translator/index.d.ts.map +1 -0
- package/dist/agents/translator/index.js +19 -0
- package/dist/agents/translator/index.js.map +1 -0
- package/dist/agents/translator/translator.handler.d.ts +8 -0
- package/dist/agents/translator/translator.handler.d.ts.map +1 -0
- package/dist/agents/translator/translator.handler.js +81 -0
- package/dist/agents/translator/translator.handler.js.map +1 -0
- package/dist/agents/translator/translator.schema.d.ts +27 -0
- package/dist/agents/translator/translator.schema.d.ts.map +1 -0
- package/dist/agents/translator/translator.schema.js +28 -0
- package/dist/agents/translator/translator.schema.js.map +1 -0
- package/dist/agents/translator/translator.types.d.ts +41 -0
- package/dist/agents/translator/translator.types.d.ts.map +1 -0
- package/dist/agents/translator/translator.types.js +6 -0
- package/dist/agents/translator/translator.types.js.map +1 -0
- package/{src/agents/translator-agent.yaml → dist/agents/translator/translator.yaml} +27 -27
- package/dist/client/index.d.ts +89 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +93 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/types.d.ts +17 -0
- package/dist/client/types.d.ts.map +1 -0
- package/dist/client/types.js +7 -0
- package/dist/client/types.js.map +1 -0
- package/dist/firebase/tenantManager.d.ts +34 -2
- package/dist/firebase/tenantManager.d.ts.map +1 -1
- package/dist/firebase/tenantManager.js +67 -1
- package/dist/firebase/tenantManager.js.map +1 -1
- package/dist/index.d.ts +10 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +24 -7
- package/dist/index.js.map +1 -1
- package/dist/runtime/declarativeAgentRuntime.d.ts +17 -52
- package/dist/runtime/declarativeAgentRuntime.d.ts.map +1 -1
- package/dist/runtime/declarativeAgentRuntime.js +259 -361
- package/dist/runtime/declarativeAgentRuntime.js.map +1 -1
- package/dist/runtime/index.d.ts +14 -0
- package/dist/runtime/index.d.ts.map +1 -0
- package/dist/runtime/index.js +38 -0
- package/dist/runtime/index.js.map +1 -0
- package/dist/runtime/llmProviderFactory.d.ts +47 -0
- package/dist/runtime/llmProviderFactory.d.ts.map +1 -0
- package/dist/runtime/llmProviderFactory.js +119 -0
- package/dist/runtime/llmProviderFactory.js.map +1 -0
- package/dist/runtime/workflowExecutor.d.ts +31 -0
- package/dist/runtime/workflowExecutor.d.ts.map +1 -0
- package/dist/runtime/workflowExecutor.js +80 -0
- package/dist/runtime/workflowExecutor.js.map +1 -0
- package/dist/server/api/graphql.js +3 -3
- package/dist/server/api/graphql.js.map +1 -1
- package/dist/server/index.d.ts +2 -2
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +2 -2
- package/dist/server/index.js.map +1 -1
- package/dist/shared/index.d.ts +7 -0
- package/dist/shared/index.d.ts.map +1 -0
- package/dist/shared/index.js +23 -0
- package/dist/shared/index.js.map +1 -0
- package/dist/shared/types/agent.types.d.ts +63 -0
- package/dist/shared/types/agent.types.d.ts.map +1 -0
- package/dist/shared/types/agent.types.js +18 -0
- package/dist/shared/types/agent.types.js.map +1 -0
- package/dist/shared/types/execution.types.d.ts +42 -0
- package/dist/shared/types/execution.types.d.ts.map +1 -0
- package/dist/shared/types/execution.types.js +7 -0
- package/dist/shared/types/execution.types.js.map +1 -0
- package/dist/shared/types/index.d.ts +7 -0
- package/dist/shared/types/index.d.ts.map +1 -0
- package/dist/shared/types/index.js +23 -0
- package/dist/shared/types/index.js.map +1 -0
- package/dist/shared/types/schema.types.d.ts +52 -0
- package/dist/shared/types/schema.types.d.ts.map +1 -0
- package/dist/shared/types/schema.types.js +7 -0
- package/dist/shared/types/schema.types.js.map +1 -0
- package/dist/shared/utils/index.d.ts +5 -0
- package/dist/shared/utils/index.d.ts.map +1 -0
- package/dist/shared/utils/index.js +21 -0
- package/dist/shared/utils/index.js.map +1 -0
- package/dist/shared/utils/validation.d.ts +42 -0
- package/dist/shared/utils/validation.d.ts.map +1 -0
- package/dist/shared/utils/validation.js +93 -0
- package/dist/shared/utils/validation.js.map +1 -0
- package/dist/tenant/TenantManager.d.ts +152 -0
- package/dist/tenant/TenantManager.d.ts.map +1 -0
- package/dist/tenant/TenantManager.js +392 -0
- package/dist/tenant/TenantManager.js.map +1 -0
- package/dist/tenant/index.d.ts +47 -0
- package/dist/tenant/index.d.ts.map +1 -0
- package/dist/tenant/index.js +74 -0
- package/dist/tenant/index.js.map +1 -0
- package/dist/tenant/interfaces.d.ts +170 -0
- package/dist/tenant/interfaces.d.ts.map +1 -0
- package/dist/tenant/interfaces.js +67 -0
- package/dist/tenant/interfaces.js.map +1 -0
- package/dist/tenant/providerFactory.d.ts +43 -0
- package/dist/tenant/providerFactory.d.ts.map +1 -0
- package/dist/tenant/providerFactory.js +70 -0
- package/dist/tenant/providerFactory.js.map +1 -0
- package/dist/tenant/providerRegistry.d.ts +47 -0
- package/dist/tenant/providerRegistry.d.ts.map +1 -0
- package/dist/tenant/providerRegistry.js +79 -0
- package/dist/tenant/providerRegistry.js.map +1 -0
- package/dist/tenant/providers/FirebaseTenantProvider.d.ts +41 -0
- package/dist/tenant/providers/FirebaseTenantProvider.d.ts.map +1 -0
- package/dist/tenant/providers/FirebaseTenantProvider.js +290 -0
- package/dist/tenant/providers/FirebaseTenantProvider.js.map +1 -0
- package/dist/tenant/providers/InMemoryTenantProvider.d.ts +18 -0
- package/dist/tenant/providers/InMemoryTenantProvider.d.ts.map +1 -0
- package/dist/tenant/providers/InMemoryTenantProvider.js +137 -0
- package/dist/tenant/providers/InMemoryTenantProvider.js.map +1 -0
- package/package.json +46 -10
- package/src/agents/chat/chat.handler.ts +211 -0
- package/src/agents/chat/chat.schema.ts +33 -0
- package/src/agents/chat/chat.types.ts +46 -0
- package/src/agents/chat/chat.yaml +148 -0
- package/src/agents/chat/index.ts +21 -0
- package/src/agents/chromadb/chromadb.handler.ts +130 -0
- package/src/agents/chromadb/chromadb.schema.ts +35 -0
- package/src/agents/chromadb/chromadb.types.ts +52 -0
- package/src/agents/chromadb/chromadb.yaml +128 -0
- package/src/agents/chromadb/index.ts +20 -0
- package/src/agents/gemini-vectorize/gemini-vectorize.handler.ts +75 -0
- package/src/agents/gemini-vectorize/gemini-vectorize.schema.ts +22 -0
- package/src/agents/gemini-vectorize/gemini-vectorize.types.ts +34 -0
- package/src/agents/gemini-vectorize/gemini-vectorize.yaml +84 -0
- package/src/agents/gemini-vectorize/index.ts +20 -0
- package/src/agents/gitmcp/gitmcp.handler.ts +122 -0
- package/src/agents/gitmcp/gitmcp.schema.ts +20 -0
- package/src/agents/gitmcp/gitmcp.types.ts +33 -0
- package/src/agents/gitmcp/gitmcp.yaml +71 -0
- package/src/agents/gitmcp/index.ts +21 -0
- package/src/agents/image/image.handler.ts +86 -0
- package/src/agents/image/image.schema.ts +28 -0
- package/src/agents/image/image.types.ts +46 -0
- package/src/agents/image/image.yaml +86 -0
- package/src/agents/image/index.ts +19 -0
- package/src/agents/index.ts +63 -0
- package/src/agents/joker/index.ts +19 -0
- package/src/agents/joker/joker.handler.ts +55 -0
- package/src/agents/joker/joker.schema.ts +15 -0
- package/src/agents/joker/joker.types.ts +38 -0
- package/src/agents/joker/joker.yaml +47 -0
- package/src/agents/llm/index.ts +20 -0
- package/src/agents/llm/llm.handler.ts +82 -0
- package/src/agents/llm/llm.schema.ts +25 -0
- package/src/agents/llm/llm.types.ts +37 -0
- package/src/agents/llm/llm.yaml +87 -0
- package/src/agents/mcp-tool/index.ts +19 -0
- package/src/agents/mcp-tool/mcp-tool.handler.ts +112 -0
- package/src/agents/mcp-tool/mcp-tool.schema.ts +22 -0
- package/src/agents/mcp-tool/mcp-tool.types.ts +33 -0
- package/src/agents/mcp-tool/mcp-tool.yaml +71 -0
- package/src/agents/rag/index.ts +20 -0
- package/src/agents/rag/rag.handler.ts +95 -0
- package/src/agents/rag/rag.schema.ts +26 -0
- package/src/agents/rag/rag.types.ts +45 -0
- package/src/agents/rag/rag.yaml +89 -0
- package/src/agents/{agentRegistry.ts → registry/agentRegistry.ts} +195 -6
- package/src/agents/registry/index.ts +6 -0
- package/src/agents/translator/index.ts +19 -0
- package/src/agents/translator/translator.handler.ts +97 -0
- package/src/agents/translator/translator.schema.ts +30 -0
- package/src/agents/translator/translator.types.ts +43 -0
- package/src/agents/translator/translator.yaml +80 -0
- package/src/client/index.ts +53 -0
- package/src/client/types.ts +38 -0
- package/src/index.ts +56 -5
- package/src/runtime/declarativeAgentRuntime.ts +378 -495
- package/src/runtime/index.ts +36 -0
- package/src/runtime/llmProviderFactory.ts +145 -0
- package/src/runtime/workflowExecutor.ts +107 -0
- package/src/server/api/graphql.ts +1 -1
- package/src/server/index.ts +2 -2
- package/src/shared/index.ts +7 -0
- package/src/shared/types/agent.types.ts +100 -0
- package/src/shared/types/execution.types.ts +45 -0
- package/src/shared/types/index.ts +7 -0
- package/src/shared/types/schema.types.ts +55 -0
- package/src/shared/utils/index.ts +5 -0
- package/src/shared/utils/validation.ts +100 -0
- package/src/tenant/TenantManager.ts +488 -0
- package/src/tenant/index.ts +101 -0
- package/src/tenant/interfaces.ts +231 -0
- package/src/tenant/providerFactory.ts +75 -0
- package/src/tenant/providerRegistry.ts +86 -0
- package/src/tenant/providers/InMemoryTenantProvider.ts +168 -0
- package/dist/agents/agentRegistry.d.ts.map +0 -1
- package/dist/agents/agentRegistry.js.map +0 -1
- package/src/firebase/tenantManager.ts +0 -443
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import 'server-only';
|
|
2
|
+
import type { ExecutionContext } from '../../types/executionContext';
|
|
3
|
+
import type { JokeHandlerParams, JokeHandlerResult } from './joker.types';
|
|
4
|
+
/**
|
|
5
|
+
* Execute joke generation using configured LLM provider
|
|
6
|
+
*/
|
|
7
|
+
export declare function executeJokeHandler(params: JokeHandlerParams, props: Record<string, string>, context: ExecutionContext): Promise<JokeHandlerResult>;
|
|
8
|
+
//# sourceMappingURL=joker.handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"joker.handler.d.ts","sourceRoot":"","sources":["../../../src/agents/joker/joker.handler.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AASrB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAE1E;;GAEG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,iBAAiB,EACzB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC7B,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,iBAAiB,CAAC,CAmC5B"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.executeJokeHandler = executeJokeHandler;
|
|
4
|
+
require("server-only");
|
|
5
|
+
/**
|
|
6
|
+
* Joker Agent Handler - Server-only execution logic
|
|
7
|
+
* Generates jokes using LLM providers (Google Gemini by default)
|
|
8
|
+
*/
|
|
9
|
+
const ai_1 = require("ai");
|
|
10
|
+
const llmProviderFactory_1 = require("../../runtime/llmProviderFactory");
|
|
11
|
+
/**
|
|
12
|
+
* Execute joke generation using configured LLM provider
|
|
13
|
+
*/
|
|
14
|
+
async function executeJokeHandler(params, props, context) {
|
|
15
|
+
const providerConfig = (0, llmProviderFactory_1.extractProviderConfig)(props, 'google');
|
|
16
|
+
const model = llmProviderFactory_1.LLMProviderFactory.createLanguageModel(providerConfig);
|
|
17
|
+
const prompt = params.prompt?.trim() || 'Tell a short and original joke that works for any audience.';
|
|
18
|
+
const temperature = params.temperature ?? 0.8;
|
|
19
|
+
const maxTokens = params.maxTokens;
|
|
20
|
+
const startTime = Date.now();
|
|
21
|
+
context.log(`[Joker] Generating joke with temperature=${temperature}`);
|
|
22
|
+
const { text } = await (0, ai_1.generateText)({
|
|
23
|
+
model,
|
|
24
|
+
prompt,
|
|
25
|
+
temperature,
|
|
26
|
+
...(maxTokens && { maxOutputTokens: maxTokens }),
|
|
27
|
+
});
|
|
28
|
+
const finalText = text?.trim() || '';
|
|
29
|
+
if (!finalText) {
|
|
30
|
+
throw new Error('Gemini returned empty response');
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
text: finalText,
|
|
34
|
+
metadata: {
|
|
35
|
+
model_used: providerConfig.model || llmProviderFactory_1.LLMProviderFactory.getDefaultModel(providerConfig.provider),
|
|
36
|
+
provider: providerConfig.provider,
|
|
37
|
+
processing_time: Date.now() - startTime,
|
|
38
|
+
temperature,
|
|
39
|
+
max_tokens: maxTokens ?? null,
|
|
40
|
+
prompt_used: prompt,
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=joker.handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"joker.handler.js","sourceRoot":"","sources":["../../../src/agents/joker/joker.handler.ts"],"names":[],"mappings":";;AAeA,gDAuCC;AAtDD,uBAAqB;AAErB;;;GAGG;AAEH,2BAAkC;AAClC,yEAA6F;AAI7F;;GAEG;AACI,KAAK,UAAU,kBAAkB,CACtC,MAAyB,EACzB,KAA6B,EAC7B,OAAyB;IAEzB,MAAM,cAAc,GAAG,IAAA,0CAAqB,EAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IAC9D,MAAM,KAAK,GAAG,uCAAkB,CAAC,mBAAmB,CAAC,cAAc,CAAC,CAAC;IAErE,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,6DAA6D,CAAC;IACtG,MAAM,WAAW,GAAG,MAAM,CAAC,WAAW,IAAI,GAAG,CAAC;IAC9C,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;IAEnC,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAE7B,OAAO,CAAC,GAAG,CAAC,4CAA4C,WAAW,EAAE,CAAC,CAAC;IAEvE,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAA,iBAAY,EAAC;QAClC,KAAK;QACL,MAAM;QACN,WAAW;QACX,GAAG,CAAC,SAAS,IAAI,EAAE,eAAe,EAAE,SAAS,EAAE,CAAC;KACjD,CAAC,CAAC;IAEH,MAAM,SAAS,GAAG,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IACrC,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;IACpD,CAAC;IAED,OAAO;QACL,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE;YACR,UAAU,EAAE,cAAc,CAAC,KAAK,IAAI,uCAAkB,CAAC,eAAe,CAAC,cAAc,CAAC,QAAQ,CAAC;YAC/F,QAAQ,EAAE,cAAc,CAAC,QAAQ;YACjC,eAAe,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS;YACvC,WAAW;YACX,UAAU,EAAE,SAAS,IAAI,IAAI;YAC7B,WAAW,EAAE,MAAM;SACpB;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Joker Agent Schema - Zod validation schemas
|
|
3
|
+
* Safe for both client and server
|
|
4
|
+
*/
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
export declare const JokerInputSchema: z.ZodOptional<z.ZodObject<{}, z.core.$strip>>;
|
|
7
|
+
export declare const JokerOutputSchema: z.ZodObject<{
|
|
8
|
+
response: z.ZodString;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
export type JokerInput = z.infer<typeof JokerInputSchema>;
|
|
11
|
+
export type JokerOutput = z.infer<typeof JokerOutputSchema>;
|
|
12
|
+
//# sourceMappingURL=joker.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"joker.schema.d.ts","sourceRoot":"","sources":["../../../src/agents/joker/joker.schema.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,gBAAgB,+CAA0B,CAAC;AAExD,eAAO,MAAM,iBAAiB;;iBAE5B,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC1D,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Joker Agent Schema - Zod validation schemas
|
|
4
|
+
* Safe for both client and server
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.JokerOutputSchema = exports.JokerInputSchema = void 0;
|
|
8
|
+
const zod_1 = require("zod");
|
|
9
|
+
exports.JokerInputSchema = zod_1.z.object({}).optional();
|
|
10
|
+
exports.JokerOutputSchema = zod_1.z.object({
|
|
11
|
+
response: zod_1.z.string(),
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=joker.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"joker.schema.js","sourceRoot":"","sources":["../../../src/agents/joker/joker.schema.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,6BAAwB;AAEX,QAAA,gBAAgB,GAAG,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC;AAE3C,QAAA,iBAAiB,GAAG,OAAC,CAAC,MAAM,CAAC;IACxC,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE;CACrB,CAAC,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Joker Agent Types - Shared between client and server
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Parameters for joke generation
|
|
6
|
+
*/
|
|
7
|
+
export interface JokeHandlerParams {
|
|
8
|
+
prompt?: string;
|
|
9
|
+
temperature?: number;
|
|
10
|
+
maxTokens?: number;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Result from joke generation
|
|
14
|
+
*/
|
|
15
|
+
export interface JokeHandlerResult {
|
|
16
|
+
text: string;
|
|
17
|
+
metadata: {
|
|
18
|
+
model_used: string;
|
|
19
|
+
provider: string;
|
|
20
|
+
processing_time: number;
|
|
21
|
+
temperature: number;
|
|
22
|
+
max_tokens: number | null;
|
|
23
|
+
prompt_used: string;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Joker agent metadata
|
|
28
|
+
*/
|
|
29
|
+
export interface JokerMetadata {
|
|
30
|
+
id: 'joker';
|
|
31
|
+
name: string;
|
|
32
|
+
description: string;
|
|
33
|
+
category: 'utility';
|
|
34
|
+
route: '/agents/joker';
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=joker.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"joker.types.d.ts","sourceRoot":"","sources":["../../../src/agents/joker/joker.types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE;QACR,UAAU,EAAE,MAAM,CAAC;QACnB,QAAQ,EAAE,MAAM,CAAC;QACjB,eAAe,EAAE,MAAM,CAAC;QACxB,WAAW,EAAE,MAAM,CAAC;QACpB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;QAC1B,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,OAAO,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,EAAE,eAAe,CAAC;CACxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"joker.types.js","sourceRoot":"","sources":["../../../src/agents/joker/joker.types.ts"],"names":[],"mappings":";AAAA;;GAEG"}
|
|
@@ -9,7 +9,7 @@ agent:
|
|
|
9
9
|
|
|
10
10
|
metadata:
|
|
11
11
|
name: "Joker Agent"
|
|
12
|
-
description: "
|
|
12
|
+
description: "Tells jokes using Gemini Flash"
|
|
13
13
|
category: "utility"
|
|
14
14
|
route: "/agents/joker"
|
|
15
15
|
|
|
@@ -32,7 +32,7 @@ logic:
|
|
|
32
32
|
type: "genkit-joke"
|
|
33
33
|
action:
|
|
34
34
|
type: "joke"
|
|
35
|
-
prompt: "
|
|
35
|
+
prompt: "Tell a short and original joke that works for any audience."
|
|
36
36
|
result: "jokerResult"
|
|
37
37
|
|
|
38
38
|
- name: "deliver-response"
|
|
@@ -40,8 +40,8 @@ logic:
|
|
|
40
40
|
action:
|
|
41
41
|
type: "generate"
|
|
42
42
|
output:
|
|
43
|
-
response: "$jokerResult.
|
|
43
|
+
response: "$jokerResult.text"
|
|
44
44
|
|
|
45
45
|
output:
|
|
46
46
|
schema:
|
|
47
|
-
response: "$jokerResult.
|
|
47
|
+
response: "$jokerResult.text"
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LLM Agent - Public exports (client-safe)
|
|
3
|
+
*/
|
|
4
|
+
export { LlmInputSchema, LlmOutputSchema } from './llm.schema';
|
|
5
|
+
export type { LlmInput, LlmOutput } from './llm.schema';
|
|
6
|
+
export type { LlmHandlerParams, LlmHandlerResult, LlmMetadata } from './llm.types';
|
|
7
|
+
export declare const llmMetadata: {
|
|
8
|
+
readonly id: "llm";
|
|
9
|
+
readonly name: "LLM Chat Agent";
|
|
10
|
+
readonly description: "Direct LLM interaction with conversation history support (non-RAG)";
|
|
11
|
+
readonly category: "intelligence";
|
|
12
|
+
readonly route: "/agents/llm";
|
|
13
|
+
readonly tags: readonly ["llm", "chat", "gemini", "conversation"];
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/agents/llm/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/D,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGxD,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAGnF,eAAO,MAAM,WAAW;;;;;;;CAOd,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* LLM Agent - Public exports (client-safe)
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.llmMetadata = exports.LlmOutputSchema = exports.LlmInputSchema = void 0;
|
|
7
|
+
// Schema exports (client-safe)
|
|
8
|
+
var llm_schema_1 = require("./llm.schema");
|
|
9
|
+
Object.defineProperty(exports, "LlmInputSchema", { enumerable: true, get: function () { return llm_schema_1.LlmInputSchema; } });
|
|
10
|
+
Object.defineProperty(exports, "LlmOutputSchema", { enumerable: true, get: function () { return llm_schema_1.LlmOutputSchema; } });
|
|
11
|
+
// Metadata (client-safe)
|
|
12
|
+
exports.llmMetadata = {
|
|
13
|
+
id: 'llm',
|
|
14
|
+
name: 'LLM Chat Agent',
|
|
15
|
+
description: 'Direct LLM interaction with conversation history support (non-RAG)',
|
|
16
|
+
category: 'intelligence',
|
|
17
|
+
route: '/agents/llm',
|
|
18
|
+
tags: ['llm', 'chat', 'gemini', 'conversation'],
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/agents/llm/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,+BAA+B;AAC/B,2CAA+D;AAAtD,4GAAA,cAAc,OAAA;AAAE,6GAAA,eAAe,OAAA;AAMxC,yBAAyB;AACZ,QAAA,WAAW,GAAG;IACzB,EAAE,EAAE,KAAK;IACT,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,oEAAoE;IACjF,QAAQ,EAAE,cAAc;IACxB,KAAK,EAAE,aAAa;IACpB,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,CAAC;CACvC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import 'server-only';
|
|
2
|
+
import type { ExecutionContext } from '../../types/executionContext';
|
|
3
|
+
import type { LlmHandlerParams, LlmHandlerResult } from './llm.types';
|
|
4
|
+
/**
|
|
5
|
+
* Execute direct LLM chat
|
|
6
|
+
*/
|
|
7
|
+
export declare function executeLlmHandler(params: LlmHandlerParams, props: Record<string, string>, context: ExecutionContext): Promise<LlmHandlerResult>;
|
|
8
|
+
//# sourceMappingURL=llm.handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"llm.handler.d.ts","sourceRoot":"","sources":["../../../src/agents/llm/llm.handler.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AASrB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AA8BtE;;GAEG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,gBAAgB,EACxB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC7B,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,gBAAgB,CAAC,CAkC3B"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.executeLlmHandler = executeLlmHandler;
|
|
4
|
+
require("server-only");
|
|
5
|
+
/**
|
|
6
|
+
* LLM Agent Handler - Server-only execution logic
|
|
7
|
+
* Direct LLM interaction with conversation history support (non-RAG)
|
|
8
|
+
*/
|
|
9
|
+
const ai_1 = require("ai");
|
|
10
|
+
const llmProviderFactory_1 = require("../../runtime/llmProviderFactory");
|
|
11
|
+
/**
|
|
12
|
+
* Build prompt for direct LLM chat (no document context)
|
|
13
|
+
*/
|
|
14
|
+
function buildChatPrompt(query, history, systemPrompt) {
|
|
15
|
+
const system = systemPrompt || 'You are a helpful, friendly assistant.';
|
|
16
|
+
const conversationContext = history?.length
|
|
17
|
+
? `CONVERSATION HISTORY:\n${history.map((m) => `${m.role.toUpperCase()}: ${m.content}`).join('\n')}\n\n`
|
|
18
|
+
: '';
|
|
19
|
+
return `${system}
|
|
20
|
+
|
|
21
|
+
${conversationContext}USER MESSAGE:
|
|
22
|
+
${query}
|
|
23
|
+
|
|
24
|
+
INSTRUCTIONS:
|
|
25
|
+
1. Respond naturally to the user's message.
|
|
26
|
+
2. Consider the conversation history for context continuity if available.
|
|
27
|
+
3. Be concise but helpful.
|
|
28
|
+
|
|
29
|
+
RESPONSE:`;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Execute direct LLM chat
|
|
33
|
+
*/
|
|
34
|
+
async function executeLlmHandler(params, props, context) {
|
|
35
|
+
const providerConfig = (0, llmProviderFactory_1.extractProviderConfig)(props, 'google');
|
|
36
|
+
const model = llmProviderFactory_1.LLMProviderFactory.createLanguageModel(providerConfig);
|
|
37
|
+
const { query, history, temperature = 0.7, systemPrompt } = params;
|
|
38
|
+
if (!query) {
|
|
39
|
+
throw new Error('Missing required LLM input: query');
|
|
40
|
+
}
|
|
41
|
+
const prompt = buildChatPrompt(query, history, systemPrompt);
|
|
42
|
+
try {
|
|
43
|
+
context.log(`[LLM] Generating response for: "${query.substring(0, 50)}..."`);
|
|
44
|
+
const { text } = await (0, ai_1.generateText)({
|
|
45
|
+
model,
|
|
46
|
+
prompt,
|
|
47
|
+
temperature,
|
|
48
|
+
});
|
|
49
|
+
return {
|
|
50
|
+
response: text,
|
|
51
|
+
timestamp: new Date().toISOString(),
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
catch (error) {
|
|
55
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
56
|
+
context.log(`[LLM] Error: ${message}`);
|
|
57
|
+
return {
|
|
58
|
+
response: '',
|
|
59
|
+
timestamp: new Date().toISOString(),
|
|
60
|
+
error: message,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=llm.handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"llm.handler.js","sourceRoot":"","sources":["../../../src/agents/llm/llm.handler.ts"],"names":[],"mappings":";;AA2CA,8CAsCC;AAjFD,uBAAqB;AAErB;;;GAGG;AAEH,2BAAkC;AAClC,yEAA6F;AAK7F;;GAEG;AACH,SAAS,eAAe,CACtB,KAAa,EACb,OAA+B,EAC/B,YAAqB;IAErB,MAAM,MAAM,GAAG,YAAY,IAAI,wCAAwC,CAAC;IAExE,MAAM,mBAAmB,GAAG,OAAO,EAAE,MAAM;QACzC,CAAC,CAAC,0BAA0B,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM;QACxG,CAAC,CAAC,EAAE,CAAC;IAEP,OAAO,GAAG,MAAM;;EAEhB,mBAAmB;EACnB,KAAK;;;;;;;UAOG,CAAC;AACX,CAAC;AAED;;GAEG;AACI,KAAK,UAAU,iBAAiB,CACrC,MAAwB,EACxB,KAA6B,EAC7B,OAAyB;IAEzB,MAAM,cAAc,GAAG,IAAA,0CAAqB,EAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IAC9D,MAAM,KAAK,GAAG,uCAAkB,CAAC,mBAAmB,CAAC,cAAc,CAAC,CAAC;IAErE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,GAAG,GAAG,EAAE,YAAY,EAAE,GAAG,MAAM,CAAC;IAEnE,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;IACvD,CAAC;IAED,MAAM,MAAM,GAAG,eAAe,CAAC,KAAK,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC;IAE7D,IAAI,CAAC;QACH,OAAO,CAAC,GAAG,CAAC,mCAAmC,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC;QAE7E,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAA,iBAAY,EAAC;YAClC,KAAK;YACL,MAAM;YACN,WAAW;SACZ,CAAC,CAAC;QAEH,OAAO;YACL,QAAQ,EAAE,IAAI;YACd,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;SACpC,CAAC;IACJ,CAAC;IAAC,OAAO,KAAc,EAAE,CAAC;QACxB,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACvE,OAAO,CAAC,GAAG,CAAC,gBAAgB,OAAO,EAAE,CAAC,CAAC;QACvC,OAAO;YACL,QAAQ,EAAE,EAAE;YACZ,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACnC,KAAK,EAAE,OAAO;SACf,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LLM Agent Schema - Zod validation schemas
|
|
3
|
+
* Safe for both client and server
|
|
4
|
+
*/
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
export declare const LlmInputSchema: z.ZodObject<{
|
|
7
|
+
query: z.ZodString;
|
|
8
|
+
history: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
9
|
+
role: z.ZodEnum<{
|
|
10
|
+
user: "user";
|
|
11
|
+
assistant: "assistant";
|
|
12
|
+
system: "system";
|
|
13
|
+
}>;
|
|
14
|
+
content: z.ZodString;
|
|
15
|
+
}, z.core.$strip>>>;
|
|
16
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
17
|
+
systemPrompt: z.ZodOptional<z.ZodString>;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
export declare const LlmOutputSchema: z.ZodObject<{
|
|
20
|
+
response: z.ZodString;
|
|
21
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
22
|
+
error: z.ZodOptional<z.ZodString>;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
export type LlmInput = z.infer<typeof LlmInputSchema>;
|
|
25
|
+
export type LlmOutput = z.infer<typeof LlmOutputSchema>;
|
|
26
|
+
//# sourceMappingURL=llm.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"llm.schema.d.ts","sourceRoot":"","sources":["../../../src/agents/llm/llm.schema.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,cAAc;;;;;;;;;;;;iBAQzB,CAAC;AAEH,eAAO,MAAM,eAAe;;;;iBAI1B,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AACtD,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* LLM Agent Schema - Zod validation schemas
|
|
4
|
+
* Safe for both client and server
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.LlmOutputSchema = exports.LlmInputSchema = void 0;
|
|
8
|
+
const zod_1 = require("zod");
|
|
9
|
+
exports.LlmInputSchema = zod_1.z.object({
|
|
10
|
+
query: zod_1.z.string().min(1),
|
|
11
|
+
history: zod_1.z.array(zod_1.z.object({
|
|
12
|
+
role: zod_1.z.enum(['user', 'assistant', 'system']),
|
|
13
|
+
content: zod_1.z.string(),
|
|
14
|
+
})).optional(),
|
|
15
|
+
temperature: zod_1.z.number().min(0).max(2).optional(),
|
|
16
|
+
systemPrompt: zod_1.z.string().optional(),
|
|
17
|
+
});
|
|
18
|
+
exports.LlmOutputSchema = zod_1.z.object({
|
|
19
|
+
response: zod_1.z.string(),
|
|
20
|
+
timestamp: zod_1.z.string().optional(),
|
|
21
|
+
error: zod_1.z.string().optional(),
|
|
22
|
+
});
|
|
23
|
+
//# sourceMappingURL=llm.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"llm.schema.js","sourceRoot":"","sources":["../../../src/agents/llm/llm.schema.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,6BAAwB;AAEX,QAAA,cAAc,GAAG,OAAC,CAAC,MAAM,CAAC;IACrC,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACxB,OAAO,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,CAAC;QACxB,IAAI,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAC;QAC7C,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;KACpB,CAAC,CAAC,CAAC,QAAQ,EAAE;IACd,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAChD,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACpC,CAAC,CAAC;AAEU,QAAA,eAAe,GAAG,OAAC,CAAC,MAAM,CAAC;IACtC,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE;IACpB,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC7B,CAAC,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LLM Agent Types - Shared between client and server
|
|
3
|
+
* Direct LLM interaction without document context (non-RAG)
|
|
4
|
+
*/
|
|
5
|
+
import type { ConversationMessage } from '../rag/rag.types';
|
|
6
|
+
/**
|
|
7
|
+
* Parameters for direct LLM chat
|
|
8
|
+
*/
|
|
9
|
+
export interface LlmHandlerParams {
|
|
10
|
+
query: string;
|
|
11
|
+
history?: ConversationMessage[];
|
|
12
|
+
temperature?: number;
|
|
13
|
+
systemPrompt?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Result from LLM chat
|
|
17
|
+
*/
|
|
18
|
+
export interface LlmHandlerResult {
|
|
19
|
+
response: string;
|
|
20
|
+
timestamp: string;
|
|
21
|
+
error?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* LLM agent metadata
|
|
25
|
+
*/
|
|
26
|
+
export interface LlmMetadata {
|
|
27
|
+
id: 'llm';
|
|
28
|
+
name: string;
|
|
29
|
+
description: string;
|
|
30
|
+
category: 'intelligence';
|
|
31
|
+
route: '/agents/llm';
|
|
32
|
+
tags: string[];
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=llm.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"llm.types.d.ts","sourceRoot":"","sources":["../../../src/agents/llm/llm.types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,KAAK,CAAC;IACV,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,cAAc,CAAC;IACzB,KAAK,EAAE,aAAa,CAAC;IACrB,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"llm.types.js","sourceRoot":"","sources":["../../../src/agents/llm/llm.types.ts"],"names":[],"mappings":";AAAA;;;GAGG"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# LLM Agent - Native Builtin Agent for Beddel Runtime
|
|
2
|
+
# Route: /agents/llm
|
|
3
|
+
# Method: llm.execute
|
|
4
|
+
|
|
5
|
+
agent:
|
|
6
|
+
id: llm
|
|
7
|
+
version: 1.0.0
|
|
8
|
+
protocol: beddel-declarative-protocol/v2.0
|
|
9
|
+
|
|
10
|
+
metadata:
|
|
11
|
+
name: "LLM Chat Agent"
|
|
12
|
+
description: "Direct LLM interaction with conversation history support (non-RAG)"
|
|
13
|
+
category: "intelligence"
|
|
14
|
+
route: "/agents/llm"
|
|
15
|
+
tags:
|
|
16
|
+
- "llm"
|
|
17
|
+
- "chat"
|
|
18
|
+
- "gemini"
|
|
19
|
+
- "conversation"
|
|
20
|
+
|
|
21
|
+
schema:
|
|
22
|
+
input:
|
|
23
|
+
type: "object"
|
|
24
|
+
properties:
|
|
25
|
+
query:
|
|
26
|
+
type: "string"
|
|
27
|
+
description: "User message to respond to"
|
|
28
|
+
history:
|
|
29
|
+
type: "array"
|
|
30
|
+
items:
|
|
31
|
+
type: "object"
|
|
32
|
+
properties:
|
|
33
|
+
role:
|
|
34
|
+
type: "string"
|
|
35
|
+
enum: ["user", "assistant", "system"]
|
|
36
|
+
content:
|
|
37
|
+
type: "string"
|
|
38
|
+
description: "Conversation history for context continuity"
|
|
39
|
+
temperature:
|
|
40
|
+
type: "number"
|
|
41
|
+
minimum: 0
|
|
42
|
+
maximum: 2
|
|
43
|
+
default: 0.7
|
|
44
|
+
description: "LLM temperature for response generation"
|
|
45
|
+
systemPrompt:
|
|
46
|
+
type: "string"
|
|
47
|
+
description: "Custom system prompt for the LLM"
|
|
48
|
+
required: ["query"]
|
|
49
|
+
|
|
50
|
+
output:
|
|
51
|
+
type: "object"
|
|
52
|
+
properties:
|
|
53
|
+
response:
|
|
54
|
+
type: "string"
|
|
55
|
+
description: "Generated response"
|
|
56
|
+
timestamp:
|
|
57
|
+
type: "string"
|
|
58
|
+
description: "ISO timestamp of generation"
|
|
59
|
+
error:
|
|
60
|
+
type: "string"
|
|
61
|
+
required: ["response"]
|
|
62
|
+
|
|
63
|
+
logic:
|
|
64
|
+
workflow:
|
|
65
|
+
- name: "generate-response"
|
|
66
|
+
type: "llm"
|
|
67
|
+
action:
|
|
68
|
+
query: "$input.query"
|
|
69
|
+
history: "$input.history"
|
|
70
|
+
temperature: "$input.temperature"
|
|
71
|
+
systemPrompt: "$input.systemPrompt"
|
|
72
|
+
result: "llmResult"
|
|
73
|
+
|
|
74
|
+
- name: "deliver-response"
|
|
75
|
+
type: "output-generator"
|
|
76
|
+
action:
|
|
77
|
+
type: "generate"
|
|
78
|
+
output:
|
|
79
|
+
response: "$llmResult.response"
|
|
80
|
+
timestamp: "$llmResult.timestamp"
|
|
81
|
+
error: "$llmResult.error"
|
|
82
|
+
|
|
83
|
+
output:
|
|
84
|
+
schema:
|
|
85
|
+
response: "$llmResult.response"
|
|
86
|
+
timestamp: "$llmResult.timestamp"
|
|
87
|
+
error: "$llmResult.error"
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Tool Agent - Public exports (client-safe)
|
|
3
|
+
*/
|
|
4
|
+
export { McpToolInputSchema, McpToolOutputSchema } from './mcp-tool.schema';
|
|
5
|
+
export type { McpToolInput, McpToolOutput } from './mcp-tool.schema';
|
|
6
|
+
export type { McpToolHandlerParams, McpToolHandlerResult, McpToolMetadata } from './mcp-tool.types';
|
|
7
|
+
export declare const mcpToolMetadata: {
|
|
8
|
+
readonly id: "mcp-tool";
|
|
9
|
+
readonly name: "MCP Tool Agent";
|
|
10
|
+
readonly description: "Generic agent for calling MCP server tools via SSE transport";
|
|
11
|
+
readonly category: "integration";
|
|
12
|
+
readonly route: "/agents/mcp-tool";
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/agents/mcp-tool/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC5E,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGrE,YAAY,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGpG,eAAO,MAAM,eAAe;;;;;;CAMlB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* MCP Tool Agent - Public exports (client-safe)
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.mcpToolMetadata = exports.McpToolOutputSchema = exports.McpToolInputSchema = void 0;
|
|
7
|
+
// Schema exports (client-safe)
|
|
8
|
+
var mcp_tool_schema_1 = require("./mcp-tool.schema");
|
|
9
|
+
Object.defineProperty(exports, "McpToolInputSchema", { enumerable: true, get: function () { return mcp_tool_schema_1.McpToolInputSchema; } });
|
|
10
|
+
Object.defineProperty(exports, "McpToolOutputSchema", { enumerable: true, get: function () { return mcp_tool_schema_1.McpToolOutputSchema; } });
|
|
11
|
+
// Metadata (client-safe)
|
|
12
|
+
exports.mcpToolMetadata = {
|
|
13
|
+
id: 'mcp-tool',
|
|
14
|
+
name: 'MCP Tool Agent',
|
|
15
|
+
description: 'Generic agent for calling MCP server tools via SSE transport',
|
|
16
|
+
category: 'integration',
|
|
17
|
+
route: '/agents/mcp-tool',
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/agents/mcp-tool/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,+BAA+B;AAC/B,qDAA4E;AAAnE,qHAAA,kBAAkB,OAAA;AAAE,sHAAA,mBAAmB,OAAA;AAMhD,yBAAyB;AACZ,QAAA,eAAe,GAAG;IAC7B,EAAE,EAAE,UAAU;IACd,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,8DAA8D;IAC3E,QAAQ,EAAE,aAAa;IACvB,KAAK,EAAE,kBAAkB;CACjB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import 'server-only';
|
|
2
|
+
/**
|
|
3
|
+
* MCP Tool Agent Handler - Server-only execution logic
|
|
4
|
+
* Generic agent for calling MCP server tools via SSE transport
|
|
5
|
+
*/
|
|
6
|
+
import type { ExecutionContext } from '../../types/executionContext';
|
|
7
|
+
import type { McpToolHandlerParams, McpToolHandlerResult } from './mcp-tool.types';
|
|
8
|
+
/**
|
|
9
|
+
* Execute MCP tool invocation
|
|
10
|
+
*/
|
|
11
|
+
export declare function executeMcpToolHandler(params: McpToolHandlerParams, _props: Record<string, string>, context: ExecutionContext): Promise<McpToolHandlerResult>;
|
|
12
|
+
//# sourceMappingURL=mcp-tool.handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-tool.handler.d.ts","sourceRoot":"","sources":["../../../src/agents/mcp-tool/mcp-tool.handler.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AAErB;;;GAGG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,KAAK,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAMnF;;GAEG;AACH,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,oBAAoB,EAC5B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC9B,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,oBAAoB,CAAC,CA0F/B"}
|