@plaud-ai/cli 0.3.4 → 0.3.6

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.
Files changed (2) hide show
  1. package/dist/index.js +55 -13
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -20364,7 +20364,7 @@ function isNewer(current, latest) {
20364
20364
  return false;
20365
20365
  }
20366
20366
  var updateCommand = new Command("update").description("Check npm for the latest Plaud CLI and print the upgrade command").action(async () => {
20367
- const current = "0.3.4";
20367
+ const current = "0.3.6";
20368
20368
  const spinner = ora("Checking npm for latest version...").start();
20369
20369
  const latest = await fetchLatestVersion();
20370
20370
  spinner.stop();
@@ -20419,10 +20419,10 @@ async function checkForUpdate(current) {
20419
20419
  return isNewer(current, latest) ? latest : null;
20420
20420
  }
20421
20421
  var versionCommand = new Command2("version").description("Show CLI version information").action(async () => {
20422
- const current = "0.3.4";
20422
+ const current = "0.3.6";
20423
20423
  console.log(`plaud ${current}`);
20424
- if ("f7c7d70") console.log(`commit ${"f7c7d70"}`);
20425
- if ("2026-06-29T07:35:15.095Z") console.log(`built ${"2026-06-29T07:35:15.095Z"}`);
20424
+ if ("43da41f") console.log(`commit ${"43da41f"}`);
20425
+ if ("2026-07-30T06:38:05.314Z") console.log(`built ${"2026-07-30T06:38:05.314Z"}`);
20426
20426
  if (current === "unknown") return;
20427
20427
  const newer = await checkForUpdate(current);
20428
20428
  if (newer) {
@@ -20870,6 +20870,23 @@ function runOAuthCallback(opts) {
20870
20870
  });
20871
20871
  }
20872
20872
 
20873
+ // ../shared/dist/source-block.js
20874
+ async function loadBlockContent(block) {
20875
+ if (!block)
20876
+ return "";
20877
+ const inline = block.data_content;
20878
+ if (typeof inline === "string" && inline.length > 0)
20879
+ return inline;
20880
+ const link = block.data_link;
20881
+ if (typeof link === "string" && link.length > 0) {
20882
+ const res = await fetch(link);
20883
+ if (!res.ok)
20884
+ throw new Error(`Failed to fetch block content from data_link (HTTP ${res.status})`);
20885
+ return await res.text();
20886
+ }
20887
+ return "";
20888
+ }
20889
+
20873
20890
  // src/config.ts
20874
20891
  import { readFileSync, existsSync } from "fs";
20875
20892
  import { homedir as homedir4 } from "os";
@@ -21237,7 +21254,12 @@ var audioCommand = new Command8("audio").description("Get the audio download URL
21237
21254
  const file = await client2.getFile(fileId);
21238
21255
  spinner.stop();
21239
21256
  if (!file.presigned_url) {
21240
- console.log(chalk9.yellow("Audio not available for this recording."));
21257
+ const synced = !!(file.duration || file.source_list && file.source_list.length);
21258
+ console.log(
21259
+ chalk9.yellow(
21260
+ synced ? "Audio URL is temporarily unavailable (transient backend signing issue for a synced recording). Try again in a few minutes." : "Audio not available for this recording."
21261
+ )
21262
+ );
21241
21263
  return;
21242
21264
  }
21243
21265
  console.log(chalk9.bold("\nAudio Download URL:\n"));
@@ -21268,23 +21290,43 @@ import { Command as Command9 } from "commander";
21268
21290
  import chalk10 from "chalk";
21269
21291
  import ora7 from "ora";
21270
21292
  import { writeFile as writeFile4 } from "fs/promises";
21271
- var transcriptCommand = new Command9("transcript").description("Get the transcript for a Plaud recording").argument("<file_id>", "The file ID to retrieve transcript for").option("-o, --output <file>", "Save transcript to a file").action(async (fileId, opts) => {
21293
+ var BLOCKS = ["transaction", "transaction_polish", "outline"];
21294
+ var transcriptCommand = new Command9("transcript").description("Get the transcript for a Plaud recording").argument("<file_id>", "The file ID to retrieve transcript for").option("-o, --output <file>", "Save transcript to a file").option(
21295
+ "--block <block>",
21296
+ `Which block to fetch: ${BLOCKS.join(" | ")} (default: transaction)`
21297
+ ).option("--polished", "Shortcut for --block transaction_polish (AI-cleaned transcript)").action(async (fileId, opts) => {
21298
+ const block = opts.polished ? "transaction_polish" : opts.block ?? "transaction";
21299
+ if (!BLOCKS.includes(block)) {
21300
+ printError("BAD_ARGS", `Unknown --block "${block}". Choose one of: ${BLOCKS.join(", ")}.`);
21301
+ await telemetryExit(ExitCode.ERROR);
21302
+ }
21272
21303
  const client2 = getClient2();
21273
21304
  const spinner = ora7("Fetching transcript...").start();
21274
21305
  try {
21275
21306
  const file = await client2.getFile(fileId);
21276
- spinner.stop();
21277
21307
  const sourceList = file.source_list ?? [];
21278
- const source = sourceList.find((s) => s.data_type === "transaction");
21308
+ const source = sourceList.find((s) => s.data_type === block);
21279
21309
  if (!source) {
21280
- console.log(chalk10.yellow("Transcript not available for this recording."));
21310
+ spinner.stop();
21311
+ const available = sourceList.map((s) => s.data_type).filter(Boolean).join(", ") || "(none)";
21312
+ console.log(chalk10.yellow(`No "${block}" transcript for this recording. Available: ${available}.`));
21313
+ return;
21314
+ }
21315
+ const content = await loadBlockContent(source);
21316
+ spinner.stop();
21317
+ if (!content) {
21318
+ console.log(
21319
+ chalk10.yellow(
21320
+ block === "transaction_polish" ? "The cleaned-up (polished) transcript hasn't been generated for this recording yet." : `The "${block}" transcript is not available for this recording.`
21321
+ )
21322
+ );
21281
21323
  return;
21282
21324
  }
21283
- const segments = JSON.parse(source.data_content);
21325
+ const segments = JSON.parse(content);
21284
21326
  const lines = segments.map((seg) => {
21285
21327
  const time = `[${formatTime(seg.start_time)} - ${formatTime(seg.end_time)}]`;
21286
21328
  const speaker = seg.speaker ? `${seg.speaker}: ` : "";
21287
- return `${time} ${speaker}${seg.content}`;
21329
+ return `${time} ${speaker}${seg.content ?? seg.topic ?? ""}`;
21288
21330
  });
21289
21331
  const output = lines.join("\n");
21290
21332
  if (opts.output) {
@@ -21659,7 +21701,7 @@ async function runWizard() {
21659
21701
  try {
21660
21702
  await initTelemetry({
21661
21703
  surface: "cli",
21662
- appVersion: "0.3.4"
21704
+ appVersion: "0.3.6"
21663
21705
  });
21664
21706
  } catch {
21665
21707
  }
@@ -21668,7 +21710,7 @@ async function notifyUpdate() {
21668
21710
  if (sub === "version" || sub === "update") return;
21669
21711
  if (process.env.PLAUD_NO_UPDATE_NOTIFIER) return;
21670
21712
  if (!process.stderr.isTTY) return;
21671
- const current = "0.3.4";
21713
+ const current = "0.3.6";
21672
21714
  if (current === "0.0.0") return;
21673
21715
  try {
21674
21716
  const newer = await checkForUpdate(current);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plaud-ai/cli",
3
- "version": "0.3.4",
3
+ "version": "0.3.6",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "plaud": "dist/index.js"