mirror of
https://github.com/stablyai/orca.git
synced 2026-10-31 17:17:38 +00:00
Preserve complete branch selectors when Git truncates or disambiguates short names, and keep slash-named local branches separate from remote-tracking refs through worktree creation and reuse. Keep native/SSH namespace boundaries and mixed-version client capability gates intact. Accept Git-valid dotted components and cover collisions with configured and orphan tracking refs. Adapted from @nishino-tsukasa's #19540. Independently reviewed in seven adversarial rounds; 235 focused tests and 77 affected-Apple-Git tests pass, along with typecheck, quality checks, and the desktop build. Correct the inherited file-explorer cache-scan expectation while retaining its exact constant-work bound. Correct the inherited release-parser compatibility assertion to match the pinned test dependency; all 121 cross-version tests pass locally. Fixes #19515 Co-authored-by: kino <nishinotsukasavirgo@gmail.com>
41 lines
1.8 KiB
TypeScript
41 lines
1.8 KiB
TypeScript
import {
|
|
AGENT_SESSION_BACKGROUND_TASK_ROW_STOP_CAPABILITY,
|
|
AGENT_SESSION_TURN_ITEM_CAPABILITY,
|
|
AGENT_SESSION_BACKGROUND_TASK_STOP_CAPABILITY,
|
|
AGENT_SESSION_BOUNDARY_RUNTIME_CAPABILITY,
|
|
AUTOMATION_OWNER_FENCING_RUNTIME_CAPABILITY,
|
|
REPO_SEARCH_QUALIFIED_REFS_RUNTIME_CAPABILITY,
|
|
SESSION_TAB_CLOSE_INTENT_RUNTIME_CAPABILITY,
|
|
SESSION_TABS_AUTHORITATIVE_INVENTORY_RUNTIME_CAPABILITY,
|
|
WORKTREE_GITHUB_PR_SUPPRESSION_RUNTIME_CAPABILITY,
|
|
WORKTREE_VISIBILITY_DEFAULTS_RUNTIME_CAPABILITY,
|
|
WORKTREE_VISIBILITY_SOURCE_DEFAULTS_RUNTIME_CAPABILITY,
|
|
type RuntimeCapability
|
|
} from './protocol-version'
|
|
import { AGENT_SESSION_BACKGROUND_TASK_CHILD_VIEWS_CAPABILITY } from './agent-session-background-task-child-views-capability'
|
|
import { SKILL_INSTALL_RESULT_V2_CAPABILITY } from './skill-install-capability'
|
|
|
|
// Keep every remote request transport on the same mixed-version capability contract.
|
|
export function remoteRuntimeClientCapabilities(
|
|
additionalCapabilities: readonly RuntimeCapability[] = []
|
|
): RuntimeCapability[] {
|
|
return Array.from(
|
|
new Set([
|
|
AGENT_SESSION_BACKGROUND_TASK_STOP_CAPABILITY,
|
|
AGENT_SESSION_BACKGROUND_TASK_ROW_STOP_CAPABILITY,
|
|
AGENT_SESSION_BACKGROUND_TASK_CHILD_VIEWS_CAPABILITY,
|
|
AGENT_SESSION_TURN_ITEM_CAPABILITY,
|
|
SESSION_TAB_CLOSE_INTENT_RUNTIME_CAPABILITY,
|
|
SESSION_TABS_AUTHORITATIVE_INVENTORY_RUNTIME_CAPABILITY,
|
|
AGENT_SESSION_BOUNDARY_RUNTIME_CAPABILITY,
|
|
SKILL_INSTALL_RESULT_V2_CAPABILITY,
|
|
WORKTREE_GITHUB_PR_SUPPRESSION_RUNTIME_CAPABILITY,
|
|
WORKTREE_VISIBILITY_DEFAULTS_RUNTIME_CAPABILITY,
|
|
WORKTREE_VISIBILITY_SOURCE_DEFAULTS_RUNTIME_CAPABILITY,
|
|
AUTOMATION_OWNER_FENCING_RUNTIME_CAPABILITY,
|
|
REPO_SEARCH_QUALIFIED_REFS_RUNTIME_CAPABILITY,
|
|
...additionalCapabilities
|
|
])
|
|
)
|
|
}
|