@duvoai/cli 1.7.1 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bin/duvo.js CHANGED
@@ -85,9 +85,9 @@ import { z as z47 } from "zod";
85
85
  import { z as z48 } from "zod";
86
86
  import { z as z50 } from "zod";
87
87
  import { z as z49 } from "zod";
88
+ import { z as z52 } from "zod";
88
89
  import { z as z51 } from "zod";
89
90
  import { z as z53 } from "zod";
90
- import { z as z52 } from "zod";
91
91
  import { z as z54 } from "zod";
92
92
  import { z as z55 } from "zod";
93
93
  import { z as z56 } from "zod";
@@ -99,14 +99,13 @@ import { z as z61 } from "zod";
99
99
  import { z as z62 } from "zod";
100
100
  import { z as z63 } from "zod";
101
101
  import { z as z64 } from "zod";
102
+ import { z as z66 } from "zod";
102
103
  import { z as z65 } from "zod";
103
104
  import { z as z67 } from "zod";
104
- import { z as z66 } from "zod";
105
105
  import { z as z68 } from "zod";
106
106
  import { z as z69 } from "zod";
107
107
  import { z as z70 } from "zod";
108
108
  import { z as z71 } from "zod";
109
- import { z as z72 } from "zod";
110
109
 
111
110
  // ../node_modules/.pnpm/jsonrepair@3.13.2/node_modules/jsonrepair/lib/esm/utils/JSONRepairError.js
