Commit Graph
22 Commits
Author SHA1 Message Date
Patrick WozniakandGitHub f06982fc94 fix(deps): resolve npm audit findings
Update tsx and refresh the protobufjs lockfile entry to clear npm audit findings.
2026-06-16 14:02:46 +02:00
Patrick WozniakandGitHub 6aac2bdbcf chore(release): publish 0.4.0 2026-06-02 10:44:39 +02:00
jizhejiang c3107dbc1c feat(core): add retry for transient HTTP and stream-level errors
Add retry mechanism driven by pi settings.json retry.provider config
(timeoutMs, maxRetries, maxRetryDelayMs).

HTTP-level retries handle 429/5xx with exponential backoff and jitter,
respecting Retry-After headers (seconds and HTTP-date formats).

Stream-level retries handle cases where the API returns 200 OK but
sends an error event in the stream body. Retries only when no content
has been emitted yet.

Per-attempt timeout via AbortController with automatic retry. Clean
abort propagation through the retry loop.
2026-06-02 11:38:10 +08:00
Patrick WozniakandGitHub f48291f252 chore(release): publish 0.3.1 (#11)
* chore(release): publish 0.3.1

* docs(release): document branch-protected PR workflow
2026-05-29 00:20:16 +02:00
Patrick Wozniak 41fb9486af Release 0.3.0 2026-05-28 22:31:09 +02:00
Patrick Wozniak fe49146892 Merge remote-tracking branch 'origin/main' into fix/pr-7-review
# Conflicts:
#	index.ts
#	package.json
#	tests/test-pi-local.mjs
2026-05-28 22:07:51 +02:00
Fei Yan 52ed72aa37 perf(deps): move pi-coding-agent to optional peerDependencies
Reduces node_modules from 312MB to 154MB. The import is type-only
(import type { ExtensionAPI }) so the 163MB package was installed
but never executed at runtime. End users get the lean install;
contributors still get it via devDependencies during development.
2026-05-28 21:49:11 +08:00
AlexVagrantandwh.huajieyu c2497ed098 feat: add OMP (Oh My Pi) provider compatibility
Support OMP as a host alongside pi:
- Convert OMP's array-format system prompts to string via systemPromptToText
- Guard against OMP passing the literal env-var name as the API key value
- Add ~/.omp/agent/auth.json to default auth path lookup
- Fix --list-models output to check both stdout and stderr
- Add OMP compatibility smoke test with isolated temp HOME and mock server
- Deduplicate usage section in README, add OMP install and usage docs
2026-05-28 04:12:35 -04:00
Fei Yan 96c452eefd chore: upgrade pi dependencies from @mariozechner 0.72.0 to @earendil-works 0.75.5
pi 0.75.5 renamed the npm namespace from @mariozechner/ to @earendil-works/.
Importing from the old namespace causes 'fetch failed' errors at startup.

Changes:
- index.ts: @mariozechner/pi-ai → @earendil-works/pi-ai
- index.ts: @mariozechner/pi-coding-agent → @earendil-works/pi-coding-agent
- package.json: bump deps from 0.72.0 to 0.75.5
- package-lock.json: regenerated with new packages (242 deps)
- tsc --noEmit: zero errors
2026-05-27 19:48:55 +08:00
Fei Yan e8f7410a0a test(pricing): verify MODEL_COSTS entries and promotional notes
Add tests/test-pricing.ts to assert that known models have non-zero
pricing, promotional deals are documented in comments, and Claude models
include cache pricing. Fix test-pi-local to match against combined
stdout+stderr since pi may output model listing to either stream.
2026-05-27 07:32:50 +08:00
Patrick Wozniak b850558199 docs(contributing): add contribution and release guides 2026-05-26 23:26:52 +02:00
Patrick Wozniak cc05faa526 Release 0.1.1 2026-05-26 23:05:21 +02:00
Patrick Wozniak 5714e3863a Test dynamic Command Code model discovery 2026-05-26 21:51:54 +02:00
Patrick Wozniak 418f4c925b Fetch Command Code models at startup 2026-05-26 21:51:41 +02:00
Tao Yang 960d0d1f23 feat: extract models from command-code dist, load via models.json
- Add scripts/extract-models.ts to parse command-code npm dist file
- Generate models.json (21 models, 15 pricing entries) with contextWindow
  and maxOutputTokens pre-filled; no nulls or hardcoded fallbacks in index.ts
- Rewrite index.ts to load model list and costs from models.json
- Cap gateway model maxOutputTokens at 65536 (API limit for Baseten/Vercel)
- Add 'Update models' section to README documenting the generation flow
- Add npm run extract-models script
2026-05-25 16:37:08 +08:00
Patrick Wozniak b8853ab0d6 Add Command Code browser login fallback 2026-05-05 14:48:06 +02:00
Patrick Wozniak e9853eb4a4 chore: add CI workflow (typecheck + prettier format check), tsconfig, and prettier formatting 2026-05-05 13:56:41 +02:00
Patrick Wozniak 66c695bfff fix: include src/ in npm publish files 2026-05-05 13:31:06 +02:00
Patrick Wozniak e283cd0677 chore: add README, LICENSE, publish workflow, and npm metadata for pi.dev/packages 2026-05-05 13:29:46 +02:00
Patrick Wozniak 3630b85298 Add pi CLI coverage with DeepSeek 2026-05-05 13:22:15 +02:00
Patrick Wozniak b8b0a9894e chore: add npm test scripts and finalize package metadata 2025-05-05 11:50:00 +02:00
Patrick Wozniak d18dd3e77b feat: scaffold pi package with provider skeleton 2025-05-04 17:05:00 +02:00