@usine/executor 0.2.1 → 0.4.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/LICENSE +661 -21
- package/README.md +212 -37
- package/dist/child-command.d.ts +5 -8
- package/dist/child-command.d.ts.map +1 -1
- package/dist/child-command.js +10 -14
- package/dist/child-command.js.map +1 -1
- package/dist/child-environment.d.ts +19 -0
- package/dist/child-environment.d.ts.map +1 -0
- package/dist/child-environment.js +18 -0
- package/dist/child-environment.js.map +1 -0
- package/dist/claude-login-lock.d.ts +9 -0
- package/dist/claude-login-lock.d.ts.map +1 -0
- package/dist/claude-login-lock.js +15 -0
- package/dist/claude-login-lock.js.map +1 -0
- package/dist/cloudflare/client.d.ts +50 -0
- package/dist/cloudflare/client.d.ts.map +1 -0
- package/dist/cloudflare/client.js +108 -0
- package/dist/cloudflare/client.js.map +1 -0
- package/dist/cloudflare/cloudflare.d.ts +17 -0
- package/dist/cloudflare/cloudflare.d.ts.map +1 -0
- package/dist/cloudflare/cloudflare.js +704 -0
- package/dist/cloudflare/cloudflare.js.map +1 -0
- package/dist/cloudflare/model.d.ts +42 -0
- package/dist/cloudflare/model.d.ts.map +1 -0
- package/dist/cloudflare/model.js +2 -0
- package/dist/cloudflare/model.js.map +1 -0
- package/dist/cloudflare/shell/environment.d.ts +12 -0
- package/dist/cloudflare/shell/environment.d.ts.map +1 -0
- package/dist/cloudflare/shell/environment.js +12 -0
- package/dist/cloudflare/shell/environment.js.map +1 -0
- package/dist/cloudflare/shell/shell.d.ts +2 -0
- package/dist/cloudflare/shell/shell.d.ts.map +1 -0
- package/dist/cloudflare/shell/shell.js +155 -0
- package/dist/cloudflare/shell/shell.js.map +1 -0
- package/dist/credential-environment.d.ts +20 -0
- package/dist/credential-environment.d.ts.map +1 -0
- package/dist/credential-environment.js +20 -0
- package/dist/credential-environment.js.map +1 -0
- package/dist/durable-session.d.ts +81 -0
- package/dist/durable-session.d.ts.map +1 -0
- package/dist/durable-session.js +550 -0
- package/dist/durable-session.js.map +1 -0
- package/dist/exe-dev/commands.d.ts +23 -13
- package/dist/exe-dev/commands.d.ts.map +1 -1
- package/dist/exe-dev/commands.js +11 -57
- package/dist/exe-dev/commands.js.map +1 -1
- package/dist/exe-dev/exe-dev.d.ts +9 -3
- package/dist/exe-dev/exe-dev.d.ts.map +1 -1
- package/dist/exe-dev/exe-dev.js +61 -128
- package/dist/exe-dev/exe-dev.js.map +1 -1
- package/dist/exe-dev/grants.d.ts.map +1 -1
- package/dist/exe-dev/grants.js +35 -15
- package/dist/exe-dev/grants.js.map +1 -1
- package/dist/exe-dev/model.d.ts +15 -19
- package/dist/exe-dev/model.d.ts.map +1 -1
- package/dist/exe-dev/model.js +9 -12
- package/dist/exe-dev/model.js.map +1 -1
- package/dist/exe-dev/preflight.d.ts +8 -4
- package/dist/exe-dev/preflight.d.ts.map +1 -1
- package/dist/exe-dev/preflight.js +26 -35
- package/dist/exe-dev/preflight.js.map +1 -1
- package/dist/executor.d.ts +292 -44
- package/dist/executor.d.ts.map +1 -1
- package/dist/executor.js +187 -19
- package/dist/executor.js.map +1 -1
- package/dist/guard.d.ts +57 -7
- package/dist/guard.d.ts.map +1 -1
- package/dist/guard.js +274 -59
- package/dist/guard.js.map +1 -1
- package/dist/harness-preflight.d.ts +27 -5
- package/dist/harness-preflight.d.ts.map +1 -1
- package/dist/harness-preflight.js +32 -31
- package/dist/harness-preflight.js.map +1 -1
- package/dist/keyed-lock.d.ts +2 -3
- package/dist/keyed-lock.d.ts.map +1 -1
- package/dist/keyed-lock.js +2 -3
- package/dist/keyed-lock.js.map +1 -1
- package/dist/leftovers.d.ts +9 -0
- package/dist/leftovers.d.ts.map +1 -0
- package/dist/leftovers.js +14 -0
- package/dist/leftovers.js.map +1 -0
- package/dist/local/credentials.d.ts +21 -0
- package/dist/local/credentials.d.ts.map +1 -0
- package/dist/local/credentials.js +39 -0
- package/dist/local/credentials.js.map +1 -0
- package/dist/local/leftovers.d.ts +8 -0
- package/dist/local/leftovers.d.ts.map +1 -0
- package/dist/local/leftovers.js +23 -0
- package/dist/local/leftovers.js.map +1 -0
- package/dist/local/local.d.ts +17 -11
- package/dist/local/local.d.ts.map +1 -1
- package/dist/local/local.js +205 -132
- package/dist/local/local.js.map +1 -1
- package/dist/memory-preflight.d.ts +27 -0
- package/dist/memory-preflight.d.ts.map +1 -0
- package/dist/memory-preflight.js +83 -0
- package/dist/memory-preflight.js.map +1 -0
- package/dist/pre-push-hook.d.ts +20 -0
- package/dist/pre-push-hook.d.ts.map +1 -0
- package/dist/pre-push-hook.js +33 -0
- package/dist/pre-push-hook.js.map +1 -0
- package/dist/prepared-attempt.d.ts +41 -3
- package/dist/prepared-attempt.d.ts.map +1 -1
- package/dist/prepared-attempt.js +109 -31
- package/dist/prepared-attempt.js.map +1 -1
- package/dist/provision.d.ts +129 -15
- package/dist/provision.d.ts.map +1 -1
- package/dist/provision.js +428 -69
- package/dist/provision.js.map +1 -1
- package/dist/remote/commands.d.ts +51 -0
- package/dist/remote/commands.d.ts.map +1 -0
- package/dist/remote/commands.js +94 -0
- package/dist/remote/commands.js.map +1 -0
- package/dist/remote/container.d.ts +90 -0
- package/dist/remote/container.d.ts.map +1 -0
- package/dist/remote/container.js +480 -0
- package/dist/remote/container.js.map +1 -0
- package/dist/remote/leftovers.d.ts +14 -0
- package/dist/remote/leftovers.d.ts.map +1 -0
- package/dist/remote/leftovers.js +22 -0
- package/dist/remote/leftovers.js.map +1 -0
- package/dist/remote/liveness.d.ts +33 -0
- package/dist/remote/liveness.d.ts.map +1 -0
- package/dist/remote/liveness.js +196 -0
- package/dist/remote/liveness.js.map +1 -0
- package/dist/remote/machine.d.ts +110 -0
- package/dist/remote/machine.d.ts.map +1 -0
- package/dist/remote/machine.js +2 -0
- package/dist/remote/machine.js.map +1 -0
- package/dist/remote/remote.d.ts +28 -0
- package/dist/remote/remote.d.ts.map +1 -0
- package/dist/remote/remote.js +556 -0
- package/dist/remote/remote.js.map +1 -0
- package/dist/remote/sweep.d.ts +17 -0
- package/dist/remote/sweep.d.ts.map +1 -0
- package/dist/remote/sweep.js +117 -0
- package/dist/remote/sweep.js.map +1 -0
- package/dist/renewable-credential.d.ts +17 -0
- package/dist/renewable-credential.d.ts.map +1 -0
- package/dist/renewable-credential.js +58 -0
- package/dist/renewable-credential.js.map +1 -0
- package/dist/salvage.d.ts +38 -0
- package/dist/salvage.d.ts.map +1 -0
- package/dist/salvage.js +198 -0
- package/dist/salvage.js.map +1 -0
- package/dist/ssh/api-keys.d.ts +36 -0
- package/dist/ssh/api-keys.d.ts.map +1 -0
- package/dist/ssh/api-keys.js +72 -0
- package/dist/ssh/api-keys.js.map +1 -0
- package/dist/ssh/codex-homes.d.ts +21 -0
- package/dist/ssh/codex-homes.d.ts.map +1 -0
- package/dist/ssh/codex-homes.js +78 -0
- package/dist/ssh/codex-homes.js.map +1 -0
- package/dist/ssh/container.d.ts +32 -0
- package/dist/ssh/container.d.ts.map +1 -0
- package/dist/ssh/container.js +282 -0
- package/dist/ssh/container.js.map +1 -0
- package/dist/ssh/credentials.d.ts +43 -0
- package/dist/ssh/credentials.d.ts.map +1 -0
- package/dist/ssh/credentials.js +86 -0
- package/dist/ssh/credentials.js.map +1 -0
- package/dist/ssh/gateway/admin.d.ts +45 -0
- package/dist/ssh/gateway/admin.d.ts.map +1 -0
- package/dist/ssh/gateway/admin.js +129 -0
- package/dist/ssh/gateway/admin.js.map +1 -0
- package/dist/ssh/gateway/attachments.d.ts +31 -0
- package/dist/ssh/gateway/attachments.d.ts.map +1 -0
- package/dist/ssh/gateway/attachments.js +168 -0
- package/dist/ssh/gateway/attachments.js.map +1 -0
- package/dist/ssh/gateway/environment.d.ts +71 -0
- package/dist/ssh/gateway/environment.d.ts.map +1 -0
- package/dist/ssh/gateway/environment.js +148 -0
- package/dist/ssh/gateway/environment.js.map +1 -0
- package/dist/ssh/gateway/forward.d.ts +74 -0
- package/dist/ssh/gateway/forward.d.ts.map +1 -0
- package/dist/ssh/gateway/forward.js +247 -0
- package/dist/ssh/gateway/forward.js.map +1 -0
- package/dist/ssh/gateway/preflight.d.ts +67 -0
- package/dist/ssh/gateway/preflight.d.ts.map +1 -0
- package/dist/ssh/gateway/preflight.js +320 -0
- package/dist/ssh/gateway/preflight.js.map +1 -0
- package/dist/ssh/limits.d.ts +60 -0
- package/dist/ssh/limits.d.ts.map +1 -0
- package/dist/ssh/limits.js +84 -0
- package/dist/ssh/limits.js.map +1 -0
- package/dist/ssh/model.d.ts +153 -0
- package/dist/ssh/model.d.ts.map +1 -0
- package/dist/ssh/model.js +2 -0
- package/dist/ssh/model.js.map +1 -0
- package/dist/ssh/preflight.d.ts +35 -0
- package/dist/ssh/preflight.d.ts.map +1 -0
- package/dist/ssh/preflight.js +87 -0
- package/dist/ssh/preflight.js.map +1 -0
- package/dist/ssh/provisioner/boat.d.ts +33 -0
- package/dist/ssh/provisioner/boat.d.ts.map +1 -0
- package/dist/ssh/provisioner/boat.js +247 -0
- package/dist/ssh/provisioner/boat.js.map +1 -0
- package/dist/ssh/provisioner/hetzner.d.ts +32 -0
- package/dist/ssh/provisioner/hetzner.d.ts.map +1 -0
- package/dist/ssh/provisioner/hetzner.js +337 -0
- package/dist/ssh/provisioner/hetzner.js.map +1 -0
- package/dist/ssh/provisioner/host-key.d.ts +11 -0
- package/dist/ssh/provisioner/host-key.d.ts.map +1 -0
- package/dist/ssh/provisioner/host-key.js +57 -0
- package/dist/ssh/provisioner/host-key.js.map +1 -0
- package/dist/ssh/provisioner/http.d.ts +45 -0
- package/dist/ssh/provisioner/http.d.ts.map +1 -0
- package/dist/ssh/provisioner/http.js +72 -0
- package/dist/ssh/provisioner/http.js.map +1 -0
- package/dist/ssh/provisioner/machines.d.ts +48 -0
- package/dist/ssh/provisioner/machines.d.ts.map +1 -0
- package/dist/ssh/provisioner/machines.js +686 -0
- package/dist/ssh/provisioner/machines.js.map +1 -0
- package/dist/ssh/provisioner/model.d.ts +92 -0
- package/dist/ssh/provisioner/model.d.ts.map +1 -0
- package/dist/ssh/provisioner/model.js +37 -0
- package/dist/ssh/provisioner/model.js.map +1 -0
- package/dist/ssh/ssh.d.ts +23 -0
- package/dist/ssh/ssh.d.ts.map +1 -0
- package/dist/ssh/ssh.js +145 -0
- package/dist/ssh/ssh.js.map +1 -0
- package/dist/ssh/worker-records.d.ts +18 -0
- package/dist/ssh/worker-records.d.ts.map +1 -0
- package/dist/ssh/worker-records.js +100 -0
- package/dist/ssh/worker-records.js.map +1 -0
- package/dist/ssh/workers.d.ts +80 -0
- package/dist/ssh/workers.d.ts.map +1 -0
- package/dist/ssh/workers.js +247 -0
- package/dist/ssh/workers.js.map +1 -0
- package/package.json +25 -9
- package/dist/exe-dev/channel.d.ts +0 -12
- package/dist/exe-dev/channel.d.ts.map +0 -1
- package/dist/exe-dev/channel.js +0 -42
- package/dist/exe-dev/channel.js.map +0 -1
- package/dist/exe-dev/shell.d.ts +0 -12
- package/dist/exe-dev/shell.d.ts.map +0 -1
- package/dist/exe-dev/shell.js +0 -31
- package/dist/exe-dev/shell.js.map +0 -1
- package/dist/exe-dev/sweep.d.ts +0 -10
- package/dist/exe-dev/sweep.d.ts.map +0 -1
- package/dist/exe-dev/sweep.js +0 -117
- package/dist/exe-dev/sweep.js.map +0 -1
- package/dist/invalid-frame.d.ts +0 -17
- package/dist/invalid-frame.d.ts.map +0 -1
- package/dist/invalid-frame.js +0 -111
- package/dist/invalid-frame.js.map +0 -1
- package/dist/run-host-session.d.ts +0 -27
- package/dist/run-host-session.d.ts.map +0 -1
- package/dist/run-host-session.js +0 -303
- package/dist/run-host-session.js.map +0 -1
|
@@ -1,10 +1,14 @@
|
|
|
1
|
+
import type { RemoteShell } from "@usine/agents/child-host";
|
|
2
|
+
import { ClaudeLoginLock } from "@usine/agents/runtime";
|
|
1
3
|
import type { BrainSpec } from "@usine/core/agent/brain";
|
|
2
4
|
import { Effect } from "effect";
|
|
3
|
-
import {
|
|
5
|
+
import { ChildProcessSpawner } from "effect/process";
|
|
6
|
+
import { ExecutorOperationError, WorkerCapabilityError } from "../executor.ts";
|
|
4
7
|
import type { ExeDevCommands } from "./commands.ts";
|
|
5
8
|
import { type ExeDevExecutorOptions, type VmState } from "./model.ts";
|
|
6
|
-
export declare const preflightFor: (options: ExeDevExecutorOptions, commands: ExeDevCommands
|
|
7
|
-
preflight: (worker: string & import("effect/Brand").Brand<"WorkerName">, brains: readonly BrainSpec[]) => Effect.Effect<
|
|
9
|
+
export declare const preflightFor: (options: ExeDevExecutorOptions, commands: ExeDevCommands) => Effect.Effect<{
|
|
10
|
+
preflight: (worker: string & import("effect/Brand").Brand<"WorkerName">, brains: readonly BrainSpec[], maxConcurrentAttempts: number) => Effect.Effect<import("../executor.ts").PreflightReport, import("../executor.ts").CredentialUnavailableError | ExecutorOperationError | WorkerCapabilityError, never>;
|
|
8
11
|
vmFor: (worker: string & import("effect/Brand").Brand<"WorkerName">) => Effect.Effect<VmState, ExecutorOperationError | WorkerCapabilityError, never>;
|
|
9
|
-
|
|
12
|
+
harnessProbe: (shell: RemoteShell) => import("../harness-preflight.ts").HarnessProbe;
|
|
13
|
+
}, never, ChildProcessSpawner.ChildProcessSpawner | ClaudeLoginLock>;
|
|
10
14
|
//# sourceMappingURL=preflight.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preflight.d.ts","sourceRoot":"","sources":["../../src/exe-dev/preflight.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"preflight.d.ts","sourceRoot":"","sources":["../../src/exe-dev/preflight.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEzD,OAAO,EAAE,MAAM,EAAuB,MAAM,QAAQ,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EACL,sBAAsB,EAGtB,qBAAqB,EAEtB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAY,KAAK,qBAAqB,EAAE,KAAK,OAAO,EAAE,MAAM,YAAY,CAAC;AAkBhF,eAAO,MAAM,YAAY;;;0BASM,WAAW;oEA2HxC,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { WorkerName } from "@usine/core/worker";
|
|
3
|
-
import { Effect, Ref, Schema } from "effect";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
1
|
+
import { ClaudeLoginLock } from "@usine/agents/runtime";
|
|
2
|
+
import { SshDestination, WorkerName } from "@usine/core/worker";
|
|
3
|
+
import { Effect, Option, Ref, Schema } from "effect";
|
|
4
|
+
import { ChildProcessSpawner } from "effect/process";
|
|
5
|
+
import { ExecutorOperationError, fullPreflight, logPreflightFailure, WorkerCapabilityError, } from "../executor.js";
|
|
6
|
+
import { agentsHarnessProbe, verifyHarnessReadiness } from "../harness-preflight.js";
|
|
7
|
+
import { verifyLinuxMemory } from "../memory-preflight.js";
|
|
8
|
+
import { HomePath } from "./model.js";
|
|
8
9
|
const Vm = Schema.Struct({
|
|
9
10
|
vmName: Schema.NonEmptyString,
|
|
10
11
|
sshDest: SshDestination,
|
|
@@ -14,45 +15,38 @@ const VmList = Schema.Struct({ vms: Schema.Array(Vm) });
|
|
|
14
15
|
const decodeVmList = Schema.decodeUnknownEffect(Schema.fromJsonString(VmList));
|
|
15
16
|
const decodeHome = Schema.decodeUnknownEffect(HomePath);
|
|
16
17
|
const capabilityError = (worker, capability, message, cause) => new WorkerCapabilityError({ worker, capability, message, cause });
|
|
17
|
-
export const preflightFor = Effect.fn("ExeDevExecutor.preflightFor")(function* (options, commands
|
|
18
|
+
export const preflightFor = Effect.fn("ExeDevExecutor.preflightFor")(function* (options, commands) {
|
|
19
|
+
const spawner = yield* ChildProcessSpawner.ChildProcessSpawner;
|
|
20
|
+
const logins = yield* ClaudeLoginLock;
|
|
18
21
|
const workers = yield* Ref.make(new Map());
|
|
22
|
+
/** Returns a harness probe that runs on the VM with no extra environment variables. */
|
|
23
|
+
const harnessProbe = (shell) => agentsHarnessProbe(spawner, shell, {});
|
|
19
24
|
const resolveVm = Effect.fn("ExeDevExecutor.resolveVm")(function* (worker) {
|
|
20
25
|
const response = yield* commands.lobbyJson("preflight", ["ls", worker]);
|
|
21
|
-
const decoded = yield* decodeVmList(response).pipe(Effect.mapError((cause) => capabilityError(worker, "machine", `exe.dev returned invalid machine metadata for
|
|
26
|
+
const decoded = yield* decodeVmList(response).pipe(Effect.mapError((cause) => capabilityError(worker, "machine", `exe.dev returned invalid machine metadata for worker "${worker}"`, cause)));
|
|
22
27
|
const vm = decoded.vms.find(({ vmName }) => vmName === worker);
|
|
23
28
|
if (vm === undefined) {
|
|
24
|
-
return yield* capabilityError(worker, "machine", `exe.dev has no VM named ${worker}`, new Error("worker VM missing"));
|
|
29
|
+
return yield* capabilityError(worker, "machine", `exe.dev has no VM named "${worker}"`, new Error("worker VM missing"));
|
|
25
30
|
}
|
|
26
31
|
if (vm.status !== "running") {
|
|
27
|
-
return yield* capabilityError(worker, "machine", `exe.dev VM ${worker} is ${vm.status}, not running`, new Error(`VM status: ${vm.status}`));
|
|
32
|
+
return yield* capabilityError(worker, "machine", `exe.dev VM "${worker}" is ${vm.status}, not running`, new Error(`VM status: ${vm.status}`));
|
|
28
33
|
}
|
|
29
34
|
const reported = (yield* commands.remote("preflight", vm.sshDest, "printenv", ["HOME"])).trim();
|
|
30
|
-
const home = yield* decodeHome(reported).pipe(Effect.mapError((cause) => capabilityError(worker, "toolchain", `exe.dev VM ${worker} returned an invalid home directory`, cause)));
|
|
35
|
+
const home = yield* decodeHome(reported).pipe(Effect.mapError((cause) => capabilityError(worker, "toolchain", `exe.dev VM "${worker}" returned an invalid home directory`, cause)));
|
|
31
36
|
return { home, sshDest: vm.sshDest };
|
|
32
37
|
});
|
|
33
38
|
const asCapability = (worker, capability, message, effect) => effect.pipe(Effect.mapError((cause) => capabilityError(worker, capability, message, cause)));
|
|
34
|
-
const preflight = Effect.fn("ExeDevExecutor.preflight")(function* (worker, brains) {
|
|
35
|
-
const vm = yield* resolveVm(worker).pipe(Effect.catchTag("ExecutorOperationError", (cause) => capabilityError(worker, "machine", `
|
|
39
|
+
const preflight = Effect.fn("ExeDevExecutor.preflight")(function* (worker, brains, maxConcurrentAttempts) {
|
|
40
|
+
const vm = yield* resolveVm(worker).pipe(Effect.catchTag("ExecutorOperationError", (cause) => capabilityError(worker, "machine", `Can't reach exe.dev worker "${worker}"`, cause)));
|
|
36
41
|
yield* Effect.annotateCurrentSpan({ worker, host: vm.sshDest });
|
|
37
|
-
const gitVersion = (yield* asCapability(worker, "toolchain", `Worker ${worker}
|
|
42
|
+
const gitVersion = (yield* asCapability(worker, "toolchain", `Worker "${worker}" can't run Git`, commands.remote("preflight", vm.sshDest, "git", ["--version"]))).trim();
|
|
38
43
|
if (!gitVersion.startsWith("git version ")) {
|
|
39
|
-
return yield* capabilityError(worker, "toolchain", `Worker ${worker} returned an unrecognized Git version`, new Error(gitVersion));
|
|
44
|
+
return yield* capabilityError(worker, "toolchain", `Worker "${worker}" returned an unrecognized Git version`, new Error(gitVersion));
|
|
40
45
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
if (!Number.isSafeInteger(nodeMajor) || nodeMajor < MINIMUM_NODE_MAJOR) {
|
|
44
|
-
return yield* capabilityError(worker, "toolchain", `Worker ${worker} has Node.js ${nodeVersion || "unknown"}; expected ${MINIMUM_NODE_MAJOR}+`, new Error("Node.js version mismatch"));
|
|
45
|
-
}
|
|
46
|
-
const protocol = (yield* asCapability(worker, "run-host", `Worker ${worker} cannot run ${runHost.command}`, commands.remote("preflight", vm.sshDest, runHost.command, [
|
|
47
|
-
...runHost.args,
|
|
48
|
-
"--protocol-version",
|
|
49
|
-
]))).trim();
|
|
50
|
-
if (protocol !== String(AttemptChannel.PROTOCOL_VERSION)) {
|
|
51
|
-
return yield* capabilityError(worker, "run-host", `Worker ${worker} has run-host protocol ${protocol || "unknown"}; expected ${AttemptChannel.PROTOCOL_VERSION}`, new Error("run-host protocol mismatch"));
|
|
52
|
-
}
|
|
53
|
-
yield* verifyHarnesses(worker, brains, runHost, (command, args) => commands.remote("preflight", vm.sshDest, command, args));
|
|
46
|
+
yield* verifyLinuxMemory(worker, maxConcurrentAttempts, commands.remote("preflight", vm.sshDest, "cat", ["/proc/meminfo"]));
|
|
47
|
+
yield* verifyHarnessReadiness(worker, Option.none(), brains, harnessProbe(commands.childHost(vm.sshDest)), logins);
|
|
54
48
|
for (const integration of options.githubIntegrations) {
|
|
55
|
-
yield* asCapability(worker, "credentials", `exe.dev GitHub integration ${integration.name}
|
|
49
|
+
yield* asCapability(worker, "credentials", `exe.dev GitHub integration "${integration.name}" isn't ready for ${integration.repository}`, commands.lobby("preflight", ["integrations", "test", integration.name]));
|
|
56
50
|
}
|
|
57
51
|
yield* Ref.update(workers, (current) => {
|
|
58
52
|
const next = new Map(current);
|
|
@@ -63,20 +57,17 @@ export const preflightFor = Effect.fn("ExeDevExecutor.preflightFor")(function* (
|
|
|
63
57
|
worker,
|
|
64
58
|
host: vm.sshDest,
|
|
65
59
|
gitVersion,
|
|
66
|
-
nodeVersion,
|
|
67
|
-
protocolVersion: AttemptChannel.PROTOCOL_VERSION,
|
|
68
60
|
harnesses: [...new Set(brains.map(({ harness }) => harness))].join(","),
|
|
69
61
|
integrations: options.githubIntegrations.length,
|
|
70
62
|
});
|
|
63
|
+
return fullPreflight;
|
|
71
64
|
}, logPreflightFailure);
|
|
72
|
-
// Both resolveVm failures are members of the ExecutorError union prepare
|
|
73
|
-
// reports, so a stopped VM keeps its typed capability shape.
|
|
74
65
|
const vmFor = Effect.fn("ExeDevExecutor.vmFor")(function* (worker) {
|
|
75
66
|
const cached = (yield* Ref.get(workers)).get(worker);
|
|
76
67
|
if (cached !== undefined)
|
|
77
68
|
return cached;
|
|
78
69
|
return yield* resolveVm(worker);
|
|
79
70
|
});
|
|
80
|
-
return { preflight, vmFor };
|
|
71
|
+
return { preflight, vmFor, harnessProbe };
|
|
81
72
|
});
|
|
82
73
|
//# sourceMappingURL=preflight.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preflight.js","sourceRoot":"","sources":["../../src/exe-dev/preflight.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"preflight.js","sourceRoot":"","sources":["../../src/exe-dev/preflight.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EACL,sBAAsB,EACtB,aAAa,EACb,mBAAmB,EACnB,qBAAqB,GAEtB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACrF,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,EAAE,QAAQ,EAA4C,MAAM,YAAY,CAAC;AAEhF,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC,cAAc;IAC7B,OAAO,EAAE,cAAc;IACvB,MAAM,EAAE,MAAM,CAAC,cAAc;CAC9B,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,O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AkB,CAAC,MAAM;SAChD,CAAC,CAAC;QACH,OAAO,aAAa,CAAC;IACvB,CAAC,EAAE,mBAAmB,CAAC,CAAC;IAExB,MAAM,KAAK,GAAG,MAAM,CAAC,EAAE,CAAC,sBAAsB,CAAC,CAAC,QAAQ,CAAC,EAAE,MAAkB;QAC3E,MAAM,MAAM,GAAG,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACrD,IAAI,MAAM,KAAK,SAAS;YAAE,OAAO,MAAM,CAAC;QACxC,OAAO,KAAK,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAClC,CAAC,CAAC,CAAC;IAEH,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC;AAC5C,CAAC,CAAC,CAAC"}
|
package/dist/executor.d.ts
CHANGED
|
@@ -1,122 +1,370 @@
|
|
|
1
|
+
import type { AttemptRecovery, RecoverySink } from "@usine/core/attempt/salvage";
|
|
1
2
|
import { Agent } from "@usine/core/agent";
|
|
2
3
|
import { BrainSpec } from "@usine/core/agent/brain";
|
|
3
|
-
import { AttemptId } from "@usine/core/attempt";
|
|
4
|
+
import { AttemptId, type StopReason } from "@usine/core/attempt";
|
|
4
5
|
import * as AttemptChannel from "@usine/core/attempt/channel";
|
|
5
6
|
import { AttemptFailure } from "@usine/core/attempt/failure";
|
|
7
|
+
import { LoopPermissions } from "@usine/core/loop";
|
|
8
|
+
import { SalvagePushed } from "@usine/core/attempt/salvage";
|
|
6
9
|
import { RepositoryName } from "@usine/core/repository";
|
|
7
|
-
import {
|
|
10
|
+
import { RunId } from "@usine/core/run";
|
|
11
|
+
import { BotAccount, ContainerLimits, WorkerName, WorkerKind } from "@usine/core/worker";
|
|
8
12
|
import { StepResult } from "@usine/core/step/result";
|
|
9
|
-
import { Context, Effect, Redacted, Schema, Scope } from "effect";
|
|
10
|
-
/** The Worker operation that failed during readiness checks or an Attempt's lifecycle. */
|
|
13
|
+
import { Context, Effect, Option, Redacted, type Result, Schema, Scope } from "effect";
|
|
11
14
|
export declare const ExecutorOperation: Schema.Literals<readonly ["preflight", "prepare", "launch", "cancel", "cleanup"]>;
|
|
12
15
|
export type ExecutorOperation = typeof ExecutorOperation.Type;
|
|
13
|
-
|
|
14
|
-
export declare const WorkerCapability: Schema.Literals<readonly ["machine", "toolchain", "run-host", "harness-login", "credentials"]>;
|
|
16
|
+
export declare const WorkerCapability: Schema.Literals<readonly ["machine", "toolchain", "memory", "harness-login", "credentials", "gateway", "container", "provider"]>;
|
|
15
17
|
export type WorkerCapability = typeof WorkerCapability.Type;
|
|
16
18
|
declare const ExecutorOperationError_base: Schema.Class<ExecutorOperationError, Schema.TaggedStruct<"ExecutorOperationError", {
|
|
19
|
+
/** `cleanup` includes removing a checkout, its credential, or credentials left by an earlier process. */
|
|
17
20
|
readonly operation: Schema.Literals<readonly ["preflight", "prepare", "launch", "cancel", "cleanup"]>;
|
|
21
|
+
/** An operator-facing summary without the Worker name. Not part of the contract; branch on `operation`. */
|
|
18
22
|
readonly message: Schema.NonEmptyString;
|
|
23
|
+
/** The underlying failure, for example an `Error` with the command's stderr, or a timeout. */
|
|
19
24
|
readonly cause: Schema.Defect;
|
|
20
25
|
}>, import("effect/Cause").YieldableError>;
|
|
21
|
-
/** A Worker operation failed before its requested work completed. */
|
|
22
26
|
export declare class ExecutorOperationError extends ExecutorOperationError_base {
|
|
23
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* `refused` if a retry gets the same result: the installation doesn't cover the repository,
|
|
30
|
+
* lacks a permission, or is suspended, or an exe.dev Worker has no integration for it.
|
|
31
|
+
* `unreachable` if a retry can succeed: a GitHub outage or rate limit, or no response from a
|
|
32
|
+
* Gateway or exe.dev command.
|
|
33
|
+
*/
|
|
34
|
+
export declare const CredentialUnavailableReason: Schema.Literals<readonly ["refused", "unreachable"]>;
|
|
35
|
+
export type CredentialUnavailableReason = typeof CredentialUnavailableReason.Type;
|
|
24
36
|
declare const CredentialUnavailableError_base: Schema.Class<CredentialUnavailableError, Schema.TaggedStruct<"CredentialUnavailableError", {
|
|
25
37
|
readonly repository: Schema.brand<Schema.String, "RepositoryName">;
|
|
38
|
+
readonly reason: Schema.Literals<readonly ["refused", "unreachable"]>;
|
|
39
|
+
/** An operator-facing summary, including GitHub's reason for a refusal. */
|
|
26
40
|
readonly message: Schema.NonEmptyString;
|
|
41
|
+
/** The underlying failure, for example the GitHub API error from minting the token. */
|
|
27
42
|
readonly cause: Schema.Defect;
|
|
28
43
|
}>, import("effect/Cause").YieldableError>;
|
|
29
|
-
/** A Worker could not obtain access to the repository assigned to an Attempt. */
|
|
30
44
|
export declare class CredentialUnavailableError extends CredentialUnavailableError_base {
|
|
31
45
|
}
|
|
32
46
|
declare const WorkerCapabilityError_base: Schema.Class<WorkerCapabilityError, Schema.TaggedStruct<"WorkerCapabilityError", {
|
|
33
47
|
readonly worker: Schema.brand<Schema.String, "WorkerName">;
|
|
34
|
-
|
|
48
|
+
/**
|
|
49
|
+
* - `machine`: the machine or VM is absent, stopped, or unreachable, or its Worker directory
|
|
50
|
+
* isn't writable.
|
|
51
|
+
* - `toolchain`: Git or a brain's harness doesn't run.
|
|
52
|
+
* - `memory`: less than 1.5 GiB per concurrent Attempt, no swap for more than one, or memory
|
|
53
|
+
* not reported.
|
|
54
|
+
* - `harness-login`: a brain's harness isn't logged in.
|
|
55
|
+
* - `credentials`: an exe.dev integration isn't ready, or the Worker kind can't issue a
|
|
56
|
+
* read-only credential for a `permissions: read` Loop.
|
|
57
|
+
* - `gateway`: the Gateway doesn't respond or isn't reachable from the machine.
|
|
58
|
+
* - `container`: the machine's Docker doesn't respond to the SSH user, the SSH user can use
|
|
59
|
+
* Docker's socket without the `docker` CLI, the Attempt image can't be pulled, or its user ID
|
|
60
|
+
* differs from the SSH user's.
|
|
61
|
+
* - `provider`: a provisioned Worker's provider refuses its token, or its image, SSH key,
|
|
62
|
+
* network, server type, or location doesn't exist there.
|
|
63
|
+
*/
|
|
64
|
+
readonly capability: Schema.Literals<readonly ["machine", "toolchain", "memory", "harness-login", "credentials", "gateway", "container", "provider"]>;
|
|
35
65
|
readonly message: Schema.NonEmptyString;
|
|
66
|
+
/** The observed value, for example unrecognized `git --version` output or the harness readiness report. */
|
|
36
67
|
readonly cause: Schema.Defect;
|
|
37
68
|
}>, import("effect/Cause").YieldableError>;
|
|
38
|
-
/**
|
|
69
|
+
/** The error when preflight finds a Worker capability missing or incompatible. */
|
|
39
70
|
export declare class WorkerCapabilityError extends WorkerCapabilityError_base {
|
|
40
71
|
}
|
|
41
|
-
/**
|
|
72
|
+
/**
|
|
73
|
+
* `capacity` if the provider has no machine of the configured type now, `quota` if the account's
|
|
74
|
+
* limits are reached, `refused` if the provider refuses the token or the request, `provider` for
|
|
75
|
+
* an API error or rate limit, `unreachable` if the API doesn't respond, and `timeout` if the
|
|
76
|
+
* machine didn't answer over SSH in time. Each is retried later.
|
|
77
|
+
*/
|
|
78
|
+
export declare const MachineUnavailableReason: Schema.Literals<readonly ["capacity", "quota", "refused", "provider", "unreachable", "timeout"]>;
|
|
79
|
+
export type MachineUnavailableReason = typeof MachineUnavailableReason.Type;
|
|
80
|
+
declare const MachineUnavailableError_base: Schema.Class<MachineUnavailableError, Schema.TaggedStruct<"MachineUnavailableError", {
|
|
81
|
+
readonly worker: Schema.brand<Schema.String, "WorkerName">;
|
|
82
|
+
readonly provider: Schema.Literals<readonly ["hetzner", "boat"]>;
|
|
83
|
+
readonly reason: Schema.Literals<readonly ["capacity", "quota", "refused", "provider", "unreachable", "timeout"]>;
|
|
84
|
+
/** An operator-facing summary with the provider's own message. Contains no token. */
|
|
85
|
+
readonly message: Schema.NonEmptyString;
|
|
86
|
+
}>, import("effect/Cause").YieldableError>;
|
|
87
|
+
/**
|
|
88
|
+
* The error when a provisioned Worker can't create a machine for an Attempt. The Run keeps
|
|
89
|
+
* waiting, and the scheduler tries again later; it isn't an Attempt failure.
|
|
90
|
+
*/
|
|
91
|
+
export declare class MachineUnavailableError extends MachineUnavailableError_base {
|
|
92
|
+
}
|
|
42
93
|
export declare const ExecutorError: Schema.Union<readonly [typeof ExecutorOperationError, typeof CredentialUnavailableError, typeof WorkerCapabilityError]>;
|
|
43
94
|
export type ExecutorError = typeof ExecutorError.Type;
|
|
44
|
-
/**
|
|
45
|
-
export
|
|
46
|
-
/**
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
95
|
+
/** The outcome of a preflight that found every capability that Attempts need. */
|
|
96
|
+
export interface PreflightReport {
|
|
97
|
+
/**
|
|
98
|
+
* Why the Worker runs Attempts without a capability that keeps them apart, such as an SSH
|
|
99
|
+
* Worker whose machine has no Docker. `None` if it has every such capability.
|
|
100
|
+
*/
|
|
101
|
+
readonly degraded: Option.Option<string>;
|
|
102
|
+
/**
|
|
103
|
+
* When the brains are checked instead, if the preflight had no machine to check them on, as
|
|
104
|
+
* for a provisioned Worker, which checks them on its first machine each day. `None` if the
|
|
105
|
+
* preflight checked them.
|
|
106
|
+
*/
|
|
107
|
+
readonly deferred: Option.Option<string>;
|
|
108
|
+
/**
|
|
109
|
+
* The limits of each Attempt container, the ones `usine.yaml` sets and the ones derived from
|
|
110
|
+
* the machine. `None` if the Worker runs no containers or the preflight checked no machine.
|
|
111
|
+
*/
|
|
112
|
+
readonly containerLimits: Option.Option<ContainerLimits>;
|
|
50
113
|
}
|
|
114
|
+
/** The report of a Worker that runs Attempts as designed, without containers. */
|
|
115
|
+
export declare const fullPreflight: PreflightReport;
|
|
116
|
+
/** Logs each preflight failure at error level. */
|
|
117
|
+
export declare const logPreflightFailure: <A, R>(effect: Effect.Effect<A, ExecutorError, R>) => Effect.Effect<A, ExecutorError, R>;
|
|
51
118
|
declare const CheckoutRequest_base: Schema.Class<CheckoutRequest, Schema.Struct<{
|
|
119
|
+
/** The checkout directory name, and the key for `cancel`, `intervene`, `isLive`, and `outcome`. */
|
|
52
120
|
readonly attemptId: Schema.brand<Schema.NonEmptyString, "AttemptId">;
|
|
53
121
|
readonly worker: Schema.brand<Schema.String, "WorkerName">;
|
|
122
|
+
/** The only repository the Attempt's credential can access (ADR 0011). */
|
|
54
123
|
readonly repository: Schema.brand<Schema.String, "RepositoryName">;
|
|
124
|
+
/** The Loop of the Attempt's Run, shown in a `read` checkout's pre-push hook message. */
|
|
125
|
+
readonly loop: Schema.brand<Schema.NonEmptyString, "LoopName">;
|
|
126
|
+
/**
|
|
127
|
+
* The Attempt's access to `repository` (ADR 0011). With `read`, the credential can't push, a
|
|
128
|
+
* pre-push hook explains rejected pushes, and an unsuccessful Attempt's checkout is removed
|
|
129
|
+
* without salvage. A Worker kind that can't issue such a credential fails `prepare` with a
|
|
130
|
+
* `credentials` capability error.
|
|
131
|
+
*/
|
|
132
|
+
readonly permissions: Schema.Literals<readonly ["write", "read"]>;
|
|
133
|
+
/** The revision to fetch, resolved to a commit during preparation and stored as the RunSpec's `baseCommit`. */
|
|
55
134
|
readonly revision: Schema.brand<Schema.String, "RepositoryRevision">;
|
|
135
|
+
/** The payload of the event that triggered the Run, included as JSON in the parent's prompt. */
|
|
56
136
|
readonly payload: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
137
|
+
/** The parent's task text, after Loop interpolation or operator amendment. */
|
|
57
138
|
readonly task: Schema.brand<Schema.String, "AttemptTask">;
|
|
139
|
+
/**
|
|
140
|
+
* The Agent whose persona and name go in the parent's prompt and whose brain runs the
|
|
141
|
+
* children. Preparation verifies the brain on the Worker.
|
|
142
|
+
*/
|
|
58
143
|
readonly agent: typeof Agent;
|
|
144
|
+
/**
|
|
145
|
+
* The Pi parent's model. If `None`, uses the configured default model, then the first model
|
|
146
|
+
* with a credential. A model unknown to Pi fails the launch.
|
|
147
|
+
*/
|
|
59
148
|
readonly parentModel: Schema.Option<Schema.brand<Schema.String, "ModelId">>;
|
|
149
|
+
/** The maximum child sessions per Attempt. One more fails the Attempt with `ChildSessionBudgetFailure`. */
|
|
60
150
|
readonly maxChildren: Schema.brand<Schema.Int, "ChildSessionBudget">;
|
|
61
|
-
/**
|
|
62
|
-
readonly maxAttemptMinutes: Schema.Int
|
|
63
|
-
/**
|
|
64
|
-
readonly maxAttemptTokens: Schema.Int
|
|
151
|
+
/** The maximum minutes of Attempt execution, excluding preparation and cleanup, or `None` for no limit. */
|
|
152
|
+
readonly maxAttemptMinutes: Schema.Option<Schema.Int>;
|
|
153
|
+
/** The maximum tokens consumed by the parent and all children, or `None` for no limit. Holds don't pause it. */
|
|
154
|
+
readonly maxAttemptTokens: Schema.Option<Schema.Int>;
|
|
155
|
+
/** The Pi parent's reasoning effort. The launch fails if the model doesn't support it. */
|
|
65
156
|
readonly parentEffort: Schema.Literals<readonly ["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
|
|
157
|
+
/** The ref that unfinished work is pushed to if the Attempt doesn't succeed. */
|
|
158
|
+
readonly salvageRef: Schema.brand<Schema.NonEmptyString, "SalvageRef">;
|
|
159
|
+
/** The previous Attempt's pushed salvage, checked out instead of `revision`. */
|
|
160
|
+
readonly resume: Schema.Option<typeof SalvagePushed>;
|
|
161
|
+
/**
|
|
162
|
+
* Whether the parent task is still live after an orchestrator restart. If true, preparation
|
|
163
|
+
* reuses the existing checkout and launch reattaches to the parent.
|
|
164
|
+
*/
|
|
165
|
+
readonly reattach: Schema.withConstructorDefault<Schema.Boolean>;
|
|
166
|
+
/**
|
|
167
|
+
* The GitHub login the Attempt writes as, copied into the RunSpec; harvesting collects comments
|
|
168
|
+
* by this author. If `None`, harvesting asks GitHub for the credential's login.
|
|
169
|
+
*/
|
|
170
|
+
readonly botLogin: Schema.withConstructorDefault<Schema.Option<Schema.brand<Schema.String, "BotLogin">>>;
|
|
171
|
+
/**
|
|
172
|
+
* The author and committer of every commit that the Attempt's parent and children make. Their
|
|
173
|
+
* environment sets it, so no git config on the Worker's machine applies.
|
|
174
|
+
*/
|
|
175
|
+
readonly commitAuthor: typeof BotAccount;
|
|
66
176
|
}>, {}>;
|
|
67
|
-
/** The repository, revision, and Agent task assigned to a Worker for one fresh Attempt checkout. */
|
|
68
177
|
export declare class CheckoutRequest extends CheckoutRequest_base {
|
|
69
178
|
}
|
|
70
|
-
/** One Attempt's disposable checkout directory. */
|
|
71
179
|
export declare const WorktreePath: Schema.brand<Schema.NonEmptyString, "WorktreePath">;
|
|
72
180
|
export type WorktreePath = typeof WorktreePath.Type;
|
|
73
181
|
declare const AttemptWorkspace_base: Schema.Class<AttemptWorkspace, Schema.Struct<{
|
|
74
182
|
readonly worker: Schema.brand<Schema.String, "WorkerName">;
|
|
183
|
+
/** The request's fields plus the commit that `revision` resolved to. */
|
|
75
184
|
readonly spec: typeof AttemptChannel.RunSpec;
|
|
185
|
+
/** The checkout path on the Worker's machine, where the children run. */
|
|
76
186
|
readonly worktree: Schema.brand<Schema.NonEmptyString, "WorktreePath">;
|
|
77
187
|
}>, {}>;
|
|
78
|
-
/**
|
|
188
|
+
/** A serializable checkout location and RunSpec, without credentials or live resources. */
|
|
79
189
|
export declare class AttemptWorkspace extends AttemptWorkspace_base {
|
|
80
190
|
}
|
|
81
191
|
/**
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
192
|
+
* An Attempt prepared in the caller's scope and valid only within it. Closing that scope stops
|
|
193
|
+
* any active session, removes the checkout, and releases credentials, whether or not `launch`
|
|
194
|
+
* ran. The checkout stays on disk while the parent task stays live for a reattachment or isn't
|
|
195
|
+
* confirmed stopped.
|
|
85
196
|
*/
|
|
86
197
|
export interface PreparedAttempt {
|
|
87
|
-
/** Checkout metadata suitable for inspection or serialization; contains no credentials. */
|
|
88
198
|
readonly workspace: AttemptWorkspace;
|
|
89
199
|
/**
|
|
90
|
-
* Runs
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
* Reusing an Attempt after launch or release fails with an infrastructure error.
|
|
200
|
+
* Runs the Attempt once, writing channel activity to `io`, and releases its resources before
|
|
201
|
+
* returning. Cleanup failures are logged without changing the result. Fails with an
|
|
202
|
+
* infrastructure `AttemptFailure` if called again or after release.
|
|
94
203
|
*/
|
|
95
204
|
readonly launch: (io: AttemptChannel.Sink) => Effect.Effect<StepResult, AttemptFailure>;
|
|
96
205
|
}
|
|
206
|
+
declare const WorkerCredential_base: Schema.Class<WorkerCredential, Schema.Struct<{
|
|
207
|
+
/**
|
|
208
|
+
* The token for git and gh, never written inside the checkout. Wiped when the Attempt's scope
|
|
209
|
+
* closes; `Redacted.value` then throws.
|
|
210
|
+
*/
|
|
211
|
+
readonly value: Schema.declare<Redacted.Redacted<string>, Redacted.Redacted<string>>;
|
|
212
|
+
/** A new credential is requested when five minutes or less remain. */
|
|
213
|
+
readonly expiresAt: Schema.DateTimeUtc;
|
|
214
|
+
}>, {}>;
|
|
215
|
+
export declare class WorkerCredential extends WorkerCredential_base {
|
|
216
|
+
}
|
|
97
217
|
declare const CredentialProvider_base: Context.ServiceClass<CredentialProvider, "@usine/executor/CredentialProvider", {
|
|
98
|
-
|
|
218
|
+
/**
|
|
219
|
+
* Returns a credential for `repository` only, with `permissions` (`read` can't push). The local
|
|
220
|
+
* and SSH executors call it during `prepare` and again before each expiry until the Attempt's
|
|
221
|
+
* resources are released; a failed renewal is logged and retried after 30 seconds.
|
|
222
|
+
*/
|
|
223
|
+
readonly issue: (repository: RepositoryName, attemptId: AttemptId, permissions: LoopPermissions) => Effect.Effect<WorkerCredential, CredentialUnavailableError>;
|
|
99
224
|
}>;
|
|
100
|
-
/** Mints exactly one repository-scoped credential for each prepared Attempt. */
|
|
101
225
|
export declare class CredentialProvider extends CredentialProvider_base {
|
|
102
226
|
}
|
|
103
227
|
declare const Executor_base: Context.ServiceClass<Executor, "@usine/executor/Executor", {
|
|
228
|
+
/**
|
|
229
|
+
* Reconciles the checkout of an Attempt that no Run reattaches, recording its salvage before
|
|
230
|
+
* releasing any work, even if `isLive` returns true. First stops the parent task if durable
|
|
231
|
+
* storage marks it live; if the task can't be confirmed stopped, fails with a `cancel`
|
|
232
|
+
* `ExecutorOperationError` and leaves the checkout. For an open Attempt whose parent task
|
|
233
|
+
* failed before the orchestrator stopped, first records the comments it posted on the Run's
|
|
234
|
+
* Item. `commitAuthor` returns the author and committer of the salvage commit, like
|
|
235
|
+
* `CheckoutRequest.commitAuthor`. It runs only before a salvage, and its failure leaves the
|
|
236
|
+
* checkout.
|
|
237
|
+
*/
|
|
238
|
+
readonly recover: <E, A>(attempt: AttemptRecovery, record: RecoverySink<E>, commitAuthor: Effect.Effect<BotAccount, A>) => Effect.Effect<void, E | A | ExecutorError>;
|
|
239
|
+
/** The orchestrator doesn't start if a configured Worker has a different kind. */
|
|
104
240
|
readonly kind: WorkerKind;
|
|
105
|
-
/** Verifies Git, the run host, and each rostered brain in the Worker environment; never installs tools or logs in. */
|
|
106
|
-
readonly preflight: (worker: WorkerName, brains: ReadonlyArray<BrainSpec>) => Effect.Effect<void, ExecutorError>;
|
|
107
241
|
/**
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
|
|
242
|
+
* Returns whether the parent task is still running, or reported success before its checkout
|
|
243
|
+
* was harvested. If true, the orchestrator reattaches after a restart.
|
|
244
|
+
*/
|
|
245
|
+
readonly isLive: (attemptId: AttemptId) => Effect.Effect<boolean, AttemptFailure>;
|
|
246
|
+
/**
|
|
247
|
+
* Returns the result a finished parent task stored before an orchestrator restart: the
|
|
248
|
+
* harvested result or the parent's failure. Returns `None` if nothing is stored or `isLive` is
|
|
249
|
+
* true.
|
|
250
|
+
*/
|
|
251
|
+
readonly outcome: (attemptId: AttemptId) => Effect.Effect<Option.Option<Result.Result<StepResult, AttemptFailure>>, AttemptFailure>;
|
|
252
|
+
/**
|
|
253
|
+
* Verifies Git, enough memory for `maxConcurrentAttempts` concurrent Attempts, and each brain
|
|
254
|
+
* in `brains`. Never installs tools or logs in; an SSH Worker pulls its Attempt image.
|
|
255
|
+
*/
|
|
256
|
+
readonly preflight: (worker: WorkerName, brains: ReadonlyArray<BrainSpec>, maxConcurrentAttempts: number) => Effect.Effect<PreflightReport, ExecutorError>;
|
|
257
|
+
/**
|
|
258
|
+
* Verifies the Agent's brain, then acquires the checkout and credential in the caller's scope.
|
|
259
|
+
* Clone, fetch, and lock waits are interruptible; on failure, releases everything acquired so
|
|
260
|
+
* far. `attemptId` must be new unless `reattach` is set.
|
|
111
261
|
*/
|
|
112
262
|
readonly prepare: (request: CheckoutRequest) => Effect.Effect<PreparedAttempt, ExecutorError, Scope.Scope>;
|
|
113
|
-
/**
|
|
114
|
-
|
|
115
|
-
|
|
263
|
+
/**
|
|
264
|
+
* Stops preparation and releases partial resources, or cancels the live parent task with a
|
|
265
|
+
* grace period before forced termination, including one not reattached after a restart.
|
|
266
|
+
* `reason` is why the engine stops the task, which the executor logs. Fails if the parent task
|
|
267
|
+
* can't be confirmed stopped. A canceled Attempt can't launch.
|
|
268
|
+
*
|
|
269
|
+
* An Attempt whose launch ended without a confirmed stop keeps its checkout on disk. Once a
|
|
270
|
+
* later call confirms the stop, it salvages and removes that checkout, as `recover` does, and
|
|
271
|
+
* logs a failure without failing.
|
|
272
|
+
*/
|
|
273
|
+
readonly cancel: (attemptId: AttemptId, reason: StopReason) => Effect.Effect<void, ExecutorError>;
|
|
274
|
+
/** Sends an operator intervention to the Attempt's live session. */
|
|
116
275
|
readonly intervene: (attemptId: AttemptId, intervention: AttemptChannel.Intervention) => Effect.Effect<void, AttemptFailure>;
|
|
276
|
+
/**
|
|
277
|
+
* Removes the files on the Workers that no Attempt holds or can use, such as the Codex home
|
|
278
|
+
* of an Attempt without a checkout on an SSH Worker, which a crash or a failed cleanup left.
|
|
279
|
+
* Run it after startup recovery, which keeps the checkouts of Attempts that a Run may
|
|
280
|
+
* reattach. Never fails; logs what it couldn't remove.
|
|
281
|
+
*/
|
|
282
|
+
readonly sweep: Effect.Effect<void>;
|
|
117
283
|
}>;
|
|
118
|
-
/**
|
|
284
|
+
/** The service that prepares checkouts, runs Attempts on a Worker, and releases their resources (ADR 0006). */
|
|
119
285
|
export declare class Executor extends Executor_base {
|
|
120
286
|
}
|
|
121
|
-
|
|
287
|
+
/** The executor's hold on one provisioned machine, which `WorkerMachines.release` ends. */
|
|
288
|
+
export declare const MachineHold: Schema.brand<Schema.NonEmptyString, "MachineHold">;
|
|
289
|
+
export type MachineHold = typeof MachineHold.Type;
|
|
290
|
+
declare const MachineCheck_base: Schema.Class<MachineCheck, Schema.Struct<{
|
|
291
|
+
readonly brains: Schema.$Array<typeof BrainSpec>;
|
|
292
|
+
/**
|
|
293
|
+
* The limits of each Attempt container that the Worker's machines get until the next check,
|
|
294
|
+
* or `None` if the machine has no Docker.
|
|
295
|
+
*/
|
|
296
|
+
readonly containerLimits: Schema.Option<typeof ContainerLimits>;
|
|
297
|
+
}>, {}>;
|
|
298
|
+
/** The machine preflight of a provisioned Worker's first machine each day. */
|
|
299
|
+
export declare class MachineCheck extends MachineCheck_base {
|
|
300
|
+
}
|
|
301
|
+
declare const MachineGrant_base: Schema.Class<MachineGrant, Schema.Struct<{
|
|
302
|
+
readonly hold: Schema.brand<Schema.NonEmptyString, "MachineHold">;
|
|
303
|
+
readonly id: Schema.brand<Schema.String, "MachineId">;
|
|
304
|
+
readonly worker: Schema.brand<Schema.String, "WorkerName">;
|
|
305
|
+
readonly provider: Schema.Literals<readonly ["hetzner", "boat"]>;
|
|
306
|
+
/** The check that this machine got as the Worker's first each day, or `None` if it got none. */
|
|
307
|
+
readonly checked: Schema.Option<typeof MachineCheck>;
|
|
308
|
+
}>, {}>;
|
|
309
|
+
/** A machine that a provisioned Worker created for an Attempt and holds until `release`. */
|
|
310
|
+
export declare class MachineGrant extends MachineGrant_base {
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* `creating` until the machine answers over SSH, `ready` while an Attempt holds it, and
|
|
314
|
+
* `deleting` until its deletion succeeds.
|
|
315
|
+
*/
|
|
316
|
+
export declare const MachineState: Schema.Literals<readonly ["creating", "ready", "deleting"]>;
|
|
317
|
+
export type MachineState = typeof MachineState.Type;
|
|
318
|
+
declare const MachineStatus_base: Schema.Class<MachineStatus, Schema.Struct<{
|
|
319
|
+
readonly worker: Schema.brand<Schema.String, "WorkerName">;
|
|
320
|
+
readonly provider: Schema.Literals<readonly ["hetzner", "boat"]>;
|
|
321
|
+
readonly state: Schema.Literals<readonly ["creating", "ready", "deleting"]>;
|
|
322
|
+
/** `None` until the provider accepts the creation. */
|
|
323
|
+
readonly id: Schema.Option<Schema.brand<Schema.String, "MachineId">>;
|
|
324
|
+
/** The Run the machine was created for, or `None` for a machine found after a restart. */
|
|
325
|
+
readonly runId: Schema.Option<Schema.brand<Schema.NonEmptyString, "RunId">>;
|
|
326
|
+
readonly attemptId: Schema.Option<Schema.brand<Schema.NonEmptyString, "AttemptId">>;
|
|
327
|
+
/** When the creation started, or when the provider created a machine found after a restart. */
|
|
328
|
+
readonly since: Schema.DateTimeUtc;
|
|
329
|
+
}>, {}>;
|
|
330
|
+
/** A machine in flight on a provisioned Worker. */
|
|
331
|
+
export declare class MachineStatus extends MachineStatus_base {
|
|
332
|
+
}
|
|
333
|
+
declare const WorkerMachines_base: Context.ServiceClass<WorkerMachines, "@usine/executor/WorkerMachines", {
|
|
334
|
+
/** Returns whether `worker` creates a machine for each Attempt. */
|
|
335
|
+
readonly provisions: (worker: WorkerName) => Effect.Effect<boolean>;
|
|
336
|
+
/**
|
|
337
|
+
* Creates a machine on `worker` for the next Attempt of `runId`, labeled with the instance,
|
|
338
|
+
* Worker, and Run, and waits until it answers over SSH. The first machine on the Worker each
|
|
339
|
+
* day also gets the preflight checks of `brains`, whose failure is a `WorkerCapabilityError`.
|
|
340
|
+
* On failure or interruption, deletes the machine.
|
|
341
|
+
*/
|
|
342
|
+
readonly create: (worker: WorkerName, runId: RunId, brains: ReadonlyArray<BrainSpec>) => Effect.Effect<MachineGrant, MachineUnavailableError | WorkerCapabilityError>;
|
|
343
|
+
/** Gives the held machine to the Attempt, so that `Executor.prepare` uses it and a restart finds it. */
|
|
344
|
+
readonly assign: (hold: MachineHold, attemptId: AttemptId) => Effect.Effect<void, ExecutorOperationError>;
|
|
345
|
+
/**
|
|
346
|
+
* Holds the machine of `attemptId`, an Attempt from before a restart on `worker`, until
|
|
347
|
+
* `release`. Returns `None` if `worker` isn't provisioned or the provider no longer lists the
|
|
348
|
+
* machine. If the provider can't be read, the hold keeps a `sweep` from deleting the machine,
|
|
349
|
+
* and a later use looks it up again.
|
|
350
|
+
*/
|
|
351
|
+
readonly adopt: (worker: WorkerName, attemptId: AttemptId) => Effect.Effect<Option.Option<MachineHold>>;
|
|
352
|
+
/** Deletes the held machine. Logs a failure, and each `sweep` tries again. */
|
|
353
|
+
readonly release: (hold: MachineHold) => Effect.Effect<void>;
|
|
354
|
+
/**
|
|
355
|
+
* Lists each provisioned Worker's machines at its provider and deletes those that no
|
|
356
|
+
* Attempt or creation in this process holds. Run it after startup recovery, which adopts or
|
|
357
|
+
* reconciles the machines of earlier Attempts.
|
|
358
|
+
*/
|
|
359
|
+
readonly sweep: Effect.Effect<void>;
|
|
360
|
+
/** The machines in flight, oldest first. */
|
|
361
|
+
readonly machines: Effect.Effect<ReadonlyArray<MachineStatus>>;
|
|
362
|
+
}>;
|
|
363
|
+
/**
|
|
364
|
+
* The machines of the provisioned Workers, which create one machine per Attempt and delete it
|
|
365
|
+
* afterwards (#550). Only the SSH executor provides it.
|
|
366
|
+
*/
|
|
367
|
+
export declare class WorkerMachines extends WorkerMachines_base {
|
|
368
|
+
}
|
|
369
|
+
export { claudeLoginLockLayer } from "./claude-login-lock.ts";
|
|
122
370
|
//# sourceMappingURL=executor.d.ts.map
|
package/dist/executor.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../src/executor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAmB,MAAM,yBAAyB,CAAC;AAErE,OAAO,EAAe,SAAS,EAAE,MAAM,qBAAqB,CA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