perf(gateway): cache stable plugin index fingerprints

This commit is contained in:
Peter Steinberger
2026-05-27 10:01:57 +01:00
parent 1d4537add3
commit 2babe03bf5
8 changed files with 296 additions and 121 deletions

View File

@@ -35,14 +35,13 @@ async function createApp(
queue: ExecApprovalRequest[] = [createExecApproval()],
) {
const { OpenClawApp } = await import("./app.ts");
const app = new OpenClawApp();
Object.defineProperty(app, "client", {
value: { request },
writable: true,
const app = Object.create(OpenClawApp.prototype) as InstanceType<typeof OpenClawApp>;
Object.defineProperties(app, {
client: { value: { request }, writable: true },
execApprovalBusy: { value: false, writable: true },
execApprovalError: { value: null, writable: true },
execApprovalQueue: { value: queue, writable: true },
});
app.execApprovalQueue = queue;
app.execApprovalBusy = false;
app.execApprovalError = null;
return app;
}