@ait-co/devtools 0.1.56 → 0.1.57
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 +26 -32
- package/README.md +26 -32
- package/dist/mcp/cli.js +564 -341
- package/dist/mcp/cli.js.map +1 -1
- package/dist/mcp/server.js +16 -10
- package/dist/mcp/server.js.map +1 -1
- package/dist/panel/index.js +2 -2
- package/dist/relay-secret-store-DnTNl-9z.cjs +140 -0
- package/dist/relay-secret-store-DnTNl-9z.cjs.map +1 -0
- package/dist/relay-secret-store-DqyUoeXy.js +140 -0
- package/dist/relay-secret-store-DqyUoeXy.js.map +1 -0
- package/dist/{totp-CxHsagqY.js → totp-BkP5yU2K.js} +4 -2
- package/dist/totp-BkP5yU2K.js.map +1 -0
- package/dist/totp-CQFmgOhM.js +3 -0
- package/dist/totp-D0a8VwoR.js +187 -0
- package/dist/totp-D0a8VwoR.js.map +1 -0
- package/dist/{totp-BkKP4m8H.cjs → totp-DLgGbySX.cjs} +4 -1
- package/dist/totp-DLgGbySX.cjs.map +1 -0
- package/dist/{tunnel-Cj8g1LIL.js → tunnel-CI61NvPI.js} +2 -2
- package/dist/{tunnel-Cj8g1LIL.js.map → tunnel-CI61NvPI.js.map} +1 -1
- package/dist/{tunnel-p-q6eVWT.cjs → tunnel-nKYPtc-g.cjs} +2 -2
- package/dist/{tunnel-p-q6eVWT.cjs.map → tunnel-nKYPtc-g.cjs.map} +1 -1
- package/dist/unplugin/index.cjs +4 -2
- package/dist/unplugin/index.cjs.map +1 -1
- package/dist/unplugin/index.d.cts.map +1 -1
- package/dist/unplugin/index.d.ts.map +1 -1
- package/dist/unplugin/index.js +4 -2
- package/dist/unplugin/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/totp-BkKP4m8H.cjs.map +0 -1
- package/dist/totp-CxHsagqY.js.map +0 -1
package/README.en.md
CHANGED
|
@@ -73,13 +73,12 @@ Attach a relay to a live OPENED app to observe runtime behavior.
|
|
|
73
73
|
|
|
74
74
|
```bash
|
|
75
75
|
devtools-mcp # start MCP server
|
|
76
|
-
# In Claude Code: start_debug({mode: 'live', confirm: true}) ← arms LIVE guard
|
|
76
|
+
# In Claude Code: start_debug({mode: 'relay-live', confirm: true}) ← arms LIVE guard
|
|
77
77
|
# call build_attach_url → scan QR → live app loads + relay attaches
|
|
78
78
|
# call_sdk / evaluate: confirm: true required (LIVE guard — real users affected)
|
|
79
|
-
# (deprecated alias: MCP_ENV=relay-live devtools-mcp — kept for boot-time liveIntent seeding only)
|
|
80
79
|
```
|
|
81
80
|
|
|
82
|
-
`start_debug({mode: 'live', confirm: true})` arms the LIVE guard in-session. Details: [`docs/scenarios/env-4.md`](./docs/scenarios/env-4.md)
|
|
81
|
+
`start_debug({mode: 'relay-live', confirm: true})` arms the LIVE guard in-session. Details: [`docs/scenarios/env-4.md`](./docs/scenarios/env-4.md)
|
|
83
82
|
|
|
84
83
|
---
|
|
85
84
|
|
|
@@ -119,9 +118,20 @@ npm install -D @ait-co/devtools
|
|
|
119
118
|
pnpm add -D @ait-co/devtools
|
|
120
119
|
```
|
|
121
120
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
121
|
+
### Two channels — stable and beta
|
|
122
|
+
|
|
123
|
+
devtools runs two npm dist-tags off the same code at once. Pick the channel that matches your web-framework version.
|
|
124
|
+
|
|
125
|
+
| Channel | Install | web-framework peer |
|
|
126
|
+
|---|---|---|
|
|
127
|
+
| **stable** (`latest`, default) | `pnpm add -D @ait-co/devtools` | `>=2.6.0 <2.7.0` (2.x) |
|
|
128
|
+
| **beta** | `pnpm add -D @ait-co/devtools@beta` | `>=3.0.0-beta <4.0.0` (3.0 line) |
|
|
129
|
+
|
|
130
|
+
- On web-framework **2.x**, the default install (stable) is all you need.
|
|
131
|
+
- On the web-framework **3.0.0-beta** pre-release, install the `@beta` channel. It is a snapshot auto-published on every main push (`0.0.0-beta-<datetime>-<sha>`), so the versions are hard to pin — install with the `@beta` tag.
|
|
132
|
+
- Both channels keep the web-framework peer `optional`, so MCP-only debugging users are never forced to pull the SDK.
|
|
133
|
+
|
|
134
|
+
When 3.0 ships GA, the stable `latest` peer moves up to the 3.0 line and the beta channel is retired. Calling an API that devtools has not yet mocked will throw a runtime error — please [file an issue](https://github.com/apps-in-toss-community/devtools/issues) for missing APIs.
|
|
125
135
|
|
|
126
136
|
## Reference consumer
|
|
127
137
|
|
|
@@ -947,13 +957,13 @@ A local browser (env 1) and a phone Toss WebView (env 2/3) both speak CDP, so ev
|
|
|
947
957
|
|
|
948
958
|
| Mode + target | Invocation | Env vars | Target | Tools |
|
|
949
959
|
|---|---|---|---|---|
|
|
950
|
-
| `--target=mobile` (env 2) | `devtools-mcp` → `start_debug({mode:'
|
|
951
|
-
| `--mode=debug --target=relay` (default, env 3) | `devtools-mcp` → `start_debug({mode: 'staging'})` |
|
|
952
|
-
| `--mode=debug --target=relay` LIVE (env 4) | `devtools-mcp` → `start_debug({mode: 'live', confirm: true})` |
|
|
960
|
+
| `--target=mobile` (env 2) | `devtools-mcp` → `start_debug({mode:'relay-sandbox'})` | `AIT_RELAY_BASE_URL`, `AIT_TUNNEL_BASE_URL` | Real-device Safari/WebKit PWA (external Chii relay + cloudflared tunnel, env 2) | console/network/page + DOM/snapshot/screenshot |
|
|
961
|
+
| `--mode=debug --target=relay` (default, env 3) | `devtools-mcp` → `start_debug({mode: 'relay-staging'})` | — | Dogfood bundle on a phone (CDP/Chii relay + cloudflared tunnel, env 3) | same + `AIT.*` |
|
|
962
|
+
| `--mode=debug --target=relay` LIVE (env 4) | `devtools-mcp` → `start_debug({mode: 'relay-live', confirm: true})` | — (env 4 LIVE guard) | Live deployed app (env 4) — `call_sdk`/`evaluate` require `confirm: true` | same |
|
|
953
963
|
| `--mode=debug --target=local` (env 1) | `devtools-mcp --target=local` | `MCP_ENV=mock` (auto) | Local Chromium launched by the MCP server (CDP direct-attach, no relay needed, env 1) | same |
|
|
954
964
|
| `--mode=dev` | `devtools-mcp --mode=dev` | `MCP_ENV=mock` (auto) | Mock state from a running Vite dev server (AIT.* only, no CDP) | `AIT.*` (+ `devtools_get_mock_state` alias) |
|
|
955
965
|
|
|
956
|
-
`--target=local` opens `AIT_DEVTOOLS_URL` (default `http://localhost:5173`) and attaches directly to a local Chromium — no relay or tunnel required. `--mode=dev` reads the mock-state HTTP endpoint of the Vite dev server and does not provide CDP tools. Switch environments in-session with `start_debug(mode)`: `
|
|
966
|
+
`--target=local` opens `AIT_DEVTOOLS_URL` (default `http://localhost:5173`) and attaches directly to a local Chromium — no relay or tunnel required. `--mode=dev` reads the mock-state HTTP endpoint of the Vite dev server and does not provide CDP tools. Switch environments in-session with `start_debug(mode)`: `relay-sandbox` (env 2 PWA), `relay-staging` (env 3 dogfood), `relay-live` (env 4, arms LIVE guard — `confirm: true` required), `local-browser` (env 1).
|
|
957
967
|
|
|
958
968
|
#### Environment 2 (real-device PWA CDP) — `--target=mobile`
|
|
959
969
|
|
|
@@ -987,7 +997,7 @@ Debug on a real phone using Safari/WebKit without Toss review. The Vite dev serv
|
|
|
987
997
|
|
|
988
998
|
3. In a Claude Code session:
|
|
989
999
|
```
|
|
990
|
-
start_debug({mode: '
|
|
1000
|
+
start_debug({mode: 'relay-sandbox'})
|
|
991
1001
|
build_attach_url()
|
|
992
1002
|
```
|
|
993
1003
|
Scan the QR with your phone camera. The launcher PWA opens the app in a frame and injects Chii target.js.
|
|
@@ -1006,39 +1016,23 @@ Read-only tools only. Tools are registered in two tiers based on attach state
|
|
|
1006
1016
|
|
|
1007
1017
|
Running `devtools-mcp` as a stdio server starts a local Chii relay on an OS-assigned port and opens a cloudflared quick tunnel, printing a public `wss://*.trycloudflare.com` URL and a QR code in the terminal (secrets/auth codes are never printed). When the phone enters the dogfood entry point, the in-app attach UI connects to the relay with that URL, and the agent reads console/network/page state via `chrome-devtools-mcp`-compatible tools — diagnosing regressions without anyone watching the phone.
|
|
1008
1018
|
|
|
1009
|
-
|
|
1019
|
+
Environments 3 and 4 (intoss-private relay) — start `devtools-mcp` as-is, then enter via `start_debug(mode)`:
|
|
1010
1020
|
|
|
1011
1021
|
```json
|
|
1012
1022
|
{
|
|
1013
1023
|
"mcpServers": {
|
|
1014
1024
|
"ait-debug": {
|
|
1015
1025
|
"command": "pnpm",
|
|
1016
|
-
"args": ["exec", "devtools-mcp"]
|
|
1017
|
-
"env": {
|
|
1018
|
-
"MCP_ENV": "relay-dev"
|
|
1019
|
-
}
|
|
1026
|
+
"args": ["exec", "devtools-mcp"]
|
|
1020
1027
|
}
|
|
1021
1028
|
}
|
|
1022
1029
|
}
|
|
1023
1030
|
```
|
|
1024
1031
|
|
|
1025
|
-
Environment
|
|
1026
|
-
|
|
1027
|
-
```json
|
|
1028
|
-
{
|
|
1029
|
-
"mcpServers": {
|
|
1030
|
-
"ait-debug": {
|
|
1031
|
-
"command": "pnpm",
|
|
1032
|
-
"args": ["exec", "devtools-mcp"],
|
|
1033
|
-
"env": {
|
|
1034
|
-
"MCP_ENV": "relay-live"
|
|
1035
|
-
}
|
|
1036
|
-
}
|
|
1037
|
-
}
|
|
1038
|
-
}
|
|
1039
|
-
```
|
|
1032
|
+
- Environment 3 (dogfood relay): `start_debug({mode: 'relay-staging'})`
|
|
1033
|
+
- Environment 4 (LIVE relay, LIVE guard enabled): `start_debug({mode: 'relay-live', confirm: true})`
|
|
1040
1034
|
|
|
1041
|
-
`
|
|
1035
|
+
**`start_debug(mode)` is the single in-session entry path.** `MCP_ENV=relay-live` remains only as a deprecated alias that seeds `liveIntent` at boot — in a new session, enter via `start_debug({mode: 'relay-live', confirm: true})`.
|
|
1042
1036
|
|
|
1043
1037
|
| Tool | CDP / AIT backing | Description |
|
|
1044
1038
|
|---|---|---|
|
package/README.md
CHANGED
|
@@ -73,13 +73,12 @@ HMR 없음(토스 WebView cold-load만). 상세: [`docs/scenarios/env-3.md`](./d
|
|
|
73
73
|
|
|
74
74
|
```bash
|
|
75
75
|
devtools-mcp # MCP 서버 시작
|
|
76
|
-
# Claude Code에서: start_debug({mode: 'live', confirm: true}) ← LIVE guard 활성화
|
|
76
|
+
# Claude Code에서: start_debug({mode: 'relay-live', confirm: true}) ← LIVE guard 활성화
|
|
77
77
|
# build_attach_url 호출 → QR 스캔 → LIVE 앱 로드 + relay attach
|
|
78
78
|
# call_sdk / evaluate 는 confirm: true 필수 (LIVE guard — 실유저 영향)
|
|
79
|
-
# (deprecated 별칭: MCP_ENV=relay-live devtools-mcp — 부팅 시 liveIntent 시드용으로만 남음)
|
|
80
79
|
```
|
|
81
80
|
|
|
82
|
-
`start_debug({mode: 'live', confirm: true})`가 LIVE guard를 활성화합니다. 상세: [`docs/scenarios/env-4.md`](./docs/scenarios/env-4.md)
|
|
81
|
+
`start_debug({mode: 'relay-live', confirm: true})`가 LIVE guard를 활성화합니다. 상세: [`docs/scenarios/env-4.md`](./docs/scenarios/env-4.md)
|
|
83
82
|
|
|
84
83
|
---
|
|
85
84
|
|
|
@@ -119,9 +118,20 @@ npm install -D @ait-co/devtools
|
|
|
119
118
|
pnpm add -D @ait-co/devtools
|
|
120
119
|
```
|
|
121
120
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
121
|
+
### 두 채널 — stable과 beta
|
|
122
|
+
|
|
123
|
+
devtools는 같은 코드에서 두 개의 npm dist-tag를 동시에 운영합니다. 쓰는 web-framework 버전에 맞는 채널을 고르세요.
|
|
124
|
+
|
|
125
|
+
| 채널 | 설치 | web-framework peer |
|
|
126
|
+
|---|---|---|
|
|
127
|
+
| **stable** (`latest`, 기본) | `pnpm add -D @ait-co/devtools` | `>=2.6.0 <2.7.0` (2.x) |
|
|
128
|
+
| **beta** | `pnpm add -D @ait-co/devtools@beta` | `>=3.0.0-beta <4.0.0` (3.0 라인) |
|
|
129
|
+
|
|
130
|
+
- web-framework **2.x**를 쓰면 위 기본 설치(stable)면 됩니다.
|
|
131
|
+
- web-framework **3.0.0-beta** 프리릴리즈를 쓰면 `@beta` 채널을 설치하세요. 이 채널은 main push마다 자동 publish되는 스냅샷(`0.0.0-beta-<datetime>-<sha>`)이라 버전을 핀하기 어려우니 `@beta` 태그로 설치하는 걸 권장합니다.
|
|
132
|
+
- 두 채널 모두 web-framework peer는 `optional`이라 MCP 디버깅만 쓰는 경우 SDK를 강제로 끌어오지 않습니다.
|
|
133
|
+
|
|
134
|
+
3.0이 정식(GA) 출시되면 stable `latest` peer가 3.0 라인으로 올라가고 beta 채널은 정리됩니다. devtools가 아직 mock하지 않은 API를 호출하면 런타임에 에러가 발생합니다 — 누락된 API는 [이슈](https://github.com/apps-in-toss-community/devtools/issues)로 알려주세요.
|
|
125
135
|
|
|
126
136
|
## Reference consumer
|
|
127
137
|
|
|
@@ -977,13 +987,13 @@ AI 코딩 에이전트(Claude Code, Cursor 등)가 [MCP(Model Context Protocol)]
|
|
|
977
987
|
|
|
978
988
|
| 모드 + 타깃 | 호출 | 환경 변수 | 대상 | tool |
|
|
979
989
|
|---|---|---|---|---|
|
|
980
|
-
| `--target=mobile` (env 2) | `devtools-mcp` → `start_debug({mode:'
|
|
981
|
-
| `--mode=debug --target=relay` (기본값, env 3) | `devtools-mcp` → `start_debug({mode: 'staging'})` |
|
|
982
|
-
| `--mode=debug --target=relay` LIVE (env 4) | `devtools-mcp` → `start_debug({mode: 'live', confirm: true})` |
|
|
990
|
+
| `--target=mobile` (env 2) | `devtools-mcp` → `start_debug({mode:'relay-sandbox'})` | `AIT_RELAY_BASE_URL`, `AIT_TUNNEL_BASE_URL` | 실기기 Safari/WebKit PWA (외부 Chii relay + cloudflared 터널, 환경 2) | console/network/page + DOM/snapshot/screenshot |
|
|
991
|
+
| `--mode=debug --target=relay` (기본값, env 3) | `devtools-mcp` → `start_debug({mode: 'relay-staging'})` | — | 폰 안 dogfood 번들 (CDP/Chii relay + cloudflared 터널, 환경 3) | 동일 + `AIT.*` |
|
|
992
|
+
| `--mode=debug --target=relay` LIVE (env 4) | `devtools-mcp` → `start_debug({mode: 'relay-live', confirm: true})` | — (**환경 4 LIVE guard**) | LIVE 배포 앱 (환경 4) — `call_sdk`/`evaluate`에 `confirm: true` 필요 | 동일 |
|
|
983
993
|
| `--mode=debug --target=local` (env 1) | `devtools-mcp --target=local` | `MCP_ENV=mock` (자동) | MCP가 직접 기동한 로컬 Chromium (CDP direct-attach, relay 불필요, 환경 1) | 동일 |
|
|
984
994
|
| `--mode=dev` | `devtools-mcp --mode=dev` | `MCP_ENV=mock` (자동) | 실행 중인 Vite dev server의 mock state (AIT.* 전용, CDP 없음) | `AIT.*` (+ `devtools_get_mock_state` alias) |
|
|
985
995
|
|
|
986
|
-
`--target=local`은 `AIT_DEVTOOLS_URL`(기본 `http://localhost:5173`)을 열고 로컬 Chromium에 CDP direct-attach합니다 — relay나 터널이 필요하지 않습니다. `--mode=dev`는 Vite dev server의 mock-state HTTP endpoint를 읽으며 CDP tool은 제공하지 않습니다. 세션 내 환경 전환은 `start_debug(mode)` 한 번으로 처리됩니다: `
|
|
996
|
+
`--target=local`은 `AIT_DEVTOOLS_URL`(기본 `http://localhost:5173`)을 열고 로컬 Chromium에 CDP direct-attach합니다 — relay나 터널이 필요하지 않습니다. `--mode=dev`는 Vite dev server의 mock-state HTTP endpoint를 읽으며 CDP tool은 제공하지 않습니다. 세션 내 환경 전환은 `start_debug(mode)` 한 번으로 처리됩니다: `relay-sandbox`(env 2 PWA), `relay-staging`(env 3 dogfood), `relay-live`(env 4 LIVE guard 활성화, `confirm: true` 필수), `local-browser`(env 1).
|
|
987
997
|
|
|
988
998
|
#### 환경 2 (실기기 PWA CDP) — `--target=mobile`
|
|
989
999
|
|
|
@@ -1017,7 +1027,7 @@ AI 코딩 에이전트(Claude Code, Cursor 등)가 [MCP(Model Context Protocol)]
|
|
|
1017
1027
|
|
|
1018
1028
|
3. Claude Code 세션에서 진입:
|
|
1019
1029
|
```
|
|
1020
|
-
start_debug({mode: '
|
|
1030
|
+
start_debug({mode: 'relay-sandbox'})
|
|
1021
1031
|
build_attach_url()
|
|
1022
1032
|
```
|
|
1023
1033
|
QR을 폰 카메라로 스캔하면 런처 PWA가 앱을 프레임에 열고 Chii target.js를 주입합니다.
|
|
@@ -1044,39 +1054,23 @@ tunnel로 공개 `wss://*.trycloudflare.com` URL을 발급한 뒤 QR을 터미
|
|
|
1044
1054
|
에이전트가 `chrome-devtools-mcp` 호환 tool로 console/network/page 상태를 read합니다. 사람이 폰을
|
|
1045
1055
|
지켜볼 필요 없이 회귀를 단독 진단하는 것이 목표입니다.
|
|
1046
1056
|
|
|
1047
|
-
환경 3 (
|
|
1057
|
+
환경 3·4 (intoss-private relay) — `devtools-mcp`를 그대로 기동한 뒤 `start_debug(mode)`로 진입합니다:
|
|
1048
1058
|
|
|
1049
1059
|
```json
|
|
1050
1060
|
{
|
|
1051
1061
|
"mcpServers": {
|
|
1052
1062
|
"ait-debug": {
|
|
1053
1063
|
"command": "pnpm",
|
|
1054
|
-
"args": ["exec", "devtools-mcp"]
|
|
1055
|
-
"env": {
|
|
1056
|
-
"MCP_ENV": "relay-dev"
|
|
1057
|
-
}
|
|
1064
|
+
"args": ["exec", "devtools-mcp"]
|
|
1058
1065
|
}
|
|
1059
1066
|
}
|
|
1060
1067
|
}
|
|
1061
1068
|
```
|
|
1062
1069
|
|
|
1063
|
-
환경
|
|
1064
|
-
|
|
1065
|
-
```json
|
|
1066
|
-
{
|
|
1067
|
-
"mcpServers": {
|
|
1068
|
-
"ait-debug": {
|
|
1069
|
-
"command": "pnpm",
|
|
1070
|
-
"args": ["exec", "devtools-mcp"],
|
|
1071
|
-
"env": {
|
|
1072
|
-
"MCP_ENV": "relay-live"
|
|
1073
|
-
}
|
|
1074
|
-
}
|
|
1075
|
-
}
|
|
1076
|
-
}
|
|
1077
|
-
```
|
|
1070
|
+
- 환경 3 (dogfood relay): `start_debug({mode: 'relay-staging'})`
|
|
1071
|
+
- 환경 4 (LIVE relay, LIVE guard 활성화): `start_debug({mode: 'relay-live', confirm: true})`
|
|
1078
1072
|
|
|
1079
|
-
|
|
1073
|
+
**세션 내 환경 전환은 `start_debug(mode)`가 단일 진입 경로**입니다. `MCP_ENV=relay-live`는 부팅 시 `liveIntent`를 미리 시드하는 deprecated 별칭으로만 남아 있습니다 — 새 세션에서는 `start_debug({mode: 'relay-live', confirm: true})`로 진입하세요.
|
|
1080
1074
|
|
|
1081
1075
|
| Tool | CDP / AIT 백킹 | 설명 |
|
|
1082
1076
|
|---|---|---|
|