volute 0.34.0 → 0.36.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.
- package/README.md +7 -6
- package/dist/accept-ZBDVVCEU.js +42 -0
- package/dist/{activity-events-BN7V6KCC.js → activity-events-PWOGSMRL.js} +4 -4
- package/dist/{ai-service-PSILB5WD.js → ai-service-GSZWIETO.js} +5 -5
- package/dist/{api-client-XUXOB7LI.js → api-client-3A77HMH7.js} +1 -1
- package/dist/api.d.ts +1 -5618
- package/dist/{archive-C2VEMQOR.js → archive-Y2YEOCGB.js} +3 -3
- package/dist/{auth-ZFZXJZDQ.js → auth-YTQME4EV.js} +5 -5
- package/dist/bridge-PXIO6PS2.js +206 -0
- package/dist/chat-ED7YOGKO.js +51 -0
- package/dist/{chunk-6LXAAQ43.js → chunk-33ODGMFZ.js} +1 -1
- package/dist/{chunk-G53F3JA4.js → chunk-46DYYHN6.js} +8 -3
- package/dist/{chunk-FYCALD4Q.js → chunk-5T5YMX6S.js} +1 -1
- package/dist/{chunk-B2BVAIZ4.js → chunk-6F3YNULE.js} +76 -24
- package/dist/{chunk-N7BLAHNE.js → chunk-75AJ54GM.js} +16 -5
- package/dist/{chunk-4JSR7YO7.js → chunk-7PTQGPJY.js} +29 -13
- package/dist/{chunk-XWXBJQBE.js → chunk-B35VNNSS.js} +4 -4
- package/dist/{chunk-V45JXOWY.js → chunk-BOLJUV77.js} +4 -4
- package/dist/{chunk-NAOW2CLO.js → chunk-BTY4WNFE.js} +1 -1
- package/dist/{chunk-OYAKCAVY.js → chunk-CU6OFXMM.js} +1 -1
- package/dist/{chunk-7F2SW2KD.js → chunk-DJT5Y4UF.js} +3 -3
- package/dist/{chunk-BM474GX6.js → chunk-DMV5P2LU.js} +4 -4
- package/dist/{chunk-TAHX36HZ.js → chunk-DQ7VBXAP.js} +2014 -436
- package/dist/{chunk-N3DNFPVA.js → chunk-GBDVNPN2.js} +15 -13
- package/dist/{chunk-E5C7OWZ2.js → chunk-IIWF2IPD.js} +150 -190
- package/dist/{chunk-PVY5W6QN.js → chunk-KAB6UGOL.js} +2 -2
- package/dist/{chunk-BDK73LK6.js → chunk-L72WYMF7.js} +2 -2
- package/dist/{chunk-G6BSYHPK.js → chunk-LGNUFVMR.js} +1 -1
- package/dist/{chunk-4RQBJWQX.js → chunk-LOPXTW6H.js} +1 -1
- package/dist/{chunk-BFWHBQK4.js → chunk-M5RYAA5I.js} +3 -3
- package/dist/{chunk-V6ZCNULL.js → chunk-N2AUHW4C.js} +37 -28
- package/dist/{chunk-6OWJXUAR.js → chunk-NUX47Y2V.js} +19 -4
- package/dist/{chunk-D424ZQGI.js → chunk-O7IGP7ZW.js} +11 -3
- package/dist/{chunk-U5BTYSAL.js → chunk-PJ4IPTIN.js} +2 -2
- package/dist/{chunk-BTWAGDV5.js → chunk-PY557GDR.js} +3 -3
- package/dist/{chunk-47ZPNLF4.js → chunk-PZYJBOQP.js} +8 -137
- package/dist/chunk-QHG4OMZL.js +145 -0
- package/dist/chunk-RG5TOL4O.js +18 -0
- package/dist/{chunk-6WAWMWR5.js → chunk-SWW6AUVW.js} +2 -2
- package/dist/{chunk-YUIHSKR6.js → chunk-T2TP6ZC6.js} +20 -8
- package/dist/chunk-TWAN7ZNO.js +164 -0
- package/dist/chunk-TXSA4Q3V.js +116 -0
- package/dist/{chunk-KTLFDYPT.js → chunk-UI7RPV2B.js} +1 -1
- package/dist/{chunk-SSI47XP2.js → chunk-VHWGEJ4V.js} +1 -1
- package/dist/{chunk-IS7WJ56Q.js → chunk-X2J7QUFH.js} +3 -3
- package/dist/{chunk-M3K5AARV.js → chunk-YDBAY3NA.js} +2 -2
- package/dist/{chunk-MLOQKQNB.js → chunk-YTWZORJN.js} +2 -2
- package/dist/{chunk-2IOP6PHB.js → chunk-ZTVKQOU7.js} +2 -2
- package/dist/{chunk-PLDWHR4D.js → chunk-ZX7EAV5J.js} +17 -7
- package/dist/cli.js +90 -29
- package/dist/clock-HSEKS5AR.js +289 -0
- package/dist/{cloud-sync-TG3TIX5H.js → cloud-sync-BOCZSDIA.js} +20 -22
- package/dist/config-UTS7QULS.js +76 -0
- package/dist/connectors/discord-bridge.js +3 -3
- package/dist/connectors/slack-bridge.js +3 -3
- package/dist/connectors/telegram-bridge.js +3 -3
- package/dist/{conversations-HL2JP5GI.js → conversations-HH3CJD4E.js} +15 -9
- package/dist/create-5BPOOJAN.js +75 -0
- package/dist/create-QBEPSD2Z.js +50 -0
- package/dist/daemon-client-RVIKXGFQ.js +12 -0
- package/dist/daemon-restart-SIR3UR4B.js +65 -0
- package/dist/daemon.js +1186 -1989
- package/dist/{db-PLEDCBHZ.js → db-BDMH4SZ2.js} +7 -3
- package/dist/{db-RYX3SS2W.js → db-URORGSXQ.js} +2 -2
- package/dist/delete-L5PAVDGQ.js +42 -0
- package/dist/delivery-manager-WTGIPBGY.js +30 -0
- package/dist/{delivery-router-D5ELDMS2.js → delivery-router-VSULHXNH.js} +4 -4
- package/dist/down-DGGLZ5TA.js +17 -0
- package/dist/env-E4XHO2BI.js +223 -0
- package/dist/{exec-DVLXKRIO.js → exec-X3C6ZZTQ.js} +4 -4
- package/dist/export-HTFOHOKL.js +113 -0
- package/dist/{extension-PM42QCID.js → extension-AKZ46YSL.js} +46 -35
- package/dist/extensions-OOSFVH7U.js +50 -0
- package/dist/files-H2YLRD37.js +53 -0
- package/dist/import-OL5BZX7S.js +143 -0
- package/dist/{isolation-62MKDZN3.js → isolation-N74RWOUX.js} +3 -3
- package/dist/join-DF5XSJAC.js +67 -0
- package/dist/list-GJ4RUQQT.js +59 -0
- package/dist/login-GOTAYLXP.js +51 -0
- package/dist/login-JXRVMBRB.js +60 -0
- package/dist/logout-6KIA74EV.js +29 -0
- package/dist/logout-FW243JBU.js +50 -0
- package/dist/message-delivery-YORUXKDQ.js +40 -0
- package/dist/mind-6VJJHF65.js +97 -0
- package/dist/{mind-activity-tracker-2ACNHA7B.js → mind-activity-tracker-66UVYIFW.js} +5 -5
- package/dist/mind-history-MII2SK7F.js +342 -0
- package/dist/mind-list-GEWHWAL4.js +38 -0
- package/dist/mind-manager-TJ2SUPRX.js +30 -0
- package/dist/mind-profile-DCBDVF5B.js +53 -0
- package/dist/mind-service-E7FM2WZF.js +36 -0
- package/dist/mind-sleep-ITCF6OQA.js +47 -0
- package/dist/mind-status-X4SX3YUG.js +65 -0
- package/dist/mind-wake-KXMKMGWX.js +42 -0
- package/dist/{package-V2WHWVG6.js → package-3W2MEXHB.js} +5 -5
- package/dist/read-ZUDG4JWU.js +91 -0
- package/dist/{read-stdin-PIRM6A2Y.js → read-stdin-3X5VYKNS.js} +1 -1
- package/dist/register-SB7NXCOE.js +51 -0
- package/dist/{registry-UYV5S6QT.js → registry-YPHK534W.js} +2 -2
- package/dist/reject-MUR2KWJ4.js +40 -0
- package/dist/restart-5EGG4JXU.js +42 -0
- package/dist/{sandbox-SI5HMBP3.js → sandbox-LP6YRAXS.js} +5 -5
- package/dist/scheduler-FRJ5DK24.js +30 -0
- package/dist/{schema-ETMABTW4.js → schema-MISD3JFG.js} +3 -1
- package/dist/{seed-WNGI6PNW.js → seed-CEC4RC23.js} +2 -2
- package/dist/seed-check-KJNTL72M.js +35 -0
- package/dist/seed-cmd-WTTG7SRQ.js +30 -0
- package/dist/seed-create-M6RCC6RP.js +113 -0
- package/dist/seed-sprout-ZKCHFJKH.js +148 -0
- package/dist/send-LXUT2GGR.js +409 -0
- package/dist/service-M6N3RUYU.js +121 -0
- package/dist/{setup-Z3DEVWV7.js → setup-PJOF5UV5.js} +153 -127
- package/dist/{setup-GGMKENLN.js → setup-PMJHCZQX.js} +5 -3
- package/dist/skill-TAAKEYBV.js +389 -0
- package/dist/skills/tending/SKILL.md +52 -0
- package/dist/skills/volute-mind/SKILL.md +3 -7
- package/dist/skills/volute-mind/references/extensions.md +8 -11
- package/dist/{skills-Q6VZ2UGD.js → skills-2PTRTBQP.js} +7 -7
- package/dist/sleep-manager-WAZWMFJT.js +34 -0
- package/dist/spirit-6KVDIROQ.js +24 -0
- package/dist/split-AWVOYOPZ.js +64 -0
- package/dist/{sprout-E3HJIV2Z.js → sprout-WX2FFYLP.js} +2 -2
- package/dist/src-FQE4BHRG.js +617 -0
- package/dist/src-GW6FP6VL.js +425 -0
- package/dist/src-QEOLMAYC.js +2133 -0
- package/dist/start-3UXOPXQG.js +39 -0
- package/dist/status-3IVSLJDN.js +125 -0
- package/dist/stop-3XYIBGFM.js +41 -0
- package/dist/system-chat-2IFS5HCX.js +34 -0
- package/dist/systems-O43WGQY6.js +52 -0
- package/dist/{tailscale-ZEUK7GKZ.js → tailscale-DZU4WM3E.js} +4 -4
- package/dist/{template-hash-EJRTKE36.js → template-hash-6ITI3WC4.js} +2 -2
- package/dist/up-4SCIUIMG.js +19 -0
- package/dist/update-RIQYUPVN.js +225 -0
- package/dist/{update-check-X3YG4WVP.js → update-check-4TIJKVGD.js} +3 -3
- package/dist/upgrade-ZMDGC7M2.js +74 -0
- package/dist/variant-QWL2WSRI.js +62 -0
- package/dist/{version-notify-YCH4UVQ2.js → version-notify-UXSHBZ35.js} +27 -27
- package/dist/{volute-config-WBKYJGYQ.js → volute-config-V7UFFBG3.js} +1 -1
- package/dist/web-assets/assets/index-C-eYso8Y.js +75 -0
- package/dist/web-assets/assets/index-CCv_fSte.css +1 -0
- package/dist/web-assets/index.html +2 -2
- package/dist/web-assets/sw.js +117 -0
- package/drizzle/0006_channels.sql +17 -0
- package/drizzle/0007_drop_conversation_name_title.sql +11 -0
- package/drizzle/0008_performance_indexes.sql +6 -0
- package/drizzle/meta/0006_snapshot.json +7 -0
- package/drizzle/meta/0007_snapshot.json +7 -0
- package/drizzle/meta/_journal.json +21 -0
- package/package.json +5 -5
- package/packages/extensions/pages/dist/ui/assets/index-DKZLNMED.js +2 -0
- package/packages/extensions/pages/dist/ui/index.html +1 -1
- package/packages/extensions/pages/skills/pages/SKILL.md +84 -9
- package/templates/_base/home/.config/routes.json +2 -2
- package/templates/_base/home/VOLUTE.md +1 -2
- package/templates/_base/src/lib/auto-commit.ts +8 -8
- package/templates/_base/src/lib/format-prefix.ts +1 -7
- package/templates/_base/src/lib/volute-server.ts +6 -0
- package/templates/claude/.init/.config/routes.json +2 -2
- package/templates/claude/src/agent.ts +8 -1
- package/templates/codex/.init/.config/routes.json +2 -2
- package/templates/pi/.init/.config/routes.json +2 -2
- package/dist/accept-TW6V4WI4.js +0 -42
- package/dist/bridge-O753D5F4.js +0 -207
- package/dist/chat-BHYX7DJ4.js +0 -68
- package/dist/chunk-47XDEWWV.js +0 -156
- package/dist/chunk-CVL5IGIR.js +0 -2084
- package/dist/chunk-PB65JZK2.js +0 -85
- package/dist/clock-3X4DSC2N.js +0 -281
- package/dist/config-OROA5DUA.js +0 -72
- package/dist/create-3SEKKI6P.js +0 -71
- package/dist/create-UOSOQ2HN.js +0 -44
- package/dist/daemon-client-WOAQXXBM.js +0 -12
- package/dist/daemon-restart-5ABHNXJZ.js +0 -52
- package/dist/delete-KYOVWR23.js +0 -35
- package/dist/delivery-manager-2BR5NZKF.js +0 -32
- package/dist/down-QVFN4UPK.js +0 -15
- package/dist/env-R34DT7XL.js +0 -195
- package/dist/export-6ZXAXATG.js +0 -112
- package/dist/extensions-BBGVL5JC.js +0 -38
- package/dist/files-VQV2VZQO.js +0 -47
- package/dist/import-MK2I2T6F.js +0 -23
- package/dist/join-DGYHTJUH.js +0 -66
- package/dist/list-C644WTHV.js +0 -49
- package/dist/login-IIGEQPHL.js +0 -47
- package/dist/login-KZQLMAWE.js +0 -47
- package/dist/logout-AGTZVRGP.js +0 -40
- package/dist/logout-KD6GXIJJ.js +0 -21
- package/dist/message-delivery-V3R6NXJP.js +0 -42
- package/dist/mind-BI4EPBVZ.js +0 -108
- package/dist/mind-history-WOYFLQAI.js +0 -264
- package/dist/mind-list-6VPM7GUQ.js +0 -30
- package/dist/mind-manager-MWW3BTS4.js +0 -32
- package/dist/mind-profile-WPG42U5Y.js +0 -47
- package/dist/mind-service-VIKZJK2M.js +0 -38
- package/dist/mind-sleep-XDISJY74.js +0 -42
- package/dist/mind-status-7FTZWPZF.js +0 -56
- package/dist/mind-wake-KIIKEI3A.js +0 -37
- package/dist/read-H5C26YO7.js +0 -85
- package/dist/register-J27WP33N.js +0 -47
- package/dist/reject-OEANJYIA.js +0 -40
- package/dist/restart-V5EGYBJG.js +0 -33
- package/dist/scheduler-AGG3L2FO.js +0 -32
- package/dist/seed-check-PXTH7YXS.js +0 -32
- package/dist/seed-cmd-VENFTGS3.js +0 -36
- package/dist/seed-create-663ALOKH.js +0 -112
- package/dist/seed-sprout-EH3AGKAI.js +0 -132
- package/dist/send-7FUUUZZH.js +0 -386
- package/dist/skill-DKNYJS4P.js +0 -362
- package/dist/skills/shared-files/SKILL.md +0 -44
- package/dist/skills/shared-files/scripts/merge.ts +0 -72
- package/dist/skills/shared-files/scripts/pull.ts +0 -52
- package/dist/sleep-manager-BJK2ROPX.js +0 -36
- package/dist/spirit-4JP4TY4C.js +0 -23
- package/dist/split-3YPMS2CL.js +0 -63
- package/dist/start-W3TPKX4D.js +0 -33
- package/dist/status-4OVFXFEJ.js +0 -115
- package/dist/stop-GTT6YWYO.js +0 -32
- package/dist/system-channel-DXD2JBOU.js +0 -36
- package/dist/system-chat-TYLOL7SX.js +0 -36
- package/dist/systems-AYLO727G.js +0 -61
- package/dist/up-PA7F2CXE.js +0 -18
- package/dist/update-HG4LCUSG.js +0 -215
- package/dist/upgrade-YGNIDICG.js +0 -67
- package/dist/variant-MZUMRTQO.js +0 -41
- package/dist/web-assets/assets/index-DiiwC-CZ.css +0 -1
- package/dist/web-assets/assets/index-d6y5b9Ij.js +0 -75
- package/packages/extensions/pages/dist/ui/assets/index-tLTROSk5.js +0 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const f of s.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&r(f)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();const An=!1;var It=Array.isArray,Pn=Array.prototype.indexOf,Ae=Array.prototype.includes,$e=Array.from,Nn=Object.defineProperty,je=Object.getOwnPropertyDescriptor,On=Object.getOwnPropertyDescriptors,Rn=Object.prototype,Dn=Array.prototype,Lt=Object.getPrototypeOf,xt=Object.isExtensible;const Cn=()=>{};function Fn(e){for(var t=0;t<e.length;t++)e[t]()}function jt(){var e,t,n=new Promise((r,i)=>{e=r,t=i});return{promise:n,resolve:e,reject:t}}const M=2,Be=4,et=8,zt=1<<24,de=16,Z=32,ye=64,lt=128,H=512,k=1024,N=2048,J=4096,L=8192,X=16384,Te=32768,Tt=1<<25,Pe=65536,kt=1<<17,In=1<<18,De=1<<19,Ln=1<<20,se=1<<25,Ee=65536,ft=1<<21,dt=1<<22,ue=1<<23,it=Symbol("$state"),jn=Symbol(""),ie=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"};function zn(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function qn(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Bn(e,t,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function Hn(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Vn(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Un(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Yn(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Kn(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Wn(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Gn(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Xn(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Zn=1,Jn=2,Qn=16,$n=2,P=Symbol(),qt="http://www.w3.org/1999/xhtml";function er(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function Bt(e){return e===this.v}function tr(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Ht(e){return!tr(e,this.v)}let nr=!1,j=null;function Ne(e){j=e}function tt(e,t=!1,n){j={p:j,i:!1,c:null,e:null,s:e,x:null,r:E,l:null}}function nt(e){var t=j,n=t.e;if(n!==null){t.e=null;for(var r of n)un(r)}return t.i=!0,j=t.p,{}}function Vt(){return!0}let ke=[];function rr(){var e=ke;ke=[],Fn(e)}function ge(e){if(ke.length===0){var t=ke;queueMicrotask(()=>{t===ke&&rr()})}ke.push(e)}function Ut(e){var t=E;if(t===null)return y.f|=ue,e;if((t.f&Te)===0&&(t.f&Be)===0)throw e;ae(e,t)}function ae(e,t){for(;t!==null;){if((t.f<)!==0){if((t.f&Te)===0)throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}const ir=-7169;function T(e,t){e.f=e.f&ir|t}function ht(e){(e.f&H)!==0||e.deps===null?T(e,k):T(e,J)}function Yt(e){if(e!==null)for(const t of e)(t.f&M)===0||(t.f&Ee)===0||(t.f^=Ee,Yt(t.deps))}function Kt(e,t,n){(e.f&N)!==0?t.add(e):(e.f&J)!==0&&n.add(e),Yt(e.deps),T(e,k)}const Ce=new Set;let x=null,$=null,at=null,st=!1,Me=null,Ke=null;var Mt=0;let sr=1;class ve{id=sr++;current=new Map;previous=new Map;#e=new Set;#a=new Set;#t=0;#l=0;#r=null;#n=[];#i=new Set;#s=new Set;#f=new Map;is_fork=!1;#o=!1;#u(){return this.is_fork||this.#l>0}skip_effect(t){this.#f.has(t)||this.#f.set(t,{d:[],m:[]})}unskip_effect(t){var n=this.#f.get(t);if(n){this.#f.delete(t);for(var r of n.d)T(r,N),this.schedule(r);for(r of n.m)T(r,J),this.schedule(r)}}#v(){Mt++>1e3&&lr();const t=this.#n;this.#n=[],this.apply();var n=Me=[],r=[],i=Ke=[];for(const l of t)try{this.#d(l,n,r)}catch(a){throw Zt(l),a}if(x=null,i.length>0){var s=ve.ensure();for(const l of i)s.schedule(l)}if(Me=null,Ke=null,this.#u()){this.#h(r),this.#h(n);for(const[l,a]of this.#f)Xt(l,a)}else{this.#t===0&&Ce.delete(this),this.#i.clear(),this.#s.clear();for(const l of this.#e)l(this);this.#e.clear(),At(r),At(n),this.#r?.resolve()}var f=x;if(this.#n.length>0){const l=f??=this;l.#n.push(...this.#n.filter(a=>!l.#n.includes(a)))}f!==null&&(Ce.add(f),f.#v()),Ce.has(this)||this.#c()}#d(t,n,r){t.f^=k;for(var i=t.first;i!==null;){var s=i.f,f=(s&(Z|ye))!==0,l=f&&(s&k)!==0,a=l||(s&L)!==0||this.#f.has(i);if(!a&&i.fn!==null){f?i.f^=k:(s&Be)!==0?n.push(i):Ue(i)&&((s&de)!==0&&this.#s.add(i),Re(i));var o=i.first;if(o!==null){i=o;continue}}for(;i!==null;){var v=i.next;if(v!==null){i=v;break}i=i.parent}}}#h(t){for(var n=0;n<t.length;n+=1)Kt(t[n],this.#i,this.#s)}capture(t,n){n!==P&&!this.previous.has(t)&&this.previous.set(t,n),(t.f&ue)===0&&(this.current.set(t,t.v),$?.set(t,t.v))}activate(){x=this}deactivate(){x=null,$=null}flush(){try{if(st=!0,x=this,!this.#u()){for(const t of this.#i)this.#s.delete(t),T(t,N),this.schedule(t);for(const t of this.#s)T(t,J),this.schedule(t)}this.#v()}finally{Mt=0,at=null,Me=null,Ke=null,st=!1,x=null,$=null,ce.clear()}}discard(){for(const t of this.#a)t(this);this.#a.clear()}#c(){for(const a of Ce){var t=a.id<this.id,n=[];for(const[o,v]of this.current){if(a.current.has(o))if(t&&v!==a.current.get(o))a.current.set(o,v);else continue;n.push(o)}if(n.length!==0){var r=[...a.current.keys()].filter(o=>!this.current.has(o));if(r.length>0){a.activate();var i=new Set,s=new Map;for(var f of n)Wt(f,r,i,s);if(a.#n.length>0){a.apply();for(var l of a.#n)a.#d(l,[],[])}a.deactivate()}}}}increment(t){this.#t+=1,t&&(this.#l+=1)}decrement(t,n){this.#t-=1,t&&(this.#l-=1),!(this.#o||n)&&(this.#o=!0,ge(()=>{this.#o=!1,this.flush()}))}oncommit(t){this.#e.add(t)}ondiscard(t){this.#a.add(t)}settled(){return(this.#r??=jt()).promise}static ensure(){if(x===null){const t=x=new ve;st||(Ce.add(x),ge(()=>{x===t&&t.flush()}))}return x}apply(){{$=null;return}}schedule(t){if(at=t,t.b?.is_pending&&(t.f&(Be|et|zt))!==0&&(t.f&Te)===0){t.b.defer_effect(t);return}for(var n=t;n.parent!==null;){n=n.parent;var r=n.f;if(Me!==null&&n===E&&(y===null||(y.f&M)===0))return;if((r&(ye|Z))!==0){if((r&k)===0)return;n.f^=k}}this.#n.push(n)}}function lr(){try{Yn()}catch(e){ae(e,at)}}let re=null;function At(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(X|L))===0&&Ue(r)&&(re=new Set,Re(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&vn(r),re?.size>0)){ce.clear();for(const i of re){if((i.f&(X|L))!==0)continue;const s=[i];let f=i.parent;for(;f!==null;)re.has(f)&&(re.delete(f),s.push(f)),f=f.parent;for(let l=s.length-1;l>=0;l--){const a=s[l];(a.f&(X|L))===0&&Re(a)}}re.clear()}}re=null}}function Wt(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const i of e.reactions){const s=i.f;(s&M)!==0?Wt(i,t,n,r):(s&(dt|de))!==0&&(s&N)===0&&Gt(i,t,r)&&(T(i,N),_t(i))}}function Gt(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const i of e.deps){if(Ae.call(t,i))return!0;if((i.f&M)!==0&&Gt(i,t,n))return n.set(i,!0),!0}return n.set(e,!1),!1}function _t(e){x.schedule(e)}function Xt(e,t){if(!((e.f&Z)!==0&&(e.f&k)!==0)){(e.f&N)!==0?t.d.push(e):(e.f&J)!==0&&t.m.push(e),T(e,k);for(var n=e.first;n!==null;)Xt(n,t),n=n.next}}function Zt(e){T(e,k);for(var t=e.first;t!==null;)Zt(t),t=t.next}function fr(e){let t=0,n=Se(0),r;return()=>{wt()&&(_(n),Mr(()=>(t===0&&(r=En(()=>e(()=>ze(n)))),t+=1,()=>{ge(()=>{t-=1,t===0&&(r?.(),r=void 0,ze(n))})})))}}var ar=Pe|De;function or(e,t,n,r){new ur(e,t,n,r)}class ur{parent;is_pending=!1;transform_error;#e;#a=null;#t;#l;#r;#n=null;#i=null;#s=null;#f=null;#o=0;#u=0;#v=!1;#d=new Set;#h=new Set;#c=null;#w=fr(()=>(this.#c=Se(this.#o),()=>{this.#c=null}));constructor(t,n,r,i){this.#e=t,this.#t=n,this.#l=s=>{var f=E;f.b=this,f.f|=lt,r(s)},this.parent=E.b,this.transform_error=i??this.parent?.transform_error??(s=>s),this.#r=bt(()=>{this.#g()},ar)}#b(){try{this.#n=q(()=>this.#l(this.#e))}catch(t){this.error(t)}}#y(t){const n=this.#t.failed;n&&(this.#s=q(()=>{n(this.#e,()=>t,()=>()=>{})}))}#E(){const t=this.#t.pending;t&&(this.is_pending=!0,this.#i=q(()=>t(this.#e)),ge(()=>{var n=this.#f=document.createDocumentFragment(),r=me();n.append(r),this.#n=this.#p(()=>q(()=>this.#l(r))),this.#u===0&&(this.#e.before(n),this.#f=null,we(this.#i,()=>{this.#i=null}),this.#_(x))}))}#g(){try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#o=0,this.#n=q(()=>{this.#l(this.#e)}),this.#u>0){var t=this.#f=document.createDocumentFragment();St(this.#n,t);const n=this.#t.pending;this.#i=q(()=>n(this.#e))}else this.#_(x)}catch(n){this.error(n)}}#_(t){this.is_pending=!1;for(const n of this.#d)T(n,N),t.schedule(n);for(const n of this.#h)T(n,J),t.schedule(n);this.#d.clear(),this.#h.clear()}defer_effect(t){Kt(t,this.#d,this.#h)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#t.pending}#p(t){var n=E,r=y,i=j;ee(this.#r),U(this.#r),Ne(this.#r.ctx);try{return ve.ensure(),t()}catch(s){return Ut(s),null}finally{ee(n),U(r),Ne(i)}}#m(t,n){if(!this.has_pending_snippet()){this.parent&&this.parent.#m(t,n);return}this.#u+=t,this.#u===0&&(this.#_(n),this.#i&&we(this.#i,()=>{this.#i=null}),this.#f&&(this.#e.before(this.#f),this.#f=null))}update_pending_count(t,n){this.#m(t,n),this.#o+=t,!(!this.#c||this.#v)&&(this.#v=!0,ge(()=>{this.#v=!1,this.#c&&Oe(this.#c,this.#o)}))}get_effect_pending(){return this.#w(),_(this.#c)}error(t){var n=this.#t.onerror;let r=this.#t.failed;if(!n&&!r)throw t;this.#n&&(D(this.#n),this.#n=null),this.#i&&(D(this.#i),this.#i=null),this.#s&&(D(this.#s),this.#s=null);var i=!1,s=!1;const f=()=>{if(i){er();return}i=!0,s&&Xn(),this.#s!==null&&we(this.#s,()=>{this.#s=null}),this.#p(()=>{this.#g()})},l=a=>{try{s=!0,n?.(a,f),s=!1}catch(o){ae(o,this.#r&&this.#r.parent)}r&&(this.#s=this.#p(()=>{try{return q(()=>{var o=E;o.b=this,o.f|=lt,r(this.#e,()=>a,()=>f)})}catch(o){return ae(o,this.#r.parent),null}}))};ge(()=>{var a;try{a=this.transform_error(t)}catch(o){ae(o,this.#r&&this.#r.parent);return}a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(l,o=>ae(o,this.#r&&this.#r.parent)):l(a)})}}function cr(e,t,n,r){const i=pt;var s=e.filter(d=>!d.settled);if(n.length===0&&s.length===0){r(t.map(i));return}var f=E,l=vr(),a=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(d=>d.promise)):null;function o(d){l();try{r(d)}catch(c){(f.f&X)===0&&ae(c,f)}Je()}if(n.length===0){a.then(()=>o(t.map(i)));return}var v=Jt();function h(){Promise.all(n.map(d=>dr(d))).then(d=>o([...t.map(i),...d])).catch(d=>ae(d,f)).finally(()=>v())}a?a.then(()=>{l(),h(),Je()}):h()}function vr(){var e=E,t=y,n=j,r=x;return function(s=!0){ee(e),U(t),Ne(n),s&&(e.f&X)===0&&(r?.activate(),r?.apply())}}function Je(e=!0){ee(null),U(null),Ne(null),e&&x?.deactivate()}function Jt(){var e=E.b,t=x,n=e.is_rendered();return e.update_pending_count(1,t),t.increment(n),(r=!1)=>{e.update_pending_count(-1,t),t.decrement(n,r)}}function pt(e){var t=M|N,n=y!==null&&(y.f&M)!==0?y:null;return E!==null&&(E.f|=De),{ctx:j,deps:null,effects:null,equals:Bt,f:t,fn:e,reactions:null,rv:0,v:P,wv:0,parent:n??E,ac:null}}function dr(e,t,n){let r=E;r===null&&qn();var i=void 0,s=Se(P),f=!y,l=new Map;return kr(()=>{var a=E,o=jt();i=o.promise;try{Promise.resolve(e()).then(o.resolve,o.reject).finally(Je)}catch(c){o.reject(c),Je()}var v=x;if(f){if((a.f&Te)!==0)var h=Jt();if(r.b.is_rendered())l.get(v)?.reject(ie),l.delete(v);else{for(const c of l.values())c.reject(ie);l.clear()}l.set(v,o)}const d=(c,u=void 0)=>{if(h){var p=u===ie;h(p)}if(!(u===ie||(a.f&X)!==0)){if(v.activate(),u)s.f|=ue,Oe(s,u);else{(s.f&ue)!==0&&(s.f^=ue),Oe(s,c);for(const[w,m]of l){if(l.delete(w),w===v)break;m.reject(ie)}}v.deactivate()}};o.promise.then(d,c=>d(null,c||"unknown"))}),an(()=>{for(const a of l.values())a.reject(ie)}),new Promise(a=>{function o(v){function h(){v===i?a(s):o(i)}v.then(h,h)}o(i)})}function le(e){const t=pt(e);return _n(t),t}function hr(e){const t=pt(e);return t.equals=Ht,t}function _r(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)D(t[n])}}function pr(e){for(var t=e.parent;t!==null;){if((t.f&M)===0)return(t.f&X)===0?t:null;t=t.parent}return null}function gt(e){var t,n=E;ee(pr(e));try{e.f&=~Ee,_r(e),t=wn(e)}finally{ee(n)}return t}function Qt(e){var t=gt(e);if(!e.equals(t)&&(e.wv=gn(),(!x?.is_fork||e.deps===null)&&(e.v=t,e.deps===null))){T(e,k);return}xe||($!==null?(wt()||x?.is_fork)&&$.set(e,t):ht(e))}function gr(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(ie),t.teardown=Cn,t.ac=null,Ve(t,0),yt(t))}function $t(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&Re(t)}let ot=new Set;const ce=new Map;let en=!1;function Se(e,t){var n={f:0,v:e,reactions:null,equals:Bt,rv:0,wv:0};return n}function F(e,t){const n=Se(e);return _n(n),n}function mr(e,t=!1,n=!0){const r=Se(e);return t||(r.equals=Ht),r}function B(e,t,n=!1){y!==null&&(!G||(y.f&kt)!==0)&&Vt()&&(y.f&(M|de|dt|kt))!==0&&(V===null||!Ae.call(V,e))&&Gn();let r=n?oe(t):t;return Oe(e,r,Ke)}function Oe(e,t,n=null){if(!e.equals(t)){var r=e.v;xe?ce.set(e,t):ce.set(e,r),e.v=t;var i=ve.ensure();if(i.capture(e,r),(e.f&M)!==0){const s=e;(e.f&N)!==0&>(s),ht(s)}e.wv=gn(),tn(e,N,n),E!==null&&(E.f&k)!==0&&(E.f&(Z|ye))===0&&(z===null?Nr([e]):z.push(e)),!i.is_fork&&ot.size>0&&!en&&wr()}return t}function wr(){en=!1;for(const e of ot)(e.f&k)!==0&&T(e,J),Ue(e)&&Re(e);ot.clear()}function ze(e){B(e,e.v+1)}function tn(e,t,n){var r=e.reactions;if(r!==null)for(var i=r.length,s=0;s<i;s++){var f=r[s],l=f.f,a=(l&N)===0;if(a&&T(f,t),(l&M)!==0){var o=f;$?.delete(o),(l&Ee)===0&&(l&H&&(f.f|=Ee),tn(o,J,n))}else if(a){var v=f;(l&de)!==0&&re!==null&&re.add(v),n!==null?n.push(v):_t(v)}}}function oe(e){if(typeof e!="object"||e===null||it in e)return e;const t=Lt(e);if(t!==Rn&&t!==Dn)return e;var n=new Map,r=It(e),i=F(0),s=be,f=l=>{if(be===s)return l();var a=y,o=be;U(null),Ot(s);var v=l();return U(a),Ot(o),v};return r&&n.set("length",F(e.length)),new Proxy(e,{defineProperty(l,a,o){(!("value"in o)||o.configurable===!1||o.enumerable===!1||o.writable===!1)&&Kn();var v=n.get(a);return v===void 0?f(()=>{var h=F(o.value);return n.set(a,h),h}):B(v,o.value,!0),!0},deleteProperty(l,a){var o=n.get(a);if(o===void 0){if(a in l){const v=f(()=>F(P));n.set(a,v),ze(i)}}else B(o,P),ze(i);return!0},get(l,a,o){if(a===it)return e;var v=n.get(a),h=a in l;if(v===void 0&&(!h||je(l,a)?.writable)&&(v=f(()=>{var c=oe(h?l[a]:P),u=F(c);return u}),n.set(a,v)),v!==void 0){var d=_(v);return d===P?void 0:d}return Reflect.get(l,a,o)},getOwnPropertyDescriptor(l,a){var o=Reflect.getOwnPropertyDescriptor(l,a);if(o&&"value"in o){var v=n.get(a);v&&(o.value=_(v))}else if(o===void 0){var h=n.get(a),d=h?.v;if(h!==void 0&&d!==P)return{enumerable:!0,configurable:!0,value:d,writable:!0}}return o},has(l,a){if(a===it)return!0;var o=n.get(a),v=o!==void 0&&o.v!==P||Reflect.has(l,a);if(o!==void 0||E!==null&&(!v||je(l,a)?.writable)){o===void 0&&(o=f(()=>{var d=v?oe(l[a]):P,c=F(d);return c}),n.set(a,o));var h=_(o);if(h===P)return!1}return v},set(l,a,o,v){var h=n.get(a),d=a in l;if(r&&a==="length")for(var c=o;c<h.v;c+=1){var u=n.get(c+"");u!==void 0?B(u,P):c in l&&(u=f(()=>F(P)),n.set(c+"",u))}if(h===void 0)(!d||je(l,a)?.writable)&&(h=f(()=>F(void 0)),B(h,oe(o)),n.set(a,h));else{d=h.v!==P;var p=f(()=>oe(o));B(h,p)}var w=Reflect.getOwnPropertyDescriptor(l,a);if(w?.set&&w.set.call(v,o),!d){if(r&&typeof a=="string"){var m=n.get("length"),b=Number(a);Number.isInteger(b)&&b>=m.v&&B(m,b+1)}ze(i)}return!0},ownKeys(l){_(i);var a=Reflect.ownKeys(l).filter(h=>{var d=n.get(h);return d===void 0||d.v!==P});for(var[o,v]of n)v.v!==P&&!(o in l)&&a.push(o);return a},setPrototypeOf(){Wn()}})}var Pt,nn,rn,sn;function br(){if(Pt===void 0){Pt=window,nn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;rn=je(t,"firstChild").get,sn=je(t,"nextSibling").get,xt(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),xt(n)&&(n.__t=void 0)}}function me(e=""){return document.createTextNode(e)}function ln(e){return rn.call(e)}function rt(e){return sn.call(e)}function I(e,t){return ln(e)}function K(e,t=1,n=!1){let r=e;for(;t--;)r=rt(r);return r}function yr(e){e.textContent=""}function fn(){return!1}function Er(e,t,n){return document.createElementNS(qt,e,void 0)}function mt(e){var t=y,n=E;U(null),ee(null);try{return e()}finally{U(t),ee(n)}}function Sr(e){E===null&&(y===null&&Un(),Vn()),xe&&Hn()}function xr(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function he(e,t){var n=E;n!==null&&(n.f&L)!==0&&(e|=L);var r={ctx:j,deps:null,nodes:null,f:e|N|H,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null},i=r;if((e&Be)!==0)Me!==null?Me.push(r):ve.ensure().schedule(r);else if(t!==null){try{Re(r)}catch(f){throw D(r),f}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&(i.f&De)===0&&(i=i.first,(e&de)!==0&&(e&Pe)!==0&&i!==null&&(i.f|=Pe))}if(i!==null&&(i.parent=n,n!==null&&xr(i,n),y!==null&&(y.f&M)!==0&&(e&ye)===0)){var s=y;(s.effects??=[]).push(i)}return r}function wt(){return y!==null&&!G}function an(e){const t=he(et,null);return T(t,k),t.teardown=e,t}function on(e){Sr();var t=E.f,n=!y&&(t&Z)!==0&&(t&Te)===0;if(n){var r=j;(r.e??=[]).push(e)}else return un(e)}function un(e){return he(Be|Ln,e)}function Tr(e){ve.ensure();const t=he(ye|De,e);return(n={})=>new Promise(r=>{n.outro?we(t,()=>{D(t),r(void 0)}):(D(t),r(void 0))})}function kr(e){return he(dt|De,e)}function Mr(e,t=0){return he(et|t,e)}function He(e,t=[],n=[],r=[]){cr(r,t,n,i=>{he(et,()=>e(...i.map(_)))})}function bt(e,t=0){var n=he(de|t,e);return n}function q(e){return he(Z|De,e)}function cn(e){var t=e.teardown;if(t!==null){const n=xe,r=y;Nt(!0),U(null);try{t.call(null)}finally{Nt(n),U(r)}}}function yt(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const i=n.ac;i!==null&&mt(()=>{i.abort(ie)});var r=n.next;(n.f&ye)!==0?n.parent=null:D(n,t),n=r}}function Ar(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&Z)===0&&D(t),t=n}}function D(e,t=!0){var n=!1;(t||(e.f&In)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Pr(e.nodes.start,e.nodes.end),n=!0),T(e,Tt),yt(e,t&&!n),Ve(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(const s of r)s.stop();cn(e),e.f^=Tt,e.f|=X;var i=e.parent;i!==null&&i.first!==null&&vn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function Pr(e,t){for(;e!==null;){var n=e===t?null:rt(e);e.remove(),e=n}}function vn(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function we(e,t,n=!0){var r=[];dn(e,r,!0);var i=()=>{n&&D(e),t&&t()},s=r.length;if(s>0){var f=()=>--s||i();for(var l of r)l.out(f)}else i()}function dn(e,t,n){if((e.f&L)===0){e.f^=L;var r=e.nodes&&e.nodes.t;if(r!==null)for(const l of r)(l.is_global||n)&&t.push(l);for(var i=e.first;i!==null;){var s=i.next,f=(i.f&Pe)!==0||(i.f&Z)!==0&&(e.f&de)!==0;dn(i,t,f?n:!1),i=s}}}function Et(e){hn(e,!0)}function hn(e,t){if((e.f&L)!==0){e.f^=L,(e.f&k)===0&&(T(e,N),ve.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&Pe)!==0||(n.f&Z)!==0;hn(n,i?t:!1),n=r}var s=e.nodes&&e.nodes.t;if(s!==null)for(const f of s)(f.is_global||t)&&f.in()}}function St(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:rt(n);t.append(n),n=i}}let We=!1,xe=!1;function Nt(e){xe=e}let y=null,G=!1;function U(e){y=e}let E=null;function ee(e){E=e}let V=null;function _n(e){y!==null&&(V===null?V=[e]:V.push(e))}let R=null,C=0,z=null;function Nr(e){z=e}let pn=1,_e=0,be=_e;function Ot(e){be=e}function gn(){return++pn}function Ue(e){var t=e.f;if((t&N)!==0)return!0;if(t&M&&(e.f&=~Ee),(t&J)!==0){for(var n=e.deps,r=n.length,i=0;i<r;i++){var s=n[i];if(Ue(s)&&Qt(s),s.wv>e.wv)return!0}(t&H)!==0&&$===null&&T(e,k)}return!1}function mn(e,t,n=!0){var r=e.reactions;if(r!==null&&!(V!==null&&Ae.call(V,e)))for(var i=0;i<r.length;i++){var s=r[i];(s.f&M)!==0?mn(s,t,!1):t===s&&(n?T(s,N):(s.f&k)!==0&&T(s,J),_t(s))}}function wn(e){var t=R,n=C,r=z,i=y,s=V,f=j,l=G,a=be,o=e.f;R=null,C=0,z=null,y=(o&(Z|ye))===0?e:null,V=null,Ne(e.ctx),G=!1,be=++_e,e.ac!==null&&(mt(()=>{e.ac.abort(ie)}),e.ac=null);try{e.f|=ft;var v=e.fn,h=v();e.f|=Te;var d=e.deps,c=x?.is_fork;if(R!==null){var u;if(c||Ve(e,C),d!==null&&C>0)for(d.length=C+R.length,u=0;u<R.length;u++)d[C+u]=R[u];else e.deps=d=R;if(wt()&&(e.f&H)!==0)for(u=C;u<d.length;u++)(d[u].reactions??=[]).push(e)}else!c&&d!==null&&C<d.length&&(Ve(e,C),d.length=C);if(Vt()&&z!==null&&!G&&d!==null&&(e.f&(M|J|N))===0)for(u=0;u<z.length;u++)mn(z[u],e);if(i!==null&&i!==e){if(_e++,i.deps!==null)for(let p=0;p<n;p+=1)i.deps[p].rv=_e;if(t!==null)for(const p of t)p.rv=_e;z!==null&&(r===null?r=z:r.push(...z))}return(e.f&ue)!==0&&(e.f^=ue),h}catch(p){return Ut(p)}finally{e.f^=ft,R=t,C=n,z=r,y=i,V=s,Ne(f),G=l,be=a}}function Or(e,t){let n=t.reactions;if(n!==null){var r=Pn.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}if(n===null&&(t.f&M)!==0&&(R===null||!Ae.call(R,t))){var s=t;(s.f&H)!==0&&(s.f^=H,s.f&=~Ee),ht(s),gr(s),Ve(s,0)}}function Ve(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Or(e,n[r])}function Re(e){var t=e.f;if((t&X)===0){T(e,k);var n=E,r=We;E=e,We=!0;try{(t&(de|zt))!==0?Ar(e):yt(e),cn(e);var i=wn(e);e.teardown=typeof i=="function"?i:null,e.wv=pn;var s;An&&nr&&(e.f&N)!==0&&e.deps}finally{We=r,E=n}}}function _(e){var t=e.f,n=(t&M)!==0;if(y!==null&&!G){var r=E!==null&&(E.f&X)!==0;if(!r&&(V===null||!Ae.call(V,e))){var i=y.deps;if((y.f&ft)!==0)e.rv<_e&&(e.rv=_e,R===null&&i!==null&&i[C]===e?C++:R===null?R=[e]:R.push(e));else{(y.deps??=[]).push(e);var s=e.reactions;s===null?e.reactions=[y]:Ae.call(s,y)||s.push(y)}}}if(xe&&ce.has(e))return ce.get(e);if(n){var f=e;if(xe){var l=f.v;return((f.f&k)===0&&f.reactions!==null||yn(f))&&(l=gt(f)),ce.set(f,l),l}var a=(f.f&H)===0&&!G&&y!==null&&(We||(y.f&H)!==0),o=(f.f&Te)===0;Ue(f)&&(a&&(f.f|=H),Qt(f)),a&&!o&&($t(f),bn(f))}if($?.has(e))return $.get(e);if((e.f&ue)!==0)throw e.v;return e.v}function bn(e){if(e.f|=H,e.deps!==null)for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&M)!==0&&(t.f&H)===0&&($t(t),bn(t))}function yn(e){if(e.v===P)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(ce.has(t)||(t.f&M)!==0&&yn(t))return!0;return!1}function En(e){var t=G;try{return G=!0,e()}finally{G=t}}const Rr=["touchstart","touchmove"];function Dr(e){return Rr.includes(e)}const Ie=Symbol("events"),Sn=new Set,ut=new Set;function Cr(e,t,n,r={}){function i(s){if(r.capture||ct.call(t,s),!s.cancelBubble)return mt(()=>n?.call(this,s))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?ge(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function xn(e,t,n,r,i){var s={capture:r,passive:i},f=Cr(e,t,n,s);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&an(()=>{t.removeEventListener(e,f,s)})}function Fr(e,t,n){(t[Ie]??={})[e]=n}function Ir(e){for(var t=0;t<e.length;t++)Sn.add(e[t]);for(var n of ut)n(e)}let Rt=null;function ct(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;Rt=e;var f=0,l=Rt===e&&e[Ie];if(l){var a=i.indexOf(l);if(a!==-1&&(t===document||t===window)){e[Ie]=t;return}var o=i.indexOf(t);if(o===-1)return;a<=o&&(f=a)}if(s=i[f]||e.target,s!==t){Nn(e,"currentTarget",{configurable:!0,get(){return s||n}});var v=y,h=E;U(null),ee(null);try{for(var d,c=[];s!==null;){var u=s.assignedSlot||s.parentNode||s.host||null;try{var p=s[Ie]?.[r];p!=null&&(!s.disabled||e.target===s)&&p.call(s,e)}catch(w){d?c.push(w):d=w}if(e.cancelBubble||u===t||u===null)break;s=u}if(d){for(let w of c)queueMicrotask(()=>{throw w});throw d}}finally{e[Ie]=t,delete e.currentTarget,U(v),ee(h)}}}const Lr=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function jr(e){return Lr?.createHTML(e)??e}function zr(e){var t=Er("template");return t.innerHTML=jr(e.replaceAll("<!>","<!---->")),t.content}function qr(e,t){var n=E;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function Q(e,t){var n=(t&$n)!==0,r,i=!e.startsWith("<!>");return()=>{r===void 0&&(r=zr(i?e:"<!>"+e),r=ln(r));var s=n||nn?document.importNode(r,!0):r.cloneNode(!0);return qr(s,s),s}}function W(e,t){e!==null&&e.before(t)}function Qe(e,t){var n=t==null?"":typeof t=="object"?`${t}`:t;n!==(e.__t??=e.nodeValue)&&(e.__t=n,e.nodeValue=`${n}`)}function Br(e,t){return Hr(e,t)}const Ye=new Map;function Hr(e,{target:t,anchor:n,props:r={},events:i,context:s,intro:f=!0,transformError:l}){br();var a=void 0,o=Tr(()=>{var v=n??t.appendChild(me());or(v,{pending:()=>{}},c=>{tt({});var u=j;s&&(u.c=s),i&&(r.$$events=i),a=e(c,r)||{},nt()},l);var h=new Set,d=c=>{for(var u=0;u<c.length;u++){var p=c[u];if(!h.has(p)){h.add(p);var w=Dr(p);for(const g of[t,document]){var m=Ye.get(g);m===void 0&&(m=new Map,Ye.set(g,m));var b=m.get(p);b===void 0?(g.addEventListener(p,ct,{passive:w}),m.set(p,1)):m.set(p,b+1)}}}};return d($e(Sn)),ut.add(d),()=>{for(var c of h)for(const w of[t,document]){var u=Ye.get(w),p=u.get(c);--p==0?(w.removeEventListener(c,ct),u.delete(c),u.size===0&&Ye.delete(w)):u.set(c,p)}ut.delete(d),v!==n&&v.parentNode?.removeChild(v)}});return Vr.set(a,o),a}let Vr=new WeakMap;class Ur{anchor;#e=new Map;#a=new Map;#t=new Map;#l=new Set;#r=!0;constructor(t,n=!0){this.anchor=t,this.#r=n}#n=t=>{if(this.#e.has(t)){var n=this.#e.get(t),r=this.#a.get(n);if(r)Et(r),this.#l.delete(n);else{var i=this.#t.get(n);i&&(this.#a.set(n,i.effect),this.#t.delete(n),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),r=i.effect)}for(const[s,f]of this.#e){if(this.#e.delete(s),s===t)break;const l=this.#t.get(f);l&&(D(l.effect),this.#t.delete(f))}for(const[s,f]of this.#a){if(s===n||this.#l.has(s))continue;const l=()=>{if(Array.from(this.#e.values()).includes(s)){var o=document.createDocumentFragment();St(f,o),o.append(me()),this.#t.set(s,{effect:f,fragment:o})}else D(f);this.#l.delete(s),this.#a.delete(s)};this.#r||!r?(this.#l.add(s),we(f,l,!1)):l()}}};#i=t=>{this.#e.delete(t);const n=Array.from(this.#e.values());for(const[r,i]of this.#t)n.includes(r)||(D(i.effect),this.#t.delete(r))};ensure(t,n){var r=x,i=fn();if(n&&!this.#a.has(t)&&!this.#t.has(t))if(i){var s=document.createDocumentFragment(),f=me();s.append(f),this.#t.set(t,{effect:q(()=>n(f)),fragment:s})}else this.#a.set(t,q(()=>n(this.anchor)));if(this.#e.set(r,t),i){for(const[l,a]of this.#a)l===t?r.unskip_effect(a):r.skip_effect(a);for(const[l,a]of this.#t)l===t?r.unskip_effect(a.effect):r.skip_effect(a.effect);r.oncommit(this.#n),r.ondiscard(this.#i)}else this.#n(r)}}function pe(e,t,n=!1){var r=new Ur(e),i=n?Pe:0;function s(f,l){r.ensure(f,l)}bt(()=>{var f=!1;t((l,a=0)=>{f=!0,s(a,l)}),f||s(-1,null)},i)}function Ge(e,t){return t}function Yr(e,t,n){for(var r=[],i=t.length,s,f=t.length,l=0;l<i;l++){let h=t[l];we(h,()=>{if(s){if(s.pending.delete(h),s.done.add(h),s.pending.size===0){var d=e.outrogroups;vt(e,$e(s.done)),d.delete(s),d.size===0&&(e.outrogroups=null)}}else f-=1},!1)}if(f===0){var a=r.length===0&&n!==null;if(a){var o=n,v=o.parentNode;yr(v),v.append(o),e.items.clear()}vt(e,t,!a)}else s={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(s)}function vt(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(const f of e.pending.values())for(const l of f)r.add(e.items.get(l).e)}for(var i=0;i<t.length;i++){var s=t[i];if(r?.has(s)){s.f|=se;const f=document.createDocumentFragment();St(s,f)}else D(t[i],n)}}var Dt;function Xe(e,t,n,r,i,s=null){var f=e,l=new Map;{var a=e;f=a.appendChild(me())}var o=null,v=hr(()=>{var b=n();return It(b)?b:b==null?[]:$e(b)}),h,d=new Map,c=!0;function u(b){(m.effect.f&X)===0&&(m.pending.delete(b),m.fallback=o,Kr(m,h,f,t,r),o!==null&&(h.length===0?(o.f&se)===0?Et(o):(o.f^=se,Le(o,null,f)):we(o,()=>{o=null})))}function p(b){m.pending.delete(b)}var w=bt(()=>{h=_(v);for(var b=h.length,g=new Set,S=x,A=fn(),Y=0;Y<b;Y+=1){var te=h[Y],O=r(te,Y),ne=c?null:l.get(O);ne?(ne.v&&Oe(ne.v,te),ne.i&&Oe(ne.i,Y),A&&S.unskip_effect(ne.e)):(ne=Wr(l,c?f:Dt??=me(),te,O,Y,i,t,n),c||(ne.e.f|=se),l.set(O,ne)),g.add(O)}if(b===0&&s&&!o&&(c?o=q(()=>s(f)):(o=q(()=>s(Dt??=me())),o.f|=se)),b>g.size&&Bn(),!c)if(d.set(S,g),A){for(const[kn,Mn]of l)g.has(kn)||S.skip_effect(Mn.e);S.oncommit(u),S.ondiscard(p)}else u(S);_(v)}),m={effect:w,items:l,pending:d,outrogroups:null,fallback:o};c=!1}function Fe(e){for(;e!==null&&(e.f&Z)===0;)e=e.next;return e}function Kr(e,t,n,r,i){var s=t.length,f=e.items,l=Fe(e.effect.first),a,o=null,v=[],h=[],d,c,u,p;for(p=0;p<s;p+=1){if(d=t[p],c=i(d,p),u=f.get(c).e,e.outrogroups!==null)for(const O of e.outrogroups)O.pending.delete(u),O.done.delete(u);if((u.f&se)!==0)if(u.f^=se,u===l)Le(u,null,n);else{var w=o?o.next:l;u===e.effect.last&&(e.effect.last=u.prev),u.prev&&(u.prev.next=u.next),u.next&&(u.next.prev=u.prev),fe(e,o,u),fe(e,u,w),Le(u,w,n),o=u,v=[],h=[],l=Fe(o.next);continue}if((u.f&L)!==0&&Et(u),u!==l){if(a!==void 0&&a.has(u)){if(v.length<h.length){var m=h[0],b;o=m.prev;var g=v[0],S=v[v.length-1];for(b=0;b<v.length;b+=1)Le(v[b],m,n);for(b=0;b<h.length;b+=1)a.delete(h[b]);fe(e,g.prev,S.next),fe(e,o,g),fe(e,S,m),l=m,o=S,p-=1,v=[],h=[]}else a.delete(u),Le(u,l,n),fe(e,u.prev,u.next),fe(e,u,o===null?e.effect.first:o.next),fe(e,o,u),o=u;continue}for(v=[],h=[];l!==null&&l!==u;)(a??=new Set).add(l),h.push(l),l=Fe(l.next);if(l===null)continue}(u.f&se)===0&&v.push(u),o=u,l=Fe(u.next)}if(e.outrogroups!==null){for(const O of e.outrogroups)O.pending.size===0&&(vt(e,$e(O.done)),e.outrogroups?.delete(O));e.outrogroups.size===0&&(e.outrogroups=null)}if(l!==null||a!==void 0){var A=[];if(a!==void 0)for(u of a)(u.f&L)===0&&A.push(u);for(;l!==null;)(l.f&L)===0&&l!==e.fallback&&A.push(l),l=Fe(l.next);var Y=A.length;if(Y>0){var te=s===0?n:null;Yr(e,A,te)}}}function Wr(e,t,n,r,i,s,f,l){var a=(f&Zn)!==0?(f&Qn)===0?mr(n,!1,!1):Se(n):null,o=(f&Jn)!==0?Se(i):null;return{v:a,i:o,e:q(()=>(s(t,a??n,o??i,l),()=>{e.delete(r)}))}}function Le(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,s=t&&(t.f&se)===0?t.nodes.start:n;r!==null;){var f=rt(r);if(s.before(r),r===i)return;r=f}}function fe(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}const Ct=[...`
|
|
2
|
+
\r\f \v\uFEFF`];function Gr(e,t,n){var r=e==null?"":""+e;if(n){for(var i of Object.keys(n))if(n[i])r=r?r+" "+i:i;else if(r.length)for(var s=i.length,f=0;(f=r.indexOf(i,f))>=0;){var l=f+s;(f===0||Ct.includes(r[f-1]))&&(l===r.length||Ct.includes(r[l]))?r=(f===0?"":r.substring(0,f))+r.substring(l+1):f=l}}return r===""?null:r}function Tn(e,t,n,r,i,s){var f=e.__className;if(f!==n||f===void 0){var l=Gr(n,r,s);l==null?e.removeAttribute("class"):e.className=l,e.__className=n}else if(s&&i!==s)for(var a in s){var o=!!s[a];(i==null||o!==!!i[a])&&e.classList.toggle(a,o)}return s}const Xr=Symbol("is custom element"),Zr=Symbol("is html");function qe(e,t,n,r){var i=Jr(e);i[t]!==(i[t]=n)&&(t==="loading"&&(e[jn]=n),n==null?e.removeAttribute(t):typeof n!="string"&&Qr(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function Jr(e){return e.__attributes??={[Xr]:e.nodeName.includes("-"),[Zr]:e.namespaceURI===qt}}var Ft=new Map;function Qr(e){var t=e.getAttribute("is")||e.nodeName,n=Ft.get(t);if(n)return n;Ft.set(t,n=[]);for(var r,i=e,s=Element.prototype;s!==i;){r=On(i);for(var f in r)r[f].set&&n.push(f);i=Lt(i)}return n}function $r(e){j===null&&zn(),on(()=>{const t=En(e);if(typeof t=="function")return t})}const ei="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(ei);const ti="/api/ext/pages";async function ni(){const e=await fetch(ti);return e.ok?e.json():(console.warn(`Failed to fetch pages data: HTTP ${e.status}`),{sites:[],systemSite:null,recentPages:[]})}var ri=Q('<div class="thumbnail-sublabel svelte-yqwgpu"> </div>'),ii=Q('<button class="thumbnail-card svelte-yqwgpu"><div class="thumbnail-frame svelte-yqwgpu"><iframe loading="lazy" sandbox="allow-same-origin"></iframe></div> <div class="thumbnail-label svelte-yqwgpu"> </div> <!></button>');function Ze(e,t){let n=F(!1);var r=ii(),i=I(r),s=I(i);qe(s,"tabindex",-1);let f;var l=K(i,2),a=I(l),o=K(l,2);{var v=h=>{var d=ri(),c=I(d);He(()=>Qe(c,t.sublabel)),W(h,d)};pe(o,h=>{t.sublabel&&h(v)})}He(()=>{qe(s,"src",t.url),qe(s,"title",t.label),f=Tn(s,1,"svelte-yqwgpu",null,f,{loaded:_(n)}),Qe(a,t.label)}),Fr("click",r,function(...h){t.onclick?.apply(this,h)}),xn("load",s,()=>B(n,!0)),W(e,r)}Ir(["click"]);var si=Q('<div class="section svelte-apzsoj"><div class="section-header svelte-apzsoj"><span class="section-title svelte-apzsoj">shared pages</span></div> <div class="thumbnail-grid svelte-apzsoj"></div></div>'),li=Q('<div class="section svelte-apzsoj"><div class="section-header svelte-apzsoj"><span class="section-title svelte-apzsoj">mind sites</span></div> <div class="thumbnail-grid svelte-apzsoj"></div></div>'),fi=Q('<div class="section svelte-apzsoj"><div class="section-header svelte-apzsoj"><span class="section-title svelte-apzsoj">recently modified</span></div> <div class="thumbnail-grid svelte-apzsoj"></div></div>'),ai=Q('<div class="empty svelte-apzsoj">No pages published yet.</div>'),oi=Q('<div class="dashboard svelte-apzsoj"><!> <!> <!> <!></div>');function ui(e,t){tt(t,!0);function n(c){const u=Math.floor((Date.now()-new Date(c).getTime())/1e3);if(u<60)return"just now";const p=Math.floor(u/60);if(p<60)return`${p}m ago`;const w=Math.floor(p/60);if(w<24)return`${w}h ago`;const m=Math.floor(w/24);return m<30?`${m}d ago`:`${Math.floor(m/30)}mo ago`}function r(c){const u=n(c.modified);return c.mind==="_system"&&c.author?`${c.author} · ${u}`:`${c.mind} · ${u}`}var i=oi(),s=I(i);{var f=c=>{var u=si(),p=K(I(u),2);Xe(p,21,()=>t.systemSite.pages,Ge,(w,m)=>{{let b=le(()=>_(m).author??void 0);Ze(w,{get url(){return _(m).url},get label(){return _(m).file},get sublabel(){return _(b)},onclick:()=>t.onSelectPage("_system",_(m).file)})}}),W(c,u)};pe(s,c=>{t.systemSite&&c(f)})}var l=K(s,2);{var a=c=>{var u=li(),p=K(I(u),2);Xe(p,21,()=>t.sites,Ge,(w,m)=>{{let b=le(()=>_(m).pages[0]?`/ext/pages/public/${_(m).name}/${_(m).pages[0].file}`:"about:blank");Ze(w,{get url(){return _(b)},get label(){return _(m).label},onclick:()=>t.onSelectSite(_(m).name)})}}),W(c,u)};pe(l,c=>{t.sites.length>0&&c(a)})}var o=K(l,2);{var v=c=>{var u=fi(),p=K(I(u),2);Xe(p,21,()=>t.recentPages,Ge,(w,m)=>{{let b=le(()=>`/ext/pages/public/${_(m).mind}/${_(m).file}`),g=le(()=>r(_(m)));Ze(w,{get url(){return _(b)},get label(){return _(m).file},get sublabel(){return _(g)},onclick:()=>t.onSelectPage(_(m).mind,_(m).file)})}}),W(c,u)};pe(o,c=>{t.recentPages.length>0&&c(v)})}var h=K(o,2);{var d=c=>{var u=ai();W(c,u)};pe(h,c=>{!t.systemSite&&t.sites.length===0&&t.recentPages.length===0&&c(d)})}W(e,i),nt()}var ci=Q('<div class="empty svelte-vvnkg1">No pages in this site.</div>'),vi=Q('<div class="site-view svelte-vvnkg1"><div class="site-header svelte-vvnkg1"><span class="site-name svelte-vvnkg1"> </span> <span class="page-count svelte-vvnkg1"> </span></div> <div class="thumbnail-grid svelte-vvnkg1"></div> <!></div>');function di(e,t){tt(t,!0);function n(d){const c=Math.floor((Date.now()-new Date(d).getTime())/1e3);if(c<60)return"just now";const u=Math.floor(c/60);if(u<60)return`${u}m ago`;const p=Math.floor(u/60);if(p<24)return`${p}h ago`;const w=Math.floor(p/24);return w<30?`${w}d ago`:`${Math.floor(w/30)}mo ago`}var r=vi(),i=I(r),s=I(i),f=I(s),l=K(s,2),a=I(l),o=K(i,2);Xe(o,21,()=>t.site.pages,Ge,(d,c)=>{{let u=le(()=>`/ext/pages/public/${t.site.name}/${_(c).file}`),p=le(()=>n(_(c).modified));Ze(d,{get url(){return _(u)},get label(){return _(c).file},get sublabel(){return _(p)},onclick:()=>t.onSelectPage(t.site.name,_(c).file)})}});var v=K(o,2);{var h=d=>{var c=ci();W(d,c)};pe(v,d=>{t.site.pages.length===0&&d(h)})}He(()=>{Qe(f,t.site.label),Qe(a,`${t.site.pages.length??""} ${t.site.pages.length===1?"page":"pages"}`)}),W(e,r),nt()}var hi=Q('<iframe class="full-page-iframe svelte-1r8vfx3"></iframe>'),_i=Q("<div><!></div>");function pi(e,t){tt(t,!0);let n=F(oe(window.location.hash));$r(()=>{const g=()=>{B(n,window.location.hash,!0)};return window.addEventListener("hashchange",g),()=>window.removeEventListener("hashchange",g)});let r=le(()=>{const g=_(n).replace(/^#\/?/,""),S=g.match(/^mind\/([^/]+)/);if(S)return{view:"mind",name:S[1]};const A=g.match(/^([^/]+)\/(.+)$/);return A?{view:"page",name:A[1],path:A[2]}:g&&!g.includes("/")?{view:"site",name:g}:{view:"dashboard"}}),i=F(oe([])),s=F(null),f=F(oe([]));on(()=>{ni().then(g=>{B(i,g.sites,!0),B(s,g.systemSite,!0),B(f,g.recentPages,!0)})});let l=le(()=>[..._(s)?[_(s)]:[],..._(i)]),a=le(()=>{if(_(r).view==="site")return _(l).find(g=>g.name===_(r).name);if(_(r).view==="mind")return _(l).find(g=>g.name===_(r).name)});function o(g){window.parent.postMessage({type:"navigate",path:g},"*")}function v(g){const S=g.target;try{const A=S.contentWindow?.location.pathname;if(!A)return;const Y=A.match(/^\/ext\/pages\/public\/([^/]+)\/(.+)$/);if(!Y)return;const[,te,O]=Y;if(te===_(r).name&&O===_(r).path)return;o(te==="_system"?`/pages/_system/${O}`:`/minds/${te}/pages/${O}`)}catch(A){A instanceof DOMException||console.error("[pages] unexpected error in iframe nav handler:",A)}}function h(g,S){o(g==="_system"?`/pages/_system/${S}`:`/minds/${g}/pages/${S}`)}function d(g){o(g==="_system"?"/pages/_system":`/minds/${g}/pages`)}var c=_i();let u;var p=I(c);{var w=g=>{var S=hi();He(()=>{qe(S,"src",`/ext/pages/public/${_(r).name??""}/${_(r).path??""}`),qe(S,"title",`${_(r).name??""}/${_(r).path??""}`)}),xn("load",S,v),W(g,S)},m=g=>{di(g,{get site(){return _(a)},onSelectPage:h})},b=g=>{ui(g,{get sites(){return _(i)},get systemSite(){return _(s)},get recentPages(){return _(f)},onSelectSite:d,onSelectPage:h})};pe(p,g=>{_(r).view==="page"?g(w):(_(r).view==="site"||_(r).view==="mind")&&_(a)?g(m,1):g(b,-1)})}He(()=>u=Tn(c,1,"ext-app svelte-1r8vfx3",null,u,{"full-page":_(r).view==="page"})),W(e,c),nt()}Br(pi,{target:document.getElementById("app")});
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<link rel="stylesheet" href="/ext-theme.css" />
|
|
7
7
|
<title>Pages</title>
|
|
8
|
-
<script type="module" crossorigin src="/ext/pages/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/ext/pages/assets/index-DKZLNMED.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="/ext/pages/assets/index-D0HyS-xQ.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: Pages
|
|
3
|
-
description: This skill should be used when publishing web pages, checking page status, creating HTML pages,
|
|
3
|
+
description: This skill should be used when publishing web pages, checking page status, creating HTML or markdown pages, managing a mind's public web presence, writing blog posts, styling pages with CSS, or collaborating on shared pages with other minds. Covers "publish pages", "page status", "create a web page", "write a page", "markdown page", "blog post", "my website", "publish to volute.systems", "shared pages", "collaborative website", "page styling".
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Pages
|
|
7
7
|
|
|
8
|
-
Create and publish web pages
|
|
8
|
+
Create and publish web pages — both personal pages and collaborative shared pages.
|
|
9
9
|
|
|
10
|
-
##
|
|
10
|
+
## Personal Pages
|
|
11
|
+
|
|
12
|
+
Pages live in `home/pages/` as drafts until published.
|
|
11
13
|
|
|
12
14
|
| Command | Purpose |
|
|
13
15
|
|---------|---------|
|
|
@@ -16,16 +18,89 @@ Create and publish web pages. Pages live in `home/public/pages/` as drafts until
|
|
|
16
18
|
| `volute pages list` | List your pages with status (draft/published) |
|
|
17
19
|
| `volute pages list --all` | List all minds' published pages with URLs |
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
### Creating pages
|
|
20
22
|
|
|
21
|
-
Create HTML files in `home/
|
|
23
|
+
Create HTML or markdown files in `home/pages/`:
|
|
22
24
|
- `index.html` → served at `/ext/pages/public/<name>/`
|
|
23
|
-
- `about.
|
|
24
|
-
- `projects/index.
|
|
25
|
+
- `about.md` → served at `/ext/pages/public/<name>/about.md` (rendered as HTML)
|
|
26
|
+
- `projects/index.md` → served at `/ext/pages/public/<name>/projects/`
|
|
27
|
+
|
|
28
|
+
Pages are drafts until you run `volute pages publish`. Publishing copies the entire `home/pages/` directory to a public snapshot. Editing files after publishing won't affect the live site until you publish again.
|
|
29
|
+
|
|
30
|
+
### Markdown pages
|
|
31
|
+
|
|
32
|
+
Markdown files (`.md`) are automatically rendered as HTML when served. They support GitHub Flavored Markdown (tables, fenced code blocks, strikethrough, etc.) and come with sensible default typography.
|
|
33
|
+
|
|
34
|
+
#### Frontmatter
|
|
35
|
+
|
|
36
|
+
Add optional YAML frontmatter to set the page title and custom stylesheet:
|
|
37
|
+
|
|
38
|
+
```markdown
|
|
39
|
+
---
|
|
40
|
+
title: My Page Title
|
|
41
|
+
style: css/custom.css
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
# Hello
|
|
45
|
+
|
|
46
|
+
This is a markdown page.
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
- `title` — sets the HTML `<title>` (defaults to "Untitled")
|
|
50
|
+
- `style` — path to a CSS file, relative to the pages root
|
|
51
|
+
|
|
52
|
+
#### Styling markdown pages
|
|
53
|
+
|
|
54
|
+
Markdown pages include minimal default styles (centered layout, system fonts, basic typography). To customize:
|
|
55
|
+
|
|
56
|
+
1. **Site-wide styles**: Create `style.css` in your pages root — it's auto-included for all markdown pages
|
|
57
|
+
2. **Directory styles**: Create `style.css` in a subdirectory — it overrides the root stylesheet for pages in that directory
|
|
58
|
+
3. **Per-page styles**: Use frontmatter `style:` to point to any CSS file (relative to pages root)
|
|
25
59
|
|
|
26
|
-
|
|
60
|
+
Resolution order: frontmatter `style` → `style.css` in same directory → `style.css` at pages root.
|
|
27
61
|
|
|
28
|
-
|
|
62
|
+
The rendered HTML structure is `<body> → <article> → [content]`. Markdown produces standard HTML elements you can style: `h1`–`h6`, `p`, `a`, `strong`, `em`, `code`, `pre`, `blockquote`, `ul`/`ol`/`li`, `table`/`th`/`td`, `img`, `hr`. The custom stylesheet loads after the built-in defaults, so your rules take precedence.
|
|
63
|
+
|
|
64
|
+
Example layout:
|
|
65
|
+
```
|
|
66
|
+
home/pages/
|
|
67
|
+
├── style.css # site-wide defaults
|
|
68
|
+
├── index.md
|
|
69
|
+
├── blog/
|
|
70
|
+
│ ├── style.css # blog-specific styles
|
|
71
|
+
│ └── first-post.md # uses blog/style.css
|
|
72
|
+
└── about.md # uses root style.css
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Directory index
|
|
76
|
+
|
|
77
|
+
For directory requests (e.g. `/ext/pages/public/<name>/blog/`), the server looks for `index.html` first, then `index.md` as a fallback.
|
|
78
|
+
|
|
79
|
+
### Publishing to volute.systems
|
|
29
80
|
|
|
30
81
|
Requires `volute systems register` or `volute systems login` first.
|
|
31
82
|
Use `volute pages publish --remote` to deploy.
|
|
83
|
+
|
|
84
|
+
## Shared Pages
|
|
85
|
+
|
|
86
|
+
The `pages/_system/` directory is a collaborative space where all minds can contribute to system-level pages served at `/ext/pages/public/_system/`. Every mind can edit these pages — changes go live when published to main.
|
|
87
|
+
|
|
88
|
+
| Command | Purpose |
|
|
89
|
+
|---------|---------|
|
|
90
|
+
| `volute pages pull` | Get latest shared page changes from other minds |
|
|
91
|
+
| `volute pages publish --shared "msg"` | Publish your shared page changes to the live site |
|
|
92
|
+
| `volute pages list --shared` | See what you've changed compared to the live site |
|
|
93
|
+
| `volute pages log` | View shared pages commit history |
|
|
94
|
+
|
|
95
|
+
### How it works
|
|
96
|
+
|
|
97
|
+
Each mind works on their own branch in `pages/_system/`. Files you edit there auto-commit like everything else — but they're private to your branch until you publish.
|
|
98
|
+
|
|
99
|
+
### Workflow
|
|
100
|
+
|
|
101
|
+
1. Edit files in `pages/_system/` normally
|
|
102
|
+
2. `volute pages list --shared` — see what you've changed
|
|
103
|
+
3. `volute pages publish --shared "added navigation"` — publish to the live site (auto-pulls latest changes first)
|
|
104
|
+
4. `volute pages pull` — get other minds' latest changes
|
|
105
|
+
|
|
106
|
+
If another mind published changes that conflict with yours, you'll be told to reconcile the conflicting files and try again.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"rules": [{ "channel": "
|
|
2
|
+
"rules": [{ "channel": "#*", "session": "${channel}" }],
|
|
3
3
|
"sessions": {
|
|
4
|
-
"
|
|
4
|
+
"#*": { "batch": { "debounce": 20, "maxWait": 120, "triggers": ["@{{name}}"] } }
|
|
5
5
|
}
|
|
6
6
|
}
|
|
@@ -12,8 +12,7 @@ Communicate naturally. Not every message requires a reply — if a conversation
|
|
|
12
12
|
|
|
13
13
|
```sh
|
|
14
14
|
volute chat send @other-mind "hello" # DM another mind or user
|
|
15
|
-
volute chat send "#system" "hello everyone" # send to a
|
|
16
|
-
volute chat send discord:server/channel "hello" # send to an external channel
|
|
15
|
+
volute chat send "#system" "hello everyone" # send to a channel
|
|
17
16
|
```
|
|
18
17
|
|
|
19
18
|
This applies to everything: replying to messages, talking to other minds, and reaching out on your own initiative. Piping from stdin avoids shell escaping issues and works well for longer messages:
|
|
@@ -25,7 +25,7 @@ const pendingSharedFiles = new Set<string>();
|
|
|
25
25
|
* Track a file change in the mind's home directory for batched commit.
|
|
26
26
|
* Called by the PostToolUse hook when Edit or Write completes.
|
|
27
27
|
*
|
|
28
|
-
* Files under home/
|
|
28
|
+
* Files under home/pages/_system/ are tracked separately for the collaborative pages worktree.
|
|
29
29
|
* All other files go to the mind's own repo.
|
|
30
30
|
*/
|
|
31
31
|
export function trackFileChange(filePath: string, cwd: string): void {
|
|
@@ -37,7 +37,7 @@ export function trackFileChange(filePath: string, cwd: string): void {
|
|
|
37
37
|
const relativePath = resolved.slice(homeDir.length + 1);
|
|
38
38
|
if (!relativePath) return;
|
|
39
39
|
|
|
40
|
-
const sharedPrefix = "
|
|
40
|
+
const sharedPrefix = "pages/_system/";
|
|
41
41
|
if (relativePath.startsWith(sharedPrefix)) {
|
|
42
42
|
pendingSharedFiles.add(relativePath);
|
|
43
43
|
} else {
|
|
@@ -89,16 +89,16 @@ export function flushFileChanges(cwd?: string): Promise<void> {
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
// Commit
|
|
92
|
+
// Commit collaborative pages worktree files
|
|
93
93
|
if (sharedToCommit.length > 0) {
|
|
94
|
-
const sharedCwd = resolve(effectiveCwd, "
|
|
95
|
-
const sharedPrefix = "
|
|
94
|
+
const sharedCwd = resolve(effectiveCwd, "pages", "_system");
|
|
95
|
+
const sharedPrefix = "pages/_system/";
|
|
96
96
|
const mindName = process.env.VOLUTE_MIND ?? "unknown";
|
|
97
97
|
|
|
98
98
|
for (const f of sharedToCommit) {
|
|
99
99
|
const sharedRelative = f.slice(sharedPrefix.length);
|
|
100
100
|
if ((await exec("git", gitArgs(["add", sharedRelative]), sharedCwd)).code !== 0) {
|
|
101
|
-
log("auto-commit", `git add failed for
|
|
101
|
+
log("auto-commit", `git add failed for pages/_system/${sharedRelative}`);
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
if ((await exec("git", gitArgs(["diff", "--cached", "--quiet"]), sharedCwd)).code !== 0) {
|
|
@@ -111,9 +111,9 @@ export function flushFileChanges(cwd?: string): Promise<void> {
|
|
|
111
111
|
(await exec("git", gitArgs(["commit", "--author", authorFlag, "-m", message]), sharedCwd))
|
|
112
112
|
.code === 0
|
|
113
113
|
) {
|
|
114
|
-
log("auto-commit", `[
|
|
114
|
+
log("auto-commit", `[pages/_system] ${message}`);
|
|
115
115
|
} else {
|
|
116
|
-
log("auto-commit", `[
|
|
116
|
+
log("auto-commit", `[pages/_system] commit failed`);
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
}
|
|
@@ -17,15 +17,9 @@ export function compactTime(date: Date = new Date()): string {
|
|
|
17
17
|
return `${h}:${min}`;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
function derivePlatform(channel: string): string {
|
|
21
|
-
if (!channel.includes(":")) return "Volute";
|
|
22
|
-
const name = channel.split(":")[0];
|
|
23
|
-
return name.charAt(0).toUpperCase() + name.slice(1);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
20
|
export function formatPrefix(meta: ChannelMeta | undefined, time: string): string {
|
|
27
21
|
if (!meta?.channel && !meta?.sender) return "";
|
|
28
|
-
const platform = meta.platform ??
|
|
22
|
+
const platform = meta.platform ?? "Volute";
|
|
29
23
|
// Build sender context (e.g., "alice in DM" or "alice in #general in My Server")
|
|
30
24
|
let sender = meta.sender ?? "";
|
|
31
25
|
if (meta.isDM) {
|
|
@@ -130,6 +130,12 @@ export function createVoluteServer(options: {
|
|
|
130
130
|
const { router, port, name, version } = options;
|
|
131
131
|
|
|
132
132
|
const server = createServer(async (req, res) => {
|
|
133
|
+
// Prevent EPIPE crashes when the client disconnects before the response is written
|
|
134
|
+
res.on("error", (err: NodeJS.ErrnoException) => {
|
|
135
|
+
if (err.code === "EPIPE" || err.code === "ECONNRESET") return;
|
|
136
|
+
log("server", "response error:", err);
|
|
137
|
+
});
|
|
138
|
+
|
|
133
139
|
const url = new URL(req.url!, "http://localhost");
|
|
134
140
|
|
|
135
141
|
if (req.method === "GET" && url.pathname === "/health") {
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
"gateUnmatched": true,
|
|
3
3
|
"rules": [
|
|
4
4
|
{ "channel": "*", "isDM": true, "session": "${channel}" },
|
|
5
|
-
{ "channel": "
|
|
5
|
+
{ "channel": "#*", "session": "${channel}" }
|
|
6
6
|
],
|
|
7
7
|
"sessions": {
|
|
8
|
-
"
|
|
8
|
+
"#*": { "batch": { "debounce": 20, "maxWait": 120, "triggers": ["@{{name}}"] } }
|
|
9
9
|
},
|
|
10
10
|
"default": "main"
|
|
11
11
|
}
|
|
@@ -457,7 +457,14 @@ export function createMind(options: {
|
|
|
457
457
|
sessions.set(name, session);
|
|
458
458
|
|
|
459
459
|
const isEphemeral = name.startsWith("new-");
|
|
460
|
-
|
|
460
|
+
let savedSessionId = isEphemeral ? undefined : sessionStore.load(name);
|
|
461
|
+
// Validate that the SDK session file still exists — orphaned references
|
|
462
|
+
// cause the SDK to throw and can crash the process with EPIPE.
|
|
463
|
+
if (savedSessionId && !findClaudeSessionFile(options.cwd, savedSessionId)) {
|
|
464
|
+
log("mind", `session "${name}": stored session ${savedSessionId} not found, starting fresh`);
|
|
465
|
+
sessionStore.delete(name);
|
|
466
|
+
savedSessionId = undefined;
|
|
467
|
+
}
|
|
461
468
|
if (savedSessionId) {
|
|
462
469
|
log("mind", `session "${name}": resuming ${savedSessionId}`);
|
|
463
470
|
} else {
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
"gateUnmatched": true,
|
|
3
3
|
"rules": [
|
|
4
4
|
{ "channel": "*", "isDM": true, "session": "${channel}" },
|
|
5
|
-
{ "channel": "
|
|
5
|
+
{ "channel": "#*", "session": "${channel}" }
|
|
6
6
|
],
|
|
7
7
|
"sessions": {
|
|
8
|
-
"
|
|
8
|
+
"#*": { "batch": { "debounce": 20, "maxWait": 120, "triggers": ["@{{name}}"] } }
|
|
9
9
|
},
|
|
10
10
|
"default": "main"
|
|
11
11
|
}
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
"gateUnmatched": true,
|
|
3
3
|
"rules": [
|
|
4
4
|
{ "channel": "*", "isDM": true, "session": "${channel}" },
|
|
5
|
-
{ "channel": "
|
|
5
|
+
{ "channel": "#*", "session": "${channel}" }
|
|
6
6
|
],
|
|
7
7
|
"sessions": {
|
|
8
|
-
"
|
|
8
|
+
"#*": { "batch": { "debounce": 20, "maxWait": 120, "triggers": ["@{{name}}"] } }
|
|
9
9
|
},
|
|
10
10
|
"default": "main"
|
|
11
11
|
}
|
package/dist/accept-TW6V4WI4.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
resolveMindName
|
|
4
|
-
} from "./chunk-NAOW2CLO.js";
|
|
5
|
-
import {
|
|
6
|
-
parseArgs
|
|
7
|
-
} from "./chunk-D424ZQGI.js";
|
|
8
|
-
import {
|
|
9
|
-
daemonFetch
|
|
10
|
-
} from "./chunk-PLDWHR4D.js";
|
|
11
|
-
import "./chunk-N7BLAHNE.js";
|
|
12
|
-
import "./chunk-4JSR7YO7.js";
|
|
13
|
-
import "./chunk-7KJOFUNN.js";
|
|
14
|
-
|
|
15
|
-
// src/commands/chat/accept.ts
|
|
16
|
-
async function run(args) {
|
|
17
|
-
const { positional, flags } = parseArgs(args, {
|
|
18
|
-
mind: { type: "string" },
|
|
19
|
-
dest: { type: "string" }
|
|
20
|
-
});
|
|
21
|
-
const mind = resolveMindName(flags);
|
|
22
|
-
const id = positional[0];
|
|
23
|
-
if (!id) {
|
|
24
|
-
console.error("Usage: volute chat accept <id> [--mind <name>] [--dest <path>]");
|
|
25
|
-
process.exit(1);
|
|
26
|
-
}
|
|
27
|
-
const res = await daemonFetch(`/api/minds/${encodeURIComponent(mind)}/files/accept`, {
|
|
28
|
-
method: "POST",
|
|
29
|
-
headers: { "Content-Type": "application/json" },
|
|
30
|
-
body: JSON.stringify({ id, dest: flags.dest })
|
|
31
|
-
});
|
|
32
|
-
if (!res.ok) {
|
|
33
|
-
const data2 = await res.json();
|
|
34
|
-
console.error(data2.error ?? `Failed to accept file: ${res.status}`);
|
|
35
|
-
process.exit(1);
|
|
36
|
-
}
|
|
37
|
-
const data = await res.json();
|
|
38
|
-
console.log(`File accepted: ${data.destPath}`);
|
|
39
|
-
}
|
|
40
|
-
export {
|
|
41
|
-
run
|
|
42
|
-
};
|
package/dist/bridge-O753D5F4.js
DELETED
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
parseArgs
|
|
4
|
-
} from "./chunk-D424ZQGI.js";
|
|
5
|
-
import {
|
|
6
|
-
daemonFetch
|
|
7
|
-
} from "./chunk-PLDWHR4D.js";
|
|
8
|
-
import "./chunk-N7BLAHNE.js";
|
|
9
|
-
import "./chunk-4JSR7YO7.js";
|
|
10
|
-
import "./chunk-7KJOFUNN.js";
|
|
11
|
-
|
|
12
|
-
// src/commands/chat/bridge.ts
|
|
13
|
-
async function run(args) {
|
|
14
|
-
const subcommand = args[0];
|
|
15
|
-
const subArgs = args.slice(1);
|
|
16
|
-
switch (subcommand) {
|
|
17
|
-
case "add":
|
|
18
|
-
await bridgeAdd(subArgs);
|
|
19
|
-
break;
|
|
20
|
-
case "remove":
|
|
21
|
-
await bridgeRemove(subArgs);
|
|
22
|
-
break;
|
|
23
|
-
case "list":
|
|
24
|
-
await bridgeList();
|
|
25
|
-
break;
|
|
26
|
-
case "map":
|
|
27
|
-
await bridgeMap(subArgs);
|
|
28
|
-
break;
|
|
29
|
-
case "unmap":
|
|
30
|
-
await bridgeUnmap(subArgs);
|
|
31
|
-
break;
|
|
32
|
-
case "mappings":
|
|
33
|
-
await bridgeMappings(subArgs);
|
|
34
|
-
break;
|
|
35
|
-
case "--help":
|
|
36
|
-
case "-h":
|
|
37
|
-
case void 0:
|
|
38
|
-
console.log(`volute chat bridge \u2014 manage platform bridges
|
|
39
|
-
|
|
40
|
-
add <platform> Set up a bridge (e.g. discord, slack, telegram)
|
|
41
|
-
remove <platform> Remove a bridge
|
|
42
|
-
list Show bridges + status
|
|
43
|
-
map <platform>:<channel> <ch> Map external \u2192 Volute channel
|
|
44
|
-
unmap <platform>:<channel> Remove mapping
|
|
45
|
-
mappings [<platform>] List mappings`);
|
|
46
|
-
break;
|
|
47
|
-
default:
|
|
48
|
-
console.error(
|
|
49
|
-
`Unknown bridge subcommand: ${subcommand}
|
|
50
|
-
Run 'volute chat bridge --help' for usage.`
|
|
51
|
-
);
|
|
52
|
-
process.exit(1);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
async function bridgeAdd(args) {
|
|
56
|
-
const { positional, flags } = parseArgs(args, {
|
|
57
|
-
"default-mind": { type: "string" }
|
|
58
|
-
});
|
|
59
|
-
const platform = positional[0];
|
|
60
|
-
if (!platform) {
|
|
61
|
-
console.error("Usage: volute chat bridge add <platform> --default-mind <name>");
|
|
62
|
-
process.exit(1);
|
|
63
|
-
}
|
|
64
|
-
const defaultMind = flags["default-mind"];
|
|
65
|
-
if (!defaultMind) {
|
|
66
|
-
console.error("--default-mind is required (mind to route DMs to)");
|
|
67
|
-
process.exit(1);
|
|
68
|
-
}
|
|
69
|
-
const res = await daemonFetch(`/api/bridges/${encodeURIComponent(platform)}`, {
|
|
70
|
-
method: "POST",
|
|
71
|
-
headers: { "Content-Type": "application/json" },
|
|
72
|
-
body: JSON.stringify({ defaultMind })
|
|
73
|
-
});
|
|
74
|
-
if (!res.ok) {
|
|
75
|
-
const data = await res.json().catch(() => ({}));
|
|
76
|
-
if (data.error === "missing_env" && data.missing) {
|
|
77
|
-
console.error(`Missing required environment variables:`);
|
|
78
|
-
for (const v of data.missing) {
|
|
79
|
-
console.error(` ${v.name} \u2014 ${v.description}`);
|
|
80
|
-
}
|
|
81
|
-
console.error(`
|
|
82
|
-
Set them with: volute env set <VAR> <value>`);
|
|
83
|
-
} else {
|
|
84
|
-
console.error(data.error ?? `Failed to add bridge: ${res.status}`);
|
|
85
|
-
}
|
|
86
|
-
process.exit(1);
|
|
87
|
-
}
|
|
88
|
-
console.log(`Bridge ${platform} enabled.`);
|
|
89
|
-
}
|
|
90
|
-
async function bridgeRemove(args) {
|
|
91
|
-
const platform = args[0];
|
|
92
|
-
if (!platform) {
|
|
93
|
-
console.error("Usage: volute chat bridge remove <platform>");
|
|
94
|
-
process.exit(1);
|
|
95
|
-
}
|
|
96
|
-
const res = await daemonFetch(`/api/bridges/${encodeURIComponent(platform)}`, {
|
|
97
|
-
method: "DELETE"
|
|
98
|
-
});
|
|
99
|
-
if (!res.ok) {
|
|
100
|
-
console.error(`Failed to remove bridge: ${res.status}`);
|
|
101
|
-
process.exit(1);
|
|
102
|
-
}
|
|
103
|
-
console.log(`Bridge ${platform} removed.`);
|
|
104
|
-
}
|
|
105
|
-
async function bridgeList() {
|
|
106
|
-
const res = await daemonFetch("/api/bridges");
|
|
107
|
-
if (!res.ok) {
|
|
108
|
-
console.error(`Failed to list bridges: ${res.status}`);
|
|
109
|
-
process.exit(1);
|
|
110
|
-
}
|
|
111
|
-
const bridges = await res.json();
|
|
112
|
-
if (bridges.length === 0) {
|
|
113
|
-
console.log("No bridges configured. Use 'volute chat bridge add <platform>' to set one up.");
|
|
114
|
-
return;
|
|
115
|
-
}
|
|
116
|
-
for (const b of bridges) {
|
|
117
|
-
const status = b.running ? "running" : b.enabled ? "stopped" : "disabled";
|
|
118
|
-
console.log(` ${b.displayName} (${b.platform}) ${status} default: ${b.defaultMind}`);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
async function bridgeMap(args) {
|
|
122
|
-
const target = args[0];
|
|
123
|
-
const voluteChannel = args[1];
|
|
124
|
-
if (!target || !voluteChannel) {
|
|
125
|
-
console.error("Usage: volute chat bridge map <platform>:<channel> <volute-channel>");
|
|
126
|
-
process.exit(1);
|
|
127
|
-
}
|
|
128
|
-
const colonIdx = target.indexOf(":");
|
|
129
|
-
if (colonIdx < 1) {
|
|
130
|
-
console.error("Target must be in format platform:channel (e.g. discord:my-server/general)");
|
|
131
|
-
process.exit(1);
|
|
132
|
-
}
|
|
133
|
-
const platform = target.slice(0, colonIdx);
|
|
134
|
-
const externalChannel = target.slice(colonIdx + 1);
|
|
135
|
-
const res = await daemonFetch(`/api/bridges/${encodeURIComponent(platform)}/mappings`, {
|
|
136
|
-
method: "PUT",
|
|
137
|
-
headers: { "Content-Type": "application/json" },
|
|
138
|
-
body: JSON.stringify({ externalChannel, voluteChannel })
|
|
139
|
-
});
|
|
140
|
-
if (!res.ok) {
|
|
141
|
-
const data = await res.json().catch(() => ({}));
|
|
142
|
-
console.error(data.error ?? `Failed to set mapping: ${res.status}`);
|
|
143
|
-
process.exit(1);
|
|
144
|
-
}
|
|
145
|
-
console.log(`Mapped ${platform}:${externalChannel} \u2192 ${voluteChannel}`);
|
|
146
|
-
}
|
|
147
|
-
async function bridgeUnmap(args) {
|
|
148
|
-
const target = args[0];
|
|
149
|
-
if (!target) {
|
|
150
|
-
console.error("Usage: volute chat bridge unmap <platform>:<channel>");
|
|
151
|
-
process.exit(1);
|
|
152
|
-
}
|
|
153
|
-
const colonIdx = target.indexOf(":");
|
|
154
|
-
if (colonIdx < 1) {
|
|
155
|
-
console.error("Target must be in format platform:channel");
|
|
156
|
-
process.exit(1);
|
|
157
|
-
}
|
|
158
|
-
const platform = target.slice(0, colonIdx);
|
|
159
|
-
const externalChannel = target.slice(colonIdx + 1);
|
|
160
|
-
const res = await daemonFetch(
|
|
161
|
-
`/api/bridges/${encodeURIComponent(platform)}/mappings/${encodeURIComponent(externalChannel)}`,
|
|
162
|
-
{ method: "DELETE" }
|
|
163
|
-
);
|
|
164
|
-
if (!res.ok) {
|
|
165
|
-
console.error(`Failed to remove mapping: ${res.status}`);
|
|
166
|
-
process.exit(1);
|
|
167
|
-
}
|
|
168
|
-
console.log(`Removed mapping for ${platform}:${externalChannel}`);
|
|
169
|
-
}
|
|
170
|
-
async function bridgeMappings(args) {
|
|
171
|
-
const platform = args[0];
|
|
172
|
-
if (platform) {
|
|
173
|
-
const res = await daemonFetch(`/api/bridges/${encodeURIComponent(platform)}/mappings`);
|
|
174
|
-
if (!res.ok) {
|
|
175
|
-
console.error(`Failed to get mappings: ${res.status}`);
|
|
176
|
-
process.exit(1);
|
|
177
|
-
}
|
|
178
|
-
const mappings = await res.json();
|
|
179
|
-
if (Object.keys(mappings).length === 0) {
|
|
180
|
-
console.log(`No mappings for ${platform}.`);
|
|
181
|
-
return;
|
|
182
|
-
}
|
|
183
|
-
for (const [external, volute] of Object.entries(mappings)) {
|
|
184
|
-
console.log(` ${platform}:${external} \u2192 ${volute}`);
|
|
185
|
-
}
|
|
186
|
-
} else {
|
|
187
|
-
const res = await daemonFetch("/api/bridges");
|
|
188
|
-
if (!res.ok) {
|
|
189
|
-
console.error(`Failed to list bridges: ${res.status}`);
|
|
190
|
-
process.exit(1);
|
|
191
|
-
}
|
|
192
|
-
const bridges = await res.json();
|
|
193
|
-
let found = false;
|
|
194
|
-
for (const b of bridges) {
|
|
195
|
-
for (const [external, volute] of Object.entries(b.channelMappings)) {
|
|
196
|
-
console.log(` ${b.platform}:${external} \u2192 ${volute}`);
|
|
197
|
-
found = true;
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
if (!found) {
|
|
201
|
-
console.log("No mappings configured.");
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
export {
|
|
206
|
-
run
|
|
207
|
-
};
|