agent-ecosystem/src/main/ipc
Jan cc10485f0c
feat(kilocode): add provider support
* Add KiloCode as a first-class provider with HTTP-based model catalog

Implements KiloCode (kilo.ai gateway) support following repo design principles,
independently of the OpenCode implementation.

Key changes:
- Add 'kilocode' to CliProviderId, TeamProviderId, MemberWorkSyncProviderId
- Create kilocode-model-catalog feature: HTTP client fetching models from
  kilo.ai /models endpoint (not /v1/models — different gateway path)
- Add KILO_API_KEY env var for authentication
- Wire kilocode into provider routing, capabilities, and UI labels
- Add 'kilo' brand icon alias in providerBrandIcons (auto-fetches from models.dev)
- KiloCode status is managed via the HTTP gateway, not the multimodel bridge

* Fix: preserve non-bridge providers (kilocode) when updating provider status

The multimodel bridge only returns status for anthropic/codex/gemini/opencode.
When checkAuthStatus replaced result.providers with the bridge response,
kilocode was lost from the provider list and never appeared in the UI.

Now merge bridge providers with the initial list, keeping any provider
not covered by the bridge so kilocode shows up in the Extensions panel.

* Fix: resolve KiloCode status after bridge merge, skip bridge refresh for non-bridge providers

- resolveKilocodeStatus() gives kilocode a settled verificationState:'verified' status
  so isHydratedMultimodelProviderStatus() returns true and the loading spinner stops
- Status reflects KILO_API_KEY presence: authenticated+supported when set, else clear message
- fetchCliStatus() now skips fetchCliProviderStatus for non-bridge providers (kilocode)
  so the Claude Code CLI is not queried for kilocode, preventing error status overwrites

* Add KiloCode to API key provider system in settings dialog

isApiKeyProviderId now includes kilocode, so the API key form renders
in the Provider Settings dialog instead of showing an empty modal.
Adds KILO_API_KEY config with placeholder and description.

* Fix KiloCode models endpoint: /api/gateway/models per docs

* Fix: short-circuit getProviderStatus/verifyProviderModels for kilocode

The Claude Code CLI only accepts anthropic and codex for --provider.
Calling it with kilocode caused the blinking modal error.

resolveKilocodeProviderStatus() returns status directly from env
without touching the CLI binary — no bridge, no --provider flag.

* Fix: resolveKilocodeProviderStatus reads from app key store via enrichProviderStatus

process.env.KILO_API_KEY was only set for users who configured it in their
shell environment. The UI stores the key in the app's encrypted key store
(ApiKeyService), which enrichProviderStatus checks via hasStoredProviderApiKey.

Now resolveKilocodeProviderStatus() calls providerConnectionService.enrichProviderStatus()
so both the app key store and env var are checked — the same way anthropic/gemini work.

* Wire KiloCode model catalog into provider status — models now load from gateway

- ProviderConnectionService: add setKilocodeModelCatalogFeature() and
  enrichKilocodeProviderStatus() which fetches models from the gateway API
  and populates provider.models when the API key is configured
- main/index.ts: create KilocodeModelCatalogFeature at startup and inject
  it into ProviderConnectionService, same lifecycle as Codex catalog

* Fix: skip Claude CLI probe for kilocode in prepareForProvisioning

The generic probe path calls probeClaudeRuntime with CLAUDE_CODE_ENTRY_PROVIDER=kilocode
which causes the CLI to hang — freezing the Create Team dialog until timeout.

Add an explicit kilocode case that short-circuits to an API key presence check
(via providerConnectionService.getConnectionInfo) without touching the Claude binary,
same pattern as the opencode adapter bypass.

* Fix vitest localStorage fallback

* test(kilocode): update provider visibility expectations

---------

Co-authored-by: 777genius <quantjumppro@gmail.com>
2026-05-25 21:12:37 +03:00
..
teams refactor(team): extract message notification scanner 2026-05-21 23:47:55 +03:00
cliInstaller.ts feat(kilocode): add provider support 2026-05-25 21:12:37 +03:00
codexRuntime.ts feat: add managed codex runtime installer 2026-05-13 22:30:25 +03:00
config.ts fix(windows): support path mentions and editor launch 2026-04-25 19:12:11 +03:00
configValidation.ts feat(i18n): add localization foundation 2026-05-24 15:37:24 +03:00
context.ts feat(visualization): enhance team and subagent visualization in README 2026-02-12 23:43:28 +09:00
crossTeam.ts style: auto-fix import/export sorting and formatting 2026-03-16 20:48:42 +02:00
editor.ts feat(team): improve runtime bootstrap controls 2026-05-19 22:39:13 +03:00
extensions.ts feat(runtime): improve provider delivery visibility 2026-05-12 23:33:08 +03:00
guards.ts fix(windows): align session paths and validators 2026-04-25 20:23:03 +03:00
handlers.ts fix(ci): restore dev validation checks 2026-05-19 02:49:45 +03:00
httpServer.ts feat: enhance team control API with retry logic and fallback mechanisms 2026-03-12 19:23:48 +02:00
ipcWrapper.ts feat: add Sentry error tracking and update docs 2026-03-22 17:03:15 +02:00
notifications.ts feat: enhance notification handling and improve task comment protocols 2026-03-15 14:18:33 +02:00
openCodeRuntime.ts feat(opencode): improve runtime delivery diagnostics 2026-05-12 13:26:33 +03:00
projects.ts feat: enhance team file handling and logging improvements 2026-03-03 22:00:11 +02:00
rendererLogs.ts chore(team): checkpoint current frontend work 2026-05-08 21:48:27 +03:00
review.ts feat(sync): expand member work review signals 2026-05-09 14:34:33 +03:00
schedule.ts feat: add scheduled tasks with cron execution and rich log viewer 2026-03-08 00:58:07 +02:00
search.ts feat: search session globally across projects 2026-02-21 14:34:25 +05:30
sessions.ts feat: add options for bypassing cache in session and subagent detail retrieval 2026-03-06 10:40:45 +02:00
skills.ts style: auto-fix import/export sorting and formatting 2026-03-16 20:48:42 +02:00
ssh.ts feat(visualization): enhance team and subagent visualization in README 2026-02-12 23:43:28 +09:00
subagents.ts feat: add options for bypassing cache in session and subagent detail retrieval 2026-03-06 10:40:45 +02:00
teams.ts fix(team): harden launch diagnostics and MCP shutdown 2026-05-22 00:20:47 +03:00
telemetry.ts chore: checkpoint frontend workspace updates 2026-05-18 01:57:16 +03:00
terminal.ts fix: harden provider-aware cli env handling 2026-04-12 13:18:49 +03:00
tmux.ts feat(tmux): add hybrid installer flow 2026-04-14 20:07:57 +03:00
updater.ts feat(team): expand opencode review and release support 2026-04-24 12:05:54 +03:00
utility.ts fix: handle ENOENT error gracefully in file reading functions 2026-03-20 14:26:47 +02:00
validation.ts fix(windows): align session paths and validators 2026-04-25 20:23:03 +03:00
window.ts feat(team): expand opencode review and release support 2026-04-24 12:05:54 +03:00