dorkos 0.83.0 → 0.87.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 (108) hide show
  1. package/README.md +7 -0
  2. package/dist/bin/cli.js +5338 -2653
  3. package/dist/client/assets/{AboutPage-BCPZr0Kt.js → AboutPage-BSUaz4JJ.js} +1 -1
  4. package/dist/client/assets/{AppearancePage-CJfCCSBv.js → AppearancePage-CXOeapnY.js} +1 -1
  5. package/dist/client/assets/{BaseTanStackRouterDevtoolsPanel-B-iktbLX-Rg6hvlIh.js → BaseTanStackRouterDevtoolsPanel-B-iktbLX-BnlmhnMf.js} +1 -1
  6. package/dist/client/assets/{BlintzCanvas-CUSuHP_Q.js → BlintzCanvas-CPvaejf6.js} +1 -1
  7. package/dist/client/assets/{CanvasCsvContent-B3gnlTxe.js → CanvasCsvContent-BQMcLeXX.js} +1 -1
  8. package/dist/client/assets/CanvasFileContent-DZAWEzyp.js +2 -0
  9. package/dist/client/assets/CanvasModel3dContent-CU-0WLIz.js +2 -0
  10. package/dist/client/assets/{CodeMirrorDiff-Dsell_F0.js → CodeMirrorDiff-B705Z174.js} +1 -1
  11. package/dist/client/assets/{CodeMirrorEditor-DW4-Dilh.js → CodeMirrorEditor-CnoVRaAX.js} +1 -1
  12. package/dist/client/assets/ConnectionAccessLists-CLulSQsd.js +1 -0
  13. package/dist/client/assets/ConnectionsPage-5Yc0-dNp.js +1 -0
  14. package/dist/client/assets/{ConventionPage-Dto1Cfs1.js → ConventionPage-CPTqeeNZ.js} +2 -2
  15. package/dist/client/assets/{FloatingTanStackRouterDevtools-CqogiFob-B8JWq1xE.js → FloatingTanStackRouterDevtools-CqogiFob-C3cf2ADt.js} +1 -1
  16. package/dist/client/assets/HandlePage-CUJPQsdv.js +1 -0
  17. package/dist/client/assets/{LexicalField-BymSjNLW.js → LexicalField-ClgIzBq7.js} +1 -1
  18. package/dist/client/assets/{ManagesPage-D0ykMsYy.js → ManagesPage-CKzcFzKR.js} +1 -1
  19. package/dist/client/assets/{Model3dViewer-DpzkRmRI.js → Model3dViewer-CVVsdftR.js} +1 -1
  20. package/dist/client/assets/NamePage-CYHYXhrs.js +1 -0
  21. package/dist/client/assets/{NotificationsPage-C4Ol8NO6.js → NotificationsPage-D3m6Jrm2.js} +1 -1
  22. package/dist/client/assets/{PermissionsPage-BEtP78wl.js → PermissionsPage-CviWqCJ3.js} +1 -1
  23. package/dist/client/assets/{PersonalityPopover-xJuTkLLJ.js → PersonalityPopover-BN1CFq8D.js} +1 -1
  24. package/dist/client/assets/PhotoPage-ytqVZP3t.js +1 -0
  25. package/dist/client/assets/{RoomsPage-CeB_8k-m.js → RoomsPage-CoZd-4Xe.js} +1 -1
  26. package/dist/client/assets/RunsOnPopover-91nKS6qj.js +1 -0
  27. package/dist/client/assets/SessionsPage-DDrQLNW-.js +6 -0
  28. package/dist/client/assets/SkillsPage-2H6QD77F.js +1 -0
  29. package/dist/client/assets/TasksPage-ocRUPiec.js +1 -0
  30. package/dist/client/assets/ToolsPage-q3wxIc3n.js +2 -0
  31. package/dist/client/assets/{TopologyGraph-3rXK5QTB.js → TopologyGraph-DeRqfLBW.js} +2 -2
  32. package/dist/client/assets/{agent-browser-DaDOSH9H.js → agent-browser-C7Q5muxI.js} +1 -1
  33. package/dist/client/assets/{highlighted-body-KPVGNVTW-CGXZGdzv.js → highlighted-body-KPVGNVTW-CYowLe07.js} +1 -1
  34. package/dist/client/assets/{index-C4yxotik.js → index-1dt_mWBC.js} +1 -1
  35. package/dist/client/assets/{index-DQdV5YDl.js → index-34_CucI4.js} +1 -1
  36. package/dist/client/assets/{index-CUXXDUxt.js → index-6F4HxV-x.js} +1 -1
  37. package/dist/client/assets/{index-MUbvQBCQ.js → index-B029XwR8.js} +1 -1
  38. package/dist/client/assets/index-B4TIVWAq.js +1668 -0
  39. package/dist/client/assets/index-BUcM96PD.css +1 -0
  40. package/dist/client/assets/{index-rJuQe7Pl.js → index-BX9en7bH.js} +1 -1
  41. package/dist/client/assets/{index-Bco5PCIk.js → index-BeqTVkgE.js} +1 -1
  42. package/dist/client/assets/{index-D9vFzXJR.js → index-BkFaL4dr.js} +1 -1
  43. package/dist/client/assets/index-Bv_P5_tJ.js +1 -0
  44. package/dist/client/assets/{index-3xtUyFwf.js → index-BwbRY8dK.js} +1 -1
  45. package/dist/client/assets/{index-oU5xA1N3.js → index-BzVyUKXW.js} +3 -3
  46. package/dist/client/assets/{index-BiKxY3b6.js → index-C0oow5Fn.js} +1 -1
  47. package/dist/client/assets/{index-B2AJ6tkg.js → index-CCLVR1so.js} +1 -1
  48. package/dist/client/assets/{index-bR1UztQC.js → index-CEw2JwVz.js} +1 -1
  49. package/dist/client/assets/{index-DdpxcyXN.js → index-CKHPMgwE.js} +1 -1
  50. package/dist/client/assets/{index-dDcguWyg.js → index-CbxbAPgT.js} +1 -1
  51. package/dist/client/assets/{index-Cc8vG2jf.js → index-Cm0G2vDh.js} +1 -1
  52. package/dist/client/assets/{index-CUDguphz.js → index-CpZi173j.js} +1 -1
  53. package/dist/client/assets/index-CqfEH_t6.js +1 -0
  54. package/dist/client/assets/index-CuEwCZKH.js +17 -0
  55. package/dist/client/assets/{index-DT376l6b.js → index-CvQeke9n.js} +9 -9
  56. package/dist/client/assets/{index-i6WvrE1p.js → index-CxZB8Cqj.js} +1 -1
  57. package/dist/client/assets/{index-DPpw-DKV.js → index-D45q57-5.js} +1 -1
  58. package/dist/client/assets/{index-zrZDQvuW.js → index-D8fmSjjO.js} +1 -1
  59. package/dist/client/assets/{index-D4OPDslu.js → index-DDagpuEn.js} +1 -1
  60. package/dist/client/assets/{index-CXeb3CZh.js → index-DT3ci-3h.js} +1 -1
  61. package/dist/client/assets/{index-Ck1VEXu0.js → index-D_Pj9S7y.js} +1 -1
  62. package/dist/client/assets/{index-pBoKYStL.js → index-Da-4WWcu.js} +1 -1
  63. package/dist/client/assets/{index-Ce4ArSsI.js → index-DsRm4kZF.js} +1 -1
  64. package/dist/client/assets/{index-Bg2WUou4.js → index-GiEn7nQQ.js} +1 -1
  65. package/dist/client/assets/{index-CemK6fUn.js → index-SGZRUhq4.js} +1 -1
  66. package/dist/client/assets/{index-Ygg0URfB.js → index-VLhj4QNP.js} +1 -1
  67. package/dist/client/assets/index-otf5JgVx.js +1 -0
  68. package/dist/client/assets/{index-FOgsYoCt.js → index-qWahGPGi.js} +1 -1
  69. package/dist/client/assets/{index-BabO0TEf.js → index-sMuUIc_W.js} +2 -2
  70. package/dist/client/assets/{index-z0vAkUHY.js → index-snpaQsNQ.js} +1 -1
  71. package/dist/client/assets/room-files-source-C3tzeG6y.js +6 -0
  72. package/dist/client/assets/{soul-file-C1wnpxhH.js → soul-file-tc6-HkDy.js} +1 -1
  73. package/dist/client/assets/{use-personality-commit-OViAsTwD.js → use-personality-commit-vpAu5T8A.js} +1 -1
  74. package/dist/client/index.html +3 -3
  75. package/dist/drizzle/0111_community_redaction_cursor.sql +11 -0
  76. package/dist/drizzle/0112_account_drop_issuer.sql +18 -0
  77. package/dist/drizzle/0113_room_departed_seats.sql +14 -0
  78. package/dist/drizzle/0114_schedule_account.sql +1 -0
  79. package/dist/drizzle/0115_furry_starjammers.sql +1 -0
  80. package/dist/drizzle/meta/0111_snapshot.json +9062 -0
  81. package/dist/drizzle/meta/0112_snapshot.json +9055 -0
  82. package/dist/drizzle/meta/0113_snapshot.json +9147 -0
  83. package/dist/drizzle/meta/0114_snapshot.json +9154 -0
  84. package/dist/drizzle/meta/0115_snapshot.json +9146 -0
  85. package/dist/drizzle/meta/_journal.json +35 -0
  86. package/dist/server/index.js +34994 -22406
  87. package/dist/server/index.js.map +2 -2
  88. package/package.json +7 -8
  89. package/dist/client/assets/CanvasFileContent-C2PyVniO.js +0 -2
  90. package/dist/client/assets/CanvasModel3dContent-BU77_Cf0.js +0 -2
  91. package/dist/client/assets/ConnectionAccessLists-C6PZsSaI.js +0 -1
  92. package/dist/client/assets/ConnectionsPage-d1mpye9j.js +0 -1
  93. package/dist/client/assets/HandlePage-D9x_OTks.js +0 -1
  94. package/dist/client/assets/NamePage-zm23PjaF.js +0 -1
  95. package/dist/client/assets/PhotoPage-DlqgNQWM.js +0 -1
  96. package/dist/client/assets/RunsOnPopover-DT6aWGUP.js +0 -1
  97. package/dist/client/assets/SessionsPage-CoZhOOr9.js +0 -6
  98. package/dist/client/assets/SkillsPage-C8bahTTW.js +0 -1
  99. package/dist/client/assets/TasksPage-CuFN--Cj.js +0 -1
  100. package/dist/client/assets/ToolsPage-C5cJiedq.js +0 -2
  101. package/dist/client/assets/index-4zzP7Qsj.js +0 -1
  102. package/dist/client/assets/index-B9qRpVKa.js +0 -7
  103. package/dist/client/assets/index-BMR65QI4.js +0 -1658
  104. package/dist/client/assets/index-C9o2w5d_.js +0 -1
  105. package/dist/client/assets/index-DZ-SO2sz.css +0 -1
  106. package/dist/client/assets/index-Rf5Yz119.js +0 -1
  107. package/dist/client/assets/room-files-source-BXF5daqI.js +0 -11
  108. package/dist/client/assets/use-mesh-update-CZIA8V07.js +0 -1
