@rizom/brain 0.2.0-alpha.812 → 0.2.0-alpha.813
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 +4 -4
- package/dist/chunks/{app-qpfe9we3.js → app-dp77f48x.js} +2 -2
- package/dist/chunks/{index-h8kmfws8.js → index-k85eqshq.js} +2 -2
- package/dist/chunks/{index-3fsarvay.js → index-k9f824dj.js} +3 -3
- package/dist/chunks/{index-3fsarvay.js.map → index-k9f824dj.js.map} +1 -1
- package/dist/chunks/{package-ns4wpasv.js → package-4f5htv60.js} +3 -3
- package/dist/chunks/{package-ns4wpasv.js.map → package-4f5htv60.js.map} +1 -1
- package/dist/model.js +4 -4
- package/dist/model.js.map +1 -1
- package/dist/testing.js +1 -1
- package/dist/ui/{studio-app-023d8880dab10e4740921b89693c9df8122e7ba235ca87c3c9d22fae7fc330f8.css → studio-app-5bdcd9cd016f80c11395bbe23b418696473441a81e00d56a4b57c35311be00ab.css} +13 -0
- package/dist/ui/{studio-app-w59hyhkf.js → studio-app-wcr2aapb.js} +5 -5
- package/dist/ui/{studio-app-w59hyhkf.js.map → studio-app-wcr2aapb.js.map} +1 -1
- package/dist/ui/studio-asset-manifest.json +37 -37
- package/dist/ui/studio-chunks/{account-view-b2evrja2.js → account-view-tgaymkvr.js} +2 -2
- package/dist/ui/studio-chunks/{account-view-b2evrja2.js.map → account-view-tgaymkvr.js.map} +1 -1
- package/dist/ui/studio-chunks/{chat-mmjr8wmz.js → chat-yvjjpyqb.js} +2 -2
- package/dist/ui/studio-chunks/{chat-mmjr8wmz.js.map → chat-yvjjpyqb.js.map} +1 -1
- package/dist/ui/studio-chunks/{highlighted-body-OFNGDK62-cgp6zkr4.js → highlighted-body-OFNGDK62-6etvn2rv.js} +2 -2
- package/dist/ui/studio-chunks/{highlighted-body-OFNGDK62-cgp6zkr4.js.map → highlighted-body-OFNGDK62-6etvn2rv.js.map} +1 -1
- package/dist/ui/studio-chunks/{main-m5z56g9h.js → main-63p7zhs5.js} +4 -4
- package/dist/ui/studio-chunks/{main-m5z56g9h.js.map → main-63p7zhs5.js.map} +1 -1
- package/dist/ui/studio-chunks/{main-tpm8md0v.js → main-8tryr4tg.js} +2 -2
- package/dist/ui/studio-chunks/{main-tpm8md0v.js.map → main-8tryr4tg.js.map} +1 -1
- package/dist/ui/studio-chunks/main-btvhjems.js +6 -0
- package/dist/ui/studio-chunks/main-btvhjems.js.map +21 -0
- package/dist/ui/studio-chunks/{main-qsazykzx.js → main-dxzyxzd6.js} +2 -2
- package/dist/ui/studio-chunks/{main-qsazykzx.js.map → main-dxzyxzd6.js.map} +1 -1
- package/dist/ui/studio-chunks/{main-r3c1gnzk.js → main-k5c23t4a.js} +35 -35
- package/dist/ui/studio-chunks/{main-r3c1gnzk.js.map → main-k5c23t4a.js.map} +2 -2
- package/dist/ui/studio-chunks/{main-w5dyhtpj.js → main-s8mh4mst.js} +3 -3
- package/dist/ui/studio-chunks/{main-w5dyhtpj.js.map → main-s8mh4mst.js.map} +1 -1
- package/dist/ui/studio-chunks/{main-sfmn4003.js → main-sh3gd7gt.js} +2 -2
- package/dist/ui/studio-chunks/{main-sfmn4003.js.map → main-sh3gd7gt.js.map} +1 -1
- package/dist/ui/studio-chunks/{main-8965fkrd.js → main-th1maryg.js} +2 -2
- package/dist/ui/studio-chunks/{main-8965fkrd.js.map → main-th1maryg.js.map} +1 -1
- package/dist/ui/studio-chunks/{main-4saypexd.js → main-v1mxpp7f.js} +3 -3
- package/dist/ui/studio-chunks/{main-4saypexd.js.map → main-v1mxpp7f.js.map} +1 -1
- package/dist/ui/studio-chunks/{main-kh9c8p9q.js → main-v63y95pw.js} +2 -2
- package/dist/ui/studio-chunks/{main-kh9c8p9q.js.map → main-v63y95pw.js.map} +1 -1
- package/dist/ui/studio-chunks/mermaid-GHXKKRXX-2d3nmnjs.js +3 -0
- package/dist/ui/studio-chunks/{studio-ask-panel-gm2gtrvk.js → studio-ask-panel-fxkbrg2k.js} +2 -2
- package/dist/ui/studio-chunks/{studio-ask-panel-gm2gtrvk.js.map → studio-ask-panel-fxkbrg2k.js.map} +1 -1
- package/dist/ui/studio-chunks/studio-chat-workspace-24s9ryqw.js +3 -0
- package/dist/ui/studio-chunks/studio-chat-workspace-24s9ryqw.js.map +22 -0
- package/package.json +1 -1
- package/dist/ui/studio-chunks/main-fyw0r43g.js +0 -6
- package/dist/ui/studio-chunks/main-fyw0r43g.js.map +0 -21
- package/dist/ui/studio-chunks/mermaid-GHXKKRXX-3a1txmqw.js +0 -3
- package/dist/ui/studio-chunks/studio-chat-workspace-zrztt0xb.js +0 -3
- package/dist/ui/studio-chunks/studio-chat-workspace-zrztt0xb.js.map +0 -21
- /package/dist/chunks/{app-qpfe9we3.js.map → app-dp77f48x.js.map} +0 -0
- /package/dist/chunks/{index-h8kmfws8.js.map → index-k85eqshq.js.map} +0 -0
- /package/dist/ui/studio-chunks/{mermaid-GHXKKRXX-3a1txmqw.js.map → mermaid-GHXKKRXX-2d3nmnjs.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-k9f824dj.js";import{$e as N,Ae as A,Be as x,af as O,bf as z,cf as M,df as q,ef as J,ff as L,hf as _,if as j,je as E,me as I}from"./chunks/index-zknjxg43.js";import"./chunks/index-kcgba22z.js";import{mf as D}from"./chunks/index-r0gph1np.js";import{Xi as C,hl as P,il as w,pg as h,wo as B}from"./chunks/index-f7k0z4dy.js";import{Jp as p}from"./chunks/index-63p1xma2.js";import{Qt as S,St as v}from"./chunks/index-agfrkbxw.js";import"./chunks/index-g1c4y6gc.js";import"./chunks/index-bshgrg07.js";import"./chunks/index-pmvk8xga.js";import"./chunks/index-7ysxtpwx.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=81BF2E8B040F088A64756E2164756E21
|
|
5
5
|
//# sourceMappingURL=testing.js.map
|
|
@@ -72,6 +72,7 @@
|
|
|
72
72
|
.x1uud7ro:not(#\#){margin:12px 0 0}
|
|
73
73
|
.xzmowlt:not(#\#){margin:14px 0 0}
|
|
74
74
|
.xjvutul:not(#\#){margin:14px 0 4px}
|
|
75
|
+
.x6a0dku:not(#\#){margin:14px 16px 4px}
|
|
75
76
|
.xhv1u6h:not(#\#){margin:16px 0}
|
|
76
77
|
.x1nwhpgf:not(#\#){margin:18px 0}
|
|
77
78
|
.x1r2gm6t:not(#\#){margin:20px 0 24px}
|
|
@@ -92,6 +93,7 @@
|
|
|
92
93
|
.x1b4vry6:not(#\#){padding:10px 0}
|
|
93
94
|
.x6yrr3s:not(#\#){padding:10px 12px}
|
|
94
95
|
.x17udgi5:not(#\#){padding:10px 24px 16px}
|
|
96
|
+
.x68fgpq:not(#\#){padding:12px 12px 4px}
|
|
95
97
|
.x1gqud3g:not(#\#){padding:12px 14px}
|
|
96
98
|
.xnohdxd:not(#\#){padding:12px 26px}
|
|
97
99
|
.xc7ga6q:not(#\#){padding:12px}
|
|
@@ -147,6 +149,7 @@
|
|
|
147
149
|
.x1ica2du:not(#\#){padding:9px 0}
|
|
148
150
|
.x12s40zk:not(#\#){padding:9px 11px}
|
|
149
151
|
.x1r1m0to:not(#\#){padding:9px 12px}
|
|
152
|
+
.x1jx5nlt:not(#\#){padding:9px 16px}
|
|
150
153
|
.xskserf:not(#\#){padding:9px}
|
|
151
154
|
.xb3dhe4:empty:not(#\#){margin:0}
|
|
152
155
|
@media (max-width: 640px){.x1hyyza1.x1hyyza1:not(#\#){margin:18px 20px}}
|
|
@@ -157,6 +160,7 @@
|
|
|
157
160
|
@media (max-width: 640px){.x1h4xdqo.x1h4xdqo:not(#\#){padding:10px 2px}}
|
|
158
161
|
@media (max-width: 640px){.x153k8vf.x153k8vf:not(#\#){padding:12px 0}}
|
|
159
162
|
@media (max-width: 640px){.x11jaccc.x11jaccc:not(#\#){padding:12px 16px calc(12px + env(safe-area-inset-bottom))}}
|
|
163
|
+
@media (max-width: 640px){.xa4az6k.xa4az6k:not(#\#){padding:12px 16px}}
|
|
160
164
|
@media (max-width: 640px){.xj4fmvg.xj4fmvg:not(#\#){padding:14px 2px}}
|
|
161
165
|
@media (max-width: 640px){.xvc418b.xvc418b:not(#\#){padding:18px 16px}}
|
|
162
166
|
@media (max-width: 640px){.x10fa4w8.x10fa4w8:not(#\#){padding:18px 18px 88px}}
|
|
@@ -373,6 +377,7 @@
|
|
|
373
377
|
.xpivpjv:not(#\#):not(#\#):not(#\#){backdrop-filter:blur(4px)}
|
|
374
378
|
.x1nxp62o:not(#\#):not(#\#):not(#\#){background-color:color-mix(in srgb,var(--console-accent) 9%,transparent)}
|
|
375
379
|
.x779uuu:not(#\#):not(#\#):not(#\#){background-color:color-mix(in srgb,var(--console-bg-deep) 68%,transparent)}
|
|
380
|
+
.xrbo6c7:not(#\#):not(#\#):not(#\#){background-color:color-mix(in srgb,var(--console-card) 45%,transparent)}
|
|
376
381
|
.xfr4rvh:not(#\#):not(#\#):not(#\#){background-color:color-mix(in srgb,var(--console-card) 62%,transparent)}
|
|
377
382
|
.xom8tl7:not(#\#):not(#\#):not(#\#){background-color:color-mix(in srgb,var(--console-card) 75%,transparent)}
|
|
378
383
|
.xu2kkqm:not(#\#):not(#\#):not(#\#){background-color:color-mix(in srgb,var(--console-err) 12%,transparent)}
|
|
@@ -402,6 +407,7 @@
|
|
|
402
407
|
.xiy17q3:not(#\#):not(#\#):not(#\#){background-repeat:no-repeat}
|
|
403
408
|
.x6khlng:not(#\#):not(#\#):not(#\#){background-size:5px 5px,5px 5px}
|
|
404
409
|
.x1mwwwfo:not(#\#):not(#\#):not(#\#){border-collapse:collapse}
|
|
410
|
+
.xur0l8h:not(#\#):not(#\#):not(#\#){box-shadow:0 0 0 3px color-mix(in srgb,var(--console-accent) 22%,transparent)}
|
|
405
411
|
.xtyynsj:not(#\#):not(#\#):not(#\#){box-shadow:0 0 0 3px var(--console-card-soft)}
|
|
406
412
|
.x7yya20:not(#\#):not(#\#):not(#\#){box-shadow:0 0 10px color-mix(in srgb,var(--console-ok) 70%,transparent)}
|
|
407
413
|
.x1hc8we6:not(#\#):not(#\#):not(#\#){box-shadow:0 12px 30px color-mix(in srgb,black 12%,transparent)}
|
|
@@ -460,6 +466,7 @@
|
|
|
460
466
|
.xdt5ytf:not(#\#):not(#\#):not(#\#){flex-direction:column}
|
|
461
467
|
.x1iyjqo2:not(#\#):not(#\#):not(#\#){flex-grow:1}
|
|
462
468
|
.x2lah0s:not(#\#):not(#\#):not(#\#){flex-shrink:0}
|
|
469
|
+
.xs83m0k:not(#\#):not(#\#):not(#\#){flex-shrink:1}
|
|
463
470
|
.xozqiw3:not(#\#):not(#\#):not(#\#){flex-wrap:nowrap}
|
|
464
471
|
.x1a02dak:not(#\#):not(#\#):not(#\#){flex-wrap:wrap}
|
|
465
472
|
.xjb2p0i:not(#\#):not(#\#):not(#\#){font-family:inherit}
|
|
@@ -502,6 +509,7 @@
|
|
|
502
509
|
.x17owtcr:not(#\#):not(#\#):not(#\#){font-variation-settings:"SOFT" 70,"opsz" 60}
|
|
503
510
|
.xyp3u4b:not(#\#):not(#\#):not(#\#){font-variation-settings:"SOFT" 70,"opsz" 90}
|
|
504
511
|
.xkyhvkk:not(#\#):not(#\#):not(#\#){font-variation-settings:inherit}
|
|
512
|
+
.xj8qvsk:not(#\#):not(#\#):not(#\#){font-weight:380}
|
|
505
513
|
.xo1l8bm:not(#\#):not(#\#):not(#\#){font-weight:400}
|
|
506
514
|
.xk50ysn:not(#\#):not(#\#):not(#\#){font-weight:500}
|
|
507
515
|
.x11zgcw:not(#\#):not(#\#):not(#\#){font-weight:520}
|
|
@@ -530,6 +538,7 @@
|
|
|
530
538
|
.xcjjqqt:not(#\#):not(#\#):not(#\#){grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
|
|
531
539
|
.x1mkdm3x:not(#\#):not(#\#):not(#\#){grid-template-columns:minmax(0,1fr)}
|
|
532
540
|
.x1yzlmg0:not(#\#):not(#\#):not(#\#){grid-template-columns:minmax(120px,160px) minmax(0,1fr)}
|
|
541
|
+
.xoilou0:not(#\#):not(#\#):not(#\#){grid-template-columns:minmax(260px,320px) minmax(0,1fr)}
|
|
533
542
|
.xnby9oq:not(#\#):not(#\#):not(#\#){grid-template-columns:repeat(2,minmax(0,1fr))}
|
|
534
543
|
.x11qjcnl:not(#\#):not(#\#):not(#\#){grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}
|
|
535
544
|
.x1rdfzu:not(#\#):not(#\#):not(#\#){grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}
|
|
@@ -537,6 +546,7 @@
|
|
|
537
546
|
.x4w6khx:not(#\#):not(#\#):not(#\#){grid-template-columns:subgrid}
|
|
538
547
|
.x1yn14it:not(#\#):not(#\#):not(#\#){grid-template-rows:auto auto minmax(0,1fr)}
|
|
539
548
|
.xxq7klm:not(#\#):not(#\#):not(#\#){grid-template-rows:auto minmax(0,1fr) auto}
|
|
549
|
+
.x16p6thf:not(#\#):not(#\#):not(#\#){grid-template-rows:auto minmax(0,1fr)}
|
|
540
550
|
.x13b68fn:not(#\#):not(#\#):not(#\#){grid-template-rows:auto minmax(180px,1fr)}
|
|
541
551
|
.x5o4joa:not(#\#):not(#\#):not(#\#){grid-template-rows:minmax(0,1fr)}
|
|
542
552
|
.xxx7yvo:not(#\#):not(#\#):not(#\#){inset-inline-end:4px}
|
|
@@ -864,6 +874,7 @@
|
|
|
864
874
|
.x1vqgdyp:not(#\#):not(#\#):not(#\#):not(#\#){height:40px}
|
|
865
875
|
.x5kalc8:not(#\#):not(#\#):not(#\#):not(#\#){height:42px}
|
|
866
876
|
.xn3w4p2:not(#\#):not(#\#):not(#\#):not(#\#){height:44px}
|
|
877
|
+
.xols6we:not(#\#):not(#\#):not(#\#):not(#\#){height:6px}
|
|
867
878
|
.x1hagigm:not(#\#):not(#\#):not(#\#):not(#\#){height:7px}
|
|
868
879
|
.xdk7pt:not(#\#):not(#\#):not(#\#):not(#\#){height:8px}
|
|
869
880
|
.xegnrdp:not(#\#):not(#\#):not(#\#):not(#\#){height:9px}
|
|
@@ -1030,6 +1041,7 @@
|
|
|
1030
1041
|
.x3p9ev8:not(#\#):not(#\#):not(#\#):not(#\#){width:420px}
|
|
1031
1042
|
.x10h3iyq:not(#\#):not(#\#):not(#\#):not(#\#){width:42px}
|
|
1032
1043
|
.x187nhsf:not(#\#):not(#\#):not(#\#):not(#\#){width:44px}
|
|
1044
|
+
.x1v4s8kt:not(#\#):not(#\#):not(#\#):not(#\#){width:6px}
|
|
1033
1045
|
.xci0xqf:not(#\#):not(#\#):not(#\#):not(#\#){width:7px}
|
|
1034
1046
|
.x16ck42q:not(#\#):not(#\#):not(#\#):not(#\#){width:8ch}
|
|
1035
1047
|
.x1xc55vz:not(#\#):not(#\#):not(#\#):not(#\#){width:8px}
|
|
@@ -1057,6 +1069,7 @@
|
|
|
1057
1069
|
@media (max-width: 640px){.x12zzmuo.x12zzmuo:not(#\#):not(#\#):not(#\#):not(#\#){border-bottom-width:1px}}
|
|
1058
1070
|
@media (max-width: 640px){.x171z6dy.x171z6dy:not(#\#):not(#\#):not(#\#):not(#\#){border-left-width:0}}
|
|
1059
1071
|
@media (max-width: 900px){.x10uxk2a.x10uxk2a:not(#\#):not(#\#):not(#\#):not(#\#){border-left-width:0}}
|
|
1072
|
+
@media (max-width: 640px){.x13ymtvt.x13ymtvt:not(#\#):not(#\#):not(#\#):not(#\#){border-right-width:0}}
|
|
1060
1073
|
@media (max-width: 640px){.xtcfzw2.xtcfzw2:not(#\#):not(#\#):not(#\#):not(#\#){border-top-color:var(--console-rule-strong)}}
|
|
1061
1074
|
@media (max-width: 640px){.x1jt8l2p.x1jt8l2p:not(#\#):not(#\#):not(#\#):not(#\#){border-top-style:solid}}
|
|
1062
1075
|
@media (max-width: 640px){.x1mofq2b.x1mofq2b:not(#\#):not(#\#):not(#\#):not(#\#){border-top-width:1px}}
|