sintbot 1.4.16 → 1.4.17
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/CHANGELOG.en.json +31 -0
- package/CHANGELOG.json +31 -0
- package/README.md +1 -1
- package/README.zh-CN.md +1 -1
- package/bin/sintbot-v2.js +17 -2
- package/docs/AI-ASSISTED-INSTALL.md +4 -4
- package/docs/install.md +43 -7
- package/docs/zh-CN/AI-ASSISTED-INSTALL.md +4 -4
- package/docs/zh-CN/install.md +43 -7
- package/install.sh +1 -1
- package/package.json +3 -1
- package/src/agent/claudeusage.js +188 -3
- package/src/agent/envconflicts.js +74 -0
- package/src/agent/privatecore.js +65 -4
- package/src/agent/privatecore.wasm +0 -0
- package/src/c2install.js +1 -1
- package/src/connect.js +488 -0
- package/src/platform/feishu.js +22 -7
- package/src/ui/console.html +154 -124
- package/src/ui/serverbase.js +19 -10
- package/src/usage.js +131 -38
package/CHANGELOG.en.json
CHANGED
|
@@ -1,4 +1,35 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"version": "1.4.17",
|
|
4
|
+
"date": "2026-11-12",
|
|
5
|
+
"name": "Feishu scan-to-connect and third-party quotas",
|
|
6
|
+
"items": [
|
|
7
|
+
{
|
|
8
|
+
"t": "Connect Feishu with one scan",
|
|
9
|
+
"d": "New command sintbot connect: scan a QR code in the Feishu app to create the bot app; SintBot self-checks, opens the contact and availability scope and publishes, creates ~/Projects/<name>, creates a group with you in it, writes the configuration and initializes journals. On failure it stops at that step and tells you how to resume (--app-id, --chat); non-admins in a company organization can use --basic. The manual path remains."
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"t": "Simpler Feishu settings",
|
|
13
|
+
"d": "Connection status and project groups come first. New users get a three-step scan setup guide; manual setup and app details are folded away. Console administrator sign-in is separate."
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"t": "Third-party quota and balance",
|
|
17
|
+
"d": "GLM shows the 5-hour and weekly windows and falls back to the balance without a plan; MiniMax shows the 5-hour and weekly windows; DeepSeek shows the balance. Invalid credentials are shown as such; transient failures keep the last value for 10 minutes."
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"t": "Claude subscription quota fallback",
|
|
21
|
+
"d": "When the Claude Code login token has expired, the CLI refreshes it itself and SintBot reads its cached quota instead of showing \"unverified\"; read-only, never refreshing on its own, never blocking group commands or the console."
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"t": "Environment conflict check",
|
|
25
|
+
"d": "Preflight and the console model cards list environment variables and ~/.claude/settings.json or ~/.codex/config.toml settings that would reroute Claude Code or Codex; key names only, warnings only."
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"t": "Built-in core ABI 36",
|
|
29
|
+
"d": "Connect decisions and wording, QR encoding, quota parsing and environment checks live in the built-in core; the core build pins its toolchain and no longer depends on the crate mirror used by the builder."
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
},
|
|
2
33
|
{
|
|
3
34
|
"version": "1.4.16",
|
|
4
35
|
"date": "2026-11-11",
|
package/CHANGELOG.json
CHANGED
|
@@ -1,4 +1,35 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"version": "1.4.17",
|
|
4
|
+
"date": "2026-11-12",
|
|
5
|
+
"name": "飞书扫码接入与第三方额度",
|
|
6
|
+
"items": [
|
|
7
|
+
{
|
|
8
|
+
"t": "扫码一键接入飞书",
|
|
9
|
+
"d": "新命令 sintbot connect:手机飞书扫码即创建机器人应用,自动自检、放开通讯录与可用范围并发版,新建项目目录 ~/Projects/<项目名>,建群并拉你进群,写入配置并初始化日志。失败时按步骤停下并给出续做方式(--app-id、--chat);公司组织里的非管理员可用 --basic。手动接入流程保留。"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"t": "飞书设置按使用流程整理",
|
|
13
|
+
"d": "优先查看连接状态和管理项目群;新用户按扫码、自动建群、群里发任务三步开始。手动接入与应用信息收进高级说明,管理员和控制台登录单独设置。"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"t": "第三方额度与余额",
|
|
17
|
+
"d": "GLM 显示 5 小时 / 周配额窗口,没有套餐时退回查余额;MiniMax 显示 5 小时与周窗口;DeepSeek 余额。凭据失效会明确显示,瞬时故障保留上次结果 10 分钟。"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"t": "Claude 登录额度兜底",
|
|
21
|
+
"d": "Claude Code 登录令牌过期时,由 CLI 自行刷新并读取其缓存的额度,不再显示「未验证」;只读不代刷,不阻塞群命令和控制台。"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"t": "环境冲突检查",
|
|
25
|
+
"d": "预检与控制台模型卡列出会改道 Claude Code / Codex 的环境变量和 ~/.claude/settings.json、~/.codex/config.toml 设置,只列键名,只提示不修改。"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"t": "内置核心 ABI 36",
|
|
29
|
+
"d": "扫码接入的决策与文案、二维码编码、额度解析和环境冲突判定都在内置核心中实现;核心构建锁定工具链,产物不再依赖构建机使用的 crate 镜像。"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
},
|
|
2
33
|
{
|
|
3
34
|
"version": "1.4.16",
|
|
4
35
|
"date": "2026-11-11",
|
package/README.md
CHANGED
|
@@ -45,7 +45,7 @@ curl -fsSL https://sintbot.com/install.sh | bash
|
|
|
45
45
|
|
|
46
46
|
The script checks the environment, installs SintBot and verifies the result, without `sudo`. You can read [install.sh](./install.sh) before running it. Installation does not sign in to a model account, connect a group or start a service.
|
|
47
47
|
|
|
48
|
-
**2. Connect your group and project.**
|
|
48
|
+
**2. Connect your group and project.** Run `sintbot connect` and scan the QR code with Feishu under an enterprise or team identity: it creates the app, a project folder and a group, then writes the configuration. The [installation guide](https://sintbot.com/guide/install/) covers the options, the manual route and the startup steps.
|
|
49
49
|
|
|
50
50
|
Installing with an AI assistant? Use the [AI-assisted install and first-use guide](./docs/AI-ASSISTED-INSTALL.md).
|
|
51
51
|
|
package/README.zh-CN.md
CHANGED
|
@@ -45,7 +45,7 @@ curl -fsSL https://sintbot.com/install.sh | bash
|
|
|
45
45
|
|
|
46
46
|
脚本会检查环境、安装 SintBot 并验证结果,不用 `sudo`。也可以先读 [install.sh](./install.sh)。安装本身不登录模型账号、不连接群,也不启动服务。
|
|
47
47
|
|
|
48
|
-
**2. 接入群和项目。**
|
|
48
|
+
**2. 接入群和项目。** 运行 `sintbot connect`,用企业/团队身份的飞书扫码:它会创建应用、项目目录和群,并写好配置。参数、手动路径和启动步骤见[安装指南](https://sintbot.com/zh/guide/install/)。
|
|
49
49
|
|
|
50
50
|
想让本机 AI 助手帮忙安装并完成首次使用?先看 [AI 安装与首次使用说明](./docs/zh-CN/AI-ASSISTED-INSTALL.md)。
|
|
51
51
|
|
package/bin/sintbot-v2.js
CHANGED
|
@@ -43,6 +43,9 @@ async function startService(rest) {
|
|
|
43
43
|
throw new Error('Console options require --ui or ui.enabled:true')
|
|
44
44
|
}
|
|
45
45
|
assertInstallationJournals(installation)
|
|
46
|
+
// Settings outside this installation that can reroute a CLI (daemon env,
|
|
47
|
+
// ~/.claude/settings.json, ~/.codex/config.toml): warn-only, keys not values.
|
|
48
|
+
if (preflightOnly) require('../src/agent/envconflicts').reportEnvConflicts(installation)
|
|
46
49
|
// Every installation, including one group, runs the multi-group service:
|
|
47
50
|
// chat commands, the console writer and per-group fault closing live there.
|
|
48
51
|
return startMultiGroupService({ installation, preflightOnly, uiEnabled, uiHost, uiPort })
|
|
@@ -111,6 +114,7 @@ async function startMultiGroupService({ installation, preflightOnly, uiEnabled =
|
|
|
111
114
|
const { C2DurableRuntime } = require('../src/core/c2durableruntime')
|
|
112
115
|
// /hud reads the group's model quota; /issue appends to the console's log.
|
|
113
116
|
const usageProbe = require('../src/usage').createUsageProbe({
|
|
117
|
+
bin: cfg.agent?.bin || 'claude',
|
|
114
118
|
codexUsage: async () => { const status = require('../src/agent/codexstatus')
|
|
115
119
|
return status.formatUsage(await status.rateLimits('codex')) } })
|
|
116
120
|
const issues = require('../src/core/issues').createIssues(path.join(stateDir, 'issues.jsonl'),
|
|
@@ -466,12 +470,17 @@ const HELP = `SintBot macOS Feishu multi-group candidate
|
|
|
466
470
|
Usage:
|
|
467
471
|
sintbot init [--config <absolute path>] [--data-dir <absolute path>]
|
|
468
472
|
sintbot start [--config <absolute path>] [--data-dir <absolute path>] [--preflight] [--ui] [--ui-host <address>] [--ui-port <port>] [--no-open]
|
|
473
|
+
sintbot connect [--config <absolute path>] [--data-dir <absolute path>] [--workdir <absolute path>] [--name <project>] [--provider codex|claude] [--app-id <cli_…>] [--chat <oc_…>] [--basic] [--no-open]
|
|
469
474
|
sintbot incident seal --group <oc_…> [--config <absolute path>] [--data-dir <absolute path>] [--reason <text>]
|
|
470
475
|
sintbot feishu <action> [arguments…] [--chat <oc_…>] [--config <path>]
|
|
471
476
|
sintbot version
|
|
472
477
|
sintbot help
|
|
473
478
|
|
|
474
479
|
Supports explicit Feishu groups using Codex or Claude Code. Start runs in the foreground.
|
|
480
|
+
connect scans a Feishu QR code to create the app, then creates a group (or binds --chat), the project
|
|
481
|
+
folder under ~/Projects, the configuration and the journals, in that order; a failed check stops before
|
|
482
|
+
the folder and configuration exist. It refuses existing configuration, state or a running service;
|
|
483
|
+
--app-id resumes only when no configuration or an empty-group one for that app exists.
|
|
475
484
|
Initialization is for a new installation only; existing journals are never reset.
|
|
476
485
|
Console shows live groups, binds groups and switches models or projects of idle groups;
|
|
477
486
|
in a group, /model lists or switches models. Unsupported actions stay disabled.
|
|
@@ -492,7 +501,7 @@ async function main(argv = process.argv.slice(2)) {
|
|
|
492
501
|
return
|
|
493
502
|
}
|
|
494
503
|
if (!sub || sub === 'help' || sub === '--help' || sub === '-h' ||
|
|
495
|
-
['init', 'start'].includes(sub) && rest.length === 1 && ['--help', '-h'].includes(rest[0])) {
|
|
504
|
+
['init', 'start', 'connect'].includes(sub) && rest.length === 1 && ['--help', '-h'].includes(rest[0])) {
|
|
496
505
|
process.stdout.write(HELP)
|
|
497
506
|
return
|
|
498
507
|
}
|
|
@@ -504,10 +513,16 @@ async function main(argv = process.argv.slice(2)) {
|
|
|
504
513
|
process.exitCode = outcome === 'done' ? 0 : 1
|
|
505
514
|
return
|
|
506
515
|
}
|
|
507
|
-
if (!['init', 'start', 'incident', 'feishu'].includes(sub)) {
|
|
516
|
+
if (!['init', 'start', 'connect', 'incident', 'feishu'].includes(sub)) {
|
|
508
517
|
throw new Error(`${sub} is unavailable in this release; use sintbot help`)
|
|
509
518
|
}
|
|
510
519
|
if (process.platform !== 'darwin') throw new Error('this release supports macOS only')
|
|
520
|
+
if (sub === 'connect') {
|
|
521
|
+
// Operator-only onboarding; deliberately not an action of the feishu skill,
|
|
522
|
+
// which the agent may run from a group.
|
|
523
|
+
process.exitCode = await require('../src/connect').runConnect(rest)
|
|
524
|
+
return
|
|
525
|
+
}
|
|
511
526
|
if (sub === 'feishu') {
|
|
512
527
|
// The agent's group skills. Each call uses the app credentials directly;
|
|
513
528
|
// the service need not run. Text after the action may itself start with
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Install SintBot 1.4.
|
|
1
|
+
# Install SintBot 1.4.17 with an AI assistant
|
|
2
2
|
|
|
3
3
|
English · [简体中文](./zh-CN/AI-ASSISTED-INSTALL.md)
|
|
4
4
|
|
|
@@ -7,13 +7,13 @@ Use the terminal on the Mac that will run SintBot. A cloud shell cannot install
|
|
|
7
7
|
1. Check macOS, Node 22+, the actual Codex or Claude Code executable and login, and any existing SintBot process. Do not print credentials. Preserve existing installations, configuration and state.
|
|
8
8
|
2. Run the one-line installation command in the guide; `--dry-run` is optional. Continue within the user's authorization; ask only for missing decisions. The installer does not change Node, Codex, Claude Code, shell profiles or services.
|
|
9
9
|
3. The installer verifies the version and core at `~/.local/share/sintbot/bin/sintbot`. A successful package install is not a successful group test.
|
|
10
|
-
4.
|
|
11
|
-
5.
|
|
10
|
+
4. Prefer `sintbot connect`: it prints the scan link and opens a local QR page; only the user can scan and confirm on the phone, after which it creates the project folder and group, writes the configuration and initializes, so no secret passes through the assistant. It refuses when a Feishu configuration exists or the service is running; do not delete files to get past that. If the scan is not possible, prepare the configuration by the manual route in the install guide: let the user enter secrets locally or use already authorized credential references without revealing them. Use an existing authorized Feishu app only when another process is not connected to it.
|
|
11
|
+
5. On the manual route, run `init` for fresh state only (never again after `connect` has initialized), then `start --preflight`. Refusal due to an existing journal or unresolved receipts is a stop condition: never delete files, fabricate a new authority or alter receipts to bypass it.
|
|
12
12
|
6. Run the foreground service, send an authorized read-only group request and compare its response with the file. Stop cleanly and verify a restart. If no person is available, use an authorized test account to send the request; document the sender and do not call it independent human acceptance. A bot's own API message may be ignored and is not a substitute for an incoming user message.
|
|
13
13
|
7. Stop temporary processes before ending the task. Report what was installed, what actually ran and any remaining setup. Do not register an automatic background service for this release.
|
|
14
14
|
|
|
15
15
|
## Copyable request
|
|
16
16
|
|
|
17
17
|
```text
|
|
18
|
-
Install SintBot 1.4.
|
|
18
|
+
Install SintBot 1.4.17 on this Mac using the one-line installation guide. Preserve existing services, configuration, state and Codex or Claude Code account data. Do not expose credentials. Verify the actual installed executable and binary core, configure the Feishu groups with their runners, and initialize only clean new state. Run the foreground preflight and an authorized read-only group test, check the result, then verify clean stop/restart. Stop temporary processes when finished, and distinguish package installation from successful group acceptance.
|
|
19
19
|
```
|
package/docs/install.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Install SintBot 1.4.
|
|
1
|
+
# Install SintBot 1.4.17
|
|
2
2
|
|
|
3
3
|
English · [简体中文](./zh-CN/install.md)
|
|
4
4
|
|
|
@@ -10,11 +10,45 @@ You need a Mac, Node.js 22 or newer, and projects stored on that Mac. Install an
|
|
|
10
10
|
curl -fsSL https://sintbot.com/install.sh | bash
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
The installer checks the environment, installs `sintbot@1.4.
|
|
13
|
+
The installer checks the environment, installs `sintbot@1.4.17` into `~/.local/share/sintbot`, and verifies the entry, built-in core and Feishu module. Continue when you see `Installed and verified SintBot 1.4.17`. No sudo is needed.
|
|
14
14
|
|
|
15
15
|
To preview, append `-s -- --dry-run`. To choose another location, set `SINTBOT_INSTALL_DIR` and adjust the executable paths below.
|
|
16
16
|
|
|
17
|
-
## 2. Connect
|
|
17
|
+
## 2. Connect by scanning (recommended)
|
|
18
|
+
|
|
19
|
+
Prerequisite: the Feishu app on your phone is signed in with an enterprise or team identity; a personal identity without an organization cannot scan, so create a team first (free). The app created by the scan belongs to the scanner's organization; approval depends on its policies.
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
"$HOME/.local/share/sintbot/bin/sintbot" connect
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
The terminal prints the scan link and opens a local page with the QR code; scan it with Feishu and confirm on the phone. It then, in order: obtains the app credentials (and prints the app ID) → runs the self-check → opens the contact range and visibility and publishes a version → creates a group and adds you → creates the project folder `~/Projects/sintbot` (with a `README.md`) → writes `~/.sbot/config.json` → initializes the message journals. Every step reports its result. Once the scan is confirmed, the app exists in your organization; any later failed check or group creation stops before the folder and the configuration are created and prints the rerun command with `--app-id`.
|
|
26
|
+
|
|
27
|
+
- The credentials are stored in clear text in `~/.sbot/config.json` (file 0600, directory 0700). To switch back to environment variables, change `appId` / `appSecret` to `"env:FEISHU_APP_ID"` / `"env:FEISHU_APP_SECRET"` and export both before every start.
|
|
28
|
+
- `--basic`: for a non-administrator in a company organization. It does not request `application:application:patch` and skips the range and publish steps; ask an administrator to finish those two in the Open Platform.
|
|
29
|
+
- `--app-id cli_…`: reuse an existing app (add permissions to it instead of creating one), to rerun after a stop or once a review is approved. Allowed only when there is no configuration file, or the file belongs to that app and binds no group yet; a configuration with groups is never replaced.
|
|
30
|
+
- `--chat oc_…`: skip group creation and bind a group you created by hand with the bot added (the notice after a failed group creation shows this command).
|
|
31
|
+
- `--workdir /absolute/path`: bind an existing directory instead of creating one; `--name` changes the default folder name; `--provider codex|claude` picks the runner (chosen automatically when only one is installed); `--no-open` prints the link without opening the page.
|
|
32
|
+
- `connect` refuses to run when a Feishu configuration already exists or the service is running. The scan requests the card callbacks used by `/model`. If the card does not respond, check the callback subscription as in section 4.
|
|
33
|
+
|
|
34
|
+
## 3. First start
|
|
35
|
+
|
|
36
|
+
`connect` has already initialized, so start directly:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
"$HOME/.local/share/sintbot/bin/sintbot" start --config "$HOME/.sbot/config.json" --ui
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
This checks the configuration and runners, connects Feishu and opens the local console. Keep the terminal open. In the group, send "Read the first line of the project README and reply with only that line", then compare it with `~/Projects/sintbot/README.md`. A passing preflight does not prove Feishu authentication or delivery.
|
|
43
|
+
|
|
44
|
+
## 4. Manual setup (alternative)
|
|
45
|
+
|
|
46
|
+
Use the manual route when the scan fails, an administrator does not approve, or you prefer to manage the app yourself; it is the same procedure as before.
|
|
47
|
+
|
|
48
|
+
<details>
|
|
49
|
+
<summary>Show the manual steps</summary>
|
|
50
|
+
|
|
51
|
+
#### 4.1 Create the app
|
|
18
52
|
|
|
19
53
|
In the [Feishu Open Platform](https://open.feishu.cn/), create a custom app, enable the bot and the permissions to receive and reply to messages, choose long connection for event subscription and subscribe to message receipt. For callbacks, also choose long connection and subscribe to card action callbacks (the tap-to-pick `/model` card needs them). Publish the app, add the bot to the groups you will use, and copy each group's `oc_…` chat ID.
|
|
20
54
|
|
|
@@ -29,7 +63,7 @@ export FEISHU_APP_ID FEISHU_APP_SECRET
|
|
|
29
63
|
|
|
30
64
|
Never post the secret in a group or commit it. Keep using this terminal; set both variables again in a new one.
|
|
31
65
|
|
|
32
|
-
|
|
66
|
+
#### 4.2 Write the configuration
|
|
33
67
|
|
|
34
68
|
Create a private directory with `mkdir -p ~/.sbot && chmod 700 ~/.sbot`, then create `~/.sbot/config.json`. Replace the chat IDs and absolute project paths; each project directory must already exist. The example binds two groups, one with Codex and one with Claude Code. With one group, delete the other entry.
|
|
35
69
|
|
|
@@ -69,9 +103,9 @@ Then run `chmod 600 ~/.sbot/config.json`.
|
|
|
69
103
|
- To pin a Claude model, add `"model"` to `providers.claude`; otherwise Claude Code's default model on this Mac is used.
|
|
70
104
|
- At most 2 tasks run at once by default; add `"agent": { "maxConcurrent": 4 }` at the top level to change it (1–32).
|
|
71
105
|
|
|
72
|
-
|
|
106
|
+
#### 4.3 Initialize and start
|
|
73
107
|
|
|
74
|
-
Copy and run in the same terminal:
|
|
108
|
+
Copy and run in the same terminal (the manual route runs `init` itself):
|
|
75
109
|
|
|
76
110
|
```bash
|
|
77
111
|
SINTBOT="$HOME/.local/share/sintbot/bin/sintbot"
|
|
@@ -84,6 +118,8 @@ This initializes the message journals, checks the configuration and runners, con
|
|
|
84
118
|
|
|
85
119
|
In a group, send "Read the first line of the project README and reply with only that line", then compare it with the file. A passing preflight does not prove Feishu authentication or delivery.
|
|
86
120
|
|
|
121
|
+
</details>
|
|
122
|
+
|
|
87
123
|
## 5. Use it in a group
|
|
88
124
|
|
|
89
125
|
Any text message is a task. Replies arrive in a card that appears once the model starts answering, or after 25 seconds if it is still working without output. While the task runs, the card shows how long it has run, what it is doing and the steps already delivered; at the end those steps fold into a Process section.
|
|
@@ -123,7 +159,7 @@ You can also add a group without the console: add it to the configuration, stop
|
|
|
123
159
|
|
|
124
160
|
## Stop and restart
|
|
125
161
|
|
|
126
|
-
Press Ctrl-C and wait for exit.
|
|
162
|
+
Press Ctrl-C and wait for exit. If the configuration uses `env:` references, set those variables first, then run:
|
|
127
163
|
|
|
128
164
|
```bash
|
|
129
165
|
"$HOME/.local/share/sintbot/bin/sintbot" start --config "$HOME/.sbot/config.json" --ui
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# 用 AI 助手安装 SintBot 1.4.
|
|
1
|
+
# 用 AI 助手安装 SintBot 1.4.17
|
|
2
2
|
|
|
3
3
|
[English](../AI-ASSISTED-INSTALL.md) · 简体中文
|
|
4
4
|
|
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
1. 核对 macOS、Node 22 及以上、Codex 或 Claude Code 的实际程序与登录、是否已有 SintBot 进程。不输出凭据,保留已有安装、配置和状态。
|
|
8
8
|
2. 运行指南中的一行安装命令;`--dry-run` 为可选预览。用户已经授权的步骤继续执行,只问缺失的决定。安装器不修改 Node、Codex、Claude Code、终端配置或服务。
|
|
9
9
|
3. 安装器会验证 `~/.local/share/sintbot/bin/sintbot` 的版本和核心加载。安装程序包成功不等于群测试成功。
|
|
10
|
-
4.
|
|
11
|
-
5.
|
|
10
|
+
4. 优先用 `sintbot connect` 接入:它打印扫码链接并打开本机二维码页面,扫码和手机确认只能由用户本人完成;之后它自己建项目目录、建群、写配置并初始化,密钥不需要经过助手。已有飞书配置或服务在跑时它会拒绝,不要删文件绕过。扫码走不通再按安装指南的手动路径准备配置:让用户在本地输入密钥,或使用已经授权的凭据引用,不显示秘密。复用授权飞书应用时,确认没有另一个进程连接该应用。
|
|
11
|
+
5. 手动路径下,只有全新状态才能执行 `init`(`connect` 已经初始化过的不要再执行),然后执行 `start --preflight`。若已有日志或未结收据而拒绝启动,不得删文件、新造日志权威或篡改收据来绕过。
|
|
12
12
|
6. 前台运行,用已经授权的账号在群内发只读请求,把回复和文件对照,再正常停止并验证重启。没有真人协助时可用授权测试账号发送,并记录实际发送方式,不称为独立真人验收;机器人自己发的接口消息可能被忽略,不能当作用户入站消息。
|
|
13
13
|
7. 本轮临时进程用完停止。说明安装了什么、实际验证了什么、还缺什么。本版不注册自动后台服务。
|
|
14
14
|
|
|
15
15
|
## 可复制的请求
|
|
16
16
|
|
|
17
17
|
```text
|
|
18
|
-
按一行安装指南,在这台 Mac 安装 SintBot 1.4.
|
|
18
|
+
按一行安装指南,在这台 Mac 安装 SintBot 1.4.17。保留已有服务、配置、状态和 Codex 或 Claude Code 账号数据,不输出凭据。验证实际入口与二进制核心,配置飞书群及各群的执行器,只对全新状态初始化。运行前台预检和已授权的只读群测试,对照结果,再验证正常停止与重启。完成后停止临时进程,并区分程序包安装与群验收结果。
|
|
19
19
|
```
|
package/docs/zh-CN/install.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# 安装 SintBot 1.4.
|
|
1
|
+
# 安装 SintBot 1.4.17
|
|
2
2
|
|
|
3
3
|
[English](../install.md) · 简体中文
|
|
4
4
|
|
|
@@ -10,11 +10,45 @@
|
|
|
10
10
|
curl -fsSL https://sintbot.com/install.sh | bash
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
安装器会自动检查环境,把 `sintbot@1.4.
|
|
13
|
+
安装器会自动检查环境,把 `sintbot@1.4.17` 装到 `~/.local/share/sintbot`,并验证程序入口、内置核心和飞书模块。看到 `Installed and verified SintBot 1.4.17` 就可以继续。不需要 sudo。
|
|
14
14
|
|
|
15
15
|
可选预览:在命令末尾加 `-s -- --dry-run`。要自定义安装位置,设置 `SINTBOT_INSTALL_DIR` 环境变量,并同步修改后面的可执行文件路径。
|
|
16
16
|
|
|
17
|
-
## 2.
|
|
17
|
+
## 2. 扫码接入(推荐)
|
|
18
|
+
|
|
19
|
+
前提:手机飞书当前处于企业/团队身份;没有组织的个人身份扫不了,需先新建一个团队(免费)。扫码创建的应用归扫码人所在的组织,公司普通成员建了自己删不掉。
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
"$HOME/.local/share/sintbot/bin/sintbot" connect
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
终端先打印扫码链接,并打开一个本机页面显示二维码;用飞书扫码、在手机上确认。随后它依次:取得应用凭证(并打印应用 ID)→ 自检 → 放开通讯录范围与可用范围并发布版本 → 创建群并把你拉进去 → 新建项目目录 `~/Projects/sintbot`(含一个 `README.md`)→ 写入 `~/.sbot/config.json` → 初始化消息日志。每一步的结果都会打印。扫码一旦确认,应用就已在你的组织里创建;之后任一检查或建群失败都会在建目录、写配置之前停下,并给出带 `--app-id` 的重跑命令。
|
|
26
|
+
|
|
27
|
+
- 凭证明文写在 `~/.sbot/config.json`(文件 0600、目录 0700)。要改回环境变量,把 `appId` / `appSecret` 改成 `"env:FEISHU_APP_ID"` / `"env:FEISHU_APP_SECRET"`,并在每次启动前导出这两个变量。
|
|
28
|
+
- `--basic`:公司组织里的非管理员使用。不申请 `application:application:patch`,跳过放开范围与发布;之后请管理员在开放平台补这两步。
|
|
29
|
+
- `--app-id cli_…`:复用已有应用(给它追加权限,不新建),用于中途停下后重跑或审核通过后继续。只在没有配置文件、或配置文件属于这个应用且还没绑定任何群时允许;已绑定群的配置不会被替换。
|
|
30
|
+
- `--chat oc_…`:不自动建群,直接绑定你手动建好并拉入机器人的群(建群失败时的提示里会给出这条命令)。
|
|
31
|
+
- `--workdir /绝对路径`:绑定一个已存在的目录,不新建;`--name` 换默认目录名;`--provider codex|claude` 指定执行器(本机只装了一个时自动选);`--no-open` 只打印链接、不打开页面。
|
|
32
|
+
- 已有飞书配置或服务正在运行时,`connect` 会拒绝执行。扫码会申请模型卡所需的卡片回调。`/model` 点选卡没有反应时,按第 4 节检查回调订阅。
|
|
33
|
+
|
|
34
|
+
## 3. 首次启动
|
|
35
|
+
|
|
36
|
+
`connect` 已经完成初始化,直接启动:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
"$HOME/.local/share/sintbot/bin/sintbot" start --config "$HOME/.sbot/config.json" --ui
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
它会预检配置和执行器、连接飞书并打开本机控制台。保持终端开启。在群里发“读取项目 README 的第一行,只回复这一行”,并和 `~/Projects/sintbot/README.md` 对照。预检通过不代表飞书认证或消息送达已经验证。
|
|
43
|
+
|
|
44
|
+
## 4. 手动接入(备选)
|
|
45
|
+
|
|
46
|
+
扫码失败、管理员不放行,或者想自己管理应用时,走下面的手动路径;内容与之前的安装步骤相同。
|
|
47
|
+
|
|
48
|
+
<details>
|
|
49
|
+
<summary>展开手动步骤</summary>
|
|
50
|
+
|
|
51
|
+
#### 4.1 创建应用
|
|
18
52
|
|
|
19
53
|
在 [飞书开放平台](https://open.feishu.cn/) 创建企业自建应用,启用机器人、接收和回复消息的权限,事件订阅选择长连接并订阅消息接收;回调订阅同样选择长连接接收回调并订阅卡片回传交互(群里点选 `/model` 卡片要用)。发布应用后,把机器人加入要使用的群,取得每个群的 `oc_…` 群 ID。
|
|
20
54
|
|
|
@@ -29,7 +63,7 @@ export FEISHU_APP_ID FEISHU_APP_SECRET
|
|
|
29
63
|
|
|
30
64
|
不要把密钥发进群或提交到仓库。后续步骤都在这个终端里做;新开终端时需要重新设置这两个变量。
|
|
31
65
|
|
|
32
|
-
|
|
66
|
+
#### 4.2 手写配置
|
|
33
67
|
|
|
34
68
|
用 `mkdir -p ~/.sbot && chmod 700 ~/.sbot` 创建私有配置目录,再创建 `~/.sbot/config.json`。把群 ID 和项目绝对路径换成你自己的,项目目录必须已经存在。下面的示例绑定两个群:一个用 Codex,一个用 Claude Code。只有一个群时删掉另一项即可。
|
|
35
69
|
|
|
@@ -69,9 +103,9 @@ export FEISHU_APP_ID FEISHU_APP_SECRET
|
|
|
69
103
|
- 要固定 Claude 型号,可在 `providers.claude` 里加 `"model"`;不写就用这台机器上 Claude Code 的默认模型。
|
|
70
104
|
- 同时运行的任务默认最多 2 个,可在顶层加 `"agent": { "maxConcurrent": 4 }` 调整(1–32)。
|
|
71
105
|
|
|
72
|
-
|
|
106
|
+
#### 4.3 初始化并启动
|
|
73
107
|
|
|
74
|
-
|
|
108
|
+
在刚才的终端里一次复制执行(手动路径需要自己执行 `init`):
|
|
75
109
|
|
|
76
110
|
```bash
|
|
77
111
|
SINTBOT="$HOME/.local/share/sintbot/bin/sintbot"
|
|
@@ -84,6 +118,8 @@ SINTBOT="$HOME/.local/share/sintbot/bin/sintbot"
|
|
|
84
118
|
|
|
85
119
|
在群里发“读取项目 README 的第一行,只回复这一行”,并和本地文件对照。预检通过不代表飞书认证或消息送达已经验证。
|
|
86
120
|
|
|
121
|
+
</details>
|
|
122
|
+
|
|
87
123
|
## 5. 在群里使用
|
|
88
124
|
|
|
89
125
|
直接发文字就是给它派任务。回复以卡片呈现:模型开始输出时出现;25 秒还没有输出也会先出现。运行中卡片显示已跑多久、正在做什么和已完成的步骤,结束后这些步骤收进「过程」折叠区。
|
|
@@ -123,7 +159,7 @@ Codex 和 Claude Code 的忙时跟进默认开启;`steer:false` 改为排队
|
|
|
123
159
|
|
|
124
160
|
## 停止与重启
|
|
125
161
|
|
|
126
|
-
按 Ctrl-C
|
|
162
|
+
按 Ctrl-C 并等待退出。配置里用的是 `env:` 引用时,先确认环境变量已设置,再执行:
|
|
127
163
|
|
|
128
164
|
```bash
|
|
129
165
|
"$HOME/.local/share/sintbot/bin/sintbot" start --config "$HOME/.sbot/config.json" --ui
|
package/install.sh
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# The function is parsed in full before installation starts, including when piped.
|
|
3
3
|
sintbot_install() (
|
|
4
4
|
set -eu
|
|
5
|
-
version=1.4.
|
|
5
|
+
version=1.4.17
|
|
6
6
|
prefix="${SINTBOT_INSTALL_DIR:-$HOME/.local/share/sintbot}"
|
|
7
7
|
fail() { printf 'SintBot: %s\n' "$*" >&2; exit 1; }
|
|
8
8
|
case "${1:-}" in
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sintbot",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.17",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Drive your Mac projects from Feishu groups with Codex or Claude Code, using a built-in agent core.",
|
|
6
6
|
"bin": {
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
"src/agent/codexapp.js",
|
|
52
52
|
"src/agent/codexcode.js",
|
|
53
53
|
"src/agent/codexstatus.js",
|
|
54
|
+
"src/agent/envconflicts.js",
|
|
54
55
|
"src/agent/errtag.js",
|
|
55
56
|
"src/agent/modelwindows.js",
|
|
56
57
|
"src/agent/privatecore.js",
|
|
@@ -69,6 +70,7 @@
|
|
|
69
70
|
"src/c2upgradeswitch.js",
|
|
70
71
|
"src/cdp.js",
|
|
71
72
|
"src/config.js",
|
|
73
|
+
"src/connect.js",
|
|
72
74
|
"src/consolesay.js",
|
|
73
75
|
"src/consoletrials.js",
|
|
74
76
|
"src/core/brain.js",
|