ltcai 8.6.0 → 8.7.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.
Files changed (40) hide show
  1. package/README.md +31 -29
  2. package/docs/CHANGELOG.md +23 -1
  3. package/docs/COMMUNITY_AND_PLUGINS.md +5 -3
  4. package/docs/DEVELOPMENT.md +11 -9
  5. package/docs/LEGACY_COMPATIBILITY.md +3 -3
  6. package/docs/ONBOARDING.md +2 -2
  7. package/docs/TRUST_MODEL.md +1 -1
  8. package/docs/WHY_LATTICE.md +2 -2
  9. package/docs/kg-schema.md +1 -1
  10. package/lattice_brain/__init__.py +1 -1
  11. package/lattice_brain/runtime/multi_agent.py +1 -1
  12. package/latticeai/__init__.py +1 -1
  13. package/latticeai/app_factory.py +2 -2
  14. package/latticeai/core/config.py +14 -2
  15. package/latticeai/core/marketplace.py +1 -1
  16. package/latticeai/core/workspace_os.py +1 -1
  17. package/latticeai/models/router.py +3 -2
  18. package/latticeai/runtime/router_registration.py +11 -5
  19. package/latticeai/services/architecture_readiness.py +2 -2
  20. package/latticeai/services/model_runtime.py +52 -28
  21. package/latticeai/services/product_readiness.py +11 -11
  22. package/package.json +3 -2
  23. package/scripts/bump_version.py +2 -0
  24. package/scripts/check_python.py +25 -12
  25. package/src-tauri/Cargo.lock +1 -1
  26. package/src-tauri/Cargo.toml +1 -1
  27. package/src-tauri/tauri.conf.json +1 -1
  28. package/static/app/asset-manifest.json +10 -10
  29. package/static/app/assets/{Act-IrojDEWY.js → Act-_U7mhXir.js} +1 -1
  30. package/static/app/assets/{Brain--VODO4HM.js → Brain-BxyTHZ21.js} +1 -1
  31. package/static/app/assets/Capture-DyDKWNh9.js +1 -0
  32. package/static/app/assets/{Library-DrVto3cO.js → Library-DJ8KioFM.js} +1 -1
  33. package/static/app/assets/{System-DNrVbcMX.js → System-C0FIb3OO.js} +1 -1
  34. package/static/app/assets/index-Bh7IIlyY.js +16 -0
  35. package/static/app/assets/{primitives-lz45ZfWY.js → primitives-BywkNS3f.js} +1 -1
  36. package/static/app/assets/{textarea-C7uwJsxy.js → textarea-CQ61Rycp.js} +1 -1
  37. package/static/app/index.html +1 -1
  38. package/static/sw.js +1 -1
  39. package/static/app/assets/Capture-BUP_wJ7s.js +0 -1
  40. package/static/app/assets/index-BaaPtsLp.js +0 -16
