@parcha/agentrun-serve 0.1.0-beta.45 → 0.1.0-beta.47
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/CHANGELOG.md +180 -0
- package/NOTICE +4 -0
- package/README.md +283 -47
- package/dist/acp-package.d.ts +35 -6
- package/dist/acp-package.js +3 -3
- package/dist/adapter-facts.d.ts +5 -2
- package/dist/adapter-facts.js +6 -3
- package/dist/adapters.d.ts +7 -0
- package/dist/adapters.js +39 -0
- package/dist/agents-store.d.ts +5 -3
- package/dist/agents-store.js +13 -8
- package/dist/api-only.d.ts +7 -10
- package/dist/api-only.js +7 -10
- package/dist/archil-routes.js +2 -1
- package/dist/cap.js +12 -2
- package/dist/chatgpt-plan.js +2 -1
- package/dist/cli.js +119 -44
- package/dist/composio-made.d.ts +19 -2
- package/dist/composio-made.js +17 -5
- package/dist/composio-preset.d.ts +42 -7
- package/dist/composio-preset.js +106 -70
- package/dist/composio-triggers.d.ts +9 -4
- package/dist/composio-triggers.js +20 -13
- package/dist/computer-attach.d.ts +11 -10
- package/dist/computer-attach.js +13 -14
- package/dist/computer-commands.d.ts +3 -0
- package/dist/computer-commands.js +3 -2
- package/dist/computer-lost.d.ts +4 -0
- package/dist/computer-lost.js +8 -3
- package/dist/computer-setting.d.ts +2 -0
- package/dist/computer-setting.js +2 -0
- package/dist/computers.d.ts +9 -75
- package/dist/computers.js +20 -66
- package/dist/console/assets/index-BBFzAxLB.js +715 -0
- package/dist/console/assets/index-BRi-Rgq6.css +1 -0
- package/dist/console/index.html +2 -2
- package/dist/cost-heal.d.ts +13 -0
- package/dist/cost-heal.js +27 -0
- package/dist/dial-relay.d.ts +6 -2
- package/dist/dial-relay.js +9 -12
- package/dist/email/routes.js +2 -1
- package/dist/errors.d.ts +2 -0
- package/dist/errors.js +5 -0
- package/dist/exa-keyless.d.ts +1 -1
- package/dist/exa-keyless.js +1 -1
- package/dist/faux-computers.d.ts +2 -3
- package/dist/faux-computers.js +9 -31
- package/dist/github-connection.js +2 -1
- package/dist/harness-archive.d.ts +19 -2
- package/dist/harness-archive.js +49 -15
- package/dist/harness-check.d.ts +73 -0
- package/dist/harness-check.js +489 -0
- package/dist/harness-cursor.d.ts +45 -0
- package/dist/harness-cursor.js +121 -0
- package/dist/harness-recipe.d.ts +127 -0
- package/dist/harness-recipe.js +357 -0
- package/dist/harness-table.d.ts +12 -0
- package/dist/harness-table.js +62 -2
- package/dist/harness.d.ts +2 -0
- package/dist/harness.js +3 -2
- package/dist/host-check.d.ts +6 -0
- package/dist/host-check.js +14 -0
- package/dist/host.d.ts +10 -3
- package/dist/host.js +17 -3
- package/dist/import-sources.d.ts +2 -0
- package/dist/import-sources.js +2 -0
- package/dist/import-summary.d.ts +15 -5
- package/dist/import-summary.js +24 -8
- package/dist/import.d.ts +34 -4
- package/dist/import.js +134 -32
- package/dist/key-refusal.d.ts +1 -0
- package/dist/key-refusal.js +8 -3
- package/dist/key-words.d.ts +1 -1
- package/dist/key-words.js +4 -4
- package/dist/learn/check.d.ts +3 -0
- package/dist/learn/check.js +31 -20
- package/dist/learn/compile.js +11 -4
- package/dist/learn/promote.d.ts +77 -4
- package/dist/learn/promote.js +123 -2
- package/dist/learned-nodes.d.ts +4 -3
- package/dist/learned-workflow.js +4 -1
- package/dist/learning-cost.d.ts +6 -16
- package/dist/learning-cost.js +6 -12
- package/dist/learning-setting.d.ts +17 -6
- package/dist/learning-setting.js +41 -5
- package/dist/learning-words.d.ts +2 -0
- package/dist/learning-words.js +1 -1
- package/dist/listen-first.d.ts +10 -0
- package/dist/listen-first.js +25 -1
- package/dist/llms.txt +1 -1
- package/dist/mcp-gateway.d.ts +2 -1
- package/dist/mcp-gateway.js +31 -15
- package/dist/mcp-probe.d.ts +18 -6
- package/dist/mcp-probe.js +41 -8
- package/dist/mcp-secret-writes.d.ts +8 -0
- package/dist/mcp-secret-writes.js +104 -4
- package/dist/mcp-servers-store.d.ts +11 -5
- package/dist/mcp-servers-store.js +46 -20
- package/dist/model-form.d.ts +2 -1
- package/dist/model-form.js +22 -8
- package/dist/model-gateway.d.ts +113 -0
- package/dist/model-gateway.js +433 -0
- package/dist/model.d.ts +2 -1
- package/dist/model.js +9 -7
- package/dist/monid.js +1 -1
- package/dist/native/binding.d.ts +4 -0
- package/dist/native/binding.js +9 -0
- package/dist/native/cli.d.ts +3 -2
- package/dist/native/cli.js +6 -5
- package/dist/openapi.d.ts +2 -0
- package/dist/openapi.js +326 -41
- package/dist/owner.d.ts +4 -2
- package/dist/owner.js +10 -4
- package/dist/page.d.ts +8 -0
- package/dist/page.js +9 -1
- package/dist/port-models.js +17 -10
- package/dist/provider.d.ts +3 -3
- package/dist/provider.js +12 -3
- package/dist/public-address.d.ts +28 -0
- package/dist/public-address.js +62 -0
- package/dist/run-launch.d.ts +1 -1
- package/dist/run-launch.js +1 -1
- package/dist/run-secrets.d.ts +3 -2
- package/dist/run-secrets.js +6 -4
- package/dist/runner/adapter-loop.d.ts +10 -7
- package/dist/runner/adapter-loop.js +57 -22
- package/dist/runner/adapter-run-spec.d.ts +12 -0
- package/dist/runner/adapter-run-spec.js +40 -6
- package/dist/runner/adapters/index.js +16 -0
- package/dist/runner/adapters/pi.d.ts +5 -2
- package/dist/runner/adapters/pi.js +7 -4
- package/dist/runner/audit.d.ts +7 -0
- package/dist/runner/audit.js +24 -6
- package/dist/runner/claim-secrets.js +5 -1
- package/dist/runner/cli-run-spec.js +15 -7
- package/dist/runner/compare-end.d.ts +43 -0
- package/dist/runner/compare-end.js +95 -0
- package/dist/runner/computer-journal.d.ts +3 -0
- package/dist/runner/computer-journal.js +22 -2
- package/dist/runner/conformance/harness.js +19 -8
- package/dist/runner/conformance/subject.d.ts +6 -0
- package/dist/runner/harness-loops.d.ts +6 -1
- package/dist/runner/harness-loops.js +94 -54
- package/dist/runner/held.d.ts +5 -4
- package/dist/runner/journal-kinds.d.ts +4 -1
- package/dist/runner/journal-kinds.js +3 -0
- package/dist/runner/loop-contract.d.ts +10 -0
- package/dist/runner/main.d.ts +5 -5
- package/dist/runner/main.js +81 -11
- package/dist/runner/mcp-claim.js +40 -12
- package/dist/runner/metrics.d.ts +26 -0
- package/dist/runner/metrics.js +44 -1
- package/dist/runner/presence.d.ts +41 -0
- package/dist/runner/presence.js +89 -0
- package/dist/runner/promotion.d.ts +10 -3
- package/dist/runner/promotion.js +42 -21
- package/dist/runner/run-child-host.js +52 -14
- package/dist/runner/runner.d.ts +5 -0
- package/dist/runner/runner.js +8 -0
- package/dist/runner/store-port.d.ts +3 -0
- package/dist/runner/store-secrets.js +19 -7
- package/dist/runner/workflow-first.d.ts +5 -2
- package/dist/runner/workflow-first.js +6 -3
- package/dist/runs-over-store.d.ts +6 -2
- package/dist/runs-over-store.js +14 -4
- package/dist/sdk/runs.d.ts +1 -1
- package/dist/sdk/runs.js +6 -1
- package/dist/sdk/schema.js +1 -1
- package/dist/secret-writes.d.ts +16 -3
- package/dist/secret-writes.js +28 -3
- package/dist/server-secrets-store.js +5 -0
- package/dist/server.d.ts +31 -2
- package/dist/server.js +326 -53
- package/dist/sign-ins-secrets.js +4 -1
- package/dist/skills/agentrun-serve/SKILL.md +11 -0
- package/dist/slack-url.d.ts +5 -0
- package/dist/slack-url.js +11 -0
- package/dist/slack.d.ts +107 -0
- package/dist/slack.js +292 -0
- package/dist/start-switches.d.ts +28 -0
- package/dist/start-switches.js +37 -0
- package/dist/stats.d.ts +1 -1
- package/dist/stats.js +2 -1
- package/dist/stop-signals.d.ts +11 -0
- package/dist/stop-signals.js +22 -0
- package/dist/store/agent-body.d.ts +1 -1
- package/dist/store/agent-body.js +2 -2
- package/dist/store/index.d.ts +3 -3
- package/dist/store/index.js +1 -1
- package/dist/store/postgres/migrations/0020_runners.sql +18 -0
- package/dist/store/postgres/store.d.ts +1 -1
- package/dist/store/postgres/store.js +4 -2
- package/dist/store/schema.d.ts +13 -5
- package/dist/store/schema.js +20 -11
- package/dist/store/seal.d.ts +16 -4
- package/dist/store/sqlite/store.d.ts +1 -1
- package/dist/store/sqlite/store.js +106 -27
- package/dist/store/store.d.ts +75 -23
- package/dist/store/store.js +11 -0
- package/dist/store-reads/analytics.js +3 -2
- package/dist/store-reads/cap.d.ts +7 -0
- package/dist/store-reads/cap.js +11 -1
- package/dist/store-reads/journal.js +27 -1
- package/dist/store-reads/learning.d.ts +23 -2
- package/dist/store-reads/learning.js +29 -8
- package/dist/store-reads/runs.d.ts +9 -0
- package/dist/store-reads/runs.js +19 -6
- package/dist/store-reads/stats.d.ts +4 -1
- package/dist/store-reads/stats.js +15 -6
- package/dist/store-view.d.ts +123 -14
- package/dist/store-view.js +154 -21
- package/dist/telemetry.d.ts +7 -7
- package/dist/telemetry.js +38 -15
- package/dist/templates.d.ts +6 -3
- package/dist/templates.js +38 -3
- package/dist/timeline/timeline.js +18 -0
- package/dist/tool-keys-store.js +2 -2
- package/dist/tool-keys.js +2 -1
- package/dist/tool-plane.js +2 -2
- package/dist/trigger-adapter.d.ts +3 -4
- package/dist/trigger-adapter.js +2 -2
- package/dist/trigger-composio.js +3 -3
- package/dist/trigger-email.js +0 -2
- package/dist/trigger-feed.js +0 -2
- package/dist/trigger-schedule.js +3 -0
- package/dist/trigger-secrets-shown.d.ts +6 -3
- package/dist/trigger-secrets-shown.js +22 -13
- package/dist/trigger-targets.d.ts +1 -1
- package/dist/trigger-targets.js +19 -8
- package/dist/triggers.d.ts +7 -3
- package/dist/triggers.js +2 -1
- package/dist/webhooks.d.ts +85 -9
- package/dist/webhooks.js +129 -46
- package/dist/wires.d.ts +6 -1
- package/dist/wires.js +5 -0
- package/dist/workspace/attach.d.ts +3 -2
- package/dist/workspace/attach.js +2 -1
- package/dist/workspace/attached-computers.d.ts +6 -8
- package/dist/workspace/attached-computers.js +27 -24
- package/dist/workspace/computer-deps.d.ts +2 -3
- package/dist/workspace/computer-deps.js +3 -6
- package/dist/workspace/computer-for-claim.js +72 -96
- package/dist/workspace/computer-kept.d.ts +0 -7
- package/dist/workspace/computer-kept.js +0 -17
- package/dist/workspace/resolve-computer.d.ts +18 -14
- package/dist/workspace/resolve-computer.js +47 -60
- package/dist/workspace/synced-folder.d.ts +20 -15
- package/dist/workspace/synced-folder.js +33 -43
- package/launcher/agentrun-serve +4 -1
- package/package.json +10 -10
- package/skills/agentrun-serve/SKILL.md +11 -0
- package/templates/README.md +1 -1
- package/templates/inbound-lead/agent.md +2 -1
- package/templates/kyb/agent.md +2 -1
- package/dist/console/assets/index-3O2Yl6hZ.js +0 -701
- package/dist/console/assets/index-DaFsZuzQ.css +0 -1
package/dist/harness-archive.js
CHANGED
|
@@ -4,10 +4,12 @@
|
|
|
4
4
|
// first-use install does (harness-install.ts):
|
|
5
5
|
// - the archive is downloaded with node's fetch into a fresh folder beside `<data>/harnesses/<harness>`, its sha256
|
|
6
6
|
// taken as it arrives, and refused unless it is the pin's before anything reads it;
|
|
7
|
-
// - the verified archive is unpacked there by the system's tar (`tar -xjf
|
|
8
|
-
// environment of PATH alone): node has no bzip2 of its own, and the
|
|
9
|
-
//
|
|
10
|
-
//
|
|
7
|
+
// - the verified archive is unpacked there by the system's tar (`tar -xjf` for Goose's tar.bz2, `-xzf` for Cursor's
|
|
8
|
+
// tar.gz; a fixed argument list, no shell, an environment of PATH alone): node has no bzip2 of its own, and the
|
|
9
|
+
// repository carries none;
|
|
10
|
+
// - the binary's sha256 is checked there against the pin, and where the pin holds one the digest of every file beside
|
|
11
|
+
// it (Cursor's launcher runs its own node on a hundred files of code), and only then is the folder renamed into place
|
|
12
|
+
// and made read-only. What was there before goes aside first, then away;
|
|
11
13
|
// - a crash part way leaves that fresh folder (its name the sweep's) and never a half install: the next install removes it.
|
|
12
14
|
// One install at a time on a data directory, under the hold first-use installs take (takeHold). The installer is handed no
|
|
13
15
|
// key of the server's: fetch carries no header of ours, and tar's environment is PATH alone.
|
|
@@ -34,6 +36,10 @@ export const ARCHIVE_CODES = Object.freeze({
|
|
|
34
36
|
/** Another install into the same data directory is running. */
|
|
35
37
|
busy: "HARNESS_INSTALL_BUSY",
|
|
36
38
|
});
|
|
39
|
+
/** How tar unpacks each format this installer takes: node has neither bzip2 nor a tar of its own. */
|
|
40
|
+
const TAR_FLAG = Object.freeze({ "tar.bz2": "-xjf", "tar.gz": "-xzf" });
|
|
41
|
+
/** The formats this installer unpacks, the one list a recipe's loader checks a release against (harness-recipe.ts). */
|
|
42
|
+
export const ARCHIVE_FORMATS = Object.freeze(Object.keys(TAR_FLAG));
|
|
37
43
|
/** A failed install, by its code (ARCHIVE_CODES): its message says why, and the command that tries again. */
|
|
38
44
|
export class ArchiveInstallFailed extends Error {
|
|
39
45
|
code;
|
|
@@ -54,7 +60,7 @@ export function archivePlatform(platform = process.platform, arch = process.arch
|
|
|
54
60
|
return os && cpu ? `${os}-${cpu}` : undefined;
|
|
55
61
|
}
|
|
56
62
|
/** The sha256 of the file at `path`, read a chunk at a time. */
|
|
57
|
-
async function digestOf(path) {
|
|
63
|
+
export async function digestOf(path) {
|
|
58
64
|
const hash = createHash("sha256");
|
|
59
65
|
await pipeline(createReadStream(path), hash);
|
|
60
66
|
return hash.digest("hex");
|
|
@@ -76,16 +82,24 @@ export async function installArchive(harness, dir, options = {}) {
|
|
|
76
82
|
const release = platform ? harness.pin.archives[platform] : undefined;
|
|
77
83
|
if (!platform || !release)
|
|
78
84
|
throw fail(ARCHIVE_CODES.platform, `${named} has no release pinned for ${platform ?? `${process.platform}-${process.arch}`}`);
|
|
79
|
-
if (!release.binarySha256)
|
|
85
|
+
if (!release.binarySha256 && !options.binaryRecord)
|
|
80
86
|
throw fail(ARCHIVE_CODES.platform, `${named}'s binary on ${platform} has no sha256 pinned, so what its archive unpacks to cannot be checked`);
|
|
81
|
-
|
|
82
|
-
|
|
87
|
+
const flag = TAR_FLAG[release.format];
|
|
88
|
+
if (!flag || !Object.hasOwn(TAR_FLAG, release.format))
|
|
89
|
+
throw fail(ARCHIVE_CODES.platform, `${named}'s archive on ${platform} is ${release.format}, and this installer unpacks ${ARCHIVE_FORMATS.join(" and ")} alone`);
|
|
90
|
+
if (release.treeSha256 && !harness.tree)
|
|
91
|
+
throw fail(ARCHIVE_CODES.platform, `${named}'s files on ${platform} are pinned by a tree digest, and this install was given no way to take one`);
|
|
83
92
|
const binary = binaryUnder(dir, release.cmd);
|
|
84
93
|
if (!binary)
|
|
85
94
|
throw fail(ARCHIVE_CODES.platform, `${named}'s pinned path ${release.cmd} is not inside its folder`);
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
95
|
+
// The pin's digest, else the first one recorded (none before the first install).
|
|
96
|
+
const pinned = release.binarySha256 ?? options.binaryRecord?.read();
|
|
97
|
+
/** Whether the pinned binary is in place: a file whose sha256 is the pin's, in a folder whose tree is the pin's where
|
|
98
|
+
* it pins one. */
|
|
99
|
+
const inPlace = async () => pinned !== undefined &&
|
|
100
|
+
(await lstat(binary).catch(() => undefined)) !== undefined &&
|
|
101
|
+
(await digestOf(binary).catch(() => undefined)) === pinned &&
|
|
102
|
+
(!release.treeSha256 || (await harness.tree(dir).catch(() => undefined)) === release.treeSha256);
|
|
89
103
|
if (await inPlace())
|
|
90
104
|
return { installed: "already", binary };
|
|
91
105
|
const parent = dirname(dir);
|
|
@@ -101,7 +115,7 @@ export async function installArchive(harness, dir, options = {}) {
|
|
|
101
115
|
// What an earlier install left part way (a crash between the unpack and the rename): never read, removed now.
|
|
102
116
|
await sweepLeftovers(dir);
|
|
103
117
|
work = await mkdtemp(join(parent, leftoverPrefix(dir)));
|
|
104
|
-
const archive = join(work,
|
|
118
|
+
const archive = join(work, `archive.${release.format}`);
|
|
105
119
|
const timeoutMs = options.timeoutMs ?? ARCHIVE_TIMEOUT_MS;
|
|
106
120
|
const maxBytes = options.maxBytes ?? ARCHIVE_MAX_BYTES;
|
|
107
121
|
// The download, hashed as it is written; refused past its limit.
|
|
@@ -140,7 +154,7 @@ export async function installArchive(harness, dir, options = {}) {
|
|
|
140
154
|
await mkdir(tree);
|
|
141
155
|
const PATH = (options.env ?? process.env).PATH ?? "/usr/bin:/bin";
|
|
142
156
|
await new Promise((done, reject) => {
|
|
143
|
-
execFile(options.tar ?? "tar", [
|
|
157
|
+
execFile(options.tar ?? "tar", [flag, archive, "-C", tree, "--no-same-owner", "--no-same-permissions"], { env: { PATH, LC_ALL: "C" }, timeout: timeoutMs, maxBuffer: 1024 * 1024 }, (error, _stdout, stderr) => {
|
|
144
158
|
if (error)
|
|
145
159
|
reject(fail(ARCHIVE_CODES.unpack, `tar could not unpack ${named}'s archive: ${String(stderr).trim() || error.message}`));
|
|
146
160
|
else
|
|
@@ -154,8 +168,28 @@ export async function installArchive(harness, dir, options = {}) {
|
|
|
154
168
|
if (!found?.isFile())
|
|
155
169
|
throw fail(ARCHIVE_CODES.unpack, `${named}'s archive holds no file at ${release.cmd}`);
|
|
156
170
|
const binarySha = await digestOf(unpacked);
|
|
157
|
-
if (
|
|
158
|
-
|
|
171
|
+
if (pinned === undefined) {
|
|
172
|
+
// The first binary unpacked from the verified archive: recorded, so a later one that differs is refused. A record
|
|
173
|
+
// another install wrote first holds.
|
|
174
|
+
try {
|
|
175
|
+
options.binaryRecord.write(binarySha);
|
|
176
|
+
}
|
|
177
|
+
catch (error) {
|
|
178
|
+
if (error?.code !== "EEXIST")
|
|
179
|
+
throw error;
|
|
180
|
+
const first = options.binaryRecord.read();
|
|
181
|
+
if (first !== binarySha)
|
|
182
|
+
throw fail(ARCHIVE_CODES.binary, `${named}'s binary from its archive has sha256 ${binarySha}, and the first one recorded is ${first}; it was not put in place`);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
else if (binarySha !== pinned)
|
|
186
|
+
throw fail(ARCHIVE_CODES.binary, `${named}'s binary from its archive has sha256 ${binarySha}, and the ${release.binarySha256 ? "pin" : "first one recorded"} is ${pinned}; it was not put in place`);
|
|
187
|
+
// Every file beside it, where the pin holds their digest: a launcher's code is as much the harness as the launcher.
|
|
188
|
+
if (release.treeSha256) {
|
|
189
|
+
const treeSha = await harness.tree(tree);
|
|
190
|
+
if (treeSha !== release.treeSha256)
|
|
191
|
+
throw fail(ARCHIVE_CODES.binary, `${named}'s files from its archive have the tree sha256 ${treeSha}, and the pin is ${release.treeSha256}; they were not put in place`);
|
|
192
|
+
}
|
|
159
193
|
await options.onStep?.("verified");
|
|
160
194
|
// Into place whole: what was there (a binary that is not the pin's, a folder by hand) goes aside first, then away.
|
|
161
195
|
const old = existsSync(dir) ? `${work}-old` : undefined;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
export declare const CHECK_DEFAULT_CAP_USD = 0.25;
|
|
2
|
+
export interface HarnessCheckOptions {
|
|
3
|
+
/** The recipe file. */
|
|
4
|
+
recipe: string;
|
|
5
|
+
/** The data directory its owner installed it into. */
|
|
6
|
+
data: string;
|
|
7
|
+
/** The run's model, `provider/model-id` (a proxy-billed recipe needs one). */
|
|
8
|
+
model?: string;
|
|
9
|
+
/** The process's environment with its secrets (withSecrets): the provider's key, the recipe's own keys. */
|
|
10
|
+
env: NodeJS.ProcessEnv;
|
|
11
|
+
/** The most the check may spend, USD. */
|
|
12
|
+
capUsd?: number;
|
|
13
|
+
platform?: string;
|
|
14
|
+
/** For tests: the fetch the model proxy forwards with. */
|
|
15
|
+
fetch?: typeof fetch;
|
|
16
|
+
/** Each step as it happens, a line of words. */
|
|
17
|
+
say?: (line: string) => void;
|
|
18
|
+
turnMs?: number;
|
|
19
|
+
}
|
|
20
|
+
type Check = {
|
|
21
|
+
ok: boolean | null;
|
|
22
|
+
[field: string]: unknown;
|
|
23
|
+
};
|
|
24
|
+
export interface HarnessCheckReport {
|
|
25
|
+
ok: boolean;
|
|
26
|
+
recipe: {
|
|
27
|
+
id: string;
|
|
28
|
+
label: string;
|
|
29
|
+
file: string;
|
|
30
|
+
sha256: string;
|
|
31
|
+
} | {
|
|
32
|
+
file: string;
|
|
33
|
+
};
|
|
34
|
+
refused?: {
|
|
35
|
+
code: string;
|
|
36
|
+
message: string;
|
|
37
|
+
};
|
|
38
|
+
platform?: string;
|
|
39
|
+
model?: string;
|
|
40
|
+
binary?: {
|
|
41
|
+
path: string;
|
|
42
|
+
sha256: string;
|
|
43
|
+
pinnedBy: "recipe" | "first-seen";
|
|
44
|
+
};
|
|
45
|
+
stage2?: Record<string, Check>;
|
|
46
|
+
stage3?: Record<string, Check>;
|
|
47
|
+
facts?: {
|
|
48
|
+
resume: "load" | "restart" | "unknown";
|
|
49
|
+
tool_gate: "permission" | "config";
|
|
50
|
+
billing: "proxy" | "plan";
|
|
51
|
+
};
|
|
52
|
+
gate?: {
|
|
53
|
+
permissionsAsked: {
|
|
54
|
+
toolCallId: unknown;
|
|
55
|
+
kind: unknown;
|
|
56
|
+
}[];
|
|
57
|
+
asked: {
|
|
58
|
+
tool: string;
|
|
59
|
+
answer: string;
|
|
60
|
+
}[];
|
|
61
|
+
};
|
|
62
|
+
spendUsd?: number | null;
|
|
63
|
+
checkedAt: string;
|
|
64
|
+
failures: string[];
|
|
65
|
+
}
|
|
66
|
+
/** Runs the check. Never throws for what it judges: a refused recipe, a missing install or a failed stage is in the
|
|
67
|
+
* report (`ok: false`, `failures`). */
|
|
68
|
+
export declare function harnessCheck(options: HarnessCheckOptions): Promise<HarnessCheckReport>;
|
|
69
|
+
/** The three facts and the verdict, as the command prints them. */
|
|
70
|
+
export declare function printedFacts(report: HarnessCheckReport): string[];
|
|
71
|
+
/** Writes the report to `file`. */
|
|
72
|
+
export declare const writeReport: (file: string, report: HarnessCheckReport) => Promise<void>;
|
|
73
|
+
export {};
|