gemi 0.222.1 → 0.224.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 (58) hide show
  1. package/dist/ai/index.js +1 -1
  2. package/dist/{chunk-y8dpexn0.js → chunk-39kzdd32.js} +2 -2
  3. package/dist/{chunk-y8dpexn0.js.map → chunk-39kzdd32.js.map} +1 -1
  4. package/dist/{chunk-bs4p7dys.js → chunk-3k4p9agd.js} +22 -22
  5. package/dist/{chunk-bs4p7dys.js.map → chunk-3k4p9agd.js.map} +5 -5
  6. package/dist/{chunk-ejvjn9tq.js → chunk-ftq3tapd.js} +1 -1
  7. package/dist/{chunk-nqjchwdj.js → chunk-n2epez2r.js} +1 -1
  8. package/dist/chunk-p1ern8r4.js +577 -0
  9. package/dist/chunk-p1ern8r4.js.map +27 -0
  10. package/dist/{chunk-qvspq5tm.js → chunk-qgfwa4jm.js} +1 -1
  11. package/dist/{chunk-t7ppe7gt.js → chunk-qnag7887.js} +1 -1
  12. package/dist/{chunk-dy01vy29.js → chunk-rw45xz3f.js} +3 -3
  13. package/dist/{chunk-dy01vy29.js.map → chunk-rw45xz3f.js.map} +3 -3
  14. package/dist/chunk-zcmz311y.js +8 -0
  15. package/dist/{chunk-8gnbc9dg.js.map → chunk-zcmz311y.js.map} +3 -3
  16. package/dist/console/run.js +1 -1
  17. package/dist/facades/index.js +1 -1
  18. package/dist/http/index.js +1 -1
  19. package/dist/i18n/index.js +1 -1
  20. package/dist/kernel/index.js +1 -1
  21. package/dist/server/index.js +1 -1
  22. package/dist/services/file-storage/drivers/FileSystemDriver.d.ts +1 -0
  23. package/dist/services/file-storage/drivers/FileSystemDriver.d.ts.map +1 -1
  24. package/dist/services/index.d.ts +2 -1
  25. package/dist/services/index.d.ts.map +1 -1
  26. package/dist/services/index.js +1 -1
  27. package/dist/services/queue/DatabaseQueueDriver.d.ts +16 -0
  28. package/dist/services/queue/DatabaseQueueDriver.d.ts.map +1 -1
  29. package/dist/services/queue/DatabaseSlots.d.ts +100 -0
  30. package/dist/services/queue/DatabaseSlots.d.ts.map +1 -0
  31. package/dist/services/queue/Job.d.ts +20 -3
  32. package/dist/services/queue/Job.d.ts.map +1 -1
  33. package/dist/services/queue/MemoryQueueDriver.d.ts +11 -1
  34. package/dist/services/queue/MemoryQueueDriver.d.ts.map +1 -1
  35. package/dist/services/queue/QueueDriver.d.ts +24 -0
  36. package/dist/services/queue/QueueDriver.d.ts.map +1 -1
  37. package/dist/services/queue/QueueManager.d.ts +28 -8
  38. package/dist/services/queue/QueueManager.d.ts.map +1 -1
  39. package/dist/services/queue/slots.d.ts +111 -0
  40. package/dist/services/queue/slots.d.ts.map +1 -0
  41. package/dist/services/queue/work.js +1 -1
  42. package/dist/services/queue/workflow/MemoryWorkflowStore.d.ts +2 -0
  43. package/dist/services/queue/workflow/MemoryWorkflowStore.d.ts.map +1 -1
  44. package/dist/services/queue/workflow/Workflow.d.ts +16 -0
  45. package/dist/services/queue/workflow/Workflow.d.ts.map +1 -1
  46. package/dist/services/queue/workflow/WorkflowRuntime.d.ts +10 -0
  47. package/dist/services/queue/workflow/WorkflowRuntime.d.ts.map +1 -1
  48. package/dist/services/router/ApiRouteDispatcher.d.ts.map +1 -1
  49. package/dist/utils/apiUrl.d.ts +2 -0
  50. package/dist/utils/apiUrl.d.ts.map +1 -1
  51. package/package.json +1 -1
  52. package/dist/chunk-8gnbc9dg.js +0 -8
  53. package/dist/chunk-9kdqdjdf.js +0 -521
  54. package/dist/chunk-9kdqdjdf.js.map +0 -25
  55. /package/dist/{chunk-ejvjn9tq.js.map → chunk-ftq3tapd.js.map} +0 -0
  56. /package/dist/{chunk-nqjchwdj.js.map → chunk-n2epez2r.js.map} +0 -0
  57. /package/dist/{chunk-qvspq5tm.js.map → chunk-qgfwa4jm.js.map} +0 -0
  58. /package/dist/{chunk-t7ppe7gt.js.map → chunk-qnag7887.js.map} +0 -0
package/dist/ai/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{ca as uQ,da as lQ,ea as iQ,fa as _6,ga as B6,ha as S6,ia as m$,ja as M6,ka as A6,la as P$,ma as R6,na as E6,oa as k6,pa as T6}from"../chunk-9yascc81.js";import{$c as X6,Ac as CZ,Bc as YQ,Dc as VQ,Ec as FQ,Fc as HQ,Gc as PQ,Hc as NQ,Ic as OQ,Jc as UQ,Kc as CQ,Lc as LQ,Mc as _Q,Nc as BQ,Oc as SQ,Qc as c$,Rc as a9,Sc as t9,Tc as r9,Uc as e9,Vc as J6,Wc as $6,Xc as Q6,Yc as Z6,Zc as W6,_c as K6,ad as DJ,bd as G6,cd as eZ,dd as Y6,ed as J8,fd as V6,gd as z6,hd as D6,ic as h$,id as kJ,jc as lZ,jd as K$,kc as iZ,kd as H6,lc as g$,ld as P6,md as $8,nd as N6,od as F6,pc as gQ,pd as O6,qc as fQ,qd as U6,rc as GJ,rd as C6,sc as s9,sd as L6,tc as b,td as Z$,uc as KQ,vc as XQ,xc as GQ,yc as g,zc as UZ}from"../chunk-t7ppe7gt.js";import{Gd as m,Hd as u$,Kd as dZ,Ld as nZ,Md as oZ,Nd as qJ,Od as sZ,Pd as mJ,Qd as vJ,Rd as w$,Sd as aZ,Td as tZ,Ud as pJ,Vd as rZ,_d as t,ae as a,xd as nQ,yd as A,zd as T}from"../chunk-kp7wcpx7.js";import{re as e$}from"../chunk-7xe5vd4w.js";import"../chunk-9kdqdjdf.js";import{Ni as I,li as qZ,oi as hZ,uj as gZ,zj as S$}from"../chunk-8gnbc9dg.js";import{Aj as vZ,Cj as uJ,Dj as cJ}from"../chunk-h1wmpa03.js";import{Mj as c}from"../chunk-t586p2g2.js";import{Oj as d9,Pj as n9,Qj as o9}from"../chunk-qs2xvc8g.js";import"../chunk-anc5v266.js";import{Xk as uZ,Yk as cZ,Zk as mZ,_k as pZ}from"../chunk-tac25cnj.js";import"../chunk-0k2r6bep.js";import{el as o,fl as s,ul as AJ}from"../chunk-0av1gyns.js";import"../chunk-zmt5kdpb.js";import"../chunk-yj7pbbnm.js";import{lm as GZ}from"../chunk-37209psn.js";import"../chunk-fqhkkpq3.js";import"../chunk-6r7956dh.js";import{Im as nJ}from"../chunk-5mrtgr7q.js";import"../chunk-3dkv4989.js";import{existsSync as z8,readdirSync as x6,readFileSync as a$}from"fs";import{isAbsolute as D8,join as CJ,relative as H8,sep as P8}from"path";var t$="prompts.json",N8=/\{\{>\s*([\w./-]+)\s*\}\}/g,n$=/\{\{(\w+)\}\}/g,F8=/^[\w-]+(\/[\w-]+)*$/,o$={dir:"app/agents",shared:"prompts"},_J={},iJ=new Map,LJ;function O8(){if(LJ===void 0){let J=CJ(nJ(),"dist","server",t$);LJ=z8(J)?JSON.parse(a$(J,"utf8")):null}return LJ??null}function U8(J){return J.replace(/\r?\n$/,"")}function s$(){return _J.cache??Bun.env.NODE_ENV==="production"}function C8(J,$){if(!F8.test(J))throw Error(`"${J}" is not a prompt name. Use letters, digits, "-" and "_", with "/" between folders.`);let Q=$.dir??_J.dir??o$.dir,Z=D8(Q)?Q:CJ(process.cwd(),Q),W=J.includes("/")?`${J}.md`:CJ($.shared??_J.shared??o$.shared,`${J}.md`);return CJ(Z,W)}function L8(J,$){let Q=C8(J,$),Z=s$()?iJ.get(Q):void 0;if(Z!==void 0)return Z;let W=Bun.env.NODE_ENV==="production";if(W){let X=O8()?.[H8(nJ(),Q).split(P8).join("/")];if(X!==void 0)return X}let K;try{K=U8(a$(Q,"utf8"))}catch(X){if(X.code==="ENOENT"){let G=W?` or in dist/server/${t$}`:"";throw Error(`The prompt "${J}" does not exist (looked for ${Q}${G}).`)}throw X}if(s$())iJ.set(Q,K);return K}function dJ(J,$,Q){if($.includes(J))throw Error(`The prompt "${J}" includes itself: ${[...$,J].join(" > ")}.`);return L8(J,Q).replace(N8,(Z,W)=>dJ(W,[...$,J],Q))}class r${static configure(J){_J={...J},iJ.clear(),LJ=void 0}static render(J,$={},Q={}){return dJ(J,[],Q).replace(n$,(Z,W)=>{if(!Object.hasOwn($,W))throw Error(`The prompt "${J}" has no value for {{${W}}}.`);return String($[W])})}static placeholders(J,$={}){let Q=[...dJ(J,[],$).matchAll(n$)].map((Z)=>Z[1]);return[...new Set(Q)]}}class oJ extends e${name="AgentJobDeadlineSweep";cron="* * * * *";async callback(){while(await g.sweep({limit:100})===100);}}var SJ=20,_8=300,B8=200;function $Q(J,$){if($<=0||J.length===0)return null;let Q=(K,X)=>X.createdAt-K.createdAt||(K.id<X.id?1:-1);return["<jobs>","Background jobs that tools started in this conversation, running ones first. A running job's result replaces its tool result when it finishes. Do not start the same work again while a job for it is running.",...[...J.filter((K)=>!b(K.state)).sort(Q),...J.filter((K)=>b(K.state)).sort(Q)].slice(0,$).map((K)=>{let X=[`- ${K.id} (${K.toolName})`];if(K.state==="waiting")X.push(`waiting for ${(K.after??[]).join(", ")} since ${BJ(K.createdAt)}`);else if(K.state==="running")X.push(`running since ${BJ(K.createdAt)}`);else if(K.state==="ok")X.push(`finished at ${BJ(K.settledAt??K.updatedAt)}`);else{let G=K.error?`${K.error.code}: ${JQ(K.error.message,B8)}`:"failed";X.push(`failed at ${BJ(K.settledAt??K.updatedAt)} (${G})`)}if(K.summary!==void 0)X.push(`summary: ${JQ(JSON.stringify(K.summary),_8)}`);if(K.orphaned)X.push("its tool call was lost when the turn that started it was cut short");return X.join("; ")}),"</jobs>"].join(`
2
+ import{ca as uQ,da as lQ,ea as iQ,fa as _6,ga as B6,ha as S6,ia as m$,ja as M6,ka as A6,la as P$,ma as R6,na as E6,oa as k6,pa as T6}from"../chunk-9yascc81.js";import{$c as X6,Ac as CZ,Bc as YQ,Dc as VQ,Ec as FQ,Fc as HQ,Gc as PQ,Hc as NQ,Ic as OQ,Jc as UQ,Kc as CQ,Lc as LQ,Mc as _Q,Nc as BQ,Oc as SQ,Qc as c$,Rc as a9,Sc as t9,Tc as r9,Uc as e9,Vc as J6,Wc as $6,Xc as Q6,Yc as Z6,Zc as W6,_c as K6,ad as DJ,bd as G6,cd as eZ,dd as Y6,ed as J8,fd as V6,gd as z6,hd as D6,ic as h$,id as kJ,jc as lZ,jd as K$,kc as iZ,kd as H6,lc as g$,ld as P6,md as $8,nd as N6,od as F6,pc as gQ,pd as O6,qc as fQ,qd as U6,rc as GJ,rd as C6,sc as s9,sd as L6,tc as b,td as Z$,uc as KQ,vc as XQ,xc as GQ,yc as g,zc as UZ}from"../chunk-qnag7887.js";import{Gd as m,Hd as u$,Kd as dZ,Ld as nZ,Md as oZ,Nd as qJ,Od as sZ,Pd as mJ,Qd as vJ,Rd as w$,Sd as aZ,Td as tZ,Ud as pJ,Vd as rZ,_d as t,ae as a,xd as nQ,yd as A,zd as T}from"../chunk-kp7wcpx7.js";import{re as e$}from"../chunk-7xe5vd4w.js";import"../chunk-p1ern8r4.js";import{Ni as I,li as qZ,oi as hZ,uj as gZ,zj as S$}from"../chunk-zcmz311y.js";import{Aj as vZ,Cj as uJ,Dj as cJ}from"../chunk-h1wmpa03.js";import{Mj as c}from"../chunk-t586p2g2.js";import{Oj as d9,Pj as n9,Qj as o9}from"../chunk-qs2xvc8g.js";import"../chunk-anc5v266.js";import{Xk as uZ,Yk as cZ,Zk as mZ,_k as pZ}from"../chunk-tac25cnj.js";import"../chunk-0k2r6bep.js";import{el as o,fl as s,ul as AJ}from"../chunk-0av1gyns.js";import"../chunk-zmt5kdpb.js";import"../chunk-yj7pbbnm.js";import{lm as GZ}from"../chunk-37209psn.js";import"../chunk-fqhkkpq3.js";import"../chunk-6r7956dh.js";import{Im as nJ}from"../chunk-5mrtgr7q.js";import"../chunk-3dkv4989.js";import{existsSync as z8,readdirSync as x6,readFileSync as a$}from"fs";import{isAbsolute as D8,join as CJ,relative as H8,sep as P8}from"path";var t$="prompts.json",N8=/\{\{>\s*([\w./-]+)\s*\}\}/g,n$=/\{\{(\w+)\}\}/g,F8=/^[\w-]+(\/[\w-]+)*$/,o$={dir:"app/agents",shared:"prompts"},_J={},iJ=new Map,LJ;function O8(){if(LJ===void 0){let J=CJ(nJ(),"dist","server",t$);LJ=z8(J)?JSON.parse(a$(J,"utf8")):null}return LJ??null}function U8(J){return J.replace(/\r?\n$/,"")}function s$(){return _J.cache??Bun.env.NODE_ENV==="production"}function C8(J,$){if(!F8.test(J))throw Error(`"${J}" is not a prompt name. Use letters, digits, "-" and "_", with "/" between folders.`);let Q=$.dir??_J.dir??o$.dir,Z=D8(Q)?Q:CJ(process.cwd(),Q),W=J.includes("/")?`${J}.md`:CJ($.shared??_J.shared??o$.shared,`${J}.md`);return CJ(Z,W)}function L8(J,$){let Q=C8(J,$),Z=s$()?iJ.get(Q):void 0;if(Z!==void 0)return Z;let W=Bun.env.NODE_ENV==="production";if(W){let X=O8()?.[H8(nJ(),Q).split(P8).join("/")];if(X!==void 0)return X}let K;try{K=U8(a$(Q,"utf8"))}catch(X){if(X.code==="ENOENT"){let G=W?` or in dist/server/${t$}`:"";throw Error(`The prompt "${J}" does not exist (looked for ${Q}${G}).`)}throw X}if(s$())iJ.set(Q,K);return K}function dJ(J,$,Q){if($.includes(J))throw Error(`The prompt "${J}" includes itself: ${[...$,J].join(" > ")}.`);return L8(J,Q).replace(N8,(Z,W)=>dJ(W,[...$,J],Q))}class r${static configure(J){_J={...J},iJ.clear(),LJ=void 0}static render(J,$={},Q={}){return dJ(J,[],Q).replace(n$,(Z,W)=>{if(!Object.hasOwn($,W))throw Error(`The prompt "${J}" has no value for {{${W}}}.`);return String($[W])})}static placeholders(J,$={}){let Q=[...dJ(J,[],$).matchAll(n$)].map((Z)=>Z[1]);return[...new Set(Q)]}}class oJ extends e${name="AgentJobDeadlineSweep";cron="* * * * *";async callback(){while(await g.sweep({limit:100})===100);}}var SJ=20,_8=300,B8=200;function $Q(J,$){if($<=0||J.length===0)return null;let Q=(K,X)=>X.createdAt-K.createdAt||(K.id<X.id?1:-1);return["<jobs>","Background jobs that tools started in this conversation, running ones first. A running job's result replaces its tool result when it finishes. Do not start the same work again while a job for it is running.",...[...J.filter((K)=>!b(K.state)).sort(Q),...J.filter((K)=>b(K.state)).sort(Q)].slice(0,$).map((K)=>{let X=[`- ${K.id} (${K.toolName})`];if(K.state==="waiting")X.push(`waiting for ${(K.after??[]).join(", ")} since ${BJ(K.createdAt)}`);else if(K.state==="running")X.push(`running since ${BJ(K.createdAt)}`);else if(K.state==="ok")X.push(`finished at ${BJ(K.settledAt??K.updatedAt)}`);else{let G=K.error?`${K.error.code}: ${JQ(K.error.message,B8)}`:"failed";X.push(`failed at ${BJ(K.settledAt??K.updatedAt)} (${G})`)}if(K.summary!==void 0)X.push(`summary: ${JQ(JSON.stringify(K.summary),_8)}`);if(K.orphaned)X.push("its tool call was lost when the turn that started it was cut short");return X.join("; ")}),"</jobs>"].join(`
3
3
  `)}function BJ(J){return new Date(J).toISOString().replace(/\.\d{3}Z$/,"Z")}function JQ(J,$){return J.length<=$?J:`${J.slice(0,$-1)}\u2026`}var QQ=["after_jobs","batch_key","queued","inbox","job_checkpoint"],ZQ=20;class sJ{table;sql;dialect;connection;later;constructor(J,$={}){let Q=$.table??"gemi_agent_jobs";if(!/^[A-Za-z_][A-Za-z0-9_]*$/.test(Q))throw Error(`The agent jobs table name "${Q}" is not a plain identifier. Use letters, digits and underscores.`);this.table=Q,this.sql=J.sql,this.dialect=J.dialect,this.connection=J.name}async createTable(){for(let J of S8(this.dialect,this.table))await this.sql.unsafe(J)}async transaction(J){if(this.connection===void 0||this.joinable())return J();return AJ(this.sql,()=>J(),{connection:this.connection})}async create(J){let $=J.after!==void 0||J.batch!==void 0||J.queued!==void 0;if($)await this.requireLaterColumns("A job with `after` or `batch`");let Q=this.q(),Z=this.clock(Q),W=J.state??"running";if($)await Q`
4
4
  INSERT INTO ${this.name(Q)}
5
5
  (id, thread_id, run_id, tool_call_id, tool_name, owner, job, summary, state,
@@ -1,6 +1,6 @@
1
1
  // @bun
2
- import{Qa as m}from"./chunk-ba1h9pm6.js";import{createElement as j}from"react";function z(i,t){let u=Object.keys(t).sort((s,p)=>p.length-s.length).map((s)=>s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),r=new RegExp(u.join("|"),"g");return i.replace(r,(s)=>t[s])}async function X(i,t,u=[],r){let s=[...u.map((n)=>`${i}/views/${n}.tsx`),r?`${i}/views/${r}.tsx`:`${i}/views/RootLayout.tsx`],p=new Set;for(let n of s){let e=t.moduleGraph.getModulesByFile(n);if(e)for(let d of e)p.add(d)}let b=[],l=[],g={};for(let n of p)if(n)for(let e of n.importedModules){if(e.file.includes("module.css"))g[e.file]=e.ssrTransformResult.map.sourcesContent.join("");if(e.file.includes(".css"))l.push(e.file)}for(let n of l){let e=await t.transformRequest(n+"?direct"),d=n.includes("module.css"),a="";if(d)a=z(g[n],e.default);b.push({isDev:!0,id:n,content:d?a:e.code})}return b.map((n,e)=>{return j("style",{key:e,type:"text/css","data-vite-dev-id":n.id,dangerouslySetInnerHTML:{__html:n.content}})})}async function Y(i=[]){return i.map((t,u)=>{return j("style",{key:u,id:t?.id,type:"text/css",dangerouslySetInnerHTML:{__html:t.content}})})}import{existsSync as f}from"fs";import{basename as q}from"path";import{networkInterfaces as k}from"os";var v={name:"gemi",version:"0.222.1",private:!1,license:"MIT",author:"Enes Tufekci <enes@gemijs.dev>",repository:{type:"git",url:"git+https://github.com/nstfkc/gemi.git",directory:"packages/gemi"},bin:{gemi:"./dist/bin/gemi.js","gemi-orm-generator":"./dist/bin/orm-generator.js"},files:["dist/**/*","ide/typescript-plugin/package.json","skills/**/*"],module:!0,exports:{"./http":"./http/index.ts","./client":"./client/index.ts","./ai":"./ai/index.ts","./ai/client":"./ai/client/index.ts","./ai/voice":"./ai/voice/index.ts","./ai/testing":"./ai/testing/index.ts","./testing":"./testing/index.ts","./app":"./app/index.ts","./facades":"./facades/index.ts","./email":"./email/index.ts","./vite":"./dist/vite/index.mjs","./kernel":"./kernel/index.ts","./services":"./services/index.ts","./i18n":"./i18n/index.ts","./dictionary":"./i18n/dictionaryRuntime.ts","./server":"./server/index.ts","./config":"./config/index.ts","./container":"./container/index.ts","./foundation":"./foundation/index.ts","./database":"./database/index.ts","./orm":"./orm/index.ts","./support":"./support/index.ts","./probe":"./probe/index.ts","./console/run":"./console/run.ts","./queue/work":"./services/queue/work.ts","./stats/route-table":"./stats/route-table.ts","./ide/typescript-plugin":"./ide/typescript-plugin/index.ts","./bun/preload":"./bun/preload.ts","./bun/plugin":"./bun/plugin.ts","./vitest":"./vitest/index.ts"},scripts:{lint:"oxlint",typecheck:"tsc --noEmit -p tsconfig.json && tsc --noEmit -p tsconfig.browser.json && tsc --noEmit -p ide/typescript-plugin/tsconfig.json",build:"NODE_ENV=production bun run build:core && bun run build:bin && bun run build:types && bun run build:client && bun run build:plugin && bun run build:ts-plugin && bun run build:client-types && bun run build:augmentation","build:core":"bun ./scripts/build.ts","build:bin":"bun build --outdir=./dist/bin --target=bun --external=vite --external=react-dom --external=react/jsx-runtime --external=bun --external=sharp --external=@azure/storage-blob --external=@azure/communication-email --external=@azure/identity --external=typescript --sourcemap ./bin/gemi.ts ./bin/orm-generator.ts && bun ./scripts/prepare-bin.ts","build:client":"rm -rf dist/client dist/testing dist/ai/client dist/ai/voice dist/chunks && vite build -c vite.client.config.mts","build:plugin":"vite build -c vite.plugin.config.mts","build:ts-plugin":"bun ./scripts/build-ts-plugin.ts","build:types":"tsc -p tsconfig.build.json","build:client-types":"tsc -p tsconfig.browser.json",test:"bun --bun x vitest","test:types":"vitest run --typecheck.only","test:live":"bun --bun x vitest run ai/live","test:packaging":"bun --bun x vitest run --config vitest.packaging.config.ts","build:publish":"bun scripts/build-publish.ts",prepublishOnly:"echo 'Do not publish from this directory \u2014 its exports point at TS source. Run: bun run build:publish, then publish from .publish/' && exit 1","build:augmentation":"bun ./scripts/wire-augmentation.ts"},dependencies:{"@aws-sdk/client-s3":"^3.629.0","@aws-sdk/s3-request-presigner":"^3.629.0","ast-types":"^0.14.2",commander:"^12.1.0",history:"^5.3.0","jsx-email":"2.0.0-rc2.1","magic-string":"^0.30.17",open:"^10.1.0","react-error-boundary":"^6.0.0",recast:"^0.23.9",resend:"^6.12.3",satori:"^0.12.2","temporal-polyfill":"^0.2.5","twitter-api-v2":"^1.20.2","urlpattern-polyfill":"^10.0.0",uuid:"^9.0.1"},devDependencies:{"@babel/parser":"^7.25.4","@prisma/generator-helper":"^6.5.0","@repo/typescript-config":"*","@testing-library/react":"^16.3.2","@types/bun":"^1.3.14","@types/eslint":"^8.56.5","@types/node":"^20.11.24","@types/react":"^19.0.2","@types/react-dom":"^19.0.2",eslint:"^8.57.0","happy-dom":"^21.0.4",jsdom:"^30.0.1",oxlint:"^1.39.0",postgres:"^3.4.5",react:"19.2.3","react-dom":"19.2.3",typescript:"^5.7.3",vitest:"^4.0.0"},peerDependencies:{"@azure/communication-email":"^1.1.0","@azure/identity":"^4.0.0","@azure/storage-blob":"^12.28.0",react:">=19","react-dom":">=19",sharp:"^0.34.2",typescript:">=5",vite:"^8.0.0",postgres:"^3.4.0"},peerDependenciesMeta:{"@azure/communication-email":{optional:!0},"@azure/identity":{optional:!0},"@azure/storage-blob":{optional:!0},typescript:{optional:!0},postgres:{optional:!0}}};var $=[" \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2557\u2588\u2588\u2557","\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D \u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2551","\u2588\u2588\u2551 \u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2554\u2588\u2588\u2588\u2588\u2554\u2588\u2588\u2551\u2588\u2588\u2551","\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u255D \u2588\u2588\u2551\u255A\u2588\u2588\u2554\u255D\u2588\u2588\u2551\u2588\u2588\u2551","\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2551 \u255A\u2550\u255D \u2588\u2588\u2551\u2588\u2588\u2551"," \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D"],h=Boolean(process.stdout.isTTY)&&!process.env.NO_COLOR,c=(i,t)=>h?`\x1B[${i}m${t}\x1B[0m`:t,E=(i)=>c("1",i),x=(i)=>c("2",i),o=(i)=>c("36",i),G=(i)=>c("32",i),J=(i)=>c("35",i);function N(){return v.version??"?"}function O(i){for(let t of Object.values(k()))for(let u of t??[])if((u.family==="IPv4"||u.family===4)&&!u.internal)return`http://${u.address}:${i}`;return null}function Q(i){return m(i).filter((t)=>f(t)).map((t)=>q(t))}function F(i){let{port:t,rootDir:u}=i,r=`http://localhost:${t}`,s=O(t),p=Q(u),b=(g,n)=>` ${G("\u279C")} ${E(g.padEnd(9))}${n}`,l=["",...$.map((g)=>J(g)),"",` ${x("gemi")} ${o(`v${N()}`)}`,"",b("Local:",o(r)),b("Network:",s?o(s):x("unavailable")),b("Env:",p.length?p.join(", "):x("none")),""];console.log(l.join(`
2
+ import{Qa as m}from"./chunk-ba1h9pm6.js";import{createElement as j}from"react";function z(i,t){let u=Object.keys(t).sort((s,p)=>p.length-s.length).map((s)=>s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),r=new RegExp(u.join("|"),"g");return i.replace(r,(s)=>t[s])}async function X(i,t,u=[],r){let s=[...u.map((n)=>`${i}/views/${n}.tsx`),r?`${i}/views/${r}.tsx`:`${i}/views/RootLayout.tsx`],p=new Set;for(let n of s){let e=t.moduleGraph.getModulesByFile(n);if(e)for(let d of e)p.add(d)}let b=[],l=[],g={};for(let n of p)if(n)for(let e of n.importedModules){if(e.file.includes("module.css"))g[e.file]=e.ssrTransformResult.map.sourcesContent.join("");if(e.file.includes(".css"))l.push(e.file)}for(let n of l){let e=await t.transformRequest(n+"?direct"),d=n.includes("module.css"),a="";if(d)a=z(g[n],e.default);b.push({isDev:!0,id:n,content:d?a:e.code})}return b.map((n,e)=>{return j("style",{key:e,type:"text/css","data-vite-dev-id":n.id,dangerouslySetInnerHTML:{__html:n.content}})})}async function Y(i=[]){return i.map((t,u)=>{return j("style",{key:u,id:t?.id,type:"text/css",dangerouslySetInnerHTML:{__html:t.content}})})}import{existsSync as f}from"fs";import{basename as q}from"path";import{networkInterfaces as k}from"os";var v={name:"gemi",version:"0.224.0",private:!1,license:"MIT",author:"Enes Tufekci <enes@gemijs.dev>",repository:{type:"git",url:"git+https://github.com/nstfkc/gemi.git",directory:"packages/gemi"},bin:{gemi:"./dist/bin/gemi.js","gemi-orm-generator":"./dist/bin/orm-generator.js"},files:["dist/**/*","ide/typescript-plugin/package.json","skills/**/*"],module:!0,exports:{"./http":"./http/index.ts","./client":"./client/index.ts","./ai":"./ai/index.ts","./ai/client":"./ai/client/index.ts","./ai/voice":"./ai/voice/index.ts","./ai/testing":"./ai/testing/index.ts","./testing":"./testing/index.ts","./app":"./app/index.ts","./facades":"./facades/index.ts","./email":"./email/index.ts","./vite":"./dist/vite/index.mjs","./kernel":"./kernel/index.ts","./services":"./services/index.ts","./i18n":"./i18n/index.ts","./dictionary":"./i18n/dictionaryRuntime.ts","./server":"./server/index.ts","./config":"./config/index.ts","./container":"./container/index.ts","./foundation":"./foundation/index.ts","./database":"./database/index.ts","./orm":"./orm/index.ts","./support":"./support/index.ts","./probe":"./probe/index.ts","./console/run":"./console/run.ts","./queue/work":"./services/queue/work.ts","./stats/route-table":"./stats/route-table.ts","./ide/typescript-plugin":"./ide/typescript-plugin/index.ts","./bun/preload":"./bun/preload.ts","./bun/plugin":"./bun/plugin.ts","./vitest":"./vitest/index.ts"},scripts:{lint:"oxlint",typecheck:"tsc --noEmit -p tsconfig.json && tsc --noEmit -p tsconfig.browser.json && tsc --noEmit -p ide/typescript-plugin/tsconfig.json",build:"NODE_ENV=production bun run build:core && bun run build:bin && bun run build:types && bun run build:client && bun run build:plugin && bun run build:ts-plugin && bun run build:client-types && bun run build:augmentation","build:core":"bun ./scripts/build.ts","build:bin":"bun build --outdir=./dist/bin --target=bun --external=vite --external=react-dom --external=react/jsx-runtime --external=bun --external=sharp --external=@azure/storage-blob --external=@azure/communication-email --external=@azure/identity --external=typescript --sourcemap ./bin/gemi.ts ./bin/orm-generator.ts && bun ./scripts/prepare-bin.ts","build:client":"rm -rf dist/client dist/testing dist/ai/client dist/ai/voice dist/chunks && vite build -c vite.client.config.mts","build:plugin":"vite build -c vite.plugin.config.mts","build:ts-plugin":"bun ./scripts/build-ts-plugin.ts","build:types":"tsc -p tsconfig.build.json","build:client-types":"tsc -p tsconfig.browser.json",test:"bun --bun x vitest","test:types":"vitest run --typecheck.only","test:live":"bun --bun x vitest run ai/live","test:packaging":"bun --bun x vitest run --config vitest.packaging.config.ts","build:publish":"bun scripts/build-publish.ts",prepublishOnly:"echo 'Do not publish from this directory \u2014 its exports point at TS source. Run: bun run build:publish, then publish from .publish/' && exit 1","build:augmentation":"bun ./scripts/wire-augmentation.ts"},dependencies:{"@aws-sdk/client-s3":"^3.629.0","@aws-sdk/s3-request-presigner":"^3.629.0","ast-types":"^0.14.2",commander:"^12.1.0",history:"^5.3.0","jsx-email":"2.0.0-rc2.1","magic-string":"^0.30.17",open:"^10.1.0","react-error-boundary":"^6.0.0",recast:"^0.23.9",resend:"^6.12.3",satori:"^0.12.2","temporal-polyfill":"^0.2.5","twitter-api-v2":"^1.20.2","urlpattern-polyfill":"^10.0.0",uuid:"^9.0.1"},devDependencies:{"@babel/parser":"^7.25.4","@prisma/generator-helper":"^6.5.0","@repo/typescript-config":"*","@testing-library/react":"^16.3.2","@types/bun":"^1.3.14","@types/eslint":"^8.56.5","@types/node":"^20.11.24","@types/react":"^19.0.2","@types/react-dom":"^19.0.2",eslint:"^8.57.0","happy-dom":"^21.0.4",jsdom:"^30.0.1",oxlint:"^1.39.0",postgres:"^3.4.5",react:"19.2.3","react-dom":"19.2.3",typescript:"^5.7.3",vitest:"^4.0.0"},peerDependencies:{"@azure/communication-email":"^1.1.0","@azure/identity":"^4.0.0","@azure/storage-blob":"^12.28.0",react:">=19","react-dom":">=19",sharp:"^0.34.2",typescript:">=5",vite:"^8.0.0",postgres:"^3.4.0"},peerDependenciesMeta:{"@azure/communication-email":{optional:!0},"@azure/identity":{optional:!0},"@azure/storage-blob":{optional:!0},typescript:{optional:!0},postgres:{optional:!0}}};var $=[" \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2557\u2588\u2588\u2557","\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D \u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2551","\u2588\u2588\u2551 \u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2554\u2588\u2588\u2588\u2588\u2554\u2588\u2588\u2551\u2588\u2588\u2551","\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u255D \u2588\u2588\u2551\u255A\u2588\u2588\u2554\u255D\u2588\u2588\u2551\u2588\u2588\u2551","\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2551 \u255A\u2550\u255D \u2588\u2588\u2551\u2588\u2588\u2551"," \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D"],h=Boolean(process.stdout.isTTY)&&!process.env.NO_COLOR,c=(i,t)=>h?`\x1B[${i}m${t}\x1B[0m`:t,E=(i)=>c("1",i),x=(i)=>c("2",i),o=(i)=>c("36",i),G=(i)=>c("32",i),J=(i)=>c("35",i);function N(){return v.version??"?"}function O(i){for(let t of Object.values(k()))for(let u of t??[])if((u.family==="IPv4"||u.family===4)&&!u.internal)return`http://${u.address}:${i}`;return null}function Q(i){return m(i).filter((t)=>f(t)).map((t)=>q(t))}function F(i){let{port:t,rootDir:u}=i,r=`http://localhost:${t}`,s=O(t),p=Q(u),b=(g,n)=>` ${G("\u279C")} ${E(g.padEnd(9))}${n}`,l=["",...$.map((g)=>J(g)),"",` ${x("gemi")} ${o(`v${N()}`)}`,"",b("Local:",o(r)),b("Network:",s?o(s):x("unavailable")),b("Env:",p.length?p.join(", "):x("none")),""];console.log(l.join(`
3
3
  `))}function V(i,t){return Error(`app/views/${i}.tsx is missing. gemi's auth routes render it because ${t} is on. Add the view, or turn that setting off in app/config/auth.ts.`)}function U(i=process.env.SERVER_IDLE_TIMEOUT){if(i===void 0||i.trim()==="")return 10;let t=Number(i.trim());if(!Number.isInteger(t)||t<0||t>255)throw Error(`SERVER_IDLE_TIMEOUT must be a whole number of seconds from 0 to 255 (0 disables the timeout), got ${JSON.stringify(i)}.`);return t}
4
4
  export{X as Z,Y as _,F as $,V as aa,U as ba};
5
5
 
6
- //# debugId=8E8B3FD99837B4EF64756E2164756E21
6
+ //# debugId=AFE14553B478463564756E2164756E21
@@ -8,6 +8,6 @@
8
8
  "/**\n * Bun's default, and what both servers use when `SERVER_IDLE_TIMEOUT` is unset.\n */\nexport const DEFAULT_SERVER_IDLE_TIMEOUT = 10;\n\n/**\n * The `idleTimeout` (seconds) both `gemi dev` and `gemi start` pass to\n * `Bun.serve`, from `SERVER_IDLE_TIMEOUT` (#787).\n *\n * One reader for both servers, so a long-poll that works under `gemi start`\n * also works under `gemi dev`. Before this, only `httpProd` read the variable\n * and the dev server always ran at Bun's 10 seconds.\n *\n * It is the time a connection may stay silent, a response that has not started\n * included, before Bun closes it; `0` disables it. It does not apply to an\n * upgraded websocket (the HMR relay included), which has its own\n * `websocket.idleTimeout`.\n *\n * Unset or blank means the default. Anything that is not a whole number from 0\n * to 255 (Bun's own limits) fails the boot with the variable's name, instead\n * of Bun's \"expects idleTimeout to be an integer\", which does not say where the\n * value came from.\n */\nexport function serverIdleTimeout(raw: string | undefined = process.env.SERVER_IDLE_TIMEOUT): number {\n if (raw === undefined || raw.trim() === \"\") return DEFAULT_SERVER_IDLE_TIMEOUT;\n\n const seconds = Number(raw.trim());\n if (!Number.isInteger(seconds) || seconds < 0 || seconds > 255) {\n throw new Error(\n `SERVER_IDLE_TIMEOUT must be a whole number of seconds from 0 to 255 ` +\n `(0 disables the timeout), got ${JSON.stringify(raw)}.`,\n );\n }\n return seconds;\n}\n"
9
9
  ],
10
10
  "mappings": ";yCAAA,wBAAS,cAGT,SAAS,CAAc,CAAC,EAAc,EAAwC,CAC5E,IAAM,EAAc,OAAO,KAAK,CAAM,EACnC,KAAK,CAAC,EAAG,IAAM,EAAE,OAAS,EAAE,MAAM,EAClC,IAAI,CAAC,IAAQ,EAAI,QAAQ,sBAAuB,MAAM,CAAC,EAGpD,EAAQ,IAAI,OAAO,EAAY,KAAK,GAAG,EAAG,GAAG,EAEnD,OAAO,EAAK,QAAQ,EAAO,CAAC,IAAU,EAAO,EAAM,EAGrD,eAAsB,CAAe,CACnC,EACA,EACA,EAAyB,CAAC,EAE1B,EACA,CACA,IAAM,EAAQ,CACZ,GAAG,EAAa,IAAI,CAAC,IAAS,GAAG,WAAgB,OAAU,EAC3D,EAAS,GAAG,WAAgB,QAAe,GAAG,wBAChD,EAEM,EAAU,IAAI,IACpB,QAAW,KAAQ,EAAO,CACxB,IAAM,EAAM,EAAK,YAAY,iBAAiB,CAAI,EAClD,GAAI,EACF,QAAW,KAAK,EAAK,EAAQ,IAAI,CAAC,EAItC,IAAM,EAAS,CAAC,EACV,EAAa,CAAC,EACd,EAA2C,CAAC,EAClD,QAAW,KAAO,EAChB,GAAI,EACF,QAAW,KAAY,EAAI,gBAAiB,CAC1C,GAAI,EAAS,KAAK,SAAS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