faces-cli 1.5.1 → 1.5.3

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.
@@ -7,6 +7,7 @@ export default class CompileDoc extends BaseCommand {
7
7
  file: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
8
8
  perspective: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
9
9
  timeout: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
10
+ 'no-wait': import("@oclif/core/interfaces").BooleanFlag<boolean>;
10
11
  'base-url': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
11
12
  token: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
12
13
  'api-key': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
@@ -16,6 +16,10 @@ export default class CompileDoc extends BaseCommand {
16
16
  default: 'first-person',
17
17
  }),
18
18
  timeout: Flags.integer({ description: 'Compile timeout in seconds (default: 600)', default: 600 }),
19
+ 'no-wait': Flags.boolean({
20
+ description: 'Create and trigger compilation, then return immediately without polling.',
21
+ default: false,
22
+ }),
19
23
  };
20
24
  static args = {
21
25
  face_id: Args.string({ description: 'Face alias', required: true }),
@@ -64,6 +68,13 @@ export default class CompileDoc extends BaseCommand {
64
68
  throw err;
65
69
  }
66
70
  const chunksTotal = makeResponse.chunks_total;
71
+ if (flags['no-wait']) {
72
+ if (!json) {
73
+ process.stderr.write(`Compilation started in background${chunksTotal ? ` (${chunksTotal} chunks)` : ''}.\n`);
74
+ process.stderr.write(`Poll with: faces compile:doc:get ${docId} --json\n`);
75
+ }
76
+ return makeResponse;
77
+ }
67
78
  if (!json)
68
79
  process.stderr.write(`Compiling${chunksTotal ? ` (${chunksTotal} chunks)` : ''}:\n`);
69
80
  // Step 3: Poll until synced
@@ -3,6 +3,7 @@ export default class CompileDocMake extends BaseCommand {
3
3
  static description: string;
4
4
  static flags: {
5
5
  timeout: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
6
+ 'no-wait': import("@oclif/core/interfaces").BooleanFlag<boolean>;
6
7
  'base-url': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
7
8
  token: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
8
9
  'api-key': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
@@ -7,6 +7,10 @@ export default class CompileDocMake extends BaseCommand {
7
7
  static flags = {
8
8
  ...BaseCommand.baseFlags,
9
9
  timeout: Flags.integer({ description: 'Compile timeout in seconds (default: 600)', default: 600 }),
10
+ 'no-wait': Flags.boolean({
11
+ description: 'Return immediately after triggering compilation. Prints the document ID for manual polling.',
12
+ default: false,
13
+ }),
10
14
  };
11
15
  static args = {
12
16
  doc_id: Args.string({ description: 'Document ID', required: true }),
@@ -25,6 +29,13 @@ export default class CompileDocMake extends BaseCommand {
25
29
  throw err;
26
30
  }
27
31
  const chunksTotal = makeResponse.chunks_total;
32
+ if (flags['no-wait']) {
33
+ if (!json) {
34
+ process.stderr.write(`Compilation started in background${chunksTotal ? ` (${chunksTotal} chunks)` : ''}.\n`);
35
+ process.stderr.write(`Poll with: faces compile:doc:get ${args.doc_id} --json\n`);
36
+ }
37
+ return makeResponse;
38
+ }
28
39
  if (!json)
29
40
  process.stderr.write(`Compiling${chunksTotal ? ` (${chunksTotal} chunks)` : ''}:\n`);
30
41
  let result;
@@ -6,6 +6,7 @@ export default class CompileImport extends BaseCommand {
6
6
  type: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
7
7
  perspective: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
8
8
  'face-speaker': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
9
+ 'no-wait': import("@oclif/core/interfaces").BooleanFlag<boolean>;
9
10
  'base-url': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
10
11
  token: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
11
12
  'api-key': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
@@ -25,6 +25,10 @@ export default class CompileImport extends BaseCommand {
25
25
  'face-speaker': Flags.string({
26
26
  description: 'For --type thread: AssemblyAI speaker label (e.g. "A") that corresponds to the face. Defaults to first detected speaker.',
27
27
  }),
28
+ 'no-wait': Flags.boolean({
29
+ description: 'Return immediately after import starts (do not poll for transcription). Prints the ID for manual polling.',
30
+ default: false,
31
+ }),
28
32
  };
29
33
  static args = {
30
34
  face_id: Args.string({ description: 'Face alias', required: true }),
@@ -58,7 +62,15 @@ export default class CompileImport extends BaseCommand {
58
62
  }
59
63
  throw err;
60
64
  }
61
- // Poll until transcription completes
65
+ // Poll until transcription completes — unless --no-wait
66
+ if (data.prepare_status === 'transcribing' && flags['no-wait']) {
67
+ const id = (data.thread_id ?? data.document_id);
68
+ if (!json) {
69
+ process.stderr.write(`Import started in background (downloading + transcribing).\n`);
70
+ process.stderr.write(`Poll with: faces compile:${flags.type === 'thread' ? 'thread' : 'doc'}:get ${id} --json\n`);
71
+ }
72
+ return data;
73
+ }
62
74
  if (data.prepare_status === 'transcribing') {
63
75
  const id = (data.thread_id ?? data.document_id);
64
76
  const endpoint = flags.type === 'thread'
@@ -3,6 +3,7 @@ export default class CompileThreadMake extends BaseCommand {
3
3
  static description: string;
4
4
  static flags: {
5
5
  timeout: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
6
+ 'no-wait': import("@oclif/core/interfaces").BooleanFlag<boolean>;
6
7
  'base-url': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
7
8
  token: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
8
9
  'api-key': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
@@ -7,6 +7,10 @@ export default class CompileThreadMake extends BaseCommand {
7
7
  static flags = {
8
8
  ...BaseCommand.baseFlags,
9
9
  timeout: Flags.integer({ description: 'Compile timeout in seconds (default: 600)', default: 600 }),
10
+ 'no-wait': Flags.boolean({
11
+ description: 'Return immediately after triggering compilation. Prints the thread ID for manual polling.',
12
+ default: false,
13
+ }),
10
14
  };
11
15
  static args = {
12
16
  thread_id: Args.string({ description: 'Thread ID', required: true }),
@@ -25,6 +29,13 @@ export default class CompileThreadMake extends BaseCommand {
25
29
  throw err;
26
30
  }
27
31
  const chunksTotal = makeResponse.chunks_total;
32
+ if (flags['no-wait']) {
33
+ if (!json) {
34
+ process.stderr.write(`Compilation started in background${chunksTotal ? ` (${chunksTotal} chunks)` : ''}.\n`);
35
+ process.stderr.write(`Poll with: faces compile:thread:get ${args.thread_id} --json\n`);
36
+ }
37
+ return makeResponse;
38
+ }
28
39
  if (!json)
29
40
  process.stderr.write(`Compiling${chunksTotal ? ` (${chunksTotal} chunks)` : ''}:\n`);
30
41
  let result;
@@ -6,6 +6,7 @@ export default class CompileUpload extends BaseCommand {
6
6
  kind: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
7
7
  perspective: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
8
8
  'face-speaker': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
9
+ 'no-wait': import("@oclif/core/interfaces").BooleanFlag<boolean>;
9
10
  'base-url': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
10
11
  token: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
11
12
  'api-key': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
@@ -24,6 +24,10 @@ export default class CompileUpload extends BaseCommand {
24
24
  'face-speaker': Flags.string({
25
25
  description: 'Speaker name to map to the face (thread only). If omitted, auto-detected from face name.',
26
26
  }),
27
+ 'no-wait': Flags.boolean({
28
+ description: 'Return immediately after upload (do not poll for transcription). Prints the ID for manual polling.',
29
+ default: false,
30
+ }),
27
31
  };
28
32
  static args = {
29
33
  alias: Args.string({ description: 'Face alias', required: true }),
@@ -52,7 +56,15 @@ export default class CompileUpload extends BaseCommand {
52
56
  this.error(`Error (${err.statusCode}): ${err.message}`);
53
57
  throw err;
54
58
  }
55
- // If transcribing (audio/video upload), poll until complete
59
+ // If transcribing (audio/video upload), poll until complete — unless --no-wait
60
+ if (data.prepare_status === 'transcribing' && flags['no-wait']) {
61
+ const id = (data.thread_id ?? data.document_id);
62
+ if (!json) {
63
+ process.stderr.write(`Transcription started in background.\n`);
64
+ process.stderr.write(`Poll with: faces compile:${flags.kind === 'thread' ? 'thread' : 'doc'}:get ${id} --json\n`);
65
+ }
66
+ return data;
67
+ }
56
68
  if (data.prepare_status === 'transcribing') {
57
69
  const id = (data.thread_id ?? data.document_id);
58
70
  const endpoint = flags.kind === 'thread'