@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/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 fetch(url, init);
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 fetch(url, init);
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 z53 } from "zod";
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().optional(),
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 postprocessClarityTransformationProposalDataSchema = clarityTransformationProposalDataObjectSchema.extend(proposalSummaryAgentTransformationProposalSchema.shape).extend({});
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 credentialPreviewSchema = z40.object({
6451
- id: z40.guid().describe("Credential ID"),
6452
- domain: z40.string().describe("Domain for the credential"),
6453
- username: z40.string().nullable().describe("Username (if any)"),
6454
- hasEnabledTOTP: z40.boolean().describe("Whether TOTP is enabled"),
6455
- hasPassword: z40.boolean().describe("Whether a password is stored"),
6456
- user_id: z40.string().nullable().describe("Owner user id; null when shared with the team")
6457
- });
6458
- var otpResponseSchema = z40.object({
6459
- code: z40.string().describe("The TOTP code"),
6460
- expiresAt: z40.number().describe("Expiration timestamp in milliseconds")
6461
- });
6462
- var encryptedDataSchema = z40.object({
6463
- encrypted_data: z40.string().describe("Base64-encoded encrypted data"),
6464
- key_version: z40.string().describe("KMS key version or 'base64' for dev")
6465
- });
6466
- var credentialDetailSchema = z40.object({
6467
- domain: z40.string().describe("Domain for the credential"),
6468
- username: z40.string().nullable().describe("Username (if any)"),
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 = z41.object({
6626
- id: z41.string(),
6627
- name: z41.string(),
6628
- path: z41.string(),
6629
- created_at: z41.string().optional(),
6630
- updated_at: z41.string().optional(),
6631
- metadata: z41.object({
6632
- mimetype: z41.string().optional(),
6633
- size: z41.number().optional()
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 = z41.object({
6637
- files: z41.array(teamFileItemSchema)
6638
- });
6639
- var createTeamFileUploadUrlBodySchema = z41.object({
6640
- fileName: z41.string().min(1),
6641
- contentType: z41.string().min(1)
6642
- });
6643
- var createTeamFileUploadUrlResponseSchema = z41.object({
6644
- signedUrl: z41.url(),
6645
- expiresAt: z41.iso.datetime(),
6646
- filePath: z41.string()
6647
- });
6648
- var renameTeamFileBodySchema = z41.object({
6649
- relativePath: z41.string().min(1),
6650
- newFilenameOnly: z41.string().min(1)
6651
- });
6652
- var teamFileSuccessResponseSchema = z41.object({
6653
- success: z41.boolean()
6654
- });
6655
- var teamFileDownloadUrlResponseSchema = z41.object({
6656
- url: z41.url(),
6657
- expiresAt: z41.iso.datetime()
6658
- });
6659
- var teamFileContentResponseSchema = z41.object({
6660
- content: z41.string(),
6661
- path: z41.string(),
6662
- contentType: z41.string().optional()
6663
- });
6664
- var updateTeamFileContentBodySchema = z41.object({
6665
- content: z41.string()
6666
- });
6667
- var globalAdminApiSchema = z42.object({
6668
- id: z42.guid(),
6669
- email: z42.string(),
6670
- userId: z42.guid(),
6671
- userName: z42.string().nullable(),
6672
- addedByUserId: z42.guid().nullable(),
6673
- createdAt: z42.string()
6674
- });
6675
- var globalAdminListResponseSchema = z42.object({
6676
- admins: z42.array(globalAdminApiSchema)
6677
- });
6678
- var globalAdminSearchResponseSchema = z42.object({
6679
- users: z42.array(
6680
- z42.object({
6681
- id: z42.guid(),
6682
- name: z42.string().nullable(),
6683
- email: z42.string(),
6684
- createdAt: z42.string().nullable()
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 = z42.object({
6689
- userId: z42.guid()
7087
+ var globalAdminCreateRequestSchema = z44.object({
7088
+ userId: z44.guid()
6690
7089
  });
6691
- var globalAdminCreateResponseSchema = z42.object({
7090
+ var globalAdminCreateResponseSchema = z44.object({
6692
7091
  admin: globalAdminApiSchema
6693
7092
  });
6694
- var globalAdminDeleteResponseSchema = z42.object({
6695
- success: z42.literal(true)
7093
+ var globalAdminDeleteResponseSchema = z44.object({
7094
+ success: z44.literal(true)
6696
7095
  });
6697
- var adminAccessCheckResponseSchema = z42.object({
6698
- isGlobalAdmin: z42.boolean()
7096
+ var adminAccessCheckResponseSchema = z44.object({
7097
+ isGlobalAdmin: z44.boolean()
6699
7098
  });
6700
- var TransportTypeSchema = z43.enum(["stdio", "sse", "http"]);
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 = z43.enum(INTEGRATION_SLUGS);
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 = z43.object({
6790
- id: z43.string(),
6791
- name: z43.string(),
6792
- type: z43.string(),
6793
- provider: z43.string(),
6794
- user_id: z43.string().nullable(),
6795
- team_id: z43.string(),
6796
- server_url: z43.string().optional(),
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: z43.string().nullable().optional(),
6799
- composio_mcp_id: z43.string().nullable().default(null),
6800
- custom_integration_id: z43.string().nullable().optional(),
6801
- icon_url: z43.string().nullable().optional(),
6802
- oauth_provider: z43.string().nullable().optional(),
6803
- oauth_scopes: z43.array(z43.string()).nullable().optional(),
6804
- has_headers: z43.boolean().optional(),
6805
- has_oauth_tokens: z43.boolean().optional(),
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: z43.string().nullable().optional(),
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: z43.boolean().optional(),
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: z43.string().nullable().optional(),
6824
- created_at: z43.iso.datetime(),
6825
- updated_at: z43.iso.datetime()
6826
- });
6827
- var integrationsListResponseSchema = z43.object({
6828
- integrations: z43.array(integrationResponseSchema),
6829
- total: z43.int().min(0),
6830
- limit: z43.int().min(1),
6831
- offset: z43.int().min(0)
6832
- });
6833
- var integrationsListRequestQuerySchema = z43.object({
6834
- type: z43.string().optional(),
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: z43.coerce.number().int().min(1).max(100).prefault(100),
6839
- offset: z43.coerce.number().int().min(0).prefault(0)
6840
- });
6841
- var connectIntegrationResponseSchema = z43.object({
6842
- integration_id: z43.string(),
6843
- mcp_url: z43.string()
6844
- });
6845
- var testIntegrationResponseSchema = z43.object({
6846
- success: z43.boolean(),
6847
- tools: z43.array(
6848
- z43.object({
6849
- name: z43.string(),
6850
- description: z43.string().optional(),
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: z43.record(z43.string(), z43.unknown()).optional()
7256
+ input_schema: z45.record(z45.string(), z45.unknown()).optional()
6858
7257
  })
6859
7258
  ).optional(),
6860
- error: z43.string().optional()
7259
+ error: z45.string().optional()
6861
7260
  });
6862
- var integrationCredentialsResponseSchema = z43.object({
6863
- id: z43.guid(),
6864
- headers: z43.record(z43.string(), z43.string())
7261
+ var integrationCredentialsResponseSchema = z45.object({
7262
+ id: z45.guid(),
7263
+ headers: z45.record(z45.string(), z45.string())
6865
7264
  });
6866
- var deleteIntegrationResponseSchema = z43.object({
6867
- success: z43.boolean(),
6868
- message: z43.string()
7265
+ var deleteIntegrationResponseSchema = z45.object({
7266
+ success: z45.boolean(),
7267
+ message: z45.string()
6869
7268
  });
6870
- var checkDcrSupportResponseSchema = z43.object({
6871
- supports_dcr: z43.boolean(),
6872
- authorization_endpoint: z43.string().optional(),
6873
- scopes: z43.array(z43.string()).optional()
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 = z43.object({
6876
- authorization_url: z43.string().describe("OAuth provider authorization URL to open in a browser")
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 = z43.object({
6879
- redirect_url: z43.string().nullable().describe(
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: z43.string().nullable().describe("Composio connection status, e.g. INITIATED or ACTIVE."),
6883
- connected_account_id: z43.string().describe(
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 = z43.object({
6888
- name: z43.string().min(1, "Name is required"),
6889
- auth_method: z43.enum(["url", "apikey", "headers", "oauth"]),
6890
- server_url: z43.url("Must be a valid URL"),
6891
- oauth_client_id: z43.string().min(1).optional(),
6892
- oauth_client_secret: z43.string().min(1).optional()
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 = z43.object({
6904
- name: z43.string().min(1, "Name is required"),
6905
- server_url: z43.url("Must be a valid URL").optional(),
6906
- type: z43.string().default("custom_mcp"),
6907
- provider: z43.literal("user"),
6908
- auth_method: z43.enum(["url", "apikey", "headers", "oauth"]),
6909
- custom_integration_id: z43.guid().optional(),
6910
- headers: z43.object({
6911
- plaintext: z43.record(z43.string(), z43.string()).optional(),
6912
- secret: z43.record(z43.string(), z43.string()).optional()
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 = z43.object({
6916
- name: z43.string().min(1).optional(),
6917
- server_url: z43.url().optional(),
6918
- auth_method: z43.enum(["url", "oauth", "apikey", "headers"]).optional(),
6919
- headers: z43.object({
6920
- plaintext: z43.record(z43.string(), z43.string()).optional(),
6921
- secret: z43.record(z43.string(), z43.string()).optional()
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: z43.string().nullable().optional(),
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: z43.boolean().optional()
7327
+ shared: z45.boolean().optional()
6929
7328
  });
6930
- var testIntegrationRequestSchema = z43.object({
6931
- server_url: z43.url().describe("MCP server URL to test"),
6932
- headers: z43.record(z43.string(), z43.string()).optional().describe("Optional HTTP headers for authentication")
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 = z44.enum(JOB_LIST_SORT_COLUMNS);
6936
- var jobListIssueSeveritySchema = z44.enum(
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 = z44.object({
6940
- id: z44.guid(),
6941
- created_at: z44.coerce.date(),
6942
- updated_at: z44.coerce.date(),
6943
- started_at: z44.coerce.date().nullable(),
6944
- completed_at: z44.coerce.date().nullable(),
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: z44.string().nullable(),
6947
- title: z44.string(),
6948
- run_number: z44.number(),
7345
+ source: z46.string().nullable(),
7346
+ title: z46.string(),
7347
+ run_number: z46.number(),
6949
7348
  // Assignment info
6950
- agent_id: z44.guid(),
6951
- agent_name: z44.string(),
6952
- build_id: z44.guid(),
7349
+ agent_id: z46.guid(),
7350
+ agent_name: z46.string(),
7351
+ build_id: z46.guid(),
6953
7352
  // User info
6954
- user_id: z44.guid().nullable(),
7353
+ user_id: z46.guid().nullable(),
6955
7354
  // Case info
6956
- case_queue_item_id: z44.guid().nullable(),
6957
- case_queue_id: z44.guid().nullable(),
6958
- case_queue_name: z44.string().nullable(),
6959
- case_title: z44.string().nullable(),
6960
- postponed_to: z44.coerce.date().nullable(),
6961
- submitted_prompt_count: z44.number().int().min(0),
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 = z44.object({
6965
- data: z44.array(jobListItemSchema),
6966
- total: z44.number()
7363
+ var jobListResponseSchema = z46.object({
7364
+ data: z46.array(jobListItemSchema),
7365
+ total: z46.number()
6967
7366
  });
6968
- var jobFilterOptionsSchema = z44.object({
6969
- agents: z44.array(
6970
- z44.object({
6971
- id: z44.string(),
6972
- name: z44.string(),
6973
- folder_id: z44.string().nullable()
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: z44.array(
6977
- z44.object({
6978
- id: z44.string(),
6979
- name: z44.string(),
6980
- parent_folder_id: z44.string().nullable()
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: z44.array(
6984
- z44.object({
6985
- id: z44.string(),
6986
- name: z44.string().nullable(),
6987
- email: z44.string()
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: z44.array(z44.object({ id: z44.string(), name: z44.string() }))
6991
- });
6992
- var mcpStepSchema = z45.object({
6993
- tool: z45.string().describe("MCP tool name (e.g., click, fill, navigate_page)"),
6994
- params: z45.record(z45.string(), z45.unknown()).describe("Tool-specific parameters"),
6995
- fallbackSelectors: z45.array(z45.string()).optional().describe("Alternative CSS selectors if primary fails"),
6996
- description: z45.string().optional().describe("Human-readable step description"),
6997
- screenshot: z45.string().optional().describe("Base64 screenshot at this step for visual context"),
6998
- snapshot: z45.string().optional().describe("DOM snapshot in accessibility tree format at this step"),
6999
- framePath: z45.array(z45.number()).optional().describe(
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 = z45.object({
7004
- name: z45.string(),
7005
- startUrl: z45.string(),
7006
- viewport: z45.object({
7007
- width: z45.number(),
7008
- height: z45.number()
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: z45.array(mcpStepSchema)
7409
+ steps: z47.array(mcpStepSchema)
7011
7410
  });
7012
- var MCP_WORKFLOW_JSON_SCHEMA = z45.toJSONSchema(mcpWorkflowSchema, {
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 = z46.object({
7021
- name: z46.string().describe("Identifier to pass in the build's plugins array."),
7022
- type: z46.enum(["duvo-platform", "github"]).describe(
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: z46.string()
7424
+ description: z48.string()
7026
7425
  });
7027
- var pluginCatalogResponseSchema = z46.object({
7028
- plugins: z46.array(catalogPluginSchema)
7426
+ var pluginCatalogResponseSchema = z48.object({
7427
+ plugins: z48.array(catalogPluginSchema)
7029
7428
  });
7030
- var publicProfileSchema = z47.object({
7031
- id: z47.guid(),
7032
- name: z47.string().nullable(),
7033
- email: z47.email(),
7034
- teamId: z47.guid().nullable()
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 = z47.object({
7435
+ var publicProfileResponseSchema = z49.object({
7037
7436
  profile: publicProfileSchema
7038
7437
  });
7039
- var elementSelectorsSchema = z48.object({
7040
- css: z48.string().optional(),
7041
- cssPath: z48.string().optional(),
7042
- xpath: z48.string().optional(),
7043
- testId: z48.string().optional(),
7044
- ariaSelector: z48.string().optional(),
7045
- text: z48.string().optional()
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 = z48.object({
7048
- uid: z48.string().optional(),
7446
+ var elementInfoSchema = z50.object({
7447
+ uid: z50.string().optional(),
7049
7448
  selectors: elementSelectorsSchema,
7050
- tagName: z48.string(),
7051
- textContent: z48.string().optional(),
7052
- ariaLabel: z48.string().optional(),
7053
- computedRole: z48.string().optional(),
7054
- attributes: z48.record(z48.string(), z48.string()).optional(),
7055
- framePath: z48.array(z48.number()).optional(),
7056
- frameUrl: z48.string().optional()
7057
- });
7058
- var recordedEventSchema = z48.looseObject({
7059
- id: z48.string(),
7060
- type: z48.string(),
7061
- timestamp: z48.number(),
7062
- url: z48.string(),
7063
- tabId: z48.number().optional(),
7064
- frameId: z48.number().optional(),
7065
- framePath: z48.array(z48.number()).optional(),
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 = z49.object({
7467
+ var RedactedMcpServerConfigSchema = z51.object({
7069
7468
  type: TransportTypeSchema,
7070
7469
  integrationSlug: IntegrationSlugSchema,
7071
- instanceId: z49.string().nullable()
7072
- });
7073
- var ThreadContextMessageSchema = z49.object({
7074
- role: z49.enum(["user", "assistant"]),
7075
- content: z49.string()
7076
- });
7077
- var ChatFileReferenceSchema = z49.object({
7078
- id: z49.string(),
7079
- name: z49.string(),
7080
- mimetype: z49.string(),
7081
- size: z49.number(),
7082
- platform: z49.enum(["slack", "teams"]),
7083
- workspaceId: z49.string(),
7084
- channelId: z49.string()
7085
- });
7086
- var ResolvedSubAgentSchema = z49.object({
7087
- agentId: z49.string().uuid(),
7088
- buildId: z49.string().uuid(),
7089
- name: z49.string().min(1).max(64).regex(/^[a-z0-9-]+$/).describe(
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: z49.string().describe(
7491
+ description: z51.string().describe(
7093
7492
  "Routing description Claude uses to decide when to delegate to this subagent"
7094
7493
  ),
7095
- prompt: z49.string().describe("System prompt (SOP) for this subagent"),
7096
- model: z49.string().optional().describe("Optional Claude model identifier override for this subagent"),
7097
- mcpServers: z49.record(z49.string(), RedactedMcpServerConfigSchema).default({}).describe(
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: z49.string(),
7103
- mcpServers: z49.record(z49.string(), RedactedMcpServerConfigSchema),
7104
- subAgents: z49.array(ResolvedSubAgentSchema).optional().default([]),
7105
- conversationHistory: z49.array(ThreadContextMessageSchema).optional(),
7106
- chatFiles: z49.array(ChatFileReferenceSchema).optional(),
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: z49.string().optional()
7507
+ timezone: z51.string().optional()
7109
7508
  });
7110
- var StoredRunConfigV0Schema = z49.object({
7111
- version: z49.literal("v0")
7509
+ var StoredRunConfigV0Schema = z51.object({
7510
+ version: z51.literal("v0")
7112
7511
  });
7113
- var StoredRunConfigV1Schema = z49.object({
7114
- version: z49.literal("v1"),
7512
+ var StoredRunConfigV1Schema = z51.object({
7513
+ version: z51.literal("v1"),
7115
7514
  data: RunConfigSchema
7116
7515
  });
7117
- var StoredRunConfigSchema = z49.union([
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 = z50.object({
7137
- id: z50.string(),
7138
- name: z50.string(),
7139
- description: z50.string(),
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: z50.string().nullable()
7540
+ team_id: z52.string().nullable()
7142
7541
  });
7143
- var listSkillsResponseSchema = z50.object({
7144
- skills: z50.array(skillApiSchema)
7542
+ var listSkillsResponseSchema = z52.object({
7543
+ skills: z52.array(skillApiSchema)
7145
7544
  });
7146
- var systemSkillSchema = z50.object({
7147
- id: z50.string(),
7148
- name: z50.string(),
7149
- description: z50.string()
7150
- });
7151
- var listSystemSkillsResponseSchema = z50.object({
7152
- skills: z50.array(systemSkillSchema)
7153
- });
7154
- var skillFileItemSchema = z50.object({
7155
- name: z50.string(),
7156
- path: z50.string(),
7157
- size: z50.number().optional(),
7158
- contentType: z50.string().optional(),
7159
- updatedAt: z50.string().optional()
7160
- });
7161
- var listSkillFilesResponseSchema = z50.object({
7162
- files: z50.array(skillFileItemSchema)
7163
- });
7164
- var getSkillFileContentResponseSchema = z50.object({
7165
- content: z50.string(),
7166
- path: z50.string(),
7167
- contentType: z50.string().optional()
7168
- });
7169
- var updateSkillFileBodySchema = z50.object({
7170
- content: z50.string()
7171
- });
7172
- var updateSkillFileResponseSchema = z50.object({
7173
- success: z50.boolean(),
7174
- message: z50.string(),
7175
- skill: z50.object({
7176
- id: z50.string(),
7177
- name: z50.string(),
7178
- description: z50.string()
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 = z50.object({
7182
- success: z50.boolean(),
7183
- message: z50.string()
7580
+ var deleteSkillResponseSchema = z52.object({
7581
+ success: z52.boolean(),
7582
+ message: z52.string()
7184
7583
  });
7185
- var generateSkillBodySchema = z50.object({
7186
- prompt: z50.string().min(1).max(2e3),
7187
- existingContent: z50.string().max(2e4).optional()
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 = z50.object({
7190
- content: z50.string()
7588
+ var generateSkillResponseSchema = z52.object({
7589
+ content: z52.string()
7191
7590
  });
7192
- var skillAssignmentSchema = z50.object({
7193
- id: z50.string(),
7194
- name: z50.string()
7591
+ var skillAssignmentSchema = z52.object({
7592
+ id: z52.string(),
7593
+ name: z52.string()
7195
7594
  });
7196
- var listSkillAssignmentsResponseSchema = z50.object({
7197
- assignments: z50.array(skillAssignmentSchema),
7198
- total: z50.number()
7595
+ var listSkillAssignmentsResponseSchema = z52.object({
7596
+ assignments: z52.array(skillAssignmentSchema),
7597
+ total: z52.number()
7199
7598
  });
7200
- var teamInvitationApiSchema = z51.object({
7201
- id: z51.string(),
7202
- team_id: z51.string(),
7203
- email: z51.email(),
7204
- invited_by: z51.string(),
7205
- role: z51.string(),
7206
- status: z51.string(),
7207
- name: z51.string().nullable(),
7208
- created_at: z51.string(),
7209
- process_id: z51.guid().nullable().optional()
7210
- });
7211
- var teamInvitationDetailApiSchema = z51.object({
7212
- id: z51.string(),
7213
- team_id: z51.string(),
7214
- email: z51.email(),
7215
- invited_by: z51.string(),
7216
- role: z51.string(),
7217
- status: z51.string(),
7218
- name: z51.string().nullable(),
7219
- created_at: z51.string(),
7220
- process_id: z51.guid().nullable().optional(),
7221
- team: z51.object({
7222
- id: z51.string(),
7223
- name: z51.string()
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: z51.object({
7226
- id: z51.string(),
7227
- name: z51.string().nullable(),
7228
- email: z51.email()
7624
+ invitedBy: z53.object({
7625
+ id: z53.string(),
7626
+ name: z53.string().nullable(),
7627
+ email: z53.email()
7229
7628
  }),
7230
- process: z51.object({
7231
- id: z51.string(),
7232
- name: z51.string()
7629
+ process: z53.object({
7630
+ id: z53.string(),
7631
+ name: z53.string()
7233
7632
  }).optional()
7234
7633
  });
7235
- var createTeamInvitationRequestSchema = z51.object({
7236
- email: z51.email(),
7237
- role: z51.string(),
7238
- processId: z51.guid().optional()
7239
- });
7240
- var acceptTeamInvitationRequestSchema = z51.object({
7241
- name: z51.string().optional()
7242
- });
7243
- var bulkInviteResponseSchema = z51.object({
7244
- succeeded: z51.number(),
7245
- skipped: z51.number(),
7246
- failed: z51.number()
7247
- });
7248
- var teamDiscoveryModeSchema = z52.enum(["request", "auto"]);
7249
- var BrowserLocationSchema = z52.union([
7250
- z52.literal("cz"),
7251
- z52.literal("de"),
7252
- z52.literal("fr"),
7253
- z52.literal("gb"),
7254
- z52.literal("it"),
7255
- z52.literal("pl"),
7256
- z52.literal("sk")
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 = z52.object({
7259
- id: z52.guid(),
7260
- name: z52.string().nullable(),
7261
- email: z52.email(),
7262
- role: z52.string(),
7263
- inheritedFromOrg: z52.boolean().default(false)
7264
- });
7265
- var listTeamMembersResponseSchema = z52.object({
7266
- members: z52.array(teamMemberApiSchema),
7267
- total: z52.number().int().nonnegative(),
7268
- limit: z52.number().int().positive(),
7269
- offset: z52.number().int().nonnegative()
7270
- });
7271
- var updateMemberRoleRequestSchema = z52.object({
7272
- role: z52.string()
7273
- });
7274
- var removeMemberResponseSchema = z52.object({
7275
- success: z52.literal(true),
7276
- nextTeamId: z52.guid().nullable(),
7277
- planType: z52.enum(["pro", "enterprise"]).nullable()
7278
- });
7279
- var getMemberMeResponseSchema = z52.object({
7280
- role: z52.string().nullable()
7281
- });
7282
- var addTeamMemberRequestSchema = z52.object({
7283
- userId: z52.guid(),
7284
- role: z52.string()
7285
- });
7286
- var updateTeamRequestSchema = z52.object({
7287
- name: z52.string().min(1).optional(),
7288
- slack_team_id: z52.string().optional(),
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 = z52.object({
7292
- id: z52.guid(),
7293
- name: z52.string(),
7294
- created_at: z52.string(),
7295
- organization_id: z52.guid().nullable(),
7296
- slack_team_id: z52.string().nullable(),
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 = z52.object({
7699
+ var teamConfigDataSchema = z54.object({
7301
7700
  browserProviderOverride: BrowserProviderTypeSchema.nullable().optional(),
7302
7701
  browserLocationOverride: BrowserLocationSchema.nullable().optional()
7303
7702
  });
7304
- var teamConfigSchema = z52.object({
7305
- version: z52.literal(TEAM_CONFIG_VERSION),
7703
+ var teamConfigSchema = z54.object({
7704
+ version: z54.literal(TEAM_CONFIG_VERSION),
7306
7705
  data: teamConfigDataSchema
7307
7706
  });
7308
- var listTeamInvitesResponseSchema = z52.object({
7309
- invitations: z52.array(teamInvitationApiSchema)
7310
- });
7311
- var teamInsightsCopilotSchema = z53.object({
7312
- id: z53.guid(),
7313
- name: z53.string(),
7314
- teamName: z53.string().nullable().optional(),
7315
- created_at: z53.string().nullable(),
7316
- updated_at: z53.string().nullable(),
7317
- team_id: z53.string().nullable(),
7318
- thread_id: z53.string().nullable(),
7319
- slack_enabled: z53.boolean().nullable()
7320
- });
7321
- var teamInsightsUserProfileSchema = z53.object({
7322
- id: z53.guid(),
7323
- name: z53.string().nullable(),
7324
- email: z53.string()
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: z53.number(),
7329
- lastRun: z53.string().nullable()
7727
+ runCount: z55.number(),
7728
+ lastRun: z55.string().nullable()
7330
7729
  }
7331
7730
  );
7332
- var teamInsightsMetricSourceSchema = z53.object({
7731
+ var teamInsightsMetricSourceSchema = z55.object({
7333
7732
  source: agentRunSourceSchema,
7334
- runsTotal: z53.number(),
7335
- completedRuns: z53.number()
7733
+ runsTotal: z55.number(),
7734
+ completedRuns: z55.number()
7336
7735
  });
7337
7736
  var teamInsightsCopilotWithRunsSchema = teamInsightsCopilotSchema.extend({
7338
- integrations: z53.array(z53.string()),
7339
- uniqueUsersCount: z53.number(),
7340
- users: z53.array(teamInsightsUserUsageSchema),
7341
- totalRuns: z53.number(),
7342
- completedRuns: z53.number(),
7343
- totalTimeSpentMs: z53.number(),
7344
- averageTimeSpentMs: z53.number(),
7345
- completedRunsWithTiming: z53.number(),
7346
- sources: z53.array(teamInsightsMetricSourceSchema)
7347
- });
7348
- var teamInsightsAgentsRunResponseSchema = z53.object({
7349
- data: z53.array(teamInsightsCopilotWithRunsSchema),
7350
- total: z53.number()
7351
- });
7352
- var teamInsightsMetricsResponseSchema = z53.object({
7353
- runsTotal: z53.number(),
7354
- completedRuns: z53.number(),
7355
- sources: z53.array(teamInsightsMetricSourceSchema)
7356
- });
7357
- var teamInsightsUserAgentRunSchema = z53.object({
7358
- id: z53.guid(),
7359
- created_at: z53.string(),
7360
- updated_at: z53.string(),
7361
- agent_id: z53.guid(),
7362
- agent_name: z53.string(),
7363
- build_id: z53.guid(),
7364
- source: z53.string().nullable(),
7365
- started_at: z53.string().nullable(),
7366
- completed_at: z53.string().nullable()
7367
- });
7368
- var teamInsightsAgentSchema = z53.object({
7369
- id: z53.guid(),
7370
- name: z53.string(),
7371
- teamName: z53.string().nullable().optional(),
7372
- runs: z53.array(teamInsightsUserAgentRunSchema)
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: z53.array(teamInsightsAgentSchema),
7376
- runs: z53.array(teamInsightsUserAgentRunSchema),
7377
- totalRuns: z53.number()
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 getTeamInviteLinkQuerySchema = z54.object({
7387
- frontendUrl: z54.url()
7778
+ var teamInsightsUsersResponseSchema = z55.object({
7779
+ data: z55.array(teamInsightsUserWithAgentsAndRunsSchema),
7780
+ total: z55.number()
7388
7781
  });
7389
- var teamInviteLinkCreatorSchema = z54.object({
7390
- id: z54.guid(),
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 acceptJoinLinkResponseSchema = z54.object({
7411
- success: z54.boolean(),
7412
- teamId: z54.guid()
7785
+ var userDismissalMutationSchema = z56.object({
7786
+ elementKey: z56.string()
7413
7787
  });
7414
- var caseFilterStatusSchema = z55.enum([
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 = z55.object({
7423
- status: z55.array(caseFilterStatusSchema).optional(),
7424
- created_at_from: z55.string().optional(),
7425
- updated_at_from: z55.string().optional(),
7426
- labels: z55.record(z55.string(), z55.array(z55.string())).optional()
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 = z55.object({
7802
+ var casesListRequestBodySchema = z57.object({
7429
7803
  filters: casesFiltersSchema.default({}),
7430
- limit: z55.int().min(1).max(100).default(25),
7431
- offset: z55.int().min(0).default(0),
7432
- sort_by: z55.enum(["created_at", "updated_at", "postponed_to"]).default("created_at"),
7433
- sort_order: z55.enum(["asc", "desc"]).default("desc"),
7434
- search: z55.string().optional()
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 = z55.array(caseFilterStatusSchema).safeParse(values);
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 z56 } from "zod";
8401
- var publicAgentSchema = z56.object({
8402
- id: z56.string(),
8403
- name: z56.string(),
8404
- slack_enabled: z56.boolean().nullish(),
8405
- microsoft_teams_enabled: z56.boolean().nullish(),
8406
- agentic_memory_enabled: z56.boolean().nullish(),
8407
- thread_id: z56.string().nullish(),
8408
- created_at: z56.string().nullish(),
8409
- updated_at: z56.string().nullish()
8410
- });
8411
- var publicBuildSchema = z56.object({
8412
- id: z56.string(),
8413
- agent_id: z56.string(),
8414
- name: z56.string(),
8415
- revision_number: z56.number().nullish(),
8416
- created_at: z56.string().nullish(),
8417
- updated_at: z56.string().nullish()
8418
- });
8419
- var listAgentsResponseSchema = z56.object({
8420
- agents: z56.array(publicAgentSchema),
8421
- total: z56.number().nullish(),
8422
- limit: z56.number().nullish(),
8423
- offset: z56.number().nullish()
8424
- });
8425
- var getAgentResponseSchema = z56.object({
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 = z56.object({
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 z57 } from "zod";
8733
- var publicScheduleSchema = z57.object({
8734
- id: z57.string(),
8735
- build_id: z57.string(),
8736
- agent_id: z57.string(),
8737
- user_id: z57.string(),
8738
- enabled: z57.boolean(),
8739
- frequency: z57.string(),
8740
- time: z57.string().nullish(),
8741
- timezone: z57.string(),
8742
- day: z57.string().nullish(),
8743
- day_of_month: z57.number().nullish(),
8744
- cron: z57.string().nullish(),
8745
- source: z57.string().nullish(),
8746
- task: z57.string().nullish(),
8747
- recurring: z57.boolean().nullish(),
8748
- created_at: z57.string(),
8749
- updated_at: z57.string()
8750
- });
8751
- var listSchedulesResponseSchema = z57.object({
8752
- schedules: z57.array(publicScheduleSchema)
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 z58 } from "zod";
9225
- var integrationSchema = z58.object({
9226
- id: z58.string(),
9227
- name: z58.string(),
9228
- type: z58.string(),
9229
- provider: z58.string(),
9230
- user_id: z58.string().nullable(),
9231
- team_id: z58.string(),
9232
- server_url: z58.string().optional(),
9233
- transport_type: z58.string().optional(),
9234
- auth_method: z58.string().nullish(),
9235
- composio_mcp_id: z58.string().nullish(),
9236
- custom_integration_id: z58.string().nullish(),
9237
- icon_url: z58.string().nullish(),
9238
- oauth_provider: z58.string().nullish(),
9239
- oauth_scopes: z58.array(z58.string()).nullish(),
9240
- integration_id: z58.string().nullish(),
9241
- created_at: z58.string(),
9242
- updated_at: z58.string()
9243
- });
9244
- var integrationsListResponseSchema2 = z58.object({
9245
- integrations: z58.array(integrationSchema)
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 = z58.object({
9249
- id: z58.string(),
9250
- integration_id: z58.string().nullable(),
9251
- custom_integration_id: z58.string().nullable(),
9252
- integration_type: z58.string(),
9253
- integration_name: z58.string(),
9254
- created_at: z58.string()
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 = z58.object({
9257
- integrations: z58.array(buildIntegrationConfigSchema2)
9630
+ var listBuildIntegrationsResponseSchema2 = z60.object({
9631
+ integrations: z60.array(buildIntegrationConfigSchema2)
9258
9632
  });
9259
- var attachBuildIntegrationsResponseSchema = z58.object({
9260
- success: z58.boolean(),
9261
- count: z58.number()
9633
+ var attachBuildIntegrationsResponseSchema = z60.object({
9634
+ success: z60.boolean(),
9635
+ count: z60.number()
9262
9636
  });
9263
- var buildIntegrationConnectionSchema = z58.object({
9264
- connection_id: z58.string(),
9265
- created_at: z58.string()
9637
+ var buildIntegrationConnectionSchema = z60.object({
9638
+ connection_id: z60.string(),
9639
+ created_at: z60.string()
9266
9640
  });
9267
- var listBuildIntegrationConnectionsResponseSchema = z58.object({
9268
- connections: z58.array(buildIntegrationConnectionSchema)
9641
+ var listBuildIntegrationConnectionsResponseSchema = z60.object({
9642
+ connections: z60.array(buildIntegrationConnectionSchema)
9269
9643
  });
9270
- var successResponseSchema = z58.object({
9271
- success: z58.boolean()
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 z60 } from "zod";
9890
+ import { z as z62 } from "zod";
9517
9891
 
9518
9892
  // src/api/json-value.ts
9519
- import { z as z59 } from "zod";
9520
- var jsonValueSchema = z59.lazy(
9521
- () => z59.union([
9522
- z59.string(),
9523
- z59.number(),
9524
- z59.boolean(),
9525
- z59.null(),
9526
- z59.array(jsonValueSchema),
9527
- z59.record(z59.string(), jsonValueSchema)
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 = z60.object({
9533
- id: z60.string(),
9534
- agent_id: z60.string(),
9535
- name: z60.string(),
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: z60.number().nullish(),
9538
- created_at: z60.string().nullish(),
9539
- updated_at: z60.string().nullish()
9911
+ revision_number: z62.number().nullish(),
9912
+ created_at: z62.string().nullish(),
9913
+ updated_at: z62.string().nullish()
9540
9914
  });
9541
- var listBuildsResponseSchema2 = z60.object({
9542
- builds: z60.array(publicBuildSchema2),
9543
- total: z60.number().nullish(),
9544
- limit: z60.number().nullish(),
9545
- offset: z60.number().nullish()
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 = z60.object({
9921
+ var getBuildResponseSchema = z62.object({
9548
9922
  build: publicBuildSchema2
9549
9923
  });
9550
- var createBuildResponseSchema = z60.object({
9924
+ var createBuildResponseSchema = z62.object({
9551
9925
  build: publicBuildSchema2,
9552
- agent: z60.object({ id: z60.string() })
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 z61 } from "zod";
9700
- var promoteResponseSchema = z61.object({
9701
- success: z61.boolean()
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 z62 } from "zod";
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 = z62.object({
10729
- id: z62.string(),
10730
- type: z62.string(),
10731
- role: z62.string(),
10732
- timestamp: z62.string(),
10733
- text_content: z62.string().nullish(),
10734
- tool_call: z62.object({ id: z62.string(), name: z62.string() }).passthrough().nullish(),
10735
- tool_result: z62.object({ tool_call_id: z62.string() }).passthrough().nullish()
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 = z62.object({
10738
- messages: z62.array(recentMessageSchema)
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 z63 } from "zod";
11167
- var toolSchema = z63.object({
11168
- name: z63.string(),
11169
- description: z63.string().optional(),
11170
- input_schema: z63.record(z63.string(), z63.unknown()).optional()
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 = z63.object({
11173
- success: z63.boolean(),
11174
- tools: z63.array(toolSchema).optional(),
11175
- error: z63.string().optional()
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 z64 } from "zod";
13618
- var publicRunSchema = z64.object({
13619
- id: z64.string(),
13620
- agent_id: z64.string(),
13621
- build_id: z64.string(),
13622
- status: z64.string(),
13623
- source: z64.string().nullish(),
13624
- sandbox_id: z64.string().nullish(),
13625
- started_at: z64.string().nullish(),
13626
- completed_at: z64.string().nullish(),
13627
- created_at: z64.string(),
13628
- updated_at: z64.string().nullish(),
13629
- human_in_the_loop_enabled: z64.boolean().nullish()
13630
- });
13631
- var startRunResponseSchema = z64.object({
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 = z64.object({
13635
- label: z64.string(),
13636
- description: z64.string().nullish()
13637
- });
13638
- var questionSchema = z64.object({
13639
- question: z64.string(),
13640
- header: z64.string().nullish(),
13641
- options: z64.array(questionOptionSchema).nullish(),
13642
- multi_select: z64.boolean().nullish()
13643
- });
13644
- var pendingHumanRequestSchema = z64.object({
13645
- id: z64.string(),
13646
- title: z64.string(),
13647
- description: z64.string().nullish(),
13648
- created_at: z64.string(),
13649
- type: z64.string(),
13650
- questions: z64.array(questionSchema).nullish()
13651
- });
13652
- var getRunResponseSchema = z64.object({
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 = z64.object({
13657
- success: z64.boolean(),
13658
- message: z64.string().nullish()
13659
- });
13660
- var runMessageSchema = z64.object({
13661
- id: z64.string(),
13662
- type: z64.string(),
13663
- role: z64.string(),
13664
- timestamp: z64.string(),
13665
- text_content: z64.string().nullish(),
13666
- tool_call: z64.object({
13667
- id: z64.string(),
13668
- name: z64.string(),
13669
- arguments: z64.record(z64.string(), z64.unknown()).nullish()
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: z64.object({
13672
- tool_call_id: z64.string(),
13673
- result: z64.unknown().nullish(),
13674
- error: z64.string().nullish()
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 = z64.object({
13678
- messages: z64.array(runMessageSchema),
13679
- total: z64.number().nullish(),
13680
- limit: z64.number().nullish(),
13681
- offset: z64.number().nullish()
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 = z64.object({
13684
- id: z64.string(),
13685
- type: z64.string(),
13686
- role: z64.string(),
13687
- timestamp: z64.string(),
13688
- text_content: z64.string()
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 = z64.object({
14064
+ var postRunMessageResponseSchema = z66.object({
13691
14065
  message: postedMessageSchema
13692
14066
  });
13693
- var respondHumanRequestResponseSchema = z64.object({
13694
- human_request: z64.object({
13695
- id: z64.string(),
13696
- run_id: z64.string(),
13697
- title: z64.string(),
13698
- description: z64.string().nullish(),
13699
- response: z64.string().nullish(),
13700
- responded_at: z64.string().nullish(),
13701
- created_at: z64.string()
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 z65 } from "zod";
14196
- var createSandboxResponseSchema = z65.object({
14197
- sandbox_id: z65.string(),
14198
- expires_at: z65.string()
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 = z65.object({
14201
- upload_url: z65.string(),
14202
- path: z65.string(),
14203
- expires_in_seconds: z65.number()
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 = z65.object({
14206
- name: z65.string(),
14207
- path: z65.string(),
14208
- type: z65.enum(["file", "dir"]),
14209
- size_bytes: z65.number()
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 = z65.object({
14212
- files: z65.array(sandboxFileSchema)
14585
+ var listSandboxFilesResponseSchema = z67.object({
14586
+ files: z67.array(sandboxFileSchema)
14213
14587
  });
14214
- var uploadSandboxFileResponseSchema = z65.object({
14215
- path: z65.string(),
14216
- size_bytes: z65.number()
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 z66 } from "zod";
14464
- var createSkillResponseSchema = z66.object({
14465
- skill: z66.object({
14466
- id: z66.string(),
14467
- name: z66.string(),
14468
- description: z66.string(),
14469
- team_id: z66.string()
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 z67 } from "zod";
14939
- var uploadSkillResponseSchema = z67.object({
14940
- skill: z67.object({
14941
- id: z67.string(),
14942
- name: z67.string(),
14943
- description: z67.string(),
14944
- team_id: z67.string()
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 z68 } from "zod";
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 = z68.object({
15042
- id: z68.string(),
15043
- name: z68.string(),
15044
- organization_id: z68.string().nullable(),
15045
- slack_team_id: z68.string().nullable(),
15046
- discovery_mode: z68.string(),
15047
- created_at: z68.string()
15048
- });
15049
- var teamResponseSchema = z68.object({
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
  });