dsh-dot-life 0.13.0 → 0.13.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/package.json +1 -1
- package/src/dot/core.js +5 -2
- package/src/dot/panel.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-dot-life",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.1",
|
|
4
4
|
"description": "dot — a character who lives on her own phone, for DeepSeek Harness (dsh): an Android phone the plugin installs and runs, her own QQ, memory and a diary from real events, a life between conversations (幕间, after HDS-Interlude), an optional microVM computer with approval gates. One plugin, six components.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "AGPL-3.0-only",
|
package/src/dot/core.js
CHANGED
|
@@ -35,7 +35,7 @@ export const PHONE_NOTIFICATION_SOURCE = Object.freeze({ kind: 'dsh-dot', form:
|
|
|
35
35
|
* treats them as direct human input — which is what lets a QQ message start a long task (goal).
|
|
36
36
|
* Nobody else's messages get this.
|
|
37
37
|
*/
|
|
38
|
-
export const ownerSource = () => ({ kind: 'user', rpcId: `qq-${Math.random().toString(36).slice(2)}${Date.now().toString(36)}` });
|
|
38
|
+
export const ownerSource = () => ({ kind: 'user', rpcId: `qq-dot-${Math.random().toString(36).slice(2)}${Date.now().toString(36)}` });
|
|
39
39
|
/** Source of the periodic "pick up your phone" turn; not pushed to IM either. */
|
|
40
40
|
export const PHONE_CHECK_SOURCE = Object.freeze({ kind: 'dsh-dot', form: 'phone-check' });
|
|
41
41
|
/** The periodic turn: she picks up her phone the way people do between things. */
|
|
@@ -131,7 +131,10 @@ export function errandNote(origin, text) {
|
|
|
131
131
|
const dshHome = () => process.env.DSH_HOME || join(homedir(), '.dsh');
|
|
132
132
|
/** dsh-im tags messages it relays with an rpcId of `<channel>-<uuid>`; the desktop UI does not. */
|
|
133
133
|
export const IM_RPC = /^(weixin|wechat|qq|feishu|lark|dingtalk|wecom|wework|telegram|discord|slack|whatsapp|email|office)-/i;
|
|
134
|
-
|
|
134
|
+
// "qq-dot-…" is our own tag (ownerSource): his QQ words relayed by dot, not a dsh-im bot session —
|
|
135
|
+
// counting those made her conversation an "IM bot session", which the memory handoff leaves alone
|
|
136
|
+
// (11-03: 456k tokens, no handoff since 10-29).
|
|
137
|
+
export const isImMessage = (m) => { const r = String(m?.source?.rpcId ?? ''); return IM_RPC.test(r) && !r.startsWith('qq-dot-'); };
|
|
135
138
|
const inside = (root, p) => { const r = relative(root, p); return r === '' || (!r.startsWith('..') && !isAbsolute(r)); };
|
|
136
139
|
/** 'HH:MM-HH:MM' (may wrap midnight) → is `date` inside it? Empty spec = always. */
|
|
137
140
|
export function inHours(spec, date = new Date()) {
|
package/src/dot/panel.js
CHANGED
|
@@ -106,7 +106,7 @@ const at=(ms)=>ms?new Date(ms).toLocaleString('zh-CN',{month:'numeric',day:'nume
|
|
|
106
106
|
const badge=(cls,label,text)=>'<span class="badge '+cls+'"><i class="dotc"></i>'+esc(label)+(text?' <span class="mute">'+esc(text)+'</span>':'')+'</span>';
|
|
107
107
|
const tile=(n,label)=>'<div class="tile"><b>'+esc(n)+'</b><span>'+esc(label)+'</span></div>';
|
|
108
108
|
const bar=(v,max)=>'<div class="bar"><i style="width:'+Math.min(100,Math.round(100*(v||0)/(max||1)))+'%"></i></div>';
|
|
109
|
-
const ZH
|
|
109
|
+
const ZH=true; // the rest of this page is Chinese; Electron's navigator.language said en on a Chinese Mac
|
|
110
110
|
const T=ZH?{title:(n)=>'最近 '+n+' 场',none:'还没有记录(她被叫醒、幕间、玩过之后这里会出现)',run:'进行中',done:'完成',fail:'出错',quiet:'没出声',tools:'工具',model:'模型',times:' 次',tin:'token 入',tout:'出',
|
|
111
111
|
src:{owner:'你',qq:'QQ',phone:'手机',check:'拿手机',interlude:'幕间',schedule:'定时',play:'玩'},
|
|
112
112
|
phase:{advance:'推进','follow-up':'跟进',intent:'打算到点',seed:'开场',diary:'日记'},
|