lark-kiro-bridge 0.3.1
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/LICENSE +21 -0
- package/README.en.md +293 -0
- package/README.md +291 -0
- package/bin/lark-kiro-bridge.mjs +5 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +4602 -0
- package/dist/index.d.ts +592 -0
- package/dist/index.js +4252 -0
- package/package.json +95 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 lark-kiro-bridge contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.en.md
ADDED
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
# lark-kiro-bridge
|
|
2
|
+
|
|
3
|
+
> Bridge **Kiro CLI** to Feishu / Lark โ chat code, run commands, and operate Feishu itself.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/lark-kiro-bridge)
|
|
6
|
+
[](https://www.npmjs.com/package/lark-kiro-bridge)
|
|
7
|
+
[](./LICENSE)
|
|
8
|
+
[](https://nodejs.org/)
|
|
9
|
+
[](https://github.com/walterwang0x01/lark-kiro-bridge)
|
|
10
|
+
|
|
11
|
+
[๐จ๐ณ ไธญๆ](./README.md) | ๐บ๐ธ English
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
`@bot` in a group chat or DM the bot directly. Your message goes straight to local `kiro-cli chat`. Replies stream back as **structured cards with native typing cursor**. Each chat keeps an isolated session, and switching directories doesn't lose context.
|
|
16
|
+
|
|
17
|
+
**Why this exists**: cloud AI coding assistants (Cursor / Copilot / Devin) can't touch your local project directories, and have no way to operate Feishu's own APIs. lark-kiro-bridge **=** running local commands inside Feishu **+** orchestrating Feishu APIs from chat โ one bot for both.
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
21
|
+
โ ๐ฌ Kiro โ
|
|
22
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
|
|
23
|
+
โ โ 3 tool calls โธ (folded) โ
|
|
24
|
+
โ โ
Bash โ lark-cli calendar +createโฆโพ โ โ latest tool stays expanded
|
|
25
|
+
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
|
|
26
|
+
โ โ **Command** lark-cli calendar โฆ โ โ
|
|
27
|
+
โ โ **Output** {"ok": true, ...} โ โ
|
|
28
|
+
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
|
|
29
|
+
โ โ
|
|
30
|
+
โ Calendar event created โ
โ
|
|
31
|
+
โ Title: Test โ
|
|
32
|
+
โ When: Today 23:00 ~ 00:00 (1h) โ
|
|
33
|
+
โ โ
|
|
34
|
+
โ โ๏ธ Streaming [ โน Stop ] โ
|
|
35
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Table of Contents
|
|
39
|
+
|
|
40
|
+
<details>
|
|
41
|
+
<summary>Expand</summary>
|
|
42
|
+
|
|
43
|
+
- [โจ Features](#-features)
|
|
44
|
+
- [๐ Quick Start](#-quick-start)
|
|
45
|
+
- [๐ Slash Commands](#-slash-commands)
|
|
46
|
+
- [๐ก Use Cases](#-use-cases)
|
|
47
|
+
- [โ๏ธ Configuration](#๏ธ-configuration)
|
|
48
|
+
- [๐ Documentation](#-documentation)
|
|
49
|
+
- [๐ค Contributing](#-contributing)
|
|
50
|
+
- [๐ License](#-license)
|
|
51
|
+
|
|
52
|
+
</details>
|
|
53
|
+
|
|
54
|
+
## โจ Features
|
|
55
|
+
|
|
56
|
+
- ๐ด **Structured cards** โ Each tool call gets its own collapsible panel; multi-call groups auto-condense; reasoning gets its own panel
|
|
57
|
+
- โก **Streaming typing cursor** โ Native Feishu `streaming_mode` + footer status indicator
|
|
58
|
+
- ๐๏ธ **Workspace plan B** โ `/cd` doesn't drop context: per-`(chat, cwd)` Kiro session map auto-resumes
|
|
59
|
+
- ๐ **Clickable buttons** โ `/model` `/help` `/status` `/ws list` `/config` are all interactive cards, zero command memorization
|
|
60
|
+
- ๐ **`/config` in-Feishu form** โ Edit access control & preferences inside Feishu, takes effect instantly, anti-lockout validation
|
|
61
|
+
- ๐ **Rapid-fire message merging** โ Multiple short messages within 200ms merge into a single Kiro call, no more abort-and-retry
|
|
62
|
+
- ๐ค **Voice input** โ Send a voice message in Feishu โ auto-transcribed (Feishu ASR) โ fed to Kiro. Requires `ffmpeg` and ASR scope.
|
|
63
|
+
- ๐ก๏ธ **Process group kill** โ `detached: true` + `process.kill(-pid)` reaches kiro-cli's grandchildren
|
|
64
|
+
- โฑ **Idle watchdog** โ Stuck process auto-killed; tunable globally and per-chat
|
|
65
|
+
- ๐ **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
|
+
- ๐ **`/doctor` self-diagnosis** โ Feed logs back to Kiro to analyze its own failures
|
|
68
|
+
|
|
69
|
+
## ๐ Quick Start
|
|
70
|
+
|
|
71
|
+
### Prerequisites
|
|
72
|
+
|
|
73
|
+
- macOS (Linux / Windows daemon on roadmap)
|
|
74
|
+
- Node.js โฅ 20
|
|
75
|
+
- `kiro-cli` installed and logged in
|
|
76
|
+
- A Feishu / Lark account (personal edition is fine โ the QR wizard auto-creates the app)
|
|
77
|
+
- **Optional**: `ffmpeg` for voice input (`brew install ffmpeg` / `apt install ffmpeg`) + Feishu `speech_to_text:speech` scope (free-tier tenants are not supported)
|
|
78
|
+
|
|
79
|
+
### 30-second setup โก
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
# 1. Install
|
|
83
|
+
npm i -g lark-kiro-bridge
|
|
84
|
+
|
|
85
|
+
# 2. Run (first launch shows a QR โ scan, approve, done)
|
|
86
|
+
lark-kiro-bridge run
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
> **That's it** โ scanning the QR in Feishu auto-creates the app, writes credentials, and grants required permissions.
|
|
90
|
+
|
|
91
|
+
DM the bot "hi" โ you should see a streaming card immediately.
|
|
92
|
+
|
|
93
|
+
### Already have a Feishu app?
|
|
94
|
+
|
|
95
|
+
If you've manually created an app on the Feishu Open Platform and want to reuse the App ID/Secret:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
lark-kiro-bridge init --manual
|
|
99
|
+
# Interactive prompts for App ID and Secret
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Or one-line:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
lark-kiro-bridge init --app-id cli_xxx --app-secret xxx
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
> Manual Feishu console setup (subscribe `im.message.receive_v1` + `card.action.trigger`) โ [docs/FAQ.md](./docs/FAQ.md)
|
|
109
|
+
|
|
110
|
+
### Background daemon (recommended for production)
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
lark-kiro-bridge start # Install launchd plist and start
|
|
114
|
+
lark-kiro-bridge status # Check status
|
|
115
|
+
lark-kiro-bridge restart # Restart
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## ๐ Slash Commands
|
|
119
|
+
|
|
120
|
+
### Daily commands (everyone)
|
|
121
|
+
|
|
122
|
+
| Command | Aliases | Purpose |
|
|
123
|
+
|---|---|---|
|
|
124
|
+
| `/help` | `/h` `/?` | Help card with action buttons |
|
|
125
|
+
| `/status` | `/s` | Current cwd / session / watchdog |
|
|
126
|
+
| `/model [name]` | `/m` | View / switch / reset model with one click |
|
|
127
|
+
| `/new` | `/reset` | Reset Kiro session for current cwd |
|
|
128
|
+
| `/stop` | `/abort` | Abort the running task |
|
|
129
|
+
| `/pwd` | `/cwd` | Current working directory |
|
|
130
|
+
| `/ws list` | โ | List named workspaces with switch buttons |
|
|
131
|
+
| `/timeout [N\|off]` | `/to` | Idle watchdog threshold (minutes) |
|
|
132
|
+
| `/doctor [desc]` | โ | Let Kiro inspect logs and diagnose |
|
|
133
|
+
|
|
134
|
+
### Admin commands
|
|
135
|
+
|
|
136
|
+
| Command | Purpose |
|
|
137
|
+
|---|---|
|
|
138
|
+
| `/config` | View / edit access control & preferences (in-Feishu form, applies instantly) |
|
|
139
|
+
| `/cd <path>` | Switch working directory (gated by `allowedRoots`) |
|
|
140
|
+
| `/ws save <name>` | Save current cwd as a named workspace |
|
|
141
|
+
| `/ws use <name>` | Switch to a named workspace |
|
|
142
|
+
| `/ws remove <name>` | Delete a named workspace |
|
|
143
|
+
| `/reconnect` | Force reconnect Feishu WebSocket |
|
|
144
|
+
|
|
145
|
+
> By default everyone is admin (`access.admins` empty). Tighten before sharing with a team.
|
|
146
|
+
|
|
147
|
+
**Trigger rules**: DMs respond to anything; group chats require `@bot`; `@all` is never answered.
|
|
148
|
+
|
|
149
|
+
## ๐ก Use Cases
|
|
150
|
+
|
|
151
|
+
```
|
|
152
|
+
You: Delete today's 23:00 meeting
|
|
153
|
+
๐ค Calls lark-cli calendar +agenda โ finds event โ confirms โ +delete
|
|
154
|
+
|
|
155
|
+
You: Summarize last week's meetings and post to the product channel
|
|
156
|
+
๐ค lark-cli vc +list โ extracts notes โ lark-cli message +send to channel
|
|
157
|
+
|
|
158
|
+
You: Commit today's changes in the portfolio project
|
|
159
|
+
๐ค cd portfolio โ git diff โ splits into atomic commits โ git push
|
|
160
|
+
|
|
161
|
+
You: Find Alice's open_id and send her a meeting invite
|
|
162
|
+
๐ค lark-cli contact +find Alice โ gets open_id โ lark-cli calendar +create
|
|
163
|
+
|
|
164
|
+
You: [drops a design mockup image] evaluate technical feasibility
|
|
165
|
+
๐ค Auto-downloads image โ @file feeds to Kiro โ vision analysis + plan
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## โ๏ธ Configuration
|
|
169
|
+
|
|
170
|
+
### Minimum (auto-generated)
|
|
171
|
+
|
|
172
|
+
`lark-kiro-bridge init` writes `~/.lark-kiro-bridge/config.json`:
|
|
173
|
+
|
|
174
|
+
```json
|
|
175
|
+
{
|
|
176
|
+
"lark": {
|
|
177
|
+
"appId": "cli_xxxxxxxxxxx",
|
|
178
|
+
"appSecret": "xxxxxxxxxxxxxxxxxxxx"
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
All other fields have sensible defaults.
|
|
184
|
+
|
|
185
|
+
### Full reference
|
|
186
|
+
|
|
187
|
+
<details>
|
|
188
|
+
<summary>Click to expand all configurable fields</summary>
|
|
189
|
+
|
|
190
|
+
```json
|
|
191
|
+
{
|
|
192
|
+
"lark": {
|
|
193
|
+
"appId": "cli_xxxxxxxxxxx",
|
|
194
|
+
"appSecret": "xxxxxxxxxxxxxxxxxxxx"
|
|
195
|
+
},
|
|
196
|
+
"kiro": {
|
|
197
|
+
"binPath": "kiro-cli",
|
|
198
|
+
"trustedTools": [
|
|
199
|
+
"fs_read", "fs_write", "grep", "glob", "code",
|
|
200
|
+
"execute_bash", "web_search", "web_fetch"
|
|
201
|
+
],
|
|
202
|
+
"timeoutMs": 600000,
|
|
203
|
+
"idleTimeoutMinutes": 5,
|
|
204
|
+
"model": "claude-sonnet-4.6"
|
|
205
|
+
},
|
|
206
|
+
"workspace": {
|
|
207
|
+
"defaultCwd": "/Users/you/Projects",
|
|
208
|
+
"allowedRoots": ["/Users/you/Projects"]
|
|
209
|
+
},
|
|
210
|
+
"access": {
|
|
211
|
+
"allowedUsers": [],
|
|
212
|
+
"allowedChats": [],
|
|
213
|
+
"admins": []
|
|
214
|
+
},
|
|
215
|
+
"preferences": {
|
|
216
|
+
"requireMentionInGroup": true,
|
|
217
|
+
"cardUpdateIntervalMs": 800,
|
|
218
|
+
"logRetentionDays": 7
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
**`trustedTools`** โ Tools Kiro can invoke without asking:
|
|
224
|
+
- `fs_read fs_write grep glob code` โ File and code operations
|
|
225
|
+
- `execute_bash` โ Run shell commands (lark-cli / git / etc). **Safe for personal use; evaluate for team scenarios**
|
|
226
|
+
- `web_search web_fetch` โ Internet search
|
|
227
|
+
|
|
228
|
+
**`access`** โ Three-tier allowlists, see [SECURITY.md](./SECURITY.md):
|
|
229
|
+
- Empty `allowedUsers` = everyone allowed
|
|
230
|
+
- Empty `allowedChats` = every chat allowed
|
|
231
|
+
- Empty `admins` = everyone is admin
|
|
232
|
+
|
|
233
|
+
**`workspace.allowedRoots`** โ Whitelist of directories `/cd` can reach. Limits blast radius.
|
|
234
|
+
|
|
235
|
+
</details>
|
|
236
|
+
|
|
237
|
+
### CLI
|
|
238
|
+
|
|
239
|
+
```bash
|
|
240
|
+
lark-kiro-bridge init # Scan QR to create Feishu app (recommended)
|
|
241
|
+
lark-kiro-bridge init --manual # Manually enter existing App ID/Secret
|
|
242
|
+
lark-kiro-bridge init --app-id <id> --app-secret <s> # One-shot (CI-friendly)
|
|
243
|
+
lark-kiro-bridge run # Foreground (auto-launches QR if no config)
|
|
244
|
+
lark-kiro-bridge config-show # Show current config (redacted)
|
|
245
|
+
|
|
246
|
+
lark-kiro-bridge start # Install and start daemon
|
|
247
|
+
lark-kiro-bridge stop # Stop daemon
|
|
248
|
+
lark-kiro-bridge restart # Restart
|
|
249
|
+
lark-kiro-bridge status # Daemon status
|
|
250
|
+
lark-kiro-bridge unregister # Uninstall
|
|
251
|
+
|
|
252
|
+
lark-kiro-bridge ps # List all bridge processes on this host
|
|
253
|
+
lark-kiro-bridge kill <id> [--force] # Kill a process
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
## ๐ Documentation
|
|
257
|
+
|
|
258
|
+
| Doc | Content |
|
|
259
|
+
|---|---|
|
|
260
|
+
| [docs/ARCHITECTURE.md](./docs/ARCHITECTURE.md) | Data flow, card rendering, workspace plan B, design trade-offs |
|
|
261
|
+
| [docs/FAQ.md](./docs/FAQ.md) | Common questions + troubleshooting |
|
|
262
|
+
| [SECURITY.md](./SECURITY.md) | Security policy, vulnerability disclosure, hardening |
|
|
263
|
+
| [CHANGELOG.md](./CHANGELOG.md) | Release notes |
|
|
264
|
+
|
|
265
|
+
> Most docs are in Chinese; English versions are on the roadmap. PRs welcome.
|
|
266
|
+
|
|
267
|
+
## ๐ค Contributing
|
|
268
|
+
|
|
269
|
+
PRs and issues welcome. Dev flow:
|
|
270
|
+
|
|
271
|
+
```bash
|
|
272
|
+
git clone https://github.com/walterwang0x01/lark-kiro-bridge.git
|
|
273
|
+
cd lark-kiro-bridge
|
|
274
|
+
pnpm install
|
|
275
|
+
pnpm typecheck && pnpm lint && pnpm test # required before commit
|
|
276
|
+
pnpm build
|
|
277
|
+
node bin/lark-kiro-bridge.mjs run # local run (stop daemon first)
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
Conventions: TypeScript strict / Biome lint / vitest tests / conventional commits.
|
|
281
|
+
|
|
282
|
+
## Roadmap
|
|
283
|
+
|
|
284
|
+
- **v0.2** โ
Current (structured cards + button callbacks + Slack-style tool panels + QR app binding + voice input via ASR)
|
|
285
|
+
- **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)
|
|
289
|
+
- **v1.0** Centralized server deployment / multi-user isolation / web admin panel
|
|
290
|
+
|
|
291
|
+
## ๐ License
|
|
292
|
+
|
|
293
|
+
[MIT](./LICENSE) ยฉ 2026 walterwang0x01
|
package/README.md
ADDED
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
# lark-kiro-bridge
|
|
2
|
+
|
|
3
|
+
> ๆ **Kiro CLI** ๆฅๅฐ้ฃไนฆ / Lark โ ๅจ้ฃไนฆ้่ไปฃ็ ใ่ทๅฝไปคใๆไฝ้ฃไนฆ่ชๅทฑใ
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/lark-kiro-bridge)
|
|
6
|
+
[](https://www.npmjs.com/package/lark-kiro-bridge)
|
|
7
|
+
[](./LICENSE)
|
|
8
|
+
[](https://nodejs.org/)
|
|
9
|
+
[](https://github.com/walterwang0x01/lark-kiro-bridge)
|
|
10
|
+
|
|
11
|
+
๐จ๐ณ ไธญๆ | [๐บ๐ธ English](./README.en.md)
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
็พค้ `@bot` ๆ็ง่ๆบๅจไบบ๏ผๆถๆฏ็ด่พพๆฌๅฐ `kiro-cli chat`๏ผๅๅคไปฅ**็ปๆๅๅก็ + ๆตๅผๆๅญๅ
ๆ **ๅฎๆถๅทๆฐใๆฏไธช chat ็ฌ็ซ session๏ผๅ็ฎๅฝไธไธขไธไธๆใ
|
|
16
|
+
|
|
17
|
+
**ๆ ธๅฟไปทๅผ**๏ผไบ็ซฏ AI ็ผ็จๅฉๆ๏ผCursor / Copilot / Devin๏ผ็ขฐไธๅฐไฝ ๆฌๆบ็้กน็ฎ็ฎๅฝ๏ผไนๆฒกๆ้ฃไนฆ API ่ฐๅบฆ่ฝๅใlark-kiro-bridge **=** ๅจ้ฃไนฆ้่ทๆฌๅฐๅฝไปค **+** ๆไฝ้ฃไนฆ่ชๅทฑ๏ผไธไธชๆบๅจไบบ่งฃๅณไธคไปถไบใ
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
21
|
+
โ ๐ฌ Kiro โ
|
|
22
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
|
|
23
|
+
โ โ 3 ไธชๅทฅๅ
ท่ฐ็จ โธ (folded) โ
|
|
24
|
+
โ โ
Bash โ lark-cli calendar +createโฆโพ โ โ ๆๆฐๅทฅๅ
ทๅฎๆถๅฑๅผ
|
|
25
|
+
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
|
|
26
|
+
โ โ **Command** lark-cli calendar โฆ โ โ
|
|
27
|
+
โ โ **Output** {"ok": true, ...} โ โ
|
|
28
|
+
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
|
|
29
|
+
โ โ
|
|
30
|
+
โ ๆฅ็จๅทฒๅๅปบๆๅ โ
โ
|
|
31
|
+
โ ไธป้ข๏ผๆต่ฏ โ
|
|
32
|
+
โ ๆถ้ด๏ผไปๅคฉ 23:00 ~ ๆๅคฉ 00:00 โ
|
|
33
|
+
โ โ
|
|
34
|
+
โ โ๏ธ ๆญฃๅจ่พๅบ [ โน ็ปๆญข ] โ
|
|
35
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## ็ฎๅฝ
|
|
39
|
+
|
|
40
|
+
<details>
|
|
41
|
+
<summary>ๅฑๅผ</summary>
|
|
42
|
+
|
|
43
|
+
- [โจ ็นๆง](#-็นๆง)
|
|
44
|
+
- [๐ ๅฟซ้ไธๆ](#-ๅฟซ้ไธๆ)
|
|
45
|
+
- [๐ ้ฃไนฆๅ
็ๅฝไปค](#-้ฃไนฆๅ
็ๅฝไปค)
|
|
46
|
+
- [๐ก ไฝฟ็จๅบๆฏ](#-ไฝฟ็จๅบๆฏ)
|
|
47
|
+
- [โ๏ธ ้
็ฝฎ](#๏ธ-้
็ฝฎ)
|
|
48
|
+
- [๐ ่ฟ้ถๆๆกฃ](#-่ฟ้ถๆๆกฃ)
|
|
49
|
+
- [๐ค ๅไธ่ดก็ฎ](#-ๅไธ่ดก็ฎ)
|
|
50
|
+
- [๐ License](#-license)
|
|
51
|
+
|
|
52
|
+
</details>
|
|
53
|
+
|
|
54
|
+
## โจ ็นๆง
|
|
55
|
+
|
|
56
|
+
- ๐ด **็ปๆๅๅก็** โ ๆฏๆฌกๅทฅๅ
ท่ฐ็จไธไธช็ฌ็ซๅฏๆๅ ้ขๆฟ๏ผๅค่ฐ็จ่ชๅจ่ๅ๏ผๆ่่ฟ็จ็ฌ็ซๅฑ็คบ
|
|
57
|
+
- โก **ๆตๅผๆๅญๅ
ๆ ** โ ้ฃไนฆๅ็ `streaming_mode`๏ผ้
ๅ footer ๅฎๆถ็ถๆๆ็คบ
|
|
58
|
+
- ๐๏ธ **ๅทฅไฝๅบๆนๆก B** โ ๅ็ฎๅฝไธไธขไธไธๆ๏ผๆฏไธช `(chat, cwd)` ็ฌ็ซ Kiro session๏ผ่ชๅจ็ปญ่
|
|
59
|
+
- ๐ **ๆ้ฎๅฏ็น** โ `/model` `/help` `/status` `/ws list` `/config` ๅ
จ้จๅฏ็นๅปๆไฝ๏ผ0 ๅฝไปค่ฎฐๅฟ
|
|
60
|
+
- ๐ **`/config` ้ฃไนฆๅ
่กจๅ** โ ๅจ้ฃไนฆ้ๆน่ฎฟ้ฎๆงๅถๅๅๅฅฝ๏ผๅณๆถ็ๆ๏ผ้ฒ่ช้ๆ ก้ช
|
|
61
|
+
- ๐ **rapid-fire ๆถๆฏๅๅนถ** โ 200ms ๅ
่ฟๅ็ๅคๆก็ญๆถๆฏ่ชๅจๅๅนถไธบไธๆฌก Kiro ่ฐ็จ๏ผไธๅ่ขซๅไธๆก abort
|
|
62
|
+
- ๐ค **่ฏญ้ณ่พๅ
ฅ** โ ้ฃไนฆๅ่ฏญ้ณๆถๆฏ โ ่ชๅจ่ฝฌๅ๏ผ้ฃไนฆ ASR๏ผโ ๅ็ป Kiro๏ผ้ `ffmpeg` ๅ ASR ๆ้
|
|
63
|
+
- ๐ก๏ธ **่ฟ็จ็ป kill** โ `detached: true` + `process.kill(-pid)` ๆๆ kiro-cli ๅ
จ้จๅญๅญ
|
|
64
|
+
- โฑ **Idle Watchdog** โ ๅกไฝ่ชๅจ killTree๏ผๅฏๅ
จๅฑ / per-chat ้
็ฝฎ
|
|
65
|
+
- ๐ **ไธๅฑ่ฎฟ้ฎๆงๅถ** โ ็จๆท / ็พค / ็ฎก็ๅ็ฝๅๅ๏ผ**DM ๆฐธ่ฟ่ฑๅ
็พค็ฝๅๅ**๏ผไธไผๆ่ชๅทฑ้ๅค้ข
|
|
66
|
+
- ๐ **macOS ๅ็ๅฎๆค** โ launchd ๅดฉๆบ่ชๅจๆ่ตท๏ผๅผๆบ่ชๅฏ
|
|
67
|
+
- ๐ **`/doctor` ่ช่ฏๆญ** โ ่ฎฉ Kiro ็ๆฅๅฟ่ชๅทฑๅๆๆ
้
|
|
68
|
+
|
|
69
|
+
## ๐ ๅฟซ้ไธๆ
|
|
70
|
+
|
|
71
|
+
### ๅ็ฝฎๆกไปถ
|
|
72
|
+
|
|
73
|
+
- macOS๏ผLinux / Windows daemon ๅจ่ทฏ็บฟๅพ๏ผ
|
|
74
|
+
- Node.js โฅ 20
|
|
75
|
+
- `kiro-cli` ๅทฒๅฎ่ฃ
ๅนถ็ปๅฝ
|
|
76
|
+
- ้ฃไนฆ่ดฆๅท๏ผไธชไบบ็ๅณๅฏ๏ผๆซ็ ่ชๅจๅๅปบๅบ็จ๏ผ
|
|
77
|
+
- **ๅฏ้**๏ผ`ffmpeg`๏ผ็จไบ่ฏญ้ณ่พๅ
ฅ่ฝฌๅ๏ผ`brew install ffmpeg` / `apt install ffmpeg`๏ผ+ ้ฃไนฆ ASR scope `speech_to_text:speech`๏ผ้ฃไนฆๅ
่ดน็็งๆทไธๆฏๆ๏ผ
|
|
78
|
+
|
|
79
|
+
### 30 ็งไธ็บฟ โก
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
# 1. ๅฎ่ฃ
|
|
83
|
+
npm i -g lark-kiro-bridge
|
|
84
|
+
|
|
85
|
+
# 2. ๅฏๅจ๏ผ้ฆๆฌกไผ่ชๅจๅผนไบ็ปด็ โ ๆซ็ ๅๆ โ ๅฎๆ๏ผ
|
|
86
|
+
lark-kiro-bridge run
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
> **ๅฐฑ่ฟไน็ฎๅ**โโ้ฃไนฆ App ๆซ็ ๅๆๅ๏ผbridge ่ชๅจๅๅปบๅบ็จใ้
ๅฅฝๅญ่ฏใๅผ้ๅฟ
่ฆๆ้ใ
|
|
90
|
+
|
|
91
|
+
ๅฏๅจๅๅจ้ฃไนฆ็ง่ๆบๅจไบบๅใไฝ ๅฅฝใ๏ผๅบ่ฏฅ็ซๅณ็ๅฐๆตๅผๅทๆฐ็ๅก็ใ
|
|
92
|
+
|
|
93
|
+
### ๆณ็จๅทฒๆ็้ฃไนฆๅบ็จ๏ผ
|
|
94
|
+
|
|
95
|
+
ๅฆๆไฝ ๅทฒ็ปๅจ้ฃไนฆๅผๆพๅนณๅฐๆๅจๅปบ่ฟๅบ็จ๏ผๆณๅค็จๅทฒๆ็ App ID/Secret๏ผ
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
lark-kiro-bridge init --manual
|
|
99
|
+
# ไบคไบๅผ่พๅ
ฅ App ID ๅ App Secret
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
ๆไธ่กๆๅฎ๏ผ
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
lark-kiro-bridge init --app-id cli_xxx --app-secret xxx
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
> ้ฃไนฆๅๅฐๆๅจ้
็ฝฎ๏ผ่ฎข้
ไบไปถ `im.message.receive_v1` + `card.action.trigger`๏ผโ [docs/FAQ.md](./docs/FAQ.md)
|
|
109
|
+
|
|
110
|
+
### ๅๅฐๅฎๆค๏ผๆจ่็ไบง๏ผ
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
lark-kiro-bridge start # ่ฃ
launchd plist ๅนถๅฏๅจ
|
|
114
|
+
lark-kiro-bridge status # ็็ถๆ
|
|
115
|
+
lark-kiro-bridge restart # ้ๅฏ
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## ๐ ้ฃไนฆๅ
็ๅฝไปค
|
|
119
|
+
|
|
120
|
+
### ๆฅๅธธๅฝไปค๏ผๆๆไบบ๏ผ
|
|
121
|
+
|
|
122
|
+
| ๅฝไปค | ๅซๅ | ไฝ็จ |
|
|
123
|
+
|---|---|---|
|
|
124
|
+
| `/help` | `/h` `/?` | ๅธฎๅฉๅก็๏ผๅฏ็นๆ้ฎ๏ผ |
|
|
125
|
+
| `/status` | `/s` | ๅฝๅ cwd / session / watchdog |
|
|
126
|
+
| `/model [name]` | `/m` | ๆฅ็ / ๅๆขๆจกๅ๏ผๆ้ฎไธ้ฎๅ |
|
|
127
|
+
| `/new` | `/reset` | ้็ฝฎๅฝๅ cwd ไธ็ Kiro ไผ่ฏ |
|
|
128
|
+
| `/stop` | `/abort` | ๅๆญขๆญฃๅจ่ท็ไปปๅก |
|
|
129
|
+
| `/pwd` | `/cwd` | ๅฝๅๅทฅไฝ็ฎๅฝ |
|
|
130
|
+
| `/ws list` | โ | ๅๅบๅฝๅๅทฅไฝๅบ๏ผๆ้ฎไธ้ฎๅ |
|
|
131
|
+
| `/timeout [N\|off]` | `/to` | idle watchdog ้ๅผ๏ผๅ้๏ผ |
|
|
132
|
+
| `/doctor [ๆ่ฟฐ]` | โ | ่ฎฉ Kiro ็ๆฅๅฟ่ช่ฏๆญ |
|
|
133
|
+
|
|
134
|
+
### ็ฎก็ๅๅฝไปค
|
|
135
|
+
|
|
136
|
+
| ๅฝไปค | ไฝ็จ |
|
|
137
|
+
|---|---|
|
|
138
|
+
| `/config` | ๆฅ็ / ็ผ่พ่ฎฟ้ฎๆงๅถ + ๅๅฅฝ๏ผ้ฃไนฆๅ
่กจๅ๏ผๅณๆถ็ๆ๏ผ |
|
|
139
|
+
| `/cd <path>` | ๅๆขๅทฅไฝ็ฎๅฝ๏ผๅ `allowedRoots` ้ๅถ๏ผ |
|
|
140
|
+
| `/ws save <name>` | ๆๅฝๅ cwd ๅญไธบๅฝๅๅทฅไฝๅบ |
|
|
141
|
+
| `/ws use <name>` | ๅๅฐๅฝๅๅทฅไฝๅบ |
|
|
142
|
+
| `/ws remove <name>` | ๅ ้คๅฝๅๅทฅไฝๅบ |
|
|
143
|
+
| `/reconnect` | ๅผบๅถ้่ฟ้ฃไนฆ WebSocket |
|
|
144
|
+
|
|
145
|
+
> ้ป่ฎคๆๆไบบ้ฝๆฏ็ฎก็ๅ๏ผ`access.admins` ไธบ็ฉบ๏ผใๅข้ๆจๅนฟๅ่ฏทๆถ็ดงใ
|
|
146
|
+
|
|
147
|
+
**ๅๅบ่งๅ**๏ผ็ง่ๅ
จๆถ๏ผ็พค้ๅฟ
้กป `@bot`๏ผ`@all` ๆฐธไธๅๅบใ
|
|
148
|
+
|
|
149
|
+
## ๐ก ไฝฟ็จๅบๆฏ
|
|
150
|
+
|
|
151
|
+
```
|
|
152
|
+
ไฝ : ๅ ๆไปๅคฉ 23 ็น็ไผ่ฎฎ
|
|
153
|
+
๐ค ่ฐ lark-cli calendar +agenda ๆพๅฐๆฅ็จ โ ไบๆฌก็กฎ่ฎค โ +delete
|
|
154
|
+
|
|
155
|
+
ไฝ : ๆด็ไธไธไธๅจ็ไผ่ฎฎ็บช่ฆๅๅฐไบงๅ็พค
|
|
156
|
+
๐ค lark-cli vc +list โ ๆๅ็บช่ฆ โ ่ฐ lark-cli message +send ๅฐๆๅฎ็พค
|
|
157
|
+
|
|
158
|
+
ไฝ : ๆ portfolio ้กน็ฎไปๅคฉ็ๆนๅจ commit ไธไธ
|
|
159
|
+
๐ค cd portfolio โ git diff โ ๆๅ atomic commits โ git push
|
|
160
|
+
|
|
161
|
+
ไฝ : ๆฅไธไธๅผ ไธ็ open_id ้กบไพฟ็ปไปๅไธชไผ่ฎฎ้่ฏท
|
|
162
|
+
๐ค lark-cli contact +find ๅผ ไธ โ ๆฟๅฐ open_id โ ่ฐ lark-cli calendar +create
|
|
163
|
+
|
|
164
|
+
ไฝ : [ๅไบไธๅผ ่ฎพ่ฎก็จฟ] ๅธฎๆ่ฏไผฐๆๆฏๅฏ่กๆง
|
|
165
|
+
๐ค ่ชๅจไธ่ฝฝๅพ็ โ @file ๅ็ป Kiro โ ่ง่งๅๆ + ็ปๅบๅฎ็ฐๆนๆก
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## โ๏ธ ้
็ฝฎ
|
|
169
|
+
|
|
170
|
+
### ๆๅฐๅฏ็จ๏ผ่ชๅจ็ๆ๏ผ
|
|
171
|
+
|
|
172
|
+
`lark-kiro-bridge init` ๅๅ
ฅ `~/.lark-kiro-bridge/config.json`๏ผ
|
|
173
|
+
|
|
174
|
+
```json
|
|
175
|
+
{
|
|
176
|
+
"lark": {
|
|
177
|
+
"appId": "cli_xxxxxxxxxxx",
|
|
178
|
+
"appSecret": "xxxxxxxxxxxxxxxxxxxx"
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
ๅ
ถไปๅญๆฎต้ฝๆๅ็้ป่ฎคๅผใ
|
|
184
|
+
|
|
185
|
+
### ๅฎๆด้
็ฝฎๅ่
|
|
186
|
+
|
|
187
|
+
<details>
|
|
188
|
+
<summary>็นๅผ็ๆๆๅฏ้
็ฝฎ้กน</summary>
|
|
189
|
+
|
|
190
|
+
```json
|
|
191
|
+
{
|
|
192
|
+
"lark": {
|
|
193
|
+
"appId": "cli_xxxxxxxxxxx",
|
|
194
|
+
"appSecret": "xxxxxxxxxxxxxxxxxxxx"
|
|
195
|
+
},
|
|
196
|
+
"kiro": {
|
|
197
|
+
"binPath": "kiro-cli",
|
|
198
|
+
"trustedTools": [
|
|
199
|
+
"fs_read", "fs_write", "grep", "glob", "code",
|
|
200
|
+
"execute_bash", "web_search", "web_fetch"
|
|
201
|
+
],
|
|
202
|
+
"timeoutMs": 600000,
|
|
203
|
+
"idleTimeoutMinutes": 5,
|
|
204
|
+
"model": "claude-sonnet-4.6"
|
|
205
|
+
},
|
|
206
|
+
"workspace": {
|
|
207
|
+
"defaultCwd": "/Users/you/Projects",
|
|
208
|
+
"allowedRoots": ["/Users/you/Projects"]
|
|
209
|
+
},
|
|
210
|
+
"access": {
|
|
211
|
+
"allowedUsers": [],
|
|
212
|
+
"allowedChats": [],
|
|
213
|
+
"admins": []
|
|
214
|
+
},
|
|
215
|
+
"preferences": {
|
|
216
|
+
"requireMentionInGroup": true,
|
|
217
|
+
"cardUpdateIntervalMs": 800,
|
|
218
|
+
"logRetentionDays": 7
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
`trustedTools` โ Kiro ไธ่ฏข้ฎๅฐฑ่ฝ่ฐ็จ็ๅทฅๅ
ท๏ผ
|
|
224
|
+
- `fs_read fs_write grep glob code` โ ๆไปถ่ฏปๅใไปฃ็ ๆ็ดข
|
|
225
|
+
- `execute_bash` โ ่ท shell ๅฝไปค๏ผlark-cli / git / ็ญ๏ผใ**ๅไบบ็จๅฎๅ
จ๏ผๅข้ๅบๆฏ่ฏท่ฏไผฐ**
|
|
226
|
+
- `web_search web_fetch` โ ่็ฝๆ่ตๆ
|
|
227
|
+
|
|
228
|
+
`access` โ ไธๅฑ็ฝๅๅ๏ผ่ฏฆ่ง [SECURITY.md](./SECURITY.md)๏ผ
|
|
229
|
+
- `allowedUsers` ไธบ็ฉบ = ๆๆไบบๅ
่ฎธ
|
|
230
|
+
- `allowedChats` ไธบ็ฉบ = ๆๆ chat ๅ
่ฎธ
|
|
231
|
+
- `admins` ไธบ็ฉบ = ๆๆไบบ้ฝๆฏ็ฎก็ๅ
|
|
232
|
+
|
|
233
|
+
`workspace.allowedRoots` โ `/cd` ่ฝๅป็ๆ น็ฎๅฝ็ฝๅๅ๏ผ้ๅถ็็ธๅๅพใ
|
|
234
|
+
|
|
235
|
+
</details>
|
|
236
|
+
|
|
237
|
+
### CLI
|
|
238
|
+
|
|
239
|
+
```bash
|
|
240
|
+
lark-kiro-bridge init # ๆซ็ ๅๅปบ้ฃไนฆๅบ็จ๏ผ้ฆ้๏ผ
|
|
241
|
+
lark-kiro-bridge init --manual # ๆๅจ่พๅ
ฅๅทฒๆ App ID/Secret
|
|
242
|
+
lark-kiro-bridge init --app-id <id> --app-secret <s> # ไธ่กๆๅฎ๏ผCI ๅๅฅฝ๏ผ
|
|
243
|
+
lark-kiro-bridge run # ๅๅฐๅฏๅจ๏ผ้ฆๆฌก่ชๅจ่ทณๆซ็ ๏ผ
|
|
244
|
+
lark-kiro-bridge config-show # ๆพ็คบๅฝๅ้
็ฝฎ๏ผ่ฑๆ๏ผ
|
|
245
|
+
|
|
246
|
+
lark-kiro-bridge start # ่ฃ
ๅนถ่ตท daemon
|
|
247
|
+
lark-kiro-bridge stop # ๅ daemon
|
|
248
|
+
lark-kiro-bridge restart # ้ๅฏ
|
|
249
|
+
lark-kiro-bridge status # ็ถๆ
|
|
250
|
+
lark-kiro-bridge unregister # ๅธ่ฝฝ
|
|
251
|
+
|
|
252
|
+
lark-kiro-bridge ps # ๅๆฌๆบๆๆ bridge ่ฟ็จ
|
|
253
|
+
lark-kiro-bridge kill <id> [--force] # ๆๆๆไธช่ฟ็จ
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
## ๐ ่ฟ้ถๆๆกฃ
|
|
257
|
+
|
|
258
|
+
| ๆๆกฃ | ๅ
ๅฎน |
|
|
259
|
+
|---|---|
|
|
260
|
+
| [docs/ARCHITECTURE.md](./docs/ARCHITECTURE.md) | ๆดไฝๆฐๆฎๆตใๅก็ๆธฒๆไฝ็ณปใๅทฅไฝ็ฎๅฝๆนๆก Bใ่ฎพ่ฎกๅ่ |
|
|
261
|
+
| [docs/FAQ.md](./docs/FAQ.md) | ๅธธ่ง็้ฎ + ๆ
้ๆๆฅ๏ผๆบๅจไบบไธๅๅบ / 200340 / ๅก็ๅกๆญป / โฆ๏ผ |
|
|
262
|
+
| [SECURITY.md](./SECURITY.md) | ๅฎๅ
จ็ญ็ฅใๆผๆดๆซ้ฒใๅ ๅบๆๅ |
|
|
263
|
+
| [CHANGELOG.md](./CHANGELOG.md) | ็ๆฌๅๆดๆฅๅฟ |
|
|
264
|
+
|
|
265
|
+
## ๐ค ๅไธ่ดก็ฎ
|
|
266
|
+
|
|
267
|
+
PR / Issue ้ฝๆฌข่ฟใๅผๅๆต็จ๏ผ
|
|
268
|
+
|
|
269
|
+
```bash
|
|
270
|
+
git clone https://github.com/walterwang0x01/lark-kiro-bridge.git
|
|
271
|
+
cd lark-kiro-bridge
|
|
272
|
+
pnpm install
|
|
273
|
+
pnpm typecheck && pnpm lint && pnpm test # ๆไบคๅๅฟ
่ท
|
|
274
|
+
pnpm build
|
|
275
|
+
node bin/lark-kiro-bridge.mjs run # ๆฌๅฐ่ท๏ผๅ
stop daemon๏ผ
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
ไปฃ็ ่ง่๏ผTypeScript strict / Biome lint / vitest ๆต่ฏ / commit ็จ conventional commitsใ
|
|
279
|
+
|
|
280
|
+
## ่ทฏ็บฟๅพ
|
|
281
|
+
|
|
282
|
+
- **v0.2** โ
ๅฝๅ็๏ผ็ปๆๅๅก็ + ๆ้ฎๅ่ฐ + Slack-style ๅทฅๅ
ท้ขๆฟ + ๆซ็ ็ปๅฎ + ่ฏญ้ณ่พๅ
ฅ ASR๏ผ
|
|
283
|
+
- **v0.3** โ
`/config` ้ฃไนฆๅ
่กจๅ + ไธๅฑ่ฎฟ้ฎๆงๅถ๏ผDM ่ฑๅ
็พค็ฝๅๅ๏ผ+ rapid-fire ๆถๆฏๅๅนถ
|
|
284
|
+
- **v0.4** Linux systemd / Windows Task Scheduler ๅฎๆค
|
|
285
|
+
- **v0.4** `/ps` `/exit` ้ฃไนฆๅ
่ฐ็จๆฌๆบ่ฟ็จ
|
|
286
|
+
- **v0.5** ็พคๅ โ ๅทฅไฝๅบ็ๅฏๅๅผ้ป่ฎค๏ผ่ฟ agenzo ็พค้ป่ฎคๅจ agenzo ็ฎๅฝ๏ผ
|
|
287
|
+
- **v1.0** ๆๅกๅจ้ไธญ้จ็ฝฒ / ๅค็จๆท้็ฆป / Web ็ฎก็้ขๆฟ
|
|
288
|
+
|
|
289
|
+
## ๐ License
|
|
290
|
+
|
|
291
|
+
[MIT](./LICENSE) ยฉ 2026 walterwang0x01
|
package/dist/cli.d.ts
ADDED