@shepai/cli 1.181.0 → 1.182.0-pr512.369be8e
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/apis/json-schema/MessagingCommand.yaml +28 -0
- package/apis/json-schema/MessagingCommandType.yaml +17 -0
- package/apis/json-schema/MessagingConfig.yaml +40 -0
- package/apis/json-schema/MessagingFrameType.yaml +8 -0
- package/apis/json-schema/MessagingNotification.yaml +22 -0
- package/apis/json-schema/MessagingPlatform.yaml +7 -0
- package/apis/json-schema/MessagingPlatformConfig.yaml +38 -0
- package/apis/json-schema/Settings.yaml +3 -0
- package/dist/packages/core/src/application/ports/output/services/gateway-client.interface.d.ts +58 -0
- package/dist/packages/core/src/application/ports/output/services/gateway-client.interface.d.ts.map +1 -0
- package/dist/packages/core/src/application/ports/output/services/gateway-client.interface.js +10 -0
- package/dist/packages/core/src/application/ports/output/services/message-sender.interface.d.ts +18 -0
- package/dist/packages/core/src/application/ports/output/services/message-sender.interface.d.ts.map +1 -0
- package/dist/packages/core/src/application/ports/output/services/message-sender.interface.js +9 -0
- package/dist/packages/core/src/application/ports/output/services/messaging-service.interface.d.ts +34 -0
- package/dist/packages/core/src/application/ports/output/services/messaging-service.interface.d.ts.map +1 -0
- package/dist/packages/core/src/application/ports/output/services/messaging-service.interface.js +12 -0
- package/dist/packages/core/src/application/ports/output/services/telegram-client.interface.d.ts +19 -0
- package/dist/packages/core/src/application/ports/output/services/telegram-client.interface.d.ts.map +1 -0
- package/dist/packages/core/src/application/ports/output/services/telegram-client.interface.js +8 -0
- package/dist/packages/core/src/application/use-cases/messaging/begin-pairing.use-case.d.ts +46 -0
- package/dist/packages/core/src/application/use-cases/messaging/begin-pairing.use-case.d.ts.map +1 -0
- package/dist/packages/core/src/application/use-cases/messaging/begin-pairing.use-case.js +148 -0
- package/dist/packages/core/src/application/use-cases/messaging/confirm-pairing.use-case.d.ts +19 -0
- package/dist/packages/core/src/application/use-cases/messaging/confirm-pairing.use-case.d.ts.map +1 -0
- package/dist/packages/core/src/application/use-cases/messaging/confirm-pairing.use-case.js +63 -0
- package/dist/packages/core/src/application/use-cases/messaging/disconnect-messaging.use-case.d.ts +19 -0
- package/dist/packages/core/src/application/use-cases/messaging/disconnect-messaging.use-case.d.ts.map +1 -0
- package/dist/packages/core/src/application/use-cases/messaging/disconnect-messaging.use-case.js +65 -0
- package/dist/packages/core/src/domain/generated/output.d.ts +155 -0
- package/dist/packages/core/src/domain/generated/output.d.ts.map +1 -1
- package/dist/packages/core/src/domain/generated/output.js +26 -0
- package/dist/packages/core/src/infrastructure/di/container.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/di/container.js +117 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts +24 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.js +117 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/056-add-messaging-remote-control.d.ts +22 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/056-add-messaging-remote-control.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/056-add-messaging-remote-control.js +62 -0
- package/dist/packages/core/src/infrastructure/repositories/sqlite-settings.repository.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/repositories/sqlite-settings.repository.js +43 -3
- package/dist/packages/core/src/infrastructure/services/messaging/chat-relay.d.ts +45 -0
- package/dist/packages/core/src/infrastructure/services/messaging/chat-relay.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/services/messaging/chat-relay.js +100 -0
- package/dist/packages/core/src/infrastructure/services/messaging/command-executor.d.ts +53 -0
- package/dist/packages/core/src/infrastructure/services/messaging/command-executor.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/services/messaging/command-executor.js +200 -0
- package/dist/packages/core/src/infrastructure/services/messaging/content-sanitizer.d.ts +23 -0
- package/dist/packages/core/src/infrastructure/services/messaging/content-sanitizer.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/services/messaging/content-sanitizer.js +39 -0
- package/dist/packages/core/src/infrastructure/services/messaging/http-gateway.client.d.ts +19 -0
- package/dist/packages/core/src/infrastructure/services/messaging/http-gateway.client.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/services/messaging/http-gateway.client.js +124 -0
- package/dist/packages/core/src/infrastructure/services/messaging/http-telegram.client.d.ts +18 -0
- package/dist/packages/core/src/infrastructure/services/messaging/http-telegram.client.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/services/messaging/http-telegram.client.js +60 -0
- package/dist/packages/core/src/infrastructure/services/messaging/messaging-tunnel.adapter.d.ts +68 -0
- package/dist/packages/core/src/infrastructure/services/messaging/messaging-tunnel.adapter.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/services/messaging/messaging-tunnel.adapter.js +262 -0
- package/dist/packages/core/src/infrastructure/services/messaging/messaging.service.d.ts +78 -0
- package/dist/packages/core/src/infrastructure/services/messaging/messaging.service.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/services/messaging/messaging.service.js +279 -0
- package/dist/packages/core/src/infrastructure/services/messaging/notification-emitter.d.ts +33 -0
- package/dist/packages/core/src/infrastructure/services/messaging/notification-emitter.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/services/messaging/notification-emitter.js +79 -0
- package/dist/packages/core/src/infrastructure/services/messaging/stub-gateway.client.d.ts +12 -0
- package/dist/packages/core/src/infrastructure/services/messaging/stub-gateway.client.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/services/messaging/stub-gateway.client.js +26 -0
- package/dist/packages/core/src/infrastructure/services/messaging/telegram-message-sender.d.ts +26 -0
- package/dist/packages/core/src/infrastructure/services/messaging/telegram-message-sender.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/services/messaging/telegram-message-sender.js +49 -0
- package/dist/packages/core/src/infrastructure/services/messaging/telegram-webhook.parser.d.ts +28 -0
- package/dist/packages/core/src/infrastructure/services/messaging/telegram-webhook.parser.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/services/messaging/telegram-webhook.parser.js +45 -0
- package/dist/packages/core/src/infrastructure/services/messaging/tunnel-protocol.d.ts +102 -0
- package/dist/packages/core/src/infrastructure/services/messaging/tunnel-protocol.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/services/messaging/tunnel-protocol.js +16 -0
- package/dist/packages/core/src/infrastructure/services/messaging/whatsapp-webhook.parser.d.ts +39 -0
- package/dist/packages/core/src/infrastructure/services/messaging/whatsapp-webhook.parser.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/services/messaging/whatsapp-webhook.parser.js +56 -0
- package/dist/src/presentation/cli/commands/_serve.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/_serve.command.js +6 -0
- package/dist/src/presentation/cli/commands/app/del.command.d.ts +14 -0
- package/dist/src/presentation/cli/commands/app/del.command.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/app/del.command.js +58 -0
- package/dist/src/presentation/cli/commands/app/index.d.ts +20 -0
- package/dist/src/presentation/cli/commands/app/index.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/app/index.js +33 -0
- package/dist/src/presentation/cli/commands/app/ls.command.d.ts +11 -0
- package/dist/src/presentation/cli/commands/app/ls.command.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/app/ls.command.js +74 -0
- package/dist/src/presentation/cli/commands/app/new.command.d.ts +17 -0
- package/dist/src/presentation/cli/commands/app/new.command.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/app/new.command.js +58 -0
- package/dist/src/presentation/cli/commands/app/resolve-application.d.ts +10 -0
- package/dist/src/presentation/cli/commands/app/resolve-application.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/app/resolve-application.js +33 -0
- package/dist/src/presentation/cli/commands/app/show.command.d.ts +11 -0
- package/dist/src/presentation/cli/commands/app/show.command.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/app/show.command.js +95 -0
- package/dist/src/presentation/cli/commands/settings/index.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/settings/index.js +3 -1
- package/dist/src/presentation/cli/commands/settings/messaging.command.d.ts +17 -0
- package/dist/src/presentation/cli/commands/settings/messaging.command.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/settings/messaging.command.js +187 -0
- package/dist/src/presentation/cli/index.js +2 -0
- package/dist/src/presentation/web/app/actions/messaging.d.ts +29 -0
- package/dist/src/presentation/web/app/actions/messaging.d.ts.map +1 -0
- package/dist/src/presentation/web/app/actions/messaging.js +55 -0
- package/dist/src/presentation/web/components/features/settings/messaging-settings-section.d.ts +6 -0
- package/dist/src/presentation/web/components/features/settings/messaging-settings-section.d.ts.map +1 -0
- package/dist/src/presentation/web/components/features/settings/messaging-settings-section.js +206 -0
- package/dist/src/presentation/web/components/features/settings/messaging-settings-section.stories.d.ts +17 -0
- package/dist/src/presentation/web/components/features/settings/messaging-settings-section.stories.d.ts.map +1 -0
- package/dist/src/presentation/web/components/features/settings/messaging-settings-section.stories.js +55 -0
- package/dist/src/presentation/web/components/features/settings/settings-page-client.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/settings/settings-page-client.js +9 -2
- package/dist/src/presentation/web/dev-server.js +27 -0
- package/dist/translations/ar/cli.json +63 -0
- package/dist/translations/ar/web.json +2 -1
- package/dist/translations/de/cli.json +63 -0
- package/dist/translations/de/web.json +2 -1
- package/dist/translations/en/cli.json +63 -0
- package/dist/translations/en/web.json +13 -12
- package/dist/translations/es/cli.json +63 -0
- package/dist/translations/es/web.json +2 -1
- package/dist/translations/fr/cli.json +63 -0
- package/dist/translations/fr/web.json +2 -1
- package/dist/translations/he/cli.json +63 -0
- package/dist/translations/he/web.json +2 -1
- package/dist/translations/pt/cli.json +63 -0
- package/dist/translations/pt/web.json +2 -1
- package/dist/translations/ru/cli.json +63 -0
- package/dist/translations/ru/web.json +2 -1
- package/dist/translations/uk/cli.json +63 -0
- package/dist/translations/uk/web.json +2 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +3 -1
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/build-manifest.json +2 -2
- package/web/.next/fallback-build-manifest.json +2 -2
- package/web/.next/prerender-manifest.json +3 -3
- package/web/.next/required-server-files.js +3 -3
- package/web/.next/required-server-files.json +3 -3
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +32 -32
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/chat/page/server-reference-manifest.json +30 -30
- package/web/.next/server/app/(dashboard)/@drawer/chat/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/chat/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +33 -33
- package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +41 -41
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +41 -41
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +31 -31
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +31 -31
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/chat/page/server-reference-manifest.json +30 -30
- package/web/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +33 -33
- package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +41 -41
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +41 -41
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +30 -30
- package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +31 -31
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +31 -31
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/_global-error.html +2 -2
- package/web/.next/server/app/_global-error.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/_not-found/page/server-reference-manifest.json +7 -7
- package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -1
- package/web/.next/server/app/api/evidence/route.js.nft.json +1 -1
- package/web/.next/server/app/api/graph-data/route.js.nft.json +1 -1
- package/web/.next/server/app/api/interactive/chat/[featureId]/messages/route.js.nft.json +1 -1
- package/web/.next/server/app/application/[id]/page/server-reference-manifest.json +15 -15
- package/web/.next/server/app/application/[id]/page.js.nft.json +1 -1
- package/web/.next/server/app/application/[id]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/features/page/server-reference-manifest.json +7 -7
- package/web/.next/server/app/features/page.js.nft.json +1 -1
- package/web/.next/server/app/features/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/settings/page/server-reference-manifest.json +65 -20
- package/web/.next/server/app/settings/page.js +1 -1
- package/web/.next/server/app/settings/page.js.nft.json +1 -1
- package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/skills/page/server-reference-manifest.json +15 -15
- package/web/.next/server/app/skills/page.js.nft.json +1 -1
- package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/tools/page/server-reference-manifest.json +13 -13
- package/web/.next/server/app/tools/page.js.nft.json +1 -1
- package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/version/page/server-reference-manifest.json +7 -7
- package/web/.next/server/app/version/page.js.nft.json +1 -1
- package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__b2a4bfcc._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__b2a4bfcc._.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__cd67a84c._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__cd67a84c._.js.map +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js +2 -2
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{7f428_lucide-react_dist_esm_icons_5da25833._.js → 7f428_lucide-react_dist_esm_icons_469d51b7._.js} +2 -2
- package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_469d51b7._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__013a0318._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__013a0318._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__17dadd08._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__17dadd08._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__1925bef0._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__1a9687c4._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__1a9687c4._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__24756fa9._.js +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__24756fa9._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__42d066e1._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__42d066e1._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__4ee8be85._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__70986695._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__70986695._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__a5ea76a6._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__a5ea76a6._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__dd3e834e._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__dd3e834e._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__e265da61._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__f3ca7bea._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__f3ca7bea._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__bb391c45._.js → [root-of-the-server]__f4f07ee6._.js} +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__f4f07ee6._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_0277d3b5._.js +1 -1
- package/web/.next/server/chunks/ssr/_0277d3b5._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_da028026._.js → _1c03437e._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_da028026._.js.map → _1c03437e._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_45496654._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_655cc4fd._.js → _49838974._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_655cc4fd._.js.map → _49838974._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_56b9d60f._.js +1 -1
- package/web/.next/server/chunks/ssr/_56b9d60f._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_708a9069._.js +3 -0
- package/web/.next/server/chunks/ssr/_708a9069._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{_295fffde._.js → _86bb5eb1._.js} +6 -2
- package/web/.next/server/chunks/ssr/_86bb5eb1._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_946a7fc6._.js +1 -1
- package/web/.next/server/chunks/ssr/_946a7fc6._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_fbf4db9c._.js → _b6df235f._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_fbf4db9c._.js.map → _b6df235f._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_bad61758._.js +3 -0
- package/web/.next/server/chunks/ssr/_bad61758._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{_e5753970._.js → _c5357cf5._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_e5753970._.js.map → _c5357cf5._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_d7d82308._.js +3 -0
- package/web/.next/server/chunks/ssr/_d7d82308._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_dd852eae._.js +3 -0
- package/web/.next/server/chunks/ssr/_dd852eae._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_eff1b518._.js +1 -1
- package/web/.next/server/chunks/ssr/_eff1b518._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_f227429a._.js +1 -1
- package/web/.next/server/chunks/ssr/_f227429a._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_f6b812ec._.js +9 -0
- package/web/.next/server/chunks/ssr/_f6b812ec._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_f86fc1bf._.js +1 -1
- package/web/.next/server/chunks/ssr/_f86fc1bf._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_f8c55130._.js +1 -1
- package/web/.next/server/chunks/ssr/{_5bb39227._.js → _fa95e517._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_5bb39227._.js.map → _fa95e517._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/f3a1f_components_common_control-center-drawer_repository-drawer-client_tsx_39a00c03._.js +1 -1
- package/web/.next/server/chunks/ssr/node_modules__pnpm_64cc95e9._.js +3 -0
- package/web/.next/server/chunks/ssr/node_modules__pnpm_64cc95e9._.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_36f2bc45._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_36f2bc45._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_486908de._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_486908de._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_5c3596bc._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_5c3596bc._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_6159fef8._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_6159fef8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_6326f81e._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_6326f81e._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_6b2fdcd8._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_6b2fdcd8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_74703c9f._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_74703c9f._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_a8056dac._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_a8056dac._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_ad42cc73._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_ad42cc73._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_baaca5d5._.js +3 -3
- package/web/.next/server/chunks/ssr/src_presentation_web_b00bfb08._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_b00bfb08._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_895e5bfa._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_895e5bfa._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_common_base-drawer_base-drawer_tsx_97dfbbc8._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_common_base-drawer_base-drawer_tsx_97dfbbc8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_skills_8a174cac._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_skills_8a174cac._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_f1edcf5e._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_f1edcf5e._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_f9436804._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_f9436804._.js.map +1 -1
- package/web/.next/server/chunks/ssr/translations_23dd5e7e._.js +1 -1
- package/web/.next/server/chunks/ssr/translations_23dd5e7e._.js.map +1 -1
- package/web/.next/server/pages/500.html +2 -2
- package/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/server/server-reference-manifest.json +109 -64
- package/web/.next/static/chunks/0239d68df2738a2a.js +1 -0
- package/web/.next/static/chunks/{b40755bc75789277.js → 101e7888c4b7e328.js} +1 -1
- package/web/.next/static/chunks/{53f9385d4a447ad4.js → 18fa374b1b856687.js} +2 -2
- package/web/.next/static/chunks/{7c3fe3c694874dea.js → 32940aa08b947f66.js} +1 -1
- package/web/.next/static/chunks/{ae94e98b7163890b.js → 42d86b3a628702b0.js} +1 -1
- package/web/.next/static/chunks/6da04daaac881f27.js +1 -0
- package/web/.next/static/chunks/6f9ba92ee19bcbd7.js +5 -0
- package/web/.next/static/chunks/{25bbd99fa3dcc0b2.js → 79a8ec8b8de391f8.js} +1 -1
- package/web/.next/static/chunks/{e8444bf5f6c35f8b.js → 7bbe49d9daedd94d.js} +5 -1
- package/web/.next/static/chunks/{d8e96baa3feb79cb.js → 7e0cb9a6e06f075f.js} +1 -1
- package/web/.next/static/chunks/87b197ebd301232a.js +3 -0
- package/web/.next/static/chunks/8fe70d4e73e1fe31.css +1 -0
- package/web/.next/static/chunks/{6ad23a3ac827b65b.js → b3051a00d29f0f0f.js} +1 -1
- package/web/.next/static/chunks/b6b07ccbccda00e2.js +7 -0
- package/web/.next/static/chunks/b9b3a6d83e07b213.js +1 -0
- package/web/.next/static/chunks/c92bc820f657f9d9.js +1 -0
- package/web/.next/static/chunks/{e11508a76f5fca98.js → d436ca26f19e7c42.js} +1 -1
- package/web/.next/static/chunks/{5635fe220632fced.js → d8505faa90c97f2b.js} +1 -1
- package/web/.next/static/chunks/{d7310881615cb55b.js → e2b0da48f8e15118.js} +1 -1
- package/web/.next/static/chunks/{443c0073e58878d8.js → e3ecbef934b77afa.js} +1 -1
- package/web/.next/static/chunks/{b6ddc3e5f64bef7f.js → e6fc771fc21a0b62.js} +1 -1
- package/web/.next/static/chunks/ecafea5bc026ed41.js +1 -0
- package/web/.next/static/chunks/{fe29d30a75e697ed.js → f28fa2d7fa19eee6.js} +1 -1
- package/web/.next/static/chunks/f79d32f56056c680.js +1 -0
- package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_5da25833._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__a6f2b763._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__a6f2b763._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__bb391c45._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_295fffde._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_44531b76._.js +0 -9
- package/web/.next/server/chunks/ssr/_44531b76._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_5bf2415e._.js +0 -7
- package/web/.next/server/chunks/ssr/_5bf2415e._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_869a3a15._.js +0 -3
- package/web/.next/server/chunks/ssr/_869a3a15._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_b227ff50._.js +0 -3
- package/web/.next/server/chunks/ssr/_b227ff50._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_e071ba48._.js +0 -3
- package/web/.next/server/chunks/ssr/_e071ba48._.js.map +0 -1
- package/web/.next/server/chunks/ssr/node_modules__pnpm_747b43ac._.js +0 -3
- package/web/.next/server/chunks/ssr/node_modules__pnpm_747b43ac._.js.map +0 -1
- package/web/.next/static/chunks/06b9d6dbf635c370.css +0 -1
- package/web/.next/static/chunks/15951ad67a810e2c.js +0 -5
- package/web/.next/static/chunks/1ae0cf5be30ef398.js +0 -1
- package/web/.next/static/chunks/7a9d8b705c0f8d2d.js +0 -7
- package/web/.next/static/chunks/8492d8e0b5f9a4e8.js +0 -1
- package/web/.next/static/chunks/927442d2628f6e22.js +0 -1
- package/web/.next/static/chunks/b99506a6f7bc2fa8.js +0 -1
- package/web/.next/static/chunks/be165be5db7a6054.js +0 -7
- package/web/.next/static/chunks/e65f14d14ad46a32.js +0 -1
- /package/web/.next/static/{_PzlF7w3QzhaBsMnhT75_ → i04ZwSXpTvkppxSePII4p}/_buildManifest.js +0 -0
- /package/web/.next/static/{_PzlF7w3QzhaBsMnhT75_ → i04ZwSXpTvkppxSePII4p}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{_PzlF7w3QzhaBsMnhT75_ → i04ZwSXpTvkppxSePII4p}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
$schema: https://json-schema.org/draft/2020-12/schema
|
|
2
|
+
$id: MessagingCommand.yaml
|
|
3
|
+
type: object
|
|
4
|
+
properties:
|
|
5
|
+
type:
|
|
6
|
+
$ref: MessagingFrameType.yaml
|
|
7
|
+
description: "Type of frame: command, chat_message, or chat_control"
|
|
8
|
+
command:
|
|
9
|
+
$ref: MessagingCommandType.yaml
|
|
10
|
+
description: The slash command name (new, approve, reject, stop, resume, status)
|
|
11
|
+
featureId:
|
|
12
|
+
type: string
|
|
13
|
+
description: Target feature ID (short numeric or full UUID)
|
|
14
|
+
args:
|
|
15
|
+
type: string
|
|
16
|
+
description: Free-text arguments (feature description, rejection feedback, chat text)
|
|
17
|
+
chatId:
|
|
18
|
+
type: string
|
|
19
|
+
description: Chat ID for routing responses back to the correct conversation
|
|
20
|
+
platform:
|
|
21
|
+
$ref: MessagingPlatform.yaml
|
|
22
|
+
description: Platform for routing responses back (telegram or whatsapp)
|
|
23
|
+
required:
|
|
24
|
+
- type
|
|
25
|
+
- command
|
|
26
|
+
- chatId
|
|
27
|
+
- platform
|
|
28
|
+
description: A parsed command received from a messaging platform via the Gateway tunnel
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
$schema: https://json-schema.org/draft/2020-12/schema
|
|
2
|
+
$id: MessagingCommandType.yaml
|
|
3
|
+
type: string
|
|
4
|
+
enum:
|
|
5
|
+
- new
|
|
6
|
+
- approve
|
|
7
|
+
- reject
|
|
8
|
+
- stop
|
|
9
|
+
- resume
|
|
10
|
+
- status
|
|
11
|
+
- mute
|
|
12
|
+
- unmute
|
|
13
|
+
- list
|
|
14
|
+
- chat
|
|
15
|
+
- end
|
|
16
|
+
- help
|
|
17
|
+
description: Slash commands supported via messaging remote control
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
$schema: https://json-schema.org/draft/2020-12/schema
|
|
2
|
+
$id: MessagingConfig.yaml
|
|
3
|
+
type: object
|
|
4
|
+
properties:
|
|
5
|
+
enabled:
|
|
6
|
+
type: boolean
|
|
7
|
+
default: false
|
|
8
|
+
description: Whether messaging remote control is enabled
|
|
9
|
+
gatewayUrl:
|
|
10
|
+
type: string
|
|
11
|
+
description: URL of the Commands.com Gateway instance
|
|
12
|
+
deviceId:
|
|
13
|
+
type: string
|
|
14
|
+
description: Device ID used when registering integration routes and opening the tunnel
|
|
15
|
+
gatewayClientId:
|
|
16
|
+
type: string
|
|
17
|
+
description: OAuth client ID for fetching gateway access tokens (demo mode uses public client)
|
|
18
|
+
telegram:
|
|
19
|
+
$ref: MessagingPlatformConfig.yaml
|
|
20
|
+
description: Telegram platform configuration
|
|
21
|
+
whatsapp:
|
|
22
|
+
$ref: MessagingPlatformConfig.yaml
|
|
23
|
+
description: WhatsApp platform configuration
|
|
24
|
+
debounceMs:
|
|
25
|
+
type: integer
|
|
26
|
+
minimum: -2147483648
|
|
27
|
+
maximum: 2147483647
|
|
28
|
+
default: 5000
|
|
29
|
+
description: "Debounce window in milliseconds for notification delivery (default: 5000)"
|
|
30
|
+
chatBufferMs:
|
|
31
|
+
type: integer
|
|
32
|
+
minimum: -2147483648
|
|
33
|
+
maximum: 2147483647
|
|
34
|
+
default: 3000
|
|
35
|
+
description: "Buffer interval in milliseconds for chat relay output batching (default: 3000)"
|
|
36
|
+
required:
|
|
37
|
+
- enabled
|
|
38
|
+
- debounceMs
|
|
39
|
+
- chatBufferMs
|
|
40
|
+
description: Messaging remote control configuration
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
$schema: https://json-schema.org/draft/2020-12/schema
|
|
2
|
+
$id: MessagingNotification.yaml
|
|
3
|
+
type: object
|
|
4
|
+
properties:
|
|
5
|
+
event:
|
|
6
|
+
type: string
|
|
7
|
+
description: "Event type: feature lifecycle, CI status, gate waiting, command response, chat response"
|
|
8
|
+
featureId:
|
|
9
|
+
type: string
|
|
10
|
+
description: ID of the feature this notification relates to
|
|
11
|
+
title:
|
|
12
|
+
type: string
|
|
13
|
+
description: Human-readable feature name or title
|
|
14
|
+
message:
|
|
15
|
+
type: string
|
|
16
|
+
description: Human-readable notification body (sanitized, no code or secrets)
|
|
17
|
+
required:
|
|
18
|
+
- event
|
|
19
|
+
- featureId
|
|
20
|
+
- title
|
|
21
|
+
- message
|
|
22
|
+
description: A notification or response sent from Shep to a messaging platform via the Gateway tunnel
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
$schema: https://json-schema.org/draft/2020-12/schema
|
|
2
|
+
$id: MessagingPlatformConfig.yaml
|
|
3
|
+
type: object
|
|
4
|
+
properties:
|
|
5
|
+
enabled:
|
|
6
|
+
type: boolean
|
|
7
|
+
default: false
|
|
8
|
+
description: Whether this platform connection is active
|
|
9
|
+
chatId:
|
|
10
|
+
type: string
|
|
11
|
+
description: Platform-specific chat ID for message routing (set during pairing)
|
|
12
|
+
paired:
|
|
13
|
+
type: boolean
|
|
14
|
+
default: false
|
|
15
|
+
description: Whether the chat has been verified via pairing code
|
|
16
|
+
pendingPairingCode:
|
|
17
|
+
type: string
|
|
18
|
+
description: One-time code shown to the user during pairing, cleared once confirmed
|
|
19
|
+
pendingPairingExpiresAt:
|
|
20
|
+
type: string
|
|
21
|
+
format: date-time
|
|
22
|
+
description: Expiry timestamp for the pending pairing code (ISO-8601)
|
|
23
|
+
routeId:
|
|
24
|
+
type: string
|
|
25
|
+
description: Gateway integration route ID allocated during pairing
|
|
26
|
+
routeToken:
|
|
27
|
+
type: string
|
|
28
|
+
description: Gateway integration route token (path-auth) allocated during pairing
|
|
29
|
+
publicUrl:
|
|
30
|
+
type: string
|
|
31
|
+
description: Public webhook URL that the messaging platform should POST updates to
|
|
32
|
+
botToken:
|
|
33
|
+
type: string
|
|
34
|
+
description: "Bot API token used by the daemon to send outbound messages (Telegram: 123456:ABC...)"
|
|
35
|
+
required:
|
|
36
|
+
- enabled
|
|
37
|
+
- paired
|
|
38
|
+
description: Configuration for a single messaging platform connection
|
|
@@ -36,6 +36,9 @@ properties:
|
|
|
36
36
|
fabLayout:
|
|
37
37
|
$ref: FabLayoutConfig.yaml
|
|
38
38
|
description: FAB layout configuration (optional, defaults applied at runtime)
|
|
39
|
+
messaging:
|
|
40
|
+
$ref: MessagingConfig.yaml
|
|
41
|
+
description: Messaging remote control configuration (optional, defaults applied at runtime)
|
|
39
42
|
required:
|
|
40
43
|
- models
|
|
41
44
|
- user
|
package/dist/packages/core/src/application/ports/output/services/gateway-client.interface.d.ts
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gateway Client Interface
|
|
3
|
+
*
|
|
4
|
+
* Output port for the Commands.com Gateway HTTP API. Implementations handle
|
|
5
|
+
* authentication (OAuth demo/OIDC) and integration-route provisioning so the
|
|
6
|
+
* MessagingService can receive inbound webhooks from Telegram/WhatsApp.
|
|
7
|
+
*
|
|
8
|
+
* Reference: https://github.com/Commands-com/gateway/blob/main/docs/openapi.yaml
|
|
9
|
+
*/
|
|
10
|
+
export interface GatewayOAuthToken {
|
|
11
|
+
accessToken: string;
|
|
12
|
+
tokenType: string;
|
|
13
|
+
/** Absolute expiry time in ms since epoch. */
|
|
14
|
+
expiresAt: number;
|
|
15
|
+
refreshToken?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface GatewayIntegrationRoute {
|
|
18
|
+
routeId: string;
|
|
19
|
+
routeToken: string;
|
|
20
|
+
publicUrl: string;
|
|
21
|
+
deviceId: string;
|
|
22
|
+
interfaceType: string;
|
|
23
|
+
}
|
|
24
|
+
export interface CreateIntegrationRouteInput {
|
|
25
|
+
deviceId: string;
|
|
26
|
+
interfaceType: string;
|
|
27
|
+
/** Optional client-provided token override. Gateway issues one if omitted. */
|
|
28
|
+
routeToken?: string;
|
|
29
|
+
tokenMaxAgeDays?: number;
|
|
30
|
+
maxBodyBytes?: number;
|
|
31
|
+
deadlineMs?: number;
|
|
32
|
+
}
|
|
33
|
+
export interface FetchTokenInput {
|
|
34
|
+
gatewayUrl: string;
|
|
35
|
+
clientId: string;
|
|
36
|
+
/** For demo auth the client secret is optional. */
|
|
37
|
+
clientSecret?: string;
|
|
38
|
+
scope?: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Port for interacting with the Commands.com Gateway HTTP API.
|
|
42
|
+
*
|
|
43
|
+
* Implementations MUST NOT leak HTTP specifics (status codes, headers) to
|
|
44
|
+
* the application layer — return domain objects or throw domain errors.
|
|
45
|
+
*/
|
|
46
|
+
export interface IGatewayClient {
|
|
47
|
+
/**
|
|
48
|
+
* Fetch (or refresh) an OAuth access token for the configured client.
|
|
49
|
+
* Uses the client_credentials grant in demo mode.
|
|
50
|
+
*/
|
|
51
|
+
fetchAccessToken(input: FetchTokenInput): Promise<GatewayOAuthToken>;
|
|
52
|
+
/**
|
|
53
|
+
* Register a new integration route on the gateway. The returned `publicUrl`
|
|
54
|
+
* is what the messaging platform (Telegram webhook, etc.) should POST to.
|
|
55
|
+
*/
|
|
56
|
+
createIntegrationRoute(gatewayUrl: string, accessToken: string, input: CreateIntegrationRouteInput): Promise<GatewayIntegrationRoute>;
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=gateway-client.interface.d.ts.map
|
package/dist/packages/core/src/application/ports/output/services/gateway-client.interface.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gateway-client.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/services/gateway-client.interface.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,8CAA8C;IAC9C,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,8EAA8E;IAC9E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,mDAAmD;IACnD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,gBAAgB,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAErE;;;OAGG;IACH,sBAAsB,CACpB,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,2BAA2B,GACjC,OAAO,CAAC,uBAAuB,CAAC,CAAC;CACrC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gateway Client Interface
|
|
3
|
+
*
|
|
4
|
+
* Output port for the Commands.com Gateway HTTP API. Implementations handle
|
|
5
|
+
* authentication (OAuth demo/OIDC) and integration-route provisioning so the
|
|
6
|
+
* MessagingService can receive inbound webhooks from Telegram/WhatsApp.
|
|
7
|
+
*
|
|
8
|
+
* Reference: https://github.com/Commands-com/gateway/blob/main/docs/openapi.yaml
|
|
9
|
+
*/
|
|
10
|
+
export {};
|
package/dist/packages/core/src/application/ports/output/services/message-sender.interface.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Message Sender Interface
|
|
3
|
+
*
|
|
4
|
+
* Output port for delivering outbound messaging notifications to an end user
|
|
5
|
+
* (Telegram chat, WhatsApp conversation, etc.). Implementations make direct
|
|
6
|
+
* HTTPS calls to the respective platform APIs — the tunnel is for inbound
|
|
7
|
+
* webhook relay only, not for pushing notifications.
|
|
8
|
+
*/
|
|
9
|
+
import type { MessagingNotification } from '../../../../domain/generated/output.js';
|
|
10
|
+
export interface IMessageSender {
|
|
11
|
+
/**
|
|
12
|
+
* Deliver a notification to the configured end user. Implementations
|
|
13
|
+
* should handle platform routing (telegram vs whatsapp) internally based
|
|
14
|
+
* on current settings, and silently no-op if no platform is paired.
|
|
15
|
+
*/
|
|
16
|
+
send(notification: MessagingNotification): Promise<void>;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=message-sender.interface.d.ts.map
|
package/dist/packages/core/src/application/ports/output/services/message-sender.interface.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-sender.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/services/message-sender.interface.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAEpF,MAAM,WAAW,cAAc;IAC7B;;;;OAIG;IACH,IAAI,CAAC,YAAY,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1D"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Message Sender Interface
|
|
3
|
+
*
|
|
4
|
+
* Output port for delivering outbound messaging notifications to an end user
|
|
5
|
+
* (Telegram chat, WhatsApp conversation, etc.). Implementations make direct
|
|
6
|
+
* HTTPS calls to the respective platform APIs — the tunnel is for inbound
|
|
7
|
+
* webhook relay only, not for pushing notifications.
|
|
8
|
+
*/
|
|
9
|
+
export {};
|
package/dist/packages/core/src/application/ports/output/services/messaging-service.interface.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Messaging Service Interface
|
|
3
|
+
*
|
|
4
|
+
* Output port for the external messaging remote control subsystem.
|
|
5
|
+
* Enables controlling Shep via Telegram/WhatsApp through the
|
|
6
|
+
* Commands.com Gateway tunnel.
|
|
7
|
+
*
|
|
8
|
+
* Following Clean Architecture:
|
|
9
|
+
* - Application layer depends on this interface
|
|
10
|
+
* - Infrastructure layer provides concrete implementation (MessagingService)
|
|
11
|
+
*/
|
|
12
|
+
import type { MessagingNotification } from '../../../../domain/generated/output.js';
|
|
13
|
+
/**
|
|
14
|
+
* Port interface for the messaging remote control service.
|
|
15
|
+
*
|
|
16
|
+
* Implementations must:
|
|
17
|
+
* - Connect to the Gateway via WebSocket tunnel
|
|
18
|
+
* - Handle inbound commands (parsed by Gateway) and map them to use cases
|
|
19
|
+
* - Push outbound notifications through the tunnel for delivery to messaging apps
|
|
20
|
+
* - Support interactive chat relay between messaging apps and agent sessions
|
|
21
|
+
*/
|
|
22
|
+
export interface IMessagingService {
|
|
23
|
+
/** Start listening for inbound commands from the Gateway tunnel */
|
|
24
|
+
start(): Promise<void>;
|
|
25
|
+
/** Stop the messaging service and disconnect from the tunnel */
|
|
26
|
+
stop(): Promise<void>;
|
|
27
|
+
/** Send a notification to the user's messaging app via the Gateway */
|
|
28
|
+
sendNotification(notification: MessagingNotification): Promise<void>;
|
|
29
|
+
/** Check if messaging is configured and connected */
|
|
30
|
+
isConnected(): boolean;
|
|
31
|
+
/** Check if messaging is configured (credentials present, even if not connected) */
|
|
32
|
+
isConfigured(): boolean;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=messaging-service.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messaging-service.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/services/messaging-service.interface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAEpF;;;;;;;;GAQG;AACH,MAAM,WAAW,iBAAiB;IAChC,mEAAmE;IACnE,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAEvB,gEAAgE;IAChE,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAEtB,sEAAsE;IACtE,gBAAgB,CAAC,YAAY,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAErE,qDAAqD;IACrD,WAAW,IAAI,OAAO,CAAC;IAEvB,oFAAoF;IACpF,YAAY,IAAI,OAAO,CAAC;CACzB"}
|
package/dist/packages/core/src/application/ports/output/services/messaging-service.interface.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Messaging Service Interface
|
|
3
|
+
*
|
|
4
|
+
* Output port for the external messaging remote control subsystem.
|
|
5
|
+
* Enables controlling Shep via Telegram/WhatsApp through the
|
|
6
|
+
* Commands.com Gateway tunnel.
|
|
7
|
+
*
|
|
8
|
+
* Following Clean Architecture:
|
|
9
|
+
* - Application layer depends on this interface
|
|
10
|
+
* - Infrastructure layer provides concrete implementation (MessagingService)
|
|
11
|
+
*/
|
|
12
|
+
export {};
|
package/dist/packages/core/src/application/ports/output/services/telegram-client.interface.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Telegram Bot API Client Interface
|
|
3
|
+
*
|
|
4
|
+
* Output port for making outbound calls to api.telegram.org. Used by the
|
|
5
|
+
* messaging service to reply to users after processing a webhook, and to
|
|
6
|
+
* push debounced notifications from the daemon.
|
|
7
|
+
*/
|
|
8
|
+
export interface SendTelegramMessageInput {
|
|
9
|
+
/** Bot token (e.g. `123456:ABCDEF-...`). */
|
|
10
|
+
botToken: string;
|
|
11
|
+
chatId: string;
|
|
12
|
+
text: string;
|
|
13
|
+
/** Optional parse mode (`Markdown`, `MarkdownV2`, `HTML`). */
|
|
14
|
+
parseMode?: 'Markdown' | 'MarkdownV2' | 'HTML';
|
|
15
|
+
}
|
|
16
|
+
export interface ITelegramClient {
|
|
17
|
+
sendMessage(input: SendTelegramMessageInput): Promise<void>;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=telegram-client.interface.d.ts.map
|
package/dist/packages/core/src/application/ports/output/services/telegram-client.interface.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telegram-client.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/services/telegram-client.interface.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,WAAW,wBAAwB;IACvC,4CAA4C;IAC5C,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,8DAA8D;IAC9D,SAAS,CAAC,EAAE,UAAU,GAAG,YAAY,GAAG,MAAM,CAAC;CAChD;AAED,MAAM,WAAW,eAAe;IAC9B,WAAW,CAAC,KAAK,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7D"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Begin Messaging Pairing Use Case
|
|
3
|
+
*
|
|
4
|
+
* Initiates a pairing handshake for a messaging platform (Telegram/WhatsApp):
|
|
5
|
+
*
|
|
6
|
+
* 1. Validates the Gateway URL.
|
|
7
|
+
* 2. Fetches an OAuth access token from the Gateway (demo mode uses the
|
|
8
|
+
* public client; OIDC mode would inject a real client secret).
|
|
9
|
+
* 3. Creates an integration route on the Gateway for the target platform.
|
|
10
|
+
* The returned `publicUrl` is what the user must point their Telegram
|
|
11
|
+
* webhook (or WhatsApp callback) at.
|
|
12
|
+
* 4. Generates a one-time 6-digit pairing code and persists it along with
|
|
13
|
+
* the newly-allocated route details on settings.
|
|
14
|
+
* 5. Returns a session DTO for the presentation layer to render.
|
|
15
|
+
*
|
|
16
|
+
* The pairing is finalized when either:
|
|
17
|
+
* - The daemon's tunnel receives a `/pair <code>` message via a
|
|
18
|
+
* `tunnel.request` frame and calls ConfirmMessagingPairingUseCase (future
|
|
19
|
+
* auto-confirm path), or
|
|
20
|
+
* - The user clicks "Confirm pairing" in the UI / CLI after seeing the
|
|
21
|
+
* code echoed by their bot (current manual path).
|
|
22
|
+
*/
|
|
23
|
+
import { MessagingPlatform } from '../../../domain/generated/output.js';
|
|
24
|
+
import type { ISettingsRepository } from '../../ports/output/repositories/settings.repository.interface.js';
|
|
25
|
+
import type { IGatewayClient } from '../../ports/output/services/gateway-client.interface.js';
|
|
26
|
+
export interface BeginMessagingPairingInput {
|
|
27
|
+
platform: MessagingPlatform;
|
|
28
|
+
gatewayUrl: string;
|
|
29
|
+
}
|
|
30
|
+
export interface MessagingPairingSession {
|
|
31
|
+
platform: MessagingPlatform;
|
|
32
|
+
code: string;
|
|
33
|
+
/** ISO-8601 expiry. */
|
|
34
|
+
expiresAt: string;
|
|
35
|
+
gatewayUrl: string;
|
|
36
|
+
/** Public webhook URL the platform should POST updates to. */
|
|
37
|
+
publicUrl: string;
|
|
38
|
+
routeId: string;
|
|
39
|
+
}
|
|
40
|
+
export declare class BeginMessagingPairingUseCase {
|
|
41
|
+
private readonly settingsRepository;
|
|
42
|
+
private readonly gatewayClient;
|
|
43
|
+
constructor(settingsRepository: ISettingsRepository, gatewayClient: IGatewayClient);
|
|
44
|
+
execute(input: BeginMessagingPairingInput): Promise<MessagingPairingSession>;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=begin-pairing.use-case.d.ts.map
|
package/dist/packages/core/src/application/use-cases/messaging/begin-pairing.use-case.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"begin-pairing.use-case.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/application/use-cases/messaging/begin-pairing.use-case.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAIH,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kEAAkE,CAAC;AAC5G,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yDAAyD,CAAC;AAK9F,MAAM,WAAW,0BAA0B;IACzC,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,uBAAuB;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,8DAA8D;IAC9D,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB;AAwBD,qBACa,4BAA4B;IAGrC,OAAO,CAAC,QAAQ,CAAC,kBAAkB;IAEnC,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAFb,kBAAkB,EAAE,mBAAmB,EAEvC,aAAa,EAAE,cAAc;IAG1C,OAAO,CAAC,KAAK,EAAE,0BAA0B,GAAG,OAAO,CAAC,uBAAuB,CAAC;CAkFnF"}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Begin Messaging Pairing Use Case
|
|
3
|
+
*
|
|
4
|
+
* Initiates a pairing handshake for a messaging platform (Telegram/WhatsApp):
|
|
5
|
+
*
|
|
6
|
+
* 1. Validates the Gateway URL.
|
|
7
|
+
* 2. Fetches an OAuth access token from the Gateway (demo mode uses the
|
|
8
|
+
* public client; OIDC mode would inject a real client secret).
|
|
9
|
+
* 3. Creates an integration route on the Gateway for the target platform.
|
|
10
|
+
* The returned `publicUrl` is what the user must point their Telegram
|
|
11
|
+
* webhook (or WhatsApp callback) at.
|
|
12
|
+
* 4. Generates a one-time 6-digit pairing code and persists it along with
|
|
13
|
+
* the newly-allocated route details on settings.
|
|
14
|
+
* 5. Returns a session DTO for the presentation layer to render.
|
|
15
|
+
*
|
|
16
|
+
* The pairing is finalized when either:
|
|
17
|
+
* - The daemon's tunnel receives a `/pair <code>` message via a
|
|
18
|
+
* `tunnel.request` frame and calls ConfirmMessagingPairingUseCase (future
|
|
19
|
+
* auto-confirm path), or
|
|
20
|
+
* - The user clicks "Confirm pairing" in the UI / CLI after seeing the
|
|
21
|
+
* code echoed by their bot (current manual path).
|
|
22
|
+
*/
|
|
23
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
24
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
25
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
26
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
27
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
28
|
+
};
|
|
29
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
30
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
31
|
+
};
|
|
32
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
33
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
34
|
+
};
|
|
35
|
+
import { injectable, inject } from 'tsyringe';
|
|
36
|
+
import { randomInt, randomUUID } from 'node:crypto';
|
|
37
|
+
import { MessagingPlatform } from '../../../domain/generated/output.js';
|
|
38
|
+
const PAIRING_CODE_TTL_MS = 10 * 60 * 1000; // 10 minutes
|
|
39
|
+
const DEFAULT_GATEWAY_CLIENT_ID = 'commands-desktop-public';
|
|
40
|
+
function assertValidGatewayUrl(url) {
|
|
41
|
+
if (!url?.trim()) {
|
|
42
|
+
throw new Error('Gateway URL is required to begin pairing.');
|
|
43
|
+
}
|
|
44
|
+
try {
|
|
45
|
+
const parsed = new URL(url);
|
|
46
|
+
if (!parsed.protocol) {
|
|
47
|
+
throw new Error('invalid');
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
catch {
|
|
51
|
+
throw new Error('Gateway URL must be a valid URL (e.g., https://gateway.example.com).');
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
function generatePairingCode() {
|
|
55
|
+
return randomInt(0, 1_000_000).toString().padStart(6, '0');
|
|
56
|
+
}
|
|
57
|
+
function platformKey(platform) {
|
|
58
|
+
return platform === MessagingPlatform.Telegram ? 'telegram' : 'whatsapp';
|
|
59
|
+
}
|
|
60
|
+
let BeginMessagingPairingUseCase = class BeginMessagingPairingUseCase {
|
|
61
|
+
settingsRepository;
|
|
62
|
+
gatewayClient;
|
|
63
|
+
constructor(settingsRepository, gatewayClient) {
|
|
64
|
+
this.settingsRepository = settingsRepository;
|
|
65
|
+
this.gatewayClient = gatewayClient;
|
|
66
|
+
}
|
|
67
|
+
async execute(input) {
|
|
68
|
+
assertValidGatewayUrl(input.gatewayUrl);
|
|
69
|
+
const settings = await this.settingsRepository.load();
|
|
70
|
+
if (!settings) {
|
|
71
|
+
throw new Error('Settings not found. Please run initialization first.');
|
|
72
|
+
}
|
|
73
|
+
const existing = settings.messaging ?? {
|
|
74
|
+
enabled: false,
|
|
75
|
+
debounceMs: 5000,
|
|
76
|
+
chatBufferMs: 3000,
|
|
77
|
+
};
|
|
78
|
+
// Device ID is stable across platforms and across pairings. Generate
|
|
79
|
+
// lazily on first pairing so the gateway can scope all routes + the
|
|
80
|
+
// tunnel connection to the same device owner.
|
|
81
|
+
const deviceId = existing.deviceId ?? `shep-${randomUUID()}`;
|
|
82
|
+
const clientId = existing.gatewayClientId ?? DEFAULT_GATEWAY_CLIENT_ID;
|
|
83
|
+
const key = platformKey(input.platform);
|
|
84
|
+
// 1. Fetch OAuth access token from the gateway.
|
|
85
|
+
let accessToken;
|
|
86
|
+
try {
|
|
87
|
+
const token = await this.gatewayClient.fetchAccessToken({
|
|
88
|
+
gatewayUrl: input.gatewayUrl,
|
|
89
|
+
clientId,
|
|
90
|
+
});
|
|
91
|
+
accessToken = token.accessToken;
|
|
92
|
+
}
|
|
93
|
+
catch (err) {
|
|
94
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
95
|
+
throw new Error(`Gateway authentication failed: ${msg}`);
|
|
96
|
+
}
|
|
97
|
+
// 2. Create an integration route for this platform.
|
|
98
|
+
let route;
|
|
99
|
+
try {
|
|
100
|
+
route = await this.gatewayClient.createIntegrationRoute(input.gatewayUrl, accessToken, {
|
|
101
|
+
deviceId,
|
|
102
|
+
interfaceType: key,
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
catch (err) {
|
|
106
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
107
|
+
throw new Error(`Gateway route registration failed: ${msg}`);
|
|
108
|
+
}
|
|
109
|
+
// 3. Generate pairing code + persist everything.
|
|
110
|
+
const code = generatePairingCode();
|
|
111
|
+
const expiresAt = new Date(Date.now() + PAIRING_CODE_TTL_MS).toISOString();
|
|
112
|
+
const existingPlatform = existing[key] ?? { enabled: false, paired: false };
|
|
113
|
+
settings.messaging = {
|
|
114
|
+
...existing,
|
|
115
|
+
enabled: true,
|
|
116
|
+
gatewayUrl: input.gatewayUrl,
|
|
117
|
+
deviceId,
|
|
118
|
+
gatewayClientId: clientId,
|
|
119
|
+
[key]: {
|
|
120
|
+
...existingPlatform,
|
|
121
|
+
enabled: true,
|
|
122
|
+
paired: false,
|
|
123
|
+
pendingPairingCode: code,
|
|
124
|
+
pendingPairingExpiresAt: expiresAt,
|
|
125
|
+
routeId: route.routeId,
|
|
126
|
+
routeToken: route.routeToken,
|
|
127
|
+
publicUrl: route.publicUrl,
|
|
128
|
+
},
|
|
129
|
+
};
|
|
130
|
+
settings.updatedAt = new Date();
|
|
131
|
+
await this.settingsRepository.update(settings);
|
|
132
|
+
return {
|
|
133
|
+
platform: input.platform,
|
|
134
|
+
code,
|
|
135
|
+
expiresAt,
|
|
136
|
+
gatewayUrl: input.gatewayUrl,
|
|
137
|
+
publicUrl: route.publicUrl,
|
|
138
|
+
routeId: route.routeId,
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
BeginMessagingPairingUseCase = __decorate([
|
|
143
|
+
injectable(),
|
|
144
|
+
__param(0, inject('ISettingsRepository')),
|
|
145
|
+
__param(1, inject('IGatewayClient')),
|
|
146
|
+
__metadata("design:paramtypes", [Object, Object])
|
|
147
|
+
], BeginMessagingPairingUseCase);
|
|
148
|
+
export { BeginMessagingPairingUseCase };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Confirm Messaging Pairing Use Case
|
|
3
|
+
*
|
|
4
|
+
* Finalizes a pairing handshake started by BeginMessagingPairingUseCase.
|
|
5
|
+
* Marks the platform as paired, stores the chatId, and clears the pending
|
|
6
|
+
* pairing code.
|
|
7
|
+
*/
|
|
8
|
+
import { MessagingPlatform, type Settings } from '../../../domain/generated/output.js';
|
|
9
|
+
import type { ISettingsRepository } from '../../ports/output/repositories/settings.repository.interface.js';
|
|
10
|
+
export interface ConfirmMessagingPairingInput {
|
|
11
|
+
platform: MessagingPlatform;
|
|
12
|
+
chatId: string;
|
|
13
|
+
}
|
|
14
|
+
export declare class ConfirmMessagingPairingUseCase {
|
|
15
|
+
private readonly settingsRepository;
|
|
16
|
+
constructor(settingsRepository: ISettingsRepository);
|
|
17
|
+
execute(input: ConfirmMessagingPairingInput): Promise<Settings>;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=confirm-pairing.use-case.d.ts.map
|
package/dist/packages/core/src/application/use-cases/messaging/confirm-pairing.use-case.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"confirm-pairing.use-case.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/application/use-cases/messaging/confirm-pairing.use-case.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,iBAAiB,EAAE,KAAK,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AACvF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kEAAkE,CAAC;AAE5G,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,qBACa,8BAA8B;IAGvC,OAAO,CAAC,QAAQ,CAAC,kBAAkB;gBAAlB,kBAAkB,EAAE,mBAAmB;IAGpD,OAAO,CAAC,KAAK,EAAE,4BAA4B,GAAG,OAAO,CAAC,QAAQ,CAAC;CAqCtE"}
|