@duvoai/cli 1.113.0 → 1.114.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -231,6 +231,7 @@ Default output is summary-first and compact. JSON output also includes a compact
231
231
  | `duvo automations create --name <name>` | Create an automation (its first agent is created alongside it) |
232
232
  | `duvo automations rename <id> --name <name>` | Rename an automation |
233
233
  | `duvo automations duplicate <id>` (alias `clone`) | Duplicate an automation into a "Copy of …" automation from its live agents, queues and routing; your triggers and schedules are copied switched off (`--json`) |
234
+ | `duvo automations convert-to-team <id>` | Convert an automation to run as your team (one-way). Members' personal triggers and schedules on it are turned off; copy your own AOP exceptions with `--copy-exception` (`--yes`, `--json`) |
234
235
  | `duvo automations delete <id>` | Delete an automation (its agents and queues stop dispatching) |
235
236
  | `duvo automations current <id>` | Show what an automation is set up to do right now (agents, queues, triggers, schedules) |
236
237
  | `duvo automations flow <id>` | Show an automation's current flow graph (agents, queues, handovers) |
package/dist/bin/duvo.js CHANGED
@@ -1501,6 +1501,23 @@ var interviewTopicCoverageSummarySchema = z6.discriminatedUnion(
1501
1501
  })
1502
1502
  ]
1503
1503
  );
