lark-kiro-bridge 0.3.1 → 0.4.0
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 +18 -5
- package/README.md +18 -5
- package/dist/cli.js +603 -191
- package/dist/index.d.ts +13 -0
- package/dist/index.js +292 -101
- package/package.json +1 -1
package/README.en.md
CHANGED
|
@@ -63,14 +63,15 @@
|
|
|
63
63
|
- 🛡️ **Process group kill** — `detached: true` + `process.kill(-pid)` reaches kiro-cli's grandchildren
|
|
64
64
|
- ⏱ **Idle watchdog** — Stuck process auto-killed; tunable globally and per-chat
|
|
65
65
|
- 🔐 **Three-tier access control** — User / chat / admin allowlists. **DMs always bypass the chat allowlist** so you can never lock yourself out.
|
|
66
|
-
-
|
|
66
|
+
- 🐧 **Cross-platform daemon** — macOS launchd / Linux systemd --user / Windows Task Scheduler. Auto-restart on crash, login auto-start.
|
|
67
|
+
- 🖥️ **`/ps` `/exit` process management** — List host bridge processes from Feishu, stop with one button
|
|
67
68
|
- 📊 **`/doctor` self-diagnosis** — Feed logs back to Kiro to analyze its own failures
|
|
68
69
|
|
|
69
70
|
## 🚀 Quick Start
|
|
70
71
|
|
|
71
72
|
### Prerequisites
|
|
72
73
|
|
|
73
|
-
- macOS
|
|
74
|
+
- macOS / Linux / Windows
|
|
74
75
|
- Node.js ≥ 20
|
|
75
76
|
- `kiro-cli` installed and logged in
|
|
76
77
|
- A Feishu / Lark account (personal edition is fine — the QR wizard auto-creates the app)
|
|
@@ -110,11 +111,22 @@ lark-kiro-bridge init --app-id cli_xxx --app-secret xxx
|
|
|
110
111
|
### Background daemon (recommended for production)
|
|
111
112
|
|
|
112
113
|
```bash
|
|
113
|
-
lark-kiro-bridge start # Install
|
|
114
|
+
lark-kiro-bridge start # Install platform service and start
|
|
114
115
|
lark-kiro-bridge status # Check status
|
|
115
116
|
lark-kiro-bridge restart # Restart
|
|
116
117
|
```
|
|
117
118
|
|
|
119
|
+
Platform mapping:
|
|
120
|
+
|
|
121
|
+
| Platform | Implementation | Service path |
|
|
122
|
+
|---|---|---|
|
|
123
|
+
| **macOS** | launchd user agent | `~/Library/LaunchAgents/ai.lark-kiro-bridge.bot.plist` |
|
|
124
|
+
| **Linux** | systemd user unit | `~/.config/systemd/user/lark-kiro-bridge.service` |
|
|
125
|
+
| **Windows** | Task Scheduler ONLOGON | Task `LarkKiroBridge.Bot`, launcher `~/.lark-kiro-bridge/daemon-launcher.cmd` |
|
|
126
|
+
|
|
127
|
+
> Linux: to keep the daemon running after logout (servers), run once:
|
|
128
|
+
> `loginctl enable-linger $USER`
|
|
129
|
+
|
|
118
130
|
## 📖 Slash Commands
|
|
119
131
|
|
|
120
132
|
### Daily commands (everyone)
|
|
@@ -129,6 +141,7 @@ lark-kiro-bridge restart # Restart
|
|
|
129
141
|
| `/pwd` | `/cwd` | Current working directory |
|
|
130
142
|
| `/ws list` | — | List named workspaces with switch buttons |
|
|
131
143
|
| `/timeout [N\|off]` | `/to` | Idle watchdog threshold (minutes) |
|
|
144
|
+
| `/ps` | — | List all bridge processes on this host |
|
|
132
145
|
| `/doctor [desc]` | — | Let Kiro inspect logs and diagnose |
|
|
133
146
|
|
|
134
147
|
### Admin commands
|
|
@@ -140,6 +153,7 @@ lark-kiro-bridge restart # Restart
|
|
|
140
153
|
| `/ws save <name>` | Save current cwd as a named workspace |
|
|
141
154
|
| `/ws use <name>` | Switch to a named workspace |
|
|
142
155
|
| `/ws remove <name>` | Delete a named workspace |
|
|
156
|
+
| `/exit <id\|#>` | Stop a bridge process (self / others) |
|
|
143
157
|
| `/reconnect` | Force reconnect Feishu WebSocket |
|
|
144
158
|
|
|
145
159
|
> By default everyone is admin (`access.admins` empty). Tighten before sharing with a team.
|
|
@@ -283,8 +297,7 @@ Conventions: TypeScript strict / Biome lint / vitest tests / conventional commit
|
|
|
283
297
|
|
|
284
298
|
- **v0.2** ✅ Current (structured cards + button callbacks + Slack-style tool panels + QR app binding + voice input via ASR)
|
|
285
299
|
- **v0.3** ✅ In-Feishu `/config` form + three-tier access control (DM bypass) + rapid-fire message merging
|
|
286
|
-
- **v0.4** Linux systemd / Windows Task Scheduler daemon
|
|
287
|
-
- **v0.4** `/ps` `/exit` to manage host processes from Feishu
|
|
300
|
+
- **v0.4** ✅ Linux systemd / Windows Task Scheduler daemon + `/ps` `/exit` in-Feishu process management
|
|
288
301
|
- **v0.5** Group-name → workspace heuristic (joining "agenzo" group defaults cwd to agenzo dir)
|
|
289
302
|
- **v1.0** Centralized server deployment / multi-user isolation / web admin panel
|
|
290
303
|
|
package/README.md
CHANGED
|
@@ -63,14 +63,15 @@
|
|
|
63
63
|
- 🛡️ **进程组 kill** — `detached: true` + `process.kill(-pid)` 杀掉 kiro-cli 全部子孙
|
|
64
64
|
- ⏱ **Idle Watchdog** — 卡住自动 killTree,可全局 / per-chat 配置
|
|
65
65
|
- 🔐 **三层访问控制** — 用户 / 群 / 管理员白名单,**DM 永远豁免群白名单**,不会把自己锁外面
|
|
66
|
-
-
|
|
66
|
+
- 🐧 **跨平台守护** — macOS launchd / Linux systemd --user / Windows Task Scheduler,崩溃自动拉起,开机自启
|
|
67
|
+
- 🖥️ **`/ps` `/exit` 进程管理** — 飞书内列出本机所有 bridge 进程,按按钮停止
|
|
67
68
|
- 📊 **`/doctor` 自诊断** — 让 Kiro 看日志自己分析故障
|
|
68
69
|
|
|
69
70
|
## 🚀 快速上手
|
|
70
71
|
|
|
71
72
|
### 前置条件
|
|
72
73
|
|
|
73
|
-
- macOS
|
|
74
|
+
- macOS / Linux / Windows
|
|
74
75
|
- Node.js ≥ 20
|
|
75
76
|
- `kiro-cli` 已安装并登录
|
|
76
77
|
- 飞书账号(个人版即可,扫码自动创建应用)
|
|
@@ -110,11 +111,22 @@ lark-kiro-bridge init --app-id cli_xxx --app-secret xxx
|
|
|
110
111
|
### 后台守护(推荐生产)
|
|
111
112
|
|
|
112
113
|
```bash
|
|
113
|
-
lark-kiro-bridge start #
|
|
114
|
+
lark-kiro-bridge start # 装平台原生服务并启动
|
|
114
115
|
lark-kiro-bridge status # 看状态
|
|
115
116
|
lark-kiro-bridge restart # 重启
|
|
116
117
|
```
|
|
117
118
|
|
|
119
|
+
平台映射:
|
|
120
|
+
|
|
121
|
+
| 平台 | 实现 | 服务定义路径 |
|
|
122
|
+
|---|---|---|
|
|
123
|
+
| **macOS** | launchd 用户代理 | `~/Library/LaunchAgents/ai.lark-kiro-bridge.bot.plist` |
|
|
124
|
+
| **Linux** | systemd 用户单元 | `~/.config/systemd/user/lark-kiro-bridge.service` |
|
|
125
|
+
| **Windows** | Task Scheduler ONLOGON | 任务名 `LarkKiroBridge.Bot`,启动器 `~/.lark-kiro-bridge/daemon-launcher.cmd` |
|
|
126
|
+
|
|
127
|
+
> Linux 想让 daemon 在用户登出后还跑(比如服务器场景),跑一次:
|
|
128
|
+
> `loginctl enable-linger $USER`
|
|
129
|
+
|
|
118
130
|
## 📖 飞书内的命令
|
|
119
131
|
|
|
120
132
|
### 日常命令(所有人)
|
|
@@ -129,6 +141,7 @@ lark-kiro-bridge restart # 重启
|
|
|
129
141
|
| `/pwd` | `/cwd` | 当前工作目录 |
|
|
130
142
|
| `/ws list` | — | 列出命名工作区,按钮一键切 |
|
|
131
143
|
| `/timeout [N\|off]` | `/to` | idle watchdog 阈值(分钟) |
|
|
144
|
+
| `/ps` | — | 列出本机所有 bridge 进程 |
|
|
132
145
|
| `/doctor [描述]` | — | 让 Kiro 看日志自诊断 |
|
|
133
146
|
|
|
134
147
|
### 管理员命令
|
|
@@ -140,6 +153,7 @@ lark-kiro-bridge restart # 重启
|
|
|
140
153
|
| `/ws save <name>` | 把当前 cwd 存为命名工作区 |
|
|
141
154
|
| `/ws use <name>` | 切到命名工作区 |
|
|
142
155
|
| `/ws remove <name>` | 删除命名工作区 |
|
|
156
|
+
| `/exit <id\|#>` | 停止指定 bridge 进程(自己 / 他人) |
|
|
143
157
|
| `/reconnect` | 强制重连飞书 WebSocket |
|
|
144
158
|
|
|
145
159
|
> 默认所有人都是管理员(`access.admins` 为空)。团队推广前请收紧。
|
|
@@ -281,8 +295,7 @@ node bin/lark-kiro-bridge.mjs run # 本地跑(先 stop daemon)
|
|
|
281
295
|
|
|
282
296
|
- **v0.2** ✅ 当前版(结构化卡片 + 按钮回调 + Slack-style 工具面板 + 扫码绑定 + 语音输入 ASR)
|
|
283
297
|
- **v0.3** ✅ `/config` 飞书内表单 + 三层访问控制(DM 豁免群白名单)+ rapid-fire 消息合并
|
|
284
|
-
- **v0.4** Linux systemd / Windows Task Scheduler 守护
|
|
285
|
-
- **v0.4** `/ps` `/exit` 飞书内调用本机进程
|
|
298
|
+
- **v0.4** ✅ Linux systemd / Windows Task Scheduler 守护 + `/ps` `/exit` 飞书内进程管理
|
|
286
299
|
- **v0.5** 群名 → 工作区的启发式默认(进 agenzo 群默认在 agenzo 目录)
|
|
287
300
|
- **v1.0** 服务器集中部署 / 多用户隔离 / Web 管理面板
|
|
288
301
|
|