nao-core 0.0.19__py3-none-any.whl → 0.0.25__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- nao_core/__init__.py +1 -1
- nao_core/bin/.nao-secret +1 -0
- nao_core/bin/fastapi/main.py +5 -25
- nao_core/bin/migrations-postgres/0001_message_feedback.sql +9 -0
- nao_core/bin/migrations-postgres/0002_chat_message_stop_reason_and_error_message.sql +2 -0
- nao_core/bin/migrations-postgres/0003_handle_slack_with_thread.sql +2 -0
- nao_core/bin/migrations-postgres/meta/0001_snapshot.json +766 -0
- nao_core/bin/migrations-postgres/meta/0002_snapshot.json +778 -0
- nao_core/bin/migrations-postgres/meta/0003_snapshot.json +799 -0
- nao_core/bin/migrations-postgres/meta/_journal.json +21 -0
- nao_core/bin/migrations-sqlite/0001_message_feedback.sql +8 -0
- nao_core/bin/migrations-sqlite/0002_chat_message_stop_reason_and_error_message.sql +2 -0
- nao_core/bin/migrations-sqlite/0003_handle_slack_with_thread.sql +2 -0
- nao_core/bin/migrations-sqlite/meta/0001_snapshot.json +735 -0
- nao_core/bin/migrations-sqlite/meta/0002_snapshot.json +749 -0
- nao_core/bin/migrations-sqlite/meta/0003_snapshot.json +763 -0
- nao_core/bin/migrations-sqlite/meta/_journal.json +21 -0
- nao_core/bin/nao-chat-server +0 -0
- nao_core/bin/public/assets/_chat-layout-BTlqRUE5.js +1 -0
- nao_core/bin/public/assets/{_chat-layout.index-CWlZ1WSD.js → _chat-layout.index-DOARokp1.js} +1 -1
- nao_core/bin/public/assets/agentProvider-C6dGIy-H.js +1 -0
- nao_core/bin/public/assets/button-By_1dzVx.js +1 -0
- nao_core/bin/public/assets/{code-block-F6WJLWQG-BdtbfwZl.js → code-block-F6WJLWQG-EQr6mTlQ.js} +3 -3
- nao_core/bin/public/assets/folder-DnRS5rg3.js +1 -0
- nao_core/bin/public/assets/index-CElAN2SH.css +1 -0
- nao_core/bin/public/assets/index-ZTHASguQ.js +59 -0
- nao_core/bin/public/assets/input-CUQA5tsi.js +1 -0
- nao_core/bin/public/assets/login-BUQDum3t.js +1 -0
- nao_core/bin/public/assets/{mermaid-FSSLJTFX-_2mzlJwk.js → mermaid-FSSLJTFX-Dc6ZvCPw.js} +120 -75
- nao_core/bin/public/assets/sidebar-bgEk7Xg8.js +1 -0
- nao_core/bin/public/assets/signinForm-CGAhnAkv.js +1 -0
- nao_core/bin/public/assets/signup-D2n11La3.js +1 -0
- nao_core/bin/public/assets/user-CYl8Tly2.js +1 -0
- nao_core/bin/public/index.html +2 -2
- nao_core/bin/public/nao-square-logo.png +0 -0
- nao_core/commands/chat.py +43 -0
- nao_core/commands/sync/databases.py +1 -1
- nao_core/config/base.py +0 -9
- nao_core/config/llm/__init__.py +1 -0
- {nao_core-0.0.19.dist-info → nao_core-0.0.25.dist-info}/METADATA +1 -1
- nao_core-0.0.25.dist-info/RECORD +68 -0
- nao_core/bin/public/assets/_chat-layout-BSDXwLlM.js +0 -1
- nao_core/bin/public/assets/agentProvider-BkGOwLc-.js +0 -1
- nao_core/bin/public/assets/createLucideIcon-CAzRYUZ0.js +0 -1
- nao_core/bin/public/assets/index-DD1IB790.css +0 -1
- nao_core/bin/public/assets/index-gWi3S-SV.js +0 -59
- nao_core/bin/public/assets/login-BEFjZaUF.js +0 -1
- nao_core/bin/public/assets/signinForm-D97br205.js +0 -1
- nao_core/bin/public/assets/signup-CU4v0Hqr.js +0 -1
- nao_core-0.0.19.dist-info/RECORD +0 -50
- {nao_core-0.0.19.dist-info → nao_core-0.0.25.dist-info}/WHEEL +0 -0
- {nao_core-0.0.19.dist-info → nao_core-0.0.25.dist-info}/entry_points.txt +0 -0
- {nao_core-0.0.19.dist-info → nao_core-0.0.25.dist-info}/licenses/LICENSE +0 -0
|
@@ -8,6 +8,27 @@
|
|
|
8
8
|
"when": 1768388391105,
|
|
9
9
|
"tag": "0000_user_auth_and_chat_tables",
|
|
10
10
|
"breakpoints": true
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"idx": 1,
|
|
14
|
+
"version": "6",
|
|
15
|
+
"when": 1768493382221,
|
|
16
|
+
"tag": "0001_message_feedback",
|
|
17
|
+
"breakpoints": true
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"idx": 2,
|
|
21
|
+
"version": "6",
|
|
22
|
+
"when": 1768552721702,
|
|
23
|
+
"tag": "0002_chat_message_stop_reason_and_error_message",
|
|
24
|
+
"breakpoints": true
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"idx": 3,
|
|
28
|
+
"version": "6",
|
|
29
|
+
"when": 1768561598427,
|
|
30
|
+
"tag": "0003_handle_slack_with_thread",
|
|
31
|
+
"breakpoints": true
|
|
11
32
|
}
|
|
12
33
|
]
|
|
13
34
|
}
|
nao_core/bin/nao-chat-server
CHANGED
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as t,f as m,b as f,t as b,r as v,g as j,i as y,O as k}from"./index-ZTHASguQ.js";import{c as g,a as h,B as w}from"./button-By_1dzVx.js";import{a as i}from"./utils-DzJYey0s.js";import{T as N,A as S}from"./agentProvider-C6dGIy-H.js";import{S as z}from"./sidebar-bgEk7Xg8.js";const I=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],A=g("arrow-up",I);const G=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],C=g("square",G);function V({className:a,...e}){return t.jsx("label",{"data-slot":"input-group",role:"group",className:i("group/input-group border-input dark:bg-input/30 relative flex w-full items-center rounded-2xl border shadow-xs transition-[color,box-shadow] outline-none bg-card","h-9 min-w-0 has-[>textarea]:h-auto","has-[>[data-align=inline-start]]:[&>input]:pl-2","has-[>[data-align=inline-end]]:[&>input]:pr-2","has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3","has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3","has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot=input-group-control]:focus-visible]:ring-[3px]","has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40",a),...e})}const q=h("text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium select-none [&>svg:not([class*='size-'])]:size-4 [&>kbd]:rounded-[calc(var(--radius)-5px)] group-data-[disabled=true]/input-group:opacity-50",{variants:{align:{"inline-start":"order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]","inline-end":"order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]","block-start":"order-first w-full justify-start px-3 pt-3 [.border-b]:pb-3 group-has-[>input]/input-group:pt-2.5","block-end":"order-last w-full justify-start px-3 pb-3 [.border-t]:pt-3 group-has-[>input]/input-group:pb-2.5"}},defaultVariants:{align:"inline-start"}});function M({className:a,align:e="inline-start",...n}){return t.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":e,className:i(q({align:e}),a),onClick:r=>{r.target.closest("button")||r.currentTarget.parentElement?.querySelector("input")?.focus()},...n})}const P=h("text-sm shadow-none flex gap-2 items-center",{variants:{size:{xs:"h-6 gap-1 px-2 rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-3.5 has-[>svg]:px-2",sm:"h-8 px-2.5 gap-1.5 rounded-md has-[>svg]:px-2.5","icon-xs":"size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}});function c({className:a,type:e="button",variant:n="ghost",size:r="xs",...u}){return t.jsx(w,{type:e,"data-size":r,variant:n,className:i(P({size:r}),a),...u})}function R({className:a,...e}){return t.jsx(N,{"data-slot":"input-group-control",className:i("flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent placeholder:text-muted-foreground",a),...e})}function T({onSubmit:a,onStop:e,isLoading:n,disabled:r=!1}){const u=m({strict:!1,select:s=>s.chatId}),l=f(b.getModelProvider.queryOptions()),[o,d]=v.useState(""),p=s=>{s.preventDefault(),!(!o.trim()||n)&&(a(o),d(""))},x=s=>{s.key==="Enter"&&!s.shiftKey&&(s.preventDefault(),p(s))};return t.jsx("div",{className:"p-4 pt-0 backdrop-blur-sm dark:bg-slate-900/50",children:t.jsx("form",{onSubmit:p,className:"mx-auto max-w-3xl",children:t.jsxs(V,{htmlFor:"chat-input",children:[t.jsx(R,{autoFocus:!0,placeholder:"Ask anything about your data...",value:o,onChange:s=>d(s.target.value),onKeyDown:x,id:"chat-input"},u),t.jsxs(M,{align:"block-end",children:[l.data&&t.jsx("div",{className:"text-sm font-normal text-muted-foreground",children:l.data==="anthropic"?"Opus 4.5":"GPT-5.1"}),n?t.jsxs(c,{type:"button",variant:"destructive",className:"rounded-full ml-auto",size:"icon-xs",onClick:e,children:[t.jsx(C,{}),t.jsx("span",{className:"sr-only",children:"Stop"})]}):t.jsxs(c,{type:"submit",variant:"default",className:"rounded-full ml-auto",size:"icon-xs",disabled:r||!o,children:[t.jsx(A,{}),t.jsx("span",{className:"sr-only",children:"Send"})]})]})]})})})}function B(){const a=j();y({agent:a});const e=n=>{a.isRunning||a.sendMessage({text:n})};return t.jsx(S,{agent:a,children:t.jsxs("div",{className:"flex flex-1 flex-col bg-slate-100 min-w-0 overflow-hidden",children:[t.jsx(k,{}),t.jsx(T,{onSubmit:e,onStop:a.stopAgent,isLoading:a.isRunning,disabled:!a.isReadyForNewMessages})]})})}function K(){return t.jsxs(t.Fragment,{children:[t.jsx(z,{}),t.jsx(B,{})]})}export{K as component};
|
nao_core/bin/public/assets/{_chat-layout.index-CWlZ1WSD.js → _chat-layout.index-DOARokp1.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{c as a,j as e}from"./index-ZTHASguQ.js";import{c as n}from"./utils-DzJYey0s.js";function c(){const{data:s}=a(),t=s?.user?.name;return e.jsxs("div",{className:"flex flex-col items-center justify-end pb-8 mt-[20vh]",children:[e.jsx("div",{className:"relative w-full h-[200px] flex items-center justify-center px-6",children:e.jsx("img",{src:"/nao-logo-greyscale.svg",alt:"",className:"w-[200px] h-auto select-none opacity-[0.05]","aria-hidden":"true"})}),e.jsxs("h1",{className:"text-3xl md:text-4xl font-light tracking-tight text-slate-700 text-center px-6",children:[t?n(t):"",", what do you want to analyse?"]})]})}export{c as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as r,r as o,d as a}from"./index-ZTHASguQ.js";import{a as i}from"./utils-DzJYey0s.js";function u({className:e,...t}){return r.jsx("textarea",{"data-slot":"textarea",className:i("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...t})}const n=o.createContext(null),l=()=>{const e=o.useContext(n);if(!e)throw new Error("useChatContext must be used within a ChatContextProvider");return e},x=({agent:e,children:t})=>r.jsx(n.Provider,{value:a(e),children:t});export{x as A,u as T,l as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as a,R,j as g}from"./index-ZTHASguQ.js";import{b as A,a as S}from"./utils-DzJYey0s.js";const V=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),N=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,i)=>i?i.toUpperCase():n.toLowerCase()),b=e=>{const t=N(e);return t.charAt(0).toUpperCase()+t.slice(1)},k=(...e)=>e.filter((t,n,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===n).join(" ").trim(),P=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var $={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const L=a.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:i,className:r="",children:o,iconNode:u,...l},d)=>a.createElement("svg",{ref:d,...$,width:t,height:t,stroke:e,strokeWidth:i?Number(n)*24/Number(t):n,className:k("lucide",r),...!o&&!P(l)&&{"aria-hidden":"true"},...l},[...u.map(([s,c])=>a.createElement(s,c)),...Array.isArray(o)?o:[o]]));const q=(e,t)=>{const n=a.forwardRef(({className:i,...r},o)=>a.createElement(L,{ref:o,iconNode:t,className:k(`lucide-${V(b(e))}`,`lucide-${e}`,i),...r}));return n.displayName=b(e),n},h=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,C=A,O=(e,t)=>n=>{var i;if(t?.variants==null)return C(e,n?.class,n?.className);const{variants:r,defaultVariants:o}=t,u=Object.keys(r).map(s=>{const c=n?.[s],f=o?.[s];if(c===null)return null;const p=h(c)||h(f);return r[s][p]}),l=n&&Object.entries(n).reduce((s,c)=>{let[f,p]=c;return p===void 0||(s[f]=p),s},{}),d=t==null||(i=t.compoundVariants)===null||i===void 0?void 0:i.reduce((s,c)=>{let{class:f,className:p,..._}=c;return Object.entries(_).every(j=>{let[y,m]=j;return Array.isArray(m)?m.includes({...o,...l}[y]):{...o,...l}[y]===m})?[...s,f,p]:s},[]);return C(e,u,d,n?.class,n?.className)};function x(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function w(...e){return t=>{let n=!1;const i=e.map(r=>{const o=x(r,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let r=0;r<i.length;r++){const o=i[r];typeof o=="function"?o():x(e[r],null)}}}}function G(...e){return a.useCallback(w(...e),e)}var z=Symbol.for("react.lazy"),v=R[" use ".trim().toString()];function W(e){return typeof e=="object"&&e!==null&&"then"in e}function E(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===z&&"_payload"in e&&W(e._payload)}function I(e){const t=T(e),n=a.forwardRef((i,r)=>{let{children:o,...u}=i;E(o)&&typeof v=="function"&&(o=v(o._payload));const l=a.Children.toArray(o),d=l.find(D);if(d){const s=d.props.children,c=l.map(f=>f===d?a.Children.count(s)>1?a.Children.only(null):a.isValidElement(s)?s.props.children:null:f);return g.jsx(t,{...u,ref:r,children:a.isValidElement(s)?a.cloneElement(s,void 0,c):null})}return g.jsx(t,{...u,ref:r,children:o})});return n.displayName=`${e}.Slot`,n}var B=I("Slot");function T(e){const t=a.forwardRef((n,i)=>{let{children:r,...o}=n;if(E(r)&&typeof v=="function"&&(r=v(r._payload)),a.isValidElement(r)){const u=F(r),l=U(o,r.props);return r.type!==a.Fragment&&(l.ref=i?w(i,u):u),a.cloneElement(r,l)}return a.Children.count(r)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Z=Symbol("radix.slottable");function D(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Z}function U(e,t){const n={...t};for(const i in t){const r=e[i],o=t[i];/^on[A-Z]/.test(i)?r&&o?n[i]=(...l)=>{const d=o(...l);return r(...l),d}:r&&(n[i]=r):i==="style"?n[i]={...r,...o}:i==="className"&&(n[i]=[r,o].filter(Boolean).join(" "))}return{...e,...n}}function F(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const H=O("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive cursor-pointer disabled:cursor-default",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function J({className:e,variant:t="default",size:n="default",asChild:i=!1,...r}){const o=i?B:"button";return g.jsx(o,{"data-slot":"button","data-variant":t,"data-size":n,className:S(H({variant:t,size:n,className:e})),...r})}export{J as B,O as a,w as b,q as c,G as u};
|