Skip to content

refactor: add self-update preset skills#165

Merged
crimx merged 1 commit into
mainfrom
preset-skills
May 8, 2026
Merged

refactor: add self-update preset skills#165
crimx merged 1 commit into
mainfrom
preset-skills

Conversation

@crimx
Copy link
Copy Markdown
Contributor

@crimx crimx commented May 8, 2026


View in Codesmith
Need help on this PR? Tag @codesmith with what you need.

  • Let Codesmith autofix CI failures and bot reviews

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 8, 2026

Review Change Stack
No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 16ab9a6d-d2a8-44ed-a5da-5a863045f676

📥 Commits

Reviewing files that changed from the base of the PR and between cbc576b and 17fddef.

📒 Files selected for processing (10)
  • docs/commands.md
  • docs/commands.zh-CN.md
  • src/application/commands/self-update.cli.test.ts
  • src/application/commands/skills/index.test.ts
  • src/application/commands/skills/install.ts
  • src/application/commands/skills/registry-skill-install.ts
  • src/application/commands/update.ts
  • src/application/self-update/bundled-skills.ts
  • src/application/self-update/core.test.ts
  • src/application/self-update/core.ts
✅ Files skipped from review due to trivial changes (2)
  • docs/commands.zh-CN.md
  • docs/commands.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/application/commands/update.ts

Summary by CodeRabbit

  • Documentation

    • Updated English and Chinese command docs to describe automatic post-install/update skill synchronization and expanded docs for installing all bundled/preset registry skill packages when no package name is given.
  • New Features

    • CLI now refreshes bundled skills and best-effort installs preset registry skill packages after successful install/update and when running install without a package name; preset failures are ignored and successful preset skills are included in summaries.
  • Tests

    • Added/standardized tests to verify preset-package installs appear in success output and to centralize managed-skill-install assertions.

Walkthrough

The PR makes the post-install/post-update self-update flow invoke the managed executable's "skills add" and extends skills installation to best-effort install preset registry packages when no packageName is given. It updates installRegistrySkills to return ManagedSkillInstallSummary[] and accept recordTelemetry/writeOutput flags (gating telemetry and user-facing output), adds presetSkillPackageNames and installPresetSkillPackages, replaces the previous bundled-refresh export with attemptManagedSkillInstall, updates callsites (self-update core and update), updates tests to expect the managed-skill invocation, and updates English/Chinese docs.

Sequence Diagram(s)

sequenceDiagram
  participant CLI
  participant SelfUpdate
  participant ManagedExe
  participant Registry
  CLI->>SelfUpdate: performSelfUpdateOperation()
  SelfUpdate->>ManagedExe: resolveManagedSkillInstallCommandPath(...)
  SelfUpdate->>ManagedExe: run ["skills","add"] (attemptManagedSkillInstall)
  ManagedExe->>Registry: fetch preset package metadata (if any)
  Registry-->>ManagedExe: package tarball / skill info
  ManagedExe-->>SelfUpdate: ManagedSkillInstallSummary[]
  SelfUpdate-->>CLI: completion message (includes preset-installed skill names)
Loading

Possibly related PRs

  • oomol-lab/oo-cli#46: Modifies the skills install implementation and tests; related to CLI "skills add"/aliases and install behavior.
  • oomol-lab/oo-cli#41: Adds/changes registry-based package install logic that this PR extends and integrates with self-update.
  • oomol-lab/oo-cli#132: Changes self-update bundled-skills/update flow similar to this PR's managed install invocation and callsite updates.
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title follows the required format and clearly describes the main change: refactoring to add preset skills functionality during self-update operations.
Description check ✅ Passed The description is minimal but related to the changeset, containing only a codesmith footer and checklist item rather than meaningful PR content.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch preset-skills

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/application/commands/self-update.cli.test.ts`:
- Around line 1047-1068: Extract the createExpectedManagedSkillInstallCommands
helper into the shared test helpers module (__tests__/helpers.ts), modify it to
accept the full preset list (or import presetSkillPackageNames) and generate the
second expected command by iterating over the full presetSkillPackageNames array
(not using presetSkillPackageNames[0]) to produce entries for each preset
package, and update both test files to import and call this shared helper so the
expected commands are generated dynamically from the current presets.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8b9bfb92-c511-4e82-8f28-1534a91e9515

📥 Commits

Reviewing files that changed from the base of the PR and between d3cdb15 and cbc576b.

📒 Files selected for processing (7)
  • docs/commands.md
  • docs/commands.zh-CN.md
  • src/application/commands/self-update.cli.test.ts
  • src/application/commands/update.ts
  • src/application/self-update/bundled-skills.ts
  • src/application/self-update/core.test.ts
  • src/application/self-update/core.ts

Comment thread src/application/commands/self-update.cli.test.ts
@crimx crimx force-pushed the preset-skills branch from cbc576b to 17fddef Compare May 8, 2026 11:16
@crimx crimx merged commit bf29c26 into main May 8, 2026
6 checks passed
@crimx crimx deleted the preset-skills branch May 8, 2026 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant