@modootoday/datalab-extension-mcp 1.8.17 → 1.8.19

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.en.md CHANGED
@@ -61,7 +61,7 @@ One command finds **every** AI app on your computer and connects them automatica
61
61
  2. **Paste this command and press Enter.** The saved command names an exact bootstrap version. At startup and while idle, the connector checks the canonical release and promotes itself to the current secure, compatible version. Diagnostic environments can opt out with `--no-self-update`.
62
62
 
63
63
  ```
64
- npx -y @modootoday/datalab-extension-mcp@1.8.17 install
64
+ npx -y @modootoday/datalab-extension-mcp@1.8.19 install
65
65
  ```
66
66
 
67
67
  Lines of English scrolling by is normal. This only downloads and runs the connector — it touches nothing else.
@@ -145,10 +145,10 @@ Registration is once per browser. The connection itself lives only while the sid
145
145
  Installing also places the bundled **writing skills**. An AI app reads the name and description of every installed skill on every start, so the more are installed the less room the conversation has. The default therefore places only the ones that work right away.
146
146
 
147
147
  ```
148
- npx -y @modootoday/datalab-extension-mcp@1.8.17 skills list
149
- npx -y @modootoday/datalab-extension-mcp@1.8.17 skills status
150
- npx -y @modootoday/datalab-extension-mcp@1.8.17 skills attach <name>
151
- npx -y @modootoday/datalab-extension-mcp@1.8.17 skills detach <name>
148
+ npx -y @modootoday/datalab-extension-mcp@1.8.19 skills list
149
+ npx -y @modootoday/datalab-extension-mcp@1.8.19 skills status
150
+ npx -y @modootoday/datalab-extension-mcp@1.8.19 skills attach <name>
151
+ npx -y @modootoday/datalab-extension-mcp@1.8.19 skills detach <name>
152
152
  ```
153
153
 
154
154
  - `list` shows everything in this version, name and description.
@@ -167,10 +167,10 @@ The **workbench** is this computer, where the connector runs. If you use more th
167
167
  Make the code in extension settings → **다른 AI 앱에 연결 (MCP)** → expand **[다른 브라우저 추가 (선택)]** (add another browser, optional) below box 3 → [등록 코드 만들기]. Or from the terminal.
168
168
 
169
169
  ```
170
- npx -y @modootoday/datalab-extension-mcp@1.8.17 browsers add "Work Chrome"
171
- npx -y @modootoday/datalab-extension-mcp@1.8.17 browsers list
172
- npx -y @modootoday/datalab-extension-mcp@1.8.17 browsers revoke <handle>
173
- npx -y @modootoday/datalab-extension-mcp@1.8.17 browsers repair
170
+ npx -y @modootoday/datalab-extension-mcp@1.8.19 browsers add "Work Chrome"
171
+ npx -y @modootoday/datalab-extension-mcp@1.8.19 browsers list
172
+ npx -y @modootoday/datalab-extension-mcp@1.8.19 browsers revoke <handle>
173
+ npx -y @modootoday/datalab-extension-mcp@1.8.19 browsers repair
174
174
  ```
175
175
 
176
176
  `add` **asks you to paste the install key** — the same value you used to
@@ -271,7 +271,7 @@ Start it again after a full quit and it picks the tools up. If they still aren't
271
271
  - **When the connection disappears** — run the very command you used at the start once more; it safely re-registers. (Some AI apps clean up their settings file and drop the connection.)
272
272
 
273
273
  ```
274
- npx -y @modootoday/datalab-extension-mcp@1.8.17 install
274
+ npx -y @modootoday/datalab-extension-mcp@1.8.19 install
275
275
  ```
276
276
 
277
277
  - **`'npx' is not recognized...`** — Node.js isn't installed. The "No Node.js?" one-liner in Step 2 is the simplest fix.
@@ -301,7 +301,7 @@ Start it again after a full quit and it picks the tools up. If they still aren't
301
301
  1. Run this in a terminal (it removes the entries registered in your AI apps).
302
302
 
303
303
  ```
304
- npx -y @modootoday/datalab-extension-mcp@1.8.17 uninstall
304
+ npx -y @modootoday/datalab-extension-mcp@1.8.19 uninstall
305
305
  ```
306
306
 
307
307
  2. Turn **MCP 연결** off in the extension settings. The panel is the bridge, so with it off a leftover config line can look nothing up.