@@ -1 +0,0 @@
1
- import{j as e,bx as h,db as x,cU as m,dc as N,dd as b,de as P,co as w,df as C,N as S,dg as T,dh as E,B as p,di as I,dj as R,dk as L,dl as M}from"./index-BMR65QI4.js";import{dm as q}from"./index-BMR65QI4.js";function g({label:i,empty:s,allClear:a,action:o,children:l}){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:i}),!s&&o]}),s?e.jsx("p",{className:"text-muted-foreground/70 text-xs",children:a}):l]})}const d=5,O={animate:{transition:{staggerChildren:.04}}};function _(){const i=h(),s=x(),a=m(),{schedules:o,errors:l,activity:c,isLoading:n,total:f}=N(),j=b(),v=P(o),A=s==="/"&&!a,r=v.slice(0,d),u=l.slice(0,d-r.length),y=c.slice(0,d-r.length-u.length);return A?null:e.jsxs(g,{label:"Needs attention",empty:!n&&f===0&&r.length===0,allClear:"All quiet. Nothing needs you.",action:e.jsx(p,{variant:"ghost",size:"sm",className:"h-6 text-xs",onClick:()=>i({to:"/"}),children:"View all →"}),children:[e.jsx(w,{initial:!1,children:r.map(t=>e.jsx(C,{task:t,className:"mb-2"},t.id))}),e.jsxs(S.div,{variants:O,initial:"initial",animate:"animate",children:[u.map(t=>e.jsx(T,{signal:t},t.id)),y.map(t=>e.jsx(E,{notification:t,onOpen:()=>j(t)},t.id))]})]})}const k=5;function B(){const i=h(),s=x(),a=m(),{groups:o,isLoading:l}=I();if(s==="/activity"&&!a)return null;const c=o.flatMap(n=>n.items).slice(0,k);return e.jsx(g,{label:"Activity",empty:!l&&c.length===0,allClear:"No recent activity.",action:e.jsx(p,{variant:"ghost",size:"sm",className:"h-6 text-xs",onClick:()=>i({to:"/activity"}),children:"Open activity →"}),children:e.jsx(R,{children:e.jsx(L,{children:c.map(n=>e.jsx(M,{item:n},n.id))})})})}function z(){return e.jsxs("div",{"data-slot":"pulse",className:"flex h-full flex-col gap-6 overflow-y-auto p-4",children:[e.jsx(_,{}),e.jsx(B,{})]})}export{z as PulsePanel,q as usePulseFreshness};
@@ -1,11 +0,0 @@
1
- import{e3 as K,aE as q,A as ie,ah as oe,r as a,D as ae,j as t,e4 as re,e5 as le,e6 as ce,e7 as de,e8 as B,e9 as ue,B as y,am as me,ea as he,aD as fe,aj as xe,eb as ye,ec as ge,ed as ve,ee as H,ef as k,eg as be,eh as pe}from"./index-BMR65QI4.js";/**
2
- * @license lucide-react v1.44.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 U={name:"file-exclamation-point",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["file-warning"]};U.node;const we=K(U);/**
7
- * @license lucide-react v1.44.0 - ISC
8
- *
9
- * This source code is licensed under the ISC license.
10
- * See the LICENSE file in the root directory of this source tree.
11
- */const Q={name:"share-2",size:24,node:[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]};Q.node;const Ee=K(Q),Oe="—";function Re(e){if(e==null)return{label:Oe,title:null};const s=q(e.at);return{label:`${e.author} · ${s}`,title:`${e.subject} · ${e.author}, ${s}`}}function V(e){return/\.(md|markdown|mdx)$/i.test(e)}function _e(e){return e<1024?`${e} bytes`:e<1024*1024?`${Math.round(e/1024)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function je(e,s){return e.editable&&e.save!==void 0&&s!==void 0&&s.body.kind==="text"&&V(s.path)}function Le({source:e,path:s,onClose:d}){const r=e.read,i=ie(),n=["file-explorer","preview",e.scopeKey,s],u=oe({queryKey:n,queryFn:()=>r(s),enabled:s!==null&&r!==void 0}),l=u.data,[h,S]=a.useState(!1),[D,F]=a.useState(null),j=e.showToEveryone,G=a.useCallback(async o=>{if(j!==void 0){S(!0),F(null);try{await j(o),d()}catch(c){F(c instanceof Error&&c.message.trim().length>0?c.message:"DorkOS couldn’t reach the server. Check your connection and try again.")}finally{S(!1)}}},[j,d]),[f,N]=a.useState(!1),[b,p]=a.useState(""),[M,O]=a.useState({text:"",commit:null}),[g,x]=a.useState(null),[C,m]=a.useState(null),[A,w]=a.useState(!1),[Y,R]=a.useState(!1),P=a.useRef(null),z=a.useRef(null),L=a.useRef(!1),v=f&&b!==M.text,I=Y&&v,T=a.useCallback(()=>{N(!1),p(""),O({text:"",commit:null}),x(null),m(null),w(!1),R(!1)},[]),[J,X]=a.useState(s);J!==s&&(X(s),(f||b!==""||g!==null||C!==null||A)&&T());const E=ae({mutationFn:o=>e.save({path:s,baseCommit:o.baseCommit,text:o.text}),onSuccess:(o,c)=>{if(o.status==="saved"){O({text:c.text,commit:o.commit}),x(null),m(null),w(!0),i.invalidateQueries({queryKey:n}),i.invalidateQueries({queryKey:["file-explorer","tree",e.scopeKey]});return}if(w(!1),o.status==="conflict"){x(ne=>({commit:o.commit,lastCommit:o.lastCommit,again:ne!==null})),m(null);return}x(null),m(o.reason)},onError:()=>{w(!1),x(null),m("That didn’t save. Try again in a moment.")}}),$=je(e,l),W=()=>{l===void 0||l.body.kind!=="text"||(p(l.body.text),O({text:l.body.text,commit:l.commit??null}),x(null),m(null),w(!1),N(!0))},Z=()=>{N(!1),p(""),x(null),m(null),R(!1)},ee=async()=>{const o=await u.refetch();if(o.isError||o.data===void 0){m("Their version couldn’t be fetched just now, so nothing here changed.");return}const c=o.data;if(c.body.kind!=="text"){m(c.body.kind==="not-readable"?`${c.body.reason} What you typed is still here. Save it over their change, or close this and copy it out first.`:"Their version isn’t something that can be shown here, so nothing here changed.");return}p(c.body.text),O({text:c.body.text,commit:c.commit??null}),x(null),m(null)},te=()=>{g!==null&&E.mutate({text:b,baseCommit:g.commit})},se=()=>{if(v){R(!0);return}T(),d()};return a.useEffect(()=>{var o,c;f?(o=P.current)==null||o.focus():L.current&&((c=z.current)==null||c.focus()),L.current=f},[f]),t.jsx(re,{open:s!==null,onOpenChange:o=>!o&&se(),children:t.jsxs(le,{className:"max-h-[80vh] sm:max-w-2xl",children:[t.jsxs(ce,{children:[t.jsx(de,{className:"truncate font-mono text-sm",children:s===null?"":B(s)}),t.jsx(ue,{className:"truncate text-xs",children:Ce(l,s)})]}),!f&&(e.showToEveryone!==void 0||$)&&t.jsxs("div",{className:"flex justify-end gap-1 px-4",children:[e.showToEveryone!==void 0&&s!==null&&t.jsxs(y,{type:"button",variant:"ghost",size:"sm",disabled:h,className:"text-muted-foreground hover:text-foreground gap-1.5",onClick:()=>void G(s),children:[t.jsx(Ee,{className:"size-(--size-icon-xs)"}),h?"Putting it there…":"Put on the canvas"]}),$&&t.jsxs(y,{ref:z,type:"button",variant:"ghost",size:"sm",className:"text-muted-foreground hover:text-foreground gap-1.5",onClick:W,children:[t.jsx(me,{className:"size-(--size-icon-xs)"}),"Edit"]})]}),D!==null&&t.jsx("p",{role:"status",className:"text-destructive px-4 pb-1 text-xs",children:D}),g!==null&&t.jsx(Ne,{conflict:g,onTakeTheirs:()=>void ee(),onKeepMine:te,busy:E.isPending||u.isFetching}),C!==null&&t.jsx("p",{role:"alert",className:"bg-destructive/10 text-destructive mx-4 rounded-md px-3 py-2 text-sm",children:C}),t.jsx(he,{className:"min-h-0 flex-1 overflow-auto",children:u.isPending?t.jsx("div",{className:"flex h-32 items-center justify-center",children:t.jsx(fe,{size:"md",className:"text-muted-foreground",label:"Loading the file"})}):u.isError||l===void 0?t.jsx(_,{children:"This file couldn’t be read."}):f?t.jsx("textarea",{ref:P,"aria-label":`${s===null?"File":B(s)} contents`,value:b,onChange:o=>p(o.target.value),spellCheck:!1,autoComplete:"off",className:xe("text-foreground/90 border-border/60 bg-background field-sizing-content","focus-visible:border-ring focus-visible:ring-ring/50 min-h-64 w-full","resize-none rounded-md border px-3 py-2 font-mono text-xs","whitespace-pre-wrap focus-visible:ring-[3px] focus-visible:outline-none")}):t.jsx(Te,{file:l})}),f&&t.jsxs(ye,{className:"items-center gap-2 sm:justify-between",children:[t.jsx("span",{className:"text-muted-foreground text-xs","aria-live":"polite",children:E.isPending?"Saving…":I?"You haven’t saved your changes.":A&&!v?"Saved":v?"Not saved yet":""}),t.jsx("span",{className:"flex gap-2",children:I?t.jsxs(t.Fragment,{children:[t.jsx(y,{type:"button",variant:"ghost",size:"sm",onClick:()=>R(!1),children:"Keep editing"}),t.jsx(y,{type:"button",variant:"destructive",size:"sm",onClick:()=>{T(),d()},children:"Discard changes"})]}):t.jsxs(t.Fragment,{children:[t.jsx(y,{type:"button",variant:"ghost",size:"sm",onClick:Z,children:v?"Discard":"Done"}),t.jsx(y,{type:"button",size:"sm",disabled:!v||E.isPending||g!==null,onClick:()=>E.mutate({text:b,baseCommit:M.commit}),children:"Save"})]})})]})]})})}function Ne({conflict:e,onTakeTheirs:s,onKeepMine:d,busy:r}){const i=e.lastCommit,n=i===null?"Somebody":i.author;return t.jsxs("div",{role:"alert",className:"border-border/60 bg-muted/40 mx-4 space-y-2 rounded-md border px-3 py-2 text-sm",children:[t.jsx("p",{children:e.again?`${n} changed this file again while you were deciding, so it still isn’t saved.`:`${n} changed this file while you were editing it, so nothing was saved.`}),i!==null&&t.jsxs("p",{className:"text-muted-foreground text-xs",children:[i.subject," · ",q(i.at)]}),t.jsxs("div",{className:"flex flex-wrap gap-2",children:[t.jsx(y,{type:"button",variant:"outline",size:"sm",disabled:r,onClick:s,children:"Open their version"}),t.jsx(y,{type:"button",variant:"destructive",size:"sm",disabled:r,onClick:d,children:"Save mine over it"})]}),t.jsx("p",{className:"text-muted-foreground text-xs",children:"Opening theirs replaces what you typed here."})]})}function Ce(e,s){if(s===null)return"";const d=e===void 0?null:Re(e.lastCommit);return d===null?s:`${s} · ${d.label}`}function Te({file:e}){switch(e.body.kind){case"text":return V(e.path)?t.jsx(ge,{content:e.body.text,className:"text-sm",errorFallback:"This file couldn’t be displayed."}):t.jsx("pre",{className:"text-foreground/90 overflow-x-auto font-mono text-xs whitespace-pre",children:e.body.text});case"binary":return t.jsx(_,{children:"This isn’t text, so there’s nothing to show here."});case"too-large":return t.jsxs(_,{children:["This file is larger than ",_e(e.body.maxBytes),", so it isn’t shown here."]});case"not-readable":return t.jsx(_,{children:e.body.reason})}}function _({children:e}){return t.jsxs("div",{className:"text-muted-foreground flex h-32 flex-col items-center justify-center gap-2 px-6 text-center text-sm",children:[t.jsx(we,{className:"size-(--size-icon-md) opacity-60"}),t.jsx("span",{children:e})]})}const ke=new Map([["REQUEST_TOO_LARGE","That is too much text to send in one go, so nothing was saved. A room’s files are for documents people read. Anything this big belongs in the room’s attachments."],["FILE_TOO_LARGE","This file would be bigger than this room allows, so nothing was saved."],["REPO_CAP_EXCEEDED","This room’s files are already as large as they are allowed to get, so nothing was saved."],["MAIN_CHECKOUT_DIRTY","Somebody changed this room’s files outside DorkOS, so saving is paused until that is sorted out. The warning above the files says how."],["MERGE_IN_FLIGHT","Somebody else is writing to this room’s files right now. Nothing was saved. Try again in a moment."],["PEOPLE_ONLY","Only a person can save a room’s files this way. An agent brings its work in by merging."],["ROOM_FILE_NOT_TEXT","This file has something in it that is not text, so it cannot be saved from here."],["ROOM_FILE_PATH_INVALID","That file name could mean somewhere else, so nothing was saved."],["ROOM_FILE_NOT_FOUND","This file is not in the room’s files any more, so there was nothing to save over."],["ROOM_FILE_NOT_READABLE","This is not a file that can be edited here."],["ROOM_HAS_NO_REPO","This room does not have files of its own any more."],["ROOM_REPOS_DISABLED","Rooms cannot have files of their own on this install right now, so nothing was saved."],["ROOM_REPO_GIT_UNAVAILABLE","This computer doesn’t have git installed, and a room’s files are a git repository."],["ROOM_NOT_FOUND","This room is not there any more."],["ROOM_ARCHIVED","This room is archived, so its files cannot be changed."]]);function Se(e){return e===void 0?void 0:ke.get(e)}function De(e){if(typeof e!="object"||e===null)return null;const s=ve.safeParse(e.body);return s.success?s.data.conflict:null}const Fe=15e3;function Me(e,s,d){const r=JSON.stringify(H.entries(s));let i=0,n=null;const u=e.getQueryCache().subscribe(l=>{if(l.type!=="updated"||JSON.stringify(l.query.queryKey)!==r||n!==null)return;const h=Math.max(0,Fe-(Date.now()-i));n=setTimeout(()=>{n=null,i=Date.now(),d()},h)});return()=>{n!==null&&clearTimeout(n),u()}}function Ae(e){return{name:e.name,path:e.path,type:e.kind==="dir"?"dir":"file",size:e.size,isSymlink:e.kind==="symlink",lastCommit:e.lastCommit}}const Pe=new Map([["ROOM_FILE_NOT_READABLE","This isn’t a file that can be shown here."],["ROOM_FILE_NOT_FOUND","This file isn’t in the room’s files any more."]]);function Ie(e){const{transport:s,queryClient:d,roomId:r}=e;return{scopeKey:`room:${r}`,cwd:null,writable:!1,provenance:!0,filtersHidden:!1,preview:"inline",async showToEveryone(i){await s.openRoomCanvasDocument(r,{type:"file",sourcePath:i})},editable:!0,async list(i){try{return{entries:(await s.readRoomFiles(r,i===""?void 0:i)).entries.map(Ae)}}catch(n){if(k(n)!==pe)throw n;return{entries:[],absent:!0}}},async read(i){try{const n=await s.readRoomFileContent(r,i);return{path:n.path,size:n.size,lastCommit:n.lastCommit,commit:n.commit,body:n.body.kind==="text"?{kind:"text",text:n.body.text}:n.body.kind==="binary"?{kind:"binary"}:{kind:"too-large",maxBytes:n.body.maxBytes}}}catch(n){const u=Pe.get(k(n)??"");if(u===void 0)throw n;return{path:i,size:0,lastCommit:null,commit:null,body:{kind:"not-readable",reason:u}}}},async save(i){try{const n=await s.saveRoomFile(r,{path:i.path,baseCommit:i.baseCommit,text:i.text});return{status:"saved",commit:n.commit,lastCommit:n.lastCommit,committed:n.committed}}catch(n){const u=k(n);if(u===be){const h=De(n);return h!==null?{status:"conflict",commit:h.commit,lastCommit:h.lastCommit}:{status:"refused",reason:"Somebody changed this file while you were editing it, so nothing was saved. Close this and open it again to see their version."}}u==="MAIN_CHECKOUT_DIRTY"&&d.invalidateQueries({queryKey:H.repoStatus(r)});const l=Se(u);if(l===void 0)throw n;return{status:"refused",reason:l}}},events(i){return Me(d,r,i)}}}export{Le as F,Oe as N,Fe as R,Ie as c,Re as p,Me as w};
@@ -1 +0,0 @@
1
- import{z as u,A as n,D as s}from"./index-BMR65QI4.js";const i=["agents"];function d(e){const a=u(),r=n();return s({...e!=null&&e.errorLabel?{meta:{errorLabel:e.errorLabel}}:{},mutationFn:t=>a.updateMeshAgent(t.id,t.updates),onSuccess:()=>{r.invalidateQueries({queryKey:["mesh","agents"]})},onSettled:()=>{r.invalidateQueries({queryKey:i})}})}export{d as u};