dorkos 0.98.0 → 0.101.0

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 (194) hide show
  1. package/README.md +43 -13
  2. package/dist/bin/cli.js +10649 -8676
  3. package/dist/browser/fresh-verifier.mjs +3 -2
  4. package/dist/browser/native/darwin-journal-worker.mjs +2244 -0
  5. package/dist/browser/native/darwin-process-observer +0 -0
  6. package/dist/browser/native/darwin-process-observer.c +252 -0
  7. package/dist/browser/native/darwin-process-observer.h +37 -0
  8. package/dist/browser/native/darwin-process-observer.manifest.json +1 -0
  9. package/dist/browser/native/darwin-supervisor-worker.mjs +1996 -0
  10. package/dist/browser/native/package-manifest.json +1 -0
  11. package/dist/browser/source-manifest.json +1 -1
  12. package/dist/client/assets/{AboutPage-DqTcRYx5.js → AboutPage-CwxCTicf.js} +1 -1
  13. package/dist/client/assets/ActivityRow-D0QQ0SFu.js +1 -0
  14. package/dist/client/assets/AdapterIcon-CL-MyyKy.js +1 -0
  15. package/dist/client/assets/AdapterSetupWizard-C8HOvHLF.js +2 -0
  16. package/dist/client/assets/AgentRequestCard-BLLmoAES.js +12 -0
  17. package/dist/client/assets/AppearancePage-GqrWckTQ.js +1 -0
  18. package/dist/client/assets/AttentionSignalRow-sEhnIPBB.js +1 -0
  19. package/dist/client/assets/{BaseTanStackRouterDevtoolsPanel-B-iktbLX-Bmlsorom.js → BaseTanStackRouterDevtoolsPanel-B-iktbLX-BXjzhT_D.js} +1 -1
  20. package/dist/client/assets/{BlintzCanvas-BBW7iNEC.js → BlintzCanvas-CXi0fvcM.js} +1 -1
  21. package/dist/client/assets/{CanvasCsvContent-D6qWSQm4.js → CanvasCsvContent-QhDSf8Pd.js} +2 -2
  22. package/dist/client/assets/CanvasFileContent-ZZhdofR4.js +2 -0
  23. package/dist/client/assets/CanvasModel3dContent-DMMMZh4o.js +2 -0
  24. package/dist/client/assets/{CodeMirrorDiff-DsOh9sIB.js → CodeMirrorDiff-BMG7DBg2.js} +1 -1
  25. package/dist/client/assets/{CodeMirrorEditor-BxIWDXqr.js → CodeMirrorEditor-BYdz0ipX.js} +1 -1
  26. package/dist/client/assets/ConnectionAccessLists-PW1uzcGU.js +1 -0
  27. package/dist/client/assets/{ConnectionsPage-DvxSfsfG.js → ConnectionsPage-EwitZwOE.js} +3 -3
  28. package/dist/client/assets/ConventionPage-y-Zq3Klp.js +11 -0
  29. package/dist/client/assets/ExtensionPageRoute-gZKKPhaj.js +6 -0
  30. package/dist/client/assets/{FloatingTanStackRouterDevtools-CqogiFob-BCrkUo51.js → FloatingTanStackRouterDevtools-CqogiFob-CbKIa11X.js} +1 -1
  31. package/dist/client/assets/HandlePage-CL3_n1CI.js +1 -0
  32. package/dist/client/assets/{LexicalField-mvJHHMqo.js → LexicalField-Ceoa9flp.js} +13 -13
  33. package/dist/client/assets/{ManagesPage-DScJn5uY.js → ManagesPage-Dcqdm6I8.js} +1 -1
  34. package/dist/client/assets/Marketplace-DsU-q1ZZ.js +36 -0
  35. package/dist/client/assets/MarketplaceSourcesView-D72YoKNR.js +1 -0
  36. package/dist/client/assets/McpAppFrame-B1ThSf2U.js +6 -0
  37. package/dist/client/assets/McpSigninBody-Btg3PnYN.js +1 -0
  38. package/dist/client/assets/{Model3dViewer-BYNxJNRV.js → Model3dViewer-DlcQ3-LS.js} +1 -1
  39. package/dist/client/assets/NamePage-Bzqj4Eob.js +1 -0
  40. package/dist/client/assets/NewDirectMessageMenu-89yeGqvy.js +1 -0
  41. package/dist/client/assets/{NotificationsPage-CU6oIOwb.js → NotificationsPage-CQQIdLtI.js} +1 -1
  42. package/dist/client/assets/OperatorIdentityForm-BhiB9tQp.js +1 -0
  43. package/dist/client/assets/{PermissionsPage-BIatOhyg.js → PermissionsPage-TX-d7aVQ.js} +1 -1
  44. package/dist/client/assets/PersonalityPicker-C_9JVOva.js +1 -0
  45. package/dist/client/assets/PersonalityPopover-BoTED73t.js +1 -0
  46. package/dist/client/assets/PhotoPage-C3fMlebQ.js +1 -0
  47. package/dist/client/assets/PreviewRefusedNotice-ChCgdKWN.js +1 -0
  48. package/dist/client/assets/PromptSuggestionChips-B_oUtFMI.js +1 -0
  49. package/dist/client/assets/RoomSurface-CgtNuYhl.js +39 -0
  50. package/dist/client/assets/RoomsPage-zOjjpHdA.js +1 -0
  51. package/dist/client/assets/RunsOnPopover-JTm1cYuw.js +1 -0
  52. package/dist/client/assets/SessionsPage-D4kyvHQf.js +6 -0
  53. package/dist/client/assets/SkillsPage-KYUVzuVa.js +1 -0
  54. package/dist/client/assets/TasksPage-BZapA_v6.js +1 -0
  55. package/dist/client/assets/{ToolsPage-BMW27c-X.js → ToolsPage-CWpHMlrR.js} +2 -2
  56. package/dist/client/assets/{TopologyGraph-u-ihEvQa.js → TopologyGraph-BMcPxZsA.js} +3 -3
  57. package/dist/client/assets/TourHost-VY1-sy1Y.js +1 -0
  58. package/dist/client/assets/UnlinkDialog-3p38G_9q.js +1 -0
  59. package/dist/client/assets/UnreadDivider-KSqqcHKN.js +1 -0
  60. package/dist/client/assets/_shell-DAjwimLg.js +93 -0
  61. package/dist/client/assets/_shell._home-Bp_p1VUv.js +1 -0
  62. package/dist/client/assets/_shell._home.activity-tk-XApvX.js +1 -0
  63. package/dist/client/assets/_shell._home.index-BNVhSN0y.js +3 -0
  64. package/dist/client/assets/_shell._home.tasks-BsBH_4tZ.js +1 -0
  65. package/dist/client/assets/_shell._home.workspaces-DuXnjQh0.js +1 -0
  66. package/dist/client/assets/_shell.channels-DWAHkDPV.js +10 -0
  67. package/dist/client/assets/_shell.connections-DIm3mUHy.js +6 -0
  68. package/dist/client/assets/_shell.feedback-requests-Hjv640j9.js +2 -0
  69. package/dist/client/assets/_shell.marketplace-DF6Y7mc0.js +1 -0
  70. package/dist/client/assets/_shell.marketplace_.sources-Do8cm7kq.js +1 -0
  71. package/dist/client/assets/_shell.session-DlN8iOl-.js +43 -0
  72. package/dist/client/assets/_shell.team-ctLQztjw.js +28 -0
  73. package/dist/client/assets/_shell.x._extensionId-0Q1rJtud.js +1 -0
  74. package/dist/client/assets/_shell.x._extensionId_._-0Q1rJtud.js +1 -0
  75. package/dist/client/assets/agent-attention-Dn__3LQE.js +5 -0
  76. package/dist/client/assets/{agent-browser-Bn5EG403.js → agent-browser-CCN16ZOz.js} +1 -1
  77. package/dist/client/assets/banner-DOm9_4l-.js +6 -0
  78. package/dist/client/assets/composer-insert-BpyATrmR.js +1 -0
  79. package/dist/client/assets/dorkbot-templates-cu4wApxb.js +1 -0
  80. package/dist/client/assets/file-drag-GDx2qhdk.js +1 -0
  81. package/dist/client/assets/file-exclamation-point-BKzL0QhY.js +6 -0
  82. package/dist/client/assets/format-duration-BCr6uzby.js +1 -0
  83. package/dist/client/assets/hand-DLUdsiuR.js +6 -0
  84. package/dist/client/assets/{highlighted-body-KPVGNVTW-CL9x-9e4.js → highlighted-body-KPVGNVTW-DTxMTVdP.js} +1 -1
  85. package/dist/client/assets/hover-card-qzuFUCaR.js +1 -0
  86. package/dist/client/assets/{index-nEOi__50.js → index-3lQkXKcq.js} +1 -1
  87. package/dist/client/assets/{index-CpJvQdyn.js → index-B-z7hA9x.js} +1 -1
  88. package/dist/client/assets/{index-C-wQjAlh.js → index-BIMClIrX.js} +1 -1
  89. package/dist/client/assets/{index-lrzDDn8S.js → index-BMOfHKE0.js} +1 -1
  90. package/dist/client/assets/{index-CK35WFBO.js → index-BPcwoJoz.js} +1 -1
  91. package/dist/client/assets/{index-CsQv_9cY.js → index-BW5ce4t8.js} +1 -1
  92. package/dist/client/assets/{index-C2L0bOg6.js → index-BaB-skF0.js} +3 -3
  93. package/dist/client/assets/{index-DAXybyxB.js → index-Bk98IpMn.js} +1 -1
  94. package/dist/client/assets/{index-62aJQhJd.js → index-C3XnoXTY.js} +1 -1
  95. package/dist/client/assets/{index-tY8nAJmx.js → index-C7B2uRgo.js} +2 -2
  96. package/dist/client/assets/index-C8ZMfyGc.js +1 -0
  97. package/dist/client/assets/{index-BSl_jWtK.js → index-CDTumWMC.js} +1 -1
  98. package/dist/client/assets/{index-DuWGfUC7.js → index-CF9fqPef.js} +5 -5
  99. package/dist/client/assets/{index-DEYZcwYZ.js → index-CIPHHziB.js} +1 -1
  100. package/dist/client/assets/{index-DOVEs6Rq.js → index-CIfwPLXd.js} +1 -1
  101. package/dist/client/assets/{index-DnjFcJhW.js → index-CLhD0Bno.js} +36 -36
  102. package/dist/client/assets/index-CQWqpw_G.js +1 -0
  103. package/dist/client/assets/index-CScfHuKF.js +1 -0
  104. package/dist/client/assets/index-CTXNRyRE.js +1 -0
  105. package/dist/client/assets/{index-C3fr7zOo.js → index-CTai_TxZ.js} +1 -1
  106. package/dist/client/assets/{index-CniKYwdp.js → index-CVl132_4.js} +1 -1
  107. package/dist/client/assets/index-CejezM4U.js +1 -0
  108. package/dist/client/assets/{index-Bc9XDEj8.js → index-CmlaXay_.js} +1 -1
  109. package/dist/client/assets/{index-KIOfBCox.js → index-CtOB9fS3.js} +1 -1
  110. package/dist/client/assets/{index-DyFf2nbN.js → index-D3DXMH4x.js} +1 -1
  111. package/dist/client/assets/index-D5uYwabS.js +1 -0
  112. package/dist/client/assets/{index-CaEda4s3.js → index-DA-i3I4q.js} +1 -1
  113. package/dist/client/assets/index-DFMDv6qR.js +1 -0
  114. package/dist/client/assets/index-DMYBI16t.js +1252 -0
  115. package/dist/client/assets/{index-DzBsotRj.js → index-DOxEmnH2.js} +1 -1
  116. package/dist/client/assets/{index-Dxkj6c9m.js → index-DR1JT9Uz.js} +12 -12
  117. package/dist/client/assets/{index-BO-CpekL.js → index-DT_v3O-B.js} +1 -1
  118. package/dist/client/assets/index-DbbZNAKk.js +5 -0
  119. package/dist/client/assets/{index-BBz-vkiB.js → index-Dcs6e-U_.js} +1 -1
  120. package/dist/client/assets/{index-BE54c4kA.js → index-DgH_dl1a.js} +2 -2
  121. package/dist/client/assets/{index-DPGgujWh.js → index-DgtF-nBt.js} +1 -1
  122. package/dist/client/assets/{index-BlbBz069.js → index-DwzSdOh3.js} +1 -1
  123. package/dist/client/assets/index-IgIVF9T_.js +1 -0
  124. package/dist/client/assets/{index-aFkVVlMJ.js → index-WjW-NUCp.js} +1 -1
  125. package/dist/client/assets/layers-CJHXSEKK.js +6 -0
  126. package/dist/client/assets/lightbulb-DWjxw7lb.js +6 -0
  127. package/dist/client/assets/mention-pill-akMU3IVs.js +1 -0
  128. package/dist/client/assets/message-square-off-DEagHpQY.js +6 -0
  129. package/dist/client/assets/owner-notice-CLsx0s7q.js +1 -0
  130. package/dist/client/assets/page-container-W7byjRmk.js +1 -0
  131. package/dist/client/assets/primer-trigger-DuM9vVnV.js +3 -0
  132. package/dist/client/assets/radio-B8Ozjv9U.js +6 -0
  133. package/dist/client/assets/{room-files-source-BXJ2jlgd.js → room-files-source-Bsc3YA91.js} +2 -2
  134. package/dist/client/assets/rotate-ccw-clock-CNcDcTvq.js +6 -0
  135. package/dist/client/assets/rotate-cw-xvfipJLN.js +6 -0
  136. package/dist/client/assets/scroll-area-C95q3ss7.js +1 -0
  137. package/dist/client/assets/search-x-C6SAxw7a.js +6 -0
  138. package/dist/client/assets/session-strategy-labels-C7Wduch3.js +1 -0
  139. package/dist/client/assets/shield-x-DxOGc0dW.js +6 -0
  140. package/dist/client/assets/{soul-file-11avkxYV.js → soul-file-pg0ShYy3.js} +1 -1
  141. package/dist/client/assets/untrusted-text-1hXdPgLA.js +1 -0
  142. package/dist/client/assets/use-delete-binding-CZVeHqn0.js +1 -0
  143. package/dist/client/assets/use-dev-links-Df2WkCic.js +1 -0
  144. package/dist/client/assets/use-external-adapter-catalog-B0gcY-k7.js +1 -0
  145. package/dist/client/assets/use-full-activity-feed-SYcgdMZu.js +1 -0
  146. package/dist/client/assets/use-is-below-desktop-C5_YenEp.js +1 -0
  147. package/dist/client/assets/use-jump-back-in-DWUPb1gi.js +11 -0
  148. package/dist/client/assets/use-mesh-topology-HLzZIgis.js +1 -0
  149. package/dist/client/assets/use-pending-read-BuJknrxG.js +1 -0
  150. package/dist/client/assets/{use-personality-commit-PCN2Kh8p.js → use-personality-commit-OH7d0xl_.js} +1 -1
  151. package/dist/client/assets/use-promo-activation-BgdGasXE.js +11 -0
  152. package/dist/client/assets/use-pulse-freshness-BlD-dM_g.js +1 -0
  153. package/dist/client/assets/use-rename-session-D3MuyK-F.js +1 -0
  154. package/dist/client/assets/use-room-follow-claim-CyjhzbRJ.js +1 -0
  155. package/dist/client/assets/use-roving-tab-list-Be60AWK3.js +1 -0
  156. package/dist/client/assets/use-session-canvas-Bqs6IQO7.js +64 -0
  157. package/dist/client/assets/use-session-diagnostics-CfKdB2iY.js +16 -0
  158. package/dist/client/assets/use-unclaimed-chats-lqMhotUB.js +1 -0
  159. package/dist/client/index.html +1 -1
  160. package/dist/client/manifest.webmanifest +1 -1
  161. package/dist/drizzle/20261005194144_connector_auth_flow_failure_code.sql +1 -0
  162. package/dist/drizzle/20261005230915_task_run_occurrence.sql +2 -0
  163. package/dist/drizzle/20261006231015_audit_events.sql +63 -0
  164. package/dist/drizzle/20261007230701_private_session_identity.sql +15 -0
  165. package/dist/drizzle/meta/20261005194144_snapshot.json +12238 -0
  166. package/dist/drizzle/meta/20261005230915_snapshot.json +12252 -0
  167. package/dist/drizzle/meta/20261006231015_snapshot.json +12519 -0
  168. package/dist/drizzle/meta/20261007230701_snapshot.json +12611 -0
  169. package/dist/drizzle/meta/_journal.json +28 -0
  170. package/dist/server/index.js +161811 -97213
  171. package/dist/server/index.js.map +2 -2
  172. package/package.json +5 -5
  173. package/dist/client/assets/AdapterIcon-CiK683Vv.js +0 -1
  174. package/dist/client/assets/AppearancePage-CBq2_KUY.js +0 -1
  175. package/dist/client/assets/CanvasFileContent-jV63reY5.js +0 -2
  176. package/dist/client/assets/CanvasModel3dContent-DzvsEWGD.js +0 -2
  177. package/dist/client/assets/ConnectionAccessLists-BWuegEtZ.js +0 -1
  178. package/dist/client/assets/ConventionPage-CYV7X_nF.js +0 -11
  179. package/dist/client/assets/HandlePage-CJpRpaLw.js +0 -1
  180. package/dist/client/assets/NamePage-KoYyo25o.js +0 -1
  181. package/dist/client/assets/PersonalityPopover-CFRYfO5E.js +0 -1
  182. package/dist/client/assets/PhotoPage-DkGyFlWQ.js +0 -1
  183. package/dist/client/assets/RoomsPage-ClT030eV.js +0 -1
  184. package/dist/client/assets/RunsOnPopover-CNCO9sZk.js +0 -1
  185. package/dist/client/assets/SessionsPage-5xEcQImi.js +0 -6
  186. package/dist/client/assets/SkillsPage-ic4TDV4I.js +0 -1
  187. package/dist/client/assets/TasksPage-C_GFpRgB.js +0 -1
  188. package/dist/client/assets/index-6COO_Ljw.js +0 -1
  189. package/dist/client/assets/index-BKl9b2dT.js +0 -1
  190. package/dist/client/assets/index-BVtk6Sb_.js +0 -1
  191. package/dist/client/assets/index-Bxrxl2HH.js +0 -1
  192. package/dist/client/assets/index-C6uVMs3w.js +0 -1
  193. package/dist/client/assets/index-DEvFAO8t.js +0 -1
  194. package/dist/client/assets/index-DpSk7iO1.js +0 -1680
@@ -1,4 +1,4 @@
1
1
  [diffend] Oversized file quarantined before diffing.
2
2
  name: package/dist/server/index.js.map
