@lovelybunch/api 1.0.71-alpha.1 → 1.0.71-alpha.2
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/dist/lib/auth/auth-manager.d.ts.map +1 -0
- package/dist/lib/auth/auth-manager.js.map +1 -0
- package/dist/lib/gait-path.d.ts.map +1 -0
- package/dist/lib/gait-path.js.map +1 -0
- package/dist/lib/git-settings.d.ts.map +1 -0
- package/dist/lib/git-settings.js.map +1 -0
- package/dist/lib/git.d.ts.map +1 -0
- package/dist/lib/git.js.map +1 -0
- package/dist/lib/jobs/global-job-scheduler.d.ts.map +1 -0
- package/dist/lib/jobs/global-job-scheduler.js.map +1 -0
- package/dist/lib/jobs/job-runner.d.ts.map +1 -0
- package/dist/lib/jobs/job-runner.js.map +1 -0
- package/dist/lib/jobs/job-scheduler.d.ts.map +1 -0
- package/dist/lib/jobs/job-scheduler.js.map +1 -0
- package/dist/lib/jobs/job-store.d.ts.map +1 -0
- package/dist/lib/jobs/job-store.js.map +1 -0
- package/dist/lib/project-paths.d.ts.map +1 -0
- package/dist/lib/project-paths.js.map +1 -0
- package/dist/lib/storage/file-storage.d.ts.map +1 -0
- package/dist/lib/storage/file-storage.js.map +1 -0
- package/dist/lib/symlinks/symlink-manager.d.ts.map +1 -0
- package/dist/lib/symlinks/symlink-manager.js.map +1 -0
- package/dist/lib/symlinks/types.d.ts.map +1 -0
- package/dist/lib/symlinks/types.js.map +1 -0
- package/dist/lib/terminal/context-helper.d.ts.map +1 -0
- package/dist/lib/terminal/context-helper.js.map +1 -0
- package/dist/lib/terminal/global-manager.d.ts.map +1 -0
- package/dist/lib/terminal/global-manager.js.map +1 -0
- package/dist/lib/terminal/shell-utils.d.ts.map +1 -0
- package/dist/lib/terminal/shell-utils.js.map +1 -0
- package/dist/lib/terminal/terminal-manager.d.ts.map +1 -0
- package/dist/lib/terminal/terminal-manager.js.map +1 -0
- package/dist/lib/user-preferences.d.ts.map +1 -0
- package/dist/lib/user-preferences.js.map +1 -0
- package/dist/middleware/auth.d.ts.map +1 -0
- package/dist/middleware/auth.js.map +1 -0
- package/dist/routes/api/v1/agents/[id]/index.d.ts.map +1 -0
- package/dist/routes/api/v1/agents/[id]/index.js.map +1 -0
- package/dist/routes/api/v1/agents/[id]/route.d.ts.map +1 -0
- package/dist/routes/api/v1/agents/[id]/route.js.map +1 -0
- package/dist/routes/api/v1/agents/index.d.ts.map +1 -0
- package/dist/routes/api/v1/agents/index.js.map +1 -0
- package/dist/routes/api/v1/agents/route.d.ts.map +1 -0
- package/dist/routes/api/v1/agents/route.js.map +1 -0
- package/dist/routes/api/v1/ai/index.d.ts.map +1 -0
- package/dist/routes/api/v1/ai/index.js.map +1 -0
- package/dist/routes/api/v1/ai/route.d.ts.map +1 -0
- package/dist/routes/api/v1/ai/route.js.map +1 -0
- package/dist/routes/api/v1/api-keys/index.d.ts.map +1 -0
- package/dist/routes/api/v1/api-keys/index.js.map +1 -0
- package/dist/routes/api/v1/api-keys/route.d.ts.map +1 -0
- package/dist/routes/api/v1/api-keys/route.js.map +1 -0
- package/dist/routes/api/v1/auth/index.d.ts.map +1 -0
- package/dist/routes/api/v1/auth/index.js.map +1 -0
- package/dist/routes/api/v1/auth/route.d.ts.map +1 -0
- package/dist/routes/api/v1/auth/route.js.map +1 -0
- package/dist/routes/api/v1/auth-settings/index.d.ts.map +1 -0
- package/dist/routes/api/v1/auth-settings/index.js.map +1 -0
- package/dist/routes/api/v1/auth-settings/route.d.ts.map +1 -0
- package/dist/routes/api/v1/auth-settings/route.js.map +1 -0
- package/dist/routes/api/v1/chats/[id]/index.d.ts.map +1 -0
- package/dist/routes/api/v1/chats/[id]/index.js.map +1 -0
- package/dist/routes/api/v1/chats/[id]/route.d.ts.map +1 -0
- package/dist/routes/api/v1/chats/[id]/route.js.map +1 -0
- package/dist/routes/api/v1/chats/index.d.ts.map +1 -0
- package/dist/routes/api/v1/chats/index.js.map +1 -0
- package/dist/routes/api/v1/chats/route.d.ts.map +1 -0
- package/dist/routes/api/v1/chats/route.js.map +1 -0
- package/dist/routes/api/v1/config/index.d.ts.map +1 -0
- package/dist/routes/api/v1/config/index.js.map +1 -0
- package/dist/routes/api/v1/config/route.d.ts.map +1 -0
- package/dist/routes/api/v1/config/route.js.map +1 -0
- package/dist/routes/api/v1/context/architecture/route.d.ts.map +1 -0
- package/dist/routes/api/v1/context/architecture/route.js.map +1 -0
- package/dist/routes/api/v1/context/index.d.ts.map +1 -0
- package/dist/routes/api/v1/context/index.js.map +1 -0
- package/dist/routes/api/v1/context/knowledge/[filename]/index.d.ts.map +1 -0
- package/dist/routes/api/v1/context/knowledge/[filename]/index.js.map +1 -0
- package/dist/routes/api/v1/context/knowledge/[filename]/route.d.ts.map +1 -0
- package/dist/routes/api/v1/context/knowledge/[filename]/route.js.map +1 -0
- package/dist/routes/api/v1/context/knowledge/index.d.ts.map +1 -0
- package/dist/routes/api/v1/context/knowledge/index.js.map +1 -0
- package/dist/routes/api/v1/context/knowledge/route.d.ts.map +1 -0
- package/dist/routes/api/v1/context/knowledge/route.js.map +1 -0
- package/dist/routes/api/v1/context/project/route.d.ts.map +1 -0
- package/dist/routes/api/v1/context/project/route.js.map +1 -0
- package/dist/routes/api/v1/events/status/route.d.ts +1 -1
- package/dist/routes/api/v1/git/index.d.ts.map +1 -0
- package/dist/routes/api/v1/git/index.js.map +1 -0
- package/dist/routes/api/v1/jobs/[id]/route.d.ts.map +1 -0
- package/dist/routes/api/v1/jobs/[id]/route.js.map +1 -0
- package/dist/routes/api/v1/jobs/[id]/run/route.d.ts +2 -2
- package/dist/routes/api/v1/jobs/[id]/run/route.d.ts.map +1 -0
- package/dist/routes/api/v1/jobs/[id]/run/route.js.map +1 -0
- package/dist/routes/api/v1/jobs/index.d.ts.map +1 -0
- package/dist/routes/api/v1/jobs/index.js.map +1 -0
- package/dist/routes/api/v1/jobs/route.d.ts.map +1 -0
- package/dist/routes/api/v1/jobs/route.js.map +1 -0
- package/dist/routes/api/v1/jobs/status/route.d.ts +1 -1
- package/dist/routes/api/v1/jobs/status/route.d.ts.map +1 -0
- package/dist/routes/api/v1/jobs/status/route.js.map +1 -0
- package/dist/routes/api/v1/mcp/index.d.ts.map +1 -0
- package/dist/routes/api/v1/mcp/index.js.map +1 -0
- package/dist/routes/api/v1/mcp/route.d.ts.map +1 -0
- package/dist/routes/api/v1/mcp/route.js.map +1 -0
- package/dist/routes/api/v1/proposals/[id]/route.d.ts +8 -8
- package/dist/routes/api/v1/proposals/[id]/route.d.ts.map +1 -0
- package/dist/routes/api/v1/proposals/[id]/route.js.map +1 -0
- package/dist/routes/api/v1/proposals/index.d.ts.map +1 -0
- package/dist/routes/api/v1/proposals/index.js.map +1 -0
- package/dist/routes/api/v1/proposals/route.d.ts.map +1 -0
- package/dist/routes/api/v1/proposals/route.js.map +1 -0
- package/dist/routes/api/v1/resources/[id]/index.d.ts.map +1 -0
- package/dist/routes/api/v1/resources/[id]/index.js.map +1 -0
- package/dist/routes/api/v1/resources/[id]/route.js.map +1 -0
- package/dist/routes/api/v1/resources/[id]/thumbnail/index.d.ts.map +1 -0
- package/dist/routes/api/v1/resources/[id]/thumbnail/index.js.map +1 -0
- package/dist/routes/api/v1/resources/[id]/thumbnail/route.js.map +1 -0
- package/dist/routes/api/v1/resources/index.d.ts.map +1 -0
- package/dist/routes/api/v1/resources/index.js.map +1 -0
- package/dist/routes/api/v1/resources/route.d.ts.map +1 -0
- package/dist/routes/api/v1/resources/route.js.map +1 -0
- package/dist/routes/api/v1/symlinks/index.d.ts.map +1 -0
- package/dist/routes/api/v1/symlinks/index.js.map +1 -0
- package/dist/routes/api/v1/symlinks/route.d.ts.map +1 -0
- package/dist/routes/api/v1/symlinks/route.js.map +1 -0
- package/dist/routes/api/v1/terminal/[proposalId]/create/index.d.ts.map +1 -0
- package/dist/routes/api/v1/terminal/[proposalId]/create/index.js.map +1 -0
- package/dist/routes/api/v1/terminal/[proposalId]/create/route.d.ts.map +1 -0
- package/dist/routes/api/v1/terminal/[proposalId]/create/route.js.map +1 -0
- package/dist/routes/api/v1/terminal/[proposalId]/destroy/index.d.ts.map +1 -0
- package/dist/routes/api/v1/terminal/[proposalId]/destroy/index.js.map +1 -0
- package/dist/routes/api/v1/terminal/[proposalId]/destroy/route.d.ts.map +1 -0
- package/dist/routes/api/v1/terminal/[proposalId]/destroy/route.js.map +1 -0
- package/dist/routes/api/v1/terminal/[proposalId]/resize/index.d.ts.map +1 -0
- package/dist/routes/api/v1/terminal/[proposalId]/resize/index.js.map +1 -0
- package/dist/routes/api/v1/terminal/[proposalId]/resize/route.d.ts.map +1 -0
- package/dist/routes/api/v1/terminal/[proposalId]/resize/route.js.map +1 -0
- package/dist/routes/api/v1/terminal/sessions/index.d.ts.map +1 -0
- package/dist/routes/api/v1/terminal/sessions/index.js.map +1 -0
- package/dist/routes/api/v1/terminal/sessions/route.d.ts.map +1 -0
- package/dist/routes/api/v1/terminal/sessions/route.js.map +1 -0
- package/dist/routes/api/v1/user/index.d.ts.map +1 -0
- package/dist/routes/api/v1/user/index.js.map +1 -0
- package/dist/routes/api/v1/user/settings/index.d.ts.map +1 -0
- package/dist/routes/api/v1/user/settings/index.js.map +1 -0
- package/dist/routes/api/v1/user/settings/route.d.ts.map +1 -0
- package/dist/routes/api/v1/user/settings/route.js.map +1 -0
- package/dist/server-with-static.d.ts.map +1 -0
- package/dist/server-with-static.js.map +1 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js.map +1 -0
- package/package.json +4 -4
- package/static/assets/AgentDetailPage-DwWIjGx1.js +1 -0
- package/static/assets/AgentEditPage-BvVPfYR3.js +1 -0
- package/static/assets/AgentsPage-D-Uy87Gh.js +3 -0
- package/static/assets/AgentsSettingsPage-CDuAvFxu.js +6 -0
- package/static/assets/ApiKeysSettingsPage-Jug0kB7Z.js +7 -0
- package/static/assets/ArchitectureEditPage-BmAgJAMV.js +21 -0
- package/static/assets/ArchitecturePage-ZjbdnDA7.js +1 -0
- package/static/assets/AuthSettingsPage-_pXoewOB.js +11 -0
- package/static/assets/CallbackPage-CaAOpz4z.js +1 -0
- package/static/assets/CodePage-DEbgr8C1.js +2 -0
- package/static/assets/CollapsibleSection-msxUBh1L.js +1 -0
- package/static/assets/DashboardPage-BXu-fikP.js +11 -0
- package/static/assets/GitPage-B7qFcP-K.js +16 -0
- package/static/assets/GitSettingsPage-D7GjdOnE.js +6 -0
- package/static/assets/IdentityPage-BR48gNhN.js +11 -0
- package/static/assets/ImplementationStepsEditor-BdHMNVVd.js +6 -0
- package/static/assets/IntegrationsSettingsPage-B1OHGlDC.js +1 -0
- package/static/assets/KnowledgeDetailPage-DBOQQs3R.js +1 -0
- package/static/assets/KnowledgeEditPage-DHJxLPwi.js +1 -0
- package/static/assets/KnowledgePage-CuuDTMa_.js +8 -0
- package/static/assets/LoginPage-IIU6NAG9.js +1 -0
- package/static/assets/McpSettingsPage-iz5gLGWt.js +1 -0
- package/static/assets/NewAgentPage-DolltGy5.js +1 -0
- package/static/assets/NewKnowledgePage-_jbUZqBU.js +9 -0
- package/static/assets/NewProposalPage-bFnfuuoA.js +90 -0
- package/static/assets/ProjectEditPage-DTTjPnGj.js +11 -0
- package/static/assets/ProjectPage-DhwrnEq2.js +1 -0
- package/static/assets/PromptsSettingsPage-DLOVysbE.js +1 -0
- package/static/assets/ProposalDetailPage-KvjXUaaf.js +1 -0
- package/static/assets/ProposalEditPage-BmzkHL9a.js +1 -0
- package/static/assets/ProposalsPage-DwQr1ycd.js +17 -0
- package/static/assets/ResourcesPage-B8Hm_j47.js +66 -0
- package/static/assets/RulesSettingsPage-CsGXFTFY.js +16 -0
- package/static/assets/SchedulePage-CY8GdQlp.js +4 -0
- package/static/assets/TagInput-CbH9zq5n.js +1 -0
- package/static/assets/TerminalPage-DsjOLnyY.js +1 -0
- package/static/assets/TerminalSessionPage-DQ065WYU.js +13 -0
- package/static/assets/UserPreferencesPage-55VTrzfQ.js +1 -0
- package/static/assets/UserSettingsPage-BZwb93B4.js +1 -0
- package/static/assets/UtilitiesPage-BmEW7eJ_.js +1 -0
- package/static/assets/alert-CNSGDe1U.js +1 -0
- package/static/assets/arrow-down-D1dapxzl.js +6 -0
- package/static/assets/arrow-left-CEZFPQje.js +6 -0
- package/static/assets/arrow-up-D-lB4Ah6.js +6 -0
- package/static/assets/badge-DO6e5hC1.js +1 -0
- package/static/assets/browser-modal-BTxVvZIA.js +6 -0
- package/static/assets/calendar-DWaFMSXH.js +6 -0
- package/static/assets/card-Cnz8b7Ou.js +1 -0
- package/static/assets/chevron-left-CNgc28Tc.js +6 -0
- package/static/assets/circle-alert-Dick-jNf.js +6 -0
- package/static/assets/circle-check-DDk43rYV.js +6 -0
- package/static/assets/circle-check-big-B70gdce7.js +6 -0
- package/static/assets/circle-play-TJEfmKde.js +6 -0
- package/static/assets/circle-x-BfR2YcXx.js +6 -0
- package/static/assets/clipboard-B9ndUJKl.js +1 -0
- package/static/assets/clipboard-BTZru8wn.js +11 -0
- package/static/assets/clock-DQXbrDkQ.js +6 -0
- package/static/assets/download-CW_rWwud.js +6 -0
- package/static/assets/droid-CmYuCN_q.js +4 -0
- package/static/assets/eye-Bv6mO2ld.js +6 -0
- package/static/assets/folder-git-2-Cv5NbBZZ.js +6 -0
- package/static/assets/index-BSBM4i_g.js +458 -0
- package/static/assets/{index-Bo1l13x2.css → index-CKwmN6yL.css} +2 -33
- package/static/assets/label-vEgNxdb2.js +1 -0
- package/static/assets/markdown-editor-DUEthZ0y.css +1 -0
- package/static/assets/markdown-editor-O6tGYa1a.js +62 -0
- package/static/assets/pause-6aQLhmG9.js +6 -0
- package/static/assets/play-DsDsjO2V.js +6 -0
- package/static/assets/plus-BfBtnncn.js +6 -0
- package/static/assets/radio-group-D_RD_9vY.js +1 -0
- package/static/assets/refresh-cw-DvFNtws1.js +6 -0
- package/static/assets/search-kcgmZUqQ.js +6 -0
- package/static/assets/switch-Bjq8cgQn.js +1 -0
- package/static/assets/tabs-DDbBXbPg.js +1 -0
- package/static/assets/tag-Czz-3rNY.js +6 -0
- package/static/assets/terminal-preview-B7iP2vUT.js +11 -0
- package/static/assets/use-terminal-CN3pheMp.js +1 -0
- package/static/assets/xterm-DTxiCjtJ.js +9 -0
- package/static/assets/xterm-qxJ8_QYu.css +32 -0
- package/static/assets/zap-BMkP_c9R.js +6 -0
- package/static/index.html +2 -2
- package/static/assets/index-DgZp291y.js +0 -973
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/routes/api/v1/symlinks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/routes/api/v1/symlinks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../../../../src/routes/api/v1/symlinks/route.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAI5B,QAAA,MAAM,GAAG,4EAAa,CAAC;AAsLvB,eAAe,GAAG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route.js","sourceRoot":"","sources":["../../../../../src/routes/api/v1/symlinks/route.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAC;AAGhF,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;AAEvB;;;GAGG;AACH,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;IACvB,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,MAAM,iBAAiB,EAAE,CAAC;QAC1C,MAAM,QAAQ,G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"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAG3B,QAAA,MAAM,MAAM,4EAAa,CAAA;AAIzB,eAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/routes/api/v1/terminal/[proposalId]/create/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAEjC,MAAM,MAAM,GAAG,IAAI,IAAI,EAAE,CAAA;AAEzB,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,CAAA;AAEtB,eAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../../../../../../src/routes/api/v1/terminal/[proposalId]/create/route.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAK/B,wBAAsB,IAAI,CAAC,CAAC,EAAE,OAAO;;;;;;;;kBAiCpC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route.js","sourceRoot":"","sources":["../../../../../../../src/routes/api/v1/terminal/[proposalId]/create/route.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,kDAAkD,CAAC;AAC5F,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAG7E,MAAM,CAAC,KAAK,UAAU,IAAI,CAAC,CAAU;IACnC,IAAI,CAAC;QACH,MAAM,UAAU,GAAG,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QAC7C,MAAM,IAAI,GAAG,MAAM,CAAC,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAClD,MAAM,EAAE,aAAa,GAAG,KAAK,EAAE,cAAc,EAAE,GAAG,IAA4D,CAAC;QAE/G,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,OAAO,CAAC,CAAC,IAAI,CACX,EAAE,KAAK,EAAE,yBAAyB,EAAE,EACpC,GAAG,CACJ,CAAC;QACJ,CAAC;QAED,6CAA6C;QAC7C,MAAM,YAAY,GAAG,MAAM,gBAAgB,EAAE,CAAC;QAC9C,MAAM,eAAe,GAAG,CAAC,YAAY,CAAC,WAAW,CAAC,aAAa,IAAI,MAAM,CAAc,CAAC;QAExF,kDAAkD;QAClD,MAAM,eAAe,GAAG,wBAAwB,EAAE,CAAC;QACnD,MAAM,OAAO,GAAG,MAAM,eAAe,CAAC,aAAa,CAAC,UAAU,EAAE,aAAa,EAAE,eAAe,EAAE,cAAc,CAAC,CAAC;QAEhH,OAAO,CAAC,CAAC,IAAI,CAAC;YACZ,SAAS,EAAE,OAAO,CAAC,EAAE;YACrB,UAAU,EAAE,OAAO,CAAC,UAAU;YAC9B,SAAS,EAAE,OAAO,CAAC,SAAS;SAC7B,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,kCAAkC,EAAE,KAAK,CAAC,CAAC;QACzD,OAAO,CAAC,CAAC,IAAI,CACX,EAAE,KAAK,EAAE,mCAAmC,EAAE,EAC9C,GAAG,CACJ,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/routes/api/v1/terminal/[proposalId]/destroy/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAG5B,QAAA,MAAM,GAAG,4EAAa,CAAC;AAIvB,eAAe,GAAG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/routes/api/v1/terminal/[proposalId]/destroy/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAElC,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;AAEvB,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;AAEpB,eAAe,GAAG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../../../../../../src/routes/api/v1/terminal/[proposalId]/destroy/route.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAG/B,wBAAsB,IAAI,CAAC,CAAC,EAAE,OAAO;;;;;;;;kBA+BpC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route.js","sourceRoot":"","sources":["../../../../../../../src/routes/api/v1/terminal/[proposalId]/destroy/route.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,kDAAkD,CAAC;AAE5F,MAAM,CAAC,KAAK,UAAU,IAAI,CAAC,CAAU;IACnC,IAAI,CAAC;QACH,MAAM,UAAU,GAAG,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QAC7C,MAAM,IAAI,GAAG,MAAM,CAAC,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;QAChC,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC;QAE3B,IAAI,CAAC,SAAS,EAAE,CAAC;YACf,OAAO,CAAC,CAAC,IAAI,CACX,EAAE,KAAK,EAAE,wBAAwB,EAAE,EACnC,GAAG,CACJ,CAAC;QACJ,CAAC;QAED,MAAM,eAAe,GAAG,wBAAwB,EAAE,CAAC;QACnD,MAAM,OAAO,GAAG,eAAe,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;QAE1D,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,CAAC,CAAC,IAAI,CACX,EAAE,KAAK,EAAE,mBAAmB,EAAE,EAC9B,GAAG,CACJ,CAAC;QACJ,CAAC;QAED,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;IACnC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,oCAAoC,EAAE,KAAK,CAAC,CAAC;QAC3D,OAAO,CAAC,CAAC,IAAI,CACX,EAAE,KAAK,EAAE,oCAAoC,EAAE,EAC/C,GAAG,CACJ,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/routes/api/v1/terminal/[proposalId]/resize/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAG5B,QAAA,MAAM,GAAG,4EAAa,CAAC;AAIvB,eAAe,GAAG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/routes/api/v1/terminal/[proposalId]/resize/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAElC,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;AAEvB,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;AAEpB,eAAe,GAAG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../../../../../../src/routes/api/v1/terminal/[proposalId]/resize/route.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAG/B,wBAAsB,IAAI,CAAC,CAAC,EAAE,OAAO;;;;;;;;kBA+BpC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route.js","sourceRoot":"","sources":["../../../../../../../src/routes/api/v1/terminal/[proposalId]/resize/route.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,kDAAkD,CAAC;AAE5F,MAAM,CAAC,KAAK,UAAU,IAAI,CAAC,CAAU;IACnC,IAAI,CAAC;QACH,MAAM,UAAU,GAAG,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QAC7C,MAAM,IAAI,GAAG,MAAM,CAAC,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;QAChC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;QAEvC,IAAI,CAAC,SAAS,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACjC,OAAO,CAAC,CAAC,IAAI,CACX,EAAE,KAAK,EAAE,yCAAyC,EAAE,EACpD,GAAG,CACJ,CAAC;QACJ,CAAC;QAED,MAAM,eAAe,GAAG,wBAAwB,EAAE,CAAC;QACnD,MAAM,OAAO,GAAG,eAAe,CAAC,aAAa,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAErE,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,CAAC,CAAC,IAAI,CACX,EAAE,KAAK,EAAE,oCAAoC,EAAE,EAC/C,GAAG,CACJ,CAAC;QACJ,CAAC;QAED,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;IACnC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,kCAAkC,EAAE,KAAK,CAAC,CAAC;QACzD,OAAO,CAAC,CAAC,IAAI,CACX,EAAE,KAAK,EAAE,mCAAmC,EAAE,EAC9C,GAAG,CACJ,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/routes/api/v1/terminal/sessions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAG3B,QAAA,MAAM,QAAQ,4EAAa,CAAA;AAI3B,eAAe,QAAQ,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/routes/api/v1/terminal/sessions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAA;AAEhC,MAAM,QAAQ,GAAG,IAAI,IAAI,EAAE,CAAA;AAE3B,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;AAEtB,eAAe,QAAQ,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../../../../../src/routes/api/v1/terminal/sessions/route.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AA+B/B,wBAAsB,GAAG,CAAC,CAAC,EAAE,OAAO;;;;kBA4CnC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route.js","sourceRoot":"","sources":["../../../../../../src/routes/api/v1/terminal/sessions/route.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,+CAA+C,CAAC;AAEzF,qEAAqE;AACrE,oDAAoD;AACpD,MAAM,UAAU,GAAG,yEAAyE,CAAC;AAC7F,SAAS,SAAS,CAAC,KAAa;IAC9B,IAAI,CAAC;QACH,OAAO,KAAK,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CA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AC,qBAAqB,CAAC,UAAU,CAAC,CAAC;QAC/D,CAAC;aAAM,CAAC;YACN,QAAQ,GAAG,eAAe,CAAC,cAAc,EAAE,CAAC;QAC9C,CAAC;QAED,+CAA+C;QAC/C,MAAM,WAAW,GAAG,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;YAC3C,EAAE,EAAE,OAAO,CAAC,EAAE;YACd,UAAU,EAAE,OAAO,CAAC,UAAU;YAC9B,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,YAAY,EAAE,OAAO,CAAC,YAAY;YAClC,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS;YAC9B,GAAG,CAAC,WAAW;gBACb,CAAC,CAAC,EAAE,OAAO,EAAE,YAAY,CAAC,OAAO,CAAC,OAAO,IAAI,EAAE,EAAE,YAAY,EAAE,YAAY,EAAE,CAAC,QAAQ,CAAC,EAAE;gBACzF,CAAC,CAAC,EAAE,CAAC;SACR,CAAC,CAAC,CAAC;QAEJ,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC,CAAC;IAC3C,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,kCAAkC,EAAE,KAAK,CAAC,CAAC;QACzD,OAAO,CAAC,CAAC,IAAI,CACX,EAAE,KAAK,EAAE,iCAAiC,EAAE,EAC5C,GAAG,CACJ,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/routes/api/v1/user/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAG5B,QAAA,MAAM,GAAG,4EAAa,CAAC;AAIvB,eAAe,GAAG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/routes/api/v1/user/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,QAAQ,MAAM,qBAAqB,CAAC;AAE3C,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;AAEvB,GAAG,CAAC,KAAK,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;AAEjC,eAAe,GAAG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/routes/api/v1/user/settings/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/routes/api/v1/user/settings/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../../../../../src/routes/api/v1/user/settings/route.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAS5B,QAAA,MAAM,GAAG,4EAAa,CAAC;AAgEvB,eAAe,GAAG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route.js","sourceRoot":"","sources":["../../../../../../src/routes/api/v1/user/settings/route.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAIjB,MAAM,wCAAwC,CAAC;AAEhD,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;AAEvB;;;GAGG;AACH,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;IACvB,IAAI,CAAC;QACH,MAAM,QAAQ,G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AED,MAAM,gBAAgB,CAAC,QAAQ,CAAC,CAAC;QAEjC,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;IACnD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,iCAAiC,EAAE,KAAK,CAAC,CAAC;QACxD,OAAO,CAAC,CAAC,IAAI,CACX,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,gCAAgC,EAAE,EAC3D,GAAG,CACJ,CAAC;IACJ,CAAC;AACH,CAAC,CAAC,CAAC;AAEH,eAAe,GAAG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-with-static.d.ts","sourceRoot":"","sources":["../src/server-with-static.ts"],"names":[],"mappings":"AAiNA,wBAAsB,WAAW,CAAC,OAAO,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAO,mDAuB/E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-with-static.js","sourceRoot":"","sources":["../src/server-with-static.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,QAAQ,CAAA;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAA;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EAAE,MAAM,IAAI,CAAA;AACnB,OAAO,EAAE,wBAAwB,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CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,IAAI,IAAI,EAAE,CAAC,CAAA;IACnG,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC;AAED,4CAA4C;AAC5C,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,KAAK,UAAU,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IACpD,WAAW,EAAE,CAAA;AACf,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,QAAQ,CAAA;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAA;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAA;AAC1E,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAA;AAEnC,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AACjD,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAA;AAE1C,4DAA4D;AAC5D,YAAY,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,eAAe,CAAC,EAAE,CAA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C,cAAc,EAAE,IAAI,CAAC,CAAA;AAE/B,wBAAwB;AACxB,GAAG,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE;IACvB,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC,CAAA;AACtE,CAAC,CAAC,CAAA;AAEF,eAAe;AACf,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;AAEjE,OAAO,CAAC,GAAG,CAAC,2BAA2B,IAAI,KAAK,CAAC,CAAA;AAEjD,MAAM,MAAM,GAAG,KAAK,CAAC;IACnB,KAAK,EAAE,GAAG,CAAC,KAAK;IAChB,IAAI;CACL,CAAC,CAAA;AAEF,2BAA2B;AAC3B,eAAe,CAAC,MAAM,CAAC,CAAA;AAEvB,OAAO,CAAC,GAAG,CAAC,yCAAyC,IAAI,EAAE,CAAC,CAAA;AAC5D,OAAO,CAAC,GAAG,CAAC,4CAA4C,IAAI,yBAAyB,CAAC,CAAA;AACtF,OAAO,CAAC,GAAG,CAAC,oDAAoD,IAAI,iCAAiC,CAAC,CAAA;AAEtG,iCAAiC;AACjC,qBAAqB,EAAE,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lovelybunch/api",
|
|
3
|
-
"version": "1.0.71-alpha.
|
|
3
|
+
"version": "1.0.71-alpha.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/server-with-static.js",
|
|
6
6
|
"exports": {
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@hono/node-server": "^1.13.7",
|
|
38
38
|
"@hono/node-ws": "^1.0.6",
|
|
39
|
-
"@lovelybunch/core": "^1.0.71-alpha.
|
|
40
|
-
"@lovelybunch/mcp": "^1.0.71-alpha.
|
|
41
|
-
"@lovelybunch/types": "^1.0.71-alpha.
|
|
39
|
+
"@lovelybunch/core": "^1.0.71-alpha.2",
|
|
40
|
+
"@lovelybunch/mcp": "^1.0.71-alpha.2",
|
|
41
|
+
"@lovelybunch/types": "^1.0.71-alpha.2",
|
|
42
42
|
"arctic": "^1.9.2",
|
|
43
43
|
"bcrypt": "^5.1.1",
|
|
44
44
|
"cookie": "^0.6.0",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{E as C,u as E,r as h,j as e,B as i,L as d,J as k,T as B,i as T,A as N}from"./index-BSBM4i_g.js";import{C as l,b as o,a as m,c as f,d as z}from"./card-Cnz8b7Ou.js";import{B as v}from"./badge-DO6e5hC1.js";import{A as u}from"./arrow-left-CEZFPQje.js";const D=t=>t?Array.isArray(t)?t.filter(r=>typeof r=="string").map(r=>r.trim()).filter(Boolean):typeof t=="string"?t.split(",").map(r=>r.trim()).filter(Boolean):[]:[],c={blue:{bg:"#dbeafe",border:"#2563eb",text:"#1e40af"},green:{bg:"#dcfce7",border:"#16a34a",text:"#166534"},red:{bg:"#fee2e2",border:"#dc2626",text:"#991b1b"},emerald:{bg:"#d1fae5",border:"#10b981",text:"#047857"},purple:{bg:"#f3e8ff",border:"#9333ea",text:"#6b21a8"},orange:{bg:"#fed7aa",border:"#ea580c",text:"#9a3412"},yellow:{bg:"#fef9c3",border:"#eab308",text:"#854d0e"},teal:{bg:"#ccfbf1",border:"#14b8a6",text:"#0f766e"},indigo:{bg:"#e0e7ff",border:"#6366f1",text:"#4338ca"},pink:{bg:"#fce7f3",border:"#ec4899",text:"#9f1239"},cyan:{bg:"#cffafe",border:"#06b6d4",text:"#155e75"},slate:{bg:"#f1f5f9",border:"#475569",text:"#334155"},gray:{bg:"#f3f4f6",border:"#6b7280",text:"#374151"}};function F(){const t=C(),r=E(),[s,y]=h.useState(null),[w,j]=h.useState(!0),[p,x]=h.useState(null);h.useEffect(()=>{async function a(){try{j(!0);const g=await(await fetch(`${N}/api/v1/agents/${t.id}`)).json();g.success?y(g.document):x(g.error||"Failed to fetch agent")}catch(n){x(n instanceof Error?n.message:"Unknown error")}finally{j(!1)}}t.id&&a()},[t.id]);const A=async()=>{if(!(!s||!confirm("Are you sure you want to delete this agent?")))try{const n=await(await fetch(`${N}/api/v1/agents/${s.filename.replace(".md","")}`,{method:"DELETE"})).json();n.success?r("/agents"):x(n.error?.message||"Failed to delete agent")}catch(a){x(a instanceof Error?a.message:"Unknown error")}};if(w)return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"h-8 bg-muted rounded w-64 animate-pulse"}),e.jsx("div",{className:"h-4 bg-muted rounded w-32 animate-pulse mt-2"})]}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(i,{variant:"ghost",size:"sm",asChild:!0,className:"px-2 hover:bg-transparent",children:e.jsx(d,{to:"/agents",className:"flex items-center text-muted-foreground hover:text-foreground transition-colors",children:e.jsx(u,{className:"h-4 w-4"})})})})]}),e.jsx(l,{children:e.jsxs(o,{children:[e.jsx("div",{className:"h-6 bg-muted rounded w-48 animate-pulse"}),e.jsx("div",{className:"h-4 bg-muted rounded w-64 animate-pulse"})]})})]});if(p||!s)return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"Agent Not Found"}),e.jsx("p",{className:"text-muted-foreground",children:"The requested agent could not be found"})]}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(i,{variant:"ghost",size:"sm",asChild:!0,className:"px-2 hover:bg-transparent",children:e.jsx(d,{to:"/agents",className:"flex items-center text-muted-foreground hover:text-foreground transition-colors",children:e.jsx(u,{className:"h-4 w-4"})})})})]}),e.jsx(l,{children:e.jsx(m,{className:"pt-6",children:e.jsx("div",{className:"text-center",children:e.jsx("p",{className:"text-destructive",children:p||"Agent not found"})})})})]});const b=D(s.metadata.tools);return e.jsxs("div",{className:"space-y-6",children:[e.jsx("div",{className:"space-y-1",children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsx("h1",{className:"text-xl sm:text-2xl font-bold tracking-tight",children:s.metadata.name}),e.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[e.jsx(i,{variant:"ghost",size:"sm",asChild:!0,children:e.jsx(d,{to:"/agents",className:"flex items-center gap-1 text-muted-foreground hover:text-foreground transition-colors",children:e.jsx(u,{className:"h-4 w-4"})})}),e.jsx(i,{variant:"outline",size:"sm",asChild:!0,children:e.jsxs(d,{to:`/agents/${s.filename.replace(".md","")}/edit`,children:[e.jsx(k,{className:"h-4 w-4 sm:mr-2"}),e.jsx("span",{className:"hidden sm:inline",children:"Edit"})]})}),e.jsxs(i,{variant:"destructive",size:"sm",onClick:A,children:[e.jsx(B,{className:"h-4 w-4 sm:mr-2"}),e.jsx("span",{className:"hidden sm:inline",children:"Delete"})]})]})]})}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[e.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[e.jsxs(l,{children:[e.jsx(o,{children:e.jsx(f,{children:"Description"})}),e.jsx(m,{children:e.jsx("p",{children:s.metadata.description})})]}),s.content&&e.jsxs(l,{children:[e.jsxs(o,{children:[e.jsx(f,{children:"Instructions"}),e.jsx(z,{children:"System prompt and behavior instructions for this agent"})]}),e.jsx(m,{children:e.jsx("pre",{className:"whitespace-pre-wrap text-sm bg-muted p-4 rounded-md",children:s.content})})]})]}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs(l,{children:[e.jsx(o,{children:e.jsx(f,{children:"Agent Actions"})}),e.jsx(m,{className:"space-y-2",children:e.jsx(i,{variant:"default",className:"w-full justify-start",asChild:!0,children:e.jsxs(d,{to:`/terminal/ag-${s.filename.replace(".md","")}`,children:[e.jsx(T,{className:"h-4 w-4 mr-2"}),"Prepare Agent"]})})})]}),e.jsxs(l,{children:[e.jsx(o,{children:e.jsx(f,{children:"Information"})}),e.jsxs(m,{className:"space-y-2",children:[s.metadata.color&&e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium mb-2",children:"Color"}),e.jsx(v,{variant:"outline",className:"capitalize border-2",style:{backgroundColor:c[s.metadata.color]?.bg||c.blue.bg,color:c[s.metadata.color]?.text||c.blue.text,borderColor:c[s.metadata.color]?.border||c.blue.border},children:s.metadata.color})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",children:"Tools"}),b.length>0?e.jsx("div",{className:"flex flex-wrap gap-2 mt-1",children:b.map(a=>e.jsx(v,{variant:"secondary",children:a},a))}):e.jsx("p",{className:"text-sm text-muted-foreground",children:"No specific tools configured - inherits all tools"})]})]})]})]})]})]})}export{F as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{E as X,u as Y,H as Z,r as n,j as e,B as m,L as v,i as O,I as D,a0 as ee,ac as te,A as y}from"./index-BSBM4i_g.js";import{C as N,a as C,b as se,c as ae}from"./card-Cnz8b7Ou.js";import{L as l}from"./label-vEgNxdb2.js";import{B as re}from"./badge-DO6e5hC1.js";import{c as ne}from"./clipboard-B9ndUJKl.js";import{A as z}from"./arrow-left-CEZFPQje.js";import{C as oe,a as ie}from"./clipboard-BTZru8wn.js";function xe(){const{id:i}=X(),U=Y(),{toast:w}=Z(),[q,S]=n.useState(!0),[o,A]=n.useState(!1),[d,c]=n.useState(null),[H,R]=n.useState(""),[u,E]=n.useState(""),[g,F]=n.useState(""),[f,P]=n.useState("blue"),[x,k]=n.useState([]),[h,$]=n.useState(""),[L,p]=n.useState([]),[_,M]=n.useState(!0),[J,T]=n.useState(!1),G=["blue","green","red","emerald","purple","orange","yellow","teal","indigo","pink","cyan","slate","gray"],K={blue:{bg:"#3b82f6",border:"#1e40af",text:"#ffffff"},green:{bg:"#22c55e",border:"#15803d",text:"#ffffff"},red:{bg:"#ef4444",border:"#b91c1c",text:"#ffffff"},emerald:{bg:"#10b981",border:"#047857",text:"#ffffff"},purple:{bg:"#a855f7",border:"#7e22ce",text:"#ffffff"},orange:{bg:"#f97316",border:"#c2410c",text:"#ffffff"},yellow:{bg:"#eab308",border:"#a16207",text:"#ffffff"},teal:{bg:"#14b8a6",border:"#0f766e",text:"#ffffff"},indigo:{bg:"#6366f1",border:"#4338ca",text:"#ffffff"},pink:{bg:"#ec4899",border:"#be185d",text:"#ffffff"},cyan:{bg:"#06b6d4",border:"#0e7490",text:"#ffffff"},slate:{bg:"#64748b",border:"#475569",text:"#ffffff"},gray:{bg:"#6b7280",border:"#4b5563",text:"#ffffff"}},Q=t=>{if(!t)return[];if(Array.isArray(t)){const a=t.filter(s=>typeof s=="string").map(s=>s.trim()).filter(Boolean);return Array.from(new Set(a))}return typeof t=="string"?Array.from(new Set(t.split(",").map(a=>a.trim()).filter(Boolean))):[]};n.useEffect(()=>{async function t(){try{S(!0);const s=await(await fetch(`${y}/api/v1/agents/${i}`)).json();if(!s.success)throw new Error(s.error||"Failed to load agent");const r=s.document;R(r.filename),E(r.metadata.name||""),F(r.metadata.description||""),P(r.metadata.color||"blue"),$(r.content||""),k(Q(r.metadata.tools))}catch(a){const s=a instanceof Error?a.message:"Failed to load agent";c(s)}finally{S(!1)}}i&&t()},[i]),n.useEffect(()=>{let t=!0;return(async()=>{M(!0);try{const s=await fetch(`${y}/api/v1/mcp`);if(!s.ok)throw new Error("Failed to fetch MCP servers");const r=await s.json();if(!r?.success||!Array.isArray(r.servers)){t&&p([]);return}const B=r.mcpServers&&typeof r.mcpServers=="object"?r.mcpServers:{},b=r.servers.map(I=>{const j=B[I]??{};return{name:I,enabled:j?.enabled!==!1,description:typeof j?.description=="string"?j.description:void 0}});t&&p(b)}catch(s){console.error("Failed to load MCP servers",s),t&&p([])}finally{t&&M(!1)}})(),()=>{t=!1}},[]);const V=async()=>{const t=".nut/config.json";try{await ne(t),T(!0),w({title:"Copied!",description:`${t} copied to clipboard`}),setTimeout(()=>T(!1),2e3)}catch(a){console.error("Failed to copy config path:",a),w({title:"Error",description:"Failed to copy to clipboard",variant:"destructive"})}},W=async t=>{if(t.preventDefault(),!u.trim()||!g.trim()||!h.trim()){c("Name, description, and agent instructions are required");return}try{A(!0),c(null);const a={name:u.trim(),description:g.trim(),content:h.trim(),metadata:{color:f,tools:x.length?x:void 0}},r=await(await fetch(`${y}/api/v1/agents/${i}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})).json();if(!r.success)throw new Error(r.error||"Failed to update agent");const b=r.document.filename.replace(/\.md$/,"");U(`/agents/${b}`)}catch(a){const s=a instanceof Error?a.message:"Failed to update agent";c(s)}finally{A(!1)}};return q?e.jsx("div",{className:"space-y-6",children:e.jsx(N,{children:e.jsx(C,{className:"pt-6",children:"Loading agent..."})})}):d?e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"Edit Agent"}),e.jsx("p",{className:"text-muted-foreground",children:"Unable to load agent"})]}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(m,{variant:"ghost",size:"sm",asChild:!0,children:e.jsx(v,{to:`/agents/${i}`,className:"flex items-center gap-1 text-muted-foreground hover:text-foreground transition-colors",children:e.jsx(z,{className:"h-4 w-4"})})})})]}),e.jsx(N,{children:e.jsx(C,{className:"pt-6",children:e.jsx("div",{className:"text-destructive",children:d})})})]}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"Edit Agent"}),e.jsxs("p",{className:"text-muted-foreground",children:["File: ",H]})]}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(m,{variant:"ghost",size:"sm",asChild:!0,children:e.jsx(v,{to:`/agents/${i}`,className:"flex items-center gap-1 text-muted-foreground hover:text-foreground transition-colors",children:e.jsx(z,{className:"h-4 w-4"})})})})]}),e.jsxs(N,{children:[e.jsx(se,{children:e.jsxs(ae,{className:"flex items-center gap-2",children:[e.jsx(O,{className:"h-5 w-5"}),"Agent Configuration"]})}),e.jsx(C,{children:e.jsxs("form",{onSubmit:W,className:"space-y-6",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(l,{htmlFor:"name",children:"Name *"}),e.jsx(D,{id:"name",value:u,onChange:t=>E(t.target.value),disabled:o})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(l,{htmlFor:"description",children:"Description *"}),e.jsx(D,{id:"description",value:g,onChange:t=>F(t.target.value),disabled:o})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(l,{children:"Color"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:G.map(t=>{const a=K[t];return e.jsx("button",{type:"button",onClick:()=>P(t),disabled:o,className:`w-10 h-10 rounded-md border-2 transition-all ${f===t?"ring-2 ring-offset-2 shadow-md":"hover:scale-110 hover:shadow-sm"}`,style:{backgroundColor:a.bg,borderColor:f===t?a.border:"hsl(var(--border))",...f===t&&{"--tw-ring-color":a.border}},title:t,children:e.jsx("span",{className:"sr-only",children:t})},t)})})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(l,{htmlFor:"content",children:"Agent Instructions *"}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["System prompt or instructions for this agent's behavior."," ","Insert ",e.jsx("code",{className:"text-xs bg-muted px-1.5 py-0.5 rounded font-mono",children:".nut/config.json"})," ",e.jsx("button",{type:"button",onClick:V,className:"inline-flex items-center align-middle text-muted-foreground hover:text-foreground transition-colors",title:"Copy .nut/config.json to clipboard",children:J?e.jsx(oe,{className:"h-3.5 w-3.5 ml-0.5"}):e.jsx(ie,{className:"h-3.5 w-3.5 ml-0.5"})})," ","if you want the agent to be able to access its name, role, or email address."]}),e.jsx(ee,{id:"content",value:h,onChange:t=>$(t.target.value),rows:8,disabled:o,required:!0})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(l,{children:"Tools (Optional)"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Choose which MCP servers this agent should be able to use. Leave empty to inherit all available servers."}),e.jsx("div",{className:"space-y-2",children:_?e.jsx("div",{className:"text-sm text-muted-foreground",children:"Loading MCP servers…"}):L.length===0?e.jsx("div",{className:"text-sm text-muted-foreground border border-dashed rounded-md p-3",children:"No MCP servers configured yet. Configure servers in Settings → MCP."}):L.map(t=>e.jsxs("label",{className:"flex items-start gap-3 rounded-md border border-transparent bg-muted/30 px-3 py-2 hover:border-muted transition-colors",children:[e.jsx(te,{checked:x.includes(t.name),onCheckedChange:a=>{k(s=>a===!0?s.includes(t.name)?s:[...s,t.name]:s.filter(r=>r!==t.name))},disabled:o||!t.enabled}),e.jsxs("div",{className:"flex flex-col",children:[e.jsxs("span",{className:"text-sm font-medium",children:[t.name,!t.enabled&&e.jsx(re,{variant:"secondary",className:"ml-2 text-xs",children:"Disabled"})]}),e.jsx("span",{className:"text-xs text-muted-foreground",children:t.enabled?t.description||"Enabled MCP server":"Enable this server in Settings to allow agents to use it"})]})]},t.name))})]}),d&&e.jsx("div",{className:"text-sm text-destructive bg-destructive/10 p-3 rounded-md",children:d}),e.jsxs("div",{className:"flex gap-2 justify-end",children:[e.jsx(m,{type:"button",variant:"outline",asChild:!0,disabled:o,children:e.jsx(v,{to:`/agents/${i}`,children:"Cancel"})}),e.jsx(m,{type:"submit",disabled:o,children:o?"Saving...":"Save Changes"})]})]})})]})]})}export{xe as default};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{j as e,S as I,Y as L,r as x,H as O,A as S,n as M,B as b,L as v,i as E,ah as $,ai as _}from"./index-BSBM4i_g.js";import{C as N,a as w,b as D,c as H}from"./card-Cnz8b7Ou.js";import{B as y}from"./badge-DO6e5hC1.js";import{c as U}from"./clipboard-B9ndUJKl.js";import{R as Y,a as G,f as J,L as F}from"./browser-modal-BTxVvZIA.js";import{P as T}from"./plus-BfBtnncn.js";import{T as K}from"./tag-Czz-3rNY.js";import"./search-kcgmZUqQ.js";const V=["color","tools","createdAt","updatedAt","version","focusAreas","contextPreferences","tags"];function P(t){if(t){if(Array.isArray(t)){const r=t.map(n=>{if(typeof n=="string")return n.trim();if(typeof n=="number")return`${n}`}).filter(n=>typeof n=="string"&&n.length>0);return r.length>0?r:void 0}if(typeof t=="string"){const r=t.split(",").map(n=>n.trim()).filter(n=>n.length>0);return r.length>0?r:void 0}}}function q(t,r){const n=[];if(t.content&&typeof t.content=="object")for(const o of Object.values(t.content))typeof o=="string"&&o.trim().length>0&&n.push(o.trim());const i=[];return i.push(`# ${r}`),t.description?.trim()&&i.push(t.description.trim()),[...i,...n].join(`
|
|
2
|
+
|
|
3
|
+
`).trim()}function z(t,r){const n=t.name||r.name,i=r.description||t.description||"",a={registryId:t.id,registryEndpoint:t.endpoint,registrySource:Y,author:t.author};for(const o of V){const d=r[o];if(d!==void 0)if(o==="tools"||o==="focusAreas"||o==="contextPreferences"||o==="tags"){const f=P(d);f&&(a[o]=f)}else a[o]=d}!a.version&&t.version&&(a.version=t.version),a.color||(a.color="blue"),!a.tags&&t.tags&&(a.tags=P(t.tags));for(const[o,d]of Object.entries(a))d==null&&delete a[o];return{name:n,description:i,content:q(r,n),metadata:Object.keys(a).length>0?a:void 0}}function B({open:t,onOpenChange:r,onImport:n}){return e.jsx(G,{open:t,onOpenChange:r,categoryId:"agents",title:"Coconut Registry – Agents",confirmLabel:"Import Agent",getDetail:i=>J(i.endpoint),renderPreview:(i,a)=>{if(!a)return e.jsx("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:"Select an agent to preview"});const o=z(i,a),d=o.metadata??{},f=typeof d.version=="string"?d.version:void 0,u=Array.isArray(i.tags)?i.tags:[],j=Array.isArray(d.tools)?d.tools.filter(l=>typeof l=="string"):[],p=Array.isArray(d.focusAreas)?d.focusAreas.filter(l=>typeof l=="string"):[];return e.jsx("div",{className:"h-full min-h-0 overflow-hidden rounded-md border",children:e.jsx(I,{className:"h-full",children:e.jsxs("div",{className:"space-y-6 p-4",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-2",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold",children:i.name}),e.jsx("p",{className:"text-sm text-muted-foreground",children:a.description})]}),f&&e.jsxs(y,{variant:"outline",children:["v",f]})]}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:["Registry ID: ",e.jsx("span",{className:"font-mono",children:i.id})]}),u.length>0&&e.jsx("div",{className:"flex flex-wrap gap-2",children:u.map(l=>e.jsx(y,{variant:"secondary",children:l},l))}),j.length>0&&e.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-sm",children:[e.jsx("span",{className:"font-medium",children:"Tools:"}),j.map(l=>e.jsx(y,{variant:"outline",children:l},l))]}),p.length>0&&e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"text-sm font-medium",children:"Focus Areas"}),e.jsx("ul",{className:"list-disc pl-5 text-sm text-muted-foreground",children:p.map(l=>e.jsx("li",{children:l},l))})]})]}),e.jsx(L,{className:"[&_.prose]:max-w-none",children:o.content})]})})})},onConfirm:async(i,a)=>{const o=z(i,a);await n({summary:i,detail:a,payload:o})}})}const Q=t=>t?Array.isArray(t)?t.filter(r=>typeof r=="string").map(r=>r.trim()).filter(Boolean):typeof t=="string"?t.split(",").map(r=>r.trim()).filter(Boolean):[]:[],g={blue:{bg:"#dbeafe",border:"#2563eb",text:"#1e40af"},green:{bg:"#dcfce7",border:"#16a34a",text:"#166534"},red:{bg:"#fee2e2",border:"#dc2626",text:"#991b1b"},emerald:{bg:"#d1fae5",border:"#10b981",text:"#047857"},purple:{bg:"#f3e8ff",border:"#9333ea",text:"#6b21a8"},orange:{bg:"#fed7aa",border:"#ea580c",text:"#9a3412"},yellow:{bg:"#fef9c3",border:"#eab308",text:"#854d0e"},teal:{bg:"#ccfbf1",border:"#14b8a6",text:"#0f766e"},indigo:{bg:"#e0e7ff",border:"#6366f1",text:"#4338ca"},pink:{bg:"#fce7f3",border:"#ec4899",text:"#9f1239"},cyan:{bg:"#cffafe",border:"#06b6d4",text:"#155e75"},slate:{bg:"#f1f5f9",border:"#475569",text:"#334155"},gray:{bg:"#f3f4f6",border:"#6b7280",text:"#374151"}};function oe(){const[t,r]=x.useState([]),[n,i]=x.useState(!0),[a,o]=x.useState({}),[d,f]=x.useState(!1),[u,j]=x.useState(!1),{toast:p}=O(),l=x.useCallback(async()=>{i(!0);try{const s=await fetch(`${S}/api/v1/agents`);if(!s.ok)throw new Error("Failed to load agents");const m=await s.json();r(Array.isArray(m.documents)?m.documents:[])}catch(s){console.error("Failed to load agents:",s),r([])}finally{i(!1)}},[]);x.useEffect(()=>{l()},[l]);const A=async s=>{const m=`.nut/agents/${s}`;try{await U(m),o(c=>({...c,[s]:!0})),setTimeout(()=>{o(c=>({...c,[s]:!1}))},2e3),p({title:"Path copied!",description:`Copied ${m} to clipboard`})}catch(c){console.error("Failed to copy path:",c),p({title:"Failed to copy",description:"Unable to copy path to clipboard",variant:"destructive"})}},C=x.useCallback(async({payload:s})=>{let m=!1;j(!0);try{const c=await fetch(`${S}/api/v1/agents`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:s.name,description:s.description,content:s.content,metadata:s.metadata})});let h=null;try{h=await c.json()}catch(k){console.error("Failed to parse registry import response:",k)}if(!(c.ok&&h?.success)){const R=(typeof h?.error=="string"?h.error:h?.error?.message)||c.statusText||"Failed to import agent from registry";throw p({title:"Failed to import agent",description:R,variant:"destructive"}),m=!0,new Error(R)}p({title:"Agent imported",description:`${s.name} is now available in Coconut`}),await l()}catch(c){if(!m){const h=c instanceof Error&&c.message?c.message:"Failed to import agent from registry";p({title:"Failed to import agent",description:h,variant:"destructive"})}throw c}finally{j(!1)}},[l,p]);return n?e.jsx("div",{className:"space-y-6",children:e.jsx(N,{children:e.jsx(w,{className:"pt-6",children:e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsx(M,{className:"h-8 w-8 animate-spin text-muted-foreground"}),e.jsx("span",{className:"ml-2 text-muted-foreground",children:"Loading agents..."})]})})})}):t.length===0?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"mb-6 flex items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"Agents"}),e.jsx("p",{className:"text-muted-foreground",children:"Manage agents for your development workflows"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(b,{variant:"outline",size:"sm",onClick:()=>f(!0),disabled:u,children:[e.jsx(F,{className:"h-4 w-4 sm:mr-2"}),e.jsx("span",{className:"hidden sm:inline",children:"Registry"})]}),e.jsx(b,{size:"sm",asChild:!0,children:e.jsxs(v,{to:"/agents/new",children:[e.jsx(T,{className:"h-4 w-4 sm:mr-2"}),e.jsx("span",{className:"hidden sm:inline",children:"Create New"})]})})]})]}),e.jsx(N,{children:e.jsx(w,{className:"pt-6",children:e.jsxs("div",{className:"text-center",children:[e.jsx(E,{className:"mx-auto h-12 w-12 text-muted-foreground"}),e.jsx("h3",{className:"mt-4 text-lg font-semibold",children:"No Agents Found"}),e.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Specialized agents help you automate your development and business workflows."})]})})})]}),e.jsx(B,{open:d,onOpenChange:f,onImport:C})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"Agents"}),e.jsx("p",{className:"text-muted-foreground",children:"Manage agents for your development workflows"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(b,{variant:"outline",size:"sm",onClick:()=>f(!0),disabled:u,children:[e.jsx(F,{className:"h-4 w-4 sm:mr-2"}),e.jsx("span",{className:"hidden sm:inline",children:"Registry"})]}),e.jsx(b,{size:"sm",asChild:!0,children:e.jsxs(v,{to:"/agents/new",children:[e.jsx(T,{className:"h-4 w-4 sm:mr-2"}),e.jsx("span",{className:"hidden sm:inline",children:"Create New"})]})})]})]}),e.jsx("div",{className:"grid gap-4",children:t.map(s=>{const m=Q(s.metadata.tools);return e.jsx(v,{to:`/agents/${s.filename.replace(".md","")}`,className:"block",children:e.jsxs(N,{className:"group hover:shadow-md hover:bg-muted/30 transition-all cursor-pointer",children:[e.jsx(D,{children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"space-y-1 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(H,{className:"text-lg",children:s.title}),e.jsx(b,{variant:"ghost",size:"sm",onClick:c=>{c.preventDefault(),A(s.filename)},className:"h-6 w-6 p-0 hover:bg-muted opacity-0 group-hover:opacity-100 transition-opacity",title:"Copy file path to clipboard",children:a[s.filename]?e.jsx($,{className:"w-3 h-3 text-green-600"}):e.jsx(_,{className:"w-3 h-3"})})]}),e.jsxs("div",{className:"text-xs text-muted-foreground font-mono bg-muted/50 px-2 py-1 rounded inline-block cursor-pointer hover:bg-muted/70 transition-colors",onClick:c=>{c.preventDefault(),A(s.filename)},title:"Click to copy file path to clipboard",children:[".nut/agents/",s.filename]}),e.jsxs("div",{className:"flex items-center gap-4 text-sm text-muted-foreground",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(K,{className:"w-3 h-3"}),s.metadata.color||"blue"]}),m.length>0&&e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(E,{className:"w-3 h-3"}),m.join(", ")]})]})]}),s.metadata.color&&e.jsx(y,{variant:"outline",className:"capitalize border-2",style:{backgroundColor:g[s.metadata.color]?.bg||g.blue.bg,color:g[s.metadata.color]?.text||g.blue.text,borderColor:g[s.metadata.color]?.border||g.blue.border},children:s.metadata.color})]})}),e.jsx(w,{children:e.jsx("div",{className:"space-y-4",children:e.jsx("div",{className:"prose prose-sm max-w-none dark:prose-invert",children:e.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:s.metadata.description})})})})]})},s.filename)})})]}),e.jsx(B,{open:d,onOpenChange:f,onImport:C})]})}export{oe as default};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{c as b,j as e,a1 as w,B as t,ad as C,T as A,I as r,v as l,w as c,x as d,y as o,z as i}from"./index-BSBM4i_g.js";import{C as x,b as m,c as u,d as h,a as j}from"./card-Cnz8b7Ou.js";import{L as a}from"./label-vEgNxdb2.js";import{B as n}from"./badge-DO6e5hC1.js";import{P as S}from"./plus-BfBtnncn.js";import{P as p}from"./pause-6aQLhmG9.js";import{P as R}from"./play-DsDsjO2V.js";import{Z as T}from"./zap-BMkP_c9R.js";/**
|
|
2
|
+
* @license lucide-react v0.542.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const k=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],P=b("chart-column",k);function G(){const g=[{id:"1",name:"Code Review Agent",description:"Automatically reviews pull requests and provides feedback",type:"Code Review",status:"active",model:"claude-3.5-sonnet",lastRun:"5 minutes ago",runsToday:23,successRate:"94%"},{id:"2",name:"Documentation Agent",description:"Generates and updates code documentation automatically",type:"Documentation",status:"paused",model:"gpt-4",lastRun:"2 hours ago",runsToday:8,successRate:"98%"},{id:"3",name:"Bug Hunter Agent",description:"Scans code for potential bugs and security vulnerabilities",type:"Quality Assurance",status:"active",model:"gemini-pro",lastRun:"15 minutes ago",runsToday:12,successRate:"87%"},{id:"4",name:"Performance Monitor",description:"Monitors application performance and suggests optimizations",type:"Performance",status:"inactive",model:"claude-3-haiku",lastRun:"1 day ago",runsToday:0,successRate:"91%"}],v=["Code Review","Documentation","Quality Assurance","Performance","Security","Refactoring","Testing","Architecture"],f=["claude-3.5-sonnet","claude-3-haiku","gpt-4","gpt-3.5-turbo","gemini-pro","gemini-flash"],y=s=>{switch(s){case"active":return e.jsx(T,{className:"h-4 w-4 text-green-500"});case"paused":return e.jsx(p,{className:"h-4 w-4 text-yellow-500"});case"inactive":return e.jsx("div",{className:"h-4 w-4 rounded-full bg-gray-300"});default:return e.jsx("div",{className:"h-4 w-4 rounded-full bg-gray-300"})}},N=s=>{switch(s){case"active":return e.jsx(n,{className:"bg-green-100 text-green-800",children:"Active"});case"paused":return e.jsx(n,{className:"bg-yellow-100 text-yellow-800",children:"Paused"});case"inactive":return e.jsx(n,{variant:"secondary",children:"Inactive"});default:return e.jsx(n,{variant:"secondary",children:"Unknown"})}};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:"Agents Management"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Configure and manage AI agents that automate various development tasks."})]}),e.jsx(w,{}),e.jsxs(x,{children:[e.jsx(m,{children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(u,{children:"Active Agents"}),e.jsx(h,{children:"Monitor and control your AI agents across different workflows."})]}),e.jsxs(t,{size:"sm",children:[e.jsx(S,{className:"h-4 w-4 mr-2"}),"Create Agent"]})]})}),e.jsx(j,{children:e.jsx("div",{className:"space-y-4",children:g.map(s=>e.jsxs("div",{className:"flex items-center justify-between p-4 border rounded-lg",children:[e.jsxs("div",{className:"flex items-center space-x-4",children:[y(s.status),e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("h4",{className:"font-medium",children:s.name}),N(s.status),e.jsx(n,{variant:"outline",children:s.type}),e.jsx(n,{variant:"outline",children:s.model})]}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:s.description}),e.jsxs("div",{className:"flex items-center space-x-4 mt-2",children:[e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Last run: ",s.lastRun]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Runs today: ",s.runsToday]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Success rate: ",s.successRate]})]})]})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(t,{variant:"outline",size:"sm",children:e.jsx(P,{className:"h-4 w-4"})}),s.status==="active"?e.jsx(t,{variant:"outline",size:"sm",children:e.jsx(p,{className:"h-4 w-4"})}):e.jsx(t,{variant:"outline",size:"sm",children:e.jsx(R,{className:"h-4 w-4"})}),e.jsx(t,{variant:"outline",size:"sm",children:e.jsx(C,{className:"h-4 w-4"})}),e.jsx(t,{variant:"outline",size:"sm",children:e.jsx(A,{className:"h-4 w-4"})})]})]},s.id))})})]}),e.jsxs(x,{children:[e.jsxs(m,{children:[e.jsx(u,{children:"Create New Agent"}),e.jsx(h,{children:"Configure a new AI agent to automate specific development tasks."})]}),e.jsxs(j,{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx(a,{htmlFor:"agentName",children:"Agent Name"}),e.jsx(r,{id:"agentName",placeholder:"Enter agent name"})]}),e.jsxs("div",{children:[e.jsx(a,{htmlFor:"agentType",children:"Agent Type"}),e.jsxs(l,{children:[e.jsx(c,{children:e.jsx(d,{placeholder:"Select agent type"})}),e.jsx(o,{children:v.map(s=>e.jsx(i,{value:s.toLowerCase(),children:s},s))})]})]})]}),e.jsxs("div",{children:[e.jsx(a,{htmlFor:"agentDescription",children:"Description"}),e.jsx(r,{id:"agentDescription",placeholder:"What does this agent do?"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx(a,{htmlFor:"aiModel",children:"AI Model"}),e.jsxs(l,{children:[e.jsx(c,{children:e.jsx(d,{placeholder:"Select AI model"})}),e.jsx(o,{children:f.map(s=>e.jsx(i,{value:s,children:s},s))})]})]}),e.jsxs("div",{children:[e.jsx(a,{htmlFor:"systemPrompt",children:"System Prompt"}),e.jsxs(l,{children:[e.jsx(c,{children:e.jsx(d,{placeholder:"Select system prompt"})}),e.jsxs(o,{children:[e.jsx(i,{value:"code-review",children:"Code Review Assistant"}),e.jsx(i,{value:"documentation",children:"Documentation Generator"}),e.jsx(i,{value:"bug-analysis",children:"Bug Analysis Expert"}),e.jsx(i,{value:"architecture",children:"Architecture Advisor"})]})]})]})]}),e.jsxs("div",{children:[e.jsx(a,{htmlFor:"triggers",children:"Triggers"}),e.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:["Pull Request","Commit","File Change","Schedule","Manual"].map(s=>e.jsxs("label",{className:"flex items-center space-x-2",children:[e.jsx("input",{type:"checkbox",className:"rounded"}),e.jsx("span",{className:"text-sm",children:s})]},s))})]}),e.jsxs("div",{children:[e.jsx(a,{htmlFor:"configuration",children:"Agent Configuration (JSON)"}),e.jsx("textarea",{id:"configuration",className:"w-full min-h-[120px] p-3 border rounded-md font-mono text-sm",placeholder:'{"maxTokens": 4000, "temperature": 0.3, "timeout": 30}'})]}),e.jsxs("div",{className:"flex justify-end space-x-2",children:[e.jsx(t,{variant:"outline",children:"Test Configuration"}),e.jsx(t,{variant:"outline",children:"Save as Draft"}),e.jsx(t,{children:"Create & Activate"})]})]})]}),e.jsxs(x,{children:[e.jsxs(m,{children:[e.jsx(u,{children:"Global Agent Settings"}),e.jsx(h,{children:"Configure global settings that apply to all agents."})]}),e.jsxs(j,{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx(a,{htmlFor:"maxConcurrent",children:"Max Concurrent Agents"}),e.jsx(r,{id:"maxConcurrent",type:"number",placeholder:"5"})]}),e.jsxs("div",{children:[e.jsx(a,{htmlFor:"defaultTimeout",children:"Default Timeout (seconds)"}),e.jsx(r,{id:"defaultTimeout",type:"number",placeholder:"30"})]})]}),e.jsxs("div",{children:[e.jsx(a,{htmlFor:"retryPolicy",children:"Retry Policy"}),e.jsxs(l,{children:[e.jsx(c,{children:e.jsx(d,{placeholder:"Select retry policy"})}),e.jsxs(o,{children:[e.jsx(i,{value:"none",children:"No Retries"}),e.jsx(i,{value:"exponential",children:"Exponential Backoff"}),e.jsx(i,{value:"linear",children:"Linear Retry"}),e.jsx(i,{value:"custom",children:"Custom Policy"})]})]})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("input",{type:"checkbox",id:"enableLogging",className:"rounded"}),e.jsx(a,{htmlFor:"enableLogging",children:"Enable detailed logging"})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("input",{type:"checkbox",id:"enableMetrics",className:"rounded"}),e.jsx(a,{htmlFor:"enableMetrics",children:"Collect performance metrics"})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("input",{type:"checkbox",id:"enableNotifications",className:"rounded"}),e.jsx(a,{htmlFor:"enableNotifications",children:"Send failure notifications"})]}),e.jsxs("div",{className:"flex justify-end space-x-2",children:[e.jsx(t,{variant:"outline",children:"Reset to Defaults"}),e.jsx(t,{children:"Save Settings"})]})]})]})]})}export{G as default};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{c as q,m as z,r as t,aX as y,j as e,B as a,aY as R,T as _,D as j,a as g,b as v,d as f,e as A,I as F,$ as N,ai as J,t as i}from"./index-BSBM4i_g.js";import{C as W,b as G,c as Q,d as V,a as Z}from"./card-Cnz8b7Ou.js";import{L as w}from"./label-vEgNxdb2.js";import{B as ee}from"./badge-DO6e5hC1.js";import{A as I,a as C}from"./alert-CNSGDe1U.js";import{P as se}from"./plus-BfBtnncn.js";import{C as te}from"./circle-alert-Dick-jNf.js";/**
|
|
2
|
+
* @license lucide-react v0.542.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const ae=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],L=q("info",ae);function he(){const{authEnabled:n}=z(),[k,P]=t.useState([]),[b,K]=t.useState(!0),[M,o]=t.useState(!1),[O,d]=t.useState(!1),[h,D]=t.useState(""),[x,E]=t.useState("never"),[c,S]=t.useState(null),[m,l]=t.useState(null);t.useEffect(()=>{p()},[]);const p=async()=>{K(!0);try{const s=await y("/api/v1/api-keys");s.success&&P(s.data?.apiKeys||[])}catch(s){console.error("Failed to load API keys:",s),P([])}finally{K(!1)}},U=async()=>{if(!h.trim()){i({title:"Error",description:"Please provide a name for the API key",variant:"destructive"});return}try{const s={name:h,scopes:["*"]};x!=="never"&&(s.expiresIn=x);const r=await y("/api/v1/api-keys",{method:"POST",body:JSON.stringify(s)});r.success&&(S(r.data),o(!1),d(!0),D(""),E("never"),await p(),i({title:"API Key Created",description:"Make sure to copy your API key now. You won't be able to see it again!"}))}catch(s){console.error("Failed to create API key:",s),i({title:"Error",description:"Failed to create API key",variant:"destructive"})}},B=async s=>{try{(await y(`/api/v1/api-keys/${s}`,{method:"DELETE"})).success&&(await p(),l(null),i({title:"API Key Deleted",description:"The API key has been permanently deleted"}))}catch(r){console.error("Failed to delete API key:",r),i({title:"Error",description:"Failed to delete API key",variant:"destructive"})}},$=async s=>{try{await navigator.clipboard.writeText(s),i({title:"Copied",description:"API key copied to clipboard"})}catch{i({title:"Error",description:"Failed to copy to clipboard",variant:"destructive"})}},u=s=>new Date(s).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}),H=s=>s?new Date(s)<new Date:!1,X=typeof window<"u"?window.location.origin:"http://localhost:3000",Y=c?`curl -H "X-API-Key: ${c.key}" \\
|
|
7
|
+
+ ${X}/api/v1/proposals`:"",T=n?null:e.jsxs(I,{children:[e.jsx(L,{className:"h-4 w-4"}),e.jsxs(C,{children:["Authentication is currently disabled. API keys will only be required once you enable authentication in the ",e.jsx("a",{href:"/settings/authentication",className:"underline",children:"Authentication settings"}),"."]})]});return!n&&b?e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:"API Keys"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Manage API keys for programmatic access"})]}),T]}):b?e.jsx("div",{className:"space-y-6",children:e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:"API Keys"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})]})}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:"API Keys"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Manage API keys for programmatic access to your Coconut instance"})]}),T,n&&e.jsxs(I,{children:[e.jsx(L,{className:"h-4 w-4"}),e.jsxs(C,{children:["API keys provide programmatic access to your Coconut instance. Use them in CI/CD pipelines or automation scripts by including the key in the ",e.jsx("code",{className:"bg-muted px-1 py-0.5 rounded",children:"X-API-Key"})," header."]})]}),e.jsxs(W,{children:[e.jsx(G,{children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(Q,{children:"Active API Keys"}),e.jsx(V,{children:"API keys you've created for programmatic access"})]}),e.jsxs(a,{onClick:()=>o(!0),disabled:!n,children:[e.jsx(se,{className:"mr-2 h-4 w-4"}),"Create API Key"]})]})}),e.jsx(Z,{children:k.length===0?e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(R,{className:"h-12 w-12 mx-auto mb-4 opacity-20"}),e.jsx("p",{children:"No API keys yet"}),e.jsx("p",{className:"text-sm",children:"Create an API key to get started with programmatic access"})]}):e.jsx("div",{className:"space-y-4",children:k.map(s=>e.jsxs("div",{className:"flex items-center justify-between p-4 border rounded-lg",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("p",{className:"font-medium",children:s.name}),H(s.expiresAt)&&e.jsx(ee,{variant:"destructive",children:"Expired"})]}),e.jsx("p",{className:"text-sm text-muted-foreground font-mono",children:s.keyPreview}),e.jsxs("div",{className:"flex items-center gap-4 mt-2 text-xs text-muted-foreground",children:[e.jsxs("span",{children:["Created: ",u(s.createdAt)]}),s.expiresAt&&e.jsxs("span",{children:["Expires: ",u(s.expiresAt)]}),s.lastUsedAt&&e.jsxs("span",{children:["Last used: ",u(s.lastUsedAt)]})]})]}),e.jsx(a,{variant:"ghost",size:"icon",onClick:()=>l(s.id),children:e.jsx(_,{className:"h-4 w-4 text-destructive"})})]},s.id))})})]}),e.jsx(j,{open:M,onOpenChange:o,children:e.jsxs(g,{children:[e.jsxs(v,{children:[e.jsx(f,{children:"Create API Key"}),e.jsx(A,{children:"Create a new API key for programmatic access. The key will only be shown once."})]}),e.jsxs("div",{className:"space-y-4 py-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(w,{htmlFor:"keyName",children:"Name"}),e.jsx(F,{id:"keyName",placeholder:"CI/CD Pipeline",value:h,onChange:s=>D(s.target.value)}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"A descriptive name to identify this API key"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(w,{htmlFor:"keyExpiry",children:"Expiration"}),e.jsxs("select",{id:"keyExpiry",className:"w-full rounded-md border border-input bg-background px-3 py-2 text-sm",value:x,onChange:s=>E(s.target.value),children:[e.jsx("option",{value:"never",children:"Never"}),e.jsx("option",{value:"30d",children:"30 days"}),e.jsx("option",{value:"90d",children:"90 days"}),e.jsx("option",{value:"1y",children:"1 year"})]})]})]}),e.jsxs(N,{children:[e.jsx(a,{variant:"outline",onClick:()=>o(!1),children:"Cancel"}),e.jsx(a,{onClick:U,disabled:!n,children:"Create API Key"})]})]})}),e.jsx(j,{open:O,onOpenChange:d,children:e.jsxs(g,{className:"sm:max-w-[600px]",children:[e.jsxs(v,{children:[e.jsx(f,{children:"API Key Created"}),e.jsx(A,{children:"Make sure to copy your API key now. You won't be able to see it again!"})]}),e.jsxs(I,{variant:"destructive",className:"my-4",children:[e.jsx(te,{className:"h-4 w-4"}),e.jsx(C,{children:"This is the only time you will see this key. Store it securely."})]}),c&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(w,{children:"API Key"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(F,{readOnly:!0,value:c.key,className:"font-mono text-sm"}),e.jsx(a,{variant:"outline",size:"icon",onClick:()=>$(c.key),children:e.jsx(J,{className:"h-4 w-4"})})]})]}),e.jsxs("div",{className:"text-sm text-muted-foreground",children:[e.jsx("p",{className:"mb-2",children:"Usage example:"}),e.jsx("pre",{className:"bg-muted p-3 rounded-md whitespace-pre-wrap break-words",children:e.jsx("code",{className:"font-mono text-xs",children:Y})})]})]}),e.jsx(N,{children:e.jsx(a,{onClick:()=>{d(!1),S(null)},children:"I've Saved My Key"})})]})}),e.jsx(j,{open:!!m,onOpenChange:s=>!s&&l(null),children:e.jsxs(g,{children:[e.jsxs(v,{children:[e.jsx(f,{children:"Delete API Key"}),e.jsx(A,{children:"Are you sure you want to delete this API key? This action cannot be undone and any scripts using this key will stop working."})]}),e.jsxs(N,{children:[e.jsx(a,{variant:"outline",onClick:()=>l(null),children:"Cancel"}),e.jsx(a,{variant:"destructive",onClick:()=>m&&B(m),children:"Delete API Key"})]})]})})]})}export{he as default};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import{u as D,H as M,r as l,A as b,j as e,B as S,L as I,a2 as _,I as d,a0 as B}from"./index-BSBM4i_g.js";import{C as u,a as p,b as j,c as v}from"./card-Cnz8b7Ou.js";import{L as o}from"./label-vEgNxdb2.js";import{M as P}from"./markdown-editor-O6tGYa1a.js";import{A as R}from"./arrow-left-CEZFPQje.js";import{C as $}from"./circle-check-big-B70gdce7.js";function Q(){const F=D(),{toast:h}=M(),[n,x]=l.useState({stack:{runtime:"",framework:"",language:"",database:"",deployment:"",repository:""},commands:{}}),[y,f]=l.useState(""),[E,k]=l.useState(""),[L,N]=l.useState(!0),[C,w]=l.useState(!1);l.useEffect(()=>{fetch(`${b}/api/v1/context/architecture`).then(t=>t.json()).then(t=>{if(t.success){const a=t.document,m={stack:{runtime:a.metadata.stack?.runtime||"",framework:a.metadata.stack?.framework||"",language:a.metadata.stack?.language||"",database:a.metadata.stack?.database||"",deployment:a.metadata.stack?.deployment||"",repository:a.metadata.stack?.repository||""},commands:a.metadata.commands||{}};x(m);const s=Object.entries(m.commands).map(([r,c])=>`${r}: ${c}`).join(`
|
|
2
|
+
`);k(s),f(a.content.trim())}N(!1)}).catch(t=>{console.error("Failed to load context:",t),h({title:"Error",description:"Failed to load architecture documentation",variant:"destructive"}),N(!1)})},[h]);const A=async()=>{w(!0);try{const a=await(await fetch(`${b}/api/v1/context/architecture`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:y,metadata:{stack:n.stack,commands:n.commands}})})).json();if(a.success)h({title:"Success",description:"Architecture documentation saved successfully",action:e.jsx($,{className:"h-4 w-4"})}),F("/context/architecture");else throw new Error(a.error||"Failed to save context")}catch(t){console.error("Save error:",t),h({title:"Error",description:"Failed to save architecture documentation",variant:"destructive"})}finally{w(!1)}},i=(t,a)=>{x(m=>{const s={...m},r=t.split(".");let c=s;for(let g=0;g<r.length-1;g++)c=c[r[g]];return c[r[r.length-1]]=a,s})},T=t=>{k(t);const a={};t.split(`
|
|
3
|
+
`).filter(s=>s.trim()).forEach(s=>{const[r,...c]=s.split(":");r&&c.length>0&&(a[r.trim()]=c.join(":").trim())}),x(s=>({...s,commands:a}))};return L?e.jsx("div",{className:"space-y-6",children:e.jsx(u,{children:e.jsx(p,{className:"pt-6",children:e.jsx("div",{className:"text-center",children:e.jsx("p",{children:"Loading..."})})})})}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("h1",{className:"text-xl sm:text-2xl font-bold tracking-tight",children:"Edit Architecture"}),e.jsx("p",{className:"text-muted-foreground text-sm hidden sm:block",children:"Edit technical architecture and supporting metadata"})]}),e.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[e.jsx(S,{variant:"ghost",size:"sm",asChild:!0,children:e.jsx(I,{to:"/context/architecture",className:"text-muted-foreground hover:text-foreground transition-colors",children:e.jsx(R,{className:"w-4 h-4"})})}),e.jsxs(S,{onClick:A,disabled:C,size:"sm",children:[e.jsx(_,{className:"w-4 h-4 sm:mr-2"}),e.jsx("span",{className:"hidden sm:inline",children:C?"Saving...":"Save"})]})]})]}),e.jsxs(u,{children:[e.jsx(j,{children:e.jsx(v,{children:"Technology Stack"})}),e.jsxs(p,{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(o,{htmlFor:"runtime",children:"Runtime"}),e.jsx(d,{id:"runtime",value:n.stack.runtime,onChange:t=>i("stack.runtime",t.target.value),placeholder:"node|python|go|etc"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(o,{htmlFor:"framework",children:"Framework"}),e.jsx(d,{id:"framework",value:n.stack.framework,onChange:t=>i("stack.framework",t.target.value),placeholder:"express|fastify|django|gin|etc"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(o,{htmlFor:"language",children:"Language"}),e.jsx(d,{id:"language",value:n.stack.language,onChange:t=>i("stack.language",t.target.value),placeholder:"typescript|javascript|python|go|etc"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(o,{htmlFor:"database",children:"Database"}),e.jsx(d,{id:"database",value:n.stack.database,onChange:t=>i("stack.database",t.target.value),placeholder:"postgresql|mysql|mongodb|sqlite|etc"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(o,{htmlFor:"deployment",children:"Deployment"}),e.jsx(d,{id:"deployment",value:n.stack.deployment,onChange:t=>i("stack.deployment",t.target.value),placeholder:"docker|kubernetes|vercel|aws|etc"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(o,{htmlFor:"repository",children:"Repository"}),e.jsx(d,{id:"repository",value:n.stack.repository,onChange:t=>i("stack.repository",t.target.value),placeholder:"https://github.com/yourorg/yourproject"})]})]})]})]}),e.jsxs(u,{children:[e.jsx(j,{children:e.jsx(v,{children:"Quick Commands"})}),e.jsx(p,{className:"space-y-4",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx(o,{htmlFor:"commands",children:"Commands (format: command_name: command_to_run)"}),e.jsx(B,{id:"commands",value:E,onChange:t=>T(t.target.value),placeholder:`install: npm install
|
|
4
|
+
dev: npm run dev
|
|
5
|
+
test: npm test
|
|
6
|
+
build: npm run build
|
|
7
|
+
deploy: npm run deploy`,rows:4})]})})]}),e.jsxs(u,{children:[e.jsx(j,{children:e.jsx(v,{children:"Architecture Documentation"})}),e.jsx(p,{children:e.jsx(P,{value:y,onChange:t=>f(t||""),placeholder:`Write your architecture documentation in markdown...
|
|
8
|
+
|
|
9
|
+
## System Design
|
|
10
|
+
|
|
11
|
+
Describe your high-level system architecture here.
|
|
12
|
+
|
|
13
|
+
## Directory Structure
|
|
14
|
+
|
|
15
|
+
\`\`\`
|
|
16
|
+
project-root/
|
|
17
|
+
├── src/
|
|
18
|
+
│ ├── components/
|
|
19
|
+
│ ├── pages/
|
|
20
|
+
│ └── services/
|
|
21
|
+
\`\`\``,height:800})})]})]})}export{Q as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{H as g,r as n,A as v,j as e,n as y,g as k,B as l,ap as b,ao as w,L as C,J as E,al as A}from"./index-BSBM4i_g.js";import{C as a,a as c,b as o,c as m}from"./card-Cnz8b7Ou.js";import{c as D}from"./clipboard-B9ndUJKl.js";function F(){const{toast:h}=g(),[r,x]=n.useState(null),[u,p]=n.useState(!0),[j,i]=n.useState(!1);n.useEffect(()=>{fetch(`${v}/api/v1/context/architecture`).then(t=>{if(t.ok)return t.json();throw new Error("Not found")}).then(t=>{t.success?(x(t.document),i(!0)):i(!1)}).catch(()=>{i(!1)}).finally(()=>{p(!1)})},[]);const N=async()=>{const t=".nut/context/architecture.md";try{await D(t),h({title:"Copied!",description:`Path ${t} copied to clipboard`})}catch(d){console.error("Failed to copy path:",d),h({title:"Error",description:"Failed to copy path to clipboard",variant:"destructive"})}},f=()=>{const t=new CustomEvent("discuss-in-chat",{detail:{type:"context",id:"architecture-md",filename:"architecture.md",name:"architecture.md",path:".nut/context/architecture.md"}});window.dispatchEvent(t)};if(u)return e.jsx("div",{className:"space-y-6",children:e.jsx(a,{children:e.jsx(c,{className:"pt-6",children:e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsx(y,{className:"h-8 w-8 animate-spin text-muted-foreground"}),e.jsx("span",{className:"ml-2 text-muted-foreground",children:"Loading architecture documentation..."})]})})})});if(!j||!r)return e.jsx("div",{className:"space-y-6",children:e.jsx(a,{children:e.jsx(c,{className:"pt-6",children:e.jsxs("div",{className:"text-center",children:[e.jsx(k,{className:"mx-auto h-12 w-12 text-muted-foreground"}),e.jsx("h3",{className:"mt-4 text-lg font-semibold",children:"No Architecture Documentation Found"}),e.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Architecture documentation will appear here once created."})]})})})});const s=r.metadata;return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"Technical Architecture"}),e.jsx("p",{className:"text-muted-foreground",children:"System design, components, and technical patterns"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(l,{variant:"outline",size:"sm",onClick:f,children:[e.jsx(b,{className:"h-4 w-4 sm:mr-2"}),e.jsx("span",{className:"hidden sm:inline",children:"Discuss"})]}),e.jsxs(l,{variant:"outline",size:"sm",onClick:N,children:[e.jsx(w,{className:"h-4 w-4 sm:mr-2"}),e.jsx("span",{className:"hidden sm:inline",children:"Copy Path"})]}),e.jsx(l,{size:"sm",asChild:!0,children:e.jsxs(C,{to:"/context/architecture/edit",children:[e.jsx(E,{className:"h-4 w-4 sm:mr-2"}),e.jsx("span",{className:"hidden sm:inline",children:"Edit"})]})})]})]}),s&&e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs(a,{children:[e.jsx(o,{className:"pb-3",children:e.jsx(m,{className:"text-lg font-semibold",children:"Technology Stack"})}),e.jsx(c,{className:"space-y-3",children:s.stack&&e.jsxs("div",{className:"space-y-1 text-sm",children:[s.stack.runtime&&e.jsxs("div",{children:["Runtime: ",s.stack.runtime]}),s.stack.framework&&e.jsxs("div",{children:["Framework: ",s.stack.framework]}),s.stack.language&&e.jsxs("div",{children:["Language: ",s.stack.language]}),s.stack.database&&e.jsxs("div",{children:["Database: ",s.stack.database]}),s.stack.deployment&&e.jsxs("div",{children:["Deployment: ",s.stack.deployment]}),s.stack.repository&&e.jsxs("div",{children:["Repository:"," ",e.jsx("a",{href:s.stack.repository,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:s.stack.repository})]})]})})]}),e.jsxs(a,{children:[e.jsx(o,{className:"pb-3",children:e.jsx(m,{className:"text-lg font-semibold",children:"Quick Commands"})}),e.jsx(c,{className:"space-y-3",children:s.commands&&e.jsxs("div",{className:"space-y-1",children:[Object.entries(s.commands).slice(0,5).map(([t,d])=>e.jsxs("div",{className:"text-sm",children:[e.jsxs("span",{className:"font-medium capitalize",children:[t,": "]}),e.jsx("code",{className:"bg-muted px-2 py-1 rounded text-xs",children:d})]},t)),Object.entries(s.commands).length>5&&e.jsxs("div",{className:"text-xs text-muted-foreground",children:["+ ",Object.entries(s.commands).length-5," more commands"]})]})})]})]}),e.jsxs(a,{children:[e.jsx(o,{children:e.jsx(m,{className:"text-lg font-semibold",children:"Architecture Documentation"})}),e.jsx(c,{children:e.jsx("div",{className:"prose prose-sm max-w-none dark:prose-invert",children:e.jsx(A,{children:r.content||"No content available"})})})]})]})}export{F as default};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{c as Y,m as le,r as n,aX as c,j as e,a1 as O,aW as ce,D as I,_ as M,B as l,a as $,b as V,d as _,e as z,I as j,v as H,w as J,x as W,y as q,z as a,$ as B,M as oe,N as de,T as he,O as ue,P as xe,Q as me,R as ge,U as je,V as pe,W as ve,t as r}from"./index-BSBM4i_g.js";import{C as p,b as v,c as w,d as f,a as y}from"./card-Cnz8b7Ou.js";import{L as o}from"./label-vEgNxdb2.js";import{S as U}from"./switch-Bjq8cgQn.js";import{B as k}from"./badge-DO6e5hC1.js";import{C as we}from"./circle-alert-Dick-jNf.js";/**
|
|
2
|
+
* @license lucide-react v0.542.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const fe=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],ye=Y("key-round",fe);/**
|
|
7
|
+
* @license lucide-react v0.542.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/const Ne=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]],Se=Y("user-plus",Ne);function Fe(){const{user:N,authEnabled:K,checkAuthStatus:Q}=le(),[i,d]=n.useState(null),[X,F]=n.useState(!0),[S,P]=n.useState(!1),[G,C]=n.useState(!1),[b,D]=n.useState(""),[A,R]=n.useState(""),[T,L]=n.useState("viewer"),[E,u]=n.useState(null),[x,m]=n.useState(""),Z=!K||N?.role==="admin";n.useEffect(()=>{h()},[]);const h=async()=>{try{F(!0);const s=await c("/api/v1/auth-settings");s.success?d(s.data):d(null)}catch(s){console.error("Failed to load auth settings:",s),d(null)}finally{F(!1)}},ee=async()=>{if(!i)return;const s=!i.enabled;try{const t=await c("/api/v1/auth-settings",{method:"PUT",body:JSON.stringify({enabled:s})});if(t.success)d({...i,enabled:s}),await Q(),r({title:"Success",description:`Authentication ${s?"enabled":"disabled"}`});else throw new Error(t.error||"Failed to toggle auth")}catch(t){r({title:"Error",description:t.message||"Failed to toggle authentication",variant:"destructive"})}},se=async()=>{if(!i)return;const s=!i.allowRegistration;try{const t=await c("/api/v1/auth-settings",{method:"PUT",body:JSON.stringify({allowRegistration:s})});if(t.success)d({...i,allowRegistration:s}),r({title:"Success",description:`Self-registration ${s?"enabled":"disabled"}`});else throw new Error(t.error||"Failed to update setting")}catch(t){r({title:"Error",description:t.message||"Failed to update setting",variant:"destructive"})}},te=async()=>{if(!b||!A){r({title:"Error",description:"Please provide email and name",variant:"destructive"});return}try{const s=await c("/api/v1/auth-settings/users",{method:"POST",body:JSON.stringify({email:b,name:A,role:T})});if(s.success)await h(),C(!1),D(""),R(""),L("viewer"),r({title:"Success",description:"User added to whitelist"});else throw new Error(s.error||"Failed to add user")}catch(s){r({title:"Error",description:s.message||"Failed to add user",variant:"destructive"})}},ie=async s=>{try{const t=await c(`/api/v1/auth-settings/users/${s}`,{method:"DELETE"});if(t.success)await h(),r({title:"Success",description:"User removed from whitelist"});else throw new Error(t.error||"Failed to remove user")}catch(t){r({title:"Error",description:t.message||"Failed to remove user",variant:"destructive"})}},re=async(s,t)=>{try{const g=await c(`/api/v1/auth-settings/users/${s}`,{method:"PUT",body:JSON.stringify({role:t})});if(g.success)await h(),r({title:"Success",description:"User role updated"});else throw new Error(g.error||"Failed to update role")}catch(g){r({title:"Error",description:g.message||"Failed to update role",variant:"destructive"})}},ae=async()=>{if(!(!E||!x)){if(x.length<8){r({title:"Error",description:"Password must be at least 8 characters",variant:"destructive"});return}try{const s=await c(`/api/v1/auth-settings/users/${E}/reset-password`,{method:"POST",body:JSON.stringify({newPassword:x})});if(s.success)u(null),m(""),r({title:"Success",description:"Password reset successfully"});else throw new Error(s.error||"Failed to reset password")}catch(s){r({title:"Error",description:s.message||"Failed to reset password",variant:"destructive"})}}},ne=async()=>{if(i)try{P(!0);const s=await c("/api/v1/auth-settings",{method:"PUT",body:JSON.stringify({session:i.session})});if(s.success)r({title:"Success",description:"Session settings updated"});else throw new Error(s.error||"Failed to update settings")}catch(s){r({title:"Error",description:s.message||"Failed to update settings",variant:"destructive"})}finally{P(!1)}};return X?e.jsx("div",{children:"Loading..."}):i?Z?e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:"Authentication"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Manage authentication settings and user access."})]}),e.jsx(O,{}),e.jsxs(p,{children:[e.jsxs(v,{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ce,{className:"h-5 w-5"}),e.jsx(w,{children:"Authentication Status"})]}),e.jsx(f,{children:"Control whether authentication is required to access Coconut."})]}),e.jsxs(y,{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(o,{htmlFor:"auth-enabled",children:"Require Authentication"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"When enabled, users must log in to access Coconut"})]}),e.jsx(U,{id:"auth-enabled",checked:i.enabled,onCheckedChange:ee})]}),i.enabled&&e.jsxs("div",{className:"flex items-center justify-between pt-2 border-t",children:[e.jsxs("div",{children:[e.jsx(o,{htmlFor:"allow-registration",children:"Allow Self-Registration"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Whitelisted users can create their own accounts"})]}),e.jsx(U,{id:"allow-registration",checked:i.allowRegistration,onCheckedChange:se})]})]})]}),e.jsxs(p,{children:[e.jsx(v,{children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(w,{children:"Whitelisted Users"}),e.jsx(f,{children:"Manage users who can access this Coconut instance."})]}),e.jsxs(I,{open:G,onOpenChange:C,children:[e.jsx(M,{asChild:!0,children:e.jsxs(l,{size:"sm",children:[e.jsx(Se,{className:"h-4 w-4 mr-2"}),"Add User"]})}),e.jsxs($,{children:[e.jsxs(V,{children:[e.jsx(_,{children:"Add User to Whitelist"}),e.jsx(z,{children:"Add a user's email to allow them to register and access Coconut."})]}),e.jsxs("div",{className:"space-y-4 py-4",children:[e.jsxs("div",{children:[e.jsx(o,{htmlFor:"new-email",children:"Email"}),e.jsx(j,{id:"new-email",type:"email",value:b,onChange:s=>D(s.target.value),placeholder:"user@example.com"})]}),e.jsxs("div",{children:[e.jsx(o,{htmlFor:"new-name",children:"Name"}),e.jsx(j,{id:"new-name",value:A,onChange:s=>R(s.target.value),placeholder:"User Name"})]}),e.jsxs("div",{children:[e.jsx(o,{htmlFor:"new-role",children:"Role"}),e.jsxs(H,{value:T,onValueChange:s=>L(s),children:[e.jsx(J,{children:e.jsx(W,{})}),e.jsxs(q,{children:[e.jsx(a,{value:"viewer",children:"Viewer"}),e.jsx(a,{value:"engineer",children:"Engineer"}),e.jsx(a,{value:"designer",children:"Designer"}),e.jsx(a,{value:"product_manager",children:"Product Manager"}),e.jsx(a,{value:"manager",children:"Manager"}),e.jsx(a,{value:"admin",children:"Admin"})]})]})]})]}),e.jsxs(B,{children:[e.jsx(l,{variant:"outline",onClick:()=>C(!1),children:"Cancel"}),e.jsx(l,{onClick:te,children:"Add User"})]})]})]})]})}),e.jsx(y,{children:e.jsx("div",{className:"space-y-4",children:i.providers.local.users.map(s=>e.jsxs("div",{className:"flex items-center justify-between p-4 border rounded-lg",children:[e.jsxs("div",{className:"space-y-1 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("p",{className:"font-medium",children:s.name}),s.registered?e.jsx(k,{variant:"default",className:"text-xs",children:"Registered"}):e.jsx(k,{variant:"secondary",className:"text-xs",children:"Pending"}),s.id===N?.id&&e.jsx(k,{variant:"outline",className:"text-xs",children:"You"})]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s.email}),s.lastLoginAt&&e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Last login: ",new Date(s.lastLoginAt).toLocaleString()]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(H,{value:s.role,onValueChange:t=>re(s.id,t),children:[e.jsx(J,{className:"w-40",children:e.jsx(W,{})}),e.jsxs(q,{children:[e.jsx(a,{value:"viewer",children:"Viewer"}),e.jsx(a,{value:"engineer",children:"Engineer"}),e.jsx(a,{value:"designer",children:"Designer"}),e.jsx(a,{value:"product_manager",children:"Product Manager"}),e.jsx(a,{value:"manager",children:"Manager"}),e.jsx(a,{value:"admin",children:"Admin"})]})]}),e.jsxs(I,{open:E===s.id,onOpenChange:t=>{t||(u(null),m(""))},children:[e.jsx(M,{asChild:!0,children:e.jsx(l,{size:"sm",variant:"outline",onClick:()=>u(s.id),children:e.jsx(ye,{className:"h-4 w-4"})})}),e.jsxs($,{children:[e.jsxs(V,{children:[e.jsx(_,{children:"Reset Password"}),e.jsxs(z,{children:["Set a new password for ",s.name]})]}),e.jsx("div",{className:"space-y-4 py-4",children:e.jsxs("div",{children:[e.jsx(o,{htmlFor:"reset-password",children:"New Password"}),e.jsx(j,{id:"reset-password",type:"password",value:x,onChange:t=>m(t.target.value),placeholder:"At least 8 characters",minLength:8})]})}),e.jsxs(B,{children:[e.jsx(l,{variant:"outline",onClick:()=>{u(null),m("")},children:"Cancel"}),e.jsx(l,{onClick:ae,children:"Reset Password"})]})]})]}),s.id!==N?.id&&e.jsxs(oe,{children:[e.jsx(de,{asChild:!0,children:e.jsx(l,{size:"sm",variant:"destructive",children:e.jsx(he,{className:"h-4 w-4"})})}),e.jsxs(ue,{children:[e.jsxs(xe,{children:[e.jsx(me,{children:"Remove User"}),e.jsxs(ge,{children:["Are you sure you want to remove ",s.name," from the whitelist? They will no longer be able to access Coconut."]})]}),e.jsxs(je,{children:[e.jsx(pe,{children:"Cancel"}),e.jsx(ve,{onClick:()=>ie(s.id),children:"Remove"})]})]})]})]})]},s.id))})})]}),e.jsxs(p,{children:[e.jsxs(v,{children:[e.jsx(w,{children:"Session Settings"}),e.jsx(f,{children:"Configure session behavior and security."})]}),e.jsxs(y,{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx(o,{htmlFor:"session-expiry",children:"Session Expiry"}),e.jsx(j,{id:"session-expiry",value:i.session.expiresIn,onChange:s=>d({...i,session:{...i.session,expiresIn:s.target.value}}),placeholder:"7d"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Format: 30s, 15m, 24h, 7d"})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(o,{htmlFor:"secure-cookies",children:"Secure Cookies (HTTPS only)"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Enable in production with HTTPS"})]}),e.jsx(U,{id:"secure-cookies",checked:i.session.secure||!1,onCheckedChange:s=>d({...i,session:{...i.session,secure:s}})})]})]})]}),e.jsxs("div",{className:"flex justify-end space-x-2",children:[e.jsx(l,{variant:"outline",onClick:h,disabled:S,children:"Cancel"}),e.jsx(l,{onClick:ne,disabled:S,children:S?"Saving...":"Save Session Settings"})]})]}):e.jsx("div",{className:"space-y-6",children:e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:"Authentication"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"You don't have permission to manage authentication settings."})]})}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:"Authentication"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Secure your Coconut instance with authentication."})]}),e.jsx(O,{}),e.jsxs(p,{children:[e.jsxs(v,{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(we,{className:"h-5 w-5 text-muted-foreground"}),e.jsx(w,{children:"Authentication Not Configured"})]}),e.jsx(f,{children:"Authentication has not been initialized. Use the CLI to set up authentication."})]}),e.jsxs(y,{children:[e.jsx("div",{className:"bg-muted p-4 rounded-md",children:e.jsxs("code",{className:"text-sm",children:["$ nut auth init",e.jsx("br",{}),"$ nut auth toggle"]})}),e.jsx("p",{className:"text-sm text-muted-foreground mt-4",children:"This will create an admin user and enable authentication for your Coconut instance."})]})]})]})}export{Fe as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as m,j as e,n as x,A as f}from"./index-BSBM4i_g.js";import{C as w}from"./circle-check-DDk43rYV.js";import{C as b}from"./circle-x-BfR2YcXx.js";const r="coconut/github-auth-state";function j(s){try{window.opener&&window.opener.postMessage({type:"github-auth",...s},window.location.origin)}catch{}}const v=()=>{const[s,d]=m.useState("pending"),[h,p]=m.useState("Authorizing GitHub…");return m.useEffect(()=>{const a=new URLSearchParams(window.location.search),u=a.get("error"),l=a.get("token"),n=a.get("expires_at")||a.get("expiresAt"),c=a.get("state"),o=t=>{j(t),d(t.success?"success":"error"),p(t.message),setTimeout(()=>{try{window.close()}catch{}},1200)};if(u){localStorage.removeItem(r),o({success:!1,message:decodeURIComponent(u)});return}if(!l||!n||!c){localStorage.removeItem(r),o({success:!1,message:"Missing authorization parameters. Please try again."});return}const g=localStorage.getItem(r);if(!g||g!==c){localStorage.removeItem(r),o({success:!1,message:"Authorization state mismatch. Please start again."});return}(async()=>{try{const t=await fetch(`${f}/api/v1/git/providers/github/token`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:l,expiresAt:n,state:c})}),i=await t.json();if(!t.ok||!i.success)throw new Error(i?.error?.message||"Failed to store GitHub token");localStorage.removeItem(r),o({success:!0,message:"GitHub connected successfully!",expiresAt:i.data?.expiresAt||n})}catch(t){localStorage.removeItem(r),o({success:!1,message:t?.message||"Failed to store GitHub token. Please try again."})}})()},[]),e.jsx("div",{className:"flex h-screen items-center justify-center bg-background px-6",children:e.jsxs("div",{className:"max-w-sm rounded-lg border bg-card p-6 text-center shadow-sm",children:[e.jsxs("div",{className:"mx-auto mb-4 flex h-12 w-12 items-center justify-center rounded-full bg-muted",children:[s==="pending"&&e.jsx(x,{className:"h-6 w-6 animate-spin text-muted-foreground"}),s==="success"&&e.jsx(w,{className:"h-6 w-6 text-green-600"}),s==="error"&&e.jsx(b,{className:"h-6 w-6 text-red-600"})]}),e.jsx("h1",{className:"text-lg font-semibold",children:"GitHub Authorization"}),e.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:h}),s!=="pending"&&e.jsx("p",{className:"mt-4 text-xs text-muted-foreground",children:"You can close this window and return to Coconut."})]})})};export{v as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{u as ce,H as de,r as i,j as e,B as r,k as oe,a3 as me,q as xe,s as M,X as he,g as ue,J as fe,D as ge,a as je,b as pe,d as ve,v as Ne,w as ye,x as we,y as Ce,z as S,i as Se,a5 as R,a6 as B,a7 as H,a8 as L,a9 as O,ae as G,h as be,a0 as Ae,A as I}from"./index-BSBM4i_g.js";import{C as p,b as ke,a as _,c as De}from"./card-Cnz8b7Ou.js";import{B as U}from"./badge-DO6e5hC1.js";import{u as Me}from"./use-terminal-CN3pheMp.js";import{C as Ie,a as $e,T as Pe}from"./terminal-preview-B7iP2vUT.js";import{b as Te,d as Ee,c as ze,a as Fe}from"./droid-CmYuCN_q.js";import{R as Re}from"./refresh-cw-DvFNtws1.js";import{P as Be}from"./play-DsDsjO2V.js";import"./xterm-DTxiCjtJ.js";const He=c=>c?Array.isArray(c)?c.filter(x=>typeof x=="string").map(x=>x.trim()).filter(Boolean):typeof c=="string"?c.split(",").map(x=>x.trim()).filter(Boolean):[]:[];function Xe(){const c=ce(),{sessions:x,loading:b,error:$,refreshSessions:w,createSession:V,destroySession:q}=Me(),{toast:v}=de(),[P,W]=i.useState([]),[J,X]=i.useState(!0),[g,A]=i.useState(()=>({})),[k,N]=i.useState(!1),[j,K]=i.useState("claude"),[T,Q]=i.useState(""),[D,E]=i.useState(!1),[h,Y]=i.useState([]),[f,y]=i.useState([]),[Z,ee]=i.useState({}),[u,se]=i.useState([]),[o,C]=i.useState([]),te=s=>{const t=Date.now(),a=new Date(s).getTime(),n=Math.max(0,Math.floor((t-a)/1e3));if(n<60)return`${n}s ago`;const d=Math.floor(n/60);if(d<60)return`${d}m ago`;const l=Math.floor(d/60);return l<24?`${l}h ago`:`${Math.floor(l/24)}d ago`};i.useEffect(()=>{(async()=>{try{const t=await fetch(`${I}/api/v1/proposals`);if(t.ok){const a=await t.json(),n=a.data||a;W(Array.isArray(n)?n:[])}}catch(t){console.error("Error loading proposals:",t)}finally{X(!1)}})()},[]),i.useEffect(()=>{w()},[w]),i.useEffect(()=>{if(!k)return;(async()=>{try{const t=await fetch(`${I}/api/v1/mcp`);if(t.ok){const a=await t.json();a?.success&&Array.isArray(a.servers)&&(Y(a.servers),y(n=>n.filter(d=>a.servers.includes(d))),a.mcpServers&&typeof a.mcpServers=="object"&&ee(a.mcpServers))}}catch(t){console.error("Failed to load MCP servers",t)}try{const t=await fetch(`${I}/api/v1/agents`);if(t.ok){const a=await t.json(),d=(Array.isArray(a?.documents)?a.documents:[]).map(l=>({id:l.filename,name:l?.metadata?.name||l.title||l.filename,tools:He(l?.metadata?.tools)}));se(d),C(l=>l.filter(F=>d.some(re=>re.id===F)))}}catch(t){console.error("Failed to load agents",t)}})()},[k]),i.useEffect(()=>{o.length!==0&&y(s=>{const t=new Set(s),a=h.length>0?new Set(h):void 0;return o.forEach(n=>{const d=u.find(l=>l.id===n);d&&d.tools.forEach(l=>{(!a||a.has(l))&&t.add(l)})}),Array.from(t)})},[o,u,h]);const m=i.useMemo(()=>x.filter(s=>s.proposalId?.startsWith("cp-")||s.proposalId?.startsWith("ag-")).sort((s,t)=>new Date(t.lastActivity).getTime()-new Date(s.lastActivity).getTime()),[x]);i.useEffect(()=>{A(s=>{const t={...s};return m.forEach(a=>{a.id in t||(t[a.id]=!0)}),t})},[m]);const z=i.useMemo(()=>P.filter(s=>s.status==="draft"||s.status==="approved").sort((s,t)=>new Date(t.metadata.createdAt).getTime()-new Date(s.metadata.createdAt).getTime()).slice(0,3),[P]),ae=()=>{const s=m.every(a=>g[a.id]),t={};m.forEach(a=>{t[a.id]=!s}),A(t)},ie=m.length>0&&m.every(s=>g[s.id]),ne=async s=>{await q(s)?(v({title:"Session closed",description:s}),setTimeout(()=>w(),100)):v({title:"Failed to close session",description:s,variant:"destructive"})},le=async()=>{E(!0);try{const s=`cp-${Date.now()}`,t={proposalId:s,contextType:"change-proposal",cliAgent:j,mcpServersMap:Z,selectedMcpServers:f,agents:u,selectedAgentIds:o,automationEnabled:!1,customInstruction:T.trim(),includeDefaultInstructions:!1};let a="";j==="claude"?a=Te(t):j==="gemini"?a=Ee(t):j==="codex"?a=ze(t):j==="droid"&&(a=Fe(t)),await V(s,!1,a)?(v({title:"Coding session started",description:`Session ${s} created`}),N(!1),c(`/terminal/${s}`)):v({title:"Failed to start session",description:"Could not create terminal session",variant:"destructive"})}catch(s){console.error("Error starting coding session:",s),v({title:"Error",description:"Failed to start coding session",variant:"destructive"})}finally{E(!1)}};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"Code"}),e.jsx("p",{className:"text-muted-foreground hidden sm:block",children:"Terminal sessions and coding agents"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(r,{variant:"outline",size:"sm",onClick:()=>w(),disabled:b,children:[e.jsx(Re,{className:`h-4 w-4 sm:mr-2 ${b?"animate-spin":""}`}),e.jsx("span",{className:"hidden sm:inline",children:"Refresh"})]}),m.length>0&&e.jsx(r,{variant:"outline",size:"sm",onClick:ae,children:ie?e.jsxs(e.Fragment,{children:[e.jsx(Ie,{className:"h-4 w-4 sm:mr-2"}),e.jsx("span",{className:"hidden sm:inline",children:"Hide All"})]}):e.jsxs(e.Fragment,{children:[e.jsx($e,{className:"h-4 w-4 sm:mr-2"}),e.jsx("span",{className:"hidden sm:inline",children:"Show All"})]})}),e.jsxs(r,{size:"sm",onClick:()=>N(!0),children:[e.jsx(Be,{className:"h-4 w-4 sm:mr-2"}),e.jsx("span",{className:"hidden sm:inline",children:"Interactive Session"})]})]})]}),$&&e.jsx("div",{className:"p-4 bg-red-50 border border-red-200 rounded-lg",children:e.jsx("div",{className:"text-red-600",children:$})}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-lg font-semibold",children:"Sessions"}),b?e.jsx("div",{className:"space-y-2",children:[...Array(2)].map((s,t)=>e.jsx(p,{className:"p-3",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"h-4 w-4 rounded bg-muted animate-pulse"}),e.jsxs("div",{children:[e.jsx("div",{className:"h-4 w-40 bg-muted rounded animate-pulse mb-2"}),e.jsx("div",{className:"h-3 w-24 bg-muted rounded animate-pulse"})]})]}),e.jsx("div",{className:"h-6 w-20 bg-muted rounded animate-pulse"})]})},t))}):m.length===0?e.jsx(p,{className:"p-8",children:e.jsxs("div",{className:"flex flex-col items-center justify-center text-center space-y-3",children:[e.jsx(oe,{className:"h-12 w-12 text-muted-foreground"}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-lg mb-2",children:"No active sessions"}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Get started by launching an"," ",e.jsx("button",{onClick:()=>N(!0),className:"text-primary hover:underline font-medium",children:"Interactive Session"})," ","or working on a"," ",e.jsx("button",{onClick:()=>c("/proposals"),className:"text-primary hover:underline font-medium",children:"Change Proposal"})]})]})]})}):e.jsx("div",{className:"space-y-2",children:m.slice(0,10).map(s=>e.jsxs(p,{className:"p-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(me,{className:"h-4 w-4 shrink-0"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"font-medium text-sm",children:s.proposalId}),e.jsxs("div",{className:"text-xs text-gray-500",children:["Session ",s.id.split("-").slice(-1)[0].substring(0,8)," • Last activity ",te(s.lastActivity)]})]})]}),e.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[e.jsx("div",{className:`flex items-center gap-1 ${s.connected?"text-green-600":"text-gray-400"}`,title:s.connected?"Connected":"Disconnected",children:e.jsx("div",{className:`w-2 h-2 rounded-full ${s.connected?"bg-green-500":"bg-gray-400"}`})}),e.jsx(r,{size:"sm",variant:"outline",onClick:()=>{A(t=>({...t,[s.id]:!t[s.id]}))},"aria-label":g[s.id]?"Hide preview":"Show preview",title:g[s.id]?"Hide preview":"Show preview",children:g[s.id]?e.jsx(xe,{className:"h-4 w-4"}):e.jsx(M,{className:"h-4 w-4"})}),e.jsx(r,{size:"sm",variant:"outline",onClick:()=>c(`/terminal/${s.proposalId}`),children:"Open"}),e.jsx(r,{size:"icon",variant:"destructive",onClick:()=>ne(s.id),title:"Close session","aria-label":"Close session",children:e.jsx(he,{className:"h-4 w-4"})})]})]}),g[s.id]&&e.jsx("div",{className:"mt-2 w-full p-2 cursor-pointer hover:opacity-80 transition-opacity",onClick:()=>c(`/terminal/${s.proposalId}`),title:"Click to open full terminal session",children:e.jsx(Pe,{sessionId:s.id,heightPx:160,maxScrollback:200})})]},s.id))})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-lg font-semibold",children:"Recent Proposals"}),J?e.jsx("div",{className:"space-y-3",children:[...Array(3)].map((s,t)=>e.jsx(p,{children:e.jsx(ke,{className:"py-3",children:e.jsxs("div",{className:"flex justify-between items-start",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"h-4 bg-muted rounded w-2/3 animate-pulse"}),e.jsx("div",{className:"h-3 bg-muted rounded w-1/3 animate-pulse"})]}),e.jsx("div",{className:"h-5 bg-muted rounded w-16 animate-pulse"})]})})},t))}):z.length===0?e.jsx(p,{children:e.jsx(_,{className:"flex items-center justify-center py-6",children:e.jsx("div",{className:"text-center text-sm text-gray-500",children:"No draft or approved proposals found"})})}):e.jsx("div",{className:"space-y-2",children:z.map(s=>e.jsx(p,{className:"hover:shadow-md transition-all cursor-pointer hover:border-primary/50",onClick:()=>c(`/terminal/${s.id}`),children:e.jsx(_,{className:"py-4",children:e.jsx("div",{className:"flex justify-between items-start gap-4",children:e.jsxs("div",{className:"flex-1 space-y-2",children:[e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsx(De,{className:"text-base leading-tight",children:s.intent}),e.jsxs("div",{className:"flex gap-1 ml-3 flex-shrink-0",children:[s.priority&&e.jsx(U,{variant:s.priority==="high"||s.priority==="critical"?"destructive":s.priority==="medium"?"secondary":"outline",className:"text-xs",children:s.priority}),e.jsx(U,{variant:"default",className:"text-xs",children:s.status})]})]}),s.content&&e.jsxs("div",{className:"text-sm text-muted-foreground leading-relaxed",children:[s.content.split(`
|
|
2
|
+
`).slice(0,2).join(" ").substring(0,150),s.content.length>150?"...":""]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsxs("div",{className:"text-xs text-muted-foreground",children:[s.id," • by ",s.author.name," • ",new Date(s.metadata.createdAt).toLocaleDateString()]}),e.jsxs("div",{className:"flex gap-2",onClick:t=>t.stopPropagation(),children:[e.jsxs(r,{variant:"ghost",size:"sm",onClick:()=>c(`/proposals/${s.id}`),className:"h-7 px-2 text-xs",children:[e.jsx(ue,{className:"h-3 w-3 mr-1"})," View"]}),e.jsxs(r,{variant:"ghost",size:"sm",onClick:()=>c(`/proposals/${s.id}/edit`),className:"h-7 px-2 text-xs",children:[e.jsx(fe,{className:"h-3 w-3 mr-1"})," Edit"]})]})]})]})})})},s.id))})]}),e.jsx(ge,{open:k,onOpenChange:N,children:e.jsxs(je,{className:"max-w-lg",children:[e.jsxs(pe,{children:[e.jsx(ve,{children:"Start Coding Agent"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:"Start an interactive coding session"})]}),e.jsxs("div",{className:"space-y-4 py-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-medium mb-2 block",children:"Coding Agent"}),e.jsxs(Ne,{value:j,onValueChange:s=>K(s),children:[e.jsx(ye,{className:"w-full",children:e.jsx(we,{placeholder:"Select coding agent"})}),e.jsxs(Ce,{children:[e.jsx(S,{value:"claude",children:"Claude Code"}),e.jsx(S,{value:"gemini",children:"Google Gemini"}),e.jsx(S,{value:"codex",children:"OpenAI Codex"}),e.jsx(S,{value:"droid",children:"Factory Droid"})]})]})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsxs("div",{className:"text-sm font-medium flex items-center gap-2",children:[e.jsx(Se,{className:"h-4 w-4"}),"Custom Agents"]}),e.jsxs("div",{className:"text-xs text-gray-500",children:[o.length," of ",u.length," selected"]})]}),e.jsxs(R,{children:[e.jsx(B,{asChild:!0,children:e.jsxs(r,{variant:"outline",className:"w-full justify-between",children:[o.length===0?"Select agents...":o.length===u.length?"All agents selected":`${o.length} agent${o.length!==1?"s":""} selected`,e.jsx(M,{className:"h-4 w-4 opacity-50"})]})}),e.jsxs(H,{className:"w-full min-w-[--radix-dropdown-menu-trigger-width]",children:[e.jsxs(L,{className:"flex items-center justify-between",children:[e.jsx("span",{children:"Available Agents"}),e.jsxs("div",{className:"flex gap-1",children:[e.jsx(r,{size:"sm",variant:"ghost",className:"h-5 px-1 text-xs",onClick:s=>{s.preventDefault(),C(u.map(t=>t.id))},children:"All"}),e.jsx(r,{size:"sm",variant:"ghost",className:"h-5 px-1 text-xs",onClick:s=>{s.preventDefault(),C([])},children:"None"})]})]}),e.jsx(O,{}),u.length===0?e.jsx("div",{className:"px-2 py-1.5 text-sm text-gray-500",children:"No agents found"}):u.map(s=>e.jsx(G,{checked:o.includes(s.id),onCheckedChange:t=>{C(a=>t?a.includes(s.id)?a:[...a,s.id]:a.filter(n=>n!==s.id))},children:e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{children:s.name}),s.tools.length>0&&e.jsxs("span",{className:"text-xs text-muted-foreground",children:["MCP servers: ",s.tools.join(", ")]}),s.tools.length===0&&e.jsx("span",{className:"text-xs text-muted-foreground",children:"Inherits available MCP servers"})]})},s.id))]})]})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsxs("div",{className:"text-sm font-medium flex items-center gap-2",children:[e.jsx(be,{className:"h-4 w-4"}),"MCP Servers"]}),e.jsxs("div",{className:"text-xs text-gray-500",children:[f.length," of ",h.length," selected"]})]}),e.jsxs(R,{children:[e.jsx(B,{asChild:!0,children:e.jsxs(r,{variant:"outline",className:"w-full justify-between",children:[f.length===0?"Select MCP servers...":f.length===h.length?"All servers selected":`${f.length} server${f.length!==1?"s":""} selected`,e.jsx(M,{className:"h-4 w-4 opacity-50"})]})}),e.jsxs(H,{className:"w-full min-w-[--radix-dropdown-menu-trigger-width]",children:[e.jsxs(L,{className:"flex items-center justify-between",children:[e.jsx("span",{children:"Available Servers"}),e.jsxs("div",{className:"flex gap-1",children:[e.jsx(r,{size:"sm",variant:"ghost",className:"h-5 px-1 text-xs",onClick:s=>{s.preventDefault(),y(h)},children:"All"}),e.jsx(r,{size:"sm",variant:"ghost",className:"h-5 px-1 text-xs",onClick:s=>{s.preventDefault(),y([])},children:"None"})]})]}),e.jsx(O,{}),h.length===0?e.jsx("div",{className:"px-2 py-1.5 text-sm text-gray-500",children:"No MCP servers found"}):h.map(s=>e.jsx(G,{checked:f.includes(s),onCheckedChange:t=>{y(a=>t?a.includes(s)?a:[...a,s]:a.filter(n=>n!==s))},children:s},s))]})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-medium mb-2 block",children:"Additional Instructions (optional)"}),e.jsx(Ae,{value:T,onChange:s=>Q(s.target.value),placeholder:"Add any custom instructions for the coding agent...",rows:4,className:"resize-none"})]}),e.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[e.jsx(r,{variant:"outline",onClick:()=>N(!1),disabled:D,children:"Cancel"}),e.jsx(r,{onClick:le,disabled:D,children:D?"Starting...":"Start Session"})]})]})]})})]})}export{Xe as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as x,j as e,f as a,s as m}from"./index-BSBM4i_g.js";function u({title:r,description:t,icon:n,defaultOpen:o=!1,children:i,className:l}){const[s,d]=x.useState(o);return e.jsxs("div",{className:a("rounded-lg border bg-card text-card-foreground",l),children:[e.jsxs("button",{type:"button",onClick:()=>d(c=>!c),className:"flex w-full items-center justify-between gap-4 px-4 py-3 text-left","aria-expanded":s,children:[e.jsxs("div",{className:"flex items-center gap-3",children:[n,e.jsxs("div",{children:[e.jsx("p",{className:"font-medium leading-tight",children:r}),t&&e.jsx("p",{className:"text-sm text-muted-foreground leading-snug",children:t})]})]}),e.jsx(m,{className:a("h-4 w-4 shrink-0 transition-transform duration-200",s?"rotate-180":"rotate-0")})]}),s&&e.jsx("div",{className:"border-t px-4 py-4",children:i})]})}export{u as C};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{c as W,j as e,r as m,D as q,a as B,F as N,b as S,d as A,e as P,f as I,S as z,B as r,C as D,L as n,g as L,h as F,i as M,k as T,A as E}from"./index-BSBM4i_g.js";import{C as c,a as l,b as f,c as j,d as R}from"./card-Cnz8b7Ou.js";import{B as Y}from"./badge-DO6e5hC1.js";import{F as _}from"./folder-git-2-Cv5NbBZZ.js";import{C as H}from"./calendar-DWaFMSXH.js";import{C as G}from"./circle-check-DDk43rYV.js";import{C as $}from"./chevron-left-CNgc28Tc.js";import{C as O}from"./clock-DQXbrDkQ.js";import{C as V}from"./circle-check-big-B70gdce7.js";import{P as U}from"./plus-BfBtnncn.js";/**
|
|
2
|
+
* @license lucide-react v0.542.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const J=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M8 18v-2",key:"qcmpov"}],["path",{d:"M12 18v-4",key:"q1q25u"}],["path",{d:"M16 18v-6",key:"15y0np"}]],Q=W("file-chart-column-increasing",J);/**
|
|
7
|
+
* @license lucide-react v0.542.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/const Z=[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]],K=W("rocket",Z);function X({open:d,onOpenChange:g,workflows:y}){const[a,h]=m.useState(null),[o,u]=m.useState(0),C=t=>{h(t),u(0)},s=()=>{o>0?u(o-1):h(null)},v=()=>{a&&o<a.steps.length-1&&u(o+1)},p=()=>{h(null),u(0),g(!1)},x=()=>e.jsxs("div",{className:"space-y-6",children:[e.jsxs(S,{children:[e.jsx(A,{className:"text-2xl",children:"Getting Started Wizard"}),e.jsx(P,{children:"Choose a workflow to get started with Coconut. We'll guide you through each step."})]}),e.jsx(z,{className:"h-[500px] pr-4",children:e.jsx("div",{className:"space-y-3",children:y.map(t=>e.jsx(c,{className:"cursor-pointer hover:bg-accent hover:border-accent-foreground/20 transition-colors",onClick:()=>C(t),children:e.jsx(l,{className:"p-6",children:e.jsxs("div",{className:"flex items-start space-x-4",children:[e.jsx("div",{className:"flex-shrink-0 w-12 h-12 rounded-lg bg-primary/10 flex items-center justify-center text-primary",children:t.icon}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h3",{className:"text-lg font-semibold mb-1",children:t.title}),e.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:t.description}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsxs(Y,{variant:"secondary",className:"text-xs",children:[t.steps.length," steps"]}),e.jsx(D,{className:"h-4 w-4 text-muted-foreground"})]})]})]})})},t.id))})})]}),b=()=>{if(!a)return null;const t=a.steps[o],i=o===a.steps.length-1;return e.jsxs("div",{className:"space-y-6",children:[e.jsxs(S,{children:[e.jsxs("div",{className:"flex items-center space-x-3 mb-2",children:[e.jsx("div",{className:"flex-shrink-0 w-10 h-10 rounded-lg bg-primary/10 flex items-center justify-center text-primary",children:a.icon}),e.jsxs("div",{className:"flex-1",children:[e.jsx(A,{className:"text-xl",children:a.title}),e.jsxs(P,{children:["Step ",o+1," of ",a.steps.length]})]})]}),e.jsx("div",{className:"flex items-center space-x-2 pt-2",children:a.steps.map((k,w)=>e.jsx("div",{className:I("h-1.5 flex-1 rounded-full transition-colors",w<=o?"bg-primary":"bg-muted")},w))})]}),e.jsx(z,{className:"h-[450px] pr-4",children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold mb-2",children:t.title}),e.jsx("p",{className:"text-sm text-muted-foreground",children:t.description})]}),t.content&&e.jsxs("div",{className:"space-y-4",children:[t.content.text&&e.jsx(c,{children:e.jsx(l,{className:"p-4",children:e.jsx("p",{className:"text-sm leading-relaxed",children:t.content.text})})}),t.content.image&&e.jsx(c,{children:e.jsx(l,{className:"p-4",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("img",{src:t.content.image.src,alt:t.content.image.alt,className:"w-full rounded-md border"}),t.content.image.caption&&e.jsx("p",{className:"text-xs text-muted-foreground text-center",children:t.content.image.caption})]})})}),t.content.video&&e.jsx(c,{children:e.jsx(l,{className:"p-4",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"relative rounded-md overflow-hidden border bg-muted",children:e.jsx("video",{src:t.content.video.src,poster:t.content.video.poster,controls:!0,className:"w-full",children:"Your browser does not support the video tag."})}),t.content.video.caption&&e.jsx("p",{className:"text-xs text-muted-foreground text-center",children:t.content.video.caption})]})})})]}),i&&e.jsx(c,{className:"bg-primary/5 border-primary/20",children:e.jsxs(l,{className:"p-4 flex items-center space-x-3",children:[e.jsx(G,{className:"h-5 w-5 text-primary flex-shrink-0"}),e.jsx("p",{className:"text-sm font-medium",children:`You've completed this workflow! Click "Finish" to close this wizard.`})]})})]})}),e.jsxs("div",{className:"flex items-center justify-between pt-4 border-t",children:[e.jsxs(r,{variant:"outline",onClick:s,children:[e.jsx($,{className:"mr-2 h-4 w-4"}),o===0?"Back to Workflows":"Previous"]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(r,{variant:"ghost",onClick:p,children:"Cancel"}),i?e.jsx(r,{onClick:p,children:"Finish"}):e.jsxs(r,{onClick:v,children:["Next",e.jsx(D,{className:"ml-2 h-4 w-4"})]})]})]})]})};return e.jsx(q,{open:d,onOpenChange:g,children:e.jsx(B,{className:"max-w-3xl max-h-[90vh]",children:a?b():x()})})}const ee=[{id:"new-project",title:"Start Developing a New Project",description:"Set up a brand new project with Coconut from scratch",icon:e.jsx(K,{className:"h-6 w-6"}),steps:[{title:"Welcome to Your New Project",description:"Let's set up your development environment and project structure",content:{text:"In this step, you'll learn how to initialize a new project with Coconut. We'll guide you through configuring your project settings, choosing your tech stack, and setting up your development environment."}},{title:"Configure Project Settings",description:"Customize your project configuration and preferences",content:{text:"Define your project name, description, and select the technologies you want to use. You can also configure advanced settings like build tools, testing frameworks, and deployment options."}},{title:"Initialize Your Workspace",description:"Create your project structure and install dependencies",content:{text:"Coconut will create the necessary files and folders for your project. This includes setting up version control, installing dependencies, and configuring your development tools."}}]},{id:"connect-project",title:"Connect an Existing Project",description:"Import and configure an existing codebase with Coconut",icon:e.jsx(_,{className:"h-6 w-6"}),steps:[{title:"Select Your Project",description:"Choose the project directory you want to connect",content:{text:"Navigate to your existing project folder or clone a repository. Coconut will analyze your project structure and detect the technologies you're using."}},{title:"Review Project Analysis",description:"Verify the detected technologies and configuration",content:{text:"Coconut has analyzed your project and detected the frameworks, libraries, and tools you're using. Review this information and make any necessary adjustments."}},{title:"Complete Integration",description:"Finalize the connection and sync your project",content:{text:"Coconut will create the necessary configuration files and integrate with your existing project. You'll be able to use all Coconut features with your codebase."}}]},{id:"analyze-code",title:"Analyze Code and Generate a Report",description:"Get insights, metrics, and recommendations for your codebase",icon:e.jsx(Q,{className:"h-6 w-6"}),steps:[{title:"Choose Analysis Scope",description:"Select what parts of your codebase to analyze",content:{text:"You can analyze your entire codebase or focus on specific directories, files, or modules. Choose the scope that best fits your needs."}},{title:"Configure Analysis Parameters",description:"Select the types of analysis you want to run",content:{text:"Choose from code quality checks, security scans, performance analysis, dependency reviews, and more. Customize the analysis to focus on what matters most to you."}},{title:"Review and Export Results",description:"View your analysis report and take action on findings",content:{text:"Coconut will generate a comprehensive report with actionable insights. You can export the report in various formats, share it with your team, or create change proposals to address issues."}}]},{id:"create-proposal",title:"Create a Change Proposal and Assign a Coding Agent",description:"Define a change and let AI agents help implement it",icon:e.jsx(N,{className:"h-6 w-6"}),steps:[{title:"Describe Your Change",description:"Define what you want to build or modify",content:{text:"Clearly describe the feature, bug fix, or refactoring you want to implement. Provide context, requirements, and any relevant technical details."}},{title:"Select an AI Agent",description:"Choose the right agent for your task",content:{text:"Pick from specialized agents based on your needs - frontend development, backend APIs, database changes, testing, documentation, and more. Each agent has unique capabilities and expertise."}},{title:"Review and Launch",description:"Confirm your proposal and start the implementation",content:{text:"Review your change proposal details and agent assignment. Once you're ready, launch the agent to start working on your change. You can monitor progress and provide feedback throughout."}}]},{id:"schedule-job",title:"Schedule an Agent Job",description:"Set up automated tasks and recurring agent workflows",icon:e.jsx(H,{className:"h-6 w-6"}),steps:[{title:"Define Your Job",description:"Specify what task the agent should perform",content:{text:"Describe the task you want to automate - code reviews, dependency updates, security scans, report generation, or custom workflows. Provide clear instructions for the agent."}},{title:"Set Schedule and Triggers",description:"Configure when and how often the job should run",content:{text:"Choose a schedule (daily, weekly, monthly, or custom cron expression) or set up event-based triggers like commits, pull requests, or deployments."}},{title:"Configure Notifications",description:"Decide how you want to be notified about job results",content:{text:"Set up notifications for job completion, failures, or important findings. Choose your preferred channels - email, Slack, GitHub, or in-app notifications."}}]}];function me(){const[d,g]=m.useState({total:0,inReview:0,approved:0}),[y,a]=m.useState([]),[h,o]=m.useState(!0),[u,C]=m.useState(!1);return m.useEffect(()=>{(async()=>{try{const p=await(await fetch(`${E}/api/v1/proposals`)).json();if(p.success&&p.data){const x=p.data,b={total:x.length,inReview:x.filter(i=>i.status==="in-review").length,approved:x.filter(i=>i.status==="approved"||i.status==="code-complete").length},t=x.sort((i,k)=>{const w=new Date(i.metadata?.updatedAt||i.metadata?.createdAt||0);return new Date(k.metadata?.updatedAt||k.metadata?.createdAt||0).getTime()-w.getTime()}).slice(0,5);g(b),a(t)}}catch(v){console.error("Failed to fetch proposal stats:",v)}finally{o(!1)}})()},[]),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"Home"}),e.jsx("p",{className:"text-muted-foreground",children:"Manage change proposals, brainstorm, and take quick actions."})]}),e.jsxs("div",{className:"grid gap-4 md:grid-cols-3",children:[e.jsx(n,{to:"/proposals",children:e.jsxs(c,{className:"hover:bg-accent hover:border-accent-foreground/20 transition-colors cursor-pointer",children:[e.jsxs(f,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(j,{className:"text-sm font-medium",children:"All Proposals"}),e.jsx(N,{className:"h-4 w-4 text-muted-foreground"})]}),e.jsxs(l,{children:[e.jsx("div",{className:"text-2xl font-bold",children:h?"...":d.total}),e.jsx("p",{className:"text-xs text-muted-foreground",children:d.total===0?"No proposals yet":`${d.total} proposal${d.total!==1?"s":""}`})]})]})}),e.jsx(n,{to:"/proposals?status=in-review",children:e.jsxs(c,{className:"hover:bg-accent hover:border-accent-foreground/20 transition-colors cursor-pointer",children:[e.jsxs(f,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(j,{className:"text-sm font-medium",children:"In Review"}),e.jsx(O,{className:"h-4 w-4 text-muted-foreground"})]}),e.jsxs(l,{children:[e.jsx("div",{className:"text-2xl font-bold",children:h?"...":d.inReview}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Awaiting approval"})]})]})}),e.jsx(n,{to:"/proposals?status=approved",children:e.jsxs(c,{className:"hover:bg-accent hover:border-accent-foreground/20 transition-colors cursor-pointer",children:[e.jsxs(f,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(j,{className:"text-sm font-medium",children:"Approved / Code Complete"}),e.jsx(V,{className:"h-4 w-4 text-muted-foreground"})]}),e.jsxs(l,{children:[e.jsx("div",{className:"text-2xl font-bold",children:h?"...":d.approved}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Ready to implement"})]})]})})]}),e.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[e.jsxs(c,{children:[e.jsxs(f,{children:[e.jsx(j,{children:"Recent Proposals"}),e.jsx(R,{children:"Latest change proposals in your project"})]}),e.jsx(l,{children:h?e.jsx("div",{className:"space-y-3",children:[1,2,3].map(s=>e.jsxs("div",{className:"animate-pulse",children:[e.jsx("div",{className:"h-4 bg-muted rounded w-3/4"}),e.jsx("div",{className:"h-3 bg-muted rounded w-1/2 mt-2"})]},s))}):y.length>0?e.jsxs("div",{className:"space-y-4 overflow-hidden",children:[y.map(s=>e.jsx(n,{to:`/proposals/${s.id}`,className:"block",children:e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-2 sm:gap-3 p-3 rounded-lg border hover:bg-accent hover:border-accent-foreground/20 transition-colors cursor-pointer",children:[e.jsx("div",{className:"flex-shrink-0",children:e.jsx(Y,{variant:s.status==="approved"||s.status==="code-complete"?"default":s.status==="in-review"?"secondary":s.status==="draft"?"outline":"destructive",children:s.status})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h4",{className:"text-sm font-medium line-clamp-2 sm:truncate",children:s.intent}),e.jsxs("p",{className:"text-xs text-muted-foreground truncate",children:[s.author.name," • ",new Date(s.metadata?.updatedAt||s.metadata?.createdAt||"").toLocaleDateString()]})]})]})},s.id)),e.jsx("div",{className:"pt-2",children:e.jsx(r,{variant:"outline",size:"sm",asChild:!0,className:"w-full",children:e.jsx(n,{to:"/proposals",children:"View All Proposals"})})})]}):e.jsxs("div",{className:"text-center py-6",children:[e.jsx(N,{className:"mx-auto h-12 w-12 text-muted-foreground/50"}),e.jsx("h3",{className:"mt-4 text-lg font-semibold",children:"No proposals yet"}),e.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Create your first change proposal to get started."}),e.jsx(r,{asChild:!0,className:"mt-4",children:e.jsxs(n,{to:"/proposals/new",children:[e.jsx(U,{className:"mr-2 h-4 w-4"}),"New Proposal"]})})]})})]}),e.jsxs(c,{className:"flex flex-col",children:[e.jsxs(f,{children:[e.jsx(j,{children:"Quick Actions"}),e.jsx(R,{children:"Common tasks and operations"})]}),e.jsx(l,{className:"flex flex-col flex-1",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{asChild:!0,variant:"default",className:"w-full justify-start",children:e.jsxs(n,{to:"/proposals/new",children:[e.jsx(N,{className:"mr-2 h-4 w-4"}),"New Proposal"]})}),e.jsx(r,{asChild:!0,variant:"outline",className:"w-full justify-start",children:e.jsxs(n,{to:"/context/project/edit",children:[e.jsx(L,{className:"mr-2 h-4 w-4"}),"Update Project Overview"]})}),e.jsx(r,{asChild:!0,variant:"outline",className:"w-full justify-start",children:e.jsxs(n,{to:"/context/architecture/edit",children:[e.jsx(F,{className:"mr-2 h-4 w-4"}),"Update Technical Architecture"]})}),e.jsx(r,{asChild:!0,variant:"outline",className:"w-full justify-start",children:e.jsxs(n,{to:"/agents/new",children:[e.jsx(M,{className:"mr-2 h-4 w-4"}),"Create New Agent"]})}),e.jsx(r,{asChild:!0,variant:"outline",className:"w-full justify-start",children:e.jsxs(n,{to:"/code",children:[e.jsx(T,{className:"mr-2 h-4 w-4"}),"Start Coding Agent"]})})]})})]})]}),e.jsx(X,{open:u,onOpenChange:C,workflows:ee})]})}export{me as default};
|