lark-kiro-bridge 0.3.1 → 0.5.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 CHANGED
@@ -59,18 +59,20 @@
59
59
  - 🔘 **Clickable buttons** — `/model` `/help` `/status` `/ws list` `/config` are all interactive cards, zero command memorization
60
60
  - 📝 **`/config` in-Feishu form** — Edit access control & preferences inside Feishu, takes effect instantly, anti-lockout validation
61
61
  - 🚄 **Rapid-fire message merging** — Multiple short messages within 200ms merge into a single Kiro call, no more abort-and-retry
62
+ - 🧠 **`/steering` to manage Kiro instruction files in Feishu** — list/view/edit/new/rm, global or project scope, edit via in-Feishu form, persists permanently
62
63
  - 🎤 **Voice input** — Send a voice message in Feishu → auto-transcribed (Feishu ASR) → fed to Kiro. Requires `ffmpeg` and ASR scope.
63
64
  - 🛡️ **Process group kill** — `detached: true` + `process.kill(-pid)` reaches kiro-cli's grandchildren
64
65
  - ⏱ **Idle watchdog** — Stuck process auto-killed; tunable globally and per-chat
65
66
  - 🔐 **Three-tier access control** — User / chat / admin allowlists. **DMs always bypass the chat allowlist** so you can never lock yourself out.
66
- - 🍎 **macOS native daemon** — launchd auto-restart on crash, login auto-start
67
+ - 🐧 **Cross-platform daemon** — macOS launchd / Linux systemd --user / Windows Task Scheduler. Auto-restart on crash, login auto-start.
68
+ - 🖥️ **`/ps` `/exit` process management** — List host bridge processes from Feishu, stop with one button
67
69
  - 📊 **`/doctor` self-diagnosis** — Feed logs back to Kiro to analyze its own failures
68
70
 
69
71
  ## 🚀 Quick Start
70
72
 
71
73
  ### Prerequisites
72
74
 
73
- - macOS (Linux / Windows daemon on roadmap)
75
+ - macOS / Linux / Windows
74
76
  - Node.js ≥ 20
75
77
  - `kiro-cli` installed and logged in
76
78
  - A Feishu / Lark account (personal edition is fine — the QR wizard auto-creates the app)
@@ -110,11 +112,22 @@ lark-kiro-bridge init --app-id cli_xxx --app-secret xxx
110
112
  ### Background daemon (recommended for production)
111
113
 
112
114
  ```bash
113
- lark-kiro-bridge start # Install launchd plist and start
115
+ lark-kiro-bridge start # Install platform service and start
114
116
  lark-kiro-bridge status # Check status
115
117
  lark-kiro-bridge restart # Restart
116
118
  ```
117
119
 
120
+ Platform mapping:
121
+
122
+ | Platform | Implementation | Service path |
123
+ |---|---|---|
124
+ | **macOS** | launchd user agent | `~/Library/LaunchAgents/ai.lark-kiro-bridge.bot.plist` |
125
+ | **Linux** | systemd user unit | `~/.config/systemd/user/lark-kiro-bridge.service` |
126
+ | **Windows** | Task Scheduler ONLOGON | Task `LarkKiroBridge.Bot`, launcher `~/.lark-kiro-bridge/daemon-launcher.cmd` |
127
+
128
+ > Linux: to keep the daemon running after logout (servers), run once:
129
+ > `loginctl enable-linger $USER`
130
+
118
131
  ## 📖 Slash Commands
119
132
 
120
133
  ### Daily commands (everyone)
@@ -129,6 +142,8 @@ lark-kiro-bridge restart # Restart
129
142
  | `/pwd` | `/cwd` | Current working directory |
130
143
  | `/ws list` | — | List named workspaces with switch buttons |
131
144
  | `/timeout [N\|off]` | `/to` | Idle watchdog threshold (minutes) |
145
+ | `/ps` | — | List all bridge processes on this host |
146
+ | `/steering` | `/memory` `/mem` | List Kiro steering files for current project (card + buttons) |
132
147
  | `/doctor [desc]` | — | Let Kiro inspect logs and diagnose |
