@usine/executor 0.1.0 → 0.2.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.
Files changed (79) hide show
  1. package/README.md +52 -21
  2. package/dist/child-command.d.ts +8 -5
  3. package/dist/child-command.d.ts.map +1 -1
  4. package/dist/child-command.js +10 -7
  5. package/dist/child-command.js.map +1 -1
  6. package/dist/exe-dev/channel.d.ts +7 -4
  7. package/dist/exe-dev/channel.d.ts.map +1 -1
  8. package/dist/exe-dev/channel.js +15 -19
  9. package/dist/exe-dev/channel.js.map +1 -1
  10. package/dist/exe-dev/commands.d.ts +1 -1
  11. package/dist/exe-dev/commands.d.ts.map +1 -1
  12. package/dist/exe-dev/commands.js +7 -8
  13. package/dist/exe-dev/commands.js.map +1 -1
  14. package/dist/exe-dev/exe-dev.d.ts +8 -0
  15. package/dist/exe-dev/exe-dev.d.ts.map +1 -0
  16. package/dist/exe-dev/exe-dev.js +153 -0
  17. package/dist/exe-dev/exe-dev.js.map +1 -0
  18. package/dist/exe-dev/grants.d.ts +3 -4
  19. package/dist/exe-dev/grants.d.ts.map +1 -1
  20. package/dist/exe-dev/grants.js +31 -15
  21. package/dist/exe-dev/grants.js.map +1 -1
  22. package/dist/exe-dev/model.d.ts +8 -23
  23. package/dist/exe-dev/model.d.ts.map +1 -1
  24. package/dist/exe-dev/model.js +5 -12
  25. package/dist/exe-dev/model.js.map +1 -1
  26. package/dist/exe-dev/preflight.d.ts +3 -2
  27. package/dist/exe-dev/preflight.d.ts.map +1 -1
  28. package/dist/exe-dev/preflight.js +8 -8
  29. package/dist/exe-dev/preflight.js.map +1 -1
  30. package/dist/exe-dev/shell.d.ts +5 -5
  31. package/dist/exe-dev/shell.d.ts.map +1 -1
  32. package/dist/exe-dev/shell.js +7 -7
  33. package/dist/exe-dev/shell.js.map +1 -1
  34. package/dist/exe-dev/sweep.d.ts +3 -5
  35. package/dist/exe-dev/sweep.d.ts.map +1 -1
  36. package/dist/exe-dev/sweep.js +8 -10
  37. package/dist/exe-dev/sweep.js.map +1 -1
  38. package/dist/executor.d.ts +118 -0
  39. package/dist/executor.d.ts.map +1 -0
  40. package/dist/executor.js +98 -0
  41. package/dist/executor.js.map +1 -0
  42. package/dist/harness-preflight.d.ts +6 -0
  43. package/dist/harness-preflight.d.ts.map +1 -0
  44. package/dist/harness-preflight.js +50 -0
  45. package/dist/harness-preflight.js.map +1 -0
  46. package/dist/invalid-frame.d.ts +1 -1
  47. package/dist/invalid-frame.d.ts.map +1 -1
  48. package/dist/invalid-frame.js +2 -1
  49. package/dist/invalid-frame.js.map +1 -1
  50. package/dist/keyed-lock.d.ts +2 -2
  51. package/dist/keyed-lock.js +2 -2
  52. package/dist/local/local.d.ts +20 -0
  53. package/dist/local/local.d.ts.map +1 -0
  54. package/dist/local/{index.js → local.js} +86 -115
  55. package/dist/local/local.js.map +1 -0
  56. package/dist/prepared-attempt.d.ts +5 -0
  57. package/dist/prepared-attempt.d.ts.map +1 -0
  58. package/dist/prepared-attempt.js +40 -0
  59. package/dist/prepared-attempt.js.map +1 -0
  60. package/dist/provision.d.ts +20 -10
  61. package/dist/provision.d.ts.map +1 -1
  62. package/dist/provision.js +94 -23
  63. package/dist/provision.js.map +1 -1
  64. package/dist/run-host-session.d.ts +12 -8
  65. package/dist/run-host-session.d.ts.map +1 -1
  66. package/dist/run-host-session.js +35 -22
  67. package/dist/run-host-session.js.map +1 -1
  68. package/package.json +11 -11
  69. package/dist/exe-dev/index.d.ts +0 -8
  70. package/dist/exe-dev/index.d.ts.map +0 -1
  71. package/dist/exe-dev/index.js +0 -239
  72. package/dist/exe-dev/index.js.map +0 -1
  73. package/dist/index.d.ts +0 -82
  74. package/dist/index.d.ts.map +0 -1
  75. package/dist/index.js +0 -82
  76. package/dist/index.js.map +0 -1
  77. package/dist/local/index.d.ts +0 -15
  78. package/dist/local/index.d.ts.map +0 -1
  79. package/dist/local/index.js.map +0 -1
