@karmaniverous/jeeves-server 3.5.2 → 3.6.1

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 (82) hide show
  1. package/.tsbuildinfo +1 -1
  2. package/CHANGELOG.md +33 -1
  3. package/client/src/components/DirectoryRow.tsx +5 -1
  4. package/client/src/components/FileContentView.tsx +7 -0
  5. package/client/src/components/MarkdownView.tsx +63 -22
  6. package/client/src/components/TocSection.tsx +74 -0
  7. package/client/src/components/renderableUtils.ts +2 -2
  8. package/client/src/components/tocUtils.ts +65 -0
  9. package/client/src/index.css +36 -0
  10. package/client/src/lib/api.ts +2 -1
  11. package/client/src/lucide.d.ts +15 -0
  12. package/dist/client/assets/{CodeViewer-Cegj3cEn.js → CodeViewer-D5fJ1Z6_.js} +1 -1
  13. package/dist/client/assets/{index-DrBXupPz.js → index-BXy6kgl7.js} +2 -2
  14. package/dist/client/assets/index-Ch0vkF39.css +2 -0
  15. package/dist/client/index.html +2 -2
  16. package/dist/src/cli/index.js +2 -1
  17. package/dist/src/cli/start-server.js +12 -2
  18. package/dist/src/config/index.js +16 -2
  19. package/dist/src/config/loadConfig.test.js +66 -1
  20. package/dist/src/config/resolve.js +0 -4
  21. package/dist/src/config/resolve.test.js +0 -2
  22. package/dist/src/config/schema.js +7 -21
  23. package/dist/src/config/substituteEnvVars.js +2 -0
  24. package/dist/src/descriptor.js +9 -2
  25. package/dist/src/routes/api/auth-status.js +1 -1
  26. package/dist/src/routes/api/directory.js +46 -24
  27. package/dist/src/routes/api/directory.test.js +65 -0
  28. package/dist/src/routes/api/export.js +5 -1
  29. package/dist/src/routes/api/export.test.js +46 -0
  30. package/dist/src/routes/api/fileContent.js +26 -4
  31. package/dist/src/routes/api/runner.js +2 -3
  32. package/dist/src/routes/api/runner.test.js +29 -0
  33. package/dist/src/routes/api/search.js +4 -9
  34. package/dist/src/routes/api/search.test.js +28 -0
  35. package/dist/src/routes/config.test.js +0 -1
  36. package/dist/src/routes/event.js +1 -1
  37. package/dist/src/routes/status.js +4 -4
  38. package/dist/src/routes/status.test.js +10 -4
  39. package/dist/src/server.js +4 -2
  40. package/dist/src/services/csv.js +114 -0
  41. package/dist/src/services/csv.test.js +107 -0
  42. package/dist/src/services/markdown.js +21 -1
  43. package/dist/src/services/markdown.test.js +43 -0
  44. package/dist/src/util/packageVersion.js +3 -13
  45. package/guides/deployment.md +1 -1
  46. package/guides/setup.md +14 -10
  47. package/knip.json +2 -1
  48. package/package.json +18 -16
  49. package/src/cli/index.ts +3 -1
  50. package/src/cli/start-server.ts +17 -3
  51. package/src/config/index.ts +22 -2
  52. package/src/config/loadConfig.test.ts +77 -1
  53. package/src/config/resolve.test.ts +0 -2
  54. package/src/config/resolve.ts +0 -4
  55. package/src/config/schema.ts +8 -21
  56. package/src/config/substituteEnvVars.ts +2 -0
  57. package/src/config/types.ts +0 -4
  58. package/src/descriptor.ts +9 -1
  59. package/src/routes/api/auth-status.ts +1 -1
  60. package/src/routes/api/directory.test.ts +77 -0
  61. package/src/routes/api/directory.ts +59 -22
  62. package/src/routes/api/export.test.ts +56 -0
  63. package/src/routes/api/export.ts +5 -1
  64. package/src/routes/api/fileContent.ts +27 -3
  65. package/src/routes/api/runner.test.ts +39 -0
  66. package/src/routes/api/runner.ts +2 -5
  67. package/src/routes/api/search.test.ts +36 -0
  68. package/src/routes/api/search.ts +4 -9
  69. package/src/routes/config.test.ts +0 -1
  70. package/src/routes/event.test.ts +4 -4
  71. package/src/routes/event.ts +11 -6
  72. package/src/routes/status.test.ts +13 -4
  73. package/src/routes/status.ts +4 -4
  74. package/src/server.ts +4 -2
  75. package/src/services/csv.test.ts +127 -0
  76. package/src/services/csv.ts +115 -0
  77. package/src/services/markdown.test.ts +54 -0
  78. package/src/services/markdown.ts +21 -1
  79. package/src/types/puppeteer-core.d.ts +16 -0
  80. package/src/util/packageVersion.ts +3 -18
  81. package/dist/client/assets/index-Dk_myGs4.css +0 -2
  82. package/src/types/jsonmap.d.ts +0 -10
