@kafca/agentdock 0.1.31 → 0.1.33
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/LICENSE.md +73 -0
- package/README.md +11 -0
- package/dist/renderer/assets/{Badge-DaHt-aUT.js → Badge-VeSLCPPV.js} +1 -1
- package/dist/renderer/assets/{Chat-Dzeq3kiD.js → Chat-DWTQeTgn.js} +1 -1
- package/dist/renderer/assets/{ChatMarkdown-B-L5Roai.js → ChatMarkdown-C9gSQIVb.js} +1 -1
- package/dist/renderer/assets/{Config-BI4LJ7Fw.js → Config-CTA-pZNR.js} +1 -1
- package/dist/renderer/assets/{CronList-Dic7pblj.js → CronList-BngBCnFY.js} +1 -1
- package/dist/renderer/assets/{Dashboard-C0_ATyGe.js → Dashboard-D4pGvDpc.js} +2 -2
- package/dist/renderer/assets/{EmptyState-SQsG1DZP.js → EmptyState-DMf8rzDs.js} +1 -1
- package/dist/renderer/assets/{KnowledgeDetail-D4yUJzp7.js → KnowledgeDetail-C1Ym_cHk.js} +1 -1
- package/dist/renderer/assets/{KnowledgeHome-L0tsg-oo.js → KnowledgeHome-DPRiR72G.js} +1 -1
- package/dist/renderer/assets/{Logs-C2Jdr3uQ.js → Logs-CRHecmzO.js} +1 -1
- package/dist/renderer/assets/{Modal-GUH3iPXo.js → Modal-BDhhPv2l.js} +1 -1
- package/dist/renderer/assets/{Page-m42FBy97.js → Page-DdDZN7AE.js} +1 -1
- package/dist/renderer/assets/{ProjectDetail-RF_sagPO.js → ProjectDetail-DCsr3LkW.js} +1 -1
- package/dist/renderer/assets/{ProjectList-Cyr8RDK3.js → ProjectList-Cnm-iLvg.js} +1 -1
- package/dist/renderer/assets/{Select-CRlDgI5s.js → Select-Dw4FCXhJ.js} +1 -1
- package/dist/renderer/assets/{SessionChat-_HhzMwEO.js → SessionChat-O-6abK8x.js} +1 -1
- package/dist/renderer/assets/{SessionList-DNwZjGTv.js → SessionList-5yptvVL9.js} +1 -1
- package/dist/renderer/assets/{ThreadChat-DxBmdsAm.js → ThreadChat-CIM_o2HO.js} +1 -1
- package/dist/renderer/assets/{Workspace-DFphG85O.js → Workspace-D9UeUCNr.js} +1 -1
- package/dist/renderer/assets/{arrow-left-bILMzse7.js → arrow-left-CKfxNOXE.js} +1 -1
- package/dist/renderer/assets/{book-open-BNBWEEve.js → book-open-CQddlENV.js} +1 -1
- package/dist/renderer/assets/{check-MGp5kvnb.js → check-CZYvOmIS.js} +1 -1
- package/dist/renderer/assets/{chevron-down-zsfoTlh7.js → chevron-down-CVIWFoXF.js} +1 -1
- package/dist/renderer/assets/{circle-BX_xUSg-.js → circle-DSfdQM7k.js} +1 -1
- package/dist/renderer/assets/{desktop-CgrO_cdQ.js → desktop-B9KUgeOV.js} +1 -1
- package/dist/renderer/assets/{funnel-7442U1wq.js → funnel-pB5NegZB.js} +1 -1
- package/dist/renderer/assets/{heart-B3d8bnSH.js → heart-BT5laZ_b.js} +1 -1
- package/dist/renderer/assets/{index-BBaYsVjU.js → index-BYyDk28K.js} +2 -2
- package/dist/renderer/assets/{index-5YUqCvBf.js → index-zTUUYax3.js} +1 -1
- package/dist/renderer/assets/{pencil-QzWgkmoH.js → pencil-C0thxLi6.js} +1 -1
- package/dist/renderer/assets/{play-Bsc8hSI7.js → play-CmZ0kWtt.js} +1 -1
- package/dist/renderer/assets/{plug-CRY7sjvB.js → plug-CeDQatBe.js} +1 -1
- package/dist/renderer/assets/{plus-Dr5Ei8Ud.js → plus-Di__xFOZ.js} +1 -1
- package/dist/renderer/assets/projects-B-pbhhtH.js +1 -0
- package/dist/renderer/assets/{save-giJnp2Ki.js → save-BDatCjfO.js} +1 -1
- package/dist/renderer/assets/{search-DcvHLmKs.js → search-DnTOjP0C.js} +1 -1
- package/dist/renderer/assets/{server-D_Qu8If5.js → server-Ey_iHY6m.js} +1 -1
- package/dist/renderer/assets/{session-utils-CsASahfU.js → session-utils-DWaM7Rkr.js} +1 -1
- package/dist/renderer/assets/{sessions-eMpPqp4P.js → sessions-CYYjLD5I.js} +1 -1
- package/dist/renderer/assets/{shield-check-BpF0uIw-.js → shield-check-Br8BQzcn.js} +1 -1
- package/dist/renderer/assets/{trash-2-OJFmx3xk.js → trash-2-7YD616fw.js} +1 -1
- package/dist/renderer/assets/{user-GL_ivaV6.js → user-BR_5jmr9.js} +1 -1
- package/dist/renderer/assets/{wifi-off-CQT5VNQl.js → wifi-off-By9QdREz.js} +1 -1
- package/dist/renderer/index.html +1 -1
- package/dist-electron/services/local-ai-core/src/acp/local-core-acp-backend.js +0 -1
- package/dist-electron/services/local-ai-core/src/acp/local-core-acp-response-processor.js +2 -4
- package/dist-electron/services/local-ai-core/src/cli/lac.js +2 -1
- package/dist-electron/services/local-ai-core/src/kernel/bootstrap.js +9 -4
- package/dist-electron/services/local-ai-core/src/runtime/local-core-controller.js +9 -4
- package/dist-electron/services/local-ai-core/src/scheduler/lark-schedule-adapter.js +16 -7
- package/dist-electron/services/local-ai-core/src/scheduler/local-schedule-adapter.js +10 -2
- package/dist-electron/services/local-ai-core/src/scheduler/scheduled-job-route.js +24 -0
- package/dist-electron/services/local-ai-core/src/scheduler/weixin-schedule-adapter.js +15 -6
- package/dist-electron/{electron → tests/contracts}/local-core-contracts.test.js +1 -1
- package/dist-electron/{electron → tests/electron}/agent-runtime-detector.test.js +2 -2
- package/dist-electron/{electron → tests/electron}/lac-cli.test.js +6 -3
- package/dist-electron/{electron → tests/electron}/plugin-kernel.test.js +13 -13
- package/dist-electron/{electron → tests/electron}/renderer-packaging.test.js +11 -6
- package/dist-electron/{electron → tests/electron}/runtime-detection-service.test.js +1 -1
- package/dist-electron/{electron → tests/electron}/security-approval-store.test.js +2 -2
- package/dist-electron/{electron → tests/electron}/workspace-task-store.test.js +95 -7
- package/dist-electron/{electron → tests/integration}/channel-content.test.js +2 -2
- package/dist-electron/{electron → tests/integration}/local-core-acp-content.test.js +1 -1
- package/dist-electron/{electron → tests/integration}/local-core-refactor.test.js +15 -15
- package/package.json +3 -2
- package/dist/renderer/assets/projects-BDYSOFIJ.js +0 -1
- /package/dist-electron/{electron → tests/contracts}/architecture-docs.test.js +0 -0
- /package/dist-electron/{electron → tests/electron}/knowledge-skill-script.test.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{G as Te,aK as Ae,r as c,j as x,aL as pe,aM as Ne,aA as te}from"./index-BBaYsVjU.js";var ye=Ae();const De=Te(ye);function X(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Jt(e,t){const n=c.createContext(t),r=i=>{const{children:s,...a}=i,h=c.useMemo(()=>a,Object.values(a));return x.jsx(n.Provider,{value:h,children:s})};r.displayName=e+"Provider";function o(i){const s=c.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function en(e,t=[]){let n=[];function r(i,s){const a=c.createContext(s),h=n.length;n=[...n,s];const l=d=>{var p;const{scope:v,children:y,...w}=d,u=((p=v==null?void 0:v[e])==null?void 0:p[h])||a,m=c.useMemo(()=>w,Object.values(w));return x.jsx(u.Provider,{value:m,children:y})};l.displayName=i+"Provider";function f(d,v){var u;const y=((u=v==null?void 0:v[e])==null?void 0:u[h])||a,w=c.useContext(y);if(w)return w;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[l,f]}const o=()=>{const i=n.map(s=>c.createContext(s));return function(a){const h=(a==null?void 0:a[e])||i;return c.useMemo(()=>({[`__scope${e}`]:{...a,[e]:h}}),[a,h])}};return o.scopeName=e,[r,ke(o,...t)]}function ke(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=r.reduce((a,{useScope:h,scopeName:l})=>{const d=h(i)[`__scope${l}`];return{...a,...d}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}var ne=globalThis!=null&&globalThis.document?c.useLayoutEffect:()=>{},Me=pe[" useId ".trim().toString()]||(()=>{}),Fe=0;function tn(e){const[t,n]=c.useState(Me());return ne(()=>{n(r=>r??String(Fe++))},[e]),e||(t?`radix-${t}`:"")}var Ie=pe[" useInsertionEffect ".trim().toString()]||ne;function nn({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,s]=We({defaultProp:t,onChange:n}),a=e!==void 0,h=a?e:o;{const f=c.useRef(e!==void 0);c.useEffect(()=>{const d=f.current;d!==a&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=a},[a,r])}const l=c.useCallback(f=>{var d;if(a){const v=Be(f)?f(e):f;v!==e&&((d=s.current)==null||d.call(s,v))}else i(f)},[a,e,i,s]);return[h,l]}function We({defaultProp:e,onChange:t}){const[n,r]=c.useState(e),o=c.useRef(n),i=c.useRef(t);return Ie(()=>{i.current=t},[t]),c.useEffect(()=>{var s;o.current!==n&&((s=i.current)==null||s.call(i,n),o.current=n)},[n,o]),[n,r,i]}function Be(e){return typeof e=="function"}function _e(e){const t=je(e),n=c.forwardRef((r,o)=>{const{children:i,...s}=r,a=c.Children.toArray(i),h=a.find($e);if(h){const l=h.props.children,f=a.map(d=>d===h?c.Children.count(l)>1?c.Children.only(null):c.isValidElement(l)?l.props.children:null:d);return x.jsx(t,{...s,ref:o,children:c.isValidElement(l)?c.cloneElement(l,void 0,f):null})}return x.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function je(e){const t=c.forwardRef((n,r)=>{const{children:o,...i}=n;if(c.isValidElement(o)){const s=Ke(o),a=Ve(i,o.props);return o.type!==c.Fragment&&(a.ref=r?Ne(r,s):s),c.cloneElement(o,a)}return c.Children.count(o)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ue=Symbol("radix.slottable");function $e(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ue}function Ve(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{const h=i(...a);return o(...a),h}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Ke(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Xe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],V=Xe.reduce((e,t)=>{const n=_e(`Primitive.${t}`),r=c.forwardRef((o,i)=>{const{asChild:s,...a}=o,h=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(h,{...a,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Ye(e,t){e&&ye.flushSync(()=>e.dispatchEvent(t))}function F(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function He(e,t=globalThis==null?void 0:globalThis.document){const n=F(e);c.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var ze="DismissableLayer",J="dismissableLayer.update",Ge="dismissableLayer.pointerDownOutside",Ze="dismissableLayer.focusOutside",oe,Ee=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),qe=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:a,...h}=e,l=c.useContext(Ee),[f,d]=c.useState(null),v=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,y]=c.useState({}),w=te(t,E=>d(E)),u=Array.from(l.layers),[m]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),p=u.indexOf(m),g=f?u.indexOf(f):-1,b=l.layersWithOutsidePointerEventsDisabled.size>0,S=g>=p,C=et(E=>{const L=E.target,T=[...l.branches].some(M=>M.contains(L));!S||T||(o==null||o(E),s==null||s(E),E.defaultPrevented||a==null||a())},v),P=tt(E=>{const L=E.target;[...l.branches].some(M=>M.contains(L))||(i==null||i(E),s==null||s(E),E.defaultPrevented||a==null||a())},v);return He(E=>{g===l.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},v),c.useEffect(()=>{if(f)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(oe=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(f)),l.layers.add(f),ae(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=oe)}},[f,v,n,l]),c.useEffect(()=>()=>{f&&(l.layers.delete(f),l.layersWithOutsidePointerEventsDisabled.delete(f),ae())},[f,l]),c.useEffect(()=>{const E=()=>y({});return document.addEventListener(J,E),()=>document.removeEventListener(J,E)},[]),x.jsx(V.div,{...h,ref:w,style:{pointerEvents:b?S?"auto":"none":void 0,...e.style},onFocusCapture:X(e.onFocusCapture,P.onFocusCapture),onBlurCapture:X(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:X(e.onPointerDownCapture,C.onPointerDownCapture)})});qe.displayName=ze;var Qe="DismissableLayerBranch",Je=c.forwardRef((e,t)=>{const n=c.useContext(Ee),r=c.useRef(null),o=te(t,r);return c.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),x.jsx(V.div,{...e,ref:o})});Je.displayName=Qe;function et(e,t=globalThis==null?void 0:globalThis.document){const n=F(e),r=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let h=function(){ge(Ge,n,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=h,t.addEventListener("click",o.current,{once:!0})):h()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function tt(e,t=globalThis==null?void 0:globalThis.document){const n=F(e),r=c.useRef(!1);return c.useEffect(()=>{const o=i=>{i.target&&!r.current&&ge(Ze,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ae(){const e=new CustomEvent(J);document.dispatchEvent(e)}function ge(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Ye(o,i):o.dispatchEvent(i)}var Y="focusScope.autoFocusOnMount",H="focusScope.autoFocusOnUnmount",ce={bubbles:!1,cancelable:!0},nt="FocusScope",rt=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[a,h]=c.useState(null),l=F(o),f=F(i),d=c.useRef(null),v=te(t,u=>h(u)),y=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(r){let u=function(b){if(y.paused||!a)return;const S=b.target;a.contains(S)?d.current=S:O(d.current,{select:!0})},m=function(b){if(y.paused||!a)return;const S=b.relatedTarget;S!==null&&(a.contains(S)||O(d.current,{select:!0}))},p=function(b){if(document.activeElement===document.body)for(const C of b)C.removedNodes.length>0&&O(a)};document.addEventListener("focusin",u),document.addEventListener("focusout",m);const g=new MutationObserver(p);return a&&g.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",u),document.removeEventListener("focusout",m),g.disconnect()}}},[r,a,y.paused]),c.useEffect(()=>{if(a){se.add(y);const u=document.activeElement;if(!a.contains(u)){const p=new CustomEvent(Y,ce);a.addEventListener(Y,l),a.dispatchEvent(p),p.defaultPrevented||(ot(ut(be(a)),{select:!0}),document.activeElement===u&&O(a))}return()=>{a.removeEventListener(Y,l),setTimeout(()=>{const p=new CustomEvent(H,ce);a.addEventListener(H,f),a.dispatchEvent(p),p.defaultPrevented||O(u??document.body,{select:!0}),a.removeEventListener(H,f),se.remove(y)},0)}}},[a,l,f,y]);const w=c.useCallback(u=>{if(!n&&!r||y.paused)return;const m=u.key==="Tab"&&!u.altKey&&!u.ctrlKey&&!u.metaKey,p=document.activeElement;if(m&&p){const g=u.currentTarget,[b,S]=at(g);b&&S?!u.shiftKey&&p===S?(u.preventDefault(),n&&O(b,{select:!0})):u.shiftKey&&p===b&&(u.preventDefault(),n&&O(S,{select:!0})):p===g&&u.preventDefault()}},[n,r,y.paused]);return x.jsx(V.div,{tabIndex:-1,...s,ref:v,onKeyDown:w})});rt.displayName=nt;function ot(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(O(r,{select:t}),document.activeElement!==n)return}function at(e){const t=be(e),n=ie(t,e),r=ie(t.reverse(),e);return[n,r]}function be(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ie(e,t){for(const n of e)if(!ct(n,{upTo:t}))return n}function ct(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function it(e){return e instanceof HTMLInputElement&&"select"in e}function O(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&it(e)&&t&&e.select()}}var se=st();function st(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=ue(e,t),e.unshift(t)},remove(t){var n;e=ue(e,t),(n=e[0])==null||n.resume()}}}function ue(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function ut(e){return e.filter(t=>t.tagName!=="A")}var lt="Portal",ft=c.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,i]=c.useState(!1);ne(()=>i(!0),[]);const s=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return s?De.createPortal(x.jsx(V.div,{...r,ref:t}),s):null});ft.displayName=lt;var z=0;function rn(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??le()),document.body.insertAdjacentElement("beforeend",e[1]??le()),z++,()=>{z===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),z--}},[])}function le(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var R=function(){return R=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},R.apply(this,arguments)};function Se(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function dt(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var U="right-scroll-bar-position",$="width-before-scroll-bar",vt="with-scroll-bars-hidden",ht="--removed-body-scroll-bar-size";function G(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function mt(e,t){var n=c.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var pt=typeof window<"u"?c.useLayoutEffect:c.useEffect,fe=new WeakMap;function yt(e,t){var n=mt(null,function(r){return e.forEach(function(o){return G(o,r)})});return pt(function(){var r=fe.get(n);if(r){var o=new Set(r),i=new Set(e),s=n.current;o.forEach(function(a){i.has(a)||G(a,null)}),i.forEach(function(a){o.has(a)||G(a,s)})}fe.set(n,e)},[e]),n}function Et(e){return e}function gt(e,t){t===void 0&&(t=Et);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var s=t(i,r);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(i){for(r=!0;n.length;){var s=n;n=[],s.forEach(i)}n={push:function(a){return i(a)},filter:function(){return n}}},assignMedium:function(i){r=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(i),s=n}var h=function(){var f=s;s=[],f.forEach(i)},l=function(){return Promise.resolve().then(h)};l(),n={push:function(f){s.push(f),l()},filter:function(f){return s=s.filter(f),n}}}};return o}function bt(e){e===void 0&&(e={});var t=gt(null);return t.options=R({async:!0,ssr:!1},e),t}var we=function(e){var t=e.sideCar,n=Se(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return c.createElement(r,R({},n))};we.isSideCarExport=!0;function St(e,t){return e.useMedium(t),we}var Ce=bt(),Z=function(){},K=c.forwardRef(function(e,t){var n=c.useRef(null),r=c.useState({onScrollCapture:Z,onWheelCapture:Z,onTouchMoveCapture:Z}),o=r[0],i=r[1],s=e.forwardProps,a=e.children,h=e.className,l=e.removeScrollBar,f=e.enabled,d=e.shards,v=e.sideCar,y=e.noRelative,w=e.noIsolation,u=e.inert,m=e.allowPinchZoom,p=e.as,g=p===void 0?"div":p,b=e.gapMode,S=Se(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=v,P=yt([n,t]),E=R(R({},S),o);return c.createElement(c.Fragment,null,f&&c.createElement(C,{sideCar:Ce,removeScrollBar:l,shards:d,noRelative:y,noIsolation:w,inert:u,setCallbacks:i,allowPinchZoom:!!m,lockRef:n,gapMode:b}),s?c.cloneElement(c.Children.only(a),R(R({},E),{ref:P})):c.createElement(g,R({},E,{className:h,ref:P}),a))});K.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};K.classNames={fullWidth:$,zeroRight:U};var wt=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Ct(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=wt();return t&&e.setAttribute("nonce",t),e}function Pt(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Rt(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var xt=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Ct())&&(Pt(t,n),Rt(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ot=function(){var e=xt();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Pe=function(){var e=Ot(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Lt={left:0,top:0,right:0,gap:0},q=function(e){return parseInt(e||"",10)||0},Tt=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[q(n),q(r),q(o)]},At=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Lt;var t=Tt(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Nt=Pe(),k="data-scroll-locked",Dt=function(e,t,n,r){var o=e.left,i=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
1
|
+
import{G as Te,aK as Ae,r as c,j as x,aL as pe,aM as Ne,aA as te}from"./index-BYyDk28K.js";var ye=Ae();const De=Te(ye);function X(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Jt(e,t){const n=c.createContext(t),r=i=>{const{children:s,...a}=i,h=c.useMemo(()=>a,Object.values(a));return x.jsx(n.Provider,{value:h,children:s})};r.displayName=e+"Provider";function o(i){const s=c.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function en(e,t=[]){let n=[];function r(i,s){const a=c.createContext(s),h=n.length;n=[...n,s];const l=d=>{var p;const{scope:v,children:y,...w}=d,u=((p=v==null?void 0:v[e])==null?void 0:p[h])||a,m=c.useMemo(()=>w,Object.values(w));return x.jsx(u.Provider,{value:m,children:y})};l.displayName=i+"Provider";function f(d,v){var u;const y=((u=v==null?void 0:v[e])==null?void 0:u[h])||a,w=c.useContext(y);if(w)return w;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[l,f]}const o=()=>{const i=n.map(s=>c.createContext(s));return function(a){const h=(a==null?void 0:a[e])||i;return c.useMemo(()=>({[`__scope${e}`]:{...a,[e]:h}}),[a,h])}};return o.scopeName=e,[r,ke(o,...t)]}function ke(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=r.reduce((a,{useScope:h,scopeName:l})=>{const d=h(i)[`__scope${l}`];return{...a,...d}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}var ne=globalThis!=null&&globalThis.document?c.useLayoutEffect:()=>{},Me=pe[" useId ".trim().toString()]||(()=>{}),Fe=0;function tn(e){const[t,n]=c.useState(Me());return ne(()=>{n(r=>r??String(Fe++))},[e]),e||(t?`radix-${t}`:"")}var Ie=pe[" useInsertionEffect ".trim().toString()]||ne;function nn({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,s]=We({defaultProp:t,onChange:n}),a=e!==void 0,h=a?e:o;{const f=c.useRef(e!==void 0);c.useEffect(()=>{const d=f.current;d!==a&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=a},[a,r])}const l=c.useCallback(f=>{var d;if(a){const v=Be(f)?f(e):f;v!==e&&((d=s.current)==null||d.call(s,v))}else i(f)},[a,e,i,s]);return[h,l]}function We({defaultProp:e,onChange:t}){const[n,r]=c.useState(e),o=c.useRef(n),i=c.useRef(t);return Ie(()=>{i.current=t},[t]),c.useEffect(()=>{var s;o.current!==n&&((s=i.current)==null||s.call(i,n),o.current=n)},[n,o]),[n,r,i]}function Be(e){return typeof e=="function"}function _e(e){const t=je(e),n=c.forwardRef((r,o)=>{const{children:i,...s}=r,a=c.Children.toArray(i),h=a.find($e);if(h){const l=h.props.children,f=a.map(d=>d===h?c.Children.count(l)>1?c.Children.only(null):c.isValidElement(l)?l.props.children:null:d);return x.jsx(t,{...s,ref:o,children:c.isValidElement(l)?c.cloneElement(l,void 0,f):null})}return x.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function je(e){const t=c.forwardRef((n,r)=>{const{children:o,...i}=n;if(c.isValidElement(o)){const s=Ke(o),a=Ve(i,o.props);return o.type!==c.Fragment&&(a.ref=r?Ne(r,s):s),c.cloneElement(o,a)}return c.Children.count(o)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ue=Symbol("radix.slottable");function $e(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ue}function Ve(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{const h=i(...a);return o(...a),h}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Ke(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Xe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],V=Xe.reduce((e,t)=>{const n=_e(`Primitive.${t}`),r=c.forwardRef((o,i)=>{const{asChild:s,...a}=o,h=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(h,{...a,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Ye(e,t){e&&ye.flushSync(()=>e.dispatchEvent(t))}function F(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function He(e,t=globalThis==null?void 0:globalThis.document){const n=F(e);c.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var ze="DismissableLayer",J="dismissableLayer.update",Ge="dismissableLayer.pointerDownOutside",Ze="dismissableLayer.focusOutside",oe,Ee=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),qe=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:a,...h}=e,l=c.useContext(Ee),[f,d]=c.useState(null),v=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,y]=c.useState({}),w=te(t,E=>d(E)),u=Array.from(l.layers),[m]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),p=u.indexOf(m),g=f?u.indexOf(f):-1,b=l.layersWithOutsidePointerEventsDisabled.size>0,S=g>=p,C=et(E=>{const L=E.target,T=[...l.branches].some(M=>M.contains(L));!S||T||(o==null||o(E),s==null||s(E),E.defaultPrevented||a==null||a())},v),P=tt(E=>{const L=E.target;[...l.branches].some(M=>M.contains(L))||(i==null||i(E),s==null||s(E),E.defaultPrevented||a==null||a())},v);return He(E=>{g===l.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},v),c.useEffect(()=>{if(f)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(oe=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(f)),l.layers.add(f),ae(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=oe)}},[f,v,n,l]),c.useEffect(()=>()=>{f&&(l.layers.delete(f),l.layersWithOutsidePointerEventsDisabled.delete(f),ae())},[f,l]),c.useEffect(()=>{const E=()=>y({});return document.addEventListener(J,E),()=>document.removeEventListener(J,E)},[]),x.jsx(V.div,{...h,ref:w,style:{pointerEvents:b?S?"auto":"none":void 0,...e.style},onFocusCapture:X(e.onFocusCapture,P.onFocusCapture),onBlurCapture:X(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:X(e.onPointerDownCapture,C.onPointerDownCapture)})});qe.displayName=ze;var Qe="DismissableLayerBranch",Je=c.forwardRef((e,t)=>{const n=c.useContext(Ee),r=c.useRef(null),o=te(t,r);return c.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),x.jsx(V.div,{...e,ref:o})});Je.displayName=Qe;function et(e,t=globalThis==null?void 0:globalThis.document){const n=F(e),r=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let h=function(){ge(Ge,n,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=h,t.addEventListener("click",o.current,{once:!0})):h()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function tt(e,t=globalThis==null?void 0:globalThis.document){const n=F(e),r=c.useRef(!1);return c.useEffect(()=>{const o=i=>{i.target&&!r.current&&ge(Ze,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ae(){const e=new CustomEvent(J);document.dispatchEvent(e)}function ge(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Ye(o,i):o.dispatchEvent(i)}var Y="focusScope.autoFocusOnMount",H="focusScope.autoFocusOnUnmount",ce={bubbles:!1,cancelable:!0},nt="FocusScope",rt=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[a,h]=c.useState(null),l=F(o),f=F(i),d=c.useRef(null),v=te(t,u=>h(u)),y=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(r){let u=function(b){if(y.paused||!a)return;const S=b.target;a.contains(S)?d.current=S:O(d.current,{select:!0})},m=function(b){if(y.paused||!a)return;const S=b.relatedTarget;S!==null&&(a.contains(S)||O(d.current,{select:!0}))},p=function(b){if(document.activeElement===document.body)for(const C of b)C.removedNodes.length>0&&O(a)};document.addEventListener("focusin",u),document.addEventListener("focusout",m);const g=new MutationObserver(p);return a&&g.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",u),document.removeEventListener("focusout",m),g.disconnect()}}},[r,a,y.paused]),c.useEffect(()=>{if(a){se.add(y);const u=document.activeElement;if(!a.contains(u)){const p=new CustomEvent(Y,ce);a.addEventListener(Y,l),a.dispatchEvent(p),p.defaultPrevented||(ot(ut(be(a)),{select:!0}),document.activeElement===u&&O(a))}return()=>{a.removeEventListener(Y,l),setTimeout(()=>{const p=new CustomEvent(H,ce);a.addEventListener(H,f),a.dispatchEvent(p),p.defaultPrevented||O(u??document.body,{select:!0}),a.removeEventListener(H,f),se.remove(y)},0)}}},[a,l,f,y]);const w=c.useCallback(u=>{if(!n&&!r||y.paused)return;const m=u.key==="Tab"&&!u.altKey&&!u.ctrlKey&&!u.metaKey,p=document.activeElement;if(m&&p){const g=u.currentTarget,[b,S]=at(g);b&&S?!u.shiftKey&&p===S?(u.preventDefault(),n&&O(b,{select:!0})):u.shiftKey&&p===b&&(u.preventDefault(),n&&O(S,{select:!0})):p===g&&u.preventDefault()}},[n,r,y.paused]);return x.jsx(V.div,{tabIndex:-1,...s,ref:v,onKeyDown:w})});rt.displayName=nt;function ot(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(O(r,{select:t}),document.activeElement!==n)return}function at(e){const t=be(e),n=ie(t,e),r=ie(t.reverse(),e);return[n,r]}function be(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ie(e,t){for(const n of e)if(!ct(n,{upTo:t}))return n}function ct(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function it(e){return e instanceof HTMLInputElement&&"select"in e}function O(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&it(e)&&t&&e.select()}}var se=st();function st(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=ue(e,t),e.unshift(t)},remove(t){var n;e=ue(e,t),(n=e[0])==null||n.resume()}}}function ue(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function ut(e){return e.filter(t=>t.tagName!=="A")}var lt="Portal",ft=c.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,i]=c.useState(!1);ne(()=>i(!0),[]);const s=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return s?De.createPortal(x.jsx(V.div,{...r,ref:t}),s):null});ft.displayName=lt;var z=0;function rn(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??le()),document.body.insertAdjacentElement("beforeend",e[1]??le()),z++,()=>{z===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),z--}},[])}function le(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var R=function(){return R=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},R.apply(this,arguments)};function Se(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function dt(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var U="right-scroll-bar-position",$="width-before-scroll-bar",vt="with-scroll-bars-hidden",ht="--removed-body-scroll-bar-size";function G(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function mt(e,t){var n=c.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var pt=typeof window<"u"?c.useLayoutEffect:c.useEffect,fe=new WeakMap;function yt(e,t){var n=mt(null,function(r){return e.forEach(function(o){return G(o,r)})});return pt(function(){var r=fe.get(n);if(r){var o=new Set(r),i=new Set(e),s=n.current;o.forEach(function(a){i.has(a)||G(a,null)}),i.forEach(function(a){o.has(a)||G(a,s)})}fe.set(n,e)},[e]),n}function Et(e){return e}function gt(e,t){t===void 0&&(t=Et);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var s=t(i,r);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(i){for(r=!0;n.length;){var s=n;n=[],s.forEach(i)}n={push:function(a){return i(a)},filter:function(){return n}}},assignMedium:function(i){r=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(i),s=n}var h=function(){var f=s;s=[],f.forEach(i)},l=function(){return Promise.resolve().then(h)};l(),n={push:function(f){s.push(f),l()},filter:function(f){return s=s.filter(f),n}}}};return o}function bt(e){e===void 0&&(e={});var t=gt(null);return t.options=R({async:!0,ssr:!1},e),t}var we=function(e){var t=e.sideCar,n=Se(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return c.createElement(r,R({},n))};we.isSideCarExport=!0;function St(e,t){return e.useMedium(t),we}var Ce=bt(),Z=function(){},K=c.forwardRef(function(e,t){var n=c.useRef(null),r=c.useState({onScrollCapture:Z,onWheelCapture:Z,onTouchMoveCapture:Z}),o=r[0],i=r[1],s=e.forwardProps,a=e.children,h=e.className,l=e.removeScrollBar,f=e.enabled,d=e.shards,v=e.sideCar,y=e.noRelative,w=e.noIsolation,u=e.inert,m=e.allowPinchZoom,p=e.as,g=p===void 0?"div":p,b=e.gapMode,S=Se(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=v,P=yt([n,t]),E=R(R({},S),o);return c.createElement(c.Fragment,null,f&&c.createElement(C,{sideCar:Ce,removeScrollBar:l,shards:d,noRelative:y,noIsolation:w,inert:u,setCallbacks:i,allowPinchZoom:!!m,lockRef:n,gapMode:b}),s?c.cloneElement(c.Children.only(a),R(R({},E),{ref:P})):c.createElement(g,R({},E,{className:h,ref:P}),a))});K.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};K.classNames={fullWidth:$,zeroRight:U};var wt=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Ct(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=wt();return t&&e.setAttribute("nonce",t),e}function Pt(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Rt(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var xt=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Ct())&&(Pt(t,n),Rt(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ot=function(){var e=xt();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Pe=function(){var e=Ot(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Lt={left:0,top:0,right:0,gap:0},q=function(e){return parseInt(e||"",10)||0},Tt=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[q(n),q(r),q(o)]},At=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Lt;var t=Tt(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Nt=Pe(),k="data-scroll-locked",Dt=function(e,t,n,r){var o=e.left,i=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
2
2
|
.`.concat(vt,` {
|
|
3
3
|
overflow: hidden `).concat(r,`;
|
|
4
4
|
padding-right: `).concat(a,"px ").concat(r,`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{z as t}from"./index-BYyDk28K.js";const e=()=>t.get("/projects"),r=o=>t.get(`/projects/${o}`);export{r as g,e as l};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z as o}from"./index-
|
|
1
|
+
import{z as o}from"./index-BYyDk28K.js";const i=s=>o.get(`/projects/${s}/sessions`),c=(s,e,t)=>o.get(`/projects/${s}/sessions/${e}`,{history_limit:String(t)}),r=(s,e,t)=>o.patch(`/projects/${s}/sessions/${e}`,t),a=(s,e)=>o.delete(`/projects/${s}/sessions/${e}`),p=(s,e)=>o.post(`/projects/${s}/sessions/switch`,e),$=(s,e)=>o.post(`/projects/${s}/send`,e);export{$ as a,a as d,c as g,i as l,r,p as s};
|
package/dist/renderer/index.html
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="./favicon.svg" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>AgentDock</title>
|
|
8
|
-
<script type="module" crossorigin src="./assets/index-
|
|
8
|
+
<script type="module" crossorigin src="./assets/index-BYyDk28K.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="./assets/index-DFiJR0vv.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body class="bg-[#f5f5f7] dark:bg-[#151516]">
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.LocalCoreAcpResponseProcessor = void 0;
|
|
4
4
|
const cron_command_detector_js_1 = require("../scheduler/cron-command-detector.js");
|
|
5
5
|
const job_id_js_1 = require("../scheduler/job-id.js");
|
|
6
|
+
const scheduled_job_route_js_1 = require("../scheduler/scheduled-job-route.js");
|
|
6
7
|
class LocalCoreAcpResponseProcessor {
|
|
7
8
|
options;
|
|
8
9
|
constructor(options) {
|
|
@@ -74,10 +75,7 @@ class LocalCoreAcpResponseProcessor {
|
|
|
74
75
|
const job = await this.options.scheduler.createJob({
|
|
75
76
|
workspaceId: binding.workspaceId,
|
|
76
77
|
platform: binding.platform,
|
|
77
|
-
route:
|
|
78
|
-
...binding.route,
|
|
79
|
-
threadId,
|
|
80
|
-
},
|
|
78
|
+
route: (0, scheduled_job_route_js_1.withoutThreadRoute)(binding.route),
|
|
81
79
|
name: command.name,
|
|
82
80
|
schedule: command.schedule,
|
|
83
81
|
scheduleDescription: command.scheduleDescription,
|
|
@@ -7,6 +7,7 @@ exports.runCli = runCli;
|
|
|
7
7
|
const node_process_1 = __importDefault(require("node:process"));
|
|
8
8
|
const index_js_1 = require("../../../../packages/contracts/src/index.js");
|
|
9
9
|
const job_id_js_1 = require("../scheduler/job-id.js");
|
|
10
|
+
const scheduled_job_route_js_1 = require("../scheduler/scheduled-job-route.js");
|
|
10
11
|
const DEFAULT_BASE_URL = 'http://127.0.0.1:9831/api/local/v1';
|
|
11
12
|
async function runCli(argv, env = node_process_1.default.env, io = node_process_1.default) {
|
|
12
13
|
try {
|
|
@@ -118,7 +119,7 @@ async function handleList(flags, env, io, json) {
|
|
|
118
119
|
const suffix = workspaceId ? `?workspace_id=${encodeURIComponent(workspaceId)}` : '';
|
|
119
120
|
const response = await request(context.baseUrl, 'GET', `/scheduler/jobs${suffix}`);
|
|
120
121
|
const jobs = threadId
|
|
121
|
-
? response.jobs.filter((job) => job.route.threadId === threadId)
|
|
122
|
+
? response.jobs.filter((job) => job.route.threadId === threadId || (0, scheduled_job_route_js_1.scheduledJobMatchesCliContext)(job, context))
|
|
122
123
|
: response.jobs;
|
|
123
124
|
print(json, io.stdout, { jobs: jobs.map(presentJob) }, jobs.length === 0 ? 'No scheduler jobs.' : jobs.map(formatJobLine).join('\n'));
|
|
124
125
|
return 0;
|
|
@@ -20,6 +20,7 @@ const scheduler_weixin_plugin_js_1 = require("../plugins/builtin/scheduler-weixi
|
|
|
20
20
|
const workspace_router_js_1 = require("../router/workspace-router.js");
|
|
21
21
|
const local_core_runtime_state_js_1 = require("../runtime/local-core-runtime-state.js");
|
|
22
22
|
const scheduler_service_js_1 = require("../scheduler/scheduler-service.js");
|
|
23
|
+
const scheduled_job_route_js_1 = require("../scheduler/scheduled-job-route.js");
|
|
23
24
|
function bootstrapLocalCoreKernel(options) {
|
|
24
25
|
const capabilities = new capability_registry_js_1.LocalCoreCapabilityRegistry();
|
|
25
26
|
const plugins = new plugin_registry_js_1.LocalCorePluginRegistry(options?.disabledPluginIds);
|
|
@@ -265,16 +266,20 @@ function bootstrapLocalCoreRuntime(options) {
|
|
|
265
266
|
createJob: async ({ workspaceId, platform, route, name, schedule, scheduleDescription, message }) => scheduler.createJob({
|
|
266
267
|
workspaceId,
|
|
267
268
|
platform,
|
|
268
|
-
route,
|
|
269
|
+
route: (0, scheduled_job_route_js_1.withoutThreadRoute)(route),
|
|
269
270
|
triggerType: 'cron',
|
|
270
271
|
cronExpr: schedule,
|
|
271
272
|
promptTemplate: message,
|
|
272
273
|
description: `${name} · ${scheduleDescription}`,
|
|
273
274
|
enabled: true,
|
|
274
275
|
}),
|
|
275
|
-
listJobsForThread: async (threadId) =>
|
|
276
|
-
.
|
|
277
|
-
|
|
276
|
+
listJobsForThread: async (threadId) => {
|
|
277
|
+
const binding = store.getPlatformThreadBindingByThreadId(threadId);
|
|
278
|
+
return scheduler
|
|
279
|
+
.listJobs()
|
|
280
|
+
.filter((job) => job.route.threadId === threadId ||
|
|
281
|
+
(binding ? (0, scheduled_job_route_js_1.scheduledJobMatchesPlatformBinding)(job, binding) : false));
|
|
282
|
+
},
|
|
278
283
|
deleteJob: async (jobId) => {
|
|
279
284
|
scheduler.deleteJob(jobId);
|
|
280
285
|
},
|
|
@@ -4,6 +4,7 @@ exports.LocalCoreController = void 0;
|
|
|
4
4
|
const node_events_1 = require("node:events");
|
|
5
5
|
const desktop_js_1 = require("../../../../shared/desktop.js");
|
|
6
6
|
const bootstrap_js_1 = require("../kernel/bootstrap.js");
|
|
7
|
+
const scheduled_job_route_js_1 = require("../scheduler/scheduled-job-route.js");
|
|
7
8
|
const runtime_detection_service_js_1 = require("./runtime-detection-service.js");
|
|
8
9
|
class LocalCoreController extends node_events_1.EventEmitter {
|
|
9
10
|
userDataPath;
|
|
@@ -195,7 +196,10 @@ class LocalCoreController extends node_events_1.EventEmitter {
|
|
|
195
196
|
}
|
|
196
197
|
resolveScheduledJobCreateInput(input) {
|
|
197
198
|
if (input.platform && input.route) {
|
|
198
|
-
return
|
|
199
|
+
return {
|
|
200
|
+
...input,
|
|
201
|
+
route: (0, scheduled_job_route_js_1.withoutThreadRoute)(input.route),
|
|
202
|
+
};
|
|
199
203
|
}
|
|
200
204
|
const threadId = String(input.threadId || input.route?.threadId || '').trim();
|
|
201
205
|
if (threadId) {
|
|
@@ -208,7 +212,6 @@ class LocalCoreController extends node_events_1.EventEmitter {
|
|
|
208
212
|
type: 'channel.chat',
|
|
209
213
|
channelId: binding.chat_id,
|
|
210
214
|
participantId: binding.platform_user_id,
|
|
211
|
-
threadId,
|
|
212
215
|
},
|
|
213
216
|
};
|
|
214
217
|
}
|
|
@@ -219,12 +222,14 @@ class LocalCoreController extends node_events_1.EventEmitter {
|
|
|
219
222
|
route: {
|
|
220
223
|
type: 'local.thread',
|
|
221
224
|
channelId: input.workspaceId,
|
|
222
|
-
...(threadId ? { threadId } : {}),
|
|
223
225
|
},
|
|
224
226
|
};
|
|
225
227
|
}
|
|
226
228
|
async updateScheduledJob(jobId, input) {
|
|
227
|
-
return this.scheduler.updateJob(jobId,
|
|
229
|
+
return this.scheduler.updateJob(jobId, {
|
|
230
|
+
...input,
|
|
231
|
+
...(input.route ? { route: (0, scheduled_job_route_js_1.withoutThreadRoute)(input.route) } : {}),
|
|
232
|
+
});
|
|
228
233
|
}
|
|
229
234
|
async deleteScheduledJob(jobId) {
|
|
230
235
|
return this.scheduler.deleteJob(jobId);
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.LarkScheduleAdapter = void 0;
|
|
4
4
|
const scheduled_conversation_executor_js_1 = require("./scheduled-conversation-executor.js");
|
|
5
5
|
const lark_execution_policies_js_1 = require("./lark-execution-policies.js");
|
|
6
|
+
const scheduled_job_route_js_1 = require("./scheduled-job-route.js");
|
|
6
7
|
class LarkScheduleAdapter {
|
|
7
8
|
options;
|
|
8
9
|
executor;
|
|
@@ -31,7 +32,7 @@ class LarkScheduleAdapter {
|
|
|
31
32
|
if (!channelRuntime.sendScheduledMessage) {
|
|
32
33
|
throw new Error('Lark channel runtime does not support scheduled delivery.');
|
|
33
34
|
}
|
|
34
|
-
platformMessageId = await channelRuntime.sendScheduledMessage(job.workspaceId, job.route, execution.replyText);
|
|
35
|
+
platformMessageId = await channelRuntime.sendScheduledMessage(job.workspaceId, (0, scheduled_job_route_js_1.withoutThreadRoute)(job.route), execution.replyText);
|
|
35
36
|
if (!platformMessageId) {
|
|
36
37
|
throw new Error('Lark gateway did not return a message id for scheduled delivery.');
|
|
37
38
|
}
|
|
@@ -46,16 +47,15 @@ class LarkScheduleAdapter {
|
|
|
46
47
|
async resolveThread(job) {
|
|
47
48
|
const workspaceRouter = this.options.getWorkspaceRouter();
|
|
48
49
|
const route = job.route;
|
|
49
|
-
if (route.threadId) {
|
|
50
|
-
await workspaceRouter.getThread(route.threadId);
|
|
51
|
-
return route.threadId;
|
|
52
|
-
}
|
|
53
50
|
const channelId = route.channelId;
|
|
54
51
|
const participantId = route.participantId || '';
|
|
55
|
-
const binding = this.options.store.getPlatformThreadBinding(job.workspaceId, channelId, participantId);
|
|
56
|
-
if (binding?.thread_id) {
|
|
52
|
+
const binding = this.options.store.getPlatformThreadBinding(job.workspaceId, channelId, participantId, 'lark');
|
|
53
|
+
if (binding?.thread_id && await this.threadExists(binding.thread_id)) {
|
|
57
54
|
return binding.thread_id;
|
|
58
55
|
}
|
|
56
|
+
if (route.threadId && await this.threadExists(route.threadId)) {
|
|
57
|
+
return route.threadId;
|
|
58
|
+
}
|
|
59
59
|
const thread = await workspaceRouter.createThread(job.workspaceId, job.description || `Scheduled ${job.platform} task`);
|
|
60
60
|
const now = new Date().toISOString();
|
|
61
61
|
this.options.store.upsertPlatformThreadBinding({
|
|
@@ -73,5 +73,14 @@ class LarkScheduleAdapter {
|
|
|
73
73
|
}
|
|
74
74
|
return thread.id;
|
|
75
75
|
}
|
|
76
|
+
async threadExists(threadId) {
|
|
77
|
+
try {
|
|
78
|
+
await this.options.getWorkspaceRouter().getThread(threadId);
|
|
79
|
+
return true;
|
|
80
|
+
}
|
|
81
|
+
catch {
|
|
82
|
+
return false;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
76
85
|
}
|
|
77
86
|
exports.LarkScheduleAdapter = LarkScheduleAdapter;
|
|
@@ -33,8 +33,7 @@ class LocalScheduleAdapter {
|
|
|
33
33
|
}
|
|
34
34
|
async resolveThread(job) {
|
|
35
35
|
const workspaceRouter = this.options.getWorkspaceRouter();
|
|
36
|
-
if (job.route.threadId) {
|
|
37
|
-
await workspaceRouter.getThread(job.route.threadId);
|
|
36
|
+
if (job.route.threadId && await this.threadExists(job.route.threadId)) {
|
|
38
37
|
return job.route.threadId;
|
|
39
38
|
}
|
|
40
39
|
const title = `[Scheduled] ${job.description || job.id}`;
|
|
@@ -46,6 +45,15 @@ class LocalScheduleAdapter {
|
|
|
46
45
|
const created = await workspaceRouter.createThread(job.workspaceId, title);
|
|
47
46
|
return created.id;
|
|
48
47
|
}
|
|
48
|
+
async threadExists(threadId) {
|
|
49
|
+
try {
|
|
50
|
+
await this.options.getWorkspaceRouter().getThread(threadId);
|
|
51
|
+
return true;
|
|
52
|
+
}
|
|
53
|
+
catch {
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
49
57
|
async waitForRun(runId, timeoutMs = 15 * 60 * 1000) {
|
|
50
58
|
const startedAt = Date.now();
|
|
51
59
|
while (Date.now() - startedAt < timeoutMs) {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.withoutThreadRoute = withoutThreadRoute;
|
|
4
|
+
exports.scheduledJobMatchesPlatformBinding = scheduledJobMatchesPlatformBinding;
|
|
5
|
+
exports.scheduledJobMatchesCliContext = scheduledJobMatchesCliContext;
|
|
6
|
+
function withoutThreadRoute(route) {
|
|
7
|
+
const { threadId: _threadId, ...deliveryRoute } = route;
|
|
8
|
+
return deliveryRoute;
|
|
9
|
+
}
|
|
10
|
+
function scheduledJobMatchesPlatformBinding(job, binding) {
|
|
11
|
+
return (job.workspaceId === binding.workspace_id &&
|
|
12
|
+
job.platform === binding.platform &&
|
|
13
|
+
job.route.channelId === binding.chat_id &&
|
|
14
|
+
String(job.route.participantId || '') === String(binding.platform_user_id || ''));
|
|
15
|
+
}
|
|
16
|
+
function scheduledJobMatchesCliContext(job, context) {
|
|
17
|
+
if (!context.workspaceId || !context.platform || !context.chatId) {
|
|
18
|
+
return false;
|
|
19
|
+
}
|
|
20
|
+
return (job.workspaceId === context.workspaceId &&
|
|
21
|
+
job.platform === context.platform &&
|
|
22
|
+
job.route.channelId === context.chatId &&
|
|
23
|
+
String(job.route.participantId || '') === String(context.platformUserId || ''));
|
|
24
|
+
}
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.WeixinScheduleAdapter = void 0;
|
|
4
4
|
const scheduled_conversation_executor_js_1 = require("./scheduled-conversation-executor.js");
|
|
5
5
|
const weixin_execution_policies_js_1 = require("./weixin-execution-policies.js");
|
|
6
|
+
const scheduled_job_route_js_1 = require("./scheduled-job-route.js");
|
|
6
7
|
class WeixinScheduleAdapter {
|
|
7
8
|
options;
|
|
8
9
|
executor;
|
|
@@ -31,7 +32,7 @@ class WeixinScheduleAdapter {
|
|
|
31
32
|
if (!channelRuntime.sendScheduledMessage) {
|
|
32
33
|
throw new Error('WeChat channel runtime does not support scheduled delivery.');
|
|
33
34
|
}
|
|
34
|
-
platformMessageId = await channelRuntime.sendScheduledMessage(job.workspaceId, job.route, execution.replyText);
|
|
35
|
+
platformMessageId = await channelRuntime.sendScheduledMessage(job.workspaceId, (0, scheduled_job_route_js_1.withoutThreadRoute)(job.route), execution.replyText);
|
|
35
36
|
if (!platformMessageId) {
|
|
36
37
|
throw new Error('WeChat gateway did not return a message id for scheduled delivery.');
|
|
37
38
|
}
|
|
@@ -46,16 +47,15 @@ class WeixinScheduleAdapter {
|
|
|
46
47
|
async resolveThread(job) {
|
|
47
48
|
const workspaceRouter = this.options.getWorkspaceRouter();
|
|
48
49
|
const route = job.route;
|
|
49
|
-
if (route.threadId) {
|
|
50
|
-
await workspaceRouter.getThread(route.threadId);
|
|
51
|
-
return route.threadId;
|
|
52
|
-
}
|
|
53
50
|
const channelId = route.channelId;
|
|
54
51
|
const participantId = route.participantId || '';
|
|
55
52
|
const binding = this.options.store.getPlatformThreadBinding(job.workspaceId, channelId, participantId, 'weixin');
|
|
56
|
-
if (binding?.thread_id) {
|
|
53
|
+
if (binding?.thread_id && await this.threadExists(binding.thread_id)) {
|
|
57
54
|
return binding.thread_id;
|
|
58
55
|
}
|
|
56
|
+
if (route.threadId && await this.threadExists(route.threadId)) {
|
|
57
|
+
return route.threadId;
|
|
58
|
+
}
|
|
59
59
|
const thread = await workspaceRouter.createThread(job.workspaceId, job.description || `Scheduled ${job.platform} task`);
|
|
60
60
|
const now = new Date().toISOString();
|
|
61
61
|
this.options.store.upsertPlatformThreadBinding({
|
|
@@ -74,5 +74,14 @@ class WeixinScheduleAdapter {
|
|
|
74
74
|
}
|
|
75
75
|
return thread.id;
|
|
76
76
|
}
|
|
77
|
+
async threadExists(threadId) {
|
|
78
|
+
try {
|
|
79
|
+
await this.options.getWorkspaceRouter().getThread(threadId);
|
|
80
|
+
return true;
|
|
81
|
+
}
|
|
82
|
+
catch {
|
|
83
|
+
return false;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
77
86
|
}
|
|
78
87
|
exports.WeixinScheduleAdapter = WeixinScheduleAdapter;
|
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const node_test_1 = __importDefault(require("node:test"));
|
|
7
7
|
const strict_1 = __importDefault(require("node:assert/strict"));
|
|
8
|
-
const index_js_1 = require("
|
|
8
|
+
const index_js_1 = require("../../packages/contracts/src/index.js");
|
|
9
9
|
(0, node_test_1.default)('scheduled job execution mode normalization accepts canonical aliases', () => {
|
|
10
10
|
strict_1.default.equal((0, index_js_1.normalizeScheduledJobExecutionMode)(undefined), 'same-thread');
|
|
11
11
|
strict_1.default.equal((0, index_js_1.normalizeScheduledJobExecutionMode)('same_thread'), 'same-thread');
|
|
@@ -8,8 +8,8 @@ const strict_1 = __importDefault(require("node:assert/strict"));
|
|
|
8
8
|
const node_fs_1 = require("node:fs");
|
|
9
9
|
const node_path_1 = require("node:path");
|
|
10
10
|
const node_os_1 = require("node:os");
|
|
11
|
-
const agent_runtime_detector_js_1 = require("
|
|
12
|
-
const index_js_1 = require("
|
|
11
|
+
const agent_runtime_detector_js_1 = require("../../services/local-ai-core/src/runtime/agent-runtime-detector.js");
|
|
12
|
+
const index_js_1 = require("../../services/local-ai-core/src/agents/index.js");
|
|
13
13
|
(0, node_test_1.default)('agent runtime definitions own runtime detection metadata', () => {
|
|
14
14
|
strict_1.default.deepEqual((0, index_js_1.resolveAgentRuntimeDefinition)('hermes')?.detection?.commandCandidates, ['hermes']);
|
|
15
15
|
strict_1.default.deepEqual((0, index_js_1.resolveAgentRuntimeDefinition)('codex')?.detection?.bundledRuntimes?.[0], {
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const node_test_1 = __importDefault(require("node:test"));
|
|
7
7
|
const strict_1 = __importDefault(require("node:assert/strict"));
|
|
8
8
|
const node_http_1 = require("node:http");
|
|
9
|
-
const lac_js_1 = require("
|
|
9
|
+
const lac_js_1 = require("../../services/local-ai-core/src/cli/lac.js");
|
|
10
10
|
function createIo() {
|
|
11
11
|
let stdout = '';
|
|
12
12
|
let stderr = '';
|
|
@@ -516,7 +516,7 @@ function createIo() {
|
|
|
516
516
|
id: 'job-1',
|
|
517
517
|
workspaceId: '知识库',
|
|
518
518
|
platform: 'lark',
|
|
519
|
-
route: { type: 'channel.chat', channelId: 'chat-1', participantId: 'user-1'
|
|
519
|
+
route: { type: 'channel.chat', channelId: 'chat-1', participantId: 'user-1' },
|
|
520
520
|
executionMode: 'same-thread',
|
|
521
521
|
triggerType: 'cron',
|
|
522
522
|
cronExpr: '*/2 * * * *',
|
|
@@ -531,7 +531,7 @@ function createIo() {
|
|
|
531
531
|
id: 'job-2',
|
|
532
532
|
workspaceId: '知识库',
|
|
533
533
|
platform: 'lark',
|
|
534
|
-
route: { type: 'channel.chat', channelId: 'chat-2', participantId: 'user-2'
|
|
534
|
+
route: { type: 'channel.chat', channelId: 'chat-2', participantId: 'user-2' },
|
|
535
535
|
executionMode: 'side-thread',
|
|
536
536
|
triggerType: 'cron',
|
|
537
537
|
cronExpr: '0 9 * * *',
|
|
@@ -558,6 +558,9 @@ function createIo() {
|
|
|
558
558
|
LOCAL_AI_CORE_BASE: `http://127.0.0.1:${address.port}/api/local/v1`,
|
|
559
559
|
LOCAL_AI_WORKSPACE_ID: '知识库',
|
|
560
560
|
LOCAL_AI_THREAD_ID: 'thread-1',
|
|
561
|
+
LOCAL_AI_PLATFORM: 'lark',
|
|
562
|
+
LOCAL_AI_CHAT_ID: 'chat-1',
|
|
563
|
+
LOCAL_AI_PLATFORM_USER_ID: 'user-1',
|
|
561
564
|
}, io);
|
|
562
565
|
server.close();
|
|
563
566
|
strict_1.default.equal(exitCode, 0);
|
|
@@ -9,15 +9,15 @@ const node_events_1 = require("node:events");
|
|
|
9
9
|
const node_fs_1 = require("node:fs");
|
|
10
10
|
const node_os_1 = require("node:os");
|
|
11
11
|
const node_path_1 = require("node:path");
|
|
12
|
-
const bootstrap_js_1 = require("
|
|
13
|
-
const bootstrap_js_2 = require("
|
|
14
|
-
const capability_registry_js_1 = require("
|
|
15
|
-
const event_bus_js_1 = require("
|
|
16
|
-
const lifecycle_manager_js_1 = require("
|
|
17
|
-
const plugin_registry_js_1 = require("
|
|
18
|
-
const local_core_controller_js_1 = require("
|
|
19
|
-
const local_core_runtime_state_js_1 = require("
|
|
20
|
-
const server_js_1 = require("
|
|
12
|
+
const bootstrap_js_1 = require("../../services/local-ai-core/src/kernel/bootstrap.js");
|
|
13
|
+
const bootstrap_js_2 = require("../../services/local-ai-core/src/kernel/bootstrap.js");
|
|
14
|
+
const capability_registry_js_1 = require("../../services/local-ai-core/src/kernel/capability-registry.js");
|
|
15
|
+
const event_bus_js_1 = require("../../services/local-ai-core/src/kernel/event-bus.js");
|
|
16
|
+
const lifecycle_manager_js_1 = require("../../services/local-ai-core/src/kernel/lifecycle-manager.js");
|
|
17
|
+
const plugin_registry_js_1 = require("../../services/local-ai-core/src/kernel/plugin-registry.js");
|
|
18
|
+
const local_core_controller_js_1 = require("../../services/local-ai-core/src/runtime/local-core-controller.js");
|
|
19
|
+
const local_core_runtime_state_js_1 = require("../../services/local-ai-core/src/runtime/local-core-runtime-state.js");
|
|
20
|
+
const server_js_1 = require("../../services/local-ai-core/src/runtime/server.js");
|
|
21
21
|
function plugin(id, dependsOn = []) {
|
|
22
22
|
return {
|
|
23
23
|
manifest: {
|
|
@@ -46,10 +46,10 @@ function plugin(id, dependsOn = []) {
|
|
|
46
46
|
},
|
|
47
47
|
snapshot: {
|
|
48
48
|
agents: [
|
|
49
|
-
{ id: 'agent.cursor', agentType: 'cursor', displayName: '
|
|
50
|
-
{ id: 'agent.gemini', agentType: 'gemini', displayName: '
|
|
51
|
-
{ id: 'agent.qoder', agentType: 'qoder', displayName: '
|
|
52
|
-
{ id: 'agent.iflow', agentType: 'iflow', displayName: '
|
|
49
|
+
{ id: 'agent.cursor', agentType: 'cursor', displayName: 'Cursor' },
|
|
50
|
+
{ id: 'agent.gemini', agentType: 'gemini', displayName: 'Gemini' },
|
|
51
|
+
{ id: 'agent.qoder', agentType: 'qoder', displayName: 'Qoder' },
|
|
52
|
+
{ id: 'agent.iflow', agentType: 'iflow', displayName: 'iFlow' },
|
|
53
53
|
{ id: 'agent.localcore-acp', agentType: 'localcore-acp', displayName: 'LocalCore ACP' },
|
|
54
54
|
],
|
|
55
55
|
channels: [
|