forge-openclaw-plugin 0.2.113 → 0.2.114
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.
|
Binary file
|
|
@@ -5527,8 +5527,11 @@ function rewriteMountPath(url) {
|
|
|
5527
5527
|
const queryIndex = url.indexOf("?");
|
|
5528
5528
|
const pathname = queryIndex >= 0 ? url.slice(0, queryIndex) : url;
|
|
5529
5529
|
const search = queryIndex >= 0 ? url.slice(queryIndex) : "";
|
|
5530
|
+
if (pathname === "/") {
|
|
5531
|
+
return `/__forge-ui-root-redirect${search}`;
|
|
5532
|
+
}
|
|
5530
5533
|
if (pathname === "/forge") {
|
|
5531
|
-
return
|
|
5534
|
+
return `/__forge-ui-base-redirect${search}`;
|
|
5532
5535
|
}
|
|
5533
5536
|
if (pathname.startsWith("/forge/")) {
|
|
5534
5537
|
return `${pathname.slice("/forge".length) || "/"}${search}`;
|
|
@@ -487,6 +487,7 @@ export async function registerWebRoutes(app, options = {}) {
|
|
|
487
487
|
const devWebRuntime = options.devWebRuntime ?? createManagedDevWebRuntime();
|
|
488
488
|
const fetchImpl = options.fetchImpl ?? fetch;
|
|
489
489
|
const devAssetProxy = options.devAssetProxy ?? createDevAssetProxy(fetchImpl);
|
|
490
|
+
const basePath = normalizeBasePath(getDefaultBasePath());
|
|
490
491
|
app.addHook("onClose", async () => {
|
|
491
492
|
await devWebRuntime.stop();
|
|
492
493
|
devAssetProxy.close();
|
|
@@ -501,6 +502,16 @@ export async function registerWebRoutes(app, options = {}) {
|
|
|
501
502
|
});
|
|
502
503
|
})();
|
|
503
504
|
});
|
|
505
|
+
app.get("/__forge-ui-root-redirect", async (_request, reply) => {
|
|
506
|
+
if (basePath !== "/") {
|
|
507
|
+
reply.redirect(basePath, 302);
|
|
508
|
+
return;
|
|
509
|
+
}
|
|
510
|
+
return serveAsset("/", reply, { devWebRuntime, devAssetProxy });
|
|
511
|
+
});
|
|
512
|
+
app.get("/__forge-ui-base-redirect", async (_request, reply) => {
|
|
513
|
+
reply.redirect(basePath, 302);
|
|
514
|
+
});
|
|
504
515
|
app.get("/", async (_request, reply) => serveAsset("/", reply, { devWebRuntime, devAssetProxy }));
|
|
505
516
|
app.get("/*", async (request, reply) => serveAsset(request.url, reply, { devWebRuntime, devAssetProxy }));
|
|
506
517
|
}
|
package/openclaw.plugin.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"id": "forge-openclaw-plugin",
|
|
3
3
|
"name": "Forge",
|
|
4
4
|
"description": "Curated OpenClaw adapter for the Forge collaboration API, UI entrypoint, and localhost auto-start runtime.",
|
|
5
|
-
"version": "0.2.
|
|
5
|
+
"version": "0.2.114",
|
|
6
6
|
"activation": {
|
|
7
7
|
"onStartup": true,
|
|
8
8
|
"onCapabilities": [
|
package/package.json
CHANGED