@@ -0,0 +1,2 @@
1
+ /*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */
2
+ @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial}}}@layer theme{:root,:host{--font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-red-900:oklch(39.6% .141 25.723);--color-red-950:oklch(25.8% .092 26.042);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-yellow-100:oklch(97.3% .071 103.193);--color-yellow-400:oklch(85.2% .199 91.936);--color-yellow-500:oklch(79.5% .184 86.047);--color-yellow-600:oklch(68.1% .162 75.834);--color-yellow-800:oklch(47.6% .114 61.907);--color-yellow-900:oklch(42.1% .095 57.708);--color-green-100:oklch(96.2% .044 156.743);--color-green-400:oklch(79.2% .209 151.711);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-green-800:oklch(44.8% .119 151.328);--color-green-900:oklch(39.3% .095 152.535);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-800:oklch(42.4% .199 265.638);--color-blue-900:oklch(37.9% .146 265.522);--color-zinc-100:oklch(96.7% .001 286.375);--color-zinc-200:oklch(92% .004 286.32);--color-zinc-300:oklch(87.1% .006 286.286);--color-zinc-400:oklch(70.5% .015 286.067);--color-zinc-500:oklch(55.2% .016 285.938);--color-zinc-600:oklch(44.2% .017 285.786);--color-zinc-700:oklch(37% .013 285.805);--color-zinc-800:oklch(27.4% .006 286.033);--color-zinc-900:oklch(21% .006 285.885);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-lg:32rem;--container-4xl:56rem;--container-5xl:64rem;--container-6xl:72rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height:calc(2.25 / 1.875);--text-6xl:3.75rem;--text-6xl--line-height:1;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-wider:.05em;--leading-tight:1.25;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--animate-spin:spin 1s linear infinite;--blur-sm:8px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;--default-mono-font-family:var(--font-mono);--color-background:var(--background);--color-foreground:var(--foreground);--color-muted:var(--muted);--color-muted-foreground:var(--muted-foreground);--color-border:var(--border);--color-accent:var(--accent);--color-destructive:var(--destructive)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}:root{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--background:#fff;--foreground:#0a0a0a;--muted:#f5f5f5;--muted-foreground:#737373;--border:#e5e5e5;--primary:#171717;--primary-foreground:#fafafa;--accent:#f5f5f5;--accent-foreground:#171717;--popover:#fff;--popover-foreground:#0a0a0a;--destructive:#ef4444;--ring:#171717}.dark{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--background:#0a0a0a;--foreground:#fafafa;--muted:#262626;--muted-foreground:#a3a3a3;--border:#262626;--primary:#fafafa;--primary-foreground:#0a0a0a;--accent:#3a3a3a;--accent-foreground:#fafafa;--popover:#1c1c1c;--popover-foreground:#fafafa;--destructive:#f87171;--ring:#d4d4d4}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.end{inset-inline-end:var(--spacing)}.top-0{top:calc(var(--spacing) * 0)}.top-2{top:calc(var(--spacing) * 2)}.top-\[50\%\]{top:50%}.top-full{top:100%}.right-0{right:calc(var(--spacing) * 0)}.right-2{right:calc(var(--spacing) * 2)}.left-0{left:calc(var(--spacing) * 0)}.left-2{left:calc(var(--spacing) * 2)}.left-\[50\%\]{left:50%}.z-10{z-index:10}.z-40{z-index:40}.z-50{z-index:50}.z-\[100\]{z-index:100}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.-mx-1{margin-inline:calc(var(--spacing) * -1)}.mx-0\.5{margin-inline:calc(var(--spacing) * .5)}.mx-1{margin-inline:calc(var(--spacing) * 1)}.mx-auto{margin-inline:auto}.my-1{margin-block:calc(var(--spacing) * 1)}.my-4{margin-block:calc(var(--spacing) * 4)}.prose{color:var(--tw-prose-body);max-width:65ch}.prose :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-lead);margin-top:1.2em;margin-bottom:1.2em;font-size:1.25em;line-height:1.6}.prose :where(a):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-links);font-weight:500;text-decoration:underline}.prose :where(strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-bold);font-weight:600}.prose :where(a strong):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(blockquote strong):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(thead th strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em;list-style-type:decimal}.prose :where(ol[type=A]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=A s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=I]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type=I s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal}.prose :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em;list-style-type:disc}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-counters);font-weight:400}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-bullets)}.prose :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);margin-top:1.25em;font-weight:600}.prose :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.prose :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-quotes);border-inline-start-width:.25rem;border-inline-start-color:var(--tw-prose-quote-borders);quotes:"“""”""‘""’";margin-top:1.6em;margin-bottom:1.6em;padding-inline-start:1em;font-style:italic;font-weight:500}.prose :where(blockquote p:first-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:open-quote}.prose :where(blockquote p:last-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:close-quote}.prose :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);margin-top:0;margin-bottom:.888889em;font-size:2.25em;font-weight:800;line-height:1.11111}.prose :where(h1 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:900}.prose :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);margin-top:2em;margin-bottom:1em;font-size:1.5em;font-weight:700;line-height:1.33333}.prose :where(h2 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:800}.prose :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);margin-top:1.6em;margin-bottom:.6em;font-size:1.25em;font-weight:600;line-height:1.6}.prose :where(h3 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:700}.prose :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);margin-top:1.5em;margin-bottom:.5em;font-weight:600;line-height:1.5}.prose :where(h4 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:700}.prose :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em;display:block}.prose :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-kbd);box-shadow:0 0 0 1px var(--tw-prose-kbd-shadows), 0 3px 0 var(--tw-prose-kbd-shadows);padding-top:.1875em;padding-inline-end:.375em;padding-bottom:.1875em;border-radius:.3125rem;padding-inline-start:.375em;font-family:inherit;font-size:.875em;font-weight:500}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-code);font-size:.875em;font-weight:600}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):before,.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:"`"}.prose :where(a code):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(h1 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.875em}.prose :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.9em}.prose :where(h4 code):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(blockquote code):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(thead th code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-pre-code);background-color:var(--tw-prose-pre-bg);padding-top:.857143em;padding-inline-end:1.14286em;padding-bottom:.857143em;border-radius:.375rem;margin-top:1.71429em;margin-bottom:1.71429em;padding-inline-start:1.14286em;font-size:.875em;font-weight:400;line-height:1.71429;overflow-x:auto}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit;background-color:#0000;border-width:0;border-radius:0;padding:0}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):before,.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:none}.prose :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){table-layout:auto;width:100%;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.71429}.prose :where(thead):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-th-borders)}.prose :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);vertical-align:bottom;padding-inline-end:.571429em;padding-bottom:.571429em;padding-inline-start:.571429em;font-weight:600}.prose :where(tbody tr):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}.prose :where(tbody tr:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:0}.prose :where(tbody td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:baseline}.prose :where(tfoot):not(:where([class~=not-prose],[class~=not-prose] *)){border-top-width:1px;border-top-color:var(--tw-prose-th-borders)}.prose :where(tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:top}.prose :where(th,td):not(:where([class~=not-prose],[class~=not-prose] *)){text-align:start}.prose :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-captions);margin-top:.857143em;font-size:.875em;line-height:1.42857}.prose{--tw-prose-body:oklch(37.3% .034 259.733);--tw-prose-headings:oklch(21% .034 264.665);--tw-prose-lead:oklch(44.6% .03 256.802);--tw-prose-links:oklch(21% .034 264.665);--tw-prose-bold:oklch(21% .034 264.665);--tw-prose-counters:oklch(55.1% .027 264.364);--tw-prose-bullets:oklch(87.2% .01 258.338);--tw-prose-hr:oklch(92.8% .006 264.531);--tw-prose-quotes:oklch(21% .034 264.665);--tw-prose-quote-borders:oklch(92.8% .006 264.531);--tw-prose-captions:oklch(55.1% .027 264.364);--tw-prose-kbd:oklch(21% .034 264.665);--tw-prose-kbd-shadows:oklab(21% -.00316127 -.0338527/.1);--tw-prose-code:oklch(21% .034 264.665);--tw-prose-pre-code:oklch(92.8% .006 264.531);--tw-prose-pre-bg:oklch(27.8% .033 256.848);--tw-prose-th-borders:oklch(87.2% .01 258.338);--tw-prose-td-borders:oklch(92.8% .006 264.531);--tw-prose-invert-body:oklch(87.2% .01 258.338);--tw-prose-invert-headings:#fff;--tw-prose-invert-lead:oklch(70.7% .022 261.325);--tw-prose-invert-links:#fff;--tw-prose-invert-bold:#fff;--tw-prose-invert-counters:oklch(70.7% .022 261.325);--tw-prose-invert-bullets:oklch(44.6% .03 256.802);--tw-prose-invert-hr:oklch(37.3% .034 259.733);--tw-prose-invert-quotes:oklch(96.7% .003 264.542);--tw-prose-invert-quote-borders:oklch(37.3% .034 259.733);--tw-prose-invert-captions:oklch(70.7% .022 261.325);--tw-prose-invert-kbd:#fff;--tw-prose-invert-kbd-shadows:#ffffff1a;--tw-prose-invert-code:#fff;--tw-prose-invert-pre-code:oklch(87.2% .01 258.338);--tw-prose-invert-pre-bg:#00000080;--tw-prose-invert-th-borders:oklch(44.6% .03 256.802);--tw-prose-invert-td-borders:oklch(37.3% .034 259.733);font-size:1rem;line-height:1.75}.prose :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;margin-bottom:.5em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}.prose :where(.prose>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(.prose>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(.prose>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;padding-inline-start:1.625em}.prose :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.571429em;padding-inline-end:.571429em;padding-bottom:.571429em;padding-inline-start:.571429em}.prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(.prose>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(.prose>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.prose-sm{font-size:.875rem;line-height:1.71429}.prose-sm :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.14286em;margin-bottom:1.14286em}.prose-sm :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.888889em;margin-bottom:.888889em;font-size:1.28571em;line-height:1.55556}.prose-sm :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.33333em;margin-bottom:1.33333em;padding-inline-start:1.11111em}.prose-sm :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:.8em;font-size:2.14286em;line-height:1.2}.prose-sm :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.6em;margin-bottom:.8em;font-size:1.42857em;line-height:1.4}.prose-sm :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.55556em;margin-bottom:.444444em;font-size:1.28571em;line-height:1.55556}.prose-sm :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.42857em;margin-bottom:.571429em;line-height:1.42857}.prose-sm :where(img):not(:where([class~=not-prose],[class~=not-prose] *)),.prose-sm :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.71429em;margin-bottom:1.71429em}.prose-sm :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose-sm :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.71429em;margin-bottom:1.71429em}.prose-sm :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.142857em;padding-inline-end:.357143em;padding-bottom:.142857em;border-radius:.3125rem;padding-inline-start:.357143em;font-size:.857143em}.prose-sm :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.857143em}.prose-sm :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.9em}.prose-sm :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.888889em}.prose-sm :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.666667em;padding-inline-end:1em;padding-bottom:.666667em;border-radius:.25rem;margin-top:1.66667em;margin-bottom:1.66667em;padding-inline-start:1em;font-size:.857143em;line-height:1.66667}.prose-sm :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)),.prose-sm :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.14286em;margin-bottom:1.14286em;padding-inline-start:1.57143em}.prose-sm :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.285714em;margin-bottom:.285714em}.prose-sm :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)),.prose-sm :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.428571em}.prose-sm :where(.prose-sm>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.571429em;margin-bottom:.571429em}.prose-sm :where(.prose-sm>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.14286em}.prose-sm :where(.prose-sm>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.14286em}.prose-sm :where(.prose-sm>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.14286em}.prose-sm :where(.prose-sm>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.14286em}.prose-sm :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.571429em;margin-bottom:.571429em}.prose-sm :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.14286em;margin-bottom:1.14286em}.prose-sm :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.14286em}.prose-sm :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.285714em;padding-inline-start:1.57143em}.prose-sm :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2.85714em;margin-bottom:2.85714em}.prose-sm :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)),.prose-sm :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)),.prose-sm :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)),.prose-sm :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.857143em;line-height:1.5}.prose-sm :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:1em;padding-bottom:.666667em;padding-inline-start:1em}.prose-sm :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose-sm :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose-sm :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.666667em;padding-inline-end:1em;padding-bottom:.666667em;padding-inline-start:1em}.prose-sm :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose-sm :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose-sm :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.71429em;margin-bottom:1.71429em}.prose-sm :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose-sm :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.666667em;font-size:.857143em;line-height:1.33333}.prose-sm :where(.prose-sm>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(.prose-sm>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mr-1{margin-right:calc(var(--spacing) * 1)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.ml-0\.5{margin-left:calc(var(--spacing) * .5)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-auto{margin-left:auto}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.table{display:table}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-11{height:calc(var(--spacing) * 11)}.h-32{height:calc(var(--spacing) * 32)}.h-\[calc\(100vh-8rem\)\]{height:calc(100vh - 8rem)}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-32{max-height:calc(var(--spacing) * 32)}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-\[60vh\]{max-height:60vh}.max-h-\[85vh\]{max-height:85vh}.min-h-0{min-height:calc(var(--spacing) * 0)}.min-h-\[200px\]{min-height:200px}.min-h-screen{min-height:100vh}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-10{width:calc(var(--spacing) * 10)}.w-14{width:calc(var(--spacing) * 14)}.w-52{width:calc(var(--spacing) * 52)}.w-56{width:calc(var(--spacing) * 56)}.w-64{width:calc(var(--spacing) * 64)}.w-\[8\%\]{width:8%}.w-\[10\%\]{width:10%}.w-\[12\%\]{width:12%}.w-\[15\%\]{width:15%}.w-\[25\%\]{width:25%}.w-\[30\%\]{width:30%}.w-full{width:100%}.max-w-4xl{max-width:var(--container-4xl)}.max-w-5xl{max-width:var(--container-5xl)}.max-w-6xl{max-width:var(--container-6xl)}.max-w-48{max-width:calc(var(--spacing) * 48)}.max-w-\[120px\]{max-width:120px}.max-w-\[200px\]{max-width:200px}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.max-w-none{max-width:none}.max-w-prose{max-width:65ch}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-\[8rem\]{min-width:8rem}.min-w-\[100px\]{min-width:100px}.flex-1{flex:1}.shrink-0{flex-shrink:0}.translate-x-\[-50\%\]{--tw-translate-x:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\[-50\%\]{--tw-translate-y:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-90{rotate:90deg}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-grab{cursor:grab}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-6{gap:calc(var(--spacing) * 6)}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-border>:not(:last-child)){border-color:var(--border)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-y-hidden{overflow-y:hidden}.rounded{border-radius:.5rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-amber-500\/30{border-color:#f99c004d}@supports (color:color-mix(in lab, red, red)){.border-amber-500\/30{border-color:color-mix(in oklab, var(--color-amber-500) 30%, transparent)}}.border-blue-500{border-color:var(--color-blue-500)}.border-border{border-color:var(--border)}.border-primary,.border-primary\/30{border-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.border-primary\/30{border-color:color-mix(in oklab, var(--primary) 30%, transparent)}}.border-red-200{border-color:var(--color-red-200)}.border-red-800{border-color:var(--color-red-800)}.border-transparent{border-color:#0000}.border-zinc-200{border-color:var(--color-zinc-200)}.border-t-transparent{border-top-color:#0000}.bg-accent{background-color:var(--accent)}.bg-amber-500\/5{background-color:#f99c000d}@supports (color:color-mix(in lab, red, red)){.bg-amber-500\/5{background-color:color-mix(in oklab, var(--color-amber-500) 5%, transparent)}}.bg-amber-500\/10{background-color:#f99c001a}@supports (color:color-mix(in lab, red, red)){.bg-amber-500\/10{background-color:color-mix(in oklab, var(--color-amber-500) 10%, transparent)}}.bg-amber-500\/20{background-color:#f99c0033}@supports (color:color-mix(in lab, red, red)){.bg-amber-500\/20{background-color:color-mix(in oklab, var(--color-amber-500) 20%, transparent)}}.bg-background{background-color:var(--background)}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab, red, red)){.bg-black\/50{background-color:color-mix(in oklab, var(--color-black) 50%, transparent)}}.bg-black\/80{background-color:#000c}@supports (color:color-mix(in lab, red, red)){.bg-black\/80{background-color:color-mix(in oklab, var(--color-black) 80%, transparent)}}.bg-blue-100{background-color:var(--color-blue-100)}.bg-blue-600{background-color:var(--color-blue-600)}.bg-destructive{background-color:var(--destructive)}.bg-green-100{background-color:var(--color-green-100)}.bg-muted,.bg-muted\/30{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.bg-muted\/30{background-color:color-mix(in oklab, var(--muted) 30%, transparent)}}.bg-muted\/50{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.bg-muted\/50{background-color:color-mix(in oklab, var(--muted) 50%, transparent)}}.bg-popover{background-color:var(--popover)}.bg-primary,.bg-primary\/10{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.bg-primary\/10{background-color:color-mix(in oklab, var(--primary) 10%, transparent)}}.bg-red-50{background-color:var(--color-red-50)}.bg-red-100{background-color:var(--color-red-100)}.bg-red-500\/10{background-color:#fb2c361a}@supports (color:color-mix(in lab, red, red)){.bg-red-500\/10{background-color:color-mix(in oklab, var(--color-red-500) 10%, transparent)}}.bg-red-950\/20{background-color:#46080933}@supports (color:color-mix(in lab, red, red)){.bg-red-950\/20{background-color:color-mix(in oklab, var(--color-red-950) 20%, transparent)}}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-yellow-100{background-color:var(--color-yellow-100)}.bg-zinc-100{background-color:var(--color-zinc-100)}.bg-zinc-800{background-color:var(--color-zinc-800)}.bg-zinc-800\/70{background-color:#27272ab3}@supports (color:color-mix(in lab, red, red)){.bg-zinc-800\/70{background-color:color-mix(in oklab, var(--color-zinc-800) 70%, transparent)}}.bg-zinc-900{background-color:var(--color-zinc-900)}.p-1{padding:calc(var(--spacing) * 1)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.px-0{padding-inline:calc(var(--spacing) * 0)}.px-0\.5{padding-inline:calc(var(--spacing) * .5)}.px-1{padding-inline:calc(var(--spacing) * 1)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-8{padding-inline:calc(var(--spacing) * 8)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-12{padding-block:calc(var(--spacing) * 12)}.pt-1{padding-top:calc(var(--spacing) * 1)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-\[5vh\]{padding-top:5vh}.pb-1{padding-bottom:calc(var(--spacing) * 1)}.pb-32{padding-bottom:calc(var(--spacing) * 32)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-8{padding-left:calc(var(--spacing) * 8)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-6xl{font-size:var(--text-6xl);line-height:var(--tw-leading,var(--text-6xl--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[8px\]{font-size:8px}.text-\[10px\]{font-size:10px}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.break-words{overflow-wrap:break-word}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-amber-600{color:var(--color-amber-600)}.text-amber-700{color:var(--color-amber-700)}.text-blue-400{color:var(--color-blue-400)}.text-blue-500{color:var(--color-blue-500)}.text-blue-800{color:var(--color-blue-800)}.text-destructive{color:var(--destructive)}.text-foreground,.text-foreground\/70{color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.text-foreground\/70{color:color-mix(in oklab, var(--foreground) 70%, transparent)}}.text-foreground\/80{color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.text-foreground\/80{color:color-mix(in oklab, var(--foreground) 80%, transparent)}}.text-green-400{color:var(--color-green-400)}.text-green-500{color:var(--color-green-500)}.text-green-600{color:var(--color-green-600)}.text-green-800{color:var(--color-green-800)}.text-muted-foreground{color:var(--muted-foreground)}.text-popover-foreground{color:var(--popover-foreground)}.text-primary{color:var(--primary)}.text-primary-foreground{color:var(--primary-foreground)}.text-red-300{color:var(--color-red-300)}.text-red-400{color:var(--color-red-400)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-red-800{color:var(--color-red-800)}.text-white{color:var(--color-white)}.text-yellow-500{color:var(--color-yellow-500)}.text-yellow-600{color:var(--color-yellow-600)}.text-yellow-800{color:var(--color-yellow-800)}.text-zinc-200{color:var(--color-zinc-200)}.text-zinc-300{color:var(--color-zinc-300)}.text-zinc-400{color:var(--color-zinc-400)}.text-zinc-500{color:var(--color-zinc-500)}.text-zinc-600{color:var(--color-zinc-600)}.text-zinc-800{color:var(--color-zinc-800)}.uppercase{text-transform:uppercase}.no-underline{text-decoration-line:none}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-40{opacity:.4}.opacity-60{opacity:.6}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-offset-background{--tw-ring-offset-color:var(--background)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}@media (hover:hover){.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.file\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\:bg-transparent::file-selector-button{background-color:#0000}.file\:text-sm::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.file\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.placeholder\:text-muted-foreground::placeholder{color:var(--muted-foreground)}.last\:mb-0:last-child{margin-bottom:calc(var(--spacing) * 0)}.last\:border-0:last-child{border-style:var(--tw-border-style);border-width:0}@media (hover:hover){.hover\:border-foreground:hover{border-color:var(--foreground)}.hover\:border-primary\/30:hover{border-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.hover\:border-primary\/30:hover{border-color:color-mix(in oklab, var(--primary) 30%, transparent)}}.hover\:bg-accent:hover,.hover\:bg-accent\/50:hover{background-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-accent\/50:hover{background-color:color-mix(in oklab, var(--accent) 50%, transparent)}}.hover\:bg-accent\/80:hover{background-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-accent\/80:hover{background-color:color-mix(in oklab, var(--accent) 80%, transparent)}}.hover\:bg-amber-500\/20:hover{background-color:#f99c0033}@supports (color:color-mix(in lab, red, red)){.hover\:bg-amber-500\/20:hover{background-color:color-mix(in oklab, var(--color-amber-500) 20%, transparent)}}.hover\:bg-blue-700:hover{background-color:var(--color-blue-700)}.hover\:bg-destructive\/90:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-destructive\/90:hover{background-color:color-mix(in oklab, var(--destructive) 90%, transparent)}}.hover\:bg-muted\/50:hover{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-muted\/50:hover{background-color:color-mix(in oklab, var(--muted) 50%, transparent)}}.hover\:bg-primary\/10:hover{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-primary\/10:hover{background-color:color-mix(in oklab, var(--primary) 10%, transparent)}}.hover\:bg-primary\/20:hover{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-primary\/20:hover{background-color:color-mix(in oklab, var(--primary) 20%, transparent)}}.hover\:bg-primary\/90:hover{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab, var(--primary) 90%, transparent)}}.hover\:bg-white\/10:hover{background-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.hover\:bg-white\/10:hover{background-color:color-mix(in oklab, var(--color-white) 10%, transparent)}}.hover\:bg-zinc-700:hover{background-color:var(--color-zinc-700)}.hover\:text-accent-foreground:hover{color:var(--accent-foreground)}.hover\:text-foreground:hover{color:var(--foreground)}.hover\:text-white:hover{color:var(--color-white)}.hover\:underline:hover{text-decoration-line:underline}.hover\:shadow-lg:hover{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}}.focus\:border-primary:focus{border-color:var(--primary)}.focus\:bg-accent:focus{background-color:var(--accent)}.focus\:text-accent-foreground:focus{color:var(--accent-foreground)}.focus\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\:ring-ring:focus{--tw-ring-color:var(--ring)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color:var(--ring)}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.active\:cursor-grabbing:active{cursor:grabbing}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}@media (width>=400px){.min-\[400px\]\:flex{display:flex}.min-\[400px\]\:hidden{display:none}}@media (width>=480px){.min-\[480px\]\:flex{display:flex}.min-\[480px\]\:hidden{display:none}}@media (width>=40rem){.sm\:flex{display:flex}.sm\:hidden{display:none}.sm\:inline{display:inline}.sm\:rounded-lg{border-radius:var(--radius-lg)}}@media (width>=48rem){.md\:flex{display:flex}.md\:hidden{display:none}.md\:inline-flex{display:inline-flex}.md\:px-6{padding-inline:calc(var(--spacing) * 6)}.md\:pt-6{padding-top:calc(var(--spacing) * 6)}}@media (width>=64rem){.lg\:block{display:block}.lg\:hidden{display:none}}.dark\:border-red-800:where(.dark,.dark *){border-color:var(--color-red-800)}.dark\:bg-blue-900\/30:where(.dark,.dark *){background-color:#1c398e4d}@supports (color:color-mix(in lab, red, red)){.dark\:bg-blue-900\/30:where(.dark,.dark *){background-color:color-mix(in oklab, var(--color-blue-900) 30%, transparent)}}.dark\:bg-green-900\/30:where(.dark,.dark *){background-color:#0d542b4d}@supports (color:color-mix(in lab, red, red)){.dark\:bg-green-900\/30:where(.dark,.dark *){background-color:color-mix(in oklab, var(--color-green-900) 30%, transparent)}}.dark\:bg-red-900\/20:where(.dark,.dark *){background-color:#82181a33}@supports (color:color-mix(in lab, red, red)){.dark\:bg-red-900\/20:where(.dark,.dark *){background-color:color-mix(in oklab, var(--color-red-900) 20%, transparent)}}.dark\:bg-red-900\/30:where(.dark,.dark *){background-color:#82181a4d}@supports (color:color-mix(in lab, red, red)){.dark\:bg-red-900\/30:where(.dark,.dark *){background-color:color-mix(in oklab, var(--color-red-900) 30%, transparent)}}.dark\:bg-yellow-900\/30:where(.dark,.dark *){background-color:#733e0a4d}@supports (color:color-mix(in lab, red, red)){.dark\:bg-yellow-900\/30:where(.dark,.dark *){background-color:color-mix(in oklab, var(--color-yellow-900) 30%, transparent)}}.dark\:bg-zinc-800:where(.dark,.dark *){background-color:var(--color-zinc-800)}.dark\:text-amber-400:where(.dark,.dark *){color:var(--color-amber-400)}.dark\:text-blue-400:where(.dark,.dark *){color:var(--color-blue-400)}.dark\:text-green-400:where(.dark,.dark *){color:var(--color-green-400)}.dark\:text-red-400:where(.dark,.dark *){color:var(--color-red-400)}.dark\:text-yellow-400:where(.dark,.dark *){color:var(--color-yellow-400)}.dark\:text-zinc-300:where(.dark,.dark *){color:var(--color-zinc-300)}.dark\:text-zinc-400:where(.dark,.dark *){color:var(--color-zinc-400)}.dark\:prose-invert:where(.dark,.dark *){--tw-prose-body:var(--tw-prose-invert-body);--tw-prose-headings:var(--tw-prose-invert-headings);--tw-prose-lead:var(--tw-prose-invert-lead);--tw-prose-links:var(--tw-prose-invert-links);--tw-prose-bold:var(--tw-prose-invert-bold);--tw-prose-counters:var(--tw-prose-invert-counters);--tw-prose-bullets:var(--tw-prose-invert-bullets);--tw-prose-hr:var(--tw-prose-invert-hr);--tw-prose-quotes:var(--tw-prose-invert-quotes);--tw-prose-quote-borders:var(--tw-prose-invert-quote-borders);--tw-prose-captions:var(--tw-prose-invert-captions);--tw-prose-kbd:var(--tw-prose-invert-kbd);--tw-prose-kbd-shadows:var(--tw-prose-invert-kbd-shadows);--tw-prose-code:var(--tw-prose-invert-code);--tw-prose-pre-code:var(--tw-prose-invert-pre-code);--tw-prose-pre-bg:var(--tw-prose-invert-pre-bg);--tw-prose-th-borders:var(--tw-prose-invert-th-borders);--tw-prose-td-borders:var(--tw-prose-invert-td-borders)}.\[\&\>svg\]\:h-auto>svg{height:auto}.\[\&\>svg\]\:max-w-full>svg{max-width:100%}}html,body,#root{height:100%;overflow:hidden}body{font-family:var(--font-sans);background-color:var(--color-background);color:var(--color-foreground)}.prose .anchor{color:var(--color-muted-foreground);opacity:0;margin-left:.4em;text-decoration:none;transition:opacity .15s}.prose h1:hover .anchor,.prose h2:hover .anchor,.prose h3:hover .anchor,.prose h4:hover .anchor,.prose h5:hover .anchor,.prose h6:hover .anchor{opacity:1}.prose h1,.prose h2,.prose h3,.prose h4,.prose h5,.prose h6{position:relative}.prose .frontmatter-block{margin-bottom:2em}.prose pre{background-color:var(--color-muted);color:var(--color-foreground);border:1px solid var(--color-border);border-radius:.5rem;position:relative}.prose pre code{color:inherit}.code-copy-btn{color:#a1a1aa;cursor:pointer;opacity:0;background:#3f3f46cc;border:none;border-radius:.25rem;justify-content:center;align-items:center;padding:.375rem;transition:opacity .15s,color .15s,background .15s;display:flex;position:absolute;top:.5rem;right:.5rem}pre:hover .code-copy-btn{opacity:1}.code-copy-btn:hover{color:#fff;background:#52525be6}.prose code{font-size:.875em}.prose :not(pre)>code{background-color:var(--color-muted);border-radius:.25rem;padding:.125em .375em;font-weight:500}.prose :not(pre)>code:before,.prose :not(pre)>code:after{content:none}.scrollbar-thin{scrollbar-width:thin;scrollbar-color:#fff3 transparent}.scrollbar-thin::-webkit-scrollbar{height:3px}.scrollbar-thin::-webkit-scrollbar-thumb{background:#fff3;border-radius:2px}.scrollbar-thin::-webkit-scrollbar-track{background:0 0}.toc-sidebar{position:sticky;top:1rem;overflow-y:auto}.toc-sidebar a{color:var(--color-muted-foreground);padding:.25rem 0;font-size:.8125rem;line-height:1.4;text-decoration:none;transition:color .15s;display:block}.toc-sidebar a:hover{color:var(--color-foreground)}.toc-sidebar a.active{color:var(--color-foreground);font-weight:600}.embedded-diagram-lazy,.embedded-diagram-loading{border:1px dashed var(--border);color:var(--muted-foreground);border-radius:.5rem;justify-content:center;align-items:center;gap:.5rem;margin:1rem 0;padding:2rem 1rem;font-size:.875rem;display:flex}.diagram-spinner{border:2px solid var(--border);border-top-color:var(--foreground);border-radius:50%;width:1rem;height:1rem;animation:.8s linear infinite diagram-spin}@keyframes diagram-spin{to{transform:rotate(360deg)}}.embedded-diagram-rendered{border:1px solid var(--border);text-align:center;background:#fff;border-radius:.5rem;margin:1rem 0;padding:1rem;overflow-x:auto}.embedded-diagram-rendered svg{max-width:100%;height:auto;display:inline-block}.embedded-diagram-error{background:var(--color-destructive)}@supports (color:color-mix(in lab, red, red)){.embedded-diagram-error{background:color-mix(in srgb, var(--color-destructive) 10%, transparent)}}.embedded-diagram-error{border:1px solid var(--color-destructive);border-radius:.5rem;margin:1rem 0;padding:1rem}.diagram-error-label{color:var(--color-destructive);margin-bottom:.5rem;font-size:.875rem;font-weight:500}.diagram-reload-hint{color:var(--color-muted-foreground);margin-bottom:.5rem;font-size:.8125rem;font-style:italic}.diagram-retry-btn{color:var(--color-foreground);background:var(--color-muted);border:1px solid var(--color-border);cursor:pointer;border-radius:.375rem;align-items:center;gap:.375rem;padding:.375rem .75rem;font-size:.8125rem;font-weight:500;transition:background .15s;display:inline-flex}.diagram-retry-btn:hover{background:var(--color-accent)}.csv-table{border-collapse:collapse;width:100%;font-size:.875rem;line-height:1.5}.csv-table th,.csv-table td{border:1px solid var(--color-border);text-align:left;padding:.5rem .75rem}.csv-table th{background:var(--color-muted);font-weight:600}.csv-table tbody tr:nth-child(2n){background:var(--color-muted)}@supports (color:color-mix(in lab, red, red)){.csv-table tbody tr:nth-child(2n){background:color-mix(in srgb, var(--color-muted) 40%, transparent)}}.frontmatter-collapsible .frontmatter-full{display:none}.frontmatter-collapsible .frontmatter-preview,.frontmatter-collapsible.frontmatter-expanded .frontmatter-full{display:block}.frontmatter-collapsible.frontmatter-expanded .frontmatter-preview{display:none}.frontmatter-toggle{color:var(--color-muted-foreground);cursor:pointer;background:0 0;border:none;padding:.25rem 0;font-size:.75rem}.frontmatter-toggle:hover{text-decoration:underline}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}
@@ -6,9 +6,9 @@
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <meta name="robots" content="noindex, nofollow" />
8
8
  <title>Jeeves Server</title>
9
- <script type="module" crossorigin src="/app/assets/index-DrBXupPz.js"></script>
9
+ <script type="module" crossorigin src="/app/assets/index-BXy6kgl7.js"></script>
10
10
  <link rel="modulepreload" crossorigin href="/app/assets/theme-CPpIxvB0.js">
11
- <link rel="stylesheet" crossorigin href="/app/assets/index-Dk_myGs4.css">
11
+ <link rel="stylesheet" crossorigin href="/app/assets/index-Ch0vkF39.css">
12
12
  </head>
13
13
  <body>
14
14
  <div id="root"></div>
@@ -8,7 +8,8 @@
8
8
  *
9
9
  * @packageDocumentation
10
10
  */
11
- import { createServiceCli } from '@karmaniverous/jeeves';
11
+ import { checkNodeVersion, createServiceCli } from '@karmaniverous/jeeves';
12
+ checkNodeVersion();
12
13
  import { serverDescriptor } from '../descriptor.js';
13
14
  // Type assertion: core's bundled .d.ts doesn't fully resolve the Command
14
15
  // return type for eslint, but the runtime value is a Commander instance.
@@ -8,9 +8,19 @@
8
8
  *
9
9
  * The CLI's `start` command uses this same logic in-process.
10
10
  */
11
+ import { checkNodeVersion, init } from '@karmaniverous/jeeves';
12
+ checkNodeVersion();
11
13
  import { initConfig } from '../config/index.js';
12
- const configIndex = process.argv.indexOf('--config');
13
- const configPath = configIndex !== -1 ? process.argv[configIndex + 1] : undefined;
14
+ function parseArg(name) {
15
+ const idx = process.argv.indexOf(name);
16
+ return idx !== -1 && process.argv[idx + 1]
17
+ ? process.argv[idx + 1]
18
+ : undefined;
19
+ }
20
+ const configPath = parseArg('--config');
21
+ const workspace = parseArg('--workspace') ?? process.env['JEEVES_WORKSPACE'] ?? '.';
22
+ const configRoot = parseArg('--config-root') ?? process.env['JEEVES_CONFIG_ROOT'] ?? './config';
23
+ init({ workspacePath: workspace, configRoot });
14
24
  initConfig(configPath);
15
25
  // Dynamic import to ensure config is initialized before server modules load
16
26
  await import('../server.js');
@@ -10,7 +10,7 @@ import path from 'node:path';
10
10
  import { fileURLToPath } from 'node:url';
11
11
  import { migrateConfigPath } from './migration.js';
12
12
  import { buildRuntimeConfig } from './resolve.js';
13
- import { jeevesConfigSchema } from './schema.js';
13
+ import { DEPRECATED_CONFIG_PROPS, jeevesConfigSchema } from './schema.js';
14
14
  import { substituteEnvVars } from './substituteEnvVars.js';
15
15
  const __dirname = path.dirname(fileURLToPath(import.meta.url));
16
16
  const rootDir = path.resolve(__dirname, '../../..');
@@ -43,7 +43,21 @@ export function loadConfig(configPath) {
43
43
  catch (err) {
44
44
  throw new Error(`Failed to parse config file ${resolvedPath}: ${err instanceof Error ? err.message : String(err)}`, { cause: err });
45
45
  }
46
- const substituted = substituteEnvVars(rawConfig);
46
+ // Strip deprecated v3.6.0 properties before validation
47
+ const cleanedConfig = {};
48
+ for (const [key, value] of Object.entries(rawConfig)) {
49
+ if (DEPRECATED_CONFIG_PROPS.includes(key)) {
50
+ console.warn(`[jeeves-server] Deprecated config property "${key}" ignored. ` +
51
+ `Companion service URLs are now resolved via core config ` +
52
+ `({configRoot}/jeeves-core/config.json services.{name}.url). ` +
53
+ `Bind address is resolved via getBindAddress(). ` +
54
+ `Remove "${key}" from ${resolvedPath} to silence this warning.`);
55
+ }
56
+ else {
57
+ cleanedConfig[key] = value;
58
+ }
59
+ }
60
+ const substituted = substituteEnvVars(cleanedConfig);
47
61
  const parseResult = jeevesConfigSchema.safeParse(substituted);
48
62
  if (!parseResult.success) {
49
63
  const issues = parseResult.error.issues
@@ -1,7 +1,7 @@
1
1
  import fs from 'node:fs';
2
2
  import os from 'node:os';
3
3
  import path from 'node:path';
4
- import { afterEach, beforeEach, describe, expect, it } from 'vitest';
4
+ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
5
5
  import { clearConfig, getConfig, initConfig, loadConfig } from './index.js';
6
6
  const VALID_CONFIG = {
7
7
  port: 9999,
@@ -127,6 +127,71 @@ describe('loadConfig', () => {
127
127
  });
128
128
  });
129
129
  });
130
+ describe('deprecated config property migration', () => {
131
+ let tmpDir;
132
+ beforeEach(() => {
133
+ tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'jeeves-config-'));
134
+ clearConfig();
135
+ });
136
+ afterEach(() => {
137
+ fs.rmSync(tmpDir, { recursive: true, force: true });
138
+ clearConfig();
139
+ });
140
+ it('loads config with deprecated host, watcherUrl, runnerUrl, metaUrl', () => {
141
+ const configWithDeprecated = {
142
+ ...VALID_CONFIG,
143
+ host: '0.0.0.0',
144
+ watcherUrl: 'http://localhost:1936',
145
+ runnerUrl: 'http://localhost:1937',
146
+ metaUrl: 'http://localhost:1938',
147
+ };
148
+ const configPath = writeConfig(tmpDir, configWithDeprecated);
149
+ const config = loadConfig(configPath);
150
+ expect(config.port).toBe(9999);
151
+ });
152
+ it('logs deprecation warnings for each deprecated property', () => {
153
+ const warnSpy = vi.spyOn(console, 'warn').mockImplementation(() => { });
154
+ try {
155
+ const configWithDeprecated = {
156
+ ...VALID_CONFIG,
157
+ host: '0.0.0.0',
158
+ watcherUrl: 'http://localhost:1936',
159
+ runnerUrl: 'http://localhost:1937',
160
+ metaUrl: 'http://localhost:1938',
161
+ };
162
+ const configPath = writeConfig(tmpDir, configWithDeprecated);
163
+ loadConfig(configPath);
164
+ const deprecatedKeys = ['host', 'watcherUrl', 'runnerUrl', 'metaUrl'];
165
+ for (const key of deprecatedKeys) {
166
+ expect(warnSpy.mock.calls.some((call) => typeof call[0] === 'string' && call[0].includes(`"${key}"`))).toBe(true);
167
+ }
168
+ expect(warnSpy).toHaveBeenCalledTimes(4);
169
+ }
170
+ finally {
171
+ warnSpy.mockRestore();
172
+ }
173
+ });
174
+ it('strips deprecated properties from the resulting RuntimeConfig', () => {
175
+ const warnSpy = vi.spyOn(console, 'warn').mockImplementation(() => { });
176
+ try {
177
+ const configWithDeprecated = {
178
+ ...VALID_CONFIG,
179
+ host: '0.0.0.0',
180
+ watcherUrl: 'http://localhost:1936',
181
+ };
182
+ const configPath = writeConfig(tmpDir, configWithDeprecated);
183
+ const config = loadConfig(configPath);
184
+ const configAsRecord = config;
185
+ expect(configAsRecord['host']).toBeUndefined();
186
+ expect(configAsRecord['watcherUrl']).toBeUndefined();
187
+ expect(configAsRecord['runnerUrl']).toBeUndefined();
188
+ expect(configAsRecord['metaUrl']).toBeUndefined();
189
+ }
190
+ finally {
191
+ warnSpy.mockRestore();
192
+ }
193
+ });
194
+ });
130
195
  describe('config singleton', () => {
131
196
  let tmpDir;
132
197
  beforeEach(() => {
@@ -186,7 +186,6 @@ export function buildRuntimeConfig(config, rootDir, configPath) {
186
186
  const resolvedInsiders = resolveInsiders(config.insiders, config.scopes, stateFile);
187
187
  return {
188
188
  port: config.port,
189
- host: config.host,
190
189
  eventTimeoutMs: config.eventTimeoutMs,
191
190
  eventLogPurgeMs: config.eventLogPurgeMs,
192
191
  maxZipSizeMb: config.maxZipSizeMb,
@@ -215,9 +214,6 @@ export function buildRuntimeConfig(config, rootDir, configPath) {
215
214
  googleAuth: config.auth.google ?? null,
216
215
  sessionSecret: config.auth.sessionSecret ?? null,
217
216
  internalInsiderKey: deriveInternalKey(resolvedKeys),
218
- runnerUrl: config.runnerUrl,
219
- watcherUrl: config.watcherUrl,
220
- metaUrl: config.metaUrl,
221
217
  diagramCachePath: config.diagramCachePath,
222
218
  configPath,
223
219
  eventsLog: path.join(rootDir, 'logs', 'webhook-events.jsonl'),
@@ -187,8 +187,6 @@ describe('buildRuntimeConfig', () => {
187
187
  it('constructs correct path fields', () => {
188
188
  const config = {
189
189
  port: 1934,
190
- host: '0.0.0.0',
191
- metaUrl: 'http://127.0.0.1:1938',
192
190
  eventTimeoutMs: 30000,
193
191
  eventLogPurgeMs: 2592000000,
194
192
  maxZipSizeMb: 100,
@@ -1,5 +1,12 @@
1
1
  import { SERVER_PORT } from '@karmaniverous/jeeves';
2
2
  import { z } from 'zod';
3
+ /** Config properties deprecated in v3.6.0 (now resolved via core services). */
4
+ export const DEPRECATED_CONFIG_PROPS = [
5
+ 'host',
6
+ 'runnerUrl',
7
+ 'watcherUrl',
8
+ 'metaUrl',
9
+ ];
3
10
  /** Supported authentication methods */
4
11
  export const authModeSchema = z.enum(['google', 'keys']);
5
12
  /** Google OAuth configuration */
@@ -90,12 +97,6 @@ function getScopeRefs(scopes) {
90
97
  export const jeevesConfigSchema = z
91
98
  .object({
92
99
  port: z.number().int().positive().default(SERVER_PORT),
93
- /**
94
- * Network interface to bind the server to.
95
- * Default: '0.0.0.0' (all interfaces — required for external access by insiders, share links, etc.)
96
- * Set to '127.0.0.1' to restrict to loopback only.
97
- */
98
- host: z.string().min(1).default('0.0.0.0'),
99
100
  chromePath: z.string().min(1),
100
101
  auth: authSchema,
101
102
  /** Named scope definitions, referenced by insiders/keys/outsiderPolicy */
@@ -114,11 +115,6 @@ export const jeevesConfigSchema = z
114
115
  * Default: \{ root: '/' \}
115
116
  */
116
117
  roots: z.record(z.string(), z.string()).optional(),
117
- /**
118
- * URL of the jeeves-runner API for process dashboard proxy.
119
- * Default: 'http://127.0.0.1:1937'
120
- */
121
- runnerUrl: z.url().optional(),
122
118
  /** @deprecated Mermaid is now bundled. This field is ignored but kept for backward compatibility. */
123
119
  mermaidCliPath: z.string().optional(),
124
120
  /**
@@ -141,16 +137,6 @@ export const jeevesConfigSchema = z
141
137
  * Defaults to `.diagram-cache` in the server working directory.
142
138
  */
143
139
  diagramCachePath: z.string().optional(),
144
- /**
145
- * URL of the jeeves-watcher API for semantic search.
146
- * When set, the search UI appears in the header. Example: 'http://127.0.0.1:1936'
147
- */
148
- watcherUrl: z.url().optional(),
149
- /**
150
- * URL of the jeeves-meta API for synthesis engine health checks.
151
- * Default: 'http://127.0.0.1:1938'
152
- */
153
- metaUrl: z.url().default('http://127.0.0.1:1938'),
154
140
  /**
155
141
  * Global outsider policy â€" constrains which paths are eligible for outsider sharing.
156
142
  * Uses the same allow/deny model as insider scopes.
@@ -3,6 +3,8 @@
3
3
  *
4
4
  * Deep-walks config objects and replaces `${VAR_NAME}` patterns with environment variable values.
5
5
  * Ported from jeeves-watcher — candidate for hoisting to shared `@karmaniverous/jeeves-config`.
6
+ *
7
+ * // TODO: replace with core utility when hoisted (see jeeves-core issue for substituteEnvVars hoist)
6
8
  */
7
9
  const ENV_PATTERN = /\$\{([^}]+)\}/g;
8
10
  /**
@@ -5,7 +5,7 @@
5
5
  */
6
6
  import path from 'node:path';
7
7
  import { fileURLToPath } from 'node:url';
8
- import { jeevesComponentDescriptorSchema, SERVER_PORT, } from '@karmaniverous/jeeves';
8
+ import { init, jeevesComponentDescriptorSchema, SERVER_PORT, } from '@karmaniverous/jeeves';
9
9
  import { jeevesConfigSchema } from './config/schema.js';
10
10
  import { packageVersion } from './util/packageVersion.js';
11
11
  const __dirname = path.dirname(fileURLToPath(import.meta.url));
@@ -29,11 +29,18 @@ export const serverDescriptor = jeevesComponentDescriptorSchema.parse({
29
29
  default: 'CHANGE_ME_defaultKey',
30
30
  },
31
31
  }),
32
- onConfigApply: async () => {
32
+ onConfigApply: async (config) => {
33
+ void config; // config argument reserved for future use
33
34
  const { resetConfig } = await import('./config/index.js');
34
35
  resetConfig();
35
36
  },
36
37
  run: async (configPath) => {
38
+ // Ensure core init() runs before server modules that depend on
39
+ // getServiceUrl() / getBindAddress()
40
+ init({
41
+ workspacePath: process.env['JEEVES_WORKSPACE'] ?? '.',
42
+ configRoot: process.env['JEEVES_CONFIG_ROOT'] ?? './config',
43
+ });
37
44
  const { initConfig } = await import('./config/index.js');
38
45
  initConfig(configPath);
39
46
  await import('./server.js');
@@ -32,7 +32,7 @@ export const authStatusRoutes = async (fastify) => {
32
32
  picture,
33
33
  isInsider: !!insider?.seed,
34
34
  keyCreatedAt: insider?.keyCreatedAt ?? null,
35
- searchEnabled: !!config.watcherUrl,
35
+ searchEnabled: true,
36
36
  });
37
37
  }
38
38
  // Try key-based auth
@@ -4,11 +4,52 @@
4
4
  * Handles: GET /api/path/*
5
5
  */
6
6
  import fs from 'node:fs';
7
+ import fsp from 'node:fs/promises';
7
8
  import path from 'node:path';
8
9
  import { _directoryVisibleUnderScopes, _pathMatchesPatterns, _pathMatchesScopes, } from '../../auth/keys.js';
9
10
  import { getConfig } from '../../config/index.js';
10
11
  import { filterBreadcrumbsForOutsider } from '../../util/breadcrumbs.js';
11
12
  import { breadcrumbParts, fsPathToUrl, getRoots, urlPathToFs, } from '../../util/platform.js';
13
+ /**
14
+ * Map a single directory entry to its API representation.
15
+ *
16
+ * Uses async fs operations so the event loop is not blocked
17
+ * when listing large directories.
18
+ */
19
+ export async function mapDirectoryEntry(entry, parentDir) {
20
+ const entryPath = path.join(parentDir, entry.name);
21
+ let size = null;
22
+ let mtime = null;
23
+ let itemCount = null;
24
+ const ext = path.extname(entry.name).toLowerCase();
25
+ try {
26
+ const entryStats = await fsp.stat(entryPath);
27
+ mtime = entryStats.mtime.toISOString().split('T')[0];
28
+ if (entry.isDirectory()) {
29
+ try {
30
+ const children = await fsp.readdir(entryPath);
31
+ itemCount = children.length;
32
+ }
33
+ catch {
34
+ /* permission denied, etc. */
35
+ }
36
+ }
37
+ else {
38
+ size = entryStats.size;
39
+ }
40
+ }
41
+ catch {
42
+ /* ignore */
43
+ }
44
+ return {
45
+ name: entry.name,
46
+ type: entry.isDirectory() ? 'directory' : 'file',
47
+ ext,
48
+ size,
49
+ mtime,
50
+ itemCount,
51
+ };
52
+ }
12
53
  // eslint-disable-next-line @typescript-eslint/require-await
13
54
  export const directoryRoutes = async (fastify) => {
14
55
  const roots = getRoots(getConfig().roots);
@@ -23,7 +64,7 @@ export const directoryRoutes = async (fastify) => {
23
64
  if (!fs.existsSync(resolved)) {
24
65
  return reply.code(404).send({ error: 'Not found', path: resolved });
25
66
  }
26
- const stats = fs.statSync(resolved);
67
+ const stats = await fsp.stat(resolved);
27
68
  if (!stats.isDirectory()) {
28
69
  const ext = path.extname(resolved).toLowerCase();
29
70
  return reply.send({
@@ -36,7 +77,9 @@ export const directoryRoutes = async (fastify) => {
36
77
  }
37
78
  const isInsider = request.accessMode === 'insider';
38
79
  const insiderScopes = request.insiderScopes ?? null;
39
- const allEntries = fs.readdirSync(resolved, { withFileTypes: true });
80
+ const allEntries = await fsp.readdir(resolved, {
81
+ withFileTypes: true,
82
+ });
40
83
  const entries = insiderScopes
41
84
  ? allEntries.filter((entry) => {
42
85
  const entryPath = path.join(resolved, entry.name);
@@ -58,28 +101,7 @@ export const directoryRoutes = async (fastify) => {
58
101
  return 1;
59
102
  return a.name.localeCompare(b.name);
60
103
  });
61
- const result = sorted.map((entry) => {
62
- const entryPath = path.join(resolved, entry.name);
63
- let size = null;
64
- let mtime = null;
65
- const ext = path.extname(entry.name).toLowerCase();
66
- try {
67
- const entryStats = fs.statSync(entryPath);
68
- mtime = entryStats.mtime.toISOString().split('T')[0];
69
- if (!entry.isDirectory())
70
- size = entryStats.size;
71
- }
72
- catch {
73
- /* ignore */
74
- }
75
- return {
76
- name: entry.name,
77
- type: entry.isDirectory() ? 'directory' : 'file',
78
- ext,
79
- size,
80
- mtime,
81
- };
82
- });
104
+ const result = await Promise.all(sorted.map((entry) => mapDirectoryEntry(entry, resolved)));
83
105
  const breadcrumbs = breadcrumbParts(resolved, roots);
84
106
  const matchedPath = request.authMatchedPath ?? null;
85
107
  const filteredBreadcrumbs = filterBreadcrumbsForOutsider(breadcrumbs, isInsider, matchedPath, true);
@@ -0,0 +1,65 @@
1
+ import fs from 'node:fs';
2
+ import os from 'node:os';
3
+ import path from 'node:path';
4
+ import { afterEach, beforeEach, describe, expect, it } from 'vitest';
5
+ import { mapDirectoryEntry } from './directory.js';
6
+ describe('directory entry mapping', () => {
7
+ let tmpDir;
8
+ beforeEach(() => {
9
+ tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'jeeves-dir-'));
10
+ });
11
+ afterEach(() => {
12
+ fs.rmSync(tmpDir, { recursive: true, force: true });
13
+ });
14
+ it('returns itemCount for directory entries', async () => {
15
+ const subDir = path.join(tmpDir, 'sub');
16
+ fs.mkdirSync(subDir);
17
+ fs.writeFileSync(path.join(subDir, 'a.txt'), 'a');
18
+ fs.writeFileSync(path.join(subDir, 'b.txt'), 'b');
19
+ const entries = fs.readdirSync(tmpDir, { withFileTypes: true });
20
+ const dirEntry = entries.find((e) => e.name === 'sub');
21
+ expect(dirEntry).toBeDefined();
22
+ const mapped = await mapDirectoryEntry(dirEntry, tmpDir);
23
+ expect(mapped.type).toBe('directory');
24
+ expect(mapped.itemCount).toBe(2);
25
+ });
26
+ it('returns null itemCount for file entries', async () => {
27
+ fs.writeFileSync(path.join(tmpDir, 'file.txt'), 'content');
28
+ const entries = fs.readdirSync(tmpDir, { withFileTypes: true });
29
+ const fileEntry = entries.find((e) => e.name === 'file.txt');
30
+ expect(fileEntry).toBeDefined();
31
+ const mapped = await mapDirectoryEntry(fileEntry, tmpDir);
32
+ expect(mapped.type).toBe('file');
33
+ expect(mapped.itemCount).toBeNull();
34
+ expect(mapped.size).toBeGreaterThan(0);
35
+ });
36
+ it('counts mixed contents (files + subdirectories)', async () => {
37
+ const subDir = path.join(tmpDir, 'mixed');
38
+ fs.mkdirSync(subDir);
39
+ fs.writeFileSync(path.join(subDir, 'file1.txt'), 'a');
40
+ fs.writeFileSync(path.join(subDir, 'file2.txt'), 'b');
41
+ fs.mkdirSync(path.join(subDir, 'nested'));
42
+ const entries = fs.readdirSync(tmpDir, { withFileTypes: true });
43
+ const dirEntry = entries.find((e) => e.name === 'mixed');
44
+ expect(dirEntry).toBeDefined();
45
+ const mapped = await mapDirectoryEntry(dirEntry, tmpDir);
46
+ expect(mapped.itemCount).toBe(3);
47
+ });
48
+ it('returns null itemCount when directory read fails', async () => {
49
+ const fakeDirent = {
50
+ name: 'nonexistent',
51
+ isDirectory: () => true,
52
+ isFile: () => false,
53
+ isBlockDevice: () => false,
54
+ isCharacterDevice: () => false,
55
+ isFIFO: () => false,
56
+ isSocket: () => false,
57
+ isSymbolicLink: () => false,
58
+ parentPath: tmpDir,
59
+ path: tmpDir,
60
+ };
61
+ const mapped = await mapDirectoryEntry(fakeDirent, tmpDir);
62
+ expect(mapped.itemCount).toBeNull();
63
+ expect(mapped.mtime).toBeNull();
64
+ });
65
+ });
@@ -8,6 +8,7 @@
8
8
  */
9
9
  import fs from 'node:fs';
10
10
  import path from 'node:path';
11
+ import { getBindAddress } from '@karmaniverous/jeeves';
11
12
  import archiver from 'archiver';
12
13
  import { getConfig } from '../../config/index.js';
13
14
  import { appendEvent } from '../../services/eventQueue.js';
@@ -77,7 +78,10 @@ export const exportRoutes = async (fastify) => {
77
78
  return reply
78
79
  .code(500)
79
80
  .send({ error: 'Export unavailable — no internal key configured' });
80
- const exportUrl = `http://127.0.0.1:${String(port)}/browse/${reqPath}?key=${exportKey}&render_diagrams=1&plain_code=1`;
81
+ const bindAddr = getBindAddress('server');
82
+ // Use loopback if bound to all interfaces (0.0.0.0 is not a valid request target)
83
+ const renderHost = bindAddr === '0.0.0.0' ? '127.0.0.1' : bindAddr;
84
+ const exportUrl = `http://${renderHost}:${String(port)}/browse/${reqPath}?key=${exportKey}&render_diagrams=1&plain_code=1`;
81
85
  const fileName = path.basename(resolved);
82
86
  const baseName = fileName.replace(/\.md$/i, '');
83
87
  try {