@shepai/cli 1.180.0-pr548.764147 → 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/agents/feature-agent/nodes/node-helpers.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/node-helpers.js +1 -4
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/merge-prompts.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/merge-prompts.js +6 -11
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/pr-branding.d.ts +2 -2
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/pr-branding.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/pr-branding.js +2 -2
- package/dist/packages/core/src/infrastructure/services/git/git-pr.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/git/git-pr.service.js +2 -3
- package/dist/packages/core/src/infrastructure/services/git/pr-branding.d.ts +5 -16
- package/dist/packages/core/src/infrastructure/services/git/pr-branding.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/git/pr-branding.js +7 -38
- 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 +2 -2
- package/web/.next/required-server-files.json +2 -2
- 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/{_96718a00._.js → _1a4c514f._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_96718a00._.js.map → _1a4c514f._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/{_948d3cc6._.js → _33bab16e._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_948d3cc6._.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/{_ff6f3257._.js → _5d41b1f7._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_ff6f3257._.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/{_9df33116._.js → _81197d1b._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_9df33116._.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/{_ee88b448._.js → _ce70bfa0._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_ee88b448._.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_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/{b17c2d874c373d4e.js → 05d641009a42e94b.js} +1 -1
- package/web/.next/static/chunks/{ee9a716c6424ff25.js → 0d04391861f2a381.js} +1 -1
- package/web/.next/static/chunks/{2a64d4b1a285fac5.js → 151d16c2c65a4356.js} +1 -1
- package/web/.next/static/chunks/19008d82be3a09a5.js +5 -0
- package/web/.next/static/chunks/{f7a55ba1f789c55f.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/{0a67d6e50e27452e.js → 368809962c4cd597.js} +1 -1
- package/web/.next/static/chunks/{8f783e12274578c2.js → 475e5bd4e8bafc6f.js} +1 -1
- package/web/.next/static/chunks/{c1559152cf2ab9c6.js → 55e59f912fff1858.js} +1 -1
- package/web/.next/static/chunks/{fcf27468f8026dbd.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/{3ee4449e73eb4917.js → 83ea5b5b0d0a8477.js} +1 -1
- package/web/.next/static/chunks/8fe70d4e73e1fe31.css +1 -0
- package/web/.next/static/chunks/9d70c74c84d24724.js +1 -0
- package/web/.next/static/chunks/{010215070d22b4e6.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/{2ddda685a9100fd8.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/_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/6ecbcce796343f44.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/9370d114ce5b69fb.js +0 -7
- package/web/.next/static/chunks/b2a010b2ba8710f4.js +0 -1
- package/web/.next/static/chunks/b99506a6f7bc2fa8.js +0 -1
- package/web/.next/static/chunks/d2182843a406b5a7.js +0 -5
- package/web/.next/static/chunks/edf812d5efffa096.js +0 -7
- /package/web/.next/static/{ex3OTWRXHxfwD9RkifALI → Rb8tiiSfY1LEpEkuZLtTr}/_buildManifest.js +0 -0
- /package/web/.next/static/{ex3OTWRXHxfwD9RkifALI → Rb8tiiSfY1LEpEkuZLtTr}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{ex3OTWRXHxfwD9RkifALI → Rb8tiiSfY1LEpEkuZLtTr}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Commands.com Gateway tunnel protocol types.
|
|
3
|
+
*
|
|
4
|
+
* Matches the frame shapes sent and received by the Go implementation at
|
|
5
|
+
* https://github.com/Commands-com/gateway/blob/main/internal/gateway/integrations_tunnel.go
|
|
6
|
+
*
|
|
7
|
+
* Frame flow:
|
|
8
|
+
* server → client: tunnel.connected (after WebSocket open)
|
|
9
|
+
* client → server: tunnel.activate (claim a route)
|
|
10
|
+
* server → client: tunnel.activate.result (ok / error)
|
|
11
|
+
* server → client: tunnel.request (forwarded webhook)
|
|
12
|
+
* client → server: tunnel.response (reply to forwarded webhook)
|
|
13
|
+
* server → client: tunnel.route_deactivated (route revoked)
|
|
14
|
+
* server → client: tunnel.error (any protocol error)
|
|
15
|
+
*/
|
|
16
|
+
export interface TunnelConnectedFrame {
|
|
17
|
+
type: 'tunnel.connected';
|
|
18
|
+
device_id: string;
|
|
19
|
+
at?: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Client → server: claim one or more routes on the live tunnel.
|
|
23
|
+
*
|
|
24
|
+
* The gateway's frame shape (see
|
|
25
|
+
* internal/gateway/integrations_tunnel.go:handleTunnelActivate) expects
|
|
26
|
+
* a `routes` array of route_id strings (or objects with `route_id`), NOT
|
|
27
|
+
* a single `route_id` field. An earlier Shep build sent the singular form
|
|
28
|
+
* and the gateway silently ignored it, which is why no routes were ever
|
|
29
|
+
* activated and every public webhook returned 503.
|
|
30
|
+
*/
|
|
31
|
+
export interface TunnelActivateFrame {
|
|
32
|
+
type: 'tunnel.activate';
|
|
33
|
+
request_id?: string;
|
|
34
|
+
routes: string[];
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Server → client: per-route activation results.
|
|
38
|
+
*
|
|
39
|
+
* Again the real gateway returns a `results` array (one entry per route),
|
|
40
|
+
* not a flat `{ route_id, ok }` pair.
|
|
41
|
+
*/
|
|
42
|
+
export interface TunnelActivateResultEntry {
|
|
43
|
+
route_id: string;
|
|
44
|
+
status: string;
|
|
45
|
+
/** Present when status === "rejected". */
|
|
46
|
+
error?: {
|
|
47
|
+
code: string;
|
|
48
|
+
message: string;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
export interface TunnelActivateResultFrame {
|
|
52
|
+
type: 'tunnel.activate.result';
|
|
53
|
+
request_id?: string;
|
|
54
|
+
results: TunnelActivateResultEntry[];
|
|
55
|
+
}
|
|
56
|
+
export interface TunnelRequestFrame {
|
|
57
|
+
type: 'tunnel.request';
|
|
58
|
+
request_id: string;
|
|
59
|
+
route_id: string;
|
|
60
|
+
method: string;
|
|
61
|
+
path: string;
|
|
62
|
+
/** HTTP headers as [name, value] pairs. */
|
|
63
|
+
headers?: [string, string][];
|
|
64
|
+
/** Base64-encoded request body. */
|
|
65
|
+
body_base64?: string;
|
|
66
|
+
}
|
|
67
|
+
export interface TunnelResponseFrame {
|
|
68
|
+
type: 'tunnel.response';
|
|
69
|
+
request_id: string;
|
|
70
|
+
status: number;
|
|
71
|
+
headers?: [string, string][];
|
|
72
|
+
/** Base64-encoded response body. */
|
|
73
|
+
body_base64?: string;
|
|
74
|
+
}
|
|
75
|
+
export interface TunnelRouteDeactivatedFrame {
|
|
76
|
+
type: 'tunnel.route_deactivated';
|
|
77
|
+
route_id: string;
|
|
78
|
+
reason?: string;
|
|
79
|
+
}
|
|
80
|
+
export interface TunnelErrorFrame {
|
|
81
|
+
type: 'tunnel.error';
|
|
82
|
+
error: string;
|
|
83
|
+
}
|
|
84
|
+
export type TunnelInboundFrame = TunnelConnectedFrame | TunnelActivateResultFrame | TunnelRequestFrame | TunnelRouteDeactivatedFrame | TunnelErrorFrame;
|
|
85
|
+
export type TunnelOutboundFrame = TunnelActivateFrame | TunnelResponseFrame;
|
|
86
|
+
/** Higher-level, decoded request presented to the consuming handler. */
|
|
87
|
+
export interface DecodedTunnelRequest {
|
|
88
|
+
requestId: string;
|
|
89
|
+
routeId: string;
|
|
90
|
+
method: string;
|
|
91
|
+
path: string;
|
|
92
|
+
headers: Record<string, string>;
|
|
93
|
+
/** Decoded UTF-8 body; empty string if no body. */
|
|
94
|
+
body: string;
|
|
95
|
+
}
|
|
96
|
+
/** Response returned by the handler for a decoded request. */
|
|
97
|
+
export interface TunnelRequestResponse {
|
|
98
|
+
status: number;
|
|
99
|
+
headers?: Record<string, string>;
|
|
100
|
+
body?: string;
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=tunnel-protocol.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tunnel-protocol.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/services/messaging/tunnel-protocol.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,kBAAkB,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,iBAAiB,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED;;;;;GAKG;AACH,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,0CAA0C;IAC1C,KAAK,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;CAC3C;AAED,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,wBAAwB,CAAC;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,yBAAyB,EAAE,CAAC;CACtC;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,gBAAgB,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,2CAA2C;IAC3C,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;IAC7B,mCAAmC;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,iBAAiB,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;IAC7B,oCAAoC;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EAAE,0BAA0B,CAAC;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,cAAc,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,kBAAkB,GAC1B,oBAAoB,GACpB,yBAAyB,GACzB,kBAAkB,GAClB,2BAA2B,GAC3B,gBAAgB,CAAC;AAErB,MAAM,MAAM,mBAAmB,GAAG,mBAAmB,GAAG,mBAAmB,CAAC;AAE5E,wEAAwE;AACxE,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,mDAAmD;IACnD,IAAI,EAAE,MAAM,CAAC;CACd;AAED,8DAA8D;AAC9D,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Commands.com Gateway tunnel protocol types.
|
|
3
|
+
*
|
|
4
|
+
* Matches the frame shapes sent and received by the Go implementation at
|
|
5
|
+
* https://github.com/Commands-com/gateway/blob/main/internal/gateway/integrations_tunnel.go
|
|
6
|
+
*
|
|
7
|
+
* Frame flow:
|
|
8
|
+
* server → client: tunnel.connected (after WebSocket open)
|
|
9
|
+
* client → server: tunnel.activate (claim a route)
|
|
10
|
+
* server → client: tunnel.activate.result (ok / error)
|
|
11
|
+
* server → client: tunnel.request (forwarded webhook)
|
|
12
|
+
* client → server: tunnel.response (reply to forwarded webhook)
|
|
13
|
+
* server → client: tunnel.route_deactivated (route revoked)
|
|
14
|
+
* server → client: tunnel.error (any protocol error)
|
|
15
|
+
*/
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WhatsApp Cloud API Webhook Parser
|
|
3
|
+
*
|
|
4
|
+
* Converts a raw WhatsApp Business Cloud webhook payload into a domain-level
|
|
5
|
+
* ChatMessage, matching the same contract as the Telegram parser so the
|
|
6
|
+
* messaging service can dispatch both uniformly.
|
|
7
|
+
*
|
|
8
|
+
* Reference: https://developers.facebook.com/docs/whatsapp/cloud-api/webhooks/payload-examples
|
|
9
|
+
*
|
|
10
|
+
* A minimal incoming text message looks like:
|
|
11
|
+
*
|
|
12
|
+
* {
|
|
13
|
+
* "object": "whatsapp_business_account",
|
|
14
|
+
* "entry": [{
|
|
15
|
+
* "changes": [{
|
|
16
|
+
* "value": {
|
|
17
|
+
* "messages": [{
|
|
18
|
+
* "from": "15551234567",
|
|
19
|
+
* "id": "wamid.xxx",
|
|
20
|
+
* "timestamp": "1234567890",
|
|
21
|
+
* "type": "text",
|
|
22
|
+
* "text": { "body": "hello" }
|
|
23
|
+
* }]
|
|
24
|
+
* }
|
|
25
|
+
* }]
|
|
26
|
+
* }]
|
|
27
|
+
* }
|
|
28
|
+
*
|
|
29
|
+
* We only parse the first text message in the first change. Status updates
|
|
30
|
+
* (delivery receipts, read receipts) and non-text types are ignored and
|
|
31
|
+
* return null.
|
|
32
|
+
*/
|
|
33
|
+
export interface ParsedWhatsAppMessage {
|
|
34
|
+
chatId: string;
|
|
35
|
+
senderId?: string;
|
|
36
|
+
text: string;
|
|
37
|
+
}
|
|
38
|
+
export declare function parseWhatsAppUpdate(rawBody: string): ParsedWhatsAppMessage | null;
|
|
39
|
+
//# sourceMappingURL=whatsapp-webhook.parser.d.ts.map
|
package/dist/packages/core/src/infrastructure/services/messaging/whatsapp-webhook.parser.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"whatsapp-webhook.parser.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/services/messaging/whatsapp-webhook.parser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACd;AAoBD,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,qBAAqB,GAAG,IAAI,CAuBjF"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WhatsApp Cloud API Webhook Parser
|
|
3
|
+
*
|
|
4
|
+
* Converts a raw WhatsApp Business Cloud webhook payload into a domain-level
|
|
5
|
+
* ChatMessage, matching the same contract as the Telegram parser so the
|
|
6
|
+
* messaging service can dispatch both uniformly.
|
|
7
|
+
*
|
|
8
|
+
* Reference: https://developers.facebook.com/docs/whatsapp/cloud-api/webhooks/payload-examples
|
|
9
|
+
*
|
|
10
|
+
* A minimal incoming text message looks like:
|
|
11
|
+
*
|
|
12
|
+
* {
|
|
13
|
+
* "object": "whatsapp_business_account",
|
|
14
|
+
* "entry": [{
|
|
15
|
+
* "changes": [{
|
|
16
|
+
* "value": {
|
|
17
|
+
* "messages": [{
|
|
18
|
+
* "from": "15551234567",
|
|
19
|
+
* "id": "wamid.xxx",
|
|
20
|
+
* "timestamp": "1234567890",
|
|
21
|
+
* "type": "text",
|
|
22
|
+
* "text": { "body": "hello" }
|
|
23
|
+
* }]
|
|
24
|
+
* }
|
|
25
|
+
* }]
|
|
26
|
+
* }]
|
|
27
|
+
* }
|
|
28
|
+
*
|
|
29
|
+
* We only parse the first text message in the first change. Status updates
|
|
30
|
+
* (delivery receipts, read receipts) and non-text types are ignored and
|
|
31
|
+
* return null.
|
|
32
|
+
*/
|
|
33
|
+
export function parseWhatsAppUpdate(rawBody) {
|
|
34
|
+
if (!rawBody)
|
|
35
|
+
return null;
|
|
36
|
+
let update;
|
|
37
|
+
try {
|
|
38
|
+
update = JSON.parse(rawBody);
|
|
39
|
+
}
|
|
40
|
+
catch {
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
const change = update.entry?.[0]?.changes?.[0]?.value;
|
|
44
|
+
const message = change?.messages?.[0];
|
|
45
|
+
if (message?.type !== 'text')
|
|
46
|
+
return null;
|
|
47
|
+
const text = message.text?.body;
|
|
48
|
+
const from = message.from;
|
|
49
|
+
if (!text || !from)
|
|
50
|
+
return null;
|
|
51
|
+
return {
|
|
52
|
+
chatId: from,
|
|
53
|
+
senderId: from,
|
|
54
|
+
text,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_serve.command.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/cli/commands/_serve.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,OAAO,EAAwB,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"_serve.command.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/cli/commands/_serve.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,OAAO,EAAwB,MAAM,WAAW,CAAC;AA8B1D;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,OAAO,CAuE5C"}
|
|
@@ -68,6 +68,11 @@ export function createServeCommand() {
|
|
|
68
68
|
// Start auto-archive watcher
|
|
69
69
|
initializeAutoArchiveWatcher(featureRepo);
|
|
70
70
|
getAutoArchiveWatcher().start();
|
|
71
|
+
// Start messaging service if configured
|
|
72
|
+
const messagingService = container.resolve('IMessagingService');
|
|
73
|
+
if (messagingService.isConfigured()) {
|
|
74
|
+
await messagingService.start();
|
|
75
|
+
}
|
|
71
76
|
// Graceful shutdown handler — identical pattern to ui.command.ts
|
|
72
77
|
let isShuttingDown = false;
|
|
73
78
|
const shutdown = async () => {
|
|
@@ -79,6 +84,7 @@ export function createServeCommand() {
|
|
|
79
84
|
forceExit.unref();
|
|
80
85
|
getNotificationWatcher().stop();
|
|
81
86
|
getAutoArchiveWatcher().stop();
|
|
87
|
+
await messagingService.stop();
|
|
82
88
|
const deploymentService = container.resolve('IDeploymentService');
|
|
83
89
|
deploymentService.stopAll();
|
|
84
90
|
await service.stop();
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Application Delete Command
|
|
3
|
+
*
|
|
4
|
+
* Soft-deletes an application and stops any active session.
|
|
5
|
+
*
|
|
6
|
+
* Usage: shep app del <id> [--force]
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* $ shep app del a1b2c3d4
|
|
10
|
+
* $ shep app del a1b2c3d4 --force
|
|
11
|
+
*/
|
|
12
|
+
import { Command } from 'commander';
|
|
13
|
+
export declare function createDelCommand(): Command;
|
|
14
|
+
//# sourceMappingURL=del.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"del.command.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/app/del.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAYpC,wBAAgB,gBAAgB,IAAI,OAAO,CAyC1C"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Application Delete Command
|
|
3
|
+
*
|
|
4
|
+
* Soft-deletes an application and stops any active session.
|
|
5
|
+
*
|
|
6
|
+
* Usage: shep app del <id> [--force]
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* $ shep app del a1b2c3d4
|
|
10
|
+
* $ shep app del a1b2c3d4 --force
|
|
11
|
+
*/
|
|
12
|
+
import { Command } from 'commander';
|
|
13
|
+
import { container } from '../../../../../packages/core/src/infrastructure/di/container.js';
|
|
14
|
+
import { DeleteApplicationUseCase } from '../../../../../packages/core/src/application/use-cases/applications/delete-application.use-case.js';
|
|
15
|
+
import { colors, messages } from '../../ui/index.js';
|
|
16
|
+
import { confirm } from '@inquirer/prompts';
|
|
17
|
+
import { resolveApplication } from './resolve-application.js';
|
|
18
|
+
import { getCliI18n } from '../../i18n.js';
|
|
19
|
+
export function createDelCommand() {
|
|
20
|
+
const t = getCliI18n().t;
|
|
21
|
+
return new Command('del')
|
|
22
|
+
.description(t('cli:commands.app.del.description'))
|
|
23
|
+
.argument('<id>', t('cli:commands.app.del.idArgument'))
|
|
24
|
+
.option('-f, --force', t('cli:commands.app.del.forceOption'))
|
|
25
|
+
.action(async (id, options) => {
|
|
26
|
+
try {
|
|
27
|
+
const resolved = await resolveApplication(id);
|
|
28
|
+
if ('error' in resolved) {
|
|
29
|
+
messages.error(resolved.error);
|
|
30
|
+
process.exitCode = 1;
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
const app = resolved.application;
|
|
34
|
+
if (!options.force) {
|
|
35
|
+
const confirmed = await confirm({
|
|
36
|
+
message: t('cli:commands.app.del.confirmDelete', { name: app.name }),
|
|
37
|
+
default: false,
|
|
38
|
+
});
|
|
39
|
+
if (!confirmed) {
|
|
40
|
+
messages.info(t('cli:commands.app.del.cancelled'));
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
const deleteUseCase = container.resolve(DeleteApplicationUseCase);
|
|
45
|
+
await deleteUseCase.execute(app.id);
|
|
46
|
+
messages.newline();
|
|
47
|
+
messages.success(t('cli:commands.app.del.appDeleted'));
|
|
48
|
+
console.log(` ${colors.muted(t('cli:commands.app.del.nameLabel'))} ${app.name}`);
|
|
49
|
+
console.log(` ${colors.muted(t('cli:commands.app.del.slugLabel'))} ${app.slug}`);
|
|
50
|
+
messages.newline();
|
|
51
|
+
}
|
|
52
|
+
catch (error) {
|
|
53
|
+
const err = error instanceof Error ? error : new Error(String(error));
|
|
54
|
+
messages.error(t('cli:commands.app.del.failedToDelete'), err);
|
|
55
|
+
process.exitCode = 1;
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* App Command
|
|
3
|
+
*
|
|
4
|
+
* Top-level app command with subcommands for managing applications.
|
|
5
|
+
*
|
|
6
|
+
* Usage:
|
|
7
|
+
* shep app [subcommand]
|
|
8
|
+
*
|
|
9
|
+
* Subcommands:
|
|
10
|
+
* shep app ls List applications
|
|
11
|
+
* shep app show <id> Display details of an application
|
|
12
|
+
* shep app new <desc> Create a new application
|
|
13
|
+
* shep app del <id> Delete an application
|
|
14
|
+
*/
|
|
15
|
+
import { Command } from 'commander';
|
|
16
|
+
/**
|
|
17
|
+
* Create the app command with all subcommands
|
|
18
|
+
*/
|
|
19
|
+
export declare function createAppCommand(): Command;
|
|
20
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/app/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAOpC;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CAU1C"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* App Command
|
|
3
|
+
*
|
|
4
|
+
* Top-level app command with subcommands for managing applications.
|
|
5
|
+
*
|
|
6
|
+
* Usage:
|
|
7
|
+
* shep app [subcommand]
|
|
8
|
+
*
|
|
9
|
+
* Subcommands:
|
|
10
|
+
* shep app ls List applications
|
|
11
|
+
* shep app show <id> Display details of an application
|
|
12
|
+
* shep app new <desc> Create a new application
|
|
13
|
+
* shep app del <id> Delete an application
|
|
14
|
+
*/
|
|
15
|
+
import { Command } from 'commander';
|
|
16
|
+
import { createLsCommand } from './ls.command.js';
|
|
17
|
+
import { createShowCommand } from './show.command.js';
|
|
18
|
+
import { createNewCommand } from './new.command.js';
|
|
19
|
+
import { createDelCommand } from './del.command.js';
|
|
20
|
+
import { getCliI18n } from '../../i18n.js';
|
|
21
|
+
/**
|
|
22
|
+
* Create the app command with all subcommands
|
|
23
|
+
*/
|
|
24
|
+
export function createAppCommand() {
|
|
25
|
+
const t = getCliI18n().t;
|
|
26
|
+
const app = new Command('app')
|
|
27
|
+
.description(t('cli:commands.app.description'))
|
|
28
|
+
.addCommand(createLsCommand())
|
|
29
|
+
.addCommand(createShowCommand())
|
|
30
|
+
.addCommand(createNewCommand())
|
|
31
|
+
.addCommand(createDelCommand());
|
|
32
|
+
return app;
|
|
33
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ls.command.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/app/ls.command.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAgCpC,wBAAgB,eAAe,IAAI,OAAO,CAkCzC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Application List Command
|
|
3
|
+
*
|
|
4
|
+
* List all applications in a formatted table.
|
|
5
|
+
*
|
|
6
|
+
* Usage:
|
|
7
|
+
* shep app ls
|
|
8
|
+
*/
|
|
9
|
+
import { Command } from 'commander';
|
|
10
|
+
import { container } from '../../../../../packages/core/src/infrastructure/di/container.js';
|
|
11
|
+
import { ListApplicationsUseCase } from '../../../../../packages/core/src/application/use-cases/applications/list-applications.use-case.js';
|
|
12
|
+
import { colors, messages, renderListView } from '../../ui/index.js';
|
|
13
|
+
import { getCliI18n } from '../../i18n.js';
|
|
14
|
+
/** Format a duration in ms to a compact human-readable string. */
|
|
15
|
+
function formatDuration(ms) {
|
|
16
|
+
const seconds = Math.floor(ms / 1000);
|
|
17
|
+
if (seconds < 60)
|
|
18
|
+
return `${seconds}s`;
|
|
19
|
+
const minutes = Math.floor(seconds / 60);
|
|
20
|
+
if (minutes < 60)
|
|
21
|
+
return `${minutes}m`;
|
|
22
|
+
const hours = Math.floor(minutes / 60);
|
|
23
|
+
const remMin = minutes % 60;
|
|
24
|
+
if (hours < 24)
|
|
25
|
+
return remMin > 0 ? `${hours}h ${remMin}m` : `${hours}h`;
|
|
26
|
+
const days = Math.floor(hours / 24);
|
|
27
|
+
return `${days}d`;
|
|
28
|
+
}
|
|
29
|
+
function colorStatus(status) {
|
|
30
|
+
switch (status) {
|
|
31
|
+
case 'Idle':
|
|
32
|
+
return colors.muted(status);
|
|
33
|
+
case 'Active':
|
|
34
|
+
return colors.success(status);
|
|
35
|
+
case 'Error':
|
|
36
|
+
return colors.warning(status);
|
|
37
|
+
default:
|
|
38
|
+
return colors.muted(status);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
export function createLsCommand() {
|
|
42
|
+
const t = getCliI18n().t;
|
|
43
|
+
return new Command('ls').description(t('cli:commands.app.ls.description')).action(async () => {
|
|
44
|
+
try {
|
|
45
|
+
const useCase = container.resolve(ListApplicationsUseCase);
|
|
46
|
+
const applications = await useCase.execute();
|
|
47
|
+
const now = Date.now();
|
|
48
|
+
const rows = applications.map((app) => [
|
|
49
|
+
app.id.substring(0, 8),
|
|
50
|
+
app.name,
|
|
51
|
+
colorStatus(app.status),
|
|
52
|
+
app.repositoryPath,
|
|
53
|
+
colors.muted(`${formatDuration(now - new Date(app.createdAt).getTime())} ago`),
|
|
54
|
+
]);
|
|
55
|
+
renderListView({
|
|
56
|
+
title: t('cli:commands.app.ls.title'),
|
|
57
|
+
columns: [
|
|
58
|
+
{ label: t('cli:commands.app.ls.idColumn'), width: 10 },
|
|
59
|
+
{ label: t('cli:commands.app.ls.nameColumn'), width: 28 },
|
|
60
|
+
{ label: t('cli:commands.app.ls.statusColumn'), width: 10 },
|
|
61
|
+
{ label: t('cli:commands.app.ls.pathColumn'), width: 36 },
|
|
62
|
+
{ label: t('cli:commands.app.ls.createdColumn'), width: 12 },
|
|
63
|
+
],
|
|
64
|
+
rows,
|
|
65
|
+
emptyMessage: t('cli:commands.app.ls.noApps'),
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
catch (error) {
|
|
69
|
+
const err = error instanceof Error ? error : new Error(String(error));
|
|
70
|
+
messages.error(t('cli:commands.app.ls.failedToList'), err);
|
|
71
|
+
process.exitCode = 1;
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Application New Command
|
|
3
|
+
*
|
|
4
|
+
* Creates a new application with optional initial prompt to kick off
|
|
5
|
+
* an interactive agent session.
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* shep app new <description> [options]
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* $ shep app new "Build a todo list app with React"
|
|
12
|
+
* $ shep app new "REST API for inventory management" --agent claude-code
|
|
13
|
+
* $ shep app new "Portfolio website" --model claude-opus-4-6
|
|
14
|
+
*/
|
|
15
|
+
import { Command } from 'commander';
|
|
16
|
+
export declare function createNewCommand(): Command;
|
|
17
|
+
//# sourceMappingURL=new.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"new.command.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/app/new.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAWpC,wBAAgB,gBAAgB,IAAI,OAAO,CAuD1C"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Application New Command
|
|
3
|
+
*
|
|
4
|
+
* Creates a new application with optional initial prompt to kick off
|
|
5
|
+
* an interactive agent session.
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* shep app new <description> [options]
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* $ shep app new "Build a todo list app with React"
|
|
12
|
+
* $ shep app new "REST API for inventory management" --agent claude-code
|
|
13
|
+
* $ shep app new "Portfolio website" --model claude-opus-4-6
|
|
14
|
+
*/
|
|
15
|
+
import { Command } from 'commander';
|
|
16
|
+
import { container } from '../../../../../packages/core/src/infrastructure/di/container.js';
|
|
17
|
+
import { CreateApplicationUseCase } from '../../../../../packages/core/src/application/use-cases/applications/create-application.use-case.js';
|
|
18
|
+
import { colors, messages, spinner } from '../../ui/index.js';
|
|
19
|
+
import { getCliI18n } from '../../i18n.js';
|
|
20
|
+
export function createNewCommand() {
|
|
21
|
+
const t = getCliI18n().t;
|
|
22
|
+
return new Command('new')
|
|
23
|
+
.description(t('cli:commands.app.new.description'))
|
|
24
|
+
.argument('<description>', t('cli:commands.app.new.descriptionArgument'))
|
|
25
|
+
.option('--agent <type>', t('cli:commands.app.new.agentOption'))
|
|
26
|
+
.option('--model <model>', t('cli:commands.app.new.modelOption'))
|
|
27
|
+
.action(async (description, options) => {
|
|
28
|
+
try {
|
|
29
|
+
const useCase = container.resolve(CreateApplicationUseCase);
|
|
30
|
+
const result = await spinner(t('cli:commands.app.new.spinnerText'), () => useCase.execute({
|
|
31
|
+
description,
|
|
32
|
+
agentType: options.agent,
|
|
33
|
+
modelOverride: options.model,
|
|
34
|
+
initialPrompt: description,
|
|
35
|
+
}));
|
|
36
|
+
const { application } = result;
|
|
37
|
+
messages.newline();
|
|
38
|
+
messages.success(t('cli:commands.app.new.appCreated'));
|
|
39
|
+
console.log(` ${colors.muted(t('cli:commands.app.new.idLabel'))} ${colors.accent(application.id)}`);
|
|
40
|
+
console.log(` ${colors.muted(t('cli:commands.app.new.nameLabel'))} ${application.name}`);
|
|
41
|
+
console.log(` ${colors.muted(t('cli:commands.app.new.slugLabel'))} ${application.slug}`);
|
|
42
|
+
console.log(` ${colors.muted(t('cli:commands.app.new.pathLabel'))} ${result.repositoryPath}`);
|
|
43
|
+
console.log(` ${colors.muted(t('cli:commands.app.new.statusLabel'))} ${application.status}`);
|
|
44
|
+
if (application.agentType) {
|
|
45
|
+
console.log(` ${colors.muted(t('cli:commands.app.new.agentLabel'))} ${application.agentType}`);
|
|
46
|
+
}
|
|
47
|
+
if (application.modelOverride) {
|
|
48
|
+
console.log(` ${colors.muted(t('cli:commands.app.new.modelLabel'))} ${application.modelOverride}`);
|
|
49
|
+
}
|
|
50
|
+
messages.newline();
|
|
51
|
+
}
|
|
52
|
+
catch (error) {
|
|
53
|
+
const err = error instanceof Error ? error : new Error(String(error));
|
|
54
|
+
messages.error(t('cli:commands.app.new.failedToCreate'), err);
|
|
55
|
+
process.exitCode = 1;
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared helper: resolve an application by exact ID, prefix, or slug.
|
|
3
|
+
*/
|
|
4
|
+
import type { Application } from '../../../../../packages/core/src/domain/generated/output.js';
|
|
5
|
+
export declare function resolveApplication(id: string): Promise<{
|
|
6
|
+
application: Application;
|
|
7
|
+
} | {
|
|
8
|
+
error: string;
|
|
9
|
+
}>;
|
|
10
|
+
//# sourceMappingURL=resolve-application.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-application.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/app/resolve-application.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAGhE,wBAAsB,kBAAkB,CACtC,EAAE,EAAE,MAAM,GACT,OAAO,CAAC;IAAE,WAAW,EAAE,WAAW,CAAA;CAAE,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CA6B3D"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared helper: resolve an application by exact ID, prefix, or slug.
|
|
3
|
+
*/
|
|
4
|
+
import { container } from '../../../../../packages/core/src/infrastructure/di/container.js';
|
|
5
|
+
import { getCliI18n } from '../../i18n.js';
|
|
6
|
+
export async function resolveApplication(id) {
|
|
7
|
+
const t = getCliI18n().t;
|
|
8
|
+
const repo = container.resolve('IApplicationRepository');
|
|
9
|
+
// Try exact ID match first
|
|
10
|
+
const exact = await repo.findById(id);
|
|
11
|
+
if (exact)
|
|
12
|
+
return { application: exact };
|
|
13
|
+
// Try slug match
|
|
14
|
+
const bySlug = await repo.findBySlug(id);
|
|
15
|
+
if (bySlug)
|
|
16
|
+
return { application: bySlug };
|
|
17
|
+
// Try prefix match on ID
|
|
18
|
+
if (id.length < 36) {
|
|
19
|
+
const all = await repo.list();
|
|
20
|
+
const matches = all.filter((a) => a.id.startsWith(id));
|
|
21
|
+
if (matches.length === 1)
|
|
22
|
+
return { application: matches[0] };
|
|
23
|
+
if (matches.length > 1) {
|
|
24
|
+
return {
|
|
25
|
+
error: t('cli:commands.app.resolve.multipleMatch', {
|
|
26
|
+
id,
|
|
27
|
+
matches: matches.map((m) => m.id.substring(0, 8)).join(', '),
|
|
28
|
+
}),
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return { error: t('cli:commands.app.resolve.notFound', { id }) };
|
|
33
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Application Show Command
|
|
3
|
+
*
|
|
4
|
+
* Display details of a specific application.
|
|
5
|
+
*
|
|
6
|
+
* Usage:
|
|
7
|
+
* shep app show <id>
|
|
8
|
+
*/
|
|
9
|
+
import { Command } from 'commander';
|
|
10
|
+
export declare function createShowCommand(): Command;
|
|
11
|
+
//# sourceMappingURL=show.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"show.command.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/app/show.command.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAcpC,wBAAgB,iBAAiB,IAAI,OAAO,CAwE3C"}
|