@hearsay-tools/squawk 0.19.0-dev.8721 → 0.19.0-dev.8724
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/delegation/transport.d.ts +65 -65
- package/dist/runners/codex/codex-app-server-runner.js +2 -42
- package/dist/runners/codex/codex-app-server-runner.js.map +1 -1
- package/dist/runners/codex/codex-questions.d.ts +5 -0
- package/dist/runners/codex/codex-questions.js +55 -0
- package/dist/runners/codex/codex-questions.js.map +1 -0
- package/dist/runners/opencode/opencode-questions.js +9 -1
- package/dist/runners/opencode/opencode-questions.js.map +1 -1
- package/dist/server/projects-routes.d.ts +45 -45
- package/dist/server/repo-routes.d.ts +13 -13
- package/dist/server/runs-routes.d.ts +16 -16
- package/dist/server/server.d.ts +66 -66
- package/package.json +4 -4
- package/web/dist/assets/accounts-section-DDKrIQHV.js +1 -0
- package/web/dist/assets/{activity-motion-C8V7jGPP.js → activity-motion-BTEsjlIe.js} +1 -1
- package/web/dist/assets/{activity-route-CCOvPI4k.js → activity-route-nAfZdSHs.js} +1 -1
- package/web/dist/assets/{agent-config-section-DkJsuQeu.js → agent-config-section-SeeFuvxb.js} +1 -1
- package/web/dist/assets/{agent-defaults-section-BqGJuaw_.js → agent-defaults-section-BfBT817S.js} +1 -1
- package/web/dist/assets/{appearance-BnvyVZZH.js → appearance-BTm4Q_SI.js} +1 -1
- package/web/dist/assets/{automations-route-C9Gcx3ov.js → automations-route-CBTOewMF.js} +2 -2
- package/web/dist/assets/{commit-list-DNiFNJqd.js → commit-list-DkFgC3zM.js} +1 -1
- package/web/dist/assets/{diff-controls-D6LIYMhn.js → diff-controls-Bg2hEd-d.js} +1 -1
- package/web/dist/assets/{diff-B60FGSvK.js → diff-is16ZW0n.js} +2 -2
- package/web/dist/assets/{diff-view-Blyp1vQ3.js → diff-view-Cr8XQJSx.js} +1 -1
- package/web/dist/assets/{file-preview-C0EtwJYH.js → file-preview-Bnls5OJY.js} +1 -1
- package/web/dist/assets/{git-toolbar-CRj5dZa2.js → git-toolbar-CNKKRUHu.js} +1 -1
- package/web/dist/assets/github-BqFTLhmt.js +1 -0
- package/web/dist/assets/{global-activity-route-Db2_yTAR.js → global-activity-route-CWe04LvJ.js} +1 -1
- package/web/dist/assets/{index-BX94wp6m.js → index-CZ2f_VDZ.js} +6 -6
- package/web/dist/assets/index-DefVZIaB.css +1 -0
- package/web/dist/assets/{markdown-DK1FZN4x.js → markdown-BlP4Ruj9.js} +1 -1
- package/web/dist/assets/{notifications-section-dI7sOt8i.js → notifications-section-D74r_7fK.js} +1 -1
- package/web/dist/assets/{popover-BPgUYFyu.js → popover-CZV6tz9i.js} +1 -1
- package/web/dist/assets/preview-pane-connected-Bmczg9HP.js +3 -0
- package/web/dist/assets/{projects-section-B-eMkZf3.js → projects-section-nCxUoesH.js} +1 -1
- package/web/dist/assets/prompt-templates-section-BrLXH68w.js +1 -0
- package/web/dist/assets/{reference-chip-B8bfD56G.js → reference-chip-D_AkXXCW.js} +1 -1
- package/web/dist/assets/{remote-settings-notice-BxFlEKfC.js → remote-settings-notice-DgXTd6s8.js} +1 -1
- package/web/dist/assets/{repo-git-CEYHupW1.js → repo-git-kl6QizKC.js} +1 -1
- package/web/dist/assets/{report-reader-DT6V1PE1.js → report-reader-CGmbDHza.js} +1 -1
- package/web/dist/assets/{reports-pCaOIoVC.js → reports-CTFaCJWS.js} +1 -1
- package/web/dist/assets/{resources-section-Dr0YbhlY.js → resources-section-BhRQQrVy.js} +1 -1
- package/web/dist/assets/review-panel-DJN1QoGx.js +11 -0
- package/web/dist/assets/run-header-CRtXOTxt.js +2 -0
- package/web/dist/assets/{select-DzxGxxTm.js → select-BfLaIiyd.js} +1 -1
- package/web/dist/assets/{session-context-section-BxrtJ6og.js → session-context-section-CaPupOFU.js} +2 -2
- package/web/dist/assets/{settings-agent-picker-CDt7Ns8e.js → settings-agent-picker-CzE4qiW7.js} +1 -1
- package/web/dist/assets/{settings-shell-B9ladcQ_.js → settings-shell-CpEw1Yep.js} +1 -1
- package/web/dist/assets/{sidebar-section-CRUJRrAR.js → sidebar-section-Ct0x6SOQ.js} +1 -1
- package/web/dist/assets/{skills-Co7HupH_.js → skills-D2HTiFIT.js} +1 -1
- package/web/dist/assets/task-changes-4SjmpLQN.js +1 -0
- package/web/dist/assets/{task-commits-ISUoukSa.js → task-commits-C6CoCyG9.js} +1 -1
- package/web/dist/assets/task-file-scope-BkUJ30q2.js +1 -0
- package/web/dist/assets/task-files-CCX3HTxx.js +1 -0
- package/web/dist/assets/{task-github-item-Cg8gVOKX.js → task-github-item-DWLVVmvv.js} +1 -1
- package/web/dist/assets/task-thread-EBqjZ5Vz.js +2 -0
- package/web/dist/assets/task-thread-PDeU-fL6.css +1 -0
- package/web/dist/assets/thread-state-DU6OEOIL.js +4 -0
- package/web/dist/assets/{use-hand-to-agent-state-ibAi0h18.js → use-hand-to-agent-state-DUkm37P-.js} +1 -1
- package/web/dist/assets/workflows-CGHzfqLC.js +7 -0
- package/web/dist/assets/{workspace-tools-HU7VkLIs.js → workspace-tools-9mkf36oR.js} +1 -1
- package/web/dist/assets/{worktrees-section-uDWkAqqs.js → worktrees-section-B91kPX6V.js} +1 -1
- package/web/dist/index.html +4 -4
- package/web/dist/assets/accounts-section-BObx1Wc5.js +0 -1
- package/web/dist/assets/github-DjD-J1Cb.js +0 -1
- package/web/dist/assets/index-BtmQDC_G.css +0 -1
- package/web/dist/assets/preview-pane-connected-B37RWFUW.js +0 -3
- package/web/dist/assets/prompt-templates-section-BNbYFE3y.js +0 -1
- package/web/dist/assets/review-panel-wprTeofI.js +0 -8
- package/web/dist/assets/run-header-GiajAH1E.js +0 -2
- package/web/dist/assets/task-changes-Dwcer1B-.js +0 -1
- package/web/dist/assets/task-files-Bek9A4TF.js +0 -1
- package/web/dist/assets/task-thread-DbBtpcw3.js +0 -2
- package/web/dist/assets/task-thread-DzADOhZd.css +0 -1
- package/web/dist/assets/thread-state-CEVwXFWy.js +0 -4
- package/web/dist/assets/workflows-Dy_qXVKT.js +0 -7
|
@@ -63,17 +63,6 @@ export declare function createProjectsRoutes(deps: ProjectsRouteDeps): import("h
|
|
|
63
63
|
} & {
|
|
64
64
|
"/projects": {
|
|
65
65
|
$post: {
|
|
66
|
-
output: {
|
|
67
|
-
error: string;
|
|
68
|
-
};
|
|
69
|
-
outputFormat: "json";
|
|
70
|
-
status: 400 | 500;
|
|
71
|
-
input: {
|
|
72
|
-
json: {
|
|
73
|
-
root: string;
|
|
74
|
-
};
|
|
75
|
-
};
|
|
76
|
-
} | {
|
|
77
66
|
output: {
|
|
78
67
|
project: {
|
|
79
68
|
id: string;
|
|
@@ -104,10 +93,10 @@ export declare function createProjectsRoutes(deps: ProjectsRouteDeps): import("h
|
|
|
104
93
|
agent: boolean;
|
|
105
94
|
}[] | undefined;
|
|
106
95
|
};
|
|
107
|
-
error
|
|
96
|
+
error?: string | undefined;
|
|
108
97
|
};
|
|
109
98
|
outputFormat: "json";
|
|
110
|
-
status:
|
|
99
|
+
status: 200;
|
|
111
100
|
input: {
|
|
112
101
|
json: {
|
|
113
102
|
root: string;
|
|
@@ -144,10 +133,21 @@ export declare function createProjectsRoutes(deps: ProjectsRouteDeps): import("h
|
|
|
144
133
|
agent: boolean;
|
|
145
134
|
}[] | undefined;
|
|
146
135
|
};
|
|
147
|
-
error
|
|
136
|
+
error: string;
|
|
148
137
|
};
|
|
149
138
|
outputFormat: "json";
|
|
150
|
-
status:
|
|
139
|
+
status: 409;
|
|
140
|
+
input: {
|
|
141
|
+
json: {
|
|
142
|
+
root: string;
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
} | {
|
|
146
|
+
output: {
|
|
147
|
+
error: string;
|
|
148
|
+
};
|
|
149
|
+
outputFormat: "json";
|
|
150
|
+
status: 400 | 500;
|
|
151
151
|
input: {
|
|
152
152
|
json: {
|
|
153
153
|
root: string;
|
|
@@ -306,7 +306,7 @@ export declare function createProjectsRoutes(deps: ProjectsRouteDeps): import("h
|
|
|
306
306
|
error: string;
|
|
307
307
|
};
|
|
308
308
|
outputFormat: "json";
|
|
309
|
-
status:
|
|
309
|
+
status: 400;
|
|
310
310
|
input: {
|
|
311
311
|
param: {
|
|
312
312
|
projectId: string;
|
|
@@ -317,7 +317,7 @@ export declare function createProjectsRoutes(deps: ProjectsRouteDeps): import("h
|
|
|
317
317
|
error: string;
|
|
318
318
|
};
|
|
319
319
|
outputFormat: "json";
|
|
320
|
-
status:
|
|
320
|
+
status: 404;
|
|
321
321
|
input: {
|
|
322
322
|
param: {
|
|
323
323
|
projectId: string;
|
|
@@ -342,27 +342,6 @@ export declare function createProjectsRoutes(deps: ProjectsRouteDeps): import("h
|
|
|
342
342
|
} & {
|
|
343
343
|
"/projects/:projectId/webhooks": {
|
|
344
344
|
$post: {
|
|
345
|
-
output: {
|
|
346
|
-
error: string;
|
|
347
|
-
};
|
|
348
|
-
outputFormat: "json";
|
|
349
|
-
status: 400 | 404 | 409 | 500;
|
|
350
|
-
input: {
|
|
351
|
-
json: {
|
|
352
|
-
name: string;
|
|
353
|
-
description?: string | undefined;
|
|
354
|
-
url: string;
|
|
355
|
-
token?: string | undefined;
|
|
356
|
-
tasks?: boolean | undefined;
|
|
357
|
-
triggers?: ("cancelled" | "done" | "failed" | "needs-you" | "running" | "waiting-ci" | "waiting-other" | "waiting-timer" | "waiting-workers")[] | undefined;
|
|
358
|
-
agent?: boolean | undefined;
|
|
359
|
-
};
|
|
360
|
-
} & {
|
|
361
|
-
param: {
|
|
362
|
-
projectId: string;
|
|
363
|
-
};
|
|
364
|
-
};
|
|
365
|
-
} | {
|
|
366
345
|
output: {
|
|
367
346
|
project: {
|
|
368
347
|
id: string;
|
|
@@ -421,6 +400,27 @@ export declare function createProjectsRoutes(deps: ProjectsRouteDeps): import("h
|
|
|
421
400
|
projectId: string;
|
|
422
401
|
};
|
|
423
402
|
};
|
|
403
|
+
} | {
|
|
404
|
+
output: {
|
|
405
|
+
error: string;
|
|
406
|
+
};
|
|
407
|
+
outputFormat: "json";
|
|
408
|
+
status: 400 | 404 | 409 | 500;
|
|
409
|
+
input: {
|
|
410
|
+
json: {
|
|
411
|
+
name: string;
|
|
412
|
+
description?: string | undefined;
|
|
413
|
+
url: string;
|
|
414
|
+
token?: string | undefined;
|
|
415
|
+
tasks?: boolean | undefined;
|
|
416
|
+
triggers?: ("cancelled" | "done" | "failed" | "needs-you" | "running" | "waiting-ci" | "waiting-other" | "waiting-timer" | "waiting-workers")[] | undefined;
|
|
417
|
+
agent?: boolean | undefined;
|
|
418
|
+
};
|
|
419
|
+
} & {
|
|
420
|
+
param: {
|
|
421
|
+
projectId: string;
|
|
422
|
+
};
|
|
423
|
+
};
|
|
424
424
|
};
|
|
425
425
|
};
|
|
426
426
|
} & {
|
|
@@ -618,13 +618,10 @@ export declare function createProjectsRoutes(deps: ProjectsRouteDeps): import("h
|
|
|
618
618
|
};
|
|
619
619
|
} | {
|
|
620
620
|
output: {
|
|
621
|
-
|
|
622
|
-
status?: number | undefined;
|
|
623
|
-
error?: string | undefined;
|
|
624
|
-
dryRun?: boolean | undefined;
|
|
621
|
+
error: string;
|
|
625
622
|
};
|
|
626
623
|
outputFormat: "json";
|
|
627
|
-
status:
|
|
624
|
+
status: 404;
|
|
628
625
|
input: {
|
|
629
626
|
param: {
|
|
630
627
|
projectId: string;
|
|
@@ -633,10 +630,13 @@ export declare function createProjectsRoutes(deps: ProjectsRouteDeps): import("h
|
|
|
633
630
|
};
|
|
634
631
|
} | {
|
|
635
632
|
output: {
|
|
636
|
-
|
|
633
|
+
ok: boolean;
|
|
634
|
+
status?: number | undefined;
|
|
635
|
+
error?: string | undefined;
|
|
636
|
+
dryRun?: boolean | undefined;
|
|
637
637
|
};
|
|
638
638
|
outputFormat: "json";
|
|
639
|
-
status:
|
|
639
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
640
640
|
input: {
|
|
641
641
|
param: {
|
|
642
642
|
projectId: string;
|
|
@@ -315,6 +315,19 @@ export declare function createRepoRoutes(deps: RepoRouteDeps): import("hono/hono
|
|
|
315
315
|
} & {
|
|
316
316
|
"/repo/commit/:sha": {
|
|
317
317
|
$get: {
|
|
318
|
+
output: string;
|
|
319
|
+
outputFormat: "text";
|
|
320
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
321
|
+
input: {
|
|
322
|
+
query: {
|
|
323
|
+
structured?: string | undefined;
|
|
324
|
+
};
|
|
325
|
+
} & {
|
|
326
|
+
param: {
|
|
327
|
+
sha: string;
|
|
328
|
+
};
|
|
329
|
+
};
|
|
330
|
+
} | {
|
|
318
331
|
output: {
|
|
319
332
|
error: string;
|
|
320
333
|
code?: "invalid_input" | undefined;
|
|
@@ -378,19 +391,6 @@ export declare function createRepoRoutes(deps: RepoRouteDeps): import("hono/hono
|
|
|
378
391
|
sha: string;
|
|
379
392
|
};
|
|
380
393
|
};
|
|
381
|
-
} | {
|
|
382
|
-
output: string;
|
|
383
|
-
outputFormat: "text";
|
|
384
|
-
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
385
|
-
input: {
|
|
386
|
-
query: {
|
|
387
|
-
structured?: string | undefined;
|
|
388
|
-
};
|
|
389
|
-
} & {
|
|
390
|
-
param: {
|
|
391
|
-
sha: string;
|
|
392
|
-
};
|
|
393
|
-
};
|
|
394
394
|
};
|
|
395
395
|
};
|
|
396
396
|
} & {
|
|
@@ -12308,20 +12308,20 @@ export declare function createRunsRoutes(deps: RunsRouteDeps): import("hono/hono
|
|
|
12308
12308
|
} & {
|
|
12309
12309
|
"/runs/:id/handoff": {
|
|
12310
12310
|
$get: {
|
|
12311
|
-
output:
|
|
12312
|
-
|
|
12313
|
-
|
|
12311
|
+
output: {
|
|
12312
|
+
error: string;
|
|
12313
|
+
};
|
|
12314
|
+
outputFormat: "json";
|
|
12315
|
+
status: 404;
|
|
12314
12316
|
input: {
|
|
12315
12317
|
param: {
|
|
12316
12318
|
id: string;
|
|
12317
12319
|
};
|
|
12318
12320
|
};
|
|
12319
12321
|
} | {
|
|
12320
|
-
output:
|
|
12321
|
-
|
|
12322
|
-
|
|
12323
|
-
outputFormat: "json";
|
|
12324
|
-
status: 404;
|
|
12322
|
+
output: string;
|
|
12323
|
+
outputFormat: "text";
|
|
12324
|
+
status: 200;
|
|
12325
12325
|
input: {
|
|
12326
12326
|
param: {
|
|
12327
12327
|
id: string;
|
|
@@ -12359,20 +12359,20 @@ export declare function createRunsRoutes(deps: RunsRouteDeps): import("hono/hono
|
|
|
12359
12359
|
} & {
|
|
12360
12360
|
"/runs/:id/diff": {
|
|
12361
12361
|
$get: {
|
|
12362
|
-
output:
|
|
12363
|
-
|
|
12364
|
-
|
|
12362
|
+
output: {
|
|
12363
|
+
error: string;
|
|
12364
|
+
};
|
|
12365
|
+
outputFormat: "json";
|
|
12366
|
+
status: 404 | 409;
|
|
12365
12367
|
input: {
|
|
12366
12368
|
param: {
|
|
12367
12369
|
id: string;
|
|
12368
12370
|
};
|
|
12369
12371
|
};
|
|
12370
12372
|
} | {
|
|
12371
|
-
output:
|
|
12372
|
-
|
|
12373
|
-
|
|
12374
|
-
outputFormat: "json";
|
|
12375
|
-
status: 404 | 409;
|
|
12373
|
+
output: string;
|
|
12374
|
+
outputFormat: "text";
|
|
12375
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
12376
12376
|
input: {
|
|
12377
12377
|
param: {
|
|
12378
12378
|
id: string;
|
package/dist/server/server.d.ts
CHANGED
|
@@ -4732,6 +4732,19 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
4732
4732
|
} & {
|
|
4733
4733
|
"/repo/commit/:sha": {
|
|
4734
4734
|
$get: {
|
|
4735
|
+
output: string;
|
|
4736
|
+
outputFormat: "text";
|
|
4737
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
4738
|
+
input: {
|
|
4739
|
+
query: {
|
|
4740
|
+
structured?: string | undefined;
|
|
4741
|
+
};
|
|
4742
|
+
} & {
|
|
4743
|
+
param: {
|
|
4744
|
+
sha: string;
|
|
4745
|
+
};
|
|
4746
|
+
};
|
|
4747
|
+
} | {
|
|
4735
4748
|
output: {
|
|
4736
4749
|
error: string;
|
|
4737
4750
|
code?: "invalid_input" | undefined;
|
|
@@ -4795,19 +4808,6 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
4795
4808
|
sha: string;
|
|
4796
4809
|
};
|
|
4797
4810
|
};
|
|
4798
|
-
} | {
|
|
4799
|
-
output: string;
|
|
4800
|
-
outputFormat: "text";
|
|
4801
|
-
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
4802
|
-
input: {
|
|
4803
|
-
query: {
|
|
4804
|
-
structured?: string | undefined;
|
|
4805
|
-
};
|
|
4806
|
-
} & {
|
|
4807
|
-
param: {
|
|
4808
|
-
sha: string;
|
|
4809
|
-
};
|
|
4810
|
-
};
|
|
4811
4811
|
};
|
|
4812
4812
|
};
|
|
4813
4813
|
} & {
|
|
@@ -19310,20 +19310,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
19310
19310
|
} & {
|
|
19311
19311
|
"/runs/:id/handoff": {
|
|
19312
19312
|
$get: {
|
|
19313
|
-
output:
|
|
19314
|
-
|
|
19315
|
-
|
|
19316
|
-
outputFormat: "json";
|
|
19317
|
-
status: 404;
|
|
19313
|
+
output: string;
|
|
19314
|
+
outputFormat: "text";
|
|
19315
|
+
status: 200;
|
|
19318
19316
|
input: {
|
|
19319
19317
|
param: {
|
|
19320
19318
|
id: string;
|
|
19321
19319
|
};
|
|
19322
19320
|
};
|
|
19323
19321
|
} | {
|
|
19324
|
-
output:
|
|
19325
|
-
|
|
19326
|
-
|
|
19322
|
+
output: {
|
|
19323
|
+
error: string;
|
|
19324
|
+
};
|
|
19325
|
+
outputFormat: "json";
|
|
19326
|
+
status: 404;
|
|
19327
19327
|
input: {
|
|
19328
19328
|
param: {
|
|
19329
19329
|
id: string;
|
|
@@ -19361,20 +19361,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
19361
19361
|
} & {
|
|
19362
19362
|
"/runs/:id/diff": {
|
|
19363
19363
|
$get: {
|
|
19364
|
-
output:
|
|
19365
|
-
|
|
19366
|
-
|
|
19367
|
-
outputFormat: "json";
|
|
19368
|
-
status: 404 | 409;
|
|
19364
|
+
output: string;
|
|
19365
|
+
outputFormat: "text";
|
|
19366
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
19369
19367
|
input: {
|
|
19370
19368
|
param: {
|
|
19371
19369
|
id: string;
|
|
19372
19370
|
};
|
|
19373
19371
|
};
|
|
19374
19372
|
} | {
|
|
19375
|
-
output:
|
|
19376
|
-
|
|
19377
|
-
|
|
19373
|
+
output: {
|
|
19374
|
+
error: string;
|
|
19375
|
+
};
|
|
19376
|
+
outputFormat: "json";
|
|
19377
|
+
status: 404 | 409;
|
|
19378
19378
|
input: {
|
|
19379
19379
|
param: {
|
|
19380
19380
|
id: string;
|
|
@@ -19467,9 +19467,9 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
19467
19467
|
status: 404 | 409;
|
|
19468
19468
|
input: {
|
|
19469
19469
|
param: {
|
|
19470
|
-
id: string;
|
|
19471
|
-
} & {
|
|
19472
19470
|
sha: string;
|
|
19471
|
+
} & {
|
|
19472
|
+
id: string;
|
|
19473
19473
|
};
|
|
19474
19474
|
};
|
|
19475
19475
|
} | {
|
|
@@ -19498,9 +19498,9 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
19498
19498
|
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
19499
19499
|
input: {
|
|
19500
19500
|
param: {
|
|
19501
|
-
id: string;
|
|
19502
|
-
} & {
|
|
19503
19501
|
sha: string;
|
|
19502
|
+
} & {
|
|
19503
|
+
id: string;
|
|
19504
19504
|
};
|
|
19505
19505
|
};
|
|
19506
19506
|
};
|
|
@@ -21509,6 +21509,19 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
21509
21509
|
} & {
|
|
21510
21510
|
"/repo/commit/:sha": {
|
|
21511
21511
|
$get: {
|
|
21512
|
+
output: string;
|
|
21513
|
+
outputFormat: "text";
|
|
21514
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
21515
|
+
input: {
|
|
21516
|
+
query: {
|
|
21517
|
+
structured?: string | undefined;
|
|
21518
|
+
};
|
|
21519
|
+
} & {
|
|
21520
|
+
param: {
|
|
21521
|
+
sha: string;
|
|
21522
|
+
};
|
|
21523
|
+
};
|
|
21524
|
+
} | {
|
|
21512
21525
|
output: {
|
|
21513
21526
|
error: string;
|
|
21514
21527
|
code?: "invalid_input" | undefined;
|
|
@@ -21572,19 +21585,6 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
21572
21585
|
sha: string;
|
|
21573
21586
|
};
|
|
21574
21587
|
};
|
|
21575
|
-
} | {
|
|
21576
|
-
output: string;
|
|
21577
|
-
outputFormat: "text";
|
|
21578
|
-
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
21579
|
-
input: {
|
|
21580
|
-
query: {
|
|
21581
|
-
structured?: string | undefined;
|
|
21582
|
-
};
|
|
21583
|
-
} & {
|
|
21584
|
-
param: {
|
|
21585
|
-
sha: string;
|
|
21586
|
-
};
|
|
21587
|
-
};
|
|
21588
21588
|
};
|
|
21589
21589
|
};
|
|
21590
21590
|
} & {
|
|
@@ -36087,20 +36087,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
36087
36087
|
} & {
|
|
36088
36088
|
"/runs/:id/handoff": {
|
|
36089
36089
|
$get: {
|
|
36090
|
-
output:
|
|
36091
|
-
|
|
36092
|
-
|
|
36093
|
-
outputFormat: "json";
|
|
36094
|
-
status: 404;
|
|
36090
|
+
output: string;
|
|
36091
|
+
outputFormat: "text";
|
|
36092
|
+
status: 200;
|
|
36095
36093
|
input: {
|
|
36096
36094
|
param: {
|
|
36097
36095
|
id: string;
|
|
36098
36096
|
};
|
|
36099
36097
|
};
|
|
36100
36098
|
} | {
|
|
36101
|
-
output:
|
|
36102
|
-
|
|
36103
|
-
|
|
36099
|
+
output: {
|
|
36100
|
+
error: string;
|
|
36101
|
+
};
|
|
36102
|
+
outputFormat: "json";
|
|
36103
|
+
status: 404;
|
|
36104
36104
|
input: {
|
|
36105
36105
|
param: {
|
|
36106
36106
|
id: string;
|
|
@@ -36138,20 +36138,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
36138
36138
|
} & {
|
|
36139
36139
|
"/runs/:id/diff": {
|
|
36140
36140
|
$get: {
|
|
36141
|
-
output:
|
|
36142
|
-
|
|
36143
|
-
|
|
36144
|
-
outputFormat: "json";
|
|
36145
|
-
status: 404 | 409;
|
|
36141
|
+
output: string;
|
|
36142
|
+
outputFormat: "text";
|
|
36143
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
36146
36144
|
input: {
|
|
36147
36145
|
param: {
|
|
36148
36146
|
id: string;
|
|
36149
36147
|
};
|
|
36150
36148
|
};
|
|
36151
36149
|
} | {
|
|
36152
|
-
output:
|
|
36153
|
-
|
|
36154
|
-
|
|
36150
|
+
output: {
|
|
36151
|
+
error: string;
|
|
36152
|
+
};
|
|
36153
|
+
outputFormat: "json";
|
|
36154
|
+
status: 404 | 409;
|
|
36155
36155
|
input: {
|
|
36156
36156
|
param: {
|
|
36157
36157
|
id: string;
|
|
@@ -36244,9 +36244,9 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
36244
36244
|
status: 404 | 409;
|
|
36245
36245
|
input: {
|
|
36246
36246
|
param: {
|
|
36247
|
-
id: string;
|
|
36248
|
-
} & {
|
|
36249
36247
|
sha: string;
|
|
36248
|
+
} & {
|
|
36249
|
+
id: string;
|
|
36250
36250
|
};
|
|
36251
36251
|
};
|
|
36252
36252
|
} | {
|
|
@@ -36275,9 +36275,9 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
36275
36275
|
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
36276
36276
|
input: {
|
|
36277
36277
|
param: {
|
|
36278
|
-
id: string;
|
|
36279
|
-
} & {
|
|
36280
36278
|
sha: string;
|
|
36279
|
+
} & {
|
|
36280
|
+
id: string;
|
|
36281
36281
|
};
|
|
36282
36282
|
};
|
|
36283
36283
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hearsay-tools/squawk",
|
|
3
|
-
"version": "0.19.0-dev.
|
|
3
|
+
"version": "0.19.0-dev.8724",
|
|
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-dev.
|
|
73
|
-
"@open-mercato/cezar-contract": "0.19.0-dev.
|
|
72
|
+
"@open-mercato/cezar-api-client": "0.19.0-dev.8724",
|
|
73
|
+
"@open-mercato/cezar-contract": "0.19.0-dev.8724",
|
|
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": "a0b8d04f98a56715df3c99cdb1076085c6d49207"
|
|
91
91
|
}
|
|
@@ -0,0 +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,Ct as i,Dt as a,Gt as o,It as s,Nt as c,Qt as l,Xt as u,Yt as d,dn as f,dt as p,mt as m,on as h,pt as g,rn as _,ut as v,wt as y,yt as b}from"./queries-ClkIgWFx.js";import{Fn as x,Fr as S,In as C,hi as w,ii as T,n as E,sn as ee,zn as D}from"./toaster-C-xqAWVX.js";import{f as O}from"./chunk-KS7C4IRE-Cg8l-LDN.js";import{y as k}from"./design-icons-CzEoMH9c.js";import{t as te}from"./createLucideIcon-BHp8sXmF.js";import{t as ne}from"./folder-browser-6stmlyVQ.js";import{t as A}from"./button-B7MKxYjT.js";import{t as re}from"./badge-DQ3U69Ht.js";import{a as ie,i as ae,o as oe,r as se,s as ce,t as j}from"./dialog-B531GGAo.js";import{t as M}from"./status-dot-BRzVlF2X.js";import{n as N}from"./agents-settings-path-7X6_cvUg.js";import{t as P}from"./centered-state-V15AR_qo.js";import{A as F,Cn as I,Gt as L,Ht as R,Jt as z,Kt as B,M as V,Ut as H,Vt as U,Wt as W,bn as G,qt as le,wn as K}from"./index-CZ2f_VDZ.js";import{t as q}from"./settings-select-CCIMGnyA.js";import{n as J,r as ue,t as de}from"./settings-agent-picker-CzE4qiW7.js";import{n as fe,r as pe,t as me}from"./remote-settings-notice-DgXTd6s8.js";var he=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(),ge=`~/.claude-second`;function _e({open:e,onOpenChange:t,providers:n,initialProvider:r}){let i=_().data,[a,o]=(0,Y.useState)(null),[s,c]=(0,Y.useState)(null),[d,f]=(0,Y.useState)(r??n[0]??`claude`),[p,h]=(0,Y.useState)(``),[g,v]=(0,Y.useState)(``),[y,b]=(0,Y.useState)(!1),x=m(),S=g.trim();return(0,X.jsx)(j,{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:d,onChange:e=>f(e.target.value),className:`rounded-md border border-input bg-card px-2 py-1 text-[13px] outline-none focus-visible:border-ring`,children:n.map(e=>(0,X.jsx)(`option`,{value:e,children:u(i,e)},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=>h(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:g,placeholder:l(i,d)?.accountFolderExample??ge,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)(A,{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)(A,{variant:`outline`,onClick:()=>t(!1),children:`Cancel`}),(0,X.jsx)(A,{"data-slot":`add-account-confirm`,disabled:S===``||x.isPending,onClick:()=>{S===``||x.isPending||x.mutate({provider:d,configDir:S,...p.trim()?{label:p.trim()}:{}},{onSuccess:()=>{t(!1),h(``),v(``),c(null),b(!1),E(`Account added — use Connect to sign in`)}})},children:x.isPending?`Adding…`:`Add account`})]})]})})}async function ve(e){return D(await C.api.v1[`runner-install`][`:runner`].$get({param:{runner:e}}),`/runner-install/:runner`)}async function ye(e,t){return D(await C.api.v1[`runner-install`][`:runner`].$post({param:{runner:e},json:{action:t}}),`/runner-install/:runner`)}var be={idle:``,checking:`Checking for updates…`,downloading:`Downloading CLI…`,verifying:`Verifying CLI…`,extracting:`Extracting CLI…`,activating:`Activating CLI…`,removing:`Removing CLI…`,failed:``};function xe(e){let t=b().data?.capabilities?.settingsAdmin===!0,n=w(),r=[`runner-install`,e],i=T({queryKey:r,queryFn:()=>ve(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=f({mutationFn:t=>ye(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 Se({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)(A,{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)(A,{className:`min-h-11 active:opacity-80`,variant:`outline`,disabled:n,onClick:()=>r.mutate(`remove`),children:`Remove CLI`}):null,(0,X.jsx)(A,{className:`min-h-11 active:opacity-80`,variant:`outline`,disabled:n,onClick:()=>{i.isError?i.refetch():r.mutate(`check`)},children:`Check for updates`})]})}function Ce({runner:e}){let t=xe(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?` · ${be[r.phase]}`:``]}),a?(0,X.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:a}):null,(0,X.jsx)(Se,{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 we={connected:K(`connected`),disconnected:K(`disconnected`),"not-installed":K(`not-installed`),unknown:K(`unknown`)};function Te(){let e=p(),t=_();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)(P,{icon:(0,X.jsx)(he,{}),tone:`danger`,title:`Agents did not load`,subtitle:n.message,heading:`h2`}):(0,X.jsx)(Oe,{data:e.data,runners:t.data})}function Ee(e){let t=e.replace(/^\/(?:home|Users)\/[^/]+/,`~`),n=t.split(`/`);return n.length>4?`…/${n.slice(-3).join(`/`)}`:t}function De(){let{hash:e}=O();(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 Oe({data:e,runners:t}){let n=b(),[r,i]=(0,Y.useState)(null),[o,s]=(0,Y.useState)(null),c=a();return De(),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)(je,{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:()=>i(r.id),onRemove:s},r.id))}),(0,X.jsx)(Me,{runners:t}),r===null?null:(0,X.jsx)(_e,{open:!0,onOpenChange:e=>!e&&i(null),providers:e.profileCapableProviders,initialProvider:r},r),(0,X.jsx)(U,{open:o!==null,onOpenChange:e=>!e&&s(null),children:(0,X.jsxs)(W,{"data-slot":`accounts-remove-confirm`,children:[(0,X.jsxs)(le,{children:[(0,X.jsxs)(z,{children:[`Remove “`,o?.label,`”?`]}),(0,X.jsxs)(L,{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)(B,{children:[(0,X.jsx)(H,{children:`Cancel`}),(0,X.jsx)(R,{"data-action":`accounts-remove-confirm`,disabled:c.isPending,onClick:()=>{let e=o;e&&c.mutate(e.id,{onSuccess:()=>{s(null),E(`Removed ${e.label}`)},onError:e=>E(e.message,{tone:`danger`})})},children:`Remove`})]})]})})]})}function ke({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:I(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)(Z,{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 Z({version:e}){return I(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:G.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 Ae({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)(Ae,{items:n})]}),r?(0,X.jsx)(`div`,{"data-slot":i,className:`settings-account-actions`,children:r}):null]})}function je({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=`${N(l)}-title`,m=i&&o?(0,X.jsx)(A,{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)(ke,{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:N(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)(Ce,{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 Me({runners:e}){let[t,n]=(0,Y.useState)(null),a=w(),c=s(),l=i(),u=h(r(e)),p=f({mutationFn:e=>ee(e),onSuccess:e=>a.setQueryData(o.config,e),onError:e=>E(e.message,{tone:`danger`})});if(c.data===void 0)return null;let m=ue([],e),g=c.data.agentDefaults.runner??`claude`,_=d(t??g,r(e))??t??g,v=c.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.jsx)(`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)(de,{rows:m,runner:g,accountFor:()=>null,providerStatus:l,disabled:p.isPending,onPick:e=>{e!==g&&p.mutate({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`,value:_,onChange:e=>n(e.target.value),children:e.runners.map(e=>(0,X.jsx)(`option`,{value:e.id,children:e.displayName},e.id))})]}),e.runners.filter(e=>e.id===_).map(t=>(0,X.jsxs)(`label`,{className:`settings-account-model flex flex-wrap items-center gap-3`,children:[(0,X.jsx)(k,{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.jsxs)(q,{"aria-label":`Default model for ${t.pickerLabel}`,"data-slot":`accounts-default-model`,"data-runner":t.id,value:v[t.id]??``,disabled:p.isPending,onChange:e=>p.mutate({agentDefaults:{models:{[t.id]:e.target.value||null}}}),className:`block w-64 max-w-full rounded-md border border-input bg-card px-3 py-1.5 text-sm shadow-xs outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:opacity-50`,children:[V(t.id,e,u[t.id]?.data,[v[t.id]]).map(e=>(0,X.jsx)(`option`,{value:e.id,children:e.id===``?`Native default`:e.label},e.id)),(0,X.jsx)(Ne,{runner:t.id,runners:e,catalog:u[t.id]})]})]},t.id))]})]})}function Ne({runner:e,runners:t,catalog:n}){let r=F(e,t,n);return r?(0,X.jsx)(`option`,{disabled:!0,children:r}):null}function Pe({account:e,runners:t,status:n,editable:r}){let i=g();return(0,X.jsxs)(X.Fragment,{children:[n&&n.status!==`connected`&&l(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`&&l(t,e.provider)?.terminalLogin!==!1?(0,X.jsx)(A,{type:`button`,size:`sm`,"data-action":`account-connect`,disabled:i.isPending,onClick:()=>i.mutate({provider:e.provider,...e.isDefault?{}:{profileId:e.id}},{onSuccess:e=>E(e.opened?`Finish signing in in the terminal, then Check again.`:`This account is already connected.`),onError:e=>E(e instanceof x&&e.command?`${e.message} — run: ${e.command}`:e.message,{tone:`danger`})}),children:`Connect`}):null]})}function Fe(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:r,agent:i}){let a=S(e),o=y(),s=v(a,e.status===void 0),c=e.status??s.data?.status,l=c?we[c.status]:void 0,u=Fe(e,t,c,n),d=u?(0,X.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,title:l?`Sign-in: ${l.label}`:void 0,children:[(0,X.jsx)(M,{tone:`pending`}),(0,X.jsx)(`span`,{"data-slot":u.slot,className:`text-foreground`,children:u.label})]}):(0,X.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,X.jsx)(M,{tone:l?.tone??`neutral`,pulse:l===void 0}),(0,X.jsx)(`span`,{"data-slot":`account-status`,className:`text-foreground`,children:l?.label??`Checking…`})]}),f=(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(Pe,{account:e,runners:t,status:c,editable:n}),(0,X.jsx)(A,{type:`button`,variant:`outline`,size:`sm`,"data-action":`account-recheck`,disabled:o.isPending,title:`Re-probe this account's login now, instead of waiting for the cached answer`,onClick:()=>o.mutate(a,{onError:e=>E(e.message,{tone:`danger`})}),children:`Check again`})]}),p=(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]}),m=e.configDir?(0,X.jsx)(`span`,{"data-slot":`account-path`,className:`settings-account-path`,title:e.path,children:Ee(e.configDir)}):null,h=u?(0,X.jsx)(`p`,{"data-slot":`account-folder-guidance`,className:`settings-account-hint`,children:u.guidance}):null,g=c?.hint?(0,X.jsx)(`p`,{className:`settings-account-hint`,children:c.hint}):null,_=n&&!e.isDefault?(0,X.jsx)(Ie,{account:e,onRemove:r}):null,b=(0,X.jsxs)(`div`,{className:`settings-account-readout`,children:[(0,X.jsxs)(`div`,{className:`settings-account-meta-line`,children:[p,d]}),m,h,g]});return i?(0,X.jsxs)(`li`,{"data-slot":`account-row`,"data-account":e.id,"data-primary":``,className:`settings-account-primary`,children:[(0,X.jsx)(Q,{titleId:i.titleId,title:i.title,summary:i.facts,actions:(0,X.jsxs)(X.Fragment,{children:[f,i.addButton]}),actionsSlot:`account-actions`}),(0,X.jsxs)(`div`,{className:`settings-account-meta`,children:[b,_?(0,X.jsx)(`div`,{className:`settings-account-actions`,children:_}):null]})]}):(0,X.jsxs)(`li`,{"data-slot":`account-row`,"data-account":e.id,className:`settings-account-line`,children:[b,(0,X.jsxs)(`div`,{"data-slot":`account-actions`,className:`settings-account-actions`,children:[f,_]})]})}function Ie({account:e,onRemove:t}){let[n,r]=(0,Y.useState)(!1),[i,a]=(0,Y.useState)(e.label),o=c();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)(A,{type:`button`,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=>E(e.message,{tone:`danger`})}),children:`Save`}),(0,X.jsx)(A,{type:`button`,variant:`ghost`,size:`sm`,onClick:()=>{a(e.label),r(!1)},children:`Cancel`})]}):(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(A,{type:`button`,variant:`outline`,size:`sm`,"data-action":`account-rename`,onClick:()=>r(!0),children:`Rename`}),(0,X.jsx)(A,{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{Te as GlobalAgentsSection};
|