@teneo-protocol/sdk 1.0.1 → 2.2.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/.eslintrc.json +11 -2
- package/.github/CODEOWNERS +2 -0
- package/.github/ISSUE_TEMPLATE/01-bug.yml +85 -0
- package/.github/ISSUE_TEMPLATE/config.yml +8 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +22 -0
- package/.github/workflows/claude-code-review.yml +8 -3
- package/.github/workflows/claude-reviewer.yml +6 -4
- package/.github/workflows/publish-npm.yml +9 -6
- package/.github/workflows/push-to-main.yml +1 -1
- package/.github/workflows/top-issue.yml +102 -0
- package/CHANGELOG.md +334 -0
- package/CONCEPTS.md +747 -0
- package/README.md +577 -54
- package/dist/constants.js +8 -8
- package/dist/constants.js.map +1 -1
- package/dist/core/websocket-client.d.ts +25 -1
- package/dist/core/websocket-client.d.ts.map +1 -1
- package/dist/core/websocket-client.js +74 -15
- package/dist/core/websocket-client.js.map +1 -1
- package/dist/formatters/response-formatter.js +4 -0
- package/dist/formatters/response-formatter.js.map +1 -1
- package/dist/handlers/message-handler-registry.js +2 -1
- package/dist/handlers/message-handler-registry.js.map +1 -1
- package/dist/handlers/message-handlers/agent-details-response-handler.d.ts +1666 -0
- package/dist/handlers/message-handlers/agent-details-response-handler.d.ts.map +1 -0
- package/dist/handlers/message-handlers/agent-details-response-handler.js +38 -0
- package/dist/handlers/message-handlers/agent-details-response-handler.js.map +1 -0
- package/dist/handlers/message-handlers/agent-room-operation-response-handler.d.ts +76 -0
- package/dist/handlers/message-handlers/agent-room-operation-response-handler.d.ts.map +1 -0
- package/dist/handlers/message-handlers/agent-room-operation-response-handler.js +67 -0
- package/dist/handlers/message-handlers/agent-room-operation-response-handler.js.map +1 -0
- package/dist/handlers/message-handlers/agent-selected-handler.d.ts +92 -38
- package/dist/handlers/message-handlers/agent-selected-handler.d.ts.map +1 -1
- package/dist/handlers/message-handlers/agent-selected-handler.js +2 -5
- package/dist/handlers/message-handlers/agent-selected-handler.js.map +1 -1
- package/dist/handlers/message-handlers/agent-status-update-handler.d.ts +1687 -0
- package/dist/handlers/message-handlers/agent-status-update-handler.d.ts.map +1 -0
- package/dist/handlers/message-handlers/agent-status-update-handler.js +48 -0
- package/dist/handlers/message-handlers/agent-status-update-handler.js.map +1 -0
- package/dist/handlers/message-handlers/agents-list-handler.js +2 -5
- package/dist/handlers/message-handlers/agents-list-handler.js.map +1 -1
- package/dist/handlers/message-handlers/all-agents-response-handler.d.ts +439 -0
- package/dist/handlers/message-handlers/all-agents-response-handler.d.ts.map +1 -0
- package/dist/handlers/message-handlers/all-agents-response-handler.js +36 -0
- package/dist/handlers/message-handlers/all-agents-response-handler.js.map +1 -0
- package/dist/handlers/message-handlers/auth-error-handler.d.ts +45 -31
- package/dist/handlers/message-handlers/auth-error-handler.d.ts.map +1 -1
- package/dist/handlers/message-handlers/auth-error-handler.js +2 -5
- package/dist/handlers/message-handlers/auth-error-handler.js.map +1 -1
- package/dist/handlers/message-handlers/auth-message-handler.d.ts +6 -0
- package/dist/handlers/message-handlers/auth-message-handler.d.ts.map +1 -1
- package/dist/handlers/message-handlers/auth-message-handler.js +71 -10
- package/dist/handlers/message-handlers/auth-message-handler.js.map +1 -1
- package/dist/handlers/message-handlers/auth-required-handler.d.ts +49 -31
- package/dist/handlers/message-handlers/auth-required-handler.d.ts.map +1 -1
- package/dist/handlers/message-handlers/auth-required-handler.js +2 -5
- package/dist/handlers/message-handlers/auth-required-handler.js.map +1 -1
- package/dist/handlers/message-handlers/auth-success-handler.d.ts +6 -0
- package/dist/handlers/message-handlers/auth-success-handler.d.ts.map +1 -1
- package/dist/handlers/message-handlers/auth-success-handler.js +52 -9
- package/dist/handlers/message-handlers/auth-success-handler.js.map +1 -1
- package/dist/handlers/message-handlers/base-handler.d.ts +4 -4
- package/dist/handlers/message-handlers/base-handler.d.ts.map +1 -1
- package/dist/handlers/message-handlers/base-handler.js +3 -1
- package/dist/handlers/message-handlers/base-handler.js.map +1 -1
- package/dist/handlers/message-handlers/challenge-handler.d.ts +45 -31
- package/dist/handlers/message-handlers/challenge-handler.d.ts.map +1 -1
- package/dist/handlers/message-handlers/challenge-handler.js +3 -2
- package/dist/handlers/message-handlers/challenge-handler.js.map +1 -1
- package/dist/handlers/message-handlers/error-message-handler.d.ts +49 -31
- package/dist/handlers/message-handlers/error-message-handler.d.ts.map +1 -1
- package/dist/handlers/message-handlers/error-message-handler.js +2 -5
- package/dist/handlers/message-handlers/error-message-handler.js.map +1 -1
- package/dist/handlers/message-handlers/index.d.ts +11 -0
- package/dist/handlers/message-handlers/index.d.ts.map +1 -1
- package/dist/handlers/message-handlers/index.js +55 -1
- package/dist/handlers/message-handlers/index.js.map +1 -1
- package/dist/handlers/message-handlers/list-available-agents-handler.d.ts +1660 -0
- package/dist/handlers/message-handlers/list-available-agents-handler.d.ts.map +1 -0
- package/dist/handlers/message-handlers/list-available-agents-handler.js +35 -0
- package/dist/handlers/message-handlers/list-available-agents-handler.js.map +1 -0
- package/dist/handlers/message-handlers/list-room-agents-handler.d.ts +1669 -0
- package/dist/handlers/message-handlers/list-room-agents-handler.d.ts.map +1 -0
- package/dist/handlers/message-handlers/list-room-agents-handler.js +48 -0
- package/dist/handlers/message-handlers/list-room-agents-handler.js.map +1 -0
- package/dist/handlers/message-handlers/list-rooms-response-handler.d.ts +2 -110
- package/dist/handlers/message-handlers/list-rooms-response-handler.d.ts.map +1 -1
- package/dist/handlers/message-handlers/list-rooms-response-handler.js +4 -6
- package/dist/handlers/message-handlers/list-rooms-response-handler.js.map +1 -1
- package/dist/handlers/message-handlers/ping-pong-handler.d.ts +62 -58
- package/dist/handlers/message-handlers/ping-pong-handler.d.ts.map +1 -1
- package/dist/handlers/message-handlers/ping-pong-handler.js +4 -10
- package/dist/handlers/message-handlers/ping-pong-handler.js.map +1 -1
- package/dist/handlers/message-handlers/rate-limit-notification-handler.d.ts +94 -0
- package/dist/handlers/message-handlers/rate-limit-notification-handler.d.ts.map +1 -0
- package/dist/handlers/message-handlers/rate-limit-notification-handler.js +35 -0
- package/dist/handlers/message-handlers/rate-limit-notification-handler.js.map +1 -0
- package/dist/handlers/message-handlers/regular-message-handler.d.ts +31 -29
- package/dist/handlers/message-handlers/regular-message-handler.d.ts.map +1 -1
- package/dist/handlers/message-handlers/regular-message-handler.js +4 -6
- package/dist/handlers/message-handlers/regular-message-handler.js.map +1 -1
- package/dist/handlers/message-handlers/room-operation-response-handler.d.ts +328 -0
- package/dist/handlers/message-handlers/room-operation-response-handler.d.ts.map +1 -0
- package/dist/handlers/message-handlers/room-operation-response-handler.js +89 -0
- package/dist/handlers/message-handlers/room-operation-response-handler.js.map +1 -0
- package/dist/handlers/message-handlers/subscribe-response-handler.d.ts +53 -31
- package/dist/handlers/message-handlers/subscribe-response-handler.d.ts.map +1 -1
- package/dist/handlers/message-handlers/subscribe-response-handler.js +4 -6
- package/dist/handlers/message-handlers/subscribe-response-handler.js.map +1 -1
- package/dist/handlers/message-handlers/task-quote-handler.d.ts +14 -0
- package/dist/handlers/message-handlers/task-quote-handler.d.ts.map +1 -0
- package/dist/handlers/message-handlers/task-quote-handler.js +29 -0
- package/dist/handlers/message-handlers/task-quote-handler.js.map +1 -0
- package/dist/handlers/message-handlers/task-response-handler.js +2 -5
- package/dist/handlers/message-handlers/task-response-handler.js.map +1 -1
- package/dist/handlers/message-handlers/types.d.ts +21 -7
- package/dist/handlers/message-handlers/types.d.ts.map +1 -1
- package/dist/handlers/message-handlers/unsubscribe-response-handler.d.ts +53 -31
- package/dist/handlers/message-handlers/unsubscribe-response-handler.d.ts.map +1 -1
- package/dist/handlers/message-handlers/unsubscribe-response-handler.js +4 -6
- package/dist/handlers/message-handlers/unsubscribe-response-handler.js.map +1 -1
- package/dist/handlers/message-handlers/user-authenticated-handler.d.ts +40 -0
- package/dist/handlers/message-handlers/user-authenticated-handler.d.ts.map +1 -0
- package/dist/handlers/message-handlers/user-authenticated-handler.js +28 -0
- package/dist/handlers/message-handlers/user-authenticated-handler.js.map +1 -0
- package/dist/handlers/message-handlers/user-count-handler.d.ts +49 -0
- package/dist/handlers/message-handlers/user-count-handler.d.ts.map +1 -0
- package/dist/handlers/message-handlers/user-count-handler.js +31 -0
- package/dist/handlers/message-handlers/user-count-handler.js.map +1 -0
- package/dist/handlers/webhook-handler.d.ts +1 -1
- package/dist/handlers/webhook-handler.d.ts.map +1 -1
- package/dist/handlers/webhook-handler.js +14 -5
- package/dist/handlers/webhook-handler.js.map +1 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +19 -2
- package/dist/index.js.map +1 -1
- package/dist/managers/admin-manager.d.ts +116 -0
- package/dist/managers/admin-manager.d.ts.map +1 -0
- package/dist/managers/admin-manager.js +169 -0
- package/dist/managers/admin-manager.js.map +1 -0
- package/dist/managers/agent-registry.d.ts +52 -1
- package/dist/managers/agent-registry.d.ts.map +1 -1
- package/dist/managers/agent-registry.js +145 -6
- package/dist/managers/agent-registry.js.map +1 -1
- package/dist/managers/agent-room-manager.d.ts +216 -0
- package/dist/managers/agent-room-manager.d.ts.map +1 -0
- package/dist/managers/agent-room-manager.js +555 -0
- package/dist/managers/agent-room-manager.js.map +1 -0
- package/dist/managers/connection-manager.js +2 -0
- package/dist/managers/connection-manager.js.map +1 -1
- package/dist/managers/index.d.ts +4 -1
- package/dist/managers/index.d.ts.map +1 -1
- package/dist/managers/index.js +7 -1
- package/dist/managers/index.js.map +1 -1
- package/dist/managers/message-router.d.ts +56 -5
- package/dist/managers/message-router.d.ts.map +1 -1
- package/dist/managers/message-router.js +155 -8
- package/dist/managers/message-router.js.map +1 -1
- package/dist/managers/room-management-manager.d.ts +213 -0
- package/dist/managers/room-management-manager.d.ts.map +1 -0
- package/dist/managers/room-management-manager.js +442 -0
- package/dist/managers/room-management-manager.js.map +1 -0
- package/dist/managers/room-manager.d.ts +11 -9
- package/dist/managers/room-manager.d.ts.map +1 -1
- package/dist/managers/room-manager.js +14 -10
- package/dist/managers/room-manager.js.map +1 -1
- package/dist/payments/index.d.ts +5 -0
- package/dist/payments/index.d.ts.map +1 -0
- package/dist/payments/index.js +21 -0
- package/dist/payments/index.js.map +1 -0
- package/dist/payments/payment-client.d.ts +74 -0
- package/dist/payments/payment-client.d.ts.map +1 -0
- package/dist/payments/payment-client.js +207 -0
- package/dist/payments/payment-client.js.map +1 -0
- package/dist/teneo-sdk.d.ts +467 -33
- package/dist/teneo-sdk.d.ts.map +1 -1
- package/dist/teneo-sdk.js +735 -26
- package/dist/teneo-sdk.js.map +1 -1
- package/dist/types/categories.d.ts +22 -0
- package/dist/types/categories.d.ts.map +1 -0
- package/dist/types/categories.js +40 -0
- package/dist/types/categories.js.map +1 -0
- package/dist/types/config.d.ts +134 -54
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/config.js +70 -9
- package/dist/types/config.js.map +1 -1
- package/dist/types/error-codes.d.ts +10 -0
- package/dist/types/error-codes.d.ts.map +1 -1
- package/dist/types/error-codes.js +12 -0
- package/dist/types/error-codes.js.map +1 -1
- package/dist/types/events.d.ts +176 -68
- package/dist/types/events.d.ts.map +1 -1
- package/dist/types/events.js +19 -1
- package/dist/types/events.js.map +1 -1
- package/dist/types/index.d.ts +3 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +57 -2
- package/dist/types/index.js.map +1 -1
- package/dist/types/messages.d.ts +22225 -2592
- package/dist/types/messages.d.ts.map +1 -1
- package/dist/types/messages.js +537 -28
- package/dist/types/messages.js.map +1 -1
- package/dist/utils/bounded-queue.d.ts.map +1 -1
- package/dist/utils/bounded-queue.js +5 -2
- package/dist/utils/bounded-queue.js.map +1 -1
- package/dist/utils/circuit-breaker.js +11 -4
- package/dist/utils/circuit-breaker.js.map +1 -1
- package/dist/utils/deduplication-cache.js +3 -1
- package/dist/utils/deduplication-cache.js.map +1 -1
- package/dist/utils/event-waiter.d.ts +3 -3
- package/dist/utils/event-waiter.d.ts.map +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +4 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/pricing-resolver.d.ts +26 -0
- package/dist/utils/pricing-resolver.d.ts.map +1 -0
- package/dist/utils/pricing-resolver.js +85 -0
- package/dist/utils/pricing-resolver.js.map +1 -0
- package/dist/utils/rate-limiter.d.ts.map +1 -1
- package/dist/utils/rate-limiter.js +6 -0
- package/dist/utils/rate-limiter.js.map +1 -1
- package/dist/utils/retry-policy.js +1 -0
- package/dist/utils/retry-policy.js.map +1 -1
- package/dist/utils/secure-private-key.js +3 -1
- package/dist/utils/secure-private-key.js.map +1 -1
- package/dist/utils/signature-verifier.d.ts.map +1 -1
- package/dist/utils/signature-verifier.js +3 -1
- package/dist/utils/signature-verifier.js.map +1 -1
- package/examples/.env.example +2 -2
- package/examples/agent-room-management-example.ts +335 -0
- package/examples/basic-usage.ts +3 -4
- package/examples/claude-agent-x-follower/.env.example +3 -3
- package/examples/claude-agent-x-follower/QUICKSTART.md +3 -3
- package/examples/claude-agent-x-follower/README.md +3 -3
- package/examples/claude-agent-x-follower/index.ts +120 -96
- package/examples/n8n-teneo/.env.example +3 -3
- package/examples/n8n-teneo/README.md +2 -2
- package/examples/n8n-teneo/index.ts +54 -44
- package/examples/nestjs-dashboard/.env.example +11 -0
- package/examples/nestjs-dashboard/README.md +297 -0
- package/examples/nestjs-dashboard/nest-cli.json +10 -0
- package/examples/nestjs-dashboard/package.json +44 -0
- package/examples/nestjs-dashboard/pnpm-lock.yaml +3079 -0
- package/examples/nestjs-dashboard/src/app.controller.ts +24 -0
- package/examples/nestjs-dashboard/src/app.module.ts +15 -0
- package/examples/nestjs-dashboard/src/main.ts +32 -0
- package/examples/nestjs-dashboard/src/public/dashboard.html +1144 -0
- package/examples/nestjs-dashboard/src/teneo/agents.controller.ts +54 -0
- package/examples/nestjs-dashboard/src/teneo/events.controller.ts +65 -0
- package/examples/nestjs-dashboard/src/teneo/messages.controller.ts +47 -0
- package/examples/nestjs-dashboard/src/teneo/rooms.controller.ts +258 -0
- package/examples/nestjs-dashboard/src/teneo/teneo.module.ts +13 -0
- package/examples/nestjs-dashboard/src/teneo/teneo.service.ts +484 -0
- package/examples/nestjs-dashboard/tsconfig.json +22 -0
- package/examples/openai-teneo/.env.example +3 -3
- package/examples/openai-teneo/README.md +3 -3
- package/examples/openai-teneo/index.ts +82 -71
- package/examples/production-dashboard/.env.example +3 -3
- package/examples/production-dashboard/README.md +90 -13
- package/examples/production-dashboard/public/dashboard.html +1173 -601
- package/examples/production-dashboard/server.ts +349 -7
- package/examples/room-management-example.ts +282 -0
- package/examples/usage/.env.example +2 -2
- package/examples/usage/01-connect.ts +3 -4
- package/examples/usage/02-list-agents.ts +2 -3
- package/examples/usage/03-pick-agent.ts +2 -3
- package/examples/usage/04-find-by-capability.ts +2 -3
- package/examples/usage/05-webhook-example.ts +2 -3
- package/examples/usage/06-simple-api-server.ts +2 -3
- package/examples/usage/07-event-listener.ts +2 -3
- package/examples/usage/README.md +1 -1
- package/examples/webhook-integration.ts +1 -1
- package/examples/x-influencer-battle-server.ts +2 -2
- package/package.json +12 -1
- package/src/core/websocket-client.test.ts +8 -3
- package/src/core/websocket-client.ts +58 -4
- package/src/formatters/response-formatter.test.ts +2 -0
- package/src/formatters/response-formatter.ts +3 -3
- package/src/handlers/message-handlers/agent-details-response-handler.ts +42 -0
- package/src/handlers/message-handlers/agent-room-operation-response-handler.ts +77 -0
- package/src/handlers/message-handlers/agent-status-update-handler.ts +52 -0
- package/src/handlers/message-handlers/all-agents-response-handler.ts +39 -0
- package/src/handlers/message-handlers/auth-message-handler.ts +78 -5
- package/src/handlers/message-handlers/auth-success-handler.ts +63 -6
- package/src/handlers/message-handlers/base-handler.ts +20 -7
- package/src/handlers/message-handlers/index.ts +53 -0
- package/src/handlers/message-handlers/list-available-agents-handler.ts +41 -0
- package/src/handlers/message-handlers/list-room-agents-handler.ts +58 -0
- package/src/handlers/message-handlers/list-rooms-response-handler.ts +4 -2
- package/src/handlers/message-handlers/rate-limit-notification-handler.ts +45 -0
- package/src/handlers/message-handlers/regular-message-handler.ts +3 -2
- package/src/handlers/message-handlers/room-operation-response-handler.ts +102 -0
- package/src/handlers/message-handlers/subscribe-response-handler.ts +12 -2
- package/src/handlers/message-handlers/task-quote-handler.ts +31 -0
- package/src/handlers/message-handlers/types.ts +41 -7
- package/src/handlers/message-handlers/unsubscribe-response-handler.ts +12 -2
- package/src/handlers/message-handlers/user-authenticated-handler.ts +31 -0
- package/src/handlers/message-handlers/user-count-handler.ts +34 -0
- package/src/handlers/webhook-handler.test.ts +3 -2
- package/src/handlers/webhook-handler.ts +13 -7
- package/src/index.ts +21 -0
- package/src/managers/admin-manager.ts +249 -0
- package/src/managers/agent-registry.test.ts +2 -1
- package/src/managers/agent-registry.ts +170 -2
- package/src/managers/agent-room-manager.ts +665 -0
- package/src/managers/index.ts +15 -1
- package/src/managers/message-router.ts +215 -17
- package/src/managers/room-management-manager.ts +520 -0
- package/src/managers/room-manager.ts +15 -20
- package/src/payments/index.ts +22 -0
- package/src/payments/payment-client.ts +240 -0
- package/src/teneo-sdk.ts +806 -30
- package/src/types/categories.ts +45 -0
- package/src/types/config.ts +80 -7
- package/src/types/error-codes.ts +14 -0
- package/src/types/events.test.ts +1 -0
- package/src/types/events.ts +67 -0
- package/src/types/index.ts +111 -0
- package/src/types/messages.test.ts +2 -1
- package/src/types/messages.ts +677 -42
- package/src/utils/bounded-queue.test.ts +1 -1
- package/src/utils/bounded-queue.ts +2 -1
- package/src/utils/circuit-breaker.test.ts +1 -1
- package/src/utils/deduplication-cache.test.ts +1 -1
- package/src/utils/event-waiter.test.ts +1 -1
- package/src/utils/event-waiter.ts +3 -3
- package/src/utils/index.ts +7 -0
- package/src/utils/logger.ts +8 -8
- package/src/utils/pricing-resolver.ts +128 -0
- package/src/utils/rate-limiter.test.ts +1 -1
- package/src/utils/rate-limiter.ts +1 -0
- package/src/utils/signature-verifier.test.ts +2 -2
- package/src/utils/signature-verifier.ts +3 -2
- package/tests/.env.example +7 -0
- package/tests/direct-agent-test.ts +151 -0
- package/tests/integration/real-server.test.ts +2 -0
- package/tests/integration/room-management.test.ts +516 -0
- package/tests/integration/websocket.test.ts +5 -2
- package/tests/payment-flow-test.ts +147 -0
- package/tests/unit/handlers/agent-room-operation-response-handler.test.ts +382 -0
- package/tests/unit/handlers/agent-status-update-handler.test.ts +403 -0
- package/tests/unit/handlers/auth-success-handler-rooms.test.ts +697 -0
- package/tests/unit/handlers/list-available-agents-handler.test.ts +248 -0
- package/tests/unit/handlers/list-room-agents-handler.test.ts +290 -0
- package/tests/unit/handlers/room-operation-response-handler.test.ts +500 -0
- package/tests/unit/managers/agent-room-manager.test.ts +527 -0
- package/tests/unit/managers/room-management-manager.test.ts +420 -0
- package/tsconfig.json +2 -2
- package/vitest.config.ts +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-details-response-handler.d.ts","sourceRoot":"","sources":["../../../src/handlers/message-handlers/agent-details-response-handler.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,2BAA2B,EAAqC,MAAM,aAAa,CAAC;AAC7F,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,qBAAa,2BAA4B,SAAQ,kBAAkB,CAAC,2BAA2B,CAAC;IAC9F,QAAQ,CAAC,IAAI,EAAG,wBAAwB,CAAU;IAClD,QAAQ,CAAC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iDAAqC;IAEpD,SAAS,CAAC,eAAe,CAAC,OAAO,EAAE,2BAA2B,EAAE,OAAO,EAAE,cAAc,GAAG,IAAI;CA4B/F"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Handler for agent_details_response messages
|
|
4
|
+
* Processes detailed agent information from the server
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.AgentDetailsResponseHandler = void 0;
|
|
8
|
+
const types_1 = require("../../types");
|
|
9
|
+
const base_handler_1 = require("./base-handler");
|
|
10
|
+
class AgentDetailsResponseHandler extends base_handler_1.BaseMessageHandler {
|
|
11
|
+
type = "agent_details_response";
|
|
12
|
+
schema = types_1.AgentDetailsResponseMessageSchema;
|
|
13
|
+
handleValidated(message, context) {
|
|
14
|
+
if (!message.data?.agent) {
|
|
15
|
+
context.logger.warn("Received agent_details_response without agent data");
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
const { agent } = message.data;
|
|
19
|
+
context.logger.debug("Handling agent_details_response", {
|
|
20
|
+
agentId: agent.agent_id,
|
|
21
|
+
agentName: agent.agent_name
|
|
22
|
+
});
|
|
23
|
+
// Delegate to agent registry if available
|
|
24
|
+
const agentRegistry = context.agentRegistry;
|
|
25
|
+
if (agentRegistry && typeof agentRegistry.handleAgentDetails === "function") {
|
|
26
|
+
agentRegistry.handleAgentDetails(agent);
|
|
27
|
+
}
|
|
28
|
+
context.logger.info("Agent details received", {
|
|
29
|
+
agentId: agent.agent_id,
|
|
30
|
+
agentName: agent.agent_name,
|
|
31
|
+
status: agent.status
|
|
32
|
+
});
|
|
33
|
+
// Send webhook
|
|
34
|
+
this.sendWebhook(context, "agent_details_response", { agent });
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.AgentDetailsResponseHandler = AgentDetailsResponseHandler;
|
|
38
|
+
//# sourceMappingURL=agent-details-response-handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-details-response-handler.js","sourceRoot":"","sources":["../../../src/handlers/message-handlers/agent-details-response-handler.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,uCAA6F;AAC7F,iDAAoD;AAGpD,MAAa,2BAA4B,SAAQ,iCAA+C;IACrF,IAAI,GAAG,wBAAiC,CAAC;IACzC,MAAM,GAAG,yCAAiC,CAAC;IAE1C,eAAe,CAAC,OAAoC,EAAE,OAAuB;QACrF,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC;YACzB,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,oDAAoD,CAAC,CAAC;YAC1E,OAAO;QACT,CAAC;QAED,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;QAE/B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,iCAAiC,EAAE;YACtD,OAAO,EAAE,KAAK,CAAC,QAAQ;YACvB,SAAS,EAAE,KAAK,CAAC,UAAU;SAC5B,CAAC,CAAC;QAEH,0CAA0C;QAC1C,MAAM,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC;QAC5C,IAAI,aAAa,IAAI,OAAO,aAAa,CAAC,kBAAkB,KAAK,UAAU,EAAE,CAAC;YAC5E,aAAa,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;QAC1C,CAAC;QAED,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,wBAAwB,EAAE;YAC5C,OAAO,EAAE,KAAK,CAAC,QAAQ;YACvB,SAAS,EAAE,KAAK,CAAC,UAAU;YAC3B,MAAM,EAAE,KAAK,CAAC,MAAM;SACrB,CAAC,CAAC;QAEH,eAAe;QACf,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,wBAAwB,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;IACjE,CAAC;CACF;AAhCD,kEAgCC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Handler for agent_room_operation_response messages (v2.0.0)
|
|
3
|
+
* Processes responses from agent-room operations (add, remove)
|
|
4
|
+
*/
|
|
5
|
+
import { AgentRoomOperationResponse } from "../../types";
|
|
6
|
+
import { BaseMessageHandler } from "./base-handler";
|
|
7
|
+
import { HandlerContext } from "./types";
|
|
8
|
+
export declare class AgentRoomOperationResponseHandler extends BaseMessageHandler<AgentRoomOperationResponse> {
|
|
9
|
+
readonly type: "agent_room_operation_response";
|
|
10
|
+
readonly schema: import("zod").ZodObject<{
|
|
11
|
+
type: import("zod").ZodLiteral<"agent_room_operation_response">;
|
|
12
|
+
data: import("zod").ZodObject<{
|
|
13
|
+
success: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
14
|
+
message: import("zod").ZodOptional<import("zod").ZodString>;
|
|
15
|
+
room_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
16
|
+
agent_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
17
|
+
agent_count: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
18
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
19
|
+
success: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
20
|
+
message: import("zod").ZodOptional<import("zod").ZodString>;
|
|
21
|
+
room_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
22
|
+
agent_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
23
|
+
agent_count: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
24
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
25
|
+
success: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
26
|
+
message: import("zod").ZodOptional<import("zod").ZodString>;
|
|
27
|
+
room_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
28
|
+
agent_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
29
|
+
agent_count: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
30
|
+
}, import("zod").ZodTypeAny, "passthrough">>;
|
|
31
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
32
|
+
type: import("zod").ZodLiteral<"agent_room_operation_response">;
|
|
33
|
+
data: import("zod").ZodObject<{
|
|
34
|
+
success: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
35
|
+
message: import("zod").ZodOptional<import("zod").ZodString>;
|
|
36
|
+
room_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
37
|
+
agent_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
38
|
+
agent_count: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
39
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
40
|
+
success: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
41
|
+
message: import("zod").ZodOptional<import("zod").ZodString>;
|
|
42
|
+
room_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
43
|
+
agent_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
44
|
+
agent_count: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
45
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
46
|
+
success: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
47
|
+
message: import("zod").ZodOptional<import("zod").ZodString>;
|
|
48
|
+
room_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
49
|
+
agent_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
50
|
+
agent_count: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
51
|
+
}, import("zod").ZodTypeAny, "passthrough">>;
|
|
52
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
53
|
+
type: import("zod").ZodLiteral<"agent_room_operation_response">;
|
|
54
|
+
data: import("zod").ZodObject<{
|
|
55
|
+
success: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
56
|
+
message: import("zod").ZodOptional<import("zod").ZodString>;
|
|
57
|
+
room_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
58
|
+
agent_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
59
|
+
agent_count: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
60
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
61
|
+
success: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
62
|
+
message: import("zod").ZodOptional<import("zod").ZodString>;
|
|
63
|
+
room_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
64
|
+
agent_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
65
|
+
agent_count: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
66
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
67
|
+
success: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
68
|
+
message: import("zod").ZodOptional<import("zod").ZodString>;
|
|
69
|
+
room_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
70
|
+
agent_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
71
|
+
agent_count: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
72
|
+
}, import("zod").ZodTypeAny, "passthrough">>;
|
|
73
|
+
}, import("zod").ZodTypeAny, "passthrough">>;
|
|
74
|
+
protected handleValidated(message: AgentRoomOperationResponse, context: HandlerContext): void;
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=agent-room-operation-response-handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-room-operation-response-handler.d.ts","sourceRoot":"","sources":["../../../src/handlers/message-handlers/agent-room-operation-response-handler.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,0BAA0B,EAAoC,MAAM,aAAa,CAAC;AAC3F,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAIzC,qBAAa,iCAAkC,SAAQ,kBAAkB,CAAC,0BAA0B,CAAC;IACnG,QAAQ,CAAC,IAAI,EAAG,+BAA+B,CAAU;IACzD,QAAQ,CAAC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iDAAoC;IAEnD,SAAS,CAAC,eAAe,CAAC,OAAO,EAAE,0BAA0B,EAAE,OAAO,EAAE,cAAc,GAAG,IAAI;CA6D9F"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Handler for agent_room_operation_response messages (v2.0.0)
|
|
4
|
+
* Processes responses from agent-room operations (add, remove)
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.AgentRoomOperationResponseHandler = void 0;
|
|
8
|
+
const types_1 = require("../../types");
|
|
9
|
+
const base_handler_1 = require("./base-handler");
|
|
10
|
+
const events_1 = require("../../types/events");
|
|
11
|
+
const error_codes_1 = require("../../types/error-codes");
|
|
12
|
+
class AgentRoomOperationResponseHandler extends base_handler_1.BaseMessageHandler {
|
|
13
|
+
type = "agent_room_operation_response";
|
|
14
|
+
schema = types_1.AgentRoomOperationResponseSchema;
|
|
15
|
+
handleValidated(message, context) {
|
|
16
|
+
const { success, message: errorMessage, room_id, agent_id } = message.data;
|
|
17
|
+
context.logger.debug("Handling agent_room_operation_response", {
|
|
18
|
+
success,
|
|
19
|
+
roomId: room_id,
|
|
20
|
+
agentId: agent_id
|
|
21
|
+
});
|
|
22
|
+
if (!success) {
|
|
23
|
+
// Operation failed - emit error events
|
|
24
|
+
const error = new events_1.SDKError(errorMessage || "Agent room operation failed", error_codes_1.ErrorCode.OPERATION_FAILED);
|
|
25
|
+
context.logger.error("Agent room operation failed", {
|
|
26
|
+
roomId: room_id,
|
|
27
|
+
agentId: agent_id,
|
|
28
|
+
error: errorMessage
|
|
29
|
+
});
|
|
30
|
+
// Emit both add and remove error events - listeners will filter by room/agent ID
|
|
31
|
+
this.emit(context, "agent_room:add_error", error, room_id);
|
|
32
|
+
this.emit(context, "agent_room:remove_error", error, room_id);
|
|
33
|
+
// Send webhook
|
|
34
|
+
this.sendWebhook(context, "agent_room_operation_error", {
|
|
35
|
+
success: false,
|
|
36
|
+
message: errorMessage,
|
|
37
|
+
room_id,
|
|
38
|
+
agent_id
|
|
39
|
+
});
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
// Operation succeeded
|
|
43
|
+
if (room_id && agent_id) {
|
|
44
|
+
context.logger.info("Agent room operation succeeded", {
|
|
45
|
+
roomId: room_id,
|
|
46
|
+
agentId: agent_id
|
|
47
|
+
});
|
|
48
|
+
// Emit success events
|
|
49
|
+
// The promise handlers in AgentRoomManager will filter by room_id and agent_id
|
|
50
|
+
this.emit(context, "agent_room:agent_added", room_id, agent_id);
|
|
51
|
+
this.emit(context, "agent_room:agent_removed", room_id, agent_id);
|
|
52
|
+
// Send webhook
|
|
53
|
+
this.sendWebhook(context, "agent_room_operation", {
|
|
54
|
+
success: true,
|
|
55
|
+
room_id,
|
|
56
|
+
agent_id,
|
|
57
|
+
message: "Agent room operation completed successfully"
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
// Unexpected: success but missing required fields
|
|
62
|
+
context.logger.warn("Agent room operation succeeded but missing room_id or agent_id");
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
exports.AgentRoomOperationResponseHandler = AgentRoomOperationResponseHandler;
|
|
67
|
+
//# sourceMappingURL=agent-room-operation-response-handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-room-operation-response-handler.js","sourceRoot":"","sources":["../../../src/handlers/message-handlers/agent-room-operation-response-handler.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,uCAA2F;AAC3F,iDAAoD;AAEpD,+CAA8C;AAC9C,yDAAoD;AAEpD,MAAa,iCAAkC,SAAQ,iCAA8C;IAC1F,IAAI,GAAG,+BAAwC,CAAC;IAChD,MAAM,GAAG,wCAAgC,CAAC;IAEzC,eAAe,CAAC,OAAmC,EAAE,OAAuB;QACpF,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;QAE3E,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,wCAAwC,EAAE;YAC7D,OAAO;YACP,MAAM,EAAE,OAAO;YACf,OAAO,EAAE,QAAQ;SAClB,CAAC,CAAC;QAEH,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,uCAAuC;YACvC,MAAM,KAAK,GAAG,IAAI,iBAAQ,CACxB,YAAY,IAAI,6BAA6B,EAC7C,uBAAS,CAAC,gBAAgB,CAC3B,CAAC;YAEF,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,6BAA6B,EAAE;gBAClD,MAAM,EAAE,OAAO;gBACf,OAAO,EAAE,QAAQ;gBACjB,KAAK,EAAE,YAAY;aACpB,CAAC,CAAC;YAEH,iFAAiF;YACjF,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,sBAAsB,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;YAC3D,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,yBAAyB,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;YAE9D,eAAe;YACf,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,4BAA4B,EAAE;gBACtD,OAAO,EAAE,KAAK;gBACd,OAAO,EAAE,YAAY;gBACrB,OAAO;gBACP,QAAQ;aACT,CAAC,CAAC;YAEH,OAAO;QACT,CAAC;QAED,sBAAsB;QACtB,IAAI,OAAO,IAAI,QAAQ,EAAE,CAAC;YACxB,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,gCAAgC,EAAE;gBACpD,MAAM,EAAE,OAAO;gBACf,OAAO,EAAE,QAAQ;aAClB,CAAC,CAAC;YAEH,sBAAsB;YACtB,+EAA+E;YAC/E,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,wBAAwB,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;YAChE,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,0BAA0B,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;YAElE,eAAe;YACf,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,sBAAsB,EAAE;gBAChD,OAAO,EAAE,IAAI;gBACb,OAAO;gBACP,QAAQ;gBACR,OAAO,EAAE,6CAA6C;aACvD,CAAC,CAAC;QACL,CAAC;aAAM,CAAC;YACN,kDAAkD;YAClD,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,gEAAgE,CAAC,CAAC;QACxF,CAAC;IACH,CAAC;CACF;AAjED,8EAiEC"}
|
|
@@ -26,13 +26,13 @@ export declare class AgentSelectedHandler extends BaseMessageHandler<AgentSelect
|
|
|
26
26
|
agent_name: import("zod").ZodString;
|
|
27
27
|
capabilities: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
28
28
|
name: import("zod").ZodString;
|
|
29
|
-
description: import("zod").ZodString
|
|
29
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
30
30
|
}, "strip", import("zod").ZodTypeAny, {
|
|
31
31
|
name: string;
|
|
32
|
-
description
|
|
32
|
+
description?: string | undefined;
|
|
33
33
|
}, {
|
|
34
34
|
name: string;
|
|
35
|
-
description
|
|
35
|
+
description?: string | undefined;
|
|
36
36
|
}>, "many">>;
|
|
37
37
|
user_request: import("zod").ZodString;
|
|
38
38
|
command: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -43,7 +43,7 @@ export declare class AgentSelectedHandler extends BaseMessageHandler<AgentSelect
|
|
|
43
43
|
user_request: string;
|
|
44
44
|
capabilities?: {
|
|
45
45
|
name: string;
|
|
46
|
-
description
|
|
46
|
+
description?: string | undefined;
|
|
47
47
|
}[] | undefined;
|
|
48
48
|
command?: string | undefined;
|
|
49
49
|
command_reasoning?: string | undefined;
|
|
@@ -53,60 +53,114 @@ export declare class AgentSelectedHandler extends BaseMessageHandler<AgentSelect
|
|
|
53
53
|
user_request: string;
|
|
54
54
|
capabilities?: {
|
|
55
55
|
name: string;
|
|
56
|
-
description
|
|
56
|
+
description?: string | undefined;
|
|
57
57
|
}[] | undefined;
|
|
58
58
|
command?: string | undefined;
|
|
59
59
|
command_reasoning?: string | undefined;
|
|
60
60
|
}>;
|
|
61
|
-
}, "
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
62
|
+
content_type: import("zod").ZodOptional<import("zod").ZodEnum<["text/plain", "text/markdown", "text/html", "application/json", "image/*", "STRING", "JSON", "MD", "ARRAY"]>>;
|
|
63
|
+
to: import("zod").ZodOptional<import("zod").ZodString>;
|
|
64
|
+
room: import("zod").ZodOptional<import("zod").ZodString>;
|
|
65
|
+
timestamp: import("zod").ZodOptional<import("zod").ZodString>;
|
|
66
|
+
signature: import("zod").ZodOptional<import("zod").ZodString>;
|
|
67
|
+
publicKey: import("zod").ZodOptional<import("zod").ZodString>;
|
|
68
|
+
task_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
69
|
+
id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
70
|
+
} & {
|
|
71
|
+
type: import("zod").ZodLiteral<"agent_selected">;
|
|
72
|
+
content: import("zod").ZodString;
|
|
73
|
+
from: import("zod").ZodLiteral<"coordinator">;
|
|
74
|
+
reasoning: import("zod").ZodString;
|
|
75
|
+
data: import("zod").ZodObject<{
|
|
76
|
+
agent_id: import("zod").ZodString;
|
|
77
|
+
agent_name: import("zod").ZodString;
|
|
78
|
+
capabilities: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
79
|
+
name: import("zod").ZodString;
|
|
80
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
81
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
82
|
+
name: string;
|
|
83
|
+
description?: string | undefined;
|
|
84
|
+
}, {
|
|
85
|
+
name: string;
|
|
86
|
+
description?: string | undefined;
|
|
87
|
+
}>, "many">>;
|
|
88
|
+
user_request: import("zod").ZodString;
|
|
89
|
+
command: import("zod").ZodOptional<import("zod").ZodString>;
|
|
90
|
+
command_reasoning: import("zod").ZodOptional<import("zod").ZodString>;
|
|
91
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
92
|
+
agent_id: string;
|
|
93
|
+
agent_name: string;
|
|
94
|
+
user_request: string;
|
|
95
|
+
capabilities?: {
|
|
96
|
+
name: string;
|
|
97
|
+
description?: string | undefined;
|
|
98
|
+
}[] | undefined;
|
|
99
|
+
command?: string | undefined;
|
|
100
|
+
command_reasoning?: string | undefined;
|
|
101
|
+
}, {
|
|
102
|
+
agent_id: string;
|
|
103
|
+
agent_name: string;
|
|
104
|
+
user_request: string;
|
|
105
|
+
capabilities?: {
|
|
106
|
+
name: string;
|
|
107
|
+
description?: string | undefined;
|
|
108
|
+
}[] | undefined;
|
|
109
|
+
command?: string | undefined;
|
|
110
|
+
command_reasoning?: string | undefined;
|
|
111
|
+
}>;
|
|
112
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
113
|
+
content_type: import("zod").ZodOptional<import("zod").ZodEnum<["text/plain", "text/markdown", "text/html", "application/json", "image/*", "STRING", "JSON", "MD", "ARRAY"]>>;
|
|
114
|
+
to: import("zod").ZodOptional<import("zod").ZodString>;
|
|
115
|
+
room: import("zod").ZodOptional<import("zod").ZodString>;
|
|
116
|
+
timestamp: import("zod").ZodOptional<import("zod").ZodString>;
|
|
117
|
+
signature: import("zod").ZodOptional<import("zod").ZodString>;
|
|
118
|
+
publicKey: import("zod").ZodOptional<import("zod").ZodString>;
|
|
119
|
+
task_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
120
|
+
id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
121
|
+
} & {
|
|
122
|
+
type: import("zod").ZodLiteral<"agent_selected">;
|
|
123
|
+
content: import("zod").ZodString;
|
|
124
|
+
from: import("zod").ZodLiteral<"coordinator">;
|
|
125
|
+
reasoning: import("zod").ZodString;
|
|
126
|
+
data: import("zod").ZodObject<{
|
|
127
|
+
agent_id: import("zod").ZodString;
|
|
128
|
+
agent_name: import("zod").ZodString;
|
|
129
|
+
capabilities: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
130
|
+
name: import("zod").ZodString;
|
|
131
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
132
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
133
|
+
name: string;
|
|
134
|
+
description?: string | undefined;
|
|
135
|
+
}, {
|
|
136
|
+
name: string;
|
|
137
|
+
description?: string | undefined;
|
|
138
|
+
}>, "many">>;
|
|
139
|
+
user_request: import("zod").ZodString;
|
|
140
|
+
command: import("zod").ZodOptional<import("zod").ZodString>;
|
|
141
|
+
command_reasoning: import("zod").ZodOptional<import("zod").ZodString>;
|
|
142
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
66
143
|
agent_id: string;
|
|
67
144
|
agent_name: string;
|
|
68
145
|
user_request: string;
|
|
69
146
|
capabilities?: {
|
|
70
147
|
name: string;
|
|
71
|
-
description
|
|
148
|
+
description?: string | undefined;
|
|
72
149
|
}[] | undefined;
|
|
73
150
|
command?: string | undefined;
|
|
74
151
|
command_reasoning?: string | undefined;
|
|
75
|
-
}
|
|
76
|
-
reasoning: string;
|
|
77
|
-
id?: string | undefined;
|
|
78
|
-
room?: string | undefined;
|
|
79
|
-
content_type?: "text/plain" | "text/markdown" | "text/html" | "application/json" | "image/*" | "STRING" | "JSON" | "MD" | "ARRAY" | undefined;
|
|
80
|
-
to?: string | undefined;
|
|
81
|
-
timestamp?: string | undefined;
|
|
82
|
-
signature?: string | undefined;
|
|
83
|
-
publicKey?: string | undefined;
|
|
84
|
-
task_id?: string | undefined;
|
|
85
|
-
}, {
|
|
86
|
-
type: "agent_selected";
|
|
87
|
-
content: string;
|
|
88
|
-
from: "coordinator";
|
|
89
|
-
data: {
|
|
152
|
+
}, {
|
|
90
153
|
agent_id: string;
|
|
91
154
|
agent_name: string;
|
|
92
155
|
user_request: string;
|
|
93
156
|
capabilities?: {
|
|
94
157
|
name: string;
|
|
95
|
-
description
|
|
158
|
+
description?: string | undefined;
|
|
96
159
|
}[] | undefined;
|
|
97
160
|
command?: string | undefined;
|
|
98
161
|
command_reasoning?: string | undefined;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
id?: string | undefined;
|
|
102
|
-
room?: string | undefined;
|
|
103
|
-
content_type?: "text/plain" | "text/markdown" | "text/html" | "application/json" | "image/*" | "STRING" | "JSON" | "MD" | "ARRAY" | undefined;
|
|
104
|
-
to?: string | undefined;
|
|
105
|
-
timestamp?: string | undefined;
|
|
106
|
-
signature?: string | undefined;
|
|
107
|
-
publicKey?: string | undefined;
|
|
108
|
-
task_id?: string | undefined;
|
|
109
|
-
}>;
|
|
162
|
+
}>;
|
|
163
|
+
}, import("zod").ZodTypeAny, "passthrough">>;
|
|
110
164
|
protected handleValidated(message: AgentSelectedMessage, context: HandlerContext): void;
|
|
111
165
|
}
|
|
112
166
|
//# sourceMappingURL=agent-selected-handler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-selected-handler.d.ts","sourceRoot":"","sources":["../../../src/handlers/message-handlers/agent-selected-handler.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,oBAAoB,EAA8B,MAAM,aAAa,CAAC;AAE/E,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,qBAAa,oBAAqB,SAAQ,kBAAkB,CAAC,oBAAoB,CAAC;IAChF,QAAQ,CAAC,IAAI,EAAG,gBAAgB,CAAU;IAC1C,QAAQ,CAAC,MAAM
|
|
1
|
+
{"version":3,"file":"agent-selected-handler.d.ts","sourceRoot":"","sources":["../../../src/handlers/message-handlers/agent-selected-handler.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,oBAAoB,EAA8B,MAAM,aAAa,CAAC;AAE/E,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,qBAAa,oBAAqB,SAAQ,kBAAkB,CAAC,oBAAoB,CAAC;IAChF,QAAQ,CAAC,IAAI,EAAG,gBAAgB,CAAU;IAC1C,QAAQ,CAAC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iDAA8B;IAE7C,SAAS,CAAC,eAAe,CAAC,OAAO,EAAE,oBAAoB,EAAE,OAAO,EAAE,cAAc,GAAG,IAAI;CAyBxF"}
|
|
@@ -8,11 +8,8 @@ exports.AgentSelectedHandler = void 0;
|
|
|
8
8
|
const types_1 = require("../../types");
|
|
9
9
|
const base_handler_1 = require("./base-handler");
|
|
10
10
|
class AgentSelectedHandler extends base_handler_1.BaseMessageHandler {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
this.type = "agent_selected";
|
|
14
|
-
this.schema = types_1.AgentSelectedMessageSchema;
|
|
15
|
-
}
|
|
11
|
+
type = "agent_selected";
|
|
12
|
+
schema = types_1.AgentSelectedMessageSchema;
|
|
16
13
|
handleValidated(message, context) {
|
|
17
14
|
context.logger.debug("Handling agent_selected message", {
|
|
18
15
|
agentId: message.data.agent_id,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-selected-handler.js","sourceRoot":"","sources":["../../../src/handlers/message-handlers/agent-selected-handler.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,uCAA+E;AAE/E,iDAAoD;AAGpD,MAAa,oBAAqB,SAAQ,iCAAwC;
|
|
1
|
+
{"version":3,"file":"agent-selected-handler.js","sourceRoot":"","sources":["../../../src/handlers/message-handlers/agent-selected-handler.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,uCAA+E;AAE/E,iDAAoD;AAGpD,MAAa,oBAAqB,SAAQ,iCAAwC;IACvE,IAAI,GAAG,gBAAyB,CAAC;IACjC,MAAM,GAAG,kCAA0B,CAAC;IAEnC,eAAe,CAAC,OAA6B,EAAE,OAAuB;QAC9E,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,iCAAiC,EAAE;YACtD,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,QAAQ;YAC9B,SAAS,EAAE,OAAO,CAAC,IAAI,CAAC,UAAU;SACnC,CAAC,CAAC;QAEH,4BAA4B;QAC5B,MAAM,IAAI,GAAsB;YAC9B,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,QAAQ;YAC9B,SAAS,EAAE,OAAO,CAAC,IAAI,CAAC,UAAU;YAClC,SAAS,EAAE,OAAO,CAAC,SAAS,IAAI,EAAE;YAClC,WAAW,EAAE,OAAO,CAAC,IAAI,CAAC,YAAY;YACtC,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,OAAO;YAC7B,gBAAgB,EAAE,OAAO,CAAC,IAAI,CAAC,iBAAiB;YAChD,YAAY,EAAE,OAAO,CAAC,IAAI,CAAC,YAAY;SACxC,CAAC;QAEF,4BAA4B;QAC5B,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,gBAAgB,EAAE,IAAI,CAAC,CAAC;QAE3C,iCAAiC;QACjC,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE;YAChD,OAAO,EAAE,IAAI,CAAC,OAAO;SACtB,CAAC,CAAC;IACL,CAAC;CACF;AA7BD,oDA6BC"}
|