@markstanden/opencode-test-container 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +263 -2
- package/container/Containerfile +24 -0
- package/container/README.md +29 -0
- package/dist/adapters/opencode/events.d.ts +90 -0
- package/dist/adapters/opencode/events.js +213 -0
- package/dist/adapters/opencode/runtime.d.ts +87 -0
- package/dist/adapters/opencode/runtime.js +136 -0
- package/dist/adapters/podman/container.d.ts +62 -0
- package/dist/adapters/podman/container.js +119 -0
- package/dist/adapters/podman/image.d.ts +50 -0
- package/dist/adapters/podman/image.js +124 -0
- package/dist/adapters/process.d.ts +38 -0
- package/dist/adapters/process.js +71 -0
- package/dist/campaign/assess.d.ts +45 -0
- package/dist/campaign/assess.js +208 -0
- package/dist/campaign/close.d.ts +17 -0
- package/dist/campaign/close.js +112 -0
- package/dist/campaign/evidence-guard.d.ts +24 -0
- package/dist/campaign/evidence-guard.js +49 -0
- package/dist/campaign/freeze.d.ts +94 -0
- package/dist/campaign/freeze.js +297 -0
- package/dist/campaign/inventory.d.ts +62 -0
- package/dist/campaign/inventory.js +192 -0
- package/dist/campaign/judge.d.ts +209 -0
- package/dist/campaign/judge.js +1285 -0
- package/dist/campaign/ledger.d.ts +64 -0
- package/dist/campaign/ledger.js +149 -0
- package/dist/campaign/prepare.d.ts +129 -0
- package/dist/campaign/prepare.js +483 -0
- package/dist/campaign/primary.d.ts +96 -0
- package/dist/campaign/primary.js +189 -0
- package/dist/campaign/run.d.ts +151 -0
- package/dist/campaign/run.js +562 -0
- package/dist/campaign/status.d.ts +76 -0
- package/dist/campaign/status.js +237 -0
- package/dist/cli/otc.d.ts +51 -0
- package/dist/cli/otc.js +435 -0
- package/dist/contracts/canonical.d.ts +21 -0
- package/dist/contracts/canonical.js +44 -0
- package/dist/contracts/types.d.ts +261 -0
- package/dist/contracts/types.js +9 -0
- package/dist/contracts/validate.d.ts +72 -0
- package/dist/contracts/validate.js +1021 -0
- package/dist/contracts/version.d.ts +44 -0
- package/dist/contracts/version.js +147 -0
- package/dist/evaluators/docs/analysis/accounting.d.ts +140 -0
- package/dist/evaluators/docs/analysis/accounting.js +237 -0
- package/dist/evaluators/docs/analysis/blinding.d.ts +40 -0
- package/dist/evaluators/docs/analysis/blinding.js +80 -0
- package/dist/evaluators/docs/analysis/bounds.d.ts +40 -0
- package/dist/evaluators/docs/analysis/bounds.js +31 -0
- package/dist/evaluators/docs/analysis/budget.d.ts +137 -0
- package/dist/evaluators/docs/analysis/budget.js +305 -0
- package/dist/evaluators/docs/analysis/closure.d.ts +175 -0
- package/dist/evaluators/docs/analysis/closure.js +251 -0
- package/dist/evaluators/docs/analysis/decision.d.ts +59 -0
- package/dist/evaluators/docs/analysis/decision.js +161 -0
- package/dist/evaluators/docs/analysis/freeze.d.ts +201 -0
- package/dist/evaluators/docs/analysis/freeze.js +395 -0
- package/dist/evaluators/docs/analysis/guardrails.d.ts +51 -0
- package/dist/evaluators/docs/analysis/guardrails.js +194 -0
- package/dist/evaluators/docs/analysis/journal.d.ts +150 -0
- package/dist/evaluators/docs/analysis/journal.js +475 -0
- package/dist/evaluators/docs/analysis/ledger.d.ts +78 -0
- package/dist/evaluators/docs/analysis/ledger.js +145 -0
- package/dist/evaluators/docs/analysis/measures.d.ts +302 -0
- package/dist/evaluators/docs/analysis/measures.js +1069 -0
- package/dist/evaluators/docs/analysis/model.d.ts +236 -0
- package/dist/evaluators/docs/analysis/model.js +740 -0
- package/dist/evaluators/docs/analysis/pairing.d.ts +68 -0
- package/dist/evaluators/docs/analysis/pairing.js +95 -0
- package/dist/evaluators/docs/analysis/records.d.ts +229 -0
- package/dist/evaluators/docs/analysis/records.js +935 -0
- package/dist/evaluators/docs/analysis/recovery.d.ts +225 -0
- package/dist/evaluators/docs/analysis/recovery.js +507 -0
- package/dist/evaluators/docs/analysis/render.d.ts +235 -0
- package/dist/evaluators/docs/analysis/render.js +566 -0
- package/dist/evaluators/docs/analysis/replay.d.ts +15 -0
- package/dist/evaluators/docs/analysis/replay.js +1272 -0
- package/dist/evaluators/docs/analysis/screening/inventory.d.ts +136 -0
- package/dist/evaluators/docs/analysis/screening/inventory.js +307 -0
- package/dist/evaluators/docs/analysis/screening/noteVersion.d.ts +15 -0
- package/dist/evaluators/docs/analysis/screening/noteVersion.js +46 -0
- package/dist/evaluators/docs/analysis/screening/reconcile.d.ts +38 -0
- package/dist/evaluators/docs/analysis/screening/reconcile.js +40 -0
- package/dist/evaluators/docs/analysis/screening/rules.d.ts +163 -0
- package/dist/evaluators/docs/analysis/screening/rules.js +330 -0
- package/dist/evaluators/docs/analysis/screening/scan.d.ts +72 -0
- package/dist/evaluators/docs/analysis/screening/scan.js +362 -0
- package/dist/evaluators/docs/analysis/selector.d.ts +68 -0
- package/dist/evaluators/docs/analysis/selector.js +123 -0
- package/dist/evaluators/docs/assess.d.ts +129 -0
- package/dist/evaluators/docs/assess.js +433 -0
- package/dist/evaluators/docs/campaign.d.ts +133 -0
- package/dist/evaluators/docs/campaign.js +222 -0
- package/dist/evaluators/docs/index.d.ts +25 -0
- package/dist/evaluators/docs/index.js +25 -0
- package/dist/evaluators/docs/journal.d.ts +150 -0
- package/dist/evaluators/docs/journal.js +475 -0
- package/dist/evaluators/docs/scoring.d.ts +367 -0
- package/dist/evaluators/docs/scoring.js +662 -0
- package/dist/evaluators/skills/assess.d.ts +94 -0
- package/dist/evaluators/skills/assess.js +207 -0
- package/dist/index.d.ts +46 -0
- package/dist/index.js +29 -0
- package/dist/legacy/prod014.d.ts +86 -0
- package/dist/legacy/prod014.js +209 -0
- package/dist/reporting/report.d.ts +79 -0
- package/dist/reporting/report.js +242 -0
- package/docs/architecture.md +106 -0
- package/docs/capability-matrix.md +84 -0
- package/docs/offline-rehearsal.md +75 -0
- package/docs/parity-record.md +81 -0
- package/docs/pr-description.md +103 -0
- package/docs/release-0.1.0.md +52 -0
- package/docs/releasing.md +82 -0
- package/docs/schema.md +97 -0
- package/examples/skills/README.md +13 -0
- package/examples/skills/campaign.json +73 -0
- package/examples/skills/skills/otel-helper/SKILL.md +10 -0
- package/examples/skills/suite.json +29 -0
- package/package.json +45 -5
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import { existsSync } from "node:fs";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import { loadPreparedManifest } from "./prepare.js";
|
|
4
|
+
import { loadFrozen } from "./freeze.js";
|
|
5
|
+
import { readLedger, trialStarts } from "./ledger.js";
|
|
6
|
+
import { readAssessments, assessmentPath } from "./assess.js";
|
|
7
|
+
import { checkedSelection, packetIntegrityProblems, policyOf, readJudgeAttempts, selectionPath as selectionPathOf, } from "./judge.js";
|
|
8
|
+
import { toolIdentity, toolIdentityProblems, } from "../contracts/version.js";
|
|
9
|
+
import { readClaims } from "../evaluators/docs/analysis/budget.js";
|
|
10
|
+
import { trialDirectory } from "./run.js";
|
|
11
|
+
/** Derive the finite lifecycle state from checked evidence. */
|
|
12
|
+
function lifecycleStateOf(options) {
|
|
13
|
+
if (options.closed)
|
|
14
|
+
return "closed";
|
|
15
|
+
const allAssessed = options.manifest.campaign.schedule.slots.length > 0 &&
|
|
16
|
+
options.manifest.campaign.schedule.slots.every((slot) => existsSync(assessmentPath(options.root, slot.slotId)));
|
|
17
|
+
if (allAssessed)
|
|
18
|
+
return "assessed";
|
|
19
|
+
if (options.starts > 0)
|
|
20
|
+
return "running";
|
|
21
|
+
return options.frozen ? "frozen" : "prepared";
|
|
22
|
+
}
|
|
23
|
+
/** The judgement counts for every scheduled slot. */
|
|
24
|
+
function judgementOf(root, manifest) {
|
|
25
|
+
if (manifest.campaign.assessment.judge === undefined)
|
|
26
|
+
return null;
|
|
27
|
+
const policy = policyOf(manifest);
|
|
28
|
+
const slots = manifest.campaign.schedule.slots;
|
|
29
|
+
let judged = 0;
|
|
30
|
+
let pending = 0;
|
|
31
|
+
let failed = 0;
|
|
32
|
+
let attempts = 0;
|
|
33
|
+
let invalid = 0;
|
|
34
|
+
const problems = [];
|
|
35
|
+
for (const slot of slots) {
|
|
36
|
+
const recorded = readJudgeAttempts(root, slot.slotId);
|
|
37
|
+
attempts += recorded.length;
|
|
38
|
+
invalid += recorded.filter((attempt) => attempt.judgementStatus === "invalid-verdict" ||
|
|
39
|
+
attempt.judgementStatus === "judge-error").length;
|
|
40
|
+
const checked = policy.ok
|
|
41
|
+
? checkedSelection({
|
|
42
|
+
root,
|
|
43
|
+
manifest,
|
|
44
|
+
slot,
|
|
45
|
+
policy: policy.policy,
|
|
46
|
+
})
|
|
47
|
+
: { ok: false, problems: policy.problems };
|
|
48
|
+
if (checked.ok) {
|
|
49
|
+
judged += 1;
|
|
50
|
+
}
|
|
51
|
+
else if (existsSync(selectionPathOf(root, slot.slotId))) {
|
|
52
|
+
problems.push(...checked.problems.map((problem) => `${slot.slotId}: ${problem}`));
|
|
53
|
+
}
|
|
54
|
+
else if (existsSync(join(trialDirectory(root, slot.slotId), "meta.json"))) {
|
|
55
|
+
const terminal = recorded.some((attempt) => attempt.judgementStatus === "invalid-verdict" ||
|
|
56
|
+
attempt.judgementStatus === "judge-error");
|
|
57
|
+
if (terminal)
|
|
58
|
+
failed += 1;
|
|
59
|
+
else
|
|
60
|
+
pending += 1;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
const unsettled = ["judge", "recovery"].reduce((sum, kind) => sum +
|
|
64
|
+
readClaims(join(root, "evidence"), kind).filter((claim) => claim.state !== "closed").length, 0);
|
|
65
|
+
problems.push(...slots.flatMap((slot) => packetIntegrityProblems(root, manifest, slot).map((problem) => `${slot.slotId}: ${problem}`)));
|
|
66
|
+
return {
|
|
67
|
+
judged,
|
|
68
|
+
pending,
|
|
69
|
+
failed,
|
|
70
|
+
attempts,
|
|
71
|
+
invalid,
|
|
72
|
+
unsettled,
|
|
73
|
+
problems,
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
/** The judge action when completed slots are awaiting a checked judgement. */
|
|
77
|
+
function judgeAction(root, judgement) {
|
|
78
|
+
return judgement !== null && judgement.pending > 0
|
|
79
|
+
? [
|
|
80
|
+
{
|
|
81
|
+
command: `otc judge --root ${JSON.stringify(root)}`,
|
|
82
|
+
reason: `${judgement.pending} completed slot(s) have no checked judgement`,
|
|
83
|
+
},
|
|
84
|
+
]
|
|
85
|
+
: [];
|
|
86
|
+
}
|
|
87
|
+
/** Build the actionable next commands from state, never from constants. */
|
|
88
|
+
function nextActionsOf(options) {
|
|
89
|
+
const quoted = JSON.stringify(options.root);
|
|
90
|
+
if (!options.frozen) {
|
|
91
|
+
return [
|
|
92
|
+
{
|
|
93
|
+
command: `otc freeze --root ${quoted}`,
|
|
94
|
+
reason: "the prepared payload is not frozen",
|
|
95
|
+
},
|
|
96
|
+
];
|
|
97
|
+
}
|
|
98
|
+
if (options.closed) {
|
|
99
|
+
return [
|
|
100
|
+
{
|
|
101
|
+
command: `otc analyse --root ${quoted} --out ${JSON.stringify(join(options.root, "reports", "final"))}`,
|
|
102
|
+
reason: "the campaign is closed; render final analysis",
|
|
103
|
+
},
|
|
104
|
+
];
|
|
105
|
+
}
|
|
106
|
+
const slots = options.manifest.campaign.schedule.slots;
|
|
107
|
+
const remaining = options.manifest.campaign.budgets.trials - options.starts;
|
|
108
|
+
const unstarted = slots.length - options.starts;
|
|
109
|
+
const actions = [];
|
|
110
|
+
if (unstarted > 0 && remaining > 0) {
|
|
111
|
+
actions.push({
|
|
112
|
+
command: `otc run --root ${quoted}`,
|
|
113
|
+
reason: `${unstarted} slot(s) unstarted, ${remaining} trial(s) budgeted`,
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
else if (unstarted === 0 && options.assessments < slots.length) {
|
|
117
|
+
actions.push({
|
|
118
|
+
command: `otc assess --root ${quoted}`,
|
|
119
|
+
reason: "every started slot has evidence; deterministic assessment is pending",
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
actions.push(...judgeAction(options.root, options.judgement));
|
|
123
|
+
if (options.starts > 0 && options.completed === options.starts) {
|
|
124
|
+
actions.push({
|
|
125
|
+
command: `otc close --root ${quoted}`,
|
|
126
|
+
reason: "all started trials have ended",
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
return actions;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Observe a campaign root without writing, building, probing or dispatching.
|
|
133
|
+
* Every next action is derived from the manifest and checked evidence.
|
|
134
|
+
* @param root The campaign root.
|
|
135
|
+
* @returns The status document.
|
|
136
|
+
*/
|
|
137
|
+
export function statusOf(root) {
|
|
138
|
+
const prepared = loadPreparedManifest(root);
|
|
139
|
+
if (!prepared.ok) {
|
|
140
|
+
return {
|
|
141
|
+
schemaVersion: 1,
|
|
142
|
+
state: "blocked",
|
|
143
|
+
campaignId: null,
|
|
144
|
+
suiteId: null,
|
|
145
|
+
root,
|
|
146
|
+
imageId: null,
|
|
147
|
+
frozenAt: null,
|
|
148
|
+
closedAt: null,
|
|
149
|
+
counts: {
|
|
150
|
+
slots: 0,
|
|
151
|
+
started: 0,
|
|
152
|
+
completed: 0,
|
|
153
|
+
assessed: 0,
|
|
154
|
+
pass: 0,
|
|
155
|
+
fail: 0,
|
|
156
|
+
unknown: 0,
|
|
157
|
+
},
|
|
158
|
+
tool: null,
|
|
159
|
+
budgets: null,
|
|
160
|
+
judgement: null,
|
|
161
|
+
nextActions: [],
|
|
162
|
+
problems: [prepared.problem],
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
const manifest = prepared.manifest;
|
|
166
|
+
const ledger = readLedger(root);
|
|
167
|
+
const problems = ledger.state === "malformed" ? [...ledger.problems] : [];
|
|
168
|
+
const starts = trialStarts(ledger.events);
|
|
169
|
+
const completed = new Set(ledger.events
|
|
170
|
+
.filter((event) => event.event === "trial-end")
|
|
171
|
+
.map((event) => typeof event.slotId === "string" ? event.slotId : ""));
|
|
172
|
+
const assessments = readAssessments(root);
|
|
173
|
+
const frozen = loadFrozen(root);
|
|
174
|
+
if (!frozen.ok)
|
|
175
|
+
problems.push(frozen.problem);
|
|
176
|
+
const currentTool = toolIdentity();
|
|
177
|
+
if (frozen.ok) {
|
|
178
|
+
problems.push(...toolIdentityProblems(frozen.record.tool, currentTool));
|
|
179
|
+
}
|
|
180
|
+
const policy = policyOf(manifest);
|
|
181
|
+
if (!policy.ok)
|
|
182
|
+
problems.push(...policy.problems);
|
|
183
|
+
const judgement = judgementOf(root, manifest);
|
|
184
|
+
problems.push(...(judgement?.problems ?? []));
|
|
185
|
+
const state = lifecycleStateOf({
|
|
186
|
+
root,
|
|
187
|
+
manifest,
|
|
188
|
+
frozen: frozen.ok,
|
|
189
|
+
starts: starts.length,
|
|
190
|
+
closed: ledger.state === "closed",
|
|
191
|
+
});
|
|
192
|
+
const nextActions = nextActionsOf({
|
|
193
|
+
root,
|
|
194
|
+
manifest,
|
|
195
|
+
frozen: frozen.ok,
|
|
196
|
+
closed: ledger.state === "closed",
|
|
197
|
+
starts: starts.length,
|
|
198
|
+
completed: completed.size,
|
|
199
|
+
assessments: assessments.length,
|
|
200
|
+
judgement: judgementOf(root, manifest),
|
|
201
|
+
});
|
|
202
|
+
return {
|
|
203
|
+
schemaVersion: 1,
|
|
204
|
+
state,
|
|
205
|
+
campaignId: manifest.campaignId,
|
|
206
|
+
suiteId: manifest.suiteId,
|
|
207
|
+
root,
|
|
208
|
+
imageId: frozen.ok ? frozen.record.imageId : null,
|
|
209
|
+
frozenAt: frozen.ok ? frozen.record.frozenAt : null,
|
|
210
|
+
closedAt: ledger.closedAt,
|
|
211
|
+
counts: {
|
|
212
|
+
slots: manifest.campaign.schedule.slots.length,
|
|
213
|
+
started: starts.length,
|
|
214
|
+
completed: completed.size,
|
|
215
|
+
assessed: assessments.length,
|
|
216
|
+
pass: assessments.filter((entry) => entry.outcome === "pass")
|
|
217
|
+
.length,
|
|
218
|
+
fail: assessments.filter((entry) => entry.outcome === "fail")
|
|
219
|
+
.length,
|
|
220
|
+
unknown: assessments.filter((entry) => entry.outcome === "unknown")
|
|
221
|
+
.length,
|
|
222
|
+
},
|
|
223
|
+
tool: currentTool,
|
|
224
|
+
budgets: {
|
|
225
|
+
trials: manifest.campaign.budgets.trials,
|
|
226
|
+
used: starts.length,
|
|
227
|
+
remaining: manifest.campaign.budgets.trials - starts.length,
|
|
228
|
+
},
|
|
229
|
+
judgement,
|
|
230
|
+
nextActions,
|
|
231
|
+
problems,
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
/** Status for a slot's trial directory, used by reports and diagnostics. */
|
|
235
|
+
export function slotTrialExists(root, slotId) {
|
|
236
|
+
return existsSync(trialDirectory(root, slotId));
|
|
237
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/** The commands `otc` exposes. */
|
|
3
|
+
export declare const COMMANDS: readonly ["validate", "prepare", "delivery-check", "freeze", "run", "judge", "assess", "close", "analyse", "status", "replay", "help", "version"];
|
|
4
|
+
/** One command name. */
|
|
5
|
+
export type Command = (typeof COMMANDS)[number];
|
|
6
|
+
/** Parsed command-line options. */
|
|
7
|
+
export interface CliOptions {
|
|
8
|
+
/** The command value. */
|
|
9
|
+
command: Command;
|
|
10
|
+
/** The campaign value. */
|
|
11
|
+
campaign: string | null;
|
|
12
|
+
/** The root value. */
|
|
13
|
+
root: string | null;
|
|
14
|
+
/** The out value. */
|
|
15
|
+
out: string | null;
|
|
16
|
+
/** The slots value. */
|
|
17
|
+
slots: string[];
|
|
18
|
+
/** The json value. */
|
|
19
|
+
json: boolean;
|
|
20
|
+
/** The dry run value. */
|
|
21
|
+
dryRun: boolean;
|
|
22
|
+
/** The passthrough value. */
|
|
23
|
+
passthrough: string[];
|
|
24
|
+
/** The recorded docs campaign manifest (replay). */
|
|
25
|
+
manifest: string | null;
|
|
26
|
+
/** The recorded evidence root (replay). */
|
|
27
|
+
evidenceRoot: string | null;
|
|
28
|
+
/** Whether to replace an existing analysis output. */
|
|
29
|
+
rerender: boolean;
|
|
30
|
+
/** Whether unbound legacy answers are accepted. */
|
|
31
|
+
allowLegacyUnbound: boolean;
|
|
32
|
+
/** The help value. */
|
|
33
|
+
help: boolean;
|
|
34
|
+
}
|
|
35
|
+
/** Usage text, kept identical to the documented command list. */
|
|
36
|
+
export declare const USAGE = "otc \u2014 an isolated test sandbox for OpenCode plugins, skills and agent instructions\n\nUsage: otc <command> [options]\n\nCommands:\n validate Validate a campaign and its suite; no writes\n prepare Validate, then stage an immutable campaign root\n delivery-check Recheck staged payloads and the freeze receipt\n freeze Resolve the image ID and freeze all input identities\n run Execute scheduled slots through Podman and OpenCode\n judge Blindly judge completed docs trials from checked evidence\n assess Deterministically assess captured evidence\n close Append closure to the ledger (idempotent)\n analyse Render final analysis after closure\n status Read-only state and next actions\n replay Replay recorded docs evidence through the docs evaluator\n help This text\n version Print the package version\n\nOptions:\n --campaign <file> Campaign JSON (default: $OTC_CAMPAIGN)\n --root <dir> Campaign root (default: $OTC_ROOT)\n --out <dir> Fresh report directory (analyse)\n --slot <id> Select a slot; repeat or comma-separate\n --passthrough <name> Pass one named environment variable into the trial\n --manifest <file> Recorded docs campaign manifest (replay)\n --evidence-root <dir> Recorded evidence root (replay)\n --rerender Replace an existing analysis output (replay)\n --allow-legacy-unbound Allow unbound legacy answers (replay)\n --dry-run Plan a trial without dispatching it\n --json Machine-readable output (status, validate, assess)\n --help This text\n\nExamples:\n otc validate --campaign examples/skills/otel-skill-container.json\n otc prepare --campaign campaign.json --root /tmp/otc-run\n otc freeze --root /tmp/otc-run\n otc run --root /tmp/otc-run --dry-run\n otc run --root /tmp/otc-run\n otc judge --root /tmp/otc-run\n otc assess --root /tmp/otc-run\n otc close --root /tmp/otc-run\n otc analyse --root /tmp/otc-run --out /tmp/otc-report\n otc status --root /tmp/otc-run --json\n otc replay --manifest campaign.json --evidence-root evidence --out report\n";
|
|
37
|
+
/**
|
|
38
|
+
* Parse argv into a command and its options.
|
|
39
|
+
* @param argv Arguments after the executable.
|
|
40
|
+
* @returns The parsed options.
|
|
41
|
+
*/
|
|
42
|
+
export declare function parseArgs(argv: readonly string[]): CliOptions;
|
|
43
|
+
/** A command-line usage refusal. */
|
|
44
|
+
export declare class UsageError extends Error {
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Run one command and return its exit code.
|
|
48
|
+
* @param argv Arguments after the executable.
|
|
49
|
+
* @returns The process exit code.
|
|
50
|
+
*/
|
|
51
|
+
export declare function main(argv: readonly string[]): Promise<number>;
|