@shepai/cli 1.136.0-pr437.9f802f1 → 1.136.0-pr440.bb6800a
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/Feature.yaml +3 -0
- package/apis/json-schema/FeatureFlags.yaml +0 -5
- package/apis/json-schema/SdlcLifecycle.yaml +1 -0
- package/dist/packages/core/src/application/ports/output/repositories/feature-repository.interface.d.ts +2 -0
- package/dist/packages/core/src/application/ports/output/repositories/feature-repository.interface.d.ts.map +1 -1
- package/dist/packages/core/src/application/ports/output/services/index.d.ts +0 -1
- package/dist/packages/core/src/application/ports/output/services/index.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/features/archive-feature.use-case.d.ts +20 -0
- package/dist/packages/core/src/application/use-cases/features/archive-feature.use-case.d.ts.map +1 -0
- package/dist/packages/core/src/application/use-cases/features/archive-feature.use-case.js +74 -0
- package/dist/packages/core/src/application/use-cases/features/unarchive-feature.use-case.d.ts +20 -0
- package/dist/packages/core/src/application/use-cases/features/unarchive-feature.use-case.d.ts.map +1 -0
- package/dist/packages/core/src/application/use-cases/features/unarchive-feature.use-case.js +65 -0
- package/dist/packages/core/src/domain/factories/settings-defaults.factory.d.ts.map +1 -1
- package/dist/packages/core/src/domain/factories/settings-defaults.factory.js +0 -1
- package/dist/packages/core/src/domain/generated/output.d.ts +6 -5
- package/dist/packages/core/src/domain/generated/output.d.ts.map +1 -1
- package/dist/packages/core/src/domain/generated/output.js +1 -0
- package/dist/packages/core/src/infrastructure/di/container.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/di/container.js +10 -10
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/feature.mapper.d.ts +1 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/feature.mapper.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/feature.mapper.js +6 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts +0 -1
- 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 +0 -2
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/044-add-previous-lifecycle.d.ts +12 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/044-add-previous-lifecycle.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/044-add-previous-lifecycle.js +16 -0
- package/dist/packages/core/src/infrastructure/repositories/sqlite-feature.repository.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/repositories/sqlite-feature.repository.js +7 -2
- 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 +2 -3
- package/dist/src/presentation/cli/commands/feat/archive.command.d.ts +18 -0
- package/dist/src/presentation/cli/commands/feat/archive.command.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/feat/archive.command.js +54 -0
- package/dist/src/presentation/cli/commands/feat/index.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/feat/index.js +5 -1
- package/dist/src/presentation/cli/commands/feat/ls.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/feat/ls.command.js +5 -0
- package/dist/src/presentation/cli/commands/feat/unarchive.command.d.ts +17 -0
- package/dist/src/presentation/cli/commands/feat/unarchive.command.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/feat/unarchive.command.js +42 -0
- package/dist/src/presentation/cli/index.js +0 -2
- package/dist/src/presentation/web/app/(dashboard)/get-graph-data.d.ts.map +1 -1
- package/dist/src/presentation/web/app/(dashboard)/get-graph-data.js +6 -1
- package/dist/src/presentation/web/app/actions/archive-feature.d.ts +6 -0
- package/dist/src/presentation/web/app/actions/archive-feature.d.ts.map +1 -0
- package/dist/src/presentation/web/app/actions/archive-feature.js +16 -0
- package/dist/src/presentation/web/app/actions/unarchive-feature.d.ts +6 -0
- package/dist/src/presentation/web/app/actions/unarchive-feature.d.ts.map +1 -0
- package/dist/src/presentation/web/app/actions/unarchive-feature.js +16 -0
- package/dist/src/presentation/web/app/api/agent-events/route.d.ts.map +1 -1
- package/dist/src/presentation/web/app/api/agent-events/route.js +1 -0
- package/dist/src/presentation/web/components/common/feature-node/derive-feature-state.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-node/derive-feature-state.js +6 -0
- package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.d.ts +3 -1
- package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.js +11 -1
- package/dist/src/presentation/web/components/common/feature-node/feature-node.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-node/feature-node.js +16 -2
- package/dist/src/presentation/web/components/common/feature-node/feature-node.stories.d.ts +5 -0
- package/dist/src/presentation/web/components/common/feature-node/feature-node.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-node/feature-node.stories.js +75 -1
- package/dist/src/presentation/web/components/common/repository-node/repository-node.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/repository-node/repository-node.js +2 -9
- package/dist/src/presentation/web/components/features/control-center/control-center-inner.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/control-center/control-center-inner.js +13 -4
- package/dist/src/presentation/web/components/features/control-center/control-center.stories.d.ts +6 -0
- package/dist/src/presentation/web/components/features/control-center/control-center.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/control-center/control-center.stories.js +70 -0
- package/dist/src/presentation/web/components/features/control-center/use-control-center-state.d.ts +6 -0
- package/dist/src/presentation/web/components/features/control-center/use-control-center-state.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/control-center/use-control-center-state.js +43 -2
- package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.js +0 -3
- package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.stories.js +0 -3
- 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 +0 -5
- package/dist/src/presentation/web/components/features/settings/settings-page-client.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/settings/settings-page-client.stories.js +0 -1
- package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.stories.js +0 -1
- package/dist/src/presentation/web/dev-server.js +1 -62
- package/dist/src/presentation/web/hooks/feature-flags-context.d.ts.map +1 -1
- package/dist/src/presentation/web/hooks/feature-flags-context.js +0 -1
- package/dist/src/presentation/web/hooks/sidebar-features-context.d.ts.map +1 -1
- package/dist/src/presentation/web/hooks/sidebar-features-context.js +1 -0
- package/dist/src/presentation/web/hooks/use-graph-state.d.ts +1 -1
- package/dist/src/presentation/web/hooks/use-graph-state.d.ts.map +1 -1
- package/dist/src/presentation/web/hooks/use-graph-state.js +17 -2
- package/dist/src/presentation/web/lib/derive-graph.d.ts +4 -0
- package/dist/src/presentation/web/lib/derive-graph.d.ts.map +1 -1
- package/dist/src/presentation/web/lib/derive-graph.js +12 -0
- package/dist/src/presentation/web/lib/feature-flags.d.ts +0 -2
- package/dist/src/presentation/web/lib/feature-flags.d.ts.map +1 -1
- package/dist/src/presentation/web/lib/feature-flags.js +0 -5
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -2
- 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 +1 -1
- package/web/.next/required-server-files.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +80 -80
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js +1 -1
- 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/create/page/server-reference-manifest.json +80 -80
- package/web/.next/server/app/(dashboard)/@drawer/create/page.js +1 -1
- 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 +92 -92
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js +1 -1
- 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 +92 -92
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js +1 -1
- 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]/page/server-reference-manifest.json +76 -76
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js +1 -1
- 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)/create/page/server-reference-manifest.json +80 -80
- package/web/.next/server/app/(dashboard)/create/page.js +1 -1
- 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 +92 -92
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js +1 -1
- 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 +92 -92
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js +1 -1
- 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 +76 -76
- package/web/.next/server/app/(dashboard)/page.js +1 -1
- 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]/page/server-reference-manifest.json +76 -76
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js +1 -1
- 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 +3 -3
- 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/settings/page/server-reference-manifest.json +8 -8
- 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 +8 -8
- 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 +8 -8
- 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 +3 -3
- package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
- package/web/.next/server/chunks/403f9_next_567de315._.js +2 -2
- package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_370c43b1.js +1 -1
- package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_370c43b1.js.map +1 -1
- package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_4d623b8e.js +2 -2
- package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_4d623b8e.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__c6e32a23._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__c6e32a23._.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/[root-of-the-server]__357d99f9._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__3ef34e4c._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__43f51aa6._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__43f51aa6._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__a9079247._.js → [root-of-the-server]__61564698._.js} +2 -2
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__944b653f._.js.map → [root-of-the-server]__61564698._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__6ec59045._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__6ec59045._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__1cf9161b._.js → [root-of-the-server]__74ab160c._.js} +2 -2
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__a9079247._.js.map → [root-of-the-server]__74ab160c._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__815546bd._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__815546bd._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__a5f9c6e5._.js +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__a5f9c6e5._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__71b5d4e8._.js → [root-of-the-server]__bd16cded._.js} +2 -2
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__71b5d4e8._.js.map → [root-of-the-server]__bd16cded._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__d48c5b11._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__d48c5b11._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__944b653f._.js → [root-of-the-server]__f14fffe1._.js} +2 -2
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__1cf9161b._.js.map → [root-of-the-server]__f14fffe1._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_0020fddd._.js +1 -1
- package/web/.next/server/chunks/ssr/_0020fddd._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_02ec1aea._.js +1 -1
- package/web/.next/server/chunks/ssr/_02ec1aea._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_7dd6c393._.js → _2fdfd9ab._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_7dd6c393._.js.map → _2fdfd9ab._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_36059d08._.js +4 -0
- package/web/.next/server/chunks/ssr/_36059d08._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{_7a4bfe44._.js → _65f6e0e0._.js} +3 -3
- package/web/.next/server/chunks/ssr/{_7a4bfe44._.js.map → _65f6e0e0._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_7dca1882._.js +1 -1
- package/web/.next/server/chunks/ssr/_7dca1882._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_913fb649._.js +3 -0
- package/web/.next/server/chunks/ssr/{_7bc4a733._.js.map → _913fb649._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_a37f5f18._.js +1 -1
- package/web/.next/server/chunks/ssr/_a37f5f18._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_01383b12._.js → _a51673dd._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_82cc1fcf._.js.map → _a51673dd._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_a9f57758._.js +1 -1
- package/web/.next/server/chunks/ssr/{_82cc1fcf._.js → _ae587066._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_01383b12._.js.map → _ae587066._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/{_3b9ec2d7._.js → _d162e30d._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_3b9ec2d7._.js.map → _d162e30d._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_d4b20e29._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_112b6fbf._.js → _d763f022._.js} +3 -3
- package/web/.next/server/chunks/ssr/{_112b6fbf._.js.map → _d763f022._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_d8575088._.js +1 -1
- package/web/.next/server/chunks/ssr/_d8575088._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_f39a1adb._.js +1 -1
- package/web/.next/server/chunks/ssr/_f39a1adb._.js.map +1 -1
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{src_presentation_web_99db45e9._.js → src_presentation_web_97dc2fb0._.js} +2 -2
- package/web/.next/server/chunks/ssr/{src_presentation_web_99db45e9._.js.map → src_presentation_web_97dc2fb0._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1b176e3c.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1b176e3c.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_bd9f0dda.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_bd9f0dda.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_baaca5d5._.js +1 -1
- 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_ca99d62d._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_ca99d62d._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.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/pages/500.html +2 -2
- package/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/server/server-reference-manifest.json +463 -463
- package/web/.next/static/chunks/{18616dda443b7ed1.js → 0b7fe2ac4f078f54.js} +7 -7
- package/web/.next/static/chunks/{ac7469534efcc3b0.js → 2d6eb4409cc6324d.js} +1 -1
- package/web/.next/static/chunks/{acd8d06ded15d1ed.js → 3a7ff215d6a2c489.js} +2 -2
- package/web/.next/static/chunks/{dc8683ddff12ef38.js → 4b3e7454c2b07877.js} +1 -1
- package/web/.next/static/chunks/{745234c95baaf6df.js → 791e64500a080d4f.js} +1 -1
- package/web/.next/static/chunks/79c9871d46b22bf8.css +1 -0
- package/web/.next/static/chunks/7ee0606f698b032c.js +1 -0
- package/web/.next/static/chunks/87640f53f3bff3a6.js +1 -0
- package/web/.next/static/chunks/bb5bd1b5aafc70cd.js +1 -0
- package/web/.next/static/chunks/{cfcc46c87d712da6.js → bf0a401666f990e2.js} +1 -1
- package/web/.next/static/chunks/c4c3fcf18262b386.js +2 -0
- package/web/.next/static/chunks/{12511f976fedf4cb.js → cd14232b3d8f5052.js} +1 -1
- package/web/.next/static/chunks/{08d0fd276fa7ac89.js → dd8f2197640aea64.js} +1 -1
- package/web/.next/static/chunks/{47d110d7472840fd.js → fc442d957b35bd5e.js} +1 -1
- package/dist/packages/core/src/application/ports/output/services/coasts-service.interface.d.ts +0 -132
- package/dist/packages/core/src/application/ports/output/services/coasts-service.interface.d.ts.map +0 -1
- package/dist/packages/core/src/application/ports/output/services/coasts-service.interface.js +0 -12
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/044-add-feature-flag-coasts-dev-server.d.ts +0 -11
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/044-add-feature-flag-coasts-dev-server.d.ts.map +0 -1
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/044-add-feature-flag-coasts-dev-server.js +0 -17
- package/dist/packages/core/src/infrastructure/services/coasts.service.d.ts +0 -42
- package/dist/packages/core/src/infrastructure/services/coasts.service.d.ts.map +0 -1
- package/dist/packages/core/src/infrastructure/services/coasts.service.js +0 -185
- package/dist/src/presentation/cli/commands/coasts/index.d.ts +0 -3
- package/dist/src/presentation/cli/commands/coasts/index.d.ts.map +0 -1
- package/dist/src/presentation/cli/commands/coasts/index.js +0 -7
- package/dist/src/presentation/cli/commands/coasts/init.command.d.ts +0 -3
- package/dist/src/presentation/cli/commands/coasts/init.command.d.ts.map +0 -1
- package/dist/src/presentation/cli/commands/coasts/init.command.js +0 -40
- package/dist/src/presentation/web/app/actions/check-coastfile.d.ts +0 -5
- package/dist/src/presentation/web/app/actions/check-coastfile.d.ts.map +0 -1
- package/dist/src/presentation/web/app/actions/check-coastfile.js +0 -16
- package/dist/src/presentation/web/app/actions/generate-coastfile.d.ts +0 -7
- package/dist/src/presentation/web/app/actions/generate-coastfile.d.ts.map +0 -1
- package/dist/src/presentation/web/app/actions/generate-coastfile.js +0 -22
- package/dist/src/presentation/web/coasts-dev-server.d.ts +0 -34
- package/dist/src/presentation/web/coasts-dev-server.d.ts.map +0 -1
- package/dist/src/presentation/web/coasts-dev-server.js +0 -69
- package/dist/src/presentation/web/components/common/repository-node/use-coasts-actions.d.ts +0 -12
- package/dist/src/presentation/web/components/common/repository-node/use-coasts-actions.d.ts.map +0 -1
- package/dist/src/presentation/web/components/common/repository-node/use-coasts-actions.js +0 -76
- package/web/.next/server/chunks/ssr/_12282083._.js +0 -4
- package/web/.next/server/chunks/ssr/_12282083._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_7bc4a733._.js +0 -3
- package/web/.next/static/chunks/0d4f2f0257e78c06.css +0 -1
- package/web/.next/static/chunks/1f321d18af8d8b30.js +0 -1
- package/web/.next/static/chunks/891d57985c5f3a0b.js +0 -1
- package/web/.next/static/chunks/dfe1ea2ffdc06c44.js +0 -2
- package/web/.next/static/chunks/fe54542759c9fd27.js +0 -1
- /package/web/.next/static/{YPdE95T5GezMRcw-C6nfC → JaRBeVSDLWZLQIl_k7ChK}/_buildManifest.js +0 -0
- /package/web/.next/static/{YPdE95T5GezMRcw-C6nfC → JaRBeVSDLWZLQIl_k7ChK}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{YPdE95T5GezMRcw-C6nfC → JaRBeVSDLWZLQIl_k7ChK}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,58860,44229,e=>{"use strict";let t=(0,e.i(3645).default)("timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]);e.s(["Timer",()=>t],58860);var r=e.i(93752);e.s(["Code",()=>r.default],44229)},10714,99105,e=>{"use strict";var t=e.i(3645);let r=(0,t.default)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);e.s(["default",()=>r],10714);let o=(0,t.default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["ChevronDown",()=>o],99105)},38573,e=>{"use strict";let t=(0,e.i(3645).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",()=>t],38573)},30702,e=>{"use strict";let t=(0,e.i(3645).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["ExternalLink",()=>t],30702)},23925,1012,e=>{"use strict";let t=(0,e.i(3645).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["default",()=>t],1012),e.s(["Check",()=>t],23925)},23405,e=>{"use strict";var t=e.i(79054);function r(e){let r=t.useRef({value:e,previous:e});return t.useMemo(()=>(r.current.value!==e&&(r.current.previous=r.current.value,r.current.value=e),r.current.previous),[e])}e.s(["usePrevious",()=>r])},11345,e=>{"use strict";let t=(0,e.i(3645).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["ChevronLeft",()=>t],11345)},76016,e=>{"use strict";let t=(0,e.i(3645).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["ChevronRight",()=>t],76016)},93752,e=>{"use strict";let t=(0,e.i(3645).default)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);e.s(["default",()=>t])},83902,e=>{"use strict";let t=(0,e.i(3645).default)("rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]);e.s(["Rocket",()=>t],83902)},90382,e=>{"use strict";var t=e.i(20314),r=e.i(79054),o=e.i(91967),a=e.i(5978),n=e.i(22528),s=e.i(53532),i=e.i(41687),l=e.i(56720),d=e.i(13123),c=e.i(52740),u=e.i(39979),p=e.i(85995),f=e.i(87620),h=e.i(86874),m=e.i(36589),v=e.i(73772),x=e.i(13044),g="Popover",[b,y]=(0,n.createContextScope)(g,[c.createPopperScope]),k=(0,c.createPopperScope)(),[w,j]=b(g),C=e=>{let{__scopePopover:o,children:a,open:n,defaultOpen:s,onOpenChange:i,modal:l=!1}=e,u=k(o),p=r.useRef(null),[f,h]=r.useState(!1),[v,x]=(0,m.useControllableState)({prop:n,defaultProp:s??!1,onChange:i,caller:g});return(0,t.jsx)(c.Root,{...u,children:(0,t.jsx)(w,{scope:o,contentId:(0,d.useId)(),triggerRef:p,open:v,onOpenChange:x,onOpenToggle:r.useCallback(()=>x(e=>!e),[x]),hasCustomAnchor:f,onCustomAnchorAdd:r.useCallback(()=>h(!0),[]),onCustomAnchorRemove:r.useCallback(()=>h(!1),[]),modal:l,children:a})})};C.displayName=g;var P="PopoverAnchor",R=r.forwardRef((e,o)=>{let{__scopePopover:a,...n}=e,s=j(P,a),i=k(a),{onCustomAnchorAdd:l,onCustomAnchorRemove:d}=s;return r.useEffect(()=>(l(),()=>d()),[l,d]),(0,t.jsx)(c.Anchor,{...i,...n,ref:o})});R.displayName=P;var N="PopoverTrigger",A=r.forwardRef((e,r)=>{let{__scopePopover:n,...s}=e,i=j(N,n),l=k(n),d=(0,a.useComposedRefs)(r,i.triggerRef),u=(0,t.jsx)(f.Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":U(i.open),...s,ref:d,onClick:(0,o.composeEventHandlers)(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?u:(0,t.jsx)(c.Anchor,{asChild:!0,...l,children:u})});A.displayName=N;var S="PopoverPortal",[T,M]=b(S,{forceMount:void 0}),E=e=>{let{__scopePopover:r,forceMount:o,children:a,container:n}=e,s=j(S,r);return(0,t.jsx)(T,{scope:r,forceMount:o,children:(0,t.jsx)(p.Presence,{present:o||s.open,children:(0,t.jsx)(u.Portal,{asChild:!0,container:n,children:a})})})};E.displayName=S;var F="PopoverContent",O=r.forwardRef((e,r)=>{let o=M(F,e.__scopePopover),{forceMount:a=o.forceMount,...n}=e,s=j(F,e.__scopePopover);return(0,t.jsx)(p.Presence,{present:a||s.open,children:s.modal?(0,t.jsx)(D,{...n,ref:r}):(0,t.jsx)(I,{...n,ref:r})})});O.displayName=F;var z=(0,h.createSlot)("PopoverContent.RemoveScroll"),D=r.forwardRef((e,n)=>{let s=j(F,e.__scopePopover),i=r.useRef(null),l=(0,a.useComposedRefs)(n,i),d=r.useRef(!1);return r.useEffect(()=>{let e=i.current;if(e)return(0,v.hideOthers)(e)},[]),(0,t.jsx)(x.RemoveScroll,{as:z,allowPinchZoom:!0,children:(0,t.jsx)(q,{...e,ref:l,trapFocus:s.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,o.composeEventHandlers)(e.onCloseAutoFocus,e=>{e.preventDefault(),d.current||s.triggerRef.current?.focus()}),onPointerDownOutside:(0,o.composeEventHandlers)(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;d.current=2===t.button||r},{checkForDefaultPrevented:!1}),onFocusOutside:(0,o.composeEventHandlers)(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),I=r.forwardRef((e,o)=>{let a=j(F,e.__scopePopover),n=r.useRef(!1),s=r.useRef(!1);return(0,t.jsx)(q,{...e,ref:o,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(n.current||a.triggerRef.current?.focus(),t.preventDefault()),n.current=!1,s.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(n.current=!0,"pointerdown"===t.detail.originalEvent.type&&(s.current=!0));let r=t.target;a.triggerRef.current?.contains(r)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&s.current&&t.preventDefault()}})}),q=r.forwardRef((e,r)=>{let{__scopePopover:o,trapFocus:a,onOpenAutoFocus:n,onCloseAutoFocus:d,disableOutsidePointerEvents:u,onEscapeKeyDown:p,onPointerDownOutside:f,onFocusOutside:h,onInteractOutside:m,...v}=e,x=j(F,o),g=k(o);return(0,i.useFocusGuards)(),(0,t.jsx)(l.FocusScope,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:n,onUnmountAutoFocus:d,children:(0,t.jsx)(s.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:u,onInteractOutside:m,onEscapeKeyDown:p,onPointerDownOutside:f,onFocusOutside:h,onDismiss:()=>x.onOpenChange(!1),children:(0,t.jsx)(c.Content,{"data-state":U(x.open),role:"dialog",id:x.contentId,...g,...v,ref:r,style:{...v.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),H="PopoverClose",L=r.forwardRef((e,r)=>{let{__scopePopover:a,...n}=e,s=j(H,a);return(0,t.jsx)(f.Primitive.button,{type:"button",...n,ref:r,onClick:(0,o.composeEventHandlers)(e.onClick,()=>s.onOpenChange(!1))})});L.displayName=H;var _=r.forwardRef((e,r)=>{let{__scopePopover:o,...a}=e,n=k(o);return(0,t.jsx)(c.Arrow,{...n,...a,ref:r})});function U(e){return e?"open":"closed"}_.displayName="PopoverArrow",e.s(["Anchor",()=>R,"Arrow",()=>_,"Close",()=>L,"Content",()=>O,"Popover",()=>C,"PopoverAnchor",()=>R,"PopoverArrow",()=>_,"PopoverClose",()=>L,"PopoverContent",()=>O,"PopoverPortal",()=>E,"PopoverTrigger",()=>A,"Portal",()=>E,"Root",()=>C,"Trigger",()=>A,"createPopoverScope",()=>y],89920);var B=e.i(89920),B=B,K=e.i(31777);let X=B.Root,G=B.Trigger;B.Anchor;let V=r.forwardRef(({className:e,align:r="center",sideOffset:o=4,...a},n)=>(0,t.jsx)(B.Portal,{children:(0,t.jsx)(B.Content,{ref:n,align:r,sideOffset:o,className:(0,K.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border p-4 shadow-md outline-none",e),...a})}));V.displayName=B.Content.displayName,e.s(["Popover",()=>X,"PopoverContent",()=>V,"PopoverTrigger",()=>G],90382)},48331,86507,e=>{"use strict";var t=e.i(21023);let r=(0,t.createServerReference)("009ec7c52cfebfb7642b8da08eb19a7d3dd4494aba",t.callServer,void 0,t.findSourceMapURL,"getAllAgentModels");e.s(["getAllAgentModels",()=>r],48331);let o=(0,t.createServerReference)("60835b3e1b32b8e071881bff77721d386067d666c4",t.callServer,void 0,t.findSourceMapURL,"updateAgentAndModel");e.s(["updateAgentAndModel",()=>o],86507)},51911,41413,e=>{"use strict";var t=e.i(20314),r=e.i(79054),o=e.i(91967),a=e.i(5978),n=e.i(22528),s=e.i(36589),i=e.i(23405),l=e.i(77624),d=e.i(87620),c="Switch",[u,p]=(0,n.createContextScope)(c),[f,h]=u(c),m=r.forwardRef((e,n)=>{let{__scopeSwitch:i,name:l,checked:u,defaultChecked:p,required:h,disabled:m,value:v="on",onCheckedChange:x,form:y,...k}=e,[w,j]=r.useState(null),C=(0,a.useComposedRefs)(n,e=>j(e)),P=r.useRef(!1),R=!w||y||!!w.closest("form"),[N,A]=(0,s.useControllableState)({prop:u,defaultProp:p??!1,onChange:x,caller:c});return(0,t.jsxs)(f,{scope:i,checked:N,disabled:m,children:[(0,t.jsx)(d.Primitive.button,{type:"button",role:"switch","aria-checked":N,"aria-required":h,"data-state":b(N),"data-disabled":m?"":void 0,disabled:m,value:v,...k,ref:C,onClick:(0,o.composeEventHandlers)(e.onClick,e=>{A(e=>!e),R&&(P.current=e.isPropagationStopped(),P.current||e.stopPropagation())})}),R&&(0,t.jsx)(g,{control:w,bubbles:!P.current,name:l,value:v,checked:N,required:h,disabled:m,form:y,style:{transform:"translateX(-100%)"}})]})});m.displayName=c;var v="SwitchThumb",x=r.forwardRef((e,r)=>{let{__scopeSwitch:o,...a}=e,n=h(v,o);return(0,t.jsx)(d.Primitive.span,{"data-state":b(n.checked),"data-disabled":n.disabled?"":void 0,...a,ref:r})});x.displayName=v;var g=r.forwardRef(({__scopeSwitch:e,control:o,checked:n,bubbles:s=!0,...d},c)=>{let u=r.useRef(null),p=(0,a.useComposedRefs)(u,c),f=(0,i.usePrevious)(n),h=(0,l.useSize)(o);return r.useEffect(()=>{let e=u.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(f!==n&&t){let r=new Event("click",{bubbles:s});t.call(e,n),e.dispatchEvent(r)}},[f,n,s]),(0,t.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...d,tabIndex:-1,ref:p,style:{...d.style,...h,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function b(e){return e?"checked":"unchecked"}g.displayName="SwitchBubbleInput",e.s(["Root",()=>m,"Switch",()=>m,"SwitchThumb",()=>x,"Thumb",()=>x,"createSwitchScope",()=>p],95291);var y=e.i(95291),y=y,k=e.i(31777);function w({className:e,size:r="default",...o}){return(0,t.jsx)(y.Root,{"data-slot":"switch","data-size":r,className:(0,k.cn)("peer group/switch focus-visible:border-ring focus-visible:ring-ring/50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80 inline-flex shrink-0 cursor-pointer items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6",e),...o,children:(0,t.jsx)(y.Thumb,{"data-slot":"switch-thumb",className:(0,k.cn)("bg-background dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground pointer-events-none block rounded-full ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}e.s(["Switch",()=>w],51911);var j=e.i(23925),C=e.i(11345),P=e.i(76016),R=e.i(48331),N=e.i(86507),A=e.i(86782),S=e.i(29847),T=e.i(35364),M=e.i(90382);function E({initialAgentType:e,initialModel:o,onAgentModelChange:a,disabled:n,className:s,mode:i}){let[l,d]=r.useState(!1),[c,u]=r.useState([]),[p,f]=r.useState(!0),[h,m]=r.useState(e),[v,x]=r.useState(o),[g,b]=r.useState(null),[y,w]=r.useState(0),[E,F]=r.useState(null);r.useEffect(()=>{(0,R.getAllAgentModels)().then(u).finally(()=>f(!1))},[]),r.useEffect(()=>{if(!l){let e=setTimeout(()=>{w(0),F(null)},150);return()=>clearTimeout(e)}},[l]);let O=async(e,t)=>{if(d(!1),e!==h||t!==v){if("override"===i){m(e),x(t),a?.(e,t);return}m(e),x(t),a?.(e,t),b(null);try{let r=await (0,N.updateAgentAndModel)(e,t||null);r.ok||(m(h),x(v),a?.(h,v),b(r.error??"Failed to save"))}catch{m(h),x(v),a?.(h,v),b("Failed to save")}}},z=(0,A.getAgentTypeIcon)(h),D=c.find(e=>e.agentType===h)?.label??h,I=v?(0,S.getModelMeta)(v).displayName||v:null,q=E?c.find(e=>e.agentType===E):null;return(0,t.jsxs)("div",{className:(0,k.cn)("flex flex-col gap-1",s),children:[(0,t.jsxs)(M.Popover,{open:l,onOpenChange:d,children:[(0,t.jsx)(M.PopoverTrigger,{asChild:!0,children:(0,t.jsx)(T.Button,{variant:"outline",role:"combobox","aria-expanded":l,disabled:(n??!1)||p,className:"w-auto cursor-pointer justify-start font-normal hover:border-violet-300 hover:bg-violet-50/50 dark:hover:border-violet-700 dark:hover:bg-violet-950/30",children:(0,t.jsxs)("span",{className:"flex items-center gap-2 truncate",children:[(0,t.jsx)(z,{className:"h-4 w-4 shrink-0"}),p?"Loading…":(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"text-muted-foreground text-xs",children:D}),I?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-muted-foreground/50 text-xs",children:"·"}),(0,t.jsx)("span",{className:"text-xs font-medium",children:I})]}):null]})]})})}),(0,t.jsx)(M.PopoverContent,{className:"w-(--radix-popover-trigger-width) overflow-hidden p-0",align:"start",children:(0,t.jsxs)("div",{className:"flex transition-transform duration-200 ease-in-out",style:{transform:`translateX(${1===y?"-50%":"0%"})`,width:"200%"},children:[(0,t.jsxs)("div",{className:"w-1/2 shrink-0",children:[(0,t.jsx)("div",{className:"text-muted-foreground border-b px-3 py-2 text-xs font-medium",children:"Select agent"}),c.map(e=>{let r=(0,A.getAgentTypeIcon)(e.agentType),o=h===e.agentType,a=e.models.length>0;return(0,t.jsxs)("button",{type:"button",className:(0,k.cn)("flex w-full cursor-pointer items-center gap-2.5 px-3 py-2 text-xs transition-colors","hover:bg-accent hover:text-accent-foreground",o&&"bg-accent/50"),onClick:()=>{a?(F(e.agentType),requestAnimationFrame(()=>{requestAnimationFrame(()=>w(1))})):O(e.agentType,"")},children:[(0,t.jsx)(r,{className:"h-4 w-4 shrink-0"}),(0,t.jsx)("span",{className:"flex-1 text-left",children:e.label}),o&&!a?(0,t.jsx)(j.Check,{className:"text-primary h-3.5 w-3.5 shrink-0"}):null,a?(0,t.jsx)(P.ChevronRight,{className:"text-muted-foreground h-3.5 w-3.5 shrink-0"}):null]},e.agentType)})]}),(0,t.jsx)("div",{className:"w-1/2 shrink-0",children:q?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("button",{type:"button",className:"text-muted-foreground hover:text-foreground flex w-full cursor-pointer items-center gap-1.5 border-b px-3 py-2 text-xs font-medium transition-colors",onClick:()=>{w(0),setTimeout(()=>F(null),220)},children:[(0,t.jsx)(C.ChevronLeft,{className:"h-3.5 w-3.5"}),q.label]}),q.models.map(e=>{let r=h===q.agentType&&v===e.id;return(0,t.jsxs)("button",{type:"button",className:(0,k.cn)("flex w-full cursor-pointer items-center gap-3 px-3 py-2 text-left transition-colors","hover:bg-accent hover:text-accent-foreground",r&&"bg-accent/50"),onClick:()=>O(q.agentType,e.id),children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col",children:[(0,t.jsx)("span",{className:"text-xs font-medium",children:e.displayName}),(0,t.jsx)("span",{className:"text-muted-foreground text-xs",children:e.description})]}),r?(0,t.jsx)(j.Check,{className:"text-primary h-3.5 w-3.5 shrink-0"}):null]},e.id)})]}):null})]})})]}),!!g&&(0,t.jsx)("p",{className:"text-destructive text-sm",children:g})]})}e.s(["AgentModelPicker",()=>E],41413)}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,58860,44229,e=>{"use strict";let t=(0,e.i(3645).default)("timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]);e.s(["Timer",()=>t],58860);var r=e.i(93752);e.s(["Code",()=>r.default],44229)},10714,99105,e=>{"use strict";var t=e.i(3645);let r=(0,t.default)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);e.s(["default",()=>r],10714);let o=(0,t.default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["ChevronDown",()=>o],99105)},38573,e=>{"use strict";let t=(0,e.i(3645).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",()=>t],38573)},30702,e=>{"use strict";let t=(0,e.i(3645).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["ExternalLink",()=>t],30702)},23925,1012,e=>{"use strict";let t=(0,e.i(3645).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["default",()=>t],1012),e.s(["Check",()=>t],23925)},23405,e=>{"use strict";var t=e.i(79054);function r(e){let r=t.useRef({value:e,previous:e});return t.useMemo(()=>(r.current.value!==e&&(r.current.previous=r.current.value,r.current.value=e),r.current.previous),[e])}e.s(["usePrevious",()=>r])},11345,e=>{"use strict";let t=(0,e.i(3645).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["ChevronLeft",()=>t],11345)},76016,e=>{"use strict";let t=(0,e.i(3645).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["ChevronRight",()=>t],76016)},93752,e=>{"use strict";let t=(0,e.i(3645).default)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);e.s(["default",()=>t])},83902,e=>{"use strict";let t=(0,e.i(3645).default)("rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]);e.s(["Rocket",()=>t],83902)},90382,e=>{"use strict";var t=e.i(20314),r=e.i(79054),o=e.i(91967),a=e.i(5978),n=e.i(22528),s=e.i(53532),i=e.i(41687),l=e.i(56720),c=e.i(13123),d=e.i(52740),u=e.i(39979),p=e.i(85995),f=e.i(87620),h=e.i(86874),m=e.i(36589),v=e.i(73772),x=e.i(13044),g="Popover",[b,y]=(0,n.createContextScope)(g,[d.createPopperScope]),k=(0,d.createPopperScope)(),[w,j]=b(g),C=e=>{let{__scopePopover:o,children:a,open:n,defaultOpen:s,onOpenChange:i,modal:l=!1}=e,u=k(o),p=r.useRef(null),[f,h]=r.useState(!1),[v,x]=(0,m.useControllableState)({prop:n,defaultProp:s??!1,onChange:i,caller:g});return(0,t.jsx)(d.Root,{...u,children:(0,t.jsx)(w,{scope:o,contentId:(0,c.useId)(),triggerRef:p,open:v,onOpenChange:x,onOpenToggle:r.useCallback(()=>x(e=>!e),[x]),hasCustomAnchor:f,onCustomAnchorAdd:r.useCallback(()=>h(!0),[]),onCustomAnchorRemove:r.useCallback(()=>h(!1),[]),modal:l,children:a})})};C.displayName=g;var P="PopoverAnchor",R=r.forwardRef((e,o)=>{let{__scopePopover:a,...n}=e,s=j(P,a),i=k(a),{onCustomAnchorAdd:l,onCustomAnchorRemove:c}=s;return r.useEffect(()=>(l(),()=>c()),[l,c]),(0,t.jsx)(d.Anchor,{...i,...n,ref:o})});R.displayName=P;var N="PopoverTrigger",A=r.forwardRef((e,r)=>{let{__scopePopover:n,...s}=e,i=j(N,n),l=k(n),c=(0,a.useComposedRefs)(r,i.triggerRef),u=(0,t.jsx)(f.Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":U(i.open),...s,ref:c,onClick:(0,o.composeEventHandlers)(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?u:(0,t.jsx)(d.Anchor,{asChild:!0,...l,children:u})});A.displayName=N;var S="PopoverPortal",[T,M]=b(S,{forceMount:void 0}),E=e=>{let{__scopePopover:r,forceMount:o,children:a,container:n}=e,s=j(S,r);return(0,t.jsx)(T,{scope:r,forceMount:o,children:(0,t.jsx)(p.Presence,{present:o||s.open,children:(0,t.jsx)(u.Portal,{asChild:!0,container:n,children:a})})})};E.displayName=S;var F="PopoverContent",O=r.forwardRef((e,r)=>{let o=M(F,e.__scopePopover),{forceMount:a=o.forceMount,...n}=e,s=j(F,e.__scopePopover);return(0,t.jsx)(p.Presence,{present:a||s.open,children:s.modal?(0,t.jsx)(D,{...n,ref:r}):(0,t.jsx)(I,{...n,ref:r})})});O.displayName=F;var z=(0,h.createSlot)("PopoverContent.RemoveScroll"),D=r.forwardRef((e,n)=>{let s=j(F,e.__scopePopover),i=r.useRef(null),l=(0,a.useComposedRefs)(n,i),c=r.useRef(!1);return r.useEffect(()=>{let e=i.current;if(e)return(0,v.hideOthers)(e)},[]),(0,t.jsx)(x.RemoveScroll,{as:z,allowPinchZoom:!0,children:(0,t.jsx)(q,{...e,ref:l,trapFocus:s.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,o.composeEventHandlers)(e.onCloseAutoFocus,e=>{e.preventDefault(),c.current||s.triggerRef.current?.focus()}),onPointerDownOutside:(0,o.composeEventHandlers)(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;c.current=2===t.button||r},{checkForDefaultPrevented:!1}),onFocusOutside:(0,o.composeEventHandlers)(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),I=r.forwardRef((e,o)=>{let a=j(F,e.__scopePopover),n=r.useRef(!1),s=r.useRef(!1);return(0,t.jsx)(q,{...e,ref:o,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(n.current||a.triggerRef.current?.focus(),t.preventDefault()),n.current=!1,s.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(n.current=!0,"pointerdown"===t.detail.originalEvent.type&&(s.current=!0));let r=t.target;a.triggerRef.current?.contains(r)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&s.current&&t.preventDefault()}})}),q=r.forwardRef((e,r)=>{let{__scopePopover:o,trapFocus:a,onOpenAutoFocus:n,onCloseAutoFocus:c,disableOutsidePointerEvents:u,onEscapeKeyDown:p,onPointerDownOutside:f,onFocusOutside:h,onInteractOutside:m,...v}=e,x=j(F,o),g=k(o);return(0,i.useFocusGuards)(),(0,t.jsx)(l.FocusScope,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:n,onUnmountAutoFocus:c,children:(0,t.jsx)(s.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:u,onInteractOutside:m,onEscapeKeyDown:p,onPointerDownOutside:f,onFocusOutside:h,onDismiss:()=>x.onOpenChange(!1),children:(0,t.jsx)(d.Content,{"data-state":U(x.open),role:"dialog",id:x.contentId,...g,...v,ref:r,style:{...v.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),H="PopoverClose",L=r.forwardRef((e,r)=>{let{__scopePopover:a,...n}=e,s=j(H,a);return(0,t.jsx)(f.Primitive.button,{type:"button",...n,ref:r,onClick:(0,o.composeEventHandlers)(e.onClick,()=>s.onOpenChange(!1))})});L.displayName=H;var _=r.forwardRef((e,r)=>{let{__scopePopover:o,...a}=e,n=k(o);return(0,t.jsx)(d.Arrow,{...n,...a,ref:r})});function U(e){return e?"open":"closed"}_.displayName="PopoverArrow",e.s(["Anchor",()=>R,"Arrow",()=>_,"Close",()=>L,"Content",()=>O,"Popover",()=>C,"PopoverAnchor",()=>R,"PopoverArrow",()=>_,"PopoverClose",()=>L,"PopoverContent",()=>O,"PopoverPortal",()=>E,"PopoverTrigger",()=>A,"Portal",()=>E,"Root",()=>C,"Trigger",()=>A,"createPopoverScope",()=>y],89920);var B=e.i(89920),B=B,K=e.i(31777);let X=B.Root,G=B.Trigger;B.Anchor;let V=r.forwardRef(({className:e,align:r="center",sideOffset:o=4,...a},n)=>(0,t.jsx)(B.Portal,{children:(0,t.jsx)(B.Content,{ref:n,align:r,sideOffset:o,className:(0,K.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border p-4 shadow-md outline-none",e),...a})}));V.displayName=B.Content.displayName,e.s(["Popover",()=>X,"PopoverContent",()=>V,"PopoverTrigger",()=>G],90382)},36410,41826,e=>{"use strict";var t=e.i(21023);let r=(0,t.createServerReference)("00b6aaa63acccbf1a77db62d8b4ff85f9dc4fe7b0a",t.callServer,void 0,t.findSourceMapURL,"getAllAgentModels");e.s(["getAllAgentModels",()=>r],36410);let o=(0,t.createServerReference)("60f3a382947bf150bfea448e11c59bcd42b6884929",t.callServer,void 0,t.findSourceMapURL,"updateAgentAndModel");e.s(["updateAgentAndModel",()=>o],41826)},51911,41413,e=>{"use strict";var t=e.i(20314),r=e.i(79054),o=e.i(91967),a=e.i(5978),n=e.i(22528),s=e.i(36589),i=e.i(23405),l=e.i(77624),c=e.i(87620),d="Switch",[u,p]=(0,n.createContextScope)(d),[f,h]=u(d),m=r.forwardRef((e,n)=>{let{__scopeSwitch:i,name:l,checked:u,defaultChecked:p,required:h,disabled:m,value:v="on",onCheckedChange:x,form:y,...k}=e,[w,j]=r.useState(null),C=(0,a.useComposedRefs)(n,e=>j(e)),P=r.useRef(!1),R=!w||y||!!w.closest("form"),[N,A]=(0,s.useControllableState)({prop:u,defaultProp:p??!1,onChange:x,caller:d});return(0,t.jsxs)(f,{scope:i,checked:N,disabled:m,children:[(0,t.jsx)(c.Primitive.button,{type:"button",role:"switch","aria-checked":N,"aria-required":h,"data-state":b(N),"data-disabled":m?"":void 0,disabled:m,value:v,...k,ref:C,onClick:(0,o.composeEventHandlers)(e.onClick,e=>{A(e=>!e),R&&(P.current=e.isPropagationStopped(),P.current||e.stopPropagation())})}),R&&(0,t.jsx)(g,{control:w,bubbles:!P.current,name:l,value:v,checked:N,required:h,disabled:m,form:y,style:{transform:"translateX(-100%)"}})]})});m.displayName=d;var v="SwitchThumb",x=r.forwardRef((e,r)=>{let{__scopeSwitch:o,...a}=e,n=h(v,o);return(0,t.jsx)(c.Primitive.span,{"data-state":b(n.checked),"data-disabled":n.disabled?"":void 0,...a,ref:r})});x.displayName=v;var g=r.forwardRef(({__scopeSwitch:e,control:o,checked:n,bubbles:s=!0,...c},d)=>{let u=r.useRef(null),p=(0,a.useComposedRefs)(u,d),f=(0,i.usePrevious)(n),h=(0,l.useSize)(o);return r.useEffect(()=>{let e=u.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(f!==n&&t){let r=new Event("click",{bubbles:s});t.call(e,n),e.dispatchEvent(r)}},[f,n,s]),(0,t.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...c,tabIndex:-1,ref:p,style:{...c.style,...h,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function b(e){return e?"checked":"unchecked"}g.displayName="SwitchBubbleInput",e.s(["Root",()=>m,"Switch",()=>m,"SwitchThumb",()=>x,"Thumb",()=>x,"createSwitchScope",()=>p],95291);var y=e.i(95291),y=y,k=e.i(31777);function w({className:e,size:r="default",...o}){return(0,t.jsx)(y.Root,{"data-slot":"switch","data-size":r,className:(0,k.cn)("peer group/switch focus-visible:border-ring focus-visible:ring-ring/50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80 inline-flex shrink-0 cursor-pointer items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6",e),...o,children:(0,t.jsx)(y.Thumb,{"data-slot":"switch-thumb",className:(0,k.cn)("bg-background dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground pointer-events-none block rounded-full ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}e.s(["Switch",()=>w],51911);var j=e.i(23925),C=e.i(11345),P=e.i(76016),R=e.i(36410),N=e.i(41826),A=e.i(86782),S=e.i(29847),T=e.i(35364),M=e.i(90382);function E({initialAgentType:e,initialModel:o,onAgentModelChange:a,disabled:n,className:s,mode:i}){let[l,c]=r.useState(!1),[d,u]=r.useState([]),[p,f]=r.useState(!0),[h,m]=r.useState(e),[v,x]=r.useState(o),[g,b]=r.useState(null),[y,w]=r.useState(0),[E,F]=r.useState(null);r.useEffect(()=>{(0,R.getAllAgentModels)().then(u).finally(()=>f(!1))},[]),r.useEffect(()=>{if(!l){let e=setTimeout(()=>{w(0),F(null)},150);return()=>clearTimeout(e)}},[l]);let O=async(e,t)=>{if(c(!1),e!==h||t!==v){if("override"===i){m(e),x(t),a?.(e,t);return}m(e),x(t),a?.(e,t),b(null);try{let r=await (0,N.updateAgentAndModel)(e,t||null);r.ok||(m(h),x(v),a?.(h,v),b(r.error??"Failed to save"))}catch{m(h),x(v),a?.(h,v),b("Failed to save")}}},z=(0,A.getAgentTypeIcon)(h),D=d.find(e=>e.agentType===h)?.label??h,I=v?(0,S.getModelMeta)(v).displayName||v:null,q=E?d.find(e=>e.agentType===E):null;return(0,t.jsxs)("div",{className:(0,k.cn)("flex flex-col gap-1",s),children:[(0,t.jsxs)(M.Popover,{open:l,onOpenChange:c,children:[(0,t.jsx)(M.PopoverTrigger,{asChild:!0,children:(0,t.jsx)(T.Button,{variant:"outline",role:"combobox","aria-expanded":l,disabled:(n??!1)||p,className:"w-auto cursor-pointer justify-start font-normal hover:border-violet-300 hover:bg-violet-50/50 dark:hover:border-violet-700 dark:hover:bg-violet-950/30",children:(0,t.jsxs)("span",{className:"flex items-center gap-2 truncate",children:[(0,t.jsx)(z,{className:"h-4 w-4 shrink-0"}),p?"Loading…":(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"text-muted-foreground text-xs",children:D}),I?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-muted-foreground/50 text-xs",children:"·"}),(0,t.jsx)("span",{className:"text-xs font-medium",children:I})]}):null]})]})})}),(0,t.jsx)(M.PopoverContent,{className:"w-(--radix-popover-trigger-width) overflow-hidden p-0",align:"start",children:(0,t.jsxs)("div",{className:"flex transition-transform duration-200 ease-in-out",style:{transform:`translateX(${1===y?"-50%":"0%"})`,width:"200%"},children:[(0,t.jsxs)("div",{className:"w-1/2 shrink-0",children:[(0,t.jsx)("div",{className:"text-muted-foreground border-b px-3 py-2 text-xs font-medium",children:"Select agent"}),d.map(e=>{let r=(0,A.getAgentTypeIcon)(e.agentType),o=h===e.agentType,a=e.models.length>0;return(0,t.jsxs)("button",{type:"button",className:(0,k.cn)("flex w-full cursor-pointer items-center gap-2.5 px-3 py-2 text-xs transition-colors","hover:bg-accent hover:text-accent-foreground",o&&"bg-accent/50"),onClick:()=>{a?(F(e.agentType),requestAnimationFrame(()=>{requestAnimationFrame(()=>w(1))})):O(e.agentType,"")},children:[(0,t.jsx)(r,{className:"h-4 w-4 shrink-0"}),(0,t.jsx)("span",{className:"flex-1 text-left",children:e.label}),o&&!a?(0,t.jsx)(j.Check,{className:"text-primary h-3.5 w-3.5 shrink-0"}):null,a?(0,t.jsx)(P.ChevronRight,{className:"text-muted-foreground h-3.5 w-3.5 shrink-0"}):null]},e.agentType)})]}),(0,t.jsx)("div",{className:"w-1/2 shrink-0",children:q?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("button",{type:"button",className:"text-muted-foreground hover:text-foreground flex w-full cursor-pointer items-center gap-1.5 border-b px-3 py-2 text-xs font-medium transition-colors",onClick:()=>{w(0),setTimeout(()=>F(null),220)},children:[(0,t.jsx)(C.ChevronLeft,{className:"h-3.5 w-3.5"}),q.label]}),q.models.map(e=>{let r=h===q.agentType&&v===e.id;return(0,t.jsxs)("button",{type:"button",className:(0,k.cn)("flex w-full cursor-pointer items-center gap-3 px-3 py-2 text-left transition-colors","hover:bg-accent hover:text-accent-foreground",r&&"bg-accent/50"),onClick:()=>O(q.agentType,e.id),children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col",children:[(0,t.jsx)("span",{className:"text-xs font-medium",children:e.displayName}),(0,t.jsx)("span",{className:"text-muted-foreground text-xs",children:e.description})]}),r?(0,t.jsx)(j.Check,{className:"text-primary h-3.5 w-3.5 shrink-0"}):null]},e.id)})]}):null})]})})]}),!!g&&(0,t.jsx)("p",{className:"text-destructive text-sm",children:g})]})}e.s(["AgentModelPicker",()=>E],41413)}]);
|
package/dist/packages/core/src/application/ports/output/services/coasts-service.interface.d.ts
DELETED
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Coasts Service Interface
|
|
3
|
-
*
|
|
4
|
-
* Output port for managing Coasts containerized runtime isolation.
|
|
5
|
-
* Implementations wrap the coast CLI binary via subprocess invocation
|
|
6
|
-
* and integrate with the AI agent system for Coastfile generation.
|
|
7
|
-
*
|
|
8
|
-
* Following Clean Architecture:
|
|
9
|
-
* - Application layer depends on this interface
|
|
10
|
-
* - Infrastructure layer provides concrete implementations
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
* Result of checking Coasts prerequisites.
|
|
14
|
-
* Each boolean indicates whether a specific prerequisite is met.
|
|
15
|
-
*/
|
|
16
|
-
export interface PrerequisiteCheckResult {
|
|
17
|
-
/** Whether the `coast` binary is available on PATH. */
|
|
18
|
-
coastBinary: boolean;
|
|
19
|
-
/** Whether the Docker daemon is reachable. */
|
|
20
|
-
docker: boolean;
|
|
21
|
-
/** Whether the coastd daemon is running and responding. */
|
|
22
|
-
coastdRunning: boolean;
|
|
23
|
-
/** Convenience AND of all prerequisite checks. */
|
|
24
|
-
allMet: boolean;
|
|
25
|
-
/** Human-readable messages for each missing prerequisite with fix instructions. */
|
|
26
|
-
missingMessages: string[];
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Information about a running Coasts instance.
|
|
30
|
-
*/
|
|
31
|
-
export interface CoastInstance {
|
|
32
|
-
/** Port the coast instance is listening on. */
|
|
33
|
-
port: number;
|
|
34
|
-
/** URL to access the coast instance. */
|
|
35
|
-
url: string;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Port interface for managing Coasts containerized runtime isolation.
|
|
39
|
-
*
|
|
40
|
-
* Implementations must:
|
|
41
|
-
* - Invoke the coast CLI binary via subprocess (not the coastd HTTP API)
|
|
42
|
-
* - Support concurrent operations across different worktrees via workDir scoping
|
|
43
|
-
* - Cache the installation prompt for the process lifetime
|
|
44
|
-
* - Delegate Coastfile generation to the AI agent system
|
|
45
|
-
*/
|
|
46
|
-
export interface ICoastsService {
|
|
47
|
-
/**
|
|
48
|
-
* Check whether all Coasts prerequisites are met.
|
|
49
|
-
* Validates coast binary on PATH, Docker daemon reachable, and coastd running.
|
|
50
|
-
* On Windows, fails immediately with a platform-not-supported message.
|
|
51
|
-
*
|
|
52
|
-
* @param workDir - Working directory for the check (used as cwd for subprocess calls)
|
|
53
|
-
* @returns Result with individual check statuses and actionable messages for failures
|
|
54
|
-
*/
|
|
55
|
-
checkPrerequisites(workDir: string): Promise<PrerequisiteCheckResult>;
|
|
56
|
-
/**
|
|
57
|
-
* Build the Coasts container image for the given directory.
|
|
58
|
-
* Invokes `coast build` in the specified working directory.
|
|
59
|
-
* Safe to call when the image is already built (idempotent).
|
|
60
|
-
*
|
|
61
|
-
* @param workDir - Directory containing the Coastfile
|
|
62
|
-
* @throws Error if coast build fails (exit code non-zero)
|
|
63
|
-
*/
|
|
64
|
-
build(workDir: string): Promise<void>;
|
|
65
|
-
/**
|
|
66
|
-
* Start a Coasts instance for the given directory.
|
|
67
|
-
* Invokes `coast run` and returns instance info (port, URL).
|
|
68
|
-
* Safe to call when the instance is already running (idempotent).
|
|
69
|
-
*
|
|
70
|
-
* @param workDir - Directory containing the Coastfile
|
|
71
|
-
* @returns Information about the running coast instance
|
|
72
|
-
* @throws Error if coast run fails
|
|
73
|
-
*/
|
|
74
|
-
run(workDir: string): Promise<CoastInstance>;
|
|
75
|
-
/**
|
|
76
|
-
* Stop the Coasts instance for the given directory.
|
|
77
|
-
* Invokes `coast stop` for the specified working directory.
|
|
78
|
-
* No-op if no instance is running.
|
|
79
|
-
*
|
|
80
|
-
* @param workDir - Directory whose coast instance should be stopped
|
|
81
|
-
*/
|
|
82
|
-
stop(workDir: string): Promise<void>;
|
|
83
|
-
/**
|
|
84
|
-
* Look up a running Coasts instance for the given directory.
|
|
85
|
-
*
|
|
86
|
-
* @param workDir - Directory to look up
|
|
87
|
-
* @returns Instance info if running, null if not found
|
|
88
|
-
*/
|
|
89
|
-
lookup(workDir: string): Promise<CoastInstance | null>;
|
|
90
|
-
/**
|
|
91
|
-
* Check if a Coasts instance is currently running for the given directory.
|
|
92
|
-
*
|
|
93
|
-
* @param workDir - Directory to check
|
|
94
|
-
* @returns True if an instance is running
|
|
95
|
-
*/
|
|
96
|
-
isRunning(workDir: string): Promise<boolean>;
|
|
97
|
-
/**
|
|
98
|
-
* Assign canonical ports to this worktree's coast instance.
|
|
99
|
-
* Invokes `coast checkout` in the specified working directory.
|
|
100
|
-
*
|
|
101
|
-
* @param workDir - Directory whose coast instance should be checked out
|
|
102
|
-
*/
|
|
103
|
-
checkout(workDir: string): Promise<void>;
|
|
104
|
-
/**
|
|
105
|
-
* Get the Coasts installation prompt for Coastfile generation.
|
|
106
|
-
* Invokes `coast installation-prompt` and returns the full prompt text.
|
|
107
|
-
* The result is cached for the process lifetime (FR-13).
|
|
108
|
-
*
|
|
109
|
-
* @returns The full installation prompt text from the coast CLI
|
|
110
|
-
* @throws Error if the coast binary is not available
|
|
111
|
-
*/
|
|
112
|
-
getInstallationPrompt(): Promise<string>;
|
|
113
|
-
/**
|
|
114
|
-
* Generate a Coastfile for the given directory using the AI agent system.
|
|
115
|
-
* Runs `coast installation-prompt` to obtain the generation prompt,
|
|
116
|
-
* passes it to the AI agent system with repo context, and writes the
|
|
117
|
-
* generated Coastfile to the directory.
|
|
118
|
-
*
|
|
119
|
-
* @param workDir - Directory where the Coastfile should be generated
|
|
120
|
-
* @returns Absolute path to the generated Coastfile
|
|
121
|
-
* @throws Error if prompt retrieval or agent execution fails
|
|
122
|
-
*/
|
|
123
|
-
generateCoastfile(workDir: string): Promise<string>;
|
|
124
|
-
/**
|
|
125
|
-
* Check if a Coastfile exists in the given directory.
|
|
126
|
-
*
|
|
127
|
-
* @param workDir - Directory to check for a Coastfile
|
|
128
|
-
* @returns True if a Coastfile exists
|
|
129
|
-
*/
|
|
130
|
-
hasCoastfile(workDir: string): Promise<boolean>;
|
|
131
|
-
}
|
|
132
|
-
//# sourceMappingURL=coasts-service.interface.d.ts.map
|
package/dist/packages/core/src/application/ports/output/services/coasts-service.interface.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"coasts-service.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/services/coasts-service.interface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC,uDAAuD;IACvD,WAAW,EAAE,OAAO,CAAC;IACrB,8CAA8C;IAC9C,MAAM,EAAE,OAAO,CAAC;IAChB,2DAA2D;IAC3D,aAAa,EAAE,OAAO,CAAC;IACvB,kDAAkD;IAClD,MAAM,EAAE,OAAO,CAAC;IAChB,mFAAmF;IACnF,eAAe,EAAE,MAAM,EAAE,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,+CAA+C;IAC/C,IAAI,EAAE,MAAM,CAAC;IACb,wCAAwC;IACxC,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,cAAc;IAC7B;;;;;;;OAOG;IACH,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC;IAEtE;;;;;;;OAOG;IACH,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEtC;;;;;;;;OAQG;IACH,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IAE7C;;;;;;OAMG;IACH,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAErC;;;;;OAKG;IACH,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAAC;IAEvD;;;;;OAKG;IACH,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAE7C;;;;;OAKG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEzC;;;;;;;OAOG;IACH,qBAAqB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAEzC;;;;;;;;;OASG;IACH,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAEpD;;;;;OAKG;IACH,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACjD"}
|
package/dist/packages/core/src/application/ports/output/services/coasts-service.interface.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Coasts Service Interface
|
|
3
|
-
*
|
|
4
|
-
* Output port for managing Coasts containerized runtime isolation.
|
|
5
|
-
* Implementations wrap the coast CLI binary via subprocess invocation
|
|
6
|
-
* and integrate with the AI agent system for Coastfile generation.
|
|
7
|
-
*
|
|
8
|
-
* Following Clean Architecture:
|
|
9
|
-
* - Application layer depends on this interface
|
|
10
|
-
* - Infrastructure layer provides concrete implementations
|
|
11
|
-
*/
|
|
12
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Migration 044: Add feature_flag_coasts_dev_server column to settings table.
|
|
3
|
-
*
|
|
4
|
-
* Adds a boolean (INTEGER 0/1) column for the Coasts dev server feature flag.
|
|
5
|
-
* Defaults to 0 (disabled).
|
|
6
|
-
*/
|
|
7
|
-
import type { MigrationParams } from 'umzug';
|
|
8
|
-
import type Database from 'better-sqlite3';
|
|
9
|
-
export declare function up({ context: db }: MigrationParams<Database.Database>): Promise<void>;
|
|
10
|
-
export declare function down({ context: db }: MigrationParams<Database.Database>): Promise<void>;
|
|
11
|
-
//# sourceMappingURL=044-add-feature-flag-coasts-dev-server.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"044-add-feature-flag-coasts-dev-server.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/infrastructure/persistence/sqlite/migrations/044-add-feature-flag-coasts-dev-server.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAE3C,wBAAsB,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,eAAe,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAS3F;AAED,wBAAsB,IAAI,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,eAAe,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAG7F"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Migration 044: Add feature_flag_coasts_dev_server column to settings table.
|
|
3
|
-
*
|
|
4
|
-
* Adds a boolean (INTEGER 0/1) column for the Coasts dev server feature flag.
|
|
5
|
-
* Defaults to 0 (disabled).
|
|
6
|
-
*/
|
|
7
|
-
export async function up({ context: db }) {
|
|
8
|
-
const columns = db.pragma('table_info(settings)');
|
|
9
|
-
const existing = new Set(columns.map((c) => c.name));
|
|
10
|
-
if (!existing.has('feature_flag_coasts_dev_server')) {
|
|
11
|
-
db.exec('ALTER TABLE settings ADD COLUMN feature_flag_coasts_dev_server INTEGER NOT NULL DEFAULT 0');
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
export async function down({ context: db }) {
|
|
15
|
-
// SQLite does not support DROP COLUMN before 3.35.0; column remains but is unused after rollback.
|
|
16
|
-
void db;
|
|
17
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Coasts Service Implementation
|
|
3
|
-
*
|
|
4
|
-
* Infrastructure adapter wrapping the coast CLI binary for containerized
|
|
5
|
-
* runtime isolation. Uses constructor-injected ExecFunction for subprocess
|
|
6
|
-
* invocation and IStructuredAgentCaller for AI-powered Coastfile generation.
|
|
7
|
-
*
|
|
8
|
-
* Following Clean Architecture:
|
|
9
|
-
* - Implements the ICoastsService application port
|
|
10
|
-
* - Lives in the infrastructure layer
|
|
11
|
-
* - No direct child_process imports (injected via ExecFunction)
|
|
12
|
-
*/
|
|
13
|
-
import type { ICoastsService, PrerequisiteCheckResult, CoastInstance } from '../../application/ports/output/services/coasts-service.interface.js';
|
|
14
|
-
import type { IStructuredAgentCaller } from '../../application/ports/output/agents/structured-agent-caller.interface.js';
|
|
15
|
-
import type { ExecFunction } from './git/worktree.service.js';
|
|
16
|
-
export declare class CoastsService implements ICoastsService {
|
|
17
|
-
private readonly execFile;
|
|
18
|
-
private readonly structuredCaller;
|
|
19
|
-
private cachedInstallationPrompt;
|
|
20
|
-
private readonly isWindows;
|
|
21
|
-
constructor(execFile: ExecFunction, structuredCaller: IStructuredAgentCaller, isWindows?: boolean);
|
|
22
|
-
checkPrerequisites(workDir: string): Promise<PrerequisiteCheckResult>;
|
|
23
|
-
build(workDir: string): Promise<void>;
|
|
24
|
-
run(workDir: string): Promise<CoastInstance>;
|
|
25
|
-
stop(workDir: string): Promise<void>;
|
|
26
|
-
lookup(workDir: string): Promise<CoastInstance | null>;
|
|
27
|
-
isRunning(workDir: string): Promise<boolean>;
|
|
28
|
-
checkout(workDir: string): Promise<void>;
|
|
29
|
-
getInstallationPrompt(): Promise<string>;
|
|
30
|
-
generateCoastfile(workDir: string): Promise<string>;
|
|
31
|
-
hasCoastfile(workDir: string): Promise<boolean>;
|
|
32
|
-
private checkCoastBinary;
|
|
33
|
-
private checkDocker;
|
|
34
|
-
private checkCoastdRunning;
|
|
35
|
-
private execCoast;
|
|
36
|
-
/**
|
|
37
|
-
* Parse coast CLI output to extract port and URL from stdout.
|
|
38
|
-
* Looks for patterns like "port 3000" and "http://localhost:3000".
|
|
39
|
-
*/
|
|
40
|
-
private parseCoastInstance;
|
|
41
|
-
}
|
|
42
|
-
//# sourceMappingURL=coasts.service.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"coasts.service.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/infrastructure/services/coasts.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAKH,OAAO,KAAK,EACV,cAAc,EACd,uBAAuB,EACvB,aAAa,EACd,MAAM,qEAAqE,CAAC;AAC7E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4EAA4E,CAAC;AACzH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAgC9D,qBACa,aAAc,YAAW,cAAc;IAKxB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACf,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IALrE,OAAO,CAAC,wBAAwB,CAAuB;IACvD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAU;gBAGO,QAAQ,EAAE,YAAY,EACZ,gBAAgB,EAAE,sBAAsB,EAC3F,SAAS,CAAC,EAAE,OAAO;IAKf,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAiDrE,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIrC,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAK5C,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQpC,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC;IAStD,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAK5C,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIxC,qBAAqB,IAAI,OAAO,CAAC,MAAM,CAAC;IAaxC,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAqBnD,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;YAMvC,gBAAgB;YAIhB,WAAW;YAIX,kBAAkB;YAIlB,SAAS;IAQvB;;;OAGG;IACH,OAAO,CAAC,kBAAkB;CAS3B"}
|
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Coasts Service Implementation
|
|
3
|
-
*
|
|
4
|
-
* Infrastructure adapter wrapping the coast CLI binary for containerized
|
|
5
|
-
* runtime isolation. Uses constructor-injected ExecFunction for subprocess
|
|
6
|
-
* invocation and IStructuredAgentCaller for AI-powered Coastfile generation.
|
|
7
|
-
*
|
|
8
|
-
* Following Clean Architecture:
|
|
9
|
-
* - Implements the ICoastsService application port
|
|
10
|
-
* - Lives in the infrastructure layer
|
|
11
|
-
* - No direct child_process imports (injected via ExecFunction)
|
|
12
|
-
*/
|
|
13
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
14
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
15
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
16
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
17
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
18
|
-
};
|
|
19
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
20
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
21
|
-
};
|
|
22
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
23
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
24
|
-
};
|
|
25
|
-
import { existsSync, writeFileSync } from 'node:fs';
|
|
26
|
-
import path from 'node:path';
|
|
27
|
-
import { injectable, inject } from 'tsyringe';
|
|
28
|
-
import { IS_WINDOWS } from '../platform.js';
|
|
29
|
-
/** Timeout for coast build (may need to pull Docker images). */
|
|
30
|
-
const BUILD_TIMEOUT_MS = 30_000;
|
|
31
|
-
/** Timeout for all other coast CLI commands. */
|
|
32
|
-
const DEFAULT_TIMEOUT_MS = 10_000;
|
|
33
|
-
/** JSON schema for Coastfile generation via structured agent caller. */
|
|
34
|
-
const COASTFILE_SCHEMA = {
|
|
35
|
-
type: 'object',
|
|
36
|
-
properties: {
|
|
37
|
-
content: {
|
|
38
|
-
type: 'string',
|
|
39
|
-
description: 'The complete Coastfile content in TOML format',
|
|
40
|
-
},
|
|
41
|
-
warnings: {
|
|
42
|
-
type: 'array',
|
|
43
|
-
items: { type: 'string' },
|
|
44
|
-
description: 'Any warnings or notes about the generated Coastfile',
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
required: ['content'],
|
|
48
|
-
additionalProperties: false,
|
|
49
|
-
};
|
|
50
|
-
let CoastsService = class CoastsService {
|
|
51
|
-
execFile;
|
|
52
|
-
structuredCaller;
|
|
53
|
-
cachedInstallationPrompt = null;
|
|
54
|
-
isWindows;
|
|
55
|
-
constructor(execFile, structuredCaller, isWindows) {
|
|
56
|
-
this.execFile = execFile;
|
|
57
|
-
this.structuredCaller = structuredCaller;
|
|
58
|
-
this.isWindows = isWindows ?? IS_WINDOWS;
|
|
59
|
-
}
|
|
60
|
-
async checkPrerequisites(workDir) {
|
|
61
|
-
if (this.isWindows) {
|
|
62
|
-
return {
|
|
63
|
-
coastBinary: false,
|
|
64
|
-
docker: false,
|
|
65
|
-
coastdRunning: false,
|
|
66
|
-
allMet: false,
|
|
67
|
-
missingMessages: [
|
|
68
|
-
'Coasts dev server is not supported on Windows. See https://coasts.dev/docs for platform support.',
|
|
69
|
-
],
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
const [coastResult, dockerResult, coastdResult] = await Promise.allSettled([
|
|
73
|
-
this.checkCoastBinary(),
|
|
74
|
-
this.checkDocker(),
|
|
75
|
-
this.checkCoastdRunning(workDir),
|
|
76
|
-
]);
|
|
77
|
-
const coastBinary = coastResult.status === 'fulfilled';
|
|
78
|
-
const docker = dockerResult.status === 'fulfilled';
|
|
79
|
-
const coastdRunning = coastdResult.status === 'fulfilled';
|
|
80
|
-
const missingMessages = [];
|
|
81
|
-
if (!coastBinary) {
|
|
82
|
-
missingMessages.push('coast binary not found on PATH. Install it with: curl -fsSL https://coasts.dev/install | sh. See https://coasts.dev/docs');
|
|
83
|
-
}
|
|
84
|
-
if (!docker) {
|
|
85
|
-
missingMessages.push('Docker daemon is not reachable. Start Docker Desktop or run: sudo systemctl start docker');
|
|
86
|
-
}
|
|
87
|
-
if (!coastdRunning) {
|
|
88
|
-
missingMessages.push('coastd daemon is not running. Start it with: coastd &. See https://coasts.dev/docs/daemon');
|
|
89
|
-
}
|
|
90
|
-
return {
|
|
91
|
-
coastBinary,
|
|
92
|
-
docker,
|
|
93
|
-
coastdRunning,
|
|
94
|
-
allMet: coastBinary && docker && coastdRunning,
|
|
95
|
-
missingMessages,
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
async build(workDir) {
|
|
99
|
-
await this.execCoast(['build'], workDir, BUILD_TIMEOUT_MS);
|
|
100
|
-
}
|
|
101
|
-
async run(workDir) {
|
|
102
|
-
const { stdout } = await this.execCoast(['run'], workDir);
|
|
103
|
-
return this.parseCoastInstance(stdout);
|
|
104
|
-
}
|
|
105
|
-
async stop(workDir) {
|
|
106
|
-
try {
|
|
107
|
-
await this.execCoast(['stop'], workDir);
|
|
108
|
-
}
|
|
109
|
-
catch {
|
|
110
|
-
// No-op if no instance is running
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
async lookup(workDir) {
|
|
114
|
-
try {
|
|
115
|
-
const { stdout } = await this.execCoast(['lookup'], workDir);
|
|
116
|
-
return this.parseCoastInstance(stdout);
|
|
117
|
-
}
|
|
118
|
-
catch {
|
|
119
|
-
return null;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
async isRunning(workDir) {
|
|
123
|
-
const instance = await this.lookup(workDir);
|
|
124
|
-
return instance !== null;
|
|
125
|
-
}
|
|
126
|
-
async checkout(workDir) {
|
|
127
|
-
await this.execCoast(['checkout'], workDir);
|
|
128
|
-
}
|
|
129
|
-
async getInstallationPrompt() {
|
|
130
|
-
if (this.cachedInstallationPrompt !== null) {
|
|
131
|
-
return this.cachedInstallationPrompt;
|
|
132
|
-
}
|
|
133
|
-
const { stdout } = await this.execFile('coast', ['installation-prompt'], {
|
|
134
|
-
timeout: DEFAULT_TIMEOUT_MS,
|
|
135
|
-
});
|
|
136
|
-
this.cachedInstallationPrompt = stdout;
|
|
137
|
-
return stdout;
|
|
138
|
-
}
|
|
139
|
-
async generateCoastfile(workDir) {
|
|
140
|
-
const installationPrompt = await this.getInstallationPrompt();
|
|
141
|
-
const prompt = `${installationPrompt}\n\nAnalyze the project at the working directory and generate a Coastfile.\nReturn the complete Coastfile content as valid TOML in the "content" field.`;
|
|
142
|
-
const result = await this.structuredCaller.call(prompt, COASTFILE_SCHEMA, {
|
|
143
|
-
allowedTools: [],
|
|
144
|
-
silent: true,
|
|
145
|
-
maxTurns: 10,
|
|
146
|
-
});
|
|
147
|
-
const coastfilePath = path.join(workDir, 'Coastfile');
|
|
148
|
-
writeFileSync(coastfilePath, result.content, 'utf-8');
|
|
149
|
-
return coastfilePath;
|
|
150
|
-
}
|
|
151
|
-
async hasCoastfile(workDir) {
|
|
152
|
-
return existsSync(path.join(workDir, 'Coastfile'));
|
|
153
|
-
}
|
|
154
|
-
// --- Private helpers ---
|
|
155
|
-
async checkCoastBinary() {
|
|
156
|
-
await this.execFile('coast', ['--version'], { timeout: 500 });
|
|
157
|
-
}
|
|
158
|
-
async checkDocker() {
|
|
159
|
-
await this.execFile('docker', ['info'], { timeout: 500 });
|
|
160
|
-
}
|
|
161
|
-
async checkCoastdRunning(workDir) {
|
|
162
|
-
await this.execFile('coast', ['ls'], { cwd: workDir, timeout: 500 });
|
|
163
|
-
}
|
|
164
|
-
async execCoast(args, workDir, timeout = DEFAULT_TIMEOUT_MS) {
|
|
165
|
-
return this.execFile('coast', args, { cwd: workDir, timeout });
|
|
166
|
-
}
|
|
167
|
-
/**
|
|
168
|
-
* Parse coast CLI output to extract port and URL from stdout.
|
|
169
|
-
* Looks for patterns like "port 3000" and "http://localhost:3000".
|
|
170
|
-
*/
|
|
171
|
-
parseCoastInstance(stdout) {
|
|
172
|
-
const portMatch = stdout.match(/port\s+(\d+)/i);
|
|
173
|
-
const urlMatch = stdout.match(/(https?:\/\/[^\s]+)/i);
|
|
174
|
-
const port = portMatch ? parseInt(portMatch[1], 10) : 3000;
|
|
175
|
-
const url = urlMatch ? urlMatch[1] : `http://localhost:${port}`;
|
|
176
|
-
return { port, url };
|
|
177
|
-
}
|
|
178
|
-
};
|
|
179
|
-
CoastsService = __decorate([
|
|
180
|
-
injectable(),
|
|
181
|
-
__param(0, inject('ExecFunction')),
|
|
182
|
-
__param(1, inject('IStructuredAgentCaller')),
|
|
183
|
-
__metadata("design:paramtypes", [Function, Object, Boolean])
|
|
184
|
-
], CoastsService);
|
|
185
|
-
export { CoastsService };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/coasts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,wBAAgB,mBAAmB,IAAI,OAAO,CAI7C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"init.command.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/coasts/init.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AASpC,wBAAgB,iBAAiB,IAAI,OAAO,CA0C3C"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { Command } from 'commander';
|
|
2
|
-
import { container } from '../../../../../packages/core/src/infrastructure/di/container.js';
|
|
3
|
-
import { messages, spinner } from '../../ui/index.js';
|
|
4
|
-
export function createInitCommand() {
|
|
5
|
-
return new Command('init')
|
|
6
|
-
.description('Generate a Coastfile for the current repository')
|
|
7
|
-
.option('-f, --force', 'Overwrite existing Coastfile without prompting')
|
|
8
|
-
.action(async (options) => {
|
|
9
|
-
const workDir = process.cwd();
|
|
10
|
-
try {
|
|
11
|
-
const coastsService = container.resolve('ICoastsService');
|
|
12
|
-
// Check if Coastfile already exists
|
|
13
|
-
const exists = await coastsService.hasCoastfile(workDir);
|
|
14
|
-
if (exists && !options.force) {
|
|
15
|
-
messages.warning('Coastfile already exists. Use --force to regenerate.');
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
// Check prerequisites
|
|
19
|
-
const prereqs = await coastsService.checkPrerequisites(workDir);
|
|
20
|
-
if (!prereqs.allMet) {
|
|
21
|
-
for (const msg of prereqs.missingMessages) {
|
|
22
|
-
messages.error(msg);
|
|
23
|
-
}
|
|
24
|
-
process.exitCode = 1;
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
// Generate Coastfile
|
|
28
|
-
const coastfilePath = await spinner('Generating Coastfile via AI agent...', () => coastsService.generateCoastfile(workDir));
|
|
29
|
-
messages.success(`Coastfile generated at ${coastfilePath}`);
|
|
30
|
-
// Build container
|
|
31
|
-
await spinner('Building coast container...', () => coastsService.build(workDir));
|
|
32
|
-
messages.success('Coast container built successfully.');
|
|
33
|
-
}
|
|
34
|
-
catch (error) {
|
|
35
|
-
const err = error instanceof Error ? error : new Error(String(error));
|
|
36
|
-
messages.error('Failed to initialize Coasts', err);
|
|
37
|
-
process.exitCode = 1;
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"check-coastfile.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/check-coastfile.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,wBAAsB,oBAAoB,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAYhG"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
'use server';
|
|
2
|
-
import path from 'node:path';
|
|
3
|
-
import { resolve } from '../../lib/server-container.js';
|
|
4
|
-
export async function checkCoastfileAction(repositoryPath) {
|
|
5
|
-
if (!repositoryPath || !path.isAbsolute(repositoryPath)) {
|
|
6
|
-
return { exists: false };
|
|
7
|
-
}
|
|
8
|
-
try {
|
|
9
|
-
const coastsService = resolve('ICoastsService');
|
|
10
|
-
const exists = await coastsService.hasCoastfile(repositoryPath);
|
|
11
|
-
return { exists };
|
|
12
|
-
}
|
|
13
|
-
catch {
|
|
14
|
-
return { exists: false };
|
|
15
|
-
}
|
|
16
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export interface GenerateCoastfileResult {
|
|
2
|
-
success: boolean;
|
|
3
|
-
coastfilePath?: string;
|
|
4
|
-
error?: string;
|
|
5
|
-
}
|
|
6
|
-
export declare function generateCoastfileAction(repositoryPath: string): Promise<GenerateCoastfileResult>;
|
|
7
|
-
//# sourceMappingURL=generate-coastfile.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generate-coastfile.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/generate-coastfile.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAsB,uBAAuB,CAC3C,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,uBAAuB,CAAC,CAkBlC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
'use server';
|
|
2
|
-
import path from 'node:path';
|
|
3
|
-
import { existsSync } from 'node:fs';
|
|
4
|
-
import { resolve } from '../../lib/server-container.js';
|
|
5
|
-
export async function generateCoastfileAction(repositoryPath) {
|
|
6
|
-
if (!repositoryPath || !path.isAbsolute(repositoryPath)) {
|
|
7
|
-
return { success: false, error: 'repositoryPath must be an absolute path' };
|
|
8
|
-
}
|
|
9
|
-
if (!existsSync(repositoryPath)) {
|
|
10
|
-
return { success: false, error: `Directory does not exist: ${repositoryPath}` };
|
|
11
|
-
}
|
|
12
|
-
try {
|
|
13
|
-
const coastsService = resolve('ICoastsService');
|
|
14
|
-
const coastfilePath = await coastsService.generateCoastfile(repositoryPath);
|
|
15
|
-
await coastsService.build(repositoryPath);
|
|
16
|
-
return { success: true, coastfilePath };
|
|
17
|
-
}
|
|
18
|
-
catch (error) {
|
|
19
|
-
const message = error instanceof Error ? error.message : 'Failed to generate Coastfile';
|
|
20
|
-
return { success: false, error: message };
|
|
21
|
-
}
|
|
22
|
-
}
|