@open-mercato/cezar 0.20.0-pr2192.5251 → 0.20.0
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/server/agent-setup-routes.d.ts +14 -14
- package/dist/server/dashboard.d.ts +54 -54
- package/dist/server/server.d.ts +68 -68
- package/dist/server/worktree-lifecycle.d.ts +90 -90
- package/dist/telemetry-service.json +1 -0
- package/dist/workflows/run-env-keys.d.ts +8 -0
- package/dist/workflows/run-env-keys.js +14 -0
- package/dist/workflows/run-env-keys.js.map +1 -0
- package/package.json +5 -5
- package/web/dist/assets/{active-forge-KyXM3uG9.js → active-forge-CkAcQPDz.js} +1 -1
- package/web/dist/assets/{agent-task-pickers-UkVtTCna.js → agent-task-pickers-BXCIulS3.js} +1 -1
- package/web/dist/assets/{alert-dialog-DT465VL4.js → alert-dialog-B2Vi6MQZ.js} +1 -1
- package/web/dist/assets/{ask-card-DVv8mY_R.js → ask-card-DPIjQSs8.js} +1 -1
- package/web/dist/assets/{assets-view-D22vr-oN.js → assets-view-CsFjfV2n.js} +1 -1
- package/web/dist/assets/{automation-format-KxcnBz7L.js → automation-format-CMG-6CYi.js} +1 -1
- package/web/dist/assets/{automations-route-3gfbxDq2.js → automations-route-Dd7F6b4F.js} +1 -1
- package/web/dist/assets/{button-CEskWahs.js → button-CJXK1JqU.js} +1 -1
- package/web/dist/assets/{centered-state-Cpzaj75Y.js → centered-state-DE6sgEMs.js} +1 -1
- package/web/dist/assets/{chip-CEZRGBV7.js → chip-DTCkrr8F.js} +1 -1
- package/web/dist/assets/{collapsible-ZLdkcdMa.js → collapsible-DHALizq-.js} +1 -1
- package/web/dist/assets/{command-CcbuBum7.js → command-CwP_dLx3.js} +1 -1
- package/web/dist/assets/{commit-list-BSjLQA6p.js → commit-list-BJeaIEp4.js} +1 -1
- package/web/dist/assets/{compare-variants-C9soYpuE.js → compare-variants-CYv97XSw.js} +1 -1
- package/web/dist/assets/{composer-Bz8ZfbHr.js → composer-C-aBJhY0.js} +1 -1
- package/web/dist/assets/{composer-attachments-BD2enHFJ.js → composer-attachments-ChelZhq4.js} +1 -1
- package/web/dist/assets/{dashboard-Bl6qWW8i.js → dashboard-Dh65_Yi7.js} +1 -1
- package/web/dist/assets/{dialog-nn9sCNvn.js → dialog-DVZE8yAO.js} +1 -1
- package/web/dist/assets/{diff-FrEDv09S.js → diff-aKT-mpn8.js} +2 -2
- package/web/dist/assets/{diff-stat-zisAayZW.js → diff-stat-DPetRUXO.js} +1 -1
- package/web/dist/assets/{diff-view-BeoeZVcx.js → diff-view-m4TvXu0y.js} +1 -1
- package/web/dist/assets/{dist-B_KqW6o6.js → dist-Bsi6zLdE.js} +1 -1
- package/web/dist/assets/{dropdown-menu-ayNafd3n.js → dropdown-menu-BKvUsb5Y.js} +1 -1
- package/web/dist/assets/{file-preview-Dzc3RFUx.js → file-preview-C2EkjhOh.js} +1 -1
- package/web/dist/assets/{follow-up-engine-Dul_3U9s.js → follow-up-engine-BnRCTyQ4.js} +1 -1
- package/web/dist/assets/{git-tab-loading-DG4p-eF4.js → git-tab-loading-DpG2D8Vl.js} +1 -1
- package/web/dist/assets/{github-DvZE0hDJ.js → github-CWRtsamJ.js} +1 -1
- package/web/dist/assets/{host-usage-GTjB03IM.js → host-usage-B8ohHYHR.js} +1 -1
- package/web/dist/assets/{icon-tooltip-DRhwcic2.js → icon-tooltip-DYk5cjLx.js} +1 -1
- package/web/dist/assets/{impact-control-CTdtyfcn.js → impact-control-ClslFBBA.js} +1 -1
- package/web/dist/assets/{impact-model-CpNcUgTV.js → impact-model-DCDyRxcf.js} +1 -1
- package/web/dist/assets/{index-BMA7ZpLG.js → index-BfbbA0lF.js} +4 -4
- package/web/dist/assets/{input-BtDLUR9Q.js → input-DofKzJZl.js} +1 -1
- package/web/dist/assets/{loading-state-BTvZxCb2.js → loading-state-NiNQtJ5H.js} +1 -1
- package/web/dist/assets/{manager-avatar-Ct1uVuvZ.js → manager-avatar-CKfqcoJQ.js} +1 -1
- package/web/dist/assets/{manager-chat-BfxPyXv3.js → manager-chat-BdigDKYZ.js} +1 -1
- package/web/dist/assets/{manager-index-CeMdRtKd.js → manager-index-D0TOmxr6.js} +1 -1
- package/web/dist/assets/{manager-new-Bs8_CMUR.js → manager-new-CCet_7u8.js} +1 -1
- package/web/dist/assets/{manager-settings-Bv2EqZvs.js → manager-settings-I1AeATjr.js} +1 -1
- package/web/dist/assets/{managers-DDPXJoKR.js → managers-Dr63u21Y.js} +1 -1
- package/web/dist/assets/{markdown-3rt1rOmI.js → markdown-CXJIKz2i.js} +1 -1
- package/web/dist/assets/{markdown-LlPZylt7.js → markdown-YSf01kqC.js} +1 -1
- package/web/dist/assets/{mascot-picker-BuGxdrpW.js → mascot-picker-C4s7n9Fc.js} +1 -1
- package/web/dist/assets/{new-task-form-BoiK41PS.js → new-task-form-2p4cXcVQ.js} +1 -1
- package/web/dist/assets/{picker-pill-CzANlEqt.js → picker-pill-Dv9H0dRF.js} +1 -1
- package/web/dist/assets/{pill-C2wRS9lg.js → pill-CoDPUIcJ.js} +1 -1
- package/web/dist/assets/{popover-DPba6FvD.js → popover-DUg9gBOn.js} +1 -1
- package/web/dist/assets/{project-router-CnMbTz-a.js → project-router-B1Q3upIJ.js} +1 -1
- package/web/dist/assets/{project-terminal-sfYncenW.js → project-terminal-DbIohh5G.js} +2 -2
- package/web/dist/assets/{provider-auth-alert-DbNH_-XT.js → provider-auth-alert-GxIEkIvw.js} +1 -1
- package/web/dist/assets/{queries-DVZ1lYAo.js → queries-BQUz3Wnb.js} +1 -1
- package/web/dist/assets/{reasoning-effort-pill-al6bbPpw.js → reasoning-effort-pill-BOV3C0If.js} +1 -1
- package/web/dist/assets/{reference-chip-DdxKs2_A.js → reference-chip-BpbybBvl.js} +1 -1
- package/web/dist/assets/{reference-conflict-action-Ci4LDmIm.js → reference-conflict-action-ByDYwT-Y.js} +1 -1
- package/web/dist/assets/{repo-git-BcEGYBrc.js → repo-git-ikURCYEK.js} +1 -1
- package/web/dist/assets/{run-actions-CDKK-8MP.js → run-actions-ChUnbFA7.js} +1 -1
- package/web/dist/assets/{run-diff-JJOUeclX.js → run-diff-B08Fk7dR.js} +1 -1
- package/web/dist/assets/{scroll-within-CfS_Ia4E.js → scroll-within-DMA4ZbQV.js} +1 -1
- package/web/dist/assets/{segmented-Chb1Y4ie.js → segmented-DI7abdqX.js} +1 -1
- package/web/dist/assets/{select-DG3hFvx2.js → select-DL5E3ZAD.js} +1 -1
- package/web/dist/assets/{sheet-DirfZrZD.js → sheet-DPwaj6sk.js} +1 -1
- package/web/dist/assets/{skills-CxWFZgjH.js → skills-BNiKFlUw.js} +1 -1
- package/web/dist/assets/{spinner-CwKcijCN.js → spinner-hSpq0sPM.js} +1 -1
- package/web/dist/assets/{status-dot-CZAbXsOs.js → status-dot-AP_4obOJ.js} +1 -1
- package/web/dist/assets/{tabs-r4PCzkHp.js → tabs-DrhZb97I.js} +1 -1
- package/web/dist/assets/{task-commits-CHnonzuD.js → task-commits-Di0Mc8MX.js} +1 -1
- package/web/dist/assets/{task-graph-DZAjkdmH.js → task-graph-Bpi3lEER.js} +1 -1
- package/web/dist/assets/{task-notes-CHs_WZf5.js → task-notes-DCHLinAF.js} +1 -1
- package/web/dist/assets/{task-workspace-DWGBLHlR.js → task-workspace-DHl5akxu.js} +3 -3
- package/web/dist/assets/{telemetry-onLa6CTl.js → telemetry-3DhVDxf8.js} +1 -1
- package/web/dist/assets/{terminal-drawer-DV7kUP0D.js → terminal-drawer-CEktqC3z.js} +1 -1
- package/web/dist/assets/{terminal-pane-DQAHtCtb.js → terminal-pane-CmmTwiTX.js} +1 -1
- package/web/dist/assets/{terminal-scope-CEQdw5Tz.js → terminal-scope-okFE6qRP.js} +1 -1
- package/web/dist/assets/{textarea-BqeSvPOp.js → textarea-DDyYxCcO.js} +1 -1
- package/web/dist/assets/{thread-items-CNxMLcOo.js → thread-items-C-4IW5zi.js} +1 -1
- package/web/dist/assets/{toaster-4t61QM_C.js → toaster-BoJZiTRl.js} +1 -1
- package/web/dist/assets/{tracker-B7u8exjG.js → tracker-bQUG9SkJ.js} +1 -1
- package/web/dist/assets/{tree-pane-resize-XHzIJDtc.js → tree-pane-resize-xgVK7J9r.js} +1 -1
- package/web/dist/assets/utils-Dp6vCdiU.js +55 -0
- package/web/dist/assets/{workflow-graph-BaZd6m6v.js → workflow-graph-CGMeFErv.js} +1 -1
- package/web/dist/assets/{worktree-lifecycle-YFVatYLd.js → worktree-lifecycle-C18dBDW4.js} +1 -1
- package/web/dist/assets/{worktree-lifecycle-operation-CYHhFvQF.js → worktree-lifecycle-operation-_xqKBVKB.js} +1 -1
- package/web/dist/assets/{zoomable-image-D4B6jvp-.js → zoomable-image-BiM5LfTG.js} +1 -1
- package/web/dist/index.html +46 -46
- package/web/dist/assets/utils-DWwoYTjU.js +0 -60
|
@@ -15,19 +15,6 @@ export declare function worktreeLifecycleRoutes(opts?: {
|
|
|
15
15
|
}): import("hono/hono-base").HonoBase<ProjectApiEnv, {
|
|
16
16
|
"/worktree-lifecycle": {
|
|
17
17
|
$get: {
|
|
18
|
-
output: {
|
|
19
|
-
error: string;
|
|
20
|
-
};
|
|
21
|
-
outputFormat: "json";
|
|
22
|
-
status: 400 | 404 | 409;
|
|
23
|
-
input: {
|
|
24
|
-
query: {
|
|
25
|
-
attentionOnly?: "false" | "true" | undefined;
|
|
26
|
-
cursor?: string | undefined;
|
|
27
|
-
limit?: unknown;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
} | {
|
|
31
18
|
output: {
|
|
32
19
|
worktrees: {
|
|
33
20
|
worktreeId: string;
|
|
@@ -103,23 +90,24 @@ export declare function worktreeLifecycleRoutes(opts?: {
|
|
|
103
90
|
limit?: unknown;
|
|
104
91
|
};
|
|
105
92
|
};
|
|
106
|
-
}
|
|
107
|
-
};
|
|
108
|
-
} & {
|
|
109
|
-
"/worktree-lifecycle/preview": {
|
|
110
|
-
$post: {
|
|
93
|
+
} | {
|
|
111
94
|
output: {
|
|
112
95
|
error: string;
|
|
113
96
|
};
|
|
114
97
|
outputFormat: "json";
|
|
115
98
|
status: 400 | 404 | 409;
|
|
116
99
|
input: {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
100
|
+
query: {
|
|
101
|
+
attentionOnly?: "false" | "true" | undefined;
|
|
102
|
+
cursor?: string | undefined;
|
|
103
|
+
limit?: unknown;
|
|
120
104
|
};
|
|
121
105
|
};
|
|
122
|
-
}
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
} & {
|
|
109
|
+
"/worktree-lifecycle/preview": {
|
|
110
|
+
$post: {
|
|
123
111
|
output: {
|
|
124
112
|
renderedCommand: string;
|
|
125
113
|
variables: {
|
|
@@ -139,11 +127,7 @@ export declare function worktreeLifecycleRoutes(opts?: {
|
|
|
139
127
|
worktreeId?: string | undefined;
|
|
140
128
|
};
|
|
141
129
|
};
|
|
142
|
-
}
|
|
143
|
-
};
|
|
144
|
-
} & {
|
|
145
|
-
"/worktree-lifecycle/operations": {
|
|
146
|
-
$post: {
|
|
130
|
+
} | {
|
|
147
131
|
output: {
|
|
148
132
|
error: string;
|
|
149
133
|
};
|
|
@@ -151,16 +135,15 @@ export declare function worktreeLifecycleRoutes(opts?: {
|
|
|
151
135
|
status: 400 | 404 | 409;
|
|
152
136
|
input: {
|
|
153
137
|
json: {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
intent: "delete-task" | "reclaim" | "remove-worktree";
|
|
157
|
-
} | {
|
|
158
|
-
requestId: string;
|
|
159
|
-
worktreeId: string;
|
|
160
|
-
intent: "orphan";
|
|
138
|
+
command: string;
|
|
139
|
+
worktreeId?: string | undefined;
|
|
161
140
|
};
|
|
162
141
|
};
|
|
163
|
-
}
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
} & {
|
|
145
|
+
"/worktree-lifecycle/operations": {
|
|
146
|
+
$post: {
|
|
164
147
|
output: {
|
|
165
148
|
operation: {
|
|
166
149
|
id: string;
|
|
@@ -224,27 +207,33 @@ export declare function worktreeLifecycleRoutes(opts?: {
|
|
|
224
207
|
intent: "orphan";
|
|
225
208
|
};
|
|
226
209
|
};
|
|
227
|
-
}
|
|
228
|
-
};
|
|
229
|
-
} & {
|
|
230
|
-
"/worktree-lifecycle/operations/:operationId": {
|
|
231
|
-
$get: {
|
|
210
|
+
} | {
|
|
232
211
|
output: {
|
|
233
212
|
error: string;
|
|
234
213
|
};
|
|
235
214
|
outputFormat: "json";
|
|
236
|
-
status: 400;
|
|
215
|
+
status: 400 | 404 | 409;
|
|
237
216
|
input: {
|
|
238
|
-
|
|
239
|
-
|
|
217
|
+
json: {
|
|
218
|
+
requestId: string;
|
|
219
|
+
runId: string;
|
|
220
|
+
intent: "delete-task" | "reclaim" | "remove-worktree";
|
|
221
|
+
} | {
|
|
222
|
+
requestId: string;
|
|
223
|
+
worktreeId: string;
|
|
224
|
+
intent: "orphan";
|
|
240
225
|
};
|
|
241
226
|
};
|
|
242
|
-
}
|
|
227
|
+
};
|
|
228
|
+
};
|
|
229
|
+
} & {
|
|
230
|
+
"/worktree-lifecycle/operations/:operationId": {
|
|
231
|
+
$get: {
|
|
243
232
|
output: {
|
|
244
233
|
error: string;
|
|
245
234
|
};
|
|
246
235
|
outputFormat: "json";
|
|
247
|
-
status: 400
|
|
236
|
+
status: 400;
|
|
248
237
|
input: {
|
|
249
238
|
param: {
|
|
250
239
|
operationId: string;
|
|
@@ -308,27 +297,6 @@ export declare function worktreeLifecycleRoutes(opts?: {
|
|
|
308
297
|
operationId: string;
|
|
309
298
|
};
|
|
310
299
|
};
|
|
311
|
-
};
|
|
312
|
-
};
|
|
313
|
-
} & {
|
|
314
|
-
"/worktree-lifecycle/operations/:operationId/actions": {
|
|
315
|
-
$post: {
|
|
316
|
-
output: {
|
|
317
|
-
error: string;
|
|
318
|
-
};
|
|
319
|
-
outputFormat: "json";
|
|
320
|
-
status: 400;
|
|
321
|
-
input: {
|
|
322
|
-
param: {
|
|
323
|
-
operationId: string;
|
|
324
|
-
};
|
|
325
|
-
} & {
|
|
326
|
-
json: {
|
|
327
|
-
requestId: string;
|
|
328
|
-
expectedRevision: number;
|
|
329
|
-
action: "cancel-task" | "force-delete" | "keep-worktree" | "retry" | "start-anyway" | "stop";
|
|
330
|
-
};
|
|
331
|
-
};
|
|
332
300
|
} | {
|
|
333
301
|
output: {
|
|
334
302
|
error: string;
|
|
@@ -339,14 +307,12 @@ export declare function worktreeLifecycleRoutes(opts?: {
|
|
|
339
307
|
param: {
|
|
340
308
|
operationId: string;
|
|
341
309
|
};
|
|
342
|
-
} & {
|
|
343
|
-
json: {
|
|
344
|
-
requestId: string;
|
|
345
|
-
expectedRevision: number;
|
|
346
|
-
action: "cancel-task" | "force-delete" | "keep-worktree" | "retry" | "start-anyway" | "stop";
|
|
347
|
-
};
|
|
348
310
|
};
|
|
349
|
-
}
|
|
311
|
+
};
|
|
312
|
+
};
|
|
313
|
+
} & {
|
|
314
|
+
"/worktree-lifecycle/operations/:operationId/actions": {
|
|
315
|
+
$post: {
|
|
350
316
|
output: {
|
|
351
317
|
operation: {
|
|
352
318
|
id: string;
|
|
@@ -410,11 +376,7 @@ export declare function worktreeLifecycleRoutes(opts?: {
|
|
|
410
376
|
action: "cancel-task" | "force-delete" | "keep-worktree" | "retry" | "start-anyway" | "stop";
|
|
411
377
|
};
|
|
412
378
|
};
|
|
413
|
-
}
|
|
414
|
-
};
|
|
415
|
-
} & {
|
|
416
|
-
"/worktree-lifecycle/operations/:operationId/output": {
|
|
417
|
-
$get: {
|
|
379
|
+
} | {
|
|
418
380
|
output: {
|
|
419
381
|
error: string;
|
|
420
382
|
};
|
|
@@ -425,9 +387,10 @@ export declare function worktreeLifecycleRoutes(opts?: {
|
|
|
425
387
|
operationId: string;
|
|
426
388
|
};
|
|
427
389
|
} & {
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
390
|
+
json: {
|
|
391
|
+
requestId: string;
|
|
392
|
+
expectedRevision: number;
|
|
393
|
+
action: "cancel-task" | "force-delete" | "keep-worktree" | "retry" | "start-anyway" | "stop";
|
|
431
394
|
};
|
|
432
395
|
};
|
|
433
396
|
} | {
|
|
@@ -436,6 +399,27 @@ export declare function worktreeLifecycleRoutes(opts?: {
|
|
|
436
399
|
};
|
|
437
400
|
outputFormat: "json";
|
|
438
401
|
status: 400 | 404 | 409;
|
|
402
|
+
input: {
|
|
403
|
+
param: {
|
|
404
|
+
operationId: string;
|
|
405
|
+
};
|
|
406
|
+
} & {
|
|
407
|
+
json: {
|
|
408
|
+
requestId: string;
|
|
409
|
+
expectedRevision: number;
|
|
410
|
+
action: "cancel-task" | "force-delete" | "keep-worktree" | "retry" | "start-anyway" | "stop";
|
|
411
|
+
};
|
|
412
|
+
};
|
|
413
|
+
};
|
|
414
|
+
};
|
|
415
|
+
} & {
|
|
416
|
+
"/worktree-lifecycle/operations/:operationId/output": {
|
|
417
|
+
$get: {
|
|
418
|
+
output: {
|
|
419
|
+
error: string;
|
|
420
|
+
};
|
|
421
|
+
outputFormat: "json";
|
|
422
|
+
status: 400;
|
|
439
423
|
input: {
|
|
440
424
|
param: {
|
|
441
425
|
operationId: string;
|
|
@@ -470,27 +454,32 @@ export declare function worktreeLifecycleRoutes(opts?: {
|
|
|
470
454
|
limit?: unknown;
|
|
471
455
|
};
|
|
472
456
|
};
|
|
473
|
-
}
|
|
474
|
-
};
|
|
475
|
-
} & {
|
|
476
|
-
"/worktree-lifecycle/:worktreeId": {
|
|
477
|
-
$get: {
|
|
457
|
+
} | {
|
|
478
458
|
output: {
|
|
479
459
|
error: string;
|
|
480
460
|
};
|
|
481
461
|
outputFormat: "json";
|
|
482
|
-
status: 400;
|
|
462
|
+
status: 400 | 404 | 409;
|
|
483
463
|
input: {
|
|
484
464
|
param: {
|
|
485
|
-
|
|
465
|
+
operationId: string;
|
|
466
|
+
};
|
|
467
|
+
} & {
|
|
468
|
+
query: {
|
|
469
|
+
afterSeq?: unknown;
|
|
470
|
+
limit?: unknown;
|
|
486
471
|
};
|
|
487
472
|
};
|
|
488
|
-
}
|
|
473
|
+
};
|
|
474
|
+
};
|
|
475
|
+
} & {
|
|
476
|
+
"/worktree-lifecycle/:worktreeId": {
|
|
477
|
+
$get: {
|
|
489
478
|
output: {
|
|
490
479
|
error: string;
|
|
491
480
|
};
|
|
492
481
|
outputFormat: "json";
|
|
493
|
-
status: 400
|
|
482
|
+
status: 400;
|
|
494
483
|
input: {
|
|
495
484
|
param: {
|
|
496
485
|
worktreeId: string;
|
|
@@ -617,6 +606,17 @@ export declare function worktreeLifecycleRoutes(opts?: {
|
|
|
617
606
|
worktreeId: string;
|
|
618
607
|
};
|
|
619
608
|
};
|
|
609
|
+
} | {
|
|
610
|
+
output: {
|
|
611
|
+
error: string;
|
|
612
|
+
};
|
|
613
|
+
outputFormat: "json";
|
|
614
|
+
status: 400 | 404 | 409;
|
|
615
|
+
input: {
|
|
616
|
+
param: {
|
|
617
|
+
worktreeId: string;
|
|
618
|
+
};
|
|
619
|
+
};
|
|
620
620
|
};
|
|
621
621
|
};
|
|
622
622
|
}, "/", "/worktree-lifecycle/:worktreeId">;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"service":"01a12be6-6bfe-7d2e-b6b7-0514cce83f21"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The variables a cockpit sets for its own agents and check steps (.env.example). The test suite
|
|
3
|
+
* drops them at load (`vitest.setup.ts`): run inside a cezar task it would inherit them, and a case
|
|
4
|
+
* that spawns an agent without its own env then writes into the OUTER run — mock-claude's
|
|
5
|
+
* `demo.html` landed in a live task's Assets that way. `agent-profile-wiring.test.ts` fails when a
|
|
6
|
+
* run hands its agent a `CEZ_*` key missing here.
|
|
7
|
+
*/
|
|
8
|
+
export declare const RUN_SCOPED_ENV: readonly string[];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The variables a cockpit sets for its own agents and check steps (.env.example). The test suite
|
|
3
|
+
* drops them at load (`vitest.setup.ts`): run inside a cezar task it would inherit them, and a case
|
|
4
|
+
* that spawns an agent without its own env then writes into the OUTER run — mock-claude's
|
|
5
|
+
* `demo.html` landed in a live task's Assets that way. `agent-profile-wiring.test.ts` fails when a
|
|
6
|
+
* run hands its agent a `CEZ_*` key missing here.
|
|
7
|
+
*/
|
|
8
|
+
export const RUN_SCOPED_ENV = [
|
|
9
|
+
'CEZ_TASK_ID', 'CEZ_HANDOFF_FILE', 'CEZ_TODOS_FILE', 'CEZ_ARTIFACTS_DIR', 'CEZ_API_URL', 'CEZ_PROJECT_ID',
|
|
10
|
+
'CEZ_BIN', 'CEZ_TREE_DIR', 'CEZ_RUN_ID', 'CEZ_WORKTREE', 'CEZ_BRANCH', 'CEZ_BASE', 'CEZ_STEP_ID',
|
|
11
|
+
'CEZ_ATTEMPT', 'CEZ_SHARED_CACHE_DIR', 'CEZ_GITHUB_REPO', 'CEZ_GITHUB_NUMBER', 'CEZ_GITHUB_EVENT',
|
|
12
|
+
'CEZ_PR_HEAD_SHA', 'CEZ_PR_HEAD_REF', 'CEZ_PR_BASE_REF', 'CEZ_REMOTE',
|
|
13
|
+
];
|
|
14
|
+
//# sourceMappingURL=run-env-keys.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-env-keys.js","sourceRoot":"","sources":["../../src/workflows/run-env-keys.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,cAAc,GAAsB;IAC/C,aAAa,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,aAAa,EAAE,gBAAgB;IACzG,SAAS,EAAE,cAAc,EAAE,YAAY,EAAE,cAAc,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa;IAChG,aAAa,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,kBAAkB;IACjG,iBAAiB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,YAAY;CACtE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-mercato/cezar",
|
|
3
|
-
"version": "0.20.0
|
|
3
|
+
"version": "0.20.0",
|
|
4
4
|
"description": "Local cockpit for running and tracking AI agent tasks in your repo. Uses your logged-in `claude` CLI and `gh` — zero config, zero database.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@clack/prompts": "^0.11.0",
|
|
48
|
-
"@hono/node-server": "^1.
|
|
48
|
+
"@hono/node-server": "^2.1.3",
|
|
49
49
|
"dotenv": "^16.6.1",
|
|
50
50
|
"hono": "^4.6.0",
|
|
51
51
|
"proper-lockfile": "4.1.2",
|
|
@@ -53,11 +53,11 @@
|
|
|
53
53
|
"undici": "^6.29.0",
|
|
54
54
|
"ws": "^8.21.1",
|
|
55
55
|
"yaml": "^2.5.0",
|
|
56
|
-
"zod": "^4.
|
|
56
|
+
"zod": "^4.6.7"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@open-mercato/cezar-api-client": "0.20.0
|
|
60
|
-
"@open-mercato/cezar-contract": "0.20.0
|
|
59
|
+
"@open-mercato/cezar-api-client": "^0.20.0",
|
|
60
|
+
"@open-mercato/cezar-contract": "^0.20.0",
|
|
61
61
|
"@types/node": "^20.14.0",
|
|
62
62
|
"@types/proper-lockfile": "4.1.4",
|
|
63
63
|
"@types/ws": "^8.18.1",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t}from"./react-runtime-CCIEwYL0.js";import{$ as n,F as r}from"./queries-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t}from"./react-runtime-CCIEwYL0.js";import{$ as n,F as r}from"./queries-BQUz3Wnb.js";import{c as i}from"./project-router-B1Q3upIJ.js";import{t as a}from"./createLucideIcon-BHp8sXmF.js";var o=a(`git-branch`,[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]),s=a(`wrench`,[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`,key:`1ngwbx`}]]),c=e(t(),1),l={github:`gh`};function u(e){return l[e]}function d(e){return`the ${e} CLI is not installed or not logged in — run \`${e} auth login\``}function f(e,t,n){let r=t?.bootProject??e?.bootProject??null;if(n===null||n==="default"||n===r)return e?.forge;let i=t?.projects?.find(e=>e.id===n);if(!i||!e)return;if(!i.forge)return null;let a=u(i.forge),o=a?e.checks?.find(e=>e.name===a):void 0;return!a||!o?{kind:i.forge}:o.available?{kind:i.forge,available:!0}:{kind:i.forge,available:!1,reason:d(a)}}function p(){let e=r().data,t=n().data,a=i();return(0,c.useMemo)(()=>f(e,t,a),[e,t,a])}export{s as n,o as r,p as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{t as r}from"./utils-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{t as r}from"./utils-Dp6vCdiU.js";import{t as i}from"./project-router-B1Q3upIJ.js";import{j as a}from"./run-actions-ChUnbFA7.js";import{H as o}from"./button-CJXK1JqU.js";import{r as s}from"./dist-Bsi6zLdE.js";import{t as c}from"./workflow-BEP63Wt4.js";import{_ as l}from"./impact-model-DCDyRxcf.js";import{S as u,b as d,m as f,v as p,x as m}from"./composer-C-aBJhY0.js";import{i as h,r as g,t as _}from"./popover-DUg9gBOn.js";import{t as v}from"./icon-tooltip-DYk5cjLx.js";import{a as y,i as b,o as x,r as S,s as C,t as w}from"./command-CwP_dLx3.js";import{r as T}from"./chip-DTCkrr8F.js";import"./picker-pill-Dv9H0dRF.js";import{l as E}from"./index-BfbbA0lF.js";var D=n();function O({name:e,route:t,selected:n,list:i,detail:a}){return(0,D.jsxs)(`div`,{"data-route":t,className:`flex h-full min-h-0 items-stretch`,children:[(0,D.jsx)(`section`,{"data-slot":`${e}-list`,className:r(`w-full min-h-0 flex-col overflow-y-auto overscroll-contain border-border md:flex md:w-[360px] md:shrink-0 md:border-r`,n?`hidden`:`flex`),children:i}),(0,D.jsx)(`section`,{"data-slot":`${e}-detail`,className:r(`min-w-0 min-h-0 flex-1 flex-col overflow-y-auto overscroll-contain`,n?`flex`:`hidden md:flex`),children:a})]})}function k({resolved:e,dataSlot:t}){return e.providerPending||e.canRun?null:(0,D.jsxs)(`span`,{"data-slot":t,className:`inline-flex flex-wrap items-center gap-1 text-xs text-muted-foreground`,children:[e.providerError?`Provider authentication could not be verified.`:`Connect an agent provider to run this item.`,(0,D.jsx)(i,{to:`/settings/agents#providers`,className:`font-medium text-foreground underline underline-offset-4`,children:`Configure providers`})]})}var A=e(t(),1);function j({workflows:e,value:t,onChange:n,slotPrefix:i=`gh`}){let[a,l]=(0,A.useState)(!1),[d,f]=(0,A.useState)(``),p=(0,A.useRef)(null),v=m(e,d);return(0,D.jsxs)(_,{open:a,onOpenChange:e=>{l(e),e||f(``)},children:[(0,D.jsx)(h,{asChild:!0,children:(0,D.jsxs)(`button`,{type:`button`,"data-slot":`${i}-workflow-trigger`,"aria-label":`Choose a workflow`,className:r(T,t&&`border-foreground/60 font-mono text-meta font-semibold text-foreground`),children:[(0,D.jsx)(c,{"aria-hidden":`true`,className:`size-3 shrink-0 text-violet`}),(0,D.jsx)(`span`,{className:`max-w-44 truncate`,children:t??`workflow`}),(0,D.jsx)(s,{"aria-hidden":`true`,className:`size-2.5 shrink-0 text-soft-foreground`})]})}),(0,D.jsx)(g,{align:`start`,sideOffset:8,className:`w-[320px] max-w-[calc(100vw-2rem)] p-0`,children:(0,D.jsxs)(w,{label:`Choose a workflow`,shouldFilter:!1,children:[(0,D.jsx)(y,{placeholder:`search workflows…`,value:d,onValueChange:f,onInput:()=>p.current?.scrollTo(0,0)}),(0,D.jsxs)(C,{ref:p,"data-slot":`${i}-workflow-menu`,className:`max-h-[min(16rem,calc(var(--radix-popover-content-available-height)-3rem))]`,children:[v.length===0?(0,D.jsx)(S,{children:`Nothing matches.`}):null,(0,D.jsx)(b,{children:v.map(e=>{let r=t===e.name;return(0,D.jsxs)(x,{value:`workflow ${e.name}`,keywords:u(e.name,e.description),"data-slot":`${i}-workflow-option`,"data-workflow":e.name,onSelect:()=>{n(r?null:e.name),l(!1)},children:[(0,D.jsx)(`span`,{className:`shrink-0 font-mono text-xs`,children:e.name}),e.description?(0,D.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-label text-muted-foreground`,children:e.description}):null,r?(0,D.jsx)(o,{"aria-hidden":`true`,className:`ml-auto size-3.5 shrink-0 text-primary`}):null]},e.name)})})]})]})})]})}function M({skills:e,skillUsage:t,selected:n,onToggle:i,maxSelections:c,slotPrefix:m=`gh`}){let[O,k]=(0,A.useState)(!1),[j,M]=(0,A.useState)(``),[N,P]=(0,A.useState)(null),F=(0,A.useRef)(null),{mostUsed:I,project:L,global:R}=p(d(e,j,t),t),z=(e,t)=>{let a=n.includes(e.name);return(0,D.jsxs)(x,{value:`skill ${e.name} ${e.path}`,keywords:u(e.name,e.description),"data-slot":`${m}-skill-option`,"data-skill":e.name,"data-selected":a?`true`:void 0,disabled:!a&&c!==void 0&&n.length>=c,onSelect:()=>i(e.name),children:[(0,D.jsx)(`span`,{className:r(`shrink-0 font-mono text-xs`,t&&`font-semibold`),children:e.name}),e.description?(0,D.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-label text-muted-foreground`,children:e.description}):null,(0,D.jsx)(v,{label:`View skill`,children:(0,D.jsx)(`button`,{type:`button`,"data-slot":`${m}-skill-view`,"aria-label":`View skill ${e.name}`,onClick:t=>{t.preventDefault(),t.stopPropagation(),P(e)},className:`ml-auto shrink-0 rounded-sm p-0.5 text-soft-foreground transition-colors hover:text-foreground`,children:(0,D.jsx)(l,{"aria-hidden":`true`,className:`size-3.5`})})}),a?(0,D.jsx)(o,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-primary`}):null]},e.path)};return e.length===0?null:(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(E,{skill:N,onClose:()=>P(null)}),(0,D.jsxs)(_,{open:O,onOpenChange:e=>{k(e),e||M(``)},children:[(0,D.jsx)(h,{asChild:!0,children:(0,D.jsxs)(`button`,{type:`button`,"data-slot":`${m}-skills-trigger`,"aria-label":`Choose skills`,className:r(T,n.length>0&&`border-foreground/60 font-semibold text-foreground`),children:[(0,D.jsx)(a,{"aria-hidden":`true`,className:`size-3 shrink-0 text-violet`}),`skills`,n.length>0?` · ${n.length}`:``,(0,D.jsx)(s,{"aria-hidden":`true`,className:`size-2.5 shrink-0 text-soft-foreground`})]})}),(0,D.jsx)(g,{align:`start`,sideOffset:8,className:`w-[336px] max-w-[calc(100vw-2rem)] p-0`,children:(0,D.jsxs)(w,{label:`Choose skills`,shouldFilter:!1,children:[(0,D.jsx)(y,{placeholder:`search skills…`,value:j,onValueChange:M,onInput:()=>F.current?.scrollTo(0,0)}),(0,D.jsxs)(C,{ref:F,"data-slot":`${m}-skill-menu`,className:`max-h-[min(16rem,calc(var(--radix-popover-content-available-height)-3rem))]`,children:[I.length===0&&L.length===0&&R.length===0?(0,D.jsx)(S,{children:`Nothing matches.`}):null,I.length>0?(0,D.jsx)(b,{heading:`Most used`,children:I.map(e=>z(e,f(e)))}):null,L.length>0?(0,D.jsx)(b,{heading:`Project skills`,children:L.map(e=>z(e,!0))}):null,R.length>0?(0,D.jsx)(b,{heading:`Global`,children:R.map(e=>z(e,!1))}):null]})]})})]})]})}export{O as i,j as n,k as r,M as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{t as r}from"./utils-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{t as r}from"./utils-Dp6vCdiU.js";import{A as i,_ as a,d as o,f as s,g as c,h as l,k as u,l as d,m as f,n as p,p as m,u as h,z as g}from"./button-CJXK1JqU.js";var _=e(t(),1),v=n(),y=`AlertDialog`,[b,ee]=i(y,[a]),x=a(),S=e=>{let{__scopeAlertDialog:t,...n}=e,r=x(t);return(0,v.jsx)(d,{...r,...n,modal:!0})};S.displayName=y;var C=`AlertDialogTrigger`,w=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=x(n);return(0,v.jsx)(c,{...i,...r,ref:t})});w.displayName=C;var T=`AlertDialogPortal`,E=e=>{let{__scopeAlertDialog:t,...n}=e,r=x(t);return(0,v.jsx)(f,{...r,...n})};E.displayName=T;var D=`AlertDialogOverlay`,O=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=x(n);return(0,v.jsx)(m,{...i,...r,ref:t})});O.displayName=D;var k=`AlertDialogContent`,[A,j]=b(k),M=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,children:r,...i}=e,a=x(n),s=g(t,_.useRef(null)),c=_.useRef(null);return(0,v.jsx)(A,{scope:n,cancelRef:c,children:(0,v.jsx)(o,{role:`alertdialog`,...a,...i,ref:s,onOpenAutoFocus:u(i.onOpenAutoFocus,e=>{e.preventDefault(),c.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:r})})});M.displayName=k;var N=`AlertDialogTitle`,P=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=x(n);return(0,v.jsx)(l,{...i,...r,ref:t})});P.displayName=N;var F=`AlertDialogDescription`,I=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=x(n);return(0,v.jsx)(s,{...i,...r,ref:t})});I.displayName=F;var L=`AlertDialogAction`,R=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=x(n);return(0,v.jsx)(h,{...i,...r,ref:t})});R.displayName=L;var z=`AlertDialogCancel`,B=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=j(z,n),a=x(n),o=g(t,i);return(0,v.jsx)(h,{...a,...r,ref:o})});B.displayName=z;var V=S,te=E,H=O,U=M,W=R,G=B,K=P,q=I;function J({...e}){return(0,v.jsx)(V,{"data-slot":`alert-dialog`,...e})}function Y({...e}){return(0,v.jsx)(te,{"data-slot":`alert-dialog-portal`,...e})}function X({className:e,...t}){return(0,v.jsx)(H,{"data-slot":`alert-dialog-overlay`,className:r(`fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0`,e),...t})}function Z({className:e,...t}){return(0,v.jsxs)(Y,{children:[(0,v.jsx)(X,{}),(0,v.jsx)(U,{"data-slot":`alert-dialog-content`,className:r(`fixed top-[50%] left-[50%] z-50 grid w-full grid-cols-1 max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-card p-6 shadow-modal duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-md`,e),...t})]})}function Q({className:e,...t}){return(0,v.jsx)(`div`,{"data-slot":`alert-dialog-header`,className:r(`flex flex-col gap-2 text-center sm:text-left`,e),...t})}function $({className:e,...t}){return(0,v.jsx)(`div`,{"data-slot":`alert-dialog-footer`,className:r(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...t})}function ne({className:e,...t}){return(0,v.jsx)(K,{"data-slot":`alert-dialog-title`,className:r(`text-lg leading-none font-semibold`,e),...t})}function re({className:e,...t}){return(0,v.jsx)(q,{"data-slot":`alert-dialog-description`,className:r(`text-sm text-muted-foreground`,e),...t})}function ie({className:e,variant:t=`contrast`,...n}){return(0,v.jsx)(W,{"data-slot":`alert-dialog-action`,"data-variant":t,className:r(p({variant:t}),e),...n})}function ae({className:e,...t}){return(0,v.jsx)(G,{"data-slot":`alert-dialog-cancel`,className:r(p({variant:`outline`}),e),...t})}export{re as a,ne as c,Z as i,ie as n,$ as o,ae as r,Q as s,J as t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{$n as r}from"./queries-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{$n as r}from"./queries-BQUz3Wnb.js";import{t as i}from"./utils-Dp6vCdiU.js";import{t as a,y as o}from"./project-router-B1Q3upIJ.js";import{H as s,t as c}from"./button-CJXK1JqU.js";import{t as l}from"./textarea-DDyYxCcO.js";import{t as u}from"./status-dot-AP_4obOJ.js";import{a as d}from"./reference-conflict-action-ByDYwT-Y.js";import{r as f,t as p}from"./enter-key-Bsscx4Nx.js";var m=e(t(),1),h=new Map,g=(e,t)=>JSON.stringify([e,t.id,t.questions.map(e=>[e.header,e.question,e.options.map(e=>e.label)])]);function _(e,t){return h.get(g(e,t))??{}}function v(e,t,n){h.set(g(e,t),n)}function y(e,t){h.delete(g(e,t))}var b=n(),x=`I need more information to answer this — please explain the context and ask again.`,S={labels:[]},C=r({status:`waiting`}),w=e=>e.other?.trim().replace(/\s+/g,` `)??``,T=e=>e.moreInfo===!0||e.labels.length>0||w(e)!==``;function E(e,t){if(t.moreInfo)return`${e.header}: ${x}`;let n=w(t);return`${e.header}: ${[...t.labels,...n?[n]:[]].join(`, `)}`}function D({ask:e,run:t}){return(0,m.useEffect)(()=>{e.resolved&&y(t.id,e)},[e,t.id]),e.resolved?(0,b.jsxs)(`div`,{"data-slot":`ask-card`,"data-resolved":`true`,className:`rounded-lg border border-border bg-card px-3.5 py-2.5 text-label text-muted-foreground`,children:[(0,b.jsx)(s,{"aria-hidden":`true`,className:`mr-1 inline size-3.5 align-[-2px] text-soft-foreground`}),(0,b.jsx)(`span`,{className:`text-soft-foreground`,children:`Answered`}),e.answer?(0,b.jsx)(`span`,{className:`ml-1.5 break-words whitespace-pre-line text-foreground`,children:e.answer}):null]}):(0,b.jsx)(O,{ask:e,run:t})}function O({ask:e,run:t}){let n=d(t);return(0,b.jsx)(k,{ask:e,ownerId:t.id,delivery:n,asker:e.fromWorkflow?`The workflow is asking`:`The agent is asking`})}function k({ask:e,ownerId:t,delivery:n,asker:r}){let i=n.blockedBy!==void 0,s=e.questions,l=s.length===1&&s[0]?.multiSelect!==!0,[d,f]=(0,m.useState)(()=>_(t,e)),p=(n,r)=>f(i=>{let a={...i,[n]:r};return v(t,e,a),a}),h=e=>d[e]??S,g=e=>T(h(e)),y=s.every((e,t)=>g(t)),x=s.some((e,t)=>g(t))?s.filter((e,t)=>!g(t)).map(e=>e.header):[],w=()=>void n.send(s.map((e,t)=>E(e,h(t))).join(`
|
|
2
2
|
`)),D=n.mode===`resume`,O=(0,m.useRef)(null),{hash:k}=o();return(0,m.useEffect)(()=>{k!==`#ask`||!O.current||(O.current.scrollIntoView?.({block:`center`}),O.current.querySelector(`button, input, textarea`)?.focus())},[k]),(0,b.jsxs)(`div`,{ref:O,"data-slot":`ask-card`,"data-resolved":`false`,"data-delivery":n.mode,"aria-busy":n.isPending||void 0,"data-tone":C.tone,className:`rounded-lg border border-info/30 bg-info/5 px-4 pt-3.5 pb-3.5`,children:[(0,b.jsxs)(`div`,{className:`mb-2.5 flex items-center gap-2`,children:[(0,b.jsx)(u,{tone:C.tone,pulse:C.pulse}),(0,b.jsx)(`span`,{"data-slot":`ask-asker`,className:`text-label font-semibold text-foreground`,children:r}),n.isPending?(0,b.jsx)(`span`,{"data-slot":`ask-sending`,role:`status`,className:`ml-auto text-meta text-muted-foreground`,children:`Sending…`}):null]}),(0,b.jsx)(`div`,{className:`flex flex-col gap-4`,children:s.map((e,t)=>(0,b.jsx)(A,{question:e,disabled:n.isPending||i,oneTap:l,answer:h(t),onChange:e=>{i||p(t,e)},onSubmit:t=>{!i&&T(t)&&n.send(E(e,t))}},e.id??t))}),l?D?(0,b.jsx)(`p`,{"data-slot":`ask-resume-hint`,className:`mt-3 text-meta text-muted-foreground`,children:`The session has ended — your answer reopens it and goes to the agent.`}):null:(0,b.jsxs)(`div`,{className:`mt-3 flex flex-wrap items-center gap-x-2.5 gap-y-1.5`,children:[(0,b.jsx)(c,{size:`sm`,disabled:n.isPending||i||!y,className:`pointer-coarse:min-h-11 disabled:bg-muted disabled:text-muted-foreground disabled:opacity-100 disabled:shadow-[inset_0_0_0_1px_var(--border)]`,onClick:w,children:D?`Send answer & reopen`:`Send answer`}),(0,b.jsx)(`span`,{"data-slot":D?`ask-resume-hint`:`ask-hint`,className:`min-w-0 text-meta text-muted-foreground`,children:D?`the session has ended — sending reopens it`:`${s.length>1?`answer each question`:`pick one or more`} — or type a reply below`})]}),!l&&x.length>0?(0,b.jsxs)(`p`,{"data-slot":`ask-unanswered`,className:`mt-2 text-meta text-muted-foreground`,children:[`unanswered: `,x.join(`, `)]}):null,n.blockedBy===`provider`?(0,b.jsxs)(`div`,{"data-slot":`ask-provider-gate`,className:`mt-3 flex flex-wrap items-center gap-1.5 text-label text-muted-foreground`,children:[(0,b.jsx)(`span`,{children:n.reason}),(0,b.jsx)(a,{to:`/settings/agents#providers`,className:`font-medium text-foreground underline underline-offset-4`,children:`Configure providers`})]}):null,n.blockedBy===`no-session`?(0,b.jsx)(`p`,{"data-slot":`ask-no-session`,className:`mt-3 text-label text-muted-foreground`,children:n.reason}):null,n.error?(0,b.jsx)(`p`,{"data-slot":`ask-error`,role:`alert`,className:`mt-3 text-label text-danger`,children:n.error}):null]})}function A({question:e,disabled:t,oneTap:n,answer:r,onChange:i,onSubmit:a}){let o=e.multiSelect===!0,s=f(),u=(0,m.useId)(),d=r.other!==void 0,h=(0,m.useRef)(null),[g,_]=(0,m.useState)(!1);(0,m.useEffect)(()=>{g&&(h.current?.focus(),_(!1))},[g]);let v=e=>n?a(e):i(e),y=e=>{if(!o){v({labels:[e]});return}i({labels:r.labels.includes(e)?r.labels.filter(t=>t!==e):[...r.labels,e],...d?{other:r.other}:{}})};return(0,b.jsxs)(`div`,{role:`group`,"aria-labelledby":u,children:[(0,b.jsxs)(`div`,{className:`mb-0.5 flex items-center gap-2`,children:[(0,b.jsx)(`span`,{className:`rounded-md bg-primary px-1.5 py-0.5 eyebrow text-primary-foreground`,children:e.header}),o?(0,b.jsx)(`span`,{"aria-hidden":`true`,className:`ml-auto text-micro text-soft-foreground`,children:`select all that apply`}):null]}),(0,b.jsxs)(`p`,{id:u,className:`mb-2.5 break-words text-body font-semibold text-foreground`,children:[e.question,o?(0,b.jsx)(`span`,{className:`sr-only`,children:` (select all that apply)`}):null]}),(0,b.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[e.options.map(e=>(0,b.jsx)(j,{label:e.label,description:e.description,checkbox:o,selected:r.labels.includes(e.label),disabled:t,onClick:()=>y(e.label)},e.label)),(0,b.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,b.jsx)(M,{slot:`ask-other`,selected:d,disabled:t,onClick:()=>{if(d){i({labels:r.labels});return}i({labels:o?r.labels:[],other:``}),_(!0)},children:`Other…`}),(0,b.jsx)(M,{slot:`ask-more-info`,selected:r.moreInfo===!0,disabled:t,onClick:()=>r.moreInfo?i(S):v({labels:[],moreInfo:!0}),children:`Need more info`})]}),d?(0,b.jsxs)(`div`,{"data-slot":`ask-other-input`,className:`flex flex-col gap-2`,children:[(0,b.jsx)(l,{ref:h,rows:2,"aria-label":`Your own answer: ${e.question}`,placeholder:`Type your own answer`,value:r.other,disabled:t,enterKeyHint:n&&!s?`send`:`enter`,onChange:e=>i({...r,other:e.target.value}),onKeyDown:e=>{let t=p({key:e.key,shiftKey:e.shiftKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey,repeat:e.repeat,isComposing:e.nativeEvent.isComposing,keyCode:e.keyCode},s);n&&t&&(e.preventDefault(),a(r))}}),n?(0,b.jsx)(`div`,{children:(0,b.jsx)(c,{size:`sm`,disabled:t||!T(r),onClick:()=>a(r),children:`Send answer`})}):null]}):null]})]})}function j({label:e,description:t,checkbox:n,selected:r,disabled:a,onClick:o}){return(0,b.jsxs)(`button`,{type:`button`,disabled:a,"aria-pressed":r,onClick:o,className:i(`flex w-full flex-col gap-0.5 rounded-md border px-3.5 py-2.5 text-left outline-none transition-colors motion-reduce:transition-none`,`focus-visible:ring-[3px] focus-visible:ring-ring/50`,`hover:border-primary/50 hover:bg-primary/[0.06] disabled:pointer-events-none disabled:opacity-50`,r?`border-primary/60 bg-primary/[0.06]`:`border-border bg-card`),children:[(0,b.jsxs)(`span`,{className:`flex min-w-0 items-start gap-2 text-ui font-semibold text-foreground`,children:[n?(0,b.jsx)(`span`,{"aria-hidden":!0,className:i(`flex size-4 shrink-0 items-center justify-center rounded border text-micro`,r?`border-primary bg-primary text-primary-foreground`:`border-soft-foreground`),children:r?`✓`:``}):null,(0,b.jsx)(`span`,{className:`min-w-0 break-words`,children:e})]}),t?(0,b.jsx)(`span`,{className:`min-w-0 break-words text-label text-muted-foreground`,children:t}):null]})}function M({slot:e,selected:t,disabled:n,onClick:r,children:a}){return(0,b.jsx)(`button`,{type:`button`,"data-slot":e,disabled:n,"aria-pressed":t,onClick:r,className:i(`rounded-md border border-dashed px-3 py-1.5 text-label font-medium text-muted-foreground outline-none transition-colors motion-reduce:transition-none`,`focus-visible:ring-[3px] focus-visible:ring-ring/50 pointer-coarse:min-h-11 pointer-coarse:px-3.5`,`hover:border-primary/50 hover:bg-primary/[0.06] hover:text-foreground disabled:pointer-events-none disabled:opacity-50`,t?`border-primary/60 bg-primary/[0.06] text-foreground`:`border-border bg-card`),children:a})}export{k as n,y as r,D as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{Ct as r,Da as i,wt as a}from"./queries-DVZ1lYAo.js";import{Tt as o,t as s}from"./utils-DWwoYTjU.js";import{S as c,l}from"./project-router-CnMbTz-a.js";import{t as u}from"./createLucideIcon-BHp8sXmF.js";import{M as d,O as f}from"./run-actions-CDKK-8MP.js";import{t as p}from"./button-CEskWahs.js";import{r as m}from"./dist-B_KqW6o6.js";import{a as h,o as g,p as _,r as v,s as y,t as b}from"./dropdown-menu-ayNafd3n.js";import{t as x}from"./download-CfgyYHf7.js";import{t as S}from"./external-link-BE6y205O.js";import{t as C}from"./file-preview-Dzc3RFUx.js";import{t as w}from"./file--aqoYe_k.js";import{t as T}from"./loader-circle-CPBhhDbB.js";import{a as E,c as D,d as O,f as ee,i as k,l as A,o as j,r as M,s as N,t as P,u as F}from"./follow-up-engine-Dul_3U9s.js";import{t as I}from"./triangle-alert-CIzim6ZN.js";import{t as te}from"./x-BqECUykl.js";import{t as L}from"./icon-tooltip-DRhwcic2.js";import{r as R}from"./format-BUbPQpzw.js";import{t as z}from"./centered-state-Cpzaj75Y.js";import{t as B}from"./markdown-LlPZylt7.js";import{mt as V,nt as H,pt as U,tt as W,ut as G}from"./index-BMA7ZpLG.js";var K=u(`at-sign`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8`,key:`7n84p3`}]]),q=u(`history`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]]),J=e(t(),1);function Y(e){let t=o.safeParse(e);return t.success?{ref:t.data.ref,label:t.data.label.slice(0,200)}:null}function X(e,t){return e?`About ${e.ref} ("${e.label}"): ${t}`:t}function Z(e,t){let n=(0,J.useRef)(t);n.current=t,(0,J.useEffect)(()=>{let t=t=>{let r=e.current?.contentWindow;if(!r||t.source!==r)return;let i=Y(t.data);i&&n.current(i)};return window.addEventListener(`message`,t),()=>window.removeEventListener(`message`,t)},[e])}var Q=n();function ne({run:e,reference:t,onClearReference:n}){let r=P(e),i=M(e,r.continueWith),a=f(e),[o,s]=(0,J.useState)(``),[c,l]=(0,J.useState)(!1),[u,d]=(0,J.useState)(null),m=(0,J.useId)(),h=e.status===`running`||e.status===`waiting`,g=e.status===`queued`,_=!h&&!g&&r.available;if(!h&&!g&&!_||e.worktreeLifecycle?.activeOperationId)return null;let v=h&&!a.usable?a.reason:_&&!r.canContinue?r.reason??`No provider can continue this task.`:void 0,y=!v&&!c&&o.trim()!==``,b=async e=>{if(e?.preventDefault(),y){l(!0),d(null);try{await i(X(t,o.trim()),[]),s(``),n()}catch(e){d(e instanceof Error?e.message:String(e))}finally{l(!1)}}};return(0,Q.jsxs)(`form`,{"data-slot":`assets-ask`,"aria-label":`Ask about this asset`,onSubmit:e=>void b(e),className:`shrink-0 border-t border-border bg-background px-2 py-2 sm:px-3`,children:[t?(0,Q.jsxs)(`span`,{"data-slot":`assets-ask-ref`,className:`mb-1.5 inline-flex max-w-full items-center gap-1 rounded-full border border-border bg-muted py-0.5 pr-0.5 pl-2 text-meta`,children:[(0,Q.jsx)(K,{"aria-hidden":`true`,className:`size-3 shrink-0 text-muted-foreground`}),(0,Q.jsx)(L,{label:`${t.ref} — ${t.label}`,children:(0,Q.jsxs)(`span`,{className:`truncate`,children:[(0,Q.jsx)(`span`,{className:`font-mono text-muted-foreground`,children:t.ref}),` `,t.label]})}),(0,Q.jsx)(`button`,{type:`button`,"data-action":`assets-ask-ref-remove`,"aria-label":`Remove reference`,onClick:n,className:`rounded-full p-0.5 text-muted-foreground hover:bg-background hover:text-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none`,children:(0,Q.jsx)(te,{"aria-hidden":`true`,className:`size-3`})})]}):null,(0,Q.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,Q.jsx)(`textarea`,{"data-slot":`assets-ask-input`,"aria-label":t?`Ask about ${t.label||t.ref}`:`Ask the agent about this asset`,"aria-describedby":v||u?m:void 0,rows:1,value:o,onChange:e=>s(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&b()},disabled:!!v,placeholder:t?`Ask or correct — ⌘↵ to send`:`Ask the agent about this report — click an element to reference it`,className:`max-h-32 min-h-9 flex-1 resize-y rounded-md border border-border bg-card px-2.5 py-2 text-ui focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none disabled:opacity-60`}),(0,Q.jsxs)(p,{type:`submit`,size:`sm`,"data-action":`assets-ask-send`,disabled:!y,"aria-busy":c||void 0,children:[c?(0,Q.jsx)(T,{"aria-hidden":`true`,className:`motion-safe:animate-spin`}):(0,Q.jsx)(O,{"aria-hidden":`true`}),_?`Continue`:`Send`]})]}),v||u?(0,Q.jsx)(`p`,{id:m,"data-slot":`assets-ask-reason`,className:`mt-1 text-label text-muted-foreground`,children:u??v}):null]})}var re=`No assets yet`,ie=`Agents publish pages here when they write to the run's artifacts folder.`;function ae({runId:e,routed:t,run:n}){let r=a(e),o=c(),u=l(),[f,m]=(0,J.useState)(void 0),h=t?o.name:f,g=r.data?.artifacts??[],_=D(g,h),v=(0,J.useCallback)(n=>{t?u(`/tasks/${e}/assets/${encodeURIComponent(n)}`,{replace:!0}):m(n)},[u,t,e]),[y,b]=se(),[C,w]=(0,J.useState)(0),[E,O]=(0,J.useState)(void 0),k=_?.kind===`html`?$(r.data?.versions,_.name):[],A=k.at(-1)?.version,j=E&&_&&E.name===_.name&&E.version!==A&&k.some(e=>e.version===E.version)?E.version:void 0,M=(0,J.useRef)(null),[N,P]=(0,J.useState)(null);return Z(M,P),r.isPending?(0,Q.jsx)(z,{icon:(0,Q.jsx)(T,{className:`motion-safe:animate-spin`}),tone:`neutral`,heading:`h2`,title:`Loading assets…`}):r.isError?(0,Q.jsx)(z,{icon:(0,Q.jsx)(I,{}),tone:`danger`,heading:`h2`,title:`Could not load this task's assets`,subtitle:r.error.message}):(0,Q.jsxs)(`section`,{"data-slot":`assets-view`,className:`flex h-full min-h-0 flex-col bg-background`,children:[(0,Q.jsxs)(`div`,{"data-slot":`assets-toolbar`,role:`toolbar`,"aria-label":`Assets`,className:`flex h-10 shrink-0 items-center gap-1.5 border-b border-border px-2 sm:px-3`,children:[_?(0,Q.jsx)(ce,{artifacts:g,current:_,onSelect:v}):(0,Q.jsx)(`span`,{className:`px-1 text-xs text-muted-foreground`,children:`Assets`}),_?.kind===`html`?(0,Q.jsx)(L,{label:`Runs in a sandbox: no access to cezar, your cookies or the network beyond pinned CDN scripts`,children:(0,Q.jsxs)(`span`,{"data-slot":`assets-sandboxed`,tabIndex:0,className:`hidden items-center gap-1 rounded-sm border border-border px-1.5 py-px text-meta text-muted-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none sm:inline-flex`,children:[(0,Q.jsx)(G,{"aria-hidden":`true`,className:`size-3`}),`sandboxed`]})}):null,_&&k.length>1?(0,Q.jsx)(oe,{versions:k,viewing:j,onSelect:e=>O(e===A?void 0:{name:_.name,version:e})}):null,j===void 0?null:(0,Q.jsxs)(`span`,{"data-slot":`assets-viewing-version`,className:`inline-flex items-center gap-1.5 text-meta text-muted-foreground`,children:[`Viewing v`,j,(0,Q.jsx)(`span`,{"aria-hidden":`true`,children:`—`}),(0,Q.jsx)(`button`,{type:`button`,"data-action":`assets-version-current`,onClick:()=>O(void 0),className:`font-medium text-foreground underline underline-offset-2`,children:`back to current`})]}),r.data.truncated?(0,Q.jsxs)(`span`,{className:`hidden text-meta text-muted-foreground md:inline`,children:[`Showing the newest `,r.data.artifacts.length,` files; the folder has more`]}):null,(0,Q.jsxs)(`div`,{className:`ml-auto flex shrink-0 items-center gap-0.5`,children:[(0,Q.jsx)(L,{label:y?`Leave focus — bring the sidebar back`:`Focus — fold the sidebar to icons while Assets is open`,children:(0,Q.jsx)(p,{type:`button`,variant:`ghost`,size:`icon-sm`,"data-action":`assets-focus`,"aria-pressed":y,"aria-label":y?`Leave focus`:`Focus`,className:s(`text-muted-foreground`,y&&`bg-muted text-foreground`),onClick:()=>b(!y),children:y?(0,Q.jsx)(U,{"aria-hidden":`true`}):(0,Q.jsx)(V,{"aria-hidden":`true`})})}),_?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(p,{asChild:!0,variant:`ghost`,size:`sm`,className:`text-muted-foreground max-sm:size-[30px] max-sm:px-0`,children:(0,Q.jsxs)(`a`,{"data-action":`assets-open`,href:i(e,_.name,j),target:`_blank`,rel:`noopener noreferrer`,"aria-label":`Open in new tab`,title:`Open in new tab (still sandboxed)`,children:[(0,Q.jsx)(S,{"aria-hidden":`true`}),(0,Q.jsx)(`span`,{className:`max-sm:sr-only`,children:`Open in new tab`})]})}),(0,Q.jsx)(p,{asChild:!0,variant:`ghost`,size:`sm`,className:`text-muted-foreground max-sm:size-[30px] max-sm:px-0`,children:(0,Q.jsxs)(`a`,{"data-action":`assets-download`,href:i(e,_.name,j),download:_.name,"aria-label":`Download`,children:[(0,Q.jsx)(x,{"aria-hidden":`true`}),(0,Q.jsx)(`span`,{className:`max-sm:sr-only`,children:`Download`})]})}),(0,Q.jsxs)(p,{type:`button`,variant:`ghost`,size:`sm`,"data-action":`assets-reload`,"aria-label":`Reload`,className:`text-muted-foreground max-sm:size-[30px] max-sm:px-0`,onClick:()=>w(e=>e+1),children:[(0,Q.jsx)(ee,{"aria-hidden":`true`}),(0,Q.jsx)(`span`,{className:`max-sm:sr-only`,children:`Reload`})]})]}):null]})]}),_?(0,Q.jsx)(le,{runId:e,artifact:_,version:j,frameRef:M},`${_.name}@${_.updatedAt}#${C}v${j??``}`):(0,Q.jsx)(z,{icon:(0,Q.jsx)(d,{}),tone:`neutral`,heading:`h2`,title:re,subtitle:ie}),n&&_?(0,Q.jsx)(ne,{run:n,reference:N,onClearReference:()=>P(null)}):null]})}function $(e,t){return(e??[]).filter(e=>e.files.includes(t))}function oe({versions:e,viewing:t,onSelect:n}){let r=e.at(-1),i=t??r?.version;return(0,Q.jsxs)(b,{children:[(0,Q.jsx)(_,{asChild:!0,children:(0,Q.jsxs)(p,{type:`button`,variant:`ghost`,size:`sm`,"data-action":`assets-versions`,"aria-label":`Version v${i} — pick another version`,className:`h-7 gap-1 px-2 text-label text-muted-foreground`,children:[(0,Q.jsx)(q,{"aria-hidden":`true`,className:`size-3.5`}),`v`,i,r&&t===void 0?(0,Q.jsxs)(`span`,{className:`hidden sm:inline`,children:[`· `,R(r.updatedAt),` ago`]}):null,(0,Q.jsx)(m,{"aria-hidden":`true`,className:`size-3.5 opacity-60`})]})}),(0,Q.jsxs)(v,{align:`start`,className:`w-56`,children:[(0,Q.jsx)(h,{children:`Versions`}),(0,Q.jsx)(g,{value:String(i),onValueChange:e=>n(Number(e)),children:[...e].reverse().map(e=>(0,Q.jsxs)(y,{value:String(e.version),"data-version":e.version,children:[`v`,e.version,` · `,R(e.updatedAt),` ago`,e.version===r?.version?(0,Q.jsx)(`span`,{className:`ml-auto text-meta text-muted-foreground`,children:`current`}):null]},e.version))})]})]})}function se(){let[e,t]=(0,J.useState)(()=>A(`assets`)),n=(0,J.useCallback)(e=>{F(`assets`,e),t(e)},[]);return(0,J.useEffect)(()=>{if(e)return W(()=>n(!1))},[e,n]),[e,n]}function ce({artifacts:e,current:t,onSelect:n}){let r=N(e);return(0,Q.jsxs)(b,{children:[(0,Q.jsx)(_,{asChild:!0,children:(0,Q.jsxs)(p,{type:`button`,variant:`ghost`,size:`sm`,"data-action":`assets-switcher`,"aria-label":`Asset: ${j(t)} — switch asset`,className:`h-7 min-w-0 max-w-[min(28rem,60vw)] gap-1.5 px-2 text-ui font-medium`,children:[(0,Q.jsx)(`span`,{className:`truncate`,children:j(t)}),(0,Q.jsx)(`span`,{className:`shrink-0 text-meta font-normal text-muted-foreground`,children:E[t.kind]}),(0,Q.jsx)(m,{"aria-hidden":`true`,className:`size-3.5 shrink-0 opacity-60`})]})}),(0,Q.jsxs)(v,{align:`start`,className:`max-h-80 w-80 overflow-y-auto`,children:[(0,Q.jsxs)(h,{children:[e.length,` `,e.length===1?`asset`:`assets`]}),(0,Q.jsx)(g,{value:t.name,onValueChange:n,children:r.map(e=>(0,Q.jsx)(y,{value:e.name,"data-asset":e.name,children:(0,Q.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,Q.jsx)(`span`,{className:`truncate`,children:j(e)}),(0,Q.jsxs)(`span`,{className:`truncate font-mono text-meta text-muted-foreground`,children:[e.name,` · `,E[e.kind],` · `,R(e.updatedAt)]})]})},e.name))})]})]})}function le({runId:e,artifact:t,version:n,frameRef:r}){let a=H(),o=i(e,t.name,n);switch(t.kind){case`html`:return(0,Q.jsx)(`iframe`,{ref:r,"data-slot":`assets-frame`,title:j(t),src:`${o}#theme=${a}`,sandbox:k,referrerPolicy:`no-referrer`,className:`min-h-0 w-full flex-1 border-0 bg-background`});case`image`:return(0,Q.jsx)(`div`,{className:`flex min-h-0 flex-1 items-center justify-center overflow-auto p-4`,children:(0,Q.jsx)(`img`,{"data-slot":`assets-image`,src:o,alt:j(t),className:`max-w-full rounded-sm`})});case`markdown`:case`json`:return(0,Q.jsx)(ue,{runId:e,artifact:t});case`other`:return(0,Q.jsx)(z,{icon:(0,Q.jsx)(w,{}),tone:`neutral`,heading:`h2`,title:`No preview for this file`,subtitle:`${t.name} — download it to open it locally.`,actions:(0,Q.jsx)(p,{asChild:!0,variant:`outline`,children:(0,Q.jsxs)(`a`,{"data-action":`assets-download-file`,href:o,download:t.name,children:[(0,Q.jsx)(x,{"aria-hidden":`true`}),`Download`]})})})}}function ue({runId:e,artifact:t}){let n=r(e,t.name,t.updatedAt);return n.isPending?(0,Q.jsxs)(`p`,{className:`px-4 py-6 text-center text-label text-soft-foreground`,children:[`Loading `,t.name,`…`]}):n.isError?(0,Q.jsx)(z,{icon:(0,Q.jsx)(I,{}),tone:`danger`,heading:`h2`,title:`Could not load this asset`,subtitle:n.error.message}):(0,Q.jsx)(`div`,{"data-slot":`assets-${t.kind}`,className:`min-h-0 flex-1 overflow-auto`,children:t.kind===`markdown`?(0,Q.jsx)(`div`,{className:`mx-auto max-w-3xl px-4 py-4`,children:(0,Q.jsx)(B,{children:n.data})}):(0,Q.jsx)(C,{path:t.name,text:n.data})})}export{ae as AssetsView};
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{Ct as r,Da as i,wt as a}from"./queries-BQUz3Wnb.js";import{Tt as o,t as s}from"./utils-Dp6vCdiU.js";import{S as c,l}from"./project-router-B1Q3upIJ.js";import{t as u}from"./createLucideIcon-BHp8sXmF.js";import{M as d,O as f}from"./run-actions-ChUnbFA7.js";import{t as p}from"./button-CJXK1JqU.js";import{r as m}from"./dist-Bsi6zLdE.js";import{a as h,o as g,p as _,r as v,s as y,t as b}from"./dropdown-menu-BKvUsb5Y.js";import{t as x}from"./download-CfgyYHf7.js";import{t as S}from"./external-link-BE6y205O.js";import{t as C}from"./file-preview-C2EkjhOh.js";import{t as w}from"./file--aqoYe_k.js";import{t as T}from"./loader-circle-CPBhhDbB.js";import{a as E,c as D,d as O,f as ee,i as k,l as A,o as j,r as M,s as N,t as P,u as F}from"./follow-up-engine-BnRCTyQ4.js";import{t as I}from"./triangle-alert-CIzim6ZN.js";import{t as te}from"./x-BqECUykl.js";import{t as L}from"./icon-tooltip-DYk5cjLx.js";import{r as R}from"./format-BUbPQpzw.js";import{t as z}from"./centered-state-DE6sgEMs.js";import{t as B}from"./markdown-YSf01kqC.js";import{mt as V,nt as H,pt as U,tt as W,ut as G}from"./index-BfbbA0lF.js";var K=u(`at-sign`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8`,key:`7n84p3`}]]),q=u(`history`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]]),J=e(t(),1);function Y(e){let t=o.safeParse(e);return t.success?{ref:t.data.ref,label:t.data.label.slice(0,200)}:null}function X(e,t){return e?`About ${e.ref} ("${e.label}"): ${t}`:t}function Z(e,t){let n=(0,J.useRef)(t);n.current=t,(0,J.useEffect)(()=>{let t=t=>{let r=e.current?.contentWindow;if(!r||t.source!==r)return;let i=Y(t.data);i&&n.current(i)};return window.addEventListener(`message`,t),()=>window.removeEventListener(`message`,t)},[e])}var Q=n();function ne({run:e,reference:t,onClearReference:n}){let r=P(e),i=M(e,r.continueWith),a=f(e),[o,s]=(0,J.useState)(``),[c,l]=(0,J.useState)(!1),[u,d]=(0,J.useState)(null),m=(0,J.useId)(),h=e.status===`running`||e.status===`waiting`,g=e.status===`queued`,_=!h&&!g&&r.available;if(!h&&!g&&!_||e.worktreeLifecycle?.activeOperationId)return null;let v=h&&!a.usable?a.reason:_&&!r.canContinue?r.reason??`No provider can continue this task.`:void 0,y=!v&&!c&&o.trim()!==``,b=async e=>{if(e?.preventDefault(),y){l(!0),d(null);try{await i(X(t,o.trim()),[]),s(``),n()}catch(e){d(e instanceof Error?e.message:String(e))}finally{l(!1)}}};return(0,Q.jsxs)(`form`,{"data-slot":`assets-ask`,"aria-label":`Ask about this asset`,onSubmit:e=>void b(e),className:`shrink-0 border-t border-border bg-background px-2 py-2 sm:px-3`,children:[t?(0,Q.jsxs)(`span`,{"data-slot":`assets-ask-ref`,className:`mb-1.5 inline-flex max-w-full items-center gap-1 rounded-full border border-border bg-muted py-0.5 pr-0.5 pl-2 text-meta`,children:[(0,Q.jsx)(K,{"aria-hidden":`true`,className:`size-3 shrink-0 text-muted-foreground`}),(0,Q.jsx)(L,{label:`${t.ref} — ${t.label}`,children:(0,Q.jsxs)(`span`,{className:`truncate`,children:[(0,Q.jsx)(`span`,{className:`font-mono text-muted-foreground`,children:t.ref}),` `,t.label]})}),(0,Q.jsx)(`button`,{type:`button`,"data-action":`assets-ask-ref-remove`,"aria-label":`Remove reference`,onClick:n,className:`rounded-full p-0.5 text-muted-foreground hover:bg-background hover:text-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none`,children:(0,Q.jsx)(te,{"aria-hidden":`true`,className:`size-3`})})]}):null,(0,Q.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,Q.jsx)(`textarea`,{"data-slot":`assets-ask-input`,"aria-label":t?`Ask about ${t.label||t.ref}`:`Ask the agent about this asset`,"aria-describedby":v||u?m:void 0,rows:1,value:o,onChange:e=>s(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&b()},disabled:!!v,placeholder:t?`Ask or correct — ⌘↵ to send`:`Ask the agent about this report — click an element to reference it`,className:`max-h-32 min-h-9 flex-1 resize-y rounded-md border border-border bg-card px-2.5 py-2 text-ui focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none disabled:opacity-60`}),(0,Q.jsxs)(p,{type:`submit`,size:`sm`,"data-action":`assets-ask-send`,disabled:!y,"aria-busy":c||void 0,children:[c?(0,Q.jsx)(T,{"aria-hidden":`true`,className:`motion-safe:animate-spin`}):(0,Q.jsx)(O,{"aria-hidden":`true`}),_?`Continue`:`Send`]})]}),v||u?(0,Q.jsx)(`p`,{id:m,"data-slot":`assets-ask-reason`,className:`mt-1 text-label text-muted-foreground`,children:u??v}):null]})}var re=`No assets yet`,ie=`Agents publish pages here when they write to the run's artifacts folder.`;function ae({runId:e,routed:t,run:n}){let r=a(e),o=c(),u=l(),[f,m]=(0,J.useState)(void 0),h=t?o.name:f,g=r.data?.artifacts??[],_=D(g,h),v=(0,J.useCallback)(n=>{t?u(`/tasks/${e}/assets/${encodeURIComponent(n)}`,{replace:!0}):m(n)},[u,t,e]),[y,b]=se(),[C,w]=(0,J.useState)(0),[E,O]=(0,J.useState)(void 0),k=_?.kind===`html`?$(r.data?.versions,_.name):[],A=k.at(-1)?.version,j=E&&_&&E.name===_.name&&E.version!==A&&k.some(e=>e.version===E.version)?E.version:void 0,M=(0,J.useRef)(null),[N,P]=(0,J.useState)(null);return Z(M,P),r.isPending?(0,Q.jsx)(z,{icon:(0,Q.jsx)(T,{className:`motion-safe:animate-spin`}),tone:`neutral`,heading:`h2`,title:`Loading assets…`}):r.isError?(0,Q.jsx)(z,{icon:(0,Q.jsx)(I,{}),tone:`danger`,heading:`h2`,title:`Could not load this task's assets`,subtitle:r.error.message}):(0,Q.jsxs)(`section`,{"data-slot":`assets-view`,className:`flex h-full min-h-0 flex-col bg-background`,children:[(0,Q.jsxs)(`div`,{"data-slot":`assets-toolbar`,role:`toolbar`,"aria-label":`Assets`,className:`flex h-10 shrink-0 items-center gap-1.5 border-b border-border px-2 sm:px-3`,children:[_?(0,Q.jsx)(ce,{artifacts:g,current:_,onSelect:v}):(0,Q.jsx)(`span`,{className:`px-1 text-xs text-muted-foreground`,children:`Assets`}),_?.kind===`html`?(0,Q.jsx)(L,{label:`Runs in a sandbox: no access to cezar, your cookies or the network beyond pinned CDN scripts`,children:(0,Q.jsxs)(`span`,{"data-slot":`assets-sandboxed`,tabIndex:0,className:`hidden items-center gap-1 rounded-sm border border-border px-1.5 py-px text-meta text-muted-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none sm:inline-flex`,children:[(0,Q.jsx)(G,{"aria-hidden":`true`,className:`size-3`}),`sandboxed`]})}):null,_&&k.length>1?(0,Q.jsx)(oe,{versions:k,viewing:j,onSelect:e=>O(e===A?void 0:{name:_.name,version:e})}):null,j===void 0?null:(0,Q.jsxs)(`span`,{"data-slot":`assets-viewing-version`,className:`inline-flex items-center gap-1.5 text-meta text-muted-foreground`,children:[`Viewing v`,j,(0,Q.jsx)(`span`,{"aria-hidden":`true`,children:`—`}),(0,Q.jsx)(`button`,{type:`button`,"data-action":`assets-version-current`,onClick:()=>O(void 0),className:`font-medium text-foreground underline underline-offset-2`,children:`back to current`})]}),r.data.truncated?(0,Q.jsxs)(`span`,{className:`hidden text-meta text-muted-foreground md:inline`,children:[`Showing the newest `,r.data.artifacts.length,` files; the folder has more`]}):null,(0,Q.jsxs)(`div`,{className:`ml-auto flex shrink-0 items-center gap-0.5`,children:[(0,Q.jsx)(L,{label:y?`Leave focus — bring the sidebar back`:`Focus — fold the sidebar to icons while Assets is open`,children:(0,Q.jsx)(p,{type:`button`,variant:`ghost`,size:`icon-sm`,"data-action":`assets-focus`,"aria-pressed":y,"aria-label":y?`Leave focus`:`Focus`,className:s(`text-muted-foreground`,y&&`bg-muted text-foreground`),onClick:()=>b(!y),children:y?(0,Q.jsx)(U,{"aria-hidden":`true`}):(0,Q.jsx)(V,{"aria-hidden":`true`})})}),_?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(p,{asChild:!0,variant:`ghost`,size:`sm`,className:`text-muted-foreground max-sm:size-[30px] max-sm:px-0`,children:(0,Q.jsxs)(`a`,{"data-action":`assets-open`,href:i(e,_.name,j),target:`_blank`,rel:`noopener noreferrer`,"aria-label":`Open in new tab`,title:`Open in new tab (still sandboxed)`,children:[(0,Q.jsx)(S,{"aria-hidden":`true`}),(0,Q.jsx)(`span`,{className:`max-sm:sr-only`,children:`Open in new tab`})]})}),(0,Q.jsx)(p,{asChild:!0,variant:`ghost`,size:`sm`,className:`text-muted-foreground max-sm:size-[30px] max-sm:px-0`,children:(0,Q.jsxs)(`a`,{"data-action":`assets-download`,href:i(e,_.name,j),download:_.name,"aria-label":`Download`,children:[(0,Q.jsx)(x,{"aria-hidden":`true`}),(0,Q.jsx)(`span`,{className:`max-sm:sr-only`,children:`Download`})]})}),(0,Q.jsxs)(p,{type:`button`,variant:`ghost`,size:`sm`,"data-action":`assets-reload`,"aria-label":`Reload`,className:`text-muted-foreground max-sm:size-[30px] max-sm:px-0`,onClick:()=>w(e=>e+1),children:[(0,Q.jsx)(ee,{"aria-hidden":`true`}),(0,Q.jsx)(`span`,{className:`max-sm:sr-only`,children:`Reload`})]})]}):null]})]}),_?(0,Q.jsx)(le,{runId:e,artifact:_,version:j,frameRef:M},`${_.name}@${_.updatedAt}#${C}v${j??``}`):(0,Q.jsx)(z,{icon:(0,Q.jsx)(d,{}),tone:`neutral`,heading:`h2`,title:re,subtitle:ie}),n&&_?(0,Q.jsx)(ne,{run:n,reference:N,onClearReference:()=>P(null)}):null]})}function $(e,t){return(e??[]).filter(e=>e.files.includes(t))}function oe({versions:e,viewing:t,onSelect:n}){let r=e.at(-1),i=t??r?.version;return(0,Q.jsxs)(b,{children:[(0,Q.jsx)(_,{asChild:!0,children:(0,Q.jsxs)(p,{type:`button`,variant:`ghost`,size:`sm`,"data-action":`assets-versions`,"aria-label":`Version v${i} — pick another version`,className:`h-7 gap-1 px-2 text-label text-muted-foreground`,children:[(0,Q.jsx)(q,{"aria-hidden":`true`,className:`size-3.5`}),`v`,i,r&&t===void 0?(0,Q.jsxs)(`span`,{className:`hidden sm:inline`,children:[`· `,R(r.updatedAt),` ago`]}):null,(0,Q.jsx)(m,{"aria-hidden":`true`,className:`size-3.5 opacity-60`})]})}),(0,Q.jsxs)(v,{align:`start`,className:`w-56`,children:[(0,Q.jsx)(h,{children:`Versions`}),(0,Q.jsx)(g,{value:String(i),onValueChange:e=>n(Number(e)),children:[...e].reverse().map(e=>(0,Q.jsxs)(y,{value:String(e.version),"data-version":e.version,children:[`v`,e.version,` · `,R(e.updatedAt),` ago`,e.version===r?.version?(0,Q.jsx)(`span`,{className:`ml-auto text-meta text-muted-foreground`,children:`current`}):null]},e.version))})]})]})}function se(){let[e,t]=(0,J.useState)(()=>A(`assets`)),n=(0,J.useCallback)(e=>{F(`assets`,e),t(e)},[]);return(0,J.useEffect)(()=>{if(e)return W(()=>n(!1))},[e,n]),[e,n]}function ce({artifacts:e,current:t,onSelect:n}){let r=N(e);return(0,Q.jsxs)(b,{children:[(0,Q.jsx)(_,{asChild:!0,children:(0,Q.jsxs)(p,{type:`button`,variant:`ghost`,size:`sm`,"data-action":`assets-switcher`,"aria-label":`Asset: ${j(t)} — switch asset`,className:`h-7 min-w-0 max-w-[min(28rem,60vw)] gap-1.5 px-2 text-ui font-medium`,children:[(0,Q.jsx)(`span`,{className:`truncate`,children:j(t)}),(0,Q.jsx)(`span`,{className:`shrink-0 text-meta font-normal text-muted-foreground`,children:E[t.kind]}),(0,Q.jsx)(m,{"aria-hidden":`true`,className:`size-3.5 shrink-0 opacity-60`})]})}),(0,Q.jsxs)(v,{align:`start`,className:`max-h-80 w-80 overflow-y-auto`,children:[(0,Q.jsxs)(h,{children:[e.length,` `,e.length===1?`asset`:`assets`]}),(0,Q.jsx)(g,{value:t.name,onValueChange:n,children:r.map(e=>(0,Q.jsx)(y,{value:e.name,"data-asset":e.name,children:(0,Q.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,Q.jsx)(`span`,{className:`truncate`,children:j(e)}),(0,Q.jsxs)(`span`,{className:`truncate font-mono text-meta text-muted-foreground`,children:[e.name,` · `,E[e.kind],` · `,R(e.updatedAt)]})]})},e.name))})]})]})}function le({runId:e,artifact:t,version:n,frameRef:r}){let a=H(),o=i(e,t.name,n);switch(t.kind){case`html`:return(0,Q.jsx)(`iframe`,{ref:r,"data-slot":`assets-frame`,title:j(t),src:`${o}#theme=${a}`,sandbox:k,referrerPolicy:`no-referrer`,className:`min-h-0 w-full flex-1 border-0 bg-background`});case`image`:return(0,Q.jsx)(`div`,{className:`flex min-h-0 flex-1 items-center justify-center overflow-auto p-4`,children:(0,Q.jsx)(`img`,{"data-slot":`assets-image`,src:o,alt:j(t),className:`max-w-full rounded-sm`})});case`markdown`:case`json`:return(0,Q.jsx)(ue,{runId:e,artifact:t});case`other`:return(0,Q.jsx)(z,{icon:(0,Q.jsx)(w,{}),tone:`neutral`,heading:`h2`,title:`No preview for this file`,subtitle:`${t.name} — download it to open it locally.`,actions:(0,Q.jsx)(p,{asChild:!0,variant:`outline`,children:(0,Q.jsxs)(`a`,{"data-action":`assets-download-file`,href:o,download:t.name,children:[(0,Q.jsx)(x,{"aria-hidden":`true`}),`Download`]})})})}}function ue({runId:e,artifact:t}){let n=r(e,t.name,t.updatedAt);return n.isPending?(0,Q.jsxs)(`p`,{className:`px-4 py-6 text-center text-label text-soft-foreground`,children:[`Loading `,t.name,`…`]}):n.isError?(0,Q.jsx)(z,{icon:(0,Q.jsx)(I,{}),tone:`danger`,heading:`h2`,title:`Could not load this asset`,subtitle:n.error.message}):(0,Q.jsx)(`div`,{"data-slot":`assets-${t.kind}`,className:`min-h-0 flex-1 overflow-auto`,children:t.kind===`markdown`?(0,Q.jsx)(`div`,{className:`mx-auto max-w-3xl px-4 py-4`,children:(0,Q.jsx)(B,{children:n.data})}):(0,Q.jsx)(C,{path:t.name,text:n.data})})}export{ae as AssetsView};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime-QTnfLwEv.js";import{i as e,t}from"./react-runtime-CCIEwYL0.js";import{G as n,I as r,K as i,U as a,t as o,z as s}from"./utils-
|
|
1
|
+
import"./rolldown-runtime-QTnfLwEv.js";import{i as e,t}from"./react-runtime-CCIEwYL0.js";import{G as n,I as r,K as i,U as a,t as o,z as s}from"./utils-Dp6vCdiU.js";import{t as c}from"./createLucideIcon-BHp8sXmF.js";var l=c(`calendar-clock`,[[`path`,{d:`M16 14v2.2l1.6 1`,key:`fo4ql5`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`path`,{d:`M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5`,key:`1osxxc`}],[`path`,{d:`M3 10h5`,key:`r794hk`}],[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`circle`,{cx:`16`,cy:`16`,r:`6`,key:`qoo3c4`}]]);e();var u=t();function d({className:e,flush:t=!1,...n}){return(0,u.jsx)(`div`,{"data-slot":`card`,"data-flush":t?`true`:void 0,className:o(`flex flex-col rounded-lg border bg-card text-card-foreground shadow-xs`,t?`gap-0 overflow-hidden py-0`:`gap-6 py-6`,e),...n})}function f(e){return r[((e-1)%7+7)%7]??``}function p(e,t){let n=i(typeof e==`number`?e:Date.parse(e),t);return n?`${f(n.weekday)} ${s(n.hour,n.minute)}`:``}function m(e,t){let n=i(typeof e==`number`?e:Date.parse(e),t);return n?s(n.hour,n.minute):``}function h(e,t,n=Date.now()){let r=Date.parse(e),a=i(r,t);if(!a)return``;if(n-r<6*864e5)return`${f(a.weekday)} ${s(a.hour,a.minute)}`;let o=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`][a.month-1];return`${a.day} ${o} ${s(a.hour,a.minute)}`}function g(e,t=Date.now()){let n=Math.max(0,Math.round((e-t)/6e4));return n<60?`in ${n}m`:n<1440?`in ${Math.round(n/60)}h`:`in ${Math.round(n/1440)}d`}function _(e){let t=Math.round(e/60),n=Math.floor(t/60);return n>0?`${n}h ${String(t%60).padStart(2,`0`)}m`:`${t}m`}function v(e){return e>=10?`$${e.toFixed(1)}`:`$${e.toFixed(2)}`}function y(e){if(e.kind===`schedule`)return n(e).map(a).join(`; `);if(e.kind===`tracker`){let t=e.trackerTrigger,n=t?.association.kind===`jira`?`Jira`:t?.association.kind===`linear`?`Linear`:`Tracker`;return t?`${n} · ${t.events.join(`, `)}${t.targetStatusIds?.length?` → ${t.targetStatusIds.join(`, `)}`:``}${t.changedLabelIds?.length?` · labels ${t.changedLabelIds.join(`, `)}`:``} · every ${Math.round((e.intervalSeconds??1800)/60)} min`:`${n} · select an event to complete setup`}let t=(e.events??[]).join(`, `),r=Math.round((e.intervalSeconds??300)/60);return`on ${t||`github`} · every ${r} min`}function b(e){switch(e){case`launched`:case`manual`:case`catch-up`:return`success`;case`failed`:case`error`:case`rate-limited`:return`danger`;default:return`neutral`}}export{g as a,y as c,l as d,h as i,v as l,f as n,b as o,p as r,m as s,_ as t,d as u};
|