@rizom/brain 0.2.0-alpha.853 → 0.2.0-alpha.854
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 +5 -5
- package/dist/chunks/{app-z9aj70dk.js → app-gs1my9sk.js} +2 -2
- package/dist/chunks/{index-6zrp0qqf.js → index-r24najdd.js} +2 -2
- package/dist/chunks/{index-5tn1r5ge.js → index-rwndt26q.js} +3 -3
- package/dist/chunks/{index-5tn1r5ge.js.map → index-rwndt26q.js.map} +1 -1
- package/dist/chunks/{package-502aw82e.js → package-cw1f875h.js} +3 -3
- package/dist/chunks/{package-502aw82e.js.map → package-cw1f875h.js.map} +1 -1
- package/dist/model.js +5 -5
- package/dist/model.js.map +3 -3
- package/dist/testing.js +1 -1
- package/dist/ui/{studio-app-f87685d9f5a3c8208ba58c13b00290661cc6d37f46aac1c8e30f8c8fc928eb50.css → studio-app-713f1653001bb6b165dcc0b1103a4a411524782217e79eddb0d251d16f4269d3.css} +7 -0
- package/dist/ui/{studio-app-5cpk1p7j.js → studio-app-h23yy6b7.js} +70 -70
- package/dist/ui/{studio-app-5cpk1p7j.js.map → studio-app-h23yy6b7.js.map} +3 -3
- package/dist/ui/studio-asset-manifest.json +39 -39
- package/dist/ui/studio-chunks/{account-view-8rtm4q64.js → account-view-1ypavank.js} +2 -2
- package/dist/ui/studio-chunks/{account-view-8rtm4q64.js.map → account-view-1ypavank.js.map} +1 -1
- package/dist/ui/studio-chunks/{chat-tmjeqy83.js → chat-074f46ar.js} +2 -2
- package/dist/ui/studio-chunks/{chat-tmjeqy83.js.map → chat-074f46ar.js.map} +1 -1
- package/dist/ui/studio-chunks/{highlighted-body-OFNGDK62-ehbpd06t.js → highlighted-body-OFNGDK62-h4be8w1a.js} +2 -2
- package/dist/ui/studio-chunks/{highlighted-body-OFNGDK62-ehbpd06t.js.map → highlighted-body-OFNGDK62-h4be8w1a.js.map} +1 -1
- package/dist/ui/studio-chunks/{main-aggt26f0.js → main-2p0znfdr.js} +3 -3
- package/dist/ui/studio-chunks/{main-aggt26f0.js.map → main-2p0znfdr.js.map} +1 -1
- package/dist/ui/studio-chunks/{main-nwgh1q48.js → main-6eh2h8nw.js} +3 -3
- package/dist/ui/studio-chunks/{main-nwgh1q48.js.map → main-6eh2h8nw.js.map} +1 -1
- package/dist/ui/studio-chunks/main-8q14xfsq.js +5 -0
- package/dist/ui/studio-chunks/{main-agdkrbww.js.map → main-8q14xfsq.js.map} +5 -5
- package/dist/ui/studio-chunks/{main-1mt3cyaa.js → main-9n0h1xh2.js} +5 -5
- package/dist/ui/studio-chunks/{main-1mt3cyaa.js.map → main-9n0h1xh2.js.map} +1 -1
- package/dist/ui/studio-chunks/{main-vzkqtry9.js → main-9vf4g1p7.js} +3 -3
- package/dist/ui/studio-chunks/{main-vzkqtry9.js.map → main-9vf4g1p7.js.map} +1 -1
- package/dist/ui/studio-chunks/{main-s08weg8b.js → main-cw0bfz5n.js} +3 -3
- package/dist/ui/studio-chunks/{main-s08weg8b.js.map → main-cw0bfz5n.js.map} +3 -3
- package/dist/ui/studio-chunks/{main-srtqh1ey.js → main-e9me2114.js} +2 -2
- package/dist/ui/studio-chunks/{main-srtqh1ey.js.map → main-e9me2114.js.map} +1 -1
- package/dist/ui/studio-chunks/{main-g8vsytt4.js → main-jrwrjge5.js} +3 -3
- package/dist/ui/studio-chunks/{main-g8vsytt4.js.map → main-jrwrjge5.js.map} +1 -1
- package/dist/ui/studio-chunks/{main-tynww570.js → main-sjvbdz9v.js} +2 -2
- package/dist/ui/studio-chunks/{main-tynww570.js.map → main-sjvbdz9v.js.map} +1 -1
- package/dist/ui/studio-chunks/{main-myms7tpb.js → main-tq0n1rdw.js} +3 -3
- package/dist/ui/studio-chunks/{main-myms7tpb.js.map → main-tq0n1rdw.js.map} +1 -1
- package/dist/ui/studio-chunks/{main-m9twkcja.js → main-xyyhtpga.js} +3 -3
- package/dist/ui/studio-chunks/{main-m9twkcja.js.map → main-xyyhtpga.js.map} +1 -1
- package/dist/ui/studio-chunks/mermaid-GHXKKRXX-bad6jrkg.js +3 -0
- package/dist/ui/studio-chunks/mermaid-GHXKKRXX-bad6jrkg.js.map +9 -0
- package/dist/ui/studio-chunks/{studio-ask-panel-p08h9ga3.js → studio-ask-panel-gydb5tgh.js} +2 -2
- package/dist/ui/studio-chunks/{studio-ask-panel-p08h9ga3.js.map → studio-ask-panel-gydb5tgh.js.map} +1 -1
- package/dist/ui/studio-chunks/{studio-chat-workspace-z58fbq5h.js → studio-chat-workspace-mxr1a4b2.js} +2 -2
- package/dist/ui/studio-chunks/{studio-chat-workspace-z58fbq5h.js.map → studio-chat-workspace-mxr1a4b2.js.map} +1 -1
- package/package.json +1 -1
- package/dist/ui/studio-chunks/main-agdkrbww.js +0 -5
- package/dist/ui/studio-chunks/mermaid-GHXKKRXX-2w11scmw.js +0 -3
- package/dist/ui/studio-chunks/mermaid-GHXKKRXX-2w11scmw.js.map +0 -9
- /package/dist/chunks/{app-z9aj70dk.js.map → app-gs1my9sk.js.map} +0 -0
- /package/dist/chunks/{index-6zrp0qqf.js.map → index-r24najdd.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-rwndt26q.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-4mqgq4bb.js";import"./chunks/index-7f3ccxrq.js";import{of as D}from"./chunks/index-kz9a2wvt.js";import{$i as C,Ko as B,ll as P,ml as w,sg as h}from"./chunks/index-x7qrfd1q.js";import{Xp as p}from"./chunks/index-w2hsw2bk.js";import{hu as S,ju as v}from"./chunks/index-srfy20t3.js";import"./chunks/index-k9a6e379.js";import"./chunks/index-tf89v3fj.js";import"./chunks/index-jhg1vjf7.js";import"./chunks/index-fvb55vgy.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=C2B2E9383683075864756E2164756E21
|
|
5
5
|
//# sourceMappingURL=testing.js.map
|
|
@@ -311,7 +311,9 @@
|
|
|
311
311
|
.x1v9t41d:not(#\#){padding:4px 10px}
|
|
312
312
|
.xsoouyo:not(#\#){padding:4px 24px}
|
|
313
313
|
.x19ajujh:not(#\#){padding:4px 5px 4px 13px}
|
|
314
|
+
.x1whlmpv:not(#\#){padding:4px 6px}
|
|
314
315
|
.xfawy5m:not(#\#){padding:4px}
|
|
316
|
+
.x8lhhth:not(#\#){padding:5px 8px}
|
|
315
317
|
.x14odnwx:not(#\#){padding:5px}
|
|
316
318
|
.x757zpu:not(#\#){padding:6px 0 20px}
|
|
317
319
|
.xokocfn:not(#\#){padding:6px 0}
|
|
@@ -586,6 +588,7 @@
|
|
|
586
588
|
.xjbqb8w:not(#\#):not(#\#):not(#\#){background-color:transparent}
|
|
587
589
|
.x9kxhyz:not(#\#):not(#\#):not(#\#){background-color:var(--console-accent-soft)}
|
|
588
590
|
.x15vqgvx:not(#\#):not(#\#):not(#\#){background-color:var(--console-accent)}
|
|
591
|
+
.xec3sqm:not(#\#):not(#\#):not(#\#){background-color:var(--console-bg)}
|
|
589
592
|
.xbslqsl:not(#\#):not(#\#):not(#\#){background-color:var(--console-card-soft)}
|
|
590
593
|
.x18s3upu:not(#\#):not(#\#):not(#\#){background-color:var(--console-card)}
|
|
591
594
|
.x1rzgk5j:not(#\#):not(#\#):not(#\#){background-color:var(--console-err)}
|
|
@@ -887,6 +890,7 @@
|
|
|
887
890
|
.x11xpdln:not(#\#):not(#\#):not(#\#){transition-property:transform}
|
|
888
891
|
.xwji4o3:not(#\#):not(#\#):not(#\#){transition-timing-function:ease}
|
|
889
892
|
.x87ps6o:not(#\#):not(#\#):not(#\#){user-select:none}
|
|
893
|
+
.xxymvpz:not(#\#):not(#\#):not(#\#){vertical-align:middle}
|
|
890
894
|
.x16dsc37:not(#\#):not(#\#):not(#\#){vertical-align:top}
|
|
891
895
|
.xeaf4i8:not(#\#):not(#\#):not(#\#){white-space:normal}
|
|
892
896
|
.xuxw1ft:not(#\#):not(#\#):not(#\#){white-space:nowrap}
|
|
@@ -1202,6 +1206,7 @@
|
|
|
1202
1206
|
.x1yy5vjr:not(#\#):not(#\#):not(#\#):not(#\#){max-height:var(--radix-select-content-available-height,320px)}
|
|
1203
1207
|
.x193iq5w:not(#\#):not(#\#):not(#\#):not(#\#){max-width:100%}
|
|
1204
1208
|
.x63bdn6:not(#\#):not(#\#):not(#\#):not(#\#){max-width:1040px}
|
|
1209
|
+
.x1mtlzti:not(#\#):not(#\#):not(#\#):not(#\#){max-width:14rem}
|
|
1205
1210
|
.x1racy4e:not(#\#):not(#\#):not(#\#):not(#\#){max-width:220px}
|
|
1206
1211
|
.x1jkqq1h:not(#\#):not(#\#):not(#\#):not(#\#){max-width:280px}
|
|
1207
1212
|
.xxc7z9f:not(#\#):not(#\#):not(#\#):not(#\#){max-width:360px}
|
|
@@ -1248,6 +1253,8 @@
|
|
|
1248
1253
|
.xfb3i0g:not(#\#):not(#\#):not(#\#):not(#\#){min-width:180px}
|
|
1249
1254
|
.x46jg8d:not(#\#):not(#\#):not(#\#):not(#\#){min-width:32px}
|
|
1250
1255
|
.x1nb6za0:not(#\#):not(#\#):not(#\#):not(#\#){min-width:44px}
|
|
1256
|
+
.xfkfdo9:not(#\#):not(#\#):not(#\#):not(#\#){min-width:6.5rem}
|
|
1257
|
+
.x1bnrkr7:not(#\#):not(#\#):not(#\#):not(#\#){min-width:7rem}
|
|
1251
1258
|
.x12tqqkd:not(#\#):not(#\#):not(#\#):not(#\#){min-width:8ch}
|
|
1252
1259
|
.x450l9j:not(#\#):not(#\#):not(#\#):not(#\#){min-width:90px}
|
|
1253
1260
|
.xk8lq53:not(#\#):not(#\#):not(#\#):not(#\#){min-width:max-content}
|