3
- size: 46739035 bytes
4
- sha256: 1b796cc53c1dbb50b139b044542ece8f41a1bd495f69eeeed4523c9491941740
3
+ size: 55519164 bytes
4
+ sha256: 4263c9660e3b681e3138733d82ae0b3bb23e08c19462e6e9ab1ec6feb082669a
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dorkos",
3
- "version": "0.98.0",
4
- "description": "You, multiplied. All your agents in one place: Claude Code, Codex, and OpenCode. See every session, approve what your agents do, and run them on a schedule. Self-hosted, MIT.",
3
+ "version": "0.101.0",
4
+ "description": "You, multiplied. Build and run your business with an agent team. Your agents join your team chat, take on real work, and build the tools your company runs on.",
5
5
  "license": "MIT",
6
6
  "author": "Dorian Collier",
7
7
  "repository": {
@@ -85,14 +85,14 @@
85
85
  "typescript": "^5.9.3",
86
86
  "vitest": "^4.1.11",
87
87
  "@dorkos/browser": "0.0.0",
88
- "@dorkos/client": "0.0.0",
89
88
  "@dorkos/db": "0.0.0",
90
89
  "@dorkos/eslint-config": "0.0.0",
90
+ "@dorkos/marketplace": "0.0.0",
91
91
  "@dorkos/harness": "0.0.0",
92
92
  "@dorkos/server": "0.0.0",
93
- "@dorkos/marketplace": "0.0.0",
93
+ "@dorkos/shared": "0.0.0",
94
94
  "@dorkos/typescript-config": "0.0.0",
95
- "@dorkos/shared": "0.0.0"
95
+ "@dorkos/client": "0.0.0"
96
96
  },
