@faces-sh/cli 1.1.0 → 1.3.0
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/README.md +106 -54
- package/dist/billing.js +11 -8
- package/dist/chat-command.d.ts +33 -0
- package/dist/chat-command.js +110 -0
- package/dist/chat.d.ts +49 -0
- package/dist/chat.js +157 -0
- package/dist/choices.d.ts +11 -5
- package/dist/choices.js +26 -9
- package/dist/client.d.ts +8 -0
- package/dist/client.js +37 -0
- package/dist/commands/billing/llm-costs.js +9 -5
- package/dist/commands/billing/subscription/index.js +1 -1
- package/dist/commands/catalog/doctor.js +2 -2
- package/dist/commands/{causes.d.ts → chat/chat.d.ts} +14 -14
- package/dist/commands/chat/chat.js +31 -0
- package/dist/commands/chat/messages.d.ts +32 -0
- package/dist/commands/chat/messages.js +21 -0
- package/dist/commands/chat/responses.d.ts +32 -0
- package/dist/commands/chat/responses.js +22 -0
- package/dist/commands/chat/thread.d.ts +40 -0
- package/dist/commands/chat/thread.js +238 -0
- package/dist/commands/choices.d.ts +4 -2
- package/dist/commands/choices.js +56 -15
- package/dist/commands/conversation/add.d.ts +2 -0
- package/dist/commands/conversation/add.js +5 -2
- package/dist/commands/conversation/compact.js +13 -16
- package/dist/commands/conversation/create.d.ts +2 -0
- package/dist/commands/conversation/create.js +14 -11
- package/dist/commands/decide.d.ts +32 -4
- package/dist/commands/decide.js +135 -83
- package/dist/commands/face/get.js +1 -1
- package/dist/commands/face/list.d.ts +2 -0
- package/dist/commands/face/list.js +23 -1
- package/dist/commands/fidelity/pick.js +2 -2
- package/dist/commands/fidelity/run.d.ts +20 -0
- package/dist/commands/fidelity/run.js +99 -0
- package/dist/commands/fidelity/start.d.ts +17 -0
- package/dist/commands/fidelity/start.js +56 -0
- package/dist/commands/fidelity/turn.d.ts +17 -0
- package/dist/commands/fidelity/turn.js +48 -0
- package/dist/commands/group/add.js +1 -1
- package/dist/commands/media/list.d.ts +12 -0
- package/dist/commands/media/list.js +35 -0
- package/dist/commands/models/list.js +13 -6
- package/dist/commands/premise/add.d.ts +30 -0
- package/dist/commands/premise/add.js +86 -0
- package/dist/commands/premise/choices.d.ts +21 -0
- package/dist/commands/premise/choices.js +68 -0
- package/dist/commands/premise/claim.d.ts +20 -0
- package/dist/commands/premise/claim.js +38 -0
- package/dist/commands/premise/decide.d.ts +18 -0
- package/dist/commands/premise/decide.js +36 -0
- package/dist/commands/premise/delete.d.ts +17 -0
- package/dist/commands/premise/delete.js +17 -0
- package/dist/commands/premise/edit.d.ts +28 -0
- package/dist/commands/premise/edit.js +51 -0
- package/dist/commands/premise/get.d.ts +22 -0
- package/dist/commands/premise/get.js +37 -0
- package/dist/commands/premise/refine.d.ts +20 -0
- package/dist/commands/premise/refine.js +80 -0
- package/dist/commands/session/compact.js +5 -8
- package/dist/commands/session/create.js +9 -8
- package/dist/commands/state/create.d.ts +13 -2
- package/dist/commands/state/create.js +55 -2
- package/dist/commands/state/get.d.ts +19 -2
- package/dist/commands/state/get.js +30 -2
- package/dist/commands/state/use.d.ts +16 -0
- package/dist/commands/state/use.js +25 -0
- package/dist/commands/style/make.js +1 -1
- package/dist/commands/style/upload.js +1 -1
- package/dist/conversation.d.ts +30 -3
- package/dist/conversation.js +202 -18
- package/dist/decisions.d.ts +0 -5
- package/dist/decisions.js +0 -18
- package/dist/fidelity.js +3 -3
- package/dist/foreman.d.ts +47 -0
- package/dist/foreman.js +115 -0
- package/dist/media.d.ts +8 -0
- package/dist/media.js +12 -0
- package/dist/model.d.ts +11 -0
- package/dist/model.js +53 -0
- package/dist/refine.d.ts +106 -0
- package/dist/refine.js +601 -0
- package/dist/routing.d.ts +1 -4
- package/dist/routing.js +4 -40
- package/dist/synopsis.d.ts +49 -0
- package/dist/synopsis.js +43 -0
- package/dist/utils.d.ts +1 -25
- package/dist/utils.js +10 -108
- package/oclif.manifest.json +3939 -1835
- package/package.json +10 -4
- package/dist/commands/causes.js +0 -146
package/dist/choices.d.ts
CHANGED
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
export declare const CHOICES_PATH = "/v1/choices";
|
|
2
|
-
export
|
|
2
|
+
export { MAESTROS as CHOICES_MAESTROS } from './model.js';
|
|
3
3
|
export declare const MAX_CHOICES = 32;
|
|
4
4
|
export declare const MAX_STATE_TOKENS = 3000;
|
|
5
5
|
export interface ChoicesResponse {
|
|
6
6
|
object?: string;
|
|
7
|
-
view?: string;
|
|
8
7
|
model?: string;
|
|
9
|
-
version?: string;
|
|
10
8
|
choices?: Array<{
|
|
9
|
+
id?: string;
|
|
11
10
|
name?: string;
|
|
12
11
|
description?: string;
|
|
12
|
+
premise?: string;
|
|
13
13
|
}>;
|
|
14
|
+
choices_item?: string;
|
|
15
|
+
into?: {
|
|
16
|
+
premise?: string;
|
|
17
|
+
kind?: string;
|
|
18
|
+
side_node?: string;
|
|
19
|
+
};
|
|
20
|
+
warnings?: string[];
|
|
14
21
|
question?: string;
|
|
15
22
|
alternatives?: string[];
|
|
16
23
|
usage?: {
|
|
@@ -18,6 +25,5 @@ export interface ChoicesResponse {
|
|
|
18
25
|
output_tokens?: number;
|
|
19
26
|
};
|
|
20
27
|
}
|
|
21
|
-
export declare function asView(face: string): string;
|
|
22
28
|
export declare function choicesLines(data: ChoicesResponse): string[];
|
|
23
|
-
export declare function choicesHint(status: number, message: string,
|
|
29
|
+
export declare function choicesHint(status: number, message: string, model: string): string | undefined;
|
package/dist/choices.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
+
import { parseModel } from './model.js';
|
|
1
2
|
export const CHOICES_PATH = '/v1/choices';
|
|
2
|
-
export
|
|
3
|
+
export { MAESTROS as CHOICES_MAESTROS } from './model.js';
|
|
3
4
|
export const MAX_CHOICES = 32;
|
|
4
5
|
export const MAX_STATE_TOKENS = 3000;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
return f.startsWith('@') ? f : `@${f}`;
|
|
6
|
+
function faceOf(model) {
|
|
7
|
+
return model ? parseModel(model).faces ?? model : undefined;
|
|
8
8
|
}
|
|
9
9
|
export function choicesLines(data) {
|
|
10
10
|
const lines = [];
|
|
11
11
|
if (data.object === 'choices.question') {
|
|
12
|
-
lines.push(`${data.
|
|
12
|
+
lines.push(`${faceOf(data.model) ?? 'The face'} would ask: ${data.question ?? '-'}`);
|
|
13
13
|
const alts = data.alternatives ?? [];
|
|
14
14
|
if (alts.length > 0) {
|
|
15
15
|
lines.push('', 'Or:');
|
|
@@ -23,25 +23,42 @@ export function choicesLines(data) {
|
|
|
23
23
|
if (choices.length === 0)
|
|
24
24
|
lines.push('No options.');
|
|
25
25
|
choices.forEach((c, i) => {
|
|
26
|
-
lines.push(`${i + 1}. ${c.name ?? '-'}`);
|
|
26
|
+
lines.push(`${i + 1}. ${c.name ?? '-'}${c.id ? ` [${c.id}]` : ''}`);
|
|
27
27
|
if (c.description)
|
|
28
28
|
lines.push(` ${c.description}`);
|
|
29
|
+
if (c.premise && c.premise !== c.name)
|
|
30
|
+
lines.push(` premise: ${c.premise}`);
|
|
29
31
|
});
|
|
32
|
+
if (data.into?.premise) {
|
|
33
|
+
lines.push('', `Written into the state as premises that ${data.into.premise} rests on (${data.into.kind ?? 'or'} edges, ` +
|
|
34
|
+
`side node ${data.into.side_node ?? '-'}). Weigh them: faces decide <model> --conversation <id> --weigh ` +
|
|
35
|
+
`${JSON.stringify(data.into.premise)}`);
|
|
36
|
+
}
|
|
37
|
+
else if (data.choices_item) {
|
|
38
|
+
lines.push('', `Added to the state as ${data.choices_item}. Name an option id (or ${data.choices_item} for all of them) ` +
|
|
39
|
+
'in --premise-depends-on or decide --depends-on.');
|
|
40
|
+
}
|
|
30
41
|
}
|
|
42
|
+
for (const w of data.warnings ?? [])
|
|
43
|
+
lines.push('', `Warning: ${w}`);
|
|
31
44
|
const u = data.usage;
|
|
32
45
|
if (u && (typeof u.input_tokens === 'number' || typeof u.output_tokens === 'number')) {
|
|
33
46
|
lines.push('', `${data.model ?? 'model'}: ${(u.input_tokens ?? 0).toLocaleString('en-US')} input, ${(u.output_tokens ?? 0).toLocaleString('en-US')} output tokens`);
|
|
34
47
|
}
|
|
35
48
|
return lines;
|
|
36
49
|
}
|
|
37
|
-
export function choicesHint(status, message,
|
|
50
|
+
export function choicesHint(status, message, model) {
|
|
51
|
+
const face = (parseModel(model).faces ?? model).replace(/^@/, '').replace('~', ':');
|
|
38
52
|
if (status === 422 && /at most 3,000/.test(message)) {
|
|
39
53
|
return 'Put the situation in a state, one premise per fact (faces state:create, then faces state:add), and pass --state-id.';
|
|
40
54
|
}
|
|
41
55
|
if (status === 409 && /nothing compiled/i.test(message))
|
|
42
|
-
return `Give it a first source: faces compile:upload ${face
|
|
56
|
+
return `Give it a first source: faces compile:upload ${face} --file <file>.`;
|
|
43
57
|
if (status === 409 && /compiled before/i.test(message))
|
|
44
|
-
return `Recompile one of its sources (list them with: faces face:sources ${face
|
|
58
|
+
return `Recompile one of its sources (list them with: faces face:sources ${face}).`;
|
|
59
|
+
if (status === 422 && /depends_on` names no premise or decision/.test(message)) {
|
|
60
|
+
return 'Name premise keys, decision ids and choices ids already in the state (faces state:items <id>).';
|
|
61
|
+
}
|
|
45
62
|
if (status === 404 && /state/i.test(message))
|
|
46
63
|
return 'A state expires 30 days after it was last used. Start another with: faces state:create';
|
|
47
64
|
return undefined;
|
package/dist/client.d.ts
CHANGED
|
@@ -60,6 +60,14 @@ export declare class FacesClient {
|
|
|
60
60
|
requireJwt?: boolean;
|
|
61
61
|
body?: unknown;
|
|
62
62
|
}): Promise<unknown>;
|
|
63
|
+
stateReply(method: 'GET' | 'POST' | 'PATCH' | 'DELETE', path: string, opts?: {
|
|
64
|
+
body?: unknown;
|
|
65
|
+
params?: Record<string, string>;
|
|
66
|
+
}): Promise<{
|
|
67
|
+
status: number;
|
|
68
|
+
ok: boolean;
|
|
69
|
+
data: Record<string, unknown>;
|
|
70
|
+
}>;
|
|
63
71
|
postWithHeaders(path: string, opts?: {
|
|
64
72
|
requireJwt?: boolean;
|
|
65
73
|
body?: unknown;
|
package/dist/client.js
CHANGED
|
@@ -363,6 +363,43 @@ export class FacesClient {
|
|
|
363
363
|
throw await this.parseError(resp);
|
|
364
364
|
return resp.json();
|
|
365
365
|
}
|
|
366
|
+
async stateReply(method, path, opts = {}) {
|
|
367
|
+
let url = this.url(path);
|
|
368
|
+
if (opts.params && Object.keys(opts.params).length > 0)
|
|
369
|
+
url += '?' + new URLSearchParams(opts.params).toString();
|
|
370
|
+
const headers = { ...this.authHeader() };
|
|
371
|
+
const withBody = method === 'POST' || method === 'PATCH';
|
|
372
|
+
if (withBody)
|
|
373
|
+
headers['Content-Type'] = 'application/json';
|
|
374
|
+
const session = process.env.FACES_SESSION?.trim();
|
|
375
|
+
if (session)
|
|
376
|
+
headers['X-Faces-Session'] = session;
|
|
377
|
+
const resp = await this.send(path, url, {
|
|
378
|
+
method,
|
|
379
|
+
headers,
|
|
380
|
+
body: withBody ? JSON.stringify(opts.body ?? {}) : undefined,
|
|
381
|
+
});
|
|
382
|
+
if (resp.ok) {
|
|
383
|
+
const body = (await resp.json());
|
|
384
|
+
const held = resp.headers.get('x-faces-held') === '1' && body?.object !== 'state.reply' ? heldChatError(body) : undefined;
|
|
385
|
+
if (held) {
|
|
386
|
+
this.lastError = held;
|
|
387
|
+
return { status: held.statusCode, ok: false, data: { ...body, error: held.message, text: held.message, held: true } };
|
|
388
|
+
}
|
|
389
|
+
return { status: resp.status, ok: true, data: body };
|
|
390
|
+
}
|
|
391
|
+
let data;
|
|
392
|
+
try {
|
|
393
|
+
data = (await resp.clone().json());
|
|
394
|
+
}
|
|
395
|
+
catch {
|
|
396
|
+
data = undefined;
|
|
397
|
+
}
|
|
398
|
+
if (data && data.object === 'state.reply' && typeof data.text === 'string') {
|
|
399
|
+
return { status: resp.status, ok: false, data };
|
|
400
|
+
}
|
|
401
|
+
throw await this.parseError(resp);
|
|
402
|
+
}
|
|
366
403
|
async postWithHeaders(path, opts = {}) {
|
|
367
404
|
const resp = await this.send(path, this.url(path), {
|
|
368
405
|
method: 'POST',
|
|
@@ -5,7 +5,7 @@ import { table, usd } from '../../utils.js';
|
|
|
5
5
|
import { llmCostLab } from '../../billing.js';
|
|
6
6
|
export default class BillingLlmCosts extends BaseCommand {
|
|
7
7
|
static description = 'List available LLMs, their per-token costs and what you have spent on each. Models are listed once, ' +
|
|
8
|
-
'under the id their lab gives them.
|
|
8
|
+
'under the id their lab gives them. Maestro and compile prices, and what each plan includes, are listed ' +
|
|
9
9
|
'after the table. For the full catalog, with endpoints and which models are Codex-eligible, see faces models:list.';
|
|
10
10
|
static flags = {
|
|
11
11
|
...BaseCommand.baseFlags,
|
|
@@ -65,7 +65,7 @@ export default class BillingLlmCosts extends BaseCommand {
|
|
|
65
65
|
async facesPrices(client) {
|
|
66
66
|
let models;
|
|
67
67
|
try {
|
|
68
|
-
const raw = (await client.get('/v1/models', { params: { kind: 'compile
|
|
68
|
+
const raw = (await client.get('/v1/models', { params: { kind: 'upstream,compile' } }));
|
|
69
69
|
models = (Array.isArray(raw) ? raw : (raw.data ?? []));
|
|
70
70
|
}
|
|
71
71
|
catch {
|
|
@@ -85,9 +85,13 @@ export default class BillingLlmCosts extends BaseCommand {
|
|
|
85
85
|
lines.push(`Compiling (${m.id}): $${per} per million source tokens compiled${markup}.` +
|
|
86
86
|
(plans.length > 0 ? ` Included each month: ${plans.join(', ')} tokens; past that, credits pay.` : ''));
|
|
87
87
|
}
|
|
88
|
-
else if (m.kind === '
|
|
89
|
-
const
|
|
90
|
-
lines.push(
|
|
88
|
+
else if (m.kind === 'upstream') {
|
|
89
|
+
const out = m.output_cost_per_million_tokens;
|
|
90
|
+
lines.push(`${m.id} on choices: $${per} per million input tokens${typeof out === 'number' ? `, $${out} per million output` : ''}${markup}.`);
|
|
91
|
+
const st = m.steering;
|
|
92
|
+
if (st && typeof st.input_cost_per_million_tokens === 'number') {
|
|
93
|
+
lines.push(`${m.id} steering chat and decisions: $${st.input_cost_per_million_tokens} per million input tokens plus $${st.cost_per_call_usd} a call, no output charge.`);
|
|
94
|
+
}
|
|
91
95
|
}
|
|
92
96
|
}
|
|
93
97
|
return lines.length > 0 ? ['', ...lines] : [];
|
|
@@ -3,7 +3,7 @@ import { FacesAPIError } from '../../../client.js';
|
|
|
3
3
|
import { allowanceLines, planName } from '../../../billing.js';
|
|
4
4
|
export default class BillingSubscription extends BaseCommand {
|
|
5
5
|
static description = 'Show your plan (free, connect or pro), renewal date, and on a paid plan how much of each ' +
|
|
6
|
-
'allowance is used:
|
|
6
|
+
'allowance is used: choices and steering over 5 hours, the week and the month, and compiling over the month';
|
|
7
7
|
static flags = {
|
|
8
8
|
...BaseCommand.baseFlags,
|
|
9
9
|
};
|
|
@@ -12,7 +12,7 @@ export default class CatalogDoctor extends BaseCommand {
|
|
|
12
12
|
...BaseCommand.baseFlags,
|
|
13
13
|
fix: Flags.boolean({ description: 'Rebuild missing or stale catalog entries from API', default: false }),
|
|
14
14
|
generate: Flags.boolean({
|
|
15
|
-
description: 'Retired
|
|
15
|
+
description: 'Retired. Write a description with faces face:edit <alias> --description.',
|
|
16
16
|
default: false,
|
|
17
17
|
hidden: true,
|
|
18
18
|
}),
|
|
@@ -21,7 +21,7 @@ export default class CatalogDoctor extends BaseCommand {
|
|
|
21
21
|
async run() {
|
|
22
22
|
const { flags } = await this.parse(CatalogDoctor);
|
|
23
23
|
if (flags.generate) {
|
|
24
|
-
this.error('--generate
|
|
24
|
+
this.error('--generate is retired. Nothing was sent.\n' +
|
|
25
25
|
'Write a description with: faces face:edit <alias> --description "..."\n' +
|
|
26
26
|
'To repair the catalog, which is free: faces catalog:doctor --fix');
|
|
27
27
|
}
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export default class
|
|
1
|
+
import { ChatCommand } from '../../chat-command.js';
|
|
2
|
+
export default class ChatChat extends ChatCommand {
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
|
+
static args: {
|
|
6
|
+
model: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
5
8
|
static flags: {
|
|
9
|
+
responses: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
6
10
|
session: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
7
11
|
compaction: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
'oauth-only': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
8
13
|
conversation: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
14
|
premise: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
15
|
'premise-description': import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
16
|
'premise-status': import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
17
|
'premise-depends-on': import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
+
'premise-role': import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
|
+
'premise-origin': import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
20
|
'causes-visible': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
14
21
|
message: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
22
|
file: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
option: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
21
|
-
level: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
22
|
-
id: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
23
|
-
'questions-file': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
23
|
+
system: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
24
|
+
stream: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
25
|
+
'max-tokens': import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
26
|
+
temperature: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
24
27
|
'base-url': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
25
28
|
token: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
26
29
|
'api-key': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
27
30
|
toon: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
28
31
|
};
|
|
29
|
-
|
|
30
|
-
face: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
31
|
-
};
|
|
32
|
-
run(): Promise<unknown>;
|
|
32
|
+
protected forcedEndpoint(flags: Record<string, unknown>): string | undefined;
|
|
33
33
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Args, Flags } from '@oclif/core';
|
|
2
|
+
import { BaseCommand } from '../../base.js';
|
|
3
|
+
import { RESPONSES_ENDPOINT, chatFlags, MODEL_ARG_DESCRIPTION } from '../../chat.js';
|
|
4
|
+
import { ChatCommand } from '../../chat-command.js';
|
|
5
|
+
export default class ChatChat extends ChatCommand {
|
|
6
|
+
static description = 'Chat with a face. Name the upstream model over the downstream model: @alice:maestro-1/gpt-5.4. The face ' +
|
|
7
|
+
'steers, and the downstream model writes the reply. Routes to /v1/chat/completions, /v1/responses or ' +
|
|
8
|
+
'/v1/messages from the model catalog (--responses forces /v1/responses). The face\'s style is chosen for ' +
|
|
9
|
+
'each request. Add --conversation to take the turn in a state (see faces state:create). The steering is ' +
|
|
10
|
+
'billed per input token plus a small fee per call (faces models:list --kind upstream), and the downstream ' +
|
|
11
|
+
'model at its listed price.';
|
|
12
|
+
static examples = [
|
|
13
|
+
'<%= config.bin %> <%= command.id %> @socrates:maestro-1/gpt-5.4 -m "What is virtue?"',
|
|
14
|
+
'<%= config.bin %> <%= command.id %> @head~socrates:maestro-1-flash/claude-sonnet-4-6 -m "What is virtue?"',
|
|
15
|
+
'<%= config.bin %> <%= command.id %> "(@socrates | @nietzsche):maestro-1/gpt-5.4" -m "What is virtue?"',
|
|
16
|
+
'<%= config.bin %> <%= command.id %> @alice:maestro-1/gpt-5.4 -m "So what do I tell them tomorrow?" --conversation fs_STATE_ID',
|
|
17
|
+
'<%= config.bin %> <%= command.id %> @alice:maestro-1/gpt-5.4 -m "Is this vendor worth a closer look?" --conversation fs_STATE_ID ' +
|
|
18
|
+
'--premise budget_usd=50000 --premise-description budget_usd="the most we can spend this year"',
|
|
19
|
+
];
|
|
20
|
+
static args = {
|
|
21
|
+
model: Args.string({ description: MODEL_ARG_DESCRIPTION, required: true }),
|
|
22
|
+
};
|
|
23
|
+
static flags = {
|
|
24
|
+
...BaseCommand.baseFlags,
|
|
25
|
+
...chatFlags(),
|
|
26
|
+
responses: Flags.boolean({ description: 'Send it to /v1/responses whatever the catalog says (routing is automatic otherwise).', default: false }),
|
|
27
|
+
};
|
|
28
|
+
forcedEndpoint(flags) {
|
|
29
|
+
return flags.responses ? RESPONSES_ENDPOINT : undefined;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ChatCommand } from '../../chat-command.js';
|
|
2
|
+
export default class ChatMessages extends ChatCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static args: {
|
|
6
|
+
model: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
static flags: {
|
|
9
|
+
session: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
compaction: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
'oauth-only': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
|
+
conversation: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
premise: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
'premise-description': import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
'premise-status': import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
'premise-depends-on': import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
'premise-role': import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
+
'premise-origin': import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
|
+
'causes-visible': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
20
|
+
message: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
21
|
+
file: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
22
|
+
system: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
23
|
+
stream: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
24
|
+
'max-tokens': import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
25
|
+
temperature: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
26
|
+
'base-url': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
27
|
+
token: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
28
|
+
'api-key': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
29
|
+
toon: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
30
|
+
};
|
|
31
|
+
protected forcedEndpoint(): string;
|
|
32
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Args } from '@oclif/core';
|
|
2
|
+
import { BaseCommand } from '../../base.js';
|
|
3
|
+
import { MESSAGES_ENDPOINT, chatFlags, MODEL_ARG_DESCRIPTION } from '../../chat.js';
|
|
4
|
+
import { ChatCommand } from '../../chat-command.js';
|
|
5
|
+
export default class ChatMessages extends ChatCommand {
|
|
6
|
+
static description = 'Chat with a face in the Anthropic Messages format (/v1/messages), whatever the model. chat:chat routes ' +
|
|
7
|
+
'Anthropic models here on its own. Name the model as for chat:chat: @alice:maestro-1/claude-sonnet-4-6.';
|
|
8
|
+
static examples = [
|
|
9
|
+
'<%= config.bin %> <%= command.id %> @socrates:maestro-1/claude-sonnet-4-6 -m "What is virtue?" --max-tokens 400',
|
|
10
|
+
];
|
|
11
|
+
static args = {
|
|
12
|
+
model: Args.string({ description: MODEL_ARG_DESCRIPTION, required: true }),
|
|
13
|
+
};
|
|
14
|
+
static flags = {
|
|
15
|
+
...BaseCommand.baseFlags,
|
|
16
|
+
...chatFlags(),
|
|
17
|
+
};
|
|
18
|
+
forcedEndpoint() {
|
|
19
|
+
return MESSAGES_ENDPOINT;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ChatCommand } from '../../chat-command.js';
|
|
2
|
+
export default class ChatResponses extends ChatCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static args: {
|
|
6
|
+
model: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
static flags: {
|
|
9
|
+
session: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
compaction: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
'oauth-only': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
|
+
conversation: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
premise: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
'premise-description': import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
'premise-status': import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
'premise-depends-on': import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
'premise-role': import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
+
'premise-origin': import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
|
+
'causes-visible': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
20
|
+
message: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
21
|
+
file: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
22
|
+
system: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
23
|
+
stream: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
24
|
+
'max-tokens': import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
25
|
+
temperature: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
26
|
+
'base-url': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
27
|
+
token: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
28
|
+
'api-key': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
29
|
+
toon: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
30
|
+
};
|
|
31
|
+
protected forcedEndpoint(): string;
|
|
32
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Args } from '@oclif/core';
|
|
2
|
+
import { BaseCommand } from '../../base.js';
|
|
3
|
+
import { RESPONSES_ENDPOINT, chatFlags, MODEL_ARG_DESCRIPTION } from '../../chat.js';
|
|
4
|
+
import { ChatCommand } from '../../chat-command.js';
|
|
5
|
+
export default class ChatResponses extends ChatCommand {
|
|
6
|
+
static description = 'Chat with a face in the OpenAI Responses format (/v1/responses). The same as chat:chat --responses. On ' +
|
|
7
|
+
'Connect and Pro with ChatGPT linked, Codex-eligible models (faces models:list --chatgpt) run on the ChatGPT plan.';
|
|
8
|
+
static examples = [
|
|
9
|
+
'<%= config.bin %> <%= command.id %> @socrates:maestro-1/gpt-5.4 -m "What is virtue?"',
|
|
10
|
+
'<%= config.bin %> <%= command.id %> @socrates:maestro-1/gpt-5.4 -m "What is virtue?" --oauth-only',
|
|
11
|
+
];
|
|
12
|
+
static args = {
|
|
13
|
+
model: Args.string({ description: MODEL_ARG_DESCRIPTION, required: true }),
|
|
14
|
+
};
|
|
15
|
+
static flags = {
|
|
16
|
+
...BaseCommand.baseFlags,
|
|
17
|
+
...chatFlags(),
|
|
18
|
+
};
|
|
19
|
+
forcedEndpoint() {
|
|
20
|
+
return RESPONSES_ENDPOINT;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base.js';
|
|
2
|
+
export default class ChatThread extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static flags: {
|
|
6
|
+
session: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
7
|
+
compaction: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
|
+
'oauth-only': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
9
|
+
list: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
show: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
delete: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
|
+
yes: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
13
|
+
conversation: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
premise: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
'premise-description': import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
'premise-status': import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
'premise-depends-on': import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
+
'premise-role': import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
|
+
'premise-origin': import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
20
|
+
'causes-visible': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
21
|
+
id: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
22
|
+
message: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
23
|
+
file: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
24
|
+
system: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
25
|
+
'max-tokens': import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
26
|
+
temperature: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
27
|
+
stream: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
28
|
+
'base-url': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
29
|
+
token: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
30
|
+
'api-key': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
31
|
+
toon: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
32
|
+
};
|
|
33
|
+
static args: {
|
|
34
|
+
model: import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
|
|
35
|
+
};
|
|
36
|
+
run(): Promise<unknown>;
|
|
37
|
+
private handleList;
|
|
38
|
+
private handleDelete;
|
|
39
|
+
private handleShow;
|
|
40
|
+
}
|