jellycube 0.1.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.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # jellycube
2
2
 
3
- The local MCP server for [Jellycube](https://jellycube.cc). AI agents on your
3
+ The local MCP server for [Jellycube](https://editor.jellycube.app). AI agents on your
4
4
  computer (Claude Code, Cursor, Codex, OpenCode, Claude desktop) get the same
5
5
  tools as Jellycube's cloud MCP: read and edit your sites, manage the CMS,
6
6
  publish, and build new Astro sites in a local folder and upload them once.
@@ -63,12 +63,12 @@ In your OpenCode config:
63
63
 
64
64
  Build the `.mcpb` from this folder (`manifest.json`, `dist`, `README.md`,
65
65
  `LICENSE` and `package.json`) and drag it onto Claude desktop. Leave both
66
- settings empty to use jellycube.cc.
66
+ settings empty to use editor.jellycube.app.
67
67
 
68
68
  ### Remote instead of local
69
69
 
70
70
  Apps that support remote MCP servers (Claude.ai, ChatGPT) can connect to
71
- `https://jellycube.cc/mcp` directly, without this package.
71
+ `https://editor.jellycube.app/mcp` directly, without this package.
72
72
 
73
73
  ## Commands
74
74
 
@@ -88,7 +88,7 @@ warnings and status go to stderr; stdout carries JSON-RPC only.
88
88
 
89
89
  | Variable | Default | Meaning |
90
90
  | --- | --- | --- |
91
- | `JELLYCUBE_API_ORIGIN` | `https://jellycube.cc` | Public API origin. |
91
+ | `JELLYCUBE_API_ORIGIN` | `https://editor.jellycube.app` | Public API origin. |
92
92
  | `JELLYCUBE_CLI_CLIENT_ID` | the Jellycube CLI app | Public OAuth client id. Only for a staging setup. |
93
93
 
94
94
  Tokens are stored in the OS keychain under service `jellycube`, with the token's
package/dist/index.js CHANGED
@@ -1,9 +1,18 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // src/config.ts
4
- var CLI_VERSION = "0.1.0";
5
- var DEFAULT_API_ORIGIN = "https://jellycube.cc";
6
- var CLI_CLIENT_ID = "J7OznJsRYDjJH3Yk";
4
+ var CLI_VERSION = "0.3.0";
5
+ var DEFAULT_API_ORIGIN = "https://editor.jellycube.app";
6
+ var CLI_CLIENT_ID = "hEH0yU6LUTzrXHKJ";
7
+ var DEV_CLI_CLIENT_ID = "J7OznJsRYDjJH3Yk";
8
+ function clientIdFor(config, issuer) {
9
+ if (config.clientId !== CLI_CLIENT_ID) return config.clientId;
10
+ try {
11
+ return new URL(issuer).hostname.endsWith(".clerk.accounts.dev") ? DEV_CLI_CLIENT_ID : CLI_CLIENT_ID;
12
+ } catch {
13
+ return CLI_CLIENT_ID;
14
+ }
15
+ }
7
16
  var LOOPBACK_PORT = 53682;
8
17
  var REDIRECT_URI = `http://127.0.0.1:${LOOPBACK_PORT}/callback`;
9
18
  var LOGIN_TIMEOUT_MS = 5 * 60 * 1e3;
@@ -427,10 +436,10 @@ function credentialsFrom(token, data, previous, now) {
427
436
  subject: subjectOf(token)
428
437
  };
429
438
  }
430
- function authorizeUrl(endpoints, config, pkce, redirectUri) {
439
+ function authorizeUrl(endpoints, clientId, pkce, redirectUri) {
431
440
  const url = new URL(endpoints.authorizationEndpoint);
432
441
  url.searchParams.set("response_type", "code");
433
- url.searchParams.set("client_id", config.clientId);
442
+ url.searchParams.set("client_id", clientId);
434
443
  url.searchParams.set("redirect_uri", redirectUri);
435
444
  url.searchParams.set("scope", REQUESTED_SCOPES.join(" "));
436
445
  url.searchParams.set("state", pkce.state);
@@ -445,8 +454,9 @@ async function login(config, store, options = {}) {
445
454
  const now = options.now ?? Date.now;
446
455
  const fetchFn = options.fetchFn ?? fetch;
447
456
  const endpoints = options.endpoints ?? await discoverAuth(config.origin, fetchFn);
457
+ const clientId = clientIdFor(config, endpoints.issuer);
448
458
  const pkce = newPkce();
449
- const url = authorizeUrl(endpoints, config, pkce, REDIRECT_URI);
459
+ const url = authorizeUrl(endpoints, clientId, pkce, REDIRECT_URI);
450
460
  let code;
451
461
  try {
452
462
  const handle = await startLoopback({
@@ -466,7 +476,7 @@ async function login(config, store, options = {}) {
466
476
  say(`Port ${error.port} is busy. Using a device code instead.`);
467
477
  code = await runDeviceFlow({
468
478
  endpoints,
469
- clientId: config.clientId,
479
+ clientId,
470
480
  scopes: REQUESTED_SCOPES,
471
481
  fetchFn,
472
482
  say,
@@ -478,7 +488,7 @@ async function login(config, store, options = {}) {
478
488
  grant_type: "authorization_code",
479
489
  code,
480
490
  redirect_uri: REDIRECT_URI,
481
- client_id: config.clientId,
491
+ client_id: clientId,
482
492
  code_verifier: pkce.verifier
483
493
  }, fetchFn);
484
494
  const token = data["access_token"];
@@ -498,7 +508,7 @@ async function refresh(credentials, config, store, options = {}) {
498
508
  const data = await tokenPost(endpoints.tokenEndpoint, {
499
509
  grant_type: "refresh_token",
500
510
  refresh_token: credentials.refreshToken,
501
- client_id: config.clientId
511
+ client_id: clientIdFor(config, endpoints.issuer)
502
512
  }, fetchFn);
503
513
  if (data["error"] === "invalid_grant" || data["code"] === "grant_revoked") {
504
514
  await store.clear();
@@ -1636,7 +1646,7 @@ var siteDeleteTool = {
1636
1646
  description: toolDescription(
1637
1647
  "Deletes a finished site and all of its files.",
1638
1648
  "only when the person explicitly asks for the whole site to be removed",
1639
- "The owner only. It cannot be undone and is never auto-approved: the person must type the site name on jellycube.cc, even when the chat app can ask other questions.",
1649
+ "The owner only. It cannot be undone and is never auto-approved: the person must type the site name in the Jellycube app, even when the chat app can ask other questions.",
1640
1650
  '{"siteId":"run_0123456789abcdef"}'
1641
1651
  ),
1642
1652
  inputSchema: obj({ siteId: str("The site run id, from sites.list.") }, ["siteId"]),
@@ -2825,6 +2835,70 @@ function toolsFor(role, scopes, transport, builtPhase, availableEndpoints) {
2825
2835
  });
2826
2836
  }
2827
2837
 
2838
+ // ../mcp-tools/src/annotations.ts
2839
+ var READ_ONLY_TOOLS = /* @__PURE__ */ new Set([
2840
+ "guide.read",
2841
+ "account.me",
2842
+ "workspaces.list",
2843
+ "sites.list",
2844
+ "site.describe",
2845
+ "site.import.status",
2846
+ "page.list",
2847
+ "page.read",
2848
+ "page.status",
2849
+ "preview.open",
2850
+ "share.link.read",
2851
+ "editor.selection",
2852
+ "project.check",
2853
+ "project.files.read",
2854
+ "project.files.list",
2855
+ "project.cloud.check",
2856
+ "approval.status",
2857
+ "templates.list",
2858
+ "collections.list",
2859
+ "entries.list",
2860
+ "media.list",
2861
+ "settings.read",
2862
+ "settings.site.read",
2863
+ "releases.list",
2864
+ "site.publish.status",
2865
+ "history.pages",
2866
+ "history.list",
2867
+ "domain.status",
2868
+ "workspace.domain.status"
2869
+ ]);
2870
+ var DESTRUCTIVE_TOOLS = /* @__PURE__ */ new Set([
2871
+ "site.delete",
2872
+ "page.delete",
2873
+ "entry.delete",
2874
+ "collection.delete",
2875
+ "template.delete",
2876
+ "media.delete",
2877
+ "project.delete",
2878
+ "project.files.delete",
2879
+ "section.remove",
2880
+ "site.publish",
2881
+ "entry.publish",
2882
+ "release.rollback",
2883
+ "history.restore",
2884
+ "domain.add",
2885
+ "domain.remove",
2886
+ "workspace.domain.set",
2887
+ "workspace.domain.remove",
2888
+ "share.link.stop",
2889
+ "settings.image.remove"
2890
+ ]);
2891
+ var OPEN_WORLD_TOOLS = /* @__PURE__ */ new Set(["media.from-url", "share.link.create"]);
2892
+ function toolAnnotations(tool) {
2893
+ const readOnly = READ_ONLY_TOOLS.has(tool.name);
2894
+ return {
2895
+ title: tool.title,
2896
+ readOnlyHint: readOnly,
2897
+ destructiveHint: !readOnly && DESTRUCTIVE_TOOLS.has(tool.name),
2898
+ openWorldHint: OPEN_WORLD_TOOLS.has(tool.name)
2899
+ };
2900
+ }
2901
+
2828
2902
  // ../mcp-tools/src/instructions.ts
2829
2903
  function buildInstructions(mayDo) {
2830
2904
  return [
@@ -3239,7 +3313,7 @@ var PROBLEM_TITLES = {
3239
3313
  unavailable: "Unavailable"
3240
3314
  };
3241
3315
  function problemTypeUri(code) {
3242
- return `https://jellycube.cc/docs/api/errors/${code}`;
3316
+ return `https://editor.jellycube.app/docs/api/errors/${code}`;
3243
3317
  }
3244
3318
 
3245
3319
  // ../../worker/src/api/v1/validate.ts
@@ -5510,7 +5584,8 @@ function listTools(context) {
5510
5584
  name: tool.name,
5511
5585
  title: tool.title,
5512
5586
  description: tool.description,
5513
- inputSchema: tool.inputSchema
5587
+ inputSchema: tool.inputSchema,
5588
+ annotations: toolAnnotations(tool)
5514
5589
  }));
5515
5590
  }
5516
5591
  function listPrompts() {
@@ -5658,7 +5733,7 @@ async function main(argv = process.argv.slice(2), store) {
5658
5733
  }
5659
5734
  if (command === "logout") {
5660
5735
  await (store ?? await createStore()).clear();
5661
- note("Signed out of this computer. Revoke this connection on jellycube.cc for a full sign-out.");
5736
+ note("Signed out of this computer. Revoke this connection in Jellycube (Connected apps) for a full sign-out.");
5662
5737
  return 0;
5663
5738
  }
5664
5739
  if (command === "whoami") {
package/manifest.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "manifest_version": "0.2",
3
3
  "name": "jellycube",
4
4
  "display_name": "Jellycube",
5
- "version": "0.1.0",
5
+ "version": "0.3.0",
6
6
  "description": "Edit Jellycube sites from Claude: sign in once, then use the same tools as the cloud MCP.",
7
7
  "author": {
8
8
  "name": "TAF Technology"
@@ -25,7 +25,7 @@
25
25
  "type": "string",
26
26
  "title": "Jellycube API origin",
27
27
  "description": "Where the Jellycube Public API lives.",
28
- "default": "https://jellycube.cc",
28
+ "default": "https://editor.jellycube.app",
29
29
  "required": false
30
30
  },
31
31
  "jellycube_cli_client_id": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jellycube",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "description": "Local MCP server for Jellycube: sign in once and use the same tools as the cloud.",
5
5
  "type": "module",
6
6
  "bin": {