@hearsay-tools/squawk 0.19.0-pr4549.9009 → 0.19.0-pr4551.9018
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/repo-routes.d.ts +13 -13
- package/dist/server/runs-routes.d.ts +38 -38
- package/dist/server/server.d.ts +58 -58
- package/package.json +4 -4
- package/web/dist/assets/{accounts-section-D-u_DtWB.js → accounts-section-Wc73jQ4s.js} +1 -1
- package/web/dist/assets/{activity-motion-BJfuRs4_.js → activity-motion-BPRLw_I9.js} +1 -1
- package/web/dist/assets/{activity-route-DF823sRF.js → activity-route-Da5ta_G-.js} +1 -1
- package/web/dist/assets/{agent-config-section-yVOSPvAV.js → agent-config-section-ZOyd2cRC.js} +1 -1
- package/web/dist/assets/{agent-defaults-section-B-708nZo.js → agent-defaults-section-_X3y2Omu.js} +1 -1
- package/web/dist/assets/{appearance-C7JR8yQP.js → appearance-BmdfStvY.js} +1 -1
- package/web/dist/assets/{archive-on-merge-field-cQjB3JXw.js → archive-on-merge-field-CAF2EWzH.js} +1 -1
- package/web/dist/assets/{automations-route-DetdA_Wc.js → automations-route-_7obPTdz.js} +1 -1
- package/web/dist/assets/{commit-list-IUPBn3_p.js → commit-list-CO8vRunh.js} +1 -1
- package/web/dist/assets/{diff-D0D2diRo.js → diff-9Oy07HJg.js} +2 -2
- package/web/dist/assets/{diff-controls-DkFuXR8H.js → diff-controls-DWdkazFx.js} +1 -1
- package/web/dist/assets/{diff-view-DrTNcOGt.js → diff-view-BSehoQ7R.js} +1 -1
- package/web/dist/assets/{discard-changes-dialog-DrTzz2nL.js → discard-changes-dialog-BhaVmNO6.js} +1 -1
- package/web/dist/assets/{file-preview-ClyNkz3w.js → file-preview-C83OUAjD.js} +1 -1
- package/web/dist/assets/{git-toolbar-CD0tW_Gt.js → git-toolbar--xUjN-yG.js} +1 -1
- package/web/dist/assets/github-CU_L3Gzq.js +1 -0
- package/web/dist/assets/{global-activity-route-DMnQf57X.js → global-activity-route-JAN35ZZ7.js} +1 -1
- package/web/dist/assets/{index-CYqlQ5WX.js → index-CpBnI67l.js} +4 -4
- package/web/dist/assets/{markdown-DnIKFUxT.js → markdown-CRffTry_.js} +1 -1
- package/web/dist/assets/{option-select-V5vwaidf.js → option-select-CANEdKB3.js} +1 -1
- package/web/dist/assets/{preferences-section-LrJJ31lo.js → preferences-section-ChSaVzf5.js} +1 -1
- package/web/dist/assets/{preview-pane-connected-BhKZY7hG.js → preview-pane-connected-DEoWwg1D.js} +1 -1
- package/web/dist/assets/{project-location-Dw4amAdN.js → project-location-C6kWal8h.js} +1 -1
- package/web/dist/assets/{projects-section-C9KK1G2b.js → projects-section-C2ILzM0u.js} +1 -1
- package/web/dist/assets/{prompt-templates-section-B3wv3JAi.js → prompt-templates-section-DR2g3ICn.js} +1 -1
- package/web/dist/assets/{remote-settings-notice-CpjMzKFN.js → remote-settings-notice-mR8dmhH6.js} +1 -1
- package/web/dist/assets/{repo-git--v40vCDa.js → repo-git-DYTJUaV2.js} +1 -1
- package/web/dist/assets/{report-reader-DxSIaXe4.js → report-reader-CHCeip_w.js} +1 -1
- package/web/dist/assets/{reports-D0dz0axR.js → reports-fVt2woJj.js} +1 -1
- package/web/dist/assets/{resources-section-IJzlERj6.js → resources-section-CvKw1n42.js} +1 -1
- package/web/dist/assets/{review-panel-BnLJGW1r.js → review-panel-KthwDPFp.js} +1 -1
- package/web/dist/assets/{run-header-BlKWDX-U.js → run-header-qJ9QeZZe.js} +1 -1
- package/web/dist/assets/{select-m657sHqH.js → select-DGiv2EMm.js} +1 -1
- package/web/dist/assets/{session-context-section-CvCu7yz8.js → session-context-section-1M2fJo4z.js} +1 -1
- package/web/dist/assets/{settings-agent-picker-DuWFrVrA.js → settings-agent-picker-BJY-YMtE.js} +1 -1
- package/web/dist/assets/{settings-save-bar-Bvkdir6u.js → settings-save-bar-BPJUUAP3.js} +1 -1
- package/web/dist/assets/{settings-shell-CGeDojd8.js → settings-shell-DrNPCX8c.js} +1 -1
- package/web/dist/assets/{sidebar-section-DBzwaGy3.js → sidebar-section-DOWp6Dmy.js} +1 -1
- package/web/dist/assets/{skills-Dfqyyc4k.js → skills-CkVpnXS3.js} +1 -1
- package/web/dist/assets/{task-changes-BHSGF2AK.js → task-changes-DdbXePt5.js} +1 -1
- package/web/dist/assets/{task-commits-C_BRO9JL.js → task-commits-D2JgTdX6.js} +1 -1
- package/web/dist/assets/{task-file-scope-BE6TmhVD.js → task-file-scope-B1WT9BWp.js} +1 -1
- package/web/dist/assets/{task-files-BWI76Ik0.js → task-files-DGsexDEU.js} +1 -1
- package/web/dist/assets/{task-github-item-BNOov7bL.js → task-github-item-q7DCEOfn.js} +1 -1
- package/web/dist/assets/{task-thread-DHDl0QzP.js → task-thread-_SnaFIGF.js} +1 -1
- package/web/dist/assets/{thread-state-BQPkuxv2.js → thread-state-BM9FWd8L.js} +1 -1
- package/web/dist/assets/use-hand-to-agent-state-Bep2f9LG.js +1 -0
- package/web/dist/assets/use-path-bases-CS-lRH5B.js +1 -0
- package/web/dist/assets/{workflows-DgYKv-8m.js → workflows-CU7SKlFm.js} +1 -1
- package/web/dist/assets/{workspace-tools-CXNsi4Df.js → workspace-tools-DO5szf7G.js} +1 -1
- package/web/dist/assets/{worktrees-section-y-fzp7im.js → worktrees-section-Ct-gx72w.js} +1 -1
- package/web/dist/index.html +1 -1
- package/web/dist/assets/github-CsAOfbST.js +0 -1
- package/web/dist/assets/use-hand-to-agent-state-nIZYH880.js +0 -1
- package/web/dist/assets/use-path-bases-BdKhEYST.js +0 -1
|
@@ -344,19 +344,6 @@ export declare function createRepoRoutes(deps: RepoRouteDeps): import("hono/hono
|
|
|
344
344
|
} & {
|
|
345
345
|
"/repo/commit/:sha": {
|
|
346
346
|
$get: {
|
|
347
|
-
output: string;
|
|
348
|
-
outputFormat: "text";
|
|
349
|
-
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
350
|
-
input: {
|
|
351
|
-
query: {
|
|
352
|
-
structured?: string | undefined;
|
|
353
|
-
};
|
|
354
|
-
} & {
|
|
355
|
-
param: {
|
|
356
|
-
sha: string;
|
|
357
|
-
};
|
|
358
|
-
};
|
|
359
|
-
} | {
|
|
360
347
|
output: {
|
|
361
348
|
error: string;
|
|
362
349
|
code?: "invalid_input" | undefined;
|
|
@@ -420,6 +407,19 @@ export declare function createRepoRoutes(deps: RepoRouteDeps): import("hono/hono
|
|
|
420
407
|
sha: string;
|
|
421
408
|
};
|
|
422
409
|
};
|
|
410
|
+
} | {
|
|
411
|
+
output: string;
|
|
412
|
+
outputFormat: "text";
|
|
413
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
414
|
+
input: {
|
|
415
|
+
query: {
|
|
416
|
+
structured?: string | undefined;
|
|
417
|
+
};
|
|
418
|
+
} & {
|
|
419
|
+
param: {
|
|
420
|
+
sha: string;
|
|
421
|
+
};
|
|
422
|
+
};
|
|
423
423
|
};
|
|
424
424
|
};
|
|
425
425
|
} & {
|
|
@@ -94,8 +94,6 @@ export declare function createRunsRoutes(deps: RunsRouteDeps): import("hono/hono
|
|
|
94
94
|
} | undefined;
|
|
95
95
|
invalidAsk?: boolean | undefined;
|
|
96
96
|
delegation?: {
|
|
97
|
-
role: "invalid";
|
|
98
|
-
} | {
|
|
99
97
|
role: "root";
|
|
100
98
|
conversation?: {
|
|
101
99
|
messages: {
|
|
@@ -330,6 +328,8 @@ export declare function createRunsRoutes(deps: RunsRouteDeps): import("hono/hono
|
|
|
330
328
|
} | undefined;
|
|
331
329
|
executionRevision?: number | undefined;
|
|
332
330
|
executionStartSeq?: number | undefined;
|
|
331
|
+
} | {
|
|
332
|
+
role: "invalid";
|
|
333
333
|
} | undefined;
|
|
334
334
|
agentInputs?: {
|
|
335
335
|
conversation?: {
|
|
@@ -1941,8 +1941,6 @@ export declare function createRunsRoutes(deps: RunsRouteDeps): import("hono/hono
|
|
|
1941
1941
|
} | undefined;
|
|
1942
1942
|
invalidAsk?: boolean | undefined;
|
|
1943
1943
|
delegation?: {
|
|
1944
|
-
role: "invalid";
|
|
1945
|
-
} | {
|
|
1946
1944
|
role: "root";
|
|
1947
1945
|
conversation?: {
|
|
1948
1946
|
messages: {
|
|
@@ -2177,6 +2175,8 @@ export declare function createRunsRoutes(deps: RunsRouteDeps): import("hono/hono
|
|
|
2177
2175
|
} | undefined;
|
|
2178
2176
|
executionRevision?: number | undefined;
|
|
2179
2177
|
executionStartSeq?: number | undefined;
|
|
2178
|
+
} | {
|
|
2179
|
+
role: "invalid";
|
|
2180
2180
|
} | undefined;
|
|
2181
2181
|
agentInputs?: {
|
|
2182
2182
|
conversation?: {
|
|
@@ -3156,8 +3156,6 @@ export declare function createRunsRoutes(deps: RunsRouteDeps): import("hono/hono
|
|
|
3156
3156
|
} | undefined;
|
|
3157
3157
|
invalidAsk?: boolean | undefined;
|
|
3158
3158
|
delegation?: {
|
|
3159
|
-
role: "invalid";
|
|
3160
|
-
} | {
|
|
3161
3159
|
role: "root";
|
|
3162
3160
|
conversation?: {
|
|
3163
3161
|
messages: {
|
|
@@ -3392,6 +3390,8 @@ export declare function createRunsRoutes(deps: RunsRouteDeps): import("hono/hono
|
|
|
3392
3390
|
} | undefined;
|
|
3393
3391
|
executionRevision?: number | undefined;
|
|
3394
3392
|
executionStartSeq?: number | undefined;
|
|
3393
|
+
} | {
|
|
3394
|
+
role: "invalid";
|
|
3395
3395
|
} | undefined;
|
|
3396
3396
|
agentInputs?: {
|
|
3397
3397
|
conversation?: {
|
|
@@ -5142,8 +5142,6 @@ export declare function createRunsRoutes(deps: RunsRouteDeps): import("hono/hono
|
|
|
5142
5142
|
currentStepId?: string | undefined;
|
|
5143
5143
|
error?: string | undefined;
|
|
5144
5144
|
delegation?: {
|
|
5145
|
-
role: "invalid";
|
|
5146
|
-
} | {
|
|
5147
5145
|
role: "root";
|
|
5148
5146
|
conversation?: {
|
|
5149
5147
|
messages: {
|
|
@@ -5378,6 +5376,8 @@ export declare function createRunsRoutes(deps: RunsRouteDeps): import("hono/hono
|
|
|
5378
5376
|
} | undefined;
|
|
5379
5377
|
executionRevision?: number | undefined;
|
|
5380
5378
|
executionStartSeq?: number | undefined;
|
|
5379
|
+
} | {
|
|
5380
|
+
role: "invalid";
|
|
5381
5381
|
} | undefined;
|
|
5382
5382
|
lastWaitsError?: string | undefined;
|
|
5383
5383
|
automaticWakes?: number | undefined;
|
|
@@ -5615,8 +5615,6 @@ export declare function createRunsRoutes(deps: RunsRouteDeps): import("hono/hono
|
|
|
5615
5615
|
} | undefined;
|
|
5616
5616
|
invalidAsk?: boolean | undefined;
|
|
5617
5617
|
delegation?: {
|
|
5618
|
-
role: "invalid";
|
|
5619
|
-
} | {
|
|
5620
5618
|
role: "root";
|
|
5621
5619
|
conversation?: {
|
|
5622
5620
|
messages: {
|
|
@@ -5851,6 +5849,8 @@ export declare function createRunsRoutes(deps: RunsRouteDeps): import("hono/hono
|
|
|
5851
5849
|
} | undefined;
|
|
5852
5850
|
executionRevision?: number | undefined;
|
|
5853
5851
|
executionStartSeq?: number | undefined;
|
|
5852
|
+
} | {
|
|
5853
|
+
role: "invalid";
|
|
5854
5854
|
} | undefined;
|
|
5855
5855
|
agentInputs?: {
|
|
5856
5856
|
conversation?: {
|
|
@@ -6806,8 +6806,6 @@ export declare function createRunsRoutes(deps: RunsRouteDeps): import("hono/hono
|
|
|
6806
6806
|
} | undefined;
|
|
6807
6807
|
invalidAsk?: boolean | undefined;
|
|
6808
6808
|
delegation?: {
|
|
6809
|
-
role: "invalid";
|
|
6810
|
-
} | {
|
|
6811
6809
|
role: "root";
|
|
6812
6810
|
conversation?: {
|
|
6813
6811
|
messages: {
|
|
@@ -7042,6 +7040,8 @@ export declare function createRunsRoutes(deps: RunsRouteDeps): import("hono/hono
|
|
|
7042
7040
|
} | undefined;
|
|
7043
7041
|
executionRevision?: number | undefined;
|
|
7044
7042
|
executionStartSeq?: number | undefined;
|
|
7043
|
+
} | {
|
|
7044
|
+
role: "invalid";
|
|
7045
7045
|
} | undefined;
|
|
7046
7046
|
agentInputs?: {
|
|
7047
7047
|
conversation?: {
|
|
@@ -8735,8 +8735,6 @@ export declare function createRunsRoutes(deps: RunsRouteDeps): import("hono/hono
|
|
|
8735
8735
|
currentStepId?: string | undefined;
|
|
8736
8736
|
error?: string | undefined;
|
|
8737
8737
|
delegation?: {
|
|
8738
|
-
role: "invalid";
|
|
8739
|
-
} | {
|
|
8740
8738
|
role: "root";
|
|
8741
8739
|
conversation?: {
|
|
8742
8740
|
messages: {
|
|
@@ -8971,6 +8969,8 @@ export declare function createRunsRoutes(deps: RunsRouteDeps): import("hono/hono
|
|
|
8971
8969
|
} | undefined;
|
|
8972
8970
|
executionRevision?: number | undefined;
|
|
8973
8971
|
executionStartSeq?: number | undefined;
|
|
8972
|
+
} | {
|
|
8973
|
+
role: "invalid";
|
|
8974
8974
|
} | undefined;
|
|
8975
8975
|
lastWaitsError?: string | undefined;
|
|
8976
8976
|
automaticWakes?: number | undefined;
|
|
@@ -9268,8 +9268,6 @@ export declare function createRunsRoutes(deps: RunsRouteDeps): import("hono/hono
|
|
|
9268
9268
|
} | undefined;
|
|
9269
9269
|
invalidAsk?: boolean | undefined;
|
|
9270
9270
|
delegation?: {
|
|
9271
|
-
role: "invalid";
|
|
9272
|
-
} | {
|
|
9273
9271
|
role: "root";
|
|
9274
9272
|
conversation?: {
|
|
9275
9273
|
messages: {
|
|
@@ -9504,6 +9502,8 @@ export declare function createRunsRoutes(deps: RunsRouteDeps): import("hono/hono
|
|
|
9504
9502
|
} | undefined;
|
|
9505
9503
|
executionRevision?: number | undefined;
|
|
9506
9504
|
executionStartSeq?: number | undefined;
|
|
9505
|
+
} | {
|
|
9506
|
+
role: "invalid";
|
|
9507
9507
|
} | undefined;
|
|
9508
9508
|
agentInputs?: {
|
|
9509
9509
|
conversation?: {
|
|
@@ -11327,8 +11327,6 @@ export declare function createRunsRoutes(deps: RunsRouteDeps): import("hono/hono
|
|
|
11327
11327
|
currentStepId?: string | undefined;
|
|
11328
11328
|
error?: string | undefined;
|
|
11329
11329
|
delegation?: {
|
|
11330
|
-
role: "invalid";
|
|
11331
|
-
} | {
|
|
11332
11330
|
role: "root";
|
|
11333
11331
|
conversation?: {
|
|
11334
11332
|
messages: {
|
|
@@ -11563,6 +11561,8 @@ export declare function createRunsRoutes(deps: RunsRouteDeps): import("hono/hono
|
|
|
11563
11561
|
} | undefined;
|
|
11564
11562
|
executionRevision?: number | undefined;
|
|
11565
11563
|
executionStartSeq?: number | undefined;
|
|
11564
|
+
} | {
|
|
11565
|
+
role: "invalid";
|
|
11566
11566
|
} | undefined;
|
|
11567
11567
|
lastWaitsError?: string | undefined;
|
|
11568
11568
|
automaticWakes?: number | undefined;
|
|
@@ -12321,20 +12321,20 @@ export declare function createRunsRoutes(deps: RunsRouteDeps): import("hono/hono
|
|
|
12321
12321
|
} & {
|
|
12322
12322
|
"/runs/:id/handoff": {
|
|
12323
12323
|
$get: {
|
|
12324
|
-
output:
|
|
12325
|
-
|
|
12326
|
-
|
|
12324
|
+
output: {
|
|
12325
|
+
error: string;
|
|
12326
|
+
};
|
|
12327
|
+
outputFormat: "json";
|
|
12328
|
+
status: 404;
|
|
12327
12329
|
input: {
|
|
12328
12330
|
param: {
|
|
12329
12331
|
id: string;
|
|
12330
12332
|
};
|
|
12331
12333
|
};
|
|
12332
12334
|
} | {
|
|
12333
|
-
output:
|
|
12334
|
-
|
|
12335
|
-
|
|
12336
|
-
outputFormat: "json";
|
|
12337
|
-
status: 404;
|
|
12335
|
+
output: string;
|
|
12336
|
+
outputFormat: "text";
|
|
12337
|
+
status: 200;
|
|
12338
12338
|
input: {
|
|
12339
12339
|
param: {
|
|
12340
12340
|
id: string;
|
|
@@ -12372,20 +12372,20 @@ export declare function createRunsRoutes(deps: RunsRouteDeps): import("hono/hono
|
|
|
12372
12372
|
} & {
|
|
12373
12373
|
"/runs/:id/diff": {
|
|
12374
12374
|
$get: {
|
|
12375
|
-
output:
|
|
12376
|
-
|
|
12377
|
-
|
|
12375
|
+
output: {
|
|
12376
|
+
error: string;
|
|
12377
|
+
};
|
|
12378
|
+
outputFormat: "json";
|
|
12379
|
+
status: 404 | 409;
|
|
12378
12380
|
input: {
|
|
12379
12381
|
param: {
|
|
12380
12382
|
id: string;
|
|
12381
12383
|
};
|
|
12382
12384
|
};
|
|
12383
12385
|
} | {
|
|
12384
|
-
output:
|
|
12385
|
-
|
|
12386
|
-
|
|
12387
|
-
outputFormat: "json";
|
|
12388
|
-
status: 404 | 409;
|
|
12386
|
+
output: string;
|
|
12387
|
+
outputFormat: "text";
|
|
12388
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
12389
12389
|
input: {
|
|
12390
12390
|
param: {
|
|
12391
12391
|
id: string;
|
|
@@ -12478,9 +12478,9 @@ export declare function createRunsRoutes(deps: RunsRouteDeps): import("hono/hono
|
|
|
12478
12478
|
status: 404 | 409;
|
|
12479
12479
|
input: {
|
|
12480
12480
|
param: {
|
|
12481
|
-
sha: string;
|
|
12482
|
-
} & {
|
|
12483
12481
|
id: string;
|
|
12482
|
+
} & {
|
|
12483
|
+
sha: string;
|
|
12484
12484
|
};
|
|
12485
12485
|
};
|
|
12486
12486
|
} | {
|
|
@@ -12509,9 +12509,9 @@ export declare function createRunsRoutes(deps: RunsRouteDeps): import("hono/hono
|
|
|
12509
12509
|
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
12510
12510
|
input: {
|
|
12511
12511
|
param: {
|
|
12512
|
-
sha: string;
|
|
12513
|
-
} & {
|
|
12514
12512
|
id: string;
|
|
12513
|
+
} & {
|
|
12514
|
+
sha: string;
|
|
12515
12515
|
};
|
|
12516
12516
|
};
|
|
12517
12517
|
};
|
package/dist/server/server.d.ts
CHANGED
|
@@ -5489,6 +5489,19 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
5489
5489
|
} & {
|
|
5490
5490
|
"/repo/commit/:sha": {
|
|
5491
5491
|
$get: {
|
|
5492
|
+
output: string;
|
|
5493
|
+
outputFormat: "text";
|
|
5494
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
5495
|
+
input: {
|
|
5496
|
+
query: {
|
|
5497
|
+
structured?: string | undefined;
|
|
5498
|
+
};
|
|
5499
|
+
} & {
|
|
5500
|
+
param: {
|
|
5501
|
+
sha: string;
|
|
5502
|
+
};
|
|
5503
|
+
};
|
|
5504
|
+
} | {
|
|
5492
5505
|
output: {
|
|
5493
5506
|
error: string;
|
|
5494
5507
|
code?: "invalid_input" | undefined;
|
|
@@ -5552,19 +5565,6 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
5552
5565
|
sha: string;
|
|
5553
5566
|
};
|
|
5554
5567
|
};
|
|
5555
|
-
} | {
|
|
5556
|
-
output: string;
|
|
5557
|
-
outputFormat: "text";
|
|
5558
|
-
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
5559
|
-
input: {
|
|
5560
|
-
query: {
|
|
5561
|
-
structured?: string | undefined;
|
|
5562
|
-
};
|
|
5563
|
-
} & {
|
|
5564
|
-
param: {
|
|
5565
|
-
sha: string;
|
|
5566
|
-
};
|
|
5567
|
-
};
|
|
5568
5568
|
};
|
|
5569
5569
|
};
|
|
5570
5570
|
} & {
|
|
@@ -18069,20 +18069,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
18069
18069
|
} & {
|
|
18070
18070
|
"/runs/:id/handoff": {
|
|
18071
18071
|
$get: {
|
|
18072
|
-
output:
|
|
18073
|
-
|
|
18074
|
-
|
|
18075
|
-
outputFormat: "json";
|
|
18076
|
-
status: 404;
|
|
18072
|
+
output: string;
|
|
18073
|
+
outputFormat: "text";
|
|
18074
|
+
status: 200;
|
|
18077
18075
|
input: {
|
|
18078
18076
|
param: {
|
|
18079
18077
|
id: string;
|
|
18080
18078
|
};
|
|
18081
18079
|
};
|
|
18082
18080
|
} | {
|
|
18083
|
-
output:
|
|
18084
|
-
|
|
18085
|
-
|
|
18081
|
+
output: {
|
|
18082
|
+
error: string;
|
|
18083
|
+
};
|
|
18084
|
+
outputFormat: "json";
|
|
18085
|
+
status: 404;
|
|
18086
18086
|
input: {
|
|
18087
18087
|
param: {
|
|
18088
18088
|
id: string;
|
|
@@ -18120,20 +18120,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
18120
18120
|
} & {
|
|
18121
18121
|
"/runs/:id/diff": {
|
|
18122
18122
|
$get: {
|
|
18123
|
-
output:
|
|
18124
|
-
|
|
18125
|
-
|
|
18126
|
-
outputFormat: "json";
|
|
18127
|
-
status: 404 | 409;
|
|
18123
|
+
output: string;
|
|
18124
|
+
outputFormat: "text";
|
|
18125
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
18128
18126
|
input: {
|
|
18129
18127
|
param: {
|
|
18130
18128
|
id: string;
|
|
18131
18129
|
};
|
|
18132
18130
|
};
|
|
18133
18131
|
} | {
|
|
18134
|
-
output:
|
|
18135
|
-
|
|
18136
|
-
|
|
18132
|
+
output: {
|
|
18133
|
+
error: string;
|
|
18134
|
+
};
|
|
18135
|
+
outputFormat: "json";
|
|
18136
|
+
status: 404 | 409;
|
|
18137
18137
|
input: {
|
|
18138
18138
|
param: {
|
|
18139
18139
|
id: string;
|
|
@@ -21118,6 +21118,19 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
21118
21118
|
} & {
|
|
21119
21119
|
"/repo/commit/:sha": {
|
|
21120
21120
|
$get: {
|
|
21121
|
+
output: string;
|
|
21122
|
+
outputFormat: "text";
|
|
21123
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
21124
|
+
input: {
|
|
21125
|
+
query: {
|
|
21126
|
+
structured?: string | undefined;
|
|
21127
|
+
};
|
|
21128
|
+
} & {
|
|
21129
|
+
param: {
|
|
21130
|
+
sha: string;
|
|
21131
|
+
};
|
|
21132
|
+
};
|
|
21133
|
+
} | {
|
|
21121
21134
|
output: {
|
|
21122
21135
|
error: string;
|
|
21123
21136
|
code?: "invalid_input" | undefined;
|
|
@@ -21181,19 +21194,6 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
21181
21194
|
sha: string;
|
|
21182
21195
|
};
|
|
21183
21196
|
};
|
|
21184
|
-
} | {
|
|
21185
|
-
output: string;
|
|
21186
|
-
outputFormat: "text";
|
|
21187
|
-
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
21188
|
-
input: {
|
|
21189
|
-
query: {
|
|
21190
|
-
structured?: string | undefined;
|
|
21191
|
-
};
|
|
21192
|
-
} & {
|
|
21193
|
-
param: {
|
|
21194
|
-
sha: string;
|
|
21195
|
-
};
|
|
21196
|
-
};
|
|
21197
21197
|
};
|
|
21198
21198
|
};
|
|
21199
21199
|
} & {
|
|
@@ -33698,20 +33698,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
33698
33698
|
} & {
|
|
33699
33699
|
"/runs/:id/handoff": {
|
|
33700
33700
|
$get: {
|
|
33701
|
-
output:
|
|
33702
|
-
|
|
33703
|
-
|
|
33704
|
-
outputFormat: "json";
|
|
33705
|
-
status: 404;
|
|
33701
|
+
output: string;
|
|
33702
|
+
outputFormat: "text";
|
|
33703
|
+
status: 200;
|
|
33706
33704
|
input: {
|
|
33707
33705
|
param: {
|
|
33708
33706
|
id: string;
|
|
33709
33707
|
};
|
|
33710
33708
|
};
|
|
33711
33709
|
} | {
|
|
33712
|
-
output:
|
|
33713
|
-
|
|
33714
|
-
|
|
33710
|
+
output: {
|
|
33711
|
+
error: string;
|
|
33712
|
+
};
|
|
33713
|
+
outputFormat: "json";
|
|
33714
|
+
status: 404;
|
|
33715
33715
|
input: {
|
|
33716
33716
|
param: {
|
|
33717
33717
|
id: string;
|
|
@@ -33749,20 +33749,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
33749
33749
|
} & {
|
|
33750
33750
|
"/runs/:id/diff": {
|
|
33751
33751
|
$get: {
|
|
33752
|
-
output:
|
|
33753
|
-
|
|
33754
|
-
|
|
33755
|
-
outputFormat: "json";
|
|
33756
|
-
status: 404 | 409;
|
|
33752
|
+
output: string;
|
|
33753
|
+
outputFormat: "text";
|
|
33754
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
33757
33755
|
input: {
|
|
33758
33756
|
param: {
|
|
33759
33757
|
id: string;
|
|
33760
33758
|
};
|
|
33761
33759
|
};
|
|
33762
33760
|
} | {
|
|
33763
|
-
output:
|
|
33764
|
-
|
|
33765
|
-
|
|
33761
|
+
output: {
|
|
33762
|
+
error: string;
|
|
33763
|
+
};
|
|
33764
|
+
outputFormat: "json";
|
|
33765
|
+
status: 404 | 409;
|
|
33766
33766
|
input: {
|
|
33767
33767
|
param: {
|
|
33768
33768
|
id: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hearsay-tools/squawk",
|
|
3
|
-
"version": "0.19.0-
|
|
3
|
+
"version": "0.19.0-pr4551.9018",
|
|
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",
|
|
@@ -69,8 +69,8 @@
|
|
|
69
69
|
"devDependencies": {
|
|
70
70
|
"@babel/parser": "^8.0.8",
|
|
71
71
|
"@babel/types": "^8.0.8",
|
|
72
|
-
"@open-mercato/cezar-api-client": "0.19.0-
|
|
73
|
-
"@open-mercato/cezar-contract": "0.19.0-
|
|
72
|
+
"@open-mercato/cezar-api-client": "0.19.0-pr4551.9018",
|
|
73
|
+
"@open-mercato/cezar-contract": "0.19.0-pr4551.9018",
|
|
74
74
|
"@types/node": "^24.19.1",
|
|
75
75
|
"@types/ws": "^8.18.1",
|
|
76
76
|
"esbuild": "^0.28.1",
|
|
@@ -87,5 +87,5 @@
|
|
|
87
87
|
"publishConfig": {
|
|
88
88
|
"access": "public"
|
|
89
89
|
},
|
|
90
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "eaa09d12ea6025bf98662c04c92eb7113b990af2"
|
|
91
91
|
}
|
|
@@ -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,Et as i,Ft as a,Jt as o,Mt as s,Qt as c,St as l,Yt as u,Zt as d,an as f,ft as p,lt as m,nn as h,pt as g,un as _,ut as v,vt as y}from"./queries-B8INH8MM.js";import{Hn as b,Rn as x,Rr as S,n as C,si as w,vi as ee,zn as T}from"./toaster-Cjr2jC1Q.js";import{f as E}from"./chunk-KS7C4IRE-Cg8l-LDN.js";import{b as D}from"./design-icons-QbNMZniQ.js";import{t as te}from"./createLucideIcon-BHp8sXmF.js";import{t as ne}from"./folder-browser-DcR_vo2i.js";import{t as O}from"./button-C8jUIs8Q.js";import{t as re}from"./badge-B6B-xYQQ.js";import{a as ie,i as ae,o as oe,r as se,s as ce,t as k}from"./dialog-DRZuXvul.js";import{t as A}from"./status-dot-BXf-Ubd0.js";import{n as j}from"./agents-settings-path-7X6_cvUg.js";import{t as M}from"./centered-state-BgSV4e79.js";import{$t as N,A as P,Hn as F,Jt as I,M as L,Mn as R,On as z,P as B,Qt as V,Xt as H,Yt as U,Zt as W,en as G,jn as K,tn as le}from"./index-CYqlQ5WX.js";import{t as q}from"./option-select-V5vwaidf.js";import{n as J,r as ue,t as de}from"./settings-agent-picker-DuWFrVrA.js";import{n as fe,r as pe,t as me}from"./remote-settings-notice-CpjMzKFN.js";import{n as he,t as ge}from"./save-cue-CpHgT93o.js";import{t as _e}from"./use-path-bases-BdKhEYST.js";import{t as ve}from"./use-workspace-config-save-Do4bGg72.js";var ye=te(`id-card`,[[`path`,{d:`M16 10h2`,key:`8sgtl7`}],[`path`,{d:`M16 14h2`,key:`epxaof`}],[`path`,{d:`M6.17 15a3 3 0 0 1 5.66 0`,key:`n6f512`}],[`circle`,{cx:`9`,cy:`11`,r:`2`,key:`yxgjnd`}],[`rect`,{x:`2`,y:`5`,width:`20`,height:`14`,rx:`2`,key:`qneu4z`}]]),Y=e(t(),1),X=n(),be=`~/.claude-second`;function xe({open:e,onOpenChange:t,providers:n,initialProvider:r}){let i=h().data,[a,o]=(0,Y.useState)(null),[s,c]=(0,Y.useState)(null),[l,f]=(0,Y.useState)(r??n[0]??`claude`),[p,m]=(0,Y.useState)(``),[_,v]=(0,Y.useState)(``),[y,b]=(0,Y.useState)(!1),x=g(),S=_.trim();return(0,X.jsx)(k,{open:e,onOpenChange:t,children:(0,X.jsxs)(se,{"data-slot":`add-account-dialog`,className:`sm:max-w-lg`,children:[(0,X.jsxs)(oe,{children:[(0,X.jsx)(ce,{children:`Add agent account`}),(0,X.jsx)(ae,{children:`The config folder this account uses. It does not have to exist yet — Connect signs in and the CLI creates it.`})]}),(0,X.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,X.jsxs)(`label`,{className:`flex items-center gap-2 text-[13px]`,children:[(0,X.jsx)(`span`,{className:`text-muted-foreground`,children:`Agent`}),(0,X.jsx)(q,{"aria-label":`Agent`,"data-slot":`add-account-provider`,value:l,onValueChange:e=>f(e),className:`settings-select max-w-full bg-card text-[13px]`,options:n.map(e=>({value:e,label:u(i,e)}))})]}),(0,X.jsxs)(`label`,{className:`flex min-w-0 flex-1 items-center gap-2 text-[13px]`,children:[(0,X.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:`Name`}),(0,X.jsx)(`input`,{type:`text`,"aria-label":`Account name`,"data-slot":`add-account-label`,value:p,placeholder:`Work`,onChange:e=>m(e.target.value),className:`min-w-0 flex-1 rounded-md border border-input bg-card px-2 py-1 text-[13px] outline-none focus-visible:border-ring`})]})]}),(0,X.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,X.jsxs)(`label`,{className:`flex min-w-0 items-center gap-2 text-[13px]`,children:[(0,X.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:`Folder`}),(0,X.jsx)(`input`,{type:`text`,spellCheck:!1,autoComplete:`off`,"aria-label":`Config folder`,"data-slot":`add-account-dir`,value:_,placeholder:d(i,l)?.accountFolderExample??be,onChange:e=>{v(e.target.value),c(null),x.reset()},className:`min-w-0 flex-1 rounded-md border border-input bg-card px-2 py-1 font-mono text-[13px] outline-none focus-visible:border-ring`}),(0,X.jsx)(O,{type:`button`,variant:`ghost`,size:`sm`,"data-action":`add-account-browse`,"aria-expanded":y,onClick:()=>b(e=>!e),children:y?`Hide folders`:`Browse…`})]}),(0,X.jsxs)(`p`,{className:`text-xs text-soft-foreground`,children:[`A `,(0,X.jsx)(`code`,{children:`~`}),` is kept as written and expanded when the agent runs.`]})]}),y?(0,X.jsx)(ne,{path:a,selected:s,onSelect:e=>{c(e),v(e.path),x.reset()},onEnter:e=>{o(e),c(null),x.reset()},showHidden:!0,emptyHint:`No subfolders here — pick this folder by typing its path above.`}):null,x.isError?(0,X.jsx)(`p`,{"data-slot":`add-account-error`,className:`min-w-0 break-words text-[13px] text-danger`,children:x.error instanceof Error?x.error.message:`could not add that folder`}):null,(0,X.jsxs)(ie,{className:`min-w-0 sm:items-center sm:justify-end`,children:[(0,X.jsx)(O,{variant:`outline`,onClick:()=>t(!1),children:`Cancel`}),(0,X.jsx)(O,{"data-slot":`add-account-confirm`,disabled:S===``||x.isPending,onClick:()=>{S===``||x.isPending||x.mutate({provider:l,configDir:S,...p.trim()?{label:p.trim()}:{}},{onSuccess:()=>{t(!1),m(``),v(``),c(null),b(!1),C(`Account added — use Connect to sign in`)}})},children:x.isPending?`Adding…`:`Add account`})]})]})})}async function Se(e){return b(await T.api.v1[`runner-install`][`:runner`].$get({param:{runner:e}}),`/runner-install/:runner`)}async function Ce(e,t){return b(await T.api.v1[`runner-install`][`:runner`].$post({param:{runner:e},json:{action:t}}),`/runner-install/:runner`)}var we={idle:``,checking:`Checking for updates…`,downloading:`Downloading CLI…`,verifying:`Verifying CLI…`,extracting:`Extracting CLI…`,activating:`Activating CLI…`,removing:`Removing CLI…`,failed:``};function Te(e){let t=y().data?.capabilities?.settingsAdmin===!0,n=ee(),r=[`runner-install`,e],i=w({queryKey:r,queryFn:()=>Se(e),enabled:t,retry:!1,refetchInterval:e=>{if(e.state.error)return!1;let t=e.state.data?.phase;return t&&t!==`idle`&&t!==`failed`?1e3:6e4}}),a=_({mutationFn:t=>Ce(e,t),retry:!1,onSuccess:e=>{n.setQueryData(r,e)}}),o=i.data;return{allowed:t,data:o,busy:a.isPending||!!o&&o.phase!==`idle`&&o.phase!==`failed`,error:a.error?.message??i.error?.message??o?.error,action:a,status:i}}function Ee({state:e}){let{data:t,busy:n,action:r,status:i}=e;if(t?.supported===!1)return(0,X.jsx)(`p`,{children:`This host is not supported by the CLI installer.`});let a=!!t?.installedVersion;return(0,X.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,X.jsx)(O,{className:`min-h-11 active:opacity-80`,disabled:n||!t,onClick:()=>r.mutate(a?`update`:`install`),children:a?`Update CLI`:`Install CLI`}),a?(0,X.jsx)(O,{className:`min-h-11 active:opacity-80`,variant:`outline`,disabled:n,onClick:()=>r.mutate(`remove`),children:`Remove CLI`}):null,(0,X.jsx)(O,{className:`min-h-11 active:opacity-80`,variant:`outline`,disabled:n,onClick:()=>{i.isError?i.refetch():r.mutate(`check`)},children:`Check for updates`})]})}function De({runner:e}){let t=Te(e),{allowed:n,data:r,busy:i,error:a}=t;return n?(0,X.jsxs)(`section`,{"aria-label":`CLI installation`,className:`grid gap-3`,children:[(0,X.jsxs)(`p`,{role:`status`,className:`text-sm text-muted-foreground`,children:[r?.installedVersion?`Installed CLI ${r.installedVersion}`:`CLI not installed`,r?.latestVersion?` · Latest ${r.latestVersion}`:``,i&&r?` · ${we[r.phase]}`:``]}),a?(0,X.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:a}):null,(0,X.jsx)(Ee,{state:t}),r?.installedVersion?(0,X.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Removing the CLI keeps account data and lets running tasks finish.`}):null]}):null}var Oe={connected:R(`connected`),disconnected:R(`disconnected`),"not-installed":R(`not-installed`),unknown:R(`unknown`)};function ke(){let e=v(),t=h();if(e.isPending||t.isPending)return(0,X.jsx)(`p`,{"data-slot":`accounts-loading`,className:`p-4 text-[13px] text-soft-foreground md:p-6`,children:`Loading agents…`});let n=e.error??t.error;return n?(0,X.jsx)(M,{icon:(0,X.jsx)(ye,{}),tone:`danger`,title:`Agents did not load`,subtitle:n.message,heading:`h2`}):(0,X.jsx)(je,{data:e.data,runners:t.data})}function Z(e,t){let n=F(e,t),r=n.split(`/`);return r.length>4?`…/${r.slice(-3).join(`/`)}`:n}function Ae(){let{hash:e}=E();(0,Y.useEffect)(()=>{if(!e)return;let t=document.getElementById(decodeURIComponent(e.slice(1)));t&&(t.scrollIntoView?.({block:`start`}),t.focus({preventScroll:!0}))},[e])}function je({data:e,runners:t}){let n=y(),[r,a]=(0,Y.useState)(null),[o,s]=(0,Y.useState)(null),c=i();return Ae(),pe(),(0,X.jsxs)(`div`,{"data-slot":`accounts-section`,className:`mx-auto flex w-full max-w-2xl flex-col gap-5 p-4 pb-[calc(90px+env(safe-area-inset-bottom))] md:p-6 md:pb-6`,children:[(0,X.jsx)(fe,{risk:`Agent accounts run each CLI with the configured host folder`}),e.editable?null:(0,X.jsxs)(`p`,{"data-slot":`accounts-hosted`,className:`text-[13px] text-muted-foreground`,children:[`Agent accounts are read-only on this remote cockpit. Run`,` `,(0,X.jsx)(`code`,{children:me}),` on the host to add, edit, or sign in to accounts here.`]}),(0,X.jsx)(`div`,{"data-slot":`agent-cards`,className:`flex flex-col gap-3`,children:t.runners.map(r=>(0,X.jsx)(Fe,{entry:r,check:n.data?.checks?.find(e=>e.name===r.id),settingsAdmin:n.data?.capabilities?.settingsAdmin===!0,runners:t,editable:e.editable,accounts:e.profiles.filter(e=>e.provider===r.id),canCarryAccounts:e.profileCapableProviders.includes(r.id),onAdd:()=>a(r.id),onRemove:s},r.id))}),(0,X.jsx)(Ie,{runners:t}),r===null?null:(0,X.jsx)(xe,{open:!0,onOpenChange:e=>!e&&a(null),providers:e.profileCapableProviders,initialProvider:r},r),(0,X.jsx)(I,{open:o!==null,onOpenChange:e=>!e&&s(null),children:(0,X.jsxs)(W,{"data-slot":`accounts-remove-confirm`,children:[(0,X.jsxs)(G,{children:[(0,X.jsxs)(le,{children:[`Remove “`,o?.label,`”?`]}),(0,X.jsxs)(V,{children:[`This only forgets the account. Nothing in `,o?.configDir??`this account’s folder`,` is deleted — not your login, not your sessions. Projects using it fall back to the default account, and tasks that ran under it can no longer be resumed from here.`]})]}),(0,X.jsxs)(N,{children:[(0,X.jsx)(H,{children:`Cancel`}),(0,X.jsx)(U,{"data-action":`accounts-remove-confirm`,disabled:c.isPending,onClick:()=>{let e=o;e&&c.mutate(e.id,{onSuccess:()=>{s(null),C(`Removed ${e.label}`)},onError:e=>C(e.message,{tone:`danger`})})},children:`Remove`})]})]})})]})}function Me({entry:e,check:t}){return t===void 0?(0,X.jsx)(`span`,{"data-slot":`agent-installed`,children:`Checking CLI…`}):t.available?(0,X.jsxs)(`span`,{className:`whitespace-nowrap`,children:[(0,X.jsx)(`span`,{"data-slot":`agent-installed`,children:K(t.version)?`CLI simulated`:`CLI installed`}),t.version?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`span`,{"aria-hidden":`true`,className:`settings-agent-summary-sep`,children:`·`}),(0,X.jsx)(Ne,{version:t.version})]}):null]}):(0,X.jsxs)(`span`,{"data-slot":`agent-installed`,children:[`CLI not installed`,e.installHint?(0,X.jsxs)(X.Fragment,{children:[` — `,(0,X.jsx)(`code`,{className:`break-all`,children:e.installHint})]}):null]})}function Ne({version:e}){return K(e)?(0,X.jsx)(`span`,{"data-slot":`agent-version`,"data-dry-run":``,title:e,className:`rounded-full border border-border bg-muted px-2 py-0.5 text-xs font-medium text-muted-foreground`,children:z.label}):(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`span`,{className:`sr-only`,children:`, version `}),(0,X.jsx)(`span`,{"data-slot":`agent-version`,className:`text-muted-foreground`,children:e})]})}function Pe({items:e}){let t=e.filter(e=>e!=null&&e!==!1);return t.length===0?null:(0,X.jsx)(`p`,{"data-slot":`agent-summary`,className:`settings-agent-summary`,children:t.map((e,t)=>(0,X.jsxs)(`span`,{className:`settings-agent-summary-item`,children:[t>0?(0,X.jsx)(`span`,{"aria-hidden":`true`,className:`settings-agent-summary-sep`,children:`·`}):null,e]},t))})}function Q({titleId:e,title:t,summary:n,actions:r,actionsSlot:i}){return(0,X.jsxs)(`div`,{"data-slot":`agent-head`,className:`settings-agent-head`,children:[(0,X.jsxs)(`div`,{className:`settings-agent-heading`,children:[(0,X.jsx)(`h3`,{id:e,className:`settings-account-provider-title`,children:t}),(0,X.jsx)(Pe,{items:n})]}),r?(0,X.jsx)(`div`,{"data-slot":i,className:`settings-account-actions`,children:r}):null]})}function Fe({entry:e,check:t,settingsAdmin:n,runners:r,editable:i,accounts:a,canCarryAccounts:o,onAdd:s,onRemove:c}){let l=e.id,u=e.displayName,d=e.managedInstall===!0&&n,f=a.filter(e=>e.isDefault).length,p=`${j(l)}-title`,m=i&&o?(0,X.jsx)(O,{type:`button`,variant:`outline`,size:`sm`,"data-action":`accounts-add`,"data-provider":l,onClick:s,children:`Add account`}):null,h={titleId:p,title:u,facts:[d?null:(0,X.jsx)(Me,{entry:e,check:t}),i||a.length>0?(0,X.jsxs)(`span`,{className:`settings-account-count`,title:`${f} discovered, ${a.length-f} added`,children:[a.length,` `,a.length===1?`account`:`accounts`]}):null],addButton:m},[g,..._]=a;return(0,X.jsxs)(`section`,{id:j(l),tabIndex:-1,"aria-labelledby":p,"data-slot":`accounts-provider`,"data-provider":l,className:`settings-agent-card flex flex-col rounded-lg border border-border bg-card`,children:[g===void 0?(0,X.jsx)(Q,{titleId:p,title:u,summary:h.facts,actions:m,actionsSlot:`accounts-actions`}):null,d?(0,X.jsx)(De,{runner:l}):null,g===void 0?null:(0,X.jsxs)(`ul`,{className:`settings-agent-accounts`,children:[(0,X.jsx)($,{account:g,runners:r,editable:i,onRemove:()=>c(g),agent:h}),_.map(e=>(0,X.jsx)($,{account:e,runners:r,editable:i,onRemove:()=>c(e)},e.id))]}),i&&!o?(0,X.jsxs)(`p`,{"data-slot":`accounts-single-only`,className:`settings-agent-note`,children:[`One account only: `,u,` keeps its login outside its config folder, so a second folder would change settings without changing who is billed.`]}):!i&&a.length===0&&e.browserLogin?(0,X.jsxs)(`div`,{"data-slot":`hosted-sign-in`,className:`settings-agent-note flex flex-wrap items-center gap-3`,children:[(0,X.jsx)(`span`,{children:`Discovered account`}),(0,X.jsx)(J,{provider:l,label:u})]}):null]})}function Ie({runners:e}){let[t,n]=(0,Y.useState)(null),r=a(),i=l(),s=f(c(e)),u=ve(),d=he(),p=e=>u.mutate(e,{onSuccess:d.flash});if(r.data===void 0)return null;let m=ue([],e),h=r.data.agentDefaults.runner??`claude`,g=o(t??h,c(e))??t??h,_=r.data.agentDefaults.models??{};return(0,X.jsxs)(`section`,{"data-slot":`accounts-defaults`,className:`flex flex-col gap-3 rounded-lg border border-border bg-card/40 p-3.5`,children:[(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`h3`,{className:`text-[13px] font-semibold text-foreground`,children:`Defaults for new projects`}),(0,X.jsxs)(`p`,{className:`text-[13px] text-muted-foreground`,children:[`What a project runs when it has not chosen for itself — set once instead of per repository. A project that has chosen keeps its own. `,(0,X.jsx)(ge,{saved:d.saved})]})]}),(0,X.jsx)(de,{rows:m,runner:h,accountFor:()=>null,providerStatus:i,disabled:u.isPending,onPick:e=>{e!==h&&p({agentDefaults:{runner:e}})}}),(0,X.jsxs)(`div`,{className:`settings-account-models flex flex-col gap-2`,children:[(0,X.jsxs)(`label`,{className:`settings-model-agent-choice`,children:[(0,X.jsx)(`span`,{children:`Default model for`}),(0,X.jsx)(q,{"aria-label":`Model agent`,className:`settings-select max-w-full`,value:g,onValueChange:e=>n(e),options:e.runners.map(e=>({value:e.id,label:e.displayName}))})]}),e.runners.filter(e=>e.id===g).map(t=>(0,X.jsxs)(`label`,{className:`settings-account-model flex flex-wrap items-center gap-3`,children:[(0,X.jsx)(D,{className:`size-4 text-accent-icon shrink-0`}),(0,X.jsx)(`span`,{className:`w-28 shrink-0 text-xs text-muted-foreground`,children:t.displayName}),(0,X.jsx)(q,{"aria-label":`Default model for ${t.pickerLabel}`,"data-slot":`accounts-default-model`,"data-runner":t.id,value:_[t.id]??``,disabled:u.isPending,onValueChange:e=>p({agentDefaults:{models:{[t.id]:e||null}}}),className:`settings-select w-64 max-w-full bg-card`,options:[...B(t.id,e,s[t.id]?.data,[_[t.id]]).map(e=>({value:e.id,label:e.label})),...Le(t.id,e,s[t.id])]})]},t.id))]})]})}function Le(e,t,n){let r=L(e,t,n);return r?[{value:P,label:r,disabled:!0}]:[]}function Re({account:e,runners:t,status:n,editable:r}){let i=p();return(0,X.jsxs)(X.Fragment,{children:[n&&n.status!==`connected`&&d(t,e.provider)?.browserLogin?(0,X.jsx)(J,{provider:e.provider,...e.isDefault?{}:{profileId:e.id},label:e.label}):null,r&&n&&n.status!==`connected`&&d(t,e.provider)?.terminalLogin!==!1?(0,X.jsx)(O,{type:`button`,size:`sm`,"data-action":`account-connect`,disabled:i.isPending,onClick:()=>i.mutate({provider:e.provider,...e.isDefault?{}:{profileId:e.id}},{onSuccess:e=>C(e.opened?`Finish signing in in the terminal, then Check again.`:`This account is already connected.`),onError:e=>C(e instanceof x&&e.command?`${e.message} — run: ${e.command}`:e.message,{tone:`danger`})}),children:`Connect`}):null]})}function ze(e,t,n,r){return!n||n.requiresAccountHome===!1?null:e.exists?!e.looksValid&&e.configDir?{slot:`account-unrecognised`,label:`Unrecognized folder`,guidance:`This folder does not look like ${u(t,e.provider)} config yet.`}:null:{slot:`account-missing`,label:`Not initialized`,guidance:r?n.status===`connected`?`Folder not created yet. Use Check again to refresh.`:`Folder not created yet. Connect will make it.`:`Folder not created on the host yet.`}}function $({account:e,runners:t,editable:n,onRemove:i,agent:a}){let o=S(e),s=r(),c=_e(),l=m(o,e.status===void 0),u=e.status??l.data?.status,d=u?Oe[u.status]:void 0,f=ze(e,t,u,n),p=f?(0,X.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,title:d?`Sign-in: ${d.label}`:void 0,children:[(0,X.jsx)(A,{tone:`pending`}),(0,X.jsx)(`span`,{"data-slot":f.slot,className:`text-foreground`,children:f.label})]}):(0,X.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,X.jsx)(A,{tone:d?.tone??`neutral`,pulse:d===void 0}),(0,X.jsx)(`span`,{"data-slot":`account-status`,className:`text-foreground`,children:d?.label??`Checking…`})]}),h=(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(Re,{account:e,runners:t,status:u,editable:n}),(0,X.jsx)(O,{type:`button`,variant:`outline`,size:`sm`,"data-action":`account-recheck`,disabled:s.isPending,title:`Re-probe this account's login now, instead of waiting for the cached answer`,onClick:()=>s.mutate(o,{onError:e=>C(e.message,{tone:`danger`})}),children:`Check again`})]}),g=(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`span`,{className:`settings-account-label`,children:e.label}),e.isDefault?(0,X.jsx)(re,{variant:`outline`,"data-slot":`account-discovered`,className:`shrink-0 text-xs font-normal text-muted-foreground`,children:`discovered`}):null]}),_=e.configDir?(0,X.jsx)(`span`,{"data-slot":`account-path`,className:`settings-account-path`,title:e.path,children:Z(e.configDir,c)}):null,v=f?(0,X.jsx)(`p`,{"data-slot":`account-folder-guidance`,className:`settings-account-hint`,children:f.guidance}):null,y=u?.hint?(0,X.jsx)(`p`,{className:`settings-account-hint`,children:u.hint}):null,b=n&&!e.isDefault?(0,X.jsx)(Be,{account:e,onRemove:i}):null,x=(0,X.jsxs)(`div`,{className:`settings-account-readout`,children:[(0,X.jsxs)(`div`,{className:`settings-account-meta-line`,children:[g,p]}),_,v,y]});return a?(0,X.jsxs)(`li`,{"data-slot":`account-row`,"data-account":e.id,"data-primary":``,className:`settings-account-primary`,children:[(0,X.jsx)(Q,{titleId:a.titleId,title:a.title,summary:a.facts,actions:(0,X.jsxs)(X.Fragment,{children:[h,a.addButton]}),actionsSlot:`account-actions`}),(0,X.jsxs)(`div`,{className:`settings-account-meta`,children:[x,b?(0,X.jsx)(`div`,{className:`settings-account-actions`,children:b}):null]})]}):(0,X.jsxs)(`li`,{"data-slot":`account-row`,"data-account":e.id,className:`settings-account-line`,children:[x,(0,X.jsxs)(`div`,{"data-slot":`account-actions`,className:`settings-account-actions`,children:[h,b]})]})}function Be({account:e,onRemove:t}){let[n,r]=(0,Y.useState)(!1),[i,a]=(0,Y.useState)(e.label),o=s();return(0,X.jsx)(X.Fragment,{children:e.isDefault?null:(0,X.jsx)(`div`,{"data-slot":`account-manage`,className:`settings-account-management`,children:n?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`input`,{type:`text`,autoFocus:!0,"aria-label":`Name for ${e.label}`,"data-slot":`account-rename-input`,value:i,onChange:e=>a(e.target.value),className:`w-48 rounded-md border border-input bg-card px-2 py-1 text-xs outline-none focus-visible:border-ring`}),(0,X.jsx)(O,{type:`button`,variant:`outline`,size:`sm`,"data-action":`account-rename-save`,disabled:o.isPending||i.trim()===``||i.trim()===e.label,onClick:()=>o.mutate({id:e.id,label:i.trim()},{onSuccess:()=>r(!1),onError:e=>C(e.message,{tone:`danger`})}),children:`Save`}),(0,X.jsx)(O,{type:`button`,variant:`ghost`,size:`sm`,onClick:()=>{a(e.label),r(!1)},children:`Cancel`})]}):(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(O,{type:`button`,variant:`outline`,size:`sm`,"data-action":`account-rename`,onClick:()=>r(!0),children:`Rename`}),(0,X.jsx)(O,{type:`button`,variant:`outline`,size:`sm`,"data-action":`account-remove`,onClick:t,children:`Remove account`}),(0,X.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Renaming changes what Squawk calls this account, not its folder.`})]})})})}export{ke as GlobalAgentsSection};
|
|
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,Et as i,Ft as a,Jt as o,Mt as s,Qt as c,St as l,Yt as u,Zt as d,an as f,ft as p,lt as m,nn as h,pt as g,un as _,ut as v,vt as y}from"./queries-B8INH8MM.js";import{Hn as b,Rn as x,Rr as S,n as C,si as w,vi as ee,zn as T}from"./toaster-Cjr2jC1Q.js";import{f as E}from"./chunk-KS7C4IRE-Cg8l-LDN.js";import{b as D}from"./design-icons-QbNMZniQ.js";import{t as te}from"./createLucideIcon-BHp8sXmF.js";import{t as ne}from"./folder-browser-DcR_vo2i.js";import{t as O}from"./button-C8jUIs8Q.js";import{t as re}from"./badge-B6B-xYQQ.js";import{a as ie,i as ae,o as oe,r as se,s as ce,t as k}from"./dialog-DRZuXvul.js";import{t as A}from"./status-dot-BXf-Ubd0.js";import{n as j}from"./agents-settings-path-7X6_cvUg.js";import{t as M}from"./centered-state-BgSV4e79.js";import{$t as N,A as P,Hn as F,Jt as I,M as L,Mn as R,On as z,P as B,Qt as V,Xt as H,Yt as U,Zt as W,en as G,jn as K,tn as le}from"./index-CpBnI67l.js";import{t as q}from"./option-select-CANEdKB3.js";import{n as J,r as ue,t as de}from"./settings-agent-picker-BJY-YMtE.js";import{n as fe,r as pe,t as me}from"./remote-settings-notice-mR8dmhH6.js";import{n as he,t as ge}from"./save-cue-CpHgT93o.js";import{t as _e}from"./use-path-bases-CS-lRH5B.js";import{t as ve}from"./use-workspace-config-save-Do4bGg72.js";var ye=te(`id-card`,[[`path`,{d:`M16 10h2`,key:`8sgtl7`}],[`path`,{d:`M16 14h2`,key:`epxaof`}],[`path`,{d:`M6.17 15a3 3 0 0 1 5.66 0`,key:`n6f512`}],[`circle`,{cx:`9`,cy:`11`,r:`2`,key:`yxgjnd`}],[`rect`,{x:`2`,y:`5`,width:`20`,height:`14`,rx:`2`,key:`qneu4z`}]]),Y=e(t(),1),X=n(),be=`~/.claude-second`;function xe({open:e,onOpenChange:t,providers:n,initialProvider:r}){let i=h().data,[a,o]=(0,Y.useState)(null),[s,c]=(0,Y.useState)(null),[l,f]=(0,Y.useState)(r??n[0]??`claude`),[p,m]=(0,Y.useState)(``),[_,v]=(0,Y.useState)(``),[y,b]=(0,Y.useState)(!1),x=g(),S=_.trim();return(0,X.jsx)(k,{open:e,onOpenChange:t,children:(0,X.jsxs)(se,{"data-slot":`add-account-dialog`,className:`sm:max-w-lg`,children:[(0,X.jsxs)(oe,{children:[(0,X.jsx)(ce,{children:`Add agent account`}),(0,X.jsx)(ae,{children:`The config folder this account uses. It does not have to exist yet — Connect signs in and the CLI creates it.`})]}),(0,X.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,X.jsxs)(`label`,{className:`flex items-center gap-2 text-[13px]`,children:[(0,X.jsx)(`span`,{className:`text-muted-foreground`,children:`Agent`}),(0,X.jsx)(q,{"aria-label":`Agent`,"data-slot":`add-account-provider`,value:l,onValueChange:e=>f(e),className:`settings-select max-w-full bg-card text-[13px]`,options:n.map(e=>({value:e,label:u(i,e)}))})]}),(0,X.jsxs)(`label`,{className:`flex min-w-0 flex-1 items-center gap-2 text-[13px]`,children:[(0,X.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:`Name`}),(0,X.jsx)(`input`,{type:`text`,"aria-label":`Account name`,"data-slot":`add-account-label`,value:p,placeholder:`Work`,onChange:e=>m(e.target.value),className:`min-w-0 flex-1 rounded-md border border-input bg-card px-2 py-1 text-[13px] outline-none focus-visible:border-ring`})]})]}),(0,X.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,X.jsxs)(`label`,{className:`flex min-w-0 items-center gap-2 text-[13px]`,children:[(0,X.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:`Folder`}),(0,X.jsx)(`input`,{type:`text`,spellCheck:!1,autoComplete:`off`,"aria-label":`Config folder`,"data-slot":`add-account-dir`,value:_,placeholder:d(i,l)?.accountFolderExample??be,onChange:e=>{v(e.target.value),c(null),x.reset()},className:`min-w-0 flex-1 rounded-md border border-input bg-card px-2 py-1 font-mono text-[13px] outline-none focus-visible:border-ring`}),(0,X.jsx)(O,{type:`button`,variant:`ghost`,size:`sm`,"data-action":`add-account-browse`,"aria-expanded":y,onClick:()=>b(e=>!e),children:y?`Hide folders`:`Browse…`})]}),(0,X.jsxs)(`p`,{className:`text-xs text-soft-foreground`,children:[`A `,(0,X.jsx)(`code`,{children:`~`}),` is kept as written and expanded when the agent runs.`]})]}),y?(0,X.jsx)(ne,{path:a,selected:s,onSelect:e=>{c(e),v(e.path),x.reset()},onEnter:e=>{o(e),c(null),x.reset()},showHidden:!0,emptyHint:`No subfolders here — pick this folder by typing its path above.`}):null,x.isError?(0,X.jsx)(`p`,{"data-slot":`add-account-error`,className:`min-w-0 break-words text-[13px] text-danger`,children:x.error instanceof Error?x.error.message:`could not add that folder`}):null,(0,X.jsxs)(ie,{className:`min-w-0 sm:items-center sm:justify-end`,children:[(0,X.jsx)(O,{variant:`outline`,onClick:()=>t(!1),children:`Cancel`}),(0,X.jsx)(O,{"data-slot":`add-account-confirm`,disabled:S===``||x.isPending,onClick:()=>{S===``||x.isPending||x.mutate({provider:l,configDir:S,...p.trim()?{label:p.trim()}:{}},{onSuccess:()=>{t(!1),m(``),v(``),c(null),b(!1),C(`Account added — use Connect to sign in`)}})},children:x.isPending?`Adding…`:`Add account`})]})]})})}async function Se(e){return b(await T.api.v1[`runner-install`][`:runner`].$get({param:{runner:e}}),`/runner-install/:runner`)}async function Ce(e,t){return b(await T.api.v1[`runner-install`][`:runner`].$post({param:{runner:e},json:{action:t}}),`/runner-install/:runner`)}var we={idle:``,checking:`Checking for updates…`,downloading:`Downloading CLI…`,verifying:`Verifying CLI…`,extracting:`Extracting CLI…`,activating:`Activating CLI…`,removing:`Removing CLI…`,failed:``};function Te(e){let t=y().data?.capabilities?.settingsAdmin===!0,n=ee(),r=[`runner-install`,e],i=w({queryKey:r,queryFn:()=>Se(e),enabled:t,retry:!1,refetchInterval:e=>{if(e.state.error)return!1;let t=e.state.data?.phase;return t&&t!==`idle`&&t!==`failed`?1e3:6e4}}),a=_({mutationFn:t=>Ce(e,t),retry:!1,onSuccess:e=>{n.setQueryData(r,e)}}),o=i.data;return{allowed:t,data:o,busy:a.isPending||!!o&&o.phase!==`idle`&&o.phase!==`failed`,error:a.error?.message??i.error?.message??o?.error,action:a,status:i}}function Ee({state:e}){let{data:t,busy:n,action:r,status:i}=e;if(t?.supported===!1)return(0,X.jsx)(`p`,{children:`This host is not supported by the CLI installer.`});let a=!!t?.installedVersion;return(0,X.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,X.jsx)(O,{className:`min-h-11 active:opacity-80`,disabled:n||!t,onClick:()=>r.mutate(a?`update`:`install`),children:a?`Update CLI`:`Install CLI`}),a?(0,X.jsx)(O,{className:`min-h-11 active:opacity-80`,variant:`outline`,disabled:n,onClick:()=>r.mutate(`remove`),children:`Remove CLI`}):null,(0,X.jsx)(O,{className:`min-h-11 active:opacity-80`,variant:`outline`,disabled:n,onClick:()=>{i.isError?i.refetch():r.mutate(`check`)},children:`Check for updates`})]})}function De({runner:e}){let t=Te(e),{allowed:n,data:r,busy:i,error:a}=t;return n?(0,X.jsxs)(`section`,{"aria-label":`CLI installation`,className:`grid gap-3`,children:[(0,X.jsxs)(`p`,{role:`status`,className:`text-sm text-muted-foreground`,children:[r?.installedVersion?`Installed CLI ${r.installedVersion}`:`CLI not installed`,r?.latestVersion?` · Latest ${r.latestVersion}`:``,i&&r?` · ${we[r.phase]}`:``]}),a?(0,X.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:a}):null,(0,X.jsx)(Ee,{state:t}),r?.installedVersion?(0,X.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Removing the CLI keeps account data and lets running tasks finish.`}):null]}):null}var Oe={connected:R(`connected`),disconnected:R(`disconnected`),"not-installed":R(`not-installed`),unknown:R(`unknown`)};function ke(){let e=v(),t=h();if(e.isPending||t.isPending)return(0,X.jsx)(`p`,{"data-slot":`accounts-loading`,className:`p-4 text-[13px] text-soft-foreground md:p-6`,children:`Loading agents…`});let n=e.error??t.error;return n?(0,X.jsx)(M,{icon:(0,X.jsx)(ye,{}),tone:`danger`,title:`Agents did not load`,subtitle:n.message,heading:`h2`}):(0,X.jsx)(je,{data:e.data,runners:t.data})}function Z(e,t){let n=F(e,t),r=n.split(`/`);return r.length>4?`…/${r.slice(-3).join(`/`)}`:n}function Ae(){let{hash:e}=E();(0,Y.useEffect)(()=>{if(!e)return;let t=document.getElementById(decodeURIComponent(e.slice(1)));t&&(t.scrollIntoView?.({block:`start`}),t.focus({preventScroll:!0}))},[e])}function je({data:e,runners:t}){let n=y(),[r,a]=(0,Y.useState)(null),[o,s]=(0,Y.useState)(null),c=i();return Ae(),pe(),(0,X.jsxs)(`div`,{"data-slot":`accounts-section`,className:`mx-auto flex w-full max-w-2xl flex-col gap-5 p-4 pb-[calc(90px+env(safe-area-inset-bottom))] md:p-6 md:pb-6`,children:[(0,X.jsx)(fe,{risk:`Agent accounts run each CLI with the configured host folder`}),e.editable?null:(0,X.jsxs)(`p`,{"data-slot":`accounts-hosted`,className:`text-[13px] text-muted-foreground`,children:[`Agent accounts are read-only on this remote cockpit. Run`,` `,(0,X.jsx)(`code`,{children:me}),` on the host to add, edit, or sign in to accounts here.`]}),(0,X.jsx)(`div`,{"data-slot":`agent-cards`,className:`flex flex-col gap-3`,children:t.runners.map(r=>(0,X.jsx)(Fe,{entry:r,check:n.data?.checks?.find(e=>e.name===r.id),settingsAdmin:n.data?.capabilities?.settingsAdmin===!0,runners:t,editable:e.editable,accounts:e.profiles.filter(e=>e.provider===r.id),canCarryAccounts:e.profileCapableProviders.includes(r.id),onAdd:()=>a(r.id),onRemove:s},r.id))}),(0,X.jsx)(Ie,{runners:t}),r===null?null:(0,X.jsx)(xe,{open:!0,onOpenChange:e=>!e&&a(null),providers:e.profileCapableProviders,initialProvider:r},r),(0,X.jsx)(I,{open:o!==null,onOpenChange:e=>!e&&s(null),children:(0,X.jsxs)(W,{"data-slot":`accounts-remove-confirm`,children:[(0,X.jsxs)(G,{children:[(0,X.jsxs)(le,{children:[`Remove “`,o?.label,`”?`]}),(0,X.jsxs)(V,{children:[`This only forgets the account. Nothing in `,o?.configDir??`this account’s folder`,` is deleted — not your login, not your sessions. Projects using it fall back to the default account, and tasks that ran under it can no longer be resumed from here.`]})]}),(0,X.jsxs)(N,{children:[(0,X.jsx)(H,{children:`Cancel`}),(0,X.jsx)(U,{"data-action":`accounts-remove-confirm`,disabled:c.isPending,onClick:()=>{let e=o;e&&c.mutate(e.id,{onSuccess:()=>{s(null),C(`Removed ${e.label}`)},onError:e=>C(e.message,{tone:`danger`})})},children:`Remove`})]})]})})]})}function Me({entry:e,check:t}){return t===void 0?(0,X.jsx)(`span`,{"data-slot":`agent-installed`,children:`Checking CLI…`}):t.available?(0,X.jsxs)(`span`,{className:`whitespace-nowrap`,children:[(0,X.jsx)(`span`,{"data-slot":`agent-installed`,children:K(t.version)?`CLI simulated`:`CLI installed`}),t.version?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`span`,{"aria-hidden":`true`,className:`settings-agent-summary-sep`,children:`·`}),(0,X.jsx)(Ne,{version:t.version})]}):null]}):(0,X.jsxs)(`span`,{"data-slot":`agent-installed`,children:[`CLI not installed`,e.installHint?(0,X.jsxs)(X.Fragment,{children:[` — `,(0,X.jsx)(`code`,{className:`break-all`,children:e.installHint})]}):null]})}function Ne({version:e}){return K(e)?(0,X.jsx)(`span`,{"data-slot":`agent-version`,"data-dry-run":``,title:e,className:`rounded-full border border-border bg-muted px-2 py-0.5 text-xs font-medium text-muted-foreground`,children:z.label}):(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`span`,{className:`sr-only`,children:`, version `}),(0,X.jsx)(`span`,{"data-slot":`agent-version`,className:`text-muted-foreground`,children:e})]})}function Pe({items:e}){let t=e.filter(e=>e!=null&&e!==!1);return t.length===0?null:(0,X.jsx)(`p`,{"data-slot":`agent-summary`,className:`settings-agent-summary`,children:t.map((e,t)=>(0,X.jsxs)(`span`,{className:`settings-agent-summary-item`,children:[t>0?(0,X.jsx)(`span`,{"aria-hidden":`true`,className:`settings-agent-summary-sep`,children:`·`}):null,e]},t))})}function Q({titleId:e,title:t,summary:n,actions:r,actionsSlot:i}){return(0,X.jsxs)(`div`,{"data-slot":`agent-head`,className:`settings-agent-head`,children:[(0,X.jsxs)(`div`,{className:`settings-agent-heading`,children:[(0,X.jsx)(`h3`,{id:e,className:`settings-account-provider-title`,children:t}),(0,X.jsx)(Pe,{items:n})]}),r?(0,X.jsx)(`div`,{"data-slot":i,className:`settings-account-actions`,children:r}):null]})}function Fe({entry:e,check:t,settingsAdmin:n,runners:r,editable:i,accounts:a,canCarryAccounts:o,onAdd:s,onRemove:c}){let l=e.id,u=e.displayName,d=e.managedInstall===!0&&n,f=a.filter(e=>e.isDefault).length,p=`${j(l)}-title`,m=i&&o?(0,X.jsx)(O,{type:`button`,variant:`outline`,size:`sm`,"data-action":`accounts-add`,"data-provider":l,onClick:s,children:`Add account`}):null,h={titleId:p,title:u,facts:[d?null:(0,X.jsx)(Me,{entry:e,check:t}),i||a.length>0?(0,X.jsxs)(`span`,{className:`settings-account-count`,title:`${f} discovered, ${a.length-f} added`,children:[a.length,` `,a.length===1?`account`:`accounts`]}):null],addButton:m},[g,..._]=a;return(0,X.jsxs)(`section`,{id:j(l),tabIndex:-1,"aria-labelledby":p,"data-slot":`accounts-provider`,"data-provider":l,className:`settings-agent-card flex flex-col rounded-lg border border-border bg-card`,children:[g===void 0?(0,X.jsx)(Q,{titleId:p,title:u,summary:h.facts,actions:m,actionsSlot:`accounts-actions`}):null,d?(0,X.jsx)(De,{runner:l}):null,g===void 0?null:(0,X.jsxs)(`ul`,{className:`settings-agent-accounts`,children:[(0,X.jsx)($,{account:g,runners:r,editable:i,onRemove:()=>c(g),agent:h}),_.map(e=>(0,X.jsx)($,{account:e,runners:r,editable:i,onRemove:()=>c(e)},e.id))]}),i&&!o?(0,X.jsxs)(`p`,{"data-slot":`accounts-single-only`,className:`settings-agent-note`,children:[`One account only: `,u,` keeps its login outside its config folder, so a second folder would change settings without changing who is billed.`]}):!i&&a.length===0&&e.browserLogin?(0,X.jsxs)(`div`,{"data-slot":`hosted-sign-in`,className:`settings-agent-note flex flex-wrap items-center gap-3`,children:[(0,X.jsx)(`span`,{children:`Discovered account`}),(0,X.jsx)(J,{provider:l,label:u})]}):null]})}function Ie({runners:e}){let[t,n]=(0,Y.useState)(null),r=a(),i=l(),s=f(c(e)),u=ve(),d=he(),p=e=>u.mutate(e,{onSuccess:d.flash});if(r.data===void 0)return null;let m=ue([],e),h=r.data.agentDefaults.runner??`claude`,g=o(t??h,c(e))??t??h,_=r.data.agentDefaults.models??{};return(0,X.jsxs)(`section`,{"data-slot":`accounts-defaults`,className:`flex flex-col gap-3 rounded-lg border border-border bg-card/40 p-3.5`,children:[(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`h3`,{className:`text-[13px] font-semibold text-foreground`,children:`Defaults for new projects`}),(0,X.jsxs)(`p`,{className:`text-[13px] text-muted-foreground`,children:[`What a project runs when it has not chosen for itself — set once instead of per repository. A project that has chosen keeps its own. `,(0,X.jsx)(ge,{saved:d.saved})]})]}),(0,X.jsx)(de,{rows:m,runner:h,accountFor:()=>null,providerStatus:i,disabled:u.isPending,onPick:e=>{e!==h&&p({agentDefaults:{runner:e}})}}),(0,X.jsxs)(`div`,{className:`settings-account-models flex flex-col gap-2`,children:[(0,X.jsxs)(`label`,{className:`settings-model-agent-choice`,children:[(0,X.jsx)(`span`,{children:`Default model for`}),(0,X.jsx)(q,{"aria-label":`Model agent`,className:`settings-select max-w-full`,value:g,onValueChange:e=>n(e),options:e.runners.map(e=>({value:e.id,label:e.displayName}))})]}),e.runners.filter(e=>e.id===g).map(t=>(0,X.jsxs)(`label`,{className:`settings-account-model flex flex-wrap items-center gap-3`,children:[(0,X.jsx)(D,{className:`size-4 text-accent-icon shrink-0`}),(0,X.jsx)(`span`,{className:`w-28 shrink-0 text-xs text-muted-foreground`,children:t.displayName}),(0,X.jsx)(q,{"aria-label":`Default model for ${t.pickerLabel}`,"data-slot":`accounts-default-model`,"data-runner":t.id,value:_[t.id]??``,disabled:u.isPending,onValueChange:e=>p({agentDefaults:{models:{[t.id]:e||null}}}),className:`settings-select w-64 max-w-full bg-card`,options:[...B(t.id,e,s[t.id]?.data,[_[t.id]]).map(e=>({value:e.id,label:e.label})),...Le(t.id,e,s[t.id])]})]},t.id))]})]})}function Le(e,t,n){let r=L(e,t,n);return r?[{value:P,label:r,disabled:!0}]:[]}function Re({account:e,runners:t,status:n,editable:r}){let i=p();return(0,X.jsxs)(X.Fragment,{children:[n&&n.status!==`connected`&&d(t,e.provider)?.browserLogin?(0,X.jsx)(J,{provider:e.provider,...e.isDefault?{}:{profileId:e.id},label:e.label}):null,r&&n&&n.status!==`connected`&&d(t,e.provider)?.terminalLogin!==!1?(0,X.jsx)(O,{type:`button`,size:`sm`,"data-action":`account-connect`,disabled:i.isPending,onClick:()=>i.mutate({provider:e.provider,...e.isDefault?{}:{profileId:e.id}},{onSuccess:e=>C(e.opened?`Finish signing in in the terminal, then Check again.`:`This account is already connected.`),onError:e=>C(e instanceof x&&e.command?`${e.message} — run: ${e.command}`:e.message,{tone:`danger`})}),children:`Connect`}):null]})}function ze(e,t,n,r){return!n||n.requiresAccountHome===!1?null:e.exists?!e.looksValid&&e.configDir?{slot:`account-unrecognised`,label:`Unrecognized folder`,guidance:`This folder does not look like ${u(t,e.provider)} config yet.`}:null:{slot:`account-missing`,label:`Not initialized`,guidance:r?n.status===`connected`?`Folder not created yet. Use Check again to refresh.`:`Folder not created yet. Connect will make it.`:`Folder not created on the host yet.`}}function $({account:e,runners:t,editable:n,onRemove:i,agent:a}){let o=S(e),s=r(),c=_e(),l=m(o,e.status===void 0),u=e.status??l.data?.status,d=u?Oe[u.status]:void 0,f=ze(e,t,u,n),p=f?(0,X.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,title:d?`Sign-in: ${d.label}`:void 0,children:[(0,X.jsx)(A,{tone:`pending`}),(0,X.jsx)(`span`,{"data-slot":f.slot,className:`text-foreground`,children:f.label})]}):(0,X.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,X.jsx)(A,{tone:d?.tone??`neutral`,pulse:d===void 0}),(0,X.jsx)(`span`,{"data-slot":`account-status`,className:`text-foreground`,children:d?.label??`Checking…`})]}),h=(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(Re,{account:e,runners:t,status:u,editable:n}),(0,X.jsx)(O,{type:`button`,variant:`outline`,size:`sm`,"data-action":`account-recheck`,disabled:s.isPending,title:`Re-probe this account's login now, instead of waiting for the cached answer`,onClick:()=>s.mutate(o,{onError:e=>C(e.message,{tone:`danger`})}),children:`Check again`})]}),g=(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`span`,{className:`settings-account-label`,children:e.label}),e.isDefault?(0,X.jsx)(re,{variant:`outline`,"data-slot":`account-discovered`,className:`shrink-0 text-xs font-normal text-muted-foreground`,children:`discovered`}):null]}),_=e.configDir?(0,X.jsx)(`span`,{"data-slot":`account-path`,className:`settings-account-path`,title:e.path,children:Z(e.configDir,c)}):null,v=f?(0,X.jsx)(`p`,{"data-slot":`account-folder-guidance`,className:`settings-account-hint`,children:f.guidance}):null,y=u?.hint?(0,X.jsx)(`p`,{className:`settings-account-hint`,children:u.hint}):null,b=n&&!e.isDefault?(0,X.jsx)(Be,{account:e,onRemove:i}):null,x=(0,X.jsxs)(`div`,{className:`settings-account-readout`,children:[(0,X.jsxs)(`div`,{className:`settings-account-meta-line`,children:[g,p]}),_,v,y]});return a?(0,X.jsxs)(`li`,{"data-slot":`account-row`,"data-account":e.id,"data-primary":``,className:`settings-account-primary`,children:[(0,X.jsx)(Q,{titleId:a.titleId,title:a.title,summary:a.facts,actions:(0,X.jsxs)(X.Fragment,{children:[h,a.addButton]}),actionsSlot:`account-actions`}),(0,X.jsxs)(`div`,{className:`settings-account-meta`,children:[x,b?(0,X.jsx)(`div`,{className:`settings-account-actions`,children:b}):null]})]}):(0,X.jsxs)(`li`,{"data-slot":`account-row`,"data-account":e.id,className:`settings-account-line`,children:[x,(0,X.jsxs)(`div`,{"data-slot":`account-actions`,className:`settings-account-actions`,children:[h,b]})]})}function Be({account:e,onRemove:t}){let[n,r]=(0,Y.useState)(!1),[i,a]=(0,Y.useState)(e.label),o=s();return(0,X.jsx)(X.Fragment,{children:e.isDefault?null:(0,X.jsx)(`div`,{"data-slot":`account-manage`,className:`settings-account-management`,children:n?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`input`,{type:`text`,autoFocus:!0,"aria-label":`Name for ${e.label}`,"data-slot":`account-rename-input`,value:i,onChange:e=>a(e.target.value),className:`w-48 rounded-md border border-input bg-card px-2 py-1 text-xs outline-none focus-visible:border-ring`}),(0,X.jsx)(O,{type:`button`,variant:`outline`,size:`sm`,"data-action":`account-rename-save`,disabled:o.isPending||i.trim()===``||i.trim()===e.label,onClick:()=>o.mutate({id:e.id,label:i.trim()},{onSuccess:()=>r(!1),onError:e=>C(e.message,{tone:`danger`})}),children:`Save`}),(0,X.jsx)(O,{type:`button`,variant:`ghost`,size:`sm`,onClick:()=>{a(e.label),r(!1)},children:`Cancel`})]}):(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(O,{type:`button`,variant:`outline`,size:`sm`,"data-action":`account-rename`,onClick:()=>r(!0),children:`Rename`}),(0,X.jsx)(O,{type:`button`,variant:`outline`,size:`sm`,"data-action":`account-remove`,onClick:t,children:`Remove account`}),(0,X.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Renaming changes what Squawk calls this account, not its folder.`})]})})})}export{ke as GlobalAgentsSection};
|