cli-jaw 1.0.2 → 1.0.4
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.ko.md +9 -6
- package/README.md +65 -61
- package/README.zh-CN.md +9 -6
- package/dist/lib/quota-copilot.js +22 -6
- package/dist/lib/quota-copilot.js.map +1 -1
- package/dist/server.js +9 -3
- package/dist/server.js.map +1 -1
- package/dist/src/agent/spawn.js +73 -7
- package/dist/src/agent/spawn.js.map +1 -1
- package/dist/src/cli/acp-client.js +15 -12
- package/dist/src/cli/acp-client.js.map +1 -1
- package/dist/src/cli/commands.js +3 -1
- package/dist/src/cli/commands.js.map +1 -1
- package/dist/src/cli/handlers.js +106 -0
- package/dist/src/cli/handlers.js.map +1 -1
- package/dist/src/orchestrator/distribute.js +18 -1
- package/dist/src/orchestrator/distribute.js.map +1 -1
- package/dist/src/orchestrator/pipeline.js +51 -5
- package/dist/src/orchestrator/pipeline.js.map +1 -1
- package/dist/src/telegram/bot.js +29 -3
- package/dist/src/telegram/bot.js.map +1 -1
- package/package.json +1 -1
- package/public/dist/bundle.js +28 -28
- package/public/dist/bundle.js.map +3 -3
- package/public/js/features/chat.ts +4 -2
- package/public/js/render.ts +0 -2
- package/public/locales/en.json +10 -0
- package/public/locales/ko.json +10 -0
package/README.ko.md
CHANGED
|
@@ -6,15 +6,17 @@
|
|
|
6
6
|
|
|
7
7
|
*Claude, Codex, Gemini... 이제 번갈아 쓰지 마세요.*
|
|
8
8
|
|
|
9
|
-
[](#-테스트)
|
|
10
10
|
[](https://typescriptlang.org)
|
|
11
11
|
[](https://nodejs.org)
|
|
12
12
|
[](LICENSE)
|
|
13
13
|
[](https://npmjs.com/package/cli-jaw)
|
|
14
|
+
[](#-도커--컨테이너-격리)
|
|
15
|
+
[](#)
|
|
14
16
|
|
|
15
17
|
[English](README.md) / **한국어** / [中文](README.zh-CN.md)
|
|
16
18
|
|
|
17
|
-
|
|
19
|
+
<video src="https://github.com/user-attachments/assets/a7cf17c9-bfb3-44f0-b7fd-d001a39643fd" autoplay loop muted playsinline width="100%"></video>
|
|
18
20
|
|
|
19
21
|
</div>
|
|
20
22
|
|
|
@@ -79,9 +81,10 @@ gemini # Google Gemini — 첫 실행 시 인증
|
|
|
79
81
|
## CLI-JAW란 무엇인가요?
|
|
80
82
|
|
|
81
83
|
CLI-JAW는 내 컴퓨터에 상주하며 이미 익숙한 인터페이스인 **웹, 터미널, 텔레그램**에서 작동하는 **개인용 AI 비서**입니다. 궁금한 것을 묻고, 작업을 위임하고, 워크플로우를 자동화하세요.
|
|
84
|
+

|
|
82
85
|
|
|
83
|
-
> 💬 *"오늘 일정 정리해줘"* → 텔레그램으로 바로 정리해서 보내줘요
|
|
84
|
-
> 💬 *"이 모듈 리팩토링하고 테스트도 짜줘"* → 서브에이전트가 알아서, 커피 한 잔 하고 오면 돼요
|
|
86
|
+
> 💬 *"오늘 일정 정리해줘"* → 텔레그램으로 바로 정리해서 보내줘요
|
|
87
|
+
> 💬 *"이 모듈 리팩토링하고 테스트도 짜줘"* → 서브에이전트가 알아서, 커피 한 잔 하고 오면 돼요
|
|
85
88
|
> 💬 *"저 PDF 다운받아서 핵심만 노션에 정리해"* → 브라우저 + 노션 스킬 조합으로 뚝딱
|
|
86
89
|
|
|
87
90
|
단일 모델만을 사용하는 기존 비서들과 달리, CLI-JAW는 5개의 AI 엔진(Claude, Codex, Gemini, OpenCode, Copilot)을 공식 CLI를 통해 오케스트레이션하여 모든 제공업체의 장점을 통합된 경험으로 제공합니다. 하나의 엔진 사용량이 초과되면 자동으로 다음 엔진으로 전환됩니다. 107개의 내장 스킬이 브라우저 자동화부터 문서 생성까지 모든 것을 처리합니다.
|
|
@@ -93,7 +96,7 @@ CLI-JAW는 내 컴퓨터에 상주하며 이미 익숙한 인터페이스인 **
|
|
|
93
96
|
| ⚡ **멀티 에이전트 자동 전환(Fallback)** | 엔진 하나가 멈춰도 걱정 없습니다. 다음 엔진이 즉시 이어받아 중단 없는 작업이 가능합니다. |
|
|
94
97
|
| 🎭 **오케스트레이션 기반 성능 극대화** | 복잡한 작업은 전문화된 서브 에이전트에게 분산시켜 처리량을 극대화합니다. |
|
|
95
98
|
| 📦 **107개의 내장 스킬** | 브라우저 자동화, 문서 생성, 텔레그램 연동, 영구 메모리 등 설치 즉시 사용 가능한 기능들을 제공합니다. |
|
|
96
|
-
| 🖥️ **크로스 플랫폼** | macOS, Linux, Windows
|
|
99
|
+
| 🖥️ **크로스 플랫폼** | macOS, Linux, Windows — ENOENT-safe CLI 스폰, 자동 감지, `.cmd` shim 지원, 네이티브 설치 전부 크로스플랫폼 동작. |
|
|
97
100
|
|
|
98
101
|

|
|
99
102
|
|
|
@@ -399,7 +402,7 @@ src/
|
|
|
399
402
|
## 🧪 테스트
|
|
400
403
|
|
|
401
404
|
<details>
|
|
402
|
-
<summary>
|
|
405
|
+
<summary>445 pass · 1 skipped · 외부 의존성 0</summary>
|
|
403
406
|
|
|
404
407
|
```bash
|
|
405
408
|
npm test
|
package/README.md
CHANGED
|
@@ -6,15 +6,17 @@
|
|
|
6
6
|
|
|
7
7
|
*One assistant. Five brains. Always on.*
|
|
8
8
|
|
|
9
|
-
[](#-tests)
|
|
10
10
|
[](https://typescriptlang.org)
|
|
11
11
|
[](https://nodejs.org)
|
|
12
12
|
[](LICENSE)
|
|
13
13
|
[](https://npmjs.com/package/cli-jaw)
|
|
14
|
+
[](#-docker--container-isolation)
|
|
15
|
+
[](#)
|
|
14
16
|
|
|
15
17
|
**English** / [한국어](README.ko.md) / [中文](README.zh-CN.md)
|
|
16
18
|
|
|
17
|
-
|
|
19
|
+
<video src="https://github.com/user-attachments/assets/a7cf17c9-bfb3-44f0-b7fd-d001a39643fd" autoplay loop muted playsinline width="100%"></video>
|
|
18
20
|
|
|
19
21
|
</div>
|
|
20
22
|
|
|
@@ -76,25 +78,25 @@ Check what's ready: `jaw doctor`
|
|
|
76
78
|
|
|
77
79
|
---
|
|
78
80
|
|
|
79
|
-
|
|
80
81
|
## What is CLI-JAW?
|
|
81
82
|
|
|
82
83
|
CLI-JAW is a **personal AI assistant** that lives on your machine and works from the interfaces you already use — **Web, Terminal, and Telegram**. Ask it anything, delegate tasks, automate your workflows.
|
|
84
|
+

|
|
83
85
|
|
|
84
|
-
> 💬 *"Summarize today's schedule"* → answer on Telegram
|
|
85
|
-
> 💬 *"Refactor this module and write tests"* → sub-agents handle it while you grab coffee
|
|
86
|
+
> 💬 *"Summarize today's schedule"* → answer on Telegram
|
|
87
|
+
> 💬 *"Refactor this module and write tests"* → sub-agents handle it while you grab coffee
|
|
86
88
|
> 💬 *"Download that PDF and put the key points in Notion"* → browser + Notion skill, done
|
|
87
89
|
|
|
88
90
|
Unlike single-model assistants, CLI-JAW orchestrates **5 AI engines** (Claude, Codex, Gemini, OpenCode, Copilot) through their official CLIs — giving you the best of every provider in one unified experience. If one engine is busy, it automatically falls back to the next. 107 built-in skills handle everything from browser automation to document generation.
|
|
89
91
|
|
|
90
|
-
|
|
|
91
|
-
|
|
|
92
|
-
|
|
|
93
|
-
|
|
|
94
|
-
|
|
|
95
|
-
|
|
|
96
|
-
|
|
|
97
|
-
|
|
|
92
|
+
| | Why CLI-JAW? |
|
|
93
|
+
| ------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------- |
|
|
94
|
+
| 🛡️**TOS-Safe** | Uses official CLIs only — no API key scraping, no reverse engineering, no ban risk. |
|
|
95
|
+
| 🤖**Verified Agent Tools** | 5 battle-tested coding agents (Claude, Codex, Gemini, OpenCode, Copilot) under one roof. |
|
|
96
|
+
| ⚡**Multi-Agent Fallback** | One engine down? The next picks up automatically. Zero downtime. |
|
|
97
|
+
| 🎭**Orchestrated Performance** | Complex tasks split across specialized sub-agents for maximum throughput. |
|
|
98
|
+
| 📦**107 Built-in Skills** | Browser automation, document generation, Telegram, memory — ready out of the box. |
|
|
99
|
+
| 🖥️**Cross-Platform** | macOS, Linux, Windows — ENOENT-safe CLI spawn, auto-detection,`.cmd` shim support, and native install all work across platforms. |
|
|
98
100
|
|
|
99
101
|

|
|
100
102
|
|
|
@@ -113,7 +115,7 @@ graph LR
|
|
|
113
115
|
JAW -->|inject| SK["📦 Skills"]
|
|
114
116
|
JAW -->|control| BR["🌐 Chrome"]
|
|
115
117
|
JAW -->|send| TG["📱 Telegram"]
|
|
116
|
-
|
|
118
|
+
|
|
117
119
|
style JAW fill:#f5e6d3,stroke:#d4a574,stroke-width:2px,color:#5c4033
|
|
118
120
|
```
|
|
119
121
|
|
|
@@ -128,7 +130,6 @@ graph LR
|
|
|
128
130
|
- 🔍 **Web search** — Real-time information via MCP tools.
|
|
129
131
|
- ⏰ **Heartbeat jobs** — Schedule recurring tasks that run automatically.
|
|
130
132
|
|
|
131
|
-
|
|
132
133
|
---
|
|
133
134
|
|
|
134
135
|
## 📦 Skill System
|
|
@@ -138,26 +139,26 @@ graph LR
|
|
|
138
139
|
<details>
|
|
139
140
|
<summary>View all skills</summary>
|
|
140
141
|
|
|
141
|
-
| Tier
|
|
142
|
-
|
|
|
143
|
-
| **Active Skills** | 17
|
|
144
|
-
| **Reference Skills** | 90
|
|
142
|
+
| Tier | Count | How it works |
|
|
143
|
+
| -------------------------- | :---: | --------------------------------------------------------- |
|
|
144
|
+
| **Active Skills** | 17 | Auto-injected into every AI prompt. Always available. |
|
|
145
|
+
| **Reference Skills** | 90 | AI reads them on-demand when you ask for a relevant task. |
|
|
145
146
|
|
|
146
147
|
#### Active Skills (always on)
|
|
147
148
|
|
|
148
|
-
| Skill
|
|
149
|
-
|
|
|
150
|
-
| `browser`
|
|
151
|
-
| `github`
|
|
152
|
-
| `notion`
|
|
153
|
-
| `memory`
|
|
154
|
-
| `telegram-send`
|
|
155
|
-
| `vision-click`
|
|
156
|
-
| `imagegen`
|
|
157
|
-
| `pdf` / `docx` / `xlsx`
|
|
158
|
-
| `screen-capture`
|
|
159
|
-
| `openai-docs`
|
|
160
|
-
| `dev` / `dev-frontend` / `dev-backend` / `dev-data` / `dev-testing` | Development guidelines for sub-agents
|
|
149
|
+
| Skill | What it does |
|
|
150
|
+
| ----------------------------------------------------------------------------- | ---------------------------------------------------------- |
|
|
151
|
+
| `browser` | Chrome automation — snapshot, click, navigate, screenshot |
|
|
152
|
+
| `github` | Issues, PRs, CI, code review via `gh` CLI |
|
|
153
|
+
| `notion` | Create/manage Notion pages and databases |
|
|
154
|
+
| `memory` | Persistent long-term memory across sessions |
|
|
155
|
+
| `telegram-send` | Send photos, documents, voice messages to Telegram |
|
|
156
|
+
| `vision-click` | Screenshot → AI finds coordinates → clicks (one command) |
|
|
157
|
+
| `imagegen` | Generate/edit images via OpenAI Image API |
|
|
158
|
+
| `pdf` / `docx` / `xlsx` | Read, create, edit office documents |
|
|
159
|
+
| `screen-capture` | macOS screenshot and camera capture |
|
|
160
|
+
| `openai-docs` | Up-to-date OpenAI API documentation |
|
|
161
|
+
| `dev` / `dev-frontend` / `dev-backend` / `dev-data` / `dev-testing` | Development guidelines for sub-agents |
|
|
161
162
|
|
|
162
163
|
#### Reference Skills (on-demand)
|
|
163
164
|
|
|
@@ -189,6 +190,7 @@ Your assistant isn't tied to your desk. Chat from anywhere via Telegram:
|
|
|
189
190
|
</details>
|
|
190
191
|
|
|
191
192
|
**What you can do from Telegram:**
|
|
193
|
+
|
|
192
194
|
- 💬 Chat with your assistant (any of 5 AI engines)
|
|
193
195
|
- 🎤 Send voice messages (auto-transcribed)
|
|
194
196
|
- 📎 Send files and photos for processing
|
|
@@ -196,6 +198,7 @@ Your assistant isn't tied to your desk. Chat from anywhere via Telegram:
|
|
|
196
198
|
- 🔄 Switch AI engines on the fly
|
|
197
199
|
|
|
198
200
|
**What your assistant sends back:**
|
|
201
|
+
|
|
199
202
|
- AI responses with markdown formatting
|
|
200
203
|
- Generated images, PDFs, documents
|
|
201
204
|
- Scheduled task results (heartbeat jobs)
|
|
@@ -216,18 +219,18 @@ For complex tasks, your assistant delegates work to specialized sub-agents:
|
|
|
216
219
|
```mermaid
|
|
217
220
|
graph TD
|
|
218
221
|
USER["👤 Your Request"] --> TRIAGE["🔍 Triage — Simple or Complex?"]
|
|
219
|
-
|
|
222
|
+
|
|
220
223
|
TRIAGE -->|Simple| DIRECT["⚡ Direct Response"]
|
|
221
224
|
TRIAGE -->|Complex| PLAN["📝 Planning"]
|
|
222
|
-
|
|
225
|
+
|
|
223
226
|
PLAN --> FE["🎨 Frontend"]
|
|
224
227
|
PLAN --> BE["⚙️ Backend"]
|
|
225
228
|
PLAN --> DATA["📊 Data"]
|
|
226
|
-
|
|
229
|
+
|
|
227
230
|
FE --> GATE["🚪 Gate Review"]
|
|
228
231
|
BE --> GATE
|
|
229
232
|
DATA --> GATE
|
|
230
|
-
|
|
233
|
+
|
|
231
234
|
GATE -->|Pass| NEXT["✅ Done"]
|
|
232
235
|
GATE -->|Fail| RETRY["🔄 Debug & Retry"]
|
|
233
236
|
|
|
@@ -256,7 +259,7 @@ graph LR
|
|
|
256
259
|
MJ -->|auto-sync| OC["OpenCode"]
|
|
257
260
|
MJ -->|auto-sync| CP["Copilot"]
|
|
258
261
|
MJ -->|auto-sync| AG["Antigravity"]
|
|
259
|
-
|
|
262
|
+
|
|
260
263
|
style MJ fill:#f5e6d3,stroke:#d4a574,stroke-width:2px,color:#5c4033
|
|
261
264
|
```
|
|
262
265
|
|
|
@@ -304,13 +307,13 @@ jaw --home ~/my-project launchd --port 3458 # project → port 3458
|
|
|
304
307
|
|
|
305
308
|
Each instance is fully independent — different working directory, different memory, different MCP config. Perfect for separating work/personal contexts or per-project AI setups.
|
|
306
309
|
|
|
307
|
-
| Flag / Env
|
|
308
|
-
|
|
|
310
|
+
| Flag / Env | What it does |
|
|
311
|
+
| ----------------------- | ----------------------------------------- |
|
|
309
312
|
| `--home <path>` | Use a custom home directory for this run |
|
|
310
|
-
| `--home=<path>` | Same, with `=` syntax
|
|
313
|
+
| `--home=<path>` | Same, with `=` syntax |
|
|
311
314
|
| `CLI_JAW_HOME=<path>` | Set via environment variable |
|
|
312
315
|
| `jaw clone <target>` | Clone current instance to a new directory |
|
|
313
|
-
| `--port <port>` | Custom port for `serve` / `launchd`
|
|
316
|
+
| `--port <port>` | Custom port for `serve` / `launchd` |
|
|
314
317
|
|
|
315
318
|
---
|
|
316
319
|
|
|
@@ -321,13 +324,13 @@ Each CLI comes with preconfigured presets, but you can type **any model ID** dir
|
|
|
321
324
|
<details>
|
|
322
325
|
<summary>View all presets</summary>
|
|
323
326
|
|
|
324
|
-
| CLI
|
|
325
|
-
|
|
|
327
|
+
| CLI | Default | Notable Models |
|
|
328
|
+
| ------------------ | ---------------------------- | ----------------------------------------------- |
|
|
326
329
|
| **Claude** | `claude-sonnet-4-6` | opus-4-6, haiku-4-5, extended thinking variants |
|
|
327
330
|
| **Codex** | `gpt-5.3-codex` | spark, 5.2, 5.1-max, 5.1-mini |
|
|
328
331
|
| **Gemini** | `gemini-2.5-pro` | 3.0-pro-preview, 3-flash-preview, 2.5-flash |
|
|
329
|
-
| **OpenCode** | `claude-opus-4-6-thinking` | 🆓 big-pickle, GLM-5, MiniMax, Kimi, GPT-5-Nano
|
|
330
|
-
| **Copilot** | `gpt-4.1` 🆓
|
|
332
|
+
| **OpenCode** | `claude-opus-4-6-thinking` | 🆓 big-pickle, GLM-5, MiniMax, Kimi, GPT-5-Nano |
|
|
333
|
+
| **Copilot** | `gpt-4.1` 🆓 | 🆓 gpt-5-mini, claude-sonnet-4.6, opus-4.6 |
|
|
331
334
|
|
|
332
335
|
</details>
|
|
333
336
|
|
|
@@ -354,10 +357,10 @@ docker run -d -p 3457:3457 --env-file .env --name jaw cli-jaw
|
|
|
354
357
|
|
|
355
358
|
**Two Dockerfiles:**
|
|
356
359
|
|
|
357
|
-
| File
|
|
358
|
-
|
|
359
|
-
| `Dockerfile`
|
|
360
|
-
| `Dockerfile.dev` | Builds from local source
|
|
360
|
+
| File | Purpose | Use Case |
|
|
361
|
+
| ------------------ | -------------------------- | ----------------------- |
|
|
362
|
+
| `Dockerfile` | Installs from npm registry | Production / deployment |
|
|
363
|
+
| `Dockerfile.dev` | Builds from local source | Development / testing |
|
|
361
364
|
|
|
362
365
|
```bash
|
|
363
366
|
# Dev build (local source)
|
|
@@ -372,6 +375,7 @@ docker run -e CHROME_NO_SANDBOX=1 -p 3457:3457 cli-jaw
|
|
|
372
375
|
```
|
|
373
376
|
|
|
374
377
|
**Security:**
|
|
378
|
+
|
|
375
379
|
- Non-root `jaw` user — Chromium sandbox enabled by default
|
|
376
380
|
- No `ipc: host` or `seccomp=unconfined` — full container isolation
|
|
377
381
|
- `--no-sandbox` only via explicit `CHROME_NO_SANDBOX=1` opt-in
|
|
@@ -427,7 +431,7 @@ src/
|
|
|
427
431
|
## 🧪 Tests
|
|
428
432
|
|
|
429
433
|
<details>
|
|
430
|
-
<summary>
|
|
434
|
+
<summary>445 pass · 1 skipped · zero external dependencies</summary>
|
|
431
435
|
|
|
432
436
|
```bash
|
|
433
437
|
npm test
|
|
@@ -441,8 +445,8 @@ All tests run via `tsx --test` (native Node.js test runner + TypeScript).
|
|
|
441
445
|
|
|
442
446
|
## 📖 Documentation
|
|
443
447
|
|
|
444
|
-
| Document
|
|
445
|
-
|
|
|
448
|
+
| Document | What's inside |
|
|
449
|
+
| ------------------------------------ | ----------------------------------------------------- |
|
|
446
450
|
| [ARCHITECTURE.md](docs/ARCHITECTURE.md) | System design, module graph, REST API (40+ endpoints) |
|
|
447
451
|
| [TESTS.md](TESTS.md) | Test coverage and test plan |
|
|
448
452
|
|
|
@@ -453,16 +457,16 @@ All tests run via `tsx --test` (native Node.js test runner + TypeScript).
|
|
|
453
457
|
<details>
|
|
454
458
|
<summary>Common issues</summary>
|
|
455
459
|
|
|
456
|
-
| Problem
|
|
457
|
-
|
|
|
458
|
-
| `cli-jaw: command not found` | Run `npm install -g cli-jaw` again. Check `npm bin -g` is in your `$PATH`.
|
|
459
|
-
| `Error: node version` | Upgrade to Node.js ≥ 22
|
|
460
|
-
| Agent timeout / no response
|
|
460
|
+
| Problem | Solution |
|
|
461
|
+
| ------------------------------ | --------------------------------------------------------------------------------------------- |
|
|
462
|
+
| `cli-jaw: command not found` | Run `npm install -g cli-jaw` again. Check `npm bin -g` is in your `$PATH`. |
|
|
463
|
+
| `Error: node version` | Upgrade to Node.js ≥ 22:`nvm install 22` or download from [nodejs.org](https://nodejs.org) |
|
|
464
|
+
| Agent timeout / no response | Run `jaw doctor` to check CLI auth. Re-authenticate with `claude auth` / `codex login`. |
|
|
461
465
|
| `EADDRINUSE: port 3457` | Another instance is running. Stop it or use `jaw serve --port 3458`. |
|
|
462
|
-
| Telegram bot not responding
|
|
463
|
-
| Telegram ✓✓ delayed | Normal — Telegram server-side delivery ack can take a few minutes under load. Not a bug.
|
|
464
|
-
| Skills not loading
|
|
465
|
-
| Browser commands fail
|
|
466
|
+
| Telegram bot not responding | Check token with `jaw doctor`. Ensure `jaw serve` is running. |
|
|
467
|
+
| Telegram ✓✓ delayed | Normal — Telegram server-side delivery ack can take a few minutes under load. Not a bug. |
|
|
468
|
+
| Skills not loading | Run `jaw skill reset` then `jaw mcp sync`. |
|
|
469
|
+
| Browser commands fail | Install Chrome/Chromium. Run `jaw browser start` first. |
|
|
466
470
|
|
|
467
471
|
</details>
|
|
468
472
|
|
package/README.zh-CN.md
CHANGED
|
@@ -6,15 +6,17 @@
|
|
|
6
6
|
|
|
7
7
|
*Claude、Codex、Gemini... 从此告别来回切换。*
|
|
8
8
|
|
|
9
|
-
[](#-测试)
|
|
10
10
|
[](https://typescriptlang.org)
|
|
11
11
|
[](https://nodejs.org)
|
|
12
12
|
[](LICENSE)
|
|
13
13
|
[](https://npmjs.com/package/cli-jaw)
|
|
14
|
+
[](#-docker--容器隔离)
|
|
15
|
+
[](#)
|
|
14
16
|
|
|
15
17
|
[English](README.md) / [한국어](README.ko.md) / **中文**
|
|
16
18
|
|
|
17
|
-
|
|
19
|
+
<video src="https://github.com/user-attachments/assets/a7cf17c9-bfb3-44f0-b7fd-d001a39643fd" autoplay loop muted playsinline width="100%"></video>
|
|
18
20
|
|
|
19
21
|
</div>
|
|
20
22
|
|
|
@@ -79,9 +81,10 @@ gemini # Google Gemini — 首次运行触发认证
|
|
|
79
81
|
## CLI-JAW 是什么?
|
|
80
82
|
|
|
81
83
|
CLI-JAW 是驻留在您本地机器上的**专属 AI 助手**,并在您熟悉的界面中运行 — **网页、终端和 Telegram**。您可以向它提出任何问题、委派任务或是自动化您的工作流。
|
|
84
|
+

|
|
82
85
|
|
|
83
|
-
> 💬 *"帮我整理一下今天的日程"* → 直接在 Telegram 上收到整理好的结果
|
|
84
|
-
> 💬 *"重构这个模块,顺便写好测试"* → 子 Agent 搞定,你喝杯咖啡回来就行
|
|
86
|
+
> 💬 *"帮我整理一下今天的日程"* → 直接在 Telegram 上收到整理好的结果
|
|
87
|
+
> 💬 *"重构这个模块,顺便写好测试"* → 子 Agent 搞定,你喝杯咖啡回来就行
|
|
85
88
|
> 💬 *"把那个 PDF 下载下来,关键信息放到 Notion 里"* → 浏览器 + Notion 技能组合,搞定
|
|
86
89
|
|
|
87
90
|
与单一模型的助手不同,CLI-JAW 通过官方 CLI 命令行工具对 **5 大 AI 引擎**(Claude、Codex、Gemini、OpenCode、Copilot)进行编排 — 为您提供各大供应商最优势的能力及统一的体验。当一个引擎处于繁忙状态时,它会自动无缝切换至下一个。107 个内置技能可处理从浏览器自动化到文档生成的所有事务。
|
|
@@ -93,7 +96,7 @@ CLI-JAW 是驻留在您本地机器上的**专属 AI 助手**,并在您熟悉
|
|
|
93
96
|
| ⚡ **多模型自动回退 (Fallback)** | 单一引擎发生故障?下一个立即接管。确保零停机。 |
|
|
94
97
|
| 🎭 **基于编排的性能优化** | 复杂的任务会被拆分给专业的子智能体,以实现效率最大化。 |
|
|
95
98
|
| 📦 **107 个内置技能** | 浏览器自动化、文档生成、Telegram 通知、持久化记忆 — 开箱即用。 |
|
|
96
|
-
| 🖥️ **跨平台支持** | macOS、Linux、Windows
|
|
99
|
+
| 🖥️ **跨平台支持** | macOS、Linux、Windows — ENOENT-safe CLI 启动、自动检测、`.cmd` 支持,跨平台原生运行。 |
|
|
97
100
|
|
|
98
101
|

|
|
99
102
|
|
|
@@ -399,7 +402,7 @@ src/
|
|
|
399
402
|
## 🧪 测试
|
|
400
403
|
|
|
401
404
|
<details>
|
|
402
|
-
<summary>
|
|
405
|
+
<summary>445 pass · 1 skipped · 零外部依赖</summary>
|
|
403
406
|
|
|
404
407
|
```bash
|
|
405
408
|
npm test
|
|
@@ -6,14 +6,30 @@ let _cachedToken = null;
|
|
|
6
6
|
function getCopilotToken() {
|
|
7
7
|
if (_cachedToken)
|
|
8
8
|
return _cachedToken;
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
// ─── DIFF-D: env-first fallback (cross-platform) ───
|
|
10
|
+
const envToken = process.env.COPILOT_GITHUB_TOKEN ||
|
|
11
|
+
process.env.GH_TOKEN ||
|
|
12
|
+
process.env.GITHUB_TOKEN;
|
|
13
|
+
if (envToken) {
|
|
14
|
+
_cachedToken = envToken;
|
|
15
|
+
return _cachedToken;
|
|
11
16
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
17
|
+
// macOS only: Keychain lookup
|
|
18
|
+
if (process.platform === 'darwin') {
|
|
19
|
+
try {
|
|
20
|
+
_cachedToken = execSync('security find-generic-password -s "copilot-cli" -w', { encoding: 'utf8', timeout: 5000 }).trim();
|
|
21
|
+
}
|
|
22
|
+
catch (e) {
|
|
23
|
+
console.warn('[quota-copilot] keychain read failed:', e.message?.split('\n')[0]);
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
return _cachedToken || null;
|
|
27
|
+
}
|
|
28
|
+
// win32/linux: no keychain CLI — rely on env tokens above
|
|
29
|
+
if (process.env.DEBUG) {
|
|
30
|
+
console.info(`[quota-copilot] token lookup skipped on ${process.platform} (set COPILOT_GITHUB_TOKEN or GH_TOKEN)`);
|
|
15
31
|
}
|
|
16
|
-
return
|
|
32
|
+
return null;
|
|
17
33
|
}
|
|
18
34
|
export async function fetchCopilotQuota() {
|
|
19
35
|
const token = getCopilotToken();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quota-copilot.js","sourceRoot":"","sources":["../../lib/quota-copilot.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,qDAAqD;AACrD,sDAAsD;AAEtD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,IAAI,YAAY,GAAkB,IAAI,CAAC;AAEvC,SAAS,eAAe;IACpB,IAAI,YAAY;QAAE,OAAO,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"quota-copilot.js","sourceRoot":"","sources":["../../lib/quota-copilot.ts"],"names":[],"mappings":"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"}
|
package/dist/server.js
CHANGED
|
@@ -237,7 +237,7 @@ function applySettingsPatch(rawPatch = {}, { restartTelegram = false } = {}) {
|
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
239
|
if (restartTelegram && hasTelegramUpdate)
|
|
240
|
-
initTelegram();
|
|
240
|
+
void initTelegram();
|
|
241
241
|
return settings;
|
|
242
242
|
}
|
|
243
243
|
function seedDefaultEmployees({ reset = false, notify = false } = {}) {
|
|
@@ -749,10 +749,16 @@ app.get('/api/i18n/:lang', (req, res) => {
|
|
|
749
749
|
// ─── Start ───────────────────────────────────────────
|
|
750
750
|
watchHeartbeatFile();
|
|
751
751
|
// ─── Graceful Shutdown ──────────────────────────────
|
|
752
|
-
['SIGTERM', 'SIGINT'].forEach(sig => process.on(sig, () => {
|
|
752
|
+
['SIGTERM', 'SIGINT'].forEach(sig => process.on(sig, async () => {
|
|
753
753
|
console.log(`\n[server] ${sig} received, shutting down...`);
|
|
754
754
|
stopHeartbeat();
|
|
755
755
|
killAllAgents('shutdown');
|
|
756
|
+
if (telegramBot) {
|
|
757
|
+
try {
|
|
758
|
+
await telegramBot.stop();
|
|
759
|
+
}
|
|
760
|
+
catch { }
|
|
761
|
+
}
|
|
756
762
|
wss.close();
|
|
757
763
|
server.close(() => {
|
|
758
764
|
console.log('[server] closed');
|
|
@@ -805,7 +811,7 @@ server.listen(PORT, () => {
|
|
|
805
811
|
catch (e) {
|
|
806
812
|
console.error('[mcp-init]', e.message);
|
|
807
813
|
}
|
|
808
|
-
initTelegram();
|
|
814
|
+
void initTelegram();
|
|
809
815
|
startHeartbeat();
|
|
810
816
|
// ─── Seed default employees if none exist ────────
|
|
811
817
|
const seeded = seedDefaultEmployees();
|