@duvoai/cli 0.4.1 → 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 {
@@ -1887,45 +2205,6 @@ var __name2 = /* @__PURE__ */ __name((target, value) => __defProp2(target, "name
1887
2205
  var customerPortalResponseSchema = z3.object({
1888
2206
  url: z3.string()
1889
2207
  });
1890
- var limitSchema = z22.union([z22.number(), z22.literal("unlimited")]);
1891
- var entitlementsResponseSchema = z22.object({
1892
- planVersionId: z22.string(),
1893
- planName: z22.string(),
1894
- basePlan: z22.enum(["free", "pro", "enterprise"]),
1895
- features: z22.array(z22.string()),
1896
- limits: z22.object({
1897
- maxAgents: limitSchema,
1898
- maxAgentRunsPerMonth: limitSchema,
1899
- runCountingMode: z22.enum(["monthly", "lifetime"])
1900
- }),
1901
- usage: z22.object({
1902
- currentAssignments: z22.number(),
1903
- currentMonthAgentRuns: z22.number()
1904
- }),
1905
- subscription: z22.object({
1906
- status: z22.enum(["active", "trialing", "canceled", "past_due"]),
1907
- trialEndsAt: z22.coerce.date().nullable(),
1908
- currentPeriodEnd: z22.coerce.date().nullable()
1909
- }),
1910
- canCreateTeams: z22.boolean()
1911
- });
1912
- var invoiceSchema = z32.object({
1913
- id: z32.string(),
1914
- number: z32.string().nullable(),
1915
- status: z32.enum(["draft", "open", "paid", "uncollectible", "void"]),
1916
- amountDue: z32.number(),
1917
- amountPaid: z32.number(),
1918
- currency: z32.string(),
1919
- createdAt: z32.string(),
1920
- paidAt: z32.string().nullable(),
1921
- hostedInvoiceUrl: z32.string().nullable(),
1922
- invoicePdf: z32.string().nullable()
1923
- });
1924
- var invoicesResponseSchema = z32.object({
1925
- invoices: z32.array(invoiceSchema),
1926
- hasMore: z32.boolean(),
1927
- nextCursor: z32.string().nullable()
1928
- });
1929
2208
  var PLAN_FEATURE = {
1930
2209
  API_ACCESS: "api_access",
1931
2210
  BROWSER_AUTOMATION: "browser_automation",
@@ -2033,6 +2312,15 @@ var AGENT_PLAN_FEATURES = [
2033
2312
  PLAN_FEATURE.AGENTIC_MEMORY,
2034
2313
  PLAN_FEATURE.BROWSING_SKILL_RECORDING
2035
2314
  ];
2315
+ function isClarityOnlyPlan(plan) {
2316
+ const hasClarity = plan.features.includes(PLAN_FEATURE.CLARITY);
2317
+ const hasAgentFeature = AGENT_PLAN_FEATURES.some(
2318
+ (feature) => plan.features.includes(feature)
2319
+ );
2320
+ return hasClarity && !hasAgentFeature;
2321
+ }
2322
+ __name(isClarityOnlyPlan, "isClarityOnlyPlan");
2323
+ __name2(isClarityOnlyPlan, "isClarityOnlyPlan");
2036
2324
  var STRIPE_PRICE_IDS = {
2037
2325
  development: {
2038
2326
  pro_v1: "price_1SsNA0G2suWmkoit1EDZ1yIp",
@@ -2112,6 +2400,247 @@ function isWithinPlanLimit(planVersionId, limit, currentValue) {
2112
2400
  }
2113
2401
  __name(isWithinPlanLimit, "isWithinPlanLimit");
2114
2402
  __name2(isWithinPlanLimit, "isWithinPlanLimit");
2403
+ var PRODUCT = {
2404
+ AUTOMATION: "automation",
2405
+ CLARITY: "clarity",
2406
+ PLATFORM: "platform"
2407
+ };
2408
+ var PRODUCT_KEYS = [
2409
+ PRODUCT.AUTOMATION,
2410
+ PRODUCT.CLARITY,
2411
+ PRODUCT.PLATFORM
2412
+ ];
2413
+ var CUSTOMER_VISIBLE_PRODUCTS = [
2414
+ PRODUCT.AUTOMATION,
2415
+ PRODUCT.CLARITY
2416
+ ];
2417
+ var PRODUCT_FEATURE_COMPATIBILITY = {
2418
+ [PRODUCT.AUTOMATION]: [],
2419
+ [PRODUCT.CLARITY]: [PLAN_FEATURE.CLARITY],
2420
+ [PRODUCT.PLATFORM]: []
2421
+ };
2422
+ var CAPABILITY = {
2423
+ API_ACCESS: "api_access",
2424
+ BROWSER_AUTOMATION: "browser_automation",
2425
+ ADVANCED_INTEGRATIONS: "advanced_integrations",
2426
+ CUSTOM_MCP_SERVERS: "custom_mcp_servers",
2427
+ CASE_QUEUE: "case_queue",
2428
+ CLARITY_OVERVIEW: "clarity_overview",
2429
+ PORTFOLIO_INTELLIGENCE: "portfolio_intelligence",
2430
+ SSO: "sso",
2431
+ AUDIT_LOGS: "audit_logs",
2432
+ PRIORITY_SUPPORT: "priority_support",
2433
+ CAN_CREATE_TEAMS: "can_create_teams",
2434
+ LEARNINGS: "learnings",
2435
+ BROWSING_SKILL_RECORDING: "browsing_skill_recording",
2436
+ WORKFLOW_BUILDER: "workflow_builder",
2437
+ AGENTIC_MEMORY: "agentic_memory"
2438
+ };
2439
+ var CAPABILITY_KEYS = [
2440
+ CAPABILITY.API_ACCESS,
2441
+ CAPABILITY.BROWSER_AUTOMATION,
2442
+ CAPABILITY.ADVANCED_INTEGRATIONS,
2443
+ CAPABILITY.CUSTOM_MCP_SERVERS,
2444
+ CAPABILITY.CASE_QUEUE,
2445
+ CAPABILITY.CLARITY_OVERVIEW,
2446
+ CAPABILITY.PORTFOLIO_INTELLIGENCE,
2447
+ CAPABILITY.SSO,
2448
+ CAPABILITY.AUDIT_LOGS,
2449
+ CAPABILITY.PRIORITY_SUPPORT,
2450
+ CAPABILITY.CAN_CREATE_TEAMS,
2451
+ CAPABILITY.LEARNINGS,
2452
+ CAPABILITY.BROWSING_SKILL_RECORDING,
2453
+ CAPABILITY.WORKFLOW_BUILDER,
2454
+ CAPABILITY.AGENTIC_MEMORY
2455
+ ];
2456
+ var CAPABILITY_PRODUCT = {
2457
+ [CAPABILITY.API_ACCESS]: PRODUCT.AUTOMATION,
2458
+ [CAPABILITY.BROWSER_AUTOMATION]: PRODUCT.AUTOMATION,
2459
+ [CAPABILITY.ADVANCED_INTEGRATIONS]: PRODUCT.AUTOMATION,
2460
+ [CAPABILITY.CUSTOM_MCP_SERVERS]: PRODUCT.AUTOMATION,
2461
+ [CAPABILITY.CASE_QUEUE]: PRODUCT.AUTOMATION,
2462
+ [CAPABILITY.CLARITY_OVERVIEW]: PRODUCT.CLARITY,
2463
+ [CAPABILITY.PORTFOLIO_INTELLIGENCE]: PRODUCT.CLARITY,
2464
+ [CAPABILITY.SSO]: PRODUCT.PLATFORM,
2465
+ [CAPABILITY.AUDIT_LOGS]: PRODUCT.PLATFORM,
2466
+ [CAPABILITY.PRIORITY_SUPPORT]: PRODUCT.PLATFORM,
2467
+ [CAPABILITY.CAN_CREATE_TEAMS]: PRODUCT.PLATFORM,
2468
+ [CAPABILITY.LEARNINGS]: PRODUCT.AUTOMATION,
2469
+ [CAPABILITY.BROWSING_SKILL_RECORDING]: PRODUCT.AUTOMATION,
2470
+ [CAPABILITY.WORKFLOW_BUILDER]: PRODUCT.AUTOMATION,
2471
+ [CAPABILITY.AGENTIC_MEMORY]: PRODUCT.AUTOMATION
2472
+ };
2473
+ var CAPABILITY_FEATURE_COMPATIBILITY = {
2474
+ [CAPABILITY.API_ACCESS]: PLAN_FEATURE.API_ACCESS,
2475
+ [CAPABILITY.BROWSER_AUTOMATION]: PLAN_FEATURE.BROWSER_AUTOMATION,
2476
+ [CAPABILITY.ADVANCED_INTEGRATIONS]: PLAN_FEATURE.ADVANCED_INTEGRATIONS,
2477
+ [CAPABILITY.CUSTOM_MCP_SERVERS]: PLAN_FEATURE.CUSTOM_MCP_SERVERS,
2478
+ [CAPABILITY.CASE_QUEUE]: PLAN_FEATURE.CASE_QUEUE,
2479
+ [CAPABILITY.CLARITY_OVERVIEW]: PLAN_FEATURE.CLARITY_OVERVIEW,
2480
+ [CAPABILITY.SSO]: PLAN_FEATURE.SSO,
2481
+ [CAPABILITY.AUDIT_LOGS]: PLAN_FEATURE.AUDIT_LOGS,
2482
+ [CAPABILITY.PRIORITY_SUPPORT]: PLAN_FEATURE.PRIORITY_SUPPORT,
2483
+ [CAPABILITY.CAN_CREATE_TEAMS]: PLAN_FEATURE.CAN_CREATE_TEAMS,
2484
+ [CAPABILITY.LEARNINGS]: PLAN_FEATURE.LEARNINGS,
2485
+ [CAPABILITY.BROWSING_SKILL_RECORDING]: PLAN_FEATURE.BROWSING_SKILL_RECORDING,
2486
+ [CAPABILITY.WORKFLOW_BUILDER]: PLAN_FEATURE.WORKFLOW_BUILDER,
2487
+ [CAPABILITY.AGENTIC_MEMORY]: PLAN_FEATURE.AGENTIC_MEMORY
2488
+ };
2489
+ var ENTITLEMENT_LIMIT = {
2490
+ MAX_AGENTS: "maxAgents",
2491
+ MAX_AGENT_RUNS_PER_MONTH: "maxAgentRunsPerMonth",
2492
+ MAX_CONCURRENT_RUNS: "maxConcurrentRuns"
2493
+ };
2494
+ var ENTITLEMENT_LIMIT_KEYS = [
2495
+ ENTITLEMENT_LIMIT.MAX_AGENTS,
2496
+ ENTITLEMENT_LIMIT.MAX_AGENT_RUNS_PER_MONTH,
2497
+ ENTITLEMENT_LIMIT.MAX_CONCURRENT_RUNS
2498
+ ];
2499
+ function getLimitsFromPlan(plan) {
2500
+ return {
2501
+ maxAgents: plan.maxAgents,
2502
+ maxAgentRunsPerMonth: plan.maxAgentRunsPerMonth,
2503
+ maxConcurrentRuns: plan.maxConcurrentRuns
2504
+ };
2505
+ }
2506
+ __name(getLimitsFromPlan, "getLimitsFromPlan");
2507
+ __name2(getLimitsFromPlan, "getLimitsFromPlan");
2508
+ var PLAN_PRESET_ENTITLEMENTS = {
2509
+ free_v1: {
2510
+ products: [PRODUCT.AUTOMATION],
2511
+ capabilities: [],
2512
+ limits: getLimitsFromPlan(PLAN_VERSIONS.free_v1)
2513
+ },
2514
+ pro_v1: {
2515
+ products: [PRODUCT.AUTOMATION],
2516
+ capabilities: [
2517
+ CAPABILITY.BROWSER_AUTOMATION,
2518
+ CAPABILITY.ADVANCED_INTEGRATIONS,
2519
+ CAPABILITY.CUSTOM_MCP_SERVERS,
2520
+ CAPABILITY.BROWSING_SKILL_RECORDING,
2521
+ CAPABILITY.AGENTIC_MEMORY
2522
+ ],
2523
+ limits: getLimitsFromPlan(PLAN_VERSIONS.pro_v1)
2524
+ },
2525
+ enterprise_v1: {
2526
+ products: [PRODUCT.AUTOMATION, PRODUCT.CLARITY, PRODUCT.PLATFORM],
2527
+ capabilities: [
2528
+ CAPABILITY.API_ACCESS,
2529
+ CAPABILITY.BROWSER_AUTOMATION,
2530
+ CAPABILITY.ADVANCED_INTEGRATIONS,
2531
+ CAPABILITY.CUSTOM_MCP_SERVERS,
2532
+ CAPABILITY.CASE_QUEUE,
2533
+ CAPABILITY.CLARITY_OVERVIEW,
2534
+ CAPABILITY.SSO,
2535
+ CAPABILITY.AUDIT_LOGS,
2536
+ CAPABILITY.PRIORITY_SUPPORT,
2537
+ CAPABILITY.CAN_CREATE_TEAMS,
2538
+ CAPABILITY.LEARNINGS,
2539
+ CAPABILITY.BROWSING_SKILL_RECORDING,
2540
+ CAPABILITY.WORKFLOW_BUILDER,
2541
+ CAPABILITY.AGENTIC_MEMORY
2542
+ ],
2543
+ limits: getLimitsFromPlan(PLAN_VERSIONS.enterprise_v1)
2544
+ },
2545
+ clarity_v1: {
2546
+ products: [PRODUCT.CLARITY],
2547
+ capabilities: [CAPABILITY.CLARITY_OVERVIEW],
2548
+ limits: getLimitsFromPlan(PLAN_VERSIONS.clarity_v1)
2549
+ }
2550
+ };
2551
+ function getPlanPresetEntitlements(planVersionId) {
2552
+ return PLAN_PRESET_ENTITLEMENTS[planVersionId];
2553
+ }
2554
+ __name(getPlanPresetEntitlements, "getPlanPresetEntitlements");
2555
+ __name2(getPlanPresetEntitlements, "getPlanPresetEntitlements");
2556
+ function getPlanProducts(planVersionId) {
2557
+ return getPlanPresetEntitlements(planVersionId).products;
2558
+ }
2559
+ __name(getPlanProducts, "getPlanProducts");
2560
+ __name2(getPlanProducts, "getPlanProducts");
2561
+ function getPlanCapabilities(planVersionId) {
2562
+ return getPlanPresetEntitlements(planVersionId).capabilities;
2563
+ }
2564
+ __name(getPlanCapabilities, "getPlanCapabilities");
2565
+ __name2(getPlanCapabilities, "getPlanCapabilities");
2566
+ function getPlanPresetLimits(planVersionId) {
2567
+ return getPlanPresetEntitlements(planVersionId).limits;
2568
+ }
2569
+ __name(getPlanPresetLimits, "getPlanPresetLimits");
2570
+ __name2(getPlanPresetLimits, "getPlanPresetLimits");
2571
+ function getCompatibilityFeaturesForEntitlements(entitlements) {
2572
+ const features = /* @__PURE__ */ new Set();
2573
+ for (const product of entitlements.products) {
2574
+ for (const feature of PRODUCT_FEATURE_COMPATIBILITY[product]) {
2575
+ features.add(feature);
2576
+ }
2577
+ }
2578
+ for (const capability of entitlements.capabilities) {
2579
+ const feature = CAPABILITY_FEATURE_COMPATIBILITY[capability];
2580
+ if (feature) {
2581
+ features.add(feature);
2582
+ }
2583
+ }
2584
+ return [...features];
2585
+ }
2586
+ __name(getCompatibilityFeaturesForEntitlements, "getCompatibilityFeaturesForEntitlements");
2587
+ __name2(getCompatibilityFeaturesForEntitlements, "getCompatibilityFeaturesForEntitlements");
2588
+ function getPlanPresetCompatibilityFeatures(planVersionId) {
2589
+ const features = new Set(
2590
+ getCompatibilityFeaturesForEntitlements(
2591
+ getPlanPresetEntitlements(planVersionId)
2592
+ )
2593
+ );
2594
+ return PLAN_VERSIONS[planVersionId].features.filter(
2595
+ (feature) => features.has(feature)
2596
+ );
2597
+ }
2598
+ __name(getPlanPresetCompatibilityFeatures, "getPlanPresetCompatibilityFeatures");
2599
+ __name2(getPlanPresetCompatibilityFeatures, "getPlanPresetCompatibilityFeatures");
2600
+ var limitSchema = z22.union([z22.number(), z22.literal("unlimited")]);
2601
+ var entitlementsResponseSchema = z22.object({
2602
+ planVersionId: z22.string(),
2603
+ planName: z22.string(),
2604
+ basePlan: z22.enum(["free", "pro", "enterprise"]),
2605
+ features: z22.array(z22.string()),
2606
+ products: z22.array(z22.string()).default([]),
2607
+ capabilities: z22.array(z22.string()).default([]),
2608
+ source: z22.literal("team_subscription").default("team_subscription"),
2609
+ organizationId: z22.string().nullable().default(null),
2610
+ limits: z22.object({
2611
+ maxAgents: limitSchema,
2612
+ maxAgentRunsPerMonth: limitSchema,
2613
+ maxConcurrentRuns: limitSchema.default(0),
2614
+ runCountingMode: z22.enum(["monthly", "lifetime"])
2615
+ }),
2616
+ usage: z22.object({
2617
+ currentAssignments: z22.number(),
2618
+ currentMonthAgentRuns: z22.number()
2619
+ }),
2620
+ subscription: z22.object({
2621
+ status: z22.enum(["active", "trialing", "canceled", "past_due"]),
2622
+ trialEndsAt: z22.coerce.date().nullable(),
2623
+ currentPeriodEnd: z22.coerce.date().nullable()
2624
+ }),
2625
+ canCreateTeams: z22.boolean()
2626
+ });
2627
+ var invoiceSchema = z32.object({
2628
+ id: z32.string(),
2629
+ number: z32.string().nullable(),
2630
+ status: z32.enum(["draft", "open", "paid", "uncollectible", "void"]),
2631
+ amountDue: z32.number(),
2632
+ amountPaid: z32.number(),
2633
+ currency: z32.string(),
2634
+ createdAt: z32.string(),
2635
+ paidAt: z32.string().nullable(),
2636
+ hostedInvoiceUrl: z32.string().nullable(),
2637
+ invoicePdf: z32.string().nullable()
2638
+ });
2639
+ var invoicesResponseSchema = z32.object({
2640
+ invoices: z32.array(invoiceSchema),
2641
+ hasMore: z32.boolean(),
2642
+ nextCursor: z32.string().nullable()
2643
+ });
2115
2644
  var PLAN_FEATURE_LABELS = {
2116
2645
  [PLAN_FEATURE.API_ACCESS]: "API Access",
2117
2646
  [PLAN_FEATURE.BROWSER_AUTOMATION]: "Browser Automation",
@@ -3253,6 +3782,16 @@ var teamClaritySettingsSchema = z11.object({
3253
3782
  annualRevenue: z11.number().nullable().optional(),
3254
3783
  isUserConfigured: z11.boolean()
3255
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
+ });
3256
3795
  var clarityCaptureSchema = z11.object({
3257
3796
  id: z11.guid(),
3258
3797
  processId: z11.guid(),
@@ -3299,13 +3838,19 @@ var clarityProcessListItemSchema = z11.object({
3299
3838
  }).optional(),
3300
3839
  insightsCount: z11.number(),
3301
3840
  hasAnalysis: z11.boolean(),
3302
- pendingInvitationCount: z11.number().optional(),
3841
+ pendingInvitationCount: z11.number(),
3303
3842
  summary: z11.string().nullable().optional(),
3304
3843
  vulnerabilityCount: z11.number().optional(),
3305
3844
  contributors: z11.array(z11.object({ userId: z11.string(), userName: z11.string() })).optional(),
3306
3845
  createdAt: z11.coerce.date(),
3307
3846
  createdByName: z11.string().optional()
3308
3847
  });
3848
+ var clarityProcessListResponseSchema = z11.object({
3849
+ data: z11.array(clarityProcessListItemSchema),
3850
+ total: z11.number(),
3851
+ limit: z11.number(),
3852
+ offset: z11.number()
3853
+ });
3309
3854
  var GENERATION_STEP_STATUSES = [
3310
3855
  "pending",
3311
3856
  "in_progress",
@@ -3340,18 +3885,17 @@ var clarityProcessDetailSchema = clarityProcessSchema.extend({
3340
3885
  var createClarityProcessSchema = z11.object({
3341
3886
  name: z11.string().min(1).max(255).optional()
3342
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
+ });
3343
3895
  var updateClarityProcessSchema = z11.object({
3344
3896
  name: z11.string().min(1).max(255).optional(),
3345
3897
  customPrompt: z11.string().max(5e3).nullable().optional()
3346
3898
  });
3347
- var saveClarityCaptureInterviewSchema = z11.object({
3348
- captureId: z11.guid().optional(),
3349
- extraCaptureRequestId: z11.guid().optional(),
3350
- transcript: z11.array(conversationMessageSchema).min(1)
3351
- });
3352
- var startClarityCaptureInterviewQuerySchema = z11.object({
3353
- extraCaptureRequestId: z11.guid().optional()
3354
- });
3355
3899
  var INTERVIEW_LANGUAGES = [
3356
3900
  "en",
3357
3901
  "cs",
@@ -3631,11 +4175,7 @@ function captureSubTypeToColumnValue(subType) {
3631
4175
  __name(captureSubTypeToColumnValue, "captureSubTypeToColumnValue");
3632
4176
  __name2(captureSubTypeToColumnValue, "captureSubTypeToColumnValue");
3633
4177
  var clarityInterviewTurnBodySchema = z12.object({
3634
- // Optional with a `"screenshare"` default so old clients calling the
3635
- // deprecated `/v1/clarity/screenshare/*` routes (which don't send `type`)
3636
- // still parse cleanly. New `/v1/clarity/interview/*` callers always
3637
- // include it explicitly.
3638
- type: clarityCaptureSubTypeSchema.default("screenshare"),
4178
+ type: clarityCaptureSubTypeSchema,
3639
4179
  transcript: z12.array(conversationMessageSchema).max(MAX_INTERVIEW_TRANSCRIPT_ENTRIES),
3640
4180
  images: z12.array(clarityInterviewFrameSchema).max(MAX_INTERVIEW_FRAMES_PER_TURN),
3641
4181
  coverage: clarityInterviewCoverageSchema,
@@ -3916,7 +4456,12 @@ var proposalSummaryAgentTransformationProposalSchema = z13.object({
3916
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."'
3917
4457
  )
3918
4458
  });
3919
- 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({});
3920
4465
  var clarityV2SnapshotStatusSchema = z13.enum(["live", "historic"]);
3921
4466
  var clarityV2SnapshotCreatorTypeSchema = z13.enum(["human", "ai"]);
3922
4467
  var versioningApiFields = {
@@ -4510,9 +5055,7 @@ var startInterviewCaptureResponseSchema = clarityCaptureSchema.extend({
4510
5055
  });
4511
5056
  var MAX_INTERVIEW_FRAMES_PER_CAPTURE = 300;
4512
5057
  var interviewUploadUrlsBodySchema = z19.object({
4513
- // Optional with a `"screenshare"` default for deprecated-route
4514
- // back-compat — see `clarityInterviewTurnBodySchema`.
4515
- type: clarityCaptureSubTypeSchema.default("screenshare"),
5058
+ type: clarityCaptureSubTypeSchema,
4516
5059
  screenshareStartTime: z19.int().nonnegative(),
4517
5060
  frameTimestamps: z19.array(z19.int().nonnegative()).max(MAX_INTERVIEW_FRAMES_PER_CAPTURE)
4518
5061
  });
@@ -4535,8 +5078,7 @@ var completeInterviewCaptureResponseSchema = clarityCaptureSchema.extend({
4535
5078
  updatedAt: z19.string()
4536
5079
  });
4537
5080
  var autoSaveInterviewCaptureBodySchema = z19.object({
4538
- // See `clarityInterviewTurnBodySchema` for why this defaults.
4539
- type: clarityCaptureSubTypeSchema.default("screenshare"),
5081
+ type: clarityCaptureSubTypeSchema,
4540
5082
  transcript: z19.array(conversationMessageSchema).max(MAX_INTERVIEW_TRANSCRIPT_ENTRIES),
4541
5083
  images: z19.array(clarityInterviewFrameSchema).max(MAX_INTERVIEW_FRAMES_PER_CAPTURE)
4542
5084
  });
@@ -5264,6 +5806,7 @@ var agentApiSchema = z27.object({
5264
5806
  team_id: z27.string().nullable(),
5265
5807
  thread_id: z27.string().nullable(),
5266
5808
  folder_id: z27.string().nullable().optional(),
5809
+ pinned_at: z27.string().nullable().optional(),
5267
5810
  created_at: z27.string().nullable(),
5268
5811
  updated_at: z27.string().nullable(),
5269
5812
  last_run_at: z27.string().nullable(),
@@ -6250,25 +6793,78 @@ var clarityOverviewDetailSchema = z39.object({
6250
6793
  createdAt: z39.coerce.date(),
6251
6794
  updatedAt: z39.coerce.date()
6252
6795
  });
6253
- var credentialPreviewSchema = z40.object({
6254
- id: z40.guid().describe("Credential ID"),
6255
- domain: z40.string().describe("Domain for the credential"),
6256
- username: z40.string().nullable().describe("Username (if any)"),
6257
- hasEnabledTOTP: z40.boolean().describe("Whether TOTP is enabled"),
6258
- hasPassword: z40.boolean().describe("Whether a password is stored"),
6259
- user_id: z40.string().nullable().describe("Owner user id; null when shared with the team")
6260
- });
6261
- var otpResponseSchema = z40.object({
6262
- code: z40.string().describe("The TOTP code"),
6263
- expiresAt: z40.number().describe("Expiration timestamp in milliseconds")
6264
- });
6265
- var encryptedDataSchema = z40.object({
6266
- encrypted_data: z40.string().describe("Base64-encoded encrypted data"),
6267
- key_version: z40.string().describe("KMS key version or 'base64' for dev")
6268
- });
6269
- var credentialDetailSchema = z40.object({
6270
- domain: z40.string().describe("Domain for the credential"),
6271
- 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)"),
6272
6868
  password: encryptedDataSchema.nullable().describe("Encrypted password data")
6273
6869
  });
6274
6870
  var FEATURE_FLAG_CATALOGUE = {
@@ -6287,6 +6883,11 @@ var FEATURE_FLAG_CATALOGUE = {
6287
6883
  defaultValue: false,
6288
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."
6289
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
+ },
6290
6891
  AGENT_SELF_SCHEDULING: {
6291
6892
  key: "agent_self_scheduling",
6292
6893
  defaultValue: false,
@@ -6342,11 +6943,6 @@ var FEATURE_FLAG_CATALOGUE = {
6342
6943
  defaultValue: false,
6343
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."
6344
6945
  },
6345
- CLARITY_V2: {
6346
- key: "clarity_v2",
6347
- defaultValue: false,
6348
- 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."
6349
- },
6350
6946
  DYNAMIC_BUILDER_ISLAND: {
6351
6947
  key: "dynamic_builder_island",
6352
6948
  defaultValue: false,
@@ -6425,82 +7021,82 @@ function coerceFlagValue(value) {
6425
7021
  }
6426
7022
  __name(coerceFlagValue, "coerceFlagValue");
6427
7023
  __name2(coerceFlagValue, "coerceFlagValue");
6428
- var teamFileItemSchema = z41.object({
6429
- id: z41.string(),
6430
- name: z41.string(),
6431
- path: z41.string(),
6432
- created_at: z41.string().optional(),
6433
- updated_at: z41.string().optional(),
6434
- metadata: z41.object({
6435
- mimetype: z41.string().optional(),
6436
- 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()
6437
7033
  }).nullable().optional()
6438
7034
  });
6439
- var listTeamFilesResponseSchema = z41.object({
6440
- files: z41.array(teamFileItemSchema)
6441
- });
6442
- var createTeamFileUploadUrlBodySchema = z41.object({
6443
- fileName: z41.string().min(1),
6444
- contentType: z41.string().min(1)
6445
- });
6446
- var createTeamFileUploadUrlResponseSchema = z41.object({
6447
- signedUrl: z41.url(),
6448
- expiresAt: z41.iso.datetime(),
6449
- filePath: z41.string()
6450
- });
6451
- var renameTeamFileBodySchema = z41.object({
6452
- relativePath: z41.string().min(1),
6453
- newFilenameOnly: z41.string().min(1)
6454
- });
6455
- var teamFileSuccessResponseSchema = z41.object({
6456
- success: z41.boolean()
6457
- });
6458
- var teamFileDownloadUrlResponseSchema = z41.object({
6459
- url: z41.url(),
6460
- expiresAt: z41.iso.datetime()
6461
- });
6462
- var teamFileContentResponseSchema = z41.object({
6463
- content: z41.string(),
6464
- path: z41.string(),
6465
- contentType: z41.string().optional()
6466
- });
6467
- var updateTeamFileContentBodySchema = z41.object({
6468
- content: z41.string()
6469
- });
6470
- var globalAdminApiSchema = z42.object({
6471
- id: z42.guid(),
6472
- email: z42.string(),
6473
- userId: z42.guid(),
6474
- userName: z42.string().nullable(),
6475
- addedByUserId: z42.guid().nullable(),
6476
- createdAt: z42.string()
6477
- });
6478
- var globalAdminListResponseSchema = z42.object({
6479
- admins: z42.array(globalAdminApiSchema)
6480
- });
6481
- var globalAdminSearchResponseSchema = z42.object({
6482
- users: z42.array(
6483
- z42.object({
6484
- id: z42.guid(),
6485
- name: z42.string().nullable(),
6486
- email: z42.string(),
6487
- 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()
6488
7084
  })
6489
7085
  )
6490
7086
  });
6491
- var globalAdminCreateRequestSchema = z42.object({
6492
- userId: z42.guid()
7087
+ var globalAdminCreateRequestSchema = z44.object({
7088
+ userId: z44.guid()
6493
7089
  });
6494
- var globalAdminCreateResponseSchema = z42.object({
7090
+ var globalAdminCreateResponseSchema = z44.object({
6495
7091
  admin: globalAdminApiSchema
6496
7092
  });
6497
- var globalAdminDeleteResponseSchema = z42.object({
6498
- success: z42.literal(true)
7093
+ var globalAdminDeleteResponseSchema = z44.object({
7094
+ success: z44.literal(true)
6499
7095
  });
6500
- var adminAccessCheckResponseSchema = z42.object({
6501
- isGlobalAdmin: z42.boolean()
7096
+ var adminAccessCheckResponseSchema = z44.object({
7097
+ isGlobalAdmin: z44.boolean()
6502
7098
  });
6503
- var TransportTypeSchema = z43.enum(["stdio", "sse", "http"]);
7099
+ var TransportTypeSchema = z45.enum(["stdio", "sse", "http"]);
6504
7100
  var INTEGRATION_SLUGS = [
6505
7101
  "googlecalendar",
6506
7102
  "google-calendar",
@@ -6578,7 +7174,7 @@ var INTEGRATION_SLUGS = [
6578
7174
  "notion-native",
6579
7175
  "granola"
6580
7176
  ];
6581
- var IntegrationSlugSchema = z43.enum(INTEGRATION_SLUGS);
7177
+ var IntegrationSlugSchema = z45.enum(INTEGRATION_SLUGS);
6582
7178
  function isIntegrationSlug(value) {
6583
7179
  return INTEGRATION_SLUGS.includes(value);
6584
7180
  }
@@ -6589,110 +7185,110 @@ function isCaseQueueIntegrationType(type) {
6589
7185
  }
6590
7186
  __name(isCaseQueueIntegrationType, "isCaseQueueIntegrationType");
6591
7187
  __name2(isCaseQueueIntegrationType, "isCaseQueueIntegrationType");
6592
- var integrationResponseSchema = z43.object({
6593
- id: z43.string(),
6594
- name: z43.string(),
6595
- type: z43.string(),
6596
- provider: z43.string(),
6597
- user_id: z43.string().nullable(),
6598
- team_id: z43.string(),
6599
- 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(),
6600
7196
  transport_type: TransportTypeSchema.optional(),
6601
- auth_method: z43.string().nullable().optional(),
6602
- composio_mcp_id: z43.string().nullable().default(null),
6603
- custom_integration_id: z43.string().nullable().optional(),
6604
- icon_url: z43.string().nullable().optional(),
6605
- oauth_provider: z43.string().nullable().optional(),
6606
- oauth_scopes: z43.array(z43.string()).nullable().optional(),
6607
- has_headers: z43.boolean().optional(),
6608
- 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(),
6609
7205
  /**
6610
7206
  * For connection rows (user instances), this is the FK to the team-level
6611
7207
  * integration this connection was created against. Null on catalog rows
6612
7208
  * (where `id` already represents the integration itself) and on
6613
7209
  * custom-integration-backed connections.
6614
7210
  */
6615
- integration_id: z43.string().nullable().optional(),
7211
+ integration_id: z45.string().nullable().optional(),
6616
7212
  /**
6617
7213
  * Derived from `user_id IS NULL`. True for team-shared connections, false
6618
7214
  * for personal connections. Mirrors the Shared Logins API contract — FE
6619
7215
  * never sees the null sentinel.
6620
7216
  */
6621
- shared: z43.boolean().optional(),
7217
+ shared: z45.boolean().optional(),
6622
7218
  /**
6623
7219
  * Original creator of the connection. Populated lazily on first share —
6624
7220
  * stays NULL for legacy personal rows that were never shared.
6625
7221
  */
6626
- created_by: z43.string().nullable().optional(),
6627
- created_at: z43.iso.datetime(),
6628
- updated_at: z43.iso.datetime()
6629
- });
6630
- var integrationsListResponseSchema = z43.object({
6631
- integrations: z43.array(integrationResponseSchema),
6632
- total: z43.int().min(0),
6633
- limit: z43.int().min(1),
6634
- offset: z43.int().min(0)
6635
- });
6636
- var integrationsListRequestQuerySchema = z43.object({
6637
- 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(),
6638
7234
  // Default high (100) because both the team integration catalog and the
6639
7235
  // user's connections are naturally small per team; existing dashboard
6640
7236
  // callers expect "everything" without explicit pagination.
6641
- limit: z43.coerce.number().int().min(1).max(100).prefault(100),
6642
- offset: z43.coerce.number().int().min(0).prefault(0)
6643
- });
6644
- var connectIntegrationResponseSchema = z43.object({
6645
- integration_id: z43.string(),
6646
- mcp_url: z43.string()
6647
- });
6648
- var testIntegrationResponseSchema = z43.object({
6649
- success: z43.boolean(),
6650
- tools: z43.array(
6651
- z43.object({
6652
- name: z43.string(),
6653
- 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(),
6654
7250
  // Tool input schemas are JSON-Schema documents whose internal shape
6655
7251
  // varies per MCP server. Modeled as a record of unknowns (matching
6656
7252
  // the upstream MCP SDK's `{ [x: string]: unknown; type: "object" }`
6657
7253
  // typing) so that producers can pass `tool.inputSchema` straight
6658
7254
  // through without an unsafe cast — using `z.json()` here would force
6659
7255
  // every caller to cast since the SDK does not assert JSON-ness.
6660
- input_schema: z43.record(z43.string(), z43.unknown()).optional()
7256
+ input_schema: z45.record(z45.string(), z45.unknown()).optional()
6661
7257
  })
6662
7258
  ).optional(),
6663
- error: z43.string().optional()
7259
+ error: z45.string().optional()
6664
7260
  });
6665
- var integrationCredentialsResponseSchema = z43.object({
6666
- id: z43.guid(),
6667
- headers: z43.record(z43.string(), z43.string())
7261
+ var integrationCredentialsResponseSchema = z45.object({
7262
+ id: z45.guid(),
7263
+ headers: z45.record(z45.string(), z45.string())
6668
7264
  });
6669
- var deleteIntegrationResponseSchema = z43.object({
6670
- success: z43.boolean(),
6671
- message: z43.string()
7265
+ var deleteIntegrationResponseSchema = z45.object({
7266
+ success: z45.boolean(),
7267
+ message: z45.string()
6672
7268
  });
6673
- var checkDcrSupportResponseSchema = z43.object({
6674
- supports_dcr: z43.boolean(),
6675
- authorization_endpoint: z43.string().optional(),
6676
- 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()
6677
7273
  });
6678
- var authorizationUrlResponseSchema = z43.object({
6679
- 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")
6680
7276
  });
6681
- var startComposioConnectionResponseSchema = z43.object({
6682
- redirect_url: z43.string().nullable().describe(
7277
+ var startComposioConnectionResponseSchema = z45.object({
7278
+ redirect_url: z45.string().nullable().describe(
6683
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)."
6684
7280
  ),
6685
- status: z43.string().nullable().describe("Composio connection status, e.g. INITIATED or ACTIVE."),
6686
- 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(
6687
7283
  "Composio connected-account ID, passed to /v1/connections/composio/finalize to complete the flow."
6688
7284
  )
6689
7285
  });
6690
- var createCustomIntegrationRequestSchema = z43.object({
6691
- name: z43.string().min(1, "Name is required"),
6692
- auth_method: z43.enum(["url", "apikey", "headers", "oauth"]),
6693
- server_url: z43.url("Must be a valid URL"),
6694
- oauth_client_id: z43.string().min(1).optional(),
6695
- 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()
6696
7292
  }).refine(
6697
7293
  (data) => {
6698
7294
  const hasClientId = !!data.oauth_client_id;
@@ -6703,116 +7299,116 @@ var createCustomIntegrationRequestSchema = z43.object({
6703
7299
  error: "Both OAuth Client ID and Client Secret are required, or leave both empty for automatic registration"
6704
7300
  }
6705
7301
  );
6706
- var createIntegrationRequestSchema = z43.object({
6707
- name: z43.string().min(1, "Name is required"),
6708
- server_url: z43.url("Must be a valid URL").optional(),
6709
- type: z43.string().default("custom_mcp"),
6710
- provider: z43.literal("user"),
6711
- auth_method: z43.enum(["url", "apikey", "headers", "oauth"]),
6712
- custom_integration_id: z43.guid().optional(),
6713
- headers: z43.object({
6714
- plaintext: z43.record(z43.string(), z43.string()).optional(),
6715
- 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()
6716
7312
  }).optional()
6717
7313
  });
6718
- var updateIntegrationRequestSchema = z43.object({
6719
- name: z43.string().min(1).optional(),
6720
- server_url: z43.url().optional(),
6721
- auth_method: z43.enum(["url", "oauth", "apikey", "headers"]).optional(),
6722
- headers: z43.object({
6723
- plaintext: z43.record(z43.string(), z43.string()).optional(),
6724
- 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()
6725
7321
  }).nullable().optional(),
6726
- composio_mcp_id: z43.string().nullable().optional(),
7322
+ composio_mcp_id: z45.string().nullable().optional(),
6727
7323
  // Toggle team sharing. `true` makes the instance team-shared
6728
7324
  // (`user_id = NULL`); `false` reverts it to personal owned by the caller.
6729
7325
  // Rejected when the org-level "Connections sharing" setting is OFF and
6730
7326
  // `shared === true`. Mirrors the Shared Logins update contract.
6731
- shared: z43.boolean().optional()
7327
+ shared: z45.boolean().optional()
6732
7328
  });
6733
- var testIntegrationRequestSchema = z43.object({
6734
- server_url: z43.url().describe("MCP server URL to test"),
6735
- 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")
6736
7332
  });
6737
7333
  var JOB_LIST_SORT_COLUMNS = ["created_at"];
6738
- var jobListSortColumnSchema = z44.enum(JOB_LIST_SORT_COLUMNS);
6739
- var jobListIssueSeveritySchema = z44.enum(
7334
+ var jobListSortColumnSchema = z46.enum(JOB_LIST_SORT_COLUMNS);
7335
+ var jobListIssueSeveritySchema = z46.enum(
6740
7336
  ALL_EVALUATION_RUBRIC_SEVERITIES
6741
7337
  );
6742
- var jobListItemSchema = z44.object({
6743
- id: z44.guid(),
6744
- created_at: z44.coerce.date(),
6745
- updated_at: z44.coerce.date(),
6746
- started_at: z44.coerce.date().nullable(),
6747
- 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(),
6748
7344
  status: agentRunStatusSchema,
6749
- source: z44.string().nullable(),
6750
- title: z44.string(),
6751
- run_number: z44.number(),
7345
+ source: z46.string().nullable(),
7346
+ title: z46.string(),
7347
+ run_number: z46.number(),
6752
7348
  // Assignment info
6753
- agent_id: z44.guid(),
6754
- agent_name: z44.string(),
6755
- build_id: z44.guid(),
7349
+ agent_id: z46.guid(),
7350
+ agent_name: z46.string(),
7351
+ build_id: z46.guid(),
6756
7352
  // User info
6757
- user_id: z44.guid().nullable(),
7353
+ user_id: z46.guid().nullable(),
6758
7354
  // Case info
6759
- case_queue_item_id: z44.guid().nullable(),
6760
- case_queue_id: z44.guid().nullable(),
6761
- case_queue_name: z44.string().nullable(),
6762
- case_title: z44.string().nullable(),
6763
- postponed_to: z44.coerce.date().nullable(),
6764
- 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),
6765
7361
  eval_summaries: evalSummarySchema.nullable().optional()
6766
7362
  });
6767
- var jobListResponseSchema = z44.object({
6768
- data: z44.array(jobListItemSchema),
6769
- total: z44.number()
7363
+ var jobListResponseSchema = z46.object({
7364
+ data: z46.array(jobListItemSchema),
7365
+ total: z46.number()
6770
7366
  });
6771
- var jobFilterOptionsSchema = z44.object({
6772
- agents: z44.array(
6773
- z44.object({
6774
- id: z44.string(),
6775
- name: z44.string(),
6776
- 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()
6777
7373
  })
6778
7374
  ),
6779
- folders: z44.array(
6780
- z44.object({
6781
- id: z44.string(),
6782
- name: z44.string(),
6783
- 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()
6784
7380
  })
6785
7381
  ),
6786
- users: z44.array(
6787
- z44.object({
6788
- id: z44.string(),
6789
- name: z44.string().nullable(),
6790
- email: z44.string()
7382
+ users: z46.array(
7383
+ z46.object({
7384
+ id: z46.string(),
7385
+ name: z46.string().nullable(),
7386
+ email: z46.string()
6791
7387
  })
6792
7388
  ),
6793
- caseQueues: z44.array(z44.object({ id: z44.string(), name: z44.string() }))
6794
- });
6795
- var mcpStepSchema = z45.object({
6796
- tool: z45.string().describe("MCP tool name (e.g., click, fill, navigate_page)"),
6797
- params: z45.record(z45.string(), z45.unknown()).describe("Tool-specific parameters"),
6798
- fallbackSelectors: z45.array(z45.string()).optional().describe("Alternative CSS selectors if primary fails"),
6799
- description: z45.string().optional().describe("Human-readable step description"),
6800
- screenshot: z45.string().optional().describe("Base64 screenshot at this step for visual context"),
6801
- snapshot: z45.string().optional().describe("DOM snapshot in accessibility tree format at this step"),
6802
- 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(
6803
7399
  "Index-based path to the target iframe (e.g., [0] for first child iframe, [1, 0] for nested)"
6804
7400
  )
6805
7401
  });
6806
- var mcpWorkflowSchema = z45.object({
6807
- name: z45.string(),
6808
- startUrl: z45.string(),
6809
- viewport: z45.object({
6810
- width: z45.number(),
6811
- 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()
6812
7408
  }),
6813
- steps: z45.array(mcpStepSchema)
7409
+ steps: z47.array(mcpStepSchema)
6814
7410
  });
6815
- var MCP_WORKFLOW_JSON_SCHEMA = z45.toJSONSchema(mcpWorkflowSchema, {
7411
+ var MCP_WORKFLOW_JSON_SCHEMA = z47.toJSONSchema(mcpWorkflowSchema, {
6816
7412
  reused: "inline"
6817
7413
  });
6818
7414
  var MCP_WORKFLOW_SCHEMA_DOCS = JSON.stringify(
@@ -6820,104 +7416,104 @@ var MCP_WORKFLOW_SCHEMA_DOCS = JSON.stringify(
6820
7416
  null,
6821
7417
  2
6822
7418
  );
6823
- var catalogPluginSchema = z46.object({
6824
- name: z46.string().describe("Identifier to pass in the build's plugins array."),
6825
- 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(
6826
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."
6827
7423
  ),
6828
- description: z46.string()
7424
+ description: z48.string()
6829
7425
  });
6830
- var pluginCatalogResponseSchema = z46.object({
6831
- plugins: z46.array(catalogPluginSchema)
7426
+ var pluginCatalogResponseSchema = z48.object({
7427
+ plugins: z48.array(catalogPluginSchema)
6832
7428
  });
6833
- var publicProfileSchema = z47.object({
6834
- id: z47.guid(),
6835
- name: z47.string().nullable(),
6836
- email: z47.email(),
6837
- 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()
6838
7434
  });
6839
- var publicProfileResponseSchema = z47.object({
7435
+ var publicProfileResponseSchema = z49.object({
6840
7436
  profile: publicProfileSchema
6841
7437
  });
6842
- var elementSelectorsSchema = z48.object({
6843
- css: z48.string().optional(),
6844
- cssPath: z48.string().optional(),
6845
- xpath: z48.string().optional(),
6846
- testId: z48.string().optional(),
6847
- ariaSelector: z48.string().optional(),
6848
- 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()
6849
7445
  });
6850
- var elementInfoSchema = z48.object({
6851
- uid: z48.string().optional(),
7446
+ var elementInfoSchema = z50.object({
7447
+ uid: z50.string().optional(),
6852
7448
  selectors: elementSelectorsSchema,
6853
- tagName: z48.string(),
6854
- textContent: z48.string().optional(),
6855
- ariaLabel: z48.string().optional(),
6856
- computedRole: z48.string().optional(),
6857
- attributes: z48.record(z48.string(), z48.string()).optional(),
6858
- framePath: z48.array(z48.number()).optional(),
6859
- frameUrl: z48.string().optional()
6860
- });
6861
- var recordedEventSchema = z48.looseObject({
6862
- id: z48.string(),
6863
- type: z48.string(),
6864
- timestamp: z48.number(),
6865
- url: z48.string(),
6866
- tabId: z48.number().optional(),
6867
- frameId: z48.number().optional(),
6868
- 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(),
6869
7465
  element: elementInfoSchema.optional()
6870
7466
  });
6871
- var RedactedMcpServerConfigSchema = z49.object({
7467
+ var RedactedMcpServerConfigSchema = z51.object({
6872
7468
  type: TransportTypeSchema,
6873
7469
  integrationSlug: IntegrationSlugSchema,
6874
- instanceId: z49.string().nullable()
6875
- });
6876
- var ThreadContextMessageSchema = z49.object({
6877
- role: z49.enum(["user", "assistant"]),
6878
- content: z49.string()
6879
- });
6880
- var ChatFileReferenceSchema = z49.object({
6881
- id: z49.string(),
6882
- name: z49.string(),
6883
- mimetype: z49.string(),
6884
- size: z49.number(),
6885
- platform: z49.enum(["slack", "teams"]),
6886
- workspaceId: z49.string(),
6887
- channelId: z49.string()
6888
- });
6889
- var ResolvedSubAgentSchema = z49.object({
6890
- agentId: z49.string().uuid(),
6891
- buildId: z49.string().uuid(),
6892
- 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(
6893
7489
  "Stable slug used as the Claude Code subagent name (kebab-case, \u226464 chars)"
6894
7490
  ),
6895
- description: z49.string().describe(
7491
+ description: z51.string().describe(
6896
7492
  "Routing description Claude uses to decide when to delegate to this subagent"
6897
7493
  ),
6898
- prompt: z49.string().describe("System prompt (SOP) for this subagent"),
6899
- model: z49.string().optional().describe("Optional Claude model identifier override for this subagent"),
6900
- 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(
6901
7497
  "Redacted MCP server configs scoped to this subagent. Secrets resolved at execution time."
6902
7498
  )
6903
7499
  });
6904
7500
  var RunConfigSchema = AgentConfigSchema.extend({
6905
- task: z49.string(),
6906
- mcpServers: z49.record(z49.string(), RedactedMcpServerConfigSchema),
6907
- subAgents: z49.array(ResolvedSubAgentSchema).optional().default([]),
6908
- conversationHistory: z49.array(ThreadContextMessageSchema).optional(),
6909
- 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(),
6910
7506
  /** IANA timezone (e.g. `"Europe/Prague"`). Consumers should fall back to UTC when absent. */
6911
- timezone: z49.string().optional()
7507
+ timezone: z51.string().optional()
6912
7508
  });
6913
- var StoredRunConfigV0Schema = z49.object({
6914
- version: z49.literal("v0")
7509
+ var StoredRunConfigV0Schema = z51.object({
7510
+ version: z51.literal("v0")
6915
7511
  });
6916
- var StoredRunConfigV1Schema = z49.object({
6917
- version: z49.literal("v1"),
7512
+ var StoredRunConfigV1Schema = z51.object({
7513
+ version: z51.literal("v1"),
6918
7514
  data: RunConfigSchema
6919
7515
  });
6920
- var StoredRunConfigSchema = z49.union([
7516
+ var StoredRunConfigSchema = z51.union([
6921
7517
  StoredRunConfigV0Schema,
6922
7518
  StoredRunConfigV1Schema
6923
7519
  ]);
@@ -6936,285 +7532,260 @@ function isRunConfig(config) {
6936
7532
  }
6937
7533
  __name(isRunConfig, "isRunConfig");
6938
7534
  __name2(isRunConfig, "isRunConfig");
6939
- var skillApiSchema = z50.object({
6940
- id: z50.string(),
6941
- name: z50.string(),
6942
- description: z50.string(),
7535
+ var skillApiSchema = z52.object({
7536
+ id: z52.string(),
7537
+ name: z52.string(),
7538
+ description: z52.string(),
6943
7539
  // System skills have null team_id.
6944
- team_id: z50.string().nullable()
7540
+ team_id: z52.string().nullable()
6945
7541
  });
6946
- var listSkillsResponseSchema = z50.object({
6947
- skills: z50.array(skillApiSchema)
7542
+ var listSkillsResponseSchema = z52.object({
7543
+ skills: z52.array(skillApiSchema)
6948
7544
  });
6949
- var systemSkillSchema = z50.object({
6950
- id: z50.string(),
6951
- name: z50.string(),
6952
- description: z50.string()
6953
- });
6954
- var listSystemSkillsResponseSchema = z50.object({
6955
- skills: z50.array(systemSkillSchema)
6956
- });
6957
- var skillFileItemSchema = z50.object({
6958
- name: z50.string(),
6959
- path: z50.string(),
6960
- size: z50.number().optional(),
6961
- contentType: z50.string().optional(),
6962
- updatedAt: z50.string().optional()
6963
- });
6964
- var listSkillFilesResponseSchema = z50.object({
6965
- files: z50.array(skillFileItemSchema)
6966
- });
6967
- var getSkillFileContentResponseSchema = z50.object({
6968
- content: z50.string(),
6969
- path: z50.string(),
6970
- contentType: z50.string().optional()
6971
- });
6972
- var updateSkillFileBodySchema = z50.object({
6973
- content: z50.string()
6974
- });
6975
- var updateSkillFileResponseSchema = z50.object({
6976
- success: z50.boolean(),
6977
- message: z50.string(),
6978
- skill: z50.object({
6979
- id: z50.string(),
6980
- name: z50.string(),
6981
- 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()
6982
7578
  }).optional()
6983
7579
  });
6984
- var deleteSkillResponseSchema = z50.object({
6985
- success: z50.boolean(),
6986
- message: z50.string()
7580
+ var deleteSkillResponseSchema = z52.object({
7581
+ success: z52.boolean(),
7582
+ message: z52.string()
6987
7583
  });
6988
- var generateSkillBodySchema = z50.object({
6989
- prompt: z50.string().min(1).max(2e3),
6990
- 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()
6991
7587
  });
6992
- var generateSkillResponseSchema = z50.object({
6993
- content: z50.string()
7588
+ var generateSkillResponseSchema = z52.object({
7589
+ content: z52.string()
6994
7590
  });
6995
- var skillAssignmentSchema = z50.object({
6996
- id: z50.string(),
6997
- name: z50.string()
7591
+ var skillAssignmentSchema = z52.object({
7592
+ id: z52.string(),
7593
+ name: z52.string()
6998
7594
  });
6999
- var listSkillAssignmentsResponseSchema = z50.object({
7000
- assignments: z50.array(skillAssignmentSchema),
7001
- total: z50.number()
7595
+ var listSkillAssignmentsResponseSchema = z52.object({
7596
+ assignments: z52.array(skillAssignmentSchema),
7597
+ total: z52.number()
7002
7598
  });
7003
- var teamInvitationApiSchema = z51.object({
7004
- id: z51.string(),
7005
- team_id: z51.string(),
7006
- email: z51.email(),
7007
- invited_by: z51.string(),
7008
- role: z51.string(),
7009
- status: z51.string(),
7010
- name: z51.string().nullable(),
7011
- created_at: z51.string(),
7012
- process_id: z51.guid().nullable().optional()
7013
- });
7014
- var teamInvitationDetailApiSchema = z51.object({
7015
- id: z51.string(),
7016
- team_id: z51.string(),
7017
- email: z51.email(),
7018
- invited_by: z51.string(),
7019
- role: z51.string(),
7020
- status: z51.string(),
7021
- name: z51.string().nullable(),
7022
- created_at: z51.string(),
7023
- process_id: z51.guid().nullable().optional(),
7024
- team: z51.object({
7025
- id: z51.string(),
7026
- 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()
7027
7623
  }),
7028
- invitedBy: z51.object({
7029
- id: z51.string(),
7030
- name: z51.string().nullable(),
7031
- email: z51.email()
7624
+ invitedBy: z53.object({
7625
+ id: z53.string(),
7626
+ name: z53.string().nullable(),
7627
+ email: z53.email()
7032
7628
  }),
7033
- process: z51.object({
7034
- id: z51.string(),
7035
- name: z51.string()
7629
+ process: z53.object({
7630
+ id: z53.string(),
7631
+ name: z53.string()
7036
7632
  }).optional()
7037
7633
  });
7038
- var createTeamInvitationRequestSchema = z51.object({
7039
- email: z51.email(),
7040
- role: z51.string(),
7041
- processId: z51.guid().optional()
7042
- });
7043
- var acceptTeamInvitationRequestSchema = z51.object({
7044
- name: z51.string().optional()
7045
- });
7046
- var bulkInviteResponseSchema = z51.object({
7047
- succeeded: z51.number(),
7048
- skipped: z51.number(),
7049
- failed: z51.number()
7050
- });
7051
- var teamDiscoveryModeSchema = z52.enum(["request", "auto"]);
7052
- var BrowserLocationSchema = z52.union([
7053
- z52.literal("cz"),
7054
- z52.literal("de"),
7055
- z52.literal("fr"),
7056
- z52.literal("gb"),
7057
- z52.literal("it"),
7058
- z52.literal("pl"),
7059
- 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")
7060
7656
  ]);
7061
- var teamMemberApiSchema = z52.object({
7062
- id: z52.guid(),
7063
- name: z52.string().nullable(),
7064
- email: z52.email(),
7065
- role: z52.string(),
7066
- inheritedFromOrg: z52.boolean().default(false)
7067
- });
7068
- var listTeamMembersResponseSchema = z52.object({
7069
- members: z52.array(teamMemberApiSchema),
7070
- total: z52.number().int().nonnegative(),
7071
- limit: z52.number().int().positive(),
7072
- offset: z52.number().int().nonnegative()
7073
- });
7074
- var updateMemberRoleRequestSchema = z52.object({
7075
- role: z52.string()
7076
- });
7077
- var removeMemberResponseSchema = z52.object({
7078
- success: z52.literal(true),
7079
- nextTeamId: z52.guid().nullable(),
7080
- planType: z52.enum(["pro", "enterprise"]).nullable()
7081
- });
7082
- var getMemberMeResponseSchema = z52.object({
7083
- role: z52.string().nullable()
7084
- });
7085
- var addTeamMemberRequestSchema = z52.object({
7086
- userId: z52.guid(),
7087
- role: z52.string()
7088
- });
7089
- var updateTeamRequestSchema = z52.object({
7090
- name: z52.string().min(1).optional(),
7091
- 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(),
7092
7688
  discovery_mode: teamDiscoveryModeSchema.optional()
7093
7689
  });
7094
- var teamApiSchema = z52.object({
7095
- id: z52.guid(),
7096
- name: z52.string(),
7097
- created_at: z52.string(),
7098
- organization_id: z52.guid().nullable(),
7099
- 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(),
7100
7696
  discovery_mode: teamDiscoveryModeSchema
7101
7697
  });
7102
7698
  var TEAM_CONFIG_VERSION = 1;
7103
- var teamConfigDataSchema = z52.object({
7699
+ var teamConfigDataSchema = z54.object({
7104
7700
  browserProviderOverride: BrowserProviderTypeSchema.nullable().optional(),
7105
7701
  browserLocationOverride: BrowserLocationSchema.nullable().optional()
7106
7702
  });
7107
- var teamConfigSchema = z52.object({
7108
- version: z52.literal(TEAM_CONFIG_VERSION),
7703
+ var teamConfigSchema = z54.object({
7704
+ version: z54.literal(TEAM_CONFIG_VERSION),
7109
7705
  data: teamConfigDataSchema
7110
7706
  });
7111
- var listTeamInvitesResponseSchema = z52.object({
7112
- invitations: z52.array(teamInvitationApiSchema)
7113
- });
7114
- var teamInsightsCopilotSchema = z53.object({
7115
- id: z53.guid(),
7116
- name: z53.string(),
7117
- teamName: z53.string().nullable().optional(),
7118
- created_at: z53.string().nullable(),
7119
- updated_at: z53.string().nullable(),
7120
- team_id: z53.string().nullable(),
7121
- thread_id: z53.string().nullable(),
7122
- slack_enabled: z53.boolean().nullable()
7123
- });
7124
- var teamInsightsUserProfileSchema = z53.object({
7125
- id: z53.guid(),
7126
- name: z53.string().nullable(),
7127
- 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()
7128
7724
  });
7129
7725
  var teamInsightsUserUsageSchema = teamInsightsUserProfileSchema.extend(
7130
7726
  {
7131
- runCount: z53.number(),
7132
- lastRun: z53.string().nullable()
7727
+ runCount: z55.number(),
7728
+ lastRun: z55.string().nullable()
7133
7729
  }
7134
7730
  );
7135
- var teamInsightsMetricSourceSchema = z53.object({
7731
+ var teamInsightsMetricSourceSchema = z55.object({
7136
7732
  source: agentRunSourceSchema,
7137
- runsTotal: z53.number(),
7138
- completedRuns: z53.number()
7733
+ runsTotal: z55.number(),
7734
+ completedRuns: z55.number()
7139
7735
  });
7140
7736
  var teamInsightsCopilotWithRunsSchema = teamInsightsCopilotSchema.extend({
7141
- integrations: z53.array(z53.string()),
7142
- uniqueUsersCount: z53.number(),
7143
- users: z53.array(teamInsightsUserUsageSchema),
7144
- totalRuns: z53.number(),
7145
- completedRuns: z53.number(),
7146
- totalTimeSpentMs: z53.number(),
7147
- averageTimeSpentMs: z53.number(),
7148
- completedRunsWithTiming: z53.number(),
7149
- sources: z53.array(teamInsightsMetricSourceSchema)
7150
- });
7151
- var teamInsightsAgentsRunResponseSchema = z53.object({
7152
- data: z53.array(teamInsightsCopilotWithRunsSchema),
7153
- total: z53.number()
7154
- });
7155
- var teamInsightsMetricsResponseSchema = z53.object({
7156
- runsTotal: z53.number(),
7157
- completedRuns: z53.number(),
7158
- sources: z53.array(teamInsightsMetricSourceSchema)
7159
- });
7160
- var teamInsightsUserAgentRunSchema = z53.object({
7161
- id: z53.guid(),
7162
- created_at: z53.string(),
7163
- updated_at: z53.string(),
7164
- agent_id: z53.guid(),
7165
- agent_name: z53.string(),
7166
- build_id: z53.guid(),
7167
- source: z53.string().nullable(),
7168
- started_at: z53.string().nullable(),
7169
- completed_at: z53.string().nullable()
7170
- });
7171
- var teamInsightsAgentSchema = z53.object({
7172
- id: z53.guid(),
7173
- name: z53.string(),
7174
- teamName: z53.string().nullable().optional(),
7175
- 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)
7176
7772
  });
7177
7773
  var teamInsightsUserWithAgentsAndRunsSchema = teamInsightsUserProfileSchema.extend({
7178
- agents: z53.array(teamInsightsAgentSchema),
7179
- runs: z53.array(teamInsightsUserAgentRunSchema),
7180
- totalRuns: z53.number()
7181
- });
7182
- var teamInsightsUsersResponseSchema = z53.object({
7183
- data: z53.array(teamInsightsUserWithAgentsAndRunsSchema),
7184
- total: z53.number()
7774
+ agents: z55.array(teamInsightsAgentSchema),
7775
+ runs: z55.array(teamInsightsUserAgentRunSchema),
7776
+ totalRuns: z55.number()
7185
7777
  });
7186
- var createTeamInviteLinkRequestSchema = z54.object({
7187
- frontendUrl: z54.url()
7778
+ var teamInsightsUsersResponseSchema = z55.object({
7779
+ data: z55.array(teamInsightsUserWithAgentsAndRunsSchema),
7780
+ total: z55.number()
7188
7781
  });
7189
- var getTeamInviteLinkQuerySchema = z54.object({
7190
- frontendUrl: z54.url()
7782
+ var userDismissalListResponseSchema = z56.object({
7783
+ data: z56.array(z56.string())
7191
7784
  });
7192
- var teamInviteLinkCreatorSchema = z54.object({
7193
- id: z54.guid(),
7194
- name: z54.string().nullable(),
7195
- email: z54.email()
7785
+ var userDismissalMutationSchema = z56.object({
7786
+ elementKey: z56.string()
7196
7787
  });
7197
- var teamInviteLinkSchema = z54.object({
7198
- id: z54.guid(),
7199
- url: z54.url().optional(),
7200
- createdAt: z54.string(),
7201
- createdBy: teamInviteLinkCreatorSchema
7202
- });
7203
- var getTeamInviteLinkResponseSchema = z54.object({
7204
- hasLink: z54.boolean(),
7205
- link: teamInviteLinkSchema.optional()
7206
- });
7207
- var joinLinkInfoResponseSchema = z54.object({
7208
- valid: z54.boolean(),
7209
- teamName: z54.string().optional(),
7210
- teamId: z54.guid().optional(),
7211
- reason: z54.enum(["invalid", "expired"]).optional()
7212
- });
7213
- var acceptJoinLinkResponseSchema = z54.object({
7214
- success: z54.boolean(),
7215
- teamId: z54.guid()
7216
- });
7217
- var caseFilterStatusSchema = z55.enum([
7788
+ var caseFilterStatusSchema = z57.enum([
7218
7789
  "pending",
7219
7790
  "claimed",
7220
7791
  "completed",
@@ -7222,19 +7793,19 @@ var caseFilterStatusSchema = z55.enum([
7222
7793
  "needs_input",
7223
7794
  "postponed"
7224
7795
  ]);
7225
- var casesFiltersSchema = z55.object({
7226
- status: z55.array(caseFilterStatusSchema).optional(),
7227
- created_at_from: z55.string().optional(),
7228
- updated_at_from: z55.string().optional(),
7229
- 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()
7230
7801
  });
7231
- var casesListRequestBodySchema = z55.object({
7802
+ var casesListRequestBodySchema = z57.object({
7232
7803
  filters: casesFiltersSchema.default({}),
7233
- limit: z55.int().min(1).max(100).default(25),
7234
- offset: z55.int().min(0).default(0),
7235
- sort_by: z55.enum(["created_at", "updated_at", "postponed_to"]).default("created_at"),
7236
- sort_order: z55.enum(["asc", "desc"]).default("desc"),
7237
- 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()
7238
7809
  });
7239
7810
  function toBase64(input) {
7240
7811
  if (typeof btoa === "function") {
@@ -7329,7 +7900,7 @@ function setFilterValuesByCategoryKey(filters, categoryKey, values) {
7329
7900
  const { status: _, ...rest } = filters;
7330
7901
  return rest;
7331
7902
  }
7332
- const parsed = z55.array(caseFilterStatusSchema).safeParse(values);
7903
+ const parsed = z57.array(caseFilterStatusSchema).safeParse(values);
7333
7904
  if (!parsed.success) {
7334
7905
  return filters;
7335
7906
  }
@@ -8010,7 +8581,9 @@ var TABLE_COLUMNS2 = [
8010
8581
  }
8011
8582
  ];
8012
8583
  function registerAgentsCaseTriggersList(caseTriggers) {
8013
- caseTriggers.command("list <agent-id>", { isDefault: true }).description("List case triggers configured for an agent").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function listAction(agentId, options) {
8584
+ caseTriggers.command("list <agent-id>", { isDefault: true }).description(
8585
+ "List case triggers configured for an agent (use to find the trigger ID for get / update / delete)"
8586
+ ).option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function listAction(agentId, options) {
8014
8587
  const id = trimRequired(agentId, "<agent-id>");
8015
8588
  const { apiKey, apiBaseUrl } = await requireAuthenticatedConfig(this);
8016
8589
  const raw = await httpRequest({
@@ -8149,7 +8722,9 @@ function renderTriggerDetails3(trigger) {
8149
8722
  }
8150
8723
  __name(renderTriggerDetails3, "renderTriggerDetails");
8151
8724
  function registerAgentsCaseTriggersUpdate(caseTriggers) {
8152
- caseTriggers.command("update <agent-id> <trigger-id>").description("Update a case trigger").option("--queue <id>", "new queue ID").option("--enable", "enable the trigger").option("--disable", "disable the trigger").option("--concurrency <n>", "new max number of concurrent runs").option("--clear-concurrency", "remove the concurrency limit (unlimited)").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function updateAction(agentId, triggerId, options) {
8725
+ caseTriggers.command("update <agent-id> <trigger-id>").description(
8726
+ "Update a case trigger \u2014 enable, disable, change its queue, or set concurrency"
8727
+ ).option("--queue <id>", "new queue ID").option("--enable", "enable the trigger").option("--disable", "disable the trigger").option("--concurrency <n>", "new max number of concurrent runs").option("--clear-concurrency", "remove the concurrency limit (unlimited)").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function updateAction(agentId, triggerId, options) {
8153
8728
  const trimmedAgentId = trimRequired(agentId, "<agent-id>");
8154
8729
  const trimmedTriggerId = trimRequired(triggerId, "<trigger-id>");
8155
8730
  const body = buildBody2(options);
@@ -8196,35 +8771,35 @@ import { readFile as readFile2 } from "node:fs/promises";
8196
8771
  import { confirm as confirm2, isCancel as isCancel2, text } from "@clack/prompts";
8197
8772
 
8198
8773
  // src/api/agent-schemas.ts
8199
- import { z as z56 } from "zod";
8200
- var publicAgentSchema = z56.object({
8201
- id: z56.string(),
8202
- name: z56.string(),
8203
- slack_enabled: z56.boolean().nullish(),
8204
- microsoft_teams_enabled: z56.boolean().nullish(),
8205
- agentic_memory_enabled: z56.boolean().nullish(),
8206
- thread_id: z56.string().nullish(),
8207
- created_at: z56.string().nullish(),
8208
- updated_at: z56.string().nullish()
8209
- });
8210
- var publicBuildSchema = z56.object({
8211
- id: z56.string(),
8212
- agent_id: z56.string(),
8213
- name: z56.string(),
8214
- revision_number: z56.number().nullish(),
8215
- created_at: z56.string().nullish(),
8216
- updated_at: z56.string().nullish()
8217
- });
8218
- var listAgentsResponseSchema = z56.object({
8219
- agents: z56.array(publicAgentSchema),
8220
- total: z56.number().nullish(),
8221
- limit: z56.number().nullish(),
8222
- offset: z56.number().nullish()
8223
- });
8224
- 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({
8225
8800
  agent: publicAgentSchema
8226
8801
  });
8227
- var createAgentResponseSchema = z56.object({
8802
+ var createAgentResponseSchema = z58.object({
8228
8803
  agent: publicAgentSchema,
8229
8804
  build: publicBuildSchema.optional()
8230
8805
  });
@@ -8528,27 +9103,27 @@ function registerAgentsList(agents) {
8528
9103
  __name(registerAgentsList, "registerAgentsList");
8529
9104
 
8530
9105
  // src/api/schedule-schemas.ts
8531
- import { z as z57 } from "zod";
8532
- var publicScheduleSchema = z57.object({
8533
- id: z57.string(),
8534
- build_id: z57.string(),
8535
- agent_id: z57.string(),
8536
- user_id: z57.string(),
8537
- enabled: z57.boolean(),
8538
- frequency: z57.string(),
8539
- time: z57.string().nullish(),
8540
- timezone: z57.string(),
8541
- day: z57.string().nullish(),
8542
- day_of_month: z57.number().nullish(),
8543
- cron: z57.string().nullish(),
8544
- source: z57.string().nullish(),
8545
- task: z57.string().nullish(),
8546
- recurring: z57.boolean().nullish(),
8547
- created_at: z57.string(),
8548
- updated_at: z57.string()
8549
- });
8550
- var listSchedulesResponseSchema = z57.object({
8551
- 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)
8552
9127
  });
8553
9128
 
8554
9129
  // src/commands/agents/schedules.ts
@@ -9020,54 +9595,54 @@ function fieldsToSearchParams(fields) {
9020
9595
  __name(fieldsToSearchParams, "fieldsToSearchParams");
9021
9596
 
9022
9597
  // src/api/integration-schemas.ts
9023
- import { z as z58 } from "zod";
9024
- var integrationSchema = z58.object({
9025
- id: z58.string(),
9026
- name: z58.string(),
9027
- type: z58.string(),
9028
- provider: z58.string(),
9029
- user_id: z58.string().nullable(),
9030
- team_id: z58.string(),
9031
- server_url: z58.string().optional(),
9032
- transport_type: z58.string().optional(),
9033
- auth_method: z58.string().nullish(),
9034
- composio_mcp_id: z58.string().nullish(),
9035
- custom_integration_id: z58.string().nullish(),
9036
- icon_url: z58.string().nullish(),
9037
- oauth_provider: z58.string().nullish(),
9038
- oauth_scopes: z58.array(z58.string()).nullish(),
9039
- integration_id: z58.string().nullish(),
9040
- created_at: z58.string(),
9041
- updated_at: z58.string()
9042
- });
9043
- var integrationsListResponseSchema2 = z58.object({
9044
- 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)
9045
9620
  });
9046
9621
  var connectionResponseSchema = integrationSchema;
9047
- var buildIntegrationConfigSchema2 = z58.object({
9048
- id: z58.string(),
9049
- integration_id: z58.string().nullable(),
9050
- custom_integration_id: z58.string().nullable(),
9051
- integration_type: z58.string(),
9052
- integration_name: z58.string(),
9053
- 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()
9054
9629
  });
9055
- var listBuildIntegrationsResponseSchema2 = z58.object({
9056
- integrations: z58.array(buildIntegrationConfigSchema2)
9630
+ var listBuildIntegrationsResponseSchema2 = z60.object({
9631
+ integrations: z60.array(buildIntegrationConfigSchema2)
9057
9632
  });
9058
- var attachBuildIntegrationsResponseSchema = z58.object({
9059
- success: z58.boolean(),
9060
- count: z58.number()
9633
+ var attachBuildIntegrationsResponseSchema = z60.object({
9634
+ success: z60.boolean(),
9635
+ count: z60.number()
9061
9636
  });
9062
- var buildIntegrationConnectionSchema = z58.object({
9063
- connection_id: z58.string(),
9064
- created_at: z58.string()
9637
+ var buildIntegrationConnectionSchema = z60.object({
9638
+ connection_id: z60.string(),
9639
+ created_at: z60.string()
9065
9640
  });
9066
- var listBuildIntegrationConnectionsResponseSchema = z58.object({
9067
- connections: z58.array(buildIntegrationConnectionSchema)
9641
+ var listBuildIntegrationConnectionsResponseSchema = z60.object({
9642
+ connections: z60.array(buildIntegrationConnectionSchema)
9068
9643
  });
9069
- var successResponseSchema = z58.object({
9070
- success: z58.boolean()
9644
+ var successResponseSchema = z60.object({
9645
+ success: z60.boolean()
9071
9646
  });
9072
9647
 
9073
9648
  // src/commands/build-integrations/attach.ts
@@ -9312,43 +9887,43 @@ function registerBuildIntegrations(program) {
9312
9887
  __name(registerBuildIntegrations, "registerBuildIntegrations");
9313
9888
 
9314
9889
  // src/api/build-schemas.ts
9315
- import { z as z60 } from "zod";
9890
+ import { z as z62 } from "zod";
9316
9891
 
9317
9892
  // src/api/json-value.ts
9318
- import { z as z59 } from "zod";
9319
- var jsonValueSchema = z59.lazy(
9320
- () => z59.union([
9321
- z59.string(),
9322
- z59.number(),
9323
- z59.boolean(),
9324
- z59.null(),
9325
- z59.array(jsonValueSchema),
9326
- 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)
9327
9902
  ])
9328
9903
  );
9329
9904
 
9330
9905
  // src/api/build-schemas.ts
9331
- var publicBuildSchema2 = z60.object({
9332
- id: z60.string(),
9333
- agent_id: z60.string(),
9334
- name: z60.string(),
9906
+ var publicBuildSchema2 = z62.object({
9907
+ id: z62.string(),
9908
+ agent_id: z62.string(),
9909
+ name: z62.string(),
9335
9910
  config: jsonValueSchema.nullish(),
9336
- revision_number: z60.number().nullish(),
9337
- created_at: z60.string().nullish(),
9338
- updated_at: z60.string().nullish()
9911
+ revision_number: z62.number().nullish(),
9912
+ created_at: z62.string().nullish(),
9913
+ updated_at: z62.string().nullish()
9339
9914
  });
9340
- var listBuildsResponseSchema2 = z60.object({
9341
- builds: z60.array(publicBuildSchema2),
9342
- total: z60.number().nullish(),
9343
- limit: z60.number().nullish(),
9344
- 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()
9345
9920
  });
9346
- var getBuildResponseSchema = z60.object({
9921
+ var getBuildResponseSchema = z62.object({
9347
9922
  build: publicBuildSchema2
9348
9923
  });
9349
- var createBuildResponseSchema = z60.object({
9924
+ var createBuildResponseSchema = z62.object({
9350
9925
  build: publicBuildSchema2,
9351
- agent: z60.object({ id: z60.string() })
9926
+ agent: z62.object({ id: z62.string() })
9352
9927
  });
9353
9928
 
9354
9929
  // src/commands/builds/create.ts
@@ -9494,6 +10069,51 @@ function registerBuildsList(builds) {
9494
10069
  }
9495
10070
  __name(registerBuildsList, "registerBuildsList");
9496
10071
 
10072
+ // src/commands/builds/promote.ts
10073
+ import { z as z63 } from "zod";
10074
+ var promoteResponseSchema = z63.object({
10075
+ success: z63.boolean()
10076
+ });
10077
+ function registerBuildsPromote(builds) {
10078
+ builds.command("promote <id>").description(
10079
+ "Promote a draft or historic revision to live. The live revision is used by triggers and new runs."
10080
+ ).option(
10081
+ "--name <text>",
10082
+ "display name to set on the promoted revision (1-80 chars)"
10083
+ ).option("--description <text>", "description for the promoted revision").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function promoteAction(id, options) {
10084
+ const { apiKey, apiBaseUrl } = await requireAuthenticatedConfig(this);
10085
+ const body = {};
10086
+ if (options.name !== void 0) {
10087
+ body.revision_name = options.name;
10088
+ }
10089
+ if (options.description !== void 0) {
10090
+ body.revision_description = options.description;
10091
+ }
10092
+ const raw = await httpRequest({
10093
+ method: "POST",
10094
+ path: `/v1/revisions/${encodeURIComponent(id)}/promote`,
10095
+ apiKey,
10096
+ apiBaseUrl,
10097
+ body
10098
+ });
10099
+ if (options.json) {
10100
+ printJson(raw);
10101
+ return;
10102
+ }
10103
+ const parsed = promoteResponseSchema.safeParse(raw);
10104
+ if (!parsed.success) {
10105
+ throw new CliError(
10106
+ `Unexpected response from the API: ${parsed.error.message}`
10107
+ );
10108
+ }
10109
+ if (!parsed.data.success) {
10110
+ throw new CliError("Promotion failed.");
10111
+ }
10112
+ console.log(green(`Revision "${id}" promoted to live!`));
10113
+ }, "promoteAction"));
10114
+ }
10115
+ __name(registerBuildsPromote, "registerBuildsPromote");
10116
+
9497
10117
  // src/commands/builds/update.ts
9498
10118
  function registerBuildsUpdate(builds) {
9499
10119
  builds.command("update <revision-id>").description(
@@ -9561,6 +10181,7 @@ function registerBuilds(program) {
9561
10181
  registerBuildsGet(builds);
9562
10182
  registerBuildsCreate(builds);
9563
10183
  registerBuildsUpdate(builds);
10184
+ registerBuildsPromote(builds);
9564
10185
  }
9565
10186
  __name(registerBuilds, "registerBuilds");
9566
10187
 
@@ -9925,7 +10546,7 @@ function registerCasesCreate(cases) {
9925
10546
  []
9926
10547
  ).option(
9927
10548
  "--from-file <path>",
9928
- 'JSON file with a single case object or an array of cases (max 100). "-" reads from stdin.'
10549
+ 'JSON file with a single case object or an array of cases (max 100). Each case: {"title":"\u2026","data":"\u2026","labels":[{"key":"\u2026","value":"\u2026"}]}. "-" reads from stdin.'
9929
10550
  ).option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function createAction(options) {
9930
10551
  const body = await buildRequestBody(options);
9931
10552
  const { apiKey, apiBaseUrl } = await requireAuthenticatedConfig(this);
@@ -10460,7 +11081,11 @@ function parseSortOrder(raw) {
10460
11081
  __name(parseSortOrder, "parseSortOrder");
10461
11082
 
10462
11083
  // src/commands/cases/runs.ts
10463
- var TABLE_COLUMNS12 = [
11084
+ import { z as z64 } from "zod";
11085
+ var MIN_LIMIT4 = 1;
11086
+ var MAX_LIMIT4 = 10;
11087
+ var DEFAULT_LIMIT4 = 3;
11088
+ var RUNS_TABLE_COLUMNS = [
10464
11089
  { header: "RUN ID", cell: /* @__PURE__ */ __name((row) => row.id, "cell") },
10465
11090
  { header: "AGENT", cell: /* @__PURE__ */ __name((row) => row.agent_name, "cell") },
10466
11091
  { header: "STATUS", cell: /* @__PURE__ */ __name((row) => row.status, "cell") },
@@ -10474,8 +11099,46 @@ var TABLE_COLUMNS12 = [
10474
11099
  cell: /* @__PURE__ */ __name((row) => row.has_pending_human_request ? row.pending_human_request_title ?? "(unknown)" : "", "cell")
10475
11100
  }
10476
11101
  ];
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()
11110
+ });
11111
+ var recentMessagesResponseSchema = z64.object({
11112
+ messages: z64.array(recentMessageSchema)
11113
+ });
11114
+ var TEXT_PREVIEW_WIDTH = 60;
11115
+ var MESSAGES_TABLE_COLUMNS = [
11116
+ { header: "ID", cell: /* @__PURE__ */ __name((row) => row.id, "cell") },
11117
+ { header: "ROLE", cell: /* @__PURE__ */ __name((row) => row.role, "cell") },
11118
+ { header: "TYPE", cell: /* @__PURE__ */ __name((row) => row.type, "cell") },
11119
+ { header: "TIMESTAMP", cell: /* @__PURE__ */ __name((row) => row.timestamp, "cell") },
11120
+ {
11121
+ header: "PREVIEW",
11122
+ cell: previewMessageCell,
11123
+ maxWidth: TEXT_PREVIEW_WIDTH
11124
+ }
11125
+ ];
11126
+ function previewMessageCell(row) {
11127
+ if (row.text_content) {
11128
+ return row.text_content.replace(/\s+/g, " ").trim();
11129
+ }
11130
+ if (row.tool_call) {
11131
+ return `tool_call ${row.tool_call.name}`;
11132
+ }
11133
+ if (row.tool_result) {
11134
+ return `tool_result ${row.tool_result.tool_call_id}`;
11135
+ }
11136
+ return "";
11137
+ }
11138
+ __name(previewMessageCell, "previewMessageCell");
10477
11139
  function registerCasesRuns(cases) {
10478
- cases.command("runs <case-id>").description("List jobs (agent runs) that have worked on a case").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function runsAction(caseId, options) {
11140
+ const runs = cases.command("runs").description("Manage jobs (agent runs) for a case");
11141
+ runs.command("list <case-id>", { isDefault: true }).description("List jobs (agent runs) that have worked on a case").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function listAction(caseId, options) {
10479
11142
  const { apiKey, apiBaseUrl } = await requireAuthenticatedConfig(this);
10480
11143
  const raw = await httpRequest({
10481
11144
  method: "GET",
@@ -10497,11 +11160,66 @@ function registerCasesRuns(cases) {
10497
11160
  console.log("No runs found for this case.");
10498
11161
  return;
10499
11162
  }
10500
- console.log(renderTable(TABLE_COLUMNS12, parsed.data.runs));
11163
+ console.log(renderTable(RUNS_TABLE_COLUMNS, parsed.data.runs));
10501
11164
  console.log(`Showing ${parsed.data.runs.length}`);
10502
- }, "runsAction"));
11165
+ }, "listAction"));
11166
+ runs.command("recent-messages <case-id> <run-id>").description(
11167
+ "Show the latest messages from a Job on a case (assistant text and tool calls)"
11168
+ ).option(
11169
+ "--limit <n>",
11170
+ `number of messages to return (${MIN_LIMIT4}-${MAX_LIMIT4}, default ${DEFAULT_LIMIT4})`
11171
+ ).option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function recentMessagesAction(caseId, runId, options) {
11172
+ const limit = parseRecentMessageLimit(options.limit);
11173
+ const { apiKey, apiBaseUrl } = await requireAuthenticatedConfig(this);
11174
+ const searchParams = new URLSearchParams();
11175
+ if (limit !== DEFAULT_LIMIT4) {
11176
+ searchParams.append("limit", String(limit));
11177
+ }
11178
+ const raw = await httpRequest({
11179
+ method: "GET",
11180
+ path: `/v1/cases/${encodeURIComponent(caseId)}/runs/${encodeURIComponent(runId)}/recent-messages`,
11181
+ apiKey,
11182
+ apiBaseUrl,
11183
+ searchParams: searchParams.size > 0 ? searchParams : void 0
11184
+ });
11185
+ if (options.json) {
11186
+ printJson(raw);
11187
+ return;
11188
+ }
11189
+ const parsed = recentMessagesResponseSchema.safeParse(raw);
11190
+ if (!parsed.success) {
11191
+ throw new CliError(
11192
+ `Unexpected response from the API: ${parsed.error.message}`
11193
+ );
11194
+ }
11195
+ if (parsed.data.messages.length === 0) {
11196
+ console.log("No recent messages found.");
11197
+ return;
11198
+ }
11199
+ console.log(renderTable(MESSAGES_TABLE_COLUMNS, parsed.data.messages));
11200
+ console.log(
11201
+ renderKeyValue([
11202
+ { label: "Case", value: caseId },
11203
+ { label: "Run", value: runId },
11204
+ { label: "Messages", value: String(parsed.data.messages.length) }
11205
+ ])
11206
+ );
11207
+ }, "recentMessagesAction"));
10503
11208
  }
10504
11209
  __name(registerCasesRuns, "registerCasesRuns");
11210
+ function parseRecentMessageLimit(raw) {
11211
+ if (raw === void 0) {
11212
+ return DEFAULT_LIMIT4;
11213
+ }
11214
+ const value = Number.parseInt(raw, 10);
11215
+ if (Number.isNaN(value) || value < MIN_LIMIT4 || value > MAX_LIMIT4) {
11216
+ throw new CliError(
11217
+ `--limit must be an integer between ${MIN_LIMIT4} and ${MAX_LIMIT4}`
11218
+ );
11219
+ }
11220
+ return value;
11221
+ }
11222
+ __name(parseRecentMessageLimit, "parseRecentMessageLimit");
10505
11223
 
10506
11224
  // src/commands/cases/index.ts
10507
11225
  function registerCases(program) {
@@ -10776,7 +11494,7 @@ function registerConnectionsGet(connections) {
10776
11494
  __name(registerConnectionsGet, "registerConnectionsGet");
10777
11495
 
10778
11496
  // src/commands/connections/list.ts
10779
- var TABLE_COLUMNS13 = [
11497
+ var TABLE_COLUMNS12 = [
10780
11498
  { header: "ID", cell: /* @__PURE__ */ __name((row) => row.id, "cell") },
10781
11499
  { header: "NAME", cell: /* @__PURE__ */ __name((row) => row.name, "cell") },
10782
11500
  { header: "TYPE", cell: /* @__PURE__ */ __name((row) => row.type, "cell") },
@@ -10812,26 +11530,26 @@ function registerConnectionsList(connections) {
10812
11530
  console.log("No connections found.");
10813
11531
  return;
10814
11532
  }
10815
- console.log(renderTable(TABLE_COLUMNS13, rows));
11533
+ console.log(renderTable(TABLE_COLUMNS12, rows));
10816
11534
  console.log(`Showing ${rows.length}`);
10817
11535
  }, "listAction"));
10818
11536
  }
10819
11537
  __name(registerConnectionsList, "registerConnectionsList");
10820
11538
 
10821
11539
  // src/commands/connections/probe.ts
10822
- import { z as z61 } from "zod";
10823
- var toolSchema = z61.object({
10824
- name: z61.string(),
10825
- description: z61.string().optional(),
10826
- input_schema: z61.record(z61.string(), z61.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()
10827
11545
  });
10828
- var probeResponseSchema = z61.object({
10829
- success: z61.boolean(),
10830
- tools: z61.array(toolSchema).optional(),
10831
- error: z61.string().optional()
11546
+ var probeResponseSchema = z65.object({
11547
+ success: z65.boolean(),
11548
+ tools: z65.array(toolSchema).optional(),
11549
+ error: z65.string().optional()
10832
11550
  });
10833
11551
  var DESCRIPTION_MAX_WIDTH = 80;
10834
- var TABLE_COLUMNS14 = [
11552
+ var TABLE_COLUMNS13 = [
10835
11553
  { header: "NAME", cell: /* @__PURE__ */ __name((row) => row.name, "cell") },
10836
11554
  {
10837
11555
  header: "DESCRIPTION",
@@ -10887,7 +11605,7 @@ function registerConnectionsProbe(connections) {
10887
11605
  console.log("No tools found.");
10888
11606
  return;
10889
11607
  }
10890
- console.log(renderTable(TABLE_COLUMNS14, tools));
11608
+ console.log(renderTable(TABLE_COLUMNS13, tools));
10891
11609
  console.log(
10892
11610
  `Showing ${tools.length} tool${tools.length === 1 ? "" : "s"}`
10893
11611
  );
@@ -11042,32 +11760,6 @@ function registerConnections(program) {
11042
11760
  }
11043
11761
  __name(registerConnections, "registerConnections");
11044
11762
 
11045
- // src/commands/files/content.ts
11046
- function registerFilesContent(files) {
11047
- 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) {
11048
- const { apiKey, apiBaseUrl } = await requireAuthenticatedConfig(this);
11049
- const encodedPath = filePath.split("/").map((segment) => encodeURIComponent(segment)).join("/");
11050
- const raw = await httpRequest({
11051
- method: "GET",
11052
- path: `/v1/files/content/${encodedPath}`,
11053
- apiKey,
11054
- apiBaseUrl
11055
- });
11056
- if (options.json) {
11057
- printJson(raw);
11058
- return;
11059
- }
11060
- const parsed = teamFileContentResponseSchema.safeParse(raw);
11061
- if (!parsed.success) {
11062
- throw new CliError(
11063
- `Unexpected response from the API: ${parsed.error.message}`
11064
- );
11065
- }
11066
- process.stdout.write(parsed.data.content);
11067
- }, "contentAction"));
11068
- }
11069
- __name(registerFilesContent, "registerFilesContent");
11070
-
11071
11763
  // src/commands/files/content-set.ts
11072
11764
  import { readFileSync as readFileSync3 } from "node:fs";
11073
11765
  function registerFilesContentSet(files) {
@@ -11130,6 +11822,32 @@ function readContent(options) {
11130
11822
  }
11131
11823
  __name(readContent, "readContent");
11132
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
+
11133
11851
  // src/commands/files/delete.ts
11134
11852
  function registerFilesDelete(files) {
11135
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) {
@@ -11198,7 +11916,7 @@ function registerFilesDownloadUrl(files) {
11198
11916
  __name(registerFilesDownloadUrl, "registerFilesDownloadUrl");
11199
11917
 
11200
11918
  // src/commands/files/list.ts
11201
- var TABLE_COLUMNS15 = [
11919
+ var TABLE_COLUMNS14 = [
11202
11920
  { header: "PATH", cell: /* @__PURE__ */ __name((row) => row.path, "cell") },
11203
11921
  { header: "NAME", cell: /* @__PURE__ */ __name((row) => row.name, "cell") },
11204
11922
  {
@@ -11237,7 +11955,7 @@ function registerFilesList(files) {
11237
11955
  console.log("No files found.");
11238
11956
  return;
11239
11957
  }
11240
- console.log(renderTable(TABLE_COLUMNS15, parsed.data.files));
11958
+ console.log(renderTable(TABLE_COLUMNS14, parsed.data.files));
11241
11959
  console.log(`Showing ${parsed.data.files.length}`);
11242
11960
  }, "listAction"));
11243
11961
  }
@@ -11487,7 +12205,7 @@ function registerIntegrationsCustom(integrations) {
11487
12205
  __name(registerIntegrationsCustom, "registerIntegrationsCustom");
11488
12206
 
11489
12207
  // src/commands/integrations/list.ts
11490
- var TABLE_COLUMNS16 = [
12208
+ var TABLE_COLUMNS15 = [
11491
12209
  { header: "ID", cell: /* @__PURE__ */ __name((row) => row.id, "cell") },
11492
12210
  { header: "NAME", cell: /* @__PURE__ */ __name((row) => row.name, "cell") },
11493
12211
  { header: "TYPE", cell: /* @__PURE__ */ __name((row) => row.type, "cell") },
@@ -11521,7 +12239,7 @@ function registerIntegrationsList(integrations) {
11521
12239
  console.log("No integrations found.");
11522
12240
  return;
11523
12241
  }
11524
- console.log(renderTable(TABLE_COLUMNS16, rows));
12242
+ console.log(renderTable(TABLE_COLUMNS15, rows));
11525
12243
  console.log(`Showing ${rows.length}`);
11526
12244
  }, "listAction"));
11527
12245
  }
@@ -12348,7 +13066,7 @@ function parseHeaders(raw) {
12348
13066
  return result;
12349
13067
  }
12350
13068
  __name(parseHeaders, "parseHeaders");
12351
- var TABLE_COLUMNS17 = [
13069
+ var TABLE_COLUMNS16 = [
12352
13070
  { header: "NAME", cell: /* @__PURE__ */ __name((row) => row.name, "cell") },
12353
13071
  { header: "DESCRIPTION", cell: /* @__PURE__ */ __name((row) => row.description, "cell") }
12354
13072
  ];
@@ -12402,7 +13120,7 @@ function registerOauthMcpProbe(mcp) {
12402
13120
  console.log("No tools advertised by this MCP server.");
12403
13121
  return;
12404
13122
  }
12405
- console.log(renderTable(TABLE_COLUMNS17, rows));
13123
+ console.log(renderTable(TABLE_COLUMNS16, rows));
12406
13124
  console.log(`Showing ${rows.length}`);
12407
13125
  }, "probeMcpAction"));
12408
13126
  }
@@ -12477,7 +13195,7 @@ function registerOauth(program) {
12477
13195
  __name(registerOauth, "registerOauth");
12478
13196
 
12479
13197
  // src/commands/plugins/list.ts
12480
- var TABLE_COLUMNS18 = [
13198
+ var TABLE_COLUMNS17 = [
12481
13199
  { header: "NAME", cell: /* @__PURE__ */ __name((row) => row.name, "cell") },
12482
13200
  { header: "TYPE", cell: /* @__PURE__ */ __name((row) => row.type, "cell") },
12483
13201
  {
@@ -12511,7 +13229,7 @@ function registerPluginsList(plugins) {
12511
13229
  console.log("No plugins found.");
12512
13230
  return;
12513
13231
  }
12514
- console.log(renderTable(TABLE_COLUMNS18, parsed.data.plugins));
13232
+ console.log(renderTable(TABLE_COLUMNS17, parsed.data.plugins));
12515
13233
  console.log(`Showing ${parsed.data.plugins.length}`);
12516
13234
  }, "listAction"));
12517
13235
  }
@@ -12709,7 +13427,7 @@ function registerProfiles(program) {
12709
13427
  __name(registerProfiles, "registerProfiles");
12710
13428
 
12711
13429
  // src/commands/queue-labels/index.ts
12712
- var TABLE_COLUMNS19 = [
13430
+ var TABLE_COLUMNS18 = [
12713
13431
  { header: "ID", cell: /* @__PURE__ */ __name((row) => row.id, "cell") },
12714
13432
  { header: "KEY", cell: /* @__PURE__ */ __name((row) => row.key, "cell") },
12715
13433
  { header: "VALUE", cell: /* @__PURE__ */ __name((row) => row.value, "cell") },
@@ -12763,7 +13481,7 @@ function registerList2(labels) {
12763
13481
  console.log("No labels defined on this queue.");
12764
13482
  return;
12765
13483
  }
12766
- console.log(renderTable(TABLE_COLUMNS19, parsed.data.labels));
13484
+ console.log(renderTable(TABLE_COLUMNS18, parsed.data.labels));
12767
13485
  console.log(`Showing ${parsed.data.labels.length}`);
12768
13486
  }, "listAction"));
12769
13487
  }
@@ -13121,10 +13839,10 @@ function registerQueuesGet(queues) {
13121
13839
  __name(registerQueuesGet, "registerQueuesGet");
13122
13840
 
13123
13841
  // src/commands/queues/list.ts
13124
- var DEFAULT_LIMIT4 = 20;
13125
- var MIN_LIMIT4 = 1;
13126
- var MAX_LIMIT4 = 100;
13127
- var TABLE_COLUMNS20 = [
13842
+ var DEFAULT_LIMIT5 = 20;
13843
+ var MIN_LIMIT5 = 1;
13844
+ var MAX_LIMIT5 = 100;
13845
+ var TABLE_COLUMNS19 = [
13128
13846
  { header: "ID", cell: /* @__PURE__ */ __name((row) => row.id, "cell") },
13129
13847
  { header: "NAME", cell: /* @__PURE__ */ __name((row) => row.name, "cell") },
13130
13848
  {
@@ -13135,11 +13853,11 @@ var TABLE_COLUMNS20 = [
13135
13853
  { header: "CREATED", cell: /* @__PURE__ */ __name((row) => row.created_at ?? "", "cell") }
13136
13854
  ];
13137
13855
  function registerQueuesList(queues) {
13138
- queues.command("list", { isDefault: true }).description("List case queues for your team").option("--limit <n>", `page size (${MIN_LIMIT4}-${MAX_LIMIT4})`).option("--offset <n>", "number of queues to skip").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function listAction(options) {
13856
+ queues.command("list", { isDefault: true }).description("List case queues for your team").option("--limit <n>", `page size (${MIN_LIMIT5}-${MAX_LIMIT5})`).option("--offset <n>", "number of queues to skip").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function listAction(options) {
13139
13857
  const limit = parseLimit(options.limit, {
13140
- defaultValue: DEFAULT_LIMIT4,
13141
- min: MIN_LIMIT4,
13142
- max: MAX_LIMIT4
13858
+ defaultValue: DEFAULT_LIMIT5,
13859
+ min: MIN_LIMIT5,
13860
+ max: MAX_LIMIT5
13143
13861
  });
13144
13862
  const offset = parseOffset(options.offset);
13145
13863
  const { apiKey, apiBaseUrl } = await requireAuthenticatedConfig(this);
@@ -13168,7 +13886,7 @@ function registerQueuesList(queues) {
13168
13886
  console.log("No queues found.");
13169
13887
  return;
13170
13888
  }
13171
- console.log(renderTable(TABLE_COLUMNS20, response.queues));
13889
+ console.log(renderTable(TABLE_COLUMNS19, response.queues));
13172
13890
  const resolvedOffset = response.offset ?? offset;
13173
13891
  const total = response.total ?? null;
13174
13892
  const summary = total === null ? `Showing ${response.queues.length} \xB7 offset ${resolvedOffset}` : `Showing ${response.queues.length} of ${total} \xB7 offset ${resolvedOffset}`;
@@ -13270,91 +13988,91 @@ function registerQueues(program) {
13270
13988
  __name(registerQueues, "registerQueues");
13271
13989
 
13272
13990
  // src/api/run-schemas.ts
13273
- import { z as z62 } from "zod";
13274
- var publicRunSchema = z62.object({
13275
- id: z62.string(),
13276
- agent_id: z62.string(),
13277
- build_id: z62.string(),
13278
- status: z62.string(),
13279
- source: z62.string().nullish(),
13280
- sandbox_id: z62.string().nullish(),
13281
- started_at: z62.string().nullish(),
13282
- completed_at: z62.string().nullish(),
13283
- created_at: z62.string(),
13284
- updated_at: z62.string().nullish(),
13285
- human_in_the_loop_enabled: z62.boolean().nullish()
13286
- });
13287
- var startRunResponseSchema = z62.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({
13288
14006
  run: publicRunSchema
13289
14007
  });
13290
- var questionOptionSchema = z62.object({
13291
- label: z62.string(),
13292
- description: z62.string().nullish()
14008
+ var questionOptionSchema = z66.object({
14009
+ label: z66.string(),
14010
+ description: z66.string().nullish()
13293
14011
  });
13294
- var questionSchema = z62.object({
13295
- question: z62.string(),
13296
- header: z62.string().nullish(),
13297
- options: z62.array(questionOptionSchema).nullish(),
13298
- multi_select: z62.boolean().nullish()
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()
13299
14017
  });
13300
- var pendingHumanRequestSchema = z62.object({
13301
- id: z62.string(),
13302
- title: z62.string(),
13303
- description: z62.string().nullish(),
13304
- created_at: z62.string(),
13305
- type: z62.string(),
13306
- questions: z62.array(questionSchema).nullish()
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()
13307
14025
  });
13308
- var getRunResponseSchema = z62.object({
14026
+ var getRunResponseSchema = z66.object({
13309
14027
  run: publicRunSchema.nullable(),
13310
14028
  pending_human_request: pendingHumanRequestSchema.nullish()
13311
14029
  });
13312
- var stopRunResponseSchema = z62.object({
13313
- success: z62.boolean(),
13314
- message: z62.string().nullish()
14030
+ var stopRunResponseSchema = z66.object({
14031
+ success: z66.boolean(),
14032
+ message: z66.string().nullish()
13315
14033
  });
13316
- var runMessageSchema = z62.object({
13317
- id: z62.string(),
13318
- type: z62.string(),
13319
- role: z62.string(),
13320
- timestamp: z62.string(),
13321
- text_content: z62.string().nullish(),
13322
- tool_call: z62.object({
13323
- id: z62.string(),
13324
- name: z62.string(),
13325
- arguments: z62.record(z62.string(), z62.unknown()).nullish()
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()
13326
14044
  }).nullish(),
13327
- tool_result: z62.object({
13328
- tool_call_id: z62.string(),
13329
- result: z62.unknown().nullish(),
13330
- error: z62.string().nullish()
14045
+ tool_result: z66.object({
14046
+ tool_call_id: z66.string(),
14047
+ result: z66.unknown().nullish(),
14048
+ error: z66.string().nullish()
13331
14049
  }).nullish()
13332
14050
  });
13333
- var listRunMessagesResponseSchema = z62.object({
13334
- messages: z62.array(runMessageSchema),
13335
- total: z62.number().nullish(),
13336
- limit: z62.number().nullish(),
13337
- offset: z62.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()
13338
14056
  });
13339
- var postedMessageSchema = z62.object({
13340
- id: z62.string(),
13341
- type: z62.string(),
13342
- role: z62.string(),
13343
- timestamp: z62.string(),
13344
- text_content: z62.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()
13345
14063
  });
13346
- var postRunMessageResponseSchema = z62.object({
14064
+ var postRunMessageResponseSchema = z66.object({
13347
14065
  message: postedMessageSchema
13348
14066
  });
13349
- var respondHumanRequestResponseSchema = z62.object({
13350
- human_request: z62.object({
13351
- id: z62.string(),
13352
- run_id: z62.string(),
13353
- title: z62.string(),
13354
- description: z62.string().nullish(),
13355
- response: z62.string().nullish(),
13356
- responded_at: z62.string().nullish(),
13357
- created_at: z62.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()
13358
14076
  })
13359
14077
  });
13360
14078
 
@@ -13417,13 +14135,13 @@ function registerRunsGet(runs) {
13417
14135
  __name(registerRunsGet, "registerRunsGet");
13418
14136
 
13419
14137
  // src/commands/runs/list.ts
13420
- var DEFAULT_LIMIT5 = 20;
13421
- var MIN_LIMIT5 = 1;
13422
- var MAX_LIMIT5 = 100;
14138
+ var DEFAULT_LIMIT6 = 20;
14139
+ var MIN_LIMIT6 = 1;
14140
+ var MAX_LIMIT6 = 100;
13423
14141
  var SORT_ORDERS2 = ["asc", "desc"];
13424
14142
  var HAS_ISSUES_VALUES = ["true", "false"];
13425
14143
  var TITLE_PREVIEW_WIDTH = 50;
13426
- var TABLE_COLUMNS21 = [
14144
+ var TABLE_COLUMNS20 = [
13427
14145
  { header: "ID", cell: /* @__PURE__ */ __name((row) => row.id, "cell") },
13428
14146
  { header: "RUN#", cell: /* @__PURE__ */ __name((row) => String(row.run_number), "cell") },
13429
14147
  { header: "STATUS", cell: /* @__PURE__ */ __name((row) => row.status, "cell") },
@@ -13447,7 +14165,7 @@ function isHasIssuesValue(value) {
13447
14165
  }
13448
14166
  __name(isHasIssuesValue, "isHasIssuesValue");
13449
14167
  function registerRunsList(runs) {
13450
- runs.command("list").description("List agent runs for your team").option("--limit <n>", `page size (${MIN_LIMIT5}-${MAX_LIMIT5})`).option("--offset <n>", "number of runs to skip").option("--sort-order <order>", `sort direction (${SORT_ORDERS2.join("|")})`).option(
14168
+ runs.command("list").description("List agent runs for your team").option("--limit <n>", `page size (${MIN_LIMIT6}-${MAX_LIMIT6})`).option("--offset <n>", "number of runs to skip").option("--sort-order <order>", `sort direction (${SORT_ORDERS2.join("|")})`).option(
13451
14169
  "--status <status>",
13452
14170
  "filter by status (e.g. running, completed, failed, waiting, interrupted, stopped, needs_attention)"
13453
14171
  ).option("--agent <id>", "filter by agent ID").option("--user <id>", "filter by user ID").option("--case-queue <id>", "filter by case queue ID").option("--source <source>", "filter by source").option("--search <query>", "free-text search across runs").option(
@@ -13455,9 +14173,9 @@ function registerRunsList(runs) {
13455
14173
  `show only runs with (or without) issues (${HAS_ISSUES_VALUES.join("|")})`
13456
14174
  ).option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function listAction(options) {
13457
14175
  const limit = parseLimit(options.limit, {
13458
- defaultValue: DEFAULT_LIMIT5,
13459
- min: MIN_LIMIT5,
13460
- max: MAX_LIMIT5
14176
+ defaultValue: DEFAULT_LIMIT6,
14177
+ min: MIN_LIMIT6,
14178
+ max: MAX_LIMIT6
13461
14179
  });
13462
14180
  const offset = parseOffset(options.offset);
13463
14181
  if (options.sortOrder !== void 0 && !isSortOrder(options.sortOrder)) {
@@ -13520,7 +14238,7 @@ function registerRunsList(runs) {
13520
14238
  console.log("No runs found.");
13521
14239
  return;
13522
14240
  }
13523
- console.log(renderTable(TABLE_COLUMNS21, response.data));
14241
+ console.log(renderTable(TABLE_COLUMNS20, response.data));
13524
14242
  console.log(
13525
14243
  `Showing ${response.data.length} of ${response.total} \xB7 offset ${offset}`
13526
14244
  );
@@ -13529,11 +14247,11 @@ function registerRunsList(runs) {
13529
14247
  __name(registerRunsList, "registerRunsList");
13530
14248
 
13531
14249
  // src/commands/runs/messages.ts
13532
- var DEFAULT_LIMIT6 = 20;
13533
- var MIN_LIMIT6 = 1;
13534
- var MAX_LIMIT6 = 50;
13535
- var TEXT_PREVIEW_WIDTH = 60;
13536
- var TABLE_COLUMNS22 = [
14250
+ var DEFAULT_LIMIT7 = 20;
14251
+ var MIN_LIMIT7 = 1;
14252
+ var MAX_LIMIT7 = 50;
14253
+ var TEXT_PREVIEW_WIDTH2 = 60;
14254
+ var TABLE_COLUMNS21 = [
13537
14255
  { header: "ID", cell: /* @__PURE__ */ __name((row) => row.id, "cell") },
13538
14256
  { header: "ROLE", cell: /* @__PURE__ */ __name((row) => row.role, "cell") },
13539
14257
  { header: "TYPE", cell: /* @__PURE__ */ __name((row) => row.type, "cell") },
@@ -13541,7 +14259,7 @@ var TABLE_COLUMNS22 = [
13541
14259
  {
13542
14260
  header: "PREVIEW",
13543
14261
  cell: previewCell,
13544
- maxWidth: TEXT_PREVIEW_WIDTH
14262
+ maxWidth: TEXT_PREVIEW_WIDTH2
13545
14263
  }
13546
14264
  ];
13547
14265
  function previewCell(row) {
@@ -13558,11 +14276,11 @@ function previewCell(row) {
13558
14276
  }
13559
14277
  __name(previewCell, "previewCell");
13560
14278
  function registerRunsMessages(runs) {
13561
- runs.command("messages <id>").description("List messages for an agent run").option("--limit <n>", `page size (${MIN_LIMIT6}-${MAX_LIMIT6})`).option("--offset <n>", "number of messages to skip").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function messagesAction(id, options) {
14279
+ runs.command("messages <id>").description("List messages for an agent run").option("--limit <n>", `page size (${MIN_LIMIT7}-${MAX_LIMIT7})`).option("--offset <n>", "number of messages to skip").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function messagesAction(id, options) {
13562
14280
  const limit = parseLimit(options.limit, {
13563
- defaultValue: DEFAULT_LIMIT6,
13564
- min: MIN_LIMIT6,
13565
- max: MAX_LIMIT6
14281
+ defaultValue: DEFAULT_LIMIT7,
14282
+ min: MIN_LIMIT7,
14283
+ max: MAX_LIMIT7
13566
14284
  });
13567
14285
  const offset = parseOffset(options.offset);
13568
14286
  const { apiKey, apiBaseUrl } = await requireAuthenticatedConfig(this);
@@ -13591,7 +14309,7 @@ function registerRunsMessages(runs) {
13591
14309
  console.log("No messages found.");
13592
14310
  return;
13593
14311
  }
13594
- console.log(renderTable(TABLE_COLUMNS22, response.messages));
14312
+ console.log(renderTable(TABLE_COLUMNS21, response.messages));
13595
14313
  const resolvedOffset = response.offset ?? offset;
13596
14314
  const summary = response.total === null || response.total === void 0 ? `Showing ${response.messages.length} \xB7 offset ${resolvedOffset}` : `Showing ${response.messages.length} of ${response.total} \xB7 offset ${resolvedOffset}`;
13597
14315
  console.log(summary);
@@ -13848,28 +14566,28 @@ function registerRuns(program) {
13848
14566
  __name(registerRuns, "registerRuns");
13849
14567
 
13850
14568
  // src/api/sandbox-schemas.ts
13851
- import { z as z63 } from "zod";
13852
- var createSandboxResponseSchema = z63.object({
13853
- sandbox_id: z63.string(),
13854
- expires_at: z63.string()
14569
+ import { z as z67 } from "zod";
14570
+ var createSandboxResponseSchema = z67.object({
14571
+ sandbox_id: z67.string(),
14572
+ expires_at: z67.string()
13855
14573
  });
13856
- var createSandboxUploadUrlResponseSchema = z63.object({
13857
- upload_url: z63.string(),
13858
- path: z63.string(),
13859
- expires_in_seconds: z63.number()
14574
+ var createSandboxUploadUrlResponseSchema = z67.object({
14575
+ upload_url: z67.string(),
14576
+ path: z67.string(),
14577
+ expires_in_seconds: z67.number()
13860
14578
  });
13861
- var sandboxFileSchema = z63.object({
13862
- name: z63.string(),
13863
- path: z63.string(),
13864
- type: z63.enum(["file", "dir"]),
13865
- size_bytes: z63.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()
13866
14584
  });
13867
- var listSandboxFilesResponseSchema = z63.object({
13868
- files: z63.array(sandboxFileSchema)
14585
+ var listSandboxFilesResponseSchema = z67.object({
14586
+ files: z67.array(sandboxFileSchema)
13869
14587
  });
13870
- var uploadSandboxFileResponseSchema = z63.object({
13871
- path: z63.string(),
13872
- size_bytes: z63.number()
14588
+ var uploadSandboxFileResponseSchema = z67.object({
14589
+ path: z67.string(),
14590
+ size_bytes: z67.number()
13873
14591
  });
13874
14592
  var DEFAULT_SANDBOX_FILES_PATH = "/workspace";
13875
14593
 
@@ -13906,7 +14624,7 @@ function registerSandboxesCreate(sandboxes) {
13906
14624
  __name(registerSandboxesCreate, "registerSandboxesCreate");
13907
14625
 
13908
14626
  // src/commands/sandboxes/files.ts
13909
- var TABLE_COLUMNS23 = [
14627
+ var TABLE_COLUMNS22 = [
13910
14628
  { header: "TYPE", cell: /* @__PURE__ */ __name((row) => row.type, "cell") },
13911
14629
  { header: "NAME", cell: /* @__PURE__ */ __name((row) => row.name, "cell") },
13912
14630
  { header: "PATH", cell: /* @__PURE__ */ __name((row) => row.path, "cell") },
@@ -13944,7 +14662,7 @@ function registerSandboxesFiles(sandboxes) {
13944
14662
  console.log("No files found.");
13945
14663
  return;
13946
14664
  }
13947
- console.log(renderTable(TABLE_COLUMNS23, files));
14665
+ console.log(renderTable(TABLE_COLUMNS22, files));
13948
14666
  console.log(`Showing ${files.length}`);
13949
14667
  }, "filesAction"));
13950
14668
  }
@@ -14080,7 +14798,7 @@ function registerSandboxes(program) {
14080
14798
  __name(registerSandboxes, "registerSandboxes");
14081
14799
 
14082
14800
  // src/commands/skills/assignments.ts
14083
- var TABLE_COLUMNS24 = [
14801
+ var TABLE_COLUMNS23 = [
14084
14802
  { header: "ID", cell: /* @__PURE__ */ __name((row) => row.id, "cell") },
14085
14803
  { header: "NAME", cell: /* @__PURE__ */ __name((row) => row.name, "cell") }
14086
14804
  ];
@@ -14108,7 +14826,7 @@ function registerSkillsAssignments(skills) {
14108
14826
  console.log("No assignments use this skill.");
14109
14827
  return;
14110
14828
  }
14111
- console.log(renderTable(TABLE_COLUMNS24, assignments));
14829
+ console.log(renderTable(TABLE_COLUMNS23, assignments));
14112
14830
  console.log(`Showing ${assignments.length} of ${total}`);
14113
14831
  }, "assignmentsAction"));
14114
14832
  }
@@ -14116,13 +14834,13 @@ __name(registerSkillsAssignments, "registerSkillsAssignments");
14116
14834
 
14117
14835
  // src/commands/skills/create.ts
14118
14836
  import { readFileSync as readFileSync4 } from "node:fs";
14119
- import { z as z64 } from "zod";
14120
- var createSkillResponseSchema = z64.object({
14121
- skill: z64.object({
14122
- id: z64.string(),
14123
- name: z64.string(),
14124
- description: z64.string(),
14125
- team_id: z64.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()
14126
14844
  })
14127
14845
  });
14128
14846
  function registerSkillsCreate(skills) {
@@ -14386,7 +15104,7 @@ function readContent2(options) {
14386
15104
  __name(readContent2, "readContent");
14387
15105
 
14388
15106
  // src/commands/skills/files.ts
14389
- var TABLE_COLUMNS25 = [
15107
+ var TABLE_COLUMNS24 = [
14390
15108
  { header: "PATH", cell: /* @__PURE__ */ __name((row) => row.path, "cell") },
14391
15109
  { header: "NAME", cell: /* @__PURE__ */ __name((row) => row.name, "cell") },
14392
15110
  {
@@ -14425,7 +15143,7 @@ function registerSkillsFiles(skills) {
14425
15143
  console.log("No files found.");
14426
15144
  return;
14427
15145
  }
14428
- console.log(renderTable(TABLE_COLUMNS25, parsed.data.files));
15146
+ console.log(renderTable(TABLE_COLUMNS24, parsed.data.files));
14429
15147
  console.log(`Showing ${parsed.data.files.length}`);
14430
15148
  }, "filesAction"));
14431
15149
  }
@@ -14591,13 +15309,13 @@ __name(registerSkillsSystem, "registerSkillsSystem");
14591
15309
  // src/commands/skills/upload.ts
14592
15310
  import { readFile as readFile6, stat as stat2 } from "node:fs/promises";
14593
15311
  import { basename as basename2 } from "node:path";
14594
- import { z as z65 } from "zod";
14595
- var uploadSkillResponseSchema = z65.object({
14596
- skill: z65.object({
14597
- id: z65.string(),
14598
- name: z65.string(),
14599
- description: z65.string(),
14600
- team_id: z65.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()
14601
15319
  })
14602
15320
  });
14603
15321
  function registerSkillsUpload(skills) {
@@ -14667,7 +15385,7 @@ function registerSkills(program) {
14667
15385
  __name(registerSkills, "registerSkills");
14668
15386
 
14669
15387
  // src/commands/team/get.ts
14670
- import { z as z66 } from "zod";
15388
+ import { z as z70 } from "zod";
14671
15389
 
14672
15390
  // src/commands/team/resolve-team-id.ts
14673
15391
  async function resolveTeamIdFromApiKey(options) {
@@ -14694,15 +15412,15 @@ async function resolveTeamIdFromApiKey(options) {
14694
15412
  __name(resolveTeamIdFromApiKey, "resolveTeamIdFromApiKey");
14695
15413
 
14696
15414
  // src/commands/team/get.ts
14697
- var teamApiSchema2 = z66.object({
14698
- id: z66.string(),
14699
- name: z66.string(),
14700
- organization_id: z66.string().nullable(),
14701
- slack_team_id: z66.string().nullable(),
14702
- discovery_mode: z66.string(),
14703
- created_at: z66.string()
14704
- });
14705
- var teamResponseSchema = z66.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({
14706
15424
  team: teamApiSchema2
14707
15425
  });
14708
15426
  function registerTeamGet(team) {
@@ -14746,10 +15464,10 @@ function registerTeamGet(team) {
14746
15464
  __name(registerTeamGet, "registerTeamGet");
14747
15465
 
14748
15466
  // src/commands/team/members.ts
14749
- var DEFAULT_LIMIT7 = 50;
14750
- var MIN_LIMIT7 = 1;
14751
- var MAX_LIMIT7 = 100;
14752
- var TABLE_COLUMNS26 = [
15467
+ var DEFAULT_LIMIT8 = 50;
15468
+ var MIN_LIMIT8 = 1;
15469
+ var MAX_LIMIT8 = 100;
15470
+ var TABLE_COLUMNS25 = [
14753
15471
  { header: "ID", cell: /* @__PURE__ */ __name((row) => row.id, "cell") },
14754
15472
  { header: "NAME", cell: /* @__PURE__ */ __name((row) => row.name ?? "", "cell") },
14755
15473
  { header: "EMAIL", cell: /* @__PURE__ */ __name((row) => row.email, "cell") },
@@ -14763,11 +15481,11 @@ function registerTeamMembers(team) {
14763
15481
  team.command("members").description("List members of a team").option(
14764
15482
  "--team <id>",
14765
15483
  "team ID (defaults to the team scoped to your API key)"
14766
- ).option("--limit <n>", `page size (${MIN_LIMIT7}-${MAX_LIMIT7})`).option("--offset <n>", "number of members to skip").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function membersAction(options) {
15484
+ ).option("--limit <n>", `page size (${MIN_LIMIT8}-${MAX_LIMIT8})`).option("--offset <n>", "number of members to skip").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function membersAction(options) {
14767
15485
  const limit = parseLimit(options.limit, {
14768
- defaultValue: DEFAULT_LIMIT7,
14769
- min: MIN_LIMIT7,
14770
- max: MAX_LIMIT7
15486
+ defaultValue: DEFAULT_LIMIT8,
15487
+ min: MIN_LIMIT8,
15488
+ max: MAX_LIMIT8
14771
15489
  });
14772
15490
  const offset = parseOffset(options.offset);
14773
15491
  const { apiKey, apiBaseUrl } = await requireAuthenticatedConfig(this);
@@ -14797,7 +15515,7 @@ function registerTeamMembers(team) {
14797
15515
  console.log("No members found.");
14798
15516
  return;
14799
15517
  }
14800
- console.log(renderTable(TABLE_COLUMNS26, response.members));
15518
+ console.log(renderTable(TABLE_COLUMNS25, response.members));
14801
15519
  console.log(
14802
15520
  `Showing ${response.members.length} of ${response.total} \xB7 offset ${response.offset}`
14803
15521
  );
@@ -14890,7 +15608,39 @@ function createProgram() {
14890
15608
  }
14891
15609
  __name(createProgram, "createProgram");
14892
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
+
14893
15642
  // src/bin/duvo.ts
15643
+ checkForUpdate();
14894
15644
  createProgram().parseAsync(process.argv).catch((error) => {
14895
15645
  handleCliError(error);
14896
15646
  });