@jxsuite/protocol 5.0.0 → 6.1.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": "5.0.0",
3
+ "version": "6.1.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.1.0"
30
+ "@jxsuite/schema": "^5.0.0"
31
31
  }
32
32
  }
package/src/routes.ts CHANGED
@@ -335,13 +335,21 @@ export const STUDIO_ROUTES = {
335
335
 
336
336
  // ─── Packages ─────────────────────────────────────────────────────────────
337
337
  packages: route("GET", "/__studio/packages", "List dependencies (PackageInfo[])"),
338
- packagesAdd: route("POST", "/__studio/packages/add", "Add a dependency"),
339
- 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
+ ),
340
348
  packagesInstall: route(
341
349
  "POST",
342
350
  "/__studio/packages/install",
343
- "Run the package manager install",
344
- "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).",
345
353
  ),
346
354
  packagesNeedsInstall: route(
347
355
  "GET",
@@ -358,7 +366,7 @@ export const STUDIO_ROUTES = {
358
366
  packagesSetVersions: route(
359
367
  "POST",
360
368
  "/__studio/packages/set-versions",
361
- "Rewrite dependency ranges and install",
369
+ "Rewrite dependency ranges and install (lockfile-only where nothing installs)",
362
370
  "Bulk version updates are hidden.",
363
371
  ),
364
372
 
@@ -374,6 +382,14 @@ export const STUDIO_ROUTES = {
374
382
  gitFetch: route("POST", "/__studio/git/fetch", "Refresh remote tracking state"),
375
383
  gitCheckout: route("POST", "/__studio/git/checkout", "Switch branches"),
376
384
  gitCreateBranch: route("POST", "/__studio/git/create-branch", "Create a branch"),
385
+ gitCommitBranch: route(
386
+ "POST",
387
+ "/__studio/git/commit-branch",
388
+ "Commit the change set as a NEW branch off the session's base, then take it out of this one " +
389
+ "→ GitCommitBranchResult; 409 branch_exists",
390
+ "A publish the remote conflicts with reports the conflict alone, and Send for review stays " +
391
+ "refused on a branch whose every commit is live.",
392
+ ),
377
393
  gitDiff: route("GET", "/__studio/git/diff", "Unified diff of dirty files (or one path)"),
378
394
  gitShow: route("GET", "/__studio/git/show", "File content at a ref"),
379
395
  gitDiscard: route("POST", "/__studio/git/discard", "Discard working changes"),
package/src/types.ts CHANGED
@@ -238,6 +238,18 @@ export interface GitLogEntry {
238
238
  date: string;
239
239
  }
240
240
 
241
+ /**
242
+ * Response of `git/commit-branch` (see StudioPlatform.gitCommitBranch): the branch the change set
243
+ * now lives on, its commit, and which files left this session (`moved`) or stayed because they were
244
+ * edited while it was made (`kept`).
245
+ */
246
+ export interface GitCommitBranchResult {
247
+ branch: string;
248
+ sha: string;
249
+ moved: string[];
250
+ kept: string[];
251
+ }
252
+
241
253
  /** Response of the pull-request route (see StudioPlatform.createPullRequest). */
242
254
  export interface PullRequestInfo {
243
255
  url: string;
@@ -328,7 +340,7 @@ export interface ExtensionSectionInfo {
328
340
 
329
341
  /** One extension a backend can offer a project, whether or not the project enables it. */
330
342
  export interface ExtensionCatalogEntry {
331
- /** Package name: the identity, and the `bun add` argument. */
343
+ /** Package name: the identity, and the argument an add passes the installer. */
332
344
  name: string;
333
345
  /**
334
346
  * The string that goes in `project.json` `extensions[]`. Usually `name`, but a linked or
@@ -350,12 +362,6 @@ export interface ExtensionCatalogEntry {
350
362
  formats?: string[];
351
363
  /** Other catalogue members it depends on — auth needs connector. */
352
364
  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
365
  /**
360
366
  * The PROJECT resolves it.
361
367
  *
@@ -590,7 +596,7 @@ export interface PackageVersionInfo {
590
596
  dev?: boolean;
591
597
  }
592
598
 
593
- /** Result of a package mutation that runs `bun install` (install / set-versions). */
599
+ /** Result of a package mutation that runs an install (install / set-versions). */
594
600
  export interface PackageOpResult {
595
601
  ok: boolean;
596
602
  /** Combined stdout/stderr from the bun invocation, surfaced to the user on failure. */