@@ -1 +1 @@
1
- import{C as e,E as t,I as n,M as r,O as i,P as a,S as o,T as s,_ as c,a as l,b as u,j as d,k as f,l as p,n as m,x as h,y as g}from"./index-BaaPtsLp.js";var _=g(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),v=g(`lock-keyhole`,[[`circle`,{cx:`12`,cy:`16`,r:`1`,key:`1au0dj`}],[`rect`,{x:`3`,y:`10`,width:`18`,height:`12`,rx:`2`,key:`6s8ecr`}],[`path`,{d:`M7 10V7a5 5 0 0 1 10 0v3`,key:`1pqi11`}]]),y=n(a()),b=r(),x={default:`border-primary/25 bg-primary/12 text-primary`,success:`border-success/30 bg-success/12 text-success`,warning:`border-warning/30 bg-warning/12 text-warning`,muted:`border-border bg-muted/70 text-muted-foreground`,danger:`border-destructive/30 bg-destructive/12 text-destructive`};function S({className:e,variant:t=`default`,...n}){return(0,b.jsx)(`span`,{className:o(`inline-flex min-h-6 max-w-full items-center whitespace-nowrap rounded-md border px-2 py-0.5 text-xs font-semibold leading-none`,x[t],e),...n})}function C({className:e,...t}){return(0,b.jsx)(`section`,{className:o(`premium-surface rounded-lg text-card-foreground`,e),...t})}function w({className:e,...t}){return(0,b.jsx)(`div`,{className:o(`flex flex-col gap-1.5 p-5`,e),...t})}function T({className:e,...t}){return(0,b.jsx)(`h2`,{className:o(`text-base font-semibold tracking-normal`,e),...t})}function E({className:e,...t}){return(0,b.jsx)(`p`,{className:o(`text-sm leading-6 text-muted-foreground`,e),...t})}function D({className:e,...t}){return(0,b.jsx)(`div`,{className:o(`p-5 pt-0`,e),...t})}function O({result:e}){let t=i(e=>e.mode),n=i(e=>e.language);return e?e.source===`live`&&e.ok?(0,b.jsx)(S,{variant:`success`,children:t===`basic`?u(n,`ui.status.ready`):u(n,`ui.status.connected`)}):(0,b.jsx)(S,{variant:`warning`,children:t===`basic`?u(n,`ui.status.needsSetup`):u(n,`ui.status.unavailable`)}):(0,b.jsx)(S,{variant:`muted`,children:u(n,`ui.status.notLoaded`)})}function k({title:e,detail:t}){let n=i(e=>e.language);return(0,b.jsxs)(`div`,{className:`flex min-h-36 flex-col items-center justify-center gap-2 rounded-lg border border-dashed border-border bg-muted/24 p-6 text-center text-sm text-muted-foreground`,children:[(0,b.jsx)(`div`,{className:`grid h-10 w-10 place-items-center rounded-md border border-border bg-card`,children:(0,b.jsx)(l,{className:`h-5 w-5 text-primary`})}),(0,b.jsx)(`div`,{className:`text-base font-semibold text-foreground`,children:e||u(n,`ui.empty.title`)}),t?(0,b.jsx)(`div`,{className:`max-w-md leading-6`,children:t}):null]})}function A({title:e,description:t,result:n,children:r,className:a}){let s=i(e=>e.mode),c=i(e=>e.language);return(0,b.jsxs)(C,{className:o(`overflow-hidden`,a),children:[(0,b.jsxs)(w,{className:`flex-row items-start justify-between gap-3`,children:[(0,b.jsxs)(`div`,{children:[(0,b.jsx)(T,{children:e}),t?(0,b.jsx)(E,{children:t}):null]}),(0,b.jsx)(O,{result:n})]}),(0,b.jsx)(D,{children:n?.ok?r(n.data):(0,b.jsx)(k,{detail:s===`basic`?u(c,`ui.empty.basicDetail`):n?.error||u(c,`ui.empty.advancedDetail`)})})]})}function j({title:e}){let t=i(e=>e.language);return(0,b.jsxs)(C,{children:[(0,b.jsx)(w,{children:(0,b.jsx)(T,{children:e})}),(0,b.jsx)(D,{children:(0,b.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,b.jsx)(p,{className:`h-4 w-4 animate-spin`}),` `,u(t,`ui.loading`)]})})]})}function M({stats:t}){return(0,b.jsx)(`div`,{className:`grid gap-3 sm:grid-cols-2 xl:grid-cols-4`,children:t.map(t=>(0,b.jsxs)(`div`,{className:`rounded-lg border border-border bg-background/55 p-4`,children:[(0,b.jsx)(`div`,{className:`text-xs uppercase text-muted-foreground`,children:t.label}),(0,b.jsx)(`div`,{className:`mt-2 text-2xl font-semibold leading-tight`,children:typeof t.value==`number`?e(t.value):String(t.value??`-`)}),t.hint?(0,b.jsx)(`div`,{className:`mt-2 text-xs leading-5 text-muted-foreground`,children:t.hint}):null]},t.label))})}function N(e){return!!(e&&typeof e==`object`&&!Array.isArray(e))}function P(t){return t==null||t===``?`-`:typeof t==`number`?Number.isFinite(t)?e(t):`-`:typeof t==`boolean`?t?`Enabled`:`Disabled`:String(t)}var F=/(^id$|_id$|token|secret|passphrase|fingerprint|public_key|private_key|dsn|schema|endpoint|base_url|localhost|127\.0\.0\.1|stack|trace|raw|runtime|engine|module|port|host|api|internal)/i;function I(e){return F.test(e)}function L(e){let n=P(e);return n===`-`||n.includes(`/`)||n.includes(`@`)||/\.[a-z0-9]{2,5}$/i.test(n)?n:t(n.replace(/^agent:/i,``).replace(/^tool:/i,``))}function R(e){for(let t of[`documents`,`sources`,`items`,`agents`,`workflows`,`runs`,`events`,`permissions`,`models`,`peers`,`invitations`,`roles`,`policies`,`hooks`,`tools`,`templates`,`plugins`,`recent_events`]){let n=h(e[t]);if(n.length)return n}return[]}function z({value:n}){if(typeof n==`boolean`)return(0,b.jsx)(S,{variant:n?`success`:`muted`,children:n?`enabled`:`disabled`});if(Array.isArray(n))return n.length?n.every(e=>e===null||[`string`,`number`,`boolean`].includes(typeof e))?(0,b.jsxs)(`span`,{className:`flex flex-wrap gap-1`,children:[n.slice(0,5).map((e,t)=>(0,b.jsx)(S,{variant:`muted`,children:P(e)},`${String(e)}-${t}`)),n.length>5?(0,b.jsxs)(S,{variant:`muted`,children:[`+`,n.length-5]}):null]}):(0,b.jsxs)(`span`,{className:`text-muted-foreground`,children:[e(n.length),` records`]}):(0,b.jsx)(`span`,{className:`text-muted-foreground`,children:`None`});if(N(n)){let e=Object.keys(n);return e.length?(0,b.jsxs)(`span`,{className:`text-muted-foreground`,children:[e.slice(0,4).map(t).join(`, `),e.length>4?` +${e.length-4}`:``]}):(0,b.jsx)(`span`,{className:`text-muted-foreground`,children:`No fields`})}let r=P(n);return(0,b.jsx)(`span`,{className:`break-words`,children:r.length>96?s(r,96):r})}function B({data:e,limit:n=8}){let r=i(e=>e.mode),a=i(e=>e.language),o=Object.entries(e||{}).filter(([e])=>r!==`basic`||!I(e)).slice(0,n);return o.length?(0,b.jsx)(`div`,{className:`divide-y divide-border rounded-md border border-border`,children:o.map(([e,n])=>(0,b.jsxs)(`div`,{className:`grid grid-cols-[minmax(9rem,0.5fr)_1fr] gap-3 p-3 text-sm`,children:[(0,b.jsx)(`span`,{className:`font-medium text-muted-foreground`,children:t(e)}),(0,b.jsx)(`span`,{className:`min-w-0 break-words`,children:(0,b.jsx)(z,{value:n})})]},e))}):(0,b.jsx)(k,{title:u(a,`ui.noValues`)})}function V({value:e,titleKey:t=`title`,metaKey:n=`status`,limit:r=8}){let a=i(e=>e.mode),o=i(e=>e.language);return a===`basic`?(0,b.jsx)(H,{value:e,titleKey:t,metaKey:n,limit:r}):Array.isArray(e)?e.length?e.every(e=>N(e))?(0,b.jsx)(W,{items:e,titleKey:t,metaKey:n,limit:r}):(0,b.jsxs)(`div`,{className:`flex flex-wrap gap-1 rounded-md border border-border bg-background p-3`,children:[e.slice(0,r).map((e,t)=>(0,b.jsx)(S,{variant:`muted`,children:P(e)},`${String(e)}-${t}`)),e.length>r?(0,b.jsxs)(S,{variant:`muted`,children:[`+`,e.length-r]}):null]}):(0,b.jsx)(k,{detail:u(o,`ui.empty.listDetail`)}):N(e)?(0,b.jsx)(B,{data:e,limit:r}):(0,b.jsx)(`div`,{className:`rounded-md border border-border bg-background p-3 text-sm`,children:(0,b.jsx)(z,{value:e})})}function H({value:t,titleKey:n=`title`,metaKey:r=`status`,limit:a=6}){let o=i(e=>e.language);if(Array.isArray(t))return t.length?t.every(e=>N(e))?(0,b.jsx)(W,{items:t,titleKey:n,metaKey:r,limit:a}):(0,b.jsxs)(`div`,{className:`flex flex-wrap gap-1 rounded-md border border-border bg-background/55 p-3`,children:[t.slice(0,a).map((e,t)=>(0,b.jsx)(S,{variant:`muted`,children:L(e)},`${String(e)}-${t}`)),t.length>a?(0,b.jsxs)(S,{variant:`muted`,children:[`+`,t.length-a]}):null]}):(0,b.jsx)(k,{detail:u(o,`ui.empty.listDetail`)});if(N(t)){let i=R(t);return i.length?(0,b.jsx)(W,{items:i,titleKey:n,metaKey:r,limit:a}):(0,b.jsx)(B,{data:Object.fromEntries(Object.entries(t).filter(([e])=>!I(e)).map(([t,n])=>[t,Array.isArray(n)?`${e(n.length)} items`:N(n)?`available`:n])),limit:a})}return(0,b.jsx)(`div`,{className:`rounded-md border border-border bg-background/55 p-3 text-sm`,children:L(t)})}function U({result:e,successLabel:t}){let n=i(e=>e.mode),r=i(e=>e.language);return e?e.ok?(0,b.jsxs)(`div`,{className:`space-y-2 rounded-md border border-border bg-background p-3`,children:[(0,b.jsx)(S,{variant:`success`,children:t||u(r,`ui.requestCompleted`)}),n===`basic`?(0,b.jsx)(H,{value:e.data}):(0,b.jsx)(V,{value:e.data})]}):(0,b.jsx)(k,{title:u(r,`ui.requestUnavailable`),detail:e.error||(0,b.jsx)(z,{value:e.data})}):null}function W({items:e,titleKey:t=`title`,metaKey:n=`type`,limit:r=8}){let a=i(e=>e.mode),o=i(e=>e.language),c=h(e).slice(0,r);return c.length?(0,b.jsx)(`div`,{className:`grid gap-2`,children:c.map((e,r)=>(0,b.jsxs)(`div`,{className:`rounded-lg border border-border bg-background/55 p-3`,children:[(0,b.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,b.jsx)(`div`,{className:`font-medium`,children:a===`basic`?L(e[t]||e.name||e.label||`Item ${r+1}`):String(e[t]||e.name||e.id||`Record ${r+1}`)}),(0,b.jsx)(S,{variant:`muted`,children:a===`basic`?L(e[n]||e.status||e.state||`ready`):String(e[n]||e.status||e.state||`record`)})]}),e.summary||e.description||e.path||e.id&&e[t]!==e.id?(0,b.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:String(e.summary||e.description||e.path||e.id)}):null,a!==`basic`&&e.id&&e[t]!==e.id?(0,b.jsx)(`div`,{className:`mt-1 text-xs text-muted-foreground`,children:s(e.id,48)}):null]},String(e.id||e.name||r)))}):(0,b.jsx)(k,{detail:u(o,`ui.empty.listDetail`)})}function G({title:e,detail:t,target:n=`advanced`}){let r=i(e=>e.setMode),a=i(e=>e.language);return(0,b.jsx)(C,{children:(0,b.jsxs)(D,{className:`flex flex-col items-start gap-3 p-6`,children:[(0,b.jsx)(`div`,{className:`grid h-10 w-10 place-items-center rounded-md border border-border bg-background/70`,children:(0,b.jsx)(v,{className:`h-5 w-5 text-primary`})}),(0,b.jsxs)(`div`,{children:[(0,b.jsx)(`div`,{className:`text-lg font-semibold`,children:e||u(a,`ui.modeGate.title`)}),(0,b.jsx)(`p`,{className:`mt-1 max-w-2xl text-sm leading-6 text-muted-foreground`,children:t||u(a,`ui.modeGate.detail`)})]}),(0,b.jsx)(m,{onClick:()=>r(n),children:n===`admin`?u(a,`ui.modeGate.admin`):u(a,`ui.modeGate.advanced`)})]})})}function K({label:e,successLabel:t,action:n,invalidate:r,variant:a=`outline`,disabled:s}){let l=d(),h=i(e=>e.language),g=t||u(h,`ui.done`),[v,x]=y.useState(null),S=f({mutationFn:n,onSuccess:async e=>{x(e.ok?g:e.error||u(h,`ui.status.unavailable`)),r&&await Promise.all(r.map(e=>l.invalidateQueries({queryKey:[e]})))}});return(0,b.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,b.jsxs)(m,{variant:a,disabled:s||S.isPending,onClick:()=>S.mutate(),children:[S.isPending?(0,b.jsx)(p,{className:`h-4 w-4 animate-spin`}):null,e]}),v?(0,b.jsxs)(`span`,{className:o(`inline-flex items-center gap-1 text-xs`,v===g?`text-success`:`text-warning`),children:[v===g?(0,b.jsx)(c,{className:`h-3.5 w-3.5`}):(0,b.jsx)(_,{className:`h-3.5 w-3.5`}),v]}):null]})}function q({tabs:e,value:t,onChange:n}){return(0,b.jsx)(`div`,{className:`inline-flex max-w-full flex-wrap gap-1 rounded-lg border border-border bg-muted/28 p-1`,children:e.map(e=>(0,b.jsx)(`button`,{onClick:()=>n(e.id),className:o(`h-9 rounded-md px-3.5 text-sm font-semibold transition`,t===e.id?`bg-card text-foreground shadow-sm`:`text-muted-foreground hover:bg-card/60 hover:text-foreground`),children:e.label},e.id))})}export{T as _,B as a,U as c,q as d,z as f,w as g,E as h,W as i,M as l,D as m,A as n,j as o,C as p,k as r,G as s,K as t,V as u,S as v,_ as y};
1
+ import{C as e,E as t,I as n,M as r,O as i,P as a,S as o,T as s,_ as c,a as l,b as u,j as d,k as f,l as p,n as m,x as h,y as g}from"./index-Bh7IIlyY.js";var _=g(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),v=g(`lock-keyhole`,[[`circle`,{cx:`12`,cy:`16`,r:`1`,key:`1au0dj`}],[`rect`,{x:`3`,y:`10`,width:`18`,height:`12`,rx:`2`,key:`6s8ecr`}],[`path`,{d:`M7 10V7a5 5 0 0 1 10 0v3`,key:`1pqi11`}]]),y=n(a()),b=r(),x={default:`border-primary/25 bg-primary/12 text-primary`,success:`border-success/30 bg-success/12 text-success`,warning:`border-warning/30 bg-warning/12 text-warning`,muted:`border-border bg-muted/70 text-muted-foreground`,danger:`border-destructive/30 bg-destructive/12 text-destructive`};function S({className:e,variant:t=`default`,...n}){return(0,b.jsx)(`span`,{className:o(`inline-flex min-h-6 max-w-full items-center whitespace-nowrap rounded-md border px-2 py-0.5 text-xs font-semibold leading-none`,x[t],e),...n})}function C({className:e,...t}){return(0,b.jsx)(`section`,{className:o(`premium-surface rounded-lg text-card-foreground`,e),...t})}function w({className:e,...t}){return(0,b.jsx)(`div`,{className:o(`flex flex-col gap-1.5 p-5`,e),...t})}function T({className:e,...t}){return(0,b.jsx)(`h2`,{className:o(`text-base font-semibold tracking-normal`,e),...t})}function E({className:e,...t}){return(0,b.jsx)(`p`,{className:o(`text-sm leading-6 text-muted-foreground`,e),...t})}function D({className:e,...t}){return(0,b.jsx)(`div`,{className:o(`p-5 pt-0`,e),...t})}function O({result:e}){let t=i(e=>e.mode),n=i(e=>e.language);return e?e.source===`live`&&e.ok?(0,b.jsx)(S,{variant:`success`,children:t===`basic`?u(n,`ui.status.ready`):u(n,`ui.status.connected`)}):(0,b.jsx)(S,{variant:`warning`,children:t===`basic`?u(n,`ui.status.needsSetup`):u(n,`ui.status.unavailable`)}):(0,b.jsx)(S,{variant:`muted`,children:u(n,`ui.status.notLoaded`)})}function k({title:e,detail:t}){let n=i(e=>e.language);return(0,b.jsxs)(`div`,{className:`flex min-h-36 flex-col items-center justify-center gap-2 rounded-lg border border-dashed border-border bg-muted/24 p-6 text-center text-sm text-muted-foreground`,children:[(0,b.jsx)(`div`,{className:`grid h-10 w-10 place-items-center rounded-md border border-border bg-card`,children:(0,b.jsx)(l,{className:`h-5 w-5 text-primary`})}),(0,b.jsx)(`div`,{className:`text-base font-semibold text-foreground`,children:e||u(n,`ui.empty.title`)}),t?(0,b.jsx)(`div`,{className:`max-w-md leading-6`,children:t}):null]})}function A({title:e,description:t,result:n,children:r,className:a}){let s=i(e=>e.mode),c=i(e=>e.language);return(0,b.jsxs)(C,{className:o(`overflow-hidden`,a),children:[(0,b.jsxs)(w,{className:`flex-row items-start justify-between gap-3`,children:[(0,b.jsxs)(`div`,{children:[(0,b.jsx)(T,{children:e}),t?(0,b.jsx)(E,{children:t}):null]}),(0,b.jsx)(O,{result:n})]}),(0,b.jsx)(D,{children:n?.ok?r(n.data):(0,b.jsx)(k,{detail:s===`basic`?u(c,`ui.empty.basicDetail`):n?.error||u(c,`ui.empty.advancedDetail`)})})]})}function j({title:e}){let t=i(e=>e.language);return(0,b.jsxs)(C,{children:[(0,b.jsx)(w,{children:(0,b.jsx)(T,{children:e})}),(0,b.jsx)(D,{children:(0,b.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,b.jsx)(p,{className:`h-4 w-4 animate-spin`}),` `,u(t,`ui.loading`)]})})]})}function M({stats:t}){return(0,b.jsx)(`div`,{className:`grid gap-3 sm:grid-cols-2 xl:grid-cols-4`,children:t.map(t=>(0,b.jsxs)(`div`,{className:`rounded-lg border border-border bg-background/55 p-4`,children:[(0,b.jsx)(`div`,{className:`text-xs uppercase text-muted-foreground`,children:t.label}),(0,b.jsx)(`div`,{className:`mt-2 text-2xl font-semibold leading-tight`,children:typeof t.value==`number`?e(t.value):String(t.value??`-`)}),t.hint?(0,b.jsx)(`div`,{className:`mt-2 text-xs leading-5 text-muted-foreground`,children:t.hint}):null]},t.label))})}function N(e){return!!(e&&typeof e==`object`&&!Array.isArray(e))}function P(t){return t==null||t===``?`-`:typeof t==`number`?Number.isFinite(t)?e(t):`-`:typeof t==`boolean`?t?`Enabled`:`Disabled`:String(t)}var F=/(^id$|_id$|token|secret|passphrase|fingerprint|public_key|private_key|dsn|schema|endpoint|base_url|localhost|127\.0\.0\.1|stack|trace|raw|runtime|engine|module|port|host|api|internal)/i;function I(e){return F.test(e)}function L(e){let n=P(e);return n===`-`||n.includes(`/`)||n.includes(`@`)||/\.[a-z0-9]{2,5}$/i.test(n)?n:t(n.replace(/^agent:/i,``).replace(/^tool:/i,``))}function R(e){for(let t of[`documents`,`sources`,`items`,`agents`,`workflows`,`runs`,`events`,`permissions`,`models`,`peers`,`invitations`,`roles`,`policies`,`hooks`,`tools`,`templates`,`plugins`,`recent_events`]){let n=h(e[t]);if(n.length)return n}return[]}function z({value:n}){if(typeof n==`boolean`)return(0,b.jsx)(S,{variant:n?`success`:`muted`,children:n?`enabled`:`disabled`});if(Array.isArray(n))return n.length?n.every(e=>e===null||[`string`,`number`,`boolean`].includes(typeof e))?(0,b.jsxs)(`span`,{className:`flex flex-wrap gap-1`,children:[n.slice(0,5).map((e,t)=>(0,b.jsx)(S,{variant:`muted`,children:P(e)},`${String(e)}-${t}`)),n.length>5?(0,b.jsxs)(S,{variant:`muted`,children:[`+`,n.length-5]}):null]}):(0,b.jsxs)(`span`,{className:`text-muted-foreground`,children:[e(n.length),` records`]}):(0,b.jsx)(`span`,{className:`text-muted-foreground`,children:`None`});if(N(n)){let e=Object.keys(n);return e.length?(0,b.jsxs)(`span`,{className:`text-muted-foreground`,children:[e.slice(0,4).map(t).join(`, `),e.length>4?` +${e.length-4}`:``]}):(0,b.jsx)(`span`,{className:`text-muted-foreground`,children:`No fields`})}let r=P(n);return(0,b.jsx)(`span`,{className:`break-words`,children:r.length>96?s(r,96):r})}function B({data:e,limit:n=8}){let r=i(e=>e.mode),a=i(e=>e.language),o=Object.entries(e||{}).filter(([e])=>r!==`basic`||!I(e)).slice(0,n);return o.length?(0,b.jsx)(`div`,{className:`divide-y divide-border rounded-md border border-border`,children:o.map(([e,n])=>(0,b.jsxs)(`div`,{className:`grid grid-cols-[minmax(9rem,0.5fr)_1fr] gap-3 p-3 text-sm`,children:[(0,b.jsx)(`span`,{className:`font-medium text-muted-foreground`,children:t(e)}),(0,b.jsx)(`span`,{className:`min-w-0 break-words`,children:(0,b.jsx)(z,{value:n})})]},e))}):(0,b.jsx)(k,{title:u(a,`ui.noValues`)})}function V({value:e,titleKey:t=`title`,metaKey:n=`status`,limit:r=8}){let a=i(e=>e.mode),o=i(e=>e.language);return a===`basic`?(0,b.jsx)(H,{value:e,titleKey:t,metaKey:n,limit:r}):Array.isArray(e)?e.length?e.every(e=>N(e))?(0,b.jsx)(W,{items:e,titleKey:t,metaKey:n,limit:r}):(0,b.jsxs)(`div`,{className:`flex flex-wrap gap-1 rounded-md border border-border bg-background p-3`,children:[e.slice(0,r).map((e,t)=>(0,b.jsx)(S,{variant:`muted`,children:P(e)},`${String(e)}-${t}`)),e.length>r?(0,b.jsxs)(S,{variant:`muted`,children:[`+`,e.length-r]}):null]}):(0,b.jsx)(k,{detail:u(o,`ui.empty.listDetail`)}):N(e)?(0,b.jsx)(B,{data:e,limit:r}):(0,b.jsx)(`div`,{className:`rounded-md border border-border bg-background p-3 text-sm`,children:(0,b.jsx)(z,{value:e})})}function H({value:t,titleKey:n=`title`,metaKey:r=`status`,limit:a=6}){let o=i(e=>e.language);if(Array.isArray(t))return t.length?t.every(e=>N(e))?(0,b.jsx)(W,{items:t,titleKey:n,metaKey:r,limit:a}):(0,b.jsxs)(`div`,{className:`flex flex-wrap gap-1 rounded-md border border-border bg-background/55 p-3`,children:[t.slice(0,a).map((e,t)=>(0,b.jsx)(S,{variant:`muted`,children:L(e)},`${String(e)}-${t}`)),t.length>a?(0,b.jsxs)(S,{variant:`muted`,children:[`+`,t.length-a]}):null]}):(0,b.jsx)(k,{detail:u(o,`ui.empty.listDetail`)});if(N(t)){let i=R(t);return i.length?(0,b.jsx)(W,{items:i,titleKey:n,metaKey:r,limit:a}):(0,b.jsx)(B,{data:Object.fromEntries(Object.entries(t).filter(([e])=>!I(e)).map(([t,n])=>[t,Array.isArray(n)?`${e(n.length)} items`:N(n)?`available`:n])),limit:a})}return(0,b.jsx)(`div`,{className:`rounded-md border border-border bg-background/55 p-3 text-sm`,children:L(t)})}function U({result:e,successLabel:t}){let n=i(e=>e.mode),r=i(e=>e.language);return e?e.ok?(0,b.jsxs)(`div`,{className:`space-y-2 rounded-md border border-border bg-background p-3`,children:[(0,b.jsx)(S,{variant:`success`,children:t||u(r,`ui.requestCompleted`)}),n===`basic`?(0,b.jsx)(H,{value:e.data}):(0,b.jsx)(V,{value:e.data})]}):(0,b.jsx)(k,{title:u(r,`ui.requestUnavailable`),detail:e.error||(0,b.jsx)(z,{value:e.data})}):null}function W({items:e,titleKey:t=`title`,metaKey:n=`type`,limit:r=8}){let a=i(e=>e.mode),o=i(e=>e.language),c=h(e).slice(0,r);return c.length?(0,b.jsx)(`div`,{className:`grid gap-2`,children:c.map((e,r)=>(0,b.jsxs)(`div`,{className:`rounded-lg border border-border bg-background/55 p-3`,children:[(0,b.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,b.jsx)(`div`,{className:`font-medium`,children:a===`basic`?L(e[t]||e.name||e.label||`Item ${r+1}`):String(e[t]||e.name||e.id||`Record ${r+1}`)}),(0,b.jsx)(S,{variant:`muted`,children:a===`basic`?L(e[n]||e.status||e.state||`ready`):String(e[n]||e.status||e.state||`record`)})]}),e.summary||e.description||e.path||e.id&&e[t]!==e.id?(0,b.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:String(e.summary||e.description||e.path||e.id)}):null,a!==`basic`&&e.id&&e[t]!==e.id?(0,b.jsx)(`div`,{className:`mt-1 text-xs text-muted-foreground`,children:s(e.id,48)}):null]},String(e.id||e.name||r)))}):(0,b.jsx)(k,{detail:u(o,`ui.empty.listDetail`)})}function G({title:e,detail:t,target:n=`advanced`}){let r=i(e=>e.setMode),a=i(e=>e.language);return(0,b.jsx)(C,{children:(0,b.jsxs)(D,{className:`flex flex-col items-start gap-3 p-6`,children:[(0,b.jsx)(`div`,{className:`grid h-10 w-10 place-items-center rounded-md border border-border bg-background/70`,children:(0,b.jsx)(v,{className:`h-5 w-5 text-primary`})}),(0,b.jsxs)(`div`,{children:[(0,b.jsx)(`div`,{className:`text-lg font-semibold`,children:e||u(a,`ui.modeGate.title`)}),(0,b.jsx)(`p`,{className:`mt-1 max-w-2xl text-sm leading-6 text-muted-foreground`,children:t||u(a,`ui.modeGate.detail`)})]}),(0,b.jsx)(m,{onClick:()=>r(n),children:n===`admin`?u(a,`ui.modeGate.admin`):u(a,`ui.modeGate.advanced`)})]})})}function K({label:e,successLabel:t,action:n,invalidate:r,variant:a=`outline`,disabled:s}){let l=d(),h=i(e=>e.language),g=t||u(h,`ui.done`),[v,x]=y.useState(null),S=f({mutationFn:n,onSuccess:async e=>{x(e.ok?g:e.error||u(h,`ui.status.unavailable`)),r&&await Promise.all(r.map(e=>l.invalidateQueries({queryKey:[e]})))}});return(0,b.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,b.jsxs)(m,{variant:a,disabled:s||S.isPending,onClick:()=>S.mutate(),children:[S.isPending?(0,b.jsx)(p,{className:`h-4 w-4 animate-spin`}):null,e]}),v?(0,b.jsxs)(`span`,{className:o(`inline-flex items-center gap-1 text-xs`,v===g?`text-success`:`text-warning`),children:[v===g?(0,b.jsx)(c,{className:`h-3.5 w-3.5`}):(0,b.jsx)(_,{className:`h-3.5 w-3.5`}),v]}):null]})}function q({tabs:e,value:t,onChange:n}){return(0,b.jsx)(`div`,{className:`inline-flex max-w-full flex-wrap gap-1 rounded-lg border border-border bg-muted/28 p-1`,children:e.map(e=>(0,b.jsx)(`button`,{onClick:()=>n(e.id),className:o(`h-9 rounded-md px-3.5 text-sm font-semibold transition`,t===e.id?`bg-card text-foreground shadow-sm`:`text-muted-foreground hover:bg-card/60 hover:text-foreground`),children:e.label},e.id))})}export{T as _,B as a,U as c,q as d,z as f,w as g,E as h,W as i,M as l,D as m,A as n,j as o,C as p,k as r,G as s,K as t,V as u,S as v,_ as y};
@@ -1 +1 @@
1
- import{I as e,M as t,P as n,S as r}from"./index-BaaPtsLp.js";var i=e(n()),a=t(),o=i.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`textarea`,{ref:n,className:r(`min-h-28 w-full resize-y rounded-md border border-input bg-background/70 px-3 py-3 text-sm leading-6 outline-none transition placeholder:text-muted-foreground focus:border-ring focus:ring-2 focus:ring-ring/35 disabled:cursor-not-allowed disabled:opacity-50`,e),...t}));o.displayName=`Textarea`;export{o as t};
1
+ import{I as e,M as t,P as n,S as r}from"./index-Bh7IIlyY.js";var i=e(n()),a=t(),o=i.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`textarea`,{ref:n,className:r(`min-h-28 w-full resize-y rounded-md border border-input bg-background/70 px-3 py-3 text-sm leading-6 outline-none transition placeholder:text-muted-foreground focus:border-ring focus:ring-2 focus:ring-ring/35 disabled:cursor-not-allowed disabled:opacity-50`,e),...t}));o.displayName=`Textarea`;export{o as t};
@@ -8,7 +8,7 @@
8
8
  <link rel="manifest" href="/manifest.json" />
