@orchestraworks/worker-darwin-arm64 0.0.141 → 0.0.143
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/package.json +1 -1
- package/script-harness/index.js +12 -9
- package/script-harness/package.json +1 -1
- package/worker +2 -2
package/package.json
CHANGED
package/script-harness/index.js
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
//
|
|
6
6
|
// Each turn ends by setting the session's outcome claim from the command's exit code, sent with the agent's
|
|
7
7
|
// own token when the harness has one. A machine with no edge of ours in front of it, which the worker
|
|
8
|
-
// declares
|
|
9
|
-
//
|
|
8
|
+
// declares on each harness process, refuses a bare claim: with no token there the harness makes no call at
|
|
9
|
+
// all and ends the turn on the script's own answer.
|
|
10
10
|
|
|
11
11
|
import { spawn } from "node:child_process";
|
|
12
12
|
import { randomUUID } from "node:crypto";
|
|
@@ -18,7 +18,7 @@ import { createInterface } from "node:readline";
|
|
|
18
18
|
import { describeFetchFailure } from "./fetch-failure.js";
|
|
19
19
|
|
|
20
20
|
const HARNESS_NAME = "software-factory-script-harness";
|
|
21
|
-
const HARNESS_VERSION = "0.0.
|
|
21
|
+
const HARNESS_VERSION = "0.0.143";
|
|
22
22
|
|
|
23
23
|
const IS_WINDOWS = process.platform === "win32";
|
|
24
24
|
|
|
@@ -267,11 +267,13 @@ function agentApiBaseUrl() {
|
|
|
267
267
|
|
|
268
268
|
// The worker declares this on a machine the customer enrolled, and on no machine the platform launched.
|
|
269
269
|
// Presence is the declaration. The worker answers it from that machine's own bootstrap rather than
|
|
270
|
-
// passing a value through, so nothing running inside the machine can declare it of itself.
|
|
271
|
-
|
|
270
|
+
// passing a value through, so nothing running inside the machine can declare it of itself. A worker built
|
|
271
|
+
// before the rename declares it under the former name alone, which is read second.
|
|
272
|
+
const MACHINE_ENROLLED = ["ORCHESTRA_MACHINE_ENROLLED", "SFDK_MACHINE_ENROLLED"];
|
|
272
273
|
|
|
273
|
-
|
|
274
|
-
|
|
274
|
+
/** The name the worker declared this machine enrolled under, or undefined on a machine the platform launched. */
|
|
275
|
+
function enrolledDeclaration() {
|
|
276
|
+
return MACHINE_ENROLLED.find((name) => (process.env[name] || "").trim() !== "");
|
|
275
277
|
}
|
|
276
278
|
|
|
277
279
|
// The worker renews the file in place, so it is read on every call. Behind our edge the edge replaces
|
|
@@ -699,9 +701,10 @@ async function claimPlatformState({
|
|
|
699
701
|
// that stamp too, and there the refusal is a deployment fault to surface rather than a turn to settle
|
|
700
702
|
// quietly.
|
|
701
703
|
const token = agentToken();
|
|
702
|
-
|
|
704
|
+
const declaration = enrolledDeclaration();
|
|
705
|
+
if (declaration !== undefined && !token) {
|
|
703
706
|
logDiagnostic(
|
|
704
|
-
`${
|
|
707
|
+
`${declaration} is set and no agent token is readable, so nothing authorizes this machine's ` +
|
|
705
708
|
`calls to the platform: this turn claims no session state and settles on its answer`,
|
|
706
709
|
);
|
|
707
710
|
succeed(answerText);
|
package/worker
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
[diffend] Oversized file quarantined before diffing.
|
|
2
2
|
name: package/worker
|
|
3
|
-
size:
|
|
4
|
-
sha256:
|
|
3
|
+
size: 46512002 bytes
|
|
4
|
+
sha256: 8e7ca1b569bf7e725752e0b01215daea3248459551d01f5bd30a29582290b217
|