mirror of
https://github.com/stablyai/orca.git
synced 2026-09-23 00:02:29 +00:00
* Add skill deletion with cross-platform transaction safety Implements end-to-end skill removal with placement enumeration, dependency guards, and transactional recovery. Covers native, WSL, and remote hosts; users can delete canonical directories and alias placements (symlinked directories or files) in a single atomic batch. Includes UI selection flow, preview, confirmation, and results band. Block reasons (bundled, plugin, unowned, stale) gate deletions that would fail or contradict user intent. * Organize IPC handlers into module subdirectories Move register-core-handlers and skill-delete-ipc-handlers into dedicated subdirectories for improved code organization and to reduce the flat structure in src/main/ipc/. * Make skill deletion recovery transactions idempotent Defer journal cleanup until both staging removal and receipt cleanup succeed, leaving the journal in place for startup to retry if either operation fails. This ensures the recovery process is safe to run multiple times without leaving partially-deleted skills. * Consolidate skill-delete files into dedicated module Reorganize skill deletion functionality into a modular structure under `src/main/skills/skill-delete/` with simplified file names. Remove the redundant `skill-delete-` prefix from file names since they now live in the dedicated directory. Update all import paths throughout the codebase to reflect the new structure, including imports from IPC handlers and RPC methods. * Fix broken import paths and add deletion robustness improvements Import paths using `..//'` were invalid and broken. Replace with explicit module names (`skill-discovery-sources`, `skill-install-filesystem`, etc.) to clarify dependencies. - Bind WSL filesystem methods to preserve `this` context - Keep recovery journal when rollback rename fails, so startup can retry - Skip symlink-based tests on Windows where they cannot run - Only treat ENOENT/ENOTDIR as empty directories; propagate other errors - Fix cross-platform path parent calculation to handle drive roots - Replace shared constant with localized string for user-facing message - Use `runProcess` for WSL integration test instead of bare `execFile` * Add batch limit for skill deletion and improve host availability checkin - Limit concurrent deletions to prevent remote host overload - Add retry logic for capability probing to handle transient unavailability - Add reprobe() method to recheck capability after errors or user refresh - Fix status logic: receipt cleanup is best-effort, completion depends only on content removal - Improve error message for unreachable hosts
23 lines
1.4 KiB
TypeScript
23 lines
1.4 KiB
TypeScript
export const SKILL_INSTALL_CAPABILITY = 'skills.install.v1' as const
|
|
export const SKILL_INSTALL_RESULT_V2_CAPABILITY = 'skills.install-result.v2' as const
|
|
export const SKILL_INSTALL_CANCEL_CAPABILITY = 'skills.install-cancel.v1' as const
|
|
export const SKILL_UPLOAD_CAPABILITY = 'skills.upload.v1' as const
|
|
export const SKILL_MANAGEMENT_CAPABILITY = 'skills.manage.v1' as const
|
|
export const SKILL_BUNDLE_INSTALL_CAPABILITY = 'skills.install.bundle.v1' as const
|
|
export const SKILL_BUNDLE_PREVIEW_CAPABILITY = 'skills.preview.bundle.v1' as const
|
|
export const SKILL_INSTALL_PROGRESS_CAPABILITY = 'skills.install-progress.v1' as const
|
|
/** Why: the install request schema is strict, so a host that predates the agent
|
|
* picker rejects the whole request rather than ignoring the new field. */
|
|
export const SKILL_INSTALL_PROVIDERS_CAPABILITY = 'skills.install-providers.v1' as const
|
|
|
|
export const SKILL_INSTALL_UPDATE_REQUIRED_MESSAGE =
|
|
'Update Orca on the selected machine to install shared skills.'
|
|
|
|
/** Why capability-gated rather than Rule 1: `skills.delete` is a new RPC method,
|
|
* and an old host answers method-not-found, which surfaces as an unexplained
|
|
* failure instead of a disabled action with a reason. */
|
|
export const SKILL_DELETE_CAPABILITY = 'skills.delete.v1' as const
|
|
|
|
export const SKILL_DELETE_UPDATE_REQUIRED_MESSAGE =
|
|
'Update Orca on the selected machine to delete skills.'
|