@jxsuite/protocol 4.0.0 → 6.0.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jxsuite/protocol",
3
- "version": "4.0.0",
3
+ "version": "6.0.0",
4
4
  "description": "The Studio Backend Protocol — wire types and the canonical route table every Jx Studio backend implements",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -27,6 +27,6 @@
27
27
  "test:coverage": "bun test --isolate --coverage"
28
28
  },
29
29
  "dependencies": {
30
- "@jxsuite/schema": "^4.0.0"
30
+ "@jxsuite/schema": "^5.0.0"
31
31
  }
32
32
  }
package/src/routes.ts CHANGED
@@ -12,17 +12,6 @@
12
12
  /** Bumped when a route's request/response shape changes incompatibly. */
13
13
  export const STUDIO_PROTOCOL_VERSION = 1;
14
14
 
15
- /**
16
- * Hidden file a browser-hosted Studio drops into a folder chosen with `showDirectoryPicker()` so
17
- * the backend can find it (specs/desktop.md §8.2.1). Its contents are a one-shot random id; the
18
- * backend matches on those contents, not on the filename, and deletes the file once it matches.
19
- *
20
- * Lives here because the writer (`@jxsuite/studio/directory-picker`) and the reader (the backend
21
- * serving `locateDirectory`) must agree on it, and this package is the contract both already
22
- * share.
23
- */
24
- export const LOCATION_ID_FILE = ".jx-loc-id";
25
-
26
15
  export type StudioRouteMethod = "GET" | "POST" | "PUT" | "DELETE";
27
16
 
28
17
  export interface StudioRoute {
@@ -81,18 +70,6 @@ export const STUDIO_ROUTES = {
81
70
  "Enumerate site projects [{config, path}] (backs listProjects)",
82
71
  "The welcome screen's Projects catalogue stays hidden.",
83
72
  ),
84
- findProject: route(
85
- "GET",
86
- "/__studio/find-project",
87
- "Locate a project directory by name outside the root",
88
- "openProject falls back to config-matching only.",
89
- ),
90
- locateDirectory: route(
91
- "GET",
92
- "/__studio/locate-directory",
93
- `Resolve the absolute path of a showDirectoryPicker() folder by the id in its ${LOCATION_ID_FILE}`,
94
- "Browse… reports that the folder could not be placed; the Location is typed by hand.",
95
- ),
96
73
  createProject: route(
97
74
  "POST",
98
75
  "/__studio/create-project",
@@ -358,13 +335,21 @@ export const STUDIO_ROUTES = {
358
335
 
359
336
  // ─── Packages ─────────────────────────────────────────────────────────────
360
337
  packages: route("GET", "/__studio/packages", "List dependencies (PackageInfo[])"),
361
- packagesAdd: route("POST", "/__studio/packages/add", "Add a dependency"),
362
- packagesRemove: route("POST", "/__studio/packages/remove", "Remove a dependency"),
338
+ packagesAdd: route(
339
+ "POST",
340
+ "/__studio/packages/add",
341
+ "Add a registry dependency, writing package.json and package-lock.json together",
342
+ ),
343
+ packagesRemove: route(
344
+ "POST",
345
+ "/__studio/packages/remove",
346
+ "Remove a dependency, writing package.json and package-lock.json together",
347
+ ),
363
348
  packagesInstall: route(
364
349
  "POST",
365
350
  "/__studio/packages/install",
366
- "Run the package manager install",
367
- "Install/reinstall affordances are hidden; manifest-only edits still work.",
351
+ "Install the declared dependencies (npm's installer, writing package-lock.json)",
352
+ "Install/reinstall affordances are hidden; add, remove and version updates still work where the backend serves them (a cloud session updates the lockfile without installing).",
368
353
  ),
369
354
  packagesNeedsInstall: route(
370
355
  "GET",
@@ -381,7 +366,7 @@ export const STUDIO_ROUTES = {
381
366
  packagesSetVersions: route(
382
367
  "POST",
383
368
  "/__studio/packages/set-versions",
384
- "Rewrite dependency ranges and install",
369
+ "Rewrite dependency ranges and install (lockfile-only where nothing installs)",
385
370
  "Bulk version updates are hidden.",
386
371
  ),
387
372
 
package/src/types.ts CHANGED
@@ -328,7 +328,7 @@ export interface ExtensionSectionInfo {
328
328
 
329
329
  /** One extension a backend can offer a project, whether or not the project enables it. */
330
330
  export interface ExtensionCatalogEntry {
331
- /** Package name: the identity, and the `bun add` argument. */
331
+ /** Package name: the identity, and the argument an add passes the installer. */
332
332
  name: string;
333
333
  /**
334
334
  * The string that goes in `project.json` `extensions[]`. Usually `name`, but a linked or
@@ -350,12 +350,6 @@ export interface ExtensionCatalogEntry {
350
350
  formats?: string[];
351
351
  /** Other catalogue members it depends on — auth needs connector. */
352
352
  requires?: string[];
353
- /**
354
- * THIS host resolves the package without a project install, so enabling it is a config write
355
- * alone. Probed per host, never declared: what a desktop build stages and what a Worker bundles
356
- * are different facts, and neither is knowable from the package list.
357
- */
358
- bundled?: boolean;
359
353
  /**
360
354
  * The PROJECT resolves it.
361
355
  *
@@ -590,7 +584,7 @@ export interface PackageVersionInfo {
590
584
  dev?: boolean;
591
585
  }
592
586
 
593
- /** Result of a package mutation that runs `bun install` (install / set-versions). */
587
+ /** Result of a package mutation that runs an install (install / set-versions). */
594
588
  export interface PackageOpResult {
595
589
  ok: boolean;
596
590
  /** Combined stdout/stderr from the bun invocation, surfaced to the user on failure. */