@alfe.ai/openclaw-remote 0.0.7 → 0.0.9
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/plugin2.cjs +9 -0
- package/dist/plugin2.js +10 -1
- package/package.json +3 -3
package/dist/plugin2.cjs
CHANGED
|
@@ -409,6 +409,13 @@ function registerTools(api) {
|
|
|
409
409
|
});
|
|
410
410
|
const controlUrl = buildControlUrl(dashboardBaseUrl, selfAgentId, sessionId);
|
|
411
411
|
const message = controlUrl ? `Browser takeover requested (session ${sessionId}). Ask the user to open this link to take control and complete: ${controlUrl} — then wait; I'll resume automatically once they hand back.` : `Browser takeover requested (session ${sessionId}). Ask the user to open the Alfe dashboard, go to this agent's Browser tab, and take control — then wait; I'll resume automatically once they hand back.`;
|
|
412
|
+
surface.addHold();
|
|
413
|
+
let holdReleased = false;
|
|
414
|
+
const releaseHold = () => {
|
|
415
|
+
if (holdReleased) return;
|
|
416
|
+
holdReleased = true;
|
|
417
|
+
surface.removeHold();
|
|
418
|
+
};
|
|
412
419
|
try {
|
|
413
420
|
return {
|
|
414
421
|
sessionId,
|
|
@@ -417,6 +424,7 @@ function registerTools(api) {
|
|
|
417
424
|
...await surface.requestHandoff(handoffTimeoutMs)
|
|
418
425
|
};
|
|
419
426
|
} finally {
|
|
427
|
+
releaseHold();
|
|
420
428
|
await apiClient.completeRemoteSession(sessionId).catch(() => {});
|
|
421
429
|
}
|
|
422
430
|
}
|
|
@@ -428,6 +436,7 @@ const plugin = {
|
|
|
428
436
|
description: "Interactive remote control — browser co-browse takeover and web terminal",
|
|
429
437
|
version: pkg.version,
|
|
430
438
|
activate(api) {
|
|
439
|
+
(0, _alfe_ai_agent_api_client.installToolErrorCapture)(api, { plugin: "openclaw-remote" });
|
|
431
440
|
const log = api.logger;
|
|
432
441
|
const pluginConfig = api.config?.plugins?.entries?.["@alfe.ai/openclaw-remote"]?.config ?? {};
|
|
433
442
|
pluginConfig.browserExecutablePath ??= api.config?.browser?.executablePath;
|
package/dist/plugin2.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
2
|
import { resolveConfig } from "@alfe.ai/config";
|
|
3
|
-
import { AgentApiClient } from "@alfe.ai/agent-api-client";
|
|
3
|
+
import { AgentApiClient, installToolErrorCapture } from "@alfe.ai/agent-api-client";
|
|
4
4
|
import { RemoteFrameType, RemoteServiceClient, decodeJson } from "@alfe.ai/remote";
|
|
5
5
|
import { BrowserSurface } from "@alfe.ai/browser";
|
|
6
6
|
import { TerminalSurface } from "@alfe.ai/terminal";
|
|
@@ -409,6 +409,13 @@ function registerTools(api) {
|
|
|
409
409
|
});
|
|
410
410
|
const controlUrl = buildControlUrl(dashboardBaseUrl, selfAgentId, sessionId);
|
|
411
411
|
const message = controlUrl ? `Browser takeover requested (session ${sessionId}). Ask the user to open this link to take control and complete: ${controlUrl} — then wait; I'll resume automatically once they hand back.` : `Browser takeover requested (session ${sessionId}). Ask the user to open the Alfe dashboard, go to this agent's Browser tab, and take control — then wait; I'll resume automatically once they hand back.`;
|
|
412
|
+
surface.addHold();
|
|
413
|
+
let holdReleased = false;
|
|
414
|
+
const releaseHold = () => {
|
|
415
|
+
if (holdReleased) return;
|
|
416
|
+
holdReleased = true;
|
|
417
|
+
surface.removeHold();
|
|
418
|
+
};
|
|
412
419
|
try {
|
|
413
420
|
return {
|
|
414
421
|
sessionId,
|
|
@@ -417,6 +424,7 @@ function registerTools(api) {
|
|
|
417
424
|
...await surface.requestHandoff(handoffTimeoutMs)
|
|
418
425
|
};
|
|
419
426
|
} finally {
|
|
427
|
+
releaseHold();
|
|
420
428
|
await apiClient.completeRemoteSession(sessionId).catch(() => {});
|
|
421
429
|
}
|
|
422
430
|
}
|
|
@@ -428,6 +436,7 @@ const plugin = {
|
|
|
428
436
|
description: "Interactive remote control — browser co-browse takeover and web terminal",
|
|
429
437
|
version: pkg.version,
|
|
430
438
|
activate(api) {
|
|
439
|
+
installToolErrorCapture(api, { plugin: "openclaw-remote" });
|
|
431
440
|
const log = api.logger;
|
|
432
441
|
const pluginConfig = api.config?.plugins?.entries?.["@alfe.ai/openclaw-remote"]?.config ?? {};
|
|
433
442
|
pluginConfig.browserExecutablePath ??= api.config?.browser?.executablePath;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfe.ai/openclaw-remote",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
4
4
|
"description": "OpenClaw plugin for Alfe's interactive remote-control relay — browser co-browse + web terminal surfaces over one outbound WS",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/plugin.js",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"openclaw.plugin.json"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@alfe.ai/agent-api-client": "^0.
|
|
31
|
-
"@alfe.ai/browser": "^0.
|
|
30
|
+
"@alfe.ai/agent-api-client": "^0.8.0",
|
|
31
|
+
"@alfe.ai/browser": "^0.2.0",
|
|
32
32
|
"@alfe.ai/config": "0.3.0",
|
|
33
33
|
"@alfe.ai/remote": "^0.1.0",
|
|
34
34
|
"@alfe.ai/terminal": "^0.1.1"
|