mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-03 17:51:58 +01:00
fix(workspaces): inspect storage only when needed (#18410)
This commit is contained in:
1 parent
9a3f395737
commit
6484f96c28
14 files changed
+305
-165
No files matched your search
@@ -33,6 +33,17 @@ describe("plugin capability constants", () => {
|
||||
});
|
||||
|
||||
describe("plugin manifest validators", () => {
|
||||
it("preserves explicit workspace ancestry support without changing legacy declarations", () => {
|
||||
const manifest = { id: "example.storage", apiVersion: 1, version: "1.0.0", displayName: "Storage", description: "Storage", author: "Tests",
|
||||
categories: ["workspace"], capabilities: ["workspaces.manage", "events.subscribe"], resourceLifecycle: ["project"],
|
||||
entrypoints: { worker: "worker.js" }, workspaceProvider: { modes: ["isolated_workspace"], strategies: ["git_worktree"] } };
|
||||
expect(pluginManifestV1Schema.parse(manifest).workspaceProvider?.supportsMergeAncestry).toBeUndefined();
|
||||
for (const supportsMergeAncestry of [true, false]) {
|
||||
expect(pluginManifestV1Schema.parse({ ...manifest, workspaceProvider: { ...manifest.workspaceProvider, supportsMergeAncestry } })
|
||||
.workspaceProvider?.supportsMergeAncestry).toBe(supportsMergeAncestry);
|
||||
}
|
||||
expect(pluginManifestV1Schema.safeParse({ ...manifest, workspaceProvider: { ...manifest.workspaceProvider, supportsMergeAncestry: "false" } }).success).toBe(false);
|
||||
});
|
||||
it("limits environment skills to unique declarations owned by the plugin", () => {
|
||||
const manifest = { ...buildSandboxProviderManifest({ skillKeys: ["desktop"] }),
|
||||
capabilities: ["environment.drivers.register", "skills.managed"],
|
||||
|
||||
Reference in new issue
Block a user