mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-29 23:56:43 +01:00
Gate agent plugin tabs by execution environment (#20657)
This commit is contained in:
1 parent
e9343d8501
commit
0d4b1d8c89
17 files changed
+275
-18
No files matched your search
@@ -541,3 +541,14 @@ describe("plugin task side-panel declarations", () => {
|
||||
expect(pluginManifestV1Schema.safeParse({ ...manifest, apiRoutes }).success).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
describe("agent environment slot requirements", () => {
|
||||
const slot = { type: "detailTab", id: "view", displayName: "View", exportName: "View", entityTypes: ["agent"], agentEnvironmentDriver: "tasks" };
|
||||
it("preserves the optional driver requirement", () => {
|
||||
expect(pluginUiSlotDeclarationSchema.parse(slot).agentEnvironmentDriver).toBe("tasks");
|
||||
});
|
||||
it.each([{ agentEnvironmentDriver: "" }, { entityTypes: ["issue"] }, { entityTypes: ["agent", "issue"] }, { type: "page" }])("rejects unsupported requirements %j", patch => {
|
||||
expect(pluginUiSlotDeclarationSchema.safeParse({ ...slot, ...patch }).success).toBe(false);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user