112
111
  var JSONRepairError = class extends Error {
@@ -833,7 +832,6 @@ var PLAN_FEATURE = {
833
832
  CUSTOM_MCP_SERVERS: "custom_mcp_servers",
834
833
  CASE_QUEUE: "case_queue",
835
834
  CLARITY: "clarity",
836
- CLARITY_OVERVIEW: "clarity_overview",
837
835
  PORTFOLIO_INTELLIGENCE: "portfolio_intelligence",
838
836
  SSO: "sso",
839
837
  AUDIT_LOGS: "audit_logs",
@@ -847,7 +845,7 @@ var PLAN_FEATURE = {
847
845
  };
848
846
  var PLAN_VERSIONS = {
849
847
  free_v1: {
850
- name: "Pro Trial Plan",
848
+ name: "Free",
851
849
  basePlan: "free",
852
850
  maxAgents: "unlimited",
853
851
  maxAgentRunsPerMonth: 100,
@@ -875,7 +873,6 @@ var PLAN_VERSIONS = {
875
873
  PLAN_FEATURE.CUSTOM_MCP_SERVERS,
876
874
  PLAN_FEATURE.CASE_QUEUE,
877
875
  PLAN_FEATURE.CLARITY,
878
- PLAN_FEATURE.CLARITY_OVERVIEW,
879
876
  PLAN_FEATURE.PORTFOLIO_INTELLIGENCE,
880
877
  PLAN_FEATURE.LEARNINGS,
881
878
  PLAN_FEATURE.BROWSING_SKILL_RECORDING,
@@ -899,7 +896,6 @@ var PLAN_VERSIONS = {
899
896
  PLAN_FEATURE.CUSTOM_MCP_SERVERS,
900
897
  PLAN_FEATURE.CASE_QUEUE,
901
898
  PLAN_FEATURE.CLARITY,
902
- PLAN_FEATURE.CLARITY_OVERVIEW,
903
899
  PLAN_FEATURE.PORTFOLIO_INTELLIGENCE,
904
900
  PLAN_FEATURE.SSO,
905
901
  PLAN_FEATURE.AUDIT_LOGS,
@@ -928,11 +924,7 @@ var PLAN_VERSIONS = {
928
924
  maxAgentRunsPerMonth: 0,
929
925
  runCountingMode: "monthly",
930
926
  maxConcurrentRuns: 0,
931
- features: [
932
- PLAN_FEATURE.CLARITY,
933
- PLAN_FEATURE.CLARITY_OVERVIEW,
934
- PLAN_FEATURE.PORTFOLIO_INTELLIGENCE
935
- ],
927
+ features: [PLAN_FEATURE.CLARITY, PLAN_FEATURE.PORTFOLIO_INTELLIGENCE],
936
928
  isActive: true,
937
929
  monthlyPriceCents: 0
938
930
  // Custom pricing
@@ -1125,7 +1117,6 @@ var CAPABILITY = {
1125
1117
  ADVANCED_INTEGRATIONS: "advanced_integrations",
1126
1118
  CUSTOM_MCP_SERVERS: "custom_mcp_servers",
1127
1119
  CASE_QUEUE: "case_queue",
1128
- CLARITY_OVERVIEW: "clarity_overview",
1129
1120
  PORTFOLIO_INTELLIGENCE: "portfolio_intelligence",
1130
1121
  SSO: "sso",
1131
1122
  AUDIT_LOGS: "audit_logs",
@@ -1141,7 +1132,6 @@ var CAPABILITY_KEYS = [
1141
1132
  CAPABILITY.ADVANCED_INTEGRATIONS,
1142
1133
  CAPABILITY.CUSTOM_MCP_SERVERS,
1143
1134
  CAPABILITY.CASE_QUEUE,
1144
- CAPABILITY.CLARITY_OVERVIEW,
1145
1135
  CAPABILITY.PORTFOLIO_INTELLIGENCE,
1146
1136
  CAPABILITY.SSO,
1147
1137
  CAPABILITY.AUDIT_LOGS,
@@ -1167,7 +1157,6 @@ var CAPABILITY_PRODUCT = {
1167
1157
  [CAPABILITY.ADVANCED_INTEGRATIONS]: PRODUCT.AUTOMATION,
1168
1158
  [CAPABILITY.CUSTOM_MCP_SERVERS]: PRODUCT.AUTOMATION,
1169
1159
  [CAPABILITY.CASE_QUEUE]: PRODUCT.AUTOMATION,
1170
- [CAPABILITY.CLARITY_OVERVIEW]: PRODUCT.CLARITY,
1171
1160
  [CAPABILITY.PORTFOLIO_INTELLIGENCE]: PRODUCT.CLARITY,
1172
1161
  [CAPABILITY.SSO]: PRODUCT.PLATFORM,
1173
1162
  [CAPABILITY.AUDIT_LOGS]: PRODUCT.PLATFORM,
@@ -1183,7 +1172,6 @@ var CAPABILITY_FEATURE_COMPATIBILITY = {
1183
1172
  [CAPABILITY.ADVANCED_INTEGRATIONS]: PLAN_FEATURE.ADVANCED_INTEGRATIONS,
1184
1173
  [CAPABILITY.CUSTOM_MCP_SERVERS]: PLAN_FEATURE.CUSTOM_MCP_SERVERS,
1185
1174
  [CAPABILITY.CASE_QUEUE]: PLAN_FEATURE.CASE_QUEUE,
1186
- [CAPABILITY.CLARITY_OVERVIEW]: PLAN_FEATURE.CLARITY_OVERVIEW,
1187
1175
  [CAPABILITY.PORTFOLIO_INTELLIGENCE]: PLAN_FEATURE.PORTFOLIO_INTELLIGENCE,
1188
1176
  [CAPABILITY.SSO]: PLAN_FEATURE.SSO,
1189
1177
  [CAPABILITY.AUDIT_LOGS]: PLAN_FEATURE.AUDIT_LOGS,
@@ -1231,7 +1219,6 @@ var PLAN_PRESET_ENTITLEMENTS = {
1231
1219
  CAPABILITY.ADVANCED_INTEGRATIONS,
1232
1220
  CAPABILITY.CUSTOM_MCP_SERVERS,
1233
1221
  CAPABILITY.CASE_QUEUE,
1234
- CAPABILITY.CLARITY_OVERVIEW,
1235
1222
  CAPABILITY.PORTFOLIO_INTELLIGENCE,
1236
1223
  CAPABILITY.LEARNINGS,
1237
1224
  CAPABILITY.BROWSING_SKILL_RECORDING,
@@ -1247,7 +1234,6 @@ var PLAN_PRESET_ENTITLEMENTS = {
1247
1234
  CAPABILITY.ADVANCED_INTEGRATIONS,
1248
1235
  CAPABILITY.CUSTOM_MCP_SERVERS,
1249
1236
  CAPABILITY.CASE_QUEUE,
1250
- CAPABILITY.CLARITY_OVERVIEW,
1251
1237
  CAPABILITY.PORTFOLIO_INTELLIGENCE,
1252
1238
  CAPABILITY.SSO,
1253
1239
  CAPABILITY.AUDIT_LOGS,
@@ -1262,10 +1248,7 @@ var PLAN_PRESET_ENTITLEMENTS = {
1262
1248
  },
1263
1249
  clarity_v1: {
1264
1250
  products: [PRODUCT.CLARITY],
1265
- capabilities: [
1266
- CAPABILITY.CLARITY_OVERVIEW,
1267
- CAPABILITY.PORTFOLIO_INTELLIGENCE
1268
- ],
1251
+ capabilities: [CAPABILITY.PORTFOLIO_INTELLIGENCE],
1269
1252
  limits: getLimitsFromPlan(PLAN_VERSIONS.clarity_v1)
1270
1253
  }
1271
1254
  };
@@ -1481,7 +1464,6 @@ var PLAN_FEATURE_LABELS = {
1481
1464
  [PLAN_FEATURE.CUSTOM_MCP_SERVERS]: "Custom MCP Servers",
1482
1465
  [PLAN_FEATURE.CASE_QUEUE]: "Queue",
1483
1466
  [PLAN_FEATURE.CLARITY]: "Clarity",
1484
- [PLAN_FEATURE.CLARITY_OVERVIEW]: "Clarity Overview",
1485
1467
  [PLAN_FEATURE.PORTFOLIO_INTELLIGENCE]: "Portfolio Intelligence",
1486
1468
  [PLAN_FEATURE.SSO]: "Single Sign-On (SSO)",
1487
1469
  [PLAN_FEATURE.AUDIT_LOGS]: "Audit Logs",
@@ -1586,9 +1568,18 @@ var duvoSystemSessionStartedMessageSchema = duvoBaseSystemMessageSchema.and(
1586
1568
  type: z8.literal("session_started")
1587
1569
  })
1588
1570
  );
1571
+ var sessionPhaseTimingsSchema = z8.object({
1572
+ setupMs: z8.number().optional(),
1573
+ preflightMs: z8.number().optional(),
1574
+ warmupMs: z8.number().nullable().optional(),
1575
+ warmupOutcome: z8.enum(["warmed", "skipped", "failed"]).optional(),
1576
+ modelTtftMs: z8.number().optional(),
1577
+ firstTokenMs: z8.number().optional()
1578
+ });
1589
1579
  var duvoSystemSessionCompletedMessageSchema = duvoBaseSystemMessageSchema.and(
1590
1580
  z8.object({
1591
- type: z8.literal("session_completed")
1581
+ type: z8.literal("session_completed"),
1582
+ phases: sessionPhaseTimingsSchema.optional()
1592
1583
  })
1593
1584
  );
1594
1585
  var duvoSystemSessionInterruptedMessageSchema = duvoBaseSystemMessageSchema.and(
@@ -2620,9 +2611,10 @@ var CLARITY_CAPTURE_TYPES = [
2620
2611
  "video",
2621
2612
  "interview",
2622
2613
  "document",
2623
- "screenshare"
2614
+ "screenshare",
2615
+ "meeting"
2624
2616
  ];
2625
- var clarityCaptureTypeSchema = z13.enum(CLARITY_CAPTURE_TYPES);
2617
+ var clarityCaptureTypeSchema = extensibleEnum(CLARITY_CAPTURE_TYPES);
2626
2618
  var conversationMessageSchema = z13.object({
2627
2619
  source: z13.enum(["ai", "user", "interviewer"]),
2628
2620
  message: z13.string().min(1),
@@ -2954,6 +2946,98 @@ var clarityProcessLandscapeSummarySchema = z13.object({
2954
2946
  contributors: z13.array(clarityProcessContributorSchema),
2955
2947
  updatedAt: z13.coerce.date()
2956
2948
  });
2949
+ var clarityLandscapeAssignedTeamSchema = z13.object({
2950
+ id: z13.guid(),
2951
+ name: z13.string()
2952
+ });
2953
+ var CLARITY_LANDSCAPE_SUGGESTION_STATUSES = [
2954
+ "pending",
2955
+ "accepted",
2956
+ "dismissed"
2957
+ ];
2958
+ var clarityLandscapeSuggestionStatusSchema = z13.enum(
2959
+ CLARITY_LANDSCAPE_SUGGESTION_STATUSES
2960
+ );
2961
+ var clarityLandscapeTeamAssignmentSuggestionSchema = z13.object({
2962
+ id: z13.guid(),
2963
+ suggestedTeamId: z13.guid().nullable(),
2964
+ suggestedTeamName: z13.string(),
2965
+ confidence: z13.number().min(0).max(1),
2966
+ rationale: z13.string(),
2967
+ status: clarityLandscapeSuggestionStatusSchema,
2968
+ createdAt: z13.string()
2969
+ });
2970
+ var clarityLandscapeCaptureSuggestionSchema = z13.object({
2971
+ id: z13.guid(),
2972
+ suggestedUserId: z13.guid().nullable(),
2973
+ suggestedUserName: z13.string().nullable(),
2974
+ suggestedTeamId: z13.guid().nullable(),
2975
+ suggestedTeamName: z13.string().nullable(),
2976
+ gap: z13.string().min(1),
2977
+ suggestedPrompt: z13.string().nullable(),
2978
+ confidence: z13.number().min(0).max(1),
2979
+ rationale: z13.string().min(1),
2980
+ status: clarityLandscapeSuggestionStatusSchema,
2981
+ createdAt: z13.string()
2982
+ }).superRefine((suggestion, ctx) => {
2983
+ const hasSuggestedUser = suggestion.suggestedUserId !== null || suggestion.suggestedUserName !== null;
2984
+ const hasSuggestedTeam = suggestion.suggestedTeamId !== null || suggestion.suggestedTeamName !== null;
2985
+ if (!hasSuggestedUser && !hasSuggestedTeam) {
2986
+ ctx.addIssue({
2987
+ code: "custom",
2988
+ message: "Capture suggestion must include a suggested user or team"
2989
+ });
2990
+ }
2991
+ if (suggestion.suggestedUserId === null !== (suggestion.suggestedUserName === null)) {
2992
+ ctx.addIssue({
2993
+ code: "custom",
2994
+ message: "Suggested user id and name must be provided together",
2995
+ path: ["suggestedUserId"]
2996
+ });
2997
+ }
2998
+ if (suggestion.suggestedTeamId === null !== (suggestion.suggestedTeamName === null)) {
2999
+ ctx.addIssue({
3000
+ code: "custom",
3001
+ message: "Suggested team id and name must be provided together",
3002
+ path: ["suggestedTeamId"]
3003
+ });
3004
+ }
3005
+ });
3006
+ var CLARITY_LANDSCAPE_CAPTURE_REQUEST_STATUSES = [
3007
+ "open",
3008
+ "completed",
3009
+ "cancelled"
3010
+ ];
3011
+ var clarityLandscapeCaptureRequestStatusSchema = z13.enum(
3012
+ CLARITY_LANDSCAPE_CAPTURE_REQUEST_STATUSES
3013
+ );
3014
+ var clarityLandscapeCaptureRequestSchema = z13.object({
3015
+ id: z13.guid(),
3016
+ requestedUserId: z13.guid().nullable(),
3017
+ requestedUserName: z13.string().nullable(),
3018
+ assignedByUserId: z13.guid().nullable().optional(),
3019
+ requestedTeamId: z13.guid().nullable(),
3020
+ requestedTeamName: z13.string().nullable(),
3021
+ gap: z13.string().min(1),
3022
+ prompt: z13.string().nullable(),
3023
+ status: clarityLandscapeCaptureRequestStatusSchema,
3024
+ createdAt: z13.string()
3025
+ }).superRefine((request, ctx) => {
3026
+ if (request.requestedUserId === null !== (request.requestedUserName === null)) {
3027
+ ctx.addIssue({
3028
+ code: "custom",
3029
+ message: "Requested user id and name must be provided together",
3030
+ path: ["requestedUserId"]
3031
+ });
3032
+ }
3033
+ if (request.requestedTeamId === null !== (request.requestedTeamName === null)) {
3034
+ ctx.addIssue({
3035
+ code: "custom",
3036
+ message: "Requested team id and name must be provided together",
3037
+ path: ["requestedTeamId"]
3038
+ });
3039
+ }
3040
+ });
2957
3041
  var clarityProcessLandscapeNodeSchema = z13.object({
2958
3042
  id: z13.guid(),
2959
3043
  parentId: z13.guid().nullable(),
@@ -2970,7 +3054,15 @@ var clarityProcessLandscapeNodeSchema = z13.object({
2970
3054
  source: z13.enum(["ai", "human"]),
2971
3055
  createdAt: z13.string(),
2972
3056
  updatedAt: z13.string(),
2973
- process: clarityProcessLandscapeSummarySchema.nullable()
3057
+ process: clarityProcessLandscapeSummarySchema.nullable(),
3058
+ scope: z13.enum(["team", "organization"]).optional(),
3059
+ teamId: z13.guid().nullable().optional(),
3060
+ teamName: z13.string().nullable().optional(),
3061
+ assignedTeam: clarityLandscapeAssignedTeamSchema.nullable().optional(),
3062
+ assignedTeams: z13.array(z13.object({ teamId: z13.guid(), teamName: z13.string().nullable() })).optional(),
3063
+ teamAssignmentSuggestions: z13.array(clarityLandscapeTeamAssignmentSuggestionSchema).optional(),
3064
+ captureSuggestions: z13.array(clarityLandscapeCaptureSuggestionSchema).optional(),
3065
+ captureRequests: z13.array(clarityLandscapeCaptureRequestSchema).optional()
2974
3066
  });
2975
3067
  var clarityProcessLandscapeLinkSchema = z13.object({
2976
3068
  id: z13.guid(),
@@ -3064,6 +3156,37 @@ var initiateClarityPhoneInterviewResponseSchema = z13.object({
3064
3156
  captureId: z13.string().uuid(),
3065
3157
  status: z13.literal("calling")
3066
3158
  });
3159
+ var MEETING_PLATFORM_HOST_PATTERNS = [
3160
+ { platform: "google_meet", pattern: /(^|\.)meet\.google\.com$/ },
3161
+ {
3162
+ platform: "microsoft_teams",
3163
+ pattern: /(^|\.)(teams\.microsoft\.com|teams\.live\.com)$/
3164
+ },
3165
+ { platform: "zoom", pattern: /(^|\.)zoom\.(us|com)$/ },
3166
+ { platform: "webex", pattern: /(^|\.)webex\.com$/ }
3167
+ ];
3168
+ function detectMeetingPlatform(meetingUrl) {
3169
+ let host;
3170
+ try {
3171
+ host = new URL(meetingUrl).hostname.toLowerCase();
3172
+ } catch {
3173
+ return null;
3174
+ }
3175
+ const match = MEETING_PLATFORM_HOST_PATTERNS.find(
3176
+ ({ pattern }) => pattern.test(host)
3177
+ );
3178
+ return match?.platform ?? null;
3179
+ }
3180
+ __name(detectMeetingPlatform, "detectMeetingPlatform");
3181
+ __name2(detectMeetingPlatform, "detectMeetingPlatform");
3182
+ var inviteClarityNotetakerSchema = z13.object({
3183
+ meetingUrl: z13.url().max(2048),
3184
+ extraCaptureRequestId: z13.guid().optional()
3185
+ });
3186
+ var inviteClarityNotetakerResponseSchema = z13.object({
3187
+ captureId: z13.guid(),
3188
+ status: z13.literal("pending")
3189
+ });
3067
3190
  var publicClarityProcessSchema = z13.object({
3068
3191
  id: z13.guid(),
3069
3192
  name: z13.string(),
@@ -3861,6 +3984,11 @@ var clarityVersionStatusChangedEventDataSchema = z17.object({
3861
3984
  versionId: z17.guid(),
3862
3985
  status: clarityV2SnapshotStatusSchema
3863
3986
  });
3987
+ var clarityCaptureTranscriptReadyEventDataSchema = z17.object({
3988
+ processId: z17.guid(),
3989
+ captureId: z17.guid(),
3990
+ status: clarityCaptureStatusSchema
3991
+ });
3864
3992
  var clarityProcessRoomPayloadSchema = z17.object({
3865
3993
  processId: z17.guid()
3866
3994
  });
@@ -4040,7 +4168,10 @@ var clarityTransformationProposalSnapshotKindDetailResponseSchema = z18.object({
4040
4168
  var saveClarityProcessSnapshotBodySchema = z18.object({
4041
4169
  steps: z18.array(postprocessClarityStepBaseSchema).min(1).superRefine(refineStepGraph),
4042
4170
  baselineSnapshotId: z18.guid(),
4043
- clarityCurrentProcessId: z18.guid().optional()
4171
+ clarityCurrentProcessId: z18.guid().optional(),
4172
+ ...swotAnalysisAgentCurrentProcessSchema.shape,
4173
+ ...processSummaryAgentCurrentProcessSchema.shape,
4174
+ ...projectedImpactAgentTransformationProposalSchema.shape
4044
4175
  });
4045
4176
  var saveClarityProcessSnapshotResponseSchema = clarityProcessSnapshotDetailResponseSchema;
4046
4177
  var clarityV2ProcessReadModelSchema = z18.object({
@@ -4309,6 +4440,32 @@ function clarityStepsToEaseDocument(steps) {
4309
4440
  }
4310
4441
  __name(clarityStepsToEaseDocument, "clarityStepsToEaseDocument");
4311
4442
  __name2(clarityStepsToEaseDocument, "clarityStepsToEaseDocument");
4443
+ function pickAllowedRoots(value) {
4444
+ if (!isJsonObject(value)) {
4445
+ return {};
4446
+ }
4447
+ const roots = {};
4448
+ if (value.summary !== void 0) {
4449
+ roots.summary = value.summary;
4450
+ }
4451
+ if (value.swot !== void 0) {
4452
+ roots.swot = value.swot;
4453
+ }
4454
+ if (value.projectedImpact !== void 0) {
4455
+ roots.projectedImpact = value.projectedImpact;
4456
+ }
4457
+ return roots;
4458
+ }
4459
+ __name(pickAllowedRoots, "pickAllowedRoots");
4460
+ __name2(pickAllowedRoots, "pickAllowedRoots");
4461
+ function clarityDataToEaseDocument(data) {
4462
+ return {
4463
+ ...pickAllowedRoots(data),
4464
+ ...clarityStepsToEaseDocument(data.steps)
4465
+ };
4466
+ }
4467
+ __name(clarityDataToEaseDocument, "clarityDataToEaseDocument");
4468
+ __name2(clarityDataToEaseDocument, "clarityDataToEaseDocument");
4312
4469
  function assertEaseDocument(value) {
4313
4470
  if (!isJsonObject(value)) {
4314
4471
  throw new Error("EASE document must be an object");
@@ -4366,6 +4523,7 @@ function assertEaseDocument(value) {
4366
4523
  }
4367
4524
  }
4368
4525
  return {
4526
+ ...pickAllowedRoots(value),
4369
4527
  stepOrder,
4370
4528
  stepsById: Object.fromEntries(stepEntries)
4371
4529
  };
@@ -4375,6 +4533,7 @@ __name2(assertEaseDocument, "assertEaseDocument");
4375
4533
  function materializeEaseDocument(easeDocument) {
4376
4534
  const ease = assertEaseDocument(easeDocument);
4377
4535
  return {
4536
+ ...pickAllowedRoots(ease),
4378
4537
  steps: ease.stepOrder.map((stepId) => ({
4379
4538
  id: stepId,
4380
4539
  ...ease.stepsById[stepId]
@@ -4383,32 +4542,125 @@ function materializeEaseDocument(easeDocument) {
4383
4542
  }
4384
4543
  __name(materializeEaseDocument, "materializeEaseDocument");
4385
4544
  __name2(materializeEaseDocument, "materializeEaseDocument");
4545
+ function clarityOutputToEaseDocument(output) {
4546
+ return {
4547
+ ...pickAllowedRoots(output),
4548
+ ...clarityStepsToEaseDocument(output.steps)
4549
+ };
4550
+ }
4551
+ __name(clarityOutputToEaseDocument, "clarityOutputToEaseDocument");
4552
+ __name2(clarityOutputToEaseDocument, "clarityOutputToEaseDocument");
4386
4553
  function mergeCurrentProcessPostprocessSlices(previous, steps) {
4387
4554
  return { ...previous, steps: mergeSteps(previous.steps, steps) };
4388
4555
  }
4389
4556
  __name(mergeCurrentProcessPostprocessSlices, "mergeCurrentProcessPostprocessSlices");
4390
4557
  __name2(mergeCurrentProcessPostprocessSlices, "mergeCurrentProcessPostprocessSlices");
4558
+ function stripProposalOnlyStepSlices(steps) {
4559
+ return steps.map((step) => {
4560
+ if (typeof step !== "object" || step === null) {
4561
+ return step;
4562
+ }
4563
+ return Object.fromEntries(
4564
+ Object.entries(step).filter(
4565
+ ([key]) => key !== "readiness" && key !== "readinessRationale" && key !== "extraCaptureNeeded"
4566
+ )
4567
+ );
4568
+ });
4569
+ }
4570
+ __name(stripProposalOnlyStepSlices, "stripProposalOnlyStepSlices");
4571
+ __name2(stripProposalOnlyStepSlices, "stripProposalOnlyStepSlices");
4391
4572
  function mergeTransformationProposalPostprocessSlices(previous, steps) {
4392
4573
  return { ...previous, steps: mergeSteps(previous.steps, steps) };
4393
4574
  }
4394
4575
  __name(mergeTransformationProposalPostprocessSlices, "mergeTransformationProposalPostprocessSlices");
4395
4576
  __name2(mergeTransformationProposalPostprocessSlices, "mergeTransformationProposalPostprocessSlices");
4396
- function createBaseCurrentProcessData(previous, steps) {
4577
+ function resolveEditedRoot(edited, previous, pending = false) {
4578
+ if (edited !== void 0) {
4579
+ return edited;
4580
+ }
4581
+ return pending ? void 0 : previous;
4582
+ }
4583
+ __name(resolveEditedRoot, "resolveEditedRoot");
4584
+ __name2(resolveEditedRoot, "resolveEditedRoot");
4585
+ function materializeCurrentProcessEdit(previous, easeOutput, options = {}) {
4397
4586
  return postprocessClarityCurrentProcessDataSchema.parse({
4398
- version: previous.version,
4399
- steps: steps.map((step) => clarityStepBaseSchema.parse(step))
4587
+ ...previous,
4588
+ summary: resolveEditedRoot(
4589
+ easeOutput.summary,
4590
+ previous.summary,
4591
+ options.pendingSummary
4592
+ ),
4593
+ swot: resolveEditedRoot(
4594
+ easeOutput.swot,
4595
+ previous.swot,
4596
+ options.pendingSwot
4597
+ ),
4598
+ steps: stripProposalOnlyStepSlices(
4599
+ coerceStepsOutput([...easeOutput.steps])
4600
+ )
4400
4601
  });
4401
4602
  }
4402
- __name(createBaseCurrentProcessData, "createBaseCurrentProcessData");
4403
- __name2(createBaseCurrentProcessData, "createBaseCurrentProcessData");
4404
- function createBaseTransformationProposalData(previous, steps) {
4603
+ __name(materializeCurrentProcessEdit, "materializeCurrentProcessEdit");
4604
+ __name2(materializeCurrentProcessEdit, "materializeCurrentProcessEdit");
4605
+ function materializeProposalEdit(previous, easeOutput, options = {}) {
4606
+ const steps = coerceStepsOutput([
4607
+ ...easeOutput.steps
4608
+ ]);
4405
4609
  return postprocessClarityTransformationProposalDataSchema.parse({
4406
- version: previous.version,
4407
- steps: steps.map((step) => clarityStepBaseSchema.parse(step))
4610
+ ...previous,
4611
+ summary: resolveEditedRoot(
4612
+ easeOutput.summary,
4613
+ previous.summary,
4614
+ options.pendingSummary
4615
+ ),
4616
+ projectedImpact: resolveEditedRoot(
4617
+ easeOutput.projectedImpact,
4618
+ previous.projectedImpact,
4619
+ options.pendingProjectedImpact
4620
+ ),
4621
+ steps: options.preserveVolatileSlices ? preserveProposalVolatileSlices(previous.steps, steps) : clearProposalVolatileSlices(steps)
4622
+ });
4623
+ }
4624
+ __name(materializeProposalEdit, "materializeProposalEdit");
4625
+ __name2(materializeProposalEdit, "materializeProposalEdit");
4626
+ function clearProposalVolatileSlices(steps) {
4627
+ return steps.map((step) => {
4628
+ if (typeof step !== "object" || step === null) {
4629
+ return step;
4630
+ }
4631
+ const proposalStep = step;
4632
+ const {
4633
+ readiness: _readiness,
4634
+ readinessRationale: _readinessRationale,
4635
+ extraCaptureNeeded: _extraCaptureNeeded,
4636
+ ...baseStep
4637
+ } = proposalStep;
4638
+ return baseStep;
4639
+ });
4640
+ }
4641
+ __name(clearProposalVolatileSlices, "clearProposalVolatileSlices");
4642
+ __name2(clearProposalVolatileSlices, "clearProposalVolatileSlices");
4643
+ function preserveProposalVolatileSlices(previousSteps, steps) {
4644
+ const previousById = new Map(previousSteps.map((step) => [step.id, step]));
4645
+ return clearProposalVolatileSlices(steps).map((step) => {
4646
+ if (typeof step !== "object" || step === null || !("id" in step)) {
4647
+ return step;
4648
+ }
4649
+ const stepId = typeof step.id === "string" ? step.id : null;
4650
+ const prev = stepId === null ? void 0 : previousById.get(stepId);
4651
+ if (!prev) {
4652
+ return step;
4653
+ }
4654
+ return {
4655
+ ...step,
4656
+ ...prev.readiness === void 0 ? {} : { readiness: prev.readiness },
4657
+ ...prev.readinessRationale === void 0 ? {} : { readinessRationale: prev.readinessRationale },
4658
+ ...prev.extraCaptureNeeded === void 0 ? {} : { extraCaptureNeeded: prev.extraCaptureNeeded }
4659
+ };
4408
4660
  });
4409
4661
  }
4410
- __name(createBaseTransformationProposalData, "createBaseTransformationProposalData");
4411
- __name2(createBaseTransformationProposalData, "createBaseTransformationProposalData");
4662
+ __name(preserveProposalVolatileSlices, "preserveProposalVolatileSlices");
4663
+ __name2(preserveProposalVolatileSlices, "preserveProposalVolatileSlices");
4412
4664
  function mergeSteps(previousSteps, steps) {
4413
4665
  const previousById = new Map(previousSteps.map((step) => [step.id, step]));
4414
4666
  return steps.map((step) => {
@@ -4857,6 +5109,7 @@ var INTEGRATION_SLUGS = [
4857
5109
  "workday",
4858
5110
  "coupa",
4859
5111
  "signavio",
5112
+ "sap-ecc",
4860
5113
  "msteams",
4861
5114
  "human-in-the-loop",
4862
5115
  "email-attachments-reader",
@@ -5239,11 +5492,15 @@ var artifactMessageSchema = z24.object({
5239
5492
  // rows, whose visible text lives in `content`.
5240
5493
  message: z24.unknown().nullable().optional()
5241
5494
  });
5495
+ var artifactListScopeSchema = z24.enum(["created", "shared"]);
5242
5496
  var artifactListResponseSchema = z24.object({
5243
- created: z24.array(artifactSchema),
5244
- sharedWithMe: z24.array(artifactSchema)
5497
+ artifacts: z24.array(artifactSchema),
5498
+ total: z24.number(),
5499
+ limit: z24.number(),
5500
+ offset: z24.number()
5245
5501
  });
5246
- var artifactDetailResponseSchema = artifactSchema.extend({
5502
+ var artifactDetailResponseSchema = z24.object({
5503
+ artifact: artifactSchema,
5247
5504
  is_creator: z24.boolean(),
5248
5505
  messages: z24.array(artifactMessageSchema)
5249
5506
  });
@@ -5261,7 +5518,7 @@ var artifactRevisionSchema = z24.object({
5261
5518
  created_at: z24.string()
5262
5519
  });
5263
5520
  var artifactRevisionListResponseSchema = z24.object({
5264
- data: z24.array(artifactRevisionSchema),
5521
+ revisions: z24.array(artifactRevisionSchema),
5265
5522
  total: z24.number(),
5266
5523
  // The live "head" version — what the dashboard currently shows and what the
5267
5524
  // next turn continues from by default. Null while the first turn is in flight.
@@ -5269,7 +5526,7 @@ var artifactRevisionListResponseSchema = z24.object({
5269
5526
  current_version: z24.number().int().positive().nullable()
5270
5527
  });
5271
5528
  var restoreArtifactRevisionResponseSchema = z24.object({
5272
- ok: z24.literal(true),
5529
+ success: z24.literal(true),
5273
5530
  // The version now live (the head was moved here; nothing is copied or lost).
5274
5531
  current_revision_id: z24.guid(),
5275
5532
  current_version: z24.number().int().positive()
@@ -5278,8 +5535,8 @@ var createArtifactBodySchema = z24.object({
5278
5535
  message: z24.string().min(1).max(1e4)
5279
5536
  });
5280
5537
  var createArtifactResponseSchema = z24.object({
5281
- artifactId: z24.guid(),
5282
- userMessage: artifactMessageSchema
5538
+ artifact_id: z24.guid(),
5539
+ user_message: artifactMessageSchema
5283
5540
  });
5284
5541
  var pulseSelectedElementSchema = z24.object({
5285
5542
  // Best-effort CSS path to the element (id-anchored where possible).
@@ -5302,8 +5559,7 @@ var sendArtifactMessageBodySchema = z24.object({
5302
5559
  selected_element: pulseSelectedElementSchema.optional()
5303
5560
  });
5304
5561
  var sendArtifactMessageResponseSchema = z24.object({
5305
- ok: z24.literal(true),
5306
- userMessage: artifactMessageSchema
5562
+ user_message: artifactMessageSchema
5307
5563
  });
5308
5564
  var answerArtifactQuestionBodySchema = z24.object({
5309
5565
  toolCallId: z24.string().min(1),
@@ -5318,7 +5574,7 @@ var updateArtifactBodySchema = z24.object({
5318
5574
  title: z24.string().trim().min(1).max(120)
5319
5575
  }).strict();
5320
5576
  var deleteArtifactResponseSchema = z24.object({
5321
- ok: z24.literal(true)
5577
+ success: z24.literal(true)
5322
5578
  });
5323
5579
  var browserReplayScreenshotSchema = z25.object({
5324
5580
  id: z25.guid(),
@@ -5388,7 +5644,8 @@ var startInterviewCaptureBodySchema = z26.object({
5388
5644
  type: clarityCaptureSubTypeSchema,
5389
5645
  captureId: z26.guid().optional(),
5390
5646
  language: clarityInterviewLanguageSchema.optional(),
5391
- extraCaptureRequestId: z26.guid().optional()
5647
+ extraCaptureRequestId: z26.guid().optional(),
5648
+ processNodeId: z26.guid().optional()
5392
5649
  });
5393
5650
  var startInterviewCaptureResponseSchema = clarityCaptureSchema.extend({
5394
5651
  createdAt: z26.string(),
@@ -5424,6 +5681,77 @@ var startInterviewCaptureResponseSchema = clarityCaptureSchema.extend({
5424
5681
  */
5425
5682
  extraCaptureGuidance: interviewExtraCaptureGuidanceSchema.nullable()
5426
5683
  });
5684
+ var CLARITY_INTERVIEW_STATUSES = [
5685
+ "pending",
5686
+ "recording",
5687
+ "complete",
5688
+ "failed"
5689
+ ];
5690
+ var clarityInterviewStatusSchema = z26.enum(CLARITY_INTERVIEW_STATUSES);
5691
+ var CLARITY_INTERVIEW_SCOPES = ["team", "organization"];
5692
+ var clarityInterviewScopeSchema = z26.enum(CLARITY_INTERVIEW_SCOPES);
5693
+ var teamInterviewSummarySchema = z26.object({
5694
+ id: z26.guid(),
5695
+ userId: z26.guid(),
5696
+ title: z26.string(),
5697
+ status: clarityInterviewStatusSchema,
5698
+ createdAt: z26.string(),
5699
+ updatedAt: z26.string()
5700
+ });
5701
+ var organizationInterviewSummarySchema = teamInterviewSummarySchema.extend({
5702
+ scope: clarityInterviewScopeSchema,
5703
+ teamId: z26.guid().nullable(),
5704
+ teamName: z26.string().nullable(),
5705
+ organizationId: z26.guid()
5706
+ });
5707
+ var clarityInterviewSchema = z26.object({
5708
+ id: z26.guid(),
5709
+ scope: clarityInterviewScopeSchema,
5710
+ teamId: z26.guid().nullable(),
5711
+ organizationId: z26.guid().nullable(),
5712
+ processId: z26.guid().nullable(),
5713
+ processNodeId: z26.guid().nullable(),
5714
+ userId: z26.guid(),
5715
+ title: z26.string(),
5716
+ status: clarityInterviewStatusSchema,
5717
+ recordingUrl: z26.string().nullable(),
5718
+ transcript: z26.array(conversationMessageSchema).nullable(),
5719
+ createdAt: z26.string(),
5720
+ updatedAt: z26.string()
5721
+ });
5722
+ var teamInterviewSchema = clarityInterviewSchema.extend({
5723
+ scope: z26.literal("team"),
5724
+ teamId: z26.guid()
5725
+ });
5726
+ var organizationInterviewSchema = clarityInterviewSchema.extend({
5727
+ scope: z26.literal("organization"),
5728
+ teamId: z26.null(),
5729
+ organizationId: z26.guid()
5730
+ });
5731
+ var listTeamInterviewResponseSchema = z26.object({
5732
+ interviews: z26.array(teamInterviewSummarySchema)
5733
+ });
5734
+ var listOrganizationInterviewResponseSchema = z26.object({
5735
+ interviews: z26.array(organizationInterviewSummarySchema)
5736
+ });
5737
+ var startTeamInterviewResponseSchema = teamInterviewSchema.extend({
5738
+ openaiToken: z26.string(),
5739
+ openaiTokenExpiresAt: z26.string(),
5740
+ provider: clarityInterviewVoiceProviderSchema,
5741
+ providerConfig: voiceProviderConfigSchema,
5742
+ instructions: z26.string().min(1),
5743
+ processGuidance: z26.null(),
5744
+ extraCaptureGuidance: z26.null()
5745
+ });
5746
+ var startOrganizationInterviewResponseSchema = organizationInterviewSchema.extend({
5747
+ openaiToken: z26.string(),
5748
+ openaiTokenExpiresAt: z26.string(),
5749
+ provider: clarityInterviewVoiceProviderSchema,
5750
+ providerConfig: voiceProviderConfigSchema,
5751
+ instructions: z26.string().min(1),
5752
+ processGuidance: z26.null(),
5753
+ extraCaptureGuidance: z26.null()
5754
+ });
5427
5755
  var MAX_INTERVIEW_FRAMES_PER_CAPTURE = 300;
5428
5756
  var interviewUploadUrlsBodySchema = z26.object({
5429
5757
  type: clarityCaptureSubTypeSchema,
@@ -5759,6 +6087,11 @@ var adminMemoryStoreSummarySchema = z32.object({
5759
6087
  totalSizeBytes: z32.number().int().nonnegative(),
5760
6088
  /** `memory_file_version.written_by` of the store's most recent write. */
5761
6089
  lastWriter: z32.string().nullable(),
6090
+ /** `agent_run_id` of that most recent write, when it came from an agent run
6091
+ * (the `assignment` writer). Null for non-run writers (user, meta-agent) or
6092
+ * when no run id was recorded. Lets the admin UI link the last writer to its
6093
+ * originating run (`/admin/run/:id`). */
6094
+ lastWriterAgentRunId: z32.guid().nullable(),
5762
6095
  lastUpdatedAt: z32.string(),
5763
6096
  archivedAt: z32.string().nullable(),
5764
6097
  deletedAt: z32.string().nullable(),
@@ -7435,323 +7768,75 @@ var batchQueueAgentsResponseSchema = z50.object({
7435
7768
  })
7436
7769
  )
7437
7770
  });
7438
- var CLARITY_OVERVIEW_STATUSES = [
7439
- "draft",
7440
- "collecting",
7441
- "generating",
7442
- "review",
7443
- "complete",
7444
- "generation_failed"
7445
- ];
7446
- var clarityOverviewStatusSchema = z51.enum(CLARITY_OVERVIEW_STATUSES);
7447
- var CLARITY_OVERVIEW_CAPTURE_STATUSES = [
7448
- "pending",
7449
- "recording",
7450
- "processing",
7451
- "complete",
7452
- "failed"
7453
- ];
7454
- var CLARITY_OVERVIEW_CAPTURE_TYPES = [
7455
- "video",
7456
- "interview",
7457
- "document",
7458
- "screenshare"
7459
- ];
7460
- var clarityOverviewCaptureSchema = z51.object({
7461
- id: z51.guid(),
7462
- overviewId: z51.guid(),
7463
- userId: z51.guid(),
7464
- userName: z51.string().optional(),
7465
- type: z51.enum(CLARITY_OVERVIEW_CAPTURE_TYPES),
7466
- videoUrl: z51.string().nullable(),
7467
- videoTranscript: z51.string().nullable(),
7468
- transcript: z51.array(conversationMessageSchema).nullable(),
7469
- status: z51.enum(CLARITY_OVERVIEW_CAPTURE_STATUSES),
7470
- createdAt: z51.coerce.date(),
7471
- updatedAt: z51.coerce.date()
7472
- });
7473
- var OverviewKpi = z51.object({
7474
- id: z51.guid(),
7475
- name: z51.string(),
7476
- value: z51.string(),
7477
- description: z51.string()
7478
- });
7479
- var OverviewHeadcount = z51.object({
7480
- approximate: z51.int().nonnegative(),
7481
- notes: z51.string().optional()
7482
- });
7483
- var OverviewTeamMember = z51.object({
7484
- id: z51.guid(),
7485
- name: z51.string(),
7486
- role: z51.string()
7487
- });
7488
- var OverviewTeam = z51.object({
7489
- id: z51.guid(),
7490
- name: z51.string(),
7491
- leadId: z51.guid().nullable(),
7492
- description: z51.string(),
7493
- memberCount: z51.int().nonnegative().optional(),
7494
- people: z51.array(OverviewTeamMember)
7771
+ var createTeamInviteLinkRequestSchema = z51.object({
7772
+ frontendUrl: z51.url()
7495
7773
  });
7496
- var OverviewInsight = z51.object({
7497
- id: z51.guid(),
7498
- title: z51.string(),
7499
- description: z51.string()
7774
+ var getTeamInviteLinkQuerySchema = z51.object({
7775
+ frontendUrl: z51.url()
7500
7776
  });
7501
- var OverviewHelpNeeded = z51.object({
7502
- id: z51.guid(),
7503
- title: z51.string(),
7504
- description: z51.string(),
7505
- fromWhom: z51.string()
7506
- });
7507
- var DepartmentOverview = z51.object({
7508
- mission: z51.string().nullable(),
7509
- kpis: z51.array(OverviewKpi),
7510
- headcount: OverviewHeadcount.nullable(),
7511
- teams: z51.array(OverviewTeam),
7512
- worksWell: z51.array(OverviewInsight),
7513
- doesNotWorkWell: z51.array(OverviewInsight),
7514
- needsHelp: z51.array(OverviewHelpNeeded)
7515
- });
7516
- var DocumentationStatus = z51.enum(["documented", "draft", "not_started"]);
7517
- var VulnerabilitySeverity = z51.enum(["warning", "critical"]);
7518
- var AccountabilityTag = z51.enum([
7519
- "owner",
7520
- // Decision-maker, shown with "owner" badge
7521
- "spof",
7522
- // Single point of failure — highlighted as risk
7523
- "external",
7524
- // Outside the org (e.g. Supplier)
7525
- "notified"
7526
- // Receives updates but doesn't act (e.g. Supply Chain)
7527
- ]);
7528
- var SystemRef = z51.object({
7529
- /** Stable identifier for the system, used for deduplication across processes */
7530
- id: z51.string(),
7531
- /** Display name as it appears in the UI: "Product Pantry", "Rohlik Admin", "Google Sheets" */
7532
- name: z51.string(),
7533
- /** URL to the system's icon/logo. Null if we don't have one — FE shows a generic fallback */
7534
- iconUrl: z51.url().nullable()
7535
- });
7536
- var PersonRole = z51.object({
7777
+ var teamInviteLinkCreatorSchema = z51.object({
7537
7778
  id: z51.guid(),
7538
- /** Person's display name: "Tereza", "Kristyna" */
7539
- name: z51.string(),
7540
- /**
7541
- * Their role title within this process, not their org-wide job title.
7542
- * e.g. "Listing Specialist", "Senior Category Manager"
7543
- */
7544
- role: z51.string(),
7545
- /**
7546
- * Accountability tags for this person within THIS process.
7547
- * Same person can be "owner" in one process and have no tags in another.
7548
- */
7549
- tags: z51.array(AccountabilityTag).default([]),
7550
- /**
7551
- * Full-time equivalent headcount allocated to this role.
7552
- * Optional — only set when the capture interview surfaced it.
7553
- * e.g. 2.25 FTE for a Listing Specialist team of 3 part-timers.
7554
- */
7555
- fte: z51.number().positive().optional()
7779
+ name: z51.string().nullable(),
7780
+ email: z51.email()
7556
7781
  });
7557
- var Vulnerability = z51.object({
7782
+ var teamInviteLinkSchema = z51.object({
7558
7783
  id: z51.guid(),
7559
- /** Warning = operational concern, Critical = structural/blocking risk */
7560
- severity: VulnerabilitySeverity,
7561
- /**
7562
- * Human-readable description surfaced from the interview.
7563
- * e.g. "Tereza alone covers fresh listing"
7564
- * e.g. "75-95% of obvious approvals still needs human"
7565
- */
7566
- description: z51.string(),
7567
- /**
7568
- * IDs of people directly tied to this vulnerability.
7569
- * Enables FE to highlight affected people in the detail view.
7570
- * e.g. SPOF vulnerability → [terezaId]
7571
- */
7572
- affectedPersonIds: z51.array(z51.string()).optional()
7784
+ url: z51.url().optional(),
7785
+ createdAt: z51.string(),
7786
+ createdBy: teamInviteLinkCreatorSchema
7573
7787
  });
7574
- var FrictionSignal = z51.object({
7575
- id: z51.guid(),
7576
- /**
7577
- * Operational pain point captured during interview.
7578
- * e.g. "40 unresolved bugs, periodic outages"
7579
- * These feed into the maturity score (future iteration) as penalties.
7580
- */
7581
- description: z51.string(),
7582
- /** Systems where this friction manifests — used for cross-referencing */
7583
- relatedSystemIds: z51.array(z51.string()).optional()
7788
+ var getTeamInviteLinkResponseSchema = z51.object({
7789
+ hasLink: z51.boolean(),
7790
+ link: teamInviteLinkSchema.optional()
7584
7791
  });
7585
- var Process = z51.object({
7586
- id: z51.guid(),
7587
- /** Process name as displayed in card headers: "Product Listing", "Price Proposals" */
7588
- name: z51.string(),
7589
- /**
7590
- * Tracks where this process is in the Clarity documentation pipeline.
7591
- * - "documented": fully captured and reviewed
7592
- * - "draft": interview done, output not yet validated
7593
- * - "not_started": identified but not yet interviewed
7594
- */
7595
- documentationStatus: DocumentationStatus,
7596
- clarityProcessId: z51.guid().nullable().optional(),
7597
- // --- Content ---
7598
- /**
7599
- * Short summary for overview cards (1-2 sentences).
7600
- * e.g. "End-to-end workflow of listing new products into the catalog..."
7601
- */
7602
- summary: z51.string(),
7603
- /**
7604
- * Rich description shown in the detail panel.
7605
- * May include emphasized metrics (FE handles bold rendering).
7606
- * e.g. "Listing **660–880 new SKUs every month** from the commercial decision..."
7607
- */
7608
- description: z51.string(),
7609
- /**
7610
- * Authored narrative describing the system flow / toolchain.
7611
- * Comes from the Duvo capture output, not computed.
7612
- * e.g. "Product Pantry portal → Rohlik Admin backend → ChatGPT for description rewrites → ..."
7613
- */
7614
- systemNarrative: z51.string().optional(),
7615
- /**
7616
- * Authored narrative describing who does what and how accountability flows.
7617
- * e.g. "Senior CMs decide. Junior CMs configure. The Listing Specialist team finalizes everything."
7618
- */
7619
- accountabilityNarrative: z51.string().optional(),
7620
- /**
7621
- * Free-text frequency because the real-world cadences are too varied to enumerate.
7622
- * e.g. "Continuous", "Weekly + monthly slowmover", "10–15 per CM / month", "Ad-hoc, no fixed cadence"
7623
- */
7624
- frequency: z51.string(),
7625
- // --- Relations ---
7626
- people: z51.array(PersonRole),
7627
- systems: z51.array(SystemRef),
7628
- vulnerabilities: z51.array(Vulnerability),
7629
- frictionSignals: z51.array(FrictionSignal)
7630
- });
7631
- var ProcessOverviewItem = Process.extend({
7632
- /**
7633
- * Pre-computed count so FE doesn't need to re-count the people array.
7634
- * Displayed as "5 involved" on overview cards.
7635
- */
7636
- peopleCount: z51.int(),
7637
- /**
7638
- * First N systems (typically 4) to render the icon row.
7639
- */
7640
- systemPreviews: z51.array(SystemRef),
7641
- /**
7642
- * How many systems beyond systemPreviews exist.
7643
- * Rendered as "+3" badge after the icon row. 0 means all systems fit.
7644
- */
7645
- systemOverflowCount: z51.int().default(0)
7792
+ var joinLinkInfoResponseSchema = z51.object({
7793
+ valid: z51.boolean(),
7794
+ teamName: z51.string().optional(),
7795
+ teamId: z51.guid().optional(),
7796
+ reason: z51.enum(["invalid", "expired"]).optional()
7646
7797
  });
7647
- var ClarityOverviewResponse = z51.object({
7648
- /** Explicit count for the "Processes Captured" KPI tile */
7649
- processCount: z51.int(),
7650
- /**
7651
- * Count of processes with at least one SPOF vulnerability.
7652
- * Powers the "Single point of failure" KPI tile.
7653
- */
7654
- singlePointOfFailureCount: z51.int(),
7655
- processes: z51.array(ProcessOverviewItem),
7656
- // Department-level overview sections
7657
- mission: z51.string().nullable(),
7658
- kpis: z51.array(OverviewKpi),
7659
- headcount: OverviewHeadcount.nullable(),
7660
- teams: z51.array(OverviewTeam),
7661
- worksWell: z51.array(OverviewInsight),
7662
- doesNotWorkWell: z51.array(OverviewInsight),
7663
- needsHelp: z51.array(OverviewHelpNeeded)
7664
- });
7665
- var clarityOverviewDetailSchema = z51.object({
7666
- id: z51.guid(),
7667
- teamId: z51.guid(),
7668
- userId: z51.guid(),
7669
- status: clarityOverviewStatusSchema,
7670
- processCount: z51.int(),
7671
- singlePointOfFailureCount: z51.int(),
7672
- processes: z51.array(ProcessOverviewItem),
7673
- // Department-level overview sections
7674
- mission: z51.string().nullable(),
7675
- kpis: z51.array(OverviewKpi),
7676
- headcount: OverviewHeadcount.nullable(),
7677
- teams: z51.array(OverviewTeam),
7678
- worksWell: z51.array(OverviewInsight),
7679
- doesNotWorkWell: z51.array(OverviewInsight),
7680
- needsHelp: z51.array(OverviewHelpNeeded),
7681
- generationError: z51.string().nullable(),
7682
- captures: z51.array(clarityOverviewCaptureSchema),
7683
- createdAt: z51.coerce.date(),
7684
- updatedAt: z51.coerce.date()
7685
- });
7686
- var createTeamInviteLinkRequestSchema = z52.object({
7687
- frontendUrl: z52.url()
7798
+ var acceptJoinLinkResponseSchema = z51.object({
7799
+ success: z51.boolean(),
7800
+ teamId: z51.guid()
7688
7801
  });
7689
- var getTeamInviteLinkQuerySchema = z52.object({
7802
+ var createClarityProcessInviteLinkRequestSchema = z52.object({
7690
7803
  frontendUrl: z52.url()
7691
7804
  });
7692
- var teamInviteLinkCreatorSchema = z52.object({
7693
- id: z52.guid(),
7694
- name: z52.string().nullable(),
7695
- email: z52.email()
7696
- });
7697
- var teamInviteLinkSchema = z52.object({
7698
- id: z52.guid(),
7699
- url: z52.url().optional(),
7700
- createdAt: z52.string(),
7701
- createdBy: teamInviteLinkCreatorSchema
7702
- });
7703
- var getTeamInviteLinkResponseSchema = z52.object({
7805
+ var clarityProcessInviteLinkSchema = teamInviteLinkSchema;
7806
+ var getClarityProcessInviteLinkResponseSchema = z52.object({
7704
7807
  hasLink: z52.boolean(),
7705
- link: teamInviteLinkSchema.optional()
7808
+ link: clarityProcessInviteLinkSchema.optional()
7706
7809
  });
7707
- var joinLinkInfoResponseSchema = z52.object({
7810
+ var clarityJoinLinkInfoResponseSchema = z52.object({
7708
7811
  valid: z52.boolean(),
7709
- teamName: z52.string().optional(),
7812
+ processName: z52.string().optional(),
7813
+ processId: z52.guid().optional(),
7710
7814
  teamId: z52.guid().optional(),
7711
7815
  reason: z52.enum(["invalid", "expired"]).optional()
7712
7816
  });
7713
- var acceptJoinLinkResponseSchema = z52.object({
7817
+ var acceptClarityJoinLinkResponseSchema = z52.object({
7714
7818
  success: z52.boolean(),
7715
- teamId: z52.guid()
7716
- });
7717
- var createClarityProcessInviteLinkRequestSchema = z53.object({
7718
- frontendUrl: z53.url()
7719
- });
7720
- var clarityProcessInviteLinkSchema = teamInviteLinkSchema;
7721
- var getClarityProcessInviteLinkResponseSchema = z53.object({
7722
- hasLink: z53.boolean(),
7723
- link: clarityProcessInviteLinkSchema.optional()
7724
- });
7725
- var clarityJoinLinkInfoResponseSchema = z53.object({
7726
- valid: z53.boolean(),
7727
- processName: z53.string().optional(),
7728
- processId: z53.guid().optional(),
7729
- teamId: z53.guid().optional(),
7730
- reason: z53.enum(["invalid", "expired"]).optional()
7731
- });
7732
- var acceptClarityJoinLinkResponseSchema = z53.object({
7733
- success: z53.boolean(),
7734
- processId: z53.guid()
7735
- });
7736
- var credentialPreviewSchema = z54.object({
7737
- id: z54.guid().describe("Credential ID"),
7738
- domain: z54.string().describe("Domain for the credential"),
7739
- username: z54.string().nullable().describe("Username (if any)"),
7740
- hasEnabledTOTP: z54.boolean().describe("Whether TOTP is enabled"),
7741
- hasPassword: z54.boolean().describe("Whether a password is stored"),
7742
- user_id: z54.string().nullable().describe("Owner user id; null when shared with the team")
7743
- });
7744
- var otpResponseSchema = z54.object({
7745
- code: z54.string().describe("The TOTP code"),
7746
- expiresAt: z54.number().describe("Expiration timestamp in milliseconds")
7747
- });
7748
- var encryptedDataSchema = z54.object({
7749
- encrypted_data: z54.string().describe("Base64-encoded encrypted data"),
7750
- key_version: z54.string().describe("KMS key version or 'base64' for dev")
7751
- });
7752
- var credentialDetailSchema = z54.object({
7753
- domain: z54.string().describe("Domain for the credential"),
7754
- username: z54.string().nullable().describe("Username (if any)"),
7819
+ processId: z52.guid()
7820
+ });
7821
+ var credentialPreviewSchema = z53.object({
7822
+ id: z53.guid().describe("Credential ID"),
7823
+ domain: z53.string().describe("Domain for the credential"),
7824
+ username: z53.string().nullable().describe("Username (if any)"),
7825
+ hasEnabledTOTP: z53.boolean().describe("Whether TOTP is enabled"),
7826
+ hasPassword: z53.boolean().describe("Whether a password is stored"),
7827
+ user_id: z53.string().nullable().describe("Owner user id; null when shared with the team")
7828
+ });
7829
+ var otpResponseSchema = z53.object({
7830
+ code: z53.string().describe("The TOTP code"),
7831
+ expiresAt: z53.number().describe("Expiration timestamp in milliseconds")
7832
+ });
7833
+ var encryptedDataSchema = z53.object({
7834
+ encrypted_data: z53.string().describe("Base64-encoded encrypted data"),
7835
+ key_version: z53.string().describe("KMS key version or 'base64' for dev")
7836
+ });
7837
+ var credentialDetailSchema = z53.object({
7838
+ domain: z53.string().describe("Domain for the credential"),
7839
+ username: z53.string().nullable().describe("Username (if any)"),
7755
7840
  password: encryptedDataSchema.nullable().describe("Encrypted password data")
7756
7841
  });
7757
7842
  var FEATURE_FLAG_CATALOGUE = {
@@ -7840,15 +7925,10 @@ var FEATURE_FLAG_CATALOGUE = {
7840
7925
  defaultValue: false,
7841
7926
  description: "Enables the L1-L4 Clarity process hierarchy surfaces, including the process landscape tree and related organize/auto-sort workflows."
7842
7927
  },
7843
- CLARITY_ON_DISK_CAPTURES: {
7844
- key: "clarity_on_disk_captures",
7845
- defaultValue: false,
7846
- description: "When enabled, the Clarity generation agent receives capture content (transcripts, documents, video transcripts, screenshare frames) as files on the sandbox filesystem and is instructed to read them via a hard checklist, instead of having the content inlined into the prompt."
7847
- },
7848
- CLARITY_OVERVIEW: {
7849
- key: "clarity_overview",
7928
+ CLARITY_NOTETAKER: {
7929
+ key: "clarity_notetaker",
7850
7930
  defaultValue: false,
7851
- description: "Enables the Clarity Overview executive dashboard showing high-level process KPIs, maturity scores, and drill-down cards across all captured processes."
7931
+ description: "Enables the Clarity meeting notetaker (Recall.ai bot). When disabled, the 'Meeting Notetaker' option is hidden in the Add Content menu and the POST /clarity/processes/:id/captures/meeting invite route returns 404; the Recall webhook callback is unaffected. Off-by-default for staged rollout."
7852
7932
  },
7853
7933
  CLARITY_VOICE_ELEVENLABS: {
7854
7934
  key: "clarity_voice_elevenlabs",
@@ -7963,160 +8043,160 @@ function coerceFlagValue(value) {
7963
8043
  }
7964
8044
  __name(coerceFlagValue, "coerceFlagValue");
7965
8045
  __name2(coerceFlagValue, "coerceFlagValue");
7966
- var teamFileItemSchema = z55.object({
7967
- id: z55.string(),
7968
- name: z55.string(),
7969
- path: z55.string(),
7970
- created_at: z55.string().optional(),
7971
- updated_at: z55.string().optional(),
7972
- metadata: z55.object({
7973
- mimetype: z55.string().optional(),
7974
- size: z55.number().optional()
8046
+ var teamFileItemSchema = z54.object({
8047
+ id: z54.string(),
8048
+ name: z54.string(),
8049
+ path: z54.string(),
8050
+ created_at: z54.string().optional(),
8051
+ updated_at: z54.string().optional(),
8052
+ metadata: z54.object({
8053
+ mimetype: z54.string().optional(),
8054
+ size: z54.number().optional()
7975
8055
  }).nullable().optional()
7976
8056
  });
7977
- var listTeamFilesResponseSchema = z55.object({
7978
- files: z55.array(teamFileItemSchema)
7979
- });
7980
- var createTeamFileUploadUrlBodySchema = z55.object({
7981
- fileName: z55.string().min(1),
7982
- contentType: z55.string().min(1)
7983
- });
7984
- var createTeamFileUploadUrlResponseSchema = z55.object({
7985
- signedUrl: z55.url(),
7986
- expiresAt: z55.iso.datetime(),
7987
- filePath: z55.string()
7988
- });
7989
- var renameTeamFileBodySchema = z55.object({
7990
- relativePath: z55.string().min(1),
7991
- newFilenameOnly: z55.string().min(1)
7992
- });
7993
- var teamFileSuccessResponseSchema = z55.object({
7994
- success: z55.boolean()
7995
- });
7996
- var teamFileDownloadUrlResponseSchema = z55.object({
7997
- url: z55.url(),
7998
- expiresAt: z55.iso.datetime()
7999
- });
8000
- var teamFileContentResponseSchema = z55.object({
8001
- content: z55.string(),
8002
- path: z55.string(),
8003
- contentType: z55.string().optional()
8004
- });
8005
- var updateTeamFileContentBodySchema = z55.object({
8006
- content: z55.string()
8007
- });
8008
- var globalAdminApiSchema = z56.object({
8009
- id: z56.guid(),
8010
- email: z56.string(),
8011
- userId: z56.guid(),
8012
- userName: z56.string().nullable(),
8013
- addedByUserId: z56.guid().nullable(),
8014
- createdAt: z56.string()
8015
- });
8016
- var globalAdminListResponseSchema = z56.object({
8017
- admins: z56.array(globalAdminApiSchema)
8018
- });
8019
- var globalAdminSearchResponseSchema = z56.object({
8020
- users: z56.array(
8021
- z56.object({
8022
- id: z56.guid(),
8023
- name: z56.string().nullable(),
8024
- email: z56.string(),
8025
- createdAt: z56.string().nullable()
8057
+ var listTeamFilesResponseSchema = z54.object({
8058
+ files: z54.array(teamFileItemSchema)
8059
+ });
8060
+ var createTeamFileUploadUrlBodySchema = z54.object({
8061
+ fileName: z54.string().min(1),
8062
+ contentType: z54.string().min(1)
8063
+ });
8064
+ var createTeamFileUploadUrlResponseSchema = z54.object({
8065
+ signedUrl: z54.url(),
8066
+ expiresAt: z54.iso.datetime(),
8067
+ filePath: z54.string()
8068
+ });
8069
+ var renameTeamFileBodySchema = z54.object({
8070
+ relativePath: z54.string().min(1),
8071
+ newFilenameOnly: z54.string().min(1)
8072
+ });
8073
+ var teamFileSuccessResponseSchema = z54.object({
8074
+ success: z54.boolean()
8075
+ });
8076
+ var teamFileDownloadUrlResponseSchema = z54.object({
8077
+ url: z54.url(),
8078
+ expiresAt: z54.iso.datetime()
8079
+ });
8080
+ var teamFileContentResponseSchema = z54.object({
8081
+ content: z54.string(),
8082
+ path: z54.string(),
8083
+ contentType: z54.string().optional()
8084
+ });
8085
+ var updateTeamFileContentBodySchema = z54.object({
8086
+ content: z54.string()
8087
+ });
8088
+ var globalAdminApiSchema = z55.object({
8089
+ id: z55.guid(),
8090
+ email: z55.string(),
8091
+ userId: z55.guid(),
8092
+ userName: z55.string().nullable(),
8093
+ addedByUserId: z55.guid().nullable(),
8094
+ createdAt: z55.string()
8095
+ });
8096
+ var globalAdminListResponseSchema = z55.object({
8097
+ admins: z55.array(globalAdminApiSchema)
8098
+ });
8099
+ var globalAdminSearchResponseSchema = z55.object({
8100
+ users: z55.array(
8101
+ z55.object({
8102
+ id: z55.guid(),
8103
+ name: z55.string().nullable(),
8104
+ email: z55.string(),
8105
+ createdAt: z55.string().nullable()
8026
8106
  })
8027
8107
  )
8028
8108
  });
8029
- var globalAdminCreateRequestSchema = z56.object({
8030
- userId: z56.guid()
8109
+ var globalAdminCreateRequestSchema = z55.object({
8110
+ userId: z55.guid()
8031
8111
  });
8032
- var globalAdminCreateResponseSchema = z56.object({
8112
+ var globalAdminCreateResponseSchema = z55.object({
8033
8113
  admin: globalAdminApiSchema
8034
8114
  });
8035
- var globalAdminDeleteResponseSchema = z56.object({
8036
- success: z56.literal(true)
8115
+ var globalAdminDeleteResponseSchema = z55.object({
8116
+ success: z55.literal(true)
8037
8117
  });
8038
- var adminAccessCheckResponseSchema = z56.object({
8039
- isGlobalAdmin: z56.boolean()
8118
+ var adminAccessCheckResponseSchema = z55.object({
8119
+ isGlobalAdmin: z55.boolean()
8040
8120
  });
8041
8121
  var JOB_LIST_SORT_COLUMNS = ["created_at"];
8042
- var jobListSortColumnSchema = z57.enum(JOB_LIST_SORT_COLUMNS);
8043
- var jobListIssueSeveritySchema = z57.enum(
8122
+ var jobListSortColumnSchema = z56.enum(JOB_LIST_SORT_COLUMNS);
8123
+ var jobListIssueSeveritySchema = z56.enum(
8044
8124
  ALL_EVALUATION_RUBRIC_SEVERITIES
8045
8125
  );
8046
- var jobListItemSchema = z57.object({
8047
- id: z57.guid(),
8048
- created_at: z57.coerce.date(),
8049
- updated_at: z57.coerce.date(),
8050
- started_at: z57.coerce.date().nullable(),
8051
- completed_at: z57.coerce.date().nullable(),
8126
+ var jobListItemSchema = z56.object({
8127
+ id: z56.guid(),
8128
+ created_at: z56.coerce.date(),
8129
+ updated_at: z56.coerce.date(),
8130
+ started_at: z56.coerce.date().nullable(),
8131
+ completed_at: z56.coerce.date().nullable(),
8052
8132
  status: agentRunStatusSchema,
8053
- source: z57.string().nullable(),
8054
- title: z57.string(),
8055
- run_number: z57.number(),
8133
+ source: z56.string().nullable(),
8134
+ title: z56.string(),
8135
+ run_number: z56.number(),
8056
8136
  // Agent info
8057
- agent_id: z57.guid(),
8058
- agent_name: z57.string(),
8059
- build_id: z57.guid(),
8137
+ agent_id: z56.guid(),
8138
+ agent_name: z56.string(),
8139
+ build_id: z56.guid(),
8060
8140
  // User info
8061
- user_id: z57.guid().nullable(),
8141
+ user_id: z56.guid().nullable(),
8062
8142
  // Case info
8063
- case_queue_item_id: z57.guid().nullable(),
8064
- case_queue_id: z57.guid().nullable(),
8065
- case_queue_name: z57.string().nullable(),
8066
- case_title: z57.string().nullable(),
8067
- postponed_to: z57.coerce.date().nullable(),
8068
- submitted_prompt_count: z57.number().int().min(0),
8143
+ case_queue_item_id: z56.guid().nullable(),
8144
+ case_queue_id: z56.guid().nullable(),
8145
+ case_queue_name: z56.string().nullable(),
8146
+ case_title: z56.string().nullable(),
8147
+ postponed_to: z56.coerce.date().nullable(),
8148
+ submitted_prompt_count: z56.number().int().min(0),
8069
8149
  eval_summaries: evalSummarySchema.nullable().optional()
8070
8150
  });
8071
- var jobListResponseSchema = z57.object({
8072
- data: z57.array(jobListItemSchema),
8073
- total: z57.number()
8151
+ var jobListResponseSchema = z56.object({
8152
+ data: z56.array(jobListItemSchema),
8153
+ total: z56.number()
8074
8154
  });
8075
- var jobFilterOptionsSchema = z57.object({
8076
- agents: z57.array(
8077
- z57.object({
8078
- id: z57.string(),
8079
- name: z57.string(),
8080
- folder_id: z57.string().nullable()
8155
+ var jobFilterOptionsSchema = z56.object({
8156
+ agents: z56.array(
8157
+ z56.object({
8158
+ id: z56.string(),
8159
+ name: z56.string(),
8160
+ folder_id: z56.string().nullable()
8081
8161
  })
8082
8162
  ),
8083
- folders: z57.array(
8084
- z57.object({
8085
- id: z57.string(),
8086
- name: z57.string(),
8087
- parent_folder_id: z57.string().nullable()
8163
+ folders: z56.array(
8164
+ z56.object({
8165
+ id: z56.string(),
8166
+ name: z56.string(),
8167
+ parent_folder_id: z56.string().nullable()
8088
8168
  })
8089
8169
  ),
8090
- users: z57.array(
8091
- z57.object({
8092
- id: z57.string(),
8093
- name: z57.string().nullable(),
8094
- email: z57.string()
8170
+ users: z56.array(
8171
+ z56.object({
8172
+ id: z56.string(),
8173
+ name: z56.string().nullable(),
8174
+ email: z56.string()
8095
8175
  })
8096
8176
  ),
8097
- caseQueues: z57.array(z57.object({ id: z57.string(), name: z57.string() }))
8098
- });
8099
- var mcpStepSchema = z58.object({
8100
- tool: z58.string().describe("MCP tool name (e.g., click, fill, navigate_page)"),
8101
- params: z58.record(z58.string(), z58.unknown()).describe("Tool-specific parameters"),
8102
- fallbackSelectors: z58.array(z58.string()).optional().describe("Alternative CSS selectors if primary fails"),
8103
- description: z58.string().optional().describe("Human-readable step description"),
8104
- screenshot: z58.string().optional().describe("Base64 screenshot at this step for visual context"),
8105
- snapshot: z58.string().optional().describe("DOM snapshot in accessibility tree format at this step"),
8106
- framePath: z58.array(z58.number()).optional().describe(
8177
+ caseQueues: z56.array(z56.object({ id: z56.string(), name: z56.string() }))
8178
+ });
8179
+ var mcpStepSchema = z57.object({
8180
+ tool: z57.string().describe("MCP tool name (e.g., click, fill, navigate_page)"),
8181
+ params: z57.record(z57.string(), z57.unknown()).describe("Tool-specific parameters"),
8182
+ fallbackSelectors: z57.array(z57.string()).optional().describe("Alternative CSS selectors if primary fails"),
8183
+ description: z57.string().optional().describe("Human-readable step description"),
8184
+ screenshot: z57.string().optional().describe("Base64 screenshot at this step for visual context"),
8185
+ snapshot: z57.string().optional().describe("DOM snapshot in accessibility tree format at this step"),
8186
+ framePath: z57.array(z57.number()).optional().describe(
8107
8187
  "Index-based path to the target iframe (e.g., [0] for first child iframe, [1, 0] for nested)"
8108
8188
  )
8109
8189
  });
8110
- var mcpWorkflowSchema = z58.object({
8111
- name: z58.string(),
8112
- startUrl: z58.string(),
8113
- viewport: z58.object({
8114
- width: z58.number(),
8115
- height: z58.number()
8190
+ var mcpWorkflowSchema = z57.object({
8191
+ name: z57.string(),
8192
+ startUrl: z57.string(),
8193
+ viewport: z57.object({
8194
+ width: z57.number(),
8195
+ height: z57.number()
8116
8196
  }),
8117
- steps: z58.array(mcpStepSchema)
8197
+ steps: z57.array(mcpStepSchema)
8118
8198
  });
8119
- var MCP_WORKFLOW_JSON_SCHEMA = z58.toJSONSchema(mcpWorkflowSchema, {
8199
+ var MCP_WORKFLOW_JSON_SCHEMA = z57.toJSONSchema(mcpWorkflowSchema, {
8120
8200
  reused: "inline"
8121
8201
  });
8122
8202
  var MCP_WORKFLOW_SCHEMA_DOCS = JSON.stringify(
@@ -8125,52 +8205,52 @@ var MCP_WORKFLOW_SCHEMA_DOCS = JSON.stringify(
8125
8205
  2
8126
8206
  );
8127
8207
  var ORG_BROWSER_CONFIG_VERSION = 1;
8128
- var organizationBrowserConfigDataSchema = z59.object({
8208
+ var organizationBrowserConfigDataSchema = z58.object({
8129
8209
  browserProvider: BrowserProviderTypeSchema.nullable(),
8130
8210
  dataResidency: DataResidencySchema.nullable(),
8131
8211
  dataHandling: DataHandlingSchema.nullable(),
8132
- enforced: z59.boolean()
8212
+ enforced: z58.boolean()
8133
8213
  });
8134
- var organizationBrowserConfigSchema = z59.object({
8135
- version: z59.literal(ORG_BROWSER_CONFIG_VERSION),
8214
+ var organizationBrowserConfigSchema = z58.object({
8215
+ version: z58.literal(ORG_BROWSER_CONFIG_VERSION),
8136
8216
  data: organizationBrowserConfigDataSchema
8137
8217
  });
8138
- var organizationBrowserSettingsSchema = z59.object({
8139
- organizationId: z59.guid(),
8218
+ var organizationBrowserSettingsSchema = z58.object({
8219
+ organizationId: z58.guid(),
8140
8220
  browserProvider: BrowserProviderTypeSchema.nullable(),
8141
8221
  dataResidency: DataResidencySchema.nullable(),
8142
8222
  dataHandling: DataHandlingSchema.nullable(),
8143
- enforced: z59.boolean(),
8144
- createdAt: z59.string(),
8145
- updatedAt: z59.string()
8223
+ enforced: z58.boolean(),
8224
+ createdAt: z58.string(),
8225
+ updatedAt: z58.string()
8146
8226
  });
8147
- var getOrganizationBrowserSettingsResponseSchema = z59.object({
8227
+ var getOrganizationBrowserSettingsResponseSchema = z58.object({
8148
8228
  settings: organizationBrowserSettingsSchema.nullable()
8149
8229
  });
8150
- var updateOrganizationBrowserSettingsRequestSchema = z59.object({
8230
+ var updateOrganizationBrowserSettingsRequestSchema = z58.object({
8151
8231
  browserProvider: BrowserProviderTypeSchema.nullable().optional(),
8152
8232
  dataResidency: DataResidencySchema.nullable().optional(),
8153
8233
  dataHandling: DataHandlingSchema.nullable().optional(),
8154
- enforced: z59.boolean().optional()
8234
+ enforced: z58.boolean().optional()
8155
8235
  });
8156
- var updateOrganizationBrowserSettingsResponseSchema = z59.object({
8236
+ var updateOrganizationBrowserSettingsResponseSchema = z58.object({
8157
8237
  settings: organizationBrowserSettingsSchema
8158
8238
  });
8159
- var catalogPluginSchema = z60.object({
8160
- name: z60.string().describe("Identifier to pass in the build's plugins array."),
8239
+ var catalogPluginSchema = z59.object({
8240
+ name: z59.string().describe("Identifier to pass in the build's plugins array."),
8161
8241
  type: extensibleEnum(["duvo-platform", "knowledge-work", "github"], {
8162
8242
  description: "Plugin source. 'duvo-platform' plugins are pre-baked into the Duvo runtime; 'knowledge-work' plugins are role-oriented bundles (engineering, sales, legal, \u2026) also baked into the runtime; 'github' plugins are downloaded from a user-supplied repository URL at run time."
8163
8243
  }),
8164
- description: z60.string()
8244
+ description: z59.string()
8165
8245
  });
8166
- var pluginCatalogResponseSchema = z60.object({
8167
- plugins: z60.array(catalogPluginSchema)
8246
+ var pluginCatalogResponseSchema = z59.object({
8247
+ plugins: z59.array(catalogPluginSchema)
8168
8248
  });
8169
- var limitValueSchema = z61.union([
8170
- z61.number().int().nonnegative(),
8171
- z61.literal("unlimited")
8249
+ var limitValueSchema = z60.union([
8250
+ z60.number().int().nonnegative(),
8251
+ z60.literal("unlimited")
8172
8252
  ]);
8173
- var runCountingModeSchema = z61.enum(["monthly", "lifetime"]);
8253
+ var runCountingModeSchema = z60.enum(["monthly", "lifetime"]);
8174
8254
  function addDuplicateKeyIssues({
8175
8255
  ctx,
8176
8256
  items,
@@ -8182,7 +8262,7 @@ function addDuplicateKeyIssues({
8182
8262
  const key = keyFor(item);
8183
8263
  if (seen.has(key)) {
8184
8264
  ctx.addIssue({
8185
- code: z61.ZodIssueCode.custom,
8265
+ code: z60.ZodIssueCode.custom,
8186
8266
  message: `Duplicate Product Access grant key: ${key}`,
8187
8267
  path: [...path, index]
8188
8268
  });
@@ -8193,34 +8273,34 @@ function addDuplicateKeyIssues({
8193
8273
  }
8194
8274
  __name(addDuplicateKeyIssues, "addDuplicateKeyIssues");
8195
8275
  __name2(addDuplicateKeyIssues, "addDuplicateKeyIssues");
8196
- var productAccessOwnerSchema = z61.discriminatedUnion("type", [
8197
- z61.object({
8198
- type: z61.literal("organization"),
8199
- organizationId: z61.guid()
8276
+ var productAccessOwnerSchema = z60.discriminatedUnion("type", [
8277
+ z60.object({
8278
+ type: z60.literal("organization"),
8279
+ organizationId: z60.guid()
8200
8280
  }),
8201
- z61.object({
8202
- type: z61.literal("team"),
8203
- teamId: z61.guid(),
8204
- organizationId: z61.guid().nullable()
8281
+ z60.object({
8282
+ type: z60.literal("team"),
8283
+ teamId: z60.guid(),
8284
+ organizationId: z60.guid().nullable()
8205
8285
  })
8206
8286
  ]);
8207
- var productAccessGrantSetSchema = z61.object({
8208
- products: z61.array(
8209
- z61.object({
8210
- productKey: z61.enum(PRODUCT_KEYS),
8211
- enabled: z61.boolean()
8287
+ var productAccessGrantSetSchema = z60.object({
8288
+ products: z60.array(
8289
+ z60.object({
8290
+ productKey: z60.enum(PRODUCT_KEYS),
8291
+ enabled: z60.boolean()
8212
8292
  })
8213
8293
  ),
8214
- capabilities: z61.array(
8215
- z61.object({
8216
- capabilityKey: z61.enum(PRODUCT_ACCESS_CAPABILITY_KEYS),
8217
- enabled: z61.boolean()
8294
+ capabilities: z60.array(
8295
+ z60.object({
8296
+ capabilityKey: z60.enum(PRODUCT_ACCESS_CAPABILITY_KEYS),
8297
+ enabled: z60.boolean()
8218
8298
  })
8219
8299
  ),
8220
- limits: z61.array(
8221
- z61.object({
8222
- productKey: z61.enum(PRODUCT_KEYS),
8223
- limitKey: z61.enum(ENTITLEMENT_LIMIT_KEYS),
8300
+ limits: z60.array(
8301
+ z60.object({
8302
+ productKey: z60.enum(PRODUCT_KEYS),
8303
+ limitKey: z60.enum(ENTITLEMENT_LIMIT_KEYS),
8224
8304
  limitValue: limitValueSchema,
8225
8305
  countingMode: runCountingModeSchema.nullable()
8226
8306
  })
@@ -8245,51 +8325,51 @@ var productAccessGrantSetSchema = z61.object({
8245
8325
  path: ["limits"]
8246
8326
  });
8247
8327
  });
8248
- var productAccessSnapshotSchema = z61.object({
8249
- products: z61.array(
8250
- z61.object({
8251
- productKey: z61.enum(PRODUCT_KEYS),
8252
- enabled: z61.boolean()
8328
+ var productAccessSnapshotSchema = z60.object({
8329
+ products: z60.array(
8330
+ z60.object({
8331
+ productKey: z60.enum(PRODUCT_KEYS),
8332
+ enabled: z60.boolean()
8253
8333
  })
8254
8334
  ),
8255
- capabilities: z61.array(
8256
- z61.object({
8257
- capabilityKey: z61.enum(PRODUCT_ACCESS_CAPABILITY_KEYS),
8258
- productKey: z61.enum(PRODUCT_KEYS),
8259
- enabled: z61.boolean()
8335
+ capabilities: z60.array(
8336
+ z60.object({
8337
+ capabilityKey: z60.enum(PRODUCT_ACCESS_CAPABILITY_KEYS),
8338
+ productKey: z60.enum(PRODUCT_KEYS),
8339
+ enabled: z60.boolean()
8260
8340
  })
8261
8341
  ),
8262
- limits: z61.array(
8263
- z61.object({
8264
- limitKey: z61.enum(ENTITLEMENT_LIMIT_KEYS),
8265
- productKey: z61.enum(PRODUCT_KEYS),
8342
+ limits: z60.array(
8343
+ z60.object({
8344
+ limitKey: z60.enum(ENTITLEMENT_LIMIT_KEYS),
8345
+ productKey: z60.enum(PRODUCT_KEYS),
8266
8346
  limitValue: limitValueSchema,
8267
8347
  countingMode: runCountingModeSchema.nullable(),
8268
- label: z61.literal("per_team")
8348
+ label: z60.literal("per_team")
8269
8349
  })
8270
8350
  )
8271
8351
  });
8272
- var billingPlanSchema = z61.object({
8273
- planVersionId: z61.string(),
8274
- planName: z61.string(),
8275
- basePlan: z61.enum(["free", "pro", "enterprise"])
8352
+ var billingPlanSchema = z60.object({
8353
+ planVersionId: z60.string(),
8354
+ planName: z60.string(),
8355
+ basePlan: z60.enum(["free", "pro", "enterprise"])
8276
8356
  });
8277
- var inheritedFromSchema = z61.discriminatedUnion("type", [
8278
- z61.object({
8279
- type: z61.literal("organization"),
8280
- organizationId: z61.guid()
8357
+ var inheritedFromSchema = z60.discriminatedUnion("type", [
8358
+ z60.object({
8359
+ type: z60.literal("organization"),
8360
+ organizationId: z60.guid()
8281
8361
  }),
8282
- z61.object({
8283
- type: z61.literal("team_subscription"),
8284
- planVersionId: z61.string()
8362
+ z60.object({
8363
+ type: z60.literal("team_subscription"),
8364
+ planVersionId: z60.string()
8285
8365
  })
8286
8366
  ]);
8287
- var productAccessReadResponseSchema = z61.object({
8367
+ var productAccessReadResponseSchema = z60.object({
8288
8368
  owner: productAccessOwnerSchema,
8289
- source: z61.enum(PLAN_ENTITLEMENTS_SOURCE_VALUES),
8290
- accessRevision: z61.string().min(1),
8369
+ source: z60.enum(PLAN_ENTITLEMENTS_SOURCE_VALUES),
8370
+ accessRevision: z60.string().min(1),
8291
8371
  displayPreset: displayPresetSchema,
8292
- hasExplicitTeamAccess: z61.boolean(),
8372
+ hasExplicitTeamAccess: z60.boolean(),
8293
8373
  inheritedFrom: inheritedFromSchema.nullable(),
8294
8374
  billingPlan: billingPlanSchema.nullable(),
8295
8375
  grants: productAccessSnapshotSchema,
@@ -8297,67 +8377,67 @@ var productAccessReadResponseSchema = z61.object({
8297
8377
  }).superRefine((value, ctx) => {
8298
8378
  if (value.owner.type === "team" && value.source === "organization" && value.inheritedFrom?.type !== "organization") {
8299
8379
  ctx.addIssue({
8300
- code: z61.ZodIssueCode.custom,
8380
+ code: z60.ZodIssueCode.custom,
8301
8381
  message: "inheritedFrom organization context is required when team source is organization",
8302
8382
  path: ["inheritedFrom"]
8303
8383
  });
8304
8384
  }
8305
8385
  if (value.owner.type === "team" && value.source === "team_subscription" && value.inheritedFrom?.type !== "team_subscription") {
8306
8386
  ctx.addIssue({
8307
- code: z61.ZodIssueCode.custom,
8387
+ code: z60.ZodIssueCode.custom,
8308
8388
  message: "inheritedFrom subscription context is required when team source is team_subscription",
8309
8389
  path: ["inheritedFrom"]
8310
8390
  });
8311
8391
  }
8312
8392
  if (value.owner.type === "team" && value.source === "team" && value.inheritedFrom !== null) {
8313
8393
  ctx.addIssue({
8314
- code: z61.ZodIssueCode.custom,
8394
+ code: z60.ZodIssueCode.custom,
8315
8395
  message: "inheritedFrom must be null for direct team Product Access",
8316
8396
  path: ["inheritedFrom"]
8317
8397
  });
8318
8398
  }
8319
8399
  if (value.owner.type === "organization" && value.billingPlan !== null) {
8320
8400
  ctx.addIssue({
8321
- code: z61.ZodIssueCode.custom,
8401
+ code: z60.ZodIssueCode.custom,
8322
8402
  message: "billingPlan must be null for organization Product Access",
8323
8403
  path: ["billingPlan"]
8324
8404
  });
8325
8405
  }
8326
8406
  if (value.owner.type === "organization" && value.source !== "organization") {
8327
8407
  ctx.addIssue({
8328
- code: z61.ZodIssueCode.custom,
8408
+ code: z60.ZodIssueCode.custom,
8329
8409
  message: "organization Product Access source must be organization",
8330
8410
  path: ["source"]
8331
8411
  });
8332
8412
  }
8333
8413
  if (value.owner.type === "organization" && value.inheritedFrom !== null) {
8334
8414
  ctx.addIssue({
8335
- code: z61.ZodIssueCode.custom,
8415
+ code: z60.ZodIssueCode.custom,
8336
8416
  message: "inheritedFrom must be null for organization Product Access",
8337
8417
  path: ["inheritedFrom"]
8338
8418
  });
8339
8419
  }
8340
8420
  });
8341
- var productAccessImpactRequestSchema = z61.object({
8421
+ var productAccessImpactRequestSchema = z60.object({
8342
8422
  proposedGrants: productAccessGrantSetSchema
8343
8423
  });
8344
- var productAccessWriteRequestSchema = z61.object({
8424
+ var productAccessWriteRequestSchema = z60.object({
8345
8425
  proposedGrants: productAccessGrantSetSchema,
8346
- accessRevision: z61.string().min(1),
8347
- impactFingerprint: z61.string().min(1).optional()
8348
- });
8349
- var productAccessTeamResetRequestSchema = z61.object({
8350
- accessRevision: z61.string().min(1),
8351
- impactFingerprint: z61.string().min(1).optional()
8352
- });
8353
- var productAccessChangeSummarySchema = z61.object({
8354
- addedProducts: z61.array(z61.enum(PRODUCT_KEYS)),
8355
- removedProducts: z61.array(z61.enum(PRODUCT_KEYS)),
8356
- addedCapabilities: z61.array(z61.enum(PRODUCT_ACCESS_CAPABILITY_KEYS)),
8357
- removedCapabilities: z61.array(z61.enum(PRODUCT_ACCESS_CAPABILITY_KEYS)),
8358
- limitChanges: z61.array(
8359
- z61.object({
8360
- limitKey: z61.enum(ENTITLEMENT_LIMIT_KEYS),
8426
+ accessRevision: z60.string().min(1),
8427
+ impactFingerprint: z60.string().min(1).optional()
8428
+ });
8429
+ var productAccessTeamResetRequestSchema = z60.object({
8430
+ accessRevision: z60.string().min(1),
8431
+ impactFingerprint: z60.string().min(1).optional()
8432
+ });
8433
+ var productAccessChangeSummarySchema = z60.object({
8434
+ addedProducts: z60.array(z60.enum(PRODUCT_KEYS)),
8435
+ removedProducts: z60.array(z60.enum(PRODUCT_KEYS)),
8436
+ addedCapabilities: z60.array(z60.enum(PRODUCT_ACCESS_CAPABILITY_KEYS)),
8437
+ removedCapabilities: z60.array(z60.enum(PRODUCT_ACCESS_CAPABILITY_KEYS)),
8438
+ limitChanges: z60.array(
8439
+ z60.object({
8440
+ limitKey: z60.enum(ENTITLEMENT_LIMIT_KEYS),
8361
8441
  currentValue: limitValueSchema,
8362
8442
  currentCountingMode: runCountingModeSchema.nullable(),
8363
8443
  proposedValue: limitValueSchema,
@@ -8365,61 +8445,61 @@ var productAccessChangeSummarySchema = z61.object({
8365
8445
  })
8366
8446
  )
8367
8447
  });
8368
- var productAccessImpactResponseSchema = z61.object({
8448
+ var productAccessImpactResponseSchema = z60.object({
8369
8449
  owner: productAccessOwnerSchema,
8370
- impactFingerprint: z61.string().min(1),
8371
- affectedTeamCount: z61.number().int().nonnegative(),
8372
- affectedTeamsTruncated: z61.boolean(),
8450
+ impactFingerprint: z60.string().min(1),
8451
+ affectedTeamCount: z60.number().int().nonnegative(),
8452
+ affectedTeamsTruncated: z60.boolean(),
8373
8453
  changes: productAccessChangeSummarySchema,
8374
- sideEffects: z61.object({
8375
- automationWillPause: z61.boolean(),
8376
- clarityWillHide: z61.boolean()
8454
+ sideEffects: z60.object({
8455
+ automationWillPause: z60.boolean(),
8456
+ clarityWillHide: z60.boolean()
8377
8457
  }),
8378
- affectedTeamsPreview: z61.array(
8379
- z61.object({
8380
- teamId: z61.guid(),
8381
- teamName: z61.string(),
8382
- source: z61.enum(PLAN_ENTITLEMENTS_SOURCE_VALUES),
8458
+ affectedTeamsPreview: z60.array(
8459
+ z60.object({
8460
+ teamId: z60.guid(),
8461
+ teamName: z60.string(),
8462
+ source: z60.enum(PLAN_ENTITLEMENTS_SOURCE_VALUES),
8383
8463
  changes: productAccessChangeSummarySchema
8384
8464
  })
8385
8465
  )
8386
8466
  });
8387
- var publicProfileSchema = z62.object({
8388
- id: z62.guid(),
8389
- name: z62.string().nullable(),
8390
- email: z62.email(),
8391
- teamId: z62.guid().nullable()
8467
+ var publicProfileSchema = z61.object({
8468
+ id: z61.guid(),
8469
+ name: z61.string().nullable(),
8470
+ email: z61.email(),
8471
+ teamId: z61.guid().nullable()
8392
8472
  });
8393
- var publicProfileResponseSchema = z62.object({
8473
+ var publicProfileResponseSchema = z61.object({
8394
8474
  profile: publicProfileSchema
8395
8475
  });
8396
- var elementSelectorsSchema = z63.object({
8397
- css: z63.string().optional(),
8398
- cssPath: z63.string().optional(),
8399
- xpath: z63.string().optional(),
8400
- testId: z63.string().optional(),
8401
- ariaSelector: z63.string().optional(),
8402
- text: z63.string().optional()
8476
+ var elementSelectorsSchema = z62.object({
8477
+ css: z62.string().optional(),
8478
+ cssPath: z62.string().optional(),
8479
+ xpath: z62.string().optional(),
8480
+ testId: z62.string().optional(),
8481
+ ariaSelector: z62.string().optional(),
8482
+ text: z62.string().optional()
8403
8483
  });
8404
- var elementInfoSchema = z63.object({
8405
- uid: z63.string().optional(),
8484
+ var elementInfoSchema = z62.object({
8485
+ uid: z62.string().optional(),
8406
8486
  selectors: elementSelectorsSchema,
8407
- tagName: z63.string(),
8408
- textContent: z63.string().optional(),
8409
- ariaLabel: z63.string().optional(),
8410
- computedRole: z63.string().optional(),
8411
- attributes: z63.record(z63.string(), z63.string()).optional(),
8412
- framePath: z63.array(z63.number()).optional(),
8413
- frameUrl: z63.string().optional()
8414
- });
8415
- var recordedEventSchema = z63.looseObject({
8416
- id: z63.string(),
8417
- type: z63.string(),
8418
- timestamp: z63.number(),
8419
- url: z63.string(),
8420
- tabId: z63.number().optional(),
8421
- frameId: z63.number().optional(),
8422
- framePath: z63.array(z63.number()).optional(),
8487
+ tagName: z62.string(),
8488
+ textContent: z62.string().optional(),
8489
+ ariaLabel: z62.string().optional(),
8490
+ computedRole: z62.string().optional(),
8491
+ attributes: z62.record(z62.string(), z62.string()).optional(),
8492
+ framePath: z62.array(z62.number()).optional(),
8493
+ frameUrl: z62.string().optional()
8494
+ });
8495
+ var recordedEventSchema = z62.looseObject({
8496
+ id: z62.string(),
8497
+ type: z62.string(),
8498
+ timestamp: z62.number(),
8499
+ url: z62.string(),
8500
+ tabId: z62.number().optional(),
8501
+ frameId: z62.number().optional(),
8502
+ framePath: z62.array(z62.number()).optional(),
8423
8503
  element: elementInfoSchema.optional()
8424
8504
  });
8425
8505
  var DUVO_CLIENT_HEADER = "x-duvo-client";
@@ -8439,63 +8519,63 @@ function resolveRequestSourceFromClientHeader(header) {
8439
8519
  }
8440
8520
  __name(resolveRequestSourceFromClientHeader, "resolveRequestSourceFromClientHeader");
8441
8521
  __name2(resolveRequestSourceFromClientHeader, "resolveRequestSourceFromClientHeader");
8442
- var RedactedMcpServerConfigSchema = z64.object({
8522
+ var RedactedMcpServerConfigSchema = z63.object({
8443
8523
  type: TransportTypeSchema,
8444
8524
  integrationSlug: IntegrationSlugSchema,
8445
- instanceId: z64.string().nullable()
8525
+ instanceId: z63.string().nullable()
8446
8526
  });
8447
- var ThreadContextMessageSchema = z64.object({
8448
- role: z64.enum(["user", "assistant"]),
8449
- content: z64.string()
8527
+ var ThreadContextMessageSchema = z63.object({
8528
+ role: z63.enum(["user", "assistant"]),
8529
+ content: z63.string()
8450
8530
  });
8451
- var ChatFileReferenceSchema = z64.object({
8452
- id: z64.string(),
8453
- name: z64.string(),
8454
- mimetype: z64.string(),
8455
- size: z64.number(),
8456
- platform: z64.enum(["slack", "teams"]),
8457
- workspaceId: z64.string(),
8458
- channelId: z64.string()
8459
- });
8460
- var ResolvedSubAgentSchema = z64.object({
8461
- agentId: z64.string().uuid(),
8462
- buildId: z64.string().uuid(),
8463
- name: z64.string().min(1).max(64).regex(/^[a-z0-9-]+$/).describe(
8531
+ var ChatFileReferenceSchema = z63.object({
8532
+ id: z63.string(),
8533
+ name: z63.string(),
8534
+ mimetype: z63.string(),
8535
+ size: z63.number(),
8536
+ platform: z63.enum(["slack", "teams"]),
8537
+ workspaceId: z63.string(),
8538
+ channelId: z63.string()
8539
+ });
8540
+ var ResolvedSubAgentSchema = z63.object({
8541
+ agentId: z63.string().uuid(),
8542
+ buildId: z63.string().uuid(),
8543
+ name: z63.string().min(1).max(64).regex(/^[a-z0-9-]+$/).describe(
8464
8544
  "Stable slug used as the Claude Code subagent name (kebab-case, \u226464 chars)"
8465
8545
  ),
8466
- description: z64.string().describe(
8546
+ description: z63.string().describe(
8467
8547
  "Routing description Claude uses to decide when to delegate to this subagent"
8468
8548
  ),
8469
- prompt: z64.string().describe("System prompt (AOP) for this subagent"),
8470
- model: z64.string().optional().describe("Optional Claude model identifier override for this subagent"),
8471
- mcpServers: z64.record(z64.string(), RedactedMcpServerConfigSchema).default({}).describe(
8549
+ prompt: z63.string().describe("System prompt (AOP) for this subagent"),
8550
+ model: z63.string().optional().describe("Optional Claude model identifier override for this subagent"),
8551
+ mcpServers: z63.record(z63.string(), RedactedMcpServerConfigSchema).default({}).describe(
8472
8552
  "Redacted MCP server configs scoped to this subagent. Secrets resolved at execution time."
8473
8553
  )
8474
8554
  });
8475
8555
  var RunConfigSchema = AgentConfigSchema.extend({
8476
- task: z64.string(),
8477
- mcpServers: z64.record(z64.string(), RedactedMcpServerConfigSchema),
8478
- subAgents: z64.array(ResolvedSubAgentSchema).optional().default([]),
8479
- conversationHistory: z64.array(ThreadContextMessageSchema).optional(),
8480
- chatFiles: z64.array(ChatFileReferenceSchema).optional(),
8556
+ task: z63.string(),
8557
+ mcpServers: z63.record(z63.string(), RedactedMcpServerConfigSchema),
8558
+ subAgents: z63.array(ResolvedSubAgentSchema).optional().default([]),
8559
+ conversationHistory: z63.array(ThreadContextMessageSchema).optional(),
8560
+ chatFiles: z63.array(ChatFileReferenceSchema).optional(),
8481
8561
  /** IANA timezone (e.g. `"Europe/Prague"`). Consumers should fall back to UTC when absent. */
8482
- timezone: z64.string().optional(),
8562
+ timezone: z63.string().optional(),
8483
8563
  /**
8484
8564
  * ISO 8601 timestamp captured when the run was created. Frozen at
8485
8565
  * run-creation time and never recomputed, so resumes reuse the same value —
8486
8566
  * the runtime injects it into the cached system prompt and a changing value
8487
8567
  * would bust the prompt cache.
8488
8568
  */
8489
- sessionStartedAt: z64.string().optional()
8569
+ sessionStartedAt: z63.string().optional()
8490
8570
  });
8491
- var StoredRunConfigV0Schema = z64.object({
8492
- version: z64.literal("v0")
8571
+ var StoredRunConfigV0Schema = z63.object({
8572
+ version: z63.literal("v0")
8493
8573
  });
8494
- var StoredRunConfigV1Schema = z64.object({
8495
- version: z64.literal("v1"),
8574
+ var StoredRunConfigV1Schema = z63.object({
8575
+ version: z63.literal("v1"),
8496
8576
  data: RunConfigSchema
8497
8577
  });
8498
- var StoredRunConfigSchema = z64.union([
8578
+ var StoredRunConfigSchema = z63.union([
8499
8579
  StoredRunConfigV0Schema,
8500
8580
  StoredRunConfigV1Schema
8501
8581
  ]);
@@ -8514,177 +8594,177 @@ function isRunConfig(config) {
8514
8594
  }
8515
8595
  __name(isRunConfig, "isRunConfig");
8516
8596
  __name2(isRunConfig, "isRunConfig");
8517
- var skillApiSchema = z65.object({
8518
- id: z65.string(),
8519
- name: z65.string(),
8520
- description: z65.string(),
8597
+ var skillApiSchema = z64.object({
8598
+ id: z64.string(),
8599
+ name: z64.string(),
8600
+ description: z64.string(),
8521
8601
  // System skills have null team_id.
8522
- team_id: z65.string().nullable()
8602
+ team_id: z64.string().nullable()
8523
8603
  });
8524
- var listSkillsResponseSchema = z65.object({
8525
- skills: z65.array(skillApiSchema)
8604
+ var listSkillsResponseSchema = z64.object({
8605
+ skills: z64.array(skillApiSchema)
8526
8606
  });
8527
- var systemSkillSchema = z65.object({
8528
- id: z65.string(),
8529
- name: z65.string(),
8530
- description: z65.string()
8531
- });
8532
- var listSystemSkillsResponseSchema = z65.object({
8533
- skills: z65.array(systemSkillSchema)
8534
- });
8535
- var skillFileItemSchema = z65.object({
8536
- name: z65.string(),
8537
- path: z65.string(),
8538
- size: z65.number().optional(),
8539
- contentType: z65.string().optional(),
8540
- updatedAt: z65.string().optional()
8541
- });
8542
- var listSkillFilesResponseSchema = z65.object({
8543
- files: z65.array(skillFileItemSchema)
8544
- });
8545
- var getSkillFileContentResponseSchema = z65.object({
8546
- content: z65.string(),
8547
- path: z65.string(),
8548
- contentType: z65.string().optional()
8549
- });
8550
- var updateSkillFileBodySchema = z65.object({
8551
- content: z65.string()
8552
- });
8553
- var updateSkillFileResponseSchema = z65.object({
8554
- success: z65.boolean(),
8555
- message: z65.string(),
8556
- skill: z65.object({
8557
- id: z65.string(),
8558
- name: z65.string(),
8559
- description: z65.string()
8560
- }).optional()
8607
+ var systemSkillSchema = z64.object({
8608
+ id: z64.string(),
8609
+ name: z64.string(),
8610
+ description: z64.string()
8561
8611
  });
8562
- var deleteSkillResponseSchema = z65.object({
8563
- success: z65.boolean(),
8564
- message: z65.string()
8612
+ var listSystemSkillsResponseSchema = z64.object({
8613
+ skills: z64.array(systemSkillSchema)
8565
8614
  });
8566
- var generateSkillBodySchema = z65.object({
8567
- prompt: z65.string().min(1).max(2e3),
8568
- existingContent: z65.string().max(2e4).optional()
8615
+ var skillFileItemSchema = z64.object({
8616
+ name: z64.string(),
8617
+ path: z64.string(),
8618
+ size: z64.number().optional(),
8619
+ contentType: z64.string().optional(),
8620
+ updatedAt: z64.string().optional()
8569
8621
  });
8570
- var generateSkillResponseSchema = z65.object({
8571
- content: z65.string()
8622
+ var listSkillFilesResponseSchema = z64.object({
8623
+ files: z64.array(skillFileItemSchema)
8572
8624
  });
8573
- var skillAssignmentSchema = z65.object({
8574
- id: z65.string(),
8575
- name: z65.string()
8625
+ var getSkillFileContentResponseSchema = z64.object({
8626
+ content: z64.string(),
8627
+ path: z64.string(),
8628
+ contentType: z64.string().optional()
8576
8629
  });
8577
- var listSkillAssignmentsResponseSchema = z65.object({
8578
- assignments: z65.array(skillAssignmentSchema),
8579
- total: z65.number()
8630
+ var updateSkillFileBodySchema = z64.object({
8631
+ content: z64.string()
8580
8632
  });
8581
- var teamInvitationApiSchema = z66.object({
8582
- id: z66.string(),
8583
- team_id: z66.string(),
8584
- email: z66.email(),
8585
- invited_by: z66.string(),
8586
- role: z66.string(),
8587
- status: z66.string(),
8588
- name: z66.string().nullable(),
8589
- created_at: z66.string(),
8590
- process_id: z66.guid().nullable().optional()
8633
+ var updateSkillFileResponseSchema = z64.object({
8634
+ success: z64.boolean(),
8635
+ message: z64.string(),
8636
+ skill: z64.object({
8637
+ id: z64.string(),
8638
+ name: z64.string(),
8639
+ description: z64.string()
8640
+ }).optional()
8591
8641
  });
8592
- var teamInvitationDetailApiSchema = z66.object({
8593
- id: z66.string(),
8594
- team_id: z66.string(),
8595
- email: z66.email(),
8596
- invited_by: z66.string(),
8597
- role: z66.string(),
8598
- status: z66.string(),
8599
- name: z66.string().nullable(),
8600
- created_at: z66.string(),
8601
- process_id: z66.guid().nullable().optional(),
8602
- team: z66.object({
8603
- id: z66.string(),
8604
- name: z66.string()
8642
+ var deleteSkillResponseSchema = z64.object({
8643
+ success: z64.boolean(),
8644
+ message: z64.string()
8645
+ });
8646
+ var generateSkillBodySchema = z64.object({
8647
+ prompt: z64.string().min(1).max(2e3),
8648
+ existingContent: z64.string().max(2e4).optional()
8649
+ });
8650
+ var generateSkillResponseSchema = z64.object({
8651
+ content: z64.string()
8652
+ });
8653
+ var skillAssignmentSchema = z64.object({
8654
+ id: z64.string(),
8655
+ name: z64.string()
8656
+ });
8657
+ var listSkillAssignmentsResponseSchema = z64.object({
8658
+ assignments: z64.array(skillAssignmentSchema),
8659
+ total: z64.number()
8660
+ });
8661
+ var teamInvitationApiSchema = z65.object({
8662
+ id: z65.string(),
8663
+ team_id: z65.string(),
8664
+ email: z65.email(),
8665
+ invited_by: z65.string(),
8666
+ role: z65.string(),
8667
+ status: z65.string(),
8668
+ name: z65.string().nullable(),
8669
+ created_at: z65.string(),
8670
+ process_id: z65.guid().nullable().optional()
8671
+ });
8672
+ var teamInvitationDetailApiSchema = z65.object({
8673
+ id: z65.string(),
8674
+ team_id: z65.string(),
8675
+ email: z65.email(),
8676
+ invited_by: z65.string(),
8677
+ role: z65.string(),
8678
+ status: z65.string(),
8679
+ name: z65.string().nullable(),
8680
+ created_at: z65.string(),
8681
+ process_id: z65.guid().nullable().optional(),
8682
+ team: z65.object({
8683
+ id: z65.string(),
8684
+ name: z65.string()
8605
8685
  }),
8606
- invitedBy: z66.object({
8607
- id: z66.string(),
8608
- name: z66.string().nullable(),
8609
- email: z66.email()
8686
+ invitedBy: z65.object({
8687
+ id: z65.string(),
8688
+ name: z65.string().nullable(),
8689
+ email: z65.email()
8610
8690
  }),
8611
- process: z66.object({
8612
- id: z66.string(),
8613
- name: z66.string()
8691
+ process: z65.object({
8692
+ id: z65.string(),
8693
+ name: z65.string()
8614
8694
  }).optional()
8615
8695
  });
8616
- var createTeamInvitationRequestSchema = z66.object({
8617
- email: z66.email(),
8618
- role: z66.string(),
8619
- processId: z66.guid().optional()
8696
+ var createTeamInvitationRequestSchema = z65.object({
8697
+ email: z65.email(),
8698
+ role: z65.string(),
8699
+ processId: z65.guid().optional()
8620
8700
  });
8621
- var acceptTeamInvitationRequestSchema = z66.object({
8622
- name: z66.string().optional()
8701
+ var acceptTeamInvitationRequestSchema = z65.object({
8702
+ name: z65.string().optional()
8623
8703
  });
8624
- var bulkInviteResponseSchema = z66.object({
8625
- succeeded: z66.number(),
8626
- skipped: z66.number(),
8627
- failed: z66.number()
8704
+ var bulkInviteResponseSchema = z65.object({
8705
+ succeeded: z65.number(),
8706
+ skipped: z65.number(),
8707
+ failed: z65.number()
8628
8708
  });
8629
- var teamDiscoveryModeSchema = z67.enum(["request", "auto"]);
8630
- var BrowserRegionSchema = z67.enum([
8709
+ var teamDiscoveryModeSchema = z66.enum(["request", "auto"]);
8710
+ var BrowserRegionSchema = z66.enum([
8631
8711
  "us-west-2",
8632
8712
  "us-east-1",
8633
8713
  "eu-central-1",
8634
8714
  "ap-southeast-1"
8635
8715
  ]);
8636
- var BrowserLocationSchema = z67.union([
8637
- z67.literal("cz"),
8638
- z67.literal("de"),
8639
- z67.literal("fr"),
8640
- z67.literal("gb"),
8641
- z67.literal("it"),
8642
- z67.literal("pl"),
8643
- z67.literal("sk")
8716
+ var BrowserLocationSchema = z66.union([
8717
+ z66.literal("cz"),
8718
+ z66.literal("de"),
8719
+ z66.literal("fr"),
8720
+ z66.literal("gb"),
8721
+ z66.literal("it"),
8722
+ z66.literal("pl"),
8723
+ z66.literal("sk")
8644
8724
  ]);
8645
- var teamMemberApiSchema = z67.object({
8646
- id: z67.guid(),
8647
- name: z67.string().nullable(),
8648
- email: z67.email(),
8649
- role: z67.string(),
8650
- inheritedFromOrg: z67.boolean().default(false)
8651
- });
8652
- var listTeamMembersResponseSchema = z67.object({
8653
- members: z67.array(teamMemberApiSchema),
8654
- total: z67.number().int().nonnegative(),
8655
- limit: z67.number().int().positive(),
8656
- offset: z67.number().int().nonnegative()
8657
- });
8658
- var updateMemberRoleRequestSchema = z67.object({
8659
- role: z67.string()
8660
- });
8661
- var removeMemberResponseSchema = z67.object({
8662
- success: z67.literal(true),
8663
- nextTeamId: z67.guid().nullable(),
8664
- planType: z67.enum(["pro", "enterprise"]).nullable()
8665
- });
8666
- var getMemberMeResponseSchema = z67.object({
8667
- role: z67.string().nullable()
8668
- });
8669
- var addTeamMemberRequestSchema = z67.object({
8670
- userId: z67.guid(),
8671
- role: z67.string()
8672
- });
8673
- var updateTeamRequestSchema = z67.object({
8674
- name: z67.string().min(1).optional(),
8675
- slack_team_id: z67.string().optional(),
8725
+ var teamMemberApiSchema = z66.object({
8726
+ id: z66.guid(),
8727
+ name: z66.string().nullable(),
8728
+ email: z66.email(),
8729
+ role: z66.string(),
8730
+ inheritedFromOrg: z66.boolean().default(false)
8731
+ });
8732
+ var listTeamMembersResponseSchema = z66.object({
8733
+ members: z66.array(teamMemberApiSchema),
8734
+ total: z66.number().int().nonnegative(),
8735
+ limit: z66.number().int().positive(),
8736
+ offset: z66.number().int().nonnegative()
8737
+ });
8738
+ var updateMemberRoleRequestSchema = z66.object({
8739
+ role: z66.string()
8740
+ });
8741
+ var removeMemberResponseSchema = z66.object({
8742
+ success: z66.literal(true),
8743
+ nextTeamId: z66.guid().nullable(),
8744
+ planType: z66.enum(["pro", "enterprise"]).nullable()
8745
+ });
8746
+ var getMemberMeResponseSchema = z66.object({
8747
+ role: z66.string().nullable()
8748
+ });
8749
+ var addTeamMemberRequestSchema = z66.object({
8750
+ userId: z66.guid(),
8751
+ role: z66.string()
8752
+ });
8753
+ var updateTeamRequestSchema = z66.object({
8754
+ name: z66.string().min(1).optional(),
8755
+ slack_team_id: z66.string().optional(),
8676
8756
  discovery_mode: teamDiscoveryModeSchema.optional()
8677
8757
  });
8678
- var teamApiSchema = z67.object({
8679
- id: z67.guid(),
8680
- name: z67.string(),
8681
- created_at: z67.string(),
8682
- organization_id: z67.guid().nullable(),
8683
- slack_team_id: z67.string().nullable(),
8758
+ var teamApiSchema = z66.object({
8759
+ id: z66.guid(),
8760
+ name: z66.string(),
8761
+ created_at: z66.string(),
8762
+ organization_id: z66.guid().nullable(),
8763
+ slack_team_id: z66.string().nullable(),
8684
8764
  discovery_mode: teamDiscoveryModeSchema
8685
8765
  });
8686
8766
  var TEAM_CONFIG_VERSION = 1;
8687
- var teamConfigDataSchema = z67.object({
8767
+ var teamConfigDataSchema = z66.object({
8688
8768
  browserProviderOverride: BrowserProviderTypeSchema.nullable().optional(),
8689
8769
  // Egress identity (proxy country) — what the target site sees.
8690
8770
  browserLocationOverride: BrowserLocationSchema.nullable().optional(),
@@ -8695,182 +8775,182 @@ var teamConfigDataSchema = z67.object({
8695
8775
  // Kept optional so existing v1 rows still parse; the resolver reads the new
8696
8776
  // fields first and falls back to these. Do not surface in the UI.
8697
8777
  browserRegionOverride: BrowserRegionSchema.nullable().optional(),
8698
- sessionRecordingOverride: z67.boolean().nullable().optional()
8778
+ sessionRecordingOverride: z66.boolean().nullable().optional()
8699
8779
  });
8700
- var teamConfigSchema = z67.object({
8701
- version: z67.literal(TEAM_CONFIG_VERSION),
8780
+ var teamConfigSchema = z66.object({
8781
+ version: z66.literal(TEAM_CONFIG_VERSION),
8702
8782
  data: teamConfigDataSchema
8703
8783
  });
8704
- var listTeamInvitesResponseSchema = z67.object({
8705
- invitations: z67.array(teamInvitationApiSchema)
8784
+ var listTeamInvitesResponseSchema = z66.object({
8785
+ invitations: z66.array(teamInvitationApiSchema)
8706
8786
  });
8707
- var teamInsightsCopilotSchema = z68.object({
8708
- id: z68.guid(),
8709
- name: z68.string(),
8710
- teamName: z68.string().nullable().optional(),
8711
- created_at: z68.string().nullable(),
8712
- updated_at: z68.string().nullable(),
8713
- team_id: z68.string().nullable(),
8714
- thread_id: z68.string().nullable(),
8715
- slack_enabled: z68.boolean().nullable()
8716
- });
8717
- var teamInsightsUserProfileSchema = z68.object({
8718
- id: z68.guid(),
8719
- name: z68.string().nullable(),
8720
- email: z68.string()
8787
+ var teamInsightsCopilotSchema = z67.object({
8788
+ id: z67.guid(),
8789
+ name: z67.string(),
8790
+ teamName: z67.string().nullable().optional(),
8791
+ created_at: z67.string().nullable(),
8792
+ updated_at: z67.string().nullable(),
8793
+ team_id: z67.string().nullable(),
8794
+ thread_id: z67.string().nullable(),
8795
+ slack_enabled: z67.boolean().nullable()
8796
+ });
8797
+ var teamInsightsUserProfileSchema = z67.object({
8798
+ id: z67.guid(),
8799
+ name: z67.string().nullable(),
8800
+ email: z67.string()
8721
8801
  });
8722
8802
  var teamInsightsUserUsageSchema = teamInsightsUserProfileSchema.extend(
8723
8803
  {
8724
- runCount: z68.number(),
8725
- lastRun: z68.string().nullable()
8804
+ runCount: z67.number(),
8805
+ lastRun: z67.string().nullable()
8726
8806
  }
8727
8807
  );
8728
- var teamInsightsMetricSourceSchema = z68.object({
8808
+ var teamInsightsMetricSourceSchema = z67.object({
8729
8809
  source: agentRunSourceSchema,
8730
- runsTotal: z68.number(),
8731
- completedRuns: z68.number()
8810
+ runsTotal: z67.number(),
8811
+ completedRuns: z67.number()
8732
8812
  });
8733
8813
  var teamInsightsCopilotWithRunsSchema = teamInsightsCopilotSchema.extend({
8734
- integrations: z68.array(z68.string()),
8735
- uniqueUsersCount: z68.number(),
8736
- users: z68.array(teamInsightsUserUsageSchema),
8737
- totalRuns: z68.number(),
8738
- completedRuns: z68.number(),
8739
- totalTimeSpentMs: z68.number(),
8740
- averageTimeSpentMs: z68.number(),
8741
- completedRunsWithTiming: z68.number(),
8742
- sources: z68.array(teamInsightsMetricSourceSchema)
8743
- });
8744
- var teamInsightsAgentsRunResponseSchema = z68.object({
8745
- data: z68.array(teamInsightsCopilotWithRunsSchema),
8746
- total: z68.number()
8747
- });
8748
- var teamInsightsMetricsResponseSchema = z68.object({
8749
- runsTotal: z68.number(),
8750
- completedRuns: z68.number(),
8751
- sources: z68.array(teamInsightsMetricSourceSchema)
8752
- });
8753
- var teamInsightsUserAgentRunSchema = z68.object({
8754
- id: z68.guid(),
8755
- created_at: z68.string(),
8756
- updated_at: z68.string(),
8757
- agent_id: z68.guid(),
8758
- agent_name: z68.string(),
8759
- build_id: z68.guid(),
8760
- source: z68.string().nullable(),
8761
- started_at: z68.string().nullable(),
8762
- completed_at: z68.string().nullable()
8763
- });
8764
- var teamInsightsAgentSchema = z68.object({
8765
- id: z68.guid(),
8766
- name: z68.string(),
8767
- teamName: z68.string().nullable().optional(),
8768
- runs: z68.array(teamInsightsUserAgentRunSchema)
8814
+ integrations: z67.array(z67.string()),
8815
+ uniqueUsersCount: z67.number(),
8816
+ users: z67.array(teamInsightsUserUsageSchema),
8817
+ totalRuns: z67.number(),
8818
+ completedRuns: z67.number(),
8819
+ totalTimeSpentMs: z67.number(),
8820
+ averageTimeSpentMs: z67.number(),
8821
+ completedRunsWithTiming: z67.number(),
8822
+ sources: z67.array(teamInsightsMetricSourceSchema)
8823
+ });
8824
+ var teamInsightsAgentsRunResponseSchema = z67.object({
8825
+ data: z67.array(teamInsightsCopilotWithRunsSchema),
8826
+ total: z67.number()
8827
+ });
8828
+ var teamInsightsMetricsResponseSchema = z67.object({
8829
+ runsTotal: z67.number(),
8830
+ completedRuns: z67.number(),
8831
+ sources: z67.array(teamInsightsMetricSourceSchema)
8832
+ });
8833
+ var teamInsightsUserAgentRunSchema = z67.object({
8834
+ id: z67.guid(),
8835
+ created_at: z67.string(),
8836
+ updated_at: z67.string(),
8837
+ agent_id: z67.guid(),
8838
+ agent_name: z67.string(),
8839
+ build_id: z67.guid(),
8840
+ source: z67.string().nullable(),
8841
+ started_at: z67.string().nullable(),
8842
+ completed_at: z67.string().nullable()
8843
+ });
8844
+ var teamInsightsAgentSchema = z67.object({
8845
+ id: z67.guid(),
8846
+ name: z67.string(),
8847
+ teamName: z67.string().nullable().optional(),
8848
+ runs: z67.array(teamInsightsUserAgentRunSchema)
8769
8849
  });
8770
8850
  var teamInsightsUserWithAgentsAndRunsSchema = teamInsightsUserProfileSchema.extend({
8771
- agents: z68.array(teamInsightsAgentSchema),
8772
- runs: z68.array(teamInsightsUserAgentRunSchema),
8773
- totalRuns: z68.number()
8774
- });
8775
- var teamInsightsUsersResponseSchema = z68.object({
8776
- data: z68.array(teamInsightsUserWithAgentsAndRunsSchema),
8777
- total: z68.number()
8778
- });
8779
- var guardrailsAuthorSchema = z69.object({
8780
- id: z69.guid(),
8781
- name: z69.string().nullable(),
8782
- email: z69.email()
8783
- });
8784
- var guardrailsRevisionSchema = z69.object({
8785
- id: z69.guid(),
8786
- teamId: z69.guid(),
8787
- guardrailsText: z69.string().nullable(),
8788
- blockedDomains: z69.array(z69.string()),
8789
- createdAt: z69.string(),
8851
+ agents: z67.array(teamInsightsAgentSchema),
8852
+ runs: z67.array(teamInsightsUserAgentRunSchema),
8853
+ totalRuns: z67.number()
8854
+ });
8855
+ var teamInsightsUsersResponseSchema = z67.object({
8856
+ data: z67.array(teamInsightsUserWithAgentsAndRunsSchema),
8857
+ total: z67.number()
8858
+ });
8859
+ var guardrailsAuthorSchema = z68.object({
8860
+ id: z68.guid(),
8861
+ name: z68.string().nullable(),
8862
+ email: z68.email()
8863
+ });
8864
+ var guardrailsRevisionSchema = z68.object({
8865
+ id: z68.guid(),
8866
+ teamId: z68.guid(),
8867
+ guardrailsText: z68.string().nullable(),
8868
+ blockedDomains: z68.array(z68.string()),
8869
+ createdAt: z68.string(),
8790
8870
  createdBy: guardrailsAuthorSchema
8791
8871
  });
8792
- var getTeamGuardrailsResponseSchema = z69.object({
8872
+ var getTeamGuardrailsResponseSchema = z68.object({
8793
8873
  current: guardrailsRevisionSchema.nullable()
8794
8874
  });
8795
- var listTeamGuardrailsRevisionsQuerySchema = z69.object({
8796
- limit: z69.coerce.number().int().min(1).max(100).default(20),
8797
- offset: z69.coerce.number().int().min(0).default(0)
8875
+ var listTeamGuardrailsRevisionsQuerySchema = z68.object({
8876
+ limit: z68.coerce.number().int().min(1).max(100).default(20),
8877
+ offset: z68.coerce.number().int().min(0).default(0)
8798
8878
  });
8799
- var listTeamGuardrailsRevisionsResponseSchema = z69.object({
8800
- revisions: z69.array(guardrailsRevisionSchema),
8801
- total: z69.number().int().nonnegative()
8879
+ var listTeamGuardrailsRevisionsResponseSchema = z68.object({
8880
+ revisions: z68.array(guardrailsRevisionSchema),
8881
+ total: z68.number().int().nonnegative()
8802
8882
  });
8803
- var createTeamGuardrailsRevisionRequestSchema = z69.object({
8804
- guardrailsText: z69.string().max(MAX_GUARDRAILS_TEXT_LENGTH).nullable().transform((value) => value && value.trim().length > 0 ? value : null),
8805
- blockedDomains: z69.array(z69.string()).max(MAX_BLOCKED_DOMAINS)
8883
+ var createTeamGuardrailsRevisionRequestSchema = z68.object({
8884
+ guardrailsText: z68.string().max(MAX_GUARDRAILS_TEXT_LENGTH).nullable().transform((value) => value && value.trim().length > 0 ? value : null),
8885
+ blockedDomains: z68.array(z68.string()).max(MAX_BLOCKED_DOMAINS)
8806
8886
  });
8807
- var userDismissalListResponseSchema = z70.object({
8808
- data: z70.array(z70.string())
8887
+ var userDismissalListResponseSchema = z69.object({
8888
+ data: z69.array(z69.string())
8809
8889
  });
8810
- var userDismissalMutationSchema = z70.object({
8811
- elementKey: z70.string()
8890
+ var userDismissalMutationSchema = z69.object({
8891
+ elementKey: z69.string()
8812
8892
  });
8813
8893
  var PASSWORD_MIN = 1;
8814
8894
  var PASSWORD_MAX = 1024;
8815
8895
  var NAME_MAX = 200;
8816
8896
  var URL_MAX = 500;
8817
8897
  var USERNAME_MAX = 200;
8818
- var vpnProxyConfigSummarySchema = z71.object({
8819
- id: z71.guid(),
8820
- name: z71.string(),
8821
- server: z71.string(),
8822
- username: z71.string(),
8823
- enabled: z71.boolean(),
8824
- passwordSet: z71.boolean(),
8825
- organizationCount: z71.number().int().nonnegative(),
8826
- createdAt: z71.string(),
8827
- updatedAt: z71.string()
8828
- });
8829
- var vpnProxyConfigListResponseSchema = z71.object({
8830
- configs: z71.array(vpnProxyConfigSummarySchema)
8831
- });
8832
- var vpnProxyConfigCreateRequestSchema = z71.object({
8833
- name: z71.string().trim().min(1).max(NAME_MAX),
8834
- server: z71.string().trim().min(1).max(URL_MAX).url(),
8835
- username: z71.string().trim().min(1).max(USERNAME_MAX),
8836
- password: z71.string().min(PASSWORD_MIN).max(PASSWORD_MAX),
8837
- enabled: z71.boolean().prefault(true)
8838
- });
8839
- var vpnProxyConfigCreateResponseSchema = z71.object({
8898
+ var vpnProxyConfigSummarySchema = z70.object({
8899
+ id: z70.guid(),
8900
+ name: z70.string(),
8901
+ server: z70.string(),
8902
+ username: z70.string(),
8903
+ enabled: z70.boolean(),
8904
+ passwordSet: z70.boolean(),
8905
+ organizationCount: z70.number().int().nonnegative(),
8906
+ createdAt: z70.string(),
8907
+ updatedAt: z70.string()
8908
+ });
8909
+ var vpnProxyConfigListResponseSchema = z70.object({
8910
+ configs: z70.array(vpnProxyConfigSummarySchema)
8911
+ });
8912
+ var vpnProxyConfigCreateRequestSchema = z70.object({
8913
+ name: z70.string().trim().min(1).max(NAME_MAX),
8914
+ server: z70.string().trim().min(1).max(URL_MAX).url(),
8915
+ username: z70.string().trim().min(1).max(USERNAME_MAX),
8916
+ password: z70.string().min(PASSWORD_MIN).max(PASSWORD_MAX),
8917
+ enabled: z70.boolean().prefault(true)
8918
+ });
8919
+ var vpnProxyConfigCreateResponseSchema = z70.object({
8840
8920
  config: vpnProxyConfigSummarySchema
8841
8921
  });
8842
- var vpnProxyConfigUpdateRequestSchema = z71.object({
8843
- name: z71.string().trim().min(1).max(NAME_MAX).optional(),
8844
- server: z71.string().trim().min(1).max(URL_MAX).url().optional(),
8845
- username: z71.string().trim().min(1).max(USERNAME_MAX).optional(),
8846
- password: z71.string().min(PASSWORD_MIN).max(PASSWORD_MAX).optional(),
8847
- enabled: z71.boolean().optional()
8922
+ var vpnProxyConfigUpdateRequestSchema = z70.object({
8923
+ name: z70.string().trim().min(1).max(NAME_MAX).optional(),
8924
+ server: z70.string().trim().min(1).max(URL_MAX).url().optional(),
8925
+ username: z70.string().trim().min(1).max(USERNAME_MAX).optional(),
8926
+ password: z70.string().min(PASSWORD_MIN).max(PASSWORD_MAX).optional(),
8927
+ enabled: z70.boolean().optional()
8848
8928
  });
8849
- var vpnProxyConfigUpdateResponseSchema = z71.object({
8929
+ var vpnProxyConfigUpdateResponseSchema = z70.object({
8850
8930
  config: vpnProxyConfigSummarySchema
8851
8931
  });
8852
- var vpnProxyConfigDeleteResponseSchema = z71.object({
8853
- success: z71.literal(true)
8932
+ var vpnProxyConfigDeleteResponseSchema = z70.object({
8933
+ success: z70.literal(true)
8854
8934
  });
8855
- var vpnProxyConfigOrganizationSchema = z71.object({
8856
- id: z71.guid(),
8857
- organizationId: z71.guid(),
8858
- organizationName: z71.string(),
8859
- attachedAt: z71.string()
8935
+ var vpnProxyConfigOrganizationSchema = z70.object({
8936
+ id: z70.guid(),
8937
+ organizationId: z70.guid(),
8938
+ organizationName: z70.string(),
8939
+ attachedAt: z70.string()
8860
8940
  });
8861
- var vpnProxyConfigOrganizationListResponseSchema = z71.object({
8862
- organizations: z71.array(vpnProxyConfigOrganizationSchema)
8941
+ var vpnProxyConfigOrganizationListResponseSchema = z70.object({
8942
+ organizations: z70.array(vpnProxyConfigOrganizationSchema)
8863
8943
  });
8864
- var vpnProxyConfigAttachOrganizationRequestSchema = z71.object({
8865
- organizationId: z71.guid()
8944
+ var vpnProxyConfigAttachOrganizationRequestSchema = z70.object({
8945
+ organizationId: z70.guid()
8866
8946
  });
8867
- var vpnProxyConfigAttachOrganizationResponseSchema = z71.object({
8947
+ var vpnProxyConfigAttachOrganizationResponseSchema = z70.object({
8868
8948
  attachment: vpnProxyConfigOrganizationSchema
8869
8949
  });
8870
- var vpnProxyConfigDetachOrganizationResponseSchema = z71.object({
8871
- success: z71.literal(true)
8950
+ var vpnProxyConfigDetachOrganizationResponseSchema = z70.object({
8951
+ success: z70.literal(true)
8872
8952
  });
8873
- var vpnProxyConfigForOrganizationResponseSchema = z71.object({
8953
+ var vpnProxyConfigForOrganizationResponseSchema = z70.object({
8874
8954
  config: vpnProxyConfigSummarySchema.nullable()
8875
8955
  });
8876
8956
  function canonicalizeSopInput(config) {
@@ -8891,7 +8971,7 @@ function canonicalizeSopInput(config) {
8891
8971
  }
8892
8972
  __name(canonicalizeSopInput, "canonicalizeSopInput");
8893
8973
  __name2(canonicalizeSopInput, "canonicalizeSopInput");
8894
- var caseFilterStatusSchema = z72.enum([
8974
+ var caseFilterStatusSchema = z71.enum([
8895
8975
  "pending",
8896
8976
  "claimed",
8897
8977
  "completed",
@@ -8899,19 +8979,19 @@ var caseFilterStatusSchema = z72.enum([
8899
8979
  "needs_input",
8900
8980
  "postponed"
8901
8981
  ]);
8902
- var casesFiltersSchema = z72.object({
8903
- status: z72.array(caseFilterStatusSchema).optional(),
8904
- created_at_from: z72.string().optional(),
8905
- updated_at_from: z72.string().optional(),
8906
- labels: z72.record(z72.string(), z72.array(z72.string())).optional()
8982
+ var casesFiltersSchema = z71.object({
8983
+ status: z71.array(caseFilterStatusSchema).optional(),
8984
+ created_at_from: z71.string().optional(),
8985
+ updated_at_from: z71.string().optional(),
8986
+ labels: z71.record(z71.string(), z71.array(z71.string())).optional()
8907
8987
  });
8908
- var casesListRequestBodySchema = z72.object({
8988
+ var casesListRequestBodySchema = z71.object({
8909
8989
  filters: casesFiltersSchema.default({}),
8910
- limit: z72.int().min(1).max(100).default(25),
8911
- offset: z72.int().min(0).default(0),
8912
- sort_by: z72.enum(["created_at", "updated_at", "postponed_to"]).default("created_at"),
8913
- sort_order: z72.enum(["asc", "desc"]).default("desc"),
8914
- search: z72.string().optional()
8990
+ limit: z71.int().min(1).max(100).default(25),
8991
+ offset: z71.int().min(0).default(0),
8992
+ sort_by: z71.enum(["created_at", "updated_at", "postponed_to"]).default("created_at"),
8993
+ sort_order: z71.enum(["asc", "desc"]).default("desc"),
8994
+ search: z71.string().optional()
8915
8995
  });
8916
8996
  function toBase64(input) {
8917
8997
  if (typeof btoa === "function") {
@@ -9006,7 +9086,7 @@ function setFilterValuesByCategoryKey(filters, categoryKey, values) {
9006
9086
  const { status: _, ...rest } = filters;
9007
9087
  return rest;
9008
9088
  }
9009
- const parsed = z72.array(caseFilterStatusSchema).safeParse(values);
9089
+ const parsed = z71.array(caseFilterStatusSchema).safeParse(values);
9010
9090
  if (!parsed.success) {
9011
9091
  return filters;
9012
9092
  }
@@ -9252,6 +9332,91 @@ function safeParseJson(input, log2, schema) {
9252
9332
  }
9253
9333
  __name(safeParseJson, "safeParseJson");
9254
9334
  __name2(safeParseJson, "safeParseJson");
9335
+ var QUEUE_MENTION_REGEX_SOURCE = `<DUVO:QUEUE\\s+id="((?:[^"\\\\]|\\\\.)*)"\\s+name="((?:[^"\\\\]|\\\\.)*)">`;
9336
+ function escapeAttrValue(value) {
9337
+ return value.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
9338
+ }
9339
+ __name(escapeAttrValue, "escapeAttrValue");
9340
+ __name2(escapeAttrValue, "escapeAttrValue");
9341
+ function unescapeAttrValue2(value) {
9342
+ return value.replace(/\\(.)/g, "$1");
9343
+ }
9344
+ __name(unescapeAttrValue2, "unescapeAttrValue2");
9345
+ __name2(unescapeAttrValue2, "unescapeAttrValue");
9346
+ function createQueueMentionRegex() {
9347
+ return new RegExp(QUEUE_MENTION_REGEX_SOURCE, "g");
9348
+ }
9349
+ __name(createQueueMentionRegex, "createQueueMentionRegex");
9350
+ __name2(createQueueMentionRegex, "createQueueMentionRegex");
9351
+ function serializeQueueMention(id, name) {
9352
+ return `<DUVO:QUEUE id="${escapeAttrValue(id)}" name="${escapeAttrValue(name)}">`;
9353
+ }
9354
+ __name(serializeQueueMention, "serializeQueueMention");
9355
+ __name2(serializeQueueMention, "serializeQueueMention");
9356
+ function parseQueueMentionSegments(text3) {
9357
+ if (!text3) {
9358
+ return [];
9359
+ }
9360
+ const segments = [];
9361
+ let lastIndex = 0;
9362
+ for (const match of text3.matchAll(createQueueMentionRegex())) {
9363
+ const matchStart = match.index ?? 0;
9364
+ if (matchStart > lastIndex) {
9365
+ segments.push({ type: "text", value: text3.slice(lastIndex, matchStart) });
9366
+ }
9367
+ segments.push({
9368
+ type: "mention",
9369
+ id: unescapeAttrValue2(match[1]),
9370
+ name: unescapeAttrValue2(match[2])
9371
+ });
9372
+ lastIndex = matchStart + match[0].length;
9373
+ }
9374
+ if (lastIndex < text3.length) {
9375
+ segments.push({ type: "text", value: text3.slice(lastIndex) });
9376
+ }
9377
+ return segments;
9378
+ }
9379
+ __name(parseQueueMentionSegments, "parseQueueMentionSegments");
9380
+ __name2(parseQueueMentionSegments, "parseQueueMentionSegments");
9381
+ function extractQueueMentions(text3) {
9382
+ if (!text3) {
9383
+ return [];
9384
+ }
9385
+ const seen = /* @__PURE__ */ new Set();
9386
+ const mentions = [];
9387
+ for (const match of text3.matchAll(createQueueMentionRegex())) {
9388
+ const id = unescapeAttrValue2(match[1]);
9389
+ if (seen.has(id)) {
9390
+ continue;
9391
+ }
9392
+ seen.add(id);
9393
+ mentions.push({ id, name: unescapeAttrValue2(match[2]) });
9394
+ }
9395
+ return mentions;
9396
+ }
9397
+ __name(extractQueueMentions, "extractQueueMentions");
9398
+ __name2(extractQueueMentions, "extractQueueMentions");
9399
+ function textContainsQueueMention(text3) {
9400
+ if (!text3) {
9401
+ return false;
9402
+ }
9403
+ return createQueueMentionRegex().test(text3);
9404
+ }
9405
+ __name(textContainsQueueMention, "textContainsQueueMention");
9406
+ __name2(textContainsQueueMention, "textContainsQueueMention");
9407
+ function formatQueueMentionsAsText(text3) {
9408
+ if (!text3) {
9409
+ return text3;
9410
+ }
9411
+ return text3.replace(
9412
+ createQueueMentionRegex(),
9413
+ (_match, _id, name) => {
9414
+ return `@${unescapeAttrValue2(name)}`;
9415
+ }
9416
+ );
9417
+ }
9418
+ __name(formatQueueMentionsAsText, "formatQueueMentionsAsText");
9419
+ __name2(formatQueueMentionsAsText, "formatQueueMentionsAsText");
9255
9420
  var BASE_HUES = [0, 30, 50, 90, 145, 175, 215, 270, 330];
9256
9421
  function isLabelHue(value) {
9257
9422
  return BASE_HUES.includes(value);
@@ -10146,11 +10311,11 @@ function emptyConfig() {
10146
10311
  __name(emptyConfig, "emptyConfig");
10147
10312
 
10148
10313
  // src/config/env.ts
10149
- import { z as z73 } from "zod";
10150
- var optionalEnvString = z73.string().optional().transform(
10314
+ import { z as z72 } from "zod";
10315
+ var optionalEnvString = z72.string().optional().transform(
10151
10316
  (value) => value === void 0 || value === "" ? void 0 : value
10152
10317
  );
10153
- var CliEnvSchema = z73.object({
10318
+ var CliEnvSchema = z72.object({
10154
10319
  DUVO_PROFILE: optionalEnvString,
10155
10320
  DUVO_API_KEY: optionalEnvString,
10156
10321
  DUVO_API_BASE_URL: optionalEnvString,
@@ -10646,9 +10811,9 @@ async function requireAuthenticatedConfig(command) {
10646
10811
  __name(requireAuthenticatedConfig, "requireAuthenticatedConfig");
10647
10812
 
10648
10813
  // src/commands/shared/team-context.ts
10649
- import { z as z74 } from "zod";
10650
- var teamSchema = z74.object({ id: z74.string() });
10651
- var listMyTeamsResponseSchema = z74.object({ teams: z74.array(teamSchema) });
10814
+ import { z as z73 } from "zod";
10815
+ var teamSchema = z73.object({ id: z73.string() });
10816
+ var listMyTeamsResponseSchema = z73.object({ teams: z73.array(teamSchema) });
10652
10817
  async function resolveRequiredTeamId(config, options = {}) {
10653
10818
  if (options.override) {
10654
10819
  return options.override;
@@ -11436,56 +11601,56 @@ import { readFile as readFile2 } from "node:fs/promises";
11436
11601
  import { confirm as confirm2, isCancel as isCancel2, text } from "@clack/prompts";
11437
11602
 
11438
11603
  // src/api/agent-schemas.ts
11439
- import { z as z76 } from "zod";
11604
+ import { z as z75 } from "zod";
11440
11605
 
11441
11606
  // src/api/json-value.ts
11442
- import { z as z75 } from "zod";
11443
- var jsonValueSchema = z75.lazy(
11444
- () => z75.union([
11445
- z75.string(),
11446
- z75.number(),
11447
- z75.boolean(),
11448
- z75.null(),
11449
- z75.array(jsonValueSchema),
11450
- z75.record(z75.string(), jsonValueSchema)
11607
+ import { z as z74 } from "zod";
11608
+ var jsonValueSchema = z74.lazy(
11609
+ () => z74.union([
11610
+ z74.string(),
11611
+ z74.number(),
11612
+ z74.boolean(),
11613
+ z74.null(),
11614
+ z74.array(jsonValueSchema),
11615
+ z74.record(z74.string(), jsonValueSchema)
11451
11616
  ])
11452
11617
  );
11453
11618
 
11454
11619
  // src/api/agent-schemas.ts
11455
- var publicAgentSchema = z76.object({
11456
- id: z76.string(),
11457
- name: z76.string(),
11458
- slack_enabled: z76.boolean().nullish(),
11459
- microsoft_teams_enabled: z76.boolean().nullish(),
11460
- agentic_memory_enabled: z76.boolean().nullish(),
11461
- thread_id: z76.string().nullish(),
11462
- created_at: z76.string().nullish(),
11463
- updated_at: z76.string().nullish(),
11464
- latest_build: z76.object({ config: jsonValueSchema.nullish() }).nullish()
11465
- });
11466
- var publicBuildSchema = z76.object({
11467
- id: z76.string(),
11468
- agent_id: z76.string(),
11469
- name: z76.string(),
11470
- revision_number: z76.number().nullish(),
11471
- created_at: z76.string().nullish(),
11472
- updated_at: z76.string().nullish()
11473
- });
11474
- var listAgentsResponseSchema = z76.object({
11475
- agents: z76.array(publicAgentSchema),
11476
- total: z76.number().nullish(),
11477
- limit: z76.number().nullish(),
11478
- offset: z76.number().nullish()
11479
- });
11480
- var getAgentResponseSchema = z76.object({
11620
+ var publicAgentSchema = z75.object({
11621
+ id: z75.string(),
11622
+ name: z75.string(),
11623
+ slack_enabled: z75.boolean().nullish(),
11624
+ microsoft_teams_enabled: z75.boolean().nullish(),
11625
+ agentic_memory_enabled: z75.boolean().nullish(),
11626
+ thread_id: z75.string().nullish(),
11627
+ created_at: z75.string().nullish(),
11628
+ updated_at: z75.string().nullish(),
11629
+ latest_build: z75.object({ config: jsonValueSchema.nullish() }).nullish()
11630
+ });
11631
+ var publicBuildSchema = z75.object({
11632
+ id: z75.string(),
11633
+ agent_id: z75.string(),
11634
+ name: z75.string(),
11635
+ revision_number: z75.number().nullish(),
11636
+ created_at: z75.string().nullish(),
11637
+ updated_at: z75.string().nullish()
11638
+ });
11639
+ var listAgentsResponseSchema = z75.object({
11640
+ agents: z75.array(publicAgentSchema),
11641
+ total: z75.number().nullish(),
11642
+ limit: z75.number().nullish(),
11643
+ offset: z75.number().nullish()
11644
+ });
11645
+ var getAgentResponseSchema = z75.object({
11481
11646
  agent: publicAgentSchema
11482
11647
  });
11483
- var createAgentResponseSchema = z76.object({
11648
+ var createAgentResponseSchema = z75.object({
11484
11649
  agent: publicAgentSchema,
11485
11650
  build: publicBuildSchema.optional()
11486
11651
  });
11487
- var deleteAgentResponseSchema = z76.object({
11488
- success: z76.literal(true)
11652
+ var deleteAgentResponseSchema = z75.object({
11653
+ success: z75.literal(true)
11489
11654
  });
11490
11655
  var buildConfigSchema = StoredAgentConfigSchemaV2;
11491
11656
  var DEFAULT_NEW_AGENT_NAME = DEFAULT_AGENT_NAME;
@@ -11935,29 +12100,29 @@ function registerAgentsEvalScores(agents) {
11935
12100
  __name(registerAgentsEvalScores, "registerAgentsEvalScores");
11936
12101
 
11937
12102
  // src/api/build-schemas.ts
11938
- import { z as z77 } from "zod";
11939
- var publicBuildSchema2 = z77.object({
11940
- id: z77.string(),
11941
- agent_id: z77.string(),
11942
- name: z77.string(),
11943
- status: z77.string().nullish(),
12103
+ import { z as z76 } from "zod";
12104
+ var publicBuildSchema2 = z76.object({
12105
+ id: z76.string(),
12106
+ agent_id: z76.string(),
12107
+ name: z76.string(),
12108
+ status: z76.string().nullish(),
11944
12109
  config: jsonValueSchema.nullish(),
11945
- revision_number: z77.number().nullish(),
11946
- created_at: z77.string().nullish(),
11947
- updated_at: z77.string().nullish()
12110
+ revision_number: z76.number().nullish(),
12111
+ created_at: z76.string().nullish(),
12112
+ updated_at: z76.string().nullish()
11948
12113
  });
11949
- var listBuildsResponseSchema2 = z77.object({
11950
- builds: z77.array(publicBuildSchema2),
11951
- total: z77.number().nullish(),
11952
- limit: z77.number().nullish(),
11953
- offset: z77.number().nullish()
12114
+ var listBuildsResponseSchema2 = z76.object({
12115
+ builds: z76.array(publicBuildSchema2),
12116
+ total: z76.number().nullish(),
12117
+ limit: z76.number().nullish(),
12118
+ offset: z76.number().nullish()
11954
12119
  });
11955
- var getBuildResponseSchema = z77.object({
12120
+ var getBuildResponseSchema = z76.object({
11956
12121
  build: publicBuildSchema2
11957
12122
  });
11958
- var createBuildResponseSchema = z77.object({
12123
+ var createBuildResponseSchema = z76.object({
11959
12124
  build: publicBuildSchema2,
11960
- agent: z77.object({ id: z77.string() })
12125
+ agent: z76.object({ id: z76.string() })
11961
12126
  });
11962
12127
 
11963
12128
  // src/commands/agents/get.ts
@@ -12207,30 +12372,30 @@ function registerAgentsModels(agents) {
12207
12372
  __name(registerAgentsModels, "registerAgentsModels");
12208
12373
 
12209
12374
  // src/api/schedule-schemas.ts
12210
- import { z as z78 } from "zod";
12211
- var publicScheduleSchema = z78.object({
12212
- id: z78.string(),
12213
- build_id: z78.string(),
12214
- agent_id: z78.string(),
12215
- user_id: z78.string(),
12216
- enabled: z78.boolean(),
12217
- frequency: z78.string(),
12218
- time: z78.string().nullish(),
12219
- timezone: z78.string(),
12220
- day: z78.string().nullish(),
12221
- day_of_month: z78.number().nullish(),
12222
- cron: z78.string().nullish(),
12223
- source: z78.string().nullish(),
12224
- task: z78.string().nullish(),
12225
- recurring: z78.boolean().nullish(),
12226
- created_at: z78.string(),
12227
- updated_at: z78.string()
12228
- });
12229
- var listSchedulesResponseSchema = z78.object({
12230
- schedules: z78.array(publicScheduleSchema)
12231
- });
12232
- var deleteScheduleResponseSchema = z78.object({
12233
- success: z78.literal(true)
12375
+ import { z as z77 } from "zod";
12376
+ var publicScheduleSchema = z77.object({
12377
+ id: z77.string(),
12378
+ build_id: z77.string(),
12379
+ agent_id: z77.string(),
12380
+ user_id: z77.string(),
12381
+ enabled: z77.boolean(),
12382
+ frequency: z77.string(),
12383
+ time: z77.string().nullish(),
12384
+ timezone: z77.string(),
12385
+ day: z77.string().nullish(),
12386
+ day_of_month: z77.number().nullish(),
12387
+ cron: z77.string().nullish(),
12388
+ source: z77.string().nullish(),
12389
+ task: z77.string().nullish(),
12390
+ recurring: z77.boolean().nullish(),
12391
+ created_at: z77.string(),
12392
+ updated_at: z77.string()
12393
+ });
12394
+ var listSchedulesResponseSchema = z77.object({
12395
+ schedules: z77.array(publicScheduleSchema)
12396
+ });
12397
+ var deleteScheduleResponseSchema = z77.object({
12398
+ success: z77.literal(true)
12234
12399
  });
12235
12400
 
12236
12401
  // src/commands/agents/schedules/render-schedule.ts
@@ -12678,33 +12843,33 @@ function registerAgentsSetModel(agents) {
12678
12843
  __name(registerAgentsSetModel, "registerAgentsSetModel");
12679
12844
 
12680
12845
  // src/api/trigger-schemas.ts
12681
- import { z as z79 } from "zod";
12682
- var triggerSchema = z79.object({
12683
- id: z79.string(),
12684
- agent_id: z79.string(),
12685
- user_id: z79.string(),
12686
- integration_slug: z79.string(),
12687
- trigger_type: z79.string(),
12688
- filter_config: z79.record(z79.string(), z79.unknown()),
12689
- integration_instance_id: z79.string(),
12690
- enabled: z79.boolean(),
12691
- created_at: z79.string(),
12692
- updated_at: z79.string()
12846
+ import { z as z78 } from "zod";
12847
+ var triggerSchema = z78.object({
12848
+ id: z78.string(),
12849
+ agent_id: z78.string(),
12850
+ user_id: z78.string(),
12851
+ integration_slug: z78.string(),
12852
+ trigger_type: z78.string(),
12853
+ filter_config: z78.record(z78.string(), z78.unknown()),
12854
+ integration_instance_id: z78.string(),
12855
+ enabled: z78.boolean(),
12856
+ created_at: z78.string(),
12857
+ updated_at: z78.string()
12693
12858
  });
12694
- var listTriggersResponseSchema = z79.object({
12695
- triggers: z79.array(triggerSchema)
12859
+ var listTriggersResponseSchema = z78.object({
12860
+ triggers: z78.array(triggerSchema)
12696
12861
  });
12697
- var triggerTypeSchema = z79.object({
12698
- integration_slug: z79.string(),
12699
- integration_name: z79.string(),
12700
- icon_url: z79.string(),
12701
- trigger_type: z79.string(),
12702
- label: z79.string(),
12703
- description: z79.string(),
12704
- filter_schema: z79.record(z79.string(), z79.unknown())
12862
+ var triggerTypeSchema = z78.object({
12863
+ integration_slug: z78.string(),
12864
+ integration_name: z78.string(),
12865
+ icon_url: z78.string(),
12866
+ trigger_type: z78.string(),
12867
+ label: z78.string(),
12868
+ description: z78.string(),
12869
+ filter_schema: z78.record(z78.string(), z78.unknown())
12705
12870
  });
12706
- var listTriggerTypesResponseSchema = z79.object({
12707
- trigger_types: z79.array(triggerTypeSchema)
12871
+ var listTriggerTypesResponseSchema = z78.object({
12872
+ trigger_types: z78.array(triggerTypeSchema)
12708
12873
  });
12709
12874
 
12710
12875
  // src/commands/agents/triggers/list.ts
@@ -13328,55 +13493,55 @@ function fieldsToSearchParams(fields) {
13328
13493
  __name(fieldsToSearchParams, "fieldsToSearchParams");
13329
13494
 
13330
13495
  // src/api/integration-schemas.ts
13331
- import { z as z80 } from "zod";
13332
- var integrationSchema = z80.object({
13333
- id: z80.string(),
13334
- name: z80.string(),
13335
- type: z80.string(),
13336
- provider: z80.string(),
13337
- user_id: z80.string().nullable(),
13338
- team_id: z80.string(),
13339
- server_url: z80.string().optional(),
13340
- transport_type: z80.string().optional(),
13341
- auth_method: z80.string().nullish(),
13342
- composio_mcp_id: z80.string().nullish(),
13343
- custom_integration_id: z80.string().nullish(),
13344
- icon_url: z80.string().nullish(),
13345
- oauth_provider: z80.string().nullish(),
13346
- oauth_provider_key: z80.string().nullish(),
13347
- oauth_scopes: z80.array(z80.string()).nullish(),
13348
- integration_id: z80.string().nullish(),
13349
- created_at: z80.string(),
13350
- updated_at: z80.string()
13351
- });
13352
- var integrationsListResponseSchema2 = z80.object({
13353
- integrations: z80.array(integrationSchema)
13496
+ import { z as z79 } from "zod";
13497
+ var integrationSchema = z79.object({
13498
+ id: z79.string(),
13499
+ name: z79.string(),
13500
+ type: z79.string(),
13501
+ provider: z79.string(),
13502
+ user_id: z79.string().nullable(),
13503
+ team_id: z79.string(),
13504
+ server_url: z79.string().optional(),
13505
+ transport_type: z79.string().optional(),
13506
+ auth_method: z79.string().nullish(),
13507
+ composio_mcp_id: z79.string().nullish(),
13508
+ custom_integration_id: z79.string().nullish(),
13509
+ icon_url: z79.string().nullish(),
13510
+ oauth_provider: z79.string().nullish(),
13511
+ oauth_provider_key: z79.string().nullish(),
13512
+ oauth_scopes: z79.array(z79.string()).nullish(),
13513
+ integration_id: z79.string().nullish(),
13514
+ created_at: z79.string(),
13515
+ updated_at: z79.string()
13516
+ });
13517
+ var integrationsListResponseSchema2 = z79.object({
13518
+ integrations: z79.array(integrationSchema)
13354
13519
  });
13355
13520
  var connectionResponseSchema = integrationSchema;
13356
- var buildIntegrationConfigSchema2 = z80.object({
13357
- id: z80.string(),
13358
- integration_id: z80.string().nullable(),
13359
- custom_integration_id: z80.string().nullable(),
13360
- integration_type: z80.string(),
13361
- integration_name: z80.string(),
13362
- created_at: z80.string()
13521
+ var buildIntegrationConfigSchema2 = z79.object({
13522
+ id: z79.string(),
13523
+ integration_id: z79.string().nullable(),
13524
+ custom_integration_id: z79.string().nullable(),
13525
+ integration_type: z79.string(),
13526
+ integration_name: z79.string(),
13527
+ created_at: z79.string()
13363
13528
  });
13364
- var listBuildIntegrationsResponseSchema2 = z80.object({
13365
- integrations: z80.array(buildIntegrationConfigSchema2)
13529
+ var listBuildIntegrationsResponseSchema2 = z79.object({
13530
+ integrations: z79.array(buildIntegrationConfigSchema2)
13366
13531
  });
13367
- var attachBuildIntegrationsResponseSchema = z80.object({
13368
- success: z80.boolean(),
13369
- count: z80.number()
13532
+ var attachBuildIntegrationsResponseSchema = z79.object({
13533
+ success: z79.boolean(),
13534
+ count: z79.number()
13370
13535
  });
13371
- var buildIntegrationConnectionSchema = z80.object({
13372
- connection_id: z80.string(),
13373
- created_at: z80.string()
13536
+ var buildIntegrationConnectionSchema = z79.object({
13537
+ connection_id: z79.string(),
13538
+ created_at: z79.string()
13374
13539
  });
13375
- var listBuildIntegrationConnectionsResponseSchema = z80.object({
13376
- connections: z80.array(buildIntegrationConnectionSchema)
13540
+ var listBuildIntegrationConnectionsResponseSchema = z79.object({
13541
+ connections: z79.array(buildIntegrationConnectionSchema)
13377
13542
  });
13378
- var successResponseSchema = z80.object({
13379
- success: z80.boolean()
13543
+ var successResponseSchema = z79.object({
13544
+ success: z79.boolean()
13380
13545
  });
13381
13546
 
13382
13547
  // src/commands/build-integrations/attach.ts
@@ -13419,15 +13584,15 @@ function registerBuildIntegrationsAttach(buildIntegrations) {
13419
13584
  __name(registerBuildIntegrationsAttach, "registerBuildIntegrationsAttach");
13420
13585
 
13421
13586
  // src/commands/build-integrations/case-queue-setup.ts
13422
- import { z as z81 } from "zod";
13423
- var slotSchema = z81.object({
13424
- config_id: z81.string(),
13425
- integration_type: z81.string(),
13426
- linked_queue_count: z81.number()
13587
+ import { z as z80 } from "zod";
13588
+ var slotSchema = z80.object({
13589
+ config_id: z80.string(),
13590
+ integration_type: z80.string(),
13591
+ linked_queue_count: z80.number()
13427
13592
  });
13428
- var responseSchema2 = z81.object({
13429
- configs: z81.array(slotSchema),
13430
- has_available_queues: z81.boolean()
13593
+ var responseSchema2 = z80.object({
13594
+ configs: z80.array(slotSchema),
13595
+ has_available_queues: z80.boolean()
13431
13596
  });
13432
13597
  var TABLE_COLUMNS10 = [
13433
13598
  { header: "SLOT ID", cell: /* @__PURE__ */ __name((row) => row.config_id, "cell") },
@@ -13922,9 +14087,9 @@ function registerBuildsList(builds) {
13922
14087
  __name(registerBuildsList, "registerBuildsList");
13923
14088
 
13924
14089
  // src/commands/builds/promote.ts
13925
- import { z as z82 } from "zod";
13926
- var promoteResponseSchema = z82.object({
13927
- success: z82.boolean()
14090
+ import { z as z81 } from "zod";
14091
+ var promoteResponseSchema = z81.object({
14092
+ success: z81.boolean()
13928
14093
  });
13929
14094
  function registerBuildsPromote(builds) {
13930
14095
  builds.command("promote <id>").description(
@@ -14935,7 +15100,7 @@ function parseSortOrder(raw) {
14935
15100
  __name(parseSortOrder, "parseSortOrder");
14936
15101
 
14937
15102
  // src/commands/cases/runs.ts
14938
- import { z as z83 } from "zod";
15103
+ import { z as z82 } from "zod";
14939
15104
  var MIN_LIMIT4 = 1;
14940
15105
  var MAX_LIMIT4 = 10;
14941
15106
  var DEFAULT_LIMIT4 = 3;
@@ -14953,17 +15118,17 @@ var RUNS_TABLE_COLUMNS = [
14953
15118
  cell: /* @__PURE__ */ __name((row) => row.has_pending_human_request ? row.pending_human_request_title ?? "(unknown)" : "", "cell")
14954
15119
  }
14955
15120
  ];
14956
- var recentMessageSchema = z83.object({
14957
- id: z83.string(),
14958
- type: z83.string(),
14959
- role: z83.string(),
14960
- timestamp: z83.string(),
14961
- text_content: z83.string().nullish(),
14962
- tool_call: z83.object({ id: z83.string(), name: z83.string() }).passthrough().nullish(),
14963
- tool_result: z83.object({ tool_call_id: z83.string() }).passthrough().nullish()
14964
- });
14965
- var recentMessagesResponseSchema = z83.object({
14966
- messages: z83.array(recentMessageSchema)
15121
+ var recentMessageSchema = z82.object({
15122
+ id: z82.string(),
15123
+ type: z82.string(),
15124
+ role: z82.string(),
15125
+ timestamp: z82.string(),
15126
+ text_content: z82.string().nullish(),
15127
+ tool_call: z82.object({ id: z82.string(), name: z82.string() }).passthrough().nullish(),
15128
+ tool_result: z82.object({ tool_call_id: z82.string() }).passthrough().nullish()
15129
+ });
15130
+ var recentMessagesResponseSchema = z82.object({
15131
+ messages: z82.array(recentMessageSchema)
14967
15132
  });
14968
15133
  var TEXT_PREVIEW_WIDTH = 60;
14969
15134
  var MESSAGES_TABLE_COLUMNS = [
@@ -15092,55 +15257,55 @@ function registerCases(program) {
15092
15257
  __name(registerCases, "registerCases");
15093
15258
 
15094
15259
  // src/api/clarity-schemas.ts
15095
- import { z as z84 } from "zod";
15096
- var clarityListProcessSchema = z84.object({
15097
- id: z84.guid(),
15098
- name: z84.string(),
15260
+ import { z as z83 } from "zod";
15261
+ var clarityListProcessSchema = z83.object({
15262
+ id: z83.guid(),
15263
+ name: z83.string(),
15099
15264
  status: clarityProcessStatusSchema,
15100
15265
  visibility: clarityProcessVisibilitySchema,
15101
- version: z84.number().int(),
15102
- capture_count: z84.number().int(),
15103
- capture_counts: z84.object({
15104
- video: z84.number().int(),
15105
- interview: z84.number().int(),
15106
- document: z84.number().int()
15266
+ version: z83.number().int(),
15267
+ capture_count: z83.number().int(),
15268
+ capture_counts: z83.object({
15269
+ video: z83.number().int(),
15270
+ interview: z83.number().int(),
15271
+ document: z83.number().int()
15107
15272
  }).optional(),
15108
- pending_invitation_count: z84.number().int(),
15109
- contributors: z84.array(
15110
- z84.object({
15111
- user_id: z84.string(),
15112
- user_name: z84.string()
15273
+ pending_invitation_count: z83.number().int(),
15274
+ contributors: z83.array(
15275
+ z83.object({
15276
+ user_id: z83.string(),
15277
+ user_name: z83.string()
15113
15278
  })
15114
15279
  ),
15115
- created_at: z84.string(),
15116
- created_by_name: z84.string().nullable()
15117
- });
15118
- var listClarityProcessesResponseSchema = z84.object({
15119
- processes: z84.array(clarityListProcessSchema),
15120
- total: z84.number().int(),
15121
- limit: z84.number().int(),
15122
- offset: z84.number().int()
15123
- });
15124
- var createClarityInviteLinkResponseSchema = z84.object({
15125
- invite_link: z84.object({
15126
- id: z84.guid(),
15127
- url: z84.url(),
15128
- created_at: z84.string(),
15129
- created_by: z84.object({
15130
- id: z84.guid(),
15131
- email: z84.email().nullable()
15280
+ created_at: z83.string(),
15281
+ created_by_name: z83.string().nullable()
15282
+ });
15283
+ var listClarityProcessesResponseSchema = z83.object({
15284
+ processes: z83.array(clarityListProcessSchema),
15285
+ total: z83.number().int(),
15286
+ limit: z83.number().int(),
15287
+ offset: z83.number().int()
15288
+ });
15289
+ var createClarityInviteLinkResponseSchema = z83.object({
15290
+ invite_link: z83.object({
15291
+ id: z83.guid(),
15292
+ url: z83.url(),
15293
+ created_at: z83.string(),
15294
+ created_by: z83.object({
15295
+ id: z83.guid(),
15296
+ email: z83.email().nullable()
15132
15297
  })
15133
15298
  })
15134
15299
  });
15135
- var createArtifactImportUploadUrlResponseSchema = z84.object({
15136
- signed_url: z84.url(),
15137
- capture_id: z84.guid(),
15138
- expires_at: z84.iso.datetime()
15300
+ var createArtifactImportUploadUrlResponseSchema = z83.object({
15301
+ signed_url: z83.url(),
15302
+ capture_id: z83.guid(),
15303
+ expires_at: z83.iso.datetime()
15139
15304
  });
15140
- var completeArtifactImportResponseSchema = z84.object({
15305
+ var completeArtifactImportResponseSchema = z83.object({
15141
15306
  capture: clarityCaptureSchema.extend({
15142
- createdAt: z84.iso.datetime(),
15143
- updatedAt: z84.iso.datetime()
15307
+ createdAt: z83.iso.datetime(),
15308
+ updatedAt: z83.iso.datetime()
15144
15309
  })
15145
15310
  });
15146
15311
  var legacyClarityProcessResponseSchema = legacyClarityProcessDetailSchema;
@@ -15579,8 +15744,8 @@ function renderCompletedImport(response) {
15579
15744
  __name(renderCompletedImport, "renderCompletedImport");
15580
15745
 
15581
15746
  // src/commands/clarity/assign-extra-capture-request.ts
15582
- import { z as z85 } from "zod";
15583
- var responseSchema3 = z85.object({
15747
+ import { z as z84 } from "zod";
15748
+ var responseSchema3 = z84.object({
15584
15749
  request: clarityProposalExtraCaptureRequestSchema
15585
15750
  });
15586
15751
  function renderRequest(request) {
@@ -15627,11 +15792,11 @@ function registerClarityAssignExtraCaptureRequest(clarity) {
15627
15792
  __name(registerClarityAssignExtraCaptureRequest, "registerClarityAssignExtraCaptureRequest");
15628
15793
 
15629
15794
  // src/commands/clarity/build-automation.ts
15630
- import { z as z86 } from "zod";
15631
- var responseSchema4 = z86.object({
15632
- automation_run: z86.object({
15633
- id: z86.string(),
15634
- status: z86.string()
15795
+ import { z as z85 } from "zod";
15796
+ var responseSchema4 = z85.object({
15797
+ automation_run: z85.object({
15798
+ id: z85.string(),
15799
+ status: z85.string()
15635
15800
  })
15636
15801
  });
15637
15802
  function registerClarityBuildAutomation(clarity) {
@@ -15702,7 +15867,7 @@ function registerClarityCreateInviteLink(clarity) {
15702
15867
  __name(registerClarityCreateInviteLink, "registerClarityCreateInviteLink");
15703
15868
 
15704
15869
  // src/commands/clarity/doctor.ts
15705
- import { z as z87 } from "zod";
15870
+ import { z as z86 } from "zod";
15706
15871
 
15707
15872
  // src/commands/clarity/render.ts
15708
15873
  var DEFAULT_HUMAN_SUMMARY_LIMIT = 1200;
@@ -16934,6 +17099,19 @@ var CLARITY_READ_TOOLS = [
16934
17099
  }
16935
17100
  ],
16936
17101
  description: "Read messages for one artifact-chat conversation in a v2 process."
17102
+ },
17103
+ {
17104
+ name: "listClarityProcessLinks",
17105
+ scope: "v1+v2",
17106
+ read_only: true,
17107
+ commands: ["duvo clarity process-links list"],
17108
+ endpoints: [
17109
+ {
17110
+ method: "GET",
17111
+ path: "/v2/teams/:teamId/clarity/hierarchy/process-links"
17112
+ }
17113
+ ],
17114
+ description: "List process-to-process links in the Clarity process landscape."
16937
17115
  }
16938
17116
  ];
16939
17117
  var CLARITY_WRITE_TOOLS = [
@@ -17131,6 +17309,45 @@ var CLARITY_WRITE_TOOLS = [
17131
17309
  }
17132
17310
  ],
17133
17311
  description: "Upload and complete a local Miro SVG, XML, PNG, or JPEG export."
17312
+ },
17313
+ {
17314
+ name: "createClarityProcessLink",
17315
+ scope: "v1+v2",
17316
+ read_only: false,
17317
+ commands: ["duvo clarity process-links create"],
17318
+ endpoints: [
17319
+ {
17320
+ method: "POST",
17321
+ path: "/v2/teams/:teamId/clarity/hierarchy/process-links"
17322
+ }
17323
+ ],
17324
+ description: "Create a process-to-process link in the Clarity landscape."
17325
+ },
17326
+ {
17327
+ name: "updateClarityProcessLink",
17328
+ scope: "v1+v2",
17329
+ read_only: false,
17330
+ commands: ["duvo clarity process-links update"],
17331
+ endpoints: [
17332
+ {
17333
+ method: "PATCH",
17334
+ path: "/v2/teams/:teamId/clarity/hierarchy/process-links/:process_link_id"
17335
+ }
17336
+ ],
17337
+ description: "Update a process-to-process link in the Clarity landscape."
17338
+ },
17339
+ {
17340
+ name: "deleteClarityProcessLink",
17341
+ scope: "v1+v2",
17342
+ read_only: false,
17343
+ commands: ["duvo clarity process-links delete"],
17344
+ endpoints: [
17345
+ {
17346
+ method: "DELETE",
17347
+ path: "/v2/teams/:teamId/clarity/hierarchy/process-links/:process_link_id"
17348
+ }
17349
+ ],
17350
+ description: "Delete a process-to-process link from the Clarity landscape."
17134
17351
  }
17135
17352
  ];
17136
17353
  var CLARITY_TOOLS = [
@@ -17160,7 +17377,7 @@ function registerClarityTools(clarity) {
17160
17377
  console.log(renderTable(CLARITY_TOOL_COLUMNS, CLARITY_TOOLS));
17161
17378
  console.log("");
17162
17379
  console.log(
17163
- "Clarity tools include read-only GET calls and explicit write commands for generation, promotion, revert, assignment, postprocess, automation, artifact import, and invite links."
17380
+ "Clarity tools include read-only GET calls and explicit write commands for generation, promotion, revert, assignment, postprocess, automation, artifact import, invite links, and process links."
17164
17381
  );
17165
17382
  });
17166
17383
  }
@@ -17303,8 +17520,8 @@ async function buildTeamContextCheck(config) {
17303
17520
  }
17304
17521
  }
17305
17522
  __name(buildTeamContextCheck, "buildTeamContextCheck");
17306
- var listMyTeamsResponseSchema2 = z87.object({
17307
- teams: z87.array(z87.object({ id: z87.string() }))
17523
+ var listMyTeamsResponseSchema2 = z86.object({
17524
+ teams: z86.array(z86.object({ id: z86.string() }))
17308
17525
  });
17309
17526
  async function buildClarityApiReachableCheck(command, config) {
17310
17527
  let teamId;
@@ -17922,19 +18139,19 @@ function buildGenerateTransformationProposalBody(options) {
17922
18139
  __name(buildGenerateTransformationProposalBody, "buildGenerateTransformationProposalBody");
17923
18140
 
17924
18141
  // src/commands/clarity/get-current-process.ts
17925
- import { z as z88 } from "zod";
17926
- var snapshotSchema = z88.object({
17927
- snapshot: z88.object({
17928
- id: z88.string(),
17929
- kind: z88.string(),
17930
- source_snapshot_id: z88.string().nullable(),
17931
- parent_id: z88.string().nullable(),
17932
- status: z88.string(),
17933
- creator_type: z88.string(),
17934
- user_id: z88.string().nullable(),
17935
- sandbox_id: z88.string().nullable(),
17936
- created_at: z88.string(),
17937
- updated_at: z88.string()
18142
+ import { z as z87 } from "zod";
18143
+ var snapshotSchema = z87.object({
18144
+ snapshot: z87.object({
18145
+ id: z87.string(),
18146
+ kind: z87.string(),
18147
+ source_snapshot_id: z87.string().nullable(),
18148
+ parent_id: z87.string().nullable(),
18149
+ status: z87.string(),
18150
+ creator_type: z87.string(),
18151
+ user_id: z87.string().nullable(),
18152
+ sandbox_id: z87.string().nullable(),
18153
+ created_at: z87.string(),
18154
+ updated_at: z87.string()
17938
18155
  })
17939
18156
  });
17940
18157
  function registerClarityGetCurrentProcess(clarity) {
@@ -17978,19 +18195,19 @@ function registerClarityGetCurrentProcess(clarity) {
17978
18195
  __name(registerClarityGetCurrentProcess, "registerClarityGetCurrentProcess");
17979
18196
 
17980
18197
  // src/commands/clarity/get-transformation-proposal.ts
17981
- import { z as z89 } from "zod";
17982
- var snapshotSchema2 = z89.object({
17983
- snapshot: z89.object({
17984
- id: z89.string(),
17985
- kind: z89.string(),
17986
- source_snapshot_id: z89.string().nullable(),
17987
- parent_id: z89.string().nullable(),
17988
- status: z89.string(),
17989
- creator_type: z89.string(),
17990
- user_id: z89.string().nullable(),
17991
- sandbox_id: z89.string().nullable(),
17992
- created_at: z89.string(),
17993
- updated_at: z89.string()
18198
+ import { z as z88 } from "zod";
18199
+ var snapshotSchema2 = z88.object({
18200
+ snapshot: z88.object({
18201
+ id: z88.string(),
18202
+ kind: z88.string(),
18203
+ source_snapshot_id: z88.string().nullable(),
18204
+ parent_id: z88.string().nullable(),
18205
+ status: z88.string(),
18206
+ creator_type: z88.string(),
18207
+ user_id: z88.string().nullable(),
18208
+ sandbox_id: z88.string().nullable(),
18209
+ created_at: z88.string(),
18210
+ updated_at: z88.string()
17994
18211
  })
17995
18212
  });
17996
18213
  function registerClarityGetTransformationProposal(clarity) {
@@ -18187,28 +18404,256 @@ function registerClarityPostprocess(clarity) {
18187
18404
  }
18188
18405
  __name(registerClarityPostprocess, "registerClarityPostprocess");
18189
18406
 
18190
- // src/commands/clarity/promote-current-process.ts
18191
- import { z as z90 } from "zod";
18192
- var snapshotSchema3 = z90.object({
18193
- snapshot: z90.object({
18194
- id: z90.string(),
18195
- status: z90.string(),
18196
- creator_type: z90.string(),
18197
- created_at: z90.string(),
18198
- updated_at: z90.string()
18199
- })
18200
- });
18201
- function registerClarityPromoteCurrentProcess(clarity) {
18202
- clarity.command("promote-current-process <process-id> <snapshot-id>").description("Promote a current-process snapshot to live").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function action(processId, snapshotId, options) {
18203
- const { apiKey, apiBaseUrl } = await requireAuthenticatedConfig(this);
18204
- const raw = await httpRequest({
18205
- method: "POST",
18206
- path: `/v2/clarity-v2/processes/${encodeURIComponent(processId)}/snapshots/current_process/${encodeURIComponent(snapshotId)}/promote`,
18207
- apiKey,
18208
- apiBaseUrl
18209
- });
18210
- if (options.json) {
18211
- printJson(raw);
18407
+ // src/commands/clarity/process-links.ts
18408
+ import { z as z89 } from "zod";
18409
+ var MIN_LIMIT6 = 1;
18410
+ var MAX_LIMIT6 = 500;
18411
+ var DEFAULT_LIMIT6 = 100;
18412
+ var PROCESS_LINKS_RESOURCE_PATH = "/clarity/hierarchy/process-links";
18413
+ var processLinkTypeSchema = z89.enum([
18414
+ "hands_off_to",
18415
+ "shares_step_with",
18416
+ "variant_of"
18417
+ ]);
18418
+ var processLinkStateSchema = z89.enum(["suggested", "confirmed"]);
18419
+ var processLinkSchema = z89.object({
18420
+ id: z89.string(),
18421
+ source_node_id: z89.string(),
18422
+ target_node_id: z89.string(),
18423
+ type: processLinkTypeSchema,
18424
+ state: processLinkStateSchema,
18425
+ confidence: z89.number().nullable(),
18426
+ created_at: z89.string(),
18427
+ updated_at: z89.string()
18428
+ });
18429
+ var listProcessLinksResponseSchema = z89.object({
18430
+ process_links: z89.array(processLinkSchema),
18431
+ total: z89.number(),
18432
+ limit: z89.number(),
18433
+ offset: z89.number()
18434
+ });
18435
+ var processLinkMutationResponseSchema = z89.object({
18436
+ process_link: processLinkSchema,
18437
+ created: z89.boolean().optional()
18438
+ });
18439
+ var deleteProcessLinkResponseSchema = z89.object({
18440
+ deleted: z89.boolean()
18441
+ });
18442
+ var PROCESS_LINK_COLUMNS = [
18443
+ { header: "ID", cell: /* @__PURE__ */ __name((row) => row.id, "cell"), maxWidth: 36 },
18444
+ {
18445
+ header: "SOURCE",
18446
+ cell: /* @__PURE__ */ __name((row) => row.source_node_id, "cell"),
18447
+ maxWidth: 36
18448
+ },
18449
+ {
18450
+ header: "TARGET",
18451
+ cell: /* @__PURE__ */ __name((row) => row.target_node_id, "cell"),
18452
+ maxWidth: 36
18453
+ },
18454
+ { header: "TYPE", cell: /* @__PURE__ */ __name((row) => row.type, "cell") },
18455
+ { header: "STATE", cell: /* @__PURE__ */ __name((row) => row.state, "cell") },
18456
+ {
18457
+ header: "CONF",
18458
+ cell: /* @__PURE__ */ __name((row) => row.confidence === null ? "-" : row.confidence.toFixed(2), "cell")
18459
+ }
18460
+ ];
18461
+ function registerClarityProcessLinks(clarity) {
18462
+ const processLinks = clarity.command("process-links").description("Manage Clarity process links");
18463
+ processLinks.command("list", { isDefault: true }).description("List process links in the current team").option("--node <node-id>", "only show links touching this process node").option("--limit <n>", `page size (${MIN_LIMIT6}-${MAX_LIMIT6})`).option("--offset <n>", "number of links to skip").option("--json", "output JSON").action(/* @__PURE__ */ __name(async function listAction(options) {
18464
+ const config = await requireAuthenticatedConfig(this);
18465
+ const path = await resolveProcessLinksPath(this, config);
18466
+ const response = await listProcessLinks(config, path, options);
18467
+ if (options.json) {
18468
+ printJson(response);
18469
+ return;
18470
+ }
18471
+ renderProcessLinks(response);
18472
+ }, "listAction"));
18473
+ processLinks.command("create").description("Create a process link").requiredOption("--source-node <node-id>", "source process node id").requiredOption("--target-node <node-id>", "target process node id").requiredOption(
18474
+ "--type <type>",
18475
+ "hands_off_to, shares_step_with, or variant_of"
18476
+ ).option("--state <state>", "suggested or confirmed").option("--confidence <number>", "confidence score from 0 to 1").option("--json", "output JSON").action(/* @__PURE__ */ __name(async function createAction(options) {
18477
+ const config = await requireAuthenticatedConfig(this);
18478
+ const path = await resolveProcessLinksPath(this, config);
18479
+ const body = buildCreateBody(options);
18480
+ const raw = await httpRequest({
18481
+ method: "POST",
18482
+ path,
18483
+ apiKey: config.apiKey,
18484
+ apiBaseUrl: config.apiBaseUrl,
18485
+ body
18486
+ });
18487
+ const response = parseMutationResponse(raw);
18488
+ if (options.json) {
18489
+ printJson(response);
18490
+ return;
18491
+ }
18492
+ const action = response.created === false ? "Found" : "Created";
18493
+ console.log(`${action} process link: ${response.process_link.id}`);
18494
+ }, "createAction"));
18495
+ processLinks.command("update <link-id>").description("Update a process link").option("--source-node <node-id>", "replacement source process node id").option("--target-node <node-id>", "replacement target process node id").option("--type <type>", "hands_off_to, shares_step_with, or variant_of").option("--state <state>", "suggested or confirmed").option("--confidence <number>", "confidence score from 0 to 1").option("--clear-confidence", "clear the confidence score").option("--json", "output JSON").action(/* @__PURE__ */ __name(async function updateAction(linkId, options) {
18496
+ const config = await requireAuthenticatedConfig(this);
18497
+ const path = await resolveProcessLinksPath(this, config);
18498
+ const body = buildUpdateBody(options);
18499
+ const raw = await httpRequest({
18500
+ method: "PATCH",
18501
+ path: `${path}/${encodeURIComponent(linkId)}`,
18502
+ apiKey: config.apiKey,
18503
+ apiBaseUrl: config.apiBaseUrl,
18504
+ body
18505
+ });
18506
+ const response = parseMutationResponse(raw);
18507
+ if (options.json) {
18508
+ printJson(response);
18509
+ return;
18510
+ }
18511
+ console.log(`Updated process link: ${response.process_link.id}`);
18512
+ }, "updateAction"));
18513
+ processLinks.command("delete <link-id>").description("Delete a process link").option("--json", "output JSON").action(/* @__PURE__ */ __name(async function deleteAction(linkId, options) {
18514
+ const config = await requireAuthenticatedConfig(this);
18515
+ const path = await resolveProcessLinksPath(this, config);
18516
+ const raw = await httpRequest({
18517
+ method: "DELETE",
18518
+ path: `${path}/${encodeURIComponent(linkId)}`,
18519
+ apiKey: config.apiKey,
18520
+ apiBaseUrl: config.apiBaseUrl
18521
+ });
18522
+ const response = deleteProcessLinkResponseSchema.parse(raw);
18523
+ if (options.json) {
18524
+ printJson(response);
18525
+ return;
18526
+ }
18527
+ console.log(`Deleted process link: ${linkId}`);
18528
+ }, "deleteAction"));
18529
+ }
18530
+ __name(registerClarityProcessLinks, "registerClarityProcessLinks");
18531
+ async function listProcessLinks(config, path, options) {
18532
+ const limit = parseLimit(options.limit, {
18533
+ defaultValue: DEFAULT_LIMIT6,
18534
+ min: MIN_LIMIT6,
18535
+ max: MAX_LIMIT6
18536
+ });
18537
+ const offset = parseOffset(options.offset);
18538
+ const searchParams = new URLSearchParams({
18539
+ limit: String(limit),
18540
+ offset: String(offset)
18541
+ });
18542
+ if (options.node) {
18543
+ searchParams.set("node_id", options.node);
18544
+ }
18545
+ const raw = await httpRequest({
18546
+ method: "GET",
18547
+ path,
18548
+ apiKey: config.apiKey,
18549
+ apiBaseUrl: config.apiBaseUrl,
18550
+ searchParams
18551
+ });
18552
+ return listProcessLinksResponseSchema.parse(raw);
18553
+ }
18554
+ __name(listProcessLinks, "listProcessLinks");
18555
+ async function resolveProcessLinksPath(command, config) {
18556
+ const teamId = await resolveRequiredTeamId(config, {
18557
+ override: getTeamFlag(command)
18558
+ });
18559
+ return buildTeamPath(teamId, PROCESS_LINKS_RESOURCE_PATH);
18560
+ }
18561
+ __name(resolveProcessLinksPath, "resolveProcessLinksPath");
18562
+ function buildCreateBody(options) {
18563
+ return {
18564
+ source_node_id: options.sourceNode,
18565
+ target_node_id: options.targetNode,
18566
+ type: parseProcessLinkType(options.type),
18567
+ ...options.state !== void 0 ? { state: parseProcessLinkState(options.state) } : {},
18568
+ ...options.confidence !== void 0 ? { confidence: parseConfidence(options.confidence) } : {}
18569
+ };
18570
+ }
18571
+ __name(buildCreateBody, "buildCreateBody");
18572
+ function buildUpdateBody(options) {
18573
+ if (options.confidence !== void 0 && options.clearConfidence) {
18574
+ throw new CliError(
18575
+ "Use either --confidence or --clear-confidence, not both."
18576
+ );
18577
+ }
18578
+ const body = {
18579
+ ...options.sourceNode !== void 0 ? { source_node_id: options.sourceNode } : {},
18580
+ ...options.targetNode !== void 0 ? { target_node_id: options.targetNode } : {},
18581
+ ...options.type !== void 0 ? { type: parseProcessLinkType(options.type) } : {},
18582
+ ...options.state !== void 0 ? { state: parseProcessLinkState(options.state) } : {},
18583
+ ...options.clearConfidence ? { confidence: null } : {},
18584
+ ...options.confidence !== void 0 ? { confidence: parseConfidence(options.confidence) } : {}
18585
+ };
18586
+ if (Object.keys(body).length === 0) {
18587
+ throw new CliError("Pass at least one field to update.");
18588
+ }
18589
+ return body;
18590
+ }
18591
+ __name(buildUpdateBody, "buildUpdateBody");
18592
+ function parseProcessLinkType(value) {
18593
+ const parsed = processLinkTypeSchema.safeParse(value);
18594
+ if (!parsed.success) {
18595
+ throw new CliError(
18596
+ "Link type must be one of: hands_off_to, shares_step_with, variant_of."
18597
+ );
18598
+ }
18599
+ return parsed.data;
18600
+ }
18601
+ __name(parseProcessLinkType, "parseProcessLinkType");
18602
+ function parseProcessLinkState(value) {
18603
+ const parsed = processLinkStateSchema.safeParse(value);
18604
+ if (!parsed.success) {
18605
+ throw new CliError("Link state must be suggested or confirmed.");
18606
+ }
18607
+ return parsed.data;
18608
+ }
18609
+ __name(parseProcessLinkState, "parseProcessLinkState");
18610
+ function parseConfidence(value) {
18611
+ const parsed = Number(value);
18612
+ if (!Number.isFinite(parsed) || parsed < 0 || parsed > 1) {
18613
+ throw new CliError("Confidence must be a number from 0 to 1.");
18614
+ }
18615
+ return parsed;
18616
+ }
18617
+ __name(parseConfidence, "parseConfidence");
18618
+ function parseMutationResponse(raw) {
18619
+ return processLinkMutationResponseSchema.parse(raw);
18620
+ }
18621
+ __name(parseMutationResponse, "parseMutationResponse");
18622
+ function renderProcessLinks(response) {
18623
+ if (response.process_links.length === 0) {
18624
+ console.log("No process links found.");
18625
+ return;
18626
+ }
18627
+ console.log(renderTable(PROCESS_LINK_COLUMNS, response.process_links));
18628
+ console.log("");
18629
+ console.log(
18630
+ `Showing ${response.process_links.length} of ${response.total} \xB7 offset ${response.offset}`
18631
+ );
18632
+ }
18633
+ __name(renderProcessLinks, "renderProcessLinks");
18634
+
18635
+ // src/commands/clarity/promote-current-process.ts
18636
+ import { z as z90 } from "zod";
18637
+ var snapshotSchema3 = z90.object({
18638
+ snapshot: z90.object({
18639
+ id: z90.string(),
18640
+ status: z90.string(),
18641
+ creator_type: z90.string(),
18642
+ created_at: z90.string(),
18643
+ updated_at: z90.string()
18644
+ })
18645
+ });
18646
+ function registerClarityPromoteCurrentProcess(clarity) {
18647
+ clarity.command("promote-current-process <process-id> <snapshot-id>").description("Promote a current-process snapshot to live").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function action(processId, snapshotId, options) {
18648
+ const { apiKey, apiBaseUrl } = await requireAuthenticatedConfig(this);
18649
+ const raw = await httpRequest({
18650
+ method: "POST",
18651
+ path: `/v2/clarity-v2/processes/${encodeURIComponent(processId)}/snapshots/current_process/${encodeURIComponent(snapshotId)}/promote`,
18652
+ apiKey,
18653
+ apiBaseUrl
18654
+ });
18655
+ if (options.json) {
18656
+ printJson(raw);
18212
18657
  return;
18213
18658
  }
18214
18659
  const parsed = snapshotSchema3.safeParse(raw);
@@ -18316,9 +18761,14 @@ __name(registerClarityRevertTransformationProposal, "registerClarityRevertTransf
18316
18761
  // src/commands/clarity/save-snapshot.ts
18317
18762
  import { readFile as readFile6 } from "node:fs/promises";
18318
18763
  import { z as z92 } from "zod";
18319
- var stepsFileSchema = z92.union([
18764
+ var snapshotFileSchema = z92.union([
18320
18765
  saveClarityProcessSnapshotBodySchema.shape.steps,
18321
- z92.object({ steps: saveClarityProcessSnapshotBodySchema.shape.steps })
18766
+ saveClarityProcessSnapshotBodySchema.pick({
18767
+ steps: true,
18768
+ summary: true,
18769
+ swot: true,
18770
+ projectedImpact: true
18771
+ })
18322
18772
  ]);
18323
18773
  function registerClaritySaveCurrentProcess(clarity) {
18324
18774
  clarity.command("save-current-process <process-id>").description("Save edited current-process steps as the live snapshot").requiredOption(
@@ -18326,15 +18776,16 @@ function registerClaritySaveCurrentProcess(clarity) {
18326
18776
  "current-process snapshot the edits are based on"
18327
18777
  ).requiredOption(
18328
18778
  "--steps-file <path>",
18329
- "JSON file containing an array of edited steps or an object with a steps array"
18779
+ "JSON file containing an array of edited steps or an object with steps and narrative roots"
18330
18780
  ).option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function action(processId, options) {
18781
+ const snapshotFile = await readSnapshotFile(options.stepsFile);
18331
18782
  await saveSnapshot({
18332
18783
  command: this,
18333
18784
  processId,
18334
18785
  kind: "current_process",
18335
18786
  body: {
18336
18787
  baselineSnapshotId: options.baselineSnapshotId,
18337
- steps: await readStepsFile(options.stepsFile)
18788
+ ...snapshotFile
18338
18789
  },
18339
18790
  json: options.json === true
18340
18791
  });
@@ -18349,11 +18800,12 @@ function registerClaritySaveTransformationProposal(clarity) {
18349
18800
  "transformation-proposal snapshot the edits are based on"
18350
18801
  ).requiredOption(
18351
18802
  "--steps-file <path>",
18352
- "JSON file containing an array of edited steps or an object with a steps array"
18803
+ "JSON file containing an array of edited steps or an object with steps and narrative roots"
18353
18804
  ).option(
18354
18805
  "--current-process-id <id>",
18355
18806
  "current-process snapshot anchor expected by the edited proposal"
18356
18807
  ).option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function action(processId, options) {
18808
+ const snapshotFile = await readSnapshotFile(options.stepsFile);
18357
18809
  await saveSnapshot({
18358
18810
  command: this,
18359
18811
  processId,
@@ -18361,7 +18813,7 @@ function registerClaritySaveTransformationProposal(clarity) {
18361
18813
  body: {
18362
18814
  baselineSnapshotId: options.baselineSnapshotId,
18363
18815
  clarityCurrentProcessId: options.currentProcessId,
18364
- steps: await readStepsFile(options.stepsFile)
18816
+ ...snapshotFile
18365
18817
  },
18366
18818
  json: options.json === true
18367
18819
  });
@@ -18404,7 +18856,7 @@ async function saveSnapshot(args) {
18404
18856
  );
18405
18857
  }
18406
18858
  __name(saveSnapshot, "saveSnapshot");
18407
- async function readStepsFile(path) {
18859
+ async function readSnapshotFile(path) {
18408
18860
  let raw;
18409
18861
  try {
18410
18862
  raw = await readFile6(path, "utf8");
@@ -18419,15 +18871,15 @@ async function readStepsFile(path) {
18419
18871
  const message = error instanceof Error ? error.message : String(error);
18420
18872
  throw new CliError(`Invalid JSON in "${path}": ${message}`);
18421
18873
  }
18422
- const parsed = stepsFileSchema.safeParse(json);
18874
+ const parsed = snapshotFileSchema.safeParse(json);
18423
18875
  if (!parsed.success) {
18424
18876
  throw new CliError(
18425
- `Invalid steps file "${path}": expected a step array or an object with a steps array. ${parsed.error.message}`
18877
+ `Invalid steps file "${path}": expected a step array or an object with a steps array and optional narrative roots. ${parsed.error.message}`
18426
18878
  );
18427
18879
  }
18428
- return Array.isArray(parsed.data) ? parsed.data : parsed.data.steps;
18880
+ return Array.isArray(parsed.data) ? { steps: parsed.data } : parsed.data;
18429
18881
  }
18430
- __name(readStepsFile, "readStepsFile");
18882
+ __name(readSnapshotFile, "readSnapshotFile");
18431
18883
 
18432
18884
  // src/commands/clarity/stop-current-process.ts
18433
18885
  function registerClarityStopCurrentProcess(clarity) {
@@ -18468,9 +18920,9 @@ function registerClarityStopTransformationProposal(clarity) {
18468
18920
  __name(registerClarityStopTransformationProposal, "registerClarityStopTransformationProposal");
18469
18921
 
18470
18922
  // src/commands/clarity/index.ts
18471
- var DEFAULT_LIMIT6 = 50;
18472
- var MIN_LIMIT6 = 1;
18473
- var MAX_LIMIT6 = 100;
18923
+ var DEFAULT_LIMIT7 = 50;
18924
+ var MIN_LIMIT7 = 1;
18925
+ var MAX_LIMIT7 = 100;
18474
18926
  var CLARITY_V2_REQUIRED_MESSAGE = "This command requires Clarity v2. Use `duvo clarity overview <process-id>` to read legacy v1 context.";
18475
18927
  function registerClarity(program) {
18476
18928
  const clarity = program.command("clarity").description("Manage and read Clarity processes in the Duvo public API");
@@ -18509,6 +18961,7 @@ function registerClarity(program) {
18509
18961
  registerClarityRevertTransformationProposal(clarity);
18510
18962
  registerClarityAssignExtraCaptureRequest(clarity);
18511
18963
  registerClarityPostprocess(clarity);
18964
+ registerClarityProcessLinks(clarity);
18512
18965
  registerClarityBuildAutomation(clarity);
18513
18966
  registerClarityStopCurrentProcess(clarity);
18514
18967
  registerClarityStopTransformationProposal(clarity);
@@ -18517,7 +18970,7 @@ function registerClarity(program) {
18517
18970
  }
18518
18971
  __name(registerClarity, "registerClarity");
18519
18972
  function registerList(clarity) {
18520
- clarity.command("list", { isDefault: true }).description("List Clarity processes for the current team").option("--limit <n>", `page size (${MIN_LIMIT6}-${MAX_LIMIT6})`).option("--offset <n>", "number of processes to skip").option("--search <query>", "case-insensitive search across process names").option("--status <status>", "filter by lifecycle status").option(
18973
+ clarity.command("list", { isDefault: true }).description("List Clarity processes for the current team").option("--limit <n>", `page size (${MIN_LIMIT7}-${MAX_LIMIT7})`).option("--offset <n>", "number of processes to skip").option("--search <query>", "case-insensitive search across process names").option("--status <status>", "filter by lifecycle status").option(
18521
18974
  "--process-version <1|2>",
18522
18975
  "filter by Clarity process schema version"
18523
18976
  ).option("--json", "output JSON").option("--csv", "output CSV").action(/* @__PURE__ */ __name(async function listAction(options) {
@@ -18527,7 +18980,7 @@ function registerList(clarity) {
18527
18980
  }
18528
18981
  __name(registerList, "registerList");
18529
18982
  function registerSearch(clarity) {
18530
- clarity.command("search <query>").description("Search Clarity processes by name").option("--limit <n>", `page size (${MIN_LIMIT6}-${MAX_LIMIT6})`).option("--offset <n>", "number of processes to skip").option("--status <status>", "filter by lifecycle status").option(
18983
+ clarity.command("search <query>").description("Search Clarity processes by name").option("--limit <n>", `page size (${MIN_LIMIT7}-${MAX_LIMIT7})`).option("--offset <n>", "number of processes to skip").option("--status <status>", "filter by lifecycle status").option(
18531
18984
  "--process-version <1|2>",
18532
18985
  "filter by Clarity process schema version"
18533
18986
  ).option("--json", "output JSON").option("--csv", "output CSV").action(/* @__PURE__ */ __name(async function searchAction(query, options) {
@@ -18872,9 +19325,9 @@ function registerExport(clarity) {
18872
19325
  __name(registerExport, "registerExport");
18873
19326
  async function loadProcessList(command, options) {
18874
19327
  const limit = parseLimit(options.limit, {
18875
- defaultValue: DEFAULT_LIMIT6,
18876
- min: MIN_LIMIT6,
18877
- max: MAX_LIMIT6
19328
+ defaultValue: DEFAULT_LIMIT7,
19329
+ min: MIN_LIMIT7,
19330
+ max: MAX_LIMIT7
18878
19331
  });
18879
19332
  const offset = parseOffset(options.offset);
18880
19333
  const version2 = parseProcessVersion(options.processVersion);
@@ -21833,8 +22286,341 @@ function registerProfiles(program) {
21833
22286
  }
21834
22287
  __name(registerProfiles, "registerProfiles");
21835
22288
 
21836
- // src/commands/queue-labels/index.ts
22289
+ // src/commands/pulse/create.ts
22290
+ function registerPulseCreate(pulse) {
22291
+ pulse.command("create").description(
22292
+ "Create a Pulse dashboard from a prompt (e.g. 'open cases by queue this week'). Generation runs asynchronously \u2014 poll `duvo pulse get <id>` until status is completed."
22293
+ ).requiredOption(
22294
+ "--message <text>",
22295
+ "what you want the dashboard to show (max 10000 chars)"
22296
+ ).option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function createAction(options) {
22297
+ const message = options.message?.trim();
22298
+ if (!message) {
22299
+ throw new CliError("--message is required.");
22300
+ }
22301
+ const { apiKey, apiBaseUrl } = await requireAuthenticatedConfig(this);
22302
+ const raw = await httpRequest({
22303
+ method: "POST",
22304
+ path: "/v2/artifacts",
22305
+ apiKey,
22306
+ apiBaseUrl,
22307
+ body: { message }
22308
+ });
22309
+ if (options.json) {
22310
+ printJson(raw);
22311
+ return;
22312
+ }
22313
+ const parsed = createArtifactResponseSchema.safeParse(raw);
22314
+ if (!parsed.success) {
22315
+ throw new CliError(
22316
+ `Unexpected response from the API: ${parsed.error.message}`
22317
+ );
22318
+ }
22319
+ const { artifact_id: artifactId } = parsed.data;
22320
+ console.log(green("Pulse dashboard created. The agent is building it\u2026"));
22321
+ console.log();
22322
+ console.log(renderKeyValue([{ label: "ID", value: artifactId }]));
22323
+ console.log();
22324
+ console.log(`Track progress with: duvo pulse get ${artifactId}`);
22325
+ }, "createAction"));
22326
+ }
22327
+ __name(registerPulseCreate, "registerPulseCreate");
22328
+
22329
+ // src/commands/pulse/delete.ts
22330
+ function registerPulseDelete(pulse) {
22331
+ pulse.command("delete <id>").description("Delete a Pulse dashboard (creator only)").option("-y, --yes", "skip the confirmation prompt").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function deleteAction(id, options) {
22332
+ const pulseId = trimRequired(id, "<id>");
22333
+ const { apiKey, apiBaseUrl } = await requireAuthenticatedConfig(this);
22334
+ await confirmDestructive({
22335
+ message: `Delete Pulse dashboard "${pulseId}"?`,
22336
+ skip: options.yes ?? false
22337
+ });
22338
+ const raw = await httpRequest({
22339
+ method: "DELETE",
22340
+ path: `/v2/artifacts/${encodeURIComponent(pulseId)}`,
22341
+ apiKey,
22342
+ apiBaseUrl
22343
+ });
22344
+ if (options.json) {
22345
+ printJson(raw);
22346
+ return;
22347
+ }
22348
+ const parsed = deleteArtifactResponseSchema.safeParse(raw);
22349
+ if (!parsed.success) {
22350
+ throw new CliError(
22351
+ `Unexpected response from the API: ${parsed.error.message}`
22352
+ );
22353
+ }
22354
+ console.log(green(`Pulse dashboard "${pulseId}" deleted.`));
22355
+ }, "deleteAction"));
22356
+ }
22357
+ __name(registerPulseDelete, "registerPulseDelete");
22358
+
22359
+ // src/commands/pulse/get.ts
22360
+ function registerPulseGet(pulse) {
22361
+ pulse.command("get <id>").description("Get a Pulse dashboard's metadata and generation status").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function getAction(id, options) {
22362
+ const pulseId = trimRequired(id, "<id>");
22363
+ const { apiKey, apiBaseUrl } = await requireAuthenticatedConfig(this);
22364
+ const raw = await httpRequest({
22365
+ method: "GET",
22366
+ path: `/v2/artifacts/${encodeURIComponent(pulseId)}`,
22367
+ apiKey,
22368
+ apiBaseUrl
22369
+ });
22370
+ if (options.json) {
22371
+ printJson(raw);
22372
+ return;
22373
+ }
22374
+ const parsed = artifactDetailResponseSchema.safeParse(raw);
22375
+ if (!parsed.success) {
22376
+ throw new CliError(
22377
+ `Unexpected response from the API: ${parsed.error.message}`
22378
+ );
22379
+ }
22380
+ const { artifact: dashboard } = parsed.data;
22381
+ console.log(
22382
+ renderKeyValue([
22383
+ { label: "ID", value: dashboard.id },
22384
+ { label: "Title", value: dashboard.title ?? "" },
22385
+ { label: "Status", value: dashboard.status },
22386
+ {
22387
+ label: "Rendered",
22388
+ value: dashboard.html_code_present ? "yes" : "no"
22389
+ },
22390
+ { label: "Created", value: dashboard.created_at },
22391
+ { label: "Updated", value: dashboard.updated_at }
22392
+ ])
22393
+ );
22394
+ if (dashboard.html_code_present) {
22395
+ console.log();
22396
+ console.log(
22397
+ `Read the rendered HTML with: duvo pulse html ${dashboard.id}`
22398
+ );
22399
+ }
22400
+ }, "getAction"));
22401
+ }
22402
+ __name(registerPulseGet, "registerPulseGet");
22403
+
22404
+ // src/commands/pulse/html.ts
22405
+ function registerPulseHtml(pulse) {
22406
+ pulse.command("html <id>").description(
22407
+ "Print a Pulse dashboard's rendered HTML document to stdout (pipe to a file or browser)"
22408
+ ).option(
22409
+ "--version <version-id>",
22410
+ "render a specific historical version instead of the live one (see `duvo pulse versions`)"
22411
+ ).action(/* @__PURE__ */ __name(async function htmlAction(id, options) {
22412
+ const pulseId = trimRequired(id, "<id>");
22413
+ const { apiKey, apiBaseUrl } = await requireAuthenticatedConfig(this);
22414
+ const path = options.version ? `/v2/artifacts/${encodeURIComponent(pulseId)}/revisions/${encodeURIComponent(options.version)}/render` : `/v2/artifacts/${encodeURIComponent(pulseId)}/render`;
22415
+ const raw = await httpRequest({
22416
+ method: "GET",
22417
+ path,
22418
+ apiKey,
22419
+ apiBaseUrl
22420
+ });
22421
+ if (typeof raw !== "string") {
22422
+ throw new CliError(
22423
+ "Unexpected response from the API: expected an HTML document."
22424
+ );
22425
+ }
22426
+ console.log(raw);
22427
+ }, "htmlAction"));
22428
+ }
22429
+ __name(registerPulseHtml, "registerPulseHtml");
22430
+
22431
+ // src/commands/pulse/list.ts
22432
+ var DEFAULT_LIMIT8 = 20;
22433
+ var MIN_LIMIT8 = 1;
22434
+ var MAX_LIMIT8 = 100;
21837
22435
  var TABLE_COLUMNS27 = [
22436
+ { header: "ID", cell: /* @__PURE__ */ __name((row) => row.id, "cell") },
22437
+ {
22438
+ header: "TITLE",
22439
+ cell: /* @__PURE__ */ __name((row) => row.title ?? "", "cell"),
22440
+ maxWidth: 50
22441
+ },
22442
+ { header: "STATUS", cell: /* @__PURE__ */ __name((row) => row.status, "cell") },
22443
+ { header: "UPDATED", cell: /* @__PURE__ */ __name((row) => row.updated_at, "cell") }
22444
+ ];
22445
+ function registerPulseList(pulse) {
22446
+ pulse.command("list", { isDefault: true }).description("List your Pulse dashboards").option(
22447
+ "--shared",
22448
+ "list dashboards shared with you (created by teammates) instead of your own"
22449
+ ).option("--limit <n>", `page size (${MIN_LIMIT8}-${MAX_LIMIT8})`).option("--offset <n>", "number of dashboards to skip").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function listAction(options) {
22450
+ const limit = parseLimit(options.limit, {
22451
+ defaultValue: DEFAULT_LIMIT8,
22452
+ min: MIN_LIMIT8,
22453
+ max: MAX_LIMIT8
22454
+ });
22455
+ const offset = parseOffset(options.offset);
22456
+ const { apiKey, apiBaseUrl } = await requireAuthenticatedConfig(this);
22457
+ const searchParams = new URLSearchParams();
22458
+ searchParams.append("scope", options.shared ? "shared" : "created");
22459
+ searchParams.append("limit", String(limit));
22460
+ searchParams.append("offset", String(offset));
22461
+ const raw = await httpRequest({
22462
+ method: "GET",
22463
+ path: "/v2/artifacts",
22464
+ apiKey,
22465
+ apiBaseUrl,
22466
+ searchParams
22467
+ });
22468
+ if (options.json) {
22469
+ printJson(raw);
22470
+ return;
22471
+ }
22472
+ const parsed = artifactListResponseSchema.safeParse(raw);
22473
+ if (!parsed.success) {
22474
+ throw new CliError(
22475
+ `Unexpected response from the API: ${parsed.error.message}`
22476
+ );
22477
+ }
22478
+ const response = parsed.data;
22479
+ if (response.artifacts.length === 0) {
22480
+ console.log("No Pulse dashboards found.");
22481
+ return;
22482
+ }
22483
+ console.log(renderTable(TABLE_COLUMNS27, response.artifacts));
22484
+ console.log(
22485
+ `Showing ${response.artifacts.length} of ${response.total} \xB7 offset ${response.offset}`
22486
+ );
22487
+ }, "listAction"));
22488
+ }
22489
+ __name(registerPulseList, "registerPulseList");
22490
+
22491
+ // src/commands/pulse/restore.ts
22492
+ function registerPulseRestore(pulse) {
22493
+ pulse.command("restore <id> <version-id>").description(
22494
+ "Restore a previous version of a dashboard, making it live again (creator only). Non-destructive \u2014 list versions with `duvo pulse versions`."
22495
+ ).option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function restoreAction(id, versionId, options) {
22496
+ const pulseId = trimRequired(id, "<id>");
22497
+ const revisionId = trimRequired(versionId, "<version-id>");
22498
+ const { apiKey, apiBaseUrl } = await requireAuthenticatedConfig(this);
22499
+ const raw = await httpRequest({
22500
+ method: "POST",
22501
+ path: `/v2/artifacts/${encodeURIComponent(pulseId)}/revisions/${encodeURIComponent(revisionId)}/restore`,
22502
+ apiKey,
22503
+ apiBaseUrl,
22504
+ body: {}
22505
+ });
22506
+ if (options.json) {
22507
+ printJson(raw);
22508
+ return;
22509
+ }
22510
+ const parsed = restoreArtifactRevisionResponseSchema.safeParse(raw);
22511
+ if (!parsed.success) {
22512
+ throw new CliError(
22513
+ `Unexpected response from the API: ${parsed.error.message}`
22514
+ );
22515
+ }
22516
+ console.log(
22517
+ green(
22518
+ `Restored version ${parsed.data.current_version} as the live dashboard.`
22519
+ )
22520
+ );
22521
+ }, "restoreAction"));
22522
+ }
22523
+ __name(registerPulseRestore, "registerPulseRestore");
22524
+
22525
+ // src/commands/pulse/send-message.ts
22526
+ function registerPulseSendMessage(pulse) {
22527
+ pulse.command("send-message <id>").description(
22528
+ "Send an instruction to iterate on a dashboard (e.g. 'make it a bar chart'). Only the creator can iterate; the agent regenerates asynchronously."
22529
+ ).requiredOption("--message <text>", "the instruction (max 10000 chars)").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function sendMessageAction(id, options) {
22530
+ const pulseId = trimRequired(id, "<id>");
22531
+ const message = options.message?.trim();
22532
+ if (!message) {
22533
+ throw new CliError("--message is required.");
22534
+ }
22535
+ const { apiKey, apiBaseUrl } = await requireAuthenticatedConfig(this);
22536
+ const raw = await httpRequest({
22537
+ method: "POST",
22538
+ path: `/v2/artifacts/${encodeURIComponent(pulseId)}/messages`,
22539
+ apiKey,
22540
+ apiBaseUrl,
22541
+ body: { message }
22542
+ });
22543
+ if (options.json) {
22544
+ printJson(raw);
22545
+ return;
22546
+ }
22547
+ const parsed = sendArtifactMessageResponseSchema.safeParse(raw);
22548
+ if (!parsed.success) {
22549
+ throw new CliError(
22550
+ `Unexpected response from the API: ${parsed.error.message}`
22551
+ );
22552
+ }
22553
+ console.log(
22554
+ green("Instruction sent. The agent is updating the dashboard\u2026")
22555
+ );
22556
+ console.log();
22557
+ console.log(`Track progress with: duvo pulse get ${pulseId}`);
22558
+ }, "sendMessageAction"));
22559
+ }
22560
+ __name(registerPulseSendMessage, "registerPulseSendMessage");
22561
+
22562
+ // src/commands/pulse/versions.ts
22563
+ function registerPulseVersions(pulse) {
22564
+ pulse.command("versions <id>").description(
22565
+ "List a Pulse dashboard's version history, newest first (the 'time machine'). Restore one with `duvo pulse restore`."
22566
+ ).option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function versionsAction(id, options) {
22567
+ const pulseId = trimRequired(id, "<id>");
22568
+ const { apiKey, apiBaseUrl } = await requireAuthenticatedConfig(this);
22569
+ const raw = await httpRequest({
22570
+ method: "GET",
22571
+ path: `/v2/artifacts/${encodeURIComponent(pulseId)}/revisions`,
22572
+ apiKey,
22573
+ apiBaseUrl
22574
+ });
22575
+ if (options.json) {
22576
+ printJson(raw);
22577
+ return;
22578
+ }
22579
+ const parsed = artifactRevisionListResponseSchema.safeParse(raw);
22580
+ if (!parsed.success) {
22581
+ throw new CliError(
22582
+ `Unexpected response from the API: ${parsed.error.message}`
22583
+ );
22584
+ }
22585
+ const { revisions, current_revision_id: currentRevisionId } = parsed.data;
22586
+ if (revisions.length === 0) {
22587
+ console.log("No versions yet.");
22588
+ return;
22589
+ }
22590
+ const columns = [
22591
+ {
22592
+ header: "",
22593
+ cell: /* @__PURE__ */ __name((row) => row.id === currentRevisionId ? "\u25B6" : "", "cell")
22594
+ },
22595
+ {
22596
+ header: "VERSION",
22597
+ cell: /* @__PURE__ */ __name((row) => String(row.version), "cell")
22598
+ },
22599
+ { header: "ID", cell: /* @__PURE__ */ __name((row) => row.id, "cell") },
22600
+ { header: "CREATED", cell: /* @__PURE__ */ __name((row) => row.created_at, "cell") }
22601
+ ];
22602
+ console.log(renderTable(columns, revisions));
22603
+ console.log(`\u25B6 marks the current (live) version.`);
22604
+ }, "versionsAction"));
22605
+ }
22606
+ __name(registerPulseVersions, "registerPulseVersions");
22607
+
22608
+ // src/commands/pulse/index.ts
22609
+ function registerPulse(program) {
22610
+ const pulse = program.command("pulse").description("Manage Duvo Pulse dashboards in the public API");
22611
+ registerPulseList(pulse);
22612
+ registerPulseCreate(pulse);
22613
+ registerPulseGet(pulse);
22614
+ registerPulseHtml(pulse);
22615
+ registerPulseSendMessage(pulse);
22616
+ registerPulseDelete(pulse);
22617
+ registerPulseVersions(pulse);
22618
+ registerPulseRestore(pulse);
22619
+ }
22620
+ __name(registerPulse, "registerPulse");
22621
+
22622
+ // src/commands/queue-labels/index.ts
22623
+ var TABLE_COLUMNS28 = [
21838
22624
  { header: "ID", cell: /* @__PURE__ */ __name((row) => row.id, "cell") },
21839
22625
  { header: "KEY", cell: /* @__PURE__ */ __name((row) => row.key, "cell") },
21840
22626
  { header: "VALUE", cell: /* @__PURE__ */ __name((row) => row.value, "cell") },
@@ -21888,7 +22674,7 @@ function registerList3(labels) {
21888
22674
  console.log("No labels defined on this queue.");
21889
22675
  return;
21890
22676
  }
21891
- console.log(renderTable(TABLE_COLUMNS27, parsed.data.labels));
22677
+ console.log(renderTable(TABLE_COLUMNS28, parsed.data.labels));
21892
22678
  console.log(`Showing ${parsed.data.labels.length}`);
21893
22679
  }, "listAction"));
21894
22680
  }
@@ -22639,10 +23425,10 @@ function registerQueuesLinkAgent(queues) {
22639
23425
  __name(registerQueuesLinkAgent, "registerQueuesLinkAgent");
22640
23426
 
22641
23427
  // src/commands/queues/list.ts
22642
- var DEFAULT_LIMIT7 = 20;
22643
- var MIN_LIMIT7 = 1;
22644
- var MAX_LIMIT7 = 100;
22645
- var TABLE_COLUMNS28 = [
23428
+ var DEFAULT_LIMIT9 = 20;
23429
+ var MIN_LIMIT9 = 1;
23430
+ var MAX_LIMIT9 = 100;
23431
+ var TABLE_COLUMNS29 = [
22646
23432
  { header: "ID", cell: /* @__PURE__ */ __name((row) => row.id, "cell") },
22647
23433
  { header: "NAME", cell: /* @__PURE__ */ __name((row) => row.name, "cell") },
22648
23434
  {
@@ -22653,11 +23439,11 @@ var TABLE_COLUMNS28 = [
22653
23439
  { header: "CREATED", cell: /* @__PURE__ */ __name((row) => row.created_at ?? "", "cell") }
22654
23440
  ];
22655
23441
  function registerQueuesList(queues) {
22656
- queues.command("list", { isDefault: true }).description("List queues for your team").option("--limit <n>", `page size (${MIN_LIMIT7}-${MAX_LIMIT7})`).option("--offset <n>", "number of queues to skip").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function listAction(options) {
23442
+ queues.command("list", { isDefault: true }).description("List queues for your team").option("--limit <n>", `page size (${MIN_LIMIT9}-${MAX_LIMIT9})`).option("--offset <n>", "number of queues to skip").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function listAction(options) {
22657
23443
  const limit = parseLimit(options.limit, {
22658
- defaultValue: DEFAULT_LIMIT7,
22659
- min: MIN_LIMIT7,
22660
- max: MAX_LIMIT7
23444
+ defaultValue: DEFAULT_LIMIT9,
23445
+ min: MIN_LIMIT9,
23446
+ max: MAX_LIMIT9
22661
23447
  });
22662
23448
  const offset = parseOffset(options.offset);
22663
23449
  const config = await requireAuthenticatedConfig(this);
@@ -22690,7 +23476,7 @@ function registerQueuesList(queues) {
22690
23476
  console.log("No queues found.");
22691
23477
  return;
22692
23478
  }
22693
- console.log(renderTable(TABLE_COLUMNS28, response.queues));
23479
+ console.log(renderTable(TABLE_COLUMNS29, response.queues));
22694
23480
  const resolvedOffset = response.offset ?? offset;
22695
23481
  const total = response.total ?? null;
22696
23482
  const summary = total === null ? `Showing ${response.queues.length} \xB7 offset ${resolvedOffset}` : `Showing ${response.queues.length} of ${total} \xB7 offset ${resolvedOffset}`;
@@ -22948,7 +23734,7 @@ function registerRevisionLoginsDetach(revisionLogins) {
22948
23734
  __name(registerRevisionLoginsDetach, "registerRevisionLoginsDetach");
22949
23735
 
22950
23736
  // src/commands/revision-logins/list.ts
22951
- var TABLE_COLUMNS29 = [
23737
+ var TABLE_COLUMNS30 = [
22952
23738
  { header: "ID", cell: /* @__PURE__ */ __name((row) => row.id, "cell") },
22953
23739
  { header: "DOMAIN", cell: /* @__PURE__ */ __name((row) => row.domain, "cell") },
22954
23740
  {
@@ -22984,7 +23770,7 @@ function registerRevisionLoginsList(revisionLogins) {
22984
23770
  console.log("No browser logins attached to this revision.");
22985
23771
  return;
22986
23772
  }
22987
- console.log(renderTable(TABLE_COLUMNS29, rows));
23773
+ console.log(renderTable(TABLE_COLUMNS30, rows));
22988
23774
  console.log(`Showing ${rows.length}`);
22989
23775
  }, "listAction"));
22990
23776
  }
@@ -23057,7 +23843,7 @@ function registerRevisionSecretsDetach(revisionSecrets) {
23057
23843
  __name(registerRevisionSecretsDetach, "registerRevisionSecretsDetach");
23058
23844
 
23059
23845
  // src/commands/revision-secrets/list.ts
23060
- var TABLE_COLUMNS30 = [
23846
+ var TABLE_COLUMNS31 = [
23061
23847
  { header: "ID", cell: /* @__PURE__ */ __name((row) => row.id, "cell") },
23062
23848
  { header: "NAME", cell: /* @__PURE__ */ __name((row) => row.name, "cell") },
23063
23849
  {
@@ -23095,7 +23881,7 @@ function registerRevisionSecretsList(revisionSecrets) {
23095
23881
  console.log("No secrets attached to this revision.");
23096
23882
  return;
23097
23883
  }
23098
- console.log(renderTable(TABLE_COLUMNS30, rows));
23884
+ console.log(renderTable(TABLE_COLUMNS31, rows));
23099
23885
  console.log(`Showing ${rows.length}`);
23100
23886
  }, "listAction"));
23101
23887
  }
@@ -23340,13 +24126,13 @@ function registerRunsGet(runs) {
23340
24126
  __name(registerRunsGet, "registerRunsGet");
23341
24127
 
23342
24128
  // src/commands/runs/list.ts
23343
- var DEFAULT_LIMIT8 = 20;
23344
- var MIN_LIMIT8 = 1;
23345
- var MAX_LIMIT8 = 100;
24129
+ var DEFAULT_LIMIT10 = 20;
24130
+ var MIN_LIMIT10 = 1;
24131
+ var MAX_LIMIT10 = 100;
23346
24132
  var SORT_ORDERS2 = ["asc", "desc"];
23347
24133
  var HAS_ISSUES_VALUES = ["true", "false"];
23348
24134
  var TITLE_PREVIEW_WIDTH = 50;
23349
- var TABLE_COLUMNS31 = [
24135
+ var TABLE_COLUMNS32 = [
23350
24136
  { header: "ID", cell: /* @__PURE__ */ __name((row) => row.id, "cell") },
23351
24137
  { header: "RUN#", cell: /* @__PURE__ */ __name((row) => String(row.run_number), "cell") },
23352
24138
  { header: "STATUS", cell: /* @__PURE__ */ __name((row) => row.status, "cell") },
@@ -23370,7 +24156,7 @@ function isHasIssuesValue(value) {
23370
24156
  }
23371
24157
  __name(isHasIssuesValue, "isHasIssuesValue");
23372
24158
  function registerRunsList(runs) {
23373
- runs.command("list").description("List agent runs for your team").option("--limit <n>", `page size (${MIN_LIMIT8}-${MAX_LIMIT8})`).option("--offset <n>", "number of runs to skip").option("--sort-order <order>", `sort direction (${SORT_ORDERS2.join("|")})`).option(
24159
+ runs.command("list").description("List agent runs for your team").option("--limit <n>", `page size (${MIN_LIMIT10}-${MAX_LIMIT10})`).option("--offset <n>", "number of runs to skip").option("--sort-order <order>", `sort direction (${SORT_ORDERS2.join("|")})`).option(
23374
24160
  "--status <status>",
23375
24161
  "filter by status (e.g. running, completed, failed, waiting, interrupted, stopped, needs_attention)"
23376
24162
  ).option("--agent <id>", "filter by agent ID").option("--user <id>", "filter by user ID").option("--case-queue <id>", "filter by queue ID").option("--source <source>", "filter by source").option("--search <query>", "free-text search across runs").option(
@@ -23378,9 +24164,9 @@ function registerRunsList(runs) {
23378
24164
  `show only runs with (or without) issues (${HAS_ISSUES_VALUES.join("|")})`
23379
24165
  ).option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function listAction(options) {
23380
24166
  const limit = parseLimit(options.limit, {
23381
- defaultValue: DEFAULT_LIMIT8,
23382
- min: MIN_LIMIT8,
23383
- max: MAX_LIMIT8
24167
+ defaultValue: DEFAULT_LIMIT10,
24168
+ min: MIN_LIMIT10,
24169
+ max: MAX_LIMIT10
23384
24170
  });
23385
24171
  const offset = parseOffset(options.offset);
23386
24172
  if (options.sortOrder !== void 0 && !isSortOrder(options.sortOrder)) {
@@ -23447,7 +24233,7 @@ function registerRunsList(runs) {
23447
24233
  console.log("No runs found.");
23448
24234
  return;
23449
24235
  }
23450
- console.log(renderTable(TABLE_COLUMNS31, response.data));
24236
+ console.log(renderTable(TABLE_COLUMNS32, response.data));
23451
24237
  console.log(
23452
24238
  `Showing ${response.data.length} of ${response.total} \xB7 offset ${offset}`
23453
24239
  );
@@ -23553,11 +24339,11 @@ function getContent(msg) {
23553
24339
  __name(getContent, "getContent");
23554
24340
 
23555
24341
  // src/commands/runs/messages.ts
23556
- var DEFAULT_LIMIT9 = 20;
23557
- var MIN_LIMIT9 = 1;
23558
- var MAX_LIMIT9 = 50;
24342
+ var DEFAULT_LIMIT11 = 20;
24343
+ var MIN_LIMIT11 = 1;
24344
+ var MAX_LIMIT11 = 50;
23559
24345
  var TEXT_PREVIEW_WIDTH2 = 60;
23560
- var TABLE_COLUMNS32 = [
24346
+ var TABLE_COLUMNS33 = [
23561
24347
  { header: "ID", cell: /* @__PURE__ */ __name((row) => row.id, "cell") },
23562
24348
  { header: "ROLE", cell: /* @__PURE__ */ __name((row) => row.role, "cell") },
23563
24349
  { header: "TYPE", cell: /* @__PURE__ */ __name((row) => row.type, "cell") },
@@ -23582,7 +24368,7 @@ function previewCell(row) {
23582
24368
  }
23583
24369
  __name(previewCell, "previewCell");
23584
24370
  function registerRunsMessages(runs) {
23585
- runs.command("messages <id>").description("List messages for an agent run").option("--limit <n>", `page size (${MIN_LIMIT9}-${MAX_LIMIT9})`).option("--offset <n>", "number of messages to skip").option("--follow", "poll for new messages until the job completes").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function messagesAction(id, options) {
24371
+ runs.command("messages <id>").description("List messages for an agent run").option("--limit <n>", `page size (${MIN_LIMIT11}-${MAX_LIMIT11})`).option("--offset <n>", "number of messages to skip").option("--follow", "poll for new messages until the job completes").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function messagesAction(id, options) {
23586
24372
  const offset = parseOffset(options.offset);
23587
24373
  const { apiKey, apiBaseUrl } = await requireAuthenticatedConfig(this);
23588
24374
  if (options.follow) {
@@ -23593,9 +24379,9 @@ function registerRunsMessages(runs) {
23593
24379
  return;
23594
24380
  }
23595
24381
  const limit = parseLimit(options.limit, {
23596
- defaultValue: DEFAULT_LIMIT9,
23597
- min: MIN_LIMIT9,
23598
- max: MAX_LIMIT9
24382
+ defaultValue: DEFAULT_LIMIT11,
24383
+ min: MIN_LIMIT11,
24384
+ max: MAX_LIMIT11
23599
24385
  });
23600
24386
  const searchParams = new URLSearchParams();
23601
24387
  searchParams.append("limit", String(limit));
@@ -23622,7 +24408,7 @@ function registerRunsMessages(runs) {
23622
24408
  console.log("No messages found.");
23623
24409
  return;
23624
24410
  }
23625
- console.log(renderTable(TABLE_COLUMNS32, response.messages));
24411
+ console.log(renderTable(TABLE_COLUMNS33, response.messages));
23626
24412
  const resolvedOffset = response.offset ?? offset;
23627
24413
  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}`;
23628
24414
  console.log(summary);
@@ -23948,7 +24734,7 @@ function registerSandboxesCreate(sandboxes) {
23948
24734
  __name(registerSandboxesCreate, "registerSandboxesCreate");
23949
24735
 
23950
24736
  // src/commands/sandboxes/files.ts
23951
- var TABLE_COLUMNS33 = [
24737
+ var TABLE_COLUMNS34 = [
23952
24738
  { header: "TYPE", cell: /* @__PURE__ */ __name((row) => row.type, "cell") },
23953
24739
  { header: "NAME", cell: /* @__PURE__ */ __name((row) => row.name, "cell") },
23954
24740
  { header: "PATH", cell: /* @__PURE__ */ __name((row) => row.path, "cell") },
@@ -23986,7 +24772,7 @@ function registerSandboxesFiles(sandboxes) {
23986
24772
  console.log("No files found.");
23987
24773
  return;
23988
24774
  }
23989
- console.log(renderTable(TABLE_COLUMNS33, files));
24775
+ console.log(renderTable(TABLE_COLUMNS34, files));
23990
24776
  console.log(`Showing ${files.length}`);
23991
24777
  }, "filesAction"));
23992
24778
  }
@@ -24331,7 +25117,7 @@ function registerSecretsGet(secrets) {
24331
25117
  __name(registerSecretsGet, "registerSecretsGet");
24332
25118
 
24333
25119
  // src/commands/secrets/list.ts
24334
- var TABLE_COLUMNS34 = [
25120
+ var TABLE_COLUMNS35 = [
24335
25121
  { header: "ID", cell: /* @__PURE__ */ __name((row) => row.id, "cell") },
24336
25122
  { header: "NAME", cell: /* @__PURE__ */ __name((row) => row.name, "cell") },
24337
25123
  {
@@ -24375,7 +25161,7 @@ function registerSecretsList(secrets) {
24375
25161
  console.log("No secrets found.");
24376
25162
  return;
24377
25163
  }
24378
- console.log(renderTable(TABLE_COLUMNS34, rows));
25164
+ console.log(renderTable(TABLE_COLUMNS35, rows));
24379
25165
  console.log(`Showing ${rows.length}`);
24380
25166
  }, "listAction"));
24381
25167
  }
@@ -24486,7 +25272,7 @@ function registerSecrets(program) {
24486
25272
  __name(registerSecrets, "registerSecrets");
24487
25273
 
24488
25274
  // src/commands/skills/assignments.ts
24489
- var TABLE_COLUMNS35 = [
25275
+ var TABLE_COLUMNS36 = [
24490
25276
  { header: "ID", cell: /* @__PURE__ */ __name((row) => row.id, "cell") },
24491
25277
  { header: "NAME", cell: /* @__PURE__ */ __name((row) => row.name, "cell") }
24492
25278
  ];
@@ -24514,7 +25300,7 @@ function registerSkillsAssignments(skills) {
24514
25300
  console.log("No agents use this skill.");
24515
25301
  return;
24516
25302
  }
24517
- console.log(renderTable(TABLE_COLUMNS35, assignments));
25303
+ console.log(renderTable(TABLE_COLUMNS36, assignments));
24518
25304
  console.log(`Showing ${assignments.length} of ${total}`);
24519
25305
  }, "assignmentsAction"));
24520
25306
  }
@@ -24796,7 +25582,7 @@ function readContent2(options) {
24796
25582
  __name(readContent2, "readContent");
24797
25583
 
24798
25584
  // src/commands/skills/files.ts
24799
- var TABLE_COLUMNS36 = [
25585
+ var TABLE_COLUMNS37 = [
24800
25586
  { header: "PATH", cell: /* @__PURE__ */ __name((row) => row.path, "cell") },
24801
25587
  { header: "NAME", cell: /* @__PURE__ */ __name((row) => row.name, "cell") },
24802
25588
  {
@@ -24835,7 +25621,7 @@ function registerSkillsFiles(skills) {
24835
25621
  console.log("No files found.");
24836
25622
  return;
24837
25623
  }
24838
- console.log(renderTable(TABLE_COLUMNS36, parsed.data.files));
25624
+ console.log(renderTable(TABLE_COLUMNS37, parsed.data.files));
24839
25625
  console.log(`Showing ${parsed.data.files.length}`);
24840
25626
  }, "filesAction"));
24841
25627
  }
@@ -25213,12 +25999,12 @@ function registerSuggestionsConsume(suggestions) {
25213
25999
  __name(registerSuggestionsConsume, "registerSuggestionsConsume");
25214
26000
 
25215
26001
  // src/commands/suggestions/list.ts
25216
- var DEFAULT_LIMIT10 = 100;
25217
- var MIN_LIMIT10 = 1;
25218
- var MAX_LIMIT10 = 250;
26002
+ var DEFAULT_LIMIT12 = 100;
26003
+ var MIN_LIMIT12 = 1;
26004
+ var MAX_LIMIT12 = 250;
25219
26005
  var STATUS_FILTERS = ["pending", "history"];
25220
26006
  var TITLE_PREVIEW_WIDTH2 = 50;
25221
- var TABLE_COLUMNS37 = [
26007
+ var TABLE_COLUMNS38 = [
25222
26008
  { header: "ID", cell: /* @__PURE__ */ __name((row) => row.id, "cell") },
25223
26009
  { header: "TYPE", cell: /* @__PURE__ */ __name((row) => row.type, "cell") },
25224
26010
  { header: "STATUS", cell: /* @__PURE__ */ __name((row) => row.status, "cell") },
@@ -25239,11 +26025,11 @@ function registerSuggestionsList(suggestions) {
25239
26025
  ).option(
25240
26026
  "--status <filter>",
25241
26027
  `which inbox to show (${STATUS_FILTERS.join("|")}, default: pending)`
25242
- ).option("--limit <n>", `page size (${MIN_LIMIT10}-${MAX_LIMIT10})`).option("--offset <n>", "number of suggestions to skip").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function listAction(agentId, options) {
26028
+ ).option("--limit <n>", `page size (${MIN_LIMIT12}-${MAX_LIMIT12})`).option("--offset <n>", "number of suggestions to skip").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function listAction(agentId, options) {
25243
26029
  const limit = parseLimit(options.limit, {
25244
- defaultValue: DEFAULT_LIMIT10,
25245
- min: MIN_LIMIT10,
25246
- max: MAX_LIMIT10
26030
+ defaultValue: DEFAULT_LIMIT12,
26031
+ min: MIN_LIMIT12,
26032
+ max: MAX_LIMIT12
25247
26033
  });
25248
26034
  const offset = parseOffset(options.offset);
25249
26035
  if (options.status !== void 0 && !isStatusFilter(options.status)) {
@@ -25281,7 +26067,7 @@ function registerSuggestionsList(suggestions) {
25281
26067
  console.log(`Pending total: ${pendingCount}`);
25282
26068
  return;
25283
26069
  }
25284
- console.log(renderTable(TABLE_COLUMNS37, data));
26070
+ console.log(renderTable(TABLE_COLUMNS38, data));
25285
26071
  console.log(
25286
26072
  `Showing ${data.length} \xB7 offset ${offset} \xB7 pending total ${pendingCount}`
25287
26073
  );
@@ -25405,10 +26191,10 @@ function registerTeamGet(team) {
25405
26191
  __name(registerTeamGet, "registerTeamGet");
25406
26192
 
25407
26193
  // src/commands/team/members.ts
25408
- var DEFAULT_LIMIT11 = 50;
25409
- var MIN_LIMIT11 = 1;
25410
- var MAX_LIMIT11 = 100;
25411
- var TABLE_COLUMNS38 = [
26194
+ var DEFAULT_LIMIT13 = 50;
26195
+ var MIN_LIMIT13 = 1;
26196
+ var MAX_LIMIT13 = 100;
26197
+ var TABLE_COLUMNS39 = [
25412
26198
  { header: "ID", cell: /* @__PURE__ */ __name((row) => row.id, "cell") },
25413
26199
  { header: "NAME", cell: /* @__PURE__ */ __name((row) => row.name ?? "", "cell") },
25414
26200
  { header: "EMAIL", cell: /* @__PURE__ */ __name((row) => row.email, "cell") },
@@ -25422,11 +26208,11 @@ function registerTeamMembers(team) {
25422
26208
  team.command("members").description("List members of a team").option(
25423
26209
  "--team <id>",
25424
26210
  "team ID (defaults to the team scoped to your credentials)"
25425
- ).option("--limit <n>", `page size (${MIN_LIMIT11}-${MAX_LIMIT11})`).option("--offset <n>", "number of members to skip").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function membersAction(options) {
26211
+ ).option("--limit <n>", `page size (${MIN_LIMIT13}-${MAX_LIMIT13})`).option("--offset <n>", "number of members to skip").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function membersAction(options) {
25426
26212
  const limit = parseLimit(options.limit, {
25427
- defaultValue: DEFAULT_LIMIT11,
25428
- min: MIN_LIMIT11,
25429
- max: MAX_LIMIT11
26213
+ defaultValue: DEFAULT_LIMIT13,
26214
+ min: MIN_LIMIT13,
26215
+ max: MAX_LIMIT13
25430
26216
  });
25431
26217
  const offset = parseOffset(options.offset);
25432
26218
  const config = await requireAuthenticatedConfig(this);
@@ -25459,7 +26245,7 @@ function registerTeamMembers(team) {
25459
26245
  console.log("No members found.");
25460
26246
  return;
25461
26247
  }
25462
- console.log(renderTable(TABLE_COLUMNS38, response.members));
26248
+ console.log(renderTable(TABLE_COLUMNS39, response.members));
25463
26249
  console.log(
25464
26250
  `Showing ${response.members.length} of ${response.total} \xB7 offset ${response.offset}`
25465
26251
  );
@@ -25657,7 +26443,7 @@ __name(resolveActiveTeamId, "resolveActiveTeamId");
25657
26443
  var version = resolveVersion();
25658
26444
  function resolveVersion() {
25659
26445
  if (true) {
25660
- return "1.7.1";
26446
+ return "1.9.0";
25661
26447
  }
25662
26448
  const packageJsonPath = join3(
25663
26449
  dirname3(fileURLToPath2(import.meta.url)),
@@ -25717,6 +26503,7 @@ function createProgram() {
25717
26503
  registerRevisionSecrets(program);
25718
26504
  registerRevisionLogins(program);
25719
26505
  registerClarity(program);
26506
+ registerPulse(program);
25720
26507
  return program;
25721
26508
  }
25722
26509
  __name(createProgram, "createProgram");
@@ -25740,7 +26527,7 @@ function checkForUpdate() {
25740
26527
  __name(checkForUpdate, "checkForUpdate");
25741
26528
  function loadPackageMeta() {
25742
26529
  if (true) {
25743
- return { name: "@duvoai/cli", version: "1.7.1" };
26530
+ return { name: "@duvoai/cli", version: "1.9.0" };
25744
26531
  }
25745
26532
  const require2 = createRequire(import.meta.url);
25746
26533
  const raw = require2("../package.json");