@ricsam/r5d-worker 0.0.147 → 0.0.148
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.148" : "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.148" : "development"
|
|
19
19
|
);
|
|
20
20
|
console.log(`Worker connected: ${runtime.resourceId}`);
|
|
21
21
|
let closing = false;
|
package/dist/mjs/package.json
CHANGED
|
@@ -16,7 +16,10 @@ class PersonalActionScheduler {
|
|
|
16
16
|
continue;
|
|
17
17
|
}
|
|
18
18
|
const request = action.request;
|
|
19
|
-
const
|
|
19
|
+
const command = request.command;
|
|
20
|
+
const executionId = command?.operationId ?? command?.runId ?? command?.run?.operationId ?? command?.id ?? "unknown";
|
|
21
|
+
const workbenchId = request.workbench?.id ?? request.sessionId ?? "unknown";
|
|
22
|
+
const lane = request.kind === "tcp" && typeof request.command?.streamId === "string" ? `tcp:${request.sessionId}:${request.command.streamId}` : ["terminal", "agent"].includes(request.kind ?? "") && ["poll", "processPoll"].includes(command?.method ?? "") ? `execution-poll:${request.sessionId}:${executionId}` : ["terminal", "agent"].includes(request.kind ?? "") && ["write", "resize", "cancel", "processCancel"].includes(command?.method ?? "") ? `execution-action:${request.sessionId}:${executionId}` : request.kind === "inspect" && ["processes", "status"].includes(request.command?.method ?? "") ? `inspect:${request.sessionId}` : `mutation:${workbenchId}`;
|
|
20
23
|
if (this.active.size >= this.limit || [...this.active.values()].some((value) => value.lane === lane)) continue;
|
|
21
24
|
const task = Promise.resolve().then(() => this.execute(action)).catch(this.failed).finally(() => this.active.delete(action.id));
|
|
22
25
|
this.active.set(action.id, { hash: action.requestHash, lane, task });
|
|
@@ -4,16 +4,24 @@ export type PersonalQueuedAction = {
|
|
|
4
4
|
request: {
|
|
5
5
|
kind?: string;
|
|
6
6
|
sessionId?: string;
|
|
7
|
+
workbench?: {
|
|
8
|
+
id?: string;
|
|
9
|
+
};
|
|
7
10
|
command?: {
|
|
11
|
+
id?: string;
|
|
8
12
|
method?: string;
|
|
9
13
|
streamId?: string;
|
|
10
14
|
operationId?: string;
|
|
11
15
|
runId?: string;
|
|
16
|
+
run?: {
|
|
17
|
+
operationId?: string;
|
|
18
|
+
};
|
|
12
19
|
};
|
|
13
20
|
};
|
|
14
21
|
};
|
|
15
22
|
/** Native receipts own effects. This only admits bounded independent transport
|
|
16
|
-
* lanes
|
|
23
|
+
* lanes. Workspace authority owns filesystem serialization; this transport keeps
|
|
24
|
+
* actions ordered only within their actual workbench, process, or TCP stream. */
|
|
17
25
|
export declare class PersonalActionScheduler {
|
|
18
26
|
private readonly execute;
|
|
19
27
|
private readonly failed;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ricsam/r5d-worker",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.148",
|
|
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.148",
|
|
25
|
+
"@ricsam/r5dctl": "0.0.148",
|
|
26
26
|
"node-pty": "1.1.0",
|
|
27
27
|
"zod": "^4.1.13",
|
|
28
28
|
"picomatch": "^4.0.3"
|