package/README.md CHANGED
@@ -55,7 +55,7 @@ Claude 같은 AI 앱을 데이터랩툴즈에 연결해 주는 작은 무료 프
55
55
  2. **아래 명령을 붙여넣고 Enter를 눌러요.** 저장되는 명령은 정확한 시작 버전을 적습니다. 커넥터는 시작할 때와 유휴 상태에서 정본 릴리스를 확인해 현재의 안전하고 호환되는 버전으로 승격합니다. 진단 환경에서는 `--no-self-update`로 승격을 끌 수 있어요.
56
56
 
57
57
  ```
58
- npx -y @modootoday/datalab-extension-mcp@1.8.17 install
58
+ npx -y @modootoday/datalab-extension-mcp@1.8.19 install
59
59
  ```
60
60
 
61
61
  영어 글자가 여러 줄 올라오는 건 정상이에요. 이 명령은 커넥터를 내려받아 실행할 뿐, 다른 건 건드리지 않아요.
@@ -133,10 +133,10 @@ Claude 같은 AI 앱을 데이터랩툴즈에 연결해 주는 작은 무료 프
133
133
  설치할 때 **글쓰기 도움말(스킬)** 도 함께 놓입니다. AI 앱은 켜질 때마다 설치된 도움말의 이름과 설명을 전부 읽기 때문에, 많이 깔수록 대화에 쓸 자리가 줄어들어요. 그래서 기본은 **바로 쓸 수 있는 것만** 놓습니다.
134
134
 
135
135
  ```
136
- npx -y @modootoday/datalab-extension-mcp@1.8.17 skills list
137
- npx -y @modootoday/datalab-extension-mcp@1.8.17 skills status
138
- npx -y @modootoday/datalab-extension-mcp@1.8.17 skills attach <이름>
139
- npx -y @modootoday/datalab-extension-mcp@1.8.17 skills detach <이름>
136
+ npx -y @modootoday/datalab-extension-mcp@1.8.19 skills list
137
+ npx -y @modootoday/datalab-extension-mcp@1.8.19 skills status
138
+ npx -y @modootoday/datalab-extension-mcp@1.8.19 skills attach <이름>
139
+ npx -y @modootoday/datalab-extension-mcp@1.8.19 skills detach <이름>
140
140
  ```
141
141
 
142
142
  - `list` 는 이 버전에 들어 있는 전부를 이름과 설명으로 보여 줘요.
@@ -155,10 +155,10 @@ npx -y @modootoday/datalab-extension-mcp@1.8.17 skills detach <이름>
155
155
  확장 설정 → **다른 AI 앱에 연결 (MCP)** → 3번 아래의 **[다른 브라우저 추가 (선택)]** 를 펼쳐 [등록 코드 만들기]를 눌러도 되고, 터미널을 쓰셔도 돼요.
156
156
 
157
157
  ```
158
- npx -y @modootoday/datalab-extension-mcp@1.8.17 browsers add "회사 크롬"
159
- npx -y @modootoday/datalab-extension-mcp@1.8.17 browsers list
160
- npx -y @modootoday/datalab-extension-mcp@1.8.17 browsers revoke <handle>
161
- npx -y @modootoday/datalab-extension-mcp@1.8.17 browsers repair
158
+ npx -y @modootoday/datalab-extension-mcp@1.8.19 browsers add "회사 크롬"
159
+ npx -y @modootoday/datalab-extension-mcp@1.8.19 browsers list
160
+ npx -y @modootoday/datalab-extension-mcp@1.8.19 browsers revoke <handle>
161
+ npx -y @modootoday/datalab-extension-mcp@1.8.19 browsers repair
162
162
  ```
163
163
 
164
164
  `add` 를 실행하면 **설치 인증키를 붙여넣으라고 물어봐요** — 설치할 때와 같은 값이고, 설정 화면 1번의 `복사` 버튼으로 얻습니다. 그러면 브라우저 등록 코드가 **한 번만** 출력돼요. 커넥터는 그 코드를 저장하지 않고 지문만 남기므로 다시 보여 줄 수 없어요.
@@ -237,7 +237,7 @@ AI가 "그런 기능은 없다" 고 답하면, **"도구 목록을 확인해 보
237
237
  - **연결이 사라졌을 때** — 처음 실행했던 그 명령을 한 번 더 실행하면 안전하게 다시 등록돼요. (일부 AI 앱이 설정 파일을 정리하며 연결을 지우기도 해요.)
238
238
 
239
239
  ```
240
- npx -y @modootoday/datalab-extension-mcp@1.8.17 install
240
+ npx -y @modootoday/datalab-extension-mcp@1.8.19 install
241
241
  ```
242
242
 
