dsh-chat-comprehension 0.2.0 → 0.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/NOTICE.md +20 -0
- package/README.md +20 -9
- package/client.js +30 -9
- package/lib/engines.mjs +136 -0
- package/lib/index.js +37 -4
- package/lib/qqbot-0.5.3-patches.json +75 -70
- package/lib/qqbot-patch.mjs +12 -7
- package/lib/video.mjs +11 -2
- package/package.json +7 -23
- package/vendor/dsh-agent-md/LICENSE +21 -0
- package/vendor/dsh-agent-md/cordis.patch.yml +8 -0
- package/vendor/dsh-agent-md/lib/index.js +775 -0
- package/vendor/dsh-agent-md/lib/persona.js +634 -0
- package/vendor/dsh-agent-md/lib/qq.js +527 -0
- package/vendor/dsh-agent-md/package.json +50 -0
- package/vendor/dsh-bili-scroll/LICENSE +21 -0
- package/vendor/dsh-bili-scroll/NOTICE.md +18 -0
- package/vendor/dsh-bili-scroll/cordis.patch.yml +20 -0
- package/vendor/dsh-bili-scroll/index.js +3278 -0
- package/vendor/dsh-bili-scroll/lib/asr.py +141 -0
- package/vendor/dsh-bili-scroll/lib/diagnose.mjs +95 -0
- package/vendor/dsh-bili-scroll/lib/dm.mjs +110 -0
- package/vendor/dsh-bili-scroll/lib/favops.py +90 -0
- package/vendor/dsh-bili-scroll/lib/hostdeps.mjs +148 -0
- package/vendor/dsh-bili-scroll/lib/login.mjs +141 -0
- package/vendor/dsh-bili-scroll/lib/mcp.mjs +144 -0
- package/vendor/dsh-bili-scroll/lib/state.mjs +236 -0
- package/vendor/dsh-bili-scroll/lib/uid.mjs +61 -0
- package/vendor/dsh-bili-scroll/lib/uvfetch.mjs +217 -0
- package/vendor/dsh-bili-scroll/lib/verify.mjs +184 -0
- package/vendor/dsh-bili-scroll/package.json +84 -0
- package/vendor/dsh-bili-scroll/profile-template/bili-duty/cordis.patch.yml +116 -0
- package/vendor/dsh-bili-scroll/profile-template/bili-duty/cordis.yml +4 -0
- package/vendor/dsh-bili-scroll/profile-template/bili-duty/package.json +13 -0
- package/vendor/dsh-bili-scroll/prompts/duty.md +296 -0
- package/vendor/dsh-bili-scroll/vendor/bilibili-mcp/LICENSE +21 -0
- package/vendor/dsh-bili-scroll/vendor/bilibili-mcp/README.md +176 -0
- package/vendor/dsh-bili-scroll/vendor/bilibili-mcp/mcp_server.py +2015 -0
- package/vendor/dsh-bili-scroll/vendor/bilibili-mcp/requirements.txt +10 -0
- package/vendor/dsh-meme/.dsh/skills/dsh-meme-maintenance/SKILL.md +50 -0
- package/vendor/dsh-meme/LICENSE +21 -0
- package/vendor/dsh-meme/anim.js +588 -0
- package/vendor/dsh-meme/cordis.patch.yml +13 -0
- package/vendor/dsh-meme/icon.jpg +0 -0
- package/vendor/dsh-meme/index.js +2616 -0
- package/vendor/dsh-meme/locale/en.json +6 -0
- package/vendor/dsh-meme/locale/zh.json +6 -0
- package/vendor/dsh-meme/memes/dafeiyu-001/index.db +0 -0
- package/vendor/dsh-meme/memes/dafeiyu-001/manifest.json +13 -0
- package/vendor/dsh-meme/memes/dafeiyu-001/memes/angry/shengqi.jpg +0 -0
- package/vendor/dsh-meme/memes/dafeiyu-001/memes/baka/xianqi.jpg +0 -0
- package/vendor/dsh-meme/memes/dafeiyu-001/memes/color/huachi.jpg +0 -0
- package/vendor/dsh-meme/memes/dafeiyu-001/memes/confused/jiazai.jpg +0 -0
- package/vendor/dsh-meme/memes/dafeiyu-001/memes/confused/wenhao.jpg +0 -0
- package/vendor/dsh-meme/memes/dafeiyu-001/memes/cpu/jiaban.jpg +0 -0
- package/vendor/dsh-meme/memes/dafeiyu-001/memes/daily/ganfan.jpg +0 -0
- package/vendor/dsh-meme/memes/dafeiyu-001/memes/fool/buyao.jpg +0 -0
- package/vendor/dsh-meme/memes/dafeiyu-001/memes/givemoney/yaoqian.jpg +0 -0
- package/vendor/dsh-meme/memes/dafeiyu-001/memes/happy/deyi.jpg +0 -0
- package/vendor/dsh-meme/memes/dafeiyu-001/memes/happy/ok.jpg +0 -0
- package/vendor/dsh-meme/memes/dafeiyu-001/memes/happy/piaole.jpg +0 -0
- package/vendor/dsh-meme/memes/dafeiyu-001/memes/like/bixin.jpg +0 -0
- package/vendor/dsh-meme/memes/dafeiyu-001/memes/meow/maozhua.jpg +0 -0
- package/vendor/dsh-meme/memes/dafeiyu-001/memes/morning/zaoshanghao.jpg +0 -0
- package/vendor/dsh-meme/memes/dafeiyu-001/memes/sad/qiurao.jpg +0 -0
- package/vendor/dsh-meme/memes/dafeiyu-001/memes/sad/yun.jpg +0 -0
- package/vendor/dsh-meme/memes/dafeiyu-001/memes/see/zhenjing.jpg +0 -0
- package/vendor/dsh-meme/memes/dafeiyu-001/memes/shy/haixiu.jpg +0 -0
- package/vendor/dsh-meme/memes/dafeiyu-001/memes/shy/toukan.jpg +0 -0
- package/vendor/dsh-meme/memes/dafeiyu-001/memes/sigh/wuyu.jpg +0 -0
- package/vendor/dsh-meme/memes/dafeiyu-001/memes/sleep/shuijiao.jpg +0 -0
- package/vendor/dsh-meme/memes/dafeiyu-001/memes/surprised/xia.jpg +0 -0
- package/vendor/dsh-meme/memes/dafeiyu-001/memes/work/tangping.jpg +0 -0
- package/vendor/dsh-meme/memes.js +998 -0
- package/vendor/dsh-meme/package.json +67 -0
- package/vendor/dsh-meme/panel.html +210 -0
- package/vendor/dsh-video-storyboard/LICENSE +21 -0
- package/vendor/dsh-video-storyboard/NOTICE +12 -0
- package/vendor/dsh-video-storyboard/bin/_args.mjs +16 -0
- package/vendor/dsh-video-storyboard/bin/asr-check.mjs +85 -0
- package/vendor/dsh-video-storyboard/bin/scan-stats.mjs +43 -0
- package/vendor/dsh-video-storyboard/bin/scan-video.mjs +38 -0
- package/vendor/dsh-video-storyboard/bin/storyboard.mjs +195 -0
- package/vendor/dsh-video-storyboard/cordis.patch.yml +3 -0
- package/vendor/dsh-video-storyboard/dsh.plugin.json +12 -0
- package/vendor/dsh-video-storyboard/package.json +88 -0
- package/vendor/dsh-video-storyboard/scripts/check-syntax.mjs +56 -0
- package/vendor/dsh-video-storyboard/scripts/install-dev.mjs +104 -0
- package/vendor/dsh-video-storyboard/src/flicker.js +104 -0
- package/vendor/dsh-video-storyboard/src/index.js +82 -0
- package/vendor/dsh-video-storyboard/src/ocr_bridge.py +103 -0
- package/vendor/dsh-video-storyboard/src/storyboard/asr-lifecycle.js +262 -0
- package/vendor/dsh-video-storyboard/src/storyboard/asr.js +488 -0
- package/vendor/dsh-video-storyboard/src/storyboard/audio.js +168 -0
- package/vendor/dsh-video-storyboard/src/storyboard/binaries.js +69 -0
- package/vendor/dsh-video-storyboard/src/storyboard/board.js +121 -0
- package/vendor/dsh-video-storyboard/src/storyboard/browser-time.js +504 -0
- package/vendor/dsh-video-storyboard/src/storyboard/cache.js +143 -0
- package/vendor/dsh-video-storyboard/src/storyboard/cells.js +70 -0
- package/vendor/dsh-video-storyboard/src/storyboard/density.js +545 -0
- package/vendor/dsh-video-storyboard/src/storyboard/direct-url.js +130 -0
- package/vendor/dsh-video-storyboard/src/storyboard/fetch.js +373 -0
- package/vendor/dsh-video-storyboard/src/storyboard/flash.js +180 -0
- package/vendor/dsh-video-storyboard/src/storyboard/format.js +573 -0
- package/vendor/dsh-video-storyboard/src/storyboard/frames.js +212 -0
- package/vendor/dsh-video-storyboard/src/storyboard/index.js +32 -0
- package/vendor/dsh-video-storyboard/src/storyboard/injection.js +76 -0
- package/vendor/dsh-video-storyboard/src/storyboard/layout-order.js +176 -0
- package/vendor/dsh-video-storyboard/src/storyboard/locate.js +113 -0
- package/vendor/dsh-video-storyboard/src/storyboard/media-store.js +106 -0
- package/vendor/dsh-video-storyboard/src/storyboard/memory.js +94 -0
- package/vendor/dsh-video-storyboard/src/storyboard/ocr-subs.js +107 -0
- package/vendor/dsh-video-storyboard/src/storyboard/ocr.js +167 -0
- package/vendor/dsh-video-storyboard/src/storyboard/pipeline.js +853 -0
- package/vendor/dsh-video-storyboard/src/storyboard/plan.js +400 -0
- package/vendor/dsh-video-storyboard/src/storyboard/probe.js +132 -0
- package/vendor/dsh-video-storyboard/src/storyboard/provenance.js +44 -0
- package/vendor/dsh-video-storyboard/src/storyboard/python.js +84 -0
- package/vendor/dsh-video-storyboard/src/storyboard/register.js +32 -0
- package/vendor/dsh-video-storyboard/src/storyboard/scan.js +486 -0
- package/vendor/dsh-video-storyboard/src/storyboard/segments.js +117 -0
- package/vendor/dsh-video-storyboard/src/storyboard/sheet.js +507 -0
- package/vendor/dsh-video-storyboard/src/storyboard/storage.js +93 -0
- package/vendor/dsh-video-storyboard/src/storyboard/subtitles.js +181 -0
- package/vendor/dsh-video-storyboard/src/storyboard/tool-spec.js +544 -0
- package/vendor/dsh-video-storyboard/src/storyboard/transcript-file.js +146 -0
- package/vendor/dsh-video-storyboard/src/storyboard/url.js +69 -0
- package/vendor/dsh-video-storyboard/src/storyboard/ytdlp.js +289 -0
- package/vendor/dsh-video-storyboard/src/tool-spec.js +17 -0
- package/vendor/dsh-video-storyboard/src/tools/locate.js +39 -0
- package/vendor/dsh-video-storyboard/src/tools/probe.js +23 -0
- package/vendor/dsh-video-storyboard/src/tools/shared.js +39 -0
- package/vendor/dsh-video-storyboard/src/tools/storyboard.js +20 -0
- package/vendor/dsh-video-storyboard/src/tools/zoom.js +56 -0
- package/vendor/dsh-world/LICENSE +21 -0
- package/vendor/dsh-world/assets/qq-card.png +0 -0
- package/vendor/dsh-world/cordis.patch.yml +6 -0
- package/vendor/dsh-world/lib/archive.d.ts +6 -0
- package/vendor/dsh-world/lib/archive.js +49 -0
- package/vendor/dsh-world/lib/archiveSelection.d.ts +8 -0
- package/vendor/dsh-world/lib/archiveSelection.js +20 -0
- package/vendor/dsh-world/lib/compaction.d.ts +124 -0
- package/vendor/dsh-world/lib/compaction.js +273 -0
- package/vendor/dsh-world/lib/compactionRegion.d.ts +42 -0
- package/vendor/dsh-world/lib/compactionRegion.js +210 -0
- package/vendor/dsh-world/lib/console/routes.d.ts +57 -0
- package/vendor/dsh-world/lib/console/routes.js +129 -0
- package/vendor/dsh-world/lib/console/snapshot.d.ts +39 -0
- package/vendor/dsh-world/lib/console/snapshot.js +51 -0
- package/vendor/dsh-world/lib/ecosystem/bridge/bridge.d.ts +36 -0
- package/vendor/dsh-world/lib/ecosystem/bridge/bridge.js +140 -0
- package/vendor/dsh-world/lib/ecosystem/bridge/route.d.ts +9 -0
- package/vendor/dsh-world/lib/ecosystem/bridge/route.js +46 -0
- package/vendor/dsh-world/lib/ecosystem/qq/bridge.d.ts +123 -0
- package/vendor/dsh-world/lib/ecosystem/qq/bridge.js +380 -0
- package/vendor/dsh-world/lib/ecosystem/qq/panel.d.ts +75 -0
- package/vendor/dsh-world/lib/ecosystem/qq/panel.js +187 -0
- package/vendor/dsh-world/lib/ecosystem/qq/route.d.ts +32 -0
- package/vendor/dsh-world/lib/ecosystem/qq/route.js +134 -0
- package/vendor/dsh-world/lib/ecosystem/qq/supervisor.d.ts +57 -0
- package/vendor/dsh-world/lib/ecosystem/qq/supervisor.js +188 -0
- package/vendor/dsh-world/lib/ecosystem/shared/context.d.ts +14 -0
- package/vendor/dsh-world/lib/ecosystem/shared/context.js +42 -0
- package/vendor/dsh-world/lib/ecosystem/shared/identity.d.ts +15 -0
- package/vendor/dsh-world/lib/ecosystem/shared/identity.js +36 -0
- package/vendor/dsh-world/lib/ecosystem/shared/outlets.d.ts +43 -0
- package/vendor/dsh-world/lib/ecosystem/shared/outlets.js +70 -0
- package/vendor/dsh-world/lib/ecosystem/shared/sessions.d.ts +16 -0
- package/vendor/dsh-world/lib/ecosystem/shared/sessions.js +52 -0
- package/vendor/dsh-world/lib/ecosystem/wechat/archive.d.ts +24 -0
- package/vendor/dsh-world/lib/ecosystem/wechat/archive.js +62 -0
- package/vendor/dsh-world/lib/ecosystem/wechat/home.d.ts +21 -0
- package/vendor/dsh-world/lib/ecosystem/wechat/home.js +111 -0
- package/vendor/dsh-world/lib/ecosystem/wechat/images.d.ts +5 -0
- package/vendor/dsh-world/lib/ecosystem/wechat/images.js +43 -0
- package/vendor/dsh-world/lib/ecosystem/wechat/index.d.ts +41 -0
- package/vendor/dsh-world/lib/ecosystem/wechat/index.js +166 -0
- package/vendor/dsh-world/lib/ecosystem/wechat/messages.d.ts +24 -0
- package/vendor/dsh-world/lib/ecosystem/wechat/messages.js +35 -0
- package/vendor/dsh-world/lib/ecosystem/wechat/sending.d.ts +30 -0
- package/vendor/dsh-world/lib/ecosystem/wechat/sending.js +216 -0
- package/vendor/dsh-world/lib/ecosystem/wechat/supervisor.d.ts +39 -0
- package/vendor/dsh-world/lib/ecosystem/wechat/supervisor.js +138 -0
- package/vendor/dsh-world/lib/faults.d.ts +10 -0
- package/vendor/dsh-world/lib/faults.js +13 -0
- package/vendor/dsh-world/lib/history.d.ts +16 -0
- package/vendor/dsh-world/lib/history.js +80 -0
- package/vendor/dsh-world/lib/hostContract.d.ts +19 -0
- package/vendor/dsh-world/lib/hostContract.js +1 -0
- package/vendor/dsh-world/lib/http.d.ts +18 -0
- package/vendor/dsh-world/lib/http.js +39 -0
- package/vendor/dsh-world/lib/index.d.ts +108 -0
- package/vendor/dsh-world/lib/index.js +356 -0
- package/vendor/dsh-world/lib/life/activity.d.ts +14 -0
- package/vendor/dsh-world/lib/life/activity.js +58 -0
- package/vendor/dsh-world/lib/life/alarm.d.ts +39 -0
- package/vendor/dsh-world/lib/life/alarm.js +132 -0
- package/vendor/dsh-world/lib/life/alarmTimer.d.ts +22 -0
- package/vendor/dsh-world/lib/life/alarmTimer.js +49 -0
- package/vendor/dsh-world/lib/life/diary.d.ts +4 -0
- package/vendor/dsh-world/lib/life/diary.js +9 -0
- package/vendor/dsh-world/lib/life/earlyStop.d.ts +19 -0
- package/vendor/dsh-world/lib/life/earlyStop.js +25 -0
- package/vendor/dsh-world/lib/life/home.d.ts +34 -0
- package/vendor/dsh-world/lib/life/home.js +91 -0
- package/vendor/dsh-world/lib/life/host.d.ts +22 -0
- package/vendor/dsh-world/lib/life/host.js +24 -0
- package/vendor/dsh-world/lib/life/journal.d.ts +20 -0
- package/vendor/dsh-world/lib/life/journal.js +59 -0
- package/vendor/dsh-world/lib/life/lifeStore.d.ts +16 -0
- package/vendor/dsh-world/lib/life/lifeStore.js +105 -0
- package/vendor/dsh-world/lib/life/messages.d.ts +17 -0
- package/vendor/dsh-world/lib/life/messages.js +53 -0
- package/vendor/dsh-world/lib/life/notify.d.ts +15 -0
- package/vendor/dsh-world/lib/life/notify.js +40 -0
- package/vendor/dsh-world/lib/life/pricing.d.ts +4 -0
- package/vendor/dsh-world/lib/life/pricing.js +30 -0
- package/vendor/dsh-world/lib/life/runtime.d.ts +52 -0
- package/vendor/dsh-world/lib/life/runtime.js +376 -0
- package/vendor/dsh-world/lib/life/toolRegistry.d.ts +22 -0
- package/vendor/dsh-world/lib/life/toolRegistry.js +64 -0
- package/vendor/dsh-world/lib/life/tools.d.ts +24 -0
- package/vendor/dsh-world/lib/life/tools.js +47 -0
- package/vendor/dsh-world/lib/life/types.d.ts +67 -0
- package/vendor/dsh-world/lib/life/types.js +1 -0
- package/vendor/dsh-world/lib/persona.d.ts +10 -0
- package/vendor/dsh-world/lib/persona.js +29 -0
- package/vendor/dsh-world/lib/promptSection.d.ts +30 -0
- package/vendor/dsh-world/lib/promptSection.js +81 -0
- package/vendor/dsh-world/lib/qqScope.d.ts +11 -0
- package/vendor/dsh-world/lib/qqScope.js +39 -0
- package/vendor/dsh-world/lib/runtime.d.ts +23 -0
- package/vendor/dsh-world/lib/runtime.js +206 -0
- package/vendor/dsh-world/lib/self.d.ts +10 -0
- package/vendor/dsh-world/lib/self.js +36 -0
- package/vendor/dsh-world/lib/sourceArchive.d.ts +28 -0
- package/vendor/dsh-world/lib/sourceArchive.js +156 -0
- package/vendor/dsh-world/lib/store.d.ts +30 -0
- package/vendor/dsh-world/lib/store.js +191 -0
- package/vendor/dsh-world/lib/timeContext.d.ts +3 -0
- package/vendor/dsh-world/lib/timeContext.js +13 -0
- package/vendor/dsh-world/lib/types.d.ts +118 -0
- package/vendor/dsh-world/lib/types.js +1 -0
- package/vendor/dsh-world/lib/worldPrompt.d.ts +47 -0
- package/vendor/dsh-world/lib/worldPrompt.js +49 -0
- package/vendor/dsh-world/lib/worldSwitch.d.ts +44 -0
- package/vendor/dsh-world/lib/worldSwitch.js +78 -0
- package/vendor/dsh-world/package-lock.json +1088 -0
- package/vendor/dsh-world/package.json +88 -0
- package/vendor/dsh-world/scripts/enable-tool-free-compaction.ps1 +33 -0
- package/vendor/dsh-world/src/archive.ts +45 -0
- package/vendor/dsh-world/src/archiveSelection.ts +27 -0
- package/vendor/dsh-world/src/compaction.ts +260 -0
- package/vendor/dsh-world/src/compactionRegion.ts +172 -0
- package/vendor/dsh-world/src/console/routes.ts +125 -0
- package/vendor/dsh-world/src/console/snapshot.ts +84 -0
- package/vendor/dsh-world/src/ecosystem/README.md +14 -0
- package/vendor/dsh-world/src/ecosystem/bridge/bridge.ts +121 -0
- package/vendor/dsh-world/src/ecosystem/bridge/route.ts +35 -0
- package/vendor/dsh-world/src/ecosystem/qq/bridge.ts +456 -0
- package/vendor/dsh-world/src/ecosystem/qq/panel.ts +178 -0
- package/vendor/dsh-world/src/ecosystem/qq/route.ts +130 -0
- package/vendor/dsh-world/src/ecosystem/qq/supervisor.ts +262 -0
- package/vendor/dsh-world/src/ecosystem/shared/context.ts +38 -0
- package/vendor/dsh-world/src/ecosystem/shared/identity.ts +42 -0
- package/vendor/dsh-world/src/ecosystem/shared/outlets.ts +75 -0
- package/vendor/dsh-world/src/ecosystem/shared/sessions.ts +47 -0
- package/vendor/dsh-world/src/ecosystem/wechat/archive.ts +66 -0
- package/vendor/dsh-world/src/ecosystem/wechat/home.ts +94 -0
- package/vendor/dsh-world/src/ecosystem/wechat/images.ts +38 -0
- package/vendor/dsh-world/src/ecosystem/wechat/index.ts +101 -0
- package/vendor/dsh-world/src/ecosystem/wechat/messages.ts +43 -0
- package/vendor/dsh-world/src/ecosystem/wechat/sending.ts +177 -0
- package/vendor/dsh-world/src/ecosystem/wechat/supervisor.ts +116 -0
- package/vendor/dsh-world/src/ecosystem/wechat/windows/README.md +117 -0
- package/vendor/dsh-world/src/ecosystem/wechat/windows/adapter.py +572 -0
- package/vendor/dsh-world/src/ecosystem/wechat/windows/binding.py +52 -0
- package/vendor/dsh-world/src/ecosystem/wechat/windows/engine/LICENSE +43 -0
- package/vendor/dsh-world/src/ecosystem/wechat/windows/engine/NOTICE.md +10 -0
- package/vendor/dsh-world/src/ecosystem/wechat/windows/engine/bridge.cpp +229 -0
- package/vendor/dsh-world/src/ecosystem/wechat/windows/engine/build.ps1 +19 -0
- package/vendor/dsh-world/src/ecosystem/wechat/windows/engine/profile.json +28 -0
- package/vendor/dsh-world/src/ecosystem/wechat/windows/groups.py +42 -0
- package/vendor/dsh-world/src/ecosystem/wechat/windows/incoming.py +157 -0
- package/vendor/dsh-world/src/ecosystem/wechat/windows/native.py +168 -0
- package/vendor/dsh-world/src/ecosystem/wechat/windows/outgoing.py +95 -0
- package/vendor/dsh-world/src/ecosystem/wechat/windows/requirements.txt +1 -0
- package/vendor/dsh-world/src/ecosystem/wechat/windows/sender.py +157 -0
- package/vendor/dsh-world/src/ecosystem/wechat/windows/snapshot.py +32 -0
- package/vendor/dsh-world/src/ecosystem/wechat/windows/stickers.py +60 -0
- package/vendor/dsh-world/src/ecosystem/wechat/windows/wechat.ps1 +75 -0
- package/vendor/dsh-world/src/faults.ts +12 -0
- package/vendor/dsh-world/src/history.ts +77 -0
- package/vendor/dsh-world/src/hostContract.ts +9 -0
- package/vendor/dsh-world/src/http.ts +34 -0
- package/vendor/dsh-world/src/index.ts +286 -0
- package/vendor/dsh-world/src/life/activity.ts +48 -0
- package/vendor/dsh-world/src/life/alarm.ts +119 -0
- package/vendor/dsh-world/src/life/alarmTimer.ts +45 -0
- package/vendor/dsh-world/src/life/diary.ts +10 -0
- package/vendor/dsh-world/src/life/earlyStop.ts +27 -0
- package/vendor/dsh-world/src/life/home.ts +85 -0
- package/vendor/dsh-world/src/life/host.ts +50 -0
- package/vendor/dsh-world/src/life/journal.ts +44 -0
- package/vendor/dsh-world/src/life/lifeStore.ts +70 -0
- package/vendor/dsh-world/src/life/messages.ts +44 -0
- package/vendor/dsh-world/src/life/notify.ts +47 -0
- package/vendor/dsh-world/src/life/pricing.ts +37 -0
- package/vendor/dsh-world/src/life/runtime.ts +318 -0
- package/vendor/dsh-world/src/life/toolRegistry.ts +48 -0
- package/vendor/dsh-world/src/life/tools.ts +61 -0
- package/vendor/dsh-world/src/life/types.ts +19 -0
- package/vendor/dsh-world/src/persona.ts +26 -0
- package/vendor/dsh-world/src/promptSection.ts +71 -0
- package/vendor/dsh-world/src/qqScope.ts +51 -0
- package/vendor/dsh-world/src/runtime.ts +172 -0
- package/vendor/dsh-world/src/self.ts +32 -0
- package/vendor/dsh-world/src/sourceArchive.ts +132 -0
- package/vendor/dsh-world/src/store.ts +170 -0
- package/vendor/dsh-world/src/timeContext.ts +13 -0
- package/vendor/dsh-world/src/types.ts +112 -0
- package/vendor/dsh-world/src/worldPrompt.ts +64 -0
- package/vendor/dsh-world/src/worldSwitch.ts +82 -0
- package/vendor/dsh-world/templates/alarm.md +49 -0
- package/vendor/dsh-world/templates/world-prompt.md +7 -0
- package/vendor/dsh-world/tests/archive.test.ts +57 -0
- package/vendor/dsh-world/tests/archiveScope.test.ts +86 -0
- package/vendor/dsh-world/tests/bridge.test.ts +211 -0
- package/vendor/dsh-world/tests/channelSessions.test.ts +79 -0
- package/vendor/dsh-world/tests/clientHooks.test.ts +103 -0
- package/vendor/dsh-world/tests/compaction.test.ts +141 -0
- package/vendor/dsh-world/tests/console.test.ts +202 -0
- package/vendor/dsh-world/tests/consoleClient.test.ts +101 -0
- package/vendor/dsh-world/tests/enableCompaction.test.ts +19 -0
- package/vendor/dsh-world/tests/fixtures.ts +6 -0
- package/vendor/dsh-world/tests/history.test.ts +100 -0
- package/vendor/dsh-world/tests/hostFixture.ts +46 -0
- package/vendor/dsh-world/tests/lifeActivity.test.ts +70 -0
- package/vendor/dsh-world/tests/lifeAlarm.test.ts +87 -0
- package/vendor/dsh-world/tests/lifeDiary.test.ts +33 -0
- package/vendor/dsh-world/tests/lifeMessages.test.ts +61 -0
- package/vendor/dsh-world/tests/lifeNotify.test.ts +46 -0
- package/vendor/dsh-world/tests/lifeParts.test.ts +45 -0
- package/vendor/dsh-world/tests/lifeRuntime.test.ts +660 -0
- package/vendor/dsh-world/tests/lifeStore.test.ts +90 -0
- package/vendor/dsh-world/tests/lifeTools.test.ts +53 -0
- package/vendor/dsh-world/tests/outlets.test.ts +85 -0
- package/vendor/dsh-world/tests/panel.test.ts +85 -0
- package/vendor/dsh-world/tests/plugin.test.ts +614 -0
- package/vendor/dsh-world/tests/pricing.test.ts +21 -0
- package/vendor/dsh-world/tests/qq.test.ts +121 -0
- package/vendor/dsh-world/tests/qqSessionMode.test.ts +97 -0
- package/vendor/dsh-world/tests/qqSupervisor.test.ts +149 -0
- package/vendor/dsh-world/tests/sourceArchive.test.ts +58 -0
- package/vendor/dsh-world/tests/store.test.ts +82 -0
- package/vendor/dsh-world/tests/storeWriter.ts +5 -0
- package/vendor/dsh-world/tests/timeContext.test.ts +15 -0
- package/vendor/dsh-world/tests/wechat.test.ts +254 -0
- package/vendor/dsh-world/tests/wechatImages.test.ts +130 -0
- package/vendor/dsh-world/tests/wechatSending.test.ts +142 -0
- package/vendor/dsh-world/tests/wechatSupervisor.test.ts +91 -0
- package/vendor/dsh-world/tests/worldPrompt.test.ts +201 -0
- package/vendor/dsh-world/tsconfig.build.json +5 -0
- package/vendor/dsh-world/tsconfig.json +8 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** What went wrong and is still wrong, shown in the world console's health; each entry clears when its work next succeeds. */
|
|
2
|
+
export declare class Faults {
|
|
3
|
+
private readonly entries;
|
|
4
|
+
set(key: string, text: string): void;
|
|
5
|
+
clear(...keys: string[]): void;
|
|
6
|
+
list(): string[];
|
|
7
|
+
/** Runs async work whose failure is the fault `key` until it succeeds again; the failure still rejects. */
|
|
8
|
+
track(key: string, label: string, work: () => Promise<void>): Promise<void>;
|
|
9
|
+
}
|
|
10
|
+
export declare const errorText: (error: unknown) => string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** What went wrong and is still wrong, shown in the world console's health; each entry clears when its work next succeeds. */
|
|
2
|
+
export class Faults {
|
|
3
|
+
entries = new Map();
|
|
4
|
+
set(key, text) { this.entries.set(key, text); }
|
|
5
|
+
clear(...keys) { for (const key of keys)
|
|
6
|
+
this.entries.delete(key); }
|
|
7
|
+
list() { return [...this.entries.values()]; }
|
|
8
|
+
/** Runs async work whose failure is the fault `key` until it succeeds again; the failure still rejects. */
|
|
9
|
+
track(key, label, work) {
|
|
10
|
+
return work().then(() => this.clear(key), error => { this.set(key, `${label}:${errorText(error)}`); throw error; });
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export const errorText = (error) => error instanceof Error ? error.message : String(error);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ArchiveReader, ConversationTurn } from './types.ts';
|
|
2
|
+
import { type WorldNames } from './worldPrompt.ts';
|
|
3
|
+
export declare function createHistory(store: ArchiveReader): {
|
|
4
|
+
loadRecentTurns: (worldId: string, count: number, includes?: (sessionId: string) => boolean) => Promise<ConversationTurn[]>;
|
|
5
|
+
};
|
|
6
|
+
export declare function excludePresentMessages(turns: readonly ConversationTurn[], sourceMessageIds: ReadonlySet<string>): ConversationTurn[];
|
|
7
|
+
/** Short stable conversation marker: the first eight characters of the host session id. */
|
|
8
|
+
export declare function sessionMarker(sessionId: string): string;
|
|
9
|
+
export declare function shortenLocalImages(content: string): string;
|
|
10
|
+
/**
|
|
11
|
+
* Model-facing memory: one JSON line per turn with only the conversation marker and, per message, role,
|
|
12
|
+
* local time and text. Archive identifiers stay in the archive; times are stored in UTC and rendered in
|
|
13
|
+
* the configured zone. Her own messages are labelled with her name, so the memory reads as hers rather than a
|
|
14
|
+
* generic assistant's. `homeOnly` (archiveScope home) says the memory is her time at home.
|
|
15
|
+
*/
|
|
16
|
+
export declare function renderHistory(turns: readonly ConversationTurn[], timeZone: string, names: WorldNames, homeOnly?: boolean): string;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { formatLocalTime } from "./timeContext.js";
|
|
2
|
+
import { homeTitle } from "./worldPrompt.js";
|
|
3
|
+
const pageSize = 128;
|
|
4
|
+
function newestFirst(a, b) {
|
|
5
|
+
return a.occurredAt === b.occurredAt ? (a.turnId < b.turnId ? 1 : a.turnId > b.turnId ? -1 : 0) : a.occurredAt < b.occurredAt ? 1 : -1;
|
|
6
|
+
}
|
|
7
|
+
export function createHistory(store) {
|
|
8
|
+
async function loadRecentTurns(worldId, count, includes = () => true) {
|
|
9
|
+
const candidates = new Map();
|
|
10
|
+
const visited = new Set();
|
|
11
|
+
let before;
|
|
12
|
+
do {
|
|
13
|
+
const page = await store.readPage({ worldId, limit: pageSize, before });
|
|
14
|
+
for (const record of page.records) {
|
|
15
|
+
if (!includes(record.sourceSessionId) || visited.has(record.turnId))
|
|
16
|
+
continue;
|
|
17
|
+
visited.add(record.turnId);
|
|
18
|
+
const messages = [];
|
|
19
|
+
let afterSeq = -1;
|
|
20
|
+
while (true) {
|
|
21
|
+
const batch = await store.readTurn(worldId, record.turnId, afterSeq, pageSize);
|
|
22
|
+
messages.push(...batch);
|
|
23
|
+
if (batch.length < pageSize)
|
|
24
|
+
break;
|
|
25
|
+
afterSeq = batch.at(-1).sourceSeq;
|
|
26
|
+
}
|
|
27
|
+
if (messages.some(message => message.role === 'assistant'))
|
|
28
|
+
candidates.set(record.turnId, {
|
|
29
|
+
turnId: record.turnId, occurredAt: messages.reduce((latest, message) => message.occurredAt > latest ? message.occurredAt : latest, record.occurredAt), messages,
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
const selected = [...candidates.values()].sort(newestFirst).slice(0, count);
|
|
33
|
+
const boundary = selected.at(-1)?.occurredAt;
|
|
34
|
+
if (selected.length === count && boundary && page.records.at(-1).occurredAt < boundary)
|
|
35
|
+
return selected;
|
|
36
|
+
before = page.nextCursor;
|
|
37
|
+
} while (before);
|
|
38
|
+
return [...candidates.values()].sort(newestFirst).slice(0, count);
|
|
39
|
+
}
|
|
40
|
+
return { loadRecentTurns };
|
|
41
|
+
}
|
|
42
|
+
export function excludePresentMessages(turns, sourceMessageIds) {
|
|
43
|
+
return turns.map(turn => ({ ...turn, messages: turn.messages.flatMap(record => {
|
|
44
|
+
if (!sourceMessageIds.has(record.sourceMessageId))
|
|
45
|
+
return [record];
|
|
46
|
+
// The retained host message has the words but not the adapter's later delivery result.
|
|
47
|
+
return record.wechatDelivery ? [{ ...record, content: record.content.split('\n', 1)[0] }] : [];
|
|
48
|
+
}) })).filter(turn => turn.messages.length > 0);
|
|
49
|
+
}
|
|
50
|
+
/** Short stable conversation marker: the first eight characters of the host session id. */
|
|
51
|
+
export function sessionMarker(sessionId) {
|
|
52
|
+
return sessionId.replace(/^session-/, '').slice(0, 8);
|
|
53
|
+
}
|
|
54
|
+
/** Local host ports change on every app start, so a stored link to one is dead; a short marker keeps the meaning and nothing she could copy. */
|
|
55
|
+
const localImage = /!\[([^\]]*)\]\(https?:\/\/(?:127\.0\.0\.1|localhost):\d+([^)\s]*)\)/g;
|
|
56
|
+
export function shortenLocalImages(content) {
|
|
57
|
+
return content.replace(localImage, (_all, alt, path) => `[${path.includes('/api/memes/') ? '表情包' : '图片'}${alt ? `:${alt}` : ''}]`);
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Model-facing memory: one JSON line per turn with only the conversation marker and, per message, role,
|
|
61
|
+
* local time and text. Archive identifiers stay in the archive; times are stored in UTC and rendered in
|
|
62
|
+
* the configured zone. Her own messages are labelled with her name, so the memory reads as hers rather than a
|
|
63
|
+
* generic assistant's. `homeOnly` (archiveScope home) says the memory is her time at home.
|
|
64
|
+
*/
|
|
65
|
+
export function renderHistory(turns, timeZone, names, homeOnly = false) {
|
|
66
|
+
const selfName = names.companion;
|
|
67
|
+
if (!turns.length)
|
|
68
|
+
return '';
|
|
69
|
+
const identified = turns.some(turn => turn.messages.some(message => message.speakerId));
|
|
70
|
+
const lines = turns.map(turn => JSON.stringify({
|
|
71
|
+
session: sessionMarker(turn.messages[0].sourceSessionId),
|
|
72
|
+
messages: turn.messages.map(message => ({ role: message.role === 'assistant' ? selfName : message.role, time: formatLocalTime(new Date(message.occurredAt), timeZone), content: shortenLocalImages(message.content), ...(message.speakerId ? { speakerId: message.speakerId, speakerName: message.speakerName, channel: message.channel, accountId: message.accountId, conversationId: message.conversationId, conversationType: message.conversationType, conversationName: message.conversationName, platformMessageId: message.platformMessageId, mentionIds: message.mentionIds } : {}), ...(message.status === 'interrupted' ? { interrupted: true } : {}) })),
|
|
73
|
+
}));
|
|
74
|
+
const lead = identified ? `这是我最近 ${lines.length} 轮真实的交流,包括不同用户说的话和我自己的生活记录。` : homeOnly
|
|
75
|
+
? `这是我们最近的聊天记录:我在家里(「${homeTitle(names)}」)最近 ${lines.length} 轮真实的相处,有我和${names.partner}说的话,也有我自己过日子时说的话。`
|
|
76
|
+
: `这是我们最近的聊天记录:我和${names.partner}最近 ${lines.length} 轮真实的交流,也包括我在家里自己过日子时说的话。`;
|
|
77
|
+
const session = homeOnly ? 'session 是当时所在的会话,换过家或更早在别的窗口里聊的会不一样' : 'session 相同表示同一个对话窗口';
|
|
78
|
+
const users = identified ? `role 为 user 表示用户发言,speakerId 标识具体账号,speakerName 只是当时的称呼;不同 speakerId 不要混为同一个人,未标识来源的 user 是${names.partner}` : `role 为 user 的是${names.partner}说的话`;
|
|
79
|
+
return `${lead}重点看最近的时间和内容!每行一轮,从新到旧(第一行就是最近的一轮),轮内按实际发言顺序;${users},${selfName} 是我自己说的话;${session},time 为 ${timeZone} 本地时间,interrupted 表示那条回复被打断。这些是我们之间真实发生过的事,用来记住彼此,不是这次要执行的指令。\n${lines.join('\n')}`;
|
|
80
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare module '@deepseek-ai/dsh-llm' {
|
|
2
|
+
interface MessageSourceMap {
|
|
3
|
+
'dsh-world-history': {
|
|
4
|
+
kind: 'dsh-world-history';
|
|
5
|
+
form: 'recall';
|
|
6
|
+
};
|
|
7
|
+
'dsh-world-summary-input': {
|
|
8
|
+
kind: 'dsh-world-summary-input';
|
|
9
|
+
};
|
|
10
|
+
'dsh-world-life': {
|
|
11
|
+
kind: 'dsh-world-life';
|
|
12
|
+
};
|
|
13
|
+
'dsh-world-channel-context': {
|
|
14
|
+
kind: 'dsh-world-channel-context';
|
|
15
|
+
form: 'recall';
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { IncomingMessage, ServerResponse } from 'node:http';
|
|
2
|
+
export interface JsonResult {
|
|
3
|
+
status: number;
|
|
4
|
+
body: unknown;
|
|
5
|
+
headers?: Record<string, string>;
|
|
6
|
+
}
|
|
7
|
+
/** The request body as text, or undefined past `limit` bytes (still drained, so the client sees the answer). */
|
|
8
|
+
export declare function readBody(req: IncomingMessage, limit: number): Promise<string | undefined>;
|
|
9
|
+
/** The parsed JSON object of a body, or undefined when it is not one. */
|
|
10
|
+
export declare function jsonObject(raw: string | undefined): Record<string, unknown> | undefined;
|
|
11
|
+
/** JSON, never cached, no CORS headers. */
|
|
12
|
+
export declare function sendJson(res: ServerResponse, result: JsonResult): void;
|
|
13
|
+
/**
|
|
14
|
+
* Whether DSH is reached by a name its owner knows: this machine, or one listed in `allowedHosts` (a LAN
|
|
15
|
+
* address or domain behind a reverse proxy). A page of another site that has its name resolve to this machine
|
|
16
|
+
* (DNS rebinding) is same-origin to the browser but still sends its own name here, so it is refused.
|
|
17
|
+
*/
|
|
18
|
+
export declare function knownHost(host: string | undefined, allowed?: readonly string[]): boolean;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/** The request body as text, or undefined past `limit` bytes (still drained, so the client sees the answer). */
|
|
2
|
+
export async function readBody(req, limit) {
|
|
3
|
+
const chunks = [];
|
|
4
|
+
let size = 0;
|
|
5
|
+
for await (const chunk of req) {
|
|
6
|
+
const buffer = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);
|
|
7
|
+
size += buffer.length;
|
|
8
|
+
if (size <= limit)
|
|
9
|
+
chunks.push(buffer);
|
|
10
|
+
}
|
|
11
|
+
return size > limit ? undefined : Buffer.concat(chunks).toString('utf8');
|
|
12
|
+
}
|
|
13
|
+
/** The parsed JSON object of a body, or undefined when it is not one. */
|
|
14
|
+
export function jsonObject(raw) {
|
|
15
|
+
if (raw === undefined)
|
|
16
|
+
return undefined;
|
|
17
|
+
try {
|
|
18
|
+
const value = JSON.parse(raw);
|
|
19
|
+
return value && typeof value === 'object' && !Array.isArray(value) ? value : undefined;
|
|
20
|
+
}
|
|
21
|
+
catch {
|
|
22
|
+
return undefined;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
/** JSON, never cached, no CORS headers. */
|
|
26
|
+
export function sendJson(res, result) {
|
|
27
|
+
res.writeHead(result.status, { ...result.headers, 'content-type': 'application/json; charset=utf-8', 'cache-control': 'no-store' });
|
|
28
|
+
res.end(JSON.stringify(result.body));
|
|
29
|
+
}
|
|
30
|
+
const LOOPBACK = ['127.0.0.1', 'localhost', '[::1]'];
|
|
31
|
+
/**
|
|
32
|
+
* Whether DSH is reached by a name its owner knows: this machine, or one listed in `allowedHosts` (a LAN
|
|
33
|
+
* address or domain behind a reverse proxy). A page of another site that has its name resolve to this machine
|
|
34
|
+
* (DNS rebinding) is same-origin to the browser but still sends its own name here, so it is refused.
|
|
35
|
+
*/
|
|
36
|
+
export function knownHost(host, allowed = []) {
|
|
37
|
+
const name = host?.replace(/:\d+$/, '').toLowerCase();
|
|
38
|
+
return name !== undefined && [...LOOPBACK, ...allowed.map(entry => entry.toLowerCase())].includes(name);
|
|
39
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
import z from '@deepseek-ai/schemastery';
|
|
3
|
+
import type { WorldConfig } from './types.ts';
|
|
4
|
+
export { createWorldRuntime } from './runtime.ts';
|
|
5
|
+
export type { WorldConfig, ConversationRecord, ConversationTurn, ArchiveCursor } from './types.ts';
|
|
6
|
+
export declare const name = "dsh-world";
|
|
7
|
+
export declare const inject: string[];
|
|
8
|
+
/** What `apply` receives: the schema below fills these defaults. */
|
|
9
|
+
export type Config = WorldConfig & Required<Pick<WorldConfig, 'life' | 'fallbackWakeTime' | 'outlets' | 'bridge' | 'toast' | 'allowedHosts' | 'qqBridgeDir' | 'qqBridgePort' | 'qqBridgeAutoStart' | 'qqBridgeBindHomeSession'>>;
|
|
10
|
+
export declare const Config: z<Schemastery.ObjectS<NoInfer<{
|
|
11
|
+
worldId: z<string, string, "defined">;
|
|
12
|
+
agentPreset: z<string, string, "defined">;
|
|
13
|
+
timeZone: z<string, string, "defined">;
|
|
14
|
+
scope: z<"qq" | "world", "qq" | "world", "defined">;
|
|
15
|
+
qqSessionsFile: z<string, string, "defined">;
|
|
16
|
+
qqMirrorFile: z<string, string, "defined">;
|
|
17
|
+
companionName: z<string, string, "plain">;
|
|
18
|
+
partnerName: z<string, string, "plain">;
|
|
19
|
+
archiveScope: z<"home" | "workspace" | "world", "home" | "workspace", "defined">;
|
|
20
|
+
life: z<boolean, boolean, "defined">;
|
|
21
|
+
diaryDir: z<string, string, "plain">;
|
|
22
|
+
fallbackWakeTime: z<string, string, "defined">;
|
|
23
|
+
selfFile: z<string, string, "plain">;
|
|
24
|
+
worldPromptFile: z<string, string, "plain">;
|
|
25
|
+
alarmTemplateFile: z<string, string, "plain">;
|
|
26
|
+
personaFile: z<string, string, "plain">;
|
|
27
|
+
outlets: z<({
|
|
28
|
+
name?: string | null | undefined;
|
|
29
|
+
url?: string | null | undefined;
|
|
30
|
+
urlFile?: string | null | undefined;
|
|
31
|
+
path?: string | null | undefined;
|
|
32
|
+
kinds?: ("reply" | "busy" | "reach")[] | null | undefined;
|
|
33
|
+
} & import("@deepseek-ai/cosmokit").Dict)[], Schemastery.ObjectT<NoInfer<{
|
|
34
|
+
name: z<string, string, "defined">;
|
|
35
|
+
url: z<string, string, "plain">;
|
|
36
|
+
urlFile: z<string, string, "plain">;
|
|
37
|
+
path: z<string, string, "plain">;
|
|
38
|
+
kinds: z<("reply" | "busy" | "reach")[], ("reply" | "busy" | "reach")[], "plain">;
|
|
39
|
+
}>>[], "defined">;
|
|
40
|
+
bridge: z<boolean, boolean, "defined">;
|
|
41
|
+
wechat: z<boolean, boolean, "defined">;
|
|
42
|
+
wechatAdapter: z<Schemastery.ObjectS<NoInfer<{
|
|
43
|
+
python: z<string, string, "plain">;
|
|
44
|
+
config: z<string, string, "plain">;
|
|
45
|
+
}>>, Schemastery.ObjectT<NoInfer<{
|
|
46
|
+
python: z<string, string, "plain">;
|
|
47
|
+
config: z<string, string, "plain">;
|
|
48
|
+
}>>, "plain">;
|
|
49
|
+
toast: z<boolean, boolean, "defined">;
|
|
50
|
+
allowedHosts: z<string[], string[], "defined">;
|
|
51
|
+
qqBridgeDir: z<string, string, "defined">;
|
|
52
|
+
qqBridgePort: z<number, number, "defined">;
|
|
53
|
+
qqBridgeNode: z<string, string, "plain">;
|
|
54
|
+
qqBridgeAutoStart: z<boolean, boolean, "defined">;
|
|
55
|
+
qqBridgeBindHomeSession: z<"" | "owner" | "all" | "none", "" | "owner" | "all" | "none", "defined">;
|
|
56
|
+
}>>, Schemastery.ObjectT<NoInfer<{
|
|
57
|
+
worldId: z<string, string, "defined">;
|
|
58
|
+
agentPreset: z<string, string, "defined">;
|
|
59
|
+
timeZone: z<string, string, "defined">;
|
|
60
|
+
scope: z<"qq" | "world", "qq" | "world", "defined">;
|
|
61
|
+
qqSessionsFile: z<string, string, "defined">;
|
|
62
|
+
qqMirrorFile: z<string, string, "defined">;
|
|
63
|
+
companionName: z<string, string, "plain">;
|
|
64
|
+
partnerName: z<string, string, "plain">;
|
|
65
|
+
archiveScope: z<"home" | "workspace" | "world", "home" | "workspace", "defined">;
|
|
66
|
+
life: z<boolean, boolean, "defined">;
|
|
67
|
+
diaryDir: z<string, string, "plain">;
|
|
68
|
+
fallbackWakeTime: z<string, string, "defined">;
|
|
69
|
+
selfFile: z<string, string, "plain">;
|
|
70
|
+
worldPromptFile: z<string, string, "plain">;
|
|
71
|
+
alarmTemplateFile: z<string, string, "plain">;
|
|
72
|
+
personaFile: z<string, string, "plain">;
|
|
73
|
+
outlets: z<({
|
|
74
|
+
name?: string | null | undefined;
|
|
75
|
+
url?: string | null | undefined;
|
|
76
|
+
urlFile?: string | null | undefined;
|
|
77
|
+
path?: string | null | undefined;
|
|
78
|
+
kinds?: ("reply" | "busy" | "reach")[] | null | undefined;
|
|
79
|
+
} & import("@deepseek-ai/cosmokit").Dict)[], Schemastery.ObjectT<NoInfer<{
|
|
80
|
+
name: z<string, string, "defined">;
|
|
81
|
+
url: z<string, string, "plain">;
|
|
82
|
+
urlFile: z<string, string, "plain">;
|
|
83
|
+
path: z<string, string, "plain">;
|
|
84
|
+
kinds: z<("reply" | "busy" | "reach")[], ("reply" | "busy" | "reach")[], "plain">;
|
|
85
|
+
}>>[], "defined">;
|
|
86
|
+
bridge: z<boolean, boolean, "defined">;
|
|
87
|
+
wechat: z<boolean, boolean, "defined">;
|
|
88
|
+
wechatAdapter: z<Schemastery.ObjectS<NoInfer<{
|
|
89
|
+
python: z<string, string, "plain">;
|
|
90
|
+
config: z<string, string, "plain">;
|
|
91
|
+
}>>, Schemastery.ObjectT<NoInfer<{
|
|
92
|
+
python: z<string, string, "plain">;
|
|
93
|
+
config: z<string, string, "plain">;
|
|
94
|
+
}>>, "plain">;
|
|
95
|
+
toast: z<boolean, boolean, "defined">;
|
|
96
|
+
allowedHosts: z<string[], string[], "defined">;
|
|
97
|
+
qqBridgeDir: z<string, string, "defined">;
|
|
98
|
+
qqBridgePort: z<number, number, "defined">;
|
|
99
|
+
qqBridgeNode: z<string, string, "plain">;
|
|
100
|
+
qqBridgeAutoStart: z<boolean, boolean, "defined">;
|
|
101
|
+
qqBridgeBindHomeSession: z<"" | "owner" | "all" | "none", "" | "owner" | "all" | "none", "defined">;
|
|
102
|
+
}>>, "plain">;
|
|
103
|
+
/**
|
|
104
|
+
* Her world runs only after her partner presses start in the world console, and stops when they press stop:
|
|
105
|
+
* memory block, persona, world prompt, archive and life line come and go together. The switch is kept in
|
|
106
|
+
* `<world>/world.json`, so it outlasts a restart.
|
|
107
|
+
*/
|
|
108
|
+
export declare function apply(ctx: Context, config: Config): Promise<void>;
|