@lssm/example.agent-console 0.0.0-canary-20251206160926
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 +202 -0
- package/CHANGELOG.md +13 -0
- package/README.md +83 -0
- package/dist/contracts/agent.d.ts +886 -0
- package/dist/contracts/agent.js +1 -0
- package/dist/contracts/index.d.ts +4 -0
- package/dist/contracts/index.js +1 -0
- package/dist/contracts/run.d.ts +1106 -0
- package/dist/contracts/run.js +1 -0
- package/dist/contracts/tool.d.ts +607 -0
- package/dist/contracts/tool.js +1 -0
- package/dist/entities/agent.d.ts +54 -0
- package/dist/entities/agent.js +1 -0
- package/dist/entities/index.d.ts +4 -0
- package/dist/entities/index.js +1 -0
- package/dist/entities/log.d.ts +31 -0
- package/dist/entities/log.js +1 -0
- package/dist/entities/run.d.ts +85 -0
- package/dist/entities/run.js +1 -0
- package/dist/entities/tool.d.ts +36 -0
- package/dist/entities/tool.js +1 -0
- package/dist/events.d.ts +965 -0
- package/dist/events.js +1 -0
- package/dist/feature.d.ts +11 -0
- package/dist/feature.js +1 -0
- package/dist/handlers/agent.handlers.d.ts +99 -0
- package/dist/handlers/agent.handlers.js +1 -0
- package/dist/handlers/index.d.ts +5 -0
- package/dist/handlers/index.js +1 -0
- package/dist/handlers/mock-data.d.ts +533 -0
- package/dist/handlers/mock-data.js +1 -0
- package/dist/handlers/run.handlers.d.ts +145 -0
- package/dist/handlers/run.handlers.js +1 -0
- package/dist/handlers/tool.handlers.d.ts +86 -0
- package/dist/handlers/tool.handlers.js +1 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +1 -0
- package/dist/libs/contracts/dist/capabilities/openbanking.js +1 -0
- package/dist/libs/contracts/dist/client/index.js +1 -0
- package/dist/libs/contracts/dist/client/react/feature-render.js +1 -0
- package/dist/libs/contracts/dist/client/react/form-render.js +1 -0
- package/dist/libs/contracts/dist/client/react/index.js +1 -0
- package/dist/libs/contracts/dist/events.js +1 -0
- package/dist/libs/contracts/dist/experiments/evaluator.js +1 -0
- package/dist/libs/contracts/dist/graphql-federation/dist/index.js +1 -0
- package/dist/libs/contracts/dist/index.js +1 -0
- package/dist/libs/contracts/dist/install.js +1 -0
- package/dist/libs/contracts/dist/integrations/contracts.js +1 -0
- package/dist/libs/contracts/dist/integrations/index.js +1 -0
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js +1 -0
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js +1 -0
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/index.js +1 -0
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js +1 -0
- package/dist/libs/contracts/dist/integrations/openbanking/models.js +1 -0
- package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js +1 -0
- package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js +1 -0
- package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js +1 -0
- package/dist/libs/contracts/dist/integrations/providers/gmail.js +1 -0
- package/dist/libs/contracts/dist/integrations/providers/google-calendar.js +1 -0
- package/dist/libs/contracts/dist/integrations/providers/impls/elevenlabs-voice.js +1 -0
- package/dist/libs/contracts/dist/integrations/providers/impls/gcs-storage.js +1 -0
- package/dist/libs/contracts/dist/integrations/providers/impls/gmail-inbound.js +1 -0
- package/dist/libs/contracts/dist/integrations/providers/impls/gmail-outbound.js +1 -0
- package/dist/libs/contracts/dist/integrations/providers/impls/google-calendar.js +1 -0
- package/dist/libs/contracts/dist/integrations/providers/impls/index.js +1 -0
- package/dist/libs/contracts/dist/integrations/providers/impls/mistral-embedding.js +1 -0
- package/dist/libs/contracts/dist/integrations/providers/impls/mistral-llm.js +1 -0
- package/dist/libs/contracts/dist/integrations/providers/impls/postmark-email.js +1 -0
- package/dist/libs/contracts/dist/integrations/providers/impls/powens-client.js +1 -0
- package/dist/libs/contracts/dist/integrations/providers/impls/powens-openbanking.js +1 -0
- package/dist/libs/contracts/dist/integrations/providers/impls/provider-factory.js +1 -0
- package/dist/libs/contracts/dist/integrations/providers/impls/qdrant-vector.js +1 -0
- package/dist/libs/contracts/dist/integrations/providers/impls/stripe-payments.js +1 -0
- package/dist/libs/contracts/dist/integrations/providers/impls/twilio-sms.js +1 -0
- package/dist/libs/contracts/dist/integrations/providers/index.js +1 -0
- package/dist/libs/contracts/dist/integrations/providers/mistral.js +1 -0
- package/dist/libs/contracts/dist/integrations/providers/postmark.js +1 -0
- package/dist/libs/contracts/dist/integrations/providers/powens.js +1 -0
- package/dist/libs/contracts/dist/integrations/providers/qdrant.js +1 -0
- package/dist/libs/contracts/dist/integrations/providers/stripe.js +1 -0
- package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js +1 -0
- package/dist/libs/contracts/dist/integrations/runtime.js +1 -0
- package/dist/libs/contracts/dist/integrations/secrets/env-secret-provider.js +1 -0
- package/dist/libs/contracts/dist/integrations/secrets/gcp-secret-manager.js +1 -0
- package/dist/libs/contracts/dist/integrations/secrets/index.js +1 -0
- package/dist/libs/contracts/dist/integrations/secrets/manager.js +1 -0
- package/dist/libs/contracts/dist/integrations/secrets/provider.js +1 -0
- package/dist/libs/contracts/dist/jsonschema.js +1 -0
- package/dist/libs/contracts/dist/knowledge/contracts.js +1 -0
- package/dist/libs/contracts/dist/knowledge/index.js +1 -0
- package/dist/libs/contracts/dist/knowledge/spaces/email-threads.js +1 -0
- package/dist/libs/contracts/dist/knowledge/spaces/financial-docs.js +1 -0
- package/dist/libs/contracts/dist/knowledge/spaces/financial-overview.js +1 -0
- package/dist/libs/contracts/dist/knowledge/spaces/index.js +1 -0
- package/dist/libs/contracts/dist/knowledge/spaces/product-canon.js +1 -0
- package/dist/libs/contracts/dist/knowledge/spaces/support-faq.js +1 -0
- package/dist/libs/contracts/dist/knowledge/spaces/uploaded-docs.js +1 -0
- package/dist/libs/contracts/dist/onboarding-base.js +1 -0
- package/dist/libs/contracts/dist/ownership.js +1 -0
- package/dist/libs/contracts/dist/presentations.js +1 -0
- package/dist/libs/contracts/dist/presentations.v2.js +1 -0
- package/dist/libs/contracts/dist/prompt.js +1 -0
- package/dist/libs/contracts/dist/promptRegistry.js +1 -0
- package/dist/libs/contracts/dist/regenerator/index.js +1 -0
- package/dist/libs/contracts/dist/regenerator/service.js +1 -0
- package/dist/libs/contracts/dist/registry.js +1 -0
- package/dist/libs/contracts/dist/resources.js +1 -0
- package/dist/libs/contracts/dist/schema/dist/EnumType.js +1 -0
- package/dist/libs/contracts/dist/schema/dist/FieldType.js +1 -0
- package/dist/libs/contracts/dist/schema/dist/ScalarTypeEnum.js +1 -0
- package/dist/libs/contracts/dist/schema/dist/SchemaModel.js +1 -0
- package/dist/libs/contracts/dist/schema/dist/entity/defineEntity.js +1 -0
- package/dist/libs/contracts/dist/schema/dist/entity/index.js +1 -0
- package/dist/libs/contracts/dist/schema/dist/entity/types.js +1 -0
- package/dist/libs/contracts/dist/schema/dist/index.js +1 -0
- package/dist/libs/contracts/dist/server/graphql-pothos.js +1 -0
- package/dist/libs/contracts/dist/server/graphql-schema-export.js +1 -0
- package/dist/libs/contracts/dist/server/index.js +1 -0
- package/dist/libs/contracts/dist/server/provider-mcp.js +1 -0
- package/dist/libs/contracts/dist/server/rest-elysia.js +1 -0
- package/dist/libs/contracts/dist/server/rest-express.js +1 -0
- package/dist/libs/contracts/dist/server/rest-generic.js +1 -0
- package/dist/libs/contracts/dist/server/rest-next-app.js +1 -0
- package/dist/libs/contracts/dist/server/rest-next-pages.js +1 -0
- package/dist/libs/contracts/dist/spec.js +1 -0
- package/dist/libs/contracts/dist/telemetry/index.js +1 -0
- package/dist/libs/contracts/dist/telemetry/tracker.js +1 -0
- package/dist/libs/contracts/dist/tests/index.js +1 -0
- package/dist/libs/contracts/dist/tests/runner.js +1 -0
- package/dist/libs/contracts/dist/workflow/index.js +1 -0
- package/dist/libs/contracts/dist/workflow/runner.js +1 -0
- package/dist/libs/schema/dist/EnumType.js +1 -0
- package/dist/libs/schema/dist/FieldType.js +1 -0
- package/dist/libs/schema/dist/ScalarTypeEnum.js +1 -0
- package/dist/libs/schema/dist/SchemaModel.js +1 -0
- package/dist/libs/schema/dist/entity/defineEntity.js +1 -0
- package/dist/libs/schema/dist/entity/index.js +1 -0
- package/dist/libs/schema/dist/entity/types.js +1 -0
- package/dist/libs/schema/dist/index.js +1 -0
- package/dist/presentations/agent-list.d.ts +15 -0
- package/dist/presentations/agent-list.js +1 -0
- package/dist/presentations/dashboard.d.ts +11 -0
- package/dist/presentations/dashboard.js +1 -0
- package/dist/presentations/index.d.ts +11 -0
- package/dist/presentations/index.js +1 -0
- package/dist/presentations/run-list.d.ts +18 -0
- package/dist/presentations/run-list.js +1 -0
- package/dist/presentations/tool-registry.d.ts +14 -0
- package/dist/presentations/tool-registry.js +1 -0
- package/package.json +86 -0
- package/src/contracts/agent.ts +501 -0
- package/src/contracts/index.ts +29 -0
- package/src/contracts/run.ts +561 -0
- package/src/contracts/tool.ts +392 -0
- package/src/entities/agent.ts +151 -0
- package/src/entities/index.ts +20 -0
- package/src/entities/log.ts +76 -0
- package/src/entities/run.ts +240 -0
- package/src/entities/tool.ts +105 -0
- package/src/events.ts +419 -0
- package/src/feature.ts +144 -0
- package/src/handlers/agent.handlers.ts +203 -0
- package/src/handlers/index.ts +55 -0
- package/src/handlers/mock-data.ts +413 -0
- package/src/handlers/run.handlers.ts +331 -0
- package/src/handlers/tool.handlers.ts +188 -0
- package/src/index.ts +34 -0
- package/src/presentations/agent-list.ts +55 -0
- package/src/presentations/dashboard.ts +29 -0
- package/src/presentations/index.ts +48 -0
- package/src/presentations/run-list.ts +76 -0
- package/src/presentations/tool-registry.ts +52 -0
- package/tsconfig.json +10 -0
- package/tsconfig.tsbuildinfo +1 -0
- package/tsdown.config.js +7 -0
package/dist/events.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./libs/contracts/dist/schema/dist/SchemaModel.js";import{e as t}from"./libs/contracts/dist/events.js";import"./libs/contracts/dist/index.js";import{r as n}from"./libs/schema/dist/EnumType.js";import{l as r}from"./libs/schema/dist/ScalarTypeEnum.js";import"./libs/schema/dist/index.js";const i=e({name:`ToolCreatedPayload`,description:`Payload for tool created event`,fields:{id:{type:r.String_unsecure(),isOptional:!1},organizationId:{type:r.String_unsecure(),isOptional:!1},name:{type:r.String_unsecure(),isOptional:!1},slug:{type:r.String_unsecure(),isOptional:!1},category:{type:r.String_unsecure(),isOptional:!1},implementationType:{type:r.String_unsecure(),isOptional:!1},createdById:{type:r.String_unsecure(),isOptional:!0},createdAt:{type:r.DateTime(),isOptional:!1}}}),a=t({name:`agent.tool.created`,version:1,description:`A new AI tool was created.`,payload:i}),o=e({name:`ToolUpdatedPayload`,description:`Payload for tool updated event`,fields:{id:{type:r.String_unsecure(),isOptional:!1},organizationId:{type:r.String_unsecure(),isOptional:!1},name:{type:r.String_unsecure(),isOptional:!1},status:{type:r.String_unsecure(),isOptional:!1},updatedFields:{type:r.String_unsecure(),isArray:!0,isOptional:!1},updatedAt:{type:r.DateTime(),isOptional:!1}}}),s=t({name:`agent.tool.updated`,version:1,description:`An AI tool configuration was updated.`,payload:o}),c=e({name:`ToolStatusChangedPayload`,description:`Payload for tool status changed event`,fields:{id:{type:r.String_unsecure(),isOptional:!1},organizationId:{type:r.String_unsecure(),isOptional:!1},name:{type:r.String_unsecure(),isOptional:!1},previousStatus:{type:r.String_unsecure(),isOptional:!1},newStatus:{type:r.String_unsecure(),isOptional:!1},changedAt:{type:r.DateTime(),isOptional:!1}}}),l=t({name:`agent.tool.statusChanged`,version:1,description:`An AI tool status was changed (activated, deprecated, disabled).`,payload:c}),u=e({name:`AgentCreatedPayload`,description:`Payload for agent created event`,fields:{id:{type:r.String_unsecure(),isOptional:!1},organizationId:{type:r.String_unsecure(),isOptional:!1},name:{type:r.String_unsecure(),isOptional:!1},slug:{type:r.String_unsecure(),isOptional:!1},modelProvider:{type:r.String_unsecure(),isOptional:!1},modelName:{type:r.String_unsecure(),isOptional:!1},toolCount:{type:r.Int_unsecure(),isOptional:!1},createdById:{type:r.String_unsecure(),isOptional:!0},createdAt:{type:r.DateTime(),isOptional:!1}}}),d=t({name:`agent.agent.created`,version:1,description:`A new AI agent was configured.`,payload:u}),f=e({name:`AgentUpdatedPayload`,description:`Payload for agent updated event`,fields:{id:{type:r.String_unsecure(),isOptional:!1},organizationId:{type:r.String_unsecure(),isOptional:!1},name:{type:r.String_unsecure(),isOptional:!1},status:{type:r.String_unsecure(),isOptional:!1},updatedFields:{type:r.String_unsecure(),isArray:!0,isOptional:!1},updatedAt:{type:r.DateTime(),isOptional:!1}}}),p=t({name:`agent.agent.updated`,version:1,description:`An AI agent configuration was updated.`,payload:f}),m=e({name:`AgentToolAssignedPayload`,description:`Payload for agent tool assigned event`,fields:{agentId:{type:r.String_unsecure(),isOptional:!1},toolId:{type:r.String_unsecure(),isOptional:!1},agentName:{type:r.String_unsecure(),isOptional:!1},toolName:{type:r.String_unsecure(),isOptional:!1},assignedAt:{type:r.DateTime(),isOptional:!1}}}),h=t({name:`agent.agent.toolAssigned`,version:1,description:`A tool was assigned to an agent.`,payload:m}),g=e({name:`AgentToolRemovedPayload`,description:`Payload for agent tool removed event`,fields:{agentId:{type:r.String_unsecure(),isOptional:!1},toolId:{type:r.String_unsecure(),isOptional:!1},agentName:{type:r.String_unsecure(),isOptional:!1},toolName:{type:r.String_unsecure(),isOptional:!1},removedAt:{type:r.DateTime(),isOptional:!1}}}),_=t({name:`agent.agent.toolRemoved`,version:1,description:`A tool was removed from an agent.`,payload:g}),v=e({name:`RunStartedPayload`,description:`Payload for run started event`,fields:{runId:{type:r.String_unsecure(),isOptional:!1},organizationId:{type:r.String_unsecure(),isOptional:!1},agentId:{type:r.String_unsecure(),isOptional:!1},agentName:{type:r.String_unsecure(),isOptional:!1},userId:{type:r.String_unsecure(),isOptional:!0},sessionId:{type:r.String_unsecure(),isOptional:!0},input:{type:r.JSONObject(),isOptional:!1},startedAt:{type:r.DateTime(),isOptional:!1}}}),y=t({name:`agent.run.started`,version:1,description:`An agent run was started.`,payload:v}),b=e({name:`RunCompletedPayload`,description:`Payload for run completed event`,fields:{runId:{type:r.String_unsecure(),isOptional:!1},organizationId:{type:r.String_unsecure(),isOptional:!1},agentId:{type:r.String_unsecure(),isOptional:!1},agentName:{type:r.String_unsecure(),isOptional:!1},userId:{type:r.String_unsecure(),isOptional:!0},output:{type:r.JSONObject(),isOptional:!1},totalTokens:{type:r.Int_unsecure(),isOptional:!1},promptTokens:{type:r.Int_unsecure(),isOptional:!1},completionTokens:{type:r.Int_unsecure(),isOptional:!1},totalIterations:{type:r.Int_unsecure(),isOptional:!1},durationMs:{type:r.Int_unsecure(),isOptional:!1},estimatedCostUsd:{type:r.Float_unsecure(),isOptional:!0},completedAt:{type:r.DateTime(),isOptional:!1}}}),x=t({name:`agent.run.completed`,version:1,description:`An agent run completed successfully.`,payload:b}),S=e({name:`RunFailedPayload`,description:`Payload for run failed event`,fields:{runId:{type:r.String_unsecure(),isOptional:!1},organizationId:{type:r.String_unsecure(),isOptional:!1},agentId:{type:r.String_unsecure(),isOptional:!1},agentName:{type:r.String_unsecure(),isOptional:!1},userId:{type:r.String_unsecure(),isOptional:!0},errorMessage:{type:r.String_unsecure(),isOptional:!1},errorCode:{type:r.String_unsecure(),isOptional:!0},totalTokens:{type:r.Int_unsecure(),isOptional:!1},totalIterations:{type:r.Int_unsecure(),isOptional:!1},durationMs:{type:r.Int_unsecure(),isOptional:!0},failedAt:{type:r.DateTime(),isOptional:!1}}}),C=t({name:`agent.run.failed`,version:1,description:`An agent run encountered an error.`,payload:S}),w=e({name:`RunCancelledPayload`,description:`Payload for run cancelled event`,fields:{runId:{type:r.String_unsecure(),isOptional:!1},organizationId:{type:r.String_unsecure(),isOptional:!1},agentId:{type:r.String_unsecure(),isOptional:!1},userId:{type:r.String_unsecure(),isOptional:!0},cancelledBy:{type:r.String_unsecure(),isOptional:!0},reason:{type:r.String_unsecure(),isOptional:!0},totalTokens:{type:r.Int_unsecure(),isOptional:!1},totalIterations:{type:r.Int_unsecure(),isOptional:!1},cancelledAt:{type:r.DateTime(),isOptional:!1}}}),T=t({name:`agent.run.cancelled`,version:1,description:`An agent run was cancelled by the user.`,payload:w}),E=e({name:`ToolInvokedPayload`,description:`Payload for tool invoked event`,fields:{runId:{type:r.String_unsecure(),isOptional:!1},stepId:{type:r.String_unsecure(),isOptional:!1},toolId:{type:r.String_unsecure(),isOptional:!1},toolName:{type:r.String_unsecure(),isOptional:!1},input:{type:r.JSONObject(),isOptional:!1},invokedAt:{type:r.DateTime(),isOptional:!1}}}),D=t({name:`agent.run.toolInvoked`,version:1,description:`A tool was invoked during an agent run.`,payload:E}),O=e({name:`ToolCompletedPayload`,description:`Payload for tool completed event`,fields:{runId:{type:r.String_unsecure(),isOptional:!1},stepId:{type:r.String_unsecure(),isOptional:!1},toolId:{type:r.String_unsecure(),isOptional:!1},toolName:{type:r.String_unsecure(),isOptional:!1},success:{type:r.Boolean(),isOptional:!1},output:{type:r.JSONObject(),isOptional:!0},errorMessage:{type:r.String_unsecure(),isOptional:!0},durationMs:{type:r.Int_unsecure(),isOptional:!1},completedAt:{type:r.DateTime(),isOptional:!1}}}),k=t({name:`agent.run.toolCompleted`,version:1,description:`A tool invocation completed during an agent run.`,payload:O}),A=n(`MessageType`,[`assistant`,`system`]),j=e({name:`MessageGeneratedPayload`,description:`Payload for message generated event`,fields:{runId:{type:r.String_unsecure(),isOptional:!1},stepId:{type:r.String_unsecure(),isOptional:!1},messageType:{type:A,isOptional:!1},content:{type:r.String_unsecure(),isOptional:!1},tokensUsed:{type:r.Int_unsecure(),isOptional:!1},generatedAt:{type:r.DateTime(),isOptional:!1}}}),M=t({name:`agent.run.messageGenerated`,version:1,description:`An agent generated a message during a run.`,payload:j});export{d as AgentCreatedEvent,u as AgentCreatedPayload,h as AgentToolAssignedEvent,m as AgentToolAssignedPayload,_ as AgentToolRemovedEvent,g as AgentToolRemovedPayload,p as AgentUpdatedEvent,f as AgentUpdatedPayload,M as MessageGeneratedEvent,j as MessageGeneratedPayload,A as MessageTypeEnum,T as RunCancelledEvent,w as RunCancelledPayload,x as RunCompletedEvent,b as RunCompletedPayload,C as RunFailedEvent,S as RunFailedPayload,y as RunStartedEvent,v as RunStartedPayload,k as ToolCompletedEvent,O as ToolCompletedPayload,a as ToolCreatedEvent,i as ToolCreatedPayload,D as ToolInvokedEvent,E as ToolInvokedPayload,l as ToolStatusChangedEvent,c as ToolStatusChangedPayload,s as ToolUpdatedEvent,o as ToolUpdatedPayload};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FeatureModuleSpec } from "@lssm/lib.contracts";
|
|
2
|
+
|
|
3
|
+
//#region src/feature.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Agent Console feature module that bundles all agent, tool, and run
|
|
7
|
+
* operations, events, and presentations into an installable feature.
|
|
8
|
+
*/
|
|
9
|
+
declare const AgentConsoleFeature: FeatureModuleSpec;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { AgentConsoleFeature };
|
package/dist/feature.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={meta:{key:`agent-console`,title:`AI Agent Console`,description:`AI agent orchestration with tools, runs, and logs management`,domain:`ai-ops`,owners:[`agent-console-team`],tags:[`ai`,`agents`,`orchestration`],stability:`experimental`},operations:[{name:`agent.agent.create`,version:1},{name:`agent.agent.update`,version:1},{name:`agent.agent.get`,version:1},{name:`agent.agent.list`,version:1},{name:`agent.agent.assignTool`,version:1},{name:`agent.agent.removeTool`,version:1},{name:`agent.tool.create`,version:1},{name:`agent.tool.update`,version:1},{name:`agent.tool.get`,version:1},{name:`agent.tool.list`,version:1},{name:`agent.tool.test`,version:1},{name:`agent.run.execute`,version:1},{name:`agent.run.cancel`,version:1},{name:`agent.run.get`,version:1},{name:`agent.run.list`,version:1},{name:`agent.run.getSteps`,version:1},{name:`agent.run.getLogs`,version:1},{name:`agent.run.getMetrics`,version:1}],events:[{name:`agent.created`,version:1},{name:`agent.updated`,version:1},{name:`agent.deleted`,version:1},{name:`tool.created`,version:1},{name:`tool.updated`,version:1},{name:`run.started`,version:1},{name:`run.completed`,version:1},{name:`run.failed`,version:1},{name:`run.cancelled`,version:1}],presentations:[{name:`agent-console.dashboard`,version:1},{name:`agent-console.agent.list`,version:1},{name:`agent-console.agent.detail`,version:1},{name:`agent-console.run.list`,version:1},{name:`agent-console.run.detail`,version:1},{name:`agent-console.run.metrics`,version:1},{name:`agent-console.tool.registry`,version:1},{name:`agent-console.tool.detail`,version:1}],opToPresentation:[{op:{name:`agent.agent.list`,version:1},pres:{name:`agent-console.agent.list`,version:1}},{op:{name:`agent.agent.get`,version:1},pres:{name:`agent-console.agent.detail`,version:1}},{op:{name:`agent.run.list`,version:1},pres:{name:`agent-console.run.list`,version:1}},{op:{name:`agent.run.get`,version:1},pres:{name:`agent-console.run.detail`,version:1}},{op:{name:`agent.run.getMetrics`,version:1},pres:{name:`agent-console.run.metrics`,version:1}},{op:{name:`agent.tool.list`,version:1},pres:{name:`agent-console.tool.registry`,version:1}},{op:{name:`agent.tool.get`,version:1},pres:{name:`agent-console.tool.detail`,version:1}}],presentationsTargets:[{name:`agent-console.dashboard`,version:1,targets:[`react`,`markdown`]},{name:`agent-console.agent.list`,version:1,targets:[`react`,`markdown`,`application/json`]},{name:`agent-console.run.list`,version:1,targets:[`react`,`markdown`,`application/json`]},{name:`agent-console.tool.registry`,version:1,targets:[`react`,`markdown`,`application/json`]}],capabilities:{requires:[{key:`identity`,version:1},{key:`audit-trail`,version:1},{key:`jobs`,version:1}]}};export{e as AgentConsoleFeature};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
//#region src/handlers/agent.handlers.d.ts
|
|
2
|
+
interface ListAgentsInput {
|
|
3
|
+
organizationId: string;
|
|
4
|
+
status?: 'DRAFT' | 'ACTIVE' | 'PAUSED' | 'ARCHIVED';
|
|
5
|
+
modelProvider?: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'MISTRAL' | 'CUSTOM';
|
|
6
|
+
search?: string;
|
|
7
|
+
limit?: number;
|
|
8
|
+
offset?: number;
|
|
9
|
+
}
|
|
10
|
+
interface AgentSummary {
|
|
11
|
+
id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
slug: string;
|
|
14
|
+
description?: string;
|
|
15
|
+
status: 'DRAFT' | 'ACTIVE' | 'PAUSED' | 'ARCHIVED';
|
|
16
|
+
modelProvider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'MISTRAL' | 'CUSTOM';
|
|
17
|
+
modelName: string;
|
|
18
|
+
version: string;
|
|
19
|
+
createdAt: Date;
|
|
20
|
+
}
|
|
21
|
+
interface ListAgentsOutput {
|
|
22
|
+
items: AgentSummary[];
|
|
23
|
+
total: number;
|
|
24
|
+
hasMore: boolean;
|
|
25
|
+
}
|
|
26
|
+
interface GetAgentInput {
|
|
27
|
+
agentId: string;
|
|
28
|
+
includeTools?: boolean;
|
|
29
|
+
}
|
|
30
|
+
interface AgentToolRef {
|
|
31
|
+
id: string;
|
|
32
|
+
name: string;
|
|
33
|
+
slug: string;
|
|
34
|
+
description: string;
|
|
35
|
+
category: string;
|
|
36
|
+
}
|
|
37
|
+
interface AgentWithTools {
|
|
38
|
+
id: string;
|
|
39
|
+
organizationId: string;
|
|
40
|
+
name: string;
|
|
41
|
+
slug: string;
|
|
42
|
+
description?: string;
|
|
43
|
+
status: 'DRAFT' | 'ACTIVE' | 'PAUSED' | 'ARCHIVED';
|
|
44
|
+
modelProvider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'MISTRAL' | 'CUSTOM';
|
|
45
|
+
modelName: string;
|
|
46
|
+
modelConfig?: Record<string, unknown>;
|
|
47
|
+
systemPrompt: string;
|
|
48
|
+
userPromptTemplate?: string;
|
|
49
|
+
toolIds?: string[];
|
|
50
|
+
toolChoice: 'auto' | 'required' | 'none';
|
|
51
|
+
maxIterations: number;
|
|
52
|
+
maxTokensPerRun?: number;
|
|
53
|
+
timeoutMs: number;
|
|
54
|
+
version: string;
|
|
55
|
+
tags?: string[];
|
|
56
|
+
createdAt: Date;
|
|
57
|
+
updatedAt: Date;
|
|
58
|
+
tools?: AgentToolRef[];
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Mock handler for ListAgentsQuery
|
|
62
|
+
*/
|
|
63
|
+
declare function mockListAgentsHandler(input: ListAgentsInput): Promise<ListAgentsOutput>;
|
|
64
|
+
/**
|
|
65
|
+
* Mock handler for GetAgentQuery
|
|
66
|
+
*/
|
|
67
|
+
declare function mockGetAgentHandler(input: GetAgentInput): Promise<AgentWithTools>;
|
|
68
|
+
/**
|
|
69
|
+
* Mock handler for CreateAgentCommand
|
|
70
|
+
*/
|
|
71
|
+
declare function mockCreateAgentHandler(input: {
|
|
72
|
+
organizationId: string;
|
|
73
|
+
name: string;
|
|
74
|
+
slug: string;
|
|
75
|
+
description?: string;
|
|
76
|
+
modelProvider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'MISTRAL' | 'CUSTOM';
|
|
77
|
+
modelName: string;
|
|
78
|
+
systemPrompt: string;
|
|
79
|
+
}): Promise<{
|
|
80
|
+
id: string;
|
|
81
|
+
name: string;
|
|
82
|
+
slug: string;
|
|
83
|
+
status: "DRAFT";
|
|
84
|
+
}>;
|
|
85
|
+
/**
|
|
86
|
+
* Mock handler for UpdateAgentCommand
|
|
87
|
+
*/
|
|
88
|
+
declare function mockUpdateAgentHandler(input: {
|
|
89
|
+
agentId: string;
|
|
90
|
+
name?: string;
|
|
91
|
+
status?: 'DRAFT' | 'ACTIVE' | 'PAUSED' | 'ARCHIVED';
|
|
92
|
+
}): Promise<{
|
|
93
|
+
id: string;
|
|
94
|
+
name: string;
|
|
95
|
+
status: "DRAFT" | "ACTIVE" | "PAUSED" | "ARCHIVED";
|
|
96
|
+
updatedAt: Date;
|
|
97
|
+
}>;
|
|
98
|
+
//#endregion
|
|
99
|
+
export { AgentSummary, AgentToolRef, AgentWithTools, GetAgentInput, ListAgentsInput, ListAgentsOutput, mockCreateAgentHandler, mockGetAgentHandler, mockListAgentsHandler, mockUpdateAgentHandler };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{MOCK_AGENTS as e,MOCK_TOOLS as t}from"./mock-data.js";async function n(t){let{organizationId:n,status:r,modelProvider:i,search:a,limit:o=20,offset:s=0}=t,c=e.filter(e=>e.organizationId===n);if(r&&(c=c.filter(e=>e.status===r)),i&&(c=c.filter(e=>e.modelProvider===i)),a){let e=a.toLowerCase();c=c.filter(t=>t.name.toLowerCase().includes(e)||t.description?.toLowerCase().includes(e)||t.tags?.some(t=>t.toLowerCase().includes(e)))}let l=c.length;return{items:c.slice(s,s+o).map(e=>({id:e.id,name:e.name,slug:e.slug,description:e.description,status:e.status,modelProvider:e.modelProvider,modelName:e.modelName,version:e.version,createdAt:e.createdAt})),total:l,hasMore:s+o<l}}async function r(n){let r=e.find(e=>e.id===n.agentId);if(!r)throw Error(`AGENT_NOT_FOUND`);let i={...r,toolIds:[`tool-1`,`tool-2`]};return n.includeTools&&(i.tools=t.slice(0,2).map(e=>({id:e.id,name:e.name,slug:e.slug,description:e.description,category:e.category}))),i}async function i(t){if(e.some(e=>e.organizationId===t.organizationId&&e.slug===t.slug))throw Error(`SLUG_EXISTS`);return{id:`agent-${Date.now()}`,name:t.name,slug:t.slug,status:`DRAFT`}}async function a(t){let n=e.find(e=>e.id===t.agentId);if(!n)throw Error(`AGENT_NOT_FOUND`);return{id:n.id,name:t.name??n.name,status:t.status??n.status,updatedAt:new Date}}export{i as mockCreateAgentHandler,r as mockGetAgentHandler,n as mockListAgentsHandler,a as mockUpdateAgentHandler};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { AgentSummary, AgentToolRef, AgentWithTools, GetAgentInput, ListAgentsInput, ListAgentsOutput, mockCreateAgentHandler, mockGetAgentHandler, mockListAgentsHandler, mockUpdateAgentHandler } from "./agent.handlers.js";
|
|
2
|
+
import { MOCK_AGENTS, MOCK_RUNS, MOCK_RUN_LOGS, MOCK_RUN_STEPS, MOCK_TOOLS } from "./mock-data.js";
|
|
3
|
+
import { GetToolInput, ListToolsInput, ListToolsOutput, Tool, ToolSummary, mockCreateToolHandler, mockGetToolHandler, mockListToolsHandler, mockTestToolHandler } from "./tool.handlers.js";
|
|
4
|
+
import { GetRunInput, GetRunMetricsInput, ListRunsInput, ListRunsOutput, Run, RunLog, RunMetrics, RunStep, RunSummary, TimelineDataPoint, mockCancelRunHandler, mockExecuteAgentHandler, mockGetRunHandler, mockGetRunMetricsHandler, mockListRunsHandler } from "./run.handlers.js";
|
|
5
|
+
export { type AgentSummary, type AgentToolRef, type AgentWithTools, type GetAgentInput, type GetRunInput, type GetRunMetricsInput, type GetToolInput, type ListAgentsInput, type ListAgentsOutput, type ListRunsInput, type ListRunsOutput, type ListToolsInput, type ListToolsOutput, MOCK_AGENTS, MOCK_RUNS, MOCK_RUN_LOGS, MOCK_RUN_STEPS, MOCK_TOOLS, type Run, type RunLog, type RunMetrics, type RunStep, type RunSummary, type TimelineDataPoint, type Tool, type ToolSummary, mockCancelRunHandler, mockCreateAgentHandler, mockCreateToolHandler, mockExecuteAgentHandler, mockGetAgentHandler, mockGetRunHandler, mockGetRunMetricsHandler, mockGetToolHandler, mockListAgentsHandler, mockListRunsHandler, mockListToolsHandler, mockTestToolHandler, mockUpdateAgentHandler };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{MOCK_AGENTS as e,MOCK_RUNS as t,MOCK_RUN_LOGS as n,MOCK_RUN_STEPS as r,MOCK_TOOLS as i}from"./mock-data.js";import{mockCreateAgentHandler as a,mockGetAgentHandler as o,mockListAgentsHandler as s,mockUpdateAgentHandler as c}from"./agent.handlers.js";import{mockCreateToolHandler as l,mockGetToolHandler as u,mockListToolsHandler as d,mockTestToolHandler as f}from"./tool.handlers.js";import{mockCancelRunHandler as p,mockExecuteAgentHandler as m,mockGetRunHandler as h,mockGetRunMetricsHandler as g,mockListRunsHandler as _}from"./run.handlers.js";export{e as MOCK_AGENTS,t as MOCK_RUNS,n as MOCK_RUN_LOGS,r as MOCK_RUN_STEPS,i as MOCK_TOOLS,p as mockCancelRunHandler,a as mockCreateAgentHandler,l as mockCreateToolHandler,m as mockExecuteAgentHandler,o as mockGetAgentHandler,h as mockGetRunHandler,g as mockGetRunMetricsHandler,u as mockGetToolHandler,s as mockListAgentsHandler,_ as mockListRunsHandler,d as mockListToolsHandler,f as mockTestToolHandler,c as mockUpdateAgentHandler};
|
|
@@ -0,0 +1,533 @@
|
|
|
1
|
+
//#region src/handlers/mock-data.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Mock data for agent-console handlers
|
|
4
|
+
*/
|
|
5
|
+
declare const MOCK_AGENTS: ({
|
|
6
|
+
id: string;
|
|
7
|
+
organizationId: string;
|
|
8
|
+
name: string;
|
|
9
|
+
slug: string;
|
|
10
|
+
description: string;
|
|
11
|
+
status: "ACTIVE";
|
|
12
|
+
modelProvider: "OPENAI";
|
|
13
|
+
modelName: string;
|
|
14
|
+
modelConfig: {
|
|
15
|
+
temperature: number;
|
|
16
|
+
};
|
|
17
|
+
systemPrompt: string;
|
|
18
|
+
toolChoice: "auto";
|
|
19
|
+
maxIterations: number;
|
|
20
|
+
timeoutMs: number;
|
|
21
|
+
version: string;
|
|
22
|
+
tags: string[];
|
|
23
|
+
createdAt: Date;
|
|
24
|
+
updatedAt: Date;
|
|
25
|
+
} | {
|
|
26
|
+
id: string;
|
|
27
|
+
organizationId: string;
|
|
28
|
+
name: string;
|
|
29
|
+
slug: string;
|
|
30
|
+
description: string;
|
|
31
|
+
status: "ACTIVE";
|
|
32
|
+
modelProvider: "ANTHROPIC";
|
|
33
|
+
modelName: string;
|
|
34
|
+
modelConfig: {
|
|
35
|
+
temperature: number;
|
|
36
|
+
};
|
|
37
|
+
systemPrompt: string;
|
|
38
|
+
toolChoice: "auto";
|
|
39
|
+
maxIterations: number;
|
|
40
|
+
timeoutMs: number;
|
|
41
|
+
version: string;
|
|
42
|
+
tags: string[];
|
|
43
|
+
createdAt: Date;
|
|
44
|
+
updatedAt: Date;
|
|
45
|
+
} | {
|
|
46
|
+
id: string;
|
|
47
|
+
organizationId: string;
|
|
48
|
+
name: string;
|
|
49
|
+
slug: string;
|
|
50
|
+
description: string;
|
|
51
|
+
status: "PAUSED";
|
|
52
|
+
modelProvider: "OPENAI";
|
|
53
|
+
modelName: string;
|
|
54
|
+
modelConfig: {
|
|
55
|
+
temperature: number;
|
|
56
|
+
};
|
|
57
|
+
systemPrompt: string;
|
|
58
|
+
toolChoice: "required";
|
|
59
|
+
maxIterations: number;
|
|
60
|
+
timeoutMs: number;
|
|
61
|
+
version: string;
|
|
62
|
+
tags: string[];
|
|
63
|
+
createdAt: Date;
|
|
64
|
+
updatedAt: Date;
|
|
65
|
+
} | {
|
|
66
|
+
id: string;
|
|
67
|
+
organizationId: string;
|
|
68
|
+
name: string;
|
|
69
|
+
slug: string;
|
|
70
|
+
description: string;
|
|
71
|
+
status: "DRAFT";
|
|
72
|
+
modelProvider: "GOOGLE";
|
|
73
|
+
modelName: string;
|
|
74
|
+
modelConfig: {
|
|
75
|
+
temperature: number;
|
|
76
|
+
};
|
|
77
|
+
systemPrompt: string;
|
|
78
|
+
toolChoice: "auto";
|
|
79
|
+
maxIterations: number;
|
|
80
|
+
timeoutMs: number;
|
|
81
|
+
version: string;
|
|
82
|
+
tags: string[];
|
|
83
|
+
createdAt: Date;
|
|
84
|
+
updatedAt: Date;
|
|
85
|
+
})[];
|
|
86
|
+
declare const MOCK_TOOLS: ({
|
|
87
|
+
id: string;
|
|
88
|
+
organizationId: string;
|
|
89
|
+
name: string;
|
|
90
|
+
slug: string;
|
|
91
|
+
description: string;
|
|
92
|
+
category: "RETRIEVAL";
|
|
93
|
+
status: "ACTIVE";
|
|
94
|
+
parametersSchema: {
|
|
95
|
+
type: string;
|
|
96
|
+
properties: {
|
|
97
|
+
query: {
|
|
98
|
+
type: string;
|
|
99
|
+
description: string;
|
|
100
|
+
};
|
|
101
|
+
numResults: {
|
|
102
|
+
type: string;
|
|
103
|
+
default: number;
|
|
104
|
+
};
|
|
105
|
+
maxRows?: undefined;
|
|
106
|
+
to?: undefined;
|
|
107
|
+
subject?: undefined;
|
|
108
|
+
body?: undefined;
|
|
109
|
+
action?: undefined;
|
|
110
|
+
repo?: undefined;
|
|
111
|
+
params?: undefined;
|
|
112
|
+
expression?: undefined;
|
|
113
|
+
};
|
|
114
|
+
required: string[];
|
|
115
|
+
};
|
|
116
|
+
outputSchema: {
|
|
117
|
+
type: string;
|
|
118
|
+
items: {
|
|
119
|
+
type: string;
|
|
120
|
+
};
|
|
121
|
+
properties?: undefined;
|
|
122
|
+
};
|
|
123
|
+
implementationType: "http";
|
|
124
|
+
implementationConfig: {
|
|
125
|
+
url: string;
|
|
126
|
+
method: string;
|
|
127
|
+
handler?: undefined;
|
|
128
|
+
auth?: undefined;
|
|
129
|
+
};
|
|
130
|
+
maxInvocationsPerMinute: number;
|
|
131
|
+
timeoutMs: number;
|
|
132
|
+
version: string;
|
|
133
|
+
tags: string[];
|
|
134
|
+
createdAt: Date;
|
|
135
|
+
updatedAt: Date;
|
|
136
|
+
} | {
|
|
137
|
+
id: string;
|
|
138
|
+
organizationId: string;
|
|
139
|
+
name: string;
|
|
140
|
+
slug: string;
|
|
141
|
+
description: string;
|
|
142
|
+
category: "RETRIEVAL";
|
|
143
|
+
status: "ACTIVE";
|
|
144
|
+
parametersSchema: {
|
|
145
|
+
type: string;
|
|
146
|
+
properties: {
|
|
147
|
+
query: {
|
|
148
|
+
type: string;
|
|
149
|
+
description: string;
|
|
150
|
+
};
|
|
151
|
+
maxRows: {
|
|
152
|
+
type: string;
|
|
153
|
+
default: number;
|
|
154
|
+
};
|
|
155
|
+
numResults?: undefined;
|
|
156
|
+
to?: undefined;
|
|
157
|
+
subject?: undefined;
|
|
158
|
+
body?: undefined;
|
|
159
|
+
action?: undefined;
|
|
160
|
+
repo?: undefined;
|
|
161
|
+
params?: undefined;
|
|
162
|
+
expression?: undefined;
|
|
163
|
+
};
|
|
164
|
+
required: string[];
|
|
165
|
+
};
|
|
166
|
+
outputSchema: {
|
|
167
|
+
type: string;
|
|
168
|
+
items?: undefined;
|
|
169
|
+
properties?: undefined;
|
|
170
|
+
};
|
|
171
|
+
implementationType: "function";
|
|
172
|
+
implementationConfig: {
|
|
173
|
+
handler: string;
|
|
174
|
+
url?: undefined;
|
|
175
|
+
method?: undefined;
|
|
176
|
+
auth?: undefined;
|
|
177
|
+
};
|
|
178
|
+
maxInvocationsPerMinute: number;
|
|
179
|
+
timeoutMs: number;
|
|
180
|
+
version: string;
|
|
181
|
+
tags: string[];
|
|
182
|
+
createdAt: Date;
|
|
183
|
+
updatedAt: Date;
|
|
184
|
+
} | {
|
|
185
|
+
id: string;
|
|
186
|
+
organizationId: string;
|
|
187
|
+
name: string;
|
|
188
|
+
slug: string;
|
|
189
|
+
description: string;
|
|
190
|
+
category: "COMMUNICATION";
|
|
191
|
+
status: "ACTIVE";
|
|
192
|
+
parametersSchema: {
|
|
193
|
+
type: string;
|
|
194
|
+
properties: {
|
|
195
|
+
to: {
|
|
196
|
+
type: string;
|
|
197
|
+
};
|
|
198
|
+
subject: {
|
|
199
|
+
type: string;
|
|
200
|
+
};
|
|
201
|
+
body: {
|
|
202
|
+
type: string;
|
|
203
|
+
};
|
|
204
|
+
query?: undefined;
|
|
205
|
+
numResults?: undefined;
|
|
206
|
+
maxRows?: undefined;
|
|
207
|
+
action?: undefined;
|
|
208
|
+
repo?: undefined;
|
|
209
|
+
params?: undefined;
|
|
210
|
+
expression?: undefined;
|
|
211
|
+
};
|
|
212
|
+
required: string[];
|
|
213
|
+
};
|
|
214
|
+
implementationType: "http";
|
|
215
|
+
implementationConfig: {
|
|
216
|
+
url: string;
|
|
217
|
+
method: string;
|
|
218
|
+
handler?: undefined;
|
|
219
|
+
auth?: undefined;
|
|
220
|
+
};
|
|
221
|
+
maxInvocationsPerMinute: number;
|
|
222
|
+
timeoutMs: number;
|
|
223
|
+
version: string;
|
|
224
|
+
tags: string[];
|
|
225
|
+
createdAt: Date;
|
|
226
|
+
updatedAt: Date;
|
|
227
|
+
outputSchema?: undefined;
|
|
228
|
+
} | {
|
|
229
|
+
id: string;
|
|
230
|
+
organizationId: string;
|
|
231
|
+
name: string;
|
|
232
|
+
slug: string;
|
|
233
|
+
description: string;
|
|
234
|
+
category: "INTEGRATION";
|
|
235
|
+
status: "ACTIVE";
|
|
236
|
+
parametersSchema: {
|
|
237
|
+
type: string;
|
|
238
|
+
properties: {
|
|
239
|
+
action: {
|
|
240
|
+
type: string;
|
|
241
|
+
enum: string[];
|
|
242
|
+
};
|
|
243
|
+
repo: {
|
|
244
|
+
type: string;
|
|
245
|
+
};
|
|
246
|
+
params: {
|
|
247
|
+
type: string;
|
|
248
|
+
};
|
|
249
|
+
query?: undefined;
|
|
250
|
+
numResults?: undefined;
|
|
251
|
+
maxRows?: undefined;
|
|
252
|
+
to?: undefined;
|
|
253
|
+
subject?: undefined;
|
|
254
|
+
body?: undefined;
|
|
255
|
+
expression?: undefined;
|
|
256
|
+
};
|
|
257
|
+
required: string[];
|
|
258
|
+
};
|
|
259
|
+
implementationType: "http";
|
|
260
|
+
implementationConfig: {
|
|
261
|
+
url: string;
|
|
262
|
+
auth: string;
|
|
263
|
+
method?: undefined;
|
|
264
|
+
handler?: undefined;
|
|
265
|
+
};
|
|
266
|
+
maxInvocationsPerMinute: number;
|
|
267
|
+
timeoutMs: number;
|
|
268
|
+
version: string;
|
|
269
|
+
tags: string[];
|
|
270
|
+
createdAt: Date;
|
|
271
|
+
updatedAt: Date;
|
|
272
|
+
outputSchema?: undefined;
|
|
273
|
+
} | {
|
|
274
|
+
id: string;
|
|
275
|
+
organizationId: string;
|
|
276
|
+
name: string;
|
|
277
|
+
slug: string;
|
|
278
|
+
description: string;
|
|
279
|
+
category: "COMPUTATION";
|
|
280
|
+
status: "ACTIVE";
|
|
281
|
+
parametersSchema: {
|
|
282
|
+
type: string;
|
|
283
|
+
properties: {
|
|
284
|
+
expression: {
|
|
285
|
+
type: string;
|
|
286
|
+
description: string;
|
|
287
|
+
};
|
|
288
|
+
query?: undefined;
|
|
289
|
+
numResults?: undefined;
|
|
290
|
+
maxRows?: undefined;
|
|
291
|
+
to?: undefined;
|
|
292
|
+
subject?: undefined;
|
|
293
|
+
body?: undefined;
|
|
294
|
+
action?: undefined;
|
|
295
|
+
repo?: undefined;
|
|
296
|
+
params?: undefined;
|
|
297
|
+
};
|
|
298
|
+
required: string[];
|
|
299
|
+
};
|
|
300
|
+
outputSchema: {
|
|
301
|
+
type: string;
|
|
302
|
+
properties: {
|
|
303
|
+
result: {
|
|
304
|
+
type: string;
|
|
305
|
+
};
|
|
306
|
+
};
|
|
307
|
+
items?: undefined;
|
|
308
|
+
};
|
|
309
|
+
implementationType: "function";
|
|
310
|
+
implementationConfig: {
|
|
311
|
+
handler: string;
|
|
312
|
+
url?: undefined;
|
|
313
|
+
method?: undefined;
|
|
314
|
+
auth?: undefined;
|
|
315
|
+
};
|
|
316
|
+
timeoutMs: number;
|
|
317
|
+
version: string;
|
|
318
|
+
tags: string[];
|
|
319
|
+
createdAt: Date;
|
|
320
|
+
updatedAt: Date;
|
|
321
|
+
maxInvocationsPerMinute?: undefined;
|
|
322
|
+
})[];
|
|
323
|
+
declare const MOCK_RUNS: ({
|
|
324
|
+
id: string;
|
|
325
|
+
organizationId: string;
|
|
326
|
+
agentId: string;
|
|
327
|
+
agentName: string;
|
|
328
|
+
userId: string;
|
|
329
|
+
sessionId: string;
|
|
330
|
+
input: {
|
|
331
|
+
message: string;
|
|
332
|
+
context: {
|
|
333
|
+
prNumber?: undefined;
|
|
334
|
+
};
|
|
335
|
+
};
|
|
336
|
+
output: {
|
|
337
|
+
response: string;
|
|
338
|
+
};
|
|
339
|
+
status: "COMPLETED";
|
|
340
|
+
totalTokens: number;
|
|
341
|
+
promptTokens: number;
|
|
342
|
+
completionTokens: number;
|
|
343
|
+
totalIterations: number;
|
|
344
|
+
durationMs: number;
|
|
345
|
+
estimatedCostUsd: number;
|
|
346
|
+
queuedAt: Date;
|
|
347
|
+
startedAt: Date;
|
|
348
|
+
completedAt: Date;
|
|
349
|
+
errorMessage?: undefined;
|
|
350
|
+
errorCode?: undefined;
|
|
351
|
+
} | {
|
|
352
|
+
id: string;
|
|
353
|
+
organizationId: string;
|
|
354
|
+
agentId: string;
|
|
355
|
+
agentName: string;
|
|
356
|
+
userId: string;
|
|
357
|
+
input: {
|
|
358
|
+
message: string;
|
|
359
|
+
context: {
|
|
360
|
+
prNumber: number;
|
|
361
|
+
};
|
|
362
|
+
};
|
|
363
|
+
status: "IN_PROGRESS";
|
|
364
|
+
totalTokens: number;
|
|
365
|
+
promptTokens: number;
|
|
366
|
+
completionTokens: number;
|
|
367
|
+
totalIterations: number;
|
|
368
|
+
queuedAt: Date;
|
|
369
|
+
startedAt: Date;
|
|
370
|
+
sessionId?: undefined;
|
|
371
|
+
output?: undefined;
|
|
372
|
+
durationMs?: undefined;
|
|
373
|
+
estimatedCostUsd?: undefined;
|
|
374
|
+
completedAt?: undefined;
|
|
375
|
+
errorMessage?: undefined;
|
|
376
|
+
errorCode?: undefined;
|
|
377
|
+
} | {
|
|
378
|
+
id: string;
|
|
379
|
+
organizationId: string;
|
|
380
|
+
agentId: string;
|
|
381
|
+
agentName: string;
|
|
382
|
+
userId: string;
|
|
383
|
+
input: {
|
|
384
|
+
message: string;
|
|
385
|
+
context?: undefined;
|
|
386
|
+
};
|
|
387
|
+
output: {
|
|
388
|
+
response: string;
|
|
389
|
+
};
|
|
390
|
+
status: "COMPLETED";
|
|
391
|
+
totalTokens: number;
|
|
392
|
+
promptTokens: number;
|
|
393
|
+
completionTokens: number;
|
|
394
|
+
totalIterations: number;
|
|
395
|
+
durationMs: number;
|
|
396
|
+
estimatedCostUsd: number;
|
|
397
|
+
queuedAt: Date;
|
|
398
|
+
startedAt: Date;
|
|
399
|
+
completedAt: Date;
|
|
400
|
+
sessionId?: undefined;
|
|
401
|
+
errorMessage?: undefined;
|
|
402
|
+
errorCode?: undefined;
|
|
403
|
+
} | {
|
|
404
|
+
id: string;
|
|
405
|
+
organizationId: string;
|
|
406
|
+
agentId: string;
|
|
407
|
+
agentName: string;
|
|
408
|
+
userId: string;
|
|
409
|
+
input: {
|
|
410
|
+
message: string;
|
|
411
|
+
context?: undefined;
|
|
412
|
+
};
|
|
413
|
+
status: "FAILED";
|
|
414
|
+
errorMessage: string;
|
|
415
|
+
errorCode: string;
|
|
416
|
+
totalTokens: number;
|
|
417
|
+
promptTokens: number;
|
|
418
|
+
completionTokens: number;
|
|
419
|
+
totalIterations: number;
|
|
420
|
+
durationMs: number;
|
|
421
|
+
queuedAt: Date;
|
|
422
|
+
startedAt: Date;
|
|
423
|
+
completedAt: Date;
|
|
424
|
+
sessionId?: undefined;
|
|
425
|
+
output?: undefined;
|
|
426
|
+
estimatedCostUsd?: undefined;
|
|
427
|
+
})[];
|
|
428
|
+
declare const MOCK_RUN_STEPS: ({
|
|
429
|
+
id: string;
|
|
430
|
+
runId: string;
|
|
431
|
+
stepNumber: number;
|
|
432
|
+
type: "MESSAGE_CREATION";
|
|
433
|
+
input: {
|
|
434
|
+
message: string;
|
|
435
|
+
query?: undefined;
|
|
436
|
+
};
|
|
437
|
+
output: {
|
|
438
|
+
parsed: boolean;
|
|
439
|
+
results?: undefined;
|
|
440
|
+
response?: undefined;
|
|
441
|
+
};
|
|
442
|
+
status: "COMPLETED";
|
|
443
|
+
tokensUsed: number;
|
|
444
|
+
durationMs: number;
|
|
445
|
+
startedAt: Date;
|
|
446
|
+
completedAt: Date;
|
|
447
|
+
toolId?: undefined;
|
|
448
|
+
toolName?: undefined;
|
|
449
|
+
} | {
|
|
450
|
+
id: string;
|
|
451
|
+
runId: string;
|
|
452
|
+
stepNumber: number;
|
|
453
|
+
type: "TOOL_CALL";
|
|
454
|
+
toolId: string;
|
|
455
|
+
toolName: string;
|
|
456
|
+
input: {
|
|
457
|
+
query: string;
|
|
458
|
+
message?: undefined;
|
|
459
|
+
};
|
|
460
|
+
output: {
|
|
461
|
+
results: never[];
|
|
462
|
+
parsed?: undefined;
|
|
463
|
+
response?: undefined;
|
|
464
|
+
};
|
|
465
|
+
status: "COMPLETED";
|
|
466
|
+
tokensUsed: number;
|
|
467
|
+
durationMs: number;
|
|
468
|
+
startedAt: Date;
|
|
469
|
+
completedAt: Date;
|
|
470
|
+
} | {
|
|
471
|
+
id: string;
|
|
472
|
+
runId: string;
|
|
473
|
+
stepNumber: number;
|
|
474
|
+
type: "MESSAGE_CREATION";
|
|
475
|
+
output: {
|
|
476
|
+
response: string;
|
|
477
|
+
parsed?: undefined;
|
|
478
|
+
results?: undefined;
|
|
479
|
+
};
|
|
480
|
+
status: "COMPLETED";
|
|
481
|
+
tokensUsed: number;
|
|
482
|
+
durationMs: number;
|
|
483
|
+
startedAt: Date;
|
|
484
|
+
completedAt: Date;
|
|
485
|
+
input?: undefined;
|
|
486
|
+
toolId?: undefined;
|
|
487
|
+
toolName?: undefined;
|
|
488
|
+
})[];
|
|
489
|
+
declare const MOCK_RUN_LOGS: ({
|
|
490
|
+
id: string;
|
|
491
|
+
runId: string;
|
|
492
|
+
stepId: string;
|
|
493
|
+
level: "INFO";
|
|
494
|
+
message: string;
|
|
495
|
+
timestamp: Date;
|
|
496
|
+
source: string;
|
|
497
|
+
data?: undefined;
|
|
498
|
+
} | {
|
|
499
|
+
id: string;
|
|
500
|
+
runId: string;
|
|
501
|
+
stepId: string;
|
|
502
|
+
level: "DEBUG";
|
|
503
|
+
message: string;
|
|
504
|
+
data: {
|
|
505
|
+
toolId: string;
|
|
506
|
+
duration?: undefined;
|
|
507
|
+
};
|
|
508
|
+
timestamp: Date;
|
|
509
|
+
source: string;
|
|
510
|
+
} | {
|
|
511
|
+
id: string;
|
|
512
|
+
runId: string;
|
|
513
|
+
stepId: string;
|
|
514
|
+
level: "INFO";
|
|
515
|
+
message: string;
|
|
516
|
+
data: {
|
|
517
|
+
duration: number;
|
|
518
|
+
toolId?: undefined;
|
|
519
|
+
};
|
|
520
|
+
timestamp: Date;
|
|
521
|
+
source: string;
|
|
522
|
+
} | {
|
|
523
|
+
id: string;
|
|
524
|
+
runId: string;
|
|
525
|
+
level: "INFO";
|
|
526
|
+
message: string;
|
|
527
|
+
timestamp: Date;
|
|
528
|
+
source: string;
|
|
529
|
+
stepId?: undefined;
|
|
530
|
+
data?: undefined;
|
|
531
|
+
})[];
|
|
532
|
+
//#endregion
|
|
533
|
+
export { MOCK_AGENTS, MOCK_RUNS, MOCK_RUN_LOGS, MOCK_RUN_STEPS, MOCK_TOOLS };
|