kaijibot 2026.6.22 → 2026.6.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.en.md +1 -1
- package/README.md +38 -33
- package/dist/.buildstamp +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-startup-metadata.json +1 -1
- package/dist/{command-registry-9kQrd6fb.js → command-registry-CWjfbJbQ.js} +4 -4
- package/dist/{command-registry-Bdx4B3wy.js → command-registry-v65M1oJQ.js} +1 -1
- package/dist/{completion-cli-TT57JQFZ.js → completion-cli-BHClGzEa.js} +2 -2
- package/dist/{completion-cli-DUy1xq5t.js → completion-cli-Bsk-tUg4.js} +1 -1
- package/dist/{doctor-completion-5vnr7sel.js → doctor-completion-CWFM5hov.js} +1 -1
- package/dist/entry.js +1 -1
- package/dist/extensions/diffs/.kaijibot-runtime-deps-stamp.json +1 -1
- package/dist/extensions/diffs/node_modules/.package-lock.json +3 -3
- package/dist/extensions/diffs/node_modules/@ungap/structured-clone/.github/workflows/node.js.yml +3 -3
- package/dist/extensions/diffs/node_modules/@ungap/structured-clone/cjs/serialize.js +1 -1
- package/dist/extensions/diffs/node_modules/@ungap/structured-clone/esm/serialize.js +1 -1
- package/dist/extensions/diffs/node_modules/@ungap/structured-clone/package.json +7 -2
- package/dist/extensions/diffs/node_modules/@ungap/structured-clone/structured-json.js +1 -1
- package/dist/extensions/feishu/.kaijibot-runtime-deps-stamp.json +1 -1
- package/dist/extensions/webhooks/.kaijibot-runtime-deps-stamp.json +1 -1
- package/dist/{gateway-cli-Lc4_vwt0.js → gateway-cli-fT3VQhgR.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/{onboard-BOUcR8be.js → onboard-Cyimj-sa.js} +1 -1
- package/dist/plugin-sdk/.boundary-entry-shims.stamp +1 -1
- package/dist/{program-DFP-Y-n2.js → program-tpvJpG5s.js} +1 -1
- package/dist/{prompt-select-styled-sDck0Qqt.js → prompt-select-styled-nVUNuNGH.js} +1 -1
- package/dist/{register.maintenance-Cx1bo75e.js → register.maintenance-CSh6aqCw.js} +1 -1
- package/dist/{register.onboard-D204MxI8.js → register.onboard-DVB2_Al8.js} +1 -1
- package/dist/{register.setup-B4Satuvx.js → register.setup-D1jKIzG3.js} +1 -1
- package/dist/{register.subclis-BXqnDdhF.js → register.subclis-Dfxsndk3.js} +3 -3
- package/dist/{register.subclis-BZeyeBpg.js → register.subclis-ogoMChKo.js} +1 -1
- package/dist/{run-main-i1Lwkfhp.js → run-main-B9ZAr_ya.js} +3 -3
- package/dist/{server-A5MuFop-.js → server-BeS5nw27.js} +1 -1
- package/dist/{server.impl-DZDIujUx.js → server.impl-csjkemWa.js} +1 -1
- package/dist/{setup-CuKFik4t.js → setup-N-Sq8nIh.js} +39 -1
- package/dist/{setup.finalize-DhoSjlM4.js → setup.finalize-l2OiNYVw.js} +2 -2
- package/dist/{update-cli-S6D0vMUi.js → update-cli-D35jOjTQ.js} +3 -3
- package/docs/index.md +23 -7
- package/docs/install/index.md +30 -3
- package/docs/install/installer.md +50 -6
- package/docs/install/kaijibot.service.template +51 -0
- package/docs/providers/index.md +1 -1
- package/docs/start/getting-started.md +14 -2
- package/package.json +2 -2
package/README.en.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **Your AI assistant reaches out to you — not the other way around.**
|
|
4
4
|
|
|
5
|
-
Pluggable provider/channel architecture · Cognitive layer turns AI from reactive to proactive ·
|
|
5
|
+
Pluggable provider/channel architecture · Cognitive layer turns AI from reactive to proactive · 35+ LLM providers
|
|
6
6
|
|
|
7
7
|
[](LICENSE)
|
|
8
8
|
[](https://nodejs.org/)
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **你的 AI 助手会主动找你聊天,而不是干等着你提问。**
|
|
4
4
|
|
|
5
|
-
可插拔 provider/channel 架构 · 认知层让 AI 从被动变主动 ·
|
|
5
|
+
可插拔 provider/channel 架构 · 认知层让 AI 从被动变主动 · 35+ LLM 提供商
|
|
6
6
|
|
|
7
7
|
[](LICENSE)
|
|
8
8
|
[](https://nodejs.org/)
|
|
@@ -104,37 +104,57 @@ kaijibot skills install <skill-name>
|
|
|
104
104
|
|
|
105
105
|
## 🚀 快速开始
|
|
106
106
|
|
|
107
|
-
###
|
|
107
|
+
### 准备工作
|
|
108
108
|
|
|
109
|
-
|
|
109
|
+
开始前你需要准备:
|
|
110
|
+
|
|
111
|
+
| 条件 | 说明 | 获取方式 |
|
|
112
|
+
|------|------|----------|
|
|
113
|
+
| **LLM API Key** | 至少一个 AI 提供商的密钥 | 推荐 [智谱 GLM](https://open.bigmodel.cn/)(国内速度快) |
|
|
114
|
+
| **飞书账号** | 用于收发消息 | [open.feishu.cn](https://open.feishu.cn/) 注册即可,向导支持扫码自动创建机器人 |
|
|
115
|
+
|
|
116
|
+
### 安装(推荐方式)
|
|
117
|
+
|
|
118
|
+
**macOS / Linux** — 一条命令搞定:
|
|
110
119
|
|
|
111
120
|
```bash
|
|
112
121
|
curl -fsSL https://gitee.com/kaiji1126/kaijibot/raw/main/scripts/install.sh | bash
|
|
113
122
|
```
|
|
114
123
|
|
|
115
|
-
|
|
124
|
+
脚本会自动:检测系统 → 安装 Node.js(如未安装)→ 安装 KaijiBot → 启动配置向导。
|
|
116
125
|
|
|
117
|
-
**Windows
|
|
126
|
+
**Windows** — PowerShell:
|
|
118
127
|
|
|
119
128
|
```powershell
|
|
120
129
|
iwr -useb https://gitee.com/kaiji1126/kaijibot/raw/main/scripts/install.ps1 | iex
|
|
121
130
|
```
|
|
122
131
|
|
|
123
|
-
|
|
132
|
+
安装完成后,向导会引导你配置 LLM 提供商、飞书机器人、网关等。飞书机器人支持**扫码自动创建**(10 秒搞定,无需手动在开放平台操作)。
|
|
133
|
+
|
|
134
|
+
### 启动
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
kaijibot gateway --port 18789 --verbose
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
启动后在飞书里找到你的机器人,发一条消息。KaijiBot 自动开始构建你的认知画像,几轮对话后会主动推送第一条洞察。
|
|
141
|
+
|
|
142
|
+
<details>
|
|
143
|
+
<summary><b>📦 其他安装方式</b></summary>
|
|
144
|
+
|
|
145
|
+
#### npm 全局安装(已有 Node.js 22+ 环境)
|
|
124
146
|
|
|
125
147
|
```bash
|
|
126
148
|
npm install -g kaijibot
|
|
127
149
|
kaijibot onboard # 交互式向导,自动配置
|
|
128
150
|
```
|
|
129
151
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
使用一键部署脚本(推荐,自动处理镜像构建和环境配置):
|
|
152
|
+
#### Docker 部署
|
|
133
153
|
|
|
134
154
|
```bash
|
|
135
155
|
git clone https://gitee.com/kaiji1126/kaijibot.git
|
|
136
156
|
cd kaijibot
|
|
137
|
-
bash scripts/docker/setup.sh
|
|
157
|
+
bash scripts/docker/setup.sh # 一键部署脚本(推荐)
|
|
138
158
|
```
|
|
139
159
|
|
|
140
160
|
或手动构建:
|
|
@@ -143,15 +163,10 @@ bash scripts/docker/setup.sh
|
|
|
143
163
|
git clone https://gitee.com/kaiji1126/kaijibot.git
|
|
144
164
|
cd kaijibot
|
|
145
165
|
docker build -t kaijibot:local .
|
|
146
|
-
# 创建 .env 文件(参考 .env.example),至少需要:
|
|
147
|
-
# ZAI_API_KEY=your-key
|
|
148
|
-
# KAIJIBOT_GATEWAY_TOKEN=your-token
|
|
149
|
-
# KAIJIBOT_CONFIG_DIR=~/.kaijibot
|
|
150
|
-
# KAIJIBOT_WORKSPACE_DIR=~/.kaijibot/workspace
|
|
151
166
|
docker compose up -d
|
|
152
167
|
```
|
|
153
168
|
|
|
154
|
-
|
|
169
|
+
#### 中文一键部署脚本(从源码运行)
|
|
155
170
|
|
|
156
171
|
```bash
|
|
157
172
|
git clone https://gitee.com/kaiji1126/kaijibot.git
|
|
@@ -159,30 +174,20 @@ cd kaijibot
|
|
|
159
174
|
bash setup-cn.sh
|
|
160
175
|
```
|
|
161
176
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
### 从源码构建
|
|
177
|
+
#### 从源码构建
|
|
165
178
|
|
|
166
179
|
```bash
|
|
167
180
|
git clone https://gitee.com/kaiji1126/kaijibot.git
|
|
168
181
|
cd kaijibot
|
|
169
|
-
# 国内镜像加速
|
|
170
|
-
pnpm install --registry https://registry.npmmirror.com
|
|
182
|
+
pnpm install --registry https://registry.npmmirror.com # 国内镜像加速
|
|
171
183
|
pnpm build
|
|
172
|
-
kaijibot onboard #
|
|
173
|
-
# 从 OpenClaw 迁移?运行:
|
|
174
|
-
kaijibot migrate
|
|
184
|
+
kaijibot onboard # 交互式向导
|
|
185
|
+
# 从 OpenClaw 迁移?运行:kaijibot migrate
|
|
175
186
|
```
|
|
176
187
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
```bash
|
|
180
|
-
kaijibot gateway --port 18789 --verbose
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
启动后在飞书里找到你的机器人,发一条消息。KaijiBot 自动开始构建你的认知画像,几轮对话后会主动推送第一条洞察。
|
|
188
|
+
</details>
|
|
184
189
|
|
|
185
|
-
|
|
190
|
+
### 配置
|
|
186
191
|
|
|
187
192
|
**必需**:至少一个 LLM 提供商的 API Key + 飞书机器人凭证。
|
|
188
193
|
|
|
@@ -193,7 +198,7 @@ export ZAI_API_KEY="your-key" # 智谱 GLM
|
|
|
193
198
|
# export ANTHROPIC_API_KEY="your-key" # Claude
|
|
194
199
|
# export GOOGLE_API_KEY="your-key" # Gemini
|
|
195
200
|
|
|
196
|
-
#
|
|
201
|
+
# 飞书频道(也可在向导中扫码自动配置)
|
|
197
202
|
kaijibot config set channels.feishu.appId "your-app-id"
|
|
198
203
|
kaijibot config set channels.feishu.appSecret "your-app-secret"
|
|
199
204
|
```
|
package/dist/.buildstamp
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"builtAt":
|
|
1
|
+
{"builtAt":1782227419277,"head":"f515bab4f07e70df113a74e8b7ddefa5b176f46f"}
|
package/dist/build-info.json
CHANGED
|
@@ -13,5 +13,5 @@
|
|
|
13
13
|
],
|
|
14
14
|
"channelCatalogSignature": "536c3403ef5a5e2c04e8579768c6cd9bbab05304",
|
|
15
15
|
"rootHelpBundleSignature": "c0600a99303bc067ae8aee4dbea769f9b6d70008",
|
|
16
|
-
"rootHelpText": "\n👾 KaijiBot 2026.6.
|
|
16
|
+
"rootHelpText": "\n👾 KaijiBot 2026.6.23 (f515bab) — 真正的对话不是交换观点,而是共同创造新的理解。\n\nUsage: kaijibot [options] [command]\n\nOptions:\n --container <name> Run the CLI inside a running Podman/Docker container\n named <name> (default: env KAIJIBOT_CONTAINER)\n --dev Dev profile: isolate state under ~/.kaijibot-dev, default\n gateway port 19001, and shift derived ports\n (browser/canvas)\n -h, --help Display help for command\n --log-level <level> Global log level override for file + console\n (silent|fatal|error|warn|info|debug|trace)\n --no-color Disable ANSI colors\n --profile <name> Use a named profile (isolates\n KAIJIBOT_STATE_DIR/KAIJIBOT_CONFIG_PATH under\n ~/.kaijibot-<name>)\n -V, --version output the version number\n\nCommands:\n Hint: commands suffixed with * have subcommands. Run <command> --help for details.\n acp * Agent Control Protocol tools\n agent Run one agent turn via the Gateway\n agents * Manage isolated agents (workspaces, auth, routing)\n approvals * Manage exec approvals (gateway or node host)\n backup * Create and verify local backup archives for KaijiBot\n state\n capability * Run provider-backed inference commands (fallback alias:\n infer)\n channels * Manage connected chat channels (Telegram, Discord, etc.)\n clawbot * Legacy clawbot command aliases\n completion Generate shell completion script\n config * Non-interactive config helpers\n (get/set/unset/file/validate). Default: starts guided\n setup.\n configure Interactive configuration for credentials, channels,\n gateway, and agent defaults\n cron * Manage cron jobs via the Gateway scheduler\n daemon * Gateway service (legacy alias)\n dashboard Open the Control UI with your current token\n devices * Device pairing + token management\n directory * Lookup contact and group IDs (self, peers, groups) for\n supported chat channels\n dns * DNS helpers for wide-area discovery (Tailscale + CoreDNS)\n docs Search the live KaijiBot docs\n doctor Health checks + quick fixes for the gateway and channels\n gateway * Run, inspect, and query the WebSocket Gateway\n health Fetch health from the running gateway\n help Display help for command\n hooks * Manage internal agent hooks\n infer * Run provider-backed inference commands\n logs Tail gateway file logs via RPC\n mcp * Manage KaijiBot MCP config and channel bridge\n memory Search, inspect, and reindex memory files\n message * Send, read, and manage messages\n migrate Migrate data from OpenClaw or legacy installations to\n KaijiBot\n models * Discover, scan, and configure models\n node * Run and manage the headless node host service\n nodes * Manage gateway-owned node pairing and node commands\n onboard Interactive onboarding for gateway, workspace, and skills\n pairing * Secure DM pairing (approve inbound requests)\n plugins * Manage KaijiBot plugins and extensions\n qa * Run QA scenarios and launch the private QA debugger UI\n qr Generate mobile pairing QR/setup code\n reset Reset local config/state (keeps the CLI installed)\n sandbox * Manage sandbox containers for agent isolation\n secrets * Secrets runtime reload controls\n security * Security tools and local config audits\n sessions * List stored conversation sessions\n setup Initialize local config and agent workspace\n skills * List and inspect available skills\n soul * Manage soul presets (MBTI-based personality profiles)\n status Show channel health and recent session recipients\n system * System events, heartbeat, and presence\n tasks * Inspect durable background task state\n tui Open a terminal UI connected to the Gateway\n uninstall Uninstall the gateway service + local data (CLI remains)\n update * Update KaijiBot and inspect update channel status\n webhooks * Webhook helpers and integrations\n\nExamples:\n kaijibot models --help\n Show detailed help for the models command.\n kaijibot channels login --verbose\n Link personal WhatsApp Web and show QR + connection logs.\n kaijibot message send --target +15555550123 --message \"Hi\" --json\n Send via your web session and print JSON result.\n kaijibot gateway --port 18789\n Run the WebSocket Gateway locally.\n kaijibot --dev gateway\n Run a dev Gateway (isolated state/config) on ws://127.0.0.1:19001.\n kaijibot gateway --force\n Kill anything bound to the default gateway port, then start it.\n kaijibot gateway ...\n Gateway control via WebSocket.\n kaijibot agent --to +15555550123 --message \"Run summary\" --deliver\n Talk directly to the agent using the Gateway; optionally send the WhatsApp reply.\n kaijibot message send --channel feishu --target ou_xxx --message \"Hi\"\n Send via your Telegram bot.\n\nDocs: https://gitee.com/kaiji1126/kaijibot/blob/main/docs/cli.md\n\n"
|
|
17
17
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as resolveCliArgvInvocation } from "./argv-invocation-Cj-UQt0U.js";
|
|
2
2
|
import { n as shouldRegisterPrimaryCommandOnly } from "./command-registration-policy-Bp03ya2T.js";
|
|
3
|
-
import { a as defineImportedCommandGroupSpec, i as buildCommandGroupEntries, o as defineImportedProgramCommandGroupSpecs, r as registerSubCliCommands } from "./register.subclis-
|
|
3
|
+
import { a as defineImportedCommandGroupSpec, i as buildCommandGroupEntries, o as defineImportedProgramCommandGroupSpecs, r as registerSubCliCommands } from "./register.subclis-Dfxsndk3.js";
|
|
4
4
|
import { i as registerCommandGroups, r as registerCommandGroupByName } from "./register-command-groups-BoiHpzbo.js";
|
|
5
5
|
import { n as getCoreCliCommandNames$1, t as getCoreCliCommandDescriptors } from "./core-command-descriptors-ByQEHYvG.js";
|
|
6
6
|
//#region src/cli/program/command-registry.ts
|
|
@@ -16,12 +16,12 @@ const coreEntrySpecs = [
|
|
|
16
16
|
...withProgramOnlySpecs(defineImportedProgramCommandGroupSpecs([
|
|
17
17
|
{
|
|
18
18
|
commandNames: ["setup"],
|
|
19
|
-
loadModule: () => import("./register.setup-
|
|
19
|
+
loadModule: () => import("./register.setup-D1jKIzG3.js"),
|
|
20
20
|
exportName: "registerSetupCommand"
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
commandNames: ["onboard"],
|
|
24
|
-
loadModule: () => import("./register.onboard-
|
|
24
|
+
loadModule: () => import("./register.onboard-DVB2_Al8.js"),
|
|
25
25
|
exportName: "registerOnboardCommand"
|
|
26
26
|
},
|
|
27
27
|
{
|
|
@@ -46,7 +46,7 @@ const coreEntrySpecs = [
|
|
|
46
46
|
"reset",
|
|
47
47
|
"uninstall"
|
|
48
48
|
],
|
|
49
|
-
loadModule: () => import("./register.maintenance-
|
|
49
|
+
loadModule: () => import("./register.maintenance-CSh6aqCw.js"),
|
|
50
50
|
exportName: "registerMaintenanceCommands"
|
|
51
51
|
},
|
|
52
52
|
{
|
|
@@ -4,8 +4,8 @@ import { c as routeLogsToStderr } from "./subsystem-qDUB67UD.js";
|
|
|
4
4
|
import { t as formatDocsLink } from "./links-CKT5WkKt.js";
|
|
5
5
|
import { r as theme } from "./theme-AvNURkOg.js";
|
|
6
6
|
import { _ as resolveStateDir } from "./paths-CAiS8AEq.js";
|
|
7
|
-
import { n as registerSubCliByName, t as getSubCliEntries } from "./register.subclis-
|
|
8
|
-
import { n as registerCoreCliByName, t as getCoreCliCommandNames } from "./command-registry-
|
|
7
|
+
import { n as registerSubCliByName, t as getSubCliEntries } from "./register.subclis-Dfxsndk3.js";
|
|
8
|
+
import { n as registerCoreCliByName, t as getCoreCliCommandNames } from "./command-registry-CWjfbJbQ.js";
|
|
9
9
|
import { t as getProgramContext } from "./program-context-B9uUWtK2.js";
|
|
10
10
|
import path from "node:path";
|
|
11
11
|
import os from "node:os";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as registerCompletionCli, c as usesSlowDynamicCompletion, i as isCompletionInstalled, n as getCompletionScript, o as resolveCompletionCachePath, r as installCompletion, s as resolveShellFromEnv, t as completionCacheExists } from "./completion-cli-
|
|
1
|
+
import { a as registerCompletionCli, c as usesSlowDynamicCompletion, i as isCompletionInstalled, n as getCompletionScript, o as resolveCompletionCachePath, r as installCompletion, s as resolveShellFromEnv, t as completionCacheExists } from "./completion-cli-BHClGzEa.js";
|
|
2
2
|
export { completionCacheExists, getCompletionScript, installCompletion, isCompletionInstalled, registerCompletionCli, resolveCompletionCachePath, resolveShellFromEnv, usesSlowDynamicCompletion };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as resolveKaijiBotPackageRoot } from "./kaijibot-root-DrKPBBQD.js";
|
|
2
2
|
import { n as resolveCliName } from "./cli-name-CQICB27Q.js";
|
|
3
3
|
import { t as note } from "./note-1iI6lzbO.js";
|
|
4
|
-
import { c as usesSlowDynamicCompletion, i as isCompletionInstalled, o as resolveCompletionCachePath, r as installCompletion, s as resolveShellFromEnv, t as completionCacheExists } from "./completion-cli-
|
|
4
|
+
import { c as usesSlowDynamicCompletion, i as isCompletionInstalled, o as resolveCompletionCachePath, r as installCompletion, s as resolveShellFromEnv, t as completionCacheExists } from "./completion-cli-BHClGzEa.js";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { spawnSync } from "node:child_process";
|
|
7
7
|
//#region src/commands/doctor-completion.ts
|
package/dist/entry.js
CHANGED
|
@@ -203,7 +203,7 @@ function tryHandleRootHelpFastPath(argv, deps = {}) {
|
|
|
203
203
|
}
|
|
204
204
|
function runMainOrRootHelp(argv) {
|
|
205
205
|
if (tryHandleRootHelpFastPath(argv)) return;
|
|
206
|
-
import("./run-main-
|
|
206
|
+
import("./run-main-B9ZAr_ya.js").then(({ runCli }) => runCli(argv)).catch((error) => {
|
|
207
207
|
console.error("[kaijibot] Failed to start CLI:", error instanceof Error ? error.stack ?? error.message : error);
|
|
208
208
|
process$1.exitCode = 1;
|
|
209
209
|
});
|
|
@@ -140,9 +140,9 @@
|
|
|
140
140
|
"license": "MIT"
|
|
141
141
|
},
|
|
142
142
|
"node_modules/@ungap/structured-clone": {
|
|
143
|
-
"version": "1.3.
|
|
144
|
-
"resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.
|
|
145
|
-
"integrity": "sha512-
|
|
143
|
+
"version": "1.3.2",
|
|
144
|
+
"resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.2.tgz",
|
|
145
|
+
"integrity": "sha512-5jsZFwgR5rTdKwidH9Qmat75RKwqfpKlWWB1frDkljN127mwqBu8K0PYo7/hFpF03IEJpfVPpCQDY/eDx3iHvA==",
|
|
146
146
|
"license": "ISC"
|
|
147
147
|
},
|
|
148
148
|
"node_modules/ccount": {
|
package/dist/extensions/diffs/node_modules/@ungap/structured-clone/.github/workflows/node.js.yml
CHANGED
|
@@ -12,12 +12,12 @@ jobs:
|
|
|
12
12
|
|
|
13
13
|
strategy:
|
|
14
14
|
matrix:
|
|
15
|
-
node-version: [
|
|
15
|
+
node-version: [22]
|
|
16
16
|
|
|
17
17
|
steps:
|
|
18
|
-
- uses: actions/checkout@
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
19
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
20
|
-
uses: actions/setup-node@
|
|
20
|
+
uses: actions/setup-node@v4
|
|
21
21
|
with:
|
|
22
22
|
node-version: ${{ matrix.node-version }}
|
|
23
23
|
cache: 'npm'
|
|
@@ -119,7 +119,7 @@ const serializer = (strict, json, $, _) => {
|
|
|
119
119
|
return index;
|
|
120
120
|
}
|
|
121
121
|
case DATE:
|
|
122
|
-
return as([TYPE, value.toISOString()], value);
|
|
122
|
+
return as([TYPE, isNaN(value.getTime()) ? EMPTY : value.toISOString()], value);
|
|
123
123
|
case REGEXP: {
|
|
124
124
|
const {source, flags} = value;
|
|
125
125
|
return as([TYPE, {source, flags}], value);
|
|
@@ -121,7 +121,7 @@ const serializer = (strict, json, $, _) => {
|
|
|
121
121
|
return index;
|
|
122
122
|
}
|
|
123
123
|
case DATE:
|
|
124
|
-
return as([TYPE, value.toISOString()], value);
|
|
124
|
+
return as([TYPE, isNaN(value.getTime()) ? EMPTY : value.toISOString()], value);
|
|
125
125
|
case REGEXP: {
|
|
126
126
|
const {source, flags} = value;
|
|
127
127
|
return as([TYPE, {source, flags}], value);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ungap/structured-clone",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"description": "A structuredClone polyfill",
|
|
5
5
|
"main": "./cjs/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -24,7 +24,12 @@
|
|
|
24
24
|
"ascjs": "^6.0.3",
|
|
25
25
|
"c8": "^11.0.0",
|
|
26
26
|
"coveralls": "^3.1.1",
|
|
27
|
-
"rollup": "^4.
|
|
27
|
+
"rollup": "^4.62.2"
|
|
28
|
+
},
|
|
29
|
+
"overrides": {
|
|
30
|
+
"c8": {
|
|
31
|
+
"yargs": "^18.0.0"
|
|
32
|
+
}
|
|
28
33
|
},
|
|
29
34
|
"module": "./esm/index.js",
|
|
30
35
|
"type": "module",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var StructuredJSON=function(e){"use strict";const r="object"==typeof self?self:globalThis,t=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new r[e](t)},
|
|
1
|
+
var StructuredJSON=function(e){"use strict";const r="object"==typeof self?self:globalThis,t=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new r[e](t)},s=e=>((e,r)=>{const s=(r,t)=>(e.set(t,r),r),n=c=>{if(e.has(c))return e.get(c);const[a,o]=r[c];switch(a){case 0:case-1:return s(o,c);case 1:{const e=s([],c);for(const r of o)e.push(n(r));return e}case 2:{const e=s({},c);for(const[r,t]of o)e[n(r)]=n(t);return e}case 3:return s(new Date(o),c);case 4:{const{source:e,flags:r}=o;return s(new RegExp(e,r),c)}case 5:{const e=s(new Map,c);for(const[r,t]of o)e.set(n(r),n(t));return e}case 6:{const e=s(new Set,c);for(const r of o)e.add(n(r));return e}case 7:{const{name:e,message:r}=o;return s(t(e,r),c)}case 8:return s(BigInt(o),c);case"BigInt":return s(Object(BigInt(o)),c);case"ArrayBuffer":return s(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:e}=new Uint8Array(o);return s(new DataView(e),o)}}return s(t(a,o),c)};return n})(new Map,e)(0),n="",{toString:c}={},{keys:a}=Object,o=e=>{const r=typeof e;if("object"!==r||!e)return[0,r];const t=c.call(e).slice(8,-1);switch(t){case"Array":return[1,n];case"Object":return[2,n];case"Date":return[3,n];case"RegExp":return[4,n];case"Map":return[5,n];case"Set":return[6,n];case"DataView":return[1,t]}return t.includes("Array")?[1,t]:t.includes("Error")?[7,t]:[2,t]},u=([e,r])=>0===e&&("function"===r||"symbol"===r),i=(e,{json:r,lossy:t}={})=>{const s=[];return((e,r,t,s)=>{const c=(e,r)=>{const n=s.push(e)-1;return t.set(r,n),n},i=s=>{if(t.has(s))return t.get(s);let[f,l]=o(s);switch(f){case 0:{let r=s;switch(l){case"bigint":f=8,r=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);r=null;break;case"undefined":return c([-1],s)}return c([f,r],s)}case 1:{if(l){let e=s;return"DataView"===l?e=new Uint8Array(s.buffer):"ArrayBuffer"===l&&(e=new Uint8Array(s)),c([l,[...e]],s)}const e=[],r=c([f,e],s);for(const r of s)e.push(i(r));return r}case 2:{if(l)switch(l){case"BigInt":return c([l,s.toString()],s);case"Boolean":case"Number":case"String":return c([l,s.valueOf()],s)}if(r&&"toJSON"in s)return i(s.toJSON());const t=[],n=c([f,t],s);for(const r of a(s))!e&&u(o(s[r]))||t.push([i(r),i(s[r])]);return n}case 3:return c([f,isNaN(s.getTime())?n:s.toISOString()],s);case 4:{const{source:e,flags:r}=s;return c([f,{source:e,flags:r}],s)}case 5:{const r=[],t=c([f,r],s);for(const[t,n]of s)(e||!u(o(t))&&!u(o(n)))&&r.push([i(t),i(n)]);return t}case 6:{const r=[],t=c([f,r],s);for(const t of s)!e&&u(o(t))||r.push(i(t));return t}}const{message:w}=s;return c([f,{name:l,message:w}],s)};return i})(!(r||t),!!r,new Map,s)(e),s},{parse:f,stringify:l}=JSON,w={json:!0,lossy:!0};return e.parse=e=>s(f(e)),e.stringify=e=>l(i(e,w)),e}({});
|
|
@@ -1173,7 +1173,7 @@ async function runGatewayCommand$1(opts) {
|
|
|
1173
1173
|
const { startGatewayServer } = await withProgress({
|
|
1174
1174
|
label: "Loading gateway modules…",
|
|
1175
1175
|
indeterminate: true
|
|
1176
|
-
}, async () => import("./server-
|
|
1176
|
+
}, async () => import("./server-BeS5nw27.js"));
|
|
1177
1177
|
setConsoleTimestampPrefix(true);
|
|
1178
1178
|
if (devMode) await ensureDevGatewayConfig({ reset: Boolean(opts.reset) });
|
|
1179
1179
|
gatewayLog.info("loading configuration…");
|
package/dist/index.js
CHANGED
|
@@ -26,7 +26,7 @@ let runExec;
|
|
|
26
26
|
let saveSessionStore;
|
|
27
27
|
let waitForever;
|
|
28
28
|
async function loadLegacyCliDeps() {
|
|
29
|
-
const [{ installGaxiosFetchCompat }, { runCli }] = await Promise.all([import("./gaxios-fetch-compat-DvraiCww.js"), import("./run-main-
|
|
29
|
+
const [{ installGaxiosFetchCompat }, { runCli }] = await Promise.all([import("./gaxios-fetch-compat-DvraiCww.js"), import("./run-main-B9ZAr_ya.js")]);
|
|
30
30
|
return {
|
|
31
31
|
installGaxiosFetchCompat,
|
|
32
32
|
runCli
|
|
@@ -16,7 +16,7 @@ import { t as WizardCancelledError } from "./prompts-DBTAxywl.js";
|
|
|
16
16
|
import { n as logConfigUpdated } from "./logging-Csa3OyoF.js";
|
|
17
17
|
import { t as createClackPrompter } from "./clack-prompter-OiJwdy5r.js";
|
|
18
18
|
import { c as resolveManifestProviderOnboardAuthFlags, i as resolveDeprecatedAuthChoiceReplacement, n as isDeprecatedAuthChoice, r as normalizeLegacyOnboardAuthChoice, t as formatDeprecatedNonInteractiveAuthChoiceError } from "./auth-choice-legacy-BM0vn9R-.js";
|
|
19
|
-
import { t as runSetupWizard } from "./setup-
|
|
19
|
+
import { t as runSetupWizard } from "./setup-N-Sq8nIh.js";
|
|
20
20
|
import { r as applyLocalSetupWorkspaceConfig } from "./onboard-config-Lh_yB7dL.js";
|
|
21
21
|
//#region src/commands/onboard-core-auth-flags.ts
|
|
22
22
|
const CORE_ONBOARD_AUTH_FLAGS = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
2026-06-
|
|
1
|
+
2026-06-23T15:11:11.921Z
|
|
@@ -4,7 +4,7 @@ import { n as VERSION } from "./version-CL-VJOV3.js";
|
|
|
4
4
|
import "./globals-D7B2Z7Cq.js";
|
|
5
5
|
import { n as resolveCliName } from "./cli-name-CQICB27Q.js";
|
|
6
6
|
import { n as resolveCliChannelOptions } from "./channel-options-plNrATBP.js";
|
|
7
|
-
import { i as registerProgramCommands } from "./command-registry-
|
|
7
|
+
import { i as registerProgramCommands } from "./command-registry-CWjfbJbQ.js";
|
|
8
8
|
import { n as setProgramContext } from "./program-context-B9uUWtK2.js";
|
|
9
9
|
import { t as isCommandJsonOutputMode } from "./json-mode-Be3c80wJ.js";
|
|
10
10
|
import { t as forceFreePort } from "./ports-Qs7MEJp6.js";
|
|
@@ -111,7 +111,7 @@ import { t as ensureSystemdUserLingerInteractive } from "./systemd-linger-p1W5Ka
|
|
|
111
111
|
import { t as formatHealthCheckFailure } from "./health-format-CPlFnpEc.js";
|
|
112
112
|
import { a as stripUnknownConfigKeys, i as resolveConfigPathTarget, n as formatConfigPath, r as noteOpencodeProviderOverrides, t as runDoctorConfigPreflight } from "./doctor-config-preflight-6FaPZK61.js";
|
|
113
113
|
import { a as runChannelPluginStartupMaintenance, i as normalizeCronJobIdentityFields, t as coerceFiniteScheduleNumber } from "./schedule-B0pphiI5.js";
|
|
114
|
-
import { n as doctorShellCompletion } from "./doctor-completion-
|
|
114
|
+
import { n as doctorShellCompletion } from "./doctor-completion-CWFM5hov.js";
|
|
115
115
|
import { t as collectChannelStatusIssues } from "./channels-status-issues-byWfP2WG.js";
|
|
116
116
|
import { t as resolveDefaultChannelAccountContext } from "./channel-account-context-D0WBO2Yx.js";
|
|
117
117
|
import { a as runLegacyStateMigrations, n as detectLegacyStateMigrations } from "./state-migrations-yqQW8QaA.js";
|
|
@@ -15,7 +15,7 @@ import { i as formatControlUiSshHint } from "./onboard-helpers-BJhCcI9U.js";
|
|
|
15
15
|
import { r as resolveGatewayService } from "./service-sQcLduaW.js";
|
|
16
16
|
import { a as removeStateAndLinkedPaths, i as removePath, o as removeWorkspaceDirs, r as listAgentSessionDirs, t as buildCleanupPlan } from "./cleanup-utils-aQQw4Sm2.js";
|
|
17
17
|
import { n as runCommandWithRuntime } from "./cli-utils-CRL7qVtB.js";
|
|
18
|
-
import { n as doctorCommand, t as selectStyled } from "./prompt-select-styled-
|
|
18
|
+
import { n as doctorCommand, t as selectStyled } from "./prompt-select-styled-nVUNuNGH.js";
|
|
19
19
|
import path from "node:path";
|
|
20
20
|
import { cancel, confirm, isCancel, multiselect } from "@clack/prompts";
|
|
21
21
|
//#region src/infra/clipboard.ts
|
|
@@ -4,7 +4,7 @@ import { r as theme } from "./theme-AvNURkOg.js";
|
|
|
4
4
|
import { n as runCommandWithRuntime } from "./cli-utils-CRL7qVtB.js";
|
|
5
5
|
import { c as resolveManifestProviderOnboardAuthFlags } from "./auth-choice-legacy-BM0vn9R-.js";
|
|
6
6
|
import { n as formatAuthChoiceChoicesForCli } from "./auth-choice-options-kLAihnil.js";
|
|
7
|
-
import { n as CORE_ONBOARD_AUTH_FLAGS, t as setupWizardCommand } from "./onboard-
|
|
7
|
+
import { n as CORE_ONBOARD_AUTH_FLAGS, t as setupWizardCommand } from "./onboard-Cyimj-sa.js";
|
|
8
8
|
//#region src/cli/program/register.onboard.ts
|
|
9
9
|
function resolveInstallDaemonFlag(command, opts) {
|
|
10
10
|
if (!command || typeof command !== "object") return;
|
|
@@ -11,7 +11,7 @@ import { s as resolveSessionTranscriptsDir } from "./paths-DRORteAV.js";
|
|
|
11
11
|
import { n as safeParseWithSchema } from "./zod-parse-B6oqrVWQ.js";
|
|
12
12
|
import { n as logConfigUpdated, t as formatConfigPath } from "./logging-Csa3OyoF.js";
|
|
13
13
|
import { n as runCommandWithRuntime } from "./cli-utils-CRL7qVtB.js";
|
|
14
|
-
import { t as setupWizardCommand } from "./onboard-
|
|
14
|
+
import { t as setupWizardCommand } from "./onboard-Cyimj-sa.js";
|
|
15
15
|
import fs from "node:fs/promises";
|
|
16
16
|
import JSON5 from "json5";
|
|
17
17
|
import { z } from "zod";
|
|
@@ -58,7 +58,7 @@ const entrySpecs = [
|
|
|
58
58
|
},
|
|
59
59
|
{
|
|
60
60
|
commandNames: ["gateway"],
|
|
61
|
-
loadModule: () => import("./gateway-cli-
|
|
61
|
+
loadModule: () => import("./gateway-cli-fT3VQhgR.js"),
|
|
62
62
|
exportName: "registerGatewayCli"
|
|
63
63
|
},
|
|
64
64
|
{
|
|
@@ -206,12 +206,12 @@ const entrySpecs = [
|
|
|
206
206
|
},
|
|
207
207
|
{
|
|
208
208
|
commandNames: ["update"],
|
|
209
|
-
loadModule: () => import("./update-cli-
|
|
209
|
+
loadModule: () => import("./update-cli-D35jOjTQ.js"),
|
|
210
210
|
exportName: "registerUpdateCli"
|
|
211
211
|
},
|
|
212
212
|
{
|
|
213
213
|
commandNames: ["completion"],
|
|
214
|
-
loadModule: () => import("./completion-cli-
|
|
214
|
+
loadModule: () => import("./completion-cli-Bsk-tUg4.js"),
|
|
215
215
|
exportName: "registerCompletionCli"
|
|
216
216
|
}
|
|
217
217
|
])
|
|
@@ -395,7 +395,7 @@ async function runCli(argv = process$1.argv) {
|
|
|
395
395
|
if (await tryRouteCli(normalizedArgv)) return;
|
|
396
396
|
enableConsoleCapture();
|
|
397
397
|
const [{ buildProgram }, { installUnhandledRejectionHandler }, { restoreTerminalState }] = await Promise.all([
|
|
398
|
-
import("./program-
|
|
398
|
+
import("./program-tpvJpG5s.js"),
|
|
399
399
|
import("./unhandled-rejections-B7jiLc5X.js"),
|
|
400
400
|
import("./restore-ADlpnb-M.js")
|
|
401
401
|
]);
|
|
@@ -412,10 +412,10 @@ async function runCli(argv = process$1.argv) {
|
|
|
412
412
|
const { getProgramContext } = await import("./program-context-6irSsyF2.js");
|
|
413
413
|
const ctx = getProgramContext(program);
|
|
414
414
|
if (ctx) {
|
|
415
|
-
const { registerCoreCliByName } = await import("./command-registry-
|
|
415
|
+
const { registerCoreCliByName } = await import("./command-registry-v65M1oJQ.js");
|
|
416
416
|
await registerCoreCliByName(program, ctx, primary, parseArgv);
|
|
417
417
|
}
|
|
418
|
-
const { registerSubCliByName } = await import("./register.subclis-
|
|
418
|
+
const { registerSubCliByName } = await import("./register.subclis-ogoMChKo.js");
|
|
419
419
|
await registerSubCliByName(program, primary);
|
|
420
420
|
}
|
|
421
421
|
if (!shouldSkipPluginCommandRegistration({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as truncateCloseReason } from "./close-reason-CI_g9IO0.js";
|
|
2
2
|
//#region src/gateway/server.ts
|
|
3
3
|
async function loadServerImpl() {
|
|
4
|
-
return await import("./server.impl-
|
|
4
|
+
return await import("./server.impl-csjkemWa.js");
|
|
5
5
|
}
|
|
6
6
|
async function startGatewayServer(...args) {
|
|
7
7
|
return await (await loadServerImpl()).startGatewayServer(...args);
|
|
@@ -196,7 +196,7 @@ import { t as loadWorkspaceHookEntries } from "./workspace-B5a0KS0o.js";
|
|
|
196
196
|
import { i as resolveGatewayStartupPluginIds, r as resolveConfiguredDeferredChannelPluginIds } from "./channel-plugin-ids-CscSLyjB.js";
|
|
197
197
|
import { a as runChannelPluginStartupMaintenance, i as normalizeCronJobIdentityFields, n as computeNextRunAtMs, r as computePreviousRunAtMs, t as coerceFiniteScheduleNumber } from "./schedule-B0pphiI5.js";
|
|
198
198
|
import { i as migrateOrphanedSessionKeys } from "./state-migrations-yqQW8QaA.js";
|
|
199
|
-
import { t as runSetupWizard } from "./setup-
|
|
199
|
+
import { t as runSetupWizard } from "./setup-N-Sq8nIh.js";
|
|
200
200
|
import { d as startTaskRegistryMaintenance, f as stopTaskRegistryMaintenance, g as markCronJobActive, h as clearCronJobActive, n as getInspectableTaskRegistrySummary } from "./task-registry.maintenance-BD6d9fLw.js";
|
|
201
201
|
import { n as collectEnabledInsecureOrDangerousFlags, t as DEFAULT_GATEWAY_HTTP_TOOL_DENY } from "./dangerous-tools-C6SsOcC4.js";
|
|
202
202
|
import { _ as buildGogWatchStartArgs, g as buildGogWatchServeArgs, i as ensureTailscaleEndpoint, w as resolveGmailHookRuntimeConfig } from "./gmail-setup-utils-Jqi6TbIM.js";
|
|
@@ -57,6 +57,29 @@ async function requireRiskAcknowledgement(params) {
|
|
|
57
57
|
initialValue: true
|
|
58
58
|
})) throw new WizardCancelledError("risk not accepted");
|
|
59
59
|
}
|
|
60
|
+
async function showPrerequisiteChecklist(prompter) {
|
|
61
|
+
await prompter.note([
|
|
62
|
+
"开始前请准备好以下条件:",
|
|
63
|
+
"",
|
|
64
|
+
" 1. LLM API Key(必需)",
|
|
65
|
+
" 推荐「智谱 GLM」:https://open.bigmodel.cn/",
|
|
66
|
+
" 注册后进入「API Keys」页面创建密钥",
|
|
67
|
+
" 其他可选:DeepSeek / Claude / Gemini / 通义千问",
|
|
68
|
+
"",
|
|
69
|
+
" 2. 飞书账号(必需)",
|
|
70
|
+
" 向导中可选「扫码自动创建飞书机器人」,10 秒搞定",
|
|
71
|
+
" 或手动在 https://open.feishu.cn/ 创建企业自建应用",
|
|
72
|
+
"",
|
|
73
|
+
" 3. Node.js 22+ 环境",
|
|
74
|
+
" 如通过一键安装脚本运行,会自动安装",
|
|
75
|
+
"",
|
|
76
|
+
"准备好后继续配置。"
|
|
77
|
+
].join("\n"), "📋 配置前准备");
|
|
78
|
+
return prompter.confirm({
|
|
79
|
+
message: "我已准备好以上条件,继续配置?",
|
|
80
|
+
initialValue: true
|
|
81
|
+
});
|
|
82
|
+
}
|
|
60
83
|
async function probePrimaryProviderKey(config, prompter) {
|
|
61
84
|
const { resolvePrimaryModel } = await import("./provider-model-primary-Bli8OnCQ.js");
|
|
62
85
|
const primaryModel = resolvePrimaryModel(config.agents?.defaults?.model);
|
|
@@ -74,6 +97,12 @@ async function runSetupWizard(opts, runtime = defaultRuntime, prompter) {
|
|
|
74
97
|
const onboardHelpers = await import("./onboard-helpers-CMvJfZTX.js");
|
|
75
98
|
onboardHelpers.printWizardHeader(runtime);
|
|
76
99
|
await prompter.intro("KaijiBot 配置向导");
|
|
100
|
+
if (opts.acceptRisk !== true) {
|
|
101
|
+
if (!await showPrerequisiteChecklist(prompter)) {
|
|
102
|
+
await prompter.outro("配置已取消。准备好后再来吧!");
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
77
106
|
await requireRiskAcknowledgement({
|
|
78
107
|
opts,
|
|
79
108
|
prompter
|
|
@@ -339,6 +368,15 @@ async function runSetupWizard(opts, runtime = defaultRuntime, prompter) {
|
|
|
339
368
|
const { promptCustomApiConfig } = await import("./onboard-custom-CLaOD_BI.js");
|
|
340
369
|
const { applyAuthChoice, resolvePreferredProviderForAuthChoice, warnIfModelConfigLooksOff } = await import("./auth-choice-ChZMk5hI.js");
|
|
341
370
|
const { applyPrimaryModel, promptDefaultModel } = await import("./model-picker-DU3_Nbi5.js");
|
|
371
|
+
await prompter.note([
|
|
372
|
+
"选择你的 AI 提供商。如需注册 API Key:",
|
|
373
|
+
"",
|
|
374
|
+
" 智谱 GLM(推荐):https://open.bigmodel.cn/",
|
|
375
|
+
" DeepSeek:https://platform.deepseek.com/",
|
|
376
|
+
" Anthropic Claude:https://console.anthropic.com/",
|
|
377
|
+
" Google Gemini:https://aistudio.google.com/apikey",
|
|
378
|
+
" 通义千问:https://dashscope.console.aliyun.com/"
|
|
379
|
+
].join("\n"), "🔑 AI 提供商");
|
|
342
380
|
const authStore = ensureAuthProfileStore(void 0, { allowKeychainPrompt: false });
|
|
343
381
|
const authChoiceFromPrompt = opts.authChoice === void 0;
|
|
344
382
|
const authChoice = opts.authChoice ?? await promptAuthChoiceGrouped({
|
|
@@ -479,7 +517,7 @@ async function runSetupWizard(opts, runtime = defaultRuntime, prompter) {
|
|
|
479
517
|
mode
|
|
480
518
|
});
|
|
481
519
|
await writeConfigFile(nextConfig);
|
|
482
|
-
const { finalizeSetupWizard } = await import("./setup.finalize-
|
|
520
|
+
const { finalizeSetupWizard } = await import("./setup.finalize-l2OiNYVw.js");
|
|
483
521
|
const { launchedTui } = await finalizeSetupWizard({
|
|
484
522
|
flow,
|
|
485
523
|
opts,
|
|
@@ -13,11 +13,11 @@ import { i as isSystemdUserServiceAvailable } from "./systemd-BzKNKK7i.js";
|
|
|
13
13
|
import { r as resolveGatewayService, t as describeGatewayServiceRestart } from "./service-sQcLduaW.js";
|
|
14
14
|
import { n as listConfiguredWebSearchProviders } from "./runtime-BZ1qoy37.js";
|
|
15
15
|
import { t as ensureControlUiAssetsBuilt } from "./control-ui-assets-Dndhi-TR.js";
|
|
16
|
-
import { r as installCompletion } from "./completion-cli-
|
|
16
|
+
import { r as installCompletion } from "./completion-cli-BHClGzEa.js";
|
|
17
17
|
import { r as healthCommand } from "./health-DuV85G9Q.js";
|
|
18
18
|
import { t as resolveSetupSecretInputString } from "./setup.secret-input-NrcTToqs.js";
|
|
19
19
|
import { t as formatHealthCheckFailure } from "./health-format-CPlFnpEc.js";
|
|
20
|
-
import { r as ensureCompletionCacheExists, t as checkShellCompletionStatus } from "./doctor-completion-
|
|
20
|
+
import { r as ensureCompletionCacheExists, t as checkShellCompletionStatus } from "./doctor-completion-CWFM5hov.js";
|
|
21
21
|
import { t as runTui } from "./tui-1ksaisKX.js";
|
|
22
22
|
import path from "node:path";
|
|
23
23
|
import os from "node:os";
|
|
@@ -28,10 +28,10 @@ import { d as formatUpdateChannelLabel, g as resolveUpdateChannelDisplay, h as r
|
|
|
28
28
|
import { i as resolveUpdateAvailability, n as formatUpdateOneLiner, t as formatUpdateAvailableHint } from "./status.update-B4aRCMEX.js";
|
|
29
29
|
import { a as createGlobalInstallEnv, c as globalInstallArgs, d as resolveGlobalInstallTarget, f as normalizePackageTagInput, i as collectInstalledGlobalPackageErrors, l as resolveExpectedInstalledVersionFromSpec, m as readPackageVersion, n as canResolveRegistryVersionForPackageTarget, o as detectGlobalInstallManagerByPresence, p as readPackageName, r as cleanupGlobalRenameDirs, s as detectGlobalInstallManagerForRoot, t as runGatewayUpdate, u as resolveGlobalInstallSpec } from "./update-runner-Cp7B-UEq.js";
|
|
30
30
|
import { n as renderTable, t as getTerminalTableWidth } from "./table-UVJgHZWO.js";
|
|
31
|
-
import { r as installCompletion } from "./completion-cli-
|
|
31
|
+
import { r as installCompletion } from "./completion-cli-BHClGzEa.js";
|
|
32
32
|
import { n as updateNpmInstalledPlugins, t as syncPluginsForUpdateChannel } from "./update-3rFnCBJG.js";
|
|
33
|
-
import { n as doctorCommand, t as selectStyled } from "./prompt-select-styled-
|
|
34
|
-
import { r as ensureCompletionCacheExists, t as checkShellCompletionStatus } from "./doctor-completion-
|
|
33
|
+
import { n as doctorCommand, t as selectStyled } from "./prompt-select-styled-nVUNuNGH.js";
|
|
34
|
+
import { r as ensureCompletionCacheExists, t as checkShellCompletionStatus } from "./doctor-completion-CWFM5hov.js";
|
|
35
35
|
import path from "node:path";
|
|
36
36
|
import { spawn, spawnSync } from "node:child_process";
|
|
37
37
|
import os from "node:os";
|
package/docs/index.md
CHANGED
|
@@ -96,12 +96,28 @@ The Gateway is the single source of truth for sessions, routing, and channel con
|
|
|
96
96
|
|
|
97
97
|
<Steps>
|
|
98
98
|
<Step title="Install KaijiBot">
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
99
|
+
|
|
100
|
+
**One-click (recommended):**
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
curl -fsSL https://gitee.com/kaiji1126/kaijibot/raw/main/scripts/install.sh | bash
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
**Or npm install:**
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
npm install -g kaijibot
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
**Or build from source:**
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
git clone https://gitee.com/kaiji1126/kaijibot
|
|
116
|
+
cd kaijibot
|
|
117
|
+
pnpm install
|
|
118
|
+
pnpm build
|
|
119
|
+
```
|
|
120
|
+
|
|
105
121
|
</Step>
|
|
106
122
|
<Step title="Configure Feishu and LLM provider">
|
|
107
123
|
```bash
|
|
@@ -124,7 +140,7 @@ The Gateway is the single source of truth for sessions, routing, and channel con
|
|
|
124
140
|
</Step>
|
|
125
141
|
</Steps>
|
|
126
142
|
|
|
127
|
-
Need the full install and dev setup? See [Getting Started](/start/getting-started).
|
|
143
|
+
Need the full install and dev setup? See [Getting Started](/start/getting-started) or [Installation Guide](/install).
|
|
128
144
|
|
|
129
145
|
## Dashboard
|
|
130
146
|
|
package/docs/install/index.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
summary: "Install KaijiBot --
|
|
2
|
+
summary: "Install KaijiBot -- one-click installer, npm, Docker, and source build"
|
|
3
3
|
read_when:
|
|
4
4
|
- You need an install method other than the Getting Started quickstart
|
|
5
5
|
- You want to deploy to a cloud platform
|
|
@@ -9,7 +9,8 @@ title: "Install"
|
|
|
9
9
|
|
|
10
10
|
# Install
|
|
11
11
|
|
|
12
|
-
KaijiBot
|
|
12
|
+
KaijiBot supports multiple installation methods: one-click installer (recommended for most users), npm, Docker, or build from source.
|
|
13
|
+
(KaijiBot 支持多种安装方式:一键安装(推荐)、npm、Docker 或从源码构建。)
|
|
13
14
|
|
|
14
15
|
## System requirements
|
|
15
16
|
|
|
@@ -17,7 +18,33 @@ KaijiBot is distributed as source code. Build from source or use Docker.
|
|
|
17
18
|
- **pnpm** -- required for building from source (`corepack enable`)
|
|
18
19
|
- **macOS, Linux, or Windows** -- both native Windows and WSL2 are supported; WSL2 is more stable. See [Windows](/platforms/windows).
|
|
19
20
|
|
|
20
|
-
##
|
|
21
|
+
## One-click install (recommended / 推荐)
|
|
22
|
+
|
|
23
|
+
**macOS / Linux:**
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
curl -fsSL https://gitee.com/kaiji1126/kaijibot/raw/main/scripts/install.sh | bash
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
**Windows (PowerShell):**
|
|
30
|
+
|
|
31
|
+
```powershell
|
|
32
|
+
iwr -useb https://gitee.com/kaiji1126/kaijibot/raw/main/scripts/install.ps1 | iex
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
The script auto-detects your system, installs Node.js if needed, and launches
|
|
36
|
+
the `kaijibot onboard` wizard.(自动检测系统、安装 Node.js,并启动 onboard 向导。)
|
|
37
|
+
|
|
38
|
+
## npm install
|
|
39
|
+
|
|
40
|
+
If you already have Node.js 22+:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
npm install -g kaijibot
|
|
44
|
+
kaijibot onboard
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Source build
|
|
21
48
|
|
|
22
49
|
Clone the repo, install dependencies, and build:
|
|
23
50
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
summary: "
|
|
2
|
+
summary: "Install KaijiBot: one-click installer, npm, Docker, or build from source"
|
|
3
3
|
read_when:
|
|
4
|
-
- You want to install KaijiBot
|
|
4
|
+
- You want to install KaijiBot
|
|
5
5
|
- You want to run KaijiBot via Docker
|
|
6
6
|
- You want to set up a development environment
|
|
7
7
|
title: "Installation Guide"
|
|
@@ -9,9 +9,15 @@ title: "Installation Guide"
|
|
|
9
9
|
|
|
10
10
|
# Installation
|
|
11
11
|
|
|
12
|
-
KaijiBot
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
KaijiBot supports multiple installation methods. Pick the one that suits your environment.
|
|
13
|
+
(KaijiBot 支持多种安装方式,按需选择。)
|
|
14
|
+
|
|
15
|
+
| Method | Command | Best for |
|
|
16
|
+
| ------ | ------- | -------- |
|
|
17
|
+
| **One-click install** (recommended / 推荐) | `curl -fsSL ... \| bash` | Most users, fastest path |
|
|
18
|
+
| **npm install** | `npm install -g kaijibot` | Users with Node.js already installed |
|
|
19
|
+
| **Docker** | `docker compose up -d` | Containerized / headless deployments |
|
|
20
|
+
| **Build from source** | `git clone` + `pnpm build` | Contributors and custom builds |
|
|
15
21
|
|
|
16
22
|
## Prerequisites
|
|
17
23
|
|
|
@@ -29,7 +35,45 @@ upstream. A GitHub remote is also available for international contributors.
|
|
|
29
35
|
|
|
30
36
|
---
|
|
31
37
|
|
|
32
|
-
##
|
|
38
|
+
## One-click install (一键安装,推荐)
|
|
39
|
+
|
|
40
|
+
**macOS / Linux:**
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
curl -fsSL https://gitee.com/kaiji1126/kaijibot/raw/main/scripts/install.sh | bash
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
The script auto-detects your system, installs Node.js if needed, configures the
|
|
47
|
+
environment, and launches the `kaijibot onboard` wizard. Uses the Gitee mirror
|
|
48
|
+
for fast downloads in China.(自动检测系统、安装 Node.js、配置环境,并启动
|
|
49
|
+
onboard 向导。)
|
|
50
|
+
|
|
51
|
+
**Windows (PowerShell):**
|
|
52
|
+
|
|
53
|
+
```powershell
|
|
54
|
+
iwr -useb https://gitee.com/kaiji1126/kaijibot/raw/main/scripts/install.ps1 | iex
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## npm install (npm 全局安装)
|
|
60
|
+
|
|
61
|
+
If you already have Node.js 22+ installed:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
npm install -g kaijibot
|
|
65
|
+
kaijibot onboard # interactive setup wizard
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Then start the gateway:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
kaijibot gateway --port 18789
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Source build (从源码构建)
|
|
33
77
|
|
|
34
78
|
### 1. Clone the repository
|
|
35
79
|
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# KaijiBot Gateway — systemd 服务模板
|
|
2
|
+
#
|
|
3
|
+
# 使用方法:
|
|
4
|
+
# 1. 复制此文件:sudo cp docs/install/kaijibot.service.template /etc/systemd/system/kaijibot.service
|
|
5
|
+
# 2. 编辑替换所有 <PLACEHOLDER> 变量(见下方说明)
|
|
6
|
+
# 3. 重新加载 systemd:sudo systemctl daemon-reload
|
|
7
|
+
# 4. 启用并启动:sudo systemctl enable --now kaijibot
|
|
8
|
+
#
|
|
9
|
+
# 占位符说明:
|
|
10
|
+
# <USER> — 运行服务的用户名(建议专用用户,非 root)
|
|
11
|
+
# <INSTALL_DIR> — KaijiBot 安装目录(如 /opt/kaijibot 或 /home/<USER>/projects/KaijiBot)
|
|
12
|
+
# <CONFIG_DIR> — 配置目录(通常为 /home/<USER>/.kaijibot)
|
|
13
|
+
#
|
|
14
|
+
# 环境变量从 <CONFIG_DIR>/.env 文件加载。
|
|
15
|
+
# 日志通过 journalctl 查看:journalctl -u kaijibot -f
|
|
16
|
+
|
|
17
|
+
[Unit]
|
|
18
|
+
Description=KaijiBot Gateway — Proactive Cognitive AI Assistant
|
|
19
|
+
Documentation=https://github.com/Kaiji-Z/kaijibot
|
|
20
|
+
After=network-online.target
|
|
21
|
+
Wants=network-online.target
|
|
22
|
+
|
|
23
|
+
[Service]
|
|
24
|
+
Type=simple
|
|
25
|
+
User=<USER>
|
|
26
|
+
WorkingDirectory=<INSTALL_DIR>
|
|
27
|
+
|
|
28
|
+
# 从 .env 文件加载环境变量
|
|
29
|
+
EnvironmentFile=<CONFIG_DIR>/.env
|
|
30
|
+
|
|
31
|
+
# 启动网关
|
|
32
|
+
ExecStart=/usr/bin/env node <INSTALL_DIR>/dist/index.js gateway --port 18789
|
|
33
|
+
|
|
34
|
+
# 自动重启
|
|
35
|
+
Restart=on-failure
|
|
36
|
+
RestartSec=5
|
|
37
|
+
StartLimitBurst=3
|
|
38
|
+
StartLimitIntervalSec=60
|
|
39
|
+
|
|
40
|
+
# 日志
|
|
41
|
+
StandardOutput=journal
|
|
42
|
+
StandardError=journal
|
|
43
|
+
SyslogIdentifier=kaijibot
|
|
44
|
+
|
|
45
|
+
# 安全限制
|
|
46
|
+
NoNewPrivileges=true
|
|
47
|
+
PrivateTmp=true
|
|
48
|
+
ProtectSystem=full
|
|
49
|
+
|
|
50
|
+
[Install]
|
|
51
|
+
WantedBy=multi-user.target
|
package/docs/providers/index.md
CHANGED
|
@@ -8,7 +8,7 @@ title: "Provider Directory"
|
|
|
8
8
|
|
|
9
9
|
# Model Providers
|
|
10
10
|
|
|
11
|
-
KaijiBot 支持
|
|
11
|
+
KaijiBot 支持 35+ 个国内外 LLM 提供商,开箱即用。选择一个提供商,完成认证,然后设置默认模型为 `provider/model` 即可。
|
|
12
12
|
|
|
13
13
|
> 💡 **KaijiBot 默认使用 Z.AI (智谱 GLM) 作为主要 LLM 提供商。** 国内用户推荐:Z.AI、DeepSeek、通义千问、Kimi。所有提供商均通过插件系统自动发现,无需手动安装。
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@ title: "Getting Started"
|
|
|
8
8
|
|
|
9
9
|
# Getting Started
|
|
10
10
|
|
|
11
|
-
Build KaijiBot from source, run onboarding, and start chatting in about 5 minutes. By the end you will have a running Gateway, configured auth, and a working chat session.
|
|
11
|
+
Build KaijiBot from source, run onboarding, and start chatting in about 5 minutes. Alternatively, use the [one-click installer](/install) or `npm install -g kaijibot` for a faster setup. By the end you will have a running Gateway, configured auth, and a working chat session.
|
|
12
12
|
|
|
13
13
|
## What you need
|
|
14
14
|
|
|
@@ -45,7 +45,7 @@ Check your Node version with `node --version`.
|
|
|
45
45
|
The wizard walks you through choosing a model provider, setting an API key, and configuring the Gateway. It takes about 2 minutes.
|
|
46
46
|
|
|
47
47
|
<Tip>
|
|
48
|
-
KaijiBot 支持
|
|
48
|
+
KaijiBot 支持 35+ 个 LLM 提供商。国内用户推荐优先选择:
|
|
49
49
|
- **Z.AI(智谱 GLM)** -- 默认选项,国内访问最快
|
|
50
50
|
- **DeepSeek** -- 性价比极高
|
|
51
51
|
- **通义千问(Qwen)** -- 阿里云,中文能力强
|
|
@@ -81,6 +81,18 @@ docker compose up -d
|
|
|
81
81
|
|
|
82
82
|
See [Docker](/install/docker) for configuration details.
|
|
83
83
|
|
|
84
|
+
## npm install (alternative)
|
|
85
|
+
|
|
86
|
+
If you already have Node.js 22+ installed, skip the source build entirely:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
npm install -g kaijibot
|
|
90
|
+
kaijibot onboard
|
|
91
|
+
kaijibot gateway --port 18789
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Or use the one-click installer for the fastest path: see [Installation Guide](/install).
|
|
95
|
+
|
|
84
96
|
## What to do next
|
|
85
97
|
|
|
86
98
|
<Columns>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kaijibot",
|
|
3
|
-
"version": "2026.6.
|
|
3
|
+
"version": "2026.6.23",
|
|
4
4
|
"description": "Proactive cognitive AI assistant — learns your interests, pushes insights, evolves skills autonomously",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -1255,7 +1255,7 @@
|
|
|
1255
1255
|
"openshell": "0.1.0"
|
|
1256
1256
|
},
|
|
1257
1257
|
"engines": {
|
|
1258
|
-
"node": ">=22.
|
|
1258
|
+
"node": ">=22.14.0"
|
|
1259
1259
|
},
|
|
1260
1260
|
"packageManager": "pnpm@10.32.1",
|
|
1261
1261
|
"pnpm": {
|