faces-cli 1.7.6 → 1.7.7

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 (33) hide show
  1. package/dist/commands/chat/chat.js +8 -0
  2. package/dist/utils.d.ts +0 -15
  3. package/dist/utils.js +0 -75
  4. package/oclif.manifest.json +484 -1394
  5. package/package.json +1 -1
  6. package/dist/commands/billing/quota.d.ts +0 -10
  7. package/dist/commands/billing/quota.js +0 -12
  8. package/dist/commands/billing/subscription.d.ts +0 -10
  9. package/dist/commands/billing/subscription.js +0 -24
  10. package/dist/commands/face/upload.d.ts +0 -17
  11. package/dist/commands/face/upload.js +0 -66
  12. package/dist/commands/voiceprint/build-status.d.ts +0 -14
  13. package/dist/commands/voiceprint/build-status.js +0 -46
  14. package/dist/commands/voiceprint/build.d.ts +0 -23
  15. package/dist/commands/voiceprint/build.js +0 -109
  16. package/dist/commands/voiceprint/get.d.ts +0 -14
  17. package/dist/commands/voiceprint/get.js +0 -47
  18. package/dist/commands/voiceprint/refine-status.d.ts +0 -14
  19. package/dist/commands/voiceprint/refine-status.js +0 -43
  20. package/dist/commands/voiceprint/refine.d.ts +0 -23
  21. package/dist/commands/voiceprint/refine.js +0 -88
  22. package/dist/commands/voiceprint/revert.d.ts +0 -14
  23. package/dist/commands/voiceprint/revert.js +0 -36
  24. package/dist/commands/voiceprint/score-status.d.ts +0 -14
  25. package/dist/commands/voiceprint/score-status.js +0 -46
  26. package/dist/commands/voiceprint/score.d.ts +0 -24
  27. package/dist/commands/voiceprint/score.js +0 -114
  28. package/dist/commands/voiceprint/upload.d.ts +0 -17
  29. package/dist/commands/voiceprint/upload.js +0 -66
  30. package/dist/commands/voiceprint/versions.d.ts +0 -14
  31. package/dist/commands/voiceprint/versions.js +0 -44
  32. package/dist/voiceprint.d.ts +0 -28
  33. package/dist/voiceprint.js +0 -55
@@ -195,6 +195,14 @@ export default class ChatChat extends BaseCommand {
195
195
  };
196
196
  if (flags.system)
197
197
  payload.instructions = flags.system;
198
+ // Responses names the output cap `max_output_tokens`, not `max_tokens`.
199
+ // `temperature` is accepted per-model (gpt-5.1/5.2/5.4 yes; gpt-5.5/5.6-*/o3
200
+ // no) with no capability flag to query, so we always send what the user asked
201
+ // for — the backend strips the param and retries when a model 400s on it.
202
+ if (flags['max-tokens'])
203
+ payload.max_output_tokens = flags['max-tokens'];
204
+ if (flags.temperature !== undefined)
205
+ payload.temperature = Number.parseFloat(flags.temperature);
198
206
  if (flags['oauth-only'])
199
207
  payload.oauth_only = true;
