@shepai/cli 1.180.0 → 1.181.0-pr512.ba01d33
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/{_d44d091a._.js → _1a4c514f._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_d44d091a._.js.map → _1a4c514f._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_33bab16e._.js +3 -0
- package/web/.next/server/chunks/ssr/{_b8e8b690._.js.map → _33bab16e._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_45496654._.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/{_8caadb9a._.js → _5d41b1f7._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_8caadb9a._.js.map → _5d41b1f7._.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/{_63fc4647._.js → _81197d1b._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_63fc4647._.js.map → _81197d1b._.js.map} +1 -1
- 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/_bad61758._.js +3 -0
- package/web/.next/server/chunks/ssr/_bad61758._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{_36489f2b._.js → _ce70bfa0._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_36489f2b._.js.map → _ce70bfa0._.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/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/f3a1f_components_common_control-center-drawer_repository-drawer-client_tsx_39a00c03._.js.map +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_app_actions_open-ide_ts_baaca5d5._.js.map +1 -1
- 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_db9fa0c2._.js +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/{e2f9e224d1fa1faa.js → 05d641009a42e94b.js} +1 -1
- package/web/.next/static/chunks/{26e2ca76ab6c38b4.js → 0d04391861f2a381.js} +1 -1
- package/web/.next/static/chunks/{f28aef9cf5107c4b.js → 151d16c2c65a4356.js} +1 -1
- package/web/.next/static/chunks/19008d82be3a09a5.js +5 -0
- package/web/.next/static/chunks/{893a2a76546c66a7.js → 193d8b761fec697e.js} +1 -1
- package/web/.next/static/chunks/2bad6607c1e0f153.js +7 -0
- package/web/.next/static/chunks/{7c3fe3c694874dea.js → 32940aa08b947f66.js} +1 -1
- package/web/.next/static/chunks/368809962c4cd597.js +1 -0
- package/web/.next/static/chunks/{dfdcccf73de56960.js → 475e5bd4e8bafc6f.js} +1 -1
- package/web/.next/static/chunks/{8746807722de67a8.js → 55e59f912fff1858.js} +1 -1
- package/web/.next/static/chunks/{490667b2a9bb58e2.js → 66d72ca561bb91ca.js} +1 -1
- package/web/.next/static/chunks/6da04daaac881f27.js +1 -0
- package/web/.next/static/chunks/{2fe20598e1b4793a.js → 75eb5f94364a44bf.js} +2 -2
- package/web/.next/static/chunks/{e8444bf5f6c35f8b.js → 7bbe49d9daedd94d.js} +5 -1
- package/web/.next/static/chunks/{7bc7028587490fff.js → 83ea5b5b0d0a8477.js} +1 -1
- package/web/.next/static/chunks/8fe70d4e73e1fe31.css +1 -0
- package/web/.next/static/chunks/{1bc12075020723ed.js → 9d70c74c84d24724.js} +1 -1
- package/web/.next/static/chunks/{7849c6797be7c6ca.js → a6d8276c88451abf.js} +2 -2
- package/web/.next/static/chunks/b3fa9a303332e7d6.js +3 -0
- package/web/.next/static/chunks/b9b3a6d83e07b213.js +1 -0
- package/web/.next/static/chunks/c92bc820f657f9d9.js +1 -0
- package/web/.next/static/chunks/dd5ab4e1762b5812.js +1 -0
- package/web/.next/static/chunks/{e7da54dde18e7fb2.js → e7b870347bdfe35d.js} +1 -1
- package/web/.next/static/chunks/ecafea5bc026ed41.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/_b8e8b690._.js +0 -3
- 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/1ae0cf5be30ef398.js +0 -1
- package/web/.next/static/chunks/1fa1574b87bd2eb1.js +0 -1
- package/web/.next/static/chunks/8492d8e0b5f9a4e8.js +0 -1
- package/web/.next/static/chunks/927442d2628f6e22.js +0 -1
- package/web/.next/static/chunks/a1098522326428d1.js +0 -1
- package/web/.next/static/chunks/b99506a6f7bc2fa8.js +0 -1
- package/web/.next/static/chunks/be89c20c257247ad.js +0 -7
- package/web/.next/static/chunks/c0bd3ffcf94d1845.js +0 -7
- package/web/.next/static/chunks/f6d47ff35d612852.js +0 -5
- /package/web/.next/static/{GQFJf3UCD4D5C4NCn8eXl → Rb8tiiSfY1LEpEkuZLtTr}/_buildManifest.js +0 -0
- /package/web/.next/static/{GQFJf3UCD4D5C4NCn8eXl → Rb8tiiSfY1LEpEkuZLtTr}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{GQFJf3UCD4D5C4NCn8eXl → Rb8tiiSfY1LEpEkuZLtTr}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
'use server';
|
|
2
|
+
import { revalidatePath } from 'next/cache';
|
|
3
|
+
import { resolve } from '../../lib/server-container.js';
|
|
4
|
+
import { updateSettings as updateSettingsSingleton } from '../../../../../packages/core/src/infrastructure/services/settings.service.js';
|
|
5
|
+
async function refreshSettingsCache() {
|
|
6
|
+
// Keep the in-memory settings singleton in sync with the DB so that the
|
|
7
|
+
// running daemon (started from the same process) sees the latest config.
|
|
8
|
+
try {
|
|
9
|
+
const loadUseCase = resolve('LoadSettingsUseCase');
|
|
10
|
+
const fresh = await loadUseCase.execute();
|
|
11
|
+
updateSettingsSingleton(fresh);
|
|
12
|
+
}
|
|
13
|
+
catch {
|
|
14
|
+
// Settings service may not be initialized yet in some contexts — ignore.
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export async function beginMessagingPairingAction(input) {
|
|
18
|
+
try {
|
|
19
|
+
const useCase = resolve('BeginMessagingPairingUseCase');
|
|
20
|
+
const session = await useCase.execute(input);
|
|
21
|
+
await refreshSettingsCache();
|
|
22
|
+
revalidatePath('/settings');
|
|
23
|
+
return { success: true, session };
|
|
24
|
+
}
|
|
25
|
+
catch (error) {
|
|
26
|
+
const message = error instanceof Error ? error.message : 'Failed to begin pairing';
|
|
27
|
+
return { success: false, error: message };
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
export async function confirmMessagingPairingAction(input) {
|
|
31
|
+
try {
|
|
32
|
+
const useCase = resolve('ConfirmMessagingPairingUseCase');
|
|
33
|
+
await useCase.execute(input);
|
|
34
|
+
await refreshSettingsCache();
|
|
35
|
+
revalidatePath('/settings');
|
|
36
|
+
return { success: true };
|
|
37
|
+
}
|
|
38
|
+
catch (error) {
|
|
39
|
+
const message = error instanceof Error ? error.message : 'Failed to confirm pairing';
|
|
40
|
+
return { success: false, error: message };
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
export async function disconnectMessagingAction(input) {
|
|
44
|
+
try {
|
|
45
|
+
const useCase = resolve('DisconnectMessagingUseCase');
|
|
46
|
+
await useCase.execute(input);
|
|
47
|
+
await refreshSettingsCache();
|
|
48
|
+
revalidatePath('/settings');
|
|
49
|
+
return { success: true };
|
|
50
|
+
}
|
|
51
|
+
catch (error) {
|
|
52
|
+
const message = error instanceof Error ? error.message : 'Failed to disconnect messaging';
|
|
53
|
+
return { success: false, error: message };
|
|
54
|
+
}
|
|
55
|
+
}
|
package/dist/src/presentation/web/components/features/settings/messaging-settings-section.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { MessagingConfig } from '../../../../../../packages/core/src/domain/generated/output.js';
|
|
2
|
+
export interface MessagingSettingsSectionProps {
|
|
3
|
+
messaging?: MessagingConfig;
|
|
4
|
+
}
|
|
5
|
+
export declare function MessagingSettingsSection({ messaging }: MessagingSettingsSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=messaging-settings-section.d.ts.map
|
package/dist/src/presentation/web/components/features/settings/messaging-settings-section.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messaging-settings-section.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/settings/messaging-settings-section.tsx"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAG5E,MAAM,WAAW,6BAA6B;IAC5C,SAAS,CAAC,EAAE,eAAe,CAAC;CAC7B;AA+BD,wBAAgB,wBAAwB,CAAC,EAAE,SAAS,EAAE,EAAE,6BAA6B,2CA8VpF"}
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { useState, useTransition, useRef, useEffect, useCallback } from 'react';
|
|
4
|
+
import { MessageCircle, Check, Copy, Link2, ShieldCheck, Unplug } from 'lucide-react';
|
|
5
|
+
import { toast } from 'sonner';
|
|
6
|
+
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '../../ui/card.js';
|
|
7
|
+
import { Label } from '../../ui/label.js';
|
|
8
|
+
import { Switch } from '../../ui/switch.js';
|
|
9
|
+
import { Separator } from '../../ui/separator.js';
|
|
10
|
+
import { Input } from '../../ui/input.js';
|
|
11
|
+
import { Button } from '../../ui/button.js';
|
|
12
|
+
import { Badge } from '../../ui/badge.js';
|
|
13
|
+
import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, } from '../../ui/dialog.js';
|
|
14
|
+
import { updateSettingsAction } from '../../../app/actions/update-settings.js';
|
|
15
|
+
import { beginMessagingPairingAction, confirmMessagingPairingAction, disconnectMessagingAction, } from '../../../app/actions/messaging.js';
|
|
16
|
+
import { MessagingPlatform } from '../../../../../../packages/core/src/domain/generated/output.js';
|
|
17
|
+
const DEFAULT_CONFIG = {
|
|
18
|
+
enabled: false,
|
|
19
|
+
debounceMs: 5000,
|
|
20
|
+
chatBufferMs: 3000,
|
|
21
|
+
};
|
|
22
|
+
function platformLabel(platform) {
|
|
23
|
+
return platform === MessagingPlatform.Telegram ? 'Telegram' : 'WhatsApp';
|
|
24
|
+
}
|
|
25
|
+
function isValidUrl(value) {
|
|
26
|
+
if (!value.trim())
|
|
27
|
+
return false;
|
|
28
|
+
try {
|
|
29
|
+
new URL(value);
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
catch {
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
export function MessagingSettingsSection({ messaging }) {
|
|
37
|
+
const config = messaging ?? DEFAULT_CONFIG;
|
|
38
|
+
const [enabled, setEnabled] = useState(config.enabled);
|
|
39
|
+
const [gatewayUrl, setGatewayUrl] = useState(config.gatewayUrl ?? '');
|
|
40
|
+
const [telegram, setTelegram] = useState(config.telegram);
|
|
41
|
+
const [whatsapp, setWhatsapp] = useState(config.whatsapp);
|
|
42
|
+
const [isPending, startTransition] = useTransition();
|
|
43
|
+
const [showSaved, setShowSaved] = useState(false);
|
|
44
|
+
const prevPendingRef = useRef(false);
|
|
45
|
+
const [pairing, setPairing] = useState(null);
|
|
46
|
+
const [pairingLoading, setPairingLoading] = useState(false);
|
|
47
|
+
const [chatIdInput, setChatIdInput] = useState('');
|
|
48
|
+
useEffect(() => {
|
|
49
|
+
if (prevPendingRef.current && !isPending) {
|
|
50
|
+
setShowSaved(true);
|
|
51
|
+
const timer = setTimeout(() => setShowSaved(false), 2000);
|
|
52
|
+
return () => clearTimeout(timer);
|
|
53
|
+
}
|
|
54
|
+
prevPendingRef.current = isPending;
|
|
55
|
+
}, [isPending]);
|
|
56
|
+
// Keep local state in sync when the server prop changes after a server action.
|
|
57
|
+
useEffect(() => {
|
|
58
|
+
setEnabled(config.enabled);
|
|
59
|
+
setGatewayUrl(config.gatewayUrl ?? '');
|
|
60
|
+
setTelegram(config.telegram);
|
|
61
|
+
setWhatsapp(config.whatsapp);
|
|
62
|
+
}, [config.enabled, config.gatewayUrl, config.telegram, config.whatsapp]);
|
|
63
|
+
const saveTopLevel = useCallback((payload) => {
|
|
64
|
+
startTransition(async () => {
|
|
65
|
+
const result = await updateSettingsAction({
|
|
66
|
+
messaging: {
|
|
67
|
+
...config,
|
|
68
|
+
enabled: payload.enabled ?? enabled,
|
|
69
|
+
gatewayUrl: payload.gatewayUrl ?? gatewayUrl,
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
if (!result.success) {
|
|
73
|
+
toast.error(result.error ?? 'Failed to save messaging settings');
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
}, [config, enabled, gatewayUrl]);
|
|
77
|
+
const savePlatformBotToken = useCallback((platform, botToken) => {
|
|
78
|
+
const key = platform === MessagingPlatform.Telegram ? 'telegram' : 'whatsapp';
|
|
79
|
+
const existing = config[key];
|
|
80
|
+
if (!existing) {
|
|
81
|
+
toast.error('Pair this platform before setting a bot token.');
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
startTransition(async () => {
|
|
85
|
+
const result = await updateSettingsAction({
|
|
86
|
+
messaging: {
|
|
87
|
+
...config,
|
|
88
|
+
[key]: { ...existing, botToken: botToken || undefined },
|
|
89
|
+
},
|
|
90
|
+
});
|
|
91
|
+
if (!result.success) {
|
|
92
|
+
toast.error(result.error ?? 'Failed to save bot token');
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
}, [config]);
|
|
96
|
+
function handleEnableChange(value) {
|
|
97
|
+
setEnabled(value);
|
|
98
|
+
saveTopLevel({ enabled: value });
|
|
99
|
+
}
|
|
100
|
+
function handleGatewayBlur() {
|
|
101
|
+
if (gatewayUrl === (config.gatewayUrl ?? ''))
|
|
102
|
+
return;
|
|
103
|
+
if (gatewayUrl && !isValidUrl(gatewayUrl)) {
|
|
104
|
+
toast.error('Gateway URL must be a valid URL (e.g., https://gateway.example.com)');
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
saveTopLevel({ gatewayUrl });
|
|
108
|
+
}
|
|
109
|
+
async function handlePair(platform) {
|
|
110
|
+
if (!isValidUrl(gatewayUrl)) {
|
|
111
|
+
toast.error('Set a valid Gateway URL before pairing');
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
setPairingLoading(true);
|
|
115
|
+
setChatIdInput('');
|
|
116
|
+
try {
|
|
117
|
+
const result = await beginMessagingPairingAction({ platform, gatewayUrl });
|
|
118
|
+
if (!result.success || !result.session) {
|
|
119
|
+
toast.error(result.error ?? 'Failed to begin pairing');
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
setPairing(result.session);
|
|
123
|
+
}
|
|
124
|
+
finally {
|
|
125
|
+
setPairingLoading(false);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
async function handleConfirmPairing() {
|
|
129
|
+
if (!pairing)
|
|
130
|
+
return;
|
|
131
|
+
if (!chatIdInput.trim()) {
|
|
132
|
+
toast.error('Enter the chat ID that received the code');
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
setPairingLoading(true);
|
|
136
|
+
try {
|
|
137
|
+
const result = await confirmMessagingPairingAction({
|
|
138
|
+
platform: pairing.platform,
|
|
139
|
+
chatId: chatIdInput.trim(),
|
|
140
|
+
});
|
|
141
|
+
if (!result.success) {
|
|
142
|
+
toast.error(result.error ?? 'Failed to confirm pairing');
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
toast.success(`${platformLabel(pairing.platform)} paired`);
|
|
146
|
+
setPairing(null);
|
|
147
|
+
}
|
|
148
|
+
finally {
|
|
149
|
+
setPairingLoading(false);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
async function handleDisconnect(platform) {
|
|
153
|
+
setPairingLoading(true);
|
|
154
|
+
try {
|
|
155
|
+
const result = await disconnectMessagingAction({ platform });
|
|
156
|
+
if (!result.success) {
|
|
157
|
+
toast.error(result.error ?? 'Failed to disconnect');
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
toast.success(platform ? `${platformLabel(platform)} disconnected` : 'Messaging disconnected');
|
|
161
|
+
}
|
|
162
|
+
finally {
|
|
163
|
+
setPairingLoading(false);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
async function handleCopyCode() {
|
|
167
|
+
if (!pairing)
|
|
168
|
+
return;
|
|
169
|
+
try {
|
|
170
|
+
await navigator.clipboard.writeText(pairing.code);
|
|
171
|
+
toast.success('Code copied');
|
|
172
|
+
}
|
|
173
|
+
catch {
|
|
174
|
+
toast.error('Unable to copy code');
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
async function handleCopyPublicUrl() {
|
|
178
|
+
if (!pairing)
|
|
179
|
+
return;
|
|
180
|
+
try {
|
|
181
|
+
await navigator.clipboard.writeText(pairing.publicUrl);
|
|
182
|
+
toast.success('Webhook URL copied');
|
|
183
|
+
}
|
|
184
|
+
catch {
|
|
185
|
+
toast.error('Unable to copy URL');
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
return (_jsxs(Card, { id: "messaging", className: "scroll-mt-6", "data-testid": "messaging-settings-section", children: [_jsxs(CardHeader, { children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(MessageCircle, { className: "text-muted-foreground h-4 w-4" }), _jsx(CardTitle, { children: "Messaging Remote Control" })] }), isPending ? _jsx("span", { className: "text-muted-foreground text-xs", children: "Saving..." }) : null, showSaved && !isPending ? (_jsxs("span", { className: "flex items-center gap-1 text-xs text-green-600", children: [_jsx(Check, { className: "h-3 w-3" }), "Saved"] })) : null] }), _jsx(CardDescription, { children: "Drive Shep remotely from Telegram or WhatsApp via the Commands.com Gateway." })] }), _jsxs(CardContent, { className: "space-y-4", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx(Label, { htmlFor: "messaging-enabled", children: "Enable messaging" }), _jsx(Switch, { id: "messaging-enabled", "data-testid": "switch-messaging-enabled", checked: enabled, onCheckedChange: handleEnableChange })] }), _jsxs("div", { className: "space-y-1.5", children: [_jsxs(Label, { htmlFor: "messaging-gateway-url", className: "flex items-center gap-1 text-xs", children: [_jsx(Link2, { className: "h-3 w-3" }), "Gateway URL"] }), _jsx(Input, { id: "messaging-gateway-url", "data-testid": "input-gateway-url", placeholder: "https://gateway.example.com", value: gatewayUrl, disabled: !enabled, onChange: (e) => setGatewayUrl(e.target.value), onBlur: handleGatewayBlur })] }), _jsx(Separator, {}), _jsx(PlatformRow, { platform: MessagingPlatform.Telegram, config: telegram, disabled: !enabled || pairingLoading, onPair: () => handlePair(MessagingPlatform.Telegram), onDisconnect: () => handleDisconnect(MessagingPlatform.Telegram), onSaveBotToken: (value) => savePlatformBotToken(MessagingPlatform.Telegram, value) }), _jsx(PlatformRow, { platform: MessagingPlatform.WhatsApp, config: whatsapp, disabled: !enabled || pairingLoading, onPair: () => handlePair(MessagingPlatform.WhatsApp), onDisconnect: () => handleDisconnect(MessagingPlatform.WhatsApp), onSaveBotToken: (value) => savePlatformBotToken(MessagingPlatform.WhatsApp, value) }), telegram?.paired === true || whatsapp?.paired === true ? (_jsxs(_Fragment, { children: [_jsx(Separator, {}), _jsxs("div", { className: "flex items-center justify-between", children: [_jsx("div", { className: "text-muted-foreground text-xs", children: "Disconnect all platforms" }), _jsxs(Button, { variant: "outline", size: "sm", disabled: pairingLoading, "data-testid": "btn-disconnect-all", onClick: () => handleDisconnect(), children: [_jsx(Unplug, { className: "mr-1 h-3 w-3" }), "Disconnect all"] })] })] })) : null] }), _jsx(Dialog, { open: !!pairing, onOpenChange: (open) => !open && setPairing(null), children: _jsxs(DialogContent, { "data-testid": "messaging-pairing-dialog", children: [_jsxs(DialogHeader, { children: [_jsxs(DialogTitle, { children: ["Pair ", pairing ? platformLabel(pairing.platform) : ''] }), _jsx(DialogDescription, { children: "Send this one-time code to your bot. Then enter the chat ID that received it to finish pairing." })] }), pairing ? (_jsxs("div", { className: "space-y-4", children: [_jsxs("div", { className: "bg-muted flex items-center justify-between rounded-md border px-4 py-3", "data-testid": "pairing-code-box", children: [_jsx("code", { className: "font-mono text-2xl tracking-[0.3em]", children: pairing.code }), _jsx(Button, { variant: "ghost", size: "sm", onClick: handleCopyCode, "data-testid": "btn-copy-code", "aria-label": "Copy code", children: _jsx(Copy, { className: "h-4 w-4" }) })] }), _jsxs("div", { className: "space-y-1.5", "data-testid": "pairing-public-url-box", children: [_jsxs(Label, { className: "flex items-center gap-1 text-xs", children: [_jsx(Link2, { className: "h-3 w-3" }), "Webhook URL for ", platformLabel(pairing.platform)] }), _jsxs("div", { className: "bg-muted flex items-center justify-between gap-2 rounded-md border px-3 py-2", children: [_jsx("code", { className: "truncate font-mono text-[11px]", "data-testid": "pairing-public-url", children: pairing.publicUrl }), _jsx(Button, { variant: "ghost", size: "sm", onClick: handleCopyPublicUrl, "data-testid": "btn-copy-public-url", "aria-label": "Copy webhook URL", children: _jsx(Copy, { className: "h-4 w-4" }) })] })] }), _jsxs("ol", { className: "text-muted-foreground list-decimal space-y-1 pl-4 text-xs", children: [_jsxs("li", { children: ["Point your ", platformLabel(pairing.platform), " bot webhook at the URL above (e.g.", ' ', _jsx("code", { className: "font-mono", children: "setWebhook" }), " for Telegram)."] }), _jsxs("li", { children: ["Send ", _jsxs("code", { className: "font-mono", children: ["/pair ", pairing.code] }), " to the bot."] }), _jsx("li", { children: "Enter the chat ID that received your code below and click Confirm." })] }), _jsxs("div", { className: "space-y-1.5", children: [_jsx(Label, { htmlFor: "pairing-chat-id", className: "text-xs", children: "Chat ID" }), _jsx(Input, { id: "pairing-chat-id", "data-testid": "input-pairing-chat-id", placeholder: "e.g. 123456789 or @username", value: chatIdInput, onChange: (e) => setChatIdInput(e.target.value) })] })] })) : null, _jsxs(DialogFooter, { children: [_jsx(Button, { variant: "outline", onClick: () => setPairing(null), disabled: pairingLoading, "data-testid": "btn-cancel-pairing", children: "Cancel" }), _jsxs(Button, { onClick: handleConfirmPairing, disabled: pairingLoading || !chatIdInput.trim(), "data-testid": "btn-confirm-pairing", children: [_jsx(ShieldCheck, { className: "mr-1 h-3 w-3" }), "Confirm pairing"] })] })] }) })] }));
|
|
189
|
+
}
|
|
190
|
+
function PlatformRow({ platform, config, disabled, onPair, onDisconnect, onSaveBotToken, }) {
|
|
191
|
+
const label = platformLabel(platform);
|
|
192
|
+
const paired = !!config?.paired;
|
|
193
|
+
const enabled = !!config?.enabled;
|
|
194
|
+
const chatId = config?.chatId;
|
|
195
|
+
const testIdPrefix = platform === MessagingPlatform.Telegram ? 'telegram' : 'whatsapp';
|
|
196
|
+
const [botToken, setBotToken] = useState(config?.botToken ?? '');
|
|
197
|
+
useEffect(() => {
|
|
198
|
+
setBotToken(config?.botToken ?? '');
|
|
199
|
+
}, [config?.botToken]);
|
|
200
|
+
function handleBotTokenBlur() {
|
|
201
|
+
if (botToken === (config?.botToken ?? ''))
|
|
202
|
+
return;
|
|
203
|
+
onSaveBotToken(botToken);
|
|
204
|
+
}
|
|
205
|
+
return (_jsxs("div", { className: "space-y-2", "data-testid": `messaging-platform-${testIdPrefix}`, children: [_jsxs("div", { className: "flex items-center justify-between gap-2", children: [_jsxs("div", { className: "min-w-0", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Label, { className: "text-sm", children: label }), paired ? (_jsx(Badge, { variant: "secondary", className: "text-[10px]", children: "Paired" })) : enabled ? (_jsx(Badge, { variant: "outline", className: "text-[10px]", children: "Pairing" })) : (_jsx(Badge, { variant: "outline", className: "text-[10px]", children: "Not configured" }))] }), chatId ? (_jsxs("p", { className: "text-muted-foreground truncate text-[11px]", children: ["chat: ", chatId] })) : null] }), _jsx("div", { className: "flex shrink-0 gap-2", children: paired ? (_jsx(Button, { variant: "outline", size: "sm", disabled: disabled, onClick: onDisconnect, "data-testid": `btn-${testIdPrefix}-disconnect`, children: "Disconnect" })) : (_jsx(Button, { size: "sm", disabled: disabled, onClick: onPair, "data-testid": `btn-${testIdPrefix}-pair`, children: "Pair device" })) })] }), paired ? (_jsxs("div", { className: "space-y-1 pl-1", children: [_jsx(Label, { htmlFor: `${testIdPrefix}-bot-token`, className: "text-[11px]", children: "Bot API token" }), _jsx(Input, { id: `${testIdPrefix}-bot-token`, "data-testid": `input-${testIdPrefix}-bot-token`, type: "password", placeholder: platform === MessagingPlatform.Telegram ? '123456:ABC-...' : 'WhatsApp access token', value: botToken, disabled: disabled, onChange: (e) => setBotToken(e.target.value), onBlur: handleBotTokenBlur }), _jsxs("p", { className: "text-muted-foreground text-[10px]", children: ["Needed so the daemon can send replies and notifications. Stored in settings.db; you can also set the ", _jsx("code", { className: "font-mono", children: "SHEP_TELEGRAM_BOT_TOKEN" }), " env var instead."] })] })) : null] }));
|
|
206
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import { MessagingSettingsSection } from './messaging-settings-section.js';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof MessagingSettingsSection;
|
|
6
|
+
tags: string[];
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
export declare const Disabled: Story;
|
|
14
|
+
export declare const EnabledUnpaired: Story;
|
|
15
|
+
export declare const TelegramPaired: Story;
|
|
16
|
+
export declare const BothPaired: Story;
|
|
17
|
+
//# sourceMappingURL=messaging-settings-section.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messaging-settings-section.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/settings/messaging-settings-section.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAExE,QAAA,MAAM,IAAI;;;;;;;CAOuC,CAAC;AAElD,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,QAAQ,EAAE,KAQtB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAW7B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAW5B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAWxB,CAAC"}
|
package/dist/src/presentation/web/components/features/settings/messaging-settings-section.stories.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { MessagingSettingsSection } from './messaging-settings-section.js';
|
|
2
|
+
const meta = {
|
|
3
|
+
title: 'Features/Settings/MessagingSettingsSection',
|
|
4
|
+
component: MessagingSettingsSection,
|
|
5
|
+
tags: ['autodocs'],
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: 'padded',
|
|
8
|
+
},
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
export const Disabled = {
|
|
12
|
+
args: {
|
|
13
|
+
messaging: {
|
|
14
|
+
enabled: false,
|
|
15
|
+
debounceMs: 5000,
|
|
16
|
+
chatBufferMs: 3000,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
export const EnabledUnpaired = {
|
|
21
|
+
args: {
|
|
22
|
+
messaging: {
|
|
23
|
+
enabled: true,
|
|
24
|
+
gatewayUrl: 'https://gateway.example.com',
|
|
25
|
+
debounceMs: 5000,
|
|
26
|
+
chatBufferMs: 3000,
|
|
27
|
+
telegram: { enabled: false, paired: false },
|
|
28
|
+
whatsapp: { enabled: false, paired: false },
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
export const TelegramPaired = {
|
|
33
|
+
args: {
|
|
34
|
+
messaging: {
|
|
35
|
+
enabled: true,
|
|
36
|
+
gatewayUrl: 'https://gateway.example.com',
|
|
37
|
+
debounceMs: 5000,
|
|
38
|
+
chatBufferMs: 3000,
|
|
39
|
+
telegram: { enabled: true, paired: true, chatId: '@alice' },
|
|
40
|
+
whatsapp: { enabled: false, paired: false },
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
export const BothPaired = {
|
|
45
|
+
args: {
|
|
46
|
+
messaging: {
|
|
47
|
+
enabled: true,
|
|
48
|
+
gatewayUrl: 'https://gateway.example.com',
|
|
49
|
+
debounceMs: 5000,
|
|
50
|
+
chatBufferMs: 3000,
|
|
51
|
+
telegram: { enabled: true, paired: true, chatId: '@alice' },
|
|
52
|
+
whatsapp: { enabled: true, paired: true, chatId: '+15551234567' },
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
};
|
package/dist/src/presentation/web/components/features/settings/settings-page-client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings-page-client.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/settings/settings-page-client.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"settings-page-client.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/settings/settings-page-client.tsx"],"names":[],"mappings":"AA8CA,OAAO,KAAK,EACV,QAAQ,EAKT,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AA+B/E,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,QAAQ,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,iBAAiB,EAAE,CAAC;CAC1C;AA+QD,wBAAgB,kBAAkB,CAAC,EACjC,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,kBAAkB,GACnB,EAAE,uBAAuB,2CA26CzB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useState, useTransition, useRef, useEffect, useCallback } from 'react';
|
|
4
|
-
import { Check, Bot, Terminal, GitBranch, Activity, Bell, Flag, Database, Globe, Minus, Plus, ExternalLink, Settings2, Timer, MessageSquare, LayoutGrid, } from 'lucide-react';
|
|
4
|
+
import { Check, Bot, Terminal, GitBranch, Activity, Bell, Flag, Database, Globe, Minus, Plus, ExternalLink, Settings2, Timer, MessageSquare, LayoutGrid, MessageCircle, } from 'lucide-react';
|
|
5
5
|
import { toast } from 'sonner';
|
|
6
6
|
import { useTranslation } from 'react-i18next';
|
|
7
7
|
import { cn } from '../../../lib/utils.js';
|
|
@@ -13,6 +13,7 @@ import { EditorType, Language, TerminalType, } from '../../../../../../packages/
|
|
|
13
13
|
import { getEditorTypeIcon } from '../../common/editor-type-icons.js';
|
|
14
14
|
import { AgentModelPicker } from '../../features/settings/AgentModelPicker/index.js';
|
|
15
15
|
import { LanguageSettingsSection } from '../../features/settings/language-settings-section.js';
|
|
16
|
+
import { MessagingSettingsSection } from '../../features/settings/messaging-settings-section.js';
|
|
16
17
|
import { TimeoutSlider } from '../../features/settings/timeout-slider.js';
|
|
17
18
|
const EDITOR_OPTIONS = [
|
|
18
19
|
{ value: EditorType.VsCode, label: 'VS Code' },
|
|
@@ -34,6 +35,7 @@ const SECTIONS = [
|
|
|
34
35
|
{ id: 'ci', labelKey: 'settings.sections.ci', icon: Activity },
|
|
35
36
|
{ id: 'stage-timeouts', labelKey: 'settings.sections.timeouts', icon: Timer },
|
|
36
37
|
{ id: 'notifications', labelKey: 'settings.sections.notifications', icon: Bell },
|
|
38
|
+
{ id: 'messaging', labelKey: 'settings.sections.messaging', icon: MessageCircle },
|
|
37
39
|
{ id: 'feature-flags', labelKey: 'settings.sections.flags', icon: Flag },
|
|
38
40
|
{ id: 'interactive-agent', labelKey: 'settings.sections.chat', icon: MessageSquare },
|
|
39
41
|
{ id: 'fab-layout', labelKey: 'settings.sections.layout', icon: LayoutGrid },
|
|
@@ -540,7 +542,12 @@ export function SettingsPageClient({ settings, shepHome, dbFileSize, availableTe
|
|
|
540
542
|
label: t('settings.notifications.links.notificationSystem'),
|
|
541
543
|
href: 'https://github.com/shep-ai/shep/blob/main/specs/021-agent-notifications/spec.yaml',
|
|
542
544
|
},
|
|
543
|
-
], children: t('settings.notifications.hint') })] }), _jsxs("div", { id: "section-
|
|
545
|
+
], children: t('settings.notifications.hint') })] }), _jsxs("div", { id: "section-messaging", className: "grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]", children: [_jsx(MessagingSettingsSection, { messaging: settings.messaging }), _jsx(SectionHint, { links: [
|
|
546
|
+
{
|
|
547
|
+
label: 'Commands.com Gateway',
|
|
548
|
+
href: 'https://github.com/Commands-com/gateway',
|
|
549
|
+
},
|
|
550
|
+
], children: "Drive Shep remotely from Telegram or WhatsApp. Pair a chat to send commands and receive notifications through the Commands.com Gateway." })] }), _jsxs("div", { id: "section-feature-flags", className: "grid scroll-mt-18 grid-cols-1 gap-x-5 rounded-lg lg:grid-cols-[1fr_280px]", children: [_jsxs(SettingsSection, { icon: Flag, title: t('settings.featureFlags.title'), description: t('settings.featureFlags.sectionDescription'), badge: t('settings.featureFlags.badge'), testId: "feature-flags-settings-section", children: [_jsx(SwitchRow, { label: t('settings.featureFlags.skills'), description: t('settings.featureFlags.skillsDescription'), id: "flag-skills", testId: "switch-flag-skills", checked: flags.skills, onChange: (v) => {
|
|
544
551
|
const newFlags = { ...flags, skills: v };
|
|
545
552
|
setFlags(newFlags);
|
|
546
553
|
save({ featureFlags: newFlags });
|
|
@@ -73,6 +73,26 @@ async function main() {
|
|
|
73
73
|
// Start auto-archive watcher for completed features
|
|
74
74
|
initializeAutoArchiveWatcher(featureRepo);
|
|
75
75
|
getAutoArchiveWatcher().start();
|
|
76
|
+
// Optionally start the messaging remote-control service.
|
|
77
|
+
// Dev mode skips this by default because it opens a persistent
|
|
78
|
+
// WebSocket tunnel to the gateway and is not something every
|
|
79
|
+
// developer wants running on every `pnpm dev:web` invocation.
|
|
80
|
+
// Opt in with SHEP_ENABLE_MESSAGING=1.
|
|
81
|
+
if (process.env.SHEP_ENABLE_MESSAGING === '1') {
|
|
82
|
+
try {
|
|
83
|
+
const messagingService = container.resolve('IMessagingService');
|
|
84
|
+
if (messagingService.isConfigured()) {
|
|
85
|
+
await messagingService.start();
|
|
86
|
+
console.log('[dev-server] messaging remote control started');
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
console.log('[dev-server] SHEP_ENABLE_MESSAGING=1 but messaging is not configured yet — pair a platform in Settings first');
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
catch (err) {
|
|
93
|
+
console.warn('[dev-server] failed to start messaging service:', err);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
76
96
|
}
|
|
77
97
|
catch (error) {
|
|
78
98
|
console.warn('[dev-server] DI initialization failed — features will be empty:', error);
|
|
@@ -137,6 +157,13 @@ async function main() {
|
|
|
137
157
|
catch {
|
|
138
158
|
/* not initialized */
|
|
139
159
|
}
|
|
160
|
+
try {
|
|
161
|
+
const messagingService = container.resolve('IMessagingService');
|
|
162
|
+
await messagingService.stop();
|
|
163
|
+
}
|
|
164
|
+
catch {
|
|
165
|
+
/* not initialized or not running */
|
|
166
|
+
}
|
|
140
167
|
server.closeAllConnections();
|
|
141
168
|
await Promise.all([
|
|
142
169
|
new Promise((resolve) => server.close(() => resolve())),
|
|
@@ -478,6 +478,69 @@
|
|
|
478
478
|
"notFound": "المستودع غير موجود: {{id}}"
|
|
479
479
|
}
|
|
480
480
|
},
|
|
481
|
+
"app": {
|
|
482
|
+
"description": "Manage applications",
|
|
483
|
+
"ls": {
|
|
484
|
+
"description": "List applications",
|
|
485
|
+
"title": "Applications",
|
|
486
|
+
"idColumn": "ID",
|
|
487
|
+
"nameColumn": "Name",
|
|
488
|
+
"statusColumn": "Status",
|
|
489
|
+
"pathColumn": "Path",
|
|
490
|
+
"createdColumn": "Created",
|
|
491
|
+
"noApps": "No applications found",
|
|
492
|
+
"failedToList": "Failed to list applications"
|
|
493
|
+
},
|
|
494
|
+
"show": {
|
|
495
|
+
"description": "Display details of an application",
|
|
496
|
+
"idArgument": "Application ID, slug, or prefix",
|
|
497
|
+
"title": "Application: {{name}}",
|
|
498
|
+
"nameLabel": "Name",
|
|
499
|
+
"slugLabel": "Slug",
|
|
500
|
+
"statusLabel": "Status",
|
|
501
|
+
"descriptionLabel": "Description",
|
|
502
|
+
"pathLabel": "Path",
|
|
503
|
+
"configTitle": "Configuration",
|
|
504
|
+
"agentLabel": "Agent",
|
|
505
|
+
"modelLabel": "Model",
|
|
506
|
+
"timestampsTitle": "Timestamps",
|
|
507
|
+
"createdLabel": "Created",
|
|
508
|
+
"updatedLabel": "Updated",
|
|
509
|
+
"deletedLabel": "Deleted",
|
|
510
|
+
"failedToShow": "Failed to show application"
|
|
511
|
+
},
|
|
512
|
+
"new": {
|
|
513
|
+
"description": "Create a new application",
|
|
514
|
+
"descriptionArgument": "Application description",
|
|
515
|
+
"agentOption": "Agent type override",
|
|
516
|
+
"modelOption": "LLM model override (e.g. claude-opus-4-6)",
|
|
517
|
+
"spinnerText": "Creating application",
|
|
518
|
+
"appCreated": "Application created",
|
|
519
|
+
"idLabel": "ID:",
|
|
520
|
+
"nameLabel": "Name:",
|
|
521
|
+
"slugLabel": "Slug:",
|
|
522
|
+
"pathLabel": "Path:",
|
|
523
|
+
"statusLabel": "Status:",
|
|
524
|
+
"agentLabel": "Agent:",
|
|
525
|
+
"modelLabel": "Model:",
|
|
526
|
+
"failedToCreate": "Failed to create application"
|
|
527
|
+
},
|
|
528
|
+
"del": {
|
|
529
|
+
"description": "Delete an application",
|
|
530
|
+
"idArgument": "Application ID, slug, or prefix",
|
|
531
|
+
"forceOption": "Skip confirmation prompt",
|
|
532
|
+
"confirmDelete": "Delete application \"{{name}}\"?",
|
|
533
|
+
"cancelled": "Cancelled",
|
|
534
|
+
"appDeleted": "Application deleted",
|
|
535
|
+
"nameLabel": "Name:",
|
|
536
|
+
"slugLabel": "Slug:",
|
|
537
|
+
"failedToDelete": "Failed to delete application"
|
|
538
|
+
},
|
|
539
|
+
"resolve": {
|
|
540
|
+
"multipleMatch": "Multiple applications match prefix \"{{id}}\": {{matches}}",
|
|
541
|
+
"notFound": "Application not found: {{id}}"
|
|
542
|
+
}
|
|
543
|
+
},
|
|
481
544
|
"agent": {
|
|
482
545
|
"description": "إدارة وعرض تشغيلات الوكيل",
|
|
483
546
|
"show": {
|
|
@@ -478,6 +478,69 @@
|
|
|
478
478
|
"notFound": "Repository nicht gefunden: {{id}}"
|
|
479
479
|
}
|
|
480
480
|
},
|
|
481
|
+
"app": {
|
|
482
|
+
"description": "Manage applications",
|
|
483
|
+
"ls": {
|
|
484
|
+
"description": "List applications",
|
|
485
|
+
"title": "Applications",
|
|
486
|
+
"idColumn": "ID",
|
|
487
|
+
"nameColumn": "Name",
|
|
488
|
+
"statusColumn": "Status",
|
|
489
|
+
"pathColumn": "Path",
|
|
490
|
+
"createdColumn": "Created",
|
|
491
|
+
"noApps": "No applications found",
|
|
492
|
+
"failedToList": "Failed to list applications"
|
|
493
|
+
},
|
|
494
|
+
"show": {
|
|
495
|
+
"description": "Display details of an application",
|
|
496
|
+
"idArgument": "Application ID, slug, or prefix",
|
|
497
|
+
"title": "Application: {{name}}",
|
|
498
|
+
"nameLabel": "Name",
|
|
499
|
+
"slugLabel": "Slug",
|
|
500
|
+
"statusLabel": "Status",
|
|
501
|
+
"descriptionLabel": "Description",
|
|
502
|
+
"pathLabel": "Path",
|
|
503
|
+
"configTitle": "Configuration",
|
|
504
|
+
"agentLabel": "Agent",
|
|
505
|
+
"modelLabel": "Model",
|
|
506
|
+
"timestampsTitle": "Timestamps",
|
|
507
|
+
"createdLabel": "Created",
|
|
508
|
+
"updatedLabel": "Updated",
|
|
509
|
+
"deletedLabel": "Deleted",
|
|
510
|
+
"failedToShow": "Failed to show application"
|
|
511
|
+
},
|
|
512
|
+
"new": {
|
|
513
|
+
"description": "Create a new application",
|
|
514
|
+
"descriptionArgument": "Application description",
|
|
515
|
+
"agentOption": "Agent type override",
|
|
516
|
+
"modelOption": "LLM model override (e.g. claude-opus-4-6)",
|
|
517
|
+
"spinnerText": "Creating application",
|
|
518
|
+
"appCreated": "Application created",
|
|
519
|
+
"idLabel": "ID:",
|
|
520
|
+
"nameLabel": "Name:",
|
|
521
|
+
"slugLabel": "Slug:",
|
|
522
|
+
"pathLabel": "Path:",
|
|
523
|
+
"statusLabel": "Status:",
|
|
524
|
+
"agentLabel": "Agent:",
|
|
525
|
+
"modelLabel": "Model:",
|
|
526
|
+
"failedToCreate": "Failed to create application"
|
|
527
|
+
},
|
|
528
|
+
"del": {
|
|
529
|
+
"description": "Delete an application",
|
|
530
|
+
"idArgument": "Application ID, slug, or prefix",
|
|
531
|
+
"forceOption": "Skip confirmation prompt",
|
|
532
|
+
"confirmDelete": "Delete application \"{{name}}\"?",
|
|
533
|
+
"cancelled": "Cancelled",
|
|
534
|
+
"appDeleted": "Application deleted",
|
|
535
|
+
"nameLabel": "Name:",
|
|
536
|
+
"slugLabel": "Slug:",
|
|
537
|
+
"failedToDelete": "Failed to delete application"
|
|
538
|
+
},
|
|
539
|
+
"resolve": {
|
|
540
|
+
"multipleMatch": "Multiple applications match prefix \"{{id}}\": {{matches}}",
|
|
541
|
+
"notFound": "Application not found: {{id}}"
|
|
542
|
+
}
|
|
543
|
+
},
|
|
481
544
|
"agent": {
|
|
482
545
|
"description": "Agentläufe verwalten und anzeigen",
|
|
483
546
|
"show": {
|