mindexec-ai 0.2.385

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.
Files changed (99) hide show
  1. package/README.md +354 -0
  2. package/codex-runtime.js +1339 -0
  3. package/launch-bridge.cjs +236 -0
  4. package/package.json +77 -0
  5. package/port-guard.cjs +232 -0
  6. package/remote-fast/osx-arm64/mindexec-remote-fast +0 -0
  7. package/remote-fast/osx-arm64/mindexec-remote-fast.deps.json +24 -0
  8. package/remote-fast/osx-arm64/mindexec-remote-fast.dll +0 -0
  9. package/remote-fast/osx-arm64/mindexec-remote-fast.runtimeconfig.json +13 -0
  10. package/remote-fast/osx-x64/mindexec-remote-fast +0 -0
  11. package/remote-fast/osx-x64/mindexec-remote-fast.deps.json +24 -0
  12. package/remote-fast/osx-x64/mindexec-remote-fast.dll +0 -0
  13. package/remote-fast/osx-x64/mindexec-remote-fast.runtimeconfig.json +13 -0
  14. package/remote-fast/win-x64/mindexec-remote-fast.deps.json +24 -0
  15. package/remote-fast/win-x64/mindexec-remote-fast.dll +0 -0
  16. package/remote-fast/win-x64/mindexec-remote-fast.exe +0 -0
  17. package/remote-fast/win-x64/mindexec-remote-fast.runtimeconfig.json +20 -0
  18. package/remote-hub.js +3106 -0
  19. package/scripts/auth-session-smoke.mjs +262 -0
  20. package/scripts/remote-agent-managed-smoke.mjs +291 -0
  21. package/scripts/remote-agent-package-smoke.mjs +64 -0
  22. package/scripts/remote-agent-ws-smoke.mjs +202 -0
  23. package/scripts/remote-fast-live-rate-smoke.mjs +355 -0
  24. package/scripts/remote-fast-mdm-browser-smoke.mjs +476 -0
  25. package/scripts/remote-fleet-render-smoke.mjs +1491 -0
  26. package/scripts/remote-frame-ws-smoke.mjs +234 -0
  27. package/scripts/remote-http-smoke.mjs +592 -0
  28. package/scripts/remote-hub-identity-smoke.mjs +146 -0
  29. package/scripts/remote-hub-scale-smoke.mjs +124 -0
  30. package/scripts/remote-hub-smoke.mjs +631 -0
  31. package/scripts/remote-input-ws-smoke.mjs +263 -0
  32. package/scripts/remote-registry-follower-smoke.mjs +752 -0
  33. package/scripts/setup-tree-sitter-grammars.mjs +80 -0
  34. package/server.js +15709 -0
  35. package/start-bridge.bat +32 -0
  36. package/start-bridge.sh +81 -0
  37. package/tree-sitter-grammars/README.md +18 -0
  38. package/tree-sitter-grammars/tree-sitter-c_sharp.wasm +0 -0
  39. package/tree-sitter-grammars/tree-sitter-go.wasm +0 -0
  40. package/tree-sitter-grammars/tree-sitter-java.wasm +0 -0
  41. package/tree-sitter-grammars/tree-sitter-javascript.wasm +0 -0
  42. package/tree-sitter-grammars/tree-sitter-python.wasm +0 -0
  43. package/tree-sitter-grammars/tree-sitter-rust.wasm +0 -0
  44. package/tree-sitter-grammars/tree-sitter-tsx.wasm +0 -0
  45. package/tree-sitter-grammars/tree-sitter-typescript.wasm +0 -0
  46. package/wwwroot/_headers +73 -0
  47. package/wwwroot/_redirects +1 -0
  48. package/wwwroot/appsettings.json +83 -0
  49. package/wwwroot/assets/AdminDashboardPage-B2vz2Px9.css +1 -0
  50. package/wwwroot/assets/AdminDashboardPage-DnuCHywn.js +1 -0
  51. package/wwwroot/assets/AppSidebar-DU2OgSiv.js +2 -0
  52. package/wwwroot/assets/AuthPages-BrH6kRcv.css +1 -0
  53. package/wwwroot/assets/AuthPages-Dgezl7Vj.js +1 -0
  54. package/wwwroot/assets/CodePage-7kgZlB3O.js +87 -0
  55. package/wwwroot/assets/CodePage-Bncc352E.css +1 -0
  56. package/wwwroot/assets/CompanyCorePage-ChBnq1ve.css +1 -0
  57. package/wwwroot/assets/CompanyCorePage-CzIZIIU_.js +13 -0
  58. package/wwwroot/assets/ExecutionModePage-B-etp_mc.js +18 -0
  59. package/wwwroot/assets/ExecutionModePage-TLuld9l3.css +1 -0
  60. package/wwwroot/assets/LaunchLeadCapture-Bx9LM0IX.js +1 -0
  61. package/wwwroot/assets/LaunchLeadCapture-CiRI1shz.css +1 -0
  62. package/wwwroot/assets/MarketingHome-BsyerRpe.js +1 -0
  63. package/wwwroot/assets/MarketingHome-DPzaYzA_.css +1 -0
  64. package/wwwroot/assets/MindCanvas-DtqOZnoW.css +1 -0
  65. package/wwwroot/assets/MindCanvas-zEDXzaxW.js +49 -0
  66. package/wwwroot/assets/PlanMasterPage-CJ36rep-.css +1 -0
  67. package/wwwroot/assets/PlanMasterPage-NZ_mPvaE.js +4 -0
  68. package/wwwroot/assets/PricingPage-Cg_0i_ZR.css +1 -0
  69. package/wwwroot/assets/PricingPage-Ylrn8l2g.js +1 -0
  70. package/wwwroot/assets/ToolPages-3M2KqA9k.js +28 -0
  71. package/wwwroot/assets/ToolPages-DIB187pZ.css +1 -0
  72. package/wwwroot/assets/YouTubeSearchPage-COv1oAA7.js +4 -0
  73. package/wwwroot/assets/YouTubeSearchPage-IPPa_BIH.css +1 -0
  74. package/wwwroot/assets/app-runtime-xD2Z3NdN.js +1 -0
  75. package/wwwroot/assets/canvas-runtime-BbicBcOj.js +44 -0
  76. package/wwwroot/assets/code-agent-runtime-B5PPZd1t.js +74 -0
  77. package/wwwroot/assets/executionModeSettings-NJqurj-o.js +1 -0
  78. package/wwwroot/assets/index-CQMKCp-t.js +2 -0
  79. package/wwwroot/assets/index-yNpEK-gp.css +1 -0
  80. package/wwwroot/assets/marketingTools-DN_rnHeB.js +4 -0
  81. package/wwwroot/assets/mindCanvasSearchWorker-BzPMsHOB.js +1 -0
  82. package/wwwroot/assets/mindexecution-mindcanvas.png +0 -0
  83. package/wwwroot/assets/mindexecution-prod-home-current.png +0 -0
  84. package/wwwroot/assets/mindexecution-prod-pricing-current.png +0 -0
  85. package/wwwroot/assets/pricingCheckoutShell-O-DnwmbU.js +1 -0
  86. package/wwwroot/assets/productionAdapterConfig-C5jfk6oG.js +1 -0
  87. package/wwwroot/assets/runtimeSettingsPersistenceProjection-BoNWmYjU.js +1 -0
  88. package/wwwroot/assets/storage-TM3YrWaj.js +1 -0
  89. package/wwwroot/assets/supabaseAuthAdapter-DA43DeSY.js +44 -0
  90. package/wwwroot/assets/toolHandoff-D5e5f7t5.js +4 -0
  91. package/wwwroot/assets/vendor-icons-DE3gIReG.js +681 -0
  92. package/wwwroot/assets/vendor-msgpack-BE8aAsr3.js +1 -0
  93. package/wwwroot/assets/vendor-react-BXzpOyCS.js +40 -0
  94. package/wwwroot/favicon.svg +7 -0
  95. package/wwwroot/index.html +22 -0
  96. package/wwwroot/manifest.webmanifest +19 -0
  97. package/wwwroot/robots.txt +4 -0
  98. package/wwwroot/service-worker.js +7 -0
  99. package/wwwroot/sitemap.xml +39 -0
