@aitne/dashboard 0.1.4 → 0.1.6
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/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +5 -1
- package/.next/build-manifest.json +3 -3
- package/.next/cache/.tsbuildinfo +1 -1
- package/.next/diagnostics/route-bundle-stats.json +450 -356
- package/.next/fallback-build-manifest.json +3 -3
- package/.next/prerender-manifest.json +96 -0
- package/.next/routes-manifest.json +24 -0
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +15 -15
- package/.next/server/app/_not-found.segments/_full.segment.rsc +15 -15
- package/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
- package/.next/server/app/_not-found.segments/_index.segment.rsc +10 -10
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/activity/page.js.nft.json +1 -1
- package/.next/server/app/activity/page_client-reference-manifest.js +1 -1
- package/.next/server/app/activity.html +1 -1
- package/.next/server/app/activity.rsc +19 -19
- package/.next/server/app/activity.segments/_full.segment.rsc +19 -19
- package/.next/server/app/activity.segments/_head.segment.rsc +4 -4
- package/.next/server/app/activity.segments/_index.segment.rsc +10 -10
- package/.next/server/app/activity.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/activity.segments/activity/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/activity.segments/activity.segment.rsc +4 -4
- package/.next/server/app/analytics/page.js.nft.json +1 -1
- package/.next/server/app/analytics/page_client-reference-manifest.js +1 -1
- package/.next/server/app/analytics.html +1 -1
- package/.next/server/app/analytics.rsc +19 -19
- package/.next/server/app/analytics.segments/_full.segment.rsc +19 -19
- package/.next/server/app/analytics.segments/_head.segment.rsc +4 -4
- package/.next/server/app/analytics.segments/_index.segment.rsc +10 -10
- package/.next/server/app/analytics.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/analytics.segments/analytics/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/analytics.segments/analytics.segment.rsc +4 -4
- package/.next/server/app/api/[...path]/route.js +1 -1
- package/.next/server/app/api/[...path]/route.js.nft.json +1 -1
- package/.next/server/app/chat/page.js.nft.json +1 -1
- package/.next/server/app/chat/page_client-reference-manifest.js +1 -1
- package/.next/server/app/chat.html +1 -1
- package/.next/server/app/chat.rsc +17 -17
- package/.next/server/app/chat.segments/_full.segment.rsc +17 -17
- package/.next/server/app/chat.segments/_head.segment.rsc +4 -4
- package/.next/server/app/chat.segments/_index.segment.rsc +10 -10
- package/.next/server/app/chat.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/chat.segments/chat/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/chat.segments/chat.segment.rsc +3 -3
- package/.next/server/app/connections/calendar/page.js.nft.json +1 -1
- package/.next/server/app/connections/calendar/page_client-reference-manifest.js +1 -1
- package/.next/server/app/connections/calendar.html +1 -1
- package/.next/server/app/connections/calendar.rsc +18 -18
- package/.next/server/app/connections/calendar.segments/_full.segment.rsc +18 -18
- package/.next/server/app/connections/calendar.segments/_head.segment.rsc +4 -4
- package/.next/server/app/connections/calendar.segments/_index.segment.rsc +10 -10
- package/.next/server/app/connections/calendar.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/connections/calendar.segments/connections/calendar/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/connections/calendar.segments/connections/calendar.segment.rsc +3 -3
- package/.next/server/app/connections/calendar.segments/connections.segment.rsc +4 -4
- package/.next/server/app/connections/journal/page.js.nft.json +1 -1
- package/.next/server/app/connections/journal/page_client-reference-manifest.js +1 -1
- package/.next/server/app/connections/journal.html +1 -1
- package/.next/server/app/connections/journal.rsc +16 -16
- package/.next/server/app/connections/journal.segments/_full.segment.rsc +16 -16
- package/.next/server/app/connections/journal.segments/_head.segment.rsc +4 -4
- package/.next/server/app/connections/journal.segments/_index.segment.rsc +10 -10
- package/.next/server/app/connections/journal.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/connections/journal.segments/connections/journal/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/connections/journal.segments/connections/journal.segment.rsc +3 -3
- package/.next/server/app/connections/journal.segments/connections.segment.rsc +4 -4
- package/.next/server/app/connections/knowledge/page.js.nft.json +1 -1
- package/.next/server/app/connections/knowledge/page_client-reference-manifest.js +1 -1
- package/.next/server/app/connections/knowledge.html +1 -1
- package/.next/server/app/connections/knowledge.rsc +18 -18
- package/.next/server/app/connections/knowledge.segments/_full.segment.rsc +18 -18
- package/.next/server/app/connections/knowledge.segments/_head.segment.rsc +4 -4
- package/.next/server/app/connections/knowledge.segments/_index.segment.rsc +10 -10
- package/.next/server/app/connections/knowledge.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/connections/knowledge.segments/connections/knowledge/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/connections/knowledge.segments/connections/knowledge.segment.rsc +3 -3
- package/.next/server/app/connections/knowledge.segments/connections.segment.rsc +4 -4
- package/.next/server/app/connections/mail/page.js.nft.json +1 -1
- package/.next/server/app/connections/mail/page_client-reference-manifest.js +1 -1
- package/.next/server/app/connections/mail.html +1 -1
- package/.next/server/app/connections/mail.rsc +18 -18
- package/.next/server/app/connections/mail.segments/_full.segment.rsc +18 -18
- package/.next/server/app/connections/mail.segments/_head.segment.rsc +4 -4
- package/.next/server/app/connections/mail.segments/_index.segment.rsc +10 -10
- package/.next/server/app/connections/mail.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/connections/mail.segments/connections/mail/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/connections/mail.segments/connections/mail.segment.rsc +3 -3
- package/.next/server/app/connections/mail.segments/connections.segment.rsc +4 -4
- package/.next/server/app/connections/mcp/page.js.nft.json +1 -1
- package/.next/server/app/connections/mcp/page_client-reference-manifest.js +1 -1
- package/.next/server/app/connections/mcp.html +1 -1
- package/.next/server/app/connections/mcp.rsc +18 -18
- package/.next/server/app/connections/mcp.segments/_full.segment.rsc +18 -18
- package/.next/server/app/connections/mcp.segments/_head.segment.rsc +4 -4
- package/.next/server/app/connections/mcp.segments/_index.segment.rsc +10 -10
- package/.next/server/app/connections/mcp.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/connections/mcp.segments/connections/mcp/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/connections/mcp.segments/connections/mcp.segment.rsc +3 -3
- package/.next/server/app/connections/mcp.segments/connections.segment.rsc +4 -4
- package/.next/server/app/connections/messaging/page.js.nft.json +1 -1
- package/.next/server/app/connections/messaging/page_client-reference-manifest.js +1 -1
- package/.next/server/app/connections/messaging.html +1 -1
- package/.next/server/app/connections/messaging.rsc +18 -18
- package/.next/server/app/connections/messaging.segments/_full.segment.rsc +18 -18
- package/.next/server/app/connections/messaging.segments/_head.segment.rsc +4 -4
- package/.next/server/app/connections/messaging.segments/_index.segment.rsc +10 -10
- package/.next/server/app/connections/messaging.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/connections/messaging.segments/connections/messaging/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/connections/messaging.segments/connections/messaging.segment.rsc +3 -3
- package/.next/server/app/connections/messaging.segments/connections.segment.rsc +4 -4
- package/.next/server/app/connections/page.js.nft.json +1 -1
- package/.next/server/app/connections/page_client-reference-manifest.js +1 -1
- package/.next/server/app/connections/repositories/page.js.nft.json +1 -1
- package/.next/server/app/connections/repositories/page_client-reference-manifest.js +1 -1
- package/.next/server/app/connections/repositories.html +1 -1
- package/.next/server/app/connections/repositories.rsc +18 -18
- package/.next/server/app/connections/repositories.segments/_full.segment.rsc +18 -18
- package/.next/server/app/connections/repositories.segments/_head.segment.rsc +4 -4
- package/.next/server/app/connections/repositories.segments/_index.segment.rsc +10 -10
- package/.next/server/app/connections/repositories.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/connections/repositories.segments/connections/repositories/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/connections/repositories.segments/connections/repositories.segment.rsc +3 -3
- package/.next/server/app/connections/repositories.segments/connections.segment.rsc +4 -4
- package/.next/server/app/connections/routines/page.js.nft.json +1 -1
- package/.next/server/app/connections/routines/page_client-reference-manifest.js +1 -1
- package/.next/server/app/connections/routines.html +1 -1
- package/.next/server/app/connections/routines.rsc +16 -16
- package/.next/server/app/connections/routines.segments/_full.segment.rsc +16 -16
- package/.next/server/app/connections/routines.segments/_head.segment.rsc +4 -4
- package/.next/server/app/connections/routines.segments/_index.segment.rsc +10 -10
- package/.next/server/app/connections/routines.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/connections/routines.segments/connections/routines/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/connections/routines.segments/connections/routines.segment.rsc +3 -3
- package/.next/server/app/connections/routines.segments/connections.segment.rsc +4 -4
- package/.next/server/app/connections.html +1 -1
- package/.next/server/app/connections.rsc +16 -16
- package/.next/server/app/connections.segments/_full.segment.rsc +16 -16
- package/.next/server/app/connections.segments/_head.segment.rsc +4 -4
- package/.next/server/app/connections.segments/_index.segment.rsc +10 -10
- package/.next/server/app/connections.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/connections.segments/connections/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/connections.segments/connections.segment.rsc +4 -4
- package/.next/server/app/conversations/[id]/page.js.nft.json +1 -1
- package/.next/server/app/conversations/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/conversations/page.js.nft.json +1 -1
- package/.next/server/app/conversations/page_client-reference-manifest.js +1 -1
- package/.next/server/app/conversations.html +1 -1
- package/.next/server/app/conversations.rsc +15 -15
- package/.next/server/app/conversations.segments/_full.segment.rsc +15 -15
- package/.next/server/app/conversations.segments/_head.segment.rsc +4 -4
- package/.next/server/app/conversations.segments/_index.segment.rsc +10 -10
- package/.next/server/app/conversations.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/conversations.segments/conversations/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/conversations.segments/conversations.segment.rsc +3 -3
- package/.next/server/app/docs/[[...slug]]/page.js.nft.json +1 -1
- package/.next/server/app/docs/[[...slug]]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/finance/page.js.nft.json +1 -1
- package/.next/server/app/finance/page_client-reference-manifest.js +1 -1
- package/.next/server/app/finance.html +1 -1
- package/.next/server/app/finance.rsc +17 -17
- package/.next/server/app/finance.segments/_full.segment.rsc +17 -17
- package/.next/server/app/finance.segments/_head.segment.rsc +4 -4
- package/.next/server/app/finance.segments/_index.segment.rsc +10 -10
- package/.next/server/app/finance.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/finance.segments/finance/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/finance.segments/finance.segment.rsc +3 -3
- package/.next/server/app/git/page.js.nft.json +1 -1
- package/.next/server/app/git/page_client-reference-manifest.js +1 -1
- package/.next/server/app/git.html +1 -1
- package/.next/server/app/git.rsc +17 -17
- package/.next/server/app/git.segments/_full.segment.rsc +17 -17
- package/.next/server/app/git.segments/_head.segment.rsc +4 -4
- package/.next/server/app/git.segments/_index.segment.rsc +10 -10
- package/.next/server/app/git.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/git.segments/git/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/git.segments/git.segment.rsc +3 -3
- package/.next/server/app/health/page.js.nft.json +1 -1
- package/.next/server/app/health/page_client-reference-manifest.js +1 -1
- package/.next/server/app/health.html +1 -1
- package/.next/server/app/health.rsc +17 -17
- package/.next/server/app/health.segments/_full.segment.rsc +17 -17
- package/.next/server/app/health.segments/_head.segment.rsc +4 -4
- package/.next/server/app/health.segments/_index.segment.rsc +10 -10
- package/.next/server/app/health.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/health.segments/health/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/health.segments/health.segment.rsc +3 -3
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +17 -17
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/index.segments/_full.segment.rsc +17 -17
- package/.next/server/app/index.segments/_head.segment.rsc +4 -4
- package/.next/server/app/index.segments/_index.segment.rsc +10 -10
- package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/knowledge/page.js.nft.json +1 -1
- package/.next/server/app/knowledge/page_client-reference-manifest.js +1 -1
- package/.next/server/app/knowledge.html +1 -1
- package/.next/server/app/knowledge.rsc +18 -18
- package/.next/server/app/knowledge.segments/_full.segment.rsc +18 -18
- package/.next/server/app/knowledge.segments/_head.segment.rsc +4 -4
- package/.next/server/app/knowledge.segments/_index.segment.rsc +10 -10
- package/.next/server/app/knowledge.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/knowledge.segments/knowledge/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/knowledge.segments/knowledge.segment.rsc +4 -4
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/reading/page.js.nft.json +1 -1
- package/.next/server/app/reading/page_client-reference-manifest.js +1 -1
- package/.next/server/app/reading.html +1 -1
- package/.next/server/app/reading.rsc +17 -17
- package/.next/server/app/reading.segments/_full.segment.rsc +17 -17
- package/.next/server/app/reading.segments/_head.segment.rsc +4 -4
- package/.next/server/app/reading.segments/_index.segment.rsc +10 -10
- package/.next/server/app/reading.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/reading.segments/reading/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/reading.segments/reading.segment.rsc +3 -3
- package/.next/server/app/schedule/page.js.nft.json +1 -1
- package/.next/server/app/schedule/page_client-reference-manifest.js +1 -1
- package/.next/server/app/schedule.html +1 -1
- package/.next/server/app/schedule.rsc +17 -17
- package/.next/server/app/schedule.segments/_full.segment.rsc +17 -17
- package/.next/server/app/schedule.segments/_head.segment.rsc +4 -4
- package/.next/server/app/schedule.segments/_index.segment.rsc +10 -10
- package/.next/server/app/schedule.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/schedule.segments/schedule/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/schedule.segments/schedule.segment.rsc +3 -3
- package/.next/server/app/settings/advanced/page.js.nft.json +1 -1
- package/.next/server/app/settings/advanced/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/advanced.html +1 -1
- package/.next/server/app/settings/advanced.rsc +18 -18
- package/.next/server/app/settings/advanced.segments/_full.segment.rsc +18 -18
- package/.next/server/app/settings/advanced.segments/_head.segment.rsc +4 -4
- package/.next/server/app/settings/advanced.segments/_index.segment.rsc +10 -10
- package/.next/server/app/settings/advanced.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings/advanced.segments/settings/advanced/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/settings/advanced.segments/settings/advanced.segment.rsc +3 -3
- package/.next/server/app/settings/advanced.segments/settings.segment.rsc +4 -4
- package/.next/server/app/settings/backends/page.js.nft.json +1 -1
- package/.next/server/app/settings/backends/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/backends.html +1 -1
- package/.next/server/app/settings/backends.rsc +16 -16
- package/.next/server/app/settings/backends.segments/_full.segment.rsc +16 -16
- package/.next/server/app/settings/backends.segments/_head.segment.rsc +4 -4
- package/.next/server/app/settings/backends.segments/_index.segment.rsc +10 -10
- package/.next/server/app/settings/backends.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings/backends.segments/settings/backends/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/settings/backends.segments/settings/backends.segment.rsc +3 -3
- package/.next/server/app/settings/backends.segments/settings.segment.rsc +4 -4
- package/.next/server/app/settings/commands/page.js.nft.json +1 -1
- package/.next/server/app/settings/commands/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/commands.html +1 -1
- package/.next/server/app/settings/commands.rsc +18 -18
- package/.next/server/app/settings/commands.segments/_full.segment.rsc +18 -18
- package/.next/server/app/settings/commands.segments/_head.segment.rsc +4 -4
- package/.next/server/app/settings/commands.segments/_index.segment.rsc +10 -10
- package/.next/server/app/settings/commands.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings/commands.segments/settings/commands/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/settings/commands.segments/settings/commands.segment.rsc +3 -3
- package/.next/server/app/settings/commands.segments/settings.segment.rsc +4 -4
- package/.next/server/app/settings/connections/page.js.nft.json +1 -1
- package/.next/server/app/settings/connections/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/connections.html +1 -1
- package/.next/server/app/settings/connections.rsc +16 -16
- package/.next/server/app/settings/connections.segments/_full.segment.rsc +16 -16
- package/.next/server/app/settings/connections.segments/_head.segment.rsc +4 -4
- package/.next/server/app/settings/connections.segments/_index.segment.rsc +10 -10
- package/.next/server/app/settings/connections.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings/connections.segments/settings/connections/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/settings/connections.segments/settings/connections.segment.rsc +3 -3
- package/.next/server/app/settings/connections.segments/settings.segment.rsc +4 -4
- package/.next/server/app/settings/journal/page.js.nft.json +1 -1
- package/.next/server/app/settings/journal/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/journal.html +1 -1
- package/.next/server/app/settings/journal.rsc +18 -18
- package/.next/server/app/settings/journal.segments/_full.segment.rsc +18 -18
- package/.next/server/app/settings/journal.segments/_head.segment.rsc +4 -4
- package/.next/server/app/settings/journal.segments/_index.segment.rsc +10 -10
- package/.next/server/app/settings/journal.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings/journal.segments/settings/journal/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/settings/journal.segments/settings/journal.segment.rsc +3 -3
- package/.next/server/app/settings/journal.segments/settings.segment.rsc +4 -4
- package/.next/server/app/settings/management/page.js.nft.json +1 -1
- package/.next/server/app/settings/management/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/management.html +1 -1
- package/.next/server/app/settings/management.rsc +18 -18
- package/.next/server/app/settings/management.segments/_full.segment.rsc +18 -18
- package/.next/server/app/settings/management.segments/_head.segment.rsc +4 -4
- package/.next/server/app/settings/management.segments/_index.segment.rsc +10 -10
- package/.next/server/app/settings/management.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings/management.segments/settings/management/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/settings/management.segments/settings/management.segment.rsc +3 -3
- package/.next/server/app/settings/management.segments/settings.segment.rsc +4 -4
- package/.next/server/app/settings/messaging/page.js.nft.json +1 -1
- package/.next/server/app/settings/messaging/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/messaging.html +1 -1
- package/.next/server/app/settings/messaging.rsc +16 -16
- package/.next/server/app/settings/messaging.segments/_full.segment.rsc +16 -16
- package/.next/server/app/settings/messaging.segments/_head.segment.rsc +4 -4
- package/.next/server/app/settings/messaging.segments/_index.segment.rsc +10 -10
- package/.next/server/app/settings/messaging.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings/messaging.segments/settings/messaging/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/settings/messaging.segments/settings/messaging.segment.rsc +3 -3
- package/.next/server/app/settings/messaging.segments/settings.segment.rsc +4 -4
- package/.next/server/app/settings/models/page.js.nft.json +1 -1
- package/.next/server/app/settings/models/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/models.html +1 -1
- package/.next/server/app/settings/models.rsc +18 -18
- package/.next/server/app/settings/models.segments/_full.segment.rsc +18 -18
- package/.next/server/app/settings/models.segments/_head.segment.rsc +4 -4
- package/.next/server/app/settings/models.segments/_index.segment.rsc +10 -10
- package/.next/server/app/settings/models.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings/models.segments/settings/models/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/settings/models.segments/settings/models.segment.rsc +3 -3
- package/.next/server/app/settings/models.segments/settings.segment.rsc +4 -4
- package/.next/server/app/settings/page.js.nft.json +1 -1
- package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/processes/page.js.nft.json +1 -1
- package/.next/server/app/settings/processes/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/processes.html +1 -1
- package/.next/server/app/settings/processes.rsc +16 -16
- package/.next/server/app/settings/processes.segments/_full.segment.rsc +16 -16
- package/.next/server/app/settings/processes.segments/_head.segment.rsc +4 -4
- package/.next/server/app/settings/processes.segments/_index.segment.rsc +10 -10
- package/.next/server/app/settings/processes.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings/processes.segments/settings/processes/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/settings/processes.segments/settings/processes.segment.rsc +3 -3
- package/.next/server/app/settings/processes.segments/settings.segment.rsc +4 -4
- package/.next/server/app/settings/routines/page.js.nft.json +1 -1
- package/.next/server/app/settings/routines/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/routines.html +1 -1
- package/.next/server/app/settings/routines.rsc +18 -18
- package/.next/server/app/settings/routines.segments/_full.segment.rsc +18 -18
- package/.next/server/app/settings/routines.segments/_head.segment.rsc +4 -4
- package/.next/server/app/settings/routines.segments/_index.segment.rsc +10 -10
- package/.next/server/app/settings/routines.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings/routines.segments/settings/routines/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/settings/routines.segments/settings/routines.segment.rsc +3 -3
- package/.next/server/app/settings/routines.segments/settings.segment.rsc +4 -4
- package/.next/server/app/settings/schedule/page.js.nft.json +1 -1
- package/.next/server/app/settings/schedule/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/schedule.html +1 -1
- package/.next/server/app/settings/schedule.rsc +18 -18
- package/.next/server/app/settings/schedule.segments/_full.segment.rsc +18 -18
- package/.next/server/app/settings/schedule.segments/_head.segment.rsc +4 -4
- package/.next/server/app/settings/schedule.segments/_index.segment.rsc +10 -10
- package/.next/server/app/settings/schedule.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings/schedule.segments/settings/schedule/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/settings/schedule.segments/settings/schedule.segment.rsc +3 -3
- package/.next/server/app/settings/schedule.segments/settings.segment.rsc +4 -4
- package/.next/server/app/settings/self-learning/page.js.nft.json +1 -1
- package/.next/server/app/settings/self-learning/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/self-learning.html +1 -1
- package/.next/server/app/settings/self-learning.rsc +18 -18
- package/.next/server/app/settings/self-learning.segments/_full.segment.rsc +18 -18
- package/.next/server/app/settings/self-learning.segments/_head.segment.rsc +4 -4
- package/.next/server/app/settings/self-learning.segments/_index.segment.rsc +10 -10
- package/.next/server/app/settings/self-learning.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings/self-learning.segments/settings/self-learning/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/settings/self-learning.segments/settings/self-learning.segment.rsc +3 -3
- package/.next/server/app/settings/self-learning.segments/settings.segment.rsc +4 -4
- package/.next/server/app/settings/wiki/page/app-paths-manifest.json +3 -0
- package/.next/server/app/settings/wiki/page/build-manifest.json +18 -0
- package/.next/server/app/settings/wiki/page/next-font-manifest.json +6 -0
- package/.next/server/app/settings/wiki/page/react-loadable-manifest.json +8 -0
- package/.next/server/app/settings/wiki/page/server-reference-manifest.json +4 -0
- package/.next/server/app/settings/wiki/page.js +16 -0
- package/.next/server/app/settings/wiki/page.js.map +5 -0
- package/.next/server/app/settings/wiki/page.js.nft.json +1 -0
- package/.next/server/app/settings/wiki/page_client-reference-manifest.js +3 -0
- package/.next/server/app/settings/wiki/timeline/page/app-paths-manifest.json +3 -0
- package/.next/server/app/settings/wiki/timeline/page/build-manifest.json +18 -0
- package/.next/server/app/settings/wiki/timeline/page/next-font-manifest.json +6 -0
- package/.next/server/app/settings/wiki/timeline/page/react-loadable-manifest.json +8 -0
- package/.next/server/app/settings/wiki/timeline/page/server-reference-manifest.json +4 -0
- package/.next/server/app/settings/wiki/timeline/page.js +17 -0
- package/.next/server/app/settings/wiki/timeline/page.js.map +5 -0
- package/.next/server/app/settings/wiki/timeline/page.js.nft.json +1 -0
- package/.next/server/app/settings/wiki/timeline/page_client-reference-manifest.js +3 -0
- package/.next/server/app/settings/wiki/timeline.html +1 -0
- package/.next/server/app/settings/wiki/timeline.meta +17 -0
- package/.next/server/app/settings/wiki/timeline.rsc +24 -0
- package/.next/server/app/settings/wiki/timeline.segments/_full.segment.rsc +24 -0
- package/.next/server/app/settings/wiki/timeline.segments/_head.segment.rsc +6 -0
- package/.next/server/app/settings/wiki/timeline.segments/_index.segment.rsc +11 -0
- package/.next/server/app/settings/wiki/timeline.segments/_tree.segment.rsc +2 -0
- package/.next/server/app/settings/wiki/timeline.segments/settings/wiki/timeline/__PAGE__.segment.rsc +6 -0
- package/.next/server/app/settings/wiki/timeline.segments/settings/wiki/timeline.segment.rsc +5 -0
- package/.next/server/app/settings/wiki/timeline.segments/settings/wiki.segment.rsc +5 -0
- package/.next/server/app/settings/wiki/timeline.segments/settings.segment.rsc +5 -0
- package/.next/server/app/settings/wiki.html +1 -0
- package/.next/server/app/settings/wiki.meta +16 -0
- package/.next/server/app/settings/wiki.rsc +27 -0
- package/.next/server/app/settings/wiki.segments/_full.segment.rsc +27 -0
- package/.next/server/app/settings/wiki.segments/_head.segment.rsc +6 -0
- package/.next/server/app/settings/wiki.segments/_index.segment.rsc +11 -0
- package/.next/server/app/settings/wiki.segments/_tree.segment.rsc +2 -0
- package/.next/server/app/settings/wiki.segments/settings/wiki/__PAGE__.segment.rsc +9 -0
- package/.next/server/app/settings/wiki.segments/settings/wiki.segment.rsc +5 -0
- package/.next/server/app/settings/wiki.segments/settings.segment.rsc +5 -0
- package/.next/server/app/settings.html +1 -1
- package/.next/server/app/settings.rsc +18 -18
- package/.next/server/app/settings.segments/_full.segment.rsc +18 -18
- package/.next/server/app/settings.segments/_head.segment.rsc +4 -4
- package/.next/server/app/settings.segments/_index.segment.rsc +10 -10
- package/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/settings.segments/settings.segment.rsc +4 -4
- package/.next/server/app/setup/page.js.nft.json +1 -1
- package/.next/server/app/setup/page_client-reference-manifest.js +1 -1
- package/.next/server/app/setup.html +1 -1
- package/.next/server/app/setup.rsc +17 -17
- package/.next/server/app/setup.segments/_full.segment.rsc +17 -17
- package/.next/server/app/setup.segments/_head.segment.rsc +4 -4
- package/.next/server/app/setup.segments/_index.segment.rsc +10 -10
- package/.next/server/app/setup.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/setup.segments/setup/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/setup.segments/setup.segment.rsc +3 -3
- package/.next/server/app/trip/page.js.nft.json +1 -1
- package/.next/server/app/trip/page_client-reference-manifest.js +1 -1
- package/.next/server/app/trip.html +1 -1
- package/.next/server/app/trip.rsc +17 -17
- package/.next/server/app/trip.segments/_full.segment.rsc +17 -17
- package/.next/server/app/trip.segments/_head.segment.rsc +4 -4
- package/.next/server/app/trip.segments/_index.segment.rsc +10 -10
- package/.next/server/app/trip.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/trip.segments/trip/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/trip.segments/trip.segment.rsc +3 -3
- package/.next/server/app/wiki/page/app-paths-manifest.json +3 -0
- package/.next/server/app/wiki/page/build-manifest.json +18 -0
- package/.next/server/app/wiki/page/next-font-manifest.json +6 -0
- package/.next/server/app/wiki/page/react-loadable-manifest.json +8 -0
- package/.next/server/app/wiki/page/server-reference-manifest.json +4 -0
- package/.next/server/app/wiki/page.js +15 -0
- package/.next/server/app/wiki/page.js.map +5 -0
- package/.next/server/app/wiki/page.js.nft.json +1 -0
- package/.next/server/app/wiki/page_client-reference-manifest.js +3 -0
- package/.next/server/app/wiki/timeline/page/app-paths-manifest.json +3 -0
- package/.next/server/app/wiki/timeline/page/build-manifest.json +18 -0
- package/.next/server/app/wiki/timeline/page/next-font-manifest.json +6 -0
- package/.next/server/app/wiki/timeline/page/react-loadable-manifest.json +8 -0
- package/.next/server/app/wiki/timeline/page/server-reference-manifest.json +4 -0
- package/.next/server/app/wiki/timeline/page.js +15 -0
- package/.next/server/app/wiki/timeline/page.js.map +5 -0
- package/.next/server/app/wiki/timeline/page.js.nft.json +1 -0
- package/.next/server/app/wiki/timeline/page_client-reference-manifest.js +3 -0
- package/.next/server/app/wiki/timeline.html +1 -0
- package/.next/server/app/wiki/timeline.meta +16 -0
- package/.next/server/app/wiki/timeline.rsc +26 -0
- package/.next/server/app/wiki/timeline.segments/_full.segment.rsc +26 -0
- package/.next/server/app/wiki/timeline.segments/_head.segment.rsc +6 -0
- package/.next/server/app/wiki/timeline.segments/_index.segment.rsc +11 -0
- package/.next/server/app/wiki/timeline.segments/_tree.segment.rsc +2 -0
- package/.next/server/app/wiki/timeline.segments/wiki/timeline/__PAGE__.segment.rsc +9 -0
- package/.next/server/app/wiki/timeline.segments/wiki/timeline.segment.rsc +5 -0
- package/.next/server/app/wiki/timeline.segments/wiki.segment.rsc +5 -0
- package/.next/server/app/wiki.html +1 -0
- package/.next/server/app/wiki.meta +15 -0
- package/.next/server/app/wiki.rsc +26 -0
- package/.next/server/app/wiki.segments/_full.segment.rsc +26 -0
- package/.next/server/app/wiki.segments/_head.segment.rsc +6 -0
- package/.next/server/app/wiki.segments/_index.segment.rsc +11 -0
- package/.next/server/app/wiki.segments/_tree.segment.rsc +2 -0
- package/.next/server/app/wiki.segments/wiki/__PAGE__.segment.rsc +9 -0
- package/.next/server/app/wiki.segments/wiki.segment.rsc +5 -0
- package/.next/server/app-paths-manifest.json +5 -1
- package/.next/server/chunks/0z~i_next_dist_esm_build_templates_app-route_0o_o_hp.js +1 -1
- package/.next/server/chunks/0z~i_next_dist_esm_build_templates_app-route_0o_o_hp.js.map +1 -1
- package/.next/server/chunks/{[root-of-the-server]__00gp8gz._.js → [root-of-the-server]__01knfi.._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__0-0wgko._.js → [root-of-the-server]__08_s4yo._.js} +2 -2
- package/.next/server/chunks/ssr/0juq_dashboard__next-internal_server_app_settings_wiki_timeline_page_actions_0czqn6z.js +3 -0
- package/.next/server/chunks/ssr/0juq_dashboard__next-internal_server_app_settings_wiki_timeline_page_actions_0czqn6z.js.map +1 -0
- package/.next/server/chunks/ssr/0mzu_lucide-react_dist_esm_icons_zap_115-27i.js +3 -0
- package/.next/server/chunks/ssr/0mzu_lucide-react_dist_esm_icons_zap_115-27i.js.map +1 -0
- package/.next/server/chunks/ssr/0z~i_next_dist_esm_build_templates_app-page_0k3x-na.js +4 -0
- package/.next/server/chunks/ssr/0z~i_next_dist_esm_build_templates_app-page_0k3x-na.js.map +1 -0
- package/.next/server/chunks/ssr/0z~i_next_dist_esm_build_templates_app-page_0km22.v.js +4 -0
- package/.next/server/chunks/ssr/0z~i_next_dist_esm_build_templates_app-page_0km22.v.js.map +1 -0
- package/.next/server/chunks/ssr/0z~i_next_dist_esm_build_templates_app-page_0vui1gx.js +4 -0
- package/.next/server/chunks/ssr/0z~i_next_dist_esm_build_templates_app-page_0vui1gx.js.map +1 -0
- package/.next/server/chunks/ssr/0z~i_next_dist_esm_build_templates_app-page_11h319t.js +4 -0
- package/.next/server/chunks/ssr/0z~i_next_dist_esm_build_templates_app-page_11h319t.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__007ymqm._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__007ymqm._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__00vjce2._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__00vjce2._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__07pkvm3._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__07pkvm3._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0dfuz7_._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0dfuz7_._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__117dw_l._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__117dw_l._.js.map +1 -0
- package/.next/server/chunks/ssr/_0-3uzu1._.js +3 -0
- package/.next/server/chunks/ssr/_0-3uzu1._.js.map +1 -0
- package/.next/server/chunks/ssr/_0-6jgyg._.js +3 -0
- package/.next/server/chunks/ssr/_0-6jgyg._.js.map +1 -0
- package/.next/server/chunks/ssr/_0-fv_sr._.js +1 -1
- package/.next/server/chunks/ssr/_0-fv_sr._.js.map +1 -1
- package/.next/server/chunks/ssr/_0.7pki~._.js +3 -0
- package/.next/server/chunks/ssr/_0.7pki~._.js.map +1 -0
- package/.next/server/chunks/ssr/_02s86rg._.js +3 -0
- package/.next/server/chunks/ssr/_02s86rg._.js.map +1 -0
- package/.next/server/chunks/ssr/_03bq.de._.js +3 -0
- package/.next/server/chunks/ssr/_03bq.de._.js.map +1 -0
- package/.next/server/chunks/ssr/_03u6ja0._.js +3 -0
- package/.next/server/chunks/ssr/_03u6ja0._.js.map +1 -0
- package/.next/server/chunks/ssr/_04-.z69._.js +3 -0
- package/.next/server/chunks/ssr/_04-.z69._.js.map +1 -0
- package/.next/server/chunks/ssr/_05rlac0._.js +3 -0
- package/.next/server/chunks/ssr/_05rlac0._.js.map +1 -0
- package/.next/server/chunks/ssr/_05xysbw._.js +3 -0
- package/.next/server/chunks/ssr/_05xysbw._.js.map +1 -0
- package/.next/server/chunks/ssr/_09e_66m._.js +3 -0
- package/.next/server/chunks/ssr/_09e_66m._.js.map +1 -0
- package/.next/server/chunks/ssr/_0_bnan9._.js +3 -0
- package/.next/server/chunks/ssr/_0_bnan9._.js.map +1 -0
- package/.next/server/chunks/ssr/_0b00io4._.js +3 -0
- package/.next/server/chunks/ssr/_0b00io4._.js.map +1 -0
- package/.next/server/chunks/ssr/_0es_2i2._.js +3 -0
- package/.next/server/chunks/ssr/_0es_2i2._.js.map +1 -0
- package/.next/server/chunks/ssr/_0g7_r5i._.js +3 -0
- package/.next/server/chunks/ssr/_0g7_r5i._.js.map +1 -0
- package/.next/server/chunks/ssr/_0hojxqy._.js +1 -1
- package/.next/server/chunks/ssr/_0hojxqy._.js.map +1 -1
- package/.next/server/chunks/ssr/_0ifb9jm._.js +3 -0
- package/.next/server/chunks/ssr/_0ifb9jm._.js.map +1 -0
- package/.next/server/chunks/ssr/_0jl_-u5._.js +3 -0
- package/.next/server/chunks/ssr/_0jl_-u5._.js.map +1 -0
- package/.next/server/chunks/ssr/_0lfuvjg._.js +3 -0
- package/.next/server/chunks/ssr/_0lfuvjg._.js.map +1 -0
- package/.next/server/chunks/ssr/{_0jm~wn-._.js → _0mp7n5i._.js} +2 -2
- package/.next/server/chunks/ssr/{_0jm~wn-._.js.map → _0mp7n5i._.js.map} +1 -1
- package/.next/server/chunks/ssr/_0powsoh._.js +3 -0
- package/.next/server/chunks/ssr/_0powsoh._.js.map +1 -0
- package/.next/server/chunks/ssr/_0q34y9l._.js +3 -0
- package/.next/server/chunks/ssr/_0q34y9l._.js.map +1 -0
- package/.next/server/chunks/ssr/_0q4rpi-._.js +5 -0
- package/.next/server/chunks/ssr/_0q4rpi-._.js.map +1 -0
- package/.next/server/chunks/ssr/_0rc-7d4._.js +3 -0
- package/.next/server/chunks/ssr/_0rc-7d4._.js.map +1 -0
- package/.next/server/chunks/ssr/_0tjsh16._.js +3 -0
- package/.next/server/chunks/ssr/_0tjsh16._.js.map +1 -0
- package/.next/server/chunks/ssr/_0tl98en._.js +1 -1
- package/.next/server/chunks/ssr/_0tl98en._.js.map +1 -1
- package/.next/server/chunks/ssr/{_0._ysx3._.js → _0v_6ros._.js} +2 -2
- package/.next/server/chunks/ssr/_0v_6ros._.js.map +1 -0
- package/.next/server/chunks/ssr/_0vncjim._.js +3 -0
- package/.next/server/chunks/ssr/_0vncjim._.js.map +1 -0
- package/.next/server/chunks/ssr/_0vx-jgf._.js +3 -0
- package/.next/server/chunks/ssr/_0vx-jgf._.js.map +1 -0
- package/.next/server/chunks/ssr/_0w1ez1p._.js +3 -0
- package/.next/server/chunks/ssr/_0w1ez1p._.js.map +1 -0
- package/.next/server/chunks/ssr/_0yl49yk._.js +3 -0
- package/.next/server/chunks/ssr/_0yl49yk._.js.map +1 -0
- package/.next/server/chunks/ssr/_0z1ah9x._.js +1 -1
- package/.next/server/chunks/ssr/_0z1ah9x._.js.map +1 -1
- package/.next/server/chunks/ssr/_0z9ikwn._.js +3 -0
- package/.next/server/chunks/ssr/_0z9ikwn._.js.map +1 -0
- package/.next/server/chunks/ssr/_0z_cp12._.js +3 -0
- package/.next/server/chunks/ssr/_0z_cp12._.js.map +1 -0
- package/.next/server/chunks/ssr/_10hvwg5._.js +3 -0
- package/.next/server/chunks/ssr/_10hvwg5._.js.map +1 -0
- package/.next/server/chunks/ssr/packages_dashboard__next-internal_server_app_settings_wiki_page_actions_12d~w9l.js +3 -0
- package/.next/server/chunks/ssr/packages_dashboard__next-internal_server_app_settings_wiki_page_actions_12d~w9l.js.map +1 -0
- package/.next/server/chunks/ssr/packages_dashboard__next-internal_server_app_wiki_page_actions_026bi.d.js +3 -0
- package/.next/server/chunks/ssr/packages_dashboard__next-internal_server_app_wiki_page_actions_026bi.d.js.map +1 -0
- package/.next/server/chunks/ssr/packages_dashboard__next-internal_server_app_wiki_timeline_page_actions_06jb4gg.js +3 -0
- package/.next/server/chunks/ssr/packages_dashboard__next-internal_server_app_wiki_timeline_page_actions_06jb4gg.js.map +1 -0
- package/.next/server/chunks/ssr/packages_dashboard_src_0bx940s._.js +3 -0
- package/.next/server/chunks/ssr/packages_dashboard_src_0bx940s._.js.map +1 -0
- package/.next/server/chunks/ssr/packages_dashboard_src_0fo7nqq._.js +3 -0
- package/.next/server/chunks/ssr/packages_dashboard_src_0fo7nqq._.js.map +1 -0
- package/.next/server/chunks/ssr/packages_dashboard_src_0uxs9-.._.js +1 -1
- package/.next/server/chunks/ssr/packages_dashboard_src_0uxs9-.._.js.map +1 -1
- package/.next/server/chunks/ssr/packages_dashboard_src_app_activity_page_tsx_08yep46._.js +1 -1
- package/.next/server/chunks/ssr/packages_dashboard_src_app_activity_page_tsx_08yep46._.js.map +1 -1
- package/.next/server/chunks/ssr/packages_dashboard_src_app_connections_repositories_page_tsx_08y6paq._.js +1 -1
- package/.next/server/chunks/ssr/packages_dashboard_src_app_connections_repositories_page_tsx_08y6paq._.js.map +1 -1
- package/.next/server/chunks/ssr/packages_dashboard_src_app_git_page_tsx_0ah19-6._.js +1 -1
- package/.next/server/chunks/ssr/packages_dashboard_src_app_git_page_tsx_0ah19-6._.js.map +1 -1
- package/.next/server/chunks/ssr/packages_dashboard_src_app_schedule_page_tsx_0znc404._.js +1 -1
- package/.next/server/chunks/ssr/packages_dashboard_src_app_schedule_page_tsx_0znc404._.js.map +1 -1
- package/.next/server/chunks/ssr/packages_dashboard_src_app_settings_models_page_tsx_0djsx88._.js +1 -1
- package/.next/server/chunks/ssr/packages_dashboard_src_app_settings_models_page_tsx_0djsx88._.js.map +1 -1
- package/.next/server/chunks/ssr/packages_dashboard_src_app_settings_schedule_page_tsx_0b8zr2l._.js +1 -1
- package/.next/server/chunks/ssr/packages_dashboard_src_app_settings_schedule_page_tsx_0b8zr2l._.js.map +1 -1
- package/.next/server/chunks/ssr/packages_dashboard_src_app_settings_wiki_page_tsx_0..1tkb._.js +3 -0
- package/.next/server/chunks/ssr/packages_dashboard_src_app_settings_wiki_page_tsx_0..1tkb._.js.map +1 -0
- package/.next/server/chunks/ssr/packages_dashboard_src_app_setup_page_tsx_06k3via._.js +1 -1
- package/.next/server/chunks/ssr/packages_dashboard_src_app_setup_page_tsx_06k3via._.js.map +1 -1
- package/.next/server/chunks/ssr/packages_dashboard_src_components_connections_slack-card_tsx_0mahejj._.js +1 -1
- package/.next/server/chunks/ssr/packages_dashboard_src_components_connections_slack-card_tsx_0mahejj._.js.map +1 -1
- package/.next/server/chunks/ssr/packages_dashboard_src_components_settings_backend-settings_tsx_0i-tp_u._.js +3 -0
- package/.next/server/chunks/ssr/packages_dashboard_src_components_settings_backend-settings_tsx_0i-tp_u._.js.map +1 -0
- package/.next/server/chunks/ssr/packages_shared_dist_index_0kuvow-.js +1 -1
- package/.next/server/chunks/ssr/packages_shared_dist_index_0kuvow-.js.map +1 -1
- package/.next/server/middleware/middleware-manifest.json +1 -1
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/middleware-manifest.json +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/static/chunks/01yix41q.0970.js +1 -0
- package/.next/static/chunks/02qjylw4yp63l.js +1 -0
- package/.next/static/chunks/06y2ddf5x9x_4.js +1 -0
- package/.next/static/chunks/{0ztl~44vjnpe1.js → 08ie9t4zn6n4-.js} +1 -1
- package/.next/static/chunks/091khs5zza4_4.js +1 -0
- package/.next/static/chunks/{0~_56pt8wsmeo.js → 0abhg-m1-acdb.js} +1 -1
- package/.next/static/chunks/0ae.1upy09t--.js +1 -0
- package/.next/static/chunks/0bvcd~k.vfro8.js +1 -0
- package/.next/static/chunks/{0g6.0r0i-wyeg.js → 0eqm47_oikj36.js} +1 -1
- package/.next/static/chunks/0fqugh~hv4my1.js +1 -0
- package/.next/static/chunks/0has04tc4mrik.js +1 -0
- package/.next/static/chunks/0huynm-qbj26k.js +1 -0
- package/.next/static/chunks/0ibq4zul6305p.js +1 -0
- package/.next/static/chunks/0jm_e6e6n~rdn.js +1 -0
- package/.next/static/chunks/0k0.4cksmybb2.js +1 -0
- package/.next/static/chunks/0l07yrtw3fxp5.js +1 -0
- package/.next/static/chunks/0nhqu-sq045x7.js +1 -0
- package/.next/static/chunks/0op3oc-if6n5-.js +3 -0
- package/.next/static/chunks/0p34n6.st3s~1.js +1 -0
- package/.next/static/chunks/0r8nosw42e2m9.js +1 -0
- package/.next/static/chunks/0shx3_mxukfhr.js +1 -0
- package/.next/static/chunks/0thm~t5g5adz1.js +1 -0
- package/.next/static/chunks/0thyr1cngc-j..css +1 -0
- package/.next/static/chunks/0ttdb_354lh4t.js +1 -0
- package/.next/static/chunks/0v..ut2v38yep.js +1 -0
- package/.next/static/chunks/{17npklzvg8-~3.js → 0vhj0k-zy6jhh.js} +1 -1
- package/.next/static/chunks/0wdx410~0~gmn.js +1 -0
- package/.next/static/chunks/0y3ptqa0bbi-h.js +1 -0
- package/.next/static/chunks/{0zbxi2grjtx.c.js → 0zx_~u_zxg_7e.js} +1 -1
- package/.next/static/chunks/{0f3kjzb~5zhc~.js → 10pq~97vgkzro.js} +1 -1
- package/.next/static/chunks/11hlk6.h1of0y.js +1 -0
- package/.next/static/chunks/13w_6v~nprp8j.js +11 -0
- package/.next/static/chunks/14-kkni6ecqaw.js +1 -0
- package/.next/static/chunks/{148a9fv~bo0gq.js → 1555iv~_t.1lp.js} +1 -1
- package/.next/static/chunks/{04bbme2th8s1_.js → 15ec5~pa1pv_z.js} +1 -1
- package/.next/static/chunks/15vc-857cdedi.js +1 -0
- package/.next/static/chunks/16zgco6hwlr-n.js +1 -0
- package/.next/types/routes.d.ts +5 -1
- package/.next/types/validator.ts +36 -0
- package/package.json +2 -2
- package/.next/server/chunks/ssr/[root-of-the-server]__02idks~._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__02idks~._.js.map +0 -1
- package/.next/server/chunks/ssr/_0-8__9s._.js +0 -3
- package/.next/server/chunks/ssr/_0-8__9s._.js.map +0 -1
- package/.next/server/chunks/ssr/_0._ysx3._.js.map +0 -1
- package/.next/server/chunks/ssr/_0.h-tj4._.js +0 -3
- package/.next/server/chunks/ssr/_0.h-tj4._.js.map +0 -1
- package/.next/server/chunks/ssr/_02g4o18._.js +0 -3
- package/.next/server/chunks/ssr/_02g4o18._.js.map +0 -1
- package/.next/server/chunks/ssr/_0463dg_._.js +0 -3
- package/.next/server/chunks/ssr/_0463dg_._.js.map +0 -1
- package/.next/server/chunks/ssr/_04a42pa._.js +0 -3
- package/.next/server/chunks/ssr/_04a42pa._.js.map +0 -1
- package/.next/server/chunks/ssr/_04kt9.8._.js +0 -3
- package/.next/server/chunks/ssr/_04kt9.8._.js.map +0 -1
- package/.next/server/chunks/ssr/_052zlig._.js +0 -3
- package/.next/server/chunks/ssr/_052zlig._.js.map +0 -1
- package/.next/server/chunks/ssr/_060itkv._.js +0 -3
- package/.next/server/chunks/ssr/_060itkv._.js.map +0 -1
- package/.next/server/chunks/ssr/_07p0n9g._.js +0 -3
- package/.next/server/chunks/ssr/_07p0n9g._.js.map +0 -1
- package/.next/server/chunks/ssr/_08mbdt1._.js +0 -3
- package/.next/server/chunks/ssr/_08mbdt1._.js.map +0 -1
- package/.next/server/chunks/ssr/_08r_qwd._.js +0 -3
- package/.next/server/chunks/ssr/_08r_qwd._.js.map +0 -1
- package/.next/server/chunks/ssr/_08xk3kp._.js +0 -3
- package/.next/server/chunks/ssr/_08xk3kp._.js.map +0 -1
- package/.next/server/chunks/ssr/_0938p.1._.js +0 -3
- package/.next/server/chunks/ssr/_0938p.1._.js.map +0 -1
- package/.next/server/chunks/ssr/_0afdsbz._.js +0 -3
- package/.next/server/chunks/ssr/_0afdsbz._.js.map +0 -1
- package/.next/server/chunks/ssr/_0ff5qav._.js +0 -3
- package/.next/server/chunks/ssr/_0ff5qav._.js.map +0 -1
- package/.next/server/chunks/ssr/_0gp8d.p._.js +0 -3
- package/.next/server/chunks/ssr/_0gp8d.p._.js.map +0 -1
- package/.next/server/chunks/ssr/_0k2j6-t._.js +0 -3
- package/.next/server/chunks/ssr/_0k2j6-t._.js.map +0 -1
- package/.next/server/chunks/ssr/_0mix09j._.js +0 -3
- package/.next/server/chunks/ssr/_0mix09j._.js.map +0 -1
- package/.next/server/chunks/ssr/_0mk7dqt._.js +0 -3
- package/.next/server/chunks/ssr/_0mk7dqt._.js.map +0 -1
- package/.next/server/chunks/ssr/_0n168uk._.js +0 -3
- package/.next/server/chunks/ssr/_0n168uk._.js.map +0 -1
- package/.next/server/chunks/ssr/_0nwg6lo._.js +0 -3
- package/.next/server/chunks/ssr/_0nwg6lo._.js.map +0 -1
- package/.next/server/chunks/ssr/_0pwd-nz._.js +0 -3
- package/.next/server/chunks/ssr/_0pwd-nz._.js.map +0 -1
- package/.next/server/chunks/ssr/_0rspzax._.js +0 -3
- package/.next/server/chunks/ssr/_0rspzax._.js.map +0 -1
- package/.next/server/chunks/ssr/_0t-2u_i._.js +0 -3
- package/.next/server/chunks/ssr/_0t-2u_i._.js.map +0 -1
- package/.next/server/chunks/ssr/_0vn5_62._.js +0 -5
- package/.next/server/chunks/ssr/_0vn5_62._.js.map +0 -1
- package/.next/server/chunks/ssr/_0yiz~s5._.js +0 -3
- package/.next/server/chunks/ssr/_0yiz~s5._.js.map +0 -1
- package/.next/server/chunks/ssr/_0~4ta0s._.js +0 -3
- package/.next/server/chunks/ssr/_0~4ta0s._.js.map +0 -1
- package/.next/server/chunks/ssr/_0~5r_8s._.js +0 -3
- package/.next/server/chunks/ssr/_0~5r_8s._.js.map +0 -1
- package/.next/server/chunks/ssr/_115_o9h._.js +0 -3
- package/.next/server/chunks/ssr/_115_o9h._.js.map +0 -1
- package/.next/server/chunks/ssr/_13mk_9n._.js +0 -3
- package/.next/server/chunks/ssr/_13mk_9n._.js.map +0 -1
- package/.next/server/chunks/ssr/packages_dashboard_src_07.4ogy._.js +0 -3
- package/.next/server/chunks/ssr/packages_dashboard_src_07.4ogy._.js.map +0 -1
- package/.next/static/chunks/00p2fat~wl7uz.js +0 -1
- package/.next/static/chunks/07aksg8x5r0d9.js +0 -1
- package/.next/static/chunks/082cjr-p4ubw7.js +0 -1
- package/.next/static/chunks/09hewwcw-ts34.js +0 -1
- package/.next/static/chunks/09j~fmfefj03i.js +0 -1
- package/.next/static/chunks/0adfy5uyh_8c8.js +0 -1
- package/.next/static/chunks/0agoryx~xvt31.js +0 -1
- package/.next/static/chunks/0aoci_z-c0ele.css +0 -1
- package/.next/static/chunks/0atsym5j2dgzw.js +0 -1
- package/.next/static/chunks/0b3tta7tnnbur.js +0 -1
- package/.next/static/chunks/0d02.lqlwe9a_.js +0 -1
- package/.next/static/chunks/0eqyosc.qae5n.js +0 -1
- package/.next/static/chunks/0kkrrex6qm68-.js +0 -1
- package/.next/static/chunks/0lfxqap3b6sar.js +0 -11
- package/.next/static/chunks/0ord2b6oqi.3g.js +0 -1
- package/.next/static/chunks/0rh-ee9ky1ybq.js +0 -1
- package/.next/static/chunks/0t5v~o90gn66f.js +0 -1
- package/.next/static/chunks/0vaymprggmdwi.js +0 -3
- package/.next/static/chunks/0x2vder5-rzy3.js +0 -1
- package/.next/static/chunks/0yk64vsbmwqd8.js +0 -1
- package/.next/static/chunks/0yvzj34_7s6kb.js +0 -1
- package/.next/static/chunks/104za._t2qmr8.js +0 -1
- package/.next/static/chunks/13pe2-ed6nel..js +0 -1
- package/.next/static/chunks/13zn61okwjlyn.js +0 -1
- package/.next/static/chunks/153hm0-366-at.js +0 -1
- package/.next/static/chunks/16k3_-6f7kx97.js +0 -1
- package/.next/static/chunks/18904zqns5ncn.js +0 -1
- package/.next/trace +0 -2
- package/.next/trace-build +0 -1
- /package/.next/server/chunks/{[root-of-the-server]__00gp8gz._.js.map → [root-of-the-server]__01knfi.._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__0-0wgko._.js.map → [root-of-the-server]__08_s4yo._.js.map} +0 -0
- /package/.next/static/{CDXVH-99b-ZdHz0Rd9pr_ → lsV2FU1YUtwJPmeiim7tk}/_buildManifest.js +0 -0
- /package/.next/static/{CDXVH-99b-ZdHz0Rd9pr_ → lsV2FU1YUtwJPmeiim7tk}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{CDXVH-99b-ZdHz0Rd9pr_ → lsV2FU1YUtwJPmeiim7tk}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,78406,e=>{"use strict";let a=(0,e.i(77379).default)("LockOpen",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 9.9-1",key:"1mm8w8"}]]);e.s(["Unlock",0,a],78406)},16995,e=>{"use strict";var a=e.i(54710),t=e.i(59546),r=e.i(76610),s=e.i(72740),n=e.i(75750),l=e.i(34416),i=e.i(48467),o=e.i(20014),d=e.i(8652),c=e.i(10427),u=e.i(65268),m=e.i(76176),p=e.i(57415),h=e.i(14260),x=e.i(95486);let f=e=>["backend-api-key",e];e.i(18446);var g=e.i(28619);function v(e,a){switch((0,g.defaultApiKeyProvider)(e)){case"anthropic":return(0,g.isPlausibleAnthropicApiKey)(a);case"openai":return(0,g.isPlausibleOpenAiApiKey)(a);case"google":return(0,g.isPlausibleGeminiApiKey)(a);default:return!1}}function k(e){switch((0,g.defaultApiKeyProvider)(e)){case"anthropic":return"Anthropic key — starts with `sk-ant-…`.";case"openai":return"OpenAI key — starts with `sk-…` (not `sk-ant-…`).";case"google":return"Google API key — starts with `AIza…`, 39 chars total.";default:return"API key"}}let y={anthropic:"Anthropic API key",bedrock:"Amazon Bedrock",vertex:"Google Vertex AI",foundry:"Microsoft Foundry",openai:"OpenAI API key","azure-openai":"Azure OpenAI",google:"Google API key","gemini-vertex":"Google Vertex AI"},b={anthropic:"Direct Anthropic API key (`sk-ant-…`). Stored in the OS keychain and mirrored to `ANTHROPIC_API_KEY`.",bedrock:"Anthropic models on Amazon Bedrock. Sets `CLAUDE_CODE_USE_BEDROCK=1` plus AWS credentials. Required: `AWS_REGION`.",vertex:"Anthropic models on Google Vertex AI. Sets `CLAUDE_CODE_USE_VERTEX=1` plus GCP project / region. Auth via Application Default Credentials or a service-account key file.",foundry:"Anthropic models on Microsoft Foundry. Sets `CLAUDE_CODE_USE_FOUNDRY=1` plus the Foundry resource (or full base URL). API key optional — falls back to Azure DefaultAzureCredential (`az login`).",openai:"OpenAI API key (`sk-…`). Stored in the keychain and mirrored to `OPENAI_API_KEY`.","azure-openai":"Codex CLI on Azure OpenAI. Daemon writes a managed `config.toml` to `<dataDir>/codex-home/` and points `CODEX_HOME` there — your personal `~/.codex/` is untouched. Sets `AZURE_OPENAI_API_KEY`. **Important:** the daemon spawns codex with `--model <id>` from the model registry, which Codex treats as the deployment name on Azure. Name your Azure deployments to match the model IDs shown on the /settings/models page (e.g. `gpt-5-codex`).",google:"Direct Gemini API key (`AIza…`). Mirrored to `GEMINI_API_KEY` + `GOOGLE_API_KEY`.","gemini-vertex":"Gemini on Google Vertex AI. Sets `GOOGLE_GENAI_USE_VERTEXAI=true` plus GCP project / location. Auth via ADC, a service-account key file, or a Vertex API key."};function j(e){let a=g.RECOMMENDED_PINNED_MODELS_BY_PROVIDER[e];return{defaultOpusModel:a.defaultOpusModel,defaultSonnetModel:a.defaultSonnetModel,defaultHaikuModel:a.defaultHaikuModel}}let C={useMantle:!1,mantleBaseUrl:"",skipMantleAuth:!1};function A(e){switch(e){case"anthropic":return{provider:"anthropic",apiKey:""};case"bedrock":return N("access_key");case"vertex":return{provider:"vertex",projectId:"",region:"",credentialsFile:"",vertexBaseUrl:"",...j("vertex")};case"foundry":return{provider:"foundry",endpointKind:"resource",resource:"",baseUrl:"",apiKey:"",...j("foundry")};case"openai":return{provider:"openai",apiKey:""};case"azure-openai":return{provider:"azure-openai",resource:"",apiKey:"",apiVersion:g.DEFAULT_AZURE_OPENAI_API_VERSION,deploymentName:""};case"google":return{provider:"google",apiKey:""};case"gemini-vertex":return I("adc")}}function N(e){let a={awsRegion:"",bedrockBaseUrl:"",...C,...j("bedrock")};switch(e){case"access_key":return{provider:"bedrock",authMode:"access_key",awsAccessKeyId:"",awsSecretAccessKey:"",awsSessionToken:"",...a};case"bearer_token":return{provider:"bedrock",authMode:"bearer_token",awsBearerTokenBedrock:"",...a};case"profile":return{provider:"bedrock",authMode:"profile",awsProfile:"",...a}}}function I(e){let a={projectId:"",location:""};switch(e){case"adc":return{provider:"gemini-vertex",authMode:"adc",...a};case"service_account":return{provider:"gemini-vertex",authMode:"service_account",credentialsFile:"",...a};case"api_key":return{provider:"gemini-vertex",authMode:"api_key",apiKey:"",...a}}}function w(e){let a={};return e.defaultOpusModel.trim()&&(a.defaultOpusModel=e.defaultOpusModel.trim()),e.defaultSonnetModel.trim()&&(a.defaultSonnetModel=e.defaultSonnetModel.trim()),e.defaultHaikuModel.trim()&&(a.defaultHaikuModel=e.defaultHaikuModel.trim()),a}function S(e){switch(e.provider){case"anthropic":if(!e.apiKey.trim())return null;return{provider:"anthropic",apiKey:e.apiKey.trim()};case"bedrock":{let a=e.awsRegion.trim();if(!a)return null;let t=e.bedrockBaseUrl.trim(),r=t?{bedrockBaseUrl:t}:{},s={...e.useMantle?{useMantle:!0}:{},...e.mantleBaseUrl.trim()?{mantleBaseUrl:e.mantleBaseUrl.trim()}:{},...e.skipMantleAuth?{skipMantleAuth:!0}:{}},n=w(e);switch(e.authMode){case"access_key":if(!e.awsAccessKeyId.trim()||!e.awsSecretAccessKey.trim())break;return{provider:"bedrock",authMode:"access_key",awsAccessKeyId:e.awsAccessKeyId.trim(),awsSecretAccessKey:e.awsSecretAccessKey.trim(),...e.awsSessionToken.trim()?{awsSessionToken:e.awsSessionToken.trim()}:{},awsRegion:a,...r,...s,...n};case"bearer_token":if(!e.awsBearerTokenBedrock.trim())break;return{provider:"bedrock",authMode:"bearer_token",awsBearerTokenBedrock:e.awsBearerTokenBedrock.trim(),awsRegion:a,...r,...s,...n};case"profile":if(!e.awsProfile.trim())break;return{provider:"bedrock",authMode:"profile",awsProfile:e.awsProfile.trim(),awsRegion:a,...r,...s,...n}}return null}case"vertex":if(!e.projectId.trim()||!e.region.trim())return null;return{provider:"vertex",projectId:e.projectId.trim(),region:e.region.trim(),...e.credentialsFile.trim()?{credentialsFile:e.credentialsFile.trim()}:{},...e.vertexBaseUrl.trim()?{vertexBaseUrl:e.vertexBaseUrl.trim()}:{},...w(e)};case"foundry":{let a=e.resource.trim(),t=e.baseUrl.trim(),r=e.apiKey.trim(),s=w(e);if("resource"===e.endpointKind){if(!a)return null;return{provider:"foundry",resource:a,...r?{apiKey:r}:{},...s}}if(!t)return null;return{provider:"foundry",baseUrl:t,...r?{apiKey:r}:{},...s}}case"openai":if(!e.apiKey.trim())return null;return{provider:"openai",apiKey:e.apiKey.trim()};case"azure-openai":{let a=e.resource.trim(),t=e.apiKey.trim();if(!a||!t)return null;return{provider:"azure-openai",resource:a,apiKey:t,...e.apiVersion.trim()?{apiVersion:e.apiVersion.trim()}:{},...e.deploymentName.trim()?{deploymentName:e.deploymentName.trim()}:{}}}case"google":if(!e.apiKey.trim())return null;return{provider:"google",apiKey:e.apiKey.trim()};case"gemini-vertex":{let a=e.projectId.trim(),t=e.location.trim();if(!a||!t)return null;switch(e.authMode){case"adc":return{provider:"gemini-vertex",authMode:"adc",projectId:a,location:t};case"service_account":if(!e.credentialsFile.trim())break;return{provider:"gemini-vertex",authMode:"service_account",projectId:a,location:t,credentialsFile:e.credentialsFile.trim()};case"api_key":if(!e.apiKey.trim())break;return{provider:"gemini-vertex",authMode:"api_key",projectId:a,location:t,apiKey:e.apiKey.trim()}}return null}}}function E(e){return"anthropic"===e||"openai"===e||"google"===e}function _({backendId:e,draft:t,onChange:r,disabled:s}){switch(t.provider){case"anthropic":case"openai":case"google":return(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)(d.Input,{type:"password",autoComplete:"off",spellCheck:!1,placeholder:k(e),value:t.apiKey,onChange:e=>r({...t,apiKey:e.target.value}),disabled:s,"aria-label":`${y[t.provider]} API key`}),(0,a.jsx)("p",{className:"text-[11px] text-muted-foreground",children:k(e)})]});case"bedrock":return(0,a.jsx)(M,{draft:t,onChange:r,disabled:s});case"vertex":return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"grid gap-2 sm:grid-cols-2",children:[(0,a.jsx)(O,{label:"GCP project id",children:(0,a.jsx)(d.Input,{autoComplete:"off",spellCheck:!1,placeholder:"my-gcp-project",value:t.projectId,onChange:e=>r({...t,projectId:e.target.value}),disabled:s})}),(0,a.jsx)(O,{label:"Vertex region",hint:"`global`, a multi-region (`us`, `eu`), or a region (e.g. `us-east5`).",children:(0,a.jsx)(d.Input,{autoComplete:"off",spellCheck:!1,placeholder:"us-east5",value:t.region,onChange:e=>r({...t,region:e.target.value}),disabled:s})})]}),(0,a.jsx)(O,{label:"Service account key file path (optional)",hint:"Absolute path to a service-account JSON file. Leave blank to use Application Default Credentials (`gcloud auth application-default login`).",children:(0,a.jsx)(d.Input,{autoComplete:"off",spellCheck:!1,placeholder:"/Users/me/keys/sa.json",value:t.credentialsFile,onChange:e=>r({...t,credentialsFile:e.target.value}),disabled:s})}),(0,a.jsx)(O,{label:"Vertex base URL (optional)",hint:"Override for custom endpoints / gateways.",children:(0,a.jsx)(d.Input,{autoComplete:"off",spellCheck:!1,placeholder:"https://aiplatform.googleapis.com",value:t.vertexBaseUrl,onChange:e=>r({...t,vertexBaseUrl:e.target.value}),disabled:s})}),(0,a.jsx)(P,{draft:t,onChange:r,disabled:s})]});case"foundry":return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("span",{className:"text-xs font-medium text-foreground",children:"Endpoint"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsxs)(c.Select,{value:t.endpointKind,onValueChange:e=>r({...t,endpointKind:e}),children:[(0,a.jsx)(c.SelectTrigger,{className:"w-44",children:(0,a.jsx)(c.SelectValue,{})}),(0,a.jsxs)(c.SelectContent,{children:[(0,a.jsx)(c.SelectItem,{value:"resource",children:"Resource name"}),(0,a.jsx)(c.SelectItem,{value:"base_url",children:"Full base URL"})]})]}),"resource"===t.endpointKind?(0,a.jsx)(d.Input,{autoComplete:"off",spellCheck:!1,placeholder:"my-foundry-resource",value:t.resource,onChange:e=>r({...t,resource:e.target.value}),disabled:s}):(0,a.jsx)(d.Input,{autoComplete:"off",spellCheck:!1,placeholder:"https://my-foundry-resource.services.ai.azure.com/anthropic",value:t.baseUrl,onChange:e=>r({...t,baseUrl:e.target.value}),disabled:s})]}),(0,a.jsx)("p",{className:"text-[11px] text-muted-foreground",children:"Resource name is the simpler form; base URL is for custom gateways. Set exactly one."})]}),(0,a.jsx)(O,{label:"Foundry API key (optional)",hint:"Leave blank to use Azure DefaultAzureCredential (`az login`, managed identity, etc.).",children:(0,a.jsx)(d.Input,{type:"password",autoComplete:"off",spellCheck:!1,value:t.apiKey,onChange:e=>r({...t,apiKey:e.target.value}),disabled:s})}),(0,a.jsx)(P,{draft:t,onChange:r,disabled:s})]});case"azure-openai":return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"rounded-md border border-amber-500/40 bg-amber-500/5 p-2 text-[11px] text-amber-700 dark:text-amber-400",children:[(0,a.jsx)("strong",{children:"Deployment-name alignment required."})," The daemon spawns codex with ",(0,a.jsx)("code",{children:"--model <id>"})," from the process-routing registry, which Codex treats as the Azure deployment name. Name your Azure deployments to match the model IDs configured on the ",(0,a.jsx)("code",{children:"/settings/models"})," ","page (e.g. ",(0,a.jsx)("code",{children:"gpt-5-codex"}),"). Renaming the deployment in Azure is the supported fix."]}),(0,a.jsxs)("div",{className:"grid gap-2 sm:grid-cols-2",children:[(0,a.jsx)(O,{label:"Azure resource name",hint:"The Foundry/Azure-OpenAI resource name (subdomain of `*.openai.azure.com`).",children:(0,a.jsx)(d.Input,{autoComplete:"off",spellCheck:!1,placeholder:"my-azure-resource",value:t.resource,onChange:e=>r({...t,resource:e.target.value}),disabled:s})}),(0,a.jsx)(O,{label:"Azure OpenAI API key",children:(0,a.jsx)(d.Input,{type:"password",autoComplete:"off",spellCheck:!1,value:t.apiKey,onChange:e=>r({...t,apiKey:e.target.value}),disabled:s})}),(0,a.jsx)(O,{label:"API version",hint:"Azure OpenAI API version (Codex uses the `responses` wire API).",children:(0,a.jsx)(d.Input,{autoComplete:"off",spellCheck:!1,value:t.apiVersion,onChange:e=>r({...t,apiVersion:e.target.value}),disabled:s})}),(0,a.jsx)(O,{label:"Default deployment name (optional)",hint:"Falls back when the daemon does not pass --model. Most invocations override this via --model from the routing registry — see warning above.",children:(0,a.jsx)(d.Input,{autoComplete:"off",spellCheck:!1,placeholder:"gpt-5-codex",value:t.deploymentName,onChange:e=>r({...t,deploymentName:e.target.value}),disabled:s})})]})]});case"gemini-vertex":return(0,a.jsx)(K,{draft:t,onChange:r,disabled:s})}}function M({draft:e,onChange:t,disabled:r}){return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("span",{className:"text-xs font-medium text-foreground",children:"AWS authentication"}),(0,a.jsxs)(c.Select,{value:e.authMode,onValueChange:a=>{a!==e.authMode&&t(N(a))},children:[(0,a.jsx)(c.SelectTrigger,{className:"w-full",children:(0,a.jsx)(c.SelectValue,{})}),(0,a.jsxs)(c.SelectContent,{children:[(0,a.jsx)(c.SelectItem,{value:"access_key",children:"Access key id + secret"}),(0,a.jsx)(c.SelectItem,{value:"bearer_token",children:"Bedrock API key (`AWS_BEARER_TOKEN_BEDROCK`)"}),(0,a.jsx)(c.SelectItem,{value:"profile",children:"AWS profile (`~/.aws/config`)"})]})]})]}),"access_key"===e.authMode&&(0,a.jsxs)("div",{className:"grid gap-2 sm:grid-cols-2",children:[(0,a.jsx)(O,{label:"AWS access key id",hint:"`AKIA…` for IAM users; `ASIA…` for STS / Identity Center.",children:(0,a.jsx)(d.Input,{autoComplete:"off",spellCheck:!1,placeholder:"AKIAIOSFODNN7EXAMPLE",value:e.awsAccessKeyId,onChange:a=>t({...e,awsAccessKeyId:a.target.value}),disabled:r})}),(0,a.jsx)(O,{label:"AWS secret access key",children:(0,a.jsx)(d.Input,{type:"password",autoComplete:"off",spellCheck:!1,value:e.awsSecretAccessKey,onChange:a=>t({...e,awsSecretAccessKey:a.target.value}),disabled:r})}),(0,a.jsx)(O,{label:"AWS session token (optional)",hint:"Required for STS / Identity Center temporary credentials.",children:(0,a.jsx)(d.Input,{type:"password",autoComplete:"off",spellCheck:!1,value:e.awsSessionToken,onChange:a=>t({...e,awsSessionToken:a.target.value}),disabled:r})})]}),"bearer_token"===e.authMode&&(0,a.jsx)(O,{label:"Bedrock API key",hint:"See AWS docs: 'Bedrock API keys' for how to issue one.",children:(0,a.jsx)(d.Input,{type:"password",autoComplete:"off",spellCheck:!1,value:e.awsBearerTokenBedrock,onChange:a=>t({...e,awsBearerTokenBedrock:a.target.value}),disabled:r})}),"profile"===e.authMode&&(0,a.jsx)(O,{label:"AWS profile name",hint:"Resolves credentials from `~/.aws/config` and `~/.aws/credentials`.",children:(0,a.jsx)(d.Input,{autoComplete:"off",spellCheck:!1,placeholder:"default",value:e.awsProfile,onChange:a=>t({...e,awsProfile:a.target.value}),disabled:r})}),(0,a.jsxs)("div",{className:"grid gap-2 sm:grid-cols-2",children:[(0,a.jsx)(O,{label:"AWS region",hint:"Required by Claude Code regardless of auth mode.",children:(0,a.jsx)(d.Input,{autoComplete:"off",spellCheck:!1,placeholder:"us-east-1",value:e.awsRegion,onChange:a=>t({...e,awsRegion:a.target.value}),disabled:r})}),(0,a.jsx)(O,{label:"Bedrock base URL (optional)",hint:"Override for VPC endpoints / gateways.",children:(0,a.jsx)(d.Input,{autoComplete:"off",spellCheck:!1,placeholder:"https://bedrock-runtime.us-east-1.amazonaws.com",value:e.bedrockBaseUrl,onChange:a=>t({...e,bedrockBaseUrl:a.target.value}),disabled:r})})]}),(0,a.jsxs)("details",{className:"rounded-md border border-border p-2 text-xs",children:[(0,a.jsx)("summary",{className:"cursor-pointer font-medium text-foreground",children:"Mantle endpoint (advanced)"}),(0,a.jsxs)("div",{className:"mt-2 space-y-2",children:[(0,a.jsx)("p",{className:"text-[11px] text-muted-foreground",children:"Mantle is an alternate Bedrock endpoint that uses the native Anthropic API shape. Setting this alongside the standard Invoke API lets Claude Code route per model. Most operators should leave this off."}),(0,a.jsxs)("label",{className:"flex items-center gap-2 text-xs text-foreground",children:[(0,a.jsx)("input",{type:"checkbox",checked:e.useMantle,onChange:a=>t({...e,useMantle:a.target.checked}),disabled:r}),"Enable Mantle endpoint (`CLAUDE_CODE_USE_MANTLE=1`)"]}),(0,a.jsx)(O,{label:"Mantle base URL (optional)",hint:"Override the default Mantle endpoint URL.",children:(0,a.jsx)(d.Input,{autoComplete:"off",spellCheck:!1,value:e.mantleBaseUrl,onChange:a=>t({...e,mantleBaseUrl:a.target.value}),disabled:r||!e.useMantle})}),(0,a.jsxs)("label",{className:"flex items-center gap-2 text-xs text-foreground",children:[(0,a.jsx)("input",{type:"checkbox",checked:e.skipMantleAuth,onChange:a=>t({...e,skipMantleAuth:a.target.checked}),disabled:r||!e.useMantle}),"Skip client-side auth (gateway injects credentials)"]})]})]}),(0,a.jsx)(P,{draft:e,onChange:t,disabled:r})]})}function P({draft:e,onChange:t,disabled:r}){let s=a=>{t({...e,...a})};return(0,a.jsxs)("details",{className:"rounded-md border border-border p-2 text-xs",children:[(0,a.jsx)("summary",{className:"cursor-pointer font-medium text-foreground",children:"Pinned model IDs (recommended)"}),(0,a.jsxs)("div",{className:"mt-2 space-y-2",children:[(0,a.jsx)("p",{className:"text-[11px] text-muted-foreground",children:"Pinning prevents the `sonnet`/`opus`/`haiku` aliases from resolving to a model not yet enabled in your cloud account. Pre-filled with Anthropic's recommended defaults — edit only if your account is on a different model tier."}),(0,a.jsx)(O,{label:"Opus model ID (`ANTHROPIC_DEFAULT_OPUS_MODEL`)",children:(0,a.jsx)(d.Input,{autoComplete:"off",spellCheck:!1,value:e.defaultOpusModel,onChange:e=>s({defaultOpusModel:e.target.value}),disabled:r})}),(0,a.jsx)(O,{label:"Sonnet model ID (`ANTHROPIC_DEFAULT_SONNET_MODEL`)",children:(0,a.jsx)(d.Input,{autoComplete:"off",spellCheck:!1,value:e.defaultSonnetModel,onChange:e=>s({defaultSonnetModel:e.target.value}),disabled:r})}),(0,a.jsx)(O,{label:"Haiku model ID (`ANTHROPIC_DEFAULT_HAIKU_MODEL`)",children:(0,a.jsx)(d.Input,{autoComplete:"off",spellCheck:!1,value:e.defaultHaikuModel,onChange:e=>s({defaultHaikuModel:e.target.value}),disabled:r})})]})]})}function K({draft:e,onChange:t,disabled:r}){return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"grid gap-2 sm:grid-cols-2",children:[(0,a.jsx)(O,{label:"GCP project id",children:(0,a.jsx)(d.Input,{autoComplete:"off",spellCheck:!1,placeholder:"my-gcp-project",value:e.projectId,onChange:a=>t({...e,projectId:a.target.value}),disabled:r})}),(0,a.jsx)(O,{label:"GCP location",hint:"e.g. `us-central1`",children:(0,a.jsx)(d.Input,{autoComplete:"off",spellCheck:!1,placeholder:"us-central1",value:e.location,onChange:a=>t({...e,location:a.target.value}),disabled:r})})]}),(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("span",{className:"text-xs font-medium text-foreground",children:"Authentication"}),(0,a.jsxs)(c.Select,{value:e.authMode,onValueChange:a=>{a!==e.authMode&&t(I(a))},children:[(0,a.jsx)(c.SelectTrigger,{className:"w-full",children:(0,a.jsx)(c.SelectValue,{})}),(0,a.jsxs)(c.SelectContent,{children:[(0,a.jsx)(c.SelectItem,{value:"adc",children:"Application Default Credentials (`gcloud auth`)"}),(0,a.jsx)(c.SelectItem,{value:"service_account",children:"Service-account JSON file path"}),(0,a.jsx)(c.SelectItem,{value:"api_key",children:"Vertex API key"})]})]})]}),"service_account"===e.authMode&&(0,a.jsx)(O,{label:"Service account key file path",children:(0,a.jsx)(d.Input,{autoComplete:"off",spellCheck:!1,placeholder:"/Users/me/keys/sa.json",value:e.credentialsFile,onChange:a=>t({...e,credentialsFile:a.target.value}),disabled:r})}),"api_key"===e.authMode&&(0,a.jsx)(O,{label:"Vertex API key",hint:"`AIza…`. Distinct from a direct Gemini API key — it goes to GOOGLE_API_KEY only and routes through Vertex.",children:(0,a.jsx)(d.Input,{type:"password",autoComplete:"off",spellCheck:!1,value:e.apiKey,onChange:a=>t({...e,apiKey:a.target.value}),disabled:r})})]})}function O({label:e,hint:t,children:r}){return(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("span",{className:"text-xs font-medium text-foreground",children:e}),r,t&&(0,a.jsx)("p",{className:"text-[11px] text-muted-foreground",children:t})]})}e.s(["BackendApiKeyPanel",0,function({backendId:e,onToast:d}){let j,C,{data:N,isLoading:I,error:w}=(0,h.useQuery)({queryKey:f(e),queryFn:()=>u.api.get(`/backends/${e}/api-key`),staleTime:3e4}),M=(j=(0,x.useQueryClient)(),(0,p.useMutation)({mutationFn:a=>u.api.put(`/backends/${e}/api-key`,a),onSuccess:()=>{j.invalidateQueries({queryKey:f(e)}),j.invalidateQueries({queryKey:["backends"]})}})),P=(C=(0,x.useQueryClient)(),(0,p.useMutation)({mutationFn:()=>u.api.delete(`/backends/${e}/api-key`),onSuccess:()=>{C.invalidateQueries({queryKey:f(e)}),C.invalidateQueries({queryKey:["backends"]})}})),K=(0,l.useMemo)(()=>N?.availableProviders??function(e){switch(e){case"claude":return["anthropic","bedrock","vertex","foundry"];case"codex":return["openai","azure-openai"];case"gemini":return["google","gemini-vertex"]}}(e),[N?.availableProviders,e]),O=K.length>1,[B,D]=(0,l.useState)(null),R=B??N?.provider??K[0],[L,T]=(0,l.useState)(()=>A(R)),[U,z]=(0,l.useState)(null),V=N?.source??"none",F=N?.configured??!1,$=N?.provider??null,G=N?.envVarNames??function(e){switch(e){case"claude":return["ANTHROPIC_API_KEY"];case"codex":return["OPENAI_API_KEY"];case"gemini":return["GEMINI_API_KEY","GOOGLE_API_KEY"]}}(e),H=M.isPending,Y=P.isPending,q=async()=>{let a;if(z(null),E(R)){let t="apiKey"in L?L.apiKey.trim():"";if(!v(e,t))return void z({kind:"error",message:k(e)});a={apiKey:t}}else{let e=S(L);if(!e)return void z({kind:"error",message:"Fill in all required fields for this provider."});a={config:e}}try{let t=await M.mutateAsync(a);T(A(R));let r=t.auth?.detail??null,s=t.provider?y[t.provider]:m.BACKEND_PROVIDER_LABELS[e];if(t.auth?.ok){let e=r?`Saved (${s}) — ${r}`:`Saved (${s}).`;z({kind:"success",message:e}),d?.("success",`${s} configured.`)}else{let e=r?`Saved (${s}), but the provider rejected it — ${r}`:`Saved (${s}), but the provider probe did not succeed.`;z({kind:"error",message:e}),d?.("error",e)}}catch(a){let e=a instanceof u.ApiError||a instanceof Error?a.message:"Failed to save provider config";z({kind:"error",message:e}),d?.("error",e)}},W=async()=>{z(null);try{let a=await P.mutateAsync(),t="shell"===a.source?"Cleared from keychain — falling back to the shell-set env var.":"Cleared from keychain — backend will use CLI / OAuth auth.";z({kind:"success",message:t}),d?.("success",`${m.BACKEND_PROVIDER_LABELS[e]} provider config cleared.`)}catch(a){let e=a instanceof u.ApiError||a instanceof Error?a.message:"Failed to clear provider config";z({kind:"error",message:e}),d?.("error",e)}},Q=E(R)?function(e){if(e.saving)return!1;let a=e.draftValue.trim();return!!a&&v(e.backendId,a)}({backendId:e,draftValue:"apiKey"in L?L.apiKey:"",saving:H}):function(e){if(e.saving)return!1;let a=S(e.draft);return!!a&&null===(0,g.validateBackendApiKeyConfigFormat)(e.backendId,a)}({backendId:e,draft:L,saving:H});return(0,a.jsxs)("div",{className:"space-y-3 rounded-xl border border-border bg-card p-4 shadow-sm",children:[(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)(r.KeyRound,{className:"h-4 w-4 text-muted-foreground"}),(0,a.jsxs)("h3",{className:"text-sm font-semibold text-foreground",children:["Provider auth",(0,a.jsx)("span",{className:"ml-2 text-xs font-normal text-muted-foreground",children:"(optional)"})]}),F&&(0,a.jsx)(i.Badge,{variant:"keychain"===V?"green":"gray",children:"keychain"===V?`Saved${$?` (${y[$]})`:""}`:"From shell"})]}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:I?"Loading…":w?"Could not read provider config from the daemon.":function(e){switch(e){case"keychain":return"API key configured (stored in OS keychain).";case"shell":return"Using API key from shell environment. Save a key here to override.";case"none":return"No API key configured. Falling back to CLI login / OAuth."}}(V)}),(0,a.jsx)("p",{className:"text-[11px] text-muted-foreground",children:"Stored in the OS keychain. Leave blank to skip — the daemon falls back to local CLI / OAuth auth or your shell-set env vars."})]}),O&&(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("label",{htmlFor:`${e}-provider`,className:"text-xs font-medium text-foreground",children:"Provider"}),(0,a.jsxs)(c.Select,{value:R,onValueChange:e=>{e===R||K.includes(e)&&(D(e),T(A(e)),z(null))},children:[(0,a.jsx)(c.SelectTrigger,{id:`${e}-provider`,className:"w-full",children:(0,a.jsx)(c.SelectValue,{})}),(0,a.jsx)(c.SelectContent,{children:K.map(e=>(0,a.jsx)(c.SelectItem,{value:e,children:y[e]},e))})]}),(0,a.jsx)("p",{className:"text-[11px] text-muted-foreground",children:b[R]})]}),(0,a.jsx)(_,{backendId:e,draft:L,onChange:T,disabled:H||Y}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsxs)(o.Button,{size:"sm",onClick:()=>{q()},disabled:!Q,className:"gap-2",children:[H?(0,a.jsx)(s.Loader2,{className:"h-3.5 w-3.5 animate-spin"}):null,F&&"keychain"===V?"Update provider":"Save provider"]}),"keychain"===V&&(0,a.jsxs)(o.Button,{size:"sm",variant:"outline",onClick:()=>{W()},disabled:H||Y,className:"gap-2",children:[Y?(0,a.jsx)(s.Loader2,{className:"h-3.5 w-3.5 animate-spin"}):null,"Clear"]}),!O&&(0,a.jsxs)("span",{className:"text-[11px] text-muted-foreground",children:["Sets ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:G.join(" / ")})]})]}),U&&(0,a.jsxs)("div",{role:"status",className:`flex items-start gap-2 rounded-md border p-2 text-xs ${"success"===U.kind?"border-green-500/30 bg-green-500/5 text-green-700 dark:text-green-400":"border-red-500/30 bg-red-500/5 text-red-600 dark:text-red-400"}`,children:["success"===U.kind?(0,a.jsx)(t.CheckCircle2,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}):(0,a.jsx)(n.XCircle,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),(0,a.jsx)("span",{children:U.message})]})]})}],16995)},17975,6131,e=>{"use strict";var a=e.i(54710),t=e.i(59546),r=e.i(72740),s=e.i(12077),n=e.i(75750),l=e.i(48467),i=e.i(20014),o=e.i(81471),d=e.i(76176),c=e.i(10628);let u={ok:{variant:"green",label:"OK",icon:"✅"},expiring_soon:{variant:"amber",label:"Expiring Soon",icon:"🟡"},expired:{variant:"red",label:"Expired",icon:"🔴"},missing:{variant:"gray",label:"Missing",icon:"⚫"},recovering:{variant:"blue",label:"Recovering",icon:"🔄"},unknown:{variant:"gray",label:"Unknown",icon:"❓"}};function m({status:e,detail:t,firstExpiredAt:s,lastSuccessAt:n,notificationCount:i}){let d=e in u?e:"error"===e?"expired":"unknown",p=u[d],h="expired"===d||"missing"===d,x=h&&s?` (${function(e){let a=Math.floor((Date.now()-(0,o.parseUtcDate)(e).getTime())/6e4);if(a<60)return`${a}m`;let t=Math.floor(a/60);if(t<24)return`${t}h`;let r=Math.floor(t/24);return`${r}d`}(s)})`:"",f=[];return f.push(`Status: ${p.label}`),t&&f.push(`Detail: ${t}`),s&&h&&f.push(`Failed since: ${(0,o.formatRelativeTime)(s)}`),n&&f.push(`Last success: ${(0,o.formatRelativeTime)(n)}`),i>0&&f.push(`Notifications sent: ${i}`),(0,a.jsxs)(c.Tooltip,{children:[(0,a.jsx)(c.TooltipTrigger,{asChild:!0,children:(0,a.jsx)("span",{children:(0,a.jsxs)(l.Badge,{variant:p.variant,className:"gap-1",children:["recovering"===d?(0,a.jsx)(r.Loader2,{className:"h-3 w-3 animate-spin"}):null,"Auth: ",p.label,x]})})}),(0,a.jsx)(c.TooltipContent,{side:"bottom",className:"max-w-xs",children:(0,a.jsx)("div",{className:"space-y-0.5 text-xs",children:f.map((e,t)=>(0,a.jsx)("p",{children:e},t))})})]})}var p=e.i(34416),h=e.i(95486);let x=(0,e.i(77379).default)("ClipboardCopy",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2",key:"4jdomd"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v4",key:"3hqy98"}],["path",{d:"M21 14H11",key:"1bme5i"}],["path",{d:"m15 10-4 4 4 4",key:"5dvupr"}]]);var f=e.i(88175),g=e.i(52387),v=e.i(59134),k=e.i(10427),y=e.i(65268);function b({backendId:e,cliInstalled:l,compact:o=!1,onInstalled:c}){let u=(0,h.useQueryClient)(),[m,j]=(0,p.useState)(null),[C,A]=(0,p.useState)(!1),[N,I]=(0,p.useState)(""),[w,S]=(0,p.useState)(!1),[E,_]=(0,p.useState)(null),[M,P]=(0,p.useState)(null),[K,O]=(0,p.useState)(!1),B=(0,p.useCallback)(async()=>{if(!l){A(!0);try{let a=(await y.api.get("/backends/install-methods")).backends[e];j(a);let t=a.methods.find(e=>e.available);t&&I(t.id)}catch(e){P(e instanceof Error?e.message:"Failed to fetch install methods")}finally{A(!1)}}},[e,l]);(0,p.useEffect)(()=>{l||B()},[l,B]);let D=async()=>{if(N){S(!0),_(null),P(null);try{let a=await y.api.post(`/backends/${e}/install`,{method:N});_(a),a.ok&&a.cliInstalled&&(await u.invalidateQueries({queryKey:["backends"]}),c?.())}catch(e){P(e instanceof Error?e.message:"Install failed")}finally{S(!1)}}},R=async e=>{try{await navigator.clipboard.writeText(e),O(!0),setTimeout(()=>O(!1),2e3)}catch{}},L=()=>{_(null),P(null),B(),u.invalidateQueries({queryKey:["backends"]})},T=m?.docsUrl,U=d.BACKEND_LABELS[e];if(!1!==l&&!E?.ok)return o?null:!0===l?(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600 dark:text-green-400",children:[(0,a.jsx)(t.CheckCircle2,{className:"h-4 w-4"}),(0,a.jsxs)("span",{children:[U," CLI is installed and ready"]})]}):null;if(C)return(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,a.jsx)(r.Loader2,{className:"h-4 w-4 animate-spin"}),(0,a.jsx)("span",{children:"Detecting available install methods..."})]});let z=m?.methods??[],V=z.filter(e=>e.available),F=z.find(e=>e.id===N),$=F?.manualOnly??!1,G=V.filter(e=>e.id!==N);return E?.ok?(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600 dark:text-green-400",children:[(0,a.jsx)(t.CheckCircle2,{className:"h-4 w-4"}),(0,a.jsxs)("span",{children:[U," CLI installed successfully"]})]}),!o&&(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"Proceed to verify authentication below to confirm your credentials are working."})]}):(0,a.jsxs)("div",{className:o?"space-y-2":"space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-amber-600 dark:text-amber-400",children:[(0,a.jsx)(f.Download,{className:"h-4 w-4 shrink-0"}),(0,a.jsxs)("span",{children:[U," CLI is not installed"]})]}),!o&&(0,a.jsxs)("p",{className:"text-xs text-muted-foreground",children:["The ",U," CLI must be installed on this machine for the agent to use it as a backend. Choose an install method below, or install manually in your terminal."]}),V.length>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:o?"flex items-center gap-2":"space-y-2",children:[(0,a.jsxs)(k.Select,{value:N,onValueChange:I,children:[(0,a.jsx)(k.SelectTrigger,{className:o?"w-[200px]":"w-full",children:(0,a.jsx)(k.SelectValue,{placeholder:"Choose install method"})}),(0,a.jsx)(k.SelectContent,{children:z.map(e=>(0,a.jsxs)(k.SelectItem,{value:e.id,disabled:!e.available,children:[e.label,!e.available&&" (not available)"]},e.id))})]}),$?(0,a.jsxs)(i.Button,{size:o?"sm":"default",variant:"outline",onClick:()=>F&&R(F.command),disabled:!N,className:"gap-2 shrink-0",children:[K?(0,a.jsx)(t.CheckCircle2,{className:"h-3.5 w-3.5 text-green-500"}):(0,a.jsx)(x,{className:"h-3.5 w-3.5"}),K?"Copied!":"Copy Command"]}):(0,a.jsxs)(i.Button,{size:o?"sm":"default",variant:"outline",onClick:D,disabled:w||!N||!F?.available,className:"gap-2 shrink-0",children:[w?(0,a.jsx)(r.Loader2,{className:"h-3.5 w-3.5 animate-spin"}):(0,a.jsx)(s.Terminal,{className:"h-3.5 w-3.5"}),w?"Installing...":"Install"]})]}),F&&!o&&(0,a.jsxs)("div",{className:"rounded-md bg-muted/50 px-3 py-2",children:[(0,a.jsx)("p",{className:"mb-1 text-[10px] font-medium uppercase tracking-wider text-muted-foreground/60",children:$?"Run this command in your terminal":"Command to run"}),(0,a.jsxs)("code",{className:"text-xs text-muted-foreground",children:["$ ",F.command]})]}),$&&!o&&(0,a.jsxs)("p",{className:"text-xs text-muted-foreground",children:["This method requires you to run the command in your own terminal (it may need elevated permissions). After installing, click"," ",(0,a.jsx)("strong",{children:"Retry Detection"})," to verify."]}),$&&(0,a.jsxs)(i.Button,{size:"sm",variant:"outline",onClick:L,className:"gap-1.5",children:[(0,a.jsx)(v.RefreshCw,{className:"h-3 w-3"}),"Retry Detection"]})]}):(0,a.jsxs)("div",{className:"space-y-2 rounded-md border border-amber-200 bg-amber-50/50 p-3 dark:border-amber-900 dark:bg-amber-950/30",children:[(0,a.jsx)("p",{className:"text-xs font-medium text-amber-800 dark:text-amber-200",children:"No supported package manager was detected on this system."}),(0,a.jsx)("p",{className:"text-xs text-amber-700 dark:text-amber-300",children:"Please install the CLI manually in your terminal:"}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"flex-1 rounded bg-muted px-2.5 py-1.5",children:(0,a.jsxs)("code",{className:"text-xs",children:["npm install -g"," ","claude"===e?"@anthropic-ai/claude-code":"codex"===e?"@openai/codex":"@google/gemini-cli"]})}),(0,a.jsx)(i.Button,{size:"sm",variant:"ghost",onClick:()=>R(`npm install -g ${"claude"===e?"@anthropic-ai/claude-code":"codex"===e?"@openai/codex":"@google/gemini-cli"}`),className:"shrink-0",children:K?(0,a.jsx)(t.CheckCircle2,{className:"h-3.5 w-3.5 text-green-500"}):(0,a.jsx)(x,{className:"h-3.5 w-3.5"})})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 pt-1",children:[(0,a.jsxs)(i.Button,{size:"sm",variant:"outline",onClick:L,className:"gap-1.5",children:[(0,a.jsx)(v.RefreshCw,{className:"h-3 w-3"}),"Retry Detection"]}),T&&(0,a.jsxs)("a",{href:T,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs text-amber-700 underline hover:text-amber-900 dark:text-amber-300 dark:hover:text-amber-100",children:[(0,a.jsx)(g.ExternalLink,{className:"h-3 w-3"}),"Official installation guide"]})]})]}),E&&!E.ok&&(0,a.jsxs)("div",{className:"space-y-2 rounded-md border border-red-200 bg-red-50/50 p-3 dark:border-red-900 dark:bg-red-950/30",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium text-red-700 dark:text-red-300",children:[(0,a.jsx)(n.XCircle,{className:"h-4 w-4 shrink-0"}),(0,a.jsx)("span",{children:E.timedOut?"Installation timed out (5 min limit)":`Installation failed (exit code ${E.exitCode})`})]}),E.stderr&&(0,a.jsx)("pre",{className:"max-h-32 overflow-auto rounded bg-red-100/50 p-2 text-xs text-red-800 dark:bg-red-950/50 dark:text-red-200",children:E.stderr.slice(-1500)}),(0,a.jsxs)("div",{className:"space-y-1 text-xs text-red-700 dark:text-red-300",children:[G.length>0&&(0,a.jsxs)("p",{children:["Try a different method: select"," ",G.map(e=>`"${e.label}"`).join(" or ")," from the dropdown above."]}),(0,a.jsxs)("p",{children:["You can also install manually in your terminal and then click"," ",(0,a.jsx)("strong",{children:"Retry Detection"})," below."]})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 pt-1",children:[(0,a.jsxs)(i.Button,{size:"sm",variant:"outline",onClick:L,className:"gap-1.5",children:[(0,a.jsx)(v.RefreshCw,{className:"h-3 w-3"}),"Retry Detection"]}),T&&(0,a.jsxs)("a",{href:T,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs text-red-600 underline hover:text-red-800 dark:text-red-400 dark:hover:text-red-200",children:[(0,a.jsx)(g.ExternalLink,{className:"h-3 w-3"}),"Official install guide"]})]})]}),M&&(0,a.jsx)("p",{className:"text-xs text-red-600 dark:text-red-400",children:M})]})}function j(e){return"claude"===e}function C(e){return!e}function A(e){return!e}function N(e){return"wizard"===e.mode&&!e.isMain&&!e.cliInstalled}function I(e){return"allow"===e}e.s(["isAllowModeActive",0,I,"isContinueEligible",0,function(e){return null!==e.mainBackend},"isRecommended",0,j,"shouldEnableVerifyInstall",0,A,"shouldShowCliInstall",0,C,"shouldShowWizardConfigureLaterHint",0,N],6131),e.s(["BackendCard",0,function(e){let{backendId:c,mode:u,isMain:p,authStatus:h,authStatusDetail:x,authFirstExpiredAt:f,authLastSuccessAt:g,authNotificationCount:v,cliInstalled:k,enabled:y,webSearchEnabled:w,webSearchSupported:S,permissionMode:E,busy:_=!1,installCheck:M,onCliInstalled:P,onVerifyInstall:K,onToggleEnable:O,onToggleWebSearch:B,renderExtra:D}=e,R=I(E),L=j(c),T=C(k),U=A(_),z=k&&M?.status!=="ok"&&M?.status!=="checking",V=N({mode:u,isMain:p,cliInstalled:k});return(0,a.jsxs)("div",{className:"rounded-xl border border-border bg-card p-4 shadow-sm",children:[(0,a.jsx)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:(0,a.jsx)("div",{className:"min-w-0 space-y-1.5",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,a.jsx)(l.Badge,{variant:d.BACKEND_BADGE_VARIANTS[c],children:d.BACKEND_PROVIDER_LABELS[c]}),L&&(0,a.jsx)(l.Badge,{variant:"gray",className:"font-normal",children:"Recommended"}),p&&(0,a.jsx)(l.Badge,{variant:"amber",children:"MAIN"}),(0,a.jsx)(m,{status:h,detail:x??null,firstExpiredAt:f??null,lastSuccessAt:g??null,notificationCount:v??0}),"settings"===u&&R&&(0,a.jsx)("a",{href:"#execution-mode",className:"inline-flex",children:(0,a.jsx)(l.Badge,{variant:"red",className:"cursor-pointer",title:"Allow mode is on for this backend — click to jump to the Execution Mode card",children:"Allow"})}),"settings"===u&&(0,a.jsx)(l.Badge,{variant:y?"green":"gray",children:y?"Enabled":"Disabled"})]})})}),(0,a.jsxs)("div",{className:"mt-4 space-y-3 border-t border-border pt-4",children:[T?(0,a.jsx)(b,{backendId:c,cliInstalled:k,compact:!0,onInstalled:()=>{P?.()}}):(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600 dark:text-green-400",children:[(0,a.jsx)(t.CheckCircle2,{className:"h-4 w-4"}),(0,a.jsx)("span",{children:"CLI installed"})]}),(0,a.jsxs)("div",{className:(0,o.cn)("flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",z&&"rounded-lg border border-primary/40 bg-primary/5 p-3"),children:[(0,a.jsx)("div",{className:"space-y-1",children:z?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("p",{className:"text-sm font-semibold text-foreground",children:"Verify the CLI runs on this machine"}),(0,a.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Confirms the ",d.BACKEND_PROVIDER_LABELS[c]," CLI is on your"," ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:"PATH"})," and responds to"," ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:"--version"}),"."]})]}):(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:k?"Re-run this whenever you reinstall or update the CLI to confirm it still launches.":"Install the CLI first, then verify it runs."})}),(0,a.jsxs)(i.Button,{size:z?"default":"sm",variant:z?"default":"outline",disabled:!U,onClick:K,className:(0,o.cn)("gap-2",z&&"shrink-0 self-start ring-2 ring-primary/40 ring-offset-2 ring-offset-background sm:self-auto"),children:[M?.status==="checking"?(0,a.jsx)(r.Loader2,{className:(0,o.cn)("animate-spin",z?"h-4 w-4":"h-3.5 w-3.5")}):M?.status==="ok"?(0,a.jsx)(t.CheckCircle2,{className:(0,o.cn)("text-green-500",z?"h-4 w-4":"h-3.5 w-3.5")}):M?.status==="error"?(0,a.jsx)(n.XCircle,{className:(0,o.cn)("text-red-500",z?"h-4 w-4":"h-3.5 w-3.5")}):z?(0,a.jsx)(s.Terminal,{className:"h-4 w-4"}):null,M?.status==="checking"?"Checking…":"Verify install"]})]}),M?.status==="ok"&&M.version&&(0,a.jsxs)("p",{className:"text-xs text-green-700 dark:text-green-400",children:["CLI runs OK —"," ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:M.version})]}),M?.status==="error"&&M.error&&(0,a.jsx)("p",{className:"text-xs text-red-600 dark:text-red-400",children:M.error}),V&&(0,a.jsxs)("p",{className:"text-xs text-muted-foreground",children:["You can install the CLI and verify it later from"," ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:"/settings/models"}),"."]})]}),D&&(0,a.jsx)("div",{className:"mt-4 border-t border-border pt-4",children:D()}),"settings"===u&&(0,a.jsx)("div",{className:"mt-4 flex flex-wrap items-center justify-between gap-2 border-t border-border pt-4",children:(0,a.jsxs)("div",{className:"flex flex-wrap gap-2",children:[O&&(0,a.jsx)(i.Button,{size:"sm",variant:y?"outline":"default",onClick:O,disabled:_,children:y?"Disable backend":"Enable backend"}),B&&(0,a.jsxs)(i.Button,{size:"sm",variant:w?"default":"outline",onClick:B,disabled:!S||!y||_,title:S?void 0:"Web search is not supported for this backend.",children:["Web search: ",w?"on":"off"]})]})})]})}],17975)},85462,e=>{"use strict";var a=e.i(54710),t=e.i(79634);e.s(["SubscriptionAuthWarning",0,function(){return(0,a.jsxs)(t.Alert,{variant:"warning",children:[(0,a.jsx)("p",{className:"font-semibold",children:"API key recommended — subscription auth is not supported by all providers"}),(0,a.jsxs)("p",{className:"mt-1 leading-relaxed",children:["You can skip API key setup and the daemon will fall back to each backend’s local CLI login (subscription auth). Most providers do not officially support running automated agents on a subscription plan; ",(0,a.jsx)("strong",{children:"Anthropic currently prohibits"})," ","using the Claude Agent SDK with a Claude Pro / Max subscription. Provider policies change often — to stay clear of the gray area, register a paid API key here."]})]})}])},36598,e=>{"use strict";function a(e,a){if(null===e){if(null===a.claude||null===a.codex||null===a.gemini)return null;let e=function(e){let a=["claude","codex","gemini"],t=0,r=0;for(let s of a)"safe"===e[s]?t++:"allow"===e[s]&&r++;if(t>r)return"safe";if(r>t)return"allow";for(let t of a)if(null!==e[t])return e[t];return"safe"}(a),t={};for(let r of["claude","codex","gemini"]){let s=a[r];null!==s&&s!==e&&(t[r]=s)}let r={mode:e};return Object.keys(t).length>0&&(r.perBackend=t),r}let t={};for(let r of["claude","codex","gemini"]){let s=a[r];null!==s&&s!==e&&(t[r]=s)}let r={mode:e};return Object.keys(t).length>0&&(r.perBackend=t),r}e.s(["EMPTY_OVERRIDES",0,{claude:null,codex:null,gemini:null},"buildSetupModePayload",0,a,"canApply",0,function(e,t){return null!==a(e,t)},"hasDivergentOverride",0,function(e,a){return["claude","codex","gemini"].some(t=>null!==a[t]&&a[t]!==e)},"internalToUi",0,function(e){return"strict"===e?"safe":"allow"}])}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,78406,e=>{"use strict";let a=(0,e.i(77379).default)("LockOpen",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 9.9-1",key:"1mm8w8"}]]);e.s(["Unlock",0,a],78406)},16995,e=>{"use strict";var a=e.i(54710),t=e.i(59546),r=e.i(76610),s=e.i(72740),n=e.i(75750),l=e.i(34416),i=e.i(48467),o=e.i(20014),d=e.i(8652),c=e.i(10427),u=e.i(65268),m=e.i(76176),p=e.i(57415),h=e.i(14260),x=e.i(95486);let f=e=>["backend-api-key",e];e.i(18446);var g=e.i(28619);function v(e,a){switch((0,g.defaultApiKeyProvider)(e)){case"anthropic":return(0,g.isPlausibleAnthropicApiKey)(a);case"openai":return(0,g.isPlausibleOpenAiApiKey)(a);case"google":return(0,g.isPlausibleGeminiApiKey)(a);default:return!1}}function y(e){switch((0,g.defaultApiKeyProvider)(e)){case"anthropic":return"Anthropic key — starts with `sk-ant-…`.";case"openai":return"OpenAI key — starts with `sk-…` (not `sk-ant-…`).";case"google":return"Google API key — starts with `AIza…`, 39 chars total.";default:return"API key"}}let k={anthropic:"Anthropic API key",bedrock:"Amazon Bedrock",vertex:"Google Vertex AI",foundry:"Microsoft Foundry",openai:"OpenAI API key","azure-openai":"Azure OpenAI",google:"Google API key","gemini-vertex":"Google Vertex AI"},b={anthropic:"Direct Anthropic API key (`sk-ant-…`). Stored in the OS keychain and mirrored to `ANTHROPIC_API_KEY`.",bedrock:"Anthropic models on Amazon Bedrock. Sets `CLAUDE_CODE_USE_BEDROCK=1` plus AWS credentials. Required: `AWS_REGION`.",vertex:"Anthropic models on Google Vertex AI. Sets `CLAUDE_CODE_USE_VERTEX=1` plus GCP project / region. Auth via Application Default Credentials or a service-account key file.",foundry:"Anthropic models on Microsoft Foundry. Sets `CLAUDE_CODE_USE_FOUNDRY=1` plus the Foundry resource (or full base URL). API key optional — falls back to Azure DefaultAzureCredential (`az login`).",openai:"OpenAI API key (`sk-…`). Stored in the keychain and mirrored to `OPENAI_API_KEY`.","azure-openai":"Codex CLI on Azure OpenAI. Daemon writes a managed `config.toml` to `<dataDir>/codex-home/` and points `CODEX_HOME` there — your personal `~/.codex/` is untouched. Sets `AZURE_OPENAI_API_KEY`. **Important:** the daemon spawns codex with `--model <id>` from the model registry, which Codex treats as the deployment name on Azure. Name your Azure deployments to match the model IDs shown on the /settings/models page (e.g. `gpt-5-codex`).",google:"Direct Gemini API key (`AIza…`). Mirrored to `GEMINI_API_KEY` + `GOOGLE_API_KEY`.","gemini-vertex":"Gemini on Google Vertex AI. Sets `GOOGLE_GENAI_USE_VERTEXAI=true` plus GCP project / location. Auth via ADC, a service-account key file, or a Vertex API key."};function j(e){let a=g.RECOMMENDED_PINNED_MODELS_BY_PROVIDER[e];return{defaultOpusModel:a.defaultOpusModel,defaultSonnetModel:a.defaultSonnetModel,defaultHaikuModel:a.defaultHaikuModel}}let C={useMantle:!1,mantleBaseUrl:"",skipMantleAuth:!1};function N(e){switch(e){case"anthropic":return{provider:"anthropic",apiKey:""};case"bedrock":return A("access_key");case"vertex":return{provider:"vertex",projectId:"",region:"",credentialsFile:"",vertexBaseUrl:"",...j("vertex")};case"foundry":return{provider:"foundry",endpointKind:"resource",resource:"",baseUrl:"",apiKey:"",...j("foundry")};case"openai":return{provider:"openai",apiKey:""};case"azure-openai":return{provider:"azure-openai",resource:"",apiKey:"",apiVersion:g.DEFAULT_AZURE_OPENAI_API_VERSION,deploymentName:""};case"google":return{provider:"google",apiKey:""};case"gemini-vertex":return I("adc")}}function A(e){let a={awsRegion:"",bedrockBaseUrl:"",...C,...j("bedrock")};switch(e){case"access_key":return{provider:"bedrock",authMode:"access_key",awsAccessKeyId:"",awsSecretAccessKey:"",awsSessionToken:"",...a};case"bearer_token":return{provider:"bedrock",authMode:"bearer_token",awsBearerTokenBedrock:"",...a};case"profile":return{provider:"bedrock",authMode:"profile",awsProfile:"",...a}}}function I(e){let a={projectId:"",location:""};switch(e){case"adc":return{provider:"gemini-vertex",authMode:"adc",...a};case"service_account":return{provider:"gemini-vertex",authMode:"service_account",credentialsFile:"",...a};case"api_key":return{provider:"gemini-vertex",authMode:"api_key",apiKey:"",...a}}}function w(e){let a={};return e.defaultOpusModel.trim()&&(a.defaultOpusModel=e.defaultOpusModel.trim()),e.defaultSonnetModel.trim()&&(a.defaultSonnetModel=e.defaultSonnetModel.trim()),e.defaultHaikuModel.trim()&&(a.defaultHaikuModel=e.defaultHaikuModel.trim()),a}function S(e){switch(e.provider){case"anthropic":if(!e.apiKey.trim())return null;return{provider:"anthropic",apiKey:e.apiKey.trim()};case"bedrock":{let a=e.awsRegion.trim();if(!a)return null;let t=e.bedrockBaseUrl.trim(),r=t?{bedrockBaseUrl:t}:{},s={...e.useMantle?{useMantle:!0}:{},...e.mantleBaseUrl.trim()?{mantleBaseUrl:e.mantleBaseUrl.trim()}:{},...e.skipMantleAuth?{skipMantleAuth:!0}:{}},n=w(e);switch(e.authMode){case"access_key":if(!e.awsAccessKeyId.trim()||!e.awsSecretAccessKey.trim())break;return{provider:"bedrock",authMode:"access_key",awsAccessKeyId:e.awsAccessKeyId.trim(),awsSecretAccessKey:e.awsSecretAccessKey.trim(),...e.awsSessionToken.trim()?{awsSessionToken:e.awsSessionToken.trim()}:{},awsRegion:a,...r,...s,...n};case"bearer_token":if(!e.awsBearerTokenBedrock.trim())break;return{provider:"bedrock",authMode:"bearer_token",awsBearerTokenBedrock:e.awsBearerTokenBedrock.trim(),awsRegion:a,...r,...s,...n};case"profile":if(!e.awsProfile.trim())break;return{provider:"bedrock",authMode:"profile",awsProfile:e.awsProfile.trim(),awsRegion:a,...r,...s,...n}}return null}case"vertex":if(!e.projectId.trim()||!e.region.trim())return null;return{provider:"vertex",projectId:e.projectId.trim(),region:e.region.trim(),...e.credentialsFile.trim()?{credentialsFile:e.credentialsFile.trim()}:{},...e.vertexBaseUrl.trim()?{vertexBaseUrl:e.vertexBaseUrl.trim()}:{},...w(e)};case"foundry":{let a=e.resource.trim(),t=e.baseUrl.trim(),r=e.apiKey.trim(),s=w(e);if("resource"===e.endpointKind){if(!a)return null;return{provider:"foundry",resource:a,...r?{apiKey:r}:{},...s}}if(!t)return null;return{provider:"foundry",baseUrl:t,...r?{apiKey:r}:{},...s}}case"openai":if(!e.apiKey.trim())return null;return{provider:"openai",apiKey:e.apiKey.trim()};case"azure-openai":{let a=e.resource.trim(),t=e.apiKey.trim();if(!a||!t)return null;return{provider:"azure-openai",resource:a,apiKey:t,...e.apiVersion.trim()?{apiVersion:e.apiVersion.trim()}:{},...e.deploymentName.trim()?{deploymentName:e.deploymentName.trim()}:{}}}case"google":if(!e.apiKey.trim())return null;return{provider:"google",apiKey:e.apiKey.trim()};case"gemini-vertex":{let a=e.projectId.trim(),t=e.location.trim();if(!a||!t)return null;switch(e.authMode){case"adc":return{provider:"gemini-vertex",authMode:"adc",projectId:a,location:t};case"service_account":if(!e.credentialsFile.trim())break;return{provider:"gemini-vertex",authMode:"service_account",projectId:a,location:t,credentialsFile:e.credentialsFile.trim()};case"api_key":if(!e.apiKey.trim())break;return{provider:"gemini-vertex",authMode:"api_key",projectId:a,location:t,apiKey:e.apiKey.trim()}}return null}}}function E(e){return"anthropic"===e||"openai"===e||"google"===e}function _({backendId:e,draft:t,onChange:r,disabled:s}){switch(t.provider){case"anthropic":case"openai":case"google":return(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)(d.Input,{type:"password",autoComplete:"off",spellCheck:!1,placeholder:y(e),value:t.apiKey,onChange:e=>r({...t,apiKey:e.target.value}),disabled:s,"aria-label":`${k[t.provider]} API key`}),(0,a.jsx)("p",{className:"text-[11px] text-muted-foreground",children:y(e)})]});case"bedrock":return(0,a.jsx)(M,{draft:t,onChange:r,disabled:s});case"vertex":return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"grid gap-2 sm:grid-cols-2",children:[(0,a.jsx)(O,{label:"GCP project id",children:(0,a.jsx)(d.Input,{autoComplete:"off",spellCheck:!1,placeholder:"my-gcp-project",value:t.projectId,onChange:e=>r({...t,projectId:e.target.value}),disabled:s})}),(0,a.jsx)(O,{label:"Vertex region",hint:"`global`, a multi-region (`us`, `eu`), or a region (e.g. `us-east5`).",children:(0,a.jsx)(d.Input,{autoComplete:"off",spellCheck:!1,placeholder:"us-east5",value:t.region,onChange:e=>r({...t,region:e.target.value}),disabled:s})})]}),(0,a.jsx)(O,{label:"Service account key file path (optional)",hint:"Absolute path to a service-account JSON file. Leave blank to use Application Default Credentials (`gcloud auth application-default login`).",children:(0,a.jsx)(d.Input,{autoComplete:"off",spellCheck:!1,placeholder:"/Users/me/keys/sa.json",value:t.credentialsFile,onChange:e=>r({...t,credentialsFile:e.target.value}),disabled:s})}),(0,a.jsx)(O,{label:"Vertex base URL (optional)",hint:"Override for custom endpoints / gateways.",children:(0,a.jsx)(d.Input,{autoComplete:"off",spellCheck:!1,placeholder:"https://aiplatform.googleapis.com",value:t.vertexBaseUrl,onChange:e=>r({...t,vertexBaseUrl:e.target.value}),disabled:s})}),(0,a.jsx)(P,{draft:t,onChange:r,disabled:s})]});case"foundry":return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("span",{className:"text-xs font-medium text-foreground",children:"Endpoint"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsxs)(c.Select,{value:t.endpointKind,onValueChange:e=>r({...t,endpointKind:e}),children:[(0,a.jsx)(c.SelectTrigger,{className:"w-44",children:(0,a.jsx)(c.SelectValue,{})}),(0,a.jsxs)(c.SelectContent,{children:[(0,a.jsx)(c.SelectItem,{value:"resource",children:"Resource name"}),(0,a.jsx)(c.SelectItem,{value:"base_url",children:"Full base URL"})]})]}),"resource"===t.endpointKind?(0,a.jsx)(d.Input,{autoComplete:"off",spellCheck:!1,placeholder:"my-foundry-resource",value:t.resource,onChange:e=>r({...t,resource:e.target.value}),disabled:s}):(0,a.jsx)(d.Input,{autoComplete:"off",spellCheck:!1,placeholder:"https://my-foundry-resource.services.ai.azure.com/anthropic",value:t.baseUrl,onChange:e=>r({...t,baseUrl:e.target.value}),disabled:s})]}),(0,a.jsx)("p",{className:"text-[11px] text-muted-foreground",children:"Resource name is the simpler form; base URL is for custom gateways. Set exactly one."})]}),(0,a.jsx)(O,{label:"Foundry API key (optional)",hint:"Leave blank to use Azure DefaultAzureCredential (`az login`, managed identity, etc.).",children:(0,a.jsx)(d.Input,{type:"password",autoComplete:"off",spellCheck:!1,value:t.apiKey,onChange:e=>r({...t,apiKey:e.target.value}),disabled:s})}),(0,a.jsx)(P,{draft:t,onChange:r,disabled:s})]});case"azure-openai":return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"rounded-md border border-amber-500/40 bg-amber-500/5 p-2 text-[11px] text-amber-700 dark:text-amber-400",children:[(0,a.jsx)("strong",{children:"Deployment-name alignment required."})," The daemon spawns codex with ",(0,a.jsx)("code",{children:"--model <id>"})," from the process-routing registry, which Codex treats as the Azure deployment name. Name your Azure deployments to match the model IDs configured on the ",(0,a.jsx)("code",{children:"/settings/models"})," ","page (e.g. ",(0,a.jsx)("code",{children:"gpt-5-codex"}),"). Renaming the deployment in Azure is the supported fix."]}),(0,a.jsxs)("div",{className:"grid gap-2 sm:grid-cols-2",children:[(0,a.jsx)(O,{label:"Azure resource name",hint:"The Foundry/Azure-OpenAI resource name (subdomain of `*.openai.azure.com`).",children:(0,a.jsx)(d.Input,{autoComplete:"off",spellCheck:!1,placeholder:"my-azure-resource",value:t.resource,onChange:e=>r({...t,resource:e.target.value}),disabled:s})}),(0,a.jsx)(O,{label:"Azure OpenAI API key",children:(0,a.jsx)(d.Input,{type:"password",autoComplete:"off",spellCheck:!1,value:t.apiKey,onChange:e=>r({...t,apiKey:e.target.value}),disabled:s})}),(0,a.jsx)(O,{label:"API version",hint:"Azure OpenAI API version (Codex uses the `responses` wire API).",children:(0,a.jsx)(d.Input,{autoComplete:"off",spellCheck:!1,value:t.apiVersion,onChange:e=>r({...t,apiVersion:e.target.value}),disabled:s})}),(0,a.jsx)(O,{label:"Default deployment name (optional)",hint:"Falls back when the daemon does not pass --model. Most invocations override this via --model from the routing registry — see warning above.",children:(0,a.jsx)(d.Input,{autoComplete:"off",spellCheck:!1,placeholder:"gpt-5-codex",value:t.deploymentName,onChange:e=>r({...t,deploymentName:e.target.value}),disabled:s})})]})]});case"gemini-vertex":return(0,a.jsx)(K,{draft:t,onChange:r,disabled:s})}}function M({draft:e,onChange:t,disabled:r}){return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("span",{className:"text-xs font-medium text-foreground",children:"AWS authentication"}),(0,a.jsxs)(c.Select,{value:e.authMode,onValueChange:a=>{a!==e.authMode&&t(A(a))},children:[(0,a.jsx)(c.SelectTrigger,{className:"w-full",children:(0,a.jsx)(c.SelectValue,{})}),(0,a.jsxs)(c.SelectContent,{children:[(0,a.jsx)(c.SelectItem,{value:"access_key",children:"Access key id + secret"}),(0,a.jsx)(c.SelectItem,{value:"bearer_token",children:"Bedrock API key (`AWS_BEARER_TOKEN_BEDROCK`)"}),(0,a.jsx)(c.SelectItem,{value:"profile",children:"AWS profile (`~/.aws/config`)"})]})]})]}),"access_key"===e.authMode&&(0,a.jsxs)("div",{className:"grid gap-2 sm:grid-cols-2",children:[(0,a.jsx)(O,{label:"AWS access key id",hint:"`AKIA…` for IAM users; `ASIA…` for STS / Identity Center.",children:(0,a.jsx)(d.Input,{autoComplete:"off",spellCheck:!1,placeholder:"AKIAIOSFODNN7EXAMPLE",value:e.awsAccessKeyId,onChange:a=>t({...e,awsAccessKeyId:a.target.value}),disabled:r})}),(0,a.jsx)(O,{label:"AWS secret access key",children:(0,a.jsx)(d.Input,{type:"password",autoComplete:"off",spellCheck:!1,value:e.awsSecretAccessKey,onChange:a=>t({...e,awsSecretAccessKey:a.target.value}),disabled:r})}),(0,a.jsx)(O,{label:"AWS session token (optional)",hint:"Required for STS / Identity Center temporary credentials.",children:(0,a.jsx)(d.Input,{type:"password",autoComplete:"off",spellCheck:!1,value:e.awsSessionToken,onChange:a=>t({...e,awsSessionToken:a.target.value}),disabled:r})})]}),"bearer_token"===e.authMode&&(0,a.jsx)(O,{label:"Bedrock API key",hint:"See AWS docs: 'Bedrock API keys' for how to issue one.",children:(0,a.jsx)(d.Input,{type:"password",autoComplete:"off",spellCheck:!1,value:e.awsBearerTokenBedrock,onChange:a=>t({...e,awsBearerTokenBedrock:a.target.value}),disabled:r})}),"profile"===e.authMode&&(0,a.jsx)(O,{label:"AWS profile name",hint:"Resolves credentials from `~/.aws/config` and `~/.aws/credentials`.",children:(0,a.jsx)(d.Input,{autoComplete:"off",spellCheck:!1,placeholder:"default",value:e.awsProfile,onChange:a=>t({...e,awsProfile:a.target.value}),disabled:r})}),(0,a.jsxs)("div",{className:"grid gap-2 sm:grid-cols-2",children:[(0,a.jsx)(O,{label:"AWS region",hint:"Required by Claude Code regardless of auth mode.",children:(0,a.jsx)(d.Input,{autoComplete:"off",spellCheck:!1,placeholder:"us-east-1",value:e.awsRegion,onChange:a=>t({...e,awsRegion:a.target.value}),disabled:r})}),(0,a.jsx)(O,{label:"Bedrock base URL (optional)",hint:"Override for VPC endpoints / gateways.",children:(0,a.jsx)(d.Input,{autoComplete:"off",spellCheck:!1,placeholder:"https://bedrock-runtime.us-east-1.amazonaws.com",value:e.bedrockBaseUrl,onChange:a=>t({...e,bedrockBaseUrl:a.target.value}),disabled:r})})]}),(0,a.jsxs)("details",{className:"rounded-md border border-border p-2 text-xs",children:[(0,a.jsx)("summary",{className:"cursor-pointer font-medium text-foreground",children:"Mantle endpoint (advanced)"}),(0,a.jsxs)("div",{className:"mt-2 space-y-2",children:[(0,a.jsx)("p",{className:"text-[11px] text-muted-foreground",children:"Mantle is an alternate Bedrock endpoint that uses the native Anthropic API shape. Setting this alongside the standard Invoke API lets Claude Code route per model. Most operators should leave this off."}),(0,a.jsxs)("label",{className:"flex items-center gap-2 text-xs text-foreground",children:[(0,a.jsx)("input",{type:"checkbox",checked:e.useMantle,onChange:a=>t({...e,useMantle:a.target.checked}),disabled:r}),"Enable Mantle endpoint (`CLAUDE_CODE_USE_MANTLE=1`)"]}),(0,a.jsx)(O,{label:"Mantle base URL (optional)",hint:"Override the default Mantle endpoint URL.",children:(0,a.jsx)(d.Input,{autoComplete:"off",spellCheck:!1,value:e.mantleBaseUrl,onChange:a=>t({...e,mantleBaseUrl:a.target.value}),disabled:r||!e.useMantle})}),(0,a.jsxs)("label",{className:"flex items-center gap-2 text-xs text-foreground",children:[(0,a.jsx)("input",{type:"checkbox",checked:e.skipMantleAuth,onChange:a=>t({...e,skipMantleAuth:a.target.checked}),disabled:r||!e.useMantle}),"Skip client-side auth (gateway injects credentials)"]})]})]}),(0,a.jsx)(P,{draft:e,onChange:t,disabled:r})]})}function P({draft:e,onChange:t,disabled:r}){let s=a=>{t({...e,...a})};return(0,a.jsxs)("details",{className:"rounded-md border border-border p-2 text-xs",children:[(0,a.jsx)("summary",{className:"cursor-pointer font-medium text-foreground",children:"Pinned model IDs (recommended)"}),(0,a.jsxs)("div",{className:"mt-2 space-y-2",children:[(0,a.jsx)("p",{className:"text-[11px] text-muted-foreground",children:"Pinning prevents the `sonnet`/`opus`/`haiku` aliases from resolving to a model not yet enabled in your cloud account. Pre-filled with Anthropic's recommended defaults — edit only if your account is on a different model tier."}),(0,a.jsx)(O,{label:"Opus model ID (`ANTHROPIC_DEFAULT_OPUS_MODEL`)",children:(0,a.jsx)(d.Input,{autoComplete:"off",spellCheck:!1,value:e.defaultOpusModel,onChange:e=>s({defaultOpusModel:e.target.value}),disabled:r})}),(0,a.jsx)(O,{label:"Sonnet model ID (`ANTHROPIC_DEFAULT_SONNET_MODEL`)",children:(0,a.jsx)(d.Input,{autoComplete:"off",spellCheck:!1,value:e.defaultSonnetModel,onChange:e=>s({defaultSonnetModel:e.target.value}),disabled:r})}),(0,a.jsx)(O,{label:"Haiku model ID (`ANTHROPIC_DEFAULT_HAIKU_MODEL`)",children:(0,a.jsx)(d.Input,{autoComplete:"off",spellCheck:!1,value:e.defaultHaikuModel,onChange:e=>s({defaultHaikuModel:e.target.value}),disabled:r})})]})]})}function K({draft:e,onChange:t,disabled:r}){return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"grid gap-2 sm:grid-cols-2",children:[(0,a.jsx)(O,{label:"GCP project id",children:(0,a.jsx)(d.Input,{autoComplete:"off",spellCheck:!1,placeholder:"my-gcp-project",value:e.projectId,onChange:a=>t({...e,projectId:a.target.value}),disabled:r})}),(0,a.jsx)(O,{label:"GCP location",hint:"e.g. `us-central1`",children:(0,a.jsx)(d.Input,{autoComplete:"off",spellCheck:!1,placeholder:"us-central1",value:e.location,onChange:a=>t({...e,location:a.target.value}),disabled:r})})]}),(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("span",{className:"text-xs font-medium text-foreground",children:"Authentication"}),(0,a.jsxs)(c.Select,{value:e.authMode,onValueChange:a=>{a!==e.authMode&&t(I(a))},children:[(0,a.jsx)(c.SelectTrigger,{className:"w-full",children:(0,a.jsx)(c.SelectValue,{})}),(0,a.jsxs)(c.SelectContent,{children:[(0,a.jsx)(c.SelectItem,{value:"adc",children:"Application Default Credentials (`gcloud auth`)"}),(0,a.jsx)(c.SelectItem,{value:"service_account",children:"Service-account JSON file path"}),(0,a.jsx)(c.SelectItem,{value:"api_key",children:"Vertex API key"})]})]})]}),"service_account"===e.authMode&&(0,a.jsx)(O,{label:"Service account key file path",children:(0,a.jsx)(d.Input,{autoComplete:"off",spellCheck:!1,placeholder:"/Users/me/keys/sa.json",value:e.credentialsFile,onChange:a=>t({...e,credentialsFile:a.target.value}),disabled:r})}),"api_key"===e.authMode&&(0,a.jsx)(O,{label:"Vertex API key",hint:"`AIza…`. Distinct from a direct Gemini API key — it goes to GOOGLE_API_KEY only and routes through Vertex.",children:(0,a.jsx)(d.Input,{type:"password",autoComplete:"off",spellCheck:!1,value:e.apiKey,onChange:a=>t({...e,apiKey:a.target.value}),disabled:r})})]})}function O({label:e,hint:t,children:r}){return(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("span",{className:"text-xs font-medium text-foreground",children:e}),r,t&&(0,a.jsx)("p",{className:"text-[11px] text-muted-foreground",children:t})]})}e.s(["BackendApiKeyPanel",0,function({backendId:e,onToast:d}){let j,C,{data:A,isLoading:I,error:w}=(0,h.useQuery)({queryKey:f(e),queryFn:()=>u.api.get(`/backends/${e}/api-key`),staleTime:3e4}),M=(j=(0,x.useQueryClient)(),(0,p.useMutation)({mutationFn:a=>u.api.put(`/backends/${e}/api-key`,a),onSuccess:()=>{j.invalidateQueries({queryKey:f(e)}),j.invalidateQueries({queryKey:["backends"]})}})),P=(C=(0,x.useQueryClient)(),(0,p.useMutation)({mutationFn:()=>u.api.delete(`/backends/${e}/api-key`),onSuccess:()=>{C.invalidateQueries({queryKey:f(e)}),C.invalidateQueries({queryKey:["backends"]})}})),K=(0,l.useMemo)(()=>A?.availableProviders??function(e){switch(e){case"claude":return["anthropic","bedrock","vertex","foundry"];case"codex":return["openai","azure-openai"];case"gemini":return["google","gemini-vertex"]}}(e),[A?.availableProviders,e]),O=K.length>1,[B,D]=(0,l.useState)(null),R=B??A?.provider??K[0],[L,T]=(0,l.useState)(()=>N(R)),[U,z]=(0,l.useState)(null),V=A?.source??"none",F=A?.configured??!1,$=A?.provider??null,G=A?.envVarNames??function(e){switch(e){case"claude":return["ANTHROPIC_API_KEY"];case"codex":return["OPENAI_API_KEY"];case"gemini":return["GEMINI_API_KEY","GOOGLE_API_KEY"]}}(e),H=M.isPending,Y=P.isPending,q=async()=>{let a;if(z(null),E(R)){let t="apiKey"in L?L.apiKey.trim():"";if(!v(e,t))return void z({kind:"error",message:y(e)});a={apiKey:t}}else{let e=S(L);if(!e)return void z({kind:"error",message:"Fill in all required fields for this provider."});a={config:e}}try{let t=await M.mutateAsync(a);T(N(R));let r=t.auth?.detail??null,s=t.provider?k[t.provider]:m.BACKEND_PROVIDER_LABELS[e];if(t.auth?.ok){let e=r?`Saved (${s}) — ${r}`:`Saved (${s}).`;z({kind:"success",message:e}),d?.("success",`${s} configured.`)}else{let e=r?`Saved (${s}), but the provider rejected it — ${r}`:`Saved (${s}), but the provider probe did not succeed.`;z({kind:"error",message:e}),d?.("error",e)}}catch(a){let e=a instanceof u.ApiError||a instanceof Error?a.message:"Failed to save provider config";z({kind:"error",message:e}),d?.("error",e)}},W=async()=>{z(null);try{let a=await P.mutateAsync(),t="shell"===a.source?"Cleared from keychain — falling back to the shell-set env var.":"Cleared from keychain — backend will use CLI / OAuth auth.";z({kind:"success",message:t}),d?.("success",`${m.BACKEND_PROVIDER_LABELS[e]} provider config cleared.`)}catch(a){let e=a instanceof u.ApiError||a instanceof Error?a.message:"Failed to clear provider config";z({kind:"error",message:e}),d?.("error",e)}},Q=E(R)?function(e){if(e.saving)return!1;let a=e.draftValue.trim();return!!a&&v(e.backendId,a)}({backendId:e,draftValue:"apiKey"in L?L.apiKey:"",saving:H}):function(e){if(e.saving)return!1;let a=S(e.draft);return!!a&&null===(0,g.validateBackendApiKeyConfigFormat)(e.backendId,a)}({backendId:e,draft:L,saving:H});return(0,a.jsxs)("div",{className:"space-y-3 rounded-xl border border-border bg-card p-4 shadow-sm",children:[(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)(r.KeyRound,{className:"h-4 w-4 text-muted-foreground"}),(0,a.jsxs)("h3",{className:"text-sm font-semibold text-foreground",children:["Provider auth",(0,a.jsx)("span",{className:"ml-2 text-xs font-normal text-muted-foreground",children:"(optional)"})]}),F&&(0,a.jsx)(i.Badge,{variant:"keychain"===V?"green":"gray",children:"keychain"===V?`Saved${$?` (${k[$]})`:""}`:"From shell"})]}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:I?"Loading…":w?"Could not read provider config from the daemon.":function(e){switch(e){case"keychain":return"API key configured (stored in OS keychain).";case"shell":return"Using API key from shell environment. Save a key here to override.";case"none":return"No API key configured. Falling back to CLI login / OAuth."}}(V)}),(0,a.jsx)("p",{className:"text-[11px] text-muted-foreground",children:"Stored in the OS keychain. Leave blank to skip — the daemon falls back to local CLI / OAuth auth or your shell-set env vars."})]}),O&&(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("label",{htmlFor:`${e}-provider`,className:"text-xs font-medium text-foreground",children:"Provider"}),(0,a.jsxs)(c.Select,{value:R,onValueChange:e=>{e===R||K.includes(e)&&(D(e),T(N(e)),z(null))},children:[(0,a.jsx)(c.SelectTrigger,{id:`${e}-provider`,className:"w-full",children:(0,a.jsx)(c.SelectValue,{})}),(0,a.jsx)(c.SelectContent,{children:K.map(e=>(0,a.jsx)(c.SelectItem,{value:e,children:k[e]},e))})]}),(0,a.jsx)("p",{className:"text-[11px] text-muted-foreground",children:b[R]})]}),(0,a.jsx)(_,{backendId:e,draft:L,onChange:T,disabled:H||Y}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsxs)(o.Button,{size:"sm",onClick:()=>{q()},disabled:!Q,className:"gap-2",children:[H?(0,a.jsx)(s.Loader2,{className:"h-3.5 w-3.5 animate-spin"}):null,F&&"keychain"===V?"Update provider":"Save provider"]}),"keychain"===V&&(0,a.jsxs)(o.Button,{size:"sm",variant:"outline",onClick:()=>{W()},disabled:H||Y,className:"gap-2",children:[Y?(0,a.jsx)(s.Loader2,{className:"h-3.5 w-3.5 animate-spin"}):null,"Clear"]}),!O&&(0,a.jsxs)("span",{className:"text-[11px] text-muted-foreground",children:["Sets ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:G.join(" / ")})]})]}),U&&(0,a.jsxs)("div",{role:"status",className:`flex items-start gap-2 rounded-md border p-2 text-xs ${"success"===U.kind?"border-green-500/30 bg-green-500/5 text-green-700 dark:text-green-400":"border-red-500/30 bg-red-500/5 text-red-600 dark:text-red-400"}`,children:["success"===U.kind?(0,a.jsx)(t.CheckCircle2,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}):(0,a.jsx)(n.XCircle,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),(0,a.jsx)("span",{children:U.message})]})]})}],16995)},17975,6131,e=>{"use strict";var a=e.i(54710),t=e.i(59546),r=e.i(77379);let s=(0,r.default)("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);var n=e.i(72740),l=e.i(12077),i=e.i(75750),o=e.i(48467),d=e.i(20014),c=e.i(81471),u=e.i(76176),m=e.i(10628);let p={ok:{variant:"green",label:"OK",icon:"✅"},expiring_soon:{variant:"amber",label:"Expiring Soon",icon:"🟡"},expired:{variant:"red",label:"Expired",icon:"🔴"},missing:{variant:"gray",label:"Missing",icon:"⚫"},recovering:{variant:"blue",label:"Recovering",icon:"🔄"},unknown:{variant:"gray",label:"Unknown",icon:"❓"}};function h({status:e,detail:t,firstExpiredAt:r,lastSuccessAt:s,notificationCount:l}){let i=e in p?e:"error"===e?"expired":"unknown",d=p[i],u="expired"===i||"missing"===i,x=u&&r?` (${function(e){let a=Math.floor((Date.now()-(0,c.parseUtcDate)(e).getTime())/6e4);if(a<60)return`${a}m`;let t=Math.floor(a/60);if(t<24)return`${t}h`;let r=Math.floor(t/24);return`${r}d`}(r)})`:"",f=[];return f.push(`Status: ${d.label}`),t&&f.push(`Detail: ${t}`),r&&u&&f.push(`Failed since: ${(0,c.formatRelativeTime)(r)}`),s&&f.push(`Last success: ${(0,c.formatRelativeTime)(s)}`),l>0&&f.push(`Notifications sent: ${l}`),(0,a.jsxs)(m.Tooltip,{children:[(0,a.jsx)(m.TooltipTrigger,{asChild:!0,children:(0,a.jsx)("span",{children:(0,a.jsxs)(o.Badge,{variant:d.variant,className:"gap-1",children:["recovering"===i?(0,a.jsx)(n.Loader2,{className:"h-3 w-3 animate-spin"}):null,"Auth: ",d.label,x]})})}),(0,a.jsx)(m.TooltipContent,{side:"bottom",className:"max-w-xs",children:(0,a.jsx)("div",{className:"space-y-0.5 text-xs",children:f.map((e,t)=>(0,a.jsx)("p",{children:e},t))})})]})}var x=e.i(34416),f=e.i(95486);let g=(0,r.default)("ClipboardCopy",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2",key:"4jdomd"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v4",key:"3hqy98"}],["path",{d:"M21 14H11",key:"1bme5i"}],["path",{d:"m15 10-4 4 4 4",key:"5dvupr"}]]);var v=e.i(88175),y=e.i(52387),k=e.i(59134),b=e.i(10427),j=e.i(65268);function C({backendId:e,cliInstalled:r,compact:s=!1,onInstalled:o}){let c=(0,f.useQueryClient)(),[m,p]=(0,x.useState)(null),[h,N]=(0,x.useState)(!1),[A,I]=(0,x.useState)(""),[w,S]=(0,x.useState)(!1),[E,_]=(0,x.useState)(null),[M,P]=(0,x.useState)(null),[K,O]=(0,x.useState)(!1),B=(0,x.useCallback)(async()=>{if(!r){N(!0);try{let a=(await j.api.get("/backends/install-methods")).backends[e];p(a);let t=a.methods.find(e=>e.available);t&&I(t.id)}catch(e){P(e instanceof Error?e.message:"Failed to fetch install methods")}finally{N(!1)}}},[e,r]);(0,x.useEffect)(()=>{r||B()},[r,B]);let D=async()=>{if(A){S(!0),_(null),P(null);try{let a=await j.api.post(`/backends/${e}/install`,{method:A});_(a),a.ok&&a.cliInstalled&&(await c.invalidateQueries({queryKey:["backends"]}),o?.())}catch(e){P(e instanceof Error?e.message:"Install failed")}finally{S(!1)}}},R=async e=>{try{await navigator.clipboard.writeText(e),O(!0),setTimeout(()=>O(!1),2e3)}catch{}},L=()=>{_(null),P(null),B(),c.invalidateQueries({queryKey:["backends"]})},T=m?.docsUrl,U=u.BACKEND_LABELS[e];if(!1!==r&&!E?.ok)return s?null:!0===r?(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600 dark:text-green-400",children:[(0,a.jsx)(t.CheckCircle2,{className:"h-4 w-4"}),(0,a.jsxs)("span",{children:[U," CLI is installed and ready"]})]}):null;if(h)return(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,a.jsx)(n.Loader2,{className:"h-4 w-4 animate-spin"}),(0,a.jsx)("span",{children:"Detecting available install methods..."})]});let z=m?.methods??[],V=z.filter(e=>e.available),F=z.find(e=>e.id===A),$=F?.manualOnly??!1,G=V.filter(e=>e.id!==A);return E?.ok?(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600 dark:text-green-400",children:[(0,a.jsx)(t.CheckCircle2,{className:"h-4 w-4"}),(0,a.jsxs)("span",{children:[U," CLI installed successfully"]})]}),!s&&(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"Proceed to verify authentication below to confirm your credentials are working."})]}):(0,a.jsxs)("div",{className:s?"space-y-2":"space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-amber-600 dark:text-amber-400",children:[(0,a.jsx)(v.Download,{className:"h-4 w-4 shrink-0"}),(0,a.jsxs)("span",{children:[U," CLI is not installed"]})]}),!s&&(0,a.jsxs)("p",{className:"text-xs text-muted-foreground",children:["The ",U," CLI must be installed on this machine for the agent to use it as a backend. Choose an install method below, or install manually in your terminal."]}),V.length>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:s?"flex items-center gap-2":"space-y-2",children:[(0,a.jsxs)(b.Select,{value:A,onValueChange:I,children:[(0,a.jsx)(b.SelectTrigger,{className:s?"w-[200px]":"w-full",children:(0,a.jsx)(b.SelectValue,{placeholder:"Choose install method"})}),(0,a.jsx)(b.SelectContent,{children:z.map(e=>(0,a.jsxs)(b.SelectItem,{value:e.id,disabled:!e.available,children:[e.label,!e.available&&" (not available)"]},e.id))})]}),$?(0,a.jsxs)(d.Button,{size:s?"sm":"default",variant:"outline",onClick:()=>F&&R(F.command),disabled:!A,className:"gap-2 shrink-0",children:[K?(0,a.jsx)(t.CheckCircle2,{className:"h-3.5 w-3.5 text-green-500"}):(0,a.jsx)(g,{className:"h-3.5 w-3.5"}),K?"Copied!":"Copy Command"]}):(0,a.jsxs)(d.Button,{size:s?"sm":"default",variant:"outline",onClick:D,disabled:w||!A||!F?.available,className:"gap-2 shrink-0",children:[w?(0,a.jsx)(n.Loader2,{className:"h-3.5 w-3.5 animate-spin"}):(0,a.jsx)(l.Terminal,{className:"h-3.5 w-3.5"}),w?"Installing...":"Install"]})]}),F&&!s&&(0,a.jsxs)("div",{className:"rounded-md bg-muted/50 px-3 py-2",children:[(0,a.jsx)("p",{className:"mb-1 text-[10px] font-medium uppercase tracking-wider text-muted-foreground/60",children:$?"Run this command in your terminal":"Command to run"}),(0,a.jsxs)("code",{className:"text-xs text-muted-foreground",children:["$ ",F.command]})]}),$&&!s&&(0,a.jsxs)("p",{className:"text-xs text-muted-foreground",children:["This method requires you to run the command in your own terminal (it may need elevated permissions). After installing, click"," ",(0,a.jsx)("strong",{children:"Retry Detection"})," to verify."]}),$&&(0,a.jsxs)(d.Button,{size:"sm",variant:"outline",onClick:L,className:"gap-1.5",children:[(0,a.jsx)(k.RefreshCw,{className:"h-3 w-3"}),"Retry Detection"]})]}):(0,a.jsxs)("div",{className:"space-y-2 rounded-md border border-amber-200 bg-amber-50/50 p-3 dark:border-amber-900 dark:bg-amber-950/30",children:[(0,a.jsx)("p",{className:"text-xs font-medium text-amber-800 dark:text-amber-200",children:"No supported package manager was detected on this system."}),(0,a.jsx)("p",{className:"text-xs text-amber-700 dark:text-amber-300",children:"Please install the CLI manually in your terminal:"}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"flex-1 rounded bg-muted px-2.5 py-1.5",children:(0,a.jsxs)("code",{className:"text-xs",children:["npm install -g"," ","claude"===e?"@anthropic-ai/claude-code":"codex"===e?"@openai/codex":"@google/gemini-cli"]})}),(0,a.jsx)(d.Button,{size:"sm",variant:"ghost",onClick:()=>R(`npm install -g ${"claude"===e?"@anthropic-ai/claude-code":"codex"===e?"@openai/codex":"@google/gemini-cli"}`),className:"shrink-0",children:K?(0,a.jsx)(t.CheckCircle2,{className:"h-3.5 w-3.5 text-green-500"}):(0,a.jsx)(g,{className:"h-3.5 w-3.5"})})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 pt-1",children:[(0,a.jsxs)(d.Button,{size:"sm",variant:"outline",onClick:L,className:"gap-1.5",children:[(0,a.jsx)(k.RefreshCw,{className:"h-3 w-3"}),"Retry Detection"]}),T&&(0,a.jsxs)("a",{href:T,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs text-amber-700 underline hover:text-amber-900 dark:text-amber-300 dark:hover:text-amber-100",children:[(0,a.jsx)(y.ExternalLink,{className:"h-3 w-3"}),"Official installation guide"]})]})]}),E&&!E.ok&&(0,a.jsxs)("div",{className:"space-y-2 rounded-md border border-red-200 bg-red-50/50 p-3 dark:border-red-900 dark:bg-red-950/30",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium text-red-700 dark:text-red-300",children:[(0,a.jsx)(i.XCircle,{className:"h-4 w-4 shrink-0"}),(0,a.jsx)("span",{children:E.timedOut?"Installation timed out (5 min limit)":`Installation failed (exit code ${E.exitCode})`})]}),E.stderr&&(0,a.jsx)("pre",{className:"max-h-32 overflow-auto rounded bg-red-100/50 p-2 text-xs text-red-800 dark:bg-red-950/50 dark:text-red-200",children:E.stderr.slice(-1500)}),(0,a.jsxs)("div",{className:"space-y-1 text-xs text-red-700 dark:text-red-300",children:[G.length>0&&(0,a.jsxs)("p",{children:["Try a different method: select"," ",G.map(e=>`"${e.label}"`).join(" or ")," from the dropdown above."]}),(0,a.jsxs)("p",{children:["You can also install manually in your terminal and then click"," ",(0,a.jsx)("strong",{children:"Retry Detection"})," below."]})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 pt-1",children:[(0,a.jsxs)(d.Button,{size:"sm",variant:"outline",onClick:L,className:"gap-1.5",children:[(0,a.jsx)(k.RefreshCw,{className:"h-3 w-3"}),"Retry Detection"]}),T&&(0,a.jsxs)("a",{href:T,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs text-red-600 underline hover:text-red-800 dark:text-red-400 dark:hover:text-red-200",children:[(0,a.jsx)(y.ExternalLink,{className:"h-3 w-3"}),"Official install guide"]})]})]}),M&&(0,a.jsx)("p",{className:"text-xs text-red-600 dark:text-red-400",children:M})]})}function N(e){return"claude"===e}function A(e){return!e}function I(e){return!e}function w(e){return"wizard"===e.mode&&!e.isMain&&!e.cliInstalled}function S(e){return"allow"===e}e.s(["isAllowModeActive",0,S,"isContinueEligible",0,function(e){return null!==e.mainBackend},"isRecommended",0,N,"shouldEnableVerifyInstall",0,I,"shouldShowCliInstall",0,A,"shouldShowWizardConfigureLaterHint",0,w],6131),e.s(["BackendCard",0,function(e){let{backendId:r,mode:m,isMain:p,authStatus:x,authStatusDetail:f,authFirstExpiredAt:g,authLastSuccessAt:v,authNotificationCount:y,cliInstalled:k,enabled:b,webSearchEnabled:j,webSearchSupported:E,permissionMode:_,busy:M=!1,installCheck:P,onCliInstalled:K,onVerifyInstall:O,onToggleEnable:B,onToggleWebSearch:D,renderExtra:R}=e,L=S(_),T=N(r),U=A(k),z=I(M),V=k&&P?.status!=="ok"&&P?.status!=="checking",F=w({mode:m,isMain:p,cliInstalled:k});return(0,a.jsxs)("div",{className:"rounded-xl border border-border bg-card p-4 shadow-sm",children:[(0,a.jsx)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:(0,a.jsx)("div",{className:"min-w-0 space-y-1.5",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,a.jsx)(o.Badge,{variant:u.BACKEND_BADGE_VARIANTS[r],children:u.BACKEND_PROVIDER_LABELS[r]}),T&&(0,a.jsx)(o.Badge,{variant:"gray",className:"font-normal",children:"Recommended"}),p&&(0,a.jsx)(o.Badge,{variant:"amber",children:"MAIN"}),(0,a.jsx)(h,{status:x,detail:f??null,firstExpiredAt:g??null,lastSuccessAt:v??null,notificationCount:y??0}),"settings"===m&&L&&(0,a.jsx)("a",{href:"#execution-mode",className:"inline-flex",children:(0,a.jsx)(o.Badge,{variant:"red",className:"cursor-pointer",title:"Allow mode is on for this backend — click to jump to the Execution Mode card",children:"Allow"})}),"settings"===m&&(0,a.jsx)(o.Badge,{variant:b?"green":"gray",children:b?"Enabled":"Disabled"})]})})}),(0,a.jsxs)("div",{className:"mt-4 space-y-3 border-t border-border pt-4",children:[U?(0,a.jsx)(C,{backendId:r,cliInstalled:k,compact:!0,onInstalled:()=>{K?.()}}):(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600 dark:text-green-400",children:[(0,a.jsx)(t.CheckCircle2,{className:"h-4 w-4"}),(0,a.jsx)("span",{children:"CLI installed"})]}),(0,a.jsxs)("div",{className:(0,c.cn)("flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",V&&"rounded-lg border border-primary/40 bg-primary/5 p-3"),children:[(0,a.jsx)("div",{className:"space-y-1",children:V?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("p",{className:"text-sm font-semibold text-foreground",children:"Verify the CLI runs on this machine"}),(0,a.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Confirms the ",u.BACKEND_PROVIDER_LABELS[r]," CLI is on your"," ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:"PATH"})," and responds to"," ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:"--version"}),"."]})]}):(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:k?"Re-run this whenever you reinstall or update the CLI to confirm it still launches.":"Install the CLI first, then verify it runs."})}),(0,a.jsxs)(d.Button,{size:V?"default":"sm",variant:V?"default":"outline",disabled:!z,onClick:O,className:(0,c.cn)("gap-2",V&&"shrink-0 self-start ring-2 ring-primary/40 ring-offset-2 ring-offset-background sm:self-auto"),children:[P?.status==="checking"?(0,a.jsx)(n.Loader2,{className:(0,c.cn)("animate-spin",V?"h-4 w-4":"h-3.5 w-3.5")}):P?.status==="ok"?(0,a.jsx)(t.CheckCircle2,{className:(0,c.cn)("text-green-500",V?"h-4 w-4":"h-3.5 w-3.5")}):P?.status==="error"?(0,a.jsx)(i.XCircle,{className:(0,c.cn)("text-red-500",V?"h-4 w-4":"h-3.5 w-3.5")}):V?(0,a.jsx)(l.Terminal,{className:"h-4 w-4"}):null,P?.status==="checking"?"Checking…":"Verify install"]})]}),P?.status==="ok"&&P.version&&(0,a.jsxs)("p",{className:"text-xs text-green-700 dark:text-green-400",children:["CLI runs OK —"," ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:P.version})]}),P?.status==="error"&&P.error&&(0,a.jsx)("p",{className:"text-xs text-red-600 dark:text-red-400",children:P.error}),F&&(0,a.jsxs)("p",{className:"text-xs text-muted-foreground",children:["You can install the CLI and verify it later from"," ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:"/settings/models"}),"."]})]}),R&&(0,a.jsx)("div",{className:"mt-4 border-t border-border pt-4",children:R()}),"settings"===m&&(0,a.jsxs)("div",{className:"mt-4 space-y-4 border-t border-border pt-4",children:[B&&(0,a.jsx)("div",{className:"flex flex-wrap items-center justify-end gap-2",children:(0,a.jsx)(d.Button,{size:"sm",variant:b?"outline":"default",onClick:B,disabled:M,children:b?"Disable backend":"Enable backend"})}),D&&(0,a.jsxs)("div",{className:"flex flex-col gap-3 rounded-lg border border-border bg-muted/30 p-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0 space-y-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(s,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,a.jsx)("p",{className:"text-sm font-medium text-foreground",children:"Web search"}),(0,a.jsx)(o.Badge,{variant:j?"green":"gray",className:"text-[10px]",children:E?j?"On":"Off":"Not supported"})]}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:E?u.BACKEND_WEB_SEARCH_DESCRIPTIONS[r]:"This backend does not expose a web-search tool."}),E&&!b&&(0,a.jsx)("p",{className:"text-xs text-amber-600 dark:text-amber-400",children:"Enable the backend first to toggle web search."})]}),(0,a.jsx)(d.Button,{size:"sm",variant:j?"outline":"default",onClick:D,disabled:!E||!b||M,className:"shrink-0 self-start sm:self-center",children:j?"Disable web search":"Enable web search"})]})]})]})}],17975)},85462,e=>{"use strict";var a=e.i(54710),t=e.i(79634);e.s(["SubscriptionAuthWarning",0,function(){return(0,a.jsxs)(t.Alert,{variant:"warning",children:[(0,a.jsx)("p",{className:"font-semibold",children:"API key recommended — subscription auth is not supported by all providers"}),(0,a.jsxs)("p",{className:"mt-1 leading-relaxed",children:["You can skip API key setup and the daemon will fall back to each backend’s local CLI login (subscription auth). Most providers do not officially support running automated agents on a subscription plan; ",(0,a.jsx)("strong",{children:"Anthropic currently prohibits"})," ","using the Claude Agent SDK with a Claude Pro / Max subscription. Provider policies change often — to stay clear of the gray area, register a paid API key here."]})]})}])},36598,e=>{"use strict";function a(e,a){if(null===e){if(null===a.claude||null===a.codex||null===a.gemini)return null;let e=function(e){let a=["claude","codex","gemini"],t=0,r=0;for(let s of a)"safe"===e[s]?t++:"allow"===e[s]&&r++;if(t>r)return"safe";if(r>t)return"allow";for(let t of a)if(null!==e[t])return e[t];return"safe"}(a),t={};for(let r of["claude","codex","gemini"]){let s=a[r];null!==s&&s!==e&&(t[r]=s)}let r={mode:e};return Object.keys(t).length>0&&(r.perBackend=t),r}let t={};for(let r of["claude","codex","gemini"]){let s=a[r];null!==s&&s!==e&&(t[r]=s)}let r={mode:e};return Object.keys(t).length>0&&(r.perBackend=t),r}e.s(["EMPTY_OVERRIDES",0,{claude:null,codex:null,gemini:null},"buildSetupModePayload",0,a,"canApply",0,function(e,t){return null!==a(e,t)},"hasDivergentOverride",0,function(e,a){return["claude","codex","gemini"].some(t=>null!==a[t]&&a[t]!==e)},"internalToUi",0,function(e){return"strict"===e?"safe":"allow"}])}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,90925,e=>{"use strict";let s=(0,e.i(77379).default)("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);e.s(["Trash2",0,s],90925)},60168,e=>{"use strict";let s=(0,e.i(77379).default)("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",0,s],60168)},99758,e=>{"use strict";let s=(0,e.i(77379).default)("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["Check",0,s],99758)},21682,e=>{"use strict";let s=(0,e.i(77379).default)("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);e.s(["Pencil",0,s],21682)},24756,e=>{"use strict";var s=e.i(14260),a=e.i(65268);e.s(["useBackends",0,function(e){return(0,s.useQuery)({queryKey:["backends"],queryFn:()=>a.api.get("/backends"),enabled:e?.enabled??!0,staleTime:6e4})}])},20492,37720,e=>{"use strict";var s=e.i(77379);let a=(0,s.default)("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]);e.s(["Power",0,a],20492);let t=(0,s.default)("PowerOff",[["path",{d:"M18.36 6.64A9 9 0 0 1 20.77 15",key:"dxknvb"}],["path",{d:"M6.16 6.16a9 9 0 1 0 12.68 12.68",key:"1x7qb5"}],["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);e.s(["PowerOff",0,t],37720)},53561,e=>{"use strict";var s=e.i(54710),a=e.i(34416),t=e.i(99758),d=e.i(21682),n=e.i(60168),l=e.i(20492),i=e.i(37720),r=e.i(7663),c=e.i(90925),o=e.i(81187),m=e.i(36451),u=e.i(65268),x=e.i(57415),h=e.i(14260),p=e.i(95486);let b=["commands"];var g=e.i(24756),f=e.i(20014),j=e.i(74490),y=e.i(8652),k=e.i(48467),N=e.i(10427),v=e.i(79634),w=e.i(81471);let C=["claude","codex","gemini"],I=/^[a-z0-9][a-z0-9_-]{0,31}$/,S={id:null,name:"",description:"",prompt:"",backendId:"claude",modelId:"claude-sonnet-4-6",enabled:!0,enabledSkills:["notify"],instructionMd:""};function M(e){let s=e.trim().toLowerCase();return s.startsWith("!")?s.slice(1):s}function B(e){return`!${M(e)}`}function P(e){return e.displayName??e.label??e.modelId}function T(e){return e instanceof u.ApiError||e instanceof Error?e.message:"Request failed"}function A({command:e}){return(0,s.jsxs)(j.Card,{className:"p-4",children:[(0,s.jsxs)(j.CardHeader,{className:"mb-2 gap-3",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)(j.CardTitle,{className:"text-base",children:e.title}),(0,s.jsx)("p",{className:"pt-1 font-mono text-sm text-primary",children:e.command})]}),(0,s.jsx)(k.Badge,{variant:"gray",children:"Built-in"})]}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:e.description}),e.details.length>0&&(0,s.jsx)("ul",{className:"mt-3 space-y-1 text-sm text-muted-foreground",children:e.details.map(e=>(0,s.jsxs)("li",{className:"flex gap-2",children:[(0,s.jsx)(t.Check,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-success"}),(0,s.jsx)("span",{children:e})]},e))})]})}function L({command:e,model:a,hasBuiltInConflict:t,busy:n,onEdit:l,onDelete:i}){return(0,s.jsxs)(j.Card,{tone:t?"warning":"default",className:"p-4",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)("h3",{className:"font-mono text-base font-semibold text-primary",children:e.command}),(0,s.jsx)(k.Badge,{variant:e.enabled?"green":"gray",children:e.enabled?"Enabled":"Disabled"}),t&&(0,s.jsx)(k.Badge,{variant:"amber",children:"Name conflict"}),(0,s.jsx)(k.Badge,{variant:"blue",children:e.backendId})]}),(0,s.jsx)("p",{className:"mt-1 text-sm text-foreground",children:e.description||"No description"}),(0,s.jsxs)("p",{className:"mt-1 text-xs text-muted-foreground",children:["Model: ",a?P(a):e.modelId]})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsxs)(f.Button,{variant:"outline",size:"sm",onClick:l,disabled:n,children:[(0,s.jsx)(d.Pencil,{className:"mr-2 h-4 w-4"}),"Edit"]}),(0,s.jsxs)(f.Button,{variant:"destructive",size:"sm",onClick:i,disabled:n,children:[(0,s.jsx)(c.Trash2,{className:"mr-2 h-4 w-4"}),"Delete"]})]})]}),t&&(0,s.jsxs)("div",{className:"mt-3 flex gap-2 rounded-md border border-amber-200 bg-amber-50 px-3 py-2 text-xs text-amber-800 dark:border-amber-900 dark:bg-amber-950/40 dark:text-amber-200",children:[(0,s.jsx)(o.AlertTriangle,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),(0,s.jsx)("span",{children:"A built-in command with this name now exists. Runtime dispatch will use the built-in command until this custom command is renamed."})]}),(0,s.jsx)("div",{className:"mt-3 max-h-28 overflow-auto rounded-md bg-muted p-3 text-xs text-muted-foreground",children:(0,s.jsx)("pre",{className:"whitespace-pre-wrap font-sans",children:e.prompt})})]})}function D({draft:e,builtInReserved:a,userCommands:t,modelsByBackend:d,availableSkills:n,maxInstructionMdLength:c,busy:o,onChange:u,onCancel:x,onSave:h}){let p=M(e.name),b=B(e.name),g=I.test(p),k=a.has(b),v=t.some(s=>s.command===b&&s.id!==e.id),S=d.get(e.backendId)??[],T=S.some(s=>s.modelId===e.modelId),A=e.instructionMd.length>c,L=g&&!k&&!v&&e.prompt.trim().length>0&&T&&!A&&!o,E="claude"===e.backendId?"CLAUDE.md":"codex"===e.backendId?"AGENTS.md":"GEMINI.md",z=e.name.trim()?g?k?"This is a built-in command.":v?"This custom command already exists.":`${b} is available.`:"Use lowercase letters, numbers, hyphens, or underscores.":"Enter the part after !.";return(0,s.jsxs)(j.Card,{className:"p-4",children:[(0,s.jsxs)(j.CardHeader,{className:"mb-4",children:[(0,s.jsx)(j.CardTitle,{className:"text-base",children:e.id?`Edit ${b}`:"New Custom Command"}),(0,s.jsx)(f.Button,{variant:"ghost",size:"icon",onClick:x,disabled:o,children:(0,s.jsx)(m.X,{className:"h-4 w-4"})})]}),(0,s.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,s.jsxs)("label",{className:"space-y-1.5",children:[(0,s.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Command"}),(0,s.jsxs)("div",{className:"flex",children:[(0,s.jsx)("span",{className:"inline-flex h-9 items-center rounded-l-md border border-r-0 border-input bg-muted px-3 font-mono text-sm text-muted-foreground",children:"!"}),(0,s.jsx)(y.Input,{value:e.name.startsWith("!")?e.name.slice(1):e.name,onChange:s=>u({...e,name:s.target.value}),className:"rounded-l-none font-mono",placeholder:"digest",disabled:o})]}),(0,s.jsx)("p",{className:(0,w.cn)("text-xs",!g||k||v?"text-destructive":"text-muted-foreground"),children:z})]}),(0,s.jsxs)("label",{className:"space-y-1.5",children:[(0,s.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Description"}),(0,s.jsx)(y.Input,{value:e.description,onChange:s=>u({...e,description:s.target.value}),placeholder:"Short label shown in settings and help",disabled:o})]}),(0,s.jsxs)("label",{className:"space-y-1.5",children:[(0,s.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Backend"}),(0,s.jsxs)(N.Select,{value:e.backendId,onValueChange:s=>{let a=d.get(s)?.find(e=>e.available)?.modelId??d.get(s)?.[0]?.modelId??"";u({...e,backendId:s,modelId:a})},disabled:o,children:[(0,s.jsx)(N.SelectTrigger,{children:(0,s.jsx)(N.SelectValue,{})}),(0,s.jsx)(N.SelectContent,{children:C.map(e=>(0,s.jsx)(N.SelectItem,{value:e,children:e},e))})]})]}),(0,s.jsxs)("label",{className:"space-y-1.5",children:[(0,s.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Model"}),(0,s.jsxs)(N.Select,{value:e.modelId,onValueChange:s=>u({...e,modelId:s}),disabled:o||0===S.length,children:[(0,s.jsx)(N.SelectTrigger,{children:(0,s.jsx)(N.SelectValue,{placeholder:"Select model"})}),(0,s.jsx)(N.SelectContent,{children:S.map(e=>(0,s.jsxs)(N.SelectItem,{value:e.modelId,children:[P(e),e.deprecated?" · legacy":""]},e.modelId))})]})]})]}),(0,s.jsxs)("label",{className:"mt-4 block space-y-1.5",children:[(0,s.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Instruction Prompt"}),(0,s.jsx)("textarea",{value:e.prompt,onChange:s=>u({...e,prompt:s.target.value}),rows:8,className:"w-full resize-y rounded-md border border-input bg-background px-3 py-2 text-sm text-foreground ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",placeholder:"Describe exactly what the agent should do when this command is invoked.",disabled:o})]}),(0,s.jsxs)("fieldset",{className:"mt-4 space-y-2",children:[(0,s.jsx)("legend",{className:"text-sm font-medium text-foreground",children:"Skills"}),(0,s.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Skill modules materialized into the working directory for this command. Leave only ",(0,s.jsx)("code",{children:"notify"})," checked for a minimal DM-reply turn; pick more if the prompt needs them."]}),(0,s.jsx)("div",{className:"grid gap-2 sm:grid-cols-2 md:grid-cols-3",children:n.map(a=>{let t=e.enabledSkills.includes(a);return(0,s.jsxs)("label",{className:"inline-flex items-start gap-2 rounded-md border border-input bg-background px-2.5 py-1.5 text-sm",children:[(0,s.jsx)("input",{type:"checkbox",checked:t,onChange:()=>{let s;return s=e.enabledSkills.includes(a),void u({...e,enabledSkills:s?e.enabledSkills.filter(e=>e!==a):[...e.enabledSkills,a]})},disabled:o,className:"mt-0.5 h-4 w-4 rounded border-input accent-primary"}),(0,s.jsx)("span",{className:"font-mono text-xs",children:a})]},a)})}),0===e.enabledSkills.length&&(0,s.jsxs)("p",{className:"text-xs text-amber-600 dark:text-amber-400",children:["No skills selected — the agent will run with only safety + your instructions. Reply quality may suffer without ",(0,s.jsx)("code",{children:"notify"}),"."]})]}),(0,s.jsxs)("label",{className:"mt-4 block space-y-1.5",children:[(0,s.jsxs)("span",{className:"text-sm font-medium text-foreground",children:[E," body (optional)"]}),(0,s.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Custom profile body written into the working directory's"," ",(0,s.jsx)("code",{children:E})," for this command. Leave blank to use the default conversational profile. Safety preamble and your character block are always emitted around it."]}),(0,s.jsx)("textarea",{value:e.instructionMd,onChange:s=>u({...e,instructionMd:s.target.value}),rows:8,className:"w-full resize-y rounded-md border border-input bg-background px-3 py-2 text-sm text-foreground ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",placeholder:"Replace the default conversational persona for this command. e.g. 'You are a terse summariser…'",disabled:o}),(0,s.jsxs)("p",{className:(0,w.cn)("text-xs",A?"text-destructive":"text-muted-foreground"),children:[e.instructionMd.length.toLocaleString()," /"," ",c.toLocaleString()," characters"]})]}),(0,s.jsxs)("div",{className:"mt-4 flex flex-wrap items-center justify-between gap-3",children:[(0,s.jsxs)("label",{className:"inline-flex items-center gap-2 text-sm text-foreground",children:[(0,s.jsx)("input",{type:"checkbox",checked:e.enabled,onChange:s=>u({...e,enabled:s.target.checked}),className:"h-4 w-4 rounded border-input accent-primary",disabled:o}),e.enabled?(0,s.jsx)(l.Power,{className:"h-4 w-4 text-success"}):(0,s.jsx)(i.PowerOff,{className:"h-4 w-4 text-muted-foreground"}),"Enabled"]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(f.Button,{variant:"outline",onClick:x,disabled:o,children:"Cancel"}),(0,s.jsxs)(f.Button,{onClick:h,disabled:!L,children:[(0,s.jsx)(r.Save,{className:"mr-2 h-4 w-4"}),"Save Command"]})]})]})]})}e.s(["default",0,function(){let e,t,d,l=(0,h.useQuery)({queryKey:b,queryFn:()=>u.api.get("/commands")}),i=(0,g.useBackends)(),r=(e=(0,p.useQueryClient)(),(0,x.useMutation)({mutationFn:e=>u.api.post("/commands",e),onSuccess:s=>{e.setQueryData(b,s)}})),c=(t=(0,p.useQueryClient)(),(0,x.useMutation)({mutationFn:({id:e,body:s})=>u.api.put(`/commands/${e}`,s),onSuccess:e=>{t.setQueryData(b,e)}})),m=(d=(0,p.useQueryClient)(),(0,x.useMutation)({mutationFn:e=>u.api.delete(`/commands/${e}`),onSuccess:e=>{d.setQueryData(b,e)}})),[y,k]=(0,a.useState)(null),[N,w]=(0,a.useState)(null),C=(0,a.useMemo)(()=>{let e=i.data?.backends??[],s=new Map;for(let a of e)s.set(a.id,a.models.filter(e=>e.available).sort((e,s)=>!!e.deprecated!=!!s.deprecated?e.deprecated?1:-1:P(e).localeCompare(P(s))));return s},[i.data?.backends]),I=(0,a.useMemo)(()=>new Set(l.data?.builtInCommands.map(e=>e.command)??[]),[l.data?.builtInCommands]),E=(0,a.useMemo)(()=>(l.data?.userCommands??[]).filter(e=>I.has(e.command)),[l.data?.userCommands,I]),z=(0,a.useMemo)(()=>l.data?.constraints.defaultSkills??["notify"],[l.data?.constraints.defaultSkills]),$=(0,a.useMemo)(()=>l.data?.constraints.availableSkills??[],[l.data?.constraints.availableSkills]),R=l.data?.constraints.maxInstructionMdLength??32e3,Q=async()=>{if(!y)return;let e=y.instructionMd.trim(),s={name:M(y.name),description:y.description.trim(),prompt:y.prompt.trim(),backendId:y.backendId,modelId:y.modelId,enabled:y.enabled,enabledSkills:y.enabledSkills,instructionMd:0===e.length?null:e};try{y.id?(await c.mutateAsync({id:y.id,body:s}),w(`${B(y.name)} updated`)):(await r.mutateAsync(s),w(`${B(y.name)} created`)),k(null)}catch(e){w(T(e))}},q=async e=>{if(window.confirm(`Delete ${e.command}?`))try{await m.mutateAsync(e.id),y?.id===e.id&&k(null),w(`${e.command} deleted`)}catch(e){w(T(e))}},F=r.isPending||c.isPending||m.isPending;return l.isLoading||i.isLoading?(0,s.jsx)(j.Card,{className:"p-4",children:(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"Loading commands…"})}):l.error||i.error||!l.data||!i.data?(0,s.jsx)(j.Card,{tone:"error",className:"p-4",children:(0,s.jsx)("p",{className:"text-sm text-destructive",children:"Failed to load command settings."})}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"text-2xl font-semibold text-foreground",children:"Commands"}),(0,s.jsxs)("p",{className:"mt-1 max-w-3xl text-sm text-muted-foreground",children:["Messaging shortcuts that begin with ",(0,s.jsx)("code",{children:"!"}),". Built-in commands are system controls; custom commands run your saved prompt on the backend and model you choose."]})]}),N&&(0,s.jsx)(v.Alert,{className:"rounded-lg px-4 py-2.5 text-sm",children:N}),E.length>0&&(0,s.jsx)(v.Alert,{variant:"warning",icon:!1,className:"rounded-lg px-4 py-3 text-sm",children:(0,s.jsxs)("div",{className:"flex gap-3",children:[(0,s.jsx)(o.AlertTriangle,{className:"mt-0.5 h-4 w-4 shrink-0"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"font-medium",children:"Some custom commands now conflict with built-in commands."}),(0,s.jsx)("p",{className:"mt-1 text-muted-foreground",children:"Built-in commands take precedence at runtime. Rename the custom command to make it callable again."}),(0,s.jsx)("div",{className:"mt-2 flex flex-wrap gap-1.5",children:E.map(e=>(0,s.jsx)("code",{className:"rounded bg-background px-1.5 py-0.5 font-mono text-xs",children:e.command},e.id))})]})]})}),(0,s.jsxs)("section",{className:"space-y-3",children:[(0,s.jsx)("div",{className:"flex items-center justify-between gap-3",children:(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold text-foreground",children:"Built-in"}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"Read-only controls handled by the daemon without model cost."})]})}),(0,s.jsx)("div",{className:"grid gap-3 md:grid-cols-2",children:l.data.builtInCommands.map(e=>(0,s.jsx)(A,{command:e},e.command))})]}),(0,s.jsxs)("section",{className:"space-y-3",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold text-foreground",children:"Custom"}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"User-defined commands are validated against built-in and existing custom names."})]}),(0,s.jsxs)(f.Button,{onClick:()=>{let e=i.data?.defaultBackend??"claude",s=C.get(e)?.find(e=>e.available)?.modelId??C.get(e)?.[0]?.modelId??S.modelId;k({...S,backendId:e,modelId:s,enabledSkills:[...z]}),w(null)},disabled:F,children:[(0,s.jsx)(n.Plus,{className:"mr-2 h-4 w-4"}),"New Command"]})]}),y&&(0,s.jsx)(D,{draft:y,builtInReserved:I,userCommands:l.data.userCommands,modelsByBackend:C,availableSkills:$,maxInstructionMdLength:R,busy:F,onChange:k,onCancel:()=>k(null),onSave:Q}),0===l.data.userCommands.length?(0,s.jsx)(j.Card,{className:"p-4",children:(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"No custom commands yet."})}):(0,s.jsx)("div",{className:"grid gap-3",children:l.data.userCommands.map(e=>(0,s.jsx)(L,{command:e,model:C.get(e.backendId)?.find(s=>s.modelId===e.modelId),hasBuiltInConflict:I.has(e.command),busy:F,onEdit:()=>{k({id:e.id,name:e.name,description:e.description,prompt:e.prompt,backendId:e.backendId,modelId:e.modelId,enabled:e.enabled,enabledSkills:e.enabledSkills??[...z],instructionMd:e.instructionMd??""}),w(null)},onDelete:()=>q(e)},e.id))})]})]})}],53561)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,70986,e=>{"use strict";var t=e.i(34416),s=e.i(91967),r=e.i(9413),i=e.i(36567),a=e.i(18731),n=e.i(22353),l=e.i(85565),o=e.i(90816),d=e.i(11207),c=e.i(54710),m="Collapsible",[u,x]=(0,r.createContextScope)(m),[p,h]=u(m),f=t.forwardRef((e,s)=>{let{__scopeCollapsible:r,open:a,defaultOpen:n,disabled:o,onOpenChange:u,...x}=e,[h,f]=(0,i.useControllableState)({prop:a,defaultProp:n??!1,onChange:u,caller:m});return(0,c.jsx)(p,{scope:r,disabled:o,contentId:(0,d.useId)(),open:h,onOpenToggle:t.useCallback(()=>f(e=>!e),[f]),children:(0,c.jsx)(l.Primitive.div,{"data-state":w(h),"data-disabled":o?"":void 0,...x,ref:s})})});f.displayName=m;var g="CollapsibleTrigger",j=t.forwardRef((e,t)=>{let{__scopeCollapsible:r,...i}=e,a=h(g,r);return(0,c.jsx)(l.Primitive.button,{type:"button","aria-controls":a.contentId,"aria-expanded":a.open||!1,"data-state":w(a.open),"data-disabled":a.disabled?"":void 0,disabled:a.disabled,...i,ref:t,onClick:(0,s.composeEventHandlers)(e.onClick,a.onOpenToggle)})});j.displayName=g;var y="CollapsibleContent",N=t.forwardRef((e,t)=>{let{forceMount:s,...r}=e,i=h(y,e.__scopeCollapsible);return(0,c.jsx)(o.Presence,{present:s||i.open,children:({present:e})=>(0,c.jsx)(v,{...r,ref:t,present:e})})});N.displayName=y;var v=t.forwardRef((e,s)=>{let{__scopeCollapsible:r,present:i,children:o,...d}=e,m=h(y,r),[u,x]=t.useState(i),p=t.useRef(null),f=(0,n.useComposedRefs)(s,p),g=t.useRef(0),j=g.current,N=t.useRef(0),v=N.current,b=m.open||u,k=t.useRef(b),C=t.useRef(void 0);return t.useEffect(()=>{let e=requestAnimationFrame(()=>k.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,a.useLayoutEffect)(()=>{let e=p.current;if(e){C.current=C.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";let t=e.getBoundingClientRect();g.current=t.height,N.current=t.width,k.current||(e.style.transitionDuration=C.current.transitionDuration,e.style.animationName=C.current.animationName),x(i)}},[m.open,i]),(0,c.jsx)(l.Primitive.div,{"data-state":w(m.open),"data-disabled":m.disabled?"":void 0,id:m.contentId,hidden:!b,...d,ref:f,style:{"--radix-collapsible-content-height":j?`${j}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...e.style},children:b&&o})});function w(e){return e?"open":"closed"}e.s(["Collapsible",0,f,"CollapsibleContent",0,N,"CollapsibleTrigger",0,j],70986)},50862,e=>{"use strict";var t=e.i(54710),s=e.i(81471);e.s(["EmptyState",0,function({icon:e,title:r,description:i,className:a,children:n}){return(0,t.jsxs)("div",{className:(0,s.cn)("flex flex-col items-center justify-center py-16 text-muted-foreground",a),children:[(0,t.jsx)(e,{className:"mb-3 h-10 w-10 opacity-40"}),(0,t.jsx)("p",{className:"text-sm font-medium",children:r}),i&&(0,t.jsx)("p",{className:"mt-1 max-w-prose text-xs text-muted-foreground/70",children:i}),n]})}])},43641,e=>{"use strict";let t=/^-\s+(\S+)\s+(\S+)\s+(\S+)\s+(.+?)\s*$/,s=/^90_meta\/health\/(\d{4}-\d{2}-\d{2})\.md$/;function r(e,t){let s=e.split(/\r?\n/),r=RegExp(`^##\\s+${t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\s*$`,"i"),i=!1,a=[];for(let e of s){if(r.test(e)){i=!0;continue}if(i&&/^##\s+/.test(e))break;if(!i)continue;let t=e.trim();if(!t||"_(none)_"===t)continue;let s=/^[-*]\s+(.+)$/.exec(t);s?a.push(s[1].trim()):a.length>0&&(a[a.length-1]+=` ${t}`)}return a}e.s(["distinctProcessKeys",0,function(e){let t=new Set;for(let s of e)t.add(s.processKey);return Array.from(t).sort((e,t)=>e.localeCompare(t))},"filterByProcessKey",0,function(e,t){return t&&"all"!==t?e.filter(e=>e.processKey===t):[...e]},"findLatestHealthReportPath",0,function(e){return e.map(e=>e.path).filter(e=>s.test(e)).sort((e,t)=>e<t?1:-1)[0]??null},"parseWikiHealthReport",0,function(e,t){let i=s.exec(e);return i?{date:i[1],path:e,summary:r(t,"Summary"),actionItems:r(t,"Action items"),rawBody:t}:null},"parseWikiLog",0,function(e){if(!e)return[];let s=e.split(/\r?\n/),r=[];for(let e=0;e<s.length;e++){var i,a;let n=s[e],l=t.exec(n);if(!l)continue;let[,o,d,c,m]=l;if(i=o,/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:?\d{2})$/.test(i)){("unknown"===(a=d)||/^[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*)+$/.test(a))&&r.push({timestamp:o,processKey:d,operation:c,relPath:m,lineNumber:e+1})}}return r},"sortWikiLogEntries",0,function(e){return[...e].sort((e,t)=>e.timestamp===t.timestamp?t.lineNumber-e.lineNumber:e.timestamp<t.timestamp?1:-1)}])},15778,e=>{"use strict";var t=e.i(54710),s=e.i(34416),r=e.i(45958),i=e.i(14260),a=e.i(77379);let n=(0,a.default)("HeartPulse",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}],["path",{d:"M3.22 12H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27",key:"1uw2ng"}]]);var l=e.i(84972);let o=(0,a.default)("Inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);var d=e.i(72740),c=e.i(65268),m=e.i(43641),u=e.i(50862),x=e.i(79634),p=e.i(48467),h=e.i(20014),f=e.i(74490),g=e.i(70986),j=e.i(10427);let y="wiki.ask";function N(e){return e instanceof c.ApiError||e instanceof Error?e.message:"Request failed"}function v({children:e}){return(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-2xl font-semibold text-foreground",children:"Wiki Timeline"}),(0,t.jsxs)("p",{className:"mt-1 max-w-3xl text-sm text-muted-foreground",children:["Wiki activity history and the latest health report from"," ",(0,t.jsx)("code",{children:"!lint"}),"."]}),e]})}function w({report:e}){return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(p.Badge,{variant:"purple",children:e.date}),(0,t.jsx)("code",{className:"text-xs text-muted-foreground",children:e.path})]}),e.summary.length>0&&(0,t.jsxs)("section",{children:[(0,t.jsx)("p",{className:"text-sm font-medium text-foreground",children:"Summary"}),(0,t.jsx)("ul",{className:"mt-1 ml-5 list-disc space-y-1 text-sm text-muted-foreground",children:e.summary.map((e,s)=>(0,t.jsx)("li",{children:e},s))})]}),(0,t.jsxs)("section",{children:[(0,t.jsx)("p",{className:"text-sm font-medium text-foreground",children:"Action items"}),0===e.actionItems.length?(0,t.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:"No action items in the latest report."}):(0,t.jsx)("ul",{className:"mt-1 ml-5 list-disc space-y-1 text-sm text-foreground",children:e.actionItems.map((e,s)=>(0,t.jsx)("li",{children:e},s))})]}),(0,t.jsxs)(g.Collapsible,{children:[(0,t.jsx)(g.CollapsibleTrigger,{asChild:!0,children:(0,t.jsx)(h.Button,{variant:"outline",size:"sm",children:"View full report"})}),(0,t.jsx)(g.CollapsibleContent,{className:"mt-3",children:(0,t.jsx)("pre",{className:"overflow-x-auto rounded-md border border-border bg-muted p-3 text-xs leading-snug",children:e.rawBody})})]})]})}e.s(["default",0,function(){var e;let a,h,g,b,k=(0,i.useQuery)({queryKey:["wiki-workspaces"],queryFn:()=>c.api.get("/wiki/workspaces")}),C=k.data?.workspaces.find(e=>e.active)??k.data?.workspaces[0]??null,L=!!C,S=function({workspace:e,enabled:t}){let r=(0,i.useQuery)({queryKey:["wiki-index",e],enabled:t,queryFn:()=>c.api.get(`/wiki/${e}/index`,{headers:{"x-process-key":y}})}),a=r.data?(0,m.findLatestHealthReportPath)(r.data.files):null,n=(0,i.useQuery)({queryKey:["wiki-health",e,a],enabled:t&&!!a,queryFn:()=>c.api.get(`/wiki/${e}/files/${encodeURI(a)}`,{headers:{"x-process-key":y}})}),l=(0,s.useMemo)(()=>n.data&&a?(0,m.parseWikiHealthReport)(a,n.data.content):null,[n.data,a]);return{isLoading:r.isLoading||n.isLoading,error:r.error??n.error,report:l,hasIndex:!!r.data,latestPath:a}}({workspace:C?.name??"default",enabled:L}),R=(e=C?.name??"default",a=(0,i.useQuery)({queryKey:["wiki-log",e],enabled:L,queryFn:()=>c.api.get(`/wiki/${e}/files/log.md`,{headers:{"x-process-key":y}})}),h=(0,s.useMemo)(()=>a.data?(0,m.sortWikiLogEntries)((0,m.parseWikiLog)(a.data.content)):[],[a.data]),b=(g=a.error)instanceof c.ApiError&&404===g.status,{isLoading:a.isLoading,error:b?null:g,entries:h}),[A,T]=(0,s.useState)("all"),$=(0,s.useMemo)(()=>(0,m.filterByProcessKey)(R.entries,A),[R.entries,A]),P=(0,s.useMemo)(()=>(0,m.distinctProcessKeys)(R.entries),[R.entries]);return k.isLoading?(0,t.jsx)("div",{className:"flex flex-col gap-4 p-6",children:(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(d.Loader2,{className:"h-4 w-4 animate-spin"})," Loading…"]})}):k.error?(0,t.jsx)("div",{className:"flex flex-col gap-4 p-6",children:(0,t.jsx)(x.Alert,{variant:"error",children:N(k.error)})}):C?(0,t.jsxs)("div",{className:"flex flex-col gap-4 p-6",children:[(0,t.jsx)(v,{children:(0,t.jsxs)("div",{className:"mt-2 text-sm text-muted-foreground",children:["Workspace ",(0,t.jsx)("code",{className:"font-mono",children:C.name})," ·"," ",(0,t.jsx)(r.default,{className:"underline",href:"/wiki",children:"Back to wiki"})," · ",(0,t.jsx)(r.default,{className:"underline",href:"/settings/wiki",children:"Configuration"})]})}),(0,t.jsxs)(f.Card,{children:[(0,t.jsx)(f.CardHeader,{className:"items-start",children:(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-md border border-border bg-muted text-muted-foreground",children:(0,t.jsx)(n,{className:"h-4 w-4"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)(f.CardTitle,{children:"Latest health report"}),(0,t.jsxs)("p",{className:"mt-1 max-w-3xl text-sm text-muted-foreground",children:["Newest ",(0,t.jsx)("code",{children:"90_meta/health/<date>.md"}),". Action items come from ",(0,t.jsx)("code",{children:"!lint"})," runs."]})]})]})}),S.isLoading?(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(d.Loader2,{className:"h-4 w-4 animate-spin"})," Loading…"]}):S.error?(0,t.jsx)(x.Alert,{variant:"error",children:N(S.error)}):S.latestPath?S.report?(0,t.jsx)(w,{report:S.report}):(0,t.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Could not parse the latest health report at"," ",(0,t.jsx)("code",{children:S.latestPath}),"."]}):(0,t.jsx)(u.EmptyState,{icon:n,title:"No health reports yet",description:"Send !lint from a DM to generate the first one."})]}),(0,t.jsxs)(f.Card,{children:[(0,t.jsx)(f.CardHeader,{className:"items-start",children:(0,t.jsxs)("div",{className:"flex w-full flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",children:[(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-md border border-border bg-muted text-muted-foreground",children:(0,t.jsx)(l.History,{className:"h-4 w-4"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)(f.CardTitle,{children:"Activity timeline"}),(0,t.jsxs)("p",{className:"mt-1 max-w-3xl text-sm text-muted-foreground",children:["Reverse-chronological view of ",(0,t.jsx)("code",{children:"log.md"}),". Filter by wiki command to focus on a specific surface."]})]})]}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:[(0,t.jsx)("label",{htmlFor:"wiki-timeline-filter",className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Filter"}),(0,t.jsxs)(j.Select,{value:A,onValueChange:T,children:[(0,t.jsx)(j.SelectTrigger,{id:"wiki-timeline-filter",className:"w-48",children:(0,t.jsx)(j.SelectValue,{})}),(0,t.jsxs)(j.SelectContent,{children:[(0,t.jsx)(j.SelectItem,{value:"all",children:"All commands"}),P.map(e=>(0,t.jsx)(j.SelectItem,{value:e,children:e},e))]})]})]})]})}),R.isLoading?(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(d.Loader2,{className:"h-4 w-4 animate-spin"})," Loading…"]}):R.error?(0,t.jsx)(x.Alert,{variant:"error",children:N(R.error)}):0===$.length?0===R.entries.length?(0,t.jsx)(u.EmptyState,{icon:o,title:"No activity yet",description:"Run !ingest, !compile, !ask, !lint, !trace, or !connect from a DM to populate the log."}):(0,t.jsx)(u.EmptyState,{icon:o,title:"No entries match the current filter",description:"Try a different command or reset to All commands."}):(0,t.jsx)("ol",{className:"divide-y divide-border",children:$.map(e=>(0,t.jsxs)("li",{className:"flex flex-col gap-1 py-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)(p.Badge,{variant:"blue",children:e.processKey}),(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:e.operation}),(0,t.jsx)("code",{className:"font-mono text-sm",children:e.relPath})]}),(0,t.jsx)("time",{className:"text-xs text-muted-foreground",dateTime:e.timestamp,title:e.timestamp,children:function(e){try{let t=new Date(e);if(Number.isNaN(t.getTime()))return e;return t.toLocaleString()}catch{return e}}(e.timestamp)})]},`${e.lineNumber}-${e.timestamp}`))})]})]}):(0,t.jsxs)("div",{className:"flex flex-col gap-4 p-6",children:[(0,t.jsx)(v,{}),(0,t.jsxs)(x.Alert,{variant:"info",children:["The wiki is not enabled. Open"," ",(0,t.jsx)(r.default,{className:"underline",href:"/settings/wiki",children:"/settings/wiki"})," ","to enable a workspace first."]})]})}],15778)}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,23682,e=>{"use strict";var t=e.i(54710),s=e.i(34416),a=e.i(59481),r=e.i(60168),n=e.i(20014),i=e.i(74490),l=e.i(50862),o=e.i(85631),d=e.i(76610),c=e.i(2745),u=e.i(36451),m=e.i(79634),h=e.i(48467),x=e.i(8652),p=e.i(20870),g=e.i(14260),y=e.i(57415),j=e.i(95486),f=e.i(65268);let b=["git-accounts"];function v(){return(0,g.useQuery)({queryKey:b,queryFn:()=>f.api.get("/git-accounts"),staleTime:3e4})}let N=/^[a-z0-9._-]+$/,k={alias:"",type:"github",authMode:"gh-cli-profile",ghProfile:"",host:"github.com",token:""};function w(){let e,a,i=v(),l=(e=(0,j.useQueryClient)(),(0,y.useMutation)({mutationFn:({alias:e,payload:t})=>f.api.put(`/git-accounts/${e}`,t),onSuccess:()=>{e.invalidateQueries({queryKey:b}),e.invalidateQueries({queryKey:["config"]})}})),o=(a=(0,j.useQueryClient)(),(0,y.useMutation)({mutationFn:e=>f.api.delete(`/git-accounts/${e}`),onSuccess:()=>{a.invalidateQueries({queryKey:b}),a.invalidateQueries({queryKey:["config"]})}})),c=(0,y.useMutation)({mutationFn:e=>f.api.post(`/git-accounts/${e}/probe`,{})}),[u,h]=(0,s.useState)(k),[g,w]=(0,s.useState)(null),[S,P]=(0,s.useState)({}),A=i.data?.accounts??[],B=async()=>{if(w(null),!N.test(u.alias))return void w("Alias must use lowercase letters, digits, dot, dash, or underscore.");if("gh-cli-profile"===u.authMode&&!u.ghProfile.trim())return void w("gh-cli-profile mode requires a gh login name.");if("pat-keychain"===u.authMode&&!u.token.trim())return void w("PAT mode requires a token on first save.");try{await l.mutateAsync({alias:u.alias,payload:{type:u.type,authMode:u.authMode,host:u.host||"github.com",..."gh-cli-profile"===u.authMode?{ghProfile:u.ghProfile}:{},...u.token?{token:u.token}:{}}}),h(k)}catch(e){w(e instanceof Error?e.message:"Failed to save account.")}},M=async e=>{P(t=>({...t,[e]:"Probing…"}));try{let t=await c.mutateAsync(e),s=t.ok?`OK — authenticated as ${t.login}`:`Probe failed: ${t.reason??"unknown"}`;P(t=>({...t,[e]:s}))}catch(t){P(s=>({...s,[e]:t instanceof Error?t.message:"Probe failed"}))}};return(0,t.jsx)(p.ConnectionCard,{name:"Git Accounts",icon:(0,t.jsx)(d.KeyRound,{className:"h-4 w-4"}),status:(0,p.deriveConfiguredStatus)(A.length>0),children:(0,t.jsxs)("div",{className:"mt-2 space-y-3",children:[(0,t.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Named credentials attached to watched repositories via"," ",(0,t.jsx)("code",{className:"rounded bg-muted px-1",children:"accountAlias"}),". Direct mode injects the resolved token per poll; Delegated mode currently uses the default ",(0,t.jsx)("code",{children:"gh"})," profile."]}),g&&(0,t.jsx)(m.Alert,{variant:"error",children:g}),(0,t.jsxs)("div",{className:"space-y-2",children:[0===A.length&&(0,t.jsx)("p",{className:"text-xs italic text-muted-foreground",children:"No accounts configured. Add one below."}),A.map(e=>(0,t.jsx)(C,{entry:e,onDelete:()=>o.mutate(e.alias),onProbe:()=>M(e.alias),probeMessage:S[e.alias],busy:o.isPending||c.isPending},e.alias))]}),(0,t.jsxs)("div",{className:"space-y-2 rounded border bg-background p-3",children:[(0,t.jsx)("p",{className:"text-xs font-medium",children:"Add account"}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsx)(x.Input,{value:u.alias,onChange:e=>h(t=>({...t,alias:e.target.value})),placeholder:"alias (e.g. work-github)",className:"max-w-[200px]"}),(0,t.jsxs)("select",{value:u.authMode,onChange:e=>h(t=>({...t,authMode:e.target.value})),className:"h-9 rounded border bg-background px-2 text-sm",children:[(0,t.jsx)("option",{value:"gh-cli-profile",children:"gh CLI profile"}),(0,t.jsx)("option",{value:"pat-keychain",children:"Personal Access Token"})]}),(0,t.jsx)(x.Input,{value:u.host,onChange:e=>h(t=>({...t,host:e.target.value})),placeholder:"github.com",className:"max-w-[180px]"}),"gh-cli-profile"===u.authMode?(0,t.jsx)(x.Input,{value:u.ghProfile,onChange:e=>h(t=>({...t,ghProfile:e.target.value})),placeholder:"gh login name (e.g. alice)",className:"max-w-[220px]"}):(0,t.jsx)(x.Input,{type:"password",value:u.token,onChange:e=>h(t=>({...t,token:e.target.value})),placeholder:"ghp_… (PAT — never persisted to disk)",className:"max-w-[280px]"}),(0,t.jsxs)(n.Button,{size:"sm",variant:"outline",onClick:B,disabled:l.isPending||!u.alias.trim(),children:[(0,t.jsx)(r.Plus,{className:"mr-1 h-3.5 w-3.5"}),"Save"]})]})]})]})})}function C({entry:e,onDelete:s,onProbe:a,probeMessage:r,busy:i}){return(0,t.jsxs)("div",{className:"flex flex-col gap-2 rounded border bg-background p-2 sm:flex-row sm:items-center",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("p",{className:"font-mono text-sm font-medium",children:e.alias}),(0,t.jsxs)("div",{className:"mt-1 flex flex-wrap items-center gap-1.5",children:[(0,t.jsx)(h.Badge,{variant:"gray",children:e.host}),(0,t.jsx)(h.Badge,{variant:"pat-keychain"===e.authMode?"green":"gray",children:e.authMode}),e.ghProfile&&(0,t.jsxs)(h.Badge,{variant:"gray",children:["user: ",e.ghProfile]}),!0===e.tokenStored&&(0,t.jsx)(h.Badge,{variant:"green",children:"token stored"}),!1===e.tokenStored&&(0,t.jsx)(h.Badge,{variant:"red",children:"no token"})]}),r&&(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:r})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)(n.Button,{size:"sm",variant:"ghost",onClick:a,disabled:i,children:[(0,t.jsx)(c.ShieldCheck,{className:"mr-1 h-3.5 w-3.5"}),"Probe"]}),(0,t.jsx)(n.Button,{size:"sm",variant:"ghost",onClick:s,disabled:i,className:"h-8 w-8 p-0",children:(0,t.jsx)(u.X,{className:"h-3.5 w-3.5"})})]})]})}var S=e.i(77379);let P=(0,S.default)("FileType2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M2 13v-1h6v1",key:"1dh9dg"}],["path",{d:"M5 12v6",key:"150t9c"}],["path",{d:"M4 18h2",key:"1xrofg"}]]);var A=e.i(72740),B=e.i(64213),M=e.i(7663),R=e.i(43477);let H=e=>["git-template",e],F=["git-template","retemplate-status"];function G(){return(0,g.useQuery)({queryKey:F,queryFn:()=>f.api.get("/git/templates/retemplate/status"),refetchInterval:e=>{let t=e.state.data;return!!(t?.status&&!t.status.finalizedAt)&&2e3},staleTime:1e3})}function L(e){return"project"===e?"Project (projects/<slug>.md)":"Repo-only (git-repos/<slug>.md)"}let O=["project","git-repo"];function T(){let e=G(),s=e.data?.status??null,a=function(e){if(!e)return null;if(!e.finalizedAt)return{label:"Re-template in progress…",tone:"info"};switch(e.finalStatus){case"success":default:return{label:"Re-template completed",tone:"success"};case"partial":return{label:"Re-template completed with rollbacks",tone:"warning"};case"failed":return{label:"Re-template failed",tone:"error"}}}(s);return(0,t.jsx)(p.ConnectionCard,{name:"Project document templates",icon:(0,t.jsx)(P,{className:"h-4 w-4"}),status:(0,p.deriveConfiguredStatus)(!0),children:(0,t.jsxs)("div",{className:"mt-2 space-y-3",children:[(0,t.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Edit the templates the agent uses when it (re)writes"," ",(0,t.jsx)("code",{className:"rounded bg-muted px-1",children:"context/projects/<slug>.md"})," ","and"," ",(0,t.jsx)("code",{className:"rounded bg-muted px-1",children:"context/git-repos/<slug>.md"}),". Changes are forward-only — existing files keep their old shape until the next git lifecycle event touches them, or until you press “Apply” below to re-conform every existing file at once."]}),a&&(0,t.jsx)(m.Alert,{variant:"error"===a.tone?"error":"warning"===a.tone?"warning":"success"===a.tone?"success":"info",children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)("span",{children:a.label}),s&&(0,t.jsxs)("span",{className:"text-xs font-mono text-muted-foreground",children:[s.kind," · run #",s.scheduleId]})]})}),O.map(e=>(0,t.jsx)(q,{kind:e},e)),(0,t.jsx)(D,{})]})})}function q({kind:e}){let a,r,i,l=(0,g.useQuery)({queryKey:H(e),queryFn:()=>f.api.get(`/git/templates/${encodeURIComponent(e)}`),staleTime:5e3}),o=(a=(0,j.useQueryClient)(),(0,y.useMutation)({mutationFn:t=>f.api.put(`/git/templates/${encodeURIComponent(e)}`,{content:t}),onSuccess:()=>{a.invalidateQueries({queryKey:H(e)})}})),d=(r=(0,j.useQueryClient)(),(0,y.useMutation)({mutationFn:()=>f.api.post(`/git/templates/${encodeURIComponent(e)}/apply`),onSuccess:()=>{r.invalidateQueries({queryKey:F})}})),[c,u]=(0,s.useState)(null),[x,p]=(0,s.useState)(null),[b,v]=(0,s.useState)(!1),[N,k]=(0,s.useState)(null),w=l.data?.active??"",C=l.data?.bundled??"",S=l.data?.hasOverride??!1,P=c??w,G=null!==c&&c!==w,O=async()=>{if(null!==c){p(null);try{await o.mutateAsync(c),u(null)}catch(e){p(e instanceof Error?e.message:"Failed to save template")}}},T=(i=L(e),{title:`Re-template 0 ${"project"===e?"project":"git-repo"} documents?`,bullets:[`${i} files will be re-conformed to the current template body.`,"Re-templating may lose information or formatting that the new template does not represent. Files matching the previous schema's sections may have content moved, merged, or dropped depending on how the template changed.","Every targeted file is auto-backed up before the run. The backup path is shown after you confirm.","If a file's session aborts mid-write, the daemon restores it from backup automatically."],acknowledge:"Yes, apply the template"}),D=async()=>{p(null);try{let e=await d.mutateAsync();k(e),v(!1)}catch(e){p(e instanceof Error?e.message:"Failed to apply template")}};return(0,t.jsxs)("div",{className:"rounded border bg-card p-3 space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm font-medium",children:L(e)}),S&&(0,t.jsx)(h.Badge,{variant:"green",children:"overridden"})]}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:"project"===e?"project.md":"git-repo.md"})]}),x&&(0,t.jsx)(m.Alert,{variant:"error",children:x}),(0,t.jsxs)("div",{className:"grid gap-2 lg:grid-cols-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"mb-1 text-xs font-medium text-muted-foreground",children:"Bundled (read-only)"}),(0,t.jsx)("textarea",{value:C,readOnly:!0,className:"h-64 w-full resize-none rounded border bg-muted p-2 font-mono text-xs"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"mb-1 text-xs font-medium text-muted-foreground",children:"Active (edit and save)"}),(0,t.jsx)("textarea",{value:P,onChange:e=>u(e.target.value),className:"h-64 w-full resize-none rounded border bg-background p-2 font-mono text-xs",spellCheck:!1,disabled:l.isLoading})]})]}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsxs)(n.Button,{size:"sm",variant:"outline",onClick:O,disabled:!G||o.isPending,children:[(0,t.jsx)(M.Save,{className:"mr-1 h-3.5 w-3.5"}),"Save template"]}),(0,t.jsx)(n.Button,{size:"sm",variant:"ghost",onClick:()=>{u(C)},disabled:l.isLoading,children:"Reset to bundled"}),(0,t.jsxs)(n.Button,{size:"sm",variant:"default",onClick:()=>v(!0),disabled:d.isPending,children:[d.isPending?(0,t.jsx)(A.Loader2,{className:"mr-1 h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(B.Play,{className:"mr-1 h-3.5 w-3.5"}),"Apply current template to existing ","project"===e?"projects":"git-repos"]})]}),N&&(0,t.jsx)(m.Alert,{variant:"info",children:(0,t.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,t.jsxs)("div",{children:["Re-template enqueued — schedule #",N.scheduleId,","," ",N.targets.length," file(s) backed up."]}),(0,t.jsxs)("div",{className:"font-mono text-muted-foreground break-all",children:["backup: ",N.backupRoot]})]})}),(0,t.jsx)(R.Sheet,{open:b,onOpenChange:v,children:(0,t.jsxs)(R.SheetContent,{side:"right",className:"w-[480px] sm:w-[540px]",children:[(0,t.jsx)(R.SheetHeader,{children:(0,t.jsx)(R.SheetTitle,{children:T.title})}),(0,t.jsxs)("div",{className:"mt-4 space-y-3 text-sm",children:[(0,t.jsx)("ul",{className:"list-disc space-y-1 pl-5",children:T.bullets.map(e=>(0,t.jsx)("li",{children:e},e))}),(0,t.jsxs)("div",{className:"flex gap-2 pt-2",children:[(0,t.jsxs)(n.Button,{size:"sm",onClick:D,disabled:d.isPending,children:[d.isPending&&(0,t.jsx)(A.Loader2,{className:"mr-1 h-3.5 w-3.5 animate-spin"}),T.acknowledge]}),(0,t.jsx)(n.Button,{size:"sm",variant:"ghost",onClick:()=>v(!1),children:"Cancel"})]})]})]})})]})}function D(){let e=G(),a=e.data?.status??null,r=(0,s.useMemo)(()=>a?Object.values(a.files).map(e=>({slug:e.slug,contextFile:e.contextFile,status:e.status,reason:e.reason??null,error:e.error??null,bytesDelta:void 0!==e.beforeBytes&&void 0!==e.afterBytes?e.afterBytes-e.beforeBytes:null,startedAt:e.startedAt??null,completedAt:e.completedAt??null})).sort((e,t)=>e.slug.localeCompare(t.slug)):[],[a]),n=(0,s.useMemo)(()=>(function(e){let t={pending:0,started:0,completed:0,skipped:0,failed:0,rolled_back:0};for(let s of e)t[s.status]+=1;return t})(r),[r]);return a?(0,t.jsxs)("div",{className:"rounded border bg-card p-3 space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-sm font-medium",children:"Last re-template run"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1 text-xs",children:Object.entries(n).map(([e,s])=>s>0?(0,t.jsxs)(h.Badge,{variant:z(e),children:[e,": ",s]},e):null)})]}),(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)("table",{className:"w-full text-xs",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{className:"border-b text-left text-muted-foreground",children:[(0,t.jsx)("th",{className:"px-2 py-1",children:"Slug"}),(0,t.jsx)("th",{className:"px-2 py-1",children:"Status"}),(0,t.jsx)("th",{className:"px-2 py-1",children:"File"}),(0,t.jsx)("th",{className:"px-2 py-1",children:"Bytes Δ"}),(0,t.jsx)("th",{className:"px-2 py-1",children:"Note"})]})}),(0,t.jsx)("tbody",{children:r.map(e=>(0,t.jsxs)("tr",{className:"border-b last:border-0",children:[(0,t.jsx)("td",{className:"px-2 py-1 font-mono",children:e.slug}),(0,t.jsx)("td",{className:"px-2 py-1",children:(0,t.jsx)(h.Badge,{variant:z(e.status),children:e.status})}),(0,t.jsx)("td",{className:"px-2 py-1 font-mono text-muted-foreground",children:e.contextFile}),(0,t.jsx)("td",{className:"px-2 py-1",children:null===e.bytesDelta?"—":e.bytesDelta>=0?`+${e.bytesDelta}`:`${e.bytesDelta}`}),(0,t.jsx)("td",{className:"px-2 py-1 text-muted-foreground",children:e.error??e.reason??""})]},e.slug))})]})})]}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:"No re-template runs recorded yet."})}function z(e){switch(e){case"completed":return"green";case"skipped":return"gray";case"started":case"pending":return"blue";case"failed":return"red";case"rolled_back":return"amber";default:return"default"}}let I=(0,S.default)("FilePen",[["path",{d:"M12.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v9.5",key:"1couwa"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M13.378 15.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"1y4qbx"}]]);var K=e.i(25795);let U=["task-flows"],Q=["git.","github."];function E(){let e,a,r=(0,g.useQuery)({queryKey:U,queryFn:()=>f.api.get("/task-flows"),staleTime:3e4}),i=(0,s.useMemo)(()=>(r.data?.flows??[]).filter(e=>Q.some(t=>e.key.startsWith(t))),[r.data]),[l,o]=(0,s.useState)(null),d=l??(i.length>0?i[0].key:null),c=(0,g.useQuery)({queryKey:["task-flow",d],queryFn:()=>null===d?Promise.reject(Error("no_key")):f.api.get(`/task-flows/${encodeURIComponent(d)}`),enabled:null!==d,staleTime:5e3}),u=(e=(0,j.useQueryClient)(),(0,y.useMutation)({mutationFn:({key:e,content:t})=>f.api.put(`/task-flows/${encodeURIComponent(e)}`,{content:t}),onSuccess:(t,{key:s})=>{e.invalidateQueries({queryKey:U}),e.invalidateQueries({queryKey:["task-flow",s]})}})),x=(a=(0,j.useQueryClient)(),(0,y.useMutation)({mutationFn:e=>f.api.delete(`/task-flows/${encodeURIComponent(e)}`),onSuccess:(e,t)=>{a.invalidateQueries({queryKey:U}),a.invalidateQueries({queryKey:["task-flow",t]})}})),[b,v]=(0,s.useState)({}),[N,k]=(0,s.useState)(null),w=d?b[d]??c.data?.override??c.data?.bundled??"":"",C=!!d&&void 0!==b[d]&&b[d]!==(c.data?.override??""),S=i.filter(e=>e.hasOverride).length,P=async()=>{if(d){k(null);try{await u.mutateAsync({key:d,content:w})}catch(e){k(e instanceof Error?e.message:"Failed to save override")}}},A=async()=>{if(d){k(null);try{await x.mutateAsync(d),v(e=>{let t={...e};return delete t[d],t})}catch(e){k(e instanceof Error?e.message:"Failed to reset")}}};return(0,t.jsx)(p.ConnectionCard,{name:"Task Flow Overrides",icon:(0,t.jsx)(I,{className:"h-4 w-4"}),status:(0,p.deriveConfiguredStatus)(S>0),children:(0,t.jsxs)("div",{className:"mt-2 space-y-3",children:[(0,t.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Override the prompt body the dispatcher uses for a Git/GitHub event. The bundled body stays read-only on the left; your edits land at ",(0,t.jsx)("code",{className:"rounded bg-muted px-1",children:"~/.personal-agent/task-flows/<key>.md"})," ","and take effect on the next session. Resetting falls back to bundled."]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsxs)("select",{value:d??"",onChange:e=>o(e.target.value||null),className:"h-9 min-w-[260px] rounded border bg-background px-2 text-sm",disabled:0===i.length,children:[0===i.length&&(0,t.jsx)("option",{value:"",children:"No git.* / github.* keys"}),i.map(e=>(0,t.jsxs)("option",{value:e.key,children:[e.key,e.hasOverride?" ★":""]},e.key))]}),c.data?.hasOverride&&(0,t.jsx)(h.Badge,{variant:"green",children:"overridden"})]}),N&&(0,t.jsx)(m.Alert,{variant:"error",children:N}),(0,t.jsxs)("div",{className:"grid gap-3 lg:grid-cols-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"mb-1 text-xs font-medium text-muted-foreground",children:"Bundled (read-only)"}),(0,t.jsx)("textarea",{value:c.data?.bundled??"",readOnly:!0,className:"h-72 w-full resize-none rounded border bg-muted p-2 font-mono text-xs"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"mb-1 text-xs font-medium text-muted-foreground",children:"Override (edit and save)"}),(0,t.jsx)("textarea",{value:w,onChange:e=>{var t;return t=e.target.value,void(d&&v(e=>({...e,[d]:t})))},className:"h-72 w-full resize-none rounded border bg-background p-2 font-mono text-xs",spellCheck:!1})]})]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)(n.Button,{size:"sm",variant:"outline",onClick:P,disabled:!d||u.isPending||!C,children:[(0,t.jsx)(M.Save,{className:"mr-1 h-3.5 w-3.5"}),"Save override"]}),(0,t.jsxs)(n.Button,{size:"sm",variant:"ghost",onClick:A,disabled:!d||x.isPending||!c.data?.hasOverride,children:[(0,t.jsx)(K.RotateCcw,{className:"mr-1 h-3.5 w-3.5"}),"Reset to bundled"]})]})]})})}var $=e.i(32220),_=e.i(32077),W=e.i(45958),V=e.i(26181),J=e.i(55575);let X=(0,S.default)("Github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]);var Y=e.i(40974),Z=e.i(21682),ee=e.i(90925);let et=(0,S.default)("Unlink",[["path",{d:"m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71",key:"yqzxt4"}],["path",{d:"m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71",key:"4qinb0"}],["line",{x1:"8",x2:"8",y1:"2",y2:"5",key:"1041cp"}],["line",{x1:"2",x2:"5",y1:"8",y2:"8",key:"14m1p5"}],["line",{x1:"16",x2:"16",y1:"19",y2:"22",key:"rzdirn"}],["line",{x1:"19",x2:"22",y1:"16",y2:"16",key:"ox905f"}]]);var es=e.i(90826),ea=e.i(58436),er=e.i(1733);let en="text-[11px] font-medium uppercase tracking-wider text-muted-foreground",ei=["project","repo-only"],el=["work","personal","research","client","other"];function eo({repo:e}){let[l,o]=(0,s.useState)(!1),[d,c]=(0,s.useState)(!1),[u,m]=(0,s.useState)(!1),x=(0,er.useDeleteRepository)(),p=(0,er.useUpdateRepository)(),g=(0,es.useConfirm)(),y=(0,er.repositoryHasGithub)(e),j=(0,er.repositoryHasLocal)(e),f=e.localOnly,b=async()=>{await g({title:`Delete ${(0,er.repositoryDisplayName)(e)}?`,description:"This removes the repository registration along with its triggers and management state. The local clone on disk is not touched.",confirmLabel:"Delete",variant:"destructive"})&&await x.mutateAsync(e.id)},v=async t=>{t&&y?await g({title:"Mark as local-only?",description:"This will clear the GitHub link. To keep both sides, leave 'local-only' off.",confirmLabel:"Mark local-only"})&&await p.mutateAsync({id:e.id,body:{localOnly:!0,githubOwner:null,githubRepo:null,githubAccount:null}}):await p.mutateAsync({id:e.id,body:{localOnly:t}})},N=async()=>{y?await g({title:"Unlink local clone?",description:`The clone at ${e.localPath} stays on disk; only the registration is detached.`,confirmLabel:"Unlink"})&&await p.mutateAsync({id:e.id,body:{localPath:null}}):await g({title:"Cannot unlink the local clone",description:"This row has no GitHub side, so unlinking would leave it empty. Delete the repository instead.",confirmLabel:"OK"})},k=async()=>{!await g({title:"Unlink GitHub remote?",description:j?"The local clone stays registered.":"This row has no local clone, so unlinking would leave it empty. Use 'Mark local-only' instead.",confirmLabel:"Unlink"})||j&&await p.mutateAsync({id:e.id,body:{githubOwner:null,githubRepo:null,githubAccount:null}})};return(0,t.jsxs)(i.Card,{children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(a.GitBranch,{className:"h-4 w-4 text-muted-foreground"}),(0,t.jsx)("span",{className:"truncate text-sm font-medium text-foreground",children:(0,er.repositoryDisplayName)(e)}),f&&(0,t.jsxs)(h.Badge,{variant:"gray",className:"text-[10px]",children:[(0,t.jsx)(Y.Lock,{className:"mr-1 h-3 w-3"}),"local-only"]}),(0,t.jsx)(h.Badge,{variant:"project"===e.classification?"green":"gray",children:e.classification}),(0,t.jsx)(h.Badge,{variant:"gray",children:e.category})]}),(0,t.jsx)("p",{className:"mt-1 truncate text-[11px] text-muted-foreground",children:e.id})]}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-1",children:[(0,t.jsx)(n.Button,{size:"sm",variant:"ghost",onClick:()=>o(!0),title:"Edit",children:(0,t.jsx)(Z.Pencil,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(n.Button,{size:"sm",variant:"ghost",onClick:b,title:"Delete",children:(0,t.jsx)(ee.Trash2,{className:"h-3.5 w-3.5"})})]})]}),(0,t.jsxs)("div",{className:"mt-3 grid gap-3 md:grid-cols-2",children:[(0,t.jsxs)("div",{className:"rounded-md border bg-background/40 p-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 text-xs font-medium text-muted-foreground",children:[(0,t.jsx)(X,{className:"h-3.5 w-3.5"}),"GitHub"]}),y?(0,t.jsxs)("div",{className:"mt-1 space-y-1 text-sm",children:[(0,t.jsxs)("p",{className:"font-medium",children:[e.githubOwner,"/",e.githubRepo]}),(0,t.jsxs)("p",{className:"text-[11px] text-muted-foreground",children:["account: ",e.githubAccount??"default"]}),j&&!f&&(0,t.jsxs)(n.Button,{size:"sm",variant:"ghost",className:"mt-1 h-7 px-1.5",onClick:k,children:[(0,t.jsx)(et,{className:"mr-1 h-3 w-3"}),"Unlink"]})]}):f?(0,t.jsx)("p",{className:"mt-2 text-xs text-muted-foreground",children:"Local-only — toggle off to enable GitHub linking."}):(0,t.jsxs)(n.Button,{size:"sm",variant:"outline",className:"mt-2 h-8",onClick:()=>c(!0),children:[(0,t.jsx)(r.Plus,{className:"mr-1 h-3 w-3"}),"Link GitHub remote"]})]}),(0,t.jsxs)("div",{className:"rounded-md border bg-background/40 p-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 text-xs font-medium text-muted-foreground",children:[(0,t.jsx)(J.FolderOpen,{className:"h-3.5 w-3.5"}),"Local clone"]}),j?(0,t.jsxs)("div",{className:"mt-1 space-y-1 text-sm",children:[(0,t.jsx)("p",{className:"truncate font-medium",title:e.localPath??"",children:e.localPath}),(0,t.jsxs)("p",{className:"text-[11px] text-muted-foreground",children:["slug: ",(0,t.jsx)("span",{className:"font-mono",children:e.slug})]}),y&&(0,t.jsxs)(n.Button,{size:"sm",variant:"ghost",className:"mt-1 h-7 px-1.5",onClick:N,children:[(0,t.jsx)(et,{className:"mr-1 h-3 w-3"}),"Unlink"]})]}):(0,t.jsxs)(n.Button,{size:"sm",variant:"outline",className:"mt-2 h-8",onClick:()=>m(!0),children:[(0,t.jsx)(r.Plus,{className:"mr-1 h-3 w-3"}),"Link local clone"]})]})]}),(0,t.jsxs)("div",{className:"mt-3 flex items-center justify-between text-[11px] text-muted-foreground",children:[(0,t.jsxs)("label",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("input",{type:"checkbox",checked:f,disabled:p.isPending,onChange:e=>void v(e.target.checked)}),"Local-only repository"]}),(0,t.jsxs)(W.default,{href:"/git",className:"flex items-center gap-1 text-foreground underline-offset-2 hover:underline",children:["Configure polling & triggers in my life › git",(0,t.jsx)(V.ArrowUpRight,{className:"h-3 w-3"})]})]}),l&&(0,t.jsx)(ed,{repo:e,onClose:()=>o(!1)}),d&&(0,t.jsx)(ec,{repo:e,onClose:()=>c(!1)}),u&&(0,t.jsx)(eu,{repo:e,onClose:()=>m(!1)})]})}function ed({repo:e,onClose:a}){let r=(0,er.useUpdateRepository)(),[i,l]=(0,s.useState)(e.displayName??""),[o,d]=(0,s.useState)(e.classification),[c,u]=(0,s.useState)(e.category),[m,h]=(0,s.useState)(null),p=async t=>{t.preventDefault(),h(null);try{let t={displayName:i.trim()?i.trim():null,classification:o,category:c};await r.mutateAsync({id:e.id,body:t}),a()}catch(e){h(e instanceof Error?e.message:"Failed to save changes")}};return(0,t.jsx)(R.Sheet,{open:!0,onOpenChange:e=>!e&&a(),children:(0,t.jsxs)(R.SheetContent,{className:"overflow-y-auto",children:[(0,t.jsx)(R.SheetHeader,{children:(0,t.jsx)(R.SheetTitle,{children:"Edit repository metadata"})}),(0,t.jsxs)("form",{onSubmit:p,className:"mt-6 space-y-4",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:en,children:"Display name"}),(0,t.jsx)(x.Input,{value:i,onChange:e=>l(e.target.value),placeholder:(0,er.repositoryDisplayName)(e)}),(0,t.jsx)("p",{className:"text-[11px] text-muted-foreground",children:"Optional — drives the slug used for context paths and dashboard deep-links."})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:en,children:"Classification"}),(0,t.jsx)("select",{value:o,onChange:e=>d(e.target.value),className:"h-9 w-full rounded-md border bg-background px-2 text-sm",children:ei.map(e=>(0,t.jsx)("option",{value:e,children:e},e))}),(0,t.jsx)("p",{className:"text-[11px] text-muted-foreground",children:"Project entries carry lifecycle phases in the overview MD; repo-only stays lightweight."})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:en,children:"Category"}),(0,t.jsx)("select",{value:c,onChange:e=>u(e.target.value),className:"h-9 w-full rounded-md border bg-background px-2 text-sm",children:el.map(e=>(0,t.jsx)("option",{value:e,children:e},e))})]}),m&&(0,t.jsx)("p",{className:"rounded-md border border-red-200 bg-red-50/50 p-2 text-xs text-red-700 dark:border-red-900 dark:bg-red-950/30 dark:text-red-300",children:m}),(0,t.jsxs)("div",{className:"flex items-center justify-end gap-2 border-t pt-4",children:[(0,t.jsx)(n.Button,{type:"button",variant:"ghost",onClick:a,children:"Cancel"}),(0,t.jsx)(n.Button,{type:"submit",disabled:r.isPending,children:r.isPending?"Saving…":"Save"})]})]})]})})}function ec({repo:e,onClose:a}){let r=(0,er.useLinkGithub)(),{data:i}=v(),[l,o]=(0,s.useState)(""),[d,c]=(0,s.useState)(""),[u,m]=(0,s.useState)(""),[h,p]=(0,s.useState)(null),g=async t=>{if(t.preventDefault(),p(null),!l.trim()||!d.trim())return void p("owner and repo are required");try{await r.mutateAsync({id:e.id,owner:l.trim(),repo:d.trim(),account:u.trim()||void 0}),a()}catch(e){p(e instanceof Error?e.message:"Failed to link")}};return(0,t.jsx)(R.Sheet,{open:!0,onOpenChange:e=>!e&&a(),children:(0,t.jsxs)(R.SheetContent,{className:"overflow-y-auto",children:[(0,t.jsx)(R.SheetHeader,{children:(0,t.jsx)(R.SheetTitle,{children:"Link a GitHub remote"})}),(0,t.jsxs)("form",{onSubmit:g,className:"mt-6 space-y-4",children:[(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:"Personal accounts on github.com only. GHES is not in scope for v1."}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:en,children:"Owner"}),(0,t.jsx)(x.Input,{value:l,onChange:e=>o(e.target.value),placeholder:"acme",autoFocus:!0})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:en,children:"Repository"}),(0,t.jsx)(x.Input,{value:d,onChange:e=>c(e.target.value),placeholder:"widgets"})]})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:en,children:"Account alias"}),(0,t.jsxs)("select",{value:u,onChange:e=>m(e.target.value),className:"h-9 w-full rounded-md border bg-background px-2 text-sm",children:[(0,t.jsx)("option",{value:"",children:"default"}),(i?.accounts??[]).map(e=>(0,t.jsx)("option",{value:e.alias,children:e.alias},e.alias))]})]}),h&&(0,t.jsx)("p",{className:"rounded-md border border-red-200 bg-red-50/50 p-2 text-xs text-red-700 dark:border-red-900 dark:bg-red-950/30 dark:text-red-300",children:h}),(0,t.jsxs)("div",{className:"flex items-center justify-end gap-2 border-t pt-4",children:[(0,t.jsx)(n.Button,{type:"button",variant:"ghost",onClick:a,children:"Cancel"}),(0,t.jsx)(n.Button,{type:"submit",disabled:r.isPending,children:r.isPending?"Linking…":"Link"})]})]})]})})}function eu({repo:e,onClose:a}){let r=(0,er.useLinkLocal)(),[i,l]=(0,s.useState)(""),[o,d]=(0,s.useState)(null),c=async t=>{if(t.preventDefault(),d(null),!i.trim())return void d("Local path is required");try{await r.mutateAsync({id:e.id,localPath:i.trim()}),a()}catch(e){d(e instanceof Error?e.message:"Failed to link")}};return(0,t.jsx)(R.Sheet,{open:!0,onOpenChange:e=>!e&&a(),children:(0,t.jsxs)(R.SheetContent,{className:"overflow-y-auto",children:[(0,t.jsx)(R.SheetHeader,{children:(0,t.jsx)(R.SheetTitle,{children:"Link a local clone"})}),(0,t.jsxs)("form",{onSubmit:c,className:"mt-6 space-y-4",children:[(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:"Pick the directory of the local clone of this repository. The agent never inspects `.git/config` to suggest values — paths are user-supplied."}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:en,children:"Repository directory"}),(0,t.jsx)(ea.DirectoryPickerField,{value:i,onChange:l,title:"Choose local clone directory"})]}),o&&(0,t.jsx)("p",{className:"rounded-md border border-red-200 bg-red-50/50 p-2 text-xs text-red-700 dark:border-red-900 dark:bg-red-950/30 dark:text-red-300",children:o}),(0,t.jsxs)("div",{className:"flex items-center justify-end gap-2 border-t pt-4",children:[(0,t.jsx)(n.Button,{type:"button",variant:"ghost",onClick:a,children:"Cancel"}),(0,t.jsx)(n.Button,{type:"submit",disabled:r.isPending,children:r.isPending?"Linking…":"Link"})]})]})]})})}let em="text-[11px] font-medium uppercase tracking-wider text-muted-foreground",eh="text-[11px] leading-relaxed text-muted-foreground",ex="text-[11px] font-medium uppercase tracking-wider text-muted-foreground",ep=[{value:"both",label:"GitHub + local clone",description:"Recommended. Agent watches GitHub activity AND reads files from your local clone."},{value:"github",label:"GitHub only",description:"Agent watches PRs, issues, and commits on GitHub. No access to source files."},{value:"local",label:"Local folder only",description:"Agent watches a folder on this Mac. No GitHub remote — e.g. a private working directory."}],eg=[{value:"repo-only",label:"Just track activity",description:"Lightweight. Agent logs commits, PRs, and issues. No long-form project document."},{value:"project",label:"Treat as a project",description:"Agent maintains a rich project document with goals, decisions, and milestones in your context notes."}],ey=["work","personal","research","client","other"];function ej({onClose:e}){let a=(0,er.useCreateRepository)(),{data:r}=v(),[i,l]=(0,s.useState)("both"),[o,d]=(0,s.useState)(""),[c,u]=(0,s.useState)(""),[m,h]=(0,s.useState)(""),[p,g]=(0,s.useState)(""),[y,j]=(0,s.useState)(!1),[f,b]=(0,s.useState)(""),[N,k]=(0,s.useState)("repo-only"),[w,C]=(0,s.useState)("other"),[S,P]=(0,s.useState)(null),A="github"===i||"both"===i&&!y,B="local"===i||"both"===i,M=async t=>{t.preventDefault(),P(null);let s={classification:N,category:w,displayName:f.trim()?f.trim():void 0};if(A){if(!o.trim()||!c.trim())return void P("GitHub owner and repository are required.");s.githubOwner=o.trim(),s.githubRepo=c.trim(),m.trim()&&(s.githubAccount=m.trim())}if(B){if(!p.trim())return void P("Local clone path is required.");s.localPath=p.trim()}"local"===i&&y&&(s.localOnly=!0);try{await a.mutateAsync(s),e()}catch(e){P(e instanceof Error?e.message:"Failed to add repository")}},H=r?.accounts??[];return(0,t.jsx)(R.Sheet,{open:!0,onOpenChange:t=>!t&&e(),children:(0,t.jsxs)(R.SheetContent,{className:"overflow-y-auto",children:[(0,t.jsxs)(R.SheetHeader,{children:[(0,t.jsx)(R.SheetTitle,{children:"Add repository"}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:"Tell the agent about a code repository to watch. It will track activity (commits, PRs, issues) and optionally maintain a project document in your context notes."})]}),(0,t.jsxs)("form",{onSubmit:M,className:"mt-6 space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:em,children:"Where does this repository live?"}),(0,t.jsx)("div",{className:"grid gap-2",children:ep.map(e=>{let s=i===e.value;return(0,t.jsxs)("button",{type:"button",onClick:()=>l(e.value),className:"rounded-md border px-3 py-2 text-left transition-colors "+(s?"border-primary bg-primary/10":"border-border hover:bg-accent"),children:[(0,t.jsx)("div",{className:"text-sm font-medium "+(s?"text-primary":"text-foreground"),children:e.label}),(0,t.jsx)("div",{className:eh+" mt-0.5",children:e.description})]},e.value)})})]}),A&&(0,t.jsxs)("div",{className:"space-y-3 rounded-md border bg-background/40 p-3",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("p",{className:ex,children:"GitHub remote"}),(0,t.jsxs)("p",{className:eh,children:["From the GitHub URL"," ",(0,t.jsx)("code",{className:"rounded bg-muted px-1 py-px text-[10px]",children:"github.com/acme/widgets"}),", the owner is ",(0,t.jsx)("strong",{children:"acme"})," and the repository is"," ",(0,t.jsx)("strong",{children:"widgets"}),"."]})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:em,children:"Owner (user or org)"}),(0,t.jsx)(x.Input,{value:o,onChange:e=>d(e.target.value),placeholder:"acme"})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:em,children:"Repository name"}),(0,t.jsx)(x.Input,{value:c,onChange:e=>u(e.target.value),placeholder:"widgets"})]})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:em,children:"GitHub account to use"}),(0,t.jsxs)("select",{value:m,onChange:e=>h(e.target.value),className:"h-9 w-full rounded-md border bg-background px-2 text-sm",children:[(0,t.jsx)("option",{value:"",children:"default"}),H.map(e=>(0,t.jsx)("option",{value:e.alias,children:e.alias},e.alias))]}),(0,t.jsxs)("p",{className:eh,children:["Which set of GitHub credentials the agent should use to read this repo."," ",0===H.length?"Only the default account is set up — manage more under Connections → GitHub accounts.":"Manage accounts under Connections → GitHub accounts."]})]})]}),B&&(0,t.jsxs)("div",{className:"space-y-3 rounded-md border bg-background/40 p-3",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("p",{className:ex,children:"Local clone"}),(0,t.jsx)("p",{className:eh,children:"Folder on this Mac where the repo is checked out. The agent reads source files, commits, and uncommitted changes from here."})]}),(0,t.jsx)(ea.DirectoryPickerField,{value:p,onChange:g,title:"Choose local clone directory"}),"local"===i&&(0,t.jsxs)("label",{className:"flex items-start gap-2 text-xs text-muted-foreground",children:[(0,t.jsx)("input",{type:"checkbox",checked:y,onChange:e=>j(e.target.checked),className:"mt-0.5"}),(0,t.jsx)("span",{children:"This folder is not (and will never be) backed by a GitHub remote. Skip GitHub linking permanently."})]})]}),(0,t.jsxs)("div",{className:"space-y-3 rounded-md border bg-background/40 p-3",children:[(0,t.jsx)("p",{className:ex,children:"Naming & tracking"}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:em,children:"Display name (optional)"}),(0,t.jsx)(x.Input,{value:f,onChange:e=>b(e.target.value),placeholder:"Leave blank to use the repo or folder name"}),(0,t.jsx)("p",{className:eh,children:"How this repository appears in the dashboard and in your context notes."})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:em,children:"How should the agent treat this?"}),(0,t.jsx)("div",{className:"grid gap-2",children:eg.map(e=>{let s=N===e.value;return(0,t.jsxs)("button",{type:"button",onClick:()=>k(e.value),className:"rounded-md border px-3 py-2 text-left transition-colors "+(s?"border-primary bg-primary/10":"border-border hover:bg-accent"),children:[(0,t.jsx)("div",{className:"text-sm font-medium "+(s?"text-primary":"text-foreground"),children:e.label}),(0,t.jsx)("div",{className:eh+" mt-0.5",children:e.description})]},e.value)})})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:em,children:"Category (tag)"}),(0,t.jsx)("select",{value:w,onChange:e=>C(e.target.value),className:"h-9 w-full rounded-md border bg-background px-2 text-sm",children:ey.map(e=>(0,t.jsx)("option",{value:e,children:e},e))}),(0,t.jsx)("p",{className:eh,children:"Used to group repositories in the dashboard. Pick whichever feels right."})]})]}),S&&(0,t.jsx)("p",{className:"rounded-md border border-red-200 bg-red-50/50 p-2 text-xs text-red-700 dark:border-red-900 dark:bg-red-950/30 dark:text-red-300",children:S}),(0,t.jsxs)("div",{className:"flex items-center justify-end gap-2 border-t pt-4",children:[(0,t.jsx)(n.Button,{type:"button",variant:"ghost",onClick:e,children:"Cancel"}),(0,t.jsx)(n.Button,{type:"submit",disabled:a.isPending,children:a.isPending?"Adding…":"Add repository"})]})]})]})})}var ef=e.i(75187);e.s(["default",0,function(){let e=(0,er.useRepositories)(),{data:d,isLoading:c}=(0,ef.useHealth)(),[u,m]=(0,s.useState)(!1),h=e.data?.repositories??[],x=h.length,p=h.filter(e=>e.githubOwner&&e.githubRepo).length,g=h.filter(e=>e.localPath).length,y=e.isLoading||c,j=!y&&(!e.data||!d);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.ConnectionsSectionHeader,{title:"Repositories",description:"Each repository pairs an optional GitHub remote and an optional local clone. Configure polling, triggers, and daily git management on the my life › git page.",healthy:+(x>0),total:1,actions:(0,t.jsxs)(n.Button,{onClick:()=>m(!0),children:[(0,t.jsx)(r.Plus,{className:"h-4 w-4"}),"Add repository"]})}),j&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"Daemon not connected. Start the daemon to manage repositories."}),!y&&(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(_.IntegrationCard,{integrationKey:"git"}),(0,t.jsx)(_.IntegrationCard,{integrationKey:"github"}),0===h.length?(0,t.jsx)(l.EmptyState,{icon:a.GitBranch,title:"No repositories registered",description:"Add a repository to start watching commits, polling GitHub events, and wiring per-repo triggers.",children:(0,t.jsxs)(n.Button,{className:"mt-4",onClick:()=>m(!0),children:[(0,t.jsx)(r.Plus,{className:"h-4 w-4"}),"Add your first repository"]})}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.Card,{className:"flex items-center justify-between text-xs text-muted-foreground",children:(0,t.jsxs)("span",{children:[x," repositor",1===x?"y":"ies"," ·"," ",p," with GitHub · ",g," with local clone"]})}),(0,t.jsx)("div",{className:"space-y-3",children:h.map(e=>(0,t.jsx)(eo,{repo:e},e.id))})]}),(0,t.jsx)(w,{}),(0,t.jsx)(T,{}),(0,t.jsx)(E,{}),(0,t.jsx)($.ProcessModelCard,{processKey:"git.project.init",title:"Git Project Init Model",description:"Generates the initial overview MD when daily git management is first enabled for a repository."}),(0,t.jsx)($.ProcessModelCard,{processKey:"git.project.update",title:"Git Project Update Model",description:"Runs the daily 24h scan that appends to journal MDs and curates overview sections."}),(0,t.jsx)($.ProcessModelCard,{processKey:"git.project.retemplate",title:"Git Project Re-template Model",description:"One-shot session that re-conforms existing project documents to the current template body."})]}),u&&(0,t.jsx)(ej,{onClose:()=>m(!1)})]})}],23682)}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,23682,e=>{"use strict";var t=e.i(54710),s=e.i(34416),a=e.i(59481),n=e.i(60168),r=e.i(20014),i=e.i(74490),l=e.i(50862),o=e.i(85631),d=e.i(76610),c=e.i(2745),u=e.i(36451),m=e.i(79634),h=e.i(48467),p=e.i(8652),x=e.i(20870),g=e.i(14260),j=e.i(57415),y=e.i(95486),f=e.i(65268);let b=["git-accounts"];function v(){return(0,g.useQuery)({queryKey:b,queryFn:()=>f.api.get("/git-accounts"),staleTime:3e4})}let N=/^[a-z0-9._-]+$/,k={alias:"",type:"github",authMode:"gh-cli-profile",ghProfile:"",host:"github.com",token:""};function w(){let e,a,i=v(),l=(e=(0,y.useQueryClient)(),(0,j.useMutation)({mutationFn:({alias:e,payload:t})=>f.api.put(`/git-accounts/${e}`,t),onSuccess:()=>{e.invalidateQueries({queryKey:b}),e.invalidateQueries({queryKey:["config"]})}})),o=(a=(0,y.useQueryClient)(),(0,j.useMutation)({mutationFn:e=>f.api.delete(`/git-accounts/${e}`),onSuccess:()=>{a.invalidateQueries({queryKey:b}),a.invalidateQueries({queryKey:["config"]})}})),c=(0,j.useMutation)({mutationFn:e=>f.api.post(`/git-accounts/${e}/probe`,{})}),[u,h]=(0,s.useState)(k),[g,w]=(0,s.useState)(null),[S,P]=(0,s.useState)({}),A=i.data?.accounts??[],B=async()=>{if(w(null),!N.test(u.alias))return void w("Alias must use lowercase letters, digits, dot, dash, or underscore.");if("gh-cli-profile"===u.authMode&&!u.ghProfile.trim())return void w("gh-cli-profile mode requires a gh login name.");if("pat-keychain"===u.authMode&&!u.token.trim())return void w("PAT mode requires a token on first save.");try{await l.mutateAsync({alias:u.alias,payload:{type:u.type,authMode:u.authMode,host:u.host||"github.com",..."gh-cli-profile"===u.authMode?{ghProfile:u.ghProfile}:{},...u.token?{token:u.token}:{}}}),h(k)}catch(e){w(e instanceof Error?e.message:"Failed to save account.")}},M=async e=>{P(t=>({...t,[e]:"Probing…"}));try{let t=await c.mutateAsync(e),s=t.ok?`OK — authenticated as ${t.login}`:`Probe failed: ${t.reason??"unknown"}`;P(t=>({...t,[e]:s}))}catch(t){P(s=>({...s,[e]:t instanceof Error?t.message:"Probe failed"}))}};return(0,t.jsx)(x.ConnectionCard,{name:"Git Accounts",icon:(0,t.jsx)(d.KeyRound,{className:"h-4 w-4"}),status:(0,x.deriveConfiguredStatus)(A.length>0),children:(0,t.jsxs)("div",{className:"mt-2 space-y-3",children:[(0,t.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Named credentials attached to watched repositories via"," ",(0,t.jsx)("code",{className:"rounded bg-muted px-1",children:"accountAlias"}),". Direct mode injects the resolved token per poll; Delegated mode currently uses the default ",(0,t.jsx)("code",{children:"gh"})," profile."]}),g&&(0,t.jsx)(m.Alert,{variant:"error",children:g}),(0,t.jsxs)("div",{className:"space-y-2",children:[0===A.length&&(0,t.jsx)("p",{className:"text-xs italic text-muted-foreground",children:"No accounts configured. Add one below."}),A.map(e=>(0,t.jsx)(C,{entry:e,onDelete:()=>o.mutate(e.alias),onProbe:()=>M(e.alias),probeMessage:S[e.alias],busy:o.isPending||c.isPending},e.alias))]}),(0,t.jsxs)("div",{className:"space-y-2 rounded border bg-background p-3",children:[(0,t.jsx)("p",{className:"text-xs font-medium",children:"Add account"}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsx)(p.Input,{value:u.alias,onChange:e=>h(t=>({...t,alias:e.target.value})),placeholder:"alias (e.g. work-github)",className:"max-w-[200px]"}),(0,t.jsxs)("select",{value:u.authMode,onChange:e=>h(t=>({...t,authMode:e.target.value})),className:"h-9 rounded border bg-background px-2 text-sm",children:[(0,t.jsx)("option",{value:"gh-cli-profile",children:"gh CLI profile"}),(0,t.jsx)("option",{value:"pat-keychain",children:"Personal Access Token"})]}),(0,t.jsx)(p.Input,{value:u.host,onChange:e=>h(t=>({...t,host:e.target.value})),placeholder:"github.com",className:"max-w-[180px]"}),"gh-cli-profile"===u.authMode?(0,t.jsx)(p.Input,{value:u.ghProfile,onChange:e=>h(t=>({...t,ghProfile:e.target.value})),placeholder:"gh login name (e.g. alice)",className:"max-w-[220px]"}):(0,t.jsx)(p.Input,{type:"password",value:u.token,onChange:e=>h(t=>({...t,token:e.target.value})),placeholder:"ghp_… (PAT — never persisted to disk)",className:"max-w-[280px]"}),(0,t.jsxs)(r.Button,{size:"sm",variant:"outline",onClick:B,disabled:l.isPending||!u.alias.trim(),children:[(0,t.jsx)(n.Plus,{className:"mr-1 h-3.5 w-3.5"}),"Save"]})]})]})]})})}function C({entry:e,onDelete:s,onProbe:a,probeMessage:n,busy:i}){return(0,t.jsxs)("div",{className:"flex flex-col gap-2 rounded border bg-background p-2 sm:flex-row sm:items-center",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("p",{className:"font-mono text-sm font-medium",children:e.alias}),(0,t.jsxs)("div",{className:"mt-1 flex flex-wrap items-center gap-1.5",children:[(0,t.jsx)(h.Badge,{variant:"gray",children:e.host}),(0,t.jsx)(h.Badge,{variant:"pat-keychain"===e.authMode?"green":"gray",children:e.authMode}),e.ghProfile&&(0,t.jsxs)(h.Badge,{variant:"gray",children:["user: ",e.ghProfile]}),!0===e.tokenStored&&(0,t.jsx)(h.Badge,{variant:"green",children:"token stored"}),!1===e.tokenStored&&(0,t.jsx)(h.Badge,{variant:"red",children:"no token"})]}),n&&(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:n})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)(r.Button,{size:"sm",variant:"ghost",onClick:a,disabled:i,children:[(0,t.jsx)(c.ShieldCheck,{className:"mr-1 h-3.5 w-3.5"}),"Probe"]}),(0,t.jsx)(r.Button,{size:"sm",variant:"ghost",onClick:s,disabled:i,className:"h-8 w-8 p-0",children:(0,t.jsx)(u.X,{className:"h-3.5 w-3.5"})})]})]})}var S=e.i(77379);let P=(0,S.default)("FileType2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M2 13v-1h6v1",key:"1dh9dg"}],["path",{d:"M5 12v6",key:"150t9c"}],["path",{d:"M4 18h2",key:"1xrofg"}]]);var A=e.i(72740),B=e.i(64213),M=e.i(7663),R=e.i(43477);let H=e=>["git-template",e],F=["git-template","retemplate-status"];function G(){return(0,g.useQuery)({queryKey:F,queryFn:()=>f.api.get("/git/templates/retemplate/status"),refetchInterval:e=>{let t=e.state.data;return!!(t?.status&&!t.status.finalizedAt)&&2e3},staleTime:1e3})}function L(e){return"project"===e?"Project (projects/<slug>.md)":"Repo-only (git-repos/<slug>.md)"}let O=["project","git-repo"];function T(){let e=G(),s=e.data?.status??null,a=function(e){if(!e)return null;if(!e.finalizedAt)return{label:"Re-template in progress…",tone:"info"};switch(e.finalStatus){case"success":default:return{label:"Re-template completed",tone:"success"};case"partial":return{label:"Re-template completed with rollbacks",tone:"warning"};case"failed":return{label:"Re-template failed",tone:"error"}}}(s);return(0,t.jsx)(x.ConnectionCard,{name:"Project document templates",icon:(0,t.jsx)(P,{className:"h-4 w-4"}),status:(0,x.deriveConfiguredStatus)(!0),children:(0,t.jsxs)("div",{className:"mt-2 space-y-3",children:[(0,t.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Edit the templates the agent uses when it (re)writes"," ",(0,t.jsx)("code",{className:"rounded bg-muted px-1",children:"context/projects/<slug>.md"})," ","and"," ",(0,t.jsx)("code",{className:"rounded bg-muted px-1",children:"context/git-repos/<slug>.md"}),". Changes are forward-only — existing files keep their old shape until the next git lifecycle event touches them, or until you press “Apply” below to re-conform every existing file at once."]}),a&&(0,t.jsx)(m.Alert,{variant:"error"===a.tone?"error":"warning"===a.tone?"warning":"success"===a.tone?"success":"info",children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)("span",{children:a.label}),s&&(0,t.jsxs)("span",{className:"text-xs font-mono text-muted-foreground",children:[s.kind," · run #",s.scheduleId]})]})}),O.map(e=>(0,t.jsx)(q,{kind:e},e)),(0,t.jsx)(D,{})]})})}function q({kind:e}){let a,n,i,l=(0,g.useQuery)({queryKey:H(e),queryFn:()=>f.api.get(`/git/templates/${encodeURIComponent(e)}`),staleTime:5e3}),o=(a=(0,y.useQueryClient)(),(0,j.useMutation)({mutationFn:t=>f.api.put(`/git/templates/${encodeURIComponent(e)}`,{content:t}),onSuccess:()=>{a.invalidateQueries({queryKey:H(e)})}})),d=(n=(0,y.useQueryClient)(),(0,j.useMutation)({mutationFn:()=>f.api.post(`/git/templates/${encodeURIComponent(e)}/apply`),onSuccess:()=>{n.invalidateQueries({queryKey:F})}})),[c,u]=(0,s.useState)(null),[p,x]=(0,s.useState)(null),[b,v]=(0,s.useState)(!1),[N,k]=(0,s.useState)(null),w=l.data?.active??"",C=l.data?.bundled??"",S=l.data?.hasOverride??!1,P=c??w,G=null!==c&&c!==w,O=async()=>{if(null!==c){x(null);try{await o.mutateAsync(c),u(null)}catch(e){x(e instanceof Error?e.message:"Failed to save template")}}},T=(i=L(e),{title:`Re-template 0 ${"project"===e?"project":"git-repo"} documents?`,bullets:[`${i} files will be re-conformed to the current template body.`,"Re-templating may lose information or formatting that the new template does not represent. Files matching the previous schema's sections may have content moved, merged, or dropped depending on how the template changed.","Every targeted file is auto-backed up before the run. The backup path is shown after you confirm.","If a file's session aborts mid-write, the daemon restores it from backup automatically."],acknowledge:"Yes, apply the template"}),D=async()=>{x(null);try{let e=await d.mutateAsync();k(e),v(!1)}catch(e){x(e instanceof Error?e.message:"Failed to apply template")}};return(0,t.jsxs)("div",{className:"rounded border bg-card p-3 space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm font-medium",children:L(e)}),S&&(0,t.jsx)(h.Badge,{variant:"green",children:"overridden"})]}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:"project"===e?"project.md":"git-repo.md"})]}),p&&(0,t.jsx)(m.Alert,{variant:"error",children:p}),(0,t.jsxs)("div",{className:"grid gap-2 lg:grid-cols-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"mb-1 text-xs font-medium text-muted-foreground",children:"Bundled (read-only)"}),(0,t.jsx)("textarea",{value:C,readOnly:!0,className:"h-64 w-full resize-none rounded border bg-muted p-2 font-mono text-xs"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"mb-1 text-xs font-medium text-muted-foreground",children:"Active (edit and save)"}),(0,t.jsx)("textarea",{value:P,onChange:e=>u(e.target.value),className:"h-64 w-full resize-none rounded border bg-background p-2 font-mono text-xs",spellCheck:!1,disabled:l.isLoading})]})]}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsxs)(r.Button,{size:"sm",variant:"outline",onClick:O,disabled:!G||o.isPending,children:[(0,t.jsx)(M.Save,{className:"mr-1 h-3.5 w-3.5"}),"Save template"]}),(0,t.jsx)(r.Button,{size:"sm",variant:"ghost",onClick:()=>{u(C)},disabled:l.isLoading,children:"Reset to bundled"}),(0,t.jsxs)(r.Button,{size:"sm",variant:"default",onClick:()=>v(!0),disabled:d.isPending,children:[d.isPending?(0,t.jsx)(A.Loader2,{className:"mr-1 h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(B.Play,{className:"mr-1 h-3.5 w-3.5"}),"Apply current template to existing ","project"===e?"projects":"git-repos"]})]}),N&&(0,t.jsx)(m.Alert,{variant:"info",children:(0,t.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,t.jsxs)("div",{children:["Re-template enqueued — schedule #",N.scheduleId,","," ",N.targets.length," file(s) backed up."]}),(0,t.jsxs)("div",{className:"font-mono text-muted-foreground break-all",children:["backup: ",N.backupRoot]})]})}),(0,t.jsx)(R.Sheet,{open:b,onOpenChange:v,children:(0,t.jsxs)(R.SheetContent,{side:"right",className:"w-[480px] sm:w-[540px]",children:[(0,t.jsx)(R.SheetHeader,{children:(0,t.jsx)(R.SheetTitle,{children:T.title})}),(0,t.jsxs)("div",{className:"mt-4 space-y-3 text-sm",children:[(0,t.jsx)("ul",{className:"list-disc space-y-1 pl-5",children:T.bullets.map(e=>(0,t.jsx)("li",{children:e},e))}),(0,t.jsxs)("div",{className:"flex gap-2 pt-2",children:[(0,t.jsxs)(r.Button,{size:"sm",onClick:D,disabled:d.isPending,children:[d.isPending&&(0,t.jsx)(A.Loader2,{className:"mr-1 h-3.5 w-3.5 animate-spin"}),T.acknowledge]}),(0,t.jsx)(r.Button,{size:"sm",variant:"ghost",onClick:()=>v(!1),children:"Cancel"})]})]})]})})]})}function D(){let e=G(),a=e.data?.status??null,n=(0,s.useMemo)(()=>a?Object.values(a.files).map(e=>({slug:e.slug,contextFile:e.contextFile,status:e.status,reason:e.reason??null,error:e.error??null,bytesDelta:void 0!==e.beforeBytes&&void 0!==e.afterBytes?e.afterBytes-e.beforeBytes:null,startedAt:e.startedAt??null,completedAt:e.completedAt??null})).sort((e,t)=>e.slug.localeCompare(t.slug)):[],[a]),r=(0,s.useMemo)(()=>(function(e){let t={pending:0,started:0,completed:0,skipped:0,failed:0,rolled_back:0};for(let s of e)t[s.status]+=1;return t})(n),[n]);return a?(0,t.jsxs)("div",{className:"rounded border bg-card p-3 space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-sm font-medium",children:"Last re-template run"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1 text-xs",children:Object.entries(r).map(([e,s])=>s>0?(0,t.jsxs)(h.Badge,{variant:z(e),children:[e,": ",s]},e):null)})]}),(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)("table",{className:"w-full text-xs",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{className:"border-b text-left text-muted-foreground",children:[(0,t.jsx)("th",{className:"px-2 py-1",children:"Slug"}),(0,t.jsx)("th",{className:"px-2 py-1",children:"Status"}),(0,t.jsx)("th",{className:"px-2 py-1",children:"File"}),(0,t.jsx)("th",{className:"px-2 py-1",children:"Bytes Δ"}),(0,t.jsx)("th",{className:"px-2 py-1",children:"Note"})]})}),(0,t.jsx)("tbody",{children:n.map(e=>(0,t.jsxs)("tr",{className:"border-b last:border-0",children:[(0,t.jsx)("td",{className:"px-2 py-1 font-mono",children:e.slug}),(0,t.jsx)("td",{className:"px-2 py-1",children:(0,t.jsx)(h.Badge,{variant:z(e.status),children:e.status})}),(0,t.jsx)("td",{className:"px-2 py-1 font-mono text-muted-foreground",children:e.contextFile}),(0,t.jsx)("td",{className:"px-2 py-1",children:null===e.bytesDelta?"—":e.bytesDelta>=0?`+${e.bytesDelta}`:`${e.bytesDelta}`}),(0,t.jsx)("td",{className:"px-2 py-1 text-muted-foreground",children:e.error??e.reason??""})]},e.slug))})]})})]}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:"No re-template runs recorded yet."})}function z(e){switch(e){case"completed":return"green";case"skipped":return"gray";case"started":case"pending":return"blue";case"failed":return"red";case"rolled_back":return"amber";default:return"default"}}let I=(0,S.default)("FilePen",[["path",{d:"M12.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v9.5",key:"1couwa"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M13.378 15.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"1y4qbx"}]]);var K=e.i(25795);let U=["task-flows"],Q=["git.","github."];function E(){let e,a,n=(0,g.useQuery)({queryKey:U,queryFn:()=>f.api.get("/task-flows"),staleTime:3e4}),i=(0,s.useMemo)(()=>(n.data?.flows??[]).filter(e=>Q.some(t=>e.key.startsWith(t))),[n.data]),[l,o]=(0,s.useState)(null),d=l??(i.length>0?i[0].key:null),c=(0,g.useQuery)({queryKey:["task-flow",d],queryFn:()=>null===d?Promise.reject(Error("no_key")):f.api.get(`/task-flows/${encodeURIComponent(d)}`),enabled:null!==d,staleTime:5e3}),u=(e=(0,y.useQueryClient)(),(0,j.useMutation)({mutationFn:({key:e,content:t})=>f.api.put(`/task-flows/${encodeURIComponent(e)}`,{content:t}),onSuccess:(t,{key:s})=>{e.invalidateQueries({queryKey:U}),e.invalidateQueries({queryKey:["task-flow",s]})}})),p=(a=(0,y.useQueryClient)(),(0,j.useMutation)({mutationFn:e=>f.api.delete(`/task-flows/${encodeURIComponent(e)}`),onSuccess:(e,t)=>{a.invalidateQueries({queryKey:U}),a.invalidateQueries({queryKey:["task-flow",t]})}})),[b,v]=(0,s.useState)({}),[N,k]=(0,s.useState)(null),w=d?b[d]??c.data?.override??c.data?.bundled??"":"",C=!!d&&void 0!==b[d]&&b[d]!==(c.data?.override??""),S=i.filter(e=>e.hasOverride).length,P=async()=>{if(d){k(null);try{await u.mutateAsync({key:d,content:w})}catch(e){k(e instanceof Error?e.message:"Failed to save override")}}},A=async()=>{if(d){k(null);try{await p.mutateAsync(d),v(e=>{let t={...e};return delete t[d],t})}catch(e){k(e instanceof Error?e.message:"Failed to reset")}}};return(0,t.jsx)(x.ConnectionCard,{name:"Task Flow Overrides",icon:(0,t.jsx)(I,{className:"h-4 w-4"}),status:(0,x.deriveConfiguredStatus)(S>0),children:(0,t.jsxs)("div",{className:"mt-2 space-y-3",children:[(0,t.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Override the prompt body the dispatcher uses for a Git/GitHub event. The bundled body stays read-only on the left; your edits land at ",(0,t.jsx)("code",{className:"rounded bg-muted px-1",children:"~/.personal-agent/task-flows/<key>.md"})," ","and take effect on the next session. Resetting falls back to bundled."]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsxs)("select",{value:d??"",onChange:e=>o(e.target.value||null),className:"h-9 min-w-[260px] rounded border bg-background px-2 text-sm",disabled:0===i.length,children:[0===i.length&&(0,t.jsx)("option",{value:"",children:"No git.* / github.* keys"}),i.map(e=>(0,t.jsxs)("option",{value:e.key,children:[e.key,e.hasOverride?" ★":""]},e.key))]}),c.data?.hasOverride&&(0,t.jsx)(h.Badge,{variant:"green",children:"overridden"})]}),N&&(0,t.jsx)(m.Alert,{variant:"error",children:N}),(0,t.jsxs)("div",{className:"grid gap-3 lg:grid-cols-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"mb-1 text-xs font-medium text-muted-foreground",children:"Bundled (read-only)"}),(0,t.jsx)("textarea",{value:c.data?.bundled??"",readOnly:!0,className:"h-72 w-full resize-none rounded border bg-muted p-2 font-mono text-xs"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"mb-1 text-xs font-medium text-muted-foreground",children:"Override (edit and save)"}),(0,t.jsx)("textarea",{value:w,onChange:e=>{var t;return t=e.target.value,void(d&&v(e=>({...e,[d]:t})))},className:"h-72 w-full resize-none rounded border bg-background p-2 font-mono text-xs",spellCheck:!1})]})]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)(r.Button,{size:"sm",variant:"outline",onClick:P,disabled:!d||u.isPending||!C,children:[(0,t.jsx)(M.Save,{className:"mr-1 h-3.5 w-3.5"}),"Save override"]}),(0,t.jsxs)(r.Button,{size:"sm",variant:"ghost",onClick:A,disabled:!d||p.isPending||!c.data?.hasOverride,children:[(0,t.jsx)(K.RotateCcw,{className:"mr-1 h-3.5 w-3.5"}),"Reset to bundled"]})]})]})})}var $=e.i(32220),_=e.i(32077),W=e.i(45958),V=e.i(26181),J=e.i(55575);let X=(0,S.default)("Github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]);var Y=e.i(40974),Z=e.i(21682),ee=e.i(90925);let et=(0,S.default)("Unlink",[["path",{d:"m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71",key:"yqzxt4"}],["path",{d:"m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71",key:"4qinb0"}],["line",{x1:"8",x2:"8",y1:"2",y2:"5",key:"1041cp"}],["line",{x1:"2",x2:"5",y1:"8",y2:"8",key:"14m1p5"}],["line",{x1:"16",x2:"16",y1:"19",y2:"22",key:"rzdirn"}],["line",{x1:"19",x2:"22",y1:"16",y2:"16",key:"ox905f"}]]);var es=e.i(90826),ea=e.i(58436),en=e.i(1733);let er="text-[11px] font-medium uppercase tracking-wider text-muted-foreground",ei=["project","repo-only"],el=["work","personal","research","client","other"];function eo({repo:e}){let[l,o]=(0,s.useState)(!1),[d,c]=(0,s.useState)(!1),[u,m]=(0,s.useState)(!1),p=(0,en.useDeleteRepository)(),x=(0,en.useUpdateRepository)(),g=(0,es.useConfirm)(),j=(0,en.repositoryHasGithub)(e),y=(0,en.repositoryHasLocal)(e),f=e.localOnly,b=async()=>{await g({title:`Delete ${(0,en.repositoryDisplayName)(e)}?`,description:"This removes the repository registration along with its triggers and management state. The local clone on disk is not touched.",confirmLabel:"Delete",variant:"destructive"})&&await p.mutateAsync(e.id)},v=async t=>{t&&j?await g({title:"Mark as local-only?",description:"This will clear the GitHub link. To keep both sides, leave 'local-only' off.",confirmLabel:"Mark local-only"})&&await x.mutateAsync({id:e.id,body:{localOnly:!0,githubOwner:null,githubRepo:null,githubAccount:null}}):await x.mutateAsync({id:e.id,body:{localOnly:t}})},N=async()=>{j?await g({title:"Unlink local clone?",description:`The clone at ${e.localPath} stays on disk; only the registration is detached.`,confirmLabel:"Unlink"})&&await x.mutateAsync({id:e.id,body:{localPath:null}}):await g({title:"Cannot unlink the local clone",description:"This row has no GitHub side, so unlinking would leave it empty. Delete the repository instead.",confirmLabel:"OK"})},k=async()=>{!await g({title:"Unlink GitHub remote?",description:y?"The local clone stays registered.":"This row has no local clone, so unlinking would leave it empty. Use 'Mark local-only' instead.",confirmLabel:"Unlink"})||y&&await x.mutateAsync({id:e.id,body:{githubOwner:null,githubRepo:null,githubAccount:null}})};return(0,t.jsxs)(i.Card,{children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(a.GitBranch,{className:"h-4 w-4 text-muted-foreground"}),(0,t.jsx)("span",{className:"truncate text-sm font-medium text-foreground",children:(0,en.repositoryDisplayName)(e)}),f&&(0,t.jsxs)(h.Badge,{variant:"gray",className:"text-[10px]",children:[(0,t.jsx)(Y.Lock,{className:"mr-1 h-3 w-3"}),"local-only"]}),(0,t.jsx)(h.Badge,{variant:"project"===e.classification?"green":"gray",children:e.classification}),(0,t.jsx)(h.Badge,{variant:"gray",children:e.category})]}),(0,t.jsx)("p",{className:"mt-1 truncate text-[11px] text-muted-foreground",children:e.id})]}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-1",children:[(0,t.jsx)(r.Button,{size:"sm",variant:"ghost",onClick:()=>o(!0),title:"Edit",children:(0,t.jsx)(Z.Pencil,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(r.Button,{size:"sm",variant:"ghost",onClick:b,title:"Delete",children:(0,t.jsx)(ee.Trash2,{className:"h-3.5 w-3.5"})})]})]}),(0,t.jsxs)("div",{className:"mt-3 grid gap-3 md:grid-cols-2",children:[(0,t.jsxs)("div",{className:"rounded-md border bg-background/40 p-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 text-xs font-medium text-muted-foreground",children:[(0,t.jsx)(X,{className:"h-3.5 w-3.5"}),"GitHub"]}),j?(0,t.jsxs)("div",{className:"mt-1 space-y-1 text-sm",children:[(0,t.jsxs)("p",{className:"font-medium",children:[e.githubOwner,"/",e.githubRepo]}),(0,t.jsxs)("p",{className:"text-[11px] text-muted-foreground",children:["account: ",e.githubAccount??"default"]}),y&&!f&&(0,t.jsxs)(r.Button,{size:"sm",variant:"ghost",className:"mt-1 h-7 px-1.5",onClick:k,children:[(0,t.jsx)(et,{className:"mr-1 h-3 w-3"}),"Unlink"]})]}):f?(0,t.jsx)("p",{className:"mt-2 text-xs text-muted-foreground",children:"Local-only — toggle off to enable GitHub linking."}):(0,t.jsxs)(r.Button,{size:"sm",variant:"outline",className:"mt-2 h-8",onClick:()=>c(!0),children:[(0,t.jsx)(n.Plus,{className:"mr-1 h-3 w-3"}),"Link GitHub remote"]})]}),(0,t.jsxs)("div",{className:"rounded-md border bg-background/40 p-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 text-xs font-medium text-muted-foreground",children:[(0,t.jsx)(J.FolderOpen,{className:"h-3.5 w-3.5"}),"Local clone"]}),y?(0,t.jsxs)("div",{className:"mt-1 space-y-1 text-sm",children:[(0,t.jsx)("p",{className:"truncate font-medium",title:e.localPath??"",children:e.localPath}),(0,t.jsxs)("p",{className:"text-[11px] text-muted-foreground",children:["slug: ",(0,t.jsx)("span",{className:"font-mono",children:e.slug})]}),j&&(0,t.jsxs)(r.Button,{size:"sm",variant:"ghost",className:"mt-1 h-7 px-1.5",onClick:N,children:[(0,t.jsx)(et,{className:"mr-1 h-3 w-3"}),"Unlink"]})]}):(0,t.jsxs)(r.Button,{size:"sm",variant:"outline",className:"mt-2 h-8",onClick:()=>m(!0),children:[(0,t.jsx)(n.Plus,{className:"mr-1 h-3 w-3"}),"Link local clone"]})]})]}),(0,t.jsxs)("div",{className:"mt-3 flex items-center justify-between text-[11px] text-muted-foreground",children:[(0,t.jsxs)("label",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("input",{type:"checkbox",checked:f,disabled:x.isPending,onChange:e=>void v(e.target.checked)}),"Local-only repository"]}),(0,t.jsxs)(W.default,{href:"/git",className:"flex items-center gap-1 text-foreground underline-offset-2 hover:underline",children:["Configure polling & triggers in my life › git",(0,t.jsx)(V.ArrowUpRight,{className:"h-3 w-3"})]})]}),(0,t.jsx)(ed,{repo:e,open:l,onClose:()=>o(!1)}),(0,t.jsx)(eu,{repo:e,open:d,onClose:()=>c(!1)}),(0,t.jsx)(eh,{repo:e,open:u,onClose:()=>m(!1)})]})}function ed({repo:e,open:s,onClose:a}){return(0,t.jsx)(R.Sheet,{open:s,onOpenChange:e=>!e&&a(),children:s&&(0,t.jsx)(ec,{repo:e,onClose:a})})}function ec({repo:e,onClose:a}){let n=(0,en.useUpdateRepository)(),[i,l]=(0,s.useState)(e.displayName??""),[o,d]=(0,s.useState)(e.classification),[c,u]=(0,s.useState)(e.category),[m,h]=(0,s.useState)(null),x=async t=>{t.preventDefault(),h(null);try{let t={displayName:i.trim()?i.trim():null,classification:o,category:c};await n.mutateAsync({id:e.id,body:t}),a()}catch(e){h(e instanceof Error?e.message:"Failed to save changes")}};return(0,t.jsxs)(R.SheetContent,{className:"overflow-y-auto",children:[(0,t.jsx)(R.SheetHeader,{children:(0,t.jsx)(R.SheetTitle,{children:"Edit repository metadata"})}),(0,t.jsxs)("form",{onSubmit:x,className:"mt-6 space-y-4",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:er,children:"Display name"}),(0,t.jsx)(p.Input,{value:i,onChange:e=>l(e.target.value),placeholder:(0,en.repositoryDisplayName)(e)}),(0,t.jsx)("p",{className:"text-[11px] text-muted-foreground",children:"Optional — drives the slug used for context paths and dashboard deep-links."})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:er,children:"Classification"}),(0,t.jsx)("select",{value:o,onChange:e=>d(e.target.value),className:"h-9 w-full rounded-md border bg-background px-2 text-sm",children:ei.map(e=>(0,t.jsx)("option",{value:e,children:e},e))}),(0,t.jsx)("p",{className:"text-[11px] text-muted-foreground",children:"Project entries carry lifecycle phases in the overview MD; repo-only stays lightweight."})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:er,children:"Category"}),(0,t.jsx)("select",{value:c,onChange:e=>u(e.target.value),className:"h-9 w-full rounded-md border bg-background px-2 text-sm",children:el.map(e=>(0,t.jsx)("option",{value:e,children:e},e))})]}),m&&(0,t.jsx)("p",{className:"rounded-md border border-red-200 bg-red-50/50 p-2 text-xs text-red-700 dark:border-red-900 dark:bg-red-950/30 dark:text-red-300",children:m}),(0,t.jsxs)("div",{className:"flex items-center justify-end gap-2 border-t pt-4",children:[(0,t.jsx)(r.Button,{type:"button",variant:"ghost",onClick:a,children:"Cancel"}),(0,t.jsx)(r.Button,{type:"submit",disabled:n.isPending,children:n.isPending?"Saving…":"Save"})]})]})]})}function eu({repo:e,open:s,onClose:a}){return(0,t.jsx)(R.Sheet,{open:s,onOpenChange:e=>!e&&a(),children:s&&(0,t.jsx)(em,{repo:e,onClose:a})})}function em({repo:e,onClose:a}){let n=(0,en.useLinkGithub)(),{data:i}=v(),[l,o]=(0,s.useState)(""),[d,c]=(0,s.useState)(""),[u,m]=(0,s.useState)(""),[h,x]=(0,s.useState)(null),g=async t=>{if(t.preventDefault(),x(null),!l.trim()||!d.trim())return void x("owner and repo are required");try{await n.mutateAsync({id:e.id,owner:l.trim(),repo:d.trim(),account:u.trim()||void 0}),a()}catch(e){x(e instanceof Error?e.message:"Failed to link")}};return(0,t.jsxs)(R.SheetContent,{className:"overflow-y-auto",children:[(0,t.jsx)(R.SheetHeader,{children:(0,t.jsx)(R.SheetTitle,{children:"Link a GitHub remote"})}),(0,t.jsxs)("form",{onSubmit:g,className:"mt-6 space-y-4",children:[(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:"Personal accounts on github.com only. GHES is not in scope for v1."}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:er,children:"Owner"}),(0,t.jsx)(p.Input,{value:l,onChange:e=>o(e.target.value),placeholder:"acme",autoFocus:!0})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:er,children:"Repository"}),(0,t.jsx)(p.Input,{value:d,onChange:e=>c(e.target.value),placeholder:"widgets"})]})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:er,children:"Account alias"}),(0,t.jsxs)("select",{value:u,onChange:e=>m(e.target.value),className:"h-9 w-full rounded-md border bg-background px-2 text-sm",children:[(0,t.jsx)("option",{value:"",children:"default"}),(i?.accounts??[]).map(e=>(0,t.jsx)("option",{value:e.alias,children:e.alias},e.alias))]})]}),h&&(0,t.jsx)("p",{className:"rounded-md border border-red-200 bg-red-50/50 p-2 text-xs text-red-700 dark:border-red-900 dark:bg-red-950/30 dark:text-red-300",children:h}),(0,t.jsxs)("div",{className:"flex items-center justify-end gap-2 border-t pt-4",children:[(0,t.jsx)(r.Button,{type:"button",variant:"ghost",onClick:a,children:"Cancel"}),(0,t.jsx)(r.Button,{type:"submit",disabled:n.isPending,children:n.isPending?"Linking…":"Link"})]})]})]})}function eh({repo:e,open:s,onClose:a}){return(0,t.jsx)(R.Sheet,{open:s,onOpenChange:e=>!e&&a(),children:s&&(0,t.jsx)(ep,{repo:e,onClose:a})})}function ep({repo:e,onClose:a}){let n=(0,en.useLinkLocal)(),[i,l]=(0,s.useState)(""),[o,d]=(0,s.useState)(null),c=async t=>{if(t.preventDefault(),d(null),!i.trim())return void d("Local path is required");try{await n.mutateAsync({id:e.id,localPath:i.trim()}),a()}catch(e){d(e instanceof Error?e.message:"Failed to link")}};return(0,t.jsxs)(R.SheetContent,{className:"overflow-y-auto",children:[(0,t.jsx)(R.SheetHeader,{children:(0,t.jsx)(R.SheetTitle,{children:"Link a local clone"})}),(0,t.jsxs)("form",{onSubmit:c,className:"mt-6 space-y-4",children:[(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:"Pick the directory of the local clone of this repository. The agent never inspects `.git/config` to suggest values — paths are user-supplied."}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:er,children:"Repository directory"}),(0,t.jsx)(ea.DirectoryPickerField,{value:i,onChange:l,title:"Choose local clone directory"})]}),o&&(0,t.jsx)("p",{className:"rounded-md border border-red-200 bg-red-50/50 p-2 text-xs text-red-700 dark:border-red-900 dark:bg-red-950/30 dark:text-red-300",children:o}),(0,t.jsxs)("div",{className:"flex items-center justify-end gap-2 border-t pt-4",children:[(0,t.jsx)(r.Button,{type:"button",variant:"ghost",onClick:a,children:"Cancel"}),(0,t.jsx)(r.Button,{type:"submit",disabled:n.isPending,children:n.isPending?"Linking…":"Link"})]})]})]})}let ex="text-[11px] font-medium uppercase tracking-wider text-muted-foreground",eg="text-[11px] leading-relaxed text-muted-foreground",ej="text-[11px] font-medium uppercase tracking-wider text-muted-foreground",ey=[{value:"both",label:"GitHub + local clone",description:"Recommended. Agent watches GitHub activity AND reads files from your local clone."},{value:"github",label:"GitHub only",description:"Agent watches PRs, issues, and commits on GitHub. No access to source files."},{value:"local",label:"Local folder only",description:"Agent watches a folder on this Mac. No GitHub remote — e.g. a private working directory."}],ef=[{value:"repo-only",label:"Just track activity",description:"Lightweight. Agent logs commits, PRs, and issues. No long-form project document."},{value:"project",label:"Treat as a project",description:"Agent maintains a rich project document with goals, decisions, and milestones in your context notes."}],eb=["work","personal","research","client","other"];function ev({open:e,onClose:s}){return(0,t.jsx)(R.Sheet,{open:e,onOpenChange:e=>!e&&s(),children:e&&(0,t.jsx)(eN,{onClose:s})})}function eN({onClose:e}){let a=(0,en.useCreateRepository)(),{data:n}=v(),[i,l]=(0,s.useState)("both"),[o,d]=(0,s.useState)(""),[c,u]=(0,s.useState)(""),[m,h]=(0,s.useState)(""),[x,g]=(0,s.useState)(""),[j,y]=(0,s.useState)(!1),[f,b]=(0,s.useState)(""),[N,k]=(0,s.useState)("repo-only"),[w,C]=(0,s.useState)("other"),[S,P]=(0,s.useState)(null),A="github"===i||"both"===i&&!j,B="local"===i||"both"===i,M=async t=>{t.preventDefault(),P(null);let s={classification:N,category:w,displayName:f.trim()?f.trim():void 0};if(A){if(!o.trim()||!c.trim())return void P("GitHub owner and repository are required.");s.githubOwner=o.trim(),s.githubRepo=c.trim(),m.trim()&&(s.githubAccount=m.trim())}if(B){if(!x.trim())return void P("Local clone path is required.");s.localPath=x.trim()}"local"===i&&j&&(s.localOnly=!0);try{await a.mutateAsync(s),e()}catch(e){P(e instanceof Error?e.message:"Failed to add repository")}},H=n?.accounts??[];return(0,t.jsxs)(R.SheetContent,{className:"overflow-y-auto",children:[(0,t.jsxs)(R.SheetHeader,{children:[(0,t.jsx)(R.SheetTitle,{children:"Add repository"}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:"Tell the agent about a code repository to watch. It will track activity (commits, PRs, issues) and optionally maintain a project document in your context notes."})]}),(0,t.jsxs)("form",{onSubmit:M,className:"mt-6 space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:ex,children:"Where does this repository live?"}),(0,t.jsx)("div",{className:"grid gap-2",children:ey.map(e=>{let s=i===e.value;return(0,t.jsxs)("button",{type:"button",onClick:()=>l(e.value),className:"rounded-md border px-3 py-2 text-left transition-colors "+(s?"border-primary bg-primary/10":"border-border hover:bg-accent"),children:[(0,t.jsx)("div",{className:"text-sm font-medium "+(s?"text-primary":"text-foreground"),children:e.label}),(0,t.jsx)("div",{className:eg+" mt-0.5",children:e.description})]},e.value)})})]}),A&&(0,t.jsxs)("div",{className:"space-y-3 rounded-md border bg-background/40 p-3",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("p",{className:ej,children:"GitHub remote"}),(0,t.jsxs)("p",{className:eg,children:["From the GitHub URL"," ",(0,t.jsx)("code",{className:"rounded bg-muted px-1 py-px text-[10px]",children:"github.com/acme/widgets"}),", the owner is ",(0,t.jsx)("strong",{children:"acme"})," and the repository is"," ",(0,t.jsx)("strong",{children:"widgets"}),"."]})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:ex,children:"Owner (user or org)"}),(0,t.jsx)(p.Input,{value:o,onChange:e=>d(e.target.value),placeholder:"acme"})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:ex,children:"Repository name"}),(0,t.jsx)(p.Input,{value:c,onChange:e=>u(e.target.value),placeholder:"widgets"})]})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:ex,children:"GitHub account to use"}),(0,t.jsxs)("select",{value:m,onChange:e=>h(e.target.value),className:"h-9 w-full rounded-md border bg-background px-2 text-sm",children:[(0,t.jsx)("option",{value:"",children:"default"}),H.map(e=>(0,t.jsx)("option",{value:e.alias,children:e.alias},e.alias))]}),(0,t.jsxs)("p",{className:eg,children:["Which set of GitHub credentials the agent should use to read this repo."," ",0===H.length?"Only the default account is set up — manage more under Connections → GitHub accounts.":"Manage accounts under Connections → GitHub accounts."]})]})]}),B&&(0,t.jsxs)("div",{className:"space-y-3 rounded-md border bg-background/40 p-3",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("p",{className:ej,children:"Local clone"}),(0,t.jsx)("p",{className:eg,children:"Folder on this Mac where the repo is checked out. The agent reads source files, commits, and uncommitted changes from here."})]}),(0,t.jsx)(ea.DirectoryPickerField,{value:x,onChange:g,title:"Choose local clone directory"}),"local"===i&&(0,t.jsxs)("label",{className:"flex items-start gap-2 text-xs text-muted-foreground",children:[(0,t.jsx)("input",{type:"checkbox",checked:j,onChange:e=>y(e.target.checked),className:"mt-0.5"}),(0,t.jsx)("span",{children:"This folder is not (and will never be) backed by a GitHub remote. Skip GitHub linking permanently."})]})]}),(0,t.jsxs)("div",{className:"space-y-3 rounded-md border bg-background/40 p-3",children:[(0,t.jsx)("p",{className:ej,children:"Naming & tracking"}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:ex,children:"Display name (optional)"}),(0,t.jsx)(p.Input,{value:f,onChange:e=>b(e.target.value),placeholder:"Leave blank to use the repo or folder name"}),(0,t.jsx)("p",{className:eg,children:"How this repository appears in the dashboard and in your context notes."})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:ex,children:"How should the agent treat this?"}),(0,t.jsx)("div",{className:"grid gap-2",children:ef.map(e=>{let s=N===e.value;return(0,t.jsxs)("button",{type:"button",onClick:()=>k(e.value),className:"rounded-md border px-3 py-2 text-left transition-colors "+(s?"border-primary bg-primary/10":"border-border hover:bg-accent"),children:[(0,t.jsx)("div",{className:"text-sm font-medium "+(s?"text-primary":"text-foreground"),children:e.label}),(0,t.jsx)("div",{className:eg+" mt-0.5",children:e.description})]},e.value)})})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:ex,children:"Category (tag)"}),(0,t.jsx)("select",{value:w,onChange:e=>C(e.target.value),className:"h-9 w-full rounded-md border bg-background px-2 text-sm",children:eb.map(e=>(0,t.jsx)("option",{value:e,children:e},e))}),(0,t.jsx)("p",{className:eg,children:"Used to group repositories in the dashboard. Pick whichever feels right."})]})]}),S&&(0,t.jsx)("p",{className:"rounded-md border border-red-200 bg-red-50/50 p-2 text-xs text-red-700 dark:border-red-900 dark:bg-red-950/30 dark:text-red-300",children:S}),(0,t.jsxs)("div",{className:"flex items-center justify-end gap-2 border-t pt-4",children:[(0,t.jsx)(r.Button,{type:"button",variant:"ghost",onClick:e,children:"Cancel"}),(0,t.jsx)(r.Button,{type:"submit",disabled:a.isPending,children:a.isPending?"Adding…":"Add repository"})]})]})]})}var ek=e.i(75187);e.s(["default",0,function(){let e=(0,en.useRepositories)(),{data:d,isLoading:c}=(0,ek.useHealth)(),[u,m]=(0,s.useState)(!1),h=e.data?.repositories??[],p=h.length,x=h.filter(e=>e.githubOwner&&e.githubRepo).length,g=h.filter(e=>e.localPath).length,j=e.isLoading||c,y=!j&&(!e.data||!d);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.ConnectionsSectionHeader,{title:"Repositories",description:"Each repository pairs an optional GitHub remote and an optional local clone. Configure polling, triggers, and daily git management on the my life › git page.",healthy:+(p>0),total:1,actions:(0,t.jsxs)(r.Button,{onClick:()=>m(!0),children:[(0,t.jsx)(n.Plus,{className:"h-4 w-4"}),"Add repository"]})}),y&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"Daemon not connected. Start the daemon to manage repositories."}),!j&&(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(_.IntegrationCard,{integrationKey:"git"}),(0,t.jsx)(_.IntegrationCard,{integrationKey:"github"}),0===h.length?(0,t.jsx)(l.EmptyState,{icon:a.GitBranch,title:"No repositories registered",description:"Add a repository to start watching commits, polling GitHub events, and wiring per-repo triggers.",children:(0,t.jsxs)(r.Button,{className:"mt-4",onClick:()=>m(!0),children:[(0,t.jsx)(n.Plus,{className:"h-4 w-4"}),"Add your first repository"]})}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.Card,{className:"flex items-center justify-between text-xs text-muted-foreground",children:(0,t.jsxs)("span",{children:[p," repositor",1===p?"y":"ies"," ·"," ",x," with GitHub · ",g," with local clone"]})}),(0,t.jsx)("div",{className:"space-y-3",children:h.map(e=>(0,t.jsx)(eo,{repo:e},e.id))})]}),(0,t.jsx)(w,{}),(0,t.jsx)(T,{}),(0,t.jsx)(E,{}),(0,t.jsx)($.ProcessModelCard,{processKey:"git.project.init",title:"Git Project Init Model",description:"Generates the initial overview MD when daily git management is first enabled for a repository."}),(0,t.jsx)($.ProcessModelCard,{processKey:"git.project.update",title:"Git Project Update Model",description:"Runs the daily 24h scan that appends to journal MDs and curates overview sections."}),(0,t.jsx)($.ProcessModelCard,{processKey:"git.project.retemplate",title:"Git Project Re-template Model",description:"One-shot session that re-conforms existing project documents to the current template body."})]}),(0,t.jsx)(ev,{open:u,onClose:()=>m(!1)})]})}],23682)}]);
|