diff --git a/changelog.d/maintenance/15945-skills-sync-regen.md b/changelog.d/maintenance/15945-skills-sync-regen.md new file mode 100644 index 000000000000..91e3798cac57 --- /dev/null +++ b/changelog.d/maintenance/15945-skills-sync-regen.md @@ -0,0 +1,2 @@ +- **fix(skills):** generate a concrete archive filename for the current `sync pull [outPath]` download contract and keep the example free of unsupported source/merge/replace/dry-run flags (#15945). Regression coverage compares both generated and published examples with the real CLI registry. Thanks @BenjaminAronsson for the generator-drift diagnosis and original repair. +- **maintenance(skills):** synchronize the generated provider and inference references with the current OpenAPI descriptions. Environment-independent generation remains a separate fix in #15948. diff --git a/skills/cli-backup-sync/SKILL.md b/skills/cli-backup-sync/SKILL.md index e900a810049a..aef7f4e30ce5 100644 --- a/skills/cli-backup-sync/SKILL.md +++ b/skills/cli-backup-sync/SKILL.md @@ -234,7 +234,7 @@ omniroute sync push **Example:** ```bash -omniroute sync pull [outPath] +omniroute sync pull omniroute-export.tar.gz ``` ### `sync bundle ` diff --git a/src/lib/agentSkills/generator.ts b/src/lib/agentSkills/generator.ts index e16130b69d4b..b7d84d7953a0 100644 --- a/src/lib/agentSkills/generator.ts +++ b/src/lib/agentSkills/generator.ts @@ -32,8 +32,9 @@ const GENERATED_COMMENT = const CUSTOM_START_MARKER = ""; const CUSTOM_END_MARKER = ""; -// Runnable examples for commands whose syntax alone would omit safety-critical flags. +// Runnable examples for commands that need concrete arguments or safety-critical flags. const CLI_PREVIEW_EXAMPLES: Record = { + "sync pull [outPath]": "sync pull omniroute-export.tar.gz", "models test-add ": "models test-add example-model --provider example-provider --connection example-connection --dry-run", }; diff --git a/tests/unit/agentSkills-sync-pull-example.test.ts b/tests/unit/agentSkills-sync-pull-example.test.ts new file mode 100644 index 000000000000..e0bc27d5f6eb --- /dev/null +++ b/tests/unit/agentSkills-sync-pull-example.test.ts @@ -0,0 +1,24 @@ +import assert from "node:assert/strict"; +import fs from "node:fs"; +import test from "node:test"; +import { buildSkillMarkdown } from "../../src/lib/agentSkills/generator.ts"; +import { parseCliRegistry } from "../../src/lib/agentSkills/cliRegistryParser.ts"; + +test("sync pull skill uses a concrete archive path and no removed flags", () => { + const sources = { + openapi: { paths: new Map(), areas: new Map() }, + cliRegistry: parseCliRegistry(), + }; + const { body } = buildSkillMarkdown("cli-backup-sync", sources); + const published = fs.readFileSync( + new URL("../../skills/cli-backup-sync/SKILL.md", import.meta.url), + "utf8" + ); + for (const markdown of [body, published]) { + const section = markdown.split("### `sync pull [outPath]`\n")[1]?.split("\n### ")[0]; + assert.ok(section, "the optional output-path signature must match the real CLI registry"); + assert.match(section, /```bash\nomniroute sync pull omniroute-export\.tar\.gz\n```/); + assert.doesNotMatch(section, /--(?:source|merge|replace|dry-run)\b/); + assert.doesNotMatch(section, /```bash\nomniroute sync pull \[outPath\]/); + } +});