133
148
 
134
149
  ### Admin commands
@@ -140,6 +155,8 @@ lark-kiro-bridge restart # Restart
140
155
  | `/ws save <name>` | Save current cwd as a named workspace |
141
156
  | `/ws use <name>` | Switch to a named workspace |
142
157
  | `/ws remove <name>` | Delete a named workspace |
158
+ | `/steering edit/new/rm <name>` | Edit / create / delete a steering file |
159
+ | `/exit <id\|#>` | Stop a bridge process (self / others) |
143
160
  | `/reconnect` | Force reconnect Feishu WebSocket |
144
161
 
145
162
  > By default everyone is admin (`access.admins` empty). Tighten before sharing with a team.
@@ -283,9 +300,9 @@ Conventions: TypeScript strict / Biome lint / vitest tests / conventional commit
283
300
 
284
301
  - **v0.2** ✅ Current (structured cards + button callbacks + Slack-style tool panels + QR app binding + voice input via ASR)
285
302
  - **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
288
- - **v0.5** Group-name workspace heuristic (joining "agenzo" group defaults cwd to agenzo dir)
303
+ - **v0.4** Linux systemd / Windows Task Scheduler daemon + `/ps` `/exit` in-Feishu process management
304
+ - **v0.5** `/steering` to manage Kiro instruction files in Feishu (list/view/edit/new/rm, global/project scope)
305
+ - **v0.6** `/cron` scheduled tasks — natural-language or cron-expression schedules, e.g. "every day 6am summarize trending"
289
306
  - **v1.0** Centralized server deployment / multi-user isolation / web admin panel
290
307
 
291
308
  ## 📄 License
package/README.md CHANGED
@@ -59,18 +59,20 @@
59
59
  - 🔘 **按钮可点** — `/model` `/help` `/status` `/ws list` `/config` 全部可点击操作,0 命令记忆
60
60
  - 📝 **`/config` 飞书内表单** — 在飞书里改访问控制和偏好,即时生效,防自锁校验
61
61
  - 🚄 **rapid-fire 消息合并** — 200ms 内连发的多条短消息自动合并为一次 Kiro 调用,不再被前一条 abort
62
+ - 🧠 **`/steering` 飞书内管理 Kiro 指令文件** — list/view/edit/new/rm,全局或项目 scope,飞书表单直接改,永久生效
62
63
  - 🎤 **语音输入** — 飞书发语音消息 → 自动转写(飞书 ASR)→ 喂给 Kiro,需 `ffmpeg` 和 ASR 权限
63
64
  - 🛡️ **进程组 kill** — `detached: true` + `process.kill(-pid)` 杀掉 kiro-cli 全部子孙
64
65
  - ⏱ **Idle Watchdog** — 卡住自动 killTree,可全局 / per-chat 配置
65
66
  - 🔐 **三层访问控制** — 用户 / 群 / 管理员白名单,**DM 永远豁免群白名单**,不会把自己锁外面
66
- - 🍎 **macOS 原生守护** — launchd 崩溃自动拉起,开机自启
67
+ - 🐧 **跨平台守护**macOS launchd / Linux systemd --user / Windows Task Scheduler,崩溃自动拉起,开机自启
68
+ - 🖥️ **`/ps` `/exit` 进程管理** — 飞书内列出本机所有 bridge 进程,按按钮停止
67
69
  - 📊 **`/doctor` 自诊断** — 让 Kiro 看日志自己分析故障
68
70
 
69
71
  ## 🚀 快速上手
70
72
 
71
73
  ### 前置条件
72
74
 
73
- - macOSLinux / Windows daemon 在路线图)
75
+ - macOS / Linux / Windows
74
76
  - Node.js ≥ 20
75
77
  - `kiro-cli` 已安装并登录
76
78
  - 飞书账号(个人版即可,扫码自动创建应用)
