sintbot 1.0.16 → 1.3.0
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 +99 -0
- package/CHANGELOG.json +99 -0
- package/README.md +20 -158
- package/README.zh-CN.md +20 -166
- package/THIRD-PARTY-NOTICES.md +394 -0
- package/bin/sintbot-v2.js +363 -0
- package/docs/AI-ASSISTED-INSTALL.md +11 -35
- package/docs/install.md +61 -167
- package/docs/zh-CN/AI-ASSISTED-INSTALL.md +11 -35
- package/docs/zh-CN/install.md +61 -165
- package/install.sh +84 -0
- package/package.json +73 -37
- package/src/agent/claudecode.js +149 -108
- package/src/agent/codexapp.js +458 -0
- package/src/agent/codexcode.js +210 -107
- package/src/agent/errtag.js +34 -0
- package/src/agent/privatecore.js +790 -0
- package/src/agent/privatecore.wasm +0 -0
- package/src/agent/runner.js +10 -8
- package/src/agent/winexec.js +35 -5
- package/src/c2install.js +117 -0
- package/src/config.js +2 -1
- package/src/core/c2cardeffectbridge.js +51 -0
- package/src/core/c2cardterminalpath.js +216 -0
- package/src/core/c2durableingress.js +148 -0
- package/src/core/c2durablejournal.js +1560 -0
- package/src/core/c2durableruntime.js +2361 -0
- package/src/core/c2eventidentity.js +90 -0
- package/src/core/c2globalfault.js +401 -0
- package/src/core/c2localeffectexecutor.js +193 -0
- package/src/core/c2payloadhandles.js +333 -0
- package/src/core/c2persistrelation.js +179 -0
- package/src/core/c2persiststate.js +342 -0
- package/src/core/c2platformrecoverysender.js +76 -0
- package/src/core/c2recoverygate.js +385 -0
- package/src/core/c2runnerinput.js +63 -0
- package/src/core/c2servicestartgate.js +103 -0
- package/src/core/c2sessionbridge.js +72 -0
- package/src/core/c2sourcequarantine.js +30 -0
- package/src/core/c2startuprecovery.js +105 -0
- package/src/core/c2successorbridge.js +151 -0
- package/src/core/c2terminaleffectbridge.js +154 -0
- package/src/core/c2terminalprune.js +108 -0
- package/src/core/c2turnprojection.js +177 -0
- package/src/core/enginecheckpoint.js +211 -0
- package/src/core/engineeffectcursor.js +394 -0
- package/src/core/enginestepcoordinator.js +183 -0
- package/src/core/store.js +52 -8
- package/src/core/v2engine.js +1469 -0
- package/src/platform/feishu.js +324 -67
- package/src/plugins.js +1 -9
- package/assets/design-styles/acid-pop.md +0 -155
- package/assets/design-styles/archive-index.md +0 -161
- package/assets/design-styles/art-deco.md +0 -164
- package/assets/design-styles/cinematic-noir.md +0 -178
- package/assets/design-styles/editorial.md +0 -121
- package/assets/design-styles/extra/README.md +0 -23
- package/assets/design-styles/extra/constructivism.md +0 -146
- package/assets/design-styles/extra/neo-brutalism.md +0 -175
- package/assets/design-styles/extra/new-wave.md +0 -166
- package/assets/design-styles/extra/nordic-material.md +0 -162
- package/assets/design-styles/extra/paris-couture.md +0 -162
- package/assets/design-styles/extra/tropical-modern.md +0 -168
- package/assets/design-styles/extra/ulm-functional.md +0 -182
- package/assets/design-styles/extra/wa-shikimen.md +0 -160
- package/assets/design-styles/extra/y2k-chrome.md +0 -172
- package/assets/design-styles/geometric-pop.md +0 -122
- package/assets/design-styles/hand-drawn.md +0 -117
- package/assets/design-styles/islamic-geometry.md +0 -155
- package/assets/design-styles/liquid-glass.md +0 -183
- package/assets/design-styles/neo-chinese.md +0 -136
- package/assets/design-styles/precision-mono.md +0 -156
- package/assets/design-styles/quiet-luxury.md +0 -163
- package/assets/design-styles/riso-print.md +0 -116
- package/assets/design-styles/soft-friendly.md +0 -174
- package/assets/design-styles/swiss-grid.md +0 -156
- package/assets/design-styles/tech-dark.md +0 -182
- package/assets/favicon.svg +0 -6
- package/assets/logo.svg +0 -24
- package/bin/sbot.js +0 -4716
- package/docs/slack-app-manifest.yaml +0 -104
- package/sbot.config.example.json +0 -235
- package/src/agent/askonce.js +0 -76
- package/src/agent/claudemodels.js +0 -60
- package/src/agent/claudestatus.js +0 -74
- package/src/agent/claudeusage.js +0 -200
- package/src/agent/codexstatus.js +0 -181
- package/src/agent/imagen.js +0 -458
- package/src/agent/quotaerr.js +0 -44
- package/src/agent/transienterr.js +0 -32
- package/src/cdp.js +0 -254
- package/src/cli-secret.js +0 -36
- package/src/clilang.js +0 -31
- package/src/core/cron.js +0 -182
- package/src/core/cronfire.js +0 -120
- package/src/core/cronrun.js +0 -116
- package/src/core/engine.js +0 -2758
- package/src/core/interfaces.js +0 -114
- package/src/core/issues.js +0 -185
- package/src/core/ledger.js +0 -30
- package/src/core/opsalert.js +0 -214
- package/src/core/pending.js +0 -123
- package/src/core/proxy.js +0 -424
- package/src/core/quotaalert.js +0 -79
- package/src/core/quotaerr.js +0 -55
- package/src/core/scheduler.js +0 -59
- package/src/design.js +0 -5161
- package/src/gitrepo.js +0 -150
- package/src/health.js +0 -353
- package/src/installdeps.js +0 -72
- package/src/leftover.js +0 -174
- package/src/platform/boardnotice.js +0 -77
- package/src/platform/boardops.js +0 -36
- package/src/platform/boardwatch.js +0 -447
- package/src/platform/cli.js +0 -45
- package/src/platform/slack.js +0 -1289
- package/src/platform/takeovercard.js +0 -37
- package/src/platform/wecom.js +0 -938
- package/src/platform/wecomcli.js +0 -128
- package/src/platform/wecomgate.js +0 -108
- package/src/platform/wecomname.js +0 -43
- package/src/platform/wecompoll.js +0 -241
- package/src/preview.js +0 -581
- package/src/projectmemory.js +0 -175
- package/src/service.js +0 -317
- package/src/ui/auth.js +0 -31
- package/src/ui/browser.html +0 -392
- package/src/ui/browserroutes.js +0 -234
- package/src/ui/console.html +0 -5526
- package/src/ui/dashboard.js +0 -168
- package/src/ui/feishulogin.js +0 -136
- package/src/ui/server.js +0 -2314
- package/src/ui/sessions.js +0 -78
- package/src/ui/takeover.js +0 -108
- package/src/updater.js +0 -243
- package/src/upgrade.js +0 -35
- package/src/usage.js +0 -144
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
// 「接管浏览器」的群内卡片(纯函数,可测)—— 代替 agent 自己写一句话 + 贴裸链接。
|
|
3
|
-
//
|
|
4
|
-
// 为什么要卡片:① 裸链接在群里只是一串字符,看不出「卡在哪个页面、为什么要人」;卡片带当前页面截图,一眼看懂;
|
|
5
|
-
// ② 文案由代码保证(零工具名 / 零路径),不再靠 agent 每次现编;③ 一张卡能改状态:有人点了「开始接管」就翻成
|
|
6
|
-
// 「正在接管中」,群里其他人不会再去点一张已经用掉的票。
|
|
7
|
-
// 四种状态:open(等人来)· claimed(有人在接管了)· ended(接管结束了:人点了「结束」或到时)· expired(过期没人来)。
|
|
8
|
-
// ⚠ ended 与 expired 分开:前者人来过、多半登录已经做完;后者没人来 —— 群里看到的下一步不一样。
|
|
9
|
-
|
|
10
|
-
// 飞书卡片 button 的字段名反直觉:样式是 type、文字是 text:{tag,content} 对象
|
|
11
|
-
function buildTakeoverCard({ url = '', pageTitle = '', pageUrl = '', imgKey = null, minutes = 10, state = 'open', redact = (s) => s } = {}) {
|
|
12
|
-
const title = redact(String(pageTitle || '').trim()) || (pageUrl ? redact(hostOf(pageUrl)) : '一个页面')
|
|
13
|
-
const elements = []
|
|
14
|
-
if (state === 'open') {
|
|
15
|
-
if (imgKey) elements.push({ tag: 'img', img_key: imgKey, scale_type: 'fit_horizontal', corner_radius: '8px', preview: true, alt: { tag: 'plain_text', content: `机器人卡住的页面:${title}` } })
|
|
16
|
-
elements.push({ tag: 'markdown', content: `机器人卡在 **${title}**,这一步只有真人能做(登录 / 验证码 / 滑块 / 扫码)。\n点下面的按钮,直接操作它的浏览器(手机、电脑都行);做完回群里说一声,它接着干。` })
|
|
17
|
-
elements.push({ tag: 'button', type: 'primary', width: 'fill', text: { tag: 'plain_text', content: '接管浏览器' }, behaviors: [{ type: 'open_url', default_url: url }] })
|
|
18
|
-
// ⚠ 卡片 2.0 已不认 note 组件(2026-09-10 真机:「unsupported tag note」建卡被拒)—— 小字用 markdown 的 notation 字号 + 灰字
|
|
19
|
-
elements.push({ tag: 'markdown', text_size: 'notation', content: `<font color='grey'>${minutes} 分钟内有效 · 只能打开一次 · 只对应这一个页面</font>` })
|
|
20
|
-
return { schema: '2.0', config: { width_mode: 'default' }, header: { title: { tag: 'plain_text', content: '需要你帮它一把' }, subtitle: { tag: 'plain_text', content: '登录 / 验证码 / 滑块 / 扫码' }, template: 'orange' }, body: { padding: '16px', vertical_spacing: '12px', elements } }
|
|
21
|
-
}
|
|
22
|
-
if (state === 'claimed') {
|
|
23
|
-
elements.push({ tag: 'markdown', content: `**${title}** —— 已有人接管,正在操作中。\n做完回群里说一声就行;这条链接已经用掉,别人点不开了。` })
|
|
24
|
-
return { schema: '2.0', config: { width_mode: 'default' }, header: { title: { tag: 'plain_text', content: '正在接管中' }, template: 'blue' }, body: { padding: '16px', vertical_spacing: '12px', elements } }
|
|
25
|
-
}
|
|
26
|
-
if (state === 'ended') {
|
|
27
|
-
elements.push({ tag: 'markdown', content: `**${title}** —— 接管已结束,这条链接已作废。\n登录 / 验证做完了就在群里说一声,机器人接着干;没做完就让它再发一条。` })
|
|
28
|
-
return { schema: '2.0', config: { width_mode: 'default' }, header: { title: { tag: 'plain_text', content: '接管已结束' }, template: 'green' }, body: { padding: '16px', vertical_spacing: '12px', elements } }
|
|
29
|
-
}
|
|
30
|
-
// expired
|
|
31
|
-
elements.push({ tag: 'markdown', content: `**${title}** —— 这条接管链接已过期,没人来得及用。\n还需要的话让机器人重新发一条。` })
|
|
32
|
-
return { schema: '2.0', config: { width_mode: 'default' }, header: { title: { tag: 'plain_text', content: '接管链接已过期' }, template: 'grey' }, body: { padding: '16px', vertical_spacing: '12px', elements } }
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function hostOf(u) { try { return new URL(u).hostname } catch { return String(u || '').slice(0, 60) } }
|
|
36
|
-
|
|
37
|
-
module.exports = { buildTakeoverCard, hostOf }
|