@duvoai/cli 1.21.0 → 1.22.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
@@ -6,7 +6,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
6
6
  import { readFileSync as readFileSync8 } from "node:fs";
7
7
  import { dirname as dirname3, join as join3 } from "node:path";
8
8
  import { fileURLToPath as fileURLToPath2 } from "node:url";
9
- import { Command } from "commander";
9
+ import { Command, Option as Option2 } from "commander";
10
10
 
11
11
  // src/api/agent-folder-schemas.ts
12
12
  import { z } from "zod";
@@ -2201,6 +2201,23 @@ var evalCountsSchema = z9.object({
2201
2201
  var evalCountsByAgentResponseSchema = z9.object({
2202
2202
  by_agent: z9.record(z9.string(), evalCountsSchema)
2203
2203
  });
2204
+ var agentRunStatsSchema = z9.object({
2205
+ success: z9.int(),
2206
+ critical: z9.int(),
2207
+ medium: z9.int(),
2208
+ failed: z9.int(),
2209
+ need_input: z9.int(),
2210
+ /** Total runs in the current lookback window. */
2211
+ total: z9.int(),
2212
+ /** Week-over-week change in total runs (current window minus previous). */
2213
+ delta: z9.int()
2214
+ });
2215
+ var agentRunStatsByAgentResponseSchema = z9.object({
2216
+ run_stats_by_agent: z9.record(z9.string(), agentRunStatsSchema)
2217
+ });
2218
+ var evalCountsAndRunStatsResponseSchema = evalCountsByAgentResponseSchema.extend(
2219
+ agentRunStatsByAgentResponseSchema.shape
2220
+ );
2204
2221
  var summarizeEvalScoresBodySchema = z9.object({
2205
2222
  since: z9.iso.datetime(),
2206
2223
  /** `"custom"` restricts to the target revision's runs + `custom__*` flags only. */
@@ -5076,7 +5093,8 @@ var listClarityProcessSnapshotsQuerySchema = z222.object({
5076
5093
  offset: z222.coerce.number().int().min(0).default(0)
5077
5094
  });
5078
5095
  var listClarityProcessSnapshotsResponseSchema = z222.object({
5079
- snapshots: z222.array(clarityProcessSnapshotVersionApiSchema)
5096
+ snapshots: z222.array(clarityProcessSnapshotVersionApiSchema),
5097
+ total: z222.number().int().nonnegative().describe("Total number of snapshots of this kind for the process")
5080
5098
  });
5081
5099
  var getClarityProcessSnapshotParamsSchema = listClarityProcessSnapshotsParamsSchema.extend({
5082
5100
  snapshot_id: z222.guid().describe("Snapshot id")
@@ -5748,7 +5766,7 @@ __name(buildClarityProcessLanguageBlock, "buildClarityProcessLanguageBlock");
5748
5766
  __name2(buildClarityProcessLanguageBlock, "buildClarityProcessLanguageBlock");
5749
5767
  function buildClarityNarrativeLanguageBlock() {
5750
5768
  return `# OUTPUT LANGUAGE
5751
- Write every narrative artifact field you produce (summary, SWOT analysis entries, projected impact, assumptions, recommendations, and supporting prose) in the original language already used by the snapshot. If the snapshot mixes languages, follow the dominant user-facing language in the existing narrative and step text. Keep JSON field keys, enum values, ids, integration or system identifiers, file paths, shell commands, and product names in English/exactly as given; do not translate them.`;
5769
+ Write every narrative artifact field you produce (summary, SWOT analysis entries, projected impact, assumptions, recommendations, and supporting prose) in the language of the snapshot's step titles and descriptions. Judge that language from the step titles and descriptions only; ignore the language of source excerpts, evidence quotes, transcript excerpts, and previously generated narrative fields such as summary, swot, or projectedImpact. If the step titles and descriptions are in English, or their language is mixed or ambiguous, write in English. Keep JSON field keys, enum values, ids, integration or system identifiers, file paths, shell commands, and product names in English/exactly as given; do not translate them.`;
5752
5770
  }
5753
5771
  __name(buildClarityNarrativeLanguageBlock, "buildClarityNarrativeLanguageBlock");
5754
5772
  __name2(buildClarityNarrativeLanguageBlock, "buildClarityNarrativeLanguageBlock");
@@ -6681,6 +6699,7 @@ var INTEGRATION_SLUGS = [
6681
6699
  "googlesheets",
6682
6700
  "googledrive",
6683
6701
  "firecrawl",
6702
+ // Deprecated 2026-07: catalog rows purged, retained for API contract + historical payloads
6684
6703
  "exa",
6685
6704
  "exa-search",
6686
6705
  "exa-company-search",
@@ -9623,11 +9642,6 @@ var FEATURE_FLAG_CATALOGUE = {
9623
9642
  defaultValue: false,
9624
9643
  description: "Exposes the versioned Automations migration entry point. When on, Managers see a 'Migrate to automations' action on the Agents page that sorts the team's standalone agents and queues into Automations (one per connected closure, via the same closure logic as the cross-team move) and stamps team.automations_migrated_at. The stamped timestamp \u2014 not this flag \u2014 drives the Automations sidebar entry. Resolved by team/org (user-level overrides are ignored by the migration gate). Off-by-default for staged, per-team rollout."
9625
9644
  },
9626
- PULSE: {
9627
- key: "pulse",
9628
- defaultValue: false,
9629
- description: "Enables Duvo Pulse \u2014 the agent-generated visualization Artifacts surface. When disabled, the side-nav entry is hidden and every /v1/artifacts/* endpoint returns 404; the cc-server ingestion callback is unaffected."
9630
- },
9631
9645
  AGENT_SELF_SCHEDULING: {
9632
9646
  key: "agent_self_scheduling",
9633
9647
  defaultValue: false,
@@ -9668,6 +9682,11 @@ var FEATURE_FLAG_CATALOGUE = {
9668
9682
  defaultValue: false,
9669
9683
  description: "Enables the case approval feature end-to-end: AOP authors can @-mention team members in the agent AOP textarea (serialized as <DUVO:USER> tags), agents can request human approval on cases via the request_case_approval tool, and approvers see and respond to pending requests on the case. Off-by-default for staged rollout."
9670
9684
  },
9685
+ CLARITY_AGENT_CHAT: {
9686
+ key: "clarity_agent_chat",
9687
+ defaultValue: false,
9688
+ description: "Routes Clarity process edits through Ask Duvo (Meta Agent) on Clarity v2 detail pages: shows the Agent Chat rail there and hides the artifact-chat composer for new edit requests while keeping artifact-chat history readable. Off-by-default for staged rollout."
9689
+ },
9671
9690
  CLARITY_ARTIFACT_CHAT: {
9672
9691
  key: "clarity_artifact_chat",
9673
9692
  defaultValue: false,
@@ -12314,6 +12333,7 @@ import { homedir } from "node:os";
12314
12333
  import { join } from "node:path";
12315
12334
  var CONFIG_DIR_NAME = "duvo";
12316
12335
  var CONFIG_FILE_NAME = "config.json";
12336
+ var UPDATE_CHECK_CACHE_FILE_NAME = "update-check.json";
12317
12337
  function getConfigDir() {
12318
12338
  const xdg = process.env.XDG_CONFIG_HOME;
12319
12339
  if (xdg && xdg.length > 0) {
@@ -12326,6 +12346,10 @@ function getConfigPath() {
12326
12346
  return join(getConfigDir(), CONFIG_FILE_NAME);
12327
12347
  }
12328
12348
  __name(getConfigPath, "getConfigPath");
12349
+ function getUpdateCheckCachePath() {
12350
+ return join(getConfigDir(), UPDATE_CHECK_CACHE_FILE_NAME);
12351
+ }
12352
+ __name(getUpdateCheckCachePath, "getUpdateCheckCachePath");
12329
12353
 
12330
12354
  // src/config/store.ts
12331
12355
  var FILE_MODE = 384;
@@ -13548,6 +13572,55 @@ var createAgentResponseSchema = z84.object({
13548
13572
  var deleteAgentResponseSchema = z84.object({
13549
13573
  success: z84.literal(true)
13550
13574
  });
13575
+ var namedRefSchema = z84.object({
13576
+ id: z84.string(),
13577
+ name: z84.string()
13578
+ });
13579
+ var moveQueueRefSchema = z84.object({
13580
+ id: z84.string(),
13581
+ name: z84.string(),
13582
+ item_count: z84.number()
13583
+ });
13584
+ var connectionDecisionSchema = z84.object({
13585
+ agent_id: z84.string(),
13586
+ agent_name: z84.string(),
13587
+ integration_type: z84.string(),
13588
+ integration_name: z84.string(),
13589
+ instance_name: z84.string(),
13590
+ decision: z84.string()
13591
+ });
13592
+ var customRebuildSchema = z84.object({
13593
+ agent_id: z84.string(),
13594
+ agent_name: z84.string(),
13595
+ custom_integration_name: z84.string()
13596
+ });
13597
+ var moveAgentResponseSchema = z84.object({
13598
+ source_team_id: z84.string(),
13599
+ target_team_id: z84.string(),
13600
+ root_agent_id: z84.string(),
13601
+ agents: z84.array(namedRefSchema),
13602
+ queues: z84.array(moveQueueRefSchema),
13603
+ total_case_items: z84.number(),
13604
+ total_runs: z84.number(),
13605
+ skills_to_clone: z84.array(namedRefSchema),
13606
+ files_to_copy: z84.array(z84.object({ path: z84.string() })),
13607
+ warnings: z84.object({
13608
+ outcome: z84.object({
13609
+ instances_reconnected: z84.array(connectionDecisionSchema),
13610
+ instances_disconnected: z84.array(connectionDecisionSchema),
13611
+ custom_integrations_to_rebuild: z84.array(customRebuildSchema),
13612
+ catalog_rows_created_on_target: z84.number()
13613
+ }),
13614
+ dropped_folders: z84.array(namedRefSchema),
13615
+ dropped_memory_count: z84.number(),
13616
+ files_copied_count: z84.number(),
13617
+ files_skipped_conflict: z84.array(z84.string())
13618
+ }),
13619
+ options: z84.object({
13620
+ move_learnings: z84.boolean()
13621
+ }),
13622
+ applied: z84.boolean()
13623
+ });
13551
13624
  var buildConfigSchema = StoredAgentConfigSchemaV2;
13552
13625
  var DEFAULT_NEW_AGENT_NAME = DEFAULT_AGENT_NAME;
13553
13626
  var DEFAULT_BUILD_NAME = "Initial build";
@@ -14535,6 +14608,151 @@ function registerAgentsModels(agents) {
14535
14608
  }
14536
14609
  __name(registerAgentsModels, "registerAgentsModels");
14537
14610
 
14611
+ // src/commands/agents/move.ts
14612
+ var NOT_STANDALONE_CODE = "ASSIGNMENT_NOT_STANDALONE";
14613
+ function registerAgentsMove(agents) {
14614
+ agents.command("move <id>").description("Move an agent (and its connected workspace) to another team").requiredOption("--to-team <id>", "ID of the team to move the agent into").option(
14615
+ "--all-together",
14616
+ "move connected queues, triggers, and handover peers along with the agent"
14617
+ ).option(
14618
+ "--skip-learnings",
14619
+ "drop the agent's accumulated learnings instead of carrying them across"
14620
+ ).option("--dry-run", "preview the move without applying any changes").option("-y, --yes", "skip the confirmation prompt").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function moveAction(id, options) {
14621
+ const agentId = trimRequired(id, "<id>");
14622
+ const targetTeamId = trimRequired(options.toTeam ?? "", "--to-team");
14623
+ const { apiKey, apiBaseUrl } = await requireAuthenticatedConfig(this);
14624
+ const isDryRun = options.dryRun === true;
14625
+ if (!isDryRun) {
14626
+ await confirmDestructive({
14627
+ message: `Move agent "${agentId}" to team "${targetTeamId}"?`,
14628
+ skip: options.yes === true
14629
+ });
14630
+ }
14631
+ const body = {
14632
+ target_team_id: targetTeamId,
14633
+ move_learnings: options.skipLearnings !== true,
14634
+ bypass_standalone_gate: options.allTogether === true
14635
+ };
14636
+ const searchParams = new URLSearchParams();
14637
+ if (isDryRun) {
14638
+ searchParams.append("dry_run", "true");
14639
+ }
14640
+ const raw = await requestMove({
14641
+ agentId,
14642
+ apiKey,
14643
+ apiBaseUrl,
14644
+ body,
14645
+ searchParams
14646
+ });
14647
+ if (options.json) {
14648
+ printJson(raw);
14649
+ return;
14650
+ }
14651
+ const parsed = moveAgentResponseSchema.safeParse(raw);
14652
+ if (!parsed.success) {
14653
+ throw new CliError(
14654
+ `Unexpected response from the API: ${parsed.error.message}`
14655
+ );
14656
+ }
14657
+ renderPlan(parsed.data, isDryRun);
14658
+ }, "moveAction"));
14659
+ }
14660
+ __name(registerAgentsMove, "registerAgentsMove");
14661
+ async function requestMove(args) {
14662
+ try {
14663
+ return await httpRequest({
14664
+ method: "POST",
14665
+ path: `/v2/agents/${encodeURIComponent(args.agentId)}/move`,
14666
+ apiKey: args.apiKey,
14667
+ apiBaseUrl: args.apiBaseUrl,
14668
+ body: args.body,
14669
+ searchParams: args.searchParams
14670
+ });
14671
+ } catch (error) {
14672
+ if (error instanceof CliHttpError && error.apiErrorCode === NOT_STANDALONE_CODE) {
14673
+ throw new CliError(
14674
+ "This agent is connected to queues or other agents. Re-run with --all-together to move everything as a group."
14675
+ );
14676
+ }
14677
+ throw error;
14678
+ }
14679
+ }
14680
+ __name(requestMove, "requestMove");
14681
+ function renderPlan(plan, isDryRun) {
14682
+ const otherAgents = plan.agents.filter((a) => a.id !== plan.root_agent_id);
14683
+ const outcome = plan.warnings.outcome;
14684
+ console.log(green(isDryRun ? "Move preview" : "Agent moved!"));
14685
+ console.log(
14686
+ renderKeyValue([
14687
+ { label: "Target team", value: plan.target_team_id },
14688
+ { label: "Agents moving", value: String(plan.agents.length) },
14689
+ { label: "Queues", value: String(plan.queues.length) },
14690
+ { label: "Cases", value: String(plan.total_case_items) },
14691
+ { label: "Runs", value: String(plan.total_runs) },
14692
+ {
14693
+ label: "Move learnings",
14694
+ value: plan.options.move_learnings ? "yes" : "no"
14695
+ }
14696
+ ])
14697
+ );
14698
+ if (otherAgents.length > 0) {
14699
+ console.log(`
14700
+ Connected agents coming along (${otherAgents.length}):`);
14701
+ for (const agent of otherAgents) {
14702
+ console.log(` - ${agent.name} (${agent.id})`);
14703
+ }
14704
+ }
14705
+ if (plan.queues.length > 0) {
14706
+ console.log(`
14707
+ Queues (${plan.queues.length}):`);
14708
+ for (const queue of plan.queues) {
14709
+ console.log(` - ${queue.name} \u2014 ${queue.item_count} case(s)`);
14710
+ }
14711
+ }
14712
+ if (plan.skills_to_clone.length > 0) {
14713
+ const names = plan.skills_to_clone.map((s) => s.name).join(", ");
14714
+ console.log(`
14715
+ Skills copied to target: ${names}`);
14716
+ }
14717
+ if (plan.files_to_copy.length > 0) {
14718
+ const paths = plan.files_to_copy.map((f) => f.path).join(", ");
14719
+ console.log(`
14720
+ Files copied to target: ${paths}`);
14721
+ }
14722
+ if (outcome.instances_disconnected.length > 0) {
14723
+ console.log("\nConnections to reconnect on the target team:");
14724
+ for (const c of outcome.instances_disconnected) {
14725
+ console.log(` - ${c.integration_name} (${c.agent_name})`);
14726
+ }
14727
+ }
14728
+ if (outcome.custom_integrations_to_rebuild.length > 0) {
14729
+ console.log("\nCustom connections to rebuild on the target team:");
14730
+ for (const c of outcome.custom_integrations_to_rebuild) {
14731
+ console.log(` - ${c.custom_integration_name} (${c.agent_name})`);
14732
+ }
14733
+ }
14734
+ if (plan.warnings.files_skipped_conflict.length > 0) {
14735
+ const paths = plan.warnings.files_skipped_conflict.join(", ");
14736
+ console.log(`
14737
+ Files not copied (already exist on target): ${paths}`);
14738
+ }
14739
+ if (plan.warnings.dropped_folders.length > 0) {
14740
+ const names = plan.warnings.dropped_folders.map((f) => f.name).join(", ");
14741
+ console.log(`
14742
+ Queues will be moved out of their folders: ${names}`);
14743
+ }
14744
+ if (plan.warnings.dropped_memory_count > 0) {
14745
+ console.log(
14746
+ `
14747
+ ${plan.warnings.dropped_memory_count} AOP exception(s) will be cleared for users who aren't in the target team.`
14748
+ );
14749
+ }
14750
+ if (isDryRun) {
14751
+ console.log("\nNothing was changed. Re-run without --dry-run to apply.");
14752
+ }
14753
+ }
14754
+ __name(renderPlan, "renderPlan");
14755
+
14538
14756
  // src/api/schedule-schemas.ts
14539
14757
  import { z as z86 } from "zod";
14540
14758
  var publicScheduleSchema = z86.object({
@@ -15352,6 +15570,7 @@ function registerAgents(program) {
15352
15570
  registerAgentsGet(agents);
15353
15571
  registerAgentsCreate(agents);
15354
15572
  registerAgentsUpdate(agents);
15573
+ registerAgentsMove(agents);
15355
15574
  registerAgentsModels(agents);
15356
15575
  registerAgentsSetModel(agents);
15357
15576
  registerAgentsDelete(agents);
@@ -19209,6 +19428,19 @@ var CLARITY_READ_TOOLS = [
19209
19428
  endpoints: [{ method: "GET", path: "/v2/clarity/processes/:processId" }],
19210
19429
  description: "Read old v1 Clarity processes with legacy analysis, transformation guidance, and captures."
19211
19430
  },
19431
+ {
19432
+ name: "listClarityProcessSnapshots",
19433
+ scope: "v2",
19434
+ read_only: true,
19435
+ commands: ["duvo clarity list-snapshots"],
19436
+ endpoints: [
19437
+ {
19438
+ method: "GET",
19439
+ path: "/v2/clarity-v2/processes/:processId/snapshots/:kind"
19440
+ }
19441
+ ],
19442
+ description: "List lightweight v2 snapshot versions of one kind (current_process or transformation_proposal) with limit/offset pagination."
19443
+ },
19212
19444
  {
19213
19445
  name: "getClarityProcessSnapshot",
19214
19446
  scope: "v2",
@@ -21442,6 +21674,103 @@ function registerClarityProcessSummaries(clarity) {
21442
21674
  }
21443
21675
  __name(registerClarityProcessSummaries, "registerClarityProcessSummaries");
21444
21676
 
21677
+ // src/commands/clarity/list-snapshots.ts
21678
+ import { z as z99 } from "zod";
21679
+ var SNAPSHOT_KINDS = ["current_process", "transformation_proposal"];
21680
+ var DEFAULT_LIMIT7 = 50;
21681
+ var MIN_LIMIT7 = 1;
21682
+ var MAX_LIMIT7 = 100;
21683
+ var snapshotListItemSchema = z99.looseObject({
21684
+ id: z99.string(),
21685
+ status: z99.string(),
21686
+ creator_type: z99.string(),
21687
+ created_at: z99.string(),
21688
+ parent_id: z99.string().nullable().optional(),
21689
+ source_snapshot_id: z99.string().nullable().optional()
21690
+ });
21691
+ var listSnapshotsResponseSchema = z99.looseObject({
21692
+ snapshots: z99.array(snapshotListItemSchema),
21693
+ total: z99.number().int().optional()
21694
+ });
21695
+ var TABLE_COLUMNS21 = [
21696
+ {
21697
+ header: "ID",
21698
+ cell: /* @__PURE__ */ __name((row) => row.id, "cell")
21699
+ },
21700
+ {
21701
+ header: "STATUS",
21702
+ cell: /* @__PURE__ */ __name((row) => row.status, "cell")
21703
+ },
21704
+ {
21705
+ header: "CREATOR",
21706
+ cell: /* @__PURE__ */ __name((row) => row.creator_type, "cell")
21707
+ },
21708
+ {
21709
+ header: "PARENT",
21710
+ cell: /* @__PURE__ */ __name((row) => row.parent_id ?? "", "cell")
21711
+ },
21712
+ {
21713
+ header: "CREATED",
21714
+ cell: /* @__PURE__ */ __name((row) => row.created_at, "cell")
21715
+ }
21716
+ ];
21717
+ function registerClarityListSnapshots(clarity) {
21718
+ clarity.command("list-snapshots <process-id> <kind>").description(
21719
+ `List lightweight v2 snapshot versions of one kind (${SNAPSHOT_KINDS.join(" or ")}) for a Clarity process`
21720
+ ).option("--limit <n>", `page size (${MIN_LIMIT7}-${MAX_LIMIT7})`).option("--offset <n>", "number of snapshots to skip").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function action(processId, rawKind, options) {
21721
+ const kind = parseSnapshotKind2(rawKind);
21722
+ const limit = parseLimit(options.limit, {
21723
+ defaultValue: DEFAULT_LIMIT7,
21724
+ min: MIN_LIMIT7,
21725
+ max: MAX_LIMIT7
21726
+ });
21727
+ const offset = parseOffset(options.offset);
21728
+ const config = await requireAuthenticatedConfig(this);
21729
+ const searchParams = new URLSearchParams();
21730
+ searchParams.append("limit", String(limit));
21731
+ searchParams.append("offset", String(offset));
21732
+ const raw = await getClarityJson(config, {
21733
+ method: "GET",
21734
+ path: `/v2/clarity-v2/processes/${encodeURIComponent(processId)}/snapshots/${kind}`,
21735
+ resource: "Clarity process snapshots",
21736
+ searchParams
21737
+ });
21738
+ if (options.json) {
21739
+ printJson(raw);
21740
+ return;
21741
+ }
21742
+ const parsed = listSnapshotsResponseSchema.safeParse(raw);
21743
+ if (!parsed.success) {
21744
+ throw new CliError(
21745
+ `Unexpected response from the API: ${parsed.error.message}`
21746
+ );
21747
+ }
21748
+ const response = parsed.data;
21749
+ if (response.snapshots.length === 0) {
21750
+ console.log("No snapshots found.");
21751
+ return;
21752
+ }
21753
+ console.log(renderTable(TABLE_COLUMNS21, response.snapshots));
21754
+ console.log(renderPaginationSummary(response, offset));
21755
+ }, "action"));
21756
+ }
21757
+ __name(registerClarityListSnapshots, "registerClarityListSnapshots");
21758
+ function parseSnapshotKind2(raw) {
21759
+ const kind = SNAPSHOT_KINDS.find((candidate) => candidate === raw);
21760
+ if (kind === void 0) {
21761
+ throw new CliError(`kind must be one of: ${SNAPSHOT_KINDS.join(", ")}`);
21762
+ }
21763
+ return kind;
21764
+ }
21765
+ __name(parseSnapshotKind2, "parseSnapshotKind");
21766
+ function renderPaginationSummary(response, offset) {
21767
+ if (response.total === void 0) {
21768
+ return `Showing ${response.snapshots.length} \xB7 offset ${offset}`;
21769
+ }
21770
+ return `Showing ${response.snapshots.length} of ${response.total} \xB7 offset ${offset}`;
21771
+ }
21772
+ __name(renderPaginationSummary, "renderPaginationSummary");
21773
+
21445
21774
  // src/commands/clarity/postprocess.ts
21446
21775
  var SNAPSHOT_TYPES = ["current_process", "transformation_proposal"];
21447
21776
  function registerClarityPostprocess(clarity) {
@@ -21473,9 +21802,9 @@ function registerClarityPostprocess(clarity) {
21473
21802
  __name(registerClarityPostprocess, "registerClarityPostprocess");
21474
21803
 
21475
21804
  // src/commands/clarity/process-labels.ts
21476
- var MIN_LIMIT7 = 1;
21477
- var MAX_LIMIT7 = 100;
21478
- var DEFAULT_LIMIT7 = 50;
21805
+ var MIN_LIMIT8 = 1;
21806
+ var MAX_LIMIT8 = 100;
21807
+ var DEFAULT_LIMIT8 = 50;
21479
21808
  var ORG_FLAG_DESCRIPTION2 = "organization id for the org-scoped process tag palette (overrides DUVO_ORG_ID)";
21480
21809
  var PROCESS_LABELS_RESOURCE_PATH = "/clarity/process-labels";
21481
21810
  var LABELS_WITH_COUNT_COLUMNS = [
@@ -21512,7 +21841,7 @@ function registerClarityProcessLabels(clarity) {
21512
21841
  }
21513
21842
  __name(registerClarityProcessLabels, "registerClarityProcessLabels");
21514
21843
  function registerList(processLabels) {
21515
- processLabels.command("list", { isDefault: true }).description("List process tags in the current organization").option("--org <org-id>", ORG_FLAG_DESCRIPTION2).option("--limit <n>", `page size (${MIN_LIMIT7}-${MAX_LIMIT7})`).option("--offset <n>", "number of tags to skip").option("--search <text>", "only show tags whose value contains this text").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function listAction(options) {
21844
+ processLabels.command("list", { isDefault: true }).description("List process tags in the current organization").option("--org <org-id>", ORG_FLAG_DESCRIPTION2).option("--limit <n>", `page size (${MIN_LIMIT8}-${MAX_LIMIT8})`).option("--offset <n>", "number of tags to skip").option("--search <text>", "only show tags whose value contains this text").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function listAction(options) {
21516
21845
  const { apiKey, apiBaseUrl } = await requireAuthenticatedConfig(this);
21517
21846
  const raw = await httpRequest({
21518
21847
  method: "GET",
@@ -21610,7 +21939,7 @@ function registerListProcess(processLabels) {
21610
21939
  }
21611
21940
  __name(registerListProcess, "registerListProcess");
21612
21941
  function registerAvailable(processLabels) {
21613
- processLabels.command("available").description("List tags available to assign to a process").requiredOption("--process <process-id>", "ID of the process").option("--limit <n>", `page size (${MIN_LIMIT7}-${MAX_LIMIT7})`).option("--offset <n>", "number of tags to skip").option("--search <text>", "only show tags whose value contains this text").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function availableAction(options) {
21942
+ processLabels.command("available").description("List tags available to assign to a process").requiredOption("--process <process-id>", "ID of the process").option("--limit <n>", `page size (${MIN_LIMIT8}-${MAX_LIMIT8})`).option("--offset <n>", "number of tags to skip").option("--search <text>", "only show tags whose value contains this text").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function availableAction(options) {
21614
21943
  const { apiKey, apiBaseUrl } = await requireAuthenticatedConfig(this);
21615
21944
  const raw = await httpRequest({
21616
21945
  method: "GET",
@@ -21697,9 +22026,9 @@ function buildAssignBody(options) {
21697
22026
  __name(buildAssignBody, "buildAssignBody");
21698
22027
  function buildListSearchParams(options) {
21699
22028
  const limit = parseLimit(options.limit, {
21700
- defaultValue: DEFAULT_LIMIT7,
21701
- min: MIN_LIMIT7,
21702
- max: MAX_LIMIT7
22029
+ defaultValue: DEFAULT_LIMIT8,
22030
+ min: MIN_LIMIT8,
22031
+ max: MAX_LIMIT8
21703
22032
  });
21704
22033
  const offset = parseOffset(options.offset);
21705
22034
  const searchParams = new URLSearchParams({
@@ -21778,40 +22107,40 @@ function renderLabelSummary(label) {
21778
22107
  __name(renderLabelSummary, "renderLabelSummary");
21779
22108
 
21780
22109
  // src/commands/clarity/process-links.ts
21781
- import { z as z99 } from "zod";
21782
- var MIN_LIMIT8 = 1;
21783
- var MAX_LIMIT8 = 500;
21784
- var DEFAULT_LIMIT8 = 100;
22110
+ import { z as z100 } from "zod";
22111
+ var MIN_LIMIT9 = 1;
22112
+ var MAX_LIMIT9 = 500;
22113
+ var DEFAULT_LIMIT9 = 100;
21785
22114
  var ORG_FLAG_DESCRIPTION3 = "organization id for the org-scoped process landscape (overrides DUVO_ORG_ID)";
21786
22115
  var PROCESS_LINKS_RESOURCE_PATH = "/clarity/hierarchy/process-links";
21787
- var processLinkTypeSchema = z99.enum([
22116
+ var processLinkTypeSchema = z100.enum([
21788
22117
  "hands_off_to",
21789
22118
  "shares_step_with",
21790
22119
  "variant_of"
21791
22120
  ]);
21792
- var processLinkStateSchema = z99.enum(["suggested", "confirmed"]);
21793
- var processLinkSchema = z99.object({
21794
- id: z99.string(),
21795
- source_node_id: z99.string(),
21796
- target_node_id: z99.string(),
22121
+ var processLinkStateSchema = z100.enum(["suggested", "confirmed"]);
22122
+ var processLinkSchema = z100.object({
22123
+ id: z100.string(),
22124
+ source_node_id: z100.string(),
22125
+ target_node_id: z100.string(),
21797
22126
  type: processLinkTypeSchema,
21798
22127
  state: processLinkStateSchema,
21799
- confidence: z99.number().nullable(),
21800
- created_at: z99.string(),
21801
- updated_at: z99.string()
22128
+ confidence: z100.number().nullable(),
22129
+ created_at: z100.string(),
22130
+ updated_at: z100.string()
21802
22131
  });
21803
- var listProcessLinksResponseSchema = z99.object({
21804
- process_links: z99.array(processLinkSchema),
21805
- total: z99.number(),
21806
- limit: z99.number(),
21807
- offset: z99.number()
22132
+ var listProcessLinksResponseSchema = z100.object({
22133
+ process_links: z100.array(processLinkSchema),
22134
+ total: z100.number(),
22135
+ limit: z100.number(),
22136
+ offset: z100.number()
21808
22137
  });
21809
- var processLinkMutationResponseSchema = z99.object({
22138
+ var processLinkMutationResponseSchema = z100.object({
21810
22139
  process_link: processLinkSchema,
21811
- created: z99.boolean().optional()
22140
+ created: z100.boolean().optional()
21812
22141
  });
21813
- var deleteProcessLinkResponseSchema = z99.object({
21814
- deleted: z99.boolean()
22142
+ var deleteProcessLinkResponseSchema = z100.object({
22143
+ deleted: z100.boolean()
21815
22144
  });
21816
22145
  var PROCESS_LINK_COLUMNS = [
21817
22146
  { header: "ID", cell: /* @__PURE__ */ __name((row) => row.id, "cell"), maxWidth: 36 },
@@ -21834,7 +22163,7 @@ var PROCESS_LINK_COLUMNS = [
21834
22163
  ];
21835
22164
  function registerClarityProcessLinks(clarity) {
21836
22165
  const processLinks = clarity.command("process-links").description("Manage Clarity process links");
21837
- processLinks.command("list", { isDefault: true }).description("List process links in the current organization").option("--org <org-id>", ORG_FLAG_DESCRIPTION3).option("--node <node-id>", "only show links touching this process node").option("--limit <n>", `page size (${MIN_LIMIT8}-${MAX_LIMIT8})`).option("--offset <n>", "number of links to skip").option("--json", "output JSON").action(/* @__PURE__ */ __name(async function listAction(options) {
22166
+ processLinks.command("list", { isDefault: true }).description("List process links in the current organization").option("--org <org-id>", ORG_FLAG_DESCRIPTION3).option("--node <node-id>", "only show links touching this process node").option("--limit <n>", `page size (${MIN_LIMIT9}-${MAX_LIMIT9})`).option("--offset <n>", "number of links to skip").option("--json", "output JSON").action(/* @__PURE__ */ __name(async function listAction(options) {
21838
22167
  const config = await requireAuthenticatedConfig(this);
21839
22168
  const path = await resolveProcessLinksPath(this);
21840
22169
  const response = await listProcessLinks(config, path, options);
@@ -21904,9 +22233,9 @@ function registerClarityProcessLinks(clarity) {
21904
22233
  __name(registerClarityProcessLinks, "registerClarityProcessLinks");
21905
22234
  async function listProcessLinks(config, path, options) {
21906
22235
  const limit = parseLimit(options.limit, {
21907
- defaultValue: DEFAULT_LIMIT8,
21908
- min: MIN_LIMIT8,
21909
- max: MAX_LIMIT8
22236
+ defaultValue: DEFAULT_LIMIT9,
22237
+ min: MIN_LIMIT9,
22238
+ max: MAX_LIMIT9
21910
22239
  });
21911
22240
  const offset = parseOffset(options.offset);
21912
22241
  const searchParams = new URLSearchParams({
@@ -22004,14 +22333,14 @@ function renderProcessLinks(response) {
22004
22333
  __name(renderProcessLinks, "renderProcessLinks");
22005
22334
 
22006
22335
  // src/commands/clarity/promote-current-process.ts
22007
- import { z as z100 } from "zod";
22008
- var snapshotSchema3 = z100.object({
22009
- snapshot: z100.object({
22010
- id: z100.string(),
22011
- status: z100.string(),
22012
- creator_type: z100.string(),
22013
- created_at: z100.string(),
22014
- updated_at: z100.string()
22336
+ import { z as z101 } from "zod";
22337
+ var snapshotSchema3 = z101.object({
22338
+ snapshot: z101.object({
22339
+ id: z101.string(),
22340
+ status: z101.string(),
22341
+ creator_type: z101.string(),
22342
+ created_at: z101.string(),
22343
+ updated_at: z101.string()
22015
22344
  })
22016
22345
  });
22017
22346
  function registerClarityPromoteCurrentProcess(clarity) {
@@ -22048,14 +22377,14 @@ function registerClarityPromoteCurrentProcess(clarity) {
22048
22377
  __name(registerClarityPromoteCurrentProcess, "registerClarityPromoteCurrentProcess");
22049
22378
 
22050
22379
  // src/commands/clarity/promote-transformation-proposal.ts
22051
- import { z as z101 } from "zod";
22052
- var snapshotSchema4 = z101.object({
22053
- snapshot: z101.object({
22054
- id: z101.string(),
22055
- status: z101.string(),
22056
- creator_type: z101.string(),
22057
- created_at: z101.string(),
22058
- updated_at: z101.string()
22380
+ import { z as z102 } from "zod";
22381
+ var snapshotSchema4 = z102.object({
22382
+ snapshot: z102.object({
22383
+ id: z102.string(),
22384
+ status: z102.string(),
22385
+ creator_type: z102.string(),
22386
+ created_at: z102.string(),
22387
+ updated_at: z102.string()
22059
22388
  })
22060
22389
  });
22061
22390
  function registerClarityPromoteTransformationProposal(clarity) {
@@ -22131,8 +22460,8 @@ __name(registerClarityRevertTransformationProposal, "registerClarityRevertTransf
22131
22460
 
22132
22461
  // src/commands/clarity/save-snapshot.ts
22133
22462
  import { readFile as readFile7 } from "node:fs/promises";
22134
- import { z as z102 } from "zod";
22135
- var snapshotFileSchema = z102.union([
22463
+ import { z as z103 } from "zod";
22464
+ var snapshotFileSchema = z103.union([
22136
22465
  saveClarityProcessSnapshotBodySchema.shape.steps,
22137
22466
  saveClarityProcessSnapshotBodySchema.pick({
22138
22467
  steps: true,
@@ -22291,9 +22620,9 @@ function registerClarityStopTransformationProposal(clarity) {
22291
22620
  __name(registerClarityStopTransformationProposal, "registerClarityStopTransformationProposal");
22292
22621
 
22293
22622
  // src/commands/clarity/index.ts
22294
- var DEFAULT_LIMIT9 = 50;
22295
- var MIN_LIMIT9 = 1;
22296
- var MAX_LIMIT9 = 100;
22623
+ var DEFAULT_LIMIT10 = 50;
22624
+ var MIN_LIMIT10 = 1;
22625
+ var MAX_LIMIT10 = 100;
22297
22626
  var CLARITY_V2_REQUIRED_MESSAGE = "This command requires Clarity v2. Use `duvo clarity overview <process-id>` to read legacy v1 context.";
22298
22627
  function registerClarity(program) {
22299
22628
  const clarity = program.command("clarity").description("Manage and read Clarity processes in the Duvo public API");
@@ -22319,6 +22648,7 @@ function registerClarity(program) {
22319
22648
  registerClarityGetTransformationProposal(clarity);
22320
22649
  registerClarityListExtraCaptureRequests(clarity);
22321
22650
  registerClarityProcessSummaries(clarity);
22651
+ registerClarityListSnapshots(clarity);
22322
22652
  registerClarityArtifactChatConversations(clarity);
22323
22653
  registerClarityArtifactChatMessages(clarity);
22324
22654
  registerClaritySendArtifactChatMessage(clarity);
@@ -22344,7 +22674,7 @@ function registerClarity(program) {
22344
22674
  }
22345
22675
  __name(registerClarity, "registerClarity");
22346
22676
  function registerList2(clarity) {
22347
- clarity.command("list", { isDefault: true }).description("List Clarity processes for the current team").option("--limit <n>", `page size (${MIN_LIMIT9}-${MAX_LIMIT9})`).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(
22677
+ clarity.command("list", { isDefault: true }).description("List Clarity processes for the current team").option("--limit <n>", `page size (${MIN_LIMIT10}-${MAX_LIMIT10})`).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(
22348
22678
  "--process-version <1|2>",
22349
22679
  "filter by Clarity process schema version"
22350
22680
  ).option("--json", "output JSON").option("--csv", "output CSV").action(/* @__PURE__ */ __name(async function listAction(options) {
@@ -22354,7 +22684,7 @@ function registerList2(clarity) {
22354
22684
  }
22355
22685
  __name(registerList2, "registerList");
22356
22686
  function registerSearch(clarity) {
22357
- clarity.command("search <query>").description("Search Clarity processes by name").option("--limit <n>", `page size (${MIN_LIMIT9}-${MAX_LIMIT9})`).option("--offset <n>", "number of processes to skip").option("--status <status>", "filter by lifecycle status").option(
22687
+ clarity.command("search <query>").description("Search Clarity processes by name").option("--limit <n>", `page size (${MIN_LIMIT10}-${MAX_LIMIT10})`).option("--offset <n>", "number of processes to skip").option("--status <status>", "filter by lifecycle status").option(
22358
22688
  "--process-version <1|2>",
22359
22689
  "filter by Clarity process schema version"
22360
22690
  ).option("--json", "output JSON").option("--csv", "output CSV").action(/* @__PURE__ */ __name(async function searchAction(query, options) {
@@ -22699,9 +23029,9 @@ function registerExport(clarity) {
22699
23029
  __name(registerExport, "registerExport");
22700
23030
  async function loadProcessList(command, options) {
22701
23031
  const limit = parseLimit(options.limit, {
22702
- defaultValue: DEFAULT_LIMIT9,
22703
- min: MIN_LIMIT9,
22704
- max: MAX_LIMIT9
23032
+ defaultValue: DEFAULT_LIMIT10,
23033
+ min: MIN_LIMIT10,
23034
+ max: MAX_LIMIT10
22705
23035
  });
22706
23036
  const offset = parseOffset(options.offset);
22707
23037
  const version2 = parseProcessVersion(options.processVersion);
@@ -23085,7 +23415,7 @@ function registerConnectionsGet(connections) {
23085
23415
  __name(registerConnectionsGet, "registerConnectionsGet");
23086
23416
 
23087
23417
  // src/commands/connections/list.ts
23088
- var TABLE_COLUMNS21 = [
23418
+ var TABLE_COLUMNS22 = [
23089
23419
  { header: "ID", cell: /* @__PURE__ */ __name((row) => row.id, "cell") },
23090
23420
  { header: "NAME", cell: /* @__PURE__ */ __name((row) => row.name, "cell") },
23091
23421
  { header: "TYPE", cell: /* @__PURE__ */ __name((row) => row.type, "cell") },
@@ -23125,26 +23455,26 @@ function registerConnectionsList(connections) {
23125
23455
  console.log("No connections found.");
23126
23456
  return;
23127
23457
  }
23128
- console.log(renderTable(TABLE_COLUMNS21, rows));
23458
+ console.log(renderTable(TABLE_COLUMNS22, rows));
23129
23459
  console.log(`Showing ${rows.length}`);
23130
23460
  }, "listAction"));
23131
23461
  }
23132
23462
  __name(registerConnectionsList, "registerConnectionsList");
23133
23463
 
23134
23464
  // src/commands/connections/probe.ts
23135
- import { z as z103 } from "zod";
23136
- var toolSchema = z103.object({
23137
- name: z103.string(),
23138
- description: z103.string().optional(),
23139
- input_schema: z103.record(z103.string(), z103.unknown()).optional()
23465
+ import { z as z104 } from "zod";
23466
+ var toolSchema = z104.object({
23467
+ name: z104.string(),
23468
+ description: z104.string().optional(),
23469
+ input_schema: z104.record(z104.string(), z104.unknown()).optional()
23140
23470
  });
23141
- var probeResponseSchema = z103.object({
23142
- success: z103.boolean(),
23143
- tools: z103.array(toolSchema).optional(),
23144
- error: z103.string().optional()
23471
+ var probeResponseSchema = z104.object({
23472
+ success: z104.boolean(),
23473
+ tools: z104.array(toolSchema).optional(),
23474
+ error: z104.string().optional()
23145
23475
  });
23146
23476
  var DESCRIPTION_MAX_WIDTH = 80;
23147
- var TABLE_COLUMNS22 = [
23477
+ var TABLE_COLUMNS23 = [
23148
23478
  { header: "NAME", cell: /* @__PURE__ */ __name((row) => row.name, "cell") },
23149
23479
  {
23150
23480
  header: "DESCRIPTION",
@@ -23204,7 +23534,7 @@ function registerConnectionsProbe(connections) {
23204
23534
  console.log("No tools found.");
23205
23535
  return;
23206
23536
  }
23207
- console.log(renderTable(TABLE_COLUMNS22, tools));
23537
+ console.log(renderTable(TABLE_COLUMNS23, tools));
23208
23538
  console.log(
23209
23539
  `Showing ${tools.length} tool${tools.length === 1 ? "" : "s"}`
23210
23540
  );
@@ -23360,48 +23690,48 @@ function registerConnections(program) {
23360
23690
  __name(registerConnections, "registerConnections");
23361
23691
 
23362
23692
  // src/api/credential-schemas.ts
23363
- import { z as z104 } from "zod";
23364
- var dateLike = z104.string();
23365
- var secretSchema = z104.object({
23366
- id: z104.string(),
23367
- team_id: z104.string(),
23368
- user_id: z104.string().nullable(),
23369
- name: z104.string(),
23370
- service_slug: z104.string().nullable(),
23371
- env_var_keys: z104.array(z104.string()),
23372
- created_by: z104.string(),
23693
+ import { z as z105 } from "zod";
23694
+ var dateLike = z105.string();
23695
+ var secretSchema = z105.object({
23696
+ id: z105.string(),
23697
+ team_id: z105.string(),
23698
+ user_id: z105.string().nullable(),
23699
+ name: z105.string(),
23700
+ service_slug: z105.string().nullable(),
23701
+ env_var_keys: z105.array(z105.string()),
23702
+ created_by: z105.string(),
23373
23703
  created_at: dateLike,
23374
23704
  updated_at: dateLike
23375
23705
  });
23376
- var secretsListResponseSchema = z104.array(secretSchema);
23706
+ var secretsListResponseSchema = z105.array(secretSchema);
23377
23707
  var secretResponseSchema = secretSchema;
23378
- var browserLoginSchema = z104.object({
23379
- id: z104.string(),
23380
- user_id: z104.string().nullable(),
23381
- team_id: z104.string(),
23382
- domain: z104.string(),
23383
- username: z104.string().nullable(),
23708
+ var browserLoginSchema = z105.object({
23709
+ id: z105.string(),
23710
+ user_id: z105.string().nullable(),
23711
+ team_id: z105.string(),
23712
+ domain: z105.string(),
23713
+ username: z105.string().nullable(),
23384
23714
  password: encryptedDataSchema.nullable(),
23385
23715
  otp_secret: encryptedDataSchema.nullable(),
23386
23716
  created_at: dateLike,
23387
23717
  updated_at: dateLike
23388
23718
  });
23389
- var browserLoginsListResponseSchema = z104.array(credentialPreviewSchema);
23390
- var revisionLoginSummarySchema = z104.object({
23391
- id: z104.string(),
23392
- user_id: z104.string().nullable(),
23393
- team_id: z104.string().nullable(),
23394
- domain: z104.string(),
23395
- username: z104.string().nullable(),
23719
+ var browserLoginsListResponseSchema = z105.array(credentialPreviewSchema);
23720
+ var revisionLoginSummarySchema = z105.object({
23721
+ id: z105.string(),
23722
+ user_id: z105.string().nullable(),
23723
+ team_id: z105.string().nullable(),
23724
+ domain: z105.string(),
23725
+ username: z105.string().nullable(),
23396
23726
  created_at: dateLike,
23397
23727
  updated_at: dateLike
23398
23728
  });
23399
- var revisionLoginsListResponseSchema = z104.array(
23729
+ var revisionLoginsListResponseSchema = z105.array(
23400
23730
  revisionLoginSummarySchema
23401
23731
  );
23402
- var revisionSecretsListResponseSchema = z104.array(secretSchema);
23403
- var successResponseSchema2 = z104.object({
23404
- success: z104.boolean()
23732
+ var revisionSecretsListResponseSchema = z105.array(secretSchema);
23733
+ var successResponseSchema2 = z105.object({
23734
+ success: z105.boolean()
23405
23735
  });
23406
23736
  var attachSuccessResponseSchema = successResponseSchema2;
23407
23737
  var deleteSecretResponseSchema = successResponseSchema2;
@@ -23595,7 +23925,7 @@ function registerCredentialsGet(credentials) {
23595
23925
  __name(registerCredentialsGet, "registerCredentialsGet");
23596
23926
 
23597
23927
  // src/commands/credentials/list.ts
23598
- var TABLE_COLUMNS23 = [
23928
+ var TABLE_COLUMNS24 = [
23599
23929
  { header: "ID", cell: /* @__PURE__ */ __name((row) => row.id, "cell") },
23600
23930
  { header: "DOMAIN", cell: /* @__PURE__ */ __name((row) => row.domain, "cell") },
23601
23931
  {
@@ -23654,7 +23984,7 @@ function registerCredentialsList(credentials) {
23654
23984
  console.log("No credentials found.");
23655
23985
  return;
23656
23986
  }
23657
- console.log(renderTable(TABLE_COLUMNS23, rows));
23987
+ console.log(renderTable(TABLE_COLUMNS24, rows));
23658
23988
  console.log(`Showing ${rows.length}`);
23659
23989
  }, "listAction"));
23660
23990
  }
@@ -23934,7 +24264,7 @@ function registerFilesDownloadUrl(files) {
23934
24264
  __name(registerFilesDownloadUrl, "registerFilesDownloadUrl");
23935
24265
 
23936
24266
  // src/commands/files/list.ts
23937
- var TABLE_COLUMNS24 = [
24267
+ var TABLE_COLUMNS25 = [
23938
24268
  { header: "PATH", cell: /* @__PURE__ */ __name((row) => row.path, "cell") },
23939
24269
  { header: "NAME", cell: /* @__PURE__ */ __name((row) => row.name, "cell") },
23940
24270
  {
@@ -23977,7 +24307,7 @@ function registerFilesList(files) {
23977
24307
  console.log("No files found.");
23978
24308
  return;
23979
24309
  }
23980
- console.log(renderTable(TABLE_COLUMNS24, parsed.data.files));
24310
+ console.log(renderTable(TABLE_COLUMNS25, parsed.data.files));
23981
24311
  console.log(`Showing ${parsed.data.files.length}`);
23982
24312
  }, "listAction"));
23983
24313
  }
@@ -24404,7 +24734,7 @@ function registerIntegrationsCustom(integrations) {
24404
24734
  __name(registerIntegrationsCustom, "registerIntegrationsCustom");
24405
24735
 
24406
24736
  // src/commands/integrations/list.ts
24407
- var TABLE_COLUMNS25 = [
24737
+ var TABLE_COLUMNS26 = [
24408
24738
  { header: "ID", cell: /* @__PURE__ */ __name((row) => row.id, "cell") },
24409
24739
  { header: "NAME", cell: /* @__PURE__ */ __name((row) => row.name, "cell") },
24410
24740
  { header: "TYPE", cell: /* @__PURE__ */ __name((row) => row.type, "cell") },
@@ -24446,7 +24776,7 @@ function registerIntegrationsList(integrations) {
24446
24776
  console.log("No integrations found.");
24447
24777
  return;
24448
24778
  }
24449
- console.log(renderTable(TABLE_COLUMNS25, rows));
24779
+ console.log(renderTable(TABLE_COLUMNS26, rows));
24450
24780
  console.log(`Showing ${rows.length}`);
24451
24781
  }, "listAction"));
24452
24782
  }
@@ -25289,7 +25619,7 @@ function parseHeaders(raw) {
25289
25619
  return result;
25290
25620
  }
25291
25621
  __name(parseHeaders, "parseHeaders");
25292
- var TABLE_COLUMNS26 = [
25622
+ var TABLE_COLUMNS27 = [
25293
25623
  { header: "NAME", cell: /* @__PURE__ */ __name((row) => row.name, "cell") },
25294
25624
  { header: "DESCRIPTION", cell: /* @__PURE__ */ __name((row) => row.description, "cell") }
25295
25625
  ];
@@ -25347,7 +25677,7 @@ function registerOauthMcpProbe(mcp) {
25347
25677
  console.log("No tools advertised by this MCP server.");
25348
25678
  return;
25349
25679
  }
25350
- console.log(renderTable(TABLE_COLUMNS26, rows));
25680
+ console.log(renderTable(TABLE_COLUMNS27, rows));
25351
25681
  console.log(`Showing ${rows.length}`);
25352
25682
  }, "probeMcpAction"));
25353
25683
  }
@@ -25429,7 +25759,7 @@ function registerOauth(program) {
25429
25759
  __name(registerOauth, "registerOauth");
25430
25760
 
25431
25761
  // src/commands/plugins/list.ts
25432
- var TABLE_COLUMNS27 = [
25762
+ var TABLE_COLUMNS28 = [
25433
25763
  { header: "NAME", cell: /* @__PURE__ */ __name((row) => row.name, "cell") },
25434
25764
  { header: "TYPE", cell: /* @__PURE__ */ __name((row) => row.type, "cell") },
25435
25765
  {
@@ -25463,7 +25793,7 @@ function registerPluginsList(plugins) {
25463
25793
  console.log("No plugins found.");
25464
25794
  return;
25465
25795
  }
25466
- console.log(renderTable(TABLE_COLUMNS27, parsed.data.plugins));
25796
+ console.log(renderTable(TABLE_COLUMNS28, parsed.data.plugins));
25467
25797
  console.log(`Showing ${parsed.data.plugins.length}`);
25468
25798
  }, "listAction"));
25469
25799
  }
@@ -25738,7 +26068,7 @@ function registerPulseAnswer(pulse) {
25738
26068
  __name(registerPulseAnswer, "registerPulseAnswer");
25739
26069
 
25740
26070
  // src/commands/pulse/connections.ts
25741
- var TABLE_COLUMNS28 = [
26071
+ var TABLE_COLUMNS29 = [
25742
26072
  {
25743
26073
  header: "CONNECTION ID",
25744
26074
  cell: /* @__PURE__ */ __name((row) => row.connection_id, "cell")
@@ -25770,7 +26100,7 @@ function registerList4(connections) {
25770
26100
  console.log("No connections attached.");
25771
26101
  return;
25772
26102
  }
25773
- console.log(renderTable(TABLE_COLUMNS28, parsed.data.connections));
26103
+ console.log(renderTable(TABLE_COLUMNS29, parsed.data.connections));
25774
26104
  }, "listAction"));
25775
26105
  }
25776
26106
  __name(registerList4, "registerList");
@@ -26006,10 +26336,10 @@ function registerPulseHtml(pulse) {
26006
26336
  __name(registerPulseHtml, "registerPulseHtml");
26007
26337
 
26008
26338
  // src/commands/pulse/list.ts
26009
- var DEFAULT_LIMIT10 = 20;
26010
- var MIN_LIMIT10 = 1;
26011
- var MAX_LIMIT10 = 100;
26012
- var TABLE_COLUMNS29 = [
26339
+ var DEFAULT_LIMIT11 = 20;
26340
+ var MIN_LIMIT11 = 1;
26341
+ var MAX_LIMIT11 = 100;
26342
+ var TABLE_COLUMNS30 = [
26013
26343
  { header: "ID", cell: /* @__PURE__ */ __name((row) => row.id, "cell") },
26014
26344
  {
26015
26345
  header: "TITLE",
@@ -26036,11 +26366,11 @@ function registerPulseList(pulse) {
26036
26366
  pulse.command("list", { isDefault: true }).description("List your Pulse dashboards").option(
26037
26367
  "--team",
26038
26368
  "list dashboards a teammate published to your whole team instead of your own"
26039
- ).option("--shared", "deprecated: always returns no dashboards").option("--limit <n>", `page size (${MIN_LIMIT10}-${MAX_LIMIT10})`).option("--offset <n>", "number of dashboards to skip").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function listAction(options) {
26369
+ ).option("--shared", "deprecated: always returns no dashboards").option("--limit <n>", `page size (${MIN_LIMIT11}-${MAX_LIMIT11})`).option("--offset <n>", "number of dashboards to skip").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function listAction(options) {
26040
26370
  const limit = parseLimit(options.limit, {
26041
- defaultValue: DEFAULT_LIMIT10,
26042
- min: MIN_LIMIT10,
26043
- max: MAX_LIMIT10
26371
+ defaultValue: DEFAULT_LIMIT11,
26372
+ min: MIN_LIMIT11,
26373
+ max: MAX_LIMIT11
26044
26374
  });
26045
26375
  const offset = parseOffset(options.offset);
26046
26376
  const { apiKey, apiBaseUrl } = await requireAuthenticatedConfig(this);
@@ -26071,7 +26401,7 @@ function registerPulseList(pulse) {
26071
26401
  console.log("No Pulse dashboards found.");
26072
26402
  return;
26073
26403
  }
26074
- console.log(renderTable(TABLE_COLUMNS29, response.artifacts));
26404
+ console.log(renderTable(TABLE_COLUMNS30, response.artifacts));
26075
26405
  console.log(
26076
26406
  `Showing ${response.artifacts.length} of ${response.total} \xB7 offset ${response.offset}`
26077
26407
  );
@@ -26080,10 +26410,10 @@ function registerPulseList(pulse) {
26080
26410
  __name(registerPulseList, "registerPulseList");
26081
26411
 
26082
26412
  // src/commands/pulse/messages.ts
26083
- var DEFAULT_LIMIT11 = 100;
26084
- var MIN_LIMIT11 = 1;
26085
- var MAX_LIMIT11 = 500;
26086
- var TABLE_COLUMNS30 = [
26413
+ var DEFAULT_LIMIT12 = 100;
26414
+ var MIN_LIMIT12 = 1;
26415
+ var MAX_LIMIT12 = 500;
26416
+ var TABLE_COLUMNS31 = [
26087
26417
  { header: "ROLE", cell: /* @__PURE__ */ __name((row) => row.role, "cell") },
26088
26418
  {
26089
26419
  header: "CONTENT",
@@ -26093,12 +26423,12 @@ var TABLE_COLUMNS30 = [
26093
26423
  { header: "CREATED", cell: /* @__PURE__ */ __name((row) => row.created_at, "cell") }
26094
26424
  ];
26095
26425
  function registerPulseMessages(pulse) {
26096
- pulse.command("messages <id>").description("List a Pulse dashboard's chat transcript (creator only)").option("--limit <n>", `page size (${MIN_LIMIT11}-${MAX_LIMIT11})`).option("--offset <n>", "number of messages to skip").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function messagesAction(id, options) {
26426
+ pulse.command("messages <id>").description("List a Pulse dashboard's chat transcript (creator only)").option("--limit <n>", `page size (${MIN_LIMIT12}-${MAX_LIMIT12})`).option("--offset <n>", "number of messages to skip").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function messagesAction(id, options) {
26097
26427
  const pulseId = trimRequired(id, "<id>");
26098
26428
  const limit = parseLimit(options.limit, {
26099
- defaultValue: DEFAULT_LIMIT11,
26100
- min: MIN_LIMIT11,
26101
- max: MAX_LIMIT11
26429
+ defaultValue: DEFAULT_LIMIT12,
26430
+ min: MIN_LIMIT12,
26431
+ max: MAX_LIMIT12
26102
26432
  });
26103
26433
  const offset = parseOffset(options.offset);
26104
26434
  const { apiKey, apiBaseUrl } = await requireAuthenticatedConfig(this);
@@ -26127,7 +26457,7 @@ function registerPulseMessages(pulse) {
26127
26457
  console.log("No messages yet.");
26128
26458
  return;
26129
26459
  }
26130
- console.log(renderTable(TABLE_COLUMNS30, data));
26460
+ console.log(renderTable(TABLE_COLUMNS31, data));
26131
26461
  console.log(`Showing ${data.length} of ${total} \xB7 offset ${offset}`);
26132
26462
  console.log(
26133
26463
  "Run with --json to see full message payloads, including the tool call id `duvo pulse answer` needs."
@@ -26520,7 +26850,7 @@ function registerPulse(program) {
26520
26850
  __name(registerPulse, "registerPulse");
26521
26851
 
26522
26852
  // src/commands/queue-labels/index.ts
26523
- var TABLE_COLUMNS31 = [
26853
+ var TABLE_COLUMNS32 = [
26524
26854
  { header: "ID", cell: /* @__PURE__ */ __name((row) => row.id, "cell") },
26525
26855
  { header: "KEY", cell: /* @__PURE__ */ __name((row) => row.key, "cell") },
26526
26856
  { header: "VALUE", cell: /* @__PURE__ */ __name((row) => row.value, "cell") },
@@ -26574,7 +26904,7 @@ function registerList5(labels) {
26574
26904
  console.log("No labels defined on this queue.");
26575
26905
  return;
26576
26906
  }
26577
- console.log(renderTable(TABLE_COLUMNS31, parsed.data.labels));
26907
+ console.log(renderTable(TABLE_COLUMNS32, parsed.data.labels));
26578
26908
  console.log(`Showing ${parsed.data.labels.length}`);
26579
26909
  }, "listAction"));
26580
26910
  }
@@ -27325,10 +27655,10 @@ function registerQueuesLinkAgent(queues) {
27325
27655
  __name(registerQueuesLinkAgent, "registerQueuesLinkAgent");
27326
27656
 
27327
27657
  // src/commands/queues/list.ts
27328
- var DEFAULT_LIMIT12 = 20;
27329
- var MIN_LIMIT12 = 1;
27330
- var MAX_LIMIT12 = 100;
27331
- var TABLE_COLUMNS32 = [
27658
+ var DEFAULT_LIMIT13 = 20;
27659
+ var MIN_LIMIT13 = 1;
27660
+ var MAX_LIMIT13 = 100;
27661
+ var TABLE_COLUMNS33 = [
27332
27662
  { header: "ID", cell: /* @__PURE__ */ __name((row) => row.id, "cell") },
27333
27663
  { header: "NAME", cell: /* @__PURE__ */ __name((row) => row.name, "cell") },
27334
27664
  {
@@ -27339,11 +27669,11 @@ var TABLE_COLUMNS32 = [
27339
27669
  { header: "CREATED", cell: /* @__PURE__ */ __name((row) => row.created_at ?? "", "cell") }
27340
27670
  ];
27341
27671
  function registerQueuesList(queues) {
27342
- queues.command("list", { isDefault: true }).description("List queues for your team").option("--limit <n>", `page size (${MIN_LIMIT12}-${MAX_LIMIT12})`).option("--offset <n>", "number of queues to skip").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function listAction(options) {
27672
+ queues.command("list", { isDefault: true }).description("List queues for your team").option("--limit <n>", `page size (${MIN_LIMIT13}-${MAX_LIMIT13})`).option("--offset <n>", "number of queues to skip").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function listAction(options) {
27343
27673
  const limit = parseLimit(options.limit, {
27344
- defaultValue: DEFAULT_LIMIT12,
27345
- min: MIN_LIMIT12,
27346
- max: MAX_LIMIT12
27674
+ defaultValue: DEFAULT_LIMIT13,
27675
+ min: MIN_LIMIT13,
27676
+ max: MAX_LIMIT13
27347
27677
  });
27348
27678
  const offset = parseOffset(options.offset);
27349
27679
  const config = await requireAuthenticatedConfig(this);
@@ -27376,7 +27706,7 @@ function registerQueuesList(queues) {
27376
27706
  console.log("No queues found.");
27377
27707
  return;
27378
27708
  }
27379
- console.log(renderTable(TABLE_COLUMNS32, response.queues));
27709
+ console.log(renderTable(TABLE_COLUMNS33, response.queues));
27380
27710
  const resolvedOffset = response.offset ?? offset;
27381
27711
  const total = response.total ?? null;
27382
27712
  const summary = total === null ? `Showing ${response.queues.length} \xB7 offset ${resolvedOffset}` : `Showing ${response.queues.length} of ${total} \xB7 offset ${resolvedOffset}`;
@@ -27634,7 +27964,7 @@ function registerRevisionLoginsDetach(revisionLogins) {
27634
27964
  __name(registerRevisionLoginsDetach, "registerRevisionLoginsDetach");
27635
27965
 
27636
27966
  // src/commands/revision-logins/list.ts
27637
- var TABLE_COLUMNS33 = [
27967
+ var TABLE_COLUMNS34 = [
27638
27968
  { header: "ID", cell: /* @__PURE__ */ __name((row) => row.id, "cell") },
27639
27969
  { header: "DOMAIN", cell: /* @__PURE__ */ __name((row) => row.domain, "cell") },
27640
27970
  {
@@ -27670,7 +28000,7 @@ function registerRevisionLoginsList(revisionLogins) {
27670
28000
  console.log("No logins attached to this revision.");
27671
28001
  return;
27672
28002
  }
27673
- console.log(renderTable(TABLE_COLUMNS33, rows));
28003
+ console.log(renderTable(TABLE_COLUMNS34, rows));
27674
28004
  console.log(`Showing ${rows.length}`);
27675
28005
  }, "listAction"));
27676
28006
  }
@@ -27743,7 +28073,7 @@ function registerRevisionSecretsDetach(revisionSecrets) {
27743
28073
  __name(registerRevisionSecretsDetach, "registerRevisionSecretsDetach");
27744
28074
 
27745
28075
  // src/commands/revision-secrets/list.ts
27746
- var TABLE_COLUMNS34 = [
28076
+ var TABLE_COLUMNS35 = [
27747
28077
  { header: "ID", cell: /* @__PURE__ */ __name((row) => row.id, "cell") },
27748
28078
  { header: "NAME", cell: /* @__PURE__ */ __name((row) => row.name, "cell") },
27749
28079
  {
@@ -27781,7 +28111,7 @@ function registerRevisionSecretsList(revisionSecrets) {
27781
28111
  console.log("No secrets attached to this revision.");
27782
28112
  return;
27783
28113
  }
27784
- console.log(renderTable(TABLE_COLUMNS34, rows));
28114
+ console.log(renderTable(TABLE_COLUMNS35, rows));
27785
28115
  console.log(`Showing ${rows.length}`);
27786
28116
  }, "listAction"));
27787
28117
  }
@@ -27797,91 +28127,91 @@ function registerRevisionSecrets(program) {
27797
28127
  __name(registerRevisionSecrets, "registerRevisionSecrets");
27798
28128
 
27799
28129
  // src/api/run-schemas.ts
27800
- import { z as z105 } from "zod";
27801
- var publicRunSchema = z105.object({
27802
- id: z105.string(),
27803
- agent_id: z105.string(),
27804
- build_id: z105.string(),
27805
- status: z105.string(),
27806
- source: z105.string().nullish(),
27807
- sandbox_id: z105.string().nullish(),
27808
- started_at: z105.string().nullish(),
27809
- completed_at: z105.string().nullish(),
27810
- created_at: z105.string(),
27811
- updated_at: z105.string().nullish(),
27812
- human_in_the_loop_enabled: z105.boolean().nullish()
27813
- });
27814
- var startRunResponseSchema = z105.object({
28130
+ import { z as z106 } from "zod";
28131
+ var publicRunSchema = z106.object({
28132
+ id: z106.string(),
28133
+ agent_id: z106.string(),
28134
+ build_id: z106.string(),
28135
+ status: z106.string(),
28136
+ source: z106.string().nullish(),
28137
+ sandbox_id: z106.string().nullish(),
28138
+ started_at: z106.string().nullish(),
28139
+ completed_at: z106.string().nullish(),
28140
+ created_at: z106.string(),
28141
+ updated_at: z106.string().nullish(),
28142
+ human_in_the_loop_enabled: z106.boolean().nullish()
28143
+ });
28144
+ var startRunResponseSchema = z106.object({
27815
28145
  run: publicRunSchema
27816
28146
  });
27817
- var questionOptionSchema = z105.object({
27818
- label: z105.string(),
27819
- description: z105.string().nullish()
27820
- });
27821
- var questionSchema = z105.object({
27822
- question: z105.string(),
27823
- header: z105.string().nullish(),
27824
- options: z105.array(questionOptionSchema).nullish(),
27825
- multi_select: z105.boolean().nullish()
27826
- });
27827
- var pendingHumanRequestSchema = z105.object({
27828
- id: z105.string(),
27829
- title: z105.string(),
27830
- description: z105.string().nullish(),
27831
- created_at: z105.string(),
27832
- type: z105.string(),
27833
- questions: z105.array(questionSchema).nullish()
27834
- });
27835
- var getRunResponseSchema = z105.object({
28147
+ var questionOptionSchema = z106.object({
28148
+ label: z106.string(),
28149
+ description: z106.string().nullish()
28150
+ });
28151
+ var questionSchema = z106.object({
28152
+ question: z106.string(),
28153
+ header: z106.string().nullish(),
28154
+ options: z106.array(questionOptionSchema).nullish(),
28155
+ multi_select: z106.boolean().nullish()
28156
+ });
28157
+ var pendingHumanRequestSchema = z106.object({
28158
+ id: z106.string(),
28159
+ title: z106.string(),
28160
+ description: z106.string().nullish(),
28161
+ created_at: z106.string(),
28162
+ type: z106.string(),
28163
+ questions: z106.array(questionSchema).nullish()
28164
+ });
28165
+ var getRunResponseSchema = z106.object({
27836
28166
  run: publicRunSchema.nullable(),
27837
28167
  pending_human_request: pendingHumanRequestSchema.nullish()
27838
28168
  });
27839
- var stopRunResponseSchema = z105.object({
27840
- success: z105.boolean(),
27841
- message: z105.string().nullish()
27842
- });
27843
- var runMessageSchema = z105.object({
27844
- id: z105.string(),
27845
- type: z105.string(),
27846
- role: z105.string(),
27847
- timestamp: z105.string(),
27848
- text_content: z105.string().nullish(),
27849
- tool_call: z105.object({
27850
- id: z105.string(),
27851
- name: z105.string(),
27852
- arguments: z105.record(z105.string(), z105.unknown()).nullish()
28169
+ var stopRunResponseSchema = z106.object({
28170
+ success: z106.boolean(),
28171
+ message: z106.string().nullish()
28172
+ });
28173
+ var runMessageSchema = z106.object({
28174
+ id: z106.string(),
28175
+ type: z106.string(),
28176
+ role: z106.string(),
28177
+ timestamp: z106.string(),
28178
+ text_content: z106.string().nullish(),
28179
+ tool_call: z106.object({
28180
+ id: z106.string(),
28181
+ name: z106.string(),
28182
+ arguments: z106.record(z106.string(), z106.unknown()).nullish()
27853
28183
  }).nullish(),
27854
- tool_result: z105.object({
27855
- tool_call_id: z105.string(),
27856
- result: z105.unknown().nullish(),
27857
- error: z105.string().nullish()
28184
+ tool_result: z106.object({
28185
+ tool_call_id: z106.string(),
28186
+ result: z106.unknown().nullish(),
28187
+ error: z106.string().nullish()
27858
28188
  }).nullish()
27859
28189
  });
27860
- var listRunMessagesResponseSchema = z105.object({
27861
- messages: z105.array(runMessageSchema),
27862
- total: z105.number().nullish(),
27863
- limit: z105.number().nullish(),
27864
- offset: z105.number().nullish()
28190
+ var listRunMessagesResponseSchema = z106.object({
28191
+ messages: z106.array(runMessageSchema),
28192
+ total: z106.number().nullish(),
28193
+ limit: z106.number().nullish(),
28194
+ offset: z106.number().nullish()
27865
28195
  });
27866
- var postedMessageSchema = z105.object({
27867
- id: z105.string(),
27868
- type: z105.string(),
27869
- role: z105.string(),
27870
- timestamp: z105.string(),
27871
- text_content: z105.string()
28196
+ var postedMessageSchema = z106.object({
28197
+ id: z106.string(),
28198
+ type: z106.string(),
28199
+ role: z106.string(),
28200
+ timestamp: z106.string(),
28201
+ text_content: z106.string()
27872
28202
  });
27873
- var postRunMessageResponseSchema = z105.object({
28203
+ var postRunMessageResponseSchema = z106.object({
27874
28204
  message: postedMessageSchema
27875
28205
  });
27876
- var respondHumanRequestResponseSchema = z105.object({
27877
- human_request: z105.object({
27878
- id: z105.string(),
27879
- run_id: z105.string(),
27880
- title: z105.string(),
27881
- description: z105.string().nullish(),
27882
- response: z105.string().nullish(),
27883
- responded_at: z105.string().nullish(),
27884
- created_at: z105.string()
28206
+ var respondHumanRequestResponseSchema = z106.object({
28207
+ human_request: z106.object({
28208
+ id: z106.string(),
28209
+ run_id: z106.string(),
28210
+ title: z106.string(),
28211
+ description: z106.string().nullish(),
28212
+ response: z106.string().nullish(),
28213
+ responded_at: z106.string().nullish(),
28214
+ created_at: z106.string()
27885
28215
  })
27886
28216
  });
27887
28217
 
@@ -28026,13 +28356,13 @@ function registerRunsGet(runs) {
28026
28356
  __name(registerRunsGet, "registerRunsGet");
28027
28357
 
28028
28358
  // src/commands/runs/list.ts
28029
- var DEFAULT_LIMIT13 = 20;
28030
- var MIN_LIMIT13 = 1;
28031
- var MAX_LIMIT13 = 100;
28359
+ var DEFAULT_LIMIT14 = 20;
28360
+ var MIN_LIMIT14 = 1;
28361
+ var MAX_LIMIT14 = 100;
28032
28362
  var SORT_ORDERS2 = ["asc", "desc"];
28033
28363
  var HAS_ISSUES_VALUES = ["true", "false"];
28034
28364
  var TITLE_PREVIEW_WIDTH = 50;
28035
- var TABLE_COLUMNS35 = [
28365
+ var TABLE_COLUMNS36 = [
28036
28366
  { header: "ID", cell: /* @__PURE__ */ __name((row) => row.id, "cell") },
28037
28367
  { header: "RUN#", cell: /* @__PURE__ */ __name((row) => String(row.run_number), "cell") },
28038
28368
  { header: "STATUS", cell: /* @__PURE__ */ __name((row) => row.status, "cell") },
@@ -28056,7 +28386,7 @@ function isHasIssuesValue(value) {
28056
28386
  }
28057
28387
  __name(isHasIssuesValue, "isHasIssuesValue");
28058
28388
  function registerRunsList(runs) {
28059
- runs.command("list").description("List agent runs for your team").option("--limit <n>", `page size (${MIN_LIMIT13}-${MAX_LIMIT13})`).option("--offset <n>", "number of runs to skip").option("--sort-order <order>", `sort direction (${SORT_ORDERS2.join("|")})`).option(
28389
+ runs.command("list").description("List agent runs for your team").option("--limit <n>", `page size (${MIN_LIMIT14}-${MAX_LIMIT14})`).option("--offset <n>", "number of runs to skip").option("--sort-order <order>", `sort direction (${SORT_ORDERS2.join("|")})`).option(
28060
28390
  "--status <status>",
28061
28391
  "filter by status (e.g. running, completed, failed, waiting, interrupted, stopped, needs_attention)"
28062
28392
  ).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(
@@ -28064,9 +28394,9 @@ function registerRunsList(runs) {
28064
28394
  `show only runs with (or without) issues (${HAS_ISSUES_VALUES.join("|")})`
28065
28395
  ).option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function listAction(options) {
28066
28396
  const limit = parseLimit(options.limit, {
28067
- defaultValue: DEFAULT_LIMIT13,
28068
- min: MIN_LIMIT13,
28069
- max: MAX_LIMIT13
28397
+ defaultValue: DEFAULT_LIMIT14,
28398
+ min: MIN_LIMIT14,
28399
+ max: MAX_LIMIT14
28070
28400
  });
28071
28401
  const offset = parseOffset(options.offset);
28072
28402
  if (options.sortOrder !== void 0 && !isSortOrder(options.sortOrder)) {
@@ -28133,7 +28463,7 @@ function registerRunsList(runs) {
28133
28463
  console.log("No runs found.");
28134
28464
  return;
28135
28465
  }
28136
- console.log(renderTable(TABLE_COLUMNS35, response.data));
28466
+ console.log(renderTable(TABLE_COLUMNS36, response.data));
28137
28467
  console.log(
28138
28468
  `Showing ${response.data.length} of ${response.total} \xB7 offset ${offset}`
28139
28469
  );
@@ -28239,11 +28569,11 @@ function getContent(msg) {
28239
28569
  __name(getContent, "getContent");
28240
28570
 
28241
28571
  // src/commands/runs/messages.ts
28242
- var DEFAULT_LIMIT14 = 20;
28243
- var MIN_LIMIT14 = 1;
28244
- var MAX_LIMIT14 = 50;
28572
+ var DEFAULT_LIMIT15 = 20;
28573
+ var MIN_LIMIT15 = 1;
28574
+ var MAX_LIMIT15 = 50;
28245
28575
  var TEXT_PREVIEW_WIDTH2 = 60;
28246
- var TABLE_COLUMNS36 = [
28576
+ var TABLE_COLUMNS37 = [
28247
28577
  { header: "ID", cell: /* @__PURE__ */ __name((row) => row.id, "cell") },
28248
28578
  { header: "ROLE", cell: /* @__PURE__ */ __name((row) => row.role, "cell") },
28249
28579
  { header: "TYPE", cell: /* @__PURE__ */ __name((row) => row.type, "cell") },
@@ -28268,7 +28598,7 @@ function previewCell(row) {
28268
28598
  }
28269
28599
  __name(previewCell, "previewCell");
28270
28600
  function registerRunsMessages(runs) {
28271
- runs.command("messages <id>").description("List messages for an agent run").option("--limit <n>", `page size (${MIN_LIMIT14}-${MAX_LIMIT14})`).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) {
28601
+ runs.command("messages <id>").description("List messages for an agent run").option("--limit <n>", `page size (${MIN_LIMIT15}-${MAX_LIMIT15})`).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) {
28272
28602
  const offset = parseOffset(options.offset);
28273
28603
  const { apiKey, apiBaseUrl } = await requireAuthenticatedConfig(this);
28274
28604
  if (options.follow) {
@@ -28279,9 +28609,9 @@ function registerRunsMessages(runs) {
28279
28609
  return;
28280
28610
  }
28281
28611
  const limit = parseLimit(options.limit, {
28282
- defaultValue: DEFAULT_LIMIT14,
28283
- min: MIN_LIMIT14,
28284
- max: MAX_LIMIT14
28612
+ defaultValue: DEFAULT_LIMIT15,
28613
+ min: MIN_LIMIT15,
28614
+ max: MAX_LIMIT15
28285
28615
  });
28286
28616
  const searchParams = new URLSearchParams();
28287
28617
  searchParams.append("limit", String(limit));
@@ -28308,7 +28638,7 @@ function registerRunsMessages(runs) {
28308
28638
  console.log("No messages found.");
28309
28639
  return;
28310
28640
  }
28311
- console.log(renderTable(TABLE_COLUMNS36, response.messages));
28641
+ console.log(renderTable(TABLE_COLUMNS37, response.messages));
28312
28642
  const resolvedOffset = response.offset ?? offset;
28313
28643
  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}`;
28314
28644
  console.log(summary);
@@ -28576,28 +28906,28 @@ function registerRuns(program) {
28576
28906
  __name(registerRuns, "registerRuns");
28577
28907
 
28578
28908
  // src/api/sandbox-schemas.ts
28579
- import { z as z106 } from "zod";
28580
- var createSandboxResponseSchema = z106.object({
28581
- sandbox_id: z106.string(),
28582
- expires_at: z106.string()
28909
+ import { z as z107 } from "zod";
28910
+ var createSandboxResponseSchema = z107.object({
28911
+ sandbox_id: z107.string(),
28912
+ expires_at: z107.string()
28583
28913
  });
28584
- var createSandboxUploadUrlResponseSchema = z106.object({
28585
- upload_url: z106.string(),
28586
- path: z106.string(),
28587
- expires_in_seconds: z106.number()
28914
+ var createSandboxUploadUrlResponseSchema = z107.object({
28915
+ upload_url: z107.string(),
28916
+ path: z107.string(),
28917
+ expires_in_seconds: z107.number()
28588
28918
  });
28589
- var sandboxFileSchema = z106.object({
28590
- name: z106.string(),
28591
- path: z106.string(),
28592
- type: z106.enum(["file", "dir"]),
28593
- size_bytes: z106.number()
28919
+ var sandboxFileSchema = z107.object({
28920
+ name: z107.string(),
28921
+ path: z107.string(),
28922
+ type: z107.enum(["file", "dir"]),
28923
+ size_bytes: z107.number()
28594
28924
  });
28595
- var listSandboxFilesResponseSchema = z106.object({
28596
- files: z106.array(sandboxFileSchema)
28925
+ var listSandboxFilesResponseSchema = z107.object({
28926
+ files: z107.array(sandboxFileSchema)
28597
28927
  });
28598
- var uploadSandboxFileResponseSchema = z106.object({
28599
- path: z106.string(),
28600
- size_bytes: z106.number()
28928
+ var uploadSandboxFileResponseSchema = z107.object({
28929
+ path: z107.string(),
28930
+ size_bytes: z107.number()
28601
28931
  });
28602
28932
  var DEFAULT_SANDBOX_FILES_PATH = "/workspace";
28603
28933
 
@@ -28634,7 +28964,7 @@ function registerSandboxesCreate(sandboxes) {
28634
28964
  __name(registerSandboxesCreate, "registerSandboxesCreate");
28635
28965
 
28636
28966
  // src/commands/sandboxes/files.ts
28637
- var TABLE_COLUMNS37 = [
28967
+ var TABLE_COLUMNS38 = [
28638
28968
  { header: "TYPE", cell: /* @__PURE__ */ __name((row) => row.type, "cell") },
28639
28969
  { header: "NAME", cell: /* @__PURE__ */ __name((row) => row.name, "cell") },
28640
28970
  { header: "PATH", cell: /* @__PURE__ */ __name((row) => row.path, "cell") },
@@ -28672,7 +29002,7 @@ function registerSandboxesFiles(sandboxes) {
28672
29002
  console.log("No files found.");
28673
29003
  return;
28674
29004
  }
28675
- console.log(renderTable(TABLE_COLUMNS37, files));
29005
+ console.log(renderTable(TABLE_COLUMNS38, files));
28676
29006
  console.log(`Showing ${files.length}`);
28677
29007
  }, "filesAction"));
28678
29008
  }
@@ -29017,7 +29347,7 @@ function registerSecretsGet(secrets) {
29017
29347
  __name(registerSecretsGet, "registerSecretsGet");
29018
29348
 
29019
29349
  // src/commands/secrets/list.ts
29020
- var TABLE_COLUMNS38 = [
29350
+ var TABLE_COLUMNS39 = [
29021
29351
  { header: "ID", cell: /* @__PURE__ */ __name((row) => row.id, "cell") },
29022
29352
  { header: "NAME", cell: /* @__PURE__ */ __name((row) => row.name, "cell") },
29023
29353
  {
@@ -29061,7 +29391,7 @@ function registerSecretsList(secrets) {
29061
29391
  console.log("No secrets found.");
29062
29392
  return;
29063
29393
  }
29064
- console.log(renderTable(TABLE_COLUMNS38, rows));
29394
+ console.log(renderTable(TABLE_COLUMNS39, rows));
29065
29395
  console.log(`Showing ${rows.length}`);
29066
29396
  }, "listAction"));
29067
29397
  }
@@ -29172,7 +29502,7 @@ function registerSecrets(program) {
29172
29502
  __name(registerSecrets, "registerSecrets");
29173
29503
 
29174
29504
  // src/commands/skills/assignments.ts
29175
- var TABLE_COLUMNS39 = [
29505
+ var TABLE_COLUMNS40 = [
29176
29506
  { header: "ID", cell: /* @__PURE__ */ __name((row) => row.id, "cell") },
29177
29507
  { header: "NAME", cell: /* @__PURE__ */ __name((row) => row.name, "cell") }
29178
29508
  ];
@@ -29200,7 +29530,7 @@ function registerSkillsAssignments(skills) {
29200
29530
  console.log("No agents use this skill.");
29201
29531
  return;
29202
29532
  }
29203
- console.log(renderTable(TABLE_COLUMNS39, assignments));
29533
+ console.log(renderTable(TABLE_COLUMNS40, assignments));
29204
29534
  console.log(`Showing ${assignments.length} of ${total}`);
29205
29535
  }, "assignmentsAction"));
29206
29536
  }
@@ -29208,13 +29538,13 @@ __name(registerSkillsAssignments, "registerSkillsAssignments");
29208
29538
 
29209
29539
  // src/commands/skills/create.ts
29210
29540
  import { readFileSync as readFileSync5 } from "node:fs";
29211
- import { z as z107 } from "zod";
29212
- var createSkillResponseSchema = z107.object({
29213
- skill: z107.object({
29214
- id: z107.string(),
29215
- name: z107.string(),
29216
- description: z107.string(),
29217
- team_id: z107.string()
29541
+ import { z as z108 } from "zod";
29542
+ var createSkillResponseSchema = z108.object({
29543
+ skill: z108.object({
29544
+ id: z108.string(),
29545
+ name: z108.string(),
29546
+ description: z108.string(),
29547
+ team_id: z108.string()
29218
29548
  })
29219
29549
  });
29220
29550
  function registerSkillsCreate(skills) {
@@ -29482,7 +29812,7 @@ function readContent2(options) {
29482
29812
  __name(readContent2, "readContent");
29483
29813
 
29484
29814
  // src/commands/skills/files.ts
29485
- var TABLE_COLUMNS40 = [
29815
+ var TABLE_COLUMNS41 = [
29486
29816
  { header: "PATH", cell: /* @__PURE__ */ __name((row) => row.path, "cell") },
29487
29817
  { header: "NAME", cell: /* @__PURE__ */ __name((row) => row.name, "cell") },
29488
29818
  {
@@ -29521,7 +29851,7 @@ function registerSkillsFiles(skills) {
29521
29851
  console.log("No files found.");
29522
29852
  return;
29523
29853
  }
29524
- console.log(renderTable(TABLE_COLUMNS40, parsed.data.files));
29854
+ console.log(renderTable(TABLE_COLUMNS41, parsed.data.files));
29525
29855
  console.log(`Showing ${parsed.data.files.length}`);
29526
29856
  }, "filesAction"));
29527
29857
  }
@@ -29578,13 +29908,13 @@ function readExistingContent(source) {
29578
29908
  __name(readExistingContent, "readExistingContent");
29579
29909
 
29580
29910
  // src/commands/skills/install.ts
29581
- import { z as z108 } from "zod";
29582
- var installSkillResponseSchema = z108.object({
29583
- skill: z108.object({
29584
- id: z108.string(),
29585
- name: z108.string(),
29586
- description: z108.string(),
29587
- team_id: z108.string()
29911
+ import { z as z109 } from "zod";
29912
+ var installSkillResponseSchema = z109.object({
29913
+ skill: z109.object({
29914
+ id: z109.string(),
29915
+ name: z109.string(),
29916
+ description: z109.string(),
29917
+ team_id: z109.string()
29588
29918
  })
29589
29919
  });
29590
29920
  function registerSkillsInstall(skills) {
@@ -29774,13 +30104,13 @@ __name(registerSkillsSystem, "registerSkillsSystem");
29774
30104
  // src/commands/skills/upload.ts
29775
30105
  import { readFile as readFile9, stat as stat2 } from "node:fs/promises";
29776
30106
  import { basename as basename3 } from "node:path";
29777
- import { z as z109 } from "zod";
29778
- var uploadSkillResponseSchema = z109.object({
29779
- skill: z109.object({
29780
- id: z109.string(),
29781
- name: z109.string(),
29782
- description: z109.string(),
29783
- team_id: z109.string()
30107
+ import { z as z110 } from "zod";
30108
+ var uploadSkillResponseSchema = z110.object({
30109
+ skill: z110.object({
30110
+ id: z110.string(),
30111
+ name: z110.string(),
30112
+ description: z110.string(),
30113
+ team_id: z110.string()
29784
30114
  })
29785
30115
  });
29786
30116
  function registerSkillsUpload(skills) {
@@ -29899,12 +30229,12 @@ function registerSuggestionsConsume(suggestions) {
29899
30229
  __name(registerSuggestionsConsume, "registerSuggestionsConsume");
29900
30230
 
29901
30231
  // src/commands/suggestions/list.ts
29902
- var DEFAULT_LIMIT15 = 100;
29903
- var MIN_LIMIT15 = 1;
29904
- var MAX_LIMIT15 = 250;
30232
+ var DEFAULT_LIMIT16 = 100;
30233
+ var MIN_LIMIT16 = 1;
30234
+ var MAX_LIMIT16 = 250;
29905
30235
  var STATUS_FILTERS = ["pending", "history"];
29906
30236
  var TITLE_PREVIEW_WIDTH2 = 50;
29907
- var TABLE_COLUMNS41 = [
30237
+ var TABLE_COLUMNS42 = [
29908
30238
  { header: "ID", cell: /* @__PURE__ */ __name((row) => row.id, "cell") },
29909
30239
  { header: "TYPE", cell: /* @__PURE__ */ __name((row) => row.type, "cell") },
29910
30240
  { header: "STATUS", cell: /* @__PURE__ */ __name((row) => row.status, "cell") },
@@ -29925,11 +30255,11 @@ function registerSuggestionsList(suggestions) {
29925
30255
  ).option(
29926
30256
  "--status <filter>",
29927
30257
  `which inbox to show (${STATUS_FILTERS.join("|")}, default: pending)`
29928
- ).option("--limit <n>", `page size (${MIN_LIMIT15}-${MAX_LIMIT15})`).option("--offset <n>", "number of suggestions to skip").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function listAction(agentId, options) {
30258
+ ).option("--limit <n>", `page size (${MIN_LIMIT16}-${MAX_LIMIT16})`).option("--offset <n>", "number of suggestions to skip").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function listAction(agentId, options) {
29929
30259
  const limit = parseLimit(options.limit, {
29930
- defaultValue: DEFAULT_LIMIT15,
29931
- min: MIN_LIMIT15,
29932
- max: MAX_LIMIT15
30260
+ defaultValue: DEFAULT_LIMIT16,
30261
+ min: MIN_LIMIT16,
30262
+ max: MAX_LIMIT16
29933
30263
  });
29934
30264
  const offset = parseOffset(options.offset);
29935
30265
  if (options.status !== void 0 && !isStatusFilter(options.status)) {
@@ -29967,7 +30297,7 @@ function registerSuggestionsList(suggestions) {
29967
30297
  console.log(`Pending total: ${pendingCount}`);
29968
30298
  return;
29969
30299
  }
29970
- console.log(renderTable(TABLE_COLUMNS41, data));
30300
+ console.log(renderTable(TABLE_COLUMNS42, data));
29971
30301
  console.log(
29972
30302
  `Showing ${data.length} \xB7 offset ${offset} \xB7 pending total ${pendingCount}`
29973
30303
  );
@@ -30091,10 +30421,10 @@ function registerTeamGet(team) {
30091
30421
  __name(registerTeamGet, "registerTeamGet");
30092
30422
 
30093
30423
  // src/commands/team/members.ts
30094
- var DEFAULT_LIMIT16 = 50;
30095
- var MIN_LIMIT16 = 1;
30096
- var MAX_LIMIT16 = 100;
30097
- var TABLE_COLUMNS42 = [
30424
+ var DEFAULT_LIMIT17 = 50;
30425
+ var MIN_LIMIT17 = 1;
30426
+ var MAX_LIMIT17 = 100;
30427
+ var TABLE_COLUMNS43 = [
30098
30428
  { header: "ID", cell: /* @__PURE__ */ __name((row) => row.id, "cell") },
30099
30429
  { header: "NAME", cell: /* @__PURE__ */ __name((row) => row.name ?? "", "cell") },
30100
30430
  { header: "EMAIL", cell: /* @__PURE__ */ __name((row) => row.email, "cell") },
@@ -30108,11 +30438,11 @@ function registerTeamMembers(team) {
30108
30438
  team.command("members").description("List members of a team").option(
30109
30439
  "--team <id>",
30110
30440
  "team ID (defaults to the team scoped to your credentials)"
30111
- ).option("--limit <n>", `page size (${MIN_LIMIT16}-${MAX_LIMIT16})`).option("--offset <n>", "number of members to skip").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function membersAction(options) {
30441
+ ).option("--limit <n>", `page size (${MIN_LIMIT17}-${MAX_LIMIT17})`).option("--offset <n>", "number of members to skip").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function membersAction(options) {
30112
30442
  const limit = parseLimit(options.limit, {
30113
- defaultValue: DEFAULT_LIMIT16,
30114
- min: MIN_LIMIT16,
30115
- max: MAX_LIMIT16
30443
+ defaultValue: DEFAULT_LIMIT17,
30444
+ min: MIN_LIMIT17,
30445
+ max: MAX_LIMIT17
30116
30446
  });
30117
30447
  const offset = parseOffset(options.offset);
30118
30448
  const config = await requireAuthenticatedConfig(this);
@@ -30145,7 +30475,7 @@ function registerTeamMembers(team) {
30145
30475
  console.log("No members found.");
30146
30476
  return;
30147
30477
  }
30148
- console.log(renderTable(TABLE_COLUMNS42, response.members));
30478
+ console.log(renderTable(TABLE_COLUMNS43, response.members));
30149
30479
  console.log(
30150
30480
  `Showing ${response.members.length} of ${response.total} \xB7 offset ${response.offset}`
30151
30481
  );
@@ -30154,9 +30484,9 @@ function registerTeamMembers(team) {
30154
30484
  __name(registerTeamMembers, "registerTeamMembers");
30155
30485
 
30156
30486
  // src/commands/team/use.ts
30157
- import { z as z110 } from "zod";
30487
+ import { z as z111 } from "zod";
30158
30488
  var TEAM_ID_SHAPE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
30159
- var teamIdSchema = z110.string().regex(TEAM_ID_SHAPE);
30489
+ var teamIdSchema = z111.string().regex(TEAM_ID_SHAPE);
30160
30490
  function registerTeamUse(team) {
30161
30491
  team.command("use <team-id>").description(
30162
30492
  "Set the default team for the active OAuth profile (overridable per-command via --team or DUVO_TEAM_ID)"
@@ -30242,14 +30572,14 @@ function registerTeam(program) {
30242
30572
  __name(registerTeam, "registerTeam");
30243
30573
 
30244
30574
  // src/commands/teams/list.ts
30245
- import { z as z111 } from "zod";
30246
- var teamApiSchema2 = z111.object({
30247
- id: z111.string(),
30248
- name: z111.string(),
30249
- organization_id: z111.string().nullable()
30575
+ import { z as z112 } from "zod";
30576
+ var teamApiSchema2 = z112.object({
30577
+ id: z112.string(),
30578
+ name: z112.string(),
30579
+ organization_id: z112.string().nullable()
30250
30580
  });
30251
- var listMyTeamsResponseSchema3 = z111.object({
30252
- teams: z111.array(teamApiSchema2)
30581
+ var listMyTeamsResponseSchema3 = z112.object({
30582
+ teams: z112.array(teamApiSchema2)
30253
30583
  });
30254
30584
  function registerTeamsList(teams) {
30255
30585
  teams.command("list", { isDefault: true }).description("List every team you can act on").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function listAction(options) {
@@ -30292,21 +30622,21 @@ function registerTeamsList(teams) {
30292
30622
  __name(registerTeamsList, "registerTeamsList");
30293
30623
 
30294
30624
  // src/commands/teams/org-insights.ts
30295
- import { z as z112 } from "zod";
30296
- var headlineSchema = z112.object({
30297
- total_runs: z112.number(),
30298
- completed_runs: z112.number(),
30299
- failed_runs: z112.number(),
30300
- success_rate: z112.number().nullable(),
30301
- active_agents: z112.number(),
30302
- active_users: z112.number(),
30303
- start_date: z112.string(),
30304
- end_date: z112.string(),
30305
- truncated: z112.boolean(),
30306
- aggregated_teams: z112.number(),
30307
- total_teams: z112.number()
30308
- });
30309
- var orgInsightsHeadlineResponseSchema = z112.object({
30625
+ import { z as z113 } from "zod";
30626
+ var headlineSchema = z113.object({
30627
+ total_runs: z113.number(),
30628
+ completed_runs: z113.number(),
30629
+ failed_runs: z113.number(),
30630
+ success_rate: z113.number().nullable(),
30631
+ active_agents: z113.number(),
30632
+ active_users: z113.number(),
30633
+ start_date: z113.string(),
30634
+ end_date: z113.string(),
30635
+ truncated: z113.boolean(),
30636
+ aggregated_teams: z113.number(),
30637
+ total_teams: z113.number()
30638
+ });
30639
+ var orgInsightsHeadlineResponseSchema = z113.object({
30310
30640
  headline: headlineSchema
30311
30641
  });
30312
30642
  function formatRate(rate) {
@@ -30374,26 +30704,26 @@ function registerTeamsOrgInsights(teams) {
30374
30704
  __name(registerTeamsOrgInsights, "registerTeamsOrgInsights");
30375
30705
 
30376
30706
  // src/commands/teams/org-metrics.ts
30377
- import { z as z113 } from "zod";
30378
- var teamMetricSchema = z113.object({
30379
- team_id: z113.string(),
30380
- team_name: z113.string(),
30381
- is_deleted: z113.boolean(),
30382
- member_count: z113.number(),
30383
- assignment_count: z113.number(),
30384
- scheduled_job_count: z113.number(),
30385
- total_jobs: z113.number(),
30386
- completed_jobs: z113.number(),
30387
- failed_jobs: z113.number(),
30388
- total_runs: z113.number()
30389
- });
30390
- var orgInsightsMetricsResponseSchema = z113.object({
30391
- teams: z113.array(teamMetricSchema),
30392
- start_date: z113.string(),
30393
- end_date: z113.string(),
30394
- truncated: z113.boolean(),
30395
- total_teams: z113.number(),
30396
- org_member_count: z113.number()
30707
+ import { z as z114 } from "zod";
30708
+ var teamMetricSchema = z114.object({
30709
+ team_id: z114.string(),
30710
+ team_name: z114.string(),
30711
+ is_deleted: z114.boolean(),
30712
+ member_count: z114.number(),
30713
+ assignment_count: z114.number(),
30714
+ scheduled_job_count: z114.number(),
30715
+ total_jobs: z114.number(),
30716
+ completed_jobs: z114.number(),
30717
+ failed_jobs: z114.number(),
30718
+ total_runs: z114.number()
30719
+ });
30720
+ var orgInsightsMetricsResponseSchema = z114.object({
30721
+ teams: z114.array(teamMetricSchema),
30722
+ start_date: z114.string(),
30723
+ end_date: z114.string(),
30724
+ truncated: z114.boolean(),
30725
+ total_teams: z114.number(),
30726
+ org_member_count: z114.number()
30397
30727
  });
30398
30728
  function registerTeamsOrgMetrics(teams) {
30399
30729
  teams.command("org-metrics <org-id>").description("Show per-team run metrics across an organization").option("--start-date <date>", "window start (ISO 8601, default 7d ago)").option("--end-date <date>", "window end (ISO 8601, default now)").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function orgMetricsAction(orgId, options) {
@@ -30456,20 +30786,20 @@ ${total_teams} teams${suffix} \xB7 ${org_member_count} org members`
30456
30786
  __name(registerTeamsOrgMetrics, "registerTeamsOrgMetrics");
30457
30787
 
30458
30788
  // src/commands/teams/org-usage.ts
30459
- import { z as z114 } from "zod";
30789
+ import { z as z115 } from "zod";
30460
30790
  var GRANULARITIES = ["day", "week", "month"];
30461
30791
  var DEFAULT_LOOKBACK_MS = 30 * 24 * 60 * 60 * 1e3;
30462
- var bucketSchema = z114.object({
30463
- period: z114.string(),
30464
- total_runs: z114.number(),
30465
- scheduled_runs: z114.number(),
30466
- on_demand_runs: z114.number()
30467
- });
30468
- var usageChartResponseSchema = z114.object({
30469
- buckets: z114.array(bucketSchema),
30470
- granularity: z114.enum(GRANULARITIES),
30471
- truncated: z114.boolean(),
30472
- total_teams: z114.number()
30792
+ var bucketSchema = z115.object({
30793
+ period: z115.string(),
30794
+ total_runs: z115.number(),
30795
+ scheduled_runs: z115.number(),
30796
+ on_demand_runs: z115.number()
30797
+ });
30798
+ var usageChartResponseSchema = z115.object({
30799
+ buckets: z115.array(bucketSchema),
30800
+ granularity: z115.enum(GRANULARITIES),
30801
+ truncated: z115.boolean(),
30802
+ total_teams: z115.number()
30473
30803
  });
30474
30804
  function registerTeamsOrgUsage(teams) {
30475
30805
  teams.command("org-usage <org-id>").description("Show org-wide run volume over time (scheduled vs on-demand)").option("--start-date <date>", "window start (ISO 8601, default 30d ago)").option("--end-date <date>", "window end (ISO 8601, default now)").option(
@@ -30528,17 +30858,17 @@ function registerTeamsOrgUsage(teams) {
30528
30858
  __name(registerTeamsOrgUsage, "registerTeamsOrgUsage");
30529
30859
 
30530
30860
  // src/commands/teams/org.ts
30531
- import { z as z115 } from "zod";
30532
- var orgTeamSchema = z115.object({
30533
- id: z115.string(),
30534
- name: z115.string(),
30535
- userIsMember: z115.boolean(),
30536
- userRole: z115.string().nullable(),
30537
- memberCount: z115.number()
30538
- });
30539
- var listOrgTeamsResponseSchema = z115.object({
30540
- teams: z115.array(orgTeamSchema),
30541
- total: z115.number()
30861
+ import { z as z116 } from "zod";
30862
+ var orgTeamSchema = z116.object({
30863
+ id: z116.string(),
30864
+ name: z116.string(),
30865
+ userIsMember: z116.boolean(),
30866
+ userRole: z116.string().nullable(),
30867
+ memberCount: z116.number()
30868
+ });
30869
+ var listOrgTeamsResponseSchema = z116.object({
30870
+ teams: z116.array(orgTeamSchema),
30871
+ total: z116.number()
30542
30872
  });
30543
30873
  function registerTeamsOrg(teams) {
30544
30874
  teams.command("org <org-id>").description("List all teams in an organization you belong to").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function orgAction(orgId, options) {
@@ -30643,7 +30973,7 @@ __name(resolveActiveTeamId, "resolveActiveTeamId");
30643
30973
  var version = resolveVersion();
30644
30974
  function resolveVersion() {
30645
30975
  if (true) {
30646
- return "1.21.0";
30976
+ return "1.22.0";
30647
30977
  }
30648
30978
  const packageJsonPath = join3(
30649
30979
  dirname3(fileURLToPath2(import.meta.url)),
@@ -30661,6 +30991,11 @@ function createProgram() {
30661
30991
  ).option(
30662
30992
  "--team <id>",
30663
30993
  "use a specific team for this invocation (overrides DUVO_TEAM_ID and profile default; API-key profiles are pinned to the key's team, so a different value is rejected by the server)"
30994
+ ).addOption(
30995
+ new Option2(
30996
+ "--no-update-notifier",
30997
+ "skip the update check for this invocation"
30998
+ ).hideHelp()
30664
30999
  );
30665
31000
  program.addHelpText(
30666
31001
  "before",
@@ -30709,25 +31044,130 @@ function createProgram() {
30709
31044
  __name(createProgram, "createProgram");
30710
31045
 
30711
31046
  // src/update-check.ts
31047
+ import { mkdir as mkdir2, readFile as readFile10, writeFile as writeFile4 } from "node:fs/promises";
30712
31048
  import { createRequire } from "node:module";
30713
- import updateNotifier from "update-notifier";
31049
+ import { dirname as dirname4 } from "node:path";
30714
31050
  var ONE_DAY_MS = 24 * 60 * 60 * 1e3;
31051
+ var REGISTRY_TIMEOUT_MS = 2e3;
31052
+ var DIR_MODE2 = 448;
30715
31053
  function checkForUpdate() {
31054
+ if (isUpdateCheckDisabled()) {
31055
+ return Promise.resolve();
31056
+ }
31057
+ return runUpdateCheck().catch(() => {
31058
+ });
31059
+ }
31060
+ __name(checkForUpdate, "checkForUpdate");
31061
+ function isUpdateCheckDisabled() {
31062
+ const ci = process.env.CI;
31063
+ return process.env.NO_UPDATE_NOTIFIER !== void 0 || process.env.NODE_ENV === "test" || ci !== void 0 && ci !== "" && ci !== "false" && ci !== "0" || process.argv.includes("--no-update-notifier");
31064
+ }
31065
+ __name(isUpdateCheckDisabled, "isUpdateCheckDisabled");
31066
+ async function runUpdateCheck() {
31067
+ const pkg = loadPackageMeta();
31068
+ const cache = await readCache();
31069
+ if (cache && isNewerVersion(cache.latestVersion, pkg.version)) {
31070
+ printUpdateNotice(pkg, cache.latestVersion);
31071
+ }
31072
+ const isFresh = cache && Date.now() - cache.lastCheckedAtMs < ONE_DAY_MS;
31073
+ if (isFresh) {
31074
+ return;
31075
+ }
31076
+ await refreshCache(pkg, cache);
31077
+ }
31078
+ __name(runUpdateCheck, "runUpdateCheck");
31079
+ async function refreshCache(pkg, previous) {
30716
31080
  try {
30717
- const pkg = loadPackageMeta();
30718
- const notifier = updateNotifier({
30719
- pkg,
30720
- updateCheckInterval: ONE_DAY_MS,
30721
- shouldNotifyInNpmScript: false
31081
+ const latestVersion = await fetchLatestVersion(pkg.name);
31082
+ await writeCache({ lastCheckedAtMs: Date.now(), latestVersion });
31083
+ } catch {
31084
+ await writeCache({
31085
+ lastCheckedAtMs: Date.now(),
31086
+ latestVersion: previous?.latestVersion ?? pkg.version
30722
31087
  });
30723
- notifier.notify({ defer: false, isGlobal: true });
31088
+ }
31089
+ }
31090
+ __name(refreshCache, "refreshCache");
31091
+ function printUpdateNotice(pkg, latestVersion) {
31092
+ const updateCommand = resolveUpdateCommand(pkg.name, isStandaloneBinary());
31093
+ console.error(
31094
+ `
31095
+ Update available for ${pkg.name}: ${pkg.version} \u2192 ${latestVersion}
31096
+ Run \`${updateCommand}\` to update.
31097
+ `
31098
+ );
31099
+ }
31100
+ __name(printUpdateNotice, "printUpdateNotice");
31101
+ function resolveUpdateCommand(packageName, isStandalone) {
31102
+ return isStandalone ? "curl -fsSL https://duvo.ai/install-cli.sh | sh" : `npm install -g ${packageName}`;
31103
+ }
31104
+ __name(resolveUpdateCommand, "resolveUpdateCommand");
31105
+ function isStandaloneBinary() {
31106
+ return import.meta.url.includes("$bunfs") || import.meta.url.includes("~BUN");
31107
+ }
31108
+ __name(isStandaloneBinary, "isStandaloneBinary");
31109
+ async function fetchLatestVersion(packageName) {
31110
+ const response = await fetch(
31111
+ `https://registry.npmjs.org/-/package/${packageName}/dist-tags`,
31112
+ {
31113
+ signal: AbortSignal.timeout(REGISTRY_TIMEOUT_MS),
31114
+ headers: { accept: "application/json" }
31115
+ }
31116
+ );
31117
+ if (!response.ok) {
31118
+ throw new Error(`npm registry responded with ${response.status}`);
31119
+ }
31120
+ const body = await response.json();
31121
+ if (body === null || typeof body !== "object" || typeof body.latest !== "string") {
31122
+ throw new Error("npm registry response is missing the latest dist-tag");
31123
+ }
31124
+ return body.latest;
31125
+ }
31126
+ __name(fetchLatestVersion, "fetchLatestVersion");
31127
+ async function readCache() {
31128
+ try {
31129
+ const raw = await readFile10(getUpdateCheckCachePath(), "utf8");
31130
+ const parsed = JSON.parse(raw);
31131
+ if (parsed === null || typeof parsed !== "object" || typeof parsed.lastCheckedAtMs !== "number" || typeof parsed.latestVersion !== "string") {
31132
+ return null;
31133
+ }
31134
+ return parsed;
30724
31135
  } catch {
31136
+ return null;
30725
31137
  }
30726
31138
  }
30727
- __name(checkForUpdate, "checkForUpdate");
31139
+ __name(readCache, "readCache");
31140
+ async function writeCache(cache) {
31141
+ const path = getUpdateCheckCachePath();
31142
+ await mkdir2(dirname4(path), { recursive: true, mode: DIR_MODE2 });
31143
+ await writeFile4(path, JSON.stringify(cache), "utf8");
31144
+ }
31145
+ __name(writeCache, "writeCache");
31146
+ function parseVersion(version2) {
31147
+ const match = /^v?(\d+)\.(\d+)\.(\d+)/.exec(version2.trim());
31148
+ if (!match) {
31149
+ return null;
31150
+ }
31151
+ return [Number(match[1]), Number(match[2]), Number(match[3])];
31152
+ }
31153
+ __name(parseVersion, "parseVersion");
31154
+ function isNewerVersion(candidate, current) {
31155
+ const parsedCandidate = parseVersion(candidate);
31156
+ const parsedCurrent = parseVersion(current);
31157
+ if (!parsedCandidate || !parsedCurrent) {
31158
+ return false;
31159
+ }
31160
+ for (let index = 0; index < 3; index += 1) {
31161
+ if (parsedCandidate[index] !== parsedCurrent[index]) {
31162
+ return parsedCandidate[index] > parsedCurrent[index];
31163
+ }
31164
+ }
31165
+ return false;
31166
+ }
31167
+ __name(isNewerVersion, "isNewerVersion");
30728
31168
  function loadPackageMeta() {
30729
31169
  if (true) {
30730
- return { name: "@duvoai/cli", version: "1.21.0" };
31170
+ return { name: "@duvoai/cli", version: "1.22.0" };
30731
31171
  }
30732
31172
  const require2 = createRequire(import.meta.url);
30733
31173
  const raw = require2("../package.json");
@@ -30740,7 +31180,7 @@ function loadPackageMeta() {
30740
31180
  __name(loadPackageMeta, "loadPackageMeta");
30741
31181
 
30742
31182
  // src/bin/duvo.ts
30743
- checkForUpdate();
31183
+ void checkForUpdate();
30744
31184
  createProgram().parseAsync(process.argv).catch((error) => {
30745
31185
  handleCliError(error);
30746
31186
  });