ltcai 12.4.0 → 12.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -37
- package/docs/CHANGELOG.md +13 -0
- package/docs/COMMUNITY_AND_PLUGINS.md +1 -1
- package/docs/DEVELOPMENT.md +9 -9
- package/docs/ONBOARDING.md +1 -1
- package/docs/OPERATIONS.md +1 -1
- package/docs/TRUST_MODEL.md +1 -1
- 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/api/models.py +21 -1
- package/latticeai/api/search.py +8 -1
- package/latticeai/api/worker_compute.py +9 -1
- package/latticeai/core/embedding_providers/__init__.py +14 -0
- package/latticeai/core/embedding_providers/autodetect.py +91 -24
- package/latticeai/core/embedding_providers/base.py +10 -2
- package/latticeai/core/embedding_providers/profiles.py +44 -0
- package/latticeai/core/embedding_providers/text.py +325 -2
- package/latticeai/services/architecture_readiness.py +1 -1
- package/latticeai/services/embedding_recommendation.py +229 -0
- package/latticeai/services/model_capability_registry.py +37 -0
- package/latticeai/services/model_catalog.py +130 -0
- package/latticeai/services/product_readiness.py +1 -1
- package/package.json +1 -1
- package/scripts/bump_version.py +106 -6
- package/scripts/check_current_release_docs.mjs +1 -1
- package/scripts/check_screenshot_pixel_delta.py +6 -2
- 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-inLiZfDE.js → Act-DQ2Ldwo8.js} +2 -2
- package/static/app/assets/{AdminConsole-iLFwSJSg.js → AdminConsole-y6EjiXeH.js} +1 -1
- package/static/app/assets/{Brain-Cb7noiNc.js → Brain-CRWWw-h9.js} +2 -2
- package/static/app/assets/{BrainHome-CfiJ4tau.js → BrainHome-cmvTu7Ea.js} +1 -1
- package/static/app/assets/{BrainSignals-ShxKNNqr.js → BrainSignals-gaNn5E4-.js} +1 -1
- package/static/app/assets/{Capture-Cajj1Trf.js → Capture-BJK7in1j.js} +1 -1
- package/static/app/assets/{Chronicle-CPd8GP_O.js → Chronicle-BuYZ9lMt.js} +1 -1
- package/static/app/assets/{CommandPalette-Cb_GWoYC.js → CommandPalette-BjFwuKaA.js} +1 -1
- package/static/app/assets/{DigitalBrainExplorer-Df6KVrBz.js → DigitalBrainExplorer-DTBRPYJ3.js} +1 -1
- package/static/app/assets/Library-BsmZ-YVh.js +1 -0
- package/static/app/assets/{LivingBrain-u9X_XGC2.js → LivingBrain-aT9hgkPV.js} +1 -1
- package/static/app/assets/ProductFlow-Ct0QLLY5.js +1 -0
- package/static/app/assets/{ReviewCard-C64YFHOR.js → ReviewCard-CdooYtWr.js} +1 -1
- package/static/app/assets/{RunsListPanel-DKZEJcxF.js → RunsListPanel-Btf2DIrG.js} +1 -1
- package/static/app/assets/{System-Dretrknf.js → System-B77M4t-M.js} +1 -1
- package/static/app/assets/{WorkflowGraph-CE6XgWjJ.js → WorkflowGraph-u3ZKLvZe.js} +1 -1
- package/static/app/assets/{WorkflowsPanel-MKU05J7_.js → WorkflowsPanel--nTFq3Cs.js} +2 -2
- package/static/app/assets/{actHelpers-BjMnKMCI.js → actHelpers-xNnCfUeC.js} +1 -1
- package/static/app/assets/arrow-left-Cp4NHbfX.js +1 -0
- package/static/app/assets/{bot-Qgvc2PGU.js → bot-CXwvpODC.js} +1 -1
- package/static/app/assets/{brain-BwGnubn8.js → brain-BzjoGgor.js} +1 -1
- package/static/app/assets/{button-DEloiIsj.js → button-_hHOhp7g.js} +1 -1
- package/static/app/assets/circle-check-qG5dMahn.js +1 -0
- package/static/app/assets/{circle-pause-CkkmXxA9.js → circle-pause-DBOqYYMh.js} +1 -1
- package/static/app/assets/{circle-play-rnb6A1zq.js → circle-play-DA0Vf2NH.js} +1 -1
- package/static/app/assets/{cpu-CzcGFQQq.js → cpu-DwsE0_o3.js} +1 -1
- package/static/app/assets/{download-BTQigJvp.js → download-iCoe2f2Q.js} +1 -1
- package/static/app/assets/{folder-open-CIXPPhhm.js → folder-open-C1vNOMhy.js} +1 -1
- package/static/app/assets/{hard-drive-CZXxdIcT.js → hard-drive-a73KaYth.js} +1 -1
- package/static/app/assets/index-Dbb2YhYw.css +2 -0
- package/static/app/assets/{index-CHQbWj9a.js → index-DpuEeYmP.js} +2 -2
- package/static/app/assets/{input-CTZHuOXe.js → input-BclQNHyj.js} +1 -1
- package/static/app/assets/{link-2-BsG1NQUA.js → link-2-D23wihBe.js} +1 -1
- package/static/app/assets/{permissionCopy-klyWL3ai.js → permissionCopy-DiGZRKAY.js} +1 -1
- package/static/app/assets/{primitives-ZmN4jzq-.js → primitives-1S-XCgmz.js} +1 -1
- package/static/app/assets/search-Cl2k5uhD.js +1 -0
- package/static/app/assets/{share-2-Cuv9rj7A.js → share-2-47_av_aF.js} +1 -1
- package/static/app/assets/{shield-alert-KKySFd03.js → shield-alert-BvKq2P-G.js} +1 -1
- package/static/app/assets/{textarea-CBwqgGSA.js → textarea-DcLO52bu.js} +1 -1
- package/static/app/assets/{useFocusTrap-D93vds_Z.js → useFocusTrap-CpqVPzJ_.js} +1 -1
- package/static/app/assets/{useMutation-B9hHPD0p.js → useMutation-DhI3jqCN.js} +1 -1
- package/static/app/assets/workspace-DwNHbqaX.js +1 -0
- package/static/app/index.html +2 -2
- package/static/app/assets/Library-Dk5Mefl_.js +0 -1
- package/static/app/assets/ProductFlow-CpX0BMr9.js +0 -1
- package/static/app/assets/arrow-left-Cbck4Ig2.js +0 -1
- package/static/app/assets/circle-check-CDygnRMn.js +0 -1
- package/static/app/assets/index-C_dThdD6.css +0 -2
- package/static/app/assets/search-xjKVb4Nh.js +0 -1
- package/static/app/assets/workspace-JGzrc0D8.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-CU_pEDDh.js";import"./workspace-JGzrc0D8.js";import{t as r}from"./useMutation-B9hHPD0p.js";import{H as i,R as a,S as o,b as s,c,i as l,k as u,v as d,z as f}from"./index-CHQbWj9a.js";import{n as p}from"./QueryClientProvider-CTiSBeU6.js";import{_ as m,c as h,g,h as _,i as v,m as y,n as b,p as x,r as S,t as C,u as w,v as T,y as E}from"./primitives-ZmN4jzq-.js";import{t as D}from"./button-DEloiIsj.js";import{t as O}from"./input-CTZHuOXe.js";import{t as k}from"./textarea-CBwqgGSA.js";import{t as A}from"./folder-open-CIXPPhhm.js";import{a as j,n as M}from"./actHelpers-BjMnKMCI.js";var N=a(`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=a(`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=a(`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=p(),n=i({queryKey:[`automationOverview`],queryFn:d.automationOverview}),a=r({mutationFn:e=>d.installAutomationSuggestion(e,!1),onSuccess:async()=>{await Promise.all([t.invalidateQueries({queryKey:[`automationOverview`]}),t.invalidateQueries({queryKey:[`workflowDefinitions`]})])}}),s=n.data?.data||{},l=c(s.suggestions),f=Number(s.questions_scanned||0);return(0,L.jsxs)(x,{className:`automation-suggestions xl:col-span-2`,"data-testid":`automation-suggestions`,children:[(0,L.jsxs)(g,{children:[(0,L.jsxs)(m,{className:`flex items-center gap-2`,children:[(0,L.jsx)(E,{className:`h-4 w-4`}),` `,o(e,`act.suggest.title`)]}),(0,L.jsxs)(_,{children:[o(e,`act.suggest.subtitle`),f>0?` · ${o(e,`act.suggest.scanned`,{count:String(f)})}`:``]})]}),(0,L.jsxs)(y,{children:[l.length===0?(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:o(e,`act.suggest.empty`)}):(0,L.jsx)(`div`,{className:`grid gap-3 lg:grid-cols-2`,children:l.map(t=>{let n=t.kind===`knowledge_source`,r=t.reason||{},i=n?o(e,`act.suggest.evidence.folder`,{count:String(r.indexed_files??0)}):o(e,`act.suggest.evidence.count`,{count:String(r.count??0)}),s=n?o(e,`act.suggest.cadence.newKnowledge`):o(e,`act.suggest.cadence.daily`),c=a.isPending&&a.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)(A,{className:`h-3.5 w-3.5`}),` `,o(e,`act.suggest.folder`)]}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(F,{className:`h-3.5 w-3.5`}),` `,o(e,`act.suggest.question`)]})}),(0,L.jsx)(`p`,{className:`mt-1 truncate font-medium`,title:t.title,children:t.title})]}),(0,L.jsx)(T,{variant:`muted`,children:s})]}),(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)(T,{variant:`success`,children:[(0,L.jsx)(u,{className:`h-3 w-3`}),` `,o(e,`act.automation.local`)]}),t.installed?(0,L.jsx)(T,{variant:`warning`,children:o(e,`act.suggest.installed`)}):(0,L.jsx)(D,{size:`sm`,disabled:a.isPending,onClick:()=>a.mutate(t.id),children:c?o(e,`act.suggest.installing`):o(e,`act.suggest.install`)})]})]},t.id)})}),(0,L.jsx)(`p`,{className:`mt-3 text-xs text-muted-foreground`,children:o(e,`act.suggest.note`)})]})]})}var z=I.lazy(()=>s(()=>import(`./WorkflowGraph-CE6XgWjJ.js`).then(e=>({default:e.WorkflowGraph})),__vite__mapDeps([0,1,2,3,4])));function B(){let e=p(),t=f(e=>e.mode),n=f(e=>e.language),a=i({queryKey:[`workflowDefinitions`],queryFn:d.workflowDefinitions}),s=i({queryKey:[`workflowTriggers`],queryFn:d.workflowTriggers}),S=i({queryKey:[`automationRecipes`],queryFn:d.automationRecipes}),[E,A]=I.useState(()=>o(n,`act.workflow.defaultName`)),[M,F]=I.useState(``),B=r({mutationFn:()=>d.createWorkflow({name:E.trim()||o(n,`act.workflow.defaultName`),nodes:H(n),metadata:{created_from:`desktop-act-ui`}}),onSuccess:()=>e.invalidateQueries({queryKey:[`workflowDefinitions`]})}),U=r({mutationFn:()=>d.importWorkflow(JSON.parse(M)),onSuccess:()=>{F(``),e.invalidateQueries({queryKey:[`workflowDefinitions`]})}}),W=r({mutationFn:({recipeId:e,enabled:t})=>d.installAutomationRecipe(e,t),onSuccess:async()=>{await Promise.all([e.invalidateQueries({queryKey:[`workflowDefinitions`]}),e.invalidateQueries({queryKey:[`workflowTriggers`]})])}}),G=c(a.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||o(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)(j,{language:n}),(0,L.jsx)(b,{title:o(n,`act.automation.title`),result:S.data,children:e=>{let t=c(e.recipes);return(0,L.jsx)(`div`,{className:`flex flex-col sm:flex-row flex-wrap gap-3`,children:t.map(e=>{let t=String(e.id||``),r=(e,r)=>{let i=`act.recipe.${t}${e}`,a=o(n,i);return a===i?r:a},i=String(e.cadence||``),a=`act.cadence.${i}`,s=o(n,a),l=e.consent||{},d=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)(T,{variant:`muted`,children:s===a?i||o(n,`act.status.draft`):s})]}),(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)(T,{variant:`success`,children:[(0,L.jsx)(u,{className:`h-3 w-3`}),` `,o(n,`act.automation.local`)]}),l.requires_user_enable?(0,L.jsx)(T,{variant:`warning`,children:o(n,`act.automation.consent`)}):null,d.slice(0,2).map(e=>{let t=`act.creates.${e}`,r=o(n,t);return(0,L.jsx)(T,{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,s=a&&a.recipe&&a.recipe.recipe_id?String(a.recipe.recipe_id):``,c=!W.isPending&&s===t,l=!!e,u=r||!!(c&&a?.enabled),d=i?o(n,W.variables?.enabled?`act.automation.enabling`:`act.automation.creating`):u?o(n,`act.automation.active`):l?o(n,`act.automation.enable`):c?o(n,`act.automation.created`):o(n,`act.automation.create`);return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(D,{className:`mt-4 w-full`,variant:u||l?`secondary`:`outline`,disabled:!t||i||u,onClick:()=>{u||i||W.mutate({recipeId:t,enabled:l})},children:d}),c&&!u?(0,L.jsx)(`p`,{className:`mt-1 text-[10px] text-green-600`,children:o(n,`act.automation.draftReady`)}):null,l&&!u&&!c?(0,L.jsx)(`p`,{className:`mt-1 text-[10px] text-muted-foreground`,children:o(n,`act.automation.enableHint`)}):null,u?(0,L.jsx)(`p`,{className:`mt-1 text-[10px] text-green-600`,children:o(n,`act.automation.activeHint`)}):null]})})()]},t)})})}}),t===`basic`?(0,L.jsx)(b,{title:o(n,`act.trigger.title`),description:o(n,`act.trigger.detail`),result:s.data,className:`xl:col-span-2`,children:e=>(0,L.jsx)(V,{data:e})}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(x,{children:[(0,L.jsxs)(g,{children:[(0,L.jsxs)(m,{className:`flex items-center gap-2`,children:[(0,L.jsx)(P,{className:`h-4 w-4`}),` `,o(n,`act.workflow.graph`)]}),(0,L.jsx)(_,{children:o(n,`act.workflow.graphDetail`)})]}),(0,L.jsx)(y,{children:(0,L.jsx)(l,{language:n,resetKey:`workflow-graph`,children:(0,L.jsx)(z,{nodes:q,edges:J})})})]}),(0,L.jsx)(b,{title:o(n,`act.panel.definitions`),result:a.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)(O,{value:E,onChange:e=>A(e.target.value),placeholder:o(n,`act.workflow.namePlaceholder`)}),(0,L.jsx)(D,{disabled:B.isPending,onClick:()=>B.mutate(),children:o(n,`act.workflow.create`)})]}),(0,L.jsx)(k,{value:M,onChange:e=>F(e.target.value),placeholder:o(n,`act.workflow.importPlaceholder`)}),(0,L.jsx)(D,{variant:`outline`,disabled:!M.trim()||U.isPending,onClick:()=>U.mutate(),children:o(n,`act.workflow.import`)}),B.data?(0,L.jsx)(h,{result:B.data,successLabel:o(n,`act.workflow.created`)}):null,U.data?(0,L.jsx)(h,{result:U.data,successLabel:o(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)(C,{label:o(n,`act.workflow.run`),action:()=>d.runWorkflow(t),invalidate:[`workflowRuns`]}),(0,L.jsx)(C,{label:o(n,`act.workflow.export`),action:()=>d.exportWorkflow(t)})]})]},t)}):(0,L.jsx)(v,{items:[]})]})}),(0,L.jsx)(b,{title:o(n,`act.panel.triggers`),result:s.data,className:`xl:col-span-2`,children:e=>(0,L.jsx)(w,{value:e})})]})]})}function V({data:e}){let t=f(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=o(t,i),s=M(e.name,e.label)||o(t,`act.workflow.fallbackName`,{index:n+1});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:s}),(0,L.jsx)(`div`,{className:`mt-1 text-sm text-muted-foreground`,children:a===i?o(t,`act.trigger.when.unknown`):a})]}),(0,L.jsx)(T,{variant:r?`success`:`muted`,children:o(t,r?`act.trigger.running`:`act.trigger.paused`)})]},String(e.workflow_id||e.id||n))})}):(0,L.jsx)(S,{title:o(t,`act.trigger.empty`)})}function H(e){return[{id:`trigger`,type:`trigger`,name:o(e,`act.workflow.manualStart`),config:{trigger:`manual`},next:`output`},{id:`output`,type:`output`,name:o(e,`act.workflow.output`),config:{value:o(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-u3ZKLvZe.js","assets/jsx-runtime-CU_pEDDh.js","assets/index-DpuEeYmP.js","assets/QueryClientProvider-CTiSBeU6.js","assets/index-Dbb2YhYw.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{i as e,n as t,t as n}from"./jsx-runtime-CU_pEDDh.js";import"./workspace-DwNHbqaX.js";import{t as r}from"./useMutation-DhI3jqCN.js";import{H as i,R as a,S as o,b as s,c,i as l,k as u,v as d,z as f}from"./index-DpuEeYmP.js";import{n as p}from"./QueryClientProvider-CTiSBeU6.js";import{_ as m,c as h,g,h as _,i as v,m as y,n as b,p as x,r as S,t as C,u as w,v as T,y as E}from"./primitives-1S-XCgmz.js";import{t as D}from"./button-_hHOhp7g.js";import{t as O}from"./input-BclQNHyj.js";import{t as k}from"./textarea-DcLO52bu.js";import{t as A}from"./folder-open-C1vNOMhy.js";import{a as j,n as M}from"./actHelpers-xNnCfUeC.js";var N=a(`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=a(`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=a(`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=p(),n=i({queryKey:[`automationOverview`],queryFn:d.automationOverview}),a=r({mutationFn:e=>d.installAutomationSuggestion(e,!1),onSuccess:async()=>{await Promise.all([t.invalidateQueries({queryKey:[`automationOverview`]}),t.invalidateQueries({queryKey:[`workflowDefinitions`]})])}}),s=n.data?.data||{},l=c(s.suggestions),f=Number(s.questions_scanned||0);return(0,L.jsxs)(x,{className:`automation-suggestions xl:col-span-2`,"data-testid":`automation-suggestions`,children:[(0,L.jsxs)(g,{children:[(0,L.jsxs)(m,{className:`flex items-center gap-2`,children:[(0,L.jsx)(E,{className:`h-4 w-4`}),` `,o(e,`act.suggest.title`)]}),(0,L.jsxs)(_,{children:[o(e,`act.suggest.subtitle`),f>0?` · ${o(e,`act.suggest.scanned`,{count:String(f)})}`:``]})]}),(0,L.jsxs)(y,{children:[l.length===0?(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:o(e,`act.suggest.empty`)}):(0,L.jsx)(`div`,{className:`grid gap-3 lg:grid-cols-2`,children:l.map(t=>{let n=t.kind===`knowledge_source`,r=t.reason||{},i=n?o(e,`act.suggest.evidence.folder`,{count:String(r.indexed_files??0)}):o(e,`act.suggest.evidence.count`,{count:String(r.count??0)}),s=n?o(e,`act.suggest.cadence.newKnowledge`):o(e,`act.suggest.cadence.daily`),c=a.isPending&&a.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)(A,{className:`h-3.5 w-3.5`}),` `,o(e,`act.suggest.folder`)]}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(F,{className:`h-3.5 w-3.5`}),` `,o(e,`act.suggest.question`)]})}),(0,L.jsx)(`p`,{className:`mt-1 truncate font-medium`,title:t.title,children:t.title})]}),(0,L.jsx)(T,{variant:`muted`,children:s})]}),(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)(T,{variant:`success`,children:[(0,L.jsx)(u,{className:`h-3 w-3`}),` `,o(e,`act.automation.local`)]}),t.installed?(0,L.jsx)(T,{variant:`warning`,children:o(e,`act.suggest.installed`)}):(0,L.jsx)(D,{size:`sm`,disabled:a.isPending,onClick:()=>a.mutate(t.id),children:c?o(e,`act.suggest.installing`):o(e,`act.suggest.install`)})]})]},t.id)})}),(0,L.jsx)(`p`,{className:`mt-3 text-xs text-muted-foreground`,children:o(e,`act.suggest.note`)})]})]})}var z=I.lazy(()=>s(()=>import(`./WorkflowGraph-u3ZKLvZe.js`).then(e=>({default:e.WorkflowGraph})),__vite__mapDeps([0,1,2,3,4])));function B(){let e=p(),t=f(e=>e.mode),n=f(e=>e.language),a=i({queryKey:[`workflowDefinitions`],queryFn:d.workflowDefinitions}),s=i({queryKey:[`workflowTriggers`],queryFn:d.workflowTriggers}),S=i({queryKey:[`automationRecipes`],queryFn:d.automationRecipes}),[E,A]=I.useState(()=>o(n,`act.workflow.defaultName`)),[M,F]=I.useState(``),B=r({mutationFn:()=>d.createWorkflow({name:E.trim()||o(n,`act.workflow.defaultName`),nodes:H(n),metadata:{created_from:`desktop-act-ui`}}),onSuccess:()=>e.invalidateQueries({queryKey:[`workflowDefinitions`]})}),U=r({mutationFn:()=>d.importWorkflow(JSON.parse(M)),onSuccess:()=>{F(``),e.invalidateQueries({queryKey:[`workflowDefinitions`]})}}),W=r({mutationFn:({recipeId:e,enabled:t})=>d.installAutomationRecipe(e,t),onSuccess:async()=>{await Promise.all([e.invalidateQueries({queryKey:[`workflowDefinitions`]}),e.invalidateQueries({queryKey:[`workflowTriggers`]})])}}),G=c(a.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||o(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)(j,{language:n}),(0,L.jsx)(b,{title:o(n,`act.automation.title`),result:S.data,children:e=>{let t=c(e.recipes);return(0,L.jsx)(`div`,{className:`flex flex-col sm:flex-row flex-wrap gap-3`,children:t.map(e=>{let t=String(e.id||``),r=(e,r)=>{let i=`act.recipe.${t}${e}`,a=o(n,i);return a===i?r:a},i=String(e.cadence||``),a=`act.cadence.${i}`,s=o(n,a),l=e.consent||{},d=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)(T,{variant:`muted`,children:s===a?i||o(n,`act.status.draft`):s})]}),(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)(T,{variant:`success`,children:[(0,L.jsx)(u,{className:`h-3 w-3`}),` `,o(n,`act.automation.local`)]}),l.requires_user_enable?(0,L.jsx)(T,{variant:`warning`,children:o(n,`act.automation.consent`)}):null,d.slice(0,2).map(e=>{let t=`act.creates.${e}`,r=o(n,t);return(0,L.jsx)(T,{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,s=a&&a.recipe&&a.recipe.recipe_id?String(a.recipe.recipe_id):``,c=!W.isPending&&s===t,l=!!e,u=r||!!(c&&a?.enabled),d=i?o(n,W.variables?.enabled?`act.automation.enabling`:`act.automation.creating`):u?o(n,`act.automation.active`):l?o(n,`act.automation.enable`):c?o(n,`act.automation.created`):o(n,`act.automation.create`);return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(D,{className:`mt-4 w-full`,variant:u||l?`secondary`:`outline`,disabled:!t||i||u,onClick:()=>{u||i||W.mutate({recipeId:t,enabled:l})},children:d}),c&&!u?(0,L.jsx)(`p`,{className:`mt-1 text-[10px] text-green-600`,children:o(n,`act.automation.draftReady`)}):null,l&&!u&&!c?(0,L.jsx)(`p`,{className:`mt-1 text-[10px] text-muted-foreground`,children:o(n,`act.automation.enableHint`)}):null,u?(0,L.jsx)(`p`,{className:`mt-1 text-[10px] text-green-600`,children:o(n,`act.automation.activeHint`)}):null]})})()]},t)})})}}),t===`basic`?(0,L.jsx)(b,{title:o(n,`act.trigger.title`),description:o(n,`act.trigger.detail`),result:s.data,className:`xl:col-span-2`,children:e=>(0,L.jsx)(V,{data:e})}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(x,{children:[(0,L.jsxs)(g,{children:[(0,L.jsxs)(m,{className:`flex items-center gap-2`,children:[(0,L.jsx)(P,{className:`h-4 w-4`}),` `,o(n,`act.workflow.graph`)]}),(0,L.jsx)(_,{children:o(n,`act.workflow.graphDetail`)})]}),(0,L.jsx)(y,{children:(0,L.jsx)(l,{language:n,resetKey:`workflow-graph`,children:(0,L.jsx)(z,{nodes:q,edges:J})})})]}),(0,L.jsx)(b,{title:o(n,`act.panel.definitions`),result:a.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)(O,{value:E,onChange:e=>A(e.target.value),placeholder:o(n,`act.workflow.namePlaceholder`)}),(0,L.jsx)(D,{disabled:B.isPending,onClick:()=>B.mutate(),children:o(n,`act.workflow.create`)})]}),(0,L.jsx)(k,{value:M,onChange:e=>F(e.target.value),placeholder:o(n,`act.workflow.importPlaceholder`)}),(0,L.jsx)(D,{variant:`outline`,disabled:!M.trim()||U.isPending,onClick:()=>U.mutate(),children:o(n,`act.workflow.import`)}),B.data?(0,L.jsx)(h,{result:B.data,successLabel:o(n,`act.workflow.created`)}):null,U.data?(0,L.jsx)(h,{result:U.data,successLabel:o(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)(C,{label:o(n,`act.workflow.run`),action:()=>d.runWorkflow(t),invalidate:[`workflowRuns`]}),(0,L.jsx)(C,{label:o(n,`act.workflow.export`),action:()=>d.exportWorkflow(t)})]})]},t)}):(0,L.jsx)(v,{items:[]})]})}),(0,L.jsx)(b,{title:o(n,`act.panel.triggers`),result:s.data,className:`xl:col-span-2`,children:e=>(0,L.jsx)(w,{value:e})})]})]})}function V({data:e}){let t=f(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=o(t,i),s=M(e.name,e.label)||o(t,`act.workflow.fallbackName`,{index:n+1});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:s}),(0,L.jsx)(`div`,{className:`mt-1 text-sm text-muted-foreground`,children:a===i?o(t,`act.trigger.when.unknown`):a})]}),(0,L.jsx)(T,{variant:r?`success`:`muted`,children:o(t,r?`act.trigger.running`:`act.trigger.paused`)})]},String(e.workflow_id||e.id||n))})}):(0,L.jsx)(S,{title:o(t,`act.trigger.empty`)})}function H(e){return[{id:`trigger`,type:`trigger`,name:o(e,`act.workflow.manualStart`),config:{trigger:`manual`},next:`output`},{id:`output`,type:`output`,name:o(e,`act.workflow.output`),config:{value:o(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-CU_pEDDh.js";import{n as r}from"./QueryClientProvider-CTiSBeU6.js";import{t as i}from"./useMutation-
|
|
1
|
+
import{i as e,n as t,t as n}from"./jsx-runtime-CU_pEDDh.js";import{n as r}from"./QueryClientProvider-CTiSBeU6.js";import{t as i}from"./useMutation-DhI3jqCN.js";import{_ as a,g as o,h as s,m as c,p as l,v as u}from"./primitives-1S-XCgmz.js";import{t as d}from"./circle-play-DA0Vf2NH.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-DpuEeYmP.js";import{t as b}from"./button-_hHOhp7g.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=n.data?.data||{},k=g(O.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:k.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:k.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-DpuEeYmP.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-DpuEeYmP.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};
|