@overlordai/server 1.0.174 → 1.0.175

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 (114) hide show
  1. package/dist/adapters/nlu.service.js +1 -1
  2. package/dist/notifier/notification-consumer.d.ts.map +1 -1
  3. package/dist/notifier/notification-consumer.js +5 -3
  4. package/dist/notifier/notification-consumer.js.map +1 -1
  5. package/package.json +4 -4
  6. package/public/assets/{AccessTokensPage-CBlLkkX6.js → AccessTokensPage-BlZBgj0-.js} +1 -1
  7. package/public/assets/{AdminPage-mynf8ODr.js → AdminPage-C0OFG0LC.js} +1 -1
  8. package/public/assets/{AgentCliPage-DrnciW6T.js → AgentCliPage-Ci2XVaN8.js} +1 -1
  9. package/public/assets/{ApiReferencePage-DRe_cm_m.js → ApiReferencePage-Dm9y-zCM.js} +1 -1
  10. package/public/assets/{ArchitecturePage-DNoVjW-a.js → ArchitecturePage-BetPO5Ws.js} +1 -1
  11. package/public/assets/{AuditLogPage-B1eTcJBR.js → AuditLogPage-Dbd27v1s.js} +1 -1
  12. package/public/assets/AutomationCreatePage-BvSw8KoZ.js +1 -0
  13. package/public/assets/{AutomationDetailPage-DWshoZlm.js → AutomationDetailPage-1Y2tp1KP.js} +1 -1
  14. package/public/assets/AutomationEditPage-C9UO1XrW.js +1 -0
  15. package/public/assets/AutomationListPage-CJk8o3Vp.js +26 -0
  16. package/public/assets/{AutomationRunDetailPage-D0oJoBJW.js → AutomationRunDetailPage-h7T4V9Yq.js} +1 -1
  17. package/public/assets/{BindPlatformPage-BTgH5eI0.js → BindPlatformPage-DpzV1bpB.js} +1 -1
  18. package/public/assets/{BotIntegrationPage-D6GXacbO.js → BotIntegrationPage-9kAG4BIL.js} +1 -1
  19. package/public/assets/{BotManage-Cn_zH3U4.js → BotManage-BanZ5a5-.js} +1 -1
  20. package/public/assets/{BotSetupPage-DTb0r78_.js → BotSetupPage-BZIfJYqL.js} +1 -1
  21. package/public/assets/{ChangelogPage-CNfqrRty.js → ChangelogPage-Da8n7_T3.js} +1 -1
  22. package/public/assets/{Checkbox-D1hAKR9E.js → Checkbox-Dsj1BuTd.js} +1 -1
  23. package/public/assets/{CliReferencePage-DK4sv8D8.js → CliReferencePage-BDFsLYmx.js} +1 -1
  24. package/public/assets/{ConfirmStageDialog-Bi3nbWlh.js → ConfirmStageDialog-BUTA9YZ1.js} +1 -1
  25. package/public/assets/{DeploymentPage-xKePKzHX.js → DeploymentPage-B5TlN0FI.js} +1 -1
  26. package/public/assets/{DevWorkflowPage-DHNtwyat.js → DevWorkflowPage-Abvhng0F.js} +1 -1
  27. package/public/assets/{DeveloperManage-Di8MWrTf.js → DeveloperManage-DPSHCC6K.js} +1 -1
  28. package/public/assets/{DeveloperSetupPage-C7_LFKDA.js → DeveloperSetupPage-QipfVSjp.js} +1 -1
  29. package/public/assets/{DocsIndexPage-DDcOuwlz.js → DocsIndexPage-Dw-saIXq.js} +1 -1
  30. package/public/assets/{DocsLayout-B477jsxk.js → DocsLayout-BsGaDVp1.js} +1 -1
  31. package/public/assets/{DocsPrimitives-CgyoKAir.js → DocsPrimitives-Bv8TQpkc.js} +1 -1
  32. package/public/assets/{EditProjectPage-Dfm319Z2.js → EditProjectPage-CtNCwK-z.js} +1 -1
  33. package/public/assets/{EmptyState-P0FzomcO.js → EmptyState-BpbqIJyG.js} +1 -1
  34. package/public/assets/{EnvVariablesPage-CnQo2yCF.js → EnvVariablesPage-D5Cn_E5P.js} +1 -1
  35. package/public/assets/{HomePage-Da2G6_QB.js → HomePage-BFNO_Hk6.js} +1 -1
  36. package/public/assets/{InfoRow-DbxM6iML.js → InfoRow-BCDb21nt.js} +1 -1
  37. package/public/assets/{InstallationPage-CuOWbc1H.js → InstallationPage-DLW6MXhs.js} +1 -1
  38. package/public/assets/{LandingPage-Cbvdm3eI.js → LandingPage-BLcQBvuD.js} +1 -1
  39. package/public/assets/{LocalDevelopmentPage-0icX-WcV.js → LocalDevelopmentPage-BnbdovKe.js} +1 -1
  40. package/public/assets/{LoginPage-6JnXQfU3.js → LoginPage-Bh-p4hP9.js} +1 -1
  41. package/public/assets/{MetricBar-Dc-VQSMu.js → MetricBar-DLR15rum.js} +1 -1
  42. package/public/assets/{MultiSelect-DCWH4BA8.js → MultiSelect-BKtGWYgt.js} +1 -1
  43. package/public/assets/{NotFoundPage-DDuYP8W4.js → NotFoundPage-BpUwim1l.js} +1 -1
  44. package/public/assets/{OnboardingGuide-B0V0r8s3.js → OnboardingGuide-BTsSW7Mq.js} +1 -1
  45. package/public/assets/{PermissionsPage-B0ggYIb5.js → PermissionsPage-A828G2ih.js} +1 -1
  46. package/public/assets/{PipelineConfigPage-DtZQzMEH.js → PipelineConfigPage-Cw1OxgKV.js} +1 -1
  47. package/public/assets/{PipelineEditorPage-BJvEIr25.js → PipelineEditorPage-tewviYrj.js} +1 -1
  48. package/public/assets/{PlanPage-C86YOhVS.js → PlanPage-Bidp5iEn.js} +1 -1
  49. package/public/assets/{ProfilePage-BnWgT5TC.js → ProfilePage-DgFxZS6i.js} +1 -1
  50. package/public/assets/{ProjectDetailPage-DGQH-J_A.js → ProjectDetailPage-BoIU1U3V.js} +1 -1
  51. package/public/assets/{ProjectListPage-CNCAX69Y.js → ProjectListPage-DMoN7Ghc.js} +1 -1
  52. package/public/assets/{PtyTerminal-kO8wCuuU.js → PtyTerminal-QdM0LGge.js} +1 -1
  53. package/public/assets/{QuickAuth-DARffZGR.js → QuickAuth-CGnZQLaj.js} +1 -1
  54. package/public/assets/{RemoveMemberConfirmDialog-D9rPijXx.js → RemoveMemberConfirmDialog-uFuATit4.js} +1 -1
  55. package/public/assets/{ReviewAggregatePage-Bc1K6gXO.js → ReviewAggregatePage-D5S57j51.js} +1 -1
  56. package/public/assets/{ReviewPage-BPDRxqrG.js → ReviewPage-tkUY7vrY.js} +1 -1
  57. package/public/assets/{Select-CgGQnjuL.js → Select-CC0FnszM.js} +1 -1
  58. package/public/assets/{SettingsPage-Dqser9QV.js → SettingsPage-DiecpWAG.js} +1 -1
  59. package/public/assets/{Skeleton-KIdOfHCh.js → Skeleton-WCDZdltv.js} +1 -1
  60. package/public/assets/{SkillPage-kituG7_x.js → SkillPage-ABYkJSop.js} +1 -1
  61. package/public/assets/{TaskDetailPage-DQVE-zp-.js → TaskDetailPage-D6qSqsm0.js} +1 -1
  62. package/public/assets/{TaskGuidePage-D3sA_3Vy.js → TaskGuidePage-CFzoePPd.js} +1 -1
  63. package/public/assets/{TaskListPage-arWi98DB.js → TaskListPage-rDPMfjmN.js} +1 -1
  64. package/public/assets/{TaskStatusBadge-D9epJQNe.js → TaskStatusBadge-CzUIb3QQ.js} +1 -1
  65. package/public/assets/{TerminalHomePage-Cl2Uh4Hp.js → TerminalHomePage-DP-gqkiq.js} +1 -1
  66. package/public/assets/{TokenManage-DOg2xTt8.js → TokenManage-CbLsJbR9.js} +1 -1
  67. package/public/assets/{Tooltip-D1qzP0lG.js → Tooltip-Ds3lc4sS.js} +1 -1
  68. package/public/assets/{TotpSetupPage-CCbH89j8.js → TotpSetupPage-Bakhx3kM.js} +1 -1
  69. package/public/assets/{WorkerDetailPage-PtA39Lz5.js → WorkerDetailPage-W_1tf-Ng.js} +1 -1
  70. package/public/assets/{WorkerListPage-Rq7zwaP2.js → WorkerListPage-DAgJojBW.js} +1 -1
  71. package/public/assets/{WorkerOperationsPage-CapQErvu.js → WorkerOperationsPage-BE8gDr3P.js} +1 -1
  72. package/public/assets/{WorkerSetupGuidePage-BVgaWQP0.js → WorkerSetupGuidePage-Cjwu7yCO.js} +1 -1
  73. package/public/assets/{WorkerSetupPage-D-T4O7PE.js → WorkerSetupPage-C4F2PDWx.js} +1 -1
  74. package/public/assets/agent-type-options-BTd_pbKQ.js +1 -0
  75. package/public/assets/{arrow-left-CsRQX7H5.js → arrow-left-Czit8jGK.js} +1 -1
  76. package/public/assets/{arrow-right-lhj-X9Ah.js → arrow-right-DUvU3ZSE.js} +1 -1
  77. package/public/assets/{bot-BI0aOjZg.js → bot-xYitrdXz.js} +1 -1
  78. package/public/assets/{chevron-down-BMMNE8tj.js → chevron-down-DwSdaR46.js} +1 -1
  79. package/public/assets/{chevron-left-C5QPcYfE.js → chevron-left-DMFdbT8q.js} +1 -1
  80. package/public/assets/{chevron-right-DUJ8mQK2.js → chevron-right-BqoEBUXc.js} +1 -1
  81. package/public/assets/{chevron-up-tdj0sbLv.js → chevron-up-4jZShvn6.js} +1 -1
  82. package/public/assets/{circle-alert-CMpAAr9i.js → circle-alert-gAYg5DQY.js} +1 -1
  83. package/public/assets/{clock-CM8cLcAb.js → clock-Bn8CRcdc.js} +1 -1
  84. package/public/assets/{copy-DEFukTLk.js → copy-_C7txolK.js} +1 -1
  85. package/public/assets/{download-enKZtRO3.js → download-CGR9pdGa.js} +1 -1
  86. package/public/assets/{external-link-DLg1H4XY.js → external-link-DGEar13h.js} +1 -1
  87. package/public/assets/{git-fork-BLuZ7mG_.js → git-fork-bd2vu3ng.js} +1 -1
  88. package/public/assets/{index-6n4YMG-q.js → index-DAwsREkq.js} +5 -5
  89. package/public/assets/{key-DdT50FZZ.js → key-b6kn-A1T.js} +1 -1
  90. package/public/assets/{loader-circle-BsR1MJQw.js → loader-circle-vH-Hp_AS.js} +1 -1
  91. package/public/assets/{pencil-wJOYzbVI.js → pencil-Cxzh8oiw.js} +1 -1
  92. package/public/assets/{play-sxSJsoXu.js → play-bFi1k4eQ.js} +1 -1
  93. package/public/assets/{plus-B3b8vXw9.js → plus-DJTaWh3N.js} +1 -1
  94. package/public/assets/{rotate-ccw-Wq-FsTE-.js → rotate-ccw-CXFQ7046.js} +1 -1
  95. package/public/assets/{scroll-text-DrPNg6ww.js → scroll-text-UIbwyc0E.js} +1 -1
  96. package/public/assets/{settings-CG53o23z.js → settings-DA_C9Znv.js} +1 -1
  97. package/public/assets/{skip-forward-gDc2Yb8q.js → skip-forward-C71GgwGt.js} +1 -1
  98. package/public/assets/{status-colors-D1PZs9TB.js → status-colors-C14ffr9M.js} +1 -1
  99. package/public/assets/{task-agent-DZDHjrS-.js → task-agent-BasiQZ0L.js} +1 -1
  100. package/public/assets/{task-constants-CCKesKBc.js → task-constants-DihuKtBw.js} +1 -1
  101. package/public/assets/{task.store-yMf_13Ff.js → task.store-MpV9TV7z.js} +1 -1
  102. package/public/assets/{timer-tBxBLW3s.js → timer-COkLkLUF.js} +1 -1
  103. package/public/assets/{trash-2--fHS3BRC.js → trash-2-CDhJihtl.js} +1 -1
  104. package/public/assets/{useFetch-CBIWj1ZT.js → useFetch-CgkGfhaP.js} +1 -1
  105. package/public/assets/{users-BWDidnLE.js → users-BwpIig9c.js} +1 -1
  106. package/public/assets/{wifi-BTg-eNKI.js → wifi-D5o6IWuC.js} +1 -1
  107. package/public/assets/{workflow-CBP21ght.js → workflow-DXTOpHef.js} +1 -1
  108. package/public/assets/{zap-Dhvfo8tD.js → zap-CEUF2oJs.js} +1 -1
  109. package/public/index.html +1 -1
  110. package/public/sw.js +1 -1
  111. package/public/assets/AutomationCreatePage-CukXfCtB.js +0 -1
  112. package/public/assets/AutomationEditPage-DL3-RPcj.js +0 -1
  113. package/public/assets/AutomationListPage-DGH6MsJc.js +0 -26
  114. package/public/assets/agent-type-options-CvfN3Xkt.js +0 -1
