Files
openclaw/src/plugin-sdk/agent-runtime-avatar-contract.test.ts
T
Peter Steinberger 505f8ae6a3 fix(control-ui): harden workspace avatar projection (#103657)
* fix(control-ui): harden workspace avatar projection

Co-authored-by: LZY3538 <liu.zhenye@xydigit.com>

* refactor(gateway): remove dead avatar URL mapper

* test(control-ui): track avatar temp directories

---------

Co-authored-by: LZY3538 <liu.zhenye@xydigit.com>
2026-07-10 13:31:22 +01:00

24 lines
807 B
TypeScript

// Compile-time contract guard for the shipped agent-runtime avatar surface.
import { describe, expect, it } from "vitest";
import type { AgentAvatarResolution } from "./agent-runtime.js";
const legacyLocalResolution: AgentAvatarResolution = {
kind: "local",
filePath: "/workspace/avatar.png",
source: "avatar.png",
};
const internalFileHelperIsPrivate: "openLocalAgentAvatarFile" extends keyof typeof import("./agent-runtime.js")
? true
: false = false;
describe("agent-runtime avatar contract", () => {
it("keeps the local result shape without exporting pinned-file internals", () => {
expect(legacyLocalResolution).toEqual({
kind: "local",
filePath: "/workspace/avatar.png",
source: "avatar.png",
});
expect(internalFileHelperIsPrivate).toBe(false);
});
});