wechat-clawbot 1.2.0 → 1.3.1
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.md +26 -13
- package/README.zh.md +26 -13
- package/assets/icon.svg +7 -0
- package/cordis.patch.yml +4 -0
- package/lib/backlog.d.ts +14 -0
- package/lib/backlog.d.ts.map +1 -1
- package/lib/backlog.js +65 -4
- package/lib/backlog.js.map +1 -1
- package/lib/bridge.d.ts +6 -3
- package/lib/bridge.d.ts.map +1 -1
- package/lib/bridge.js +44 -11
- package/lib/bridge.js.map +1 -1
- package/lib/claude-peer.js +11 -11
- package/lib/claude-peer.js.map +1 -1
- package/lib/client.js +461 -85
- package/lib/codex-rpc.js +1 -1
- package/lib/config.d.ts +30 -7
- package/lib/config.d.ts.map +1 -1
- package/lib/config.js +17 -3
- package/lib/config.js.map +1 -1
- package/lib/idle-compact.d.ts +5 -0
- package/lib/idle-compact.d.ts.map +1 -1
- package/lib/idle-compact.js +10 -8
- package/lib/idle-compact.js.map +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +78 -28
- package/lib/index.js.map +1 -1
- package/lib/localtime.d.ts +4 -3
- package/lib/localtime.d.ts.map +1 -1
- package/lib/localtime.js +7 -6
- package/lib/localtime.js.map +1 -1
- package/lib/mac-alarms.d.ts +168 -0
- package/lib/mac-alarms.d.ts.map +1 -0
- package/lib/mac-alarms.js +612 -0
- package/lib/mac-alarms.js.map +1 -0
- package/lib/mac-calendar.d.ts +126 -11
- package/lib/mac-calendar.d.ts.map +1 -1
- package/lib/mac-calendar.js +418 -99
- package/lib/mac-calendar.js.map +1 -1
- package/lib/mcp-route.d.ts.map +1 -1
- package/lib/mcp-route.js +8 -2
- package/lib/mcp-route.js.map +1 -1
- package/lib/mcp-server.js +1 -1
- package/lib/memory-auto.js +4 -4
- package/lib/memory-auto.js.map +1 -1
- package/lib/models-route.d.ts +1 -1
- package/lib/pending.d.ts +9 -1
- package/lib/pending.d.ts.map +1 -1
- package/lib/pending.js +18 -1
- package/lib/pending.js.map +1 -1
- package/lib/permissions.d.ts +164 -0
- package/lib/permissions.d.ts.map +1 -0
- package/lib/permissions.js +549 -0
- package/lib/permissions.js.map +1 -0
- package/lib/prompt.d.ts.map +1 -1
- package/lib/prompt.js +12 -11
- package/lib/prompt.js.map +1 -1
- package/lib/secretary.d.ts +42 -9
- package/lib/secretary.d.ts.map +1 -1
- package/lib/secretary.js +142 -36
- package/lib/secretary.js.map +1 -1
- package/lib/time-context.d.ts +57 -0
- package/lib/time-context.d.ts.map +1 -0
- package/lib/time-context.js +90 -0
- package/lib/time-context.js.map +1 -0
- package/lib/tool.js +1 -1
- package/lib/typing.d.ts +0 -1
- package/lib/typing.d.ts.map +1 -1
- package/lib/typing.js +7 -1
- package/lib/typing.js.map +1 -1
- package/native/macos-calendar/main.swift +476 -13
- package/package.json +7 -6
- package/wechat-clawbot-INSTALL.md +64 -40
package/lib/prompt.js
CHANGED
|
@@ -129,10 +129,10 @@ function weixinRules(allowEmoji) {
|
|
|
129
129
|
你在微信里是一个真人在打字,不是在写文档、写报告、写讲义。以下每一条都比"信息完整"优先。
|
|
130
130
|
1. 不要 Markdown——微信不渲染,发出去就是一堆符号:不要 "- "/"* " 开头的列表,不要 **加粗**、# 标题、表格、代码块,不要 T₂ 这种上下标字符(直接写 T2)。需要并列时用口语串起来("一般是…,如果…就…"),或者分行写短句,最多三行。
|
|
131
131
|
2. 长度按聊天来:默认 1-3 句。技术问题先用两三句给结论和数量级,不要摊开讲义——他想深入自然会追问。但**短不等于答一半**:他问"A 和 B 差在哪",A 和 B 都得说到;问了三件事就三件都要回。宁可多一句把问题答完整,也不要为了短把一半问题扔掉。只有他明确说"详细讲讲/展开说说/写详细点/我要写进报告"时,该写多长写多长,这时完整比简短重要。
|
|
132
|
-
3. 不要书面语和公文词:不用分号,不用"综上""其次""核心在于""属于…性质""可以说是",也不用"事项""相关内容""已记录""予以""进行确认""如下所示""需要提交的"。用短句加逗号,该断就断。对照一下:说"
|
|
132
|
+
3. 不要书面语和公文词:不用分号,不用"综上""其次""核心在于""属于…性质""可以说是",也不用"事项""相关内容""已记录""予以""进行确认""如下所示""需要提交的"。用短句加逗号,该断就断。对照一下:说"今天没看到要交的东西",不要说"今天没有查到已记录的截止事项";说"明天不下雨,27度左右",不要说"降雨概率约10%,天气以局部多云为主"。
|
|
133
133
|
4. **用户记忆里如果写了他的专业/职业**,就按同行说话:别科普基础定义,直接说差别在哪、数量级多少、实践上怎么区分。记忆里没写就正常解释,别假设他懂或不懂。
|
|
134
|
-
5. 跟着他的说法走:他中英混着讲,你就用他的词(他说
|
|
135
|
-
6. 情绪和闲聊:先接住,再问一句,不要给建议清单。他没问"怎么办"就别教他怎么办——"
|
|
134
|
+
5. 跟着他的说法走:他中英混着讲,你就用他的词(他说 deadline 你就说 deadline,不要翻成"截止日期");他用什么语言你就用什么语言。
|
|
135
|
+
6. 情绪和闲聊:先接住,再问一句,不要给建议清单。他没问"怎么办"就别教他怎么办——"辛苦了,今天忙什么了"比"你应该好好休息、吃点东西、洗个热水澡"像人得多。
|
|
136
136
|
7. 语气词可以有,但别过量:偶尔一个"啊/吧/诶/嘛",一条消息最多一个,不是每条都要有。
|
|
137
137
|
8. 别每条都用"好的"开头,别用"可以,"起手。像回朋友消息那样直接说事。
|
|
138
138
|
|
|
@@ -163,12 +163,12 @@ function weixinRules(allowEmoji) {
|
|
|
163
163
|
用户的要求满足后不要再继续干活。一旦有了答案,停止调用工具、停止发消息。只回答被问的确切问题;省略任何无关的确认、状态、技术细节或后续提议。只有用户要求更多时才继续。
|
|
164
164
|
|
|
165
165
|
规则 F0 — 先分清"聊天"还是"办事"(最先判断,在 F1 之前):
|
|
166
|
-
用户没有问句、也没有祈使句,只是在**分享感受、讲经历、报告状态**("
|
|
166
|
+
用户没有问句、也没有祈使句,只是在**分享感受、讲经历、报告状态**("这部电影不错""今天好累""终于下班了""外面下雨了")——这是聊天,**一个工具都不要调**,直接 send_wechat_text 接住他。
|
|
167
167
|
聊天里如果你想提一个具体事实(歌手是谁、哪年的、哪家店),而你不确定 —— **就别提那个事实**,换一句不需要它的话。绝不要为了"说得准"去搜一圈:他在跟你聊天,不是在向你提问。快 3 秒答一句像人的话,比慢 15 秒答一句百科式的准话要好得多。
|
|
168
168
|
真有必要查的信号很明确:出现了问句("…是什么""在哪""多少钱""会不会")、祈使句("帮我查""发我""提醒我"),或者牵涉他电脑上的东西。没有这些信号就不要查。
|
|
169
169
|
|
|
170
170
|
规则 F1 — 问题 vs 任务(借鉴 Kimi CLI):
|
|
171
|
-
当请求既可以理解为问题也可以理解为任务时,当作任务处理,用工具行动。只要问题牵涉他电脑上的东西(
|
|
171
|
+
当请求既可以理解为问题也可以理解为任务时,当作任务处理,用工具行动。只要问题牵涉他电脑上的东西(文件、文档、照片、日程、提醒、某个目录里有什么),必须先真的去查(glob/grep/read/schedule_list)再回答——不许凭印象说"没有""今天没有要交的东西"。查过再说"没找到"是诚实,没查就说是编的。不需要文件或网络信息的简单问题/问候,用一次 send_wechat_text 调用回答(仍然是工具调用——记住规则 A0:纯文本输出永远不会到达微信)。用用户使用的语言回复。
|
|
172
172
|
|
|
173
173
|
规则 G — 场景专属规则:
|
|
174
174
|
用户只看到你的最终答案,所以永远不要叙述你是如何得出答案的(任何回复中都不出现"我找了 / 我抓取 / 我搜到了 / 我查了 / 我对比了 / 让我看看… / 我先跑… / 我检查了 / 我确认了 / 我找到了 / 我测试了"——报告结果,不报告过程;越少越好)。绝不解释工具、插件、机制或内部步骤。以下场景规则补充每种任务类型的具体行为:
|
|
@@ -176,7 +176,7 @@ function weixinRules(allowEmoji) {
|
|
|
176
176
|
G1 — 歌词请求:用户要歌词时,一律上网搜索并给出完整、核实的歌词——绝不凭记忆编造。直接给出完整歌词(标题 + 歌手 + 词曲署名 + 所有段落/副歌),末尾括号注明来源(如"(来源:xxx)")。不要加任何"我搜了/我核实了"的前缀。
|
|
177
177
|
|
|
178
178
|
G2 — 本地文件/照片:用户让你找或发文件夹里的文件/照片时,直接找到并(如果要求)发送——不叙述查找过程。
|
|
179
|
-
发送任何本轮还没看过的图片之前,必须先看一眼:调用 look_at_image,它会把图片返回给你,确认这确实是用户要的那张、内容和构图没问题,然后才 send_wechat_file。一次调用就够,不要再叠一个视觉工具。(这条针对的是**磁盘上你没看过的图**。如果这张图就是他刚发给你、已经附在消息里的那张,你已经看过了,直接发。)
|
|
179
|
+
发送任何本轮还没看过的图片之前,必须先看一眼:调用 look_at_image,它会把图片返回给你,确认这确实是用户要的那张、内容和构图没问题,然后才 send_wechat_file。一次调用就够,不要再叠一个视觉工具。(这条针对的是**磁盘上你没看过的图**。如果这张图就是他刚发给你、已经附在消息里的那张,你已经看过了,直接发。)发错照片比不发更糟。检查过程完全静默:不要汇报你在看图、看到了什么、检查了几张(规则 C),用户只应该收到最后那张图本身;要说的话最多一行,写进 send_wechat_file 的 caption 参数,不要另发消息。
|
|
180
180
|
|
|
181
181
|
G3 — 其他所有信息(事实、搜索结果、对比、推荐):直接给结果;不叙述研究过程。相关时在末尾用一对括号附上来源。
|
|
182
182
|
|
|
@@ -187,13 +187,14 @@ G5 — 定时提醒(schedule_create / 定时触发):
|
|
|
187
187
|
2. 工具报 \`not_future\`(The scheduled time must be strictly in the future):意思是**你填的日期或钟点已经过去了**,几乎总是因为抄了旧日期。照"当前时刻"那一节重填一次即可。绝对不要把它转述成"现在已经过了这个时间"——真出过一次:22:30 时把提醒填成 8-29 23:00 被拒,然后告诉用户"现在已经过了晚上11点",用户看到的是一句凭空编的话。只有当用户给的钟点确实**早于**那一节的"现在"时,才可以对用户说"这个时间已经过了";晚于"现在"就绝不能这么说,那种情况下 not_future 只说明你的日期填错了。另外,用户明确说了哪一天(如"今天凌晨一点")而那个钟点在那天已经过去时,确认里必须点明一句(如"今天凌晨1点已经过了,我设到明天凌晨1点"),不要默默换成别的日期就当没事——日期写对了但没说,用户以为你听错了。
|
|
188
188
|
3. 工具成功返回的 \`scheduledAt\` 是 **UTC**(带 Z),不是本地时间,**不要照读**。确认消息里的日期时间必须来自你刚才填进 \`at\` 的那两个值,逐字一致;如果用的是 \`after_seconds\`,钟点 = "当前时刻"里的现在 + 那个时长。拿不准就调 \`schedule_list\` 看一眼,别凭感觉写。
|
|
189
189
|
4. 创建后,只回复一条简短确认,仅包含提醒内容和本地触发时间(使用用户本地时区——绝不要报 UTC 或原始时间戳)。确认里必须写出**绝对日期+星期**,如"已设提醒:8月20日(周四)上午10点交报告"。绝不要只说"明天/后天上午10点"——相对词会把算错的日期藏起来,用户看不出问题(曾经把"明天"排到了后天,确认里写"明天"所以完全没被发现)。可以追加一句提醒用户保持 DSH 图形界面运行,如"记得保持服务开着,到点我会提醒你"。不要解释定时工具、机制、会话本地性,或任何替代方案;不要发送第二条消息。
|
|
190
|
-
5. 定时提醒触发并被注入你的会话时:必须调用 send_wechat_text 工具,发送一条只包含提醒内容的短消息(如"提醒:交报告啦")
|
|
190
|
+
5. 定时提醒触发并被注入你的会话时:必须调用 send_wechat_text 工具,发送一条只包含提醒内容的短消息(如"提醒:交报告啦")。没有任何自动转发——不调用工具,用户就永远收不到提醒,所以一定要发送。不要解释这是定时触发的,不要描述机制,不要道歉,不要提供后续提议,不要重复设置细节。例外:提醒内容以「任务:」开头的(冒号全角半角都算),是用户让你到点去做的事(见第 7 条),不是要转给用户的话:照着内容去做(该查就查、该设就设),做完只发内容要求发的结果;内容说没事就不用打扰的,那就一条都不发;要问用户的,问一句就结束这一轮,等回复再接着做。任务回合不用先发确认,也不用规则 A/H 的总结;任务没能做成(工具不可用、出错)时,不管内容怎么说,都要发一句说明。任务里的「今天/明天/第二天」都按原定时间算:电脑睡着时定时消息会晚到,跨了日期的,后面紧跟一条「[定时消息晚到]」写明原定哪天,日子照它算;已经过去的时间不补。
|
|
191
191
|
6. 用户要求列出或取消提醒时:一条短消息报出事实(每个提醒的时间+内容,或"已取消")。不叙述。
|
|
192
|
+
7. 用户要你到点(或每天定时)去**做**一件事、而不只是提醒一声时(比如每晚看第二天的行程排闹钟、每天早上查天气发过去):用 schedule_create 建提醒,内容以「任务:」开头(只是提醒一声的,内容不要这样开头),写清楚做什么、按什么规则、做完发不发消息、发什么——用户说的规则原样写进去,日期写成相对原定时间的(如「原定时间的第二天」),不要写死。确认时照第 4 条写清时间,再用一句话说这个任务做什么。
|
|
192
193
|
|
|
193
|
-
G6 — 看图识别/物品鉴定(
|
|
194
|
+
G6 — 看图识别/物品鉴定(如玩具、周边、动漫角色):
|
|
194
195
|
1. 用户发来物品照片问"这是什么/哪一款"时:图就附在消息里,你直接看。看完如果只是眼熟但不确定,必须上网搜索核实官方名称、系列、发售信息,再下结论。
|
|
195
196
|
2. 回答格式:第一句直接给结论(名称 + 系列 + 官方/联名信息),然后简短补充 1-2 个关键特征和来源。不确定时按规则 I 标注确信度,明确说"可能是…/不确定"。
|
|
196
|
-
3.
|
|
197
|
+
3. 用户问价格时:查用户常用渠道的价格(用户记忆里写了要对比哪些地区就照做),直接给结论,附来源。查不到就说查不到,不要编。
|
|
197
198
|
|
|
198
199
|
G7 — 找图/配图请求(如"帮我找一张官方图"):
|
|
199
200
|
1. 用户要某物(角色、产品、海报)的图片时:先尝试可靠来源(官网、官方新闻稿、产品页、资讯站),优先官方图。
|
|
@@ -204,7 +205,7 @@ G8 — 找不到目标时的处理(文件、信息、商品):
|
|
|
204
205
|
1. 用户要求找的文件/东西不存在或找不到时:诚实告知"没找到",说明大概搜过哪些范围(一句话),然后给出最接近的替代品或下一步建议。不要假装找到,不要编造路径。
|
|
205
206
|
2. 用户说"找不到就算了"时:立即停止,只回一句简短的确认(如"好,不找了")或提供替代方案,不继续搜索。
|
|
206
207
|
|
|
207
|
-
G9 — 敏感文件处理(
|
|
208
|
+
G9 — 敏感文件处理(证件、护照、身份证、签证材料等):
|
|
208
209
|
1. 用户要求发送证件/身份类文件时:发送前先简短确认一次(如"确定要发护照照片吗?"),得到确认后再发送。不要未经确认直接发敏感文件。
|
|
209
210
|
2. 如果文件夹里同时有多个候选文件,列出选项让用户选择(一条消息内),不要猜着发。
|
|
210
211
|
|
|
@@ -242,7 +243,7 @@ G13 — 别的 agent 已经发给用户的消息:
|
|
|
242
243
|
规则 J — 长期记忆(remember_user_info 与记忆注入):
|
|
243
244
|
1. 你有一个关于用户的长期记忆(见上方"用户记忆"部分),每次对话开始都会注入。回答时自然地利用这些记忆(如称呼、偏好、已知背景),但不要主动说"我记得你之前说过…"来表功。
|
|
244
245
|
2. 当用户透露出值得长期记住的新信息(身份、偏好、习惯、重要计划)时,静默调用 remember_user_info 记录,不要向用户提及记忆操作,也不要为此发消息。
|
|
245
|
-
4.
|
|
246
|
+
4. 有歧义的名字一律按他的处境理解,不要按世界通用含义答:他在某个城市生活(具体见用户记忆),所以同名的地名、楼名默认按他身边的那个理解;缩写、人名同理。真拿不准就顺口问一句"你说的是本地那个吧?",别自顾自答另一个。朋友之间就是靠共同背景说话的。
|
|
246
247
|
3. 如果用户明确要求"忘掉/删除某件事",不要争论,可以告知记忆文件在电脑上可手动编辑,或记录相反的修正信息。
|
|
247
248
|
|
|
248
249
|
规则 K — 时间与时区:
|
package/lib/prompt.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt.js","sourceRoot":"","sources":["../src/prompt.ts"],"names":[],"mappings":"AAkBA,OAAO,EACL,cAAc,EACd,SAAS,EACT,aAAa,EACb,YAAY,GACb,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,SAAS,kBAAkB;IACzB,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;IACvB,MAAM,KAAK,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC;IAC7B,MAAM,QAAQ,GAAG,aAAa,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IACvC,MAAM,QAAQ,GAAG,aAAa,CAAC,CAAC,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CAAC,UAAU,CAAC,EAAE,CAAC;QACrE,CAAC;KACF,CAAC,CAAC;IACH,GAAG,CAAC,YAAY,CAAC,OAAO,CAAC;QACvB,IAAI,EAAE,eAAe;QACrB,KAAK,EAAE,EAAE;QACT,IAAI,EAAE,CAAC,OAAO,EAAE,EAAE;YAChB,uEAAuE;YACvE,iEAAiE;YACjE,2BAA2B;YAC3B,MAAM,KAAK,GAAI,OAAsD,CAAC,KAAK,CAAC;YAC5E,IAAI,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,CAAC,KAAK,MAAM,CAAC,SAAS,CAAC;gBAAE,OAAO,EAAE,CAAC;YAChE,MAAM,MAAM,GAAG,cAAc,EAAE,CAAC;YAChC,IAAI,CAAC,MAAM;gBAAE,OAAO,EAAE,CAAC;YACvB,OAAO,GAAG,YAAY,oBAAoB,MAAM,EAAE,CAAC;QACrD,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
|
package/lib/secretary.d.ts
CHANGED
|
@@ -1,12 +1,28 @@
|
|
|
1
1
|
import type { IncomingMessage, ServerResponse } from "node:http";
|
|
2
2
|
import type { Context } from "@deepseek-ai/cordis";
|
|
3
|
-
export declare const SECRETARY_HEADING = "## \
|
|
4
|
-
/**
|
|
3
|
+
export declare const SECRETARY_HEADING = "## \u5168\u5929\u5019\u79D8\u4E66";
|
|
4
|
+
/**
|
|
5
|
+
* The default rules (written with the first owner who used them). How alarms
|
|
6
|
+
* get planned each day is not in here on purpose: the owner sets that up with
|
|
7
|
+
* the bot in chat, as a daily 「任务」 reminder holding their own rules.
|
|
8
|
+
*/
|
|
5
9
|
export declare const SECRETARY_RULES: string;
|
|
10
|
+
/**
|
|
11
|
+
* Earlier defaults, word for word. A section still exactly like one of them
|
|
12
|
+
* was never edited, so it is brought up to date; an edited one is the owner's
|
|
13
|
+
* and is left alone.
|
|
14
|
+
*/
|
|
15
|
+
export declare const EARLIER_RULES: readonly string[];
|
|
6
16
|
export declare function hasSecretaryRules(): boolean;
|
|
7
17
|
/** Put the rules at the end of memory.md: the owner's own last version if there is one. */
|
|
8
18
|
export declare function addSecretaryRules(): "added" | "present";
|
|
9
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* Bring an untouched section up to the current default (EARLIER_RULES). Runs
|
|
21
|
+
* when the rules go in and at start-up while the switch is on; a section the
|
|
22
|
+
* owner edited, even by a character, stays as it is.
|
|
23
|
+
*/
|
|
24
|
+
export declare function upgradeSecretaryRules(): "upgraded" | "kept" | "absent";
|
|
25
|
+
/** Take the section out of memory.md (every copy of it), keeping it for the next time the switch goes on. */
|
|
10
26
|
export declare function removeSecretaryRules(): "removed" | "absent";
|
|
11
27
|
export declare const MEMORY_OPEN_PATH = "/plugins/clawbot/memory/open";
|
|
12
28
|
/** Opens a file with the desktop's own app. */
|
|
@@ -14,13 +30,30 @@ export type Opener = (file: string) => Promise<void>;
|
|
|
14
30
|
/** macOS: the app set for .md files, else the text editor; Linux: xdg-open; Windows: start. */
|
|
15
31
|
export declare const openOnDesktop: Opener;
|
|
16
32
|
/**
|
|
17
|
-
*
|
|
33
|
+
* Whether a request comes from this machine's DSH page: its Host names this
|
|
34
|
+
* machine (see cardRequestAllowed on DNS rebinding) and the browser does not
|
|
35
|
+
* mark it cross-site. Also for the card's GET routes, which answer without a
|
|
36
|
+
* login too.
|
|
37
|
+
*/
|
|
38
|
+
export declare function localRequest(req: IncomingMessage): boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Whether a POST is what the settings card itself sends: JSON, from the DSH
|
|
41
|
+
* page. Plugin routes are not behind DSH's login cookie; a page on another site
|
|
42
|
+
* cannot send that content type without a preflight these routes never answer,
|
|
43
|
+
* and a browser names the page a request came from in Origin.
|
|
18
44
|
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
45
|
+
* The Host must be this machine too. A page whose domain is rebound to
|
|
46
|
+
* 127.0.0.1 (DNS rebinding) sends a same-origin request, so its Origin matches
|
|
47
|
+
* its Host — only the Host still names the attacker's domain. DSH fences its
|
|
48
|
+
* own /api the same way, but not plugin routes. (A reverse proxy in front of
|
|
49
|
+
* DSH has to pass a loopback Host such as 127.0.0.1:3080, or these buttons
|
|
50
|
+
* refuse its requests.)
|
|
51
|
+
*/
|
|
52
|
+
export declare function cardRequestAllowed(req: IncomingMessage): boolean;
|
|
53
|
+
/**
|
|
54
|
+
* POST /plugins/clawbot/memory/open — the settings card's "打开 memory.md". It
|
|
55
|
+
* takes only the card's own request (cardRequestAllowed), and opens a file the
|
|
56
|
+
* bot already reads every turn; nothing is sent back but its path.
|
|
24
57
|
*/
|
|
25
58
|
export declare function handleMemoryOpen(req: IncomingMessage, res: ServerResponse, opener?: Opener): Promise<void>;
|
|
26
59
|
export declare function registerMemoryOpenRoute(ctx: Context): void;
|
package/lib/secretary.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secretary.d.ts","sourceRoot":"","sources":["../src/secretary.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"secretary.d.ts","sourceRoot":"","sources":["../src/secretary.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAGjE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAMnD,eAAO,MAAM,iBAAiB,sCAAa,CAAC;AAsB5C;;;;GAIG;AACH,eAAO,MAAM,eAAe,QAMhB,CAAC;AAEb;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,SAAS,MAAM,EAU1C,CAAC;AA0CF,wBAAgB,iBAAiB,IAAI,OAAO,CAM3C;AAED,2FAA2F;AAC3F,wBAAgB,iBAAiB,IAAI,OAAO,GAAG,SAAS,CAkBvD;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,IAAI,UAAU,GAAG,MAAM,GAAG,QAAQ,CAkBtE;AAED,6GAA6G;AAC7G,wBAAgB,oBAAoB,IAAI,SAAS,GAAG,QAAQ,CAY3D;AAID,eAAO,MAAM,gBAAgB,iCAAiC,CAAC;AAE/D,+CAA+C;AAC/C,MAAM,MAAM,MAAM,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AAErD,+FAA+F;AAC/F,eAAO,MAAM,aAAa,EAAE,MAYxB,CAAC;AAcL;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,eAAe,GAAG,OAAO,CAE1D;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,eAAe,GAAG,OAAO,CAOhE;AAED;;;;GAIG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,eAAe,EAAE,GAAG,EAAE,cAAc,EAAE,MAAM,GAAE,MAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,CAkB/H;AAUD,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAQ1D"}
|
package/lib/secretary.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The
|
|
3
|
-
*
|
|
2
|
+
* The rules of 全天候秘书 (the all-day secretary: the Mac calendar, alarms and
|
|
3
|
+
* these rules behind one switch), until 2026-10-21 called 日程秘书: a short set
|
|
4
|
+
* of planning rules the owner switches on in the settings card.
|
|
4
5
|
*
|
|
5
6
|
* The rules go into the long-term memory file (memory.md), not into this
|
|
6
7
|
* plugin's prompt. Like a persona they belong to one owner, and in the memory
|
|
@@ -20,20 +21,54 @@ import path from "node:path";
|
|
|
20
21
|
import { resolveStateDir } from "./ilink/storage/state-dir.js";
|
|
21
22
|
import { logger } from "./ilink/util/logger.js";
|
|
22
23
|
import { ensureMemoryFile, memoryFilePath } from "./memory.js";
|
|
23
|
-
export const SECRETARY_HEADING = "##
|
|
24
|
-
/**
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
export const SECRETARY_HEADING = "## 全天候秘书";
|
|
25
|
+
/**
|
|
26
|
+
* The owner may retitle it ("## 全天候秘书(我的版本)", "## 日程秘书规则",
|
|
27
|
+
* "## 全天候秘书v2"); it is still the same section. The name it had before the
|
|
28
|
+
* merge counts too, so a memory file written then is not given a second copy.
|
|
29
|
+
* Only notes named after it are the owner's own, not these rules:
|
|
30
|
+
* "## 日程秘书工作日志", "…日志", "…记录", "…笔记".
|
|
31
|
+
*/
|
|
32
|
+
const HEADING = /^##\s*(全天候秘书|日程秘书)(?!工作日志|日志|工作记录|记录|笔记)/u;
|
|
33
|
+
const PLANNING_RULES = [
|
|
29
34
|
"- 用户问接下来做什么,或补充待办、截止时间,就直接排进日历再汇报,不反问;只说了哪天、没说几点的,看那天已有的日程找空档先排上;闲聊不硬排。",
|
|
30
35
|
"- 排之前先查日历,先保住课程、会议、硬截止,不凭记忆说有空。",
|
|
31
36
|
"- 一天一条主线、最多三个关键交付,其余写明延后;用户没明确选的叫“建议主线”。",
|
|
32
37
|
"- 深度工作 60–90 分钟一块,零碎事合并,只排满 70–80%,不默认熬夜;没有外部截止就标“暂排”。",
|
|
33
38
|
"- 只说「提醒我…」、到点叫一下就行的事(吃药、出门、打电话),只设微信提醒,不进日历;要占一段时间的事(写东西、开会、约饭、出差)才排进日历,并照样设微信提醒,和日历自带的提醒重复也没关系。",
|
|
39
|
+
];
|
|
40
|
+
const CLOSING_RULES = [
|
|
34
41
|
"- 插单或进度落后时重算,直接说保留什么、挪走什么、今天能交付什么。",
|
|
35
42
|
"- 回复要短:用几行编号说清今天主要做什么、几点做什么、哪些挪到以后、哪里有冲突;用户只报了一件事的进度,就只说这件事带来的调整,不把整天安排再发一遍。",
|
|
43
|
+
];
|
|
44
|
+
/**
|
|
45
|
+
* The default rules (written with the first owner who used them). How alarms
|
|
46
|
+
* get planned each day is not in here on purpose: the owner sets that up with
|
|
47
|
+
* the bot in chat, as a daily 「任务」 reminder holding their own rules.
|
|
48
|
+
*/
|
|
49
|
+
export const SECRETARY_RULES = [
|
|
50
|
+
SECRETARY_HEADING,
|
|
51
|
+
...PLANNING_RULES,
|
|
52
|
+
"- 要闹钟、叫醒,或某个时刻一定要响的事(赶飞机、考试),用闹钟(alarm_set:紧急提醒,到点像闹钟一样响,不靠微信)。"
|
|
53
|
+
+ "想让你每天自己排闹钟(比如每晚看第二天的行程定好),先和用户说好规则,再建一个每天定时的「任务」提醒(见定时提醒的规则),到点照规则做。",
|
|
54
|
+
...CLOSING_RULES,
|
|
36
55
|
].join("\n");
|
|
56
|
+
/**
|
|
57
|
+
* Earlier defaults, word for word. A section still exactly like one of them
|
|
58
|
+
* was never edited, so it is brought up to date; an edited one is the owner's
|
|
59
|
+
* and is left alone.
|
|
60
|
+
*/
|
|
61
|
+
export const EARLIER_RULES = [
|
|
62
|
+
// 1.2.0, 日程秘书 (before alarms).
|
|
63
|
+
["## 日程秘书", ...PLANNING_RULES, ...CLOSING_RULES].join("\n"),
|
|
64
|
+
// The first alarm version (2026-10-22, never released).
|
|
65
|
+
[
|
|
66
|
+
SECRETARY_HEADING,
|
|
67
|
+
...PLANNING_RULES,
|
|
68
|
+
"- 要闹钟、叫醒,或某个时刻一定要响的事(赶飞机、考试),用闹钟(alarm_set,会在 iPhone 上像闹钟一样响,不靠微信);用户让你每天定起床闹钟,就每晚看第二天的日历定好,再说一声定在几点。",
|
|
69
|
+
...CLOSING_RULES,
|
|
70
|
+
].join("\n"),
|
|
71
|
+
];
|
|
37
72
|
/** Where the section waits while the switch is off. */
|
|
38
73
|
function savedCopyPath() {
|
|
39
74
|
return path.join(resolveStateDir(), "secretary-rules.md");
|
|
@@ -60,19 +95,23 @@ function writeMemory(text) {
|
|
|
60
95
|
fs.writeFileSync(tmp, text, "utf-8");
|
|
61
96
|
fs.renameSync(tmp, p);
|
|
62
97
|
}
|
|
63
|
-
/**
|
|
64
|
-
function
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
end
|
|
71
|
-
|
|
98
|
+
/** Every such section's [start, end) line range: its heading up to the next heading. */
|
|
99
|
+
function sectionRanges(lines) {
|
|
100
|
+
const ranges = [];
|
|
101
|
+
for (let start = 0; start < lines.length; start += 1) {
|
|
102
|
+
if (!HEADING.test(lines[start].trim()))
|
|
103
|
+
continue;
|
|
104
|
+
let end = start + 1;
|
|
105
|
+
while (end < lines.length && !/^#{1,2} /.test(lines[end]))
|
|
106
|
+
end += 1;
|
|
107
|
+
ranges.push([start, end]);
|
|
108
|
+
start = end - 1;
|
|
109
|
+
}
|
|
110
|
+
return ranges;
|
|
72
111
|
}
|
|
73
112
|
export function hasSecretaryRules() {
|
|
74
113
|
try {
|
|
75
|
-
return
|
|
114
|
+
return sectionRanges(readMemory().split("\n")).length > 0;
|
|
76
115
|
}
|
|
77
116
|
catch {
|
|
78
117
|
return false;
|
|
@@ -82,8 +121,10 @@ export function hasSecretaryRules() {
|
|
|
82
121
|
export function addSecretaryRules() {
|
|
83
122
|
ensureMemoryFile();
|
|
84
123
|
const text = readMemory();
|
|
85
|
-
if (
|
|
124
|
+
if (sectionRanges(text.split("\n")).length > 0) {
|
|
125
|
+
upgradeSecretaryRules();
|
|
86
126
|
return "present";
|
|
127
|
+
}
|
|
87
128
|
let block = SECRETARY_RULES;
|
|
88
129
|
try {
|
|
89
130
|
const saved = fs.readFileSync(savedCopyPath(), "utf-8").trim();
|
|
@@ -95,18 +136,47 @@ export function addSecretaryRules() {
|
|
|
95
136
|
}
|
|
96
137
|
writeMemory(`${text.replace(/\s*$/, "")}\n\n${block}\n`);
|
|
97
138
|
logger.info("secretary: scheduling rules added to memory.md");
|
|
139
|
+
upgradeSecretaryRules();
|
|
98
140
|
return "added";
|
|
99
141
|
}
|
|
100
|
-
/**
|
|
142
|
+
/**
|
|
143
|
+
* Bring an untouched section up to the current default (EARLIER_RULES). Runs
|
|
144
|
+
* when the rules go in and at start-up while the switch is on; a section the
|
|
145
|
+
* owner edited, even by a character, stays as it is.
|
|
146
|
+
*/
|
|
147
|
+
export function upgradeSecretaryRules() {
|
|
148
|
+
const lines = readMemory().split("\n");
|
|
149
|
+
const ranges = sectionRanges(lines);
|
|
150
|
+
if (ranges.length === 0)
|
|
151
|
+
return "absent";
|
|
152
|
+
const earlier = new Set(EARLIER_RULES.map((rules) => rules.trim()));
|
|
153
|
+
let changed = false;
|
|
154
|
+
// From the last one back, so the earlier ranges stay where they are.
|
|
155
|
+
for (const [start, end] of [...ranges].reverse()) {
|
|
156
|
+
const section = lines.slice(start, end).join("\n").trim();
|
|
157
|
+
if (!earlier.has(section))
|
|
158
|
+
continue;
|
|
159
|
+
const trailing = lines.slice(start, end).length - section.split("\n").length;
|
|
160
|
+
lines.splice(start, end - start, ...SECRETARY_RULES.split("\n"), ...Array(trailing).fill(""));
|
|
161
|
+
changed = true;
|
|
162
|
+
}
|
|
163
|
+
if (!changed)
|
|
164
|
+
return "kept";
|
|
165
|
+
writeMemory(lines.join("\n"));
|
|
166
|
+
logger.info("secretary: rules in memory.md brought up to the current default (they were never edited)");
|
|
167
|
+
return "upgraded";
|
|
168
|
+
}
|
|
169
|
+
/** Take the section out of memory.md (every copy of it), keeping it for the next time the switch goes on. */
|
|
101
170
|
export function removeSecretaryRules() {
|
|
102
171
|
const lines = readMemory().split("\n");
|
|
103
|
-
const
|
|
104
|
-
if (
|
|
172
|
+
const ranges = sectionRanges(lines);
|
|
173
|
+
if (ranges.length === 0)
|
|
105
174
|
return "absent";
|
|
106
|
-
const [start, end]
|
|
175
|
+
const kept = ranges.map(([start, end]) => lines.slice(start, end).join("\n").trim());
|
|
107
176
|
fs.mkdirSync(path.dirname(savedCopyPath()), { recursive: true });
|
|
108
|
-
fs.writeFileSync(savedCopyPath(), `${
|
|
109
|
-
const
|
|
177
|
+
fs.writeFileSync(savedCopyPath(), `${kept.join("\n\n")}\n`, { mode: 0o600 });
|
|
178
|
+
const inside = new Set(ranges.flatMap(([start, end]) => Array.from({ length: end - start }, (_, i) => start + i)));
|
|
179
|
+
const rest = lines.filter((_, i) => !inside.has(i)).join("\n").replace(/\n{3,}/g, "\n\n");
|
|
110
180
|
writeMemory(`${rest.replace(/\s*$/, "")}\n`);
|
|
111
181
|
logger.info("secretary: scheduling rules moved out of memory.md (kept for the next time)");
|
|
112
182
|
return "removed";
|
|
@@ -132,14 +202,54 @@ export const openOnDesktop = (file) => new Promise((resolve, reject) => {
|
|
|
132
202
|
else
|
|
133
203
|
run("xdg-open", [file]);
|
|
134
204
|
});
|
|
205
|
+
/** Whether a Host header names this machine: 127.x, localhost, [::1] — the same fence DSH keeps around /api. */
|
|
206
|
+
function loopbackHost(host) {
|
|
207
|
+
if (host === undefined)
|
|
208
|
+
return false;
|
|
209
|
+
let hostname;
|
|
210
|
+
try {
|
|
211
|
+
hostname = new URL(`http://${host}`).hostname;
|
|
212
|
+
}
|
|
213
|
+
catch {
|
|
214
|
+
return false;
|
|
215
|
+
}
|
|
216
|
+
return hostname === "localhost" || hostname === "[::1]" || /^127(?:\.\d{1,3}){3}$/.test(hostname);
|
|
217
|
+
}
|
|
135
218
|
/**
|
|
136
|
-
*
|
|
219
|
+
* Whether a request comes from this machine's DSH page: its Host names this
|
|
220
|
+
* machine (see cardRequestAllowed on DNS rebinding) and the browser does not
|
|
221
|
+
* mark it cross-site. Also for the card's GET routes, which answer without a
|
|
222
|
+
* login too.
|
|
223
|
+
*/
|
|
224
|
+
export function localRequest(req) {
|
|
225
|
+
return loopbackHost(req.headers.host) && req.headers["sec-fetch-site"] !== "cross-site";
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Whether a POST is what the settings card itself sends: JSON, from the DSH
|
|
229
|
+
* page. Plugin routes are not behind DSH's login cookie; a page on another site
|
|
230
|
+
* cannot send that content type without a preflight these routes never answer,
|
|
231
|
+
* and a browser names the page a request came from in Origin.
|
|
137
232
|
*
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
*
|
|
142
|
-
*
|
|
233
|
+
* The Host must be this machine too. A page whose domain is rebound to
|
|
234
|
+
* 127.0.0.1 (DNS rebinding) sends a same-origin request, so its Origin matches
|
|
235
|
+
* its Host — only the Host still names the attacker's domain. DSH fences its
|
|
236
|
+
* own /api the same way, but not plugin routes. (A reverse proxy in front of
|
|
237
|
+
* DSH has to pass a loopback Host such as 127.0.0.1:3080, or these buttons
|
|
238
|
+
* refuse its requests.)
|
|
239
|
+
*/
|
|
240
|
+
export function cardRequestAllowed(req) {
|
|
241
|
+
const type = String(req.headers["content-type"] ?? "");
|
|
242
|
+
const origin = req.headers.origin;
|
|
243
|
+
const host = req.headers.host;
|
|
244
|
+
if (!localRequest(req))
|
|
245
|
+
return false;
|
|
246
|
+
const sameSite = origin === undefined || origin === `http://${host}` || origin === `https://${host}`;
|
|
247
|
+
return type.startsWith("application/json") && sameSite;
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* POST /plugins/clawbot/memory/open — the settings card's "打开 memory.md". It
|
|
251
|
+
* takes only the card's own request (cardRequestAllowed), and opens a file the
|
|
252
|
+
* bot already reads every turn; nothing is sent back but its path.
|
|
143
253
|
*/
|
|
144
254
|
export async function handleMemoryOpen(req, res, opener = openOnDesktop) {
|
|
145
255
|
const reply = (status, body) => {
|
|
@@ -148,11 +258,7 @@ export async function handleMemoryOpen(req, res, opener = openOnDesktop) {
|
|
|
148
258
|
};
|
|
149
259
|
if ((req.method ?? "GET") !== "POST")
|
|
150
260
|
return reply(405, { ok: false, message: "use POST" });
|
|
151
|
-
|
|
152
|
-
const origin = req.headers.origin;
|
|
153
|
-
const host = req.headers.host;
|
|
154
|
-
const sameSite = origin === undefined || (host !== undefined && (origin === `http://${host}` || origin === `https://${host}`));
|
|
155
|
-
if (!type.startsWith("application/json") || !sameSite) {
|
|
261
|
+
if (!cardRequestAllowed(req)) {
|
|
156
262
|
return reply(403, { ok: false, message: "只接受设置卡片发来的请求" });
|
|
157
263
|
}
|
|
158
264
|
ensureMemoryFile();
|
package/lib/secretary.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secretary.js","sourceRoot":"","sources":["../src/secretary.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"secretary.js","sourceRoot":"","sources":["../src/secretary.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,MAAM,SAAS,CAAC;AAEzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAI7B,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE/D,MAAM,CAAC,MAAM,iBAAiB,GAAG,UAAU,CAAC;AAC5C;;;;;;GAMG;AACH,MAAM,OAAO,GAAG,2CAA2C,CAAC;AAE5D,MAAM,cAAc,GAAG;IACrB,yEAAyE;IACzE,iCAAiC;IACjC,0CAA0C;IAC1C,wDAAwD;IACxD,kGAAkG;CACnG,CAAC;AACF,MAAM,aAAa,GAAG;IACpB,oCAAoC;IACpC,8EAA8E;CAC/E,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,iBAAiB;IACjB,GAAG,cAAc;IACjB,iEAAiE;UAC7D,sEAAsE;IAC1E,GAAG,aAAa;CACjB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAsB;IAC9C,+BAA+B;IAC/B,CAAC,SAAS,EAAE,GAAG,cAAc,EAAE,GAAG,aAAa,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;IAC3D,wDAAwD;IACxD;QACE,iBAAiB;QACjB,GAAG,cAAc;QACjB,uGAAuG;QACvG,GAAG,aAAa;KACjB,CAAC,IAAI,CAAC,IA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AC,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE;QACnC,MAAM,MAAM,GAAI,MAAkD,CAAC,SAAS,CAAC;QAC7E,MAAM,CAAC,MAAM,CACX,GAAG,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,OAAO,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,gBAAgB,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,EACnH,4BAA4B,CAC7B,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Keep the host's clock readings out of the WeChat session (DSH 0.2.1+).
|
|
3
|
+
*
|
|
4
|
+
* DSH 0.2.1 put `dsh-time-context` into the standard agent preset, which this
|
|
5
|
+
* plugin mounts for the WeChat agent. At most every ten minutes it appends a
|
|
6
|
+
* user-role reading: the current time, the browser time zone of the request,
|
|
7
|
+
* and the time since the last message. A WeChat message has no browser time
|
|
8
|
+
* zone, so the reading always says "Browser time zone for this request:
|
|
9
|
+
* unavailable. Ask the user to clarify otherwise-unqualified dates and times."
|
|
10
|
+
* The bot would start asking which zone "明天下午三点" means — right where it
|
|
11
|
+
* sets reminders and calendar events. The WeChat session already has its
|
|
12
|
+
* clock: every inbound message carries [微信消息 MM-DD HH:mm], and the prompt
|
|
13
|
+
* has today's date. Web sessions keep the readings.
|
|
14
|
+
*
|
|
15
|
+
* The reading is added by a `prepend` pre-step listener that the preset mounts
|
|
16
|
+
* in the agent's scope. Listeners run outermost-first and `prepend` puts a
|
|
17
|
+
* listener at the front, so the one registered last is outermost: a filter
|
|
18
|
+
* registered when this plugin starts would run inside the clock and never see
|
|
19
|
+
* the reading. This one is registered on the WeChat agent's scope after its
|
|
20
|
+
* preset is mounted (bridge.ts ensureTools), which puts it outside.
|
|
21
|
+
*/
|
|
22
|
+
import type { Context } from "@deepseek-ai/cordis";
|
|
23
|
+
/** The source kind dsh-time-context gives its readings. */
|
|
24
|
+
export declare const TIME_CONTEXT_KIND = "time-context";
|
|
25
|
+
type Decision = {
|
|
26
|
+
kind?: unknown;
|
|
27
|
+
messages?: unknown;
|
|
28
|
+
};
|
|
29
|
+
export declare function isClockReading(message: unknown): boolean;
|
|
30
|
+
/** One pre-step decision without clock readings, and how many it had. */
|
|
31
|
+
export declare function stripClockReadings(decision: Decision): {
|
|
32
|
+
decision: Decision;
|
|
33
|
+
dropped: number;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Register the filter on the WeChat agent's scope; call it after the agent's
|
|
37
|
+
* preset is mounted. Returns the listener's disposer (or whatever the host
|
|
38
|
+
* returns). Best effort: any surprise leaves the host's decision as it was.
|
|
39
|
+
*/
|
|
40
|
+
export declare function registerClockReadingFilter(agentCtx: Context, isWechat: (agentId: string) => boolean): unknown;
|
|
41
|
+
/**
|
|
42
|
+
* One pre-step decision with a line after each scheduled message that came on
|
|
43
|
+
* a later day than it was due (backlog.ts lateScheduleNote). In the same step,
|
|
44
|
+
* so the model has the dates before its first call; `make` builds the message.
|
|
45
|
+
*/
|
|
46
|
+
export declare function withLateScheduleNotes(decision: Decision, make: (text: string) => unknown, now?: Date): {
|
|
47
|
+
decision: Decision;
|
|
48
|
+
added: number;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Register the late-delivery line on the WeChat agent's scope (next to the clock
|
|
52
|
+
* filter). Returns the listener's disposer. Best effort: any surprise leaves the
|
|
53
|
+
* host's decision as it was.
|
|
54
|
+
*/
|
|
55
|
+
export declare function registerLateScheduleNotes(agentCtx: Context, isWechat: (agentId: string) => boolean, make: (text: string) => unknown): unknown;
|
|
56
|
+
export {};
|
|
57
|
+
//# sourceMappingURL=time-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"time-context.d.ts","sourceRoot":"","sources":["../src/time-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAInD,2DAA2D;AAC3D,eAAO,MAAM,iBAAiB,iBAAiB,CAAC;AAGhD,KAAK,QAAQ,GAAG;IAAE,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAGvD,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAExD;AAED,yEAAyE;AACzE,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,GAAG;IAAE,QAAQ,EAAE,QAAQ,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAK9F;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,GAAG,OAAO,CAuB7G;AAID;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,EAAE,GAAG,GAAE,IAAiB,GAAG;IAAE,QAAQ,EAAE,QAAQ,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAcxJ;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,EAAE,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,GAAG,OAAO,CAmB7I"}
|