@@ -1,6 +1,8 @@
1
- import { Repository, Worker } from "@usine/core";
2
- import { Effect, Ref } from "effect";
3
- import { CredentialUnavailableError } from "../index.js";
1
+ import { AttemptId } from "@usine/core/attempt";
2
+ import { RepositoryName } from "@usine/core/repository";
3
+ import { WorkerName } from "@usine/core/worker";
4
+ import { Effect, Ref, Scope } from "effect";
5
+ import { CredentialUnavailableError } from "../executor.js";
4
6
  import { keyedLockFor } from "../keyed-lock.js";
5
7
  import { CredentialGrantMinutes, } from "./model.js";
6
8
  const grantKey = (worker, integration) => `${worker} ${integration}`;
@@ -8,11 +10,24 @@ export const credentialGrantsFor = Effect.fn("ExeDevExecutor.credentialGrantsFor
8
10
  const locks = yield* keyedLockFor();
9
11
  const counts = yield* Ref.make(new Map());
10
12
  const grantMinutes = options.credentialGrantMinutes ?? CredentialGrantMinutes.make(65);
11
- const acquire = Effect.fn("ExeDevExecutor.acquireGrant")(function* (worker, repository, integration) {
13
+ const acquire = Effect.fn("ExeDevExecutor.acquireGrant")(function* (attemptId, worker, repository, integration) {
14
+ yield* Effect.annotateCurrentSpan({ attemptId, worker, repository, integration });
15
+ const scope = yield* Effect.scope;
12
16
  const key = grantKey(worker, integration);
13
- yield* locks.withLock(key)(Effect.gen(function* () {
17
+ yield* locks.withLock(key)(Effect.uninterruptibleMask((restore) => Effect.gen(function* () {
14
18
  const current = (yield* Ref.get(counts)).get(key) ?? 0;
15
- yield* commands
19
+ // Own a reference before attempting the attachment: a failed SSH reply
20
+ // may still mean the edge accepted it. This reservation is released once
21
+ // by this scope, and never borrows a sibling's reference on interruption.
22
+ yield* Ref.update(counts, (currentCounts) => new Map(currentCounts).set(key, current + 1));
23
+ yield* Scope.addFinalizer(scope, release(attemptId, worker, integration).pipe(Effect.tapError((error) => Effect.logError("Attempt credential cleanup failed", {
24
+ attemptId,
25
+ worker,
26
+ repository,
27
+ integration,
28
+ message: error.message,
29
+ })), Effect.ignore));
30
+ yield* restore(commands
16
31
  .lobby("prepare", [
17
32
  "integrations",
18
33
  "attach",
@@ -25,27 +40,25 @@ export const credentialGrantsFor = Effect.fn("ExeDevExecutor.credentialGrantsFor
25
40
  repository,
26
41
  message: `Could not attach exe.dev GitHub integration ${integration}`,
27
42
  cause,
28
- })));
43
+ }))));
29
44
  yield* Effect.logInfo("Attached or refreshed time-boxed exe.dev GitHub integration", {
45
+ attemptId,
30
46
  worker,
31
47
  repository,
32
48
  integration,
33
49
  grantMinutes,
34
50
  activeGrants: current + 1,
35
51
  });
36
- yield* Ref.update(counts, (currentCounts) => {
37
- const next = new Map(currentCounts);
38
- next.set(key, current + 1);
39
- return next;
40
- });
41
- }));
52
+ })));
42
53
  });
