perfboard-designer-mcp 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +46 -0
  2. package/dist/server.js +1305 -825
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -153,6 +153,7 @@ for both in [`docs/share-links.md`](../docs/share-links.md):
153
153
  | Request | Answer |
154
154
  | --- | --- |
155
155
  | `POST /projects` with `{"project": {…}, "id": "led-blinker", "name": "LED blinker"}` (`id` and `name` optional) | `{id, link, file, image, png}`: the id it got, a short editor link, the file and its pictures |
156
+ | `GET /projects?q=blinker&limit=20` | Stored projects matching the id or name, newest first, with links and a pagination cursor |
156
157
  | `GET /<id>.json` | the project file |
157
158
  | `GET /<id>.png`, `GET /<id>.svg` | pictures of it |
158
159
 
@@ -175,6 +176,34 @@ for both in [`docs/share-links.md`](../docs/share-links.md):
175
176
 
176
177
  There's no sign-in or rate limit yet: anyone can store projects.
177
178
 
179
+ #### Querying stored projects
180
+
181
+ The listing is public and requires no token. Deploy from `mcp/`:
182
+
183
+ ```bash
184
+ npm run worker:deploy
185
+ ```
186
+
187
+ Then query it:
188
+
189
+ ```bash
190
+ curl 'https://projects.perfboarddesigner.com/projects?q=blinker&limit=20'
191
+ ```
192
+
193
+ Omit `q` to list all indexed projects. Search matches a literal substring of the id or name
194
+ (ASCII case-insensitive). `limit` defaults to 20 and accepts 1–100. The response is
195
+ `{projects: [{id, name?, storedAt, link, file, image, png}], nextCursor}`; `storedAt` is the
196
+ original save time in Unix milliseconds. Pass `nextCursor` as the URL-encoded `cursor` query
197
+ parameter with the same `q` to get the next page; `null` means there are no more results.
198
+ Listings are not cached and do not extend projects' lifetimes.
199
+
200
+ The `StoredProjectIndex` Durable Object tracks new saves and removes expired projects. Existing
201
+ projects from before this index was deployed appear when saved again or read from their storage
202
+ object (an edge-cache hit does not reach storage). This is not a complete historical inventory:
203
+ there was no central index before. Temporary MCP working projects are not included.
204
+
205
+ For local use, run `npm run worker:dev` and query `http://localhost:8787/projects`.
206
+
178
207
  Try it locally (at http://localhost:8787/mcp):
179
208
 
180
209
  ```bash
@@ -266,3 +295,20 @@ says how to remake them).
266
295
  | `npm run worker:deploy` | Publish the Worker to Cloudflare |
267
296
  | `npm version patch`, then `npm publish` | Release a new version to npm (`prepublishOnly` builds first; npm asks for 2FA) |
268
297
  | `npm run inspect` | Open the server in the [MCP Inspector](https://github.com/modelcontextprotocol/inspector) to try the tools by hand |
298
+
299
+ ### Requirements and component identities
300
+
301
+ The shared reader supports format 8, including optional independent `requirements`; format 7
302
+ adds project-scoped component `instanceId` fields. `edit_project` preserves all intended nets,
303
+ gives new parts fresh identities, and includes them in the requirement inventory without
304
+ assigning connections. Removed required parts remain reportable by identity, even if another
305
+ part reuses their reference name. A `schematic` field from older editors is ignored.
306
+
307
+ When `requirements.validate` is true, checks also compare the board with the saved requirements:
308
+ missing components/pins, missing connections and unexpected joins are errors; incomplete coverage
309
+ is a warning and never described as a full requirement match. Unspecified pins remain unchecked.
310
+ This is independent of the existing complete-list `expectNets` contract, which is unchanged.
311
+ The project-format resource includes the requirement types.
312
+
313
+ Deploy this shared reader with the frontend before sharing version-8 files through hosted
314
+ storage. Embedded links remain usable without hosted storage.