diff --git a/src/renderer/src/components/onboarding/onboarding-feature-setup.test.ts b/src/renderer/src/components/onboarding/onboarding-feature-setup.test.ts index d804ada8d74..27250fcc26a 100644 --- a/src/renderer/src/components/onboarding/onboarding-feature-setup.test.ts +++ b/src/renderer/src/components/onboarding/onboarding-feature-setup.test.ts @@ -119,7 +119,7 @@ describe('onboarding feature setup runner', () => { expect(text).toBe(ALL_SKILL_INSTALL_COMMAND) expect(text).toBe( - 'npx skills add https://github.com/stablyai/orca --skill orca-cli computer-use orchestration orca-linear --global -y' + 'npx --yes skills add https://github.com/stablyai/orca --skill orca-cli computer-use orchestration orca-linear --global -y' ) }) diff --git a/src/renderer/src/components/settings/CliSkillRuntimeSetup.test.tsx b/src/renderer/src/components/settings/CliSkillRuntimeSetup.test.tsx index b2d9203c8b4..a4d57e4174b 100644 --- a/src/renderer/src/components/settings/CliSkillRuntimeSetup.test.tsx +++ b/src/renderer/src/components/settings/CliSkillRuntimeSetup.test.tsx @@ -118,7 +118,7 @@ describe('CliSkillRuntimeSetup runtime helpers', () => { ) // Expectations are pinned rather than rebuilt from the builder: this is the only - // coverage that the non-interactive `-y` reaches the Windows rewrite. + // coverage that both non-interactive flags reach the Windows rewrite. it('reinstalls Windows-host skill updates through the add path', () => { expect( buildSkillCommandForRuntime( @@ -129,13 +129,15 @@ describe('CliSkillRuntimeSetup runtime helpers', () => { }, 'win32' ) - ).toBe('npx skills add https://github.com/stablyai/orca --skill orchestration --global -y') + ).toBe( + 'npx --yes skills add https://github.com/stablyai/orca --skill orchestration --global -y' + ) }) it('treats missing runtime as a Windows host fallback for skill updates', () => { expect( buildSkillCommandForRuntime('npx skills update orca-cli --global', undefined, 'win32') - ).toBe('npx skills add https://github.com/stablyai/orca --skill orca-cli --global -y') + ).toBe('npx --yes skills add https://github.com/stablyai/orca --skill orca-cli --global -y') }) it('keeps non-Windows host skill updates on the update path', () => { diff --git a/src/renderer/src/components/settings/OrchestrationPane.test.tsx b/src/renderer/src/components/settings/OrchestrationPane.test.tsx index 08aea8a3b8d..f0c956e23fd 100644 --- a/src/renderer/src/components/settings/OrchestrationPane.test.tsx +++ b/src/renderer/src/components/settings/OrchestrationPane.test.tsx @@ -8,7 +8,7 @@ import { getOrchestrationUsageExamples } from '@/lib/orchestration-usage-example import { OrchestrationPane } from './OrchestrationPane' const INSTALL_COMMAND = - 'npx skills add https://github.com/stablyai/orca --skill orchestration --global -y' + 'npx --yes skills add https://github.com/stablyai/orca --skill orchestration --global -y' const UPDATE_COMMAND = INSTALL_COMMAND const mocks = vi.hoisted(() => ({ diff --git a/src/renderer/src/components/settings/linear-agent-skill-install-cta.test.tsx b/src/renderer/src/components/settings/linear-agent-skill-install-cta.test.tsx index b82d1b12419..755e81582f4 100644 --- a/src/renderer/src/components/settings/linear-agent-skill-install-cta.test.tsx +++ b/src/renderer/src/components/settings/linear-agent-skill-install-cta.test.tsx @@ -115,7 +115,7 @@ describe('LinearAgentSkillInstallCta', () => { expect(rendered.textContent).toContain('Not installed') expect(rendered.textContent).toContain('Let your agents read and edit Linear tasks.') expect(rendered.textContent).toContain( - 'npx skills add https://github.com/stablyai/orca --skill orca-linear --global -y' + 'npx --yes skills add https://github.com/stablyai/orca --skill orca-linear --global -y' ) }) @@ -129,7 +129,7 @@ describe('LinearAgentSkillInstallCta', () => { }) expect(mocks.clipboardWrite).toHaveBeenCalledWith( - 'npx skills add https://github.com/stablyai/orca --skill orca-linear --global -y' + 'npx --yes skills add https://github.com/stablyai/orca --skill orca-linear --global -y' ) expect(mocks.toastSuccess).toHaveBeenCalled() }) diff --git a/src/renderer/src/components/sidebar/LinearAgentSkillSetupPrompt.test.tsx b/src/renderer/src/components/sidebar/LinearAgentSkillSetupPrompt.test.tsx index 0d784cb1033..078a114a98c 100644 --- a/src/renderer/src/components/sidebar/LinearAgentSkillSetupPrompt.test.tsx +++ b/src/renderer/src/components/sidebar/LinearAgentSkillSetupPrompt.test.tsx @@ -344,7 +344,7 @@ describe('LinearAgentSkillSetupPrompt', () => { setupButton?.dispatchEvent(new MouseEvent('click', { bubbles: true })) }) - expect(document.body.textContent).toContain("wsl.exe -d 'Fedora' -- bash -lc 'npx skills add") + expect(document.body.textContent).toContain("bash -lc 'npx --yes skills add") expect(mocks.panelProps.at(-1)).toEqual( expect.objectContaining({ installedCommand: diff --git a/src/renderer/src/components/skills/SkillFreshnessUpdateDialog.test.tsx b/src/renderer/src/components/skills/SkillFreshnessUpdateDialog.test.tsx index 69dbc2ea959..abc66a56571 100644 --- a/src/renderer/src/components/skills/SkillFreshnessUpdateDialog.test.tsx +++ b/src/renderer/src/components/skills/SkillFreshnessUpdateDialog.test.tsx @@ -438,7 +438,7 @@ describe('SkillFreshnessUpdateDialog', () => { await openViaRequest() expect(container?.textContent).toContain( - 'npx skills add https://github.com/stablyai/orca --skill orchestration --global -y' + 'npx --yes skills add https://github.com/stablyai/orca --skill orchestration --global -y' ) }) diff --git a/src/renderer/src/components/skills/skill-freshness-skipped-reason.test.ts b/src/renderer/src/components/skills/skill-freshness-skipped-reason.test.ts index 31cd00db517..37f8fee569d 100644 --- a/src/renderer/src/components/skills/skill-freshness-skipped-reason.test.ts +++ b/src/renderer/src/components/skills/skill-freshness-skipped-reason.test.ts @@ -32,7 +32,7 @@ describe('skippedReason', () => { const reason = skippedReason([row(null)], 'orchestration') expect(reason).toContain('reports the skill as already up to date') expect(reason).toContain( - 'npx skills add https://github.com/stablyai/orca --skill orchestration --global -y' + 'npx --yes skills add https://github.com/stablyai/orca --skill orchestration --global -y' ) }) diff --git a/src/shared/agent-feature-install-commands.test.ts b/src/shared/agent-feature-install-commands.test.ts index 792533d13b8..233afa1bee3 100644 --- a/src/shared/agent-feature-install-commands.test.ts +++ b/src/shared/agent-feature-install-commands.test.ts @@ -36,21 +36,21 @@ describe('agent feature skill commands', () => { expect(ORCA_LINEAR_SKILL_UPDATE_COMMAND).toBe('npx skills update orca-linear --global') expect(LINEAR_TICKETS_SKILL_UPDATE_COMMAND).toBe('npx skills update linear-tickets --global') expect(ORCA_CLI_ORCHESTRATION_SKILL_INSTALL_COMMAND).toBe( - 'npx skills add https://github.com/stablyai/orca --skill orca-cli orchestration --global -y' + 'npx --yes skills add https://github.com/stablyai/orca --skill orca-cli orchestration --global -y' ) }) it('builds install commands non-interactively so a pasted command never stops on a prompt', () => { - // Why: with more than one agent installed the CLI prompts for a target and the - // pasted command hangs, so `-y` is the fix and must not silently regress. + // Why: a pasted command hangs on npm's install-this-package prompt and on the + // CLI's agent selection, so both `npx --yes` and `-y` must not silently regress. expect(buildAgentFeatureSkillInstallCommand(['orca-cli'])).toBe( - 'npx skills add https://github.com/stablyai/orca --skill orca-cli --global -y' + 'npx --yes skills add https://github.com/stablyai/orca --skill orca-cli --global -y' ) expect(buildAgentFeatureSkillInstallCommand(['orca-cli', 'orchestration'])).toBe( - 'npx skills add https://github.com/stablyai/orca --skill orca-cli orchestration --global -y' + 'npx --yes skills add https://github.com/stablyai/orca --skill orca-cli orchestration --global -y' ) expect(ORCA_CLI_SKILL_INSTALL_COMMAND).toBe( - 'npx skills add https://github.com/stablyai/orca --skill orca-cli --global -y' + 'npx --yes skills add https://github.com/stablyai/orca --skill orca-cli --global -y' ) }) diff --git a/src/shared/agent-feature-install-commands.ts b/src/shared/agent-feature-install-commands.ts index c038b6be115..0fbc75e0983 100644 --- a/src/shared/agent-feature-install-commands.ts +++ b/src/shared/agent-feature-install-commands.ts @@ -12,10 +12,11 @@ export function buildAgentFeatureSkillInstallCommand(skillNames: readonly string if (skillNames.length === 0) { throw new Error('At least one skill name is required.') } - // Why: `-y` because this command is pasted into a live terminal — with more than one - // agent installed the CLI stops on an agent-selection prompt the user cannot see coming, - // and closing the panel tears the session down mid-prompt. - return `npx skills add ${ORCA_SKILLS_REPOSITORY_URL} --skill ${skillNames.join(' ')} --global -y` + // Why: pasted into a live terminal, so any prompt strands the user and closing the panel + // kills the session mid-prompt. Both flags are load-bearing, as in the headless updater: + // `npx --yes` skips npm's install-this-package prompt (npx re-resolves `latest` every + // run, so a cold or stale cache prompts); `skills … -y` skips agent selection. + return `npx --yes skills add ${ORCA_SKILLS_REPOSITORY_URL} --skill ${skillNames.join(' ')} --global -y` } export function buildAgentFeatureSkillUpdateCommand(skillName: string): string {