@rubytech/create-maxy-code 0.1.228 → 0.1.229

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 (24) hide show
  1. package/package.json +1 -1
  2. package/payload/platform/plugins/admin/mcp/dist/index.js +9 -20
  3. package/payload/platform/plugins/admin/mcp/dist/index.js.map +1 -1
  4. package/payload/platform/plugins/admin/skills/platform-architecture/SKILL.md +33 -1
  5. package/payload/platform/plugins/admin/skills/qr-code/SKILL.md +6 -5
  6. package/payload/platform/plugins/admin/skills/qr-code/references/data-formats.md +2 -2
  7. package/payload/platform/plugins/admin/skills/unzip-attachment/SKILL.md +1 -1
  8. package/payload/platform/plugins/cloudflare/references/dashboard-guide.md +28 -0
  9. package/payload/platform/plugins/cloudflare/references/serving-published-sites.md +73 -0
  10. package/payload/platform/plugins/cloudflare/skills/setup-tunnel/SKILL.md +1 -1
  11. package/payload/platform/plugins/docs/references/troubleshooting.md +32 -0
  12. package/payload/platform/services/claude-session-manager/dist/rc-daemon.d.ts.map +1 -1
  13. package/payload/platform/services/claude-session-manager/dist/rc-daemon.js +5 -2
  14. package/payload/platform/services/claude-session-manager/dist/rc-daemon.js.map +1 -1
  15. package/payload/server/public/assets/AdminShell-1-LbiDAw.js +1 -0
  16. package/payload/server/public/assets/{admin-CE1Dy8-O.js → admin-BrCMyi1e.js} +1 -1
  17. package/payload/server/public/assets/data-V17bGzzl.js +1 -0
  18. package/payload/server/public/assets/graph-CYsyxGM1.js +51 -0
  19. package/payload/server/public/data.html +2 -2
  20. package/payload/server/public/graph.html +2 -2
  21. package/payload/server/public/index.html +2 -2
  22. package/payload/server/public/assets/AdminShell-BHSiRGiE.js +0 -1
  23. package/payload/server/public/assets/data-CKk52rib.js +0 -1
  24. package/payload/server/public/assets/graph-TuzretIr.js +0 -51
@@ -0,0 +1 @@
1
+ import{o as e}from"./chunk-DD-I1_y5.js";import{d as t,l as n,o as r,s as i,u as a}from"./brand-Dmpzr6Qq.js";import{a as o,c as s,d as c,f as l,i as u,n as d,r as f,t as p,u as m}from"./AdminShell-1-LbiDAw.js";import{i as h,t as g}from"./graph-labels-iPC15OmD.js";var _=n(`circle-arrow-up`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 12-4-4-4 4`,key:`177agl`}],[`path`,{d:`M12 16V8`,key:`1sbj14`}]]),v=n(`file`,[[`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:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}]]),y=n(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),b=n(`upload`,[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]),x=a(),S=e(t(),1);function C(e){let t=new Set,n=[];for(let r of e)for(let e of r.labels)e&&(t.has(e)||g.has(e)&&(t.add(e),n.push(e)));return n}var w=r();function T(){let[e,t]=(0,S.useState)(null),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)(void 0),[s,c]=(0,S.useState)(null),[u,d]=(0,S.useState)(void 0),[h,g]=(0,S.useState)(null),[_,v]=(0,S.useState)(null);(0,S.useEffect)(()=>{let e=!1,n=null;try{n=sessionStorage.getItem(`maxy-admin-session-key`)}catch{}if(!n){t(null),r(!0);return}return fetch(`/api/admin/session?session_key=${encodeURIComponent(n)}`).then(async i=>{if(!e){if(i.status===401){try{sessionStorage.removeItem(`maxy-admin-session-key`)}catch{}window.location.href=`/`;return}if(i.ok)try{let e=await i.json();typeof e.businessName==`string`&&a(e.businessName),e.sessionId!==void 0&&c(e.sessionId??null),v(e.role??null),d(e.userName===void 0?null:e.userName),g(e.avatar??null)}catch{}t(n),r(!0)}}).catch(()=>{e||(t(n),r(!0))}),()=>{e=!0}},[]);let y=(0,S.useCallback)(()=>{try{sessionStorage.removeItem(`maxy-admin-session-key`)}catch{}window.location.href=`/`},[]);return n?e?(0,w.jsx)(f,{cacheKey:e,surface:`data`,onSessionExpired:({code:e,path:t})=>{console.warn(`[admin-auth] outcome=session-expired-redirect code=${e} path=${t} surface=data`);try{sessionStorage.removeItem(`maxy-admin-session-key`)}catch{}window.location.href=`/`},children:(0,w.jsxs)(p,{cacheKey:e,businessName:i,sessionId:s,onLogout:y,userName:u,userAvatar:h,role:_,children:[(0,w.jsx)(o,{}),(0,w.jsxs)(`div`,{className:`data-page`,children:[(0,w.jsx)(`header`,{className:`data-header`,children:(0,w.jsxs)(`h1`,{className:`data-title`,children:[(0,w.jsx)(l,{size:18}),` Data`]})}),(0,w.jsx)(E,{cacheKey:e})]})]})}):(0,w.jsxs)(`div`,{className:`data-page`,children:[(0,w.jsx)(`header`,{className:`data-header`,children:(0,w.jsxs)(`h1`,{className:`data-title`,children:[(0,w.jsx)(l,{size:18}),` Data`]})}),(0,w.jsxs)(`div`,{className:`data-empty`,children:[(0,w.jsx)(`p`,{children:`You are not signed in.`}),(0,w.jsxs)(`p`,{children:[`Open the `,(0,w.jsx)(`a`,{href:`/`,className:`data-link`,children:`main admin page`}),` and log in, then return here.`]})]})]}):(0,w.jsx)(`div`,{className:`data-page`,children:(0,w.jsxs)(`div`,{className:`data-loading`,children:[(0,w.jsx)(m,{size:18,className:`spin`}),` Loading…`]})})}function E({cacheKey:e}){let{adminFetch:t,cacheKey:n,sessionRefetchNonce:r}=u({initialCacheKey:e,surface:`data`});return(0,w.jsxs)(`main`,{className:`data-main`,children:[(0,w.jsx)(D,{adminFetch:t,cacheKey:n,sessionRefetchNonce:r}),(0,w.jsx)(F,{adminFetch:t,cacheKey:n,sessionRefetchNonce:r})]})}function D({adminFetch:e,cacheKey:t,sessionRefetchNonce:n}){let[r,i]=(0,S.useState)(``),[a,o]=(0,S.useState)(``),[s,c]=(0,S.useState)(null),[l,u]=(0,S.useState)(`hybrid`),[d,f]=(0,S.useState)(!1),[p,g]=(0,S.useState)(null),[_,v]=(0,S.useState)(null),[y,b]=(0,S.useState)(0),[x,T]=(0,S.useState)(!1);(0,S.useEffect)(()=>{let e=r.trim();if(!e){o(``),c(null);return}T(!1);let t=setTimeout(()=>o(e),300);return()=>clearTimeout(t)},[r]),(0,S.useEffect)(()=>{if(!a)return;let t=!1;return f(!0),g(null),e(`/api/admin/graph-search?q=${encodeURIComponent(a)}&labels=FileArtifact&limit=20${x?`&threshold=0`:``}`).then(async e=>{let t=await e.json().catch(()=>({error:`HTTP ${e.status}`}));if(!e.ok)throw Error(t.error??`HTTP ${e.status}`);return t}).then(e=>{t||(c(e.results),u(e.mode??`hybrid`),b(typeof e.suppressed==`number`?e.suppressed:0))}).catch(e=>{t||g(e instanceof Error?e.message:String(e))}).finally(()=>{t||f(!1)}),()=>{t=!0}},[a,e,n,x]);let E=(0,S.useMemo)(()=>s?C(s):[],[s]),D=_&&E.includes(_)?_:null,A=(0,S.useMemo)(()=>s?D?s.filter(e=>e.labels.includes(D)):s:null,[s,D]),j=(0,S.useCallback)(e=>{let n=e.properties.relativePath;if(typeof n!=`string`||n.length===0)return;let r=`/api/admin/files/download?session_key=${encodeURIComponent(t)}&path=${encodeURIComponent(n)}`,i=document.createElement(`a`);i.href=r,i.rel=`noopener noreferrer`,document.body.appendChild(i),i.click(),i.remove()},[t]);return(0,w.jsxs)(`section`,{className:`data-panel`,children:[(0,w.jsx)(`h2`,{className:`data-panel-title`,children:`Search`}),(0,w.jsx)(`p`,{className:`data-panel-subtitle`,children:`Find anything in your knowledge base by keyword.`}),(0,w.jsxs)(`div`,{className:`data-search-input`,children:[(0,w.jsx)(h,{size:14}),(0,w.jsx)(`input`,{type:`text`,placeholder:`Search your knowledge…`,value:r,onChange:e=>i(e.target.value),autoFocus:!0,autoComplete:`off`,spellCheck:!1}),d&&(0,w.jsx)(m,{size:14,className:`spin`})]}),p&&(0,w.jsxs)(`div`,{className:`data-error`,children:[`Search failed: `,p]}),E.length>0&&(0,w.jsx)(`div`,{className:`data-chip-row`,role:`group`,"aria-label":`Filter by type`,children:E.map(e=>{let t=e===D;return(0,w.jsx)(`button`,{type:`button`,className:`data-chip`,"data-active":t,onClick:()=>v(t?null:e),children:k([e])??e},e)})}),s&&!d&&(0,w.jsxs)(`div`,{className:`data-results-meta`,children:[A.length,` of `,s.length,` result`,s.length===1?``:`s`]}),s&&!d&&!D&&y>0&&!x&&(0,w.jsxs)(`button`,{type:`button`,className:`data-suppressed-banner`,onClick:()=>T(!0),children:[y,` low-confidence result`,y===1?``:`s`,` hidden — show all`]}),s&&!d&&!D&&x&&(0,w.jsx)(`button`,{type:`button`,className:`data-suppressed-banner`,onClick:()=>T(!1),children:`Showing all results — hide low-confidence`}),s&&s.length===0&&!d&&(0,w.jsx)(`div`,{className:`data-empty-results`,children:`No matches. Try a different keyword.`}),A&&A.length>0&&(0,w.jsx)(`ul`,{className:`data-results`,children:A.map(e=>(0,w.jsx)(O,{hit:e,mode:l,onDownload:j},e.nodeId))})]})}function O({hit:e,mode:t,onDownload:n}){let r=A(e.properties),i=j(e.properties),a=k(e.labels),o=M(e.properties),[s,c]=(0,S.useState)(!1),l=i&&i.length>280,u=s||!l?i:i?.slice(0,280)+`…`,d=t===`bm25`?`bm25 ${e.bm25Score.toFixed(2)}`:`vector ${e.vectorScore.toFixed(2)} · bm25 ${e.bm25Score.toFixed(2)} · combined ${e.score.toFixed(2)}`;return(0,w.jsxs)(`li`,{className:`data-result`,children:[(0,w.jsxs)(`div`,{role:`button`,tabIndex:0,className:`data-result-open`,onClick:()=>n(e),onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),n(e))},"aria-label":`Download ${r??a??`file`}`,children:[a&&(0,w.jsx)(`div`,{className:`data-result-header`,children:(0,w.jsx)(`span`,{className:`data-result-labels`,children:a})}),r&&(0,w.jsx)(`div`,{className:`data-result-title`,children:r}),i&&(0,w.jsx)(`pre`,{className:`data-result-body`,children:u}),(0,w.jsxs)(`div`,{className:`data-result-scores`,children:[o&&(0,w.jsxs)(`span`,{className:`data-result-updated`,children:[`Updated `,L(o),` · `]}),d]})]}),l&&(0,w.jsx)(`button`,{type:`button`,className:`data-result-toggle`,onClick:()=>c(e=>!e),children:s?`Show less`:`Show more`})]})}function k(e){if(e.length===0)return null;let t=e[0].replace(/([a-z])([A-Z])/g,`$1 $2`);return t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}function A(e){for(let t of[`title`,`name`,`summary`,`headline`]){let n=e[t];if(typeof n==`string`&&n.length>0)return n.length>140?n.slice(0,140)+`…`:n}return null}function j(e){for(let t of[`content`,`summary`,`body`,`description`,`text`]){let n=e[t];if(typeof n==`string`&&n.length>0)return n}return null}function M(e){for(let t of[`updatedAt`,`modifiedAt`,`fetchedAt`,`createdAt`,`lastModified`]){let n=e[t];if(typeof n==`string`&&n.length>0)return n}return null}function N(){if(typeof window>`u`)return`.`;let e=new URLSearchParams(window.location.hash.replace(/^#/,``)).get(`path`);return e&&e.length>0?e:`.`}function P(e){if(typeof window>`u`)return;let t=new URL(window.location.href);t.hash=e===`.`?``:`path=${encodeURIComponent(e)}`,window.history.replaceState(window.history.state,``,t.toString())}function F({adminFetch:e,cacheKey:t,sessionRefetchNonce:n}){let[r,a]=(0,S.useState)(()=>N()),[o,l]=(0,S.useState)(null),[u,f]=(0,S.useState)([]),[p,h]=(0,S.useState)(!1),[g,x]=(0,S.useState)(null),[C,T]=(0,S.useState)(!1),[E,D]=(0,S.useState)(null),[O,k]=(0,S.useState)(null),[A,j]=(0,S.useState)(null),[M,F]=(0,S.useState)(null),R=(0,S.useRef)(null),[z,B]=(0,S.useState)(0);(0,S.useEffect)(()=>{let t=!1;return h(!0),x(null),e(`/api/admin/files?path=${encodeURIComponent(r===`.`?``:r)}`).then(async e=>{let t=await e.json().catch(()=>({error:`HTTP ${e.status}`}));if(!e.ok)throw Error(t.error??`HTTP ${e.status}`);return t}).then(e=>{t||(l(e.entries),f(e.displayPath??[]))}).catch(e=>{t||(l([]),f([]),x(e instanceof Error?e.message:String(e)))}).finally(()=>{t||h(!1)}),()=>{t=!0}},[e,r,z,n]),(0,S.useEffect)(()=>{P(r)},[r]);let V=(0,S.useCallback)(()=>{B(e=>e+1)},[]),H=(0,S.useCallback)(e=>{a(e)},[]),U=(0,S.useCallback)(()=>{if(r===`.`||r===``)return;let e=r.split(`/`).filter(Boolean);e.pop(),a(e.length===0?`.`:e.join(`/`))},[r]),W=(0,S.useCallback)(e=>{d(t,r===`.`?e.name:`${r}/${e.name}`)},[r,t]),G=(0,S.useCallback)(()=>{R.current?.click()},[]),K=(0,S.useCallback)(e=>{k(null),F(e.name)},[]),q=(0,S.useCallback)(()=>{F(null)},[]),J=(0,S.useCallback)(async t=>{let n=r===`.`?t.name:`${r}/${t.name}`;k(null),F(null),j(t.name);try{let t=await e(`/api/admin/files?path=${encodeURIComponent(n)}`,{method:`DELETE`}),r=await t.json().catch(()=>({error:`HTTP ${t.status}`}));if(!t.ok)throw Error(r.error??`HTTP ${t.status}`);B(e=>e+1)}catch(e){k(e instanceof Error?e.message:String(e))}finally{j(null)}},[r,e]);(0,S.useEffect)(()=>{if(!M)return;let e=e=>{e.key===`Escape`&&F(null)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[M]);let Y=(0,S.useCallback)(async e=>{D(null),T(!0);try{let n=new FormData;n.append(`session_key`,t),n.append(`file`,e);let r=await fetch(`/api/admin/files/upload`,{method:`POST`,body:n}),i=await r.json().catch(()=>({error:`HTTP ${r.status}`}));if(!r.ok)throw Error(i.error??`HTTP ${r.status}`);a(i.path.split(`/`).slice(0,-1).join(`/`)||`.`),B(e=>e+1)}catch(e){D(e instanceof Error?e.message:String(e))}finally{T(!1),R.current&&(R.current.value=``)}},[t]);return(0,w.jsxs)(`section`,{className:`data-panel`,children:[(0,w.jsxs)(`div`,{className:`data-panel-heading`,children:[(0,w.jsx)(`h2`,{className:`data-panel-title`,children:`Files`}),(0,w.jsxs)(`div`,{className:`data-file-actions`,children:[(0,w.jsxs)(`button`,{type:`button`,className:`data-btn`,onClick:V,disabled:p,title:`Refresh this folder`,"aria-label":`Refresh this folder`,children:[p?(0,w.jsx)(m,{size:14,className:`spin`}):(0,w.jsx)(s,{size:14}),` Refresh`]}),(0,w.jsxs)(`button`,{type:`button`,className:`data-btn`,onClick:G,disabled:C,children:[C?(0,w.jsx)(m,{size:14,className:`spin`}):(0,w.jsx)(b,{size:14}),` Upload`]}),(0,w.jsx)(`input`,{type:`file`,ref:R,hidden:!0,onChange:e=>{let t=e.target.files?.[0];t&&Y(t)}})]})]}),(0,w.jsxs)(`p`,{className:`data-panel-subtitle`,children:[`Everything under your install's `,(0,w.jsx)(`code`,{children:`data/`}),` directory. Click a folder to open it, a file to download it. Uploads go to `,(0,w.jsx)(`code`,{children:`data/uploads/`}),`.`]}),(0,w.jsxs)(`div`,{className:`data-breadcrumbs`,children:[(0,w.jsx)(`button`,{type:`button`,className:`data-crumb`,onClick:()=>H(`.`),children:`data`}),u.map((e,t)=>{let n=u.slice(0,t+1).map(e=>e.name).join(`/`);return(0,w.jsxs)(`span`,{className:`data-crumb-wrap`,children:[(0,w.jsx)(`span`,{className:`data-crumb-sep`,children:`/`}),(0,w.jsx)(`button`,{type:`button`,className:`data-crumb`,onClick:()=>H(n),title:e.name,children:e.displayName??e.name})]},n)}),r!==`.`&&(0,w.jsxs)(`button`,{type:`button`,className:`data-btn data-btn-ghost data-up-btn`,onClick:U,children:[(0,w.jsx)(_,{size:14}),` Up`]})]}),E&&(0,w.jsxs)(`div`,{className:`data-error`,children:[`Upload failed: `,E]}),O&&(0,w.jsxs)(`div`,{className:`data-error`,children:[`Delete failed: `,O]}),g&&(0,w.jsx)(`div`,{className:`data-error`,children:g}),p&&(0,w.jsxs)(`div`,{className:`data-loading`,children:[(0,w.jsx)(m,{size:14,className:`spin`}),` Loading…`]}),!p&&o&&o.length===0&&!g&&(0,w.jsx)(`div`,{className:`data-empty-results`,children:`Empty directory.`}),!p&&o&&o.length>0&&(0,w.jsx)(`ul`,{className:`data-entries`,children:o.map(e=>{let t=e.displayName??e.name,n=A===e.name,a=M===e.name;return(0,w.jsx)(`li`,{className:`data-entry`,children:e.kind===`directory`?(0,w.jsxs)(`button`,{type:`button`,className:`data-entry-btn`,onClick:()=>H(r===`.`?e.name:`${r}/${e.name}`),children:[(0,w.jsx)(y,{size:14}),(0,w.jsx)(`span`,{className:`data-entry-name`,title:e.name,children:t})]}):e.kind===`file`?(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(`button`,{type:`button`,className:`data-entry-btn`,onClick:()=>W(e),title:`Download ${t}`,disabled:a,children:[(0,w.jsx)(v,{size:14}),(0,w.jsx)(`span`,{className:`data-entry-name`,title:e.name,children:t}),(0,w.jsxs)(`span`,{className:`data-entry-meta`,title:`Modified ${L(e.modifiedAt)}`,children:[I(e.sizeBytes),` · `,L(e.modifiedAt)]}),(0,w.jsx)(c,{size:12,className:`data-entry-download-icon`})]}),a?(0,w.jsxs)(`div`,{className:`data-entry-confirm`,role:`group`,"aria-label":`Confirm delete ${t}`,children:[(0,w.jsx)(`span`,{className:`data-entry-confirm-label`,children:`Delete?`}),(0,w.jsx)(`button`,{type:`button`,className:`data-entry-confirm-yes`,onClick:()=>J(e),autoFocus:!0,children:`Yes`}),(0,w.jsx)(`button`,{type:`button`,className:`data-entry-confirm-no`,onClick:q,children:`No`})]}):(0,w.jsx)(`button`,{type:`button`,className:`data-entry-delete`,onClick:()=>K(e),disabled:n,title:`Delete ${t}`,"aria-label":`Delete ${t}`,children:n?(0,w.jsx)(m,{size:14,className:`spin`}):(0,w.jsx)(i,{size:14})})]}):(0,w.jsxs)(`div`,{className:`data-entry-btn data-entry-disabled`,children:[(0,w.jsx)(v,{size:14}),(0,w.jsx)(`span`,{className:`data-entry-name`,children:t}),(0,w.jsx)(`span`,{className:`data-entry-meta`,children:`special`})]})},e.name)})})]})}function I(e){return e==null?``:e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:e<1024*1024*1024?`${(e/1024/1024).toFixed(1)} MB`:`${(e/1024/1024/1024).toFixed(1)} GB`}function L(e){try{let t=new Date(e);if(isNaN(t.getTime()))return`—`;let n=typeof navigator<`u`?navigator.languages&&navigator.languages.length>0?[...navigator.languages]:[navigator.language]:void 0;return t.toLocaleString(n,{dateStyle:`medium`,timeStyle:`short`})}catch{return`—`}}(0,x.createRoot)(document.getElementById(`root`)).render((0,w.jsx)(T,{}));