Initialize the extensions/mongodb package (package.json, deps, bun.lock) #133
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#133
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
Create the
extensions/mongodb/npm package skeleton: apackage.jsondeclaring the extension manifest, its dependencies, and atestscript, then runbun installto produce a committedbun.lock. This is the foundation every other module of the extension builds on.Background
This is the first step of building a new pi extension called mongodb-extension — a TypeScript extension that exposes read-only MongoDB query tools (
mongo_find,mongo_count,mongo_list_collections). It lives atextensions/mongodb/inside this repo (pi-extensions-and-skills), alongside sibling extensionsextensions/postgres/andextensions/victorialogs/that follow the same conventions — mirror them where applicable.This step only creates the package manifest and installs dependencies; no source code yet.
index.ts(created in a later milestone) is referenced by the manifest but does not exist yet — that is expected. Everything else in this plan depends on this package existing with a workingbun testrunner.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/mongodb-driver/— for themongodbdriver dependency (version floor and API surface):instanceofchecks rather than parsing error messages.docs/reference/dotenv/— for thedotenvdependency:config(),parse(),populate(), options (path,debug,override,processEnv), and the .env parsing rules.Implementation Details
Create
extensions/mongodb/package.jsonwith:"name": "mongodb-extension""pi": { "extensions": ["./index.ts"] }— the entry point pi loads; the file itself comes in a later milestone."scripts": { "test": "bun test" }(repo convention — matches the sibling extensions)."dependencies": { "mongodb": "...", "dotenv": "..." }—mongodbat ^6.10 as the floor, or ^7.x (the current major; pick the latest stable at implementation time — check the npm page in the reference folder). The driver is a pure-JS package with no native deps, so it runs under bun."devDependencies": { "@types/bun": "..." }plus@earendil-works/pi-coding-agent(as a dev/peer dependency for extension types — mirror exactly howextensions/postgres/package.jsondeclares it).Then run
bun installinsideextensions/mongodb/sobun.lockis produced and committed. Do not create any source files in this step.Acceptance Criteria
extensions/mongodb/package.jsonexists withname: "mongodb-extension",pi.extensions: ["./index.ts"], andtest: "bun test".mongodbanddotenvare independencies;@types/bun(and@earendil-works/pi-coding-agentper the postgres sibling) are indevDependencies.bun installsucceeds andbun.lockis committed.bun testruns fromextensions/mongodb/and exits 0 (trivially, with zero tests).Test Plan
pi-loop opened and merged a pull request for this issue: #152