feat: initial commit - Jhonny Editor
- Adicionado estrutura completa do projeto - Configurado MCP server para Premiere Pro - Adicionado documentação e skills - Configurado Gitignore para o projeto
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import {
|
||||
buildToolPackReport,
|
||||
isToolInSelectedPacks,
|
||||
resolveToolPacks,
|
||||
} from "../../src/workflows/tool-packs.js";
|
||||
|
||||
describe("workflow tool packs", () => {
|
||||
it("keeps the backwards-compatible full catalog when unconfigured", () => {
|
||||
expect(resolveToolPacks(undefined, "default")).toEqual({
|
||||
source: "default",
|
||||
selected: [],
|
||||
fullCatalog: true,
|
||||
});
|
||||
});
|
||||
|
||||
it("unions explicit packs without granting tools outside them", () => {
|
||||
const selection = resolveToolPacks("essential, delivery, essential", "explicit");
|
||||
expect(selection).toMatchObject({
|
||||
source: "explicit",
|
||||
selected: ["essential", "delivery"],
|
||||
fullCatalog: false,
|
||||
});
|
||||
expect(isToolInSelectedPacks("get_project_info", selection)).toBe(true);
|
||||
expect(isToolInSelectedPacks("export_aaf", selection)).toBe(true);
|
||||
expect(isToolInSelectedPacks("create_bin", selection)).toBe(false);
|
||||
|
||||
const report = buildToolPackReport(selection);
|
||||
expect(report.selected).toEqual(["essential", "delivery"]);
|
||||
expect(report.note).toContain("do not grant capabilities");
|
||||
});
|
||||
|
||||
it("rejects ambiguous or unknown configuration", () => {
|
||||
expect(() => resolveToolPacks("full,inspection", "explicit")).toThrow(/cannot combine/i);
|
||||
expect(() => resolveToolPacks("unknown", "explicit")).toThrow(/Unknown Premiere MCP tool pack/i);
|
||||
expect(() => resolveToolPacks(",", "explicit")).toThrow(/must select full or at least one pack/i);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user