43
- const release = Effect.fn("ExeDevExecutor.releaseGrant")(function* (worker, integration) {
54
+ const release = Effect.fn("ExeDevExecutor.releaseGrant")(function* (attemptId, worker, integration) {
55
+ yield* Effect.annotateCurrentSpan({ attemptId, worker, integration });
44
56
  const key = grantKey(worker, integration);
45
57
  yield* locks.withLock(key)(Effect.gen(function* () {
46
58
  const current = (yield* Ref.get(counts)).get(key) ?? 0;
47
59
  if (current === 0) {
48
60
  yield* Effect.logDebug("Credential cleanup was already complete", {
61
+ attemptId,
49
62
  worker,
50
63
  integration,
51
64
  });
@@ -58,6 +71,7 @@ export const credentialGrantsFor = Effect.fn("ExeDevExecutor.credentialGrantsFor
58
71
  return next;
59
72
  });
60
73
  yield* Effect.logDebug("Kept the shared exe.dev GitHub integration", {
74
+ attemptId,
61
75
  worker,
62
76
  integration,
63
77
  activeGrants: current - 1,
@@ -67,6 +81,7 @@ export const credentialGrantsFor = Effect.fn("ExeDevExecutor.credentialGrantsFor
67
81
  yield* commands
68
82
  .lobby("cleanup", ["integrations", "detach", integration, `vm:${worker}`])
69
83
  .pipe(Effect.tapError((error) => Effect.logWarning("Could not detach the exe.dev GitHub integration", {
84
+ attemptId,
70
85
  worker,
71
86
  integration,
72
87
  grantMinutes,
@@ -78,11 +93,12 @@ export const credentialGrantsFor = Effect.fn("ExeDevExecutor.credentialGrantsFor
78
93
  return next;
79
94
  })));
80
95
  yield* Effect.logInfo("Detached exe.dev GitHub integration", {
96
+ attemptId,
81
97
  worker,
82
98
  integration,
83
99
  });
84
100
  }));
85
101
  });
86
- return { acquire, release };
102
+ return { acquire };
87
103
  });
88
104
  //# sourceMappingURL=grants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"grants.js","sourceRoot":"","sources":["../../src/exe-dev/grants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,OAAO,EACL,sBAAsB,GAGvB,MAAM,YAAY,CAAC;AAEpB,MAAM,QAAQ,GAAG,CAAC,MAAmB,EAAE,WAA4B,EAAU,EAAE,CAC7E,GAAG,MAAM,IAAI,WAAW,EAAE,CAAC;AAE7B,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC,EAAE,CAAC,oCAAoC,CAAC,CAAC,QAAQ,CAAC,EAC1F,OAA8B,EAC9B,QAAwB;IAExB,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,YAAY,EAAU,CAAC;IAC5C,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,GAAG,EAAkB,CAAC,CAAC;IAC1D,MAAM,YAAY,GAAG,OAAO,CAAC,sBAAsB,IAAI,sBAAsB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAEvF,MAAM,OAAO,GAAG,MAAM,CAAC,EAAE,CAAC,6BAA6B,CAAC,CAAC,QAAQ,CAAC,EAChE,MAAmB,EACnB,UAA2B,EAC3B,WAA4B;QAE5B,MAAM,GAAG,GAAG,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;QAC1C,KAAK,CAAC,CAAC,KAA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Y,oBAAoB;gBAC7E,OAAO,EAAE,KAAK,CAAC,OAAO;aACvB,CAAC,CACH,EACD,MAAM,CAAC,QAAQ,CACb,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,aAAa,EAAE,EAAE;gBACnC,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,aAAa,CAAC,CAAC;gBACpC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;gBACjB,OAAO,IAAI,CAAC;YACd,CAAC,CAAC,CACH,CACF,CAAC;YACJ,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,qCAAqC,EAAE;gBAC3D,SAAS;gBACT,MAAM;gBACN,WAAW;aACZ,CAAC,CAAC;QACL,CAAC,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,OAAO,EAAE,OAAO,EAAE,CAAC;AACrB,CAAC,CAAC,CAAC"}
@@ -1,13 +1,11 @@
1
- import { Attempt } from "@usine/core";
2
- import { Schema, type Effect, type Ref } from "effect";
3
- import type { RunHostCommand } from "../index.ts";
1
+ import { Schema, type Effect } from "effect";
2
+ import type { RunHostCommand } from "../executor.ts";
4
3
  /** The name of one exe.dev edge-injected integration. */
5
4
  export declare const IntegrationName: Schema.brand<Schema.String, "ExeDevIntegrationName">;
6
5
  export type IntegrationName = typeof IntegrationName.Type;
7
6
  /**
8
- * The SSH argv boundary: this string is handed to the local `ssh` client as a
9
- * destination, so anything that could read as an option (`-oProxyCommand=...`)
10
- * must be unrepresentable, not merely unexpected.
7
+ * An SSH destination handed to the local `ssh` client as argv, so anything
8
+ * that could read as an option (`-oProxyCommand=...`) is unrepresentable.
11
9
  */
12
10
  export declare const SshDestination: Schema.brand<Schema.String, "ExeDevSshDestination">;
13
11
  export type SshDestination = typeof SshDestination.Type;
@@ -15,44 +13,31 @@ export type SshDestination = typeof SshDestination.Type;
15
13
  export declare const HomePath: Schema.brand<Schema.String, "ExeDevHomePath">;
16
14
  export type HomePath = typeof HomePath.Type;
17
15
  declare const GitHubIntegration_base: Schema.Class<GitHubIntegration, Schema.Struct<{
18
- readonly repository: Schema.brand<Schema.String, "RepoName">;
16
+ readonly repository: Schema.brand<Schema.String, "RepositoryName">;
19
17
  readonly name: Schema.brand<Schema.String, "ExeDevIntegrationName">;
20
18
  }>, {}>;
21
19
  /** One standing exe.dev GitHub integration; only its VM attachment is per Attempt. */
22
20
  export declare class GitHubIntegration extends GitHubIntegration_base {
23
21
  }
24
- declare const HarnessLoginCheck_base: Schema.Class<HarnessLoginCheck, Schema.Struct<{
25
- readonly harness: Schema.NonEmptyString;
26
- readonly command: Schema.NonEmptyString;
27
- readonly args: Schema.$Array<Schema.String>;
28
- }>, {}>;
29
- /** A harness-owned command that exits zero only while its operator login remains usable. */
30
- export declare class HarnessLoginCheck extends HarnessLoginCheck_base {
31
- }
22
+ /** How long an exe.dev Worker's repository credential attachment may remain active, in minutes. */
32
23
  export declare const CredentialGrantMinutes: Schema.brand<Schema.Int, "ExeDevCredentialGrantMinutes">;
33
24
  export type CredentialGrantMinutes = typeof CredentialGrantMinutes.Type;
25
+ /** Repository access and run-host settings for the configured exe.dev Workers. */
34
26
  export interface ExeDevExecutorOptions {
35
27
  /** Existing native GitHub integrations, one per repository this Worker may receive. */
36
28
  readonly githubIntegrations: ReadonlyArray<GitHubIntegration>;
37
- /** Every harness used on this Worker must prove that its operator login is still valid. */
38
- readonly harnessLoginChecks: readonly [HarnessLoginCheck, ...ReadonlyArray<HarnessLoginCheck>];
39
29
  /** Installed in the baked image; defaults to the published worker executable. */
40
30
  readonly runHost?: RunHostCommand;
41
31
  /** Local SSH executable and its control-plane-only arguments. */
42
32
  readonly ssh?: RunHostCommand;
43
33
  /** Time-box for the edge credential attachment. Defaults to 65 minutes. */
44
34
  readonly credentialGrantMinutes?: CredentialGrantMinutes;
35
+ /** Grace for delivering a stop request, then for the run host to exit; each wait is bounded separately. Defaults to 10 seconds. */
45
36
  readonly interruptGrace?: Parameters<typeof Effect.timeoutOption>[1];
46
37
  }
47
38
  export interface VmState {
48
39
  readonly home: HomePath;
49
40
  readonly sshDest: SshDestination;
50
41
  }
51
- export interface PreparedState {
52
- readonly cache: string;
53
- readonly integration: IntegrationName;
54
- readonly vm: VmState;
55
- }
56
- export type PreparedStates = Ref.Ref<Map<Attempt.AttemptId, PreparedState>>;
57
42
  export {};
58
43
  //# sourceMappingURL=model.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../src/exe-dev/model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAc,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,KAAK,MAAM,EAAE,KAAK,GAAG,EAAE,MAAM,QAAQ,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,yDAAyD;AACzD,eAAO,MAAM,eAAe,sDAIiB,CAAC;AAC9C,MAAM,MAAM,eAAe,GAAG,OAAO,eAAe,CAAC,IAAI,CAAC;AAE1D;;;;GAIG;AACH,eAAO,MAAM,cAAc,qDAIiB,CAAC;AAC7C,MAAM,MAAM,cAAc,GAAG,OAAO,cAAc,CAAC,IAAI,CAAC;AAExD,sFAAsF;AACtF,eAAO,MAAM,QAAQ,+CAIiB,CAAC;AACvC,MAAM,MAAM,QAAQ,GAAG,OAAO,QAAQ,CAAC,IAAI,CAAC;;;;;AAE5C,sFAAsF;AACtF,qBAAa,iBAAkB,SAAQ,sBAKrC;CAAG;;;;;;AAEL,4FAA4F;AAC5F,qBAAa,iBAAkB,SAAQ,sBAMrC;CAAG;AAEL,eAAO,MAAM,sBAAsB,0DAElC,CAAC;AACF,MAAM,MAAM,sBAAsB,GAAG,OAAO,sBAAsB,CAAC,IAAI,CAAC;AAExE,MAAM,WAAW,qBAAqB;IACpC,uFAAuF;IACvF,QAAQ,CAAC,kBAAkB,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;IAC9D,2FAA2F;IAC3F,QAAQ,CA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ACtF,eAAO,MAAM,QAAQ,+CAIiB,CAAC;AACvC,MAAM,MAAM,QAAQ,GAAG,OAAO,QAAQ,CAAC,IAAI,CAAC;;;;;AAE5C,sFAAsF;AACtF,qBAAa,iBAAkB,SAAQ,sBAKrC;CAAG;AAEL,mGAAmG;AACnG,eAAO,MAAM,sBAAsB,0DAElC,CAAC;AACF,MAAM,MAAM,sBAAsB,GAAG,OAAO,sBAAsB,CAAC,IAAI,CAAC;AAExE,kFAAkF;AAClF,MAAM,WAAW,qBAAqB;IACpC,uFAAuF;IACvF,QAAQ,CAAC,kBAAkB,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;IAC9D,iFAAiF;IACjF,QAAQ,CAAC,OAAO,CAAC,EAAE,cAAc,CAAC;IAClC,iEAAiE;IACjE,QAAQ,CAAC,GAAG,CAAC,EAAE,cAAc,CAAC;IAC9B,2EAA2E;IAC3E,QAAQ,CAAC,sBAAsB,CAAC,EAAE,sBAAsB,CAAC;IACzD,mIAAmI;IACnI,QAAQ,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,OAAO,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;CACtE;AAED,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC;CAClC"}
@@ -1,13 +1,12 @@
1
- import { Attempt, Repository } from "@usine/core";
1
+ import { RepositoryName } from "@usine/core/repository";
2
2
  import { Schema } from "effect";
3
3
  /** The name of one exe.dev edge-injected integration. */
4
4
  export const IntegrationName = Schema.String.check(Schema.isPattern(/^[A-Za-z0-9]+(?:[._-][A-Za-z0-9]+)*$/u, {
5
5
  message: "Expected an exe.dev integration name safe for the lobby command boundary",
6
6
  })).pipe(Schema.brand("ExeDevIntegrationName"));
7
7
  /**
8
- * The SSH argv boundary: this string is handed to the local `ssh` client as a
9
- * destination, so anything that could read as an option (`-oProxyCommand=...`)
10
- * must be unrepresentable, not merely unexpected.
8
+ * An SSH destination handed to the local `ssh` client as argv, so anything
9
+ * that could read as an option (`-oProxyCommand=...`) is unrepresentable.
11
10
  */
12
11
  export const SshDestination = Schema.String.check(Schema.isPattern(/^(?:[A-Za-z0-9._-]+@)?[A-Za-z0-9](?:[A-Za-z0-9.-]*[A-Za-z0-9])?$/u, {
13
12
  message: "Expected an exe.dev SSH hostname, optionally prefixed by a user",
@@ -18,16 +17,10 @@ export const HomePath = Schema.String.check(Schema.isPattern(/^\/[^\0\r\n]*$/u,
18
17
  })).pipe(Schema.brand("ExeDevHomePath"));
19
18
  /** One standing exe.dev GitHub integration; only its VM attachment is per Attempt. */
20
19
  export class GitHubIntegration extends Schema.Class("@usine/executor/ExeDevGitHubIntegration")({
21
- repository: Repository.Name,
20
+ repository: RepositoryName,
22
21
  name: IntegrationName,
23
22
  }) {
24
23
  }
25
- /** A harness-owned command that exits zero only while its operator login remains usable. */
26
- export class HarnessLoginCheck extends Schema.Class("@usine/executor/ExeDevHarnessLoginCheck")({
27
- harness: Schema.NonEmptyString,
28
- command: Schema.NonEmptyString,
29
- args: Schema.Array(Schema.String),
30
- }) {
31
- }
24
+ /** How long an exe.dev Worker's repository credential attachment may remain active, in minutes. */
32
25
  export const CredentialGrantMinutes = Schema.Int.check(Schema.isGreaterThanOrEqualTo(1)).pipe(Schema.brand("ExeDevCredentialGrantMinutes"));
33
26
  //# sourceMappingURL=model.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"model.js","sourceRoot":"","sources":["../../src/exe-dev/model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,MAAM,EAAyB,MAAM,QAAQ,CAAC;AAGvD,yDAAyD;AACzD,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAChD,MAAM,CAAC,SAAS,CAAC,uCAAuC,EAAE;IACxD,OAAO,EAAE,0EAA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1
+ import type { BrainSpec } from "@usine/core/agent/brain";
1
2
  import { Effect } from "effect";
2
- import { ExecutorOperationError, type RunHostCommand, WorkerCapabilityError } from "../index.ts";
3
+ import { ExecutorOperationError, type RunHostCommand, WorkerCapabilityError } from "../executor.ts";
3
4
  import type { ExeDevCommands } from "./commands.ts";
4
5
  import { type ExeDevExecutorOptions, type VmState } from "./model.ts";
5
6
  export declare const preflightFor: (options: ExeDevExecutorOptions, commands: ExeDevCommands, runHost: RunHostCommand) => Effect.Effect<{
6
- preflight: (worker: string & import("effect/Brand").Brand<"WorkerName">) => Effect.Effect<undefined, import("../index.ts").CredentialUnavailableError | ExecutorOperationError | WorkerCapabilityError, never>;
7
+ preflight: (worker: string & import("effect/Brand").Brand<"WorkerName">, brains: readonly BrainSpec[]) => Effect.Effect<undefined, import("../executor.ts").CredentialUnavailableError | ExecutorOperationError | WorkerCapabilityError, never>;
7
8
  vmFor: (worker: string & import("effect/Brand").Brand<"WorkerName">) => Effect.Effect<VmState, ExecutorOperationError | WorkerCapabilityError, never>;
8
9
  }, never, never>;
9
10
  //# sourceMappingURL=preflight.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"preflight.d.ts","sourceRoot":"","sources":["../../src/exe-dev/preflight.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAe,MAAM,QAAQ,CAAC;AAC7C,OAAO,EACL,sBAAsB,EAEtB,KAAK,cAAc,EACnB,qBAAqB,EAEtB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAA4B,KAAK,qBAAqB,EAAE,KAAK,OAAO,EAAE,MAAM,YAAY,CAAC;AAoBhG,eAAO,MAAM,YAAY;;;gBA6JvB,CAAC"}
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;AAGzD,OAAO,EAAE,MAAM,EAAe,MAAM,QAAQ,CAAC;AAC7C,OAAO,EACL,sBAAsB,EAEtB,KAAK,cAAc,EACnB,qBAAqB,EAEtB,MAAM,gBAAgB,CAAC;AAExB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAA4B,KAAK,qBAAqB,EAAE,KAAK,OAAO,EAAE,MAAM,YAAY,CAAC;AAoBhG,eAAO,MAAM,YAAY;;;gBA2JvB,CAAC"}
@@ -1,6 +1,8 @@
1
- import { AttemptChannel, Worker } from "@usine/core";
1
+ import * as AttemptChannel from "@usine/core/attempt/channel";
2
+ import { WorkerName } from "@usine/core/worker";
2
3
  import { Effect, Ref, Schema } from "effect";
3
- import { ExecutorOperationError, logPreflightFailure, WorkerCapabilityError, } from "../index.js";
4
+ import { ExecutorOperationError, logPreflightFailure, WorkerCapabilityError, } from "../executor.js";
5
+ import { verifyHarnesses } from "../harness-preflight.js";
4
6
  import { HomePath, SshDestination } from "./model.js";
5
7
  const MINIMUM_NODE_MAJOR = 22;
6
8
  const Vm = Schema.Struct({
@@ -29,7 +31,7 @@ export const preflightFor = Effect.fn("ExeDevExecutor.preflightFor")(function* (
29
31
  return { home, sshDest: vm.sshDest };
30
32
  });
31
33
  const asCapability = (worker, capability, message, effect) => effect.pipe(Effect.mapError((cause) => capabilityError(worker, capability, message, cause)));
32
- const preflight = Effect.fn("ExeDevExecutor.preflight")(function* (worker) {
34
+ const preflight = Effect.fn("ExeDevExecutor.preflight")(function* (worker, brains) {
33
35
  const vm = yield* resolveVm(worker).pipe(Effect.catchTag("ExecutorOperationError", (cause) => capabilityError(worker, "machine", `Could not reach exe.dev Worker ${worker}`, cause)));
34
36
  yield* Effect.annotateCurrentSpan({ worker, host: vm.sshDest });
35
37
  const gitVersion = (yield* asCapability(worker, "toolchain", `Worker ${worker} cannot run Git`, commands.remote("preflight", vm.sshDest, "git", ["--version"]))).trim();
@@ -48,9 +50,7 @@ export const preflightFor = Effect.fn("ExeDevExecutor.preflightFor")(function* (
48
50
  if (protocol !== String(AttemptChannel.PROTOCOL_VERSION)) {
49
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"));
50
52
  }
51
- for (const check of options.harnessLoginChecks) {
52
- yield* asCapability(worker, "harness-login", `${check.harness} is not logged in on Worker ${worker}`, commands.remote("preflight", vm.sshDest, check.command, check.args));
53
- }
53
+ yield* verifyHarnesses(worker, brains, runHost, (command, args) => commands.remote("preflight", vm.sshDest, command, args));
54
54
  for (const integration of options.githubIntegrations) {
55
55
  yield* asCapability(worker, "credentials", `exe.dev GitHub integration ${integration.name} is not ready for ${integration.repository}`, commands.lobby("preflight", ["integrations", "test", integration.name]));
56
56
  }
@@ -65,11 +65,11 @@ export const preflightFor = Effect.fn("ExeDevExecutor.preflightFor")(function* (
65
65
  gitVersion,
66
66
  nodeVersion,
67
67
  protocolVersion: AttemptChannel.PROTOCOL_VERSION,
68
- harnesses: options.harnessLoginChecks.map(({ harness }) => harness).join(","),
68
+ harnesses: [...new Set(brains.map(({ harness }) => harness))].join(","),
69
69
  integrations: options.githubIntegrations.length,
70
70
  });
71
71
  }, logPreflightFailure);
72
- // Both resolveVm failures sit inside the ExecutorError union prepare
72
+ // Both resolveVm failures are members of the ExecutorError union prepare
73
73
  // reports, so a stopped VM keeps its typed capability shape.
74
74
  const vmFor = Effect.fn("ExeDevExecutor.vmFor")(function* (worker) {
75
75
  const cached = (yield* Ref.get(workers)).get(worker);
@@ -1 +1 @@
1
- {"version":3,"file":"preflight.js","sourceRoot":"","sources":["../../src/exe-dev/preflight.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,EACL,sB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,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,CAAC;AAC9B,CAAC,CAAC,CAAC"}
@@ -1,12 +1,12 @@
1
- /** One shell-safe command string for OpenSSH's remote-command boundary. */
1
+ /** Quotes a command and its arguments into one string safe for OpenSSH's remote-command boundary. */
2
2
  export declare const shellCommand: (command: string, args: ReadonlyArray<string>) => string;
3
- /** Sibling of the worktree, so the sweep reclaims it with the other leftovers. */
3
+ /** The pid file sits beside the worktree so the sweep reclaims both together. */
4
4
  export declare const runHostPidFile: (worktree: string) => string;
5
- /** The run host needs a working directory and one public edge-host selector. */
5
+ /** The remote command that starts the run host in its worktree with the edge GitHub host selected. */
6
6
  export declare const runHostShellCommand: (worktree: string, command: string, args: ReadonlyArray<string>) => string;
7
7
  /**
8
- * Confirms a recorded run host is dead before workspace removal: TERM first,
9
- * a bounded wait, then KILL. `$1` is the pid file; stdout reports the outcome.
8
+ * Confirms a recorded run host is dead before workspace removal: TERM, a
9
+ * bounded wait, then KILL. `$1` is the pid file; stdout reports the outcome.
10
10
  */
11
11
  export declare const RUN_HOST_KILL_SCRIPT: string;
12
12
  //# sourceMappingURL=shell.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"shell.d.ts","sourceRoot":"","sources":["../../src/exe-dev/shell.ts"],"names":[],"mappings":"AAEA,2EAA2E;AAC3E,eAAO,MAAM,YAAY,YAAa,MAAM,QAAQ,aAAa,CAAC,MAAM,CAAC,KAAG,MACzB,CAAC;AAEpD,kFAAkF;AAClF,eAAO,MAAM,cAAc,aAAc,MAAM,KAAG,MAA2B,CAAC;AAE9E,gFAAgF;AAChF,eAAO,MAAM,mBAAmB,aACpB,MAAM,WACP,MAAM,QACT,aAAa,CAAC,MAAM,CAAC,KAC1B,MAIsJ,CAAC;AAE1J;;;GAGG;AACH,eAAO,MAAM,oBAAoB,QAczB,CAAC"}
1
+ {"version":3,"file":"shell.d.ts","sourceRoot":"","sources":["../../src/exe-dev/shell.ts"],"names":[],"mappings":"AAEA,qGAAqG;AACrG,eAAO,MAAM,YAAY,YAAa,MAAM,QAAQ,aAAa,CAAC,MAAM,CAAC,KAAG,MACzB,CAAC;AAEpD,iFAAiF;AACjF,eAAO,MAAM,cAAc,aAAc,MAAM,KAAG,MAA2B,CAAC;AAE9E,sGAAsG;AACtG,eAAO,MAAM,mBAAmB,aACpB,MAAM,WACP,MAAM,QACT,aAAa,CAAC,MAAM,CAAC,KAC1B,MAIsJ,CAAC;AAE1J;;;GAGG;AACH,eAAO,MAAM,oBAAoB,QAczB,CAAC"}
@@ -1,17 +1,17 @@
1
1
  const quote = (value) => `'${value.replaceAll("'", `'"'"'`)}'`;
2
- /** One shell-safe command string for OpenSSH's remote-command boundary. */
2
+ /** Quotes a command and its arguments into one string safe for OpenSSH's remote-command boundary. */
3
3
  export const shellCommand = (command, args) => `exec ${[command, ...args].map(quote).join(" ")}`;
4
- /** Sibling of the worktree, so the sweep reclaims it with the other leftovers. */
4
+ /** The pid file sits beside the worktree so the sweep reclaims both together. */
5
5
  export const runHostPidFile = (worktree) => `${worktree}.pid`;
6
- /** The run host needs a working directory and one public edge-host selector. */
6
+ /** The remote command that starts the run host in its worktree with the edge GitHub host selected. */
7
7
  export const runHostShellCommand = (worktree, command, args) =>
8
8
  // `$$` names the remote shell that `exec` replaces with the run host, so the
9
- // pid file identifies the run host itself; cleanup uses it to confirm the
10
- // process is gone before destroying the worktree under it.
9
+ // pid file identifies the run host itself. Cleanup uses it to confirm the
10
+ // process is gone before removing the worktree.
11
11
  `cd ${quote(worktree)} && export GH_HOST=github.int.exe.xyz && printf '%s' "$$" > ${quote(runHostPidFile(worktree))} && ${shellCommand(command, args)}`;
12
12
  /**
13
- * Confirms a recorded run host is dead before workspace removal: TERM first,
14
- * a bounded wait, then KILL. `$1` is the pid file; stdout reports the outcome.
13
+ * Confirms a recorded run host is dead before workspace removal: TERM, a
14
+ * bounded wait, then KILL. `$1` is the pid file; stdout reports the outcome.
15
15
  */
16
16
  export const RUN_HOST_KILL_SCRIPT = `
17
17
  if test -f "$1"; then
@@ -1 +1 @@
1
- {"version":3,"file":"shell.js","sourceRoot":"","sources":["../../src/exe-dev/shell.ts"],"names":[],"mappings":"AAAA,MAAM,KAAK,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,IAAI,KAAK,CAAC,UAAU,CAAC,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC;AAE/E,2EAA2E;AAC3E,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,OAAe,EAAE,IAA2B,EAAU,EAAE,CACnF,QAAQ,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;AAEpD,kFAAkF;AAClF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,QAAgB,EAAU,EAAE,CAAC,GAAG,QAAQ,MAAM,CAAC;AAE9E,gFAAgF;AAChF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACjC,QAAgB,EAChB,OAAe,EACf,IAA2B,EACnB,EAAE;AACV,6EAA6E;AAC7E,0EAA0E;AAC1E,2DAA2D;AAC3D,MAAM,KAAK,CAAC,QAAQ,CAAC,+DAA+D,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,OAAO,YAAY,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC;AAE1J;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;;;;;;;;;;;;;;CAcnC,CAAC,IAAI,EAAE,CAAC"}
1
+ {"version":3,"file":"shell.js","sourceRoot":"","sources":["../../src/exe-dev/shell.ts"],"names":[],"mappings":"AAAA,MAAM,KAAK,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,IAAI,KAAK,CAAC,UAAU,CAAC,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC;AAE/E,qGAAqG;AACrG,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,OAAe,EAAE,IAA2B,EAAU,EAAE,CACnF,QAAQ,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;AAEpD,iFAAiF;AACjF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,QAAgB,EAAU,EAAE,CAAC,GAAG,QAAQ,MAAM,CAAC;AAE9E,sGAAsG;AACtG,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACjC,QAAgB,EAChB,OAAe,EACf,IAA2B,EACnB,EAAE;AACV,6EAA6E;AAC7E,0EAA0E;AAC1E,gDAAgD;AAChD,MAAM,KAAK,CAAC,QAAQ,CAAC,+DAA+D,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,OAAO,YAAY,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC;AAE1J;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;;;;;;;;;;;;;;CAcnC,CAAC,IAAI,EAAE,CAAC"}
@@ -2,11 +2,9 @@ import { Effect } from "effect";
2
2
  import type { ExeDevCommands } from "./commands.ts";
3
3
  import type { VmState } from "./model.ts";
4
4
  /**
5
- * Reclaims crash leftovers once, before this process starts work on a VM.
6
- * Every removal is isolated: one immovable leftover must never block the
7
- * sweep's siblings or, worse, every future prepare on the Worker — so the
8
- * sweep is marked done even when parts of it failed, and each failure is
9
- * logged instead of propagated.
5
+ * Reclaims crash leftovers once per Worker before this process starts work on
6
+ * its VM. Each removal is isolated and each failure is logged, so one immovable
7
+ * leftover never blocks the sweep's siblings or a future prepare.
10
8
  */
11
9
  export declare const abandonedWorktreeSweepFor: (commands: ExeDevCommands) => Effect.Effect<(attemptId: string & import("effect/Brand").Brand<"AttemptId">, worker: string & import("effect/Brand").Brand<"WorkerName">, vm: VmState, root: string) => Effect.Effect<void, never, never>, never, never>;
12
10
  //# sourceMappingURL=sweep.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sweep.d.ts","sourceRoot":"","sources":["../../src/exe-dev/sweep.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAe,MAAM,QAAQ,CAAC;AAG7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAwC1C;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB,yPAkIrC,CAAC"}
1
+ {"version":3,"file":"sweep.d.ts","sourceRoot":"","sources":["../../src/exe-dev/sweep.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAe,MAAM,QAAQ,CAAC;AAG7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAwC1C;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,yPAiIrC,CAAC"}
@@ -1,6 +1,7 @@
1
- import { Attempt, Worker } from "@usine/core";
1
+ import { AttemptId } from "@usine/core/attempt";
2
+ import { WorkerName } from "@usine/core/worker";
2
3
  import { Effect, Ref, Schema } from "effect";
3
- import { ExecutorOperationError } from "../index.js";
4
+ import { ExecutorOperationError } from "../executor.js";
4
5
  import { keyedLockFor } from "../keyed-lock.js";
5
6
  const SWEEP_CONCURRENCY = 4;
6
7
  const directChildSchema = (parent) => {
@@ -20,11 +21,9 @@ const directChildren = (parent, output) => Schema.decodeUnknownEffect(Schema.Arr
20
21
  cause,
21
22
  })));
22
23
  /**
23
- * Reclaims crash leftovers once, before this process starts work on a VM.
24
- * Every removal is isolated: one immovable leftover must never block the
25
- * sweep's siblings or, worse, every future prepare on the Worker — so the
26
- * sweep is marked done even when parts of it failed, and each failure is
27
- * logged instead of propagated.
24
+ * Reclaims crash leftovers once per Worker before this process starts work on
25
+ * its VM. Each removal is isolated and each failure is logged, so one immovable
26
+ * leftover never blocks the sweep's siblings or a future prepare.
28
27
  */
29
28
  export const abandonedWorktreeSweepFor = Effect.fn("ExeDevExecutor.abandonedWorktreeSweepFor")(function* (commands) {
30
29
  const locks = yield* keyedLockFor();
@@ -40,9 +39,8 @@ export const abandonedWorktreeSweepFor = Effect.fn("ExeDevExecutor.abandonedWork
40
39
  });
41
40
  return;
42
41
  }
43
- // One shot per Worker per process: a partial sweep must not retry
44
- // forever in front of every prepare, so mark it done up front and
45
- // rely on the next process start to reclaim what failed today.
42
+ // Mark the sweep done before it runs. A partial sweep must not retry in
43
+ // front of every prepare; the next process start reclaims what failed.
46
44
  yield* Ref.update(swept, (current) => new Set(current).add(worker));
47
45
  const attemptsRoot = `${root}/attempts`;
48
46
  const reposRoot = `${root}/repos`;
@@ -1 +1 @@
1
- {"version":3,"file":"sweep.js","sourceRoot":"","sources":["../../src/exe-dev/sweep.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAIhD,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAE5B,MAAM,iBAAiB,GAAG,CAAC,MAAc,EAAwB,EAAE;IACjE,MAAM,MAAM,GAAG,GAAG,MAAM,GAAG,CAAC;IAC5B,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,CACxB,MAAM,CAAC,UAAU,CACf,CAAC,KAAK,EAAE,EAAE;QACR,MAAM,OAAO,GAA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