@ricsam/r5d-worker 0.0.168 → 0.0.169
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/dist/cjs/package.json +1 -1
- package/dist/mjs/internal-r5dctl.cjs +1 -1
- package/dist/mjs/main.mjs +2 -2
- package/dist/mjs/package.json +1 -1
- package/dist/mjs/personal/runtime.mjs +2 -0
- package/dist/mjs/runtime/workspace/authority.mjs +3 -3
- package/dist/mjs/runtime/workspace/outer.mjs +2 -2
- package/dist/types/runtime/workspace/outer.d.ts +6 -1
- package/package.json +2 -2
package/dist/cjs/package.json
CHANGED
|
@@ -20605,7 +20605,7 @@ function resolveEntrypointPath(entrypoint) {
|
|
|
20605
20605
|
}
|
|
20606
20606
|
}
|
|
20607
20607
|
function getR5dctlVersion() {
|
|
20608
|
-
if (true) return "0.0.
|
|
20608
|
+
if (true) return "0.0.169";
|
|
20609
20609
|
const entrypoint = process.argv[1] ? resolveEntrypointPath(process.argv[1]) : null;
|
|
20610
20610
|
let current = entrypoint ? import_node_path2.default.dirname(entrypoint) : process.cwd();
|
|
20611
20611
|
for (let index = 0; index < 12; index += 1) {
|
package/dist/mjs/main.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import { startManagerRpc } from "./runtime/releases/rpc-main.mjs";
|
|
|
7
7
|
import { ManagerRpcConfig } from "./runtime/releases/rpc-protocol.mjs";
|
|
8
8
|
const args = process.argv.slice(2);
|
|
9
9
|
if (args.includes("--version")) {
|
|
10
|
-
console.log(`r5d-worker ${true ? "0.0.
|
|
10
|
+
console.log(`r5d-worker ${true ? "0.0.169" : "development"}`);
|
|
11
11
|
} else if (!args.length || args.includes("--help")) {
|
|
12
12
|
console.log(
|
|
13
13
|
"Usage: r5d-worker start --label <label> [--root <dir>] [--base-url <url>] [--token <worker-token>]\n r5d-worker executor /absolute/private/config.json\n r5d-worker manager /absolute/private/config.json\n\nRun independently supervised durable runtime services. Provision configuration with r5dinfra."
|
|
@@ -15,7 +15,7 @@ if (args.includes("--version")) {
|
|
|
15
15
|
} else if (args[0] === "start") {
|
|
16
16
|
const runtime = await startPersonalWorker(
|
|
17
17
|
parsePersonalWorkerOptions(args.slice(1)),
|
|
18
|
-
true ? "0.0.
|
|
18
|
+
true ? "0.0.169" : "development"
|
|
19
19
|
);
|
|
20
20
|
console.log(`Worker connected: ${runtime.resourceId}`);
|
|
21
21
|
let closing = false;
|
package/dist/mjs/package.json
CHANGED
|
@@ -407,6 +407,8 @@ exec ${quote(executable)} ${quote(cli)} "$@"
|
|
|
407
407
|
if (command.method === "resize") return authority.resize(identity, ref, command.id, command.cols, command.rows);
|
|
408
408
|
if (command.method === "cancel" || command.method === "processCancel") return authority.cancel(identity, ref, command.id);
|
|
409
409
|
}
|
|
410
|
+
if (pausedForIncident && request.remediation !== true && ["hydrate", "publish", "reconcilePublication"].includes(String(command.method)))
|
|
411
|
+
throw new WorkspaceError("remediation_paused", "This worker's workspace is under remediation; synchronization resumes when it is confirmed", true);
|
|
410
412
|
if (request.kind === "product") {
|
|
411
413
|
if (command.method === "fileWrite") {
|
|
412
414
|
await authority.ensureHydrated(identity);
|
|
@@ -1408,7 +1408,7 @@ class WorkspaceAuthority {
|
|
|
1408
1408
|
if (options.bootstrapOnly) return { head: remote2, unchanged: true };
|
|
1409
1409
|
} else if (options.bootstrapOnly) return { head: state.head, unchanged: true };
|
|
1410
1410
|
if (state.conflict && !options.resolveConflict)
|
|
1411
|
-
throw new OuterSnapshotRefusal(OUTER_CONFLICT_CODE, "Workspace synchronization conflict awaits resolution", state.conflict.paths);
|
|
1411
|
+
throw new OuterSnapshotRefusal(OUTER_CONFLICT_CODE, "Workspace synchronization conflict awaits resolution", state.conflict.paths, true);
|
|
1412
1412
|
const inners = await this.innerCheckouts(userId);
|
|
1413
1413
|
let snapshot;
|
|
1414
1414
|
try {
|
|
@@ -1428,7 +1428,7 @@ class WorkspaceAuthority {
|
|
|
1428
1428
|
throw error;
|
|
1429
1429
|
});
|
|
1430
1430
|
if (bytes2 && marker.test(bytes2.toString("utf8")))
|
|
1431
|
-
throw new OuterSnapshotRefusal(OUTER_CONFLICT_CODE, "Conflict markers remain; resolve them before confirming", [file]);
|
|
1431
|
+
throw new OuterSnapshotRefusal(OUTER_CONFLICT_CODE, "Conflict markers remain; resolve them before confirming", [file], true);
|
|
1432
1432
|
}
|
|
1433
1433
|
} else if (state.blocked && state.blocked.code !== "publication_unknown") {
|
|
1434
1434
|
state.blocked = null;
|
|
@@ -1471,7 +1471,7 @@ class WorkspaceAuthority {
|
|
|
1471
1471
|
state.conflict = { ours: local, theirs: remote, tree: merge.tree, paths: merge.conflicts };
|
|
1472
1472
|
state.blocked = { code: OUTER_CONFLICT_CODE, message: "The workspace diverged from another worker; conflict markers were written to the paths named", paths: merge.conflicts };
|
|
1473
1473
|
await this.saveOuter(state);
|
|
1474
|
-
throw new OuterSnapshotRefusal(OUTER_CONFLICT_CODE, state.blocked.message, merge.conflicts);
|
|
1474
|
+
throw new OuterSnapshotRefusal(OUTER_CONFLICT_CODE, state.blocked.message, merge.conflicts, true);
|
|
1475
1475
|
}
|
|
1476
1476
|
await repo.apply(currentTree, merge.tree);
|
|
1477
1477
|
currentTree = merge.tree;
|
|
@@ -33,8 +33,8 @@ const OUTER_EXCLUDES = [
|
|
|
33
33
|
".pypirc"
|
|
34
34
|
];
|
|
35
35
|
class OuterSnapshotRefusal extends WorkspaceError {
|
|
36
|
-
constructor(code, message, paths) {
|
|
37
|
-
super(code, message);
|
|
36
|
+
constructor(code, message, paths, definite = false) {
|
|
37
|
+
super(code, message, definite);
|
|
38
38
|
this.paths = paths;
|
|
39
39
|
this.name = "OuterSnapshotRefusal";
|
|
40
40
|
}
|
|
@@ -42,9 +42,14 @@ export type OuterTreeEntry = {
|
|
|
42
42
|
oid: string;
|
|
43
43
|
};
|
|
44
44
|
/** A refusal that names the paths responsible, for the incident evidence. */
|
|
45
|
+
/** A refusal whose outcome is definite: either nothing happened, or what
|
|
46
|
+
* happened (conflict markers written, state saved) is fully recorded in the
|
|
47
|
+
* durable outer state and re-running the same command refuses the same way.
|
|
48
|
+
* `definite` travels as the relay's `rejectedBeforeAdmission`, so a caller
|
|
49
|
+
* receives a typed error instead of an uncertain outcome that blocks its run. */
|
|
45
50
|
export declare class OuterSnapshotRefusal extends WorkspaceError {
|
|
46
51
|
readonly paths: string[];
|
|
47
|
-
constructor(code: string, message: string, paths: string[]);
|
|
52
|
+
constructor(code: string, message: string, paths: string[], definite?: boolean);
|
|
48
53
|
}
|
|
49
54
|
export declare class OuterRepository {
|
|
50
55
|
readonly gitDir: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ricsam/r5d-worker",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.169",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/mjs/main.mjs",
|
|
6
6
|
"module": "./dist/mjs/main.mjs",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"r5d-worker": "dist/mjs/main.mjs"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@ricsam/r5d-api": "^0.0.
|
|
24
|
+
"@ricsam/r5d-api": "^0.0.169",
|
|
25
25
|
"node-pty": "1.1.0",
|
|
26
26
|
"zod": "^4.1.13",
|
|
27
27
|
"picomatch": "^4.0.3"
|