@coderook/cli 0.47.1 → 0.47.2

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.
@@ -2,7 +2,7 @@
2
2
  "name": "coderook",
3
3
  "displayName": "CodeRook",
4
4
  "description": "Save, browse and restore whole-snapshot versions of a project on CodeRook, with cbx or plain git, from Claude Code.",
5
- "version": "0.47.1",
5
+ "version": "0.47.2",
6
6
  "author": {
7
7
  "name": "ACCA Gaming Productions",
8
8
  "url": "https://coderook.com"
@@ -3820,27 +3820,42 @@ class Uploader {
3820
3820
  prefetchCapabilities() {
3821
3821
  void this.serviceCapabilities();
3822
3822
  }
3823
- /** What /health says this deployment accepts. One request per uploader. */
3823
+ /**
3824
+ * What this deployment accepts. One request per uploader.
3825
+ *
3826
+ * Asked at /v1/capabilities with the uploader's own credentials; the list
3827
+ * is no longer printed on /health for strangers (17 November 2026). A
3828
+ * service that predates that address, or a token it will not show the list
3829
+ * to, is asked at /health as before.
3830
+ */
3824
3831
  async serviceCapabilities() {
3825
3832
  if (this.capabilityRequest)
3826
3833
  return this.capabilityRequest;
3834
+ const ask = async (path, authorization) => {
3835
+ const response = await fetch(`${this.credentials.origin()}${path}`, {
3836
+ headers: { accept: "application/json", ...(0, identify_js_1.clientHeaders)(), ...(authorization ? { authorization } : {}) },
3837
+ signal: AbortSignal.timeout(8000),
3838
+ });
3839
+ if (!response.ok)
3840
+ throw new Error(`${path} failed (${response.status})`);
3841
+ const body = (await response.json());
3842
+ return {
3843
+ features: body.features ?? [],
3844
+ contentEncodings: body.contentEncodings ?? ["identity"],
3845
+ };
3846
+ };
3827
3847
  this.capabilityRequest = (async () => {
3828
3848
  try {
3829
- const response = await fetch(`${this.credentials.origin()}/health`, {
3830
- headers: { accept: "application/json", ...(0, identify_js_1.clientHeaders)() },
3831
- signal: AbortSignal.timeout(8000),
3832
- });
3833
- if (!response.ok)
3834
- throw new Error(`health failed (${response.status})`);
3835
- const body = (await response.json());
3836
- return {
3837
- features: body.features ?? [],
3838
- contentEncodings: body.contentEncodings ?? ["identity"],
3839
- };
3849
+ return await ask("/v1/capabilities", `Bearer ${await this.credentials.token()}`);
3840
3850
  }
3841
3851
  catch {
3842
- /* Unknown is treated as unsupported: never risk a refused upload. */
3843
- return { features: [], contentEncodings: ["identity"] };
3852
+ try {
3853
+ return await ask("/health");
3854
+ }
3855
+ catch {
3856
+ /* Unknown is treated as unsupported: never risk a refused upload. */
3857
+ return { features: [], contentEncodings: ["identity"] };
3858
+ }
3844
3859
  }
3845
3860
  })();
3846
3861
  return this.capabilityRequest;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coderook/cli",
3
- "version": "0.47.1",
3
+ "version": "0.47.2",
4
4
  "description": "The command line for CodeRook (coderook.com): version control and project hosting for projects of any size. Every save is a compressed snapshot, private or public, never used to train AI.",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://coderook.com",