@lemoncat7/dsh-partner 2.24.0-rc.9 → 2.25.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/README.md +2 -2
- package/docs/releases/2.24.0-rc.10.md +8 -0
- package/docs/releases/2.24.0-rc.11.md +10 -0
- package/docs/releases/2.25.0-rc.1.md +12 -0
- package/docs/releases/2.25.0-rc.11.md +5 -0
- package/docs/releases/2.25.0-rc.2.md +10 -0
- package/docs/releases/2.25.0-rc.3.md +11 -0
- package/docs/releases/2.25.0-rc.4.md +3 -0
- package/docs/releases/2.25.0-rc.5.md +3 -0
- package/docs/releases/2.25.0.md +32 -0
- package/lib/agent-runtime.d.ts +2 -1
- package/lib/agent-runtime.d.ts.map +1 -1
- package/lib/agent-runtime.js +38 -14
- package/lib/agent-runtime.js.map +1 -1
- package/lib/api/features/tts-api.d.ts +4 -0
- package/lib/api/features/tts-api.d.ts.map +1 -0
- package/lib/api/features/tts-api.js +49 -0
- package/lib/api/features/tts-api.js.map +1 -0
- package/lib/api.d.ts +2 -0
- package/lib/api.d.ts.map +1 -1
- package/lib/api.js +11 -5
- package/lib/api.js.map +1 -1
- package/lib/channels/activity-defaults.d.ts.map +1 -1
- package/lib/channels/activity-defaults.js +5 -0
- package/lib/channels/activity-defaults.js.map +1 -1
- package/lib/channels/direct/transport.d.ts +1 -1
- package/lib/channels/direct/transport.d.ts.map +1 -1
- package/lib/channels/manager.d.ts +2 -0
- package/lib/channels/manager.d.ts.map +1 -1
- package/lib/channels/manager.js +16 -2
- package/lib/channels/manager.js.map +1 -1
- package/lib/channels/outbound-media.d.ts +1 -1
- package/lib/channels/outbound-media.d.ts.map +1 -1
- package/lib/channels/outbound-media.js +3 -2
- package/lib/channels/outbound-media.js.map +1 -1
- package/lib/channels/qq/authority.js +1 -1
- package/lib/channels/qq/authority.js.map +1 -1
- package/lib/channels/qq/reply-tool.d.ts +1 -1
- package/lib/channels/qq/reply-tool.d.ts.map +1 -1
- package/lib/channels/qq/reply-tool.js +7 -2
- package/lib/channels/qq/reply-tool.js.map +1 -1
- package/lib/channels/weixin/api.d.ts +1 -1
- package/lib/channels/weixin/api.d.ts.map +1 -1
- package/lib/channels/weixin/api.js +7 -1
- package/lib/channels/weixin/api.js.map +1 -1
- package/lib/channels/weixin/connect.d.ts +2 -0
- package/lib/channels/weixin/connect.d.ts.map +1 -1
- package/lib/character/activity-journal.d.ts +3 -1
- package/lib/character/activity-journal.d.ts.map +1 -1
- package/lib/character/activity-journal.js +43 -7
- package/lib/character/activity-journal.js.map +1 -1
- package/lib/character/activity-summary.d.ts +23 -0
- package/lib/character/activity-summary.d.ts.map +1 -0
- package/lib/character/activity-summary.js +23 -0
- package/lib/character/activity-summary.js.map +1 -0
- package/lib/character/conversation-behavior.d.ts +1 -0
- package/lib/character/conversation-behavior.d.ts.map +1 -1
- package/lib/character/conversation-behavior.js +7 -4
- package/lib/character/conversation-behavior.js.map +1 -1
- package/lib/character/idle-contact.d.ts +7 -0
- package/lib/character/idle-contact.d.ts.map +1 -1
- package/lib/character/idle-contact.js +57 -8
- package/lib/character/idle-contact.js.map +1 -1
- package/lib/chat/live-speech.js +1 -1
- package/lib/chat/live-speech.js.map +1 -1
- package/lib/chat/persona-delivery.d.ts +2 -0
- package/lib/chat/persona-delivery.d.ts.map +1 -1
- package/lib/chat/persona-delivery.js +2 -0
- package/lib/chat/persona-delivery.js.map +1 -1
- package/lib/chat/protocol.d.ts +1 -1
- package/lib/chat/protocol.js +1 -1
- package/lib/chat/tools.d.ts.map +1 -1
- package/lib/chat/tools.js +6 -3
- package/lib/chat/tools.js.map +1 -1
- package/lib/client-api.d.ts +7 -0
- package/lib/client-api.d.ts.map +1 -1
- package/lib/client-api.js.map +1 -1
- package/lib/client.activities.js +3 -0
- package/lib/client.js +1126 -1114
- package/lib/client.js.map +4 -4
- package/lib/client.tts.js +7 -0
- package/lib/collaboration/tool-discovery.d.ts +1 -1
- package/lib/collaboration/tool-discovery.d.ts.map +1 -1
- package/lib/collaboration/tool-discovery.js +10 -5
- package/lib/collaboration/tool-discovery.js.map +1 -1
- package/lib/companions/management.d.ts +4 -4
- package/lib/concern-execution-receipt.d.ts +2 -1
- package/lib/concern-execution-receipt.d.ts.map +1 -1
- package/lib/concern-execution-receipt.js +15 -13
- package/lib/concern-execution-receipt.js.map +1 -1
- package/lib/concern-execution.d.ts +3 -1
- package/lib/concern-execution.d.ts.map +1 -1
- package/lib/concern-execution.js +20 -1
- package/lib/concern-execution.js.map +1 -1
- package/lib/concern-recording.d.ts +1 -1
- package/lib/concern-recording.d.ts.map +1 -1
- package/lib/concern-recording.js +14 -5
- package/lib/concern-recording.js.map +1 -1
- package/lib/concern-store.d.ts.map +1 -1
- package/lib/concern-store.js +3 -1
- package/lib/concern-store.js.map +1 -1
- package/lib/domain.d.ts +3 -0
- package/lib/domain.d.ts.map +1 -1
- package/lib/domain.js.map +1 -1
- package/lib/execution/task-preamble.js +1 -1
- package/lib/execution/task-preamble.js.map +1 -1
- package/lib/execution/work-tool.js +1 -1
- package/lib/execution/work-tool.js.map +1 -1
- package/lib/heartbeat.js +1 -1
- package/lib/heartbeat.js.map +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +8 -3
- package/lib/index.js.map +1 -1
- package/lib/observation-loop.d.ts.map +1 -1
- package/lib/observation-loop.js +7 -3
- package/lib/observation-loop.js.map +1 -1
- package/lib/store.d.ts.map +1 -1
- package/lib/store.js +3 -1
- package/lib/store.js.map +1 -1
- package/lib/ui/channels-panel.d.ts.map +1 -1
- package/lib/ui/channels-panel.js +9 -3
- package/lib/ui/channels-panel.js.map +1 -1
- package/lib/ui/identity-editor.js +1 -1
- package/lib/ui/identity-editor.js.map +1 -1
- package/lib/ui/idle-contact-editor.js +1 -1
- package/lib/ui/idle-contact-editor.js.map +1 -1
- package/lib/ui/memory/concern-board.js +1 -1
- package/lib/ui/memory/concern-board.js.map +1 -1
- package/lib/ui/memory/concern-execution-status.d.ts.map +1 -1
- package/lib/ui/memory/concern-execution-status.js +2 -2
- package/lib/ui/memory/concern-execution-status.js.map +1 -1
- package/lib/ui/qq-channel-settings.js +3 -3
- package/lib/ui/qq-channel-settings.js.map +1 -1
- package/lib/ui/thoughts-panel-loader.d.ts +4 -0
- package/lib/ui/thoughts-panel-loader.d.ts.map +1 -0
- package/lib/ui/thoughts-panel-loader.js +23 -0
- package/lib/ui/thoughts-panel-loader.js.map +1 -0
- package/lib/ui/thoughts-panel.d.ts.map +1 -1
- package/lib/ui/thoughts-panel.js +7 -5
- package/lib/ui/thoughts-panel.js.map +1 -1
- package/lib/ui/tts-settings-loader.d.ts +4 -0
- package/lib/ui/tts-settings-loader.d.ts.map +1 -0
- package/lib/ui/tts-settings-loader.js +23 -0
- package/lib/ui/tts-settings-loader.js.map +1 -0
- package/lib/ui/tts-settings.d.ts +11 -0
- package/lib/ui/tts-settings.d.ts.map +1 -0
- package/lib/ui/tts-settings.js +63 -0
- package/lib/ui/tts-settings.js.map +1 -0
- package/lib/voice/credentials.d.ts +9 -0
- package/lib/voice/credentials.d.ts.map +1 -0
- package/lib/voice/credentials.js +12 -0
- package/lib/voice/credentials.js.map +1 -0
- package/lib/voice/domain.d.ts +42 -0
- package/lib/voice/domain.d.ts.map +1 -0
- package/lib/voice/domain.js +53 -0
- package/lib/voice/domain.js.map +1 -0
- package/lib/voice/service.d.ts +63 -0
- package/lib/voice/service.d.ts.map +1 -0
- package/lib/voice/service.js +211 -0
- package/lib/voice/service.js.map +1 -0
- package/lib/voice/synthesize.d.ts +12 -0
- package/lib/voice/synthesize.d.ts.map +1 -0
- package/lib/voice/synthesize.js +97 -0
- package/lib/voice/synthesize.js.map +1 -0
- package/lib/voice/tool.d.ts +7 -0
- package/lib/voice/tool.d.ts.map +1 -0
- package/lib/voice/tool.js +73 -0
- package/lib/voice/tool.js.map +1 -0
- package/lib/voice/validation.d.ts +3 -0
- package/lib/voice/validation.d.ts.map +1 -0
- package/lib/voice/validation.js +31 -0
- package/lib/voice/validation.js.map +1 -0
- package/package.json +10 -1
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
window.__ModuleLoader__.load({ id: "@lemoncat7/dsh-partner", chunk: 'client.activities.js', factory: (require) => { var module = { exports: {} }; var exports = module.exports;
|
|
2
|
+
"use strict";var S=Object.defineProperty;var N=Object.getOwnPropertyDescriptor;var M=Object.getOwnPropertyNames;var q=Object.prototype.hasOwnProperty;var D=(t,r)=>{for(var a in r)S(t,a,{get:r[a],enumerable:!0})},J=(t,r,a,s)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of M(r))!q.call(t,o)&&o!==a&&S(t,o,{get:()=>r[o],enumerable:!(s=N(r,o))||s.enumerable});return t};var H=t=>J(S({},"__esModule",{value:!0}),t);var O={};D(O,{ThoughtsPanel:()=>B});module.exports=H(O);var $=[{name:"\u7F51\u9875\u4E0E B \u7AD9",matches:t=>/^(web_|partner_bilibili)/.test(t)},{name:"\u4F5C\u54C1\u521B\u4F5C",matches:t=>/^(write|edit|generate_image|bash)(:|$)/.test(t)},{name:"\u8868\u60C5\u6536\u85CF",matches:t=>t.startsWith("partner_stickers")},{name:"\u804A\u5929\u4E0E\u5206\u4EAB",matches:t=>/^(partner_chat_|partner_voice_reply|partner_send_attachment)/.test(t)},{name:"QQ \u4E92\u52A8",matches:t=>t.startsWith("partner_qq")}];function I(t){return{total:t.length,confirmed:t.filter(r=>r.sharing==="confirmed").length,pending:t.filter(r=>r.sharing==="pending").length,unknown:t.filter(r=>r.sharing===void 0).length,failed:t.filter(r=>r.tools.some(a=>!a.ok)).length,categories:$.map(r=>({name:r.name,count:t.filter(a=>a.tools.some(s=>r.matches(s.name))).length})).filter(r=>r.count)}}function V(t){return t.sharing==="confirmed"?"\u5DF2\u786E\u8BA4\u53D1\u9001":t.sharing==="pending"?"\u53D1\u9001\u5F85\u786E\u8BA4":t.sharing==="none"?"\u672A\u53D1\u73B0\u53D1\u9001\u8BB0\u5F55":"\u5386\u53F2\u53D1\u9001\u72B6\u6001\u672A\u6838\u5B9E"}var u=require("react");function T(t,r=3e4){let a,s=0,o=0,l,b=()=>Date.now()<s?a:void 0,w=()=>{o++,a=void 0,s=0,l=void 0},h=()=>{if(l)return l;let y=o,g=t().then(c=>y!==o?h():(a=c,s=Date.now()+r,c)).finally(()=>{l===g&&(l=void 0)});return l=g,g};return{peek:b,load:h,invalidate:w}}var _="/partner-local/v1";async function L(t="",r={}){let a=r.method??"GET";a!=="GET"&&v.invalidate();let s=await fetch(`${_}${t}`,{...r,headers:{Accept:"application/json",...a==="GET"?{}:{"Content-Type":"application/json","X-DSH-Partner-Request":"1"},...r.headers}});if((a!=="GET"||s.status===401||s.status===403)&&v.invalidate(),s.status===204)return;let o=await s.json().catch(()=>({}));if(!s.ok)throw new Error(typeof o.error=="string"?o.error:`HTTP ${s.status}`);return o}var v=T(()=>L("",{signal:AbortSignal.timeout(15e3)})),U=v.peek;function E(){return v.load()}var A=require("react"),R=require("@deepseek-ai/dsh-client-ui-primitives"),P=require("react/jsx-runtime");function j(t){return t instanceof Error?t.message:String(t)}var n=require("react/jsx-runtime");function B({companionId:t}){let[r,a]=(0,u.useState)(),[s,o]=(0,u.useState)(""),[l,b]=(0,u.useState)(!1),[w,h]=(0,u.useState)(0);(0,u.useEffect)(()=>{let e=!0,i=!1,d=async()=>{if(!(i||document.hidden)){i=!0,b(!0);try{let C=await E();e&&(a(C),o(""))}catch(C){e&&o(j(C))}finally{i=!1,e&&b(!1)}}};d();let p=setInterval(()=>void d(),3e4);return()=>{e=!1,clearInterval(p)}},[t,w]);let[y,g]=(0,u.useState)(8);(0,u.useEffect)(()=>g(8),[t]);let c=r?.companions.find(e=>e.id===t)?.activityPlan,f=[...r?.companions.find(e=>e.id===t)?.activityJournal??[]].reverse(),m=I(f),k=[...r?.companions.find(e=>e.id===t)?.thoughts??[]].sort((e,i)=>i.updatedAt-e.updatedAt),x=e=>{let i=r?.sessions.find(p=>p.id===e);if(!i)return"\u539F\u4F1A\u8BDD\u5DF2\u79FB\u9664";if(i.kind==="local")return"\u7F51\u9875\u4E3B\u4F1A\u8BDD";let d=i.userId.match(/^group:(\d+):/);return d?`\u7FA4 ${d[1]}`:`${r?.channels.find(p=>p.id===i.channelId)?.name??"\u6E20\u9053"} \xB7 ${r?.pairings.find(p=>p.channelId===i.channelId&&p.userId===i.userId)?.displayName??i.userId}`};return(0,n.jsxs)("section",{className:"dsh-partner-memory-record","aria-label":"\u81EA\u4E3B\u6D3B\u52A8\u8BB0\u5F55",children:[(0,n.jsx)("h3",{children:"\u81EA\u4E3B\u6D3B\u52A8\u8BB0\u5F55"}),(0,n.jsxs)("div",{className:"dsh-partner-character-fields",children:[(0,n.jsx)("p",{className:"dsh-partner-character-hint",children:"\u4ECE\u771F\u5B9E\u4E92\u52A8\u6216\u81EA\u4E3B\u6D3B\u52A8\u4E2D\u5F62\u6210\uFF0C\u7531\u4F19\u4F34\u51B3\u5B9A\u7EE7\u7EED\u3001\u6362\u4E2A\u4F1A\u8BDD\u804A\uFF0C\u6216\u653E\u4E0B\u3002\u5FF5\u5934\u4E0D\u662F\u5DF2\u53D1\u751F\u7684\u4E8B\u5B9E\u3002"}),c&&(0,n.jsxs)("p",{className:"dsh-partner-character-hint",style:{overflowWrap:"anywhere"},children:["\u4E0B\u4E00\u6B65\uFF1A",c.intention,(0,n.jsx)("br",{}),x(c.targetRouteId)," \xB7 ",{waiting:"\u7B49\u5F85\u672C\u8F6E\u5B8C\u6210",pending:"\u7B49\u5F85\u5524\u8D77",claimed:"\u5DF2\u5524\u8D77",cancelled:"\u5DF2\u53D6\u6D88"}[c.status],c.status==="pending"?` \xB7 ${new Date(c.dueAt).toLocaleString()}`:""]}),s&&(0,n.jsx)("p",{role:"alert",className:"dsh-partner-inline-error",children:s}),!r&&l&&(0,n.jsx)("p",{role:"status",children:"\u6B63\u5728\u8BFB\u53D6\u2026"}),r&&!k.length&&(0,n.jsx)("p",{className:"dsh-partner-character-hint",children:"\u6682\u65F6\u6CA1\u6709\u7559\u4E0B\u5FF5\u5934\uFF0C\u4E0D\u8981\u6C42\u6BCF\u6B21\u4E92\u52A8\u90FD\u4EA7\u751F\u3002"}),r&&(0,n.jsxs)("p",{className:"dsh-partner-character-hint",children:["\u6700\u8FD1\u4FDD\u7559 ",m.total," \u8F6E \xB7 \u5DF2\u786E\u8BA4\u53D1\u9001 ",m.confirmed," \u8F6E \xB7 \u5F85\u786E\u8BA4 ",m.pending," \u8F6E \xB7 \u542B\u5931\u8D25\u64CD\u4F5C ",m.failed," \u8F6E",m.unknown?` \xB7 \u5386\u53F2\u53D1\u9001\u72B6\u6001\u672A\u77E5 ${m.unknown} \u8F6E`:"",(0,n.jsx)("br",{}),"\u5404\u7C7B\u578B\u53EF\u91CD\u53E0\uFF1A",m.categories.map(e=>`${e.name} ${e.count}`).join(" \xB7 ")||"\u6682\u65E0\u64CD\u4F5C\u8BB0\u5F55","\u3002\u4EC5\u7EDF\u8BA1\u6700\u8FD1\u4FDD\u7559\u8BB0\u5F55\uFF0C\u4E0D\u4EE3\u8868\u5168\u90E8\u5386\u53F2\u3002"]}),r&&!f.length&&(0,n.jsx)("p",{children:"\u6682\u65F6\u6CA1\u6709\u81EA\u4E3B\u6D3B\u52A8\u8BB0\u5F55\u3002"}),(0,n.jsx)("div",{"aria-label":"\u6D3B\u52A8\u65F6\u95F4\u7EBF",children:f.slice(0,y).map(e=>(0,n.jsxs)("article",{className:"dsh-partner-memory-record",style:{overflowWrap:"anywhere"},children:[(0,n.jsxs)("small",{children:[new Date(e.at).toLocaleString()," \xB7 ",V(e),e.tools.some(i=>!i.ok)?" \xB7 \u6709\u64CD\u4F5C\u5931\u8D25":""]}),(0,n.jsx)("p",{children:e.summary}),e.artifacts.map(i=>(0,n.jsxs)("p",{children:[(0,n.jsxs)("small",{children:["\u4F5C\u54C1\uFF1A",i,f.filter(d=>d.artifacts.includes(i)).length>1?` \xB7 \u5173\u8054 ${f.filter(d=>d.artifacts.includes(i)).length} \u8F6E\u8FDB\u5C55`:""]}),(0,n.jsx)("button",{type:"button",onClick:()=>{navigator.clipboard.writeText(i).catch(()=>o("\u590D\u5236\u5931\u8D25\uFF0C\u8BF7\u624B\u52A8\u9009\u62E9\u8DEF\u5F84\u590D\u5236"))},children:"\u590D\u5236\u8DEF\u5F84"})]},i)),(0,n.jsxs)("details",{children:[(0,n.jsx)("summary",{children:"\u6267\u884C\u4F9D\u636E"}),(0,n.jsxs)("p",{children:[e.silent?"\u672C\u8F6E\u4EE5\u5B89\u9759\u7ED3\u675F\u5DE5\u5177\u6536\u5C3E\uFF1B\u4E4B\u524D\u53EF\u80FD\u5DF2\u53D1\u9001\u3002":"\u672C\u8F6E\u5DF2\u7ED3\u675F\u3002","\u53D1\u9001\u72B6\u6001\u4EC5\u4F9D\u636E\u5DF2\u8BB0\u5F55\u56DE\u6267\uFF0C\u4E0D\u5C06\u5DE5\u5177\u8C03\u7528\u5F53\u4F5C\u6536\u4EF6\u6210\u529F\u3002"]}),(0,n.jsx)("p",{children:e.tools.map(i=>i.name+(i.ok?" \u2713":" \xD7")).join("\u3001")||"\u672A\u8BB0\u5F55\u5DE5\u5177\u64CD\u4F5C"})]})]},e.sessionId+":"+e.id))}),y<f.length&&(0,n.jsx)("button",{type:"button",onClick:()=>g(e=>e+8),children:"\u67E5\u770B\u66F4\u591A\u6D3B\u52A8"}),(0,n.jsxs)("details",{children:[(0,n.jsxs)("summary",{children:["\u8FD8\u60E6\u8BB0\u7740\u4EC0\u4E48\uFF08",k.filter(e=>e.status==="open").length,"\uFF09"]}),k.map(e=>(0,n.jsxs)("details",{className:"dsh-partner-memory-record",children:[(0,n.jsxs)("summary",{children:[(0,n.jsx)("span",{style:{whiteSpace:"normal",overflowWrap:"anywhere"},children:e.text}),(0,n.jsx)("small",{children:e.status==="done"?"\u5DF2\u5B8C\u6210\uFF08\u81EA\u4E3B\u6807\u8BB0\uFF09":e.status==="dismissed"?"\u5DF2\u653E\u4E0B":e.lastOutcome?{considered:"\u5DF2\u8003\u8651",silent:"\u6682\u65F6\u5B89\u9759",delivered:"\u5DF2\u53D1\u9001",failed:"\u672A\u786E\u8BA4\u9001\u8FBE"}[e.lastOutcome]:"\u8FD8\u60E6\u8BB0\u7740"})]}),(0,n.jsxs)("div",{className:"dsh-partner-character-fields",children:[(0,n.jsx)("p",{children:e.why}),(0,n.jsxs)("small",{children:["\u6765\u81EA\uFF1A",e.sourceRouteIds.map(x).join("\u3001")," \xB7 ",new Date(e.sourceAt).toLocaleString()]}),(0,n.jsxs)("small",{children:["\u60F3\u53BB\uFF1A",x(e.targetRouteId)]}),e.result&&(0,n.jsx)("p",{children:e.result}),(0,n.jsxs)("details",{children:[(0,n.jsx)("summary",{children:"\u6765\u6E90\u4F9D\u636E"}),(0,n.jsx)("p",{style:{whiteSpace:"pre-wrap",overflowWrap:"anywhere"},children:e.evidence})]})]})]},e.id))]}),(0,n.jsx)("button",{type:"button",disabled:l,onClick:()=>h(e=>e+1),children:l?"\u8BFB\u53D6\u4E2D\u2026":"\u5237\u65B0\u6D3B\u52A8"})]})]})}
|
|
3
|
+
return module.exports; } });
|