@rizom/brain 0.2.0-alpha.877 → 0.2.0-alpha.878
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/brain.js +54 -12
- package/dist/chunks/{app-2r4r2xjc.js → app-x91r4ts9.js} +2 -2
- package/dist/chunks/{index-ds1xx525.js → index-8amdydan.js} +3 -3
- package/dist/chunks/{index-ds1xx525.js.map → index-8amdydan.js.map} +1 -1
- package/dist/chunks/{index-jqttvmx8.js → index-s0nnawsk.js} +2 -2
- package/dist/chunks/{package-zcyjb677.js → package-7zpaarzx.js} +3 -3
- package/dist/chunks/{package-zcyjb677.js.map → package-7zpaarzx.js.map} +1 -1
- package/dist/model.js +54 -12
- package/dist/model.js.map +2 -2
- package/dist/testing.js +1 -1
- package/dist/ui/{studio-app-52032946342ba9bbe65238644c7c7c5b96a58973cfefc9377ffc4db842917c56.css → studio-app-477b389b4a085660a5fd00cc97d502e457ca542866760fc118eed613080b3643.css} +14 -0
- package/dist/ui/studio-app-88wm99b5.js +269 -0
- package/dist/ui/{studio-app-bb5xxwvn.js.map → studio-app-88wm99b5.js.map} +7 -4
- package/dist/ui/studio-asset-manifest.json +39 -39
- package/dist/ui/studio-chunks/account-view-xxk75yw6.js +3 -0
- package/dist/ui/studio-chunks/{account-view-ak5tfxgg.js.map → account-view-xxk75yw6.js.map} +2 -2
- package/dist/ui/studio-chunks/{chat-cph4j688.js → chat-r441p4y0.js} +2 -2
- package/dist/ui/studio-chunks/{chat-cph4j688.js.map → chat-r441p4y0.js.map} +1 -1
- package/dist/ui/studio-chunks/{highlighted-body-OFNGDK62-64y2m0dm.js → highlighted-body-OFNGDK62-w006cjs6.js} +2 -2
- package/dist/ui/studio-chunks/{highlighted-body-OFNGDK62-64y2m0dm.js.map → highlighted-body-OFNGDK62-w006cjs6.js.map} +1 -1
- package/dist/ui/studio-chunks/{main-45xgzy0v.js → main-av92rtcd.js} +3 -3
- package/dist/ui/studio-chunks/{main-45xgzy0v.js.map → main-av92rtcd.js.map} +1 -1
- package/dist/ui/studio-chunks/{main-q24zjy7e.js → main-aw1a4nkg.js} +3 -3
- package/dist/ui/studio-chunks/{main-q24zjy7e.js.map → main-aw1a4nkg.js.map} +1 -1
- package/dist/ui/studio-chunks/{main-2g8gcg0r.js → main-da9hnszd.js} +3 -3
- package/dist/ui/studio-chunks/{main-2g8gcg0r.js.map → main-da9hnszd.js.map} +1 -1
- package/dist/ui/studio-chunks/{main-cjvg98dr.js → main-f23hf16n.js} +2 -2
- package/dist/ui/studio-chunks/{main-cjvg98dr.js.map → main-f23hf16n.js.map} +1 -1
- package/dist/ui/studio-chunks/{main-qyf00dty.js → main-gmy4axf5.js} +3 -3
- package/dist/ui/studio-chunks/{main-qyf00dty.js.map → main-gmy4axf5.js.map} +1 -1
- package/dist/ui/studio-chunks/{main-7fyr0wv3.js → main-hh3j5g4q.js} +3 -3
- package/dist/ui/studio-chunks/{main-7fyr0wv3.js.map → main-hh3j5g4q.js.map} +1 -1
- package/dist/ui/studio-chunks/{main-f886snck.js → main-p346vmdb.js} +2 -2
- package/dist/ui/studio-chunks/{main-f886snck.js.map → main-p346vmdb.js.map} +1 -1
- package/dist/ui/studio-chunks/{main-tcyq2xnp.js → main-r3py2dzg.js} +3 -3
- package/dist/ui/studio-chunks/{main-tcyq2xnp.js.map → main-r3py2dzg.js.map} +1 -1
- package/dist/ui/studio-chunks/{main-t14ef5wt.js → main-sqzwczh0.js} +5 -5
- package/dist/ui/studio-chunks/{main-t14ef5wt.js.map → main-sqzwczh0.js.map} +1 -1
- package/dist/ui/studio-chunks/{main-y9skwxac.js → main-tkpyed1j.js} +3 -3
- package/dist/ui/studio-chunks/{main-y9skwxac.js.map → main-tkpyed1j.js.map} +1 -1
- package/dist/ui/studio-chunks/{main-2hbxfr9g.js → main-zxwwfat9.js} +3 -3
- package/dist/ui/studio-chunks/{main-2hbxfr9g.js.map → main-zxwwfat9.js.map} +1 -1
- package/dist/ui/studio-chunks/mermaid-GHXKKRXX-s83c98zh.js +3 -0
- package/dist/ui/studio-chunks/mermaid-GHXKKRXX-s83c98zh.js.map +9 -0
- package/dist/ui/studio-chunks/{studio-ask-panel-vjymeavp.js → studio-ask-panel-wxd0qn8h.js} +2 -2
- package/dist/ui/studio-chunks/{studio-ask-panel-vjymeavp.js.map → studio-ask-panel-wxd0qn8h.js.map} +1 -1
- package/dist/ui/studio-chunks/{studio-chat-workspace-kzcn37qq.js → studio-chat-workspace-g9nwzpy9.js} +2 -2
- package/dist/ui/studio-chunks/{studio-chat-workspace-kzcn37qq.js.map → studio-chat-workspace-g9nwzpy9.js.map} +1 -1
- package/package.json +1 -1
- package/dist/ui/studio-app-bb5xxwvn.js +0 -269
- package/dist/ui/studio-chunks/account-view-ak5tfxgg.js +0 -3
- package/dist/ui/studio-chunks/mermaid-GHXKKRXX-nb261ktq.js +0 -3
- package/dist/ui/studio-chunks/mermaid-GHXKKRXX-nb261ktq.js.map +0 -9
- /package/dist/chunks/{app-2r4r2xjc.js.map → app-x91r4ts9.js.map} +0 -0
- /package/dist/chunks/{index-jqttvmx8.js.map → index-s0nnawsk.js.map} +0 -0
package/dist/testing.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{ge as k,he as V,ie as U}from"./chunks/index-
|
|
2
|
+
import{ge as k,he as V,ie as U}from"./chunks/index-8amdydan.js";import{Ae as A,Be as x,bf as N,cf as O,df as z,ef as M,ff as q,gf as J,hf as L,je as E,jf as _,kf as j,me as I}from"./chunks/index-4sx0xvqg.js";import"./chunks/index-n3cy8ttx.js";import{of as D}from"./chunks/index-nqhnhg8n.js";import{Ro as B,gj as C,rl as P,sg as h,sl as w}from"./chunks/index-xnxgemba.js";import{cq as p}from"./chunks/index-m2qv3p6y.js";import{qu as S,su as v}from"./chunks/index-0k63cxm5.js";import"./chunks/index-rwrp530c.js";import"./chunks/index-njqkf4cd.js";import"./chunks/index-74vg6r70.js";import"./chunks/index-cyq5dhvm.js";import{mkdtemp as K,rm as b}from"fs/promises";import{tmpdir as X}from"os";import{join as m}from"path";var y="none";function s(){return Promise.reject(Error("A test brain has no AI provider"))}function W(e){return{specificationVersion:"v3",provider:"test-brain",modelId:e,supportedUrls:{},doGenerate:s,doStream:s}}function T(e){let r={...e};return{generateText:s,generateObject:s,judge:s,generateImage:s,getModel:()=>W(r.model??"none"),canGenerateImages:()=>!1,getConfig:()=>({...r}),updateConfig:(o)=>{r={...r,...o}}}}function R(){return{identity:{model:"test:none",dimensions:1536,promptRevision:0},embedQuery:s,embedDocuments:s}}var Y="shell",ee=20;function te(e){if("needsConfirmation"in e)return{needsConfirmation:!0,summary:e.summary};if(!e.success)return{success:!1,error:e.error,...p({code:e.code})};return{success:!0,...p({data:e.data,message:e.message})}}function re(e,r){if(e.status==="completed"||e.status==="failed")return!0;return e.status==="pending"&&e.lastError!==null&&e.scheduledFor>r}function ne(e,r){return e.flatMap((o)=>{if(!D(o))throw Error("A test brain runs packages configured with use(), as defineBrain does");return P(o.definition,o.config,r)})}async function F(e,r){let o=k(r.directory);V(o,r.brainVersion);let f=ne(e.plugins,{name:o.name,version:o.version}),a=await K(m(r.temporaryRoot??X(),"rizom-test-brain-")),g={...E({dataDir:a,cacheDir:m(a,"cache"),distDir:m(a,"dist")}),embedding:{enabled:!1}},i;try{await new J(v.createFresh({level:S.WARN,context:"test-brain"}),{getStandardConfigWithDirectories:async()=>g,migrateEntities:O,migrateJobQueue:z,migrateConversations:M,migrateRuntimeState:q}).runAllMigrations();let t=_({name:o.name,version:o.version,logLevel:"warn",plugins:f,shellConfig:{...g,dataDir:m(a,"brain-data"),ai:{model:y}}}),n=I(j(t));i=N.createFresh(n,{aiService:T(A(n)),embeddingService:R()}),await i.initialize()}catch(t){throw await b(a,{recursive:!0,force:!0}),t}let Z=f.map((t)=>t.id),H,Q=async()=>{try{await i.shutdown()}finally{await b(a,{recursive:!0,force:!0})}};return Object.freeze({async tool(t,n){let l=i.getMCPService().listTools(),d=l.find(({tool:u})=>u.name===t);if(!d)throw Error(`No tool "${t}"; this brain has ${l.map(({tool:u})=>u.name).join(", ")}`);return te(await d.tool.handler(n,L()))},request:(t,n)=>h(i.getMessageBus(),t,n,Y),async fetch(t){let n=x(B(i),t.method.toUpperCase(),new URL(t.url).pathname);if(!n)return new Response("Not Found",{status:404});if(n.sharedHostAdmission==="deny")return new Response("Unauthorized",{status:401});return n.handler(t)},entities:C(i.getEntityService(),"restricted"),jobs:Object.freeze({async wait(t,n){let l=i.getJobQueueService(),d=async()=>{let c=await l.getStatus(n);if(!c||!Z.some((G)=>c.type===`${G}:${t.name}`))return null;if(re(c,Date.now()))return c;return await Bun.sleep(ee),d()},u=await d();return u?w(t,u):null}}),stop:()=>H??=Q()})}function Ee(e){return F(e,{brainVersion:U.version,directory:process.cwd()})}export{Ee as startTestBrain};
|
|
3
3
|
|
|
4
4
|
//# debugId=182C576153C042E364756E2164756E21
|
|
5
5
|
//# sourceMappingURL=testing.js.map
|
|
@@ -314,14 +314,17 @@
|
|
|
314
314
|
.x19ajujh:not(#\#){padding:4px 5px 4px 13px}
|
|
315
315
|
.x1whlmpv:not(#\#){padding:4px 6px}
|
|
316
316
|
.xfawy5m:not(#\#){padding:4px}
|
|
317
|
+
.xw5nz3n:not(#\#){padding:5px 12px}
|
|
317
318
|
.x8lhhth:not(#\#){padding:5px 8px}
|
|
318
319
|
.x14odnwx:not(#\#){padding:5px}
|
|
319
320
|
.x757zpu:not(#\#){padding:6px 0 20px}
|
|
320
321
|
.xokocfn:not(#\#){padding:6px 0}
|
|
321
322
|
.xk61eof:not(#\#){padding:6px 10px}
|
|
323
|
+
.x24avxq:not(#\#){padding:6px 6px}
|
|
322
324
|
.x1jmcyos:not(#\#){padding:6px 9px}
|
|
323
325
|
.x1ruevkc:not(#\#){padding:6px}
|
|
324
326
|
.x6uox72:not(#\#){padding:7px 0 18px 9px}
|
|
327
|
+
.x1sbvpl4:not(#\#){padding:7px 11px}
|
|
325
328
|
.x61dodf:not(#\#){padding:8px 10px 4px}
|
|
326
329
|
.x1160tuk:not(#\#){padding:8px 10px}
|
|
327
330
|
.x153ncpu:not(#\#){padding:8px 12px}
|
|
@@ -366,6 +369,7 @@
|
|
|
366
369
|
.x8tuc8h:not(#\#):not(#\#){border-color:var(--console-rule-strong)}
|
|
367
370
|
.xy1lt07:not(#\#):not(#\#){border-color:var(--console-rule)}
|
|
368
371
|
.x1vw2y1n:not(#\#):not(#\#){border-color:var(--console-text-muted)}
|
|
372
|
+
.xtkl38y:not(#\#):not(#\#){border-color:var(--console-text)}
|
|
369
373
|
.x11qqpng:not(#\#):not(#\#){border-color:var(--console-warn)}
|
|
370
374
|
.x1q4ynmn:not(#\#):not(#\#){border-radius:10px}
|
|
371
375
|
.x1cxwkf3:not(#\#):not(#\#){border-radius:12px 12px 2px 12px}
|
|
@@ -483,6 +487,7 @@
|
|
|
483
487
|
.x1q4txso:not(#\#):not(#\#){padding-inline:9px}
|
|
484
488
|
.x1ku5rj1:not(#\#):not(#\#){place-items:center}
|
|
485
489
|
.x1hl2dhg:not(#\#):not(#\#){text-decoration:none}
|
|
490
|
+
.x1bvjpef:not(#\#):not(#\#){text-decoration:underline}
|
|
486
491
|
.x5gjymy:not(#\#):not(#\#){transition:background-color .12s ease,border-color .12s ease,color .12s ease,opacity .12s ease,transform .12s ease}
|
|
487
492
|
.x1oagamk:not(#\#):not(#\#){transition:background-color .12s ease,border-color .12s ease}
|
|
488
493
|
.x1p5amsn:not(#\#):not(#\#){transition:border-color .12s ease,box-shadow .12s ease}
|
|
@@ -615,6 +620,7 @@
|
|
|
615
620
|
.x1hc8we6:not(#\#):not(#\#):not(#\#){box-shadow:0 12px 30px color-mix(in srgb,black 12%,transparent)}
|
|
616
621
|
.x1qk4p91:not(#\#):not(#\#):not(#\#){box-shadow:0 18px 48px -22px var(--console-shadow-ink,color-mix(in srgb,var(--console-bg-deep) 76%,transparent))}
|
|
617
622
|
.x1b3fvf2:not(#\#):not(#\#):not(#\#){box-shadow:0 32px 80px -28px var(--console-shadow-ink,color-mix(in srgb,var(--console-bg-deep) 72%,transparent))}
|
|
623
|
+
.x12b3sec:not(#\#):not(#\#):not(#\#){box-shadow:inset 0 -2px 0 var(--console-accent)}
|
|
618
624
|
.x1fdd90r:not(#\#):not(#\#):not(#\#){box-shadow:inset 0 0 0 1px var(--console-rule-strong),0 12px 28px -16px color-mix(in srgb,var(--console-text) 45%,transparent)}
|
|
619
625
|
.x1oyyjme:not(#\#):not(#\#):not(#\#){box-shadow:inset 0 0 0 1px var(--console-rule-strong),0 14px 30px -20px color-mix(in srgb,var(--console-text) 40%,transparent)}
|
|
620
626
|
.x7148in:not(#\#):not(#\#):not(#\#){box-shadow:inset 0 0 0 1px var(--console-rule-strong),0 16px 36px -20px color-mix(in srgb,var(--console-text) 45%,transparent)}
|
|
@@ -739,6 +745,7 @@
|
|
|
739
745
|
.x1xlr1w8:not(#\#):not(#\#):not(#\#){font-weight:700}
|
|
740
746
|
.x1pd3egz:not(#\#):not(#\#):not(#\#){font-weight:inherit}
|
|
741
747
|
.x1mt1orb:not(#\#):not(#\#):not(#\#){grid-auto-flow:column}
|
|
748
|
+
.xsyuct6:not(#\#):not(#\#):not(#\#){grid-template-columns:190px minmax(0,1fr)}
|
|
742
749
|
.x1y6fwsi:not(#\#):not(#\#):not(#\#){grid-template-columns:1fr}
|
|
743
750
|
.xd67fm3:not(#\#):not(#\#):not(#\#){grid-template-columns:2.5ch max-content}
|
|
744
751
|
.x1otrvri:not(#\#):not(#\#):not(#\#){grid-template-columns:22px minmax(0,1fr)}
|
|
@@ -763,6 +770,7 @@
|
|
|
763
770
|
.xnby9oq:not(#\#):not(#\#):not(#\#){grid-template-columns:repeat(2,minmax(0,1fr))}
|
|
764
771
|
.x1sipb5g:not(#\#):not(#\#):not(#\#){grid-template-columns:repeat(4,minmax(0,1fr))}
|
|
765
772
|
.x11qjcnl:not(#\#):not(#\#):not(#\#){grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}
|
|
773
|
+
.x189bvgu:not(#\#):not(#\#):not(#\#){grid-template-columns:repeat(auto-fill,minmax(280px,1fr))}
|
|
766
774
|
.x1rdfzu:not(#\#):not(#\#):not(#\#){grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}
|
|
767
775
|
.x12p5jtz:not(#\#):not(#\#):not(#\#){grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr))}
|
|
768
776
|
.x4w6khx:not(#\#):not(#\#):not(#\#){grid-template-columns:subgrid}
|
|
@@ -792,6 +800,7 @@
|
|
|
792
800
|
.x1w69ole:not(#\#):not(#\#):not(#\#){letter-spacing:-0.025em}
|
|
793
801
|
.x72az59:not(#\#):not(#\#):not(#\#){letter-spacing:-0.02em}
|
|
794
802
|
.x16q24ku:not(#\#):not(#\#):not(#\#){letter-spacing:.02em}
|
|
803
|
+
.x3gc2hl:not(#\#):not(#\#):not(#\#){letter-spacing:.03em}
|
|
795
804
|
.x1vyo3qp:not(#\#):not(#\#):not(#\#){letter-spacing:.04em}
|
|
796
805
|
.x2ujxvm:not(#\#):not(#\#):not(#\#){letter-spacing:.05em}
|
|
797
806
|
.x1dgsrnt:not(#\#):not(#\#):not(#\#){letter-spacing:.06em}
|
|
@@ -894,6 +903,7 @@
|
|
|
894
903
|
.x11xpdln:not(#\#):not(#\#):not(#\#){transition-property:transform}
|
|
895
904
|
.xwji4o3:not(#\#):not(#\#):not(#\#){transition-timing-function:ease}
|
|
896
905
|
.x87ps6o:not(#\#):not(#\#):not(#\#){user-select:none}
|
|
906
|
+
.x3ajldb:not(#\#):not(#\#):not(#\#){vertical-align:bottom}
|
|
897
907
|
.xxymvpz:not(#\#):not(#\#):not(#\#){vertical-align:middle}
|
|
898
908
|
.x16dsc37:not(#\#):not(#\#):not(#\#){vertical-align:top}
|
|
899
909
|
.xeaf4i8:not(#\#):not(#\#):not(#\#){white-space:normal}
|
|
@@ -905,6 +915,7 @@
|
|
|
905
915
|
.xfo81ep:not(#\#):not(#\#):not(#\#){z-index:1000}
|
|
906
916
|
.x1bkdxzg:not(#\#):not(#\#):not(#\#){z-index:1001}
|
|
907
917
|
.xp6lfbs:not(#\#):not(#\#):not(#\#){z-index:1100}
|
|
918
|
+
.xhtitgo:not(#\#):not(#\#):not(#\#){z-index:2}
|
|
908
919
|
.x1355qak:not(#\#):not(#\#):not(#\#){z-index:20}
|
|
909
920
|
.x68pp3s:not(#\#):not(#\#):not(#\#){z-index:30}
|
|
910
921
|
.xoegz02:not(#\#):not(#\#):not(#\#){z-index:4}
|
|
@@ -1058,6 +1069,7 @@
|
|
|
1058
1069
|
@media (min-width: 641px) and (max-width: 900px){.x1efj4vi.x1efj4vi:not(#\#):not(#\#):not(#\#){grid-template-columns:minmax(0,1fr) 320px}}
|
|
1059
1070
|
@media (max-width: 640px){.x1lk34zc.x1lk34zc:not(#\#):not(#\#):not(#\#){grid-template-columns:minmax(0,1fr) auto auto}}
|
|
1060
1071
|
@media (max-width: 640px){.x4jmfmw.x4jmfmw:not(#\#):not(#\#):not(#\#){grid-template-columns:minmax(0,1fr)}}
|
|
1072
|
+
@media (max-width: 720px){.x57k0db.x57k0db:not(#\#):not(#\#):not(#\#){grid-template-columns:minmax(0,1fr)}}
|
|
1061
1073
|
@media (max-width: 900px){.xirox3h.xirox3h:not(#\#):not(#\#):not(#\#){grid-template-columns:minmax(0,1fr)}}
|
|
1062
1074
|
@media (min-width: 641px) and (max-width: 900px){.x8ef1wo.x8ef1wo:not(#\#):not(#\#):not(#\#){grid-template-columns:minmax(0,1fr)}}
|
|
1063
1075
|
@media (max-width: 640px){.x9ov8se.x9ov8se:not(#\#):not(#\#):not(#\#){grid-template-columns:repeat(3,minmax(0,1fr))}}
|
|
@@ -1221,6 +1233,7 @@
|
|
|
1221
1233
|
.x73t7g:not(#\#):not(#\#):not(#\#):not(#\#){max-width:55%}
|
|
1222
1234
|
.x27kpxv:not(#\#):not(#\#):not(#\#):not(#\#){max-width:560px}
|
|
1223
1235
|
.xiky8lt:not(#\#):not(#\#):not(#\#):not(#\#){max-width:62ch}
|
|
1236
|
+
.xprqm3i:not(#\#):not(#\#):not(#\#):not(#\#){max-width:64ch}
|
|
1224
1237
|
.x1ac2792:not(#\#):not(#\#):not(#\#):not(#\#){max-width:740px}
|
|
1225
1238
|
.x15g8yj6:not(#\#):not(#\#):not(#\#):not(#\#){max-width:75ch}
|
|
1226
1239
|
.x70i6om:not(#\#):not(#\#):not(#\#):not(#\#){max-width:78ch}
|
|
@@ -1253,6 +1266,7 @@
|
|
|
1253
1266
|
.xeuugli:not(#\#):not(#\#):not(#\#):not(#\#){min-width:0}
|
|
1254
1267
|
.x1i9suas:not(#\#):not(#\#):not(#\#):not(#\#){min-width:120px}
|
|
1255
1268
|
.x1cxjkq6:not(#\#):not(#\#):not(#\#):not(#\#){min-width:12ch}
|
|
1269
|
+
.xt7fyls:not(#\#):not(#\#):not(#\#):not(#\#){min-width:150px}
|
|
1256
1270
|
.x5w4yej:not(#\#):not(#\#):not(#\#):not(#\#){min-width:160px}
|
|
1257
1271
|
.xfb3i0g:not(#\#):not(#\#):not(#\#):not(#\#){min-width:180px}
|
|
1258
1272
|
.x46jg8d:not(#\#):not(#\#):not(#\#):not(#\#){min-width:32px}
|