Upgrade pi-ai to 1.0.0 - #38
Conversation
Bump @earendil-works/pi-ai from 0.87.1 to 1.0.0 and fix the two breakages it introduced: - pi 1.0.0 adds a classifier-only `typesafe` provider; add its TYPESAFE_API_KEY row to the hand-copied credential table so the registry coverage test passes. - The `openai` provider gained "Sign in with ChatGPT" OAuth, so a bare `codegenie provider login openai` now takes the OAuth path, which threw because no device id was supplied. Pass LoginOptions.getDeviceId backed by a stable UUID persisted at $CODEGENIE_HOME/device-id. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
🧞 Codegenie ReviewWarning Review completed with unresolved questions. 3 question(s) remain unresolved; absence of a confirmed finding does not establish safety. 0 confirmed findings retained from completed work. Unresolved questions require attention. CoverageReviewed 9/14 hunks.
🙋 Needs Human Attention
Stats
No confirmed findingsNo confirmed findings were retained. The limitations above prevent a clean conclusion. |
| } | ||
| ensureCodegenieHome(paths); | ||
| const deviceId = randomUUID(); | ||
| writeFileSync(deviceIdPath, `${deviceId}\n`, { mode: 0o600 }); |
Summary
Bumps
@earendil-works/pi-aifrom 0.87.1 to 1.0.0 (0.99.0 → 0.99.1 → 0.99.2 → 1.0.0; there were no 0.88–0.98 releases) and fixes the two breakages it introduced.typesafeprovider: pi 1.0.0 adds a provider that only serves classifier models. Added itsTYPESAFE_API_KEYrow to the hand-copied credential table insrc/provider/pi-ai-models.ts, which the registry coverage test enforces.provider login openairegression: theopenaiprovider gained "Sign in with ChatGPT" OAuth, so a barecodegenie provider login openainow takes the OAuth branch. That branch threwSign in with ChatGPT requires a device IDbecause codegenie didn't passLoginOptions.getDeviceId. Login now supplies a stable UUID, created on first use at$CODEGENIE_HOME/device-id(permissions 0600) and reused after. This matches how pi's own CLI does it.Behavior change
Bare
codegenie provider login openainow starts Sign in with ChatGPT, matching pi 1.0.0.--api-keystill prompts for an API key, which is what the README already documents.Not adopted
The other new pi 1.0.0 features were reviewed and left out on purpose:
pi-ai/modelsentrypointTest plan
pnpm run typecheckvitest run: 1585 passed, including a new test that login gets a stable, persisted device idcodegenie provider login openaicompletes a real Sign in with ChatGPT🤖 Generated with Claude Code