ghost-api-cli 0.2.0__py3-none-any.whl
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.
- ghost_api/__init__.py +3 -0
- ghost_api/__main__.py +5 -0
- ghost_api/adopt.py +173 -0
- ghost_api/agent/__init__.py +0 -0
- ghost_api/agent/orchestrator.py +413 -0
- ghost_api/agent/prompts.py +149 -0
- ghost_api/agent/tools.py +84 -0
- ghost_api/analysis/__init__.py +0 -0
- ghost_api/analysis/analyzer.py +130 -0
- ghost_api/analysis/detectors.py +188 -0
- ghost_api/analysis/exposure.py +80 -0
- ghost_api/analysis/graphql.py +67 -0
- ghost_api/analysis/models.py +64 -0
- ghost_api/analysis/schema.py +109 -0
- ghost_api/analysis/url_grouping.py +217 -0
- ghost_api/api.py +264 -0
- ghost_api/audit.py +78 -0
- ghost_api/browser/__init__.py +0 -0
- ghost_api/browser/auth_state.py +172 -0
- ghost_api/browser/driver.py +273 -0
- ghost_api/browser/egress.py +183 -0
- ghost_api/browser/gate.py +127 -0
- ghost_api/browser/install.py +28 -0
- ghost_api/browser/snapshot.py +221 -0
- ghost_api/capture/__init__.py +0 -0
- ghost_api/capture/filters.py +255 -0
- ghost_api/capture/har.py +148 -0
- ghost_api/capture/models.py +41 -0
- ghost_api/capture/personal.py +188 -0
- ghost_api/capture/recorder.py +181 -0
- ghost_api/cli/__init__.py +44 -0
- ghost_api/cli/_common.py +219 -0
- ghost_api/cli/client.py +487 -0
- ghost_api/cli/data.py +492 -0
- ghost_api/cli/explore.py +379 -0
- ghost_api/cli/manage.py +437 -0
- ghost_api/config.py +132 -0
- ghost_api/drift.py +344 -0
- ghost_api/drive.py +211 -0
- ghost_api/errors.py +106 -0
- ghost_api/events.py +213 -0
- ghost_api/exitcodes.py +21 -0
- ghost_api/export/__init__.py +71 -0
- ghost_api/export/confidence.py +45 -0
- ghost_api/export/html.py +41 -0
- ghost_api/export/openapi.py +201 -0
- ghost_api/export/report.py +227 -0
- ghost_api/export/site_data.py +196 -0
- ghost_api/export/tabular.py +88 -0
- ghost_api/export/viewer/report.html +286 -0
- ghost_api/generator/__init__.py +221 -0
- ghost_api/generator/cassettes.py +80 -0
- ghost_api/generator/models_gen.py +144 -0
- ghost_api/generator/naming.py +174 -0
- ghost_api/generator/package.py +197 -0
- ghost_api/generator/python_gen.py +172 -0
- ghost_api/generator/spec.py +486 -0
- ghost_api/generator/templates/client.py.j2 +518 -0
- ghost_api/generator/templates/client.test.ts.j2 +106 -0
- ghost_api/generator/templates/client.ts.j2 +339 -0
- ghost_api/generator/templates/models.py.j2 +45 -0
- ghost_api/generator/templates/package_readme.md.j2 +111 -0
- ghost_api/generator/templates/pyproject.toml.j2 +22 -0
- ghost_api/generator/templates/test_client.py.j2 +105 -0
- ghost_api/generator/ts_gen.py +232 -0
- ghost_api/integrations/__init__.py +0 -0
- ghost_api/integrations/claude_code/commands/ghost-data.md +10 -0
- ghost_api/integrations/claude_code/commands/ghost-diff.md +10 -0
- ghost_api/integrations/claude_code/commands/ghost-explore.md +10 -0
- ghost_api/integrations/claude_code/skills/ghost-api/SKILL.md +46 -0
- ghost_api/integrations/setup.py +84 -0
- ghost_api/llm/__init__.py +0 -0
- ghost_api/llm/doctor.py +60 -0
- ghost_api/llm/gateway.py +476 -0
- ghost_api/llm/providers.py +124 -0
- ghost_api/memory/__init__.py +0 -0
- ghost_api/memory/knowledge.py +157 -0
- ghost_api/memory/store.py +883 -0
- ghost_api/net.py +235 -0
- ghost_api/netguard.py +203 -0
- ghost_api/pipeline.py +745 -0
- ghost_api/probe/__init__.py +0 -0
- ghost_api/probe/prober.py +311 -0
- ghost_api/probe/replay.py +313 -0
- ghost_api/project.py +186 -0
- ghost_api/py.typed +0 -0
- ghost_api/runtime.py +397 -0
- ghost_api/serve/__init__.py +101 -0
- ghost_api/serve/explorer_mcp.py +305 -0
- ghost_api/serve/mcp.py +121 -0
- ghost_api/serve/mock.py +130 -0
- ghost_api/serve/rest.py +132 -0
- ghost_api/site.py +84 -0
- ghost_api/specdiff.py +122 -0
- ghost_api/ui/__init__.py +0 -0
- ghost_api/ui/keys.py +134 -0
- ghost_api/ui/repl.py +453 -0
- ghost_api/ui/terminal.py +573 -0
- ghost_api/verify/__init__.py +0 -0
- ghost_api/verify/classify.py +84 -0
- ghost_api/verify/repair.py +40 -0
- ghost_api/verify/runner.py +110 -0
- ghost_api/verify/verifier.py +291 -0
- ghost_api/watch.py +313 -0
- ghost_api/web/__init__.py +1 -0
- ghost_api/web/server.py +690 -0
- ghost_api/web/static/assets/Endpoints-zPnjlcM8.js +46 -0
- ghost_api/web/static/assets/Run-D85zWHey.js +91 -0
- ghost_api/web/static/assets/Settings-D0aWHFAt.js +11 -0
- ghost_api/web/static/assets/Site-a88shEmP.js +71 -0
- ghost_api/web/static/assets/Watches-CqZWIa9G.js +16 -0
- ghost_api/web/static/assets/circle-x-BcTE_1tr.js +11 -0
- ghost_api/web/static/assets/index-Ds2e5B9f.js +141 -0
- ghost_api/web/static/assets/index-xQpyIBbG.css +1 -0
- ghost_api/web/static/assets/minus-C2xqP1eQ.js +6 -0
- ghost_api/web/static/assets/refresh-cw-CxdR_8Oi.js +6 -0
- ghost_api/web/static/favicon.svg +1 -0
- ghost_api/web/static/index.html +26 -0
- ghost_api/workflows.py +203 -0
- ghost_api_cli-0.2.0.dist-info/METADATA +1019 -0
- ghost_api_cli-0.2.0.dist-info/RECORD +125 -0
- ghost_api_cli-0.2.0.dist-info/WHEEL +5 -0
- ghost_api_cli-0.2.0.dist-info/entry_points.txt +2 -0
- ghost_api_cli-0.2.0.dist-info/licenses/LICENSE +21 -0
- ghost_api_cli-0.2.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */@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-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction: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-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-content:"";--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}}}@layer theme{:root,:host{--font-sans:Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;--font-mono:"JetBrains Mono", "Cascadia Code", "SF Mono", ui-monospace, Consolas, monospace;--color-white:#fff;--spacing:.25rem;--container-md:28rem;--container-3xl:48rem;--container-4xl:56rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--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: 1.2 ;--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5 / 2.25);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wider:.05em;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--aspect-video:16 / 9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;--default-mono-font-family:"JetBrains Mono", "Cascadia Code", "SF Mono", ui-monospace, Consolas, monospace}}@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%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, 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;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:where(:not(iframe)){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]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.top-0{top:0}.z-20{z-index:20}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.mx-1{margin-inline:var(--spacing)}.mx-auto{margin-inline:auto}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-auto{margin-top:auto}.-mb-px{margin-bottom:-1px}.mb-1{margin-bottom:var(--spacing)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.ml-1{margin-left:var(--spacing)}.ml-1\.5{margin-left:calc(var(--spacing) * 1.5)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-flex{display:inline-flex}.aspect-video{aspect-ratio:var(--aspect-video)}.size-1\.5{width:calc(var(--spacing) * 1.5);height:calc(var(--spacing) * 1.5)}.size-2\.5{width:calc(var(--spacing) * 2.5);height:calc(var(--spacing) * 2.5)}.size-3{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.size-3\.5{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-5{width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5)}.size-7{width:calc(var(--spacing) * 7);height:calc(var(--spacing) * 7)}.size-8{width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8)}.size-full{width:100%;height:100%}.h-6{height:calc(var(--spacing) * 6)}.h-10{height:calc(var(--spacing) * 10)}.h-14{height:calc(var(--spacing) * 14)}.h-40{height:calc(var(--spacing) * 40)}.h-96{height:calc(var(--spacing) * 96)}.h-\[32rem\]{height:32rem}.h-full{height:100%}.h-px{height:1px}.max-h-\[32rem\]{max-height:32rem}.max-h-\[75vh\]{max-height:75vh}.min-h-0{min-height:0}.min-h-screen{min-height:100vh}.w-3\/5{width:60%}.w-4{width:calc(var(--spacing) * 4)}.w-4\/5{width:80%}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-72{width:calc(var(--spacing) * 72)}.w-\[18px\]{width:18px}.w-full{width:100%}.w-px{width:1px}.max-w-3xl{max-width:var(--container-3xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-\[1280px\]{max-width:1280px}.max-w-\[1440px\]{max-width:1440px}.max-w-md{max-width:var(--container-md)}.max-w-none{max-width:none}.min-w-0{min-width:0}.min-w-12{min-width:calc(var(--spacing) * 12)}.min-w-\[14rem\]{min-width:14rem}.flex-1{flex:1}.shrink-0{flex-shrink:0}.rotate-90{rotate:90deg}.rotate-180{rotate:180deg}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-pointer{cursor:pointer}.scroll-mt-20{scroll-margin-top:calc(var(--spacing) * 20)}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-\[minmax\(0\,1fr\)\]{grid-template-columns:minmax(0,1fr)}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-6{gap:calc(var(--spacing) * 6)}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}: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-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 5) * 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)))}.gap-x-1{column-gap:var(--spacing)}.gap-x-2{column-gap:calc(var(--spacing) * 2)}.gap-x-3{column-gap:calc(var(--spacing) * 3)}.gap-y-1{row-gap:var(--spacing)}.gap-y-2{row-gap:calc(var(--spacing) * 2)}: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-line>:not(:last-child)){border-color:var(--line)}.self-end{align-self:flex-end}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.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-r{border-right-style:var(--tw-border-style);border-right-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-accent{border-color:var(--accent)}.border-bad\/40{border-color:var(--bad)}@supports (color:color-mix(in lab,red,red)){.border-bad\/40{border-color:color-mix(in oklab,var(--bad) 40%,transparent)}}.border-line,.border-line\/70{border-color:var(--line)}@supports (color:color-mix(in lab,red,red)){.border-line\/70{border-color:color-mix(in oklab,var(--line) 70%,transparent)}}.border-ok\/40{border-color:var(--ok)}@supports (color:color-mix(in lab,red,red)){.border-ok\/40{border-color:color-mix(in oklab,var(--ok) 40%,transparent)}}.border-transparent{border-color:#0000}.border-warn\/40{border-color:var(--warn)}@supports (color:color-mix(in lab,red,red)){.border-warn\/40{border-color:color-mix(in oklab,var(--warn) 40%,transparent)}}.bg-accent{background-color:var(--accent)}.bg-accent-soft,.bg-accent-soft\/60{background-color:var(--accent-soft)}@supports (color:color-mix(in lab,red,red)){.bg-accent-soft\/60{background-color:color-mix(in oklab,var(--accent-soft) 60%,transparent)}}.bg-accent\/50{background-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.bg-accent\/50{background-color:color-mix(in oklab,var(--accent) 50%,transparent)}}.bg-bad,.bg-bad\/5{background-color:var(--bad)}@supports (color:color-mix(in lab,red,red)){.bg-bad\/5{background-color:color-mix(in oklab,var(--bad) 5%,transparent)}}.bg-bad\/10{background-color:var(--bad)}@supports (color:color-mix(in lab,red,red)){.bg-bad\/10{background-color:color-mix(in oklab,var(--bad) 10%,transparent)}}.bg-bad\/15{background-color:var(--bad)}@supports (color:color-mix(in lab,red,red)){.bg-bad\/15{background-color:color-mix(in oklab,var(--bad) 15%,transparent)}}.bg-bad\/60{background-color:var(--bad)}@supports (color:color-mix(in lab,red,red)){.bg-bad\/60{background-color:color-mix(in oklab,var(--bad) 60%,transparent)}}.bg-bg,.bg-bg\/80{background-color:var(--bg)}@supports (color:color-mix(in lab,red,red)){.bg-bg\/80{background-color:color-mix(in oklab,var(--bg) 80%,transparent)}}.bg-bg\/85{background-color:var(--bg)}@supports (color:color-mix(in lab,red,red)){.bg-bg\/85{background-color:color-mix(in oklab,var(--bg) 85%,transparent)}}.bg-info\/15{background-color:var(--info)}@supports (color:color-mix(in lab,red,red)){.bg-info\/15{background-color:color-mix(in oklab,var(--info) 15%,transparent)}}.bg-line{background-color:var(--line)}.bg-ok\/15{background-color:var(--ok)}@supports (color:color-mix(in lab,red,red)){.bg-ok\/15{background-color:color-mix(in oklab,var(--ok) 15%,transparent)}}.bg-ok\/60{background-color:var(--ok)}@supports (color:color-mix(in lab,red,red)){.bg-ok\/60{background-color:color-mix(in oklab,var(--ok) 60%,transparent)}}.bg-surface{background-color:var(--surface)}.bg-surface-2,.bg-surface-2\/40{background-color:var(--surface-2)}@supports (color:color-mix(in lab,red,red)){.bg-surface-2\/40{background-color:color-mix(in oklab,var(--surface-2) 40%,transparent)}}.bg-surface-2\/50{background-color:var(--surface-2)}@supports (color:color-mix(in lab,red,red)){.bg-surface-2\/50{background-color:color-mix(in oklab,var(--surface-2) 50%,transparent)}}.bg-surface-2\/60{background-color:var(--surface-2)}@supports (color:color-mix(in lab,red,red)){.bg-surface-2\/60{background-color:color-mix(in oklab,var(--surface-2) 60%,transparent)}}.bg-transparent{background-color:#0000}.bg-warn\/5{background-color:var(--warn)}@supports (color:color-mix(in lab,red,red)){.bg-warn\/5{background-color:color-mix(in oklab,var(--warn) 5%,transparent)}}.bg-warn\/10{background-color:var(--warn)}@supports (color:color-mix(in lab,red,red)){.bg-warn\/10{background-color:color-mix(in oklab,var(--warn) 10%,transparent)}}.bg-warn\/15{background-color:var(--warn)}@supports (color:color-mix(in lab,red,red)){.bg-warn\/15{background-color:color-mix(in oklab,var(--warn) 15%,transparent)}}.bg-warn\/60{background-color:var(--warn)}@supports (color:color-mix(in lab,red,red)){.bg-warn\/60{background-color:color-mix(in oklab,var(--warn) 60%,transparent)}}.object-contain{object-fit:contain}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.px-0{padding-inline:0}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.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-3\.5{padding-block:calc(var(--spacing) * 3.5)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-px{padding-block:1px}.pt-2{padding-top:calc(var(--spacing) * 2)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pl-2{padding-left:calc(var(--spacing) * 2)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.align-top{vertical-align:top}.font-mono{font-family:JetBrains Mono,Cascadia Code,SF Mono,ui-monospace,Consolas,monospace}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--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-\[0\.85em\]{font-size:.85em}.text-\[11px\]{font-size:11px}.text-\[12\.5px\]{font-size:12.5px}.text-\[13px\]{font-size:13px}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.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-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-accent{color:var(--accent)}.text-bad{color:var(--bad)}.text-fg{color:var(--fg)}.text-info{color:var(--info)}.text-muted{color:var(--muted)}.text-ok{color:var(--ok)}.text-warn{color:var(--warn)}.text-white{color:var(--color-white)}.uppercase{text-transform:uppercase}.italic{font-style:italic}.not-italic{font-style:normal}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.decoration-muted\/50{-webkit-text-decoration-color:var(--muted);text-decoration-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.decoration-muted\/50{-webkit-text-decoration-color:color-mix(in oklab,var(--muted) 50%,transparent);text-decoration-color:color-mix(in oklab,var(--muted) 50%,transparent)}}.accent-\[var\(--accent\)\]{accent-color:var(--accent)}.opacity-90{opacity:.9}.shadow-\[0_0_0_4px_color-mix\(in_oklab\,var\(--accent\)_25\%\,transparent\)\]{--tw-shadow:0 0 0 4px var(--tw-shadow-color,var(--accent))}@supports (color:color-mix(in lab,red,red)){.shadow-\[0_0_0_4px_color-mix\(in_oklab\,var\(--accent\)_25\%\,transparent\)\]{--tw-shadow:0 0 0 4px var(--tw-shadow-color,color-mix(in oklab,var(--accent) 25%,transparent))}}.shadow-\[0_0_0_4px_color-mix\(in_oklab\,var\(--accent\)_25\%\,transparent\)\]{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[var\(--shadow-card\)\]{--tw-shadow:var(--shadow-card);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--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)}.ring-accent\/20{--tw-ring-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.ring-accent\/20{--tw-ring-color:color-mix(in oklab, var(--accent) 20%, transparent)}}.backdrop-blur{--tw-backdrop-blur:blur(8px);-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{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;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))}.outline-none{--tw-outline-style:none;outline-style:none}@media(hover:hover){.group-hover\:text-accent:is(:where(.group):hover *){color:var(--accent)}}.placeholder\:text-muted::placeholder{color:var(--muted)}.before\:absolute:before{content:var(--tw-content);position:absolute}.before\:top-2:before{content:var(--tw-content);top:calc(var(--spacing) * 2)}.before\:bottom-2:before{content:var(--tw-content);bottom:calc(var(--spacing) * 2)}.before\:-left-3:before{content:var(--tw-content);left:calc(var(--spacing) * -3)}.before\:hidden:before{content:var(--tw-content);display:none}.before\:w-1:before{content:var(--tw-content);width:var(--spacing)}.before\:rounded-full:before{content:var(--tw-content);border-radius:3.40282e38px}.before\:bg-accent:before{content:var(--tw-content);background-color:var(--accent)}.focus-within\:border-accent:focus-within{border-color:var(--accent)}.focus-within\:ring-2:focus-within{--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-within\:ring-accent\/20:focus-within{--tw-ring-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.focus-within\:ring-accent\/20:focus-within{--tw-ring-color:color-mix(in oklab, var(--accent) 20%, transparent)}}@media(hover:hover){.hover\:border-accent:hover,.hover\:border-accent\/50:hover{border-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.hover\:border-accent\/50:hover{border-color:color-mix(in oklab,var(--accent) 50%,transparent)}}.hover\:bg-bad\/10:hover{background-color:var(--bad)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-bad\/10:hover{background-color:color-mix(in oklab,var(--bad) 10%,transparent)}}.hover\:bg-surface-2:hover,.hover\:bg-surface-2\/60:hover{background-color:var(--surface-2)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-surface-2\/60:hover{background-color:color-mix(in oklab,var(--surface-2) 60%,transparent)}}.hover\:bg-transparent:hover{background-color:#0000}.hover\:text-accent:hover{color:var(--accent)}.hover\:text-fg:hover{color:var(--fg)}.hover\:underline:hover{text-decoration-line:underline}.hover\:brightness-110:hover{--tw-brightness:brightness(110%);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,)}}.focus\:border-accent:focus{border-color:var(--accent)}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}@media(min-width:40rem){.sm\:block{display:block}.sm\:w-6{width:calc(var(--spacing) * 6)}.sm\:w-14{width:calc(var(--spacing) * 14)}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:grid-cols-\[8rem_1fr\]{grid-template-columns:8rem 1fr}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:justify-end{justify-content:flex-end}.sm\:gap-4{gap:calc(var(--spacing) * 4)}.sm\:p-4{padding:calc(var(--spacing) * 4)}.sm\:p-5{padding:calc(var(--spacing) * 5)}.sm\:p-6{padding:calc(var(--spacing) * 6)}.sm\:text-right{text-align:right}.sm\:text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.sm\:text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}}@media(min-width:48rem){.md\:grid{display:grid}.md\:hidden{display:none}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(min-width:64rem){.lg\:sticky{position:sticky}.lg\:top-0{top:0}.lg\:top-20{top:calc(var(--spacing) * 20)}.lg\:block{display:block}.lg\:flex{display:flex}.lg\:grid{display:grid}.lg\:hidden{display:none}.lg\:inline{display:inline}.lg\:h-\[calc\(100vh-15rem\)\]{height:calc(100vh - 15rem)}.lg\:h-screen{height:100vh}.lg\:max-h-\[calc\(100vh-7rem\)\]{max-height:calc(100vh - 7rem)}.lg\:max-h-none{max-height:none}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.lg\:grid-cols-\[14rem_minmax\(0\,1fr\)\]{grid-template-columns:14rem minmax(0,1fr)}.lg\:grid-cols-\[15rem_minmax\(0\,1fr\)\]{grid-template-columns:15rem minmax(0,1fr)}.lg\:grid-cols-\[minmax\(0\,1\.15fr\)_minmax\(0\,1fr\)_minmax\(0\,0\.8fr\)\]{grid-template-columns:minmax(0,1.15fr) minmax(0,1fr) minmax(0,.8fr)}.lg\:grid-cols-\[minmax\(0\,5fr\)_minmax\(0\,7fr\)\]{grid-template-columns:minmax(0,5fr) minmax(0,7fr)}.lg\:grid-cols-\[minmax\(0\,22rem\)_minmax\(0\,1fr\)\]{grid-template-columns:minmax(0,22rem) minmax(0,1fr)}.lg\:flex-col{flex-direction:column}.lg\:gap-6{gap:calc(var(--spacing) * 6)}.lg\:overflow-y-auto{overflow-y:auto}.lg\:px-6{padding-inline:calc(var(--spacing) * 6)}.lg\:px-8{padding-inline:calc(var(--spacing) * 8)}.lg\:py-6{padding-block:calc(var(--spacing) * 6)}.lg\:py-8{padding-block:calc(var(--spacing) * 8)}.lg\:pr-1{padding-right:var(--spacing)}.lg\:before\:block:before{content:var(--tw-content);display:block}}.dark\:text-\[\#0a0f20\]:where(.dark,.dark *){color:#0a0f20}}:root{--bg:#eef2fb;--surface:#fff;--surface-2:#e6ecfa;--line:#d9e1f4;--fg:#0e1530;--muted:#4f5b7c;--accent:#2f55d4;--accent-soft:#dce5ff;--ok:#15803d;--warn:#b45309;--bad:#dc2626;--info:#2563eb;--shadow-card:0 1px 2px #14245a0d, 0 6px 20px -8px #14245a1a}.dark{--bg:#0a0f20;--surface:#111933;--surface-2:#19234a;--line:#25315f;--fg:#e9edfb;--muted:#9aa6cc;--accent:#86a2ff;--accent-soft:#1c2b66;--ok:#4ade80;--warn:#fbbf24;--bad:#f87171;--info:#60a5fa;--shadow-card:0 1px 2px #0000004d}html,body,#root{min-height:100%}body{background:var(--bg);color:var(--fg);font-family:var(--font-sans);-webkit-font-smoothing:antialiased}:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:6px}@media(prefers-reduced-motion:reduce){*,:before,:after{transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}.hljs{color:var(--fg);background:0 0}.hljs-keyword,.hljs-built_in,.hljs-selector-tag{color:var(--accent)}.hljs-string,.hljs-attr+.hljs-string{color:var(--ok)}.hljs-number,.hljs-literal{color:var(--warn)}.hljs-comment,.hljs-meta{color:var(--muted);font-style:italic}.hljs-title,.hljs-title.function_,.hljs-title.class_{color:var(--info)}.hljs-attr,.hljs-property,.hljs-variable,.hljs-params{color:var(--fg)}.hljs-type{color:var(--info)}.hljs-section,.hljs-strong{font-weight:600}.prose-ghost h1{margin:0 0 .75rem;font-size:1.5rem;font-weight:700}.prose-ghost h2{margin:1.6rem 0 .6rem;font-size:1.15rem;font-weight:650}.prose-ghost h3{margin:1.2rem 0 .4rem;font-weight:600}.prose-ghost p,.prose-ghost li{color:var(--fg);line-height:1.65}.prose-ghost ul{margin:.4rem 0;padding-left:1.3rem;list-style:outside}.prose-ghost ol{margin:.4rem 0;padding-left:1.3rem;list-style:decimal}.prose-ghost code{font-family:var(--font-mono);background:var(--surface-2);border-radius:.35rem;padding:.1rem .35rem;font-size:.85em}.prose-ghost table{border-collapse:collapse;width:100%;margin:.8rem 0;font-size:.875rem;display:block;overflow-x:auto}.prose-ghost th,.prose-ghost td{border-bottom:1px solid var(--line);text-align:left;white-space:nowrap;padding:.45rem .6rem}.prose-ghost th{color:var(--muted);font-weight:600}.prose-ghost hr{border-color:var(--line);margin:1.5rem 0}.prose-ghost em{color:var(--muted)}@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-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{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-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-content{syntax:"*";inherits:false;initial-value:""}@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}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{c as s}from"./index-Ds2e5B9f.js";/**
|
|
2
|
+
* @license lucide-react v0.468.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const c=s("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);export{c as M};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{c as e}from"./index-Ds2e5B9f.js";/**
|
|
2
|
+
* @license lucide-react v0.468.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const t=e("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);export{t as R};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><path fill="#2f55d4" d="M32 4C19.3 4 10 13.8 10 26.5V56c0 2.2 2.5 3.4 4.2 2l4.3-3.5a2.6 2.6 0 0 1 3.3 0l4.6 3.8a2.6 2.6 0 0 0 3.3 0l4.6-3.8a2.6 2.6 0 0 1 3.3 0l4.6 3.8a2.6 2.6 0 0 0 3.3 0l4.3-3.5c1.7-1.4 4.2-.2 4.2 2V26.5C54 13.8 44.7 4 32 4Z"/><circle cx="24" cy="28" r="4.5" fill="#ffffff"/><circle cx="40" cy="28" r="4.5" fill="#ffffff"/></svg>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
+
<meta name="color-scheme" content="dark light" />
|
|
7
|
+
<title>Ghost API</title>
|
|
8
|
+
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
|
|
9
|
+
<script>
|
|
10
|
+
// The server replaces this with a token made at launch (see ghost_api/web/server.py).
|
|
11
|
+
window.GHOST_TOKEN = "__GHOST_TOKEN__";
|
|
12
|
+
// Apply the saved theme before the first paint, so the page doesn't flash.
|
|
13
|
+
(function () {
|
|
14
|
+
var saved = null;
|
|
15
|
+
try { saved = localStorage.getItem("ghost-theme"); } catch (e) {}
|
|
16
|
+
var dark = saved ? saved === "dark" : !window.matchMedia("(prefers-color-scheme: light)").matches;
|
|
17
|
+
document.documentElement.classList.toggle("dark", dark);
|
|
18
|
+
})();
|
|
19
|
+
</script>
|
|
20
|
+
<script type="module" crossorigin src="/assets/index-Ds2e5B9f.js"></script>
|
|
21
|
+
<link rel="stylesheet" crossorigin href="/assets/index-xQpyIBbG.css">
|
|
22
|
+
</head>
|
|
23
|
+
<body>
|
|
24
|
+
<div id="root"></div>
|
|
25
|
+
</body>
|
|
26
|
+
</html>
|
ghost_api/workflows.py
ADDED
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
"""The run and refresh workflows, shared by the command line and the Python API.
|
|
2
|
+
|
|
3
|
+
Everything a caller sees comes through the EventBus (a terminal renderer, the dashboard,
|
|
4
|
+
or `RunCollector` for a plain result). Problems a caller must handle are exceptions:
|
|
5
|
+
`NotAllowed` (robots.txt), `NoLLMKey`, `NothingRemembered`.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
import time
|
|
11
|
+
from collections.abc import Callable
|
|
12
|
+
from dataclasses import replace
|
|
13
|
+
from pathlib import Path
|
|
14
|
+
from typing import Any
|
|
15
|
+
from urllib.parse import urlsplit
|
|
16
|
+
|
|
17
|
+
from ghost_api.config import Settings, state_dir
|
|
18
|
+
from ghost_api.events import (
|
|
19
|
+
ClientGenerated,
|
|
20
|
+
EndpointsUpdated,
|
|
21
|
+
EventBus,
|
|
22
|
+
NetworkSummary,
|
|
23
|
+
Notice,
|
|
24
|
+
RunFinished,
|
|
25
|
+
RunStarted,
|
|
26
|
+
)
|
|
27
|
+
from ghost_api.llm.gateway import LLMGateway
|
|
28
|
+
from ghost_api.llm.providers import default_providers
|
|
29
|
+
from ghost_api.memory.knowledge import load_memory, memory_prompt
|
|
30
|
+
from ghost_api.memory.store import Store
|
|
31
|
+
from ghost_api.net import RateLimiter
|
|
32
|
+
from ghost_api.pipeline import (
|
|
33
|
+
RunOptions,
|
|
34
|
+
explore_site,
|
|
35
|
+
finish,
|
|
36
|
+
open_session,
|
|
37
|
+
refresh_site,
|
|
38
|
+
robots_policy,
|
|
39
|
+
)
|
|
40
|
+
from ghost_api.project import SitePolicy, site_policy
|
|
41
|
+
from ghost_api.site import site_host, site_key
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class NotAllowed(Exception):
|
|
45
|
+
"""robots.txt (or the site) does not allow the start page."""
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
class PolicyBlocked(NotAllowed):
|
|
49
|
+
"""The project's rules for this site (ghost-api.toml) don't allow it."""
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def enforce(site: str, use_agent: bool) -> SitePolicy:
|
|
53
|
+
"""The site's project rules; raises PolicyBlocked when they forbid this run."""
|
|
54
|
+
policy, require_terms = site_policy(site)
|
|
55
|
+
if require_terms and not policy.terms_ok:
|
|
56
|
+
raise PolicyBlocked(
|
|
57
|
+
f"This project asks for each site's terms to be checked first: add "
|
|
58
|
+
f'[sites."{site}"] terms_ok = true to ghost-api.toml once you have.'
|
|
59
|
+
)
|
|
60
|
+
if use_agent and not policy.agent:
|
|
61
|
+
raise PolicyBlocked(
|
|
62
|
+
f"The project rules say no AI explores {site} (agent = false): run with "
|
|
63
|
+
"--no-agent, or record it in your browser and use ghost-api import."
|
|
64
|
+
)
|
|
65
|
+
return policy
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def capped(opts: RunOptions, policy: SitePolicy) -> RunOptions:
|
|
69
|
+
if policy.max_direct_calls is None:
|
|
70
|
+
return opts
|
|
71
|
+
return replace(opts, max_probes=min(opts.max_probes, policy.max_direct_calls))
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
class NoLLMKey(Exception):
|
|
75
|
+
"""The agent was asked for, but no LLM provider has a key."""
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
class NothingRemembered(Exception):
|
|
79
|
+
"""A refresh for a site that was never explored."""
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
class RunCollector:
|
|
83
|
+
"""Collects a run's outcome from its events: subscribe it to the bus."""
|
|
84
|
+
|
|
85
|
+
def __init__(self) -> None:
|
|
86
|
+
self.data: dict[str, Any] = {"status": "failed", "endpoints": [], "client": None}
|
|
87
|
+
|
|
88
|
+
def __call__(self, event: Any) -> None:
|
|
89
|
+
if isinstance(event, RunStarted):
|
|
90
|
+
self.data.update(run_id=event.run_id, site=event.domain, url=event.start_url)
|
|
91
|
+
elif isinstance(event, EndpointsUpdated):
|
|
92
|
+
self.data["endpoints"] = event.endpoints
|
|
93
|
+
elif isinstance(event, ClientGenerated):
|
|
94
|
+
self.data["client"] = event.to_dict()
|
|
95
|
+
elif isinstance(event, NetworkSummary):
|
|
96
|
+
network = event.to_dict()
|
|
97
|
+
network.pop("type", None)
|
|
98
|
+
self.data["network"] = network
|
|
99
|
+
elif isinstance(event, RunFinished):
|
|
100
|
+
finished = event.to_dict()
|
|
101
|
+
finished.pop("type", None)
|
|
102
|
+
finished["endpoint_count"] = finished.pop("endpoints") # the list stays in "endpoints"
|
|
103
|
+
self.data.update(finished)
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
def make_gateway(max_calls: int, required: bool) -> LLMGateway | None:
|
|
107
|
+
gateway = LLMGateway(
|
|
108
|
+
default_providers(), max_calls=max_calls, cooldown_file=state_dir() / "cooldowns.json"
|
|
109
|
+
)
|
|
110
|
+
if gateway.providers:
|
|
111
|
+
return gateway
|
|
112
|
+
if required:
|
|
113
|
+
raise NoLLMKey(
|
|
114
|
+
"No LLM API key found. Add one to .env (or run `ghost-api init`), or explore "
|
|
115
|
+
"without the agent (the page is only loaded and scrolled)."
|
|
116
|
+
)
|
|
117
|
+
return None
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
def run(
|
|
121
|
+
settings: Settings,
|
|
122
|
+
opts: RunOptions,
|
|
123
|
+
bus: EventBus,
|
|
124
|
+
*,
|
|
125
|
+
use_agent: bool = True,
|
|
126
|
+
ask_user: Callable[[str], str] | None = None,
|
|
127
|
+
stop: Callable[[], bool] | None = None,
|
|
128
|
+
started_hook: Callable[[], None] | None = None,
|
|
129
|
+
) -> str:
|
|
130
|
+
"""Explore a site, test what was found, write the client and report. Returns the run's
|
|
131
|
+
status. `started_hook`: called once the checks passed (e.g. to start a live display)."""
|
|
132
|
+
host = urlsplit(settings.url).hostname or ""
|
|
133
|
+
opts = capped(opts, enforce(site_key(settings.url) or host, use_agent))
|
|
134
|
+
limiter = RateLimiter(settings.rate_limit)
|
|
135
|
+
robots, allowed = robots_policy(settings.url, settings.ignore_robots, limiter, bus)
|
|
136
|
+
if not allowed:
|
|
137
|
+
raise NotAllowed(f"robots.txt does not allow {settings.url}")
|
|
138
|
+
gateway = make_gateway(settings.max_llm_calls, required=True) if use_agent else None
|
|
139
|
+
with Store(settings.db_path) as store:
|
|
140
|
+
if started_hook is not None:
|
|
141
|
+
started_hook()
|
|
142
|
+
s = open_session(
|
|
143
|
+
store, bus, host, settings.url, settings.goal, settings.headed, limiter, robots,
|
|
144
|
+
gateway, opts.max_probes, screens_root=settings.db_path, lang=settings.lang,
|
|
145
|
+
) # fmt: skip
|
|
146
|
+
if stop is not None:
|
|
147
|
+
s.stop = stop
|
|
148
|
+
s.third_party_robots = opts.third_party_robots
|
|
149
|
+
known = load_memory(store, s.site)
|
|
150
|
+
if known is not None:
|
|
151
|
+
s.memory = memory_prompt(known.endpoints, known.lessons)
|
|
152
|
+
bus.emit(Notice(f"Using memory: {len(known.endpoints)} known endpoints, "
|
|
153
|
+
f"{len(known.lessons)} lessons")) # fmt: skip
|
|
154
|
+
started = time.monotonic()
|
|
155
|
+
status, reason = explore_site(s, opts, use_agent=gateway is not None, ask_user=ask_user)
|
|
156
|
+
finish(s, status, reason, started, opts)
|
|
157
|
+
return status
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
def refresh(
|
|
161
|
+
db_path: Path,
|
|
162
|
+
site: str,
|
|
163
|
+
opts: RunOptions,
|
|
164
|
+
bus: EventBus,
|
|
165
|
+
*,
|
|
166
|
+
use_llm: bool = True,
|
|
167
|
+
max_llm_calls: int = 20,
|
|
168
|
+
rate_limit: float = 1.0,
|
|
169
|
+
ignore_robots: bool = False,
|
|
170
|
+
stop: Callable[[], bool] | None = None,
|
|
171
|
+
started_hook: Callable[[], None] | None = None,
|
|
172
|
+
) -> tuple[str, int, int]:
|
|
173
|
+
"""Re-check a known site from memory. Returns (status, LLM calls now, on the first run)."""
|
|
174
|
+
policy = enforce(site, use_agent=False)
|
|
175
|
+
opts = capped(opts, policy)
|
|
176
|
+
use_llm = use_llm and policy.agent # agent = false: replays and plain visits only
|
|
177
|
+
with Store(db_path) as store:
|
|
178
|
+
mem = load_memory(store, site)
|
|
179
|
+
if mem is None:
|
|
180
|
+
raise NothingRemembered(f"Nothing remembered for {site}. Run `ghost-api run` first.")
|
|
181
|
+
bus.emit(Notice(f"Refreshing {site} from memory: {len(mem.endpoints)} endpoint(s), "
|
|
182
|
+
f"{len(mem.lessons)} lesson(s)")) # fmt: skip
|
|
183
|
+
limiter = RateLimiter(rate_limit)
|
|
184
|
+
robots, allowed = robots_policy(mem.start_url, ignore_robots, limiter, bus)
|
|
185
|
+
if not allowed:
|
|
186
|
+
raise NotAllowed(f"robots.txt does not allow {mem.start_url}")
|
|
187
|
+
gateway = make_gateway(max_llm_calls, required=False) if use_llm else None
|
|
188
|
+
if started_hook is not None:
|
|
189
|
+
started_hook()
|
|
190
|
+
s = open_session(
|
|
191
|
+
store, bus, site_host(site), mem.start_url, f"refresh: {mem.goal}", opts.headed,
|
|
192
|
+
limiter, robots, gateway, opts.max_probes, screens_root=db_path, mode="refresh",
|
|
193
|
+
lang=opts.lang, site=site,
|
|
194
|
+
) # fmt: skip
|
|
195
|
+
if stop is not None:
|
|
196
|
+
s.stop = stop
|
|
197
|
+
s.third_party_robots = opts.third_party_robots
|
|
198
|
+
s.memory = memory_prompt(mem.endpoints, mem.lessons)
|
|
199
|
+
started = time.monotonic()
|
|
200
|
+
status, reason = refresh_site(s, mem, opts.max_steps)
|
|
201
|
+
finish(s, status, reason, started, opts)
|
|
202
|
+
now = gateway.usage.answered if gateway is not None else 0
|
|
203
|
+
return status, now, store.first_run_llm_calls(site) or 0
|