Wire the vision extension into package.json (manifest + test globs) #261
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#261
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Summary
Wire the finished
visionextension into the repo'spackage.jsonmanifest so pi loads it and the repo's test suite exercises it: confirm theimage-sizedependency, add the extension topi.extensions, and append the vision test globs toscripts.test.Background
Depends on: #255, #260
pi discovers this repo's extensions through the
pi.extensionsarray inpackage.json(pinned pi docs,docs/packages.md), and the repo runs its whole suite through a singlenpm testscript. Until this step, the vision tests only pass when run file-by-file by their own milestone; after it,npm testfrom the repo root is the source of truth and the "definition of done" acceptance ("npm testgreen from the root") is achievable.extensions/vision/src/images.tsalready addedimage-sizetodependencieswhen it was implemented; this step verifies that entry rather than re-adding it, and finishes the manifest work.Existing manifest entries to follow:
extensions/mongodb/index.ts(last entry inpi.extensionstoday), and the currentscripts.testchain (which ends withextensions/penpot/src/tools/*.test.ts).Documentation Required
A separate process downloads these into the listed folders before this issue is implemented. Check the folder for the actual reference material before starting.
docs/reference/pi-coding-agent/node_modules/@earendil-works/pi-coding-agent/docs/packages.md— thepi.extensions/pi.skillsmanifest keys and the paths they take.extensions.md— how an extension file is loaded from the manifest.docs/reference/npm/dependencies,scripts, andenginesfields.docs/reference/nodejs/node --testtreats multiple file/glob arguments, which is the formscripts.testuses.Implementation Details
Edit the repo-root
package.jsononly:dependencies: confirm"image-size": "^2"is present (it should have been added by the images step). If missing, add it and runnpm install. Do not add any other dependency — the HTTP client uses the built-infetch.pi.extensions: append"extensions/vision/index.ts"after the existing last entry.scripts.test: append the two vision globs so the whole extension is covered: Keep the existing chain and its&&separators intact — this is a pure append, not a rewrite. Do not remove or reorder existing entries.Then run the full suite from the repo root.
Notes:
enginesalready requires Node ≥ 20.19; leave it as is. The extension usesAbortSignal.any/AbortSignal.timeout, which is why that floor matters.package.json.Acceptance Criteria
package.jsondependenciescontains"image-size": "^2"andnpm installstill resolves cleanly.package.jsonpi.extensionsincludes"extensions/vision/index.ts".package.jsonscripts.testincludesextensions/vision/index.test.tsandextensions/vision/src/*.test.ts, appended without altering existing entries.npm testfrom the repo root passes, including every vision test.Test Plan
Expected: install succeeds and the whole suite (existing extensions plus vision) is green.
Confirm the manifest additions:
Expected:
^2 true true.pi-loop opened and merged a pull request for this issue: #274