@duvoai/cli 1.31.0 → 1.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -260,6 +260,7 @@ Default output is summary-first and compact. JSON output also includes a compact
260
260
  | `duvo clarity postprocess <process-id> <snapshot-type> <snapshot-id>` | Re-run postprocessing for a current-process or transformation-proposal snapshot |
261
261
  | `duvo clarity build-automation <process-id>` | Start automation generation from the latest proposal |
262
262
  | `duvo clarity stop-transformation-proposal <process-id>` | Stop in-flight transformation-proposal generation |
263
+ | `duvo clarity create [--name <name>] [--json]` | Create a new Clarity v2 process for the current team |
263
264
  | `duvo clarity create-invite-link <process-id>` | Create or regenerate an interview invite link |
264
265
  | `duvo clarity import-artifact <process-id> <file>` | Import a local Miro SVG, XML, PNG, or JPEG export |
265
266
  | `duvo queue-labels list --queue <queue-id>` | List labels defined on a queue (with case counts) |
package/dist/bin/duvo.js CHANGED
@@ -3605,7 +3605,7 @@ var legacyClarityProcessDetailSchema = legacyClarityProcessDetailApiSchema.exten
3605
3605
  analysis: legacyClarityAnalysisSchema.nullable()
3606
3606
  });
3607
3607
  var createClarityProcessSchema = z15.object({
3608
- name: z15.string().min(1).max(255).optional()
3608
+ name: z15.string().min(1).max(255).optional().describe("Optional process name; server default applies when omitted")
3609
3609
  });
3610
3610
  var createClarityProcessResponseSchema = z15.object({
3611
3611
  id: z15.guid(),
@@ -18503,6 +18503,16 @@ var createClarityInviteLinkResponseSchema = z93.object({
18503
18503
  })
18504
18504
  })
18505
18505
  });
18506
+ var createClarityProcessResponseSchema2 = z93.object({
18507
+ id: z93.guid(),
18508
+ name: z93.string(),
18509
+ status: clarityProcessStatusSchema,
18510
+ version: z93.union([z93.literal(1), z93.literal(2)]),
18511
+ createdAt: z93.string()
18512
+ });
18513
+ var getClarityCaptureResponseSchema = z93.object({
18514
+ capture: clarityCaptureSchema
18515
+ });
18506
18516
  var createArtifactImportUploadUrlResponseSchema = z93.object({
18507
18517
  signed_url: z93.url(),
18508
18518
  capture_id: z93.guid(),
@@ -19072,6 +19082,44 @@ function registerClarityCreateInviteLink(clarity) {
19072
19082
  }
19073
19083
  __name(registerClarityCreateInviteLink, "registerClarityCreateInviteLink");
19074
19084
 
19085
+ // src/commands/clarity/create-process.ts
19086
+ function registerClarityCreateProcess(clarity) {
19087
+ clarity.command("create").description("Create a new Clarity v2 process for the current team").option("--name <name>", "process name").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function action(options) {
19088
+ const config = await requireAuthenticatedConfig(this);
19089
+ const teamId = await resolveRequiredTeamId(config, {
19090
+ override: getTeamFlag(this)
19091
+ });
19092
+ const raw = await httpRequest({
19093
+ method: "POST",
19094
+ path: buildTeamPath(teamId, "/clarity/processes"),
19095
+ apiKey: config.apiKey,
19096
+ apiBaseUrl: config.apiBaseUrl,
19097
+ body: options.name === void 0 ? {} : { name: options.name }
19098
+ });
19099
+ const parsed = createClarityProcessResponseSchema2.safeParse(raw);
19100
+ if (!parsed.success) {
19101
+ throw new CliError(
19102
+ `Unexpected response from the API: ${parsed.error.message}`
19103
+ );
19104
+ }
19105
+ if (options.json) {
19106
+ printJson(raw);
19107
+ return;
19108
+ }
19109
+ const process2 = parsed.data;
19110
+ console.log(
19111
+ renderKeyValue([
19112
+ { label: "ID", value: process2.id },
19113
+ { label: "Name", value: process2.name },
19114
+ { label: "Status", value: process2.status },
19115
+ { label: "Version", value: String(process2.version) },
19116
+ { label: "Created", value: process2.createdAt }
19117
+ ])
19118
+ );
19119
+ }, "action"));
19120
+ }
19121
+ __name(registerClarityCreateProcess, "registerClarityCreateProcess");
19122
+
19075
19123
  // src/commands/clarity/doctor.ts
19076
19124
  import { z as z96 } from "zod";
19077
19125
 
