@schlenkr/ragents 0.1.13 → 0.1.14
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/apps/server/src/provider.ts +8 -2
- package/apps/server/src/title-compactor.ts +1 -1
- package/apps/web/dist/assets/{highlighted-body-KPVGNVTW-CpPi6QLr.js → highlighted-body-KPVGNVTW-BslIwn_y.js} +1 -1
- package/apps/web/dist/assets/main-BUN8m8SW.js +11 -0
- package/apps/web/dist/assets/{mermaid-HWGCJPDP-q-mf1kLN.js → mermaid-HWGCJPDP-B1erZlFM.js} +4 -4
- package/apps/web/dist/assets/{runPanel-nk_aMxSn.js → runPanel-s8gGpr9M.js} +1 -1
- package/apps/web/dist/help/mini-app.css +9 -0
- package/apps/web/dist/host-web.json +7 -7
- package/apps/web/dist/index.html +2 -2
- package/apps/web/dist/run-panel.html +2 -2
- package/apps/web/src/App.tsx +12 -1
- package/apps/web/src/PluginRegistry.tsx +2 -2
- package/apps/web/src/SessionList.tsx +7 -6
- package/apps/web/src/SettingsModal.tsx +3 -3
- package/apps/web/src/actor-programs/client-ui/FilePicker.tsx +1 -1
- package/apps/web/src/api.ts +2 -0
- package/apps/web/src/run-overview.ts +1 -1
- package/apps/web/src/ui/relative-time.ts +1 -1
- package/bundles/ragents.documents/ragents-bundle.json +2 -2
- package/bundles/ragents.documents/web/classes.json +1 -1
- package/bundles/ragents.documents/web/index.js +1 -1
- package/bundles/ragents.documents/web/index.js.map +2 -2
- package/bundles/ragents.orchestration/ragents-bundle.json +2 -2
- package/bundles/ragents.orchestration/web/index.js +3 -3
- package/bundles/ragents.orchestration/web/index.js.map +2 -2
- package/bundles/ragents.overseer/ragents-bundle.json +4 -3
- package/bundles/ragents.overseer/web/classes.json +1 -1
- package/bundles/ragents.overseer/web/index.js +1 -1
- package/bundles/ragents.overseer/web/index.js.map +4 -4
- package/bundles/ragents.processes/ragents-bundle.json +2 -2
- package/bundles/ragents.processes/web/classes.json +1 -1
- package/bundles/ragents.processes/web/index.js +1 -1
- package/bundles/ragents.processes/web/index.js.map +2 -2
- package/bundles/ragents.workspace/ragents-bundle.json +2 -2
- package/bundles/ragents.workspace/web/classes.json +1 -1
- package/bundles/ragents.workspace/web/index.js +1 -1
- package/bundles/ragents.workspace/web/index.js.map +2 -2
- package/package.json +2 -2
- package/plugins/ragents.documents/web/DocumentViewer.tsx +2 -2
- package/plugins/ragents.orchestration/web/ExecutionsPanel.tsx +1 -1
- package/plugins/ragents.orchestration/web/FlowInspector.tsx +1 -1
- package/plugins/ragents.orchestration/web/JournalStatus.tsx +1 -1
- package/plugins/ragents.orchestration/web/format.ts +1 -1
- package/plugins/ragents.overseer/web/index.tsx +51 -3
- package/plugins/ragents.processes/web/processes.ts +1 -1
- package/plugins/ragents.workspace/web/FileBrowser.tsx +1 -1
- package/apps/web/dist/assets/main-DJmCHGzM.js +0 -11
|
@@ -104,7 +104,8 @@
|
|
|
104
104
|
],
|
|
105
105
|
"quassel": [
|
|
106
106
|
"ChatInputToolbar",
|
|
107
|
-
"ChatMessages"
|
|
107
|
+
"ChatMessages",
|
|
108
|
+
"ChatPanel"
|
|
108
109
|
],
|
|
109
110
|
"react": [
|
|
110
111
|
"createContext",
|
|
@@ -128,8 +129,8 @@
|
|
|
128
129
|
]
|
|
129
130
|
}
|
|
130
131
|
},
|
|
131
|
-
"revision": "
|
|
132
|
-
"sourceRevision": "
|
|
132
|
+
"revision": "58b8b02a346c4323afdef69cfd96b8f3717806919f2c46f146bcc803ef12bac4",
|
|
133
|
+
"sourceRevision": "c4f7e8a0e5e78a2c4434965b30224dab58aa2a7ffad8ebb9b0857d0ffb9f2813",
|
|
133
134
|
"server": "server/index.js",
|
|
134
135
|
"web": {
|
|
135
136
|
"entry": "web/index.js",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
["--anchor-width","--available-height","--available-width","--card","--primary","[overflow-wrap:anywhere]","a","about","accepted","access","action","actions","activated","active","activeElement","actorId","actors","actually","additionalProperties","after","agents","alert","align","all","allowed","an","anchor","and","announce","answer","answers","api","appear","applies","are","aria-atomic","aria-busy","aria-label","aria-live","artifacts","as","async","attachments","available","await","bar","be","belowHeader","bg-[color-mix(in_srgb,var(--primary)_4%,var(--card))]","border-b","border-border","border-border-soft","border-r","border-t-2","border-t-primary","bottom","boundary","bounds","by","caller","cancelReset","catch","category","causationId","cause","channels","chat","chat-steps","chatView","choice","className","clearConversation","client","collisionPadding","commandId","commonStart","compact","complete","composer","composerError","configured","confirm","confirmed","confirms","connected","connectionNote","const","context","contextElement","conversation","conversation-reset","conversationId","coordinator","coordinators","correlationId","create","createInput","createRun","createdAt","current","data-open","data-open:bg-accent","data-slot","data-tone","default","defineOperation","deliberately","description","destructive","detailMode","detailsContainer","dialogContainer","directly","disabled","dismiss","documented","does","domain","domainObject","draft","dropdown","each","editable","element","else","empty","empty:hidden","emptyState","entries","error","errorClass","escape-key","event","eventId","eventSchema","eventType","events","exact","exactly","existing","export","extends","failed","failure","false","fields","filters","finalFocus","finally","finished","flex","flex-1","flex-[0_1_570px]","flex-[0_1_auto]","flex-col","flex-none","flex-nowrap","flex-row","flex-wrap","font-bold","font-normal","font-semibold","for","forkedFrom","form","from","function","gap-0","gap-1","gap-1.5","gap-2","gap-2.5","getBoundingClientRect","ghost","global","grid","grouped","h-auto","h-header","handleRef","has","hasMore","have","header","height","history","icon-sm","id","identityFields","if","import","in","including","initialFocus","initialized","input","inputAriaControls","inputs","inserts","inspect","installed","instanceof","interface","interruptActorTurn","interruptCoordinator","is","it","items","items-center","items-start","its","journal","json","jsonObject","justify-end","justify-start","keep","keepMounted","key","kind","knows","label","layout","leading-[1.45]","leading-[1.6]","length","let","level","limit","listRuns","listener","listeners","load","loading","local","long","longer","lucide-react","m-auto","max-md:[&>span]:hidden","max-md:data-open:grow","max-md:flex-[0_1_210px]","max-md:gap-1","max-md:min-w-[130px]","max-md:p-5","max-md:px-1","max-w-[480px]","max-w-[720px]","max-w-[calc(100vw-16px)]","max-w-[min(320px,100%)]","maxLength","maxRows","maximum","message","messages","metadata","methods","min-h-0","min-h-16!","min-w-0","min-w-[190px]","minLength","minimum","missing","ml-auto","modal","model","modelOptions","modelSelection","modelSettingsStore","modelState","models","modes","mt-1","mt-2","must","mx-4","my-2","name","neither","nested","new","next","nextAfter","no","nor","normal","not","noteClass","notice","null","object","occurredAt","of","on","onBackdropClick","onBusy","onClick","onErrorChange","onEvent","onFocus","onKeyDown","onOpenChange","onSend","onStop","onValueChange","one","ongoing","only","open","options","or","order","other","outline","outside-press","overflow-hidden","overseer","overseer-details","overseer-dropdown","overseer-toolbar","overseerChatDisplayPolicy","overseerChatStorageKeyPrefix","overseerContracts","overseerPermissions","overviewPanels","own","ownerId","p-0","p-1.5","p-8","package","packageDirectory","packages","page","panelOpen","part","path","pattern","payload","pending","per","perform","placeholder","placement","plugin","pluginId","pluginStates","policy","polite","position","presentation","primary","primaryActorId","problem","processing","properties","provide","provider","publish","px-2","px-2.5","py-1","py-2","quassel","quassel/events","question","quick","quick-answer","quickAnswers","react","read","readCatalog","readEvents","readOpenRpc","readReference","readRight","readRun","readable","ready","reason","reasoning","ref","reference","region","registered","rejected","replaced","replay-end","replaySequence","replaying","requestOpen","reset","resetObserved","resetPending","resetting","result","return","revision","rights","role","rounded-b-panel","rounded-full","rounded-lg","rounded-t-none","rows","rpc","rpcApi","run","runContracts","runId","runSummary","runViewFrom","running","runs","s","same","save","saving","schema","schemaVersion","scope","script","script/packageDirectory.","scripts","scrollerRef","seenSequence","selectable","selected","selection","selectionKey","selects","sendDisabled","sendMessage","sending","sequence","server","server-side","setActivated","setComposerError","setConfirmReset","setCoordinator","setDetailsContainer","setDialogContainer","setDropdown","setError","setQuickAnswer","setResetting","setScroller","settings","settingsResult","shell","showCloseButton","showTimestamps","side","signed-in","size","skill","sm","small","source","sr-only","stable","start","started","starts","state","state-replaced","status","steeringPlaceholder","stepsExpandable","stepsVisible","stop","stopRun","stopped","storageKeyPrefix","stored","string","style","subscribe","subscriptions","such","suppressFocus","target","task","tasks","templates","test","text","text-[0.73rem]","text-[0.76rem]","text-[0.7rem]","text-[0.8rem]","text-[0.9rem]","text-destructive","text-foreground","text-left","text-muted-foreground","texts","the","their","thinking","thinkingLabel","thinkingOptions","this","through","throw","title","to","toolbar","toolbarClass","toolbarLeft","toolbarRight","trap-focus","triggerClass","true","try","ts","turn","turns","type","typebox","typeof","unabridged","undefined","unique","until","updatedAt","use","useAccess","useAttachmentCapabilities","useChat","useChatViewSettings","useModelSettings","useRef","useState","user","users","validText","value","values","variant","via","viewSchema","void","wait","waits","webPlugin","whitespace-normal","whole","width","with","withToolSummaries","without","work","workshop","writable","write","x-source","x-typescript-type","yet","your"]
|
|
1
|
+
["--anchor-width","--available-height","--available-width","--card","--primary","--qsl-input-card-radius","--radius-lg","[--qsl-input-card-radius:var(--radius-lg)]","[overflow-wrap:anywhere]","a","about","accepted","access","action","actions","activated","active","activeElement","actorId","actors","actually","additionalProperties","after","agents","alert","align","all","allowed","an","anchor","and","announce","answer","answers","api","appear","applies","are","area","aria-atomic","aria-busy","aria-label","aria-live","artifacts","as","async","at","attachments","available","await","bar","be","belowHeader","bg-[color-mix(in_srgb,var(--primary)_4%,var(--card))]","border-b","border-border","border-border-soft","border-r","border-t-2","border-t-primary","bottom","boundary","bounds","by","caller","cancelReset","catch","category","causationId","cause","channels","chat","chat-steps","chatView","choice","className","clearConversation","client","collisionPadding","commandId","commonStart","compact","complete","composer","composerError","configured","confirm","confirmed","confirms","connected","connectionNote","const","context","contextElement","conversation","conversation-reset","conversationId","coordinator","coordinators","correlationId","create","createInput","createRun","createdAt","current","data-open","data-open:bg-accent","data-slot","data-tone","default","defineOperation","deliberately","description","destructive","detailMode","detailsContainer","dialogContainer","directly","disabled","dismiss","documented","does","domain","domainObject","draft","dropdown","each","editable","element","else","empty","empty:hidden","emptyState","entries","error","errorClass","escape-key","event","eventId","eventSchema","eventType","events","exact","exactly","existing","export","extends","failed","failure","false","fields","fills","filters","finalFocus","finally","finished","flex","flex-1","flex-[0_1_570px]","flex-[0_1_auto]","flex-col","flex-none","flex-nowrap","flex-row","flex-wrap","font-bold","font-normal","font-semibold","for","forkedFrom","form","from","function","gap-0","gap-1","gap-1.5","gap-2","gap-2.5","getBoundingClientRect","ghost","give","global","grid","grouped","h-auto","h-full","h-header","handleRef","has","hasMore","have","header","height","history","icon-sm","id","identityFields","idle","if","import","in","including","initialFocus","initialized","input","inputAriaControls","inputs","inserts","inspect","installed","instanceof","interface","interruptActorTurn","interruptCoordinator","is","it","items","items-center","items-start","its","journal","json","jsonObject","justify-end","justify-start","keep","keepMounted","key","kind","knows","label","layout","leading-[1.45]","leading-[1.6]","length","let","level","limit","listRuns","listener","listeners","load","loading","local","long","longer","lucide-react","m-auto","main","max-md:[&>span]:hidden","max-md:data-open:grow","max-md:flex-[0_1_210px]","max-md:gap-1","max-md:min-w-[130px]","max-md:p-5","max-md:px-1","max-w-[480px]","max-w-[720px]","max-w-[calc(100vw-16px)]","max-w-[min(320px,100%)]","maxLength","maxRows","maxWidth","maximum","message","messages","metadata","methods","min-h-0","min-h-16!","min-w-0","min-w-[190px]","minLength","minimum","missing","ml-auto","modal","model","modelOptions","modelSelection","modelSettingsStore","modelState","models","modes","mt-1","mt-2","must","mx-4","my-2","name","neither","nested","new","next","nextAfter","no","nor","normal","not","noteClass","notice","null","object","occurredAt","of","on","onBackdropClick","onBusy","onClick","onErrorChange","onEvent","onFocus","onKeyDown","onOpenChange","onSend","onStop","onValueChange","one","ongoing","only","open","options","or","order","other","outline","outside-press","overflow-hidden","overseer","overseer-details","overseer-dropdown","overseer-toolbar","overseerChatDisplayPolicy","overseerChatStorageKeyPrefix","overseerContracts","overseerPermissions","overview","overviewPanels","own","ownerId","p-0","p-1.5","p-6","p-8","package","packageDirectory","packages","page","panelOpen","part","path","pattern","payload","pending","per","perform","placeholder","placement","plugin","pluginId","pluginStates","policy","polite","position","presentation","primary","primaryActorId","problem","processing","properties","provide","provider","publish","px-2","px-2.5","py-1","py-2","quassel","quassel/events","question","quick","quick-answer","quickAnswers","react","read","readCatalog","readEvents","readOpenRpc","readReference","readRight","readRun","readable","ready","reason","reasoning","ref","reference","region","registered","rejected","replaced","replay-end","replaySequence","replaying","requestOpen","reset","resetObserved","resetPending","resetting","result","return","revision","rights","role","rounded-b-panel","rounded-full","rounded-lg","rounded-t-none","rows","rpc","rpcApi","run","runContracts","runId","runSummary","runViewFrom","running","runs","s","same","save","saving","schema","schemaVersion","scope","script","script/packageDirectory.","scripts","scrollerRef","seenSequence","selectable","selected","selection","selectionKey","selects","sendDisabled","sendMessage","sending","sequence","server","server-side","setActivated","setComposerError","setConfirmReset","setCoordinator","setDetailsContainer","setDialogContainer","setDropdown","setError","setQuickAnswer","setResetting","setScroller","settings","settingsResult","shell","showCloseButton","showTimestamps","side","signed-in","size","skill","sm","small","source","sr-only","stable","start","started","starts","state","state-replaced","status","steeringPlaceholder","stepsExpandable","stepsVisible","stop","stopRun","stopped","storageKeyPrefix","stored","string","style","subscribe","subscriptions","such","suppressFocus","target","task","tasks","templates","test","text","text-[0.73rem]","text-[0.76rem]","text-[0.7rem]","text-[0.8rem]","text-[0.9rem]","text-center","text-destructive","text-foreground","text-left","text-muted-foreground","texts","the","their","thinking","thinkingLabel","thinkingOptions","this","through","throw","title","to","toolbar","toolbarClass","toolbarLeft","toolbarRight","top","trap-focus","triggerClass","true","try","ts","turn","turns","type","typebox","typeof","unabridged","undefined","unique","until","updatedAt","use","useAccess","useAttachmentCapabilities","useChat","useChatViewSettings","useModelSettings","useRef","useState","user","userLocation","users","validText","value","values","variant","via","viewSchema","void","w-full","wait","waits","webPlugin","while","whitespace-normal","whole","width","with","withToolSummaries","without","work","workshop","writable","write","x-source","x-typescript-type","yet","your"]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var t=(o,a)=>{let d=globalThis.__ragentsHostModules?.[o];if(d===void 0)throw new Error(`The host does not provide ${o}`);if(!(a in d))throw new Error(`The host does not provide ${a} from ${o}; the bundle was built against a newer host`);return d[a]};var H=t("@ragents/web/AccessContext","useAccess");var M=t("@ragents/web/ui","Button");var he=t("@ragents/web/ui","Dialog");var Se=t("@ragents/web/ui","DialogContent");var we=t("@ragents/web/ui","DialogDescription");var ke=t("@ragents/web/ui","DialogFooter");var Pe=t("@ragents/web/ui","DialogHeader");var Ae=t("@ragents/web/ui","DialogTitle");var ee=t("@ragents/web/ui","Popover");var ae=t("@ragents/web/ui","PopoverContent");var te=t("@ragents/web/ui","Select");var oe=t("@ragents/web/ui","SelectContent");var re=t("@ragents/web/ui","SelectItem");var ue=t("@ragents/web/ui","SelectTrigger");var de=t("@ragents/web/ui","SelectValue");var De=t("@ragents/web/ui/dialog","RunModalContext");var Be=t("react","createContext");var b=t("react","createElement");var Q=t("react","forwardRef");var E=t("react","useCallback");var Me=t("react","useContext");var T=t("react","useEffect");var le=t("react","useMemo");var B=t("react","useRef");var k=t("react","useState");var ye=t("react","useSyncExternalStore");var Ye=o=>o?.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();function ea(o,a,d=[]){if(a==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:Ye(o),size:24,node:a,...d.length>0?{aliases:d}:{}}}var aa=o=>{let a="",d=!1;for(let u of o){if(u==="-"||u==="_"||u<=" "){d=a.length>0;continue}a.length===0?a+=u.toLowerCase():a+=d?u.toUpperCase():u,d=!1}return a};var ta=o=>{let a=aa(o);return a.charAt(0).toUpperCase()+a.slice(1)};var j=(...o)=>o.filter((a,d,u)=>!!a&&a.trim()!==""&&u.indexOf(a)===d).join(" ").trim();var y={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};function Fe(o){return o!=null}function oa(o,a={}){let d=a.attributeNames??{},u=x=>d[x]??x,L=o.size??o.width??y.width,n=o.size??o.height??y.height,l=o.aliases?.filter(x=>typeof x=="string"&&x.trim()!=="").map(x=>`lucide-${x}`)??[],p=[...o.name?[`lucide-${o.name}`]:[],...l],i=a.className?.split(" ").filter(Boolean)??[],c=a.includeDefaultClasses===!1?j(...i):j("lucide",...p,...i),m=a.absoluteStrokeWidth?Number(a.strokeWidth??y["stroke-width"])*Number(o.size??o.width??y.width)/Number(a.size??a.width??y.width):a.strokeWidth??y["stroke-width"];return["svg",{...Object.entries(y).reduce((x,[f,h])=>(x[u(f)]=h,x),{}),..."color"in a&&a.color&&{[u("stroke")]:a.color},..."size"in a&&Fe(a.size)&&{[u("width")]:a.size,[u("height")]:a.size},..."width"in a&&Fe(a.width)&&{[u("width")]:a.width},..."height"in a&&Fe(a.height)&&{[u("height")]:a.height},[u("stroke-width")]:m,...c&&{[u("class")]:c},[u("viewBox")]:`0 0 ${L} ${n}`,...a.hasA11yProp===!1?{[u("aria-hidden")]:"true"}:{},..."attributes"in a&&a.attributes},o.node.map(x=>{let[f,h,P]=x,A=a.nonScalingStroke?{[u("vector-effect")]:"non-scaling-stroke",...h}:h;return P?[f,A,P]:[f,A]})]}function ra(o,a={}){return oa(o,{...a,attributeNames:{...a.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}var ua=o=>{for(let a in o)if(a.startsWith("aria-")||a==="role"||a==="title")return!0;return!1};var Ta=Be({});var da=()=>Me(Ta);var la=Q(({color:o,size:a,width:d,height:u,strokeWidth:L,absoluteStrokeWidth:n,nonScalingStroke:l,className:p="",children:i,iconNode:c=[],icon:m={node:c,aliases:[],size:24},...C},x)=>{let{size:f=24,strokeWidth:h=2,absoluteStrokeWidth:P=!1,nonScalingStroke:A=!1,color:ne="currentColor",className:q=""}=da()??{},ce=!!i||ua(C),[pe,me,Le=[]]=ra(m,{color:o??ne,width:d??a??f,height:u??a??f,strokeWidth:L??h,absoluteStrokeWidth:n??P,nonScalingStroke:l??A,className:j(q,p),hasA11yProp:ce,attributes:C});return b(pe,{ref:x,...me},[...Le.map(([O,$])=>b(O,$)),...Array.isArray(i)?i:[i]])});function sa(o,a=[],d=[]){let u=typeof o=="string"?ea(o,a,d):o,L=Q(({className:n,...l},p)=>b(la,{ref:p,icon:u,className:n,...l}));return u.name&&(L.displayName=ta(u.name)),L}var fa={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};fa.node;var J=sa(fa);var Re=t("quassel","ChatInputToolbar");var be=t("quassel","ChatMessages");var Te=t("@ragents/web/chat/useChat","useChat");var ve=t("@ragents/web/chat/useAttachmentCapabilities","useAttachmentCapabilities");var qe=t("@ragents/web/PluginRegistry","ChatStepsProvider");var Oe=t("@ragents/web/chat-view-settings","ChatViewSwitches");var Ue=t("@ragents/web/chat-view-settings","useChatViewSettings");var He=t("@ragents/web/toolLine","withToolSummaries");var F=t("@ragents/web/rpc","rpc");var Ee=t("@ragents/web/api","interruptActorTurn");var Ge=t("@ragents/engine/src/http/contracts","runContracts");var Ve=t("@ragents/web/run-view","runViewFrom");var e=t("typebox","Type");var w=t("@ragents/engine/src/rpc/contract","defineOperation");var We=t("@ragents/engine/src/domain/events","eventTypeMap");var V="ragents.overseer",ca=240;var I=o=>e.Object(o,{additionalProperties:!1}),v=()=>e.String({minLength:1,pattern:"\\S"}),G=I({}),fe=e.Record(e.String(),e.Any()),pa=e.Unsafe(e.Union(Object.keys(We).map(o=>e.Literal(o)))),se=e.String({minLength:1,maxLength:512,description:"Run ID, unique title or stable reference such as Run 1."}),ie={runId:e.String(),title:e.String(),reference:e.String()},va=I({...ie,createdAt:e.Optional(e.Number()),updatedAt:e.Number(),running:e.Optional(e.Boolean()),metadata:e.Optional(fe)}),ia=I({...ie,accepted:e.Literal(!0)}),Ne={title:v(),options:e.Optional(fe)},qa=e.Union([I({...Ne,message:v()}),I({...Ne,script:v(),input:e.Optional(e.Any())}),I({...Ne,packageDirectory:e.String({minLength:1,description:"Absolute path of a RUN.md/setup.ts/tests.json package on the server. A local shell client inserts its actually existing package path; this is not an upload."}),input:e.Optional(e.Any())})]),R=(o,a="packages/ragents/src/domain/model.ts")=>e.Object({},{additionalProperties:!0,"x-typescript-type":o,"x-source":a,description:`Unabridged domain value ${o}; nested fields are deliberately an open JSON schema here.`}),Oa=I({eventId:e.String(),runId:e.String(),sequence:e.Integer({minimum:1}),schemaVersion:e.Literal(3),occurredAt:e.String(),actorId:e.String(),commandId:e.String(),correlationId:e.Union([e.String(),e.Null()]),causationId:e.Union([e.String(),e.Null()]),type:pa,payload:R("EventPayloads[EventType]","packages/ragents/src/domain/events.ts")}),Ua=I({id:e.String(),revision:e.Integer(),title:e.String(),ownerId:e.String(),primaryActorId:e.Union([e.String(),e.Null()]),createdAt:e.String(),forkedFrom:e.Union([I({runId:e.String(),sequence:e.Integer()}),e.Null()]),actors:e.Array(R("Actor")),inputs:e.Array(R("ActorInput")),turns:e.Array(R("Turn")),subscriptions:e.Array(R("EventSubscription")),pluginStates:e.Array(R("PluginState")),actions:e.Array(R("Action")),artifacts:e.Array(R("Artifact"))}),Ha=I({provider:v(),model:v(),thinking:v()}),na=I({provider:e.String(),model:e.String(),thinking:e.String(),models:e.Array(I({id:e.String(),provider:e.String(),label:e.String(),thinking:e.Array(e.String())}))}),W={listRuns:w({id:"ragents.overseer.listRuns",description:"List the runs the caller sees, with stable references; the global coordinators are not part of this list.",rights:["runs.read"],input:G,result:e.Array(va)}),createRun:w({id:"ragents.overseer.createRun",description:"Create a run with a server-side ID and title. Exactly one start form: message, installed script (id or unique title), or packageDirectory (existing local run script package). input is only allowed with script/packageDirectory. options selects start options such as ragents.startOptions.select, each only with its own rights. The result waits for preparation, check, test and installation; accepted does not yet confirm a finished model result.",rights:["runs.read","runs.write","runs.create"],input:qa,result:ia}),readRun:w({id:"ragents.overseer.readRun",description:"Read the current unabridged RunView; nested domain values are documented as open JSON objects.",rights:["runs.read","runs.inspect"],input:I({run:se}),result:Ua}),readEvents:w({id:"ragents.overseer.readEvents",description:"Read the complete journal page by page in sequence order. As long as hasMore is true, use nextAfter as after of the next request. type filters an exact event type.",rights:["runs.read","runs.inspect"],input:I({run:se,after:e.Optional(e.Integer({minimum:0,default:0})),limit:e.Optional(e.Integer({minimum:1,maximum:200,default:50})),type:e.Optional(pa)}),result:I({...ie,events:e.Array(Oa),nextAfter:e.Integer({minimum:0}),hasMore:e.Boolean()})}),sendMessage:w({id:"ragents.overseer.sendMessage",description:"Enqueue a chat message for the primary LLM actor; TypeScript as primary is rejected with actor-chat-unsupported. The result only confirms the enqueueing, neither processing nor completion. A running turn is not replaced by it.",rights:["runs.read","runs.write"],input:I({run:se,message:v()}),result:ia}),stopRun:w({id:"ragents.overseer.stopRun",description:"Stop the run through its normal stop boundary and wait for the cleanup; the conversation is kept.",rights:["runs.read","runs.write"],input:I({run:se}),result:I({...ie,stopped:e.Literal(!0)})}),readCatalog:w({id:"ragents.overseer.readCatalog",description:"Read installed templates and start options with input schemas, default values and selectability. createRun starts messages, installed scripts or local packages via packageDirectory. Skills provide editable tasks for message; name the skill as the work instruction.",rights:["runs.read","runs.inspect"],input:G,result:I({entries:e.Array(e.Object({id:e.String(),title:e.String(),description:e.String(),action:e.Union([e.Literal("skill"),e.Literal("script")])},{additionalProperties:!0,"x-typescript-type":"PublicStartEntry"})),options:e.Array(I({id:e.String(),schema:fe,value:e.Any(),selectable:e.Boolean(),presentation:e.Any()}))})}),readReference:w({id:"ragents.overseer.readReference",description:"Read a readable reference of all registered methods and channels directly from their contracts.",rights:["runs.read","runs.inspect"],input:G,result:e.String()}),readOpenRpc:w({id:"ragents.overseer.readOpenRpc",description:"Read OpenRPC 1.3 directly from the same contracts.",rights:["runs.read","runs.inspect"],input:G,result:fe}),settings:{read:w({id:"ragents.overseer.settings.read",description:"Read the global coordinator's model selection with the available model catalog.",rights:["ragents.overseer.read"],input:G,result:na}),save:w({id:"ragents.overseer.settings.save",description:"Set the global coordinator's model selection; it applies from the next answer on.",rights:["ragents.overseer.read","ragents.overseer.write","settings.write"],input:Ha,result:na})},coordinator:w({id:"ragents.overseer.coordinator",description:"Read the run ID of your own global coordinator: one per signed-in user, exactly one without sign-in.",rights:["ragents.overseer.read"],input:G,result:I({runId:e.String()})}),reset:w({id:"ragents.overseer.reset",description:"Reset the conversation of your own global coordinator including its model context; the model selection, other users' coordinators and all runs are kept.",rights:["ragents.overseer.read","ragents.overseer.write"],input:I({confirm:e.Literal(!0,{description:"The conversation reset must be confirmed explicitly."})}),result:e.Null()})};var ze=t("@ragents/web/lib/labels","thinkingLabel");var Ea={read:()=>F.call(W.settings.read,{}),save:o=>F.call(W.settings.save,o)};function Ga(o=Ea){let a={status:"loading"},d=0,u,L=new Set,n=c=>{a=c;for(let m of L)m()},l=c=>{let m=c instanceof Error?c.message:String(c);n(a.settings?{status:"ready",settings:a.settings,error:m}:{status:"failed",error:m})};return{read:()=>a,load:()=>{if(u)return u;if(a.status==="saving")return Promise.resolve();let c=d;return a.settings||n({status:"loading"}),u=o.read().then(m=>{d===c&&n({status:"ready",settings:m})}).catch(m=>{d===c&&l(m)}).finally(()=>{u=void 0}),u},save:async c=>{if(!a.settings||a.status==="saving")throw new Error("Wait until the settings are ready");d+=1,n({status:"saving",settings:a.settings});try{n({status:"ready",settings:await o.save(c)})}catch(m){throw l(m),m}},subscribe:c=>(L.add(c),()=>{L.delete(c)})}}var N=Ga();var _=t("react/jsx-runtime","Fragment");var r=t("react/jsx-runtime","jsx");var g=t("react/jsx-runtime","jsxs");function Ke(o=!0){let a=ye(N.subscribe,N.read);return T(()=>{o&&N.load()},[o]),a}var Xe=(o,a)=>JSON.stringify([o,a]),ma="mt-2 text-[0.73rem] text-muted-foreground",La="mt-2 flex flex-wrap items-center gap-2 text-[0.8rem] text-destructive",xa="min-w-0 max-w-[min(320px,100%)]";function Ze({active:o=!0,compact:a=!1,disabled:d=!1,actions:u}){let L=H(),n=L.can("ragents.overseer.read"),l=L.can("ragents.overseer.write")&&L.can("settings.write"),p=Ke(o&&n),i=p.settings,c=i?.models.find(f=>f.id===i.model&&f.provider===i.provider),m=f=>{N.save(f).catch(()=>{})},C=i?.models.map(f=>({value:Xe(f.provider,f.id),label:f.label}))??[],x=c?.thinking.map(f=>({value:f,label:ze(f)}))??[];return n?g("section",{"aria-label":"Model of the global coordinator",className:a?"min-w-0 flex-1":"min-w-0",children:[g("div",{className:a?"flex flex-nowrap items-center gap-2 max-md:gap-1":"flex flex-wrap items-center gap-2.5",children:[i&&c?g(_,{children:[g(te,{disabled:!l||d||p.status==="saving",items:C,value:Xe(i.provider,i.model),onValueChange:f=>{let h=i.models.find(A=>Xe(A.provider,A.id)===f);if(!h)throw new Error("The selected model is no longer available");let P=h.thinking.includes(i.thinking)?i.thinking:h.thinking[0];if(!P)throw new Error("No reasoning level is configured for the model");m({provider:h.provider,model:h.id,thinking:P})},children:[r(ue,{"aria-label":"Model",className:`${xa} ${a?"flex-1":"flex-[0_1_auto]"}`,size:a?"sm":"default",children:r(de,{})}),r(oe,{children:C.map(f=>r(re,{value:f.value,children:f.label},f.value))})]}),g(te,{disabled:!l||d||p.status==="saving"||c.thinking.length<2,items:x,value:i.thinking,onValueChange:f=>{f!==null&&m({provider:i.provider,model:i.model,thinking:f})},children:[r(ue,{"aria-label":a?"Reasoning":"Reasoning level",className:`${xa} flex-none`,size:a?"sm":"default",children:r(de,{})}),r(oe,{children:x.map(f=>r(re,{value:f.value,children:f.label},f.value))})]})]}):p.status==="loading"?r("p",{className:`${ma} min-w-0 flex-[0_1_auto]`,role:"status",children:"Loading models ..."}):!p.error&&r("p",{className:`${La} min-w-0 flex-[0_1_auto]`,role:"alert",children:"The stored model is missing from the model catalog."}),u&&r("div",{className:"ml-auto flex-none",children:u})]}),i&&c&&(!a||p.status==="saving")&&r("p",{className:ma,role:"status",children:p.status==="saving"?"Saving ...":"Applies from the next answer on. The conversation history is kept."}),p.error&&g("div",{className:La,role:"alert",children:[r("span",{children:p.error}),r(M,{onClick:()=>{N.load()},variant:"outline",children:"Reload"})]})]}):null}var Ia="ragents.overseer.chat-steps",Ca={modes:{coordinator:"grouped",agents:"grouped"},stepsVisible:!0,stepsExpandable:!0,selectable:!0};var ga=o=>typeof o=="string"&&!!o.trim()&&o.length<=ca&&!/[\r\n]/.test(o);function ha(){let o,a=!1,d=!0,u=0,L=0,n;return{event(l){if(l.kind==="reset"&&((l.reason==="conversation-reset"||o!=null&&o!==l.conversationId)&&(u=0,a=!0),o=l.conversationId,d=!0,L=u,n=void 0),l.kind==="replay-end"){o=l.conversationId,d=!1,u=L;let x=a?n:void 0;return a=!0,n=void 0,x}if(l.kind!=="plugin"||l.pluginId!==V||l.type!=="state-replaced")return;let p=l.payload;if(!p||typeof p!="object"||!("state"in p)||!("scope"in p)||!p.scope||typeof p.scope!="object"||!("kind"in p.scope)||p.scope.kind!=="run")return;let i=p.state;if(!i||typeof i!="object"||!("kind"in i)||i.kind!=="quick-answer")return;if(!l.journal||!l.journal.eventId?.trim()||!l.journal.conversationId?.trim()||!Number.isSafeInteger(l.journal.sequence)||l.journal.sequence<=0)throw new Error("The journal position of the quick answer is invalid.");if(o!=null&&o!==l.journal.conversationId||(o=l.journal.conversationId,l.journal.sequence<=(d?L:u)))return;if(d&&!a){L=l.journal.sequence;return}let c="question"in i?i.question:void 0,m="text"in i?i.text:void 0;if(!ga(c)||!ga(m))throw new Error("The quick question or quick answer is invalid.");let C={id:l.journal.eventId,question:c,text:m};if(d)L=l.journal.sequence,n=C;else return u=l.journal.sequence,C}}}var wa="flex h-header max-w-[720px] min-w-[190px] flex-[0_1_570px] items-center gap-1 border-r border-border bg-[color-mix(in_srgb,var(--primary)_4%,var(--card))] px-2 py-1 data-open:bg-accent max-md:min-w-[130px] max-md:flex-[0_1_210px] max-md:px-1 max-md:data-open:grow",Sa="mx-4 my-2 flex-none text-[0.8rem] text-muted-foreground",Va=async o=>{let a=Ve(await F.call(Ge.view,{runId:o}))?.primaryActorId;if(!a)throw new Error("The global coordinator is not available");await Ee(o,a)},Wa="mx-4 my-2 flex-none text-[0.8rem] text-destructive";function Na(o){let a=H().user?.id,[d,u]=k({});return T(()=>{let L=!0;return u({}),F.call(W.coordinator,{}).then(({runId:n})=>{L&&u({runId:n})},n=>{L&&u({error:n instanceof Error?n.message:String(n)})}),()=>{L=!1}},[a]),d.runId?r(qe,{policy:Ca,storageKeyPrefix:Ia,children:r(za,{...o,runId:d.runId},d.runId)}):r("div",{className:wa,"data-slot":"overseer-toolbar",role:"status",children:d.error&&r("span",{className:"text-[0.7rem] font-bold text-destructive",title:d.error,"aria-label":d.error,children:"!"})})}function za({open:o,onOpen:a,onClose:d,onBusy:u,userLocation:L,runId:n}){let l=H().can("ragents.overseer.write"),[p,i]=k(!1),[c,m]=k(!1),[C,x]=k(!1),f=B(!1),h=B(!1),P=B(null),A=B(null),ne=B(null),q=B(!1),[ce,pe]=k(null),[me,Le]=k(null),O=B(void 0),[$,ka]=k(null),Qe=B(null),Pa=E(s=>{ne.current=s,ka(s)},[]),[je]=k(ha),[U,z]=k(),Je=B(o);Je.current=o;let[X,K]=k(),[Aa,Da]=k(),xe=E(()=>{P.current?.reset(),m(!1),K(void 0),z(void 0)},[]),Ba=E(s=>{let S=je.event(s);s.kind==="reset"&&((s.reason==="conversation-reset"||O.current!=null&&O.current!==s.conversationId)&&(f.current&&(h.current=!0),xe()),O.current=s.conversationId),s.kind==="replay-end"&&(O.current=s.conversationId),S&&!Je.current&&z(S)},[xe,je]),D=Te(n,Ba,p),Y=Ue(n,"primary","coordinator"),Z=Ke(o),Ma=ve(n,"primary",JSON.stringify(Z.settings&&[Z.settings.provider,Z.settings.model])),ya=le(()=>He(D.messages),[D.messages]),Ie=()=>{q.current=!1,z(void 0),a()};T(()=>{o&&(i(!0),z(void 0))},[o]),T(()=>u(D.running),[D.running,u]);let _e=E(()=>{let s=A.current;if(!s)return null;let S=s.closest("header")??s;return{contextElement:s,getBoundingClientRect:()=>{let $e=s.getBoundingClientRect();return new DOMRect($e.left,S.getBoundingClientRect().bottom,$e.width,0)}}},[]),Fa=(s,S)=>{if(!c){if(s==="outside-press"){if(S.target instanceof Node&&A.current?.contains(S.target))return;d();return}s==="escape-key"&&(q.current=!(document.activeElement instanceof HTMLTextAreaElement&&A.current?.contains(document.activeElement)),d(),P.current?.focus())}},Ra=s=>{K(void 0),s().catch(S=>K(S instanceof Error?S.message:String(S)))},ba=async()=>{if(!f.current){f.current=!0,h.current=!1,x(!0),K(void 0);try{await F.call(W.reset,{confirm:!0}),xe()}catch(s){h.current||K(s instanceof Error?s.message:String(s))}finally{f.current=!1,x(!1)}}},Ce=p&&!D.connected?"No connection. Your draft is kept; sending is disabled.":void 0,ge=X??Aa??Z.error??Ce;return g("div",{className:wa,"data-open":o,"data-slot":"overseer-toolbar",ref:A,onFocus:s=>{s.target instanceof HTMLTextAreaElement&&(q.current?q.current=!1:a())},onKeyDown:s=>{s.defaultPrevented||!o&&s.target instanceof HTMLTextAreaElement&&(s.key.length===1||s.key==="Enter")&&Ie()},children:[r("div",{className:"min-w-0 flex-1",onClick:s=>{s.target instanceof HTMLTextAreaElement&&Ie()},children:r(Re,{...Ma,detailsContainer:ce,layout:"toolbar",handleRef:P,inputAriaControls:"overseer-dropdown",disabled:!l||C||c,sendDisabled:!D.connected||Z.status==="saving"||C,maxRows:2,rows:1,onErrorChange:Da,onSend:(s,S)=>D.send(s,S,L),onStop:l&&D.running?()=>{f.current||Ra(()=>Va(n))}:void 0,running:D.running,texts:{placeholder:"Global coordinator",steeringPlaceholder:"Global coordinator"},toolbarRight:r(Ze,{active:o,compact:!0,disabled:C,actions:r(M,{"aria-label":"Reset conversation","aria-busy":C,disabled:!l||C||!D.connected,onClick:()=>m(!0),size:"sm",variant:"outline",children:C?"Resetting ...":"Reset"})}),toolbarLeft:r(Oe,{className:"max-md:[&>span]:hidden",settings:Y})})}),g("span",{className:"flex min-w-0 flex-none items-center justify-end gap-1.5 empty:hidden",role:"status","aria-live":"polite",children:[D.running&&r("span",{className:"sr-only",children:"Working"}),ge&&r("span",{className:"text-[0.7rem] font-bold text-destructive",title:ge,"aria-label":ge,children:"!"})]}),r(ee,{modal:!1,open:U!==void 0,children:r(ae,{align:"start",anchor:_e,"aria-atomic":"true","aria-live":"polite",className:"flex max-w-[calc(100vw-16px)] flex-row items-start gap-1 p-1.5 text-[0.76rem]",collisionPadding:8,finalFocus:!1,initialFocus:!1,role:"status",side:"bottom",style:{width:"min(max(calc(var(--anchor-width) * 2), 480px), var(--available-width))"},children:U&&g(_,{children:[r(M,{className:"h-auto min-w-0 flex-1 justify-start rounded-lg px-2.5 py-2 text-left text-[0.76rem] leading-[1.45] font-normal whitespace-normal [overflow-wrap:anywhere]",variant:"ghost","aria-label":`Open history: ${U.question} ${U.text}`,onClick:()=>{Ie(),l?P.current?.focus():requestAnimationFrame(()=>me?.focus())},children:g("span",{className:"grid min-w-0 gap-1",children:[r("span",{className:"text-muted-foreground",children:U.question}),r("strong",{className:"font-semibold",children:U.text})]})}),r(M,{"aria-label":"Close quick answer",className:"mt-1 flex-none rounded-full",onClick:()=>z(void 0),size:"icon-sm",title:"Close quick answer",variant:"ghost",children:r(J,{})})]})})}),r(ee,{modal:!1,open:o,onOpenChange:(s,S)=>{s||Fa(S.reason,S.event)},children:g(ae,{align:"start",anchor:_e,"aria-label":"Global coordinator",className:"flex min-h-0 flex-col gap-0 overflow-hidden rounded-t-none rounded-b-panel border-t-2 border-t-primary p-0",collisionPadding:8,finalFocus:!1,id:"overseer-dropdown",initialFocus:!1,keepMounted:!0,ref:Pa,role:"region",side:"bottom",style:{width:"min(760px, var(--available-width))",height:"min(650px, var(--available-height))"},children:[r("div",{className:"flex-none border-b border-border-soft","data-tone":"overseer-details",ref:pe}),c&&$&&r(De.Provider,{value:$,children:r(he,{open:!0,onOpenChange:s=>{!s&&!C&&m(!1)},modal:"trap-focus",disablePointerDismissal:!0,children:g(Se,{initialFocus:Qe,onBackdropClick:()=>{C||m(!1)},scope:"run",showCloseButton:!1,size:"small",children:[g(Pe,{children:[r(Ae,{children:"Reset conversation?"}),r(we,{children:"History and model context are deleted. Running answers are stopped."})]}),r("p",{children:"Your runs and the model choice are kept."}),X&&r("p",{className:"text-[0.8rem] text-destructive",role:"alert",children:X}),g(ke,{children:[r(M,{ref:Qe,disabled:C,onClick:()=>m(!1),variant:"outline",children:"Cancel"}),r(M,{disabled:C,onClick:()=>{ba()},variant:"destructive",children:C?"Resetting ...":"Reset conversation"})]})]})})}),!l&&r("p",{className:Sa,children:"You have read access to this conversation."}),Ce&&r("p",{className:Sa,role:"status",children:Ce}),X&&r("p",{className:Wa,role:"alert",children:X}),r(be,{announce:!1,className:"min-h-16! flex-1",scrollerRef:Le,detailMode:Y.detailMode,emptyState:g("div",{className:"m-auto max-w-[480px] p-8 text-[0.9rem] leading-[1.6] text-muted-foreground max-md:p-5",children:[r("strong",{className:"text-foreground",children:"One chat for the whole workshop"}),r("p",{children:"Write your task in the title bar above. Answers about your runs and ongoing work appear here."})]}),messages:ya,running:D.running,showTimestamps:Y.showTimestamps,stepsExpandable:Y.stepsExpandable})]})})]})}var $u={id:V,settings:[{category:"models",order:10,readRight:"ragents.overseer.read",id:`${V}.model`,label:"Global coordinator",Settings:Ze}],overviewPanels:[{id:`${V}.chat`,placement:"toolbar",order:100,readRight:"ragents.overseer.read",Panel:Na}]};export{$u as webPlugin};
|
|
1
|
+
var o=(t,e)=>{let d=globalThis.__ragentsHostModules?.[t];if(d===void 0)throw new Error(`The host does not provide ${t}`);if(!(e in d))throw new Error(`The host does not provide ${e} from ${t}; the bundle was built against a newer host`);return d[e]};var b=o("@ragents/web/AccessContext","useAccess");var M=o("@ragents/web/ui","Button");var ye=o("@ragents/web/ui","Dialog");var Fe=o("@ragents/web/ui","DialogContent");var Re=o("@ragents/web/ui","DialogDescription");var be=o("@ragents/web/ui","DialogFooter");var Te=o("@ragents/web/ui","DialogHeader");var ve=o("@ragents/web/ui","DialogTitle");var ae=o("@ragents/web/ui","Popover");var te=o("@ragents/web/ui","PopoverContent");var oe=o("@ragents/web/ui","Select");var re=o("@ragents/web/ui","SelectContent");var ue=o("@ragents/web/ui","SelectItem");var de=o("@ragents/web/ui","SelectTrigger");var le=o("@ragents/web/ui","SelectValue");var qe=o("@ragents/web/ui/dialog","RunModalContext");var Oe=o("react","createContext");var T=o("react","createElement");var Q=o("react","forwardRef");var G=o("react","useCallback");var Ue=o("react","useContext");var v=o("react","useEffect");var j=o("react","useMemo");var B=o("react","useRef");var k=o("react","useState");var He=o("react","useSyncExternalStore");var ta=t=>t?.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();function oa(t,e,d=[]){if(e==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:ta(t),size:24,node:e,...d.length>0?{aliases:d}:{}}}var ra=t=>{let e="",d=!1;for(let u of t){if(u==="-"||u==="_"||u<=" "){d=e.length>0;continue}e.length===0?e+=u.toLowerCase():e+=d?u.toUpperCase():u,d=!1}return e};var ua=t=>{let e=ra(t);return e.charAt(0).toUpperCase()+e.slice(1)};var J=(...t)=>t.filter((e,d,u)=>!!e&&e.trim()!==""&&u.indexOf(e)===d).join(" ").trim();var y={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};function Ee(t){return t!=null}function da(t,e={}){let d=e.attributeNames??{},u=I=>d[I]??I,c=t.size??t.width??y.width,L=t.size??t.height??y.height,l=t.aliases?.filter(I=>typeof I=="string"&&I.trim()!=="").map(I=>`lucide-${I}`)??[],p=[...t.name?[`lucide-${t.name}`]:[],...l],i=e.className?.split(" ").filter(Boolean)??[],n=e.includeDefaultClasses===!1?J(...i):J("lucide",...p,...i),m=e.absoluteStrokeWidth?Number(e.strokeWidth??y["stroke-width"])*Number(t.size??t.width??y.width)/Number(e.size??e.width??y.width):e.strokeWidth??y["stroke-width"];return["svg",{...Object.entries(y).reduce((I,[f,h])=>(I[u(f)]=h,I),{}),..."color"in e&&e.color&&{[u("stroke")]:e.color},..."size"in e&&Ee(e.size)&&{[u("width")]:e.size,[u("height")]:e.size},..."width"in e&&Ee(e.width)&&{[u("width")]:e.width},..."height"in e&&Ee(e.height)&&{[u("height")]:e.height},[u("stroke-width")]:m,...n&&{[u("class")]:n},[u("viewBox")]:`0 0 ${c} ${L}`,...e.hasA11yProp===!1?{[u("aria-hidden")]:"true"}:{},..."attributes"in e&&e.attributes},t.node.map(I=>{let[f,h,P]=I,A=e.nonScalingStroke?{[u("vector-effect")]:"non-scaling-stroke",...h}:h;return P?[f,A,P]:[f,A]})]}function la(t,e={}){return da(t,{...e,attributeNames:{...e.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}var sa=t=>{for(let e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0;return!1};var Oa=Oe({});var fa=()=>Ue(Oa);var ia=Q(({color:t,size:e,width:d,height:u,strokeWidth:c,absoluteStrokeWidth:L,nonScalingStroke:l,className:p="",children:i,iconNode:n=[],icon:m={node:n,aliases:[],size:24},...x},I)=>{let{size:f=24,strokeWidth:h=2,absoluteStrokeWidth:P=!1,nonScalingStroke:A=!1,color:he="currentColor",className:U=""}=fa()??{},Se=!!i||sa(x),[we,ke,Pe=[]]=la(m,{color:t??he,width:d??e??f,height:u??e??f,strokeWidth:c??h,absoluteStrokeWidth:L??P,nonScalingStroke:l??A,className:J(U,p),hasA11yProp:Se,attributes:x});return T(we,{ref:I,...ke},[...Pe.map(([H,Y])=>T(H,Y)),...Array.isArray(i)?i:[i]])});function na(t,e=[],d=[]){let u=typeof t=="string"?oa(t,e,d):t,c=Q(({className:L,...l},p)=>T(ia,{ref:p,icon:u,className:L,...l}));return u.name&&(c.displayName=ua(u.name)),c}var ca={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};ca.node;var _=na(ca);var se=o("quassel","ChatInputToolbar");var fe=o("quassel","ChatMessages");var Ge=o("quassel","ChatPanel");var ie=o("@ragents/web/chat/useChat","useChat");var ne=o("@ragents/web/chat/useAttachmentCapabilities","useAttachmentCapabilities");var ce=o("@ragents/web/PluginRegistry","ChatStepsProvider");var pe=o("@ragents/web/chat-view-settings","ChatViewSwitches");var me=o("@ragents/web/chat-view-settings","useChatViewSettings");var Le=o("@ragents/web/toolLine","withToolSummaries");var F=o("@ragents/web/rpc","rpc");var Ve=o("@ragents/web/api","interruptActorTurn");var We=o("@ragents/engine/src/http/contracts","runContracts");var Ne=o("@ragents/web/run-view","runViewFrom");var a=o("typebox","Type");var w=o("@ragents/engine/src/rpc/contract","defineOperation");var ze=o("@ragents/engine/src/domain/events","eventTypeMap");var O="ragents.overseer",La=240;var C=t=>a.Object(t,{additionalProperties:!1}),q=()=>a.String({minLength:1,pattern:"\\S"}),V=C({}),Ie=a.Record(a.String(),a.Any()),xa=a.Unsafe(a.Union(Object.keys(ze).map(t=>a.Literal(t)))),xe=a.String({minLength:1,maxLength:512,description:"Run ID, unique title or stable reference such as Run 1."}),Ce={runId:a.String(),title:a.String(),reference:a.String()},Ua=C({...Ce,createdAt:a.Optional(a.Number()),updatedAt:a.Number(),running:a.Optional(a.Boolean()),metadata:a.Optional(Ie)}),pa=C({...Ce,accepted:a.Literal(!0)}),Xe={title:q(),options:a.Optional(Ie)},Ha=a.Union([C({...Xe,message:q()}),C({...Xe,script:q(),input:a.Optional(a.Any())}),C({...Xe,packageDirectory:a.String({minLength:1,description:"Absolute path of a RUN.md/setup.ts/tests.json package on the server. A local shell client inserts its actually existing package path; this is not an upload."}),input:a.Optional(a.Any())})]),R=(t,e="packages/ragents/src/domain/model.ts")=>a.Object({},{additionalProperties:!0,"x-typescript-type":t,"x-source":e,description:`Unabridged domain value ${t}; nested fields are deliberately an open JSON schema here.`}),Ea=C({eventId:a.String(),runId:a.String(),sequence:a.Integer({minimum:1}),schemaVersion:a.Literal(3),occurredAt:a.String(),actorId:a.String(),commandId:a.String(),correlationId:a.Union([a.String(),a.Null()]),causationId:a.Union([a.String(),a.Null()]),type:xa,payload:R("EventPayloads[EventType]","packages/ragents/src/domain/events.ts")}),Ga=C({id:a.String(),revision:a.Integer(),title:a.String(),ownerId:a.String(),primaryActorId:a.Union([a.String(),a.Null()]),createdAt:a.String(),forkedFrom:a.Union([C({runId:a.String(),sequence:a.Integer()}),a.Null()]),actors:a.Array(R("Actor")),inputs:a.Array(R("ActorInput")),turns:a.Array(R("Turn")),subscriptions:a.Array(R("EventSubscription")),pluginStates:a.Array(R("PluginState")),actions:a.Array(R("Action")),artifacts:a.Array(R("Artifact"))}),Va=C({provider:q(),model:q(),thinking:q()}),ma=C({provider:a.String(),model:a.String(),thinking:a.String(),models:a.Array(C({id:a.String(),provider:a.String(),label:a.String(),thinking:a.Array(a.String())}))}),W={listRuns:w({id:"ragents.overseer.listRuns",description:"List the runs the caller sees, with stable references; the global coordinators are not part of this list.",rights:["runs.read"],input:V,result:a.Array(Ua)}),createRun:w({id:"ragents.overseer.createRun",description:"Create a run with a server-side ID and title. Exactly one start form: message, installed script (id or unique title), or packageDirectory (existing local run script package). input is only allowed with script/packageDirectory. options selects start options such as ragents.startOptions.select, each only with its own rights. The result waits for preparation, check, test and installation; accepted does not yet confirm a finished model result.",rights:["runs.read","runs.write","runs.create"],input:Ha,result:pa}),readRun:w({id:"ragents.overseer.readRun",description:"Read the current unabridged RunView; nested domain values are documented as open JSON objects.",rights:["runs.read","runs.inspect"],input:C({run:xe}),result:Ga}),readEvents:w({id:"ragents.overseer.readEvents",description:"Read the complete journal page by page in sequence order. As long as hasMore is true, use nextAfter as after of the next request. type filters an exact event type.",rights:["runs.read","runs.inspect"],input:C({run:xe,after:a.Optional(a.Integer({minimum:0,default:0})),limit:a.Optional(a.Integer({minimum:1,maximum:200,default:50})),type:a.Optional(xa)}),result:C({...Ce,events:a.Array(Ea),nextAfter:a.Integer({minimum:0}),hasMore:a.Boolean()})}),sendMessage:w({id:"ragents.overseer.sendMessage",description:"Enqueue a chat message for the primary LLM actor; TypeScript as primary is rejected with actor-chat-unsupported. The result only confirms the enqueueing, neither processing nor completion. A running turn is not replaced by it.",rights:["runs.read","runs.write"],input:C({run:xe,message:q()}),result:pa}),stopRun:w({id:"ragents.overseer.stopRun",description:"Stop the run through its normal stop boundary and wait for the cleanup; the conversation is kept.",rights:["runs.read","runs.write"],input:C({run:xe}),result:C({...Ce,stopped:a.Literal(!0)})}),readCatalog:w({id:"ragents.overseer.readCatalog",description:"Read installed templates and start options with input schemas, default values and selectability. createRun starts messages, installed scripts or local packages via packageDirectory. Skills provide editable tasks for message; name the skill as the work instruction.",rights:["runs.read","runs.inspect"],input:V,result:C({entries:a.Array(a.Object({id:a.String(),title:a.String(),description:a.String(),action:a.Union([a.Literal("skill"),a.Literal("script")])},{additionalProperties:!0,"x-typescript-type":"PublicStartEntry"})),options:a.Array(C({id:a.String(),schema:Ie,value:a.Any(),selectable:a.Boolean(),presentation:a.Any()}))})}),readReference:w({id:"ragents.overseer.readReference",description:"Read a readable reference of all registered methods and channels directly from their contracts.",rights:["runs.read","runs.inspect"],input:V,result:a.String()}),readOpenRpc:w({id:"ragents.overseer.readOpenRpc",description:"Read OpenRPC 1.3 directly from the same contracts.",rights:["runs.read","runs.inspect"],input:V,result:Ie}),settings:{read:w({id:"ragents.overseer.settings.read",description:"Read the global coordinator's model selection with the available model catalog.",rights:["ragents.overseer.read"],input:V,result:ma}),save:w({id:"ragents.overseer.settings.save",description:"Set the global coordinator's model selection; it applies from the next answer on.",rights:["ragents.overseer.read","ragents.overseer.write","settings.write"],input:Va,result:ma})},coordinator:w({id:"ragents.overseer.coordinator",description:"Read the run ID of your own global coordinator: one per signed-in user, exactly one without sign-in.",rights:["ragents.overseer.read"],input:V,result:C({runId:a.String()})}),reset:w({id:"ragents.overseer.reset",description:"Reset the conversation of your own global coordinator including its model context; the model selection, other users' coordinators and all runs are kept.",rights:["ragents.overseer.read","ragents.overseer.write"],input:C({confirm:a.Literal(!0,{description:"The conversation reset must be confirmed explicitly."})}),result:a.Null()})};var Ke=o("@ragents/web/lib/labels","thinkingLabel");var Wa={read:()=>F.call(W.settings.read,{}),save:t=>F.call(W.settings.save,t)};function Na(t=Wa){let e={status:"loading"},d=0,u,c=new Set,L=n=>{e=n;for(let m of c)m()},l=n=>{let m=n instanceof Error?n.message:String(n);L(e.settings?{status:"ready",settings:e.settings,error:m}:{status:"failed",error:m})};return{read:()=>e,load:()=>{if(u)return u;if(e.status==="saving")return Promise.resolve();let n=d;return e.settings||L({status:"loading"}),u=t.read().then(m=>{d===n&&L({status:"ready",settings:m})}).catch(m=>{d===n&&l(m)}).finally(()=>{u=void 0}),u},save:async n=>{if(!e.settings||e.status==="saving")throw new Error("Wait until the settings are ready");d+=1,L({status:"saving",settings:e.settings});try{L({status:"ready",settings:await t.save(n)})}catch(m){throw l(m),m}},subscribe:n=>(c.add(n),()=>{c.delete(n)})}}var N=Na();var $=o("react/jsx-runtime","Fragment");var r=o("react/jsx-runtime","jsx");var g=o("react/jsx-runtime","jsxs");function ge(t=!0){let e=He(N.subscribe,N.read);return v(()=>{t&&N.load()},[t]),e}var Ze=(t,e)=>JSON.stringify([t,e]),Ia="mt-2 text-[0.73rem] text-muted-foreground",Ca="mt-2 flex flex-wrap items-center gap-2 text-[0.8rem] text-destructive",ga="min-w-0 max-w-[min(320px,100%)]";function Qe({active:t=!0,compact:e=!1,disabled:d=!1,actions:u}){let c=b(),L=c.can("ragents.overseer.read"),l=c.can("ragents.overseer.write")&&c.can("settings.write"),p=ge(t&&L),i=p.settings,n=i?.models.find(f=>f.id===i.model&&f.provider===i.provider),m=f=>{N.save(f).catch(()=>{})},x=i?.models.map(f=>({value:Ze(f.provider,f.id),label:f.label}))??[],I=n?.thinking.map(f=>({value:f,label:Ke(f)}))??[];return L?g("section",{"aria-label":"Model of the global coordinator",className:e?"min-w-0 flex-1":"min-w-0",children:[g("div",{className:e?"flex flex-nowrap items-center gap-2 max-md:gap-1":"flex flex-wrap items-center gap-2.5",children:[i&&n?g($,{children:[g(oe,{disabled:!l||d||p.status==="saving",items:x,value:Ze(i.provider,i.model),onValueChange:f=>{let h=i.models.find(A=>Ze(A.provider,A.id)===f);if(!h)throw new Error("The selected model is no longer available");let P=h.thinking.includes(i.thinking)?i.thinking:h.thinking[0];if(!P)throw new Error("No reasoning level is configured for the model");m({provider:h.provider,model:h.id,thinking:P})},children:[r(de,{"aria-label":"Model",className:`${ga} ${e?"flex-1":"flex-[0_1_auto]"}`,size:e?"sm":"default",children:r(le,{})}),r(re,{children:x.map(f=>r(ue,{value:f.value,children:f.label},f.value))})]}),g(oe,{disabled:!l||d||p.status==="saving"||n.thinking.length<2,items:I,value:i.thinking,onValueChange:f=>{f!==null&&m({provider:i.provider,model:i.model,thinking:f})},children:[r(de,{"aria-label":e?"Reasoning":"Reasoning level",className:`${ga} flex-none`,size:e?"sm":"default",children:r(le,{})}),r(re,{children:I.map(f=>r(ue,{value:f.value,children:f.label},f.value))})]})]}):p.status==="loading"?r("p",{className:`${Ia} min-w-0 flex-[0_1_auto]`,role:"status",children:"Loading models ..."}):!p.error&&r("p",{className:`${Ca} min-w-0 flex-[0_1_auto]`,role:"alert",children:"The stored model is missing from the model catalog."}),u&&r("div",{className:"ml-auto flex-none",children:u})]}),i&&n&&(!e||p.status==="saving")&&r("p",{className:Ia,role:"status",children:p.status==="saving"?"Saving ...":"Applies from the next answer on. The conversation history is kept."}),p.error&&g("div",{className:Ca,role:"alert",children:[r("span",{children:p.error}),r(M,{onClick:()=>{N.load()},variant:"outline",children:"Reload"})]})]}):null}var je="ragents.overseer.chat-steps",Je={modes:{coordinator:"grouped",agents:"grouped"},stepsVisible:!0,stepsExpandable:!0,selectable:!0};var ha=t=>typeof t=="string"&&!!t.trim()&&t.length<=La&&!/[\r\n]/.test(t);function Sa(){let t,e=!1,d=!0,u=0,c=0,L;return{event(l){if(l.kind==="reset"&&((l.reason==="conversation-reset"||t!=null&&t!==l.conversationId)&&(u=0,e=!0),t=l.conversationId,d=!0,c=u,L=void 0),l.kind==="replay-end"){t=l.conversationId,d=!1,u=c;let I=e?L:void 0;return e=!0,L=void 0,I}if(l.kind!=="plugin"||l.pluginId!==O||l.type!=="state-replaced")return;let p=l.payload;if(!p||typeof p!="object"||!("state"in p)||!("scope"in p)||!p.scope||typeof p.scope!="object"||!("kind"in p.scope)||p.scope.kind!=="run")return;let i=p.state;if(!i||typeof i!="object"||!("kind"in i)||i.kind!=="quick-answer")return;if(!l.journal||!l.journal.eventId?.trim()||!l.journal.conversationId?.trim()||!Number.isSafeInteger(l.journal.sequence)||l.journal.sequence<=0)throw new Error("The journal position of the quick answer is invalid.");if(t!=null&&t!==l.journal.conversationId||(t=l.journal.conversationId,l.journal.sequence<=(d?c:u)))return;if(d&&!e){c=l.journal.sequence;return}let n="question"in i?i.question:void 0,m="text"in i?i.text:void 0;if(!ha(n)||!ha(m))throw new Error("The quick question or quick answer is invalid.");let x={id:l.journal.eventId,question:n,text:m};if(d)c=l.journal.sequence,L=x;else return u=l.journal.sequence,x}}}var ka="flex h-header max-w-[720px] min-w-[190px] flex-[0_1_570px] items-center gap-1 border-r border-border bg-[color-mix(in_srgb,var(--primary)_4%,var(--card))] px-2 py-1 data-open:bg-accent max-md:min-w-[130px] max-md:flex-[0_1_210px] max-md:px-1 max-md:data-open:grow",wa="mx-4 my-2 flex-none text-[0.8rem] text-muted-foreground",Pa=async t=>{let e=Ne(await F.call(We.view,{runId:t}))?.primaryActorId;if(!e)throw new Error("The global coordinator is not available");await Ve(t,e)},za="mx-4 my-2 flex-none text-[0.8rem] text-destructive";function Aa(){let t=b().user?.id,[e,d]=k({});return v(()=>{let u=!0;return d({}),F.call(W.coordinator,{}).then(({runId:c})=>{u&&d({runId:c})},c=>{u&&d({error:c instanceof Error?c.message:String(c)})}),()=>{u=!1}},[t]),e}function Xa(t){let e=Aa();return e.runId?r(ce,{policy:Je,storageKeyPrefix:je,children:r(Ka,{...t,runId:e.runId},e.runId)}):r("div",{className:ka,"data-slot":"overseer-toolbar",role:"status",children:e.error&&r("span",{className:"text-[0.7rem] font-bold text-destructive",title:e.error,"aria-label":e.error,children:"!"})})}function Ka({open:t,onOpen:e,onClose:d,onBusy:u,userLocation:c,runId:L}){let l=b().can("ragents.overseer.write"),[p,i]=k(!1),[n,m]=k(!1),[x,I]=k(!1),f=B(!1),h=B(!1),P=B(null),A=B(null),he=B(null),U=B(!1),[Se,we]=k(null),[ke,Pe]=k(null),H=B(void 0),[Y,Da]=k(null),_e=B(null),Ba=G(s=>{he.current=s,Da(s)},[]),[$e]=k(Sa),[E,z]=k(),Ye=B(t);Ye.current=t;let[X,K]=k(),[Ma,ya]=k(),Ae=G(()=>{P.current?.reset(),m(!1),K(void 0),z(void 0)},[]),Fa=G(s=>{let S=$e.event(s);s.kind==="reset"&&((s.reason==="conversation-reset"||H.current!=null&&H.current!==s.conversationId)&&(f.current&&(h.current=!0),Ae()),H.current=s.conversationId),s.kind==="replay-end"&&(H.current=s.conversationId),S&&!Ye.current&&z(S)},[Ae,$e]),D=ie(L,Fa,p),ee=me(L,"primary","coordinator"),Z=ge(t),Ra=ne(L,"primary",JSON.stringify(Z.settings&&[Z.settings.provider,Z.settings.model])),ba=j(()=>Le(D.messages),[D.messages]),De=()=>{U.current=!1,z(void 0),e()};v(()=>{t&&(i(!0),z(void 0))},[t]),v(()=>u(D.running),[D.running,u]);let ea=G(()=>{let s=A.current;if(!s)return null;let S=s.closest("header")??s;return{contextElement:s,getBoundingClientRect:()=>{let aa=s.getBoundingClientRect();return new DOMRect(aa.left,S.getBoundingClientRect().bottom,aa.width,0)}}},[]),Ta=(s,S)=>{if(!n){if(s==="outside-press"){if(S.target instanceof Node&&A.current?.contains(S.target))return;d();return}s==="escape-key"&&(U.current=!(document.activeElement instanceof HTMLTextAreaElement&&A.current?.contains(document.activeElement)),d(),P.current?.focus())}},va=s=>{K(void 0),s().catch(S=>K(S instanceof Error?S.message:String(S)))},qa=async()=>{if(!f.current){f.current=!0,h.current=!1,I(!0),K(void 0);try{await F.call(W.reset,{confirm:!0}),Ae()}catch(s){h.current||K(s instanceof Error?s.message:String(s))}finally{f.current=!1,I(!1)}}},Be=p&&!D.connected?"No connection. Your draft is kept; sending is disabled.":void 0,Me=X??Ma??Z.error??Be;return g("div",{className:ka,"data-open":t,"data-slot":"overseer-toolbar",ref:A,onFocus:s=>{s.target instanceof HTMLTextAreaElement&&(U.current?U.current=!1:e())},onKeyDown:s=>{s.defaultPrevented||!t&&s.target instanceof HTMLTextAreaElement&&(s.key.length===1||s.key==="Enter")&&De()},children:[r("div",{className:"min-w-0 flex-1",onClick:s=>{s.target instanceof HTMLTextAreaElement&&De()},children:r(se,{...Ra,detailsContainer:Se,layout:"toolbar",handleRef:P,inputAriaControls:"overseer-dropdown",disabled:!l||x||n,sendDisabled:!D.connected||Z.status==="saving"||x,maxRows:2,rows:1,onErrorChange:ya,onSend:(s,S)=>D.send(s,S,c),onStop:l&&D.running?()=>{f.current||va(()=>Pa(L))}:void 0,running:D.running,texts:{placeholder:"Global coordinator",steeringPlaceholder:"Global coordinator"},toolbarRight:r(Qe,{active:t,compact:!0,disabled:x,actions:r(M,{"aria-label":"Reset conversation","aria-busy":x,disabled:!l||x||!D.connected,onClick:()=>m(!0),size:"sm",variant:"outline",children:x?"Resetting ...":"Reset"})}),toolbarLeft:r(pe,{className:"max-md:[&>span]:hidden",settings:ee})})}),g("span",{className:"flex min-w-0 flex-none items-center justify-end gap-1.5 empty:hidden",role:"status","aria-live":"polite",children:[D.running&&r("span",{className:"sr-only",children:"Working"}),Me&&r("span",{className:"text-[0.7rem] font-bold text-destructive",title:Me,"aria-label":Me,children:"!"})]}),r(ae,{modal:!1,open:E!==void 0,children:r(te,{align:"start",anchor:ea,"aria-atomic":"true","aria-live":"polite",className:"flex max-w-[calc(100vw-16px)] flex-row items-start gap-1 p-1.5 text-[0.76rem]",collisionPadding:8,finalFocus:!1,initialFocus:!1,role:"status",side:"bottom",style:{width:"min(max(calc(var(--anchor-width) * 2), 480px), var(--available-width))"},children:E&&g($,{children:[r(M,{className:"h-auto min-w-0 flex-1 justify-start rounded-lg px-2.5 py-2 text-left text-[0.76rem] leading-[1.45] font-normal whitespace-normal [overflow-wrap:anywhere]",variant:"ghost","aria-label":`Open history: ${E.question} ${E.text}`,onClick:()=>{De(),l?P.current?.focus():requestAnimationFrame(()=>ke?.focus())},children:g("span",{className:"grid min-w-0 gap-1",children:[r("span",{className:"text-muted-foreground",children:E.question}),r("strong",{className:"font-semibold",children:E.text})]})}),r(M,{"aria-label":"Close quick answer",className:"mt-1 flex-none rounded-full",onClick:()=>z(void 0),size:"icon-sm",title:"Close quick answer",variant:"ghost",children:r(_,{})})]})})}),r(ae,{modal:!1,open:t,onOpenChange:(s,S)=>{s||Ta(S.reason,S.event)},children:g(te,{align:"start",anchor:ea,"aria-label":"Global coordinator",className:"flex min-h-0 flex-col gap-0 overflow-hidden rounded-t-none rounded-b-panel border-t-2 border-t-primary p-0",collisionPadding:8,finalFocus:!1,id:"overseer-dropdown",initialFocus:!1,keepMounted:!0,ref:Ba,role:"region",side:"bottom",style:{width:"min(760px, var(--available-width))",height:"min(650px, var(--available-height))"},children:[r("div",{className:"flex-none border-b border-border-soft","data-tone":"overseer-details",ref:we}),n&&Y&&r(qe.Provider,{value:Y,children:r(ye,{open:!0,onOpenChange:s=>{!s&&!x&&m(!1)},modal:"trap-focus",disablePointerDismissal:!0,children:g(Fe,{initialFocus:_e,onBackdropClick:()=>{x||m(!1)},scope:"run",showCloseButton:!1,size:"small",children:[g(Te,{children:[r(ve,{children:"Reset conversation?"}),r(Re,{children:"History and model context are deleted. Running answers are stopped."})]}),r("p",{children:"Your runs and the model choice are kept."}),X&&r("p",{className:"text-[0.8rem] text-destructive",role:"alert",children:X}),g(be,{children:[r(M,{ref:_e,disabled:x,onClick:()=>m(!1),variant:"outline",children:"Cancel"}),r(M,{disabled:x,onClick:()=>{qa()},variant:"destructive",children:x?"Resetting ...":"Reset conversation"})]})]})})}),!l&&r("p",{className:wa,children:"You have read access to this conversation."}),Be&&r("p",{className:wa,role:"status",children:Be}),X&&r("p",{className:za,role:"alert",children:X}),r(fe,{announce:!1,className:"min-h-16! flex-1",scrollerRef:Pe,detailMode:ee.detailMode,emptyState:g("div",{className:"m-auto max-w-[480px] p-8 text-[0.9rem] leading-[1.6] text-muted-foreground max-md:p-5",children:[r("strong",{className:"text-foreground",children:"One chat for the whole workshop"}),r("p",{children:"Write your task in the title bar above. Answers about your runs and ongoing work appear here."})]}),messages:ba,running:D.running,showTimestamps:ee.showTimestamps,stepsExpandable:ee.stepsExpandable})]})})]})}function Za({userLocation:t}){let e=Aa();return e.runId?r(ce,{policy:Je,storageKeyPrefix:je,children:r(Qa,{runId:e.runId,userLocation:t},e.runId)}):r("p",{className:e.error?"m-auto p-6 text-center text-destructive":"m-auto p-6 text-center text-muted-foreground",role:"status",children:e.error??"Connecting to the global coordinator ..."})}function Qa({runId:t,userLocation:e}){let d=b().can("ragents.overseer.write"),u=ie(t),c=me(t,"primary","coordinator"),L=ge(),l=ne(t,"primary",JSON.stringify(L.settings&&[L.settings.provider,L.settings.model])),p=j(()=>Le(u.messages),[u.messages]),[i,n]=k(),m=i??(u.connected?void 0:"No connection. Your draft is kept; sending is disabled.");return r(Ge,{className:"flex h-full min-h-0 w-full min-w-0 flex-1 flex-col overflow-hidden",maxWidth:"880px",composer:g("div",{className:"[--qsl-input-card-radius:var(--radius-lg)]",children:[m&&r("p",{className:"text-[0.8rem] text-destructive",role:"alert",children:m}),r(se,{...l,disabled:!d,sendDisabled:!u.connected||L.status==="saving",maxRows:6,rows:1,onErrorChange:n,onSend:(x,I)=>u.send(x,I,e),onStop:d&&u.running?()=>{n(void 0),Pa(t).catch(x=>n(x instanceof Error?x.message:String(x)))}:void 0,running:u.running,texts:{placeholder:d?"Ask the global coordinator":"Read access to the global coordinator",steeringPlaceholder:"Ask the global coordinator"},toolbarLeft:r(pe,{settings:c})})]}),children:r(fe,{detailMode:c.detailMode,emptyState:g("div",{className:"m-auto max-w-[480px] p-8 text-center text-[0.9rem] leading-[1.6] text-muted-foreground max-md:p-5",children:[r("strong",{className:"text-foreground",children:"Global coordinator"}),r("p",{children:"No run is open. Ask about your runs or give a task; open or start a run through the overview at the top left."})]}),messages:p,running:u.running,showTimestamps:c.showTimestamps,stepsExpandable:c.stepsExpandable})})}var ud={id:O,settings:[{category:"models",order:10,readRight:"ragents.overseer.read",id:`${O}.model`,label:"Global coordinator",Settings:Qe}],overviewPanels:[{id:`${O}.chat`,placement:"toolbar",order:100,readRight:"ragents.overseer.read",Panel:Xa},{id:`${O}.idle`,placement:"idle",order:100,readRight:"ragents.overseer.read",Panel:Za}]};export{ud as webPlugin};
|
|
2
2
|
/*! Bundled license information:
|
|
3
3
|
|
|
4
4
|
lucide-react/dist/esm/shared/src/utils/toKebabCase.mjs:
|