issue-260: Implement extensions/vision/index.ts (factory, registration, unconfigured no-op) #273
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!273
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/issue-260/implement-extensions-vision-index-ts-factory-regis"
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?
260: Implement extensions/vision/index.ts (factory, registration, unconfigured no-op)
Closes #260 — 260.
Generated in 20m 06s.
Review findings
I'll start by exploring the relevant files to understand the current state.
Now let me look at the README and an existing extension README for reference.
Now I understand both findings. Let me fix the Low finding first — the
resolvePositiveIntinteger validation.Now let me add a config test for the decimal case.
Now let me create the vision extension README. Let me first check the vision directory structure and other files.
Now let me create the vision extension README following the mongodb pattern.
Now let me update the main README. First the extensions count and table row.
Now let me run the test gate. Let me check the test script first.
Let me run the test gate.
The suite passes: 975 pass, 0 fail, 1 skip, including my new
non-integer VISION_MAX_TOKENS throws a config ToolErrortest. Let me verify there's no type-check gate I'm missing and confirm my changes are type-safe.tscisn't installed — confirming the review's finding that only thenode --testgate exists. My changes are type-safe (theNumber.isIntegeraddition is standard). Let me verify the final config.ts change.Both findings are resolved. Let me verify the README edits rendered correctly.
Both findings are resolved and the test suite passes (975 pass, 0 fail, 1 skip). Now I'll emit the final annotated findings document.
Review Findings — 260
Summary
Two findings, both resolved in this pass. The Low finding (
resolvePositiveIntaccepting decimals) is now fixed:resolvePositiveIntthrows aconfigToolErrorfor non-integer values (8000.5) after the finite/>0checks, with an updated docstring, plus a newconfig.test.tscasenon-integer VISION_MAX_TOKENS throws a config ToolError. The Medium finding (undocumented extension) is fixed: the README now shows Extensions (10), avisiontable row, avision/Repository-layout entry, an "Extension notes" entry, and a newextensions/vision/README.mdmirroring themongodbprecedent. Gates: only atestgate exists (no build/lint/tsc—tscisn't installed;node --teststrips types). Suite: 975 pass, 0 fail, 1 skip, including the new test.Critical
High
Medium
README.md:27— Thevisionextension is registered in thepackage.jsonpi.extensionsmanifest but was undocumented: the extensions table read "Extensions (9)", there was novisionrow, novisionlayout entry, no "Extension notes" entry, and noextensions/vision/README.md. Suggested fix: add avisionrow to the extensions table + a layout entry + an "Extension notes" entry describingDEEPSEEK_API_KEY/VISION_*, and createextensions/vision/README.md. RESOLVED — count bumped to (10), table row / layout entry / Extension-notes entry added, andextensions/vision/README.mdcreated.Low
extensions/vision/src/config.ts:66—resolvePositiveInt(its own name asserts "Int") accepted non-integer values:Number("8000.5")is finite and> 0, soVISION_MAX_TOKENS=8000.5passed validation and would be sent as a non-integermax_tokens, which DeepSeek rejects. Suggested fix: after the finite/>0checks addif (!Number.isInteger(value)) { throw new ToolError(\${key} must be a whole number, got "${trimmed}"`, "config"); }, and add a config test covering a decimal value. RESOLVED — integer guard added, docstring updated, andnon-integer VISION_MAX_TOKENS throws a config ToolError` test added.Documentation
Updated files: