@modootoday/datalab-extension-mcp 1.5.0 → 1.5.1
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 +4 -4
- package/README.md +4 -4
- package/dist/{chunk-INQCEZGY.js → chunk-XSYBSML4.js} +150 -27
- package/dist/cli.js +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/README.en.md
CHANGED
|
@@ -55,10 +55,10 @@ Avoid sharing a screenshot or the copied setup. If it may have leaked, press **[
|
|
|
55
55
|
One command finds **every** AI app on your computer and connects them automatically. Nothing to do per app.
|
|
56
56
|
|
|
57
57
|
1. **Open a terminal** — on Windows type `cmd` in the search box → "Command Prompt"; on Mac press `⌘+Space` and type `Terminal`; on Linux open your terminal app (often `Ctrl+Alt+T`).
|
|
58
|
-
2. **Paste this command and press Enter.** (`@1.5.
|
|
58
|
+
2. **Paste this command and press Enter.** (`@1.5.1` is the pinned version, so the connector never changes behind your back.)
|
|
59
59
|
|
|
60
60
|
```
|
|
61
|
-
npx -y @modootoday/datalab-extension-mcp@1.5.
|
|
61
|
+
npx -y @modootoday/datalab-extension-mcp@1.5.1 install
|
|
62
62
|
```
|
|
63
63
|
|
|
64
64
|
Lines of English scrolling by is normal. This only downloads and runs the connector — it touches nothing else.
|
|
@@ -206,7 +206,7 @@ Start it again after a full quit and it picks the tools up. If they still aren't
|
|
|
206
206
|
- **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.)
|
|
207
207
|
|
|
208
208
|
```
|
|
209
|
-
npx -y @modootoday/datalab-extension-mcp@1.5.
|
|
209
|
+
npx -y @modootoday/datalab-extension-mcp@1.5.1 install
|
|
210
210
|
```
|
|
211
211
|
|
|
212
212
|
- **`'npx' is not recognized...`** — Node.js isn't installed. The "No Node.js?" one-liner in Step 2 is the simplest fix.
|
|
@@ -236,7 +236,7 @@ Start it again after a full quit and it picks the tools up. If they still aren't
|
|
|
236
236
|
1. Run this in a terminal (it removes the entries registered in your AI apps).
|
|
237
237
|
|
|
238
238
|
```
|
|
239
|
-
npx -y @modootoday/datalab-extension-mcp@1.5.
|
|
239
|
+
npx -y @modootoday/datalab-extension-mcp@1.5.1 uninstall
|
|
240
240
|
```
|
|
241
241
|
|
|
242
242
|
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
|
@@ -49,10 +49,10 @@ Claude 같은 AI 앱을 데이터랩툴즈에 연결해 주는 작은 무료 프
|
|
|
49
49
|
명령 한 줄이면 컴퓨터에 있는 AI 앱을 **모두 자동으로** 찾아 연결해 줘요. 앱마다 따로 할 일은 없어요.
|
|
50
50
|
|
|
51
51
|
1. **터미널을 열어요** — Windows는 검색창에 `cmd` → "명령 프롬프트", Mac은 `⌘+스페이스`로 `터미널`, Linux는 터미널 앱(보통 `Ctrl+Alt+T`)이에요.
|
|
52
|
-
2. **아래 명령을 붙여넣고 Enter를 눌러요.** (`@1.5.
|
|
52
|
+
2. **아래 명령을 붙여넣고 Enter를 눌러요.** (`@1.5.1`은 커넥터가 나도 모르게 바뀌지 않도록 고정한 버전이에요.)
|
|
53
53
|
|
|
54
54
|
```
|
|
55
|
-
npx -y @modootoday/datalab-extension-mcp@1.5.
|
|
55
|
+
npx -y @modootoday/datalab-extension-mcp@1.5.1 install
|
|
56
56
|
```
|
|
57
57
|
|
|
58
58
|
영어 글자가 여러 줄 올라오는 건 정상이에요. 이 명령은 커넥터를 내려받아 실행할 뿐, 다른 건 건드리지 않아요.
|
|
@@ -180,7 +180,7 @@ AI가 "그런 기능은 없다" 고 답하면, **"도구 목록을 확인해 보
|
|
|
180
180
|
- **연결이 사라졌을 때** — 처음 실행했던 그 명령을 한 번 더 실행하면 안전하게 다시 등록돼요. (일부 AI 앱이 설정 파일을 정리하며 연결을 지우기도 해요.)
|
|
181
181
|
|
|
182
182
|
```
|
|
183
|
-
npx -y @modootoday/datalab-extension-mcp@1.5.
|
|
183
|
+
npx -y @modootoday/datalab-extension-mcp@1.5.1 install
|
|
184
184
|
```
|
|
185
185
|
|
|
186
186
|
- **`'npx'을(는) 내부 또는 외부 명령...`** — Node.js가 없는 거예요. 위 2단계의 "Node.js가 없다면" 한 줄 설치가 가장 간단해요.
|
|
@@ -210,7 +210,7 @@ AI가 "그런 기능은 없다" 고 답하면, **"도구 목록을 확인해 보
|
|
|
210
210
|
1. 터미널에서 아래 명령을 실행해요(AI 앱에 등록된 설정을 지워 줘요).
|
|
211
211
|
|
|
212
212
|
```
|
|
213
|
-
npx -y @modootoday/datalab-extension-mcp@1.5.
|
|
213
|
+
npx -y @modootoday/datalab-extension-mcp@1.5.1 uninstall
|
|
214
214
|
```
|
|
215
215
|
|
|
216
216
|
2. 확장 설정에서 **MCP 연결을 꺼요.** 패널이 브릿지라, 꺼 두면 어딘가 설정 줄이 남아 있어도 AI 앱이 아무것도 조회할 수 없어요.
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
__export
|
|
3
3
|
} from "./chunk-MLKGABMK.js";
|
|
4
4
|
|
|
5
|
-
// ../mcp-server/dist/chunk-
|
|
5
|
+
// ../mcp-server/dist/chunk-TPEUGB2T.js
|
|
6
6
|
import {
|
|
7
7
|
createServer
|
|
8
8
|
} from "http";
|
|
@@ -14612,6 +14612,24 @@ var READ_ONLY_TOOLS = [
|
|
|
14612
14612
|
"ad_keyword_stats",
|
|
14613
14613
|
"ad_min_exposure_bid",
|
|
14614
14614
|
"ad_performance_balance",
|
|
14615
|
+
// 🔴 These three read the advertiser's own account rather than pricing a
|
|
14616
|
+
// hypothetical bid — balance, spend, and per-campaign/keyword delivery.
|
|
14617
|
+
// Read-only by
|
|
14618
|
+
// construction: the client exposes no charge, refund or campaign-write path,
|
|
14619
|
+
// and asks for no gender/age breakdown even though /api/stats offers one.
|
|
14620
|
+
"ad_bizmoney",
|
|
14621
|
+
"ad_campaign_stats",
|
|
14622
|
+
"ad_keyword_spend",
|
|
14623
|
+
// --- The seller's own SmartStore money, via the official Commerce API and
|
|
14624
|
+
// the user's own application pair. Read-only by construction: the service
|
|
14625
|
+
// exposes settlement and sales reads and nothing else, and 🔴 it drops the
|
|
14626
|
+
// payout account (accountNo / depositorName / bankType) that the settlement
|
|
14627
|
+
// response carries, so no host ever receives it. ---
|
|
14628
|
+
"commerce_settlement",
|
|
14629
|
+
"commerce_sales",
|
|
14630
|
+
// 🔴 Counts only — the order feed's ids stop at the service boundary.
|
|
14631
|
+
"commerce_orders",
|
|
14632
|
+
"commerce_product_issues",
|
|
14615
14633
|
// --- Aggregate comment analytics ---
|
|
14616
14634
|
"comment_category_spread",
|
|
14617
14635
|
"comment_country",
|
|
@@ -14757,6 +14775,13 @@ var READ_ONLY_TOOLS = [
|
|
|
14757
14775
|
"benchmark_gap",
|
|
14758
14776
|
"content_calendar",
|
|
14759
14777
|
"internal_links",
|
|
14778
|
+
// Hands back the procedure for one step of a full write, shaped by what the
|
|
14779
|
+
// caller measured in the step before. Reads nothing and calls no model.
|
|
14780
|
+
"write_pipeline_step",
|
|
14781
|
+
// 🔴 Writes the title in the panel, where a pick IS the confirmation — but the
|
|
14782
|
+
// pick lives in the consent step, and MCP never reaches it: only a
|
|
14783
|
+
// needs-confirm result continues there, and this one returns prompt material.
|
|
14784
|
+
"title_optimize",
|
|
14760
14785
|
// --- Grouped with the writing tools, but a pure collector. ---
|
|
14761
14786
|
// Calls no model itself — it only gathers public data. Admitted after
|
|
14762
14787
|
// checking behaviour rather than trusting the category label.
|
|
@@ -14829,6 +14854,11 @@ var TOOL_TIERS = Object.freeze({
|
|
|
14829
14854
|
// 🔴 Only whole-body replacement is destructive: the others append, so the
|
|
14830
14855
|
// autosave point still holds, while replacing the body overwrites it.
|
|
14831
14856
|
editor_insert_draft: "write",
|
|
14857
|
+
// 🔴 `write`, and it stays that way because it REFUSES an occupied body rather
|
|
14858
|
+
// than overwriting it. The day it gains a replace fallback, a destructive act
|
|
14859
|
+
// hides under a session toggle the user granted once — so that fallback is a
|
|
14860
|
+
// review-block, not a convenience.
|
|
14861
|
+
editor_place_draft: "write",
|
|
14832
14862
|
// Opening a window edits no document, but it does create a tab in the user's
|
|
14833
14863
|
// browser, and a session that has not enabled editing can do nothing with the
|
|
14834
14864
|
// window anyway — one tier keeps it one thing for the user to allow.
|
|
@@ -14840,9 +14870,6 @@ var TOOL_TIERS = Object.freeze({
|
|
|
14840
14870
|
// tier is the only barrier, and the user approves each image's source.
|
|
14841
14871
|
editor_insert_image: "destructive",
|
|
14842
14872
|
editor_set_title: "write",
|
|
14843
|
-
// 🔴 Not an editor tool, but tiered like one: picking a title candidate IS
|
|
14844
|
-
// the confirmation and overwrites the title, so it matches editor_set_title.
|
|
14845
|
-
title_optimize: "write",
|
|
14846
14873
|
editor_undo: "write",
|
|
14847
14874
|
editor_replace: "destructive"
|
|
14848
14875
|
});
|
|
@@ -15019,7 +15046,10 @@ var RESEARCH = [
|
|
|
15019
15046
|
"seo_aeo_geo_spec",
|
|
15020
15047
|
"content_calendar",
|
|
15021
15048
|
// The last step of that job: turn the design into an actual draft.
|
|
15022
|
-
"write_draft"
|
|
15049
|
+
"write_draft",
|
|
15050
|
+
// Names which of the above comes next given what the caller just measured —
|
|
15051
|
+
// the part of the job that cannot be written down ahead of time.
|
|
15052
|
+
"write_pipeline_step"
|
|
15023
15053
|
];
|
|
15024
15054
|
var EDITOR_CONTROL = [
|
|
15025
15055
|
// 🔴 The tool that opens a tab belongs in the group that requires one: a
|
|
@@ -15032,9 +15062,12 @@ var EDITOR_CONTROL = [
|
|
|
15032
15062
|
"editor_undo",
|
|
15033
15063
|
"editor_replace",
|
|
15034
15064
|
"editor_insert_draft",
|
|
15065
|
+
// Lands a draft from any window state without ever overwriting — refuses and
|
|
15066
|
+
// names the tool to use instead when the body is occupied.
|
|
15067
|
+
"editor_place_draft",
|
|
15035
15068
|
"editor_set_title",
|
|
15036
|
-
// Both act on the open draft: title_optimize
|
|
15037
|
-
//
|
|
15069
|
+
// Both act on the open draft: title_optimize proposes titles for it, and
|
|
15070
|
+
// internal_links reads it.
|
|
15038
15071
|
"title_optimize",
|
|
15039
15072
|
"internal_links",
|
|
15040
15073
|
"editor_insert_image",
|
|
@@ -15046,6 +15079,7 @@ var BY_PREFIX = [
|
|
|
15046
15079
|
{ slug: "place", prefixes: ["place_"] },
|
|
15047
15080
|
{ slug: "shopping", prefixes: ["shopping_"] },
|
|
15048
15081
|
{ slug: "ad-bidding", prefixes: ["ad_"] },
|
|
15082
|
+
{ slug: "store-settlement", prefixes: ["commerce_"] },
|
|
15049
15083
|
{ slug: "comment-stats", prefixes: ["comment_"] },
|
|
15050
15084
|
{ slug: "photo-editor", prefixes: ["photo_"] },
|
|
15051
15085
|
{ slug: "video-editor", prefixes: ["video_"] },
|
|
@@ -15076,7 +15110,12 @@ var META = [
|
|
|
15076
15110
|
{
|
|
15077
15111
|
slug: "keyword-research",
|
|
15078
15112
|
label: "\uD0A4\uC6CC\uB4DC\xB7\uAE00\uAC10 \uB9AC\uC11C\uCE58",
|
|
15079
|
-
summary: "\uBB34\uC5C7\uC744 \uC4F8\uC9C0 \u2014 \uD0A4\uC6CC\uB4DC \uC218\uC694\xB7\uC5F0\uAD00\uC5B4\xB7\uC790\uB3D9\uC644\uC131\xB7\uBC1C\uD589\uB7C9\xB7\uC9C0\uC2DDiN \uC9C8\uBB38\xB7\uC9C0\uC5ED \uD2B8\uB80C\uB4DC"
|
|
15113
|
+
summary: "\uBB34\uC5C7\uC744 \uC4F8\uC9C0 \u2014 \uD0A4\uC6CC\uB4DC \uC218\uC694\xB7\uC5F0\uAD00\uC5B4\xB7\uC790\uB3D9\uC644\uC131\xB7\uBC1C\uD589\uB7C9\xB7\uC9C0\uC2DDiN \uC9C8\uBB38\xB7\uC9C0\uC5ED \uD2B8\uB80C\uB4DC",
|
|
15114
|
+
steps: [
|
|
15115
|
+
"search_keywords \uB85C \uC218\uC694\uB97C \uBCF8\uB2E4",
|
|
15116
|
+
"content_volume \uC73C\uB85C \uC774\uBBF8 \uC5BC\uB9C8\uB098 \uC4F0\uC600\uB294\uC9C0 \uBCF8\uB2E4 \u2014 \uC218\uC694\uB9CC \uBCF4\uACE0 \uACE0\uB974\uBA74 \uD3EC\uD654\uB41C \uD0A4\uC6CC\uB4DC\uB97C \uACE0\uB978\uB2E4",
|
|
15117
|
+
"keyword_opportunity \uB85C \uB458\uC744 \uACAC\uC918 \uBE48\uD2C8\uC744 \uCC3E\uB294\uB2E4"
|
|
15118
|
+
]
|
|
15080
15119
|
},
|
|
15081
15120
|
{
|
|
15082
15121
|
slug: "serp-watch",
|
|
@@ -15105,6 +15144,13 @@ var META = [
|
|
|
15105
15144
|
// data only when the user's search-ad account credentials are present.
|
|
15106
15145
|
summary: "\uC785\uCC30\uAC00\uC640 \uC608\uC0C1 \uC131\uACFC \u2014 \uBB34\uB8CC, \uAC80\uC0C9\uAD11\uACE0 \uACC4\uC815 \uC790\uACA9\uC99D\uBA85 \uD544\uC694"
|
|
15107
15146
|
},
|
|
15147
|
+
{
|
|
15148
|
+
slug: "store-settlement",
|
|
15149
|
+
label: "\uC2A4\uD1A0\uC5B4 \uC815\uC0B0\xB7\uB9E4\uCD9C",
|
|
15150
|
+
// The seller's own money. Nothing here writes, and the payout account the
|
|
15151
|
+
// settlement response carries is dropped before it reaches a host.
|
|
15152
|
+
summary: "\uC815\uC0B0 \uC608\uC815\uC77C\uACFC \uAE08\uC561, \uC77C\uBCC4 \uB9E4\uCD9C \u2014 \uCEE4\uBA38\uC2A4API \uC790\uACA9\uC99D\uBA85 \uD544\uC694"
|
|
15153
|
+
},
|
|
15108
15154
|
{
|
|
15109
15155
|
slug: "comment-stats",
|
|
15110
15156
|
label: "\uB313\uAE00 \uBC18\uC751 \uD1B5\uACC4",
|
|
@@ -15116,7 +15162,13 @@ var META = [
|
|
|
15116
15162
|
summary: "\uC5F4\uB824 \uC788\uB294 \uB124\uC774\uBC84 \uAE00\uC4F0\uAE30 \uCC3D\uC758 \uC6D0\uACE0\uB97C \uC77D\uACE0 \uACE0\uCE5C\uB2E4",
|
|
15117
15163
|
needsTab: true,
|
|
15118
15164
|
openerTool: "editor_open_window",
|
|
15119
|
-
reducerTool: "editor_reduce_windows"
|
|
15165
|
+
reducerTool: "editor_reduce_windows",
|
|
15166
|
+
steps: [
|
|
15167
|
+
"editor_read \uB85C \uC9C0\uAE08 \uAE00\uC5D0 \uBB34\uC5C7\uC774 \uC788\uB294\uC9C0 \uBA3C\uC800 \uD655\uC778\uD55C\uB2E4 \u2014 \uBE48 \uC904 \uC54C\uACE0 \uB36E\uC5B4\uC4F0\uB294 \uAC83\uC774 \uAC00\uC7A5 \uD754\uD55C \uC0AC\uACE0\uB2E4",
|
|
15168
|
+
"\uACE0\uCE60 \uB0B4\uC6A9\uC744 \uB9CC\uB4E0\uB2E4",
|
|
15169
|
+
"editor_place_draft \uB85C \uB123\uB294\uB2E4. \uC774\uBBF8 \uB0B4\uC6A9\uC774 \uC788\uC73C\uBA74 \uC9C0\uC6B0\uC9C0 \uC54A\uACE0 \uAC70\uC808\uD558\uBA70 \uB2E4\uC74C \uB3C4\uAD6C\uB97C \uC54C\uB824 \uC900\uB2E4",
|
|
15170
|
+
"\uC804\uCCB4\uB97C \uAC08\uC544\uC5CE\uC5B4\uC57C \uD560 \uB54C\uB9CC, \uC0AC\uC6A9\uC790\uC5D0\uAC8C \uBB3C\uC5B4\uBCF8 \uB4A4 editor_replace \uB97C \uC4F4\uB2E4"
|
|
15171
|
+
]
|
|
15120
15172
|
},
|
|
15121
15173
|
{
|
|
15122
15174
|
slug: "photo-editor",
|
|
@@ -15135,7 +15187,11 @@ var META = [
|
|
|
15135
15187
|
{
|
|
15136
15188
|
slug: "gallery",
|
|
15137
15189
|
label: "\uC774\uBBF8\uC9C0 \uAC24\uB7EC\uB9AC",
|
|
15138
|
-
summary: "\uB0B4\uAC00 \uB9CC\uB4E0 \uC0AC\uC9C4 \uD30C\uC77C\uC744 \uAC24\uB7EC\uB9AC\uC5D0 \uB123\uC5B4 \uB450 \uD3B8\uC9D1\uAE30\uC5D0\uC11C \uC4F4\uB2E4 \u2014 \uD3B8\uC9D1\uAE30 \uCC3D\uC774 \uC5C6\uC5B4\uB3C4 \uB41C\uB2E4"
|
|
15190
|
+
summary: "\uB0B4\uAC00 \uB9CC\uB4E0 \uC0AC\uC9C4 \uD30C\uC77C\uC744 \uAC24\uB7EC\uB9AC\uC5D0 \uB123\uC5B4 \uB450 \uD3B8\uC9D1\uAE30\uC5D0\uC11C \uC4F4\uB2E4 \u2014 \uD3B8\uC9D1\uAE30 \uCC3D\uC774 \uC5C6\uC5B4\uB3C4 \uB41C\uB2E4",
|
|
15191
|
+
steps: [
|
|
15192
|
+
"gallery_image_add \uB85C \uAC24\uB7EC\uB9AC\uC5D0 \uBA3C\uC800 \uB123\uB294\uB2E4",
|
|
15193
|
+
"\uD3B8\uC9D1\uAE30 \uCABD \uB3C4\uAD6C\uB85C \uADF8 ref \uB97C \uAC00\uC838\uB2E4 \uC4F4\uB2E4 \u2014 \uAC24\uB7EC\uB9AC\uB97C \uAC70\uCE58\uBA74 \uD3B8\uC9D1\uAE30 \uCC3D\uC774 \uC5C6\uC5B4\uB3C4 \uBBF8\uB9AC \uC900\uBE44\uD560 \uC218 \uC788\uB2E4"
|
|
15194
|
+
]
|
|
15139
15195
|
}
|
|
15140
15196
|
];
|
|
15141
15197
|
var FALLBACK_SLUG = "other";
|
|
@@ -31106,6 +31162,24 @@ var READ_ONLY_TOOLS2 = [
|
|
|
31106
31162
|
"ad_keyword_stats",
|
|
31107
31163
|
"ad_min_exposure_bid",
|
|
31108
31164
|
"ad_performance_balance",
|
|
31165
|
+
// 🔴 These three read the advertiser's own account rather than pricing a
|
|
31166
|
+
// hypothetical bid — balance, spend, and per-campaign/keyword delivery.
|
|
31167
|
+
// Read-only by
|
|
31168
|
+
// construction: the client exposes no charge, refund or campaign-write path,
|
|
31169
|
+
// and asks for no gender/age breakdown even though /api/stats offers one.
|
|
31170
|
+
"ad_bizmoney",
|
|
31171
|
+
"ad_campaign_stats",
|
|
31172
|
+
"ad_keyword_spend",
|
|
31173
|
+
// --- The seller's own SmartStore money, via the official Commerce API and
|
|
31174
|
+
// the user's own application pair. Read-only by construction: the service
|
|
31175
|
+
// exposes settlement and sales reads and nothing else, and 🔴 it drops the
|
|
31176
|
+
// payout account (accountNo / depositorName / bankType) that the settlement
|
|
31177
|
+
// response carries, so no host ever receives it. ---
|
|
31178
|
+
"commerce_settlement",
|
|
31179
|
+
"commerce_sales",
|
|
31180
|
+
// 🔴 Counts only — the order feed's ids stop at the service boundary.
|
|
31181
|
+
"commerce_orders",
|
|
31182
|
+
"commerce_product_issues",
|
|
31109
31183
|
// --- Aggregate comment analytics ---
|
|
31110
31184
|
"comment_category_spread",
|
|
31111
31185
|
"comment_country",
|
|
@@ -31251,6 +31325,13 @@ var READ_ONLY_TOOLS2 = [
|
|
|
31251
31325
|
"benchmark_gap",
|
|
31252
31326
|
"content_calendar",
|
|
31253
31327
|
"internal_links",
|
|
31328
|
+
// Hands back the procedure for one step of a full write, shaped by what the
|
|
31329
|
+
// caller measured in the step before. Reads nothing and calls no model.
|
|
31330
|
+
"write_pipeline_step",
|
|
31331
|
+
// 🔴 Writes the title in the panel, where a pick IS the confirmation — but the
|
|
31332
|
+
// pick lives in the consent step, and MCP never reaches it: only a
|
|
31333
|
+
// needs-confirm result continues there, and this one returns prompt material.
|
|
31334
|
+
"title_optimize",
|
|
31254
31335
|
// --- Grouped with the writing tools, but a pure collector. ---
|
|
31255
31336
|
// Calls no model itself — it only gathers public data. Admitted after
|
|
31256
31337
|
// checking behaviour rather than trusting the category label.
|
|
@@ -31323,6 +31404,11 @@ var TOOL_TIERS2 = Object.freeze({
|
|
|
31323
31404
|
// 🔴 Only whole-body replacement is destructive: the others append, so the
|
|
31324
31405
|
// autosave point still holds, while replacing the body overwrites it.
|
|
31325
31406
|
editor_insert_draft: "write",
|
|
31407
|
+
// 🔴 `write`, and it stays that way because it REFUSES an occupied body rather
|
|
31408
|
+
// than overwriting it. The day it gains a replace fallback, a destructive act
|
|
31409
|
+
// hides under a session toggle the user granted once — so that fallback is a
|
|
31410
|
+
// review-block, not a convenience.
|
|
31411
|
+
editor_place_draft: "write",
|
|
31326
31412
|
// Opening a window edits no document, but it does create a tab in the user's
|
|
31327
31413
|
// browser, and a session that has not enabled editing can do nothing with the
|
|
31328
31414
|
// window anyway — one tier keeps it one thing for the user to allow.
|
|
@@ -31334,9 +31420,6 @@ var TOOL_TIERS2 = Object.freeze({
|
|
|
31334
31420
|
// tier is the only barrier, and the user approves each image's source.
|
|
31335
31421
|
editor_insert_image: "destructive",
|
|
31336
31422
|
editor_set_title: "write",
|
|
31337
|
-
// 🔴 Not an editor tool, but tiered like one: picking a title candidate IS
|
|
31338
|
-
// the confirmation and overwrites the title, so it matches editor_set_title.
|
|
31339
|
-
title_optimize: "write",
|
|
31340
31423
|
editor_undo: "write",
|
|
31341
31424
|
editor_replace: "destructive"
|
|
31342
31425
|
});
|
|
@@ -31608,6 +31691,7 @@ function createAdapterServer(deps = {}) {
|
|
|
31608
31691
|
const fetchImpl = deps.fetchImpl ?? globalThis.fetch;
|
|
31609
31692
|
const log = deps.log ?? defaultLog;
|
|
31610
31693
|
const mcpUrl = `http://${host}:${port}/mcp`;
|
|
31694
|
+
const revive = deps.revive ?? ensureDaemonRunning;
|
|
31611
31695
|
const server = new Server(
|
|
31612
31696
|
{ name: deps.name ?? NAME2, version: deps.version ?? "0.0.0" },
|
|
31613
31697
|
// Declares that we send list-changed notifications: the daemon signals us
|
|
@@ -31656,20 +31740,45 @@ function createAdapterServer(deps = {}) {
|
|
|
31656
31740
|
name,
|
|
31657
31741
|
arguments: args ?? {}
|
|
31658
31742
|
});
|
|
31659
|
-
} catch (
|
|
31660
|
-
|
|
31661
|
-
|
|
31662
|
-
|
|
31663
|
-
|
|
31664
|
-
|
|
31665
|
-
|
|
31666
|
-
isTimeout(err) ? "connector_stuck" : "not_connected"
|
|
31667
|
-
)
|
|
31668
|
-
}
|
|
31669
|
-
],
|
|
31670
|
-
isError: true
|
|
31671
|
-
};
|
|
31743
|
+
} catch (first) {
|
|
31744
|
+
if (isTimeout(first)) return failedCall(first);
|
|
31745
|
+
try {
|
|
31746
|
+
resp = await reviveAndRetry(name, args);
|
|
31747
|
+
} catch (second) {
|
|
31748
|
+
return failedCall(second);
|
|
31749
|
+
}
|
|
31672
31750
|
}
|
|
31751
|
+
return shapeCallResult(name, resp);
|
|
31752
|
+
}
|
|
31753
|
+
async function reviveAndRetry(name, args) {
|
|
31754
|
+
log(`tools/call found no connector; restarting it and retrying ${name}`);
|
|
31755
|
+
await revive({
|
|
31756
|
+
host: deps.host,
|
|
31757
|
+
port: deps.port,
|
|
31758
|
+
log,
|
|
31759
|
+
selfVersion: deps.version
|
|
31760
|
+
});
|
|
31761
|
+
return postMcp(fetchImpl, mcpUrl, "tools/call", {
|
|
31762
|
+
name,
|
|
31763
|
+
arguments: args ?? {}
|
|
31764
|
+
});
|
|
31765
|
+
}
|
|
31766
|
+
function failedCall(err) {
|
|
31767
|
+
log(`tools/call transport failure: ${describeError(err)}`);
|
|
31768
|
+
return {
|
|
31769
|
+
content: [
|
|
31770
|
+
{
|
|
31771
|
+
type: "text",
|
|
31772
|
+
text: agentActionableMessage2(
|
|
31773
|
+
isTimeout(err) ? "connector_stuck" : "not_connected"
|
|
31774
|
+
)
|
|
31775
|
+
}
|
|
31776
|
+
],
|
|
31777
|
+
isError: true
|
|
31778
|
+
};
|
|
31779
|
+
}
|
|
31780
|
+
function shapeCallResult(name, resp) {
|
|
31781
|
+
void name;
|
|
31673
31782
|
if (resp.error) {
|
|
31674
31783
|
throw new McpError(
|
|
31675
31784
|
ErrorCode.InternalError,
|
|
@@ -31700,13 +31809,16 @@ var defaultSubscribe = async (url3, onEvent, signal) => {
|
|
|
31700
31809
|
};
|
|
31701
31810
|
var TOOLCHANGE_BACKOFF_BASE_MS = 250;
|
|
31702
31811
|
var TOOLCHANGE_BACKOFF_CAP_MS = 5e3;
|
|
31812
|
+
var TOOLCHANGE_REVIVE_AFTER_FAILURES = 3;
|
|
31703
31813
|
async function pushToolChanges(deps) {
|
|
31704
31814
|
const subscribe = deps.subscribe ?? defaultSubscribe;
|
|
31705
31815
|
const sleep = deps.sleep ?? realSleep;
|
|
31706
31816
|
const rng = deps.rng ?? Math.random;
|
|
31707
31817
|
const now = deps.now ?? Date.now;
|
|
31708
31818
|
const url3 = `${deps.mcpUrl.replace(/\/mcp$/, "")}/mcp/notifications`;
|
|
31819
|
+
const revive = deps.revive ?? ensureDaemonRunning;
|
|
31709
31820
|
let prev = TOOLCHANGE_BACKOFF_BASE_MS;
|
|
31821
|
+
let failures = 0;
|
|
31710
31822
|
while (!deps.signal.aborted) {
|
|
31711
31823
|
const startedAt = now();
|
|
31712
31824
|
try {
|
|
@@ -31724,8 +31836,19 @@ async function pushToolChanges(deps) {
|
|
|
31724
31836
|
} catch {
|
|
31725
31837
|
}
|
|
31726
31838
|
if (deps.signal.aborted) return;
|
|
31727
|
-
|
|
31839
|
+
const held = now() - startedAt >= TOOLCHANGE_BACKOFF_BASE_MS;
|
|
31840
|
+
if (held) {
|
|
31728
31841
|
prev = TOOLCHANGE_BACKOFF_BASE_MS;
|
|
31842
|
+
failures = 0;
|
|
31843
|
+
} else {
|
|
31844
|
+
failures += 1;
|
|
31845
|
+
}
|
|
31846
|
+
if (failures >= TOOLCHANGE_REVIVE_AFTER_FAILURES) {
|
|
31847
|
+
failures = 0;
|
|
31848
|
+
try {
|
|
31849
|
+
await revive({ log: deps.log, selfVersion: deps.selfVersion });
|
|
31850
|
+
} catch {
|
|
31851
|
+
}
|
|
31729
31852
|
}
|
|
31730
31853
|
const upper = Math.min(TOOLCHANGE_BACKOFF_CAP_MS, prev * 3);
|
|
31731
31854
|
const wait = Math.round(
|
package/dist/cli.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -87,6 +87,11 @@ interface AdapterServerDeps {
|
|
|
87
87
|
/** MCP handshake identity reported to the host. */
|
|
88
88
|
name?: string;
|
|
89
89
|
version?: string;
|
|
90
|
+
/**
|
|
91
|
+
* Brings the daemon back when a call finds nothing listening. Injected in
|
|
92
|
+
* tests; defaults to `ensureDaemonRunning`.
|
|
93
|
+
*/
|
|
94
|
+
revive?: (deps: EnsureRunningDeps) => Promise<void>;
|
|
90
95
|
}
|
|
91
96
|
/**
|
|
92
97
|
* Build the low-level MCP Server whose two handlers proxy to the daemon. The
|
package/dist/index.js
CHANGED