@hearsay-tools/squawk 0.18.0-pr4337.8439 → 0.18.0-pr4338.8441
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/automations/tools.d.ts +8 -8
- package/dist/autosave-cleanup.js +1 -2
- package/dist/autosave-cleanup.js.map +1 -1
- package/dist/built-in-cli-commands.js +4 -0
- package/dist/built-in-cli-commands.js.map +1 -1
- package/dist/built-in-launch-parts.d.ts +2 -0
- package/dist/built-in-launch-parts.js +8 -1
- package/dist/built-in-launch-parts.js.map +1 -1
- package/dist/built-in-run-slots.js +2 -1
- package/dist/built-in-run-slots.js.map +1 -1
- package/dist/ci-wait/controller.d.ts +7 -7
- package/dist/ci-wait/tool-catalog.d.ts +1 -2
- package/dist/ci-wait/tool-catalog.js +16 -22
- package/dist/ci-wait/tool-catalog.js.map +1 -1
- package/dist/contract/index.js +5 -2
- package/dist/contract/live-coordination.d.ts +30 -12
- package/dist/contract/live.d.ts +29 -0
- package/dist/core/cli-registry.d.ts +0 -3
- package/dist/core/cli-registry.js +0 -3
- package/dist/core/cli-registry.js.map +1 -1
- package/dist/delegation/process-liveness.d.ts +3 -6
- package/dist/delegation/process-liveness.js +16 -0
- package/dist/delegation/process-liveness.js.map +1 -1
- package/dist/delegation/scratch-cleanup.js +5 -5
- package/dist/delegation/scratch-cleanup.js.map +1 -1
- package/dist/delegation/transport.d.ts +10 -10
- package/dist/{features/jobs → jobs}/cli.js +1 -1
- package/dist/jobs/cli.js.map +1 -0
- package/dist/{features/jobs → jobs}/command.js +2 -2
- package/dist/jobs/command.js.map +1 -0
- package/dist/{features/jobs → jobs}/job.js +10 -9
- package/dist/jobs/job.js.map +1 -0
- package/dist/jobs/removal-slot.d.ts +4 -0
- package/dist/jobs/removal-slot.js +10 -0
- package/dist/jobs/removal-slot.js.map +1 -0
- package/dist/legacy-runs.js.map +1 -1
- package/dist/pack-check.d.ts +1 -4
- package/dist/pack-check.js +1 -9
- package/dist/pack-check.js.map +1 -1
- package/dist/plugin/index.d.ts +1 -1
- package/dist/runs/agent-tmpdir.d.ts +4 -5
- package/dist/runs/agent-tmpdir.js +5 -7
- package/dist/runs/agent-tmpdir.js.map +1 -1
- package/dist/runs/removal-slots.d.ts +3 -15
- package/dist/runs/removal-slots.js +2 -12
- package/dist/runs/removal-slots.js.map +1 -1
- package/dist/runs/run-exits.d.ts +336 -336
- package/dist/runs/worker-execution.js.map +1 -1
- package/dist/server/automations-routes.d.ts +150 -150
- package/dist/server/live-routes.d.ts +7 -0
- package/dist/server/live-routes.js +1 -0
- package/dist/server/live-routes.js.map +1 -1
- package/dist/server/project-settings-routes.js +1 -0
- package/dist/server/project-settings-routes.js.map +1 -1
- package/dist/server/repo-routes.d.ts +13 -13
- package/dist/server/run-event-feed.d.ts +7 -1
- package/dist/server/run-event-feed.js +58 -9
- package/dist/server/run-event-feed.js.map +1 -1
- package/dist/server/runner-install-routes.d.ts +10 -10
- package/dist/server/runs-routes.d.ts +303 -303
- package/dist/server/server.d.ts +75 -68
- package/dist/server/workspace-live-routes.d.ts +13 -6
- package/dist/worker-scope/groups.d.ts +9 -0
- package/dist/worker-scope/groups.js +18 -3
- package/dist/worker-scope/groups.js.map +1 -1
- package/dist/workflows/input-acknowledgement.d.ts +24 -24
- package/dist/workflows/run/run-settlement.d.ts +10 -0
- package/dist/workflows/run/run-settlement.js +38 -5
- package/dist/workflows/run/run-settlement.js.map +1 -1
- package/dist/workflows/run/wait-engine.d.ts +72 -72
- package/dist/workflows/run/wait-input-descriptors.js +2 -11
- package/dist/workflows/run/wait-input-descriptors.js.map +1 -1
- package/dist/workflows/run/wait-kinds.d.ts +52 -52
- package/package.json +4 -4
- package/scripts/check-pack.mjs +2 -5
- package/web/dist/assets/{accounts-section-DPb768q9.js → accounts-section-DN0FBK_g.js} +1 -1
- package/web/dist/assets/{activity-motion-D3CzGjrR.js → activity-motion-f8hpl5Ze.js} +1 -1
- package/web/dist/assets/{activity-route-DFJlsU13.js → activity-route-Wg282MWR.js} +1 -1
- package/web/dist/assets/{agent-config-section-2esq_SCK.js → agent-config-section-DYBoyQjx.js} +1 -1
- package/web/dist/assets/{agent-defaults-section-DykQGFoV.js → agent-defaults-section-DvKhfLah.js} +1 -1
- package/web/dist/assets/{appearance-CEhpCQZS.js → appearance-bxy5kq6O.js} +1 -1
- package/web/dist/assets/{archive-on-merge-field-BlGo3o7a.js → archive-on-merge-field-BHtW_R72.js} +1 -1
- package/web/dist/assets/attention-CexCTxjN.js +1 -0
- package/web/dist/assets/{automation-format-CUP262Tk.js → automation-format-DB34jUyF.js} +1 -1
- package/web/dist/assets/{automations-route-C6e7440u.js → automations-route-CfkpBhz1.js} +1 -1
- package/web/dist/assets/{cez-idle-CQtDz5jk.js → cez-idle-CdswdDRd.js} +1 -1
- package/web/dist/assets/{commit-diff-panel-CloSSaTz.js → commit-diff-panel-Gb9038QD.js} +1 -1
- package/web/dist/assets/{diff-DVDzDVOV.js → diff-f_-bSIKM.js} +2 -2
- package/web/dist/assets/{diff-view-isM51Pgu.js → diff-view-X6OteUc2.js} +1 -1
- package/web/dist/assets/{file-preview-BZA9e981.js → file-preview-badfok9-.js} +1 -1
- package/web/dist/assets/{folder-browser-CffyHz8w.js → folder-browser-OPEKYHN1.js} +1 -1
- package/web/dist/assets/{git-toolbar-DHAavjba.js → git-toolbar-DN0_Mq8X.js} +1 -1
- package/web/dist/assets/{github-MN8flcF0.js → github-CkzNHNBP.js} +1 -1
- package/web/dist/assets/{global-activity-route-CAXyZ8LF.js → global-activity-route-DD15s5cC.js} +1 -1
- package/web/dist/assets/{index-CHIFhfha.js → index-Dedol522.js} +5 -5
- package/web/dist/assets/{label-6PgIe3Ny.js → label-Cptt_zCn.js} +1 -1
- package/web/dist/assets/{live-protocol-DteqtbyN.js → live-protocol-DMhTnCmf.js} +1 -1
- package/web/dist/assets/{live-reads-BxjlQXfN.js → live-reads-jRSHgWlx.js} +1 -1
- package/web/dist/assets/{markdown-DhdLkyGx.js → markdown-C4Vx2p8H.js} +1 -1
- package/web/dist/assets/{notifications-section-Yiyd4TEk.js → notifications-section-B-dnPl16.js} +1 -1
- package/web/dist/assets/{open-in-menu-AZMtej8C.js → open-in-menu-ytsrlsSn.js} +1 -1
- package/web/dist/assets/{preview-pane-connected-BnNucXbg.js → preview-pane-connected-wlT7my-5.js} +1 -1
- package/web/dist/assets/{project-location-DzOgHfcA.js → project-location-BIWHn5XU.js} +1 -1
- package/web/dist/assets/{project-router-CDPfL2Jz.js → project-router-CWwXAsqF.js} +1 -1
- package/web/dist/assets/{project-scope-context-D9axDY18.js → project-scope-context-Dq-Iq7xE.js} +1 -1
- package/web/dist/assets/{projects-section-CYnMlFyZ.js → projects-section-Cmk9b5sT.js} +1 -1
- package/web/dist/assets/{prompt-templates-section-BaaI89Ej.js → prompt-templates-section-BKieLK_2.js} +1 -1
- package/web/dist/assets/{queries-DzwCG927.js → queries-Dd6O2cf-.js} +1 -1
- package/web/dist/assets/{reference-chip-BnIoiMgY.js → reference-chip-D52WtrZ9.js} +1 -1
- package/web/dist/assets/{remote-settings-notice-Drbpb7K4.js → remote-settings-notice-CX1Fz0Rm.js} +1 -1
- package/web/dist/assets/{repo-git-UR__WAGI.js → repo-git-DPYA8VnX.js} +1 -1
- package/web/dist/assets/{report-reader-DydKaDxP.js → report-reader-BYc3i5OQ.js} +1 -1
- package/web/dist/assets/{reports-FE9fPBLK.js → reports-DtAmI1Ei.js} +1 -1
- package/web/dist/assets/{resources-section-BAz7yc3V.js → resources-section-Dje_gDYP.js} +1 -1
- package/web/dist/assets/{run-header-DsyPfNlS.js → run-header-3nM40dop.js} +1 -1
- package/web/dist/assets/{settings-agent-picker-i4wCYEex.js → settings-agent-picker-BxH3NSsW.js} +1 -1
- package/web/dist/assets/{settings-shell-C1RbQ--s.js → settings-shell-UvqivQaP.js} +1 -1
- package/web/dist/assets/{sidebar-section-CdvgsziI.js → sidebar-section-BQ3vF2oy.js} +1 -1
- package/web/dist/assets/{skills-Cx1c72fB.js → skills-Dh0FFNiL.js} +1 -1
- package/web/dist/assets/{tab-link-BaKE6KnE.js → tab-link-qPg641SX.js} +1 -1
- package/web/dist/assets/{task-changes-CJCU26Rn.js → task-changes-DIGOC-vV.js} +1 -1
- package/web/dist/assets/{task-commits-BvDHw2z3.js → task-commits-BI8NVi-K.js} +1 -1
- package/web/dist/assets/{task-files-BtEb73_A.js → task-files-DS7fsOMA.js} +1 -1
- package/web/dist/assets/{task-github-item-DguvLtyn.js → task-github-item-BBWTgTX0.js} +1 -1
- package/web/dist/assets/{task-groups-DoiPFEfM.js → task-groups-CZAR_voe.js} +1 -1
- package/web/dist/assets/{task-thread-DiiErUqw.js → task-thread-CGszK8tw.js} +1 -1
- package/web/dist/assets/{tasks-table-CmESFng9.js → tasks-table-CPP0rXJp.js} +1 -1
- package/web/dist/assets/{thread-state-XrQOGOYN.js → thread-state-BpGQxoQF.js} +1 -1
- package/web/dist/assets/{use-hand-to-agent-state-CDqXR3F2.js → use-hand-to-agent-state-Bs7tQKKt.js} +1 -1
- package/web/dist/assets/{useInfiniteQuery-GZp9laKm.js → useInfiniteQuery-D9ecHhMH.js} +1 -1
- package/web/dist/assets/useQuery-B0ubYnT2.js +1 -0
- package/web/dist/assets/{workflows-C8Wu6BrK.js → workflows-CUMw82nv.js} +1 -1
- package/web/dist/assets/{workspace-tools-DG99Pw_m.js → workspace-tools-DKpPyGmZ.js} +1 -1
- package/web/dist/assets/{worktrees-section-BtDBsA-d.js → worktrees-section-D-Ga83TD.js} +1 -1
- package/web/dist/index.html +16 -16
- package/web/dist/live-worker.js +2 -2
- package/dist/core/process-ownership.d.ts +0 -12
- package/dist/core/process-ownership.js +0 -33
- package/dist/core/process-ownership.js.map +0 -1
- package/dist/features/jobs/cli.js.map +0 -1
- package/dist/features/jobs/command.js.map +0 -1
- package/dist/features/jobs/index.d.ts +0 -11
- package/dist/features/jobs/index.js +0 -20
- package/dist/features/jobs/index.js.map +0 -1
- package/dist/features/jobs/job.js.map +0 -1
- package/dist/features/jobs/removal-slot.d.ts +0 -14
- package/dist/features/jobs/removal-slot.js +0 -50
- package/dist/features/jobs/removal-slot.js.map +0 -1
- package/web/dist/assets/attention-CvHM4cjG.js +0 -1
- package/web/dist/assets/useQuery-CzVHT8UE.js +0 -1
- /package/dist/{features/jobs → jobs}/cli.d.ts +0 -0
- /package/dist/{features/jobs → jobs}/command.d.ts +0 -0
- /package/dist/{features/jobs → jobs}/job.d.ts +0 -0
|
@@ -237,6 +237,30 @@ export declare class WaitEngine {
|
|
|
237
237
|
deadline: string;
|
|
238
238
|
seconds: number;
|
|
239
239
|
note?: string | undefined;
|
|
240
|
+
} | {
|
|
241
|
+
id: string;
|
|
242
|
+
source: "agent" | "cezar";
|
|
243
|
+
via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
|
|
244
|
+
registeredAt: string;
|
|
245
|
+
phase: "cancelled" | "delivered" | "open" | "resolved";
|
|
246
|
+
resolvedAt?: string | undefined;
|
|
247
|
+
deliveredAt?: string | undefined;
|
|
248
|
+
cancelledAt?: string | undefined;
|
|
249
|
+
turnId: string;
|
|
250
|
+
kind: "process";
|
|
251
|
+
deadline: string;
|
|
252
|
+
timeoutSeconds: number;
|
|
253
|
+
pid: number;
|
|
254
|
+
startToken?: string | undefined;
|
|
255
|
+
exitFile?: string | undefined;
|
|
256
|
+
note?: string | undefined;
|
|
257
|
+
result?: {
|
|
258
|
+
outcome: "deadline" | "error" | "exit_file" | "exited";
|
|
259
|
+
observedAt: string;
|
|
260
|
+
exitCode?: number | undefined;
|
|
261
|
+
exitFileNote?: "not-an-exit-code" | undefined;
|
|
262
|
+
diagnostic?: string | undefined;
|
|
263
|
+
} | undefined;
|
|
240
264
|
} | {
|
|
241
265
|
id: string;
|
|
242
266
|
source: "agent" | "cezar";
|
|
@@ -298,30 +322,6 @@ export declare class WaitEngine {
|
|
|
298
322
|
reason: "outcome" | "timeout";
|
|
299
323
|
} | undefined;
|
|
300
324
|
wakeInputId?: string | undefined;
|
|
301
|
-
} | {
|
|
302
|
-
id: string;
|
|
303
|
-
source: "agent" | "cezar";
|
|
304
|
-
via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
|
|
305
|
-
registeredAt: string;
|
|
306
|
-
phase: "cancelled" | "delivered" | "open" | "resolved";
|
|
307
|
-
resolvedAt?: string | undefined;
|
|
308
|
-
deliveredAt?: string | undefined;
|
|
309
|
-
cancelledAt?: string | undefined;
|
|
310
|
-
turnId: string;
|
|
311
|
-
kind: "process";
|
|
312
|
-
deadline: string;
|
|
313
|
-
timeoutSeconds: number;
|
|
314
|
-
pid: number;
|
|
315
|
-
startToken?: string | undefined;
|
|
316
|
-
exitFile?: string | undefined;
|
|
317
|
-
note?: string | undefined;
|
|
318
|
-
result?: {
|
|
319
|
-
outcome: "deadline" | "error" | "exit_file" | "exited";
|
|
320
|
-
observedAt: string;
|
|
321
|
-
exitCode?: number | undefined;
|
|
322
|
-
exitFileNote?: "not-an-exit-code" | undefined;
|
|
323
|
-
diagnostic?: string | undefined;
|
|
324
|
-
} | undefined;
|
|
325
325
|
} | {
|
|
326
326
|
id: string;
|
|
327
327
|
source: "agent" | "cezar";
|
|
@@ -449,6 +449,30 @@ export declare class WaitEngine {
|
|
|
449
449
|
deadline: string;
|
|
450
450
|
seconds: number;
|
|
451
451
|
note?: string | undefined;
|
|
452
|
+
} | {
|
|
453
|
+
id: string;
|
|
454
|
+
source: "agent" | "cezar";
|
|
455
|
+
via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
|
|
456
|
+
registeredAt: string;
|
|
457
|
+
phase: "cancelled" | "delivered" | "open" | "resolved";
|
|
458
|
+
resolvedAt?: string | undefined;
|
|
459
|
+
deliveredAt?: string | undefined;
|
|
460
|
+
cancelledAt?: string | undefined;
|
|
461
|
+
turnId: string;
|
|
462
|
+
kind: "process";
|
|
463
|
+
deadline: string;
|
|
464
|
+
timeoutSeconds: number;
|
|
465
|
+
pid: number;
|
|
466
|
+
startToken?: string | undefined;
|
|
467
|
+
exitFile?: string | undefined;
|
|
468
|
+
note?: string | undefined;
|
|
469
|
+
result?: {
|
|
470
|
+
outcome: "deadline" | "error" | "exit_file" | "exited";
|
|
471
|
+
observedAt: string;
|
|
472
|
+
exitCode?: number | undefined;
|
|
473
|
+
exitFileNote?: "not-an-exit-code" | undefined;
|
|
474
|
+
diagnostic?: string | undefined;
|
|
475
|
+
} | undefined;
|
|
452
476
|
} | {
|
|
453
477
|
id: string;
|
|
454
478
|
source: "agent" | "cezar";
|
|
@@ -510,30 +534,6 @@ export declare class WaitEngine {
|
|
|
510
534
|
reason: "outcome" | "timeout";
|
|
511
535
|
} | undefined;
|
|
512
536
|
wakeInputId?: string | undefined;
|
|
513
|
-
} | {
|
|
514
|
-
id: string;
|
|
515
|
-
source: "agent" | "cezar";
|
|
516
|
-
via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
|
|
517
|
-
registeredAt: string;
|
|
518
|
-
phase: "cancelled" | "delivered" | "open" | "resolved";
|
|
519
|
-
resolvedAt?: string | undefined;
|
|
520
|
-
deliveredAt?: string | undefined;
|
|
521
|
-
cancelledAt?: string | undefined;
|
|
522
|
-
turnId: string;
|
|
523
|
-
kind: "process";
|
|
524
|
-
deadline: string;
|
|
525
|
-
timeoutSeconds: number;
|
|
526
|
-
pid: number;
|
|
527
|
-
startToken?: string | undefined;
|
|
528
|
-
exitFile?: string | undefined;
|
|
529
|
-
note?: string | undefined;
|
|
530
|
-
result?: {
|
|
531
|
-
outcome: "deadline" | "error" | "exit_file" | "exited";
|
|
532
|
-
observedAt: string;
|
|
533
|
-
exitCode?: number | undefined;
|
|
534
|
-
exitFileNote?: "not-an-exit-code" | undefined;
|
|
535
|
-
diagnostic?: string | undefined;
|
|
536
|
-
} | undefined;
|
|
537
537
|
} | {
|
|
538
538
|
id: string;
|
|
539
539
|
source: "agent" | "cezar";
|
|
@@ -660,6 +660,30 @@ export declare class WaitEngine {
|
|
|
660
660
|
deadline: string;
|
|
661
661
|
seconds: number;
|
|
662
662
|
note?: string | undefined;
|
|
663
|
+
} | {
|
|
664
|
+
id: string;
|
|
665
|
+
source: "agent" | "cezar";
|
|
666
|
+
via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
|
|
667
|
+
registeredAt: string;
|
|
668
|
+
phase: "cancelled" | "delivered" | "open" | "resolved";
|
|
669
|
+
resolvedAt?: string | undefined;
|
|
670
|
+
deliveredAt?: string | undefined;
|
|
671
|
+
cancelledAt?: string | undefined;
|
|
672
|
+
turnId: string;
|
|
673
|
+
kind: "process";
|
|
674
|
+
deadline: string;
|
|
675
|
+
timeoutSeconds: number;
|
|
676
|
+
pid: number;
|
|
677
|
+
startToken?: string | undefined;
|
|
678
|
+
exitFile?: string | undefined;
|
|
679
|
+
note?: string | undefined;
|
|
680
|
+
result?: {
|
|
681
|
+
outcome: "deadline" | "error" | "exit_file" | "exited";
|
|
682
|
+
observedAt: string;
|
|
683
|
+
exitCode?: number | undefined;
|
|
684
|
+
exitFileNote?: "not-an-exit-code" | undefined;
|
|
685
|
+
diagnostic?: string | undefined;
|
|
686
|
+
} | undefined;
|
|
663
687
|
} | {
|
|
664
688
|
id: string;
|
|
665
689
|
source: "agent" | "cezar";
|
|
@@ -721,30 +745,6 @@ export declare class WaitEngine {
|
|
|
721
745
|
reason: "outcome" | "timeout";
|
|
722
746
|
} | undefined;
|
|
723
747
|
wakeInputId?: string | undefined;
|
|
724
|
-
} | {
|
|
725
|
-
id: string;
|
|
726
|
-
source: "agent" | "cezar";
|
|
727
|
-
via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
|
|
728
|
-
registeredAt: string;
|
|
729
|
-
phase: "cancelled" | "delivered" | "open" | "resolved";
|
|
730
|
-
resolvedAt?: string | undefined;
|
|
731
|
-
deliveredAt?: string | undefined;
|
|
732
|
-
cancelledAt?: string | undefined;
|
|
733
|
-
turnId: string;
|
|
734
|
-
kind: "process";
|
|
735
|
-
deadline: string;
|
|
736
|
-
timeoutSeconds: number;
|
|
737
|
-
pid: number;
|
|
738
|
-
startToken?: string | undefined;
|
|
739
|
-
exitFile?: string | undefined;
|
|
740
|
-
note?: string | undefined;
|
|
741
|
-
result?: {
|
|
742
|
-
outcome: "deadline" | "error" | "exit_file" | "exited";
|
|
743
|
-
observedAt: string;
|
|
744
|
-
exitCode?: number | undefined;
|
|
745
|
-
exitFileNote?: "not-an-exit-code" | undefined;
|
|
746
|
-
diagnostic?: string | undefined;
|
|
747
|
-
} | undefined;
|
|
748
748
|
} | {
|
|
749
749
|
id: string;
|
|
750
750
|
source: "agent" | "cezar";
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { builtInSquawkWaitRequestSchema } from '../../contract/index.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { cliCommandAdvertised } from '../../core/cli-registry.js';
|
|
4
|
-
/** The process-wait fields name `hsq job` only while that command can run here; without the jobs
|
|
5
|
-
* feature they name only the agent's own exit file (spec 2026-11-26-launch-slot-and-bundled-jobs). */
|
|
6
|
-
const jobs = () => cliCommandAdvertised('job');
|
|
7
3
|
const descriptions = {
|
|
8
4
|
operation_id: 'Optional retry identity. Reuse it with exactly the same arguments after an unknown outcome; never use it for a different registration.',
|
|
9
5
|
pr: 'kind "pr": the HTTPS GitHub pull request URL.',
|
|
@@ -16,13 +12,8 @@ const descriptions = {
|
|
|
16
12
|
mode: 'kind "worker" or "request": "any" wakes you when one selected id settles (default), "all" when every one has, "one" takes exactly one id.',
|
|
17
13
|
timeout_seconds: 'The deadline in seconds. kind "pr": 1–7200, default 1800. kind "worker", "request" or "peer": 1–7200, default 600 (the default shown is the pr one). kind "process": 1–7200, default 1800.',
|
|
18
14
|
seconds: 'kind "timer": seconds until the wake (60–7200).',
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
: 'kind "process": the PID of the background command.';
|
|
22
|
-
},
|
|
23
|
-
get exit_file() {
|
|
24
|
-
return `kind "process": optional. ${jobs() ? 'The `exitFile` that `hsq job start` printed for this `pid`, in any `--dir`, or a' : 'A'} file that your own wrapper writes the exit code to, in $TMPDIR or the worktree, with a new name for each command. Leave it out for a command that is already running or that writes its status file somewhere else.`;
|
|
25
|
-
},
|
|
15
|
+
pid: 'kind "process": the PID of the background command: the `pid` the job start command printed.',
|
|
16
|
+
exit_file: 'kind "process": optional. The `exitFile` that `hsq job start` printed for this `pid`, in any `--dir`, or a file that your own wrapper writes the exit code to, in $TMPDIR or the worktree, with a new name for each command. Leave it out for a command that is already running or that writes its status file somewhere else.',
|
|
26
17
|
note: 'kind "timer" or "process": what to re-check, handed back to you at the wake.',
|
|
27
18
|
};
|
|
28
19
|
const kindDescriptions = '"pr" waits for a GitHub pull request: its checks or its merge (see `until`); "worker" waits for workers you own; "request" waits for replies to requests you sent; "peer" waits for named peer tasks to message you or settle; "timer" wakes you after `seconds`; "process" wakes you when a background command ends.'.split('; ');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wait-input-descriptors.js","sourceRoot":"","sources":["../../../src/workflows/run/wait-input-descriptors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,yCAAyC,CAAC;AACzF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"wait-input-descriptors.js","sourceRoot":"","sources":["../../../src/workflows/run/wait-input-descriptors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,yCAAyC,CAAC;AACzF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,YAAY,GAA2B;IAC3C,YAAY,EAAE,wIAAwI;IACtJ,EAAE,EAAE,+CAA+C;IACnD,KAAK,EAAE,udAAud;IAC9d,gBAAgB,EAAE,8SAA8S;IAChU,QAAQ,EAAE,iLAAiL;IAC3L,UAAU,EAAE,mEAAmE;IAC/E,WAAW,EAAE,2HAA2H;IACxI,QAAQ,EAAE,wOAAwO;IAClP,IAAI,EAAE,2IAA2I;IACjJ,eAAe,EAAE,4LAA4L;IAC7M,OAAO,EAAE,iDAAiD;IAC1D,GAAG,EAAE,6FAA6F;IAClG,SAAS,EAAE,gUAAgU;IAC3U,IAAI,EAAE,8EAA8E;CACrF,CAAC;AACF,MAAM,gBAAgB,GAAG,uTAAuT,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAE7V,+FAA+F;AAC/F,MAAM,UAAU,iBAAiB,CAAC,IAAY;IAC5C,OAAO,8BAA8B,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;QACtE,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;QAC5C,IAAI,WAAW,KAAK,IAAI,IAAI,CAAE,EAAE,MAAM,EAAE,CAAC,SAAS,CAAC,EAA+B,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,WAAW,CAAC;YAAE,OAAO,EAAE,CAAC;QAC3H,MAAM,UAAU,GAAG,CAAC,CAAC,YAAY,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,UAAU,IAAI,EAAE,CAAC;QAC5E,OAAO,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,gBAAgB,CAAC,KAAK,CAAE,EAAE,CAAC,CAAC;IAC9H,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -234,32 +234,6 @@ export declare function waitSelectors<K extends Wait['kind']>(kind: K): {
|
|
|
234
234
|
note?: string | undefined;
|
|
235
235
|
}, {
|
|
236
236
|
kind: K;
|
|
237
|
-
}> | Extract<{
|
|
238
|
-
id: string;
|
|
239
|
-
source: "agent" | "cezar";
|
|
240
|
-
via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
|
|
241
|
-
registeredAt: string;
|
|
242
|
-
phase: "cancelled" | "delivered" | "open" | "resolved";
|
|
243
|
-
resolvedAt?: string | undefined;
|
|
244
|
-
deliveredAt?: string | undefined;
|
|
245
|
-
cancelledAt?: string | undefined;
|
|
246
|
-
turnId: string;
|
|
247
|
-
kind: "process";
|
|
248
|
-
deadline: string;
|
|
249
|
-
timeoutSeconds: number;
|
|
250
|
-
pid: number;
|
|
251
|
-
startToken?: string | undefined;
|
|
252
|
-
exitFile?: string | undefined;
|
|
253
|
-
note?: string | undefined;
|
|
254
|
-
result?: {
|
|
255
|
-
outcome: "deadline" | "error" | "exit_file" | "exited";
|
|
256
|
-
observedAt: string;
|
|
257
|
-
exitCode?: number | undefined;
|
|
258
|
-
exitFileNote?: "not-an-exit-code" | undefined;
|
|
259
|
-
diagnostic?: string | undefined;
|
|
260
|
-
} | undefined;
|
|
261
|
-
}, {
|
|
262
|
-
kind: K;
|
|
263
237
|
}> | Extract<{
|
|
264
238
|
id: string;
|
|
265
239
|
source: "agent" | "cezar";
|
|
@@ -325,6 +299,32 @@ export declare function waitSelectors<K extends Wait['kind']>(kind: K): {
|
|
|
325
299
|
wakeInputId?: string | undefined;
|
|
326
300
|
}, {
|
|
327
301
|
kind: K;
|
|
302
|
+
}> | Extract<{
|
|
303
|
+
id: string;
|
|
304
|
+
source: "agent" | "cezar";
|
|
305
|
+
via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
|
|
306
|
+
registeredAt: string;
|
|
307
|
+
phase: "cancelled" | "delivered" | "open" | "resolved";
|
|
308
|
+
resolvedAt?: string | undefined;
|
|
309
|
+
deliveredAt?: string | undefined;
|
|
310
|
+
cancelledAt?: string | undefined;
|
|
311
|
+
turnId: string;
|
|
312
|
+
kind: "process";
|
|
313
|
+
deadline: string;
|
|
314
|
+
timeoutSeconds: number;
|
|
315
|
+
pid: number;
|
|
316
|
+
startToken?: string | undefined;
|
|
317
|
+
exitFile?: string | undefined;
|
|
318
|
+
note?: string | undefined;
|
|
319
|
+
result?: {
|
|
320
|
+
outcome: "deadline" | "error" | "exit_file" | "exited";
|
|
321
|
+
observedAt: string;
|
|
322
|
+
exitCode?: number | undefined;
|
|
323
|
+
exitFileNote?: "not-an-exit-code" | undefined;
|
|
324
|
+
diagnostic?: string | undefined;
|
|
325
|
+
} | undefined;
|
|
326
|
+
}, {
|
|
327
|
+
kind: K;
|
|
328
328
|
}> | Extract<{
|
|
329
329
|
id: string;
|
|
330
330
|
source: "agent" | "cezar";
|
|
@@ -459,32 +459,6 @@ export declare function waitSelectors<K extends Wait['kind']>(kind: K): {
|
|
|
459
459
|
note?: string | undefined;
|
|
460
460
|
}, {
|
|
461
461
|
kind: K;
|
|
462
|
-
}> | Extract<{
|
|
463
|
-
id: string;
|
|
464
|
-
source: "agent" | "cezar";
|
|
465
|
-
via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
|
|
466
|
-
registeredAt: string;
|
|
467
|
-
phase: "cancelled" | "delivered" | "open" | "resolved";
|
|
468
|
-
resolvedAt?: string | undefined;
|
|
469
|
-
deliveredAt?: string | undefined;
|
|
470
|
-
cancelledAt?: string | undefined;
|
|
471
|
-
turnId: string;
|
|
472
|
-
kind: "process";
|
|
473
|
-
deadline: string;
|
|
474
|
-
timeoutSeconds: number;
|
|
475
|
-
pid: number;
|
|
476
|
-
startToken?: string | undefined;
|
|
477
|
-
exitFile?: string | undefined;
|
|
478
|
-
note?: string | undefined;
|
|
479
|
-
result?: {
|
|
480
|
-
outcome: "deadline" | "error" | "exit_file" | "exited";
|
|
481
|
-
observedAt: string;
|
|
482
|
-
exitCode?: number | undefined;
|
|
483
|
-
exitFileNote?: "not-an-exit-code" | undefined;
|
|
484
|
-
diagnostic?: string | undefined;
|
|
485
|
-
} | undefined;
|
|
486
|
-
}, {
|
|
487
|
-
kind: K;
|
|
488
462
|
}> | Extract<{
|
|
489
463
|
id: string;
|
|
490
464
|
source: "agent" | "cezar";
|
|
@@ -550,6 +524,32 @@ export declare function waitSelectors<K extends Wait['kind']>(kind: K): {
|
|
|
550
524
|
wakeInputId?: string | undefined;
|
|
551
525
|
}, {
|
|
552
526
|
kind: K;
|
|
527
|
+
}> | Extract<{
|
|
528
|
+
id: string;
|
|
529
|
+
source: "agent" | "cezar";
|
|
530
|
+
via: "ask-line" | "budget" | "cez-message-wait" | "cez-worker-wait" | "cezar_ask" | "cezar_wait" | "cezar_wait_for_ci" | "completion" | "monitoring-line" | "native-ask" | "native-subagents" | "no-wait" | "schedule-wakeup";
|
|
531
|
+
registeredAt: string;
|
|
532
|
+
phase: "cancelled" | "delivered" | "open" | "resolved";
|
|
533
|
+
resolvedAt?: string | undefined;
|
|
534
|
+
deliveredAt?: string | undefined;
|
|
535
|
+
cancelledAt?: string | undefined;
|
|
536
|
+
turnId: string;
|
|
537
|
+
kind: "process";
|
|
538
|
+
deadline: string;
|
|
539
|
+
timeoutSeconds: number;
|
|
540
|
+
pid: number;
|
|
541
|
+
startToken?: string | undefined;
|
|
542
|
+
exitFile?: string | undefined;
|
|
543
|
+
note?: string | undefined;
|
|
544
|
+
result?: {
|
|
545
|
+
outcome: "deadline" | "error" | "exit_file" | "exited";
|
|
546
|
+
observedAt: string;
|
|
547
|
+
exitCode?: number | undefined;
|
|
548
|
+
exitFileNote?: "not-an-exit-code" | undefined;
|
|
549
|
+
diagnostic?: string | undefined;
|
|
550
|
+
} | undefined;
|
|
551
|
+
}, {
|
|
552
|
+
kind: K;
|
|
553
553
|
}> | Extract<{
|
|
554
554
|
id: string;
|
|
555
555
|
source: "agent" | "cezar";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hearsay-tools/squawk",
|
|
3
|
-
"version": "0.18.0-
|
|
3
|
+
"version": "0.18.0-pr4338.8441",
|
|
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",
|
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@babel/parser": "^8.0.8",
|
|
70
70
|
"@babel/types": "^8.0.8",
|
|
71
|
-
"@open-mercato/cezar-api-client": "0.18.0-
|
|
72
|
-
"@open-mercato/cezar-contract": "0.18.0-
|
|
71
|
+
"@open-mercato/cezar-api-client": "0.18.0-pr4338.8441",
|
|
72
|
+
"@open-mercato/cezar-contract": "0.18.0-pr4338.8441",
|
|
73
73
|
"@types/node": "^24.19.1",
|
|
74
74
|
"@types/ws": "^8.18.1",
|
|
75
75
|
"esbuild": "^0.28.1",
|
|
@@ -86,5 +86,5 @@
|
|
|
86
86
|
"publishConfig": {
|
|
87
87
|
"access": "public"
|
|
88
88
|
},
|
|
89
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "184613761e3fc44c7f65d1744a93145c5d9b62db"
|
|
90
90
|
}
|
package/scripts/check-pack.mjs
CHANGED
|
@@ -16,7 +16,6 @@ import path from 'node:path';
|
|
|
16
16
|
import { fileURLToPath } from 'node:url';
|
|
17
17
|
import { findPackGaps } from '../dist/pack-check.js';
|
|
18
18
|
import { bundledRunnerIds } from '../dist/plugin/bundled-runners.js';
|
|
19
|
-
import { bundledFeatureFolders } from '../dist/plugin/bundled-features.js';
|
|
20
19
|
import { listRunnerAssets } from './copy-runner-assets.mjs';
|
|
21
20
|
|
|
22
21
|
const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
|
@@ -44,9 +43,7 @@ if (files.length === 0) {
|
|
|
44
43
|
const srcRunnersDir = path.join(repoRoot, 'src/runners');
|
|
45
44
|
const runnerIds = bundledRunnerIds(srcRunnersDir);
|
|
46
45
|
const runnerAssets = listRunnerAssets(srcRunnersDir, runnerIds).map((rel) => `dist/runners/${rel}`);
|
|
47
|
-
|
|
48
|
-
const featureIds = bundledFeatureFolders(path.join(repoRoot, 'src/features')).map((folder) => folder.id);
|
|
49
|
-
const gaps = findPackGaps(files, runnerIds, runnerAssets, featureIds);
|
|
46
|
+
const gaps = findPackGaps(files, runnerIds, runnerAssets);
|
|
50
47
|
if (gaps.length > 0) {
|
|
51
48
|
console.error('check:pack: the npm tarball would ship a broken cockpit:');
|
|
52
49
|
for (const gap of gaps) console.error(` - ${gap}`);
|
|
@@ -54,4 +51,4 @@ if (gaps.length > 0) {
|
|
|
54
51
|
}
|
|
55
52
|
|
|
56
53
|
const uiFiles = files.filter((f) => f.startsWith('web/dist/')).length;
|
|
57
|
-
console.log(`check:pack ok — ${files.length} files, ${uiFiles} under web/dist (shell + assets present), bundled runners ${runnerIds.join(', ')}, ${runnerAssets.length} runner asset(s)
|
|
54
|
+
console.log(`check:pack ok — ${files.length} files, ${uiFiles} under web/dist (shell + assets present), bundled runners ${runnerIds.join(', ')}, ${runnerAssets.length} runner asset(s)`);
|
|
@@ -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{An as r,Ar as i,Pn as a,ci as o,jn as s,nn as c}from"./project-scope-context-D9axDY18.js";import{$t as l,Ct as u,Gt as d,Ht as f,Kt as p,Mt as m,Rt as h,Ut as g,Xt as _,bt as v,ht as y,in as b,kt as x,lt as S,ot as C,st as w,ut as ee,yt as te}from"./queries-DzwCG927.js";import{t as ne}from"./useQuery-CzVHT8UE.js";import{f as T}from"./chunk-KS7C4IRE-Cg8l-LDN.js";import{n as E}from"./toaster-Bo5vCbz-.js";import{y as D}from"./design-icons-CzEoMH9c.js";import{t as O}from"./createLucideIcon-BHp8sXmF.js";import{t as k}from"./folder-browser-CffyHz8w.js";import{t as A}from"./button-BQ2y4XRB.js";import{t as j}from"./badge-D9JrXe0o.js";import{a as M,i as N,o as P,r as F,s as I,t as L}from"./dialog-BVF6dIeS.js";import{t as R}from"./status-dot-DtAOFiIi.js";import{n as z}from"./agents-settings-path-7X6_cvUg.js";import{t as B}from"./centered-state-V15AR_qo.js";import{Gt as V,Ht as H,Jt as U,Kt as W,N as G,Ut as K,Vt as q,Wt as J,j as re,qt as Y}from"./index-CHIFhfha.js";import{n as X,r as ie,t as ae}from"./settings-agent-picker-i4wCYEex.js";import{n as oe,r as se,t as ce}from"./remote-settings-notice-Drbpb7K4.js";var le=O(`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`}]]),Z=e(t(),1),Q=n(),ue=`~/.claude-second`;function de({open:e,onOpenChange:t,providers:n,initialProvider:r}){let i=_().data,[a,o]=(0,Z.useState)(null),[s,c]=(0,Z.useState)(null),[l,u]=(0,Z.useState)(r??n[0]??`claude`),[f,p]=(0,Z.useState)(``),[m,h]=(0,Z.useState)(``),[g,v]=(0,Z.useState)(!1),y=ee(),b=m.trim();return(0,Q.jsx)(L,{open:e,onOpenChange:t,children:(0,Q.jsxs)(F,{"data-slot":`add-account-dialog`,className:`sm:max-w-lg`,children:[(0,Q.jsxs)(P,{children:[(0,Q.jsx)(I,{children:`Add agent account`}),(0,Q.jsx)(N,{children:`The config folder this account uses. It does not have to exist yet — Connect signs in and the CLI creates it.`})]}),(0,Q.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,Q.jsxs)(`label`,{className:`flex items-center gap-2 text-[13px]`,children:[(0,Q.jsx)(`span`,{className:`text-muted-foreground`,children:`Agent`}),(0,Q.jsx)(`select`,{"aria-label":`Agent`,"data-slot":`add-account-provider`,value:l,onChange:e=>u(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,Q.jsx)(`option`,{value:e,children:e},e))})]}),(0,Q.jsxs)(`label`,{className:`flex min-w-0 flex-1 items-center gap-2 text-[13px]`,children:[(0,Q.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:`Name`}),(0,Q.jsx)(`input`,{type:`text`,"aria-label":`Account name`,"data-slot":`add-account-label`,value:f,placeholder:`Work`,onChange:e=>p(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,Q.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,Q.jsxs)(`label`,{className:`flex min-w-0 items-center gap-2 text-[13px]`,children:[(0,Q.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:`Folder`}),(0,Q.jsx)(`input`,{type:`text`,spellCheck:!1,autoComplete:`off`,"aria-label":`Config folder`,"data-slot":`add-account-dir`,value:m,placeholder:d(i,l)?.accountFolderExample??ue,onChange:e=>{h(e.target.value),c(null),y.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,Q.jsx)(A,{type:`button`,variant:`ghost`,size:`sm`,"data-action":`add-account-browse`,"aria-expanded":g,onClick:()=>v(e=>!e),children:g?`Hide folders`:`Browse…`})]}),(0,Q.jsxs)(`p`,{className:`text-[11px] text-soft-foreground`,children:[`A `,(0,Q.jsx)(`code`,{children:`~`}),` is kept as written and expanded when the agent runs.`]})]}),g?(0,Q.jsx)(k,{path:a,selected:s,onSelect:e=>{c(e),h(e.path),y.reset()},onEnter:e=>{o(e),c(null),y.reset()},showHidden:!0,emptyHint:`No subfolders here — pick this folder by typing its path above.`}):null,y.isError?(0,Q.jsx)(`p`,{"data-slot":`add-account-error`,className:`min-w-0 break-words text-[13px] text-danger`,children:y.error instanceof Error?y.error.message:`could not add that folder`}):null,(0,Q.jsxs)(M,{className:`min-w-0 sm:items-center sm:justify-end`,children:[(0,Q.jsx)(A,{variant:`outline`,onClick:()=>t(!1),children:`Cancel`}),(0,Q.jsx)(A,{"data-slot":`add-account-confirm`,disabled:b===``||y.isPending,onClick:()=>{b===``||y.isPending||y.mutate({provider:l,configDir:b,...f.trim()?{label:f.trim()}:{}},{onSuccess:()=>{t(!1),p(``),h(``),c(null),v(!1),E(`Account added — use Connect to sign in`)}})},children:y.isPending?`Adding…`:`Add account`})]})]})})}async function fe(e){return a(await s.api.v1[`runner-install`][`:runner`].$get({param:{runner:e}}),`/runner-install/:runner`)}async function pe(e,t){return a(await s.api.v1[`runner-install`][`:runner`].$post({param:{runner:e},json:{action:t}}),`/runner-install/:runner`)}var me={idle:``,checking:`Checking for updates…`,downloading:`Downloading CLI…`,verifying:`Verifying CLI…`,extracting:`Extracting CLI…`,activating:`Activating CLI…`,removing:`Removing CLI…`,failed:``};function he(e){let t=y().data?.capabilities?.settingsAdmin===!0,n=o(),r=[`runner-install`,e],i=ne({queryKey:r,queryFn:()=>fe(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=b({mutationFn:t=>pe(e,t),retry:!1,onSuccess:e=>{n.setQueryData(r,e)}}),s=i.data;return{allowed:t,data:s,busy:a.isPending||!!s&&s.phase!==`idle`&&s.phase!==`failed`,error:a.error?.message??i.error?.message??s?.error,action:a,status:i}}function ge({state:e}){let{data:t,busy:n,action:r,status:i}=e;if(t?.supported===!1)return(0,Q.jsx)(`p`,{children:`This host is not supported by the CLI installer.`});let a=!!t?.installedVersion;return(0,Q.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,Q.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,Q.jsx)(A,{className:`min-h-11 active:opacity-80`,variant:`outline`,disabled:n,onClick:()=>r.mutate(`remove`),children:`Remove CLI`}):null,(0,Q.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 _e({runner:e}){let t=he(e),{allowed:n,data:r,busy:i,error:a}=t;return n?(0,Q.jsxs)(`section`,{"aria-label":`CLI installation`,className:`grid gap-3`,children:[(0,Q.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?` · ${me[r.phase]}`:``]}),a?(0,Q.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:a}):null,(0,Q.jsx)(ge,{state:t}),r?.installedVersion?(0,Q.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Removing the CLI keeps account data and lets running tasks finish.`}):null]}):null}var ve={connected:{label:`Connected`,tone:`success`},disconnected:{label:`Not connected`,tone:`pending`},"not-installed":{label:`Not installed`,tone:`neutral`},unknown:{label:`Could not verify`,tone:`danger`}};function ye(){let e=w(),t=_();if(e.isPending||t.isPending)return(0,Q.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,Q.jsx)(B,{icon:(0,Q.jsx)(le,{}),tone:`danger`,title:`Agents did not load`,subtitle:n.message,heading:`h2`}):(0,Q.jsx)($,{data:e.data,runners:t.data})}function be(){let{hash:e}=T();(0,Z.useEffect)(()=>{if(!e)return;let t=document.getElementById(decodeURIComponent(e.slice(1)));t&&(t.scrollIntoView?.({block:`start`}),t.focus({preventScroll:!0}))},[e])}function $({data:e,runners:t}){let n=y(),[r,i]=(0,Z.useState)(null),[a,o]=(0,Z.useState)(null),s=u();return be(),se(),(0,Q.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,Q.jsx)(`p`,{className:`text-[13px] text-muted-foreground`,children:`Install, update and sign in to each agent, and set what a project runs when it has not chosen.`}),(0,Q.jsx)(oe,{risk:`Agent accounts run each CLI with the configured host folder`}),e.editable?null:(0,Q.jsxs)(`p`,{"data-slot":`accounts-hosted`,className:`text-[13px] text-soft-foreground`,children:[`Agent accounts are read-only on this remote cockpit. Run`,` `,(0,Q.jsx)(`code`,{children:ce}),` on the host to add, edit, or sign in to accounts here.`]}),(0,Q.jsx)(`div`,{"data-slot":`agent-cards`,className:`flex flex-col gap-4`,children:t.runners.map(r=>(0,Q.jsx)(Se,{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:o},r.id))}),(0,Q.jsx)(Ce,{runners:t}),r===null?null:(0,Q.jsx)(de,{open:!0,onOpenChange:e=>!e&&i(null),providers:e.profileCapableProviders,initialProvider:r},r),(0,Q.jsx)(q,{open:a!==null,onOpenChange:e=>!e&&o(null),children:(0,Q.jsxs)(J,{"data-slot":`accounts-remove-confirm`,children:[(0,Q.jsxs)(Y,{children:[(0,Q.jsxs)(U,{children:[`Remove “`,a?.label,`”?`]}),(0,Q.jsxs)(V,{children:[`This only forgets the account. Nothing in `,a?.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,Q.jsxs)(W,{children:[(0,Q.jsx)(K,{children:`Cancel`}),(0,Q.jsx)(H,{"data-action":`accounts-remove-confirm`,disabled:s.isPending,onClick:()=>{let e=a;e&&s.mutate(e.id,{onSuccess:()=>{o(null),E(`Removed ${e.label}`)},onError:e=>E(e.message,{tone:`danger`})})},children:`Remove`})]})]})})]})}function xe({entry:e,check:t}){return t===void 0?(0,Q.jsx)(`span`,{"data-slot":`agent-installed`,children:`Checking…`}):t.available?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`span`,{"data-slot":`agent-installed`,children:`Installed`}),t.version?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`span`,{"aria-hidden":`true`,children:` · `}),(0,Q.jsx)(`span`,{"data-slot":`agent-version`,children:t.version})]}):null]}):(0,Q.jsxs)(`span`,{"data-slot":`agent-installed`,children:[`Not installed`,e.installHint?(0,Q.jsxs)(Q.Fragment,{children:[` — `,(0,Q.jsx)(`code`,{className:`break-all`,children:e.installHint})]}):null]})}function Se({entry:e,check:t,settingsAdmin:n,runners:r,editable:i,accounts:a,canCarryAccounts:o,onAdd:s,onRemove:c}){let l=e.id,u=e.managedInstall===!0&&n,d=a.filter(e=>e.isDefault).length,f=`${z(l)}-title`;return(0,Q.jsxs)(`section`,{id:z(l),tabIndex:-1,"aria-labelledby":f,"data-slot":`accounts-provider`,"data-provider":l,className:`settings-agent-card flex flex-col gap-4 rounded-lg border border-border bg-card p-4`,children:[(0,Q.jsx)(`h3`,{id:f,className:`settings-account-provider-title`,children:e.displayName}),u?(0,Q.jsx)(_e,{runner:l}):null,(0,Q.jsxs)(`div`,{className:`settings-account-installation settings-readout`,children:[u?null:(0,Q.jsx)(xe,{entry:e,check:t}),i||a.length>0?(0,Q.jsxs)(`span`,{className:`settings-account-count`,children:[a.length,` `,a.length===1?`account`:`accounts`,` (`,d,` discovered, `,a.length-d,` added)`]}):null]}),a.length>0?(0,Q.jsx)(`ul`,{children:a.map(e=>(0,Q.jsx)(De,{account:e,runners:r,editable:i,onRemove:()=>c(e)},e.id))}):null,i?o?(0,Q.jsx)(`div`,{className:`settings-account-add-row`,children:(0,Q.jsx)(A,{type:`button`,variant:`outline`,size:`sm`,"data-action":`accounts-add`,"data-provider":l,onClick:s,children:`Add account`})}):(0,Q.jsxs)(`p`,{"data-slot":`accounts-single-only`,className:`text-[11px] text-soft-foreground`,children:[e.displayName,` can only hold one account here: it keeps its credentials outside its config folder, so a second folder would change settings without changing the login — which would say “work account” while billing the other one.`]}):a.length===0&&e.browserLogin?(0,Q.jsxs)(`div`,{"data-slot":`hosted-sign-in`,className:`flex flex-wrap items-center gap-3`,children:[(0,Q.jsx)(`p`,{className:`text-[13px] text-muted-foreground`,children:`Discovered account`}),(0,Q.jsx)(X,{provider:l,label:e.displayName})]}):null]})}function Ce({runners:e}){let[t,n]=(0,Z.useState)(null),r=o(),i=m(),a=te(),s=l(p(e)),u=b({mutationFn:e=>c(e),onSuccess:e=>r.setQueryData(h.config,e),onError:e=>E(e.message,{tone:`danger`})});if(i.data===void 0)return null;let d=ie([],e),g=i.data.agentDefaults.runner??`claude`,_=f(t??g,p(e))??t??g,v=i.data.agentDefaults.models??{};return(0,Q.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,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`h3`,{className:`text-[13px] font-semibold text-foreground`,children:`Defaults for new projects`}),(0,Q.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,Q.jsx)(ae,{rows:d,runner:g,accountFor:()=>null,providerStatus:a,disabled:u.isPending,onPick:e=>{e!==g&&u.mutate({agentDefaults:{runner:e}})}}),(0,Q.jsxs)(`div`,{className:`settings-account-models flex flex-col gap-2`,children:[(0,Q.jsxs)(`label`,{className:`settings-model-agent-choice`,children:[(0,Q.jsx)(`span`,{children:`Default model for`}),(0,Q.jsx)(`select`,{"aria-label":`Model agent`,value:_,onChange:e=>n(e.target.value),children:e.runners.map(e=>(0,Q.jsx)(`option`,{value:e.id,children:e.displayName},e.id))})]}),e.runners.filter(e=>e.id===_).map(t=>(0,Q.jsxs)(`label`,{className:`settings-account-model flex items-center gap-3`,children:[(0,Q.jsx)(D,{className:`size-4 text-accent-icon shrink-0`}),(0,Q.jsx)(`span`,{className:`w-24 shrink-0 text-xs text-muted-foreground`,children:t.displayName}),(0,Q.jsxs)(`select`,{"aria-label":`Default model for ${t.pickerLabel}`,"data-slot":`accounts-default-model`,"data-runner":t.id,value:v[t.id]??``,disabled:u.isPending,onChange:e=>u.mutate({agentDefaults:{models:{[t.id]:e.target.value||null}}}),className:`block w-full max-w-xs 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:[G(t.id,e,s[t.id]?.data,[v[t.id]]).map(e=>(0,Q.jsx)(`option`,{value:e.id,children:e.id===``?`Native default`:e.label},e.id)),(0,Q.jsx)(we,{runner:t.id,runners:e,catalog:s[t.id]})]})]},t.id))]})]})}function we({runner:e,runners:t,catalog:n}){let r=re(e,t,n);return r?(0,Q.jsx)(`option`,{disabled:!0,children:r}):null}function Te({account:e,runners:t,status:n,editable:i}){let a=S();return(0,Q.jsxs)(Q.Fragment,{children:[n&&n.status!==`connected`&&d(t,e.provider)?.browserLogin?(0,Q.jsx)(X,{provider:e.provider,...e.isDefault?{}:{profileId:e.id},label:e.label}):null,i&&n&&n.status!==`connected`&&d(t,e.provider)?.terminalLogin!==!1?(0,Q.jsx)(A,{type:`button`,size:`sm`,"data-action":`account-connect`,disabled:a.isPending,onClick:()=>a.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 r&&e.command?`${e.message} — run: ${e.command}`:e.message,{tone:`danger`})}),children:`Connect`}):null]})}function Ee({account:e,runners:t,status:n,editable:r}){return!n||n.requiresAccountHome===!1?null:e.exists?!e.looksValid&&e.configDir?(0,Q.jsxs)(`span`,{"data-slot":`account-unrecognised`,children:[`— this folder does not look like `,g(t,e.provider),` config yet`]}):null:(0,Q.jsx)(`span`,{"data-slot":`account-missing`,children:r?`— folder not created yet; Connect will make it`:`— not initialized on host yet`})}function De({account:e,runners:t,editable:n,onRemove:r}){let a=i(e),o=v(),s=C(a,e.status===void 0),c=e.status??s.data?.status,l=c?ve[c.status]:void 0;return(0,Q.jsx)(`li`,{"data-slot":`account-row`,"data-account":e.id,className:`flex flex-col gap-2 px-3.5 py-3`,children:(0,Q.jsxs)(`div`,{className:`settings-account-card`,children:[(0,Q.jsxs)(`div`,{className:`min-w-0`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(`span`,{className:`text-[13px] font-medium text-foreground`,children:e.label}),e.isDefault?(0,Q.jsx)(j,{variant:`ghost`,className:`shrink-0 text-[12px] text-muted-foreground`,children:`discovered`}):null]}),(0,Q.jsxs)(`div`,{className:`settings-account-readout settings-readout`,children:[e.configDir?(0,Q.jsx)(`p`,{"data-slot":`account-path`,className:`mt-0.5 truncate font-mono text-[11px] text-soft-foreground`,title:e.path,children:e.configDir}):null,(0,Q.jsxs)(`div`,{className:`mt-1 flex flex-wrap items-center gap-2 text-xs text-muted-foreground`,children:[(0,Q.jsx)(R,{tone:l?.tone??`neutral`,pulse:l===void 0}),(0,Q.jsx)(`span`,{"data-slot":`account-status`,children:l?.label??`Checking…`}),(0,Q.jsx)(Ee,{account:e,runners:t,status:c,editable:n})]}),c?.hint?(0,Q.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:c.hint}):null]})]}),(0,Q.jsxs)(`div`,{className:`settings-account-actions`,children:[(0,Q.jsx)(Te,{account:e,runners:t,status:c,editable:n}),(0,Q.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`}),n?(0,Q.jsx)(Oe,{account:e,onRemove:r}):null]})]})})}function Oe({account:e,onRemove:t}){let[n,r]=(0,Z.useState)(!1),[i,a]=(0,Z.useState)(e.label),o=x();return(0,Q.jsx)(Q.Fragment,{children:e.isDefault?null:(0,Q.jsx)(`div`,{"data-slot":`account-manage`,className:`settings-account-management`,children:n?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.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,Q.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,Q.jsx)(A,{type:`button`,variant:`ghost`,size:`sm`,onClick:()=>{a(e.label),r(!1)},children:`Cancel`})]}):(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(A,{type:`button`,variant:`outline`,size:`sm`,"data-action":`account-rename`,onClick:()=>r(!0),children:`Rename`}),(0,Q.jsx)(A,{type:`button`,variant:`outline`,size:`sm`,"data-action":`account-remove`,onClick:t,children:`Remove account`}),(0,Q.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Renaming changes what Squawk calls this account, not its folder.`})]})})})}export{ye 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{An as r,Ar as i,Pn as a,ci as o,jn as s,nn as c}from"./project-scope-context-Dq-Iq7xE.js";import{$t as l,Ct as u,Gt as d,Ht as f,Kt as p,Mt as m,Rt as h,Ut as g,Xt as _,bt as v,ht as y,in as b,kt as x,lt as S,ot as C,st as w,ut as ee,yt as te}from"./queries-Dd6O2cf-.js";import{t as ne}from"./useQuery-B0ubYnT2.js";import{f as T}from"./chunk-KS7C4IRE-Cg8l-LDN.js";import{n as E}from"./toaster-Bo5vCbz-.js";import{y as D}from"./design-icons-CzEoMH9c.js";import{t as O}from"./createLucideIcon-BHp8sXmF.js";import{t as k}from"./folder-browser-OPEKYHN1.js";import{t as A}from"./button-BQ2y4XRB.js";import{t as j}from"./badge-D9JrXe0o.js";import{a as M,i as N,o as P,r as F,s as I,t as L}from"./dialog-BVF6dIeS.js";import{t as R}from"./status-dot-DtAOFiIi.js";import{n as z}from"./agents-settings-path-7X6_cvUg.js";import{t as B}from"./centered-state-V15AR_qo.js";import{Gt as V,Ht as H,Jt as U,Kt as W,N as G,Ut as K,Vt as q,Wt as J,j as re,qt as Y}from"./index-Dedol522.js";import{n as X,r as ie,t as ae}from"./settings-agent-picker-BxH3NSsW.js";import{n as oe,r as se,t as ce}from"./remote-settings-notice-CX1Fz0Rm.js";var le=O(`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`}]]),Z=e(t(),1),Q=n(),ue=`~/.claude-second`;function de({open:e,onOpenChange:t,providers:n,initialProvider:r}){let i=_().data,[a,o]=(0,Z.useState)(null),[s,c]=(0,Z.useState)(null),[l,u]=(0,Z.useState)(r??n[0]??`claude`),[f,p]=(0,Z.useState)(``),[m,h]=(0,Z.useState)(``),[g,v]=(0,Z.useState)(!1),y=ee(),b=m.trim();return(0,Q.jsx)(L,{open:e,onOpenChange:t,children:(0,Q.jsxs)(F,{"data-slot":`add-account-dialog`,className:`sm:max-w-lg`,children:[(0,Q.jsxs)(P,{children:[(0,Q.jsx)(I,{children:`Add agent account`}),(0,Q.jsx)(N,{children:`The config folder this account uses. It does not have to exist yet — Connect signs in and the CLI creates it.`})]}),(0,Q.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,Q.jsxs)(`label`,{className:`flex items-center gap-2 text-[13px]`,children:[(0,Q.jsx)(`span`,{className:`text-muted-foreground`,children:`Agent`}),(0,Q.jsx)(`select`,{"aria-label":`Agent`,"data-slot":`add-account-provider`,value:l,onChange:e=>u(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,Q.jsx)(`option`,{value:e,children:e},e))})]}),(0,Q.jsxs)(`label`,{className:`flex min-w-0 flex-1 items-center gap-2 text-[13px]`,children:[(0,Q.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:`Name`}),(0,Q.jsx)(`input`,{type:`text`,"aria-label":`Account name`,"data-slot":`add-account-label`,value:f,placeholder:`Work`,onChange:e=>p(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,Q.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,Q.jsxs)(`label`,{className:`flex min-w-0 items-center gap-2 text-[13px]`,children:[(0,Q.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:`Folder`}),(0,Q.jsx)(`input`,{type:`text`,spellCheck:!1,autoComplete:`off`,"aria-label":`Config folder`,"data-slot":`add-account-dir`,value:m,placeholder:d(i,l)?.accountFolderExample??ue,onChange:e=>{h(e.target.value),c(null),y.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,Q.jsx)(A,{type:`button`,variant:`ghost`,size:`sm`,"data-action":`add-account-browse`,"aria-expanded":g,onClick:()=>v(e=>!e),children:g?`Hide folders`:`Browse…`})]}),(0,Q.jsxs)(`p`,{className:`text-[11px] text-soft-foreground`,children:[`A `,(0,Q.jsx)(`code`,{children:`~`}),` is kept as written and expanded when the agent runs.`]})]}),g?(0,Q.jsx)(k,{path:a,selected:s,onSelect:e=>{c(e),h(e.path),y.reset()},onEnter:e=>{o(e),c(null),y.reset()},showHidden:!0,emptyHint:`No subfolders here — pick this folder by typing its path above.`}):null,y.isError?(0,Q.jsx)(`p`,{"data-slot":`add-account-error`,className:`min-w-0 break-words text-[13px] text-danger`,children:y.error instanceof Error?y.error.message:`could not add that folder`}):null,(0,Q.jsxs)(M,{className:`min-w-0 sm:items-center sm:justify-end`,children:[(0,Q.jsx)(A,{variant:`outline`,onClick:()=>t(!1),children:`Cancel`}),(0,Q.jsx)(A,{"data-slot":`add-account-confirm`,disabled:b===``||y.isPending,onClick:()=>{b===``||y.isPending||y.mutate({provider:l,configDir:b,...f.trim()?{label:f.trim()}:{}},{onSuccess:()=>{t(!1),p(``),h(``),c(null),v(!1),E(`Account added — use Connect to sign in`)}})},children:y.isPending?`Adding…`:`Add account`})]})]})})}async function fe(e){return a(await s.api.v1[`runner-install`][`:runner`].$get({param:{runner:e}}),`/runner-install/:runner`)}async function pe(e,t){return a(await s.api.v1[`runner-install`][`:runner`].$post({param:{runner:e},json:{action:t}}),`/runner-install/:runner`)}var me={idle:``,checking:`Checking for updates…`,downloading:`Downloading CLI…`,verifying:`Verifying CLI…`,extracting:`Extracting CLI…`,activating:`Activating CLI…`,removing:`Removing CLI…`,failed:``};function he(e){let t=y().data?.capabilities?.settingsAdmin===!0,n=o(),r=[`runner-install`,e],i=ne({queryKey:r,queryFn:()=>fe(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=b({mutationFn:t=>pe(e,t),retry:!1,onSuccess:e=>{n.setQueryData(r,e)}}),s=i.data;return{allowed:t,data:s,busy:a.isPending||!!s&&s.phase!==`idle`&&s.phase!==`failed`,error:a.error?.message??i.error?.message??s?.error,action:a,status:i}}function ge({state:e}){let{data:t,busy:n,action:r,status:i}=e;if(t?.supported===!1)return(0,Q.jsx)(`p`,{children:`This host is not supported by the CLI installer.`});let a=!!t?.installedVersion;return(0,Q.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,Q.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,Q.jsx)(A,{className:`min-h-11 active:opacity-80`,variant:`outline`,disabled:n,onClick:()=>r.mutate(`remove`),children:`Remove CLI`}):null,(0,Q.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 _e({runner:e}){let t=he(e),{allowed:n,data:r,busy:i,error:a}=t;return n?(0,Q.jsxs)(`section`,{"aria-label":`CLI installation`,className:`grid gap-3`,children:[(0,Q.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?` · ${me[r.phase]}`:``]}),a?(0,Q.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:a}):null,(0,Q.jsx)(ge,{state:t}),r?.installedVersion?(0,Q.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Removing the CLI keeps account data and lets running tasks finish.`}):null]}):null}var ve={connected:{label:`Connected`,tone:`success`},disconnected:{label:`Not connected`,tone:`pending`},"not-installed":{label:`Not installed`,tone:`neutral`},unknown:{label:`Could not verify`,tone:`danger`}};function ye(){let e=w(),t=_();if(e.isPending||t.isPending)return(0,Q.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,Q.jsx)(B,{icon:(0,Q.jsx)(le,{}),tone:`danger`,title:`Agents did not load`,subtitle:n.message,heading:`h2`}):(0,Q.jsx)($,{data:e.data,runners:t.data})}function be(){let{hash:e}=T();(0,Z.useEffect)(()=>{if(!e)return;let t=document.getElementById(decodeURIComponent(e.slice(1)));t&&(t.scrollIntoView?.({block:`start`}),t.focus({preventScroll:!0}))},[e])}function $({data:e,runners:t}){let n=y(),[r,i]=(0,Z.useState)(null),[a,o]=(0,Z.useState)(null),s=u();return be(),se(),(0,Q.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,Q.jsx)(`p`,{className:`text-[13px] text-muted-foreground`,children:`Install, update and sign in to each agent, and set what a project runs when it has not chosen.`}),(0,Q.jsx)(oe,{risk:`Agent accounts run each CLI with the configured host folder`}),e.editable?null:(0,Q.jsxs)(`p`,{"data-slot":`accounts-hosted`,className:`text-[13px] text-soft-foreground`,children:[`Agent accounts are read-only on this remote cockpit. Run`,` `,(0,Q.jsx)(`code`,{children:ce}),` on the host to add, edit, or sign in to accounts here.`]}),(0,Q.jsx)(`div`,{"data-slot":`agent-cards`,className:`flex flex-col gap-4`,children:t.runners.map(r=>(0,Q.jsx)(Se,{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:o},r.id))}),(0,Q.jsx)(Ce,{runners:t}),r===null?null:(0,Q.jsx)(de,{open:!0,onOpenChange:e=>!e&&i(null),providers:e.profileCapableProviders,initialProvider:r},r),(0,Q.jsx)(q,{open:a!==null,onOpenChange:e=>!e&&o(null),children:(0,Q.jsxs)(J,{"data-slot":`accounts-remove-confirm`,children:[(0,Q.jsxs)(Y,{children:[(0,Q.jsxs)(U,{children:[`Remove “`,a?.label,`”?`]}),(0,Q.jsxs)(V,{children:[`This only forgets the account. Nothing in `,a?.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,Q.jsxs)(W,{children:[(0,Q.jsx)(K,{children:`Cancel`}),(0,Q.jsx)(H,{"data-action":`accounts-remove-confirm`,disabled:s.isPending,onClick:()=>{let e=a;e&&s.mutate(e.id,{onSuccess:()=>{o(null),E(`Removed ${e.label}`)},onError:e=>E(e.message,{tone:`danger`})})},children:`Remove`})]})]})})]})}function xe({entry:e,check:t}){return t===void 0?(0,Q.jsx)(`span`,{"data-slot":`agent-installed`,children:`Checking…`}):t.available?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`span`,{"data-slot":`agent-installed`,children:`Installed`}),t.version?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`span`,{"aria-hidden":`true`,children:` · `}),(0,Q.jsx)(`span`,{"data-slot":`agent-version`,children:t.version})]}):null]}):(0,Q.jsxs)(`span`,{"data-slot":`agent-installed`,children:[`Not installed`,e.installHint?(0,Q.jsxs)(Q.Fragment,{children:[` — `,(0,Q.jsx)(`code`,{className:`break-all`,children:e.installHint})]}):null]})}function Se({entry:e,check:t,settingsAdmin:n,runners:r,editable:i,accounts:a,canCarryAccounts:o,onAdd:s,onRemove:c}){let l=e.id,u=e.managedInstall===!0&&n,d=a.filter(e=>e.isDefault).length,f=`${z(l)}-title`;return(0,Q.jsxs)(`section`,{id:z(l),tabIndex:-1,"aria-labelledby":f,"data-slot":`accounts-provider`,"data-provider":l,className:`settings-agent-card flex flex-col gap-4 rounded-lg border border-border bg-card p-4`,children:[(0,Q.jsx)(`h3`,{id:f,className:`settings-account-provider-title`,children:e.displayName}),u?(0,Q.jsx)(_e,{runner:l}):null,(0,Q.jsxs)(`div`,{className:`settings-account-installation settings-readout`,children:[u?null:(0,Q.jsx)(xe,{entry:e,check:t}),i||a.length>0?(0,Q.jsxs)(`span`,{className:`settings-account-count`,children:[a.length,` `,a.length===1?`account`:`accounts`,` (`,d,` discovered, `,a.length-d,` added)`]}):null]}),a.length>0?(0,Q.jsx)(`ul`,{children:a.map(e=>(0,Q.jsx)(De,{account:e,runners:r,editable:i,onRemove:()=>c(e)},e.id))}):null,i?o?(0,Q.jsx)(`div`,{className:`settings-account-add-row`,children:(0,Q.jsx)(A,{type:`button`,variant:`outline`,size:`sm`,"data-action":`accounts-add`,"data-provider":l,onClick:s,children:`Add account`})}):(0,Q.jsxs)(`p`,{"data-slot":`accounts-single-only`,className:`text-[11px] text-soft-foreground`,children:[e.displayName,` can only hold one account here: it keeps its credentials outside its config folder, so a second folder would change settings without changing the login — which would say “work account” while billing the other one.`]}):a.length===0&&e.browserLogin?(0,Q.jsxs)(`div`,{"data-slot":`hosted-sign-in`,className:`flex flex-wrap items-center gap-3`,children:[(0,Q.jsx)(`p`,{className:`text-[13px] text-muted-foreground`,children:`Discovered account`}),(0,Q.jsx)(X,{provider:l,label:e.displayName})]}):null]})}function Ce({runners:e}){let[t,n]=(0,Z.useState)(null),r=o(),i=m(),a=te(),s=l(p(e)),u=b({mutationFn:e=>c(e),onSuccess:e=>r.setQueryData(h.config,e),onError:e=>E(e.message,{tone:`danger`})});if(i.data===void 0)return null;let d=ie([],e),g=i.data.agentDefaults.runner??`claude`,_=f(t??g,p(e))??t??g,v=i.data.agentDefaults.models??{};return(0,Q.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,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`h3`,{className:`text-[13px] font-semibold text-foreground`,children:`Defaults for new projects`}),(0,Q.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,Q.jsx)(ae,{rows:d,runner:g,accountFor:()=>null,providerStatus:a,disabled:u.isPending,onPick:e=>{e!==g&&u.mutate({agentDefaults:{runner:e}})}}),(0,Q.jsxs)(`div`,{className:`settings-account-models flex flex-col gap-2`,children:[(0,Q.jsxs)(`label`,{className:`settings-model-agent-choice`,children:[(0,Q.jsx)(`span`,{children:`Default model for`}),(0,Q.jsx)(`select`,{"aria-label":`Model agent`,value:_,onChange:e=>n(e.target.value),children:e.runners.map(e=>(0,Q.jsx)(`option`,{value:e.id,children:e.displayName},e.id))})]}),e.runners.filter(e=>e.id===_).map(t=>(0,Q.jsxs)(`label`,{className:`settings-account-model flex items-center gap-3`,children:[(0,Q.jsx)(D,{className:`size-4 text-accent-icon shrink-0`}),(0,Q.jsx)(`span`,{className:`w-24 shrink-0 text-xs text-muted-foreground`,children:t.displayName}),(0,Q.jsxs)(`select`,{"aria-label":`Default model for ${t.pickerLabel}`,"data-slot":`accounts-default-model`,"data-runner":t.id,value:v[t.id]??``,disabled:u.isPending,onChange:e=>u.mutate({agentDefaults:{models:{[t.id]:e.target.value||null}}}),className:`block w-full max-w-xs 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:[G(t.id,e,s[t.id]?.data,[v[t.id]]).map(e=>(0,Q.jsx)(`option`,{value:e.id,children:e.id===``?`Native default`:e.label},e.id)),(0,Q.jsx)(we,{runner:t.id,runners:e,catalog:s[t.id]})]})]},t.id))]})]})}function we({runner:e,runners:t,catalog:n}){let r=re(e,t,n);return r?(0,Q.jsx)(`option`,{disabled:!0,children:r}):null}function Te({account:e,runners:t,status:n,editable:i}){let a=S();return(0,Q.jsxs)(Q.Fragment,{children:[n&&n.status!==`connected`&&d(t,e.provider)?.browserLogin?(0,Q.jsx)(X,{provider:e.provider,...e.isDefault?{}:{profileId:e.id},label:e.label}):null,i&&n&&n.status!==`connected`&&d(t,e.provider)?.terminalLogin!==!1?(0,Q.jsx)(A,{type:`button`,size:`sm`,"data-action":`account-connect`,disabled:a.isPending,onClick:()=>a.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 r&&e.command?`${e.message} — run: ${e.command}`:e.message,{tone:`danger`})}),children:`Connect`}):null]})}function Ee({account:e,runners:t,status:n,editable:r}){return!n||n.requiresAccountHome===!1?null:e.exists?!e.looksValid&&e.configDir?(0,Q.jsxs)(`span`,{"data-slot":`account-unrecognised`,children:[`— this folder does not look like `,g(t,e.provider),` config yet`]}):null:(0,Q.jsx)(`span`,{"data-slot":`account-missing`,children:r?`— folder not created yet; Connect will make it`:`— not initialized on host yet`})}function De({account:e,runners:t,editable:n,onRemove:r}){let a=i(e),o=v(),s=C(a,e.status===void 0),c=e.status??s.data?.status,l=c?ve[c.status]:void 0;return(0,Q.jsx)(`li`,{"data-slot":`account-row`,"data-account":e.id,className:`flex flex-col gap-2 px-3.5 py-3`,children:(0,Q.jsxs)(`div`,{className:`settings-account-card`,children:[(0,Q.jsxs)(`div`,{className:`min-w-0`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(`span`,{className:`text-[13px] font-medium text-foreground`,children:e.label}),e.isDefault?(0,Q.jsx)(j,{variant:`ghost`,className:`shrink-0 text-[12px] text-muted-foreground`,children:`discovered`}):null]}),(0,Q.jsxs)(`div`,{className:`settings-account-readout settings-readout`,children:[e.configDir?(0,Q.jsx)(`p`,{"data-slot":`account-path`,className:`mt-0.5 truncate font-mono text-[11px] text-soft-foreground`,title:e.path,children:e.configDir}):null,(0,Q.jsxs)(`div`,{className:`mt-1 flex flex-wrap items-center gap-2 text-xs text-muted-foreground`,children:[(0,Q.jsx)(R,{tone:l?.tone??`neutral`,pulse:l===void 0}),(0,Q.jsx)(`span`,{"data-slot":`account-status`,children:l?.label??`Checking…`}),(0,Q.jsx)(Ee,{account:e,runners:t,status:c,editable:n})]}),c?.hint?(0,Q.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:c.hint}):null]})]}),(0,Q.jsxs)(`div`,{className:`settings-account-actions`,children:[(0,Q.jsx)(Te,{account:e,runners:t,status:c,editable:n}),(0,Q.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`}),n?(0,Q.jsx)(Oe,{account:e,onRemove:r}):null]})]})})}function Oe({account:e,onRemove:t}){let[n,r]=(0,Z.useState)(!1),[i,a]=(0,Z.useState)(e.label),o=x();return(0,Q.jsx)(Q.Fragment,{children:e.isDefault?null:(0,Q.jsx)(`div`,{"data-slot":`account-manage`,className:`settings-account-management`,children:n?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.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,Q.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,Q.jsx)(A,{type:`button`,variant:`ghost`,size:`sm`,onClick:()=>{a(e.label),r(!1)},children:`Cancel`})]}):(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(A,{type:`button`,variant:`outline`,size:`sm`,"data-action":`account-rename`,onClick:()=>r(!0),children:`Rename`}),(0,Q.jsx)(A,{type:`button`,variant:`outline`,size:`sm`,"data-action":`account-remove`,onClick:t,children:`Remove account`}),(0,Q.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Renaming changes what Squawk calls this account, not its folder.`})]})})})}export{ye as GlobalAgentsSection};
|