autoglm-gui 1.5.1__py3-none-any.whl → 1.5.3__py3-none-any.whl
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.
- AutoGLM_GUI/__init__.py +1 -1
- AutoGLM_GUI/__main__.py +11 -2
- AutoGLM_GUI/adb_plus/qr_pair.py +3 -3
- AutoGLM_GUI/agents/__init__.py +7 -2
- AutoGLM_GUI/agents/factory.py +46 -6
- AutoGLM_GUI/agents/glm/agent.py +2 -2
- AutoGLM_GUI/agents/glm/async_agent.py +515 -0
- AutoGLM_GUI/agents/glm/parser.py +4 -2
- AutoGLM_GUI/agents/protocols.py +111 -1
- AutoGLM_GUI/agents/stream_runner.py +4 -5
- AutoGLM_GUI/api/__init__.py +3 -1
- AutoGLM_GUI/api/agents.py +78 -37
- AutoGLM_GUI/api/devices.py +72 -0
- AutoGLM_GUI/api/layered_agent.py +9 -8
- AutoGLM_GUI/api/mcp.py +6 -4
- AutoGLM_GUI/config_manager.py +38 -1
- AutoGLM_GUI/device_manager.py +28 -4
- AutoGLM_GUI/device_metadata_manager.py +174 -0
- AutoGLM_GUI/devices/mock_device.py +8 -1
- AutoGLM_GUI/phone_agent_manager.py +145 -32
- AutoGLM_GUI/scheduler_manager.py +6 -6
- AutoGLM_GUI/schemas.py +89 -0
- AutoGLM_GUI/scrcpy_stream.py +2 -1
- AutoGLM_GUI/static/assets/{about-CfwX1Cmc.js → about-DTrVqEQH.js} +1 -1
- AutoGLM_GUI/static/assets/{alert-dialog-CtGlN2IJ.js → alert-dialog-B2KxPLtZ.js} +1 -1
- AutoGLM_GUI/static/assets/chat-BkrVbc3X.js +129 -0
- AutoGLM_GUI/static/assets/{circle-alert-t08bEMPO.js → circle-alert-vnNxOaxv.js} +1 -1
- AutoGLM_GUI/static/assets/{dialog-FNwZJFwk.js → dialog-Cuw3N8_F.js} +1 -1
- AutoGLM_GUI/static/assets/{eye-D0UPWCWC.js → eye-JD1jbm99.js} +1 -1
- AutoGLM_GUI/static/assets/{history-CRo95B7i.js → history-CobYdXju.js} +1 -1
- AutoGLM_GUI/static/assets/{index-CTHbFvKl.js → index-BzP-Te33.js} +5 -5
- AutoGLM_GUI/static/assets/index-y1vOOBHH.js +1 -0
- AutoGLM_GUI/static/assets/label-BpCMrXj_.js +1 -0
- AutoGLM_GUI/static/assets/{logs-RW09DyYY.js → logs-BcsSAeol.js} +1 -1
- AutoGLM_GUI/static/assets/{popover--JTJrE5v.js → popover-BHbCs5Wl.js} +1 -1
- AutoGLM_GUI/static/assets/scheduled-tasks-WvtmRsex.js +1 -0
- AutoGLM_GUI/static/assets/{textarea-PRmVnWq5.js → textarea-B84jf3cE.js} +1 -1
- AutoGLM_GUI/static/assets/workflows-DhBpqdz_.js +1 -0
- AutoGLM_GUI/static/index.html +1 -1
- {autoglm_gui-1.5.1.dist-info → autoglm_gui-1.5.3.dist-info}/METADATA +10 -1
- {autoglm_gui-1.5.1.dist-info → autoglm_gui-1.5.3.dist-info}/RECORD +44 -43
- AutoGLM_GUI/static/assets/chat-BYa-foUI.js +0 -129
- AutoGLM_GUI/static/assets/index-BaLMSqd3.js +0 -1
- AutoGLM_GUI/static/assets/label-DJFevVmr.js +0 -1
- AutoGLM_GUI/static/assets/scheduled-tasks-DTRKsQXF.js +0 -1
- AutoGLM_GUI/static/assets/square-pen-CPK_K680.js +0 -1
- AutoGLM_GUI/static/assets/workflows-CdcsAoaT.js +0 -1
- {autoglm_gui-1.5.1.dist-info → autoglm_gui-1.5.3.dist-info}/WHEEL +0 -0
- {autoglm_gui-1.5.1.dist-info → autoglm_gui-1.5.3.dist-info}/entry_points.txt +0 -0
- {autoglm_gui-1.5.1.dist-info → autoglm_gui-1.5.3.dist-info}/licenses/LICENSE +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a9 as o,r as s,j as t}from"./index-CTHbFvKl.js";function n(){const e=o();return s.useEffect(()=>{e({to:"/chat"})},[e]),t.jsx("div",{className:"p-2",children:t.jsx("h3",{children:"Welcome Home!"})})}export{n as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as l,j as r,b as i,r as o,ag as d}from"./index-CTHbFvKl.js";const u=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],m=l("plus",u);function x({className:t,type:a,...e}){return r.jsx("input",{type:a,"data-slot":"input",className:i("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",t),...e})}var c="Label",s=o.forwardRef((t,a)=>r.jsx(d.label,{...t,ref:a,onMouseDown:e=>{e.target.closest("button, input, select, textarea")||(t.onMouseDown?.(e),!e.defaultPrevented&&e.detail>1&&e.preventDefault())}}));s.displayName=c;var n=s;const f=o.forwardRef(({className:t,...a},e)=>r.jsx(n,{ref:e,className:i("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 text-slate-900 dark:text-slate-100",t),...a}));f.displayName=n.displayName;export{x as I,f as L,m as P};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as n,j as e,b as C,u as J,e as K,l as Q,g as U,B as i,f as Y,C as Z,h as $,i as ee,k as se,m as ae,n as le}from"./index-CTHbFvKl.js";import{P as ne,L as x,I as D}from"./label-DJFevVmr.js";import{L as _,C as te,a as re,b as ce,c as ie,T as oe,D as de,d as me,e as he,f as xe,g as ue}from"./dialog-FNwZJFwk.js";import{S,a as F,b as A,c as E,d as P,A as je,e as pe,f as fe,g as ke,h as ge,i as we,j as ve,k as Ne}from"./alert-dialog-CtGlN2IJ.js";import{C as Te,a as be}from"./popover--JTJrE5v.js";import{S as ye}from"./square-pen-CPK_K680.js";const L=n.forwardRef(({className:a,checked:r=!1,onCheckedChange:j,disabled:o,...p},d)=>e.jsx("button",{ref:d,role:"switch",type:"button","aria-checked":r,disabled:o,className:C("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-950 focus-visible:ring-offset-2 focus-visible:ring-offset-white disabled:cursor-not-allowed disabled:opacity-50",r?"bg-slate-900 dark:bg-slate-50":"bg-slate-200 dark:bg-slate-800",a),onClick:()=>j?.(!r),...p,children:e.jsx("span",{className:C("pointer-events-none block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform dark:bg-slate-950",r?"translate-x-5":"translate-x-0")})}));L.displayName="Switch";const Ce=[{key:"everyHour",cron:"0 * * * *"},{key:"daily8am",cron:"0 8 * * *"},{key:"daily12pm",cron:"0 12 * * *"},{key:"daily6pm",cron:"0 18 * * *"},{key:"weeklyMonday",cron:"0 9 * * 1"}];function Pe(){const a=J(),[r,j]=n.useState([]),[o,p]=n.useState([]),[d,H]=n.useState([]),[O,g]=n.useState(!0),[W,m]=n.useState(!1),[f,w]=n.useState(null),[t,c]=n.useState({name:"",workflow_uuid:"",device_serialno:"",cron_expression:"",enabled:!0}),[v,N]=n.useState(!1),[z,k]=n.useState(!1),[T,b]=n.useState(null);n.useEffect(()=>{u()},[]);const u=async()=>{try{g(!0);const[s,l,h]=await Promise.all([K(),Q(),U()]);j(s.tasks),p(l.workflows),H(h)}catch(s){console.error("Failed to load data:",s)}finally{g(!1)}},B=()=>{w(null),c({name:"",workflow_uuid:"",device_serialno:"",cron_expression:"",enabled:!0}),m(!0)},R=s=>{w(s),c({name:s.name,workflow_uuid:s.workflow_uuid,device_serialno:s.device_serialno,cron_expression:s.cron_expression,enabled:s.enabled}),m(!0)},V=async()=>{try{N(!0),f?await se(f.id,t):await ae(t),m(!1),u()}catch(s){console.error("Failed to save task:",s)}finally{N(!1)}},I=async()=>{if(T){try{await le(T),u()}catch(s){console.error("Failed to delete task:",s)}k(!1),b(null)}},q=async s=>{try{s.enabled?await $(s.id):await ee(s.id),u()}catch(l){console.error("Failed to toggle task:",l)}},M=s=>o.find(h=>h.uuid===s)?.name||s,X=s=>d.find(h=>h.serial===s)?.model||s,y=s=>s?new Date(s).toLocaleString("zh-CN",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}):a.scheduledTasks.never,G=t.name.trim()&&t.workflow_uuid&&t.device_serialno&&t.cron_expression.trim();return e.jsxs("div",{className:"container mx-auto p-6 max-w-7xl",children:[e.jsxs("div",{className:"flex justify-between items-center mb-6",children:[e.jsx("h1",{className:"text-3xl font-bold",children:a.scheduledTasks.title}),e.jsxs(i,{onClick:B,children:[e.jsx(ne,{className:"w-4 h-4 mr-2"}),a.scheduledTasks.create]})]}),O?e.jsx("div",{className:"flex justify-center items-center h-64",children:e.jsx(_,{className:"w-8 h-8 animate-spin text-slate-400"})}):r.length===0?e.jsxs("div",{className:"text-center py-12",children:[e.jsx("p",{className:"text-slate-500 dark:text-slate-400",children:a.scheduledTasks.noTasks}),e.jsx("p",{className:"text-sm text-slate-400 dark:text-slate-500 mt-2",children:a.scheduledTasks.noTasksDesc})]}):e.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:r.map(s=>e.jsxs(te,{className:"hover:shadow-md transition-shadow",children:[e.jsx(re,{className:"pb-2",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(ce,{className:"text-lg truncate flex-1 mr-2",children:s.name}),e.jsx(L,{checked:s.enabled,onCheckedChange:()=>q(s)})]})}),e.jsx(ie,{children:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"text-sm",children:[e.jsxs("span",{className:"text-slate-500 dark:text-slate-400",children:[a.scheduledTasks.workflow,":"," "]}),e.jsx("span",{className:"font-medium",children:M(s.workflow_uuid)})]}),e.jsxs("div",{className:"text-sm",children:[e.jsxs("span",{className:"text-slate-500 dark:text-slate-400",children:[a.scheduledTasks.device,":"," "]}),e.jsx("span",{className:"font-medium",children:X(s.device_serialno)})]}),e.jsx("div",{className:"text-sm",children:e.jsxs(Y,{variant:"outline",className:"font-mono",children:[e.jsx(Z,{className:"w-3 h-3 mr-1"}),s.cron_expression]})}),e.jsxs("div",{className:"text-sm flex items-center gap-2",children:[e.jsxs("span",{className:"text-slate-500 dark:text-slate-400",children:[a.scheduledTasks.lastRun,":"]}),s.last_run_time?e.jsxs(e.Fragment,{children:[s.last_run_success?e.jsx(Te,{className:"w-4 h-4 text-green-500"}):e.jsx(be,{className:"w-4 h-4 text-red-500"}),e.jsx("span",{children:y(s.last_run_time)})]}):e.jsx("span",{className:"text-slate-400",children:a.scheduledTasks.never})]}),e.jsxs("div",{className:"text-sm",children:[e.jsxs("span",{className:"text-slate-500 dark:text-slate-400",children:[a.scheduledTasks.nextRun,":"," "]}),e.jsx("span",{children:y(s.next_run_time)})]}),e.jsxs("div",{className:"flex gap-2 pt-2",children:[e.jsxs(i,{variant:"outline",size:"sm",onClick:()=>R(s),children:[e.jsx(ye,{className:"w-3 h-3 mr-1"}),a.common.edit]}),e.jsxs(i,{variant:"destructive",size:"sm",onClick:()=>{b(s.id),k(!0)},children:[e.jsx(oe,{className:"w-3 h-3 mr-1"}),a.common.delete]})]})]})})]},s.id))}),e.jsx(de,{open:W,onOpenChange:m,children:e.jsxs(me,{className:"sm:max-w-[500px]",children:[e.jsx(he,{children:e.jsx(xe,{children:f?a.scheduledTasks.edit:a.scheduledTasks.create})}),e.jsxs("div",{className:"space-y-4 py-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(x,{htmlFor:"name",children:a.scheduledTasks.taskName}),e.jsx(D,{id:"name",value:t.name,onChange:s=>c(l=>({...l,name:s.target.value})),placeholder:a.scheduledTasks.taskNamePlaceholder})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(x,{children:a.scheduledTasks.workflow}),o.length===0?e.jsx("p",{className:"text-sm text-amber-600 dark:text-amber-400",children:a.scheduledTasks.noWorkflows}):e.jsxs(S,{value:t.workflow_uuid,onValueChange:s=>c(l=>({...l,workflow_uuid:s})),children:[e.jsx(F,{children:e.jsx(A,{placeholder:a.scheduledTasks.selectWorkflow})}),e.jsx(E,{children:o.map(s=>e.jsx(P,{value:s.uuid,children:s.name},s.uuid))})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(x,{children:a.scheduledTasks.device}),d.length===0?e.jsx("p",{className:"text-sm text-amber-600 dark:text-amber-400",children:a.scheduledTasks.noDevicesOnline}):e.jsxs(S,{value:t.device_serialno,onValueChange:s=>c(l=>({...l,device_serialno:s})),children:[e.jsx(F,{children:e.jsx(A,{placeholder:a.scheduledTasks.selectDevice})}),e.jsx(E,{children:d.map(s=>e.jsx(P,{value:s.serial,children:s.model||s.serial},s.serial))})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(x,{htmlFor:"cron",children:a.scheduledTasks.cronExpression}),e.jsx(D,{id:"cron",value:t.cron_expression,onChange:s=>c(l=>({...l,cron_expression:s.target.value})),placeholder:a.scheduledTasks.cronPlaceholder,className:"font-mono"}),e.jsx("p",{className:"text-xs text-slate-500 dark:text-slate-400",children:a.scheduledTasks.cronHelp})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(x,{children:a.scheduledTasks.presets}),e.jsx("div",{className:"flex flex-wrap gap-2",children:Ce.map(s=>e.jsx(i,{variant:"outline",size:"sm",onClick:()=>c(l=>({...l,cron_expression:s.cron})),children:a.scheduledTasks.preset[s.key]},s.key))})]})]}),e.jsxs(ue,{children:[e.jsx(i,{variant:"outline",onClick:()=>m(!1),children:a.common.cancel}),e.jsx(i,{onClick:V,disabled:!G||v,children:v?e.jsxs(e.Fragment,{children:[e.jsx(_,{className:"w-4 h-4 mr-2 animate-spin"}),a.common.loading]}):a.common.save})]})]})}),e.jsx(je,{open:z,onOpenChange:k,children:e.jsxs(pe,{children:[e.jsxs(fe,{children:[e.jsx(ke,{children:a.common.delete}),e.jsx(ge,{children:a.scheduledTasks.deleteConfirm})]}),e.jsxs(we,{children:[e.jsx(ve,{children:a.common.cancel}),e.jsx(Ne,{onClick:I,children:a.common.confirm})]})]})})]})}export{Pe as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as a}from"./index-CTHbFvKl.js";const e=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],r=a("square-pen",e);export{r as S};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as D,r as t,l as S,j as e,B as n,d as W,a as F,c as b}from"./index-CTHbFvKl.js";import{P as T,L as u,I as E}from"./label-DJFevVmr.js";import{T as L}from"./textarea-PRmVnWq5.js";import{L as j,C as P,a as z,b as B,c as H,T as I,D as q,d as O,e as R,f as A,g as G}from"./dialog-FNwZJFwk.js";import{S as J}from"./square-pen-CPK_K680.js";function X(){const a=D(),[m,p]=t.useState([]),[g,x]=t.useState(!0),[k,o]=t.useState(!1),[c,h]=t.useState(null),[l,i]=t.useState({name:"",text:""}),[w,f]=t.useState(!1);t.useEffect(()=>{d()},[]);const d=async()=>{try{x(!0);const s=await S();p(s.workflows)}catch(s){console.error("Failed to load workflows:",s)}finally{x(!1)}},v=()=>{h(null),i({name:"",text:""}),o(!0)},N=s=>{h(s),i({name:s.name,text:s.text}),o(!0)},C=async()=>{try{f(!0),c?await F(c.uuid,l):await b(l),o(!1),d()}catch(s){console.error("Failed to save workflow:",s)}finally{f(!1)}},y=async s=>{if(window.confirm(a.workflows.deleteConfirm))try{await W(s),d()}catch(r){console.error("Failed to delete workflow:",r)}};return e.jsxs("div",{className:"container mx-auto p-6 max-w-7xl",children:[e.jsxs("div",{className:"flex justify-between items-center mb-6",children:[e.jsx("h1",{className:"text-3xl font-bold",children:a.workflows.title}),e.jsxs(n,{onClick:v,children:[e.jsx(T,{className:"w-4 h-4 mr-2"}),a.workflows.createNew]})]}),g?e.jsx("div",{className:"flex justify-center items-center h-64",children:e.jsx(j,{className:"w-8 h-8 animate-spin text-slate-400"})}):m.length===0?e.jsx("div",{className:"text-center py-12",children:e.jsx("p",{className:"text-slate-500 dark:text-slate-400",children:a.workflows.empty})}):e.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:m.map(s=>e.jsxs(P,{className:"hover:shadow-md transition-shadow",children:[e.jsx(z,{children:e.jsx(B,{className:"text-lg",children:s.name})}),e.jsxs(H,{children:[e.jsx("p",{className:"text-sm text-slate-600 dark:text-slate-400 mb-4 line-clamp-3",children:s.text}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(n,{variant:"outline",size:"sm",onClick:()=>N(s),children:[e.jsx(J,{className:"w-3 h-3 mr-1"}),a.common.edit]}),e.jsxs(n,{variant:"destructive",size:"sm",onClick:()=>y(s.uuid),children:[e.jsx(I,{className:"w-3 h-3 mr-1"}),a.common.delete]})]})]})]},s.uuid))}),e.jsx(q,{open:k,onOpenChange:o,children:e.jsxs(O,{className:"sm:max-w-[600px]",children:[e.jsx(R,{children:e.jsx(A,{children:c?a.workflows.edit:a.workflows.create})}),e.jsxs("div",{className:"space-y-4 py-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(u,{htmlFor:"name",children:a.workflows.name}),e.jsx(E,{id:"name",value:l.name,onChange:s=>i(r=>({...r,name:s.target.value})),placeholder:a.workflows.namePlaceholder})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(u,{htmlFor:"text",children:a.workflows.text}),e.jsx(L,{id:"text",value:l.text,onChange:s=>i(r=>({...r,text:s.target.value})),placeholder:a.workflows.textPlaceholder,rows:6,className:"resize-none !rounded-lg"})]})]}),e.jsxs(G,{children:[e.jsx(n,{variant:"outline",onClick:()=>o(!1),children:a.common.cancel}),e.jsx(n,{onClick:C,disabled:!l.name.trim()||!l.text.trim()||w,children:w?e.jsxs(e.Fragment,{children:[e.jsx(j,{className:"w-4 h-4 mr-2 animate-spin"}),a.common.loading]}):a.common.save})]})]})})]})}export{X as component};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|