mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-11 13:24:55 +01:00
PAP-10287 tighten teams catalog review fixes
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
7812174f0e
commit
83278f0760
4 files changed
+41
-6
No files matched your search
@@ -291,6 +291,22 @@ describe("teamsCatalogService", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("omits the default-adapter warning when every agent has an explicit override", async () => {
|
||||
const svc = teamsCatalogService({} as any);
|
||||
|
||||
const result = await svc.installCatalogTeam("company-1", "core-exec-team", {
|
||||
adapterOverrides: {
|
||||
ceo: { adapterType: "opencode_local" },
|
||||
cto: { adapterType: "opencode_local" },
|
||||
qa: { adapterType: "opencode_local" },
|
||||
},
|
||||
});
|
||||
|
||||
expect(result.warnings).not.toEqual(
|
||||
expect.arrayContaining([expect.stringContaining("default to claude_local")]),
|
||||
);
|
||||
});
|
||||
|
||||
it("passes install secretValues through to company portability import", async () => {
|
||||
const svc = teamsCatalogService({} as any);
|
||||
|
||||
|
||||
@@ -1010,10 +1010,17 @@ export function teamsCatalogService(db: Db) {
|
||||
if (importPreview.errors.length > 0) {
|
||||
throw unprocessable(`Catalog team import preview has errors: ${importPreview.errors.join("; ")}`);
|
||||
}
|
||||
const defaultedAdapterSlugs = prepared.team.agentSlugs.filter(
|
||||
(slug) => !options.adapterOverrides?.[slug],
|
||||
);
|
||||
const warnings = [
|
||||
...prepared.warnings,
|
||||
...importPreview.warnings,
|
||||
`Catalog agents without explicit overrides default to ${DEFAULT_SAFE_CATALOG_ADAPTER_TYPE}. Pass adapterOverrides to use a different supported adapter.`,
|
||||
...(defaultedAdapterSlugs.length > 0
|
||||
? [
|
||||
`Catalog agents without explicit overrides (${defaultedAdapterSlugs.join(", ")}) default to ${DEFAULT_SAFE_CATALOG_ADAPTER_TYPE}. Pass adapterOverrides to use a different supported adapter.`,
|
||||
]
|
||||
: []),
|
||||
...await prepareSkillInstalls(companyId, prepared),
|
||||
];
|
||||
const result = await portability.importBundle(
|
||||
|
||||
Reference in new issue
Block a user