fix: align secretref web-fetch matrix

This commit is contained in:
Shakker
2026-04-02 12:44:51 +01:00
committed by Shakker
parent 5639e8d242
commit 71d49012fc
2 changed files with 26 additions and 12 deletions

View File

@@ -23,18 +23,29 @@ export type SecretRefCredentialMatrixDocument = {
export function buildSecretRefCredentialMatrix(): SecretRefCredentialMatrixDocument {
const entries: CredentialMatrixEntry[] = listSecretTargetRegistryEntries()
.map((entry) => ({
id: entry.id,
configFile: entry.configFile,
path: entry.pathPattern,
...(entry.refPathPattern ? { refPath: entry.refPathPattern } : {}),
...(entry.authProfileType ? { when: { type: entry.authProfileType } } : {}),
secretShape: entry.secretShape,
optIn: true as const,
...(entry.id.startsWith("channels.googlechat.")
? { notes: "Google Chat compatibility exception: sibling ref field remains canonical." }
: {}),
}))
.map((entry) => {
const isCanonicalFirecrawlWebFetchEntry =
entry.id === "plugins.entries.firecrawl.config.webFetch.apiKey";
const canonicalId = isCanonicalFirecrawlWebFetchEntry
? "tools.web.fetch.firecrawl.apiKey"
: entry.id;
const canonicalPath = isCanonicalFirecrawlWebFetchEntry
? "tools.web.fetch.firecrawl.apiKey"
: entry.pathPattern;
return {
id: canonicalId,
configFile: entry.configFile,
path: canonicalPath,
...(entry.refPathPattern ? { refPath: entry.refPathPattern } : {}),
...(entry.authProfileType ? { when: { type: entry.authProfileType } } : {}),
secretShape: entry.secretShape,
optIn: true as const,
...(entry.id.startsWith("channels.googlechat.")
? { notes: "Google Chat compatibility exception: sibling ref field remains canonical." }
: {}),
};
})
.toSorted((a, b) => a.id.localeCompare(b.id));
return {

View File

@@ -99,6 +99,9 @@ describe("exec SecretRef id parity", () => {
if (id.startsWith("tools.web.fetch.")) {
return "tools.web.fetch";
}
if (id.startsWith("plugins.entries.") && id.includes(".config.webFetch.apiKey")) {
return "tools.web.fetch";
}
if (id.startsWith("tools.web.x_search.")) {
return "tools.web.x_search";
}