@ricsam/r5d-worker 0.0.126 → 0.0.128
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/README.md +1 -1
- package/dist/cjs/main.cjs +10 -1
- package/dist/cjs/package.json +1 -1
- package/dist/mjs/main.mjs +10 -1
- package/dist/mjs/package.json +1 -1
- package/dist/types/main.d.ts +6 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -52,7 +52,7 @@ Worker labels are mandatory and unique per user. Choose labels that describe hos
|
|
|
52
52
|
|
|
53
53
|
`r5d-worker start` keeps a lightweight supervisor process attached to the launching terminal or service. When both r5d CLIs are updated from User Settings, the connected runtime verifies the installed versions, exits with a reload signal, and the supervisor reconnects using the new worker package. Updates only run while the worker has no active commands or shells.
|
|
54
54
|
|
|
55
|
-
Before every new agent generation (including subagents, queued work that starts a new generation, and resumed sessions), the server requires the connected runtime to be at least the worker release offered in User Settings. This is the server's `packages/VERSION.txt` release, or its configured `
|
|
55
|
+
Before every new agent generation (including subagents, queued work that starts a new generation, and resumed sessions), the server requires the connected runtime to be at least the worker release offered in User Settings. This is the server's `packages/VERSION.txt` release, or its configured `R5D_WORKER_PACKAGE_*` override; admission does not query the npm registry. Missing or invalid runtime versions also block starts. The error includes the running and required versions plus the exact update command. Update in User Settings, or install the packages on the worker host and restart `r5d-worker`: a newer package on disk does not update an already connected process. From 0.0.116 onward, a runtime keeps its startup version across reconnections even if the package on disk changes. Existing agent generations are allowed to finish, and connected workers remain available for updates and synchronization. Protocol cutover checks still apply separately when connecting. Publish the matching packages before deploying a server that requires their new version.
|
|
56
56
|
|
|
57
57
|
The supervisor also reconnects automatically after server rollouts and transient network failures. A brief bounded delay prevents a tight retry loop while the server is unavailable. Pressing Ctrl+C still stops the worker, and agent-managed processes retain their existing in-process recovery path while disconnected. In-process reconnects retain initialized project configurations alongside those processes, so an unchanged checkout can reconnect while a dev server is running. Changed layouts and checkouts that need initialization still wait for active commands to finish.
|
|
58
58
|
|
package/dist/cjs/main.cjs
CHANGED
|
@@ -3014,6 +3014,7 @@ async function executeStreamingCommand(input) {
|
|
|
3014
3014
|
let timeout;
|
|
3015
3015
|
let spawnedProcess;
|
|
3016
3016
|
let preparationSettled = false;
|
|
3017
|
+
let stagedEnvFiles;
|
|
3017
3018
|
const settlePreparation = () => {
|
|
3018
3019
|
if (preparationSettled) return;
|
|
3019
3020
|
preparationSettled = true;
|
|
@@ -3042,7 +3043,13 @@ async function executeStreamingCommand(input) {
|
|
|
3042
3043
|
const interactive = input.message.interactive === true;
|
|
3043
3044
|
const control = input.message.commandClass === "control";
|
|
3044
3045
|
let argv = input.message.argv;
|
|
3045
|
-
|
|
3046
|
+
if (control && input.message.envFiles?.length) throw new Error("Control commands cannot receive secret files");
|
|
3047
|
+
stagedEnvFiles = stagePtyEnvFiles(input.message.envFiles);
|
|
3048
|
+
let environment = workerChildProcessEnvironment([
|
|
3049
|
+
githubProcessEnv(),
|
|
3050
|
+
resolvePtyEnvFileReferences(input.message.env ?? {}, stagedEnvFiles),
|
|
3051
|
+
targetProcessEnv2
|
|
3052
|
+
]);
|
|
3046
3053
|
if (control) {
|
|
3047
3054
|
(0, import_control_command_policy.assertControlCommandArgv)(argv);
|
|
3048
3055
|
if (interactive) throw new Error("Control commands cannot be interactive");
|
|
@@ -3177,6 +3184,7 @@ async function executeStreamingCommand(input) {
|
|
|
3177
3184
|
if (spawnedProcess) {
|
|
3178
3185
|
await reapCompletedCredentialBearingProcessGroup(input.message.runId, spawnedProcess);
|
|
3179
3186
|
}
|
|
3187
|
+
if (stagedEnvFiles) removePtyEnvFiles(stagedEnvFiles.paths);
|
|
3180
3188
|
await releaseWorkerCommandLaunch(input.resources);
|
|
3181
3189
|
activeProcesses.delete(input.message.runId);
|
|
3182
3190
|
cancelledProcessRuns.delete(input.message.runId);
|
|
@@ -6051,6 +6059,7 @@ async function startWorker(options, projectRuntime = {
|
|
|
6051
6059
|
browserFileUploads: true,
|
|
6052
6060
|
execStdinV1: true,
|
|
6053
6061
|
ptyEnvFilesV1: true,
|
|
6062
|
+
execEnvFilesV1: true,
|
|
6054
6063
|
workspaceRemediationAncestorGuardV1: true,
|
|
6055
6064
|
workspaceIncidentConfigDeferralV1: true,
|
|
6056
6065
|
workspaceConfigResetToCanonicalV1: true,
|
package/dist/cjs/package.json
CHANGED
package/dist/mjs/main.mjs
CHANGED
|
@@ -3035,6 +3035,7 @@ async function executeStreamingCommand(input) {
|
|
|
3035
3035
|
let timeout;
|
|
3036
3036
|
let spawnedProcess;
|
|
3037
3037
|
let preparationSettled = false;
|
|
3038
|
+
let stagedEnvFiles;
|
|
3038
3039
|
const settlePreparation = () => {
|
|
3039
3040
|
if (preparationSettled) return;
|
|
3040
3041
|
preparationSettled = true;
|
|
@@ -3063,7 +3064,13 @@ async function executeStreamingCommand(input) {
|
|
|
3063
3064
|
const interactive = input.message.interactive === true;
|
|
3064
3065
|
const control = input.message.commandClass === "control";
|
|
3065
3066
|
let argv = input.message.argv;
|
|
3066
|
-
|
|
3067
|
+
if (control && input.message.envFiles?.length) throw new Error("Control commands cannot receive secret files");
|
|
3068
|
+
stagedEnvFiles = stagePtyEnvFiles(input.message.envFiles);
|
|
3069
|
+
let environment = workerChildProcessEnvironment([
|
|
3070
|
+
githubProcessEnv(),
|
|
3071
|
+
resolvePtyEnvFileReferences(input.message.env ?? {}, stagedEnvFiles),
|
|
3072
|
+
targetProcessEnv2
|
|
3073
|
+
]);
|
|
3067
3074
|
if (control) {
|
|
3068
3075
|
assertControlCommandArgv(argv);
|
|
3069
3076
|
if (interactive) throw new Error("Control commands cannot be interactive");
|
|
@@ -3198,6 +3205,7 @@ async function executeStreamingCommand(input) {
|
|
|
3198
3205
|
if (spawnedProcess) {
|
|
3199
3206
|
await reapCompletedCredentialBearingProcessGroup(input.message.runId, spawnedProcess);
|
|
3200
3207
|
}
|
|
3208
|
+
if (stagedEnvFiles) removePtyEnvFiles(stagedEnvFiles.paths);
|
|
3201
3209
|
await releaseWorkerCommandLaunch(input.resources);
|
|
3202
3210
|
activeProcesses.delete(input.message.runId);
|
|
3203
3211
|
cancelledProcessRuns.delete(input.message.runId);
|
|
@@ -6072,6 +6080,7 @@ async function startWorker(options, projectRuntime = {
|
|
|
6072
6080
|
browserFileUploads: true,
|
|
6073
6081
|
execStdinV1: true,
|
|
6074
6082
|
ptyEnvFilesV1: true,
|
|
6083
|
+
execEnvFilesV1: true,
|
|
6075
6084
|
workspaceRemediationAncestorGuardV1: true,
|
|
6076
6085
|
workspaceIncidentConfigDeferralV1: true,
|
|
6077
6086
|
workspaceConfigResetToCanonicalV1: true,
|
package/dist/mjs/package.json
CHANGED
package/dist/types/main.d.ts
CHANGED
|
@@ -421,6 +421,12 @@ type WorkerServerMessage = WorkerRecoveryServerMessage | {
|
|
|
421
421
|
credentialId?: string;
|
|
422
422
|
cwd?: string;
|
|
423
423
|
env?: Record<string, string>;
|
|
424
|
+
envFiles?: Array<{
|
|
425
|
+
path: string;
|
|
426
|
+
content: string;
|
|
427
|
+
mode?: number;
|
|
428
|
+
}>;
|
|
429
|
+
accountEnvironmentWorkerId?: string;
|
|
424
430
|
timeoutMs?: number;
|
|
425
431
|
interactive?: boolean;
|
|
426
432
|
workspaceEffect?: "none";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ricsam/r5d-worker",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.128",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/cjs/main.cjs",
|
|
6
6
|
"module": "./dist/mjs/main.mjs",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"r5d-worker": "dist/cjs/main.cjs"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@ricsam/r5d-api": "^0.0.
|
|
24
|
+
"@ricsam/r5d-api": "^0.0.128",
|
|
25
25
|
"node-pty": "^1.1.0",
|
|
26
26
|
"picomatch": "^4.0.3"
|
|
27
27
|
},
|