sintbot 1.0.8 → 1.0.9
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 +10 -0
- package/CHANGELOG.json +11 -0
- package/bin/sbot.js +20 -8
- package/package.json +1 -1
package/CHANGELOG.en.json
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"version": "1.0.9",
|
|
4
|
+
"name": "A steadier setup wizard",
|
|
5
|
+
"items": [
|
|
6
|
+
{
|
|
7
|
+
"t": "No more looping without a terminal",
|
|
8
|
+
"d": "When the setup wizard runs without keyboard input (in a script, a container or CI), it now finishes on the defaults instead of looping at the model step until the disk fills, and it no longer installs Claude Code on its own. If it still cannot finish, it stops and writes no config."
|
|
9
|
+
}
|
|
10
|
+
]
|
|
11
|
+
},
|
|
2
12
|
{
|
|
3
13
|
"version": "1.0.8",
|
|
4
14
|
"name": "A clearer console, sharper style extraction",
|
package/CHANGELOG.json
CHANGED
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"version": "1.0.9",
|
|
4
|
+
"date": "2026-10-26",
|
|
5
|
+
"name": "安装向导更稳",
|
|
6
|
+
"items": [
|
|
7
|
+
{
|
|
8
|
+
"t": "没有终端时向导不再空转",
|
|
9
|
+
"d": "在脚本、容器或持续集成里运行安装向导、拿不到键盘输入时,向导会用默认值走完,不再在选模型那一步反复转圈、把磁盘写满,也不会自己去装 Claude Code;实在走不下去就停下提示,不写入配置。"
|
|
10
|
+
}
|
|
11
|
+
]
|
|
12
|
+
},
|
|
2
13
|
{
|
|
3
14
|
"version": "1.0.8",
|
|
4
15
|
"date": "2026-10-24",
|
package/bin/sbot.js
CHANGED
|
@@ -1280,6 +1280,9 @@ async function cmdService(rest) {
|
|
|
1280
1280
|
// in the gitignored config), an optional proxy split, and optional Feishu /
|
|
1281
1281
|
// group binding (with id auto-fetch) — then runs doctor. Shares helpers with the
|
|
1282
1282
|
// console (deriveNoProxy / feishu*), so CLI and UI stay in sync.
|
|
1283
|
+
// 向导走一遍最多问二十来个问题;输入结束后还要问到这么多次,只能是某个循环拿默认值走不出去
|
|
1284
|
+
const SETUP_MAX_ASKS_AFTER_EOF = 60
|
|
1285
|
+
|
|
1283
1286
|
async function cmdSetup(rest) {
|
|
1284
1287
|
const { values } = parseArgs({ args: rest, allowPositionals: true, options: { config: { type: 'string' } } })
|
|
1285
1288
|
const cfgPath = defaultConfigPath(values.config)
|
|
@@ -1319,14 +1322,22 @@ async function cmdSetup(rest) {
|
|
|
1319
1322
|
const nextLine = () => queued.length ? Promise.resolve(queued.shift())
|
|
1320
1323
|
: closed ? Promise.resolve(null)
|
|
1321
1324
|
: new Promise((res) => { waiter = res })
|
|
1322
|
-
|
|
1325
|
+
// 输入读完之后(管道、</dev/null、Docker RUN、CI)每一问都拿默认值。默认值走不出去的循环会原地空转:
|
|
1326
|
+
// 1.0.8 的模型菜单默认「1」→ key 为空 → 回菜单,3 分钟往输出里写了 18 GB。所以 ① 会转圈或有副作用的问题
|
|
1327
|
+
// 另给一个「输入已结束」时的答案(endedDef);② 兜底:输入结束后还问了这么多次就中止,配置不落盘。
|
|
1328
|
+
let askedAfterEnd = 0
|
|
1329
|
+
const ask = async (q, def, endedDef = def) => {
|
|
1323
1330
|
process.stdout.write(`${cyan('?')} ${q}${def ? dim(` [${def}]`) : ''} `)
|
|
1324
1331
|
const a = await nextLine()
|
|
1325
|
-
if (a == null)
|
|
1326
|
-
|
|
1332
|
+
if (a == null) {
|
|
1333
|
+
process.stdout.write('\n')
|
|
1334
|
+
if (++askedAfterEnd > SETUP_MAX_ASKS_AFTER_EOF) throw new Error('输入已经结束,向导还在提问 —— 已中止,配置没有写入。请在终端里直接运行 sintbot setup')
|
|
1335
|
+
return endedDef || ''
|
|
1336
|
+
}
|
|
1337
|
+
return String(a).trim() || def || ''
|
|
1327
1338
|
}
|
|
1328
|
-
const askYN = async (q, defYes) => {
|
|
1329
|
-
const a = (await ask(`${q} ${dim(defYes ? '(Y/n)' : '(y/N)')}`, '')).toLowerCase()
|
|
1339
|
+
const askYN = async (q, defYes, endedYes = defYes) => {
|
|
1340
|
+
const a = (await ask(`${q} ${dim(defYes ? '(Y/n)' : '(y/N)')}`, '', endedYes ? 'y' : 'n')).toLowerCase()
|
|
1330
1341
|
return a ? a[0] === 'y' : !!defYes
|
|
1331
1342
|
}
|
|
1332
1343
|
// Key/secret prompt: echoes visibly (so you can see the paste landed) and then
|
|
@@ -1363,7 +1374,8 @@ async function cmdSetup(rest) {
|
|
|
1363
1374
|
if (claudeBin) process.stdout.write(` ${cyan('✓')} claude ${dim(claudeBin)}\n`)
|
|
1364
1375
|
else {
|
|
1365
1376
|
process.stdout.write(` ${red('✗')} 没找到 claude(Claude Code CLI)—— 每一轮都靠它干活\n`)
|
|
1366
|
-
|
|
1377
|
+
// 没人回答(输入已结束)就不替他装软件
|
|
1378
|
+
if (await askYN(`现在安装 Claude Code(npm i -g ${installdeps.PACKAGES.claude})?`, true, false)) claudeBin = installDep('claude', claudeName)
|
|
1367
1379
|
else process.stdout.write(dim(` 稍后自己装:npm i -g ${installdeps.PACKAGES.claude}`) + '\n')
|
|
1368
1380
|
}
|
|
1369
1381
|
// Claude 登录态留到模型步一起报,那里据此决定推荐走哪条路。官方非交互子命令,0.2s、不联网;
|
|
@@ -1455,7 +1467,7 @@ async function cmdSetup(rest) {
|
|
|
1455
1467
|
if (r.ok) { reportTurn(info.label, r); verified.push(name); return true }
|
|
1456
1468
|
const why = setupmodels.explainTestFailure(r.text, { baseUrl: p.baseUrl })
|
|
1457
1469
|
process.stdout.write(` ${red('✗')} ${why.text}\n`)
|
|
1458
|
-
if (!(await askYN('再试一次?(可以重新粘贴 key)', why.kind === 'auth' || why.kind === 'network'))) {
|
|
1470
|
+
if (!(await askYN('再试一次?(可以重新粘贴 key)', why.kind === 'auth' || why.kind === 'network', false))) {
|
|
1459
1471
|
process.stdout.write(dim(' key 先保存;跑通之前这个模型的轮次会失败,之后可在控制台「模型」页再测') + '\n')
|
|
1460
1472
|
return true
|
|
1461
1473
|
}
|
|
@@ -1490,7 +1502,7 @@ async function cmdSetup(rest) {
|
|
|
1490
1502
|
+ ' 3) 用 Claude 订阅 —— 另开一个终端跑 claude auth login,登录好回到这里\n'
|
|
1491
1503
|
+ ` 4) 用 ChatGPT(Codex)—— 另开一个终端跑 codex login(没装先 npm i -g ${installdeps.PACKAGES.codex}),登录好回到这里\n`
|
|
1492
1504
|
+ ' 5) 先跳过(之后在控制台「模型」页添加)\n')
|
|
1493
|
-
const a = await ask('选', '1')
|
|
1505
|
+
const a = await ask('选', '1', '5') // 输入已结束 ⇒ 先跳过(选 1 拿不到 key 会回到这里)
|
|
1494
1506
|
if (a === '1') { if (await configureKeyed(setupmodels.RECOMMENDED)) break; continue }
|
|
1495
1507
|
if (a === '2') { if (await pickOthers() && readyKeyed().length) break; continue }
|
|
1496
1508
|
if (a === '3' || a === '4') {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sintbot",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"description": "Drive headless Claude Code (or Codex) from Slack / Feishu / WeCom group chats — one group, one project, swappable model brain. A standalone daemon, not a Claude Code plugin.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"sbot": "bin/sbot.js",
|