import type { SkillDiscoveryResult, SkillDiscoveryTarget } from '../../shared/skills' import type { SkillCloudOperation, SkillCloudOwnedShare, SkillCloudPackageDetails } from '../../shared/skill-cloud-contract' import type { ManagedSkillInstallListOperation, SkillBundleInstallPreviewInput, SkillBundleInstallPreviewOperation, SkillBundlePackageVersionInstallInput, SkillBundleShareInstallInput, SkillBundleShareInstallOperation, SkillInstallCancelInput, SkillInstallPreviewInput, SkillInstallPreviewOperation, SkillInstallProgress, SkillPackageVersionInstallInput, SkillRemoveInput, SkillRemoveOperation, SkillShareInstallInput, SkillShareInstallOperation, SkillSharePreview, SkillShareProgress, SkillSharePublishInput, SkillSharePublishOperation, SkillShareResolvedOperation } from '../../shared/skill-sharing-contract' import type { BundledSkillAutoUpdateRequest, LocalBundledSkillExecuteRequest, BundledSkillInstallResult, BundledSkillPlan, LocalBundledSkillPlanRequest } from '../../shared/bundled-skill-plan' import type { SkillDeletePlan, SkillDeleteRequest, SkillDeleteResult } from '../../shared/skill-delete-contract' export type SkillsApi = { discover: (target?: SkillDiscoveryTarget) => Promise /** This machine's plan for Orca's installed skills; paired hosts plan over RPC. */ bundledPlan: (request?: LocalBundledSkillPlanRequest) => Promise bundledExecute: (request: LocalBundledSkillExecuteRequest) => Promise bundledAutoUpdate: (request: BundledSkillAutoUpdateRequest) => Promise prepareShare: (input: { skillIds: string[] skillDirectories?: string[] bundleName: string target?: SkillDiscoveryTarget packageId?: string }) => Promise publishShare: (input: SkillSharePublishInput) => Promise cancelShare: (preparationId: string) => Promise releaseShare: (preparationId: string) => Promise resolveShare: (shareId: string) => Promise installShare: (input: SkillShareInstallInput) => Promise installBundleShare: ( input: SkillBundleShareInstallInput ) => Promise installBundlePackageVersion: ( input: SkillBundlePackageVersionInstallInput ) => Promise installPackageVersion: ( input: SkillPackageVersionInstallInput ) => Promise cancelInstall: (input: SkillInstallCancelInput) => Promise<{ cancelled: boolean }> previewInstall: (input: SkillInstallPreviewInput) => Promise previewBundleInstall: ( input: SkillBundleInstallPreviewInput ) => Promise removeInstall: (input: SkillRemoveInput) => Promise /** Always true on desktop; web clients may use a server predating skill deletion. */ deleteSupported: () => Promise previewDelete: (request: SkillDeleteRequest) => Promise delete: (request: SkillDeleteRequest) => Promise listManagedInstalls: (environmentId?: string) => Promise getPackage: (packageId: string) => Promise> listOwnedShares: () => Promise> revokeShare: (shareId: string) => Promise> deletePackage: (packageId: string) => Promise> listWslDistros: (environmentId?: string) => Promise onInstallProgress: (callback: (progress: SkillInstallProgress) => void) => () => void onShareProgress: (callback: (progress: SkillShareProgress) => void) => () => void }