@crewx/sdk 0.9.0-rc.29 → 0.9.0-rc.30

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.
@@ -311,7 +311,7 @@ ${n.join(`
311
311
  message_count = message_count + 1,
312
312
  updated_at = ${o}
313
313
  WHERE id = ${t}
314
- `),l},{behavior:"immediate"})}}catch(o){throw o instanceof _?o:new _("DB_ERROR","Failed to save user message",o)}finally{r.close();}}saveAssistantMessage(t,e,n){if(!this.dbExists())return;let r=this.openHandle(true);try{let o=new Date().toISOString();r.db.update(p).set({last_message:e,updated_at:o}).where(drizzleOrm.eq(p.id,t)).run();}catch(o){throw o instanceof _?o:new _("DB_ERROR","Failed to save assistant message",o)}finally{r.close();}}updateThread(t,e){if(!this.dbExists())return;let n=this.openHandle(true);try{let r={updated_at:new Date().toISOString()};e.title!==void 0&&(r.title=e.title,r.title_locked=1),e.titleLocked!==void 0&&(r.title_locked=e.titleLocked?1:0),n.db.update(p).set(r).where(drizzleOrm.eq(p.id,t)).run();}catch(r){throw r instanceof _?r:new _("DB_ERROR","Failed to update thread",r)}finally{n.close();}}togglePin(t,e){let n=this.openHandle(true);try{let r=e?drizzleOrm.and(drizzleOrm.eq(p.id,t),drizzleOrm.eq(p.workspace_id,e)):drizzleOrm.eq(p.id,t),o=n.db.select({pinned:p.pinned,metadata:p.metadata}).from(p).where(r).get();if(!o)return null;let i=o.pinned?0:1,a=o.metadata?JSON.parse(o.metadata):{};if(i){let c=e?drizzleOrm.and(drizzleOrm.eq(p.pinned,1),drizzleOrm.eq(p.workspace_id,e)):drizzleOrm.eq(p.pinned,1),l=n.db.select({metadata:p.metadata}).from(p).where(c).all(),u=0;for(let h of l){let m=h.metadata?JSON.parse(h.metadata):{};typeof m.pinOrder=="number"&&m.pinOrder>u&&(u=m.pinOrder);}a.pinOrder=u+1;}else delete a.pinOrder;return n.db.update(p).set({pinned:i,metadata:Object.keys(a).length>0?JSON.stringify(a):null}).where(r).run(),{pinned:!!i}}catch(r){throw r instanceof _?r:new _("DB_ERROR","Failed to toggle pin",r)}finally{n.close();}}reorderPins(t,e){let n=this.openHandle(true);try{for(let r=0;r<t.length;r++){let o=e?drizzleOrm.and(drizzleOrm.eq(p.id,t[r]),drizzleOrm.eq(p.workspace_id,e)):drizzleOrm.eq(p.id,t[r]),i=n.db.select({metadata:p.metadata}).from(p).where(o).get();if(!i)continue;let a=i.metadata?JSON.parse(i.metadata):{};a.pinOrder=r+1,n.db.update(p).set({metadata:JSON.stringify(a)}).where(o).run();}}catch(r){throw r instanceof _?r:new _("DB_ERROR","Failed to reorder pins",r)}finally{n.close();}}toggleStar(t,e){let n=this.openHandle(true);try{let r=e?drizzleOrm.and(drizzleOrm.eq(p.id,t),drizzleOrm.eq(p.workspace_id,e)):drizzleOrm.eq(p.id,t),o=n.db.select({starred:p.starred}).from(p).where(r).get();if(!o)return null;let i=o.starred?0:1;return n.db.update(p).set({starred:i}).where(r).run(),{starred:!!i}}catch(r){throw r instanceof _?r:new _("DB_ERROR","Failed to toggle star",r)}finally{n.close();}}resolveOverdriveForRequest(t,e,n,r){let i=this.openHandle(true);try{let a=e?drizzleOrm.and(drizzleOrm.eq(p.id,t),drizzleOrm.eq(p.workspace_id,e)):drizzleOrm.eq(p.id,t);return i.db.transaction(l=>{let u=l.select({metadata:p.metadata}).from(p).where(a).get();if(!u)return null;let h=u.metadata?JSON.parse(u.metadata):{},m=h.overdrive??{},T=r?.defaultTurns??m.defaultTurns??3,x=r?.updatedBy??"ui",A=new Date().toISOString(),v,L,I,V;switch(n){case "enable-count":{let Q=r?.turns??T,Z=r?.consumeCurrent?Math.max(Q-1,0):Q;v=Z>0?"count":"off",L=Z,I=!0,V="count";break}case "enable-latch":{v="latch",L=0,I=!0,V="latch";break}case "disable":{v="off",L=0,I=!1;break}default:{let Q=m.state??"off",Z=typeof m.remaining=="number"?m.remaining:0;if(Q==="count"&&Z>0){let bt=Z-1;bt<=0?(v="off",L=0):(v="count",L=bt),I=!0,V="count";}else Q==="latch"?(v="latch",L=0,I=!0,V="latch"):(v="off",L=0,I=!1);break}}return h.overdrive={state:v,remaining:L,defaultTurns:T,updatedAt:A,updatedBy:x},l.update(p).set({metadata:JSON.stringify(h),updated_at:A}).where(a).run(),{applied:I,appliedMode:V,state:v,remaining:L}},{behavior:"immediate"})}catch(a){throw a instanceof _?a:new _("DB_ERROR","Failed to resolve overdrive",a)}finally{i.close();}}};function Pe(d){return d.replace(/<conversation_history[^>]*>[\s\S]*?<\/conversation_history>/g,"").split(`
314
+ `),l},{behavior:"immediate"})}}catch(o){throw o instanceof _?o:new _("DB_ERROR","Failed to save user message",o)}finally{r.close();}}saveAssistantMessage(t,e,n){if(!this.dbExists())return;let r=this.openHandle(true);try{let o=new Date().toISOString();r.db.update(p).set({last_message:e,updated_at:o}).where(drizzleOrm.eq(p.id,t)).run();}catch(o){throw o instanceof _?o:new _("DB_ERROR","Failed to save assistant message",o)}finally{r.close();}}updateThread(t,e){if(!this.dbExists())return;let n=this.openHandle(true);try{let r={updated_at:new Date().toISOString()};e.title!==void 0&&(r.title=e.title,r.title_locked=1),e.titleLocked!==void 0&&(r.title_locked=e.titleLocked?1:0),n.db.update(p).set(r).where(drizzleOrm.eq(p.id,t)).run();}catch(r){throw r instanceof _?r:new _("DB_ERROR","Failed to update thread",r)}finally{n.close();}}togglePin(t,e){let n=this.openHandle(true);try{let r=e?drizzleOrm.and(drizzleOrm.eq(p.id,t),drizzleOrm.eq(p.workspace_id,e)):drizzleOrm.eq(p.id,t),o=n.db.select({pinned:p.pinned,metadata:p.metadata}).from(p).where(r).get();if(!o)return null;let i=o.pinned?0:1,a=o.metadata?JSON.parse(o.metadata):{};if(i){let c=e?drizzleOrm.and(drizzleOrm.eq(p.pinned,1),drizzleOrm.eq(p.workspace_id,e)):drizzleOrm.eq(p.pinned,1),l=n.db.select({metadata:p.metadata}).from(p).where(c).all(),u=null;for(let h of l){let m=h.metadata?JSON.parse(h.metadata):{};typeof m.pinOrder=="number"&&(u===null||m.pinOrder<u)&&(u=m.pinOrder);}a.pinOrder=u===null?0:u-1;}else delete a.pinOrder;return n.db.update(p).set({pinned:i,metadata:Object.keys(a).length>0?JSON.stringify(a):null}).where(r).run(),{pinned:!!i}}catch(r){throw r instanceof _?r:new _("DB_ERROR","Failed to toggle pin",r)}finally{n.close();}}reorderPins(t,e){let n=this.openHandle(true);try{for(let r=0;r<t.length;r++){let o=e?drizzleOrm.and(drizzleOrm.eq(p.id,t[r]),drizzleOrm.eq(p.workspace_id,e)):drizzleOrm.eq(p.id,t[r]),i=n.db.select({metadata:p.metadata}).from(p).where(o).get();if(!i)continue;let a=i.metadata?JSON.parse(i.metadata):{};a.pinOrder=r+1,n.db.update(p).set({metadata:JSON.stringify(a)}).where(o).run();}}catch(r){throw r instanceof _?r:new _("DB_ERROR","Failed to reorder pins",r)}finally{n.close();}}toggleStar(t,e){let n=this.openHandle(true);try{let r=e?drizzleOrm.and(drizzleOrm.eq(p.id,t),drizzleOrm.eq(p.workspace_id,e)):drizzleOrm.eq(p.id,t),o=n.db.select({starred:p.starred}).from(p).where(r).get();if(!o)return null;let i=o.starred?0:1;return n.db.update(p).set({starred:i}).where(r).run(),{starred:!!i}}catch(r){throw r instanceof _?r:new _("DB_ERROR","Failed to toggle star",r)}finally{n.close();}}resolveOverdriveForRequest(t,e,n,r){let i=this.openHandle(true);try{let a=e?drizzleOrm.and(drizzleOrm.eq(p.id,t),drizzleOrm.eq(p.workspace_id,e)):drizzleOrm.eq(p.id,t);return i.db.transaction(l=>{let u=l.select({metadata:p.metadata}).from(p).where(a).get();if(!u)return null;let h=u.metadata?JSON.parse(u.metadata):{},m=h.overdrive??{},T=r?.defaultTurns??m.defaultTurns??3,x=r?.updatedBy??"ui",A=new Date().toISOString(),v,L,I,V;switch(n){case "enable-count":{let Q=r?.turns??T,Z=r?.consumeCurrent?Math.max(Q-1,0):Q;v=Z>0?"count":"off",L=Z,I=!0,V="count";break}case "enable-latch":{v="latch",L=0,I=!0,V="latch";break}case "disable":{v="off",L=0,I=!1;break}default:{let Q=m.state??"off",Z=typeof m.remaining=="number"?m.remaining:0;if(Q==="count"&&Z>0){let bt=Z-1;bt<=0?(v="off",L=0):(v="count",L=bt),I=!0,V="count";}else Q==="latch"?(v="latch",L=0,I=!0,V="latch"):(v="off",L=0,I=!1);break}}return h.overdrive={state:v,remaining:L,defaultTurns:T,updatedAt:A,updatedBy:x},l.update(p).set({metadata:JSON.stringify(h),updated_at:A}).where(a).run(),{applied:I,appliedMode:V,state:v,remaining:L}},{behavior:"immediate"})}catch(a){throw a instanceof _?a:new _("DB_ERROR","Failed to resolve overdrive",a)}finally{i.close();}}};function Pe(d){return d.replace(/<conversation_history[^>]*>[\s\S]*?<\/conversation_history>/g,"").split(`
315
315
  `).filter(r=>!(r.startsWith("Loaded ")&&r.includes("layouts from")||r.includes("[dotenv@")||r.includes("[Nest]")&&r.includes("DEBUG")||r.startsWith("Registered custom layout:")||r.startsWith("Updated custom layout:"))).join(`
316
316
  `).trim()}function Me(d){if(!d)return "";let t=d;try{let e=JSON.parse(t);Array.isArray(e)?t=e.filter(n=>n?.type==="text"&&n?.text).map(n=>n.text).join(`
317
317
  `):e&&typeof e=="object"&&e.result!==void 0&&(t=e.result||"");}catch{t=Pe(t);}return t}var pt=class{dbPath;constructor(t){this.dbPath=t??P.join(Yt.homedir(),".crewx","crewx.db");}getThreadRepo(){return new ut({dbPath:this.dbPath})}updateThread(t,e){this.getThreadRepo().updateThread(t,{title:e.title});}async ensureThread(t,e,n){let r=this.getThreadRepo(),o=r.findThreadById(t);if(o){if(o.platform!==e)throw new Error(`Thread '${t}' already exists with platform '${o.platform}' \u2014 cannot change to '${e}' (platform is immutable)`);return {created:false}}return r.ensureThread(t,e,n),{created:true}}async fetchHistory(t,e){let n=e?.limit??100,r=this.getThreadRepo(),o=r.findThreadById(t),i=r.findTopLevelTasks(t,void 0,n),a=new Set(["queued","cancelled"]);i=i.filter(u=>(!u.status||!a.has(u.status))&&(!e?.currentTraceId||u.trace_id!==e.currentTraceId));let c=o?.platform??"cli",l=this.rowsToMessages(i);return {threadId:t,platform:c,messages:l,metadata:{title:o?.title??void 0,firstMessage:o?.first_message??void 0,lastMessage:o?.last_message??void 0,messageCount:o?.message_count??0,updatedAt:o?.updated_at?new Date(o.updated_at).getTime():void 0}}}async saveUserMessage(t,e,n,r){let{firstMessage:o}=this.getThreadRepo().saveUserMessage(t,e);return {id:t,firstMessage:o}}async saveAssistantMessage(t,e,n,r){return this.getThreadRepo().saveAssistantMessage(t,e),{id:t}}close(){}normalizeStatus(t){if(t&&!["success","completed","done"].includes(t)){if(["failed","error"].includes(t))return "failed";if(t==="running")return "running"}}rowsToMessages(t){let e=[];for(let n of t){n.prompt&&e.push({id:`${n.id}-user`,text:n.prompt,isAssistant:false,timestamp:new Date(n.started_at).getTime(),metadata:{caller_agent_id:n.caller_agent_id}});let r=Me(n.result),o=this.normalizeStatus(n.status);if(r||o==="running"||o==="failed"){let i={agent_id:n.agent_id,task_id:n.id};o&&(i.status=o),o==="failed"&&n.error&&(i.reason=n.error.split(`
@@ -306,4 +306,4 @@ ${n.join(`
306
306
  message_count = message_count + 1,
307
307
  updated_at = ${o}
308
308
  WHERE id = ${t}
309
- `),c},{behavior:"immediate"})}}catch(o){throw o instanceof d?o:new d("DB_ERROR","Failed to save user message",o)}finally{r.close();}}saveAssistantMessage(t,e,n){if(!this.dbExists())return;let r=this.openHandle(true);try{let o=new Date().toISOString();r.db.update(_).set({last_message:e,updated_at:o}).where(drizzleOrm.eq(_.id,t)).run();}catch(o){throw o instanceof d?o:new d("DB_ERROR","Failed to save assistant message",o)}finally{r.close();}}updateThread(t,e){if(!this.dbExists())return;let n=this.openHandle(true);try{let r={updated_at:new Date().toISOString()};e.title!==void 0&&(r.title=e.title,r.title_locked=1),e.titleLocked!==void 0&&(r.title_locked=e.titleLocked?1:0),n.db.update(_).set(r).where(drizzleOrm.eq(_.id,t)).run();}catch(r){throw r instanceof d?r:new d("DB_ERROR","Failed to update thread",r)}finally{n.close();}}togglePin(t,e){let n=this.openHandle(true);try{let r=e?drizzleOrm.and(drizzleOrm.eq(_.id,t),drizzleOrm.eq(_.workspace_id,e)):drizzleOrm.eq(_.id,t),o=n.db.select({pinned:_.pinned,metadata:_.metadata}).from(_).where(r).get();if(!o)return null;let i=o.pinned?0:1,l=o.metadata?JSON.parse(o.metadata):{};if(i){let u=e?drizzleOrm.and(drizzleOrm.eq(_.pinned,1),drizzleOrm.eq(_.workspace_id,e)):drizzleOrm.eq(_.pinned,1),c=n.db.select({metadata:_.metadata}).from(_).where(u).all(),p=0;for(let h of c){let f=h.metadata?JSON.parse(h.metadata):{};typeof f.pinOrder=="number"&&f.pinOrder>p&&(p=f.pinOrder);}l.pinOrder=p+1;}else delete l.pinOrder;return n.db.update(_).set({pinned:i,metadata:Object.keys(l).length>0?JSON.stringify(l):null}).where(r).run(),{pinned:!!i}}catch(r){throw r instanceof d?r:new d("DB_ERROR","Failed to toggle pin",r)}finally{n.close();}}reorderPins(t,e){let n=this.openHandle(true);try{for(let r=0;r<t.length;r++){let o=e?drizzleOrm.and(drizzleOrm.eq(_.id,t[r]),drizzleOrm.eq(_.workspace_id,e)):drizzleOrm.eq(_.id,t[r]),i=n.db.select({metadata:_.metadata}).from(_).where(o).get();if(!i)continue;let l=i.metadata?JSON.parse(i.metadata):{};l.pinOrder=r+1,n.db.update(_).set({metadata:JSON.stringify(l)}).where(o).run();}}catch(r){throw r instanceof d?r:new d("DB_ERROR","Failed to reorder pins",r)}finally{n.close();}}toggleStar(t,e){let n=this.openHandle(true);try{let r=e?drizzleOrm.and(drizzleOrm.eq(_.id,t),drizzleOrm.eq(_.workspace_id,e)):drizzleOrm.eq(_.id,t),o=n.db.select({starred:_.starred}).from(_).where(r).get();if(!o)return null;let i=o.starred?0:1;return n.db.update(_).set({starred:i}).where(r).run(),{starred:!!i}}catch(r){throw r instanceof d?r:new d("DB_ERROR","Failed to toggle star",r)}finally{n.close();}}resolveOverdriveForRequest(t,e,n,r){let i=this.openHandle(true);try{let l=e?drizzleOrm.and(drizzleOrm.eq(_.id,t),drizzleOrm.eq(_.workspace_id,e)):drizzleOrm.eq(_.id,t);return i.db.transaction(c=>{let p=c.select({metadata:_.metadata}).from(_).where(l).get();if(!p)return null;let h=p.metadata?JSON.parse(p.metadata):{},f=h.overdrive??{},R=r?.defaultTurns??f.defaultTurns??3,N=r?.updatedBy??"ui",C=new Date().toISOString(),L,y,z,ot;switch(n){case "enable-count":{let it=r?.turns??R,at=r?.consumeCurrent?Math.max(it-1,0):it;L=at>0?"count":"off",y=at,z=!0,ot="count";break}case "enable-latch":{L="latch",y=0,z=!0,ot="latch";break}case "disable":{L="off",y=0,z=!1;break}default:{let it=f.state??"off",at=typeof f.remaining=="number"?f.remaining:0;if(it==="count"&&at>0){let Ht=at-1;Ht<=0?(L="off",y=0):(L="count",y=Ht),z=!0,ot="count";}else it==="latch"?(L="latch",y=0,z=!0,ot="latch"):(L="off",y=0,z=!1);break}}return h.overdrive={state:L,remaining:y,defaultTurns:R,updatedAt:C,updatedBy:N},c.update(_).set({metadata:JSON.stringify(h),updated_at:C}).where(l).run(),{applied:z,appliedMode:ot,state:L,remaining:y}},{behavior:"immediate"})}catch(l){throw l instanceof d?l:new d("DB_ERROR","Failed to resolve overdrive",l)}finally{i.close();}}};var Pt=class extends S{dbPath;constructor(t={}){super(),t.dbPath?this.dbPath=t.dbPath:t.dbRoot&&(this.dbPath=j.join(t.dbRoot,".crewx","crewx.db"));}resolveDbPath(){return this.dbPath?this.dbPath:super.resolveDbPath()}openHandle(t){let e=this.resolveDbPath();if(t){let r=j.dirname(e);Vt.existsSync(r)||Vt.mkdirSync(r,{recursive:true});}else if(!Vt.existsSync(e))throw new d("NOT_FOUND","Database not found");let n=k(e);if(t)try{A(n.db,e);}catch(r){throw n.close(),r}return n}insertSpan(t){let e=this.openHandle(true);try{e.db.insert(K).values(t).run();}catch(n){throw n instanceof d?n:new d("DB_ERROR","Failed to insert span",n)}finally{e.close();}}findByTaskId(t){if(!this.dbExists())return [];let e=this.openHandle(false);try{return e.db.select().from(K).where(drizzleOrm.eq(K.task_id,t)).all()}catch(n){throw new d("DB_ERROR","Failed to find spans by task id",n)}finally{e.close();}}findById(t){if(!this.dbExists())return;let e=this.openHandle(false);try{return e.db.select().from(K).where(drizzleOrm.eq(K.id,t)).limit(1).get()??void 0}catch(n){throw new d("DB_ERROR","Failed to find span by id",n)}finally{e.close();}}};var $t=class extends S{dbPath;constructor(t={}){super(),t.dbPath?this.dbPath=t.dbPath:t.dbRoot&&(this.dbPath=j.join(t.dbRoot,".crewx","crewx.db"));}resolveDbPath(){return this.dbPath?this.dbPath:super.resolveDbPath()}openHandle(t){let e=this.resolveDbPath();if(t){let r=j.dirname(e);Vt.existsSync(r)||Vt.mkdirSync(r,{recursive:true});}else if(!Vt.existsSync(e))throw new d("NOT_FOUND","Database not found");let n=k(e);if(t)try{A(n.db,e);}catch(r){throw n.close(),r}return n}insertToolCall(t){let e=this.openHandle(true);try{e.db.insert(q).values(t).run();}catch(n){throw n instanceof d?n:new d("DB_ERROR","Failed to insert tool call",n)}finally{e.close();}}findByTaskId(t){if(!this.dbExists())return [];let e=this.openHandle(false);try{return e.db.select().from(q).where(drizzleOrm.eq(q.task_id,t)).all()}catch(n){throw new d("DB_ERROR","Failed to find tool calls by task id",n)}finally{e.close();}}aggregateByName(t){if(!this.dbExists())return [];let e=this.openHandle(false);try{return e.db.select({toolName:q.tool_name,count:drizzleOrm.sql`count(*)`}).from(q).where(drizzleOrm.eq(q.task_id,t)).groupBy(q.tool_name).all().map(n=>({toolName:n.toolName,count:n.count}))}catch(n){throw new d("DB_ERROR","Failed to aggregate tool calls by name",n)}finally{e.close();}}};var It=class extends S{dbPath;constructor(t={}){super(),t.dbPath?this.dbPath=t.dbPath:t.dbRoot&&(this.dbPath=j.join(t.dbRoot,".crewx","crewx.db"));}resolveDbPath(){return this.dbPath?this.dbPath:super.resolveDbPath()}openHandle(t){let e=this.resolveDbPath();if(t){let r=j.dirname(e);Vt.existsSync(r)||Vt.mkdirSync(r,{recursive:true});}else if(!Vt.existsSync(e))throw new d("NOT_FOUND","Database not found");let n=k(e);if(t)try{A(n.db,e);}catch(r){throw n.close(),r}return n}ensureThreadExists(t,e){if(!t.db.select({id:_.id}).from(_).where(drizzleOrm.eq(_.id,e)).limit(1).get())throw new d("NOT_FOUND",`Thread not found: ${e}`)}findByThreadId(t){if(!this.dbExists())return [];let e=this.openHandle(false);try{return this.ensureThreadExists(e,t),e.db.select().from(U).where(drizzleOrm.eq(U.thread_id,t)).orderBy(drizzleOrm.asc(U.seq)).all()}catch(n){throw n instanceof d?n:new d("DB_ERROR","Failed to find boxes by thread id",n)}finally{e.close();}}findById(t,e){if(!this.dbExists())return;let n=this.openHandle(false);try{return n.db.select().from(U).where(drizzleOrm.and(drizzleOrm.eq(U.id,e),drizzleOrm.eq(U.thread_id,t))).limit(1).get()??void 0}catch(r){throw r instanceof d?r:new d("DB_ERROR","Failed to find box by id",r)}finally{n.close();}}insert(t){let e=this.openHandle(true);try{this.ensureThreadExists(e,t.threadId);try{e.db.insert(U).values({id:t.id,thread_id:t.threadId,seq:t.seq,first_task_id:t.first_task_id,mid_task_id:t.mid_task_id,last_task_id:t.last_task_id,task_count:t.task_count,summary:t.summary??null,source_tokens:t.source_tokens,summary_tokens:t.summary_tokens??null,created_at:t.created_at}).run();}catch(r){throw r instanceof Error&&/UNIQUE constraint failed/i.test(r.message)?new d("CONFLICT",`Duplicate seq ${String(t.seq)} for thread ${t.threadId}`,r):r}let n=e.db.select().from(U).where(drizzleOrm.eq(U.id,t.id)).limit(1).get();if(!n)throw new d("DB_ERROR","Insert did not return a row");return n}catch(n){throw n instanceof d?n:new d("DB_ERROR","Failed to insert thread box",n)}finally{e.close();}}};var Bt=class extends S{dbPath;constructor(t={}){super(),t.dbPath?this.dbPath=t.dbPath:t.dbRoot&&(this.dbPath=j.join(t.dbRoot,".crewx","crewx.db"));}resolveDbPath(){return this.dbPath?this.dbPath:super.resolveDbPath()}openHandle(t){let e=this.resolveDbPath();if(t){let r=j.dirname(e);Vt.existsSync(r)||Vt.mkdirSync(r,{recursive:true});}else if(!Vt.existsSync(e))throw new d("NOT_FOUND","Database not found");let n=k(e);if(t)try{A(n.db,e);}catch(r){throw n.close(),r}return n}bulkInsert(t){if(t.length===0)return;let e=this.openHandle(true);try{let n=new Date().toISOString();e.db.transaction(r=>{for(let o of t)r.insert(st).values({id:crypto.randomUUID(),path:o.path,method:o.method,status_code:o.statusCode,duration_ms:o.durationMs,ip:o.ip??null,request_headers:o.requestHeaders??null,response_headers:o.responseHeaders??null,request_body:o.requestBody??null,response_body:o.responseBody??null,query:o.query??null,user_id:o.userId??null,project_id:o.projectId??null,partition_key:o.partitionKey??"default",timestamp:n,metadata:o.metadata??null}).run();});}catch(n){throw n instanceof d?n:new d("DB_ERROR","Failed to bulk insert request logs",n)}finally{e.close();}}findRecent(t=100){if(!this.dbExists())return [];let e=this.openHandle(false);try{return e.db.select().from(st).orderBy(drizzleOrm.desc(st.timestamp)).limit(t).all()}catch(n){throw new d("DB_ERROR","Failed to find recent request logs",n)}finally{e.close();}}};function fe(a){return new Date(Math.floor(a/3e5)*3e5).toISOString()}var Ut=class extends S{dbPath;constructor(t={}){super(),t.dbPath?this.dbPath=t.dbPath:t.dbRoot&&(this.dbPath=j.join(t.dbRoot,".crewx","crewx.db"));}resolveDbPath(){return this.dbPath?this.dbPath:super.resolveDbPath()}openHandle(t){let e=this.resolveDbPath();if(t){let r=j.dirname(e);Vt.existsSync(r)||Vt.mkdirSync(r,{recursive:true});}else if(!Vt.existsSync(e))throw new d("NOT_FOUND","Database not found");let n=k(e);if(t)try{A(n.db,e);}catch(r){throw n.close(),r}return n}upsert(t){let e=this.openHandle(true);try{let n=fe(t.bucketStartMs),r=t.accountRef??"default";e.db.insert(O).values({id:t.id,provider:t.provider,account_ref:r,limit_window:t.limitWindow,bucket_start:n,captured_at:t.capturedAt,used_percent:t.usedPercent,remaining_percent:t.remainingPercent,resets_at:t.resetsAt??null,source:t.source,metadata:t.metadata??null}).onConflictDoUpdate({target:[O.provider,O.account_ref,O.limit_window,O.bucket_start],set:{captured_at:t.capturedAt,used_percent:t.usedPercent,remaining_percent:t.remainingPercent,resets_at:t.resetsAt??null,metadata:t.metadata??null}}).run();}catch(n){throw n instanceof d?n:new d("DB_ERROR","Failed to upsert usage limit snapshot",n)}finally{e.close();}}getTrends(t){if(!this.dbExists())return [];let e=this.openHandle(false);try{let n=e.db.select({provider:O.provider,bucket_start:O.bucket_start,used_percent:O.used_percent,remaining_percent:O.remaining_percent,resets_at:O.resets_at}).from(O).where(drizzleOrm.and(drizzleOrm.eq(O.limit_window,t.window),drizzleOrm.gte(O.bucket_start,t.fromIso),drizzleOrm.lte(O.bucket_start,t.toIso))).orderBy(drizzleOrm.asc(O.bucket_start)).all(),r=new Map;for(let o of n)r.has(o.provider)||r.set(o.provider,[]),r.get(o.provider).push({bucketStart:o.bucket_start,usedPercent:o.used_percent,remainingPercent:o.remaining_percent,resetsAt:o.resets_at??null});return Array.from(r.entries()).map(([o,i])=>({provider:o,points:i}))}catch(n){throw new d("DB_ERROR","Failed to get usage limit trends",n)}finally{e.close();}}};var Mt=class extends S{dbPath;constructor(t={}){super(),t.dbPath?this.dbPath=t.dbPath:t.dbRoot&&(this.dbPath=j.join(t.dbRoot,".crewx","crewx.db"));}resolveDbPath(){return this.dbPath?this.dbPath:super.resolveDbPath()}openHandle(t){let e=this.resolveDbPath();if(t){let r=j.dirname(e);Vt.existsSync(r)||Vt.mkdirSync(r,{recursive:true});}else if(!Vt.existsSync(e))throw new d("NOT_FOUND","Database not found");let n=k(e);if(t)try{A(n.db,e);}catch(r){throw n.close(),r}return n}publish(t){let e=this.openHandle(true);try{e.db.insert(P).values({id:t.id,workspace_id:t.workspaceId,month:t.month,generated_at:t.generatedAt,source_range:t.sourceRange,tier:t.tier,total_tokens:t.totalTokens,total_cost_usd:t.totalCostUsd,payload:t.payload}).onConflictDoUpdate({target:[P.workspace_id,P.month],set:{generated_at:t.generatedAt,source_range:t.sourceRange,tier:t.tier,total_tokens:t.totalTokens,total_cost_usd:t.totalCostUsd,payload:t.payload}}).run();let n=e.db.select().from(P).where(drizzleOrm.and(drizzleOrm.eq(P.workspace_id,t.workspaceId),drizzleOrm.eq(P.month,t.month))).limit(1).get();if(!n)throw new d("DB_ERROR","Failed to read back published usage report");return n}catch(n){throw n instanceof d?n:new d("DB_ERROR","Failed to publish usage report",n)}finally{e.close();}}findByMonth(t,e){if(!this.dbExists())return;let n=this.openHandle(false);try{return n.db.select().from(P).where(drizzleOrm.and(drizzleOrm.eq(P.workspace_id,t),drizzleOrm.eq(P.month,e))).limit(1).get()??void 0}catch(r){throw new d("DB_ERROR","Failed to find usage report",r)}finally{n.close();}}listByWorkspace(t){if(!this.dbExists())return [];let e=this.openHandle(false);try{return e.db.select().from(P).where(drizzleOrm.eq(P.workspace_id,t)).orderBy(drizzleOrm.desc(P.month)).all()}catch(n){throw new d("DB_ERROR","Failed to list usage reports",n)}finally{e.close();}}};exports.BaseSqliteRepository=S;exports.RepositoryError=d;exports.RequestLogRepository=Bt;exports.SpanRepository=Pt;exports.TaskRepository=vt;exports.ThreadBoxRepository=It;exports.ThreadRepository=Lt;exports.ToolCallRepository=$t;exports.UsageLimitSnapshotRepository=Ut;exports.UsageReportRepository=Mt;exports.WorkspaceRepository=Ot;exports.calcBucketStart=fe;exports.openDrizzleDb=k;exports.pushSchema=rn;exports.runMigrations=rt;exports.runMigrationsOnce=A;exports.tasks=s;
309
+ `),c},{behavior:"immediate"})}}catch(o){throw o instanceof d?o:new d("DB_ERROR","Failed to save user message",o)}finally{r.close();}}saveAssistantMessage(t,e,n){if(!this.dbExists())return;let r=this.openHandle(true);try{let o=new Date().toISOString();r.db.update(_).set({last_message:e,updated_at:o}).where(drizzleOrm.eq(_.id,t)).run();}catch(o){throw o instanceof d?o:new d("DB_ERROR","Failed to save assistant message",o)}finally{r.close();}}updateThread(t,e){if(!this.dbExists())return;let n=this.openHandle(true);try{let r={updated_at:new Date().toISOString()};e.title!==void 0&&(r.title=e.title,r.title_locked=1),e.titleLocked!==void 0&&(r.title_locked=e.titleLocked?1:0),n.db.update(_).set(r).where(drizzleOrm.eq(_.id,t)).run();}catch(r){throw r instanceof d?r:new d("DB_ERROR","Failed to update thread",r)}finally{n.close();}}togglePin(t,e){let n=this.openHandle(true);try{let r=e?drizzleOrm.and(drizzleOrm.eq(_.id,t),drizzleOrm.eq(_.workspace_id,e)):drizzleOrm.eq(_.id,t),o=n.db.select({pinned:_.pinned,metadata:_.metadata}).from(_).where(r).get();if(!o)return null;let i=o.pinned?0:1,l=o.metadata?JSON.parse(o.metadata):{};if(i){let u=e?drizzleOrm.and(drizzleOrm.eq(_.pinned,1),drizzleOrm.eq(_.workspace_id,e)):drizzleOrm.eq(_.pinned,1),c=n.db.select({metadata:_.metadata}).from(_).where(u).all(),p=null;for(let h of c){let f=h.metadata?JSON.parse(h.metadata):{};typeof f.pinOrder=="number"&&(p===null||f.pinOrder<p)&&(p=f.pinOrder);}l.pinOrder=p===null?0:p-1;}else delete l.pinOrder;return n.db.update(_).set({pinned:i,metadata:Object.keys(l).length>0?JSON.stringify(l):null}).where(r).run(),{pinned:!!i}}catch(r){throw r instanceof d?r:new d("DB_ERROR","Failed to toggle pin",r)}finally{n.close();}}reorderPins(t,e){let n=this.openHandle(true);try{for(let r=0;r<t.length;r++){let o=e?drizzleOrm.and(drizzleOrm.eq(_.id,t[r]),drizzleOrm.eq(_.workspace_id,e)):drizzleOrm.eq(_.id,t[r]),i=n.db.select({metadata:_.metadata}).from(_).where(o).get();if(!i)continue;let l=i.metadata?JSON.parse(i.metadata):{};l.pinOrder=r+1,n.db.update(_).set({metadata:JSON.stringify(l)}).where(o).run();}}catch(r){throw r instanceof d?r:new d("DB_ERROR","Failed to reorder pins",r)}finally{n.close();}}toggleStar(t,e){let n=this.openHandle(true);try{let r=e?drizzleOrm.and(drizzleOrm.eq(_.id,t),drizzleOrm.eq(_.workspace_id,e)):drizzleOrm.eq(_.id,t),o=n.db.select({starred:_.starred}).from(_).where(r).get();if(!o)return null;let i=o.starred?0:1;return n.db.update(_).set({starred:i}).where(r).run(),{starred:!!i}}catch(r){throw r instanceof d?r:new d("DB_ERROR","Failed to toggle star",r)}finally{n.close();}}resolveOverdriveForRequest(t,e,n,r){let i=this.openHandle(true);try{let l=e?drizzleOrm.and(drizzleOrm.eq(_.id,t),drizzleOrm.eq(_.workspace_id,e)):drizzleOrm.eq(_.id,t);return i.db.transaction(c=>{let p=c.select({metadata:_.metadata}).from(_).where(l).get();if(!p)return null;let h=p.metadata?JSON.parse(p.metadata):{},f=h.overdrive??{},R=r?.defaultTurns??f.defaultTurns??3,N=r?.updatedBy??"ui",C=new Date().toISOString(),L,y,z,ot;switch(n){case "enable-count":{let it=r?.turns??R,at=r?.consumeCurrent?Math.max(it-1,0):it;L=at>0?"count":"off",y=at,z=!0,ot="count";break}case "enable-latch":{L="latch",y=0,z=!0,ot="latch";break}case "disable":{L="off",y=0,z=!1;break}default:{let it=f.state??"off",at=typeof f.remaining=="number"?f.remaining:0;if(it==="count"&&at>0){let Ht=at-1;Ht<=0?(L="off",y=0):(L="count",y=Ht),z=!0,ot="count";}else it==="latch"?(L="latch",y=0,z=!0,ot="latch"):(L="off",y=0,z=!1);break}}return h.overdrive={state:L,remaining:y,defaultTurns:R,updatedAt:C,updatedBy:N},c.update(_).set({metadata:JSON.stringify(h),updated_at:C}).where(l).run(),{applied:z,appliedMode:ot,state:L,remaining:y}},{behavior:"immediate"})}catch(l){throw l instanceof d?l:new d("DB_ERROR","Failed to resolve overdrive",l)}finally{i.close();}}};var Pt=class extends S{dbPath;constructor(t={}){super(),t.dbPath?this.dbPath=t.dbPath:t.dbRoot&&(this.dbPath=j.join(t.dbRoot,".crewx","crewx.db"));}resolveDbPath(){return this.dbPath?this.dbPath:super.resolveDbPath()}openHandle(t){let e=this.resolveDbPath();if(t){let r=j.dirname(e);Vt.existsSync(r)||Vt.mkdirSync(r,{recursive:true});}else if(!Vt.existsSync(e))throw new d("NOT_FOUND","Database not found");let n=k(e);if(t)try{A(n.db,e);}catch(r){throw n.close(),r}return n}insertSpan(t){let e=this.openHandle(true);try{e.db.insert(K).values(t).run();}catch(n){throw n instanceof d?n:new d("DB_ERROR","Failed to insert span",n)}finally{e.close();}}findByTaskId(t){if(!this.dbExists())return [];let e=this.openHandle(false);try{return e.db.select().from(K).where(drizzleOrm.eq(K.task_id,t)).all()}catch(n){throw new d("DB_ERROR","Failed to find spans by task id",n)}finally{e.close();}}findById(t){if(!this.dbExists())return;let e=this.openHandle(false);try{return e.db.select().from(K).where(drizzleOrm.eq(K.id,t)).limit(1).get()??void 0}catch(n){throw new d("DB_ERROR","Failed to find span by id",n)}finally{e.close();}}};var $t=class extends S{dbPath;constructor(t={}){super(),t.dbPath?this.dbPath=t.dbPath:t.dbRoot&&(this.dbPath=j.join(t.dbRoot,".crewx","crewx.db"));}resolveDbPath(){return this.dbPath?this.dbPath:super.resolveDbPath()}openHandle(t){let e=this.resolveDbPath();if(t){let r=j.dirname(e);Vt.existsSync(r)||Vt.mkdirSync(r,{recursive:true});}else if(!Vt.existsSync(e))throw new d("NOT_FOUND","Database not found");let n=k(e);if(t)try{A(n.db,e);}catch(r){throw n.close(),r}return n}insertToolCall(t){let e=this.openHandle(true);try{e.db.insert(q).values(t).run();}catch(n){throw n instanceof d?n:new d("DB_ERROR","Failed to insert tool call",n)}finally{e.close();}}findByTaskId(t){if(!this.dbExists())return [];let e=this.openHandle(false);try{return e.db.select().from(q).where(drizzleOrm.eq(q.task_id,t)).all()}catch(n){throw new d("DB_ERROR","Failed to find tool calls by task id",n)}finally{e.close();}}aggregateByName(t){if(!this.dbExists())return [];let e=this.openHandle(false);try{return e.db.select({toolName:q.tool_name,count:drizzleOrm.sql`count(*)`}).from(q).where(drizzleOrm.eq(q.task_id,t)).groupBy(q.tool_name).all().map(n=>({toolName:n.toolName,count:n.count}))}catch(n){throw new d("DB_ERROR","Failed to aggregate tool calls by name",n)}finally{e.close();}}};var It=class extends S{dbPath;constructor(t={}){super(),t.dbPath?this.dbPath=t.dbPath:t.dbRoot&&(this.dbPath=j.join(t.dbRoot,".crewx","crewx.db"));}resolveDbPath(){return this.dbPath?this.dbPath:super.resolveDbPath()}openHandle(t){let e=this.resolveDbPath();if(t){let r=j.dirname(e);Vt.existsSync(r)||Vt.mkdirSync(r,{recursive:true});}else if(!Vt.existsSync(e))throw new d("NOT_FOUND","Database not found");let n=k(e);if(t)try{A(n.db,e);}catch(r){throw n.close(),r}return n}ensureThreadExists(t,e){if(!t.db.select({id:_.id}).from(_).where(drizzleOrm.eq(_.id,e)).limit(1).get())throw new d("NOT_FOUND",`Thread not found: ${e}`)}findByThreadId(t){if(!this.dbExists())return [];let e=this.openHandle(false);try{return this.ensureThreadExists(e,t),e.db.select().from(U).where(drizzleOrm.eq(U.thread_id,t)).orderBy(drizzleOrm.asc(U.seq)).all()}catch(n){throw n instanceof d?n:new d("DB_ERROR","Failed to find boxes by thread id",n)}finally{e.close();}}findById(t,e){if(!this.dbExists())return;let n=this.openHandle(false);try{return n.db.select().from(U).where(drizzleOrm.and(drizzleOrm.eq(U.id,e),drizzleOrm.eq(U.thread_id,t))).limit(1).get()??void 0}catch(r){throw r instanceof d?r:new d("DB_ERROR","Failed to find box by id",r)}finally{n.close();}}insert(t){let e=this.openHandle(true);try{this.ensureThreadExists(e,t.threadId);try{e.db.insert(U).values({id:t.id,thread_id:t.threadId,seq:t.seq,first_task_id:t.first_task_id,mid_task_id:t.mid_task_id,last_task_id:t.last_task_id,task_count:t.task_count,summary:t.summary??null,source_tokens:t.source_tokens,summary_tokens:t.summary_tokens??null,created_at:t.created_at}).run();}catch(r){throw r instanceof Error&&/UNIQUE constraint failed/i.test(r.message)?new d("CONFLICT",`Duplicate seq ${String(t.seq)} for thread ${t.threadId}`,r):r}let n=e.db.select().from(U).where(drizzleOrm.eq(U.id,t.id)).limit(1).get();if(!n)throw new d("DB_ERROR","Insert did not return a row");return n}catch(n){throw n instanceof d?n:new d("DB_ERROR","Failed to insert thread box",n)}finally{e.close();}}};var Bt=class extends S{dbPath;constructor(t={}){super(),t.dbPath?this.dbPath=t.dbPath:t.dbRoot&&(this.dbPath=j.join(t.dbRoot,".crewx","crewx.db"));}resolveDbPath(){return this.dbPath?this.dbPath:super.resolveDbPath()}openHandle(t){let e=this.resolveDbPath();if(t){let r=j.dirname(e);Vt.existsSync(r)||Vt.mkdirSync(r,{recursive:true});}else if(!Vt.existsSync(e))throw new d("NOT_FOUND","Database not found");let n=k(e);if(t)try{A(n.db,e);}catch(r){throw n.close(),r}return n}bulkInsert(t){if(t.length===0)return;let e=this.openHandle(true);try{let n=new Date().toISOString();e.db.transaction(r=>{for(let o of t)r.insert(st).values({id:crypto.randomUUID(),path:o.path,method:o.method,status_code:o.statusCode,duration_ms:o.durationMs,ip:o.ip??null,request_headers:o.requestHeaders??null,response_headers:o.responseHeaders??null,request_body:o.requestBody??null,response_body:o.responseBody??null,query:o.query??null,user_id:o.userId??null,project_id:o.projectId??null,partition_key:o.partitionKey??"default",timestamp:n,metadata:o.metadata??null}).run();});}catch(n){throw n instanceof d?n:new d("DB_ERROR","Failed to bulk insert request logs",n)}finally{e.close();}}findRecent(t=100){if(!this.dbExists())return [];let e=this.openHandle(false);try{return e.db.select().from(st).orderBy(drizzleOrm.desc(st.timestamp)).limit(t).all()}catch(n){throw new d("DB_ERROR","Failed to find recent request logs",n)}finally{e.close();}}};function fe(a){return new Date(Math.floor(a/3e5)*3e5).toISOString()}var Ut=class extends S{dbPath;constructor(t={}){super(),t.dbPath?this.dbPath=t.dbPath:t.dbRoot&&(this.dbPath=j.join(t.dbRoot,".crewx","crewx.db"));}resolveDbPath(){return this.dbPath?this.dbPath:super.resolveDbPath()}openHandle(t){let e=this.resolveDbPath();if(t){let r=j.dirname(e);Vt.existsSync(r)||Vt.mkdirSync(r,{recursive:true});}else if(!Vt.existsSync(e))throw new d("NOT_FOUND","Database not found");let n=k(e);if(t)try{A(n.db,e);}catch(r){throw n.close(),r}return n}upsert(t){let e=this.openHandle(true);try{let n=fe(t.bucketStartMs),r=t.accountRef??"default";e.db.insert(O).values({id:t.id,provider:t.provider,account_ref:r,limit_window:t.limitWindow,bucket_start:n,captured_at:t.capturedAt,used_percent:t.usedPercent,remaining_percent:t.remainingPercent,resets_at:t.resetsAt??null,source:t.source,metadata:t.metadata??null}).onConflictDoUpdate({target:[O.provider,O.account_ref,O.limit_window,O.bucket_start],set:{captured_at:t.capturedAt,used_percent:t.usedPercent,remaining_percent:t.remainingPercent,resets_at:t.resetsAt??null,metadata:t.metadata??null}}).run();}catch(n){throw n instanceof d?n:new d("DB_ERROR","Failed to upsert usage limit snapshot",n)}finally{e.close();}}getTrends(t){if(!this.dbExists())return [];let e=this.openHandle(false);try{let n=e.db.select({provider:O.provider,bucket_start:O.bucket_start,used_percent:O.used_percent,remaining_percent:O.remaining_percent,resets_at:O.resets_at}).from(O).where(drizzleOrm.and(drizzleOrm.eq(O.limit_window,t.window),drizzleOrm.gte(O.bucket_start,t.fromIso),drizzleOrm.lte(O.bucket_start,t.toIso))).orderBy(drizzleOrm.asc(O.bucket_start)).all(),r=new Map;for(let o of n)r.has(o.provider)||r.set(o.provider,[]),r.get(o.provider).push({bucketStart:o.bucket_start,usedPercent:o.used_percent,remainingPercent:o.remaining_percent,resetsAt:o.resets_at??null});return Array.from(r.entries()).map(([o,i])=>({provider:o,points:i}))}catch(n){throw new d("DB_ERROR","Failed to get usage limit trends",n)}finally{e.close();}}};var Mt=class extends S{dbPath;constructor(t={}){super(),t.dbPath?this.dbPath=t.dbPath:t.dbRoot&&(this.dbPath=j.join(t.dbRoot,".crewx","crewx.db"));}resolveDbPath(){return this.dbPath?this.dbPath:super.resolveDbPath()}openHandle(t){let e=this.resolveDbPath();if(t){let r=j.dirname(e);Vt.existsSync(r)||Vt.mkdirSync(r,{recursive:true});}else if(!Vt.existsSync(e))throw new d("NOT_FOUND","Database not found");let n=k(e);if(t)try{A(n.db,e);}catch(r){throw n.close(),r}return n}publish(t){let e=this.openHandle(true);try{e.db.insert(P).values({id:t.id,workspace_id:t.workspaceId,month:t.month,generated_at:t.generatedAt,source_range:t.sourceRange,tier:t.tier,total_tokens:t.totalTokens,total_cost_usd:t.totalCostUsd,payload:t.payload}).onConflictDoUpdate({target:[P.workspace_id,P.month],set:{generated_at:t.generatedAt,source_range:t.sourceRange,tier:t.tier,total_tokens:t.totalTokens,total_cost_usd:t.totalCostUsd,payload:t.payload}}).run();let n=e.db.select().from(P).where(drizzleOrm.and(drizzleOrm.eq(P.workspace_id,t.workspaceId),drizzleOrm.eq(P.month,t.month))).limit(1).get();if(!n)throw new d("DB_ERROR","Failed to read back published usage report");return n}catch(n){throw n instanceof d?n:new d("DB_ERROR","Failed to publish usage report",n)}finally{e.close();}}findByMonth(t,e){if(!this.dbExists())return;let n=this.openHandle(false);try{return n.db.select().from(P).where(drizzleOrm.and(drizzleOrm.eq(P.workspace_id,t),drizzleOrm.eq(P.month,e))).limit(1).get()??void 0}catch(r){throw new d("DB_ERROR","Failed to find usage report",r)}finally{n.close();}}listByWorkspace(t){if(!this.dbExists())return [];let e=this.openHandle(false);try{return e.db.select().from(P).where(drizzleOrm.eq(P.workspace_id,t)).orderBy(drizzleOrm.desc(P.month)).all()}catch(n){throw new d("DB_ERROR","Failed to list usage reports",n)}finally{e.close();}}};exports.BaseSqliteRepository=S;exports.RepositoryError=d;exports.RequestLogRepository=Bt;exports.SpanRepository=Pt;exports.TaskRepository=vt;exports.ThreadBoxRepository=It;exports.ThreadRepository=Lt;exports.ToolCallRepository=$t;exports.UsageLimitSnapshotRepository=Ut;exports.UsageReportRepository=Mt;exports.WorkspaceRepository=Ot;exports.calcBucketStart=fe;exports.openDrizzleDb=k;exports.pushSchema=rn;exports.runMigrations=rt;exports.runMigrationsOnce=A;exports.tasks=s;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crewx/sdk",
3
- "version": "0.9.0-rc.29",
3
+ "version": "0.9.0-rc.30",
4
4
  "license": "UNLICENSED",
5
5
  "engines": {
6
6
  "node": ">=20.19.0"