ltcai 12.2.0 → 12.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +85 -84
- package/docs/CHANGELOG.md +30 -4
- package/docs/COMMUNITY_AND_PLUGINS.md +1 -1
- package/docs/DEVELOPMENT.md +11 -11
- package/docs/ONBOARDING.md +1 -1
- package/docs/OPERATIONS.md +1 -1
- package/docs/ROADMAP.md +8 -8
- package/docs/TRUST_MODEL.md +2 -2
- package/docs/WHY_LATTICE.md +1 -1
- package/docs/kg-schema.md +1 -1
- package/lattice_brain/__init__.py +1 -1
- package/latticeai/__init__.py +1 -1
- package/latticeai/core/vector_index/hnsw.py +49 -10
- package/latticeai/core/vector_index/sidecar.py +120 -31
- package/latticeai/services/architecture_readiness.py +1 -1
- package/latticeai/services/product_readiness.py +2 -2
- package/package.json +1 -1
- package/scripts/check_current_release_docs.mjs +1 -1
- package/scripts/release_screen_claims.json +11 -0
- package/src-tauri/Cargo.lock +10 -10
- package/src-tauri/Cargo.toml +1 -1
- package/src-tauri/tauri.conf.json +1 -1
- package/static/app/asset-manifest.json +44 -44
- package/static/app/assets/{Act-BjGgeuQd.js → Act-DC676bqE.js} +2 -2
- package/static/app/assets/{AdminConsole-C6hcJGMr.js → AdminConsole-aCxQgD2L.js} +1 -1
- package/static/app/assets/{Brain-CNQnIaA8.js → Brain-Dbd0xvsc.js} +2 -2
- package/static/app/assets/{BrainHome-CGJ6O69l.js → BrainHome-N00B-MAJ.js} +1 -1
- package/static/app/assets/{BrainSignals-DONPljxz.js → BrainSignals-CNA0d6xS.js} +1 -1
- package/static/app/assets/{Capture-BMCC5544.js → Capture-BB19fo7P.js} +1 -1
- package/static/app/assets/{Chronicle-DF6sOonx.js → Chronicle-D8p3dqxZ.js} +1 -1
- package/static/app/assets/{CommandPalette-DiWyutdM.js → CommandPalette-uVFYAa-6.js} +1 -1
- package/static/app/assets/{DigitalBrainExplorer-BL3V6Dqz.js → DigitalBrainExplorer-mH6ZSuvK.js} +1 -1
- package/static/app/assets/{Library-B-ue9hXL.js → Library-0q8Sdke7.js} +1 -1
- package/static/app/assets/{LivingBrain-b1RiM5Rh.js → LivingBrain-wess-qJZ.js} +1 -1
- package/static/app/assets/ProductFlow-DeBGF6qz.js +1 -0
- package/static/app/assets/{ReviewCard-D1fGTEn7.js → ReviewCard-DyTrDpy0.js} +1 -1
- package/static/app/assets/{RunsListPanel-DAirtLkS.js → RunsListPanel-CHJv2Qyw.js} +1 -1
- package/static/app/assets/{System-BEI1eoC4.js → System-CyKGHQrW.js} +1 -1
- package/static/app/assets/{WorkflowGraph-qrI6GU4R.js → WorkflowGraph-B5nKCCGa.js} +1 -1
- package/static/app/assets/{WorkflowsPanel-CIMNTw-O.js → WorkflowsPanel-C7RZNRGo.js} +2 -2
- package/static/app/assets/{actHelpers-BMukIRnQ.js → actHelpers-6MYDH2kW.js} +1 -1
- package/static/app/assets/arrow-left-DOnpwsVV.js +1 -0
- package/static/app/assets/{bot-Dkd-DbiP.js → bot-Dm3fmXAE.js} +1 -1
- package/static/app/assets/{brain-BsexlNOA.js → brain-C2XwdQL1.js} +1 -1
- package/static/app/assets/{button-BA0N_zId.js → button-xXPeemQr.js} +1 -1
- package/static/app/assets/circle-check-D44VI2ZE.js +1 -0
- package/static/app/assets/{circle-pause-918Kuvk0.js → circle-pause-B_lmNicW.js} +1 -1
- package/static/app/assets/{circle-play-CS0IbVDV.js → circle-play-DSYCP0RD.js} +1 -1
- package/static/app/assets/{cpu-BpvoWsjk.js → cpu-D7x-dtxi.js} +1 -1
- package/static/app/assets/{download-BvkMLLLN.js → download-BHuJr-5V.js} +1 -1
- package/static/app/assets/{folder-open-YmGugIBf.js → folder-open-BiO31EwS.js} +1 -1
- package/static/app/assets/{hard-drive-BOzmS-cq.js → hard-drive-CFEaZ-wP.js} +1 -1
- package/static/app/assets/{index-CfeqZ9Ri.js → index-DCT79wzR.js} +3 -3
- package/static/app/assets/{input-CFfCfMjO.js → input-D3YrgxvO.js} +1 -1
- package/static/app/assets/{link-2-CcYzeM7M.js → link-2-3O-By3qc.js} +1 -1
- package/static/app/assets/{permissionCopy-B23r24oX.js → permissionCopy-CNK2tfkz.js} +1 -1
- package/static/app/assets/{primitives-BDryQl6H.js → primitives-B6DzQC3H.js} +1 -1
- package/static/app/assets/search-BwMK0hjs.js +1 -0
- package/static/app/assets/{share-2-B-gPv2ec.js → share-2-BljIPAku.js} +1 -1
- package/static/app/assets/{shield-alert-CfyRO1p0.js → shield-alert-WDP2DSTM.js} +1 -1
- package/static/app/assets/{sourceMeta-C4LDEy1S.js → sourceMeta-By2WIjlN.js} +1 -1
- package/static/app/assets/{textarea-BdVMYEb1.js → textarea-5v8vtDlK.js} +1 -1
- package/static/app/assets/{useFocusTrap-CV73DLHn.js → useFocusTrap-ssiDeh6P.js} +1 -1
- package/static/app/assets/{useMutation-B8QKq2NW.js → useMutation-Bi0PXQMC.js} +1 -1
- package/static/app/assets/workspace-BsxrRYQI.js +1 -0
- package/static/app/index.html +1 -1
- package/static/sw.js +1 -1
- package/static/app/assets/ProductFlow-wZIKJW7G.js +0 -1
- package/static/app/assets/arrow-left-iVa1goff.js +0 -1
- package/static/app/assets/circle-check-BxaDWjPR.js +0 -1
- package/static/app/assets/search-DHsPwmPw.js +0 -1
- package/static/app/assets/workspace-BmfVs66W.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/WorkflowGraph-
|
|
2
|
-
import{i as e,n as t,t as n}from"./jsx-runtime-bzQ4Vb5N.js";import{n as r}from"./QueryClientProvider-B3OjqSyJ.js";import{t as i}from"./useMutation-B8QKq2NW.js";import{_ as a,c as o,g as s,h as c,i as l,m as u,n as d,p as f,r as p,t as m,u as h,v as g,y as _}from"./primitives-BDryQl6H.js";import{t as v}from"./folder-open-YmGugIBf.js";import{H as y,R as b,S as x,b as S,c as C,i as w,k as T,v as E,z as D}from"./index-CfeqZ9Ri.js";import{t as O}from"./button-BA0N_zId.js";import{t as k}from"./input-CFfCfMjO.js";import"./workspace-BmfVs66W.js";import{a as A,n as j}from"./actHelpers-BMukIRnQ.js";import{t as M}from"./textarea-BdVMYEb1.js";var N=b(`calendar-clock`,[[`path`,{d:`M16 14v2.2l1.6 1`,key:`fo4ql5`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`path`,{d:`M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5`,key:`1osxxc`}],[`path`,{d:`M3 10h5`,key:`r794hk`}],[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`circle`,{cx:`16`,cy:`16`,r:`6`,key:`qoo3c4`}]]),P=b(`git-branch`,[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]),F=b(`message-circle-question-mark`,[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),I=e(t()),L=n();function R({language:e}){let t=r(),n=y({queryKey:[`automationOverview`],queryFn:E.automationOverview}),o=i({mutationFn:e=>E.installAutomationSuggestion(e,!1),onSuccess:async()=>{await Promise.all([t.invalidateQueries({queryKey:[`automationOverview`]}),t.invalidateQueries({queryKey:[`workflowDefinitions`]})])}}),l=n.data?.data||{},d=C(l.suggestions),p=Number(l.questions_scanned||0);return(0,L.jsxs)(f,{className:`automation-suggestions xl:col-span-2`,"data-testid":`automation-suggestions`,children:[(0,L.jsxs)(s,{children:[(0,L.jsxs)(a,{className:`flex items-center gap-2`,children:[(0,L.jsx)(_,{className:`h-4 w-4`}),` `,x(e,`act.suggest.title`)]}),(0,L.jsxs)(c,{children:[x(e,`act.suggest.subtitle`),p>0?` · ${x(e,`act.suggest.scanned`,{count:String(p)})}`:``]})]}),(0,L.jsxs)(u,{children:[d.length===0?(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:x(e,`act.suggest.empty`)}):(0,L.jsx)(`div`,{className:`grid gap-3 lg:grid-cols-2`,children:d.map(t=>{let n=t.kind===`knowledge_source`,r=t.reason||{},i=n?x(e,`act.suggest.evidence.folder`,{count:String(r.indexed_files??0)}):x(e,`act.suggest.evidence.count`,{count:String(r.count??0)}),a=n?x(e,`act.suggest.cadence.newKnowledge`):x(e,`act.suggest.cadence.daily`),s=o.isPending&&o.variables===t.id;return(0,L.jsxs)(`div`,{className:`rounded-lg border border-border bg-background/70 p-4`,children:[(0,L.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,L.jsxs)(`div`,{className:`min-w-0`,children:[(0,L.jsx)(`div`,{className:`flex items-center gap-2 text-xs font-semibold uppercase text-muted-foreground`,children:n?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(v,{className:`h-3.5 w-3.5`}),` `,x(e,`act.suggest.folder`)]}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(F,{className:`h-3.5 w-3.5`}),` `,x(e,`act.suggest.question`)]})}),(0,L.jsx)(`p`,{className:`mt-1 truncate font-medium`,title:t.title,children:t.title})]}),(0,L.jsx)(g,{variant:`muted`,children:a})]}),(0,L.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:i}),(0,L.jsxs)(`div`,{className:`mt-3 flex items-center justify-between gap-2`,children:[(0,L.jsxs)(g,{variant:`success`,children:[(0,L.jsx)(T,{className:`h-3 w-3`}),` `,x(e,`act.automation.local`)]}),t.installed?(0,L.jsx)(g,{variant:`warning`,children:x(e,`act.suggest.installed`)}):(0,L.jsx)(O,{size:`sm`,disabled:o.isPending,onClick:()=>o.mutate(t.id),children:s?x(e,`act.suggest.installing`):x(e,`act.suggest.install`)})]})]},t.id)})}),(0,L.jsx)(`p`,{className:`mt-3 text-xs text-muted-foreground`,children:x(e,`act.suggest.note`)})]})]})}var z=I.lazy(()=>S(()=>import(`./WorkflowGraph-qrI6GU4R.js`).then(e=>({default:e.WorkflowGraph})),__vite__mapDeps([0,1,2,3,4])));function B(){let e=r(),t=D(e=>e.mode),n=D(e=>e.language),p=y({queryKey:[`workflowDefinitions`],queryFn:E.workflowDefinitions}),_=y({queryKey:[`workflowTriggers`],queryFn:E.workflowTriggers}),v=y({queryKey:[`automationRecipes`],queryFn:E.automationRecipes}),[b,S]=I.useState(()=>x(n,`act.workflow.defaultName`)),[j,F]=I.useState(``),B=i({mutationFn:()=>E.createWorkflow({name:b.trim()||x(n,`act.workflow.defaultName`),nodes:H(n),metadata:{created_from:`desktop-act-ui`}}),onSuccess:()=>e.invalidateQueries({queryKey:[`workflowDefinitions`]})}),U=i({mutationFn:()=>E.importWorkflow(JSON.parse(j)),onSuccess:()=>{F(``),e.invalidateQueries({queryKey:[`workflowDefinitions`]})}}),W=i({mutationFn:({recipeId:e,enabled:t})=>E.installAutomationRecipe(e,t),onSuccess:async()=>{await Promise.all([e.invalidateQueries({queryKey:[`workflowDefinitions`]}),e.invalidateQueries({queryKey:[`workflowTriggers`]})])}}),G=C(p.data?.data?.workflows),K=new Map(G.filter(e=>{let t=e.metadata||{};return t.created_from===`brain_automation_recipe`&&t.recipe_id}).map(e=>{let t=e.metadata||{};return[String(t.recipe_id),e]})),q=G.slice(0,12).map((e,t)=>({id:String(e.id||e.workflow_id||t),position:{x:t%4*190,y:Math.floor(t/4)*120},data:{label:String(e.name||e.id||x(n,`act.workflow.fallbackName`,{index:t+1}))}})),J=q.slice(1).map((e,t)=>({id:`e-${t}`,source:q[t].id,target:e.id}));return(0,L.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,L.jsx)(R,{language:n}),(0,L.jsx)(A,{language:n}),(0,L.jsx)(d,{title:x(n,`act.automation.title`),result:v.data,children:e=>(0,L.jsx)(`div`,{className:`flex flex-col sm:flex-row flex-wrap gap-3`,children:C(e.recipes).map(e=>{let t=String(e.id||``),r=(e,r)=>{let i=`act.recipe.${t}${e}`,a=x(n,i);return a===i?r:a},i=String(e.cadence||``),a=`act.cadence.${i}`,o=x(n,a),s=e.consent||{},c=C(e.creates);return(0,L.jsxs)(`div`,{className:`rounded-lg border border-border bg-background/70 p-4`,children:[(0,L.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-2 font-medium`,children:[(0,L.jsx)(N,{className:`h-4 w-4`}),` `,r(``,String(e.name||t))]}),(0,L.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:r(`.summary`,String(e.summary||``))})]}),(0,L.jsx)(g,{variant:`muted`,children:o===a?i||x(n,`act.status.draft`):o})]}),(0,L.jsx)(`p`,{className:`mt-3 text-sm`,children:r(`.value`,String(e.user_value||``))}),(0,L.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2`,children:[(0,L.jsxs)(g,{variant:`success`,children:[(0,L.jsx)(T,{className:`h-3 w-3`}),` `,x(n,`act.automation.local`)]}),s.requires_user_enable?(0,L.jsx)(g,{variant:`warning`,children:x(n,`act.automation.consent`)}):null,c.slice(0,2).map(e=>{let t=`act.creates.${e}`,r=x(n,t);return(0,L.jsx)(g,{variant:`muted`,children:r===t?e:r},e)})]}),(()=>{let e=K.get(t),r=(e?.metadata||{}).automation_state===`enabled`,i=W.isPending&&W.variables?.recipeId===t,a=W.data?.data,o=a&&a.recipe&&a.recipe.recipe_id?String(a.recipe.recipe_id):``,s=!W.isPending&&o===t,c=!!e,l=r||!!(s&&a?.enabled),u=i?x(n,W.variables?.enabled?`act.automation.enabling`:`act.automation.creating`):l?x(n,`act.automation.active`):c?x(n,`act.automation.enable`):s?x(n,`act.automation.created`):x(n,`act.automation.create`);return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(O,{className:`mt-4 w-full`,variant:l||c?`secondary`:`outline`,disabled:!t||i||l,onClick:()=>{l||i||W.mutate({recipeId:t,enabled:c})},children:u}),s&&!l?(0,L.jsx)(`p`,{className:`mt-1 text-[10px] text-green-600`,children:x(n,`act.automation.draftReady`)}):null,c&&!l&&!s?(0,L.jsx)(`p`,{className:`mt-1 text-[10px] text-muted-foreground`,children:x(n,`act.automation.enableHint`)}):null,l?(0,L.jsx)(`p`,{className:`mt-1 text-[10px] text-green-600`,children:x(n,`act.automation.activeHint`)}):null]})})()]},t)})})}),t===`basic`?(0,L.jsx)(d,{title:x(n,`act.trigger.title`),description:x(n,`act.trigger.detail`),result:_.data,className:`xl:col-span-2`,children:e=>(0,L.jsx)(V,{data:e})}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(f,{children:[(0,L.jsxs)(s,{children:[(0,L.jsxs)(a,{className:`flex items-center gap-2`,children:[(0,L.jsx)(P,{className:`h-4 w-4`}),` `,x(n,`act.workflow.graph`)]}),(0,L.jsx)(c,{children:x(n,`act.workflow.graphDetail`)})]}),(0,L.jsx)(u,{children:(0,L.jsx)(w,{language:n,resetKey:`workflow-graph`,children:(0,L.jsx)(z,{nodes:q,edges:J})})})]}),(0,L.jsx)(d,{title:x(n,`act.panel.definitions`),result:p.data,children:()=>(0,L.jsxs)(`div`,{className:`space-y-3`,children:[(0,L.jsxs)(`div`,{className:`grid gap-2 rounded-md border border-border p-3`,children:[(0,L.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,L.jsx)(k,{value:b,onChange:e=>S(e.target.value),placeholder:x(n,`act.workflow.namePlaceholder`)}),(0,L.jsx)(O,{disabled:B.isPending,onClick:()=>B.mutate(),children:x(n,`act.workflow.create`)})]}),(0,L.jsx)(M,{value:j,onChange:e=>F(e.target.value),placeholder:x(n,`act.workflow.importPlaceholder`)}),(0,L.jsx)(O,{variant:`outline`,disabled:!j.trim()||U.isPending,onClick:()=>U.mutate(),children:x(n,`act.workflow.import`)}),B.data?(0,L.jsx)(o,{result:B.data,successLabel:x(n,`act.workflow.created`)}):null,U.data?(0,L.jsx)(o,{result:U.data,successLabel:x(n,`act.workflow.imported`)}):null]}),G.length?G.map(e=>{let t=String(e.id||e.workflow_id);return(0,L.jsxs)(`div`,{className:`rounded-md border border-border p-3`,children:[(0,L.jsx)(`div`,{className:`font-medium`,children:String(e.name||t)}),(0,L.jsxs)(`div`,{className:`mt-2 flex gap-2`,children:[(0,L.jsx)(m,{label:x(n,`act.workflow.run`),action:()=>E.runWorkflow(t),invalidate:[`workflowRuns`]}),(0,L.jsx)(m,{label:x(n,`act.workflow.export`),action:()=>E.exportWorkflow(t)})]})]},t)}):(0,L.jsx)(l,{items:[]})]})}),(0,L.jsx)(d,{title:x(n,`act.panel.triggers`),result:_.data,className:`xl:col-span-2`,children:e=>(0,L.jsx)(h,{value:e})})]})]})}function V({data:e}){let t=D(e=>e.language),n=C(e.armed),r=e.running!==!1;return n.length?(0,L.jsx)(`div`,{className:`grid gap-2`,children:n.map((e,n)=>{let i=`act.trigger.when.${String(e.kind||``)}`,a=x(t,i);return(0,L.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 rounded-md border border-border p-3 bg-background`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`div`,{className:`font-medium`,children:j(e.name,e.label)||x(t,`act.workflow.fallbackName`,{index:n+1})}),(0,L.jsx)(`div`,{className:`mt-1 text-sm text-muted-foreground`,children:a===i?x(t,`act.trigger.when.unknown`):a})]}),(0,L.jsx)(g,{variant:r?`success`:`muted`,children:x(t,r?`act.trigger.running`:`act.trigger.paused`)})]},String(e.workflow_id||e.id||n))})}):(0,L.jsx)(p,{title:x(t,`act.trigger.empty`)})}function H(e){return[{id:`trigger`,type:`trigger`,name:x(e,`act.workflow.manualStart`),config:{trigger:`manual`},next:`output`},{id:`output`,type:`output`,name:x(e,`act.workflow.output`),config:{value:x(e,`act.workflow.completed`)},next:null}]}export{B as WorkflowsPanel};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/WorkflowGraph-B5nKCCGa.js","assets/jsx-runtime-bzQ4Vb5N.js","assets/index-DCT79wzR.js","assets/QueryClientProvider-B3OjqSyJ.js","assets/index-C8gwOf0C.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{i as e,n as t,t as n}from"./jsx-runtime-bzQ4Vb5N.js";import{n as r}from"./QueryClientProvider-B3OjqSyJ.js";import{t as i}from"./useMutation-Bi0PXQMC.js";import{_ as a,c as o,g as s,h as c,i as l,m as u,n as d,p as f,r as p,t as m,u as h,v as g,y as _}from"./primitives-B6DzQC3H.js";import{t as v}from"./folder-open-BiO31EwS.js";import{H as y,R as b,S as x,b as S,c as C,i as w,k as T,v as E,z as D}from"./index-DCT79wzR.js";import{t as O}from"./button-xXPeemQr.js";import{t as k}from"./input-D3YrgxvO.js";import"./workspace-BsxrRYQI.js";import{a as A,n as j}from"./actHelpers-6MYDH2kW.js";import{t as M}from"./textarea-5v8vtDlK.js";var N=b(`calendar-clock`,[[`path`,{d:`M16 14v2.2l1.6 1`,key:`fo4ql5`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`path`,{d:`M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5`,key:`1osxxc`}],[`path`,{d:`M3 10h5`,key:`r794hk`}],[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`circle`,{cx:`16`,cy:`16`,r:`6`,key:`qoo3c4`}]]),P=b(`git-branch`,[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]),F=b(`message-circle-question-mark`,[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),I=e(t()),L=n();function R({language:e}){let t=r(),n=y({queryKey:[`automationOverview`],queryFn:E.automationOverview}),o=i({mutationFn:e=>E.installAutomationSuggestion(e,!1),onSuccess:async()=>{await Promise.all([t.invalidateQueries({queryKey:[`automationOverview`]}),t.invalidateQueries({queryKey:[`workflowDefinitions`]})])}}),l=n.data?.data||{},d=C(l.suggestions),p=Number(l.questions_scanned||0);return(0,L.jsxs)(f,{className:`automation-suggestions xl:col-span-2`,"data-testid":`automation-suggestions`,children:[(0,L.jsxs)(s,{children:[(0,L.jsxs)(a,{className:`flex items-center gap-2`,children:[(0,L.jsx)(_,{className:`h-4 w-4`}),` `,x(e,`act.suggest.title`)]}),(0,L.jsxs)(c,{children:[x(e,`act.suggest.subtitle`),p>0?` · ${x(e,`act.suggest.scanned`,{count:String(p)})}`:``]})]}),(0,L.jsxs)(u,{children:[d.length===0?(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:x(e,`act.suggest.empty`)}):(0,L.jsx)(`div`,{className:`grid gap-3 lg:grid-cols-2`,children:d.map(t=>{let n=t.kind===`knowledge_source`,r=t.reason||{},i=n?x(e,`act.suggest.evidence.folder`,{count:String(r.indexed_files??0)}):x(e,`act.suggest.evidence.count`,{count:String(r.count??0)}),a=n?x(e,`act.suggest.cadence.newKnowledge`):x(e,`act.suggest.cadence.daily`),s=o.isPending&&o.variables===t.id;return(0,L.jsxs)(`div`,{className:`rounded-lg border border-border bg-background/70 p-4`,children:[(0,L.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,L.jsxs)(`div`,{className:`min-w-0`,children:[(0,L.jsx)(`div`,{className:`flex items-center gap-2 text-xs font-semibold uppercase text-muted-foreground`,children:n?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(v,{className:`h-3.5 w-3.5`}),` `,x(e,`act.suggest.folder`)]}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(F,{className:`h-3.5 w-3.5`}),` `,x(e,`act.suggest.question`)]})}),(0,L.jsx)(`p`,{className:`mt-1 truncate font-medium`,title:t.title,children:t.title})]}),(0,L.jsx)(g,{variant:`muted`,children:a})]}),(0,L.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:i}),(0,L.jsxs)(`div`,{className:`mt-3 flex items-center justify-between gap-2`,children:[(0,L.jsxs)(g,{variant:`success`,children:[(0,L.jsx)(T,{className:`h-3 w-3`}),` `,x(e,`act.automation.local`)]}),t.installed?(0,L.jsx)(g,{variant:`warning`,children:x(e,`act.suggest.installed`)}):(0,L.jsx)(O,{size:`sm`,disabled:o.isPending,onClick:()=>o.mutate(t.id),children:s?x(e,`act.suggest.installing`):x(e,`act.suggest.install`)})]})]},t.id)})}),(0,L.jsx)(`p`,{className:`mt-3 text-xs text-muted-foreground`,children:x(e,`act.suggest.note`)})]})]})}var z=I.lazy(()=>S(()=>import(`./WorkflowGraph-B5nKCCGa.js`).then(e=>({default:e.WorkflowGraph})),__vite__mapDeps([0,1,2,3,4])));function B(){let e=r(),t=D(e=>e.mode),n=D(e=>e.language),p=y({queryKey:[`workflowDefinitions`],queryFn:E.workflowDefinitions}),_=y({queryKey:[`workflowTriggers`],queryFn:E.workflowTriggers}),v=y({queryKey:[`automationRecipes`],queryFn:E.automationRecipes}),[b,S]=I.useState(()=>x(n,`act.workflow.defaultName`)),[j,F]=I.useState(``),B=i({mutationFn:()=>E.createWorkflow({name:b.trim()||x(n,`act.workflow.defaultName`),nodes:H(n),metadata:{created_from:`desktop-act-ui`}}),onSuccess:()=>e.invalidateQueries({queryKey:[`workflowDefinitions`]})}),U=i({mutationFn:()=>E.importWorkflow(JSON.parse(j)),onSuccess:()=>{F(``),e.invalidateQueries({queryKey:[`workflowDefinitions`]})}}),W=i({mutationFn:({recipeId:e,enabled:t})=>E.installAutomationRecipe(e,t),onSuccess:async()=>{await Promise.all([e.invalidateQueries({queryKey:[`workflowDefinitions`]}),e.invalidateQueries({queryKey:[`workflowTriggers`]})])}}),G=C(p.data?.data?.workflows),K=new Map(G.filter(e=>{let t=e.metadata||{};return t.created_from===`brain_automation_recipe`&&t.recipe_id}).map(e=>{let t=e.metadata||{};return[String(t.recipe_id),e]})),q=G.slice(0,12).map((e,t)=>({id:String(e.id||e.workflow_id||t),position:{x:t%4*190,y:Math.floor(t/4)*120},data:{label:String(e.name||e.id||x(n,`act.workflow.fallbackName`,{index:t+1}))}})),J=q.slice(1).map((e,t)=>({id:`e-${t}`,source:q[t].id,target:e.id}));return(0,L.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,L.jsx)(R,{language:n}),(0,L.jsx)(A,{language:n}),(0,L.jsx)(d,{title:x(n,`act.automation.title`),result:v.data,children:e=>(0,L.jsx)(`div`,{className:`flex flex-col sm:flex-row flex-wrap gap-3`,children:C(e.recipes).map(e=>{let t=String(e.id||``),r=(e,r)=>{let i=`act.recipe.${t}${e}`,a=x(n,i);return a===i?r:a},i=String(e.cadence||``),a=`act.cadence.${i}`,o=x(n,a),s=e.consent||{},c=C(e.creates);return(0,L.jsxs)(`div`,{className:`rounded-lg border border-border bg-background/70 p-4`,children:[(0,L.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-2 font-medium`,children:[(0,L.jsx)(N,{className:`h-4 w-4`}),` `,r(``,String(e.name||t))]}),(0,L.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:r(`.summary`,String(e.summary||``))})]}),(0,L.jsx)(g,{variant:`muted`,children:o===a?i||x(n,`act.status.draft`):o})]}),(0,L.jsx)(`p`,{className:`mt-3 text-sm`,children:r(`.value`,String(e.user_value||``))}),(0,L.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2`,children:[(0,L.jsxs)(g,{variant:`success`,children:[(0,L.jsx)(T,{className:`h-3 w-3`}),` `,x(n,`act.automation.local`)]}),s.requires_user_enable?(0,L.jsx)(g,{variant:`warning`,children:x(n,`act.automation.consent`)}):null,c.slice(0,2).map(e=>{let t=`act.creates.${e}`,r=x(n,t);return(0,L.jsx)(g,{variant:`muted`,children:r===t?e:r},e)})]}),(()=>{let e=K.get(t),r=(e?.metadata||{}).automation_state===`enabled`,i=W.isPending&&W.variables?.recipeId===t,a=W.data?.data,o=a&&a.recipe&&a.recipe.recipe_id?String(a.recipe.recipe_id):``,s=!W.isPending&&o===t,c=!!e,l=r||!!(s&&a?.enabled),u=i?x(n,W.variables?.enabled?`act.automation.enabling`:`act.automation.creating`):l?x(n,`act.automation.active`):c?x(n,`act.automation.enable`):s?x(n,`act.automation.created`):x(n,`act.automation.create`);return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(O,{className:`mt-4 w-full`,variant:l||c?`secondary`:`outline`,disabled:!t||i||l,onClick:()=>{l||i||W.mutate({recipeId:t,enabled:c})},children:u}),s&&!l?(0,L.jsx)(`p`,{className:`mt-1 text-[10px] text-green-600`,children:x(n,`act.automation.draftReady`)}):null,c&&!l&&!s?(0,L.jsx)(`p`,{className:`mt-1 text-[10px] text-muted-foreground`,children:x(n,`act.automation.enableHint`)}):null,l?(0,L.jsx)(`p`,{className:`mt-1 text-[10px] text-green-600`,children:x(n,`act.automation.activeHint`)}):null]})})()]},t)})})}),t===`basic`?(0,L.jsx)(d,{title:x(n,`act.trigger.title`),description:x(n,`act.trigger.detail`),result:_.data,className:`xl:col-span-2`,children:e=>(0,L.jsx)(V,{data:e})}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(f,{children:[(0,L.jsxs)(s,{children:[(0,L.jsxs)(a,{className:`flex items-center gap-2`,children:[(0,L.jsx)(P,{className:`h-4 w-4`}),` `,x(n,`act.workflow.graph`)]}),(0,L.jsx)(c,{children:x(n,`act.workflow.graphDetail`)})]}),(0,L.jsx)(u,{children:(0,L.jsx)(w,{language:n,resetKey:`workflow-graph`,children:(0,L.jsx)(z,{nodes:q,edges:J})})})]}),(0,L.jsx)(d,{title:x(n,`act.panel.definitions`),result:p.data,children:()=>(0,L.jsxs)(`div`,{className:`space-y-3`,children:[(0,L.jsxs)(`div`,{className:`grid gap-2 rounded-md border border-border p-3`,children:[(0,L.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,L.jsx)(k,{value:b,onChange:e=>S(e.target.value),placeholder:x(n,`act.workflow.namePlaceholder`)}),(0,L.jsx)(O,{disabled:B.isPending,onClick:()=>B.mutate(),children:x(n,`act.workflow.create`)})]}),(0,L.jsx)(M,{value:j,onChange:e=>F(e.target.value),placeholder:x(n,`act.workflow.importPlaceholder`)}),(0,L.jsx)(O,{variant:`outline`,disabled:!j.trim()||U.isPending,onClick:()=>U.mutate(),children:x(n,`act.workflow.import`)}),B.data?(0,L.jsx)(o,{result:B.data,successLabel:x(n,`act.workflow.created`)}):null,U.data?(0,L.jsx)(o,{result:U.data,successLabel:x(n,`act.workflow.imported`)}):null]}),G.length?G.map(e=>{let t=String(e.id||e.workflow_id);return(0,L.jsxs)(`div`,{className:`rounded-md border border-border p-3`,children:[(0,L.jsx)(`div`,{className:`font-medium`,children:String(e.name||t)}),(0,L.jsxs)(`div`,{className:`mt-2 flex gap-2`,children:[(0,L.jsx)(m,{label:x(n,`act.workflow.run`),action:()=>E.runWorkflow(t),invalidate:[`workflowRuns`]}),(0,L.jsx)(m,{label:x(n,`act.workflow.export`),action:()=>E.exportWorkflow(t)})]})]},t)}):(0,L.jsx)(l,{items:[]})]})}),(0,L.jsx)(d,{title:x(n,`act.panel.triggers`),result:_.data,className:`xl:col-span-2`,children:e=>(0,L.jsx)(h,{value:e})})]})]})}function V({data:e}){let t=D(e=>e.language),n=C(e.armed),r=e.running!==!1;return n.length?(0,L.jsx)(`div`,{className:`grid gap-2`,children:n.map((e,n)=>{let i=`act.trigger.when.${String(e.kind||``)}`,a=x(t,i);return(0,L.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 rounded-md border border-border p-3 bg-background`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`div`,{className:`font-medium`,children:j(e.name,e.label)||x(t,`act.workflow.fallbackName`,{index:n+1})}),(0,L.jsx)(`div`,{className:`mt-1 text-sm text-muted-foreground`,children:a===i?x(t,`act.trigger.when.unknown`):a})]}),(0,L.jsx)(g,{variant:r?`success`:`muted`,children:x(t,r?`act.trigger.running`:`act.trigger.paused`)})]},String(e.workflow_id||e.id||n))})}):(0,L.jsx)(p,{title:x(t,`act.trigger.empty`)})}function H(e){return[{id:`trigger`,type:`trigger`,name:x(e,`act.workflow.manualStart`),config:{trigger:`manual`},next:`output`},{id:`output`,type:`output`,name:x(e,`act.workflow.output`),config:{value:x(e,`act.workflow.completed`)},next:null}]}export{B as WorkflowsPanel};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e,n as t,t as n}from"./jsx-runtime-bzQ4Vb5N.js";import{n as r}from"./QueryClientProvider-B3OjqSyJ.js";import{t as i}from"./useMutation-
|
|
1
|
+
import{i as e,n as t,t as n}from"./jsx-runtime-bzQ4Vb5N.js";import{n as r}from"./QueryClientProvider-B3OjqSyJ.js";import{t as i}from"./useMutation-Bi0PXQMC.js";import{_ as a,g as o,h as s,m as c,p as l,v as u}from"./primitives-B6DzQC3H.js";import{t as d}from"./circle-play-DSYCP0RD.js";import{C as f,D as p,H as m,S as h,c as g,j as _,k as v,v as y}from"./index-DCT79wzR.js";import{t as b}from"./button-xXPeemQr.js";var x=e(t()),S=n();function C(e){return e?e.replace(`T`,` `).slice(0,16):``}function w({language:e}){let t=r(),n=m({queryKey:[`automationOverview`],queryFn:y.automationOverview}),[f,w]=x.useState({}),[T,E]=x.useState({}),D=i({mutationFn:({id:e,dryRun:t})=>y.runAutomationNow(e,t),onSuccess:async(e,n)=>{let r=e?.data||{};e?.ok&&(n.dryRun&&w(e=>({...e,[n.id]:!0})),E(e=>({...e,[n.id]:r}))),await t.invalidateQueries({queryKey:[`automationOverview`]})}}),O=g((n.data?.data||{}).installed);return(0,S.jsxs)(l,{className:`installed-automations`,"data-testid":`installed-automations`,children:[(0,S.jsxs)(o,{children:[(0,S.jsxs)(a,{className:`flex items-center gap-2`,children:[(0,S.jsx)(p,{className:`h-4 w-4`}),` `,h(e,`act.installed.title`)]}),(0,S.jsx)(s,{children:h(e,`act.installed.subtitle`)})]}),(0,S.jsx)(c,{children:O.length===0?(0,S.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:h(e,`act.installed.empty`)}):(0,S.jsx)(`div`,{className:`flex flex-col gap-4`,children:O.map(t=>{let n=String(t.id||``),r=D.isPending&&D.variables?.id===n,i=!!f[n],a=T[n],o=t.last_execution||a?.last_execution||null,s=o?.mode===`dry_run`?h(e,`act.installed.mode.dry`):h(e,`act.installed.mode.live`);return(0,S.jsxs)(`div`,{className:`rounded-xl border border-border bg-card p-4 shadow-sm space-y-3 flex flex-col justify-between`,"data-testid":`installed-automation-card`,children:[(0,S.jsxs)(`div`,{className:`space-y-2`,children:[(0,S.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,S.jsx)(`p`,{className:`min-w-0 font-bold text-sm text-foreground truncate`,title:t.name,children:t.name}),(0,S.jsxs)(`div`,{className:`flex items-center gap-1.5 shrink-0`,children:[(0,S.jsxs)(u,{variant:`success`,className:`text-[10px]`,children:[(0,S.jsx)(v,{className:`h-3 w-3 mr-0.5`}),` `,h(e,`act.automation.local`)]}),(0,S.jsx)(u,{variant:t.enabled?`success`:`muted`,className:`text-[10px]`,children:t.enabled?h(e,`act.installed.onBadge`):h(e,`act.installed.draftBadge`)})]})]}),(0,S.jsxs)(`div`,{className:`rounded-md border border-border/50 bg-muted/30 p-2.5 text-xs space-y-1`,"data-testid":`automation-last-execution`,children:[(0,S.jsxs)(`div`,{className:`flex items-center gap-1.5 text-muted-foreground font-medium`,children:[(0,S.jsx)(_,{className:`h-3.5 w-3.5 text-primary shrink-0`,"aria-hidden":`true`}),(0,S.jsx)(`span`,{children:h(e,`act.installed.lastRun`)})]}),o?(0,S.jsxs)(`p`,{className:`text-[11px] text-foreground/90 pl-5`,children:[(0,S.jsx)(`span`,{className:`font-semibold text-primary`,children:s}),` · `,String(o.status||``),o.finished_at?` · ${C(o.finished_at)}`:``,o.summary?` — ${o.summary}`:``]}):(0,S.jsx)(`p`,{className:`text-[11px] text-muted-foreground pl-5`,children:h(e,`act.installed.noRuns`)})]}),a?.review_item_id?(0,S.jsx)(`p`,{className:`text-xs text-destructive font-medium`,role:`status`,children:h(e,`act.installed.failedReview`)}):null]}),(0,S.jsxs)(`div`,{className:`pt-2 border-t border-border/40 space-y-2`,children:[(0,S.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,S.jsxs)(b,{size:`sm`,variant:`outline`,disabled:D.isPending,onClick:()=>D.mutate({id:n,dryRun:!0}),className:`flex-1 text-xs h-8`,children:[(0,S.jsx)(d,{className:`h-3.5 w-3.5 mr-1`}),r&&D.variables?.dryRun?h(e,`act.installed.dryRunning`):h(e,`act.installed.runNow`)]}),i?(0,S.jsx)(b,{size:`sm`,disabled:D.isPending,onClick:()=>D.mutate({id:n,dryRun:!1}),className:`flex-1 text-xs h-8 shadow-sm`,children:r&&!D.variables?.dryRun?h(e,`act.installed.liveRunning`):h(e,`act.installed.runLive`)}):null]}),(0,S.jsx)(`p`,{className:`text-[10px] text-muted-foreground text-center`,children:h(e,`act.installed.dryRunHint`)})]})]},n)})})})]})}function T(...e){for(let t of e)if(typeof t==`string`&&t.trim())return t.trim();return``}function E(e,t){let n=`act.runStatus.${e}`,r=h(t,n);return r===n?h(t,`act.status.unknown`):r}function D(e){let t=T(e.workflow_name,e.name,e.goal,e.title,e.query);if(t)return t;let n=e.input;if(typeof n==`string`&&n.trim())return n.trim();if(n&&typeof n==`object`&&!Array.isArray(n)){let e=n;return T(e.goal,e.name,e.title,e.query,e.text,e.prompt)}return``}function O(e,t){let n=T(e.action,e.tool,e.type)||``,r=n.toLowerCase().replace(/[\s-]+/g,`_`);return(r?f[t]?.[`act.approval.action.${r}`]??f.ko[`act.approval.action.${r}`]:void 0)||T(e.action_label,n)||h(t,`act.approval.defaultAction`)}export{w as a,E as i,T as n,D as r,O as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{R as e}from"./index-DCT79wzR.js";var t=e(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]);export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{R as e}from"./index-
|
|
1
|
+
import{R as e}from"./index-DCT79wzR.js";var t=e(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]);export{t};
|