97
97
  "scripts": {
98
98
  "build": "tsx scripts/build.ts",
@@ -1 +0,0 @@
1
- import{aO as n,aP as r,j as c,aQ as s,aR as A}from"./index-DpSk7iO1.js";const g={connected:n.success,disconnected:n.neutral,error:n.error,starting:`${n.warning} ${r}`,stopping:`${n.warning} ${r}`,reconnecting:`${n.warning} ${r}`},_={connected:"Connected",disconnected:"Ready",error:"Error",starting:"Connecting…",stopping:"Stopping…",reconnecting:"Reconnecting…"};function d({iconId:a,adapterType:i,size:t=16,className:o}){const e=s[a??""]??s[i??""];return e?c.jsx(e,{size:t,className:o}):c.jsx(A,{className:o,style:{width:t,height:t}})}export{d as A,g as a,_ as b};
@@ -1 +0,0 @@
1
- import{j as e,cq as F,cr as U,al as v,J as m,cs as b,ct as $,cu as B,cv as G,an as D,r as u,cw as E,B as W,X as V,cx as q,u as J,a as K,t as X,b as Y,z as Z}from"./index-DpSk7iO1.js";import{u as Q}from"./use-personality-commit-PCN2Kh8p.js";import"./soul-file-11avkxYV.js";const H={hidden:{},visible:{transition:{staggerChildren:.04}}},I={hidden:{opacity:0,scale:.5},visible:{opacity:1,scale:1,transition:{type:"spring",stiffness:500,damping:25}}};function _(){return e.jsx(m.span,{className:"pointer-events-none absolute inset-0 flex items-center justify-center",initial:{scale:0,opacity:1},animate:{scale:1,opacity:0},transition:{duration:.6,ease:[.34,1.56,.64,1]},"aria-hidden":!0,children:e.jsx(D,{className:"size-4 text-white drop-shadow-md",strokeWidth:3})})}function O({celebratory:s,className:t,children:a}){return s?e.jsx(m.div,{className:t,variants:H,initial:"hidden",animate:"visible",children:a}):e.jsx("div",{className:t,children:a})}function A({celebratory:s,children:t}){return s?e.jsx(m.div,{variants:I,children:t}):t}const ee=e.jsx("span",{className:"text-3xs leading-none font-bold",children:"A"}),te="ring-muted-foreground/50 ring-dashed ring-2 ring-offset-2",se="Select default color";function ae({value:s,autoColor:t,onSelect:a,onHoverChange:i,justSelectedKey:o,celebratory:n=!1,autoIcon:r=ee,autoActiveRing:c=te,autoLabel:d=se}){const x=s!=null;return e.jsxs(O,{celebratory:n,className:"flex flex-wrap items-center gap-2",children:[e.jsx(A,{celebratory:n,children:e.jsx(T,{active:!x,activeRing:c,color:t,label:d,tooltip:"Unique, derived from agent name",onClick:()=>a(null),onHoverChange:i,justSelected:o==="auto",celebratory:n,children:r})}),e.jsx("div",{className:"bg-border mx-0.5 h-5 w-px"}),F.map(l=>e.jsx(A,{celebratory:n,children:e.jsx(T,{active:s===l.hex,activeRing:"ring-foreground ring-2 ring-offset-2",color:l.hex,label:`Select ${l.name}`,tooltip:l.name,onClick:()=>a(l.hex),onHoverChange:i,justSelected:o===l.hex,celebratory:n})},l.hex))]})}function T({active:s,activeRing:t,color:a,label:i,tooltip:o,tooltipSide:n="bottom",onClick:r,onHoverChange:c,justSelected:d,celebratory:x,children:l}){const h=e.jsxs("button",{type:"button",onClick:r,onMouseEnter:()=>c==null?void 0:c(a),onMouseLeave:()=>c==null?void 0:c(null),className:v("group/swatch relative size-8 rounded-full transition-[scale,box-shadow] duration-150",s?t:"hover:scale-110"),style:{backgroundColor:a},"aria-label":i,children:[l&&e.jsx("span",{className:"bg-background/80 text-foreground absolute inset-0 flex items-center justify-center rounded-full",children:l}),x&&e.jsx("span",{className:"absolute inset-[-4px] -z-10 rounded-full opacity-0 blur-md transition-opacity duration-200 group-hover/swatch:opacity-50",style:{backgroundColor:a},"aria-hidden":!0}),e.jsx(b,{children:d&&e.jsx(_,{})})]});return x?e.jsxs($,{children:[e.jsx(B,{asChild:!0,children:h}),e.jsx(G,{side:n,className:"text-3xs",children:o})]}):h}function ne({value:s,autoEmoji:t,hasOverride:a,onSelect:i,justSelectedKey:o,celebratory:n=!1}){return e.jsx(O,{celebratory:n,className:"grid grid-cols-6 gap-1.5",children:U.map(r=>{const c=r===s,d=r===t&&!a,x=v("relative flex size-9 items-center justify-center rounded-md text-lg transition-colors duration-150",c?v(d?"bg-accent ring-muted-foreground/50 ring-1":"bg-accent ring-foreground ring-1",d&&!n&&"ring-dashed"):"hover:bg-accent/50 active:scale-90");return e.jsx(ie,{celebratory:n,onClick:()=>i(r),className:x,ariaLabel:`Select icon ${r}`,justSelected:o===`emoji-${r}`,children:r},r)})})}function ie({celebratory:s,onClick:t,className:a,ariaLabel:i,justSelected:o,children:n}){const r=e.jsx(b,{children:o&&e.jsx(_,{})});return s?e.jsxs(m.button,{type:"button",onClick:t,className:a,"aria-label":i,variants:I,whileHover:{scale:1.25},whileTap:{scale:.85},transition:{type:"spring",stiffness:500,damping:20},children:[n,r]}):e.jsxs("button",{type:"button",onClick:t,className:a,"aria-label":i,children:[n,r]})}const re=e.jsx(q,{className:"size-3"}),oe="ring-muted-foreground/50 ring-2 ring-offset-2",ce="Select unique auto-generated color",C="dorkos:avatar-first-customization",le={hidden:{},visible:{transition:{staggerChildren:.04}}},w={hidden:{opacity:0,y:4},visible:{opacity:1,y:0,transition:{duration:.2,ease:"easeOut"}}};function ue(){const[s]=u.useState(()=>Array.from({length:14},(a,i)=>{const o=Math.PI*2*i/14,n=28+Math.random()*20,r=360*i/14;return{x:Math.cos(o)*n,y:Math.sin(o)*n,size:3+Math.random()*3,hue:r,delay:i*.02}}));return e.jsx("div",{className:"pointer-events-none absolute inset-0 z-50 overflow-visible","aria-hidden":!0,children:s.map((t,a)=>e.jsx(m.span,{className:"absolute top-1/2 left-1/2 rounded-full",style:{width:t.size,height:t.size,background:`hsl(${t.hue}, 80%, 70%)`,boxShadow:`0 0 6px hsl(${t.hue}, 80%, 70%)`},initial:{x:"-50%",y:"-50%",scale:0,opacity:1},animate:{x:t.x,y:t.y,scale:1,opacity:0},transition:{duration:.6,ease:"easeOut",delay:t.delay}},a))})}function de({agent:s,onUpdate:t,onPreviewColor:a,title:i,onClose:o}){const n=u.useMemo(()=>E(s.id),[s.id]),r=n.color,c=n.icon,d=s.icon??c,x=s.color!=null,l=s.icon!=null,h=x||l,[y,S]=u.useState(null),p=u.useRef(null),[z,k]=u.useState(!1),N=u.useRef(!1);u.useEffect(()=>()=>{p.current&&clearTimeout(p.current)},[]);const g=u.useCallback(()=>{if(!N.current){try{if(localStorage.getItem(C))return;localStorage.setItem(C,"true")}catch{return}N.current=!0,k(!0),setTimeout(()=>k(!1),800)}},[]),j=u.useCallback(f=>{p.current&&clearTimeout(p.current),S(f),p.current=setTimeout(()=>S(null),600)},[]),R=u.useCallback(()=>{t({color:null,icon:null})},[t]),L=u.useCallback(f=>{t({color:f}),a(null),j(f??"auto"),g()},[t,a,j,g]),M=u.useCallback(f=>{t({icon:f===c?null:f}),j(`emoji-${f}`),g()},[t,c,j,g]),P=u.useCallback(f=>{a(f)},[a]);return e.jsxs("div",{className:"flex flex-1 flex-col overflow-auto","data-testid":"avatar-picker-panel",children:[(i||o||h)&&e.jsxs("div",{className:v("flex items-center justify-between px-4 py-2",(i||o)&&"border-b"),children:[i&&e.jsx("span",{className:"text-xs font-semibold",children:i}),e.jsxs("div",{className:"ml-auto flex items-center gap-1",children:[e.jsx(b,{children:h&&e.jsx(m.button,{type:"button",onClick:R,className:"text-muted-foreground hover:text-foreground text-3xs transition-colors",initial:{opacity:0,x:8},animate:{opacity:1,x:0},exit:{opacity:0,x:8},transition:{duration:.2},children:"Reset to defaults"})}),o&&e.jsx(W,{variant:"ghost",size:"icon-md",className:"size-6",onClick:o,"aria-label":"Close appearance picker",children:e.jsx(V,{className:"size-3.5"})})]})]}),e.jsxs(m.div,{className:"space-y-5 p-4",variants:le,initial:"hidden",animate:"visible",children:[e.jsxs(m.div,{variants:w,children:[e.jsx("div",{className:"text-muted-foreground text-3xs mb-2 font-medium tracking-wider uppercase",children:"Color"}),e.jsx(ae,{value:s.color,autoColor:r,onSelect:L,onHoverChange:P,justSelectedKey:y,celebratory:!0,autoIcon:re,autoActiveRing:oe,autoLabel:ce})]}),e.jsxs(m.div,{variants:w,children:[e.jsx("div",{className:"text-muted-foreground text-3xs mb-2 font-medium tracking-wider uppercase",children:"Icon"}),e.jsx(ne,{value:d,autoEmoji:c,hasOverride:l,onSelect:M,justSelectedKey:y,celebratory:!0})]})]}),e.jsx(b,{children:z&&e.jsx(ue,{})})]})}function xe({children:s}){return e.jsx("h3",{className:"text-muted-foreground text-3xs font-medium tracking-wider uppercase",children:s})}function ge({member:s}){const{agent:t,isPending:a,update:i}=J(s),o=Q(t,i),[n,r]=u.useState(null);if(a)return e.jsx(K,{className:"h-64 w-full"});if(!t)return e.jsx("p",{className:"text-muted-foreground text-sm",children:"Couldn’t read this agent’s appearance."});const c=X(s),d=E(t.id),x=n??t.color??d.color,l=t.icon??d.icon;return e.jsxs("div",{className:"flex flex-col gap-5","data-slot":"profile-appearance",children:[e.jsx("div",{className:"flex justify-center pt-1",children:e.jsx(Y,{size:"lg",kind:c.kind,color:x,emoji:l,fallback:c.fallback,origin:c.origin})}),e.jsx(de,{agent:t,onUpdate:i,onPreviewColor:r}),e.jsxs("div",{className:"space-y-2 border-t pt-4",children:[e.jsx(xe,{children:"Personality"}),e.jsx(Z,{traits:o.traits,onTraitsChange:o.onTraitsChange,compact:!0})]})]})}export{ge as AppearancePage};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CodeMirrorEditor-BxIWDXqr.js","assets/index-DpSk7iO1.js","assets/index-Dgp1LmEk.css","assets/index-DyFf2nbN.js","assets/index-Dxkj6c9m.js","assets/BlintzCanvas-BBW7iNEC.js","assets/BlintzCanvas-GgiCXV7C.css"])))=>i.map(i=>d[i]);
2
- import{af as q,ag as b,ah as H,ai as K,r,j as t,aj as V,ak as $,al as U,B as C,am as Y,an as G,ao as I,ap as L}from"./index-DpSk7iO1.js";const J=r.lazy(()=>L(()=>import("./CodeMirrorEditor-BxIWDXqr.js"),__vite__mapDeps([0,1,2,3,4])).then(e=>({default:e.CodeMirrorEditor}))),W=r.lazy(()=>L(()=>import("./BlintzCanvas-BBW7iNEC.js"),__vite__mapDeps([5,1,2,4,6])).then(e=>({default:e.BlintzCanvas}))),X=500;function w(e,i){return["canvas-file",e,i]}function Z(e,i){return i==="markdown"||/\.(md|markdown|mdx)$/i.test(e)}function ee(e){switch(e==null?void 0:e.code){case"NOT_FOUND":return"This file doesn’t exist.";case"NOT_A_FILE":return"This path is a directory, not a file.";case"TOO_LARGE":return"This file is too large to open here.";case"BINARY_FILE":return"This file isn’t text, so the editor can’t show it.";default:return"This file couldn’t be loaded."}}function te(e){switch(e){case"saving":return"Saving…";case"saved":return"Saved";case"error":return"Couldn’t save";default:return null}}function ne({content:e,documentId:i}){const m=q(),o=b(s=>s.selectedCwd),R=b(s=>s.setDocumentEditing),a=b(s=>{var f;return((f=s.openDocuments.find(j=>j.id===i))==null?void 0:f.editing)??!1}),h=H(),{data:c,error:x,isLoading:T}=K({queryKey:w(o,e.sourcePath),enabled:o!==null,queryFn:()=>m.readFileContent(o,e.sourcePath),staleTime:3e4,retry:!1}),[d,v]=r.useState(null),p=s=>{v(s&&c?{pinnedHash:c.hash}:null)};if(o===null)return t.jsx(k,{children:"Open a session to view files."});if(T)return t.jsx(k,{children:"Loading file…"});if(x||!c)return t.jsx(k,{children:ee(x)});const u=d!==null&&a,n=(u?d==null?void 0:d.pinnedHash:null)??c.hash;return t.jsx(se,{content:e,documentId:i,cwd:o,loaded:c.content,theme:h,isEditing:u,onEditingChange:p,setDocumentEditing:R},`${e.sourcePath}:${n}`)}function se({content:e,documentId:i,cwd:m,loaded:o,theme:R,isEditing:a,onEditingChange:h,setDocumentEditing:c}){const x=e.readOnly!==!0,T=Z(e.sourcePath,e.language),d=V(),[v,p]=r.useState(o),u=$({sourcePath:e.sourcePath,cwd:m,loadedContent:o}),n=r.useRef(null),s=r.useRef(v),f=r.useRef(0),j=r.useRef(0),g=r.useRef(u.save),E=r.useRef(h);r.useEffect(()=>{s.current=v,g.current=u.save,E.current=h});const P=r.useCallback(l=>{f.current+=1,s.current=l,p(l),n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{n.current=null,g.current(s.current)},X)},[]),S=()=>{f.current+=1,s.current=o,p(o),h(!0),c(i,!0)},A=async()=>{n.current&&(clearTimeout(n.current),n.current=null);const l=s.current,B=f.current,Q=++j.current,y=await g.current(l);if(y.status!=="changed"&&y.status!=="no_op"||f.current!==B||j.current!==Q||y.confirmed.content!==l)return;const N=y.confirmed;N.content===s.current&&d.setQueryData(w(m,e.sourcePath),_=>_&&{..._,content:N.content,hash:N.hash}),h(!1),c(i,!1)},F=()=>{d.invalidateQueries({queryKey:w(m,e.sourcePath)})};r.useEffect(()=>{a||!n.current||(clearTimeout(n.current),n.current=null)},[a]),r.useEffect(()=>()=>{n.current&&(clearTimeout(n.current),g.current(s.current)),c(i,!1),E.current(!1)},[i,c]);const D=()=>{const l=u.adoptDisk();l!=null&&p(l)},M=()=>{u.overwrite(s.current)},z=te(u.status),O=a?v:o;return t.jsxs("div",{className:"relative flex h-full flex-col",children:[t.jsxs("div",{className:"sticky top-0 z-10 flex h-0 items-start justify-end gap-2 pr-2",children:[x&&z&&t.jsx("span",{className:U("mt-3 text-xs",u.status==="error"?"text-destructive":"text-muted-foreground"),"aria-live":"polite",children:z}),!a&&t.jsx(C,{type:"button",variant:"ghost",size:"icon-md",className:"text-muted-foreground hover:text-foreground mt-2",onClick:F,"aria-label":"Refresh from disk",children:t.jsx(Y,{className:"size-4"})}),x&&t.jsx(C,{type:"button",variant:"ghost",size:"icon-md",className:"text-muted-foreground hover:text-foreground mt-2",onClick:a?()=>void A():S,"aria-label":a?"Finish editing":"Edit file",children:a?t.jsx(G,{className:"size-4"}):t.jsx(I,{className:"size-4"})})]}),u.status==="conflict"&&t.jsxs("div",{className:"bg-destructive/10 text-destructive mx-2 mt-2 flex flex-wrap items-center gap-x-3 gap-y-1 rounded-md px-3 py-2 text-sm",children:[t.jsx("span",{className:"flex-1",children:"This file changed on disk since you opened it."}),t.jsx(C,{type:"button",variant:"ghost",size:"sm",className:"h-7",onClick:D,children:"Reload"}),t.jsx(C,{type:"button",variant:"destructive",size:"sm",className:"h-7",onClick:M,children:"Overwrite"})]}),t.jsx("div",{className:"min-h-0 flex-1",children:t.jsx(r.Suspense,{fallback:t.jsx("div",{className:"text-muted-foreground p-4 text-sm",children:"Loading editor…"}),children:T?t.jsx("div",{className:"px-2 pb-6",children:t.jsx(W,{value:O,editable:a,onChange:a?P:void 0})}):t.jsx(J,{value:O,editable:a,filename:e.sourcePath,languageHint:e.language,theme:R,onChange:a?P:void 0})})})]})}function k({children:e}){return t.jsx("div",{className:"text-muted-foreground flex h-full items-center justify-center p-8 text-center",children:t.jsx("p",{children:e})})}export{ne as CanvasFileContent};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Model3dViewer-BYNxJNRV.js","assets/index-DpSk7iO1.js","assets/index-Dgp1LmEk.css"])))=>i.map(i=>d[i]);
2
- import{af as u,ag as d,r as l,aq as i,j as t,ap as f}from"./index-DpSk7iO1.js";const c=l.lazy(()=>f(()=>import("./Model3dViewer-BYNxJNRV.js"),__vite__mapDeps([0,1,2])).then(r=>({default:r.Model3dViewer})));function m(r){var s;const e=(s=r.split(".").pop())==null?void 0:s.toLowerCase();return e==="glb"||e==="gltf"?"gltf":e==="stl"?"stl":e==="obj"?"obj":e==="3mf"?"3mf":e==="ply"?"ply":e==="fbx"?"fbx":e==="dae"?"dae":null}function x({content:r}){const e=u(),s=d(a=>a.selectedCwd),n=l.useMemo(()=>i(r.src,a=>e.mediaUrl(s??"",a)),[r.src,e,s]),o=l.useMemo(()=>m(r.src),[r.src]);return n.url===null||o===null?t.jsx("div",{className:"text-muted-foreground flex h-full items-center justify-center p-8 text-center",children:t.jsx("p",{children:"This 3D model can’t be displayed here."})}):t.jsx("div",{className:"bg-muted/40 h-full w-full",children:t.jsx(l.Suspense,{fallback:t.jsx("div",{className:"text-muted-foreground p-4 text-sm",children:"Loading 3D viewer…"}),children:t.jsx(c,{url:n.url,format:o,label:r.title??"Canvas 3D model"})})})}export{x as CanvasModel3dContent,m as formatOf};
@@ -1 +0,0 @@
1
- import{O as u,j as s,a as x,Q as g,B as o,R as h,U as p,V as l,W as m,Y as j,Z as N,$ as f}from"./index-DpSk7iO1.js";const v={agent:"From the agent",this_chat:"Only in this chat"};function A({agentId:n,onManage:e}){var i;const a=u(n);if(a.isPending)return s.jsx(x,{className:"h-24 w-full rounded-lg"});if(a.isError)return s.jsx(g,{title:"Couldn’t load account access",description:"Nothing changed. Try again.",onRetry:()=>void a.refetch(),isRetrying:a.isFetching});const c=((i=a.data)==null?void 0:i.connections)??[];return s.jsxs("section",{"aria-labelledby":"agent-account-access",className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsxs("div",{children:[s.jsx("h3",{id:"agent-account-access",className:"text-sm font-semibold",children:"Account access"}),s.jsx("p",{className:"text-muted-foreground mt-0.5 text-xs",children:"Accounts this agent can use."})]}),e&&s.jsxs(o,{variant:"ghost",size:"sm",onClick:e,children:["Manage",s.jsx(h,{className:"size-3.5","aria-hidden":!0})]})]}),c.length===0?s.jsxs("div",{className:"bg-muted/40 rounded-lg p-4 text-sm",children:[s.jsx("p",{className:"font-medium",children:"No account access"}),s.jsx("p",{className:"text-muted-foreground mt-1 text-xs",children:"Give access from the Connections page."})]}):s.jsx("ul",{className:"space-y-1.5",children:c.map(t=>{const r=t.readiness.state==="ready";return s.jsxs("li",{"data-testid":`agent-connection-${t.connectionId}`,className:"bg-muted/40 flex min-h-11 items-center gap-3 rounded-lg px-3 py-2",children:[s.jsx(p,{iconKey:t.toolkit,displayName:l(t.toolkit),className:"size-7"}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsxs("p",{className:"truncate text-sm font-medium",children:[l(t.toolkit)," (",t.label,")"]}),s.jsxs("p",{className:"text-muted-foreground text-xs",children:[t.operationRevisionIds.length," approved"," ",t.operationRevisionIds.length===1?"action":"actions",t.everyAgent&&" · given to every agent"]})]}),s.jsx(m,{size:"xs",variant:r?"secondary":"outline",title:r?void 0:t.readiness.copy.owner,children:r?"Available":"Unavailable"})]},t.connectionId)})})]})}const y="This only affects this chat. Turning an app back on never adds access.",C="Couldn’t change access for this chat. Try again.";function b(n){return(n==null?void 0:n.code)==="session_access_other_agent"?n.message:C}function I({sessionId:n,onManage:e,emptyAction:a,footer:c}){var r;const i=j(n);if(i.isPending)return s.jsx(x,{className:"h-16 w-full rounded-lg"});if(i.isError)return s.jsxs("section",{"data-testid":"session-connectors",className:"space-y-2",children:[s.jsx("p",{role:"alert",className:"text-destructive px-1 text-xs",children:"Couldn’t load account access."}),s.jsx(o,{variant:"ghost",size:"sm",onClick:()=>void i.refetch(),children:"Try again"})]});const t=((r=i.data)==null?void 0:r.connections)??[];return s.jsxs("section",{"data-testid":"session-connectors","aria-labelledby":"session-account-access",className:"space-y-1",children:[s.jsxs("div",{className:"flex items-center justify-between gap-2 px-1 pb-1",children:[s.jsx("h3",{id:"session-account-access",className:"text-muted-foreground text-xs font-medium tracking-wide uppercase",children:"Connections"}),e&&s.jsxs(o,{variant:"ghost",size:"xs",onClick:e,children:["Manage agent access",s.jsx(h,{className:"size-3","aria-hidden":!0})]})]}),t.length===0?s.jsxs("div",{className:"bg-muted/40 space-y-2 rounded-md px-2.5 py-3",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium",children:"No account access"}),s.jsx("p",{className:"text-muted-foreground mt-1 text-xs",children:"Ask this agent to request the access it needs."})]}),a]}):s.jsxs(s.Fragment,{children:[t.some(d=>d.thisChat)&&s.jsx("p",{className:"text-muted-foreground px-1 pb-1 text-xs",children:y}),t.map(d=>s.jsx(S,{sessionId:n,connection:d},d.connectionId))]}),t.length>0&&c]})}function S({sessionId:n,connection:e}){const a=N(n),c=e.readiness.state==="ready",i=`${l(e.toolkit)} (${e.label})`;return s.jsxs("div",{"data-testid":`session-connection-${e.connectionId}`,"data-reason":e.readiness.reason,className:"bg-muted/40 rounded-md px-2.5 py-2",children:[s.jsxs("div",{className:"flex items-start gap-2",children:[s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[s.jsx("span",{className:"text-sm font-medium",children:i}),s.jsx(m,{size:"xs",variant:c?"secondary":"outline",children:c?v[e.source]:"Not available"})]}),s.jsx("p",{className:c?"text-muted-foreground mt-1 text-xs":"text-status-warning-fg mt-1 text-xs",children:c?`${e.operationRevisionIds.length} ${e.operationRevisionIds.length===1?"action":"actions"} available in this chat.`:e.readiness.copy.owner})]}),e.thisChat&&s.jsx(f,{"aria-label":`${i} in this chat`,"data-testid":`session-connection-switch-${e.connectionId}`,checked:e.thisChat==="on",disabled:a.isPending,onCheckedChange:t=>a.mutate({connectionId:e.connectionId,on:t}),className:"mt-0.5 shrink-0"})]}),a.isError&&e.thisChat&&s.jsx("p",{role:"alert",className:"text-destructive mt-1 text-xs",children:b(a.error)})]})}export{A,I as S};
@@ -1,11 +0,0 @@
1
- import{r as u,j as s,cy as O,cz as k,cA as I,cB as P,$,al as m,cC as D,cD as F,C as Y,cE as B,cF as G,A as b,cG as v,cH as z,cI as U,cJ as W,cK as _,cL as X,cM as H,cN as K,cO as V,cP as J,cQ as Q,u as Z,cR as q,a as ee,cS as te,B as ne,cT as se}from"./index-DpSk7iO1.js";import"./agent-browser-Bn5EG403.js";import{s as w}from"./soul-file-11avkxYV.js";function oe({title:e,content:t,enabled:n,maxChars:o,charCount:a,disclaimer:d,onChange:r,onBlur:i,onToggle:x,fill:c=!1}){const h=u.useCallback(C=>{r(C.target.value)},[r]);return s.jsx(O,{className:m(!n&&"opacity-60",c&&"flex min-h-0 flex-1 flex-col"),children:s.jsxs(k,{className:m(c&&"flex min-h-0 flex-1 flex-col"),children:[s.jsxs(I,{orientation:"horizontal",className:"items-center justify-between",children:[s.jsx(P,{className:"text-sm font-medium",children:e}),s.jsx($,{checked:n,onCheckedChange:x,"aria-label":`Toggle ${e}`})]}),d&&s.jsx("p",{className:"text-muted-foreground text-xs italic",children:d}),s.jsxs("div",{className:m("space-y-2",c&&"flex min-h-0 flex-1 flex-col"),children:[s.jsx("textarea",{value:t,onChange:h,onBlur:i,rows:c?void 0:8,maxLength:o,className:m("border-border bg-background text-foreground placeholder:text-muted-foreground focus-visible:ring-ring w-full resize-none rounded-md border px-3 py-2 font-mono text-sm focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",c&&"min-h-40 flex-1"),placeholder:n?"Write markdown here…":"Turn this on to use it"}),s.jsxs("p",{className:"text-muted-foreground text-right text-xs",children:[a??t.length," / ",o.toLocaleString()]})]})]})})}const p="[new code each turn]",ae=[...new Set([...Object.values(V),...K,"system-reminder"])];function re(e){const t=e.length>v,n=t?e.slice(0,v):e,o=z(n,ae);return["<agent_memory>",U,W,`--- BEGIN ${_} ${p} ---`,X,...t?[H]:[],o,`--- END ${_} ${p} ---`,"</agent_memory>"].join(`
2
- `)}function ie(e){var o;const n=[`<agent_identity>
3
- ${[`Name: ${e.name}`,`ID: ${e.id}`,e.description?`Description: ${e.description}`:null,(o=e.capabilities)!=null&&o.length?`Capabilities: ${e.capabilities.join(", ")}`:null].filter(a=>a!==null).join(`
4
- `)}
5
- </agent_identity>`];if(e.conventions.soul){const a=e.soulContent.includes(G)?w(e.traits,b(e.soulContent)):e.soulContent;a.trim()&&n.push(`<agent_persona>
6
- ${a}
7
- </agent_persona>`)}return e.conventions.nope&&e.nopeContent.trim()&&n.push(`<agent_safety_boundaries>
8
- ${e.nopeContent}
9
- </agent_safety_boundaries>`),e.conventions.memory&&e.memoryContent.trim()&&n.push(re(e.memoryContent)),n.join(`
10
-
11
- `)}function ce(e){const[t,n]=u.useState(!1),o=u.useMemo(()=>ie(e),[e]);return s.jsxs(D,{open:t,onOpenChange:n,"data-slot":"profile-injection-preview",children:[s.jsxs(F,{className:"focus-ring text-muted-foreground hover:text-foreground flex items-center gap-1 rounded-md py-1 text-xs transition-colors",children:[s.jsx(Y,{"aria-hidden":!0,className:m("size-3.5 transition-transform",t&&"rotate-90")}),"Preview what ",e.displayName," will see"]}),s.jsx(B,{children:s.jsx("pre",{"data-testid":"injected-prompt","data-slot":"profile-injection-preview-text",className:"bg-muted text-muted-foreground mt-1 max-h-56 overflow-auto rounded-md p-3 text-xs whitespace-pre-wrap",children:s.jsx("code",{children:o})})})]})}const le="These guide your agent but aren’t enforced. Treat them as strong instructions.",ue="Anything here can come up in any chat. Never keep secrets, passwords or keys here.",de="Your agent writes notes here as it works.",me=["Each note says where it was written.","Deleting a line makes your agent forget it."];function S(e,t){return w(e.traits,t)}const N={instructions:{title:"Custom instructions (SOUL.md)",errorLabel:"Couldn’t save your instructions",key:"soul",maxChars:Q,read:e=>b(e.soulContent??""),write:(e,t)=>({soulContent:S(e,t)}),count:(e,t)=>S(e,t).length},boundaries:{title:"Safety boundaries (NOPE.md)",errorLabel:"Couldn’t save your boundaries",key:"nope",maxChars:J,disclaimer:le,read:e=>e.nopeContent??"",write:(e,t)=>({nopeContent:t}),count:(e,t)=>t.length},memory:{title:"Agent memory (MEMORY.md)",errorLabel:"Couldn’t save your agent’s memory",key:"memory",maxChars:v,disclaimer:ue,note:de,details:me,read:e=>e.memoryContent??"",write:(e,t)=>({memoryContent:t}),count:(e,t)=>t.length}};function xe(e){const t=Math.max(0,Date.now()-e),n=Math.floor(t/6e4);return n<1?"Saved just now":n<60?`Saved ${n}m ago`:`Saved ${Math.floor(n/60)}h ago`}function he(e,t,n,o){if(e>0){const a=t>0?`. The personality block takes ${t.toLocaleString()} of them`:"";return`Too long by ${e.toLocaleString()} character${e===1?"":"s"}${a}`}return n?"Unsaved changes":o!==null?xe(o):""}function j({member:e,file:t}){const{agent:n,isPending:o,isSaving:a,update:d}=Z(e,{errorLabel:t.errorLabel}),r=n?t.read(n):"",[i,x]=u.useState(r),[c,h]=u.useState(r),[C,M]=u.useState(r),[T,R]=u.useState(null),g=i!==c;if(C!==r&&(M(r),g||(x(r),h(r))),q(g),o)return s.jsx(ee,{className:"h-40 w-full"});if(!n)return s.jsx("p",{className:"text-muted-foreground text-sm",children:"Couldn’t read this file."});const y=n.conventions??{soul:!0,nope:!0,memory:!0,dorkosKnowledge:!0},E=t.count(n,i),f=E-t.maxChars,A=E-i.length;function L(){if(!n||f>0)return;const l=i;d(t.write(n,l),()=>{h(l),R(Date.now()),se.success("Saved")})}return s.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-2","data-slot":"profile-convention",children:[s.jsx(oe,{fill:!0,title:t.title,content:i,enabled:y[t.key],maxChars:t.maxChars,charCount:E,disclaimer:t.disclaimer,onChange:x,onToggle:l=>d({conventions:{...y,[t.key]:l}})}),t.note&&s.jsx("p",{className:"text-muted-foreground shrink-0 text-xs",children:t.note}),t.details&&s.jsx(te,{className:"shrink-0",children:t.details.map(l=>s.jsx("p",{children:l},l))}),s.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[s.jsx("span",{"data-slot":"profile-convention-status",className:f>0?"text-destructive text-xs":"text-muted-foreground text-xs",children:he(f,A,g,T)}),s.jsx(ne,{size:"sm",className:"ml-auto",disabled:!g||f>0||a,onClick:L,children:"Save"})]}),s.jsx("div",{className:"shrink-0",children:s.jsx(ce,{name:n.name,displayName:n.displayName||n.name,id:n.id,description:n.description,capabilities:n.capabilities,traits:n.traits,conventions:y,soulContent:n.soulContent??"",nopeContent:n.nopeContent??"",memoryContent:n.memoryContent??"",...t.write(n,i)})})]})}function ye(e){return s.jsx(j,{...e,file:N.instructions})}function Ee(e){return s.jsx(j,{...e,file:N.boundaries})}function ve(e){return s.jsx(j,{...e,file:N.memory})}export{Ee as BoundariesPage,ye as InstructionsPage,ve as MemoryPage};
@@ -1 +0,0 @@
1
- import{j as r,i}from"./index-DpSk7iO1.js";function o({member:e}){return r.jsx(i,{member:e})}export{o as HandlePage};
@@ -1 +0,0 @@
1
- import{j as r,h as o}from"./index-DpSk7iO1.js";function a({member:e}){return r.jsx(o,{member:e})}export{a as NamePage};
@@ -1 +0,0 @@
1
- import{u as o,j as t,a as i,z as u}from"./index-DpSk7iO1.js";import{u as l}from"./use-personality-commit-PCN2Kh8p.js";import"./soul-file-11avkxYV.js";function f({member:r}){const{agent:e,isPending:a,update:n}=o(r),s=l(e,n);return a?t.jsx(i,{className:"h-40 w-full"}):e?t.jsx(u,{traits:s.traits,onTraitsChange:s.onTraitsChange,compact:!0,className:"p-1"}):t.jsx("p",{className:"text-muted-foreground p-1 text-sm",children:"Couldn’t read this agent’s personality."})}export{f as PersonalityPopover};
@@ -1 +0,0 @@
1
- import{j as t,k as r}from"./index-DpSk7iO1.js";function i({member:o}){return t.jsx(r,{member:o})}export{i as PhotoPage};
@@ -1 +0,0 @@
1
- import{e as d,f as l,j as e,a as m,g as u,C as c,M as x,H as f}from"./index-DpSk7iO1.js";function h({kind:s}){const r="text-muted-foreground size-3.5 shrink-0";return s==="dm"?e.jsx(x,{"aria-hidden":!0,className:r}):e.jsx(f,{"aria-hidden":!0,className:r})}function g(s){return s===1?"1 member":`${s} members`}function j({member:s}){var i;const r=d(),n=l(s.id);if(n.isPending)return e.jsx(m,{className:"h-16 w-full"});if(n.isError)return e.jsx("p",{className:"text-muted-foreground text-sm",children:"Couldn’t read this member’s rooms."});const a=((i=n.data)==null?void 0:i.rooms)??[];return a.length===0?e.jsxs("p",{className:"text-muted-foreground text-sm",children:[s.isSelf?"You aren’t":`${s.displayName} isn’t`," in any rooms yet."]}):e.jsx("div",{className:"flex flex-col",children:a.map(t=>{const o=e.jsxs(e.Fragment,{children:[e.jsx(h,{kind:t.kind}),e.jsx("span",{className:"min-w-0 truncate text-sm",children:u({kind:t.kind,slug:t.slug,title:t.name})}),e.jsx("span",{className:"text-muted-foreground ml-auto shrink-0 text-xs",children:g(t.memberCount)})]});return r?e.jsxs("button",{type:"button","data-slot":"profile-room-row",onClick:()=>void r({to:"/channels",search:{id:t.id}}),className:"focus-ring hover:bg-muted/50 flex h-9 items-center gap-2 rounded-md px-2 text-left transition-colors",children:[o,e.jsx(c,{"aria-hidden":!0,className:"text-muted-foreground/70 size-3.5 shrink-0"})]},t.id):e.jsx("div",{"data-slot":"profile-room-row",className:"flex h-9 items-center gap-2 rounded-md px-2",children:o},t.id)})})}export{j as RoomsPage};
@@ -1 +0,0 @@
1
- import{r as k,j as e,cU as Ce,cs as Se,J as Ee,al as N,cV as de,cW as ie,cX as ce,cY as ue,cZ as fe,c_ as ye,af as we,aj as Te,c$ as Ae,d0 as me,d1 as ke,d2 as xe,d3 as Le,d4 as Ie,d5 as De,d6 as j,d7 as Oe,d8 as Pe,d9 as _e,da as Ue,db as $e,dc as H,dd as Re,de as A,df as He,dg as pe,B as Me,dh as Be,u as ze,a as Ke,di as Ve,dj as qe,dk as Qe,dl as We,dm as Xe,dn as Fe}from"./index-DpSk7iO1.js";const Ye={duration:.12,ease:"easeOut"},Ge={type:"spring",stiffness:320,damping:28};function he({isSetHere:a,serverDefault:l,onUseServerDefault:i,warning:r,className:s,"data-testid":d}){const[u,f]=k.useState(!1),o=a?"Set here":`Server default · ${l??"none"}`,n=a&&!!i,x=e.jsxs("span",{className:N("text-3xs inline-flex h-5 items-center gap-1 rounded-full px-2 leading-none whitespace-nowrap",r?de.warning:de.neutral,n&&"hover:bg-accent hover:text-accent-foreground transition-colors",s),"data-testid":d,children:[r&&e.jsx(Ce,{className:"size-2.5 shrink-0","aria-hidden":!0}),e.jsx(Se,{mode:"wait",initial:!1,children:e.jsx(Ee.span,{initial:{opacity:0,y:2},animate:{opacity:1,y:0,transition:Ge},exit:{opacity:0},transition:Ye,children:o},o)})]});return n?e.jsxs(ie,{open:u,onOpenChange:f,children:[e.jsx(ce,{asChild:!0,children:e.jsx("button",{type:"button","aria-label":`Set here${r?`: ${r}`:""}`,children:x})}),e.jsxs(ue,{className:"w-64 p-2",align:"start",children:[e.jsx(fe,{children:"Where this value comes from"}),r&&e.jsx("p",{className:N("px-2 pt-1 text-xs",ye.warning),children:r}),e.jsxs("button",{type:"button",onClick:()=>{i(),f(!1)},className:"hover:bg-accent mt-1 w-full rounded-md px-2 py-1.5 text-left text-sm transition-colors","data-testid":d?`${d}-reset`:void 0,children:["Use server default",l?e.jsxs("span",{className:"text-muted-foreground block text-xs",children:["Currently ",l]}):e.jsx("span",{className:"text-muted-foreground block text-xs",children:"Not set. Uses the built-in default."})]})]})]}):r?e.jsx("span",{title:r,"aria-label":`${o}: ${r}`,children:x}):x}const Je=["agents"];function Ze(a){const l=we(),i=Te();return Ae({...a!=null&&a.errorLabel?{meta:{errorLabel:a.errorLabel}}:{},mutationFn:r=>l.updateMeshAgent(r.id,r.updates),onSuccess:()=>{i.invalidateQueries({queryKey:["mesh","agents"]})},onSettled:()=>{i.invalidateQueries({queryKey:Je})}})}const be="text-muted-foreground text-3xs font-medium tracking-wider uppercase";function $({label:a,valueLabel:l,options:i,selected:r,isSetHere:s,serverDefault:d,warning:u,onSelect:f,onInherit:o,testId:n,showHeader:x=!0,className:C,describedBy:m,inheritText:L}){const I=me(),[S,b]=k.useState(!1);return e.jsxs("div",{className:N("space-y-1",C),children:[x&&e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:be,children:a}),!I&&e.jsx(he,{isSetHere:s,serverDefault:d,warning:u,onUseServerDefault:o,"data-testid":`${n}-chip`})]}),e.jsxs(ie,{open:S,onOpenChange:b,children:[e.jsx(ce,{asChild:!0,children:e.jsxs("button",{type:"button",className:"border-input hover:bg-accent flex h-8 w-full items-center gap-1 rounded-md border px-2 text-sm transition-colors",...m?{"aria-describedby":m}:{},"data-testid":n,children:[e.jsx("span",{className:N("truncate",u?"text-status-warning-fg":s?"md:text-foreground text-status-warning-fg":"md:text-foreground text-status-success-fg"),children:l}),e.jsx(Be,{className:"text-muted-foreground ml-auto size-3.5 shrink-0"})]})}),e.jsxs(ue,{className:"w-64 p-1",align:"start",children:[e.jsx(fe,{children:a}),e.jsx("div",{className:"max-h-72 overflow-y-auto",children:i.map(c=>e.jsxs("button",{type:"button","data-testid":`${n}-option-${c.value}`,onClick:()=>{f(c.value),b(!1)},className:N("hover:bg-accent w-full rounded-md px-2 py-1.5 text-left text-sm transition-colors",c.value===r&&"bg-accent"),children:[c.label,c.hint&&e.jsx("span",{className:"text-muted-foreground block text-xs",children:c.hint})]},c.value))}),e.jsx("button",{type:"button",onClick:()=>{o(),b(!1)},className:"hover:bg-accent border-border text-muted-foreground mt-1 w-full border-t px-2 py-2 text-left text-xs transition-colors","data-testid":`${n}-inherit`,children:L??(d?`Use server default: ${d}`:"Use server default")})]})]})]})}function et({agent:a,onUpdate:l,className:i}){var Z,ee,te,se,ae,ne,le,oe,re;const r=me(),{data:s}=ke(),{data:d,isPending:u}=xe(),f=((Z=s==null?void 0:s.executionDefaults)==null?void 0:Z.runtime)??"claude-code",o=a.runtime??f,n=(ee=s==null?void 0:s.executionDefaults)==null?void 0:ee.perRuntime.find(t=>t.runtime===o),{data:x}=Le(),C=Ie(a,{defaultRuntime:f,runtimeDeclaresCredits:t=>{var h;return((h=d==null?void 0:d.capabilities[t])==null?void 0:h.credits)!==void 0},credits:(te=s==null?void 0:s.claudeCode)==null?void 0:te.credits,runtimeDefaultsToCredits:t=>{var h,T;return((T=(h=x==null?void 0:x.defaults)==null?void 0:h[t])==null?void 0:T.runsOn)==="credits"}}),{data:m,isError:L}=De({runtime:o,...C?{account:j}:{}}),I=a.model!=null,S=a.effort!=null,b=(n==null?void 0:n.model)??null,c=C&&(m??[]).some(t=>t.paidFromCredits),E=c?(m??[]).find(t=>t.isDefault):void 0,w=a.model??b??(E==null?void 0:E.value)??null,p=w?(m??[]).find(t=>t.value===w):void 0,D=(n==null?void 0:n.supportsEffort)??((se=Oe(d,o))==null?void 0:se.supportsEffort),M=D===void 0&&u,B=D!==!1,z=p?p.supportsEffort??!1:void 0,K=(ae=s==null?void 0:s.claudeCode)==null?void 0:ae.accounts,{nameFor:V,creditsEntry:ge,resolvedAccount:q}=Pe(),Q=ge??(a.account===j&&((ne=s==null?void 0:s.claudeCode)!=null&&ne.credits)?{path:s.claudeCode.credits.path}:null),g=K&&[...K.flatMap(t=>t.id===null?[]:[{id:t.id,label:V(t.path),path:t.path}]),...Q?[{id:j,label:_e,path:Q.path}]:[]],v=a.account??null,W=v!==null,X=o==="claude-code"&&v===j&&((le=s==null?void 0:s.claudeCode)==null?void 0:le.credits)!==void 0&&!s.claudeCode.credits.allowedAgents.includes(a.id),O=s!=null&&s.claudeCode&&q?V(q):null,P=Ze({errorLabel:"Couldn’t change this agent’s account"}),_=k.useCallback(t=>{P.mutate({id:a.id,updates:{account:t}})},[a.id,P]),ve=Ue({agent:{runtime:a.runtime,model:a.model,effort:a.effort,account:a.account},defaultRuntime:f,serverDefaultModel:b,knownModels:$e(m),knownAccounts:g,accountsUnavailable:(oe=s==null?void 0:s.claudeCode)==null?void 0:oe.accountsUnavailable,modelSupportsEffort:z,runtimeSupportsEffort:D,runtimeLabel:t=>H(t).label}),y=t=>{var h;return((h=ve.breakages.find(T=>t.includes(T.kind)))==null?void 0:h.message)??null},U=!M&&B&&z!==!1,F=a.effort??(n==null?void 0:n.effort)??null,Y=H(o).label,je=o==="claude-code"&&g!==void 0&&(g.length>1||W),Ne=y(["account-unregistered"]),G=(m??[]).some(t=>t.unverified),J=k.useId();return e.jsxs("div",{className:N("grid grid-cols-2 gap-3",i),children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx($,{label:"Model",valueLabel:(p==null?void 0:p.displayName)??w??(c?"Default":"Automatic"),options:[...(m??[]).map(t=>({value:t.value,label:t.displayName,hint:t.description}))],selected:w,isSetHere:I,serverDefault:(n==null?void 0:n.model)??null,warning:y(["model-unavailable"]),onSelect:t=>l({model:t}),onInherit:()=>l({model:null}),testId:"agent-model-row",describedBy:G?J:void 0,inheritText:c&&!b?E?`Use the suggested model: ${E.displayName}`:"Use the default model":void 0}),G&&e.jsx(Re,{id:J}),c&&(m??[]).some(t=>t.creditsListOutOfDate)&&e.jsx("p",{className:"text-muted-foreground text-xs","data-testid":"agent-credits-models-out-of-date",children:"The models your DorkOS credits cover may be out of date."}),C&&L&&e.jsx("p",{className:"text-muted-foreground text-xs","data-testid":"agent-credits-models-unavailable",children:"Couldn’t load the models DorkOS credits cover. Try again in a moment."})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:be,children:"Effort"}),(!r||!U)&&(S||U)&&e.jsx(he,{isSetHere:S,serverDefault:n!=null&&n.effort?A(n.effort):null,warning:y(["effort-unsupported-runtime","effort-unsupported-model"]),onUseServerDefault:()=>l({effort:null}),"data-testid":"agent-effort-row-chip"})]}),M?e.jsx(R,{testId:"agent-effort-pending",text:`Checking what ${Y} supports`,warning:null}):B?U?e.jsx($,{label:"Effort",valueLabel:A(F),options:He.filter(t=>!(p!=null&&p.supportedEffortLevels)||p.supportedEffortLevels.includes(t)).map(t=>({value:t,label:A(t)})),selected:F,isSetHere:S,serverDefault:n!=null&&n.effort?A(n.effort):null,warning:null,showHeader:!1,onSelect:t=>l({effort:t}),onInherit:()=>l({effort:null}),testId:"agent-effort-row"}):e.jsx(R,{testId:"agent-effort-unsupported-model",text:"This model doesn’t take an effort setting",warning:y(["effort-unsupported-model"])}):e.jsx(R,{testId:"agent-effort-unsupported-runtime",text:`Not supported by ${Y}`,warning:y(["effort-unsupported-runtime"])})]}),je&&e.jsx($,{label:"Account",valueLabel:X?O??"Default":v!==null?((re=g==null?void 0:g.find(t=>t.id===v))==null?void 0:re.label)??v:O??"Default",options:(g??[]).map(t=>({value:t.id,label:t.label,hint:t.id===j?"Paid from your DorkOS account":pe(t.path)})),selected:v,isSetHere:W,serverDefault:O,warning:Ne,onSelect:t=>_(t),onInherit:()=>_(null),testId:"agent-account-row",className:"col-span-full"}),X&&e.jsxs("div",{className:"text-muted-foreground col-span-full flex flex-wrap items-center gap-2 text-xs","data-testid":"agent-credits-not-allowed",children:[e.jsx("span",{children:"This agent’s settings name DorkOS credits. It uses your default until you allow it."}),e.jsx(Me,{size:"sm",variant:"outline",className:"h-6 px-2 text-xs",disabled:P.isPending,onClick:()=>_(j),children:"Allow"})]})]})}function R({text:a,warning:l,testId:i}){return e.jsxs("div",{className:"flex h-8 flex-col justify-center","data-testid":i,children:[e.jsx("p",{className:"text-muted-foreground text-xs",children:a}),l&&e.jsx("p",{className:"text-status-warning-fg text-xs",children:l})]})}const tt="text-muted-foreground text-3xs font-medium tracking-wider uppercase";function at({member:a}){const{agent:l,projectPath:i,isPending:r,update:s}=ze(a),{data:d}=xe();if(r)return e.jsx(Ke,{className:"h-24 w-full"});if(!l)return e.jsx("p",{className:"text-muted-foreground p-1 text-sm",children:"Couldn’t read this agent’s settings."});const u=d?Object.keys(d.capabilities):[l.runtime],f=u.includes(l.runtime)?u:[l.runtime,...u];return e.jsxs("div",{className:"space-y-3 p-1","data-slot":"profile-runs-on",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:tt,children:"Runs on"}),e.jsxs(Ve,{value:l.runtime??"claude-code",onValueChange:o=>s({runtime:o}),children:[e.jsx(qe,{className:"h-8 text-sm",responsive:!1,children:e.jsx(Qe,{})}),e.jsx(We,{children:f.map(o=>e.jsx(Xe,{value:o,responsive:!1,children:H(o).label},o))})]})]}),e.jsx(et,{agent:l,onUpdate:s,className:"grid-cols-1"}),i&&e.jsxs("div",{className:"text-muted-foreground flex min-w-0 items-center gap-1.5",children:[e.jsx(Fe,{"aria-hidden":!0,className:"size-3.5 shrink-0"}),e.jsx("span",{className:"min-w-0 truncate font-mono text-xs",children:pe(i)})]})]})}export{at as RunsOnPopover};
@@ -1,6 +0,0 @@
1
- import{ec as de,fa as me,fb as fe,af as O,r as f,fc as xe,fd as pe,fe as ge,ff as he,b3 as M,fg as ve,m as je,fh as be,fi as ye,fj as Ce,d8 as _,fk as Ne,fl as we,fm as Se,fn as ke,j as e,fo as Ae,fp as Re,fq as Me,fr as D,ao as V,fs as Te,cs as Ie,J as A,ft as Le,fu as Pe,bs as S,dc as Ee,fv as ze,al as R,fw as B,fx as De,fy as Fe,fz as K,aG as G,fA as U,fB as T,ct as I,cu as L,fC as q,fD as Oe,fE as Q,dh as _e,fF as $,fG as H,cv as P,cV as W,fH as Ve,fI as Be,fJ as Ke,az as Ge,fK as Ue,aA as qe,aB as Qe,aC as $e,aD as He,fL as We,e as Je,aj as Xe,fM as Ye,fN as Ze,a as et,fO as tt,I as nt,fP as st,fQ as at,fR as it,cT as ot}from"./index-DpSk7iO1.js";/**
2
- * @license lucide-react v1.48.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const J={name:"git-fork",size:24,node:[["circle",{cx:"12",cy:"18",r:"3",key:"1mpf1b"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["path",{d:"M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9",key:"1uq4wg"}],["path",{d:"M12 12v3",key:"158kv8"}]]};J.node;const X=de(J);function rt(){const t=me(),n=fe(a=>a.contextReadings),s=O(),o=f.useMemo(()=>Array.from(new Set(t.map(a=>a.runtime))),[t]),i=f.useCallback(a=>{const u={};return o.forEach((l,p)=>{var m;const d=(m=a[p])==null?void 0:m.data;if(!d)return;const j={};for(const x of d)x.contextWindow!=null&&(j[x.value]=x.contextWindow);u[l]=j}),u},[o]),r=xe({queries:o.map(a=>pe(s,{runtime:a})),combine:i});return f.useMemo(()=>{var u;const a={total:0,known:0,unknown:0,warning:0,critical:0,autoCompacted:0};for(const l of t){a.total+=1;const p=l.model?(u=r[l.runtime])==null?void 0:u[l.model]:void 0,d=ge(l,{reading:n[l.id]??null,window:p});d.autoCompactedAt&&(a.autoCompacted+=1),d.status==="known"?(a.known+=1,d.severity==="warning"?a.warning+=1:d.severity==="critical"&&(a.critical+=1)):a.unknown+=1}return a},[t,n,r])}function lt(t,n,s){return t&&n!==void 0&&!s}function Y(t,n,s,o="borderLeftColor"){const i=he()??!1,r=lt(t,s,i);return f.useMemo(()=>!r||!s?{animate:void 0,transition:void 0,pulsing:!1}:{animate:{[o]:[n,s,n]},transition:{[o]:{duration:2,repeat:1/0,ease:"easeInOut"}},pulsing:!0},[r,n,s,o])}function Z({value:t,onCommit:n,onEnd:s}){const[o,i]=f.useState(!1),[r,a]=f.useState(""),u=f.useRef(null),l=f.useRef(!1),p=M(t),d=M(n),j=M(s);f.useEffect(()=>{if(!o)return;l.current=!1;const c=requestAnimationFrame(()=>{var h,v;(h=u.current)==null||h.focus(),(v=u.current)==null||v.select()});return()=>cancelAnimationFrame(c)},[o]);const m=f.useCallback(()=>{var c;i(!1),(c=j.read())==null||c()},[j]),x=f.useCallback(()=>{a(p.read()),i(!0)},[p]),g=f.useCallback(()=>{if(l.current)return;l.current=!0,m();const c=r.trim();c.length===0||c===p.read()||d.read()(c)},[m,r,p,d]),y=f.useCallback(()=>{l.current=!0,m()},[m]),N=f.useCallback(c=>{c.key==="Enter"?(c.preventDefault(),g()):c.key==="Escape"&&(c.preventDefault(),y())},[g,y]);return{isRenaming:o,renameValue:r,setRenameValue:a,inputRef:u,start:x,commit:g,cancel:y,handleKeyDown:N}}function ee(t){const n=ve(t.id,{enabled:!1,fallback:t.permissionMode})??t.permissionMode,s=je(t.runtime),o=s==null?void 0:s.permissionModes.values.find(r=>r.id===n),i=o?be(o):ye(n);return{permissionMode:n,isFullPower:i}}function te(t){var x,g;const n=Ce(t.runtime),{accounts:s,nameFor:o,colorFor:i}=_(),r=Ne(t.id),a=t.accountId??null,u=t.account??null,l=we(n?t.runtime:null,{accountId:a,path:u}),{name:p,color:d}=Se({accountId:a,path:u,accounts:s,usage:l,nameFor:o,colorFor:i});if(!n)return{visible:n,name:p,color:d,limitStatus:null,limitDisplay:null};const j=r?r.limit:((x=t.status)==null?void 0:x.limit)??null,m=(r==null?void 0:r.lifecycle)??((g=t.status)==null?void 0:g.lifecycle)??"idle";return{visible:n,name:p,color:d,limitStatus:{lifecycle:m,limit:j},limitDisplay:ke(j)}}function ne({children:t,onRename:n,onFork:s}){return!n&&!s?e.jsx(e.Fragment,{children:t}):e.jsxs(Ae,{children:[e.jsx(Re,{asChild:!0,children:t}),e.jsxs(Me,{className:"w-44",children:[n&&e.jsxs(D,{onClick:n,children:[e.jsx(V,{className:"mr-2 size-4"}),"Rename"]}),n&&s&&e.jsx(Te,{}),s&&e.jsxs(D,{onClick:s,children:[e.jsx(X,{className:"mr-2 size-4"}),"Fork session"]})]})]})}const k="font-mono select-all";function F(t){try{return new Date(t).toLocaleString([],{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return t}}function ct({session:t,expanded:n,onFork:s,className:o}){var p;const{permissionMode:i,isFullPower:r}=ee(t),a=r?"Full power":De(i),{nameFor:u}=_(),l=t.account?u(t.account):null;return e.jsx(Ie,{initial:!1,children:n&&e.jsx(A.div,{variants:Pe,initial:"initial",animate:"animate",exit:"exit",transition:Le,className:"relative z-10 overflow-hidden","data-slot":"session-details-panel",children:e.jsxs("div",{className:R("text-muted-foreground text-2xs mx-2 space-y-1.5 px-3 pt-2 pb-2",o),children:[e.jsx(S,{label:"Session ID",align:"start",copyValue:t.id,valueClassName:k,children:t.id}),e.jsx(S,{label:"Created",align:"start",valueClassName:k,children:F(t.createdAt)}),e.jsx(S,{label:"Updated",align:"start",valueClassName:k,children:F(t.updatedAt)}),e.jsx(S,{label:"Runs on",align:"start",valueClassName:k,children:Ee(t.runtime).label}),l&&e.jsx(S,{label:"Account",align:"start",copyValue:t.account,valueClassName:k,children:l}),e.jsx(S,{label:"Origin",align:"start",valueClassName:k,children:t.originLabel??((p=ze(t.origin))==null?void 0:p.label)??"You"}),e.jsx(S,{label:"Permissions",align:"start",valueClassName:R(k,r&&B.power),children:a}),s&&e.jsxs("button",{type:"button",onClick:d=>{d.stopPropagation(),s(t.id)},className:"hover:bg-secondary/80 text-muted-foreground/60 hover:text-muted-foreground mt-1 inline-flex items-center gap-1 rounded px-1.5 py-0.5 transition-colors duration-100","aria-label":"Fork session",children:[e.jsx(X,{className:"size-(--size-icon-xs)"}),e.jsx("span",{children:"Fork"})]})]})})})}function se({account:t,tooltip:n=!0,className:s}){return!t.visible||!t.name||!t.color?null:e.jsx(Fe,{color:t.color,name:t.name,tooltip:n,className:s})}function ut({session:t,isActive:n,onClick:s,onFork:o,onRename:i,isNew:r=!1}){const[a,u]=f.useState(!1),{isRenaming:l,renameValue:p,setRenameValue:d,inputRef:j,start:m,commit:x,handleKeyDown:g}=Z({value:t.title,onCommit:b=>i==null?void 0:i(t.id,b)}),{isFullPower:y}=ee(t),N=K(6e4),c=f.useMemo(()=>G(t.updatedAt),[t.updatedAt,N]),h=te(t),v=h.limitDisplay,C=U(t.id,h.limitStatus),w=h.visible&&h.color?h.name:null,E=[w,C.kind==="idle"?null:C.label].filter(Boolean).join(" · "),ae=[`Session: ${T(t.title)}`,w,v==null?void 0:v.text,C.label].filter(Boolean).map(b=>`${b}.`).join(" "),ie=f.useCallback(b=>{b.stopPropagation(),u(ue=>!ue)},[]),oe=f.useCallback(b=>{b.stopPropagation(),m()},[m]),{animate:re,transition:le,initial:ce,pulsing:z}=mt({isNew:r,borderState:C});return e.jsx(I,{children:e.jsxs(A.div,{"data-testid":"session-row",initial:ce,animate:re,transition:le,"data-pulsing":z?"true":"false","data-limit":v?v.needsAction?"action":"waiting":void 0,style:z?void 0:{borderLeftColor:C.color},className:R("group relative rounded-lg border-l-2 transition-colors duration-150",(v==null?void 0:v.needsAction)&&W.error,n?"text-foreground":"hover:bg-secondary/60"),children:[n&&e.jsx(A.div,{layoutId:"active-session-bg",className:"bg-secondary absolute inset-0 rounded-lg",transition:{type:"spring",stiffness:280,damping:32}}),e.jsx(ne,{onRename:i?m:void 0,onFork:o?()=>o(t.id):void 0,children:e.jsx(L,{asChild:!0,disabled:!E,children:e.jsxs(A.div,{onClick:s,tabIndex:-1,whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:30},className:"relative z-10 cursor-pointer px-3 py-2",children:[e.jsx("button",{type:"button","data-slot":"session-row-open","aria-current":n?"page":void 0,"aria-label":ae,className:"absolute inset-0 cursor-pointer"}),e.jsxs("div",{className:"relative",children:[e.jsxs("div",{className:"text-muted-foreground flex items-center gap-1 text-xs",children:[v?e.jsx("span",{className:R("min-w-0 flex-1 truncate",v.needsAction&&q),children:v.text}):e.jsx("span",{className:"min-w-0 flex-1",children:c}),e.jsxs("span",{className:"flex flex-shrink-0 items-center gap-1",children:[e.jsx(Oe,{session:t}),C.kind==="pendingApproval"&&e.jsx(Q,{className:"text-status-warning-fg size-(--size-icon-xs)","aria-label":"Awaiting your approval"}),y&&e.jsx(dt,{}),i&&!l&&e.jsx("button",{type:"button",onClick:oe,className:"text-muted-foreground/60 hover:text-muted-foreground rounded p-0.5 opacity-0 transition-opacity duration-150 group-hover:opacity-100 focus-visible:opacity-100 max-md:p-1.5 max-md:opacity-100","aria-label":"Rename session",children:e.jsx(V,{className:"size-(--size-icon-xs)"})}),e.jsx("button",{type:"button",onClick:ie,className:R("rounded p-0.5 transition-opacity duration-150 max-md:p-1.5",a?"text-muted-foreground opacity-100":"text-muted-foreground/60 hover:text-muted-foreground opacity-0 group-hover:opacity-100 focus-visible:opacity-100 max-md:opacity-100"),"aria-label":"Session details","aria-expanded":a,children:e.jsx(A.div,{animate:{rotate:a?180:0},transition:{type:"spring",stiffness:400,damping:30},children:e.jsx(_e,{className:"size-(--size-icon-sm)"})})})]})]}),l?e.jsx("input",{ref:j,autoFocus:!0,value:p,onChange:b=>d(b.target.value),onBlur:x,onKeyDown:g,onClick:b=>b.stopPropagation(),className:"bg-background text-foreground mt-0.5 w-full rounded border px-1 text-xs outline-none","aria-label":"Session title"}):e.jsxs("div",{className:"mt-0.5 flex items-center gap-1.5",children:[e.jsx($,{origin:t.origin,label:t.originLabel,className:"text-muted-foreground/50"}),e.jsx(H,{type:t.runtime,model:t.model,className:"text-muted-foreground/50"}),e.jsx(se,{account:h,tooltip:!1}),e.jsx("div",{className:"text-muted-foreground min-w-0 flex-1 truncate text-xs",title:i?"Click the pencil icon to rename":void 0,children:T(t.title)})]})]})]})})}),e.jsx(P,{side:"right",sideOffset:8,children:E||C.label}),e.jsx(ct,{session:t,expanded:a,className:"border-border/30 border-t",...o?{onFork:o}:{}})]})})}function dt(){return e.jsxs(I,{children:[e.jsx(L,{asChild:!0,children:e.jsx("button",{type:"button",className:"inline-flex cursor-help","aria-label":Ve,onClick:t=>t.stopPropagation(),children:e.jsx(Be,{className:`size-(--size-icon-xs) ${B.power}`})})}),e.jsx(P,{side:"top",sideOffset:4,children:"This chat runs commands without asking."})]})}function mt({isNew:t,borderState:n}){const{animate:s,transition:o,pulsing:i}=Y(n.pulse,n.color,n.dimColor);return f.useMemo(()=>{if(!(t||i))return{initial:void 0,animate:void 0,transition:void 0,pulsing:i};const a={...t?{opacity:1,y:0}:{},...s},u={...t?{opacity:{duration:.2,ease:[0,0,.2,1]},y:{duration:.2,ease:[0,0,.2,1]}}:{},...o};return{initial:t?{opacity:0,y:-8}:void 0,animate:a,transition:u,pulsing:i}},[t,i,s,o])}function ft({session:t,isActive:n,onClick:s,onFork:o,onRename:i}){const{isRenaming:r,renameValue:a,setRenameValue:u,inputRef:l,start:p,commit:d,handleKeyDown:j}=Z({value:t.title,onCommit:w=>i==null?void 0:i(t.id,w)}),m=te(t),x=m.limitDisplay,g=U(t.id,m.limitStatus),y=[m.visible&&m.color?m.name:null,g.kind==="idle"?null:g.label].filter(Boolean).join(" · "),N=K(6e4),c=f.useMemo(()=>G(t.updatedAt),[t.updatedAt,N]),{animate:h,transition:v,pulsing:C}=Y(g.pulse,g.color,g.dimColor,"backgroundColor");return e.jsxs(I,{children:[e.jsx(ne,{onRename:i?p:void 0,onFork:o?()=>o(t.id):void 0,children:e.jsx(L,{asChild:!0,children:e.jsxs("button",{type:"button","data-testid":"session-row","data-limit":x?x.needsAction?"action":"waiting":void 0,onClick:s,className:R("flex w-full items-center gap-2 rounded-md px-2.5 py-1.5 text-left text-xs",Ke,(x==null?void 0:x.needsAction)&&W.error,n?"bg-secondary text-foreground":"text-muted-foreground hover:bg-accent hover:text-foreground"),children:[e.jsx(A.span,{"aria-hidden":!0,"data-pulsing":C?"true":"false",animate:h,transition:v,style:C?void 0:{backgroundColor:g.color},className:"size-1.5 shrink-0 rounded-full"}),e.jsx(se,{account:m,tooltip:!1}),r?e.jsx("input",{ref:l,autoFocus:!0,value:a,onChange:w=>u(w.target.value),onBlur:d,onKeyDown:j,onClick:w=>w.stopPropagation(),className:"bg-background text-foreground min-w-0 flex-1 rounded border px-1 text-xs outline-none","aria-label":"Session title"}):e.jsx("span",{className:"min-w-0 flex-1 truncate",children:T(t.title)}),e.jsxs("span",{className:"flex shrink-0 items-center gap-1",children:[g.kind==="pendingApproval"&&e.jsx(Q,{className:"text-status-warning-fg size-(--size-icon-xs)","aria-label":"Awaiting approval"}),e.jsx($,{origin:t.origin,label:t.originLabel,className:"text-muted-foreground/50"}),e.jsx(H,{type:t.runtime,model:t.model,className:"text-muted-foreground/50"}),x?e.jsx("span",{className:R("text-3xs whitespace-nowrap",x.needsAction?q:"text-muted-foreground"),children:x.text}):e.jsx("span",{className:"text-muted-foreground text-3xs",children:c})]})]})})}),y&&e.jsx(P,{side:"right",sideOffset:8,children:y})]})}function xt({variant:t,session:n,isActive:s,onClick:o,onFork:i,onRename:r,isNew:a}){return t==="compact"?e.jsx(ft,{session:n,isActive:s,onClick:o,onFork:i,onRename:r}):e.jsx(ut,{session:n,isActive:s,onClick:o,onFork:i,onRename:r,isNew:a})}function pt(){const{known:t,warning:n,critical:s,autoCompacted:o}=rt(),i=n+s;if(t===0&&i===0&&o===0)return null;const r=i>0||o>0,a=r?s>0?"bg-red-500":i>0?"bg-amber-500":"bg-muted-foreground/40":"bg-emerald-500",u=r?[i>0?`${i} near full`:null,o>0?`${o} auto-compacted`:null].filter(Boolean).join(" · "):"All sessions have room.";return e.jsxs("div",{className:"text-muted-foreground flex items-center gap-2 border-b px-3 py-1.5 text-xs","data-testid":"fleet-context-bar",children:[e.jsx("span",{className:`size-2 shrink-0 rounded-full ${a}`,"aria-hidden":"true"}),e.jsx("span",{className:"truncate",children:u})]})}function gt({activeSessionId:t,groupedSessions:n,onSessionClick:s,onForkSession:o,onRenameSession:i}){const r=f.useId();return e.jsxs(Ge,{type:"scroll",className:"h-full",viewportClassName:"[&>div]:!block",children:[e.jsx(pt,{}),e.jsx(A.div,{layout:!0,children:e.jsx(Ue,{id:r,children:n.length>0?e.jsx(e.Fragment,{children:n.map(a=>{const u=n.length===1&&a.label==="Today";return e.jsxs(qe,{children:[!u&&e.jsx(Qe,{className:"text-2xs text-muted-foreground/70 font-medium tracking-wider uppercase",children:a.label}),e.jsx($e,{children:a.sessions.map(l=>e.jsx(He,{children:e.jsx(xt,{variant:"full",session:l,isActive:l.id===t,onClick:()=>s(l.id),onFork:o,onRename:i})},l.id))})]},a.label)})}):e.jsx("div",{className:"flex h-32 items-center justify-center",children:e.jsx("p",{className:"text-muted-foreground/60 text-sm",children:"No conversations yet"})})})})]})}function ht(t,n){return n===""?!0:(t.title??"").toLowerCase().includes(n)}function jt({member:t}){var N;const n=((N=t.agent)==null?void 0:N.projectPath)??null,{sessions:s,isLoading:o,isError:i,activeSessionId:r}=We(n),a=Je(),u=O(),l=Xe(),p=Ye(n),[d,j]=f.useState(""),m=d.trim().toLowerCase(),x=f.useMemo(()=>Ze(s.filter(c=>ht(c,m))),[s,m]);function g(c){!a||n===null||(st.getState().recordOpened("agent",n),a(at({dir:n,session:c})))}async function y(c){try{const h=await u.forkSession(c,void 0,n??void 0);await l.invalidateQueries({queryKey:it.listRoot}),g(h.id)}catch(h){ot.error("Couldn’t branch off this conversation.",{description:h instanceof Error?h.message:"The original is untouched."})}}return o?e.jsx(et,{className:"h-16 w-full"}):i?e.jsxs("p",{className:"text-muted-foreground text-sm",children:["Couldn’t read ",t.displayName,"’s conversations."]}):s.length===0?e.jsxs("p",{className:"text-muted-foreground text-sm",children:["No conversations yet. Message ",t.displayName," to start one."]}):e.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-2",children:[e.jsxs("div",{className:"relative shrink-0",children:[e.jsx(tt,{"aria-hidden":!0,className:"text-muted-foreground pointer-events-none absolute top-1/2 left-2 size-3.5 -translate-y-1/2"}),e.jsx(nt,{value:d,onChange:c=>j(c.target.value),placeholder:"Search conversations","aria-label":"Search conversations",className:"h-8 pl-7 text-sm"})]}),x.length===0?e.jsxs("p",{className:"text-muted-foreground text-sm",children:["No conversation matches “",d.trim(),"”."]}):e.jsx("div",{className:"min-h-0 flex-1 overflow-auto",children:e.jsx(gt,{activeSessionId:r,groupedSessions:x,onSessionClick:g,onForkSession:c=>void y(c),onRenameSession:(c,h)=>p.mutate({sessionId:c,title:h})})})]})}export{jt as SessionsPage};
@@ -1 +0,0 @@
1
- import{af as b,ai as B,f1 as p,f2 as g,aj as C,c$ as A,cT as z,f3 as M,j as e,f4 as O,r as d,dh as H,al as N,B as j,cU as I,cV as y,f5 as w,eC as W,eD as q,eE as K,eF as Q,eG as U,eH as G,eI as J,eJ as Y,e as E,f6 as R,f7 as V,$ as X,a as $,f8 as Z,f9 as L,W as P}from"./index-DpSk7iO1.js";function D(s){const t=b();return B({queryKey:p.status(s),queryFn:()=>t.getHarnessStatus(s),staleTime:3e4,refetchOnMount:"always"})}const ee={native:"reads it",projected:"shared",drifted:"out of date",dropped:"can’t see it",warned:"may not work",conflict:"blocked","pending-approval":"needs your OK"},se={native:"neutral",projected:"neutral",drifted:"info",dropped:"muted",warned:"warning",conflict:"warning","pending-approval":"warning"},k="\0",te=new Set(["native","projected"]);function T(s){return`${s.scope??"project"}${k}${s.artifact}${k}${s.source??""}${k}${s.name}`}function ne(s,t){return`${g[s]} ${ee[t]}`}function ae(s){return s.reason??s.target}function _(s,t){return t.flatMap(n=>{const a=s.cells[n];return a===void 0?[]:[{harness:n,cell:a}]})}function re(s,t){if(t.length===0)return!1;const n=_(s,t);return n.length===t.length&&n.every(({cell:a})=>{var r;return te.has(a.state)&&!((r=a.warnings)!=null&&r.length)})}function S(s){return`${s} ${s===1?"file":"files"}`}function le(s){return s===1?"One package is waiting for your approval.":`${s} packages are waiting for your approval.`}function ie(s){return`Shared with all ${s}`}function oe(s){return s===1?"1 agent file":`${s} agent files`}function ce(s){return`Agent files ${s} can’t see: skills, rules, commands and more.`}function de(s){return s===1?"1 entry":`${s} entries`}function ue(s,t){return t.flatMap(n=>{const a=s.flatMap(r=>{const l=r.cells[n];return l===void 0||l.state!=="dropped"?[]:[{key:T(r),artifact:r.artifact,name:r.name,...l.reason===void 0?{}:{reason:l.reason}}]});return a.length===0?[]:[{harness:n,label:g[n],entries:a}]})}const xe={drop:"Not shared",warning:"Couldn’t read",write:"Will be written",notice:"Notice"};function fe(s){return`${xe[s.kind]} · ${s.artifact} ${s.name}`}function me(s){const t=b(),n=C();return A({mutationFn:()=>t.syncHarness(s),meta:{errorLabel:"Couldn’t share your agent files"},onSuccess:a=>{n.setQueryData(p.status(s),a.status),z.success("Agent files updated.")}})}function he(s){const t=C();M("approval_resolved",()=>{t.invalidateQueries({queryKey:p.status(s)})})}function pe({result:s,onDismiss:t}){const{applied:n,removals:a,askedAbout:r}=s;return e.jsx(O,{variant:"neutral",onDismiss:t,dismissLabel:"Dismiss what changed","data-slot":"harness-sync-summary",children:e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsxs("p",{children:[e.jsx("span",{className:"font-medium",children:"Agent files updated."}),n>0&&e.jsxs(e.Fragment,{children:[" ",S(n)," written."]})]}),a.length>0&&e.jsxs("div",{className:"flex flex-col gap-0.5",children:[e.jsxs("p",{className:"font-medium",children:["Removed ",S(a.length)," DorkOS put here:"]}),e.jsx("ul",{className:"flex flex-col gap-0.5",children:a.map(({path:l,reason:c})=>e.jsxs("li",{className:"text-3xs flex flex-col",children:[e.jsx("code",{className:"font-mono",children:l}),e.jsx("span",{className:"opacity-80",children:c})]},l))})]}),r.length>0&&e.jsx("p",{children:le(r.length)})]})})}function ge(s){const{counts:t,sweepPreview:n}=s;return t.drifted>0||n.length>0?{message:"Some agent files are out of date.",variant:n.length>0?"warning":"info",actionable:!0}:t.conflicts>0?{message:"DorkOS can’t update some files. Something blocks them.",variant:"warning",actionable:!1}:t.adoptable>0?{message:"Some skills only reach a few of your agents.",variant:"info",actionable:!1}:null}function je({projectPath:s}){return he(s),null}function ve({projectPath:s}){const{data:t}=D(s),n=me(s),[a,r]=d.useState(!1),[l,c]=d.useState(!1);if(t===void 0||t.state!=="ready")return null;const u=e.jsx(je,{projectPath:s});if(n.data!==void 0&&!l)return e.jsxs(e.Fragment,{children:[u,e.jsx(pe,{result:n.data,onDismiss:()=>c(!0)})]});const o=ge(t);if(o===null)return u;const{removals:x,sweepPreview:m}=t,i=m.length;return e.jsxs(e.Fragment,{children:[u,e.jsx(O,{variant:o.variant,"data-slot":"harness-drift-banner",detailsOpen:a,details:i===0?void 0:e.jsx("ul",{className:"flex flex-col gap-0.5",children:x.map(({path:f,reason:v})=>e.jsxs("li",{className:"text-3xs flex flex-col",children:[e.jsx("code",{className:"font-mono",children:f}),e.jsx("span",{className:"opacity-80",children:v})]},f))}),actions:o.actionable?e.jsx(j,{size:"sm",variant:"outline",className:"h-6 text-xs",disabled:n.isPending,onClick:()=>{c(!1),n.mutate()},children:n.isPending?"Syncing…":"Sync now"}):void 0,children:e.jsxs("div",{className:"flex flex-col gap-0.5",children:[e.jsx("p",{children:o.message}),i>0&&e.jsxs("button",{type:"button","aria-expanded":a,onClick:()=>r(f=>!f),className:"text-3xs flex w-fit items-center gap-1 underline underline-offset-2 opacity-90 hover:opacity-100",children:["Syncing also removes ",S(i)," DorkOS put here",e.jsx(H,{"aria-hidden":!0,className:N("size-3 transition-transform",a&&"rotate-180")})]})]})})]})}function Ne(s){const t=b(),n=C();return A({mutationFn:a=>t.adoptHarness(s,a),meta:{errorLabel:"Couldn’t move that skill"},onSuccess:a=>{n.setQueryData(p.status(s),a.status),n.setQueriesData({queryKey:p.all,predicate:r=>{var l;return((l=r.state.data)==null?void 0:l.projectPath)===a.status.projectPath}},a.status)}})}const ye={neutral:y.neutral,info:y.info,warning:y.warning,muted:"border border-dashed border-border text-muted-foreground"};function ke({harness:s,cell:t}){var l;const n=ne(s,t.state),a=ae(t),r=(l=t.warnings)!=null&&l.length?t.warnings.join(" · "):void 0;return e.jsxs("li",{"aria-label":n,...a===void 0?{}:{title:a},className:N("text-3xs inline-flex items-center gap-1 rounded-full px-2 py-0.5 leading-tight",ye[se[t.state]]),children:[n,r!==void 0&&e.jsx("span",{role:"img","aria-label":"May not work",title:r,className:"inline-flex",children:e.jsx(I,{"aria-hidden":!0,className:"text-status-warning-fg size-2.5"})})]})}function Se(s){const t=s===void 0?-1:s.lastIndexOf("/"),n=t>0?s==null?void 0:s.slice(0,t):void 0;return n===void 0?"Only some agents can see it. Move it to .agents/skills to share it.":`Lives in ${n}. Move it to .agents/skills to share it.`}function be(s,t){return`dorkos harness adopt ${s} --project ${t}`}const Ce="Share with every agent";function we(s,t,n){const a=`It moves from ${t} to .agents/skills/${s}`;return n?`${a}. A link stays behind for Claude Code.`:`${a}, where every agent reads it.`}const De="for all your projects";function $e({row:s,enabled:t,projectPath:n,showEveryHarness:a}){var v;const[r,l]=d.useState(!1),[c,u]=d.useState(!1),o=Ne(n),x=_(s,t),m=re(s,t)&&!a,i=m&&!r,f=(v=o.data)==null?void 0:v.refusals[0];return e.jsxs("div",{role:"group","aria-label":s.name,className:"flex flex-col gap-1 py-1.5",children:[e.jsxs("div",{className:"flex min-w-0 items-baseline gap-2",children:[e.jsx("span",{className:"min-w-0 shrink truncate text-xs font-medium",children:s.name}),s.scope==="global"&&e.jsx("span",{className:"text-muted-foreground text-3xs shrink-0",children:De}),s.source!==void 0&&e.jsx("span",{dir:"rtl",title:s.source,className:"text-muted-foreground text-3xs ml-auto min-w-0 truncate text-left font-mono",children:e.jsx("bdi",{dir:"ltr",children:s.source})})]}),e.jsxs("ul",{"aria-label":"Agent tools",className:"flex flex-wrap items-center gap-1",children:[m&&e.jsx("li",{children:e.jsxs("button",{type:"button","aria-expanded":!i,title:x.map(({harness:h})=>g[h]).join(" · "),onClick:()=>l(h=>!h),className:"bg-muted text-muted-foreground hover:bg-accent hover:text-accent-foreground text-3xs focus-visible:ring-ring inline-flex items-center gap-1 rounded-full px-2 py-0.5 leading-tight transition-colors focus-visible:ring-2 focus-visible:outline-none",children:[ie(x.length),e.jsx(H,{"aria-hidden":!0,className:N("size-2.5 transition-transform",i&&"-rotate-90")})]})}),!i&&x.map(({harness:h,cell:F})=>e.jsx(ke,{harness:h,cell:F},h))]}),s.adoptable&&e.jsxs(e.Fragment,{children:[e.jsx("p",{role:"status","aria-live":"polite",className:"text-muted-foreground text-3xs",children:(f==null?void 0:f.reason)||Se(s.source)}),e.jsxs("p",{className:"text-muted-foreground text-3xs",children:["Run: ",e.jsx(w,{children:be(s.name,n)})]}),e.jsx("div",{children:e.jsx(j,{size:"sm",variant:"outline",className:"h-6 text-xs",disabled:o.isPending,onClick:()=>u(!0),children:Ce})}),e.jsx(W,{open:c,onOpenChange:u,children:e.jsxs(q,{children:[e.jsxs(K,{children:[e.jsxs(Q,{children:["Move ",s.name," so every agent can read it?"]}),e.jsx(U,{children:we(s.name,s.source??"",t.includes("claude-code"))})]}),e.jsxs(G,{children:[e.jsx(J,{children:"Cancel"}),e.jsx(Y,{onClick:()=>o.mutate(s.name),children:"Move it"})]})]})})]})]})}const Ae="https://dorkos.ai/docs/guides/cli-usage#agent-files";function Oe(){return e.jsxs(e.Fragment,{children:[e.jsx("span",{role:"status",className:"sr-only",children:"Loading skills…"}),e.jsx("div",{"aria-hidden":!0,className:"flex flex-col gap-3 py-1",children:[0,1,2].map(s=>e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx($,{className:"h-3 w-32"}),e.jsx($,{className:"h-3 w-48"})]},s))})]})}function He({projectPath:s,showBrowseLink:t=!0}){const{data:n,isPending:a,error:r,refetch:l}=D(s),[c,u]=d.useState(!1),o=d.useId(),x=E();if(a)return e.jsx(Oe,{});if(r)return e.jsxs("div",{className:"flex items-center gap-2 py-2",children:[e.jsx("p",{className:"text-destructive text-xs",children:"Couldn’t load skills."}),e.jsx(j,{variant:"ghost",size:"sm",className:"h-6 text-xs",onClick:()=>void l(),children:"Retry"})]});if(n.state!=="ready")return e.jsx(Ee,{status:n});const m=n.rows.filter(i=>i.artifact==="skill");return m.length===0?e.jsxs("div",{className:"flex flex-col items-start gap-1 py-2",children:[e.jsx("p",{className:"text-muted-foreground text-xs",children:"No skills here yet."}),t&&x&&e.jsxs(j,{variant:"ghost",size:"sm",className:"text-muted-foreground hover:text-foreground h-6 px-1 text-xs",onClick:()=>void x({to:"/marketplace",search:{type:"skill-pack"}}),children:[e.jsx(R,{"aria-hidden":!0,className:"mr-1.5 size-3.5"}),"Browse skill-packs"]})]}):e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2 pb-1",children:[e.jsx(V,{htmlFor:o,className:"text-muted-foreground text-3xs",children:"Show every agent tool"}),e.jsx(X,{id:o,size:"sm",checked:c,onCheckedChange:u})]}),e.jsx("div",{className:"divide-border divide-y",children:m.map(i=>e.jsx($e,{row:i,enabled:n.enabled,projectPath:n.projectPath,showEveryHarness:c},T(i)))})]})}function Ee({status:s}){return s.state==="not-set-up"?e.jsxs("div",{className:"flex flex-col gap-1 py-2",children:[e.jsx("p",{className:"text-muted-foreground text-xs",children:"DorkOS isn’t sharing agent files for this folder yet."}),e.jsxs("p",{className:"text-muted-foreground text-3xs",children:["Run ",e.jsx(w,{children:"dorkos harness sync --fix"})," in this folder to set it up."]}),e.jsx(Z,{href:Ae,className:"text-3xs text-muted-foreground hover:text-foreground underline underline-offset-2",children:"How agent file sharing works"})]}):s.state==="unreadable"?e.jsxs("div",{className:"flex flex-col gap-1 py-2",children:[e.jsx("p",{className:"text-muted-foreground text-xs",children:"DorkOS can’t read this folder’s agent file settings."}),s.detail!==void 0&&e.jsx("p",{className:"text-muted-foreground text-3xs",children:s.detail})]}):e.jsx("p",{className:"text-muted-foreground py-2 text-xs",children:"Agent file sharing runs in the DorkOS app."})}function Re({group:s}){const[t,n]=d.useState(!1);return e.jsxs(L,{open:t,onOpenChange:n,trigger:e.jsxs("span",{className:"text-xs",children:["Not shared with ",s.label]}),badge:e.jsx(P,{variant:"secondary",size:"xs",className:"whitespace-nowrap",children:oe(s.entries.length)}),children:[e.jsx("p",{className:"text-muted-foreground text-3xs px-4 pt-3",children:ce(s.label)}),e.jsx("ul",{className:"space-y-2 px-4 pt-2 pb-3",children:s.entries.map(a=>e.jsxs("li",{className:"flex flex-col gap-0.5",children:[e.jsxs("span",{className:"text-3xs font-medium",children:[a.artifact," ",a.name]}),a.reason!==void 0&&e.jsx("span",{className:"text-muted-foreground text-3xs",children:a.reason})]},a.key))})]})}function Le({rows:s,enabled:t}){const n=ue(s,t);return n.length===0?null:e.jsx("div",{className:"flex flex-col gap-1.5",children:n.map(a=>e.jsx(Re,{group:a},a.harness))})}function Pe({entries:s}){const[t,n]=d.useState(!1);return s.length===0?null:e.jsx(L,{open:t,onOpenChange:n,trigger:e.jsx("span",{className:"text-xs",children:"Project-level notices"}),badge:e.jsx(P,{variant:"secondary",size:"xs",className:"whitespace-nowrap",children:de(s.length)}),children:e.jsx("ul",{className:"space-y-2 px-4 pb-3",children:s.map(a=>e.jsxs("li",{className:"flex flex-col gap-0.5",children:[e.jsx("span",{className:N("text-3xs font-medium",a.kind==="notice"&&"text-muted-foreground font-normal"),children:fe(a)}),e.jsx("span",{className:"text-muted-foreground text-3xs",children:a.reason})]},`${a.kind} ${a.artifact} ${a.source??""} ${a.name}`))})})}function Te({command:s}){return e.jsx(w,{className:"break-normal",children:s.split(" ").map((t,n)=>e.jsxs(d.Fragment,{children:[n>0&&" ",e.jsx("span",{className:"whitespace-nowrap",children:t})]},`${n}-${t}`))})}function _e({notEnabled:s}){return s.length===0?null:e.jsx("div",{className:"flex flex-col gap-1.5 py-1",children:s.map(({harness:t,why:n,signal:a})=>e.jsxs("div",{title:a,className:"flex flex-col gap-0.5",children:[e.jsx("p",{className:"text-xs font-medium",children:n==="dorkos-runtime"?`DorkOS runs ${g[t]} here, but isn’t sharing to it.`:`${g[t]} files are here, but DorkOS isn’t sharing to it.`}),e.jsxs("p",{className:"text-muted-foreground text-3xs",children:["Run ",e.jsx(Te,{command:`dorkos harness sync --fix --enable ${t}`})," in this folder to turn it on."]})]},t))})}function Fe({projectPath:s}){const t=E(),{data:n}=D(s),a=(n==null?void 0:n.state)==="ready"?n:null;return e.jsxs("div",{className:"flex flex-col gap-2","data-slot":"profile-skills",children:[e.jsx(ve,{projectPath:s}),a&&e.jsx(_e,{notEnabled:a.notEnabled}),e.jsx(He,{projectPath:s,showBrowseLink:!1}),a&&e.jsx(Le,{rows:a.rows,enabled:a.enabled}),a&&e.jsx(Pe,{entries:a.projectLevel}),t&&e.jsxs(j,{variant:"ghost",size:"sm",className:"text-muted-foreground hover:text-foreground w-full",onClick:()=>void t({to:"/marketplace",search:{type:"skill-pack"}}),children:[e.jsx(R,{"aria-hidden":!0,className:"mr-1.5 size-3.5"}),"Browse skill-packs"]})]})}function ze({member:s}){var n;const t=((n=s.agent)==null?void 0:n.projectPath)??null;return t===null?e.jsx("p",{className:"text-muted-foreground text-sm",children:"This agent’s folder isn’t known here."}):e.jsx(Fe,{projectPath:t})}export{ze as SkillsPage};
@@ -1 +0,0 @@
1
- import{as as F,ag as w,at as U,au as D,av as L,aw as B,ax as G,r as o,j as e,ay as $,az as O,aA as p,aB as f,aC as j,aD as g,aE as k,aF as E,aG as N,aH as P,aI as X,aJ as _,aK as H,aL as J,aM as K,aN as V}from"./index-DpSk7iO1.js";const W=5;function q({status:t}){switch(t){case"running":return e.jsx(E,{size:"xs",className:"text-status-info shrink-0"});case"completed":return e.jsx(K,{className:"text-status-success size-3 shrink-0","aria-hidden":!0});case"failed":return e.jsx(J,{className:"text-destructive size-3 shrink-0","aria-hidden":!0});case"cancelled":return e.jsx(H,{className:"text-muted-foreground size-3 shrink-0","aria-hidden":!0});case"skipped":return e.jsx(_,{className:"text-muted-foreground size-3 shrink-0","aria-hidden":!0});case"blocked":return e.jsx(X,{className:"text-status-warning-dot size-3 shrink-0","aria-hidden":!0});default:return null}}function Q(t){if(t===null)return"";if(t<1e3)return"< 1s";const n=Math.floor(t/1e3);if(n<60)return`${n}s`;const a=Math.floor(n/60),i=n%60;return`${a}m ${i}s`}function Y({run:t,scheduleName:n}){return e.jsx(g,{children:e.jsxs(k,{className:"text-sm",children:[e.jsx(E,{size:"xs",className:"text-status-info shrink-0"}),e.jsx("span",{className:"truncate",children:n}),t.startedAt&&e.jsx("span",{className:"text-muted-foreground/50 ml-auto shrink-0 text-xs",children:N(t.startedAt)})]})})}function Z({schedule:t,onEdit:n}){return e.jsx(g,{children:e.jsxs(k,{onClick:()=>n(t.id),className:"text-sm",children:[e.jsx(P,{className:"text-muted-foreground/50 size-3 shrink-0","aria-hidden":!0}),e.jsx("span",{className:"truncate",children:t.name}),t.nextRun&&e.jsx("span",{className:"text-muted-foreground/50 ml-auto shrink-0 text-xs",children:N(t.nextRun)})]})})}function ee({run:t,scheduleName:n}){const a=t.status==="running"&&t.finishedAt?t.error?"failed":"completed":t.status;return e.jsx(g,{children:e.jsxs(k,{className:"text-sm",children:[e.jsx(q,{status:a}),e.jsx("span",{className:"truncate",children:n}),e.jsxs("span",{className:"text-muted-foreground/50 ml-auto flex shrink-0 items-center gap-1.5 text-xs",children:[t.durationMs!==null&&e.jsx("span",{children:Q(t.durationMs)}),t.finishedAt&&e.jsx("span",{children:N(t.finishedAt)})]})]})})}function se({available:t,agentId:n}){const a=F(),i=w(s=>s.setTasksAgentFilter),R=w(s=>s.setTasksEditScheduleId),u=t,{data:x=[]}=U(u),{data:I=0}=D(u),{data:T=[]}=L(void 0,u),{data:v=[]}=B(),{openWithTemplate:y}=G(),A=[v[0],v[2]].filter(Boolean),l=o.useMemo(()=>n?x.filter(s=>s.agentId===n):x,[n,x]),d=o.useMemo(()=>{const s=new Map;for(const r of l)s.set(r.id,r.name);return s},[l]),M=o.useMemo(()=>T.filter(s=>d.has(s.scheduleId)),[T,d]),{runningRuns:S,recentRuns:b}=o.useMemo(()=>{const s=[],r=[];for(const c of M)c.finishedAt!=null||c.status!=="running"?r.push(c):s.push(c);return r.sort((c,h)=>(h.finishedAt??h.createdAt).localeCompare(c.finishedAt??c.createdAt)),{runningRuns:s,recentRuns:r.slice(0,W)}},[M]),C=o.useMemo(()=>l.filter(s=>s.enabled&&s.status==="active"&&s.nextRun).sort((s,r)=>(s.nextRun??"").localeCompare(r.nextRun??"")),[l]),m=()=>{n&&(i(n),R(null)),a.open()},z=s=>{R(s),i(null),a.open()};return l.length===0?e.jsxs("div",{className:"flex flex-col gap-3 px-3 py-4",children:[e.jsx("p",{className:"text-muted-foreground/70 text-xs",children:"No schedules yet."}),A.length>0&&e.jsx("div",{className:"space-y-2",children:A.map(s=>e.jsxs("div",{className:"rounded-lg border p-3 text-sm",children:[e.jsx("div",{className:"font-medium",children:s.name}),e.jsx("p",{className:"text-muted-foreground text-xs",children:$(s.cron)}),e.jsx("button",{type:"button",onClick:()=>{y(s),m()},className:"text-primary mt-2 text-xs hover:underline",children:"+ Use preset"})]},s.id))}),e.jsx("button",{onClick:m,className:"text-muted-foreground hover:text-foreground text-xs transition-colors",children:"Open schedules →"})]}):e.jsx(O,{type:"scroll",className:"h-full",children:e.jsxs("div",{className:"pr-1",children:[S.length>0&&e.jsxs(p,{children:[e.jsxs(f,{className:"text-2xs text-muted-foreground/70 font-medium tracking-wider uppercase",children:["Running",e.jsx("span",{className:"text-muted-foreground/50 ml-auto text-xs font-normal normal-case",children:I})]}),e.jsx(j,{children:S.map(s=>e.jsx(Y,{run:s,scheduleName:d.get(s.scheduleId)??"Unknown"},s.id))})]}),C.length>0&&e.jsxs(p,{children:[e.jsx(f,{className:"text-2xs text-muted-foreground/70 font-medium tracking-wider uppercase",children:"Upcoming"}),e.jsx(j,{children:C.map(s=>e.jsx(Z,{schedule:s,onEdit:z},s.id))})]}),b.length>0&&e.jsxs(p,{children:[e.jsx(f,{className:"text-2xs text-muted-foreground/70 font-medium tracking-wider uppercase",children:"Recent runs"}),e.jsx(j,{children:b.map(s=>e.jsx(ee,{run:s,scheduleName:d.get(s.scheduleId)??"Unknown"},s.id))})]}),e.jsx("div",{className:"px-3 py-2",children:e.jsx("button",{onClick:m,className:"text-muted-foreground hover:text-foreground text-xs transition-colors",children:"Open schedules →"})})]})})}function ne({member:t}){var i;const n=V(),a=((i=t.agent)==null?void 0:i.manifestId)??null;return e.jsx("div",{className:"min-h-0 flex-1","data-slot":"profile-tasks",children:e.jsx(se,{available:n,agentId:a})})}export{ne as TasksPage};
@@ -1 +0,0 @@
1
- import{bl as x,j as s,B as h,bm as m,bn as b,bo as g,ag as p,bp as f,bq as j,br as S,bs as t,al as v,bt as k,bu as r,bv as N,bw as I,bx as C,by as w,r as c,bz as y,W as A}from"./index-DpSk7iO1.js";import{bA as V,bB as K,bC as W,bD as J,bE as X,bF as Y,bG as Z,bH as ee,bI as se,bJ as te,bK as ne,bL as ae,bM as oe,bN as re,bO as ie,bP as le,bQ as ce,bR as ue,bS as de,bT as xe,bU as he,bV as me,bW as be,bX as ge,bY as pe,bZ as fe,b_ as je,b$ as Se,c0 as ve,c1 as ke,c2 as Ne,c3 as Ie,c4 as Ce,c5 as we,c6 as ye,c7 as Ae,c8 as Me,c9 as Pe,ca as Re,cb as Te,cc as Ue,cd as De,ce as Ee,cf as Oe,cg as $e,ch as Ge,ci as Le,cj as Be}from"./index-DpSk7iO1.js";import{S as M}from"./ConnectionAccessLists-BWuegEtZ.js";const P="I need access to another service. Ask me which service and actions you need, then request only that access.";function R({sessionId:e}){const a=x(),o=s.jsx(h,{variant:"secondary",size:"sm","data-testid":`ask-agent-for-connection-${e}`,onClick:()=>m(P),children:"Ask your agent"});return s.jsx(M,{sessionId:e,onManage:()=>void a({to:"/connections"}),emptyAction:o,footer:s.jsx("div",{className:"pt-1",children:o})})}const T=1e3;function z(){const[e]=b(),a=g(e??""),o=p(n=>n.rightPanelOpen);return e?s.jsx(U,{diagnostics:a,live:o,connectors:s.jsx(R,{sessionId:e})}):s.jsx("div",{className:"text-muted-foreground flex h-full items-center justify-center p-6 text-center text-xs",children:"Open a session to inspect it."})}function U({diagnostics:e,live:a=!0,connectors:o}){return s.jsxs("div",{"data-slot":"session-inspector",className:"flex h-full min-w-0 flex-col gap-4 overflow-y-auto p-3",children:[s.jsx(D,{diagnostics:e,live:a}),s.jsx(E,{diagnostics:e}),s.jsx(O,{diagnostics:e}),s.jsx($,{diagnostics:e}),o,s.jsxs("div",{className:"mt-auto pt-2",children:[s.jsx(f,{className:"mb-2"}),s.jsx(j,{diagnostics:e,className:"w-full justify-center"})]})]})}function D({diagnostics:e,live:a}){const o=q(e.lastEventAt,a),n=S[e.connectionState];return s.jsxs(l,{label:"Live",children:[s.jsx(t,{label:"Live updates",children:s.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[s.jsx("span",{"aria-hidden":!0,className:v("inline-block size-1.5 rounded-full",n.color,n.tasks&&"animate-breath")}),n.shortLabel]})}),s.jsx(t,{label:"Turn",children:G(e)}),s.jsx(t,{label:"Last event",children:e.lastEventSeq===0?"none yet":`seq ${e.lastEventSeq}`}),s.jsx(t,{label:"Resumed from",children:e.snapshotCursor===null?"not hydrated":`cursor ${e.snapshotCursor}`}),s.jsx(t,{label:"Last update",children:o===null?"—":`${k(o)} ago`}),s.jsx(t,{label:"Queued messages",children:String(e.queueDepth)})]})}function E({diagnostics:e}){return s.jsxs(l,{label:"Resolved",children:[s.jsx(t,{label:"Directory",wrap:!0,children:e.cwd??"—"}),s.jsx(t,{label:"Git",children:B(e.git)}),s.jsx(t,{label:"Runs on",children:e.runtime??"—"}),s.jsx(t,{label:"Model",wrap:!0,children:e.model??"—"}),e.selectedModel!==null&&e.selectedModel!==e.model&&s.jsx(t,{label:"Model selected",children:e.selectedModel}),s.jsx(t,{label:"Effort",children:e.effort??"—"}),s.jsx(t,{label:"Fast mode",children:e.fastMode?"on":"off"}),s.jsx(t,{label:"Permissions",children:e.permissionMode}),s.jsx(t,{label:"Session ID",wrap:!0,children:e.sessionId}),s.jsx(t,{label:"DorkOS version",children:e.clientVersion??"—"})]})}function O({diagnostics:e}){var o;const a=(((o=e.contextUsage)==null?void 0:o.categories)??[]).filter(n=>n.tokens>0).sort((n,i)=>i.tokens-n.tokens);return s.jsxs(l,{label:"Usage",children:[s.jsx(t,{label:"Context",children:e.contextPercent===null?"—":`${e.contextPercent}% full`}),e.contextUsage&&s.jsxs(t,{label:"Tokens",children:[r(e.contextUsage.totalTokens)," / ",r(e.contextUsage.maxTokens)]}),a.map(n=>s.jsx(t,{label:n.name,indent:!0,swatch:n.color,"data-testid":`context-category-${n.name}`,children:r(n.tokens)},n.name)),e.cache===null?s.jsx(t,{label:"Cache",children:"nothing cached yet"}):s.jsxs(s.Fragment,{children:[s.jsx(t,{label:"Cache hit",children:`${N(e.cache)}%`}),s.jsx(t,{label:"Cache read",indent:!0,children:r(e.cache.readTokens)}),s.jsx(t,{label:"Cache written",indent:!0,children:r(e.cache.creationTokens)})]}),e.usage!==null&&I(e.usage)?s.jsx("div",{className:"pt-1",children:s.jsx(C,{usage:e.usage})}):s.jsx(t,{label:"Usage & cost",children:"no usage reported"})]})}function $({diagnostics:e}){const{running:a,finished:o}=w(e.activeSubagents);return s.jsxs(l,{label:"Subagents",children:[s.jsx(t,{label:"Running",children:L(a.length,e.runningSubagentCount)}),a.map(n=>s.jsx(u,{subagent:n},n.taskId)),o.length>0&&s.jsxs(s.Fragment,{children:[s.jsx(t,{label:"Finished this turn",children:String(o.length)}),o.map(n=>s.jsx(u,{subagent:n},n.taskId))]}),s.jsx(t,{label:"Available",children:e.subagents.length===0?"none":e.subagents.map(n=>n.name).join(", ")})]})}function u({subagent:e}){return s.jsxs("div",{"data-testid":`active-subagent-${e.taskId}`,"data-status":e.status,className:"space-y-0.5 py-1",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(y,{className:"text-muted-foreground size-3.5 shrink-0","aria-hidden":!0}),s.jsx("span",{className:"min-w-0 flex-1 truncate",children:e.description??e.taskId}),s.jsx(A,{size:"xs",variant:"secondary",className:"shrink-0",children:e.status})]}),s.jsxs("p",{className:"text-muted-foreground text-3xs pl-5 leading-tight",children:[e.toolUses??0," tool",e.toolUses===1?"":"s",e.lastToolName?` · last ${e.lastToolName}`:""]})]})}function l({label:e,children:a}){return s.jsxs("section",{className:"min-w-0",children:[s.jsx("h3",{className:"text-muted-foreground px-1 pb-1 text-xs font-medium tracking-wide uppercase",children:e}),s.jsx("div",{className:"space-y-1 px-1 text-xs",children:a})]})}function G(e){return e.triggerPending?"sending":e.streaming?"streaming":e.lifecycle??"not hydrated"}function L(e,a){const o=e===0?"none":String(e);return a===null||a===e?o:`${o} · server says ${a}`}function B(e){return e.state==="unknown"?"—":e.state==="no-repo"?"no repo":e.dirty?`${e.branch} · changed`:`${e.branch} · clean`}function q(e,a){const[o,n]=c.useState(()=>Date.now());return c.useEffect(()=>{if(e===null||!a)return;const i=()=>n(Date.now());i();const d=setInterval(i,T);return()=>clearInterval(d)},[e,a]),e===null?null:Math.max(0,o-e)}export{V as AccountBadge,K as AccountBadgeView,W as AccountItem,J as AccountMenuRow,X as AccountPopover,Y as AccountTrigger,Z as AutoModeConfirmDialog,ee as AutonomyConfirmDialog,se as ConnectionItem,te as ContextItem,ne as CwdItem,ae as GitStatusItem,oe as MakeDefaultStopLine,re as ModelConfigPopover,ie as PermissionModeItem,le as PlanModeItem,ce as ReadOnlyModeNotice,ue as RuntimeItem,z as SessionInspector,de as SessionPopover,U as SessionReadout,xe as StatusLine,he as SubagentsItem,me as UsageRevealPopover,be as UsageStatusItem,ge as accountChipPromotion,pe as applyStatusBudget,fe as canOfferContinue,je as chipToneFor,Se as evaluateExtensionStatusItems,ve as formatCost,ke as formatDiagnostics,Ne as gitPromotionState,I as hasRenderableUsage,Ie as isGitStatusOk,Ce as isUsageAbsorbed,w as partitionSubagents,we as resolveStatusBudget,ye as selectPromotedItems,Ae as showsStaleMark,Me as useExtensionStatusItems,Pe as useGitStatus,Re as useMakeDefaultStop,Te as useReadOnlyModeHint,Ue as useResolvedSessionRuntime,De as useRuntimeChip,Ee as useSessionAccount,g as useSessionDiagnostics,Oe as useSessionPermissionPicker,$e as useSessionPopoverShortcut,Ge as useStatusBarPins,Le as useStatusBudget,Be as useStatusUsage};
@@ -1 +0,0 @@
1
- import{j as e,bl as j,dT as w,dU as R,dV as T,dW as L,dX as y,dY as O,ag as E,dZ as z,B as u,d_ as _,d$ as B,cs as F,e0 as Q,J as M,e1 as U,e2 as V,d0 as W,e3 as q,e4 as D,e5 as H,e6 as Y}from"./index-DpSk7iO1.js";import{e7 as te}from"./index-DpSk7iO1.js";function N({label:a,empty:n,allClear:i,action:l,children:o}){return e.jsxs("section",{children:[e.jsxs("div",{className:"mb-2 flex min-h-6 items-center justify-between gap-2",children:[e.jsx("h3",{className:"text-muted-foreground text-xs font-medium tracking-widest uppercase",children:a}),!n&&l]}),n?e.jsx("p",{className:"text-muted-foreground/70 text-xs",children:i}):o]})}const d=5,J={animate:{transition:{staggerChildren:.04}}};function X(){const a=j(),n=w(),{schedules:i,errors:l,activity:o,isLoading:h,total:c}=R(),t=T(),x=L(),b=y(h||t.isLoading),A=O(),S=E(s=>s.setRightPanelOpen),m=z(i),C=n==="/"&&!x,r=m.slice(0,d),g=l.slice(0,d-r.length),P=o.slice(0,d-r.length-g.length),k=new Set(i.map(s=>s.id)),p=m.slice(d).filter(s=>k.has(s.id)),I={...t,schedules:p},f=t.items.filter(s=>s.kind!=="schedule-approval").length+p.length,v=t.isAnyError;return C?null:e.jsxs(N,{label:"Needs attention",empty:!b&&c===0&&r.length===0&&f===0&&!v,allClear:"All quiet. Nothing needs you.",action:e.jsx(u,{variant:"ghost",size:"sm",className:"h-6 text-xs",onClick:()=>a({to:"/"}),children:"View all →"}),children:[v&&e.jsxs("div",{"data-slot":"pulse-waiting-unreadable",className:"mb-2 flex min-w-0 items-center gap-2.5 rounded-md px-2 py-1",children:[e.jsx("span",{className:"text-muted-foreground min-w-0 flex-1 text-xs",children:"Couldn’t check everything waiting on you."}),e.jsx(u,{variant:"ghost",size:"sm",className:"h-6 shrink-0 px-2 text-xs",onClick:t.retryFailed,children:"Try again"})]}),f>0&&e.jsxs("div",{"data-slot":"pulse-waiting-line",className:"mb-2 flex min-w-0 items-center gap-2.5 rounded-md px-2 py-1",children:[e.jsx("span",{className:"bg-status-warning size-1.5 shrink-0 rounded-full","aria-hidden":!0}),e.jsx("span",{className:"text-foreground/90 min-w-0 flex-1 text-xs",children:_(I)}),e.jsx(u,{variant:"ghost",size:"sm",className:"h-6 shrink-0 px-2 text-xs",onClick:()=>{x&&S(!1),B()},children:"Open Inbox"})]}),e.jsx(F,{initial:!1,children:r.map(s=>e.jsx(Q,{task:s,className:"mb-2"},s.id))}),e.jsxs(M.div,{variants:J,initial:"initial",animate:"animate",children:[g.map(s=>e.jsx(U,{signal:s},s.id)),P.map(s=>e.jsx(V,{notification:s,onOpen:()=>A(s)},s.id))]})]})}const Z=5;function $(){const a=j(),n=w(),i=W(),{groups:l,isLoading:o}=q(),h=y(o);if(n==="/activity"&&!i)return null;const c=l.flatMap(t=>t.items).slice(0,Z);return e.jsx(N,{label:"Activity",empty:!h&&c.length===0,allClear:"No recent activity.",action:e.jsx(u,{variant:"ghost",size:"sm",className:"h-6 text-xs",onClick:()=>a({to:"/activity"}),children:"Open activity →"}),children:e.jsx(D,{children:e.jsx(H,{children:c.map(t=>e.jsx(Y,{item:t},t.id))})})})}function K(){return e.jsxs("div",{"data-slot":"pulse",className:"flex h-full flex-col gap-6 overflow-y-auto p-4",children:[e.jsx(X,{}),e.jsx($,{})]})}export{K as PulsePanel,te as usePulseFreshness};
@@ -1 +0,0 @@
1
- import{G as t,j as e,J as l,K as i,B as r}from"./index-DpSk7iO1.js";import{T as x,L as p,N as u}from"./index-DpSk7iO1.js";function d(){const{pendingOffer:s,pendingOfferId:a,acceptOffer:n,declineOffer:o}=t();return!s||a===null||!s.offerLine?null:e.jsxs(l.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},role:"group","aria-label":"DorkBot suggestion",className:"bg-secondary/60 mt-1.5 flex flex-col gap-2 rounded-lg border p-3",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsxs("span",{className:"mt-0.5 shrink-0",children:[e.jsx(i,{size:18,className:"dark:hidden"}),e.jsx(i,{variant:"white",size:18,className:"hidden dark:block"})]}),e.jsx("p",{className:"text-sm leading-relaxed",children:s.offerLine})]}),e.jsxs("div",{className:"flex items-center gap-2 pl-6",children:[e.jsx(r,{size:"sm",onClick:()=>n(a),children:"Show me"}),e.jsx(r,{size:"sm",variant:"ghost",onClick:()=>o(a),children:"Later"})]})]})}export{x as TOUR_DEFINITIONS,p as TourHost,d as TourOfferChips,u as useTourOccasions,t as useTours};
@@ -1 +0,0 @@
1
- import{r as B,dp as O,dq as F,dr as A,j as e,ds as H,cU as U,aL as V,dt as Y,du as q,dv as G,dw as X,dx as K,dy as J,dh as Q,al as _,dz as W,dA as D,dB as Z,dC as ee,B as $,W as R,$ as se,dD as te,dE as ne,cS as z,dF as ae,dG as re,dH as ie,dI as oe,dJ as I,dK as de,cT as N,dL as le,dM as L}from"./index-DpSk7iO1.js";import{dN as ye,dO as Se,dP as Ee,dQ as we,dR as ke,dS as Ce}from"./index-DpSk7iO1.js";const ce=["server_crashed","server_out_of_memory","server_unresponsive","isolation_unavailable","server_start_failed","server_start_timeout"],ue={server_crashed:s=>`${s} stopped unexpectedly 3 times. Reload it to try again.`,server_out_of_memory:s=>`${s} ran out of memory and stopped. Reload it to try again.`,server_unresponsive:s=>`${s} stopped responding, so DorkOS stopped it.`,isolation_unavailable:s=>`${s} can’t run with its limits on this computer.`,server_start_failed:s=>`${s} couldn’t start. Reload it to try again.`,server_start_timeout:s=>`${s} took too long to start. Reload it to try again.`};function T(s){return ce.includes(s)}function me(s,l){return T(s)?ue[s](l):null}function xe(s){return`Restarting ${s}…`}const he=new Set(["disabled","discovered","incompatible","invalid"]),pe="/marketplace?view=installed";function ge({extension:s,onToggle:l,isToggling:h,onSetRunApproval:r,isSettingApproval:c,onReload:f,isReloading:v}){const{manifest:n,status:x,scope:E,error:p,serverError:i,origin:b,approvedToRun:y}=s,[g,t]=B.useState(!1),o=!he.has(x),m=x==="incompatible",a=x==="invalid",d=x==="compile_error"||x==="activate_error",u=!m&&!a,S=!(b==="core"&&n.canDisable===!1),w=s.hasServerEntry||s.hasDataProxy,j=O(s),M=F(s.id,A(j)),k=d?"Not working":m?"Incompatible":a?"Can’t load":null;return e.jsx(H,{"data-slot":"extension-card","data-testid":`extension-card-${s.id}`,radius:"lg",gap:"none",className:_(d&&"border-amber-500/50",(m||a)&&"opacity-70"),children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"min-w-0 flex-1 space-y-1.5",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[d&&e.jsx(U,{className:"text-status-warning-dot size-4 shrink-0","aria-hidden":"true"}),(m||a)&&!d&&e.jsx(V,{className:"text-muted-foreground size-4 shrink-0","aria-hidden":"true"}),!d&&!m&&!a&&e.jsx(Y,{className:"text-muted-foreground size-4 shrink-0","aria-hidden":"true"}),e.jsx("span",{className:"font-medium",children:n.name}),e.jsxs("span",{className:"text-muted-foreground text-sm",children:["v",n.version]}),s.devLink&&e.jsx(q,{})]}),s.devLink&&e.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1","data-testid":`extension-dev-link-${s.id}`,children:[e.jsx(G,{path:s.devLink.path,className:"min-w-0"}),e.jsx("button",{type:"button",onClick:()=>void X(pe),className:"text-muted-foreground hover:text-foreground focus-ring rounded-sm text-xs underline underline-offset-2",children:"Unlink or switch"})]}),n.description&&e.jsx("p",{className:"text-muted-foreground text-sm",children:n.description}),e.jsx(K,{gifts:J(s),"data-testid":`extension-agent-gifts-${s.id}`}),m&&n.minHostVersion&&e.jsxs("p",{className:"text-muted-foreground text-sm",children:["Needs DorkOS ",n.minHostVersion," or newer"]}),d&&p&&e.jsxs("div",{className:"space-y-1",children:[e.jsxs("p",{className:"text-status-warning-fg text-sm",children:[x==="compile_error"?"Couldn’t build: ":"Couldn’t start: ",p.message]}),p.details&&e.jsxs("button",{type:"button",onClick:()=>t(C=>!C),className:"text-muted-foreground hover:text-foreground flex items-center gap-1 text-xs transition-colors","aria-expanded":g,children:[e.jsx(Q,{className:_("size-3 transition-transform",g&&"rotate-180")}),g?"Hide details":"Show details"]}),g&&p.details&&e.jsx("pre",{className:"bg-muted mt-1 max-h-32 overflow-auto rounded-md p-2 text-xs",children:p.details})]}),i&&T(i.code)&&e.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1","data-testid":`extension-server-status-${s.id}`,children:[e.jsx("p",{className:"text-status-warning-fg text-sm",children:i.message||me(i.code,n.name)}),e.jsx("button",{type:"button",onClick:f,disabled:v,className:"text-muted-foreground hover:text-foreground focus-ring rounded-sm text-xs underline underline-offset-2 disabled:opacity-50",children:"Reload"})]}),s.restartingAt&&!i&&e.jsx("p",{className:"text-muted-foreground text-sm",role:"status",children:xe(n.name)}),i&&!T(i.code)&&e.jsxs("p",{className:"text-status-warning-fg text-sm",children:["Couldn’t rebuild its server part: ",i.message,". The last version still runs."]}),b==="user"&&(y?e.jsxs("div",{className:"text-muted-foreground flex flex-wrap items-center gap-2 text-xs","data-testid":`extension-run-allowed-${s.id}`,children:[e.jsx(W,{className:"size-3.5 shrink-0","aria-hidden":"true"}),e.jsx("span",{children:"You allowed this to run."}),s.originProblem==="changed"&&e.jsx("span",{children:"You approved its changed files. Any further change asks again."}),e.jsx("button",{type:"button",onClick:()=>r(s.id,!1),disabled:c,className:"hover:text-foreground underline underline-offset-2 disabled:opacity-50",children:"Stop it"}),e.jsx(D,{permissions:j,className:"basis-full","data-testid":`extension-permissions-${s.id}`})]}):e.jsxs("div",{className:"space-y-2 rounded-lg border border-amber-500/40 bg-amber-500/5 p-3","data-testid":`extension-needs-approval-${s.id}`,children:[e.jsx("p",{className:"text-sm font-medium",children:"This extension is waiting for you"}),s.originProblem&&e.jsx("p",{className:"text-status-warning-fg text-sm","data-testid":`extension-origin-problem-${s.id}`,children:s.originProblem==="changed"?"Its files changed after install, so DorkOS can’t vouch for it. Look it over first.":s.originProblem==="dev-link"?"It runs from your folder, so DorkOS can’t vouch for its source.":"Its plugin links to files elsewhere, so DorkOS can’t vouch for its source."}),e.jsx(D,{permissions:j,added:M,"data-testid":`extension-permissions-${s.id}`}),e.jsx("p",{className:"text-muted-foreground text-sm",children:Z(w,(j==null?void 0:j.runtime)==="subprocess")}),e.jsx("p",{className:"text-muted-foreground text-sm",children:ee}),e.jsx($,{size:"sm",onClick:()=>r(s.id,!0),disabled:c,"data-testid":`extension-approve-run-${s.id}`,children:"Turn it on"})]})),e.jsxs("div",{className:"text-muted-foreground flex flex-wrap items-center gap-2 text-xs",children:[e.jsx(R,{variant:"outline",children:E}),k&&e.jsx(R,{variant:k==="Not working"?"destructive":"secondary","data-testid":`extension-health-${s.id}`,children:k}),n.author&&e.jsx("span",{children:n.author})]})]}),e.jsx("div",{className:"flex shrink-0 items-center pt-0.5",children:S?e.jsx(se,{checked:o,onCheckedChange:C=>l(s.id,C),disabled:!u||h,"aria-label":`${o?"Disable":"Enable"} ${n.name}`}):e.jsx(R,{variant:"secondary",title:"This extension is always on","data-testid":`extension-required-${s.id}`,children:"Required"})})]})})}function P(s){const l=new Date(s);return Number.isNaN(l.getTime())?"":l.toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}function fe(){const{data:s=[]}=te(),{stop:l,pendingSource:h}=ne();return s.length===0?null:e.jsxs("section",{className:"space-y-3","data-testid":"trusted-sources-section",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("h3",{className:"text-sm font-semibold",children:"Trusted sources"}),e.jsx("p",{className:"text-muted-foreground text-sm",children:"Extensions from these sources turn on without asking."}),e.jsx("p",{className:"text-muted-foreground text-sm",children:"Stop trusting one, and extensions already on keep running."}),e.jsx(z,{className:"text-muted-foreground text-sm",label:"If you stop trusting one",openLabel:"If you stop trusting one",children:e.jsx("p",{children:"Newer versions and new extensions from it wait for your yes."})})]}),e.jsx("ul",{className:"divide-y rounded-xl border",children:s.map(({source:r,trustedAt:c})=>e.jsxs("li",{className:"flex flex-wrap items-center justify-between gap-x-3 gap-y-1.5 px-3 py-2.5",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"truncate font-mono text-sm",children:r}),P(c)&&e.jsxs("p",{className:"text-muted-foreground text-xs",children:["Trusted ",P(c)]})]}),e.jsx($,{type:"button",variant:"outline",size:"sm",disabled:h===r,onClick:()=>l(r),children:"Stop trusting"})]},r))})]})}function je(){const{data:s=[],isLoading:l}=ae(),h=re(),r=ie(),c=oe(),f=I(!0),v=I(!1),n=new Set([...h.variables?[h.variables]:[],...r.variables?[r.variables]:[]]),x=new Set([...f.isPending&&f.variables?[f.variables.id]:[],...v.isPending&&v.variables?[v.variables.id]:[]]);function E(t,o){const m=o?f:v,a=s.find(u=>u.id===t);if(!a)return;const d=o?A(O(a)):void 0;m.mutate({id:t,version:a.manifest.version,plugin:a.sourcePlugin??null,...d?{permissions:d}:{}},{onSuccess:u=>{o&&L.getState().forget(t);const S=u.extension.manifest.name,w=u.extension.isolation?"":" inside DorkOS";N.success(o?`${S} can now run${w}`:`${S} stopped running`)},onError:u=>{if(u instanceof le&&u.stale){d&&L.getState().remember(t,d),N.error(`${a.manifest.name} changed since you saw it. Check it again.`);return}N.error(o?"Couldn’t let it run.":"Couldn’t stop it running.",{description:u.message})}})}async function p(t,o){(o?h:r).mutate(t,{onError:a=>{N.error(o?"Couldn’t turn that on.":"Couldn’t turn that off.",{description:a.message})}})}function i(){c.mutate(void 0,{onSuccess:t=>{N.success(`Reloaded ${t.length} extension${t.length===1?"":"s"}`)},onError:t=>{N.error("Couldn’t reload your extensions.",{description:t.message})}})}if(l)return e.jsx("div",{className:"text-muted-foreground py-8 text-center text-sm",children:"Loading extensions…"});const b=s.filter(t=>t.origin==="core"),y=s.filter(t=>t.origin==="user"),g=t=>e.jsx(ge,{extension:t,onToggle:p,isToggling:n.has(t.id),onSetRunApproval:E,isSettingApproval:x.has(t.id),onReload:i,isReloading:c.isPending},t.id);return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"text-muted-foreground space-y-1 text-sm",children:[e.jsx("p",{children:"Extensions add new screens and tools to DorkOS."}),e.jsxs(z,{children:[e.jsx("p",{children:"Core extensions come with DorkOS."}),e.jsxs("p",{children:["Installed ones live in"," ",e.jsx("code",{className:"bg-muted rounded px-1",children:"~/.dork/extensions/"})," or your project’s"," ",e.jsx("code",{className:"bg-muted rounded px-1",children:".dork/extensions/"}),"."]})]})]}),s.length===0?e.jsx("div",{className:"text-muted-foreground py-8 text-center text-sm","data-testid":"no-extensions",children:e.jsx("p",{children:"No extensions installed."})}):e.jsxs(e.Fragment,{children:[b.length>0&&e.jsxs("section",{className:"space-y-3","data-testid":"core-extensions-section",children:[e.jsx("h3",{className:"text-sm font-semibold",children:"Core extensions"}),e.jsx("div",{className:"space-y-3",children:b.map(g)})]}),e.jsxs("section",{className:"space-y-3","data-testid":"installed-extensions-section",children:[e.jsx("h3",{className:"text-sm font-semibold",children:"Installed extensions"}),y.length>0?e.jsx("div",{className:"space-y-3",children:y.map(g)}):e.jsxs("div",{className:"text-muted-foreground rounded-xl border border-dashed p-4 text-sm","data-testid":"no-installed-extensions",children:["No extensions installed yet. Browse"," ",e.jsx("span",{className:"text-foreground font-medium",children:"Marketplace"})," to add some."]})]})]}),e.jsx(fe,{}),e.jsx("div",{className:"flex justify-end",children:e.jsxs($,{variant:"outline",size:"sm",onClick:i,disabled:c.isPending,"data-testid":"reload-extensions-button",children:[e.jsx(de,{className:_("mr-2 size-4",c.isPending&&"animate-spin")}),"Reload extensions"]})})]})}export{ye as ExtensionEventBridge,Se as ExtensionLoader,Ee as ExtensionProvider,je as ExtensionsSettingsTab,we as createExtensionAPI,ke as createExtensionEventBridge,Ce as useExtensions};
@@ -1 +0,0 @@
1
- import{j as e,aS as C,aT as M,a as i,aU as R,aV as I,ag as u,aW as L,aX as O,aY as z,aZ as F,a_ as v,r as o,a$ as T,b0 as U,b1 as _,b2 as q,b3 as V,b4 as $,b5 as K,b6 as W}from"./index-DpSk7iO1.js";import{b7 as Q,b8 as ee,b9 as se,ba as te,bb as ne,bc as ae,bd as le,be as re,bf as oe,bg as ie,bh as ce,bi as de,bj as ue,bk as fe}from"./index-DpSk7iO1.js";function X(){return e.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-3 p-6 text-center",children:[e.jsx("div",{className:"bg-muted flex size-12 items-center justify-center rounded-full",children:e.jsx(C,{className:"text-muted-foreground size-5"})}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-sm font-medium",children:"No agent selected"}),e.jsx("p",{className:"text-muted-foreground text-xs",children:"Pick an agent to see its profile."})]})]})}function Y({agentPath:s}){return e.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-3 p-6 text-center",children:[e.jsx("div",{className:"bg-destructive/10 flex size-12 items-center justify-center rounded-full",children:e.jsx(M,{className:"text-destructive size-5"})}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-sm font-medium",children:"Agent not found"}),e.jsx("p",{className:"text-muted-foreground font-mono text-xs break-all",children:s}),e.jsx("p",{className:"text-muted-foreground text-xs",children:"Nothing here could be opened as an agent."})]})]})}function Z(){return e.jsxs("div",{"data-slot":"profile-dock-skeleton",className:"flex h-full flex-col overflow-hidden",children:[e.jsxs("div",{className:"flex flex-col items-center gap-2 px-4 pt-6 pb-4",children:[e.jsx(i,{className:"size-16 rounded-full"}),e.jsx(i,{className:"mt-1 h-4 w-28 rounded"}),e.jsx(i,{className:"h-3 w-16 rounded"}),e.jsx(i,{className:"h-3 w-36 rounded"})]}),e.jsx("div",{className:"space-y-2 px-4",children:["w-full","w-full","w-full"].map((s,f)=>e.jsx(i,{className:`h-8 ${s} rounded`},f))})]})}function G(){var N;const s=R(),f=I(),p=u(t=>t.rightPanelOpen),S=L(),c=O(s??void 0),g=z({enabled:c!==void 0}),l=(N=g.data)==null?void 0:N.members,D=c===void 0||l==null?void 0:l.find(t=>t.id===c),x=S.isFetched&&(c===void 0||g.isFetched),n=D??null,b=F(s),d=v(t=>t.setDockedEntries),m=v(t=>t.clearDockedStacks),E=u(t=>t.setRightPanelOpen),j=u(t=>t.releaseRightPanelRequest),[y,h]=o.useState(!1),a=o.useMemo(()=>n?T(n.id,[...b]):null,[n,b]),P=a===null?null:U(a),r=(P===(n==null?void 0:n.id)?n:l==null?void 0:l.find(t=>t.id===P))??n,A=o.useCallback(t=>{!s||!a||d(s,_(a,t).entries)},[s,a,d]),w=o.useCallback(()=>{!s||!a||d(s,q(a).entries)},[s,a,d]);o.useEffect(()=>{s===null||!x||r!==null||j(s)},[s,x,r,j]);const k=V(r===null?null:{home:"docked",memberId:r.id});return o.useEffect(()=>{if(p)return()=>{if(!u.getState().rightPanelOpen){if($(k.read()))return h(!0);m()}}},[p,m,k]),s?!n||!a||!r?x?e.jsx(Y,{agentPath:s}):e.jsx(Z,{}):e.jsxs("div",{"data-slot":"profile-dock",className:"flex h-full min-h-0 flex-col overflow-hidden",children:[e.jsx(K,{member:r,roster:l??[],home:"docked",inOwnSession:s===f.agentPath&&r.id===n.id,stack:a,onPush:A,onPop:w}),e.jsx(W,{open:y,onKeep:()=>{h(!1),E(!0)},onDiscard:()=>{h(!1),m()}})]}):e.jsx(X,{})}export{Q as AccountMenu,ee as AccountMenuContainer,se as OperatorIdentityForm,te as PROFILE_PANEL_ID,G as ProfileDock,ne as ProfilePanel,ae as ProfilePanelContainer,le as ProfileSheet,re as ProfileSheetContainer,K as ProfileView,oe as handleErrorMessage,ie as identityLinkErrorMessage,T as profileStack,ce as useLegacyProfileLinkRedirect,de as useProfileDockDeepLink,ue as useProfileShortcut,v as useProfileStore,fe as useSetIdentityLinkedToMe};
@@ -1 +0,0 @@
1
- import{a0 as c,r as l,a1 as u,j as e,a as o,a2 as i,a3 as m}from"./index-DpSk7iO1.js";import{a4 as R,a5 as N,a6 as g,a7 as h,a8 as j,a9 as P,aa as w,ab as I,ac as O,ad as S,ae as b}from"./index-DpSk7iO1.js";function f(){const s=c(),a=s.status==="ready"?s.roomId:null,t=l.useRef(null);return l.useEffect(()=>{const n=t.current;if(t.current=a,n===null||n===a)return;const r=u.getState().request;r!==null&&r.roomId!==a&&u.getState().consume()},[a]),s.status==="loading"?e.jsxs("div",{className:"space-y-4 p-4","aria-busy":!0,children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(o,{className:"size-9 rounded-full"}),e.jsx(o,{className:"h-4 w-32"})]}),e.jsx(o,{className:"h-3 w-48"}),e.jsx(o,{className:"h-24 w-full"})]}):s.status==="none"?e.jsx(i,{title:"No room open",body:"Open a channel or direct message to see who’s in it."}):e.jsx(m,{roomId:s.roomId},s.roomId)}export{R as AgentChipPicker,N as AgentRosterPicker,g as ChannelCreateDialog,h as NewDirectMessageMenu,j as ONE_DOOR_HINT,P as ROOM_PANEL_ID,f as RoomPanel,m as RoomPanelBody,w as facesOfRoster,I as oneDoorSubmitLabel,O as openRoomPanel,S as opensAgentSession,b as useRoomFaces,u as useRoomPanelFocusStore};