200
208
  if (flags.stream) {
package/dist/utils.d.ts CHANGED
@@ -1,20 +1,5 @@
1
1
  /** Max length of a face's profile_addendum (per-face system prompt). Mirrors the backend. */
2
2
  export declare const PROFILE_ADDENDUM_MAX_CHARS = 100000;
3
- export interface VoiceprintEmail {
4
- id: string;
5
- text: string;
6
- }
7
- /**
8
- * Load voiceprint writing samples from a JSON/JSONL file or a directory.
9
- *
10
- * - `file`: a JSON array of `{id?, text}` objects or plain strings, OR JSONL
11
- * (one such value per line). The format is auto-detected.
12
- * - `dir`: one sample per non-hidden file; `id` is the filename (sans extension),
13
- * `text` is the file contents. Files are sorted by name; empty files are skipped.
14
- *
15
- * Throws on a missing path, malformed content, or no usable samples.
16
- */
17
- export declare function loadVoiceprintEmails(file: string | undefined, dir: string | undefined): VoiceprintEmail[];
18
3
  /**
19
4
  * Resolve a face's profile_addendum from the `--profile-addendum` / `--profile-addendum-file`
20
5
  * flags. Returns undefined when neither is given (field left unchanged). Throws on a missing
package/dist/utils.js CHANGED
@@ -1,81 +1,6 @@
1
1
  import fs from 'node:fs';
2
- import path from 'node:path';
3
2
  /** Max length of a face's profile_addendum (per-face system prompt). Mirrors the backend. */
4
3
  export const PROFILE_ADDENDUM_MAX_CHARS = 100_000;
5
- function itemToEmail(item, i, where) {
6
- if (typeof item === 'string')
7
- return { id: `m${i + 1}`, text: item };
8
- if (item && typeof item === 'object' && typeof item.text === 'string') {
9
- const obj = item;
10
- return { id: obj.id !== undefined ? String(obj.id) : `m${i + 1}`, text: obj.text };
11
- }
12
- throw new Error(`${where} must be a string or an object with a "text" field`);
13
- }
14
- /**
15
- * Load voiceprint writing samples from a JSON/JSONL file or a directory.
16
- *
17
- * - `file`: a JSON array of `{id?, text}` objects or plain strings, OR JSONL
18
- * (one such value per line). The format is auto-detected.
19
- * - `dir`: one sample per non-hidden file; `id` is the filename (sans extension),
20
- * `text` is the file contents. Files are sorted by name; empty files are skipped.
21
- *
22
- * Throws on a missing path, malformed content, or no usable samples.
23
- */
24
- export function loadVoiceprintEmails(file, dir) {
25
- if (dir !== undefined) {
26
- if (!fs.existsSync(dir) || !fs.statSync(dir).isDirectory())
27
- throw new Error(`Directory not found: ${dir}`);
28
- const emails = [];
29
- const names = fs.readdirSync(dir).filter((n) => !n.startsWith('.')).sort();
30
- for (const name of names) {
31
- const full = path.join(dir, name);
32
- if (!fs.statSync(full).isFile())
33
- continue;
34
- const text = fs.readFileSync(full, 'utf8').trim();
35
- if (!text)
36
- continue;
37
- emails.push({ id: name.replace(/\.[^.]+$/, ''), text });
38
- }
39
- if (emails.length === 0)
40
- throw new Error(`No usable files found in ${dir}`);
41
- return emails;
42
- }
43
- if (file !== undefined) {
44
- if (!fs.existsSync(file))
45
- throw new Error(`File not found: ${file}`);
46
- const raw = fs.readFileSync(file, 'utf8');
47
- // Try a single JSON array first; fall back to JSONL (one value per line).
48
- let items;
49
- let asArray;
50
- try {
51
- asArray = JSON.parse(raw);
52
- }
53
- catch {
54
- asArray = undefined;
55
- }
56
- if (Array.isArray(asArray)) {
57
- items = asArray;
58
- }
59
- else {
60
- const lines = raw.split('\n').map((l) => l.trim()).filter(Boolean);
61
- if (lines.length === 0)
62
- throw new Error(`${file} contains no samples`);
63
- items = lines.map((line, i) => {
64
- try {
65
- return JSON.parse(line);
66
- }
67
- catch {
68
- throw new Error(`${file} is neither a JSON array nor valid JSONL (line ${i + 1} did not parse)`);
69
- }
70
- });
71
- }
72
- const emails = items.map((item, i) => itemToEmail(item, i, `${file}[${i}]`));
73
- if (emails.length === 0)
74
- throw new Error(`${file} contains no samples`);
75
- return emails;
76
- }
77
- throw new Error('Provide --emails <file> or --emails-dir <dir>');
78
- }
79
4
  /**
80
5
  * Resolve a face's profile_addendum from the `--profile-addendum` / `--profile-addendum-file`
81
6
  * flags. Returns undefined when neither is given (field left unchanged). Throws on a missing