@lunora/svelte 1.0.0-alpha.269 → 1.0.0-alpha.270
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/dist/index.mjs +1 -1
- package/dist/packem_shared/{agentState-DQC-OIi6.mjs → agentState-BCWHx7mX.mjs} +1 -1
- package/dist/packem_shared/{agentToolEvents-BD98xaGH.mjs → agentToolEvents-CnL44w5Y.mjs} +1 -1
- package/dist/packem_shared/subscription-BQC3Asdx.mjs +1 -0
- package/package.json +3 -3
- package/dist/packem_shared/subscription-BKRHURpA.mjs +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{action as t}from"./packem_shared/action-SjeZUGhX.mjs";import{agent as m}from"./packem_shared/agent-WMVWf1Ks.mjs";import{agentChat as a}from"./packem_shared/agentChat-CX6dTMoY.mjs";import{agentState as n}from"./packem_shared/agentState-
|
|
1
|
+
import{action as t}from"./packem_shared/action-SjeZUGhX.mjs";import{agent as m}from"./packem_shared/agent-WMVWf1Ks.mjs";import{agentChat as a}from"./packem_shared/agentChat-CX6dTMoY.mjs";import{agentState as n}from"./packem_shared/agentState-BCWHx7mX.mjs";import{agentToolEvents as i}from"./packem_shared/agentToolEvents-CnL44w5Y.mjs";import{auth as g,authGate as s}from"./packem_shared/auth-Z0G_aZYz.mjs";import{connectionStatus as l}from"./packem_shared/connectionStatus-DMx3BE5Q.mjs";import{getLunoraClient as h,setLunoraClient as y}from"./packem_shared/getLunoraClient-DU7BmZy1.mjs";import{flag as C,flags as L}from"./packem_shared/flag-Csh9LBiO.mjs";import{hydratePreloaded as S}from"./packem_shared/hydratePreloaded-CNm2-Rha.mjs";import{liveTopic as b}from"./packem_shared/liveTopic-DKHSwXiX.mjs";import{mutation as A}from"./packem_shared/mutation-DLBr5Op1.mjs";import{mutator as G}from"./packem_shared/mutator-DECDuo94.mjs";import{infiniteQuery as j,paginatedQuery as k}from"./packem_shared/infiniteQuery-B6dobUkL.mjs";import{presence as z}from"./packem_shared/presence-C4ZgfGfr.mjs";import{query as D}from"./packem_shared/query-C6B__ZRN.mjs";import{rateLimit as H}from"./packem_shared/rateLimit-Cli38qWO.mjs";import{stream as J}from"./packem_shared/stream-Cxl8guzh.mjs";import{subscription as M}from"./packem_shared/subscription-BQC3Asdx.mjs";import{voiceAgent as O}from"./packem_shared/voiceAgent-KSChAXsW.mjs";export{t as action,m as agent,a as agentChat,n as agentState,i as agentToolEvents,g as auth,s as authGate,l as connectionStatus,C as flag,L as flags,h as getLunoraClient,S as hydratePreloaded,j as infiniteQuery,b as liveTopic,A as mutation,G as mutator,k as paginatedQuery,z as presence,D as query,H as rateLimit,y as setLunoraClient,J as stream,M as subscription,O as voiceAgent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{derived as c}from"svelte/store";import{isClient as p}from"./agent-WMVWf1Ks.mjs";import{getLunoraClient as f}from"./getLunoraClient-DU7BmZy1.mjs";import{subscription as d}from"./subscription-
|
|
1
|
+
import{derived as c}from"svelte/store";import{isClient as p}from"./agent-WMVWf1Ks.mjs";import{getLunoraClient as f}from"./getLunoraClient-DU7BmZy1.mjs";import{subscription as d}from"./subscription-BQC3Asdx.mjs";function h(t,r){const o=p(t),n=o?t:f(),e=o?r:t,{data:i,error:a}=d(n,e.api.agents.agentState,{key:e.threadKey}),s=c(i,m=>m);return{error:a,state:s}}export{h as agentState};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{derived as y}from"svelte/store";import{isClient as m}from"./agent-WMVWf1Ks.mjs";import{getLunoraClient as I}from"./getLunoraClient-DU7BmZy1.mjs";import{stream as N}from"./stream-Cxl8guzh.mjs";import{subscription as h}from"./subscription-
|
|
1
|
+
import{derived as y}from"svelte/store";import{isClient as m}from"./agent-WMVWf1Ks.mjs";import{getLunoraClient as I}from"./getLunoraClient-DU7BmZy1.mjs";import{stream as N}from"./stream-Cxl8guzh.mjs";import{subscription as h}from"./subscription-BQC3Asdx.mjs";const k={__lunoraRef:""},q=t=>{if(t.role==="assistant"&&t.toolCalls)return t.toolCalls.map(l=>({input:l.input,seq:t.seq,toolCallId:l.id,toolName:l.name,type:"call"}));if(t.role==="tool")return t.status==="awaiting_approval"?[{seq:t.seq,type:"awaiting-approval",...t.toolCallId===void 0?{}:{toolCallId:t.toolCallId},...t.toolName===void 0?{}:{toolName:t.toolName}}]:[{output:t.content,seq:t.seq,type:"result",...t.status==="approved"||t.status==="rejected"?{status:t.status}:{},...t.toolCallId===void 0?{}:{toolCallId:t.toolCallId},...t.toolName===void 0?{}:{toolName:t.toolName}}]};function K(t,l){const n=m(t),a=n?t:I(),u=n?l:t,{api:p,limit:e,stream:i,threadKey:r}=u,s=e===void 0?{key:r}:{key:r,limit:e},{data:c}=h(a,p.agents.agentMessages,s),v=N(a,i??k,i===void 0?"skip":{key:r});return{events:y([c,v.chunks],([f,C])=>{const d=(f??[]).flatMap(o=>q(o)??[]);for(const o of C)o.kind==="progress"&&o.threadKey===r&&d.push({data:o.data,toolCallId:o.toolCallId,type:"progress"});return d})}}export{K as agentToolEvents};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createQuerySubscription as g}from"@lunora/client/query";import{LunoraError as h}from"@lunora/errors";import{writable as y,readable as l}from"svelte/store";import{i as R}from"./is-browser-BEdfLJHK.mjs";import{getLunoraClient as x}from"./getLunoraClient-DU7BmZy1.mjs";import{i as C}from"./is-function-reference-abFdrAae.mjs";import{s as L}from"./subscribe-reactive-args-D0fSbP1k.mjs";function z(t,n,i,c){const r=!C(t),m=r?t:x(),d=r?n:t,f=r?i:n,p=(r?c:i)??{},{shardKey:v,onError:u}=p,e=y();return{data:l(void 0,s=>{if(!R())return()=>{};const w=L(f,b=>(s(void 0),e.set(void 0),g(m,d,b,{onData:o=>{s(o),e.set(void 0)},onError:o=>{const a=Object.assign(o.code===void 0?new Error(o.message):new h(o.code,o.message),o.why===void 0?{}:{why:o.why});e.set(a),u?.(a)},onReset:()=>{s(void 0)}},{shardKey:v})));return()=>{w(),e.set(void 0)}}),error:{subscribe:e.subscribe}}}export{z as subscription};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lunora/svelte",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.270",
|
|
4
4
|
"description": "Svelte adapter for Lunora — live stores, optimistic mutations, and reactive loaders",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudflare",
|
|
@@ -54,9 +54,9 @@
|
|
|
54
54
|
"access": "public"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@lunora/client": "1.0.0-alpha.
|
|
57
|
+
"@lunora/client": "1.0.0-alpha.231",
|
|
58
58
|
"@lunora/errors": ">=1.0.0-alpha.51 <2.0.0-0",
|
|
59
|
-
"@lunora/ratelimit": "1.0.0-alpha.
|
|
59
|
+
"@lunora/ratelimit": "1.0.0-alpha.154",
|
|
60
60
|
"@lunora/wire": "1.0.0-alpha.1",
|
|
61
61
|
"@visulima/storage-client": "1.0.9"
|
|
62
62
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createQuerySubscription as l}from"@lunora/client/query";import{LunoraError as w}from"@lunora/errors";import{writable as R,readable as h}from"svelte/store";import{i as x}from"./is-browser-BEdfLJHK.mjs";import{getLunoraClient as y}from"./getLunoraClient-DU7BmZy1.mjs";import{i as C}from"./is-function-reference-abFdrAae.mjs";import{s as E}from"./subscribe-reactive-args-D0fSbP1k.mjs";function q(t,n,i,c){const e=!C(t),m=e?t:y(),d=e?n:t,f=e?i:n,p=(e?c:i)??{},{shardKey:u,onError:v}=p,r=R();return{data:h(void 0,s=>{if(!x())return()=>{};const b=E(f,g=>(s(void 0),r.set(void 0),l(m,d,g,{onData:o=>{s(o),r.set(void 0)},onError:o=>{const a=o.code===void 0?new Error(o.message):new w(o.code,o.message);r.set(a),v?.(a)},onReset:()=>{s(void 0)}},{shardKey:u})));return()=>{b(),r.set(void 0)}}),error:{subscribe:r.subscribe}}}export{q as subscription};
|