singularity-forge/packages/pi-coding-agent/src
Jay The Reaper bc278d12d9 feat(core): support for 'non-api-key' provider extensions like Claude Code CLI (#2382)
* feat(core): add generic native post-install hooks for package install

* feat(core): add before/after install/remove lifecycle hooks

* refactor(core): remove postInstall alias from lifecycle hook fallback

* feat(core): complete authMode support for keyless providers

The initial authMode implementation fixed model-registry, sdk, and
fallback-resolver but missed agent-session.ts (6 callsites) and
compaction-orchestrator.ts (2 callsites) that block externalCli
providers at runtime.

Architecture: separate readiness gating from credential retrieval.
- isProviderRequestReady(): authMode-aware readiness check
- getApiKey()/getApiKeyForProvider(): return undefined for
  externalCli/none providers instead of triggering auth errors
- All 8 callsites in agent-session and compaction-orchestrator
  now gate on readiness, not key presence
- Downstream signatures (compaction, branch-summarization) accept
  apiKey: string | undefined
- Replaced hardcoded ollama exception in discoverModels with
  isProviderRequestReady

Zero behavioral change for classic apiKey/oauth providers.

* feat(core): add isReady callback for provider readiness verification

Extensions can now provide an isReady() callback when registering any
provider. isProviderRequestReady() calls it before default auth checks,
allowing providers to verify actual reachability (CLI authenticated,
API key valid, service online) rather than relying solely on credential
presence.

* test(core): expand authMode test coverage

Cover all four auth modes (apiKey, oauth, externalCli, none),
isReady callback behavior, getProviderAuthMode defaults,
isProviderRequestReady for each mode, getAvailable filtering,
and getApiKey early-return for keyless providers.

* chore: remove provider-api-bridge files from this branch

These files implement GSD core → provider-api wiring (deps + tool
registry) and belong in a separate PR. Reverts register-extension.ts
to upstream state.
2026-03-24 15:50:12 -06:00
..
cli feat: dynamic model discovery & provider management UX (#581) 2026-03-16 06:23:18 -06:00
core feat(core): support for 'non-api-key' provider extensions like Claude Code CLI (#2382) 2026-03-24 15:50:12 -06:00
modes fix(memory): fix memory and resource leaks across TUI, LSP, DB, and automation (#2314) 2026-03-24 07:23:36 -06:00
resources/extensions/memory perf: add concurrency limits to unbounded Promise.all operations (#1029) 2026-03-17 18:29:28 -06:00
tests fix: normalize Windows paths in LLM-visible text to prevent bash failures (#874) (#884) 2026-03-17 09:02:23 -06:00
utils Merge pull request #1484 from frizynn/refactor/agent-session-decomposition 2026-03-19 15:48:59 -06:00
cli.ts feat: vendor Pi source into workspace monorepo 2026-03-12 21:55:17 -06:00
config.ts refactor: remove dead code (unused exports) (#1486) 2026-03-19 15:33:32 -06:00
index.ts feat(core): support for 'non-api-key' provider extensions like Claude Code CLI (#2382) 2026-03-24 15:50:12 -06:00
main.ts feat(core): support for 'non-api-key' provider extensions like Claude Code CLI (#2382) 2026-03-24 15:50:12 -06:00
migrations.ts refactor: remove dead code (unused exports) (#1486) 2026-03-19 15:33:32 -06:00