@ricsam/r5d-worker 0.0.144 → 0.0.145
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
CHANGED
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.145" : "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.145" : "development"
|
|
19
19
|
);
|
|
20
20
|
console.log(`Worker connected: ${runtime.resourceId}`);
|
|
21
21
|
let closing = false;
|
package/dist/mjs/package.json
CHANGED
|
@@ -422,7 +422,11 @@ class WorkspaceAuthority {
|
|
|
422
422
|
} catch {
|
|
423
423
|
}
|
|
424
424
|
}
|
|
425
|
-
|
|
425
|
+
const state = structuredClone(b.state);
|
|
426
|
+
state.runs = Object.fromEntries(
|
|
427
|
+
Object.entries(state.runs).filter(([, run]) => (run.sessionId ?? b.config.sessionId) === identity.sessionId)
|
|
428
|
+
);
|
|
429
|
+
return { workbench: { ...b.config, sessionId: identity.sessionId }, ...state, files };
|
|
426
430
|
});
|
|
427
431
|
}
|
|
428
432
|
async cleanRefreshBase(b, expectedBase) {
|
|
@@ -1355,13 +1359,13 @@ ${DEFAULT_WORKSPACE_IGNORE}`, { mode: 384 });
|
|
|
1355
1359
|
async runRoute(identity, run) {
|
|
1356
1360
|
const b = await this.bench(identity);
|
|
1357
1361
|
if (run.userId !== identity.userId || run.sessionId !== identity.sessionId || !b.state.runs[run.operationId] || (b.state.runs[run.operationId].sessionId ?? b.config.sessionId) !== identity.sessionId)
|
|
1358
|
-
throw new WorkspaceError("forbidden", "Run does not belong to this workbench");
|
|
1362
|
+
throw new WorkspaceError("forbidden", "Run does not belong to this workbench", true);
|
|
1359
1363
|
if (b.state.runs[run.operationId].state === "rejected_capacity")
|
|
1360
|
-
throw new WorkspaceError("run_not_admitted", "This operation was definitively rejected; no executor run exists");
|
|
1364
|
+
throw new WorkspaceError("run_not_admitted", "This operation was definitively rejected; no executor run exists", true);
|
|
1361
1365
|
await this.owned();
|
|
1362
1366
|
const route = await this.route(b, identity);
|
|
1363
1367
|
if (run.fence.installationId !== this.config.installationId || run.fence.resourceType !== route.workerFence.resourceType || run.fence.resourceId !== route.workerFence.resourceId)
|
|
1364
|
-
throw new WorkspaceError("wrong_resource", "Wrong worker resource");
|
|
1368
|
+
throw new WorkspaceError("wrong_resource", "Wrong worker resource", true);
|
|
1365
1369
|
return { b, route };
|
|
1366
1370
|
}
|
|
1367
1371
|
action(fn) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ricsam/r5d-worker",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.145",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/mjs/main.mjs",
|
|
6
6
|
"module": "./dist/mjs/main.mjs",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"r5d-worker": "dist/mjs/main.mjs"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@ricsam/r5d-api": "^0.0.
|
|
25
|
-
"@ricsam/r5dctl": "0.0.
|
|
24
|
+
"@ricsam/r5d-api": "^0.0.145",
|
|
25
|
+
"@ricsam/r5dctl": "0.0.145",
|
|
26
26
|
"node-pty": "1.1.0",
|
|
27
27
|
"zod": "^4.1.13",
|
|
28
28
|
"picomatch": "^4.0.3"
|