@duvoai/cli 0.4.2 → 0.5.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 +7 -0
- package/dist/bin/duvo.js +1286 -880
- package/dist/bin/duvo.js.map +4 -4
- package/package.json +3 -1
package/dist/bin/duvo.js
CHANGED
|
@@ -83,8 +83,222 @@ function handleCliError(error) {
|
|
|
83
83
|
}
|
|
84
84
|
__name(handleCliError, "handleCliError");
|
|
85
85
|
|
|
86
|
+
// src/output/should-color.ts
|
|
87
|
+
function shouldColor() {
|
|
88
|
+
if (process.env.NO_COLOR !== void 0 && process.env.NO_COLOR !== "") {
|
|
89
|
+
return false;
|
|
90
|
+
}
|
|
91
|
+
return Boolean(process.stdout.isTTY);
|
|
92
|
+
}
|
|
93
|
+
__name(shouldColor, "shouldColor");
|
|
94
|
+
|
|
95
|
+
// src/output/colors.ts
|
|
96
|
+
var ANSI = {
|
|
97
|
+
reset: "\x1B[0m",
|
|
98
|
+
green: "\x1B[32m",
|
|
99
|
+
red: "\x1B[31m",
|
|
100
|
+
cyan: "\x1B[36m",
|
|
101
|
+
dim: "\x1B[2m",
|
|
102
|
+
bold: "\x1B[1m",
|
|
103
|
+
orange: "\x1B[38;5;208m",
|
|
104
|
+
yellow: "\x1B[38;5;178m"
|
|
105
|
+
};
|
|
106
|
+
function wrap(code, text3) {
|
|
107
|
+
if (!shouldColor()) {
|
|
108
|
+
return text3;
|
|
109
|
+
}
|
|
110
|
+
return `${code}${text3}${ANSI.reset}`;
|
|
111
|
+
}
|
|
112
|
+
__name(wrap, "wrap");
|
|
113
|
+
var green = /* @__PURE__ */ __name((text3) => wrap(ANSI.green, text3), "green");
|
|
114
|
+
var red = /* @__PURE__ */ __name((text3) => wrap(ANSI.red, text3), "red");
|
|
115
|
+
var cyan = /* @__PURE__ */ __name((text3) => wrap(ANSI.cyan, text3), "cyan");
|
|
116
|
+
var bold = /* @__PURE__ */ __name((text3) => wrap(ANSI.bold, text3), "bold");
|
|
117
|
+
var yellow = /* @__PURE__ */ __name((text3) => wrap(ANSI.yellow, text3), "yellow");
|
|
118
|
+
|
|
119
|
+
// src/output/deprecation-notice.ts
|
|
120
|
+
var DEPRECATION_HEADER = "Deprecation";
|
|
121
|
+
var SUNSET_HEADER = "Sunset";
|
|
122
|
+
var LINK_HEADER = "Link";
|
|
123
|
+
var SUCCESSOR_REL = "successor-version";
|
|
124
|
+
var DEPRECATION_REL = "deprecation";
|
|
125
|
+
var printedKeys = /* @__PURE__ */ new Set();
|
|
126
|
+
function parseDeprecationHeaders(headers) {
|
|
127
|
+
const deprecationRaw = headers.get(DEPRECATION_HEADER);
|
|
128
|
+
const sunsetRaw = headers.get(SUNSET_HEADER);
|
|
129
|
+
const linkRaw = headers.get(LINK_HEADER);
|
|
130
|
+
const links = linkRaw === null ? [] : parseLinkHeader(linkRaw);
|
|
131
|
+
const successor = links.find((entry) => entry.rel === SUCCESSOR_REL);
|
|
132
|
+
const deprecationDoc = links.find((entry) => entry.rel === DEPRECATION_REL);
|
|
133
|
+
if (deprecationRaw === null && sunsetRaw === null && successor === void 0 && deprecationDoc === void 0) {
|
|
134
|
+
return null;
|
|
135
|
+
}
|
|
136
|
+
const info = { deprecated: true };
|
|
137
|
+
const deprecatedAt = parseHttpDate(deprecationRaw);
|
|
138
|
+
if (deprecatedAt !== null) {
|
|
139
|
+
info.deprecatedAt = deprecatedAt;
|
|
140
|
+
}
|
|
141
|
+
const sunsetAt = parseHttpDate(sunsetRaw);
|
|
142
|
+
if (sunsetAt !== null) {
|
|
143
|
+
info.sunsetAt = sunsetAt;
|
|
144
|
+
}
|
|
145
|
+
if (successor !== void 0) {
|
|
146
|
+
info.successorUri = successor.uri;
|
|
147
|
+
}
|
|
148
|
+
if (deprecationDoc !== void 0) {
|
|
149
|
+
info.deprecationDocUri = deprecationDoc.uri;
|
|
150
|
+
}
|
|
151
|
+
return info;
|
|
152
|
+
}
|
|
153
|
+
__name(parseDeprecationHeaders, "parseDeprecationHeaders");
|
|
154
|
+
function formatDeprecationNotice(info, ctx) {
|
|
155
|
+
const lines = [yellow(`duvo: \u26A0 ${ctx.method} ${ctx.path} is deprecated`)];
|
|
156
|
+
if (info.sunsetAt !== void 0) {
|
|
157
|
+
const now = ctx.now ?? /* @__PURE__ */ new Date();
|
|
158
|
+
const iso = formatIsoDate(info.sunsetAt);
|
|
159
|
+
const relative = formatRelativeDays(info.sunsetAt, now);
|
|
160
|
+
lines.push(yellow(`duvo: sunset: ${iso} (${relative})`));
|
|
161
|
+
}
|
|
162
|
+
const docUri = info.deprecationDocUri ?? info.successorUri;
|
|
163
|
+
if (docUri !== void 0) {
|
|
164
|
+
lines.push(yellow(`duvo: see: ${docUri}`));
|
|
165
|
+
}
|
|
166
|
+
return lines.join("\n");
|
|
167
|
+
}
|
|
168
|
+
__name(formatDeprecationNotice, "formatDeprecationNotice");
|
|
169
|
+
function formatIsoDate(date) {
|
|
170
|
+
const yyyy = date.getUTCFullYear();
|
|
171
|
+
const mm = String(date.getUTCMonth() + 1).padStart(2, "0");
|
|
172
|
+
const dd = String(date.getUTCDate()).padStart(2, "0");
|
|
173
|
+
return `${yyyy}-${mm}-${dd}`;
|
|
174
|
+
}
|
|
175
|
+
__name(formatIsoDate, "formatIsoDate");
|
|
176
|
+
var MS_PER_DAY = 24 * 60 * 60 * 1e3;
|
|
177
|
+
function formatRelativeDays(target, now) {
|
|
178
|
+
const targetDay = Date.UTC(
|
|
179
|
+
target.getUTCFullYear(),
|
|
180
|
+
target.getUTCMonth(),
|
|
181
|
+
target.getUTCDate()
|
|
182
|
+
);
|
|
183
|
+
const nowDay = Date.UTC(
|
|
184
|
+
now.getUTCFullYear(),
|
|
185
|
+
now.getUTCMonth(),
|
|
186
|
+
now.getUTCDate()
|
|
187
|
+
);
|
|
188
|
+
const diffDays = Math.round((targetDay - nowDay) / MS_PER_DAY);
|
|
189
|
+
if (diffDays === 0) {
|
|
190
|
+
return "today";
|
|
191
|
+
}
|
|
192
|
+
if (diffDays === 1) {
|
|
193
|
+
return "tomorrow";
|
|
194
|
+
}
|
|
195
|
+
if (diffDays === -1) {
|
|
196
|
+
return "yesterday";
|
|
197
|
+
}
|
|
198
|
+
if (diffDays > 0) {
|
|
199
|
+
return `in ${diffDays} days`;
|
|
200
|
+
}
|
|
201
|
+
return `${Math.abs(diffDays)} days ago`;
|
|
202
|
+
}
|
|
203
|
+
__name(formatRelativeDays, "formatRelativeDays");
|
|
204
|
+
function printDeprecationNotice(info, ctx) {
|
|
205
|
+
const dedupKey = `${ctx.method} ${ctx.path}`;
|
|
206
|
+
if (printedKeys.has(dedupKey)) {
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
printedKeys.add(dedupKey);
|
|
210
|
+
const stderr = ctx.stderr ?? process.stderr;
|
|
211
|
+
stderr.write(`${formatDeprecationNotice(info, ctx)}
|
|
212
|
+
`);
|
|
213
|
+
}
|
|
214
|
+
__name(printDeprecationNotice, "printDeprecationNotice");
|
|
215
|
+
function parseHttpDate(raw) {
|
|
216
|
+
if (raw === null) {
|
|
217
|
+
return null;
|
|
218
|
+
}
|
|
219
|
+
const trimmed = raw.trim();
|
|
220
|
+
if (trimmed === "" || trimmed === "true") {
|
|
221
|
+
return null;
|
|
222
|
+
}
|
|
223
|
+
const parsed = new Date(trimmed);
|
|
224
|
+
if (Number.isNaN(parsed.getTime())) {
|
|
225
|
+
return null;
|
|
226
|
+
}
|
|
227
|
+
return parsed;
|
|
228
|
+
}
|
|
229
|
+
__name(parseHttpDate, "parseHttpDate");
|
|
230
|
+
function parseLinkHeader(raw) {
|
|
231
|
+
const entries = [];
|
|
232
|
+
for (const segment of splitTopLevelCommas(raw)) {
|
|
233
|
+
const entry = parseLinkEntry(segment);
|
|
234
|
+
if (entry !== null) {
|
|
235
|
+
entries.push(entry);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
return entries;
|
|
239
|
+
}
|
|
240
|
+
__name(parseLinkHeader, "parseLinkHeader");
|
|
241
|
+
function parseLinkEntry(segment) {
|
|
242
|
+
const trimmed = segment.trim();
|
|
243
|
+
if (!trimmed.startsWith("<")) {
|
|
244
|
+
return null;
|
|
245
|
+
}
|
|
246
|
+
const closeIdx = trimmed.indexOf(">");
|
|
247
|
+
if (closeIdx < 0) {
|
|
248
|
+
return null;
|
|
249
|
+
}
|
|
250
|
+
const uri = trimmed.slice(1, closeIdx).trim();
|
|
251
|
+
if (uri === "") {
|
|
252
|
+
return null;
|
|
253
|
+
}
|
|
254
|
+
const rel = extractRelParam(trimmed.slice(closeIdx + 1));
|
|
255
|
+
if (rel === null) {
|
|
256
|
+
return null;
|
|
257
|
+
}
|
|
258
|
+
return { uri, rel };
|
|
259
|
+
}
|
|
260
|
+
__name(parseLinkEntry, "parseLinkEntry");
|
|
261
|
+
var REL_PARAM = /(?:^|;)\s*rel\s*=\s*(?:"([^"]*)"|([^;,\s]+))/i;
|
|
262
|
+
function extractRelParam(params) {
|
|
263
|
+
const match = REL_PARAM.exec(params);
|
|
264
|
+
if (match === null) {
|
|
265
|
+
return null;
|
|
266
|
+
}
|
|
267
|
+
const value = match[1] ?? match[2] ?? "";
|
|
268
|
+
return value.trim().toLowerCase();
|
|
269
|
+
}
|
|
270
|
+
__name(extractRelParam, "extractRelParam");
|
|
271
|
+
function splitTopLevelCommas(raw) {
|
|
272
|
+
const out = [];
|
|
273
|
+
let depth = 0;
|
|
274
|
+
let inQuotes = false;
|
|
275
|
+
let start = 0;
|
|
276
|
+
for (let i = 0; i < raw.length; i++) {
|
|
277
|
+
const ch = raw[i];
|
|
278
|
+
if (ch === '"' && raw[i - 1] !== "\\") {
|
|
279
|
+
inQuotes = !inQuotes;
|
|
280
|
+
continue;
|
|
281
|
+
}
|
|
282
|
+
if (inQuotes) {
|
|
283
|
+
continue;
|
|
284
|
+
}
|
|
285
|
+
if (ch === "<") {
|
|
286
|
+
depth++;
|
|
287
|
+
} else if (ch === ">") {
|
|
288
|
+
depth = Math.max(0, depth - 1);
|
|
289
|
+
} else if (ch === "," && depth === 0) {
|
|
290
|
+
out.push(raw.slice(start, i));
|
|
291
|
+
start = i + 1;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
out.push(raw.slice(start));
|
|
295
|
+
return out;
|
|
296
|
+
}
|
|
297
|
+
__name(splitTopLevelCommas, "splitTopLevelCommas");
|
|
298
|
+
|
|
86
299
|
// src/client/client.ts
|
|
87
300
|
var DEFAULT_REQUEST_TIMEOUT_MS = 3e4;
|
|
301
|
+
var MAX_REDIRECTS = 5;
|
|
88
302
|
async function httpRequest(options) {
|
|
89
303
|
const url = buildUrl(options.apiBaseUrl, options.path, options.searchParams);
|
|
90
304
|
const headers = {
|
|
@@ -102,7 +316,12 @@ async function httpRequest(options) {
|
|
|
102
316
|
init.body = JSON.stringify(options.body);
|
|
103
317
|
}
|
|
104
318
|
try {
|
|
105
|
-
const response = await
|
|
319
|
+
const response = await fetchFollowingRedirects(
|
|
320
|
+
url,
|
|
321
|
+
init,
|
|
322
|
+
options.method,
|
|
323
|
+
options.path
|
|
324
|
+
);
|
|
106
325
|
return await handleResponse(response, options.method, options.path);
|
|
107
326
|
} catch (error) {
|
|
108
327
|
if (isTimeoutError(error)) {
|
|
@@ -128,7 +347,12 @@ async function httpUpload(options) {
|
|
|
128
347
|
signal: AbortSignal.timeout(timeoutMs)
|
|
129
348
|
};
|
|
130
349
|
try {
|
|
131
|
-
const response = await
|
|
350
|
+
const response = await fetchFollowingRedirects(
|
|
351
|
+
url,
|
|
352
|
+
init,
|
|
353
|
+
"POST",
|
|
354
|
+
options.path
|
|
355
|
+
);
|
|
132
356
|
return await handleResponse(response, "POST", options.path);
|
|
133
357
|
} catch (error) {
|
|
134
358
|
if (isTimeoutError(error)) {
|
|
@@ -140,6 +364,131 @@ async function httpUpload(options) {
|
|
|
140
364
|
}
|
|
141
365
|
}
|
|
142
366
|
__name(httpUpload, "httpUpload");
|
|
367
|
+
async function fetchFollowingRedirects(initialUrl, initialInit, method, path) {
|
|
368
|
+
let currentUrl = initialUrl;
|
|
369
|
+
let currentInit = { ...initialInit, redirect: "manual" };
|
|
370
|
+
for (let hop = 0; hop <= MAX_REDIRECTS; hop++) {
|
|
371
|
+
const response = await fetch(currentUrl, currentInit);
|
|
372
|
+
const deprecation = parseDeprecationHeaders(response.headers);
|
|
373
|
+
if (deprecation !== null) {
|
|
374
|
+
printDeprecationNotice(deprecation, { method, path });
|
|
375
|
+
}
|
|
376
|
+
if (!isRedirect(response.status)) {
|
|
377
|
+
return response;
|
|
378
|
+
}
|
|
379
|
+
const location = response.headers.get("Location");
|
|
380
|
+
if (location === null) {
|
|
381
|
+
return response;
|
|
382
|
+
}
|
|
383
|
+
const nextUrl = new URL(location, currentUrl);
|
|
384
|
+
let nextHeaders = currentInit.headers;
|
|
385
|
+
let nextMethod = currentInit.method;
|
|
386
|
+
let nextBody = currentInit.body;
|
|
387
|
+
const currentMethod = (currentInit.method ?? "GET").toUpperCase();
|
|
388
|
+
if (shouldDowngradeToGet(response.status, currentMethod)) {
|
|
389
|
+
nextMethod = "GET";
|
|
390
|
+
nextBody = void 0;
|
|
391
|
+
nextHeaders = stripEntityHeaders(nextHeaders);
|
|
392
|
+
}
|
|
393
|
+
if (nextUrl.origin !== currentUrl.origin) {
|
|
394
|
+
nextHeaders = stripAuthorization(nextHeaders);
|
|
395
|
+
}
|
|
396
|
+
currentInit = {
|
|
397
|
+
...currentInit,
|
|
398
|
+
method: nextMethod,
|
|
399
|
+
body: nextBody,
|
|
400
|
+
headers: nextHeaders
|
|
401
|
+
};
|
|
402
|
+
currentUrl = nextUrl;
|
|
403
|
+
}
|
|
404
|
+
throw new CliError(
|
|
405
|
+
`Too many redirects (>${MAX_REDIRECTS}) for ${method} ${path}`
|
|
406
|
+
);
|
|
407
|
+
}
|
|
408
|
+
__name(fetchFollowingRedirects, "fetchFollowingRedirects");
|
|
409
|
+
function isRedirect(status) {
|
|
410
|
+
return status >= 300 && status < 400 && status !== 304;
|
|
411
|
+
}
|
|
412
|
+
__name(isRedirect, "isRedirect");
|
|
413
|
+
function shouldDowngradeToGet(status, method) {
|
|
414
|
+
if ((status === 301 || status === 302) && method === "POST") {
|
|
415
|
+
return true;
|
|
416
|
+
}
|
|
417
|
+
if (status === 303 && method !== "GET" && method !== "HEAD") {
|
|
418
|
+
return true;
|
|
419
|
+
}
|
|
420
|
+
return false;
|
|
421
|
+
}
|
|
422
|
+
__name(shouldDowngradeToGet, "shouldDowngradeToGet");
|
|
423
|
+
var ENTITY_HEADER_NAMES = /* @__PURE__ */ new Set([
|
|
424
|
+
"content-encoding",
|
|
425
|
+
"content-language",
|
|
426
|
+
"content-location",
|
|
427
|
+
"content-type",
|
|
428
|
+
"content-length"
|
|
429
|
+
]);
|
|
430
|
+
function stripEntityHeaders(headers) {
|
|
431
|
+
const out = {};
|
|
432
|
+
if (headers === void 0) {
|
|
433
|
+
return out;
|
|
434
|
+
}
|
|
435
|
+
if (headers instanceof Headers) {
|
|
436
|
+
headers.forEach((value, key) => {
|
|
437
|
+
if (!ENTITY_HEADER_NAMES.has(key.toLowerCase())) {
|
|
438
|
+
out[key] = value;
|
|
439
|
+
}
|
|
440
|
+
});
|
|
441
|
+
return out;
|
|
442
|
+
}
|
|
443
|
+
if (Array.isArray(headers)) {
|
|
444
|
+
for (const [key, value] of headers) {
|
|
445
|
+
if (!ENTITY_HEADER_NAMES.has(key.toLowerCase())) {
|
|
446
|
+
out[key] = value;
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
return out;
|
|
450
|
+
}
|
|
451
|
+
for (const [key, value] of Object.entries(
|
|
452
|
+
headers
|
|
453
|
+
)) {
|
|
454
|
+
if (!ENTITY_HEADER_NAMES.has(key.toLowerCase())) {
|
|
455
|
+
out[key] = value;
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
return out;
|
|
459
|
+
}
|
|
460
|
+
__name(stripEntityHeaders, "stripEntityHeaders");
|
|
461
|
+
function stripAuthorization(headers) {
|
|
462
|
+
const out = {};
|
|
463
|
+
if (headers === void 0) {
|
|
464
|
+
return out;
|
|
465
|
+
}
|
|
466
|
+
if (headers instanceof Headers) {
|
|
467
|
+
headers.forEach((value, key) => {
|
|
468
|
+
if (key.toLowerCase() !== "authorization") {
|
|
469
|
+
out[key] = value;
|
|
470
|
+
}
|
|
471
|
+
});
|
|
472
|
+
return out;
|
|
473
|
+
}
|
|
474
|
+
if (Array.isArray(headers)) {
|
|
475
|
+
for (const [key, value] of headers) {
|
|
476
|
+
if (key.toLowerCase() !== "authorization") {
|
|
477
|
+
out[key] = value;
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
return out;
|
|
481
|
+
}
|
|
482
|
+
for (const [key, value] of Object.entries(
|
|
483
|
+
headers
|
|
484
|
+
)) {
|
|
485
|
+
if (key.toLowerCase() !== "authorization") {
|
|
486
|
+
out[key] = value;
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
return out;
|
|
490
|
+
}
|
|
491
|
+
__name(stripAuthorization, "stripAuthorization");
|
|
143
492
|
function isTimeoutError(error) {
|
|
144
493
|
return error instanceof DOMException && (error.name === "TimeoutError" || error.name === "AbortError");
|
|
145
494
|
}
|
|
@@ -202,39 +551,6 @@ async function safeReadText(response) {
|
|
|
202
551
|
}
|
|
203
552
|
__name(safeReadText, "safeReadText");
|
|
204
553
|
|
|
205
|
-
// src/output/should-color.ts
|
|
206
|
-
function shouldColor() {
|
|
207
|
-
if (process.env.NO_COLOR !== void 0 && process.env.NO_COLOR !== "") {
|
|
208
|
-
return false;
|
|
209
|
-
}
|
|
210
|
-
return Boolean(process.stdout.isTTY);
|
|
211
|
-
}
|
|
212
|
-
__name(shouldColor, "shouldColor");
|
|
213
|
-
|
|
214
|
-
// src/output/colors.ts
|
|
215
|
-
var ANSI = {
|
|
216
|
-
reset: "\x1B[0m",
|
|
217
|
-
green: "\x1B[32m",
|
|
218
|
-
red: "\x1B[31m",
|
|
219
|
-
cyan: "\x1B[36m",
|
|
220
|
-
dim: "\x1B[2m",
|
|
221
|
-
bold: "\x1B[1m",
|
|
222
|
-
orange: "\x1B[38;5;208m",
|
|
223
|
-
yellow: "\x1B[38;5;178m"
|
|
224
|
-
};
|
|
225
|
-
function wrap(code, text3) {
|
|
226
|
-
if (!shouldColor()) {
|
|
227
|
-
return text3;
|
|
228
|
-
}
|
|
229
|
-
return `${code}${text3}${ANSI.reset}`;
|
|
230
|
-
}
|
|
231
|
-
__name(wrap, "wrap");
|
|
232
|
-
var green = /* @__PURE__ */ __name((text3) => wrap(ANSI.green, text3), "green");
|
|
233
|
-
var red = /* @__PURE__ */ __name((text3) => wrap(ANSI.red, text3), "red");
|
|
234
|
-
var cyan = /* @__PURE__ */ __name((text3) => wrap(ANSI.cyan, text3), "cyan");
|
|
235
|
-
var bold = /* @__PURE__ */ __name((text3) => wrap(ANSI.bold, text3), "bold");
|
|
236
|
-
var yellow = /* @__PURE__ */ __name((text3) => wrap(ANSI.yellow, text3), "yellow");
|
|
237
|
-
|
|
238
554
|
// src/output/json.ts
|
|
239
555
|
function printJson(data) {
|
|
240
556
|
console.log(JSON.stringify(data, null, 2));
|
|
@@ -1148,8 +1464,8 @@ import { z as z36 } from "zod";
|
|
|
1148
1464
|
import { z as z37 } from "zod";
|
|
1149
1465
|
import { z as z38 } from "zod";
|
|
1150
1466
|
import { z as z39 } from "zod";
|
|
1151
|
-
import { z as z40 } from "zod";
|
|
1152
1467
|
import { z as z41 } from "zod";
|
|
1468
|
+
import { z as z40 } from "zod";
|
|
1153
1469
|
import { z as z42 } from "zod";
|
|
1154
1470
|
import { z as z43 } from "zod";
|
|
1155
1471
|
import { z as z44 } from "zod";
|
|
@@ -1159,11 +1475,13 @@ import { z as z47 } from "zod";
|
|
|
1159
1475
|
import { z as z48 } from "zod";
|
|
1160
1476
|
import { z as z49 } from "zod";
|
|
1161
1477
|
import { z as z50 } from "zod";
|
|
1162
|
-
import { z as z52 } from "zod";
|
|
1163
1478
|
import { z as z51 } from "zod";
|
|
1164
|
-
import { z as
|
|
1479
|
+
import { z as z52 } from "zod";
|
|
1165
1480
|
import { z as z54 } from "zod";
|
|
1481
|
+
import { z as z53 } from "zod";
|
|
1166
1482
|
import { z as z55 } from "zod";
|
|
1483
|
+
import { z as z56 } from "zod";
|
|
1484
|
+
import { z as z57 } from "zod";
|
|
1167
1485
|
|
|
1168
1486
|
// ../node_modules/.pnpm/jsonrepair@3.13.2/node_modules/jsonrepair/lib/esm/utils/JSONRepairError.js
|
|
1169
1487
|
var JSONRepairError = class extends Error {
|
|
@@ -3464,6 +3782,16 @@ var teamClaritySettingsSchema = z11.object({
|
|
|
3464
3782
|
annualRevenue: z11.number().nullable().optional(),
|
|
3465
3783
|
isUserConfigured: z11.boolean()
|
|
3466
3784
|
});
|
|
3785
|
+
var updateTeamClaritySettingsSchema = z11.object({
|
|
3786
|
+
teamSize: z11.int().positive().max(1e4).optional(),
|
|
3787
|
+
averageHourlyRate: z11.number().positive().max(1e4).optional(),
|
|
3788
|
+
emailReportsEnabled: z11.boolean().optional(),
|
|
3789
|
+
emailReportIncludeSummary: z11.boolean().optional(),
|
|
3790
|
+
emailReportIncludeCaptures: z11.boolean().optional(),
|
|
3791
|
+
companyName: z11.string().trim().max(255).nullable().optional(),
|
|
3792
|
+
industry: z11.string().trim().max(255).nullable().optional(),
|
|
3793
|
+
annualRevenue: z11.number().nonnegative().nullable().optional()
|
|
3794
|
+
});
|
|
3467
3795
|
var clarityCaptureSchema = z11.object({
|
|
3468
3796
|
id: z11.guid(),
|
|
3469
3797
|
processId: z11.guid(),
|
|
@@ -3510,13 +3838,19 @@ var clarityProcessListItemSchema = z11.object({
|
|
|
3510
3838
|
}).optional(),
|
|
3511
3839
|
insightsCount: z11.number(),
|
|
3512
3840
|
hasAnalysis: z11.boolean(),
|
|
3513
|
-
pendingInvitationCount: z11.number()
|
|
3841
|
+
pendingInvitationCount: z11.number(),
|
|
3514
3842
|
summary: z11.string().nullable().optional(),
|
|
3515
3843
|
vulnerabilityCount: z11.number().optional(),
|
|
3516
3844
|
contributors: z11.array(z11.object({ userId: z11.string(), userName: z11.string() })).optional(),
|
|
3517
3845
|
createdAt: z11.coerce.date(),
|
|
3518
3846
|
createdByName: z11.string().optional()
|
|
3519
3847
|
});
|
|
3848
|
+
var clarityProcessListResponseSchema = z11.object({
|
|
3849
|
+
data: z11.array(clarityProcessListItemSchema),
|
|
3850
|
+
total: z11.number(),
|
|
3851
|
+
limit: z11.number(),
|
|
3852
|
+
offset: z11.number()
|
|
3853
|
+
});
|
|
3520
3854
|
var GENERATION_STEP_STATUSES = [
|
|
3521
3855
|
"pending",
|
|
3522
3856
|
"in_progress",
|
|
@@ -3551,6 +3885,13 @@ var clarityProcessDetailSchema = clarityProcessSchema.extend({
|
|
|
3551
3885
|
var createClarityProcessSchema = z11.object({
|
|
3552
3886
|
name: z11.string().min(1).max(255).optional()
|
|
3553
3887
|
});
|
|
3888
|
+
var createClarityProcessResponseSchema = z11.object({
|
|
3889
|
+
id: z11.guid(),
|
|
3890
|
+
name: z11.string(),
|
|
3891
|
+
status: clarityProcessStatusSchema,
|
|
3892
|
+
version: z11.union([z11.literal(1), z11.literal(2)]),
|
|
3893
|
+
createdAt: z11.string()
|
|
3894
|
+
});
|
|
3554
3895
|
var updateClarityProcessSchema = z11.object({
|
|
3555
3896
|
name: z11.string().min(1).max(255).optional(),
|
|
3556
3897
|
customPrompt: z11.string().max(5e3).nullable().optional()
|
|
@@ -4115,7 +4456,12 @@ var proposalSummaryAgentTransformationProposalSchema = z13.object({
|
|
|
4115
4456
|
'One short paragraph (3-5 sentences) describing the proposed transformed process at a glance. Surfaced at the top of the transformation-proposal tab so reviewers can orient themselves before scanning the steps. Example: "Customers self-order on a tablet at the bar; a smart tap auto-pours the chosen beer into a labelled glass, which the customer collects from the pickup counter once payment clears."'
|
|
4116
4457
|
)
|
|
4117
4458
|
});
|
|
4118
|
-
var
|
|
4459
|
+
var projectedImpactAgentTransformationProposalSchema = z13.object({
|
|
4460
|
+
projectedImpact: z13.string().min(1).nullable().optional().describe(
|
|
4461
|
+
"Answer-first, MECE-structured business case. 4-8 sentences of prose + one markdown assumptions table. Null when team context is insufficient to produce any quantitative or qualitative assessment."
|
|
4462
|
+
)
|
|
4463
|
+
});
|
|
4464
|
+
var postprocessClarityTransformationProposalDataSchema = clarityTransformationProposalDataObjectSchema.extend(proposalSummaryAgentTransformationProposalSchema.shape).extend(projectedImpactAgentTransformationProposalSchema.shape).extend({});
|
|
4119
4465
|
var clarityV2SnapshotStatusSchema = z13.enum(["live", "historic"]);
|
|
4120
4466
|
var clarityV2SnapshotCreatorTypeSchema = z13.enum(["human", "ai"]);
|
|
4121
4467
|
var versioningApiFields = {
|
|
@@ -6447,25 +6793,78 @@ var clarityOverviewDetailSchema = z39.object({
|
|
|
6447
6793
|
createdAt: z39.coerce.date(),
|
|
6448
6794
|
updatedAt: z39.coerce.date()
|
|
6449
6795
|
});
|
|
6450
|
-
var
|
|
6451
|
-
|
|
6452
|
-
|
|
6453
|
-
|
|
6454
|
-
|
|
6455
|
-
|
|
6456
|
-
|
|
6457
|
-
|
|
6458
|
-
|
|
6459
|
-
|
|
6460
|
-
|
|
6461
|
-
|
|
6462
|
-
|
|
6463
|
-
|
|
6464
|
-
|
|
6465
|
-
|
|
6466
|
-
|
|
6467
|
-
|
|
6468
|
-
|
|
6796
|
+
var createTeamInviteLinkRequestSchema = z40.object({
|
|
6797
|
+
frontendUrl: z40.url()
|
|
6798
|
+
});
|
|
6799
|
+
var getTeamInviteLinkQuerySchema = z40.object({
|
|
6800
|
+
frontendUrl: z40.url()
|
|
6801
|
+
});
|
|
6802
|
+
var teamInviteLinkCreatorSchema = z40.object({
|
|
6803
|
+
id: z40.guid(),
|
|
6804
|
+
name: z40.string().nullable(),
|
|
6805
|
+
email: z40.email()
|
|
6806
|
+
});
|
|
6807
|
+
var teamInviteLinkSchema = z40.object({
|
|
6808
|
+
id: z40.guid(),
|
|
6809
|
+
url: z40.url().optional(),
|
|
6810
|
+
createdAt: z40.string(),
|
|
6811
|
+
createdBy: teamInviteLinkCreatorSchema
|
|
6812
|
+
});
|
|
6813
|
+
var getTeamInviteLinkResponseSchema = z40.object({
|
|
6814
|
+
hasLink: z40.boolean(),
|
|
6815
|
+
link: teamInviteLinkSchema.optional()
|
|
6816
|
+
});
|
|
6817
|
+
var joinLinkInfoResponseSchema = z40.object({
|
|
6818
|
+
valid: z40.boolean(),
|
|
6819
|
+
teamName: z40.string().optional(),
|
|
6820
|
+
teamId: z40.guid().optional(),
|
|
6821
|
+
reason: z40.enum(["invalid", "expired"]).optional()
|
|
6822
|
+
});
|
|
6823
|
+
var acceptJoinLinkResponseSchema = z40.object({
|
|
6824
|
+
success: z40.boolean(),
|
|
6825
|
+
teamId: z40.guid()
|
|
6826
|
+
});
|
|
6827
|
+
var createClarityProcessInviteLinkRequestSchema = z41.object({
|
|
6828
|
+
frontendUrl: z41.url()
|
|
6829
|
+
});
|
|
6830
|
+
var getClarityProcessInviteLinkQuerySchema = z41.object({
|
|
6831
|
+
frontendUrl: z41.url()
|
|
6832
|
+
});
|
|
6833
|
+
var clarityProcessInviteLinkSchema = teamInviteLinkSchema;
|
|
6834
|
+
var getClarityProcessInviteLinkResponseSchema = z41.object({
|
|
6835
|
+
hasLink: z41.boolean(),
|
|
6836
|
+
link: clarityProcessInviteLinkSchema.optional()
|
|
6837
|
+
});
|
|
6838
|
+
var clarityJoinLinkInfoResponseSchema = z41.object({
|
|
6839
|
+
valid: z41.boolean(),
|
|
6840
|
+
processName: z41.string().optional(),
|
|
6841
|
+
processId: z41.guid().optional(),
|
|
6842
|
+
teamId: z41.guid().optional(),
|
|
6843
|
+
reason: z41.enum(["invalid", "expired"]).optional()
|
|
6844
|
+
});
|
|
6845
|
+
var acceptClarityJoinLinkResponseSchema = z41.object({
|
|
6846
|
+
success: z41.boolean(),
|
|
6847
|
+
processId: z41.guid()
|
|
6848
|
+
});
|
|
6849
|
+
var credentialPreviewSchema = z42.object({
|
|
6850
|
+
id: z42.guid().describe("Credential ID"),
|
|
6851
|
+
domain: z42.string().describe("Domain for the credential"),
|
|
6852
|
+
username: z42.string().nullable().describe("Username (if any)"),
|
|
6853
|
+
hasEnabledTOTP: z42.boolean().describe("Whether TOTP is enabled"),
|
|
6854
|
+
hasPassword: z42.boolean().describe("Whether a password is stored"),
|
|
6855
|
+
user_id: z42.string().nullable().describe("Owner user id; null when shared with the team")
|
|
6856
|
+
});
|
|
6857
|
+
var otpResponseSchema = z42.object({
|
|
6858
|
+
code: z42.string().describe("The TOTP code"),
|
|
6859
|
+
expiresAt: z42.number().describe("Expiration timestamp in milliseconds")
|
|
6860
|
+
});
|
|
6861
|
+
var encryptedDataSchema = z42.object({
|
|
6862
|
+
encrypted_data: z42.string().describe("Base64-encoded encrypted data"),
|
|
6863
|
+
key_version: z42.string().describe("KMS key version or 'base64' for dev")
|
|
6864
|
+
});
|
|
6865
|
+
var credentialDetailSchema = z42.object({
|
|
6866
|
+
domain: z42.string().describe("Domain for the credential"),
|
|
6867
|
+
username: z42.string().nullable().describe("Username (if any)"),
|
|
6469
6868
|
password: encryptedDataSchema.nullable().describe("Encrypted password data")
|
|
6470
6869
|
});
|
|
6471
6870
|
var FEATURE_FLAG_CATALOGUE = {
|
|
@@ -6484,6 +6883,11 @@ var FEATURE_FLAG_CATALOGUE = {
|
|
|
6484
6883
|
defaultValue: false,
|
|
6485
6884
|
description: "Enables team-wide agentic memory. When active, newly created agents default to persistent memory and existing agents can also be enabled for persistent memory across runs."
|
|
6486
6885
|
},
|
|
6886
|
+
PULSE: {
|
|
6887
|
+
key: "pulse",
|
|
6888
|
+
defaultValue: false,
|
|
6889
|
+
description: "Enables Duvo Pulse \u2014 the agent-generated visualization Artifacts surface. When disabled, the side-nav entry is hidden and every /v1/artifacts/* endpoint returns 404; the cc-server ingestion callback is unaffected."
|
|
6890
|
+
},
|
|
6487
6891
|
AGENT_SELF_SCHEDULING: {
|
|
6488
6892
|
key: "agent_self_scheduling",
|
|
6489
6893
|
defaultValue: false,
|
|
@@ -6539,11 +6943,6 @@ var FEATURE_FLAG_CATALOGUE = {
|
|
|
6539
6943
|
defaultValue: false,
|
|
6540
6944
|
description: "Routes voice-only Clarity interviews to the ElevenLabs conversational provider. When off, voice-only interviews use OpenAI Realtime. Screenshare interviews always use OpenAI Realtime."
|
|
6541
6945
|
},
|
|
6542
|
-
CLARITY_V2: {
|
|
6543
|
-
key: "clarity_v2",
|
|
6544
|
-
defaultValue: false,
|
|
6545
|
-
description: "Enables the Clarity v2 architecture: typed snapshot tables (clarity_current_process, clarity_transformation_proposal), the P1-P4 pipelines, the v2 read model, and the v2 process page (/clarity/v2/[id]) with end-to-end use of /v1/clarity-v2/* endpoints."
|
|
6546
|
-
},
|
|
6547
6946
|
DYNAMIC_BUILDER_ISLAND: {
|
|
6548
6947
|
key: "dynamic_builder_island",
|
|
6549
6948
|
defaultValue: false,
|
|
@@ -6622,82 +7021,82 @@ function coerceFlagValue(value) {
|
|
|
6622
7021
|
}
|
|
6623
7022
|
__name(coerceFlagValue, "coerceFlagValue");
|
|
6624
7023
|
__name2(coerceFlagValue, "coerceFlagValue");
|
|
6625
|
-
var teamFileItemSchema =
|
|
6626
|
-
id:
|
|
6627
|
-
name:
|
|
6628
|
-
path:
|
|
6629
|
-
created_at:
|
|
6630
|
-
updated_at:
|
|
6631
|
-
metadata:
|
|
6632
|
-
mimetype:
|
|
6633
|
-
size:
|
|
7024
|
+
var teamFileItemSchema = z43.object({
|
|
7025
|
+
id: z43.string(),
|
|
7026
|
+
name: z43.string(),
|
|
7027
|
+
path: z43.string(),
|
|
7028
|
+
created_at: z43.string().optional(),
|
|
7029
|
+
updated_at: z43.string().optional(),
|
|
7030
|
+
metadata: z43.object({
|
|
7031
|
+
mimetype: z43.string().optional(),
|
|
7032
|
+
size: z43.number().optional()
|
|
6634
7033
|
}).nullable().optional()
|
|
6635
7034
|
});
|
|
6636
|
-
var listTeamFilesResponseSchema =
|
|
6637
|
-
files:
|
|
6638
|
-
});
|
|
6639
|
-
var createTeamFileUploadUrlBodySchema =
|
|
6640
|
-
fileName:
|
|
6641
|
-
contentType:
|
|
6642
|
-
});
|
|
6643
|
-
var createTeamFileUploadUrlResponseSchema =
|
|
6644
|
-
signedUrl:
|
|
6645
|
-
expiresAt:
|
|
6646
|
-
filePath:
|
|
6647
|
-
});
|
|
6648
|
-
var renameTeamFileBodySchema =
|
|
6649
|
-
relativePath:
|
|
6650
|
-
newFilenameOnly:
|
|
6651
|
-
});
|
|
6652
|
-
var teamFileSuccessResponseSchema =
|
|
6653
|
-
success:
|
|
6654
|
-
});
|
|
6655
|
-
var teamFileDownloadUrlResponseSchema =
|
|
6656
|
-
url:
|
|
6657
|
-
expiresAt:
|
|
6658
|
-
});
|
|
6659
|
-
var teamFileContentResponseSchema =
|
|
6660
|
-
content:
|
|
6661
|
-
path:
|
|
6662
|
-
contentType:
|
|
6663
|
-
});
|
|
6664
|
-
var updateTeamFileContentBodySchema =
|
|
6665
|
-
content:
|
|
6666
|
-
});
|
|
6667
|
-
var globalAdminApiSchema =
|
|
6668
|
-
id:
|
|
6669
|
-
email:
|
|
6670
|
-
userId:
|
|
6671
|
-
userName:
|
|
6672
|
-
addedByUserId:
|
|
6673
|
-
createdAt:
|
|
6674
|
-
});
|
|
6675
|
-
var globalAdminListResponseSchema =
|
|
6676
|
-
admins:
|
|
6677
|
-
});
|
|
6678
|
-
var globalAdminSearchResponseSchema =
|
|
6679
|
-
users:
|
|
6680
|
-
|
|
6681
|
-
id:
|
|
6682
|
-
name:
|
|
6683
|
-
email:
|
|
6684
|
-
createdAt:
|
|
7035
|
+
var listTeamFilesResponseSchema = z43.object({
|
|
7036
|
+
files: z43.array(teamFileItemSchema)
|
|
7037
|
+
});
|
|
7038
|
+
var createTeamFileUploadUrlBodySchema = z43.object({
|
|
7039
|
+
fileName: z43.string().min(1),
|
|
7040
|
+
contentType: z43.string().min(1)
|
|
7041
|
+
});
|
|
7042
|
+
var createTeamFileUploadUrlResponseSchema = z43.object({
|
|
7043
|
+
signedUrl: z43.url(),
|
|
7044
|
+
expiresAt: z43.iso.datetime(),
|
|
7045
|
+
filePath: z43.string()
|
|
7046
|
+
});
|
|
7047
|
+
var renameTeamFileBodySchema = z43.object({
|
|
7048
|
+
relativePath: z43.string().min(1),
|
|
7049
|
+
newFilenameOnly: z43.string().min(1)
|
|
7050
|
+
});
|
|
7051
|
+
var teamFileSuccessResponseSchema = z43.object({
|
|
7052
|
+
success: z43.boolean()
|
|
7053
|
+
});
|
|
7054
|
+
var teamFileDownloadUrlResponseSchema = z43.object({
|
|
7055
|
+
url: z43.url(),
|
|
7056
|
+
expiresAt: z43.iso.datetime()
|
|
7057
|
+
});
|
|
7058
|
+
var teamFileContentResponseSchema = z43.object({
|
|
7059
|
+
content: z43.string(),
|
|
7060
|
+
path: z43.string(),
|
|
7061
|
+
contentType: z43.string().optional()
|
|
7062
|
+
});
|
|
7063
|
+
var updateTeamFileContentBodySchema = z43.object({
|
|
7064
|
+
content: z43.string()
|
|
7065
|
+
});
|
|
7066
|
+
var globalAdminApiSchema = z44.object({
|
|
7067
|
+
id: z44.guid(),
|
|
7068
|
+
email: z44.string(),
|
|
7069
|
+
userId: z44.guid(),
|
|
7070
|
+
userName: z44.string().nullable(),
|
|
7071
|
+
addedByUserId: z44.guid().nullable(),
|
|
7072
|
+
createdAt: z44.string()
|
|
7073
|
+
});
|
|
7074
|
+
var globalAdminListResponseSchema = z44.object({
|
|
7075
|
+
admins: z44.array(globalAdminApiSchema)
|
|
7076
|
+
});
|
|
7077
|
+
var globalAdminSearchResponseSchema = z44.object({
|
|
7078
|
+
users: z44.array(
|
|
7079
|
+
z44.object({
|
|
7080
|
+
id: z44.guid(),
|
|
7081
|
+
name: z44.string().nullable(),
|
|
7082
|
+
email: z44.string(),
|
|
7083
|
+
createdAt: z44.string().nullable()
|
|
6685
7084
|
})
|
|
6686
7085
|
)
|
|
6687
7086
|
});
|
|
6688
|
-
var globalAdminCreateRequestSchema =
|
|
6689
|
-
userId:
|
|
7087
|
+
var globalAdminCreateRequestSchema = z44.object({
|
|
7088
|
+
userId: z44.guid()
|
|
6690
7089
|
});
|
|
6691
|
-
var globalAdminCreateResponseSchema =
|
|
7090
|
+
var globalAdminCreateResponseSchema = z44.object({
|
|
6692
7091
|
admin: globalAdminApiSchema
|
|
6693
7092
|
});
|
|
6694
|
-
var globalAdminDeleteResponseSchema =
|
|
6695
|
-
success:
|
|
7093
|
+
var globalAdminDeleteResponseSchema = z44.object({
|
|
7094
|
+
success: z44.literal(true)
|
|
6696
7095
|
});
|
|
6697
|
-
var adminAccessCheckResponseSchema =
|
|
6698
|
-
isGlobalAdmin:
|
|
7096
|
+
var adminAccessCheckResponseSchema = z44.object({
|
|
7097
|
+
isGlobalAdmin: z44.boolean()
|
|
6699
7098
|
});
|
|
6700
|
-
var TransportTypeSchema =
|
|
7099
|
+
var TransportTypeSchema = z45.enum(["stdio", "sse", "http"]);
|
|
6701
7100
|
var INTEGRATION_SLUGS = [
|
|
6702
7101
|
"googlecalendar",
|
|
6703
7102
|
"google-calendar",
|
|
@@ -6775,7 +7174,7 @@ var INTEGRATION_SLUGS = [
|
|
|
6775
7174
|
"notion-native",
|
|
6776
7175
|
"granola"
|
|
6777
7176
|
];
|
|
6778
|
-
var IntegrationSlugSchema =
|
|
7177
|
+
var IntegrationSlugSchema = z45.enum(INTEGRATION_SLUGS);
|
|
6779
7178
|
function isIntegrationSlug(value) {
|
|
6780
7179
|
return INTEGRATION_SLUGS.includes(value);
|
|
6781
7180
|
}
|
|
@@ -6786,110 +7185,110 @@ function isCaseQueueIntegrationType(type) {
|
|
|
6786
7185
|
}
|
|
6787
7186
|
__name(isCaseQueueIntegrationType, "isCaseQueueIntegrationType");
|
|
6788
7187
|
__name2(isCaseQueueIntegrationType, "isCaseQueueIntegrationType");
|
|
6789
|
-
var integrationResponseSchema =
|
|
6790
|
-
id:
|
|
6791
|
-
name:
|
|
6792
|
-
type:
|
|
6793
|
-
provider:
|
|
6794
|
-
user_id:
|
|
6795
|
-
team_id:
|
|
6796
|
-
server_url:
|
|
7188
|
+
var integrationResponseSchema = z45.object({
|
|
7189
|
+
id: z45.string(),
|
|
7190
|
+
name: z45.string(),
|
|
7191
|
+
type: z45.string(),
|
|
7192
|
+
provider: z45.string(),
|
|
7193
|
+
user_id: z45.string().nullable(),
|
|
7194
|
+
team_id: z45.string(),
|
|
7195
|
+
server_url: z45.string().optional(),
|
|
6797
7196
|
transport_type: TransportTypeSchema.optional(),
|
|
6798
|
-
auth_method:
|
|
6799
|
-
composio_mcp_id:
|
|
6800
|
-
custom_integration_id:
|
|
6801
|
-
icon_url:
|
|
6802
|
-
oauth_provider:
|
|
6803
|
-
oauth_scopes:
|
|
6804
|
-
has_headers:
|
|
6805
|
-
has_oauth_tokens:
|
|
7197
|
+
auth_method: z45.string().nullable().optional(),
|
|
7198
|
+
composio_mcp_id: z45.string().nullable().default(null),
|
|
7199
|
+
custom_integration_id: z45.string().nullable().optional(),
|
|
7200
|
+
icon_url: z45.string().nullable().optional(),
|
|
7201
|
+
oauth_provider: z45.string().nullable().optional(),
|
|
7202
|
+
oauth_scopes: z45.array(z45.string()).nullable().optional(),
|
|
7203
|
+
has_headers: z45.boolean().optional(),
|
|
7204
|
+
has_oauth_tokens: z45.boolean().optional(),
|
|
6806
7205
|
/**
|
|
6807
7206
|
* For connection rows (user instances), this is the FK to the team-level
|
|
6808
7207
|
* integration this connection was created against. Null on catalog rows
|
|
6809
7208
|
* (where `id` already represents the integration itself) and on
|
|
6810
7209
|
* custom-integration-backed connections.
|
|
6811
7210
|
*/
|
|
6812
|
-
integration_id:
|
|
7211
|
+
integration_id: z45.string().nullable().optional(),
|
|
6813
7212
|
/**
|
|
6814
7213
|
* Derived from `user_id IS NULL`. True for team-shared connections, false
|
|
6815
7214
|
* for personal connections. Mirrors the Shared Logins API contract — FE
|
|
6816
7215
|
* never sees the null sentinel.
|
|
6817
7216
|
*/
|
|
6818
|
-
shared:
|
|
7217
|
+
shared: z45.boolean().optional(),
|
|
6819
7218
|
/**
|
|
6820
7219
|
* Original creator of the connection. Populated lazily on first share —
|
|
6821
7220
|
* stays NULL for legacy personal rows that were never shared.
|
|
6822
7221
|
*/
|
|
6823
|
-
created_by:
|
|
6824
|
-
created_at:
|
|
6825
|
-
updated_at:
|
|
6826
|
-
});
|
|
6827
|
-
var integrationsListResponseSchema =
|
|
6828
|
-
integrations:
|
|
6829
|
-
total:
|
|
6830
|
-
limit:
|
|
6831
|
-
offset:
|
|
6832
|
-
});
|
|
6833
|
-
var integrationsListRequestQuerySchema =
|
|
6834
|
-
type:
|
|
7222
|
+
created_by: z45.string().nullable().optional(),
|
|
7223
|
+
created_at: z45.iso.datetime(),
|
|
7224
|
+
updated_at: z45.iso.datetime()
|
|
7225
|
+
});
|
|
7226
|
+
var integrationsListResponseSchema = z45.object({
|
|
7227
|
+
integrations: z45.array(integrationResponseSchema),
|
|
7228
|
+
total: z45.int().min(0),
|
|
7229
|
+
limit: z45.int().min(1),
|
|
7230
|
+
offset: z45.int().min(0)
|
|
7231
|
+
});
|
|
7232
|
+
var integrationsListRequestQuerySchema = z45.object({
|
|
7233
|
+
type: z45.string().optional(),
|
|
6835
7234
|
// Default high (100) because both the team integration catalog and the
|
|
6836
7235
|
// user's connections are naturally small per team; existing dashboard
|
|
6837
7236
|
// callers expect "everything" without explicit pagination.
|
|
6838
|
-
limit:
|
|
6839
|
-
offset:
|
|
6840
|
-
});
|
|
6841
|
-
var connectIntegrationResponseSchema =
|
|
6842
|
-
integration_id:
|
|
6843
|
-
mcp_url:
|
|
6844
|
-
});
|
|
6845
|
-
var testIntegrationResponseSchema =
|
|
6846
|
-
success:
|
|
6847
|
-
tools:
|
|
6848
|
-
|
|
6849
|
-
name:
|
|
6850
|
-
description:
|
|
7237
|
+
limit: z45.coerce.number().int().min(1).max(100).prefault(100),
|
|
7238
|
+
offset: z45.coerce.number().int().min(0).prefault(0)
|
|
7239
|
+
});
|
|
7240
|
+
var connectIntegrationResponseSchema = z45.object({
|
|
7241
|
+
integration_id: z45.string(),
|
|
7242
|
+
mcp_url: z45.string()
|
|
7243
|
+
});
|
|
7244
|
+
var testIntegrationResponseSchema = z45.object({
|
|
7245
|
+
success: z45.boolean(),
|
|
7246
|
+
tools: z45.array(
|
|
7247
|
+
z45.object({
|
|
7248
|
+
name: z45.string(),
|
|
7249
|
+
description: z45.string().optional(),
|
|
6851
7250
|
// Tool input schemas are JSON-Schema documents whose internal shape
|
|
6852
7251
|
// varies per MCP server. Modeled as a record of unknowns (matching
|
|
6853
7252
|
// the upstream MCP SDK's `{ [x: string]: unknown; type: "object" }`
|
|
6854
7253
|
// typing) so that producers can pass `tool.inputSchema` straight
|
|
6855
7254
|
// through without an unsafe cast — using `z.json()` here would force
|
|
6856
7255
|
// every caller to cast since the SDK does not assert JSON-ness.
|
|
6857
|
-
input_schema:
|
|
7256
|
+
input_schema: z45.record(z45.string(), z45.unknown()).optional()
|
|
6858
7257
|
})
|
|
6859
7258
|
).optional(),
|
|
6860
|
-
error:
|
|
7259
|
+
error: z45.string().optional()
|
|
6861
7260
|
});
|
|
6862
|
-
var integrationCredentialsResponseSchema =
|
|
6863
|
-
id:
|
|
6864
|
-
headers:
|
|
7261
|
+
var integrationCredentialsResponseSchema = z45.object({
|
|
7262
|
+
id: z45.guid(),
|
|
7263
|
+
headers: z45.record(z45.string(), z45.string())
|
|
6865
7264
|
});
|
|
6866
|
-
var deleteIntegrationResponseSchema =
|
|
6867
|
-
success:
|
|
6868
|
-
message:
|
|
7265
|
+
var deleteIntegrationResponseSchema = z45.object({
|
|
7266
|
+
success: z45.boolean(),
|
|
7267
|
+
message: z45.string()
|
|
6869
7268
|
});
|
|
6870
|
-
var checkDcrSupportResponseSchema =
|
|
6871
|
-
supports_dcr:
|
|
6872
|
-
authorization_endpoint:
|
|
6873
|
-
scopes:
|
|
7269
|
+
var checkDcrSupportResponseSchema = z45.object({
|
|
7270
|
+
supports_dcr: z45.boolean(),
|
|
7271
|
+
authorization_endpoint: z45.string().optional(),
|
|
7272
|
+
scopes: z45.array(z45.string()).optional()
|
|
6874
7273
|
});
|
|
6875
|
-
var authorizationUrlResponseSchema =
|
|
6876
|
-
authorization_url:
|
|
7274
|
+
var authorizationUrlResponseSchema = z45.object({
|
|
7275
|
+
authorization_url: z45.string().describe("OAuth provider authorization URL to open in a browser")
|
|
6877
7276
|
});
|
|
6878
|
-
var startComposioConnectionResponseSchema =
|
|
6879
|
-
redirect_url:
|
|
7277
|
+
var startComposioConnectionResponseSchema = z45.object({
|
|
7278
|
+
redirect_url: z45.string().nullable().describe(
|
|
6880
7279
|
"Browser URL the user must visit to complete authorization. Null when the connection was completed synchronously (e.g. for API_KEY auth that did not require a browser flow)."
|
|
6881
7280
|
),
|
|
6882
|
-
status:
|
|
6883
|
-
connected_account_id:
|
|
7281
|
+
status: z45.string().nullable().describe("Composio connection status, e.g. INITIATED or ACTIVE."),
|
|
7282
|
+
connected_account_id: z45.string().describe(
|
|
6884
7283
|
"Composio connected-account ID, passed to /v1/connections/composio/finalize to complete the flow."
|
|
6885
7284
|
)
|
|
6886
7285
|
});
|
|
6887
|
-
var createCustomIntegrationRequestSchema =
|
|
6888
|
-
name:
|
|
6889
|
-
auth_method:
|
|
6890
|
-
server_url:
|
|
6891
|
-
oauth_client_id:
|
|
6892
|
-
oauth_client_secret:
|
|
7286
|
+
var createCustomIntegrationRequestSchema = z45.object({
|
|
7287
|
+
name: z45.string().min(1, "Name is required"),
|
|
7288
|
+
auth_method: z45.enum(["url", "apikey", "headers", "oauth"]),
|
|
7289
|
+
server_url: z45.url("Must be a valid URL"),
|
|
7290
|
+
oauth_client_id: z45.string().min(1).optional(),
|
|
7291
|
+
oauth_client_secret: z45.string().min(1).optional()
|
|
6893
7292
|
}).refine(
|
|
6894
7293
|
(data) => {
|
|
6895
7294
|
const hasClientId = !!data.oauth_client_id;
|
|
@@ -6900,116 +7299,116 @@ var createCustomIntegrationRequestSchema = z43.object({
|
|
|
6900
7299
|
error: "Both OAuth Client ID and Client Secret are required, or leave both empty for automatic registration"
|
|
6901
7300
|
}
|
|
6902
7301
|
);
|
|
6903
|
-
var createIntegrationRequestSchema =
|
|
6904
|
-
name:
|
|
6905
|
-
server_url:
|
|
6906
|
-
type:
|
|
6907
|
-
provider:
|
|
6908
|
-
auth_method:
|
|
6909
|
-
custom_integration_id:
|
|
6910
|
-
headers:
|
|
6911
|
-
plaintext:
|
|
6912
|
-
secret:
|
|
7302
|
+
var createIntegrationRequestSchema = z45.object({
|
|
7303
|
+
name: z45.string().min(1, "Name is required"),
|
|
7304
|
+
server_url: z45.url("Must be a valid URL").optional(),
|
|
7305
|
+
type: z45.string().default("custom_mcp"),
|
|
7306
|
+
provider: z45.literal("user"),
|
|
7307
|
+
auth_method: z45.enum(["url", "apikey", "headers", "oauth"]),
|
|
7308
|
+
custom_integration_id: z45.guid().optional(),
|
|
7309
|
+
headers: z45.object({
|
|
7310
|
+
plaintext: z45.record(z45.string(), z45.string()).optional(),
|
|
7311
|
+
secret: z45.record(z45.string(), z45.string()).optional()
|
|
6913
7312
|
}).optional()
|
|
6914
7313
|
});
|
|
6915
|
-
var updateIntegrationRequestSchema =
|
|
6916
|
-
name:
|
|
6917
|
-
server_url:
|
|
6918
|
-
auth_method:
|
|
6919
|
-
headers:
|
|
6920
|
-
plaintext:
|
|
6921
|
-
secret:
|
|
7314
|
+
var updateIntegrationRequestSchema = z45.object({
|
|
7315
|
+
name: z45.string().min(1).optional(),
|
|
7316
|
+
server_url: z45.url().optional(),
|
|
7317
|
+
auth_method: z45.enum(["url", "oauth", "apikey", "headers"]).optional(),
|
|
7318
|
+
headers: z45.object({
|
|
7319
|
+
plaintext: z45.record(z45.string(), z45.string()).optional(),
|
|
7320
|
+
secret: z45.record(z45.string(), z45.string()).optional()
|
|
6922
7321
|
}).nullable().optional(),
|
|
6923
|
-
composio_mcp_id:
|
|
7322
|
+
composio_mcp_id: z45.string().nullable().optional(),
|
|
6924
7323
|
// Toggle team sharing. `true` makes the instance team-shared
|
|
6925
7324
|
// (`user_id = NULL`); `false` reverts it to personal owned by the caller.
|
|
6926
7325
|
// Rejected when the org-level "Connections sharing" setting is OFF and
|
|
6927
7326
|
// `shared === true`. Mirrors the Shared Logins update contract.
|
|
6928
|
-
shared:
|
|
7327
|
+
shared: z45.boolean().optional()
|
|
6929
7328
|
});
|
|
6930
|
-
var testIntegrationRequestSchema =
|
|
6931
|
-
server_url:
|
|
6932
|
-
headers:
|
|
7329
|
+
var testIntegrationRequestSchema = z45.object({
|
|
7330
|
+
server_url: z45.url().describe("MCP server URL to test"),
|
|
7331
|
+
headers: z45.record(z45.string(), z45.string()).optional().describe("Optional HTTP headers for authentication")
|
|
6933
7332
|
});
|
|
6934
7333
|
var JOB_LIST_SORT_COLUMNS = ["created_at"];
|
|
6935
|
-
var jobListSortColumnSchema =
|
|
6936
|
-
var jobListIssueSeveritySchema =
|
|
7334
|
+
var jobListSortColumnSchema = z46.enum(JOB_LIST_SORT_COLUMNS);
|
|
7335
|
+
var jobListIssueSeveritySchema = z46.enum(
|
|
6937
7336
|
ALL_EVALUATION_RUBRIC_SEVERITIES
|
|
6938
7337
|
);
|
|
6939
|
-
var jobListItemSchema =
|
|
6940
|
-
id:
|
|
6941
|
-
created_at:
|
|
6942
|
-
updated_at:
|
|
6943
|
-
started_at:
|
|
6944
|
-
completed_at:
|
|
7338
|
+
var jobListItemSchema = z46.object({
|
|
7339
|
+
id: z46.guid(),
|
|
7340
|
+
created_at: z46.coerce.date(),
|
|
7341
|
+
updated_at: z46.coerce.date(),
|
|
7342
|
+
started_at: z46.coerce.date().nullable(),
|
|
7343
|
+
completed_at: z46.coerce.date().nullable(),
|
|
6945
7344
|
status: agentRunStatusSchema,
|
|
6946
|
-
source:
|
|
6947
|
-
title:
|
|
6948
|
-
run_number:
|
|
7345
|
+
source: z46.string().nullable(),
|
|
7346
|
+
title: z46.string(),
|
|
7347
|
+
run_number: z46.number(),
|
|
6949
7348
|
// Assignment info
|
|
6950
|
-
agent_id:
|
|
6951
|
-
agent_name:
|
|
6952
|
-
build_id:
|
|
7349
|
+
agent_id: z46.guid(),
|
|
7350
|
+
agent_name: z46.string(),
|
|
7351
|
+
build_id: z46.guid(),
|
|
6953
7352
|
// User info
|
|
6954
|
-
user_id:
|
|
7353
|
+
user_id: z46.guid().nullable(),
|
|
6955
7354
|
// Case info
|
|
6956
|
-
case_queue_item_id:
|
|
6957
|
-
case_queue_id:
|
|
6958
|
-
case_queue_name:
|
|
6959
|
-
case_title:
|
|
6960
|
-
postponed_to:
|
|
6961
|
-
submitted_prompt_count:
|
|
7355
|
+
case_queue_item_id: z46.guid().nullable(),
|
|
7356
|
+
case_queue_id: z46.guid().nullable(),
|
|
7357
|
+
case_queue_name: z46.string().nullable(),
|
|
7358
|
+
case_title: z46.string().nullable(),
|
|
7359
|
+
postponed_to: z46.coerce.date().nullable(),
|
|
7360
|
+
submitted_prompt_count: z46.number().int().min(0),
|
|
6962
7361
|
eval_summaries: evalSummarySchema.nullable().optional()
|
|
6963
7362
|
});
|
|
6964
|
-
var jobListResponseSchema =
|
|
6965
|
-
data:
|
|
6966
|
-
total:
|
|
7363
|
+
var jobListResponseSchema = z46.object({
|
|
7364
|
+
data: z46.array(jobListItemSchema),
|
|
7365
|
+
total: z46.number()
|
|
6967
7366
|
});
|
|
6968
|
-
var jobFilterOptionsSchema =
|
|
6969
|
-
agents:
|
|
6970
|
-
|
|
6971
|
-
id:
|
|
6972
|
-
name:
|
|
6973
|
-
folder_id:
|
|
7367
|
+
var jobFilterOptionsSchema = z46.object({
|
|
7368
|
+
agents: z46.array(
|
|
7369
|
+
z46.object({
|
|
7370
|
+
id: z46.string(),
|
|
7371
|
+
name: z46.string(),
|
|
7372
|
+
folder_id: z46.string().nullable()
|
|
6974
7373
|
})
|
|
6975
7374
|
),
|
|
6976
|
-
folders:
|
|
6977
|
-
|
|
6978
|
-
id:
|
|
6979
|
-
name:
|
|
6980
|
-
parent_folder_id:
|
|
7375
|
+
folders: z46.array(
|
|
7376
|
+
z46.object({
|
|
7377
|
+
id: z46.string(),
|
|
7378
|
+
name: z46.string(),
|
|
7379
|
+
parent_folder_id: z46.string().nullable()
|
|
6981
7380
|
})
|
|
6982
7381
|
),
|
|
6983
|
-
users:
|
|
6984
|
-
|
|
6985
|
-
id:
|
|
6986
|
-
name:
|
|
6987
|
-
email:
|
|
7382
|
+
users: z46.array(
|
|
7383
|
+
z46.object({
|
|
7384
|
+
id: z46.string(),
|
|
7385
|
+
name: z46.string().nullable(),
|
|
7386
|
+
email: z46.string()
|
|
6988
7387
|
})
|
|
6989
7388
|
),
|
|
6990
|
-
caseQueues:
|
|
6991
|
-
});
|
|
6992
|
-
var mcpStepSchema =
|
|
6993
|
-
tool:
|
|
6994
|
-
params:
|
|
6995
|
-
fallbackSelectors:
|
|
6996
|
-
description:
|
|
6997
|
-
screenshot:
|
|
6998
|
-
snapshot:
|
|
6999
|
-
framePath:
|
|
7389
|
+
caseQueues: z46.array(z46.object({ id: z46.string(), name: z46.string() }))
|
|
7390
|
+
});
|
|
7391
|
+
var mcpStepSchema = z47.object({
|
|
7392
|
+
tool: z47.string().describe("MCP tool name (e.g., click, fill, navigate_page)"),
|
|
7393
|
+
params: z47.record(z47.string(), z47.unknown()).describe("Tool-specific parameters"),
|
|
7394
|
+
fallbackSelectors: z47.array(z47.string()).optional().describe("Alternative CSS selectors if primary fails"),
|
|
7395
|
+
description: z47.string().optional().describe("Human-readable step description"),
|
|
7396
|
+
screenshot: z47.string().optional().describe("Base64 screenshot at this step for visual context"),
|
|
7397
|
+
snapshot: z47.string().optional().describe("DOM snapshot in accessibility tree format at this step"),
|
|
7398
|
+
framePath: z47.array(z47.number()).optional().describe(
|
|
7000
7399
|
"Index-based path to the target iframe (e.g., [0] for first child iframe, [1, 0] for nested)"
|
|
7001
7400
|
)
|
|
7002
7401
|
});
|
|
7003
|
-
var mcpWorkflowSchema =
|
|
7004
|
-
name:
|
|
7005
|
-
startUrl:
|
|
7006
|
-
viewport:
|
|
7007
|
-
width:
|
|
7008
|
-
height:
|
|
7402
|
+
var mcpWorkflowSchema = z47.object({
|
|
7403
|
+
name: z47.string(),
|
|
7404
|
+
startUrl: z47.string(),
|
|
7405
|
+
viewport: z47.object({
|
|
7406
|
+
width: z47.number(),
|
|
7407
|
+
height: z47.number()
|
|
7009
7408
|
}),
|
|
7010
|
-
steps:
|
|
7409
|
+
steps: z47.array(mcpStepSchema)
|
|
7011
7410
|
});
|
|
7012
|
-
var MCP_WORKFLOW_JSON_SCHEMA =
|
|
7411
|
+
var MCP_WORKFLOW_JSON_SCHEMA = z47.toJSONSchema(mcpWorkflowSchema, {
|
|
7013
7412
|
reused: "inline"
|
|
7014
7413
|
});
|
|
7015
7414
|
var MCP_WORKFLOW_SCHEMA_DOCS = JSON.stringify(
|
|
@@ -7017,104 +7416,104 @@ var MCP_WORKFLOW_SCHEMA_DOCS = JSON.stringify(
|
|
|
7017
7416
|
null,
|
|
7018
7417
|
2
|
|
7019
7418
|
);
|
|
7020
|
-
var catalogPluginSchema =
|
|
7021
|
-
name:
|
|
7022
|
-
type:
|
|
7419
|
+
var catalogPluginSchema = z48.object({
|
|
7420
|
+
name: z48.string().describe("Identifier to pass in the build's plugins array."),
|
|
7421
|
+
type: z48.enum(["duvo-platform", "github"]).describe(
|
|
7023
7422
|
"Plugin source. 'duvo-platform' plugins are pre-baked into the Duvo runtime; 'github' plugins are downloaded from a user-supplied repository URL at run time."
|
|
7024
7423
|
),
|
|
7025
|
-
description:
|
|
7424
|
+
description: z48.string()
|
|
7026
7425
|
});
|
|
7027
|
-
var pluginCatalogResponseSchema =
|
|
7028
|
-
plugins:
|
|
7426
|
+
var pluginCatalogResponseSchema = z48.object({
|
|
7427
|
+
plugins: z48.array(catalogPluginSchema)
|
|
7029
7428
|
});
|
|
7030
|
-
var publicProfileSchema =
|
|
7031
|
-
id:
|
|
7032
|
-
name:
|
|
7033
|
-
email:
|
|
7034
|
-
teamId:
|
|
7429
|
+
var publicProfileSchema = z49.object({
|
|
7430
|
+
id: z49.guid(),
|
|
7431
|
+
name: z49.string().nullable(),
|
|
7432
|
+
email: z49.email(),
|
|
7433
|
+
teamId: z49.guid().nullable()
|
|
7035
7434
|
});
|
|
7036
|
-
var publicProfileResponseSchema =
|
|
7435
|
+
var publicProfileResponseSchema = z49.object({
|
|
7037
7436
|
profile: publicProfileSchema
|
|
7038
7437
|
});
|
|
7039
|
-
var elementSelectorsSchema =
|
|
7040
|
-
css:
|
|
7041
|
-
cssPath:
|
|
7042
|
-
xpath:
|
|
7043
|
-
testId:
|
|
7044
|
-
ariaSelector:
|
|
7045
|
-
text:
|
|
7438
|
+
var elementSelectorsSchema = z50.object({
|
|
7439
|
+
css: z50.string().optional(),
|
|
7440
|
+
cssPath: z50.string().optional(),
|
|
7441
|
+
xpath: z50.string().optional(),
|
|
7442
|
+
testId: z50.string().optional(),
|
|
7443
|
+
ariaSelector: z50.string().optional(),
|
|
7444
|
+
text: z50.string().optional()
|
|
7046
7445
|
});
|
|
7047
|
-
var elementInfoSchema =
|
|
7048
|
-
uid:
|
|
7446
|
+
var elementInfoSchema = z50.object({
|
|
7447
|
+
uid: z50.string().optional(),
|
|
7049
7448
|
selectors: elementSelectorsSchema,
|
|
7050
|
-
tagName:
|
|
7051
|
-
textContent:
|
|
7052
|
-
ariaLabel:
|
|
7053
|
-
computedRole:
|
|
7054
|
-
attributes:
|
|
7055
|
-
framePath:
|
|
7056
|
-
frameUrl:
|
|
7057
|
-
});
|
|
7058
|
-
var recordedEventSchema =
|
|
7059
|
-
id:
|
|
7060
|
-
type:
|
|
7061
|
-
timestamp:
|
|
7062
|
-
url:
|
|
7063
|
-
tabId:
|
|
7064
|
-
frameId:
|
|
7065
|
-
framePath:
|
|
7449
|
+
tagName: z50.string(),
|
|
7450
|
+
textContent: z50.string().optional(),
|
|
7451
|
+
ariaLabel: z50.string().optional(),
|
|
7452
|
+
computedRole: z50.string().optional(),
|
|
7453
|
+
attributes: z50.record(z50.string(), z50.string()).optional(),
|
|
7454
|
+
framePath: z50.array(z50.number()).optional(),
|
|
7455
|
+
frameUrl: z50.string().optional()
|
|
7456
|
+
});
|
|
7457
|
+
var recordedEventSchema = z50.looseObject({
|
|
7458
|
+
id: z50.string(),
|
|
7459
|
+
type: z50.string(),
|
|
7460
|
+
timestamp: z50.number(),
|
|
7461
|
+
url: z50.string(),
|
|
7462
|
+
tabId: z50.number().optional(),
|
|
7463
|
+
frameId: z50.number().optional(),
|
|
7464
|
+
framePath: z50.array(z50.number()).optional(),
|
|
7066
7465
|
element: elementInfoSchema.optional()
|
|
7067
7466
|
});
|
|
7068
|
-
var RedactedMcpServerConfigSchema =
|
|
7467
|
+
var RedactedMcpServerConfigSchema = z51.object({
|
|
7069
7468
|
type: TransportTypeSchema,
|
|
7070
7469
|
integrationSlug: IntegrationSlugSchema,
|
|
7071
|
-
instanceId:
|
|
7072
|
-
});
|
|
7073
|
-
var ThreadContextMessageSchema =
|
|
7074
|
-
role:
|
|
7075
|
-
content:
|
|
7076
|
-
});
|
|
7077
|
-
var ChatFileReferenceSchema =
|
|
7078
|
-
id:
|
|
7079
|
-
name:
|
|
7080
|
-
mimetype:
|
|
7081
|
-
size:
|
|
7082
|
-
platform:
|
|
7083
|
-
workspaceId:
|
|
7084
|
-
channelId:
|
|
7085
|
-
});
|
|
7086
|
-
var ResolvedSubAgentSchema =
|
|
7087
|
-
agentId:
|
|
7088
|
-
buildId:
|
|
7089
|
-
name:
|
|
7470
|
+
instanceId: z51.string().nullable()
|
|
7471
|
+
});
|
|
7472
|
+
var ThreadContextMessageSchema = z51.object({
|
|
7473
|
+
role: z51.enum(["user", "assistant"]),
|
|
7474
|
+
content: z51.string()
|
|
7475
|
+
});
|
|
7476
|
+
var ChatFileReferenceSchema = z51.object({
|
|
7477
|
+
id: z51.string(),
|
|
7478
|
+
name: z51.string(),
|
|
7479
|
+
mimetype: z51.string(),
|
|
7480
|
+
size: z51.number(),
|
|
7481
|
+
platform: z51.enum(["slack", "teams"]),
|
|
7482
|
+
workspaceId: z51.string(),
|
|
7483
|
+
channelId: z51.string()
|
|
7484
|
+
});
|
|
7485
|
+
var ResolvedSubAgentSchema = z51.object({
|
|
7486
|
+
agentId: z51.string().uuid(),
|
|
7487
|
+
buildId: z51.string().uuid(),
|
|
7488
|
+
name: z51.string().min(1).max(64).regex(/^[a-z0-9-]+$/).describe(
|
|
7090
7489
|
"Stable slug used as the Claude Code subagent name (kebab-case, \u226464 chars)"
|
|
7091
7490
|
),
|
|
7092
|
-
description:
|
|
7491
|
+
description: z51.string().describe(
|
|
7093
7492
|
"Routing description Claude uses to decide when to delegate to this subagent"
|
|
7094
7493
|
),
|
|
7095
|
-
prompt:
|
|
7096
|
-
model:
|
|
7097
|
-
mcpServers:
|
|
7494
|
+
prompt: z51.string().describe("System prompt (SOP) for this subagent"),
|
|
7495
|
+
model: z51.string().optional().describe("Optional Claude model identifier override for this subagent"),
|
|
7496
|
+
mcpServers: z51.record(z51.string(), RedactedMcpServerConfigSchema).default({}).describe(
|
|
7098
7497
|
"Redacted MCP server configs scoped to this subagent. Secrets resolved at execution time."
|
|
7099
7498
|
)
|
|
7100
7499
|
});
|
|
7101
7500
|
var RunConfigSchema = AgentConfigSchema.extend({
|
|
7102
|
-
task:
|
|
7103
|
-
mcpServers:
|
|
7104
|
-
subAgents:
|
|
7105
|
-
conversationHistory:
|
|
7106
|
-
chatFiles:
|
|
7501
|
+
task: z51.string(),
|
|
7502
|
+
mcpServers: z51.record(z51.string(), RedactedMcpServerConfigSchema),
|
|
7503
|
+
subAgents: z51.array(ResolvedSubAgentSchema).optional().default([]),
|
|
7504
|
+
conversationHistory: z51.array(ThreadContextMessageSchema).optional(),
|
|
7505
|
+
chatFiles: z51.array(ChatFileReferenceSchema).optional(),
|
|
7107
7506
|
/** IANA timezone (e.g. `"Europe/Prague"`). Consumers should fall back to UTC when absent. */
|
|
7108
|
-
timezone:
|
|
7507
|
+
timezone: z51.string().optional()
|
|
7109
7508
|
});
|
|
7110
|
-
var StoredRunConfigV0Schema =
|
|
7111
|
-
version:
|
|
7509
|
+
var StoredRunConfigV0Schema = z51.object({
|
|
7510
|
+
version: z51.literal("v0")
|
|
7112
7511
|
});
|
|
7113
|
-
var StoredRunConfigV1Schema =
|
|
7114
|
-
version:
|
|
7512
|
+
var StoredRunConfigV1Schema = z51.object({
|
|
7513
|
+
version: z51.literal("v1"),
|
|
7115
7514
|
data: RunConfigSchema
|
|
7116
7515
|
});
|
|
7117
|
-
var StoredRunConfigSchema =
|
|
7516
|
+
var StoredRunConfigSchema = z51.union([
|
|
7118
7517
|
StoredRunConfigV0Schema,
|
|
7119
7518
|
StoredRunConfigV1Schema
|
|
7120
7519
|
]);
|
|
@@ -7133,285 +7532,260 @@ function isRunConfig(config) {
|
|
|
7133
7532
|
}
|
|
7134
7533
|
__name(isRunConfig, "isRunConfig");
|
|
7135
7534
|
__name2(isRunConfig, "isRunConfig");
|
|
7136
|
-
var skillApiSchema =
|
|
7137
|
-
id:
|
|
7138
|
-
name:
|
|
7139
|
-
description:
|
|
7535
|
+
var skillApiSchema = z52.object({
|
|
7536
|
+
id: z52.string(),
|
|
7537
|
+
name: z52.string(),
|
|
7538
|
+
description: z52.string(),
|
|
7140
7539
|
// System skills have null team_id.
|
|
7141
|
-
team_id:
|
|
7540
|
+
team_id: z52.string().nullable()
|
|
7142
7541
|
});
|
|
7143
|
-
var listSkillsResponseSchema =
|
|
7144
|
-
skills:
|
|
7542
|
+
var listSkillsResponseSchema = z52.object({
|
|
7543
|
+
skills: z52.array(skillApiSchema)
|
|
7145
7544
|
});
|
|
7146
|
-
var systemSkillSchema =
|
|
7147
|
-
id:
|
|
7148
|
-
name:
|
|
7149
|
-
description:
|
|
7150
|
-
});
|
|
7151
|
-
var listSystemSkillsResponseSchema =
|
|
7152
|
-
skills:
|
|
7153
|
-
});
|
|
7154
|
-
var skillFileItemSchema =
|
|
7155
|
-
name:
|
|
7156
|
-
path:
|
|
7157
|
-
size:
|
|
7158
|
-
contentType:
|
|
7159
|
-
updatedAt:
|
|
7160
|
-
});
|
|
7161
|
-
var listSkillFilesResponseSchema =
|
|
7162
|
-
files:
|
|
7163
|
-
});
|
|
7164
|
-
var getSkillFileContentResponseSchema =
|
|
7165
|
-
content:
|
|
7166
|
-
path:
|
|
7167
|
-
contentType:
|
|
7168
|
-
});
|
|
7169
|
-
var updateSkillFileBodySchema =
|
|
7170
|
-
content:
|
|
7171
|
-
});
|
|
7172
|
-
var updateSkillFileResponseSchema =
|
|
7173
|
-
success:
|
|
7174
|
-
message:
|
|
7175
|
-
skill:
|
|
7176
|
-
id:
|
|
7177
|
-
name:
|
|
7178
|
-
description:
|
|
7545
|
+
var systemSkillSchema = z52.object({
|
|
7546
|
+
id: z52.string(),
|
|
7547
|
+
name: z52.string(),
|
|
7548
|
+
description: z52.string()
|
|
7549
|
+
});
|
|
7550
|
+
var listSystemSkillsResponseSchema = z52.object({
|
|
7551
|
+
skills: z52.array(systemSkillSchema)
|
|
7552
|
+
});
|
|
7553
|
+
var skillFileItemSchema = z52.object({
|
|
7554
|
+
name: z52.string(),
|
|
7555
|
+
path: z52.string(),
|
|
7556
|
+
size: z52.number().optional(),
|
|
7557
|
+
contentType: z52.string().optional(),
|
|
7558
|
+
updatedAt: z52.string().optional()
|
|
7559
|
+
});
|
|
7560
|
+
var listSkillFilesResponseSchema = z52.object({
|
|
7561
|
+
files: z52.array(skillFileItemSchema)
|
|
7562
|
+
});
|
|
7563
|
+
var getSkillFileContentResponseSchema = z52.object({
|
|
7564
|
+
content: z52.string(),
|
|
7565
|
+
path: z52.string(),
|
|
7566
|
+
contentType: z52.string().optional()
|
|
7567
|
+
});
|
|
7568
|
+
var updateSkillFileBodySchema = z52.object({
|
|
7569
|
+
content: z52.string()
|
|
7570
|
+
});
|
|
7571
|
+
var updateSkillFileResponseSchema = z52.object({
|
|
7572
|
+
success: z52.boolean(),
|
|
7573
|
+
message: z52.string(),
|
|
7574
|
+
skill: z52.object({
|
|
7575
|
+
id: z52.string(),
|
|
7576
|
+
name: z52.string(),
|
|
7577
|
+
description: z52.string()
|
|
7179
7578
|
}).optional()
|
|
7180
7579
|
});
|
|
7181
|
-
var deleteSkillResponseSchema =
|
|
7182
|
-
success:
|
|
7183
|
-
message:
|
|
7580
|
+
var deleteSkillResponseSchema = z52.object({
|
|
7581
|
+
success: z52.boolean(),
|
|
7582
|
+
message: z52.string()
|
|
7184
7583
|
});
|
|
7185
|
-
var generateSkillBodySchema =
|
|
7186
|
-
prompt:
|
|
7187
|
-
existingContent:
|
|
7584
|
+
var generateSkillBodySchema = z52.object({
|
|
7585
|
+
prompt: z52.string().min(1).max(2e3),
|
|
7586
|
+
existingContent: z52.string().max(2e4).optional()
|
|
7188
7587
|
});
|
|
7189
|
-
var generateSkillResponseSchema =
|
|
7190
|
-
content:
|
|
7588
|
+
var generateSkillResponseSchema = z52.object({
|
|
7589
|
+
content: z52.string()
|
|
7191
7590
|
});
|
|
7192
|
-
var skillAssignmentSchema =
|
|
7193
|
-
id:
|
|
7194
|
-
name:
|
|
7591
|
+
var skillAssignmentSchema = z52.object({
|
|
7592
|
+
id: z52.string(),
|
|
7593
|
+
name: z52.string()
|
|
7195
7594
|
});
|
|
7196
|
-
var listSkillAssignmentsResponseSchema =
|
|
7197
|
-
assignments:
|
|
7198
|
-
total:
|
|
7595
|
+
var listSkillAssignmentsResponseSchema = z52.object({
|
|
7596
|
+
assignments: z52.array(skillAssignmentSchema),
|
|
7597
|
+
total: z52.number()
|
|
7199
7598
|
});
|
|
7200
|
-
var teamInvitationApiSchema =
|
|
7201
|
-
id:
|
|
7202
|
-
team_id:
|
|
7203
|
-
email:
|
|
7204
|
-
invited_by:
|
|
7205
|
-
role:
|
|
7206
|
-
status:
|
|
7207
|
-
name:
|
|
7208
|
-
created_at:
|
|
7209
|
-
process_id:
|
|
7210
|
-
});
|
|
7211
|
-
var teamInvitationDetailApiSchema =
|
|
7212
|
-
id:
|
|
7213
|
-
team_id:
|
|
7214
|
-
email:
|
|
7215
|
-
invited_by:
|
|
7216
|
-
role:
|
|
7217
|
-
status:
|
|
7218
|
-
name:
|
|
7219
|
-
created_at:
|
|
7220
|
-
process_id:
|
|
7221
|
-
team:
|
|
7222
|
-
id:
|
|
7223
|
-
name:
|
|
7599
|
+
var teamInvitationApiSchema = z53.object({
|
|
7600
|
+
id: z53.string(),
|
|
7601
|
+
team_id: z53.string(),
|
|
7602
|
+
email: z53.email(),
|
|
7603
|
+
invited_by: z53.string(),
|
|
7604
|
+
role: z53.string(),
|
|
7605
|
+
status: z53.string(),
|
|
7606
|
+
name: z53.string().nullable(),
|
|
7607
|
+
created_at: z53.string(),
|
|
7608
|
+
process_id: z53.guid().nullable().optional()
|
|
7609
|
+
});
|
|
7610
|
+
var teamInvitationDetailApiSchema = z53.object({
|
|
7611
|
+
id: z53.string(),
|
|
7612
|
+
team_id: z53.string(),
|
|
7613
|
+
email: z53.email(),
|
|
7614
|
+
invited_by: z53.string(),
|
|
7615
|
+
role: z53.string(),
|
|
7616
|
+
status: z53.string(),
|
|
7617
|
+
name: z53.string().nullable(),
|
|
7618
|
+
created_at: z53.string(),
|
|
7619
|
+
process_id: z53.guid().nullable().optional(),
|
|
7620
|
+
team: z53.object({
|
|
7621
|
+
id: z53.string(),
|
|
7622
|
+
name: z53.string()
|
|
7224
7623
|
}),
|
|
7225
|
-
invitedBy:
|
|
7226
|
-
id:
|
|
7227
|
-
name:
|
|
7228
|
-
email:
|
|
7624
|
+
invitedBy: z53.object({
|
|
7625
|
+
id: z53.string(),
|
|
7626
|
+
name: z53.string().nullable(),
|
|
7627
|
+
email: z53.email()
|
|
7229
7628
|
}),
|
|
7230
|
-
process:
|
|
7231
|
-
id:
|
|
7232
|
-
name:
|
|
7629
|
+
process: z53.object({
|
|
7630
|
+
id: z53.string(),
|
|
7631
|
+
name: z53.string()
|
|
7233
7632
|
}).optional()
|
|
7234
7633
|
});
|
|
7235
|
-
var createTeamInvitationRequestSchema =
|
|
7236
|
-
email:
|
|
7237
|
-
role:
|
|
7238
|
-
processId:
|
|
7239
|
-
});
|
|
7240
|
-
var acceptTeamInvitationRequestSchema =
|
|
7241
|
-
name:
|
|
7242
|
-
});
|
|
7243
|
-
var bulkInviteResponseSchema =
|
|
7244
|
-
succeeded:
|
|
7245
|
-
skipped:
|
|
7246
|
-
failed:
|
|
7247
|
-
});
|
|
7248
|
-
var teamDiscoveryModeSchema =
|
|
7249
|
-
var BrowserLocationSchema =
|
|
7250
|
-
|
|
7251
|
-
|
|
7252
|
-
|
|
7253
|
-
|
|
7254
|
-
|
|
7255
|
-
|
|
7256
|
-
|
|
7634
|
+
var createTeamInvitationRequestSchema = z53.object({
|
|
7635
|
+
email: z53.email(),
|
|
7636
|
+
role: z53.string(),
|
|
7637
|
+
processId: z53.guid().optional()
|
|
7638
|
+
});
|
|
7639
|
+
var acceptTeamInvitationRequestSchema = z53.object({
|
|
7640
|
+
name: z53.string().optional()
|
|
7641
|
+
});
|
|
7642
|
+
var bulkInviteResponseSchema = z53.object({
|
|
7643
|
+
succeeded: z53.number(),
|
|
7644
|
+
skipped: z53.number(),
|
|
7645
|
+
failed: z53.number()
|
|
7646
|
+
});
|
|
7647
|
+
var teamDiscoveryModeSchema = z54.enum(["request", "auto"]);
|
|
7648
|
+
var BrowserLocationSchema = z54.union([
|
|
7649
|
+
z54.literal("cz"),
|
|
7650
|
+
z54.literal("de"),
|
|
7651
|
+
z54.literal("fr"),
|
|
7652
|
+
z54.literal("gb"),
|
|
7653
|
+
z54.literal("it"),
|
|
7654
|
+
z54.literal("pl"),
|
|
7655
|
+
z54.literal("sk")
|
|
7257
7656
|
]);
|
|
7258
|
-
var teamMemberApiSchema =
|
|
7259
|
-
id:
|
|
7260
|
-
name:
|
|
7261
|
-
email:
|
|
7262
|
-
role:
|
|
7263
|
-
inheritedFromOrg:
|
|
7264
|
-
});
|
|
7265
|
-
var listTeamMembersResponseSchema =
|
|
7266
|
-
members:
|
|
7267
|
-
total:
|
|
7268
|
-
limit:
|
|
7269
|
-
offset:
|
|
7270
|
-
});
|
|
7271
|
-
var updateMemberRoleRequestSchema =
|
|
7272
|
-
role:
|
|
7273
|
-
});
|
|
7274
|
-
var removeMemberResponseSchema =
|
|
7275
|
-
success:
|
|
7276
|
-
nextTeamId:
|
|
7277
|
-
planType:
|
|
7278
|
-
});
|
|
7279
|
-
var getMemberMeResponseSchema =
|
|
7280
|
-
role:
|
|
7281
|
-
});
|
|
7282
|
-
var addTeamMemberRequestSchema =
|
|
7283
|
-
userId:
|
|
7284
|
-
role:
|
|
7285
|
-
});
|
|
7286
|
-
var updateTeamRequestSchema =
|
|
7287
|
-
name:
|
|
7288
|
-
slack_team_id:
|
|
7657
|
+
var teamMemberApiSchema = z54.object({
|
|
7658
|
+
id: z54.guid(),
|
|
7659
|
+
name: z54.string().nullable(),
|
|
7660
|
+
email: z54.email(),
|
|
7661
|
+
role: z54.string(),
|
|
7662
|
+
inheritedFromOrg: z54.boolean().default(false)
|
|
7663
|
+
});
|
|
7664
|
+
var listTeamMembersResponseSchema = z54.object({
|
|
7665
|
+
members: z54.array(teamMemberApiSchema),
|
|
7666
|
+
total: z54.number().int().nonnegative(),
|
|
7667
|
+
limit: z54.number().int().positive(),
|
|
7668
|
+
offset: z54.number().int().nonnegative()
|
|
7669
|
+
});
|
|
7670
|
+
var updateMemberRoleRequestSchema = z54.object({
|
|
7671
|
+
role: z54.string()
|
|
7672
|
+
});
|
|
7673
|
+
var removeMemberResponseSchema = z54.object({
|
|
7674
|
+
success: z54.literal(true),
|
|
7675
|
+
nextTeamId: z54.guid().nullable(),
|
|
7676
|
+
planType: z54.enum(["pro", "enterprise"]).nullable()
|
|
7677
|
+
});
|
|
7678
|
+
var getMemberMeResponseSchema = z54.object({
|
|
7679
|
+
role: z54.string().nullable()
|
|
7680
|
+
});
|
|
7681
|
+
var addTeamMemberRequestSchema = z54.object({
|
|
7682
|
+
userId: z54.guid(),
|
|
7683
|
+
role: z54.string()
|
|
7684
|
+
});
|
|
7685
|
+
var updateTeamRequestSchema = z54.object({
|
|
7686
|
+
name: z54.string().min(1).optional(),
|
|
7687
|
+
slack_team_id: z54.string().optional(),
|
|
7289
7688
|
discovery_mode: teamDiscoveryModeSchema.optional()
|
|
7290
7689
|
});
|
|
7291
|
-
var teamApiSchema =
|
|
7292
|
-
id:
|
|
7293
|
-
name:
|
|
7294
|
-
created_at:
|
|
7295
|
-
organization_id:
|
|
7296
|
-
slack_team_id:
|
|
7690
|
+
var teamApiSchema = z54.object({
|
|
7691
|
+
id: z54.guid(),
|
|
7692
|
+
name: z54.string(),
|
|
7693
|
+
created_at: z54.string(),
|
|
7694
|
+
organization_id: z54.guid().nullable(),
|
|
7695
|
+
slack_team_id: z54.string().nullable(),
|
|
7297
7696
|
discovery_mode: teamDiscoveryModeSchema
|
|
7298
7697
|
});
|
|
7299
7698
|
var TEAM_CONFIG_VERSION = 1;
|
|
7300
|
-
var teamConfigDataSchema =
|
|
7699
|
+
var teamConfigDataSchema = z54.object({
|
|
7301
7700
|
browserProviderOverride: BrowserProviderTypeSchema.nullable().optional(),
|
|
7302
7701
|
browserLocationOverride: BrowserLocationSchema.nullable().optional()
|
|
7303
7702
|
});
|
|
7304
|
-
var teamConfigSchema =
|
|
7305
|
-
version:
|
|
7703
|
+
var teamConfigSchema = z54.object({
|
|
7704
|
+
version: z54.literal(TEAM_CONFIG_VERSION),
|
|
7306
7705
|
data: teamConfigDataSchema
|
|
7307
7706
|
});
|
|
7308
|
-
var listTeamInvitesResponseSchema =
|
|
7309
|
-
invitations:
|
|
7310
|
-
});
|
|
7311
|
-
var teamInsightsCopilotSchema =
|
|
7312
|
-
id:
|
|
7313
|
-
name:
|
|
7314
|
-
teamName:
|
|
7315
|
-
created_at:
|
|
7316
|
-
updated_at:
|
|
7317
|
-
team_id:
|
|
7318
|
-
thread_id:
|
|
7319
|
-
slack_enabled:
|
|
7320
|
-
});
|
|
7321
|
-
var teamInsightsUserProfileSchema =
|
|
7322
|
-
id:
|
|
7323
|
-
name:
|
|
7324
|
-
email:
|
|
7707
|
+
var listTeamInvitesResponseSchema = z54.object({
|
|
7708
|
+
invitations: z54.array(teamInvitationApiSchema)
|
|
7709
|
+
});
|
|
7710
|
+
var teamInsightsCopilotSchema = z55.object({
|
|
7711
|
+
id: z55.guid(),
|
|
7712
|
+
name: z55.string(),
|
|
7713
|
+
teamName: z55.string().nullable().optional(),
|
|
7714
|
+
created_at: z55.string().nullable(),
|
|
7715
|
+
updated_at: z55.string().nullable(),
|
|
7716
|
+
team_id: z55.string().nullable(),
|
|
7717
|
+
thread_id: z55.string().nullable(),
|
|
7718
|
+
slack_enabled: z55.boolean().nullable()
|
|
7719
|
+
});
|
|
7720
|
+
var teamInsightsUserProfileSchema = z55.object({
|
|
7721
|
+
id: z55.guid(),
|
|
7722
|
+
name: z55.string().nullable(),
|
|
7723
|
+
email: z55.string()
|
|
7325
7724
|
});
|
|
7326
7725
|
var teamInsightsUserUsageSchema = teamInsightsUserProfileSchema.extend(
|
|
7327
7726
|
{
|
|
7328
|
-
runCount:
|
|
7329
|
-
lastRun:
|
|
7727
|
+
runCount: z55.number(),
|
|
7728
|
+
lastRun: z55.string().nullable()
|
|
7330
7729
|
}
|
|
7331
7730
|
);
|
|
7332
|
-
var teamInsightsMetricSourceSchema =
|
|
7731
|
+
var teamInsightsMetricSourceSchema = z55.object({
|
|
7333
7732
|
source: agentRunSourceSchema,
|
|
7334
|
-
runsTotal:
|
|
7335
|
-
completedRuns:
|
|
7733
|
+
runsTotal: z55.number(),
|
|
7734
|
+
completedRuns: z55.number()
|
|
7336
7735
|
});
|
|
7337
7736
|
var teamInsightsCopilotWithRunsSchema = teamInsightsCopilotSchema.extend({
|
|
7338
|
-
integrations:
|
|
7339
|
-
uniqueUsersCount:
|
|
7340
|
-
users:
|
|
7341
|
-
totalRuns:
|
|
7342
|
-
completedRuns:
|
|
7343
|
-
totalTimeSpentMs:
|
|
7344
|
-
averageTimeSpentMs:
|
|
7345
|
-
completedRunsWithTiming:
|
|
7346
|
-
sources:
|
|
7347
|
-
});
|
|
7348
|
-
var teamInsightsAgentsRunResponseSchema =
|
|
7349
|
-
data:
|
|
7350
|
-
total:
|
|
7351
|
-
});
|
|
7352
|
-
var teamInsightsMetricsResponseSchema =
|
|
7353
|
-
runsTotal:
|
|
7354
|
-
completedRuns:
|
|
7355
|
-
sources:
|
|
7356
|
-
});
|
|
7357
|
-
var teamInsightsUserAgentRunSchema =
|
|
7358
|
-
id:
|
|
7359
|
-
created_at:
|
|
7360
|
-
updated_at:
|
|
7361
|
-
agent_id:
|
|
7362
|
-
agent_name:
|
|
7363
|
-
build_id:
|
|
7364
|
-
source:
|
|
7365
|
-
started_at:
|
|
7366
|
-
completed_at:
|
|
7367
|
-
});
|
|
7368
|
-
var teamInsightsAgentSchema =
|
|
7369
|
-
id:
|
|
7370
|
-
name:
|
|
7371
|
-
teamName:
|
|
7372
|
-
runs:
|
|
7737
|
+
integrations: z55.array(z55.string()),
|
|
7738
|
+
uniqueUsersCount: z55.number(),
|
|
7739
|
+
users: z55.array(teamInsightsUserUsageSchema),
|
|
7740
|
+
totalRuns: z55.number(),
|
|
7741
|
+
completedRuns: z55.number(),
|
|
7742
|
+
totalTimeSpentMs: z55.number(),
|
|
7743
|
+
averageTimeSpentMs: z55.number(),
|
|
7744
|
+
completedRunsWithTiming: z55.number(),
|
|
7745
|
+
sources: z55.array(teamInsightsMetricSourceSchema)
|
|
7746
|
+
});
|
|
7747
|
+
var teamInsightsAgentsRunResponseSchema = z55.object({
|
|
7748
|
+
data: z55.array(teamInsightsCopilotWithRunsSchema),
|
|
7749
|
+
total: z55.number()
|
|
7750
|
+
});
|
|
7751
|
+
var teamInsightsMetricsResponseSchema = z55.object({
|
|
7752
|
+
runsTotal: z55.number(),
|
|
7753
|
+
completedRuns: z55.number(),
|
|
7754
|
+
sources: z55.array(teamInsightsMetricSourceSchema)
|
|
7755
|
+
});
|
|
7756
|
+
var teamInsightsUserAgentRunSchema = z55.object({
|
|
7757
|
+
id: z55.guid(),
|
|
7758
|
+
created_at: z55.string(),
|
|
7759
|
+
updated_at: z55.string(),
|
|
7760
|
+
agent_id: z55.guid(),
|
|
7761
|
+
agent_name: z55.string(),
|
|
7762
|
+
build_id: z55.guid(),
|
|
7763
|
+
source: z55.string().nullable(),
|
|
7764
|
+
started_at: z55.string().nullable(),
|
|
7765
|
+
completed_at: z55.string().nullable()
|
|
7766
|
+
});
|
|
7767
|
+
var teamInsightsAgentSchema = z55.object({
|
|
7768
|
+
id: z55.guid(),
|
|
7769
|
+
name: z55.string(),
|
|
7770
|
+
teamName: z55.string().nullable().optional(),
|
|
7771
|
+
runs: z55.array(teamInsightsUserAgentRunSchema)
|
|
7373
7772
|
});
|
|
7374
7773
|
var teamInsightsUserWithAgentsAndRunsSchema = teamInsightsUserProfileSchema.extend({
|
|
7375
|
-
agents:
|
|
7376
|
-
runs:
|
|
7377
|
-
totalRuns:
|
|
7378
|
-
});
|
|
7379
|
-
var teamInsightsUsersResponseSchema = z53.object({
|
|
7380
|
-
data: z53.array(teamInsightsUserWithAgentsAndRunsSchema),
|
|
7381
|
-
total: z53.number()
|
|
7382
|
-
});
|
|
7383
|
-
var createTeamInviteLinkRequestSchema = z54.object({
|
|
7384
|
-
frontendUrl: z54.url()
|
|
7774
|
+
agents: z55.array(teamInsightsAgentSchema),
|
|
7775
|
+
runs: z55.array(teamInsightsUserAgentRunSchema),
|
|
7776
|
+
totalRuns: z55.number()
|
|
7385
7777
|
});
|
|
7386
|
-
var
|
|
7387
|
-
|
|
7778
|
+
var teamInsightsUsersResponseSchema = z55.object({
|
|
7779
|
+
data: z55.array(teamInsightsUserWithAgentsAndRunsSchema),
|
|
7780
|
+
total: z55.number()
|
|
7388
7781
|
});
|
|
7389
|
-
var
|
|
7390
|
-
|
|
7391
|
-
name: z54.string().nullable(),
|
|
7392
|
-
email: z54.email()
|
|
7393
|
-
});
|
|
7394
|
-
var teamInviteLinkSchema = z54.object({
|
|
7395
|
-
id: z54.guid(),
|
|
7396
|
-
url: z54.url().optional(),
|
|
7397
|
-
createdAt: z54.string(),
|
|
7398
|
-
createdBy: teamInviteLinkCreatorSchema
|
|
7399
|
-
});
|
|
7400
|
-
var getTeamInviteLinkResponseSchema = z54.object({
|
|
7401
|
-
hasLink: z54.boolean(),
|
|
7402
|
-
link: teamInviteLinkSchema.optional()
|
|
7403
|
-
});
|
|
7404
|
-
var joinLinkInfoResponseSchema = z54.object({
|
|
7405
|
-
valid: z54.boolean(),
|
|
7406
|
-
teamName: z54.string().optional(),
|
|
7407
|
-
teamId: z54.guid().optional(),
|
|
7408
|
-
reason: z54.enum(["invalid", "expired"]).optional()
|
|
7782
|
+
var userDismissalListResponseSchema = z56.object({
|
|
7783
|
+
data: z56.array(z56.string())
|
|
7409
7784
|
});
|
|
7410
|
-
var
|
|
7411
|
-
|
|
7412
|
-
teamId: z54.guid()
|
|
7785
|
+
var userDismissalMutationSchema = z56.object({
|
|
7786
|
+
elementKey: z56.string()
|
|
7413
7787
|
});
|
|
7414
|
-
var caseFilterStatusSchema =
|
|
7788
|
+
var caseFilterStatusSchema = z57.enum([
|
|
7415
7789
|
"pending",
|
|
7416
7790
|
"claimed",
|
|
7417
7791
|
"completed",
|
|
@@ -7419,19 +7793,19 @@ var caseFilterStatusSchema = z55.enum([
|
|
|
7419
7793
|
"needs_input",
|
|
7420
7794
|
"postponed"
|
|
7421
7795
|
]);
|
|
7422
|
-
var casesFiltersSchema =
|
|
7423
|
-
status:
|
|
7424
|
-
created_at_from:
|
|
7425
|
-
updated_at_from:
|
|
7426
|
-
labels:
|
|
7796
|
+
var casesFiltersSchema = z57.object({
|
|
7797
|
+
status: z57.array(caseFilterStatusSchema).optional(),
|
|
7798
|
+
created_at_from: z57.string().optional(),
|
|
7799
|
+
updated_at_from: z57.string().optional(),
|
|
7800
|
+
labels: z57.record(z57.string(), z57.array(z57.string())).optional()
|
|
7427
7801
|
});
|
|
7428
|
-
var casesListRequestBodySchema =
|
|
7802
|
+
var casesListRequestBodySchema = z57.object({
|
|
7429
7803
|
filters: casesFiltersSchema.default({}),
|
|
7430
|
-
limit:
|
|
7431
|
-
offset:
|
|
7432
|
-
sort_by:
|
|
7433
|
-
sort_order:
|
|
7434
|
-
search:
|
|
7804
|
+
limit: z57.int().min(1).max(100).default(25),
|
|
7805
|
+
offset: z57.int().min(0).default(0),
|
|
7806
|
+
sort_by: z57.enum(["created_at", "updated_at", "postponed_to"]).default("created_at"),
|
|
7807
|
+
sort_order: z57.enum(["asc", "desc"]).default("desc"),
|
|
7808
|
+
search: z57.string().optional()
|
|
7435
7809
|
});
|
|
7436
7810
|
function toBase64(input) {
|
|
7437
7811
|
if (typeof btoa === "function") {
|
|
@@ -7526,7 +7900,7 @@ function setFilterValuesByCategoryKey(filters, categoryKey, values) {
|
|
|
7526
7900
|
const { status: _, ...rest } = filters;
|
|
7527
7901
|
return rest;
|
|
7528
7902
|
}
|
|
7529
|
-
const parsed =
|
|
7903
|
+
const parsed = z57.array(caseFilterStatusSchema).safeParse(values);
|
|
7530
7904
|
if (!parsed.success) {
|
|
7531
7905
|
return filters;
|
|
7532
7906
|
}
|
|
@@ -8397,35 +8771,35 @@ import { readFile as readFile2 } from "node:fs/promises";
|
|
|
8397
8771
|
import { confirm as confirm2, isCancel as isCancel2, text } from "@clack/prompts";
|
|
8398
8772
|
|
|
8399
8773
|
// src/api/agent-schemas.ts
|
|
8400
|
-
import { z as
|
|
8401
|
-
var publicAgentSchema =
|
|
8402
|
-
id:
|
|
8403
|
-
name:
|
|
8404
|
-
slack_enabled:
|
|
8405
|
-
microsoft_teams_enabled:
|
|
8406
|
-
agentic_memory_enabled:
|
|
8407
|
-
thread_id:
|
|
8408
|
-
created_at:
|
|
8409
|
-
updated_at:
|
|
8410
|
-
});
|
|
8411
|
-
var publicBuildSchema =
|
|
8412
|
-
id:
|
|
8413
|
-
agent_id:
|
|
8414
|
-
name:
|
|
8415
|
-
revision_number:
|
|
8416
|
-
created_at:
|
|
8417
|
-
updated_at:
|
|
8418
|
-
});
|
|
8419
|
-
var listAgentsResponseSchema =
|
|
8420
|
-
agents:
|
|
8421
|
-
total:
|
|
8422
|
-
limit:
|
|
8423
|
-
offset:
|
|
8424
|
-
});
|
|
8425
|
-
var getAgentResponseSchema =
|
|
8774
|
+
import { z as z58 } from "zod";
|
|
8775
|
+
var publicAgentSchema = z58.object({
|
|
8776
|
+
id: z58.string(),
|
|
8777
|
+
name: z58.string(),
|
|
8778
|
+
slack_enabled: z58.boolean().nullish(),
|
|
8779
|
+
microsoft_teams_enabled: z58.boolean().nullish(),
|
|
8780
|
+
agentic_memory_enabled: z58.boolean().nullish(),
|
|
8781
|
+
thread_id: z58.string().nullish(),
|
|
8782
|
+
created_at: z58.string().nullish(),
|
|
8783
|
+
updated_at: z58.string().nullish()
|
|
8784
|
+
});
|
|
8785
|
+
var publicBuildSchema = z58.object({
|
|
8786
|
+
id: z58.string(),
|
|
8787
|
+
agent_id: z58.string(),
|
|
8788
|
+
name: z58.string(),
|
|
8789
|
+
revision_number: z58.number().nullish(),
|
|
8790
|
+
created_at: z58.string().nullish(),
|
|
8791
|
+
updated_at: z58.string().nullish()
|
|
8792
|
+
});
|
|
8793
|
+
var listAgentsResponseSchema = z58.object({
|
|
8794
|
+
agents: z58.array(publicAgentSchema),
|
|
8795
|
+
total: z58.number().nullish(),
|
|
8796
|
+
limit: z58.number().nullish(),
|
|
8797
|
+
offset: z58.number().nullish()
|
|
8798
|
+
});
|
|
8799
|
+
var getAgentResponseSchema = z58.object({
|
|
8426
8800
|
agent: publicAgentSchema
|
|
8427
8801
|
});
|
|
8428
|
-
var createAgentResponseSchema =
|
|
8802
|
+
var createAgentResponseSchema = z58.object({
|
|
8429
8803
|
agent: publicAgentSchema,
|
|
8430
8804
|
build: publicBuildSchema.optional()
|
|
8431
8805
|
});
|
|
@@ -8729,27 +9103,27 @@ function registerAgentsList(agents) {
|
|
|
8729
9103
|
__name(registerAgentsList, "registerAgentsList");
|
|
8730
9104
|
|
|
8731
9105
|
// src/api/schedule-schemas.ts
|
|
8732
|
-
import { z as
|
|
8733
|
-
var publicScheduleSchema =
|
|
8734
|
-
id:
|
|
8735
|
-
build_id:
|
|
8736
|
-
agent_id:
|
|
8737
|
-
user_id:
|
|
8738
|
-
enabled:
|
|
8739
|
-
frequency:
|
|
8740
|
-
time:
|
|
8741
|
-
timezone:
|
|
8742
|
-
day:
|
|
8743
|
-
day_of_month:
|
|
8744
|
-
cron:
|
|
8745
|
-
source:
|
|
8746
|
-
task:
|
|
8747
|
-
recurring:
|
|
8748
|
-
created_at:
|
|
8749
|
-
updated_at:
|
|
8750
|
-
});
|
|
8751
|
-
var listSchedulesResponseSchema =
|
|
8752
|
-
schedules:
|
|
9106
|
+
import { z as z59 } from "zod";
|
|
9107
|
+
var publicScheduleSchema = z59.object({
|
|
9108
|
+
id: z59.string(),
|
|
9109
|
+
build_id: z59.string(),
|
|
9110
|
+
agent_id: z59.string(),
|
|
9111
|
+
user_id: z59.string(),
|
|
9112
|
+
enabled: z59.boolean(),
|
|
9113
|
+
frequency: z59.string(),
|
|
9114
|
+
time: z59.string().nullish(),
|
|
9115
|
+
timezone: z59.string(),
|
|
9116
|
+
day: z59.string().nullish(),
|
|
9117
|
+
day_of_month: z59.number().nullish(),
|
|
9118
|
+
cron: z59.string().nullish(),
|
|
9119
|
+
source: z59.string().nullish(),
|
|
9120
|
+
task: z59.string().nullish(),
|
|
9121
|
+
recurring: z59.boolean().nullish(),
|
|
9122
|
+
created_at: z59.string(),
|
|
9123
|
+
updated_at: z59.string()
|
|
9124
|
+
});
|
|
9125
|
+
var listSchedulesResponseSchema = z59.object({
|
|
9126
|
+
schedules: z59.array(publicScheduleSchema)
|
|
8753
9127
|
});
|
|
8754
9128
|
|
|
8755
9129
|
// src/commands/agents/schedules.ts
|
|
@@ -9221,54 +9595,54 @@ function fieldsToSearchParams(fields) {
|
|
|
9221
9595
|
__name(fieldsToSearchParams, "fieldsToSearchParams");
|
|
9222
9596
|
|
|
9223
9597
|
// src/api/integration-schemas.ts
|
|
9224
|
-
import { z as
|
|
9225
|
-
var integrationSchema =
|
|
9226
|
-
id:
|
|
9227
|
-
name:
|
|
9228
|
-
type:
|
|
9229
|
-
provider:
|
|
9230
|
-
user_id:
|
|
9231
|
-
team_id:
|
|
9232
|
-
server_url:
|
|
9233
|
-
transport_type:
|
|
9234
|
-
auth_method:
|
|
9235
|
-
composio_mcp_id:
|
|
9236
|
-
custom_integration_id:
|
|
9237
|
-
icon_url:
|
|
9238
|
-
oauth_provider:
|
|
9239
|
-
oauth_scopes:
|
|
9240
|
-
integration_id:
|
|
9241
|
-
created_at:
|
|
9242
|
-
updated_at:
|
|
9243
|
-
});
|
|
9244
|
-
var integrationsListResponseSchema2 =
|
|
9245
|
-
integrations:
|
|
9598
|
+
import { z as z60 } from "zod";
|
|
9599
|
+
var integrationSchema = z60.object({
|
|
9600
|
+
id: z60.string(),
|
|
9601
|
+
name: z60.string(),
|
|
9602
|
+
type: z60.string(),
|
|
9603
|
+
provider: z60.string(),
|
|
9604
|
+
user_id: z60.string().nullable(),
|
|
9605
|
+
team_id: z60.string(),
|
|
9606
|
+
server_url: z60.string().optional(),
|
|
9607
|
+
transport_type: z60.string().optional(),
|
|
9608
|
+
auth_method: z60.string().nullish(),
|
|
9609
|
+
composio_mcp_id: z60.string().nullish(),
|
|
9610
|
+
custom_integration_id: z60.string().nullish(),
|
|
9611
|
+
icon_url: z60.string().nullish(),
|
|
9612
|
+
oauth_provider: z60.string().nullish(),
|
|
9613
|
+
oauth_scopes: z60.array(z60.string()).nullish(),
|
|
9614
|
+
integration_id: z60.string().nullish(),
|
|
9615
|
+
created_at: z60.string(),
|
|
9616
|
+
updated_at: z60.string()
|
|
9617
|
+
});
|
|
9618
|
+
var integrationsListResponseSchema2 = z60.object({
|
|
9619
|
+
integrations: z60.array(integrationSchema)
|
|
9246
9620
|
});
|
|
9247
9621
|
var connectionResponseSchema = integrationSchema;
|
|
9248
|
-
var buildIntegrationConfigSchema2 =
|
|
9249
|
-
id:
|
|
9250
|
-
integration_id:
|
|
9251
|
-
custom_integration_id:
|
|
9252
|
-
integration_type:
|
|
9253
|
-
integration_name:
|
|
9254
|
-
created_at:
|
|
9622
|
+
var buildIntegrationConfigSchema2 = z60.object({
|
|
9623
|
+
id: z60.string(),
|
|
9624
|
+
integration_id: z60.string().nullable(),
|
|
9625
|
+
custom_integration_id: z60.string().nullable(),
|
|
9626
|
+
integration_type: z60.string(),
|
|
9627
|
+
integration_name: z60.string(),
|
|
9628
|
+
created_at: z60.string()
|
|
9255
9629
|
});
|
|
9256
|
-
var listBuildIntegrationsResponseSchema2 =
|
|
9257
|
-
integrations:
|
|
9630
|
+
var listBuildIntegrationsResponseSchema2 = z60.object({
|
|
9631
|
+
integrations: z60.array(buildIntegrationConfigSchema2)
|
|
9258
9632
|
});
|
|
9259
|
-
var attachBuildIntegrationsResponseSchema =
|
|
9260
|
-
success:
|
|
9261
|
-
count:
|
|
9633
|
+
var attachBuildIntegrationsResponseSchema = z60.object({
|
|
9634
|
+
success: z60.boolean(),
|
|
9635
|
+
count: z60.number()
|
|
9262
9636
|
});
|
|
9263
|
-
var buildIntegrationConnectionSchema =
|
|
9264
|
-
connection_id:
|
|
9265
|
-
created_at:
|
|
9637
|
+
var buildIntegrationConnectionSchema = z60.object({
|
|
9638
|
+
connection_id: z60.string(),
|
|
9639
|
+
created_at: z60.string()
|
|
9266
9640
|
});
|
|
9267
|
-
var listBuildIntegrationConnectionsResponseSchema =
|
|
9268
|
-
connections:
|
|
9641
|
+
var listBuildIntegrationConnectionsResponseSchema = z60.object({
|
|
9642
|
+
connections: z60.array(buildIntegrationConnectionSchema)
|
|
9269
9643
|
});
|
|
9270
|
-
var successResponseSchema =
|
|
9271
|
-
success:
|
|
9644
|
+
var successResponseSchema = z60.object({
|
|
9645
|
+
success: z60.boolean()
|
|
9272
9646
|
});
|
|
9273
9647
|
|
|
9274
9648
|
// src/commands/build-integrations/attach.ts
|
|
@@ -9513,43 +9887,43 @@ function registerBuildIntegrations(program) {
|
|
|
9513
9887
|
__name(registerBuildIntegrations, "registerBuildIntegrations");
|
|
9514
9888
|
|
|
9515
9889
|
// src/api/build-schemas.ts
|
|
9516
|
-
import { z as
|
|
9890
|
+
import { z as z62 } from "zod";
|
|
9517
9891
|
|
|
9518
9892
|
// src/api/json-value.ts
|
|
9519
|
-
import { z as
|
|
9520
|
-
var jsonValueSchema =
|
|
9521
|
-
() =>
|
|
9522
|
-
|
|
9523
|
-
|
|
9524
|
-
|
|
9525
|
-
|
|
9526
|
-
|
|
9527
|
-
|
|
9893
|
+
import { z as z61 } from "zod";
|
|
9894
|
+
var jsonValueSchema = z61.lazy(
|
|
9895
|
+
() => z61.union([
|
|
9896
|
+
z61.string(),
|
|
9897
|
+
z61.number(),
|
|
9898
|
+
z61.boolean(),
|
|
9899
|
+
z61.null(),
|
|
9900
|
+
z61.array(jsonValueSchema),
|
|
9901
|
+
z61.record(z61.string(), jsonValueSchema)
|
|
9528
9902
|
])
|
|
9529
9903
|
);
|
|
9530
9904
|
|
|
9531
9905
|
// src/api/build-schemas.ts
|
|
9532
|
-
var publicBuildSchema2 =
|
|
9533
|
-
id:
|
|
9534
|
-
agent_id:
|
|
9535
|
-
name:
|
|
9906
|
+
var publicBuildSchema2 = z62.object({
|
|
9907
|
+
id: z62.string(),
|
|
9908
|
+
agent_id: z62.string(),
|
|
9909
|
+
name: z62.string(),
|
|
9536
9910
|
config: jsonValueSchema.nullish(),
|
|
9537
|
-
revision_number:
|
|
9538
|
-
created_at:
|
|
9539
|
-
updated_at:
|
|
9911
|
+
revision_number: z62.number().nullish(),
|
|
9912
|
+
created_at: z62.string().nullish(),
|
|
9913
|
+
updated_at: z62.string().nullish()
|
|
9540
9914
|
});
|
|
9541
|
-
var listBuildsResponseSchema2 =
|
|
9542
|
-
builds:
|
|
9543
|
-
total:
|
|
9544
|
-
limit:
|
|
9545
|
-
offset:
|
|
9915
|
+
var listBuildsResponseSchema2 = z62.object({
|
|
9916
|
+
builds: z62.array(publicBuildSchema2),
|
|
9917
|
+
total: z62.number().nullish(),
|
|
9918
|
+
limit: z62.number().nullish(),
|
|
9919
|
+
offset: z62.number().nullish()
|
|
9546
9920
|
});
|
|
9547
|
-
var getBuildResponseSchema =
|
|
9921
|
+
var getBuildResponseSchema = z62.object({
|
|
9548
9922
|
build: publicBuildSchema2
|
|
9549
9923
|
});
|
|
9550
|
-
var createBuildResponseSchema =
|
|
9924
|
+
var createBuildResponseSchema = z62.object({
|
|
9551
9925
|
build: publicBuildSchema2,
|
|
9552
|
-
agent:
|
|
9926
|
+
agent: z62.object({ id: z62.string() })
|
|
9553
9927
|
});
|
|
9554
9928
|
|
|
9555
9929
|
// src/commands/builds/create.ts
|
|
@@ -9696,9 +10070,9 @@ function registerBuildsList(builds) {
|
|
|
9696
10070
|
__name(registerBuildsList, "registerBuildsList");
|
|
9697
10071
|
|
|
9698
10072
|
// src/commands/builds/promote.ts
|
|
9699
|
-
import { z as
|
|
9700
|
-
var promoteResponseSchema =
|
|
9701
|
-
success:
|
|
10073
|
+
import { z as z63 } from "zod";
|
|
10074
|
+
var promoteResponseSchema = z63.object({
|
|
10075
|
+
success: z63.boolean()
|
|
9702
10076
|
});
|
|
9703
10077
|
function registerBuildsPromote(builds) {
|
|
9704
10078
|
builds.command("promote <id>").description(
|
|
@@ -10707,7 +11081,7 @@ function parseSortOrder(raw) {
|
|
|
10707
11081
|
__name(parseSortOrder, "parseSortOrder");
|
|
10708
11082
|
|
|
10709
11083
|
// src/commands/cases/runs.ts
|
|
10710
|
-
import { z as
|
|
11084
|
+
import { z as z64 } from "zod";
|
|
10711
11085
|
var MIN_LIMIT4 = 1;
|
|
10712
11086
|
var MAX_LIMIT4 = 10;
|
|
10713
11087
|
var DEFAULT_LIMIT4 = 3;
|
|
@@ -10725,17 +11099,17 @@ var RUNS_TABLE_COLUMNS = [
|
|
|
10725
11099
|
cell: /* @__PURE__ */ __name((row) => row.has_pending_human_request ? row.pending_human_request_title ?? "(unknown)" : "", "cell")
|
|
10726
11100
|
}
|
|
10727
11101
|
];
|
|
10728
|
-
var recentMessageSchema =
|
|
10729
|
-
id:
|
|
10730
|
-
type:
|
|
10731
|
-
role:
|
|
10732
|
-
timestamp:
|
|
10733
|
-
text_content:
|
|
10734
|
-
tool_call:
|
|
10735
|
-
tool_result:
|
|
11102
|
+
var recentMessageSchema = z64.object({
|
|
11103
|
+
id: z64.string(),
|
|
11104
|
+
type: z64.string(),
|
|
11105
|
+
role: z64.string(),
|
|
11106
|
+
timestamp: z64.string(),
|
|
11107
|
+
text_content: z64.string().nullish(),
|
|
11108
|
+
tool_call: z64.object({ id: z64.string(), name: z64.string() }).passthrough().nullish(),
|
|
11109
|
+
tool_result: z64.object({ tool_call_id: z64.string() }).passthrough().nullish()
|
|
10736
11110
|
});
|
|
10737
|
-
var recentMessagesResponseSchema =
|
|
10738
|
-
messages:
|
|
11111
|
+
var recentMessagesResponseSchema = z64.object({
|
|
11112
|
+
messages: z64.array(recentMessageSchema)
|
|
10739
11113
|
});
|
|
10740
11114
|
var TEXT_PREVIEW_WIDTH = 60;
|
|
10741
11115
|
var MESSAGES_TABLE_COLUMNS = [
|
|
@@ -11163,16 +11537,16 @@ function registerConnectionsList(connections) {
|
|
|
11163
11537
|
__name(registerConnectionsList, "registerConnectionsList");
|
|
11164
11538
|
|
|
11165
11539
|
// src/commands/connections/probe.ts
|
|
11166
|
-
import { z as
|
|
11167
|
-
var toolSchema =
|
|
11168
|
-
name:
|
|
11169
|
-
description:
|
|
11170
|
-
input_schema:
|
|
11540
|
+
import { z as z65 } from "zod";
|
|
11541
|
+
var toolSchema = z65.object({
|
|
11542
|
+
name: z65.string(),
|
|
11543
|
+
description: z65.string().optional(),
|
|
11544
|
+
input_schema: z65.record(z65.string(), z65.unknown()).optional()
|
|
11171
11545
|
});
|
|
11172
|
-
var probeResponseSchema =
|
|
11173
|
-
success:
|
|
11174
|
-
tools:
|
|
11175
|
-
error:
|
|
11546
|
+
var probeResponseSchema = z65.object({
|
|
11547
|
+
success: z65.boolean(),
|
|
11548
|
+
tools: z65.array(toolSchema).optional(),
|
|
11549
|
+
error: z65.string().optional()
|
|
11176
11550
|
});
|
|
11177
11551
|
var DESCRIPTION_MAX_WIDTH = 80;
|
|
11178
11552
|
var TABLE_COLUMNS13 = [
|
|
@@ -11386,32 +11760,6 @@ function registerConnections(program) {
|
|
|
11386
11760
|
}
|
|
11387
11761
|
__name(registerConnections, "registerConnections");
|
|
11388
11762
|
|
|
11389
|
-
// src/commands/files/content.ts
|
|
11390
|
-
function registerFilesContent(files) {
|
|
11391
|
-
files.command("content <path>").description("Get the content of a text file (binary files are rejected)").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function contentAction(filePath, options) {
|
|
11392
|
-
const { apiKey, apiBaseUrl } = await requireAuthenticatedConfig(this);
|
|
11393
|
-
const encodedPath = filePath.split("/").map((segment) => encodeURIComponent(segment)).join("/");
|
|
11394
|
-
const raw = await httpRequest({
|
|
11395
|
-
method: "GET",
|
|
11396
|
-
path: `/v1/files/content/${encodedPath}`,
|
|
11397
|
-
apiKey,
|
|
11398
|
-
apiBaseUrl
|
|
11399
|
-
});
|
|
11400
|
-
if (options.json) {
|
|
11401
|
-
printJson(raw);
|
|
11402
|
-
return;
|
|
11403
|
-
}
|
|
11404
|
-
const parsed = teamFileContentResponseSchema.safeParse(raw);
|
|
11405
|
-
if (!parsed.success) {
|
|
11406
|
-
throw new CliError(
|
|
11407
|
-
`Unexpected response from the API: ${parsed.error.message}`
|
|
11408
|
-
);
|
|
11409
|
-
}
|
|
11410
|
-
process.stdout.write(parsed.data.content);
|
|
11411
|
-
}, "contentAction"));
|
|
11412
|
-
}
|
|
11413
|
-
__name(registerFilesContent, "registerFilesContent");
|
|
11414
|
-
|
|
11415
11763
|
// src/commands/files/content-set.ts
|
|
11416
11764
|
import { readFileSync as readFileSync3 } from "node:fs";
|
|
11417
11765
|
function registerFilesContentSet(files) {
|
|
@@ -11474,6 +11822,32 @@ function readContent(options) {
|
|
|
11474
11822
|
}
|
|
11475
11823
|
__name(readContent, "readContent");
|
|
11476
11824
|
|
|
11825
|
+
// src/commands/files/content.ts
|
|
11826
|
+
function registerFilesContent(files) {
|
|
11827
|
+
files.command("content <path>").description("Get the content of a text file (binary files are rejected)").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function contentAction(filePath, options) {
|
|
11828
|
+
const { apiKey, apiBaseUrl } = await requireAuthenticatedConfig(this);
|
|
11829
|
+
const encodedPath = filePath.split("/").map((segment) => encodeURIComponent(segment)).join("/");
|
|
11830
|
+
const raw = await httpRequest({
|
|
11831
|
+
method: "GET",
|
|
11832
|
+
path: `/v1/files/content/${encodedPath}`,
|
|
11833
|
+
apiKey,
|
|
11834
|
+
apiBaseUrl
|
|
11835
|
+
});
|
|
11836
|
+
if (options.json) {
|
|
11837
|
+
printJson(raw);
|
|
11838
|
+
return;
|
|
11839
|
+
}
|
|
11840
|
+
const parsed = teamFileContentResponseSchema.safeParse(raw);
|
|
11841
|
+
if (!parsed.success) {
|
|
11842
|
+
throw new CliError(
|
|
11843
|
+
`Unexpected response from the API: ${parsed.error.message}`
|
|
11844
|
+
);
|
|
11845
|
+
}
|
|
11846
|
+
process.stdout.write(parsed.data.content);
|
|
11847
|
+
}, "contentAction"));
|
|
11848
|
+
}
|
|
11849
|
+
__name(registerFilesContent, "registerFilesContent");
|
|
11850
|
+
|
|
11477
11851
|
// src/commands/files/delete.ts
|
|
11478
11852
|
function registerFilesDelete(files) {
|
|
11479
11853
|
files.command("delete <path>").description("Delete a team file").option("-y, --yes", "skip confirmation prompt").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function deleteAction(filePath, options) {
|
|
@@ -13614,91 +13988,91 @@ function registerQueues(program) {
|
|
|
13614
13988
|
__name(registerQueues, "registerQueues");
|
|
13615
13989
|
|
|
13616
13990
|
// src/api/run-schemas.ts
|
|
13617
|
-
import { z as
|
|
13618
|
-
var publicRunSchema =
|
|
13619
|
-
id:
|
|
13620
|
-
agent_id:
|
|
13621
|
-
build_id:
|
|
13622
|
-
status:
|
|
13623
|
-
source:
|
|
13624
|
-
sandbox_id:
|
|
13625
|
-
started_at:
|
|
13626
|
-
completed_at:
|
|
13627
|
-
created_at:
|
|
13628
|
-
updated_at:
|
|
13629
|
-
human_in_the_loop_enabled:
|
|
13630
|
-
});
|
|
13631
|
-
var startRunResponseSchema =
|
|
13991
|
+
import { z as z66 } from "zod";
|
|
13992
|
+
var publicRunSchema = z66.object({
|
|
13993
|
+
id: z66.string(),
|
|
13994
|
+
agent_id: z66.string(),
|
|
13995
|
+
build_id: z66.string(),
|
|
13996
|
+
status: z66.string(),
|
|
13997
|
+
source: z66.string().nullish(),
|
|
13998
|
+
sandbox_id: z66.string().nullish(),
|
|
13999
|
+
started_at: z66.string().nullish(),
|
|
14000
|
+
completed_at: z66.string().nullish(),
|
|
14001
|
+
created_at: z66.string(),
|
|
14002
|
+
updated_at: z66.string().nullish(),
|
|
14003
|
+
human_in_the_loop_enabled: z66.boolean().nullish()
|
|
14004
|
+
});
|
|
14005
|
+
var startRunResponseSchema = z66.object({
|
|
13632
14006
|
run: publicRunSchema
|
|
13633
14007
|
});
|
|
13634
|
-
var questionOptionSchema =
|
|
13635
|
-
label:
|
|
13636
|
-
description:
|
|
13637
|
-
});
|
|
13638
|
-
var questionSchema =
|
|
13639
|
-
question:
|
|
13640
|
-
header:
|
|
13641
|
-
options:
|
|
13642
|
-
multi_select:
|
|
13643
|
-
});
|
|
13644
|
-
var pendingHumanRequestSchema =
|
|
13645
|
-
id:
|
|
13646
|
-
title:
|
|
13647
|
-
description:
|
|
13648
|
-
created_at:
|
|
13649
|
-
type:
|
|
13650
|
-
questions:
|
|
13651
|
-
});
|
|
13652
|
-
var getRunResponseSchema =
|
|
14008
|
+
var questionOptionSchema = z66.object({
|
|
14009
|
+
label: z66.string(),
|
|
14010
|
+
description: z66.string().nullish()
|
|
14011
|
+
});
|
|
14012
|
+
var questionSchema = z66.object({
|
|
14013
|
+
question: z66.string(),
|
|
14014
|
+
header: z66.string().nullish(),
|
|
14015
|
+
options: z66.array(questionOptionSchema).nullish(),
|
|
14016
|
+
multi_select: z66.boolean().nullish()
|
|
14017
|
+
});
|
|
14018
|
+
var pendingHumanRequestSchema = z66.object({
|
|
14019
|
+
id: z66.string(),
|
|
14020
|
+
title: z66.string(),
|
|
14021
|
+
description: z66.string().nullish(),
|
|
14022
|
+
created_at: z66.string(),
|
|
14023
|
+
type: z66.string(),
|
|
14024
|
+
questions: z66.array(questionSchema).nullish()
|
|
14025
|
+
});
|
|
14026
|
+
var getRunResponseSchema = z66.object({
|
|
13653
14027
|
run: publicRunSchema.nullable(),
|
|
13654
14028
|
pending_human_request: pendingHumanRequestSchema.nullish()
|
|
13655
14029
|
});
|
|
13656
|
-
var stopRunResponseSchema =
|
|
13657
|
-
success:
|
|
13658
|
-
message:
|
|
13659
|
-
});
|
|
13660
|
-
var runMessageSchema =
|
|
13661
|
-
id:
|
|
13662
|
-
type:
|
|
13663
|
-
role:
|
|
13664
|
-
timestamp:
|
|
13665
|
-
text_content:
|
|
13666
|
-
tool_call:
|
|
13667
|
-
id:
|
|
13668
|
-
name:
|
|
13669
|
-
arguments:
|
|
14030
|
+
var stopRunResponseSchema = z66.object({
|
|
14031
|
+
success: z66.boolean(),
|
|
14032
|
+
message: z66.string().nullish()
|
|
14033
|
+
});
|
|
14034
|
+
var runMessageSchema = z66.object({
|
|
14035
|
+
id: z66.string(),
|
|
14036
|
+
type: z66.string(),
|
|
14037
|
+
role: z66.string(),
|
|
14038
|
+
timestamp: z66.string(),
|
|
14039
|
+
text_content: z66.string().nullish(),
|
|
14040
|
+
tool_call: z66.object({
|
|
14041
|
+
id: z66.string(),
|
|
14042
|
+
name: z66.string(),
|
|
14043
|
+
arguments: z66.record(z66.string(), z66.unknown()).nullish()
|
|
13670
14044
|
}).nullish(),
|
|
13671
|
-
tool_result:
|
|
13672
|
-
tool_call_id:
|
|
13673
|
-
result:
|
|
13674
|
-
error:
|
|
14045
|
+
tool_result: z66.object({
|
|
14046
|
+
tool_call_id: z66.string(),
|
|
14047
|
+
result: z66.unknown().nullish(),
|
|
14048
|
+
error: z66.string().nullish()
|
|
13675
14049
|
}).nullish()
|
|
13676
14050
|
});
|
|
13677
|
-
var listRunMessagesResponseSchema =
|
|
13678
|
-
messages:
|
|
13679
|
-
total:
|
|
13680
|
-
limit:
|
|
13681
|
-
offset:
|
|
14051
|
+
var listRunMessagesResponseSchema = z66.object({
|
|
14052
|
+
messages: z66.array(runMessageSchema),
|
|
14053
|
+
total: z66.number().nullish(),
|
|
14054
|
+
limit: z66.number().nullish(),
|
|
14055
|
+
offset: z66.number().nullish()
|
|
13682
14056
|
});
|
|
13683
|
-
var postedMessageSchema =
|
|
13684
|
-
id:
|
|
13685
|
-
type:
|
|
13686
|
-
role:
|
|
13687
|
-
timestamp:
|
|
13688
|
-
text_content:
|
|
14057
|
+
var postedMessageSchema = z66.object({
|
|
14058
|
+
id: z66.string(),
|
|
14059
|
+
type: z66.string(),
|
|
14060
|
+
role: z66.string(),
|
|
14061
|
+
timestamp: z66.string(),
|
|
14062
|
+
text_content: z66.string()
|
|
13689
14063
|
});
|
|
13690
|
-
var postRunMessageResponseSchema =
|
|
14064
|
+
var postRunMessageResponseSchema = z66.object({
|
|
13691
14065
|
message: postedMessageSchema
|
|
13692
14066
|
});
|
|
13693
|
-
var respondHumanRequestResponseSchema =
|
|
13694
|
-
human_request:
|
|
13695
|
-
id:
|
|
13696
|
-
run_id:
|
|
13697
|
-
title:
|
|
13698
|
-
description:
|
|
13699
|
-
response:
|
|
13700
|
-
responded_at:
|
|
13701
|
-
created_at:
|
|
14067
|
+
var respondHumanRequestResponseSchema = z66.object({
|
|
14068
|
+
human_request: z66.object({
|
|
14069
|
+
id: z66.string(),
|
|
14070
|
+
run_id: z66.string(),
|
|
14071
|
+
title: z66.string(),
|
|
14072
|
+
description: z66.string().nullish(),
|
|
14073
|
+
response: z66.string().nullish(),
|
|
14074
|
+
responded_at: z66.string().nullish(),
|
|
14075
|
+
created_at: z66.string()
|
|
13702
14076
|
})
|
|
13703
14077
|
});
|
|
13704
14078
|
|
|
@@ -14192,28 +14566,28 @@ function registerRuns(program) {
|
|
|
14192
14566
|
__name(registerRuns, "registerRuns");
|
|
14193
14567
|
|
|
14194
14568
|
// src/api/sandbox-schemas.ts
|
|
14195
|
-
import { z as
|
|
14196
|
-
var createSandboxResponseSchema =
|
|
14197
|
-
sandbox_id:
|
|
14198
|
-
expires_at:
|
|
14569
|
+
import { z as z67 } from "zod";
|
|
14570
|
+
var createSandboxResponseSchema = z67.object({
|
|
14571
|
+
sandbox_id: z67.string(),
|
|
14572
|
+
expires_at: z67.string()
|
|
14199
14573
|
});
|
|
14200
|
-
var createSandboxUploadUrlResponseSchema =
|
|
14201
|
-
upload_url:
|
|
14202
|
-
path:
|
|
14203
|
-
expires_in_seconds:
|
|
14574
|
+
var createSandboxUploadUrlResponseSchema = z67.object({
|
|
14575
|
+
upload_url: z67.string(),
|
|
14576
|
+
path: z67.string(),
|
|
14577
|
+
expires_in_seconds: z67.number()
|
|
14204
14578
|
});
|
|
14205
|
-
var sandboxFileSchema =
|
|
14206
|
-
name:
|
|
14207
|
-
path:
|
|
14208
|
-
type:
|
|
14209
|
-
size_bytes:
|
|
14579
|
+
var sandboxFileSchema = z67.object({
|
|
14580
|
+
name: z67.string(),
|
|
14581
|
+
path: z67.string(),
|
|
14582
|
+
type: z67.enum(["file", "dir"]),
|
|
14583
|
+
size_bytes: z67.number()
|
|
14210
14584
|
});
|
|
14211
|
-
var listSandboxFilesResponseSchema =
|
|
14212
|
-
files:
|
|
14585
|
+
var listSandboxFilesResponseSchema = z67.object({
|
|
14586
|
+
files: z67.array(sandboxFileSchema)
|
|
14213
14587
|
});
|
|
14214
|
-
var uploadSandboxFileResponseSchema =
|
|
14215
|
-
path:
|
|
14216
|
-
size_bytes:
|
|
14588
|
+
var uploadSandboxFileResponseSchema = z67.object({
|
|
14589
|
+
path: z67.string(),
|
|
14590
|
+
size_bytes: z67.number()
|
|
14217
14591
|
});
|
|
14218
14592
|
var DEFAULT_SANDBOX_FILES_PATH = "/workspace";
|
|
14219
14593
|
|
|
@@ -14460,13 +14834,13 @@ __name(registerSkillsAssignments, "registerSkillsAssignments");
|
|
|
14460
14834
|
|
|
14461
14835
|
// src/commands/skills/create.ts
|
|
14462
14836
|
import { readFileSync as readFileSync4 } from "node:fs";
|
|
14463
|
-
import { z as
|
|
14464
|
-
var createSkillResponseSchema =
|
|
14465
|
-
skill:
|
|
14466
|
-
id:
|
|
14467
|
-
name:
|
|
14468
|
-
description:
|
|
14469
|
-
team_id:
|
|
14837
|
+
import { z as z68 } from "zod";
|
|
14838
|
+
var createSkillResponseSchema = z68.object({
|
|
14839
|
+
skill: z68.object({
|
|
14840
|
+
id: z68.string(),
|
|
14841
|
+
name: z68.string(),
|
|
14842
|
+
description: z68.string(),
|
|
14843
|
+
team_id: z68.string()
|
|
14470
14844
|
})
|
|
14471
14845
|
});
|
|
14472
14846
|
function registerSkillsCreate(skills) {
|
|
@@ -14935,13 +15309,13 @@ __name(registerSkillsSystem, "registerSkillsSystem");
|
|
|
14935
15309
|
// src/commands/skills/upload.ts
|
|
14936
15310
|
import { readFile as readFile6, stat as stat2 } from "node:fs/promises";
|
|
14937
15311
|
import { basename as basename2 } from "node:path";
|
|
14938
|
-
import { z as
|
|
14939
|
-
var uploadSkillResponseSchema =
|
|
14940
|
-
skill:
|
|
14941
|
-
id:
|
|
14942
|
-
name:
|
|
14943
|
-
description:
|
|
14944
|
-
team_id:
|
|
15312
|
+
import { z as z69 } from "zod";
|
|
15313
|
+
var uploadSkillResponseSchema = z69.object({
|
|
15314
|
+
skill: z69.object({
|
|
15315
|
+
id: z69.string(),
|
|
15316
|
+
name: z69.string(),
|
|
15317
|
+
description: z69.string(),
|
|
15318
|
+
team_id: z69.string()
|
|
14945
15319
|
})
|
|
14946
15320
|
});
|
|
14947
15321
|
function registerSkillsUpload(skills) {
|
|
@@ -15011,7 +15385,7 @@ function registerSkills(program) {
|
|
|
15011
15385
|
__name(registerSkills, "registerSkills");
|
|
15012
15386
|
|
|
15013
15387
|
// src/commands/team/get.ts
|
|
15014
|
-
import { z as
|
|
15388
|
+
import { z as z70 } from "zod";
|
|
15015
15389
|
|
|
15016
15390
|
// src/commands/team/resolve-team-id.ts
|
|
15017
15391
|
async function resolveTeamIdFromApiKey(options) {
|
|
@@ -15038,15 +15412,15 @@ async function resolveTeamIdFromApiKey(options) {
|
|
|
15038
15412
|
__name(resolveTeamIdFromApiKey, "resolveTeamIdFromApiKey");
|
|
15039
15413
|
|
|
15040
15414
|
// src/commands/team/get.ts
|
|
15041
|
-
var teamApiSchema2 =
|
|
15042
|
-
id:
|
|
15043
|
-
name:
|
|
15044
|
-
organization_id:
|
|
15045
|
-
slack_team_id:
|
|
15046
|
-
discovery_mode:
|
|
15047
|
-
created_at:
|
|
15048
|
-
});
|
|
15049
|
-
var teamResponseSchema =
|
|
15415
|
+
var teamApiSchema2 = z70.object({
|
|
15416
|
+
id: z70.string(),
|
|
15417
|
+
name: z70.string(),
|
|
15418
|
+
organization_id: z70.string().nullable(),
|
|
15419
|
+
slack_team_id: z70.string().nullable(),
|
|
15420
|
+
discovery_mode: z70.string(),
|
|
15421
|
+
created_at: z70.string()
|
|
15422
|
+
});
|
|
15423
|
+
var teamResponseSchema = z70.object({
|
|
15050
15424
|
team: teamApiSchema2
|
|
15051
15425
|
});
|
|
15052
15426
|
function registerTeamGet(team) {
|
|
@@ -15234,7 +15608,39 @@ function createProgram() {
|
|
|
15234
15608
|
}
|
|
15235
15609
|
__name(createProgram, "createProgram");
|
|
15236
15610
|
|
|
15611
|
+
// src/update-check.ts
|
|
15612
|
+
import { createRequire } from "node:module";
|
|
15613
|
+
import updateNotifier from "update-notifier";
|
|
15614
|
+
var ONE_DAY_MS = 24 * 60 * 60 * 1e3;
|
|
15615
|
+
function checkForUpdate() {
|
|
15616
|
+
try {
|
|
15617
|
+
const pkg = loadPackageMeta();
|
|
15618
|
+
const notifier = updateNotifier({
|
|
15619
|
+
pkg,
|
|
15620
|
+
updateCheckInterval: ONE_DAY_MS,
|
|
15621
|
+
shouldNotifyInNpmScript: false
|
|
15622
|
+
});
|
|
15623
|
+
notifier.notify({ defer: false, isGlobal: true });
|
|
15624
|
+
} catch {
|
|
15625
|
+
}
|
|
15626
|
+
}
|
|
15627
|
+
__name(checkForUpdate, "checkForUpdate");
|
|
15628
|
+
function loadPackageMeta() {
|
|
15629
|
+
if (true) {
|
|
15630
|
+
return { name: "@duvoai/cli", version: "0.5.0" };
|
|
15631
|
+
}
|
|
15632
|
+
const require2 = createRequire(import.meta.url);
|
|
15633
|
+
const raw = require2("../package.json");
|
|
15634
|
+
if (typeof raw !== "object" || raw === null || !("name" in raw) || !("version" in raw) || typeof raw.name !== "string" || typeof raw.version !== "string") {
|
|
15635
|
+
throw new Error("package.json is missing name or version");
|
|
15636
|
+
}
|
|
15637
|
+
const typed = raw;
|
|
15638
|
+
return { name: typed.name, version: typed.version };
|
|
15639
|
+
}
|
|
15640
|
+
__name(loadPackageMeta, "loadPackageMeta");
|
|
15641
|
+
|
|
15237
15642
|
// src/bin/duvo.ts
|
|
15643
|
+
checkForUpdate();
|
|
15238
15644
|
createProgram().parseAsync(process.argv).catch((error) => {
|
|
15239
15645
|
handleCliError(error);
|
|
15240
15646
|
});
|