Repository navigation
chore: update all dependencies, thin Squid into Pi's native machinery - #47
Merged
Merged
Conversation
- @earendil-works/pi-coding-agent 0.84.2 -> 1.1.0 (no API break: our import surface typechecks and all 816 tests pass unchanged) - @modelcontextprotocol/sdk 1.30.0 -> 1.32.1, shell-quote 1.10 -> 1.12, typebox 1.3.15 -> 1.3.36, zod 4.4.3 -> 4.6.6, @types/node -> 26.6.5 - bun-types stays pinned at 1.4.2 to match the pinned runtime - ui: cargo update (slint 1.17.1 -> 1.18.1, which fixes the tray error-enum display bug the AGENTS.md notes; clippy/test clean, msvc cross-check clean) Co-Authored-By: Claude Code <noreply@anthropic.com>
Replace the vendored /v1/systemone HTTP client (jev-curator/jev.ts, 147
lines) with ctx.modelRegistry.classify() on the typesafe-system-one API —
pi-ai 1.x speaks the same endpoint natively. The classifier model is
built structurally from CuratorConfig (no pi-ai import needed; its types
are not re-exported through pi-coding-agent).
Behavior deltas, each deliberate:
- state is now the JSON object {"transcript": "..."} (ClassifierContext
requires JsonObject) where the old client sent a bare string — noted in
the jev-curator README for self-hosted replicas.
- the decision key still lives in Squid's keystore and is passed
per-request via options.apiKey; a keyless endpoint gets a placeholder
bearer ("keyless"), which such replicas ignore.
- maxRetries: 0 preserves the old no-retry fail-open on 429/529 — the
call sits ahead of the LLM request and must not stall it.
- a malformed answer for any unit now errors the whole result (pi's
parseAnswers throws), which fails open — same safety posture, stricter
than the old per-unit tolerance.
Tests: the fake /v1/systemone round-trip is retired (the wire is pi's
own tested transport); classify-stub tests now cover model construction,
options passthrough, threshold mapping, keyless placeholder, and
fail-open. Gate: typecheck + 825 tests green.
Co-Authored-By: Claude Code <noreply@anthropic.com>
Drop the vendored chars/4 helper from jev-curator/units.ts; pi exports estimateTokens(message) with the same heuristic but per-message accuracy (images, tool calls, prompt sections). One less duplicated util; no behavior change at the floor. Co-Authored-By: Claude Code <noreply@anthropic.com>
The decision-curation key no longer has a Squid-side store. The curator's classify call omits `apiKey`, so pi resolves the credential itself — a `typesafe` entry in ~/.pi/agent/auth.json wins, TYPESAFE_API_KEY is consulted only when nothing is stored. `src/decision-keystore.ts` (SQUID_DECISION_KEY + 0600 ~/.pi/squid-decision.json) is deleted; the panel's decisionKey row now writes the pi-native credential, refuses a save while the env fallback governs (empty value still clears), and its `overridden` flag means "the env fallback is what this run uses". A keyless local replica now needs any placeholder stored (GUI row or env) because pi's transport refuses to post without a key; otherwise the curator fails open as before. Co-Authored-By: Claude Code <noreply@anthropic.com>
One provider for chat and decisions, entirely through Pi's native machinery: the classifier model declares the chat provider, so Pi's request-time auth resolves the credential the run already has. The extension registers Pi's own typesafe-system-one classifier transport onto the chat provider at session start via the public registerProvider API — the same pattern Pi's llama extension uses — so no Squid-side wire code, typesafe provider entry, or decisionKey row remains. The endpoint stays its own setting (a gateway can route /v1/systemone elsewhere; a local replica is the free option) but defaults to the chat provider's own base URL, read from Pi's models.json. Co-Authored-By: Claude Code <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
What
Dependency update across the board, and — wherever pi 1.1.0 changed shape — Squid's code got thinner instead of shimming:
282846bchore: update all dependencies — bun deps + panel crates;@earendil-works/pi-ai@1.1.0added as a direct dep.eb54b5aroute the decision curator through pi's native classifier — the vendoredjev-curator/jev.tsHTTP client is deleted; the curator callsctx.modelRegistry.classify, so Pi owns the wire, the bearer, and the timeout.9caf65breuse pi's estimateTokens for the curator's token floor — the hand-rolled chars/4 estimate is gone; Pi's own estimate knows every message shape.a761f76store the decision key as pi's own typesafe credential — no Squid-side parallel credential store.4892ef4the decision curator rides the chat model's own provider — the follow-through on "chat and decisions are one provider, all in Pi's native way": the classifier model declares the chat provider (so Pi's request-time auth resolves the credential the run already has), and the extension registers Pi's owntypesafe-system-oneclassifier transport onto the chat provider at session start via the publicregisterProviderAPI. The typesafe provider entry and the panel'sdecisionKeyrow are deleted; there is no second login anywhere.Why
The decision model was never a separate identity — it is one more request the run makes. Keeping a second provider entry, key row, and wire client for it duplicated what Pi already resolves for chat.
SQUID_DECISION_BASE_URLstays as an endpoint-only override (a gateway can route/v1/systemoneelsewhere; a local OpenJev/Kev replica is the free option) and defaults to the chat provider's own base URL.Verification
bun run typecheck(both tsconfigs) +bun test: 811 pass / 7 skip / 0 fail.🤖 Generated with Claude Code