openpond 0.0.34 → 0.0.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. package/dist/chunks/{app-layer-UQQNF5VZ.js → app-layer-GUF2CKYH.js} +3 -3
  2. package/dist/chunks/{apps-7NSC56K5.js → apps-DIVHAUOV.js} +3 -3
  3. package/dist/chunks/{chunk-MMDKFTJB.js → chunk-2GV3QBBZ.js} +1 -1
  4. package/dist/chunks/{chunk-BZPAW4JY.js → chunk-2I5TZW66.js} +918 -527
  5. package/dist/chunks/{chunk-TF234YN4.js → chunk-4Y25BACE.js} +1 -1
  6. package/dist/chunks/{chunk-ZRNFOHFH.js → chunk-CRFB72X2.js} +3 -3
  7. package/dist/chunks/{chunk-ZDEBKTWR.js → chunk-EY52SLOQ.js} +1 -1
  8. package/dist/chunks/{chunk-EBCLEJRO.js → chunk-FRPL5XPX.js} +1 -1
  9. package/dist/chunks/{chunk-UASXM3RR.js → chunk-GUGFYXFS.js} +4 -4
  10. package/dist/chunks/{chunk-5MM3P5KY.js → chunk-II2ERA2H.js} +2 -2
  11. package/dist/chunks/{chunk-V7SHAMUN.js → chunk-LUA5QGQP.js} +33 -33
  12. package/dist/chunks/{chunk-E3RLJ5XT.js → chunk-NTRTK6C6.js} +2 -2
  13. package/dist/chunks/{chunk-F6FFL3AA.js → chunk-RLQGMSW7.js} +2 -2
  14. package/dist/chunks/{chunk-JVTACGKD.js → chunk-S3VA47DG.js} +3 -3
  15. package/dist/chunks/{chunk-G7XOSECC.js → chunk-SECNDLPQ.js} +966 -528
  16. package/dist/chunks/{chunk-2GCNPJMD.js → chunk-TXJ4TIDO.js} +1 -1
  17. package/dist/chunks/{chunk-B5CFIWWU.js → chunk-XIF53VR3.js} +1 -1
  18. package/dist/chunks/{chunk-U4TUOBXO.js → chunk-YPK2W34Z.js} +1 -1
  19. package/dist/chunks/{chunk-HGZ3O4TS.js → chunk-ZZOTKXRD.js} +2 -2
  20. package/dist/chunks/{cli-VEDK2B42.js → cli-3AEIYSMD.js} +6 -6
  21. package/dist/chunks/{cli-4ETE5RS2.js → cli-HUVI6ELM.js} +4 -4
  22. package/dist/chunks/{core-commands-J3IQGQOL.js → core-commands-2HUTKFHQ.js} +4 -4
  23. package/dist/chunks/{extend-3F3LLDOF.js → extend-PAJMXYKV.js} +9 -9
  24. package/dist/chunks/{harness-JER7P6MJ.js → harness-UWAS2VAN.js} +3 -3
  25. package/dist/chunks/{help-75NFCYJ4.js → help-M7D2XAOX.js} +1 -1
  26. package/dist/chunks/{opchat-UT5V7MR2.js → opchat-FQ2CJVM6.js} +5 -5
  27. package/dist/chunks/{organizations-ERKRLVNQ.js → organizations-L5N6LJ7O.js} +4 -4
  28. package/dist/chunks/{profile-A3CUSDIF.js → profile-KH5IKVNY.js} +7 -7
  29. package/dist/chunks/{project-agent-FCV5HPYT.js → project-agent-F4NHVRGY.js} +6 -6
  30. package/dist/chunks/{sandbox-command-L2QPIWZ5.js → sandbox-command-DDXRQNB6.js} +4 -4
  31. package/dist/chunks/{sandbox-template-XOIWROEK.js → sandbox-template-5EEEQKR5.js} +5 -5
  32. package/dist/chunks/{src-V4FUQNHR.js → src-34FV42HE.js} +27227 -24056
  33. package/dist/chunks/{src-ENVQ7ARM.js → src-LHZWUSD7.js} +2 -2
  34. package/dist/chunks/{teams-bot-OR3ZJHQ5.js → teams-bot-HFWO5GOV.js} +3 -3
  35. package/dist/chunks/{workspaces-L73SRLPA.js → workspaces-LO44JAC2.js} +2 -2
  36. package/dist/cli.js +10 -10
  37. package/dist/web/assets/AppDialog-T3j6O3yg.js +1 -0
  38. package/dist/web/assets/{AppsView-CLjjVkjr.js → AppsView-70Qqf9eJ.js} +1 -1
  39. package/dist/web/assets/{BrowserSidebar-CkNO8723.js → BrowserSidebar-CdBLHdNW.js} +1 -1
  40. package/dist/web/assets/CloudWorkView-C5-jvlOo.js +1 -0
  41. package/dist/web/assets/{CommandMenu-DWtdkvmq.js → CommandMenu-B3Y4MvmT.js} +1 -1
  42. package/dist/web/assets/CommunityView-BHUJ9Hun.js +1 -0
  43. package/dist/web/assets/ComposerCreateImproveStrip-DeRI5XEO.js +1 -0
  44. package/dist/web/assets/GetStartedView-CIXScviw.js +1 -0
  45. package/dist/web/assets/GetStartedView-DBLdduwr.css +1 -0
  46. package/dist/web/assets/LabsRoute-Cs_R1fuu.js +3 -0
  47. package/dist/web/assets/MainChatThread-h7VSA_Rc.js +2 -0
  48. package/dist/web/assets/MakeAgentTutorialLearningPanel-r7jyZVc0.js +2 -0
  49. package/dist/web/assets/MarkdownText-E35C404I.js +7 -0
  50. package/dist/web/assets/Messages-BANZuAnA.js +10 -0
  51. package/dist/web/assets/NativeSkillSidebar-Qgccncuc.js +1 -0
  52. package/dist/web/assets/NativeSkillSidebar-T8KXjnUH.css +1 -0
  53. package/dist/web/assets/{NewProjectDialog-PrbA4fL6.js → NewProjectDialog-BowacUmA.js} +1 -1
  54. package/dist/web/assets/PostTrainingLearningPanel-oJu5qaHK.js +2 -0
  55. package/dist/web/assets/PostTrainingStatusPill-B9Eoc4s0.js +1 -0
  56. package/dist/web/assets/{ProfileSettingsSection-CqnfjiCl.css → ProfileSettingsSection-Cg4tKO-C.css} +1 -1
  57. package/dist/web/assets/ProfileSettingsSection-Dnh92gDH.js +1 -0
  58. package/dist/web/assets/RightChatPanelStack-pGwbt6Wy.js +1 -0
  59. package/dist/web/assets/SettingsView-Bjehxwt1.js +6 -0
  60. package/dist/web/assets/SettingsView-uHhQnazW.css +1 -0
  61. package/dist/web/assets/TeamChatView-Tn4X5cuY.js +3 -0
  62. package/dist/web/assets/{TerminalOverlay-DaGfEprz.js → TerminalOverlay-DoX5LYzK.js} +11 -11
  63. package/dist/web/assets/TrainingCreationPanel-BLSf1Bnp.js +1 -0
  64. package/dist/web/assets/{TrainingDraftPanel-BX5CCqlO.js → TrainingDraftPanel-Da6uGu9y.js} +1 -1
  65. package/dist/web/assets/UsageSettingsSection-DKky0p47.js +59 -0
  66. package/dist/web/assets/UsageSettingsSection-O8VK0qBL.css +1 -0
  67. package/dist/web/assets/WorkspaceDiffPanel-DTRtW9n8.js +14 -0
  68. package/dist/web/assets/WorkspaceEnvironmentMenu-Ba4M8z1N.js +32 -0
  69. package/dist/web/assets/WorkspaceGitDialogs-CSepNOb8.js +1 -0
  70. package/dist/web/assets/{WorkspaceMonacoEditor-C0fDue2d.js → WorkspaceMonacoEditor-LhFdzCRs.js} +3 -3
  71. package/dist/web/assets/activity-bW02ZsBD.js +1 -0
  72. package/dist/web/assets/{boxes-CXLqRF98.js → boxes-B1dRA1pi.js} +1 -1
  73. package/dist/web/assets/chevron-up-CySy6WNq.js +1 -0
  74. package/dist/web/assets/circle-alert-DMHz5tj_.js +1 -0
  75. package/dist/web/assets/circle-x-DY8vKAKi.js +1 -0
  76. package/dist/web/assets/copy-DuHI1UZ_.js +1 -0
  77. package/dist/web/assets/{create-pipeline-request-C26NOc7v.js → create-pipeline-request-CGBcdK9r.js} +2 -2
  78. package/dist/web/assets/credit-card-Bot0OuTl.js +1 -0
  79. package/dist/web/assets/{cssMode-DmtwKUVm.js → cssMode-BIjAothW.js} +1 -1
  80. package/dist/web/assets/git-branch-Cm02aNWq.js +1 -0
  81. package/dist/web/assets/{git-commit-horizontal-CDDZl4iA.js → git-commit-horizontal-FYILXW0v.js} +1 -1
  82. package/dist/web/assets/{htmlMode-Box0EOm1.js → htmlMode-zO2xLLgL.js} +1 -1
  83. package/dist/web/assets/index-B5AN29EO.js +177 -0
  84. package/dist/web/assets/index-BnwYyUgT.js +1 -0
  85. package/dist/web/assets/index-COGlKIJ4.css +1 -0
  86. package/dist/web/assets/{info-4Iy6BKvT.js → info-DeuEU_RO.js} +1 -1
  87. package/dist/web/assets/{jsonMode-g7t_3HFv.js → jsonMode-D2A3mj4n.js} +1 -1
  88. package/dist/web/assets/{lspLanguageFeatures-CwhFOYc9.js → lspLanguageFeatures-aPSqvscU.js} +1 -1
  89. package/dist/web/assets/make-agent-tutorial-A2W9Ajwv.js +2 -0
  90. package/dist/web/assets/{monaco.contribution-CW2ctrTm.js → monaco.contribution-CHVe9CQ9.js} +2 -2
  91. package/dist/web/assets/{monaco.contribution-DGZAePHI.js → monaco.contribution-DAq6Jihl.js} +2 -2
  92. package/dist/web/assets/{monaco.contribution-CwMt3eHi.js → monaco.contribution-Do3Jjslo.js} +2 -2
  93. package/dist/web/assets/{monaco.contribution-B-QC_ls9.js → monaco.contribution-KqCt1n9-.js} +2 -2
  94. package/dist/web/assets/{monitor-DOVjBLkr.js → monitor-DXvHWFeW.js} +1 -1
  95. package/dist/web/assets/{play-DLCuESeG.js → play-BIHyH-Yu.js} +1 -1
  96. package/dist/web/assets/{python-DRNmHcYd.js → python-g3mtmU2J.js} +1 -1
  97. package/dist/web/assets/{refresh-cw-JNUovwk4.js → refresh-cw-Daz0oqwK.js} +1 -1
  98. package/dist/web/assets/{reply-D4QvJyzE.js → reply-wu9DIBuK.js} +1 -1
  99. package/dist/web/assets/rotate-cw-D7q9GgNc.js +1 -0
  100. package/dist/web/assets/{save-BR4O4UDP.js → save-BVFY6VTI.js} +1 -1
  101. package/dist/web/assets/{toggleHighContrast-CrfdWIsV.js → toggleHighContrast-D9C_WUDu.js} +1 -1
  102. package/dist/web/assets/training-1du5QD-P.css +1 -0
  103. package/dist/web/assets/{tsMode-ZuV9go1B.js → tsMode-B4lEUN5X.js} +1 -1
  104. package/dist/web/assets/upload-DNbYB4Rl.js +1 -0
  105. package/dist/web/assets/{wifi-off-XFVqsf4c.js → wifi-off-C5QLifIJ.js} +1 -1
  106. package/dist/web/assets/{workers-CJpO1Wzj.js → workers-CV4BZb_x.js} +1 -1
  107. package/dist/web/assets/{yaml-AQ4ok5ED.js → yaml-3ah8oX43.js} +1 -1
  108. package/dist/web/courses/post-training/01-how-post-training-works-poster.webp +0 -0
  109. package/dist/web/courses/post-training/01-how-post-training-works.vtt +25 -0
  110. package/dist/web/courses/post-training/02-definitions-poster.webp +0 -0
  111. package/dist/web/courses/post-training/02-definitions.vtt +117 -0
  112. package/dist/web/courses/post-training/03-on-policy-off-policy-poster.webp +0 -0
  113. package/dist/web/courses/post-training/03-on-policy-off-policy.vtt +29 -0
  114. package/dist/web/courses/post-training/04-rewards-credit-assignment-poster.webp +0 -0
  115. package/dist/web/courses/post-training/04-rewards-credit-assignment.vtt +65 -0
  116. package/dist/web/courses/post-training/05-verifiable-rewards-rlvr-poster.webp +0 -0
  117. package/dist/web/courses/post-training/05-verifiable-rewards-rlvr.vtt +69 -0
  118. package/dist/web/courses/post-training/06-ppo-grpo-poster.webp +0 -0
  119. package/dist/web/courses/post-training/06-ppo-grpo.vtt +65 -0
  120. package/dist/web/courses/post-training/07-distillation-poster.webp +0 -0
  121. package/dist/web/courses/post-training/07-distillation.vtt +53 -0
  122. package/dist/web/courses/post-training/08-opsd-sdft-sdpo-poster.webp +0 -0
  123. package/dist/web/courses/post-training/08-opsd-sdft-sdpo.vtt +61 -0
  124. package/dist/web/courses/post-training/09-credible-experiments-poster.webp +0 -0
  125. package/dist/web/courses/post-training/09-credible-experiments.vtt +69 -0
  126. package/dist/web/courses/post-training/10-technical-appendix-poster.webp +0 -0
  127. package/dist/web/courses/post-training/10-technical-appendix.vtt +69 -0
  128. package/dist/web/courses/post-training/full-course-poster.webp +0 -0
  129. package/dist/web/courses/post-training/full-course.vtt +623 -0
  130. package/dist/web/courses/post-training/scripts/script_01.md +31 -0
  131. package/dist/web/courses/post-training/scripts/script_02.md +49 -0
  132. package/dist/web/courses/post-training/scripts/script_03.md +35 -0
  133. package/dist/web/courses/post-training/scripts/script_04.md +43 -0
  134. package/dist/web/courses/post-training/scripts/script_05.md +43 -0
  135. package/dist/web/courses/post-training/scripts/script_06.md +41 -0
  136. package/dist/web/courses/post-training/scripts/script_07.md +37 -0
  137. package/dist/web/courses/post-training/scripts/script_08.md +37 -0
  138. package/dist/web/courses/post-training/scripts/script_09.md +45 -0
  139. package/dist/web/courses/post-training/scripts/script_10.md +47 -0
  140. package/dist/web/index.html +2 -2
  141. package/dist/web/tutorials/how-to-make-an-agent-create-poster.png +0 -0
  142. package/dist/web/tutorials/how-to-make-an-agent-create.vtt +49 -0
  143. package/dist/web/tutorials/how-to-make-an-agent-improve-poster.png +0 -0
  144. package/dist/web/tutorials/how-to-make-an-agent-improve.vtt +45 -0
  145. package/dist/web/tutorials/how-to-make-an-agent-poster.png +0 -0
  146. package/dist/web/tutorials/how-to-make-an-agent-use-poster.png +0 -0
  147. package/dist/web/tutorials/how-to-make-an-agent-use.vtt +33 -0
  148. package/dist/web/tutorials/how-to-make-an-agent.vtt +125 -0
  149. package/dist/web/tutorials/what-is-an-openpond-agent-poster.png +0 -0
  150. package/dist/web/tutorials/what-is-an-openpond-agent.vtt +25 -0
  151. package/package.json +1 -1
  152. package/dist/web/assets/CloudWorkView-Cu_VqkaD.js +0 -1
  153. package/dist/web/assets/CommunityView-f03qOTER.js +0 -1
  154. package/dist/web/assets/ComposerCreateImproveStrip-CZpiQJsJ.js +0 -1
  155. package/dist/web/assets/GetStartedView-C3ZrnEz5.css +0 -1
  156. package/dist/web/assets/GetStartedView-CLMmryTG.js +0 -1
  157. package/dist/web/assets/LabsRoute-BwR2g71k.js +0 -4
  158. package/dist/web/assets/ProfileSettingsSection-CD_x_V8d.js +0 -1
  159. package/dist/web/assets/SettingsView-BMmlKvlB.js +0 -63
  160. package/dist/web/assets/SettingsView-CAPf81v3.css +0 -1
  161. package/dist/web/assets/TeamChatView-B5SlhDso.js +0 -3
  162. package/dist/web/assets/TrainingComputeDialog-BFY6E0yU.js +0 -1
  163. package/dist/web/assets/TrainingCreationPanel-Cp66gMed.js +0 -1
  164. package/dist/web/assets/WorkspaceDiffPanel-D7ZEbryF.js +0 -14
  165. package/dist/web/assets/WorkspaceEnvironmentMenu-D4DmAJaS.js +0 -32
  166. package/dist/web/assets/WorkspaceGitDialogs-DHOfJxbL.js +0 -1
  167. package/dist/web/assets/index-8H-GDlM5.css +0 -1
  168. package/dist/web/assets/index-BUyeKpY6.js +0 -1
  169. package/dist/web/assets/index-CKmte5ok.js +0 -192
  170. package/dist/web/assets/training-DeVTd0m8.css +0 -1
  171. package/dist/web/assets/useComputeSettings-DUNS6uOl.js +0 -1
  172. package/dist/web/assets/useComputeSettings-R2Sw621I.css +0 -1
