Repository navigation
Providers phase 2c-3: N-provider Pass A id capture + registry-derived setup tools - #401
Merged
Merged
Conversation
… setup tools Two remaining phase-2c capabilities, both closing hand-enumerated provider lists: 1. Pass A provider-session-id capture (useIpcSubscriptions) now runs EVERY registered provider's extractProviderSessionId on every line — deliberately NOT kind-routed. This pass feeds the #290 foreign-transcript quarantine, which must observe a conflicting provider id even when the line belongs to a different provider than the pane; kind-routing here would blind the conflict detector to exactly the misattach it exists to catch. Extractors are mutually exclusive by wire shape, and observed-id precedence follows AGENT_PROVIDER_KINDS order (preserving the historical claude-then-codex fallback). The last shape-sniff special-case in Pass A (claude's inline `raw.sessionId` read) moves behind the registry capability added in phase 2b. 2. Setup tooling derives its provider entries from a new plain-data registry.setup.ts: SetupToolId's hand-written 'claude'|'codex' arms become AgentProviderKind; TOOL_COMMAND, TOOL_META, and CHECK_ORDER spread from listProviderSetupDescriptors() / AGENT_PROVIDER_KINDS. Registering a provider now automatically adds its SetupGate row, PATH resolution, and check ordering. WHY a separate registry.setup.ts instead of a field on MainProviderConfig: binaryResolver → registry.main → claudeSession → toolchain → binaryResolver would be a genuine ESM module cycle (claudeSession imports getToolPath/resolveBundledTool from @main/setup). The plain-data split mirrors registry.renderer.capabilities.ts, which exists for the same reason on the renderer side. The descriptor also makes the kind↔binaryName coupling explicit and per-provider breakable, and carries the `required` flag that #394 §13.5's "installed providers" concept will flip later. Verified: tsc clean on both projects, electron-vite build clean, vitest 170/170. Part of #394. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Jul 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #394 (phase 2c). Follows #400.
1. Pass A generalization (renderer)
Provider-session-id capture now iterates every registered provider's
extractProviderSessionId(the phase-2b capability) instead of the claude/codex shape fork. Deliberately not kind-routed: this pass feeds the #290 foreign-transcript quarantine, which must observe a conflicting provider's id to quarantine the burst — kind routing would blind the detector to exactly the misattach it catches. Precedence followsAGENT_PROVIDER_KINDSorder (identical to the old claude-then-codex fallback).2. Registry-derived setup tools (main)
SetupToolId's hand-written'claude' | 'codex'arms →AgentProviderKind(the second parallel provider enumeration, gone).registry.setup.ts— plain-data descriptors (binaryName,label,required,detail);TOOL_COMMAND/TOOL_META/CHECK_ORDERderive from it. Registering a provider automatically adds its SetupGate row, PATH resolution and check ordering.MainProviderConfigfield:binaryResolver → registry.main → claudeSession → toolchain → binaryResolveris a genuine ESM cycle; the plain-data split mirrorsregistry.renderer.capabilities.tswhich exists for the same reason renderer-side.Verification
tsc --noEmitclean on both projects;electron-vite buildclean;vitest170/170.🤖 Generated with Claude Code