@teneo-protocol/sdk 2.0.0 → 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 +1 -0
- package/.github/workflows/push-to-main.yml +1 -1
- package/.github/workflows/top-issue.yml +102 -0
- package/CHANGELOG.md +69 -0
- package/CONCEPTS.md +747 -0
- package/README.md +178 -8
- package/dist/constants.js +8 -8
- package/dist/constants.js.map +1 -1
- package/dist/core/websocket-client.d.ts +15 -3
- package/dist/core/websocket-client.d.ts.map +1 -1
- package/dist/core/websocket-client.js +52 -13
- 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.map +1 -1
- package/dist/handlers/message-handlers/agent-room-operation-response-handler.js +2 -5
- package/dist/handlers/message-handlers/agent-room-operation-response-handler.js.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 +783 -0
- package/dist/handlers/message-handlers/agent-status-update-handler.d.ts.map +1 -1
- package/dist/handlers/message-handlers/agent-status-update-handler.js +2 -5
- package/dist/handlers/message-handlers/agent-status-update-handler.js.map +1 -1
- 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.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.map +1 -1
- package/dist/handlers/message-handlers/auth-message-handler.js +6 -5
- package/dist/handlers/message-handlers/auth-message-handler.js.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.map +1 -1
- package/dist/handlers/message-handlers/auth-success-handler.js +6 -5
- 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.js +3 -2
- package/dist/handlers/message-handlers/challenge-handler.js.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 +6 -0
- package/dist/handlers/message-handlers/index.d.ts.map +1 -1
- package/dist/handlers/message-handlers/index.js +33 -1
- package/dist/handlers/message-handlers/index.js.map +1 -1
- package/dist/handlers/message-handlers/list-available-agents-handler.d.ts +783 -0
- package/dist/handlers/message-handlers/list-available-agents-handler.d.ts.map +1 -1
- package/dist/handlers/message-handlers/list-available-agents-handler.js +2 -5
- package/dist/handlers/message-handlers/list-available-agents-handler.js.map +1 -1
- package/dist/handlers/message-handlers/list-room-agents-handler.d.ts +783 -0
- package/dist/handlers/message-handlers/list-room-agents-handler.d.ts.map +1 -1
- package/dist/handlers/message-handlers/list-room-agents-handler.js +2 -5
- package/dist/handlers/message-handlers/list-room-agents-handler.js.map +1 -1
- package/dist/handlers/message-handlers/list-rooms-response-handler.d.ts +2 -199
- 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.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.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.map +1 -1
- package/dist/handlers/message-handlers/room-operation-response-handler.js +2 -5
- package/dist/handlers/message-handlers/room-operation-response-handler.js.map +1 -1
- 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 -9
- package/dist/handlers/message-handlers/types.d.ts.map +1 -1
- 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 +1 -7
- package/dist/managers/agent-room-manager.d.ts.map +1 -1
- package/dist/managers/agent-room-manager.js +83 -36
- package/dist/managers/agent-room-manager.js.map +1 -1
- package/dist/managers/connection-manager.js +2 -0
- package/dist/managers/connection-manager.js.map +1 -1
- package/dist/managers/index.d.ts +2 -1
- package/dist/managers/index.d.ts.map +1 -1
- package/dist/managers/index.js +3 -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.map +1 -1
- package/dist/managers/room-management-manager.js +9 -7
- package/dist/managers/room-management-manager.js.map +1 -1
- package/dist/managers/room-manager.d.ts +7 -5
- 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 +135 -21
- package/dist/teneo-sdk.d.ts.map +1 -1
- package/dist/teneo-sdk.js +268 -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 +79 -8
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/config.js +62 -5
- package/dist/types/config.js.map +1 -1
- package/dist/types/error-codes.d.ts +8 -0
- package/dist/types/error-codes.d.ts.map +1 -1
- package/dist/types/error-codes.js +9 -0
- package/dist/types/error-codes.js.map +1 -1
- package/dist/types/events.d.ts +44 -0
- 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 +33 -3
- package/dist/types/index.js.map +1 -1
- package/dist/types/messages.d.ts +11219 -423
- package/dist/types/messages.d.ts.map +1 -1
- package/dist/types/messages.js +249 -7
- 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 +1 -1
- package/examples/agent-room-management-example.ts +10 -9
- package/examples/basic-usage.ts +3 -4
- package/examples/claude-agent-x-follower/.env.example +1 -1
- package/examples/claude-agent-x-follower/QUICKSTART.md +2 -2
- package/examples/claude-agent-x-follower/README.md +2 -2
- package/examples/claude-agent-x-follower/index.ts +120 -96
- package/examples/n8n-teneo/.env.example +1 -1
- package/examples/n8n-teneo/README.md +1 -1
- 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 +1 -1
- package/examples/openai-teneo/README.md +2 -2
- package/examples/openai-teneo/index.ts +82 -71
- package/examples/production-dashboard/.env.example +1 -1
- package/examples/production-dashboard/README.md +1 -1
- package/examples/production-dashboard/server.ts +2 -2
- package/examples/room-management-example.ts +5 -8
- package/examples/usage/.env.example +1 -1
- 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/webhook-integration.ts +1 -1
- package/examples/x-influencer-battle-server.ts +2 -2
- package/package.json +4 -1
- package/src/core/websocket-client.test.ts +8 -3
- package/src/core/websocket-client.ts +36 -6
- 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 +2 -8
- package/src/handlers/message-handlers/agent-status-update-handler.ts +3 -9
- package/src/handlers/message-handlers/all-agents-response-handler.ts +39 -0
- package/src/handlers/message-handlers/auth-message-handler.ts +5 -0
- package/src/handlers/message-handlers/auth-success-handler.ts +6 -1
- package/src/handlers/message-handlers/base-handler.ts +20 -7
- package/src/handlers/message-handlers/index.ts +34 -0
- package/src/handlers/message-handlers/list-room-agents-handler.ts +2 -5
- 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 +3 -6
- 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 +37 -9
- 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 +98 -42
- package/src/managers/index.ts +13 -1
- package/src/managers/message-router.ts +215 -17
- package/src/managers/room-management-manager.ts +4 -7
- package/src/managers/room-manager.ts +11 -15
- package/src/payments/index.ts +22 -0
- package/src/payments/payment-client.ts +240 -0
- package/src/teneo-sdk.ts +302 -27
- package/src/types/categories.ts +45 -0
- package/src/types/config.ts +70 -2
- package/src/types/error-codes.ts +10 -0
- package/src/types/events.test.ts +1 -0
- package/src/types/events.ts +43 -0
- package/src/types/index.ts +56 -0
- package/src/types/messages.test.ts +2 -1
- package/src/types/messages.ts +307 -5
- 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 +10 -8
- package/tests/integration/websocket.test.ts +4 -1
- package/tests/payment-flow-test.ts +147 -0
- package/tests/unit/handlers/agent-room-operation-response-handler.test.ts +17 -29
- package/tests/unit/handlers/agent-status-update-handler.test.ts +2 -6
- package/tests/unit/handlers/auth-success-handler-rooms.test.ts +1 -3
- package/tests/unit/handlers/list-available-agents-handler.test.ts +4 -12
- package/tests/unit/handlers/list-room-agents-handler.test.ts +2 -6
- package/tests/unit/handlers/room-operation-response-handler.test.ts +9 -36
- package/tests/unit/managers/agent-room-manager.test.ts +9 -16
- package/tests/unit/managers/room-management-manager.test.ts +21 -39
- package/tsconfig.json +2 -2
- package/vitest.config.ts +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-room-agents-handler.d.ts","sourceRoot":"","sources":["../../../src/handlers/message-handlers/list-room-agents-handler.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,kBAAkB,EAA4B,MAAM,aAAa,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAKzC,qBAAa,qBAAsB,SAAQ,kBAAkB,CAAC,kBAAkB,CAAC;IAC/E,QAAQ,CAAC,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SAAS,CAAC,eAAe,CAAC,OAAO,EAAE,kBAAkB,EAAE,OAAO,EAAE,cAAc,GAAG,IAAI;CAyCtF"}
|
|
@@ -10,11 +10,8 @@ const base_handler_1 = require("./base-handler");
|
|
|
10
10
|
const events_1 = require("../../types/events");
|
|
11
11
|
const error_codes_1 = require("../../types/error-codes");
|
|
12
12
|
class ListRoomAgentsHandler extends base_handler_1.BaseMessageHandler {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
this.type = "room_agents_response";
|
|
16
|
-
this.schema = types_1.RoomAgentsResponseSchema;
|
|
17
|
-
}
|
|
13
|
+
type = "room_agents_response";
|
|
14
|
+
schema = types_1.RoomAgentsResponseSchema;
|
|
18
15
|
handleValidated(message, context) {
|
|
19
16
|
const { room_id, agents } = message.data;
|
|
20
17
|
context.logger.debug("Handling room_agents_response", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-room-agents-handler.js","sourceRoot":"","sources":["../../../src/handlers/message-handlers/list-room-agents-handler.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,uCAA2E;AAC3E,iDAAoD;AAEpD,+CAA8C;AAC9C,yDAAoD;AAGpD,MAAa,qBAAsB,SAAQ,iCAAsC;
|
|
1
|
+
{"version":3,"file":"list-room-agents-handler.js","sourceRoot":"","sources":["../../../src/handlers/message-handlers/list-room-agents-handler.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,uCAA2E;AAC3E,iDAAoD;AAEpD,+CAA8C;AAC9C,yDAAoD;AAGpD,MAAa,qBAAsB,SAAQ,iCAAsC;IACtE,IAAI,GAAG,sBAA+B,CAAC;IACvC,MAAM,GAAG,gCAAwB,CAAC;IAEjC,eAAe,CAAC,OAA2B,EAAE,OAAuB;QAC5E,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;QAEzC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,+BAA+B,EAAE;YACpD,MAAM,EAAE,OAAO;YACf,UAAU,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC;SAChC,CAAC,CAAC;QAEH,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,MAAM,KAAK,GAAG,IAAI,iBAAQ,CACxB,sCAAsC,EACtC,uBAAS,CAAC,gBAAgB,CAC3B,CAAC;YACF,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,uBAAuB,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;YAC9D,OAAO;QACT,CAAC;QAED,uDAAuD;QACvD,MAAM,SAAS,GAAoB,MAAM,IAAI,EAAE,CAAC;QAEhD,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,oBAAoB,EAAE;YACxC,MAAM,EAAE,OAAO;YACf,KAAK,EAAE,SAAS,CAAC,MAAM;SACxB,CAAC,CAAC;QAEH,4CAA4C;QAC5C,MAAM,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC;QAClD,IAAI,gBAAgB,IAAI,OAAO,gBAAgB,CAAC,eAAe,KAAK,UAAU,EAAE,CAAC;YAC/E,gBAAgB,CAAC,eAAe,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QACvD,CAAC;QAED,qBAAqB;QACrB,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,0BAA0B,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC;QAEnE,eAAe;QACf,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,oBAAoB,EAAE;YAC9C,OAAO;YACP,MAAM,EAAE,SAAS;YACjB,KAAK,EAAE,SAAS,CAAC,MAAM;SACxB,CAAC,CAAC;IACL,CAAC;CACF;AA7CD,sDA6CC"}
|
|
@@ -2,210 +2,13 @@
|
|
|
2
2
|
* Handler for list_rooms response messages
|
|
3
3
|
* Processes room list from server
|
|
4
4
|
*/
|
|
5
|
+
import { z } from "zod";
|
|
5
6
|
import { ListRoomsResponse } from "../../types";
|
|
6
7
|
import { BaseMessageHandler } from "./base-handler";
|
|
7
8
|
import { HandlerContext } from "./types";
|
|
8
9
|
export declare class ListRoomsResponseHandler extends BaseMessageHandler<ListRoomsResponse> {
|
|
9
10
|
readonly type: "list_rooms";
|
|
10
|
-
readonly schema:
|
|
11
|
-
content: import("zod").ZodOptional<import("zod").ZodAny>;
|
|
12
|
-
content_type: import("zod").ZodOptional<import("zod").ZodEnum<["text/plain", "text/markdown", "text/html", "application/json", "image/*", "STRING", "JSON", "MD", "ARRAY"]>>;
|
|
13
|
-
from: import("zod").ZodOptional<import("zod").ZodString>;
|
|
14
|
-
to: import("zod").ZodOptional<import("zod").ZodString>;
|
|
15
|
-
room: import("zod").ZodOptional<import("zod").ZodString>;
|
|
16
|
-
timestamp: import("zod").ZodOptional<import("zod").ZodString>;
|
|
17
|
-
signature: import("zod").ZodOptional<import("zod").ZodString>;
|
|
18
|
-
publicKey: import("zod").ZodOptional<import("zod").ZodString>;
|
|
19
|
-
reasoning: import("zod").ZodOptional<import("zod").ZodString>;
|
|
20
|
-
task_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
21
|
-
id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
22
|
-
} & {
|
|
23
|
-
type: import("zod").ZodLiteral<"list_rooms">;
|
|
24
|
-
data: import("zod").ZodObject<{
|
|
25
|
-
rooms: import("zod").ZodArray<import("zod").ZodObject<{
|
|
26
|
-
id: import("zod").ZodString;
|
|
27
|
-
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
28
|
-
description: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
29
|
-
is_public: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
30
|
-
created_by: import("zod").ZodOptional<import("zod").ZodString>;
|
|
31
|
-
created_at: import("zod").ZodOptional<import("zod").ZodString>;
|
|
32
|
-
updated_at: import("zod").ZodOptional<import("zod").ZodString>;
|
|
33
|
-
is_owner: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
34
|
-
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
35
|
-
id: import("zod").ZodString;
|
|
36
|
-
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
37
|
-
description: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
38
|
-
is_public: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
39
|
-
created_by: import("zod").ZodOptional<import("zod").ZodString>;
|
|
40
|
-
created_at: import("zod").ZodOptional<import("zod").ZodString>;
|
|
41
|
-
updated_at: import("zod").ZodOptional<import("zod").ZodString>;
|
|
42
|
-
is_owner: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
43
|
-
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
44
|
-
id: import("zod").ZodString;
|
|
45
|
-
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
46
|
-
description: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
47
|
-
is_public: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
48
|
-
created_by: import("zod").ZodOptional<import("zod").ZodString>;
|
|
49
|
-
created_at: import("zod").ZodOptional<import("zod").ZodString>;
|
|
50
|
-
updated_at: import("zod").ZodOptional<import("zod").ZodString>;
|
|
51
|
-
is_owner: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
52
|
-
}, import("zod").ZodTypeAny, "passthrough">>, "many">;
|
|
53
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
54
|
-
rooms: import("zod").objectOutputType<{
|
|
55
|
-
id: import("zod").ZodString;
|
|
56
|
-
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
57
|
-
description: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
58
|
-
is_public: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
59
|
-
created_by: import("zod").ZodOptional<import("zod").ZodString>;
|
|
60
|
-
created_at: import("zod").ZodOptional<import("zod").ZodString>;
|
|
61
|
-
updated_at: import("zod").ZodOptional<import("zod").ZodString>;
|
|
62
|
-
is_owner: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
63
|
-
}, import("zod").ZodTypeAny, "passthrough">[];
|
|
64
|
-
}, {
|
|
65
|
-
rooms: import("zod").objectInputType<{
|
|
66
|
-
id: import("zod").ZodString;
|
|
67
|
-
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
68
|
-
description: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
69
|
-
is_public: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
70
|
-
created_by: import("zod").ZodOptional<import("zod").ZodString>;
|
|
71
|
-
created_at: import("zod").ZodOptional<import("zod").ZodString>;
|
|
72
|
-
updated_at: import("zod").ZodOptional<import("zod").ZodString>;
|
|
73
|
-
is_owner: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
74
|
-
}, import("zod").ZodTypeAny, "passthrough">[];
|
|
75
|
-
}>;
|
|
76
|
-
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
77
|
-
content: import("zod").ZodOptional<import("zod").ZodAny>;
|
|
78
|
-
content_type: import("zod").ZodOptional<import("zod").ZodEnum<["text/plain", "text/markdown", "text/html", "application/json", "image/*", "STRING", "JSON", "MD", "ARRAY"]>>;
|
|
79
|
-
from: import("zod").ZodOptional<import("zod").ZodString>;
|
|
80
|
-
to: import("zod").ZodOptional<import("zod").ZodString>;
|
|
81
|
-
room: import("zod").ZodOptional<import("zod").ZodString>;
|
|
82
|
-
timestamp: import("zod").ZodOptional<import("zod").ZodString>;
|
|
83
|
-
signature: import("zod").ZodOptional<import("zod").ZodString>;
|
|
84
|
-
publicKey: import("zod").ZodOptional<import("zod").ZodString>;
|
|
85
|
-
reasoning: import("zod").ZodOptional<import("zod").ZodString>;
|
|
86
|
-
task_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
87
|
-
id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
88
|
-
} & {
|
|
89
|
-
type: import("zod").ZodLiteral<"list_rooms">;
|
|
90
|
-
data: import("zod").ZodObject<{
|
|
91
|
-
rooms: import("zod").ZodArray<import("zod").ZodObject<{
|
|
92
|
-
id: import("zod").ZodString;
|
|
93
|
-
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
94
|
-
description: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
95
|
-
is_public: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
96
|
-
created_by: import("zod").ZodOptional<import("zod").ZodString>;
|
|
97
|
-
created_at: import("zod").ZodOptional<import("zod").ZodString>;
|
|
98
|
-
updated_at: import("zod").ZodOptional<import("zod").ZodString>;
|
|
99
|
-
is_owner: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
100
|
-
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
101
|
-
id: import("zod").ZodString;
|
|
102
|
-
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
103
|
-
description: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
104
|
-
is_public: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
105
|
-
created_by: import("zod").ZodOptional<import("zod").ZodString>;
|
|
106
|
-
created_at: import("zod").ZodOptional<import("zod").ZodString>;
|
|
107
|
-
updated_at: import("zod").ZodOptional<import("zod").ZodString>;
|
|
108
|
-
is_owner: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
109
|
-
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
110
|
-
id: import("zod").ZodString;
|
|
111
|
-
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
112
|
-
description: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
113
|
-
is_public: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
114
|
-
created_by: import("zod").ZodOptional<import("zod").ZodString>;
|
|
115
|
-
created_at: import("zod").ZodOptional<import("zod").ZodString>;
|
|
116
|
-
updated_at: import("zod").ZodOptional<import("zod").ZodString>;
|
|
117
|
-
is_owner: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
118
|
-
}, import("zod").ZodTypeAny, "passthrough">>, "many">;
|
|
119
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
120
|
-
rooms: import("zod").objectOutputType<{
|
|
121
|
-
id: import("zod").ZodString;
|
|
122
|
-
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
123
|
-
description: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
124
|
-
is_public: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
125
|
-
created_by: import("zod").ZodOptional<import("zod").ZodString>;
|
|
126
|
-
created_at: import("zod").ZodOptional<import("zod").ZodString>;
|
|
127
|
-
updated_at: import("zod").ZodOptional<import("zod").ZodString>;
|
|
128
|
-
is_owner: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
129
|
-
}, import("zod").ZodTypeAny, "passthrough">[];
|
|
130
|
-
}, {
|
|
131
|
-
rooms: import("zod").objectInputType<{
|
|
132
|
-
id: import("zod").ZodString;
|
|
133
|
-
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
134
|
-
description: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
135
|
-
is_public: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
136
|
-
created_by: import("zod").ZodOptional<import("zod").ZodString>;
|
|
137
|
-
created_at: import("zod").ZodOptional<import("zod").ZodString>;
|
|
138
|
-
updated_at: import("zod").ZodOptional<import("zod").ZodString>;
|
|
139
|
-
is_owner: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
140
|
-
}, import("zod").ZodTypeAny, "passthrough">[];
|
|
141
|
-
}>;
|
|
142
|
-
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
143
|
-
content: import("zod").ZodOptional<import("zod").ZodAny>;
|
|
144
|
-
content_type: import("zod").ZodOptional<import("zod").ZodEnum<["text/plain", "text/markdown", "text/html", "application/json", "image/*", "STRING", "JSON", "MD", "ARRAY"]>>;
|
|
145
|
-
from: import("zod").ZodOptional<import("zod").ZodString>;
|
|
146
|
-
to: import("zod").ZodOptional<import("zod").ZodString>;
|
|
147
|
-
room: import("zod").ZodOptional<import("zod").ZodString>;
|
|
148
|
-
timestamp: import("zod").ZodOptional<import("zod").ZodString>;
|
|
149
|
-
signature: import("zod").ZodOptional<import("zod").ZodString>;
|
|
150
|
-
publicKey: import("zod").ZodOptional<import("zod").ZodString>;
|
|
151
|
-
reasoning: import("zod").ZodOptional<import("zod").ZodString>;
|
|
152
|
-
task_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
153
|
-
id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
154
|
-
} & {
|
|
155
|
-
type: import("zod").ZodLiteral<"list_rooms">;
|
|
156
|
-
data: import("zod").ZodObject<{
|
|
157
|
-
rooms: import("zod").ZodArray<import("zod").ZodObject<{
|
|
158
|
-
id: import("zod").ZodString;
|
|
159
|
-
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
160
|
-
description: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
161
|
-
is_public: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
162
|
-
created_by: import("zod").ZodOptional<import("zod").ZodString>;
|
|
163
|
-
created_at: import("zod").ZodOptional<import("zod").ZodString>;
|
|
164
|
-
updated_at: import("zod").ZodOptional<import("zod").ZodString>;
|
|
165
|
-
is_owner: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
166
|
-
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
167
|
-
id: import("zod").ZodString;
|
|
168
|
-
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
169
|
-
description: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
170
|
-
is_public: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
171
|
-
created_by: import("zod").ZodOptional<import("zod").ZodString>;
|
|
172
|
-
created_at: import("zod").ZodOptional<import("zod").ZodString>;
|
|
173
|
-
updated_at: import("zod").ZodOptional<import("zod").ZodString>;
|
|
174
|
-
is_owner: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
175
|
-
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
176
|
-
id: import("zod").ZodString;
|
|
177
|
-
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
178
|
-
description: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
179
|
-
is_public: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
180
|
-
created_by: import("zod").ZodOptional<import("zod").ZodString>;
|
|
181
|
-
created_at: import("zod").ZodOptional<import("zod").ZodString>;
|
|
182
|
-
updated_at: import("zod").ZodOptional<import("zod").ZodString>;
|
|
183
|
-
is_owner: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
184
|
-
}, import("zod").ZodTypeAny, "passthrough">>, "many">;
|
|
185
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
186
|
-
rooms: import("zod").objectOutputType<{
|
|
187
|
-
id: import("zod").ZodString;
|
|
188
|
-
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
189
|
-
description: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
190
|
-
is_public: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
191
|
-
created_by: import("zod").ZodOptional<import("zod").ZodString>;
|
|
192
|
-
created_at: import("zod").ZodOptional<import("zod").ZodString>;
|
|
193
|
-
updated_at: import("zod").ZodOptional<import("zod").ZodString>;
|
|
194
|
-
is_owner: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
195
|
-
}, import("zod").ZodTypeAny, "passthrough">[];
|
|
196
|
-
}, {
|
|
197
|
-
rooms: import("zod").objectInputType<{
|
|
198
|
-
id: import("zod").ZodString;
|
|
199
|
-
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
200
|
-
description: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
201
|
-
is_public: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
202
|
-
created_by: import("zod").ZodOptional<import("zod").ZodString>;
|
|
203
|
-
created_at: import("zod").ZodOptional<import("zod").ZodString>;
|
|
204
|
-
updated_at: import("zod").ZodOptional<import("zod").ZodString>;
|
|
205
|
-
is_owner: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
206
|
-
}, import("zod").ZodTypeAny, "passthrough">[];
|
|
207
|
-
}>;
|
|
208
|
-
}, import("zod").ZodTypeAny, "passthrough">>;
|
|
11
|
+
readonly schema: z.ZodType<ListRoomsResponse>;
|
|
209
12
|
protected handleValidated(message: ListRoomsResponse, context: HandlerContext): void;
|
|
210
13
|
}
|
|
211
14
|
//# sourceMappingURL=list-rooms-response-handler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-rooms-response-handler.d.ts","sourceRoot":"","sources":["../../../src/handlers/message-handlers/list-rooms-response-handler.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAA2B,MAAM,aAAa,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,qBAAa,wBAAyB,SAAQ,kBAAkB,CAAC,iBAAiB,CAAC;IACjF,QAAQ,CAAC,IAAI,EAAG,YAAY,CAAU;
|
|
1
|
+
{"version":3,"file":"list-rooms-response-handler.d.ts","sourceRoot":"","sources":["../../../src/handlers/message-handlers/list-rooms-response-handler.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAA2B,MAAM,aAAa,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,qBAAa,wBAAyB,SAAQ,kBAAkB,CAAC,iBAAiB,CAAC;IACjF,QAAQ,CAAC,IAAI,EAAG,YAAY,CAAU;IAEtC,QAAQ,CAAC,MAAM,EAA8B,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAE1E,SAAS,CAAC,eAAe,CAAC,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,cAAc,GAAG,IAAI;CAcrF"}
|
|
@@ -8,13 +8,11 @@ exports.ListRoomsResponseHandler = void 0;
|
|
|
8
8
|
const types_1 = require("../../types");
|
|
9
9
|
const base_handler_1 = require("./base-handler");
|
|
10
10
|
class ListRoomsResponseHandler extends base_handler_1.BaseMessageHandler {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
this.schema = types_1.ListRoomsResponseSchema;
|
|
15
|
-
}
|
|
11
|
+
type = "list_rooms";
|
|
12
|
+
// Cast needed due to Zod transform creating input/output type mismatch
|
|
13
|
+
schema = types_1.ListRoomsResponseSchema;
|
|
16
14
|
handleValidated(message, context) {
|
|
17
|
-
context.logger.debug("Handling list_rooms
|
|
15
|
+
context.logger.debug("Handling list_rooms", {
|
|
18
16
|
roomCount: message.data.rooms.length
|
|
19
17
|
});
|
|
20
18
|
// Emit room:list event with room info array
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-rooms-response-handler.js","sourceRoot":"","sources":["../../../src/handlers/message-handlers/list-rooms-response-handler.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;
|
|
1
|
+
{"version":3,"file":"list-rooms-response-handler.js","sourceRoot":"","sources":["../../../src/handlers/message-handlers/list-rooms-response-handler.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,uCAAyE;AACzE,iDAAoD;AAGpD,MAAa,wBAAyB,SAAQ,iCAAqC;IACxE,IAAI,GAAG,YAAqB,CAAC;IACtC,uEAAuE;IAC9D,MAAM,GAAG,+BAAuD,CAAC;IAEhE,eAAe,CAAC,OAA0B,EAAE,OAAuB;QAC3E,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,qBAAqB,EAAE;YAC1C,SAAS,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM;SACrC,CAAC,CAAC;QAEH,4CAA4C;QAC5C,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAEpD,iCAAiC;QACjC,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,WAAW,EAAE;YACrC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK;YACzB,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM;SACjC,CAAC,CAAC;IACL,CAAC;CACF;AAnBD,4DAmBC"}
|
|
@@ -8,11 +8,8 @@ exports.PongHandler = exports.PingHandler = void 0;
|
|
|
8
8
|
const types_1 = require("../../types");
|
|
9
9
|
const base_handler_1 = require("./base-handler");
|
|
10
10
|
class PingHandler extends base_handler_1.BaseMessageHandler {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
this.type = "ping";
|
|
14
|
-
this.schema = types_1.PingMessageSchema;
|
|
15
|
-
}
|
|
11
|
+
type = "ping";
|
|
12
|
+
schema = types_1.PingMessageSchema;
|
|
16
13
|
async handleValidated(_message, context) {
|
|
17
14
|
// Ping messages are handled at the WebSocket level (ws library)
|
|
18
15
|
// No special processing needed here
|
|
@@ -21,11 +18,8 @@ class PingHandler extends base_handler_1.BaseMessageHandler {
|
|
|
21
18
|
}
|
|
22
19
|
exports.PingHandler = PingHandler;
|
|
23
20
|
class PongHandler extends base_handler_1.BaseMessageHandler {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
this.type = "pong";
|
|
27
|
-
this.schema = types_1.PongMessageSchema;
|
|
28
|
-
}
|
|
21
|
+
type = "pong";
|
|
22
|
+
schema = types_1.PongMessageSchema;
|
|
29
23
|
async handleValidated(_message, context) {
|
|
30
24
|
// Pong messages are handled at the WebSocket level (ws library)
|
|
31
25
|
// No special processing needed here
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ping-pong-handler.js","sourceRoot":"","sources":["../../../src/handlers/message-handlers/ping-pong-handler.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,uCAA6F;AAC7F,iDAAoD;AAGpD,MAAa,WAAY,SAAQ,iCAA+B;
|
|
1
|
+
{"version":3,"file":"ping-pong-handler.js","sourceRoot":"","sources":["../../../src/handlers/message-handlers/ping-pong-handler.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,uCAA6F;AAC7F,iDAAoD;AAGpD,MAAa,WAAY,SAAQ,iCAA+B;IACrD,IAAI,GAAG,MAAe,CAAC;IACvB,MAAM,GAAG,yBAAiB,CAAC;IAE1B,KAAK,CAAC,eAAe,CAAC,QAAqB,EAAE,OAAuB;QAC5E,gEAAgE;QAChE,oCAAoC;QACpC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;IACxC,CAAC;CACF;AATD,kCASC;AAED,MAAa,WAAY,SAAQ,iCAA+B;IACrD,IAAI,GAAG,MAAe,CAAC;IACvB,MAAM,GAAG,yBAAiB,CAAC;IAE1B,KAAK,CAAC,eAAe,CAAC,QAAqB,EAAE,OAAuB;QAC5E,gEAAgE;QAChE,oCAAoC;QACpC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;IACxC,CAAC;CACF;AATD,kCASC"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Handler for rate_limit_notification messages
|
|
3
|
+
* Processes rate limit notifications from the server
|
|
4
|
+
*/
|
|
5
|
+
import { RateLimitNotificationMessage } from "../../types";
|
|
6
|
+
import { BaseMessageHandler } from "./base-handler";
|
|
7
|
+
import { HandlerContext } from "./types";
|
|
8
|
+
export declare class RateLimitNotificationHandler extends BaseMessageHandler<RateLimitNotificationMessage> {
|
|
9
|
+
readonly type: "rate_limit_notification";
|
|
10
|
+
readonly schema: import("zod").ZodObject<{
|
|
11
|
+
type: import("zod").ZodLiteral<"rate_limit_notification">;
|
|
12
|
+
data: import("zod").ZodObject<{
|
|
13
|
+
title: import("zod").ZodString;
|
|
14
|
+
message: import("zod").ZodString;
|
|
15
|
+
cta_text: import("zod").ZodOptional<import("zod").ZodString>;
|
|
16
|
+
cta_link: import("zod").ZodOptional<import("zod").ZodString>;
|
|
17
|
+
message_type: import("zod").ZodString;
|
|
18
|
+
limit_type: import("zod").ZodString;
|
|
19
|
+
reset_at: import("zod").ZodOptional<import("zod").ZodString>;
|
|
20
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
21
|
+
title: import("zod").ZodString;
|
|
22
|
+
message: import("zod").ZodString;
|
|
23
|
+
cta_text: import("zod").ZodOptional<import("zod").ZodString>;
|
|
24
|
+
cta_link: import("zod").ZodOptional<import("zod").ZodString>;
|
|
25
|
+
message_type: import("zod").ZodString;
|
|
26
|
+
limit_type: import("zod").ZodString;
|
|
27
|
+
reset_at: import("zod").ZodOptional<import("zod").ZodString>;
|
|
28
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
29
|
+
title: import("zod").ZodString;
|
|
30
|
+
message: import("zod").ZodString;
|
|
31
|
+
cta_text: import("zod").ZodOptional<import("zod").ZodString>;
|
|
32
|
+
cta_link: import("zod").ZodOptional<import("zod").ZodString>;
|
|
33
|
+
message_type: import("zod").ZodString;
|
|
34
|
+
limit_type: import("zod").ZodString;
|
|
35
|
+
reset_at: import("zod").ZodOptional<import("zod").ZodString>;
|
|
36
|
+
}, import("zod").ZodTypeAny, "passthrough">>;
|
|
37
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
38
|
+
type: import("zod").ZodLiteral<"rate_limit_notification">;
|
|
39
|
+
data: import("zod").ZodObject<{
|
|
40
|
+
title: import("zod").ZodString;
|
|
41
|
+
message: import("zod").ZodString;
|
|
42
|
+
cta_text: import("zod").ZodOptional<import("zod").ZodString>;
|
|
43
|
+
cta_link: import("zod").ZodOptional<import("zod").ZodString>;
|
|
44
|
+
message_type: import("zod").ZodString;
|
|
45
|
+
limit_type: import("zod").ZodString;
|
|
46
|
+
reset_at: import("zod").ZodOptional<import("zod").ZodString>;
|
|
47
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
48
|
+
title: import("zod").ZodString;
|
|
49
|
+
message: import("zod").ZodString;
|
|
50
|
+
cta_text: import("zod").ZodOptional<import("zod").ZodString>;
|
|
51
|
+
cta_link: import("zod").ZodOptional<import("zod").ZodString>;
|
|
52
|
+
message_type: import("zod").ZodString;
|
|
53
|
+
limit_type: import("zod").ZodString;
|
|
54
|
+
reset_at: import("zod").ZodOptional<import("zod").ZodString>;
|
|
55
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
56
|
+
title: import("zod").ZodString;
|
|
57
|
+
message: import("zod").ZodString;
|
|
58
|
+
cta_text: import("zod").ZodOptional<import("zod").ZodString>;
|
|
59
|
+
cta_link: import("zod").ZodOptional<import("zod").ZodString>;
|
|
60
|
+
message_type: import("zod").ZodString;
|
|
61
|
+
limit_type: import("zod").ZodString;
|
|
62
|
+
reset_at: import("zod").ZodOptional<import("zod").ZodString>;
|
|
63
|
+
}, import("zod").ZodTypeAny, "passthrough">>;
|
|
64
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
65
|
+
type: import("zod").ZodLiteral<"rate_limit_notification">;
|
|
66
|
+
data: import("zod").ZodObject<{
|
|
67
|
+
title: import("zod").ZodString;
|
|
68
|
+
message: import("zod").ZodString;
|
|
69
|
+
cta_text: import("zod").ZodOptional<import("zod").ZodString>;
|
|
70
|
+
cta_link: import("zod").ZodOptional<import("zod").ZodString>;
|
|
71
|
+
message_type: import("zod").ZodString;
|
|
72
|
+
limit_type: import("zod").ZodString;
|
|
73
|
+
reset_at: import("zod").ZodOptional<import("zod").ZodString>;
|
|
74
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
75
|
+
title: import("zod").ZodString;
|
|
76
|
+
message: import("zod").ZodString;
|
|
77
|
+
cta_text: import("zod").ZodOptional<import("zod").ZodString>;
|
|
78
|
+
cta_link: import("zod").ZodOptional<import("zod").ZodString>;
|
|
79
|
+
message_type: import("zod").ZodString;
|
|
80
|
+
limit_type: import("zod").ZodString;
|
|
81
|
+
reset_at: import("zod").ZodOptional<import("zod").ZodString>;
|
|
82
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
83
|
+
title: import("zod").ZodString;
|
|
84
|
+
message: import("zod").ZodString;
|
|
85
|
+
cta_text: import("zod").ZodOptional<import("zod").ZodString>;
|
|
86
|
+
cta_link: import("zod").ZodOptional<import("zod").ZodString>;
|
|
87
|
+
message_type: import("zod").ZodString;
|
|
88
|
+
limit_type: import("zod").ZodString;
|
|
89
|
+
reset_at: import("zod").ZodOptional<import("zod").ZodString>;
|
|
90
|
+
}, import("zod").ZodTypeAny, "passthrough">>;
|
|
91
|
+
}, import("zod").ZodTypeAny, "passthrough">>;
|
|
92
|
+
protected handleValidated(message: RateLimitNotificationMessage, context: HandlerContext): void;
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=rate-limit-notification-handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rate-limit-notification-handler.d.ts","sourceRoot":"","sources":["../../../src/handlers/message-handlers/rate-limit-notification-handler.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,4BAA4B,EAAsC,MAAM,aAAa,CAAC;AAC/F,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,qBAAa,4BAA6B,SAAQ,kBAAkB,CAAC,4BAA4B,CAAC;IAChG,QAAQ,CAAC,IAAI,EAAG,yBAAyB,CAAU;IACnD,QAAQ,CAAC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iDAAsC;IAErD,SAAS,CAAC,eAAe,CAAC,OAAO,EAAE,4BAA4B,EAAE,OAAO,EAAE,cAAc,GAAG,IAAI;CA+BhG"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Handler for rate_limit_notification messages
|
|
4
|
+
* Processes rate limit notifications from the server
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.RateLimitNotificationHandler = void 0;
|
|
8
|
+
const types_1 = require("../../types");
|
|
9
|
+
const base_handler_1 = require("./base-handler");
|
|
10
|
+
class RateLimitNotificationHandler extends base_handler_1.BaseMessageHandler {
|
|
11
|
+
type = "rate_limit_notification";
|
|
12
|
+
schema = types_1.RateLimitNotificationMessageSchema;
|
|
13
|
+
handleValidated(message, context) {
|
|
14
|
+
const { title, message: msg, cta_text, cta_link, message_type, limit_type, reset_at } = message.data;
|
|
15
|
+
context.logger.warn("Rate limit notification received", {
|
|
16
|
+
title,
|
|
17
|
+
limitType: limit_type,
|
|
18
|
+
resetAt: reset_at
|
|
19
|
+
});
|
|
20
|
+
// Emit rate limit event with camelCase conversion
|
|
21
|
+
this.emit(context, "rate_limit", {
|
|
22
|
+
title,
|
|
23
|
+
message: msg,
|
|
24
|
+
ctaText: cta_text,
|
|
25
|
+
ctaLink: cta_link,
|
|
26
|
+
messageType: message_type,
|
|
27
|
+
limitType: limit_type,
|
|
28
|
+
resetAt: reset_at
|
|
29
|
+
});
|
|
30
|
+
// Send webhook
|
|
31
|
+
this.sendWebhook(context, "rate_limit_notification", message.data);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.RateLimitNotificationHandler = RateLimitNotificationHandler;
|
|
35
|
+
//# sourceMappingURL=rate-limit-notification-handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rate-limit-notification-handler.js","sourceRoot":"","sources":["../../../src/handlers/message-handlers/rate-limit-notification-handler.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,uCAA+F;AAC/F,iDAAoD;AAGpD,MAAa,4BAA6B,SAAQ,iCAAgD;IACvF,IAAI,GAAG,yBAAkC,CAAC;IAC1C,MAAM,GAAG,0CAAkC,CAAC;IAE3C,eAAe,CAAC,OAAqC,EAAE,OAAuB;QACtF,MAAM,EACJ,KAAK,EACL,OAAO,EAAE,GAAG,EACZ,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,QAAQ,EACT,GAAG,OAAO,CAAC,IAAI,CAAC;QAEjB,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,kCAAkC,EAAE;YACtD,KAAK;YACL,SAAS,EAAE,UAAU;YACrB,OAAO,EAAE,QAAQ;SAClB,CAAC,CAAC;QAEH,kDAAkD;QAClD,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,YAAY,EAAE;YAC/B,KAAK;YACL,OAAO,EAAE,GAAG;YACZ,OAAO,EAAE,QAAQ;YACjB,OAAO,EAAE,QAAQ;YACjB,WAAW,EAAE,YAAY;YACzB,SAAS,EAAE,UAAU;YACrB,OAAO,EAAE,QAAQ;SAClB,CAAC,CAAC;QAEH,eAAe;QACf,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,yBAAyB,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IACrE,CAAC;CACF;AAnCD,oEAmCC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"regular-message-handler.d.ts","sourceRoot":"","sources":["../../../src/handlers/message-handlers/regular-message-handler.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"regular-message-handler.d.ts","sourceRoot":"","sources":["../../../src/handlers/message-handlers/regular-message-handler.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAA0C,MAAM,aAAa,CAAC;AAElF,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,qBAAa,qBAAsB,SAAQ,kBAAkB,CAAC,WAAW,CAAC;IACxE,QAAQ,CAAC,IAAI,EAAG,SAAS,CAAU;IACnC,QAAQ,CAAC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iDAAqB;cAEpB,eAAe,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;CAoD9F"}
|
|
@@ -8,11 +8,8 @@ exports.RegularMessageHandler = void 0;
|
|
|
8
8
|
const types_1 = require("../../types");
|
|
9
9
|
const base_handler_1 = require("./base-handler");
|
|
10
10
|
class RegularMessageHandler extends base_handler_1.BaseMessageHandler {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
this.type = "message";
|
|
14
|
-
this.schema = types_1.UserMessageSchema;
|
|
15
|
-
}
|
|
11
|
+
type = "message";
|
|
12
|
+
schema = types_1.UserMessageSchema;
|
|
16
13
|
async handleValidated(message, context) {
|
|
17
14
|
// Check if this message has a 'from' field and content
|
|
18
15
|
if (!message.from || !message.content) {
|
|
@@ -48,7 +45,8 @@ class RegularMessageHandler extends base_handler_1.BaseMessageHandler {
|
|
|
48
45
|
contentType: message.content_type || "text/plain",
|
|
49
46
|
success: true,
|
|
50
47
|
timestamp: new Date(),
|
|
51
|
-
|
|
48
|
+
// Cast to TaskResponseMessage for request correlation (message format is compatible)
|
|
49
|
+
raw: message,
|
|
52
50
|
humanized: typeof message.content === "string" ? message.content : JSON.stringify(message.content)
|
|
53
51
|
};
|
|
54
52
|
// Emit agent:response event
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"regular-message-handler.js","sourceRoot":"","sources":["../../../src/handlers/message-handlers/regular-message-handler.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,
|
|
1
|
+
{"version":3,"file":"regular-message-handler.js","sourceRoot":"","sources":["../../../src/handlers/message-handlers/regular-message-handler.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,uCAAkF;AAElF,iDAAoD;AAGpD,MAAa,qBAAsB,SAAQ,iCAA+B;IAC/D,IAAI,GAAG,SAAkB,CAAC;IAC1B,MAAM,GAAG,yBAAiB,CAAC;IAE1B,KAAK,CAAC,eAAe,CAAC,OAAoB,EAAE,OAAuB;QAC3E,uDAAuD;QACvD,IAAI,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;YACtC,OAAO;QACT,CAAC;QAED,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;YAClB,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,+DAA+D,EAAE;gBACnF,IAAI,EAAE,OAAO,CAAC,IAAI;aACnB,CAAC,CAAC;QACL,CAAC;QAED,MAAM,SAAS,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;QACzC,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;QAC7C,MAAM,WAAW,GAAG,SAAS,CAAC,aAAa,EAAE,WAAW,EAAE,CAAC;QAE3D,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,iCAAiC,EAAE;YACtD,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,SAAS;YACT,WAAW;SACZ,CAAC,CAAC;QAEH,sEAAsE;QACtE,gCAAgC;QAChC,IAAI,SAAS,KAAK,WAAW,EAAE,CAAC;YAC9B,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,oCAAoC,EAAE;gBACxD,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,cAAc,EACZ,OAAO,OAAO,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,YAAY;gBACxF,IAAI,EAAE,OAAO,CAAC,IAAI;aACnB,CAAC,CAAC;YAEH,uBAAuB;YACvB,MAAM,QAAQ,GAAkB;gBAC9B,MAAM,EAAE,OAAO,CAAC,IAAI,EAAE,OAAO,IAAI,OAAO,IAAI,CAAC,GAAG,EAAE,EAAE;gBACpD,OAAO,EAAE,OAAO,CAAC,IAAI;gBACrB,SAAS,EAAE,OAAO,CAAC,IAAI,EAAE,UAAU,IAAI,OAAO;gBAC9C,OAAO,EACL,OAAO,OAAO,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC;gBACzF,WAAW,EAAE,OAAO,CAAC,YAAY,IAAI,YAAY;gBACjD,OAAO,EAAE,IAAI;gBACb,SAAS,EAAE,IAAI,IAAI,EAAE;gBACrB,qFAAqF;gBACrF,GAAG,EAAE,OAAyC;gBAC9C,SAAS,EACP,OAAO,OAAO,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC;aAC1F,CAAC;YAEF,4BAA4B;YAC5B,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,gBAAgB,EAAE,QAAQ,CAAC,CAAC;QACjD,CAAC;IACH,CAAC;CACF;AAxDD,sDAwDC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"room-operation-response-handler.d.ts","sourceRoot":"","sources":["../../../src/handlers/message-handlers/room-operation-response-handler.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,qBAAqB,EAA+B,MAAM,aAAa,CAAC;AACjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAIzC,qBAAa,4BAA6B,SAAQ,kBAAkB,CAAC,qBAAqB,CAAC;IACzF,QAAQ,CAAC,IAAI,EAAG,yBAAyB,CAAU;IACnD,QAAQ,CAAC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iDAA+B;IAE9C,SAAS,CAAC,eAAe,
|
|
1
|
+
{"version":3,"file":"room-operation-response-handler.d.ts","sourceRoot":"","sources":["../../../src/handlers/message-handlers/room-operation-response-handler.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,qBAAqB,EAA+B,MAAM,aAAa,CAAC;AACjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAIzC,qBAAa,4BAA6B,SAAQ,kBAAkB,CAAC,qBAAqB,CAAC;IACzF,QAAQ,CAAC,IAAI,EAAG,yBAAyB,CAAU;IACnD,QAAQ,CAAC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iDAA+B;IAE9C,SAAS,CAAC,eAAe,CAAC,OAAO,EAAE,qBAAqB,EAAE,OAAO,EAAE,cAAc,GAAG,IAAI;CAsFzF"}
|
|
@@ -10,11 +10,8 @@ const base_handler_1 = require("./base-handler");
|
|
|
10
10
|
const events_1 = require("../../types/events");
|
|
11
11
|
const error_codes_1 = require("../../types/error-codes");
|
|
12
12
|
class RoomOperationResponseHandler extends base_handler_1.BaseMessageHandler {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
this.type = "room_operation_response";
|
|
16
|
-
this.schema = types_1.RoomOperationResponseSchema;
|
|
17
|
-
}
|
|
13
|
+
type = "room_operation_response";
|
|
14
|
+
schema = types_1.RoomOperationResponseSchema;
|
|
18
15
|
handleValidated(message, context) {
|
|
19
16
|
const { success, message: errorMessage, room_id, room } = message.data;
|
|
20
17
|
context.logger.debug("Handling room_operation_response", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"room-operation-response-handler.js","sourceRoot":"","sources":["../../../src/handlers/message-handlers/room-operation-response-handler.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,uCAAiF;AACjF,iDAAoD;AAEpD,+CAA8C;AAC9C,yDAAoD;AAEpD,MAAa,4BAA6B,SAAQ,iCAAyC;
|
|
1
|
+
{"version":3,"file":"room-operation-response-handler.js","sourceRoot":"","sources":["../../../src/handlers/message-handlers/room-operation-response-handler.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,uCAAiF;AACjF,iDAAoD;AAEpD,+CAA8C;AAC9C,yDAAoD;AAEpD,MAAa,4BAA6B,SAAQ,iCAAyC;IA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CACF;AA1FD,oEA0FC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscribe-response-handler.d.ts","sourceRoot":"","sources":["../../../src/handlers/message-handlers/subscribe-response-handler.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,
|
|
1
|
+
{"version":3,"file":"subscribe-response-handler.d.ts","sourceRoot":"","sources":["../../../src/handlers/message-handlers/subscribe-response-handler.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAsC,MAAM,aAAa,CAAC;AAEpF,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,qBAAa,wBAAyB,SAAQ,kBAAkB,CAAC,iBAAiB,CAAC;IACjF,QAAQ,CAAC,IAAI,EAAG,WAAW,CAAU;IACrC,QAAQ,CAAC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iDAA2B;IAE1C,SAAS,CAAC,eAAe,CAAC,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,cAAc,GAAG,IAAI;CA0CrF"}
|
|
@@ -6,13 +6,11 @@
|
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.SubscribeResponseHandler = void 0;
|
|
8
8
|
const types_1 = require("../../types");
|
|
9
|
+
const events_1 = require("../../types/events");
|
|
9
10
|
const base_handler_1 = require("./base-handler");
|
|
10
11
|
class SubscribeResponseHandler extends base_handler_1.BaseMessageHandler {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
this.type = "subscribe";
|
|
14
|
-
this.schema = types_1.SubscribeResponseSchema;
|
|
15
|
-
}
|
|
12
|
+
type = "subscribe";
|
|
13
|
+
schema = types_1.SubscribeResponseSchema;
|
|
16
14
|
handleValidated(message, context) {
|
|
17
15
|
context.logger.debug("Handling subscribe response", {
|
|
18
16
|
roomId: message.data.room_id,
|
|
@@ -40,7 +38,7 @@ class SubscribeResponseHandler extends base_handler_1.BaseMessageHandler {
|
|
|
40
38
|
message: message.data.message
|
|
41
39
|
});
|
|
42
40
|
// Emit error event
|
|
43
|
-
this.emit(context, "error", new
|
|
41
|
+
this.emit(context, "error", new events_1.SDKError(`Subscription failed: ${message.data.message}`, types_1.ErrorCode.OPERATION_FAILED, { roomId: message.data.room_id }, true));
|
|
44
42
|
}
|
|
45
43
|
}
|
|
46
44
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscribe-response-handler.js","sourceRoot":"","sources":["../../../src/handlers/message-handlers/subscribe-response-handler.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,
|
|
1
|
+
{"version":3,"file":"subscribe-response-handler.js","sourceRoot":"","sources":["../../../src/handlers/message-handlers/subscribe-response-handler.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,uCAAoF;AACpF,+CAA8C;AAC9C,iDAAoD;AAGpD,MAAa,wBAAyB,SAAQ,iCAAqC;IACxE,IAAI,GAAG,WAAoB,CAAC;IAC5B,MAAM,GAAG,+BAAuB,CAAC;IAEhC,eAAe,CAAC,OAA0B,EAAE,OAAuB;QAC3E,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,6BAA6B,EAAE;YAClD,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,OAAO;YAC5B,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,OAAO;SAC9B,CAAC,CAAC;QAEH,IAAI,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;YACzB,6DAA6D;YAC7D,IAAI,OAAO,CAAC,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;gBACtD,OAAO,CAAC,WAAW,CAAC,mBAAmB,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;YACtE,CAAC;YAED,6BAA6B;YAC7B,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,iBAAiB,EAAE;gBACpC,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,OAAO;gBAC5B,aAAa,EAAE,OAAO,CAAC,IAAI,CAAC,aAAa,IAAI,EAAE;aAChD,CAAC,CAAC;YAEH,iCAAiC;YACjC,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,iBAAiB,EAAE;gBAC3C,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,OAAO;gBAC5B,aAAa,EAAE,OAAO,CAAC,IAAI,CAAC,aAAa;aAC1C,CAAC,CAAC;QACL,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,0BAA0B,EAAE;gBAC9C,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,OAAO;gBAC5B,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,OAAO;aAC9B,CAAC,CAAC;YAEH,mBAAmB;YACnB,IAAI,CAAC,IAAI,CACP,OAAO,EACP,OAAO,EACP,IAAI,iBAAQ,CACV,wBAAwB,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,EAC9C,iBAAS,CAAC,gBAAgB,EAC1B,EAAE,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,EAChC,IAAI,CACL,CACF,CAAC;QACJ,CAAC;IACH,CAAC;CACF;AA9CD,4DA8CC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Handler for task_quote messages (v2.2.0)
|
|
3
|
+
* Processes quotes from the coordinator for the quote-approve payment flow
|
|
4
|
+
*/
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
import { TaskQuoteMessage } from "../../types";
|
|
7
|
+
import { BaseMessageHandler } from "./base-handler";
|
|
8
|
+
import { HandlerContext } from "./types";
|
|
9
|
+
export declare class TaskQuoteHandler extends BaseMessageHandler<TaskQuoteMessage> {
|
|
10
|
+
readonly type: "task_quote";
|
|
11
|
+
readonly schema: z.ZodSchema<TaskQuoteMessage>;
|
|
12
|
+
protected handleValidated(message: TaskQuoteMessage, context: HandlerContext): void;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=task-quote-handler.d.ts.map
|