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