documentation: add vision extension implementation plan #259
No reviewers
Labels
No labels
bug
chore
documentation
enhancement
feature
ready
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
david/pi-extensions-and-skills!259
Loading…
Reference in a new issue
No description provided.
Delete branch "documentation/2026-09-17/vision-extension-implementation-plan"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What & why
Adds the implementation plan for a new
visionextension to the repo, plus an incidental npm lockfile metadata refresh.extensions/vision/IMPLEMENTATION_PLAN.mdcaptures the output of a design interview that turns a one-shot Moonshot image-understanding CLI (/tmp/cpv/vision.py) into a first-class pi extension: an agent-callablevisiontool backed by DeepSeek'sdeepseek-flashvision model. The plan is written to be executable without re-reading the interview transcript — every decision, contract, and default is stated inline.This is a planning document only. No extension code, tests, or
package.jsonwiring is included in this PR; the plan's milestones (§14) describe that work as follow-up.Key decisions recorded in the plan:
visionaccepts aprompt, one or more local image paths, an optionaldetaillevel, and an optionalthinkingflag; it returns model text, structureddetails, and a pi-mappedusage(token counts plus peak/off-peak cost).http(s)URL or Files API inputs, no caching, no conversation state, no streaming, no image generation/editing, no per-call model override — each call is an independent read-only request that writes nothing to disk.src/config.tsloads.envviadotenv.parsewithout mutatingprocess.env(mirroringmongodb/src/env.ts), withprocess.envtaking precedence.DEEPSEEK_API_KEYabsent or empty ⇒resolveConfigreturnsnulland the extension registers zero tools. Invalid numerics forVISION_MAX_TOKENS/VISION_TIMEOUTthrow aToolError(categoryconfig) at load time rather than silently defaulting.ToolErrorwith a category, mapped to actionable messages.The plan also specifies the intended file layout (§3):
index.tswith aregisterVisionToolsseam, asrc/module per concern, a co-located*.test.tsper module, and aREADME.md.Per-file breakdown
Added
extensions/vision/IMPLEMENTATION_PLAN.md(+452)VisionConfig/resolveConfigcontractValidationLimitsToolErrorcategories and mappingUsagewith peak/off-peak costingvisionToolDefinitionregisterVisionToolsregistration seamModified
package-lock.json(−1)"hasShrinkwrap": truefield from the@earendil-works/pi-coding-agent@0.84.1entry. Metadata-only lockfile churn produced by npm; no dependency versions or integrity hashes change.Notes
documentationis a no-issue, date-driven label in this repo'sAGENTS.mdconventions.