cctether 0.3.0 → 0.3.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.
package/README.md CHANGED
@@ -12,9 +12,9 @@ On the computer that runs Claude Code (Node.js 22 or newer):
12
12
  npx cctether@latest setup
13
13
  ```
14
14
 
15
- Setup installs cctether, makes a key, asks how your browser will reach this computer (same computer, SSH tunnel, or HTTPS with your own domain), can install a background service, adds cctether to Claude Code, checks the connection, and prints a connection code. Then install the extension and paste the code into its settings.
15
+ Setup installs cctether, makes a key, asks how your browser will reach this computer (same computer, SSH tunnel, or HTTPS with your own domain), can install a background service, adds cctether to Claude Code, checks the connection, and prints a connection code. Then install the [extension from the Chrome Web Store](https://chromewebstore.google.com/detail/cctether/mbkadoolgknacadjkfjjajldmllbkdib) and paste the code into its settings.
16
16
 
17
- Full documentation, the extension, and how each connection method works: **https://github.com/guchaorui/cctether**
17
+ Full documentation and how each connection method works: **https://github.com/guchaorui/cctether**
18
18
 
19
19
  ## Commands
20
20
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cctether",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "Let Claude Code use your browser over your own connection — no third-party relay.",
5
5
  "keywords": [
6
6
  "claude-code",
package/src/config.js CHANGED
@@ -7,8 +7,11 @@ import { join } from 'node:path';
7
7
 
8
8
  export const DEFAULT_PORT = 27182;
9
9
  export const WS_PATH = '/cctether';
10
- /** Extension IDs accepted by default: the unpacked build (fixed by the manifest key). */
11
- export const DEFAULT_EXTENSION_IDS = ['nfebjhhcnoilmfjacolkofphfekkjioh'];
10
+ /**
11
+ * cctether's own extension IDs, always accepted: the build people load themselves (fixed by the
12
+ * manifest key) and the Chrome Web Store build. "extensionIds" in config.json adds more.
13
+ */
14
+ export const DEFAULT_EXTENSION_IDS = ['nfebjhhcnoilmfjacolkofphfekkjioh', 'mbkadoolgknacadjkfjjajldmllbkdib'];
12
15
 
13
16
  export function configDir(env = process.env) {
14
17
  if (env.CCTETHER_HOME) return env.CCTETHER_HOME;
@@ -62,7 +65,7 @@ function validate(raw) {
62
65
  key: Buffer.from(String(raw.key ?? ''), 'base64url'),
63
66
  port: raw.port ?? DEFAULT_PORT,
64
67
  publicUrl: raw.publicUrl ?? null,
65
- extensionIds: raw.extensionIds ?? DEFAULT_EXTENSION_IDS,
68
+ extensionIds: raw.extensionIds ?? [],
66
69
  trustProxySetting: raw.trustProxy ?? null,
67
70
  };
68
71
  if (cfg.trustProxySetting !== null && typeof cfg.trustProxySetting !== 'boolean') {
@@ -76,6 +79,8 @@ function validate(raw) {
76
79
  if (!Array.isArray(cfg.extensionIds) || !cfg.extensionIds.every((id) => /^[a-p]{32}$/.test(id))) {
77
80
  throw new ConfigError('config.json: "extensionIds" must be a list of 32-letter extension IDs.');
78
81
  }
82
+ // Older config files list the built-in IDs explicitly; either way the built-in ones are included.
83
+ cfg.extensionIds = [...new Set([...DEFAULT_EXTENSION_IDS, ...cfg.extensionIds])];
79
84
  return cfg;
80
85
  }
81
86
 
@@ -131,7 +136,8 @@ export function saveConfig(dir, cfg) {
131
136
  key: cfg.key.toString('base64url'),
132
137
  port: cfg.port,
133
138
  publicUrl: cfg.publicUrl,
134
- extensionIds: cfg.extensionIds,
139
+ // Only extra IDs are stored: the built-in ones can change with an update.
140
+ extensionIds: cfg.extensionIds.filter((id) => !DEFAULT_EXTENSION_IDS.includes(id)),
135
141
  trustProxy: cfg.trustProxySetting ?? null,
136
142
  };
137
143
  writeFileSync(tmp, JSON.stringify(data, null, 2) + '\n', { mode: 0o600 });
@@ -151,7 +157,7 @@ export function initConfig(dir, { port, publicUrl } = {}) {
151
157
  key: newKey().toString('base64url'),
152
158
  port: port ?? DEFAULT_PORT,
153
159
  publicUrl: publicUrl ?? null,
154
- extensionIds: DEFAULT_EXTENSION_IDS,
160
+ extensionIds: [],
155
161
  });
156
162
  saveConfig(dir, cfg);
157
163
  return { cfg, created: true };
package/src/text.js CHANGED
@@ -2,14 +2,15 @@
2
2
  // short and technical and stay English-only.
3
3
 
4
4
  export const REPO_URL = 'https://github.com/guchaorui/cctether';
5
+ const STORE_URL = 'https://chromewebstore.google.com/detail/cctether/mbkadoolgknacadjkfjjajldmllbkdib';
5
6
 
6
7
  const LINKS = {
7
8
  en: {
8
- extension: `${REPO_URL}#install-the-extension`,
9
+ extension: STORE_URL,
9
10
  connect: `${REPO_URL}/blob/main/docs/connect.md`,
10
11
  },
11
12
  zh: {
12
- extension: `${REPO_URL}/blob/main/README.zh-CN.md#安装插件`,
13
+ extension: STORE_URL, // the store page follows the browser's language
13
14
  connect: `${REPO_URL}/blob/main/docs/connect.zh-CN.md`,
14
15
  },
15
16
  };
package/src/tools.js CHANGED
@@ -151,7 +151,7 @@ export const TOOLS = [
151
151
  {
152
152
  name: 'press_key',
153
153
  title: 'Press key',
154
- description: 'Press a key or combination, e.g. "Enter", "Escape", "Tab", "ArrowDown", "Control+A", "Meta+Shift+P".',
154
+ description: 'Press a key or combination, e.g. "Enter", "Escape", "Tab", "ArrowDown", "Control+A", "Meta+Shift+P". If the browser is on macOS (list_tabs says), editing shortcuts use Meta: Meta+A, Meta+C, Meta+V.',
155
155
  inputSchema: {
156
156
  type: 'object',
157
157
  properties: {