9
9
  <link rel="icon" type="image/png" sizes="32x32" href="/icons/favicon-32.png" />
10
10
  <script src="/static/app/theme-boot.js"></script>
11
- <script type="module" crossorigin src="/static/app/assets/index-BaaPtsLp.js"></script>
11
+ <script type="module" crossorigin src="/static/app/assets/index-Bh7IIlyY.js"></script>
12
12
  <link rel="stylesheet" crossorigin href="/static/app/assets/index-_M5aCv21.css">
13
13
  </head>
14
14
  <body>
package/static/sw.js CHANGED
@@ -1,7 +1,7 @@
1
1
  // Lattice Service Worker — PWA install + offline shell for the /app SPA.
2
2
  // Strategy: precache the Vite app bundle from its asset manifest,
3
3
  // cache-first for static assets, network-only for everything dynamic.
4
- const CACHE = "lattice-v860";
4
+ const CACHE = "lattice-v870";
5
5
  const MANIFEST_URL = "/static/app/asset-manifest.json";
6
6
 
7
7
  // Non-manifest assets the shell needs offline.
@@ -1 +0,0 @@
1
- import{_ as e,c as t,d as n,g as r,h as i,i as a,m as o,n as s,p as c,t as l,u,y as d}from"./primitives-lz45ZfWY.js";import{A as f,D as p,I as m,M as h,O as g,P as _,_ as v,b as y,c as b,d as x,f as S,j as C,k as w,l as T,n as E,t as D,u as O,x as k,y as A}from"./index-BaaPtsLp.js";var j=A(`clipboard-paste`,[[`path`,{d:`M11 14h10`,key:`1w8e9d`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v1.344`,key:`1e62lh`}],[`path`,{d:`m17 18 4-4-4-4`,key:`z2g111`}],[`path`,{d:`M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 1.793-1.113`,key:`bjbb7m`}],[`rect`,{x:`8`,y:`2`,width:`8`,height:`4`,rx:`1`,key:`ublpy`}]]),M=A(`folder-open`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),N=A(`scan-line`,[[`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`,key:`aa7l1z`}],[`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`,key:`4qcy5o`}],[`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`,key:`6vwrx8`}],[`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`,key:`ioqczr`}],[`path`,{d:`M7 12h10`,key:`b7w52i`}]]),P=A(`upload`,[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]),F=m(_()),I=h();function L({initialTab:e}){let t=g(e=>e.language),[r,i]=F.useState(e||`files`),a=[{id:`files`,label:y(t,`capture.tab.files`)},{id:`local`,label:y(t,`capture.tab.local`)},{id:`browser`,label:y(t,`capture.tab.browser`)},{id:`pipeline`,label:y(t,`capture.tab.pipeline`)}];return F.useEffect(()=>{(e===`pipeline`||e===`local`||e===`files`)&&i(e)},[e]),(0,I.jsxs)(`div`,{className:`space-y-5`,children:[(0,I.jsxs)(`header`,{className:`page-hero`,children:[(0,I.jsxs)(`div`,{className:`page-kicker`,children:[(0,I.jsx)(P,{className:`h-4 w-4`}),` `,y(t,`capture.kicker`)]}),(0,I.jsx)(`h1`,{className:`page-title`,children:y(t,`capture.title`)}),(0,I.jsx)(`p`,{className:`page-copy`,children:y(t,`capture.body`)})]}),(0,I.jsx)(n,{tabs:a,value:r,onChange:e=>i(e)}),r===`files`?(0,I.jsx)(R,{}):null,r===`local`?(0,I.jsx)(H,{}):null,r===`browser`?(0,I.jsx)(U,{}):null,r===`pipeline`?(0,I.jsx)(G,{}):null]})}function R(){let t=g(e=>e.language),n=C(),l=f({queryKey:[`documents`],queryFn:()=>p.documents(200)}),[u,d]=F.useState([]),m=w({mutationFn:e=>z(e,d),onSuccess:()=>{n.invalidateQueries({queryKey:[`documents`]}),n.invalidateQueries({queryKey:[`graphStats`]}),n.invalidateQueries({queryKey:[`memoryManager`]})}}),h=F.useCallback(e=>{let t=Array.from(e);t.length&&m.mutate(t)},[m]);return(0,I.jsxs)(`div`,{className:`grid gap-4 xl:grid-cols-[0.75fr_1.25fr]`,children:[(0,I.jsxs)(c,{children:[(0,I.jsxs)(r,{children:[(0,I.jsxs)(e,{className:`flex items-center gap-2`,children:[(0,I.jsx)(P,{className:`h-4 w-4`}),` `,y(t,`capture.files.title`)]}),(0,I.jsx)(i,{children:y(t,`capture.files.description`)})]}),(0,I.jsxs)(o,{children:[(0,I.jsxs)(`label`,{className:`flex min-h-56 cursor-pointer flex-col items-center justify-center gap-3 rounded-lg border border-dashed border-border bg-muted/30 p-6 text-center transition hover:bg-muted/50`,onDragOver:e=>e.preventDefault(),onDrop:e=>{e.preventDefault(),h(e.dataTransfer.files)},children:[(0,I.jsx)(P,{className:`h-7 w-7 text-primary`}),(0,I.jsx)(`span`,{className:`text-lg font-semibold`,children:y(t,`capture.files.drop`)}),(0,I.jsx)(`span`,{className:`max-w-sm text-sm leading-6 text-muted-foreground`,children:y(t,`capture.files.dropDetail`)}),(0,I.jsx)(`input`,{type:`file`,multiple:!0,className:`sr-only`,onChange:e=>e.target.files&&h(e.target.files)})]}),(0,I.jsx)(B,{queue:u,onRetry:e=>h([e])})]})]}),(0,I.jsx)(s,{title:y(t,`capture.files.uploaded`),result:l.data,children:e=>(0,I.jsxs)(`div`,{className:`space-y-3`,children:[(0,I.jsx)(a,{items:e.documents||e,titleKey:`filename`,metaKey:`ingest_state`,limit:12}),(0,I.jsx)(`div`,{className:`rounded-md border border-border bg-background/55 p-3 text-sm text-muted-foreground`,children:y(t,`capture.files.completed`)})]})})]})}async function z(e,t){let n=e.map(e=>({id:`${e.name}-${e.size}-${e.lastModified}-${Date.now()}`,file:e,name:e.name,size:e.size,status:`queued`}));t(e=>[...n,...e].slice(0,12));let r=[];for(let e of n){t(t=>t.map(t=>t.id===e.id?{...t,status:`uploading`}:t));let n=await p.uploadDocument(e.file);r.push(n),t(t=>t.map(t=>t.id===e.id?{...t,status:n.ok?`done`:`failed`,result:n}:t))}return r}function B({queue:e,onRetry:n}){let r=g(e=>e.language);return e.length?(0,I.jsx)(`div`,{className:`mt-4 space-y-2`,children:e.map(e=>{let i=V(e,r);return(0,I.jsxs)(`div`,{className:`rounded-md border border-border bg-background/55 p-3 text-sm`,children:[(0,I.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2 font-medium`,children:[e.status===`done`?(0,I.jsx)(v,{className:`h-4 w-4 text-emerald-400`}):e.status===`failed`?(0,I.jsx)(d,{className:`h-4 w-4 text-amber-400`}):(0,I.jsx)(T,{className:`h-4 w-4 animate-spin text-primary`}),e.name]}),(0,I.jsxs)(`div`,{className:`mt-1 text-xs text-muted-foreground`,children:[Math.max(1,Math.round(e.size/1024)),` KB · `,i]})]}),e.status===`failed`?(0,I.jsxs)(E,{size:`sm`,variant:`outline`,onClick:()=>n(e.file),children:[(0,I.jsx)(b,{className:`h-3.5 w-3.5`}),` `,y(r,`capture.retry`)]}):null]}),e.result?(0,I.jsx)(t,{result:e.result,successLabel:y(r,`capture.files.success`)}):null]},e.id)})}):null}function V(e,t){if(e.status===`queued`)return y(t,`capture.files.queued`);if(e.status===`uploading`)return y(t,`capture.files.uploading`);if(!e.result?.ok)return e.result?.error||y(t,`capture.files.failed`);let n=e.result.data||{},r=String(n.node_id||n.graph_node||n.provenance_id||``);return r?y(t,`capture.files.capturedWithNode`,{node:r}):y(t,`capture.files.captured`)}function H(){let n=g(e=>e.language),d=C(),[m,h]=F.useState(``),[_,v]=F.useState(null),b=f({queryKey:[`localSources`],queryFn:p.localSources}),S=f({queryKey:[`localAgent`],queryFn:p.localAgent}),O=w({mutationFn:e=>p.connectFolder((e||m).trim()),onSuccess:()=>{v(null),d.invalidateQueries({queryKey:[`localSources`]}),d.invalidateQueries({queryKey:[`graphStats`]}),d.invalidateQueries({queryKey:[`memoryManager`]})}}),A=w({mutationFn:p.selectFolder,onSuccess:e=>{if(!e){v(y(n,`capture.local.pickUnavailable`));return}v(null),h(e),O.mutate(e)},onError:()=>v(y(n,`capture.local.pickUnavailable`))}),j=F.useCallback(()=>{let e=m.trim();e&&(v(null),O.mutate(e))},[O,m]);return(0,I.jsxs)(`div`,{className:`grid gap-4 xl:grid-cols-[0.9fr_1.1fr]`,children:[(0,I.jsxs)(c,{children:[(0,I.jsxs)(r,{children:[(0,I.jsxs)(e,{className:`flex items-center gap-2`,children:[(0,I.jsx)(x,{className:`h-4 w-4`}),` `,y(n,`capture.local.title`)]}),(0,I.jsx)(i,{children:y(n,`capture.local.description`)})]}),(0,I.jsxs)(o,{className:`space-y-3`,children:[(0,I.jsxs)(`form`,{className:`space-y-3`,onSubmit:e=>{e.preventDefault(),j()},children:[(0,I.jsxs)(`div`,{className:`flex flex-col gap-2 sm:flex-row`,children:[(0,I.jsx)(D,{value:m,onChange:e=>h(e.target.value),placeholder:y(n,`capture.local.placeholder`)}),(0,I.jsxs)(E,{type:`button`,variant:`outline`,disabled:A.isPending||O.isPending,onClick:()=>A.mutate(),children:[A.isPending?(0,I.jsx)(T,{className:`h-4 w-4 animate-spin`}):(0,I.jsx)(M,{className:`h-4 w-4`}),A.isPending?y(n,`capture.local.choosing`):y(n,`capture.local.choose`)]})]}),(0,I.jsxs)(E,{type:`submit`,disabled:!m.trim()||O.isPending,children:[O.isPending?(0,I.jsx)(T,{className:`h-4 w-4 animate-spin`}):(0,I.jsx)(N,{className:`h-4 w-4`}),y(n,`capture.local.connect`)]})]}),_?(0,I.jsx)(t,{result:{ok:!1,status:0,data:{},source:`unavailable`,error:_}}):null,O.data?(0,I.jsx)(t,{result:O.data,successLabel:y(n,`capture.local.success`)}):null]})]}),(0,I.jsx)(s,{title:y(n,`capture.local.sources`),result:b.data,children:e=>(0,I.jsxs)(`div`,{className:`space-y-3`,children:[(0,I.jsx)(a,{items:e.sources,titleKey:`path`,metaKey:`status`}),k(e.sources).map(e=>(0,I.jsx)(l,{label:`Stop ${String(e.path||e.id||`source`)}`,action:()=>p.localWatchStop(String(e.id||e.source_id)),invalidate:[`localSources`]},String(e.id||e.source_id||e.path)))]})}),(0,I.jsx)(s,{title:y(n,`capture.local.access`),result:S.data,className:`xl:col-span-2`,children:e=>(0,I.jsx)(u,{value:e})})]})}function U(){let n=g(e=>e.language),a=C(),[s,l]=F.useState(``),u=w({mutationFn:e=>p.browserReadUrl(e),onSuccess:()=>{a.invalidateQueries({queryKey:[`graphStats`]}),a.invalidateQueries({queryKey:[`memoryManager`]})}}),d=F.useCallback(()=>{let e=W(s);e&&(l(e),u.mutate(e))},[u,s]),f=F.useCallback(async()=>{let e=W(await navigator.clipboard?.readText().catch(()=>``)||``);e&&(l(e),u.mutate(e))},[u]);return(0,I.jsxs)(c,{children:[(0,I.jsxs)(r,{children:[(0,I.jsxs)(e,{className:`flex items-center gap-2`,children:[(0,I.jsx)(S,{className:`h-4 w-4`}),` `,y(n,`capture.browser.title`)]}),(0,I.jsx)(i,{children:y(n,`capture.browser.description`)})]}),(0,I.jsxs)(o,{className:`space-y-3`,children:[(0,I.jsxs)(`form`,{className:`flex flex-col gap-2 sm:flex-row`,onSubmit:e=>{e.preventDefault(),d()},children:[(0,I.jsx)(D,{value:s,onChange:e=>l(e.target.value),placeholder:y(n,`capture.browser.placeholder`),inputMode:`url`}),(0,I.jsxs)(E,{type:`button`,variant:`outline`,disabled:u.isPending,onClick:()=>void f(),children:[(0,I.jsx)(j,{className:`h-4 w-4`}),` `,y(n,`capture.browser.paste`)]}),(0,I.jsxs)(E,{type:`submit`,disabled:!s.trim()||u.isPending,children:[u.isPending?(0,I.jsx)(T,{className:`h-4 w-4 animate-spin`}):(0,I.jsx)(N,{className:`h-4 w-4`}),y(n,`capture.browser.capture`)]})]}),u.data?(0,I.jsx)(t,{result:u.data,successLabel:y(n,`capture.browser.success`)}):null]})]})}function W(e){let t=e.trim();return t?/^https?:\/\//i.test(t)?t:/^[\w.-]+\.[a-z]{2,}([/:?#].*)?$/i.test(t)?`https://${t}`:t:``}function G(){let t=g(e=>e.language),n=f({queryKey:[`index`],queryFn:p.indexStatus}),a=f({queryKey:[`graphStats`],queryFn:p.graphStats});return(0,I.jsxs)(`div`,{className:`grid gap-4 xl:grid-cols-2`,children:[(0,I.jsx)(s,{title:y(t,`capture.pipeline.status`),result:n.data,children:e=>(0,I.jsx)(u,{value:e})}),(0,I.jsx)(s,{title:y(t,`capture.pipeline.growth`),result:a.data,children:e=>(0,I.jsx)(u,{value:e})}),(0,I.jsxs)(c,{className:`xl:col-span-2`,children:[(0,I.jsxs)(r,{children:[(0,I.jsxs)(e,{className:`flex items-center gap-2`,children:[(0,I.jsx)(O,{className:`h-4 w-4`}),` `,y(t,`capture.pipeline.refresh`)]}),(0,I.jsx)(i,{children:y(t,`capture.pipeline.description`)})]}),(0,I.jsx)(o,{children:(0,I.jsx)(l,{label:y(t,`capture.pipeline.rebuild`),action:()=>p.rebuildIndex(),invalidate:[`index`]})})]})]})}export{L as CapturePage};