243
243
  - **`'npx'을(는) 내부 또는 외부 명령...`** — Node.js가 없는 거예요. 위 2단계의 "Node.js가 없다면" 한 줄 설치가 가장 간단해요.
@@ -267,7 +267,7 @@ AI가 "그런 기능은 없다" 고 답하면, **"도구 목록을 확인해 보
267
267
  1. 터미널에서 아래 명령을 실행해요(AI 앱에 등록된 설정을 지워 줘요).
268
268
 
269
269
  ```
270
- npx -y @modootoday/datalab-extension-mcp@1.8.17 uninstall
270
+ npx -y @modootoday/datalab-extension-mcp@1.8.19 uninstall
271
271
  ```
272
272
 
273
273
  2. 확장 설정에서 **MCP 연결을 꺼요.** 패널이 브릿지라, 꺼 두면 어딘가 설정 줄이 남아 있어도 AI 앱이 아무것도 조회할 수 없어요.
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  DEFAULT_HOST,
3
3
  DEFAULT_PORT
4
- } from "./chunk-G34WU5WC.js";
4
+ } from "./chunk-JXUOFGZV.js";
5
5
  import {
6
6
  TOKEN_PROMPT_GUIDE,
7
7
  TOKEN_PROMPT_QUESTION,
@@ -18305,6 +18305,45 @@ function runDaemon(env, deps = {}) {
18305
18305
  return { http, lifecycle };
18306
18306
  }
18307
18307
 
18308
+ // ../mcp-server/dist/index.js
18309
+ import { spawnSync } from "child_process";
18310
+ function killPortOwnerCommand(platform, port) {
18311
+ const p = String(port);
18312
+ if (platform === "win32") {
18313
+ return {
18314
+ command: "powershell",
18315
+ args: [
18316
+ "-NoProfile",
18317
+ "-Command",
18318
+ `Get-NetTCPConnection -LocalPort ${p} -State Listen -ErrorAction SilentlyContinue | ForEach-Object { Stop-Process -Id $_.OwningProcess -Force -ErrorAction SilentlyContinue }`
18319
+ ],
18320
+ shell: true
18321
+ };
18322
+ }
18323
+ if (platform === "darwin" || platform === "linux") {
18324
+ return {
18325
+ command: "sh",
18326
+ args: [
18327
+ "-c",
18328
+ `pids=$(lsof -ti tcp:${p} -sTCP:LISTEN 2>/dev/null); if [ -n "$pids" ]; then kill -9 $pids; fi`
18329
+ ],
18330
+ shell: false
18331
+ };
18332
+ }
18333
+ return null;
18334
+ }
18335
+ function killPortOwner(port, platform = process.platform) {
18336
+ if (process.env["VITEST"] !== void 0) return false;
18337
+ const cmd = killPortOwnerCommand(platform, port);
18338
+ if (cmd === null) return false;
18339
+ try {
18340
+ spawnSync(cmd.command, cmd.args, { shell: cmd.shell, stdio: "ignore" });
18341
+ return true;
18342
+ } catch {
18343
+ return false;
18344
+ }
18345
+ }
18346
+
18308
18347
  export {
18309
18348
  mediaToolDescriptors,
18310
18349
  DEFAULT_PORT,
@@ -18312,5 +18351,6 @@ export {
18312
18351
  tryConnect,
18313
18352
  spawnDaemon,
18314
18353
  readTakeoverSecret,
18315
- runDaemon
18354
+ runDaemon,
18355
+ killPortOwner
18316
18356
  };
@@ -1,11 +1,12 @@
1
1
  import {
2
2
  DEFAULT_HOST,
3
3
  DEFAULT_PORT,
4
+ killPortOwner,
4
5
  mediaToolDescriptors,
5
6
  readTakeoverSecret,
6
7
  spawnDaemon,
7
8
  tryConnect
8
- } from "./chunk-G34WU5WC.js";
9
+ } from "./chunk-JXUOFGZV.js";
9
10
  import {
10
11
  __export
11
12
  } from "./chunk-MLKGABMK.js";
@@ -15632,6 +15633,18 @@ async function ensureDaemonRunning(deps = {}) {
15632
15633
  const shutdown = deps.shutdown ?? defaultShutdown;
15633
15634
  const checkAuthority = deps.checkAuthority ?? defaultCheckAuthority;
15634
15635
  const readTakeover = deps.readTakeover ?? (() => readTakeoverSecret());
15636
+ const killOwner = deps.killOwner ?? ((p) => killPortOwner(p));
15637
+ const shutdownWithTakeover = async () => {
15638
+ const secret = readTakeover();
15639
+ return secret !== null && await shutdown(base, secret);
15640
+ };
15641
+ const seizePort = async () => {
15642
+ if (!killOwner(port)) return false;
15643
+ log(`ending the connector that holds port ${String(port)}`);
15644
+ await waitForPortRelease();
15645
+ await spawnAndWait();
15646
+ return true;
15647
+ };
15635
15648
  const waitForPortRelease = async () => {
15636
15649
  for (let i = 0; i < attempts; i += 1) {
15637
15650
  const socket = await connect(host, port, PROBE_TIMEOUT_MS);
@@ -15669,22 +15682,23 @@ async function ensureDaemonRunning(deps = {}) {
15669
15682
  }
15670
15683
  if (!isOlderVersion(running, selfVersion)) {
15671
15684
  if (await checkAuthority(base, token)) return;
15672
- const secret = readTakeover();
15673
- if (secret !== null && await shutdown(base, secret)) {
15685
+ if (await shutdownWithTakeover()) {
15674
15686
  log("retiring the connector that holds this port with a different token");
15675
15687
  await waitForPortRelease();
15676
15688
  await spawnAndWait();
15677
15689
  return;
15678
15690
  }
15691
+ if (await seizePort()) return;
15679
15692
  throw new Error(
15680
15693
  `connector authority conflict on port ${String(port)}; a connector started with a different DataLab workbench token holds it. Quit every AI app so it idles out (about 5 minutes at zero connections), then start this one again.`
15681
15694
  );
15682
15695
  }
15683
15696
  log(`updating the connector: replacing ${running} with ${selfVersion}`);
15684
- const accepted = await shutdown(base, token);
15697
+ const accepted = await shutdown(base, token) || await shutdownWithTakeover();
15698
+ if (!accepted && await seizePort()) return;
15685
15699
  if (!accepted) {
15686
15700
  log(
15687
- "the running connector is too old to update automatically; restart it (or wait for it to idle out) to pick up the new version"
15701
+ "the running connector did not step aside; restart it (or wait for it to idle out) to pick up the new version"
15688
15702
  );
15689
15703
  throw new Error(
15690
15704
  `connector authority conflict on port ${String(port)}; the running connector did not accept this workbench token`
package/dist/cli.js CHANGED
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  dispatchCli,
4
4
  runAdapter
5
- } from "./chunk-2XHQ7OBB.js";
5
+ } from "./chunk-TCZGM3UG.js";
6
6
  import {
7
7
  runDaemon
8
- } from "./chunk-G34WU5WC.js";
8
+ } from "./chunk-JXUOFGZV.js";
9
9
  import "./chunk-MLKGABMK.js";
10
10
 
11
11
  // src/cli.ts
@@ -62,7 +62,7 @@ async function main() {
62
62
  // Loaded lazily, like the installer: the adapter path is what an MCP host
63
63
  // spawns and must not pay for a command only an operator types.
64
64
  browsers: async (argv) => {
65
- const { runBrowsers } = await import("./browsers-WK72EBEK.js");
65
+ const { runBrowsers } = await import("./browsers-BHLHYKKD.js");
66
66
  const { createNodeIo } = await import("./dist-3PKDQQAT.js");
67
67
  const io = createNodeIo();
68
68
  const code = await runBrowsers(argv, {
package/dist/index.d.ts CHANGED
@@ -55,6 +55,11 @@ interface EnsureRunningDeps {
55
55
  * defaults to the real file.
56
56
  */
57
57
  readTakeover?: () => string | null;
58
+ /**
59
+ * Ends the process holding the port. Injected in tests; defaults to the real
60
+ * one. Never reached before the holder is confirmed to be our connector.
61
+ */
62
+ killOwner?: (port: number) => boolean;
58
63
  /**
59
64
  * This adapter's own version. When set, a running daemon older than this is
60
65
  * replaced; one at this version or newer is left alone, so an older adapter
package/dist/index.js CHANGED
@@ -3,8 +3,8 @@ import {
3
3
  dispatchCli,
4
4
  ensureDaemonRunning,
5
5
  runAdapter
6
- } from "./chunk-2XHQ7OBB.js";
7
- import "./chunk-G34WU5WC.js";
6
+ } from "./chunk-TCZGM3UG.js";
7
+ import "./chunk-JXUOFGZV.js";
8
8
  import "./chunk-MLKGABMK.js";
9
9
  export {
10
10
  createAdapterServer,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modootoday/datalab-extension-mcp",
3
- "version": "1.8.17",
3
+ "version": "1.8.19",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",