recappi 0.1.39 → 0.1.40

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/index.js CHANGED
@@ -17171,7 +17171,8 @@ var sidecarCapabilitySchema = external_exports.enum([
17171
17171
  var sidecarAccountSchema = external_exports.object({
17172
17172
  backendOrigin: external_exports.string(),
17173
17173
  userId: external_exports.string(),
17174
- email: external_exports.string().optional()
17174
+ email: external_exports.string().optional(),
17175
+ authToken: external_exports.string().optional()
17175
17176
  });
17176
17177
  var sidecarClientInfoSchema = external_exports.object({
17177
17178
  name: external_exports.string(),
@@ -20567,7 +20568,7 @@ async function startRecordSessionOnce(opts) {
20567
20568
  const sidecarArgs = opts.sidecarArgs ?? [];
20568
20569
  const spawnSidecar = opts.runtime?.spawnSidecar ?? spawnMiniSidecar;
20569
20570
  const sidecar = spawnSidecar({ command, args: sidecarArgs, env: opts.env });
20570
- const account = requireAccountPartition(opts.account);
20571
+ const accountPartition = requireAccountPartition(opts.account);
20571
20572
  const artifacts = [];
20572
20573
  let handshake;
20573
20574
  let sessionId;
@@ -20605,7 +20606,7 @@ async function startRecordSessionOnce(opts) {
20605
20606
  handshake = await sidecar.client.handshake(
20606
20607
  defaultSidecarHandshakeParams({
20607
20608
  client: { name: "recappi-cli", version: opts.cliVersion },
20608
- account: opts.account,
20609
+ account: accountPartition,
20609
20610
  capabilities: opts.live ? ["recording.capture", "recording.upload", "live_captions.stream"] : ["recording.capture", "recording.upload"]
20610
20611
  })
20611
20612
  );
@@ -20624,7 +20625,7 @@ async function startRecordSessionOnce(opts) {
20624
20625
  const preflight = await sidecar.client.getPermissionStatus({ options: recordingOptions });
20625
20626
  assertRecordingPermissions(preflight.permissions);
20626
20627
  const started = await sidecar.client.startRecording({
20627
- account,
20628
+ account: opts.account,
20628
20629
  options: recordingOptions
20629
20630
  });
20630
20631
  sessionId = started.sessionId;
@@ -20642,10 +20643,10 @@ async function startRecordSessionOnce(opts) {
20642
20643
  localSessionRef = stopped.localSessionRef ?? localSessionRef;
20643
20644
  artifacts.push(...stopped.artifacts ?? []);
20644
20645
  const uniqueArtifacts = dedupeArtifacts(artifacts);
20645
- persistArtifacts(uniqueArtifacts, account, opts);
20646
+ persistArtifacts(uniqueArtifacts, accountPartition, opts);
20646
20647
  return recordCommandDataSchema.parse({
20647
- origin: account.backendOrigin,
20648
- userId: account.userId,
20648
+ origin: accountPartition.backendOrigin,
20649
+ userId: accountPartition.userId,
20649
20650
  live: captionStreamEnabled,
20650
20651
  sessionId: stopped.sessionId,
20651
20652
  state: stopped.state,
@@ -21083,6 +21084,7 @@ async function runCli(deps = {}) {
21083
21084
  account: {
21084
21085
  backendOrigin: auth.origin,
21085
21086
  userId: liveStatus.userId,
21087
+ authToken: requireToken(auth),
21086
21088
  ...liveStatus.email ? { email: liveStatus.email } : {}
21087
21089
  },
21088
21090
  cliVersion: CLI_VERSION,
@@ -21212,6 +21214,7 @@ async function runCli(deps = {}) {
21212
21214
  account: {
21213
21215
  backendOrigin: auth.origin,
21214
21216
  userId: status.userId,
21217
+ authToken: requireToken(auth),
21215
21218
  ...status.email ? { email: status.email } : {}
21216
21219
  },
21217
21220
  cliVersion: CLI_VERSION,