@pstdio/workbench 0.12.0 → 0.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,1886 +0,0 @@
1
- import { jsx as f } from "react/jsx-runtime";
2
- import { c as Z } from "react/compiler-runtime";
3
- import { Icon as Wt, Stack as nt } from "@chakra-ui/react";
4
- import { TagSettingsPanel as Ft } from "@pstdio/ui";
5
- import { useState as ot, useEffect as Gt } from "react";
6
- import * as Zt from "lucide-react";
7
- import { useStore as Jt } from "zustand";
8
- import { z as t } from "zod";
9
- const Qt = (n) => n.split(/[^a-zA-Z0-9]+/).filter(Boolean).map((e) => `${e.charAt(0).toUpperCase()}${e.slice(1)}`).join(""), Xt = (n) => {
10
- const e = Qt(n), i = [n, e, `${e}Icon`];
11
- for (const a of i) {
12
- const s = Zt[a];
13
- if (s && (typeof s == "function" || typeof s == "object"))
14
- return s;
15
- }
16
- }, Yt = (n) => {
17
- const e = Z(10);
18
- let i, a, s;
19
- e[0] !== n ? ({
20
- name: i,
21
- size: s,
22
- ...a
23
- } = n, e[0] = n, e[1] = i, e[2] = a, e[3] = s) : (i = e[1], a = e[2], s = e[3]);
24
- const p = s === void 0 ? 14 : s;
25
- if (!i)
26
- return null;
27
- let c;
28
- e[4] !== i ? (c = Xt(i), e[4] = i, e[5] = c) : c = e[5];
29
- const d = c;
30
- if (!d)
31
- return null;
32
- const m = typeof p == "number" ? `${p}px` : p;
33
- let u;
34
- return e[6] !== d || e[7] !== a || e[8] !== m ? (u = /* @__PURE__ */ f(Wt, { as: d, boxSize: m, "aria-hidden": "true", ...a }), e[6] = d, e[7] = a, e[8] = m, e[9] = u) : u = e[9], u;
35
- }, te = (n, e) => Jt(n, e), ee = (n) => ({
36
- id: n.id,
37
- name: n.label,
38
- color: n.color,
39
- icon: n.icon,
40
- sortOrder: n.sortOrder,
41
- isDefault: n.isDefault,
42
- actions: [...n.actions ?? []]
43
- }), ne = (n, e) => [...n ?? []].sort().join("|") === [...e ?? []].sort().join("|"), oe = (n, e) => n.label !== e.name || n.color !== e.color || n.icon !== e.icon || n.isDefault !== e.isDefault || !ne(n.actions, e.actions), ie = (n) => ({
44
- id: n.id,
45
- label: n.name,
46
- color: n.color,
47
- icon: n.icon,
48
- sortOrder: n.sortOrder,
49
- isDefault: n.isDefault,
50
- actions: [...n.actions ?? []]
51
- }), ae = (n) => {
52
- const e = Z(23), {
53
- statusSet: i,
54
- workbench: a
55
- } = n;
56
- let s;
57
- e[0] !== i.id || e[1] !== a.statuses ? (s = () => {
58
- const y = a.statuses.getStatuses(i.id);
59
- return y ? [...y] : void 0;
60
- }, e[0] = i.id, e[1] = a.statuses, e[2] = s) : s = e[2];
61
- const [p, c] = ot(s), [d, m] = ot();
62
- let u;
63
- e[3] !== i.id || e[4] !== a.statuses ? (u = () => {
64
- let y = !0;
65
- const O = a.statuses.getStatuses(i.id);
66
- return c(O ? [...O] : void 0), m(void 0), a.statuses.load(i.id).then((L) => {
67
- y && c([...L]);
68
- }, (L) => {
69
- y && m(L);
70
- }), () => {
71
- y = !1;
72
- };
73
- }, e[3] = i.id, e[4] = a.statuses, e[5] = u) : u = e[5];
74
- let h;
75
- e[6] !== i.id || e[7] !== a ? (h = [i.id, a], e[6] = i.id, e[7] = a, e[8] = h) : h = e[8], Gt(u, h);
76
- let P;
77
- e[9] !== i.id || e[10] !== a.statuses ? (P = async (y) => {
78
- const O = y.drafts.map(ie);
79
- c([...await a.statuses.save(i.id, O)]);
80
- }, e[9] = i.id, e[10] = a.statuses, e[11] = P) : P = e[11];
81
- const N = P, z = !i.save, U = i.save ? void 0 : "This status set is read-only.";
82
- let x;
83
- e[12] !== i.actions ? (x = i.actions?.map(re), e[12] = i.actions, e[13] = x) : x = e[13];
84
- const K = `Unable to update ${i.title}`;
85
- let T;
86
- return e[14] !== d || e[15] !== N || e[16] !== i.title || e[17] !== p || e[18] !== z || e[19] !== U || e[20] !== x || e[21] !== K ? (T = /* @__PURE__ */ f(Ft, { values: p, loadError: d, onSave: N, toEditorValue: ee, valueNeedsUpdate: oe, readOnly: z, title: i.title, description: U, actionOptions: x, actionsLabel: "Commands", framed: !0, showColumnHeaders: !0, valueColumnLabel: "State", showDefault: !0, errorTitle: K, addLabel: "Add state", addName: "New status", resetLabel: "Reset", saveLabel: "Save", deleteHeadline: "Delete status?", deleteNotificationText: se, deleteButtonText: "Delete status" }), e[14] = d, e[15] = N, e[16] = i.title, e[17] = p, e[18] = z, e[19] = U, e[20] = x, e[21] = K, e[22] = T) : T = e[22], T;
87
- }, ni = (n) => {
88
- const e = Z(12), {
89
- workbench: i
90
- } = n;
91
- te(i.statuses.store, le);
92
- let a, s, p, c, d;
93
- if (e[0] !== i) {
94
- const u = i.statuses.listStatusSets();
95
- a = nt, s = "none", p = "full", c = "bg", d = u.map((h) => /* @__PURE__ */ f(nt, { "data-testid": `workflow-status-set-${h.id}`, gap: "none", children: /* @__PURE__ */ f(ae, { workbench: i, statusSet: h }) }, h.id)), e[0] = i, e[1] = a, e[2] = s, e[3] = p, e[4] = c, e[5] = d;
96
- } else
97
- a = e[1], s = e[2], p = e[3], c = e[4], d = e[5];
98
- let m;
99
- return e[6] !== a || e[7] !== s || e[8] !== p || e[9] !== c || e[10] !== d ? (m = /* @__PURE__ */ f(a, { gap: s, minH: p, bg: c, children: d }), e[6] = a, e[7] = s, e[8] = p, e[9] = c, e[10] = d, e[11] = m) : m = e[11], m;
100
- };
101
- function re(n) {
102
- return {
103
- value: n.id,
104
- label: n.label,
105
- icon: n.icon ? /* @__PURE__ */ f(Yt, { name: n.icon, size: 13 }) : void 0
106
- };
107
- }
108
- function se(n) {
109
- return `This will delete the "${n.name}" status.`;
110
- }
111
- function le(n) {
112
- return n.statusSets;
113
- }
114
- const ut = t.string(), ce = t.enum(["user", "agent", "system"]), de = t.enum(["ui", "api", "hook", "system", "agent"]), pe = t.object({
115
- id: t.string(),
116
- project_id: t.string(),
117
- resource_type: ut,
118
- resource_id: t.string(),
119
- source_extension_id: t.string().nullable(),
120
- event_type: t.string(),
121
- actor_type: ce,
122
- actor_id: t.string().nullable(),
123
- source: de,
124
- summary: t.string(),
125
- payload_json: t.record(t.string(), t.unknown()),
126
- created_at: t.string()
127
- }), ge = t.object({
128
- event_type: t.string().optional(),
129
- from: t.string().optional(),
130
- to: t.string().optional(),
131
- cursor: t.string().optional(),
132
- limit: t.coerce.number().int().optional()
133
- });
134
- ge.extend({
135
- resource_type: ut.optional()
136
- });
137
- t.object({
138
- events: t.array(pe),
139
- next_cursor: t.string().nullable()
140
- });
141
- const me = t.enum(["INSTALLED", "NOT_FOUND"]), ue = t.object({
142
- dir: t.string(),
143
- global_dir: t.string()
144
- }), it = t.union([t.string(), t.object({
145
- $l10n: t.string(),
146
- default: t.string().optional()
147
- })]), bt = t.object({
148
- label: it.optional(),
149
- description: it.optional(),
150
- required: t.boolean().optional(),
151
- metadata: t.record(t.string(), t.unknown()).optional()
152
- }), be = t.object({
153
- label: t.string(),
154
- value: t.string(),
155
- icon: t.string().optional()
156
- }), he = bt.extend({
157
- type: t.literal("select"),
158
- defaultValue: t.string().optional(),
159
- options: t.array(be)
160
- }), ye = bt.extend({
161
- type: t.literal("boolean"),
162
- defaultValue: t.boolean().optional()
163
- }), ht = t.union([he, ye]), je = t.record(t.string(), ht);
164
- t.object({
165
- id: t.string(),
166
- name: t.string(),
167
- availability: t.object({
168
- type: me
169
- }),
170
- /** Present when the harness declares skill directories. */
171
- skills: ue.optional(),
172
- /** Present when the harness declares discrete run params. */
173
- params: je.optional()
174
- });
175
- t.object({
176
- id: t.string(),
177
- label: t.string().optional(),
178
- description: t.string().optional(),
179
- isDefault: t.boolean().optional(),
180
- paramOverrides: t.record(t.string(), ht.nullable()).optional()
181
- });
182
- const r = t.record(t.string(), t.unknown()), yt = t.record(t.string(), t.json()).meta({
183
- type: "object",
184
- additionalProperties: !0
185
- }), Se = t.object({
186
- $l10n: t.string(),
187
- default: t.string().optional()
188
- }), o = t.union([t.string(), Se]), xe = t.enum(["global", "project"]), fe = t.enum(["boolean", "number", "string", "array", "object"]), ke = t.enum(["stored", "default"]), ve = t.enum(["info", "warning", "error"]), jt = t.object({
189
- code: t.string(),
190
- severity: ve,
191
- message: t.string(),
192
- extensionId: t.string().optional(),
193
- commandId: t.string().optional(),
194
- sourcePath: t.string().optional(),
195
- metadata: r.optional()
196
- }), we = t.object({
197
- id: t.string(),
198
- name: t.string(),
199
- displayName: t.string(),
200
- extensionInstanceId: t.string().optional(),
201
- installedExtensionId: t.string().optional(),
202
- installName: t.string().optional(),
203
- version: t.string().optional(),
204
- description: t.string().optional(),
205
- sourcePath: t.string()
206
- }), V = t.object({
207
- kind: t.literal("package-asset"),
208
- path: t.string(),
209
- baseUrl: t.string()
210
- }), St = t.enum(["first", "default", "last"]), Ie = t.enum(["menu", "panel", "settings", "renderer", "kanbanRenderer", "dataTableRenderer"]), J = t.enum(["cli", "dashboard", "api", "schedule", "event", "automation", "command-panel"]), Q = t.object({
211
- mode: t.union([t.string(), t.array(t.string())]).optional(),
212
- source: t.array(J).optional(),
213
- viewId: t.union([t.string(), t.array(t.string())]).optional(),
214
- resourceType: t.array(t.string()).optional(),
215
- metadata: r.optional()
216
- }), xt = t.object({
217
- entry: V,
218
- title: o.optional(),
219
- /** Host capabilities the webview is allowed to invoke through the bridge. */
220
- capabilities: t.array(t.string()).optional()
221
- }), ft = xt.extend({
222
- /** API-served URL of the bridge runtime HTML the dashboard mounts in the iframe. */
223
- runtimeUrl: t.string(),
224
- /** API-served URL of the bundled extension module the bridge runtime dynamically imports. */
225
- moduleUrl: t.string(),
226
- /** API-served URLs of CSS files the bridge runtime should inject before mounting the module. */
227
- styles: t.array(t.string()).optional()
228
- }), kt = t.object({
229
- id: t.string(),
230
- extensionId: t.string(),
231
- title: o,
232
- description: o.optional(),
233
- format: t.literal("vscode-color-theme"),
234
- mode: t.enum(["light", "dark"]),
235
- source: V,
236
- tokens: t.record(t.string(), t.string()),
237
- monacoTheme: t.object({
238
- base: t.enum(["vs", "vs-dark"]),
239
- inherit: t.literal(!0),
240
- rules: t.array(t.record(t.string(), t.unknown())),
241
- colors: t.record(t.string(), t.string())
242
- })
243
- }), vt = t.object({
244
- id: t.string(),
245
- extensionId: t.string(),
246
- title: o,
247
- description: o.optional(),
248
- format: t.literal("vscode-file-icon-theme"),
249
- source: V,
250
- definitions: r,
251
- fileExtensions: t.record(t.string(), t.string()),
252
- fileNames: t.record(t.string(), t.string()),
253
- defaults: t.object({
254
- file: t.string().optional(),
255
- folder: t.string().optional()
256
- }).default({}),
257
- fonts: t.array(t.object({
258
- fontFamily: t.string(),
259
- src: t.array(t.object({
260
- url: t.string(),
261
- format: t.string().optional()
262
- })),
263
- weight: t.string().optional(),
264
- style: t.string().optional()
265
- })).default([])
266
- }), wt = t.object({
267
- extensionId: t.string(),
268
- defaultLocale: t.string(),
269
- bundles: t.record(t.string(), t.record(t.string(), t.string()))
270
- }), _e = t.object({
271
- id: t.string(),
272
- extensionId: t.string(),
273
- relativePath: t.string(),
274
- fullPath: t.string(),
275
- label: o
276
- }), Re = ["workbench.nav.actions", "workbench.nav.overflow"], Pe = ["workbench.left.tree", "workbench.main.left.tree", "workbench.main.right.tree"], Te = ["nav", "activity", "sidenav", "main-header", "main", "secondary-header", "secondary", "side-header", "side", "status", "overlay"], Oe = ["workbench.main", "workbench.main.left", "workbench.main.right", "workbench.secondary"], Ae = ["workbench.settings"], Ee = ["project", "global"], Ce = ["workbench.left", "workbench.main.left", "workbench.main", "workbench.main.right", "workbench.secondary"], It = t.enum(Re), He = t.enum(Pe);
277
- t.enum(Te);
278
- const Ve = t.enum(Oe), _t = t.enum(Ae);
279
- t.enum(Ce);
280
- const De = t.union([It, He, Ve, _t]), Rt = t.enum(Ee), Ne = t.object({
281
- id: t.string(),
282
- extensionId: t.string(),
283
- title: o,
284
- description: o.optional(),
285
- cliPath: t.string().optional(),
286
- cliAliases: t.array(t.string()).optional(),
287
- examples: t.array(t.string()).optional(),
288
- automation: t.boolean().optional(),
289
- mutating: t.boolean().optional(),
290
- params: t.record(t.string(), t.object({
291
- type: t.string()
292
- }).catchall(t.unknown())).optional()
293
- }), ze = t.record(t.string(), t.object({
294
- type: t.string()
295
- }).catchall(t.unknown())), Ue = t.object({
296
- id: t.string(),
297
- extensionId: t.string(),
298
- commandId: t.string()
299
- }), Ke = t.object({
300
- id: t.string(),
301
- extensionId: t.string(),
302
- eventId: t.string()
303
- }), Le = t.object({
304
- id: t.string(),
305
- extensionId: t.string(),
306
- cron: t.string(),
307
- commandId: t.string()
308
- }), Me = t.object({
309
- id: t.string(),
310
- localId: t.string(),
311
- extensionId: t.string(),
312
- extensionInstanceId: t.string().optional(),
313
- title: o,
314
- cron: t.string(),
315
- commandId: t.string(),
316
- enabled: t.boolean()
317
- }), $e = t.object({
318
- id: t.string(),
319
- extensionId: t.string(),
320
- commandId: t.string(),
321
- slotId: t.string(),
322
- target: It.optional(),
323
- label: o,
324
- group: t.string().optional(),
325
- placement: St.optional(),
326
- icon: t.string().optional(),
327
- presentation: t.enum(["menu-item", "button", "icon-button"]).optional(),
328
- params: r.optional(),
329
- when: Q.optional()
330
- }), Be = t.object({
331
- id: t.string(),
332
- extensionId: t.string(),
333
- commandId: t.string(),
334
- label: o,
335
- group: t.string().optional(),
336
- placement: St.optional(),
337
- icon: t.string().optional(),
338
- params: r.optional(),
339
- when: Q.optional()
340
- }), qe = t.object({
341
- version: t.number().int().positive(),
342
- since: t.string().optional()
343
- }), We = t.object({
344
- host: t.literal("dashboard"),
345
- hostVersion: t.string(),
346
- capabilities: t.record(t.string(), qe)
347
- }), Fe = t.object({
348
- status: t.enum(["verified", "unverified"]),
349
- host: We.optional(),
350
- diagnostics: t.array(jt)
351
- }), Ge = ["sidenav", "main", "secondary", "side"], W = ["main", "secondary", "side"], Ze = t.object({
352
- id: t.string(),
353
- localId: t.string(),
354
- extensionId: t.string(),
355
- label: o,
356
- authType: t.enum(["bearer", "header"]),
357
- supportsCheck: t.boolean()
358
- }), Je = t.object({
359
- id: t.string(),
360
- extensionId: t.string(),
361
- connectionId: t.string(),
362
- baseUrl: t.string(),
363
- authType: t.enum(["bearer", "header"]),
364
- configured: t.boolean(),
365
- lastCheck: t.object({
366
- ok: t.boolean(),
367
- status: t.number().int().nullable(),
368
- error: t.string().nullable(),
369
- checkedAt: t.string()
370
- }).nullable(),
371
- updatedAt: t.string()
372
- });
373
- t.object({
374
- baseUrl: t.url(),
375
- secret: t.string().optional()
376
- });
377
- t.object({
378
- connections: t.array(Je)
379
- });
380
- const Qe = (n) => {
381
- if (typeof n != "string") return !1;
382
- try {
383
- const {
384
- protocol: e
385
- } = new URL(n);
386
- return e === "https:" || e === "http:";
387
- } catch {
388
- return !1;
389
- }
390
- }, b = t.object({
391
- shorthand: t.string().optional(),
392
- type: t.string(),
393
- id: t.string(),
394
- projectId: t.string().optional(),
395
- label: t.string().optional(),
396
- icon: t.string().optional(),
397
- extensionId: t.string().optional(),
398
- metadata: yt.optional()
399
- }), I = (n) => t.object({
400
- extensionId: t.string(),
401
- kind: t.literal(n),
402
- id: t.string()
403
- }), X = I("page"), Xe = I("placement"), Ye = I("mode"), A = I("view"), tn = I("resource-kind"), en = t.object({
404
- kind: t.literal("page-slot"),
405
- page: X,
406
- id: t.string()
407
- }), nn = t.union([Xe, en]), on = t.object({
408
- command: I("command"),
409
- params: yt.optional()
410
- }), an = t.object({
411
- anchors: t.array(t.object({
412
- id: t.string(),
413
- heading: t.string(),
414
- occurrence: t.number().int().nonnegative().optional()
415
- }))
416
- }), Pt = t.lazy(() => t.object({
417
- kind: t.literal("page"),
418
- page: X,
419
- resource: b.optional(),
420
- open: t.enum(["preview", "pin"]).optional(),
421
- section: an.optional(),
422
- parent: Pt.optional()
423
- })).meta({
424
- id: "WorkbenchMetadataPageTarget"
425
- }), at = t.union([Pt, t.object({
426
- kind: t.literal("panel"),
427
- panel: nn,
428
- resource: b.optional(),
429
- open: t.enum(["preview", "pin"]).optional()
430
- })]), D = t.union([at, t.object({
431
- kind: t.literal("command"),
432
- target: on
433
- }), t.object({
434
- kind: t.literal("href"),
435
- href: t.string().refine(Qe, "Expected an HTTP or HTTPS URL")
436
- }), t.object({
437
- kind: t.literal("compound"),
438
- targets: t.array(at).min(1)
439
- })]), Tt = t.object({
440
- projectId: t.string(),
441
- repoId: t.string(),
442
- path: t.string(),
443
- remote: t.string().nullable().optional(),
444
- role: t.enum(["default", "selected", "workspace"]).optional()
445
- }), Ot = t.object({
446
- id: t.string(),
447
- kind: Ie,
448
- context: r
449
- }), At = t.object({
450
- target: De,
451
- mode: t.string().optional(),
452
- projectId: t.string().optional(),
453
- resource: b.optional()
454
- });
455
- t.object({
456
- rendererId: t.string(),
457
- projectId: t.string().optional(),
458
- modeId: t.string().optional(),
459
- resource: b.optional(),
460
- invocation: t.object({
461
- placement: t.enum(["visible", "background"])
462
- }).optional()
463
- });
464
- t.object({
465
- projectId: t.string().min(1),
466
- workspaceId: t.string().optional(),
467
- params: r.optional(),
468
- resource: b.optional(),
469
- attachment: At.optional(),
470
- slot: Ot.optional(),
471
- repo: Tt.optional(),
472
- source: J.optional(),
473
- metadata: r.optional()
474
- });
475
- t.object({
476
- workspaceId: t.string().optional(),
477
- params: r.optional(),
478
- resource: b.optional(),
479
- attachment: At.optional(),
480
- slot: Ot.optional(),
481
- repo: Tt.optional(),
482
- source: J.optional(),
483
- metadata: r.optional()
484
- });
485
- t.object({
486
- eventId: t.string().min(1),
487
- payload: r
488
- }).strict();
489
- const rn = t.object({
490
- name: t.string().optional(),
491
- message: t.string(),
492
- stack: t.string().optional()
493
- }), sn = t.object({
494
- type: t.enum(["info", "success", "warning", "error"]),
495
- title: t.string().optional(),
496
- message: t.string(),
497
- metadata: r.optional()
498
- }), ln = t.object({
499
- code: t.string(),
500
- message: t.string(),
501
- severity: t.enum(["info", "warning", "error"]),
502
- extensionId: t.string().optional(),
503
- commandId: t.string().optional(),
504
- metadata: r.optional()
505
- }), cn = D, dn = t.object({
506
- ok: t.boolean(),
507
- status: t.enum(["success", "rejected", "error"]),
508
- value: t.unknown().optional(),
509
- navigationRequests: t.array(cn).optional(),
510
- code: t.string().optional(),
511
- reason: t.string().optional(),
512
- data: r.optional(),
513
- error: rn.optional(),
514
- notices: t.array(sn).optional(),
515
- diagnostics: t.array(ln).optional()
516
- });
517
- t.object({
518
- commandId: t.string(),
519
- extensionId: t.string(),
520
- eventIds: t.array(t.string()).optional(),
521
- outcome: dn
522
- });
523
- const g = {
524
- id: t.string(),
525
- name: t.string(),
526
- description: t.string().optional(),
527
- readOnly: t.boolean().optional()
528
- }, M = {
529
- min: t.number().optional(),
530
- max: t.number().optional(),
531
- step: t.number().optional()
532
- }, Et = t.strictObject({
533
- x: t.number(),
534
- y: t.number()
535
- }), Ct = t.tuple([t.number(), t.number()]), rt = t.union([t.string(), t.array(t.string())]), st = t.strictObject({
536
- id: t.string(),
537
- name: t.string(),
538
- icon: t.string().optional(),
539
- color: t.string().optional(),
540
- description: t.string().optional(),
541
- disabled: t.boolean().optional()
542
- }), lt = {
543
- placeholder: t.string().optional(),
544
- searchable: t.boolean().optional(),
545
- searchPlaceholder: t.string().optional(),
546
- emptyText: t.string().optional(),
547
- disabled: t.boolean().optional()
548
- }, ct = t.strictObject({
549
- src: t.string(),
550
- alt: t.string()
551
- }), F = t.union([t.string(), t.number(), t.boolean(), t.null()]), pn = t.union([F, t.array(F), ct.extend({
552
- type: t.literal("image")
553
- }), t.strictObject({
554
- type: t.literal("image-gallery"),
555
- images: t.array(ct)
556
- })]), gn = t.union([F, t.array(t.string()), Ct, Et]), Ht = t.record(t.string(), gn), Vt = t.discriminatedUnion("type", [t.strictObject({
557
- ...g,
558
- ...M,
559
- type: t.literal("number"),
560
- defaultValue: t.number()
561
- }), t.strictObject({
562
- ...g,
563
- type: t.literal("boolean"),
564
- defaultValue: t.boolean()
565
- }), t.strictObject({
566
- ...g,
567
- type: t.literal("text"),
568
- defaultValue: t.string(),
569
- singleLine: t.boolean().optional()
570
- }), t.strictObject({
571
- ...g,
572
- type: t.literal("markdown"),
573
- defaultValue: t.string(),
574
- placeholder: t.string().optional()
575
- }), t.strictObject({
576
- ...g,
577
- ...lt,
578
- type: t.literal("selection"),
579
- defaultValue: rt,
580
- options: t.array(st),
581
- multiSelect: t.boolean().optional(),
582
- clearable: t.boolean().optional(),
583
- group: t.strictObject({
584
- id: t.string(),
585
- name: t.string(),
586
- defaultValue: t.string(),
587
- options: t.array(st),
588
- ...lt
589
- }).optional()
590
- }), t.strictObject({
591
- ...g,
592
- type: t.literal("date"),
593
- defaultValue: t.string(),
594
- min: t.string().optional(),
595
- max: t.string().optional()
596
- }), t.strictObject({
597
- ...g,
598
- type: t.literal("color"),
599
- defaultValue: t.string()
600
- }), t.strictObject({
601
- ...g,
602
- type: t.literal("readOnly"),
603
- value: pn
604
- }), t.strictObject({
605
- ...g,
606
- type: t.literal("resource"),
607
- defaultValue: rt,
608
- options: t.array(t.strictObject({
609
- id: t.string(),
610
- name: t.string(),
611
- icon: t.string().optional(),
612
- color: t.string().optional(),
613
- description: t.string().optional(),
614
- href: t.string().optional(),
615
- ref: b.optional(),
616
- copyText: t.string().optional()
617
- })),
618
- multiSelect: t.boolean().optional(),
619
- editable: t.boolean().optional(),
620
- placeholder: t.string().optional(),
621
- emptyText: t.string().optional()
622
- }), t.strictObject({
623
- ...g,
624
- ...M,
625
- type: t.literal("range"),
626
- defaultValue: Ct,
627
- min: t.number(),
628
- max: t.number(),
629
- unit: t.string().optional(),
630
- markerCount: t.number().optional()
631
- }), t.strictObject({
632
- ...g,
633
- type: t.literal("segmented"),
634
- defaultValue: t.string(),
635
- variant: t.enum(["default", "dots"]).optional(),
636
- options: t.array(t.strictObject({
637
- id: t.string(),
638
- name: t.string(),
639
- icon: t.string().optional(),
640
- indicatorColor: t.string().optional()
641
- }))
642
- }), t.strictObject({
643
- ...g,
644
- type: t.literal("actions"),
645
- defaultValue: t.string().optional(),
646
- options: t.array(t.strictObject({
647
- id: t.string(),
648
- name: t.string(),
649
- icon: t.string().optional(),
650
- disabled: t.boolean().optional()
651
- }))
652
- }), t.strictObject({
653
- ...g,
654
- type: t.literal("anchorGrid"),
655
- defaultValue: t.enum(["top-left", "top", "top-right", "left", "center", "right", "bottom-left", "bottom", "bottom-right"])
656
- }), t.strictObject({
657
- ...g,
658
- ...M,
659
- type: t.literal("vector"),
660
- defaultValue: Et,
661
- coordinateMode: t.enum(["cartesian", "screen"]).optional(),
662
- xLabel: t.string().optional(),
663
- yLabel: t.string().optional()
664
- })]), mn = t.strictObject({
665
- id: t.string(),
666
- title: t.string(),
667
- description: t.string().optional(),
668
- params: t.array(Vt),
669
- collapsible: t.boolean().optional(),
670
- defaultCollapsed: t.boolean().optional()
671
- }), oi = t.strictObject({
672
- params: t.array(Vt).optional(),
673
- groups: t.array(mn).optional(),
674
- values: Ht.optional(),
675
- readOnly: t.boolean().optional()
676
- }), _ = t.object({
677
- id: t.string(),
678
- extensionId: t.string(),
679
- title: o,
680
- icon: t.string().optional(),
681
- resourceKind: t.string().optional(),
682
- refreshEventIds: t.array(t.string().min(1)).optional(),
683
- emptyTitle: o.optional(),
684
- emptyDescription: o.optional()
685
- }), un = _.extend({
686
- searchable: t.boolean().optional(),
687
- searchPlaceholder: o.optional(),
688
- headerHandlerId: t.string().optional(),
689
- bodyHandlerId: t.string(),
690
- childrenHandlerId: t.string().optional(),
691
- footerHandlerId: t.string().optional(),
692
- defaultExpandedSectionIds: t.array(t.string()).optional(),
693
- defaultExpandedNodeIds: t.array(t.string()).optional()
694
- }), bn = _.extend({
695
- loadHandlerId: t.string(),
696
- saveHandlerId: t.string().optional()
697
- }), hn = _.extend({
698
- queryHandlerId: t.string(),
699
- valueChangeHandlerId: t.string().optional(),
700
- applyHandlerId: t.string().optional(),
701
- resetHandlerId: t.string().optional(),
702
- defaultValues: Ht.optional()
703
- }), dt = t.object({
704
- light: t.string(),
705
- dark: t.string(),
706
- foreground: t.object({
707
- light: t.string(),
708
- dark: t.string()
709
- }).optional()
710
- }), yn = t.discriminatedUnion("type", [t.object({
711
- type: t.literal("unique")
712
- }), t.object({
713
- type: t.literal("histogram"),
714
- bins: t.number().int().positive().optional()
715
- }), t.object({
716
- type: t.literal("top-values"),
717
- limit: t.number().int().positive().optional()
718
- })]), jn = t.discriminatedUnion("type", [t.object({
719
- type: t.literal("json")
720
- }), t.object({
721
- type: t.literal("color-scale"),
722
- stops: t.array(t.object({
723
- value: t.number(),
724
- color: dt
725
- }))
726
- }), t.object({
727
- type: t.literal("categorical-color"),
728
- categories: t.array(t.object({
729
- value: t.union([t.string(), t.number(), t.boolean(), t.null()]),
730
- color: dt
731
- }))
732
- })]), Sn = t.object({
733
- id: t.string(),
734
- label: o.optional(),
735
- description: o.optional(),
736
- icon: t.string().optional(),
737
- hidden: t.boolean().optional(),
738
- stat: yn.optional(),
739
- renderer: jn.optional()
740
- }), xn = t.object({
741
- id: t.string(),
742
- label: o,
743
- icon: t.string().optional(),
744
- destructive: t.boolean().optional(),
745
- commandId: t.string()
746
- }), fn = t.object({
747
- id: t.string(),
748
- label: o,
749
- icon: t.string().optional(),
750
- destructive: t.boolean().optional(),
751
- commandId: t.string()
752
- }), kn = _.extend({
753
- columns: t.array(Sn).optional(),
754
- queryHandlerId: t.string(),
755
- selectionMode: t.enum(["none", "multiple"]).optional(),
756
- selectionActions: t.array(fn).optional(),
757
- rowActions: t.array(xn).optional(),
758
- rowActivationHandlerId: t.string().optional(),
759
- initialPageSize: t.number().int().positive().optional(),
760
- pageSizeOptions: t.array(t.number().int().positive()).optional()
761
- }), pt = t.object({
762
- value: t.string(),
763
- label: o,
764
- color: t.string().optional(),
765
- icon: t.string().nullable().optional()
766
- }), vn = t.discriminatedUnion("kind", [t.object({
767
- kind: t.literal("enum"),
768
- options: t.array(pt)
769
- }), t.object({
770
- kind: t.literal("enum-multi"),
771
- options: t.array(pt)
772
- }), t.object({
773
- kind: t.literal("status"),
774
- statuses: t.object({
775
- extensionId: t.string().optional(),
776
- kind: t.literal("status"),
777
- id: t.string()
778
- })
779
- }), t.object({
780
- kind: t.literal("string")
781
- }), t.object({
782
- kind: t.literal("date")
783
- }), t.object({
784
- kind: t.literal("number")
785
- }), t.object({
786
- kind: t.literal("user")
787
- })]), wn = t.union([t.object({
788
- kind: t.literal("badge-list"),
789
- itemsAttributeId: t.string()
790
- }), t.object({
791
- kind: t.string()
792
- }).passthrough().refine((n) => n.kind !== "badge-list")]), In = t.object({
793
- id: t.string(),
794
- label: o,
795
- type: vn,
796
- filterable: t.boolean().optional(),
797
- groupable: t.boolean().optional(),
798
- sortable: t.boolean().optional(),
799
- displayable: t.boolean().optional(),
800
- editable: t.boolean().optional(),
801
- display: wn.optional()
802
- }), Dt = t.object({
803
- viewMode: t.enum(["board", "list"]),
804
- columnGrouping: t.string(),
805
- rowGrouping: t.string(),
806
- ordering: t.object({
807
- attributeId: t.string(),
808
- direction: t.enum(["asc", "desc"])
809
- }),
810
- displayProperties: t.array(t.string())
811
- }), _n = t.object({
812
- id: t.string(),
813
- title: o,
814
- settings: Dt,
815
- filters: t.record(t.string(), t.array(t.string())),
816
- isDefault: t.boolean().optional()
817
- }), Rn = t.object({
818
- commandId: t.string(),
819
- title: o.optional(),
820
- submitLabel: o.optional(),
821
- columnParam: t.string().optional(),
822
- params: ze.optional(),
823
- attributesParam: t.string().optional(),
824
- attachments: t.object({
825
- commandId: t.string(),
826
- resourceParam: t.string(),
827
- fileParam: t.string()
828
- }).optional(),
829
- labels: t.object({
830
- cancel: o.optional(),
831
- properties: o.optional(),
832
- submitError: o.optional(),
833
- removeFile: o.optional()
834
- }).optional()
835
- }), Pn = t.object({
836
- id: t.string(),
837
- label: o,
838
- icon: t.string().optional(),
839
- commandId: t.string(),
840
- destructive: t.boolean().optional()
841
- }), Tn = _.extend({
842
- extensionInstanceId: t.string().optional(),
843
- attributes: t.array(In).optional(),
844
- queryHandlerId: t.string(),
845
- attributeChangeHandlerId: t.string().optional(),
846
- reorderHandlerId: t.string().optional(),
847
- columnActionHandlerId: t.string().optional(),
848
- createRow: Rn.optional(),
849
- rowActions: t.array(Pn).optional(),
850
- rowActivationHandlerId: t.string().optional(),
851
- defaultSettings: Dt.partial().optional(),
852
- defaultFilters: t.record(t.string(), t.array(t.string())).optional(),
853
- defaultViews: t.array(_n).optional(),
854
- defaultActiveViewId: t.string().optional(),
855
- hideToolbar: t.boolean().optional()
856
- }), On = t.object({
857
- id: t.string(),
858
- extensionId: t.string(),
859
- title: o,
860
- resourceKind: t.string().optional(),
861
- queryHandlerId: t.string(),
862
- refreshEventIds: t.array(t.string().min(1)).optional()
863
- }), An = t.object({
864
- key: t.string(),
865
- ctrl: t.boolean(),
866
- shift: t.boolean(),
867
- alt: t.boolean(),
868
- meta: t.boolean(),
869
- modifiers: t.array(t.string())
870
- }), En = t.object({
871
- id: t.string(),
872
- extensionId: t.string(),
873
- action: D,
874
- /** Original chord string as authored, e.g. "mod+shift+p". */
875
- key: t.string(),
876
- /**
877
- * Platform-independent canonical chord string produced by TanStack's
878
- * `normalizeHotkey(input, "mac")`. Inputs like `cmd+P` and `mod+P`
879
- * collapse to the same value so they can be deduped at extension-check
880
- * time, matching what would happen at dispatch on macOS.
881
- */
882
- canonicalChord: t.string(),
883
- /** Result of TanStack's `parseHotkey(key, "mac")`. */
884
- parsed: An,
885
- platformOverrides: t.object({
886
- mac: t.string().optional(),
887
- linux: t.string().optional(),
888
- win: t.string().optional()
889
- }).optional(),
890
- when: Q.optional()
891
- }), Y = t.object({
892
- mountStrategy: t.enum(["active", "keep-mounted"]).optional(),
893
- hiddenByDefault: t.boolean().optional(),
894
- headerBorderBottom: t.boolean().optional(),
895
- tab: t.object({
896
- queryHandlerId: t.string(),
897
- refreshEventIds: t.array(t.string()).optional()
898
- }).optional()
899
- }), Cn = t.enum(["fixed", "open", "closed"]), Hn = t.object({
900
- defaultPx: t.number().optional(),
901
- minPx: t.number().optional(),
902
- maxPx: t.number().optional()
903
- }), Vn = t.object({
904
- showHeader: t.boolean().optional(),
905
- size: Hn.optional(),
906
- collapsible: t.boolean().optional(),
907
- alwaysShowTabs: t.boolean().optional()
908
- }), Nt = t.object({
909
- kinds: t.array(tn).min(1)
910
- }).strict(), Dn = Nt.extend({
911
- view: A,
912
- cardinality: t.enum(["one", "many"]),
913
- add: D.optional()
914
- }), zt = t.discriminatedUnion("kind", [t.object({
915
- kind: t.literal("view"),
916
- view: A,
917
- presence: Cn
918
- }).strict(), t.object({
919
- kind: t.literal("binding"),
920
- binding: Dn
921
- }).strict()]), Nn = t.discriminatedUnion("kind", [Y.extend({
922
- kind: t.literal("view"),
923
- view: A,
924
- cardinality: t.enum(["one", "many"])
925
- }).strict(), t.object({
926
- kind: t.literal("panels"),
927
- empty: A
928
- }).strict()]), zn = Y.extend({
929
- id: t.string(),
930
- region: t.enum(["main", "secondary", "side"]),
931
- order: t.number().optional(),
932
- item: zt,
933
- openOn: t.literal("page-resource").optional()
934
- }).strict(), Un = t.object({
935
- id: t.string(),
936
- localId: t.string(),
937
- extensionId: t.string(),
938
- title: o,
939
- icon: t.string().optional(),
940
- path: t.string(),
941
- mode: Ye,
942
- parent: X.optional(),
943
- resource: Nt.optional(),
944
- main: Nn,
945
- slots: t.array(zn)
946
- }), Kn = t.object({
947
- id: t.string(),
948
- extensionId: t.string(),
949
- extensionInstanceId: t.string().optional(),
950
- installedExtensionId: t.string().optional(),
951
- installName: t.string().optional(),
952
- slotId: t.string(),
953
- target: _t.optional(),
954
- scope: Rt.optional(),
955
- title: o,
956
- icon: t.string().optional(),
957
- section: t.string().optional(),
958
- webview: xt
959
- }), Ut = t.object({
960
- key: t.string(),
961
- extensionId: t.string(),
962
- type: fe,
963
- scope: xe,
964
- default: t.unknown().optional(),
965
- enum: t.array(t.unknown()).optional(),
966
- title: o.optional(),
967
- description: o.optional()
968
- }), Ln = Ut.extend({
969
- value: t.unknown().optional(),
970
- source: ke
971
- });
972
- t.object({
973
- settings: t.array(Ln)
974
- });
975
- t.object({
976
- value: t.unknown()
977
- });
978
- Kn.extend({
979
- webview: ft
980
- });
981
- const Mn = t.object({
982
- id: t.string(),
983
- extensionId: t.string(),
984
- title: o,
985
- scope: Rt.optional(),
986
- order: t.number().optional()
987
- }), S = (n) => t.object({
988
- extensionId: t.string(),
989
- kind: t.literal(n),
990
- id: t.string()
991
- }), E = S("command"), k = S("mode"), Kt = S("page"), Lt = S("resource-kind"), $n = S("settings-section");
992
- S("status");
993
- const j = S("view"), Mt = t.object({
994
- mode: t.union([k, t.array(k)]).optional(),
995
- source: t.array(t.enum(["cli", "dashboard", "api", "schedule", "event", "automation", "command-panel"])).optional(),
996
- view: t.union([j, t.array(j)]).optional(),
997
- resourceType: t.array(Lt).optional(),
998
- metadata: r.optional()
999
- }), R = {
1000
- id: !0,
1001
- extensionId: !0,
1002
- title: !0,
1003
- icon: !0,
1004
- resourceKind: !0
1005
- }, G = t.object({
1006
- id: t.string(),
1007
- label: o,
1008
- icon: t.string().optional(),
1009
- destructive: t.boolean().optional(),
1010
- command: E
1011
- }), Bn = t.object({
1012
- command: E,
1013
- title: o.optional(),
1014
- submitLabel: o.optional(),
1015
- columnParam: t.string().optional(),
1016
- params: t.record(t.string(), t.unknown()).optional(),
1017
- attributesParam: t.string().optional(),
1018
- attachments: t.object({
1019
- command: E,
1020
- resourceParam: t.string(),
1021
- fileParam: t.string()
1022
- }).optional(),
1023
- labels: t.object({
1024
- cancel: o.optional(),
1025
- properties: o.optional(),
1026
- submitError: o.optional(),
1027
- removeFile: o.optional()
1028
- }).optional()
1029
- }), qn = t.object({
1030
- kind: t.literal("webview"),
1031
- webview: ft
1032
- }), Wn = un.omit(R).extend({
1033
- kind: t.literal("tree")
1034
- }), Fn = bn.omit(R).extend({
1035
- kind: t.literal("file")
1036
- }), Gn = hn.omit(R).extend({
1037
- kind: t.literal("controls")
1038
- }), Zn = Tn.omit({
1039
- ...R,
1040
- createRow: !0,
1041
- rowActions: !0
1042
- }).extend({
1043
- kind: t.literal("kanban"),
1044
- createRow: Bn.optional(),
1045
- rowActions: t.array(G).optional()
1046
- }), Jn = kn.omit({
1047
- ...R,
1048
- selectionActions: !0,
1049
- rowActions: !0
1050
- }).extend({
1051
- kind: t.literal("dataTable"),
1052
- selectionActions: t.array(G).optional(),
1053
- rowActions: t.array(G).optional()
1054
- }), Qn = t.discriminatedUnion("kind", [qn, Wn, Fn, Gn, Zn, Jn]), Xn = t.object({
1055
- id: t.string(),
1056
- localId: t.string(),
1057
- extensionId: t.string(),
1058
- title: o,
1059
- icon: t.string().optional(),
1060
- body: Qn
1061
- }), Yn = t.object({
1062
- id: t.string(),
1063
- localId: t.string(),
1064
- extensionId: t.string(),
1065
- label: o,
1066
- icon: t.string().optional(),
1067
- regions: t.array(t.enum(W)),
1068
- floatingPanels: t.enum(["visible", "hidden"]).optional(),
1069
- regionSettings: t.partialRecord(t.enum(Ge), Vn).optional(),
1070
- defaultTheme: S("theme").optional(),
1071
- chrome: t.partialRecord(t.enum(["nav", "sidenav", "activity", "status"]), t.union([j, t.literal(!1)])).optional()
1072
- }), to = Y.extend({
1073
- id: t.string(),
1074
- localId: t.string(),
1075
- extensionId: t.string(),
1076
- mode: k,
1077
- item: zt,
1078
- region: t.enum(W),
1079
- order: t.number().optional(),
1080
- movableTo: t.array(t.enum(W)).optional()
1081
- }), eo = t.object({
1082
- id: t.string(),
1083
- extensionId: t.string(),
1084
- owner: j,
1085
- view: j,
1086
- side: t.enum(["left", "right"]),
1087
- group: t.string().optional(),
1088
- placement: t.enum(["first", "default", "last"]).optional(),
1089
- hostTreeHeader: t.enum(["default", "none"]).optional(),
1090
- hostTreeFooter: t.enum(["default", "none"]).optional()
1091
- }), no = t.object({
1092
- id: t.string(),
1093
- extensionId: t.string(),
1094
- owner: t.union([k, Kt]),
1095
- slot: t.enum(["header", "content", "footer"]),
1096
- label: o,
1097
- icon: t.string().optional(),
1098
- group: t.string().optional(),
1099
- when: Mt.optional(),
1100
- action: D
1101
- }), oo = t.object({
1102
- id: t.string(),
1103
- extensionId: t.string(),
1104
- owner: t.union([k, Kt]),
1105
- slot: t.enum(["header", "content", "footer"]),
1106
- view: j
1107
- }), io = t.object({
1108
- id: t.string(),
1109
- localId: t.string(),
1110
- extensionId: t.string(),
1111
- label: o.optional(),
1112
- icon: t.string().optional(),
1113
- menuSlots: t.array(t.object({
1114
- id: t.string(),
1115
- placement: t.enum(["header-primary", "header-overflow", "context-menu"]),
1116
- label: o.optional(),
1117
- access: t.enum(["owner", "public"]),
1118
- order: t.number().optional()
1119
- })).optional()
1120
- }), ao = t.object({
1121
- id: t.string(),
1122
- extensionId: t.string(),
1123
- view: j,
1124
- slot: t.object({
1125
- id: t.string()
1126
- }),
1127
- section: $n.optional()
1128
- }), ro = t.object({
1129
- id: t.string(),
1130
- extensionId: t.string(),
1131
- view: j,
1132
- slot: t.object({
1133
- id: t.string()
1134
- }),
1135
- order: t.number().optional(),
1136
- when: Mt.optional()
1137
- }), so = t.object({
1138
- id: t.string(),
1139
- localId: t.string(),
1140
- extensionId: t.string(),
1141
- title: o,
1142
- actions: t.array(t.object({
1143
- id: t.string(),
1144
- label: o,
1145
- icon: t.string().optional()
1146
- })).optional(),
1147
- queryHandlerId: t.string(),
1148
- saveHandlerId: t.string().optional()
1149
- }), C = t.object({
1150
- extensions: t.array(we),
1151
- commands: t.array(Ne),
1152
- menuContributions: t.array($e),
1153
- commandPaletteContributions: t.array(Be).optional(),
1154
- modes: t.array(Yn),
1155
- pages: t.array(Un),
1156
- views: t.array(Xn),
1157
- viewMenus: t.array(eo),
1158
- placements: t.array(to),
1159
- resourceKinds: t.array(io),
1160
- resourceHierarchyProviders: t.array(t.object({
1161
- id: t.string(),
1162
- extensionId: t.string(),
1163
- resourceKind: Lt
1164
- })).optional(),
1165
- navigationItems: t.array(no),
1166
- navigationTrees: t.array(oo),
1167
- statusBarItems: t.array(ro),
1168
- statuses: t.array(so),
1169
- activityItems: t.array(t.object({
1170
- id: t.string(),
1171
- extensionId: t.string(),
1172
- title: o,
1173
- icon: t.string(),
1174
- modes: t.array(k),
1175
- placement: t.enum(["first", "default", "last"]).optional(),
1176
- command: E,
1177
- params: r.optional()
1178
- })).optional(),
1179
- settingsSections: t.array(Mn).optional(),
1180
- settingsPanels: t.array(ao),
1181
- commandPaletteResources: t.array(On).optional(),
1182
- keybindings: t.array(En).optional(),
1183
- settingsDefinitions: t.array(Ut).optional(),
1184
- automations: t.array(Me).optional(),
1185
- connections: t.array(Ze).optional(),
1186
- harnesses: t.array(t.object({
1187
- id: t.string(),
1188
- localId: t.string(),
1189
- extensionId: t.string(),
1190
- label: o.optional()
1191
- })).optional(),
1192
- skills: t.array(t.object({
1193
- id: t.string(),
1194
- localId: t.string(),
1195
- extensionId: t.string(),
1196
- title: o.optional()
1197
- })).optional(),
1198
- templates: t.array(t.object({
1199
- id: t.string(),
1200
- localId: t.string(),
1201
- extensionId: t.string(),
1202
- title: o.optional()
1203
- })).optional(),
1204
- templateTypes: t.array(t.object({
1205
- id: t.string(),
1206
- localId: t.string(),
1207
- extensionId: t.string(),
1208
- label: o,
1209
- description: o.optional(),
1210
- order: t.number().optional(),
1211
- commands: t.object({
1212
- list: t.string(),
1213
- read: t.string(),
1214
- save: t.string(),
1215
- delete: t.string()
1216
- }).optional()
1217
- })).optional(),
1218
- themes: t.array(t.object({
1219
- id: t.string(),
1220
- localId: t.string(),
1221
- extensionId: t.string(),
1222
- title: o.optional()
1223
- })).optional(),
1224
- diagnostics: t.array(jt)
1225
- }), gt = t.object({
1226
- id: t.string(),
1227
- extensionId: t.string()
1228
- }), lo = C.pick({
1229
- extensions: !0,
1230
- commands: !0,
1231
- menuContributions: !0,
1232
- commandPaletteContributions: !0,
1233
- modes: !0,
1234
- pages: !0,
1235
- views: !0,
1236
- viewMenus: !0,
1237
- placements: !0,
1238
- resourceKinds: !0,
1239
- resourceHierarchyProviders: !0,
1240
- navigationItems: !0,
1241
- navigationTrees: !0,
1242
- statusBarItems: !0,
1243
- statuses: !0,
1244
- activityItems: !0,
1245
- settingsSections: !0,
1246
- settingsPanels: !0,
1247
- commandPaletteResources: !0,
1248
- keybindings: !0,
1249
- settingsDefinitions: !0,
1250
- diagnostics: !0
1251
- });
1252
- lo.extend({
1253
- extensionsRoot: t.string(),
1254
- extensionsRootExists: t.boolean(),
1255
- errorCount: t.number().int().nonnegative(),
1256
- warningCount: t.number().int().nonnegative(),
1257
- middlewares: t.array(Ue),
1258
- hooks: t.array(Ke),
1259
- schedules: t.array(Le),
1260
- artifactMounts: t.array(_e),
1261
- themes: t.array(kt),
1262
- fileIconThemes: t.array(vt),
1263
- templates: t.array(gt),
1264
- skills: t.array(gt),
1265
- hostCompatibility: Fe
1266
- });
1267
- t.object({
1268
- commands: C.shape.commands,
1269
- translations: t.array(wt).optional(),
1270
- diagnostics: C.shape.diagnostics
1271
- });
1272
- t.object({
1273
- themes: t.array(kt),
1274
- fileIconThemes: t.array(vt),
1275
- translations: t.array(wt),
1276
- diagnostics: C.shape.diagnostics
1277
- });
1278
- t.object({
1279
- displayName: t.string(),
1280
- extensionId: t.string(),
1281
- manifest: r,
1282
- name: t.string(),
1283
- sourceHash: t.string().nullable().optional(),
1284
- sourceKind: t.enum(["local_path", "git", "registry"]),
1285
- sourcePath: t.string(),
1286
- sourceRef: t.string().nullable().optional(),
1287
- version: t.string().nullable().optional()
1288
- });
1289
- t.object({
1290
- enabled: t.literal(!0),
1291
- installName: t.string(),
1292
- installedExtensionId: t.string(),
1293
- instanceId: t.string(),
1294
- name: t.string(),
1295
- projectId: t.string()
1296
- });
1297
- const tt = t.object({
1298
- id: t.string(),
1299
- projectId: t.string(),
1300
- extensionId: t.string(),
1301
- installedExtensionId: t.string(),
1302
- installName: t.string(),
1303
- name: t.string(),
1304
- displayName: t.string(),
1305
- version: t.string().nullable().optional(),
1306
- description: t.string().optional(),
1307
- sourcePath: t.string(),
1308
- scope: t.enum(["repo", "global"]),
1309
- status: t.enum(["pending", "loaded", "error", "missing", "disabled"]),
1310
- lastLoadedAt: t.string().nullable().optional(),
1311
- lastError: r.nullable().optional(),
1312
- enabled: t.boolean(),
1313
- config: t.record(t.string(), t.unknown()),
1314
- /** A newer pinned release is available for this extension's source. */
1315
- canUpgrade: t.boolean(),
1316
- /** New source is waiting in the extensions root. The project keeps running the adopted version until a person takes it. */
1317
- updateAvailable: t.boolean()
1318
- }), co = t.object({
1319
- installName: t.string(),
1320
- displayName: t.string(),
1321
- description: t.string(),
1322
- installed: t.boolean(),
1323
- origin: t.object({
1324
- kind: t.literal("git"),
1325
- url: t.string(),
1326
- path: t.string(),
1327
- ref: t.string()
1328
- }),
1329
- publisher: t.string().optional()
1330
- });
1331
- t.object({
1332
- extensions: t.array(tt),
1333
- marketplace: t.array(co)
1334
- });
1335
- t.object({
1336
- enabled: t.boolean()
1337
- });
1338
- t.object({
1339
- enabled: t.boolean()
1340
- });
1341
- t.object({
1342
- sessionId: t.string(),
1343
- title: t.string()
1344
- });
1345
- t.object({
1346
- changed: t.boolean(),
1347
- extension: tt
1348
- });
1349
- t.object({
1350
- extension: tt
1351
- });
1352
- t.object({
1353
- extensionId: t.string(),
1354
- name: t.string(),
1355
- installName: t.string(),
1356
- installedSkills: t.array(t.object({
1357
- id: t.string(),
1358
- extensionId: t.string(),
1359
- skillKey: t.string(),
1360
- installedAgents: t.array(t.string())
1361
- }))
1362
- });
1363
- const po = t.enum(["queued", "running", "succeeded", "failed", "cancelled", "rejected"]);
1364
- t.object({
1365
- name: t.string().trim().min(1).max(120),
1366
- projectId: t.string().min(1),
1367
- principalId: t.string().uuid().optional(),
1368
- commandScopes: t.array(t.string().min(1)).min(1),
1369
- expiresInSeconds: t.number().int().positive().max(365 * 24 * 60 * 60)
1370
- }).strict();
1371
- const $t = t.object({
1372
- id: t.string(),
1373
- principalId: t.string(),
1374
- name: t.string(),
1375
- tokenPrefix: t.string(),
1376
- projectId: t.string(),
1377
- commandScopes: t.array(t.string()),
1378
- expiresAt: t.string(),
1379
- lastUsedAt: t.string().nullable(),
1380
- revokedAt: t.string().nullable(),
1381
- createdAt: t.string()
1382
- });
1383
- $t.extend({
1384
- token: t.string()
1385
- });
1386
- t.object({
1387
- tokens: t.array($t)
1388
- });
1389
- t.object({
1390
- commandId: t.string().min(1),
1391
- input: t.object({
1392
- workspaceId: t.string().optional(),
1393
- params: r.optional(),
1394
- resource: b.optional(),
1395
- metadata: r.optional()
1396
- }).strict()
1397
- }).strict();
1398
- const go = t.object({
1399
- code: t.string(),
1400
- message: t.string(),
1401
- retryable: t.boolean()
1402
- });
1403
- t.object({
1404
- id: t.string(),
1405
- projectId: t.string(),
1406
- commandId: t.string(),
1407
- status: po,
1408
- createdAt: t.string(),
1409
- startedAt: t.string().nullable(),
1410
- finishedAt: t.string().nullable(),
1411
- result: t.unknown().nullable(),
1412
- error: go.nullable()
1413
- });
1414
- const mo = t.object({
1415
- cursor: t.number().int().nonnegative(),
1416
- runId: t.string(),
1417
- type: t.string(),
1418
- payload: r,
1419
- createdAt: t.string()
1420
- });
1421
- t.object({
1422
- events: t.array(mo)
1423
- });
1424
- const uo = (n, e) => ({
1425
- extensionId: "pstdio",
1426
- kind: n,
1427
- id: e
1428
- }), $ = (n, e, i) => ({
1429
- id: n,
1430
- ref: uo("resource-kind", n),
1431
- label: e,
1432
- menuSlots: i
1433
- }), B = [{
1434
- id: "headerPrimary",
1435
- placement: "header-primary",
1436
- access: "public"
1437
- }, {
1438
- id: "headerOverflow",
1439
- placement: "header-overflow",
1440
- access: "public"
1441
- }], q = {
1442
- project: $("project", "Extension", B),
1443
- session: $("session", "Session", B),
1444
- workspace: $("workspace", "Workspace", B)
1445
- }, v = {
1446
- project: q.project.ref,
1447
- session: q.session.ref,
1448
- workspace: q.workspace.ref
1449
- }, mt = (n) => ({
1450
- ...n,
1451
- kind: "command"
1452
- });
1453
- Object.assign(mt, {
1454
- forExtension: (n) => (e) => mt({
1455
- extensionId: `${n.publisher}.${n.name}`,
1456
- id: e
1457
- })
1458
- });
1459
- const bo = (n) => ({
1460
- ...n,
1461
- kind: "event"
1462
- }), H = (n, e) => ({
1463
- id: n,
1464
- kind: e.kind,
1465
- label: e.label,
1466
- description: e.description,
1467
- metadata: e.metadata
1468
- }), l = (n) => bo({
1469
- extensionId: "pstdio",
1470
- id: n
1471
- }), w = (n, e) => H(`${n.id}.${e}`, {
1472
- kind: "menu"
1473
- });
1474
- H("project.sidenav", {
1475
- kind: "panel"
1476
- }), w(v.project, "headerPrimary"), w(v.project, "headerOverflow"), H("project.settingsPanels", {
1477
- kind: "settings"
1478
- });
1479
- w(v.session, "headerPrimary"), w(v.session, "headerOverflow");
1480
- w(v.workspace, "headerPrimary"), w(v.workspace, "headerOverflow"), H("workspace.sidenav", {
1481
- kind: "panel"
1482
- });
1483
- l("project.opened");
1484
- l("session.started"), l("session.resumed"), l("session.awaitingInput"), l("session.succeeded"), l("session.failed"), l("session.completed");
1485
- l("workspace.created"), l("workspace.provision"), l("workspace.ready"), l("workspace.archived"), l("workspace.deleted");
1486
- l("worktree.removed");
1487
- l("git.committed"), l("git.rebased"), l("git.merged"), l("git.conflicted");
1488
- t.object({
1489
- id: t.string(),
1490
- project_id: t.string(),
1491
- file_name: t.string(),
1492
- file_kind: t.string(),
1493
- storage_path: t.string(),
1494
- mime_type: t.string().nullable(),
1495
- size_bytes: t.number(),
1496
- hash: t.string().nullable(),
1497
- created_at: t.string(),
1498
- updated_at: t.string()
1499
- });
1500
- const ho = t.object({
1501
- code: t.literal("extension_setup_failed"),
1502
- extension: t.string(),
1503
- message: t.string()
1504
- });
1505
- t.object({
1506
- id: t.string(),
1507
- name: t.string(),
1508
- shorthand: t.string(),
1509
- default_agent_id: t.string().nullable(),
1510
- default_agent_model: t.string().nullable(),
1511
- startup_script: t.string().nullable(),
1512
- created_at: t.string(),
1513
- updated_at: t.string(),
1514
- deleted_at: t.string().nullable(),
1515
- extension_warnings: t.array(ho).optional()
1516
- });
1517
- t.object({
1518
- name: t.string().min(1).refine((n) => /[a-zA-Z]/.test(n), {
1519
- message: "Project name must contain at least one letter"
1520
- }),
1521
- agents: t.array(t.string().min(1)).min(1).optional()
1522
- });
1523
- t.object({
1524
- default_agent_id: t.string().min(1).nullable().optional(),
1525
- default_agent_model: t.string().min(1).nullable().optional()
1526
- }).refine((n) => Object.keys(n).length > 0, {
1527
- message: "At least one field must be provided"
1528
- });
1529
- t.object({
1530
- id: t.string(),
1531
- name: t.string(),
1532
- path: t.string(),
1533
- display_name: t.string().nullable(),
1534
- created_at: t.string(),
1535
- updated_at: t.string()
1536
- });
1537
- t.object({
1538
- name: t.string().min(1),
1539
- path: t.string().min(1)
1540
- });
1541
- const yo = {
1542
- c: "text/plain",
1543
- cc: "text/plain",
1544
- cpp: "text/plain",
1545
- cs: "text/plain",
1546
- css: "text/css",
1547
- csv: "text/csv",
1548
- cxx: "text/plain",
1549
- go: "text/plain",
1550
- h: "text/plain",
1551
- hpp: "text/plain",
1552
- html: "text/html",
1553
- java: "text/plain",
1554
- js: "application/javascript",
1555
- jsx: "text/plain",
1556
- json: "application/json",
1557
- jsonc: "application/json",
1558
- kt: "text/plain",
1559
- kts: "text/plain",
1560
- lua: "text/plain",
1561
- markdown: "text/markdown",
1562
- md: "text/markdown",
1563
- mjs: "application/javascript",
1564
- pdf: "application/pdf",
1565
- php: "text/plain",
1566
- png: "image/png",
1567
- py: "text/plain",
1568
- rb: "text/plain",
1569
- rs: "text/plain",
1570
- sh: "text/plain",
1571
- sql: "text/plain",
1572
- svg: "image/svg+xml",
1573
- swift: "text/plain",
1574
- toml: "text/plain",
1575
- ts: "text/plain",
1576
- tsx: "text/plain",
1577
- txt: "text/plain",
1578
- vue: "text/plain",
1579
- xml: "text/xml",
1580
- xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
1581
- yaml: "text/plain",
1582
- yml: "text/plain"
1583
- }, jo = Object.keys(yo);
1584
- jo.map((n) => `.${n}`).join(",");
1585
- const So = t.object({
1586
- type: t.literal("text"),
1587
- text: t.string()
1588
- }), xo = t.object({
1589
- type: t.literal("reasoning"),
1590
- text: t.string()
1591
- }), fo = t.enum(["read", "write", "execute", "network", "other"]), ko = t.enum(["pending", "running", "completed", "failed", "denied"]), vo = t.object({
1592
- type: t.literal("tool"),
1593
- tool: t.string(),
1594
- callId: t.string().optional(),
1595
- actionType: fo.optional(),
1596
- status: ko.optional(),
1597
- state: t.object({
1598
- status: t.string().optional(),
1599
- input: t.unknown().optional(),
1600
- output: t.unknown().optional(),
1601
- errorText: t.string().optional(),
1602
- metadata: t.unknown().optional()
1603
- }).optional()
1604
- }), wo = t.object({
1605
- type: t.literal("step-start"),
1606
- snapshot: t.string().optional()
1607
- }), Io = t.object({
1608
- type: t.literal("step-finish"),
1609
- reason: t.string().optional(),
1610
- snapshot: t.string().optional(),
1611
- cost: t.number().optional(),
1612
- tokens: t.unknown().optional()
1613
- }), _o = t.object({
1614
- type: t.literal("patch"),
1615
- hash: t.string().optional(),
1616
- files: t.unknown().optional()
1617
- }), Ro = t.object({
1618
- type: t.literal("file"),
1619
- fileId: t.string().optional(),
1620
- mediaType: t.string().optional(),
1621
- filename: t.string().optional(),
1622
- size: t.number().optional(),
1623
- url: t.string()
1624
- }), Po = t.object({
1625
- type: t.literal("loading")
1626
- }), To = t.object({
1627
- type: t.literal("error"),
1628
- errorType: t.enum(["timeout", "crash", "permission", "other"]),
1629
- message: t.string().optional()
1630
- }), Oo = t.object({
1631
- type: t.literal("token_usage"),
1632
- inputTokens: t.number(),
1633
- outputTokens: t.number(),
1634
- cacheReadTokens: t.number().optional(),
1635
- cacheWriteTokens: t.number().optional()
1636
- }), Ao = t.union([So, xo, vo, wo, Io, _o, Ro, Po, To, Oo]), Eo = t.enum(["user", "assistant", "tool", "system", "developer"]);
1637
- t.object({
1638
- id: t.string(),
1639
- role: Eo,
1640
- parts: t.array(Ao),
1641
- index: t.number().optional(),
1642
- createdAt: t.number().optional(),
1643
- modelId: t.string().optional(),
1644
- providerId: t.string().optional(),
1645
- tokens: t.object({
1646
- input: t.number().optional(),
1647
- output: t.number().optional(),
1648
- reasoning: t.number().optional(),
1649
- cache: t.object({
1650
- read: t.number().optional(),
1651
- write: t.number().optional()
1652
- }).optional()
1653
- }).optional()
1654
- });
1655
- const Co = t.enum(["in_progress", "awaiting_input", "queued", "completed", "failed", "cancelled", "disconnected"]), Ho = t.union([t.string(), t.boolean()]), et = t.record(t.string(), Ho), Bt = t.object({
1656
- id: t.string(),
1657
- project_id: t.string().nullable(),
1658
- title: t.string(),
1659
- status: Co,
1660
- archived: t.boolean(),
1661
- last_request_started: t.string().nullable(),
1662
- last_request_ended: t.string().nullable(),
1663
- agent: t.string().nullable(),
1664
- last_selected_model: t.string().nullable(),
1665
- agent_session_id: t.string().nullable(),
1666
- session_file_id: t.string().nullable(),
1667
- original_session_id: t.string().nullable(),
1668
- cwd: t.string().nullable(),
1669
- params_json: et.nullable(),
1670
- anchors_json: t.array(b),
1671
- created_at: t.string(),
1672
- updated_at: t.string()
1673
- }), qt = t.object({
1674
- file_id: t.string().min(1)
1675
- });
1676
- t.object({
1677
- file_id: t.string(),
1678
- name: t.string(),
1679
- mime_type: t.string().nullable(),
1680
- size_bytes: t.number(),
1681
- hash: t.string().nullable(),
1682
- url: t.string(),
1683
- created_at: t.string(),
1684
- updated_at: t.string()
1685
- });
1686
- t.object({
1687
- project_id: t.string().min(1),
1688
- title: t.string().min(1),
1689
- prompt: t.string().min(1).optional(),
1690
- agent: t.string().min(1).optional(),
1691
- workspace_id: t.string().optional(),
1692
- anchors: t.array(b).optional(),
1693
- attachments: t.array(qt).optional(),
1694
- model: t.string().optional(),
1695
- params: et.optional(),
1696
- original_session_id: t.string().optional()
1697
- });
1698
- const Vo = t.object({
1699
- answers: t.array(t.array(t.string()))
1700
- });
1701
- t.object({
1702
- prompt: t.string().min(1).optional(),
1703
- agent: t.string().optional(),
1704
- model: t.string().optional(),
1705
- question_response: Vo.optional(),
1706
- params: et.optional(),
1707
- summary_from_session_id: t.string().optional(),
1708
- summary_format: t.enum(["brief", "detailed"]).default("brief").optional(),
1709
- summary_role: t.enum(["assistant", "all"]).default("assistant").optional(),
1710
- attachments: t.array(qt).optional()
1711
- });
1712
- t.object({
1713
- id: t.string().min(1),
1714
- decision: t.enum(["approve", "deny"])
1715
- });
1716
- const Do = t.union([t.object({
1717
- status: t.literal("dispatched")
1718
- }), t.object({
1719
- status: t.literal("queued"),
1720
- queue_position: t.number().int()
1721
- })]);
1722
- Bt.extend({
1723
- follow_up: Do
1724
- });
1725
- t.object({
1726
- session: Bt,
1727
- messages: t.array(t.unknown())
1728
- });
1729
- t.object({
1730
- agent: t.string(),
1731
- agent_session_id: t.string(),
1732
- cwd: t.string().optional()
1733
- });
1734
- t.object({
1735
- session_id: t.string().nullable()
1736
- });
1737
- t.object({
1738
- notifications_enabled: t.boolean(),
1739
- max_concurrent_sessions: t.number().int().min(1).nullable()
1740
- });
1741
- t.object({
1742
- notifications_enabled: t.boolean().optional(),
1743
- max_concurrent_sessions: t.number().int().min(1).nullable().optional()
1744
- }).strict().refine((n) => Object.keys(n).length > 0, {
1745
- message: "Expected at least one setting"
1746
- });
1747
- const No = t.object({
1748
- path: t.string(),
1749
- content: t.string(),
1750
- encoding: t.literal("utf8")
1751
- }), zo = t.enum(["project", "extension"]), Uo = t.object({
1752
- agent_id: t.string(),
1753
- agent_name: t.string(),
1754
- installed_version: t.string().nullable(),
1755
- outdated: t.boolean()
1756
- }), Ko = t.object({
1757
- id: t.string(),
1758
- project_id: t.string(),
1759
- name: t.string(),
1760
- title: t.string(),
1761
- description: t.string(),
1762
- source_kind: zo,
1763
- files: t.array(No),
1764
- editable: t.boolean(),
1765
- extension_instance_id: t.string().optional(),
1766
- extension_id: t.string().optional(),
1767
- installed_extension_id: t.string().optional(),
1768
- install_name: t.string().optional(),
1769
- key: t.string().optional(),
1770
- source: V.optional(),
1771
- enabled: t.boolean().optional(),
1772
- created_at: t.string(),
1773
- updated_at: t.string(),
1774
- deleted_at: t.string().nullable()
1775
- });
1776
- Ko.extend({
1777
- installed_agents: t.array(t.string()),
1778
- outdated_agents: t.array(t.string()),
1779
- agent_installations: t.array(Uo)
1780
- });
1781
- t.object({
1782
- enabled: t.boolean().optional(),
1783
- title: t.string().min(1).optional(),
1784
- description: t.string().optional()
1785
- });
1786
- const Lo = {
1787
- version: t.number().int().positive(),
1788
- data: r
1789
- }, Mo = t.object(Lo), $o = ["provisioning", "ready", "failed", "cancelled", "archiving", "archived", "deleting", "provider_missing"], Bo = t.enum($o), qo = t.enum(["local", "remote"]), Wo = t.object({
1790
- files: t.enum(["none", "read", "write"]),
1791
- diff: t.boolean(),
1792
- merge: t.boolean(),
1793
- rebase: t.boolean(),
1794
- archive: t.boolean(),
1795
- delete: t.boolean()
1796
- }), Fo = t.object({
1797
- code: t.string(),
1798
- message: t.string(),
1799
- retryable: t.boolean(),
1800
- occurred_at: t.string()
1801
- });
1802
- t.object({
1803
- id: t.string(),
1804
- project_id: t.string(),
1805
- name: t.string(),
1806
- branch: t.string().nullable(),
1807
- worktree_path: t.string().nullable(),
1808
- provider_id: t.string(),
1809
- provider_params_json: r,
1810
- provider_ref_json: Mo.nullable(),
1811
- provider_state: Bo,
1812
- execution_kind: qo,
1813
- provider_operation_id: t.string().nullable(),
1814
- provider_operation_kind: t.enum(["create", "cancel", "archive", "delete"]).nullable(),
1815
- provider_error_json: Fo.nullable(),
1816
- provider_capabilities_json: Wo,
1817
- display_path: t.string().nullable(),
1818
- is_default: t.boolean(),
1819
- archived: t.boolean(),
1820
- workspace_shorthand: t.string(),
1821
- startup_log_file_id: t.string().nullable(),
1822
- anchors_json: t.array(b),
1823
- created_at: t.string(),
1824
- updated_at: t.string(),
1825
- deleted_at: t.string().nullable()
1826
- });
1827
- t.object({
1828
- project_id: t.string().min(1),
1829
- /** Workspace provider. Defaults to pstdio.worktree. */
1830
- provider_id: t.string().optional(),
1831
- /** Provider parameters. Built-in worktree accepts repo_id and base. */
1832
- params: r.optional(),
1833
- /** Repository to branch from. Defaults to the project's first repository. */
1834
- repo_id: t.string().optional(),
1835
- /** Base branch/ref for the new worktree. Defaults to HEAD. */
1836
- base: t.string().optional()
1837
- });
1838
- t.object({
1839
- name: t.string().trim().min(1, "Workspace name is required").max(120, "Workspace name must be 120 characters or less")
1840
- });
1841
- t.object({
1842
- removed: t.boolean()
1843
- });
1844
- const Go = t.object({
1845
- path: t.string(),
1846
- name: t.string(),
1847
- type: t.enum(["file", "directory"]),
1848
- size: t.number().int().nonnegative().optional(),
1849
- modified_at: t.string().optional()
1850
- });
1851
- t.object({
1852
- workspace_id: t.string(),
1853
- path: t.string(),
1854
- entries: t.array(Go),
1855
- truncated: t.boolean()
1856
- });
1857
- t.object({
1858
- workspace_id: t.string(),
1859
- path: t.string(),
1860
- file_name: t.string(),
1861
- mime_type: t.string().optional(),
1862
- size: t.number().int().nonnegative(),
1863
- encoding: t.enum(["utf8", "base64"]),
1864
- content: t.string().optional(),
1865
- data_url: t.string().optional(),
1866
- editable: t.boolean()
1867
- });
1868
- t.object({
1869
- content: t.string()
1870
- });
1871
- t.object({
1872
- destination_path: t.string().min(1)
1873
- });
1874
- t.object({
1875
- path: t.string().optional(),
1876
- query: t.string().optional(),
1877
- limit: t.number().int().positive().max(500).optional()
1878
- });
1879
- export {
1880
- Yt as W,
1881
- ni as a,
1882
- oi as b,
1883
- gn as c,
1884
- te as u
1885
- };
1886
- //# sourceMappingURL=workspaces-DdUPyzkL.js.map