@evandu/super-pi 0.1.131 → 0.1.132

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.
Files changed (60) hide show
  1. package/README.md +18 -0
  2. package/agents/super-pi-feishu/index.ts +88 -0
  3. package/agents/super-pi-knowledge/index.ts +1 -1
  4. package/agents/super-pi-task/core.ts +177 -0
  5. package/agents/super-pi-task/index.ts +59 -0
  6. package/dist/client/.super-pi-client-sources.json +11 -8
  7. package/dist/client/assets/CodeMirrorEditor-ktyL2PcX.js +2 -0
  8. package/dist/client/assets/{dist-C9AkgNbt.js → dist--igDAzRS.js} +1 -1
  9. package/dist/client/assets/{dist-DP2ygAFF.js → dist-60usx__o.js} +1 -1
  10. package/dist/client/assets/{dist-B448EWTM.js → dist-8pdzh6h1.js} +1 -1
  11. package/dist/client/assets/{dist-lQWWWxh9.js → dist-B8OZ-n_C.js} +1 -1
  12. package/dist/client/assets/{dist-hfpd-aWa.js → dist-BAJCrbnX.js} +1 -1
  13. package/dist/client/assets/{dist-B68Q8uXX.js → dist-BJi5HmH4.js} +1 -1
  14. package/dist/client/assets/{dist-COp25nhe.js → dist-BRjGckmQ.js} +1 -1
  15. package/dist/client/assets/{dist-Fhkmvjdx.js → dist-Bg9zLfex.js} +1 -1
  16. package/dist/client/assets/{dist-D7bj81KQ.js → dist-BjZUYxLd.js} +1 -1
  17. package/dist/client/assets/{dist-B1_1Ui9E.js → dist-Bv6P2Rcp.js} +1 -1
  18. package/dist/client/assets/{dist-ByIqsb5-.js → dist-C6iAHGvb.js} +1 -1
  19. package/dist/client/assets/{dist-Cybsoapc.js → dist-CMscy2Nn.js} +1 -1
  20. package/dist/client/assets/{dist-D6PoSxR5.js → dist-CPLCQDqy.js} +1 -1
  21. package/dist/client/assets/{dist-C6qSkkeN.js → dist-CgmISAMr.js} +1 -1
  22. package/dist/client/assets/{dist-DxoWS5MH.js → dist-CoszOk5k.js} +1 -1
  23. package/dist/client/assets/{dist-CpuexUlh.js → dist-Cu75NyQ0.js} +1 -1
  24. package/dist/client/assets/{dist-r5Af94tH.js → dist-DNZMXYNq.js} +1 -1
  25. package/dist/client/assets/{dist-BXVFgriA.js → dist-D_Zdnhm8.js} +1 -1
  26. package/dist/client/assets/{dist-CtdlYgGc.js → dist-DvHghuGd.js} +1 -1
  27. package/dist/client/assets/{dist-BcE6tJvc.js → dist-Hj_dWgPr.js} +1 -1
  28. package/dist/client/assets/{dist-DXNDtyHP.js → dist-Zhdkfvng.js} +1 -1
  29. package/dist/client/assets/{dist-BFlq-kiF.js → dist-vsMBLoxV.js} +1 -1
  30. package/dist/client/assets/{index-BApJ3Zbq.js → index-ChyemF2I.js} +23 -21
  31. package/dist/client/assets/{index-CXB6U5mz.css → index-D3MEG8uH.css} +1 -1
  32. package/dist/client/index.html +2 -2
  33. package/dist/server/application/feishu-service.d.ts +132 -0
  34. package/dist/server/application/feishu-service.js +264 -0
  35. package/dist/server/application/scheduled-task-service.d.ts +164 -0
  36. package/dist/server/application/scheduled-task-service.js +350 -0
  37. package/dist/server/command-handler.d.ts +25 -1
  38. package/dist/server/command-handler.js +60 -1
  39. package/dist/server/feishu-cli.d.ts +207 -0
  40. package/dist/server/feishu-cli.js +419 -0
  41. package/dist/server/files.js +3 -3
  42. package/dist/server/http-server.js +212 -1
  43. package/dist/server/index.js +29 -2
  44. package/dist/server/knowledge.js +10 -2
  45. package/dist/server/persistence/app-state-repository.d.ts +13 -1
  46. package/dist/server/persistence/sqlite-state-repository.js +3 -0
  47. package/dist/server/pi-session.js +3 -0
  48. package/dist/server/runtime.d.ts +21 -0
  49. package/dist/server/runtime.js +58 -6
  50. package/dist/server/scheduled-tasks.d.ts +101 -0
  51. package/dist/server/scheduled-tasks.js +138 -0
  52. package/dist/server/server-context.d.ts +16 -0
  53. package/dist/server/store.d.ts +30 -0
  54. package/dist/server/store.js +81 -2
  55. package/dist/server/task-tool.d.ts +18 -0
  56. package/dist/server/task-tool.js +18 -0
  57. package/dist/server/types.d.ts +56 -0
  58. package/package.json +17 -4
  59. package/dist/.super-pi-check-inputs.json +0 -4
  60. package/dist/client/assets/CodeMirrorEditor-BlQhH3vs.js +0 -2
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dist-DxoWS5MH.js","assets/dist-hfpd-aWa.js","assets/index-BApJ3Zbq.js","assets/index-CXB6U5mz.css","assets/dist-B68Q8uXX.js","assets/dist-CpuexUlh.js","assets/dist-D7bj81KQ.js","assets/dist-B1_1Ui9E.js","assets/dist-Cybsoapc.js","assets/dist-CtdlYgGc.js","assets/dist-ByIqsb5-.js","assets/dist-r5Af94tH.js","assets/dist-BXVFgriA.js","assets/dist-Fhkmvjdx.js","assets/dist-D6PoSxR5.js","assets/dist-lQWWWxh9.js","assets/dist-BFlq-kiF.js","assets/dist-DXNDtyHP.js","assets/dist-BcE6tJvc.js","assets/dist-B448EWTM.js","assets/dist-C6qSkkeN.js","assets/dist-COp25nhe.js","assets/dist-DP2ygAFF.js","assets/dist-C9AkgNbt.js"])))=>i.map(i=>d[i]);
2
- import{a as e,n as t,r as n,t as r}from"./index-BApJ3Zbq.js";var i=e(n(),1);async function a(e,t){let[{StreamLanguage:n},i]=await Promise.all([r(()=>import(`./dist-DxoWS5MH.js`),__vite__mapDeps([0,1,2,3,4,5])),e()]),a=i[t]??i.default??i;return n.define(a)}var o={cpp:()=>r(()=>import(`./dist-D7bj81KQ.js`).then(e=>e.cpp()),__vite__mapDeps([6,5,2,3,0,1,4,7])),cc:()=>r(()=>import(`./dist-D7bj81KQ.js`).then(e=>e.cpp()),__vite__mapDeps([6,5,2,3,0,1,4,7])),cxx:()=>r(()=>import(`./dist-D7bj81KQ.js`).then(e=>e.cpp()),__vite__mapDeps([6,5,2,3,0,1,4,7])),hpp:()=>r(()=>import(`./dist-D7bj81KQ.js`).then(e=>e.cpp()),__vite__mapDeps([6,5,2,3,0,1,4,7])),hh:()=>r(()=>import(`./dist-D7bj81KQ.js`).then(e=>e.cpp()),__vite__mapDeps([6,5,2,3,0,1,4,7])),hxx:()=>r(()=>import(`./dist-D7bj81KQ.js`).then(e=>e.cpp()),__vite__mapDeps([6,5,2,3,0,1,4,7])),c:()=>r(()=>import(`./dist-D7bj81KQ.js`).then(e=>e.cpp()),__vite__mapDeps([6,5,2,3,0,1,4,7])),h:()=>r(()=>import(`./dist-D7bj81KQ.js`).then(e=>e.cpp()),__vite__mapDeps([6,5,2,3,0,1,4,7])),cu:()=>r(()=>import(`./dist-D7bj81KQ.js`).then(e=>e.cpp()),__vite__mapDeps([6,5,2,3,0,1,4,7])),cuh:()=>r(()=>import(`./dist-D7bj81KQ.js`).then(e=>e.cpp()),__vite__mapDeps([6,5,2,3,0,1,4,7])),js:()=>r(()=>import(`./dist-Cybsoapc.js`).then(e=>e.t).then(e=>e.javascript()),__vite__mapDeps([8,2,3,1,4,5,0,7,9])),jsx:()=>r(()=>import(`./dist-Cybsoapc.js`).then(e=>e.t).then(e=>e.javascript({jsx:!0})),__vite__mapDeps([8,2,3,1,4,5,0,7,9])),mjs:()=>r(()=>import(`./dist-Cybsoapc.js`).then(e=>e.t).then(e=>e.javascript()),__vite__mapDeps([8,2,3,1,4,5,0,7,9])),cjs:()=>r(()=>import(`./dist-Cybsoapc.js`).then(e=>e.t).then(e=>e.javascript()),__vite__mapDeps([8,2,3,1,4,5,0,7,9])),ts:()=>r(()=>import(`./dist-Cybsoapc.js`).then(e=>e.t).then(e=>e.javascript({typescript:!0})),__vite__mapDeps([8,2,3,1,4,5,0,7,9])),tsx:()=>r(()=>import(`./dist-Cybsoapc.js`).then(e=>e.t).then(e=>e.javascript({typescript:!0,jsx:!0})),__vite__mapDeps([8,2,3,1,4,5,0,7,9])),mts:()=>r(()=>import(`./dist-Cybsoapc.js`).then(e=>e.t).then(e=>e.javascript({typescript:!0})),__vite__mapDeps([8,2,3,1,4,5,0,7,9])),cts:()=>r(()=>import(`./dist-Cybsoapc.js`).then(e=>e.t).then(e=>e.javascript({typescript:!0})),__vite__mapDeps([8,2,3,1,4,5,0,7,9])),py:()=>r(()=>import(`./dist-ByIqsb5-.js`).then(e=>e.python()),__vite__mapDeps([10,5,2,3,0,1,4,7,9])),pyi:()=>r(()=>import(`./dist-ByIqsb5-.js`).then(e=>e.python()),__vite__mapDeps([10,5,2,3,0,1,4,7,9])),java:()=>r(()=>import(`./dist-r5Af94tH.js`).then(e=>e.java()),__vite__mapDeps([11,5,2,3,0,1,4,7])),php:()=>r(()=>import(`./dist-BXVFgriA.js`).then(e=>e.php()),__vite__mapDeps([12,5,2,3,0,1,4,7,13,14,8,9])),sql:()=>r(()=>import(`./dist-lQWWWxh9.js`).then(e=>e.sql()),__vite__mapDeps([15,5,2,3,0,1,4,7,9])),yaml:()=>r(()=>import(`./dist-BFlq-kiF.js`).then(e=>e.yaml()),__vite__mapDeps([16,5,2,3,0,1,4,7])),yml:()=>r(()=>import(`./dist-BFlq-kiF.js`).then(e=>e.yaml()),__vite__mapDeps([16,5,2,3,0,1,4,7])),xml:()=>r(()=>import(`./dist-DXNDtyHP.js`).then(e=>e.xml()),__vite__mapDeps([17,1,2,3,4,5,0,7])),json:()=>r(()=>import(`./dist-BcE6tJvc.js`).then(e=>e.json()),__vite__mapDeps([18,5,2,3,0,1,4,7])),jsonc:()=>r(()=>import(`./dist-BcE6tJvc.js`).then(e=>e.json()),__vite__mapDeps([18,5,2,3,0,1,4,7])),json5:()=>r(()=>import(`./dist-BcE6tJvc.js`).then(e=>e.json()),__vite__mapDeps([18,5,2,3,0,1,4,7])),html:()=>r(()=>import(`./dist-Fhkmvjdx.js`).then(e=>e.html()),__vite__mapDeps([13,1,2,3,4,5,0,7,14,8,9])),htm:()=>r(()=>import(`./dist-Fhkmvjdx.js`).then(e=>e.html()),__vite__mapDeps([13,1,2,3,4,5,0,7,14,8,9])),vue:()=>r(()=>import(`./dist-Fhkmvjdx.js`).then(e=>e.html()),__vite__mapDeps([13,1,2,3,4,5,0,7,14,8,9])),svelte:()=>r(()=>import(`./dist-Fhkmvjdx.js`).then(e=>e.html()),__vite__mapDeps([13,1,2,3,4,5,0,7,14,8,9])),css:()=>r(()=>import(`./dist-D6PoSxR5.js`).then(e=>e.r).then(e=>e.css()),__vite__mapDeps([14,2,3,5,0,1,4,7])),md:()=>r(()=>import(`./dist-B448EWTM.js`).then(e=>e.markdown()),__vite__mapDeps([19,1,2,3,4,5,0,9,13,7,14,8])),markdown:()=>r(()=>import(`./dist-B448EWTM.js`).then(e=>e.markdown()),__vite__mapDeps([19,1,2,3,4,5,0,9,13,7,14,8])),mdx:()=>r(()=>import(`./dist-B448EWTM.js`).then(e=>e.markdown()),__vite__mapDeps([19,1,2,3,4,5,0,9,13,7,14,8])),rs:()=>r(()=>import(`./dist-C6qSkkeN.js`).then(e=>e.rust()),__vite__mapDeps([20,5,2,3,0,1,4,7])),go:()=>r(()=>import(`./dist-COp25nhe.js`).then(e=>e.go()),__vite__mapDeps([21,5,2,3,0,1,4,7,9])),sh:()=>a(()=>r(()=>import(`./shell-DwuoZtxw.js`),[]),`shell`),bash:()=>a(()=>r(()=>import(`./shell-DwuoZtxw.js`),[]),`shell`),zsh:()=>a(()=>r(()=>import(`./shell-DwuoZtxw.js`),[]),`shell`),fish:()=>a(()=>r(()=>import(`./shell-DwuoZtxw.js`),[]),`shell`),ps1:()=>a(()=>r(()=>import(`./powershell-D8WpQPaX.js`),[]),`powershell`),psm1:()=>a(()=>r(()=>import(`./powershell-D8WpQPaX.js`),[]),`powershell`),rb:()=>a(()=>r(()=>import(`./ruby-ChfNwlCY.js`),[]),`ruby`),swift:()=>a(()=>r(()=>import(`./swift-DKB6_1j6.js`),[]),`swift`),toml:()=>a(()=>r(()=>import(`./toml-BPTmHmyx.js`),[]),`toml`),ini:()=>a(()=>r(()=>import(`./properties-C357ku5U.js`),[]),`properties`),cfg:()=>a(()=>r(()=>import(`./properties-C357ku5U.js`),[]),`properties`),conf:()=>a(()=>r(()=>import(`./properties-C357ku5U.js`),[]),`properties`),properties:()=>a(()=>r(()=>import(`./properties-C357ku5U.js`),[]),`properties`),dockerfile:()=>a(()=>r(()=>import(`./dockerfile-BDePf5PZ.js`),[]),`dockerfile`),diff:()=>a(()=>r(()=>import(`./diff-ChtP43wD.js`),[]),`diff`),patch:()=>a(()=>r(()=>import(`./diff-ChtP43wD.js`),[]),`diff`)},s={cpp:`C++`,cc:`C++`,cxx:`C++`,hpp:`C++`,hh:`C++`,hxx:`C++`,cu:`CUDA C++`,cuh:`CUDA C++`,c:`C`,h:`C/C++ Header`,js:`JavaScript`,jsx:`JSX`,mjs:`JavaScript`,cjs:`JavaScript`,ts:`TypeScript`,tsx:`TSX`,mts:`TypeScript`,cts:`TypeScript`,py:`Python`,pyi:`Python Stub`,java:`Java`,php:`PHP`,sql:`SQL`,yaml:`YAML`,yml:`YAML`,xml:`XML`,json:`JSON`,jsonc:`JSON with Comments`,json5:`JSON5`,css:`CSS`,md:`Markdown`,markdown:`Markdown`,mdx:`MDX`,rs:`Rust`,go:`Go`,html:`HTML`,htm:`HTML`,vue:`Vue`,svelte:`Svelte`,sh:`Shell`,bash:`Bash`,zsh:`Zsh`,fish:`Fish`,ps1:`PowerShell`,psm1:`PowerShell`,rb:`Ruby`,swift:`Swift`,toml:`TOML`,ini:`INI`,cfg:`Config`,conf:`Config`,properties:`Properties`,dockerfile:`Dockerfile`,diff:`Diff`,patch:`Patch`};function c(e){return o[e.toLowerCase()]}function l(e){return s[e.toLowerCase()]}var u=t(),d=262144,f=131072;function p(e){return e.split(`.`).pop()?.toLowerCase()??``}function m(e){return getComputedStyle(document.documentElement).getPropertyValue(e).trim()}function h(e,t){return e.HighlightStyle.define([{tag:t.tags.keyword,color:m(`--cm-keyword`)},{tag:t.tags.string,color:m(`--cm-string`)},{tag:t.tags.number,color:m(`--cm-number`)},{tag:t.tags.comment,color:m(`--cm-comment`),fontStyle:`italic`},{tag:t.tags.function(t.tags.variableName),color:m(`--cm-function`)},{tag:t.tags.typeName,color:m(`--cm-type`)},{tag:t.tags.className,color:m(`--cm-type`)},{tag:t.tags.propertyName,color:m(`--cm-property`)},{tag:t.tags.operator,color:m(`--cm-operator`)},{tag:t.tags.variableName,color:m(`--cm-variable`)}])}function g({path:e,value:t,onChange:n,jumpToLine:a,onSave:o}){let s=(0,i.useRef)(null),m=(0,i.useRef)(null),g=(0,i.useRef)(null),_=(0,i.useRef)(null),v=(0,i.useRef)(null),y=(0,i.useRef)(n),b=(0,i.useRef)(o);y.current=n,b.current=o;let[x,S]=(0,i.useState)(!1),[C,w]=(0,i.useState)(!1),[T,E]=(0,i.useState)(`0,0`);(0,i.useEffect)(()=>{let n=!1,i,a,o,l;return(async()=>{try{let u=p(e),f=c(u),[x,C,T,D,O,k,A]=await Promise.all([r(()=>import(`./dist-hfpd-aWa.js`).then(e=>e.x),__vite__mapDeps([1,2,3])),r(()=>import(`./dist-B68Q8uXX.js`).then(e=>e.s),__vite__mapDeps([4,2,3,1])),r(()=>import(`./dist-DP2ygAFF.js`),__vite__mapDeps([22,1,2,3,4,5,0])),r(()=>import(`./dist-C9AkgNbt.js`),__vite__mapDeps([23,1,2,3,4])),r(()=>import(`./dist-DxoWS5MH.js`),__vite__mapDeps([0,1,2,3,4,5])),r(()=>import(`./dist-CpuexUlh.js`).then(e=>e.n),__vite__mapDeps([5,2,3])),f?f().catch(e=>(console.warn(`[CodeMirror] Failed to load language for .${u}:`,e),null)):Promise.resolve(null)]);if(n||!s.current)return;o=O,l=k,_.current=x.Annotation.define(),v.current=x.Transaction.addToHistory;let j=t.length<=d&&A!==null;a=new x.Compartment;let M=[C.lineNumbers(),C.highlightActiveLine(),C.drawSelection(),T.history(),C.keymap.of([T.indentWithTab,...T.defaultKeymap,...T.historyKeymap,...D.searchKeymap,{key:`Mod-s`,run:()=>(b.current(),!0)}]),C.EditorView.updateListener.of(e=>{e.docChanged&&!(_.current&&e.transactions.some(e=>e.annotation(_.current)===!0))&&y.current(e.state.doc.toString()),e.selectionSet&&E(`${e.state.selection.main.from},${e.state.selection.main.to}`)}),C.EditorView.domEventHandlers({mousedown:(e,t)=>(t.focus(),!1)})];if(A)try{M.push(A)}catch(e){console.warn(`[CodeMirror] Failed to apply language extension for .${u}:`,e),j=!1}if(j&&a&&o&&l)try{M.push(a.of(o.syntaxHighlighting(h(o,l))))}catch(e){console.warn(`[CodeMirror] Failed to attach syntaxHighlighting for .${u}:`,e),j=!1}if(i=new C.EditorView({state:x.EditorState.create({doc:t,extensions:M}),parent:s.current}),n){i.destroy();return}m.current=i,S(j),w(!0);let N=new MutationObserver(()=>{let e=m.current;if(e&&j&&a&&o&&l)try{e.dispatch({effects:a.reconfigure(o.syntaxHighlighting(h(o,l)))})}catch{}});g.current=N,N.observe(document.documentElement,{attributes:!0,attributeFilter:[`data-theme`]})}catch(e){console.error(`[CodeMirror] Fatal editor initialization error:`,e),n||w(!0)}})(),()=>{n=!0,g.current?.disconnect(),g.current=null,i?.destroy(),m.current=null,w(!1),s.current&&(s.current.textContent=``)}},[e]),(0,i.useEffect)(()=>{let e=m.current;if(!e)return;let n=e.state.doc.toString();n!==t&&e.dispatch({changes:{from:0,to:n.length,insert:t},annotations:_.current?_.current.of(!0):void 0})},[t]),(0,i.useEffect)(()=>{let e=m.current;if(!e||!a)return;let t=e.state.doc.line(Math.min(Math.max(1,a.line),e.state.doc.lines));e.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0}),e.focus()},[a,C]);let D=m.current?.state.doc.toString()??t,O=D.length<=f?D:D.slice(0,f),k=p(e),A=l(k);return(0,u.jsxs)(`div`,{className:`file-cm-wrap`,"data-file-text":e,"data-file-content":O,"data-file-content-truncated":D.length>f?`1`:`0`,"data-file-selection":T,"data-file-editor-ready":C?`1`:`0`,onMouseDown:()=>m.current?.focus(),children:[(0,u.jsx)(`div`,{className:`file-cm`,ref:s,"aria-label":`编辑 ${e}`}),!C&&(0,u.jsx)(`span`,{className:`file-cm-status`,"data-file-editor-loading":`1`,children:`⌛ 正在加载编辑器…`}),C&&!x&&(0,u.jsx)(`span`,{className:`file-cm-status`,"data-file-highlight-status":`plain`,children:`纯文本`}),C&&x&&A&&(0,u.jsx)(`span`,{className:`file-cm-status file-cm-status-lang`,"data-file-highlight-status":k,children:A})]})}export{g as CodeMirrorEditor};