@rizom/brain 0.2.0-alpha.881 → 0.2.0-alpha.882

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 (53) hide show
  1. package/dist/brain.js +4 -4
  2. package/dist/chunks/{app-2vbdnh88.js → app-5j3q0yxz.js} +2 -2
  3. package/dist/chunks/{index-07afsqw5.js → index-fm8x8mt7.js} +3 -3
  4. package/dist/chunks/{index-07afsqw5.js.map → index-fm8x8mt7.js.map} +1 -1
  5. package/dist/chunks/{index-dpd5c2f7.js → index-xhfjbg2j.js} +2 -2
  6. package/dist/chunks/{package-jbn0vtbq.js → package-yhh1ck5k.js} +3 -3
  7. package/dist/chunks/{package-jbn0vtbq.js.map → package-yhh1ck5k.js.map} +1 -1
  8. package/dist/model.js +4 -4
  9. package/dist/model.js.map +1 -1
  10. package/dist/testing.js +1 -1
  11. package/dist/ui/{studio-app-67a33116ebcd8adece22196efb2522ec38307325e0b7a507247d13c865f74a50.css → studio-app-e9f5f33cbf8631fda1cbe45a5e644a1cb272ff25ae0b5bdd0b833c79f7f20957.css} +1 -0
  12. package/dist/ui/{studio-app-n7t8bmfz.js → studio-app-vg0r8vga.js} +72 -72
  13. package/dist/ui/{studio-app-n7t8bmfz.js.map → studio-app-vg0r8vga.js.map} +5 -5
  14. package/dist/ui/studio-asset-manifest.json +39 -39
  15. package/dist/ui/studio-chunks/{account-view-860d5kmt.js → account-view-4amheh5q.js} +2 -2
  16. package/dist/ui/studio-chunks/{account-view-860d5kmt.js.map → account-view-4amheh5q.js.map} +1 -1
  17. package/dist/ui/studio-chunks/{chat-r441p4y0.js → chat-ct1par3c.js} +2 -2
  18. package/dist/ui/studio-chunks/{chat-r441p4y0.js.map → chat-ct1par3c.js.map} +1 -1
  19. package/dist/ui/studio-chunks/{highlighted-body-OFNGDK62-w006cjs6.js → highlighted-body-OFNGDK62-nb8pwg5a.js} +2 -2
  20. package/dist/ui/studio-chunks/{highlighted-body-OFNGDK62-w006cjs6.js.map → highlighted-body-OFNGDK62-nb8pwg5a.js.map} +1 -1
  21. package/dist/ui/studio-chunks/{main-j85nz7d2.js → main-0qjdd7c8.js} +3 -3
  22. package/dist/ui/studio-chunks/{main-j85nz7d2.js.map → main-0qjdd7c8.js.map} +1 -1
  23. package/dist/ui/studio-chunks/{main-03kr4nta.js → main-62mp1a95.js} +3 -3
  24. package/dist/ui/studio-chunks/{main-03kr4nta.js.map → main-62mp1a95.js.map} +1 -1
  25. package/dist/ui/studio-chunks/{main-p346vmdb.js → main-dep9qqw1.js} +2 -2
  26. package/dist/ui/studio-chunks/{main-p346vmdb.js.map → main-dep9qqw1.js.map} +1 -1
  27. package/dist/ui/studio-chunks/{main-hh3j5g4q.js → main-hs8nmem1.js} +3 -3
  28. package/dist/ui/studio-chunks/{main-hh3j5g4q.js.map → main-hs8nmem1.js.map} +1 -1
  29. package/dist/ui/studio-chunks/{main-vrwbfymm.js → main-kxka12xa.js} +3 -3
  30. package/dist/ui/studio-chunks/{main-vrwbfymm.js.map → main-kxka12xa.js.map} +1 -1
  31. package/dist/ui/studio-chunks/{main-tkpyed1j.js → main-ng2cxbtc.js} +3 -3
  32. package/dist/ui/studio-chunks/{main-tkpyed1j.js.map → main-ng2cxbtc.js.map} +1 -1
  33. package/dist/ui/studio-chunks/{main-hvvbvp23.js → main-nwbffm7m.js} +5 -5
  34. package/dist/ui/studio-chunks/{main-hvvbvp23.js.map → main-nwbffm7m.js.map} +3 -3
  35. package/dist/ui/studio-chunks/{main-sqzwczh0.js → main-r7bq6k0q.js} +5 -5
  36. package/dist/ui/studio-chunks/{main-sqzwczh0.js.map → main-r7bq6k0q.js.map} +1 -1
  37. package/dist/ui/studio-chunks/{main-tx9z2mp6.js → main-va1zr8ta.js} +3 -3
  38. package/dist/ui/studio-chunks/{main-tx9z2mp6.js.map → main-va1zr8ta.js.map} +1 -1
  39. package/dist/ui/studio-chunks/{main-f23hf16n.js → main-ym8je7c8.js} +2 -2
  40. package/dist/ui/studio-chunks/{main-f23hf16n.js.map → main-ym8je7c8.js.map} +1 -1
  41. package/dist/ui/studio-chunks/{main-y7pws5a1.js → main-zc2h2y1a.js} +3 -3
  42. package/dist/ui/studio-chunks/{main-y7pws5a1.js.map → main-zc2h2y1a.js.map} +1 -1
  43. package/dist/ui/studio-chunks/mermaid-GHXKKRXX-3mmza8xz.js +3 -0
  44. package/dist/ui/studio-chunks/mermaid-GHXKKRXX-3mmza8xz.js.map +9 -0
  45. package/dist/ui/studio-chunks/{studio-ask-panel-p95n2qz2.js → studio-ask-panel-mp92e03r.js} +2 -2
  46. package/dist/ui/studio-chunks/{studio-ask-panel-p95n2qz2.js.map → studio-ask-panel-mp92e03r.js.map} +1 -1
  47. package/dist/ui/studio-chunks/{studio-chat-workspace-w7xdx7vk.js → studio-chat-workspace-5fnvn5cz.js} +2 -2
  48. package/dist/ui/studio-chunks/{studio-chat-workspace-w7xdx7vk.js.map → studio-chat-workspace-5fnvn5cz.js.map} +1 -1
  49. package/package.json +1 -1
  50. package/dist/ui/studio-chunks/mermaid-GHXKKRXX-s83c98zh.js +0 -3
  51. package/dist/ui/studio-chunks/mermaid-GHXKKRXX-s83c98zh.js.map +0 -9
  52. /package/dist/chunks/{app-2vbdnh88.js.map → app-5j3q0yxz.js.map} +0 -0
  53. /package/dist/chunks/{index-dpd5c2f7.js.map → index-xhfjbg2j.js.map} +0 -0
