@parall/daemon 1.34.0 → 1.35.0
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/bundle/manifest.json +9 -9
- package/bundle/parall-claude-agent.js +168 -92
- package/bundle/parall-codex-agent.js +163 -91
- package/bundle/parall-daemon.js +702 -38
- package/dist/clip-runtime/browser-profile-manager.d.ts +10 -0
- package/dist/clip-runtime/browser-profile-manager.d.ts.map +1 -1
- package/dist/clip-runtime/browser-profile-manager.js +38 -26
- package/dist/clip-runtime/browser-viewer-streamer.d.ts +188 -0
- package/dist/clip-runtime/browser-viewer-streamer.d.ts.map +1 -0
- package/dist/clip-runtime/browser-viewer-streamer.js +595 -0
- package/dist/clip-runtime/subprocess.d.ts +11 -0
- package/dist/clip-runtime/subprocess.d.ts.map +1 -0
- package/dist/clip-runtime/subprocess.js +33 -0
- package/dist/supervisor.d.ts +10 -1
- package/dist/supervisor.d.ts.map +1 -1
- package/dist/supervisor.js +48 -6
- package/package.json +6 -6
package/dist/supervisor.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"supervisor.d.ts","sourceRoot":"","sources":["../src/supervisor.ts"],"names":[],"mappings":"AAGA,OAAO,EAA8B,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACpF,OAAO,
|
|
1
|
+
{"version":3,"file":"supervisor.d.ts","sourceRoot":"","sources":["../src/supervisor.ts"],"names":[],"mappings":"AAGA,OAAO,EAA8B,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACpF,OAAO,EAeL,KAAK,YAAY,EAElB,MAAM,aAAa,CAAC;AASrB,OAAO,EAKL,KAAK,kBAAkB,EAExB,MAAM,aAAa,CAAC;AAIrB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAiBlD;;;;GAIG;AACH,iBAAS,gBAAgB,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,OA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AyE;IACnE,GAAG,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IA0L7C,sEAAsE;IAChE,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;YA8Cb,kBAAkB;YAwClB,aAAa;YA0Db,wBAAwB;IA+BtC;;;;OAIG;IACH,OAAO,CAAC,iBAAiB;YA6CX,kBAAkB;YAqBlB,mBAAmB;YAgBnB,mBAAmB;YAmBnB,sBAAsB;YAwBtB,6BAA6B;IAoC3C,OAAO,CAAC,8BAA8B;IAMtC,OAAO,CAAC,uBAAuB;IAgB/B;;;;;OAKG;YACW,0BAA0B;IAiCxC,OAAO,CAAC,2BAA2B;YAIrB,cAAc;YAId,qBAAqB;YAgBrB,wBAAwB;IA+CtC,OAAO,CAAC,uBAAuB;IAU/B,OAAO,CAAC,sBAAsB;IAM9B,OAAO,CAAC,mBAAmB;IAe3B,OAAO,CAAC,uBAAuB;IAyB/B,OAAO,CAAC,aAAa;IAgBrB,OAAO,CAAC,mBAAmB;YAab,mBAAmB;IAyCjC,OAAO,CAAC,wBAAwB;YAelB,qBAAqB;YAWrB,6BAA6B;IAqC3C,OAAO,CAAC,2BAA2B;IAYnC,OAAO,CAAC,wBAAwB;YAUlB,oBAAoB;IAmClC;;;;;;;OAOG;IACH,OAAO,CAAC,qBAAqB;IAQ7B;;;;;;OAMG;IACH,OAAO,CAAC,YAAY;IASpB;;;;;;;;OAQG;YACW,sBAAsB;YA4CtB,kBAAkB;YAYlB,eAAe;YAcf,UAAU;YAoBV,cAAc;IAkE5B,OAAO,CAAC,UAAU;YA4GJ,cAAc;IAyB5B,OAAO,CAAC,0BAA0B;CAkCnC"}
|
package/dist/supervisor.js
CHANGED
|
@@ -57,7 +57,12 @@ export class DaemonSupervisor {
|
|
|
57
57
|
children = new Map();
|
|
58
58
|
spawningAgents = new Set();
|
|
59
59
|
pendingWorkspaceSetup = new Set();
|
|
60
|
-
|
|
60
|
+
// ONE queue per profile for BOTH lifecycle (open/stop/reset) and viewer
|
|
61
|
+
// (stream.*/nav) commands. They mutate the same streamer + account state, so
|
|
62
|
+
// two independent queues would let a stop/reset interleave with an in-flight
|
|
63
|
+
// stream.start (the kill fires before the streamer registers and misses it,
|
|
64
|
+
// leaving a live streamer on a profile the server just marked stopped).
|
|
65
|
+
browserProfileOpQueues = new Map();
|
|
61
66
|
workspaceSetupRetryTimers = new Map();
|
|
62
67
|
cancelledSpawns = new Set();
|
|
63
68
|
ws = null;
|
|
@@ -236,6 +241,10 @@ export class DaemonSupervisor {
|
|
|
236
241
|
this.log.info(`WS: browser profile lifecycle requested — profile=${data.profile_id} action=${data.action}`);
|
|
237
242
|
void this.enqueueBrowserProfileLifecycle(data);
|
|
238
243
|
});
|
|
244
|
+
this.ws.on('machine.browser_profile.viewer', (data) => {
|
|
245
|
+
this.log.info(`WS: browser profile viewer command — profile=${data.profile_id} command=${data.command}`);
|
|
246
|
+
this.enqueueBrowserProfileViewer(data);
|
|
247
|
+
});
|
|
239
248
|
this.ws.onStateChange((state) => {
|
|
240
249
|
if (state === 'disconnected' || state === 'reconnecting') {
|
|
241
250
|
this.log.warn(`machine WS state: ${state}`);
|
|
@@ -564,20 +573,53 @@ export class DaemonSupervisor {
|
|
|
564
573
|
}
|
|
565
574
|
}
|
|
566
575
|
enqueueBrowserProfileLifecycle(data) {
|
|
567
|
-
|
|
576
|
+
return this.enqueueBrowserProfileOp(data.profile_id, () => this.handleBrowserProfileLifecycle(data));
|
|
577
|
+
}
|
|
578
|
+
enqueueBrowserProfileOp(profileId, op) {
|
|
579
|
+
const previous = this.browserProfileOpQueues.get(profileId) ?? Promise.resolve();
|
|
568
580
|
const next = previous
|
|
569
581
|
.catch(() => {
|
|
570
582
|
// Keep the queue moving even if a prior operation failed unexpectedly.
|
|
571
583
|
})
|
|
572
|
-
.then(
|
|
573
|
-
this.
|
|
584
|
+
.then(op);
|
|
585
|
+
this.browserProfileOpQueues.set(profileId, next);
|
|
574
586
|
void next.finally(() => {
|
|
575
|
-
if (this.
|
|
576
|
-
this.
|
|
587
|
+
if (this.browserProfileOpQueues.get(profileId) === next) {
|
|
588
|
+
this.browserProfileOpQueues.delete(profileId);
|
|
577
589
|
}
|
|
578
590
|
});
|
|
579
591
|
return next;
|
|
580
592
|
}
|
|
593
|
+
/**
|
|
594
|
+
* Handle one viewer control command and reply via REST. Always answers the
|
|
595
|
+
* request/reply bridge exactly once ({result} on success, {error:{message}}
|
|
596
|
+
* on failure) and never throws into the WS event loop — mirrors
|
|
597
|
+
* handleFilesystemBrowse. Serialized per profile by enqueueBrowserProfileViewer.
|
|
598
|
+
*/
|
|
599
|
+
async handleBrowserProfileViewer(data) {
|
|
600
|
+
if (!this.browserProfileManager) {
|
|
601
|
+
await this.client
|
|
602
|
+
.postBrowserProfileViewerResponse(data.request_id, {
|
|
603
|
+
error: { message: 'Browser profile runtime is disabled on this daemon' },
|
|
604
|
+
})
|
|
605
|
+
.catch((err) => this.log.warn(`browser profile viewer negative ACK failed: ${String(err)}`));
|
|
606
|
+
return;
|
|
607
|
+
}
|
|
608
|
+
try {
|
|
609
|
+
const result = await this.browserProfileManager.handleViewerCommand(data.profile_id, data.session_id, data.command, data.input, data.turn);
|
|
610
|
+
await this.client.postBrowserProfileViewerResponse(data.request_id, { result });
|
|
611
|
+
}
|
|
612
|
+
catch (err) {
|
|
613
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
614
|
+
this.log.warn(`browser profile viewer command failed (profile=${data.profile_id}, command=${data.command}): ${message}`);
|
|
615
|
+
await this.client
|
|
616
|
+
.postBrowserProfileViewerResponse(data.request_id, { error: { message } })
|
|
617
|
+
.catch((replyErr) => this.log.warn(`browser profile viewer error ACK failed: ${String(replyErr)}`));
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
enqueueBrowserProfileViewer(data) {
|
|
621
|
+
void this.enqueueBrowserProfileOp(data.profile_id, () => this.handleBrowserProfileViewer(data));
|
|
622
|
+
}
|
|
581
623
|
async handleClipSync(_data) {
|
|
582
624
|
await this.reconcileMachineClips();
|
|
583
625
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parall/daemon",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.35.0",
|
|
4
4
|
"description": "Parall local agent runtime — daemon supervisor + bridge runtimes, bundled as standalone JS files",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@pinixai/bb-browser-pro": "0.15.0",
|
|
33
|
-
"@parall/agent-core": "1.
|
|
34
|
-
"@parall/
|
|
35
|
-
"@parall/
|
|
36
|
-
"@parall/
|
|
37
|
-
"@parall/
|
|
33
|
+
"@parall/agent-core": "1.35.0",
|
|
34
|
+
"@parall/sdk": "1.35.0",
|
|
35
|
+
"@parall/claude-agent": "1.35.0",
|
|
36
|
+
"@parall/codex-agent": "1.35.0",
|
|
37
|
+
"@parall/openclaw-agent": "1.35.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@types/node": "^22.0.0",
|