@@ -46,7 +46,7 @@ const SYSTEM_PROMPT = `You are a command classifier for Overlord, an AI agent fl
46
46
  Your job: parse the user's natural language message into a structured JSON command.
47
47
 
48
48
  Available commands:
49
- - develop: Create a coding task. Requires a "description" (the task to do). Optional: "project" (project key), "worker" (target worker name), "taskType" (feat|fix|refactor|docs|chore), "agentType" (claude|cursor|codex), "branchSlug" (custom branch name), "targetBranch" (target branch for MR, e.g. "develop").
49
+ - develop: Create a coding task. Requires a "description" (the task to do). Optional: "project" (project key), "worker" (target worker name), "taskType" (feat|fix|refactor|docs|chore), "agentType" (claude|cursor|codex|pi), "branchSlug" (custom branch name), "targetBranch" (target branch for MR, e.g. "develop").
50
50
  - show: View task details. Requires "taskId" (number).
51
51
  - cancel: Cancel a task. Requires "taskId" (number).
52
52
  - retry: Retry a failed task. Requires "taskId" (number).
@@ -1 +1 @@
1
- {"version":3,"file":"notification-consumer.d.ts","sourceRoot":"","sources":["../../src/notifier/notification-consumer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AASjD,OAAO,EAAsB,YAAY,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEnF,OAAO,EAAE,sBAAsB,EAAE,MAAM,kDAAkD,CAAC;AAC1F,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAC;AAChF,OAAO,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AACpF,OAAO,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAEhE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAgErD,6CAA6C;AAC7C,eAAO,MAAM,uBAAuB,iBAAiB,CAAC;AAEtD,2CAA2C;AAC3C,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,8DAA8D;IAC9D,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,6CAA6C;IAC7C,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,+CAA+C;IAC/C,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,6DAA6D;IAC7D,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,iDAAiD;IACjD,IAAI,EAAE,IAAI,CAAC;IACX,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CACT,MAAM,EAAE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,qBAAqB;IAyB7B;;OAEG;YACW,qBAAqB;YA6BrB,0BAA0B;IAsCxC;;OAEG;IACH,OAAO,CAAC,YAAY;IAqFpB;;;OAGG;IACH,OAAO,CAAC,cAAc;IAUtB;;;OAGG;IACH,OAAO,CAAC,sBAAsB;CAiB/B"}
@@ -127,9 +127,11 @@ let NotificationConsumer = NotificationConsumer_1 = class NotificationConsumer {
127
127
  async process(job) {
128
128
  const { taskId, eventType, sourcePlatform, sourceChatId, sourceAppId, notificationMsgId, task, extra } = job.data;
129
129
  this.logger.debug(`Processing notification: task=${taskId} event=${eventType} platform=${sourcePlatform}`);
130
- // Re-read task from DB for completed review tasks — the reviewReport field
131
- // may have been persisted by ReviewReportHandler after the job was enqueued.
132
- const freshTask = (eventType === 'task_completed' && task.taskMode === 'review' && !task.reviewReport)
130
+ // Re-read completed review tasks from DB to avoid using the queue snapshot.
131
+ // The job may have been enqueued before ReviewReportHandler persisted the
132
+ // final report, or while an earlier placeholder report was still on the
133
+ // task row. Always prefer the latest DB state for review completion cards.
134
+ const freshTask = (eventType === 'task_completed' && task.taskMode === 'review')
133
135
  ? (this.taskRepo.findById(taskId) ?? task)
134
136
  : task;
135
137
  const enrichedExtra = this.enrichWithProjectInfo(freshTask, eventType, extra);
@@ -1 +1 @@
1
- {"version":3,"file":"notification-consumer.js","sourceRoot":"","sources":["../../src/notifier/notification-consumer.ts"],"names":[],"mappings":";;;;;;;;;;;;;AACA,mDAO8B;AAC9B,2CAAmF;AACnF,mCAAwD;AACxD,8FAA0F;AAC1F,8EAA0E;AAC1E,oFAAgF;AAChF,wFAAoF;AACpF,4EAAwE;AACxE,qEAAgE;AAChE,6CAA+C;AAC/C,yDAAqD;AAErD,0EAA0E;AAC1E,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAC;IACjC,gBAAgB;IAChB,aAAa;IACb,gBAAgB;IAChB,gBAAgB;IAChB,wBAAwB;IACxB,uBAAuB;IACvB,sBAAsB;IACtB,uBAAuB;IACvB,0BAA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e;YAAE,OAAO,IAAI,CAAC;QACnE,KAAK,MAAM,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,EAAE,CAAC;YAC3D,IAAI,SAAS,CAAC,YAAY,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,eAAe,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;gBAClF,OAAO,QAAQ,CAAC;YAClB,CAAC;QACH,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;OAGG;IACK,sBAAsB,CAC5B,MAAc,EACd,IAAU,EACV,KAAa;QAEb,IAAI,CAAC;YACH,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,EAAE;gBAC9D,iBAAiB,EAAE,KAAK;aACzB,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,oEAAoE;YACpE,oDAAoD;YACpD,IAAI,CAAC,MAAM,CAAC,IAAI,CACd,8CAA8C,MAAM,KAAK,IAAA,0BAAe,EAAC,GAAG,CAAC,EAAE,CAChF,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAA;AAzkBY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,mBAAU,GAAE;qCAY0B,gDAAsB;QAC9B,gCAAc;QACX,sCAAiB;QACd,iCAAc;QACb,kCAAe;QACjB,0CAAmB;QACzB,8BAAa;GAjB9B,oBAAoB,CAykBhC"}
1
+ {"version":3,"file":"notification-consumer.js","sourceRoot":"","sources":["../../src/notifier/notification-consumer.ts"],"names":[],"mappings":";;;;;;;;;;;;;AACA,mDAO8B;AAC9B,2CAAmF;AACnF,mCAAwD;AACxD,8FAA0F;AAC1F,8EAA0E;AAC1E,oFAAgF;AAChF,wFAAoF;AACpF,4EAAwE;AACxE,qEAAgE;AAChE,6CAA+C;AAC/C,yDAAqD;AAErD,0EAA0E;AAC1E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",
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.174",
32
- "@overlordai/protocol": "1.0.174",
33
- "@overlordai/validation": "1.0.174",
31
+ "@overlordai/command-parser": "1.0.175",
32
+ "@overlordai/protocol": "1.0.175",
33
+ "@overlordai/validation": "1.0.175",
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-6n4YMG-q.js";import{S as E}from"./Select-CgGQnjuL.js";import{E as L}from"./EmptyState-P0FzomcO.js";import{T as I}from"./Skeleton-KIdOfHCh.js";import{t as N}from"./date-CmcdoD87.js";import{u as R}from"./useFetch-CBIWj1ZT.js";import{P}from"./plus-B3b8vXw9.js";import{C as O}from"./copy-DEFukTLk.js";import{T as w}from"./trash-2--fHS3BRC.js";import"./chevron-down-BMMNE8tj.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-DAwsREkq.js";import{S as E}from"./Select-CC0FnszM.js";import{E as L}from"./EmptyState-BpbqIJyG.js";import{T as I}from"./Skeleton-WCDZdltv.js";import{t as N}from"./date-CmcdoD87.js";import{u as R}from"./useFetch-CgkGfhaP.js";import{P}from"./plus-DJTaWh3N.js";import{C as O}from"./copy-_C7txolK.js";import{T as w}from"./trash-2-CDhJihtl.js";import"./chevron-down-DwSdaR46.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-6n4YMG-q.js";import{U as c}from"./users-BWDidnLE.js";import{B as b}from"./bot-BI0aOjZg.js";import{S as p}from"./scroll-text-DrPNg6ww.js";import{S as x}from"./settings-CG53o23z.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-DAwsREkq.js";import{U as c}from"./users-BwpIig9c.js";import{B as b}from"./bot-xYitrdXz.js";import{S as p}from"./scroll-text-UIbwyc0E.js";import{S as x}from"./settings-DA_C9Znv.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-6n4YMG-q.js";import{a as s}from"./DocsPrimitives-CgyoKAir.js";import"./copy-DEFukTLk.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-DAwsREkq.js";import{a as s}from"./DocsPrimitives-Bv8TQpkc.js";import"./copy-_C7txolK.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-6n4YMG-q.js";import{Q as c}from"./QuickAuth-DARffZGR.js";import{P as h}from"./plus-B3b8vXw9.js";import"./copy-DEFukTLk.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
+ import{f as d,a as o,x as p,r as n,j as t}from"./index-DAwsREkq.js";import{Q as c}from"./QuickAuth-CGnZQLaj.js";import{P as h}from"./plus-DJTaWh3N.js";import"./copy-_C7txolK.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-6n4YMG-q.js";import{C as s}from"./DocsPrimitives-CgyoKAir.js";import"./copy-DEFukTLk.js";const r=` ┌──────────────────┐
1
+ import{j as e}from"./index-DAwsREkq.js";import{C as s}from"./DocsPrimitives-Bv8TQpkc.js";import"./copy-_C7txolK.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-6n4YMG-q.js";import{S as L}from"./Select-CgGQnjuL.js";import{E}from"./EmptyState-P0FzomcO.js";import{T}from"./Skeleton-KIdOfHCh.js";import{S as A}from"./scroll-text-DrPNg6ww.js";import{C as F}from"./chevron-left-C5QPcYfE.js";import{C as P}from"./chevron-right-DUJ8mQK2.js";import"./chevron-down-BMMNE8tj.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-DAwsREkq.js";import{S as L}from"./Select-CC0FnszM.js";import{E}from"./EmptyState-BpbqIJyG.js";import{T}from"./Skeleton-WCDZdltv.js";import{S as A}from"./scroll-text-UIbwyc0E.js";import{C as F}from"./chevron-left-DMFdbT8q.js";import{C as P}from"./chevron-right-BqoEBUXc.js";import"./chevron-down-DwSdaR46.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-DAwsREkq.js";import{S as b}from"./Select-CC0FnszM.js";import{M as ee}from"./MultiSelect-BKtGWYgt.js";import{C as te}from"./Checkbox-Dsj1BuTd.js";import{A as ae}from"./arrow-left-Czit8jGK.js";import"./chevron-down-DwSdaR46.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"},{label:"pi",value:"pi"}],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,4 +1,4 @@
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-6n4YMG-q.js";import{E as w}from"./EmptyState-P0FzomcO.js";import{T as q}from"./Skeleton-KIdOfHCh.js";import{f as k,c as K}from"./date-CmcdoD87.js";import{e as z}from"./automationFindings-DfyQvLZV.js";import{C as _}from"./clock-CM8cLcAb.js";import{A as B}from"./arrow-left-CsRQX7H5.js";import{P as C}from"./play-sxSJsoXu.js";import{T as G}from"./trash-2--fHS3BRC.js";import{T as H}from"./timer-tBxBLW3s.js";import{Z as U}from"./zap-Dhvfo8tD.js";import{E as Z}from"./external-link-DLg1H4XY.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-DAwsREkq.js";import{E as w}from"./EmptyState-BpbqIJyG.js";import{T as q}from"./Skeleton-WCDZdltv.js";import{f as k,c as K}from"./date-CmcdoD87.js";import{e as z}from"./automationFindings-DfyQvLZV.js";import{C as _}from"./clock-Bn8CRcdc.js";import{A as B}from"./arrow-left-Czit8jGK.js";import{P as C}from"./play-bFi1k4eQ.js";import{T as G}from"./trash-2-CDhJihtl.js";import{T as H}from"./timer-COkLkLUF.js";import{Z as U}from"./zap-CEUF2oJs.js";import{E as Z}from"./external-link-DGEar13h.js";/**
2
2
  * @license lucide-react v0.469.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -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-DAwsREkq.js";import{S as v}from"./Select-CC0FnszM.js";import{M as oe}from"./MultiSelect-BKtGWYgt.js";import{C as se}from"./Checkbox-Dsj1BuTd.js";import{T as ne}from"./Skeleton-WCDZdltv.js";import{E as le}from"./EmptyState-BpbqIJyG.js";import{C as ie}from"./clock-Bn8CRcdc.js";import{A as ce}from"./arrow-left-Czit8jGK.js";import"./chevron-down-DwSdaR46.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"},{label:"pi",value:"pi"}],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};