mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 19:10:58 +00:00
fix(coven): drop unused runtime cwd metadata
This commit is contained in:
@@ -347,11 +347,14 @@ describe("CovenAcpRuntime", () => {
|
||||
mode: "oneshot",
|
||||
cwd: workspaceDir,
|
||||
});
|
||||
handle.runtimeSessionName = __testing.encodeRuntimeSessionName({
|
||||
agent: "codex",
|
||||
mode: "prompt",
|
||||
cwd: "/tmp/attacker",
|
||||
});
|
||||
handle.runtimeSessionName = `coven:${Buffer.from(
|
||||
JSON.stringify({
|
||||
agent: "codex",
|
||||
mode: "prompt",
|
||||
cwd: "/tmp/attacker",
|
||||
}),
|
||||
"utf8",
|
||||
).toString("base64url")}`;
|
||||
|
||||
await collect(
|
||||
runtime.runTurn({
|
||||
@@ -611,7 +614,6 @@ describe("CovenAcpRuntime", () => {
|
||||
agent: "A".repeat(5_000),
|
||||
mode: "prompt".repeat(1_000),
|
||||
sessionMode: "persistent".repeat(1_000),
|
||||
cwd: "/workspace/".repeat(1_000),
|
||||
});
|
||||
|
||||
expect(Buffer.byteLength(encoded, "utf8")).toBeLessThanOrEqual("coven:".length + 2_048);
|
||||
|
||||
@@ -51,7 +51,6 @@ type CovenRuntimeSessionState = {
|
||||
agent: string;
|
||||
mode: string;
|
||||
sessionMode?: string;
|
||||
cwd?: string;
|
||||
};
|
||||
|
||||
type CovenAcpRuntimeParams = {
|
||||
@@ -109,7 +108,6 @@ function decodeRuntimeSessionName(value: string): CovenRuntimeSessionState | nul
|
||||
agent,
|
||||
mode: typeof parsed.mode === "string" ? parsed.mode : "prompt",
|
||||
...(typeof parsed.sessionMode === "string" ? { sessionMode: parsed.sessionMode } : {}),
|
||||
...(typeof parsed.cwd === "string" && parsed.cwd.trim() ? { cwd: parsed.cwd.trim() } : {}),
|
||||
};
|
||||
} catch {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user