@duvoai/cli 1.19.1 → 1.19.2

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
@@ -3006,6 +3006,7 @@ var clarityCaptureSchema = z14.object({
3006
3006
  type: clarityCaptureTypeSchema,
3007
3007
  videoUrl: z14.string().nullable(),
3008
3008
  videoTranscript: z14.string().nullable(),
3009
+ documentFileName: z14.string().nullable().optional(),
3009
3010
  documentTextMetadata: clarityDocumentTextMetadataSchema.nullable().optional(),
3010
3011
  transcript: z14.array(conversationMessageSchema).nullable(),
3011
3012
  /**
@@ -5575,7 +5576,7 @@ function resolveEditedRoot(edited, previous, pending = false) {
5575
5576
  __name(resolveEditedRoot, "resolveEditedRoot");
5576
5577
  __name2(resolveEditedRoot, "resolveEditedRoot");
5577
5578
  function materializeCurrentProcessEdit(previous, easeOutput, options = {}) {
5578
- return postprocessClarityCurrentProcessDataSchema.parse({
5579
+ const materialized = postprocessClarityCurrentProcessDataSchema.parse({
5579
5580
  ...previous,
5580
5581
  summary: resolveEditedRoot(
5581
5582
  easeOutput.summary,
@@ -5591,6 +5592,10 @@ function materializeCurrentProcessEdit(previous, easeOutput, options = {}) {
5591
5592
  coerceStepsOutput([...easeOutput.steps])
5592
5593
  )
5593
5594
  });
5595
+ return {
5596
+ ...materialized,
5597
+ steps: preserveStepSourceIntegrity(previous.steps, materialized.steps)
5598
+ };
5594
5599
  }
5595
5600
  __name(materializeCurrentProcessEdit, "materializeCurrentProcessEdit");
5596
5601
  __name2(materializeCurrentProcessEdit, "materializeCurrentProcessEdit");
@@ -5598,23 +5603,39 @@ function materializeProposalEdit(previous, easeOutput, options = {}) {
5598
5603
  const steps = coerceStepsOutput([
5599
5604
  ...easeOutput.steps
5600
5605
  ]);
5601
- return postprocessClarityTransformationProposalDataSchema.parse({
5602
- ...previous,
5603
- summary: resolveEditedRoot(
5604
- easeOutput.summary,
5605
- previous.summary,
5606
- options.pendingSummary
5607
- ),
5608
- projectedImpact: resolveEditedRoot(
5609
- easeOutput.projectedImpact,
5610
- previous.projectedImpact,
5611
- options.pendingProjectedImpact
5612
- ),
5613
- steps: options.preserveVolatileSlices ? preserveProposalVolatileSlices(previous.steps, steps) : clearProposalVolatileSlices(steps)
5614
- });
5606
+ const materialized = postprocessClarityTransformationProposalDataSchema.parse(
5607
+ {
5608
+ ...previous,
5609
+ summary: resolveEditedRoot(
5610
+ easeOutput.summary,
5611
+ previous.summary,
5612
+ options.pendingSummary
5613
+ ),
5614
+ projectedImpact: resolveEditedRoot(
5615
+ easeOutput.projectedImpact,
5616
+ previous.projectedImpact,
5617
+ options.pendingProjectedImpact
5618
+ ),
5619
+ steps: options.preserveVolatileSlices ? preserveProposalVolatileSlices(previous.steps, steps) : clearProposalVolatileSlices(steps)
5620
+ }
5621
+ );
5622
+ return {
5623
+ ...materialized,
5624
+ steps: preserveStepSourceIntegrity(previous.steps, materialized.steps)
5625
+ };
5615
5626
  }
5616
5627
  __name(materializeProposalEdit, "materializeProposalEdit");
5617
5628
  __name2(materializeProposalEdit, "materializeProposalEdit");
5629
+ function preserveStepSourceIntegrity(previousSteps, steps) {
5630
+ const previousById = new Map(previousSteps.map((step) => [step.id, step]));
5631
+ return steps.map((step) => {
5632
+ const previous = previousById.get(step.id);
5633
+ const sources = previous && areMaterialStepFieldsEqual(previous, step) ? preservePreviousStructuredSources(previous.sources, step.sources) : step.sources.map(demoteCaptureBackedSource);
5634
+ return { ...step, sources };
5635
+ });
5636
+ }
5637
+ __name(preserveStepSourceIntegrity, "preserveStepSourceIntegrity");
5638
+ __name2(preserveStepSourceIntegrity, "preserveStepSourceIntegrity");
5618
5639
  function clearProposalVolatileSlices(steps) {
5619
5640
  return steps.map((step) => {
5620
5641
  if (typeof step !== "object" || step === null) {
@@ -5653,6 +5674,97 @@ function preserveProposalVolatileSlices(previousSteps, steps) {
5653
5674
  }
5654
5675
  __name(preserveProposalVolatileSlices, "preserveProposalVolatileSlices");
5655
5676
  __name2(preserveProposalVolatileSlices, "preserveProposalVolatileSlices");
5677
+ function areMaterialStepFieldsEqual(previous, next) {
5678
+ return materialStepFingerprint(previous) === materialStepFingerprint(next);
5679
+ }
5680
+ __name(areMaterialStepFieldsEqual, "areMaterialStepFieldsEqual");
5681
+ __name2(areMaterialStepFieldsEqual, "areMaterialStepFieldsEqual");
5682
+ function materialStepFingerprint(step) {
5683
+ return JSON.stringify({
5684
+ nodeType: step.nodeType,
5685
+ nodeSubtype: step.nodeSubtype,
5686
+ targetSteps: step.targetSteps.map((edge) => ({
5687
+ stepId: edge.stepId,
5688
+ label: normalizeNullableText(edge.label),
5689
+ isDefault: edge.isDefault
5690
+ })),
5691
+ title: normalizeText(step.title),
5692
+ description: normalizeNullableText(step.description),
5693
+ action: normalizeNullableText(step.action),
5694
+ rationale: normalizeNullableText(step.rationale),
5695
+ role: normalizeNullableText(step.role),
5696
+ system: normalizeNullableText(step.system),
5697
+ input: normalizeNullableText(step.input),
5698
+ output: normalizeNullableText(step.output),
5699
+ condition: normalizeNullableText(step.condition),
5700
+ exception: normalizeNullableText(step.exception),
5701
+ handling: normalizeNullableText(step.handling),
5702
+ assumptions: normalizeNullableTextArray(step.assumptions),
5703
+ openQuestions: normalizeNullableTextArray(step.openQuestions)
5704
+ });
5705
+ }
5706
+ __name(materialStepFingerprint, "materialStepFingerprint");
5707
+ __name2(materialStepFingerprint, "materialStepFingerprint");
5708
+ function normalizeText(value) {
5709
+ return value.trim().replace(/\s+/g, " ").toLowerCase();
5710
+ }
5711
+ __name(normalizeText, "normalizeText");
5712
+ __name2(normalizeText, "normalizeText");
5713
+ function normalizeNullableText(value) {
5714
+ return value === null ? null : normalizeText(value);
5715
+ }
5716
+ __name(normalizeNullableText, "normalizeNullableText");
5717
+ __name2(normalizeNullableText, "normalizeNullableText");
5718
+ function normalizeNullableTextArray(values) {
5719
+ return values === null ? null : values.map(normalizeText);
5720
+ }
5721
+ __name(normalizeNullableTextArray, "normalizeNullableTextArray");
5722
+ __name2(normalizeNullableTextArray, "normalizeNullableTextArray");
5723
+ function preservePreviousStructuredSources(previousSources, sources) {
5724
+ const sourcesByIndex = sources.map(demoteCaptureBackedSource);
5725
+ return [
5726
+ ...previousSources.map(
5727
+ (previousSource, index) => hasStructuredEvidenceLink(previousSource) ? cloneSource(previousSource) : sourcesByIndex[index] ?? cloneSource(previousSource)
5728
+ ),
5729
+ ...sourcesByIndex.slice(previousSources.length)
5730
+ ];
5731
+ }
5732
+ __name(preservePreviousStructuredSources, "preservePreviousStructuredSources");
5733
+ __name2(preservePreviousStructuredSources, "preservePreviousStructuredSources");
5734
+ function cloneSource(source) {
5735
+ return {
5736
+ ...source,
5737
+ ...source.locator === void 0 ? {} : { locator: { ...source.locator } }
5738
+ };
5739
+ }
5740
+ __name(cloneSource, "cloneSource");
5741
+ __name2(cloneSource, "cloneSource");
5742
+ function demoteCaptureBackedSource(source) {
5743
+ if (!hasStructuredEvidenceLink(source)) {
5744
+ return source;
5745
+ }
5746
+ const {
5747
+ captureId: _captureId,
5748
+ evidenceId: _evidenceId,
5749
+ locator: _locator,
5750
+ sourceConfidence: _sourceConfidence,
5751
+ resolutionStatus: _resolutionStatus,
5752
+ ...legacySource
5753
+ } = source;
5754
+ return legacySource;
5755
+ }
5756
+ __name(demoteCaptureBackedSource, "demoteCaptureBackedSource");
5757
+ __name2(demoteCaptureBackedSource, "demoteCaptureBackedSource");
5758
+ function hasStructuredEvidenceLink(source) {
5759
+ return source.captureId !== void 0 || source.evidenceId !== void 0 || source.sourceConfidence !== void 0 || source.resolutionStatus === "resolved" || isCaptureBackedLocator(source.locator);
5760
+ }
5761
+ __name(hasStructuredEvidenceLink, "hasStructuredEvidenceLink");
5762
+ __name2(hasStructuredEvidenceLink, "hasStructuredEvidenceLink");
5763
+ function isCaptureBackedLocator(locator) {
5764
+ return locator !== void 0 && locator.type !== "manual" && locator.type !== "unresolved";
5765
+ }
5766
+ __name(isCaptureBackedLocator, "isCaptureBackedLocator");
5767
+ __name2(isCaptureBackedLocator, "isCaptureBackedLocator");
5656
5768
  function mergeSteps(previousSteps, steps) {
5657
5769
  const previousById = new Map(previousSteps.map((step) => [step.id, step]));
5658
5770
  return steps.map((step) => {
@@ -6907,6 +7019,9 @@ var sendArtifactMessageBodySchema = z30.object({
6907
7019
  var sendArtifactMessageResponseSchema = z30.object({
6908
7020
  user_message: artifactMessageSchema
6909
7021
  });
7022
+ var stopArtifactMessageResponseSchema = z30.object({
7023
+ artifact: artifactSchema
7024
+ });
6910
7025
  var answerArtifactQuestionBodySchema = z30.object({
6911
7026
  toolCallId: z30.string().min(1),
6912
7027
  answers: z30.record(z30.string(), z30.string()).refine((value) => Object.keys(value).length > 0, {
@@ -8126,7 +8241,6 @@ var agentApiSchema = z41.object({
8126
8241
  team_id: z41.string().nullable(),
8127
8242
  thread_id: z41.string().nullable(),
8128
8243
  folder_id: z41.string().nullable().optional(),
8129
- pinned_at: z41.string().nullable().optional(),
8130
8244
  created_at: z41.string().nullable(),
8131
8245
  updated_at: z41.string().nullable(),
8132
8246
  created_by: z41.object({
@@ -8141,6 +8255,7 @@ var agentApiSchema = z41.object({
8141
8255
  }).nullable().optional()
8142
8256
  });
8143
8257
  var agentUserContextApiSchema = z41.object({
8258
+ pinned_at: z41.string().nullable(),
8144
8259
  last_run_at: z41.string().nullable(),
8145
8260
  latest_build: buildApiSchema.nullable(),
8146
8261
  integration_configs: z41.array(integrationConfigApiSchema),
@@ -8154,6 +8269,9 @@ var agentUserContextApiSchema = z41.object({
8154
8269
  case_trigger_conflicting_agents: z41.array(conflictingAgentSchema),
8155
8270
  case_queue_name: z41.string().nullable()
8156
8271
  });
8272
+ var agentSingleUserContextApiSchema = z41.object({
8273
+ pinned_at: z41.string().nullable()
8274
+ });
8157
8275
  var agentListItemApiSchema = agentApiSchema.extend(
8158
8276
  agentUserContextApiSchema.shape
8159
8277
  );
@@ -8164,7 +8282,8 @@ var agentsListApiSchema = z41.object({
8164
8282
  offset: z41.int()
8165
8283
  });
8166
8284
  var agentResponseApiSchema = z41.object({
8167
- agent: agentApiSchema
8285
+ agent: agentApiSchema,
8286
+ user_context: agentSingleUserContextApiSchema
8168
8287
  });
8169
8288
  var createAgentResponseApiSchema = z41.object({
8170
8289
  agent: agentApiSchema,
@@ -8372,6 +8491,12 @@ var automationDetailResponseApiSchema = z49.object({
8372
8491
  var createAutomationResponseApiSchema = z49.object({
8373
8492
  automation: automationSummaryApiSchema
8374
8493
  });
8494
+ var updateAutomationResponseApiSchema = z49.object({
8495
+ automation: automationSummaryApiSchema
8496
+ });
8497
+ var deleteAutomationResponseApiSchema = z49.object({
8498
+ success: z49.boolean()
8499
+ });
8375
8500
  var DataResidencySchema = z50.enum(["us", "eu", "apac"]);
8376
8501
  var DataHandlingSchema = z50.enum(["standard", "zdr"]);
8377
8502
  var browserPageSchema = z51.object({
@@ -13059,8 +13184,12 @@ var listAgentsResponseSchema = z83.object({
13059
13184
  limit: z83.number().nullish(),
13060
13185
  offset: z83.number().nullish()
13061
13186
  });
13187
+ var agentUserContextSchema = z83.object({
13188
+ pinned_at: z83.string().nullable()
13189
+ });
13062
13190
  var getAgentResponseSchema = z83.object({
13063
- agent: publicAgentSchema
13191
+ agent: publicAgentSchema,
13192
+ user_context: agentUserContextSchema.optional()
13064
13193
  });
13065
13194
  var createAgentResponseSchema = z83.object({
13066
13195
  agent: publicAgentSchema,
@@ -13852,13 +13981,14 @@ function registerAgentsGet(agents) {
13852
13981
  `Unexpected response from the API: ${parsed.error.message}`
13853
13982
  );
13854
13983
  }
13855
- const { agent } = parsed.data;
13984
+ const { agent, user_context } = parsed.data;
13856
13985
  const model = await fetchLatestModel(agent.id, apiKey, apiBaseUrl);
13857
13986
  console.log(
13858
13987
  renderKeyValue([
13859
13988
  { label: "ID", value: agent.id },
13860
13989
  { label: "Name", value: agent.name },
13861
13990
  { label: "Model", value: model },
13991
+ { label: "Pinned", value: user_context?.pinned_at ?? "(unpinned)" },
13862
13992
  { label: "Created", value: agent.created_at ?? "" },
13863
13993
  { label: "Updated", value: agent.updated_at ?? "" }
13864
13994
  ])
@@ -14793,6 +14923,10 @@ function buildBody5(options) {
14793
14923
  if (options.clearThread === true) {
14794
14924
  body.thread_id = null;
14795
14925
  }
14926
+ const pinned = parseBoolPair(options.pin, options.unpin, "pin", "unpin");
14927
+ if (pinned !== void 0) {
14928
+ body.pinned = pinned;
14929
+ }
14796
14930
  if (Object.keys(body).length === 0) {
14797
14931
  throw new CliError(
14798
14932
  "Provide at least one field to update (e.g. --name, --enable-slack)."
@@ -14805,7 +14939,7 @@ function registerAgentsUpdate(agents) {
14805
14939
  agents.command("update <id>").description("Update an agent's display name or delivery settings").option("--name <name>", "new display name").option("--enable-slack", "enable Slack delivery").option("--disable-slack", "disable Slack delivery").option("--enable-microsoft-teams", "enable Microsoft Teams delivery").option("--disable-microsoft-teams", "disable Microsoft Teams delivery").option("--enable-agentic-memory", "enable agentic memory").option("--disable-agentic-memory", "disable agentic memory").option("--thread-id <id>", "associate the agent with a thread").option(
14806
14940
  "--clear-thread",
14807
14941
  "clear the agent's associated thread (sets thread_id to null)"
14808
- ).option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function updateAction(id, options) {
14942
+ ).option("--pin", "pin this agent to the top of your agents list (per-user)").option("--unpin", "remove your pin from this agent").option("--json", "output raw JSON from the API").action(/* @__PURE__ */ __name(async function updateAction(id, options) {
14809
14943
  const agentId = trimRequired(id, "<id>");
14810
14944
  const body = buildBody5(options);
14811
14945
  const { apiKey, apiBaseUrl } = await requireAuthenticatedConfig(this);
@@ -14826,7 +14960,7 @@ function registerAgentsUpdate(agents) {
14826
14960
  `Unexpected response from the API: ${parsed.error.message}`
14827
14961
  );
14828
14962
  }
14829
- const { agent } = parsed.data;
14963
+ const { agent, user_context } = parsed.data;
14830
14964
  console.log(green("Agent updated!"));
14831
14965
  console.log(
14832
14966
  renderKeyValue([
@@ -14842,6 +14976,7 @@ function registerAgentsUpdate(agents) {
14842
14976
  value: formatBool(agent.agentic_memory_enabled)
14843
14977
  },
14844
14978
  { label: "Thread", value: agent.thread_id ?? "(none)" },
14979
+ { label: "Pinned", value: user_context?.pinned_at ?? "(unpinned)" },
14845
14980
  { label: "Created", value: agent.created_at ?? "" },
14846
14981
  { label: "Updated", value: agent.updated_at ?? "" }
14847
14982
  ])
@@ -29470,7 +29605,7 @@ __name(resolveActiveTeamId, "resolveActiveTeamId");
29470
29605
  var version = resolveVersion();
29471
29606
  function resolveVersion() {
29472
29607
  if (true) {
29473
- return "1.19.1";
29608
+ return "1.19.2";
29474
29609
  }
29475
29610
  const packageJsonPath = join3(
29476
29611
  dirname3(fileURLToPath2(import.meta.url)),
@@ -29554,7 +29689,7 @@ function checkForUpdate() {
29554
29689
  __name(checkForUpdate, "checkForUpdate");
29555
29690
  function loadPackageMeta() {
29556
29691
  if (true) {
29557
- return { name: "@duvoai/cli", version: "1.19.1" };
29692
+ return { name: "@duvoai/cli", version: "1.19.2" };
29558
29693
  }
29559
29694
  const require2 = createRequire(import.meta.url);
29560
29695
  const raw = require2("../package.json");