@@ -110,11 +112,22 @@ lark-kiro-bridge init --app-id cli_xxx --app-secret xxx
110
112
  ### 后台守护(推荐生产)
111
113
 
112
114
  ```bash
113
- lark-kiro-bridge start # 装 launchd plist 并启动
115
+ lark-kiro-bridge start # 装平台原生服务并启动
114
116
  lark-kiro-bridge status # 看状态
115
117
  lark-kiro-bridge restart # 重启
116
118
  ```
117
119
 
120
+ 平台映射:
121
+
122
+ | 平台 | 实现 | 服务定义路径 |
123
+ |---|---|---|
124
+ | **macOS** | launchd 用户代理 | `~/Library/LaunchAgents/ai.lark-kiro-bridge.bot.plist` |
125
+ | **Linux** | systemd 用户单元 | `~/.config/systemd/user/lark-kiro-bridge.service` |
126
+ | **Windows** | Task Scheduler ONLOGON | 任务名 `LarkKiroBridge.Bot`,启动器 `~/.lark-kiro-bridge/daemon-launcher.cmd` |
127
+
128
+ > Linux 想让 daemon 在用户登出后还跑(比如服务器场景),跑一次:
129
+ > `loginctl enable-linger $USER`
130
+
118
131
  ## 📖 飞书内的命令
119
132
 
120
133
  ### 日常命令(所有人)
@@ -129,6 +142,8 @@ lark-kiro-bridge restart # 重启
129
142
  | `/pwd` | `/cwd` | 当前工作目录 |
130
143
  | `/ws list` | — | 列出命名工作区,按钮一键切 |
131
144
  | `/timeout [N\|off]` | `/to` | idle watchdog 阈值(分钟) |
145
+ | `/ps` | — | 列出本机所有 bridge 进程 |
146
+ | `/steering` | `/memory` `/mem` | 列出当前项目的 Kiro 指令文件(卡片+按钮) |
132
147
  | `/doctor [描述]` | — | 让 Kiro 看日志自诊断 |
133
148
 
134
149
  ### 管理员命令
@@ -140,6 +155,8 @@ lark-kiro-bridge restart # 重启
140
155
  | `/ws save <name>` | 把当前 cwd 存为命名工作区 |
141
156
  | `/ws use <name>` | 切到命名工作区 |
142
157
  | `/ws remove <name>` | 删除命名工作区 |
158
+ | `/steering edit/new/rm <name>` | 编辑 / 新建 / 删除 steering 文件 |
159
+ | `/exit <id\|#>` | 停止指定 bridge 进程(自己 / 他人) |
143
160
  | `/reconnect` | 强制重连飞书 WebSocket |
144
161
 
145
162
  > 默认所有人都是管理员(`access.admins` 为空)。团队推广前请收紧。
@@ -281,9 +298,9 @@ node bin/lark-kiro-bridge.mjs run # 本地跑(先 stop daemon)
281
298
 
282
299
  - **v0.2** ✅ 当前版(结构化卡片 + 按钮回调 + Slack-style 工具面板 + 扫码绑定 + 语音输入 ASR)
283
300
  - **v0.3** ✅ `/config` 飞书内表单 + 三层访问控制(DM 豁免群白名单)+ rapid-fire 消息合并
284
- - **v0.4** Linux systemd / Windows Task Scheduler 守护
285
- - **v0.4** `/ps` `/exit` 飞书内调用本机进程
286
- - **v0.5** 群名 工作区的启发式默认(进 agenzo 群默认在 agenzo 目录)
301
+ - **v0.4** Linux systemd / Windows Task Scheduler 守护 + `/ps` `/exit` 飞书内进程管理
302
+ - **v0.5** `/steering` 飞书内管理 Kiro 指令文件(list/view/edit/new/rm,global/project scope)
303
+ - **v0.6** `/cron` 定时任务 自然语言或 cron 表达式设定,"每天 6 点总结 trending"
287
304
  - **v1.0** 服务器集中部署 / 多用户隔离 / Web 管理面板
288
305
 
289
306
  ## 📄 License