openpond 0.0.50 → 0.0.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{app-layer-IMZRDGJN.js → app-layer-T26MAAGI.js} +2 -2
- package/dist/chunks/{app-server-runtime-LLCQV5U2.js → app-server-runtime-2P2727X6.js} +6 -6
- package/dist/chunks/{apps-E24RB6CK.js → apps-7KLTYKHN.js} +2 -2
- package/dist/chunks/{chunk-WMEDRQD3.js → chunk-3UPQUD6Y.js} +2 -2
- package/dist/chunks/{chunk-RSXT32DP.js → chunk-55KT7K5P.js} +483 -201
- package/dist/chunks/{chunk-NNSRF6UH.js → chunk-6QWTEC2D.js} +1 -1
- package/dist/chunks/{chunk-DRGFGJIZ.js → chunk-C4DAHPVI.js} +1 -1
- package/dist/chunks/{chunk-W2S2PF3L.js → chunk-EIRW6Z6S.js} +187 -21
- package/dist/chunks/{chunk-ZJBJQCQZ.js → chunk-EJURKADM.js} +4 -2
- package/dist/chunks/{chunk-SC5LMRWC.js → chunk-FFD2YSZR.js} +1 -1
- package/dist/chunks/{chunk-I5LFWAMT.js → chunk-JSRCXDIL.js} +40 -35
- package/dist/chunks/{chunk-QESBWYQV.js → chunk-KNKZSVGO.js} +2306 -2127
- package/dist/chunks/{chunk-L4G3SYBA.js → chunk-M2OSF2YN.js} +1 -1
- package/dist/chunks/{chunk-XI3OTQU6.js → chunk-US7DOPAH.js} +1503 -2
- package/dist/chunks/{cli-5B6DPVAX.js → cli-Z2CULBCU.js} +5 -5
- package/dist/chunks/{core-commands-TSUT45HF.js → core-commands-SND555SC.js} +3 -3
- package/dist/chunks/{desktop-test-BT5BGOPT.js → desktop-test-WSWXNSFS.js} +2 -2
- package/dist/chunks/{extension-BNWHZQ5W.js → extension-3IKF6YQE.js} +305 -170
- package/dist/chunks/{help-NWLRDXK2.js → help-DHGNXUA4.js} +1 -1
- package/dist/chunks/{opchat-YMN5TYHJ.js → opchat-XYKT5KKO.js} +2 -2
- package/dist/chunks/{organizations-QGD5FZFK.js → organizations-HKVC4CSA.js} +4 -4
- package/dist/chunks/{profile-RMDP5R5R.js → profile-PLWXQHKF.js} +3 -3
- package/dist/chunks/{project-agent-NQ72JSSY.js → project-agent-JNSP56KG.js} +2 -2
- package/dist/chunks/{sandbox-command-4WEYAANJ.js → sandbox-command-Z6LNNSSL.js} +2 -2
- package/dist/chunks/{sandbox-template-3KPEGEXQ.js → sandbox-template-FVW2UTI4.js} +3 -3
- package/dist/chunks/{src-Z2IT67PX.js → src-2TP42H76.js} +3 -4
- package/dist/chunks/{src-RMLMCS2A.js → src-R5VKB33T.js} +4733 -3832
- package/dist/chunks/{teams-bot-R2X326KD.js → teams-bot-FNPT4Q2B.js} +2 -2
- package/dist/chunks/{training-BR5A7SPU.js → training-5CPTZRVC.js} +81 -2
- package/dist/chunks/{workspaces-YOYCYS3T.js → workspaces-YLNB6DS7.js} +2 -2
- package/dist/cli.js +13 -13
- package/dist/index.js +7 -5
- package/dist/profile/profile-git.d.ts +22 -0
- package/dist/skills/openpond-taskset-authoring/SKILL.md +9 -1
- package/dist/skills/openpond-taskset-authoring/artifact.json +10 -5
- package/dist/skills/openpond-taskset-authoring/references/benchmarking.md +26 -0
- package/dist/web/assets/{AppDialog-BTOxCNC5.js → AppDialog-BEKS_Ixr.js} +1 -1
- package/dist/web/assets/{AppsView-Cm5x09IS.js → AppsView-CbuT2sT2.js} +1 -1
- package/dist/web/assets/{BrowserSidebar-CIPh5JIn.js → BrowserSidebar-DgqVeW5u.js} +1 -1
- package/dist/web/assets/CommandMenu-CQcaEB76.js +1 -0
- package/dist/web/assets/CommunityView-CYX6iFcg.js +1 -0
- package/dist/web/assets/CommunityView-DaIS0cHw.css +1 -0
- package/dist/web/assets/{ComposerCreateImproveStrip-CW2QuI7r.js → ComposerCreateImproveStrip-DY4SQbL4.js} +1 -1
- package/dist/web/assets/{GetStartedView--CbCnzFQ.js → GetStartedView-DnxeZaBB.js} +1 -1
- package/dist/web/assets/LabModelVersionDetailPage-DYTfYGWv.js +1 -0
- package/dist/web/assets/LabSkillSidebar-BpD-kjP_.js +1 -0
- package/dist/web/assets/LabsRoute-DDTgtCul.css +1 -0
- package/dist/web/assets/LabsRoute-DVC7eZCs.js +3 -0
- package/dist/web/assets/MainChatThread-DTiX_8MC.js +2 -0
- package/dist/web/assets/{MainPane-Bky_Rqcx.css → MainPane-BfVDe9f7.css} +1 -1
- package/dist/web/assets/MainPane-CNoHJkXy.js +6 -0
- package/dist/web/assets/{MarkdownText-DTBS9xe7.js → MarkdownText-_JhfBcQL.js} +4 -4
- package/dist/web/assets/Messages-Bo0-Uvcz.js +9 -0
- package/dist/web/assets/{NativeSkillSidebar-DSoPD42b.js → NativeSkillSidebar-CHQ87FW2.js} +1 -1
- package/dist/web/assets/{NewProjectDialog-CmXg2GK7.js → NewProjectDialog-B-1KuU5u.js} +1 -1
- package/dist/web/assets/OutputsPage-BSimpEpA.js +1 -0
- package/dist/web/assets/RightChatPanelStack-B8ZOyuFO.js +1 -0
- package/dist/web/assets/ScheduledWorkPage-Blwy1G8r.js +1 -0
- package/dist/web/assets/{SettingsView-CrXwXjZ1.css → SettingsView-C39BqlSI.css} +1 -1
- package/dist/web/assets/SettingsView-CTLTakyn.js +6 -0
- package/dist/web/assets/TeamChatView-Br3VdxhD.css +1 -0
- package/dist/web/assets/{TeamChatView-CB_0oRid.js → TeamChatView-dN3fUCbZ.js} +2 -2
- package/dist/web/assets/{TerminalOverlay-XhABQsCB.js → TerminalOverlay-CPVGeO7U.js} +1 -1
- package/dist/web/assets/{TrainingCreationPanel-ChsDr2GP.js → TrainingCreationPanel-ettNNJBP.js} +1 -1
- package/dist/web/assets/{TrainingDraftPanel-CDlpnno6.js → TrainingDraftPanel-DUJBuII1.js} +1 -1
- package/dist/web/assets/{UsageSettingsSection-NbX7_3Uz.js → UsageSettingsSection-BOZR3JE_.js} +1 -1
- package/dist/web/assets/WorkspaceDiffPanel-99MjzMkW.js +14 -0
- package/dist/web/assets/WorkspaceEnvironmentMenu-C3s3mTyu.js +32 -0
- package/dist/web/assets/{WorkspaceGitDialogs-C0PMpVfj.js → WorkspaceGitDialogs-BvurXjNP.js} +1 -1
- package/dist/web/assets/{WorkspaceMonacoEditor-6QNGzQUi.js → WorkspaceMonacoEditor-BCXg9mBQ.js} +3 -3
- package/dist/web/assets/{arrow-up-right-Cx2xjktp.js → arrow-up-right-DRIT5z3q.js} +1 -1
- package/dist/web/assets/{chevron-up-UF_r7JHT.js → chevron-up-Hglu-Zx3.js} +1 -1
- package/dist/web/assets/{circle-alert-BUHAQ7Du.js → circle-alert-Crh3Zr2m.js} +1 -1
- package/dist/web/assets/{cloud-upload-Cc_ZQEAm.js → cloud-upload-mSm9KIL4.js} +1 -1
- package/dist/web/assets/{cssMode-CrigFsxI.js → cssMode-CkQ4x6JA.js} +1 -1
- package/dist/web/assets/folder-DMeODEQJ.js +1 -0
- package/dist/web/assets/folder-git-2-B8TV5i0V.js +1 -0
- package/dist/web/assets/{folder-open-D7a4t258.js → folder-open-DXaun_C3.js} +1 -1
- package/dist/web/assets/{folder-plus-CmeHTj5W.js → folder-plus-CUbTwu82.js} +1 -1
- package/dist/web/assets/{git-branch-CaVUghsI.js → git-branch-CUlgF0kK.js} +1 -1
- package/dist/web/assets/{git-commit-horizontal-oiDAVV_Y.js → git-commit-horizontal-DAQfyhbS.js} +1 -1
- package/dist/web/assets/{htmlMode-CLzM5GNi.js → htmlMode-BfyAplZo.js} +1 -1
- package/dist/web/assets/index-Blindd8c.js +1 -0
- package/dist/web/assets/index-CDJX5ZxL.js +174 -0
- package/dist/web/assets/index-CE2hroF6.css +1 -0
- package/dist/web/assets/{info-dTkimobU.js → info-Ll3PkeGE.js} +1 -1
- package/dist/web/assets/{jsonMode-BBF67cOE.js → jsonMode-C9Vibh0P.js} +1 -1
- package/dist/web/assets/{lspLanguageFeatures-DHtN2nxz.js → lspLanguageFeatures-CFoA9--Z.js} +1 -1
- package/dist/web/assets/{monaco.contribution-DtM9AdPi.js → monaco.contribution-C2q-tDuk.js} +2 -2
- package/dist/web/assets/{monaco.contribution-riAIDf7J.js → monaco.contribution-C8tRjUqy.js} +2 -2
- package/dist/web/assets/{monaco.contribution-C_GWU01R.js → monaco.contribution-Co4ZPnCC.js} +2 -2
- package/dist/web/assets/{monaco.contribution-BClTZJd2.js → monaco.contribution-vWDjhuCI.js} +2 -2
- package/dist/web/assets/{play-CjWTsI9z.js → play-lC5KpmRD.js} +1 -1
- package/dist/web/assets/{python-CvZQM_g2.js → python-I5xkyvMs.js} +1 -1
- package/dist/web/assets/{refresh-cw-CeHT_tXT.js → refresh-cw-8a_wz4tX.js} +1 -1
- package/dist/web/assets/{save-CmJ92Odx.js → save-Dj9ex3Ce.js} +1 -1
- package/dist/web/assets/{square-B00f_944.js → square-DfEM9XgY.js} +1 -1
- package/dist/web/assets/square-pen-CgX3HoJ6.js +1 -0
- package/dist/web/assets/{toggleHighContrast-C6N52VOS.js → toggleHighContrast-BkNzz1Bg.js} +1 -1
- package/dist/web/assets/{training-model-data-B7-1Bxil.js → training-model-data-V8276E5q.js} +1 -1
- package/dist/web/assets/{tsMode-CDIfvnHn.js → tsMode-CNwaV0ZJ.js} +1 -1
- package/dist/web/assets/{upload-DK0-5jXz.js → upload-Co5zYY9Z.js} +1 -1
- package/dist/web/assets/{useLocalAgentSchedules-BUkZjV9E.js → useLocalAgentSchedules-QY4_XS2F.js} +1 -1
- package/dist/web/assets/wifi-off-CFzyn7Tf.js +1 -0
- package/dist/web/assets/{workers-BfcjsZ3C.js → workers-DqFxl1zu.js} +1 -1
- package/dist/web/assets/{yaml-CNqgAihH.js → yaml-Bbm66uDK.js} +1 -1
- package/dist/web/index.html +2 -2
- package/docs/command-reference.md +6 -1
- package/package.json +1 -1
- package/dist/web/assets/CommandMenu-DdR82TLd.js +0 -1
- package/dist/web/assets/CommunityView-DSik4sd2.css +0 -1
- package/dist/web/assets/CommunityView-Dqu4cos1.js +0 -1
- package/dist/web/assets/LabModelVersionDetailPage-BPUvR5XP.js +0 -1
- package/dist/web/assets/LabSkillSidebar-CnuyFZ1G.js +0 -1
- package/dist/web/assets/LabsRoute-CYk2dzQp.js +0 -3
- package/dist/web/assets/LabsRoute-CoSPO4HR.css +0 -1
- package/dist/web/assets/MainChatThread-0Tc95p0t.js +0 -2
- package/dist/web/assets/MainPane-Bke4JEHC.js +0 -6
- package/dist/web/assets/Messages-Bae_sFx5.js +0 -9
- package/dist/web/assets/OutputsPage-XmIreC0M.js +0 -1
- package/dist/web/assets/RightChatPanelStack-BMOtbjus.js +0 -1
- package/dist/web/assets/ScheduledWorkPage-Cn5a9VLV.js +0 -1
- package/dist/web/assets/SettingsView-DXF8z3P2.js +0 -6
- package/dist/web/assets/TeamChatView-Cgxm-pKA.css +0 -1
- package/dist/web/assets/WorkspaceDiffPanel-jaJU08NH.js +0 -14
- package/dist/web/assets/WorkspaceEnvironmentMenu-D0nvQmmj.js +0 -32
- package/dist/web/assets/index-De6p2npi.js +0 -1
- package/dist/web/assets/index-UUM3pwfd.css +0 -1
- package/dist/web/assets/index-Ure41UF0.js +0 -178
- package/dist/web/assets/monitor-POfnZCWw.js +0 -1
- package/dist/web/assets/reply-BkH8nKWG.js +0 -1
- package/dist/web/assets/square-pen-LHr8bFfZ.js +0 -1
- package/dist/web/assets/wifi-off-BQGq-son.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as l,j as e,X as H,at as M,ca as O}from"./index-CDJX5ZxL.js";import{S as Z,W as ee,B as se,a as ne}from"./wifi-off-CFzyn7Tf.js";import{R as F}from"./refresh-cw-8a_wz4tX.js";import{g as te,h as ie,i as ae,j as le,r as oe,k as re,R as ce}from"./MainPane-CNoHJkXy.js";import{T as de,b as J}from"./MarkdownText-_JhfBcQL.js";import{S as me}from"./square-pen-CgX3HoJ6.js";import"./cloud-upload-mSm9KIL4.js";import"./folder-DMeODEQJ.js";import"./arrow-up-right-DRIT5z3q.js";import"./square-DfEM9XgY.js";import"./folder-open-DXaun_C3.js";const ue=2e4,R=10,he=12*1024*1024,ye=new Set(["image/png","image/jpeg","image/webp","image/gif"]);function ge(s){const[n,m]=l.useState(""),[a,y]=l.useState(0),[c,u]=l.useState([]),[f,i]=l.useState(null),[b,h]=l.useState(!1),[p,C]=l.useState([]),[N,v]=l.useState(0),[o,I]=l.useState(null),k=l.useRef(null),E=l.useRef(null),D=l.useRef(c);D.current=c;const g=l.useMemo(()=>xe(n,a),[n,a]),S=g?`${g.start}:${g.end}:${g.query}`:null,T=g?.query??null,w=l.useMemo(()=>{if(!g)return[];const t=new Map;for(const d of[...s.members,...p])t.set(d.userId,d);const r=g.query.toLowerCase();return[...t.values()].filter(d=>`${d.handle??""} ${d.name??""}`.toLowerCase().includes(r)).slice(0,8)},[g,s.members,p]),B=!!(g&&S!==o&&w.length>0),L=!!(s.disabled||s.busy||b),U=!L&&(!!n.trim()||c.length>0);l.useEffect(()=>{if(T==null){C([]);return}let t=!0;const r=window.setTimeout(()=>{s.onSearchMembers(T).then(d=>{t&&C(d)},()=>{t&&C([])})},150);return()=>{t=!1,window.clearTimeout(r)}},[T,s.onSearchMembers]),l.useEffect(()=>{v(0)},[S]),l.useEffect(()=>()=>K(D.current),[]);async function $(t){if(t?.preventDefault(),!!U){i(null),h(!0);try{const r=await Promise.all(c.map(oe));if(!await s.onSend({body:n,mentionUserIds:fe(n,s.members),attachments:r,replyToMessageId:s.replyTo?.id??null}))return;K(c),m(""),y(0),u([]),s.onCancelReply()}catch(r){i(r instanceof Error?r.message:String(r))}finally{h(!1)}}}function V(t){if(B){if(t.key==="ArrowDown"){t.preventDefault(),v(r=>(r+1)%w.length);return}if(t.key==="ArrowUp"){t.preventDefault(),v(r=>(r-1+w.length)%w.length);return}if(t.key==="Enter"||t.key==="Tab"){t.preventDefault(),z(w[N]??w[0]);return}if(t.key==="Escape"){t.preventDefault(),I(S);return}}t.key!=="Enter"||t.shiftKey||t.nativeEvent.isComposing||(t.preventDefault(),$())}function G(t){if(!t)return;i(null);const r=Math.max(0,R-c.length);if(r===0){i(`You can attach up to ${R} images.`),A();return}const d=[...t],j=d.slice(0,r),P=j.find(x=>!ye.has(x.type)),q=j.find(x=>x.size<=0||x.size>he);if(P){i(`${P.name} is not a supported image type.`),A();return}if(q){i(`${q.name} must be smaller than 12 MB.`),A();return}const Q=j.map(x=>({id:re(),file:x,name:x.name,mediaType:x.type,sizeBytes:x.size,kind:"image",previewUrl:URL.createObjectURL(x)}));u(x=>[...x,...Q]),d.length>r&&i(`Only ${R} images can be attached to one message.`),A()}function W(t){u(r=>{const d=r.find(j=>j.id===t);return d?.previewUrl&&URL.revokeObjectURL(d.previewUrl),r.filter(j=>j.id!==t)})}function A(){k.current&&(k.current.value="")}function z(t){if(!g)return;const r=`@${X(t)} `,d=`${n.slice(0,g.start)}${r}${n.slice(g.end)}`,j=g.start+r.length;m(d),y(j),I(null),window.requestAnimationFrame(()=>E.current?.focusAtPromptIndex(j))}return e.jsxs("form",{className:`composer dock community-composer${c.length>0?" has-attachments":""}${f?" has-attachment-error":""}`,onSubmit:$,children:[s.replyTo?e.jsxs("div",{className:"community-composer-reply",children:[e.jsxs("span",{children:[e.jsx("strong",{children:"Replying to"}),s.replyTo.body.slice(0,100)||"message"]}),e.jsx("button",{type:"button","aria-label":"Cancel reply",onClick:s.onCancelReply,children:e.jsx(H,{size:13})})]}):null,B?e.jsx("div",{className:"community-mention-menu",role:"listbox","aria-label":"Community members",children:w.map((t,r)=>e.jsxs("button",{type:"button",role:"option","aria-selected":r===N,onMouseDown:d=>d.preventDefault(),onClick:()=>z(t),children:[e.jsx("strong",{children:t.name??t.handle??"Community member"}),t.handle?e.jsxs("small",{children:["@",t.handle]}):null]},t.userId))}):null,e.jsxs("div",{className:"composer-input-shell",children:[c.length>0?e.jsx("div",{className:"composer-attachments","aria-label":"Selected attachments",children:c.map(t=>e.jsx(te,{attachment:t,onRemove:()=>W(t.id)},t.id))}):null,f?e.jsx("div",{className:"composer-attachment-error",role:"status",children:f}):null,e.jsx("div",{className:"composer-textarea-frame",onClick:t=>{t.target===t.currentTarget&&E.current?.focusAtPromptIndex(a)},children:e.jsx(ie,{ref:E,disabled:L,onCursorChange:y,onKeyDown:V,onPromptChange:(t,r)=>{const d=t.slice(0,ue);m(d),y(Math.min(r,d.length))},onTokenPositionChange:()=>{},placeholder:s.disabled?"Accept the community rules to post":"Message community",prompt:n,token:null})}),e.jsxs("div",{className:"composer-primary-controls team-chat-composer-controls",children:[e.jsx("input",{ref:k,className:"composer-file-input",hidden:!0,type:"file",accept:"image/png,image/jpeg,image/webp,image/gif",multiple:!0,onChange:t=>G(t.currentTarget.files)}),e.jsx("button",{type:"button",className:"composer-icon","aria-label":"Attach images",disabled:L||c.length>=R,onClick:()=>k.current?.click(),children:e.jsx(ae,{size:17})}),e.jsx("div",{className:"composer-spacer"}),e.jsx("button",{type:"submit",className:"send-button","aria-label":"Send message",disabled:!U,children:e.jsx(le,{size:17})})]})]})]})}function xe(s,n=s.length){const m=Math.max(0,Math.min(n,s.length)),a=/(?:^|\s)@([\w-]*)$/.exec(s.slice(0,m));return!a||a.index==null?null:{start:a.index+a[0].indexOf("@"),end:m,query:a[1]??""}}function fe(s,n){const m=new Set([...s.matchAll(/(?:^|\s)@([\w-]+)/g)].map(a=>a[1]?.toLowerCase()));return n.filter(a=>m.has(X(a).toLowerCase())).map(a=>a.userId)}function X(s){return s.handle??s.name?.replace(/[^\w-]/g,"")??s.userId}function K(s){for(const n of s)n.previewUrl&&URL.revokeObjectURL(n.previewUrl)}function be(s){const[n,m]=l.useState(!1),[a,y]=l.useState(s.message.body),c=s.message.refs.find(i=>i.refType==="message_reply"),u=c?s.messagesById.get(c.refId)??null:null,f=u?.authorUserId?s.membersById.get(u.authorUserId)??null:null;return e.jsxs("article",{className:`community-message${s.own?" own":""}`,id:`community-message-${s.message.id}`,children:[e.jsx("div",{className:"community-avatar",children:je(s.author?.name??s.author?.handle??"?")}),e.jsxs("div",{className:"community-message-content",children:[e.jsxs("header",{children:[e.jsx("strong",{children:s.author?.name??s.author?.handle??"Community member"}),e.jsx("time",{dateTime:s.message.createdAt,children:pe(s.message.createdAt)}),s.message.editedAt?e.jsx("span",{children:"edited"}):null,s.message.deletedAt?null:e.jsxs("div",{className:"community-message-actions",children:[e.jsx("button",{type:"button","aria-label":"Reply",onClick:()=>s.onReply(s.message),children:e.jsx(ce,{size:13})}),s.own?e.jsx("button",{type:"button","aria-label":"Edit",onClick:()=>m(!0),children:e.jsx(me,{size:13})}):null,s.own?e.jsx("button",{type:"button","aria-label":"Delete",onClick:()=>{s.onDelete(s.message.id)},children:e.jsx(de,{size:13})}):null]})]}),c?e.jsxs("button",{type:"button",className:"community-reply-quote",onClick:()=>document.getElementById(`community-message-${c.refId}`)?.scrollIntoView({behavior:"smooth",block:"center"}),children:[e.jsx("strong",{children:f?.name??"Community member"}),e.jsx("span",{children:u?.deletedAt?"Message deleted":u?.body??String(c.preview.body??"Earlier message")})]}):null,n?e.jsxs("form",{className:"community-message-edit",onSubmit:i=>{i.preventDefault(),s.onEdit(s.message.id,a).then(b=>{b&&m(!1)})},children:[e.jsx("textarea",{autoFocus:!0,value:a,onChange:i=>y(i.currentTarget.value)}),e.jsxs("div",{children:[e.jsx("button",{type:"button",onClick:()=>m(!1),children:"Cancel"}),e.jsx("button",{type:"submit",disabled:!a.trim(),children:"Save"})]})]}):s.message.deletedAt?e.jsx("div",{className:"community-message-deleted",children:"Message deleted"}):e.jsx(J,{content:s.message.body}),!s.message.deletedAt&&s.message.attachments.length>0?e.jsx("div",{className:"community-message-attachments",children:s.message.attachments.map(i=>s.attachmentsAccessible?e.jsxs("button",{type:"button",onClick:()=>{s.onDownloadAttachment(i.id)},children:[e.jsx("span",{children:i.name}),e.jsx("small",{children:_(i.sizeBytes)})]},i.id):e.jsxs("div",{className:"community-attachment-placeholder",children:[e.jsx("span",{children:i.name}),e.jsxs("small",{children:["Join to view · ",_(i.sizeBytes)]})]},i.id))}):null]})]})}function je(s){return s.split(/\s+/).slice(0,2).map(n=>n[0]?.toUpperCase()??"").join("")||"?"}function pe(s){const n=new Date(s);return Number.isNaN(n.getTime())?"":n.toLocaleTimeString([],{hour:"numeric",minute:"2-digit"})}function _(s){return s<1024?`${s} B`:s<1024*1024?`${Math.round(s/1024)} KB`:`${(s/1024/1024).toFixed(1)} MB`}function ve(s){const[n,m]=l.useState(!1),a=l.useRef(null),y=l.useRef(s.onClose);l.useEffect(()=>m(!1),[s.rules.id]),l.useEffect(()=>{y.current=s.onClose},[s.onClose]),l.useEffect(()=>{const u=document.activeElement instanceof HTMLElement?document.activeElement:null,f=a.current,i=()=>[...f?.querySelectorAll('button:not([disabled]), input:not([disabled]), [href], [tabindex]:not([tabindex="-1"])')??[]];i()[0]?.focus();const b=h=>{if(h.key==="Escape"){h.preventDefault(),y.current();return}if(h.key!=="Tab")return;const p=i();if(p.length===0){h.preventDefault(),f?.focus();return}const C=p[0],N=p.at(-1);h.shiftKey&&document.activeElement===C?(h.preventDefault(),N.focus()):!h.shiftKey&&document.activeElement===N&&(h.preventDefault(),C.focus())};return document.addEventListener("keydown",b),()=>{document.removeEventListener("keydown",b),u?.focus()}},[]);const c=s.mode!=="review";return e.jsx("div",{className:"community-dialog-backdrop",role:"presentation",onMouseDown:s.onClose,children:e.jsxs("section",{ref:a,className:"community-rules-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"community-rules-title",tabIndex:-1,onMouseDown:u=>u.stopPropagation(),children:[e.jsxs("header",{children:[e.jsxs("div",{children:[e.jsxs("small",{children:["Community rules · version ",s.rules.version]}),e.jsx("h2",{id:"community-rules-title",children:s.rules.title})]}),e.jsx("button",{type:"button","aria-label":"Close rules",onClick:s.onClose,children:e.jsx(H,{size:16})})]}),e.jsx("div",{className:"community-rules-body",children:e.jsx(J,{content:s.rules.bodyMarkdown})}),e.jsxs("footer",{children:[c?e.jsxs("label",{className:"community-rules-acceptance",children:[e.jsx("input",{type:"checkbox",checked:n,onChange:u=>m(u.currentTarget.checked)}),e.jsx("span",{children:"I have read and agree to follow these rules."})]}):e.jsx("span",{}),e.jsxs("div",{children:[e.jsx("button",{type:"button",className:"secondary",onClick:s.onClose,children:"Cancel"}),c?e.jsx("button",{type:"button",disabled:!n||s.busy,onClick:()=>{s.onAccept().then(u=>{u&&s.onClose()})},children:s.busy?"Saving…":s.mode==="join"?"Agree and join":"Accept updated rules"}):null]})]})]})})}function De({communities:s,chat:n,currentUserId:m}){M(s.discoveryError),M(s.previewError),M(s.membershipError?.message),M(n.channelsError,{prefix:"Channels"}),M(n.messagesError,{prefix:"Messages"}),M(n.actionError);const[a,y]=l.useState(null),[c,u]=l.useState(null),f=l.useRef(null),i=s.preview,b=i?.membership?.status==="active",h=!!i?.capabilities.requiresRulesAcceptance,p=l.useMemo(()=>new Map(n.members.map(o=>[o.userId,o])),[n.members]),C=l.useMemo(()=>new Map(n.messages.map(o=>[o.id,o])),[n.messages]),N=n.messages.at(-1)?.sequence??0;if(l.useEffect(()=>{const o=f.current;o&&(o.scrollTop=o.scrollHeight)},[n.selectedChannelId,N]),l.useEffect(()=>{u(null),h&&i?.currentRules&&y("reaccept")},[i?.currentRules,h]),!s.selectedSummary)return e.jsx("section",{className:"community-empty-page",children:e.jsxs("div",{className:"community-discovery-card",children:[e.jsx(O,{size:30}),e.jsx("h1",{children:"Discover communities"}),e.jsx("p",{children:s.discoveryLoading&&s.items.length===0?"Finding communities…":"Preview public conversations and join after accepting each community's rules."}),s.items.length>0?e.jsx("div",{className:"community-discovery-list",children:s.items.map(o=>e.jsxs("button",{type:"button",onClick:()=>s.selectCommunity(o.id),children:[e.jsx(Y,{name:o.displayName,imageUrl:o.imageUrl}),e.jsxs("span",{children:[e.jsx("strong",{children:o.displayName}),e.jsx("small",{children:o.description})]}),e.jsx("em",{children:o.membership?.status==="active"?"Joined":o.featuredAt?"Featured":`${o.memberCount.toLocaleString()} members`})]},o.id))}):s.discoveryLoading?null:e.jsx("div",{className:"community-state",children:"No public communities are available yet."}),e.jsxs("div",{className:"community-discovery-actions",children:[e.jsxs("button",{type:"button",onClick:()=>{s.refresh()},disabled:s.discoveryLoading,children:[e.jsx(F,{size:14})," Refresh"]}),s.nextCursor?e.jsx("button",{type:"button",className:"secondary",onClick:()=>{s.loadMore()},disabled:s.discoveryLoading,children:"Load more"}):null]})]})});if(!i&&s.previewLoading)return e.jsx("section",{className:"community-empty-page",children:e.jsxs("div",{className:"community-empty-card",children:[e.jsx("span",{className:"community-spinner"})," Loading community…"]})});if(!i)return e.jsx("section",{className:"community-empty-page",children:e.jsxs("div",{className:"community-empty-card",children:[e.jsx("h1",{children:s.selectedSummary.displayName}),e.jsx("div",{className:"community-state",children:"This community preview is unavailable."}),e.jsxs("button",{type:"button",onClick:()=>s.selectCommunity(s.selectedSummary.id),children:[e.jsx(F,{size:14})," Retry preview"]})]})});const v=i.currentRules;return e.jsxs("section",{className:"community-view",children:[e.jsxs("header",{className:"community-header",children:[e.jsxs("div",{className:"community-heading",children:[e.jsx(Y,{name:i.displayName,imageUrl:i.imageUrl}),e.jsxs("div",{children:[e.jsx("small",{children:i.displayName}),e.jsx("h1",{children:n.selectedChannel?`# ${n.selectedChannel.displayName}`:i.displayName}),e.jsx("p",{children:n.selectedChannel?.topic||i.description})]})]}),e.jsxs("div",{className:"community-header-actions",children:[e.jsxs("span",{className:"community-member-count",children:[e.jsx(O,{size:14})," ",i.memberCount.toLocaleString()]}),v?e.jsxs("button",{type:"button",className:"secondary",onClick:()=>y("review"),children:[e.jsx(Z,{size:14})," Rules"]}):null,b?e.jsx(Ce,{mode:i.membership?.notificationMode??"mentions",busy:s.membershipBusy,onMode:s.updateNotifications,onLeave:s.leave}):null]})]}),e.jsxs("div",{className:"community-chat-main conversation-surface-main",children:[e.jsxs("div",{className:"community-chat-notices",children:[b?h?e.jsxs("div",{className:"community-preview-banner warning",children:[e.jsxs("div",{children:[e.jsx("strong",{children:"The rules have changed"}),e.jsx("span",{children:"Accept the current rules to continue reading live updates and posting."})]}),e.jsx("button",{type:"button",disabled:!v||s.membershipBusy,onClick:()=>y("reaccept"),children:"Review updated rules"})]}):null:e.jsxs("div",{className:"community-preview-banner",children:[e.jsxs("div",{children:[e.jsxs("strong",{children:["Previewing ",i.displayName]}),e.jsx("span",{children:"Read the public conversation, then accept the rules to join and post."})]}),e.jsx("button",{type:"button",disabled:!v||s.membershipBusy,onClick:()=>y("join"),children:"Join community"})]}),n.realtimeError&&b&&!h?e.jsxs("div",{className:"community-realtime-state",children:[e.jsx(ee,{size:14}),e.jsx("span",{children:"Live updates are reconnecting. Loaded messages are still available."})]}):null,n.lostMembership?e.jsx("div",{className:"community-state error",children:"Your membership changed. Refresh the community before continuing."}):null,n.channelsError?e.jsx("button",{type:"button",className:"community-state",onClick:()=>{n.loadChannels()},children:"Retry loading channels"}):null]}),e.jsxs("div",{className:"community-message-pane conversation-message-scroll",ref:f,role:"log","aria-live":"polite","aria-relevant":"additions text","aria-busy":n.messagesLoading,"aria-label":n.selectedChannel?`${i.displayName}, ${n.selectedChannel.displayName}`:i.displayName,tabIndex:0,children:[n.hasMoreBefore?e.jsx("button",{type:"button",className:"community-load-older",disabled:n.olderMessagesLoading,onClick:()=>{n.loadOlder()},children:n.olderMessagesLoading?"Loading…":"Load earlier messages"}):null,n.messagesLoading&&n.messages.length===0?e.jsx("div",{className:"community-message-state",children:"Loading messages…"}):null,n.messagesError?e.jsxs("div",{className:"community-message-state",children:["Messages are unavailable. ",e.jsx("button",{type:"button",onClick:()=>{n.loadMessages()},children:"Retry"})]}):null,!n.messagesLoading&&!n.messagesError&&n.messages.length===0?e.jsx("div",{className:"community-message-state",children:"No messages in this channel yet."}):null,n.messages.map(o=>e.jsx(be,{message:o,author:o.authorUserId?p.get(o.authorUserId)??null:null,own:o.authorUserId===m,attachmentsAccessible:!n.previewMode,membersById:p,messagesById:C,onReply:u,onEdit:n.editMessage,onDelete:n.deleteMessage,onDownloadAttachment:n.downloadAttachment},o.id))]}),b?e.jsxs("div",{className:"community-composer-wrap conversation-composer-shell",children:[n.failedSend?e.jsxs("div",{className:"community-failed-send",children:[e.jsx("span",{children:"Message not sent."}),e.jsx("button",{type:"button",disabled:n.sending,onClick:()=>{n.retrySend()},children:"Retry"}),e.jsx("button",{type:"button",onClick:n.dismissFailedSend,children:"Dismiss"})]}):null,e.jsx(ge,{members:n.members,replyTo:c,busy:n.sending,disabled:h||n.lostMembership||!n.selectedChannel||n.selectedChannel.postingPolicy==="admins"&&i.membership?.role==="member",onCancelReply:()=>u(null),onSearchMembers:n.searchMembers,onSend:n.sendMessage})]}):null]}),a&&v?e.jsx(ve,{rules:v,mode:a,busy:s.membershipBusy,onAccept:a==="join"?s.join:s.acceptRules,onClose:()=>y(null)}):null]})}function Ce(s){const[n,m]=l.useState(!1);return e.jsxs("div",{className:"community-membership-menu",children:[e.jsxs("button",{type:"button",className:"secondary","aria-expanded":n,onClick:()=>m(a=>!a),children:[s.mode==="none"?e.jsx(se,{size:14}):e.jsx(ne,{size:14})," Joined"]}),n?e.jsxs("div",{className:"community-membership-popover",children:[e.jsx("strong",{children:"Notifications"}),["mentions","all","none"].map(a=>e.jsxs("label",{children:[e.jsx("input",{type:"radio",name:"community-notifications",checked:s.mode===a,disabled:s.busy,onChange:()=>{s.onMode(a)}})," ",a==="mentions"?"Mentions":a==="all"?"All messages":"Nothing"]},a)),e.jsx("button",{type:"button",className:"danger",disabled:s.busy,onClick:()=>{window.confirm("Leave this community? You can join again later by accepting the current rules.")&&s.onLeave().then(a=>{a&&m(!1)})},children:"Leave community"})]}):null]})}function Y({name:s,imageUrl:n}){return n?e.jsx("img",{className:"community-icon",src:n,alt:""}):e.jsx("span",{className:"community-icon fallback",children:s.slice(0,2).toUpperCase()})}export{De as CommunityView};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.main-pane.community-active{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);min-height:0;overflow:hidden}.main-pane.community-active>.community-view,.main-pane.community-active>.community-empty-page{grid-column:1;grid-row:2}.community-view{display:grid;grid-template-rows:auto minmax(0,1fr);width:100%;height:100%;min-width:0;min-height:0;overflow:hidden;background:var(--bg);color:var(--text)}.community-chat-main{--conversation-surface-rows: auto minmax(0, 1fr) auto;overflow:hidden}.community-chat-notices{grid-row:1;max-height:38vh;overflow-y:auto}.community-chat-notices:empty{display:none}.community-message-pane{grid-row:2}.community-composer-wrap{grid-row:3}.community-header{display:flex;min-width:0;min-height:74px;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid var(--border);background:var(--bg);padding:12px 20px}.community-heading,.community-header-actions,.community-heading>div,.community-member-count,.community-preview-banner,.community-realtime-state,.community-rules-dialog>header,.community-rules-dialog>footer,.community-rules-dialog footer>div{display:flex;align-items:center}.community-heading{min-width:0;gap:12px}.community-heading>div{min-width:0;align-items:flex-start;flex-direction:column}.community-heading small{color:var(--muted);font-size:11px}.community-heading h1{margin:0;color:var(--text);font-size:16px;line-height:1.3}.community-heading p{max-width:650px;overflow:hidden;margin:2px 0 0;color:var(--muted);font-size:12px;text-overflow:ellipsis;white-space:nowrap}.community-icon{width:38px;height:38px;flex:0 0 auto;border-radius:8px;object-fit:cover}.community-icon.fallback{display:grid;place-items:center;background:#29433b;color:#d1fae5;font-size:12px;font-weight:700}.community-header-actions{flex:0 0 auto;gap:8px}.community-member-count{gap:5px;color:var(--muted);padding:6px 8px;font-size:12px}.community-header button,.community-preview-banner button,.community-empty-card button,.community-discovery-card button,.community-rules-dialog button{display:inline-flex;min-height:29px;align-items:center;gap:6px;border:0;border-radius:7px;background:#e8e8e8;color:#181818;padding:6px 10px;font:inherit;font-size:12px;font-weight:600;cursor:pointer}.community-header button:hover:not(:disabled),.community-preview-banner button:hover:not(:disabled),.community-empty-card button:hover:not(:disabled),.community-discovery-card button:hover:not(:disabled),.community-rules-dialog button:hover:not(:disabled){background:#fff}.community-header button.secondary,.community-rules-dialog button.secondary,.community-discovery-actions .secondary{border:1px solid var(--border);background:#242424;color:var(--text)}.community-header button.secondary:hover:not(:disabled),.community-rules-dialog button.secondary:hover:not(:disabled),.community-discovery-actions .secondary:hover:not(:disabled){background:#2d2d2d}.community-header button:disabled,.community-preview-banner button:disabled,.community-empty-card button:disabled,.community-discovery-card button:disabled,.community-rules-dialog button:disabled{cursor:default;opacity:.5}.community-preview-banner{justify-content:space-between;gap:20px;border-bottom:1px solid rgba(45,212,191,.24);background:#2dd4bf12;padding:10px 20px}.community-preview-banner.warning{border-color:#f59e0b4d;background:#f59e0b14}.community-preview-banner>div{display:flex;flex-direction:column;gap:2px}.community-preview-banner strong,.community-preview-banner span{font-size:12px}.community-preview-banner span{color:var(--muted-strong)}.community-realtime-state{gap:7px;border-bottom:1px solid rgba(234,179,8,.18);background:#eab30812;color:#eab308;padding:7px 20px;font-size:12px}.community-state{margin:8px 20px 0;border-radius:7px;padding:8px 10px;color:var(--muted-strong);font-size:12px}.community-chat-notices .community-state{margin:0;border-bottom:1px solid rgba(248,113,113,.2);border-radius:0;padding:8px 20px}.community-state.error,.community-message-state.error,.community-composer-action-error{background:#ef44441a;color:#fca5a5}.community-state button,.community-message-state button{margin-left:8px;border:0;background:transparent;color:inherit;padding:0;text-decoration:underline}.community-message-pane{outline:none}.community-message-pane:focus-visible{box-shadow:inset 0 0 0 2px #2dd4bf59}.community-message-state{display:grid;min-height:180px;place-items:center;border-radius:8px;color:var(--muted);padding:28px;font-size:13px;text-align:center}.community-load-older{display:block;min-height:28px;margin:0 auto 10px;border:0;border-radius:5px;background:transparent;color:#67d4c0;padding:0 8px;font-size:11px}.community-load-older:hover:not(:disabled){background:#2dd4bf17}.community-load-older:disabled{opacity:.55}.community-message{position:relative;display:grid;grid-template-columns:34px minmax(0,1fr);gap:10px;padding:8px 6px}.community-message:hover{background:#ffffff06}.community-avatar{display:grid;width:34px;height:34px;place-items:center;border-radius:6px;background:#29433b;color:#d1fae5;font-size:11px;font-weight:700}.community-message-content{min-width:0;color:#e8e8e8;font-size:13px;line-height:1.5}.community-message-content>header{display:flex;min-height:20px;align-items:baseline;gap:7px}.community-message-content>header strong{color:var(--text);font-size:13px}.community-message-content>header time,.community-message-content>header>span{color:#777;font-size:10px}.community-message-content .markdown-message{overflow-wrap:anywhere;color:#e8e8e8;font-size:13px;line-height:1.5}.community-message-content .markdown-paragraph{margin:2px 0}.community-message-actions{display:inline-flex;gap:2px;margin-left:auto;opacity:0}.community-message:hover .community-message-actions,.community-message-actions:focus-within{opacity:1}.community-message-actions button{display:inline-grid;width:25px;height:25px;place-items:center;border:0;border-radius:5px;background:transparent;color:var(--muted)}.community-message-actions button:hover{background:#ffffff14;color:var(--text)}.community-message-actions button:focus-visible,.community-reply-quote:focus-visible,.community-load-older:focus-visible{outline:2px solid #67d4c0;outline-offset:2px}.community-reply-quote{display:grid;width:min(520px,100%);min-width:0;margin:3px 0 5px;border:0;border-left:3px solid #2dd4bf;border-radius:4px;background:#2dd4bf13;color:var(--muted-strong);padding:6px 9px;text-align:left}.community-reply-quote:hover{background:#2dd4bf1f}.community-reply-quote strong{overflow:hidden;color:#67d4c0;font-size:11px;line-height:1.35;text-overflow:ellipsis;white-space:nowrap}.community-reply-quote span{overflow:hidden;font-size:11px;line-height:1.4;text-overflow:ellipsis;white-space:nowrap}.community-message-deleted{color:#777;font-size:12px;font-style:italic}.community-message-edit textarea{width:100%;min-height:72px;resize:vertical;border:1px solid rgba(45,212,191,.45);border-radius:6px;background:#191919;color:var(--text);padding:8px;font:inherit}.community-message-edit>div{display:flex;justify-content:flex-end;gap:6px;margin-top:5px}.community-message-edit button{min-height:27px;border:1px solid var(--border);border-radius:5px;background:#202020;color:var(--text);padding:0 9px;font-size:11px}.community-message-attachments{display:flex;flex-wrap:wrap;gap:7px;margin-top:7px}.community-message-attachments button,.community-attachment-placeholder{display:flex;max-width:240px;flex-direction:column;align-items:flex-start;border:1px solid var(--border);border-radius:7px;background:#1b1b1b;color:var(--text);padding:8px 10px}.community-attachment-placeholder{opacity:.7}.community-message-attachments span{max-width:210px;overflow:hidden;font-size:12px;text-overflow:ellipsis;white-space:nowrap}.community-message-attachments small{color:var(--muted)}.community-composer-wrap{min-width:0}.community-composer-reply{display:grid;grid-template-columns:minmax(0,1fr) auto;min-height:48px;align-items:center;gap:9px;margin-bottom:6px;border:1px solid var(--border);border-left:3px solid #2dd4bf;border-radius:7px;background:#1d2422;color:#67d4c0;padding:5px 7px 5px 10px}.community-composer-reply>span{display:grid;min-width:0;overflow:hidden;color:var(--muted-strong);font-size:11px;text-overflow:ellipsis;white-space:nowrap}.community-composer-reply strong{color:#67d4c0}.community-composer-reply button{display:inline-grid;width:25px;height:25px;place-items:center;border:0;border-radius:5px;background:transparent;color:var(--muted)}.community-composer-reply button:hover,.community-composer-reply button:focus-visible{outline:0;background:#ffffff14;color:var(--text)}.community-composer-action-error,.community-failed-send{margin-bottom:6px;border:1px solid rgba(248,113,113,.25);border-radius:7px;padding:7px 9px;font-size:11px}.community-failed-send{display:flex;align-items:center;gap:7px;background:#ef44441a;color:#fca5a5}.community-failed-send span{flex:1}.community-failed-send button{border:0;background:transparent;color:inherit;padding:0;text-decoration:underline}.community-mention-menu{position:absolute;z-index:12;right:0;bottom:calc(100% + 6px);left:0;max-height:min(320px,42vh);overflow-y:auto;border:1px solid var(--border);border-radius:9px;background:#222;padding:5px;box-shadow:0 12px 30px #00000061}.community-mention-menu button{display:flex;width:100%;min-height:32px;align-items:center;justify-content:space-between;border:0;border-radius:5px;background:transparent;color:var(--text);padding:0 9px;font-size:12px}.community-mention-menu button:hover,.community-mention-menu button[aria-selected=true]{background:#2dd4bf1f;color:#a7f3d0}.community-mention-menu small{color:var(--muted)}.community-membership-menu{position:relative}.community-membership-popover{position:absolute;z-index:5;top:calc(100% + 6px);right:0;display:flex;width:210px;flex-direction:column;gap:8px;border:1px solid var(--border);border-radius:9px;background:#222;padding:10px;box-shadow:0 12px 32px #0006}.community-membership-popover>strong{color:var(--muted-strong);font-size:11px}.community-membership-popover label{font-size:12px}.community-membership-popover input{accent-color:#2dd4bf}.community-membership-popover button.danger{justify-content:center;margin-top:4px;background:#ef444424;color:#fca5a5}.community-dialog-backdrop{position:fixed;z-index:30;inset:0;display:grid;place-items:center;background:#0000009e;padding:30px}.community-rules-dialog{display:grid;grid-template-rows:auto minmax(0,1fr) auto auto;width:min(720px,100%);max-height:min(780px,calc(100vh - 60px));overflow:hidden;border:1px solid var(--border);border-radius:14px;background:#191919;box-shadow:0 24px 70px #0000008c}.community-rules-dialog>header{justify-content:space-between;gap:20px;border-bottom:1px solid var(--border);padding:16px 18px}.community-rules-dialog>header small{color:var(--muted)}.community-rules-dialog h2{margin:2px 0 0;font-size:17px}.community-rules-dialog>header button{min-height:29px;padding:7px;background:transparent;color:var(--text)}.community-rules-body{overflow-y:auto;padding:18px 22px}.community-rules-dialog>footer{align-items:flex-end;justify-content:space-between;gap:16px;border-top:1px solid var(--border);padding:14px 18px}.community-rules-dialog footer>div{gap:7px}.community-rules-acceptance{display:flex;max-width:400px;align-items:flex-start;gap:8px;color:var(--muted-strong);font-size:12px}.community-rules-acceptance input{accent-color:#2dd4bf}.community-empty-page{display:grid;width:100%;height:100%;min-width:0;min-height:0;place-items:center;overflow:hidden;background:var(--bg);padding:30px}.community-empty-card{display:flex;width:min(480px,100%);flex-direction:column;align-items:center;gap:10px;color:var(--muted);text-align:center}.community-empty-card h1,.community-discovery-card>h1{margin:0;color:var(--text)}.community-empty-card p{margin:0}.community-discovery-card{display:flex;width:min(760px,100%);max-height:100%;min-height:0;flex-direction:column;align-items:center;gap:12px;color:var(--muted)}.community-discovery-card>p{max-width:580px;margin:0;text-align:center}.community-discovery-list{display:grid;width:100%;min-height:0;gap:7px;overflow-y:auto;padding:2px}.community-discovery-list>button{display:grid;grid-template-columns:auto minmax(0,1fr) auto;width:100%;align-items:center;gap:12px;border:1px solid var(--border);background:#202020;color:var(--text);padding:11px;text-align:left}.community-discovery-list>button:hover:not(:disabled){border-color:#ffffff26;background:#282828}.community-discovery-list>button>span{display:flex;min-width:0;flex-direction:column;gap:3px}.community-discovery-list small{overflow:hidden;color:var(--muted);text-overflow:ellipsis;white-space:nowrap}.community-discovery-list em{color:#67d4c0;font-size:11px;font-style:normal}.community-discovery-actions{display:flex;gap:8px}.community-spinner{width:20px;height:20px;border:2px solid #454545;border-top-color:#2dd4bf;border-radius:50%;animation:community-spin .8s linear infinite}@keyframes community-spin{to{transform:rotate(360deg)}}@media(max-width:720px){.community-header{align-items:flex-start}.community-member-count{display:none}.community-preview-banner{align-items:flex-start;flex-direction:column;gap:8px}.community-discovery-list>button{grid-template-columns:auto minmax(0,1fr)}.community-discovery-list em{display:none}.community-rules-dialog>footer{align-items:stretch;flex-direction:column}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as v,j as e,cb as _,aN as A,F as x,X as j,b as y,bd as P}from"./index-Ure41UF0.js";import{C as w}from"./circle-alert-BUHAQ7Du.js";import{P as q}from"./MarkdownText-DTBS9xe7.js";import{P as C}from"./play-CjWTsI9z.js";import{R as k}from"./refresh-cw-CeHT_tXT.js";function U({runtime:s}){const[a,i]=v.useState(!1),[o,l]=v.useState(""),[n,u]=v.useState(null),t=s.run,h=t.plan,g=N(t),c={run:t},f=E(t.state),r=S(t),R=r?.git?.pullRequest??t.releaseOutcome.pullRequest;v.useEffect(()=>{i(!1),l(""),u(null)},[t.id,t.revision,t.state,h?.id,g?.id]);async function d(p,b){if(!(!b||n)){u(p);try{await b()}finally{u(null)}}}return e.jsxs("section",{className:`composer-create-strip ${f}`,"aria-label":"Create or improve status",children:[e.jsxs("div",{className:"composer-create-strip-heading",children:[f==="danger"?e.jsx(w,{size:15}):t.state==="awaiting_questions"?e.jsx(_,{size:15}):I(t.state)?e.jsx(A,{className:"composer-create-spin",size:15}):e.jsx(x,{size:15}),e.jsx("span",{children:z(t)}),e.jsx("small",{children:t.target.kind})]}),t.state==="awaiting_questions"&&g?e.jsxs("div",{className:"composer-create-question",children:[e.jsx("p",{children:g.prompt}),e.jsx("div",{className:"composer-create-options",children:g.options.map(p=>e.jsxs("button",{type:"button",disabled:!!n,onClick:()=>{d(`answer:${p.id}`,()=>s.onAnswerQuestion?s.onAnswerQuestion(c,g.id,p.value):Promise.resolve())},children:[e.jsx("span",{children:n===`answer:${p.id}`?"Saving":p.label}),p.description?e.jsx("small",{children:p.description}):null]},p.id))})]}):t.state==="awaiting_plan_approval"&&h?e.jsxs("div",{className:"composer-create-plan-summary",children:[e.jsx("p",{children:h.summary}),e.jsx(m,{run:t}),a?e.jsxs("div",{className:"composer-create-revision",children:[e.jsx("textarea",{rows:2,value:o,placeholder:"Describe the plan revision",onChange:p=>l(p.currentTarget.value)}),e.jsxs("div",{children:[e.jsxs("button",{type:"button",disabled:!o.trim()||!!n,onClick:()=>{d("revise",()=>s.onRevise?s.onRevise(c,o):Promise.resolve())},children:[e.jsx(x,{size:13}),e.jsx("span",{children:n==="revise"?"Saving":"Save revision"})]}),e.jsxs("button",{type:"button",disabled:!!n,onClick:()=>i(!1),children:[e.jsx(j,{size:13}),e.jsx("span",{children:"Close"})]})]})]}):e.jsxs("div",{className:"composer-create-actions",children:[e.jsxs("button",{type:"button",disabled:!!n,onClick:()=>{d("approve",()=>s.onApprove?s.onApprove(c):Promise.resolve())},children:[e.jsx(y,{size:13}),e.jsx("span",{children:n==="approve"?"Confirming":"Confirm plan"})]}),e.jsxs("button",{type:"button",disabled:!!n,onClick:()=>i(!0),children:[e.jsx(x,{size:13}),e.jsx("span",{children:"Edit plan"})]}),e.jsxs("button",{type:"button",disabled:!!n,onClick:()=>{d("cancel",()=>s.onCancel?s.onCancel(c):Promise.resolve())},children:[e.jsx(j,{size:13}),e.jsx("span",{children:n==="cancel"?"Cancelling":"Cancel"})]})]})]}):t.state==="paused"?e.jsxs("div",{className:"composer-create-status-body",children:[e.jsx("p",{children:"This work is paused. Resume it when you are ready to continue."}),e.jsxs("button",{type:"button",disabled:!!n,onClick:()=>{d("resume",()=>s.onResume?s.onResume(c):Promise.resolve())},children:[e.jsx(C,{size:13}),e.jsx("span",{children:n==="resume"?"Resuming":"Resume"})]})]}):t.state==="awaiting_promotion"&&r?e.jsxs("div",{className:"composer-create-status-body",children:[e.jsx("p",{children:T(t,r.id)}),e.jsxs("div",{className:"composer-create-actions",children:[e.jsxs("button",{type:"button",disabled:!!n||!$(t,r.id),onClick:()=>{d("apply-candidate",()=>s.onApplyCandidate?s.onApplyCandidate(c,r.id):Promise.resolve())},children:[e.jsx(y,{size:13}),e.jsx("span",{children:n==="apply-candidate"?"Applying":"Apply update"})]}),e.jsxs("button",{type:"button",disabled:!!n,onClick:()=>{d("reject-candidate",()=>s.onRejectCandidate?s.onRejectCandidate(c,r.id):Promise.resolve())},children:[e.jsx(j,{size:13}),e.jsx("span",{children:n==="reject-candidate"?"Keeping current version":"Keep current version"})]})]})]}):t.state==="pull_request_open"&&r&&R?e.jsxs("div",{className:"composer-create-status-body",children:[e.jsx("p",{children:t.target.kind==="agent"?"An Agent update review is open. Finish or close it, then refresh its status.":"An external review is open. Merge or close it, then refresh its status."}),e.jsxs("div",{className:"composer-create-actions",children:[e.jsxs("button",{type:"button",disabled:!!n,onClick:()=>{d("reconcile-pr",()=>s.onReconcilePullRequest?s.onReconcilePullRequest(c,r.id):Promise.resolve())},children:[e.jsx(k,{size:13}),e.jsx("span",{children:n==="reconcile-pr"?"Checking":"Refresh review"})]}),e.jsxs("button",{type:"button",disabled:!!n,onClick:()=>{d("reject-candidate",()=>s.onRejectCandidate?s.onRejectCandidate(c,r.id):Promise.resolve())},children:[e.jsx(j,{size:13}),e.jsx("span",{children:n==="reject-candidate"?"Closing":"Close review"})]})]})]}):t.state==="blocked"||t.state==="failed"||t.state==="cancelled"?e.jsxs("div",{className:"composer-create-status-body",children:[e.jsx("p",{children:t.blockedReason??"This work stopped before it was ready."}),t.state==="blocked"&&r?.git?.worktreePath&&["draft","checking"].includes(r.status)?e.jsxs("button",{type:"button",disabled:!!n,onClick:()=>{d("resume",()=>s.onResume?s.onResume(c):Promise.resolve())},children:[e.jsx(C,{size:13}),e.jsx("span",{children:n==="resume"?"Continuing":"Continue update"})]}):t.state==="blocked"&&r?.git?.pullRequest?.state==="merged"?e.jsxs("button",{type:"button",disabled:!!n,onClick:()=>{d("reconcile-pr",()=>s.onReconcilePullRequest?s.onReconcilePullRequest(c,r.id):Promise.resolve())},children:[e.jsx(k,{size:13}),e.jsx("span",{children:n==="reconcile-pr"?"Checking":"Re-run verification"})]}):null]}):t.state==="released"||t.state==="rejected"||t.state==="ready_local"||t.state==="ready"||t.state==="published_hosted"?e.jsxs("div",{className:"composer-create-status-body composer-create-status-body-reveals",children:[e.jsx("p",{children:t.state==="released"?"The Agent update is saved and its Evals passed.":t.state==="rejected"?"The Agent update was not applied.":t.state==="published_hosted"?"Published to the hosted Profile.":"The Agent and its actions are ready to use."}),e.jsx("div",{className:"composer-create-hover-details",children:e.jsx(m,{run:t})})]}):e.jsxs("div",{className:"composer-create-status-body",children:[e.jsx("p",{children:B(t)}),e.jsx(m,{run:t}),t.executionPolicy.pauseAllowed&&s.onPause?e.jsxs("button",{type:"button",disabled:!!n,onClick:()=>{d("pause",()=>s.onPause?.(c)??Promise.resolve())},children:[e.jsx(q,{size:13}),e.jsx("span",{children:n==="pause"?"Pausing":"Pause"})]}):null]})]})}function N(s){return s.questions.find(a=>a.status==="pending"&&a.required)??s.questions.find(a=>a.status==="pending")??null}function m({run:s}){const a=s.plan,i=s.target.kind==="agent",o=i?null:s.sourceRefs[0]??a?.sourcePlan[0]?.path??null,l=s.checkRefs.length||a?.checks.length||0,n=i?0:a?.requirements.length??0,u=i?[]:[...s.sourceRefs,...s.checkRefs].slice(0,4),t=P(a?.metadata);return!o&&l===0&&n===0&&u.length===0&&!t?null:e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"composer-create-facts",children:[t?e.jsx("span",{title:t.detail,children:t.label}):null,o?e.jsx("span",{title:o,children:o}):null,l?e.jsx("span",{children:i?`${l} Evals`:s.checkRefs.length?`${s.checkRefs.length} check refs`:`${l} checks`}):null,n?e.jsxs("span",{children:[n," setup rows"]}):null]}),u.length?e.jsx("ul",{className:"composer-create-refs","aria-label":"Source and check refs",children:u.map(h=>e.jsx("li",{children:e.jsx("code",{title:h,children:h})},h))}):null]})}function z(s){const a=s.target.kind==="agent";return s.state==="awaiting_questions"?"Question":s.state==="awaiting_plan_approval"?"Plan":s.state==="applying_source"?a?"Saving Agent":"Applying source":s.state==="running_checks"?"Running Evals":s.state==="evaluating"?a?"Checking Agent":"Evaluating":s.state==="awaiting_promotion"?a?"Update ready":"Candidate ready":s.state==="opening_pull_request"?"Opening review":s.state==="pull_request_open"?"Review open":s.state==="reconciling_release"?a?"Applying update":"Merging change":s.state==="released"?a?"Agent updated":"Released":s.state==="rejected"?a?"Current Agent kept":"Rejected":s.state==="paused"?"Paused":s.state==="ready"||s.state==="ready_local"?"Ready":s.state==="published_hosted"?"Published":s.state==="cancelled"?"Cancelled":s.state==="blocked"?"Blocked":s.state==="failed"?"Failed":s.operation==="improve"?"Improve":"Create"}function B(s){const a=s.state,i=s.target.kind==="agent";return a==="applying_source"?i?"Saving the approved Agent plan.":"Applying the approved source changes.":a==="running_checks"?i?"Running Evals against the Agent.":"Running checks against the candidate.":a==="evaluating"?i?"Checking the Agent's behavior.":"Evaluating the candidate against its Evals.":a==="opening_pull_request"?i?"Preparing the Agent update review.":"Opening the candidate review.":a==="reconciling_release"?"Applying the change and verifying the active Profile.":a==="pushing_hosted"?"Pushing the Profile source.":a==="running_hosted_checks"?i?"Running hosted Evals.":"Running hosted checks.":"Preparing the work."}function E(s){return["released","ready","ready_local","published_hosted"].includes(s)?"success":["rejected","blocked","failed","cancelled"].includes(s)?"danger":["awaiting_questions","awaiting_plan_approval","awaiting_promotion","pull_request_open","paused"].includes(s)?"warning":"info"}function I(s){return["planning","applying_source","running_checks","evaluating","opening_pull_request","reconciling_release","pushing_hosted","running_hosted_checks"].includes(s)}function S(s){return[...s.candidates].reverse().find(a=>a.target.kind==="agent")??null}function $(s,a){const i=s.evaluationReceipts.filter(o=>o.candidateId===a&&o.subject==="candidate");return i.length>0&&i.every(o=>o.status==="passed"&&o.publishGate!=="failed")}function T(s,a){const i=s.evaluationReceipts.find(n=>n.candidateId===a&&n.subject==="active"),o=s.evaluationReceipts.find(n=>n.candidateId===a&&n.subject==="candidate"),l=n=>n?.summaryCounts?`${n.summaryCounts.passed}/${n.summaryCounts.total}`:n?.status??"not run";return s.target.kind==="agent"?`Current Agent: ${l(i)} Evals passed. Updated Agent: ${l(o)} Evals passed.`:`Base Evals: ${l(i)} passed. Candidate Evals: ${l(o)} passed.`}export{U as ComposerCreateImproveStrip};
|
|
1
|
+
import{r as v,j as e,cb as _,aL as A,F as x,X as j,b as y,bb as P}from"./index-CDJX5ZxL.js";import{C as w}from"./circle-alert-Crh3Zr2m.js";import{P as q}from"./MarkdownText-_JhfBcQL.js";import{P as C}from"./play-lC5KpmRD.js";import{R as k}from"./refresh-cw-8a_wz4tX.js";function L({runtime:s}){const[a,i]=v.useState(!1),[o,l]=v.useState(""),[n,u]=v.useState(null),t=s.run,h=t.plan,g=N(t),c={run:t},f=E(t.state),r=S(t),R=r?.git?.pullRequest??t.releaseOutcome.pullRequest;v.useEffect(()=>{i(!1),l(""),u(null)},[t.id,t.revision,t.state,h?.id,g?.id]);async function d(p,b){if(!(!b||n)){u(p);try{await b()}finally{u(null)}}}return e.jsxs("section",{className:`composer-create-strip ${f}`,"aria-label":"Create or improve status",children:[e.jsxs("div",{className:"composer-create-strip-heading",children:[f==="danger"?e.jsx(w,{size:15}):t.state==="awaiting_questions"?e.jsx(_,{size:15}):I(t.state)?e.jsx(A,{className:"composer-create-spin",size:15}):e.jsx(x,{size:15}),e.jsx("span",{children:z(t)}),e.jsx("small",{children:t.target.kind})]}),t.state==="awaiting_questions"&&g?e.jsxs("div",{className:"composer-create-question",children:[e.jsx("p",{children:g.prompt}),e.jsx("div",{className:"composer-create-options",children:g.options.map(p=>e.jsxs("button",{type:"button",disabled:!!n,onClick:()=>{d(`answer:${p.id}`,()=>s.onAnswerQuestion?s.onAnswerQuestion(c,g.id,p.value):Promise.resolve())},children:[e.jsx("span",{children:n===`answer:${p.id}`?"Saving":p.label}),p.description?e.jsx("small",{children:p.description}):null]},p.id))})]}):t.state==="awaiting_plan_approval"&&h?e.jsxs("div",{className:"composer-create-plan-summary",children:[e.jsx("p",{children:h.summary}),e.jsx(m,{run:t}),a?e.jsxs("div",{className:"composer-create-revision",children:[e.jsx("textarea",{rows:2,value:o,placeholder:"Describe the plan revision",onChange:p=>l(p.currentTarget.value)}),e.jsxs("div",{children:[e.jsxs("button",{type:"button",disabled:!o.trim()||!!n,onClick:()=>{d("revise",()=>s.onRevise?s.onRevise(c,o):Promise.resolve())},children:[e.jsx(x,{size:13}),e.jsx("span",{children:n==="revise"?"Saving":"Save revision"})]}),e.jsxs("button",{type:"button",disabled:!!n,onClick:()=>i(!1),children:[e.jsx(j,{size:13}),e.jsx("span",{children:"Close"})]})]})]}):e.jsxs("div",{className:"composer-create-actions",children:[e.jsxs("button",{type:"button",disabled:!!n,onClick:()=>{d("approve",()=>s.onApprove?s.onApprove(c):Promise.resolve())},children:[e.jsx(y,{size:13}),e.jsx("span",{children:n==="approve"?"Confirming":"Confirm plan"})]}),e.jsxs("button",{type:"button",disabled:!!n,onClick:()=>i(!0),children:[e.jsx(x,{size:13}),e.jsx("span",{children:"Edit plan"})]}),e.jsxs("button",{type:"button",disabled:!!n,onClick:()=>{d("cancel",()=>s.onCancel?s.onCancel(c):Promise.resolve())},children:[e.jsx(j,{size:13}),e.jsx("span",{children:n==="cancel"?"Cancelling":"Cancel"})]})]})]}):t.state==="paused"?e.jsxs("div",{className:"composer-create-status-body",children:[e.jsx("p",{children:"This work is paused. Resume it when you are ready to continue."}),e.jsxs("button",{type:"button",disabled:!!n,onClick:()=>{d("resume",()=>s.onResume?s.onResume(c):Promise.resolve())},children:[e.jsx(C,{size:13}),e.jsx("span",{children:n==="resume"?"Resuming":"Resume"})]})]}):t.state==="awaiting_promotion"&&r?e.jsxs("div",{className:"composer-create-status-body",children:[e.jsx("p",{children:T(t,r.id)}),e.jsxs("div",{className:"composer-create-actions",children:[e.jsxs("button",{type:"button",disabled:!!n||!$(t,r.id),onClick:()=>{d("apply-candidate",()=>s.onApplyCandidate?s.onApplyCandidate(c,r.id):Promise.resolve())},children:[e.jsx(y,{size:13}),e.jsx("span",{children:n==="apply-candidate"?"Applying":"Apply update"})]}),e.jsxs("button",{type:"button",disabled:!!n,onClick:()=>{d("reject-candidate",()=>s.onRejectCandidate?s.onRejectCandidate(c,r.id):Promise.resolve())},children:[e.jsx(j,{size:13}),e.jsx("span",{children:n==="reject-candidate"?"Keeping current version":"Keep current version"})]})]})]}):t.state==="pull_request_open"&&r&&R?e.jsxs("div",{className:"composer-create-status-body",children:[e.jsx("p",{children:t.target.kind==="agent"?"An Agent update review is open. Finish or close it, then refresh its status.":"An external review is open. Merge or close it, then refresh its status."}),e.jsxs("div",{className:"composer-create-actions",children:[e.jsxs("button",{type:"button",disabled:!!n,onClick:()=>{d("reconcile-pr",()=>s.onReconcilePullRequest?s.onReconcilePullRequest(c,r.id):Promise.resolve())},children:[e.jsx(k,{size:13}),e.jsx("span",{children:n==="reconcile-pr"?"Checking":"Refresh review"})]}),e.jsxs("button",{type:"button",disabled:!!n,onClick:()=>{d("reject-candidate",()=>s.onRejectCandidate?s.onRejectCandidate(c,r.id):Promise.resolve())},children:[e.jsx(j,{size:13}),e.jsx("span",{children:n==="reject-candidate"?"Closing":"Close review"})]})]})]}):t.state==="blocked"||t.state==="failed"||t.state==="cancelled"?e.jsxs("div",{className:"composer-create-status-body",children:[e.jsx("p",{children:t.blockedReason??"This work stopped before it was ready."}),t.state==="blocked"&&r?.git?.worktreePath&&["draft","checking"].includes(r.status)?e.jsxs("button",{type:"button",disabled:!!n,onClick:()=>{d("resume",()=>s.onResume?s.onResume(c):Promise.resolve())},children:[e.jsx(C,{size:13}),e.jsx("span",{children:n==="resume"?"Continuing":"Continue update"})]}):t.state==="blocked"&&r?.git?.pullRequest?.state==="merged"?e.jsxs("button",{type:"button",disabled:!!n,onClick:()=>{d("reconcile-pr",()=>s.onReconcilePullRequest?s.onReconcilePullRequest(c,r.id):Promise.resolve())},children:[e.jsx(k,{size:13}),e.jsx("span",{children:n==="reconcile-pr"?"Checking":"Re-run verification"})]}):null]}):t.state==="released"||t.state==="rejected"||t.state==="ready_local"||t.state==="ready"||t.state==="published_hosted"?e.jsxs("div",{className:"composer-create-status-body composer-create-status-body-reveals",children:[e.jsx("p",{children:t.state==="released"?"The Agent update is saved and its Evals passed.":t.state==="rejected"?"The Agent update was not applied.":t.state==="published_hosted"?"Published to the hosted Profile.":"The Agent and its actions are ready to use."}),e.jsx("div",{className:"composer-create-hover-details",children:e.jsx(m,{run:t})})]}):e.jsxs("div",{className:"composer-create-status-body",children:[e.jsx("p",{children:B(t)}),e.jsx(m,{run:t}),t.executionPolicy.pauseAllowed&&s.onPause?e.jsxs("button",{type:"button",disabled:!!n,onClick:()=>{d("pause",()=>s.onPause?.(c)??Promise.resolve())},children:[e.jsx(q,{size:13}),e.jsx("span",{children:n==="pause"?"Pausing":"Pause"})]}):null]})]})}function N(s){return s.questions.find(a=>a.status==="pending"&&a.required)??s.questions.find(a=>a.status==="pending")??null}function m({run:s}){const a=s.plan,i=s.target.kind==="agent",o=i?null:s.sourceRefs[0]??a?.sourcePlan[0]?.path??null,l=s.checkRefs.length||a?.checks.length||0,n=i?0:a?.requirements.length??0,u=i?[]:[...s.sourceRefs,...s.checkRefs].slice(0,4),t=P(a?.metadata);return!o&&l===0&&n===0&&u.length===0&&!t?null:e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"composer-create-facts",children:[t?e.jsx("span",{title:t.detail,children:t.label}):null,o?e.jsx("span",{title:o,children:o}):null,l?e.jsx("span",{children:i?`${l} Evals`:s.checkRefs.length?`${s.checkRefs.length} check refs`:`${l} checks`}):null,n?e.jsxs("span",{children:[n," setup rows"]}):null]}),u.length?e.jsx("ul",{className:"composer-create-refs","aria-label":"Source and check refs",children:u.map(h=>e.jsx("li",{children:e.jsx("code",{title:h,children:h})},h))}):null]})}function z(s){const a=s.target.kind==="agent";return s.state==="awaiting_questions"?"Question":s.state==="awaiting_plan_approval"?"Plan":s.state==="applying_source"?a?"Saving Agent":"Applying source":s.state==="running_checks"?"Running Evals":s.state==="evaluating"?a?"Checking Agent":"Evaluating":s.state==="awaiting_promotion"?a?"Update ready":"Candidate ready":s.state==="opening_pull_request"?"Opening review":s.state==="pull_request_open"?"Review open":s.state==="reconciling_release"?a?"Applying update":"Merging change":s.state==="released"?a?"Agent updated":"Released":s.state==="rejected"?a?"Current Agent kept":"Rejected":s.state==="paused"?"Paused":s.state==="ready"||s.state==="ready_local"?"Ready":s.state==="published_hosted"?"Published":s.state==="cancelled"?"Cancelled":s.state==="blocked"?"Blocked":s.state==="failed"?"Failed":s.operation==="improve"?"Improve":"Create"}function B(s){const a=s.state,i=s.target.kind==="agent";return a==="applying_source"?i?"Saving the approved Agent plan.":"Applying the approved source changes.":a==="running_checks"?i?"Running Evals against the Agent.":"Running checks against the candidate.":a==="evaluating"?i?"Checking the Agent's behavior.":"Evaluating the candidate against its Evals.":a==="opening_pull_request"?i?"Preparing the Agent update review.":"Opening the candidate review.":a==="reconciling_release"?"Applying the change and verifying the active Profile.":a==="pushing_hosted"?"Pushing the Profile source.":a==="running_hosted_checks"?i?"Running hosted Evals.":"Running hosted checks.":"Preparing the work."}function E(s){return["released","ready","ready_local","published_hosted"].includes(s)?"success":["rejected","blocked","failed","cancelled"].includes(s)?"danger":["awaiting_questions","awaiting_plan_approval","awaiting_promotion","pull_request_open","paused"].includes(s)?"warning":"info"}function I(s){return["planning","applying_source","running_checks","evaluating","opening_pull_request","reconciling_release","pushing_hosted","running_hosted_checks"].includes(s)}function S(s){return[...s.candidates].reverse().find(a=>a.target.kind==="agent")??null}function $(s,a){const i=s.evaluationReceipts.filter(o=>o.candidateId===a&&o.subject==="candidate");return i.length>0&&i.every(o=>o.status==="passed"&&o.publishGate!=="failed")}function T(s,a){const i=s.evaluationReceipts.find(n=>n.candidateId===a&&n.subject==="active"),o=s.evaluationReceipts.find(n=>n.candidateId===a&&n.subject==="candidate"),l=n=>n?.summaryCounts?`${n.summaryCounts.passed}/${n.summaryCounts.total}`:n?.status??"not run";return s.target.kind==="agent"?`Current Agent: ${l(i)} Evals passed. Updated Agent: ${l(o)} Evals passed.`:`Base Evals: ${l(i)} passed. Candidate Evals: ${l(o)} passed.`}export{L as ComposerCreateImproveStrip};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as x,j as t,A as te,X as ae,a_ as I,bz as ne,bA as se,bB as ie,bC as re,bD as oe,bE as de}from"./index-Ure41UF0.js";import{P as k}from"./play-CjWTsI9z.js";import{r as le}from"./index-De6p2npi.js";import{A as ce}from"./AppDialog-BTOxCNC5.js";import{A as ue}from"./MarkdownText-DTBS9xe7.js";function pe({badge:e,onPlay:a,titleElement:i="h3",video:n}){const[d,s]=x.useState(!1),r=x.useRef(null),u=i,l=`${n.id}-title`;function p(){if(a){a();return}le.flushSync(()=>s(!0));const c=r.current;c&&(c.load(),c.play().catch(()=>{}))}return t.jsxs(t.Fragment,{children:[t.jsxs("article",{className:"get-started-course-card","aria-labelledby":l,children:[t.jsx("button",{"aria-haspopup":"dialog","aria-label":`Play ${n.title}`,className:"get-started-course-open",onClick:p,type:"button"}),t.jsxs("div",{className:"get-started-course-media",children:[t.jsx("img",{alt:"",className:"get-started-course-poster",decoding:"async",src:n.posterUrl}),t.jsx("span",{className:"get-started-course-play-icon","aria-hidden":"true",children:t.jsx(k,{fill:"currentColor",size:19})}),e?t.jsx("span",{className:"get-started-course-badge","aria-hidden":"true",children:e}):null]}),t.jsxs("div",{className:"get-started-course-copy",children:[t.jsx(u,{id:l,children:n.title}),t.jsxs("div",{className:"get-started-course-meta","aria-label":`${n.title} details`,children:[t.jsx("span",{children:n.eyebrow}),t.jsx("span",{"aria-hidden":"true",children:"·"}),t.jsx("span",{children:n.duration})]}),n.description?t.jsx("p",{children:n.description}):null]})]}),d&&!a?t.jsx(L,{onClose:()=>s(!1),video:n,videoRef:r}):null]})}function L({autoAdvance:e=!1,contained:a=!1,inertExclusionSelector:i,navigation:n,onEnded:d,onClose:s,onPause:r,onTimeUpdate:u,video:l,videoRef:p}){return t.jsxs(ce,{ariaLabel:`${l.title} player`,backdropClassName:"get-started-course-player-backdrop",className:"get-started-course-player",contained:a,inertExclusionSelector:i,onClose:s,children:[t.jsxs("header",{className:"get-started-course-player-header",children:[t.jsxs("div",{className:"get-started-course-player-copy",children:[t.jsx("strong",{children:l.title}),t.jsxs("span",{children:[n?`Lesson ${n.currentIndex+1} of ${n.total}`:l.eyebrow," · ",l.duration]})]}),t.jsxs("div",{className:"get-started-course-player-actions",children:[n?t.jsxs(t.Fragment,{children:[t.jsx("button",{"aria-label":"Previous lesson",disabled:!n.onPrevious,onClick:n.onPrevious,title:"Previous lesson",type:"button",children:t.jsx(te,{size:17})}),t.jsx("button",{"aria-label":"Next lesson",disabled:!n.onNext,onClick:n.onNext,title:"Next lesson",type:"button",children:t.jsx(ue,{size:17})})]}):null,t.jsx("button",{"aria-label":"Close video player","data-autofocus":!0,onClick:s,title:"Close",type:"button",children:t.jsx(ae,{size:18})})]})]}),t.jsx("div",{className:"get-started-course-player-body",children:t.jsx("div",{className:"get-started-course-player-media",children:t.jsx("div",{className:"get-started-course-player-stage",children:t.jsx("video",{"aria-label":`${l.title} video`,className:"get-started-course-player-video",controls:!0,"data-auto-advance":e?"true":void 0,onEnded:c=>d?.(c.currentTarget),onPause:c=>r?.(c.currentTarget),onTimeUpdate:c=>u?.(c.currentTarget),playsInline:!0,poster:l.posterUrl,preload:"metadata",ref:p,src:l.videoUrl,children:l.captionsUrl?t.jsx("track",{kind:"captions",label:"English",src:l.captionsUrl,srcLang:"en"}):null},l.id)})})})]})}const fe=[{id:"post-training-from-first-principles",fullVideoId:"post-training-full-course",status:"draft",title:"Post-training from first principles",videoIds:["post-training-01-how-post-training-works","post-training-02-definitions","post-training-03-on-policy-off-policy","post-training-04-rewards-credit-assignment","post-training-05-verifiable-rewards-rlvr","post-training-06-ppo-grpo","post-training-07-distillation","post-training-08-opsd-sdft-sdpo","post-training-09-credible-experiments","post-training-10-technical-appendix"]},{id:"how-to-make-an-agent",status:"published",title:"Agents",playAllVideoId:"make-agent-tutorial",videoIds:["make-agent-tutorial-create","make-agent-tutorial-use","make-agent-tutorial-improve"]}],ge=[{id:"post-training-01-how-post-training-works",localPath:"courses/post-training/01-how-post-training-works.mp4",objectKey:"media/videos/aeb54dfb42eb940672df6e41bae075ffa5e45e1609e173a91e485c808b61fd4a.mp4",sha256:"aeb54dfb42eb940672df6e41bae075ffa5e45e1609e173a91e485c808b61fd4a",sizeBytes:2114638,durationSeconds:64.967},{id:"post-training-02-definitions",localPath:"courses/post-training/02-definitions.mp4",objectKey:"media/videos/c57d021989cdf058c683b9d017eb91bd23075e6bd00d0cc055e1285b3ea119fc.mp4",sha256:"c57d021989cdf058c683b9d017eb91bd23075e6bd00d0cc055e1285b3ea119fc",sizeBytes:11956956,durationSeconds:374.367},{id:"post-training-03-on-policy-off-policy",localPath:"courses/post-training/03-on-policy-off-policy.mp4",objectKey:"media/videos/a807bd7d704f8603addc875623a3cfcc938e60e0170d555d47569394a1c31762.mp4",sha256:"a807bd7d704f8603addc875623a3cfcc938e60e0170d555d47569394a1c31762",sizeBytes:2291518,durationSeconds:66.367},{id:"post-training-04-rewards-credit-assignment",localPath:"courses/post-training/04-rewards-credit-assignment.mp4",objectKey:"media/videos/685f7ecff7fcea262dd2cf60568079633816e9116efd80c069d0e20a4959a87f.mp4",sha256:"685f7ecff7fcea262dd2cf60568079633816e9116efd80c069d0e20a4959a87f",sizeBytes:5677418,durationSeconds:179.834},{id:"post-training-05-verifiable-rewards-rlvr",localPath:"courses/post-training/05-verifiable-rewards-rlvr.mp4",objectKey:"media/videos/0633584b2036843edd1ff9c63f0858db4272ddf55b10b160ec2ef6f7650c7d3a.mp4",sha256:"0633584b2036843edd1ff9c63f0858db4272ddf55b10b160ec2ef6f7650c7d3a",sizeBytes:5666892,durationSeconds:172.534},{id:"post-training-06-ppo-grpo",localPath:"courses/post-training/06-ppo-grpo.mp4",objectKey:"media/videos/66760fec7508c413844adb06c3f3920c5f7e3a874b18dc244ba090c55f452ff3.mp4",sha256:"66760fec7508c413844adb06c3f3920c5f7e3a874b18dc244ba090c55f452ff3",sizeBytes:5519257,durationSeconds:173.6},{id:"post-training-07-distillation",localPath:"courses/post-training/07-distillation.mp4",objectKey:"media/videos/3590f94325c1986f2025b42d182f04957e9eff6d5c06b1effc28dc369651c466.mp4",sha256:"3590f94325c1986f2025b42d182f04957e9eff6d5c06b1effc28dc369651c466",sizeBytes:4687640,durationSeconds:161.667},{id:"post-training-08-opsd-sdft-sdpo",localPath:"courses/post-training/08-opsd-sdft-sdpo.mp4",objectKey:"media/videos/3c45d8c1df0a24132ec425762dc6a4274b1e5cac6dfd220a2994f8754f431031.mp4",sha256:"3c45d8c1df0a24132ec425762dc6a4274b1e5cac6dfd220a2994f8754f431031",sizeBytes:5439835,durationSeconds:163.134},{id:"post-training-09-credible-experiments",localPath:"courses/post-training/09-credible-experiments.mp4",objectKey:"media/videos/fc701a8ba4b42de53bcaec3dcf191e6ec66f1dc0c48480f0aff01c3849aff023.mp4",sha256:"fc701a8ba4b42de53bcaec3dcf191e6ec66f1dc0c48480f0aff01c3849aff023",sizeBytes:6909405,durationSeconds:211.934},{id:"post-training-10-technical-appendix",localPath:"courses/post-training/10-technical-appendix.mp4",objectKey:"media/videos/17e6b5ef161fcdc97678e5b63650bffdb4b4b0d510ba75725a2af8a5db0d7e21.mp4",sha256:"17e6b5ef161fcdc97678e5b63650bffdb4b4b0d510ba75725a2af8a5db0d7e21",sizeBytes:5481950,durationSeconds:191.767},{id:"post-training-full-course",localPath:"courses/post-training/full-course.mp4",objectKey:"media/videos/d3df6a3b2ffe6c696b9dc0774ceaec19a2b8a92b170476cacb9df8dbdb2a526f.mp4",sha256:"d3df6a3b2ffe6c696b9dc0774ceaec19a2b8a92b170476cacb9df8dbdb2a526f",sizeBytes:55740426,durationSeconds:1760.192},{id:"openpond-agent-overview",localPath:"tutorials/what-is-an-openpond-agent.mp4",objectKey:"media/videos/421160f56d82abd6515df0d5ccf144591749e0ab1d58d630805c4807913812c7.mp4",sha256:"421160f56d82abd6515df0d5ccf144591749e0ab1d58d630805c4807913812c7",sizeBytes:5259848,durationSeconds:77.467},{id:"make-agent-tutorial",localPath:"tutorials/how-to-make-an-agent.mp4",objectKey:"media/videos/252d2f27076c904d85c9854c2f4c494fe9e92b3cea7d2c58ffbaa0323c17f255.mp4",sha256:"252d2f27076c904d85c9854c2f4c494fe9e92b3cea7d2c58ffbaa0323c17f255",sizeBytes:17339101,durationSeconds:273.067},{id:"make-agent-tutorial-create",localPath:"tutorials/how-to-make-an-agent-create.mp4",objectKey:"media/videos/322c999225d4759c34334eee22edee25a737fb06c5c6d66ee1f84485bb586c44.mp4",sha256:"322c999225d4759c34334eee22edee25a737fb06c5c6d66ee1f84485bb586c44",sizeBytes:6050301,durationSeconds:100.4},{id:"make-agent-tutorial-use",localPath:"tutorials/how-to-make-an-agent-use.mp4",objectKey:"media/videos/6e28bb710f90de8968fa18f996973b869e6748797739dd93cce49d8fbba564c1.mp4",sha256:"6e28bb710f90de8968fa18f996973b869e6748797739dd93cce49d8fbba564c1",sizeBytes:5084394,durationSeconds:75.1},{id:"make-agent-tutorial-improve",localPath:"tutorials/how-to-make-an-agent-improve.mp4",objectKey:"media/videos/fe8b62bf6ed5f5b933b0023dfdd9a06e69b5b352d4c702b671ec7677b395d58d.mp4",sha256:"fe8b62bf6ed5f5b933b0023dfdd9a06e69b5b352d4c702b671ec7677b395d58d",sizeBytes:6255324,durationSeconds:108.634}],me={playlists:fe,videos:ge},be="https://media.openpond.ai",K=me,he=new Map(K.playlists.map(e=>[e.id,e])),ye=new Map(K.videos.map(e=>[e.id,e]));function z(e){const a=he.get(e);if(!a)throw new Error(`Public video manifest is missing playlist ${e}`);return a}function Te(e,a){return a?`${be}/${e.objectKey}`:I(e.localPath)}function E(e){const a=ye.get(e);if(!a)throw new Error(`Public video manifest is missing ${e}`);return Te(a,!0)}const xe=E("make-agent-tutorial"),Ae=E("openpond-agent-overview");function ve(e){return E(`make-agent-tutorial-${e}`)}const Pe={title:"How to make an agent"},je=[{id:"create",label:"Create",title:"Create an Agent",subtitle:"Turn a plain-language purpose into a working Account Health Agent.",outroTitle:"Account Health Agent created",outroSubtitle:"The agent is ready to use. · AI-generated narration",cardDuration:1.5},{id:"use",label:"Use",title:"Use the Agent",subtitle:"Chat with the Account Health Agent and run its actions with approval.",outroTitle:"First agent run complete",outroSubtitle:"The result and supporting evidence are ready to review. · AI-generated narration",cardDuration:1.5},{id:"improve",label:"Improve",title:"Improve the Agent",subtitle:"Use real run evidence and Evals to make the Account Health Agent better.",outroTitle:"Account Health Agent improved",outroSubtitle:"The updated agent passed its Evals. · AI-generated narration",cardDuration:1.5}],$={tutorial:Pe,chapters:je},Ne=z("how-to-make-an-agent"),B=$.chapters,Ie={create:"1:24",use:"1:05",improve:"1:10"},S=Ne.title,Ee=$.tutorial.title,F="4:33",H={captionsUrl:se,chapterIds:B.map(e=>e.id),description:"Create, use, and improve an Account Health Agent in one continuous walkthrough.",duration:F,eyebrow:"Play all",id:"make-agent-tutorial",lessonNumber:null,posterUrl:ne,title:Ee,videoId:"play-all",videoUrl:xe},T=B.map((e,a)=>({captionsUrl:re(e.id),chapterIds:[e.id],description:e.subtitle,duration:Ie[e.id],eyebrow:`Lesson ${a+1}`,id:`make-agent-tutorial-${e.id}`,lessonNumber:a+1,posterUrl:ie(e.id),title:e.title,videoId:e.id,videoUrl:ve(e.id)})),we=[H,...T];function W(e){return we.find(a=>a.videoId===e)??H}function Se(e){const a=T.findIndex(i=>i.videoId===e);return a<0?null:T[a+1]?.videoId??null}const Re=[2,1,0];function _e({activeVideoId:e="play-all",autoplay:a=!0,onClose:i,onOpen:n,onSelectVideo:d,open:s=!1,playRequestId:r=0}={}){const u=x.useRef(null),l=W(e);x.useEffect(()=>{if(!s)return;const c=u.current;c&&(c.load(),r>0&&c.play().catch(()=>{}))},[l.id,s,r]);function p(){if(!a||!d)return;const c=Se(e);c&&d(c)}return t.jsxs("section",{className:"get-started-series","aria-label":S,children:[t.jsxs("article",{className:"get-started-playlist-card","aria-labelledby":"make-agent-series-title",children:[t.jsx("button",{"aria-haspopup":"dialog","aria-label":`Open ${S} playlist`,className:"get-started-playlist-open",onClick:n,type:"button"}),t.jsxs("div",{className:"get-started-playlist-stack","aria-hidden":"true",children:[Re.map((c,f)=>{const m=T[c];return t.jsx("div",{className:`get-started-playlist-poster layer-${f+1}`,children:t.jsx("img",{alt:"",decoding:"async",src:m.posterUrl})},m.id)}),t.jsx("span",{className:"get-started-course-play-icon",children:t.jsx(k,{fill:"currentColor",size:19})}),t.jsxs("span",{className:"get-started-playlist-count",children:[T.length," lessons"]})]}),t.jsxs("div",{className:"get-started-playlist-copy",children:[t.jsx("h1",{id:"make-agent-series-title",children:S}),t.jsxs("div",{className:"get-started-course-meta",children:[t.jsx("span",{children:"Walkthrough playlist"}),t.jsx("span",{"aria-hidden":"true",children:"·"}),t.jsx("span",{children:F})]}),t.jsx("p",{children:"Create, use, and improve an Account Health Agent, or play the full walkthrough."})]})]}),s&&i&&d?t.jsx(Oe,{activeVideoId:e,autoplay:a,contained:!0,inertExclusionSelector:".get-started-learning-panel",onClose:i,onEnded:p,onSelectVideo:d,videoRef:u}):null]})}function Oe({activeVideoId:e="play-all",autoplay:a=!0,contained:i=!1,inertExclusionSelector:n,onClose:d,onEnded:s,onSelectVideo:r=()=>{},videoRef:u}){const l=W(e),p=T.findIndex(m=>m.videoId===e),c=p>=0?T[p+1]?.videoId:void 0,f=p>0?T[p-1]?.videoId:void 0;return t.jsx(L,{autoAdvance:a&&p>=0,contained:i,inertExclusionSelector:n,navigation:p>=0?{currentIndex:p,onNext:c?()=>r(c):void 0,onPrevious:f?()=>r(f):void 0,total:T.length}:void 0,onClose:d,onEnded:s?()=>s():void 0,video:l,videoRef:u})}const U=z("post-training-from-first-principles"),q=U.title,ke=U.status;function h(e,a,i,n,d,s){const r=`courses/post-training/${a}`,u=`post-training-${a}`;return{captionsUrl:I(`${r}.vtt`),description:s,duration:d,eyebrow:n,id:u,lessonNumber:e,posterUrl:I(`${r}-poster.webp`),slug:a,title:i,videoUrl:E(u)}}const A=[h(1,"01-how-post-training-works","How post-training works","Start here","1:05","The choose, judge, and update loop behind every method in this series."),h(2,"02-definitions","Definitions","Reference","6:14","Policy notation, softmax, rollouts, advantages, gradients, GRPO, and the acronyms used throughout the series."),h(3,"03-on-policy-off-policy","On-policy and off-policy data","Data source","1:06","Why learner rollouts and teacher or stored data support different updates."),h(4,"04-rewards-credit-assignment","Rewards and credit assignment","RL foundation","3:00","Follow a code-repair trajectory from actions and observations to advantage."),h(5,"05-verifiable-rewards-rlvr","Verifiable rewards","RLVR","2:53","See how tests create scalable rewards—and how a model can exploit the checker."),h(6,"06-ppo-grpo","PPO and GRPO","Policy updates","2:54","Compare PPO's learned critic with GRPO's sibling-response baseline."),h(7,"07-distillation","Distillation","Teacher targets","2:42","Transfer a teacher's token distribution instead of copying one final answer."),h(8,"08-opsd-sdft-sdpo","OPSD, SDFT, and SDPO","Teacher evidence","2:43","Compare trusted solutions, demonstrations, and failure feedback at one prefix."),h(9,"09-credible-experiments","Credible experiments","Research design","3:32","Build versioned datasets, fair baselines, and claims that survive scrutiny."),h(10,"10-technical-appendix","Technical appendix","Advanced details","3:12","Inspect GRPO normalization, compressed teacher logits, reported method results, and sample routing.")],Le="29 min",O=U.fullVideoId;if(!O)throw new Error("Post-training playlist is missing its full video");const Y={captionsUrl:I("courses/post-training/full-course.vtt"),description:"All ten lessons in one continuous video for watching, sharing, or uploading.",duration:"29:20",eyebrow:"Full course",id:O,posterUrl:I("courses/post-training/full-course-poster.webp"),title:q,videoUrl:E(O)};function J(e){const a=e+1;return a<A.length?a:null}const V="Subject to change, lesson work in progress";function Ue(){const e=ke==="draft"?"Draft":"Published";return t.jsx("span",{"aria-label":`${e}: ${V}`,className:"get-started-playlist-status app-tooltip","data-tooltip":V,tabIndex:0,children:e})}const C="openpond.post-training-progress.v1",j=Object.freeze({}),Ce=1e3,X=new Set;let P=null,N=null,G=!1;function R(e){return typeof e=="number"&&Number.isFinite(e)?e:null}function Me(e){if(!e||typeof e!="object"||Array.isArray(e))return j;const a={};for(const[i,n]of Object.entries(e)){if(!i||!n||typeof n!="object"||Array.isArray(n))continue;const d=n,s=R(d.duration),r=R(d.currentTime),u=R(d.updatedAt);if(s===null||s<=0||r===null)continue;const l=d.completed===!0;a[i]={completed:l,currentTime:l?s:Math.min(s,Math.max(0,r)),duration:s,updatedAt:u===null?0:Math.max(0,u)}}return Object.keys(a).length>0?a:j}function Q(e){if(!e)return j;try{return Me(JSON.parse(e))}catch{return j}}function Ve(){if(typeof window>"u")return j;try{return Q(window.localStorage.getItem(C))}catch{return j}}function Z(){if(typeof window<"u"&&N!==null&&window.clearTimeout(N),N=null,!(typeof window>"u"||P===null))try{window.localStorage.setItem(C,JSON.stringify(P))}catch{}}function Ge(){typeof window>"u"||N!==null||(N=window.setTimeout(Z,Ce))}function De(){typeof window>"u"||G||(G=!0,window.addEventListener("pagehide",Z),window.addEventListener("storage",e=>{e.key===C&&(P=Q(e.newValue),X.forEach(a=>a()))}))}function ee(){return P===null&&(P=Ve()),De(),P}function D({completed:e=!1,currentTime:a,duration:i,lessonId:n}){if(!n||!Number.isFinite(i)||i<=0||!Number.isFinite(a))return;const d=ee(),s=d[n],r=!!(s?.completed||e),u=r?i:Math.min(i,Math.max(0,a));s&&s.completed===r&&Math.abs(s.currentTime-u)<.25&&Math.abs(s.duration-i)<.25||(P={...d,[n]:{completed:r,currentTime:u,duration:i,updatedAt:Date.now()}},Ge(),X.forEach(l=>l()))}function Ke(e){return!e||e.completed||e.currentTime<1?0:e.currentTime<e.duration-2?e.currentTime:0}const _=q,ze=[2,1,0];function $e({activeLessonIndex:e,fullCourseSelected:a=!1,autoplay:i=!0,open:n,onClose:d,onOpen:s,onSelectLesson:r,playRequestId:u=0}){const l=x.useRef(null),p=x.useRef(null),c=A[e]??A[0],f=a?Y:c;x.useEffect(()=>{if(!n)return;const o=l.current;if(!o)return;let b=!1;p.current=null,o.load();const y=()=>{if(b)return;const M=Ke(ee()[f.id]);M>0&&(o.currentTime=M),u>0&&o.play().catch(()=>{})};return o.readyState>=HTMLMediaElement.HAVE_METADATA?y():o.addEventListener("loadedmetadata",y,{once:!0}),()=>{b=!0,o.removeEventListener("loadedmetadata",y),Number.isFinite(o.duration)&&o.duration>0&&o.currentTime>0&&D({completed:o.ended,currentTime:o.currentTime,duration:o.duration,lessonId:f.id})}},[f.id,n,u]);function m(o,b=!1){!Number.isFinite(o.duration)||o.duration<=0||D({completed:b,currentTime:b?o.duration:o.currentTime,duration:o.duration,lessonId:f.id})}function w(o){if(!Number.isFinite(o.duration)||o.duration<=0)return;const b=Math.min(99,Math.floor(o.currentTime/o.duration*100)),y=p.current;y?.lessonId===f.id&&y.percent===b||(p.current={lessonId:f.id,percent:b},m(o))}function v(o){m(o,!0),i&&!a&&g()}function g(){const o=J(e);o!==null&&r(o)}return t.jsxs("section",{className:"get-started-series","aria-label":_,children:[t.jsxs("article",{className:"get-started-playlist-card","aria-labelledby":"post-training-series-title",children:[t.jsx("button",{"aria-haspopup":"dialog","aria-label":`Open ${_} playlist`,className:"get-started-playlist-open",onClick:s,type:"button"}),t.jsxs("div",{className:"get-started-playlist-stack","aria-hidden":"true",children:[ze.map((o,b)=>{const y=A[o];return t.jsx("div",{className:`get-started-playlist-poster layer-${b+1}`,children:t.jsx("img",{alt:"",decoding:"async",src:y.posterUrl})},y.id)}),t.jsx("span",{className:"get-started-course-play-icon",children:t.jsx(k,{fill:"currentColor",size:19})}),t.jsxs("span",{className:"get-started-playlist-count",children:[A.length," lessons"]})]}),t.jsxs("div",{className:"get-started-playlist-copy",children:[t.jsxs("div",{className:"get-started-playlist-title",children:[t.jsx("h1",{id:"post-training-series-title",children:_}),t.jsx(Ue,{})]}),t.jsxs("div",{className:"get-started-course-meta",children:[t.jsx("span",{children:"Learning series"}),t.jsx("span",{"aria-hidden":"true",children:"·"}),t.jsx("span",{children:Le})]}),t.jsx("p",{children:"Rewards, GRPO, RLVR, distillation, experiments, and a technical appendix."})]})]}),n?t.jsx(Be,{activeLessonIndex:e,autoplay:i,fullCourseSelected:a,onClose:d,onEnded:v,onPause:m,onSelectLesson:r,onTimeUpdate:w,videoRef:l}):null]})}function Be({activeLessonIndex:e,autoplay:a,fullCourseSelected:i,onClose:n,onEnded:d,onPause:s,onSelectLesson:r,onTimeUpdate:u,videoRef:l}){const p=A[e]??A[0],c=J(e),f=i?Y:p;return t.jsx(L,{autoAdvance:a&&!i,contained:!0,inertExclusionSelector:".get-started-learning-panel",navigation:i?void 0:{currentIndex:e,onNext:c!==null?()=>r(c):void 0,onPrevious:e>0?()=>r(e-1):void 0,total:A.length},onClose:n,onEnded:d,onPause:s,onTimeUpdate:u,video:f,videoRef:l})}const Fe={captionsUrl:de,description:"See how Profile Agents combine chat, direct actions, shared runtime surfaces, and Evals.",duration:"1:16",eyebrow:"Agent overview",id:"openpond-agent-overview",posterUrl:oe,title:"What is an OpenPond Agent?",videoUrl:Ae};function Xe(e={}){const[a,i]=x.useState(null),[n,d]=x.useState(null),s=e.makeAgentTutorial===void 0?a:e.makeAgentTutorial,r=e.postTrainingCourse===void 0?n:e.postTrainingCourse,u=!!(r||s);function l(){if(e.onOpenMakeAgentTutorial){e.onOpenMakeAgentTutorial();return}d(null),i({autoplay:!0,playRequestId:0,videoId:"create"})}function p(){if(e.onCloseMakeAgentTutorial){e.onCloseMakeAgentTutorial();return}i(null)}function c(v){if(e.onSelectMakeAgentTutorialVideo){e.onSelectMakeAgentTutorialVideo(v);return}i(g=>g&&{...g,playRequestId:g.playRequestId+1,videoId:v})}function f(){if(e.onOpenPostTrainingCourse){e.onOpenPostTrainingCourse();return}i(null),d({autoplay:!0,fullCourseSelected:!1,lessonIndex:0,playRequestId:0})}function m(){if(e.onClosePostTrainingCourse){e.onClosePostTrainingCourse();return}d(null)}function w(v){if(e.onSelectPostTrainingLesson){e.onSelectPostTrainingLesson(v);return}d(g=>g&&{...g,fullCourseSelected:!1,lessonIndex:v,playRequestId:g.playRequestId+1})}return t.jsx("section",{className:`get-started-view ${u?"course-player-open":""}`,"aria-label":"Walkthroughs",children:t.jsxs("div",{className:"get-started-shell",children:[t.jsxs("section",{className:"get-started-start-here","aria-labelledby":"get-started-start-here-title",children:[t.jsx("header",{className:"get-started-section-heading",children:t.jsx("h2",{id:"get-started-start-here-title",children:"Start here"})}),t.jsx("div",{className:"get-started-learning-grid",children:t.jsx(pe,{titleElement:"h1",video:Fe})})]}),t.jsxs("section",{className:"get-started-walkthroughs","aria-labelledby":"get-started-walkthroughs-title",children:[t.jsx("header",{className:"get-started-section-heading",children:t.jsx("h2",{id:"get-started-walkthroughs-title",children:"Walkthroughs"})}),t.jsx("div",{className:"get-started-learning-grid",children:t.jsx(_e,{activeVideoId:s?.videoId??"create",autoplay:s?.autoplay??!0,onClose:p,onOpen:l,onSelectVideo:c,open:!!s,playRequestId:s?.playRequestId??0})})]}),t.jsxs("section",{className:"get-started-learn","aria-labelledby":"get-started-learn-title",children:[t.jsx("header",{className:"get-started-section-heading",children:t.jsx("h2",{id:"get-started-learn-title",children:"Learn deeper"})}),t.jsx("div",{className:"get-started-learning-grid",children:t.jsx($e,{activeLessonIndex:r?.lessonIndex??0,autoplay:r?.autoplay??!0,fullCourseSelected:r?.fullCourseSelected??!1,open:!!r,onClose:m,onOpen:f,onSelectLesson:w,playRequestId:r?.playRequestId??0})})]})]})})}export{Xe as GetStartedView};
|
|
1
|
+
import{r as x,j as t,A as te,X as ae,aY as I,by as ne,bz as se,bA as ie,bB as re,bC as oe,bD as de}from"./index-CDJX5ZxL.js";import{P as k}from"./play-lC5KpmRD.js";import{r as le}from"./index-Blindd8c.js";import{A as ce}from"./AppDialog-BEKS_Ixr.js";import{A as ue}from"./MarkdownText-_JhfBcQL.js";function pe({badge:e,onPlay:a,titleElement:i="h3",video:n}){const[d,s]=x.useState(!1),r=x.useRef(null),u=i,l=`${n.id}-title`;function p(){if(a){a();return}le.flushSync(()=>s(!0));const c=r.current;c&&(c.load(),c.play().catch(()=>{}))}return t.jsxs(t.Fragment,{children:[t.jsxs("article",{className:"get-started-course-card","aria-labelledby":l,children:[t.jsx("button",{"aria-haspopup":"dialog","aria-label":`Play ${n.title}`,className:"get-started-course-open",onClick:p,type:"button"}),t.jsxs("div",{className:"get-started-course-media",children:[t.jsx("img",{alt:"",className:"get-started-course-poster",decoding:"async",src:n.posterUrl}),t.jsx("span",{className:"get-started-course-play-icon","aria-hidden":"true",children:t.jsx(k,{fill:"currentColor",size:19})}),e?t.jsx("span",{className:"get-started-course-badge","aria-hidden":"true",children:e}):null]}),t.jsxs("div",{className:"get-started-course-copy",children:[t.jsx(u,{id:l,children:n.title}),t.jsxs("div",{className:"get-started-course-meta","aria-label":`${n.title} details`,children:[t.jsx("span",{children:n.eyebrow}),t.jsx("span",{"aria-hidden":"true",children:"·"}),t.jsx("span",{children:n.duration})]}),n.description?t.jsx("p",{children:n.description}):null]})]}),d&&!a?t.jsx(L,{onClose:()=>s(!1),video:n,videoRef:r}):null]})}function L({autoAdvance:e=!1,contained:a=!1,inertExclusionSelector:i,navigation:n,onEnded:d,onClose:s,onPause:r,onTimeUpdate:u,video:l,videoRef:p}){return t.jsxs(ce,{ariaLabel:`${l.title} player`,backdropClassName:"get-started-course-player-backdrop",className:"get-started-course-player",contained:a,inertExclusionSelector:i,onClose:s,children:[t.jsxs("header",{className:"get-started-course-player-header",children:[t.jsxs("div",{className:"get-started-course-player-copy",children:[t.jsx("strong",{children:l.title}),t.jsxs("span",{children:[n?`Lesson ${n.currentIndex+1} of ${n.total}`:l.eyebrow," · ",l.duration]})]}),t.jsxs("div",{className:"get-started-course-player-actions",children:[n?t.jsxs(t.Fragment,{children:[t.jsx("button",{"aria-label":"Previous lesson",disabled:!n.onPrevious,onClick:n.onPrevious,title:"Previous lesson",type:"button",children:t.jsx(te,{size:17})}),t.jsx("button",{"aria-label":"Next lesson",disabled:!n.onNext,onClick:n.onNext,title:"Next lesson",type:"button",children:t.jsx(ue,{size:17})})]}):null,t.jsx("button",{"aria-label":"Close video player","data-autofocus":!0,onClick:s,title:"Close",type:"button",children:t.jsx(ae,{size:18})})]})]}),t.jsx("div",{className:"get-started-course-player-body",children:t.jsx("div",{className:"get-started-course-player-media",children:t.jsx("div",{className:"get-started-course-player-stage",children:t.jsx("video",{"aria-label":`${l.title} video`,className:"get-started-course-player-video",controls:!0,"data-auto-advance":e?"true":void 0,onEnded:c=>d?.(c.currentTarget),onPause:c=>r?.(c.currentTarget),onTimeUpdate:c=>u?.(c.currentTarget),playsInline:!0,poster:l.posterUrl,preload:"metadata",ref:p,src:l.videoUrl,children:l.captionsUrl?t.jsx("track",{kind:"captions",label:"English",src:l.captionsUrl,srcLang:"en"}):null},l.id)})})})]})}const fe=[{id:"post-training-from-first-principles",fullVideoId:"post-training-full-course",status:"draft",title:"Post-training from first principles",videoIds:["post-training-01-how-post-training-works","post-training-02-definitions","post-training-03-on-policy-off-policy","post-training-04-rewards-credit-assignment","post-training-05-verifiable-rewards-rlvr","post-training-06-ppo-grpo","post-training-07-distillation","post-training-08-opsd-sdft-sdpo","post-training-09-credible-experiments","post-training-10-technical-appendix"]},{id:"how-to-make-an-agent",status:"published",title:"Agents",playAllVideoId:"make-agent-tutorial",videoIds:["make-agent-tutorial-create","make-agent-tutorial-use","make-agent-tutorial-improve"]}],ge=[{id:"post-training-01-how-post-training-works",localPath:"courses/post-training/01-how-post-training-works.mp4",objectKey:"media/videos/aeb54dfb42eb940672df6e41bae075ffa5e45e1609e173a91e485c808b61fd4a.mp4",sha256:"aeb54dfb42eb940672df6e41bae075ffa5e45e1609e173a91e485c808b61fd4a",sizeBytes:2114638,durationSeconds:64.967},{id:"post-training-02-definitions",localPath:"courses/post-training/02-definitions.mp4",objectKey:"media/videos/c57d021989cdf058c683b9d017eb91bd23075e6bd00d0cc055e1285b3ea119fc.mp4",sha256:"c57d021989cdf058c683b9d017eb91bd23075e6bd00d0cc055e1285b3ea119fc",sizeBytes:11956956,durationSeconds:374.367},{id:"post-training-03-on-policy-off-policy",localPath:"courses/post-training/03-on-policy-off-policy.mp4",objectKey:"media/videos/a807bd7d704f8603addc875623a3cfcc938e60e0170d555d47569394a1c31762.mp4",sha256:"a807bd7d704f8603addc875623a3cfcc938e60e0170d555d47569394a1c31762",sizeBytes:2291518,durationSeconds:66.367},{id:"post-training-04-rewards-credit-assignment",localPath:"courses/post-training/04-rewards-credit-assignment.mp4",objectKey:"media/videos/685f7ecff7fcea262dd2cf60568079633816e9116efd80c069d0e20a4959a87f.mp4",sha256:"685f7ecff7fcea262dd2cf60568079633816e9116efd80c069d0e20a4959a87f",sizeBytes:5677418,durationSeconds:179.834},{id:"post-training-05-verifiable-rewards-rlvr",localPath:"courses/post-training/05-verifiable-rewards-rlvr.mp4",objectKey:"media/videos/0633584b2036843edd1ff9c63f0858db4272ddf55b10b160ec2ef6f7650c7d3a.mp4",sha256:"0633584b2036843edd1ff9c63f0858db4272ddf55b10b160ec2ef6f7650c7d3a",sizeBytes:5666892,durationSeconds:172.534},{id:"post-training-06-ppo-grpo",localPath:"courses/post-training/06-ppo-grpo.mp4",objectKey:"media/videos/66760fec7508c413844adb06c3f3920c5f7e3a874b18dc244ba090c55f452ff3.mp4",sha256:"66760fec7508c413844adb06c3f3920c5f7e3a874b18dc244ba090c55f452ff3",sizeBytes:5519257,durationSeconds:173.6},{id:"post-training-07-distillation",localPath:"courses/post-training/07-distillation.mp4",objectKey:"media/videos/3590f94325c1986f2025b42d182f04957e9eff6d5c06b1effc28dc369651c466.mp4",sha256:"3590f94325c1986f2025b42d182f04957e9eff6d5c06b1effc28dc369651c466",sizeBytes:4687640,durationSeconds:161.667},{id:"post-training-08-opsd-sdft-sdpo",localPath:"courses/post-training/08-opsd-sdft-sdpo.mp4",objectKey:"media/videos/3c45d8c1df0a24132ec425762dc6a4274b1e5cac6dfd220a2994f8754f431031.mp4",sha256:"3c45d8c1df0a24132ec425762dc6a4274b1e5cac6dfd220a2994f8754f431031",sizeBytes:5439835,durationSeconds:163.134},{id:"post-training-09-credible-experiments",localPath:"courses/post-training/09-credible-experiments.mp4",objectKey:"media/videos/fc701a8ba4b42de53bcaec3dcf191e6ec66f1dc0c48480f0aff01c3849aff023.mp4",sha256:"fc701a8ba4b42de53bcaec3dcf191e6ec66f1dc0c48480f0aff01c3849aff023",sizeBytes:6909405,durationSeconds:211.934},{id:"post-training-10-technical-appendix",localPath:"courses/post-training/10-technical-appendix.mp4",objectKey:"media/videos/17e6b5ef161fcdc97678e5b63650bffdb4b4b0d510ba75725a2af8a5db0d7e21.mp4",sha256:"17e6b5ef161fcdc97678e5b63650bffdb4b4b0d510ba75725a2af8a5db0d7e21",sizeBytes:5481950,durationSeconds:191.767},{id:"post-training-full-course",localPath:"courses/post-training/full-course.mp4",objectKey:"media/videos/d3df6a3b2ffe6c696b9dc0774ceaec19a2b8a92b170476cacb9df8dbdb2a526f.mp4",sha256:"d3df6a3b2ffe6c696b9dc0774ceaec19a2b8a92b170476cacb9df8dbdb2a526f",sizeBytes:55740426,durationSeconds:1760.192},{id:"openpond-agent-overview",localPath:"tutorials/what-is-an-openpond-agent.mp4",objectKey:"media/videos/421160f56d82abd6515df0d5ccf144591749e0ab1d58d630805c4807913812c7.mp4",sha256:"421160f56d82abd6515df0d5ccf144591749e0ab1d58d630805c4807913812c7",sizeBytes:5259848,durationSeconds:77.467},{id:"make-agent-tutorial",localPath:"tutorials/how-to-make-an-agent.mp4",objectKey:"media/videos/252d2f27076c904d85c9854c2f4c494fe9e92b3cea7d2c58ffbaa0323c17f255.mp4",sha256:"252d2f27076c904d85c9854c2f4c494fe9e92b3cea7d2c58ffbaa0323c17f255",sizeBytes:17339101,durationSeconds:273.067},{id:"make-agent-tutorial-create",localPath:"tutorials/how-to-make-an-agent-create.mp4",objectKey:"media/videos/322c999225d4759c34334eee22edee25a737fb06c5c6d66ee1f84485bb586c44.mp4",sha256:"322c999225d4759c34334eee22edee25a737fb06c5c6d66ee1f84485bb586c44",sizeBytes:6050301,durationSeconds:100.4},{id:"make-agent-tutorial-use",localPath:"tutorials/how-to-make-an-agent-use.mp4",objectKey:"media/videos/6e28bb710f90de8968fa18f996973b869e6748797739dd93cce49d8fbba564c1.mp4",sha256:"6e28bb710f90de8968fa18f996973b869e6748797739dd93cce49d8fbba564c1",sizeBytes:5084394,durationSeconds:75.1},{id:"make-agent-tutorial-improve",localPath:"tutorials/how-to-make-an-agent-improve.mp4",objectKey:"media/videos/fe8b62bf6ed5f5b933b0023dfdd9a06e69b5b352d4c702b671ec7677b395d58d.mp4",sha256:"fe8b62bf6ed5f5b933b0023dfdd9a06e69b5b352d4c702b671ec7677b395d58d",sizeBytes:6255324,durationSeconds:108.634}],me={playlists:fe,videos:ge},be="https://media.openpond.ai",K=me,he=new Map(K.playlists.map(e=>[e.id,e])),ye=new Map(K.videos.map(e=>[e.id,e]));function z(e){const a=he.get(e);if(!a)throw new Error(`Public video manifest is missing playlist ${e}`);return a}function Te(e,a){return a?`${be}/${e.objectKey}`:I(e.localPath)}function E(e){const a=ye.get(e);if(!a)throw new Error(`Public video manifest is missing ${e}`);return Te(a,!0)}const xe=E("make-agent-tutorial"),Ae=E("openpond-agent-overview");function ve(e){return E(`make-agent-tutorial-${e}`)}const Pe={title:"How to make an agent"},je=[{id:"create",label:"Create",title:"Create an Agent",subtitle:"Turn a plain-language purpose into a working Account Health Agent.",outroTitle:"Account Health Agent created",outroSubtitle:"The agent is ready to use. · AI-generated narration",cardDuration:1.5},{id:"use",label:"Use",title:"Use the Agent",subtitle:"Chat with the Account Health Agent and run its actions with approval.",outroTitle:"First agent run complete",outroSubtitle:"The result and supporting evidence are ready to review. · AI-generated narration",cardDuration:1.5},{id:"improve",label:"Improve",title:"Improve the Agent",subtitle:"Use real run evidence and Evals to make the Account Health Agent better.",outroTitle:"Account Health Agent improved",outroSubtitle:"The updated agent passed its Evals. · AI-generated narration",cardDuration:1.5}],$={tutorial:Pe,chapters:je},Ne=z("how-to-make-an-agent"),B=$.chapters,Ie={create:"1:24",use:"1:05",improve:"1:10"},S=Ne.title,Ee=$.tutorial.title,F="4:33",H={captionsUrl:se,chapterIds:B.map(e=>e.id),description:"Create, use, and improve an Account Health Agent in one continuous walkthrough.",duration:F,eyebrow:"Play all",id:"make-agent-tutorial",lessonNumber:null,posterUrl:ne,title:Ee,videoId:"play-all",videoUrl:xe},T=B.map((e,a)=>({captionsUrl:re(e.id),chapterIds:[e.id],description:e.subtitle,duration:Ie[e.id],eyebrow:`Lesson ${a+1}`,id:`make-agent-tutorial-${e.id}`,lessonNumber:a+1,posterUrl:ie(e.id),title:e.title,videoId:e.id,videoUrl:ve(e.id)})),we=[H,...T];function W(e){return we.find(a=>a.videoId===e)??H}function Se(e){const a=T.findIndex(i=>i.videoId===e);return a<0?null:T[a+1]?.videoId??null}const Re=[2,1,0];function _e({activeVideoId:e="play-all",autoplay:a=!0,onClose:i,onOpen:n,onSelectVideo:d,open:s=!1,playRequestId:r=0}={}){const u=x.useRef(null),l=W(e);x.useEffect(()=>{if(!s)return;const c=u.current;c&&(c.load(),r>0&&c.play().catch(()=>{}))},[l.id,s,r]);function p(){if(!a||!d)return;const c=Se(e);c&&d(c)}return t.jsxs("section",{className:"get-started-series","aria-label":S,children:[t.jsxs("article",{className:"get-started-playlist-card","aria-labelledby":"make-agent-series-title",children:[t.jsx("button",{"aria-haspopup":"dialog","aria-label":`Open ${S} playlist`,className:"get-started-playlist-open",onClick:n,type:"button"}),t.jsxs("div",{className:"get-started-playlist-stack","aria-hidden":"true",children:[Re.map((c,f)=>{const m=T[c];return t.jsx("div",{className:`get-started-playlist-poster layer-${f+1}`,children:t.jsx("img",{alt:"",decoding:"async",src:m.posterUrl})},m.id)}),t.jsx("span",{className:"get-started-course-play-icon",children:t.jsx(k,{fill:"currentColor",size:19})}),t.jsxs("span",{className:"get-started-playlist-count",children:[T.length," lessons"]})]}),t.jsxs("div",{className:"get-started-playlist-copy",children:[t.jsx("h1",{id:"make-agent-series-title",children:S}),t.jsxs("div",{className:"get-started-course-meta",children:[t.jsx("span",{children:"Walkthrough playlist"}),t.jsx("span",{"aria-hidden":"true",children:"·"}),t.jsx("span",{children:F})]}),t.jsx("p",{children:"Create, use, and improve an Account Health Agent, or play the full walkthrough."})]})]}),s&&i&&d?t.jsx(Oe,{activeVideoId:e,autoplay:a,contained:!0,inertExclusionSelector:".get-started-learning-panel",onClose:i,onEnded:p,onSelectVideo:d,videoRef:u}):null]})}function Oe({activeVideoId:e="play-all",autoplay:a=!0,contained:i=!1,inertExclusionSelector:n,onClose:d,onEnded:s,onSelectVideo:r=()=>{},videoRef:u}){const l=W(e),p=T.findIndex(m=>m.videoId===e),c=p>=0?T[p+1]?.videoId:void 0,f=p>0?T[p-1]?.videoId:void 0;return t.jsx(L,{autoAdvance:a&&p>=0,contained:i,inertExclusionSelector:n,navigation:p>=0?{currentIndex:p,onNext:c?()=>r(c):void 0,onPrevious:f?()=>r(f):void 0,total:T.length}:void 0,onClose:d,onEnded:s?()=>s():void 0,video:l,videoRef:u})}const U=z("post-training-from-first-principles"),Y=U.title,ke=U.status;function h(e,a,i,n,d,s){const r=`courses/post-training/${a}`,u=`post-training-${a}`;return{captionsUrl:I(`${r}.vtt`),description:s,duration:d,eyebrow:n,id:u,lessonNumber:e,posterUrl:I(`${r}-poster.webp`),slug:a,title:i,videoUrl:E(u)}}const A=[h(1,"01-how-post-training-works","How post-training works","Start here","1:05","The choose, judge, and update loop behind every method in this series."),h(2,"02-definitions","Definitions","Reference","6:14","Policy notation, softmax, rollouts, advantages, gradients, GRPO, and the acronyms used throughout the series."),h(3,"03-on-policy-off-policy","On-policy and off-policy data","Data source","1:06","Why learner rollouts and teacher or stored data support different updates."),h(4,"04-rewards-credit-assignment","Rewards and credit assignment","RL foundation","3:00","Follow a code-repair trajectory from actions and observations to advantage."),h(5,"05-verifiable-rewards-rlvr","Verifiable rewards","RLVR","2:53","See how tests create scalable rewards—and how a model can exploit the checker."),h(6,"06-ppo-grpo","PPO and GRPO","Policy updates","2:54","Compare PPO's learned critic with GRPO's sibling-response baseline."),h(7,"07-distillation","Distillation","Teacher targets","2:42","Transfer a teacher's token distribution instead of copying one final answer."),h(8,"08-opsd-sdft-sdpo","OPSD, SDFT, and SDPO","Teacher evidence","2:43","Compare trusted solutions, demonstrations, and failure feedback at one prefix."),h(9,"09-credible-experiments","Credible experiments","Research design","3:32","Build versioned datasets, fair baselines, and claims that survive scrutiny."),h(10,"10-technical-appendix","Technical appendix","Advanced details","3:12","Inspect GRPO normalization, compressed teacher logits, reported method results, and sample routing.")],Le="29 min",O=U.fullVideoId;if(!O)throw new Error("Post-training playlist is missing its full video");const q={captionsUrl:I("courses/post-training/full-course.vtt"),description:"All ten lessons in one continuous video for watching, sharing, or uploading.",duration:"29:20",eyebrow:"Full course",id:O,posterUrl:I("courses/post-training/full-course-poster.webp"),title:Y,videoUrl:E(O)};function J(e){const a=e+1;return a<A.length?a:null}const V="Subject to change, lesson work in progress";function Ue(){const e=ke==="draft"?"Draft":"Published";return t.jsx("span",{"aria-label":`${e}: ${V}`,className:"get-started-playlist-status app-tooltip","data-tooltip":V,tabIndex:0,children:e})}const C="openpond.post-training-progress.v1",j=Object.freeze({}),Ce=1e3,X=new Set;let P=null,N=null,G=!1;function R(e){return typeof e=="number"&&Number.isFinite(e)?e:null}function Me(e){if(!e||typeof e!="object"||Array.isArray(e))return j;const a={};for(const[i,n]of Object.entries(e)){if(!i||!n||typeof n!="object"||Array.isArray(n))continue;const d=n,s=R(d.duration),r=R(d.currentTime),u=R(d.updatedAt);if(s===null||s<=0||r===null)continue;const l=d.completed===!0;a[i]={completed:l,currentTime:l?s:Math.min(s,Math.max(0,r)),duration:s,updatedAt:u===null?0:Math.max(0,u)}}return Object.keys(a).length>0?a:j}function Q(e){if(!e)return j;try{return Me(JSON.parse(e))}catch{return j}}function Ve(){if(typeof window>"u")return j;try{return Q(window.localStorage.getItem(C))}catch{return j}}function Z(){if(typeof window<"u"&&N!==null&&window.clearTimeout(N),N=null,!(typeof window>"u"||P===null))try{window.localStorage.setItem(C,JSON.stringify(P))}catch{}}function Ge(){typeof window>"u"||N!==null||(N=window.setTimeout(Z,Ce))}function De(){typeof window>"u"||G||(G=!0,window.addEventListener("pagehide",Z),window.addEventListener("storage",e=>{e.key===C&&(P=Q(e.newValue),X.forEach(a=>a()))}))}function ee(){return P===null&&(P=Ve()),De(),P}function D({completed:e=!1,currentTime:a,duration:i,lessonId:n}){if(!n||!Number.isFinite(i)||i<=0||!Number.isFinite(a))return;const d=ee(),s=d[n],r=!!(s?.completed||e),u=r?i:Math.min(i,Math.max(0,a));s&&s.completed===r&&Math.abs(s.currentTime-u)<.25&&Math.abs(s.duration-i)<.25||(P={...d,[n]:{completed:r,currentTime:u,duration:i,updatedAt:Date.now()}},Ge(),X.forEach(l=>l()))}function Ke(e){return!e||e.completed||e.currentTime<1?0:e.currentTime<e.duration-2?e.currentTime:0}const _=Y,ze=[2,1,0];function $e({activeLessonIndex:e,fullCourseSelected:a=!1,autoplay:i=!0,open:n,onClose:d,onOpen:s,onSelectLesson:r,playRequestId:u=0}){const l=x.useRef(null),p=x.useRef(null),c=A[e]??A[0],f=a?q:c;x.useEffect(()=>{if(!n)return;const o=l.current;if(!o)return;let b=!1;p.current=null,o.load();const y=()=>{if(b)return;const M=Ke(ee()[f.id]);M>0&&(o.currentTime=M),u>0&&o.play().catch(()=>{})};return o.readyState>=HTMLMediaElement.HAVE_METADATA?y():o.addEventListener("loadedmetadata",y,{once:!0}),()=>{b=!0,o.removeEventListener("loadedmetadata",y),Number.isFinite(o.duration)&&o.duration>0&&o.currentTime>0&&D({completed:o.ended,currentTime:o.currentTime,duration:o.duration,lessonId:f.id})}},[f.id,n,u]);function m(o,b=!1){!Number.isFinite(o.duration)||o.duration<=0||D({completed:b,currentTime:b?o.duration:o.currentTime,duration:o.duration,lessonId:f.id})}function w(o){if(!Number.isFinite(o.duration)||o.duration<=0)return;const b=Math.min(99,Math.floor(o.currentTime/o.duration*100)),y=p.current;y?.lessonId===f.id&&y.percent===b||(p.current={lessonId:f.id,percent:b},m(o))}function v(o){m(o,!0),i&&!a&&g()}function g(){const o=J(e);o!==null&&r(o)}return t.jsxs("section",{className:"get-started-series","aria-label":_,children:[t.jsxs("article",{className:"get-started-playlist-card","aria-labelledby":"post-training-series-title",children:[t.jsx("button",{"aria-haspopup":"dialog","aria-label":`Open ${_} playlist`,className:"get-started-playlist-open",onClick:s,type:"button"}),t.jsxs("div",{className:"get-started-playlist-stack","aria-hidden":"true",children:[ze.map((o,b)=>{const y=A[o];return t.jsx("div",{className:`get-started-playlist-poster layer-${b+1}`,children:t.jsx("img",{alt:"",decoding:"async",src:y.posterUrl})},y.id)}),t.jsx("span",{className:"get-started-course-play-icon",children:t.jsx(k,{fill:"currentColor",size:19})}),t.jsxs("span",{className:"get-started-playlist-count",children:[A.length," lessons"]})]}),t.jsxs("div",{className:"get-started-playlist-copy",children:[t.jsxs("div",{className:"get-started-playlist-title",children:[t.jsx("h1",{id:"post-training-series-title",children:_}),t.jsx(Ue,{})]}),t.jsxs("div",{className:"get-started-course-meta",children:[t.jsx("span",{children:"Learning series"}),t.jsx("span",{"aria-hidden":"true",children:"·"}),t.jsx("span",{children:Le})]}),t.jsx("p",{children:"Rewards, GRPO, RLVR, distillation, experiments, and a technical appendix."})]})]}),n?t.jsx(Be,{activeLessonIndex:e,autoplay:i,fullCourseSelected:a,onClose:d,onEnded:v,onPause:m,onSelectLesson:r,onTimeUpdate:w,videoRef:l}):null]})}function Be({activeLessonIndex:e,autoplay:a,fullCourseSelected:i,onClose:n,onEnded:d,onPause:s,onSelectLesson:r,onTimeUpdate:u,videoRef:l}){const p=A[e]??A[0],c=J(e),f=i?q:p;return t.jsx(L,{autoAdvance:a&&!i,contained:!0,inertExclusionSelector:".get-started-learning-panel",navigation:i?void 0:{currentIndex:e,onNext:c!==null?()=>r(c):void 0,onPrevious:e>0?()=>r(e-1):void 0,total:A.length},onClose:n,onEnded:d,onPause:s,onTimeUpdate:u,video:f,videoRef:l})}const Fe={captionsUrl:de,description:"See how Profile Agents combine chat, direct actions, shared runtime surfaces, and Evals.",duration:"1:16",eyebrow:"Agent overview",id:"openpond-agent-overview",posterUrl:oe,title:"What is an OpenPond Agent?",videoUrl:Ae};function Xe(e={}){const[a,i]=x.useState(null),[n,d]=x.useState(null),s=e.makeAgentTutorial===void 0?a:e.makeAgentTutorial,r=e.postTrainingCourse===void 0?n:e.postTrainingCourse,u=!!(r||s);function l(){if(e.onOpenMakeAgentTutorial){e.onOpenMakeAgentTutorial();return}d(null),i({autoplay:!0,playRequestId:0,videoId:"create"})}function p(){if(e.onCloseMakeAgentTutorial){e.onCloseMakeAgentTutorial();return}i(null)}function c(v){if(e.onSelectMakeAgentTutorialVideo){e.onSelectMakeAgentTutorialVideo(v);return}i(g=>g&&{...g,playRequestId:g.playRequestId+1,videoId:v})}function f(){if(e.onOpenPostTrainingCourse){e.onOpenPostTrainingCourse();return}i(null),d({autoplay:!0,fullCourseSelected:!1,lessonIndex:0,playRequestId:0})}function m(){if(e.onClosePostTrainingCourse){e.onClosePostTrainingCourse();return}d(null)}function w(v){if(e.onSelectPostTrainingLesson){e.onSelectPostTrainingLesson(v);return}d(g=>g&&{...g,fullCourseSelected:!1,lessonIndex:v,playRequestId:g.playRequestId+1})}return t.jsx("section",{className:`get-started-view ${u?"course-player-open":""}`,"aria-label":"Walkthroughs",children:t.jsxs("div",{className:"get-started-shell",children:[t.jsxs("section",{className:"get-started-start-here","aria-labelledby":"get-started-start-here-title",children:[t.jsx("header",{className:"get-started-section-heading",children:t.jsx("h2",{id:"get-started-start-here-title",children:"Start here"})}),t.jsx("div",{className:"get-started-learning-grid",children:t.jsx(pe,{titleElement:"h1",video:Fe})})]}),t.jsxs("section",{className:"get-started-walkthroughs","aria-labelledby":"get-started-walkthroughs-title",children:[t.jsx("header",{className:"get-started-section-heading",children:t.jsx("h2",{id:"get-started-walkthroughs-title",children:"Walkthroughs"})}),t.jsx("div",{className:"get-started-learning-grid",children:t.jsx(_e,{activeVideoId:s?.videoId??"create",autoplay:s?.autoplay??!0,onClose:p,onOpen:l,onSelectVideo:c,open:!!s,playRequestId:s?.playRequestId??0})})]}),t.jsxs("section",{className:"get-started-learn","aria-labelledby":"get-started-learn-title",children:[t.jsx("header",{className:"get-started-section-heading",children:t.jsx("h2",{id:"get-started-learn-title",children:"Learn deeper"})}),t.jsx("div",{className:"get-started-learning-grid",children:t.jsx($e,{activeLessonIndex:r?.lessonIndex??0,autoplay:r?.autoplay??!0,fullCourseSelected:r?.fullCourseSelected??!1,open:!!r,onClose:m,onOpen:f,onSelectLesson:w,playRequestId:r?.playRequestId??0})})]})]})})}export{Xe as GetStartedView};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as y,j as e,at as je,n as fe,a as ve}from"./index-CDJX5ZxL.js";import{s as G,e as ye,b as ne,d as Z,f as pe}from"./training-model-data-V8276E5q.js";import{L as X,b as ee,a as ke,l as Ne,c as Te,d as Re,e as $e,m as Se,f as we,g as Me,h as Ce,E as le}from"./LabsRoute-DVC7eZCs.js";import"./cloud-upload-mSm9KIL4.js";import"./MainPane-CNoHJkXy.js";import"./folder-DMeODEQJ.js";import"./arrow-up-right-DRIT5z3q.js";import"./MarkdownText-_JhfBcQL.js";import"./square-DfEM9XgY.js";import"./folder-open-DXaun_C3.js";import"./AppDialog-BEKS_Ixr.js";import"./ComposerCreateImproveStrip-DY4SQbL4.js";import"./circle-alert-Crh3Zr2m.js";import"./play-lC5KpmRD.js";import"./refresh-cw-8a_wz4tX.js";import"./square-pen-CgX3HoJ6.js";/* empty css */import"./UsageSettingsSection-BOZR3JE_.js";import"./index-Blindd8c.js";function Le({receipts:a}){const[t,n]=y.useState(!1);if(!a.length)return e.jsx("div",{className:"training-run-placeholder",children:"No on-policy rollout receipts were recorded for this run."});const s=[...a].sort((l,o)=>o.updatedAt.localeCompare(l.updatedAt)),i=t?s:s.slice(0,24);return e.jsxs("div",{className:"training-rollout-receipts",children:[a.length>24?e.jsxs("div",{className:"training-rollout-receipt-controls",children:[e.jsx("span",{children:t?`Showing all ${a.length} receipts`:`Showing latest ${i.length} of ${a.length} receipts`}),e.jsx("button",{className:"training-text-button",type:"button",onClick:()=>n(l=>!l),children:t?"Show latest 24":`Show all ${a.length}`})]}):null,i.map(l=>e.jsxs("details",{children:[e.jsxs("summary",{children:[e.jsx("span",{children:Pe(l.providerTrace.rolloutId)}),e.jsx("strong",{children:l.status}),e.jsx("em",{children:l.reward.eligible&&l.reward.raw!=null?l.reward.raw.toFixed(3):l.failureClass??"not reward eligible"})]}),e.jsxs("dl",{className:"training-configuration-list",children:[e.jsx(C,{label:"Correlation",value:l.correlationId}),e.jsx(C,{label:"Task",value:l.taskId}),e.jsx(C,{label:"Policy",value:l.policy.modelId}),e.jsx(C,{label:"Checkpoint",value:l.policy.checkpointId??"Provider initial policy"}),e.jsx(C,{label:"Environment",value:`${l.environment.id}@${l.environment.version}`}),e.jsx(C,{label:"World",value:`${l.environment.worldId} · ${l.environment.worldHash}`}),e.jsx(C,{label:"Raw reward",value:l.reward.raw==null?"Not eligible":String(l.reward.raw)}),e.jsx(C,{label:"Components",value:JSON.stringify(l.reward.components)}),e.jsx(C,{label:"Outcome",value:l.verifier?.outcome??l.failureClass??"Pending"}),e.jsx(C,{label:"Trace",value:`${l.providerTrace.experimentId}/${l.providerTrace.rolloutId}`})]})]},l.id))]})}function C({label:a,value:t}){return e.jsxs("div",{children:[e.jsx("dt",{children:a}),e.jsx("dd",{children:t})]})}function Pe(a){return a.replace(/^lineage_/,"").slice(0,18)}function Ae({detail:a,loading:t}){if(t&&!a)return e.jsx("div",{className:"training-run-placeholder",children:"Loading evaluation results…"});const n=a?.evaluation;return n?e.jsxs("div",{className:"training-run-evaluation",children:[e.jsxs("div",{className:"training-metric-summary",children:[e.jsx(J,{label:"Base score",value:se(n.base.meanScore)}),e.jsx(J,{label:"Trained score",value:se(n.trained.meanScore)}),e.jsx(J,{label:"Score change",value:Ie(n.meanScoreDelta)}),e.jsx(J,{label:"Trained pass rate",value:Ee(n.trained.passRate)})]}),n.base.count===0?e.jsx("p",{className:"training-muted",children:"Base-model scoring was not imported for this earlier run. New runs retain both base and trained evaluations."}):null,n.trained.count>0&&n.trained.scoredCount===0?e.jsx("p",{className:"training-muted",children:"Outputs were captured, but the grader was unavailable, so this run has no evaluation score."}):null,e.jsx("div",{className:"training-table-wrap",children:e.jsxs("table",{className:"training-data-table training-evaluation-table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Test example"}),e.jsx("th",{children:"Base"}),e.jsx("th",{children:"Trained"}),e.jsx("th",{children:"Result"})]})}),e.jsx("tbody",{children:n.examples.map(s=>e.jsxs("tr",{children:[e.jsx("td",{children:e.jsxs("details",{children:[e.jsx("summary",{children:s.taskId}),e.jsx(Fe,{input:s.input,baseOutput:s.baseOutput,trainedOutput:s.trainedOutput,baseGrade:s.baseGrade,trainedGrade:s.trainedGrade})]})}),e.jsx("td",{children:re(s.baseGrade)}),e.jsx("td",{children:re(s.trainedGrade)}),e.jsx("td",{children:Be(s.baseGrade,s.trainedGrade)})]},s.taskId))})]})})]}):e.jsx("div",{className:"training-run-placeholder",children:"No scored evaluation results are available for this run."})}function Fe({input:a,baseOutput:t,trainedOutput:n,baseGrade:s,trainedGrade:i}){const l=[...new Set([...s?.feedback??[],...i?.feedback??[]])];return e.jsxs("div",{className:"training-evaluation-output",children:[e.jsxs("div",{children:[e.jsx("span",{children:"Input"}),e.jsx("pre",{children:JSON.stringify(a,null,2)})]}),t?e.jsxs("div",{children:[e.jsx("span",{children:"Base output"}),e.jsx("pre",{children:JSON.stringify(t,null,2)})]}):null,n?e.jsxs("div",{children:[e.jsx("span",{children:"Trained output"}),e.jsx("pre",{children:JSON.stringify(n,null,2)})]}):null,l.length?e.jsxs("div",{children:[e.jsx("span",{children:"Grader feedback"}),e.jsx("p",{children:l.join(" ")})]}):null]})}function J({label:a,value:t}){return e.jsxs("div",{children:[e.jsx("span",{children:a}),e.jsx("strong",{children:t})]})}function se(a){return a==null?"Not recorded":a.toFixed(3)}function Ee(a){return a==null?"Not recorded":`${Math.round(a*100)}%`}function Ie(a){return a==null?"Not comparable":`${a>=0?"+":""}${a.toFixed(3)}`}function re(a){return a?.status==="unavailable"?"Unavailable":a?.score==null?"Not scored":a.score.toFixed(3)}function Be(a,t){if(!t)return"Not evaluated";if(t.status==="unavailable")return"Unavailable";if(!a||a.score==null||t.score==null)return t.passed?"Passed":"Failed";const n=t.score-a.score;return Math.abs(n)<5e-4?"No change":n>0?`Improved ${n.toFixed(3)}`:`Regressed ${Math.abs(n).toFixed(3)}`}const ie=[{key:"loss",label:"Loss",format:j},{key:"reward",label:"Reward",format:j},{key:"policyLoss",label:"Policy loss",format:j},{key:"advantageLoss",label:"Advantage loss",format:j},{key:"learningRate",label:"Learning rate",format:H},{key:"gradientNorm",label:"Gradient norm",format:j},{key:"meanTokenAccuracy",label:"Token accuracy",format:K},{key:"preferenceAccuracy",label:"Preference accuracy",format:K},{key:"preferenceMargin",label:"Preference margin",format:j},{key:"chosenReward",label:"Chosen reward",format:j},{key:"rejectedReward",label:"Rejected reward",format:j},{key:"chosenLogProbability",label:"Chosen log probability",format:j},{key:"rejectedLogProbability",label:"Rejected log probability",format:j},{key:"entropy",label:"Entropy",format:j},{key:"memoryBytes",label:"Memory",format:he}],oe=[{key:"meanReward",label:"Reward",format:j},{key:"meanReturn",label:"Return",format:j},{key:"learningRate",label:"Learning rate",format:H},{key:"policyLoss",label:"Policy loss",format:j},{key:"valueLoss",label:"Value loss",format:j},{key:"kl",label:"KL",format:j},{key:"entropy",label:"Entropy",format:j},{key:"policyClipFraction",label:"Policy clip fraction",format:K},{key:"valueClipFraction",label:"Value clip fraction",format:K},{key:"explainedVariance",label:"Explained variance",format:j}];function Ue({detail:a,loading:t,error:n}){je(n,{prefix:"Training metrics"});const s=y.useMemo(()=>_e(a?.stepMetrics??[]),[a?.stepMetrics]),i=y.useMemo(()=>ie.filter(r=>s.some(v=>v[r.key]!=null)),[s]),[l,o]=y.useState("loss"),c=i.find(r=>r.key===l)??i[0]??ie[0],f=s.flatMap(r=>r[c.key]==null?[]:[{step:r.step,value:r[c.key]}]),p=y.useMemo(()=>qe(a?.policyMetrics??[]),[a?.policyMetrics]),x=y.useMemo(()=>oe.filter(r=>p.some(v=>v[r.key]!=null)),[p]),[u,h]=y.useState("meanReward"),g=x.find(r=>r.key===u)??x[0]??oe[0],S=p.flatMap(r=>r[g.key]==null?[]:[{step:r.step,value:r[g.key]}]),P=p.flatMap(r=>r.meanReward==null?[]:[{step:r.step,value:r.meanReward}]),T=p.flatMap(r=>r.learningRate==null?[]:[{step:r.step,value:r.learningRate}]),k=y.useMemo(()=>Ve(a?.events??[]),[a?.events]),m=a?Oe(a):{};if(t&&!a)return e.jsx("div",{className:"training-run-placeholder",children:"Loading training metrics…"});if(n&&!a)return e.jsx("div",{className:"training-run-placeholder",children:"Training metrics are unavailable."});if(!a)return e.jsx("div",{className:"training-run-placeholder",children:"Select a training run to inspect its metrics."});if(p.length){if(p.some(v=>v.method==="grpo")||a.job.metadata.trainingMethod==="grpo")return e.jsx(ce,{learningRatePoints:T,rewardPoints:P,rolloutPoints:k});const r=p.at(-1);return e.jsxs("div",{className:"training-run-metrics",children:[e.jsxs("div",{className:"training-metric-summary",children:[e.jsx(L,{label:"Optimizer steps",value:r.step}),e.jsx(L,{label:"Latest reward",value:r.meanReward==null?null:j(r.meanReward)}),e.jsx(L,{label:"Policy loss",value:r.policyLoss==null?null:j(r.policyLoss)}),e.jsx(L,{label:"Rollouts",value:k.length||null}),e.jsx(L,{label:"Learning rate",value:r.learningRate==null?null:H(r.learningRate)}),e.jsx(L,{label:"Environment executions",value:r.environmentExecutions})]}),x.length?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"training-metric-tabs",role:"tablist","aria-label":"Policy metrics",children:x.map(v=>e.jsx("button",{className:v.key===g.key?"active":"",role:"tab",type:"button","aria-selected":v.key===g.key,onClick:()=>h(v.key),children:v.label},v.key))}),e.jsxs("div",{className:"training-metric-chart-grid",children:[k.length?e.jsx(z,{axisLabel:"Rollout",format:j,label:"Rollout reward",points:k}):null,e.jsx(z,{format:g.format,label:g.label,points:S})]})]}):null]})}const b=a.job.metadata.trainingMethod==="grpo",I=s.flatMap(r=>r.loss==null?[]:[r.loss]),A=s.flatMap(r=>r.learningRate==null?[]:[{step:r.step,value:r.learningRate}]),B=s.flatMap(r=>r.reward==null?[]:[{step:r.step,value:r.reward}]);if(b){const r=a.job.metadata.optimizerUpdatesObserved,v=typeof r=="number"&&Number.isFinite(r)?Math.max(0,r):null;return e.jsx(ce,{learningRatePoints:v==null?A:A.filter(F=>F.step<=v),rewardPoints:v==null?B:B.filter(F=>F.step<=v),rolloutPoints:k})}return e.jsxs("div",{className:"training-run-metrics",children:[e.jsxs("div",{className:"training-metric-summary",children:[e.jsx(L,{label:"Steps",value:m.steps??De(s)}),e.jsx(L,{label:"Final loss",value:m.trainLoss==null?I.at(-1)==null?null:j(I.at(-1)):j(m.trainLoss)}),e.jsx(L,{label:"Peak memory",value:Ge(a.stepMetrics)}),e.jsx(L,{label:"Adapter parameters",value:m.adapterParameterCount==null?null:m.adapterParameterCount.toLocaleString()})]}),i.length?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"training-metric-tabs",role:"tablist","aria-label":"Training metrics",children:i.map(r=>e.jsx("button",{type:"button",role:"tab","aria-selected":r.key===c.key,className:r.key===c.key?"active":"",onClick:()=>o(r.key),children:r.label},r.key))}),e.jsxs("div",{className:"training-metric-chart-grid",children:[e.jsx(z,{label:c.label,points:f,format:c.format}),c.key!=="learningRate"&&A.length?e.jsx(z,{label:"Learning rate",points:A,format:H}):null]})]}):e.jsx("div",{className:"training-run-placeholder",children:"This earlier run recorded its final result but not per-step Trainer logs."})]})}function ce({rewardPoints:a,rolloutPoints:t,learningRatePoints:n}){return e.jsx("div",{className:"training-run-metrics",children:e.jsxs("div",{className:"training-metric-chart-grid three",children:[e.jsx(z,{format:j,label:"Reward",points:a}),e.jsx(z,{axisLabel:"Rollout",format:j,label:"Rollout reward",points:t}),e.jsx(z,{format:H,label:"Learning rate",points:n})]})})}function z({label:a,points:t,format:n,axisLabel:s="Optimizer step"}){return e.jsxs("section",{className:"training-metric-chart-card",children:[e.jsxs("header",{children:[e.jsx("h4",{children:a}),e.jsxs("span",{children:[t.length," ",t.length===1?"point":"points"]})]}),t.length?e.jsx(ze,{axisLabel:s,format:n,label:a,points:t}):e.jsx("div",{className:"training-metric-chart-empty",children:"Not recorded"})]})}function ze({label:a,points:t,format:n,axisLabel:s}){const o={top:20,right:20,bottom:58,left:64},c=t.map(r=>r.value),f=Math.min(...c),p=Math.max(...c),x=p-f||Math.max(Math.abs(p)*.1,1e-9),u=f-x*.08,h=p+x*.08,g=t[0]?.step??0,S=t.at(-1)?.step??g+1,P=Math.max(1,S-g),T=760-o.right,k=r=>t.length===1?(o.left+T)/2:o.left+(r-g)/P*(760-o.left-o.right),m=r=>o.top+(h-r)/(h-u)*(270-o.top-o.bottom),b=t.map((r,v)=>`${v?"L":"M"}${k(r.step).toFixed(2)},${m(r.value).toFixed(2)}`).join(" "),I=270-o.bottom,A=t.length>1?`${b} L${k(S).toFixed(2)},${I} L${k(g).toFixed(2)},${I} Z`:"",B=s!=="Optimizer step"?s:a==="Learning rate"?"Update":"Step";return e.jsx("figure",{className:"training-line-chart","aria-label":`${a} by ${s.toLowerCase()}`,children:e.jsxs("svg",{viewBox:"0 0 760 270",role:"img","aria-labelledby":`metric-${a.replaceAll(" ","-")}`,children:[e.jsx("title",{id:`metric-${a.replaceAll(" ","-")}`,children:`${a} by ${s.toLowerCase()}`}),[0,.25,.5,.75,1].map(r=>{const v=o.top+r*(270-o.top-o.bottom),F=h-r*(h-u);return e.jsxs("g",{children:[e.jsx("line",{className:"training-chart-grid",x1:o.left,x2:760-o.right,y1:v,y2:v}),e.jsx("text",{className:"training-chart-label",x:o.left-10,y:v+4,textAnchor:"end",children:n(F)})]},r)}),e.jsx("line",{className:"training-chart-axis",x1:o.left,x2:760-o.right,y1:270-o.bottom,y2:270-o.bottom}),e.jsx("path",{className:"training-chart-area",d:A}),e.jsx("path",{className:"training-chart-line",d:b}),t.map(r=>e.jsx("circle",{className:"training-chart-point",cx:k(r.step),cy:m(r.value),r:t.length===1?"4.5":"3",children:e.jsx("title",{children:`${B} ${r.step}: ${n(r.value)}`})},`${r.step}-${r.value}`)),e.jsx("text",{className:"training-chart-label",x:k(g),y:236,textAnchor:"middle",children:g}),t.length>1?e.jsx("text",{className:"training-chart-label",x:T,y:236,textAnchor:"middle",children:S}):null,e.jsx("text",{className:"training-chart-label axis-title",x:(o.left+760-o.right)/2,y:261,textAnchor:"middle",children:s})]})})}function Ve(a){return a.flatMap(t=>{if(t.type!=="metric"||t.payload.metricKind!=="rollout_trajectory")return[];const n=de(t.payload.rolloutIndex),s=de(t.payload.reward);return n==null||s==null?[]:[{step:n,value:s}]})}function de(a){return typeof a=="number"&&Number.isFinite(a)?a:null}function L({label:a,value:t}){return e.jsxs("div",{children:[e.jsx("span",{children:a}),e.jsx("strong",{children:t??"Not recorded"})]})}function Oe(a){const t=[...a.events].reverse().find(n=>n.type==="metric"&&n.payload.metricKind!=="sft_step"&&(typeof n.payload.trainLoss=="number"||typeof n.payload.steps=="number"));return Object.fromEntries(Object.entries(t?.payload??{}).filter(n=>typeof n[1]=="number"))}function De(a){const t=a.at(-1);return t?`${t.step} of ${t.maxSteps}`:null}function _e(a){const t=new Map;for(const n of a)t.set(n.step,n);return[...t.values()].sort((n,s)=>n.step-s.step)}function qe(a){const t=new Map;for(const n of a)t.set(n.step,n);return[...t.values()].sort((n,s)=>n.step-s.step)}function Ge(a){const t=a.flatMap(n=>n.memoryBytes==null?[]:[n.memoryBytes]);return t.length?he(Math.max(...t)):null}function j(a){return new Intl.NumberFormat(void 0,{maximumFractionDigits:4}).format(a)}function H(a){return a===0?"0":a.toExponential(2)}function K(a){return`${(a*100).toFixed(1)}%`}function he(a){return`${(a/1024**3).toFixed(2)} GB`}const He=new Set(["queued","starting","running","cancelling","reconciling"]);function Je(a,t,n){const[s,i]=y.useState(null),[l,o]=y.useState(!1),[c,f]=y.useState(null),p=y.useCallback(async()=>{if(!a||!t)return null;o(!0);try{const x=await fe.trainingRunDetail(a,t);return i(x),f(null),x}catch(x){return f(x instanceof Error?x.message:String(x)),null}finally{o(!1)}},[a,t]);return y.useEffect(()=>{i(null),f(null),!(!a||!t)&&p()},[a,t,p]),y.useEffect(()=>{if(!a||!t||!n||!He.has(n))return;const x=window.setInterval(()=>{p()},2e3);return()=>window.clearInterval(x)},[a,t,n,p]),{detail:s,error:c,loading:l,refresh:p}}function We({title:a,status:t,statusValue:n,versionStatus:s,method:i,baseModel:l,taskset:o,compute:c,duration:f,output:p,reward:x,telemetry:u,evidence:h,configuration:g,children:S,failure:P,onOpenTaskset:T}){const k=u?.cost.providerReportedUsd??u?.cost.estimatedUsd??h?.cost.totalUsd??null;return e.jsxs("div",{className:"labs-model-run-summary",children:[e.jsx("section",{className:"labs-run-outcome-card",children:e.jsx("header",{children:e.jsxs("div",{children:[e.jsxs("div",{className:"labs-run-title-row",children:[e.jsx("h2",{children:a}),e.jsx(X,{label:t,value:n})]}),e.jsxs("p",{children:[Ye(i)," on ",l]})]})})}),S,e.jsxs("section",{className:"labs-run-summary-card",children:[e.jsx("header",{children:e.jsx("h3",{children:"Run setup"})}),e.jsxs("dl",{className:"labs-run-detail-list",children:[e.jsx(M,{label:"Training method",value:i}),e.jsx(M,{label:"Base model",value:l}),e.jsx(M,{label:"Compute",value:c}),e.jsx(M,{label:"Output",value:p}),s?e.jsx(M,{label:"Version status",value:s}):null,e.jsx(M,{label:"Duration",value:f}),e.jsx(M,{label:"Run cost",value:k===null?"Not reported":`$${k.toFixed(4)}`}),e.jsx(M,{label:"Final reward",value:x===null?"Not reported":x.toFixed(4)}),g.map(m=>e.jsx(M,{label:m.label,value:m.value},m.label)),u||h?e.jsxs(e.Fragment,{children:[e.jsx(D,{label:"GPU",value:Ke(u,h)}),e.jsx(D,{label:"Tokens",value:`${_(u?.usage.promptTokens??h?.usage.inputTokens??null)} prompt · ${_(u?.usage.generatedTokens??h?.usage.outputTokens??null)} generated`}),e.jsx(D,{label:"Trajectories",value:`${_(u?.usage.successfulTrajectories??h?.reward.eligibleTrajectoryCount??null)} succeeded · ${_(u?.usage.failedTrajectories??(h?h.reward.trajectoryCount-h.reward.eligibleTrajectoryCount:null))} failed`}),e.jsx(D,{label:"Optimizer updates",value:_(u?.usage.optimizerSteps??h?.progress.committedOptimizerSteps??null)}),e.jsx(D,{label:"GPU time",value:u?.usage.gpuSeconds==null?"Not reported":`${u.usage.gpuSeconds.toFixed(1)} seconds`})]}):e.jsx(M,{label:"Resource usage",value:"Not retained for this run"}),e.jsxs("div",{children:[e.jsx("dt",{children:"Taskset"}),e.jsx("dd",{children:T?e.jsxs("button",{className:"labs-run-taskset-link",type:"button",onClick:T,children:[e.jsx("span",{children:o}),e.jsx(ve,{"aria-hidden":"true",size:14})]}):o})]})]})]}),P?e.jsx("p",{className:"labs-training-error",children:P}):null]})}function M({label:a,value:t}){return e.jsxs("div",{children:[e.jsx("dt",{children:a}),e.jsx("dd",{children:t})]})}function D({label:a,value:t}){return e.jsx(M,{label:a,value:t})}function Ke(a,t){const n=a?.resource.gpuCount??t?.resource.gpuCount??null,s=a?.resource.gpuType??t?.resource.gpuType??null;return n===null&&s===null?"Not reported":`${n??"Unknown"} × ${s?Ze(s):"Unreported"}`}function _(a){return a===null?"Not reported":a.toLocaleString()}function Ye(a){return a==="RFT"?"Reinforcement fine-tuning":`${a} training`}function Ze(a){return a.split(" · ").map(t=>t.replaceAll("_"," ").replace(/\b[a-z]/g,n=>n.toUpperCase())).join(" · ")}function Qe({receipt:a,onOpenConversation:t}){return e.jsxs(e.Fragment,{children:[e.jsxs("section",{className:"labs-run-summary-card",children:[e.jsx("header",{children:e.jsx("h3",{children:"Inconclusive benchmark"})}),e.jsx("p",{className:"training-run-placeholder",children:a.reason}),e.jsxs("dl",{className:"labs-run-detail-list",children:[e.jsx(N,{label:"Held-out baseline tokens",value:a.usage.baseline.totalTokens.toLocaleString()}),e.jsx(N,{label:"Adaptation baseline tokens",value:a.usage.adaptation.totalTokens.toLocaleString()}),e.jsx(N,{label:"Refiner tokens",value:a.usage.refiner.totalTokens.toLocaleString()}),e.jsx(N,{label:"Grader tokens",value:a.usage.grader.totalTokens.toLocaleString()}),e.jsx(N,{label:"Observed / maximum spend",value:`$${a.budget.observedSpendUsd.toFixed(4)} / $${a.budget.maximumSpendUsd.toFixed(2)}`}),e.jsx(N,{label:"Harness candidate",value:a.stopReason==="candidate_harness_unchanged"?"Unchanged":"Lineage invalid"}),e.jsx(N,{label:"Completed attempts",value:a.attempts.length.toLocaleString()}),e.jsx(N,{label:"Candidate attempts",value:"Skipped"})]})]}),a.attempts.length?e.jsx(xe,{receipt:a,onOpenConversation:t}):null]})}function Xe({run:a}){const t=["baseline","adaptation","refiner","candidate_adaptation","candidate","comparison"],n={baseline:"Baseline",adaptation:"Adaptation",refiner:"Refiner",candidate_adaptation:"Sequential adaptation",candidate:"Candidate",comparison:"Comparison"},s=Math.max(0,t.indexOf(a.evaluationProgress?.stage??"baseline")),i=a.evaluationProgress?.completedAttempts??0,l=a.evaluationProgress?.totalAttempts??1;return e.jsxs("div",{className:"labs-benchmark-progress",children:[e.jsxs("header",{children:[e.jsx("h3",{children:"Benchmark progress"}),e.jsxs("strong",{children:[i," of ",l," attempts"]})]}),e.jsx("div",{className:"labs-benchmark-progress-track","aria-hidden":"true",children:e.jsx("span",{style:{width:`${Math.min(100,i/l*100)}%`}})}),e.jsx("ol",{children:t.map((o,c)=>e.jsxs("li",{className:c<s?"complete":c===s?"active":void 0,children:[e.jsx("span",{}),n[o]]},o))})]})}function ea({receipt:a}){const t=ee(a),n=t.pairs.filter(l=>l.cohort==="held_out"),s=t.pairs.filter(l=>l.cohort==="adaptation"),i=l=>l.length?l.reduce((o,c)=>o+c,0)/l.length:0;return e.jsxs("div",{className:"labs-benchmark-attempt-charts",children:[e.jsx(W,{title:"Held-out tokens by task",baseline:n.map(l=>l.baseline.totalTokens),candidate:n.map(l=>l.refined.totalTokens),format:l=>Math.round(l).toLocaleString()}),e.jsx(W,{title:"Adaptation tokens by task",baseline:s.map(l=>l.baseline.totalTokens),candidate:s.map(l=>l.refined.totalTokens),format:l=>Math.round(l).toLocaleString()}),e.jsx(W,{title:"Held-out quality by task",baseline:n.map(l=>l.baseline.score),candidate:n.map(l=>l.refined.score),format:l=>l.toFixed(2),summarize:i}),e.jsx(W,{title:"Adaptation quality by task",baseline:s.map(l=>l.baseline.score),candidate:s.map(l=>l.refined.score),format:l=>l.toFixed(2),summarize:i})]})}function aa({receipt:a,run:t,tasksetName:n,onOpenTaskset:s}){const i=ee(a),l=i.comparedTaskCount>0,o=i.passed,c=i.tokenDeltaPercent===null?"—":`${i.tokenDeltaPercent>0?"+":""}${i.tokenDeltaPercent.toFixed(2)}%`,f=p=>{const x=i.cohorts[p];return`${x.passedTaskCount}/${x.comparedTaskCount} passed`};return e.jsxs("section",{className:"labs-run-summary-card",children:[e.jsx("header",{children:e.jsx("h3",{children:"Token efficiency"})}),l?e.jsxs("div",{className:"labs-benchmark-efficiency-summary",children:[e.jsxs("strong",{children:[i.passedTaskCount," of ",i.comparedTaskCount," tasks passed"]}),e.jsxs("p",{children:["A task passes only when its refined token count is strictly lower than its own baseline. ",i.failedTaskCount," failed this token-efficiency test; aggregate usage changed by ",c,"."]})]}):e.jsx("p",{className:"training-run-placeholder",children:"Paired task-level token evidence is unavailable for this run."}),e.jsxs("dl",{className:"labs-run-detail-list",children:[e.jsx(N,{label:"Execution",value:G(t.status)}),e.jsx(N,{label:"Token-efficiency result",value:o?"Passed":"Failed"}),e.jsx(N,{label:"Efficiency passes",value:`${i.passedTaskCount}/${i.comparedTaskCount}`}),e.jsx(N,{label:"Efficiency failures",value:`${i.failedTaskCount}/${i.comparedTaskCount}`}),e.jsx(N,{label:"All-task foreground tokens",value:`${i.baselineTokens.toLocaleString()} → ${i.refinedTokens.toLocaleString()}`}),e.jsx(N,{label:"Aggregate token change",value:c}),e.jsx(N,{label:"Adaptation replay",value:f("adaptation")}),e.jsx(N,{label:"Held-out replay",value:f("held_out")}),e.jsx(N,{label:"Task quality",value:`${i.baselinePassedCount}/${i.comparedTaskCount} → ${i.refinedPassedCount}/${i.comparedTaskCount}`}),e.jsx(N,{label:"Result lineage",value:a.lineage.valid?"Valid":"Invalid"}),e.jsxs("div",{children:[e.jsx("dt",{children:"Taskset"}),e.jsx("dd",{children:s?e.jsx("button",{className:"labs-run-taskset-link",type:"button",onClick:s,children:n}):n})]})]})]})}function W({title:a,baseline:t,candidate:n,format:s,summarize:i=l=>l.reduce((o,c)=>o+c,0)}){const l=t.filter(u=>u!==null),o=n.filter(u=>u!==null),c=Math.max(1,...l,...o),f=Math.max(2,t.length,n.length),p=u=>{const h=[];let g=[];return u.forEach((S,P)=>{if(S===null){g.length&&h.push(g.join(" ")),g=[];return}const T=6+P/(f-1)*88,k=44-S/c*36;g.push(`${T},${k}`)}),g.length&&h.push(g.join(" ")),h},x=u=>u.flatMap((h,g)=>h===null?[]:[{x:6+g/(f-1)*88,y:44-h/c*36}]);return e.jsxs("section",{className:"labs-benchmark-line-chart",children:[e.jsxs("header",{children:[e.jsx("h4",{children:a}),e.jsxs("div",{children:[e.jsxs("span",{children:["Baseline ",s(i(l))]}),e.jsxs("span",{children:["Refined ",s(i(o))]})]})]}),e.jsxs("svg",{"aria-label":a,role:"img",viewBox:"0 0 100 50",preserveAspectRatio:"none",children:[e.jsx("line",{x1:"6",x2:"94",y1:"44",y2:"44"}),p(t).map((u,h)=>e.jsx("polyline",{className:"baseline",points:u},`baseline-${h}`)),p(n).map((u,h)=>e.jsx("polyline",{className:"candidate",points:u},`candidate-${h}`)),x(t).map((u,h)=>e.jsx("circle",{className:"baseline",cx:u.x,cy:u.y,r:"1"},`baseline-point-${h}`)),x(n).map((u,h)=>e.jsx("circle",{className:"candidate",cx:u.x,cy:u.y,r:"1"},`candidate-point-${h}`))]})]})}function xe({receipt:a,onOpenConversation:t}){const n=a.schemaVersion==="openpond.modelEvaluationReceipt.v1"?ke(a.attempts??[]):a.attempts??[];return e.jsxs("section",{className:"labs-run-summary-card",children:[e.jsx("header",{children:e.jsx("h3",{children:a.schemaVersion==="openpond.modelEvaluationReceipt.v1"?"Selected task results":"Completed attempts"})}),e.jsx("div",{className:"training-table-wrap",children:e.jsxs("table",{className:"training-data-table labs-benchmark-attempt-table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Task"}),e.jsx("th",{children:"Phase"}),e.jsx("th",{children:"Result"}),e.jsx("th",{children:"Score"}),e.jsx("th",{children:"Tokens"}),e.jsx("th",{children:"Work chat"})]})}),e.jsx("tbody",{children:n.map(s=>e.jsxs("tr",{children:[e.jsx("td",{children:ta(s.taskId)}),e.jsx("td",{children:s.phase}),e.jsx("td",{children:e.jsx(X,{label:s.passed?"Passed":"Failed",value:s.passed?"succeeded":"failed"})}),e.jsx("td",{children:s.score===null?"—":s.score.toFixed(2)}),e.jsx("td",{children:s.totalTokens.toLocaleString()}),e.jsx("td",{children:s.sessionId?e.jsx("button",{className:"labs-run-taskset-link",type:"button",onClick:()=>t(s.sessionId),children:"Open chat"}):"Not retained"})]},`${s.phase}:${s.attemptId}`))})]})})]})}function ta(a){return a.replace(/^(?:adaptation|frozen)-/,"").replaceAll("-"," ").replace(/^./,t=>t.toUpperCase())}function N({label:a,value:t}){return e.jsxs("div",{children:[e.jsx("dt",{children:a}),e.jsx("dd",{children:t})]})}function Ca({connection:a,selectedEntryKey:t,workproduct:n,runs:s,training:i,onOpenDataset:l,onOpenConversation:o}){const[c,f]=y.useState("artifacts"),p=i.payload,x=y.useMemo(()=>Ne(n,s,p),[s,p,n]),u=y.useMemo(()=>Te(n,s,p),[s,p,n]),h=y.useMemo(()=>Re(n,p),[p,n]),g=y.useMemo(()=>$e(n,s,p),[s,p,n]),S=y.useMemo(()=>new Map(g.map(d=>[d.id,d])),[g]),T=y.useMemo(()=>Se(x,u),[x,u]).find(d=>d.key===t)??null,k=t.startsWith("model-run:")?t.slice(10):null,m=k?h.find(d=>d.id===k)??null:T?.job?h.find(d=>d.id===T.job?.metadata.modelRunId)??null:null,b=T?.job??(m?p?.jobs.find(d=>d.id===m.id||d.metadata.modelRunId===m.id)??null:null),I=y.useMemo(()=>we(x,u,h),[x,h,u]),A=I.findIndex(d=>d.key===t||b!==null&&d.job?.id===b.id||m!==null&&d.lifecycleRun?.id===m.id),B=A<0?null:I.length-A,r=T?.version??(m?.adapterArtifactLineageId?u.find(d=>d.lineage.id===m.adapterArtifactLineageId)??null:null),v=(m?p?.modelVersions.find(d=>d.id===m.modelVersionId)?.baseModel.modelId:null)??p?.modelVersions.filter(d=>d.modelId===n.id&&d.kind==="base_reference").sort((d,ge)=>ge.version-d.version)[0]?.baseModel.modelId??null,F=r?.lineage.frozenEvaluationArtifactId??null,ae=r?.lineage.managedServing??null,V=r?.plan??(b?S.get(b.planId)??null:null),U=r?.taskset??Me(p).find(d=>d.id===(m?.taskset.id??V?.tasksetId))??null,$=Je(a,b?.id??null,b?.status??null),te=b?p?.rolloutReceipts.filter(d=>d.jobId===b.id)??[]:[],w=$.detail?.managedEvidence??null,Y=[{id:"artifacts",label:"Artifacts"},...$.loading||$.detail?.evaluation||F||w?.evaluations.length?[{id:"evaluation",label:"Evaluation"}]:[],...te.length?[{id:"rollouts",label:"Rollouts"}]:[],...ae?[{id:"serving",label:"Serving"}]:[],...b?[{id:"activity",label:"Activity"}]:[]],E=Y.some(d=>d.id===c)?c:Y[0].id;return!T&&!m?e.jsx("div",{className:"labs-model-version-detail",children:e.jsx("div",{className:"training-run-placeholder",children:"This training attempt is no longer available."})}):m?.kind==="evaluation"?e.jsx(na,{run:m,runNumber:B,tasksetName:U?.name??"Unavailable",onOpenTaskset:U?()=>l(U.id):void 0,onOpenConversation:o}):e.jsxs("div",{className:"labs-model-version-detail",children:[e.jsx(We,{baseModel:la(V,v),compute:m?Z(m.destinationId??""):V?Z(V.destinationId):b?Z(b.destinationId):"Not recorded",duration:m?ne(m.startedAt,m.completedAt):b?ne(b.startedAt,b.completedAt):"Not recorded",failure:b?.error??m?.failure??null,configuration:sa(V),evidence:w,method:ye(m?.method??V?.recipe.method),output:r?`Version ${r.number}`:"No version created",reward:m?.reward?.raw??w?.reward.finalMean??null,status:m?G(m.status):b?G(b.status):"Imported",statusValue:m?.status??b?.status??"imported",taskset:U?.name??"Unavailable",telemetry:m?.receipt?.schemaVersion==="openpond.modelRunReceipt.v1"?m.receipt.telemetry:null,title:m||b?B?`Run ${B}`:"Run details":r?`Version ${r.number}`:"Run details",versionStatus:r?r.current?"Active":"Available":null,onOpenTaskset:U?()=>l(U.id):void 0,children:b?e.jsx(Ue,{detail:$.detail,error:$.error,loading:$.loading}):null}),e.jsxs("section",{className:"labs-run-detail-tabs",children:[e.jsx("div",{className:"training-detail-tabs",role:"tablist","aria-label":"Run details",children:Y.map(d=>e.jsx("button",{"aria-controls":`run-detail-panel-${d.id}`,"aria-selected":E===d.id,className:E===d.id?"active":void 0,id:`run-detail-tab-${d.id}`,role:"tab",type:"button",onClick:()=>f(d.id),children:d.label},d.id))}),e.jsxs("div",{"aria-labelledby":`run-detail-tab-${E}`,className:"labs-run-detail-tab-panel",id:`run-detail-panel-${E}`,role:"tabpanel",children:[E==="artifacts"?e.jsxs("dl",{className:"training-configuration-list",children:[e.jsx(R,{label:"Training attempt",value:b?.id??"Provider import"}),e.jsx(R,{label:"Taskset",value:U?.name??"Unavailable"}),e.jsx(R,{label:"Prepared data",value:b?.bundleHash??"Provider managed"}),e.jsx(R,{label:"Version ID",value:r?.lineage.id??"No version created"}),w?.checkpoint?e.jsxs(e.Fragment,{children:[e.jsx(R,{label:"Checkpoint",value:w.checkpoint.id}),e.jsx(R,{label:"Checkpoint size",value:w.checkpoint.sizeBytes==null?"Not reported":be(w.checkpoint.sizeBytes)}),e.jsx(R,{label:"Checkpoint hash",value:w.checkpoint.sha256??"Not reported"})]}):null,w?.canonicalPublication.state?e.jsx(R,{label:"Registry publication",value:Q(w.canonicalPublication.state)}):null]}):null,E==="evaluation"?e.jsxs("div",{className:"training-run-evaluation",children:[$.loading||$.detail?.evaluation?e.jsx(Ae,{detail:$.detail,loading:$.loading}):null,!$.detail?.evaluation&&w?.evaluations.length?e.jsx("dl",{className:"labs-inline-facts",children:w.evaluations.map(d=>e.jsx(R,{label:d.kind==="baseline"?"Baseline score":"Candidate score",value:d.score==null?"Not reported":d.score.toFixed(6)},`${d.kind}:${d.policyVersion}`))}):null,F?e.jsx("button",{className:"training-button secondary",type:"button",onClick:()=>{i.actions.downloadArtifact(F)},children:"Download evaluation receipt"}):null]}):null,E==="rollouts"?e.jsx(Le,{receipts:te}):null,E==="serving"?e.jsx(ra,{projection:ae}):null,E==="activity"&&b?e.jsx(ia,{error:b.error??$.error,events:$.detail?.events??[],loading:$.loading}):null]})]})]})}function na({run:a,runNumber:t,tasksetName:n,onOpenTaskset:s,onOpenConversation:i}){const l=a.receipt?.schemaVersion==="openpond.modelEvaluationReceipt.v1"?a.receipt:null,o=a.receipt?.schemaVersion==="openpond.modelEvaluationStopReceipt.v1"?a.receipt:null,c=l?Ce(l):null,f=l?ee(l):null;return e.jsxs("div",{className:"labs-model-version-detail labs-model-evaluation-detail",children:[e.jsx("section",{className:"labs-run-outcome-card",children:e.jsx("header",{children:e.jsxs("div",{children:[e.jsxs("div",{className:"labs-run-title-row",children:[e.jsx("h2",{children:t?`Run ${t}`:"Evaluation run"}),e.jsx(X,{label:l?f?.comparedTaskCount?`${f.passedTaskCount}/${f.comparedTaskCount} passed`:"No paired result":o?"Inconclusive":G(a.status),value:l?f?.comparedTaskCount&&f.passed?"succeeded":"neutral":o?.terminalClassification??a.status})]}),e.jsxs("p",{children:["Harness Refiner benchmark · ",n,l||o?` · execution ${G(a.status).toLowerCase()}`:""]})]})})}),l?e.jsxs(e.Fragment,{children:[e.jsx(le,{series:[{id:"baseline",label:"Held-out baseline",inputTokens:c.baseline.inputTokens,outputTokens:c.baseline.outputTokens,tokens:c.baseline.totalTokens,passRate:l.quality.baselinePassRate,costUsd:c.baseline.costUsd},{id:"candidate",label:"Held-out refined",inputTokens:c.candidate.inputTokens,outputTokens:c.candidate.outputTokens,tokens:c.candidate.totalTokens,passRate:l.quality.candidatePassRate,costUsd:c.candidate.costUsd}]}),e.jsx(le,{series:[{id:"adaptation-baseline",label:"Adaptation baseline",inputTokens:c.adaptation.inputTokens,outputTokens:c.adaptation.outputTokens,tokens:c.adaptation.totalTokens,passRate:l.quality.adaptationBaselinePassRate,costUsd:c.adaptation.costUsd},{id:"adaptation-candidate",label:"Adaptation replay",inputTokens:c.candidate_adaptation.inputTokens,outputTokens:c.candidate_adaptation.outputTokens,tokens:c.candidate_adaptation.totalTokens,passRate:l.quality.adaptationCandidatePassRate,costUsd:c.candidate_adaptation.costUsd}]}),(l.attempts??[]).length?e.jsx(ea,{receipt:l}):null,e.jsx(aa,{receipt:l,run:a,tasksetName:n,onOpenTaskset:s}),(l.attempts??[]).length?e.jsx(xe,{receipt:l,onOpenConversation:i}):null]}):o?e.jsx(Qe,{receipt:o,onOpenConversation:i}):e.jsx("section",{className:"labs-run-summary-card",children:a.failure?e.jsx("p",{className:"training-run-placeholder",children:a.failure}):e.jsx(Xe,{run:a})})]})}function la(a,t=null){if(!a)return t?ue(t):"Not recorded";const n=a.recipe.method==="sft"||a.recipe.method==="grpo"?a.recipe.baseModel:a.recipe.method==="dpo"?a.recipe.policyModel:a.recipe.method==="ppo"?a.recipe.policyOptimization.policyModel:null;return n?ue(n.id):"Not recorded"}function ue(a){return a.split("/").at(-1)??a}function sa(a){if(!a)return[];const t=a.recipe;return t.method==="grpo"?[{label:"LoRA rank",value:String(t.lora.rank)},{label:"Learning rate",value:me(t.optimizer.learningRate)},{label:"Optimizer steps",value:String(t.optimizer.maxSteps)},{label:"Rollouts per update",value:String(t.rollout.groupSize)},{label:"Rollout concurrency",value:String(t.rollout.concurrency)},{label:"Max output tokens",value:t.rollout.maxOutputTokens.toLocaleString()},{label:"Temperature",value:String(t.rollout.temperature)},{label:"Top P",value:String(t.rollout.topP)}]:t.method==="sft"||t.method==="dpo"?[{label:"LoRA rank",value:String(t.lora.rank)},{label:"Learning rate",value:me(t.optimizer.learningRate)},{label:"Optimizer steps",value:String(t.optimizer.maxSteps)}]:[]}function me(a){return a===0?"0":a.toExponential(2)}function be(a){const t=["B","KB","MB","GB","TB"];let n=a,s=0;for(;n>=1024&&s<t.length-1;)n/=1024,s+=1;return`${n.toFixed(s===0?0:2)} ${t[s]}`}function R({label:a,value:t}){return e.jsxs("div",{children:[e.jsx("dt",{children:a}),e.jsx("dd",{children:t})]})}function ra({projection:a}){return a?e.jsxs("dl",{className:"labs-inline-facts",children:[e.jsx(R,{label:"Admission",value:a.customerBindingAllowed?"Allowed":"Pending"}),e.jsx(R,{label:"Artifact",value:Q(a.canonicalArtifactState)}),e.jsx(R,{label:"Deployment",value:Q(a.canonicalDeploymentState)}),e.jsx(R,{label:"Base profile",value:a.baseProfileId??"Pending"}),e.jsx(R,{label:"Last synchronized",value:pe(a.lastSyncedAt)}),a.lastError?e.jsx(R,{label:"Synchronization",value:a.lastError}):null]}):null}function Q(a){return a?a.replaceAll("_"," ").replace(/^./,t=>t.toUpperCase()):"Pending"}function ia({error:a,events:t,loading:n}){return n&&!t.length?e.jsx("div",{className:"training-run-placeholder",children:"Loading run events…"}):t.length?e.jsx("div",{className:"training-table-wrap",children:e.jsxs("table",{className:"training-data-table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Time"}),e.jsx("th",{children:"Event"}),e.jsx("th",{children:"Details"})]})}),e.jsxs("tbody",{children:[t.map(s=>e.jsxs("tr",{children:[e.jsx("td",{children:pe(s.timestamp)}),e.jsx("td",{children:oa(s.type)}),e.jsx("td",{children:ca(s)})]},s.id)),a?e.jsxs("tr",{children:[e.jsx("td",{children:"Not available"}),e.jsx("td",{children:"Failure"}),e.jsx("td",{children:a})]}):null]})]})}):e.jsx("div",{className:"training-run-placeholder",children:a??"No normalized run events were recorded."})}function oa(a){return a.replaceAll("_"," ").replace(/^./,t=>t.toUpperCase())}function ca(a){const t=a.payload,n=O(t.step),s=O(t.maxSteps);if(a.type==="start")return typeof t.device=="string"?`Worker started on ${t.device}.`:"Worker started.";if(a.type==="progress"&&n!=null)return s==null?`Step ${n}.`:`Step ${n} of ${s}.`;if(a.type==="metric"){const i=typeof t.metricKind=="string"?t.metricKind.replaceAll("_"," "):"metric",l=[q("loss",t.loss),q("reward",t.meanReward??t.reward),q("policy loss",t.policyLoss),q("value loss",t.valueLoss),q("preference accuracy",t.preferenceAccuracy,da)].filter(o=>!!o);return`${i}${n==null?"":` · step ${n}`}${l.length?` · ${l.join(" · ")}`:""}`}if(a.type==="checkpoint"){const i=O(t.policyVersion),l=O(t.sizeBytes),o=[i==null?null:`policy ${i}`,l==null?null:be(l),t.final===!0?"final":null].filter(c=>!!c);return o.length?`Checkpoint committed · ${o.join(" · ")}.`:"Checkpoint committed."}if(a.type==="complete"){const i=O(t.artifactCount);return i==null?"Worker completed.":`Worker completed with ${i} artifacts.`}return a.type==="failure"&&typeof t.message=="string"?t.message:Object.keys(t).length?JSON.stringify(t):"Recorded."}function q(a,t,n=s=>new Intl.NumberFormat(void 0,{maximumFractionDigits:4}).format(s)){const s=O(t);return s==null?null:`${a} ${n(s)}`}function O(a){return typeof a=="number"&&Number.isFinite(a)?a:null}function da(a){return`${(a*100).toFixed(1)}%`}export{Ca as LabModelVersionDetailPage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as n,n as g,j as e,Z as z,X as y,aL as w,F as L}from"./index-CDJX5ZxL.js";import{M as F,F as C}from"./MarkdownText-_JhfBcQL.js";import{I as k}from"./MainPane-CNoHJkXy.js";import"./cloud-upload-mSm9KIL4.js";import"./folder-DMeODEQJ.js";import"./arrow-up-right-DRIT5z3q.js";import"./square-DfEM9XgY.js";import"./folder-open-DXaun_C3.js";function H({connection:a,expanded:l,selection:s,onClose:j,onResizeStart:h,onToggleExpanded:v}){const c=`${s.scope}:${s.name}`,[o,N]=n.useState({selectionKey:c,path:s.files[0]??"SKILL.md"}),r=o.selectionKey===c&&s.files.includes(o.path)?o.path:s.files[0]??"SKILL.md",[d,u]=n.useState(null),[m,p]=n.useState(null),[S,x]=n.useState(!1);n.useEffect(()=>{if(!a){u(null),p("Connect to the local OpenPond server to load this skill source.");return}let i=!1;return x(!0),p(null),u(null),g.skillSourceFile(a,s.scope,s.name,r).then(t=>{i||u(t)}).catch(t=>{i||p(t instanceof Error?t.message:String(t))}).finally(()=>{i||x(!1)}),()=>{i=!0}},[a,r,s.name,s.scope]);const f=r.split("/").at(-1)??r;return e.jsxs("aside",{className:`workspace-diff-panel native-skill-sidebar lab-skill-sidebar ${l?"expanded":""}`,"aria-label":`Skill package source: ${s.name}`,children:[l?null:e.jsx("div",{className:"workspace-diff-resize-handle",role:"separator","aria-orientation":"vertical","aria-label":"Resize skill source",onPointerDown:h}),e.jsxs("div",{className:"workspace-diff-topbar native-skill-sidebar-topbar",children:[e.jsx("div",{className:"workspace-diff-tabs",role:"tablist","aria-label":"Selected skill file",children:e.jsxs("button",{className:"workspace-diff-tab active",type:"button",role:"tab","aria-selected":!0,children:[e.jsx(b,{path:r}),e.jsx("span",{children:f})]})}),e.jsxs("div",{className:"workspace-diff-toolbar-actions",children:[e.jsx("button",{className:"diff-icon-button",type:"button",title:l?"Dock sidebar":"Expand sidebar","aria-label":l?"Dock sidebar":"Expand sidebar",onClick:v,children:l?e.jsx(F,{size:14}):e.jsx(z,{size:14})}),e.jsx("button",{className:"diff-icon-button",type:"button",title:"Close skill source","aria-label":"Close skill source",onClick:j,children:e.jsx(y,{size:14})})]})]}),e.jsxs("div",{className:"lab-skill-source-layout",children:[e.jsxs("nav",{className:"lab-skill-file-list","aria-label":`${s.name} package files`,children:[e.jsx("div",{className:"lab-skill-file-list-heading",children:"Package files"}),s.files.map(i=>e.jsxs("button",{"aria-current":i===r?"page":void 0,className:i===r?"active":void 0,type:"button",title:i,onClick:()=>N({selectionKey:c,path:i}),children:[e.jsx(b,{path:i}),e.jsx("span",{children:i})]},i))]}),e.jsxs("div",{className:"native-skill-sidebar-body lab-skill-source-body",children:[e.jsxs("header",{className:"native-skill-source-header",children:[e.jsxs("div",{className:"lab-skill-source-title-row",children:[e.jsx("h2",{children:s.name}),e.jsx("span",{children:$(s.scope)})]}),e.jsx("p",{children:s.description}),e.jsx("code",{children:s.packagePath})]}),S?e.jsxs("div",{className:"lab-skill-source-state",children:[e.jsx(w,{className:"spin",size:16})," Loading source…"]}):m?e.jsx("div",{className:"lab-skill-source-state error",children:m}):d?.isBinary?e.jsxs("div",{className:"lab-skill-source-state",children:[e.jsx(k,{size:18}),"Binary asset · ",B(d.byteSize)]}):e.jsx("pre",{className:"native-skill-markdown-source","aria-label":`${f} source`,children:e.jsx("code",{children:d?.content??""})})]})]})]})}function $(a){return a==="codex"?"Codex skill":a==="extension"?"GitHub extension":"OpenPond skill"}function b({path:a}){const l=a.split(".").at(-1)?.toLowerCase();return["avif","gif","jpeg","jpg","png","webp"].includes(l??"")?e.jsx(k,{size:14}):["md","txt","yaml","yml"].includes(l??"")?e.jsx(L,{size:14}):e.jsx(C,{size:14})}function B(a){return a<1024?`${a} B`:a<1048576?`${(a/1024).toFixed(1)} KB`:`${(a/1048576).toFixed(1)} MB`}export{H as LabSkillSidebar};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.labs-route{display:grid;grid-template-rows:auto minmax(0,1fr);width:100%;height:100%;min-width:0;min-height:0;overflow:hidden;background:var(--bg);color:var(--text)}.main-pane.page-active>.labs-route{grid-column:1;grid-row:1}.main-pane.page-active:has(>.labs-route){align-content:stretch;overflow:hidden}.main-pane.page-active.diff-open>.labs-route{max-height:100%}.labs-header{display:flex;align-items:center;justify-content:flex-end;gap:16px;min-width:0;padding:8px 28px 0;background:color-mix(in srgb,var(--bg) 94%,var(--panel))}.labs-header-navigation,.labs-header-actions{display:flex;align-items:center;gap:8px;min-width:0}.labs-create-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:28px;flex:0 0 auto;padding:0 9px;border:1px solid #fff;border-radius:7px;background:#fff;color:#111;font:inherit;font-size:12px;font-weight:550;cursor:pointer}.labs-create-button:hover{background:#f1f1f1;border-color:#f1f1f1}.labs-primary-tabs{display:flex;align-items:center;gap:2px;min-width:0}.labs-primary-tabs button,.labs-subtabs button{display:inline-flex;align-items:center;gap:6px;border:0;border-bottom:2px solid transparent;background:transparent;color:var(--muted);padding:11px 12px 10px;font:inherit;font-size:12px;cursor:pointer}.labs-primary-tabs button.active,.labs-subtabs button.active{border-bottom-color:var(--text);color:var(--text)}.labs-primary-tabs button span,.labs-subtabs button span{color:var(--muted);font-size:10px}.labs-create-anchor{position:relative}.labs-create-menu{position:absolute;z-index:50;top:calc(100% + 4px);right:0;min-width:174px;border:0;border-radius:8px;background:#1d1d1d;box-shadow:0 14px 36px #0000006b;padding:4px}.labs-create-menu button{display:flex;align-items:center;gap:8px;width:100%;min-height:30px;border:0;border-radius:6px;background:transparent;color:var(--muted-strong);padding:0 9px;text-align:left;text-decoration:none;font-size:13px;cursor:pointer}.labs-create-menu button svg{flex:0 0 auto}.labs-create-menu button:hover,.labs-create-menu button:focus-visible{outline:0;background:#ffffff14;color:var(--text)}.labs-create-menu button:disabled{color:var(--muted);cursor:default;opacity:.62}.labs-create-menu button:disabled:hover,.labs-create-menu button:disabled:focus-visible{background:transparent;color:var(--muted)}.labs-create-menu strong{font-size:inherit;font-weight:400}.labs-create-menu small{display:none}.labs-panel{min-width:0;min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-color:rgba(255,255,255,.24) transparent;scrollbar-width:thin}.labs-flat-body{display:grid;gap:12px;width:min(1180px,calc(100% - 56px));margin-inline:auto;padding:8px 0 56px}.labs-datasets-page{box-sizing:border-box;min-height:100%;align-content:start}.labs-dataset-detail-heading h1{margin:0;font-size:20px}.labs-dataset-detail-heading p{max-width:760px;margin:4px 0 0;color:var(--muted);font-size:11px;line-height:1.5}.labs-dataset-detail-heading{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:start;gap:12px;padding:12px 0 6px}.labs-dataset-detail-actions{display:flex;align-items:center;gap:8px}.labs-datasets-page>.training-detail-tabs{padding:0}.labs-datasets-page>.training-detail-tabs button:disabled{cursor:not-allowed;opacity:.45}.labs-dataset-heading-spacer{width:31px;height:31px}.labs-back-button{display:grid;place-items:center;width:30px;height:30px;border:1px solid var(--border);border-radius:6px;background:transparent;color:var(--text);cursor:pointer}.labs-back-button:hover{background:var(--panel-soft)}.labs-datasets-table td:first-child{min-width:320px}.labs-workproduct-link{appearance:none;display:grid;width:100%;min-width:0;gap:3px;border:0;background:transparent;color:var(--text);padding:0;text-align:left;cursor:pointer;font:inherit}.labs-workproduct-link strong{overflow:hidden;font-size:12px;text-overflow:ellipsis;white-space:nowrap}.labs-workproduct-link span{overflow:hidden;color:var(--muted);font-size:10px;text-overflow:ellipsis;white-space:nowrap}.labs-home-models{display:grid;gap:10px;margin-top:10px;border-top:1px solid var(--border);padding-top:18px}.labs-section-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:14px}.labs-section-heading h2{margin:0;font-size:15px}.labs-section-heading p{margin:3px 0 0;color:var(--muted);font-size:10px}.labs-section-heading>button{border:0;background:transparent;color:var(--muted-strong);padding:3px 0;font:inherit;font-size:11px;cursor:pointer}.labs-section-heading>button:hover{color:var(--text)}.labs-home-profile-controls .account-settings{max-width:none}.labs-home-profile-controls .profile-view{width:100%;justify-self:stretch;gap:0;padding:0}.labs-home-profile-controls .profile-control-panel{padding:2px 0 4px}.labs-training-run-name{display:grid;min-width:260px;gap:3px;padding:4px 0}.labs-training-run-progress-wrap{display:grid;gap:2px;margin-top:2px}.labs-training-run-name>strong{color:var(--text);font-size:12px}.labs-training-run-name>span,.labs-training-run-progress small,.labs-training-run-verdicts{color:var(--muted);font-size:10px;line-height:1.4}.labs-training-run-progress{display:flex;align-items:center;gap:8px}.labs-training-run-progress progress{width:min(180px,45%);height:5px;accent-color:var(--cyan)}.labs-model-baseline-facts{margin-top:12px}.labs-training-run-progress small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.labs-workproduct-toolbar{display:flex;align-items:center;gap:8px}.labs-search{display:flex;align-items:center;flex:1;min-width:0;gap:7px;border:1px solid var(--border);border-radius:7px;background:var(--panel);padding:0 9px;color:var(--muted)}.labs-search input{width:100%;min-width:0;border:0;background:transparent;color:var(--text);padding:8px 0;font:inherit;font-size:12px;outline:0}.labs-workproduct-toolbar select{min-width:130px;border:1px solid var(--border);border-radius:7px;background:var(--panel);color:var(--text);padding:8px 9px;font:inherit;font-size:12px}.labs-workproduct-toolbar .dropdown-select{min-width:160px}.labs-workproduct-toolbar .dropdown-trigger{background:var(--panel)}.labs-table-empty{display:flex;min-height:88px;align-items:center;justify-content:center;gap:8px;border:1px solid var(--border);border-radius:8px;background:var(--panel);color:var(--muted);font-size:12px}.labs-workproducts-table{min-width:860px}.labs-workproducts-table th:first-child{width:8%}.labs-workproducts-table th:nth-child(2){width:32%}.labs-workproducts-table th:nth-child(4){width:9%}.labs-workproducts-table th:nth-child(5){width:8%}.labs-workproducts-table th:nth-child(6){width:9%}.labs-workproducts-table td:last-child{text-align:right;color:var(--muted)}.labs-workproducts-table.models-only th:first-child{width:42%}.labs-workproducts-table.models-only th:nth-child(2){width:18%}.labs-workproducts-table.models-only th:nth-child(3),.labs-workproducts-table.models-only th:nth-child(4){width:10%}.labs-workproducts-table.models-only td:first-child{min-width:280px}.labs-workproduct-use{min-height:28px}.labs-compact-button{min-height:28px;padding:5px 8px;font-size:11px}.labs-workproduct-actions{display:inline-flex;align-items:center;justify-content:flex-end;gap:8px}.labs-workproduct-training,.labs-workproduct-evals{text-align:center}.labs-workproduct-indicator{display:inline-flex;min-width:28px;align-items:center;justify-content:center;gap:4px;color:var(--muted)}.labs-workproduct-indicator strong{font-size:11px;font-variant-numeric:tabular-nums}.labs-workproduct-indicator.active{color:#68a8dd}.labs-workproduct-indicator.positive{color:#55aa74}.labs-workproduct-indicator.negative{color:#d76b70}.labs-workproduct-indicator.neutral,.labs-workproduct-na{color:var(--muted)}.labs-workproduct-na{font-size:12px}.labs-workproduct-updated{color:var(--muted);font-size:10px;white-space:nowrap}.labs-workproducts-table td:nth-child(2) button{display:grid;gap:3px;border:0;background:transparent;color:var(--text);padding:0;font:inherit;text-align:left;cursor:pointer}.labs-workproducts-table td:nth-child(2) strong{font-size:13px}.labs-workproducts-table td:nth-child(2) span{display:block;max-width:360px;overflow:hidden;color:var(--muted);font-size:10px;text-overflow:ellipsis;white-space:nowrap}.labs-workproducts-table code{display:block;max-width:220px;overflow:hidden;color:var(--muted);font-size:10px;text-overflow:ellipsis;white-space:nowrap}.labs-workproduct-type{color:var(--muted-strong);font-size:11px;font-weight:600}.labs-status-badge{display:inline-flex;align-items:center;width:max-content;border-radius:999px;padding:3px 8px;color:#fff;font-size:10px;font-weight:600;line-height:1.25;white-space:nowrap}.labs-status-badge.positive{background:#34784e}.labs-status-badge.info{background:#3f6394}.labs-status-badge.warning{background:#8b681f}.labs-status-badge.negative{background:#91484b}.labs-status-badge.neutral{background:#565861}.labs-pagination{display:flex;align-items:center;justify-content:flex-end;gap:10px;color:var(--muted);font-size:11px}.labs-pagination button{border:1px solid var(--border);border-radius:6px;background:transparent;color:var(--text);padding:5px 8px;font:inherit;font-size:11px;cursor:pointer}.labs-pagination button:disabled{opacity:.42;cursor:default}.labs-suggestions-page{min-height:100%}.labs-subtabs{display:flex;gap:2px;padding:0 28px}.labs-suggestions-body{overflow:auto}.labs-suggestions-body .training-page-body{width:min(1180px,calc(100% - 56px));margin-inline:auto}.labs-workproduct-detail{padding-top:22px}.labs-workproduct-detail-header{align-items:center}.labs-workproduct-detail-header>div:first-child{display:grid;min-width:0;gap:8px}.labs-workproduct-name-row{display:flex;align-items:center;min-width:0;gap:10px}.labs-workproduct-name-row h1{min-width:0}.labs-workproduct-header-actions,.labs-eval-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:6px}.labs-rename-backdrop{position:fixed;z-index:100;inset:0;display:flex;align-items:center;justify-content:center;background:#050609ad;padding:24px}.labs-rename-dialog{width:min(440px,100%);overflow:hidden;border:1px solid var(--border);border-radius:12px;background:var(--panel);box-shadow:0 22px 70px #0000006b}.labs-rename-dialog>header{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:start;gap:11px;border-bottom:1px solid var(--border);padding:16px 17px}.labs-rename-dialog h2,.labs-rename-dialog p{margin:0}.labs-rename-dialog h2{color:var(--text);font-size:14px}.labs-rename-dialog header p{margin-top:4px;color:var(--muted);font-size:11px;line-height:1.45}.labs-rename-dialog-icon{display:inline-flex;width:30px;height:30px;align-items:center;justify-content:center;border-radius:8px;background:#6291d124;color:#7da9e4}.labs-rename-dialog header button{display:inline-flex;width:28px;height:28px;align-items:center;justify-content:center;border:0;border-radius:6px;background:transparent;color:var(--muted);cursor:pointer}.labs-rename-dialog header button:hover:not(:disabled){background:#ffffff12;color:var(--text)}.labs-rename-dialog form{display:grid;gap:14px;padding:17px}.labs-rename-dialog form>label{display:grid;gap:7px;color:var(--muted-strong);font-size:11px;font-weight:650}.labs-rename-dialog input{width:100%;min-width:0;border:1px solid var(--border);border-radius:7px;outline:none;background:var(--bg);color:var(--text);padding:9px 10px;font:inherit;font-size:12px}.labs-rename-dialog input:focus{border-color:#5c8cc9;box-shadow:0 0 0 2px #5c8cc92e}.labs-rename-agent-id{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:12px;color:var(--muted);font-size:10px}.labs-rename-agent-id code{overflow:hidden;color:var(--muted-strong);text-overflow:ellipsis;white-space:nowrap}.labs-rename-error{color:#e47b7f;font-size:11px}.labs-rename-dialog footer{display:flex;justify-content:flex-end;gap:8px}.labs-rename-dialog footer button{min-height:30px;border:1px solid var(--border);border-radius:7px;background:transparent;color:var(--text);padding:0 12px;font:inherit;font-size:11px;font-weight:650;cursor:pointer}.labs-rename-dialog footer button[type=submit]{border-color:#4e7db9;background:#416da3;color:#fff}.labs-rename-dialog button:disabled{cursor:default;opacity:.5}.labs-run-decision .composer-create-strip{margin:0}.labs-run-decision{display:grid;gap:10px}.labs-run-decision-actions{display:flex;justify-content:flex-end;gap:7px}.labs-status-dot{width:9px;height:9px;flex:0 0 auto;border-radius:999px;background:#565861}.labs-status-dot.small{width:7px;height:7px;margin-left:1px}.labs-status-dot.positive{background:#48a868}.labs-status-dot.info{background:#6291d1}.labs-status-dot.warning{background:#c89b3c}.labs-status-dot.negative{background:#c45e62}.labs-dataset-build-editor{display:flex;min-height:100%;flex-direction:column}.labs-dataset-build-back{align-self:flex-start;margin-top:16px}.labs-dataset-builder-workspace{display:flex;min-height:520px;flex:1;flex-direction:column;padding-top:12px}.labs-dataset-builder-workspace>.training-dialog-scroll-body,.labs-dataset-builder-workspace>.training-evidence-required>.training-dialog-scroll-body{max-height:none;overflow:visible}.labs-dataset-builder-workspace>.training-dialog-actions,.labs-dataset-builder-workspace>.training-evidence-required>.training-dialog-actions{margin-top:24px;border-top:1px solid var(--border);padding-top:16px}.labs-dataset-builder-workspace .training-source-options{max-height:440px}.labs-dataset-grader-list{display:grid;border:1px solid var(--border);border-radius:8px;overflow:hidden}.labs-dataset-grader-list>div{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:11px 12px;border-bottom:1px solid var(--border)}.labs-dataset-grader-list>div:last-child{border-bottom:0}.labs-dataset-grader-list strong{font-size:12px}.labs-dataset-grader-list small{color:var(--muted);font-size:10px}.labs-models-table{min-width:660px}.labs-models-table th:first-child{width:42%}.labs-models-table th:nth-child(2),.labs-models-table th:nth-child(3){width:18%}.labs-models-table th:nth-child(4){width:12%}.labs-models-table td:nth-child(4){color:var(--muted-strong);font-size:11px}.labs-model-table-summary{display:grid;justify-items:start;gap:5px}.labs-model-table-summary>span{color:var(--muted);font-size:10px;white-space:nowrap}.labs-model-run-list-actions{display:flex;justify-content:center;padding-top:2px}.labs-model-toolbar-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px}.labs-dataset-advanced-details{margin-top:14px;border-top:1px solid var(--border);padding-top:12px}.labs-dataset-advanced-details summary{width:max-content;color:var(--muted-strong);font-size:11px;font-weight:650;cursor:pointer}.labs-dataset-advanced-details[open] summary{margin-bottom:12px}.labs-dataset-advanced-details .training-button{margin-top:12px}.labs-model-create-dialog textarea,.labs-model-create-dialog select{width:100%;min-width:0;border:1px solid var(--border);border-radius:7px;outline:none;background:var(--bg);color:var(--text);padding:9px 10px;font:inherit;font-size:12px}.labs-model-create-dialog>header{grid-template-columns:minmax(0,1fr) auto;border-bottom:0;padding-bottom:4px}.labs-model-create-dialog{overflow:visible}.labs-model-create-purpose{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0;padding:0;border:0}.labs-model-create-purpose legend{grid-column:1 / -1;margin-bottom:1px;color:var(--muted-strong);font-size:11px;font-weight:650}.labs-model-create-purpose button{display:grid;gap:5px;min-height:82px;border:1px solid var(--border);border-radius:8px;background:transparent;color:var(--text);padding:11px;text-align:left;cursor:pointer}.labs-model-create-purpose button:hover,.labs-model-create-purpose button.selected{background:var(--panel-soft)}.labs-model-create-purpose button.selected{border-color:var(--muted-strong)}.labs-model-create-purpose small{color:var(--muted);font-size:10px;line-height:1.4}.labs-model-create-field{display:grid;gap:7px;color:var(--muted-strong);font-size:11px;font-weight:650}.labs-model-create-field>small{color:var(--muted);font-size:10px;font-weight:500;line-height:1.45}.labs-model-create-select-row{display:grid;grid-template-columns:minmax(0,1fr) 34px;gap:7px}.labs-model-create-select-row .dropdown-select{width:100%}.labs-model-create-select-row .dropdown-trigger{background:var(--bg)}.labs-model-create-select-row .dropdown-menu{right:auto;left:0;width:100%;min-width:100%}.labs-model-create-add{display:inline-flex;width:34px;min-height:34px;align-items:center;justify-content:center;border:1px solid var(--border);border-radius:7px;background:transparent;color:var(--muted-strong);font:inherit;font-size:17px;font-weight:400;cursor:pointer}.labs-model-create-add:hover:not(:disabled){background:#ffffff0f;color:var(--text)}.labs-model-create-dialog textarea{resize:vertical;line-height:1.45}.labs-model-create-dialog label>span,.labs-model-create-field>span{display:flex;align-items:baseline;justify-content:space-between;gap:10px}.labs-model-create-dialog label small,.labs-model-create-field small{color:var(--muted);font-size:9px;font-weight:500}.labs-model-create-dialog textarea:focus{border-color:var(--border);box-shadow:none}.labs-model-create-dialog footer button[type=submit]{border-color:#fff;background:#fff;color:#111}.labs-model-create-dialog footer button[type=submit]:hover:not(:disabled){border-color:#f1f1f1;background:#f1f1f1}.labs-serving-page,.labs-usage-page{display:grid;gap:28px}.labs-operational-section{display:grid;gap:12px;min-width:0}.labs-operational-section>header,.labs-operational-header{display:flex;align-items:end;justify-content:space-between;gap:16px}.labs-operational-section h2,.labs-operational-header h2{margin:0;color:var(--text);font-size:14px;font-weight:560}.labs-operational-section p,.labs-operational-header p{max-width:720px;margin:4px 0 0;color:var(--muted);font-size:11px;line-height:1.55}.labs-serving-table,.labs-managed-serving-table{min-width:760px}.labs-operational-section>.training-table-wrap{min-width:0;max-width:100%;contain:inline-size}.labs-serving-model{display:grid;gap:3px}.labs-serving-model strong{color:var(--text);font-size:12px;font-weight:580}.labs-serving-model span{color:var(--muted);font-size:10px}.labs-usage-page>.usage-settings{width:100%;max-width:none;padding:0 0 48px}@media(max-width:640px){.labs-operational-section>header,.labs-operational-header{align-items:start;flex-direction:column}}.labs-change-page{display:grid;gap:20px;padding-top:18px}.labs-change-index,.labs-change-run-detail{display:grid;gap:14px;padding-top:18px}.labs-change-actions{display:flex;flex:0 0 auto;align-items:center;gap:7px}.labs-change-facts{display:grid;grid-template-columns:130px 130px minmax(0,1fr);margin:0;border-block:1px solid var(--border)}.labs-change-facts>div{display:grid;min-width:0;gap:4px;padding:12px 14px;border-right:1px solid var(--border)}.labs-change-facts>div:first-child{padding-left:0}.labs-change-facts>div:last-child{border-right:0}.labs-change-facts dt{color:var(--muted);font-size:10px}.labs-change-facts dd{margin:0;overflow:hidden;font:11px/1.4 monospace;text-overflow:ellipsis;white-space:nowrap}.labs-change-message,.labs-change-empty{display:flex;align-items:center;gap:8px;border:1px solid var(--border);border-radius:8px;padding:11px 12px;color:var(--muted);font-size:12px}.labs-change-message.negative,.labs-change-empty.negative{border-color:color-mix(in srgb,#c45e62 48%,var(--border));color:#db7779}.labs-change-timeline{position:relative;display:grid;gap:14px}.labs-change-timeline:before{position:absolute;z-index:0;top:0;bottom:0;left:7.5%;width:1px;background:var(--border);content:""}.labs-change-timeline-item{position:relative;z-index:1}.labs-change-card{display:grid;overflow:hidden;min-width:0;border:1px solid var(--border);border-radius:9px;background:var(--panel)}.labs-change-card-header,.labs-change-card-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 13px}.labs-change-card-header{padding-bottom:4px}.labs-change-card-header>span:last-child{color:var(--muted);font-size:10px}.labs-change-card-body{display:grid;gap:6px;padding:14px 13px}.labs-change-card-body h3{margin:0;font-size:14px;line-height:1.45}.labs-change-card-body p{margin:0;color:var(--muted);font-size:11px;line-height:1.55}.labs-change-card-footer{padding-top:4px}.labs-change-card-footer.end{justify-content:flex-end}.labs-change-timeline-label{color:var(--muted);font-size:10px}.labs-change-footer-status{display:flex;align-items:center;gap:7px;color:var(--muted-strong);font-size:11px}.labs-change-evals{display:grid}.labs-change-eval{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px;min-height:58px;padding:0 13px;border-bottom:1px solid var(--border)}.labs-change-eval:last-child{border-bottom:0}.labs-change-eval>div{display:grid;min-width:0;gap:3px}.labs-change-eval strong{overflow:hidden;font-size:12px;text-overflow:ellipsis;white-space:nowrap}.labs-change-eval span{color:var(--muted);font-size:10px}.labs-change-evals .labs-change-empty{border:0;border-radius:0}.labs-eval-receipts{display:grid;gap:8px}.labs-agent-change-history{min-width:700px}.labs-agent-change-history th:first-child{width:48%}.labs-agent-change-history td:first-child button{display:grid;gap:3px;width:100%;border:0;background:transparent;color:var(--text);padding:0;font:inherit;text-align:left;cursor:pointer}.labs-agent-change-history td:first-child strong{overflow:hidden;font-size:12px;text-overflow:ellipsis;white-space:nowrap}.labs-agent-change-history td:first-child span{color:var(--muted);font-size:10px}.labs-inline-facts{display:flex;gap:28px;flex-wrap:wrap;margin:0}.labs-inline-facts>div{display:grid;gap:3px}.labs-inline-facts dt{color:var(--muted);font-size:10px}.labs-inline-facts dd{margin:0;max-width:420px;overflow-wrap:anywhere;font-size:12px;font-weight:560}.labs-method-tabs{display:inline-flex;gap:3px;margin:0 0 18px;border:1px solid var(--border);border-radius:8px;background:var(--panel-soft);padding:3px}.labs-method-tabs button{display:flex;align-items:baseline;gap:8px;min-width:150px;border:0;border-radius:5px;background:transparent;color:var(--muted);padding:8px 11px;font:inherit;font-size:12px;text-align:left;cursor:pointer}.labs-method-tabs button:hover{color:var(--text)}.labs-method-tabs button.active{background:var(--panel);color:var(--text);box-shadow:inset 0 0 0 1px var(--border)}.labs-method-tabs button strong{margin-left:auto;color:inherit;font-size:10px}.labs-dataset-summary,.labs-eval-copy,.labs-version-storage-copy{margin-top:0;margin-bottom:16px}.labs-dataset-method-readiness{display:grid;gap:9px;margin-top:18px;border-top:1px solid var(--border);padding-top:14px}.labs-dataset-method-readiness ul{display:grid;gap:5px;margin:0;padding-left:18px;color:var(--muted);font-size:11px;line-height:1.45}.labs-dataset-tabs{display:flex;width:fit-content}.labs-dataset-tabs button{min-width:132px}.labs-dataset-tabs button>span{margin-left:auto;color:var(--muted);font-size:10px}.labs-dataset-examples{display:grid;gap:8px}.labs-dataset-example{overflow:hidden;border:1px solid var(--border);border-radius:8px;background:var(--panel-soft)}.labs-dataset-example>summary{display:grid;grid-template-columns:28px minmax(0,1fr) auto;align-items:center;gap:10px;padding:11px 12px;cursor:pointer;list-style:none}.labs-dataset-example>summary::-webkit-details-marker{display:none}.labs-dataset-example[open]>summary{background:var(--panel)}.labs-dataset-example-index{color:var(--muted);font:10px/1 var(--mono)}.labs-dataset-example-title{display:grid;min-width:0;gap:4px}.labs-dataset-example-title strong{overflow:hidden;font-size:12px;font-weight:560;text-overflow:ellipsis;white-space:nowrap}.labs-dataset-example-title small{color:var(--muted);font-size:10px}.labs-dataset-example-body{display:grid;gap:15px;border-top:1px solid var(--border);padding:14px}.labs-dataset-example-body section{display:grid;gap:6px}.labs-dataset-example-body h3,.labs-version-promotion>h3{margin:0;font-size:11px}.labs-dataset-example-body p{margin:0;color:var(--muted-strong);font-size:12px;line-height:1.55}.labs-dataset-example-body pre{max-height:180px;overflow:auto;margin:0;border:1px solid var(--border);border-radius:6px;background:var(--bg);padding:9px 10px;color:var(--text);font:10px/1.5 var(--mono);white-space:pre-wrap}.labs-dataset-example-advanced>summary,.labs-run-technical>summary{color:var(--muted);font-size:11px;cursor:pointer}.labs-dataset-example-advanced .training-configuration-list,.labs-run-technical .training-configuration-list{margin-top:10px}.labs-run-technical{margin-top:14px;border-top:1px solid var(--border);padding-top:10px}.labs-eval-setup>summary{color:var(--muted-strong);font-size:12px;cursor:pointer}.labs-eval-setup .training-table-wrap{margin-top:12px}.labs-version-storage{display:grid;gap:4px;max-width:280px}.labs-version-name{min-width:92px}.labs-version-name strong,.labs-version-name small{display:block}.labs-version-name small{margin-top:3px;color:var(--muted);font-size:10px}.labs-version-storage code{overflow:hidden;color:var(--muted);font-size:9px;text-overflow:ellipsis;white-space:nowrap}.labs-version-promotion{display:grid;gap:12px;margin-top:18px;border-top:1px solid var(--border);padding-top:16px}.labs-detail-copy{margin:14px 0 0;color:var(--muted);font-size:12px;line-height:1.55}.labs-expert-bootstrap-summary{display:grid;gap:12px}.labs-expert-bootstrap-summary>div:first-child{display:flex;align-items:center;gap:10px}.labs-expert-bootstrap-summary p{margin:0;color:var(--muted);font-size:12px;line-height:1.5}.labs-expert-bootstrap-dialog{width:min(820px,calc(100vw - 40px));max-height:min(780px,calc(100vh - 40px))}.labs-expert-trajectory-list{display:grid;gap:9px;margin-top:16px}.labs-expert-preview-facts{margin-bottom:4px}.labs-expert-trajectory{overflow:hidden;border:1px solid var(--border);border-radius:8px;background:var(--panel-soft)}.labs-expert-trajectory>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 12px;cursor:pointer;list-style:none}.labs-expert-trajectory>summary::-webkit-details-marker{display:none}.labs-expert-trajectory>summary>span:first-child{display:grid;gap:3px}.labs-expert-trajectory summary strong{font-size:12px}.labs-expert-trajectory summary small,.labs-expert-approval-note{color:var(--muted);font-size:11px}.labs-expert-trajectory[open]>summary>span:last-child{transform:rotate(90deg)}.labs-expert-trajectory-body{display:grid;gap:14px;border-top:1px solid var(--border);padding:13px}.labs-expert-trajectory-body section{display:grid;gap:6px}.labs-expert-trajectory-body h3{margin:0;font-size:11px}.labs-expert-trajectory-body p{margin:0;color:var(--muted);font-size:12px;line-height:1.5}.labs-expert-trajectory-body .training-pills span{border:1px solid var(--border);border-radius:999px;background:var(--panel);padding:3px 7px;color:var(--muted);font-family:var(--mono);font-size:10px}.labs-expert-trajectory-body pre{max-height:260px;overflow:auto;margin:0;border:1px solid var(--border);border-radius:6px;background:var(--bg);padding:9px;color:var(--text);font:10px/1.5 var(--mono);white-space:pre-wrap;overflow-wrap:anywhere}.labs-expert-messages>summary{color:var(--muted);font-size:11px;cursor:pointer}.labs-expert-messages pre{margin-top:8px}.labs-expert-bootstrap-dialog .training-dialog-actions{flex-wrap:nowrap}.labs-expert-approval-note{margin-right:auto}.labs-eval-summary{display:grid;gap:14px}.labs-eval-actions .dropdown-select{min-width:160px}.labs-validation-list{margin:14px 0 0;padding-left:18px;color:var(--muted);font-size:11px;line-height:1.5}.labs-activity-table{min-width:720px}.labs-model-eval-table{min-width:680px}.labs-training-error{margin:14px 0 0;color:#db7779;font-size:11px;line-height:1.5;white-space:pre-wrap}.labs-source-evals{display:grid;gap:8px}.labs-source-evals>strong{font-size:12px}.labs-source-evals ul{display:grid;gap:6px;margin:0;padding:0;list-style:none}.labs-source-evals li{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--border);padding:0 0 6px}.labs-source-evals code{color:var(--muted);font-size:11px}.labs-source-evals+.labs-source-evals,.labs-source-evals+.training-table-wrap{margin-top:14px}.labs-model-versions-table{min-width:760px}.labs-model-version-index{display:grid;min-width:0;gap:16px}.labs-model-section-intro{display:flex;align-items:flex-end;justify-content:space-between;gap:20px}.labs-model-section-intro h2,.labs-model-section-intro p{margin:0}.labs-model-section-intro h2{font-size:16px;font-weight:600}.labs-model-section-intro p,.labs-model-section-intro>span{color:var(--muted);font-size:11px}.labs-model-section-intro p{margin-top:4px}.labs-model-section-intro>span{white-space:nowrap}.labs-model-overview{min-width:0}.labs-workproduct-description{max-width:720px;margin:0;color:var(--muted);font-size:11px;line-height:1.5}.labs-workproduct-detail .training-detail-sections{gap:22px;padding-top:22px}.labs-model-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));overflow:hidden;border:1px solid var(--border);border-radius:9px;background:var(--border);gap:1px}.labs-model-kpi{display:grid;min-width:0;gap:5px;border:0;background:var(--panel);padding:14px 15px;color:inherit;font:inherit;text-align:left}.labs-model-kpi>span,.labs-model-kpi>small{color:var(--muted);font-size:10px}.labs-model-kpi>strong{overflow:hidden;font-size:17px;font-weight:600;text-overflow:ellipsis;white-space:nowrap}.labs-model-kpi>small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.labs-model-overview .training-detail-section-panel{border-style:solid;background:var(--panel)}.labs-model-runs-table{min-width:760px}.labs-model-run-draft{background:color-mix(in srgb,#6291d1 6%,var(--panel))}.labs-model-run-draft .labs-version-row-button small{color:#7da9e4}.labs-model-version-detail{display:grid;min-width:0;gap:20px}.labs-model-version-detail .training-detail-section-heading h2{text-decoration:none}.labs-model-version-detail .training-detail-section-panel{border-style:solid;background:var(--panel)}.labs-model-run-summary{display:grid;min-width:0;gap:16px}.labs-run-outcome-card,.labs-run-summary-card{overflow:hidden;border:1px solid var(--border);border-radius:10px;background:var(--panel)}.labs-run-outcome-card>header{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:18px 19px 16px}.labs-run-title-row{display:flex;align-items:center;gap:10px}.labs-run-title-row h2{margin:0;font-size:18px;font-weight:620}.labs-run-outcome-card>header p{margin:4px 0 0;color:var(--muted);font-size:11px}.labs-run-detail-list dt{color:var(--muted);font-size:10px}.labs-run-detail-list dd{margin:0;overflow-wrap:anywhere}.labs-run-summary-card>header{border-bottom:1px solid var(--border);padding:14px 16px 12px}.labs-run-summary-card>header h3{margin:0;font-size:13px;font-weight:610}.labs-run-detail-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:28px;margin:0;padding:2px 16px}.labs-run-detail-list>div{display:grid;grid-template-columns:minmax(110px,.7fr) minmax(0,1.3fr);align-items:center;gap:16px;border-bottom:1px solid var(--border);padding:9px 0}.labs-run-detail-list>div:nth-child(odd){border-right:1px solid var(--border);padding-right:14px}.labs-run-detail-list>div:nth-child(2n){padding-left:14px}.labs-run-detail-list>div:nth-last-child(-n+2){border-bottom:0}.labs-run-detail-list dd{font-size:12px;font-weight:540;text-align:right}.labs-run-taskset-link{display:inline-flex;max-width:100%;align-items:center;justify-content:flex-end;gap:4px;border:0;background:transparent;color:var(--text);padding:0;font:inherit;font-weight:560;text-align:right;cursor:pointer}.labs-run-taskset-link span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.labs-run-taskset-link:hover span{text-decoration:underline;text-underline-offset:2px}.labs-run-taskset-link svg{flex:0 0 auto;color:var(--muted)}.labs-run-detail-tabs{min-width:0}.labs-run-detail-tabs>.training-detail-tabs{padding:0}.labs-run-detail-tab-panel{min-width:0;padding-top:14px}.labs-version-row-button{display:grid;width:100%;gap:2px;border:0;background:transparent;padding:0;color:inherit;font:inherit;text-align:left;cursor:pointer}.labs-version-row-button small{color:var(--muted);font-family:var(--mono);font-size:10px}.labs-version-dataset-link{border:0;background:transparent;padding:0;color:var(--text);font:inherit;text-align:left;cursor:pointer}.labs-version-dataset-link:hover{text-decoration:underline;text-underline-offset:2px}.labs-version-detail-dataset{margin-top:14px}.labs-version-icon-button{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border:1px solid var(--border);border-radius:7px;background:transparent;color:var(--muted-strong)}.labs-version-icon-button[aria-pressed=true]{background:var(--panel-soft);color:var(--text)}.labs-new-version-dialog{width:min(640px,calc(100vw - 32px))}.labs-new-version-step{display:flex;align-items:flex-start;gap:10px;margin-top:16px}.labs-new-version-step-number{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:999px;background:var(--blue);color:#fff;font-size:11px;font-weight:700}.labs-new-version-step>div{display:grid;gap:2px}.labs-new-version-step p{margin:0;color:var(--muted);font-size:11px}.labs-new-version-select{display:grid;gap:6px;margin:12px 0;color:var(--muted-strong);font-size:11px}.labs-new-version-select select{width:100%;border:1px solid var(--border);border-radius:8px;background:var(--panel-soft);padding:9px 10px;color:var(--text)}.labs-new-version-dataset-facts{margin-bottom:18px}@media(max-width:1120px){.labs-model-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:860px){.labs-header{padding:8px 18px 0}.labs-primary-tabs button{padding-inline:8px}.labs-flat-body{width:calc(100% - 36px);padding:20px 0 36px}.labs-workproduct-toolbar{align-items:stretch;flex-direction:column}.labs-workproduct-toolbar select,.labs-workproduct-toolbar .dropdown-select{width:100%}.labs-workproduct-detail{width:calc(100% - 36px)}.labs-workproduct-detail-header{align-items:flex-start;flex-direction:column}.labs-change-actions{width:100%}.labs-change-actions .training-button{flex:1}.labs-change-facts{grid-template-columns:minmax(0,1fr)}.labs-change-facts>div{border-right:0;border-bottom:1px solid var(--border);padding-inline:14px}.labs-change-facts>div:last-child{border-bottom:0}.labs-change-card-footer:not(.end){align-items:stretch;flex-direction:column}.labs-change-card-footer.end .training-button{width:100%}.labs-inline-facts{gap:16px}.labs-method-tabs{display:grid;width:100%;grid-template-columns:repeat(2,minmax(0,1fr))}.labs-dataset-tabs{grid-template-columns:repeat(3,minmax(0,1fr))}.labs-method-tabs button,.labs-dataset-tabs button{min-width:0}.labs-suggestions-body .training-page-body{width:calc(100% - 36px)}}@media(max-width:560px){.labs-model-kpi-grid{grid-template-columns:1fr}.labs-run-detail-list>div{grid-template-columns:1fr;gap:4px}.labs-run-detail-list{grid-template-columns:1fr}.labs-run-detail-list>div:nth-child(odd),.labs-run-detail-list>div:nth-child(2n){border-right:0;border-bottom:1px solid var(--border);padding-right:0;padding-left:0}.labs-run-detail-list>div:last-child{border-bottom:0}.labs-run-detail-list dd,.labs-run-taskset-link{justify-content:flex-start;text-align:left}.labs-primary-tabs button{font-size:11px;padding-inline:6px}.labs-primary-tabs button span{display:none}.labs-create-menu{right:-2px;width:min(270px,calc(100vw - 28px))}}.labs-model-benchmark-dialog{width:min(900px,calc(100vw - 40px));max-height:min(820px,calc(100vh - 40px));overflow:hidden}.labs-model-benchmark-dialog .labs-evaluation-comparison{grid-template-columns:repeat(2,minmax(0,1fr))}.labs-model-benchmark-dialog .labs-evaluation-comparison>:last-child,.labs-model-evaluation-detail>.labs-evaluation-comparison>:last-child{grid-column:1 / -1}.labs-model-evaluation-detail>.labs-evaluation-comparison{grid-template-columns:repeat(2,minmax(0,1fr))}.labs-model-benchmark-dialog>header{grid-template-columns:minmax(0,1fr) auto}.labs-model-benchmark-dialog-body{min-height:0;overflow:auto;padding:0 20px 20px}.labs-model-benchmark-card{border:1px solid var(--border);border-radius:14px;background:transparent;padding:16px;display:grid;gap:18px}.labs-model-benchmark-heading,.labs-model-benchmark-result-row,.labs-model-benchmark-controls{display:flex;align-items:center;justify-content:space-between;gap:14px}.labs-model-benchmark-heading h3,.labs-evaluation-chart h4{margin:0}.labs-model-benchmark-heading p,.labs-evaluation-chart header p,.labs-model-benchmark-empty{color:var(--muted);margin:5px 0 0}.labs-evaluation-comparison{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.labs-evaluation-token-mix,.labs-evaluation-token-mix>div{display:grid;gap:8px}.labs-evaluation-token-mix{gap:12px}.labs-evaluation-token-label,.labs-evaluation-token-legend,.labs-evaluation-chart>header,.labs-evaluation-chart-label{display:flex;align-items:center;justify-content:space-between;gap:12px}.labs-evaluation-token-label span,.labs-evaluation-token-mix small{font-size:11px}.labs-evaluation-token-label span,.labs-evaluation-chart-label span{min-width:0;overflow:hidden;color:var(--muted);text-overflow:ellipsis;white-space:nowrap}.labs-evaluation-token-label strong,.labs-evaluation-chart-label strong{color:var(--text);font-size:15px;font-variant-numeric:tabular-nums}.labs-evaluation-token-mix small{color:var(--muted)}.labs-evaluation-token-stack{display:flex;height:9px;overflow:hidden;border-radius:999px;background:color-mix(in srgb,var(--text) 6%,transparent)}.labs-evaluation-token-stack span:first-child{background:#79a7eb}.labs-evaluation-token-stack span:last-child{background:#8d72d9}.labs-evaluation-token-legend{flex:0 0 auto;color:var(--muted);font-size:10px}.labs-evaluation-token-legend span:before{content:"";display:inline-block;width:7px;height:7px;margin-right:5px;border-radius:2px;background:#79a7eb}.labs-evaluation-token-legend span:last-child:before{background:#8d72d9}.labs-evaluation-chart{overflow:hidden;border:1px solid color-mix(in srgb,var(--text) 10%,transparent);border-radius:12px;background:linear-gradient(145deg,color-mix(in srgb,var(--text) 3%,transparent),transparent 62%),var(--panel);padding:16px;display:grid;gap:18px}.labs-evaluation-chart>header{align-items:flex-start}.labs-evaluation-chart>header>div:first-child{min-width:0}.labs-evaluation-chart h4{font-size:13px;font-weight:650}.labs-evaluation-chart header p{max-width:420px;font-size:10px;line-height:1.45}.labs-evaluation-direction{flex:0 0 auto;border:1px solid var(--border);border-radius:999px;color:var(--muted);padding:3px 7px;font-size:9px;white-space:nowrap}.labs-evaluation-chart-series{display:grid;gap:10px}.labs-evaluation-chart-row{display:grid;gap:7px;font-size:13px}.labs-evaluation-chart-track{height:9px;border-radius:999px;background:color-mix(in srgb,var(--text) 6%,transparent);overflow:hidden}.labs-evaluation-chart-track>span{display:block;height:100%;border-radius:inherit;background:#7e8795}.labs-evaluation-chart-row[data-series-index="1"] .labs-evaluation-chart-track>span{background:#67a8ff}.labs-model-benchmark-controls{justify-content:flex-end;padding-top:2px}.labs-model-benchmark-model{display:grid;gap:5px;margin-right:auto}.labs-model-benchmark-model span,.labs-model-benchmark-model small{color:var(--muted);font-size:11px}.labs-model-benchmark-model select{min-width:220px}.labs-model-benchmark-controls label{display:grid;gap:5px;color:var(--muted);font-size:12px}.labs-model-benchmark-controls select{min-width:130px}.labs-model-benchmark-running{border:1px solid var(--border);background:transparent;color:inherit;border-radius:10px;padding:12px 14px;display:flex;justify-content:space-between;gap:12px;text-align:left;cursor:pointer}.labs-benchmark-progress{display:grid;gap:16px}.labs-benchmark-efficiency-summary{display:grid;gap:5px;border-bottom:1px solid var(--border);background:color-mix(in srgb,var(--blue) 7%,var(--panel));padding:15px 16px}.labs-benchmark-efficiency-summary strong{font-size:17px;font-weight:650}.labs-benchmark-efficiency-summary p{max-width:720px;margin:0;color:var(--muted);font-size:11px;line-height:1.55}.labs-benchmark-progress>header,.labs-benchmark-progress ol{display:flex;align-items:center;justify-content:space-between;gap:12px}.labs-benchmark-progress>header h3{margin:0}.labs-benchmark-progress>header strong{color:var(--muted);font-size:12px}.labs-benchmark-progress-track{height:7px;overflow:hidden;border-radius:999px;background:var(--panel-soft)}.labs-benchmark-progress-track>span{display:block;height:100%;border-radius:inherit;background:var(--blue)}.labs-benchmark-progress ol{margin:0;padding:0;list-style:none}.labs-benchmark-progress li{display:grid;justify-items:center;gap:7px;color:var(--muted);font-size:11px;text-transform:capitalize}.labs-benchmark-progress li>span{width:9px;height:9px;border:1px solid var(--border);border-radius:50%;background:var(--panel-soft)}.labs-benchmark-progress li.complete>span,.labs-benchmark-progress li.active>span{border-color:var(--blue);background:var(--blue)}.labs-benchmark-progress li.active{color:var(--text);font-weight:650}.labs-benchmark-attempt-charts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.labs-benchmark-line-chart{display:grid;gap:12px;border:1px solid var(--border);border-radius:10px;padding:14px}.labs-benchmark-line-chart header,.labs-benchmark-line-chart header div{display:flex;align-items:center;justify-content:space-between;gap:10px}.labs-benchmark-line-chart h4{margin:0}.labs-benchmark-line-chart header span{color:var(--muted);font-size:10px}.labs-benchmark-line-chart header span:first-child:before,.labs-benchmark-line-chart header span:last-child:before{content:"";display:inline-block;width:7px;height:2px;margin-right:4px;vertical-align:middle;background:var(--muted)}.labs-benchmark-line-chart header span:last-child:before{background:var(--blue)}.labs-benchmark-line-chart svg{width:100%;height:150px;overflow:visible}.labs-benchmark-line-chart svg line{stroke:var(--border);stroke-width:.5}.labs-benchmark-line-chart svg polyline{fill:none;vector-effect:non-scaling-stroke;stroke-width:2}.labs-benchmark-line-chart svg .baseline{stroke:var(--muted)}.labs-benchmark-line-chart svg .candidate{stroke:var(--blue)}.labs-benchmark-line-chart svg circle.baseline{fill:var(--muted)}.labs-benchmark-line-chart svg circle.candidate{fill:var(--blue)}.labs-benchmark-attempt-table td:first-child{min-width:220px}@media(max-width:760px){.labs-evaluation-comparison,.labs-model-evaluation-detail>.labs-evaluation-comparison{grid-template-columns:1fr}.labs-benchmark-attempt-charts{grid-template-columns:1fr}.labs-model-benchmark-heading,.labs-model-benchmark-result-row,.labs-model-benchmark-controls{align-items:stretch;flex-direction:column}}.labs-model-compare-dialog{width:min(980px,calc(100vw - 40px));max-height:min(860px,calc(100vh - 40px));overflow:hidden}.labs-model-compare-dialog>header{grid-template-columns:minmax(0,1fr) auto}.labs-model-compare-body{display:grid;min-height:0;gap:18px;overflow:auto;padding:0 20px 20px}.labs-model-compare-selectors,.labs-model-compare-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.labs-model-compare-selectors label{display:grid;gap:6px;color:var(--text-secondary);font-size:11px}.labs-model-compare-selectors select{width:100%;min-width:0;border:1px solid var(--border);border-radius:7px;outline:none;background:var(--bg);color:var(--text);padding:8px 9px;font:inherit;font-size:11px}.labs-model-compare-facts article{display:grid;gap:14px;border:1px solid var(--border-subtle);border-radius:12px;background:var(--panel);padding:14px}.labs-model-compare-facts article>header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.labs-model-compare-facts article>header>div{display:grid;min-width:0;gap:3px}.labs-model-compare-facts article>header span{overflow:hidden;color:var(--text-secondary);font-size:10px;text-overflow:ellipsis;white-space:nowrap}.labs-model-compare-facts article>header .training-button{flex:0 0 auto;white-space:nowrap}.labs-model-compare-facts dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));margin:0;gap:1px;overflow:hidden;border:1px solid var(--border-subtle);border-radius:8px;background:var(--border-subtle)}.labs-model-compare-facts dl>div{display:grid;gap:4px;background:var(--panel);padding:10px}.labs-model-compare-facts dt{color:var(--text-secondary);font-size:9px}.labs-model-compare-facts dd{margin:0;font-size:12px;font-weight:600}@media(max-width:760px){.labs-model-compare-selectors,.labs-model-compare-facts{grid-template-columns:1fr}}
|