feat: v0.2.0 delegation resilience (caching, retry+fallback, custom prompt, inline switch) - #1
Merged
Merged
Conversation
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.
v0.2.0 — Delegation Resilience
Closes PRD gaps #2–#5. Builds on the v0.1.0 capability-aware core with four DELEGATE-mode resilience layers. SPEC-2 + PLAN-2 in the strategy vault.
What's new
describe_imageon the same image costs zero vision-model API calls. In-memory by default; optional persisted disk cache (LRU-evicted). Only successes cached.lib/cache.ts.Inputedit) +/vision system-prompt(multi-line viactx.ui.editor).ctx.signal); non-retryable + exhausted → configured fallback vision model (one attempt). Full error classification.lib/resilience.ts.alt+shift+vhotkey (pi.registerShortcut) +/vision-usecommand; both open the vision-model picker or set directly.Changes
lib/image.ts—sourceHash(sha256 of original bytes) onImageLoadResultlib/cache.ts— NEW:VisionCache(memory Map + optional disk LRU),cacheKeylib/resilience.ts— NEW:withRetry,sleep(abort-aware),classifyError,AbortErrorlib/config.ts— 8 new fields (forward-compatible — v0.1.0 config loads as-is)lib/delegate.ts— cache lookup before call, system prompt, retry+fallback pipeline, abort-awareextensions/vision.ts— 7 new panel rows, 5 new/visionsubcommands,/vision-use,alt+shift+vVerification
pnpm typecheckclean/vision-use✅After merge:
git tag v0.2.0→ CI auto-publishes@getpipher/vision@0.2.0.