@overlordai/server 1.0.163 → 1.0.165

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.
Files changed (196) hide show
  1. package/database/migrations/019-chat-bindings-notify-default.sql +35 -0
  2. package/dist/adapters/adapter.interface.d.ts +8 -5
  3. package/dist/adapters/adapter.interface.d.ts.map +1 -1
  4. package/dist/adapters/adapter.interface.js.map +1 -1
  5. package/dist/adapters/lark/lark-card.builder.js +2 -2
  6. package/dist/adapters/lark/lark-card.builder.js.map +1 -1
  7. package/dist/adapters/lark/lark.adapter.d.ts +16 -7
  8. package/dist/adapters/lark/lark.adapter.d.ts.map +1 -1
  9. package/dist/adapters/lark/lark.adapter.js +134 -33
  10. package/dist/adapters/lark/lark.adapter.js.map +1 -1
  11. package/dist/adapters/lark/lark.controller.d.ts.map +1 -1
  12. package/dist/adapters/lark/lark.controller.js +3 -5
  13. package/dist/adapters/lark/lark.controller.js.map +1 -1
  14. package/dist/adapters/slack/slack-block.builder.d.ts +2 -0
  15. package/dist/adapters/slack/slack-block.builder.d.ts.map +1 -1
  16. package/dist/adapters/slack/slack-block.builder.js +42 -9
  17. package/dist/adapters/slack/slack-block.builder.js.map +1 -1
  18. package/dist/adapters/slack/slack.adapter.d.ts +1 -0
  19. package/dist/adapters/slack/slack.adapter.d.ts.map +1 -1
  20. package/dist/adapters/slack/slack.adapter.js +61 -15
  21. package/dist/adapters/slack/slack.adapter.js.map +1 -1
  22. package/dist/automation/automation-findings.d.ts +4 -0
  23. package/dist/automation/automation-findings.d.ts.map +1 -0
  24. package/dist/automation/automation-findings.js +93 -0
  25. package/dist/automation/automation-findings.js.map +1 -0
  26. package/dist/automation/automation-template.service.d.ts.map +1 -1
  27. package/dist/automation/automation-template.service.js +4 -0
  28. package/dist/automation/automation-template.service.js.map +1 -1
  29. package/dist/automation/builtin-templates.d.ts +8 -0
  30. package/dist/automation/builtin-templates.d.ts.map +1 -1
  31. package/dist/automation/builtin-templates.js +217 -11
  32. package/dist/automation/builtin-templates.js.map +1 -1
  33. package/dist/database/repositories/automation.repository.d.ts +5 -0
  34. package/dist/database/repositories/automation.repository.d.ts.map +1 -1
  35. package/dist/database/repositories/automation.repository.js +29 -0
  36. package/dist/database/repositories/automation.repository.js.map +1 -1
  37. package/dist/database/repositories/bot.repository.d.ts +7 -0
  38. package/dist/database/repositories/bot.repository.d.ts.map +1 -1
  39. package/dist/database/repositories/bot.repository.js +80 -7
  40. package/dist/database/repositories/bot.repository.js.map +1 -1
  41. package/dist/dispatcher/task-creation.service.d.ts.map +1 -1
  42. package/dist/dispatcher/task-creation.service.js +19 -9
  43. package/dist/dispatcher/task-creation.service.js.map +1 -1
  44. package/dist/dispatcher/task-lifecycle.service.d.ts +2 -0
  45. package/dist/dispatcher/task-lifecycle.service.d.ts.map +1 -1
  46. package/dist/dispatcher/task-lifecycle.service.js +50 -0
  47. package/dist/dispatcher/task-lifecycle.service.js.map +1 -1
  48. package/dist/notifier/card-actions.d.ts +11 -0
  49. package/dist/notifier/card-actions.d.ts.map +1 -0
  50. package/dist/notifier/card-actions.js +20 -0
  51. package/dist/notifier/card-actions.js.map +1 -0
  52. package/dist/notifier/notification-consumer.d.ts.map +1 -1
  53. package/dist/notifier/notification-consumer.js +19 -16
  54. package/dist/notifier/notification-consumer.js.map +1 -1
  55. package/dist/notifier/notifier.service.d.ts +1 -1
  56. package/dist/notifier/notifier.service.d.ts.map +1 -1
  57. package/dist/notifier/notifier.service.js +2 -2
  58. package/dist/notifier/notifier.service.js.map +1 -1
  59. package/dist/notifier/template.service.d.ts +10 -5
  60. package/dist/notifier/template.service.d.ts.map +1 -1
  61. package/dist/notifier/template.service.js +171 -20
  62. package/dist/notifier/template.service.js.map +1 -1
  63. package/dist/web/admin/admin-bot.controller.d.ts +4 -0
  64. package/dist/web/admin/admin-bot.controller.d.ts.map +1 -1
  65. package/dist/web/admin/admin-bot.controller.js +34 -0
  66. package/dist/web/admin/admin-bot.controller.js.map +1 -1
  67. package/dist/web/automation.controller.d.ts +2 -0
  68. package/dist/web/automation.controller.d.ts.map +1 -1
  69. package/dist/web/frame-handlers/stage-confirm.handler.d.ts +9 -1
  70. package/dist/web/frame-handlers/stage-confirm.handler.d.ts.map +1 -1
  71. package/dist/web/frame-handlers/stage-confirm.handler.js +90 -3
  72. package/dist/web/frame-handlers/stage-confirm.handler.js.map +1 -1
  73. package/dist/web/task.controller.d.ts +1 -0
  74. package/dist/web/task.controller.d.ts.map +1 -1
  75. package/dist/web/task.controller.js +13 -4
  76. package/dist/web/task.controller.js.map +1 -1
  77. package/dist/web/worker-channel.gateway.js +1 -1
  78. package/dist/web/worker-channel.gateway.js.map +1 -1
  79. package/package.json +4 -4
  80. package/public/assets/{AccessTokensPage-ldQyk5XS.js → AccessTokensPage-C-0-8g_T.js} +1 -1
  81. package/public/assets/{AdminPage-B2nXMtQP.js → AdminPage-BbX7qN2o.js} +1 -1
  82. package/public/assets/{AgentCliPage-DN6Sx2_W.js → AgentCliPage-CUTIRp3e.js} +1 -1
  83. package/public/assets/{ApiReferencePage-B63Cv6ev.js → ApiReferencePage-CTyI9Wmo.js} +1 -1
  84. package/public/assets/{ArchitecturePage-Bw1w2No4.js → ArchitecturePage-BYO1rOR1.js} +1 -1
  85. package/public/assets/{AuditLogPage-DUrbtnap.js → AuditLogPage-D41BIlg7.js} +1 -1
  86. package/public/assets/AutomationCreatePage-BTkebXYp.js +1 -0
  87. package/public/assets/{AutomationDetailPage-CMBHY3MX.js → AutomationDetailPage-C1826zDY.js} +4 -4
  88. package/public/assets/AutomationEditPage-75n4wJnY.js +1 -0
  89. package/public/assets/AutomationListPage-DEDMrWmT.js +26 -0
  90. package/public/assets/AutomationRunDetailPage-B8J16r3p.js +6 -0
  91. package/public/assets/{BindPlatformPage-DSlnobHy.js → BindPlatformPage-1ywl8297.js} +1 -1
  92. package/public/assets/BotIntegrationPage-DL1Majjx.js +1 -0
  93. package/public/assets/BotManage-B1fNY07Y.js +6 -0
  94. package/public/assets/{BotSetupPage-DMdavNli.js → BotSetupPage-DD461ngC.js} +17 -5
  95. package/public/assets/ChangelogPage-WG_Wgb66.js +1 -0
  96. package/public/assets/Checkbox-BTcgiBPg.js +1 -0
  97. package/public/assets/{CliReferencePage-Cj5J-5PY.js → CliReferencePage-CS05YYd3.js} +1 -1
  98. package/public/assets/{ConfirmStageDialog-Dl1_NcCr.js → ConfirmStageDialog-CFrpX3HN.js} +1 -1
  99. package/public/assets/{DeploymentPage-BnJoRfc6.js → DeploymentPage-B5Q0AFAu.js} +1 -1
  100. package/public/assets/{DevWorkflowPage-Bh6iCSgz.js → DevWorkflowPage-pR3fCVwd.js} +1 -1
  101. package/public/assets/{DeveloperManage-DRktoKo0.js → DeveloperManage-B6RDaLkR.js} +1 -1
  102. package/public/assets/{DeveloperSetupPage-CFJ_Diyi.js → DeveloperSetupPage-D0M9TTiz.js} +1 -1
  103. package/public/assets/{DocsIndexPage-DBQdb_iY.js → DocsIndexPage-BVlrV6PX.js} +1 -1
  104. package/public/assets/{DocsLayout-Cd956Abd.js → DocsLayout-CmMw8RvJ.js} +1 -1
  105. package/public/assets/{DocsPrimitives-DxxQvd4A.js → DocsPrimitives-BrDugynd.js} +1 -1
  106. package/public/assets/{EditProjectPage-BGNgVGl_.js → EditProjectPage-DKCZrdQs.js} +1 -1
  107. package/public/assets/{EmptyState-DQ0fOTKY.js → EmptyState-D5CEvlzr.js} +1 -1
  108. package/public/assets/{EnvVariablesPage-CelP_-SE.js → EnvVariablesPage-C2PfAaQL.js} +1 -1
  109. package/public/assets/{HomePage-C3_hGl3i.js → HomePage-Hf6Q8V2e.js} +1 -1
  110. package/public/assets/{InfoRow-ssnjkeJd.js → InfoRow-D5UCrISX.js} +1 -1
  111. package/public/assets/{InstallationPage-OvlJ5Fm1.js → InstallationPage-iSGHskwz.js} +1 -1
  112. package/public/assets/{LandingPage-BNl9fFku.js → LandingPage-CD46Z2JC.js} +1 -1
  113. package/public/assets/{LocalDevelopmentPage-CXbkHbi0.js → LocalDevelopmentPage-bFW_mRS1.js} +1 -1
  114. package/public/assets/{LoginPage-L_1SThps.js → LoginPage-BKOzdz7P.js} +1 -1
  115. package/public/assets/{MetricBar-5mo0FTxI.js → MetricBar-Bh5I5oKg.js} +1 -1
  116. package/public/assets/{MultiSelect-4LelQ6vN.js → MultiSelect-Bb4HJSAN.js} +1 -1
  117. package/public/assets/{NotFoundPage-Ht-8qf12.js → NotFoundPage-689QOjXQ.js} +1 -1
  118. package/public/assets/{OnboardingGuide-D9ui1dG9.js → OnboardingGuide-DptWURF7.js} +1 -1
  119. package/public/assets/{PermissionsPage-DbppdG6c.js → PermissionsPage-BVPkbbMI.js} +1 -1
  120. package/public/assets/{PipelineConfigPage-B1D2tEQK.js → PipelineConfigPage-D4YM9Dbc.js} +1 -1
  121. package/public/assets/{PipelineEditorPage-s_YlfwwQ.js → PipelineEditorPage-CsR5Ixk1.js} +1 -1
  122. package/public/assets/{PlanPage-CuiDWL0h.js → PlanPage-rWkuPQED.js} +1 -1
  123. package/public/assets/{ProfilePage-BJdNfqJ8.js → ProfilePage-Goz5xk1F.js} +1 -1
  124. package/public/assets/{ProjectDetailPage-BKVdM9E_.js → ProjectDetailPage-SJ1bULdn.js} +1 -1
  125. package/public/assets/{ProjectListPage-DcENyE_f.js → ProjectListPage-DbJy_Oc6.js} +1 -1
  126. package/public/assets/{PtyTerminal-6sH_Ru9B.js → PtyTerminal-BLkrZtf8.js} +1 -1
  127. package/public/assets/{QuickAuth-BJQDPb8y.js → QuickAuth-BzNdCwsM.js} +1 -1
  128. package/public/assets/{RemoveMemberConfirmDialog-BeVfJj3-.js → RemoveMemberConfirmDialog-BCPztuNz.js} +1 -1
  129. package/public/assets/ReviewAggregatePage-D2lNd4eh.js +6 -0
  130. package/public/assets/ReviewPage-DFNXIf3V.js +1 -0
  131. package/public/assets/{Select-Dgtvdi2n.js → Select-O36ifNjw.js} +1 -1
  132. package/public/assets/{SettingsPage-0vk6NVVJ.js → SettingsPage-TOtaLjjI.js} +1 -1
  133. package/public/assets/{Skeleton-CwwH6ktS.js → Skeleton-C3hKV7kJ.js} +1 -1
  134. package/public/assets/{SkillPage-BrdGx8-d.js → SkillPage-B_OlG2Lu.js} +1 -1
  135. package/public/assets/TaskDetailPage-BCpOOndz.js +21 -0
  136. package/public/assets/{TaskGuidePage-Bo0wdhb0.js → TaskGuidePage-ehGnB445.js} +1 -1
  137. package/public/assets/{TaskListPage-Cxk-Tici.js → TaskListPage-1JmD5R00.js} +1 -1
  138. package/public/assets/{TaskStatusBadge-B8MoEoLo.js → TaskStatusBadge-3HhHPj-4.js} +1 -1
  139. package/public/assets/{TerminalHomePage-DR_ek5wb.js → TerminalHomePage-Cjs2ESbL.js} +1 -1
  140. package/public/assets/{TokenManage-Ba4OjLdS.js → TokenManage-Dqya1d3n.js} +1 -1
  141. package/public/assets/{Tooltip-BsZZ0Gbx.js → Tooltip-BHFpbnTf.js} +1 -1
  142. package/public/assets/{TotpSetupPage-IMrYjGAF.js → TotpSetupPage-PaSNj1Vp.js} +1 -1
  143. package/public/assets/{WorkerDetailPage-B9TiPkJ8.js → WorkerDetailPage-W7OzDMjo.js} +1 -1
  144. package/public/assets/{WorkerListPage-Dm_zdLQH.js → WorkerListPage-BlPPImaB.js} +1 -1
  145. package/public/assets/{WorkerOperationsPage-BYBaNNVI.js → WorkerOperationsPage-DrfCoaEl.js} +1 -1
  146. package/public/assets/{WorkerSetupGuidePage-Xed2whgU.js → WorkerSetupGuidePage-DWVXczXP.js} +1 -1
  147. package/public/assets/{WorkerSetupPage-y62Z3za_.js → WorkerSetupPage-DHtihc61.js} +1 -1
  148. package/public/assets/{agent-type-options-Drj4kVJw.js → agent-type-options-DubeBncx.js} +1 -1
  149. package/public/assets/{arrow-left-BcA9UMTL.js → arrow-left-g7TOa7aF.js} +1 -1
  150. package/public/assets/{arrow-right-BZXdY7kF.js → arrow-right-wT3FVH8D.js} +1 -1
  151. package/public/assets/automationFindings-CnN7yNaM.js +1 -0
  152. package/public/assets/{bot-DcTSu6mF.js → bot-DUzuNjZF.js} +1 -1
  153. package/public/assets/{chevron-down-B-IybQE8.js → chevron-down-Bm0RXzLE.js} +1 -1
  154. package/public/assets/{chevron-left-BoAE9yoT.js → chevron-left-DNFZom2A.js} +1 -1
  155. package/public/assets/{chevron-right-DdNeU6u1.js → chevron-right-k9Y539yL.js} +1 -1
  156. package/public/assets/{chevron-up-C4VkqudN.js → chevron-up-Cxjw28Mn.js} +1 -1
  157. package/public/assets/{circle-alert-BzDJW2uY.js → circle-alert-ChLxlsDX.js} +1 -1
  158. package/public/assets/{clock-BF7qBFGO.js → clock-Cy1Js2Dt.js} +1 -1
  159. package/public/assets/{copy-BilNgG66.js → copy-7k2-aSPF.js} +1 -1
  160. package/public/assets/{download-DyLe1gp-.js → download-DECvB0VG.js} +1 -1
  161. package/public/assets/{external-link-C2lUBinm.js → external-link-BWGj2ovK.js} +1 -1
  162. package/public/assets/{git-fork-DljHeJn2.js → git-fork-CySs5AmY.js} +1 -1
  163. package/public/assets/{index-pQSLMYLJ.css → index-B40ZH6vh.css} +1 -1
  164. package/public/assets/{index-DpFOWbFQ.js → index-CTiyb7yJ.js} +3 -3
  165. package/public/assets/{key-CHQYfxWN.js → key-BthWL-sa.js} +1 -1
  166. package/public/assets/{loader-circle-DmxemZdl.js → loader-circle-CsI7JHTw.js} +1 -1
  167. package/public/assets/{pencil-DMKsPe_A.js → pencil-Bm1Ln0FX.js} +1 -1
  168. package/public/assets/{play-RH8-4UME.js → play-B7Id2WyV.js} +1 -1
  169. package/public/assets/{plus-7GEqLtYy.js → plus-Ce55RcwK.js} +1 -1
  170. package/public/assets/{rotate-ccw-Jtcupri2.js → rotate-ccw-C4xEcJju.js} +1 -1
  171. package/public/assets/{scroll-text-tbcoJ-t_.js → scroll-text-B0k4ESJb.js} +1 -1
  172. package/public/assets/{settings-D0aqv-8_.js → settings-kIgYE_n9.js} +1 -1
  173. package/public/assets/{skip-forward-BHfCjKv2.js → skip-forward-BuxHL_QR.js} +1 -1
  174. package/public/assets/{status-colors-_SUaojQM.js → status-colors-BWRmmvZ-.js} +1 -1
  175. package/public/assets/{task-agent-Rpiyr0sB.js → task-agent-DetMKF5G.js} +1 -1
  176. package/public/assets/{task-constants-BAM6BP3N.js → task-constants-DCUOs6Oc.js} +1 -1
  177. package/public/assets/{task.store-BMOVGyvP.js → task.store-Buv1GNnt.js} +1 -1
  178. package/public/assets/{timer-LF3nKAXi.js → timer-DI-oKdvl.js} +1 -1
  179. package/public/assets/{trash-2-CfHTaDgU.js → trash-2-CjjldDF6.js} +1 -1
  180. package/public/assets/{useFetch-Sdr634q_.js → useFetch-DS1eW-jy.js} +1 -1
  181. package/public/assets/{users-DUHEmaaK.js → users-CvKRug18.js} +1 -1
  182. package/public/assets/{wifi-DR2_OBUt.js → wifi-CT0EjbhU.js} +1 -1
  183. package/public/assets/{workflow-uVJjw4HD.js → workflow-DUtpMno5.js} +1 -1
  184. package/public/assets/{zap-BH9B1NGV.js → zap-DTEOEzhR.js} +1 -1
  185. package/public/index.html +2 -2
  186. package/public/sw.js +1 -1
  187. package/public/assets/AutomationCreatePage-DaHeZycf.js +0 -1
  188. package/public/assets/AutomationEditPage-Cjw5DRd6.js +0 -1
  189. package/public/assets/AutomationListPage-Cj4cqINZ.js +0 -26
  190. package/public/assets/AutomationRunDetailPage-CzcvwnZh.js +0 -6
  191. package/public/assets/BotIntegrationPage-LIWwLiyv.js +0 -1
  192. package/public/assets/BotManage-umHOH2yR.js +0 -6
  193. package/public/assets/ChangelogPage-DMuOXPSB.js +0 -1
  194. package/public/assets/ReviewAggregatePage-D6_tkXWc.js +0 -6
  195. package/public/assets/ReviewPage-CWNJfYaM.js +0 -1
  196. package/public/assets/TaskDetailPage-BtWTrChF.js +0 -21
