fix(core): accept deprecated reference config key (#31659)

This commit is contained in:
Luke Parker 2026-06-10 20:32:35 +10:00 committed by GitHub
commit 90fb32be30
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 69 additions and 2 deletions

View file

@ -45,6 +45,9 @@ export const Info = Schema.Struct({
references: Schema.optional(ConfigReference.Info).annotate({
description: "Named git or local directory references",
}),
reference: Schema.optional(ConfigReference.Info).annotate({
description: "@deprecated Use 'references' field instead. Named git or local directory references",
}),
watcher: Schema.optional(Schema.Struct({ ignore: Schema.optional(Schema.mutable(Schema.Array(Schema.String))) })),
snapshot: Schema.optional(Schema.Boolean).annotate({
description:

View file

@ -12,6 +12,7 @@ const keys = new Set([
"logLevel",
"server",
"command",
"reference",
"snapshot",
"plugin",
"autoshare",
@ -62,7 +63,7 @@ export function migrate(info: typeof ConfigV1.Info.Type) {
skills: info.skills && [...(info.skills.paths ?? []), ...(info.skills.urls ?? [])],
commands: info.command,
instructions: info.instructions,
references: info.references,
references: info.references ?? info.reference,
plugins: info.plugin?.map((plugin) =>
typeof plugin === "string" ? plugin : { package: plugin[0], options: plugin[1] },
),