@contractspec/example.agent-console 0.0.0-canary-20260113170453
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/.turbo/turbo-build$colon$bundle.log +280 -0
- package/.turbo/turbo-build.log +281 -0
- package/CHANGELOG.md +368 -0
- package/LICENSE +21 -0
- package/README.md +86 -0
- package/dist/agent/agent.entity.d.ts +55 -0
- package/dist/agent/agent.entity.d.ts.map +1 -0
- package/dist/agent/agent.entity.js +136 -0
- package/dist/agent/agent.entity.js.map +1 -0
- package/dist/agent/agent.enum.d.ts +18 -0
- package/dist/agent/agent.enum.d.ts.map +1 -0
- package/dist/agent/agent.enum.js +34 -0
- package/dist/agent/agent.enum.js.map +1 -0
- package/dist/agent/agent.event.d.ts +128 -0
- package/dist/agent/agent.event.d.ts.map +1 -0
- package/dist/agent/agent.event.js +210 -0
- package/dist/agent/agent.event.js.map +1 -0
- package/dist/agent/agent.handler.d.ts +100 -0
- package/dist/agent/agent.handler.d.ts.map +1 -0
- package/dist/agent/agent.handler.js +84 -0
- package/dist/agent/agent.handler.js.map +1 -0
- package/dist/agent/agent.operation.d.ts +471 -0
- package/dist/agent/agent.operation.d.ts.map +1 -0
- package/dist/agent/agent.operation.js +486 -0
- package/dist/agent/agent.operation.js.map +1 -0
- package/dist/agent/agent.presentation.d.ts +18 -0
- package/dist/agent/agent.presentation.d.ts.map +1 -0
- package/dist/agent/agent.presentation.js +89 -0
- package/dist/agent/agent.presentation.js.map +1 -0
- package/dist/agent/agent.schema.d.ts +401 -0
- package/dist/agent/agent.schema.d.ts.map +1 -0
- package/dist/agent/agent.schema.js +406 -0
- package/dist/agent/agent.schema.js.map +1 -0
- package/dist/agent/agent.test-spec.d.ts +8 -0
- package/dist/agent/agent.test-spec.d.ts.map +1 -0
- package/dist/agent/agent.test-spec.js +65 -0
- package/dist/agent/agent.test-spec.js.map +1 -0
- package/dist/agent/index.d.ts +8 -0
- package/dist/agent/index.js +9 -0
- package/dist/agent.capability.d.ts +7 -0
- package/dist/agent.capability.d.ts.map +1 -0
- package/dist/agent.capability.js +20 -0
- package/dist/agent.capability.js.map +1 -0
- package/dist/agent.feature.d.ts +12 -0
- package/dist/agent.feature.d.ts.map +1 -0
- package/dist/agent.feature.js +305 -0
- package/dist/agent.feature.js.map +1 -0
- package/dist/docs/agent-console.docblock.d.ts +1 -0
- package/dist/docs/agent-console.docblock.js +113 -0
- package/dist/docs/agent-console.docblock.js.map +1 -0
- package/dist/docs/index.d.ts +1 -0
- package/dist/docs/index.js +1 -0
- package/dist/example.d.ts +7 -0
- package/dist/example.d.ts.map +1 -0
- package/dist/example.js +58 -0
- package/dist/example.js.map +1 -0
- package/dist/handlers/agent.handlers.d.ts +135 -0
- package/dist/handlers/agent.handlers.d.ts.map +1 -0
- package/dist/handlers/agent.handlers.js +263 -0
- package/dist/handlers/agent.handlers.js.map +1 -0
- package/dist/handlers/index.d.ts +5 -0
- package/dist/handlers/index.js +6 -0
- package/dist/index.d.ts +48 -0
- package/dist/index.js +50 -0
- package/dist/presentations/index.d.ts +4 -0
- package/dist/presentations/index.js +5 -0
- package/dist/run/index.d.ts +8 -0
- package/dist/run/index.js +9 -0
- package/dist/run/run.entity.d.ts +82 -0
- package/dist/run/run.entity.d.ts.map +1 -0
- package/dist/run/run.entity.js +205 -0
- package/dist/run/run.entity.js.map +1 -0
- package/dist/run/run.enum.d.ts +22 -0
- package/dist/run/run.enum.d.ts.map +1 -0
- package/dist/run/run.enum.js +45 -0
- package/dist/run/run.enum.js.map +1 -0
- package/dist/run/run.event.d.ts +290 -0
- package/dist/run/run.event.d.ts.map +1 -0
- package/dist/run/run.event.js +434 -0
- package/dist/run/run.event.js.map +1 -0
- package/dist/run/run.handler.d.ts +203 -0
- package/dist/run/run.handler.d.ts.map +1 -0
- package/dist/run/run.handler.js +83 -0
- package/dist/run/run.handler.js.map +1 -0
- package/dist/run/run.operation.d.ts +720 -0
- package/dist/run/run.operation.d.ts.map +1 -0
- package/dist/run/run.operation.js +626 -0
- package/dist/run/run.operation.js.map +1 -0
- package/dist/run/run.presentation.d.ts +14 -0
- package/dist/run/run.presentation.d.ts.map +1 -0
- package/dist/run/run.presentation.js +65 -0
- package/dist/run/run.presentation.js.map +1 -0
- package/dist/run/run.schema.d.ts +416 -0
- package/dist/run/run.schema.d.ts.map +1 -0
- package/dist/run/run.schema.js +338 -0
- package/dist/run/run.schema.js.map +1 -0
- package/dist/run/run.test-spec.d.ts +8 -0
- package/dist/run/run.test-spec.d.ts.map +1 -0
- package/dist/run/run.test-spec.js +65 -0
- package/dist/run/run.test-spec.js.map +1 -0
- package/dist/seeders/index.d.ts +10 -0
- package/dist/seeders/index.d.ts.map +1 -0
- package/dist/seeders/index.js +20 -0
- package/dist/seeders/index.js.map +1 -0
- package/dist/shared/index.d.ts +4 -0
- package/dist/shared/index.js +5 -0
- package/dist/shared/mock-agents.d.ts +88 -0
- package/dist/shared/mock-agents.d.ts.map +1 -0
- package/dist/shared/mock-agents.js +94 -0
- package/dist/shared/mock-agents.js.map +1 -0
- package/dist/shared/mock-runs.d.ts +120 -0
- package/dist/shared/mock-runs.d.ts.map +1 -0
- package/dist/shared/mock-runs.js +118 -0
- package/dist/shared/mock-runs.js.map +1 -0
- package/dist/shared/mock-tools.d.ts +244 -0
- package/dist/shared/mock-tools.d.ts.map +1 -0
- package/dist/shared/mock-tools.js +181 -0
- package/dist/shared/mock-tools.js.map +1 -0
- package/dist/shared/overlay-types.d.ts +34 -0
- package/dist/shared/overlay-types.d.ts.map +1 -0
- package/dist/shared/overlay-types.js +0 -0
- package/dist/tool/index.d.ts +8 -0
- package/dist/tool/index.js +9 -0
- package/dist/tool/tool.entity.d.ts +42 -0
- package/dist/tool/tool.entity.d.ts.map +1 -0
- package/dist/tool/tool.entity.js +105 -0
- package/dist/tool/tool.entity.js.map +1 -0
- package/dist/tool/tool.enum.d.ts +18 -0
- package/dist/tool/tool.enum.d.ts.map +1 -0
- package/dist/tool/tool.enum.js +35 -0
- package/dist/tool/tool.enum.js.map +1 -0
- package/dist/tool/tool.event.d.ts +103 -0
- package/dist/tool/tool.event.d.ts.map +1 -0
- package/dist/tool/tool.event.js +159 -0
- package/dist/tool/tool.event.js.map +1 -0
- package/dist/tool/tool.handler.d.ts +315 -0
- package/dist/tool/tool.handler.d.ts.map +1 -0
- package/dist/tool/tool.handler.js +87 -0
- package/dist/tool/tool.handler.js.map +1 -0
- package/dist/tool/tool.operation.d.ts +411 -0
- package/dist/tool/tool.operation.d.ts.map +1 -0
- package/dist/tool/tool.operation.js +406 -0
- package/dist/tool/tool.operation.js.map +1 -0
- package/dist/tool/tool.presentation.d.ts +14 -0
- package/dist/tool/tool.presentation.d.ts.map +1 -0
- package/dist/tool/tool.presentation.js +65 -0
- package/dist/tool/tool.presentation.js.map +1 -0
- package/dist/tool/tool.schema.d.ts +218 -0
- package/dist/tool/tool.schema.d.ts.map +1 -0
- package/dist/tool/tool.schema.js +236 -0
- package/dist/tool/tool.schema.js.map +1 -0
- package/dist/tool/tool.test-spec.d.ts +8 -0
- package/dist/tool/tool.test-spec.d.ts.map +1 -0
- package/dist/tool/tool.test-spec.js +65 -0
- package/dist/tool/tool.test-spec.js.map +1 -0
- package/dist/ui/AgentDashboard.d.ts +7 -0
- package/dist/ui/AgentDashboard.d.ts.map +1 -0
- package/dist/ui/AgentDashboard.js +420 -0
- package/dist/ui/AgentDashboard.js.map +1 -0
- package/dist/ui/AgentRunList.d.ts +2 -0
- package/dist/ui/AgentRunList.js +5 -0
- package/dist/ui/AgentToolRegistry.d.ts +2 -0
- package/dist/ui/AgentToolRegistry.js +5 -0
- package/dist/ui/hooks/index.d.ts +6 -0
- package/dist/ui/hooks/index.js +8 -0
- package/dist/ui/hooks/useAgentList.d.ts +28 -0
- package/dist/ui/hooks/useAgentList.d.ts.map +1 -0
- package/dist/ui/hooks/useAgentList.js +66 -0
- package/dist/ui/hooks/useAgentList.js.map +1 -0
- package/dist/ui/hooks/useAgentMutations.d.ts +29 -0
- package/dist/ui/hooks/useAgentMutations.d.ts.map +1 -0
- package/dist/ui/hooks/useAgentMutations.js +124 -0
- package/dist/ui/hooks/useAgentMutations.js.map +1 -0
- package/dist/ui/hooks/useRunList.d.ts +24 -0
- package/dist/ui/hooks/useRunList.d.ts.map +1 -0
- package/dist/ui/hooks/useRunList.js +66 -0
- package/dist/ui/hooks/useRunList.js.map +1 -0
- package/dist/ui/hooks/useToolList.d.ts +40 -0
- package/dist/ui/hooks/useToolList.d.ts.map +1 -0
- package/dist/ui/hooks/useToolList.js +96 -0
- package/dist/ui/hooks/useToolList.js.map +1 -0
- package/dist/ui/index.d.ts +24 -0
- package/dist/ui/index.js +24 -0
- package/dist/ui/modals/AgentActionsModal.d.ts +27 -0
- package/dist/ui/modals/AgentActionsModal.d.ts.map +1 -0
- package/dist/ui/modals/AgentActionsModal.js +262 -0
- package/dist/ui/modals/AgentActionsModal.js.map +1 -0
- package/dist/ui/modals/CreateAgentModal.d.ts +25 -0
- package/dist/ui/modals/CreateAgentModal.d.ts.map +1 -0
- package/dist/ui/modals/CreateAgentModal.js +214 -0
- package/dist/ui/modals/CreateAgentModal.js.map +1 -0
- package/dist/ui/modals/index.d.ts +3 -0
- package/dist/ui/modals/index.js +4 -0
- package/dist/ui/overlays/demo-overlays.d.ts +19 -0
- package/dist/ui/overlays/demo-overlays.d.ts.map +1 -0
- package/dist/ui/overlays/demo-overlays.js +73 -0
- package/dist/ui/overlays/demo-overlays.js.map +1 -0
- package/dist/ui/overlays/index.d.ts +2 -0
- package/dist/ui/overlays/index.js +3 -0
- package/dist/ui/renderers/agent-list.markdown.d.ts +15 -0
- package/dist/ui/renderers/agent-list.markdown.d.ts.map +1 -0
- package/dist/ui/renderers/agent-list.markdown.js +51 -0
- package/dist/ui/renderers/agent-list.markdown.js.map +1 -0
- package/dist/ui/renderers/agent-list.renderer.d.ts +11 -0
- package/dist/ui/renderers/agent-list.renderer.d.ts.map +1 -0
- package/dist/ui/renderers/agent-list.renderer.js +19 -0
- package/dist/ui/renderers/agent-list.renderer.js.map +1 -0
- package/dist/ui/renderers/dashboard.markdown.d.ts +15 -0
- package/dist/ui/renderers/dashboard.markdown.d.ts.map +1 -0
- package/dist/ui/renderers/dashboard.markdown.js +100 -0
- package/dist/ui/renderers/dashboard.markdown.js.map +1 -0
- package/dist/ui/renderers/index.d.ts +6 -0
- package/dist/ui/renderers/index.js +7 -0
- package/dist/ui/renderers/run-list.markdown.d.ts +15 -0
- package/dist/ui/renderers/run-list.markdown.d.ts.map +1 -0
- package/dist/ui/renderers/run-list.markdown.js +44 -0
- package/dist/ui/renderers/run-list.markdown.js.map +1 -0
- package/dist/ui/renderers/tool-registry.markdown.d.ts +15 -0
- package/dist/ui/renderers/tool-registry.markdown.d.ts.map +1 -0
- package/dist/ui/renderers/tool-registry.markdown.js +55 -0
- package/dist/ui/renderers/tool-registry.markdown.js.map +1 -0
- package/dist/ui/views/AgentListView.d.ts +7 -0
- package/dist/ui/views/AgentListView.d.ts.map +1 -0
- package/dist/ui/views/AgentListView.js +93 -0
- package/dist/ui/views/AgentListView.js.map +1 -0
- package/dist/ui/views/RunListView.d.ts +14 -0
- package/dist/ui/views/RunListView.d.ts.map +1 -0
- package/dist/ui/views/RunListView.js +165 -0
- package/dist/ui/views/RunListView.js.map +1 -0
- package/dist/ui/views/ToolRegistryView.d.ts +14 -0
- package/dist/ui/views/ToolRegistryView.d.ts.map +1 -0
- package/dist/ui/views/ToolRegistryView.js +97 -0
- package/dist/ui/views/ToolRegistryView.js.map +1 -0
- package/dist/ui/views/index.d.ts +4 -0
- package/dist/ui/views/index.js +5 -0
- package/example.ts +1 -0
- package/package.json +155 -0
- package/src/agent/agent.entity.ts +137 -0
- package/src/agent/agent.enum.ts +31 -0
- package/src/agent/agent.event.ts +142 -0
- package/src/agent/agent.handler.ts +178 -0
- package/src/agent/agent.operation.ts +444 -0
- package/src/agent/agent.presentation.ts +80 -0
- package/src/agent/agent.schema.ts +214 -0
- package/src/agent/agent.test-spec.ts +55 -0
- package/src/agent/index.ts +67 -0
- package/src/agent.capability.ts +13 -0
- package/src/agent.feature.ts +147 -0
- package/src/docs/agent-console.docblock.ts +97 -0
- package/src/docs/index.ts +1 -0
- package/src/example.ts +41 -0
- package/src/handlers/agent.handlers.ts +572 -0
- package/src/handlers/index.ts +30 -0
- package/src/index.ts +32 -0
- package/src/presentations/index.ts +26 -0
- package/src/run/index.ts +68 -0
- package/src/run/run.entity.ts +175 -0
- package/src/run/run.enum.ts +43 -0
- package/src/run/run.event.ts +264 -0
- package/src/run/run.handler.ts +138 -0
- package/src/run/run.operation.ts +524 -0
- package/src/run/run.presentation.ts +54 -0
- package/src/run/run.schema.ts +169 -0
- package/src/run/run.test-spec.ts +55 -0
- package/src/seeders/index.ts +29 -0
- package/src/shared/index.ts +6 -0
- package/src/shared/mock-agents.ts +81 -0
- package/src/shared/mock-runs.ts +107 -0
- package/src/shared/mock-tools.ts +145 -0
- package/src/shared/overlay-types.ts +39 -0
- package/src/tool/index.ts +60 -0
- package/src/tool/tool.entity.ts +99 -0
- package/src/tool/tool.enum.ts +32 -0
- package/src/tool/tool.event.ts +119 -0
- package/src/tool/tool.handler.ts +154 -0
- package/src/tool/tool.operation.ts +366 -0
- package/src/tool/tool.presentation.ts +55 -0
- package/src/tool/tool.schema.ts +133 -0
- package/src/tool/tool.test-spec.ts +55 -0
- package/src/ui/AgentDashboard.tsx +416 -0
- package/src/ui/AgentRunList.tsx +8 -0
- package/src/ui/AgentToolRegistry.tsx +8 -0
- package/src/ui/hooks/index.ts +14 -0
- package/src/ui/hooks/useAgentList.ts +80 -0
- package/src/ui/hooks/useAgentMutations.ts +156 -0
- package/src/ui/hooks/useRunList.ts +81 -0
- package/src/ui/hooks/useToolList.ts +122 -0
- package/src/ui/index.ts +21 -0
- package/src/ui/modals/AgentActionsModal.tsx +306 -0
- package/src/ui/modals/CreateAgentModal.tsx +257 -0
- package/src/ui/modals/index.ts +2 -0
- package/src/ui/overlays/demo-overlays.ts +77 -0
- package/src/ui/overlays/index.ts +1 -0
- package/src/ui/renderers/agent-list.markdown.ts +84 -0
- package/src/ui/renderers/agent-list.renderer.tsx +27 -0
- package/src/ui/renderers/dashboard.markdown.ts +169 -0
- package/src/ui/renderers/index.ts +12 -0
- package/src/ui/renderers/run-list.markdown.ts +75 -0
- package/src/ui/renderers/tool-registry.markdown.ts +91 -0
- package/src/ui/views/AgentListView.tsx +113 -0
- package/src/ui/views/RunListView.tsx +173 -0
- package/src/ui/views/ToolRegistryView.tsx +140 -0
- package/src/ui/views/index.ts +6 -0
- package/tsconfig.json +10 -0
- package/tsconfig.tsbuildinfo +1 -0
- package/tsdown.config.js +7 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mock-agents.js","names":[],"sources":["../../src/shared/mock-agents.ts"],"sourcesContent":["/**\n * Mock agent data for testing and demos.\n */\nexport const MOCK_AGENTS = [\n {\n id: 'agent-1',\n organizationId: 'demo-org',\n name: 'Customer Support Bot',\n slug: 'customer-support-bot',\n description: 'Handles tier-1 customer inquiries and routes complex issues.',\n status: 'ACTIVE' as const,\n modelProvider: 'OPENAI' as const,\n modelName: 'gpt-4o-mini',\n modelConfig: { temperature: 0.7 },\n systemPrompt: 'You are a helpful customer support assistant.',\n toolChoice: 'auto' as const,\n maxIterations: 10,\n timeoutMs: 120000,\n version: '1.0.0',\n tags: ['support', 'tier-1'],\n createdAt: new Date('2024-01-15T10:00:00Z'),\n updatedAt: new Date('2024-03-20T14:30:00Z'),\n },\n {\n id: 'agent-2',\n organizationId: 'demo-org',\n name: 'Code Review Assistant',\n slug: 'code-review-assistant',\n description: 'Reviews pull requests and provides actionable feedback.',\n status: 'ACTIVE' as const,\n modelProvider: 'ANTHROPIC' as const,\n modelName: 'claude-sonnet-4-20250514',\n modelConfig: { temperature: 0.3 },\n systemPrompt: 'You are a code review expert.',\n toolChoice: 'auto' as const,\n maxIterations: 15,\n timeoutMs: 180000,\n version: '2.1.0',\n tags: ['code', 'review', 'dev'],\n createdAt: new Date('2024-02-10T09:00:00Z'),\n updatedAt: new Date('2024-04-05T11:15:00Z'),\n },\n {\n id: 'agent-3',\n organizationId: 'demo-org',\n name: 'Data Analyst',\n slug: 'data-analyst',\n description: 'Queries databases and generates insights from data.',\n status: 'PAUSED' as const,\n modelProvider: 'OPENAI' as const,\n modelName: 'gpt-4o',\n modelConfig: { temperature: 0.5 },\n systemPrompt: 'You are a data analyst expert in SQL and analytics.',\n toolChoice: 'required' as const,\n maxIterations: 20,\n timeoutMs: 300000,\n version: '1.2.0',\n tags: ['data', 'analytics', 'sql'],\n createdAt: new Date('2024-03-01T08:00:00Z'),\n updatedAt: new Date('2024-04-10T16:45:00Z'),\n },\n {\n id: 'agent-4',\n organizationId: 'demo-org',\n name: 'Meeting Scheduler',\n slug: 'meeting-scheduler',\n description: 'Schedules meetings and manages calendar conflicts.',\n status: 'DRAFT' as const,\n modelProvider: 'GOOGLE' as const,\n modelName: 'gemini-2.0-flash',\n modelConfig: { temperature: 0.2 },\n systemPrompt: 'You help schedule and organize meetings efficiently.',\n toolChoice: 'auto' as const,\n maxIterations: 5,\n timeoutMs: 60000,\n version: '0.1.0',\n tags: ['calendar', 'scheduling'],\n createdAt: new Date('2024-04-01T12:00:00Z'),\n updatedAt: new Date('2024-04-01T12:00:00Z'),\n },\n];\n"],"mappings":";;;;AAGA,MAAa,cAAc;CACzB;EACE,IAAI;EACJ,gBAAgB;EAChB,MAAM;EACN,MAAM;EACN,aAAa;EACb,QAAQ;EACR,eAAe;EACf,WAAW;EACX,aAAa,EAAE,aAAa,IAAK;EACjC,cAAc;EACd,YAAY;EACZ,eAAe;EACf,WAAW;EACX,SAAS;EACT,MAAM,CAAC,WAAW,SAAS;EAC3B,2BAAW,IAAI,KAAK,uBAAuB;EAC3C,2BAAW,IAAI,KAAK,uBAAuB;EAC5C;CACD;EACE,IAAI;EACJ,gBAAgB;EAChB,MAAM;EACN,MAAM;EACN,aAAa;EACb,QAAQ;EACR,eAAe;EACf,WAAW;EACX,aAAa,EAAE,aAAa,IAAK;EACjC,cAAc;EACd,YAAY;EACZ,eAAe;EACf,WAAW;EACX,SAAS;EACT,MAAM;GAAC;GAAQ;GAAU;GAAM;EAC/B,2BAAW,IAAI,KAAK,uBAAuB;EAC3C,2BAAW,IAAI,KAAK,uBAAuB;EAC5C;CACD;EACE,IAAI;EACJ,gBAAgB;EAChB,MAAM;EACN,MAAM;EACN,aAAa;EACb,QAAQ;EACR,eAAe;EACf,WAAW;EACX,aAAa,EAAE,aAAa,IAAK;EACjC,cAAc;EACd,YAAY;EACZ,eAAe;EACf,WAAW;EACX,SAAS;EACT,MAAM;GAAC;GAAQ;GAAa;GAAM;EAClC,2BAAW,IAAI,KAAK,uBAAuB;EAC3C,2BAAW,IAAI,KAAK,uBAAuB;EAC5C;CACD;EACE,IAAI;EACJ,gBAAgB;EAChB,MAAM;EACN,MAAM;EACN,aAAa;EACb,QAAQ;EACR,eAAe;EACf,WAAW;EACX,aAAa,EAAE,aAAa,IAAK;EACjC,cAAc;EACd,YAAY;EACZ,eAAe;EACf,WAAW;EACX,SAAS;EACT,MAAM,CAAC,YAAY,aAAa;EAChC,2BAAW,IAAI,KAAK,uBAAuB;EAC3C,2BAAW,IAAI,KAAK,uBAAuB;EAC5C;CACF"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
//#region src/shared/mock-runs.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Mock run data for testing and demos.
|
|
4
|
+
*/
|
|
5
|
+
declare const MOCK_RUNS: ({
|
|
6
|
+
id: string;
|
|
7
|
+
organizationId: string;
|
|
8
|
+
agentId: string;
|
|
9
|
+
agentName: string;
|
|
10
|
+
userId: string;
|
|
11
|
+
sessionId: string;
|
|
12
|
+
input: {
|
|
13
|
+
message: string;
|
|
14
|
+
context: {
|
|
15
|
+
prNumber?: undefined;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
output: {
|
|
19
|
+
response: string;
|
|
20
|
+
};
|
|
21
|
+
status: "COMPLETED";
|
|
22
|
+
totalTokens: number;
|
|
23
|
+
promptTokens: number;
|
|
24
|
+
completionTokens: number;
|
|
25
|
+
totalIterations: number;
|
|
26
|
+
durationMs: number;
|
|
27
|
+
estimatedCostUsd: number;
|
|
28
|
+
queuedAt: Date;
|
|
29
|
+
startedAt: Date;
|
|
30
|
+
completedAt: Date;
|
|
31
|
+
steps: never[];
|
|
32
|
+
logs: never[];
|
|
33
|
+
errorMessage?: undefined;
|
|
34
|
+
errorCode?: undefined;
|
|
35
|
+
} | {
|
|
36
|
+
id: string;
|
|
37
|
+
organizationId: string;
|
|
38
|
+
agentId: string;
|
|
39
|
+
agentName: string;
|
|
40
|
+
userId: string;
|
|
41
|
+
input: {
|
|
42
|
+
message: string;
|
|
43
|
+
context: {
|
|
44
|
+
prNumber: number;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
status: "IN_PROGRESS";
|
|
48
|
+
totalTokens: number;
|
|
49
|
+
promptTokens: number;
|
|
50
|
+
completionTokens: number;
|
|
51
|
+
totalIterations: number;
|
|
52
|
+
queuedAt: Date;
|
|
53
|
+
startedAt: Date;
|
|
54
|
+
steps: never[];
|
|
55
|
+
logs: never[];
|
|
56
|
+
sessionId?: undefined;
|
|
57
|
+
output?: undefined;
|
|
58
|
+
durationMs?: undefined;
|
|
59
|
+
estimatedCostUsd?: undefined;
|
|
60
|
+
completedAt?: undefined;
|
|
61
|
+
errorMessage?: undefined;
|
|
62
|
+
errorCode?: undefined;
|
|
63
|
+
} | {
|
|
64
|
+
id: string;
|
|
65
|
+
organizationId: string;
|
|
66
|
+
agentId: string;
|
|
67
|
+
agentName: string;
|
|
68
|
+
userId: string;
|
|
69
|
+
input: {
|
|
70
|
+
message: string;
|
|
71
|
+
context?: undefined;
|
|
72
|
+
};
|
|
73
|
+
output: {
|
|
74
|
+
response: string;
|
|
75
|
+
};
|
|
76
|
+
status: "COMPLETED";
|
|
77
|
+
totalTokens: number;
|
|
78
|
+
promptTokens: number;
|
|
79
|
+
completionTokens: number;
|
|
80
|
+
totalIterations: number;
|
|
81
|
+
durationMs: number;
|
|
82
|
+
estimatedCostUsd: number;
|
|
83
|
+
queuedAt: Date;
|
|
84
|
+
startedAt: Date;
|
|
85
|
+
completedAt: Date;
|
|
86
|
+
steps: never[];
|
|
87
|
+
logs: never[];
|
|
88
|
+
sessionId?: undefined;
|
|
89
|
+
errorMessage?: undefined;
|
|
90
|
+
errorCode?: undefined;
|
|
91
|
+
} | {
|
|
92
|
+
id: string;
|
|
93
|
+
organizationId: string;
|
|
94
|
+
agentId: string;
|
|
95
|
+
agentName: string;
|
|
96
|
+
userId: string;
|
|
97
|
+
input: {
|
|
98
|
+
message: string;
|
|
99
|
+
context?: undefined;
|
|
100
|
+
};
|
|
101
|
+
status: "FAILED";
|
|
102
|
+
errorMessage: string;
|
|
103
|
+
errorCode: string;
|
|
104
|
+
totalTokens: number;
|
|
105
|
+
promptTokens: number;
|
|
106
|
+
completionTokens: number;
|
|
107
|
+
totalIterations: number;
|
|
108
|
+
durationMs: number;
|
|
109
|
+
queuedAt: Date;
|
|
110
|
+
startedAt: Date;
|
|
111
|
+
completedAt: Date;
|
|
112
|
+
steps: never[];
|
|
113
|
+
logs: never[];
|
|
114
|
+
sessionId?: undefined;
|
|
115
|
+
output?: undefined;
|
|
116
|
+
estimatedCostUsd?: undefined;
|
|
117
|
+
})[];
|
|
118
|
+
//#endregion
|
|
119
|
+
export { MOCK_RUNS };
|
|
120
|
+
//# sourceMappingURL=mock-runs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mock-runs.d.ts","names":[],"sources":["../../src/shared/mock-runs.ts"],"sourcesContent":[],"mappings":";;AAGA;;cAAa"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
//#region src/shared/mock-runs.ts
|
|
2
|
+
/**
|
|
3
|
+
* Mock run data for testing and demos.
|
|
4
|
+
*/
|
|
5
|
+
const MOCK_RUNS = [
|
|
6
|
+
{
|
|
7
|
+
id: "run-1",
|
|
8
|
+
organizationId: "demo-org",
|
|
9
|
+
agentId: "agent-1",
|
|
10
|
+
agentName: "Customer Support Bot",
|
|
11
|
+
userId: "user-1",
|
|
12
|
+
sessionId: "session-1",
|
|
13
|
+
input: {
|
|
14
|
+
message: "How do I reset my password?",
|
|
15
|
+
context: {}
|
|
16
|
+
},
|
|
17
|
+
output: { response: "You can reset your password by clicking..." },
|
|
18
|
+
status: "COMPLETED",
|
|
19
|
+
totalTokens: 1250,
|
|
20
|
+
promptTokens: 800,
|
|
21
|
+
completionTokens: 450,
|
|
22
|
+
totalIterations: 3,
|
|
23
|
+
durationMs: 4500,
|
|
24
|
+
estimatedCostUsd: .0025,
|
|
25
|
+
queuedAt: /* @__PURE__ */ new Date("2024-04-15T10:00:00Z"),
|
|
26
|
+
startedAt: /* @__PURE__ */ new Date("2024-04-15T10:00:01Z"),
|
|
27
|
+
completedAt: /* @__PURE__ */ new Date("2024-04-15T10:00:05Z"),
|
|
28
|
+
steps: [],
|
|
29
|
+
logs: []
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
id: "run-2",
|
|
33
|
+
organizationId: "demo-org",
|
|
34
|
+
agentId: "agent-2",
|
|
35
|
+
agentName: "Code Review Assistant",
|
|
36
|
+
userId: "user-2",
|
|
37
|
+
input: {
|
|
38
|
+
message: "Review PR #123",
|
|
39
|
+
context: { prNumber: 123 }
|
|
40
|
+
},
|
|
41
|
+
status: "IN_PROGRESS",
|
|
42
|
+
totalTokens: 3500,
|
|
43
|
+
promptTokens: 3e3,
|
|
44
|
+
completionTokens: 500,
|
|
45
|
+
totalIterations: 5,
|
|
46
|
+
queuedAt: /* @__PURE__ */ new Date("2024-04-15T10:30:00Z"),
|
|
47
|
+
startedAt: /* @__PURE__ */ new Date("2024-04-15T10:30:02Z"),
|
|
48
|
+
steps: [],
|
|
49
|
+
logs: []
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
id: "run-3",
|
|
53
|
+
organizationId: "demo-org",
|
|
54
|
+
agentId: "agent-1",
|
|
55
|
+
agentName: "Customer Support Bot",
|
|
56
|
+
userId: "user-1",
|
|
57
|
+
input: { message: "What are your business hours?" },
|
|
58
|
+
output: { response: "Our business hours are 9 AM to 5 PM EST..." },
|
|
59
|
+
status: "COMPLETED",
|
|
60
|
+
totalTokens: 800,
|
|
61
|
+
promptTokens: 500,
|
|
62
|
+
completionTokens: 300,
|
|
63
|
+
totalIterations: 2,
|
|
64
|
+
durationMs: 2100,
|
|
65
|
+
estimatedCostUsd: .0012,
|
|
66
|
+
queuedAt: /* @__PURE__ */ new Date("2024-04-15T09:00:00Z"),
|
|
67
|
+
startedAt: /* @__PURE__ */ new Date("2024-04-15T09:00:01Z"),
|
|
68
|
+
completedAt: /* @__PURE__ */ new Date("2024-04-15T09:00:03Z"),
|
|
69
|
+
steps: [],
|
|
70
|
+
logs: []
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
id: "run-4",
|
|
74
|
+
organizationId: "demo-org",
|
|
75
|
+
agentId: "agent-3",
|
|
76
|
+
agentName: "Data Analyst",
|
|
77
|
+
userId: "user-3",
|
|
78
|
+
input: { message: "Generate sales report for Q1" },
|
|
79
|
+
status: "FAILED",
|
|
80
|
+
errorMessage: "Database connection timeout",
|
|
81
|
+
errorCode: "DB_TIMEOUT",
|
|
82
|
+
totalTokens: 2e3,
|
|
83
|
+
promptTokens: 1500,
|
|
84
|
+
completionTokens: 500,
|
|
85
|
+
totalIterations: 8,
|
|
86
|
+
durationMs: 45e3,
|
|
87
|
+
queuedAt: /* @__PURE__ */ new Date("2024-04-14T15:00:00Z"),
|
|
88
|
+
startedAt: /* @__PURE__ */ new Date("2024-04-14T15:00:05Z"),
|
|
89
|
+
completedAt: /* @__PURE__ */ new Date("2024-04-14T15:00:50Z"),
|
|
90
|
+
steps: [],
|
|
91
|
+
logs: []
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
id: "run-5",
|
|
95
|
+
organizationId: "demo-org",
|
|
96
|
+
agentId: "agent-2",
|
|
97
|
+
agentName: "Code Review Assistant",
|
|
98
|
+
userId: "user-2",
|
|
99
|
+
input: { message: "Review PR #120" },
|
|
100
|
+
output: { response: "Code review complete. 3 suggestions..." },
|
|
101
|
+
status: "COMPLETED",
|
|
102
|
+
totalTokens: 5200,
|
|
103
|
+
promptTokens: 4e3,
|
|
104
|
+
completionTokens: 1200,
|
|
105
|
+
totalIterations: 7,
|
|
106
|
+
durationMs: 15e3,
|
|
107
|
+
estimatedCostUsd: .0156,
|
|
108
|
+
queuedAt: /* @__PURE__ */ new Date("2024-04-14T11:00:00Z"),
|
|
109
|
+
startedAt: /* @__PURE__ */ new Date("2024-04-14T11:00:03Z"),
|
|
110
|
+
completedAt: /* @__PURE__ */ new Date("2024-04-14T11:00:18Z"),
|
|
111
|
+
steps: [],
|
|
112
|
+
logs: []
|
|
113
|
+
}
|
|
114
|
+
];
|
|
115
|
+
|
|
116
|
+
//#endregion
|
|
117
|
+
export { MOCK_RUNS };
|
|
118
|
+
//# sourceMappingURL=mock-runs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mock-runs.js","names":[],"sources":["../../src/shared/mock-runs.ts"],"sourcesContent":["/**\n * Mock run data for testing and demos.\n */\nexport const MOCK_RUNS = [\n {\n id: 'run-1',\n organizationId: 'demo-org',\n agentId: 'agent-1',\n agentName: 'Customer Support Bot',\n userId: 'user-1',\n sessionId: 'session-1',\n input: { message: 'How do I reset my password?', context: {} },\n output: { response: 'You can reset your password by clicking...' },\n status: 'COMPLETED' as const,\n totalTokens: 1250,\n promptTokens: 800,\n completionTokens: 450,\n totalIterations: 3,\n durationMs: 4500,\n estimatedCostUsd: 0.0025,\n queuedAt: new Date('2024-04-15T10:00:00Z'),\n startedAt: new Date('2024-04-15T10:00:01Z'),\n completedAt: new Date('2024-04-15T10:00:05Z'),\n steps: [],\n logs: [],\n },\n {\n id: 'run-2',\n organizationId: 'demo-org',\n agentId: 'agent-2',\n agentName: 'Code Review Assistant',\n userId: 'user-2',\n input: { message: 'Review PR #123', context: { prNumber: 123 } },\n status: 'IN_PROGRESS' as const,\n totalTokens: 3500,\n promptTokens: 3000,\n completionTokens: 500,\n totalIterations: 5,\n queuedAt: new Date('2024-04-15T10:30:00Z'),\n startedAt: new Date('2024-04-15T10:30:02Z'),\n steps: [],\n logs: [],\n },\n {\n id: 'run-3',\n organizationId: 'demo-org',\n agentId: 'agent-1',\n agentName: 'Customer Support Bot',\n userId: 'user-1',\n input: { message: 'What are your business hours?' },\n output: { response: 'Our business hours are 9 AM to 5 PM EST...' },\n status: 'COMPLETED' as const,\n totalTokens: 800,\n promptTokens: 500,\n completionTokens: 300,\n totalIterations: 2,\n durationMs: 2100,\n estimatedCostUsd: 0.0012,\n queuedAt: new Date('2024-04-15T09:00:00Z'),\n startedAt: new Date('2024-04-15T09:00:01Z'),\n completedAt: new Date('2024-04-15T09:00:03Z'),\n steps: [],\n logs: [],\n },\n {\n id: 'run-4',\n organizationId: 'demo-org',\n agentId: 'agent-3',\n agentName: 'Data Analyst',\n userId: 'user-3',\n input: { message: 'Generate sales report for Q1' },\n status: 'FAILED' as const,\n errorMessage: 'Database connection timeout',\n errorCode: 'DB_TIMEOUT',\n totalTokens: 2000,\n promptTokens: 1500,\n completionTokens: 500,\n totalIterations: 8,\n durationMs: 45000,\n queuedAt: new Date('2024-04-14T15:00:00Z'),\n startedAt: new Date('2024-04-14T15:00:05Z'),\n completedAt: new Date('2024-04-14T15:00:50Z'),\n steps: [],\n logs: [],\n },\n {\n id: 'run-5',\n organizationId: 'demo-org',\n agentId: 'agent-2',\n agentName: 'Code Review Assistant',\n userId: 'user-2',\n input: { message: 'Review PR #120' },\n output: { response: 'Code review complete. 3 suggestions...' },\n status: 'COMPLETED' as const,\n totalTokens: 5200,\n promptTokens: 4000,\n completionTokens: 1200,\n totalIterations: 7,\n durationMs: 15000,\n estimatedCostUsd: 0.0156,\n queuedAt: new Date('2024-04-14T11:00:00Z'),\n startedAt: new Date('2024-04-14T11:00:03Z'),\n completedAt: new Date('2024-04-14T11:00:18Z'),\n steps: [],\n logs: [],\n },\n];\n"],"mappings":";;;;AAGA,MAAa,YAAY;CACvB;EACE,IAAI;EACJ,gBAAgB;EAChB,SAAS;EACT,WAAW;EACX,QAAQ;EACR,WAAW;EACX,OAAO;GAAE,SAAS;GAA+B,SAAS,EAAE;GAAE;EAC9D,QAAQ,EAAE,UAAU,8CAA8C;EAClE,QAAQ;EACR,aAAa;EACb,cAAc;EACd,kBAAkB;EAClB,iBAAiB;EACjB,YAAY;EACZ,kBAAkB;EAClB,0BAAU,IAAI,KAAK,uBAAuB;EAC1C,2BAAW,IAAI,KAAK,uBAAuB;EAC3C,6BAAa,IAAI,KAAK,uBAAuB;EAC7C,OAAO,EAAE;EACT,MAAM,EAAE;EACT;CACD;EACE,IAAI;EACJ,gBAAgB;EAChB,SAAS;EACT,WAAW;EACX,QAAQ;EACR,OAAO;GAAE,SAAS;GAAkB,SAAS,EAAE,UAAU,KAAK;GAAE;EAChE,QAAQ;EACR,aAAa;EACb,cAAc;EACd,kBAAkB;EAClB,iBAAiB;EACjB,0BAAU,IAAI,KAAK,uBAAuB;EAC1C,2BAAW,IAAI,KAAK,uBAAuB;EAC3C,OAAO,EAAE;EACT,MAAM,EAAE;EACT;CACD;EACE,IAAI;EACJ,gBAAgB;EAChB,SAAS;EACT,WAAW;EACX,QAAQ;EACR,OAAO,EAAE,SAAS,iCAAiC;EACnD,QAAQ,EAAE,UAAU,8CAA8C;EAClE,QAAQ;EACR,aAAa;EACb,cAAc;EACd,kBAAkB;EAClB,iBAAiB;EACjB,YAAY;EACZ,kBAAkB;EAClB,0BAAU,IAAI,KAAK,uBAAuB;EAC1C,2BAAW,IAAI,KAAK,uBAAuB;EAC3C,6BAAa,IAAI,KAAK,uBAAuB;EAC7C,OAAO,EAAE;EACT,MAAM,EAAE;EACT;CACD;EACE,IAAI;EACJ,gBAAgB;EAChB,SAAS;EACT,WAAW;EACX,QAAQ;EACR,OAAO,EAAE,SAAS,gCAAgC;EAClD,QAAQ;EACR,cAAc;EACd,WAAW;EACX,aAAa;EACb,cAAc;EACd,kBAAkB;EAClB,iBAAiB;EACjB,YAAY;EACZ,0BAAU,IAAI,KAAK,uBAAuB;EAC1C,2BAAW,IAAI,KAAK,uBAAuB;EAC3C,6BAAa,IAAI,KAAK,uBAAuB;EAC7C,OAAO,EAAE;EACT,MAAM,EAAE;EACT;CACD;EACE,IAAI;EACJ,gBAAgB;EAChB,SAAS;EACT,WAAW;EACX,QAAQ;EACR,OAAO,EAAE,SAAS,kBAAkB;EACpC,QAAQ,EAAE,UAAU,0CAA0C;EAC9D,QAAQ;EACR,aAAa;EACb,cAAc;EACd,kBAAkB;EAClB,iBAAiB;EACjB,YAAY;EACZ,kBAAkB;EAClB,0BAAU,IAAI,KAAK,uBAAuB;EAC1C,2BAAW,IAAI,KAAK,uBAAuB;EAC3C,6BAAa,IAAI,KAAK,uBAAuB;EAC7C,OAAO,EAAE;EACT,MAAM,EAAE;EACT;CACF"}
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
//#region src/shared/mock-tools.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Mock tool data for testing and demos.
|
|
4
|
+
*/
|
|
5
|
+
declare const MOCK_TOOLS: ({
|
|
6
|
+
id: string;
|
|
7
|
+
organizationId: string;
|
|
8
|
+
name: string;
|
|
9
|
+
slug: string;
|
|
10
|
+
description: string;
|
|
11
|
+
category: "RETRIEVAL";
|
|
12
|
+
status: "ACTIVE";
|
|
13
|
+
parametersSchema: {
|
|
14
|
+
type: string;
|
|
15
|
+
properties: {
|
|
16
|
+
query: {
|
|
17
|
+
type: string;
|
|
18
|
+
description: string;
|
|
19
|
+
};
|
|
20
|
+
numResults: {
|
|
21
|
+
type: string;
|
|
22
|
+
default: number;
|
|
23
|
+
};
|
|
24
|
+
maxRows?: undefined;
|
|
25
|
+
to?: undefined;
|
|
26
|
+
subject?: undefined;
|
|
27
|
+
body?: undefined;
|
|
28
|
+
action?: undefined;
|
|
29
|
+
repo?: undefined;
|
|
30
|
+
params?: undefined;
|
|
31
|
+
expression?: undefined;
|
|
32
|
+
};
|
|
33
|
+
required: string[];
|
|
34
|
+
};
|
|
35
|
+
outputSchema: {
|
|
36
|
+
type: string;
|
|
37
|
+
items: {
|
|
38
|
+
type: string;
|
|
39
|
+
};
|
|
40
|
+
properties?: undefined;
|
|
41
|
+
};
|
|
42
|
+
implementationType: "http";
|
|
43
|
+
implementationConfig: {
|
|
44
|
+
url: string;
|
|
45
|
+
method: string;
|
|
46
|
+
handler?: undefined;
|
|
47
|
+
auth?: undefined;
|
|
48
|
+
};
|
|
49
|
+
maxInvocationsPerMinute: number;
|
|
50
|
+
timeoutMs: number;
|
|
51
|
+
version: string;
|
|
52
|
+
tags: string[];
|
|
53
|
+
createdAt: Date;
|
|
54
|
+
updatedAt: Date;
|
|
55
|
+
} | {
|
|
56
|
+
id: string;
|
|
57
|
+
organizationId: string;
|
|
58
|
+
name: string;
|
|
59
|
+
slug: string;
|
|
60
|
+
description: string;
|
|
61
|
+
category: "RETRIEVAL";
|
|
62
|
+
status: "ACTIVE";
|
|
63
|
+
parametersSchema: {
|
|
64
|
+
type: string;
|
|
65
|
+
properties: {
|
|
66
|
+
query: {
|
|
67
|
+
type: string;
|
|
68
|
+
description: string;
|
|
69
|
+
};
|
|
70
|
+
maxRows: {
|
|
71
|
+
type: string;
|
|
72
|
+
default: number;
|
|
73
|
+
};
|
|
74
|
+
numResults?: undefined;
|
|
75
|
+
to?: undefined;
|
|
76
|
+
subject?: undefined;
|
|
77
|
+
body?: undefined;
|
|
78
|
+
action?: undefined;
|
|
79
|
+
repo?: undefined;
|
|
80
|
+
params?: undefined;
|
|
81
|
+
expression?: undefined;
|
|
82
|
+
};
|
|
83
|
+
required: string[];
|
|
84
|
+
};
|
|
85
|
+
outputSchema: {
|
|
86
|
+
type: string;
|
|
87
|
+
items?: undefined;
|
|
88
|
+
properties?: undefined;
|
|
89
|
+
};
|
|
90
|
+
implementationType: "function";
|
|
91
|
+
implementationConfig: {
|
|
92
|
+
handler: string;
|
|
93
|
+
url?: undefined;
|
|
94
|
+
method?: undefined;
|
|
95
|
+
auth?: undefined;
|
|
96
|
+
};
|
|
97
|
+
maxInvocationsPerMinute: number;
|
|
98
|
+
timeoutMs: number;
|
|
99
|
+
version: string;
|
|
100
|
+
tags: string[];
|
|
101
|
+
createdAt: Date;
|
|
102
|
+
updatedAt: Date;
|
|
103
|
+
} | {
|
|
104
|
+
id: string;
|
|
105
|
+
organizationId: string;
|
|
106
|
+
name: string;
|
|
107
|
+
slug: string;
|
|
108
|
+
description: string;
|
|
109
|
+
category: "COMMUNICATION";
|
|
110
|
+
status: "ACTIVE";
|
|
111
|
+
parametersSchema: {
|
|
112
|
+
type: string;
|
|
113
|
+
properties: {
|
|
114
|
+
to: {
|
|
115
|
+
type: string;
|
|
116
|
+
};
|
|
117
|
+
subject: {
|
|
118
|
+
type: string;
|
|
119
|
+
};
|
|
120
|
+
body: {
|
|
121
|
+
type: string;
|
|
122
|
+
};
|
|
123
|
+
query?: undefined;
|
|
124
|
+
numResults?: undefined;
|
|
125
|
+
maxRows?: undefined;
|
|
126
|
+
action?: undefined;
|
|
127
|
+
repo?: undefined;
|
|
128
|
+
params?: undefined;
|
|
129
|
+
expression?: undefined;
|
|
130
|
+
};
|
|
131
|
+
required: string[];
|
|
132
|
+
};
|
|
133
|
+
implementationType: "http";
|
|
134
|
+
implementationConfig: {
|
|
135
|
+
url: string;
|
|
136
|
+
method: string;
|
|
137
|
+
handler?: undefined;
|
|
138
|
+
auth?: undefined;
|
|
139
|
+
};
|
|
140
|
+
maxInvocationsPerMinute: number;
|
|
141
|
+
timeoutMs: number;
|
|
142
|
+
version: string;
|
|
143
|
+
tags: string[];
|
|
144
|
+
createdAt: Date;
|
|
145
|
+
updatedAt: Date;
|
|
146
|
+
outputSchema?: undefined;
|
|
147
|
+
} | {
|
|
148
|
+
id: string;
|
|
149
|
+
organizationId: string;
|
|
150
|
+
name: string;
|
|
151
|
+
slug: string;
|
|
152
|
+
description: string;
|
|
153
|
+
category: "INTEGRATION";
|
|
154
|
+
status: "ACTIVE";
|
|
155
|
+
parametersSchema: {
|
|
156
|
+
type: string;
|
|
157
|
+
properties: {
|
|
158
|
+
action: {
|
|
159
|
+
type: string;
|
|
160
|
+
enum: string[];
|
|
161
|
+
};
|
|
162
|
+
repo: {
|
|
163
|
+
type: string;
|
|
164
|
+
};
|
|
165
|
+
params: {
|
|
166
|
+
type: string;
|
|
167
|
+
};
|
|
168
|
+
query?: undefined;
|
|
169
|
+
numResults?: undefined;
|
|
170
|
+
maxRows?: undefined;
|
|
171
|
+
to?: undefined;
|
|
172
|
+
subject?: undefined;
|
|
173
|
+
body?: undefined;
|
|
174
|
+
expression?: undefined;
|
|
175
|
+
};
|
|
176
|
+
required: string[];
|
|
177
|
+
};
|
|
178
|
+
implementationType: "http";
|
|
179
|
+
implementationConfig: {
|
|
180
|
+
url: string;
|
|
181
|
+
auth: string;
|
|
182
|
+
method?: undefined;
|
|
183
|
+
handler?: undefined;
|
|
184
|
+
};
|
|
185
|
+
maxInvocationsPerMinute: number;
|
|
186
|
+
timeoutMs: number;
|
|
187
|
+
version: string;
|
|
188
|
+
tags: string[];
|
|
189
|
+
createdAt: Date;
|
|
190
|
+
updatedAt: Date;
|
|
191
|
+
outputSchema?: undefined;
|
|
192
|
+
} | {
|
|
193
|
+
id: string;
|
|
194
|
+
organizationId: string;
|
|
195
|
+
name: string;
|
|
196
|
+
slug: string;
|
|
197
|
+
description: string;
|
|
198
|
+
category: "COMPUTATION";
|
|
199
|
+
status: "ACTIVE";
|
|
200
|
+
parametersSchema: {
|
|
201
|
+
type: string;
|
|
202
|
+
properties: {
|
|
203
|
+
expression: {
|
|
204
|
+
type: string;
|
|
205
|
+
description: string;
|
|
206
|
+
};
|
|
207
|
+
query?: undefined;
|
|
208
|
+
numResults?: undefined;
|
|
209
|
+
maxRows?: undefined;
|
|
210
|
+
to?: undefined;
|
|
211
|
+
subject?: undefined;
|
|
212
|
+
body?: undefined;
|
|
213
|
+
action?: undefined;
|
|
214
|
+
repo?: undefined;
|
|
215
|
+
params?: undefined;
|
|
216
|
+
};
|
|
217
|
+
required: string[];
|
|
218
|
+
};
|
|
219
|
+
outputSchema: {
|
|
220
|
+
type: string;
|
|
221
|
+
properties: {
|
|
222
|
+
result: {
|
|
223
|
+
type: string;
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
items?: undefined;
|
|
227
|
+
};
|
|
228
|
+
implementationType: "function";
|
|
229
|
+
implementationConfig: {
|
|
230
|
+
handler: string;
|
|
231
|
+
url?: undefined;
|
|
232
|
+
method?: undefined;
|
|
233
|
+
auth?: undefined;
|
|
234
|
+
};
|
|
235
|
+
timeoutMs: number;
|
|
236
|
+
version: string;
|
|
237
|
+
tags: string[];
|
|
238
|
+
createdAt: Date;
|
|
239
|
+
updatedAt: Date;
|
|
240
|
+
maxInvocationsPerMinute?: undefined;
|
|
241
|
+
})[];
|
|
242
|
+
//#endregion
|
|
243
|
+
export { MOCK_TOOLS };
|
|
244
|
+
//# sourceMappingURL=mock-tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mock-tools.d.ts","names":[],"sources":["../../src/shared/mock-tools.ts"],"sourcesContent":[],"mappings":";;AAGA;;cAAa"}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
//#region src/shared/mock-tools.ts
|
|
2
|
+
/**
|
|
3
|
+
* Mock tool data for testing and demos.
|
|
4
|
+
*/
|
|
5
|
+
const MOCK_TOOLS = [
|
|
6
|
+
{
|
|
7
|
+
id: "tool-1",
|
|
8
|
+
organizationId: "demo-org",
|
|
9
|
+
name: "Web Search",
|
|
10
|
+
slug: "web-search",
|
|
11
|
+
description: "Search the web for real-time information using Brave API.",
|
|
12
|
+
category: "RETRIEVAL",
|
|
13
|
+
status: "ACTIVE",
|
|
14
|
+
parametersSchema: {
|
|
15
|
+
type: "object",
|
|
16
|
+
properties: {
|
|
17
|
+
query: {
|
|
18
|
+
type: "string",
|
|
19
|
+
description: "Search query"
|
|
20
|
+
},
|
|
21
|
+
numResults: {
|
|
22
|
+
type: "number",
|
|
23
|
+
default: 10
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
required: ["query"]
|
|
27
|
+
},
|
|
28
|
+
outputSchema: {
|
|
29
|
+
type: "array",
|
|
30
|
+
items: { type: "object" }
|
|
31
|
+
},
|
|
32
|
+
implementationType: "http",
|
|
33
|
+
implementationConfig: {
|
|
34
|
+
url: "https://api.brave.com/search",
|
|
35
|
+
method: "GET"
|
|
36
|
+
},
|
|
37
|
+
maxInvocationsPerMinute: 60,
|
|
38
|
+
timeoutMs: 3e4,
|
|
39
|
+
version: "1.0.0",
|
|
40
|
+
tags: ["search", "web"],
|
|
41
|
+
createdAt: /* @__PURE__ */ new Date("2024-01-01T00:00:00Z"),
|
|
42
|
+
updatedAt: /* @__PURE__ */ new Date("2024-02-15T10:00:00Z")
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
id: "tool-2",
|
|
46
|
+
organizationId: "demo-org",
|
|
47
|
+
name: "SQL Query",
|
|
48
|
+
slug: "sql-query",
|
|
49
|
+
description: "Execute read-only SQL queries against the data warehouse.",
|
|
50
|
+
category: "RETRIEVAL",
|
|
51
|
+
status: "ACTIVE",
|
|
52
|
+
parametersSchema: {
|
|
53
|
+
type: "object",
|
|
54
|
+
properties: {
|
|
55
|
+
query: {
|
|
56
|
+
type: "string",
|
|
57
|
+
description: "SQL query"
|
|
58
|
+
},
|
|
59
|
+
maxRows: {
|
|
60
|
+
type: "number",
|
|
61
|
+
default: 100
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
required: ["query"]
|
|
65
|
+
},
|
|
66
|
+
outputSchema: { type: "object" },
|
|
67
|
+
implementationType: "function",
|
|
68
|
+
implementationConfig: { handler: "executeSqlQuery" },
|
|
69
|
+
maxInvocationsPerMinute: 30,
|
|
70
|
+
timeoutMs: 6e4,
|
|
71
|
+
version: "1.1.0",
|
|
72
|
+
tags: ["sql", "database"],
|
|
73
|
+
createdAt: /* @__PURE__ */ new Date("2024-01-05T00:00:00Z"),
|
|
74
|
+
updatedAt: /* @__PURE__ */ new Date("2024-03-10T14:00:00Z")
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
id: "tool-3",
|
|
78
|
+
organizationId: "demo-org",
|
|
79
|
+
name: "Email Sender",
|
|
80
|
+
slug: "email-sender",
|
|
81
|
+
description: "Send emails via SMTP or API.",
|
|
82
|
+
category: "COMMUNICATION",
|
|
83
|
+
status: "ACTIVE",
|
|
84
|
+
parametersSchema: {
|
|
85
|
+
type: "object",
|
|
86
|
+
properties: {
|
|
87
|
+
to: { type: "string" },
|
|
88
|
+
subject: { type: "string" },
|
|
89
|
+
body: { type: "string" }
|
|
90
|
+
},
|
|
91
|
+
required: [
|
|
92
|
+
"to",
|
|
93
|
+
"subject",
|
|
94
|
+
"body"
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
implementationType: "http",
|
|
98
|
+
implementationConfig: {
|
|
99
|
+
url: "/api/send-email",
|
|
100
|
+
method: "POST"
|
|
101
|
+
},
|
|
102
|
+
maxInvocationsPerMinute: 10,
|
|
103
|
+
timeoutMs: 3e4,
|
|
104
|
+
version: "1.0.0",
|
|
105
|
+
tags: ["email", "communication"],
|
|
106
|
+
createdAt: /* @__PURE__ */ new Date("2024-02-01T00:00:00Z"),
|
|
107
|
+
updatedAt: /* @__PURE__ */ new Date("2024-02-01T00:00:00Z")
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
id: "tool-4",
|
|
111
|
+
organizationId: "demo-org",
|
|
112
|
+
name: "GitHub Integration",
|
|
113
|
+
slug: "github-integration",
|
|
114
|
+
description: "Interact with GitHub repositories, PRs, and issues.",
|
|
115
|
+
category: "INTEGRATION",
|
|
116
|
+
status: "ACTIVE",
|
|
117
|
+
parametersSchema: {
|
|
118
|
+
type: "object",
|
|
119
|
+
properties: {
|
|
120
|
+
action: {
|
|
121
|
+
type: "string",
|
|
122
|
+
enum: [
|
|
123
|
+
"list_prs",
|
|
124
|
+
"get_pr",
|
|
125
|
+
"create_comment"
|
|
126
|
+
]
|
|
127
|
+
},
|
|
128
|
+
repo: { type: "string" },
|
|
129
|
+
params: { type: "object" }
|
|
130
|
+
},
|
|
131
|
+
required: ["action", "repo"]
|
|
132
|
+
},
|
|
133
|
+
implementationType: "http",
|
|
134
|
+
implementationConfig: {
|
|
135
|
+
url: "https://api.github.com",
|
|
136
|
+
auth: "token"
|
|
137
|
+
},
|
|
138
|
+
maxInvocationsPerMinute: 100,
|
|
139
|
+
timeoutMs: 15e3,
|
|
140
|
+
version: "2.0.0",
|
|
141
|
+
tags: [
|
|
142
|
+
"github",
|
|
143
|
+
"integration",
|
|
144
|
+
"code"
|
|
145
|
+
],
|
|
146
|
+
createdAt: /* @__PURE__ */ new Date("2024-02-20T00:00:00Z"),
|
|
147
|
+
updatedAt: /* @__PURE__ */ new Date("2024-04-01T09:00:00Z")
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
id: "tool-5",
|
|
151
|
+
organizationId: "demo-org",
|
|
152
|
+
name: "Calculator",
|
|
153
|
+
slug: "calculator",
|
|
154
|
+
description: "Perform mathematical calculations.",
|
|
155
|
+
category: "COMPUTATION",
|
|
156
|
+
status: "ACTIVE",
|
|
157
|
+
parametersSchema: {
|
|
158
|
+
type: "object",
|
|
159
|
+
properties: { expression: {
|
|
160
|
+
type: "string",
|
|
161
|
+
description: "Math expression to evaluate"
|
|
162
|
+
} },
|
|
163
|
+
required: ["expression"]
|
|
164
|
+
},
|
|
165
|
+
outputSchema: {
|
|
166
|
+
type: "object",
|
|
167
|
+
properties: { result: { type: "number" } }
|
|
168
|
+
},
|
|
169
|
+
implementationType: "function",
|
|
170
|
+
implementationConfig: { handler: "evaluateMath" },
|
|
171
|
+
timeoutMs: 5e3,
|
|
172
|
+
version: "1.0.0",
|
|
173
|
+
tags: ["math", "utility"],
|
|
174
|
+
createdAt: /* @__PURE__ */ new Date("2024-01-10T00:00:00Z"),
|
|
175
|
+
updatedAt: /* @__PURE__ */ new Date("2024-01-10T00:00:00Z")
|
|
176
|
+
}
|
|
177
|
+
];
|
|
178
|
+
|
|
179
|
+
//#endregion
|
|
180
|
+
export { MOCK_TOOLS };
|
|
181
|
+
//# sourceMappingURL=mock-tools.js.map
|