@@ -1 +0,0 @@
1
- import{d as G,r as x,m,j as e,V as H,w as T,h as z,ai as C,ao as D,X as $,ay as U}from"./index-CKmte5ok.js";import{G as P}from"./git-commit-horizontal-CDDZl4iA.js";import{P as q}from"./play-DLCuESeG.js";import{R as B}from"./refresh-cw-JNUovwk4.js";/* empty css */const _=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],W=G("rotate-ccw",_),V=5e3;function Q(s){const[a,t]=x.useState([]),[l,n]=x.useState(!1),[o,c]=x.useState(null),[d,p]=x.useState(()=>new Set);x.useEffect(()=>{if(!s){t([]),c(null),n(!1);return}let i=!1,r=null;async function f(b){if(!(!s||i)){b&&n(!0);try{const y=await m.localAgentSchedules(s);if(i)return;t(y.schedules),c(null)}catch(y){i||c(S(y))}finally{!i&&b&&n(!1)}}}return f(!0),r=window.setInterval(()=>{f(!1)},V),()=>{i=!0,r!==null&&window.clearInterval(r)}},[s]);async function j(){if(s){n(!0);try{const i=await m.syncLocalAgentSchedules(s);t(i.schedules),c(null)}catch(i){c(S(i))}finally{n(!1)}}}async function g(i){if(!(!s||d.has(i.id))){h(i.id,!0);try{await m.runLocalAgentSchedule(s,i.id);const r=await m.localAgentSchedules(s);t(r.schedules),c(null)}catch(r){c(S(r))}finally{h(i.id,!1)}}}async function u(i){if(!(!s||d.has(i.id))){h(i.id,!0);try{await m.patchLocalAgentSchedule(s,i.id,{enabled:!i.enabled});const r=await m.localAgentSchedules(s);t(r.schedules),c(null)}catch(r){c(S(r))}finally{h(i.id,!1)}}}function h(i,r){p(f=>{const b=new Set(f);return r?b.add(i):b.delete(i),b})}return{error:o,loading:l,pendingScheduleIds:d,refresh:j,run:g,schedules:a,toggle:u}}function S(s){return s instanceof Error?s.message:String(s)}function X({connection:s,profile:a,selectedDefaultTeamId:t}){const l=Q(s);return e.jsxs("div",{className:"account-list profile-agent-list","aria-label":"Profile agents",children:[e.jsxs("div",{className:"account-list-heading profile-agent-list-heading",children:[e.jsx("span",{children:"Agents"}),e.jsx("div",{className:"profile-skill-heading-actions",children:e.jsx("small",{children:Y(l.schedules.length,l.loading)})})]}),a.agents.length||l.schedules.length?e.jsx("div",{className:"profile-agent-table-frame",children:e.jsxs("table",{className:"profile-agent-table","aria-label":"Profile agents table",children:[e.jsxs("colgroup",{children:[e.jsx("col",{className:"profile-agent-column"}),e.jsx("col",{className:"profile-action-column"}),e.jsx("col",{className:"profile-check-column"}),e.jsx("col",{className:"profile-sync-column"})]}),e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{scope:"col",children:"Agent"}),e.jsx("th",{scope:"col",children:"Action"}),e.jsx("th",{scope:"col",children:"Check"}),e.jsx("th",{scope:"col",children:"Sync"})]})}),e.jsxs("tbody",{children:[a.agents.map(n=>e.jsx(J,{agent:n,defaultAction:a.summary.defaultAction,profile:a,selectedDefaultTeamId:t},n.id)),l.schedules.map(n=>e.jsx(K,{pending:l.pendingScheduleIds.has(n.id),schedule:n,refreshing:l.loading,onRefresh:()=>{l.refresh()},onRun:()=>{l.run(n)},onToggle:()=>{l.toggle(n)}},n.id))]})]})}):e.jsxs("div",{className:"empty-account-list",children:[e.jsx("strong",{children:"No profile agents found"}),e.jsx("span",{children:"Create an agent, then run Profile checks to add it to the catalog."})]}),l.error?e.jsxs("div",{className:"profile-footline warning profile-agent-list-note",children:["Local schedules: ",l.error]}):null]})}function J({agent:s,defaultAction:a,profile:t,selectedDefaultTeamId:l}){const n=se(t,s,l);return e.jsxs("tr",{className:"profile-agent-row",children:[e.jsx("td",{children:e.jsxs("div",{className:"profile-agent-identity",children:[e.jsx(H,{size:18}),e.jsxs("div",{children:[e.jsx("strong",{children:s.name}),e.jsx("span",{title:s.path,children:s.path})]})]})}),e.jsx("td",{children:e.jsx("div",{className:"profile-agent-action",children:e.jsx("span",{children:a??"None"})})}),e.jsx("td",{children:e.jsx(A,{status:n.check})}),e.jsx("td",{children:e.jsx(A,{status:n.sync})})]})}function K({pending:s,refreshing:a,schedule:t,onRefresh:l,onRun:n,onToggle:o}){const c=Z(t),d=t.enabled?"Pause schedule":"Resume schedule";return e.jsxs("tr",{className:"profile-agent-row profile-schedule-agent-row",children:[e.jsx("td",{children:e.jsxs("div",{className:"profile-agent-identity",children:[e.jsx(H,{size:18}),e.jsxs("div",{children:[e.jsx("strong",{children:t.localProjectName}),e.jsxs("span",{title:t.scheduleName,children:["schedule: ",t.scheduleName]})]})]})}),e.jsx("td",{children:e.jsx("div",{className:"profile-agent-action",children:e.jsx("span",{title:t.targetAction,children:t.targetAction})})}),e.jsx("td",{children:e.jsx(A,{status:c})}),e.jsx("td",{children:e.jsxs("div",{className:"profile-schedule-actions",children:[e.jsx("span",{className:"profile-schedule-expression",title:ee(t),children:t.enabled?t.scheduleExpression:"Paused"}),e.jsxs("div",{className:"profile-schedule-controls","aria-label":`${t.scheduleName} schedule controls`,children:[e.jsx("button",{className:"settings-icon-button profile-schedule-button",disabled:a,type:"button",title:"Refresh local schedules","aria-label":"Refresh local schedules",onClick:l,children:e.jsx(B,{size:14,className:a?"settings-spin":void 0})}),e.jsx("button",{className:"settings-icon-button profile-schedule-button",disabled:s,type:"button",title:"Run now","aria-label":`Run ${t.scheduleName} now`,onClick:n,children:e.jsx(W,{size:14})}),e.jsx("button",{className:"settings-icon-button profile-schedule-button",disabled:s,type:"button",title:d,"aria-label":`${d}: ${t.scheduleName}`,onClick:o,children:t.enabled?e.jsx(T,{size:14}):e.jsx(q,{size:14})})]})]})})]})}function A({status:s}){return e.jsx("span",{className:`profile-status-text ${s.state}`,children:s.label})}function Y(s,a){return a&&s===0?"Loading schedules":a?`${s} scheduled, refreshing`:s===1?"1 scheduled":s>1?`${s} scheduled`:"No schedules"}function Z(s){return s.enabled?s.lastError||s.lastRunStatus==="failed"?{state:"warning",label:"Failed"}:s.lastRunStatus==="running"?{state:"loading",label:"Running"}:s.lastRunStatus==="queued"?{state:"loading",label:"Queued"}:s.lastRunStatus==="skipped"?{state:"warning",label:"Skipped"}:s.lastRunStatus==="succeeded"?{state:"ready",label:"Succeeded"}:{state:"loading",label:"Scheduled"}:{state:"disabled",label:"Paused"}}function ee(s){const a=[`${s.scheduleType}: ${s.scheduleExpression}`];return s.nextRunAt&&a.push(`next ${R(s.nextRunAt)}`),s.lastRunAt&&a.push(`last ${R(s.lastRunAt)}`),a.join(" - ")}function R(s){const a=new Date(s);return Number.isFinite(a.getTime())?a.toLocaleString(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}):s}function se(s,a,t){if(!a.enabled)return{check:{state:"disabled",label:"Disabled"},sync:{state:"disabled",label:"Disabled"}};if(s.error)return{check:{state:"warning",label:"Error"},sync:{state:"warning",label:"Blocked"}};if(s.setupGate.blockingCount>0)return{check:{state:"warning",label:"Setup"},sync:{state:"warning",label:"Blocked"}};if(s.git?.dirty||ae(s,a)>0)return{check:{state:"loading",label:"Pending"},sync:{state:"warning",label:"Changed"}};if(s.catalog.stale)return{check:{state:"loading",label:"Stale"},sync:{state:"loading",label:"Waiting"}};if(!s.lastCheck)return{check:{state:"loading",label:"Unchecked"},sync:{state:"loading",label:"Waiting"}};if(s.lastCheck.status==="failed")return{check:{state:"warning",label:"Failed"},sync:{state:"warning",label:"Blocked"}};if(!s.summary.checkFresh)return{check:{state:"loading",label:"Stale"},sync:{state:"loading",label:"Waiting"}};if(te(s,t))return{check:{state:"ready",label:"Passed"},sync:{state:"warning",label:"Sync acct"}};const l=s.summary.localHead??s.git?.head??null,n=s.hosted?.lastPushedLocalHead??null;return!(s.summary.hostedHead??s.hosted?.sourceCommitSha??null)&&!n?{check:{state:"ready",label:"Passed"},sync:{state:"loading",label:"Not synced"}}:l&&n&&l!==n?{check:{state:"ready",label:"Passed"},sync:{state:"loading",label:"Needed"}}:{check:{state:"ready",label:"Passed"},sync:{state:"ready",label:"Synced"}}}function te(s,a){const t=s.hosted?.teamId?.trim()??"";return!!(t&&a&&t!==a)}function ae(s,a){let t=0;s.diff.changedAgents.includes(a.id)&&(t+=1),s.diff.newAgents.includes(a.id)&&(t+=1),s.diff.deletedAgents.includes(a.id)&&(t+=1);const l=a.path.replace(/^profiles\/[^/]+\//,"");for(const n of s.diff.files){const o=n.path.replace(/^profiles\/[^/]+\//,"");(o===l||o.startsWith(`${l}/`)||o.startsWith(`agents/${a.id}/`))&&(t+=1)}return t}function be({section:s="all",payload:a,connection:t,onPayload:l,onError:n,onToast:o,onSkillCommand:c,overviewContent:d}){const[p,j]=x.useState(""),[g,u]=x.useState(null),h=a?.profile??null,i=a?.preferences.defaultTeamId?.trim()||"",r=s==="all"||s==="profile"||s==="controls",f=s==="all"||s==="agents",b=s==="all"||s==="profile";async function y(w){t&&(l(await m.bootstrap(t)),o?.(w,"success"))}async function v(w,O){if(!(!t||g)){u(w),n(null);try{await O()}catch(k){n(k instanceof Error?k.message:String(k))}finally{u(null)}}}function M(){v("init",async()=>{await m.profileInit(t,{}),await y("Profile initialized")})}function F(){v("commit",async()=>{await m.profileCommit(t,{message:p.trim()||null}),j(""),await y("Profile commit complete")})}function I(){v("push",async()=>{if(!i)throw new Error("Select a default team before syncing a hosted profile.");await m.profileCheck(t,{kind:"all"}),await m.profilePush(t,{teamId:i,ensureHosted:!0,message:null}),await y("Profile synced to hosted profile repo")})}return e.jsx("section",{className:"account-settings",children:h?.mode==="local"?e.jsxs(e.Fragment,{children:[r?e.jsxs(e.Fragment,{children:[e.jsx(ne,{connection:t,profile:h,profileBusy:g,profileCommitMessage:p,selectedDefaultTeamId:i,syncDisabledReason:ue(h,i),setProfileCommitMessage:j,submitProfileCommit:F,submitProfilePush:I}),d]}):null,f?e.jsx(X,{connection:t,profile:h,selectedDefaultTeamId:i}):null,b?e.jsx(ce,{onSkillCommand:c,profile:h}):null]}):s==="agents"?e.jsxs("div",{className:"account-list",children:[e.jsxs("div",{className:"account-list-heading",children:[e.jsx("span",{children:"Agents"}),e.jsx("small",{children:"Profile required"})]}),e.jsxs("div",{className:"empty-account-list",children:[e.jsx("strong",{children:"No local Profile loaded"}),e.jsx("span",{children:"Open the Profile tab to create or load a Profile before managing agents."})]})]}):e.jsxs("div",{className:"account-list",children:[e.jsxs("div",{className:"account-list-heading",children:[e.jsx("span",{children:"Summary"}),e.jsx("small",{children:"Not loaded"})]}),e.jsxs("div",{className:"empty-account-list",children:[e.jsx("strong",{children:"No local profile loaded"}),e.jsx("span",{children:"OpenPond uses one Git-backed Profile in the default repo."}),e.jsxs("button",{className:"settings-secondary",disabled:!t||!!g,type:"button",onClick:M,children:[e.jsx(z,{size:14}),e.jsx("span",{children:g==="init"?"Creating":"Create default Profile"})]})]})]})})}function ne({connection:s,profile:a,profileBusy:t,profileCommitMessage:l,selectedDefaultTeamId:n,syncDisabledReason:o,setProfileCommitMessage:c,submitProfileCommit:d,submitProfilePush:p}){const[j,g]=x.useState(!1),[u,h]=x.useState(!1),[i,r]=x.useState(!1),f=!s||!!t;return e.jsxs("div",{className:"profile-control-panel",children:[e.jsxs("div",{className:"profile-control-toolbar",children:[e.jsxs("div",{className:"profile-control-actions",children:[e.jsxs("button",{className:"settings-secondary",disabled:f,type:"button",onClick:()=>h(!0),children:[e.jsx(P,{size:14}),e.jsx("span",{children:t==="commit"?"Committing":"Commit"})]}),e.jsxs("button",{className:"settings-secondary",disabled:f||!a,type:"button",onClick:()=>r(!0),children:[e.jsx(C,{size:14}),e.jsx("span",{children:t==="push"?"Syncing":"Sync"})]}),e.jsxs("button",{className:"settings-secondary",disabled:!!t||!a,type:"button",onClick:()=>g(!0),children:[e.jsx(D,{size:14}),e.jsx("span",{children:"Repo"})]}),a?e.jsxs("span",{className:"profile-hosted-status",title:`Hosted profile status: ${L(a,n)}`,children:[e.jsx(C,{size:14}),e.jsx("span",{children:"Hosted"}),e.jsx("strong",{children:L(a,n)})]}):null]}),a?e.jsx("span",{className:`profile-local-status ${a.summary.state}`,title:a.summary.message,children:a.summary.message}):null]}),j&&a?e.jsx(oe,{profile:a,profileBusy:t,onClose:()=>g(!1)}):null,u?e.jsx(le,{disabled:f,profileBusy:t,profileCommitMessage:l,setProfileCommitMessage:c,submitProfileCommit:d,onClose:()=>h(!1)}):null,i&&a?e.jsx(ie,{disabled:f,profile:a,profileBusy:t,selectedDefaultTeamId:n,syncDisabledReason:o,submitProfilePush:p,onClose:()=>r(!1)}):null]})}function le({disabled:s,profileBusy:a,profileCommitMessage:t,setProfileCommitMessage:l,submitProfileCommit:n,onClose:o}){function c(d){d.preventDefault(),!s&&(n(),o())}return e.jsx("div",{className:"git-dialog-backdrop",role:"presentation",onMouseDown:o,children:e.jsxs("form",{className:"git-dialog profile-commit-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"profile-commit-dialog-title",onMouseDown:d=>d.stopPropagation(),onSubmit:c,children:[e.jsx("button",{className:"git-dialog-close",disabled:!!a,type:"button",title:"Close","aria-label":"Close",onClick:o,children:e.jsx($,{size:14})}),e.jsx("div",{className:"git-dialog-icon",children:e.jsx(P,{size:18})}),e.jsx("h2",{id:"profile-commit-dialog-title",children:"Commit profile"}),e.jsxs("label",{className:"git-dialog-field",children:[e.jsx("span",{children:"Commit message"}),e.jsx("input",{autoFocus:!0,value:t,disabled:!!a,placeholder:"Update OpenPond profile",onChange:d=>l(d.target.value)})]}),e.jsxs("div",{className:"git-dialog-footer",children:[e.jsx("button",{className:"git-dialog-secondary",disabled:!!a,type:"button",onClick:o,children:"Cancel"}),e.jsxs("button",{className:"git-dialog-primary",disabled:s,type:"submit",children:[e.jsx(P,{size:14}),e.jsx("span",{children:a==="commit"?"Committing":"Commit"})]})]})]})})}function ie({disabled:s,profile:a,profileBusy:t,selectedDefaultTeamId:l,syncDisabledReason:n,submitProfilePush:o,onClose:c}){const d=he(a,l),p=d.reduce((u,h)=>u+h.count,0),j=!s&&!n;function g(u){u.preventDefault(),j&&(o(),c())}return e.jsx("div",{className:"git-dialog-backdrop",role:"presentation",onMouseDown:c,children:e.jsxs("form",{className:"git-dialog profile-sync-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"profile-sync-dialog-title",onMouseDown:u=>u.stopPropagation(),onSubmit:g,children:[e.jsx("button",{className:"git-dialog-close",disabled:!!t,type:"button",title:"Close","aria-label":"Close",onClick:c,children:e.jsx($,{size:14})}),e.jsx("div",{className:"git-dialog-icon",children:e.jsx(C,{size:18})}),e.jsx("h2",{id:"profile-sync-dialog-title",children:"Sync profile"}),e.jsxs("div",{className:"profile-dialog-summary",children:[e.jsxs("strong",{children:[p," ",p===1?"item":"items"," out of sync"]}),e.jsxs("span",{children:["Local ",N(a.summary.localHead??a.git?.head)," - Last pushed"," ",N(a.hosted?.lastPushedLocalHead)]})]}),d.length?e.jsx("div",{className:"profile-dialog-diff-list","aria-label":"Profile sync differences",children:d.map(u=>e.jsxs("div",{className:`profile-dialog-diff-row ${u.tone??""}`,children:[e.jsx("strong",{children:u.label}),e.jsx("span",{children:u.detail})]},u.label))}):e.jsx("div",{className:"profile-dialog-diff-list","aria-label":"Profile sync differences",children:e.jsxs("div",{className:"profile-dialog-diff-row",children:[e.jsx("strong",{children:"Aligned"}),e.jsx("span",{children:"Current local profile source has already been pushed."})]})}),n?e.jsx("div",{className:"profile-dialog-warning",children:n}):null,e.jsxs("div",{className:"git-dialog-footer",children:[e.jsx("button",{className:"git-dialog-secondary",disabled:!!t,type:"button",onClick:c,children:"Cancel"}),e.jsxs("button",{className:"git-dialog-primary",disabled:!j,type:"submit",children:[e.jsx(C,{size:14}),e.jsx("span",{children:t==="push"?"Syncing":"Confirm sync"})]})]})]})})}function oe({profile:s,profileBusy:a,onClose:t}){return e.jsx("div",{className:"git-dialog-backdrop",role:"presentation",onMouseDown:t,children:e.jsxs("div",{className:"git-dialog profile-path-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"profile-path-dialog-title",onMouseDown:l=>l.stopPropagation(),children:[e.jsx("button",{className:"git-dialog-close",disabled:!!a,type:"button",title:"Close","aria-label":"Close",onClick:t,children:e.jsx($,{size:14})}),e.jsx("div",{className:"git-dialog-icon",children:e.jsx(D,{size:18})}),e.jsx("h2",{id:"profile-path-dialog-title",children:"Profile repo"}),e.jsxs("label",{className:"git-dialog-field",children:[e.jsx("span",{children:"Profile repo path"}),e.jsx("input",{"aria-label":"Profile repo path",readOnly:!0,value:s.repoPath??""})]}),e.jsxs("div",{className:"profile-dialog-summary",children:[e.jsx("strong",{children:s.git?.isRepo?"Git-backed":"Git setup required"}),e.jsxs("span",{children:[s.git?.branch??"No branch"," · ",N(s.git?.head)]})]}),e.jsx("div",{className:"git-dialog-footer",children:e.jsx("button",{className:"git-dialog-secondary",disabled:!!a,type:"button",onClick:t,children:"Close"})})]})})}function ce({onSkillCommand:s,profile:a}){const t=a.skills.slice().sort((o,c)=>o.name.localeCompare(c.name)),l=!s;function n(o){s?.(o)}return e.jsxs("div",{className:"account-list profile-skill-list",children:[e.jsxs("div",{className:"account-list-heading profile-agent-list-heading",children:[e.jsx("span",{children:"Skills"}),e.jsxs("div",{className:"profile-skill-heading-actions",children:[e.jsxs("small",{children:[a.skillCatalog.skillCount," tracked"]}),e.jsxs("button",{className:"settings-secondary",disabled:l,type:"button",title:"Create profile skill",onClick:()=>n("/skill create "),children:[e.jsx(z,{size:14}),e.jsx("span",{children:"Create"})]})]})]}),t.length?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"profile-skill-table-head","aria-hidden":"true",children:[e.jsx("span",{children:"Skill"}),e.jsx("span",{children:"Trigger"}),e.jsx("span",{children:"Status"}),e.jsx("span",{children:"Source"}),e.jsx("span",{children:"Actions"})]}),t.map(o=>e.jsx(de,{commandDisabled:l,onSkillCommand:n,skill:o},o.name))]}):e.jsxs("div",{className:"empty-account-list",children:[e.jsx("strong",{children:"No profile skills found"}),e.jsx("span",{children:"Use /skill create to add reusable profile instructions."})]})]})}function de({commandDisabled:s,onSkillCommand:a,skill:t}){const l=t.validationStatus==="valid"?{state:"ready",label:"valid"}:{state:"warning",label:t.validationStatus};return e.jsxs("div",{className:"product-row profile-skill-row",children:[e.jsxs("div",{className:"profile-agent-identity",children:[e.jsx(U,{size:18}),e.jsxs("div",{children:[e.jsx("strong",{children:t.name}),e.jsx("span",{title:t.path,children:t.path})]})]}),e.jsx("div",{className:"profile-skill-description",title:t.description,children:t.description||"No description"}),e.jsx(re,{status:l}),e.jsx("div",{className:"profile-agent-action",children:e.jsx("span",{title:t.sourcePath,children:t.sourcePath})}),e.jsxs("div",{className:"profile-skill-actions",children:[e.jsx("button",{className:"settings-secondary compact",disabled:s||!t.enabled,type:"button",title:`Use ${t.name}`,onClick:()=>a(`$${t.name} `),children:e.jsx("span",{children:"Use"})}),e.jsx("button",{className:"settings-secondary compact",disabled:s,type:"button",title:`Edit ${t.name}`,onClick:()=>a(`/skill edit ${t.name} `),children:e.jsx("span",{children:"Edit"})})]})]})}function re({status:s}){return e.jsx("span",{className:`profile-status-text ${s.state}`,children:s.label})}function N(s){return s?s.slice(0,10):"None"}function L(s,a){return E(s,a)?"Sync this account":s.hosted?.sourceCommitSha?`${s.hosted.promotionStatus??"uploaded"} ${N(s.hosted.sourceCommitSha)}`:"Not pushed"}function ue(s,a){return a?s.git?.head?s.git.dirty?"Commit local profile changes before syncing.":null:"Commit the profile before syncing.":"Select a default team before syncing."}function he(s,a){const t=[],l=s.summary.localHead??s.git?.head??null,n=s.hosted?.lastPushedLocalHead??null,o=s.summary.hostedHead??s.hosted?.sourceCommitSha??null;if(E(s,a)&&t.push({label:"Account",detail:"Hosted profile metadata was synced under a different default team.",count:1,tone:"warning"}),!o&&!n?t.push({label:"Hosted source",detail:"No hosted profile commit has been recorded.",count:1}):l&&n&&l!==n&&t.push({label:"Commit",detail:`Local ${N(l)} has not been pushed since ${N(n)}.`,count:1}),s.git?.dirty){const d=s.git.files.length||s.diff.files.length||1;t.push({label:"Uncommitted files",detail:`${d} local ${d===1?"file":"files"} changed.`,count:d,tone:"warning"})}const c=s.diff.changedAgents.length+s.diff.newAgents.length+s.diff.deletedAgents.length+s.diff.changedSkills.length+s.diff.changedActions.length+s.diff.changedExtensions.length+s.diff.setupChanges.length+s.diff.envRequirementChanges.length;return c>0&&t.push({label:"Profile changes",detail:ge(s),count:c,tone:s.git?.dirty?"warning":void 0}),s.catalog.stale&&t.push({label:"Catalog",detail:"Action catalog artifacts are stale or missing.",count:1,tone:"warning"}),s.setupGate.blockingCount>0&&t.push({label:"Setup",detail:`${s.setupGate.blockingCount} blocking setup ${s.setupGate.blockingCount===1?"requirement":"requirements"}.`,count:s.setupGate.blockingCount,tone:"warning"}),t}function ge(s){const a=[],t=s.diff.changedAgents.length+s.diff.newAgents.length+s.diff.deletedAgents.length;return t&&a.push(`${t} agent ${t===1?"change":"changes"}`),s.diff.changedActions.length&&a.push(`${s.diff.changedActions.length} action ${s.diff.changedActions.length===1?"change":"changes"}`),s.diff.changedSkills.length&&a.push(`${s.diff.changedSkills.length} skill ${s.diff.changedSkills.length===1?"change":"changes"}`),s.diff.changedExtensions.length&&a.push(`${s.diff.changedExtensions.length} extension ${s.diff.changedExtensions.length===1?"change":"changes"}`),s.diff.setupChanges.length&&a.push(`${s.diff.setupChanges.length} setup ${s.diff.setupChanges.length===1?"change":"changes"}`),s.diff.envRequirementChanges.length&&a.push(`${s.diff.envRequirementChanges.length} env ${s.diff.envRequirementChanges.length===1?"change":"changes"}`),a.join(", ")||"Profile source has local changes."}function E(s,a){const t=s.hosted?.teamId?.trim()??"";return!!(t&&a&&t!==a)}export{be as P,W as R};