feat(runtime): establish miniapp kernel and sdk design
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { ArtifactContentCache } from "@/runtime/artifacts/artifact-content-cache";
|
||||
|
||||
describe("ArtifactContentCache", () => {
|
||||
it("accepts only host-owned opaque references and never exposes paths", () => {
|
||||
const cache = new ArtifactContentCache();
|
||||
expect(cache.put("artifact-cache-001", new Blob(["verified bytes"]))).toBe(true);
|
||||
expect(cache.has("artifact-cache-001")).toBe(true);
|
||||
expect(cache.get("artifact-cache-001")?.size).toBe(14);
|
||||
expect(cache.put("/tmp/report.pdf", new Blob(["x"]))).toBe(false);
|
||||
expect(cache.has("/tmp/report.pdf")).toBe(false);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user