@makine/cli 0.6.4 → 0.8.1
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/agents/command.d.ts +49 -0
- package/dist/agents/command.d.ts.map +1 -0
- package/dist/agents/command.js +394 -0
- package/dist/agents/command.js.map +1 -0
- package/dist/contracts/command.js +10 -3
- package/dist/contracts/command.js.map +1 -1
- package/dist/gov-id/command.d.ts +35 -0
- package/dist/gov-id/command.d.ts.map +1 -0
- package/dist/gov-id/command.js +189 -0
- package/dist/gov-id/command.js.map +1 -0
- package/dist/index.d.ts +28 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +308 -7
- package/dist/index.js.map +1 -1
- package/dist/migrate/runtime-rules.d.ts.map +1 -1
- package/dist/migrate/runtime-rules.js +5 -1
- package/dist/migrate/runtime-rules.js.map +1 -1
- package/dist/quality/command.d.ts +1 -1
- package/dist/quality/command.d.ts.map +1 -1
- package/dist/quality/command.js +1 -1
- package/dist/quality/command.js.map +1 -1
- package/dist/receipts/command.d.ts +26 -2
- package/dist/receipts/command.d.ts.map +1 -1
- package/dist/receipts/command.js +91 -6
- package/dist/receipts/command.js.map +1 -1
- package/dist/runs/command.d.ts +48 -0
- package/dist/runs/command.d.ts.map +1 -0
- package/dist/runs/command.js +439 -0
- package/dist/runs/command.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export declare const RUNS_SUBCOMMANDS: readonly ["submit", "show", "download"];
|
|
2
|
+
export type RunsSubcommand = (typeof RUNS_SUBCOMMANDS)[number];
|
|
3
|
+
export declare const RUNS_DOWNLOAD_FORMATS: readonly ["md", "docx", "pdf"];
|
|
4
|
+
export type RunsDownloadFormat = (typeof RUNS_DOWNLOAD_FORMATS)[number];
|
|
5
|
+
export interface RunsInvocation {
|
|
6
|
+
subcommand: RunsSubcommand;
|
|
7
|
+
/** `show <task_id>` and `download <task_id>`. */
|
|
8
|
+
target?: string;
|
|
9
|
+
/** `download` only: which file to ask for. Markdown by default. */
|
|
10
|
+
format?: string;
|
|
11
|
+
/** `download` only: the file to write, or a directory to write the suggested name into. */
|
|
12
|
+
out?: string;
|
|
13
|
+
/** `download` only: replace whatever is already at that path. */
|
|
14
|
+
force?: boolean;
|
|
15
|
+
/** `submit` only: the executor to send to, and the contract its delivery is judged against. */
|
|
16
|
+
executor?: string;
|
|
17
|
+
contract?: string;
|
|
18
|
+
/** `submit` only: a path holding the run's input, already read by the caller. */
|
|
19
|
+
input?: string;
|
|
20
|
+
/** `submit` only: poll until the run settles. */
|
|
21
|
+
wait?: boolean;
|
|
22
|
+
/** `submit --wait` only: how long to poll before giving up. */
|
|
23
|
+
timeoutMinutes?: number;
|
|
24
|
+
json: boolean;
|
|
25
|
+
}
|
|
26
|
+
export interface RunsConnection {
|
|
27
|
+
baseUrl: string;
|
|
28
|
+
apiKey: string;
|
|
29
|
+
/** True when the credential came from `MAKINE_API_KEY` or `--api-key` rather than a session. */
|
|
30
|
+
explicitKey: boolean;
|
|
31
|
+
fetchImpl?: typeof fetch;
|
|
32
|
+
}
|
|
33
|
+
export interface RunsIo {
|
|
34
|
+
out: (line: string) => void;
|
|
35
|
+
err: (line: string) => void;
|
|
36
|
+
/** Injected so no test waits a real poll interval. */
|
|
37
|
+
sleep?: (milliseconds: number) => Promise<void>;
|
|
38
|
+
/** The clock the deadline is measured against, injected so no test waits one out. */
|
|
39
|
+
nowMs?: () => number;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* `not_accepted` is a verdict rather than a fault: Makine ran the task and no accepted delivery
|
|
43
|
+
* came back, which is what a CI step branches on.
|
|
44
|
+
*/
|
|
45
|
+
export type RunsOutcome = "ok" | "usage" | "not_accepted" | "refused" | "auth" | "unavailable";
|
|
46
|
+
export declare function runRuns(invocation: RunsInvocation, connection: RunsConnection, io: RunsIo): Promise<RunsOutcome>;
|
|
47
|
+
export declare function isRunsSubcommand(value: string): value is RunsSubcommand;
|
|
48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AAC;IAC5B,sDAAsD;IACtD,KAAK,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAChD,qFAAqF;IACrF,KAAK,CAAC,EAAE,MAAM,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,OAAO,GAAG,cAAc,GAAG,SAAS,GAAG,MAAM,GAAG,aAAa,CAAC;AA4E/F,wBAAsB,OAAO,CAC3B,UAAU,EAAE,cAAc,EAC1B,UAAU,EAAE,cAAc,EAC1B,EAAE,EAAE,MAAM,GACT,OAAO,CAAC,WAAW,CAAC,CAKtB;AA6cD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,cAAc,CAEvE"}
|
|
@@ -0,0 +1,439 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/**
|
|
3
|
+
* `makine runs`: send one task to a registered executor — a model step, a workflow step or an
|
|
4
|
+
* outside A2A agent — and read what came of it. `makine run` is the Gateway's chat-completion path
|
|
5
|
+
* and never reaches an agent; this is the Runner's `POST /runs`, where an `agent.` reference does.
|
|
6
|
+
*/
|
|
7
|
+
import { stat, writeFile } from "node:fs/promises";
|
|
8
|
+
import path from "node:path";
|
|
9
|
+
export const RUNS_SUBCOMMANDS = ["submit", "show", "download"];
|
|
10
|
+
export const RUNS_DOWNLOAD_FORMATS = ["md", "docx", "pdf"];
|
|
11
|
+
/** What the route answers with for each format; anything else is not the file that was asked for. */
|
|
12
|
+
const DOWNLOAD_MEDIA_TYPES = {
|
|
13
|
+
md: "text/markdown",
|
|
14
|
+
docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
15
|
+
pdf: "application/pdf",
|
|
16
|
+
};
|
|
17
|
+
const SIGN_IN_NOTE = "This needs a signed-in account. Run `makine login`.";
|
|
18
|
+
const API_KEY_OVERRIDES_LOGIN_NOTE = "MAKINE_API_KEY is set, and an explicit key is used in preference to a stored session. Unset it " +
|
|
19
|
+
"(or drop --api-key) and run `makine login`.";
|
|
20
|
+
/** The four the Task state machine calls terminal, plus the one that waits on a person. */
|
|
21
|
+
const SETTLED_STATES = [
|
|
22
|
+
"succeeded",
|
|
23
|
+
"failed",
|
|
24
|
+
"cancelled",
|
|
25
|
+
"rejected",
|
|
26
|
+
"awaiting_human",
|
|
27
|
+
];
|
|
28
|
+
const POLL_INTERVAL_MS = 2_000;
|
|
29
|
+
const DEFAULT_TIMEOUT_MINUTES = 30;
|
|
30
|
+
export async function runRuns(invocation, connection, io) {
|
|
31
|
+
const call = makeCall(connection);
|
|
32
|
+
if (invocation.subcommand === "submit")
|
|
33
|
+
return await submitRun(invocation, call, io, connection);
|
|
34
|
+
if (invocation.subcommand === "download")
|
|
35
|
+
return await downloadRun(invocation, io, connection);
|
|
36
|
+
return await showRun(invocation, call, io, connection);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* `makine runs download <task_id>`: the run's answer as a file, from the same route the dashboard
|
|
40
|
+
* reads. It needs `makine login`, as reading a run's answer does; a workspace key is refused by the
|
|
41
|
+
* route and reported here.
|
|
42
|
+
*/
|
|
43
|
+
async function downloadRun(invocation, io, connection) {
|
|
44
|
+
const taskId = invocation.target?.trim();
|
|
45
|
+
if (taskId === undefined || taskId.length === 0) {
|
|
46
|
+
io.err("`makine runs download` needs a task id, the one `makine runs submit` printed.");
|
|
47
|
+
return "usage";
|
|
48
|
+
}
|
|
49
|
+
const format = invocation.format ?? "md";
|
|
50
|
+
if (!isDownloadFormat(format)) {
|
|
51
|
+
io.err(`\`--format\` takes one of ${RUNS_DOWNLOAD_FORMATS.join(", ")}.`);
|
|
52
|
+
return "usage";
|
|
53
|
+
}
|
|
54
|
+
const send = connection.fetchImpl ?? fetch;
|
|
55
|
+
const url = `${connection.baseUrl.replace(/\/+$/, "")}/tasks/${encodeURIComponent(taskId)}/source?format=${format}`;
|
|
56
|
+
let response;
|
|
57
|
+
try {
|
|
58
|
+
response = await send(url, {
|
|
59
|
+
method: "GET",
|
|
60
|
+
redirect: "manual",
|
|
61
|
+
headers: { authorization: `Bearer ${connection.apiKey}` },
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
catch (error) {
|
|
65
|
+
return report(io, {
|
|
66
|
+
ok: false,
|
|
67
|
+
status: 0,
|
|
68
|
+
code: "unreachable",
|
|
69
|
+
message: `Could not reach Makine: ${error instanceof Error ? error.message : String(error)}`,
|
|
70
|
+
}, connection);
|
|
71
|
+
}
|
|
72
|
+
if (!response.ok) {
|
|
73
|
+
let parsed;
|
|
74
|
+
try {
|
|
75
|
+
parsed = await response.json();
|
|
76
|
+
}
|
|
77
|
+
catch {
|
|
78
|
+
parsed = undefined;
|
|
79
|
+
}
|
|
80
|
+
const error = parsed?.error ?? {};
|
|
81
|
+
return report(io, {
|
|
82
|
+
ok: false,
|
|
83
|
+
status: response.status,
|
|
84
|
+
code: error.code ?? "unexpected_error",
|
|
85
|
+
message: error.message ?? `Makine answered ${String(response.status)}.`,
|
|
86
|
+
}, connection);
|
|
87
|
+
}
|
|
88
|
+
// The API's address without `/api` reaches the dashboard, which answers 200 with a page. Without
|
|
89
|
+
// this the page would be saved as if it were the answer.
|
|
90
|
+
const essence = (response.headers.get("content-type") ?? "").split(";")[0].trim().toLowerCase();
|
|
91
|
+
if (essence !== DOWNLOAD_MEDIA_TYPES[format]) {
|
|
92
|
+
io.err(wrongAddressLine(connection.baseUrl));
|
|
93
|
+
return "unavailable";
|
|
94
|
+
}
|
|
95
|
+
const suggested = suggestedFileName(response.headers.get("content-disposition"), format);
|
|
96
|
+
const target = path.resolve(await downloadTarget(invocation.out, suggested));
|
|
97
|
+
const bytes = Buffer.from(await response.arrayBuffer());
|
|
98
|
+
try {
|
|
99
|
+
// An exclusive create, so a file — or a link — already at that path is never followed or lost.
|
|
100
|
+
await writeFile(target, bytes, { flag: invocation.force === true ? "w" : "wx" });
|
|
101
|
+
}
|
|
102
|
+
catch (error) {
|
|
103
|
+
const failed = error;
|
|
104
|
+
io.err(failed.code === "EEXIST"
|
|
105
|
+
? `${target} is already there. Pass --force to replace it, or --out to name another file.`
|
|
106
|
+
: `Could not write ${target}: ${error instanceof Error ? error.message : String(error)}`);
|
|
107
|
+
return "usage";
|
|
108
|
+
}
|
|
109
|
+
io.out(target);
|
|
110
|
+
return "ok";
|
|
111
|
+
}
|
|
112
|
+
function isDownloadFormat(value) {
|
|
113
|
+
return RUNS_DOWNLOAD_FORMATS.includes(value);
|
|
114
|
+
}
|
|
115
|
+
/** `--out` names the file to write, or an existing directory to write the suggested name into. */
|
|
116
|
+
async function downloadTarget(out, suggested) {
|
|
117
|
+
if (out === undefined)
|
|
118
|
+
return suggested;
|
|
119
|
+
const found = await stat(out).catch(() => undefined);
|
|
120
|
+
return found?.isDirectory() === true ? path.join(out, suggested) : out;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* The ASCII `filename=` the route suggests, reduced to its last path part: nothing a server sends
|
|
124
|
+
* may name a file outside the directory this command was told to write in.
|
|
125
|
+
*/
|
|
126
|
+
function suggestedFileName(header, format) {
|
|
127
|
+
const fallback = `answer.${format}`;
|
|
128
|
+
const found = header === null ? null : /;\s*filename\s*=\s*(?:"([^"]*)"|([^;]*))/iu.exec(header);
|
|
129
|
+
const raw = (found?.[1] ?? found?.[2] ?? "").trim();
|
|
130
|
+
const name = path.posix.basename(raw.replace(/\\/gu, "/"));
|
|
131
|
+
return name.length === 0 || name === "." || name === ".." ? fallback : name;
|
|
132
|
+
}
|
|
133
|
+
/** `<id>@<version>`, split at the last `@` so a contract id holding one still resolves. */
|
|
134
|
+
function parseContract(value) {
|
|
135
|
+
const at = value.lastIndexOf("@");
|
|
136
|
+
const id = at === -1 ? "" : value.slice(0, at).trim();
|
|
137
|
+
const version = at === -1 ? "" : value.slice(at + 1).trim();
|
|
138
|
+
if (id.length === 0 || version.length === 0) {
|
|
139
|
+
return {
|
|
140
|
+
ok: false,
|
|
141
|
+
message: `\`--contract ${value}\` is not \`<id>@<version>\`. \`makine contracts list\` prints both.`,
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
return { ok: true, id, version };
|
|
145
|
+
}
|
|
146
|
+
async function submitRun(invocation, call, io, connection) {
|
|
147
|
+
const executor = invocation.executor;
|
|
148
|
+
if (executor === undefined || executor.trim().length === 0) {
|
|
149
|
+
io.err("`makine runs submit` needs --executor <ref>. `makine agents list` prints an agent's, and `makine workflows list` a step's.");
|
|
150
|
+
return "usage";
|
|
151
|
+
}
|
|
152
|
+
if (invocation.contract === undefined || invocation.contract.trim().length === 0) {
|
|
153
|
+
io.err("`makine runs submit` needs --contract <id>@<version>.");
|
|
154
|
+
return "usage";
|
|
155
|
+
}
|
|
156
|
+
const contract = parseContract(invocation.contract);
|
|
157
|
+
if (!contract.ok) {
|
|
158
|
+
io.err(contract.message);
|
|
159
|
+
return "usage";
|
|
160
|
+
}
|
|
161
|
+
if (invocation.input === undefined || invocation.input.trim().length === 0) {
|
|
162
|
+
io.err("`makine runs submit` needs --input <file.json>, the input the executor works on.");
|
|
163
|
+
return "usage";
|
|
164
|
+
}
|
|
165
|
+
let value;
|
|
166
|
+
try {
|
|
167
|
+
value = JSON.parse(invocation.input);
|
|
168
|
+
}
|
|
169
|
+
catch (error) {
|
|
170
|
+
io.err(`--input is not JSON: ${error instanceof Error ? error.message : String(error)}`);
|
|
171
|
+
return "usage";
|
|
172
|
+
}
|
|
173
|
+
const result = await call("POST", "/runs", {
|
|
174
|
+
executor_ref: executor.trim(),
|
|
175
|
+
acceptance_contract_id: contract.id,
|
|
176
|
+
acceptance_contract_version: contract.version,
|
|
177
|
+
input: { kind: "inline_json", value },
|
|
178
|
+
});
|
|
179
|
+
if (!result.ok)
|
|
180
|
+
return report(io, result, connection);
|
|
181
|
+
const submitted = result.body;
|
|
182
|
+
if (invocation.wait !== true) {
|
|
183
|
+
if (invocation.json) {
|
|
184
|
+
io.out(JSON.stringify(submitted, null, 2));
|
|
185
|
+
return "ok";
|
|
186
|
+
}
|
|
187
|
+
io.err(`Submitted to ${executor.trim()}. Read it with \`makine runs show ${submitted.task_id}\`.`);
|
|
188
|
+
io.out(submitted.task_id);
|
|
189
|
+
return "ok";
|
|
190
|
+
}
|
|
191
|
+
return await waitForTask(invocation, call, io, connection, submitted.task_id);
|
|
192
|
+
}
|
|
193
|
+
async function waitForTask(invocation, call, io, connection, taskId) {
|
|
194
|
+
const sleep = io.sleep ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
|
|
195
|
+
const nowMs = io.nowMs ?? (() => Date.now());
|
|
196
|
+
const startedAt = nowMs();
|
|
197
|
+
const timeoutMs = (invocation.timeoutMinutes ?? DEFAULT_TIMEOUT_MINUTES) * 60_000;
|
|
198
|
+
const elapsed = () => Math.round((nowMs() - startedAt) / 1000);
|
|
199
|
+
for (;;) {
|
|
200
|
+
const read = await call("GET", `/tasks/${encodeURIComponent(taskId)}`);
|
|
201
|
+
if (!read.ok)
|
|
202
|
+
return report(io, read, connection);
|
|
203
|
+
const task = read.body;
|
|
204
|
+
if (SETTLED_STATES.includes(task.state)) {
|
|
205
|
+
return renderTask(invocation, io, task, await readRunFigures(invocation, call, taskId));
|
|
206
|
+
}
|
|
207
|
+
if (nowMs() - startedAt >= timeoutMs) {
|
|
208
|
+
// The run is still going; a second submit would create a second run, so the task id is what
|
|
209
|
+
// this prints rather than a retry.
|
|
210
|
+
io.err(`Still ${task.state} after ${String(elapsed())}s, and this command waited as long as it was asked to. The run continues; read it with \`makine runs show ${taskId}\`.`);
|
|
211
|
+
io.out(taskId);
|
|
212
|
+
return "not_accepted";
|
|
213
|
+
}
|
|
214
|
+
io.err(`${task.state}: ${String(elapsed())}s elapsed.`);
|
|
215
|
+
await sleep(POLL_INTERVAL_MS);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
async function showRun(invocation, call, io, connection) {
|
|
219
|
+
const target = invocation.target;
|
|
220
|
+
if (target === undefined || target.trim().length === 0) {
|
|
221
|
+
io.err("`makine runs show` needs a task id, the one `makine runs submit` printed.");
|
|
222
|
+
return "usage";
|
|
223
|
+
}
|
|
224
|
+
const taskId = target.trim();
|
|
225
|
+
const read = await call("GET", `/tasks/${encodeURIComponent(taskId)}`);
|
|
226
|
+
if (!read.ok)
|
|
227
|
+
return report(io, read, connection);
|
|
228
|
+
return renderTask(invocation, io, read.body, await readRunFigures(invocation, call, taskId));
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* The run's own view, for the tools and the cost the task route does not carry. A read that does
|
|
232
|
+
* not answer prints nothing and changes no exit code: what the run did is the task's own state,
|
|
233
|
+
* and a second read failing must not report the run differently.
|
|
234
|
+
*/
|
|
235
|
+
async function readRunFigures(invocation, call, taskId) {
|
|
236
|
+
// `--json` prints the task body as the API sent it, so it makes no second request.
|
|
237
|
+
if (invocation.json)
|
|
238
|
+
return undefined;
|
|
239
|
+
const read = await call("GET", `/tasks/${encodeURIComponent(taskId)}/live-run`);
|
|
240
|
+
if (!read.ok || typeof read.body !== "object" || read.body === null)
|
|
241
|
+
return undefined;
|
|
242
|
+
return read.body;
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* One rendering for both subcommands, so the state a `--wait` ends on and the state a later `show`
|
|
246
|
+
* prints are worded identically.
|
|
247
|
+
*/
|
|
248
|
+
function renderTask(invocation, io, task, figures) {
|
|
249
|
+
if (invocation.json) {
|
|
250
|
+
io.out(JSON.stringify(task, null, 2));
|
|
251
|
+
}
|
|
252
|
+
else {
|
|
253
|
+
io.out(`${task.task_id}\t${task.state}`);
|
|
254
|
+
if (task.outcome_kind !== undefined)
|
|
255
|
+
io.out(` outcome ${task.outcome_kind}`);
|
|
256
|
+
const failure = readFailureSummary(task);
|
|
257
|
+
if (failure !== undefined)
|
|
258
|
+
io.out(` why ${failure}`);
|
|
259
|
+
if (task.state === "awaiting_human") {
|
|
260
|
+
io.out(" Parked for a person. `makine reviews list` shows the queue.");
|
|
261
|
+
}
|
|
262
|
+
// What the run bought and what it spent, to the figures the dashboard shows for the same run.
|
|
263
|
+
for (const toolCall of figures?.research ?? []) {
|
|
264
|
+
const line = paidToolLine(toolCall);
|
|
265
|
+
if (line !== undefined)
|
|
266
|
+
io.out(` tool ${line}`);
|
|
267
|
+
}
|
|
268
|
+
const cost = costLine(figures?.run_cost);
|
|
269
|
+
if (cost !== undefined)
|
|
270
|
+
io.out(` cost ${cost}`);
|
|
271
|
+
// Advice, printed after the outcome because it never changed it.
|
|
272
|
+
for (const hint of task.gov_id_hints ?? []) {
|
|
273
|
+
io.out(` hint ${hintLine(hint)}`);
|
|
274
|
+
}
|
|
275
|
+
// The same advice the dashboard shows beside a document, in the server's own words.
|
|
276
|
+
for (const document of task.documents ?? []) {
|
|
277
|
+
for (const hint of document.sensitive_hints ?? []) {
|
|
278
|
+
const line = sensitiveLine(hint);
|
|
279
|
+
if (line !== undefined)
|
|
280
|
+
io.out(` hint ${line}`);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
// The same: nothing here stopped or failed the run. Stopping an app is a press of its own,
|
|
284
|
+
// and the dashboard is where it is (docs/developers/cli-and-dashboard.md).
|
|
285
|
+
for (const unusual of task.unusual_activity ?? []) {
|
|
286
|
+
io.out(` hint ${unusualLine(unusual)}`);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
// `succeeded` is the one state an accepted delivery leaves. A run still going lands here too,
|
|
290
|
+
// and is `no accepted result` for the same reason a rejected one is: none came back.
|
|
291
|
+
return task.state === "succeeded" ? "ok" : "not_accepted";
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* One tool Makine bought for this run, with its supplier and the price charged — the supplier's
|
|
295
|
+
* price plus Makine's markup, which is the figure the allowance was drawn by. A call with no
|
|
296
|
+
* supplier is Makine's own tool and has no line here; a call nobody was charged for says so.
|
|
297
|
+
*/
|
|
298
|
+
function paidToolLine(call) {
|
|
299
|
+
if (typeof call.provider !== "string" || call.provider.length === 0)
|
|
300
|
+
return undefined;
|
|
301
|
+
const name = call.display_name ?? call.tool ?? "tool";
|
|
302
|
+
const charge = call.cost?.status === "available" && typeof call.cost.amount === "number"
|
|
303
|
+
? usd(call.cost.amount)
|
|
304
|
+
: call.state === "refused"
|
|
305
|
+
? "refused"
|
|
306
|
+
: "no charge";
|
|
307
|
+
return `${name} · ${call.provider} · ${charge}`;
|
|
308
|
+
}
|
|
309
|
+
/** What the run spent in full, and the parts the allowance charges it in. */
|
|
310
|
+
function costLine(cost) {
|
|
311
|
+
if (cost === undefined || typeof cost.total_usd !== "number")
|
|
312
|
+
return undefined;
|
|
313
|
+
const parts = [];
|
|
314
|
+
const add = (label, part) => {
|
|
315
|
+
if (typeof part?.amount_usd === "number")
|
|
316
|
+
parts.push(`${label} ${usd(part.amount_usd)}`);
|
|
317
|
+
};
|
|
318
|
+
add("model", cost.model);
|
|
319
|
+
add("search", cost.search);
|
|
320
|
+
add("tools", cost.tools);
|
|
321
|
+
add("gateway fee", cost.gateway_fee);
|
|
322
|
+
const total = usd(cost.total_usd);
|
|
323
|
+
return parts.length === 0 ? total : `${total} — ${parts.join(", ")}`;
|
|
324
|
+
}
|
|
325
|
+
/** Four places, the precision a per-call tool price is quoted at. */
|
|
326
|
+
function usd(amount) {
|
|
327
|
+
return `$${amount.toFixed(4)}`;
|
|
328
|
+
}
|
|
329
|
+
/** The hint's own sentence where Makine supplied one, so the CLI and the dashboard read alike. */
|
|
330
|
+
function hintLine(hint) {
|
|
331
|
+
if (typeof hint.message === "string" && hint.message.length > 0)
|
|
332
|
+
return hint.message;
|
|
333
|
+
const identifier = [hint.country, hint.label].filter((part) => part !== undefined).join(" ");
|
|
334
|
+
return `This input may contain a ${identifier}, in ${hint.where ?? "the input"}.`;
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* What a document may be carrying, in the server's words. A hint with no label says nothing a
|
|
338
|
+
* person can act on, so it prints nothing rather than naming the kind on its own.
|
|
339
|
+
*/
|
|
340
|
+
function sensitiveLine(hint) {
|
|
341
|
+
return typeof hint.label === "string" && hint.label.length > 0 ? hint.label : undefined;
|
|
342
|
+
}
|
|
343
|
+
/** The server's own sentence, so the CLI and the dashboard say the same thing about one run. */
|
|
344
|
+
function unusualLine(unusual) {
|
|
345
|
+
if (typeof unusual.message === "string" && unusual.message.length > 0)
|
|
346
|
+
return unusual.message;
|
|
347
|
+
const app = unusual.display_name ?? unusual.service ?? "an app";
|
|
348
|
+
return `${unusual.operation ?? "Changes"} in ${app}: ${String(unusual.changes ?? 0)} this run; most before: ${String(unusual.most_before ?? 0)}`;
|
|
349
|
+
}
|
|
350
|
+
function readFailureSummary(task) {
|
|
351
|
+
if (task.outcome_kind !== "structured_failure")
|
|
352
|
+
return undefined;
|
|
353
|
+
const summary = task.outcome?.failure_summary;
|
|
354
|
+
if (summary === undefined)
|
|
355
|
+
return undefined;
|
|
356
|
+
const parts = [summary.failure_class, summary.human_message].filter((part) => typeof part === "string" && part.length > 0);
|
|
357
|
+
return parts.length === 0 ? undefined : parts.join(" — ");
|
|
358
|
+
}
|
|
359
|
+
const ANSWER_NOT_JSON = "answer_not_json";
|
|
360
|
+
// The API's address without `/api` reaches the dashboard, which answers 200 with a page. Reading
|
|
361
|
+
// that as a result is what this guards; `agents` and `receipts` guard it the same way.
|
|
362
|
+
function isJson(contentType) {
|
|
363
|
+
if (contentType === null)
|
|
364
|
+
return false;
|
|
365
|
+
const essence = contentType.split(";")[0].trim().toLowerCase();
|
|
366
|
+
return essence === "application/json" || essence.endsWith("+json");
|
|
367
|
+
}
|
|
368
|
+
function wrongAddressLine(baseUrl) {
|
|
369
|
+
return `${baseUrl} answered with a page, not JSON. A Makine address ends in /api.`;
|
|
370
|
+
}
|
|
371
|
+
function makeCall(connection) {
|
|
372
|
+
const send = connection.fetchImpl ?? fetch;
|
|
373
|
+
return async (method, path, payload) => {
|
|
374
|
+
let response;
|
|
375
|
+
try {
|
|
376
|
+
response = await send(`${connection.baseUrl.replace(/\/+$/, "")}${path}`, {
|
|
377
|
+
method,
|
|
378
|
+
redirect: "manual",
|
|
379
|
+
headers: {
|
|
380
|
+
authorization: `Bearer ${connection.apiKey}`,
|
|
381
|
+
...(payload === undefined ? {} : { "content-type": "application/json" }),
|
|
382
|
+
},
|
|
383
|
+
...(payload === undefined ? {} : { body: JSON.stringify(payload) }),
|
|
384
|
+
});
|
|
385
|
+
}
|
|
386
|
+
catch (error) {
|
|
387
|
+
return {
|
|
388
|
+
ok: false,
|
|
389
|
+
status: 0,
|
|
390
|
+
code: "unreachable",
|
|
391
|
+
message: `Could not reach Makine: ${error instanceof Error ? error.message : String(error)}`,
|
|
392
|
+
};
|
|
393
|
+
}
|
|
394
|
+
if (response.ok && !isJson(response.headers.get("content-type"))) {
|
|
395
|
+
return {
|
|
396
|
+
ok: false,
|
|
397
|
+
status: response.status,
|
|
398
|
+
code: ANSWER_NOT_JSON,
|
|
399
|
+
message: wrongAddressLine(connection.baseUrl),
|
|
400
|
+
};
|
|
401
|
+
}
|
|
402
|
+
let parsed;
|
|
403
|
+
try {
|
|
404
|
+
parsed = await response.json();
|
|
405
|
+
}
|
|
406
|
+
catch {
|
|
407
|
+
parsed = undefined;
|
|
408
|
+
}
|
|
409
|
+
if (!response.ok) {
|
|
410
|
+
const error = parsed?.error ?? {};
|
|
411
|
+
return {
|
|
412
|
+
ok: false,
|
|
413
|
+
status: response.status,
|
|
414
|
+
code: error.code ?? "unexpected_error",
|
|
415
|
+
message: error.message ?? `Makine answered ${String(response.status)}.`,
|
|
416
|
+
};
|
|
417
|
+
}
|
|
418
|
+
return { ok: true, body: parsed };
|
|
419
|
+
};
|
|
420
|
+
}
|
|
421
|
+
function report(io, result, connection) {
|
|
422
|
+
io.err(result.message);
|
|
423
|
+
if (result.code === ANSWER_NOT_JSON)
|
|
424
|
+
return "unavailable";
|
|
425
|
+
if (result.code === "sign_in_required") {
|
|
426
|
+
io.err(connection.explicitKey ? API_KEY_OVERRIDES_LOGIN_NOTE : SIGN_IN_NOTE);
|
|
427
|
+
}
|
|
428
|
+
if (result.status === 0)
|
|
429
|
+
return "unavailable";
|
|
430
|
+
if (result.status === 401 || result.status === 403)
|
|
431
|
+
return "auth";
|
|
432
|
+
if (result.status >= 500)
|
|
433
|
+
return "unavailable";
|
|
434
|
+
return "refused";
|
|
435
|
+
}
|
|
436
|
+
export function isRunsSubcommand(value) {
|
|
437
|
+
return RUNS_SUBCOMMANDS.includes(value);
|
|
438
|
+
}
|
|
439
|
+
//# sourceMappingURL=command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command.js","sourceRoot":"","sources":["../../src/runs/command.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAE9B;;;;GAIG;AAEH,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,CAAU,CAAC;AAIxE,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAU,CAAC;AAIpE,qGAAqG;AACrG,MAAM,oBAAoB,GAAiD;IACzE,EAAE,EAAE,eAAe;IACnB,IAAI,EAAE,yEAAyE;IAC/E,GAAG,EAAE,iBAAiB;CACvB,CAAC;AAEF,MAAM,YAAY,GAAG,qDAAqD,CAAC;AAE3E,MAAM,4BAA4B,GAChC,iGAAiG;IACjG,6CAA6C,CAAC;AAEhD,2FAA2F;AAC3F,MAAM,cAAc,GAAsB;IACxC,WAAW;IACX,QAAQ;IACR,WAAW;IACX,UAAU;IACV,gBAAgB;CACjB,CAAC;AAEF,MAAM,gBAAgB,GAAG,KAAK,CAAC;AAC/B,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAyHnC,MAAM,CAAC,KAAK,UAAU,OAAO,CAC3B,UAA0B,EAC1B,UAA0B,EAC1B,EAAU;IAEV,MAAM,IAAI,GAAG,QAAQ,CAA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AAC,CAAC,CAAC,YAAY,CAAC,CAAC;IAC/E,CAAC;IACD,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,aAAa,CAAC;IAC9C,IAAI,MAAM,CAAC,MAAM,KAAK,GAAG,IAAI,MAAM,CAAC,MAAM,KAAK,GAAG;QAAE,OAAO,MAAM,CAAC;IAClE,IAAI,MAAM,CAAC,MAAM,IAAI,GAAG;QAAE,OAAO,aAAa,CAAC;IAC/C,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,KAAa;IAC5C,OAAQ,gBAAsC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AACjE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@makine/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "The makine command line: send a prompt to a Makine Gateway, list its models, and translate a Portkey or LiteLLM config into makine.env settings.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"repository": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"access": "public"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@makine/sdk": "0.
|
|
29
|
+
"@makine/sdk": "0.8.1",
|
|
30
30
|
"undici": "7.29.0",
|
|
31
31
|
"yaml": "2.9.0"
|
|
32
32
|
},
|