@@ -20057,6 +20105,17 @@ async function getClarityV2Process(config, processId) {
20057
20105
  return parseResponse(clarityV2ProcessReadModelSchema, raw);
20058
20106
  }
20059
20107
  __name(getClarityV2Process, "getClarityV2Process");
20108
+ async function getClarityCapture(config, processId, captureId) {
20109
+ const raw = await getClarityJson(config, {
20110
+ method: "GET",
20111
+ path: `/v2/clarity-v2/processes/${encodeURIComponent(
20112
+ processId
20113
+ )}/captures/${encodeURIComponent(captureId)}`,
20114
+ resource: "Clarity capture"
20115
+ });
20116
+ return parseResponse(getClarityCaptureResponseSchema, raw).capture;
20117
+ }
20118
+ __name(getClarityCapture, "getClarityCapture");
20060
20119
  async function getLegacyClarityProcess(config, processId) {
20061
20120
  const raw = await getClarityJson(config, {
20062
20121
  method: "GET",
@@ -20232,6 +20291,19 @@ var CLARITY_READ_TOOLS = [
20232
20291
  endpoints: [{ method: "GET", path: "/v2/clarity-v2/processes/:processId" }],
20233
20292
  description: "Read the v2 process model: process metadata, captures, and lightweight current/proposal version lists."
20234
20293
  },
20294
+ {
20295
+ name: "getClarityCapture",
20296
+ scope: "v2",
20297
+ read_only: true,
20298
+ commands: ["duvo clarity capture"],
20299
+ endpoints: [
20300
+ {
20301
+ method: "GET",
20302
+ path: "/v2/clarity-v2/processes/:processId/captures/:captureId"
20303
+ }
20304
+ ],
20305
+ description: "Read one Clarity v2 capture including full transcript and video transcript."
20306
+ },
20235
20307
  {
20236
20308
  name: "getLegacyClarityProcess",
20237
20309
  scope: "v1 fallback",
@@ -20451,6 +20523,16 @@ var CLARITY_READ_TOOLS = [
20451
20523
  }
20452
20524
  ];
20453
20525
  var CLARITY_WRITE_TOOLS = [
20526
+ {
20527
+ name: "createClarityProcess",
20528
+ scope: "v1+v2",
20529
+ read_only: false,
20530
+ commands: ["duvo clarity create"],
20531
+ endpoints: [
20532
+ { method: "POST", path: "/v2/teams/:teamId/clarity/processes" }
20533
+ ],
20534
+ description: "Create a new Clarity v2 process for the current team (manager+)."
20535
+ },
20454
20536
  {
20455
20537
  name: "sendClarityArtifactChatMessage",
20456
20538
  scope: "v2",
@@ -23488,6 +23570,7 @@ function registerClarity(program) {
23488
23570
  registerClarityStopTransformationProposal(clarity);
23489
23571
  registerClarityCreateInviteLink(clarity);
23490
23572
  registerClarityImportArtifact(clarity);
23573
+ registerClarityCreateProcess(clarity);
23491
23574
  }
23492
23575
  __name(registerClarity, "registerClarity");
23493
23576
  function registerList2(clarity) {
@@ -23666,6 +23749,21 @@ function registerCapture(clarity) {
23666
23749
  "include capture transcripts and media URLs in JSON output"
23667
23750
  ).option("--json", "output JSON").action(/* @__PURE__ */ __name(async function captureAction(processId, captureId, options) {
23668
23751
  const config = await requireAuthenticatedConfig(this);
23752
+ if (options.includeTranscripts) {
23753
+ try {
23754
+ const capture2 = await getClarityCapture(config, processId, captureId);
23755
+ if (options.json) {
23756
+ printJson({ capture: buildCaptureOutput(capture2, options) });
23757
+ return;
23758
+ }
23759
+ console.log(renderCapturesTable([capture2]));
23760
+ return;
23761
+ } catch (error) {
23762
+ if (!isLegacyV2ReadError(error)) {
23763
+ throw error;
23764
+ }
23765
+ }
23766
+ }
23669
23767
  const { captures } = await loadProcessWithCaptures(config, processId);
23670
23768
  const capture = captures.find((item) => item.id === captureId);
23671
23769
  if (!capture) {
@@ -32045,7 +32143,7 @@ __name(isStandaloneBinary, "isStandaloneBinary");
32045
32143
  import { createRequire } from "node:module";
32046
32144
  function getPackageMeta() {
32047
32145
  if (true) {
32048
- return { name: "@duvoai/cli", version: "1.31.0" };
32146
+ return { name: "@duvoai/cli", version: "1.32.0" };
32049
32147
  }
32050
32148
  const require2 = createRequire(import.meta.url);
32051
32149
  const raw = require2("../../package.json");