@overlordai/server 1.0.173 → 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.
- package/dist/adapters/confirm-required.utils.d.ts +24 -0
- package/dist/adapters/confirm-required.utils.d.ts.map +1 -0
- package/dist/adapters/confirm-required.utils.js +51 -0
- package/dist/adapters/confirm-required.utils.js.map +1 -0
- package/dist/adapters/lark/lark.adapter.d.ts +5 -3
- package/dist/adapters/lark/lark.adapter.d.ts.map +1 -1
- package/dist/adapters/lark/lark.adapter.js +56 -20
- package/dist/adapters/lark/lark.adapter.js.map +1 -1
- package/dist/adapters/nlu.service.js +1 -1
- package/dist/adapters/slack/slack.adapter.d.ts.map +1 -1
- package/dist/adapters/slack/slack.adapter.js +41 -12
- package/dist/adapters/slack/slack.adapter.js.map +1 -1
- package/dist/app.module.d.ts.map +1 -1
- package/dist/app.module.js +2 -0
- package/dist/app.module.js.map +1 -1
- package/dist/database/repositories/task.repository.d.ts +1 -0
- package/dist/database/repositories/task.repository.d.ts.map +1 -1
- package/dist/database/repositories/task.repository.js +7 -0
- package/dist/database/repositories/task.repository.js.map +1 -1
- package/dist/dispatcher/dispatcher.service.d.ts.map +1 -1
- package/dist/dispatcher/dispatcher.service.js +7 -7
- package/dist/dispatcher/dispatcher.service.js.map +1 -1
- package/dist/dispatcher/dispatcher.types.d.ts +1 -1
- package/dist/dispatcher/dispatcher.types.d.ts.map +1 -1
- package/dist/dispatcher/task-lifecycle.service.d.ts +1 -0
- package/dist/dispatcher/task-lifecycle.service.d.ts.map +1 -1
- package/dist/dispatcher/task-lifecycle.service.js +15 -0
- package/dist/dispatcher/task-lifecycle.service.js.map +1 -1
- package/dist/events/event-types.d.ts +7 -0
- package/dist/events/event-types.d.ts.map +1 -1
- package/dist/notifier/card-actions.d.ts +3 -0
- package/dist/notifier/card-actions.d.ts.map +1 -1
- package/dist/notifier/card-actions.js +6 -0
- package/dist/notifier/card-actions.js.map +1 -1
- package/dist/notifier/notification-consumer.d.ts.map +1 -1
- package/dist/notifier/notification-consumer.js +13 -6
- package/dist/notifier/notification-consumer.js.map +1 -1
- package/dist/notifier/notification-event-listener.d.ts.map +1 -1
- package/dist/notifier/notification-event-listener.js +3 -1
- package/dist/notifier/notification-event-listener.js.map +1 -1
- package/dist/notifier/notifier.service.d.ts +6 -1
- package/dist/notifier/notifier.service.d.ts.map +1 -1
- package/dist/notifier/notifier.service.js +2 -1
- package/dist/notifier/notifier.service.js.map +1 -1
- package/dist/notifier/template.service.d.ts +8 -1
- package/dist/notifier/template.service.d.ts.map +1 -1
- package/dist/notifier/template.service.js +38 -6
- package/dist/notifier/template.service.js.map +1 -1
- package/dist/review/review-comment.service.d.ts +41 -0
- package/dist/review/review-comment.service.d.ts.map +1 -0
- package/dist/review/review-comment.service.js +317 -0
- package/dist/review/review-comment.service.js.map +1 -0
- package/dist/review/review.module.d.ts +3 -0
- package/dist/review/review.module.d.ts.map +1 -0
- package/dist/review/review.module.js +22 -0
- package/dist/review/review.module.js.map +1 -0
- package/dist/web/frame-handlers/review-report.handler.d.ts.map +1 -1
- package/dist/web/frame-handlers/review-report.handler.js +26 -6
- package/dist/web/frame-handlers/review-report.handler.js.map +1 -1
- package/dist/web/frame-handlers/stage-confirm.handler.d.ts +12 -2
- package/dist/web/frame-handlers/stage-confirm.handler.d.ts.map +1 -1
- package/dist/web/frame-handlers/stage-confirm.handler.js +106 -28
- package/dist/web/frame-handlers/stage-confirm.handler.js.map +1 -1
- package/package.json +4 -4
- package/public/assets/{AccessTokensPage-DWRXad3x.js → AccessTokensPage-BlZBgj0-.js} +1 -1
- package/public/assets/{AdminPage-BoIqMBJM.js → AdminPage-C0OFG0LC.js} +1 -1
- package/public/assets/{AgentCliPage-DDk8OWtX.js → AgentCliPage-Ci2XVaN8.js} +1 -1
- package/public/assets/{ApiReferencePage-Bv1wLy5b.js → ApiReferencePage-Dm9y-zCM.js} +1 -1
- package/public/assets/{ArchitecturePage-CxP9hkhF.js → ArchitecturePage-BetPO5Ws.js} +1 -1
- package/public/assets/{AuditLogPage-B7QQ9hah.js → AuditLogPage-Dbd27v1s.js} +1 -1
- package/public/assets/AutomationCreatePage-BvSw8KoZ.js +1 -0
- package/public/assets/{AutomationDetailPage-BY6bseqa.js → AutomationDetailPage-1Y2tp1KP.js} +1 -1
- package/public/assets/AutomationEditPage-C9UO1XrW.js +1 -0
- package/public/assets/AutomationListPage-CJk8o3Vp.js +26 -0
- package/public/assets/{AutomationRunDetailPage-CWPGlBJd.js → AutomationRunDetailPage-h7T4V9Yq.js} +1 -1
- package/public/assets/{BindPlatformPage-DrCQMFXN.js → BindPlatformPage-DpzV1bpB.js} +1 -1
- package/public/assets/{BotIntegrationPage-CFSmmRh1.js → BotIntegrationPage-9kAG4BIL.js} +1 -1
- package/public/assets/{BotManage-C7o5dyKk.js → BotManage-BanZ5a5-.js} +1 -1
- package/public/assets/{BotSetupPage-BgjGC1Ce.js → BotSetupPage-BZIfJYqL.js} +1 -1
- package/public/assets/{ChangelogPage-Bk6LcJiR.js → ChangelogPage-Da8n7_T3.js} +1 -1
- package/public/assets/{Checkbox-BOX6FtEq.js → Checkbox-Dsj1BuTd.js} +1 -1
- package/public/assets/{CliReferencePage-CtWMf_UQ.js → CliReferencePage-BDFsLYmx.js} +1 -1
- package/public/assets/{ConfirmStageDialog-BtyVYk27.js → ConfirmStageDialog-BUTA9YZ1.js} +1 -1
- package/public/assets/{DeploymentPage-CsQj6iic.js → DeploymentPage-B5TlN0FI.js} +1 -1
- package/public/assets/{DevWorkflowPage-uy7WzcsE.js → DevWorkflowPage-Abvhng0F.js} +1 -1
- package/public/assets/{DeveloperManage-BI6Ajrgf.js → DeveloperManage-DPSHCC6K.js} +1 -1
- package/public/assets/{DeveloperSetupPage-D-iex6Or.js → DeveloperSetupPage-QipfVSjp.js} +1 -1
- package/public/assets/{DocsIndexPage-D-KxxA8_.js → DocsIndexPage-Dw-saIXq.js} +1 -1
- package/public/assets/{DocsLayout-BCzKSMhE.js → DocsLayout-BsGaDVp1.js} +1 -1
- package/public/assets/{DocsPrimitives-BzVDx2cs.js → DocsPrimitives-Bv8TQpkc.js} +1 -1
- package/public/assets/{EditProjectPage-BY-qZ5wL.js → EditProjectPage-CtNCwK-z.js} +1 -1
- package/public/assets/{EmptyState-CqF5g3iI.js → EmptyState-BpbqIJyG.js} +1 -1
- package/public/assets/{EnvVariablesPage-BYhrZ5C5.js → EnvVariablesPage-D5Cn_E5P.js} +1 -1
- package/public/assets/{HomePage-Bhanys0H.js → HomePage-BFNO_Hk6.js} +1 -1
- package/public/assets/{InfoRow-BxA58xIa.js → InfoRow-BCDb21nt.js} +1 -1
- package/public/assets/{InstallationPage-Cg1I_2Mi.js → InstallationPage-DLW6MXhs.js} +1 -1
- package/public/assets/{LandingPage-JQqDMBvp.js → LandingPage-BLcQBvuD.js} +1 -1
- package/public/assets/{LocalDevelopmentPage-t1wS_JiB.js → LocalDevelopmentPage-BnbdovKe.js} +1 -1
- package/public/assets/{LoginPage-CgGCdeF7.js → LoginPage-Bh-p4hP9.js} +1 -1
- package/public/assets/{MetricBar-DfTk8Sjr.js → MetricBar-DLR15rum.js} +1 -1
- package/public/assets/{MultiSelect-s1A3k8lX.js → MultiSelect-BKtGWYgt.js} +1 -1
- package/public/assets/{NotFoundPage-BcK6DhJP.js → NotFoundPage-BpUwim1l.js} +1 -1
- package/public/assets/{OnboardingGuide-CnEZNjMO.js → OnboardingGuide-BTsSW7Mq.js} +1 -1
- package/public/assets/{PermissionsPage-DMhgJT_d.js → PermissionsPage-A828G2ih.js} +1 -1
- package/public/assets/{PipelineConfigPage-DLXm99KL.js → PipelineConfigPage-Cw1OxgKV.js} +1 -1
- package/public/assets/{PipelineEditorPage-BVaO5u3d.js → PipelineEditorPage-tewviYrj.js} +1 -1
- package/public/assets/{PlanPage-B3oI7rdU.js → PlanPage-Bidp5iEn.js} +1 -1
- package/public/assets/{ProfilePage-Bo77BD7U.js → ProfilePage-DgFxZS6i.js} +1 -1
- package/public/assets/{ProjectDetailPage-BXap15n_.js → ProjectDetailPage-BoIU1U3V.js} +1 -1
- package/public/assets/{ProjectListPage-Bf5gQWll.js → ProjectListPage-DMoN7Ghc.js} +1 -1
- package/public/assets/{PtyTerminal-Do7JUGQS.js → PtyTerminal-QdM0LGge.js} +1 -1
- package/public/assets/{QuickAuth-EIbjxqlx.js → QuickAuth-CGnZQLaj.js} +1 -1
- package/public/assets/{RemoveMemberConfirmDialog-CGzHpvJv.js → RemoveMemberConfirmDialog-uFuATit4.js} +1 -1
- package/public/assets/{ReviewAggregatePage-Bvk901fs.js → ReviewAggregatePage-D5S57j51.js} +1 -1
- package/public/assets/{ReviewPage-CBEbIkD3.js → ReviewPage-tkUY7vrY.js} +1 -1
- package/public/assets/{Select-BRJxl1YO.js → Select-CC0FnszM.js} +1 -1
- package/public/assets/{SettingsPage-CUznfUgJ.js → SettingsPage-DiecpWAG.js} +1 -1
- package/public/assets/{Skeleton-CkmmCp2B.js → Skeleton-WCDZdltv.js} +1 -1
- package/public/assets/{SkillPage-DmMxzWHC.js → SkillPage-ABYkJSop.js} +1 -1
- package/public/assets/{TaskDetailPage-DF6j4ohL.js → TaskDetailPage-D6qSqsm0.js} +1 -1
- package/public/assets/{TaskGuidePage-1NpVzVqi.js → TaskGuidePage-CFzoePPd.js} +1 -1
- package/public/assets/{TaskListPage-1_Fn21zu.js → TaskListPage-rDPMfjmN.js} +1 -1
- package/public/assets/{TaskStatusBadge-BldGSOah.js → TaskStatusBadge-CzUIb3QQ.js} +1 -1
- package/public/assets/{TerminalHomePage-BIk8jU04.js → TerminalHomePage-DP-gqkiq.js} +1 -1
- package/public/assets/{TokenManage-CMtAf7QR.js → TokenManage-CbLsJbR9.js} +1 -1
- package/public/assets/{Tooltip-EOsBLsZE.js → Tooltip-Ds3lc4sS.js} +1 -1
- package/public/assets/{TotpSetupPage-C7oZEO7M.js → TotpSetupPage-Bakhx3kM.js} +1 -1
- package/public/assets/{WorkerDetailPage-DNUSVoN8.js → WorkerDetailPage-W_1tf-Ng.js} +1 -1
- package/public/assets/{WorkerListPage-Bkb8IGzC.js → WorkerListPage-DAgJojBW.js} +1 -1
- package/public/assets/{WorkerOperationsPage-yH5f32ue.js → WorkerOperationsPage-BE8gDr3P.js} +1 -1
- package/public/assets/{WorkerSetupGuidePage-DADwzbsf.js → WorkerSetupGuidePage-Cjwu7yCO.js} +1 -1
- package/public/assets/{WorkerSetupPage-DAGFtNCP.js → WorkerSetupPage-C4F2PDWx.js} +1 -1
- package/public/assets/agent-type-options-BTd_pbKQ.js +1 -0
- package/public/assets/{arrow-left-DolNA3BD.js → arrow-left-Czit8jGK.js} +1 -1
- package/public/assets/{arrow-right-J0lJRpaW.js → arrow-right-DUvU3ZSE.js} +1 -1
- package/public/assets/{bot-Bf1PX7dx.js → bot-xYitrdXz.js} +1 -1
- package/public/assets/{chevron-down-Cm4So_5j.js → chevron-down-DwSdaR46.js} +1 -1
- package/public/assets/{chevron-left-Cx2ByqjE.js → chevron-left-DMFdbT8q.js} +1 -1
- package/public/assets/{chevron-right-D0k7WYYt.js → chevron-right-BqoEBUXc.js} +1 -1
- package/public/assets/{chevron-up-DVl3qTn3.js → chevron-up-4jZShvn6.js} +1 -1
- package/public/assets/{circle-alert-BojCwibr.js → circle-alert-gAYg5DQY.js} +1 -1
- package/public/assets/{clock-DQeHdtoa.js → clock-Bn8CRcdc.js} +1 -1
- package/public/assets/{copy-CHO7AsGy.js → copy-_C7txolK.js} +1 -1
- package/public/assets/{download-D5cnbFDk.js → download-CGR9pdGa.js} +1 -1
- package/public/assets/{external-link-lvF-co6-.js → external-link-DGEar13h.js} +1 -1
- package/public/assets/{git-fork-DRlvwKYI.js → git-fork-bd2vu3ng.js} +1 -1
- package/public/assets/{index-D9synPeJ.js → index-DAwsREkq.js} +5 -5
- package/public/assets/{key-KezsYJ0O.js → key-b6kn-A1T.js} +1 -1
- package/public/assets/{loader-circle--EO2iEyc.js → loader-circle-vH-Hp_AS.js} +1 -1
- package/public/assets/{pencil-DIvX1Xsb.js → pencil-Cxzh8oiw.js} +1 -1
- package/public/assets/{play-BHrAGNju.js → play-bFi1k4eQ.js} +1 -1
- package/public/assets/{plus-9sncIl_N.js → plus-DJTaWh3N.js} +1 -1
- package/public/assets/{rotate-ccw-Dw8AxO4w.js → rotate-ccw-CXFQ7046.js} +1 -1
- package/public/assets/{scroll-text-CRQexw-n.js → scroll-text-UIbwyc0E.js} +1 -1
- package/public/assets/{settings-CgXh3xHG.js → settings-DA_C9Znv.js} +1 -1
- package/public/assets/{skip-forward-Q2vmwL9H.js → skip-forward-C71GgwGt.js} +1 -1
- package/public/assets/{status-colors-CRgg1N4i.js → status-colors-C14ffr9M.js} +1 -1
- package/public/assets/{task-agent-KZdZD5cO.js → task-agent-BasiQZ0L.js} +1 -1
- package/public/assets/{task-constants-BiYtEhWG.js → task-constants-DihuKtBw.js} +1 -1
- package/public/assets/{task.store-Ds-1t2to.js → task.store-MpV9TV7z.js} +1 -1
- package/public/assets/{timer-ihiO0n04.js → timer-COkLkLUF.js} +1 -1
- package/public/assets/{trash-2-Cb5-yglV.js → trash-2-CDhJihtl.js} +1 -1
- package/public/assets/{useFetch-Dj0ZN58I.js → useFetch-CgkGfhaP.js} +1 -1
- package/public/assets/{users-MLpO39SG.js → users-BwpIig9c.js} +1 -1
- package/public/assets/{wifi-SWAOT6IR.js → wifi-D5o6IWuC.js} +1 -1
- package/public/assets/{workflow-M2c7dT84.js → workflow-DXTOpHef.js} +1 -1
- package/public/assets/{zap-gd-vvEW3.js → zap-CEUF2oJs.js} +1 -1
- package/public/index.html +1 -1
- package/public/sw.js +1 -1
- package/public/assets/AutomationCreatePage-ChPD2oTI.js +0 -1
- package/public/assets/AutomationEditPage-BqeA3DXk.js +0 -1
- package/public/assets/AutomationListPage-DkT1Yv4n.js +0 -26
- package/public/assets/agent-type-options-DXKoGpJI.js +0 -1
|
@@ -16,14 +16,26 @@ class ReviewReportHandler {
|
|
|
16
16
|
async handle(frame, _ctx) {
|
|
17
17
|
const { taskId, report } = frame;
|
|
18
18
|
this.logger.log(`Received review_report for task #${taskId}`);
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
//
|
|
19
|
+
const reportJson = JSON.stringify(report);
|
|
20
|
+
// 1. Find the review task and persist to DB BEFORE any await.
|
|
21
|
+
// The terminal progress frame can arrive right after this frame;
|
|
22
|
+
// FrameHandlerRegistry.dispatch() does not await async handlers,
|
|
23
|
+
// so the synchronous task_completed path may re-read the task row
|
|
24
|
+
// while we're still awaiting Redis. The DB write is synchronous
|
|
25
|
+
// (better-sqlite3) and closes that race.
|
|
22
26
|
const reviewTask = this.taskRepo.findById(taskId);
|
|
23
|
-
if (!reviewTask
|
|
24
|
-
this.logger.warn(`review_report: task #${taskId} not found or has no sourceTaskId`);
|
|
27
|
+
if (reviewTask?.taskMode !== 'review' || !reviewTask.sourceTaskId) {
|
|
28
|
+
this.logger.warn(`review_report: task #${taskId} not found, not a review task, or has no sourceTaskId`);
|
|
25
29
|
return;
|
|
26
30
|
}
|
|
31
|
+
try {
|
|
32
|
+
this.taskRepo.updateReviewReport(taskId, reportJson);
|
|
33
|
+
}
|
|
34
|
+
catch (err) {
|
|
35
|
+
this.logger.warn(`review_report: early DB persist failed for task #${taskId}: ${String(err)}`);
|
|
36
|
+
}
|
|
37
|
+
// 2. Store the report in Redis with 24h TTL (used by round aggregation)
|
|
38
|
+
await this.redis.setex(`review_report:${taskId}`, REVIEW_REPORT_TTL_SEC, reportJson);
|
|
27
39
|
const { sourceTaskId } = reviewTask;
|
|
28
40
|
// 3. Determine which round this task belongs to by scanning round keys.
|
|
29
41
|
// createReviewTasks stores: review_round:{sourceTaskId}:{round} -> { taskIds: [...] }
|
|
@@ -113,10 +125,11 @@ class ReviewReportHandler {
|
|
|
113
125
|
}
|
|
114
126
|
catch { /* keep existing */ }
|
|
115
127
|
}
|
|
116
|
-
// Aggregate issue counts from all reports in this round for the notification
|
|
128
|
+
// Aggregate issue counts and details from all reports in this round for the notification
|
|
117
129
|
let criticalCount = 0;
|
|
118
130
|
let warningCount = 0;
|
|
119
131
|
let suggestionCount = 0;
|
|
132
|
+
const allIssues = [];
|
|
120
133
|
for (const roundTaskId of currentRoundTaskIds) {
|
|
121
134
|
const reportRaw = await this.redis.get(`review_report:${roundTaskId}`);
|
|
122
135
|
if (!reportRaw)
|
|
@@ -130,6 +143,12 @@ class ReviewReportHandler {
|
|
|
130
143
|
warningCount++;
|
|
131
144
|
else if (issue.severity === 'suggestion')
|
|
132
145
|
suggestionCount++;
|
|
146
|
+
allIssues.push({
|
|
147
|
+
severity: issue.severity,
|
|
148
|
+
file: issue.file,
|
|
149
|
+
line: issue.line,
|
|
150
|
+
description: issue.description,
|
|
151
|
+
});
|
|
133
152
|
}
|
|
134
153
|
}
|
|
135
154
|
catch {
|
|
@@ -142,6 +161,7 @@ class ReviewReportHandler {
|
|
|
142
161
|
criticalCount,
|
|
143
162
|
warningCount,
|
|
144
163
|
suggestionCount,
|
|
164
|
+
issues: allIssues,
|
|
145
165
|
});
|
|
146
166
|
// Only auto-mark as reviewed if not explicitly dismissed by user
|
|
147
167
|
const sourceTask = this.taskRepo.findById(sourceTaskId);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"review-report.handler.js","sourceRoot":"","sources":["../../../src/web/frame-handlers/review-report.handler.ts"],"names":[],"mappings":";;;AAAA,2CAAwC;AAMxC,0DAAyF;AAEzF,wDAAwD;AACxD,MAAM,qBAAqB,GAAG,MAAM,CAAC;AAGrC,MAAa,mBAAmB;IAI9B,YACmB,QAAwB,EACxB,KAAmB,EACnB,YAA2B;QAF3B,aAAQ,GAAR,QAAQ,CAAgB;QACxB,UAAK,GAAL,KAAK,CAAc;QACnB,iBAAY,GAAZ,YAAY,CAAe;QANrC,eAAU,GAAG,CAAC,eAAe,CAAC,CAAC;QACvB,WAAM,GAAG,IAAI,eAAM,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;IAM5D,CAAC;IAEJ,KAAK,CAAC,M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4BAAE,eAAe,EAAE,CAAC;wBAC5D,SAAS,CAAC,IAAI,CAAC;4BACb,QAAQ,EAAE,KAAK,CAAC,QAAQ;4BACxB,IAAI,EAAE,KAAK,CAAC,IAAI;4BAChB,IAAI,EAAE,KAAK,CAAC,IAAI;4BAChB,WAAW,EAAE,KAAK,CAAC,WAAW;yBAC/B,CAAC,CAAC;oBACL,CAAC;gBACH,CAAC;gBAAC,MAAM,CAAC;oBACP,0BAA0B;gBAC5B,CAAC;YACH,CAAC;YAED,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,0BAAY,CAAC,qBAAqB,EAAE;gBACzD,YAAY;gBACZ,KAAK,EAAE,YAAY;gBACnB,aAAa;gBACb,YAAY;gBACZ,eAAe;gBACf,MAAM,EAAE,SAAS;aACmB,CAAC,CAAC;YAExC,iEAAiE;YACjE,MAAM,UAAU,GAAG,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;YACxD,IAAI,UAAU,IAAI,UAAU,CAAC,YAAY,KAAK,WAAW,EAAE,CAAC;gBAC1D,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;YAC7D,CAAC;QACH,CAAC;IACH,CAAC;CACF;AAhMD,kDAgMC"}
|
|
@@ -18,8 +18,18 @@ export declare class StageConfirmHandler implements FrameHandler {
|
|
|
18
18
|
constructor(dedupService: DedupService, taskRepo: TaskRepository, notifierService: NotifierService, eventEmitter: EventEmitter2, taskLifecycleService?: TaskLifecycleService | undefined, redis?: RedisService | undefined);
|
|
19
19
|
handle(frame: WorkerUpFrame, _ctx: FrameHandlerContext): Promise<void>;
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
21
|
+
* Check whether this review task is the sole reviewer in its round.
|
|
22
|
+
* Uses expectedCount (set at round creation) for robustness against race conditions.
|
|
22
23
|
*/
|
|
23
|
-
private
|
|
24
|
+
private isSingleReviewerRound;
|
|
25
|
+
private getReviewRoundData;
|
|
26
|
+
private matchesSingleReviewerRound;
|
|
27
|
+
private isSingleReviewerRoundFromDb;
|
|
28
|
+
/**
|
|
29
|
+
* Auto-confirm the fix stage for a single-reviewer round.
|
|
30
|
+
* Falls back to the normal confirm notification if approveFix cannot resume the task.
|
|
31
|
+
*/
|
|
32
|
+
private autoConfirmSingleReviewer;
|
|
33
|
+
private notifySuspended;
|
|
24
34
|
}
|
|
25
35
|
//# sourceMappingURL=stage-confirm.handler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stage-confirm.handler.d.ts","sourceRoot":"","sources":["../../../src/web/frame-handlers/stage-confirm.handler.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,aAAa,EAEd,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AACnF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAC;AAClF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AACpF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAG9D,qBAAa,mBAAoB,YAAW,YAAY;IAKpD,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAC;IACtC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC;IATzB,QAAQ,CAAC,UAAU,WAA6B;IAChD,OAAO,CAAC,QAAQ,CAAC,MAA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AE,YAAY,EAC1B,QAAQ,EAAE,cAAc,EACxB,eAAe,EAAE,eAAe,EAChC,YAAY,EAAE,aAAa,EAC3B,oBAAoB,CAAC,EAAE,oBAAoB,YAAA,EAC3C,KAAK,CAAC,EAAE,YAAY,YAAA;IAGjC,MAAM,CAAC,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;IAyG5E;;;OAGG;YACW,qBAAqB;YA+BrB,kBAAkB;IAiBhC,OAAO,CAAC,0BAA0B;IAelC,OAAO,CAAC,2BAA2B;IAWnC;;;OAGG;YACW,yBAAyB;YAuBzB,eAAe;CAQ9B"}
|
|
@@ -70,31 +70,59 @@ class StageConfirmHandler {
|
|
|
70
70
|
// Transition task from RUNNING → SUSPENDED so approveFix/skipFix can find it
|
|
71
71
|
const task = this.taskRepo.findById(taskId);
|
|
72
72
|
if (task) {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
previousStatus: protocol_1.TaskStatus.RUNNING,
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
// Auto-approve fix for single-reviewer review rounds.
|
|
84
|
-
// Skip notification entirely — the user doesn't need to confirm manually.
|
|
73
|
+
// Check single-reviewer status BEFORE the status update so we can suppress
|
|
74
|
+
// the "task_suspended" notification for single-reviewer auto-approve cases.
|
|
75
|
+
// Without this, the user sees a useless "suspended" card immediately followed
|
|
76
|
+
// by an auto-approve — the suppression avoids that noise.
|
|
77
|
+
// Wrapped in try-catch so Redis failures cannot prevent the status transition.
|
|
78
|
+
let shouldSuppressSuspendedNotification = false;
|
|
85
79
|
if (task.taskMode === 'review' &&
|
|
86
80
|
task.sourceTaskId &&
|
|
87
81
|
stageName === 'fix' &&
|
|
88
|
-
this.taskLifecycleService &&
|
|
89
82
|
this.redis) {
|
|
90
83
|
const sourceTask = this.taskRepo.findById(task.sourceTaskId);
|
|
91
84
|
if (sourceTask?.reviewStatus === 'dismissed') {
|
|
92
85
|
this.logger.log(`Skipping auto-approve for task #${taskId} — source task #${task.sourceTaskId} was dismissed`);
|
|
93
86
|
}
|
|
94
87
|
else {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
88
|
+
try {
|
|
89
|
+
shouldSuppressSuspendedNotification = await this.isSingleReviewerRound(task.sourceTaskId, taskId, task.reviewRound);
|
|
90
|
+
}
|
|
91
|
+
catch (err) {
|
|
92
|
+
this.logger.warn(`isSingleReviewerRound failed for task #${taskId}, falling back to normal confirm: ${String(err)}`);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
let statusUpdated = false;
|
|
97
|
+
if (task.status === protocol_1.TaskStatus.RUNNING) {
|
|
98
|
+
statusUpdated = this.taskRepo.updateStatus(taskId, protocol_1.TaskStatus.SUSPENDED, task.revision, { currentStage: stageName });
|
|
99
|
+
if (statusUpdated) {
|
|
100
|
+
this.eventEmitter.emit(event_types_1.DomainEvents.TASK_STATUS_CHANGED, {
|
|
101
|
+
taskId,
|
|
102
|
+
status: protocol_1.TaskStatus.SUSPENDED,
|
|
103
|
+
previousStatus: protocol_1.TaskStatus.RUNNING,
|
|
104
|
+
suppressNotifications: shouldSuppressSuspendedNotification,
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
// Auto-approve fix for single-reviewer review rounds.
|
|
109
|
+
// Skip manual confirm notifications when the single reviewer can be
|
|
110
|
+
// auto-approved, but preserve the shared status-change event so web
|
|
111
|
+
// clients and other subscribers still observe the lifecycle transition.
|
|
112
|
+
if (task.sourceTaskId && shouldSuppressSuspendedNotification) {
|
|
113
|
+
const autoApproved = await this.autoConfirmSingleReviewer(task.sourceTaskId, taskId);
|
|
114
|
+
if (autoApproved)
|
|
115
|
+
return;
|
|
116
|
+
// Auto-approve failed — check if approveFix partially succeeded and
|
|
117
|
+
// already resumed the task to RUNNING. If so, skip both the suppressed
|
|
118
|
+
// suspended notification and the confirm card (the task is running again).
|
|
119
|
+
if (statusUpdated) {
|
|
120
|
+
const currentTask = this.taskRepo.findById(taskId);
|
|
121
|
+
if (currentTask && currentTask.status !== protocol_1.TaskStatus.SUSPENDED) {
|
|
122
|
+
this.logger.log(`Task #${taskId} already resumed to ${currentTask.status} after partial auto-approve — skipping confirm card`);
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
await this.notifySuspended(taskId);
|
|
98
126
|
}
|
|
99
127
|
}
|
|
100
128
|
await this.notifierService.notifyStageConfirmRequired(task, stageName, prompt, confirmNonce);
|
|
@@ -104,37 +132,87 @@ class StageConfirmHandler {
|
|
|
104
132
|
}
|
|
105
133
|
}
|
|
106
134
|
/**
|
|
107
|
-
*
|
|
135
|
+
* Check whether this review task is the sole reviewer in its round.
|
|
136
|
+
* Uses expectedCount (set at round creation) for robustness against race conditions.
|
|
108
137
|
*/
|
|
109
|
-
async
|
|
110
|
-
if (!this.
|
|
138
|
+
async isSingleReviewerRound(sourceTaskId, reviewTaskId, reviewRound) {
|
|
139
|
+
if (!this.redis)
|
|
111
140
|
return false;
|
|
112
|
-
|
|
141
|
+
if (reviewRound != null && reviewRound > 0) {
|
|
142
|
+
const explicitRound = await this.getReviewRoundData(sourceTaskId, reviewRound);
|
|
143
|
+
if (explicitRound) {
|
|
144
|
+
return this.matchesSingleReviewerRound(explicitRound, reviewTaskId, true);
|
|
145
|
+
}
|
|
146
|
+
return this.isSingleReviewerRoundFromDb(sourceTaskId, reviewTaskId, reviewRound);
|
|
147
|
+
}
|
|
113
148
|
const latestRoundRaw = await this.redis.get(`review_round_count:${sourceTaskId}`);
|
|
114
149
|
if (!latestRoundRaw)
|
|
115
150
|
return false;
|
|
116
151
|
const latestRound = parseInt(latestRoundRaw, 10);
|
|
117
152
|
if (isNaN(latestRound))
|
|
118
153
|
return false;
|
|
119
|
-
|
|
154
|
+
for (let round = latestRound; round >= 1; round--) {
|
|
155
|
+
const roundData = await this.getReviewRoundData(sourceTaskId, round);
|
|
156
|
+
if (!roundData || !roundData.taskIds.includes(reviewTaskId)) {
|
|
157
|
+
continue;
|
|
158
|
+
}
|
|
159
|
+
return this.matchesSingleReviewerRound(roundData, reviewTaskId, false);
|
|
160
|
+
}
|
|
161
|
+
return false;
|
|
162
|
+
}
|
|
163
|
+
async getReviewRoundData(sourceTaskId, round) {
|
|
164
|
+
if (!this.redis)
|
|
165
|
+
return null;
|
|
166
|
+
const roundKey = `review_round:${sourceTaskId}:${round}`;
|
|
120
167
|
const roundRaw = await this.redis.get(roundKey);
|
|
121
168
|
if (!roundRaw)
|
|
169
|
+
return null;
|
|
170
|
+
try {
|
|
171
|
+
return JSON.parse(roundRaw);
|
|
172
|
+
}
|
|
173
|
+
catch {
|
|
174
|
+
return null;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
matchesSingleReviewerRound(roundData, reviewTaskId, allowEmptyMembership) {
|
|
178
|
+
const count = roundData.expectedCount ?? roundData.taskIds.length;
|
|
179
|
+
if (count !== 1)
|
|
122
180
|
return false;
|
|
181
|
+
if (roundData.taskIds.length === 0) {
|
|
182
|
+
return allowEmptyMembership;
|
|
183
|
+
}
|
|
184
|
+
return roundData.taskIds.includes(reviewTaskId);
|
|
185
|
+
}
|
|
186
|
+
isSingleReviewerRoundFromDb(sourceTaskId, reviewTaskId, reviewRound) {
|
|
187
|
+
const roundTasks = this.taskRepo.findBySourceTaskId(sourceTaskId)
|
|
188
|
+
.filter((task) => task.taskMode === 'review' && task.reviewRound === reviewRound);
|
|
189
|
+
return roundTasks.length === 1 && roundTasks[0]?.id === reviewTaskId;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Auto-confirm the fix stage for a single-reviewer round.
|
|
193
|
+
* Falls back to the normal confirm notification if approveFix cannot resume the task.
|
|
194
|
+
*/
|
|
195
|
+
async autoConfirmSingleReviewer(sourceTaskId, reviewTaskId) {
|
|
196
|
+
if (!this.taskLifecycleService) {
|
|
197
|
+
this.logger.warn(`Cannot auto-confirm task #${reviewTaskId} — taskLifecycleService not available`);
|
|
198
|
+
return false;
|
|
199
|
+
}
|
|
123
200
|
try {
|
|
124
|
-
const roundData = JSON.parse(roundRaw);
|
|
125
|
-
if (roundData.taskIds.length !== 1)
|
|
126
|
-
return false;
|
|
127
|
-
if (roundData.taskIds[0] !== reviewTaskId)
|
|
128
|
-
return false;
|
|
129
201
|
await this.taskLifecycleService.approveFix(sourceTaskId, reviewTaskId);
|
|
130
|
-
this.logger.log(`Auto-approved fix for single-reviewer round
|
|
202
|
+
this.logger.log(`Auto-approved fix for single-reviewer round, task #${reviewTaskId}`);
|
|
131
203
|
return true;
|
|
132
204
|
}
|
|
133
205
|
catch (err) {
|
|
134
|
-
this.logger.warn(`Auto-approve fix failed for task #${reviewTaskId}: ${String(err)}`);
|
|
206
|
+
this.logger.warn(`Auto-approve fix failed for single-reviewer task #${reviewTaskId}: ${String(err)}`);
|
|
135
207
|
return false;
|
|
136
208
|
}
|
|
137
209
|
}
|
|
210
|
+
async notifySuspended(taskId) {
|
|
211
|
+
const freshTask = this.taskRepo.findById(taskId);
|
|
212
|
+
if (!freshTask)
|
|
213
|
+
return;
|
|
214
|
+
await this.notifierService.notifyTaskSuspended(freshTask, freshTask.errorMessage ?? 'Task suspended');
|
|
215
|
+
}
|
|
138
216
|
}
|
|
139
217
|
exports.StageConfirmHandler = StageConfirmHandler;
|
|
140
218
|
//# sourceMappingURL=stage-confirm.handler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stage-confirm.handler.js","sourceRoot":"","sources":["../../../src/web/frame-handlers/stage-confirm.handler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAAwC;AACxC,oDAAsC;AAKtC,mDAAkD;AAQlD,0DAAuF;AAEvF,MAAa,mBAAmB;IAI9B,YACmB,YAA0B,EAC1B,QAAwB,EACxB,eAAgC,EAChC,YAA2B,EAC3B,oBA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,EAAE,EAAE,KAAK,YAAY,CAAC;IACvE,CAAC;IAED;;;OAGG;IACK,KAAK,CAAC,yBAAyB,CACrC,YAAoB,EACpB,YAAoB;QAEpB,IAAI,CAAC,IAAI,CAAC,oBAAoB,EAAE,CAAC;YAC/B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,6BAA6B,YAAY,uCAAuC,CAAC,CAAC;YACnG,OAAO,KAAK,CAAC;QACf,CAAC;QAED,IAAI,CAAC;YACH,MAAM,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;YACvE,IAAI,CAAC,MAAM,CAAC,GAAG,CACb,sDAAsD,YAAY,EAAE,CACrE,CAAC;YACF,OAAO,IAAI,CAAC;QACd,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,IAAI,CAAC,MAAM,CAAC,IAAI,CACd,qDAAqD,YAAY,KAAK,MAAM,CAAC,GAAG,CAAC,EAAE,CACpF,CAAC;YACF,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IAEO,KAAK,CAAC,eAAe,CAAC,MAAc;QAC1C,MAAM,SAAS,GAAG,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QACjD,IAAI,CAAC,SAAS;YAAE,OAAO;QACvB,MAAM,IAAI,CAAC,eAAe,CAAC,mBAAmB,CAC5C,SAAS,EACT,SAAS,CAAC,YAAY,IAAI,gBAAgB,CAC3C,CAAC;IACJ,CAAC;CACF;AAvOD,kDAuOC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@overlordai/server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.175",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
"@nestjs/platform-express": "^10.4.0",
|
|
29
29
|
"@nestjs/platform-ws": "^10.4.0",
|
|
30
30
|
"@nestjs/websockets": "^10.4.0",
|
|
31
|
-
"@overlordai/command-parser": "1.0.
|
|
32
|
-
"@overlordai/protocol": "1.0.
|
|
33
|
-
"@overlordai/validation": "1.0.
|
|
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-
|
|
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-
|
|
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-D9synPeJ.js";import{a as s}from"./DocsPrimitives-BzVDx2cs.js";import"./copy-CHO7AsGy.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};
|