@@ -1,4 +1,4 @@
1
- import{Ae as Me,Be as ct,Ce as al,De as es,Ee as gz,Fe as yz,Ge as r,He as db,Le as Vl,Oe as th,Pe as _D,Re as Ec,Se as Cc,Te as Ac,Ue as Hi,Ve as qs,We as Pc,Xe as Ns,Ye as Ve,ge as mz,he as Wv,ie as Yo,je as qz,ke as N,le as Lz,me as jp,ne as Je,oe as rt,pe as Xo,qe as hz,re as lt,se as Ie,te as le,ue as ut,ve as it,we as aa,xe as no,ye as tt,ze as ht}from"./main-hh3j5g4q.js";import{Sf as pt,Tf as Rn,Uf as hh,ng as mk,vg as fk,xg as hk}from"./main-tkpyed1j.js";import{Ag as fh,Bg as yr,Cg as Cd,Dg as nL,yg as Ye,zg as At}from"./main-p346vmdb.js";var wo=fh(function(k2){var vo=Ye(pt());(function(){function e(o){if(o==null)return null;if(typeof o==="function")return o.$$typeof===W?null:o.displayName||o.name||null;if(typeof o==="string")return o;switch(o){case A:return"Fragment";case M:return"Profiler";case P:return"StrictMode";case B:return"Suspense";case F:return"SuspenseList";case pe:return"Activity"}if(typeof o==="object")switch(typeof o.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),o.$$typeof){case E:return"Portal";case _:return o.displayName||"Context";case z:return(o._context.displayName||"Context")+".Consumer";case j:var y=o.render;return o=o.displayName,o||(o=y.displayName||y.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case ne:return y=o.displayName||null,y!==null?y:e(o.type)||"Memo";case ge:y=o._payload,o=o._init;try{return e(o(y))}catch(I){}}return null}function t(o){return""+o}function n(o){try{t(o);var y=!1}catch(O){y=!0}if(y){y=console;var I=y.error,C=typeof Symbol==="function"&&Symbol.toStringTag&&o[Symbol.toStringTag]||o.constructor.name||"Object";return I.call(y,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",C),t(o)}}function s(o){if(o===A)return"<>";if(typeof o==="object"&&o!==null&&o.$$typeof===ge)return"<...>";try{var y=e(o);return y?"<"+y+">":"<...>"}catch(I){return"<...>"}}function c(){var o=re.A;return o===null?null:o.getOwner()}function d(){return Error("react-stack-top-frame")}function a(o){if(i.call(o,"key")){var y=Object.getOwnPropertyDescriptor(o,"key").get;if(y&&y.isReactWarning)return!1}return o.key!==void 0}function h(o,y){function I(){l||(l=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",y))}I.isReactWarning=!0,Object.defineProperty(o,"key",{get:I,configurable:!0})}function R(){var o=e(this.type);return p[o]||(p[o]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),o=this.props.ref,o!==void 0?o:null}function b(o,y,I,C,O,q){var Z=I.ref;return o={$$typeof:x,type:o,key:y,props:I,_owner:C},(Z!==void 0?Z:null)!==null?Object.defineProperty(o,"ref",{enumerable:!1,get:R}):Object.defineProperty(o,"ref",{enumerable:!1,value:null}),o._store={},Object.defineProperty(o._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(o,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(o,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:O}),Object.defineProperty(o,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:q}),Object.freeze&&(Object.freeze(o.props),Object.freeze(o)),o}function S(o,y,I,C,O,q){var Z=y.children;if(Z!==void 0)if(C)if(u(Z)){for(C=0;C<Z.length;C++)m(Z[C]);Object.freeze&&Object.freeze(Z)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else m(Z);if(i.call(y,"key")){Z=e(o);var Q=Object.keys(y).filter(function(de){return de!=="key"});C=0<Q.length?"{key: someKey, "+Q.join(": ..., ")+": ...}":"{key: someKey}",g[Z+C]||(Q=0<Q.length?"{"+Q.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
1
+ import{Ae as tt,Be as ht,Ce as Me,De as ct,Ee as al,Fe as es,Ge as gz,He as yz,Ie as r,Je as db,Ne as Vl,Qe as th,Re as _D,Te as Ec,Ue as Cc,Ve as Ac,We as Hi,Xe as qs,Ye as Pc,Ze as Ns,_e as Ve,ie as mz,je as Wv,ke as Yo,le as qz,me as N,ne as Lz,oe as jp,pe as Je,qe as rt,re as Xo,se as hz,te as lt,ue as Ie,ve as le,we as ut,xe as it,ye as aa,ze as no}from"./main-hs8nmem1.js";import{Uf as pt,Vf as Rn,Wf as hh,pg as mk,xg as fk,zg as hk}from"./main-ng2cxbtc.js";import{Ag as Ye,Bg as At,Cg as fh,Dg as yr,Eg as Cd,Fg as nL}from"./main-dep9qqw1.js";var wo=fh(function(k2){var vo=Ye(pt());(function(){function e(o){if(o==null)return null;if(typeof o==="function")return o.$$typeof===W?null:o.displayName||o.name||null;if(typeof o==="string")return o;switch(o){case A:return"Fragment";case M:return"Profiler";case P:return"StrictMode";case B:return"Suspense";case F:return"SuspenseList";case pe:return"Activity"}if(typeof o==="object")switch(typeof o.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),o.$$typeof){case E:return"Portal";case _:return o.displayName||"Context";case z:return(o._context.displayName||"Context")+".Consumer";case j:var y=o.render;return o=o.displayName,o||(o=y.displayName||y.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case ne:return y=o.displayName||null,y!==null?y:e(o.type)||"Memo";case ge:y=o._payload,o=o._init;try{return e(o(y))}catch(I){}}return null}function t(o){return""+o}function n(o){try{t(o);var y=!1}catch(O){y=!0}if(y){y=console;var I=y.error,C=typeof Symbol==="function"&&Symbol.toStringTag&&o[Symbol.toStringTag]||o.constructor.name||"Object";return I.call(y,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",C),t(o)}}function s(o){if(o===A)return"<>";if(typeof o==="object"&&o!==null&&o.$$typeof===ge)return"<...>";try{var y=e(o);return y?"<"+y+">":"<...>"}catch(I){return"<...>"}}function c(){var o=re.A;return o===null?null:o.getOwner()}function d(){return Error("react-stack-top-frame")}function a(o){if(i.call(o,"key")){var y=Object.getOwnPropertyDescriptor(o,"key").get;if(y&&y.isReactWarning)return!1}return o.key!==void 0}function h(o,y){function I(){l||(l=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",y))}I.isReactWarning=!0,Object.defineProperty(o,"key",{get:I,configurable:!0})}function R(){var o=e(this.type);return p[o]||(p[o]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),o=this.props.ref,o!==void 0?o:null}function b(o,y,I,C,O,q){var Z=I.ref;return o={$$typeof:x,type:o,key:y,props:I,_owner:C},(Z!==void 0?Z:null)!==null?Object.defineProperty(o,"ref",{enumerable:!1,get:R}):Object.defineProperty(o,"ref",{enumerable:!1,value:null}),o._store={},Object.defineProperty(o._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(o,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(o,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:O}),Object.defineProperty(o,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:q}),Object.freeze&&(Object.freeze(o.props),Object.freeze(o)),o}function S(o,y,I,C,O,q){var Z=y.children;if(Z!==void 0)if(C)if(u(Z)){for(C=0;C<Z.length;C++)m(Z[C]);Object.freeze&&Object.freeze(Z)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else m(Z);if(i.call(y,"key")){Z=e(o);var Q=Object.keys(y).filter(function(de){return de!=="key"});C=0<Q.length?"{key: someKey, "+Q.join(": ..., ")+": ...}":"{key: someKey}",g[Z+C]||(Q=0<Q.length?"{"+Q.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
2
2
  let props = %s;
3
3
  <%s {...props} />
4
4
  React keys must be passed directly to JSX without using spread:
@@ -139,6 +139,6 @@ ${S.message}`)}if(b){s.push(...a.actions),c=a;break}}return c?[c]:void 0}get eve
139
139
  `).filter((t)=>t.trim()!=="").map((t)=>{let n=WY.exec(t.trim());if(!n)return{line:t};let[,s="",c="",d=""]=n,a=s.replace(/\\([\\[\]])/gu,"$1");return{platform:d,url:c,...a!==d&&{label:a}}})}var Ma=(e,t)=>({key:e,label:t,type:"string"}),VY=r.object({description:r.string().optional(),intro:r.string().optional(),purpose:r.string().optional(),mission:r.string().optional(),currentFocus:r.string().optional(),availability:r.string().optional(),workingPrinciples:r.array(r.string()).optional(),socialLinks:r.array(p2).optional()}),SYe=new Ur(VY,{title:"",layout:"compact",mappings:[Ma("description","Description"),Ma("intro","Intro"),Ma("purpose","Purpose"),Ma("mission","Mission"),Ma("currentFocus","Current focus"),Ma("availability","Availability"),{key:"workingPrinciples",label:"Working principles",type:"array",itemType:"string"},{key:"socialLinks",label:"Links",type:"custom",formatter:GY,parser:JY}]});var f2=mr.extend({id:r.literal("anchor-profile"),entityType:r.literal("anchor-profile")}),m2=r.enum(["person","team","organization"]),mu=r.object({name:r.string().describe("Name of the anchor"),organization:r.string().optional().describe("Organization the anchor belongs to"),description:r.string().optional().describe("Short description or biography"),avatar:r.string().optional().describe("URL or asset path to avatar/logo"),photo:r.string().optional().describe("A photo of the people behind the anchor, as ![alt](entity://image/<id>)"),website:r.string().optional().describe("Primary website URL"),email:r.string().optional().describe("Contact email"),socialLinks:r.array($o).optional().describe("Social media and contact links")});var zYe=r.record(r.string(),r.unknown());var ch=r.enum(["person","team","organization"]),BYe=r.object({kind:r.string().trim().min(1),category:ch,labels:r.object({singular:r.string().trim().min(1),plural:r.string().trim().min(1)})});var HYe=r.record(r.string(),r.unknown());var h2=r.looseObject({id:r.string(),description:r.string(),name:r.string().optional(),tags:r.array(r.string()).optional().default([])}),tX=mu.extend({kind:r.string().trim().min(1).optional(),category:ch.optional()}).superRefine((e,t)=>{if(e.kind===void 0!==(e.category===void 0))t.addIssue({code:"custom",message:"Anchor kind and category must be provided together"})}),nX=r.looseObject({uri:r.string(),params:r.record(r.string(),r.unknown()).optional()}),rX=r.looseObject({name:r.string(),url:r.string(),description:r.string().optional(),skills:r.array(h2).optional().default([]),capabilities:r.looseObject({extensions:r.array(nX).optional().default([])}).optional()});var aw=r.object({name:r.string(),description:r.string(),tags:r.array(r.string())}),g2=r.object({about:r.string().default(""),skills:r.array(aw).default([]),notes:r.string().default("")}),oX=/^- (.+?): (.+?)(?:\s+\[(.+?)\])?$/;function sX(e){let t=r.array(aw).safeParse(e);if(!t.success)return"";return t.data.map((n)=>{let s=n.tags.length>0?` [${n.tags.join(", ")}]`:"";return`- ${n.name}: ${n.description}${s}`}).join(`
140
140
  `)}function aX(e){return e.split(`
141
141
  `).flatMap((t)=>{let n=t.match(oX);if(!n)return[];let s=(n[3]??"").split(",").map((c)=>c.trim()).filter(Boolean);return[{name:n[1]??"",description:n[2]??"",tags:s}]})}var hXe=new Ur(g2,{title:"Agent",mappings:[{key:"about",label:"About",type:"string"},{key:"skills",label:"Skills",type:"custom",formatter:sX,parser:aX},{key:"notes",label:"Notes",type:"string"}]});Os();var BX=r.object({value:Ho.nullable().default(null),type:r.string().max(100).default(""),q:Ys.trim().default(""),sort:Ks.default("updated-desc"),offset:r.coerce.number().int().min(0).max(Number.MAX_SAFE_INTEGER).default(0),limit:r.coerce.number().int().min(1).max(Wo).default(Qs)}),y2=BX;var b2=Xs.pick({grouping:!0,values:!0});var S2=25;var lw=r.object({prefix:r.tuple([r.string()],r.string()).nullable().default(null),scope:r.enum(["folder","collection"]).default("folder"),q:r.string().trim().max(200).default(""),visibility:r.enum(["all","public","shared","restricted"]).default("all"),status:r.string().trim().max(100).default(""),sort:r.enum(["updated-desc","updated-asc","created-desc","created-asc"]).default("updated-desc"),offset:r.coerce.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER).default(0),limit:r.coerce.number().int().min(1).max(100).default(S2)});function Zrt(e){let t=e.get("prefix"),n=null;if(t!==null)try{n=JSON.parse(t)}catch{n=t}return{prefix:n,scope:e.get("scope")??void 0,q:e.get("q")??void 0,visibility:e.get("visibility")??void 0,status:e.get("status")??void 0,sort:e.get("sort")??void 0,offset:e.get("offset")??void 0,limit:e.get("limit")??void 0}}var v2=r.strictObject({label:r.string().min(1).max(60),href:r.string().min(1).max(1000)}),qX=r.strictObject({id:r.string().min(1).max(300),title:r.string().min(1).max(200),detail:r.string().max(500).optional(),severity:r.enum(["error","warn","info"]),source:r.string().min(1).max(100),action:v2.optional()}),w2={id:r.string().min(1),entityType:r.string().min(1),typeLabel:r.string().min(1),title:r.string().min(1),href:r.string().min(1)},LX=r.strictObject({...w2,updated:r.iso.datetime()}),$X=r.strictObject({...w2,publishedAt:r.iso.datetime()}),FX=r.strictObject({now:r.iso.datetime(),needsYou:r.array(qX).max(50),drafts:r.array(LX).max(10),published:r.array($X).max(10),status:r.strictObject({tone:r.enum(["good","warn","error"]),text:r.string().min(1).max(200),history:v2})});function R2(e){return FX.parse(e)}class T2 extends Error{status;issues;code;retryAfterMs;conflictId;constructor(e,t,n=[],s={}){super(t);this.status=e,this.issues=n,this.code=s.code,this.retryAfterMs=s.retryAfterMs,this.conflictId=s.conflictId}}function ZX(e,t){return`${t==="/"?"":t.replace(/\/+$/,"")}/api/${e.replace(/^\/+/,"")}`}function UX(e){if(typeof e!=="object"||e===null)return{error:void 0,issues:[],code:void 0,conflictId:void 0};let t="error"in e&&typeof e.error==="string"?e.error:void 0,n="issues"in e&&Array.isArray(e.issues)?e.issues.filter((s)=>typeof s==="object"&&s!==null&&("message"in s)&&typeof s.message==="string"):[];return{error:t,issues:n,code:"code"in e&&typeof e.code==="string"?e.code:void 0,conflictId:"conflictId"in e&&typeof e.conflictId==="string"?e.conflictId:void 0}}var WX=(e,t)=>fetch(e,t);class uw{basePath;fetch;constructor(e){this.basePath=e.basePath,this.fetch=e.fetch??WX}path(e){return ZX(e,this.basePath)}async request(e,t){let n=await this.fetch(e,t);if(n.ok)return n;let s=UX(await n.json().catch(()=>{return}));throw new T2(n.status,s.error??n.statusText,s.issues,{code:s.code,conflictId:s.conflictId,retryAfterMs:n.headers.has("Retry-After")?Number(n.headers.get("Retry-After"))*1000:void 0})}async requestJson(e,t){return(await this.request(e,t)).json().catch(()=>{return})}async fetchNavigation(){let e=await this.requestJson(this.path("types"));return{types:e.types,workspaces:e.workspaces??[],groupings:e.groupings??[]}}async fetchGrouping(e,t,n){let s=y2.parse(t),c=new URLSearchParams({grouping:e,offset:String(s.offset),limit:String(s.limit)});if(s.type)c.set("type",s.type);if(s.value===null){let a=await this.requestJson(this.path(`groups/catalog?${c}`),{signal:n});return{kind:"catalog",values:a.values,total:a.total,grouping:a.grouping}}c.set("value",s.value),c.set("q",s.q),c.set("sort",s.sort);let d=await this.requestJson(this.path(`groups/members?${c}`),{signal:n});return{kind:"members",entities:d.entities,total:d.total,grouping:d.grouping}}async fetchGroupingUsage(e,t,n){n.throwIfAborted();let s=b2.parse({grouping:e,values:t}),c=new URLSearchParams({grouping:s.grouping});for(let d of s.values)c.append("value",d);return this.requestJson(this.path(`groups/usage?${c}`),{signal:n})}async fetchTypes(){return(await this.fetchNavigation()).types}async fetchWorkspace(e,t={}){let n=new URLSearchParams({id:e});for(let[c,d]of Object.entries(t))if(d!==void 0)n.set(c,String(d));let{workspace:s}=await this.requestJson(this.path(`workspace?${n.toString()}`));return s}async runWorkspaceAction(e,t){let{result:n}=await this.requestJson(this.path("workspace"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e,action:t})});return n}async fetchSchema(e,t){let n=t?`&id=${encodeURIComponent(t)}`:"";return this.requestJson(this.path(`schema?type=${encodeURIComponent(e)}${n}`))}async fetchEntities(e,t=lw.parse({})){let n=lw.parse(t),s=new URLSearchParams({type:e,offset:String(n.offset),limit:String(n.limit)});if(n.prefix)s.set("prefix",JSON.stringify(n.prefix));if(n.scope!=="folder")s.set("scope",n.scope);if(n.q)s.set("q",n.q);if(n.visibility!=="all")s.set("visibility",n.visibility);if(n.status)s.set("status",n.status);if(n.sort!=="updated-desc")s.set("sort",n.sort);return this.requestJson(this.path(`hierarchy?${s.toString()}`))}async fetchImagePreview(e,t,n){return(await this.request(this.path(`images?id=${encodeURIComponent(e)}${n?`&width=${n}`:""}`),{signal:t})).blob()}async fetchImageLibrary(e){return this.requestJson(this.path(`image-library?offset=${e.offset}&limit=${e.limit}`))}async fetchImageDetails(e){return this.requestJson(this.path(`image-details?id=${encodeURIComponent(e)}`))}async saveImageDetails(e){return this.requestJson(this.path("image-details"),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async fetchDocumentLibrary(e){return this.requestJson(this.path(`document-library?offset=${e.offset}&limit=${e.limit}`))}async fetchDocumentDetails(e){return this.requestJson(this.path(`document-details?id=${encodeURIComponent(e)}`))}async saveDocumentDetails(e){return this.requestJson(this.path("document-details"),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async fetchDocumentFile(e,t){return(await this.request(this.path(`document?id=${encodeURIComponent(e)}`),{signal:t})).blob()}documentDownloadPath(e){return this.path(`document?id=${encodeURIComponent(e)}&download=1`)}async fetchEntity(e,t){let{entity:n}=await this.requestJson(this.path(`entities?type=${encodeURIComponent(e)}&id=${encodeURIComponent(t)}`));return n}async fetchHome(){return R2(await this.requestJson(this.path("home")))}async fetchCollectionMembers(e,t){return this.requestJson(this.path(`collection-members?type=${encodeURIComponent(e)}&id=${encodeURIComponent(t)}`))}async resolveConflict(e,t){await this.requestJson(this.path("conflicts"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({conflictId:e,action:t})})}async updateEntity(e){return this.requestJson(this.path("entities"),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async saveTranslation(e){return this.requestJson(this.path("translations"),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async tryForm(e,t){return Gd.parse(await this.requestJson(this.path("form-trial"),{...t&&{signal:t},method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}))}async previewDestination(e,t){return this.requestJson(this.path("destination"),{...t&&{signal:t},method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async createEntity(e){return this.requestJson(this.path("entities"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async uploadFile(e){let t=new FormData;return t.set("file",e),this.requestJson(this.path("upload"),{method:"POST",body:t})}async requestFieldAssist(e){return this.requestJson(this.path("assist"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async fetchAgentTargets(e,t){let{agents:n}=await this.requestJson(this.path(`agents?type=${encodeURIComponent(e)}&id=${encodeURIComponent(t)}`));return n}async requestAgentAnswer(e){return this.requestJson(this.path("ask-agent"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async fetchMembers(){let{members:e}=await this.requestJson(this.path("members"));return e}async fetchPalette(e){return pI.parse(await this.requestJson(this.path(`palette?q=${encodeURIComponent(e.trim())}`)))}async fetchSyncStatus(){return this.requestJson(this.path("sync-status"))}async refine(e){return this.requestJson(this.path("refine"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async deleteEntity(e,t){return this.requestJson(this.path(`entities?type=${encodeURIComponent(e)}&id=${encodeURIComponent(t)}`),{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({confirmed:!0})})}}var dh=Ye(pt(),1);var E2=Ye(wo(),1),x2=dh.createContext(new uw({basePath:"/studio"}));function eit(e){return E2.jsxDEV(x2.Provider,{value:e.api,children:e.children},void 0,!1,void 0,this)}function tit(){return dh.useContext(x2)}var rit={status:{k1xSpc:"x3nfvp2",kGNEyG:"x1pha0wt",kwnvtZ:"x1a02dak",kOIVth:"x17d4w8g",kMv6JI:"x5ddh9m",kGuDYH:"xfifm61",kMwMTN:"x1ar3pfp",$$css:!0},listingRow:{kumcoG:"x770nye",k1JLwA:"x1uf5sbp",$$css:!0},publication:{k1xSpc:"x1lliihq",keoZOQ:"x1gslohp",kMv6JI:"x5ddh9m",kGuDYH:"x1j6dyjg",k63SB2:"xo1l8bm",kMwMTN:"x1ar3pfp",kP9fke:"xn80e1m",kb6lSQ:"x12oo3zp",$$css:!0},propertiesHead:{k1xSpc:"x78zum5",kGNEyG:"x1pha0wt",kjj79g:"x1qughib",k1K539:"x1fqp7bg",kGO01o:"x18d9i69",kHdLCk:"xkaaz9w",$$css:!0},propertiesLabel:{kMwMTN:"x1ar3pfp",kogj98:"x1ghz6dp",$$css:!0},pipeline:{"--console-bg":"xw1b0li","--console-frame":"x1in81u4",kWkggS:"x18s3upu",kMwMTN:"x1ar3pfp",kEafiO:"x178xt8z",kPef9Z:"x13fuv20",kLZC3w:"xvg7k2t",kAzted:"x1gg8mnh",$$css:!0}};function iit(e,...t){return`${e} ${Ni(...t).className??""}`}function za(e){let t=e.startsWith("/")?e:`/${e}`;return t==="/"?"":t.replace(/\/+$/,"")}function C2(e,t){return`${za(e)}/entities/${encodeURIComponent(t)}`}function sit(e,t){return`${za(e)}/groups/${encodeURIComponent(t)}`}function ait(e){return`${za(e)}/images`}function cit(e,t){let n=`${za(e)}/documents`;return t===void 0?n:`${n}?id=${encodeURIComponent(t)}`}function lit(e,t,n){return`${C2(e,t)}/${encodeURIComponent(n)}`}function uit(e,t,n){let s=new URL(C2(e,t),"https://brains.invalid");if(s.searchParams.set("mode","create"),n!==void 0)s.searchParams.set("starter",n);return`${s.pathname}${s.search}`}function dit(e,t){return`${za(e)}/workspaces/${encodeURIComponent(t)}`}function pit(e,t){let n=za(t);if(e===(n||"/"))return{kind:"home"};let c=n===""?"":n;if(c!==""&&!e.startsWith(`${c}/`))return{kind:"not-found",pathname:e};let d=e.slice(c.length);try{if(d==="/images")return{kind:"images"};if(d==="/documents")return{kind:"documents"};let a=/^\/groups\/([^/]+)$/.exec(d);if(a?.[1])return{kind:"grouping",grouping:decodeURIComponent(a[1])};let h=/^\/entities\/([^/]+)$/.exec(d);if(h?.[1])return{kind:"collection",entityType:decodeURIComponent(h[1])};let R=/^\/entities\/([^/]+)\/(.+)$/.exec(d);if(R?.[1]&&R[2]&&!d.endsWith("/"))return{kind:"entity",entityType:decodeURIComponent(R[1]),id:decodeURIComponent(R[2])};let b=/^\/workspaces\/([^/]+)$/.exec(d);if(b?.[1])return{kind:"workspace",workspaceId:decodeURIComponent(b[1])}}catch{}return{kind:"not-found",pathname:e}}var mit={secondaryDisplay:{kMv6JI:"xssy22x",ka26j:"xkhxzli",kGuDYH:"x1pvqxga",k63SB2:"xk50ysn",kLWn49:"x1u7k74",kb6lSQ:"x72az59",$$css:!0},section:{kMv6JI:"x5ddh9m",kGuDYH:"xif65rj",k63SB2:"x19s9jnd",$$css:!0},operatorRoles:{kMv6JI:"x5ddh9m","--operator-secondary-size":"x7292j8","--operator-secondary-weight":"xr8gae7","--operator-secondary-leading":"xd7rbps","--operator-secondary-tracking":"xvkmti0","--operator-section-family":"x87j1sr","--operator-section-size":"x1l9053m","--operator-section-weight":"x6r9d2h","--operator-eyebrow-size":"x14kal1k","--operator-eyebrow-weight":"x5utkz1","--operator-eyebrow-tracking":"x1lzmy7e",$$css:!0},eyebrow:{kMv6JI:"xa9opjo",kGuDYH:"x1k6wstc",k63SB2:"x1s688f",kb6lSQ:"x7447wj",kP9fke:"xtvhhri",$$css:!0}};
142
- export{Ni as Mc,Yr as Nc,zx as Oc,wo as Pc,AB as Qc,oc as Rc,PB as Sc,IB as Tc,kB as Uc,MB as Vc,Gx as Wc,Qx as Xc,Yx as Yc,Xx as Zc,_B as _c,NB as $c,BB as ad,qB as bd,LB as cd,$B as dd,FB as ed,ZB as fd,UB as gd,WB as hd,HB as id,GB as jd,JB as kd,VB as ld,QB as md,XB as nd,tq as od,Tp as pd,gCe as qd,bk as rd,h7 as sd,yCe as td,rit as ud,iit as vd,Er as wd,n4 as xd,mt as yd,nq as zd,rq as Ad,iq as Bd,lq as Cd,uq as Dd,dq as Ed,vn as Fd,mp as Gd,Wo as Hd,hp as Id,a7 as Jd,Kxe as Kd,ND as Ld,BD as Md,qD as Nd,i2 as Od,o2 as Pd,y2 as Qd,za as Rd,C2 as Sd,sit as Td,ait as Ud,cit as Vd,lit as Wd,uit as Xd,dit as Yd,pit as Zd,S2 as _d,lw as $d,Zrt as ae,T2 as be,uw as ce,eit as de,tit as ee,mit as fe};
142
+ export{Ni as Oc,Yr as Pc,zx as Qc,wo as Rc,AB as Sc,oc as Tc,PB as Uc,IB as Vc,kB as Wc,MB as Xc,Gx as Yc,Qx as Zc,Yx as _c,Xx as $c,_B as ad,NB as bd,BB as cd,qB as dd,LB as ed,$B as fd,FB as gd,ZB as hd,UB as id,WB as jd,HB as kd,GB as ld,JB as md,VB as nd,QB as od,XB as pd,tq as qd,Tp as rd,gCe as sd,bk as td,h7 as ud,yCe as vd,rit as wd,iit as xd,Er as yd,n4 as zd,mt as Ad,nq as Bd,rq as Cd,iq as Dd,lq as Ed,uq as Fd,dq as Gd,vn as Hd,mp as Id,Wo as Jd,hp as Kd,a7 as Ld,Kxe as Md,ND as Nd,BD as Od,qD as Pd,i2 as Qd,o2 as Rd,y2 as Sd,za as Td,C2 as Ud,sit as Vd,ait as Wd,cit as Xd,lit as Yd,uit as Zd,dit as _d,pit as $d,S2 as ae,lw as be,Zrt as ce,T2 as de,uw as ee,eit as fe,tit as ge,mit as he};
143
143
 
144
- //# debugId=33D17994D310DB5864756E2164756E21
144
+ //# debugId=52173881854BA2FB64756E2164756E21