@ricsam/r5d-worker 0.0.149 → 0.0.151
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.151" : "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.151" : "development"
|
|
19
19
|
);
|
|
20
20
|
console.log(`Worker connected: ${runtime.resourceId}`);
|
|
21
21
|
let closing = false;
|
package/dist/mjs/package.json
CHANGED
|
@@ -21,7 +21,7 @@ class PersonalActionScheduler {
|
|
|
21
21
|
const command = request.command;
|
|
22
22
|
const executionId = command?.operationId ?? command?.runId ?? command?.run?.operationId ?? command?.id ?? "unknown";
|
|
23
23
|
const workbenchId = request.workbench?.id ?? request.sessionId ?? "unknown";
|
|
24
|
-
const responsive = ["terminal", "agent", "tcp"].includes(request.kind ?? "");
|
|
24
|
+
const responsive = action.schedulingPriority === "interactive" || ["terminal", "agent", "tcp"].includes(request.kind ?? "");
|
|
25
25
|
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:${workbenchId}` : `mutation:${workbenchId}`;
|
|
26
26
|
const capacity = this.limit + (responsive ? this.responsiveReserve : 0);
|
|
27
27
|
if (this.active.size >= capacity || [...this.active.values()].some((value) => value.lane === lane)) continue;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export type PersonalQueuedAction = {
|
|
2
2
|
id: string;
|
|
3
3
|
requestHash: string;
|
|
4
|
+
schedulingPriority?: "background" | "interactive";
|
|
4
5
|
request: {
|
|
5
6
|
kind?: string;
|
|
6
7
|
sessionId?: string;
|
|
@@ -22,8 +23,9 @@ export type PersonalQueuedAction = {
|
|
|
22
23
|
/** Native receipts own effects. This only admits bounded independent transport
|
|
23
24
|
* lanes. Workspace authority owns filesystem serialization; this transport keeps
|
|
24
25
|
* actions ordered only within their actual workbench, process, or TCP stream.
|
|
25
|
-
* Terminal, agent, and
|
|
26
|
-
* workbench inspections cannot consume every connection
|
|
26
|
+
* Terminal, agent, TCP and explicitly interactive traffic has a small bounded
|
|
27
|
+
* reserve so background workbench inspections cannot consume every connection
|
|
28
|
+
* needed to control it. */
|
|
27
29
|
export declare class PersonalActionScheduler {
|
|
28
30
|
private readonly execute;
|
|
29
31
|
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.151",
|
|
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.151",
|
|
25
|
+
"@ricsam/r5dctl": "0.0.151",
|
|
26
26
|
"node-pty": "1.1.0",
|
|
27
27
|
"zod": "^4.1.13",
|
|
28
28
|
"picomatch": "^4.0.3"
|