1504
+ var captureTopicEvaluationSchema = z6.discriminatedUnion("kind", [
1505
+ z6.object({
1506
+ kind: z6.literal("scored"),
1507
+ covered: z6.number().int().nonnegative(),
1508
+ total: z6.number().int().nonnegative()
1509
+ }),
1510
+ z6.object({
1511
+ kind: z6.enum([
1512
+ "pending",
1513
+ "failed",
1514
+ "missing",
1515
+ "excluded",
1516
+ "no_transcript",
1517
+ "targeted"
1518
+ ])
1519
+ })
1520
+ ]);
1504
1521
  var interviewTopicSummaryEntrySchema = z6.object({
1505
1522
  id: z6.string(),
1506
1523
  label: z6.string(),
@@ -3194,7 +3211,9 @@ var clarityLandscapePersonInterviewSchema = z11.object({
3194
3211
  /** The uploaded file's name. Absent from an older backend. */
3195
3212
  documentFileName: z11.string().nullable().optional(),
3196
3213
  /** Why a failed capture failed. Absent from an older backend. */
3197
- processingFailureReason: z11.string().nullable().optional()
3214
+ processingFailureReason: z11.string().nullable().optional(),
3215
+ /** Only supplied for completed interviews when the viewer can see evaluations. */
3216
+ topicEvaluation: captureTopicEvaluationSchema.optional()
3198
3217
  });
3199
3218
  var clarityLandscapePersonInterviewCountsSchema = z11.object({
3200
3219
  total: z11.number().int().nonnegative(),
@@ -3217,8 +3236,10 @@ var clarityLandscapePersonSchema = clarityHierarchyPersonSchema.extend(
3217
3236
  captureStatusCounts: clarityCaptureStatusCountsSchema.optional(),
3218
3237
  /**
3219
3238
  * How well this person's captures on the process covered the standard
3220
- * interview topics. Null when they have no completed interview; absent
3221
- * from an older backend or when topic coverage is off.
3239
+ * interview topics. Null when they have interviews that can be scored
3240
+ * and none has a saved score. Absent when no capture of theirs can be
3241
+ * scored (only meetings, documents, or excluded or targeted sessions),
3242
+ * from an older backend, or when topic coverage is off.
3222
3243
  */
3223
3244
  topicCoverage: interviewTopicCoverageSummarySchema.nullable().optional(),
3224
3245
  /**
@@ -3231,8 +3252,10 @@ var clarityLandscapePersonSchema = clarityHierarchyPersonSchema.extend(
3231
3252
  /**
3232
3253
  * How many topics a follow-up could still fill in for this person here:
3233
3254
  * the gaps of the checklist their latest graded interview ran on, plus topics
3234
- * process guidance added. Zero when nothing is left; absent from an older
3235
- * backend or when topic coverage is off.
3255
+ * process guidance added. The People view reads this field's presence as
3256
+ * "coverage is on", to tell a row with nothing to score from coverage being
3257
+ * off, so coverage-enabled rows always send the count, including zero.
3258
+ * Absent from an older backend or when coverage is off.
3236
3259
  */
3237
3260
  topicFollowUpTopicCount: z11.number().int().nonnegative().optional(),
3238
3261
  /**
@@ -5485,6 +5508,11 @@ var startInterviewCaptureResponseSchema = clarityCaptureSchema.extend({
5485
5508
  * each director pass (`clarity_interview_conversational_prompt`).
5486
5509
  */
5487
5510
  directorBrief: z16.boolean().optional(),
5511
+ /**
5512
+ * True when recording media uploads are blocked for this team (e.g. PII
5513
+ * scrubbing is enabled). Omitted by older backends.
5514
+ */
5515
+ recordingMediaBlocked: z16.boolean().optional(),
5488
5516
  /**
5489
5517
  * @deprecated Use `instructions` instead.
5490
5518
  * Process-level guidance authored by the process owner via the "Process
@@ -5633,7 +5661,8 @@ var startTeamInterviewResponseSchema = teamInterviewSchema.extend({
5633
5661
  instructions: z16.string().min(1),
5634
5662
  processGuidance: z16.null(),
5635
5663
  extraCaptureGuidance: z16.null(),
5636
- interviewChecklistKind: interviewChecklistKindSchema.optional()
5664
+ interviewChecklistKind: interviewChecklistKindSchema.optional(),
5665
+ recordingMediaBlocked: z16.boolean().optional()
5637
5666
  });
5638
5667
  var startOrganizationInterviewResponseSchema = organizationInterviewSchema.extend({
5639
5668
  openaiToken: z16.string(),
@@ -5643,7 +5672,8 @@ var startOrganizationInterviewResponseSchema = organizationInterviewSchema.exten
5643
5672
  instructions: z16.string().min(1),
5644
5673
  processGuidance: z16.null(),
5645
5674
  extraCaptureGuidance: z16.null(),
5646
- interviewChecklistKind: interviewChecklistKindSchema.optional()
5675
+ interviewChecklistKind: interviewChecklistKindSchema.optional(),
5676
+ recordingMediaBlocked: z16.boolean().optional()
5647
5677
  });
5648
5678
  var landscapeInterviewContextRefreshBodySchema = z16.object({
5649
5679
  elapsedSeconds: z16.number(),
@@ -5665,9 +5695,13 @@ var landscapeInterviewRouteResponseSchema = z16.object({
5665
5695
  });
5666
5696
  var MAX_TRANSCRIBE_TURN_AUDIO_BASE64_LENGTH = 384e4;
5667
5697
  var transcribeInterviewTurnBodySchema = z16.object({
5668
- /** Base64 16 kHz mono PCM16 of one participant turn. */
5698
+ /** Base64 16 kHz mono PCM16 of one participant turn (or one sequential chunk). */
5669
5699
  audio: z16.string().min(1).max(MAX_TRANSCRIBE_TURN_AUDIO_BASE64_LENGTH),
5670
- languageCodes: z16.array(z16.string().min(2).max(16)).min(1).max(4)
5700
+ languageCodes: z16.array(z16.string().min(2).max(16)).min(1).max(4),
5701
+ /** 0-based index of this chunk within a split >90s turn, for log correlation. */
5702
+ chunkIndex: z16.int().nonnegative().max(99).optional(),
5703
+ /** Total number of sequential chunks for this turn, for log correlation. */
5704
+ chunkCount: z16.int().min(1).max(100).optional()
5671
5705
  });
5672
5706
  var transcribeInterviewTurnResponseSchema = z16.object({
5673
5707
  text: z16.string()
@@ -5692,7 +5726,7 @@ var interviewUploadUrlsResponseSchema = z16.object({
5692
5726
  var recordingPartQuerySchema = z16.object({
5693
5727
  type: clarityCaptureSubTypeSchema,
5694
5728
  screenshareStartTime: z16.coerce.number().int().nonnegative(),
5695
- partCount: z16.coerce.number().int().min(1).max(4096)
5729
+ partCount: z16.coerce.number().int().min(1).max(4096).optional()
5696
5730
  });
5697
5731
  var composeRecordingPartsBodySchema = z16.object({
5698
5732
  type: clarityCaptureSubTypeSchema,
@@ -14140,6 +14174,12 @@ var automationSummaryApiSchema = z55.object({
14140
14174
  run_scope: z55.enum(["personal", "team"]).optional().describe(
14141
14175
  "Who the automation's runs execute as: its members, each with their own Connections (`personal`), or the team, with shared Connections only (`team`). An automation becomes `team` once, through convert-to-team, and never goes back. Optional because a backend that predates Team automations does not send it; a client treats absence as `personal` and offers no conversion."
14142
14176
  ),
14177
+ converted_to_team_at: z55.string().nullable().optional().describe(
14178
+ "When the automation was converted to run as the team, or null while it runs as its members."
14179
+ ),
14180
+ converted_by: z55.guid().nullable().optional().describe(
14181
+ "The member who converted the automation to run as the team, or null while it runs as its members or when that member is gone."
14182
+ ),
14143
14183
  viewer_can_edit: z55.boolean().optional().describe(
14144
14184
  "Whether the caller may change this automation. An automation takes its agents' ownership rule: a Builder may edit one whose every agent they created, and Lead Builder or above may edit any. Sent by the list and detail endpoints; absent from create and update responses, where the client falls back to the caller's role."
14145
14185
  ),
@@ -14331,6 +14371,114 @@ var duplicateAutomationResponseApiSchema = z55.object({
14331
14371
  "The new automation: a copy of the source's live agents, builds, queues and the routing between them."
14332
14372
  )
14333
14373
  });
14374
+ var TEAM_CONVERSION_BLOCKER_CODES = [
14375
+ "automations_workspace_required",
14376
+ "module_demo",
14377
+ "team_automations_flag_off",
14378
+ "already_team",
14379
+ "automation_revisions",
14380
+ "connection_sharing_off",
14381
+ "writes_to_personal_queue",
14382
+ "read_by_personal_agent"
14383
+ ];
14384
+ var teamConversionBlockerApiSchema = z55.object({
14385
+ code: z55.enum(TEAM_CONVERSION_BLOCKER_CODES),
14386
+ message: z55.string(),
14387
+ agent_id: z55.string().nullable(),
14388
+ agent_name: z55.string().nullable(),
14389
+ queue_id: z55.string().nullable(),
14390
+ queue_name: z55.string().nullable(),
14391
+ queue_automation_id: z55.string().nullable(),
14392
+ queue_automation_name: z55.string().nullable()
14393
+ });
14394
+ var teamConversionPreviewApiSchema = z55.object({
14395
+ personal_rows: z55.array(
14396
+ z55.object({
14397
+ user_id: z55.string(),
14398
+ name: z55.string().nullable(),
14399
+ email: z55.string().nullable(),
14400
+ triggers: z55.number().int(),
14401
+ schedules: z55.number().int()
14402
+ })
14403
+ ),
14404
+ personal_row_totals: z55.object({
14405
+ members: z55.number().int(),
14406
+ triggers: z55.number().int(),
14407
+ schedules: z55.number().int()
14408
+ }),
14409
+ agents: z55.array(
14410
+ z55.object({
14411
+ agent_id: z55.string(),
14412
+ agent_name: z55.string(),
14413
+ agent_type: stepTypeSchema,
14414
+ slots_without_team_connection: z55.array(
14415
+ z55.object({
14416
+ integration_id: z55.string().nullable(),
14417
+ custom_integration_id: z55.string().nullable(),
14418
+ integration_type: z55.string(),
14419
+ name: z55.string()
14420
+ })
14421
+ ),
14422
+ secrets_without_team_access: z55.number().int(),
14423
+ logins_without_team_access: z55.number().int()
14424
+ })
14425
+ ),
14426
+ own_aop_exceptions: z55.array(
14427
+ z55.object({
14428
+ id: z55.string(),
14429
+ agent_id: z55.string(),
14430
+ agent_name: z55.string(),
14431
+ label: z55.string(),
14432
+ content: z55.string(),
14433
+ enabled: z55.boolean()
14434
+ })
14435
+ ),
14436
+ no_responsible_people: z55.boolean(),
14437
+ pending_cases: z55.number().int()
14438
+ });
14439
+ var automationTeamConversionResponseApiSchema = z55.object({
14440
+ convertible: z55.boolean(),
14441
+ blocker: teamConversionBlockerApiSchema.nullable(),
14442
+ preview: teamConversionPreviewApiSchema.nullable()
14443
+ });
14444
+ var automationTeamConversionClientResponseSchema = automationTeamConversionResponseApiSchema.extend({
14445
+ blocker: teamConversionBlockerApiSchema.extend({ code: z55.string() }).nullable(),
14446
+ preview: teamConversionPreviewApiSchema.extend({
14447
+ agents: z55.array(
14448
+ teamConversionPreviewApiSchema.shape.agents.element.extend({
14449
+ agent_type: z55.string()
14450
+ })
14451
+ ),
14452
+ own_aop_exceptions: z55.array(
14453
+ teamConversionPreviewApiSchema.shape.own_aop_exceptions.element.extend(
14454
+ { agent_name: z55.string().optional() }
14455
+ )
14456
+ )
14457
+ }).nullable()
14458
+ });
14459
+ var convertAutomationToTeamBodyApiSchema = z55.object({
14460
+ copy_aop_exception_ids: z55.array(z55.guid()).max(200).default([]).describe(
14461
+ "Your own personal AOP exceptions on this automation's agents to copy into team exceptions, which Team runs use. Only your own can be copied; another member's are never listed or copied. Omit to copy none."
14462
+ )
14463
+ });
14464
+ var convertAutomationToTeamResponseApiSchema = z55.object({
14465
+ automation: z55.object({
14466
+ id: z55.guid(),
14467
+ run_scope: z55.literal("team"),
14468
+ converted_to_team_at: z55.string(),
14469
+ converted_by: z55.guid()
14470
+ }),
14471
+ personal_triggers_turned_off: z55.int().describe(
14472
+ "Members' personal triggers turned off. They are kept, turned off, and cannot be turned back on while the automation runs as the team."
14473
+ ),
14474
+ personal_schedules_turned_off: z55.int().describe("Members' personal schedules turned off, kept the same way."),
14475
+ members_with_setup_turned_off: z55.int().describe(
14476
+ "How many members had personal triggers or schedules turned off. Each is sent a notice about their own, unless notices are off for them, or they have left the team or been suspended."
14477
+ ),
14478
+ aop_exceptions_copied: z55.int().describe(
14479
+ "How many of your AOP exceptions were copied into team exceptions."
14480
+ )
14481
+ });
14334
14482
  var deleteAutomationResponseApiSchema = z55.object({
14335
14483
  success: z55.boolean()
14336
14484
  });
@@ -15458,7 +15606,7 @@ var updateBuildBodyObjectSchema = z57.object({
15458
15606
  "The config_hash from the read this edit is based on. The save is refused with 409 (code revision_config_changed) when the revision's config no longer has that hash, so a change saved in between is not overwritten. Read the revision again and reapply the edit. Omit it to save without the check."
15459
15607
  ),
15460
15608
  require_draft: z57.boolean().optional().describe(
15461
- "When true, the save is refused with 409 unless the revision it lands on is still a draft (code revision_not_draft) with no generation running or awaiting review (code revision_generation_pending). Use it for an edit meant for review before it goes live."
15609
+ "When true, the save lands on a draft and never changes what runs. A save with a config and expected_config_hash addressed to a revision that is not a draft goes to the step's open draft, or to a new draft copied from the live revision when it has none; the response's build id names it. Without both, a save addressed to a revision that is not a draft is refused with 409 (code revision_not_draft) on a team without Automation revisions. A save whose draft has a generation running or awaiting review is refused with 409 (code revision_generation_pending), and one whose draft is made live or removed during the save with 409 (code revision_not_draft); save again. Use it for an edit meant for review before it goes live, with expected_config_hash: when the step's draft holds changes the revision you read does not, the save is refused with 409 (code revision_config_changed) naming that draft."
15462
15610
  ),
15463
15611
  handoverTargetIds: z57.array(z57.guid()).nullable().optional().describe(
15464
15612
  "Agent IDs that this agent can hand over work to, used exactly as sent; an empty list clears them. Send null to use the agents the AOP mentions with <DUVO:AGENT> tags. Omit it to leave the targets as they are."
@@ -25082,6 +25230,76 @@ function registerAutomationsConfigSections(automations) {
25082
25230
  }
25083
25231
  __name(registerAutomationsConfigSections, "registerAutomationsConfigSections");
25084
25232
 
25233
+ // src/commands/automations/convert-to-team.ts
25234
+ function collect6(value, previous = []) {
25235
+ return [...previous, value];
25236
+ }
25237
+ __name(collect6, "collect");
25238
+ function registerAutomationsConvertToTeam(automations) {
25239
+ automations.command("convert-to-team <id>").description(
25240
+ "Convert an automation so its runs execute as your team, with shared Connections only. This can't be undone. Members' personal triggers and schedules on it are turned off, and their owners are notified unless notices are off for them, or they have left the team or been suspended. Requires Manager or above and the Team automations feature."
25241
+ ).option(
25242
+ "--copy-exception <exception-id>",
25243
+ "copy one of your own AOP exceptions into team exceptions (repeatable)",
25244
+ collect6
25245
+ ).option("-y, --yes", "skip confirmation prompt").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function convertToTeamAction(id, options) {
25246
+ const automationId = trimRequired(id, "<id>");
25247
+ const { apiKey, apiBaseUrl } = await requireAuthenticatedConfig(this);
25248
+ await confirmDestructive({
25249
+ message: `Convert automation "${automationId}" to run as your team? Members' personal triggers and schedules on it will be turned off. This can't be undone.`,
25250
+ skip: Boolean(options.yes)
25251
+ });
25252
+ const raw = await httpRequest({
25253
+ method: "POST",
25254
+ path: apiPath("/v2/automations/:automation_id/convert-to-team", {
25255
+ automation_id: automationId
25256
+ }),
25257
+ apiKey,
25258
+ apiBaseUrl,
25259
+ body: {
25260
+ copy_aop_exception_ids: (options.copyException ?? []).map(
25261
+ (exceptionId) => exceptionId.trim()
25262
+ )
25263
+ }
25264
+ });
25265
+ if (options.json) {
25266
+ printJson(raw);
25267
+ return;
25268
+ }
25269
+ const parsed = convertAutomationToTeamResponseApiSchema.safeParse(raw);
25270
+ if (!parsed.success) {
25271
+ throw new CliError(
25272
+ `Unexpected response from the API: ${parsed.error.message}`
25273
+ );
25274
+ }
25275
+ const result = parsed.data;
25276
+ console.log(green("Automation now runs as your team."));
25277
+ console.log();
25278
+ console.log(
25279
+ renderKeyValue([
25280
+ { label: "ID", value: result.automation.id },
25281
+ {
25282
+ label: "Personal triggers turned off",
25283
+ value: String(result.personal_triggers_turned_off)
25284
+ },
25285
+ {
25286
+ label: "Personal schedules turned off",
25287
+ value: String(result.personal_schedules_turned_off)
25288
+ },
25289
+ {
25290
+ label: "Members with setup turned off",
25291
+ value: String(result.members_with_setup_turned_off)
25292
+ },
25293
+ {
25294
+ label: "AOP exceptions copied",
25295
+ value: String(result.aop_exceptions_copied)
25296
+ }
25297
+ ])
25298
+ );
25299
+ }, "convertToTeamAction"));
25300
+ }
25301
+ __name(registerAutomationsConvertToTeam, "registerAutomationsConvertToTeam");
25302
+
25085
25303
  // src/commands/automations/create.ts
25086
25304
  function registerAutomationsCreate(automations) {
25087
25305
  automations.command("create").description(
@@ -25383,10 +25601,10 @@ function registerAutomationsDuplicate(automations) {
25383
25601
  __name(registerAutomationsDuplicate, "registerAutomationsDuplicate");
25384
25602
 
25385
25603
  // src/commands/automations/edit-config-field.ts
25386
- function collect6(value, previous = []) {
25604
+ function collect7(value, previous = []) {
25387
25605
  return [...previous, value];
25388
25606
  }
25389
- __name(collect6, "collect");
25607
+ __name(collect7, "collect");
25390
25608
  function resolveClearable(value, clear, flag) {
25391
25609
  if (value !== void 0 && clear) {
25392
25610
  throw new CliError(`Pass either --${flag} or --clear-${flag}, not both.`);
@@ -25403,12 +25621,12 @@ function registerAutomationsEditConfigField(automations) {
25403
25621
  ).option("--guidance <text>", "new guidance on what to fill in").option("--clear-guidance", "remove the guidance").option("--example <text>", "new example answer").option("--clear-example", "remove the example answer").option("--section <name>", "move the field to the end of this section").option("--clear-section", "move the field out of any section").option(
25404
25622
  "--option <value>",
25405
25623
  "a choice of a select or multiSelect field; replaces the whole list (repeat for each)",
25406
- collect6,
25624
+ collect7,
25407
25625
  []
25408
25626
  ).option(
25409
25627
  "--column <name>",
25410
25628
  "a column of a table field with no answer yet; replaces the whole list (repeat for each, in order)",
25411
- collect6,
25629
+ collect7,
25412
25630
  []
25413
25631
  ).option(
25414
25632
  "--type <type>",
@@ -26495,6 +26713,7 @@ function registerAutomations2(program) {
26495
26713
  registerAutomationsApproveProposal(automations);
26496
26714
  registerAutomationsRename(automations);
26497
26715
  registerAutomationsDuplicate(automations);
26716
+ registerAutomationsConvertToTeam(automations);
26498
26717
  registerAutomationsDelete(automations);
26499
26718
  registerAutomationsCurrent(automations);
26500
26719
  registerAutomationsFlow(automations);
@@ -27633,9 +27852,9 @@ function registerFilesPut(files) {
27633
27852
  // mentions, and omitting the list leaves the stored ones as they are.
27634
27853
  config,
27635
27854
  ...base.configHash === void 0 ? {} : { expected_config_hash: base.configHash },
27636
- // Read as a draft above; refused if it stopped being one, or if a
27637
- // generation on it awaits review, since discarding that would
27638
- // erase this file.
27855
+ // Read as a draft above. If it was made live since, the save lands
27856
+ // on a new draft, whose id is printed below. Refused if a generation
27857
+ // on it awaits review, since discarding that would erase this file.
27639
27858
  require_draft: true
27640
27859
  },
27641
27860
  auth
@@ -41452,10 +41671,10 @@ __name(assertTeamRole, "assertTeamRole");
41452
41671
 
41453
41672
  // src/commands/invite/bulk.ts
41454
41673
  var MAX_MEMBERS = 50;
41455
- function collect7(value, previous = []) {
41674
+ function collect8(value, previous = []) {
41456
41675
  return [...previous, value];
41457
41676
  }
41458
- __name(collect7, "collect");
41677
+ __name(collect8, "collect");
41459
41678
  function parseMember(value, defaultRole) {
41460
41679
  const raw = trimRequired(value, "--member");
41461
41680
  const separator = raw.indexOf("=");
@@ -41476,7 +41695,7 @@ function registerInviteBulk(invite) {
41476
41695
  invite.command("bulk").description("Invite several people to a team and email each invitation").requiredOption(
41477
41696
  "--member <email[=role]>",
41478
41697
  "person to invite; repeat for multiple. Append =<role> to override the --role default",
41479
- collect7,
41698
+ collect8,
41480
41699
  []
41481
41700
  ).option(
41482
41701
  "--role <role>",
@@ -56370,7 +56589,7 @@ var FEATURE_FLAG_CATALOGUE = {
56370
56589
  key: "cron_free_pro_automations",
56371
56590
  defaultValue: false,
56372
56591
  stage: "temporary",
56373
- description: "Kill switch for the background conversion of every team except Enterprise ones to the lite Automations workspace. The key keeps its original Free/Pro name. When on, the `cron-automation-auto-migration` Cloud Scheduler job (POST /v1/cron/automation-auto-migration, every 5 minutes) picks a small batch of teams that are not yet on the workspace, whatever their plan \u2014 Free, Pro, Business and Clarity teams, teams whose subscription ended, whatever its plan, teams that never had one, and teams whose organization has enterprise billing or manages their grants \u2014 except a team with a live Enterprise subscription, in any status, and a team of a soft-deleted organization, which are left to the manual conversion (a team of an organization with enterprise billing that has never had a subscription also waits an hour after it is created, in case it is still mid-create); and runs the same lite conversion as POST /automations/migrate for each: agents and queues are sorted into automation containers and team.automations_migrated_at is stamped, while builds, triggers and schedules keep their legacy lifecycle. It never converts to revision semantics, and the conversion cannot be reversed. When off (the default), every tick is a no-op. The job runs unpaused in Terraform in staging and production, so turning on the global override starts conversions on the next tick. Resolved globally only \u2014 the cron has no user, team or organization to resolve against, so only the global override counts; a team, organization or user override has no effect. Independent of AUTOMATIONS and AUTOMATION_MIGRATION, which gate the manual entry point."
56592
+ description: "Kill switch for the background conversion of every team except Enterprise ones to the lite Automations workspace. The key keeps its original Free/Pro name. When on, the `cron-automation-auto-migration` Cloud Scheduler job (POST /v1/cron/automation-auto-migration, every 5 minutes) picks a small batch of teams that are not yet on the workspace, whatever their plan \u2014 Free, Pro, Business and Clarity teams, teams whose subscription ended, whatever its plan, teams that never had one, and teams whose organization has enterprise billing or manages their grants \u2014 except a team with a live Enterprise subscription, in any status, and a team of a soft-deleted organization, which are left to the manual conversion (a team of an organization with enterprise billing that has never had a subscription also waits an hour after it is created, in case it is still mid-create); and runs the same lite conversion as POST /automations/migrate for each: agents and queues are sorted into automation containers and team.automations_migrated_at is stamped, while builds, triggers and schedules keep their legacy lifecycle. It never converts to revision semantics, and the conversion cannot be reversed. When off (the default), every tick is a no-op. The job is paused in Terraform in staging and production, so turning on the global override converts nothing until the job is unpaused; the change that unpauses it also turns its Datadog missed-run monitor back on. Resolved globally only \u2014 the cron has no user, team or organization to resolve against, so only the global override counts; a team, organization or user override has no effect. Independent of AUTOMATIONS and AUTOMATION_MIGRATION, which gate the manual entry point."
56374
56593
  },
56375
56594
  AUTOMATION_HISTORY_BACKFILL_WORKER: {
56376
56595
  key: "automation_history_backfill_worker",
@@ -56589,7 +56808,7 @@ var FEATURE_FLAG_CATALOGUE = {
56589
56808
  key: "hitl_answer_delivery",
56590
56809
  defaultValue: false,
56591
56810
  stage: "temporary",
56592
- description: "Kill switch for exactly-once delivery of answers to paused Agent tools (AUT-1951). When on for a Run's team, an answer sent through the public API, MCP, CLI, Slack, Teams or bulk respond claims the request before it is sent (a second answer gets 409 `answer_in_flight`, or 400 `already_answered` once the request is settled), stamps the send with the pause's tool call id and an attempt number, and settles an unclear reply by probing the sandbox. When off (the default), those answers take the previous path: write the answer, flip the Run to running, resume once, and fall back to a restart. The resume sweeper (POST /v1/cron/hitl-resume-sweeper) settles every delivery already in flight whatever this flag says, so turning it off drains them. Resolved for the Run's team, without a user. The in-app respond route keeps the previous path, and so does the resume-tool route's live send; that route's fallback answer goes through the delivery when this flag is on (AUT-2265, AUT-2266)."
56811
+ description: "Kill switch for exactly-once delivery of answers to paused Agent tools (AUT-1951). When on for a Run's team, an answer sent through the public API, MCP, CLI, Slack, Teams or bulk respond claims the request before it is sent (a second answer gets 409 `answer_in_flight`, or 400 `already_answered` once the request is settled), stamps the send with the pause's tool call id and an attempt number, and settles an unclear reply by probing the sandbox. When off (the default), those answers take the previous path: write the answer, flip the Run to running, resume once, and fall back to a restart. The resume sweeper (POST /v1/cron/hitl-resume-sweeper) settles every delivery already in flight whatever this flag says, so turning it off drains them. Resolved for the Run's team, without a user. The in-app respond route answers a single request through the same delivery when this flag is on, and a resolved case-approval batch, from any surface, restarts its Run without a live send (request_case_approvals is an interrupt-type tool, so no live pause can take the decisions) (AUT-2266). The resume-tool route's live send keeps the previous path; that route's fallback answer goes through the delivery when this flag is on (AUT-2265)."
56593
56812
  },
56594
56813
  HUMAN_OUTCOME_LABELS: {
56595
56814
  key: "human_outcome_labels",
@@ -61430,6 +61649,23 @@ var interviewTopicCoverageSummarySchema2 = z272.discriminatedUnion(
61430
61649
  })
61431
61650
  ]
61432
61651
  );
61652
+ var captureTopicEvaluationSchema2 = z272.discriminatedUnion("kind", [
61653
+ z272.object({
61654
+ kind: z272.literal("scored"),
61655
+ covered: z272.number().int().nonnegative(),
61656
+ total: z272.number().int().nonnegative()
61657
+ }),
61658
+ z272.object({
61659
+ kind: z272.enum([
61660
+ "pending",
61661
+ "failed",
61662
+ "missing",
61663
+ "excluded",
61664
+ "no_transcript",
61665
+ "targeted"
61666
+ ])
61667
+ })
61668
+ ]);
61433
61669
  var interviewTopicSummaryEntrySchema2 = z272.object({
61434
61670
  id: z272.string(),
61435
61671
  label: z272.string(),
@@ -61524,9 +61760,7 @@ __name(combineAddedTopics, "combineAddedTopics");
61524
61760
  __name3(combineAddedTopics, "combineAddedTopics");
61525
61761
  function summarizeTopicCoverage(captures, options = {}) {
61526
61762
  const now = options.now ?? /* @__PURE__ */ new Date();
61527
- const isAnyAwaitingGrade = captures.some(
61528
- (capture) => isAwaitingGrade(capture, now)
61529
- );
61763
+ const isAnyAwaitingGrade = options.gradingEnabled !== false && captures.some((capture) => isAwaitingGrade(capture, now));
61530
61764
  const graded = gradedOnly(captures);
61531
61765
  if (graded.length > 0) {
61532
61766
  return {
@@ -63040,7 +63274,9 @@ var clarityLandscapePersonInterviewSchema2 = z322.object({
63040
63274
  /** The uploaded file's name. Absent from an older backend. */
63041
63275
  documentFileName: z322.string().nullable().optional(),
63042
63276
  /** Why a failed capture failed. Absent from an older backend. */
63043
- processingFailureReason: z322.string().nullable().optional()
63277
+ processingFailureReason: z322.string().nullable().optional(),
63278
+ /** Only supplied for completed interviews when the viewer can see evaluations. */
63279
+ topicEvaluation: captureTopicEvaluationSchema2.optional()
63044
63280
  });
63045
63281
  var clarityLandscapePersonInterviewCountsSchema2 = z322.object({
63046
63282
  total: z322.number().int().nonnegative(),
@@ -63063,8 +63299,10 @@ var clarityLandscapePersonSchema2 = clarityHierarchyPersonSchema2.extend(
63063
63299
  captureStatusCounts: clarityCaptureStatusCountsSchema2.optional(),
63064
63300
  /**
63065
63301
  * How well this person's captures on the process covered the standard
63066
- * interview topics. Null when they have no completed interview; absent
63067
- * from an older backend or when topic coverage is off.
63302
+ * interview topics. Null when they have interviews that can be scored
63303
+ * and none has a saved score. Absent when no capture of theirs can be
63304
+ * scored (only meetings, documents, or excluded or targeted sessions),
63305
+ * from an older backend, or when topic coverage is off.
63068
63306
  */
63069
63307
  topicCoverage: interviewTopicCoverageSummarySchema2.nullable().optional(),
63070
63308
  /**
@@ -63077,8 +63315,10 @@ var clarityLandscapePersonSchema2 = clarityHierarchyPersonSchema2.extend(
63077
63315
  /**
63078
63316
  * How many topics a follow-up could still fill in for this person here:
63079
63317
  * the gaps of the checklist their latest graded interview ran on, plus topics
63080
- * process guidance added. Zero when nothing is left; absent from an older
63081
- * backend or when topic coverage is off.
63318
+ * process guidance added. The People view reads this field's presence as
63319
+ * "coverage is on", to tell a row with nothing to score from coverage being
63320
+ * off, so coverage-enabled rows always send the count, including zero.
63321
+ * Absent from an older backend or when coverage is off.
63082
63322
  */
63083
63323
  topicFollowUpTopicCount: z322.number().int().nonnegative().optional(),
63084
63324
  /**
@@ -64341,6 +64581,7 @@ var queueSizingOverrideValueSchemas = {
64341
64581
  revenue_generating: z392.boolean().nullable(),
64342
64582
  headcount: z392.object({
64343
64583
  fte: z392.number({ message: "Enter the headcount" }).positive({ message: "Headcount must be above 0" }).max(1e5, { message: "Headcount must be 100,000 or less" }),
64584
+ hoursPerPersonPerMonth: z392.number({ message: "Enter the hours per person a month" }).nonnegative({ message: "Hours can't be below 0" }).optional(),
64344
64585
  sharePercent: z392.number({ message: "Enter the share of the week" }).min(1, { message: "Share of week must be 1\u2013100%" }).max(100, { message: "Share of week must be 1\u2013100%" })
64345
64586
  }).nullable(),
64346
64587
  clarity_process: z392.object({ processId: z392.guid(), source: z392.enum(["suggested", "admin"]) }).nullable(),
@@ -64436,7 +64677,19 @@ var estimateQueueSizingCaseResponseSchema = z392.object({
64436
64677
  status: z392.enum(["succeeded", "failed"])
64437
64678
  });
64438
64679
  var MINUTES_PER_HOUR = 60;
64439
- var FTE_HOURS_PER_YEAR = 1700;
64680
+ var LEGACY_QUEUE_MONTH_HOURS = 1700 / MONTHS_PER_YEAR;
64681
+ function queueHeadcount(fte, hoursPerPersonPerMonth) {
64682
+ return {
64683
+ fte,
64684
+ hoursPerPersonPerMonth,
64685
+ sharePercent: Math.min(
64686
+ 100,
64687
+ Math.max(1, hoursPerPersonPerMonth / LEGACY_QUEUE_MONTH_HOURS * 100)
64688
+ )
64689
+ };
64690
+ }
64691
+ __name(queueHeadcount, "queueHeadcount");
64692
+ __name3(queueHeadcount, "queueHeadcount");
64440
64693
  function clarityMinutesPerCase(process2) {
64441
64694
  const live = process2.versions[0];
64442
64695
  if (live.complexity.minutesPerCase !== null) {
@@ -64465,12 +64718,8 @@ function clarityQueueOverrides(process2) {
64465
64718
  }
64466
64719
  const people2 = process2.headcountOverride?.count ?? (live.headcount?.basis === "missing" ? null : live.headcount?.count);
64467
64720
  const hours = process2.timeSavedOverride?.hoursPerPersonPerMonth ?? live.hoursPerPersonPerMonth;
64468
- if (people2 && hours) {
64469
- const sharePercent = hours / (FTE_HOURS_PER_YEAR / MONTHS_PER_YEAR) * 100;
64470
- apply.headcount = {
64471
- fte: Math.min(people2, 1e5),
64472
- sharePercent: Math.min(Math.max(sharePercent, 1), 100)
64473
- };
64721
+ if (people2 && hours !== null) {
64722
+ apply.headcount = queueHeadcount(Math.min(people2, 1e5), hours);
64474
64723
  }
64475
64724
  return apply;
64476
64725
  }
@@ -66343,6 +66592,11 @@ var startInterviewCaptureResponseSchema2 = clarityCaptureSchema2.extend({
66343
66592
  * each director pass (`clarity_interview_conversational_prompt`).
66344
66593
  */
66345
66594
  directorBrief: z442.boolean().optional(),
66595
+ /**
66596
+ * True when recording media uploads are blocked for this team (e.g. PII
66597
+ * scrubbing is enabled). Omitted by older backends.
66598
+ */
66599
+ recordingMediaBlocked: z442.boolean().optional(),
66346
66600
  /**
66347
66601
  * @deprecated Use `instructions` instead.
66348
66602
  * Process-level guidance authored by the process owner via the "Process
@@ -66491,7 +66745,8 @@ var startTeamInterviewResponseSchema2 = teamInterviewSchema2.extend({
66491
66745
  instructions: z442.string().min(1),
66492
66746
  processGuidance: z442.null(),
66493
66747
  extraCaptureGuidance: z442.null(),
66494
- interviewChecklistKind: interviewChecklistKindSchema2.optional()
66748
+ interviewChecklistKind: interviewChecklistKindSchema2.optional(),
66749
+ recordingMediaBlocked: z442.boolean().optional()
66495
66750
  });
66496
66751
  var startOrganizationInterviewResponseSchema2 = organizationInterviewSchema2.extend({
66497
66752
  openaiToken: z442.string(),
@@ -66501,7 +66756,8 @@ var startOrganizationInterviewResponseSchema2 = organizationInterviewSchema2.ext
66501
66756
  instructions: z442.string().min(1),
66502
66757
  processGuidance: z442.null(),
66503
66758
  extraCaptureGuidance: z442.null(),
66504
- interviewChecklistKind: interviewChecklistKindSchema2.optional()
66759
+ interviewChecklistKind: interviewChecklistKindSchema2.optional(),
66760
+ recordingMediaBlocked: z442.boolean().optional()
66505
66761
  });
66506
66762
  var landscapeInterviewContextRefreshBodySchema2 = z442.object({
66507
66763
  elapsedSeconds: z442.number(),
@@ -66523,9 +66779,13 @@ var landscapeInterviewRouteResponseSchema2 = z442.object({
66523
66779
  });
66524
66780
  var MAX_TRANSCRIBE_TURN_AUDIO_BASE64_LENGTH2 = 384e4;
66525
66781
  var transcribeInterviewTurnBodySchema2 = z442.object({
66526
- /** Base64 16 kHz mono PCM16 of one participant turn. */
66782
+ /** Base64 16 kHz mono PCM16 of one participant turn (or one sequential chunk). */
66527
66783
  audio: z442.string().min(1).max(MAX_TRANSCRIBE_TURN_AUDIO_BASE64_LENGTH2),
66528
- languageCodes: z442.array(z442.string().min(2).max(16)).min(1).max(4)
66784
+ languageCodes: z442.array(z442.string().min(2).max(16)).min(1).max(4),
66785
+ /** 0-based index of this chunk within a split >90s turn, for log correlation. */
66786
+ chunkIndex: z442.int().nonnegative().max(99).optional(),
66787
+ /** Total number of sequential chunks for this turn, for log correlation. */
66788
+ chunkCount: z442.int().min(1).max(100).optional()
66529
66789
  });
66530
66790
  var transcribeInterviewTurnResponseSchema2 = z442.object({
66531
66791
  text: z442.string()
@@ -66550,7 +66810,7 @@ var interviewUploadUrlsResponseSchema2 = z442.object({
66550
66810
  var recordingPartQuerySchema2 = z442.object({
66551
66811
  type: clarityCaptureSubTypeSchema2,
66552
66812
  screenshareStartTime: z442.coerce.number().int().nonnegative(),
66553
- partCount: z442.coerce.number().int().min(1).max(4096)
66813
+ partCount: z442.coerce.number().int().min(1).max(4096).optional()
66554
66814
  });
66555
66815
  var composeRecordingPartsBodySchema2 = z442.object({
66556
66816
  type: clarityCaptureSubTypeSchema2,
@@ -67887,8 +68147,27 @@ __name(clarityOutputToEaseDocument, "clarityOutputToEaseDocument");
67887
68147
  __name3(clarityOutputToEaseDocument, "clarityOutputToEaseDocument");
67888
68148
  var CLARITY_EXPORT_FAILURE_MESSAGE = "The export ran into a problem, so nothing was created in SAP Signavio. Start the export again; support has the full details if it keeps failing.";
67889
68149
  var CLARITY_EXPORT_INCOMPLETE_FAILURE_MESSAGE = "The export ran into a problem before it finished, and it may have left a diagram in SAP Signavio. Check your workspace before you start the export again; support has the full details.";
67890
- function clarityExportFailureMessage(result) {
67891
- return result?.diagramId ? CLARITY_EXPORT_INCOMPLETE_FAILURE_MESSAGE : CLARITY_EXPORT_FAILURE_MESSAGE;
68150
+ var CLARITY_EXPORT_AUTH_FAILED_MESSAGE = "Could not sign in to SAP Signavio, so nothing was created. Check the connection's URL, tenant ID, username, and password in Connections, then try again.";
68151
+ var CLARITY_EXPORT_FOLDER_FORBIDDEN_MESSAGE = "SAP Signavio refused the upload because the connected account does not have write access to the destination folder, so nothing was created. Ask your Signavio administrator for write access, then try again.";
68152
+ var CLARITY_EXPORT_PROCESS_STRUCTURE_MESSAGE = "The process could not be exported because its flow has blocking structure issues (such as missing start or end events, or disconnected steps). Fix the process and try again.";
68153
+ var CLARITY_EXPORT_DIAGRAM_LAYOUT_MESSAGE = "The export could not produce a valid diagram layout for SAP Signavio, so nothing was created. Start the export again; support has the full details if it keeps failing.";
68154
+ var CLARITY_EXPORT_INCOMPLETE_LAYOUT_MESSAGE = "A diagram was created in SAP Signavio, but its layout check failed. Check your workspace before you start the export again; support has the full details.";
68155
+ function clarityExportFailureMessage(result, failureReason) {
68156
+ if (result?.diagramId) {
68157
+ return failureReason === "diagram_layout" ? CLARITY_EXPORT_INCOMPLETE_LAYOUT_MESSAGE : CLARITY_EXPORT_INCOMPLETE_FAILURE_MESSAGE;
68158
+ }
68159
+ switch (failureReason) {
68160
+ case "auth_failed":
68161
+ return CLARITY_EXPORT_AUTH_FAILED_MESSAGE;
68162
+ case "folder_forbidden":
68163
+ return CLARITY_EXPORT_FOLDER_FORBIDDEN_MESSAGE;
68164
+ case "process_structure":
68165
+ return CLARITY_EXPORT_PROCESS_STRUCTURE_MESSAGE;
68166
+ case "diagram_layout":
68167
+ return CLARITY_EXPORT_DIAGRAM_LAYOUT_MESSAGE;
68168
+ default:
68169
+ return CLARITY_EXPORT_FAILURE_MESSAGE;
68170
+ }
67892
68171
  }
67893
68172
  __name(clarityExportFailureMessage, "clarityExportFailureMessage");
67894
68173
  __name3(clarityExportFailureMessage, "clarityExportFailureMessage");
@@ -69436,7 +69715,7 @@ var CONNECTION_HEADER_CONTRACTS = {
69436
69715
  doctly: {
69437
69716
  userSupplied: ["authorization"],
69438
69717
  infrastructure: [],
69439
- optional: [SANDBOX_ID]
69718
+ optional: [SANDBOX_ID, "x-agent-run-api-key"]
69440
69719
  },
69441
69720
  "outbound-call": {
69442
69721
  userSupplied: ["elevenlabs-api-key"],
@@ -69446,12 +69725,12 @@ var CONNECTION_HEADER_CONTRACTS = {
69446
69725
  firecrawl: {
69447
69726
  userSupplied: ["firecrawl-api-key"],
69448
69727
  infrastructure: [],
69449
- optional: [SANDBOX_ID]
69728
+ optional: [SANDBOX_ID, "x-agent-run-api-key"]
69450
69729
  },
69451
69730
  websets: {
69452
69731
  userSupplied: ["exa-api-key"],
69453
69732
  infrastructure: [],
69454
- optional: [SANDBOX_ID]
69733
+ optional: [SANDBOX_ID, "x-agent-run-api-key"]
69455
69734
  }
69456
69735
  };
69457
69736
  function normalizeSuppliedHeaders(headers) {
@@ -72949,6 +73228,11 @@ function getTeamRunActivityRoomName(teamId) {
72949
73228
  }
72950
73229
  __name(getTeamRunActivityRoomName, "getTeamRunActivityRoomName");
72951
73230
  __name3(getTeamRunActivityRoomName, "getTeamRunActivityRoomName");
73231
+ function getTeamAllRunActivityRoomName(teamId) {
73232
+ return `team:${teamId}:all-run-activity`;
73233
+ }
73234
+ __name(getTeamAllRunActivityRoomName, "getTeamAllRunActivityRoomName");
73235
+ __name3(getTeamAllRunActivityRoomName, "getTeamAllRunActivityRoomName");
72952
73236
  function getRunRoomName(teamId, runId) {
72953
73237
  return `team:${teamId}:run:${runId}`;
72954
73238
  }
@@ -74103,6 +74387,8 @@ var DEFAULT_SIGNAVIO_WORKSPACE_PROFILE = deepFreeze({
74103
74387
  gatewayBranchLabels: ["Yes", "No"]
74104
74388
  });
74105
74389
  var CLARITY_EXPORT_FAILURE_REASONS = [
74390
+ "auth_failed",
74391
+ "folder_forbidden",
74106
74392
  "process_structure",
74107
74393
  "diagram_layout",
74108
74394
  "unknown"
@@ -74110,6 +74396,35 @@ var CLARITY_EXPORT_FAILURE_REASONS = [
74110
74396
  var clarityExportFailureReasonSchema = z662.enum(
74111
74397
  CLARITY_EXPORT_FAILURE_REASONS
74112
74398
  );
74399
+ var FOLDER_FORBIDDEN_PATTERNS = [
74400
+ /\b403\b/,
74401
+ /ACCESS VIOLATION/i,
74402
+ /CouldNotBuildDiagramObject/i,
74403
+ /\bforbidden\b/i,
74404
+ /\b(?:no|not have|lack(?:s|ing)?|without|missing|denied|insufficient)\s+write\s+(?:access|permission)/i,
74405
+ /\bwrite\s+(?:access|permission)s?\s+(?:denied|refused|missing|required)\b/i
74406
+ ];
74407
+ var AUTH_FAILED_PATTERNS = [
74408
+ /\b401\b/,
74409
+ /\bunauthorized\b/i,
74410
+ /\bauthentication failed\b/i,
74411
+ /\binvalid credentials\b/i,
74412
+ /\blogin failed\b/i
74413
+ ];
74414
+ function clarityExportFailureReasonFromErrorText(text3) {
74415
+ if (!text3) {
74416
+ return "unknown";
74417
+ }
74418
+ if (FOLDER_FORBIDDEN_PATTERNS.some((pattern) => pattern.test(text3))) {
74419
+ return "folder_forbidden";
74420
+ }
74421
+ if (AUTH_FAILED_PATTERNS.some((pattern) => pattern.test(text3))) {
74422
+ return "auth_failed";
74423
+ }
74424
+ return "unknown";
74425
+ }
74426
+ __name(clarityExportFailureReasonFromErrorText, "clarityExportFailureReasonFromErrorText");
74427
+ __name3(clarityExportFailureReasonFromErrorText, "clarityExportFailureReasonFromErrorText");
74113
74428
  var RULE_PREFIX_REASONS = [
74114
74429
  ["structure/", "process_structure"],
74115
74430
  ["semantics/", "process_structure"],
@@ -79925,11 +80240,9 @@ var codeStepResultEventSchema = z1172.object({
79925
80240
  * `SIGTERM`, and a user who pressed Stop is shown "Code step was terminated by
79926
80241
  * signal SIGTERM" on a red failure card.
79927
80242
  *
79928
- * It also decides how the run's case settles. `persistUserStopMarker` writes
79929
- * `stopped_by_user` only for a run still active or already `interrupted`, and
79930
- * `stopRun` awaits a cc-server round-trip before writing it — which a code
79931
- * step's exit routinely beats. Landing on `failed` therefore drops the marker
79932
- * and settles the case failed rather than canceled.
80243
+ * It also decides how the run's case settles. Case settlement honours
80244
+ * `stopped_by_user` only on a run that ended `interrupted`, so landing on
80245
+ * `failed` would settle a stopped case failed rather than canceled.
79933
80246
  *
79934
80247
  * Optional so a sandbox still running the previous cc-server image keeps
79935
80248
  * terminalising its run instead of failing schema validation.
@@ -81398,6 +81711,12 @@ var automationSummaryApiSchema2 = z1272.object({
81398
81711
  run_scope: z1272.enum(["personal", "team"]).optional().describe(
81399
81712
  "Who the automation's runs execute as: its members, each with their own Connections (`personal`), or the team, with shared Connections only (`team`). An automation becomes `team` once, through convert-to-team, and never goes back. Optional because a backend that predates Team automations does not send it; a client treats absence as `personal` and offers no conversion."
81400
81713
  ),
81714
+ converted_to_team_at: z1272.string().nullable().optional().describe(
81715
+ "When the automation was converted to run as the team, or null while it runs as its members."
81716
+ ),
81717
+ converted_by: z1272.guid().nullable().optional().describe(
81718
+ "The member who converted the automation to run as the team, or null while it runs as its members or when that member is gone."
81719
+ ),
81401
81720
  viewer_can_edit: z1272.boolean().optional().describe(
81402
81721
  "Whether the caller may change this automation. An automation takes its agents' ownership rule: a Builder may edit one whose every agent they created, and Lead Builder or above may edit any. Sent by the list and detail endpoints; absent from create and update responses, where the client falls back to the caller's role."
81403
81722
  ),
@@ -81589,6 +81908,114 @@ var duplicateAutomationResponseApiSchema2 = z1272.object({
81589
81908
  "The new automation: a copy of the source's live agents, builds, queues and the routing between them."
81590
81909
  )
81591
81910
  });
81911
+ var TEAM_CONVERSION_BLOCKER_CODES2 = [
81912
+ "automations_workspace_required",
81913
+ "module_demo",
81914
+ "team_automations_flag_off",
81915
+ "already_team",
81916
+ "automation_revisions",
81917
+ "connection_sharing_off",
81918
+ "writes_to_personal_queue",
81919
+ "read_by_personal_agent"
81920
+ ];
81921
+ var teamConversionBlockerApiSchema2 = z1272.object({
81922
+ code: z1272.enum(TEAM_CONVERSION_BLOCKER_CODES2),
81923
+ message: z1272.string(),
81924
+ agent_id: z1272.string().nullable(),
81925
+ agent_name: z1272.string().nullable(),
81926
+ queue_id: z1272.string().nullable(),
81927
+ queue_name: z1272.string().nullable(),
81928
+ queue_automation_id: z1272.string().nullable(),
81929
+ queue_automation_name: z1272.string().nullable()
81930
+ });
81931
+ var teamConversionPreviewApiSchema2 = z1272.object({
81932
+ personal_rows: z1272.array(
81933
+ z1272.object({
81934
+ user_id: z1272.string(),
81935
+ name: z1272.string().nullable(),
81936
+ email: z1272.string().nullable(),
81937
+ triggers: z1272.number().int(),
81938
+ schedules: z1272.number().int()
81939
+ })
81940
+ ),
81941
+ personal_row_totals: z1272.object({
81942
+ members: z1272.number().int(),
81943
+ triggers: z1272.number().int(),
81944
+ schedules: z1272.number().int()
81945
+ }),
81946
+ agents: z1272.array(
81947
+ z1272.object({
81948
+ agent_id: z1272.string(),
81949
+ agent_name: z1272.string(),
81950
+ agent_type: stepTypeSchema2,
81951
+ slots_without_team_connection: z1272.array(
81952
+ z1272.object({
81953
+ integration_id: z1272.string().nullable(),
81954
+ custom_integration_id: z1272.string().nullable(),
81955
+ integration_type: z1272.string(),
81956
+ name: z1272.string()
81957
+ })
81958
+ ),
81959
+ secrets_without_team_access: z1272.number().int(),
81960
+ logins_without_team_access: z1272.number().int()
81961
+ })
81962
+ ),
81963
+ own_aop_exceptions: z1272.array(
81964
+ z1272.object({
81965
+ id: z1272.string(),
81966
+ agent_id: z1272.string(),
81967
+ agent_name: z1272.string(),
81968
+ label: z1272.string(),
81969
+ content: z1272.string(),
81970
+ enabled: z1272.boolean()
81971
+ })
81972
+ ),
81973
+ no_responsible_people: z1272.boolean(),
81974
+ pending_cases: z1272.number().int()
81975
+ });
81976
+ var automationTeamConversionResponseApiSchema2 = z1272.object({
81977
+ convertible: z1272.boolean(),
81978
+ blocker: teamConversionBlockerApiSchema2.nullable(),
81979
+ preview: teamConversionPreviewApiSchema2.nullable()
81980
+ });
81981
+ var automationTeamConversionClientResponseSchema2 = automationTeamConversionResponseApiSchema2.extend({
81982
+ blocker: teamConversionBlockerApiSchema2.extend({ code: z1272.string() }).nullable(),
81983
+ preview: teamConversionPreviewApiSchema2.extend({
81984
+ agents: z1272.array(
81985
+ teamConversionPreviewApiSchema2.shape.agents.element.extend({
81986
+ agent_type: z1272.string()
81987
+ })
81988
+ ),
81989
+ own_aop_exceptions: z1272.array(
81990
+ teamConversionPreviewApiSchema2.shape.own_aop_exceptions.element.extend(
81991
+ { agent_name: z1272.string().optional() }
81992
+ )
81993
+ )
81994
+ }).nullable()
81995
+ });
81996
+ var convertAutomationToTeamBodyApiSchema2 = z1272.object({
81997
+ copy_aop_exception_ids: z1272.array(z1272.guid()).max(200).default([]).describe(
81998
+ "Your own personal AOP exceptions on this automation's agents to copy into team exceptions, which Team runs use. Only your own can be copied; another member's are never listed or copied. Omit to copy none."
81999
+ )
82000
+ });
82001
+ var convertAutomationToTeamResponseApiSchema2 = z1272.object({
82002
+ automation: z1272.object({
82003
+ id: z1272.guid(),
82004
+ run_scope: z1272.literal("team"),
82005
+ converted_to_team_at: z1272.string(),
82006
+ converted_by: z1272.guid()
82007
+ }),
82008
+ personal_triggers_turned_off: z1272.int().describe(
82009
+ "Members' personal triggers turned off. They are kept, turned off, and cannot be turned back on while the automation runs as the team."
82010
+ ),
82011
+ personal_schedules_turned_off: z1272.int().describe("Members' personal schedules turned off, kept the same way."),
82012
+ members_with_setup_turned_off: z1272.int().describe(
82013
+ "How many members had personal triggers or schedules turned off. Each is sent a notice about their own, unless notices are off for them, or they have left the team or been suspended."
82014
+ ),
82015
+ aop_exceptions_copied: z1272.int().describe(
82016
+ "How many of your AOP exceptions were copied into team exceptions."
82017
+ )
82018
+ });
81592
82019
  var deleteAutomationResponseApiSchema2 = z1272.object({
81593
82020
  success: z1272.boolean()
81594
82021
  });
@@ -83207,7 +83634,7 @@ var updateBuildBodyObjectSchema2 = z1342.object({
83207
83634
  "The config_hash from the read this edit is based on. The save is refused with 409 (code revision_config_changed) when the revision's config no longer has that hash, so a change saved in between is not overwritten. Read the revision again and reapply the edit. Omit it to save without the check."
83208
83635
  ),
83209
83636
  require_draft: z1342.boolean().optional().describe(
83210
- "When true, the save is refused with 409 unless the revision it lands on is still a draft (code revision_not_draft) with no generation running or awaiting review (code revision_generation_pending). Use it for an edit meant for review before it goes live."
83637
+ "When true, the save lands on a draft and never changes what runs. A save with a config and expected_config_hash addressed to a revision that is not a draft goes to the step's open draft, or to a new draft copied from the live revision when it has none; the response's build id names it. Without both, a save addressed to a revision that is not a draft is refused with 409 (code revision_not_draft) on a team without Automation revisions. A save whose draft has a generation running or awaiting review is refused with 409 (code revision_generation_pending), and one whose draft is made live or removed during the save with 409 (code revision_not_draft); save again. Use it for an edit meant for review before it goes live, with expected_config_hash: when the step's draft holds changes the revision you read does not, the save is refused with 409 (code revision_config_changed) naming that draft."
83211
83638
  ),
83212
83639
  handoverTargetIds: z1342.array(z1342.guid()).nullable().optional().describe(
83213
83640
  "Agent IDs that this agent can hand over work to, used exactly as sent; an empty list clears them. Send null to use the agents the AOP mentions with <DUVO:AGENT> tags. Omit it to leave the targets as they are."
@@ -87901,15 +88328,10 @@ var runCostLlmV1Schema = z171.object({
87901
88328
  version: z171.literal(1),
87902
88329
  components: z171.record(z171.string(), componentTotalSchema)
87903
88330
  });
87904
- var RUN_COST_VERSION = 2;
87905
- var runCostLlmV2Schema = runCostLlmV1Schema.extend({
87906
- version: z171.literal(RUN_COST_VERSION)
88331
+ var RUN_COST_VERSION = 3;
88332
+ var runCostLlmSchema = runCostLlmV1Schema.extend({
88333
+ version: z171.literal([1, 2, RUN_COST_VERSION, 4])
87907
88334
  });
87908
- var runCostLlmSchema = z171.discriminatedUnion("version", [
87909
- runCostLlmV1Schema,
87910
- runCostLlmV2Schema,
87911
- runCostLlmV1Schema.extend({ version: z171.literal(3) })
87912
- ]);
87913
88335
  var ZERO_TOTAL = { cost_usd: 0, count: 0 };
87914
88336
  function zeroInferenceComponents() {
87915
88337
  return Object.fromEntries(
@@ -87923,6 +88345,7 @@ function zeroRunCostLlm() {
87923
88345
  version: RUN_COST_VERSION,
87924
88346
  components: {
87925
88347
  ...zeroInferenceComponents(),
88348
+ primary_sandbox: { ...ZERO_TOTAL },
87926
88349
  secondary_sandbox: { ...ZERO_TOTAL }
87927
88350
  }
87928
88351
  };
@@ -87941,6 +88364,28 @@ function parseRunCostLlm(value) {
87941
88364
  }
87942
88365
  __name(parseRunCostLlm, "parseRunCostLlm");
87943
88366
  __name3(parseRunCostLlm, "parseRunCostLlm");
88367
+ var runCostIntegrationSchema = z171.enum(["doctly", "exa", "firecrawl"]);
88368
+ var integrationCostEventSchema = z171.object({
88369
+ provider: runCostIntegrationSchema,
88370
+ sourceId: z171.string().min(1).max(256),
88371
+ amountUsd: z171.number().nonnegative().lt(1e10).optional(),
88372
+ needsReview: z171.literal(true).optional()
88373
+ });
88374
+ var USD_PER_CREDIT = 1e-3;
88375
+ function firecrawlCostUsd(usage) {
88376
+ let credits = usage.creditsUsed;
88377
+ if (credits == null && typeof usage.tokensUsed === "number" && Number.isSafeInteger(usage.tokensUsed) && usage.tokensUsed >= 0) {
88378
+ credits = Math.ceil(usage.tokensUsed / 15);
88379
+ }
88380
+ return typeof credits === "number" && Number.isSafeInteger(credits) && credits >= 0 ? credits * USD_PER_CREDIT : void 0;
88381
+ }
88382
+ __name(firecrawlCostUsd, "firecrawlCostUsd");
88383
+ __name3(firecrawlCostUsd, "firecrawlCostUsd");
88384
+ function isTerminalFirecrawlStatus(status) {
88385
+ return status === "completed" || status === "failed" || status === "cancelled";
88386
+ }
88387
+ __name(isTerminalFirecrawlStatus, "isTerminalFirecrawlStatus");
88388
+ __name3(isTerminalFirecrawlStatus, "isTerminalFirecrawlStatus");
87944
88389
 
87945
88390
  // src/commands/teams/org-runs.ts
87946
88391
  import { z as z173 } from "zod";
@@ -88496,7 +88941,7 @@ __name(isStandaloneBinary, "isStandaloneBinary");
88496
88941
  import { createRequire } from "node:module";
88497
88942
  function getPackageMeta() {
88498
88943
  if (true) {
88499
- return { name: "@duvoai/cli", version: "1.113.0" };
88944
+ return { name: "@duvoai/cli", version: "1.114.0" };
88500
88945
  }
88501
88946
  const require2 = createRequire(import.meta.url);
88502
88947
  const raw = require2("../../package.json");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duvoai/cli",
3
- "version": "1.113.0",
3
+ "version": "1.114.0",
4
4
  "description": "Command-line interface for the Duvo public API",
5
5
  "bin": {
6
6
  "duvo": "./dist/bin/duvo.js"