@makine/cli 0.6.4 → 0.7.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/dist/agents/command.d.ts +49 -0
- package/dist/agents/command.d.ts.map +1 -0
- package/dist/agents/command.js +368 -0
- package/dist/agents/command.js.map +1 -0
- package/dist/gov-id/command.d.ts +34 -0
- package/dist/gov-id/command.d.ts.map +1 -0
- package/dist/gov-id/command.js +170 -0
- package/dist/gov-id/command.js.map +1 -0
- package/dist/index.d.ts +24 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +276 -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 +74 -6
- package/dist/receipts/command.js.map +1 -1
- package/dist/runs/command.d.ts +45 -0
- package/dist/runs/command.d.ts.map +1 -0
- package/dist/runs/command.js +224 -0
- package/dist/runs/command.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command.js","sourceRoot":"","sources":["../../src/gov-id/command.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAE9B;;;;;;GAMG;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,WAAW,CAAU,CAAC;AAuC1F,MAAM,CAAC,KAAK,UAAU,QAAQ,CAC5B,UAA2B,EAC3B,UAA2B,EAC3B,EAAW;IAEX,IAAI,CAAC;QACH,QAAQ,UAAU,CAAC,UAAU,EAAE,CAAC;YAC9B,KAAK,MAAM;gBACT,OAAO,MAAM,SAAS,CAAC,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,KAAK,CAAC,CAAC;AACnE,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -3,12 +3,15 @@ import { type BaselineSubcommand } from "./baseline/command.js";
|
|
|
3
3
|
import { type ChallengerAction, type ContractSubcommand } from "./contracts/command.js";
|
|
4
4
|
import { type UseCaseSubcommand } from "./use-cases/command.js";
|
|
5
5
|
import { type JudgeSubcommand } from "./judge/command.js";
|
|
6
|
+
import { type GovIdSubcommand } from "./gov-id/command.js";
|
|
6
7
|
import { type ReceiptsSubcommand } from "./receipts/command.js";
|
|
7
8
|
import { type SuggestionsSubcommand } from "./suggestions/command.js";
|
|
8
9
|
import { type DiagnosisSubcommand } from "./diagnosis/command.js";
|
|
9
10
|
import { type KeysSubcommand } from "./keys/command.js";
|
|
10
11
|
import { type ConnectionsSubcommand } from "./connections/command.js";
|
|
11
12
|
import { type WorkflowsSubcommand } from "./workflows/command.js";
|
|
13
|
+
import { type AgentsSubcommand } from "./agents/command.js";
|
|
14
|
+
import { type RunsSubcommand } from "./runs/command.js";
|
|
12
15
|
import { type ReviewAction } from "./reviews/command.js";
|
|
13
16
|
/**
|
|
14
17
|
* Exit codes are the CLI's contract with scripts. `RESULT_NOT_ACCEPTED` is a verdict, not a fault:
|
|
@@ -79,7 +82,7 @@ export interface ConfirmationInput extends NodeJS.ReadableStream {
|
|
|
79
82
|
*/
|
|
80
83
|
export declare function readConfirmationLine(prompt: string, stream?: ConfirmationInput): Promise<string>;
|
|
81
84
|
interface ParsedArgs {
|
|
82
|
-
command: "run" | "accept" | "quality" | "models" | "contracts" | "use-cases" | "judge" | "receipts" | "suggestions" | "diagnosis" | "keys" | "connections" | "workflows" | "baseline" | "datasets" | "experiments" | "corrections" | "reviews" | "migrate" | "login" | "logout" | "help" | "version";
|
|
85
|
+
command: "run" | "runs" | "agents" | "accept" | "quality" | "models" | "contracts" | "use-cases" | "judge" | "gov-id" | "receipts" | "suggestions" | "diagnosis" | "keys" | "connections" | "workflows" | "baseline" | "datasets" | "experiments" | "corrections" | "reviews" | "migrate" | "login" | "logout" | "help" | "version";
|
|
83
86
|
/**
|
|
84
87
|
* `contracts` only: `list`, `show`, `create`, `activate`, `deactivate`, `revert` or
|
|
85
88
|
* `challengers`.
|
|
@@ -95,7 +98,7 @@ interface ParsedArgs {
|
|
|
95
98
|
includeRetired?: boolean;
|
|
96
99
|
/** `models` only: list the names this workspace's application called, with their counts. */
|
|
97
100
|
used?: boolean;
|
|
98
|
-
/** `receipts` only: `trust`, `verify` or `
|
|
101
|
+
/** `receipts` only: `trust`, `verify`, `issuers` or `show`. */
|
|
99
102
|
receiptsSubcommand?: ReceiptsSubcommand;
|
|
100
103
|
/** `receipts` only: the issuer name, the anchor, and the file to verify. */
|
|
101
104
|
issuer?: string;
|
|
@@ -103,8 +106,17 @@ interface ParsedArgs {
|
|
|
103
106
|
fromFile?: string;
|
|
104
107
|
refresh?: boolean;
|
|
105
108
|
receiptFile?: string;
|
|
109
|
+
/** `receipts show` only: the run whose receipt to read, and where to write it. */
|
|
110
|
+
receiptTaskId?: string;
|
|
111
|
+
out?: string;
|
|
106
112
|
/** `judge` only: `show`, `enable` or `disable`. */
|
|
107
113
|
judgeSubcommand?: JudgeSubcommand;
|
|
114
|
+
/** `gov-id` only: `show`, `acknowledge`, `revoke` or `detection`. */
|
|
115
|
+
govIdSubcommand?: GovIdSubcommand;
|
|
116
|
+
/** `gov-id acknowledge|revoke` only: the vendor a call's address resolves to. */
|
|
117
|
+
govIdVendor?: string;
|
|
118
|
+
/** `gov-id detection` only: `on` or `off`. */
|
|
119
|
+
govIdDetection?: string;
|
|
108
120
|
/** `suggestions` only. */
|
|
109
121
|
suggestionsSubcommand?: SuggestionsSubcommand;
|
|
110
122
|
/** `suggestions draft` only: which kinds to ask for; absent means every kind. */
|
|
@@ -121,6 +133,16 @@ interface ParsedArgs {
|
|
|
121
133
|
connectionsSubcommand?: ConnectionsSubcommand;
|
|
122
134
|
/** `workflows` only. */
|
|
123
135
|
workflowsSubcommand?: WorkflowsSubcommand;
|
|
136
|
+
/** `agents` only. */
|
|
137
|
+
agentsSubcommand?: AgentsSubcommand;
|
|
138
|
+
/** `agents register` only: one `<role>:<artifact_type>[:<artifact_name>]` per `--artifact`. */
|
|
139
|
+
artifacts?: string[];
|
|
140
|
+
/** `agents register` only: read the agent's credential from standard input. */
|
|
141
|
+
credentialStdin?: boolean;
|
|
142
|
+
/** `runs` only. */
|
|
143
|
+
runsSubcommand?: RunsSubcommand;
|
|
144
|
+
/** `runs submit` only: which executor the task is sent to. */
|
|
145
|
+
executor?: string;
|
|
124
146
|
/** `workflows credential` and `workflows define`: which header the credential is sent in. */
|
|
125
147
|
header?: string;
|
|
126
148
|
/** `workflows approve-host` only: the explicit acknowledgement the route requires. */
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,OAAO,EAQL,KAAK,kBAAkB,EACxB,MAAM,aAAa,CAAC;AAErB,OAAO,EAIL,KAAK,kBAAkB,EACxB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAIL,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EAGxB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAGL,KAAK,iBAAiB,EAEvB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAIL,KAAK,eAAe,EACrB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,OAAO,EAQL,KAAK,kBAAkB,EACxB,MAAM,aAAa,CAAC;AAErB,OAAO,EAIL,KAAK,kBAAkB,EACxB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAIL,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EAGxB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAGL,KAAK,iBAAiB,EAEvB,MAAM,wBAAwB,CAA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 +12,15 @@ import { BASELINE_SUBCOMMANDS, runBaseline, } from "./baseline/command.js";
|
|
|
12
12
|
import { CHALLENGER_ACTIONS, CONTRACT_SUBCOMMANDS, runContracts, } from "./contracts/command.js";
|
|
13
13
|
import { USE_CASE_SUBCOMMANDS, runUseCases, } from "./use-cases/command.js";
|
|
14
14
|
import { JUDGE_SUBCOMMANDS, runJudge, } from "./judge/command.js";
|
|
15
|
-
import {
|
|
15
|
+
import { GOV_ID_SUBCOMMANDS, isGovIdSubcommand, runGovId, } from "./gov-id/command.js";
|
|
16
|
+
import { runReceipts, runReceiptsShow, RECEIPTS_SUBCOMMANDS, } from "./receipts/command.js";
|
|
16
17
|
import { SUGGESTIONS_SUBCOMMANDS, runSuggestions, } from "./suggestions/command.js";
|
|
17
18
|
import { DIAGNOSIS_SUBCOMMANDS, runDiagnosis, } from "./diagnosis/command.js";
|
|
18
19
|
import { KEYS_SUBCOMMANDS, runKeys, } from "./keys/command.js";
|
|
19
20
|
import { CONNECTIONS_SUBCOMMANDS, runConnections, } from "./connections/command.js";
|
|
20
21
|
import { WORKFLOWS_SUBCOMMANDS, runWorkflows, } from "./workflows/command.js";
|
|
22
|
+
import { AGENTS_SUBCOMMANDS, isAgentsSubcommand, runAgents, } from "./agents/command.js";
|
|
23
|
+
import { RUNS_SUBCOMMANDS, isRunsSubcommand, runRuns, } from "./runs/command.js";
|
|
21
24
|
import { CORRECTIONS_SUBCOMMANDS, DATASETS_SUBCOMMANDS, EXPERIMENTS_SUBCOMMANDS, isCorrectionsSubcommand, isDatasetsSubcommand, isExperimentsSubcommand, runCorrections, runDatasets, runExperiments, } from "./lab/command.js";
|
|
22
25
|
import { runLogin, runLogout } from "./login/command.js";
|
|
23
26
|
import { REVIEWS_SUBCOMMANDS, isReviewAction, isReviewsSubcommand, runReviews, } from "./reviews/command.js";
|
|
@@ -124,6 +127,7 @@ USAGE
|
|
|
124
127
|
makine login Sign in as yourself, by approving a code in the dashboard
|
|
125
128
|
makine logout End that session and delete the stored token
|
|
126
129
|
makine run [prompt...] Send one buffered chat completion and print the verdict
|
|
130
|
+
makine runs <cmd> Send one task to a registered executor, and read what came of it
|
|
127
131
|
makine accept "<input>" Judge an answer your own system produced, with it on stdin
|
|
128
132
|
makine quality Acceptance and failure figures, as Quality in the dashboard
|
|
129
133
|
makine models [--used] List the model aliases this workspace may call; --used lists only
|
|
@@ -132,11 +136,13 @@ USAGE
|
|
|
132
136
|
makine contracts <cmd> Define what a good result is, and make it live
|
|
133
137
|
makine use-cases <cmd> Name a job, give it an address, and point it at a model
|
|
134
138
|
makine judge <cmd> Switch the semantic judge on or off for this workspace
|
|
135
|
-
makine
|
|
139
|
+
makine gov-id <cmd> Which cloud vendors may receive government-ID data, and hints
|
|
140
|
+
makine receipts <cmd> Read a run's receipt, and verify the receipts an issuer signed
|
|
136
141
|
makine suggestions <cmd> Suggested prompt instructions, checks, schemas and fixes
|
|
137
142
|
makine diagnosis <cmd> Whether Makine may read rejected answers to spot near misses
|
|
138
143
|
makine connections <cmd> Connect your own model provider, and keep it until you disconnect it
|
|
139
144
|
makine workflows <cmd> Define an HTTP or container step, and approve the hosts it may reach
|
|
145
|
+
makine agents <cmd> Register an outside A2A agent, and keep its credential and card
|
|
140
146
|
makine baseline <cmd> Compare your model's first answer with what Makine delivered
|
|
141
147
|
makine datasets <cmd> Keep the cases you judge a prompt or a contract against
|
|
142
148
|
makine experiments <cmd> Run variants over a dataset and compare what each got accepted
|
|
@@ -201,6 +207,50 @@ WORKFLOWS
|
|
|
201
207
|
A change needs a session. Holding only MAKINE_API_KEY you can \`list\`, \`test\` and read models;
|
|
202
208
|
run \`makine login\` to connect, rotate or disconnect.
|
|
203
209
|
|
|
210
|
+
OUTSIDE AGENTS
|
|
211
|
+
makine agents list Your agents, where each lives, and its status
|
|
212
|
+
makine agents show <agent_id> One agent, its pinned card and every past pin
|
|
213
|
+
makine agents register <host> --name <display name>
|
|
214
|
+
--artifact <role>:<artifact_type>[:<artifact_name>]
|
|
215
|
+
[--credential-stdin] [--acknowledge-egress]
|
|
216
|
+
makine agents credential <agent_id> Replace the credential, keeping the agent
|
|
217
|
+
makine agents repin <agent_id> [--yes] Pin whatever card the agent serves now
|
|
218
|
+
makine agents retire <agent_id> Stop new runs; history and running attempts stay
|
|
219
|
+
|
|
220
|
+
Registering an agent sends this workspace's task input to a company Makine has never evaluated.
|
|
221
|
+
\`register\` prints what that means and writes nothing until you pass --acknowledge-egress, and the
|
|
222
|
+
agent's host must already be approved with \`makine workflows approve-host\`.
|
|
223
|
+
|
|
224
|
+
--artifact repeats, once per thing the agent must deliver; the A2A artifact name defaults to the
|
|
225
|
+
role, and every declaration is required. --credential-stdin reads the agent's credential from
|
|
226
|
+
STDIN and from nowhere else, as \`credential\` does:
|
|
227
|
+
|
|
228
|
+
pbpaste | makine agents register agent.example.com --name "Acme" \\
|
|
229
|
+
--artifact message:text --credential-stdin --acknowledge-egress
|
|
230
|
+
|
|
231
|
+
The credential is never taken in an argument or an environment variable, where it would reach
|
|
232
|
+
\`ps\` and your shell history, and it is never printed back. A card that declares a security
|
|
233
|
+
scheme needs one.
|
|
234
|
+
|
|
235
|
+
Every write here needs \`makine login\`: a workspace key may list and show. \`register\` prints the
|
|
236
|
+
executor reference on stdout, which is what \`makine runs submit --executor\` takes.
|
|
237
|
+
|
|
238
|
+
RUNS
|
|
239
|
+
makine runs submit --executor <ref> --contract <id>@<version> --input <file.json> [--wait]
|
|
240
|
+
makine runs show <task_id> The run's state, or its outcome once it settles
|
|
241
|
+
|
|
242
|
+
\`submit\` sends the file's JSON as the run's input and prints the task id on stdout, so
|
|
243
|
+
\`TASK=$(makine runs submit ...)\` captures it and nothing else. --wait polls until the run
|
|
244
|
+
settles and prints the state it settled in; --timeout-minutes bounds the wait (30 by default),
|
|
245
|
+
and a run still going when that passes keeps going — read it later with \`show\`.
|
|
246
|
+
|
|
247
|
+
Exit 0 means an accepted delivery. Exit 2 means no accepted result: the run settled without one,
|
|
248
|
+
was parked for a person, or has not settled yet — in the last case it is still going, so read it
|
|
249
|
+
again rather than submitting a second time. \`show\` reports the same way.
|
|
250
|
+
|
|
251
|
+
This is the Runner's path, and the only one an \`agent.\` reference reaches. \`makine run\` is the
|
|
252
|
+
Gateway's chat completion, which never reaches an outside agent.
|
|
253
|
+
|
|
204
254
|
THE LAB
|
|
205
255
|
makine datasets list Your datasets, their version and case count
|
|
206
256
|
makine datasets create --name <name> A new, empty dataset
|
|
@@ -323,13 +373,19 @@ USE CASES
|
|
|
323
373
|
how you organise traffic a model is already taking. Removing an address is the only thing that
|
|
324
374
|
frees it for another use case.
|
|
325
375
|
|
|
326
|
-
|
|
376
|
+
RECEIPTS
|
|
377
|
+
makine receipts show <task_id> [--out <file>] One run's receipt, exactly as signed
|
|
327
378
|
makine receipts trust <name> --origin <https-origin> Anchor an issuer by fetching its key list
|
|
328
379
|
makine receipts trust <name> --from-file <key-set> Anchor one by a hand-over, the stronger form
|
|
329
380
|
makine receipts trust <name> --refresh --origin <o> Refresh a record you already hold
|
|
330
381
|
makine receipts verify <file> [--issuer <name>] Check a receipt. NEVER fetches
|
|
331
382
|
makine receipts issuers The issuers you have anchored
|
|
332
383
|
|
|
384
|
+
\`show\` is the one subcommand that needs a Makine address and a credential, and any credential of
|
|
385
|
+
the run's workspace may run it. The other three need neither: the party checking a receipt has no
|
|
386
|
+
Makine workspace. Hand on the file \`show --out\` writes; it verifies unchanged.
|
|
387
|
+
|
|
388
|
+
THE SEMANTIC JUDGE
|
|
333
389
|
makine judge show Whether it is on, which model, and the statement
|
|
334
390
|
makine judge enable --model <alias> [--yes] Agree to the statement and switch it on
|
|
335
391
|
makine judge disable Switch it off for this workspace
|
|
@@ -343,6 +399,22 @@ THE SEMANTIC JUDGE
|
|
|
343
399
|
\`show\` also reports the deployment operator's own switch. Both must be on for anything to be
|
|
344
400
|
judged, so a workspace that has consented and sees no judgments can tell whose switch is off.
|
|
345
401
|
|
|
402
|
+
GOVERNMENT-ID DATA
|
|
403
|
+
makine gov-id show Which vendors are allowed, and whether hints are on
|
|
404
|
+
makine gov-id acknowledge <vendor> [--yes] Allow one cloud vendor to receive it
|
|
405
|
+
makine gov-id revoke <vendor> Take that permission back
|
|
406
|
+
makine gov-id detection on|off Switch the hints on or off for this workspace
|
|
407
|
+
|
|
408
|
+
A contract that carries a government identity or tax number is not sent to a cloud model until
|
|
409
|
+
somebody here has allowed that vendor, once. \`acknowledge\` prints the warning and asks you to
|
|
410
|
+
type yes; \`--yes\` skips the prompt, and the warning is printed either way. A model on your own
|
|
411
|
+
network is never affected. The vendor is the name a call's address resolves to — \`openai\`,
|
|
412
|
+
\`anthropic\`, or the host name of another endpoint — so allowing one never allows another.
|
|
413
|
+
|
|
414
|
+
Hints are separate and never block anything: Makine says an input may hold a national ID or tax
|
|
415
|
+
number, names the country and the field, and never the number. Allowing a vendor needs a signed-in
|
|
416
|
+
account; switching hints off needs a session or a workspace key.
|
|
417
|
+
|
|
346
418
|
SUGGESTIONS
|
|
347
419
|
makine suggestions show Whether they are on, which model, the statement
|
|
348
420
|
makine suggestions enable --model <alias> [--yes] Agree to the statement and switch them on
|
|
@@ -481,11 +553,14 @@ export function parseArgs(argv) {
|
|
|
481
553
|
};
|
|
482
554
|
}
|
|
483
555
|
args.receiptsSubcommand = sub;
|
|
484
|
-
// `trust <name>` and `
|
|
556
|
+
// `trust <name>`, `verify <file>` and `show <task_id>` each take one positional after the
|
|
557
|
+
// subcommand.
|
|
485
558
|
const positional = argv[2];
|
|
486
559
|
if (positional !== undefined && !positional.startsWith("--")) {
|
|
487
560
|
if (sub === "verify")
|
|
488
561
|
args.receiptFile = positional;
|
|
562
|
+
else if (sub === "show")
|
|
563
|
+
args.receiptTaskId = positional;
|
|
489
564
|
else
|
|
490
565
|
args.issuer = positional;
|
|
491
566
|
index = 3;
|
|
@@ -506,6 +581,28 @@ export function parseArgs(argv) {
|
|
|
506
581
|
args.judgeSubcommand = sub;
|
|
507
582
|
index = 2;
|
|
508
583
|
}
|
|
584
|
+
else if (head === "gov-id") {
|
|
585
|
+
args.command = head;
|
|
586
|
+
const sub = argv[1];
|
|
587
|
+
if (sub === undefined || !isGovIdSubcommand(sub)) {
|
|
588
|
+
return {
|
|
589
|
+
ok: false,
|
|
590
|
+
message: `\`makine gov-id\` needs one of ${GOV_ID_SUBCOMMANDS.join(", ")}.`,
|
|
591
|
+
};
|
|
592
|
+
}
|
|
593
|
+
args.govIdSubcommand = sub;
|
|
594
|
+
const positional = argv[2];
|
|
595
|
+
if (positional !== undefined && !positional.startsWith("-")) {
|
|
596
|
+
if (sub === "detection")
|
|
597
|
+
args.govIdDetection = positional;
|
|
598
|
+
else
|
|
599
|
+
args.govIdVendor = positional;
|
|
600
|
+
index = 3;
|
|
601
|
+
}
|
|
602
|
+
else {
|
|
603
|
+
index = 2;
|
|
604
|
+
}
|
|
605
|
+
}
|
|
509
606
|
else if (head === "suggestions") {
|
|
510
607
|
args.command = head;
|
|
511
608
|
const sub = argv[1];
|
|
@@ -566,6 +663,30 @@ export function parseArgs(argv) {
|
|
|
566
663
|
args.workflowsSubcommand = sub;
|
|
567
664
|
index = 2;
|
|
568
665
|
}
|
|
666
|
+
else if (head === "agents") {
|
|
667
|
+
args.command = head;
|
|
668
|
+
const sub = argv[1];
|
|
669
|
+
if (sub === undefined || !isAgentsSubcommand(sub)) {
|
|
670
|
+
return {
|
|
671
|
+
ok: false,
|
|
672
|
+
message: `\`makine agents\` needs one of ${AGENTS_SUBCOMMANDS.join(", ")}.`,
|
|
673
|
+
};
|
|
674
|
+
}
|
|
675
|
+
args.agentsSubcommand = sub;
|
|
676
|
+
index = 2;
|
|
677
|
+
}
|
|
678
|
+
else if (head === "runs") {
|
|
679
|
+
args.command = head;
|
|
680
|
+
const sub = argv[1];
|
|
681
|
+
if (sub === undefined || !isRunsSubcommand(sub)) {
|
|
682
|
+
return {
|
|
683
|
+
ok: false,
|
|
684
|
+
message: `\`makine runs\` needs one of ${RUNS_SUBCOMMANDS.join(", ")}.`,
|
|
685
|
+
};
|
|
686
|
+
}
|
|
687
|
+
args.runsSubcommand = sub;
|
|
688
|
+
index = 2;
|
|
689
|
+
}
|
|
569
690
|
else if (head === "baseline") {
|
|
570
691
|
args.command = head;
|
|
571
692
|
const sub = argv[1];
|
|
@@ -735,6 +856,16 @@ export function parseArgs(argv) {
|
|
|
735
856
|
case "--refresh":
|
|
736
857
|
args.refresh = true;
|
|
737
858
|
break;
|
|
859
|
+
case "--out":
|
|
860
|
+
// The flag switch is shared by every command, so another command would otherwise take
|
|
861
|
+
// `--out` and silently drop it.
|
|
862
|
+
if (args.command !== "receipts") {
|
|
863
|
+
throw new CliUsageError("`--out` only applies to `makine receipts show`.");
|
|
864
|
+
}
|
|
865
|
+
if (needsValue(token, next))
|
|
866
|
+
args.out = next;
|
|
867
|
+
index += 1;
|
|
868
|
+
break;
|
|
738
869
|
case "--system":
|
|
739
870
|
if (needsValue(token, next))
|
|
740
871
|
args.system = next;
|
|
@@ -743,8 +874,8 @@ export function parseArgs(argv) {
|
|
|
743
874
|
case "--input":
|
|
744
875
|
// The flag switch is shared by every command, so a command that cannot act on `--input`
|
|
745
876
|
// would otherwise take it and drop it.
|
|
746
|
-
if (args.command !== "run") {
|
|
747
|
-
throw new CliUsageError("`--input` only applies to `makine run`.");
|
|
877
|
+
if (args.command !== "run" && args.command !== "runs") {
|
|
878
|
+
throw new CliUsageError("`--input` only applies to `makine run` and `makine runs submit`.");
|
|
748
879
|
}
|
|
749
880
|
if (needsValue(token, next))
|
|
750
881
|
args.input = next;
|
|
@@ -903,6 +1034,19 @@ export function parseArgs(argv) {
|
|
|
903
1034
|
case "--acknowledge-egress":
|
|
904
1035
|
args.acknowledgeEgress = true;
|
|
905
1036
|
break;
|
|
1037
|
+
case "--artifact":
|
|
1038
|
+
if (needsValue(token, next))
|
|
1039
|
+
(args.artifacts ??= []).push(next);
|
|
1040
|
+
index += 1;
|
|
1041
|
+
break;
|
|
1042
|
+
case "--credential-stdin":
|
|
1043
|
+
args.credentialStdin = true;
|
|
1044
|
+
break;
|
|
1045
|
+
case "--executor":
|
|
1046
|
+
if (needsValue(token, next))
|
|
1047
|
+
args.executor = next;
|
|
1048
|
+
index += 1;
|
|
1049
|
+
break;
|
|
906
1050
|
default:
|
|
907
1051
|
throw new CliUsageError(`Unknown option \`${token}\`. Try \`makine help\`.`);
|
|
908
1052
|
}
|
|
@@ -1026,9 +1170,10 @@ export async function runCli(argv, io) {
|
|
|
1026
1170
|
});
|
|
1027
1171
|
return ok ? EXIT.ACCEPTED : EXIT.USAGE;
|
|
1028
1172
|
}
|
|
1029
|
-
if (args.command === "receipts") {
|
|
1173
|
+
if (args.command === "receipts" && args.receiptsSubcommand !== "show") {
|
|
1030
1174
|
// Offline: the counterparty verifying a receipt has no Makine workspace, so neither a Gateway
|
|
1031
1175
|
// address nor a key may be demanded. `trust --origin` fetches the issuer's own origin, not ours.
|
|
1176
|
+
// `show` is the exception and falls through to the address and credential below.
|
|
1032
1177
|
const outcome = await runReceipts({
|
|
1033
1178
|
subcommand: args.receiptsSubcommand,
|
|
1034
1179
|
...(args.issuer === undefined ? {} : { name: args.issuer }),
|
|
@@ -1111,6 +1256,18 @@ export async function runCli(argv, io) {
|
|
|
1111
1256
|
}, { out: io.out, err: io.err });
|
|
1112
1257
|
return ACCEPT_EXIT[outcome];
|
|
1113
1258
|
}
|
|
1259
|
+
if (args.command === "receipts") {
|
|
1260
|
+
// Only `show` reaches here; the other three returned above, before any address was demanded.
|
|
1261
|
+
const outcome = await runReceiptsShow({
|
|
1262
|
+
...(args.receiptTaskId === undefined ? {} : { taskId: args.receiptTaskId }),
|
|
1263
|
+
...(args.out === undefined ? {} : { out: args.out }),
|
|
1264
|
+
}, {
|
|
1265
|
+
baseUrl,
|
|
1266
|
+
apiKey,
|
|
1267
|
+
...(io.fetchImpl === undefined ? {} : { fetchImpl: io.fetchImpl }),
|
|
1268
|
+
}, { out: io.out, err: io.err });
|
|
1269
|
+
return RECEIPTS_SHOW_EXIT[outcome];
|
|
1270
|
+
}
|
|
1114
1271
|
if (args.command === "reviews") {
|
|
1115
1272
|
const outcome = await runReviews({
|
|
1116
1273
|
subcommand: args.reviewsSubcommand,
|
|
@@ -1199,6 +1356,24 @@ export async function runCli(argv, io) {
|
|
|
1199
1356
|
});
|
|
1200
1357
|
return JUDGE_EXIT[outcome];
|
|
1201
1358
|
}
|
|
1359
|
+
if (args.command === "gov-id") {
|
|
1360
|
+
const outcome = await runGovId({
|
|
1361
|
+
subcommand: args.govIdSubcommand,
|
|
1362
|
+
...(args.govIdVendor === undefined ? {} : { vendor: args.govIdVendor }),
|
|
1363
|
+
...(args.govIdDetection === undefined ? {} : { detection: args.govIdDetection }),
|
|
1364
|
+
yes: args.yes,
|
|
1365
|
+
json: args.json,
|
|
1366
|
+
}, {
|
|
1367
|
+
baseUrl,
|
|
1368
|
+
apiKey,
|
|
1369
|
+
...(io.fetchImpl === undefined ? {} : { fetchImpl: io.fetchImpl }),
|
|
1370
|
+
}, {
|
|
1371
|
+
out: io.out,
|
|
1372
|
+
err: io.err,
|
|
1373
|
+
confirm: io.readCredentialImpl ?? ((prompt) => readConfirmationLine(prompt)),
|
|
1374
|
+
});
|
|
1375
|
+
return GOV_ID_EXIT[outcome];
|
|
1376
|
+
}
|
|
1202
1377
|
if (args.command === "suggestions") {
|
|
1203
1378
|
const outcome = await runSuggestions({
|
|
1204
1379
|
subcommand: args.suggestionsSubcommand,
|
|
@@ -1290,6 +1465,66 @@ export async function runCli(argv, io) {
|
|
|
1290
1465
|
});
|
|
1291
1466
|
return WORKFLOWS_EXIT[outcome];
|
|
1292
1467
|
}
|
|
1468
|
+
if (args.command === "agents") {
|
|
1469
|
+
const outcome = await runAgents({
|
|
1470
|
+
subcommand: args.agentsSubcommand,
|
|
1471
|
+
...(args.prompt[0] === undefined ? {} : { target: args.prompt[0] }),
|
|
1472
|
+
...(args.name === undefined ? {} : { name: args.name }),
|
|
1473
|
+
...(args.artifacts === undefined ? {} : { artifacts: args.artifacts }),
|
|
1474
|
+
...(args.credentialStdin === undefined ? {} : { credentialStdin: args.credentialStdin }),
|
|
1475
|
+
...(args.acknowledgeEgress === undefined
|
|
1476
|
+
? {}
|
|
1477
|
+
: { acknowledgeEgress: args.acknowledgeEgress }),
|
|
1478
|
+
yes: args.yes,
|
|
1479
|
+
json: args.json,
|
|
1480
|
+
}, {
|
|
1481
|
+
baseUrl,
|
|
1482
|
+
apiKey,
|
|
1483
|
+
explicitKey,
|
|
1484
|
+
...(io.fetchImpl === undefined ? {} : { fetchImpl: io.fetchImpl }),
|
|
1485
|
+
}, {
|
|
1486
|
+
out: io.out,
|
|
1487
|
+
err: io.err,
|
|
1488
|
+
readCredential: io.readCredentialImpl ?? readCredentialFromStdin,
|
|
1489
|
+
confirm: io.readCredentialImpl ?? ((prompt) => readConfirmationLine(prompt)),
|
|
1490
|
+
});
|
|
1491
|
+
return AGENTS_EXIT[outcome];
|
|
1492
|
+
}
|
|
1493
|
+
if (args.command === "runs") {
|
|
1494
|
+
// The file is read here, as `workflows define` reads its definition, so the command module
|
|
1495
|
+
// stays a pure function of what it was given.
|
|
1496
|
+
let inputJson;
|
|
1497
|
+
if (args.input !== undefined) {
|
|
1498
|
+
try {
|
|
1499
|
+
inputJson = (io.readFileImpl ?? ((path) => readFileSync(path, "utf8")))(args.input);
|
|
1500
|
+
}
|
|
1501
|
+
catch (error) {
|
|
1502
|
+
io.err(`Cannot read --input ${args.input}: ${error instanceof Error ? error.message : String(error)}`);
|
|
1503
|
+
return EXIT.USAGE;
|
|
1504
|
+
}
|
|
1505
|
+
}
|
|
1506
|
+
const outcome = await runRuns({
|
|
1507
|
+
subcommand: args.runsSubcommand,
|
|
1508
|
+
...(args.prompt[0] === undefined ? {} : { target: args.prompt[0] }),
|
|
1509
|
+
...(args.executor === undefined ? {} : { executor: args.executor }),
|
|
1510
|
+
...(args.contract === undefined ? {} : { contract: args.contract }),
|
|
1511
|
+
...(inputJson === undefined ? {} : { input: inputJson }),
|
|
1512
|
+
...(args.wait === undefined ? {} : { wait: args.wait }),
|
|
1513
|
+
...(args.timeoutMinutes === undefined ? {} : { timeoutMinutes: args.timeoutMinutes }),
|
|
1514
|
+
json: args.json,
|
|
1515
|
+
}, {
|
|
1516
|
+
baseUrl,
|
|
1517
|
+
apiKey,
|
|
1518
|
+
explicitKey,
|
|
1519
|
+
...(io.fetchImpl === undefined ? {} : { fetchImpl: io.fetchImpl }),
|
|
1520
|
+
}, {
|
|
1521
|
+
out: io.out,
|
|
1522
|
+
err: io.err,
|
|
1523
|
+
...(io.sleepImpl === undefined ? {} : { sleep: io.sleepImpl }),
|
|
1524
|
+
...(io.nowMsImpl === undefined ? {} : { nowMs: io.nowMsImpl }),
|
|
1525
|
+
});
|
|
1526
|
+
return RUNS_EXIT[outcome];
|
|
1527
|
+
}
|
|
1293
1528
|
if (args.command === "baseline") {
|
|
1294
1529
|
const baseline = new MakineBaselineClient({
|
|
1295
1530
|
baseUrl,
|
|
@@ -1474,6 +1709,14 @@ const RECEIPTS_EXIT = {
|
|
|
1474
1709
|
// A receipt that did not verify is not an error in the tool; it is the answer.
|
|
1475
1710
|
unverified: EXIT.RESULT_NOT_ACCEPTED,
|
|
1476
1711
|
};
|
|
1712
|
+
const RECEIPTS_SHOW_EXIT = {
|
|
1713
|
+
ok: EXIT.ACCEPTED,
|
|
1714
|
+
usage: EXIT.USAGE,
|
|
1715
|
+
// A run with no receipt, and a run nobody has, are both answers rather than tool errors.
|
|
1716
|
+
refused: EXIT.RESULT_NOT_ACCEPTED,
|
|
1717
|
+
auth: EXIT.AUTH,
|
|
1718
|
+
unavailable: EXIT.UNREACHABLE,
|
|
1719
|
+
};
|
|
1477
1720
|
const JUDGE_EXIT = {
|
|
1478
1721
|
ok: EXIT.ACCEPTED,
|
|
1479
1722
|
usage: EXIT.USAGE,
|
|
@@ -1481,6 +1724,13 @@ const JUDGE_EXIT = {
|
|
|
1481
1724
|
auth: EXIT.AUTH,
|
|
1482
1725
|
unavailable: EXIT.UNREACHABLE,
|
|
1483
1726
|
};
|
|
1727
|
+
const GOV_ID_EXIT = {
|
|
1728
|
+
ok: EXIT.ACCEPTED,
|
|
1729
|
+
usage: EXIT.USAGE,
|
|
1730
|
+
refused: EXIT.RESULT_NOT_ACCEPTED,
|
|
1731
|
+
auth: EXIT.AUTH,
|
|
1732
|
+
unavailable: EXIT.UNREACHABLE,
|
|
1733
|
+
};
|
|
1484
1734
|
const SUGGESTIONS_EXIT = {
|
|
1485
1735
|
ok: EXIT.ACCEPTED,
|
|
1486
1736
|
usage: EXIT.USAGE,
|
|
@@ -1537,6 +1787,25 @@ const WORKFLOWS_EXIT = {
|
|
|
1537
1787
|
auth: EXIT.AUTH,
|
|
1538
1788
|
unavailable: EXIT.UNREACHABLE,
|
|
1539
1789
|
};
|
|
1790
|
+
const AGENTS_EXIT = {
|
|
1791
|
+
ok: EXIT.ACCEPTED,
|
|
1792
|
+
usage: EXIT.USAGE,
|
|
1793
|
+
refused: EXIT.RESULT_NOT_ACCEPTED,
|
|
1794
|
+
auth: EXIT.AUTH,
|
|
1795
|
+
unavailable: EXIT.UNREACHABLE,
|
|
1796
|
+
};
|
|
1797
|
+
/**
|
|
1798
|
+
* `not_accepted` is the run's own verdict, which is what a CI step branches on; a refusal of the
|
|
1799
|
+
* submission itself is the same class of outcome, because Makine answered and the answer was no.
|
|
1800
|
+
*/
|
|
1801
|
+
const RUNS_EXIT = {
|
|
1802
|
+
ok: EXIT.ACCEPTED,
|
|
1803
|
+
usage: EXIT.USAGE,
|
|
1804
|
+
not_accepted: EXIT.RESULT_NOT_ACCEPTED,
|
|
1805
|
+
refused: EXIT.RESULT_NOT_ACCEPTED,
|
|
1806
|
+
auth: EXIT.AUTH,
|
|
1807
|
+
unavailable: EXIT.UNREACHABLE,
|
|
1808
|
+
};
|
|
1540
1809
|
const BASELINE_EXIT = {
|
|
1541
1810
|
ok: EXIT.ACCEPTED,
|
|
1542
1811
|
usage: EXIT.USAGE,
|