@@ -1 +1 @@
1
- {"version":3,"file":"worker-channel.gateway.js","sourceRoot":"","sources":["../../src/web/worker-channel.gateway.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAI4B;AAC5B,2CAAwC;A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AAE,CAAC;oBACzC,IAAI,CAAC,MAAM,CAAC,KAAK,CACf,wBAAwB,QAAQ,6BAA6B,OAAO,KAAK,CAC1E,CAAC;oBACF,OAAO;gBACT,CAAC;YACH,CAAC;YAED,IAAI,CAAC,MAAM,CAAC,IAAI,CACd,oDAAoD,QAAQ,iBAAiB,CAC9E,CAAC;YACF,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,mBAAmB,CAAC,CAAC;YACxC,OAAO;QACT,CAAC;QAED,qCAAqC;QACrC,MAAM,WAAW,GAAG,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAC3D,IAAI,CAAC,WAAW,IAAI,WAAW,CAAC,MAAM,KAAK,sBAAW,CAAC,MAAM,EAAE,CAAC;YAC9D,IAAI,CAAC,MAAM,CAAC,IAAI,CACd,qCAAqC,OAAO,4BAA4B,CACzE,CAAC;YACF,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,yBAAyB,CAAC,CAAC;YAC9C,OAAO;QACT,CAAC;IACH,CAAC;CACF,CAAA;AA7QY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,6BAAgB,EAAC,EAAE,IAAI,EAAE,sBAAsB,EAAE,CAAC;qCAUjB,0BAAW;QACC,mDAAuB;QAC/C,oCAAgB;QACtB,uBAAU;QACA,6CAAoB;QAC1B,iCAAc;QAChB,4BAAY;QACG,oCAAgB;QAClB,gCAAc;QACP,+CAAqB;QACtC,kCAAe;QACI,sCAAiB;QACrB,8BAAa;QACd,6BAAa;QAC7B,0CAAmB;QACpB,4BAAY;QACN,wCAAkB;GAzB7B,oBAAoB,CA6QhC"}
1
+ {"version":3,"file":"worker-channel.gateway.js","sourceRoot":"","sources":["../../src/web/worker-channel.gateway.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAI4B;AAC5B,2CAAwC;AAIxC,mDAM8B;AAO9B,yDAAsD;AACtD,uDAAsF;AACtF,uDAAmD;AACnD,uFAAkF;AAClF,uEAA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B,QAAQ,6BAA6B,OAAO,KAAK,CAC1E,CAAC;oBACF,OAAO;gBACT,CAAC;YACH,CAAC;YAED,IAAI,CAAC,MAAM,CAAC,IAAI,CACd,oDAAoD,QAAQ,iBAAiB,CAC9E,CAAC;YACF,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,mBAAmB,CAAC,CAAC;YACxC,OAAO;QACT,CAAC;QAED,qCAAqC;QACrC,MAAM,WAAW,GAAG,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAC3D,IAAI,CAAC,WAAW,IAAI,WAAW,CAAC,MAAM,KAAK,sBAAW,CAAC,MAAM,EAAE,CAAC;YAC9D,IAAI,CAAC,MAAM,CAAC,IAAI,CACd,qCAAqC,OAAO,4BAA4B,CACzE,CAAC;YACF,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,yBAAyB,CAAC,CAAC;YAC9C,OAAO;QACT,CAAC;IACH,CAAC;CACF,CAAA;AA7QY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,6BAAgB,EAAC,EAAE,IAAI,EAAE,sBAAsB,EAAE,CAAC;qCAUjB,0BAAW;QACC,mDAAuB;QAC/C,oCAAgB;QACtB,uBAAU;QACA,6CAAoB;QAC1B,iCAAc;QAChB,4BAAY;QACG,oCAAgB;QAClB,gCAAc;QACP,+CAAqB;QACtC,kCAAe;QACI,sCAAiB;QACrB,8BAAa;QACd,6BAAa;QAC7B,0CAAmB;QACpB,4BAAY;QACN,wCAAkB;GAzB7B,oBAAoB,CA6QhC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@overlordai/server",
3
- "version": "1.0.163",
3
+ "version": "1.0.165",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "dist",
@@ -28,9 +28,9 @@
28
28
  "@nestjs/platform-express": "^10.4.0",
29
29
  "@nestjs/platform-ws": "^10.4.0",
30
30
  "@nestjs/websockets": "^10.4.0",
31
- "@overlordai/command-parser": "1.0.163",
32
- "@overlordai/protocol": "1.0.163",
33
- "@overlordai/validation": "1.0.163",
31
+ "@overlordai/command-parser": "1.0.165",
32
+ "@overlordai/protocol": "1.0.165",
33
+ "@overlordai/validation": "1.0.165",
34
34
  "@slack/web-api": "^7.15.0",
35
35
  "bcrypt": "^6.0.0",
36
36
  "better-sqlite3": "^11.0.0",
@@ -1 +1 @@
1
- import{a as _,v as C,r as c,j as e,h as k,s as T,x as S,J as A,a6 as D,a8 as f,t as g}from"./index-DpFOWbFQ.js";import{S as E}from"./Select-Dgtvdi2n.js";import{E as L}from"./EmptyState-DQ0fOTKY.js";import{T as I}from"./Skeleton-CwwH6ktS.js";import{t as N}from"./date-CmcdoD87.js";import{u as R}from"./useFetch-Sdr634q_.js";import{P}from"./plus-7GEqLtYy.js";import{C as O}from"./copy-BilNgG66.js";import{T as w}from"./trash-2-CfHTaDgU.js";import"./chevron-down-B-IybQE8.js";function V({isOpen:s,onClose:u,onCreated:i}){const{t:a}=_();C(s);const[d,o]=c.useState(""),[x,n]=c.useState("never"),[m,p]=c.useState(!1),[v,l]=c.useState(""),j=[{value:"never",label:a("access_tokens.no_expiry")},{value:"30",label:a("access_tokens.days_30")},{value:"90",label:a("access_tokens.days_90")},{value:"365",label:a("access_tokens.days_365")}];function h(){o(""),n("never"),l(""),u()}async function b(){if(l(""),!d.trim()){l(a("access_tokens.token_label_required"));return}try{p(!0);const r=await k.post("web/profile/tokens",{json:{label:d.trim(),...x!=="never"&&{expiresAt:new Date(Date.now()+parseInt(x,10)*864e5).toISOString()}}}).json();o(""),n("never"),i({token:r.token,name:r.name})}catch(r){const y=r instanceof Error?r.message:a("access_tokens.failed_to_create_token");l(y)}finally{p(!1)}}return s?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"fixed inset-0 z-40 bg-[var(--modal-backdrop)]"}),e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:e.jsxs("div",{className:"w-full max-w-[480px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] shadow-lg",onClick:r=>r.stopPropagation(),children:[e.jsxs("div",{className:"border-b border-[var(--border)] px-5 py-4",children:[e.jsx("h2",{className:"text-sm font-semibold text-[var(--text-primary)]",children:a("access_tokens.create_personal_access_token")}),e.jsx("p",{className:"mt-1 text-xs text-[var(--text-muted)]",children:a("access_tokens.tokens_authenticate_desc")})]}),e.jsxs("div",{className:"space-y-4 px-5 py-5",children:[v&&e.jsx("div",{className:"rounded-[4px] border border-[var(--destructive)]/30 bg-[var(--destructive)]/5 px-3 py-2 text-xs text-[var(--destructive)]",children:v}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:a("access_tokens.token_name")}),e.jsx("input",{type:"text",placeholder:a("access_tokens.token_name_placeholder"),value:d,onChange:r=>o(r.target.value),onKeyDown:r=>{r.key==="Enter"&&b()},className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:a("access_tokens.expires")}),e.jsx(E,{value:x,onChange:n,options:j})]})]}),e.jsxs("div",{className:"flex justify-end gap-2 border-t border-[var(--border)] px-5 py-4",children:[e.jsx("button",{onClick:h,className:"rounded-[4px] border border-[var(--border)] bg-transparent px-4 py-2 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:a("common.cancel")}),e.jsx("button",{onClick:b,disabled:m,className:"rounded-[4px] bg-[var(--accent)] px-4 py-2 text-xs font-medium text-black hover:opacity-90 transition-opacity disabled:opacity-50",children:a(m?"common.creating":"access_tokens.create_token")})]})]})})]}):null}function U({isOpen:s,onClose:u,onConfirm:i,tokenLabel:a,isLoading:d}){const{t:o}=_();return e.jsx(T,{isOpen:s,onClose:u,onConfirm:i,title:o("access_tokens.revoke_token_title"),message:o("access_tokens.revoke_confirm",{name:a}),confirmLabel:o("access_tokens.revoke"),confirmVariant:"danger",isLoading:d})}function Q(){const{t:s}=_(),[u,i]=c.useState(!1),[a,d]=c.useState(null),[o,x]=c.useState(!1),[n,m]=c.useState(null),[p,v]=c.useState(null),{data:l,loading:j,refetch:h}=R(()=>k.get("web/profile/tokens").json(),[]);S(c.useMemo(()=>e.jsxs("button",{onClick:()=>i(!0),className:"flex items-center gap-1.5 rounded-[4px] bg-[var(--accent)] px-3 py-1.5 text-xs text-black transition-opacity hover:opacity-90",children:[e.jsx(P,{className:"h-3.5 w-3.5"}),s("access_tokens.create_token")]}),[s]));function b(t){i(!1),d(t.token),x(!1),h()}async function r(){if(a)try{await navigator.clipboard.writeText(a),x(!0),setTimeout(()=>x(!1),2e3)}catch{}}async function y(){if(n)try{v(n.id),await k.post(`web/profile/tokens/${n.id}/revoke`),g.success(s("access_tokens.token_revoked")),m(null),h()}catch{g.error(s("access_tokens.failed_to_revoke_token"))}finally{v(null)}}return e.jsxs("div",{className:"mx-auto max-w-4xl px-4 md:px-6 py-8 font-mono lowercase",children:[a&&e.jsxs("div",{className:"mb-6 rounded-[4px] border border-[var(--warning)] bg-[var(--bg-card)] px-4 py-3",children:[e.jsx("p",{className:"mb-2 text-xs font-medium text-[var(--warning)]",children:s("access_tokens.copy_token_warning")}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("code",{className:"flex-1 break-all rounded-[4px] bg-[var(--bg-primary)] px-3 py-2 text-xs text-[var(--text-primary)]",children:a}),e.jsxs("button",{onClick:r,className:"flex items-center gap-1 rounded-[4px] border border-[var(--border)] px-2 py-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:[o?e.jsx(A,{className:"h-3.5 w-3.5 text-[var(--accent)]"}):e.jsx(O,{className:"h-3.5 w-3.5"}),s(o?"common.copied":"common.copy")]})]}),e.jsx("div",{className:"mt-2 flex justify-end",children:e.jsx("button",{onClick:()=>d(null),className:"text-xs text-[var(--text-muted)] hover:text-[var(--text-secondary)]",children:s("common.dismiss")})})]}),e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:j?e.jsx("div",{className:"p-4",children:e.jsx(I,{rows:3})}):!l||l.length===0?e.jsx(L,{icon:D,title:s("access_tokens.no_tokens"),description:s("access_tokens.create_token_desc"),actionLabel:s("access_tokens.create_token"),onAction:()=>i(!0)}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"md:hidden divide-y divide-[var(--border)]",children:l.map(t=>e.jsxs("div",{className:"px-4 py-3 space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"truncate text-xs text-[var(--text-primary)] font-medium",children:t.label}),e.jsx("span",{className:`text-xs shrink-0 ml-2 ${t.status===f.ACTIVE?"text-green-400":"text-[var(--text-muted)]"}`,children:t.status})]}),e.jsxs("div",{className:"flex flex-wrap gap-x-4 gap-y-1 text-[11px] text-[var(--text-secondary)]",children:[e.jsxs("span",{children:[s("access_tokens.created"),": ",new Date(t.createdAt).toLocaleDateString()]}),e.jsxs("span",{children:[s("access_tokens.expires"),": ",t.expiresAt?new Date(t.expiresAt).toLocaleDateString():s("common.never")]}),e.jsxs("span",{children:[s("access_tokens.last_used"),": ",t.lastUsedAt?N(t.lastUsedAt):s("common.never")]})]}),t.status===f.ACTIVE&&e.jsx("div",{className:"flex justify-end",children:e.jsxs("button",{onClick:()=>m(t),disabled:p===t.id,className:"inline-flex items-center gap-1 text-xs text-[var(--destructive)] hover:underline disabled:opacity-50",children:[e.jsx(w,{className:"h-3 w-3"}),s("access_tokens.revoke")]})})]},t.id))}),e.jsxs("table",{className:"hidden md:table w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)] text-left text-[var(--text-muted)]",children:[e.jsx("th",{className:"px-4 py-2.5 font-normal",children:s("common.name")}),e.jsx("th",{className:"px-4 py-2.5 font-normal",children:s("common.status")}),e.jsx("th",{className:"px-4 py-2.5 font-normal",children:s("access_tokens.created")}),e.jsx("th",{className:"px-4 py-2.5 font-normal",children:s("access_tokens.last_used")}),e.jsx("th",{className:"px-4 py-2.5 font-normal",children:s("access_tokens.expires")}),e.jsx("th",{className:"px-4 py-2.5 font-normal text-right",children:s("common.actions")})]})}),e.jsx("tbody",{children:l.map(t=>e.jsxs("tr",{className:"border-b border-[var(--border-row)] last:border-b-0 hover:bg-white/[0.02] transition-colors",children:[e.jsx("td",{className:"px-4 py-3 text-[var(--text-primary)]",children:e.jsx("span",{className:"truncate block max-w-[100px] md:max-w-[200px]",children:t.label})}),e.jsx("td",{className:"px-4 py-3",children:e.jsx("span",{className:t.status===f.ACTIVE?"text-green-400":"text-[var(--text-muted)]",children:t.status})}),e.jsx("td",{className:"px-4 py-3 text-[var(--text-secondary)]",children:new Date(t.createdAt).toLocaleDateString()}),e.jsx("td",{className:"px-4 py-3 text-[var(--text-secondary)]",children:t.lastUsedAt?N(t.lastUsedAt):s("common.never")}),e.jsx("td",{className:"px-4 py-3 text-[var(--text-secondary)]",children:t.expiresAt?new Date(t.expiresAt).toLocaleDateString():s("common.never")}),e.jsx("td",{className:"px-4 py-3 text-right",children:t.status===f.ACTIVE&&e.jsxs("button",{onClick:()=>m(t),disabled:p===t.id,className:"inline-flex items-center gap-1 text-xs text-[var(--destructive)] hover:underline disabled:opacity-50",children:[e.jsx(w,{className:"h-3 w-3"}),s("access_tokens.revoke")]})})]},t.id))})]})]})}),e.jsx(V,{isOpen:u,onClose:()=>i(!1),onCreated:b}),e.jsx(U,{isOpen:!!n,onClose:()=>m(null),onConfirm:y,tokenLabel:(n==null?void 0:n.label)??"",isLoading:p!==null})]})}export{Q as default};
1
+ import{a as _,v as C,r as c,j as e,h as k,s as T,x as S,J as A,a6 as D,a8 as f,t as g}from"./index-CTiyb7yJ.js";import{S as E}from"./Select-O36ifNjw.js";import{E as L}from"./EmptyState-D5CEvlzr.js";import{T as I}from"./Skeleton-C3hKV7kJ.js";import{t as N}from"./date-CmcdoD87.js";import{u as R}from"./useFetch-DS1eW-jy.js";import{P}from"./plus-Ce55RcwK.js";import{C as O}from"./copy-7k2-aSPF.js";import{T as w}from"./trash-2-CjjldDF6.js";import"./chevron-down-Bm0RXzLE.js";function V({isOpen:s,onClose:u,onCreated:i}){const{t:a}=_();C(s);const[d,o]=c.useState(""),[x,n]=c.useState("never"),[m,p]=c.useState(!1),[v,l]=c.useState(""),j=[{value:"never",label:a("access_tokens.no_expiry")},{value:"30",label:a("access_tokens.days_30")},{value:"90",label:a("access_tokens.days_90")},{value:"365",label:a("access_tokens.days_365")}];function h(){o(""),n("never"),l(""),u()}async function b(){if(l(""),!d.trim()){l(a("access_tokens.token_label_required"));return}try{p(!0);const r=await k.post("web/profile/tokens",{json:{label:d.trim(),...x!=="never"&&{expiresAt:new Date(Date.now()+parseInt(x,10)*864e5).toISOString()}}}).json();o(""),n("never"),i({token:r.token,name:r.name})}catch(r){const y=r instanceof Error?r.message:a("access_tokens.failed_to_create_token");l(y)}finally{p(!1)}}return s?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"fixed inset-0 z-40 bg-[var(--modal-backdrop)]"}),e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:e.jsxs("div",{className:"w-full max-w-[480px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] shadow-lg",onClick:r=>r.stopPropagation(),children:[e.jsxs("div",{className:"border-b border-[var(--border)] px-5 py-4",children:[e.jsx("h2",{className:"text-sm font-semibold text-[var(--text-primary)]",children:a("access_tokens.create_personal_access_token")}),e.jsx("p",{className:"mt-1 text-xs text-[var(--text-muted)]",children:a("access_tokens.tokens_authenticate_desc")})]}),e.jsxs("div",{className:"space-y-4 px-5 py-5",children:[v&&e.jsx("div",{className:"rounded-[4px] border border-[var(--destructive)]/30 bg-[var(--destructive)]/5 px-3 py-2 text-xs text-[var(--destructive)]",children:v}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:a("access_tokens.token_name")}),e.jsx("input",{type:"text",placeholder:a("access_tokens.token_name_placeholder"),value:d,onChange:r=>o(r.target.value),onKeyDown:r=>{r.key==="Enter"&&b()},className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:a("access_tokens.expires")}),e.jsx(E,{value:x,onChange:n,options:j})]})]}),e.jsxs("div",{className:"flex justify-end gap-2 border-t border-[var(--border)] px-5 py-4",children:[e.jsx("button",{onClick:h,className:"rounded-[4px] border border-[var(--border)] bg-transparent px-4 py-2 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:a("common.cancel")}),e.jsx("button",{onClick:b,disabled:m,className:"rounded-[4px] bg-[var(--accent)] px-4 py-2 text-xs font-medium text-black hover:opacity-90 transition-opacity disabled:opacity-50",children:a(m?"common.creating":"access_tokens.create_token")})]})]})})]}):null}function U({isOpen:s,onClose:u,onConfirm:i,tokenLabel:a,isLoading:d}){const{t:o}=_();return e.jsx(T,{isOpen:s,onClose:u,onConfirm:i,title:o("access_tokens.revoke_token_title"),message:o("access_tokens.revoke_confirm",{name:a}),confirmLabel:o("access_tokens.revoke"),confirmVariant:"danger",isLoading:d})}function Q(){const{t:s}=_(),[u,i]=c.useState(!1),[a,d]=c.useState(null),[o,x]=c.useState(!1),[n,m]=c.useState(null),[p,v]=c.useState(null),{data:l,loading:j,refetch:h}=R(()=>k.get("web/profile/tokens").json(),[]);S(c.useMemo(()=>e.jsxs("button",{onClick:()=>i(!0),className:"flex items-center gap-1.5 rounded-[4px] bg-[var(--accent)] px-3 py-1.5 text-xs text-black transition-opacity hover:opacity-90",children:[e.jsx(P,{className:"h-3.5 w-3.5"}),s("access_tokens.create_token")]}),[s]));function b(t){i(!1),d(t.token),x(!1),h()}async function r(){if(a)try{await navigator.clipboard.writeText(a),x(!0),setTimeout(()=>x(!1),2e3)}catch{}}async function y(){if(n)try{v(n.id),await k.post(`web/profile/tokens/${n.id}/revoke`),g.success(s("access_tokens.token_revoked")),m(null),h()}catch{g.error(s("access_tokens.failed_to_revoke_token"))}finally{v(null)}}return e.jsxs("div",{className:"mx-auto max-w-4xl px-4 md:px-6 py-8 font-mono lowercase",children:[a&&e.jsxs("div",{className:"mb-6 rounded-[4px] border border-[var(--warning)] bg-[var(--bg-card)] px-4 py-3",children:[e.jsx("p",{className:"mb-2 text-xs font-medium text-[var(--warning)]",children:s("access_tokens.copy_token_warning")}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("code",{className:"flex-1 break-all rounded-[4px] bg-[var(--bg-primary)] px-3 py-2 text-xs text-[var(--text-primary)]",children:a}),e.jsxs("button",{onClick:r,className:"flex items-center gap-1 rounded-[4px] border border-[var(--border)] px-2 py-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:[o?e.jsx(A,{className:"h-3.5 w-3.5 text-[var(--accent)]"}):e.jsx(O,{className:"h-3.5 w-3.5"}),s(o?"common.copied":"common.copy")]})]}),e.jsx("div",{className:"mt-2 flex justify-end",children:e.jsx("button",{onClick:()=>d(null),className:"text-xs text-[var(--text-muted)] hover:text-[var(--text-secondary)]",children:s("common.dismiss")})})]}),e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:j?e.jsx("div",{className:"p-4",children:e.jsx(I,{rows:3})}):!l||l.length===0?e.jsx(L,{icon:D,title:s("access_tokens.no_tokens"),description:s("access_tokens.create_token_desc"),actionLabel:s("access_tokens.create_token"),onAction:()=>i(!0)}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"md:hidden divide-y divide-[var(--border)]",children:l.map(t=>e.jsxs("div",{className:"px-4 py-3 space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"truncate text-xs text-[var(--text-primary)] font-medium",children:t.label}),e.jsx("span",{className:`text-xs shrink-0 ml-2 ${t.status===f.ACTIVE?"text-green-400":"text-[var(--text-muted)]"}`,children:t.status})]}),e.jsxs("div",{className:"flex flex-wrap gap-x-4 gap-y-1 text-[11px] text-[var(--text-secondary)]",children:[e.jsxs("span",{children:[s("access_tokens.created"),": ",new Date(t.createdAt).toLocaleDateString()]}),e.jsxs("span",{children:[s("access_tokens.expires"),": ",t.expiresAt?new Date(t.expiresAt).toLocaleDateString():s("common.never")]}),e.jsxs("span",{children:[s("access_tokens.last_used"),": ",t.lastUsedAt?N(t.lastUsedAt):s("common.never")]})]}),t.status===f.ACTIVE&&e.jsx("div",{className:"flex justify-end",children:e.jsxs("button",{onClick:()=>m(t),disabled:p===t.id,className:"inline-flex items-center gap-1 text-xs text-[var(--destructive)] hover:underline disabled:opacity-50",children:[e.jsx(w,{className:"h-3 w-3"}),s("access_tokens.revoke")]})})]},t.id))}),e.jsxs("table",{className:"hidden md:table w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)] text-left text-[var(--text-muted)]",children:[e.jsx("th",{className:"px-4 py-2.5 font-normal",children:s("common.name")}),e.jsx("th",{className:"px-4 py-2.5 font-normal",children:s("common.status")}),e.jsx("th",{className:"px-4 py-2.5 font-normal",children:s("access_tokens.created")}),e.jsx("th",{className:"px-4 py-2.5 font-normal",children:s("access_tokens.last_used")}),e.jsx("th",{className:"px-4 py-2.5 font-normal",children:s("access_tokens.expires")}),e.jsx("th",{className:"px-4 py-2.5 font-normal text-right",children:s("common.actions")})]})}),e.jsx("tbody",{children:l.map(t=>e.jsxs("tr",{className:"border-b border-[var(--border-row)] last:border-b-0 hover:bg-white/[0.02] transition-colors",children:[e.jsx("td",{className:"px-4 py-3 text-[var(--text-primary)]",children:e.jsx("span",{className:"truncate block max-w-[100px] md:max-w-[200px]",children:t.label})}),e.jsx("td",{className:"px-4 py-3",children:e.jsx("span",{className:t.status===f.ACTIVE?"text-green-400":"text-[var(--text-muted)]",children:t.status})}),e.jsx("td",{className:"px-4 py-3 text-[var(--text-secondary)]",children:new Date(t.createdAt).toLocaleDateString()}),e.jsx("td",{className:"px-4 py-3 text-[var(--text-secondary)]",children:t.lastUsedAt?N(t.lastUsedAt):s("common.never")}),e.jsx("td",{className:"px-4 py-3 text-[var(--text-secondary)]",children:t.expiresAt?new Date(t.expiresAt).toLocaleDateString():s("common.never")}),e.jsx("td",{className:"px-4 py-3 text-right",children:t.status===f.ACTIVE&&e.jsxs("button",{onClick:()=>m(t),disabled:p===t.id,className:"inline-flex items-center gap-1 text-xs text-[var(--destructive)] hover:underline disabled:opacity-50",children:[e.jsx(w,{className:"h-3 w-3"}),s("access_tokens.revoke")]})})]},t.id))})]})]})}),e.jsx(V,{isOpen:u,onClose:()=>i(!1),onCreated:b}),e.jsx(U,{isOpen:!!n,onClose:()=>m(null),onConfirm:y,tokenLabel:(n==null?void 0:n.label)??"",isLoading:p!==null})]})}export{Q as default};
@@ -1 +1 @@
1
- import{a as i,a6 as d,j as t,a9 as m,aa as l}from"./index-DpFOWbFQ.js";import{U as c}from"./users-DUHEmaaK.js";import{B as b}from"./bot-DcTSu6mF.js";import{S as p}from"./scroll-text-tbcoJ-t_.js";import{S as x}from"./settings-D0aqv-8_.js";function h(){const{t:a}=i(),r=[{to:"/admin/developers",label:a("admin.tab_developers"),icon:c},{to:"/admin/bots",label:a("admin.tab_bots"),icon:b},{to:"/admin/tokens",label:a("admin.tab_tokens"),icon:d},{to:"/admin/audit-logs",label:a("admin.tab_audit_logs"),icon:p},{to:"/admin/settings",label:a("admin.tab_settings"),icon:x}];return t.jsxs("div",{children:[t.jsx("div",{className:"mb-6 flex flex-nowrap gap-2 overflow-x-auto border-b border-[var(--border)] no-scrollbar pr-4 md:pr-0",children:r.map(({to:e,label:o,icon:s})=>t.jsxs(m,{to:e,className:({isActive:n})=>`flex shrink-0 whitespace-nowrap items-center gap-2 border-b-2 px-4 py-3 md:py-2 text-sm transition-colors ${n?"border-[var(--accent)] text-[var(--accent)]":"border-transparent text-[var(--text-secondary)] hover:text-[var(--text-primary)]"}`,children:[t.jsx(s,{size:16}),o]},e))}),t.jsx(l,{})]})}export{h as default};
1
+ import{a as i,a6 as d,j as t,a9 as m,aa as l}from"./index-CTiyb7yJ.js";import{U as c}from"./users-CvKRug18.js";import{B as b}from"./bot-DUzuNjZF.js";import{S as p}from"./scroll-text-B0k4ESJb.js";import{S as x}from"./settings-kIgYE_n9.js";function h(){const{t:a}=i(),r=[{to:"/admin/developers",label:a("admin.tab_developers"),icon:c},{to:"/admin/bots",label:a("admin.tab_bots"),icon:b},{to:"/admin/tokens",label:a("admin.tab_tokens"),icon:d},{to:"/admin/audit-logs",label:a("admin.tab_audit_logs"),icon:p},{to:"/admin/settings",label:a("admin.tab_settings"),icon:x}];return t.jsxs("div",{children:[t.jsx("div",{className:"mb-6 flex flex-nowrap gap-2 overflow-x-auto border-b border-[var(--border)] no-scrollbar pr-4 md:pr-0",children:r.map(({to:e,label:o,icon:s})=>t.jsxs(m,{to:e,className:({isActive:n})=>`flex shrink-0 whitespace-nowrap items-center gap-2 border-b-2 px-4 py-3 md:py-2 text-sm transition-colors ${n?"border-[var(--accent)] text-[var(--accent)]":"border-transparent text-[var(--text-secondary)] hover:text-[var(--text-primary)]"}`,children:[t.jsx(s,{size:16}),o]},e))}),t.jsx(l,{})]})}export{h as default};
@@ -1,3 +1,3 @@
1
- import{j as e}from"./index-DpFOWbFQ.js";import{a as s}from"./DocsPrimitives-DxxQvd4A.js";import"./copy-BilNgG66.js";function d(){return e.jsx("div",{className:"mx-auto max-w-4xl px-4 md:px-6 py-8 font-mono lowercase",children:e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// agent cli integration"}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["overlord supports three ai agent clis. each project configures an ",e.jsx("code",{className:"text-[var(--accent)]",children:"agent_type"})," that determines which cli the worker uses to execute tasks. the prompt is written to pty stdin after the cli starts — not passed as a cli argument."]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// supported agents"}),e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"agent"}),e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"cli binary"}),e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"config value"}),e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"subscription"})]})}),e.jsxs("tbody",{className:"text-[var(--text-secondary)]",children:[e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"px-3 py-2",children:"claude code"}),e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"claude"})}),e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"claude"})}),e.jsx("td",{className:"px-3 py-2",children:"anthropic / claude"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"px-3 py-2",children:"cursor agent"}),e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"agent"})}),e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"cursor"})}),e.jsx("td",{className:"px-3 py-2",children:"cursor"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"px-3 py-2",children:"openai codex"}),e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"codex"})}),e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"codex"})}),e.jsx("td",{className:"px-3 py-2",children:"openai"})]})]})]})}),e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] px-3 py-2",children:e.jsxs("p",{className:"text-xs text-[var(--text-secondary)]",children:["// the cursor agent cli binary is ",e.jsx("code",{className:"text-[var(--accent)]",children:"agent"}),", not ",e.jsx("code",{className:"text-[var(--accent)]",children:"cursor"}),". the config value ",e.jsx("code",{className:"text-[var(--accent)]",children:"cursor"})," maps to the ",e.jsx("code",{className:"text-[var(--accent)]",children:"agent"})," binary."]})})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// permission strategy"}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["all agents run in fully automated mode by default. the ",e.jsx("code",{className:"text-[var(--accent)]",children:"allowedTools"})," project config controls the permission level:"]}),e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"allowedTools"}),e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"claude"}),e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"cursor"}),e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"codex"})]})}),e.jsxs("tbody",{className:"text-[var(--text-secondary)]",children:[e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"px-3 py-2 text-[var(--text-muted)]",children:"null (default)"}),e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"--dangerously-skip-permissions"})}),e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"--yolo --approve-mcps"})}),e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"--dangerously-bypass-approvals-and-sandbox"})})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"px-3 py-2 text-[var(--text-muted)]",children:"specific value"}),e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"--allowedTools <value>"})}),e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"--yolo --approve-mcps"})}),e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"--full-auto"})})]})]})]})})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// cli flag mapping"}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h3",{className:"text-xs font-semibold text-[var(--accent)]",children:"claude code"}),e.jsx(s,{code:"claude --dangerously-skip-permissions [--allowedTools <tools>] [--plugin-dir <path>]"}),e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"config field"}),e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"cli flag"}),e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"notes"})]})}),e.jsxs("tbody",{className:"text-[var(--text-secondary)]",children:[e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"allowedTools"})}),e.jsxs("td",{className:"px-3 py-2",children:[e.jsx("code",{children:"--allowedTools"})," or ",e.jsx("code",{children:"--dangerously-skip-permissions"})]}),e.jsx("td",{className:"px-3 py-2",children:"see permission strategy"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"skillsPath"})}),e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{children:"--plugin-dir <path>"})}),e.jsx("td",{className:"px-3 py-2",children:"load custom skills/plugins"})]})]})]})}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["environment: symlinks ",e.jsx("code",{className:"text-[var(--accent)]",children:".claude.json"}),", ",e.jsx("code",{className:"text-[var(--accent)]",children:".credentials.json"}),", ",e.jsx("code",{className:"text-[var(--accent)]",children:"settings.json"})," from real home. pre-trusts worktree in ",e.jsx("code",{className:"text-[var(--accent)]",children:"trustedDirectories"}),"."]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h3",{className:"text-xs font-semibold text-[var(--accent)]",children:"cursor agent"}),e.jsx("div",{className:"rounded-[4px] border border-[var(--warning)]/30 bg-[var(--warning)]/5 px-3 py-2",children:e.jsx("p",{className:"text-xs text-[var(--warning)]",children:'⚠ macos limitation: cursor agent stores auth tokens in macos keychain, which requires a gui login session. headless workers (launchd/ssh) cannot access keychain and will fail with "keychain operation timed out". cursor agent is currently only supported on linux workers.'})}),e.jsx(s,{code:"agent --yolo --approve-mcps"}),e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"flag"}),e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"purpose"})]})}),e.jsxs("tbody",{className:"text-[var(--text-secondary)]",children:[e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{children:"--yolo"})}),e.jsx("td",{className:"px-3 py-2",children:"skip all confirmation prompts (alias for --force)"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"line-through opacity-50",children:"--trust"})}),e.jsx("td",{className:"px-3 py-2",children:"removed — only works in headless/print mode. trust is auto-accepted via pty."})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{children:"--approve-mcps"})}),e.jsx("td",{className:"px-3 py-2",children:"auto-approve mcp servers"})]})]})]})}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["environment: relies on workspace-manager's xdg ",e.jsx("code",{className:"text-[var(--accent)]",children:".config/"})," symlink."]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h3",{className:"text-xs font-semibold text-[var(--accent)]",children:"openai codex"}),e.jsx(s,{code:"codex --dangerously-bypass-approvals-and-sandbox"}),e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"config field"}),e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"cli flag"}),e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"notes"})]})}),e.jsx("tbody",{className:"text-[var(--text-secondary)]",children:e.jsxs("tr",{children:[e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"allowedTools"})}),e.jsxs("td",{className:"px-3 py-2",children:[e.jsx("code",{children:"--dangerously-bypass-approvals-and-sandbox"})," or ",e.jsx("code",{children:"--full-auto"})]}),e.jsx("td",{className:"px-3 py-2",children:"see permission strategy"})]})})]})}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["environment: symlinks ",e.jsx("code",{className:"text-[var(--accent)]",children:"~/.codex"})," directory if it exists."]})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// configsnapshot fields"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"project-level config fields passed to executors:"}),e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"field"}),e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"type"}),e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"used by"}),e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"description"})]})}),e.jsxs("tbody",{className:"text-[var(--text-secondary)]",children:[e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"agentType"})}),e.jsx("td",{className:"px-3 py-2",children:"claude | cursor | codex"}),e.jsx("td",{className:"px-3 py-2",children:"all"}),e.jsx("td",{className:"px-3 py-2",children:"which cli to spawn"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"allowedTools"})}),e.jsx("td",{className:"px-3 py-2",children:"string | null"}),e.jsx("td",{className:"px-3 py-2",children:"claude, codex"}),e.jsx("td",{className:"px-3 py-2",children:"permission strategy control"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"skillsPath"})}),e.jsx("td",{className:"px-3 py-2",children:"string | null"}),e.jsx("td",{className:"px-3 py-2",children:"claude"}),e.jsx("td",{className:"px-3 py-2",children:"plugin directory path"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"maxTurns"})}),e.jsx("td",{className:"px-3 py-2",children:"number"}),e.jsx("td",{className:"px-3 py-2",children:"stage monitor"}),e.jsx("td",{className:"px-3 py-2",children:"max stage retry loops"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"pipeline"})}),e.jsx("td",{className:"px-3 py-2",children:"string | null"}),e.jsx("td",{className:"px-3 py-2",children:"pipeline compiler"}),e.jsx("td",{className:"px-3 py-2",children:"custom pipeline json (null = default 6-stage)"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"agentEnv"})}),e.jsx("td",{className:"px-3 py-2",children:"string | null"}),e.jsx("td",{className:"px-3 py-2",children:"worker"}),e.jsx("td",{className:"px-3 py-2",children:"extra env vars json merged into pty env"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"setupCommands"})}),e.jsx("td",{className:"px-3 py-2",children:"string | null"}),e.jsx("td",{className:"px-3 py-2",children:"worker"}),e.jsx("td",{className:"px-3 py-2",children:"json array of shell commands run before agent starts (120s timeout each)"})]})]})]})})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// git hooks"}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["worker creates isolated git worktrees for each task. by default, project-level git hooks (husky, lefthook, etc.) are not installed because ",e.jsx("code",{className:"text-[var(--accent)]",children:"npm install"})," is not run automatically. use the project's ",e.jsx("code",{className:"text-[var(--accent)]",children:"setupCommands"})," field to install hooks before the agent starts."]}),e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"hook tool"}),e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"setupCommands"})]})}),e.jsxs("tbody",{className:"text-[var(--text-secondary)]",children:[e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"px-3 py-2",children:"husky"}),e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:'["npm install", "npx husky install"]'})})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"px-3 py-2",children:"lefthook"}),e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:'["npm install", "npx lefthook install"]'})})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"px-3 py-2",children:"simple-git-hooks"}),e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:'["npm install", "npx simple-git-hooks"]'})})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"px-3 py-2",children:"native (.githooks/)"}),e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:'["git config core.hooksPath .githooks"]'})})]})]})]})}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["the lightest option is native git hooks — commit hook scripts to a ",e.jsx("code",{className:"text-[var(--accent)]",children:".githooks/"})," directory in your repo, then use a single ",e.jsx("code",{className:"text-[var(--accent)]",children:"git config"})," command. no ",e.jsx("code",{className:"text-[var(--accent)]",children:"npm install"})," needed."]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// capability detection"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"workers auto-detect installed agent clis on startup and report capabilities to the server. if a capability degrades at runtime (auth failure, rate limit), the server temporarily removes it. it auto-recovers when the next task execution succeeds."}),e.jsx(s,{code:`which claude && claude --version → capability: 'claude'
1
+ import{j as e}from"./index-CTiyb7yJ.js";import{a as s}from"./DocsPrimitives-BrDugynd.js";import"./copy-7k2-aSPF.js";function d(){return e.jsx("div",{className:"mx-auto max-w-4xl px-4 md:px-6 py-8 font-mono lowercase",children:e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// agent cli integration"}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["overlord supports three ai agent clis. each project configures an ",e.jsx("code",{className:"text-[var(--accent)]",children:"agent_type"})," that determines which cli the worker uses to execute tasks. the prompt is written to pty stdin after the cli starts — not passed as a cli argument."]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// supported agents"}),e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"agent"}),e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"cli binary"}),e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"config value"}),e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"subscription"})]})}),e.jsxs("tbody",{className:"text-[var(--text-secondary)]",children:[e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"px-3 py-2",children:"claude code"}),e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"claude"})}),e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"claude"})}),e.jsx("td",{className:"px-3 py-2",children:"anthropic / claude"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"px-3 py-2",children:"cursor agent"}),e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"agent"})}),e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"cursor"})}),e.jsx("td",{className:"px-3 py-2",children:"cursor"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"px-3 py-2",children:"openai codex"}),e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"codex"})}),e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"codex"})}),e.jsx("td",{className:"px-3 py-2",children:"openai"})]})]})]})}),e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] px-3 py-2",children:e.jsxs("p",{className:"text-xs text-[var(--text-secondary)]",children:["// the cursor agent cli binary is ",e.jsx("code",{className:"text-[var(--accent)]",children:"agent"}),", not ",e.jsx("code",{className:"text-[var(--accent)]",children:"cursor"}),". the config value ",e.jsx("code",{className:"text-[var(--accent)]",children:"cursor"})," maps to the ",e.jsx("code",{className:"text-[var(--accent)]",children:"agent"})," binary."]})})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// permission strategy"}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["all agents run in fully automated mode by default. the ",e.jsx("code",{className:"text-[var(--accent)]",children:"allowedTools"})," project config controls the permission level:"]}),e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"allowedTools"}),e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"claude"}),e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"cursor"}),e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"codex"})]})}),e.jsxs("tbody",{className:"text-[var(--text-secondary)]",children:[e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"px-3 py-2 text-[var(--text-muted)]",children:"null (default)"}),e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"--dangerously-skip-permissions"})}),e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"--yolo --approve-mcps"})}),e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"--dangerously-bypass-approvals-and-sandbox"})})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"px-3 py-2 text-[var(--text-muted)]",children:"specific value"}),e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"--allowedTools <value>"})}),e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"--yolo --approve-mcps"})}),e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"--full-auto"})})]})]})]})})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// cli flag mapping"}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h3",{className:"text-xs font-semibold text-[var(--accent)]",children:"claude code"}),e.jsx(s,{code:"claude --dangerously-skip-permissions [--allowedTools <tools>] [--plugin-dir <path>]"}),e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"config field"}),e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"cli flag"}),e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"notes"})]})}),e.jsxs("tbody",{className:"text-[var(--text-secondary)]",children:[e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"allowedTools"})}),e.jsxs("td",{className:"px-3 py-2",children:[e.jsx("code",{children:"--allowedTools"})," or ",e.jsx("code",{children:"--dangerously-skip-permissions"})]}),e.jsx("td",{className:"px-3 py-2",children:"see permission strategy"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"skillsPath"})}),e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{children:"--plugin-dir <path>"})}),e.jsx("td",{className:"px-3 py-2",children:"load custom skills/plugins"})]})]})]})}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["environment: symlinks ",e.jsx("code",{className:"text-[var(--accent)]",children:".claude.json"}),", ",e.jsx("code",{className:"text-[var(--accent)]",children:".credentials.json"}),", ",e.jsx("code",{className:"text-[var(--accent)]",children:"settings.json"})," from real home. pre-trusts worktree in ",e.jsx("code",{className:"text-[var(--accent)]",children:"trustedDirectories"}),"."]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h3",{className:"text-xs font-semibold text-[var(--accent)]",children:"cursor agent"}),e.jsx("div",{className:"rounded-[4px] border border-[var(--warning)]/30 bg-[var(--warning)]/5 px-3 py-2",children:e.jsx("p",{className:"text-xs text-[var(--warning)]",children:'⚠ macos limitation: cursor agent stores auth tokens in macos keychain, which requires a gui login session. headless workers (launchd/ssh) cannot access keychain and will fail with "keychain operation timed out". cursor agent is currently only supported on linux workers.'})}),e.jsx(s,{code:"agent --yolo --approve-mcps"}),e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"flag"}),e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"purpose"})]})}),e.jsxs("tbody",{className:"text-[var(--text-secondary)]",children:[e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{children:"--yolo"})}),e.jsx("td",{className:"px-3 py-2",children:"skip all confirmation prompts (alias for --force)"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"line-through opacity-50",children:"--trust"})}),e.jsx("td",{className:"px-3 py-2",children:"removed — only works in headless/print mode. trust is auto-accepted via pty."})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{children:"--approve-mcps"})}),e.jsx("td",{className:"px-3 py-2",children:"auto-approve mcp servers"})]})]})]})}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["environment: relies on workspace-manager's xdg ",e.jsx("code",{className:"text-[var(--accent)]",children:".config/"})," symlink."]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h3",{className:"text-xs font-semibold text-[var(--accent)]",children:"openai codex"}),e.jsx(s,{code:"codex --dangerously-bypass-approvals-and-sandbox"}),e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"config field"}),e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"cli flag"}),e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"notes"})]})}),e.jsx("tbody",{className:"text-[var(--text-secondary)]",children:e.jsxs("tr",{children:[e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"allowedTools"})}),e.jsxs("td",{className:"px-3 py-2",children:[e.jsx("code",{children:"--dangerously-bypass-approvals-and-sandbox"})," or ",e.jsx("code",{children:"--full-auto"})]}),e.jsx("td",{className:"px-3 py-2",children:"see permission strategy"})]})})]})}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["environment: symlinks ",e.jsx("code",{className:"text-[var(--accent)]",children:"~/.codex"})," directory if it exists."]})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// configsnapshot fields"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"project-level config fields passed to executors:"}),e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"field"}),e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"type"}),e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"used by"}),e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"description"})]})}),e.jsxs("tbody",{className:"text-[var(--text-secondary)]",children:[e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"agentType"})}),e.jsx("td",{className:"px-3 py-2",children:"claude | cursor | codex"}),e.jsx("td",{className:"px-3 py-2",children:"all"}),e.jsx("td",{className:"px-3 py-2",children:"which cli to spawn"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"allowedTools"})}),e.jsx("td",{className:"px-3 py-2",children:"string | null"}),e.jsx("td",{className:"px-3 py-2",children:"claude, codex"}),e.jsx("td",{className:"px-3 py-2",children:"permission strategy control"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"skillsPath"})}),e.jsx("td",{className:"px-3 py-2",children:"string | null"}),e.jsx("td",{className:"px-3 py-2",children:"claude"}),e.jsx("td",{className:"px-3 py-2",children:"plugin directory path"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"maxTurns"})}),e.jsx("td",{className:"px-3 py-2",children:"number"}),e.jsx("td",{className:"px-3 py-2",children:"stage monitor"}),e.jsx("td",{className:"px-3 py-2",children:"max stage retry loops"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"pipeline"})}),e.jsx("td",{className:"px-3 py-2",children:"string | null"}),e.jsx("td",{className:"px-3 py-2",children:"pipeline compiler"}),e.jsx("td",{className:"px-3 py-2",children:"custom pipeline json (null = default 6-stage)"})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"agentEnv"})}),e.jsx("td",{className:"px-3 py-2",children:"string | null"}),e.jsx("td",{className:"px-3 py-2",children:"worker"}),e.jsx("td",{className:"px-3 py-2",children:"extra env vars json merged into pty env"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:"setupCommands"})}),e.jsx("td",{className:"px-3 py-2",children:"string | null"}),e.jsx("td",{className:"px-3 py-2",children:"worker"}),e.jsx("td",{className:"px-3 py-2",children:"json array of shell commands run before agent starts (120s timeout each)"})]})]})]})})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// git hooks"}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["worker creates isolated git worktrees for each task. by default, project-level git hooks (husky, lefthook, etc.) are not installed because ",e.jsx("code",{className:"text-[var(--accent)]",children:"npm install"})," is not run automatically. use the project's ",e.jsx("code",{className:"text-[var(--accent)]",children:"setupCommands"})," field to install hooks before the agent starts."]}),e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"hook tool"}),e.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)]",children:"setupCommands"})]})}),e.jsxs("tbody",{className:"text-[var(--text-secondary)]",children:[e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"px-3 py-2",children:"husky"}),e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:'["npm install", "npx husky install"]'})})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"px-3 py-2",children:"lefthook"}),e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:'["npm install", "npx lefthook install"]'})})]}),e.jsxs("tr",{className:"border-b border-[var(--border)]",children:[e.jsx("td",{className:"px-3 py-2",children:"simple-git-hooks"}),e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:'["npm install", "npx simple-git-hooks"]'})})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"px-3 py-2",children:"native (.githooks/)"}),e.jsx("td",{className:"px-3 py-2",children:e.jsx("code",{className:"text-[var(--accent)]",children:'["git config core.hooksPath .githooks"]'})})]})]})]})}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["the lightest option is native git hooks — commit hook scripts to a ",e.jsx("code",{className:"text-[var(--accent)]",children:".githooks/"})," directory in your repo, then use a single ",e.jsx("code",{className:"text-[var(--accent)]",children:"git config"})," command. no ",e.jsx("code",{className:"text-[var(--accent)]",children:"npm install"})," needed."]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// capability detection"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"workers auto-detect installed agent clis on startup and report capabilities to the server. if a capability degrades at runtime (auth failure, rate limit), the server temporarily removes it. it auto-recovers when the next task execution succeeds."}),e.jsx(s,{code:`which claude && claude --version → capability: 'claude'
2
2
  which agent && agent --version → capability: 'cursor'
3
3
  which codex && codex --version → capability: 'codex'`})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// default pipeline"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"the default pipeline has 7 stages:"}),e.jsx("div",{className:"flex flex-wrap items-center gap-1 text-xs",children:["implement","test","verify","review","simplify","rebase","submit"].map((a,t)=>e.jsxs("span",{children:[e.jsx("code",{className:"rounded-[4px] bg-[var(--bg-primary)] px-2 py-0.5 text-[var(--accent)]",children:a}),t<6&&e.jsx("span",{className:"mx-1 text-[var(--text-muted)]",children:"→"})]},a))}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["the ",e.jsx("code",{className:"text-[var(--accent)]",children:"verify"})," and ",e.jsx("code",{className:"text-[var(--accent)]",children:"review"})," stages loop back to ",e.jsx("code",{className:"text-[var(--accent)]",children:"implement"})," on failure (max 3 loops). the ",e.jsx("code",{className:"text-[var(--accent)]",children:"simplify"})," and ",e.jsx("code",{className:"text-[var(--accent)]",children:"rebase"})," stages loop back to themselves on failure (max 3 loops)."]})]})]})})}export{d as default};
@@ -1 +1 @@
1
- import{f as d,a as o,x as p,r as n,j as t}from"./index-DpFOWbFQ.js";import{Q as c}from"./QuickAuth-BJQDPb8y.js";import{P as h}from"./plus-7GEqLtYy.js";import"./copy-BilNgG66.js";const l={GET:"text-green-400",POST:"text-blue-400",PUT:"text-yellow-400",DELETE:"text-red-400"},m=[{title:"authentication",prefix:"/api/auth",endpoints:[{method:"POST",path:"/login",description:"authenticate with username + password (optional totpCode)",auth:"none",body:'{ "username": "string", "password": "string", "totpCode?": "string" }',response:'{ "accessToken": "string", "refreshToken": "string" }'},{method:"POST",path:"/refresh",description:"refresh access token (rotates refresh token)",auth:"none",body:'{ "refreshToken": "string" }',response:'{ "accessToken": "string", "refreshToken": "string" }'},{method:"POST",path:"/logout",description:"invalidate refresh token",auth:"jwt",body:'{ "refreshToken": "string" }'}]},{title:"tasks",prefix:"/api/web/tasks",endpoints:[{method:"GET",path:"",description:"list tasks with optional filters",auth:"jwt",response:'[ { "id": 1, "description": "...", "status": "RUNNING", ... } ]'},{method:"POST",path:"",description:"create a new task (name is AI-generated if LLM is configured, otherwise null)",auth:"jwt",body:'{ "projectKey": "string", "description": "string", "workerId?": "string", "taskType?": "feat|fix|refactor|docs|chore", "branchSlug?": "string", "targetBranch?": "string" }',response:'{ "id": 1, "description": "...", "name": "string | null", "branchSlug": "string | null", "status": "PENDING", ... }'},{method:"GET",path:"/:id",description:"get task details",auth:"jwt"},{method:"POST",path:"/:id/cancel",description:"cancel a running task",auth:"jwt"},{method:"POST",path:"/:id/retry",description:"retry a failed or cancelled task",auth:"jwt"},{method:"POST",path:"/:id/confirm-stage",description:"confirm/choose/input for suspended stage",auth:"jwt",body:'{ "stageIndex": "number", "result": "string" }'},{method:"POST",path:"/:id/pty-token",description:"get pty websocket token",auth:"jwt"}]},{title:"workers",prefix:"/api/web/workers",endpoints:[{method:"GET",path:"",description:"list all workers",auth:"jwt"},{method:"GET",path:"/:id",description:"get worker details",auth:"jwt"},{method:"GET",path:"/:id/tasks",description:"list tasks assigned to a worker",auth:"jwt"},{method:"POST",path:"/:id/drain",description:"start draining a worker",auth:"jwt"},{method:"POST",path:"/:id/undrain",description:"cancel worker drain",auth:"jwt"}]},{title:"projects",prefix:"/api/web/projects",endpoints:[{method:"GET",path:"",description:"list all projects",auth:"jwt"},{method:"GET",path:"/:key",description:"get project details",auth:"jwt"}]},{title:"profile",prefix:"/api/web/profile",endpoints:[{method:"GET",path:"",description:"get current user profile",auth:"jwt"},{method:"PUT",path:"",description:"update profile (gitName, gitEmail)",auth:"jwt",body:'{ "gitName?": "string", "gitEmail?": "string" }'},{method:"PUT",path:"/password",description:"change password",auth:"jwt",body:'{ "currentPassword": "string", "newPassword": "string" }'},{method:"POST",path:"/totp/setup",description:"initialize totp setup",auth:"jwt"},{method:"POST",path:"/totp/verify",description:"verify totp setup code",auth:"jwt",body:'{ "code": "string" }'},{method:"GET",path:"/tokens",description:"list personal access tokens",auth:"jwt"},{method:"POST",path:"/tokens",description:"create a personal access token",auth:"jwt",body:'{ "label": "string", "expiresAt?": "string" }'},{method:"POST",path:"/tokens/:id/revoke",description:"revoke a token",auth:"jwt"},{method:"POST",path:"/bind-platform",description:"link a chat platform account using a one-time bind token",auth:"jwt",body:'{ "token": "string" }',response:'{ "success": true, "platform": "lark" }'}]},{title:"workspaces & tunnels",prefix:"/api/web",endpoints:[{method:"GET",path:"/workspaces/:taskId",description:"get workspace for a task",auth:"jwt"},{method:"POST",path:"/workspace-tunnel/:taskId/start",description:"start a cursor remote tunnel",auth:"jwt"},{method:"POST",path:"/workspace-tunnel/:taskId/stop",description:"stop a running tunnel",auth:"jwt"},{method:"GET",path:"/workspace-tunnel/:taskId/status",description:"get tunnel status",auth:"jwt"}]},{title:"dashboard",prefix:"/api/web/dashboard",endpoints:[{method:"GET",path:"/stats",description:"get dashboard statistics",auth:"jwt"},{method:"GET",path:"/recent-tasks",description:"get recent tasks for dashboard",auth:"jwt"},{method:"GET",path:"/recent-activity",description:"get recent activity feed",auth:"jwt"}]},{title:"notifications",prefix:"/api/web/notifications",endpoints:[{method:"GET",path:"",description:"list notifications with cursor pagination",auth:"jwt"},{method:"POST",path:"/:id/read",description:"mark a notification as read",auth:"jwt"},{method:"POST",path:"/read-all",description:"mark all notifications as read",auth:"jwt"}]},{title:"search",prefix:"/api/web",endpoints:[{method:"GET",path:"/search?q=query",description:"global search across tasks, workers, projects",auth:"jwt"}]},{title:"admin — developers",prefix:"/api/admin/developers",endpoints:[{method:"GET",path:"",description:"list all developers",auth:"jwt"},{method:"POST",path:"",description:"create a developer",auth:"jwt",body:'{ "name": "string", "password": "string", "role": "string", "gitName": "string", "gitEmail": "string" }'},{method:"PUT",path:"/:id",description:"update developer",auth:"jwt"},{method:"PUT",path:"/:id/reset-totp",description:"reset developer totp",auth:"jwt"}]},{title:"admin — projects",prefix:"/api/admin/projects",endpoints:[{method:"GET",path:"",description:"list all projects",auth:"jwt"},{method:"POST",path:"",description:"create a project",auth:"jwt"},{method:"PUT",path:"/:key",description:"update project (including pipeline)",auth:"jwt"},{method:"DELETE",path:"/:key",description:"delete a project",auth:"jwt"},{method:"GET",path:"/:key/members",description:"get project members",auth:"jwt"},{method:"POST",path:"/:key/members",description:"add project member",auth:"jwt"},{method:"DELETE",path:"/:key/members?developerId=N",description:"remove project member",auth:"jwt"}]},{title:"admin — worker tokens",prefix:"/api/admin/worker-tokens",endpoints:[{method:"GET",path:"",description:"list all worker enrollment tokens",auth:"jwt"},{method:"POST",path:"",description:"generate a new worker token",auth:"jwt"},{method:"POST",path:"/:id/revoke",description:"revoke a worker token",auth:"jwt"},{method:"GET",path:"/:id/status",description:"get token status and linked worker",auth:"jwt"}]},{title:"admin — workers",prefix:"/api/admin/workers",endpoints:[{method:"GET",path:"",description:"list all workers (admin)",auth:"jwt"},{method:"PUT",path:"/:id",description:"update worker status",auth:"jwt",body:'{ "status?": "string" }'}]},{title:"admin — bots",prefix:"/api/admin/bots",endpoints:[{method:"GET",path:"",description:"list bot instances",auth:"jwt"},{method:"POST",path:"",description:"create a bot instance",auth:"jwt"},{method:"GET",path:"/:id/bindings",description:"get group bindings for a bot",auth:"jwt"},{method:"POST",path:"/:id/bindings",description:"create a group binding",auth:"jwt"},{method:"DELETE",path:"/:id/bindings",description:"delete a group binding",auth:"jwt"}]},{title:"admin — audit & settings",prefix:"/api/admin",endpoints:[{method:"GET",path:"/audit-logs",description:"query audit log with filters",auth:"jwt"},{method:"GET",path:"/settings",description:"get all system settings",auth:"jwt"},{method:"PUT",path:"/settings",description:"update system settings",auth:"jwt"}]},{title:"websocket",prefix:"",endpoints:[{method:"GET",path:"WS /ws/pty/:taskId",description:'pty terminal websocket — first obtain a channel token via POST /api/web/tasks/:taskId/pty-token, then send an auth frame after connection: { type: "auth", token: "<jwt>", channelToken: "<channel-token>" }',auth:"jwt"},{method:"GET",path:"WS /api/workers/pty/:taskId",description:'worker pty websocket — auth via frame: { type: "auth", workerJwt: "<worker-jwt>", channelToken: "<channel-token>" }',auth:"worker-token"}]}];function u({ep:e,prefix:a}){const[s,r]=n.useState(!1),{t:i}=o();return t.jsxs("div",{className:"border-b border-[var(--border-row)] last:border-b-0",children:[t.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 sm:gap-3 px-3 md:px-4 py-2.5 text-left transition-colors hover:bg-[var(--bg-input)] min-w-0",onClick:()=>r(!s),children:[t.jsx("span",{className:`w-12 shrink-0 text-xs font-bold ${l[e.method]}`,children:e.method}),t.jsxs("code",{className:"flex-1 text-xs text-[var(--text-primary)] truncate min-w-0",children:[a,e.path]}),t.jsxs("span",{className:"text-xs text-[var(--text-muted)] hidden sm:inline truncate max-w-[200px]",children:["// ",e.description]})]}),s&&t.jsxs("div",{className:"border-t border-[var(--border-row)] bg-[var(--bg-primary)] px-3 md:px-4 py-3 space-y-2",children:[t.jsxs("p",{className:"text-xs text-[var(--text-secondary)]",children:["// ",e.description]}),t.jsxs("div",{className:"flex items-center gap-2 text-[11px]",children:[t.jsx("span",{className:"text-[var(--text-muted)]",children:"auth:"}),t.jsx("span",{className:e.auth==="none"?"text-[var(--text-muted)]":"text-[var(--accent)]",children:e.auth})]}),e.body&&t.jsxs("div",{children:[t.jsx("p",{className:"text-[11px] uppercase tracking-wider text-[var(--text-muted)] mb-1",children:i("docs.request_body")}),t.jsx("pre",{className:"rounded-[4px] bg-[var(--bg-card)] px-3 py-2 text-xs text-[var(--text-secondary)] overflow-x-auto",children:e.body})]}),e.response&&t.jsxs("div",{children:[t.jsx("p",{className:"text-[11px] uppercase tracking-wider text-[var(--text-muted)] mb-1",children:i("docs.response")}),t.jsx("pre",{className:"rounded-[4px] bg-[var(--bg-card)] px-3 py-2 text-xs text-[var(--text-secondary)] overflow-x-auto",children:e.response})]})]})]})}function g(){const e=d(),{t:a}=o();return p(n.useMemo(()=>t.jsxs("button",{onClick:()=>e("/access-tokens"),className:"flex items-center gap-1.5 rounded-[4px] bg-[var(--accent)] px-3 py-1.5 text-xs font-mono text-black transition-opacity hover:opacity-90",children:[t.jsx(h,{className:"h-3.5 w-3.5"}),a("access_tokens.create_token")]}),[e,a])),t.jsxs("div",{className:"mx-auto max-w-4xl px-4 md:px-6 py-8 font-mono lowercase",children:[t.jsx("div",{className:"mb-8",children:t.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:a("docs.api_base_url_desc",{url:"http://localhost:9000"})})}),t.jsx(c,{mode:"api"}),t.jsxs("div",{className:"mb-8 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-2",children:[t.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:a("docs.authentication")}),t.jsxs("div",{className:"flex items-start gap-3",children:[t.jsx("code",{className:"shrink-0 text-xs text-[var(--accent)]",children:"jwt"}),t.jsxs("span",{className:"text-xs text-[var(--text-secondary)]",children:["obtained via /api/auth/login — pass as ",t.jsx("code",{children:"authorization: bearer <token>"})]})]}),t.jsxs("div",{className:"flex items-start gap-3",children:[t.jsx("code",{className:"shrink-0 text-xs text-[var(--accent)]",children:"pat"}),t.jsx("span",{className:"text-xs text-[var(--text-secondary)]",children:"personal access token — same header format, for cli/api usage"})]}),t.jsxs("div",{className:"flex items-start gap-3",children:[t.jsx("code",{className:"shrink-0 text-xs text-yellow-400",children:"worker-token"}),t.jsx("span",{className:"text-xs text-[var(--text-secondary)]",children:"enrollment token for worker registration — used during initial handshake"})]})]}),t.jsx("div",{className:"space-y-6",children:m.map(s=>t.jsxs("div",{children:[t.jsxs("h2",{className:"mb-2 text-sm text-[var(--accent)]",children:["> ",s.title]}),t.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:s.endpoints.map((r,i)=>t.jsx(u,{ep:r,prefix:s.prefix},`${r.method}-${r.path}-${i}`))})]},s.title))})]})}export{g as default};
1
+ import{f as d,a as o,x as p,r as n,j as t}from"./index-CTiyb7yJ.js";import{Q as c}from"./QuickAuth-BzNdCwsM.js";import{P as h}from"./plus-Ce55RcwK.js";import"./copy-7k2-aSPF.js";const l={GET:"text-green-400",POST:"text-blue-400",PUT:"text-yellow-400",DELETE:"text-red-400"},m=[{title:"authentication",prefix:"/api/auth",endpoints:[{method:"POST",path:"/login",description:"authenticate with username + password (optional totpCode)",auth:"none",body:'{ "username": "string", "password": "string", "totpCode?": "string" }',response:'{ "accessToken": "string", "refreshToken": "string" }'},{method:"POST",path:"/refresh",description:"refresh access token (rotates refresh token)",auth:"none",body:'{ "refreshToken": "string" }',response:'{ "accessToken": "string", "refreshToken": "string" }'},{method:"POST",path:"/logout",description:"invalidate refresh token",auth:"jwt",body:'{ "refreshToken": "string" }'}]},{title:"tasks",prefix:"/api/web/tasks",endpoints:[{method:"GET",path:"",description:"list tasks with optional filters",auth:"jwt",response:'[ { "id": 1, "description": "...", "status": "RUNNING", ... } ]'},{method:"POST",path:"",description:"create a new task (name is AI-generated if LLM is configured, otherwise null)",auth:"jwt",body:'{ "projectKey": "string", "description": "string", "workerId?": "string", "taskType?": "feat|fix|refactor|docs|chore", "branchSlug?": "string", "targetBranch?": "string" }',response:'{ "id": 1, "description": "...", "name": "string | null", "branchSlug": "string | null", "status": "PENDING", ... }'},{method:"GET",path:"/:id",description:"get task details",auth:"jwt"},{method:"POST",path:"/:id/cancel",description:"cancel a running task",auth:"jwt"},{method:"POST",path:"/:id/retry",description:"retry a failed or cancelled task",auth:"jwt"},{method:"POST",path:"/:id/confirm-stage",description:"confirm/choose/input for suspended stage",auth:"jwt",body:'{ "stageIndex": "number", "result": "string" }'},{method:"POST",path:"/:id/pty-token",description:"get pty websocket token",auth:"jwt"}]},{title:"workers",prefix:"/api/web/workers",endpoints:[{method:"GET",path:"",description:"list all workers",auth:"jwt"},{method:"GET",path:"/:id",description:"get worker details",auth:"jwt"},{method:"GET",path:"/:id/tasks",description:"list tasks assigned to a worker",auth:"jwt"},{method:"POST",path:"/:id/drain",description:"start draining a worker",auth:"jwt"},{method:"POST",path:"/:id/undrain",description:"cancel worker drain",auth:"jwt"}]},{title:"projects",prefix:"/api/web/projects",endpoints:[{method:"GET",path:"",description:"list all projects",auth:"jwt"},{method:"GET",path:"/:key",description:"get project details",auth:"jwt"}]},{title:"profile",prefix:"/api/web/profile",endpoints:[{method:"GET",path:"",description:"get current user profile",auth:"jwt"},{method:"PUT",path:"",description:"update profile (gitName, gitEmail)",auth:"jwt",body:'{ "gitName?": "string", "gitEmail?": "string" }'},{method:"PUT",path:"/password",description:"change password",auth:"jwt",body:'{ "currentPassword": "string", "newPassword": "string" }'},{method:"POST",path:"/totp/setup",description:"initialize totp setup",auth:"jwt"},{method:"POST",path:"/totp/verify",description:"verify totp setup code",auth:"jwt",body:'{ "code": "string" }'},{method:"GET",path:"/tokens",description:"list personal access tokens",auth:"jwt"},{method:"POST",path:"/tokens",description:"create a personal access token",auth:"jwt",body:'{ "label": "string", "expiresAt?": "string" }'},{method:"POST",path:"/tokens/:id/revoke",description:"revoke a token",auth:"jwt"},{method:"POST",path:"/bind-platform",description:"link a chat platform account using a one-time bind token",auth:"jwt",body:'{ "token": "string" }',response:'{ "success": true, "platform": "lark" }'}]},{title:"workspaces & tunnels",prefix:"/api/web",endpoints:[{method:"GET",path:"/workspaces/:taskId",description:"get workspace for a task",auth:"jwt"},{method:"POST",path:"/workspace-tunnel/:taskId/start",description:"start a cursor remote tunnel",auth:"jwt"},{method:"POST",path:"/workspace-tunnel/:taskId/stop",description:"stop a running tunnel",auth:"jwt"},{method:"GET",path:"/workspace-tunnel/:taskId/status",description:"get tunnel status",auth:"jwt"}]},{title:"dashboard",prefix:"/api/web/dashboard",endpoints:[{method:"GET",path:"/stats",description:"get dashboard statistics",auth:"jwt"},{method:"GET",path:"/recent-tasks",description:"get recent tasks for dashboard",auth:"jwt"},{method:"GET",path:"/recent-activity",description:"get recent activity feed",auth:"jwt"}]},{title:"notifications",prefix:"/api/web/notifications",endpoints:[{method:"GET",path:"",description:"list notifications with cursor pagination",auth:"jwt"},{method:"POST",path:"/:id/read",description:"mark a notification as read",auth:"jwt"},{method:"POST",path:"/read-all",description:"mark all notifications as read",auth:"jwt"}]},{title:"search",prefix:"/api/web",endpoints:[{method:"GET",path:"/search?q=query",description:"global search across tasks, workers, projects",auth:"jwt"}]},{title:"admin — developers",prefix:"/api/admin/developers",endpoints:[{method:"GET",path:"",description:"list all developers",auth:"jwt"},{method:"POST",path:"",description:"create a developer",auth:"jwt",body:'{ "name": "string", "password": "string", "role": "string", "gitName": "string", "gitEmail": "string" }'},{method:"PUT",path:"/:id",description:"update developer",auth:"jwt"},{method:"PUT",path:"/:id/reset-totp",description:"reset developer totp",auth:"jwt"}]},{title:"admin — projects",prefix:"/api/admin/projects",endpoints:[{method:"GET",path:"",description:"list all projects",auth:"jwt"},{method:"POST",path:"",description:"create a project",auth:"jwt"},{method:"PUT",path:"/:key",description:"update project (including pipeline)",auth:"jwt"},{method:"DELETE",path:"/:key",description:"delete a project",auth:"jwt"},{method:"GET",path:"/:key/members",description:"get project members",auth:"jwt"},{method:"POST",path:"/:key/members",description:"add project member",auth:"jwt"},{method:"DELETE",path:"/:key/members?developerId=N",description:"remove project member",auth:"jwt"}]},{title:"admin — worker tokens",prefix:"/api/admin/worker-tokens",endpoints:[{method:"GET",path:"",description:"list all worker enrollment tokens",auth:"jwt"},{method:"POST",path:"",description:"generate a new worker token",auth:"jwt"},{method:"POST",path:"/:id/revoke",description:"revoke a worker token",auth:"jwt"},{method:"GET",path:"/:id/status",description:"get token status and linked worker",auth:"jwt"}]},{title:"admin — workers",prefix:"/api/admin/workers",endpoints:[{method:"GET",path:"",description:"list all workers (admin)",auth:"jwt"},{method:"PUT",path:"/:id",description:"update worker status",auth:"jwt",body:'{ "status?": "string" }'}]},{title:"admin — bots",prefix:"/api/admin/bots",endpoints:[{method:"GET",path:"",description:"list bot instances",auth:"jwt"},{method:"POST",path:"",description:"create a bot instance",auth:"jwt"},{method:"GET",path:"/:id/bindings",description:"get group bindings for a bot",auth:"jwt"},{method:"POST",path:"/:id/bindings",description:"create a group binding",auth:"jwt"},{method:"DELETE",path:"/:id/bindings",description:"delete a group binding",auth:"jwt"},{method:"PUT",path:"/:id/bindings/default",description:"set the default project for command routing in one chat",auth:"jwt",body:'{ "platformChatId": "string", "projectKey": "string" }'},{method:"PUT",path:"/:id/bindings/notification-default",description:"set the notify-default chat for automation summaries for one project",auth:"jwt",body:'{ "platformChatId": "string", "projectKey": "string" }'}]},{title:"admin — audit & settings",prefix:"/api/admin",endpoints:[{method:"GET",path:"/audit-logs",description:"query audit log with filters",auth:"jwt"},{method:"GET",path:"/settings",description:"get all system settings",auth:"jwt"},{method:"PUT",path:"/settings",description:"update system settings",auth:"jwt"}]},{title:"websocket",prefix:"",endpoints:[{method:"GET",path:"WS /ws/pty/:taskId",description:'pty terminal websocket — first obtain a channel token via POST /api/web/tasks/:taskId/pty-token, then send an auth frame after connection: { type: "auth", token: "<jwt>", channelToken: "<channel-token>" }',auth:"jwt"},{method:"GET",path:"WS /api/workers/pty/:taskId",description:'worker pty websocket — auth via frame: { type: "auth", workerJwt: "<worker-jwt>", channelToken: "<channel-token>" }',auth:"worker-token"}]}];function u({ep:e,prefix:a}){const[s,i]=n.useState(!1),{t:r}=o();return t.jsxs("div",{className:"border-b border-[var(--border-row)] last:border-b-0",children:[t.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 sm:gap-3 px-3 md:px-4 py-2.5 text-left transition-colors hover:bg-[var(--bg-input)] min-w-0",onClick:()=>i(!s),children:[t.jsx("span",{className:`w-12 shrink-0 text-xs font-bold ${l[e.method]}`,children:e.method}),t.jsxs("code",{className:"flex-1 text-xs text-[var(--text-primary)] truncate min-w-0",children:[a,e.path]}),t.jsxs("span",{className:"text-xs text-[var(--text-muted)] hidden sm:inline truncate max-w-[200px]",children:["// ",e.description]})]}),s&&t.jsxs("div",{className:"border-t border-[var(--border-row)] bg-[var(--bg-primary)] px-3 md:px-4 py-3 space-y-2",children:[t.jsxs("p",{className:"text-xs text-[var(--text-secondary)]",children:["// ",e.description]}),t.jsxs("div",{className:"flex items-center gap-2 text-[11px]",children:[t.jsx("span",{className:"text-[var(--text-muted)]",children:"auth:"}),t.jsx("span",{className:e.auth==="none"?"text-[var(--text-muted)]":"text-[var(--accent)]",children:e.auth})]}),e.body&&t.jsxs("div",{children:[t.jsx("p",{className:"text-[11px] uppercase tracking-wider text-[var(--text-muted)] mb-1",children:r("docs.request_body")}),t.jsx("pre",{className:"rounded-[4px] bg-[var(--bg-card)] px-3 py-2 text-xs text-[var(--text-secondary)] overflow-x-auto",children:e.body})]}),e.response&&t.jsxs("div",{children:[t.jsx("p",{className:"text-[11px] uppercase tracking-wider text-[var(--text-muted)] mb-1",children:r("docs.response")}),t.jsx("pre",{className:"rounded-[4px] bg-[var(--bg-card)] px-3 py-2 text-xs text-[var(--text-secondary)] overflow-x-auto",children:e.response})]})]})]})}function g(){const e=d(),{t:a}=o();return p(n.useMemo(()=>t.jsxs("button",{onClick:()=>e("/access-tokens"),className:"flex items-center gap-1.5 rounded-[4px] bg-[var(--accent)] px-3 py-1.5 text-xs font-mono text-black transition-opacity hover:opacity-90",children:[t.jsx(h,{className:"h-3.5 w-3.5"}),a("access_tokens.create_token")]}),[e,a])),t.jsxs("div",{className:"mx-auto max-w-4xl px-4 md:px-6 py-8 font-mono lowercase",children:[t.jsx("div",{className:"mb-8",children:t.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:a("docs.api_base_url_desc",{url:"http://localhost:9000"})})}),t.jsx(c,{mode:"api"}),t.jsxs("div",{className:"mb-8 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-2",children:[t.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:a("docs.authentication")}),t.jsxs("div",{className:"flex items-start gap-3",children:[t.jsx("code",{className:"shrink-0 text-xs text-[var(--accent)]",children:"jwt"}),t.jsxs("span",{className:"text-xs text-[var(--text-secondary)]",children:["obtained via /api/auth/login — pass as ",t.jsx("code",{children:"authorization: bearer <token>"})]})]}),t.jsxs("div",{className:"flex items-start gap-3",children:[t.jsx("code",{className:"shrink-0 text-xs text-[var(--accent)]",children:"pat"}),t.jsx("span",{className:"text-xs text-[var(--text-secondary)]",children:"personal access token — same header format, for cli/api usage"})]}),t.jsxs("div",{className:"flex items-start gap-3",children:[t.jsx("code",{className:"shrink-0 text-xs text-yellow-400",children:"worker-token"}),t.jsx("span",{className:"text-xs text-[var(--text-secondary)]",children:"enrollment token for worker registration — used during initial handshake"})]})]}),t.jsx("div",{className:"space-y-6",children:m.map(s=>t.jsxs("div",{children:[t.jsxs("h2",{className:"mb-2 text-sm text-[var(--accent)]",children:["> ",s.title]}),t.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:s.endpoints.map((i,r)=>t.jsx(u,{ep:i,prefix:s.prefix},`${i.method}-${i.path}-${r}`))})]},s.title))})]})}export{g as default};
@@ -1,4 +1,4 @@
1
- import{j as e}from"./index-DpFOWbFQ.js";import{C as s}from"./DocsPrimitives-DxxQvd4A.js";import"./copy-BilNgG66.js";const r=` ┌──────────────────┐
1
+ import{j as e}from"./index-CTiyb7yJ.js";import{C as s}from"./DocsPrimitives-BrDugynd.js";import"./copy-7k2-aSPF.js";const r=` ┌──────────────────┐
2
2
  │ Developer │
3
3
  │ (create / attach) │
4
4
  └──┬─────┬──────┬──┘
@@ -1 +1 @@
1
- import{a as C,r,h as S,j as e,y as k}from"./index-DpFOWbFQ.js";import{S as L}from"./Select-Dgtvdi2n.js";import{E}from"./EmptyState-DQ0fOTKY.js";import{T}from"./Skeleton-CwwH6ktS.js";import{S as A}from"./scroll-text-tbcoJ-t_.js";import{C as F}from"./chevron-left-BoAE9yoT.js";import{C as P}from"./chevron-right-DdNeU6u1.js";import"./chevron-down-B-IybQE8.js";function q(){const{t:a}=C(),h=[{value:"",label:a("admin.all_actions")},{value:"login",label:a("admin.action_login")},{value:"logout",label:a("admin.action_logout")},{value:"create",label:a("admin.action_create")},{value:"update",label:a("admin.action_update")},{value:"delete",label:a("admin.action_delete")},{value:"revoke",label:a("admin.action_revoke")},{value:"reset_2fa",label:a("admin.action_reset_2fa")},{value:"generate_token",label:a("admin.action_generate_token")}],[n,b]=r.useState([]),[f,p]=r.useState(!0),[i,j]=r.useState(""),[o,g]=r.useState(""),[N,c]=r.useState(void 0),[x,m]=r.useState([]),[l,w]=r.useState(void 0),d=r.useCallback(async t=>{try{p(!0);const s={limit:"50"};t&&(s.cursor=t),i&&(s.action=i),o&&(s.user=o);const v=await S.get("admin/audit-logs",{searchParams:s}).json();b(v.data),w(v.nextCursor)}catch{}finally{p(!1)}},[i,o]);r.useEffect(()=>{c(void 0),m([]),d()},[d]);function _(){l&&(m(t=>[...t,N??""]),c(l),d(l))}function y(){if(x.length===0)return;const t=[...x],s=t.pop();m(t),c(s||void 0),d(s||void 0)}function u(t){return t.startsWith("delete")||t==="revoke"?"text-[var(--destructive)]":t.startsWith("create")||t==="generate_token"?"text-[var(--accent)]":t.startsWith("update")||t==="reset_2fa"?"text-[var(--warning)]":t==="login"?"text-[var(--info)]":"text-[var(--text-secondary)]"}return e.jsxs("div",{className:"font-mono",children:[e.jsxs("div",{className:"mb-6",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:a("admin.audit_title")}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:a("admin.audit_subtitle")})]}),e.jsxs("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center",children:[e.jsx(L,{value:i,onChange:j,options:h}),e.jsxs("div",{className:"relative w-full max-w-xs",children:[e.jsx(k,{className:"absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-[var(--text-muted)]"}),e.jsx("input",{type:"text",placeholder:a("admin.filter_by_user"),value:o,onChange:t=>g(t.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] py-1.5 pl-8 pr-3 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]})]}),f?e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4",children:e.jsx(T,{rows:5})}):n.length===0?e.jsx(E,{icon:A,title:a("admin.no_audit_entries"),description:a("admin.audit_logs_appear")}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"hidden md:block overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)] text-left text-[var(--text-muted)]",children:[e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("admin.timestamp")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("admin.user_id")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("admin.action")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("admin.resource")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("admin.detail")}),e.jsx("th",{className:"pb-2 font-normal",children:a("admin.ip")})]})}),e.jsx("tbody",{children:n.map(t=>e.jsxs("tr",{className:"border-b border-[var(--border-row)] hover:bg-white/[0.02] transition-colors",children:[e.jsx("td",{className:"whitespace-nowrap py-2.5 pr-4 text-[var(--text-muted)]",children:new Date(t.createdAt).toLocaleString()}),e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-secondary)]",children:t.userId}),e.jsx("td",{className:"py-2.5 pr-4",children:e.jsx("span",{className:u(t.action),children:t.action})}),e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-secondary)]",children:t.resource}),e.jsx("td",{className:"max-w-xs truncate py-2.5 pr-4 text-[var(--text-muted)]",children:t.detail}),e.jsx("td",{className:"py-2.5 text-[var(--text-muted)]",children:t.ip})]},t.id))})]})}),e.jsx("div",{className:"md:hidden space-y-3",children:n.map(t=>e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-3",children:[e.jsx("div",{className:"text-[11px] text-[var(--text-muted)] mb-1",children:new Date(t.createdAt).toLocaleString()}),e.jsxs("div",{className:"flex min-w-0 items-center gap-2 mb-1",children:[e.jsx("span",{className:`shrink-0 text-[11px] ${u(t.action)}`,children:t.action}),e.jsx("span",{className:"min-w-0 truncate text-[11px] text-[var(--text-secondary)]",children:t.resource})]}),e.jsx("div",{className:"text-[11px] text-[var(--text-muted)] truncate",children:t.detail}),e.jsxs("div",{className:"flex items-center gap-3 mt-1 text-[11px] text-[var(--text-muted)]",children:[e.jsxs("span",{children:["User: ",t.userId]}),e.jsx("span",{children:t.ip})]})]},t.id))}),e.jsxs("div",{className:"mt-4 flex items-center justify-between",children:[e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:a("admin.showing_entries",{count:String(n.length)})}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("button",{type:"button",disabled:x.length===0,className:"flex items-center justify-center gap-1 rounded-[4px] border border-[var(--border)] px-2.5 py-1 min-h-[44px] min-w-[44px] md:min-h-0 md:min-w-0 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] hover:border-[var(--accent)] disabled:opacity-30 disabled:cursor-not-allowed transition-colors",onClick:y,children:[e.jsx(F,{className:"h-3.5 w-3.5"}),a("common.previous")]}),e.jsxs("button",{type:"button",disabled:!l,className:"flex items-center justify-center gap-1 rounded-[4px] border border-[var(--border)] px-2.5 py-1 min-h-[44px] min-w-[44px] md:min-h-0 md:min-w-0 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] hover:border-[var(--accent)] disabled:opacity-30 disabled:cursor-not-allowed transition-colors",onClick:_,children:[a("common.next"),e.jsx(P,{className:"h-3.5 w-3.5"})]})]})]})]})]})}export{q as default};
1
+ import{a as C,r,h as S,j as e,y as k}from"./index-CTiyb7yJ.js";import{S as L}from"./Select-O36ifNjw.js";import{E}from"./EmptyState-D5CEvlzr.js";import{T}from"./Skeleton-C3hKV7kJ.js";import{S as A}from"./scroll-text-B0k4ESJb.js";import{C as F}from"./chevron-left-DNFZom2A.js";import{C as P}from"./chevron-right-k9Y539yL.js";import"./chevron-down-Bm0RXzLE.js";function q(){const{t:a}=C(),h=[{value:"",label:a("admin.all_actions")},{value:"login",label:a("admin.action_login")},{value:"logout",label:a("admin.action_logout")},{value:"create",label:a("admin.action_create")},{value:"update",label:a("admin.action_update")},{value:"delete",label:a("admin.action_delete")},{value:"revoke",label:a("admin.action_revoke")},{value:"reset_2fa",label:a("admin.action_reset_2fa")},{value:"generate_token",label:a("admin.action_generate_token")}],[n,b]=r.useState([]),[f,p]=r.useState(!0),[i,j]=r.useState(""),[o,g]=r.useState(""),[N,c]=r.useState(void 0),[x,m]=r.useState([]),[l,w]=r.useState(void 0),d=r.useCallback(async t=>{try{p(!0);const s={limit:"50"};t&&(s.cursor=t),i&&(s.action=i),o&&(s.user=o);const v=await S.get("admin/audit-logs",{searchParams:s}).json();b(v.data),w(v.nextCursor)}catch{}finally{p(!1)}},[i,o]);r.useEffect(()=>{c(void 0),m([]),d()},[d]);function _(){l&&(m(t=>[...t,N??""]),c(l),d(l))}function y(){if(x.length===0)return;const t=[...x],s=t.pop();m(t),c(s||void 0),d(s||void 0)}function u(t){return t.startsWith("delete")||t==="revoke"?"text-[var(--destructive)]":t.startsWith("create")||t==="generate_token"?"text-[var(--accent)]":t.startsWith("update")||t==="reset_2fa"?"text-[var(--warning)]":t==="login"?"text-[var(--info)]":"text-[var(--text-secondary)]"}return e.jsxs("div",{className:"font-mono",children:[e.jsxs("div",{className:"mb-6",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:a("admin.audit_title")}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:a("admin.audit_subtitle")})]}),e.jsxs("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center",children:[e.jsx(L,{value:i,onChange:j,options:h}),e.jsxs("div",{className:"relative w-full max-w-xs",children:[e.jsx(k,{className:"absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-[var(--text-muted)]"}),e.jsx("input",{type:"text",placeholder:a("admin.filter_by_user"),value:o,onChange:t=>g(t.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] py-1.5 pl-8 pr-3 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]})]}),f?e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4",children:e.jsx(T,{rows:5})}):n.length===0?e.jsx(E,{icon:A,title:a("admin.no_audit_entries"),description:a("admin.audit_logs_appear")}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"hidden md:block overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)] text-left text-[var(--text-muted)]",children:[e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("admin.timestamp")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("admin.user_id")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("admin.action")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("admin.resource")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:a("admin.detail")}),e.jsx("th",{className:"pb-2 font-normal",children:a("admin.ip")})]})}),e.jsx("tbody",{children:n.map(t=>e.jsxs("tr",{className:"border-b border-[var(--border-row)] hover:bg-white/[0.02] transition-colors",children:[e.jsx("td",{className:"whitespace-nowrap py-2.5 pr-4 text-[var(--text-muted)]",children:new Date(t.createdAt).toLocaleString()}),e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-secondary)]",children:t.userId}),e.jsx("td",{className:"py-2.5 pr-4",children:e.jsx("span",{className:u(t.action),children:t.action})}),e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-secondary)]",children:t.resource}),e.jsx("td",{className:"max-w-xs truncate py-2.5 pr-4 text-[var(--text-muted)]",children:t.detail}),e.jsx("td",{className:"py-2.5 text-[var(--text-muted)]",children:t.ip})]},t.id))})]})}),e.jsx("div",{className:"md:hidden space-y-3",children:n.map(t=>e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-3",children:[e.jsx("div",{className:"text-[11px] text-[var(--text-muted)] mb-1",children:new Date(t.createdAt).toLocaleString()}),e.jsxs("div",{className:"flex min-w-0 items-center gap-2 mb-1",children:[e.jsx("span",{className:`shrink-0 text-[11px] ${u(t.action)}`,children:t.action}),e.jsx("span",{className:"min-w-0 truncate text-[11px] text-[var(--text-secondary)]",children:t.resource})]}),e.jsx("div",{className:"text-[11px] text-[var(--text-muted)] truncate",children:t.detail}),e.jsxs("div",{className:"flex items-center gap-3 mt-1 text-[11px] text-[var(--text-muted)]",children:[e.jsxs("span",{children:["User: ",t.userId]}),e.jsx("span",{children:t.ip})]})]},t.id))}),e.jsxs("div",{className:"mt-4 flex items-center justify-between",children:[e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:a("admin.showing_entries",{count:String(n.length)})}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("button",{type:"button",disabled:x.length===0,className:"flex items-center justify-center gap-1 rounded-[4px] border border-[var(--border)] px-2.5 py-1 min-h-[44px] min-w-[44px] md:min-h-0 md:min-w-0 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] hover:border-[var(--accent)] disabled:opacity-30 disabled:cursor-not-allowed transition-colors",onClick:y,children:[e.jsx(F,{className:"h-3.5 w-3.5"}),a("common.previous")]}),e.jsxs("button",{type:"button",disabled:!l,className:"flex items-center justify-center gap-1 rounded-[4px] border border-[var(--border)] px-2.5 py-1 min-h-[44px] min-w-[44px] md:min-h-0 md:min-w-0 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] hover:border-[var(--accent)] disabled:opacity-30 disabled:cursor-not-allowed transition-colors",onClick:_,children:[a("common.next"),e.jsx(P,{className:"h-3.5 w-3.5"})]})]})]})]})]})}export{q as default};
@@ -0,0 +1 @@
1
+ import{f as J,a as Q,F as W,a1 as A,r,h as X,t as x,j as e}from"./index-CTiyb7yJ.js";import{S as b}from"./Select-O36ifNjw.js";import{M as ee}from"./MultiSelect-Bb4HJSAN.js";import{C as te}from"./Checkbox-BTcgiBPg.js";import{A as ae}from"./arrow-left-g7TOa7aF.js";import"./chevron-down-Bm0RXzLE.js";const re=[{label:"every_hour",value:"0 * * * *"},{label:"every_6_hours",value:"0 */6 * * *"},{label:"daily_midnight",value:"0 0 * * *"},{label:"daily_9am",value:"0 9 * * *"},{label:"weekly_monday",value:"0 9 * * 1"},{label:"custom",value:""}],oe=[{label:"completed",value:"COMPLETED"},{label:"failed",value:"FAILED"},{label:"cancelled",value:"CANCELLED"}],se=[{label:"claude",value:"claude"},{label:"cursor",value:"cursor"},{label:"codex",value:"codex"}],ne=["UTC","America/New_York","America/Chicago","America/Denver","America/Los_Angeles","Europe/London","Europe/Berlin","Asia/Tokyo","Asia/Shanghai","Asia/Singapore","Australia/Sydney"];function le(m){const a=m.trim().split(/\s+/);return a.length===5||a.length===6}function pe(){const m=J(),{t:a}=Q(),[Y]=W(),u=Y.get("templateId"),{createAutomation:w}=A(),[h,P]=r.useState(""),[y,F]=r.useState(""),[s,M]=r.useState([]),[c,$]=r.useState("cron"),[B,j]=r.useState("0 0 * * *"),[v,_]=r.useState("0 0 * * *"),[k,K]=r.useState("UTC"),[N,L]=r.useState("COMPLETED"),[d,C]=r.useState(""),[f,D]=r.useState(""),[g,z]=r.useState("readonly"),[S,T]=r.useState("claude"),[E,I]=r.useState(!0),[U,V]=r.useState({}),[O,G]=r.useState([]),[q,R]=r.useState(!1);r.useEffect(()=>{d&&(s.length===0||!s.includes(d))&&C("")},[d,s]),r.useEffect(()=>{let t=!1;return X.get("web/projects").json().then(n=>{t||G(n),!t&&n.length===1&&(M([n[0].key]),T(n[0].agentType))}).catch(()=>{t||x.error(a("automation.failed_load_projects"))}),()=>{t=!0}},[a]),r.useEffect(()=>{if(!u)return;let t=!1;return A.getState().fetchTemplates().then(()=>{if(t)return;const o=A.getState().templates.find(l=>l.id===Number(u));if(o){P(o.name),F(o.taskDescription),$(o.triggerType),z(o.executionMode);const l=o.triggerConfig;if(o.triggerType==="cron"&&l.cron&&(_(l.cron),j(""),l.timezone&&K(l.timezone)),o.triggerType==="task_event"&&l.event){L(l.event);const i=l.filter;i!=null&&i.projectKey&&C(i.projectKey),i!=null&&i.taskMode&&D(i.taskMode)}const p=o.taskConfig;p&&V(p),p!=null&&p.agentType&&T(p.agentType),I(!0)}}),()=>{t=!0}},[u]);const Z=t=>{j(t),t&&_(t)},H=r.useCallback(async()=>{if(!h.trim()){x.error(a("automation.name_required"));return}if(s.length===0){x.error(a("automation.project_required"));return}let t={};if(c==="cron"){if(!v.trim()){x.error(a("automation.cron_expression_required"));return}if(!le(v)){x.error(a("automation.cron_expression_invalid"));return}t={cron:v,timezone:k}}else c==="task_event"&&(t={event:N,filter:{...d&&{projectKey:d},...f&&{taskMode:f}}});R(!0);try{const n=await w({projectKey:s[0],projectKeys:s,name:h.trim(),description:y.trim(),triggerType:c,triggerConfig:t,executionMode:g,taskConfig:{...U,agentType:S},notifyProjectChats:E,...u?{templateId:Number(u)}:{}});x.success(a("automation.automation_created")),m(`/automations/${n.id}`)}catch(n){const o=n instanceof Error?n.message:a("automation.failed_create");x.error(o)}finally{R(!1)}},[h,y,s,c,v,k,N,d,f,g,S,E,u,w,m,a]);return e.jsxs("div",{className:"mx-auto max-w-2xl px-2 py-4 md:px-4 md:py-6 font-mono",children:[e.jsxs("div",{className:"mb-6 flex items-center gap-3",children:[e.jsx("button",{onClick:()=>m("/automations"),className:"rounded-[4px] p-1.5 text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:e.jsx(ae,{className:"h-4 w-4"})}),e.jsx("h1",{className:"text-sm font-bold text-[var(--text-primary)]",children:a("automation.create_title")})]}),e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"create-project",className:"mb-1.5 block text-[11px] text-[var(--text-muted)]",children:a("automation.project")}),e.jsx(ee,{values:s,onChange:M,options:O.map(t=>({value:t.key,label:`${t.name} (${t.key})`})),placeholder:a("automation.select_project")})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"create-name",className:"mb-1.5 block text-[11px] text-[var(--text-muted)]",children:a("automation.name")}),e.jsx("input",{id:"create-name",type:"text",value:h,onChange:t=>P(t.target.value),placeholder:a("automation.name_placeholder"),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] outline-none focus:border-[var(--accent)]"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"create-description",className:"mb-1.5 block text-[11px] text-[var(--text-muted)]",children:a("automation.description")}),e.jsx("textarea",{id:"create-description",value:y,onChange:t=>F(t.target.value),rows:4,placeholder:a("automation.description_placeholder"),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] outline-none focus:border-[var(--accent)] resize-none"}),e.jsx("p",{className:"mt-1 text-[10px] text-[var(--text-muted)]",children:a("automation.template_vars")})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-[11px] text-[var(--text-muted)]",children:a("automation.trigger_type")}),e.jsx("div",{className:"flex gap-2",children:["cron","task_event","manual"].map(t=>e.jsx("button",{onClick:()=>$(t),className:`flex-1 rounded-[4px] border px-3 py-2 text-xs transition-colors ${c===t?"border-[var(--accent)] text-[var(--accent)] bg-[var(--accent)]/5":"border-[var(--border)] text-[var(--text-secondary)] hover:text-[var(--text-primary)]"}`,children:t},t))})]}),c==="cron"&&e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("label",{className:"block text-[11px] font-bold text-[var(--text-primary)]",children:a("automation.cron_config")}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"create-cron-preset",className:"mb-1 block text-[10px] text-[var(--text-muted)]",children:a("automation.preset")}),e.jsx(b,{value:B,onChange:Z,options:re.map(t=>({value:t.value,label:t.value?`${t.label} (${t.value})`:t.label}))})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"create-cron-expression",className:"mb-1 block text-[10px] text-[var(--text-muted)]",children:a("automation.cron_expression")}),e.jsx("input",{id:"create-cron-expression",type:"text",value:v,onChange:t=>{_(t.target.value),j("")},placeholder:"* * * * *",className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs font-mono text-[var(--text-primary)] placeholder:text-[var(--text-muted)] outline-none focus:border-[var(--accent)]"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"create-timezone",className:"mb-1 block text-[10px] text-[var(--text-muted)]",children:a("automation.timezone")}),e.jsx(b,{value:k,onChange:K,options:ne.map(t=>({value:t,label:t}))})]})]}),c==="task_event"&&e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("label",{className:"block text-[11px] font-bold text-[var(--text-primary)]",children:a("automation.task_event_config")}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"create-event-type",className:"mb-1 block text-[10px] text-[var(--text-muted)]",children:a("automation.event_type")}),e.jsx(b,{value:N,onChange:L,options:oe})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"create-filter-project",className:"mb-1 block text-[10px] text-[var(--text-muted)]",children:a("automation.filter_project_key")}),e.jsx(b,{value:d,onChange:C,options:[{value:"",label:a("automation.all_projects")},...O.filter(t=>s.includes(t.key)).map(t=>({value:t.key,label:`${t.name} (${t.key})`}))],disabled:s.length===0})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"create-filter-mode",className:"mb-1 block text-[10px] text-[var(--text-muted)]",children:a("automation.filter_task_mode")}),e.jsx(b,{value:f,onChange:D,options:[{value:"",label:a("automation.all_modes")},{value:"develop",label:"develop"},{value:"review",label:"review"}]})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-[11px] text-[var(--text-muted)]",children:a("automation.execution_mode")}),e.jsx("div",{className:"flex gap-2",children:["readonly","writable"].map(t=>e.jsx("button",{onClick:()=>z(t),className:`flex-1 rounded-[4px] border px-3 py-2 text-xs transition-colors ${g===t?"border-[var(--accent)] text-[var(--accent)] bg-[var(--accent)]/5":"border-[var(--border)] text-[var(--text-secondary)] hover:text-[var(--text-primary)]"}`,children:t},t))}),e.jsx("p",{className:"mt-1 text-[10px] text-[var(--text-muted)]",children:a(g==="writable"?"automation.writable_hint":"automation.readonly_hint")})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-[11px] text-[var(--text-muted)]",children:a("automation.agent_type")}),e.jsx("div",{className:"flex gap-2",children:se.map(t=>e.jsx("button",{onClick:()=>T(t.value),className:`flex-1 rounded-[4px] border px-3 py-2 text-xs transition-colors ${S===t.value?"border-[var(--accent)] text-[var(--accent)] bg-[var(--accent)]/5":"border-[var(--border)] text-[var(--text-secondary)] hover:text-[var(--text-primary)]"}`,children:t.label},t.value))})]}),e.jsxs("div",{children:[e.jsx(te,{checked:E,onCheckedChange:I,label:a("automation.notify_project_chats")}),e.jsx("p",{className:"mt-1 pl-6 text-[10px] text-[var(--text-muted)]",children:a("automation.notify_project_chats_hint")})]}),e.jsxs("div",{className:"flex gap-3 pt-2",children:[e.jsx("button",{onClick:H,disabled:q,className:"flex-1 rounded-[4px] bg-[var(--accent)] px-4 py-2.5 text-xs font-bold text-black disabled:opacity-40 disabled:cursor-not-allowed transition-opacity hover:opacity-90",children:a(q?"automation.creating":"automation.create_automation")}),e.jsx("button",{onClick:()=>m("/automations"),className:"rounded-[4px] border border-[var(--border)] px-4 py-2.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:a("automation.cancel")})]})]})]})}export{pe as default};
@@ -1,16 +1,16 @@
1
- import{c as v,f as I,a as $,B as D,a1 as L,r as o,a2 as O,p as F,t as i,x as q,j as t,s as K}from"./index-DpFOWbFQ.js";import{E as _}from"./EmptyState-DQ0fOTKY.js";import{T as z}from"./Skeleton-CwwH6ktS.js";import{f as A,c as B}from"./date-CmcdoD87.js";import{C}from"./clock-BF7qBFGO.js";import{A as G}from"./arrow-left-BcA9UMTL.js";import{P as T}from"./play-RH8-4UME.js";import{T as H}from"./trash-2-CfHTaDgU.js";import{T as U}from"./timer-LF3nKAXi.js";import{Z as W}from"./zap-BH9B1NGV.js";import{E as Z}from"./external-link-C2lUBinm.js";/**
1
+ import{c as u,f as M,a as I,B as S,a1 as $,r as o,a2 as D,p as L,t as i,x as O,j as t,s as F}from"./index-CTiyb7yJ.js";import{E as w}from"./EmptyState-D5CEvlzr.js";import{T as q}from"./Skeleton-C3hKV7kJ.js";import{f as k,c as K}from"./date-CmcdoD87.js";import{e as z}from"./automationFindings-CnN7yNaM.js";import{C as _}from"./clock-Cy1Js2Dt.js";import{A as B}from"./arrow-left-g7TOa7aF.js";import{P as C}from"./play-B7Id2WyV.js";import{T as G}from"./trash-2-CjjldDF6.js";import{T as H}from"./timer-DI-oKdvl.js";import{Z as U}from"./zap-DTEOEzhR.js";import{E as Z}from"./external-link-BWGj2ovK.js";/**
2
2
  * @license lucide-react v0.469.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
- */const J=v("PowerOff",[["path",{d:"M18.36 6.64A9 9 0 0 1 20.77 15",key:"dxknvb"}],["path",{d:"M6.16 6.16a9 9 0 1 0 12.68 12.68",key:"1x7qb5"}],["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
6
+ */const Q=u("PowerOff",[["path",{d:"M18.36 6.64A9 9 0 0 1 20.77 15",key:"dxknvb"}],["path",{d:"M6.16 6.16a9 9 0 1 0 12.68 12.68",key:"1x7qb5"}],["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
7
7
  * @license lucide-react v0.469.0 - ISC
8
8
  *
9
9
  * This source code is licensed under the ISC license.
10
10
  * See the LICENSE file in the root directory of this source tree.
11
- */const Q=v("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]);/**
11
+ */const V=u("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]);/**
12
12
  * @license lucide-react v0.469.0 - ISC
13
13
  *
14
14
  * This source code is licensed under the ISC license.
15
15
  * See the LICENSE file in the root directory of this source tree.
16
- */const V=v("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);function X(n){switch(n){case"COMPLETED":return"bg-[var(--accent)]";case"RUNNING":return"bg-[var(--accent)]";case"PENDING":return"bg-[var(--warning)]";case"FAILED":return"bg-[var(--destructive)]";case"SKIPPED":return"bg-[#525252]";default:return"bg-[#525252]"}}function Y(n,e){return(n&&n.length>0?n:[e]).join(", ")}function dt(){const n=I(),{t:e}=$(),{id:b}=D(),r=Number(b),{currentAutomation:a,loading:P,fetchAutomation:x,enableAutomation:g,disableAutomation:f,triggerAutomation:j,deleteAutomation:y,runs:N,fetchRuns:c,clearRunQuery:w}=L(),[E,k]=o.useState(!1),p=o.useRef(!1);o.useEffect(()=>(x(r),c({automationId:r,limit:20}),()=>{w()}),[r,x,c,w]),o.useEffect(()=>{p.current=!0;const s=O.onStatus(l=>{p.current&&l==="connected"&&c({automationId:r,limit:20})});return()=>{p.current=!1,s()}},[r,c]),F((a==null?void 0:a.name)??null);const M=o.useCallback(async()=>{if(a)try{a.enabled?(await f(a.id),await x(r),i.success(e("automation.automation_disabled"))):(await g(a.id),await x(r),i.success(e("automation.automation_enabled")))}catch{i.error(e("automation.failed_toggle"))}},[a,r,g,f,x,e]),R=o.useCallback(async()=>{try{await j(r),i.success(e("automation.automation_triggered")),c({automationId:r,limit:20})}catch{i.error(e("automation.failed_trigger"))}},[r,j,c,e]),S=o.useCallback(async()=>{try{await y(r),i.success(e("automation.automation_deleted")),n("/automations")}catch{i.error(e("automation.failed_delete"))}},[r,y,n,e]);if(q(null),P&&!a)return t.jsx("div",{className:"mx-auto max-w-4xl px-2 py-4 md:px-4 md:py-6 font-mono",children:t.jsx(z,{rows:6})});if(!a)return t.jsx("div",{className:"mx-auto max-w-4xl px-2 py-4 md:px-4 md:py-6 font-mono",children:t.jsx(_,{icon:C,title:e("automation.automation_not_found")})});const d=a.triggerConfig,u=a.taskConfig;return t.jsxs("div",{className:"mx-auto max-w-4xl px-2 py-4 md:px-4 md:py-6 font-mono",children:[t.jsxs("div",{className:"mb-6 flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("button",{onClick:()=>n("/automations"),className:"rounded-[4px] p-1.5 text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:t.jsx(G,{className:"h-4 w-4"})}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("h1",{className:"text-sm font-bold text-[var(--text-primary)]",children:a.name}),t.jsx("span",{className:`h-2 w-2 rounded-full ${a.enabled?"bg-[var(--accent)]":"bg-[var(--text-muted)]"}`}),t.jsx("span",{className:"text-[10px] text-[var(--text-muted)]",children:a.enabled?e("automation.enabled"):e("automation.disabled")})]}),a.description&&t.jsx("p",{className:"mt-0.5 text-[11px] text-[var(--text-muted)] line-clamp-2",children:a.description})]})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("button",{onClick:M,className:`flex items-center gap-1 rounded-[4px] border px-3 py-1.5 text-[11px] transition-colors ${a.enabled?"border-[var(--warning)] text-[var(--warning)] hover:bg-[var(--warning)]/10":"border-[var(--accent)] text-[var(--accent)] hover:bg-[var(--accent)]/10"}`,children:a.enabled?t.jsxs(t.Fragment,{children:[t.jsx(J,{className:"h-3 w-3"})," ",e("automation.disable")]}):t.jsxs(t.Fragment,{children:[t.jsx(Q,{className:"h-3 w-3"})," ",e("automation.enable")]})}),t.jsxs("button",{onClick:()=>n(`/automations/${a.id}/edit`),className:"flex items-center gap-1 rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-[11px] text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:[t.jsx(V,{className:"h-3 w-3"})," ",e("automation.edit")]}),t.jsxs("button",{onClick:R,className:"flex items-center gap-1 whitespace-nowrap rounded-[4px] border border-[var(--accent)] px-3 py-1.5 text-[11px] text-[var(--accent)] hover:bg-[var(--accent)]/10 transition-colors",children:[t.jsx(T,{className:"h-3 w-3 shrink-0"})," ",e("automation.trigger_now")]}),t.jsxs("button",{onClick:()=>k(!0),className:"flex items-center gap-1 rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-[11px] text-[var(--text-muted)] hover:text-[var(--destructive)] hover:border-[var(--destructive)] transition-colors",children:[t.jsx(H,{className:"h-3 w-3"})," ",e("automation.delete")]})]})]}),t.jsxs("div",{className:"mb-6 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4",children:[t.jsx("h2",{className:"mb-3 text-[11px] font-bold text-[var(--text-muted)]",children:e("automation.configuration")}),t.jsxs("div",{className:"grid grid-cols-2 gap-3 md:grid-cols-4",children:[t.jsxs("div",{children:[t.jsx("span",{className:"block text-[10px] text-[var(--text-muted)]",children:e("automation.trigger_type")}),t.jsxs("div",{className:"mt-0.5 flex items-center gap-1 text-xs text-[var(--text-primary)]",children:[a.triggerType==="cron"&&t.jsx(U,{className:"h-3 w-3"}),a.triggerType==="task_event"&&t.jsx(W,{className:"h-3 w-3"}),a.triggerType==="manual"&&t.jsx(T,{className:"h-3 w-3"}),a.triggerType]})]}),a.triggerType==="cron"&&!!d.cron&&t.jsxs("div",{children:[t.jsx("span",{className:"block text-[10px] text-[var(--text-muted)]",children:e("automation.schedule")}),t.jsx("span",{className:"mt-0.5 block text-xs text-[var(--text-primary)]",children:d.cron}),t.jsx("span",{className:"block text-[10px] text-[var(--text-muted)]",children:d.timezone??"UTC"})]}),a.triggerType==="task_event"&&!!d.event&&t.jsxs("div",{children:[t.jsx("span",{className:"block text-[10px] text-[var(--text-muted)]",children:e("automation.event")}),t.jsx("span",{className:"mt-0.5 block text-xs text-[var(--text-primary)]",children:d.event})]}),t.jsxs("div",{children:[t.jsx("span",{className:"block text-[10px] text-[var(--text-muted)]",children:e("automation.agent_type")}),t.jsx("span",{className:"mt-0.5 block text-xs text-[var(--text-primary)]",children:(u==null?void 0:u.agentType)??"claude"})]}),t.jsxs("div",{children:[t.jsx("span",{className:"block text-[10px] text-[var(--text-muted)]",children:e("automation.execution_mode")}),t.jsx("span",{className:`mt-0.5 block text-xs ${a.executionMode==="writable"?"text-[var(--warning)]":"text-[var(--text-primary)]"}`,children:a.executionMode})]}),t.jsxs("div",{children:[t.jsx("span",{className:"block whitespace-nowrap text-[10px] text-[var(--text-muted)]",children:e("automation.notify_project_chats")}),t.jsx("span",{className:"mt-0.5 block whitespace-nowrap text-xs text-[var(--text-primary)]",children:a.notifyProjectChats?e("automation.notify_project_chats_enabled"):e("automation.notify_project_chats_disabled")})]})]}),t.jsxs("div",{className:"mt-3 flex items-center gap-4 text-[10px] text-[var(--text-muted)]",children:[t.jsxs("span",{children:[e("automation.project"),": ",Y(a.projectKeys,a.projectKey)]}),a.lastRunAt&&t.jsx("span",{children:e("automation.last_run",{time:A(a.lastRunAt)})}),a.nextRunAt&&t.jsx("span",{children:e("automation.next_run",{time:B(a.nextRunAt)})})]})]}),t.jsxs("div",{children:[t.jsx("h2",{className:"mb-3 text-[11px] font-bold text-[var(--text-muted)]",children:e("automation.run_history")}),N.length===0?t.jsx(_,{icon:C,title:e("automation.no_runs"),compact:!0}):t.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:t.jsxs("table",{className:"w-full text-left",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"border-b border-[var(--border)] text-[11px] font-medium text-[#525252]",children:[t.jsx("th",{className:"px-4 py-2.5",children:e("automation.col_time")}),t.jsx("th",{className:"px-4 py-2.5",children:e("automation.project")}),t.jsx("th",{className:"px-4 py-2.5",children:e("automation.col_status")}),t.jsx("th",{className:"px-4 py-2.5",children:e("automation.col_findings")}),t.jsx("th",{className:"px-4 py-2.5",children:e("automation.col_task")})]})}),t.jsx("tbody",{children:N.map(s=>t.jsxs("tr",{className:"cursor-pointer border-b border-[var(--border)] last:border-b-0 hover:bg-[var(--bg-input)] transition-colors",onClick:()=>n(`/automations/runs/${s.id}`),children:[t.jsx("td",{className:"px-4 py-2.5 text-xs text-[var(--text-primary)]",children:A(s.createdAt)}),t.jsx("td",{className:"px-4 py-2.5 text-xs text-[var(--text-primary)]",children:s.projectKey??a.projectKey}),t.jsx("td",{className:"px-4 py-2.5",children:t.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-[var(--text-primary)]",children:[t.jsx("span",{className:`h-2 w-2 rounded-full ${X(s.status)}`}),s.status.toLowerCase()]})}),t.jsx("td",{className:"px-4 py-2.5 text-xs text-[var(--text-muted)]",children:(()=>{if(!s.hasFindings||!s.findings||!Array.isArray(s.findings))return"-";const l=s.findings.flatMap(m=>{if(m.detail&&typeof m.detail=="string"&&m.detail.trimStart().startsWith("{"))try{const h=JSON.parse(m.detail);if(Array.isArray(h.findings)&&h.findings.length>0)return h.findings}catch{}return[m]});return`${l.length} finding${l.length!==1?"s":""}`})()}),t.jsx("td",{className:"px-4 py-2.5",children:s.taskId?t.jsxs("button",{onClick:l=>{l.stopPropagation(),n(`/tasks/${s.taskId}`)},className:"flex items-center gap-1 text-xs text-[var(--accent)] hover:underline",children:["#",s.taskId,t.jsx(Z,{className:"h-2.5 w-2.5"})]}):t.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:"-"})})]},s.id))})]})})]}),t.jsx(K,{isOpen:E,onClose:()=>k(!1),onConfirm:S,title:e("automation.delete_title"),message:e("automation.delete_confirm",{name:a.name}),confirmLabel:e("automation.delete"),confirmVariant:"danger"})]})}export{dt as default};
16
+ */const W=u("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);function J(n){switch(n){case"COMPLETED":return"bg-[var(--accent)]";case"RUNNING":return"bg-[var(--accent)]";case"PENDING":return"bg-[var(--warning)]";case"FAILED":return"bg-[var(--destructive)]";case"SKIPPED":return"bg-[#525252]";default:return"bg-[#525252]"}}function X(n,e){return(n&&n.length>0?n:[e]).join(", ")}function dt(){const n=M(),{t:e}=I(),{id:h}=S(),r=Number(h),{currentAutomation:a,loading:A,fetchAutomation:x,enableAutomation:v,disableAutomation:b,triggerAutomation:g,deleteAutomation:f,runs:j,fetchRuns:c,clearRunQuery:y}=$(),[T,N]=o.useState(!1),m=o.useRef(!1);o.useEffect(()=>(x(r),c({automationId:r,limit:20}),()=>{y()}),[r,x,c,y]),o.useEffect(()=>{m.current=!0;const s=D.onStatus(l=>{m.current&&l==="connected"&&c({automationId:r,limit:20})});return()=>{m.current=!1,s()}},[r,c]),L((a==null?void 0:a.name)??null);const P=o.useCallback(async()=>{if(a)try{a.enabled?(await b(a.id),await x(r),i.success(e("automation.automation_disabled"))):(await v(a.id),await x(r),i.success(e("automation.automation_enabled")))}catch{i.error(e("automation.failed_toggle"))}},[a,r,v,b,x,e]),E=o.useCallback(async()=>{try{await g(r),i.success(e("automation.automation_triggered")),c({automationId:r,limit:20})}catch{i.error(e("automation.failed_trigger"))}},[r,g,c,e]),R=o.useCallback(async()=>{try{await f(r),i.success(e("automation.automation_deleted")),n("/automations")}catch{i.error(e("automation.failed_delete"))}},[r,f,n,e]);if(O(null),A&&!a)return t.jsx("div",{className:"mx-auto max-w-4xl px-2 py-4 md:px-4 md:py-6 font-mono",children:t.jsx(q,{rows:6})});if(!a)return t.jsx("div",{className:"mx-auto max-w-4xl px-2 py-4 md:px-4 md:py-6 font-mono",children:t.jsx(w,{icon:_,title:e("automation.automation_not_found")})});const d=a.triggerConfig,p=a.taskConfig;return t.jsxs("div",{className:"mx-auto max-w-4xl px-2 py-4 md:px-4 md:py-6 font-mono",children:[t.jsxs("div",{className:"mb-6 flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("button",{onClick:()=>n("/automations"),className:"rounded-[4px] p-1.5 text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:t.jsx(B,{className:"h-4 w-4"})}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("h1",{className:"text-sm font-bold text-[var(--text-primary)]",children:a.name}),t.jsx("span",{className:`h-2 w-2 rounded-full ${a.enabled?"bg-[var(--accent)]":"bg-[var(--text-muted)]"}`}),t.jsx("span",{className:"text-[10px] text-[var(--text-muted)]",children:a.enabled?e("automation.enabled"):e("automation.disabled")})]}),a.description&&t.jsx("p",{className:"mt-0.5 text-[11px] text-[var(--text-muted)] line-clamp-2",children:a.description})]})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("button",{onClick:P,className:`flex items-center gap-1 rounded-[4px] border px-3 py-1.5 text-[11px] transition-colors ${a.enabled?"border-[var(--warning)] text-[var(--warning)] hover:bg-[var(--warning)]/10":"border-[var(--accent)] text-[var(--accent)] hover:bg-[var(--accent)]/10"}`,children:a.enabled?t.jsxs(t.Fragment,{children:[t.jsx(Q,{className:"h-3 w-3"})," ",e("automation.disable")]}):t.jsxs(t.Fragment,{children:[t.jsx(V,{className:"h-3 w-3"})," ",e("automation.enable")]})}),t.jsxs("button",{onClick:()=>n(`/automations/${a.id}/edit`),className:"flex items-center gap-1 rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-[11px] text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:[t.jsx(W,{className:"h-3 w-3"})," ",e("automation.edit")]}),t.jsxs("button",{onClick:E,className:"flex items-center gap-1 whitespace-nowrap rounded-[4px] border border-[var(--accent)] px-3 py-1.5 text-[11px] text-[var(--accent)] hover:bg-[var(--accent)]/10 transition-colors",children:[t.jsx(C,{className:"h-3 w-3 shrink-0"})," ",e("automation.trigger_now")]}),t.jsxs("button",{onClick:()=>N(!0),className:"flex items-center gap-1 rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-[11px] text-[var(--text-muted)] hover:text-[var(--destructive)] hover:border-[var(--destructive)] transition-colors",children:[t.jsx(G,{className:"h-3 w-3"})," ",e("automation.delete")]})]})]}),t.jsxs("div",{className:"mb-6 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4",children:[t.jsx("h2",{className:"mb-3 text-[11px] font-bold text-[var(--text-muted)]",children:e("automation.configuration")}),t.jsxs("div",{className:"grid grid-cols-2 gap-3 md:grid-cols-4",children:[t.jsxs("div",{children:[t.jsx("span",{className:"block text-[10px] text-[var(--text-muted)]",children:e("automation.trigger_type")}),t.jsxs("div",{className:"mt-0.5 flex items-center gap-1 text-xs text-[var(--text-primary)]",children:[a.triggerType==="cron"&&t.jsx(H,{className:"h-3 w-3"}),a.triggerType==="task_event"&&t.jsx(U,{className:"h-3 w-3"}),a.triggerType==="manual"&&t.jsx(C,{className:"h-3 w-3"}),a.triggerType]})]}),a.triggerType==="cron"&&!!d.cron&&t.jsxs("div",{children:[t.jsx("span",{className:"block text-[10px] text-[var(--text-muted)]",children:e("automation.schedule")}),t.jsx("span",{className:"mt-0.5 block text-xs text-[var(--text-primary)]",children:d.cron}),t.jsx("span",{className:"block text-[10px] text-[var(--text-muted)]",children:d.timezone??"UTC"})]}),a.triggerType==="task_event"&&!!d.event&&t.jsxs("div",{children:[t.jsx("span",{className:"block text-[10px] text-[var(--text-muted)]",children:e("automation.event")}),t.jsx("span",{className:"mt-0.5 block text-xs text-[var(--text-primary)]",children:d.event})]}),t.jsxs("div",{children:[t.jsx("span",{className:"block text-[10px] text-[var(--text-muted)]",children:e("automation.agent_type")}),t.jsx("span",{className:"mt-0.5 block text-xs text-[var(--text-primary)]",children:(p==null?void 0:p.agentType)??"claude"})]}),t.jsxs("div",{children:[t.jsx("span",{className:"block text-[10px] text-[var(--text-muted)]",children:e("automation.execution_mode")}),t.jsx("span",{className:`mt-0.5 block text-xs ${a.executionMode==="writable"?"text-[var(--warning)]":"text-[var(--text-primary)]"}`,children:a.executionMode})]}),t.jsxs("div",{children:[t.jsx("span",{className:"block whitespace-nowrap text-[10px] text-[var(--text-muted)]",children:e("automation.notify_project_chats")}),t.jsx("span",{className:"mt-0.5 block whitespace-nowrap text-xs text-[var(--text-primary)]",children:a.notifyProjectChats?e("automation.notify_project_chats_enabled"):e("automation.notify_project_chats_disabled")})]})]}),t.jsxs("div",{className:"mt-3 flex items-center gap-4 text-[10px] text-[var(--text-muted)]",children:[t.jsxs("span",{children:[e("automation.project"),": ",X(a.projectKeys,a.projectKey)]}),a.lastRunAt&&t.jsx("span",{children:e("automation.last_run",{time:k(a.lastRunAt)})}),a.nextRunAt&&t.jsx("span",{children:e("automation.next_run",{time:K(a.nextRunAt)})})]})]}),t.jsxs("div",{children:[t.jsx("h2",{className:"mb-3 text-[11px] font-bold text-[var(--text-muted)]",children:e("automation.run_history")}),j.length===0?t.jsx(w,{icon:_,title:e("automation.no_runs"),compact:!0}):t.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:t.jsxs("table",{className:"w-full text-left",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"border-b border-[var(--border)] text-[11px] font-medium text-[#525252]",children:[t.jsx("th",{className:"px-4 py-2.5",children:e("automation.col_time")}),t.jsx("th",{className:"px-4 py-2.5",children:e("automation.project")}),t.jsx("th",{className:"px-4 py-2.5",children:e("automation.col_status")}),t.jsx("th",{className:"px-4 py-2.5",children:e("automation.col_findings")}),t.jsx("th",{className:"px-4 py-2.5",children:e("automation.col_task")})]})}),t.jsx("tbody",{children:j.map(s=>t.jsxs("tr",{className:"cursor-pointer border-b border-[var(--border)] last:border-b-0 hover:bg-[var(--bg-input)] transition-colors",onClick:()=>n(`/automations/runs/${s.id}`),children:[t.jsx("td",{className:"px-4 py-2.5 text-xs text-[var(--text-primary)]",children:k(s.createdAt)}),t.jsx("td",{className:"px-4 py-2.5 text-xs text-[var(--text-primary)]",children:s.projectKey??a.projectKey}),t.jsx("td",{className:"px-4 py-2.5",children:t.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-[var(--text-primary)]",children:[t.jsx("span",{className:`h-2 w-2 rounded-full ${J(s.status)}`}),s.status.toLowerCase()]})}),t.jsx("td",{className:"px-4 py-2.5 text-xs text-[var(--text-muted)]",children:(()=>{if(!s.hasFindings||!s.findings||!Array.isArray(s.findings))return"-";const l=z(s.findings);return`${l.length} finding${l.length!==1?"s":""}`})()}),t.jsx("td",{className:"px-4 py-2.5",children:s.taskId?t.jsxs("button",{onClick:l=>{l.stopPropagation(),n(`/tasks/${s.taskId}`)},className:"flex items-center gap-1 text-xs text-[var(--accent)] hover:underline",children:["#",s.taskId,t.jsx(Z,{className:"h-2.5 w-2.5"})]}):t.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:"-"})})]},s.id))})]})})]}),t.jsx(F,{isOpen:T,onClose:()=>N(!1),onConfirm:R,title:e("automation.delete_title"),message:e("automation.delete_confirm",{name:a.name}),confirmLabel:e("automation.delete"),confirmVariant:"danger"})]})}export{dt as default};
@@ -0,0 +1 @@
1
+ import{f as X,a as ee,B as te,a1 as ae,r,h as re,t as m,j as e}from"./index-CTiyb7yJ.js";import{S as v}from"./Select-O36ifNjw.js";import{M as oe}from"./MultiSelect-Bb4HJSAN.js";import{C as se}from"./Checkbox-BTcgiBPg.js";import{T as ne}from"./Skeleton-C3hKV7kJ.js";import{E as le}from"./EmptyState-D5CEvlzr.js";import{C as ie}from"./clock-Cy1Js2Dt.js";import{A as ce}from"./arrow-left-g7TOa7aF.js";import"./chevron-down-Bm0RXzLE.js";const R=[{label:"every_hour",value:"0 * * * *"},{label:"every_6_hours",value:"0 */6 * * *"},{label:"daily_midnight",value:"0 0 * * *"},{label:"daily_9am",value:"0 9 * * *"},{label:"weekly_monday",value:"0 9 * * 1"},{label:"custom",value:""}],de=[{label:"completed",value:"COMPLETED"},{label:"failed",value:"FAILED"},{label:"cancelled",value:"CANCELLED"}],xe=[{label:"claude",value:"claude"},{label:"cursor",value:"cursor"},{label:"codex",value:"codex"}],U=["UTC","America/New_York","America/Chicago","America/Denver","America/Los_Angeles","Europe/London","Europe/Berlin","Asia/Tokyo","Asia/Shanghai","Asia/Singapore","Asia/Kolkata","Australia/Sydney"];function me(u){const a=u.trim().split(/\s+/);return a.length===5||a.length===6}function _e(){const u=X(),{t:a}=ee(),{id:Y}=te(),n=Number(Y),{currentAutomation:o,loading:B,fetchAutomation:E,updateAutomation:S}=ae(),[b,T]=r.useState(""),[y,w]=r.useState(""),[l,A]=r.useState([]),[c,P]=r.useState("cron"),[V,j]=r.useState(""),[p,g]=r.useState(""),[d,M]=r.useState("UTC"),[_,$]=r.useState("COMPLETED"),[x,k]=r.useState(""),[h,F]=r.useState(""),[f,K]=r.useState("readonly"),[N,L]=r.useState("claude"),[C,z]=r.useState(!1),[D,G]=r.useState([]),[O,I]=r.useState(!1),[q,Z]=r.useState(!1);r.useEffect(()=>{E(n)},[n,E]),r.useEffect(()=>{let t=!1;return re.get("web/projects").json().then(i=>{t||G(i)}).catch(()=>{t||m.error(a("automation.failed_load_projects"))}),()=>{t=!0}},[a]),r.useEffect(()=>{x&&(l.length===0||!l.includes(x))&&k("")},[x,l]),r.useEffect(()=>{if(!o||o.id!==n||q)return;T(o.name),w(o.description),A(o.projectKeys??[o.projectKey]),P(o.triggerType),K(o.executionMode);const t=o.triggerConfig;if(o.triggerType==="cron"){const s=t.cron??"";g(s);const Q=R.find(W=>W.value===s);j(Q?s:""),M(t.timezone??"UTC")}if(o.triggerType==="task_event"){$(t.event??"COMPLETED");const s=t.filter;k((s==null?void 0:s.projectKey)??""),F((s==null?void 0:s.taskMode)??"")}const i=o.taskConfig;L((i==null?void 0:i.agentType)??"claude"),z(o.notifyProjectChats),Z(!0)},[o,n,q]);const H=t=>{j(t),t&&g(t)},J=r.useCallback(async()=>{if(!b.trim()){m.error(a("automation.name_required"));return}if(l.length===0){m.error(a("automation.project_required"));return}let t={};if(c==="cron"){if(!p.trim()){m.error(a("automation.cron_expression_required"));return}if(!me(p)){m.error(a("automation.cron_expression_invalid"));return}t={cron:p,timezone:d}}else c==="task_event"&&(t={event:_,filter:{...x&&{projectKey:x},...h&&{taskMode:h}}});I(!0);try{await S(n,{projectKey:l[0],projectKeys:l,name:b.trim(),description:y.trim(),triggerType:c,triggerConfig:t,executionMode:f,taskConfig:{...(o==null?void 0:o.taskConfig)??{},agentType:N},notifyProjectChats:C}),m.success(a("automation.automation_updated")),u(`/automations/${n}`)}catch(i){const s=i instanceof Error?i.message:a("automation.failed_update");m.error(s)}finally{I(!1)}},[b,y,l,c,p,d,_,x,h,f,N,C,n,S,u,a]);return B&&!o?e.jsx("div",{className:"mx-auto max-w-2xl px-2 py-4 md:px-4 md:py-6 font-mono",children:e.jsx(ne,{rows:6})}):!o||o.id!==n?e.jsx("div",{className:"mx-auto max-w-2xl px-2 py-4 md:px-4 md:py-6 font-mono",children:e.jsx(le,{icon:ie,title:a("automation.automation_not_found")})}):e.jsxs("div",{className:"mx-auto max-w-2xl px-2 py-4 md:px-4 md:py-6 font-mono",children:[e.jsxs("div",{className:"mb-6 flex items-center gap-3",children:[e.jsx("button",{onClick:()=>u(`/automations/${n}`),className:"rounded-[4px] p-1.5 text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:e.jsx(ce,{className:"h-4 w-4"})}),e.jsx("h1",{className:"text-sm font-bold text-[var(--text-primary)]",children:a("automation.edit_title")})]}),e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"edit-projects",className:"mb-1.5 block text-[11px] text-[var(--text-muted)]",children:a("automation.project")}),e.jsx(oe,{values:l,onChange:A,options:D.map(t=>({value:t.key,label:`${t.name} (${t.key})`})),placeholder:a("automation.select_project")})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"edit-name",className:"mb-1.5 block text-[11px] text-[var(--text-muted)]",children:a("automation.name")}),e.jsx("input",{id:"edit-name",type:"text",value:b,onChange:t=>T(t.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] outline-none focus:border-[var(--accent)]"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"edit-description",className:"mb-1.5 block text-[11px] text-[var(--text-muted)]",children:a("automation.description")}),e.jsx("textarea",{id:"edit-description",value:y,onChange:t=>w(t.target.value),rows:4,placeholder:a("automation.description_placeholder"),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] outline-none focus:border-[var(--accent)] resize-none"}),e.jsx("p",{className:"mt-1 text-[10px] text-[var(--text-muted)]",children:a("automation.template_vars")})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-[11px] text-[var(--text-muted)]",children:a("automation.trigger_type")}),e.jsx("div",{className:"flex gap-2",children:["cron","task_event","manual"].map(t=>e.jsx("button",{onClick:()=>P(t),className:`flex-1 rounded-[4px] border px-3 py-2 text-xs transition-colors ${c===t?"border-[var(--accent)] text-[var(--accent)] bg-[var(--accent)]/5":"border-[var(--border)] text-[var(--text-secondary)] hover:text-[var(--text-primary)]"}`,children:t},t))})]}),c==="cron"&&e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("label",{className:"block text-[11px] font-bold text-[var(--text-primary)]",children:a("automation.cron_config")}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"edit-cron-preset",className:"mb-1 block text-[10px] text-[var(--text-muted)]",children:a("automation.preset")}),e.jsx(v,{value:V,onChange:H,options:R.map(t=>({value:t.value,label:`${t.label}${t.value?` (${t.value})`:""}`}))})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"edit-cron-expression",className:"mb-1 block text-[10px] text-[var(--text-muted)]",children:a("automation.cron_expression")}),e.jsx("input",{id:"edit-cron-expression",type:"text",value:p,onChange:t=>{g(t.target.value),j("")},placeholder:"* * * * *",className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs font-mono text-[var(--text-primary)] placeholder:text-[var(--text-muted)] outline-none focus:border-[var(--accent)]"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"edit-timezone",className:"mb-1 block text-[10px] text-[var(--text-muted)]",children:a("automation.timezone")}),e.jsx(v,{value:d,onChange:M,options:[...d&&!U.includes(d)?[{value:d,label:d}]:[],...U.map(t=>({value:t,label:t}))]})]})]}),c==="task_event"&&e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsx("label",{className:"block text-[11px] font-bold text-[var(--text-primary)]",children:a("automation.task_event_config")}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"edit-event-type",className:"mb-1 block text-[10px] text-[var(--text-muted)]",children:a("automation.event_type")}),e.jsx(v,{value:_,onChange:$,options:de})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"edit-filter-project",className:"mb-1 block text-[10px] text-[var(--text-muted)]",children:a("automation.filter_project_key")}),e.jsx(v,{value:x,onChange:k,options:[{value:"",label:a("automation.all_projects")},...D.filter(t=>l.includes(t.key)).map(t=>({value:t.key,label:`${t.name} (${t.key})`}))],disabled:l.length===0})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"edit-filter-mode",className:"mb-1 block text-[10px] text-[var(--text-muted)]",children:a("automation.filter_task_mode")}),e.jsx(v,{value:h,onChange:F,options:[{value:"",label:a("automation.all_modes")},{value:"develop",label:"develop"},{value:"review",label:"review"}]})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-[11px] text-[var(--text-muted)]",children:a("automation.execution_mode")}),e.jsx("div",{className:"flex gap-2",children:["readonly","writable"].map(t=>e.jsx("button",{onClick:()=>K(t),className:`flex-1 rounded-[4px] border px-3 py-2 text-xs transition-colors ${f===t?"border-[var(--accent)] text-[var(--accent)] bg-[var(--accent)]/5":"border-[var(--border)] text-[var(--text-secondary)] hover:text-[var(--text-primary)]"}`,children:t},t))}),e.jsx("p",{className:"mt-1 text-[10px] text-[var(--text-muted)]",children:a(f==="writable"?"automation.writable_hint":"automation.readonly_hint")})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-[11px] text-[var(--text-muted)]",children:a("automation.agent_type")}),e.jsx("div",{className:"flex gap-2",children:xe.map(t=>e.jsx("button",{onClick:()=>L(t.value),className:`flex-1 rounded-[4px] border px-3 py-2 text-xs transition-colors ${N===t.value?"border-[var(--accent)] text-[var(--accent)] bg-[var(--accent)]/5":"border-[var(--border)] text-[var(--text-secondary)] hover:text-[var(--text-primary)]"}`,children:t.label},t.value))})]}),e.jsxs("div",{children:[e.jsx(se,{checked:C,onCheckedChange:z,label:a("automation.notify_project_chats")}),e.jsx("p",{className:"mt-1 pl-6 text-[10px] text-[var(--text-muted)]",children:a("automation.notify_project_chats_hint")})]}),e.jsxs("div",{className:"flex gap-3 pt-2",children:[e.jsx("button",{onClick:J,disabled:O,className:"flex-1 rounded-[4px] bg-[var(--accent)] px-4 py-2.5 text-xs font-bold text-black disabled:opacity-40 disabled:cursor-not-allowed transition-opacity hover:opacity-90",children:a(O?"automation.saving":"automation.save_changes")}),e.jsx("button",{onClick:()=>u(`/automations/${n}`),className:"rounded-[4px] border border-[var(--border)] px-4 py-2.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:a("automation.cancel")})]})]})]})}export{_e as default};