@hearsay-tools/squawk 0.18.0-pr4333.8419 → 0.18.0-pr4335.8421
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/contract/index.js +0 -2
- package/dist/contract/live-coordination.d.ts +0 -11
- package/dist/contract/live.d.ts +0 -29
- package/dist/core/managed-session.d.ts +5 -0
- package/dist/core/managed-session.js +25 -0
- package/dist/core/managed-session.js.map +1 -1
- package/dist/runners/antigravity/acp/events.d.ts +5 -3
- package/dist/runners/antigravity/acp/events.js +13 -28
- package/dist/runners/antigravity/acp/events.js.map +1 -1
- package/dist/server/activity-routes.d.ts +23 -23
- package/dist/server/live-routes.d.ts +0 -7
- package/dist/server/live-routes.js +0 -1
- package/dist/server/live-routes.js.map +1 -1
- package/dist/server/models-routes.d.ts +12 -12
- package/dist/server/project-settings-routes.js +0 -1
- package/dist/server/project-settings-routes.js.map +1 -1
- package/dist/server/providers-routes.d.ts +57 -57
- package/dist/server/repo-routes.d.ts +34 -34
- package/dist/server/reports-api.d.ts +2 -2
- package/dist/server/run-event-feed.d.ts +1 -7
- package/dist/server/run-event-feed.js +9 -61
- package/dist/server/run-event-feed.js.map +1 -1
- package/dist/server/server.d.ts +0 -7
- package/dist/server/workspace-live-routes.d.ts +0 -7
- package/dist/server/workspace-routes.d.ts +84 -84
- package/dist/workflows/run/session-events.js +16 -0
- package/dist/workflows/run/session-events.js.map +1 -1
- package/package.json +4 -4
- package/web/dist/assets/{accounts-section-BMRXKB0K.js → accounts-section-DmCfsIhE.js} +1 -1
- package/web/dist/assets/{activity-motion-gVD--ge4.js → activity-motion-Dl9i8LMp.js} +1 -1
- package/web/dist/assets/{activity-route-CWX-J88D.js → activity-route-Cu2YIdei.js} +1 -1
- package/web/dist/assets/{agent-config-section-lqhaHUfm.js → agent-config-section-Bzm4-R__.js} +1 -1
- package/web/dist/assets/{agent-defaults-section-BpRwjWnW.js → agent-defaults-section-BKqo164A.js} +1 -1
- package/web/dist/assets/{appearance-DbUwSBla.js → appearance-BqzgpB-Y.js} +1 -1
- package/web/dist/assets/{archive-on-merge-field-BaI3zkZz.js → archive-on-merge-field-BlGo3o7a.js} +1 -1
- package/web/dist/assets/attention-CvHM4cjG.js +1 -0
- package/web/dist/assets/{automation-format-DFa2dJpB.js → automation-format-CUP262Tk.js} +1 -1
- package/web/dist/assets/{automations-route-DnLljGOe.js → automations-route-CUgWc2Qw.js} +1 -1
- package/web/dist/assets/{cez-idle-CQQPAsFw.js → cez-idle-CQtDz5jk.js} +1 -1
- package/web/dist/assets/{commit-diff-panel-DmSkLK6z.js → commit-diff-panel-Cm558uOv.js} +1 -1
- package/web/dist/assets/{diff-C6bkVxBX.js → diff-GEuSlT_R.js} +2 -2
- package/web/dist/assets/{diff-view-BxKjBvNz.js → diff-view-DLSixc9l.js} +1 -1
- package/web/dist/assets/{file-preview-C5lvODKV.js → file-preview-RPc0KAo_.js} +1 -1
- package/web/dist/assets/{folder-browser-NHuX2McP.js → folder-browser-CffyHz8w.js} +1 -1
- package/web/dist/assets/{git-toolbar-BSdCKArx.js → git-toolbar-Dd_SYvD0.js} +1 -1
- package/web/dist/assets/{github-DDwjyqE6.js → github-CQ7IuYHM.js} +1 -1
- package/web/dist/assets/{global-activity-route-CKWY9TlQ.js → global-activity-route-BxZ0CMwG.js} +1 -1
- package/web/dist/assets/{index-DSEXAeMd.js → index-BRgRv29I.js} +5 -5
- package/web/dist/assets/{label-BUGcli3B.js → label-6PgIe3Ny.js} +1 -1
- package/web/dist/assets/{live-protocol-BCxppY0P.js → live-protocol-DteqtbyN.js} +1 -1
- package/web/dist/assets/{live-reads--ZKnb6uW.js → live-reads-BxjlQXfN.js} +1 -1
- package/web/dist/assets/{markdown-DuXTlq7Y.js → markdown-CIm2Q7mB.js} +1 -1
- package/web/dist/assets/{notifications-section-BjmCZejP.js → notifications-section-Cw8yBZWz.js} +1 -1
- package/web/dist/assets/{open-in-menu-D_YU-SuE.js → open-in-menu-AZMtej8C.js} +1 -1
- package/web/dist/assets/{preview-pane-connected-BhHKfhcN.js → preview-pane-connected-C3DmH_yh.js} +1 -1
- package/web/dist/assets/{project-location-DlTCBar1.js → project-location-DzOgHfcA.js} +1 -1
- package/web/dist/assets/{project-router-C8Jcf-ZR.js → project-router-CDPfL2Jz.js} +1 -1
- package/web/dist/assets/{project-scope-context-DhJ0VY56.js → project-scope-context-D9axDY18.js} +1 -1
- package/web/dist/assets/{projects-section-BsN8TYSx.js → projects-section-DftkCQ4q.js} +1 -1
- package/web/dist/assets/{prompt-templates-section-CxArHWJf.js → prompt-templates-section-CKSYhpin.js} +1 -1
- package/web/dist/assets/{queries-CTOxyOhx.js → queries-DzwCG927.js} +1 -1
- package/web/dist/assets/{reference-chip-BLEuYkA-.js → reference-chip-BnIoiMgY.js} +1 -1
- package/web/dist/assets/{remote-settings-notice-Dgj5YBTq.js → remote-settings-notice-C727a84A.js} +1 -1
- package/web/dist/assets/{repo-git-BIuZy0pC.js → repo-git-CfmNmHkb.js} +1 -1
- package/web/dist/assets/{report-reader-lZ-WKRUK.js → report-reader-wIj2Yog1.js} +1 -1
- package/web/dist/assets/{reports-BMPzNI7w.js → reports-DSkGAItT.js} +1 -1
- package/web/dist/assets/{resources-section-CQCsfgvD.js → resources-section-DaEv2dar.js} +1 -1
- package/web/dist/assets/{run-header-DoNYOnOG.js → run-header-CVZ0ZK7C.js} +1 -1
- package/web/dist/assets/{settings-agent-picker-Q8Lbo-vG.js → settings-agent-picker-DMVlOQzv.js} +1 -1
- package/web/dist/assets/{settings-shell-CMW6pAry.js → settings-shell-DfnGZk9I.js} +1 -1
- package/web/dist/assets/{sidebar-section-B6HQdpc9.js → sidebar-section-DYJZAqtU.js} +1 -1
- package/web/dist/assets/{skills-Cc4mjSbX.js → skills-CfzNcHh1.js} +1 -1
- package/web/dist/assets/{tab-link-Ddb4j0CT.js → tab-link-BaKE6KnE.js} +1 -1
- package/web/dist/assets/{task-changes-D9SYY-kU.js → task-changes-C1I9CMew.js} +1 -1
- package/web/dist/assets/{task-commits-LSbBir7a.js → task-commits-d_R4H7pu.js} +1 -1
- package/web/dist/assets/{task-files-D5rsX3ng.js → task-files-B2JBO9Dx.js} +1 -1
- package/web/dist/assets/{task-github-item-CPp4W9oi.js → task-github-item-C9HMDHKn.js} +1 -1
- package/web/dist/assets/{task-groups-LWtOTsPI.js → task-groups-DoiPFEfM.js} +1 -1
- package/web/dist/assets/{task-thread-4eqaNvVy.js → task-thread-dKvX9xg6.js} +1 -1
- package/web/dist/assets/{tasks-table-Ck7VU4Of.js → tasks-table-CmESFng9.js} +1 -1
- package/web/dist/assets/{thread-state-M2Oqozde.js → thread-state-B3HGSNEy.js} +1 -1
- package/web/dist/assets/{use-hand-to-agent-state-D4kR1KjJ.js → use-hand-to-agent-state-DzHDdmHn.js} +1 -1
- package/web/dist/assets/{useInfiniteQuery-DZgeWSgA.js → useInfiniteQuery-GZp9laKm.js} +1 -1
- package/web/dist/assets/useQuery-CzVHT8UE.js +1 -0
- package/web/dist/assets/{workflows-DrYBOpVA.js → workflows-DqArthZn.js} +1 -1
- package/web/dist/assets/{workspace-tools-CTIg9k0X.js → workspace-tools-S5KvgCRm.js} +1 -1
- package/web/dist/assets/{worktrees-section-Czz2veZ_.js → worktrees-section-DNFnQfiW.js} +1 -1
- package/web/dist/index.html +16 -16
- package/web/dist/live-worker.js +1 -1
- package/web/dist/assets/attention-DKZJuB5W.js +0 -1
- package/web/dist/assets/useQuery-FJU2tzh7.js +0 -1
|
@@ -17,13 +17,6 @@ export declare function createWorkspaceLiveRoutes(live: Parameters<typeof create
|
|
|
17
17
|
stepId?: string | undefined;
|
|
18
18
|
type: string;
|
|
19
19
|
}[];
|
|
20
|
-
snapshots?: {
|
|
21
|
-
[x: string]: any;
|
|
22
|
-
seq: number;
|
|
23
|
-
ts: string;
|
|
24
|
-
stepId?: string | undefined;
|
|
25
|
-
type: string;
|
|
26
|
-
}[] | undefined;
|
|
27
20
|
cursor: string;
|
|
28
21
|
afterSeq: number;
|
|
29
22
|
hasMore: boolean;
|
|
@@ -51,10 +51,34 @@ export declare function createWorkspaceConfigRoutes(deps: WorkspaceConfigRouteDe
|
|
|
51
51
|
"/workspace/config": {
|
|
52
52
|
$put: {
|
|
53
53
|
output: {
|
|
54
|
-
|
|
54
|
+
browseRoot: string;
|
|
55
|
+
projectsDir: string;
|
|
56
|
+
archiveOnMerge: boolean | null;
|
|
57
|
+
effectiveArchiveOnMerge: boolean;
|
|
58
|
+
archiveOnMergeSource: "default" | "environment" | "global";
|
|
59
|
+
composerDefaults: {
|
|
60
|
+
autonomous: boolean | null;
|
|
61
|
+
worktree: boolean | null;
|
|
62
|
+
inheritedAutonomous: "source-dependent" | boolean;
|
|
63
|
+
inheritedWorktree: boolean;
|
|
64
|
+
};
|
|
65
|
+
resources: {
|
|
66
|
+
maxParallel: number;
|
|
67
|
+
maxMonitoringSessions: number;
|
|
68
|
+
monitoringWakeIntervalMinutes: number | null;
|
|
69
|
+
autoResumeOnUsageLimit: boolean;
|
|
70
|
+
memoryLimitMb: number | null;
|
|
71
|
+
worktreeRetentionDefault: number;
|
|
72
|
+
};
|
|
73
|
+
agentDefaults: {
|
|
74
|
+
runner?: string | undefined;
|
|
75
|
+
models?: {
|
|
76
|
+
[x: string]: string | undefined;
|
|
77
|
+
} | undefined;
|
|
78
|
+
};
|
|
55
79
|
};
|
|
56
80
|
outputFormat: "json";
|
|
57
|
-
status:
|
|
81
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
58
82
|
input: {
|
|
59
83
|
json: {
|
|
60
84
|
browseRoot?: string | undefined;
|
|
@@ -83,7 +107,7 @@ export declare function createWorkspaceConfigRoutes(deps: WorkspaceConfigRouteDe
|
|
|
83
107
|
error: string;
|
|
84
108
|
};
|
|
85
109
|
outputFormat: "json";
|
|
86
|
-
status:
|
|
110
|
+
status: 400;
|
|
87
111
|
input: {
|
|
88
112
|
json: {
|
|
89
113
|
browseRoot?: string | undefined;
|
|
@@ -109,34 +133,10 @@ export declare function createWorkspaceConfigRoutes(deps: WorkspaceConfigRouteDe
|
|
|
109
133
|
};
|
|
110
134
|
} | {
|
|
111
135
|
output: {
|
|
112
|
-
|
|
113
|
-
projectsDir: string;
|
|
114
|
-
archiveOnMerge: boolean | null;
|
|
115
|
-
effectiveArchiveOnMerge: boolean;
|
|
116
|
-
archiveOnMergeSource: "default" | "environment" | "global";
|
|
117
|
-
composerDefaults: {
|
|
118
|
-
autonomous: boolean | null;
|
|
119
|
-
worktree: boolean | null;
|
|
120
|
-
inheritedAutonomous: "source-dependent" | boolean;
|
|
121
|
-
inheritedWorktree: boolean;
|
|
122
|
-
};
|
|
123
|
-
resources: {
|
|
124
|
-
maxParallel: number;
|
|
125
|
-
maxMonitoringSessions: number;
|
|
126
|
-
monitoringWakeIntervalMinutes: number | null;
|
|
127
|
-
autoResumeOnUsageLimit: boolean;
|
|
128
|
-
memoryLimitMb: number | null;
|
|
129
|
-
worktreeRetentionDefault: number;
|
|
130
|
-
};
|
|
131
|
-
agentDefaults: {
|
|
132
|
-
runner?: string | undefined;
|
|
133
|
-
models?: {
|
|
134
|
-
[x: string]: string | undefined;
|
|
135
|
-
} | undefined;
|
|
136
|
-
};
|
|
136
|
+
error: string;
|
|
137
137
|
};
|
|
138
138
|
outputFormat: "json";
|
|
139
|
-
status:
|
|
139
|
+
status: 500;
|
|
140
140
|
input: {
|
|
141
141
|
json: {
|
|
142
142
|
browseRoot?: string | undefined;
|
|
@@ -208,10 +208,41 @@ export declare function createWorkspaceConfigRoutes(deps: WorkspaceConfigRouteDe
|
|
|
208
208
|
"/workspace/ui-state": {
|
|
209
209
|
$put: {
|
|
210
210
|
output: {
|
|
211
|
-
|
|
211
|
+
[x: string]: import("hono/utils/types").JSONValue;
|
|
212
|
+
sidebar?: {
|
|
213
|
+
[x: string]: import("hono/utils/types").JSONValue;
|
|
214
|
+
collapsed?: {
|
|
215
|
+
[x: string]: boolean;
|
|
216
|
+
} | undefined;
|
|
217
|
+
projectOrder?: string[] | undefined;
|
|
218
|
+
} | undefined;
|
|
219
|
+
dismissedProviderAuthFailures?: {
|
|
220
|
+
[x: string]: string | undefined;
|
|
221
|
+
} | undefined;
|
|
222
|
+
appearance?: {
|
|
223
|
+
accent?: "cezarion" | "lime" | "violet" | undefined;
|
|
224
|
+
density?: "comfortable" | "compact" | "ultra" | undefined;
|
|
225
|
+
width?: "narrow" | "wide" | undefined;
|
|
226
|
+
} | undefined;
|
|
227
|
+
notifications?: {
|
|
228
|
+
[x: string]: import("hono/utils/types").JSONValue;
|
|
229
|
+
enabled?: boolean | undefined;
|
|
230
|
+
} | undefined;
|
|
231
|
+
taskTable?: {
|
|
232
|
+
[x: string]: import("hono/utils/types").JSONValue;
|
|
233
|
+
expandedColumns?: {
|
|
234
|
+
[x: string]: boolean;
|
|
235
|
+
} | undefined;
|
|
236
|
+
} | undefined;
|
|
237
|
+
lastLocation?: {
|
|
238
|
+
projectId: string;
|
|
239
|
+
pathname: string;
|
|
240
|
+
search?: string | undefined;
|
|
241
|
+
hash?: string | undefined;
|
|
242
|
+
} | undefined;
|
|
212
243
|
};
|
|
213
244
|
outputFormat: "json";
|
|
214
|
-
status:
|
|
245
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
215
246
|
input: {
|
|
216
247
|
json: {
|
|
217
248
|
[x: string]: unknown;
|
|
@@ -244,41 +275,10 @@ export declare function createWorkspaceConfigRoutes(deps: WorkspaceConfigRouteDe
|
|
|
244
275
|
};
|
|
245
276
|
} | {
|
|
246
277
|
output: {
|
|
247
|
-
|
|
248
|
-
sidebar?: {
|
|
249
|
-
[x: string]: import("hono/utils/types").JSONValue;
|
|
250
|
-
collapsed?: {
|
|
251
|
-
[x: string]: boolean;
|
|
252
|
-
} | undefined;
|
|
253
|
-
projectOrder?: string[] | undefined;
|
|
254
|
-
} | undefined;
|
|
255
|
-
dismissedProviderAuthFailures?: {
|
|
256
|
-
[x: string]: string | undefined;
|
|
257
|
-
} | undefined;
|
|
258
|
-
appearance?: {
|
|
259
|
-
accent?: "cezarion" | "lime" | "violet" | undefined;
|
|
260
|
-
density?: "comfortable" | "compact" | "ultra" | undefined;
|
|
261
|
-
width?: "narrow" | "wide" | undefined;
|
|
262
|
-
} | undefined;
|
|
263
|
-
notifications?: {
|
|
264
|
-
[x: string]: import("hono/utils/types").JSONValue;
|
|
265
|
-
enabled?: boolean | undefined;
|
|
266
|
-
} | undefined;
|
|
267
|
-
taskTable?: {
|
|
268
|
-
[x: string]: import("hono/utils/types").JSONValue;
|
|
269
|
-
expandedColumns?: {
|
|
270
|
-
[x: string]: boolean;
|
|
271
|
-
} | undefined;
|
|
272
|
-
} | undefined;
|
|
273
|
-
lastLocation?: {
|
|
274
|
-
projectId: string;
|
|
275
|
-
pathname: string;
|
|
276
|
-
search?: string | undefined;
|
|
277
|
-
hash?: string | undefined;
|
|
278
|
-
} | undefined;
|
|
278
|
+
error: string;
|
|
279
279
|
};
|
|
280
280
|
outputFormat: "json";
|
|
281
|
-
status:
|
|
281
|
+
status: 500;
|
|
282
282
|
input: {
|
|
283
283
|
json: {
|
|
284
284
|
[x: string]: unknown;
|
|
@@ -329,17 +329,10 @@ export declare function createFsBrowseRoutes(workspaceBrowseRoot: () => Promise<
|
|
|
329
329
|
};
|
|
330
330
|
} | {
|
|
331
331
|
output: {
|
|
332
|
-
|
|
333
|
-
parent: string | null;
|
|
334
|
-
dirs: {
|
|
335
|
-
name: string;
|
|
336
|
-
path: string;
|
|
337
|
-
isRepo: boolean;
|
|
338
|
-
}[];
|
|
339
|
-
truncated: boolean;
|
|
332
|
+
error: string;
|
|
340
333
|
};
|
|
341
334
|
outputFormat: "json";
|
|
342
|
-
status:
|
|
335
|
+
status: 400 | 403 | 404;
|
|
343
336
|
input: {
|
|
344
337
|
query: {
|
|
345
338
|
path?: string | undefined;
|
|
@@ -348,10 +341,17 @@ export declare function createFsBrowseRoutes(workspaceBrowseRoot: () => Promise<
|
|
|
348
341
|
};
|
|
349
342
|
} | {
|
|
350
343
|
output: {
|
|
351
|
-
|
|
344
|
+
path: string;
|
|
345
|
+
parent: string | null;
|
|
346
|
+
dirs: {
|
|
347
|
+
name: string;
|
|
348
|
+
path: string;
|
|
349
|
+
isRepo: boolean;
|
|
350
|
+
}[];
|
|
351
|
+
truncated: boolean;
|
|
352
352
|
};
|
|
353
353
|
outputFormat: "json";
|
|
354
|
-
status:
|
|
354
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
355
355
|
input: {
|
|
356
356
|
query: {
|
|
357
357
|
path?: string | undefined;
|
|
@@ -370,21 +370,21 @@ export interface WorkspaceEventsRouteDeps {
|
|
|
370
370
|
export declare function createWorkspaceEventsRoutes(deps: WorkspaceEventsRouteDeps): import("hono/hono-base").HonoBase<ProjectApiEnv, {
|
|
371
371
|
"/workspace/events": {
|
|
372
372
|
$get: {
|
|
373
|
-
output: {
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
};
|
|
377
|
-
outputFormat: "json";
|
|
378
|
-
status: 400;
|
|
373
|
+
output: {};
|
|
374
|
+
outputFormat: string;
|
|
375
|
+
status: import("hono/utils/http-status").StatusCode;
|
|
379
376
|
input: {
|
|
380
377
|
query: {
|
|
381
378
|
runs?: "summary" | undefined;
|
|
382
379
|
};
|
|
383
380
|
};
|
|
384
381
|
} | {
|
|
385
|
-
output: {
|
|
386
|
-
|
|
387
|
-
|
|
382
|
+
output: {
|
|
383
|
+
error: string;
|
|
384
|
+
code?: "invalid_input" | undefined;
|
|
385
|
+
};
|
|
386
|
+
outputFormat: "json";
|
|
387
|
+
status: 400;
|
|
388
388
|
input: {
|
|
389
389
|
query: {
|
|
390
390
|
runs?: "summary" | undefined;
|
|
@@ -13,6 +13,7 @@ import { clearIdleTimer, clearHeldHumanInputTimer, clearUnreadInputTimer } from
|
|
|
13
13
|
import { isRunnerActivity } from './turn-markers.js';
|
|
14
14
|
import { recordUsageUiEvent } from './usage-accounting.js';
|
|
15
15
|
import * as inputReceipts from './input-receipts.js';
|
|
16
|
+
import { topLevelModelWork } from '../../core/managed-session.js';
|
|
16
17
|
import { UiEventSink } from '../../runs/ui-event-sink.js';
|
|
17
18
|
import { nativeTimerDelay } from './turn-markers.js';
|
|
18
19
|
import { recordReportedCost } from './usage-accounting.js';
|
|
@@ -196,6 +197,8 @@ export function makeUiSink(context, host, runId, stepId) {
|
|
|
196
197
|
...(context.toolActivity ? { observe: (event) => context.toolActivity?.observe(runId, event) } : {}),
|
|
197
198
|
});
|
|
198
199
|
}
|
|
200
|
+
/** Each run's open top-level v2 items: their deltas show the model working. */
|
|
201
|
+
const openModelItems = new WeakMap();
|
|
199
202
|
/** Native backend asks arrive before turn-end. Persist and park immediately
|
|
200
203
|
* so the cockpit shows attention and the run releases its workspace slot. */
|
|
201
204
|
export function handleRunnerUiEvent(context, host, runId, state, sink, event, emitting) {
|
|
@@ -208,6 +211,7 @@ export function handleRunnerUiEvent(context, host, runId, state, sink, event, em
|
|
|
208
211
|
host.trackSubagentEvent(runId, state, event);
|
|
209
212
|
host.noteNoWaitNudgeContent(runId, state, emitting, event);
|
|
210
213
|
host.noteNudgeActivity(runId, state, emitting, event);
|
|
214
|
+
noteModelWork(state, event);
|
|
211
215
|
if (isRunnerActivity(event)) {
|
|
212
216
|
// Activity answers the nudge. A refused one's bound was the idle timer. One still owed its
|
|
213
217
|
// acknowledgement stays until it arrives (hearsay-tools/squawk#2443).
|
|
@@ -244,6 +248,18 @@ export function handleRunnerUiEvent(context, host, runId, state, sink, event, em
|
|
|
244
248
|
host.resumeParkedRun(runId, state);
|
|
245
249
|
}
|
|
246
250
|
}
|
|
251
|
+
/** Streamed v2 model work is real content, as v1 text is: the harness is working. */
|
|
252
|
+
function noteModelWork(state, event) {
|
|
253
|
+
let open = openModelItems.get(state);
|
|
254
|
+
if (!open) {
|
|
255
|
+
open = new Set();
|
|
256
|
+
openModelItems.set(state, open);
|
|
257
|
+
}
|
|
258
|
+
if (!topLevelModelWork(open, event))
|
|
259
|
+
return;
|
|
260
|
+
clearUnreadInputTimer(state);
|
|
261
|
+
clearHeldHumanInputTimer(state);
|
|
262
|
+
}
|
|
247
263
|
export function handlePermissionRequested(context, host, runId, state, requestId) {
|
|
248
264
|
state.liveSession.requestPermission(requestId);
|
|
249
265
|
host.humanWaits.prepareHumanAsk(state);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-events.js","sourceRoot":"","sources":["../../../src/workflows/run/session-events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,0BAA0B,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AAGtF,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAIvD,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACxF,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAChF,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AACpG,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAI3D,OAAO,KAAK,aAAa,MAAM,qBAAqB,CAAC;AAGrD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAG1D,OAAO,EAAE,gBAAgB,E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,CAAC,WAAW,CAAC,aAAa,EAAE,CAAC,CAAC;IAC1E,iGAAiG;IACjG,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IACjC,IAAI,CAAC,WAAW,EAAE,CAAC;IACnB,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC;AAClC,CAAC"}
|
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-pr4335.8421",
|
|
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-pr4335.8421",
|
|
72
|
+
"@open-mercato/cezar-contract": "0.18.0-pr4335.8421",
|
|
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": "3d1be01cb76280db5b70521f229975e50f31f161"
|
|
90
90
|
}
|
|
@@ -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-DhJ0VY56.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-CTOxyOhx.js";import{t as ne}from"./useQuery-FJU2tzh7.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-NHuX2McP.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-DSEXAeMd.js";import{n as X,r as ie,t as ae}from"./settings-agent-picker-Q8Lbo-vG.js";import{n as oe,r as se,t as ce}from"./remote-settings-notice-Dgj5YBTq.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-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-BRgRv29I.js";import{n as X,r as ie,t as ae}from"./settings-agent-picker-DMVlOQzv.js";import{n as oe,r as se,t as ce}from"./remote-settings-notice-C727a84A.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};
|