package/README.md ADDED
@@ -0,0 +1,354 @@
1
+ # MindExec Local Bridge Server
2
+
3
+ ??Blazor ?깆뿉??濡쒖뺄 ?뚯씪 ?쒖뒪?쒖뿉 ?묎렐?섍린 ?꾪븳 Node.js 釉뚮━吏€ ?쒕쾭?낅땲??
4
+
5
+ ## npm quick start
6
+
7
+ ```bash
8
+ npx mindexec-ai
9
+ ```
10
+
11
+ The npm CLI now starts both pieces of the local product:
12
+
13
+ - MindCanvas app: `http://localhost:5147/mindcanvas`
14
+ - LocalBridge API: `http://127.0.0.1:5147/api/status`
15
+ - Workspace assets: `http://127.0.0.1:5147/assets/...`
16
+
17
+ By default the CLI opens the MindCanvas app in your default browser after the
18
+ bridge is ready. Use `mindexec --no-open` or `MINDEXEC_NO_OPEN=1` when you only
19
+ want to start the listener.
20
+
21
+ For npx and global installs, the default workspace is the directory where you
22
+ run the command. Run it from the folder that contains your `.mindexec` data, or
23
+ pass the workspace explicitly:
24
+
25
+ ```bash
26
+ npx mindexec-ai --workspace /path/to/workspace
27
+ ```
28
+
29
+ For local frontend development, keep LocalBridge running and refresh the
30
+ packaged app bundle after code changes:
31
+
32
+ ```powershell
33
+ .\scripts\publish-mindexec-cli.ps1 -AppOnly
34
+ ```
35
+
36
+ Then hard-refresh `http://localhost:5147/mindcanvas` in the browser.
37
+
38
+ The app and bridge are packaged together. Run `scripts/publish-mindexec-cli.ps1`
39
+ from the repository root before publishing so the latest
40
+ `MindExecution.Web` WASM `wwwroot` is copied into `LocalBridge/wwwroot`.
41
+ The packaged app is configured with `Bridge:Url=app-origin`, so custom
42
+ `BRIDGE_PORT` values keep the WASM app and LocalBridge API on the same origin.
43
+ The publish helper trims hosted/demo-only gallery images and unused
44
+ precompressed static files from the npm bundle by default. Use
45
+ `-KeepPackagedGalleryImages` or `-KeepPackagedPrecompressedAssets` only when
46
+ testing a full untrimmed local package.
47
+
48
+ ## Remote Direct quick start
49
+
50
+ LocalBridge also starts a separate RemoteHub listener for direct remote-agent
51
+ experiments. By default it binds to loopback only:
52
+
53
+ ```bash
54
+ npx mindexec-ai
55
+ npx @mindexec/remote connect --manager 127.0.0.1:5197 --pair <pair-token>
56
+ ```
57
+
58
+ Read the pair token from the protected local endpoint:
59
+
60
+ ```bash
61
+ curl -H "X-Bridge-Token: <bridge-token>" http://127.0.0.1:5147/api/remote/status
62
+ ```
63
+
64
+ LAN/direct mode must be enabled explicitly by changing the RemoteHub bind host:
65
+
66
+ ```powershell
67
+ $env:REMOTE_HUB_HOST="0.0.0.0"
68
+ $env:REMOTE_HUB_PORT="5197"
69
+ $env:REMOTE_HUB_PAIR_TOKEN="<strong-token>"
70
+ npx mindexec-ai
71
+ ```
72
+
73
+ Device inventory is intentionally not paginated:
74
+
75
+ ```bash
76
+ curl -H "X-Bridge-Token: <bridge-token>" http://127.0.0.1:5147/api/remote/devices
77
+ ```
78
+
79
+ Request and read the latest view-only thumbnail for a connected device:
80
+
81
+ ```bash
82
+ curl -X POST -H "X-Bridge-Token: <bridge-token>" http://127.0.0.1:5147/api/remote/devices/<device-id>/thumbnail/request
83
+ curl -H "X-Bridge-Token: <bridge-token>" http://127.0.0.1:5147/api/remote/devices/<device-id>/thumbnail
84
+ ```
85
+
86
+ Start, read, and stop the focused view-only RemoteFast live stream:
87
+
88
+ ```bash
89
+ curl -X POST -H "X-Bridge-Token: <bridge-token>" -H "Content-Type: application/json" \
90
+ -d "{\"fps\":12,\"maxWidth\":960,\"maxHeight\":540,\"quality\":60}" \
91
+ http://127.0.0.1:5147/api/remote/devices/<device-id>/live/start
92
+
93
+ curl -H "X-Bridge-Token: <bridge-token>" http://127.0.0.1:5147/api/remote/devices/<device-id>/live/frame
94
+
95
+ curl -X POST -H "X-Bridge-Token: <bridge-token>" http://127.0.0.1:5147/api/remote/devices/<device-id>/live/stop
96
+ ```
97
+
98
+ Queue a safe task-only instruction for one device or all connected devices:
99
+
100
+ ```bash
101
+ curl -X POST -H "X-Bridge-Token: <bridge-token>" -H "Content-Type: application/json" \
102
+ -d "{\"instruction\":\"Check the desktop and report status.\"}" \
103
+ http://127.0.0.1:5147/api/remote/devices/<device-id>/tasks
104
+
105
+ curl -X POST -H "X-Bridge-Token: <bridge-token>" -H "Content-Type: application/json" \
106
+ -d "{\"instruction\":\"Prepare a short status report.\",\"allConnected\":true}" \
107
+ http://127.0.0.1:5147/api/remote/tasks
108
+ ```
109
+
110
+ Queue an opt-in text-only AI assist task for agents started with `--ai`:
111
+
112
+ ```bash
113
+ curl -X POST -H "X-Bridge-Token: <bridge-token>" -H "Content-Type: application/json" \
114
+ -d "{\"instruction\":\"Summarize what this computer should do next.\",\"allConnected\":true,\"approvalLevel\":\"ai-assist\"}" \
115
+ http://127.0.0.1:5147/api/remote/tasks
116
+ ```
117
+
118
+ ?먮뒗 ?꾩뿭 ?ㅼ튂 ???ㅽ뻾?⑸땲??
119
+
120
+ ```bash
121
+ npm install -g mindexec-ai
122
+ mindexec
123
+ ```
124
+
125
+ 湲곕낯 ?ㅽ뻾 二쇱냼??`http://127.0.0.1:5147`?낅땲?? `WORKSPACE_PATH`媛€ 鍮꾩뼱 ?덉쑝硫??ㅼ튂???⑦궎吏€??遺€紐??대뜑瑜?湲곕낯 ?묒뾽 怨듦컙?쇰줈 ?ъ슜?⑸땲??
126
+
127
+ ```bash
128
+ mindexec --workspace /custom/path
129
+ BRIDGE_PORT=8080 WORKSPACE_PATH=/custom/path mindexec
130
+ ```
131
+
132
+ ?꾩?留먭낵 踰꾩쟾 ?뺤씤:
133
+
134
+ ```bash
135
+ mindexec --help
136
+ mindexec --version
137
+ ```
138
+
139
+ ## ?ㅼ튂
140
+
141
+ ```bash
142
+ cd LocalBridge
143
+ npm install
144
+ ```
145
+
146
+ ## ?ㅽ뻾
147
+
148
+ ### ?쇰컲 ?ㅽ뻾
149
+ ```bash
150
+ cd LocalBridge
151
+ npm start
152
+ ```
153
+
154
+ `npm start`??`WORKSPACE_PATH`媛€ 鍮꾩뼱 ?덉쑝硫?`LocalBridge`??遺€紐??대뜑(蹂댄넻 ?€?μ냼 猷⑦듃)瑜?湲곕낯 ?묒뾽 怨듦컙?쇰줈 ?ъ슜?⑸땲??
155
+
156
+ ### macOS / Linux?먯꽌 ?명븯寃??ㅽ뻾
157
+ ```bash
158
+ cd LocalBridge
159
+ chmod +x start-bridge.sh
160
+ ./start-bridge.sh
161
+ ```
162
+
163
+ `start-bridge.sh`???ㅼ쓬???먮룞?쇰줈 泥섎━?⑸땲??
164
+ - `WORKSPACE_PATH`媛€ ?놁쑝硫??€?μ냼 猷⑦듃瑜??묒뾽 怨듦컙?쇰줈 ?ъ슜
165
+ - `BRIDGE_PORT`媛€ ?놁쑝硫?`5147` ?ъ슜
166
+ - 媛숈? ?ы듃???대? 釉뚮━吏€媛€ ???덉쑝硫?以묐났 ?ㅽ뻾 諛⑹?
167
+ - ?ㅻⅨ OS?먯꽌 蹂듭궗????`node_modules`媛€ 媛먯??섎㈃ ?꾩옱 ?뚮옯?쇱슜?쇰줈 ?ㅼ떆 `npm install`
168
+
169
+ ### 媛쒕컻 紐⑤뱶 (?먮룞 ?ъ떆??
170
+ ```bash
171
+ npm run dev
172
+ ```
173
+
174
+ ### ?섍꼍 蹂€??
175
+
176
+ | 蹂€??| ?ㅻ챸 | 湲곕낯媛?|
177
+ |------|------|--------|
178
+ | `BRIDGE_PORT` | ?쒕쾭 ?ы듃 | 5147 |
179
+ | `WORKSPACE_PATH` | ?묒뾽 怨듦컙 寃쎈줈 | `LocalBridge` ?먮뒗 ?ㅼ튂 ?⑦궎吏€??遺€紐??대뜑 (?놁쑝硫?`~/Documents/MindExecution`) |
180
+ | `BRIDGE_TOKEN` | ?꾪뿕 REST API???ъ슜??怨좎젙 ?좏겙. 鍮꾩슦硫??ㅽ뻾 ???쒕뜡 ?앹꽦 | ?쒕뜡 |
181
+ | `BRIDGE_REQUIRE_TOKEN` | `false`/`0`/`off`濡??ㅼ젙?섎㈃ REST ?좏겙 寃€??鍮꾪솢?깊솕 | true |
182
+ | `COMPANY_CORE_URL` | CompanyCore 濡쒖뺄 API 二쇱냼. `/api/company-core/*` ?꾨줉???€??| http://127.0.0.1:5077 |
183
+ | `BRIDGE_SKIP_PORT_REAP` | ?쒖옉 ???숈씪 ?ы듃??湲곗〈 MindExec bridge ?뺣━瑜?嫄대꼫?? | false |
184
+ | `BRIDGE_FORCE_KILL_PORT_OWNER` | `BRIDGE_PORT`瑜??≪쓣 ?꾩쓽 ?꾨줈?몄뒪瑜??뺣━ | false |
185
+
186
+ ?덉떆:
187
+ ```bash
188
+ BRIDGE_PORT=8080 WORKSPACE_PATH=/custom/path npm start
189
+ ```
190
+
191
+ macOS / Linux?먯꽌 ?ㅽ겕由쏀듃?€ ?④퍡 ?ㅽ뻾???뚮룄 ?숈씪?⑸땲??
192
+ ```bash
193
+ BRIDGE_PORT=8080 WORKSPACE_PATH=/custom/path ./start-bridge.sh
194
+ ```
195
+
196
+ ## API ?붾뱶?ъ씤??
197
+
198
+ ### ?곹깭 ?뺤씤
199
+ - `GET /api/status` - ?쒕쾭 ?곹깭 ?뺤씤, `/events`??`wsToken`怨??꾪뿕 REST API??`bridgeToken` 諛섑솚
200
+
201
+ ### ?묒뾽 怨듦컙
202
+ - `GET /api/workspace` - ?꾩옱 ?묒뾽 怨듦컙 ?뺣낫
203
+ - `POST /api/workspace/set` - ?묒뾽 怨듦컙 寃쎈줈 ?ㅼ젙
204
+
205
+ ### ?뚯씪 ?묒뾽
206
+ - `POST /api/file/read` - ?뚯씪 ?쎄린
207
+ - `POST /api/file/write` - ?뚯씪 ?곌린
208
+ - `POST /api/file/delete` - ?뚯씪 ??젣
209
+ - `POST /api/file/exists` - ?뚯씪 議댁옱 ?뺤씤
210
+ - `POST /api/file/copy` - ?뚯씪 蹂듭궗
211
+ - `POST /api/file/move` - ?뚯씪 ?대룞/?대쫫 蹂€寃?
212
+ - `POST /api/file/info` - ?뚯씪 ?뺣낫
213
+
214
+ ### ?붾젆?좊━ ?묒뾽
215
+ - `POST /api/dir/create` - ?붾젆?좊━ ?앹꽦
216
+ - `POST /api/dir/list` - ?붾젆?좊━ 紐⑸줉
217
+ - `POST /api/dir/delete` - ?붾젆?좊━ ??젣
218
+
219
+ ### ???ㅽ뻾
220
+ - `POST /api/shell/execute` - ??紐낅졊 ?ㅽ뻾. 湲곗〈 ?명솚?⑹씠硫??대??곸쑝濡?job ?대깽?몃? `/events`濡??꾩넚
221
+ - `POST /api/shell/jobs` - ??紐낅졊??諛깃렇?쇱슫??job?쇰줈 ?쒖옉?섍퀬 `jobId` 諛섑솚
222
+ - `GET /api/shell/jobs/:jobId` - job ?곹깭/異쒕젰 議고쉶
223
+ - `POST /api/shell/jobs/:jobId/cancel` - ?ㅽ뻾 以묒씤 job 痍⑥냼
224
+
225
+ ### ?대깽???ㅽ듃由?- `WebSocket /events?token=<wsToken>` - ?꾨줈?앺듃 蹂€寃쎄낵 shell/Codex job ?대깽?몃? push
226
+
227
+ Shell/Codex job ?대깽??
228
+ - `ShellQueued`
229
+ - `ShellStarted`
230
+ - `ShellStdout`
231
+ - `ShellStderr`
232
+ - `ShellCompleted`
233
+ - `ShellFailed`
234
+ - `ShellCancelRequested`
235
+
236
+ ### OpenAI Codex runtime
237
+ - `GET /api/codex/capabilities` - TypeScript SDK / App Server scaffold / Legacy Exec provider availability
238
+ - `POST /api/codex/thread/start` - start a local Codex thread
239
+ - `POST /api/codex/thread/run` - run a Codex turn. Uses `@openai/codex-sdk` first and falls back to legacy `codex exec`
240
+ - `POST /api/codex/thread/resume` - resume a stored SDK thread by id
241
+ - `POST /api/codex/thread/cancel` - cancel an active turn
242
+ - `GET /api/codex/thread/:threadId/status` - inspect local thread status and compact run metadata
243
+
244
+ The TypeScript SDK runs only inside LocalBridge. Browser/WASM clients should call these bridge endpoints and must not import or execute Codex SDK packages directly.
245
+
246
+ ### Port ownership
247
+
248
+ On startup, LocalBridge checks `BRIDGE_PORT` and stops an existing MindExec/LocalBridge listener on that same port before binding. If the port is owned by an unrelated process, startup fails with a clear message instead of silently killing it. Set `BRIDGE_FORCE_KILL_PORT_OWNER=1` only when the launcher owns that port policy and should terminate any listener.
249
+
250
+ The `start-bridge.bat` and `start-bridge.sh` wrappers always delegate startup to `launch-bridge.cjs`, so port cleanup is handled by the same guard path on every launch.
251
+ ### CompanyCore ?꾨줉??- `GET /api/company-core/health` -> `CompanyCore /health`
252
+ - `GET /api/company-core/companies` -> `CompanyCore /api/companies`
253
+ - `POST /api/company-core/companies/create-and-run` -> `CompanyCore /api/companies/create-and-run`
254
+
255
+ MindExec Web?€ CompanyCore ?ы듃瑜?吏곸젒 ???꾩슂 ?놁씠 LocalBridge `5147`留??몄텧?섎㈃ ?⑸땲?? ???꾨줉?쒕룄 Bridge Token 蹂댄샇瑜?諛쏆뒿?덈떎.
256
+
257
+ ## 蹂댁븞 二쇱쓽?ы빆
258
+
259
+ - ???쒕쾭??**濡쒖뺄?몄뒪??127.0.0.1)?먯꽌留?* ?묎렐 媛€?ν빀?덈떎.
260
+ - ?묒뾽 怨듦컙 ?몃????뚯씪?먮뒗 ?묎렐?????놁뒿?덈떎.
261
+ - ?꾪뿕????紐낅졊(rm -rf, format ???€ 李⑤떒?⑸땲??
262
+ - ?뚯씪 ?곌린/??젣, ?붾젆?좊━ ?앹꽦/??젣, asset ?낅줈?? shell, project open/close 媛숈? ?꾪뿕 REST API??湲곕낯?곸쑝濡?`X-Bridge-Token` ?먮뒗 `Authorization: Bearer <token>`???꾩슂?⑸땲??
263
+ - ?좏겙?€ `GET /api/status`??`bridgeToken`?쇰줈 ?뺤씤?⑸땲?? 怨좎젙 ?좏겙???꾩슂?섎㈃ `BRIDGE_TOKEN` ?섍꼍 蹂€?섎? ?ъ슜?섏꽭??
264
+
265
+ ## ?ъ슜 ?덉떆
266
+
267
+ ### ?뚯씪 ?쎄린
268
+ ```javascript
269
+ const response = await fetch('http://127.0.0.1:5147/api/file/read', {
270
+ method: 'POST',
271
+ headers: { 'Content-Type': 'application/json' },
272
+ body: JSON.stringify({ path: 'test.txt' })
273
+ });
274
+ const data = await response.json();
275
+ console.log(data.content);
276
+ ```
277
+
278
+ ### ?뚯씪 ?곌린
279
+ ```javascript
280
+ const status = await fetch('http://127.0.0.1:5147/api/status').then(r => r.json());
281
+
282
+ await fetch('http://127.0.0.1:5147/api/file/write', {
283
+ method: 'POST',
284
+ headers: {
285
+ 'Content-Type': 'application/json',
286
+ [status.bridgeTokenHeader || 'X-Bridge-Token']: status.bridgeToken
287
+ },
288
+ body: JSON.stringify({
289
+ path: 'test.txt',
290
+ content: 'Hello, World!'
291
+ })
292
+ });
293
+ ```
294
+
295
+ ### ??紐낅졊 ?ㅽ뻾
296
+ ```javascript
297
+ const status = await fetch('http://127.0.0.1:5147/api/status').then(r => r.json());
298
+
299
+ const response = await fetch('http://127.0.0.1:5147/api/shell/execute', {
300
+ method: 'POST',
301
+ headers: {
302
+ 'Content-Type': 'application/json',
303
+ [status.bridgeTokenHeader || 'X-Bridge-Token']: status.bridgeToken
304
+ },
305
+ body: JSON.stringify({
306
+ command: 'dir',
307
+ timeout: 30000
308
+ })
309
+ });
310
+ const result = await response.json();
311
+ console.log(result.stdout);
312
+ ```
313
+
314
+ ### ??job ?ㅽ듃由щ컢
315
+ ```javascript
316
+ const status = await fetch('http://127.0.0.1:5147/api/status').then(r => r.json());
317
+ const ws = new WebSocket(`ws://127.0.0.1:5147/events?token=${encodeURIComponent(status.wsToken)}`);
318
+
319
+ ws.onmessage = (message) => {
320
+ const event = JSON.parse(message.data);
321
+ if (event.type === 'ShellStdout') console.log(event.payload.chunk);
322
+ if (event.type === 'ShellCompleted') console.log('done', event.payload.jobId);
323
+ };
324
+
325
+ await fetch('http://127.0.0.1:5147/api/shell/jobs', {
326
+ method: 'POST',
327
+ headers: {
328
+ 'Content-Type': 'application/json',
329
+ [status.bridgeTokenHeader || 'X-Bridge-Token']: status.bridgeToken
330
+ },
331
+ body: JSON.stringify({
332
+ command: 'codex exec \"Summarize this repository\"',
333
+ timeout: 300000
334
+ })
335
+ });
336
+ ```
337
+
338
+ ## CORS
339
+
340
+ 湲곕낯?곸쑝濡??ㅼ쓬 origin?ㅼ씠 ?덉슜?⑸땲??
341
+ - http://localhost:5000
342
+ - http://localhost:5001
343
+ - https://localhost:5001
344
+ - http://127.0.0.1:5000
345
+ - http://127.0.0.1:5001
346
+
347
+ 異붽? origin???꾩슂?섎㈃ `server.js`??CORS ?ㅼ젙???섏젙?섏꽭??
348
+
349
+ ## Web怨?MAUI ?숈떆 ?ъ슜
350
+
351
+ 1. 釉뚮━吏€ ?쒕쾭瑜??ㅽ뻾?⑸땲??(`npm start`)
352
+ 2. Web Blazor ?깆쓣 ?ㅽ뻾?⑸땲??
353
+ 3. MAUI ?깆? 釉뚮━吏€ ?쒕쾭 ?놁씠???묐룞?⑸땲??(吏곸젒 ?뚯씪 ?쒖뒪???묎렐)
354
+