@contractspec/example.agent-console 1.56.1 → 1.58.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/.turbo/turbo-build.log +211 -277
- package/.turbo/turbo-prebuild.log +1 -0
- package/CHANGELOG.md +36 -0
- package/dist/agent/agent.entity.d.ts +35 -40
- package/dist/agent/agent.entity.d.ts.map +1 -1
- package/dist/agent/agent.entity.js +124 -132
- package/dist/agent/agent.enum.d.ts +3 -8
- package/dist/agent/agent.enum.d.ts.map +1 -1
- package/dist/agent/agent.enum.js +22 -30
- package/dist/agent/agent.event.d.ts +105 -111
- package/dist/agent/agent.event.d.ts.map +1 -1
- package/dist/agent/agent.event.js +107 -200
- package/dist/agent/agent.handler.d.ts +74 -77
- package/dist/agent/agent.handler.d.ts.map +1 -1
- package/dist/agent/agent.handler.js +293 -75
- package/dist/agent/agent.operation.d.ts +424 -430
- package/dist/agent/agent.operation.d.ts.map +1 -1
- package/dist/agent/agent.operation.js +728 -478
- package/dist/agent/agent.presentation.d.ts +3 -8
- package/dist/agent/agent.presentation.d.ts.map +1 -1
- package/dist/agent/agent.presentation.js +275 -84
- package/dist/agent/agent.schema.d.ts +371 -376
- package/dist/agent/agent.schema.d.ts.map +1 -1
- package/dist/agent/agent.schema.js +209 -399
- package/dist/agent/agent.test-spec.d.ts +2 -7
- package/dist/agent/agent.test-spec.d.ts.map +1 -1
- package/dist/agent/agent.test-spec.js +56 -62
- package/dist/agent/index.d.ts +11 -8
- package/dist/agent/index.d.ts.map +1 -0
- package/dist/agent/index.js +1245 -9
- package/dist/agent.capability.d.ts +1 -6
- package/dist/agent.capability.d.ts.map +1 -1
- package/dist/agent.capability.js +17 -20
- package/dist/agent.feature.d.ts +7 -7
- package/dist/agent.feature.d.ts.map +1 -1
- package/dist/agent.feature.js +117 -303
- package/dist/browser/agent/agent.entity.js +127 -0
- package/dist/browser/agent/agent.enum.js +25 -0
- package/dist/browser/agent/agent.event.js +116 -0
- package/dist/browser/agent/agent.handler.js +301 -0
- package/dist/browser/agent/agent.operation.js +735 -0
- package/dist/browser/agent/agent.presentation.js +279 -0
- package/dist/browser/agent/agent.schema.js +215 -0
- package/dist/browser/agent/agent.test-spec.js +58 -0
- package/dist/browser/agent/index.js +1244 -0
- package/dist/browser/agent.capability.js +16 -0
- package/dist/browser/agent.feature.js +118 -0
- package/dist/browser/docs/agent-console.docblock.js +93 -0
- package/dist/browser/docs/index.js +93 -0
- package/dist/browser/example.js +42 -0
- package/dist/browser/handlers/agent.handlers.js +252 -0
- package/dist/browser/handlers/index.js +799 -0
- package/dist/browser/index.js +5895 -0
- package/dist/browser/presentations/index.js +684 -0
- package/dist/browser/run/index.js +1350 -0
- package/dist/browser/run/run.entity.js +160 -0
- package/dist/browser/run/run.enum.js +34 -0
- package/dist/browser/run/run.event.js +213 -0
- package/dist/browser/run/run.handler.js +254 -0
- package/dist/browser/run/run.operation.js +667 -0
- package/dist/browser/run/run.presentation.js +220 -0
- package/dist/browser/run/run.schema.js +179 -0
- package/dist/browser/run/run.test-spec.js +58 -0
- package/dist/browser/seeders/index.js +21 -0
- package/dist/browser/shared/index.js +334 -0
- package/dist/browser/shared/mock-agents.js +82 -0
- package/dist/browser/shared/mock-runs.js +108 -0
- package/dist/browser/shared/mock-tools.js +146 -0
- package/dist/browser/shared/overlay-types.js +0 -0
- package/dist/browser/tool/index.js +946 -0
- package/dist/browser/tool/tool.entity.js +90 -0
- package/dist/browser/tool/tool.enum.js +26 -0
- package/dist/browser/tool/tool.event.js +99 -0
- package/dist/browser/tool/tool.handler.js +223 -0
- package/dist/browser/tool/tool.operation.js +482 -0
- package/dist/browser/tool/tool.presentation.js +185 -0
- package/dist/browser/tool/tool.schema.js +141 -0
- package/dist/browser/tool/tool.test-spec.js +58 -0
- package/dist/browser/ui/AgentDashboard.js +1607 -0
- package/dist/browser/ui/AgentRunList.js +250 -0
- package/dist/browser/ui/AgentToolRegistry.js +212 -0
- package/dist/browser/ui/hooks/index.js +271 -0
- package/dist/browser/ui/hooks/useAgentList.js +55 -0
- package/dist/browser/ui/hooks/useAgentMutations.js +76 -0
- package/dist/browser/ui/hooks/useRunList.js +55 -0
- package/dist/browser/ui/hooks/useToolList.js +85 -0
- package/dist/browser/ui/index.js +2080 -0
- package/dist/browser/ui/modals/AgentActionsModal.js +304 -0
- package/dist/browser/ui/modals/CreateAgentModal.js +229 -0
- package/dist/browser/ui/modals/index.js +532 -0
- package/dist/browser/ui/overlays/demo-overlays.js +64 -0
- package/dist/browser/ui/overlays/index.js +64 -0
- package/dist/browser/ui/renderers/agent-list.markdown.js +55 -0
- package/dist/browser/ui/renderers/agent-list.renderer.js +180 -0
- package/dist/browser/ui/renderers/dashboard.markdown.js +117 -0
- package/dist/browser/ui/renderers/index.js +446 -0
- package/dist/browser/ui/renderers/run-list.markdown.js +45 -0
- package/dist/browser/ui/renderers/tool-registry.markdown.js +53 -0
- package/dist/browser/ui/views/AgentListView.js +165 -0
- package/dist/browser/ui/views/RunListView.js +247 -0
- package/dist/browser/ui/views/ToolRegistryView.js +209 -0
- package/dist/browser/ui/views/index.js +619 -0
- package/dist/docs/agent-console.docblock.d.ts +2 -1
- package/dist/docs/agent-console.docblock.d.ts.map +1 -0
- package/dist/docs/agent-console.docblock.js +45 -64
- package/dist/docs/index.d.ts +2 -1
- package/dist/docs/index.d.ts.map +1 -0
- package/dist/docs/index.js +94 -1
- package/dist/example.d.ts +2 -6
- package/dist/example.d.ts.map +1 -1
- package/dist/example.js +40 -55
- package/dist/handlers/agent.handlers.d.ts +121 -121
- package/dist/handlers/agent.handlers.d.ts.map +1 -1
- package/dist/handlers/agent.handlers.js +235 -245
- package/dist/handlers/index.d.ts +8 -5
- package/dist/handlers/index.d.ts.map +1 -0
- package/dist/handlers/index.js +799 -5
- package/dist/index.d.ts +26 -48
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5896 -50
- package/dist/node/agent/agent.entity.js +127 -0
- package/dist/node/agent/agent.enum.js +25 -0
- package/dist/node/agent/agent.event.js +116 -0
- package/dist/node/agent/agent.handler.js +301 -0
- package/dist/node/agent/agent.operation.js +735 -0
- package/dist/node/agent/agent.presentation.js +279 -0
- package/dist/node/agent/agent.schema.js +215 -0
- package/dist/node/agent/agent.test-spec.js +58 -0
- package/dist/node/agent/index.js +1244 -0
- package/dist/node/agent.capability.js +16 -0
- package/dist/node/agent.feature.js +118 -0
- package/dist/node/docs/agent-console.docblock.js +93 -0
- package/dist/node/docs/index.js +93 -0
- package/dist/node/example.js +42 -0
- package/dist/node/handlers/agent.handlers.js +252 -0
- package/dist/node/handlers/index.js +799 -0
- package/dist/node/index.js +5895 -0
- package/dist/node/presentations/index.js +684 -0
- package/dist/node/run/index.js +1350 -0
- package/dist/node/run/run.entity.js +160 -0
- package/dist/node/run/run.enum.js +34 -0
- package/dist/node/run/run.event.js +213 -0
- package/dist/node/run/run.handler.js +254 -0
- package/dist/node/run/run.operation.js +667 -0
- package/dist/node/run/run.presentation.js +220 -0
- package/dist/node/run/run.schema.js +179 -0
- package/dist/node/run/run.test-spec.js +58 -0
- package/dist/node/seeders/index.js +21 -0
- package/dist/node/shared/index.js +334 -0
- package/dist/node/shared/mock-agents.js +82 -0
- package/dist/node/shared/mock-runs.js +108 -0
- package/dist/node/shared/mock-tools.js +146 -0
- package/dist/node/shared/overlay-types.js +0 -0
- package/dist/node/tool/index.js +946 -0
- package/dist/node/tool/tool.entity.js +90 -0
- package/dist/node/tool/tool.enum.js +26 -0
- package/dist/node/tool/tool.event.js +99 -0
- package/dist/node/tool/tool.handler.js +223 -0
- package/dist/node/tool/tool.operation.js +482 -0
- package/dist/node/tool/tool.presentation.js +185 -0
- package/dist/node/tool/tool.schema.js +141 -0
- package/dist/node/tool/tool.test-spec.js +58 -0
- package/dist/node/ui/AgentDashboard.js +1607 -0
- package/dist/node/ui/AgentRunList.js +250 -0
- package/dist/node/ui/AgentToolRegistry.js +212 -0
- package/dist/node/ui/hooks/index.js +271 -0
- package/dist/node/ui/hooks/useAgentList.js +55 -0
- package/dist/node/ui/hooks/useAgentMutations.js +76 -0
- package/dist/node/ui/hooks/useRunList.js +55 -0
- package/dist/node/ui/hooks/useToolList.js +85 -0
- package/dist/node/ui/index.js +2080 -0
- package/dist/node/ui/modals/AgentActionsModal.js +304 -0
- package/dist/node/ui/modals/CreateAgentModal.js +229 -0
- package/dist/node/ui/modals/index.js +532 -0
- package/dist/node/ui/overlays/demo-overlays.js +64 -0
- package/dist/node/ui/overlays/index.js +64 -0
- package/dist/node/ui/renderers/agent-list.markdown.js +55 -0
- package/dist/node/ui/renderers/agent-list.renderer.js +180 -0
- package/dist/node/ui/renderers/dashboard.markdown.js +117 -0
- package/dist/node/ui/renderers/index.js +446 -0
- package/dist/node/ui/renderers/run-list.markdown.js +45 -0
- package/dist/node/ui/renderers/tool-registry.markdown.js +53 -0
- package/dist/node/ui/views/AgentListView.js +165 -0
- package/dist/node/ui/views/RunListView.js +247 -0
- package/dist/node/ui/views/ToolRegistryView.js +209 -0
- package/dist/node/ui/views/index.js +619 -0
- package/dist/presentations/index.d.ts +9 -4
- package/dist/presentations/index.d.ts.map +1 -0
- package/dist/presentations/index.js +684 -4
- package/dist/run/index.d.ts +11 -8
- package/dist/run/index.d.ts.map +1 -0
- package/dist/run/index.js +1351 -9
- package/dist/run/run.entity.d.ts +55 -60
- package/dist/run/run.entity.d.ts.map +1 -1
- package/dist/run/run.entity.js +155 -199
- package/dist/run/run.enum.d.ts +4 -9
- package/dist/run/run.enum.d.ts.map +1 -1
- package/dist/run/run.enum.js +30 -40
- package/dist/run/run.event.d.ts +255 -261
- package/dist/run/run.event.d.ts.map +1 -1
- package/dist/run/run.event.js +198 -418
- package/dist/run/run.handler.d.ts +169 -172
- package/dist/run/run.handler.d.ts.map +1 -1
- package/dist/run/run.handler.js +246 -74
- package/dist/run/run.operation.d.ts +658 -664
- package/dist/run/run.operation.d.ts.map +1 -1
- package/dist/run/run.operation.js +659 -617
- package/dist/run/run.presentation.d.ts +2 -7
- package/dist/run/run.presentation.d.ts.map +1 -1
- package/dist/run/run.presentation.js +217 -61
- package/dist/run/run.schema.d.ts +367 -372
- package/dist/run/run.schema.d.ts.map +1 -1
- package/dist/run/run.schema.js +172 -330
- package/dist/run/run.test-spec.d.ts +2 -7
- package/dist/run/run.test-spec.d.ts.map +1 -1
- package/dist/run/run.test-spec.js +56 -62
- package/dist/seeders/index.d.ts +4 -8
- package/dist/seeders/index.d.ts.map +1 -1
- package/dist/seeders/index.js +19 -17
- package/dist/shared/index.d.ts +7 -4
- package/dist/shared/index.d.ts.map +1 -0
- package/dist/shared/index.js +334 -4
- package/dist/shared/mock-agents.d.ts +77 -80
- package/dist/shared/mock-agents.d.ts.map +1 -1
- package/dist/shared/mock-agents.js +82 -93
- package/dist/shared/mock-runs.d.ts +107 -110
- package/dist/shared/mock-runs.d.ts.map +1 -1
- package/dist/shared/mock-runs.js +108 -117
- package/dist/shared/mock-tools.d.ts +217 -220
- package/dist/shared/mock-tools.d.ts.map +1 -1
- package/dist/shared/mock-tools.js +146 -180
- package/dist/shared/overlay-types.d.ts +25 -28
- package/dist/shared/overlay-types.d.ts.map +1 -1
- package/dist/shared/overlay-types.js +1 -0
- package/dist/tool/index.d.ts +11 -8
- package/dist/tool/index.d.ts.map +1 -0
- package/dist/tool/index.js +947 -9
- package/dist/tool/tool.entity.d.ts +23 -28
- package/dist/tool/tool.entity.d.ts.map +1 -1
- package/dist/tool/tool.entity.js +87 -101
- package/dist/tool/tool.enum.d.ts +3 -8
- package/dist/tool/tool.enum.d.ts.map +1 -1
- package/dist/tool/tool.enum.js +23 -31
- package/dist/tool/tool.event.d.ts +84 -90
- package/dist/tool/tool.event.d.ts.map +1 -1
- package/dist/tool/tool.event.js +92 -151
- package/dist/tool/tool.handler.d.ts +266 -269
- package/dist/tool/tool.handler.d.ts.map +1 -1
- package/dist/tool/tool.handler.js +213 -76
- package/dist/tool/tool.operation.d.ts +359 -365
- package/dist/tool/tool.operation.d.ts.map +1 -1
- package/dist/tool/tool.operation.js +477 -400
- package/dist/tool/tool.presentation.d.ts +2 -7
- package/dist/tool/tool.presentation.d.ts.map +1 -1
- package/dist/tool/tool.presentation.js +182 -61
- package/dist/tool/tool.schema.d.ts +196 -201
- package/dist/tool/tool.schema.d.ts.map +1 -1
- package/dist/tool/tool.schema.js +137 -231
- package/dist/tool/tool.test-spec.d.ts +2 -7
- package/dist/tool/tool.test-spec.d.ts.map +1 -1
- package/dist/tool/tool.test-spec.js +56 -62
- package/dist/ui/AgentDashboard.d.ts +1 -6
- package/dist/ui/AgentDashboard.d.ts.map +1 -1
- package/dist/ui/AgentDashboard.js +1598 -410
- package/dist/ui/AgentRunList.d.ts +7 -2
- package/dist/ui/AgentRunList.d.ts.map +1 -0
- package/dist/ui/AgentRunList.js +249 -3
- package/dist/ui/AgentToolRegistry.d.ts +7 -2
- package/dist/ui/AgentToolRegistry.d.ts.map +1 -0
- package/dist/ui/AgentToolRegistry.js +211 -3
- package/dist/ui/hooks/index.d.ts +8 -6
- package/dist/ui/hooks/index.d.ts.map +1 -0
- package/dist/ui/hooks/index.js +270 -6
- package/dist/ui/hooks/useAgentList.d.ts +21 -25
- package/dist/ui/hooks/useAgentList.d.ts.map +1 -1
- package/dist/ui/hooks/useAgentList.js +52 -62
- package/dist/ui/hooks/useAgentMutations.d.ts +22 -25
- package/dist/ui/hooks/useAgentMutations.d.ts.map +1 -1
- package/dist/ui/hooks/useAgentMutations.js +73 -120
- package/dist/ui/hooks/useRunList.d.ts +17 -21
- package/dist/ui/hooks/useRunList.d.ts.map +1 -1
- package/dist/ui/hooks/useRunList.js +52 -62
- package/dist/ui/hooks/useToolList.d.ts +32 -36
- package/dist/ui/hooks/useToolList.d.ts.map +1 -1
- package/dist/ui/hooks/useToolList.js +82 -92
- package/dist/ui/index.d.ts +9 -24
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +2081 -24
- package/dist/ui/modals/AgentActionsModal.d.ts +11 -24
- package/dist/ui/modals/AgentActionsModal.d.ts.map +1 -1
- package/dist/ui/modals/AgentActionsModal.js +300 -257
- package/dist/ui/modals/CreateAgentModal.d.ts +12 -21
- package/dist/ui/modals/CreateAgentModal.d.ts.map +1 -1
- package/dist/ui/modals/CreateAgentModal.js +226 -210
- package/dist/ui/modals/index.d.ts +3 -3
- package/dist/ui/modals/index.d.ts.map +1 -0
- package/dist/ui/modals/index.js +532 -3
- package/dist/ui/overlays/demo-overlays.d.ts +10 -9
- package/dist/ui/overlays/demo-overlays.d.ts.map +1 -1
- package/dist/ui/overlays/demo-overlays.js +63 -71
- package/dist/ui/overlays/index.d.ts +2 -2
- package/dist/ui/overlays/index.d.ts.map +1 -0
- package/dist/ui/overlays/index.js +65 -3
- package/dist/ui/renderers/agent-list.markdown.d.ts +9 -9
- package/dist/ui/renderers/agent-list.markdown.d.ts.map +1 -1
- package/dist/ui/renderers/agent-list.markdown.js +55 -50
- package/dist/ui/renderers/agent-list.renderer.d.ts +5 -7
- package/dist/ui/renderers/agent-list.renderer.d.ts.map +1 -1
- package/dist/ui/renderers/agent-list.renderer.js +179 -17
- package/dist/ui/renderers/dashboard.markdown.d.ts +9 -9
- package/dist/ui/renderers/dashboard.markdown.d.ts.map +1 -1
- package/dist/ui/renderers/dashboard.markdown.js +115 -97
- package/dist/ui/renderers/index.d.ts +9 -6
- package/dist/ui/renderers/index.d.ts.map +1 -0
- package/dist/ui/renderers/index.js +446 -6
- package/dist/ui/renderers/run-list.markdown.d.ts +9 -9
- package/dist/ui/renderers/run-list.markdown.d.ts.map +1 -1
- package/dist/ui/renderers/run-list.markdown.js +42 -40
- package/dist/ui/renderers/tool-registry.markdown.d.ts +9 -9
- package/dist/ui/renderers/tool-registry.markdown.d.ts.map +1 -1
- package/dist/ui/renderers/tool-registry.markdown.js +52 -53
- package/dist/ui/views/AgentListView.d.ts +1 -6
- package/dist/ui/views/AgentListView.d.ts.map +1 -1
- package/dist/ui/views/AgentListView.js +161 -88
- package/dist/ui/views/RunListView.d.ts +4 -11
- package/dist/ui/views/RunListView.d.ts.map +1 -1
- package/dist/ui/views/RunListView.js +237 -154
- package/dist/ui/views/ToolRegistryView.d.ts +4 -11
- package/dist/ui/views/ToolRegistryView.d.ts.map +1 -1
- package/dist/ui/views/ToolRegistryView.js +205 -92
- package/dist/ui/views/index.d.ts +7 -4
- package/dist/ui/views/index.d.ts.map +1 -0
- package/dist/ui/views/index.js +619 -4
- package/package.json +657 -119
- package/tsdown.config.js +1 -2
- package/.turbo/turbo-build$colon$bundle.log +0 -280
- package/dist/agent/agent.entity.js.map +0 -1
- package/dist/agent/agent.enum.js.map +0 -1
- package/dist/agent/agent.event.js.map +0 -1
- package/dist/agent/agent.handler.js.map +0 -1
- package/dist/agent/agent.operation.js.map +0 -1
- package/dist/agent/agent.presentation.js.map +0 -1
- package/dist/agent/agent.schema.js.map +0 -1
- package/dist/agent/agent.test-spec.js.map +0 -1
- package/dist/agent.capability.js.map +0 -1
- package/dist/agent.feature.js.map +0 -1
- package/dist/docs/agent-console.docblock.js.map +0 -1
- package/dist/example.js.map +0 -1
- package/dist/handlers/agent.handlers.js.map +0 -1
- package/dist/run/run.entity.js.map +0 -1
- package/dist/run/run.enum.js.map +0 -1
- package/dist/run/run.event.js.map +0 -1
- package/dist/run/run.handler.js.map +0 -1
- package/dist/run/run.operation.js.map +0 -1
- package/dist/run/run.presentation.js.map +0 -1
- package/dist/run/run.schema.js.map +0 -1
- package/dist/run/run.test-spec.js.map +0 -1
- package/dist/seeders/index.js.map +0 -1
- package/dist/shared/mock-agents.js.map +0 -1
- package/dist/shared/mock-runs.js.map +0 -1
- package/dist/shared/mock-tools.js.map +0 -1
- package/dist/tool/tool.entity.js.map +0 -1
- package/dist/tool/tool.enum.js.map +0 -1
- package/dist/tool/tool.event.js.map +0 -1
- package/dist/tool/tool.handler.js.map +0 -1
- package/dist/tool/tool.operation.js.map +0 -1
- package/dist/tool/tool.presentation.js.map +0 -1
- package/dist/tool/tool.schema.js.map +0 -1
- package/dist/tool/tool.test-spec.js.map +0 -1
- package/dist/ui/AgentDashboard.js.map +0 -1
- package/dist/ui/hooks/useAgentList.js.map +0 -1
- package/dist/ui/hooks/useAgentMutations.js.map +0 -1
- package/dist/ui/hooks/useRunList.js.map +0 -1
- package/dist/ui/hooks/useToolList.js.map +0 -1
- package/dist/ui/modals/AgentActionsModal.js.map +0 -1
- package/dist/ui/modals/CreateAgentModal.js.map +0 -1
- package/dist/ui/overlays/demo-overlays.js.map +0 -1
- package/dist/ui/renderers/agent-list.markdown.js.map +0 -1
- package/dist/ui/renderers/agent-list.renderer.js.map +0 -1
- package/dist/ui/renderers/dashboard.markdown.js.map +0 -1
- package/dist/ui/renderers/run-list.markdown.js.map +0 -1
- package/dist/ui/renderers/tool-registry.markdown.js.map +0 -1
- package/dist/ui/views/AgentListView.js.map +0 -1
- package/dist/ui/views/RunListView.js.map +0 -1
- package/dist/ui/views/ToolRegistryView.js.map +0 -1
- package/tsconfig.tsbuildinfo +0 -1
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
// src/agent/agent.event.ts
|
|
2
|
+
import { defineEvent, defineSchemaModel } from "@contractspec/lib.contracts";
|
|
3
|
+
import { ScalarTypeEnum } from "@contractspec/lib.schema";
|
|
4
|
+
var OWNERS = ["@agent-console-team"];
|
|
5
|
+
var AgentCreatedPayload = defineSchemaModel({
|
|
6
|
+
name: "AgentCreatedPayload",
|
|
7
|
+
description: "Payload for agent created event",
|
|
8
|
+
fields: {
|
|
9
|
+
id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
10
|
+
organizationId: {
|
|
11
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
12
|
+
isOptional: false
|
|
13
|
+
},
|
|
14
|
+
name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
15
|
+
slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
16
|
+
modelProvider: {
|
|
17
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
18
|
+
isOptional: false
|
|
19
|
+
},
|
|
20
|
+
modelName: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
21
|
+
toolCount: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },
|
|
22
|
+
createdById: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
23
|
+
createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false }
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
var AgentCreatedEvent = defineEvent({
|
|
27
|
+
meta: {
|
|
28
|
+
key: "agent-console.agent.created",
|
|
29
|
+
version: "1.0.0",
|
|
30
|
+
description: "A new AI agent was configured.",
|
|
31
|
+
stability: "stable",
|
|
32
|
+
owners: [...OWNERS],
|
|
33
|
+
tags: ["agent", "created"]
|
|
34
|
+
},
|
|
35
|
+
payload: AgentCreatedPayload
|
|
36
|
+
});
|
|
37
|
+
var AgentUpdatedPayload = defineSchemaModel({
|
|
38
|
+
name: "AgentUpdatedPayload",
|
|
39
|
+
description: "Payload for agent updated event",
|
|
40
|
+
fields: {
|
|
41
|
+
id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
42
|
+
organizationId: {
|
|
43
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
44
|
+
isOptional: false
|
|
45
|
+
},
|
|
46
|
+
name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
47
|
+
status: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
48
|
+
updatedFields: {
|
|
49
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
50
|
+
isArray: true,
|
|
51
|
+
isOptional: false
|
|
52
|
+
},
|
|
53
|
+
updatedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false }
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
var AgentUpdatedEvent = defineEvent({
|
|
57
|
+
meta: {
|
|
58
|
+
key: "agent-console.agent.updated",
|
|
59
|
+
version: "1.0.0",
|
|
60
|
+
description: "An AI agent configuration was updated.",
|
|
61
|
+
stability: "stable",
|
|
62
|
+
owners: [...OWNERS],
|
|
63
|
+
tags: ["agent", "updated"]
|
|
64
|
+
},
|
|
65
|
+
payload: AgentUpdatedPayload
|
|
66
|
+
});
|
|
67
|
+
var AgentToolAssignedPayload = defineSchemaModel({
|
|
68
|
+
name: "AgentToolAssignedPayload",
|
|
69
|
+
description: "Payload for agent tool assigned event",
|
|
70
|
+
fields: {
|
|
71
|
+
agentId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
72
|
+
toolId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
73
|
+
agentName: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
74
|
+
toolName: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
75
|
+
assignedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false }
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
var AgentToolAssignedEvent = defineEvent({
|
|
79
|
+
meta: {
|
|
80
|
+
key: "agent-console.agent.toolAssigned",
|
|
81
|
+
version: "1.0.0",
|
|
82
|
+
description: "A tool was assigned to an agent.",
|
|
83
|
+
stability: "stable",
|
|
84
|
+
owners: [...OWNERS],
|
|
85
|
+
tags: ["agent", "tool", "assigned"]
|
|
86
|
+
},
|
|
87
|
+
payload: AgentToolAssignedPayload
|
|
88
|
+
});
|
|
89
|
+
var AgentToolRemovedPayload = defineSchemaModel({
|
|
90
|
+
name: "AgentToolRemovedPayload",
|
|
91
|
+
description: "Payload for agent tool removed event",
|
|
92
|
+
fields: {
|
|
93
|
+
agentId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
94
|
+
toolId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
95
|
+
agentName: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
96
|
+
toolName: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
97
|
+
removedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false }
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
var AgentToolRemovedEvent = defineEvent({
|
|
101
|
+
meta: {
|
|
102
|
+
key: "agent-console.agent.toolRemoved",
|
|
103
|
+
version: "1.0.0",
|
|
104
|
+
description: "A tool was removed from an agent.",
|
|
105
|
+
stability: "stable",
|
|
106
|
+
owners: [...OWNERS],
|
|
107
|
+
tags: ["agent", "tool", "removed"]
|
|
108
|
+
},
|
|
109
|
+
payload: AgentToolRemovedPayload
|
|
110
|
+
});
|
|
111
|
+
export {
|
|
112
|
+
AgentUpdatedEvent,
|
|
113
|
+
AgentToolRemovedEvent,
|
|
114
|
+
AgentToolAssignedEvent,
|
|
115
|
+
AgentCreatedEvent
|
|
116
|
+
};
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
// src/shared/mock-agents.ts
|
|
2
|
+
var MOCK_AGENTS = [
|
|
3
|
+
{
|
|
4
|
+
id: "agent-1",
|
|
5
|
+
organizationId: "demo-org",
|
|
6
|
+
name: "Customer Support Bot",
|
|
7
|
+
slug: "customer-support-bot",
|
|
8
|
+
description: "Handles tier-1 customer inquiries and routes complex issues.",
|
|
9
|
+
status: "ACTIVE",
|
|
10
|
+
modelProvider: "OPENAI",
|
|
11
|
+
modelName: "gpt-4o-mini",
|
|
12
|
+
modelConfig: { temperature: 0.7 },
|
|
13
|
+
systemPrompt: "You are a helpful customer support assistant.",
|
|
14
|
+
toolChoice: "auto",
|
|
15
|
+
maxIterations: 10,
|
|
16
|
+
timeoutMs: 120000,
|
|
17
|
+
version: "1.0.0",
|
|
18
|
+
tags: ["support", "tier-1"],
|
|
19
|
+
createdAt: new Date("2024-01-15T10:00:00Z"),
|
|
20
|
+
updatedAt: new Date("2024-03-20T14:30:00Z")
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
id: "agent-2",
|
|
24
|
+
organizationId: "demo-org",
|
|
25
|
+
name: "Code Review Assistant",
|
|
26
|
+
slug: "code-review-assistant",
|
|
27
|
+
description: "Reviews pull requests and provides actionable feedback.",
|
|
28
|
+
status: "ACTIVE",
|
|
29
|
+
modelProvider: "ANTHROPIC",
|
|
30
|
+
modelName: "claude-sonnet-4-20250514",
|
|
31
|
+
modelConfig: { temperature: 0.3 },
|
|
32
|
+
systemPrompt: "You are a code review expert.",
|
|
33
|
+
toolChoice: "auto",
|
|
34
|
+
maxIterations: 15,
|
|
35
|
+
timeoutMs: 180000,
|
|
36
|
+
version: "2.1.0",
|
|
37
|
+
tags: ["code", "review", "dev"],
|
|
38
|
+
createdAt: new Date("2024-02-10T09:00:00Z"),
|
|
39
|
+
updatedAt: new Date("2024-04-05T11:15:00Z")
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
id: "agent-3",
|
|
43
|
+
organizationId: "demo-org",
|
|
44
|
+
name: "Data Analyst",
|
|
45
|
+
slug: "data-analyst",
|
|
46
|
+
description: "Queries databases and generates insights from data.",
|
|
47
|
+
status: "PAUSED",
|
|
48
|
+
modelProvider: "OPENAI",
|
|
49
|
+
modelName: "gpt-4o",
|
|
50
|
+
modelConfig: { temperature: 0.5 },
|
|
51
|
+
systemPrompt: "You are a data analyst expert in SQL and analytics.",
|
|
52
|
+
toolChoice: "required",
|
|
53
|
+
maxIterations: 20,
|
|
54
|
+
timeoutMs: 300000,
|
|
55
|
+
version: "1.2.0",
|
|
56
|
+
tags: ["data", "analytics", "sql"],
|
|
57
|
+
createdAt: new Date("2024-03-01T08:00:00Z"),
|
|
58
|
+
updatedAt: new Date("2024-04-10T16:45:00Z")
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
id: "agent-4",
|
|
62
|
+
organizationId: "demo-org",
|
|
63
|
+
name: "Meeting Scheduler",
|
|
64
|
+
slug: "meeting-scheduler",
|
|
65
|
+
description: "Schedules meetings and manages calendar conflicts.",
|
|
66
|
+
status: "DRAFT",
|
|
67
|
+
modelProvider: "GOOGLE",
|
|
68
|
+
modelName: "gemini-2.0-flash",
|
|
69
|
+
modelConfig: { temperature: 0.2 },
|
|
70
|
+
systemPrompt: "You help schedule and organize meetings efficiently.",
|
|
71
|
+
toolChoice: "auto",
|
|
72
|
+
maxIterations: 5,
|
|
73
|
+
timeoutMs: 60000,
|
|
74
|
+
version: "0.1.0",
|
|
75
|
+
tags: ["calendar", "scheduling"],
|
|
76
|
+
createdAt: new Date("2024-04-01T12:00:00Z"),
|
|
77
|
+
updatedAt: new Date("2024-04-01T12:00:00Z")
|
|
78
|
+
}
|
|
79
|
+
];
|
|
80
|
+
|
|
81
|
+
// src/shared/mock-tools.ts
|
|
82
|
+
var MOCK_TOOLS = [
|
|
83
|
+
{
|
|
84
|
+
id: "tool-1",
|
|
85
|
+
organizationId: "demo-org",
|
|
86
|
+
name: "Web Search",
|
|
87
|
+
slug: "web-search",
|
|
88
|
+
description: "Search the web for real-time information using Brave API.",
|
|
89
|
+
category: "RETRIEVAL",
|
|
90
|
+
status: "ACTIVE",
|
|
91
|
+
parametersSchema: {
|
|
92
|
+
type: "object",
|
|
93
|
+
properties: {
|
|
94
|
+
query: { type: "string", description: "Search query" },
|
|
95
|
+
numResults: { type: "number", default: 10 }
|
|
96
|
+
},
|
|
97
|
+
required: ["query"]
|
|
98
|
+
},
|
|
99
|
+
outputSchema: { type: "array", items: { type: "object" } },
|
|
100
|
+
implementationType: "http",
|
|
101
|
+
implementationConfig: {
|
|
102
|
+
url: "https://api.brave.com/search",
|
|
103
|
+
method: "GET"
|
|
104
|
+
},
|
|
105
|
+
maxInvocationsPerMinute: 60,
|
|
106
|
+
timeoutMs: 30000,
|
|
107
|
+
version: "1.0.0",
|
|
108
|
+
tags: ["search", "web"],
|
|
109
|
+
createdAt: new Date("2024-01-01T00:00:00Z"),
|
|
110
|
+
updatedAt: new Date("2024-02-15T10:00:00Z")
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
id: "tool-2",
|
|
114
|
+
organizationId: "demo-org",
|
|
115
|
+
name: "SQL Query",
|
|
116
|
+
slug: "sql-query",
|
|
117
|
+
description: "Execute read-only SQL queries against the data warehouse.",
|
|
118
|
+
category: "RETRIEVAL",
|
|
119
|
+
status: "ACTIVE",
|
|
120
|
+
parametersSchema: {
|
|
121
|
+
type: "object",
|
|
122
|
+
properties: {
|
|
123
|
+
query: { type: "string", description: "SQL query" },
|
|
124
|
+
maxRows: { type: "number", default: 100 }
|
|
125
|
+
},
|
|
126
|
+
required: ["query"]
|
|
127
|
+
},
|
|
128
|
+
outputSchema: { type: "object" },
|
|
129
|
+
implementationType: "function",
|
|
130
|
+
implementationConfig: { handler: "executeSqlQuery" },
|
|
131
|
+
maxInvocationsPerMinute: 30,
|
|
132
|
+
timeoutMs: 60000,
|
|
133
|
+
version: "1.1.0",
|
|
134
|
+
tags: ["sql", "database"],
|
|
135
|
+
createdAt: new Date("2024-01-05T00:00:00Z"),
|
|
136
|
+
updatedAt: new Date("2024-03-10T14:00:00Z")
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
id: "tool-3",
|
|
140
|
+
organizationId: "demo-org",
|
|
141
|
+
name: "Email Sender",
|
|
142
|
+
slug: "email-sender",
|
|
143
|
+
description: "Send emails via SMTP or API.",
|
|
144
|
+
category: "COMMUNICATION",
|
|
145
|
+
status: "ACTIVE",
|
|
146
|
+
parametersSchema: {
|
|
147
|
+
type: "object",
|
|
148
|
+
properties: {
|
|
149
|
+
to: { type: "string" },
|
|
150
|
+
subject: { type: "string" },
|
|
151
|
+
body: { type: "string" }
|
|
152
|
+
},
|
|
153
|
+
required: ["to", "subject", "body"]
|
|
154
|
+
},
|
|
155
|
+
implementationType: "http",
|
|
156
|
+
implementationConfig: { url: "/api/send-email", method: "POST" },
|
|
157
|
+
maxInvocationsPerMinute: 10,
|
|
158
|
+
timeoutMs: 30000,
|
|
159
|
+
version: "1.0.0",
|
|
160
|
+
tags: ["email", "communication"],
|
|
161
|
+
createdAt: new Date("2024-02-01T00:00:00Z"),
|
|
162
|
+
updatedAt: new Date("2024-02-01T00:00:00Z")
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
id: "tool-4",
|
|
166
|
+
organizationId: "demo-org",
|
|
167
|
+
name: "GitHub Integration",
|
|
168
|
+
slug: "github-integration",
|
|
169
|
+
description: "Interact with GitHub repositories, PRs, and issues.",
|
|
170
|
+
category: "INTEGRATION",
|
|
171
|
+
status: "ACTIVE",
|
|
172
|
+
parametersSchema: {
|
|
173
|
+
type: "object",
|
|
174
|
+
properties: {
|
|
175
|
+
action: {
|
|
176
|
+
type: "string",
|
|
177
|
+
enum: ["list_prs", "get_pr", "create_comment"]
|
|
178
|
+
},
|
|
179
|
+
repo: { type: "string" },
|
|
180
|
+
params: { type: "object" }
|
|
181
|
+
},
|
|
182
|
+
required: ["action", "repo"]
|
|
183
|
+
},
|
|
184
|
+
implementationType: "http",
|
|
185
|
+
implementationConfig: { url: "https://api.github.com", auth: "token" },
|
|
186
|
+
maxInvocationsPerMinute: 100,
|
|
187
|
+
timeoutMs: 15000,
|
|
188
|
+
version: "2.0.0",
|
|
189
|
+
tags: ["github", "integration", "code"],
|
|
190
|
+
createdAt: new Date("2024-02-20T00:00:00Z"),
|
|
191
|
+
updatedAt: new Date("2024-04-01T09:00:00Z")
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
id: "tool-5",
|
|
195
|
+
organizationId: "demo-org",
|
|
196
|
+
name: "Calculator",
|
|
197
|
+
slug: "calculator",
|
|
198
|
+
description: "Perform mathematical calculations.",
|
|
199
|
+
category: "COMPUTATION",
|
|
200
|
+
status: "ACTIVE",
|
|
201
|
+
parametersSchema: {
|
|
202
|
+
type: "object",
|
|
203
|
+
properties: {
|
|
204
|
+
expression: {
|
|
205
|
+
type: "string",
|
|
206
|
+
description: "Math expression to evaluate"
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
required: ["expression"]
|
|
210
|
+
},
|
|
211
|
+
outputSchema: {
|
|
212
|
+
type: "object",
|
|
213
|
+
properties: { result: { type: "number" } }
|
|
214
|
+
},
|
|
215
|
+
implementationType: "function",
|
|
216
|
+
implementationConfig: { handler: "evaluateMath" },
|
|
217
|
+
timeoutMs: 5000,
|
|
218
|
+
version: "1.0.0",
|
|
219
|
+
tags: ["math", "utility"],
|
|
220
|
+
createdAt: new Date("2024-01-10T00:00:00Z"),
|
|
221
|
+
updatedAt: new Date("2024-01-10T00:00:00Z")
|
|
222
|
+
}
|
|
223
|
+
];
|
|
224
|
+
|
|
225
|
+
// src/agent/agent.handler.ts
|
|
226
|
+
async function mockListAgentsHandler(input) {
|
|
227
|
+
const {
|
|
228
|
+
organizationId,
|
|
229
|
+
status,
|
|
230
|
+
modelProvider,
|
|
231
|
+
search,
|
|
232
|
+
limit = 20,
|
|
233
|
+
offset = 0
|
|
234
|
+
} = input;
|
|
235
|
+
let filtered = MOCK_AGENTS.filter((a) => a.organizationId === organizationId);
|
|
236
|
+
if (status)
|
|
237
|
+
filtered = filtered.filter((a) => a.status === status);
|
|
238
|
+
if (modelProvider)
|
|
239
|
+
filtered = filtered.filter((a) => a.modelProvider === modelProvider);
|
|
240
|
+
if (search) {
|
|
241
|
+
const q = search.toLowerCase();
|
|
242
|
+
filtered = filtered.filter((a) => a.name.toLowerCase().includes(q) || a.description?.toLowerCase().includes(q) || a.tags?.some((t) => t.toLowerCase().includes(q)));
|
|
243
|
+
}
|
|
244
|
+
const total = filtered.length;
|
|
245
|
+
const items = filtered.slice(offset, offset + limit).map((a) => ({
|
|
246
|
+
id: a.id,
|
|
247
|
+
name: a.name,
|
|
248
|
+
slug: a.slug,
|
|
249
|
+
description: a.description,
|
|
250
|
+
status: a.status,
|
|
251
|
+
modelProvider: a.modelProvider,
|
|
252
|
+
modelName: a.modelName,
|
|
253
|
+
version: a.version,
|
|
254
|
+
createdAt: a.createdAt
|
|
255
|
+
}));
|
|
256
|
+
return { items, total, hasMore: offset + limit < total };
|
|
257
|
+
}
|
|
258
|
+
async function mockGetAgentHandler(input) {
|
|
259
|
+
const agent = MOCK_AGENTS.find((a) => a.id === input.agentId);
|
|
260
|
+
if (!agent)
|
|
261
|
+
throw new Error("AGENT_NOT_FOUND");
|
|
262
|
+
const result = { ...agent, toolIds: ["tool-1", "tool-2"] };
|
|
263
|
+
if (input.includeTools) {
|
|
264
|
+
result.tools = MOCK_TOOLS.slice(0, 2).map((t) => ({
|
|
265
|
+
id: t.id,
|
|
266
|
+
name: t.name,
|
|
267
|
+
slug: t.slug,
|
|
268
|
+
description: t.description,
|
|
269
|
+
category: t.category
|
|
270
|
+
}));
|
|
271
|
+
}
|
|
272
|
+
return result;
|
|
273
|
+
}
|
|
274
|
+
async function mockCreateAgentHandler(input) {
|
|
275
|
+
const exists = MOCK_AGENTS.some((a) => a.organizationId === input.organizationId && a.slug === input.slug);
|
|
276
|
+
if (exists)
|
|
277
|
+
throw new Error("SLUG_EXISTS");
|
|
278
|
+
return {
|
|
279
|
+
id: `agent-${Date.now()}`,
|
|
280
|
+
name: input.name,
|
|
281
|
+
slug: input.slug,
|
|
282
|
+
status: "DRAFT"
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
async function mockUpdateAgentHandler(input) {
|
|
286
|
+
const agent = MOCK_AGENTS.find((a) => a.id === input.agentId);
|
|
287
|
+
if (!agent)
|
|
288
|
+
throw new Error("AGENT_NOT_FOUND");
|
|
289
|
+
return {
|
|
290
|
+
id: agent.id,
|
|
291
|
+
name: input.name ?? agent.name,
|
|
292
|
+
status: input.status ?? agent.status,
|
|
293
|
+
updatedAt: new Date
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
export {
|
|
297
|
+
mockUpdateAgentHandler,
|
|
298
|
+
mockListAgentsHandler,
|
|
299
|
+
mockGetAgentHandler,
|
|
300
|
+
mockCreateAgentHandler
|
|
301
|
+
};
|