fix(skills): pass -y to skill install command so it can't hang on agent prompt

Orca spawns the skill install command (`npx skills add ... --global`) in a
non-driven ephemeral setup terminal. The skills CLI runs an interactive
"Which agents do you want to install to?" prompt (@clack/prompts) whenever
stdin is a TTY, which the PTY is. With no `-y` flag the prompt blocks
forever, Orca kills the terminal after ~50s (exit 1), and the install
silently fails — Settings shows "install complete" but Re-check keeps
reporting "Not installed" and agent coverage stays "missing". Repros
reliably on a WSL2 work area with agents installed inside the distro (#9567).

Verified against skills CLI dist: with `-y`/`options.yes` the add command
takes the non-interactive path `targetAgents = ensureUniversalAgents(installedAgents)`
(all detected agents) instead of prompting, matching the CLI's own tip
("use the --yes (-y) and --global (-g) flags to install without prompts").

Scope kept to the install command; update commands run in user-facing
terminals where the upstream-deletion prompt is an intentional choice.
This commit is contained in:
OrcaWin
2026-07-20 12:12:05 -07:00
parent aca7d50bab
commit 0ec147c818
5 changed files with 10 additions and 6 deletions
@@ -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'
'npx skills add https://github.com/stablyai/orca --skill orca-cli computer-use orchestration orca-linear --global -y'
)
})
@@ -7,7 +7,8 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
import { AgentSkillSetupPanel } from './AgentSkillSetupPanel'
import { TooltipProvider } from '../ui/tooltip'
const INSTALL_COMMAND = 'npx skills add https://github.com/stablyai/orca --skill orca-cli --global'
const INSTALL_COMMAND =
'npx skills add https://github.com/stablyai/orca --skill orca-cli --global -y'
const UPDATE_COMMAND = 'npx skills update orca-cli --global'
const mocks = vi.hoisted(() => ({
@@ -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'
'npx skills add https://github.com/stablyai/orca --skill orchestration --global -y'
const UPDATE_COMMAND = INSTALL_COMMAND
const mocks = vi.hoisted(() => ({
@@ -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'
'npx 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'
'npx skills add https://github.com/stablyai/orca --skill orca-linear --global -y'
)
expect(mocks.toastSuccess).toHaveBeenCalled()
})
+4 -1
View File
@@ -12,7 +12,10 @@ export function buildAgentFeatureSkillInstallCommand(skillNames: readonly string
if (skillNames.length === 0) {
throw new Error('At least one skill name is required.')
}
return `npx skills add ${ORCA_SKILLS_REPOSITORY_URL} --skill ${skillNames.join(' ')} --global`
// Why: Orca spawns this in a non-driven PTY (ephemeral setup terminal). Without -y the
// skills CLI's interactive "Which agents?" prompt blocks until Orca kills it (~50s, exit 1),
// so the install silently fails (#9567). -y installs to all detected agents non-interactively.
return `npx skills add ${ORCA_SKILLS_REPOSITORY_URL} --skill ${skillNames.join(' ')} --global -y`
}
export function buildAgentFeatureSkillUpdateCommand(skillName: string): string {