agents-bridge 0.1.21 → 0.1.23

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
@@ -1,297 +1,297 @@
1
- # agents-bridge
2
-
3
- 本地 Agent 网关,部署在客户本地机器上,通过长轮询连接 botlink 平台,把消息转发给本机运行的 Claude Code / Codex 等 Agent 运行时。
4
-
5
- 核心特点:
6
-
7
- - 客户端主动外连,无需暴露入站端口
8
- - 支持 `claude-cli/...`、`codex-cli/...`、`qwen-cli/...` 这类 CLI 模型引用
9
- - 支持多 agent 配置与按绑定规则路由
10
- - 提供 `onboard`、`add-agent`、`doctor`、`logs`、`config` 等运维命令
11
- - 支持前台运行和守护进程模式
12
-
13
- ## 架构概览
14
-
15
- 链路可以简化为:
16
-
17
- `botlink cloud -> 长轮询 -> agents-bridge -> 本地 CLI backend / Agent Runtime`
18
-
19
- 其中:
20
-
21
- - botlink 负责云端消息入口
22
- - agents-bridge 负责轮询、路由、会话管理、日志和文件中转
23
- - 本地 Agent Runtime 负责实际执行 Claude Code、Codex 等 CLI
24
-
25
- ## 快速开始
26
-
27
- ### 方式 A:npm 全局安装
28
-
29
- ```bash
30
- npm install -g agents-bridge@latest
31
-
32
- # 交互式初始化:输入 gateway URL、bot token、选择模型
33
- agents-bridge onboard
34
-
35
- # 前台启动
36
- agents-bridge start
37
-
38
- # 或后台启动
39
- agents-bridge start --daemon
40
- ```
41
-
42
- ### 方式 B:Docker Compose
43
-
44
- ```bash
45
- cp .env.example .env
46
- # 编辑 .env,填写 GATEWAY_URL、BOT_TOKEN 等变量
47
-
48
- docker compose up -d
49
- ```
50
-
51
- `docker-compose.yml` 默认会:
52
-
53
- - 挂载 `${WORKSPACE_DIR:-./workspace}` 到容器内 `/workspace`
54
- - 持久化 `/root/.agent-bridge`
55
- - 通过环境变量覆盖网关地址、Bot Token 和日志级别
56
-
57
- ### 方式 C:源码运行
58
-
59
- ```bash
60
- git clone <repo-url>
61
- cd agent-bridge
62
- pnpm install
63
- pnpm build
64
- cp config.example.json config.json
65
- # 编辑 config.json
66
- node dist/entry.js start
67
- ```
68
-
69
- 开发模式:
70
-
71
- ```bash
72
- pnpm dev
73
- ```
74
-
75
- ## CLI 命令
76
-
77
- ```bash
78
- agents-bridge start # 前台启动
79
- agents-bridge start --daemon # 后台启动
80
- agents-bridge start -c ./config.json # 指定配置文件
81
- agents-bridge stop # 停止守护进程
82
- agents-bridge restart # 重启
83
- agents-bridge status # 查看运行状态
84
- agents-bridge onboard # 交互式初始化
85
- agents-bridge add-agent # 交互式追加一个 agent
86
- agents-bridge add-agent --account-id office-bot
87
- agents-bridge add-agent --create-account office-bot --account-gateway-url https://botlink.example.com --account-bot-token bot_xxx
88
- agents-bridge doctor # 检查环境、CLI、API Key 和配置
89
- agents-bridge logs # 查看最近日志
90
- agents-bridge config # 输出当前配置
91
- agents-bridge update # 更新已安装的 CLI
92
- agents-bridge version # 查看版本
93
- agents-bridge help # 查看帮助
94
- ```
95
-
96
- ## 配置
97
-
98
- ### 配置文件搜索顺序
99
-
100
- 当前实现会按以下顺序读取第一个存在的配置文件:
101
-
102
- 1. `agents-bridge start -c /path/to/config.json`
103
- 2. 环境变量 `AGENT_BRIDGE_CONFIG`
104
- 3. 当前目录 `./config.json`
105
- 4. 用户目录 `~/.agent-bridge/config.json`
106
-
107
- ### 最小配置示例
108
-
109
- ```json
110
- {
111
- "channels": {
112
- "botlink": {
113
- "accounts": {
114
- "default": {
115
- "gateway_url": "https://your-botlink.com",
116
- "bot_token": "bot_xxx",
117
- "poll_timeout": 30,
118
- "retry_interval": 5,
119
- "max_retry_interval": 60
120
- }
121
- }
122
- }
123
- },
124
- "agents": {
125
- "defaults": {
126
- "model": {
127
- "primary": "claude-cli/opus-4.6"
128
- }
129
- },
130
- "list": [
131
- {
132
- "id": "default",
133
- "default": true
134
- }
135
- ]
136
- },
137
- "bindings": [
138
- {
139
- "agentId": "default",
140
- "match": {
141
- "channel": "*"
142
- }
143
- }
144
- ]
145
- }
146
- ```
147
-
148
- 完整示例见:
149
-
150
- - [config.example.json](./config.example.json)
151
- - [config.multi-agent.example.json](./config.multi-agent.example.json)
152
-
153
- botlink 配置读取时兼容旧的顶层 `gateway_url` / `bot_token` 写法,但新的配置写入会统一落到 `channels.botlink.accounts`。
154
-
155
- 兼容性说明:
156
-
157
- - 老配置仍可继续使用:顶层 `channels.botlink.gateway_url` / `bot_token` 仍然会被读取
158
- - 新示例配置统一使用 `channels.botlink.accounts` 格式
159
- - `add-agent` 会兼容读取老配置,并在保存时自动迁移成 `channels.botlink.accounts`
160
- - `onboard` 会先备份已有配置,再按新的 `channels.botlink.accounts` 格式重建配置
161
-
162
- ### 关键配置项
163
-
164
- - `channels.botlink.accounts.<accountId>.gateway_url`:botlink 网关地址
165
- - `channels.botlink.accounts.<accountId>.bot_token`:bot token
166
- - `agents.defaults.model.primary`:主模型引用,例如 `claude-cli/opus-4.6`、`codex-cli/gpt-5.4` 或 `qwen-cli/qwen3-coder-plus`
167
- - `agents.defaults.model.fallbacks`:备用模型链
168
- - `agents.defaults.cliBackends`:CLI backend 启动参数与运行模式
169
- - `agents.list`:命名 agent 列表
170
- - `bindings`:消息路由规则,可按 `channel`、`accountId`、`peer.id` 等条件匹配
171
- - `files.temp_dir`:文件中转目录
172
- - `logging.level`:日志级别
173
-
174
- ### 多 agent 配置
175
-
176
- 多 agent 模式通过 `agents.list` 定义运行实例,通过 `bindings` 决定消息路由到哪个 agent。
177
-
178
- 追加 agent 时,也可以直接运行:
179
-
180
- ```bash
181
- agents-bridge add-agent
182
- ```
183
-
184
- 该命令会在现有配置上:
185
-
186
- - 追加一个 `agents.list[]` 项
187
- - 可选绑定已有 botlink `accountId`
188
- - 可选创建新的 botlink account 并立刻绑定
189
- - 兼容旧的顶层 botlink 配置写法,并在保存时自动迁移成 `channels.botlink.accounts.default`
190
- - 写入前自动备份原配置文件
191
-
192
- 如果现有 account 已被其他 agent 占用,交互流程会提示该 account 当前绑定到哪个 agent,并允许直接创建新的 account 后继续绑定。
193
-
194
- 也可以显式指定:
195
-
196
- ```bash
197
- agents-bridge add-agent --account-id office-bot
198
- agents-bridge add-agent --create-account office-bot --account-gateway-url https://botlink.example.com --account-bot-token bot_xxx
199
- ```
200
-
201
- 例如:
202
-
203
- - 一个 bot 绑定到 Codex
204
- - 一个 bot 绑定到 Claude Code
205
- - 不同工作区使用不同 `workspace`
206
- - 通过预置 `cliSessionId` 复用既有 CLI 会话
207
-
208
- 详见 [config.multi-agent.example.json](./config.multi-agent.example.json)。
209
-
210
- ### 环境变量覆盖
211
-
212
- 环境变量可覆盖配置文件中的对应值:
213
-
214
- | 环境变量 | 覆盖字段 | 说明 |
215
- |---|---|---|
216
- | `AGENT_BRIDGE_CONFIG` | 配置文件路径 | 指定要加载的 `config.json` |
217
- | `AGENT_BRIDGE_GATEWAY_URL` | `channels.botlink.accounts.default.gateway_url` 或旧格式 `channels.botlink.gateway_url` | 优先覆盖默认 botlink 账号;旧配置会覆盖顶层网关地址 |
218
- | `AGENT_BRIDGE_BOT_TOKEN` | `channels.botlink.accounts.default.bot_token` 或旧格式 `channels.botlink.bot_token` | 优先覆盖默认 botlink 账号;旧配置会覆盖顶层 Bot Token |
219
- | `AGENT_BRIDGE_LOG_LEVEL` | `logging.level` | 日志级别 |
220
- | `AGENT_BRIDGE_TEMP_DIR` | `files.temp_dir` | 临时文件目录 |
221
- | `ANTHROPIC_API_KEY` | 环境变量 | 供诊断或后续 API 模式使用 |
222
- | `OPENAI_API_KEY` | 环境变量 | 供诊断或后续 API 模式使用 |
223
-
224
- ## 模型与运行模式
225
-
226
- 当前消息执行链路仅支持 CLI 模式模型,也就是:
227
-
228
- - `claude-cli/...`
229
- - `codex-cli/...`
230
- - `qwen-cli/...`
231
-
232
- 配置层已经允许 `anthropic/...`、`openai/...` 这类 API provider 引用,但当前主运行时尚未实现 API 模式;若把它们设为主模型,程序会返回“当前仅支持 CLI 模式模型”。
233
-
234
- ## 数据目录
235
-
236
- 运行时数据默认保存在 `~/.agent-bridge/`:
237
-
238
- ```text
239
- ~/.agent-bridge/
240
- ├── config.json
241
- ├── agent-bridge.pid
242
- ├── agents/
243
- │ └── <agentId>/
244
- │ └── cli-sessions.json
245
- ├── data/
246
- │ ├── files/
247
- │ ├── logs/
248
- │ └── sessions/
249
- └── skills/
250
- ```
251
-
252
- 其中:
253
-
254
- - `config.json`:全局配置文件
255
- - `agent-bridge.pid`:守护进程 PID 文件
256
- - `agents/<agentId>/cli-sessions.json`:每个 agent 的 CLI 会话映射
257
- - `data/logs/`:按天滚动的日志文件
258
- - `skills/`:自定义技能目录
259
-
260
- ## 项目结构
261
-
262
- ```text
263
- agent-bridge/
264
- ├── bin/ # CLI 入口
265
- ├── src/
266
- │ ├── cli/ # start / stop / onboard / doctor 等命令
267
- │ ├── agents/ # Agent 解析、路由、CLI 执行
268
- │ ├── channels/ # Channel 插件(如 botlink)
269
- │ ├── config/ # 配置加载、校验、默认值
270
- │ ├── types/ # 类型定义
271
- │ └── logger.ts # 日志
272
- ├── extensions/ # 扩展点
273
- ├── skills/ # 本地技能目录
274
- ├── config.example.json
275
- ├── config.multi-agent.example.json
276
- ├── docker-compose.yml
277
- ├── Dockerfile
278
- └── package.json
279
- ```
280
-
281
- ## 开发
282
-
283
- ```bash
284
- pnpm install
285
- pnpm build
286
- pnpm typecheck
287
- pnpm dev
288
- ```
289
-
290
- 环境要求:
291
-
292
- - Node.js >= 22.0.0
293
- - pnpm >= 9.0.0
294
-
295
- ## 许可证
296
-
297
- [MIT](./LICENSE)
1
+ # agents-bridge
2
+
3
+ 本地 Agent 网关,部署在客户本地机器上,通过长轮询连接 botlink 平台,把消息转发给本机运行的 Claude Code / Codex 等 Agent 运行时。
4
+
5
+ 核心特点:
6
+
7
+ - 客户端主动外连,无需暴露入站端口
8
+ - 支持 `claude-cli/...`、`codex-cli/...`、`qwen-cli/...` 这类 CLI 模型引用
9
+ - 支持多 agent 配置与按绑定规则路由
10
+ - 提供 `onboard`、`add-agent`、`doctor`、`logs`、`config` 等运维命令
11
+ - 支持前台运行和守护进程模式
12
+
13
+ ## 架构概览
14
+
15
+ 链路可以简化为:
16
+
17
+ `botlink cloud -> 长轮询 -> agents-bridge -> 本地 CLI backend / Agent Runtime`
18
+
19
+ 其中:
20
+
21
+ - botlink 负责云端消息入口
22
+ - agents-bridge 负责轮询、路由、会话管理、日志和文件中转
23
+ - 本地 Agent Runtime 负责实际执行 Claude Code、Codex 等 CLI
24
+
25
+ ## 快速开始
26
+
27
+ ### 方式 A:npm 全局安装
28
+
29
+ ```bash
30
+ npm install -g agents-bridge@latest
31
+
32
+ # 交互式初始化:输入 gateway URL、bot token、选择模型
33
+ agents-bridge onboard
34
+
35
+ # 前台启动
36
+ agents-bridge start
37
+
38
+ # 或后台启动
39
+ agents-bridge start --daemon
40
+ ```
41
+
42
+ ### 方式 B:Docker Compose
43
+
44
+ ```bash
45
+ cp .env.example .env
46
+ # 编辑 .env,填写 GATEWAY_URL、BOT_TOKEN 等变量
47
+
48
+ docker compose up -d
49
+ ```
50
+
51
+ `docker-compose.yml` 默认会:
52
+
53
+ - 挂载 `${WORKSPACE_DIR:-./workspace}` 到容器内 `/workspace`
54
+ - 持久化 `/root/.agent-bridge`
55
+ - 通过环境变量覆盖网关地址、Bot Token 和日志级别
56
+
57
+ ### 方式 C:源码运行
58
+
59
+ ```bash
60
+ git clone <repo-url>
61
+ cd agent-bridge
62
+ pnpm install
63
+ pnpm build
64
+ cp config.example.json config.json
65
+ # 编辑 config.json
66
+ node dist/entry.js start
67
+ ```
68
+
69
+ 开发模式:
70
+
71
+ ```bash
72
+ pnpm dev
73
+ ```
74
+
75
+ ## CLI 命令
76
+
77
+ ```bash
78
+ agents-bridge start # 前台启动
79
+ agents-bridge start --daemon # 后台启动
80
+ agents-bridge start -c ./config.json # 指定配置文件
81
+ agents-bridge stop # 停止守护进程
82
+ agents-bridge restart # 重启
83
+ agents-bridge status # 查看运行状态
84
+ agents-bridge onboard # 交互式初始化
85
+ agents-bridge add-agent # 交互式追加一个 agent
86
+ agents-bridge add-agent --account-id office-bot
87
+ agents-bridge add-agent --create-account office-bot --account-gateway-url https://botlink.example.com --account-bot-token bot_xxx
88
+ agents-bridge doctor # 检查环境、CLI、API Key 和配置
89
+ agents-bridge logs # 查看最近日志
90
+ agents-bridge config # 输出当前配置
91
+ agents-bridge update # 更新已安装的 CLI
92
+ agents-bridge version # 查看版本
93
+ agents-bridge help # 查看帮助
94
+ ```
95
+
96
+ ## 配置
97
+
98
+ ### 配置文件搜索顺序
99
+
100
+ 当前实现会按以下顺序读取第一个存在的配置文件:
101
+
102
+ 1. `agents-bridge start -c /path/to/config.json`
103
+ 2. 环境变量 `AGENT_BRIDGE_CONFIG`
104
+ 3. 当前目录 `./config.json`
105
+ 4. 用户目录 `~/.agent-bridge/config.json`
106
+
107
+ ### 最小配置示例
108
+
109
+ ```json
110
+ {
111
+ "channels": {
112
+ "botlink": {
113
+ "accounts": {
114
+ "default": {
115
+ "gateway_url": "https://your-botlink.com",
116
+ "bot_token": "bot_xxx",
117
+ "poll_timeout": 30,
118
+ "retry_interval": 5,
119
+ "max_retry_interval": 60
120
+ }
121
+ }
122
+ }
123
+ },
124
+ "agents": {
125
+ "defaults": {
126
+ "model": {
127
+ "primary": "claude-cli/opus-4.6"
128
+ }
129
+ },
130
+ "list": [
131
+ {
132
+ "id": "default",
133
+ "default": true
134
+ }
135
+ ]
136
+ },
137
+ "bindings": [
138
+ {
139
+ "agentId": "default",
140
+ "match": {
141
+ "channel": "*"
142
+ }
143
+ }
144
+ ]
145
+ }
146
+ ```
147
+
148
+ 完整示例见:
149
+
150
+ - [config.example.json](./config.example.json)
151
+ - [config.multi-agent.example.json](./config.multi-agent.example.json)
152
+
153
+ botlink 配置读取时兼容旧的顶层 `gateway_url` / `bot_token` 写法,但新的配置写入会统一落到 `channels.botlink.accounts`。
154
+
155
+ 兼容性说明:
156
+
157
+ - 老配置仍可继续使用:顶层 `channels.botlink.gateway_url` / `bot_token` 仍然会被读取
158
+ - 新示例配置统一使用 `channels.botlink.accounts` 格式
159
+ - `add-agent` 会兼容读取老配置,并在保存时自动迁移成 `channels.botlink.accounts`
160
+ - `onboard` 会先备份已有配置,再按新的 `channels.botlink.accounts` 格式重建配置
161
+
162
+ ### 关键配置项
163
+
164
+ - `channels.botlink.accounts.<accountId>.gateway_url`:botlink 网关地址
165
+ - `channels.botlink.accounts.<accountId>.bot_token`:bot token
166
+ - `agents.defaults.model.primary`:主模型引用,例如 `claude-cli/opus-4.6`、`codex-cli/gpt-5.4` 或 `qwen-cli/qwen3-coder-plus`
167
+ - `agents.defaults.model.fallbacks`:备用模型链
168
+ - `agents.defaults.cliBackends`:CLI backend 启动参数与运行模式
169
+ - `agents.list`:命名 agent 列表
170
+ - `bindings`:消息路由规则,可按 `channel`、`accountId`、`peer.id` 等条件匹配
171
+ - `files.temp_dir`:文件中转目录
172
+ - `logging.level`:日志级别
173
+
174
+ ### 多 agent 配置
175
+
176
+ 多 agent 模式通过 `agents.list` 定义运行实例,通过 `bindings` 决定消息路由到哪个 agent。
177
+
178
+ 追加 agent 时,也可以直接运行:
179
+
180
+ ```bash
181
+ agents-bridge add-agent
182
+ ```
183
+
184
+ 该命令会在现有配置上:
185
+
186
+ - 追加一个 `agents.list[]` 项
187
+ - 可选绑定已有 botlink `accountId`
188
+ - 可选创建新的 botlink account 并立刻绑定
189
+ - 兼容旧的顶层 botlink 配置写法,并在保存时自动迁移成 `channels.botlink.accounts.default`
190
+ - 写入前自动备份原配置文件
191
+
192
+ 如果现有 account 已被其他 agent 占用,交互流程会提示该 account 当前绑定到哪个 agent,并允许直接创建新的 account 后继续绑定。
193
+
194
+ 也可以显式指定:
195
+
196
+ ```bash
197
+ agents-bridge add-agent --account-id office-bot
198
+ agents-bridge add-agent --create-account office-bot --account-gateway-url https://botlink.example.com --account-bot-token bot_xxx
199
+ ```
200
+
201
+ 例如:
202
+
203
+ - 一个 bot 绑定到 Codex
204
+ - 一个 bot 绑定到 Claude Code
205
+ - 不同工作区使用不同 `workspace`
206
+ - 通过预置 `cliSessionId` 复用既有 CLI 会话
207
+
208
+ 详见 [config.multi-agent.example.json](./config.multi-agent.example.json)。
209
+
210
+ ### 环境变量覆盖
211
+
212
+ 环境变量可覆盖配置文件中的对应值:
213
+
214
+ | 环境变量 | 覆盖字段 | 说明 |
215
+ |---|---|---|
216
+ | `AGENT_BRIDGE_CONFIG` | 配置文件路径 | 指定要加载的 `config.json` |
217
+ | `AGENT_BRIDGE_GATEWAY_URL` | `channels.botlink.accounts.default.gateway_url` 或旧格式 `channels.botlink.gateway_url` | 优先覆盖默认 botlink 账号;旧配置会覆盖顶层网关地址 |
218
+ | `AGENT_BRIDGE_BOT_TOKEN` | `channels.botlink.accounts.default.bot_token` 或旧格式 `channels.botlink.bot_token` | 优先覆盖默认 botlink 账号;旧配置会覆盖顶层 Bot Token |
219
+ | `AGENT_BRIDGE_LOG_LEVEL` | `logging.level` | 日志级别 |
220
+ | `AGENT_BRIDGE_TEMP_DIR` | `files.temp_dir` | 临时文件目录 |
221
+ | `ANTHROPIC_API_KEY` | 环境变量 | 供诊断或后续 API 模式使用 |
222
+ | `OPENAI_API_KEY` | 环境变量 | 供诊断或后续 API 模式使用 |
223
+
224
+ ## 模型与运行模式
225
+
226
+ 当前消息执行链路仅支持 CLI 模式模型,也就是:
227
+
228
+ - `claude-cli/...`
229
+ - `codex-cli/...`
230
+ - `qwen-cli/...`
231
+
232
+ 配置层已经允许 `anthropic/...`、`openai/...` 这类 API provider 引用,但当前主运行时尚未实现 API 模式;若把它们设为主模型,程序会返回“当前仅支持 CLI 模式模型”。
233
+
234
+ ## 数据目录
235
+
236
+ 运行时数据默认保存在 `~/.agent-bridge/`:
237
+
238
+ ```text
239
+ ~/.agent-bridge/
240
+ ├── config.json
241
+ ├── agent-bridge.pid
242
+ ├── agents/
243
+ │ └── <agentId>/
244
+ │ └── cli-sessions.json
245
+ ├── data/
246
+ │ ├── files/
247
+ │ ├── logs/
248
+ │ └── sessions/
249
+ └── skills/
250
+ ```
251
+
252
+ 其中:
253
+
254
+ - `config.json`:全局配置文件
255
+ - `agent-bridge.pid`:守护进程 PID 文件
256
+ - `agents/<agentId>/cli-sessions.json`:每个 agent 的 CLI 会话映射
257
+ - `data/logs/`:按天滚动的日志文件
258
+ - `skills/`:自定义技能目录
259
+
260
+ ## 项目结构
261
+
262
+ ```text
263
+ agent-bridge/
264
+ ├── bin/ # CLI 入口
265
+ ├── src/
266
+ │ ├── cli/ # start / stop / onboard / doctor 等命令
267
+ │ ├── agents/ # Agent 解析、路由、CLI 执行
268
+ │ ├── channels/ # Channel 插件(如 botlink)
269
+ │ ├── config/ # 配置加载、校验、默认值
270
+ │ ├── types/ # 类型定义
271
+ │ └── logger.ts # 日志
272
+ ├── extensions/ # 扩展点
273
+ ├── skills/ # 本地技能目录
274
+ ├── config.example.json
275
+ ├── config.multi-agent.example.json
276
+ ├── docker-compose.yml
277
+ ├── Dockerfile
278
+ └── package.json
279
+ ```
280
+
281
+ ## 开发
282
+
283
+ ```bash
284
+ pnpm install
285
+ pnpm build
286
+ pnpm typecheck
287
+ pnpm dev
288
+ ```
289
+
290
+ 环境要求:
291
+
292
+ - Node.js >= 22.0.0
293
+ - pnpm >= 9.0.0
294
+
295
+ ## 许可证
296
+
297
+ [MIT](./LICENSE)
@@ -1,13 +1,13 @@
1
- #!/usr/bin/env node
2
-
3
- // agents-bridge CLI entry point
4
- // Used by: npm install -g agents-bridge / npx agents-bridge
5
-
6
- import { fileURLToPath } from 'node:url'
7
- import { dirname, resolve } from 'node:path'
8
- import { pathToFileURL } from 'node:url'
9
-
10
- const __dirname = dirname(fileURLToPath(import.meta.url))
11
-
12
- // Import the compiled entry point
13
- await import(pathToFileURL(resolve(__dirname, '..', 'dist', 'entry.js')).href)
1
+ #!/usr/bin/env node
2
+
3
+ // agents-bridge CLI entry point
4
+ // Used by: npm install -g agents-bridge / npx agents-bridge
5
+
6
+ import { fileURLToPath } from 'node:url'
7
+ import { dirname, resolve } from 'node:path'
8
+ import { pathToFileURL } from 'node:url'
9
+
10
+ const __dirname = dirname(fileURLToPath(import.meta.url))
11
+
12
+ // Import the compiled entry point
13
+ await import(pathToFileURL(resolve(__dirname, '..', 'dist', 'entry.js')).href)