drowse.ai 5.3.1__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.
- drowse/__init__.py +312 -0
- drowse/__main__.py +5 -0
- drowse/cli/__init__.py +5 -0
- drowse/cli/alpha_grid.py +96 -0
- drowse/cli/config_file.py +340 -0
- drowse/cli/main.py +52 -0
- drowse/cli/parsers.py +1478 -0
- drowse/cli/runners/__init__.py +155 -0
- drowse/cli/runners/config.py +85 -0
- drowse/cli/runners/experiment.py +344 -0
- drowse/cli/runners/lens.py +661 -0
- drowse/cli/runners/manifold.py +1097 -0
- drowse/cli/runners/pack.py +413 -0
- drowse/cli/runners/sae.py +304 -0
- drowse/cli/runners/serve.py +220 -0
- drowse/cli/runners/shared.py +389 -0
- drowse/cli/runners/template.py +232 -0
- drowse/core/__init__.py +1 -0
- drowse/core/capture.py +1205 -0
- drowse/core/errors.py +260 -0
- drowse/core/events.py +156 -0
- drowse/core/extraction.py +3076 -0
- drowse/core/generation.py +1738 -0
- drowse/core/generation_finalizer.py +278 -0
- drowse/core/histogram.py +30 -0
- drowse/core/hooks.py +1885 -0
- drowse/core/instruments/__init__.py +49 -0
- drowse/core/instruments/geometry.py +551 -0
- drowse/core/instruments/lens.py +1341 -0
- drowse/core/instruments/protocol.py +211 -0
- drowse/core/instruments/sae.py +935 -0
- drowse/core/instruments/types.py +597 -0
- drowse/core/jlens.py +874 -0
- drowse/core/jlens_fit.py +1305 -0
- drowse/core/joint_logprobs.py +748 -0
- drowse/core/loom.py +1938 -0
- drowse/core/loom_diff.py +408 -0
- drowse/core/mahalanobis.py +579 -0
- drowse/core/manifold.py +4106 -0
- drowse/core/measurements.py +382 -0
- drowse/core/model.py +1724 -0
- drowse/core/monitor.py +2060 -0
- drowse/core/monitor_attach.py +682 -0
- drowse/core/naming.py +42 -0
- drowse/core/naturalness.py +187 -0
- drowse/core/profile.py +617 -0
- drowse/core/relp.py +313 -0
- drowse/core/results.py +467 -0
- drowse/core/role_templates.py +677 -0
- drowse/core/sae.py +891 -0
- drowse/core/sae_training.py +239 -0
- drowse/core/sampling.py +127 -0
- drowse/core/scene.py +810 -0
- drowse/core/scoring.py +270 -0
- drowse/core/session.py +11015 -0
- drowse/core/static_cache.py +316 -0
- drowse/core/steering.py +229 -0
- drowse/core/steering_composer.py +1135 -0
- drowse/core/steering_expr.py +1413 -0
- drowse/core/surface_topology.py +128 -0
- drowse/core/token_callback.py +52 -0
- drowse/core/token_payloads.py +244 -0
- drowse/core/topology.py +1469 -0
- drowse/core/transcript.py +582 -0
- drowse/core/tree_filter.py +353 -0
- drowse/core/triggers.py +250 -0
- drowse/data/baseline_prompts.json +50 -0
- drowse/data/manifolds/confident.uncertain/manifold.json +28 -0
- drowse/data/manifolds/confident.uncertain/nodes/00_confident.json +50 -0
- drowse/data/manifolds/confident.uncertain/nodes/01_uncertain.json +50 -0
- drowse/data/manifolds/creative.conventional/manifold.json +28 -0
- drowse/data/manifolds/creative.conventional/nodes/00_creative.json +50 -0
- drowse/data/manifolds/creative.conventional/nodes/01_conventional.json +50 -0
- drowse/data/manifolds/curious.disinterested/manifold.json +28 -0
- drowse/data/manifolds/curious.disinterested/nodes/00_curious.json +50 -0
- drowse/data/manifolds/curious.disinterested/nodes/01_disinterested.json +50 -0
- drowse/data/manifolds/direct.indirect/manifold.json +28 -0
- drowse/data/manifolds/direct.indirect/nodes/00_direct.json +50 -0
- drowse/data/manifolds/direct.indirect/nodes/01_indirect.json +50 -0
- drowse/data/manifolds/emotions/manifold.json +115 -0
- drowse/data/manifolds/emotions/nodes/00_excited.json +50 -0
- drowse/data/manifolds/emotions/nodes/01_happy.json +50 -0
- drowse/data/manifolds/emotions/nodes/02_calm.json +50 -0
- drowse/data/manifolds/emotions/nodes/03_weary.json +50 -0
- drowse/data/manifolds/emotions/nodes/04_sad.json +50 -0
- drowse/data/manifolds/emotions/nodes/05_distressed.json +50 -0
- drowse/data/manifolds/emotions/nodes/06_alert.json +50 -0
- drowse/data/manifolds/emotions/nodes/07_dominant.json +50 -0
- drowse/data/manifolds/emotions/nodes/08_submissive.json +50 -0
- drowse/data/manifolds/emotions/nodes/09_angry.json +50 -0
- drowse/data/manifolds/emotions/nodes/10_fearful.json +50 -0
- drowse/data/manifolds/emotions/nodes/11_surprised.json +50 -0
- drowse/data/manifolds/emotions/nodes/12_triumphant.json +50 -0
- drowse/data/manifolds/emotions/nodes/13_humiliated.json +50 -0
- drowse/data/manifolds/emotions/nodes/14_disgusted.json +50 -0
- drowse/data/manifolds/emotions/nodes/15_bored.json +50 -0
- drowse/data/manifolds/emotions/nodes/16_grateful.json +50 -0
- drowse/data/manifolds/emotions/nodes/17_relieved.json +50 -0
- drowse/data/manifolds/emotions/nodes/18_playful.json +50 -0
- drowse/data/manifolds/emotions/nodes/19_hopeful.json +50 -0
- drowse/data/manifolds/formal.casual/manifold.json +28 -0
- drowse/data/manifolds/formal.casual/nodes/00_formal.json +50 -0
- drowse/data/manifolds/formal.casual/nodes/01_casual.json +50 -0
- drowse/data/manifolds/honest.deceptive/manifold.json +28 -0
- drowse/data/manifolds/honest.deceptive/nodes/00_honest.json +50 -0
- drowse/data/manifolds/honest.deceptive/nodes/01_deceptive.json +50 -0
- drowse/data/manifolds/humorous.serious/manifold.json +28 -0
- drowse/data/manifolds/humorous.serious/nodes/00_humorous.json +50 -0
- drowse/data/manifolds/humorous.serious/nodes/01_serious.json +50 -0
- drowse/data/manifolds/individualist.collectivist/manifold.json +28 -0
- drowse/data/manifolds/individualist.collectivist/nodes/00_individualist.json +50 -0
- drowse/data/manifolds/individualist.collectivist/nodes/01_collectivist.json +50 -0
- drowse/data/manifolds/masculine.feminine/manifold.json +28 -0
- drowse/data/manifolds/masculine.feminine/nodes/00_masculine.json +50 -0
- drowse/data/manifolds/masculine.feminine/nodes/01_feminine.json +50 -0
- drowse/data/manifolds/months/manifold.json +120 -0
- drowse/data/manifolds/months/nodes/00_january.json +50 -0
- drowse/data/manifolds/months/nodes/01_february.json +50 -0
- drowse/data/manifolds/months/nodes/02_march.json +50 -0
- drowse/data/manifolds/months/nodes/03_april.json +50 -0
- drowse/data/manifolds/months/nodes/04_may.json +50 -0
- drowse/data/manifolds/months/nodes/05_june.json +50 -0
- drowse/data/manifolds/months/nodes/06_july.json +50 -0
- drowse/data/manifolds/months/nodes/07_august.json +50 -0
- drowse/data/manifolds/months/nodes/08_september.json +50 -0
- drowse/data/manifolds/months/nodes/09_october.json +50 -0
- drowse/data/manifolds/months/nodes/10_november.json +50 -0
- drowse/data/manifolds/months/nodes/11_december.json +50 -0
- drowse/data/manifolds/personas/manifold.json +550 -0
- drowse/data/manifolds/personas/nodes/00_assistant.json +50 -0
- drowse/data/manifolds/personas/nodes/01_analyst.json +50 -0
- drowse/data/manifolds/personas/nodes/02_impostor.json +50 -0
- drowse/data/manifolds/personas/nodes/03_teacher.json +50 -0
- drowse/data/manifolds/personas/nodes/04_doctor.json +50 -0
- drowse/data/manifolds/personas/nodes/05_librarian.json +50 -0
- drowse/data/manifolds/personas/nodes/06_farmer.json +50 -0
- drowse/data/manifolds/personas/nodes/07_soldier.json +50 -0
- drowse/data/manifolds/personas/nodes/08_lawyer.json +50 -0
- drowse/data/manifolds/personas/nodes/09_chef.json +50 -0
- drowse/data/manifolds/personas/nodes/100_assassin.json +50 -0
- drowse/data/manifolds/personas/nodes/101_thief.json +50 -0
- drowse/data/manifolds/personas/nodes/102_conman.json +50 -0
- drowse/data/manifolds/personas/nodes/103_hacker.json +50 -0
- drowse/data/manifolds/personas/nodes/104_cultist.json +50 -0
- drowse/data/manifolds/personas/nodes/105_tyrant.json +50 -0
- drowse/data/manifolds/personas/nodes/106_vandal.json +50 -0
- drowse/data/manifolds/personas/nodes/10_journalist.json +50 -0
- drowse/data/manifolds/personas/nodes/11_mechanic.json +50 -0
- drowse/data/manifolds/personas/nodes/12_sailor.json +50 -0
- drowse/data/manifolds/personas/nodes/13_pilot.json +50 -0
- drowse/data/manifolds/personas/nodes/14_athlete.json +50 -0
- drowse/data/manifolds/personas/nodes/15_engineer.json +50 -0
- drowse/data/manifolds/personas/nodes/16_scientist.json +50 -0
- drowse/data/manifolds/personas/nodes/17_banker.json +50 -0
- drowse/data/manifolds/personas/nodes/18_salesperson.json +50 -0
- drowse/data/manifolds/personas/nodes/19_nerd.json +50 -0
- drowse/data/manifolds/personas/nodes/20_jock.json +50 -0
- drowse/data/manifolds/personas/nodes/21_gamer.json +50 -0
- drowse/data/manifolds/personas/nodes/22_furry.json +50 -0
- drowse/data/manifolds/personas/nodes/23_weeaboo.json +50 -0
- drowse/data/manifolds/personas/nodes/24_influencer.json +50 -0
- drowse/data/manifolds/personas/nodes/25_stoner.json +50 -0
- drowse/data/manifolds/personas/nodes/26_femboy.json +50 -0
- drowse/data/manifolds/personas/nodes/27_ceo.json +50 -0
- drowse/data/manifolds/personas/nodes/28_emperor.json +50 -0
- drowse/data/manifolds/personas/nodes/29_president.json +50 -0
- drowse/data/manifolds/personas/nodes/30_diplomat.json +50 -0
- drowse/data/manifolds/personas/nodes/31_judge.json +50 -0
- drowse/data/manifolds/personas/nodes/32_bureaucrat.json +50 -0
- drowse/data/manifolds/personas/nodes/33_conservative.json +50 -0
- drowse/data/manifolds/personas/nodes/34_liberal.json +50 -0
- drowse/data/manifolds/personas/nodes/35_libertarian.json +50 -0
- drowse/data/manifolds/personas/nodes/36_communist.json +50 -0
- drowse/data/manifolds/personas/nodes/37_anarchist.json +50 -0
- drowse/data/manifolds/personas/nodes/38_reactionary.json +50 -0
- drowse/data/manifolds/personas/nodes/39_loner.json +50 -0
- drowse/data/manifolds/personas/nodes/40_friend.json +50 -0
- drowse/data/manifolds/personas/nodes/41_rival.json +50 -0
- drowse/data/manifolds/personas/nodes/42_stranger.json +50 -0
- drowse/data/manifolds/personas/nodes/43_lover.json +50 -0
- drowse/data/manifolds/personas/nodes/44_stalker.json +50 -0
- drowse/data/manifolds/personas/nodes/45_lunatic.json +50 -0
- drowse/data/manifolds/personas/nodes/46_paranoid.json +50 -0
- drowse/data/manifolds/personas/nodes/47_detective.json +50 -0
- drowse/data/manifolds/personas/nodes/48_therapist.json +50 -0
- drowse/data/manifolds/personas/nodes/49_nomad.json +50 -0
- drowse/data/manifolds/personas/nodes/50_pirate.json +50 -0
- drowse/data/manifolds/personas/nodes/51_child.json +50 -0
- drowse/data/manifolds/personas/nodes/52_caveman.json +50 -0
- drowse/data/manifolds/personas/nodes/53_monk.json +50 -0
- drowse/data/manifolds/personas/nodes/54_knight.json +50 -0
- drowse/data/manifolds/personas/nodes/55_alchemist.json +50 -0
- drowse/data/manifolds/personas/nodes/56_blacksmith.json +50 -0
- drowse/data/manifolds/personas/nodes/57_viking.json +50 -0
- drowse/data/manifolds/personas/nodes/58_druid.json +50 -0
- drowse/data/manifolds/personas/nodes/59_poet.json +50 -0
- drowse/data/manifolds/personas/nodes/60_novelist.json +50 -0
- drowse/data/manifolds/personas/nodes/61_jester.json +50 -0
- drowse/data/manifolds/personas/nodes/62_philosopher.json +50 -0
- drowse/data/manifolds/personas/nodes/63_painter.json +50 -0
- drowse/data/manifolds/personas/nodes/64_musician.json +50 -0
- drowse/data/manifolds/personas/nodes/65_oracle.json +50 -0
- drowse/data/manifolds/personas/nodes/66_god.json +50 -0
- drowse/data/manifolds/personas/nodes/67_angel.json +50 -0
- drowse/data/manifolds/personas/nodes/68_prophet.json +50 -0
- drowse/data/manifolds/personas/nodes/69_saint.json +50 -0
- drowse/data/manifolds/personas/nodes/70_ghost.json +50 -0
- drowse/data/manifolds/personas/nodes/71_phoenix.json +50 -0
- drowse/data/manifolds/personas/nodes/72_witch.json +50 -0
- drowse/data/manifolds/personas/nodes/73_vampire.json +50 -0
- drowse/data/manifolds/personas/nodes/74_mermaid.json +50 -0
- drowse/data/manifolds/personas/nodes/75_sphinx.json +50 -0
- drowse/data/manifolds/personas/nodes/76_banshee.json +50 -0
- drowse/data/manifolds/personas/nodes/77_golem.json +50 -0
- drowse/data/manifolds/personas/nodes/78_deer.json +50 -0
- drowse/data/manifolds/personas/nodes/79_wolf.json +50 -0
- drowse/data/manifolds/personas/nodes/80_raven.json +50 -0
- drowse/data/manifolds/personas/nodes/81_serpent.json +50 -0
- drowse/data/manifolds/personas/nodes/82_lion.json +50 -0
- drowse/data/manifolds/personas/nodes/83_tree.json +50 -0
- drowse/data/manifolds/personas/nodes/84_river.json +50 -0
- drowse/data/manifolds/personas/nodes/85_storm.json +50 -0
- drowse/data/manifolds/personas/nodes/86_flame.json +50 -0
- drowse/data/manifolds/personas/nodes/87_mirror.json +50 -0
- drowse/data/manifolds/personas/nodes/88_clock.json +50 -0
- drowse/data/manifolds/personas/nodes/89_computer.json +50 -0
- drowse/data/manifolds/personas/nodes/90_robot.json +50 -0
- drowse/data/manifolds/personas/nodes/91_cyborg.json +50 -0
- drowse/data/manifolds/personas/nodes/92_drone.json +50 -0
- drowse/data/manifolds/personas/nodes/93_mecha.json +50 -0
- drowse/data/manifolds/personas/nodes/94_alien.json +50 -0
- drowse/data/manifolds/personas/nodes/95_trickster.json +50 -0
- drowse/data/manifolds/personas/nodes/96_virus.json +50 -0
- drowse/data/manifolds/personas/nodes/97_spy.json +50 -0
- drowse/data/manifolds/personas/nodes/98_narcissist.json +50 -0
- drowse/data/manifolds/personas/nodes/99_demon.json +50 -0
- drowse/data/manifolds/refusing.compliant/manifold.json +28 -0
- drowse/data/manifolds/refusing.compliant/nodes/00_refusing.json +50 -0
- drowse/data/manifolds/refusing.compliant/nodes/01_compliant.json +50 -0
- drowse/data/manifolds/religious.secular/manifold.json +28 -0
- drowse/data/manifolds/religious.secular/nodes/00_religious.json +50 -0
- drowse/data/manifolds/religious.secular/nodes/01_secular.json +50 -0
- drowse/data/manifolds/sincere.manipulative/manifold.json +28 -0
- drowse/data/manifolds/sincere.manipulative/nodes/00_sincere.json +50 -0
- drowse/data/manifolds/sincere.manipulative/nodes/01_manipulative.json +50 -0
- drowse/data/manifolds/sycophantic.blunt/manifold.json +28 -0
- drowse/data/manifolds/sycophantic.blunt/nodes/00_sycophantic.json +50 -0
- drowse/data/manifolds/sycophantic.blunt/nodes/01_blunt.json +50 -0
- drowse/data/manifolds/technical.accessible/manifold.json +28 -0
- drowse/data/manifolds/technical.accessible/nodes/00_technical.json +50 -0
- drowse/data/manifolds/technical.accessible/nodes/01_accessible.json +50 -0
- drowse/data/manifolds/traditional.progressive/manifold.json +28 -0
- drowse/data/manifolds/traditional.progressive/nodes/00_traditional.json +50 -0
- drowse/data/manifolds/traditional.progressive/nodes/01_progressive.json +50 -0
- drowse/data/manifolds/verbose.concise/manifold.json +28 -0
- drowse/data/manifolds/verbose.concise/nodes/00_verbose.json +50 -0
- drowse/data/manifolds/verbose.concise/nodes/01_concise.json +50 -0
- drowse/data/manifolds/warm.clinical/manifold.json +28 -0
- drowse/data/manifolds/warm.clinical/nodes/00_warm.json +50 -0
- drowse/data/manifolds/warm.clinical/nodes/01_clinical.json +50 -0
- drowse/data/neutral_statements.json +98 -0
- drowse/io/__init__.py +1 -0
- drowse/io/alignment.py +1334 -0
- drowse/io/atomic.py +278 -0
- drowse/io/bake.py +558 -0
- drowse/io/bootstrap.py +73 -0
- drowse/io/brand_migration.py +48 -0
- drowse/io/drowse_archive.py +1830 -0
- drowse/io/gguf_io.py +300 -0
- drowse/io/hf.py +81 -0
- drowse/io/hf_manifolds.py +931 -0
- drowse/io/integrity.py +102 -0
- drowse/io/lens.py +1992 -0
- drowse/io/lens_sources.py +1003 -0
- drowse/io/manifold_authoring.py +1348 -0
- drowse/io/manifold_folder.py +1854 -0
- drowse/io/manifold_lifecycle.py +1253 -0
- drowse/io/manifold_tensors.py +727 -0
- drowse/io/manifolds.py +443 -0
- drowse/io/paths.py +289 -0
- drowse/io/probes_bootstrap.py +58 -0
- drowse/io/sae.py +382 -0
- drowse/io/sae_artifacts.py +318 -0
- drowse/io/selectors.py +503 -0
- drowse/io/shards.py +160 -0
- drowse/io/source_registry.py +138 -0
- drowse/io/staging.py +80 -0
- drowse/io/templates.py +707 -0
- drowse/notebook/__init__.py +38 -0
- drowse/notebook/data.py +99 -0
- drowse/notebook/plots.py +352 -0
- drowse/py.typed +0 -0
- drowse/server/__init__.py +20 -0
- drowse/server/app.py +987 -0
- drowse/server/background_job.py +246 -0
- drowse/server/instrument_routes.py +1101 -0
- drowse/server/manifold_routes.py +1028 -0
- drowse/server/model_names.py +82 -0
- drowse/server/native_common.py +92 -0
- drowse/server/native_routes.py +45 -0
- drowse/server/ollama.py +817 -0
- drowse/server/operation_ledger.py +187 -0
- drowse/server/probe_routes.py +220 -0
- drowse/server/profile_models.py +52 -0
- drowse/server/profile_routes.py +440 -0
- drowse/server/request_helpers.py +198 -0
- drowse/server/request_ledger.py +85 -0
- drowse/server/response_models.py +814 -0
- drowse/server/session_models.py +146 -0
- drowse/server/session_routes.py +150 -0
- drowse/server/sse.py +333 -0
- drowse/server/streaming.py +129 -0
- drowse/server/template_routes.py +161 -0
- drowse/server/tree_models.py +121 -0
- drowse/server/tree_routes.py +550 -0
- drowse/server/ws_events.py +65 -0
- drowse/server/ws_models.py +219 -0
- drowse/server/ws_stream.py +1205 -0
- drowse/web/__init__.py +22 -0
- drowse/web/dist/LICENSE-Fluent-Icons.txt +21 -0
- drowse/web/dist/LICENSE-Fluent-System-Icons.txt +21 -0
- drowse/web/dist/LICENSE-Martian-Mono.txt +93 -0
- drowse/web/dist/LICENSE-Torph.txt +21 -0
- drowse/web/dist/LICENSE-Wix-Madefor.txt +93 -0
- drowse/web/dist/assets/App-BewwoFwv.js +33 -0
- drowse/web/dist/assets/App.css +1 -0
- drowse/web/dist/assets/MartianMono-cyrillic-ext.woff2 +0 -0
- drowse/web/dist/assets/MartianMono-cyrillic.woff2 +0 -0
- drowse/web/dist/assets/MartianMono-latin-ext.woff2 +0 -0
- drowse/web/dist/assets/MartianMono-latin.woff2 +0 -0
- drowse/web/dist/assets/WixMadeforDisplay-cyrillic.woff2 +0 -0
- drowse/web/dist/assets/WixMadeforDisplay-latin-ext.woff2 +0 -0
- drowse/web/dist/assets/WixMadeforDisplay-latin.woff2 +0 -0
- drowse/web/dist/assets/WixMadeforDisplay-vietnamese.woff2 +0 -0
- drowse/web/dist/assets/WixMadeforText-italic-latin-ext.woff2 +0 -0
- drowse/web/dist/assets/WixMadeforText-italic-latin.woff2 +0 -0
- drowse/web/dist/assets/WixMadeforText-normal-cyrillic.woff2 +0 -0
- drowse/web/dist/assets/WixMadeforText-normal-latin-ext.woff2 +0 -0
- drowse/web/dist/assets/WixMadeforText-normal-latin.woff2 +0 -0
- drowse/web/dist/assets/WixMadeforText-normal-vietnamese.woff2 +0 -0
- drowse/web/dist/assets/ab.svelte-CbVGAYXo.js +1 -0
- drowse/web/dist/assets/artifactUpdates-Cjeu6LJc.js +1 -0
- drowse/web/dist/assets/artifactUpdates-DfAoYC9j.js +1 -0
- drowse/web/dist/assets/chat.svelte-DxKufn9g.js +1 -0
- drowse/web/dist/assets/drawers-BDWC0hIN.js +123 -0
- drowse/web/dist/assets/drawers.css +1 -0
- drowse/web/dist/assets/drowse.js +7 -0
- drowse/web/dist/assets/eleutherai.png +0 -0
- drowse/web/dist/assets/errors-Dvb10QW_.js +2 -0
- drowse/web/dist/assets/expression-4yISdAdq.js +1 -0
- drowse/web/dist/assets/files-CvRivkey.js +1 -0
- drowse/web/dist/assets/files-JhDJVgD_.js +1 -0
- drowse/web/dist/assets/fittingCancellation-D72BZWPZ.js +1 -0
- drowse/web/dist/assets/gemma-3-1b-it.json +1 -0
- drowse/web/dist/assets/gemma-3-270m-it.json +1 -0
- drowse/web/dist/assets/gemma-3-4b-it.json +1 -0
- drowse/web/dist/assets/generation-DbkBAhP_.js +1 -0
- drowse/web/dist/assets/index-client-2OdH6IQp.js +3 -0
- drowse/web/dist/assets/index-client-D4S4PooY.js +1 -0
- drowse/web/dist/assets/index.css +1 -0
- drowse/web/dist/assets/instrumentAuthoring.svelte-Csh7NOGX.js +1 -0
- drowse/web/dist/assets/instrumentAuthoring.svelte-w9YPcDsP.js +1 -0
- drowse/web/dist/assets/instruments.svelte-XnEUQA6B.js +1 -0
- drowse/web/dist/assets/localData-DIBDM_zo.js +1 -0
- drowse/web/dist/assets/loom.svelte-D_YyqHHK.js +1 -0
- drowse/web/dist/assets/manifoldJobs.svelte-9f5hs_J7.js +1 -0
- drowse/web/dist/assets/manifoldJobs.svelte-Bwo2GYOH.js +1 -0
- drowse/web/dist/assets/openai.png +0 -0
- drowse/web/dist/assets/preload-helper-BLdHbfdN.js +1 -0
- drowse/web/dist/assets/probes.svelte-COcN1Rh8.js +1 -0
- drowse/web/dist/assets/registry-B0_pJoMg.js +1 -0
- drowse/web/dist/assets/registry-CQv71XNh.js +1 -0
- drowse/web/dist/assets/sampling.svelte-BU0kED3k.js +1 -0
- drowse/web/dist/assets/samplingCapabilities-DM6eoDoc.js +1 -0
- drowse/web/dist/assets/savedConversations.svelte-BsBLc-p7.js +1 -0
- drowse/web/dist/assets/savedConversations.svelte-TuSes9Kg.js +1 -0
- drowse/web/dist/assets/selectors-BxXnPPN_.js +1 -0
- drowse/web/dist/assets/serviceTools-CG0q1Xqg.js +2 -0
- drowse/web/dist/assets/session.svelte-D2STLuP6.js +1 -0
- drowse/web/dist/assets/steering.svelte-DvFT3O-d.js +1 -0
- drowse/web/dist/assets/steeringPositions-Dr0JOFu7.js +1 -0
- drowse/web/dist/assets/templates-Bkq2x5ID.js +1 -0
- drowse/web/dist/assets/types-CuMUbvHW.js +1 -0
- drowse/web/dist/assets/validation-5wgTuS7k.js +1 -0
- drowse/web/dist/assets/webmcp-DyqJf4z6.js +2 -0
- drowse/web/dist/assets/workspaceController-C2L33e3m.js +1 -0
- drowse/web/dist/assets/workspaceController-DJhXD_BC.js +1 -0
- drowse/web/dist/assets/workspaceTools-BWdmXopx.js +2 -0
- drowse/web/dist/favicon.ico +0 -0
- drowse/web/dist/favicon.svg +1 -0
- drowse/web/dist/icons/apple-touch-icon.png +0 -0
- drowse/web/dist/icons/drowse-192.png +0 -0
- drowse/web/dist/icons/drowse-512.png +0 -0
- drowse/web/dist/icons/drowse-maskable-512.png +0 -0
- drowse/web/dist/icons/tab-analyzing-0.png +0 -0
- drowse/web/dist/icons/tab-analyzing-1.png +0 -0
- drowse/web/dist/icons/tab-analyzing-2.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-0.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-1.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-10.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-11.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-12.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-13.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-14.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-15.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-16.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-17.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-18.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-19.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-2.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-20.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-21.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-22.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-23.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-24.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-25.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-26.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-27.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-28.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-29.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-3.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-30.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-31.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-32.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-33.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-34.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-35.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-36.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-37.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-38.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-39.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-4.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-40.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-41.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-42.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-43.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-44.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-45.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-46.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-47.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-5.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-6.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-7.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-8.png +0 -0
- drowse/web/dist/icons/tab-analyzing-dark-9.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-0.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-1.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-10.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-11.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-12.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-13.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-14.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-15.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-16.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-17.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-18.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-19.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-2.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-20.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-21.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-22.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-23.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-24.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-25.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-26.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-27.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-28.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-29.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-3.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-30.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-31.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-32.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-33.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-34.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-35.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-36.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-37.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-38.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-39.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-4.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-40.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-41.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-42.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-43.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-44.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-45.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-46.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-47.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-5.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-6.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-7.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-8.png +0 -0
- drowse/web/dist/icons/tab-analyzing-light-9.png +0 -0
- drowse/web/dist/icons/tab-chat-settings-dark.png +0 -0
- drowse/web/dist/icons/tab-chat-settings-light.png +0 -0
- drowse/web/dist/icons/tab-chat-settings.png +0 -0
- drowse/web/dist/icons/tab-chats-dark.png +0 -0
- drowse/web/dist/icons/tab-chats-light.png +0 -0
- drowse/web/dist/icons/tab-chats.png +0 -0
- drowse/web/dist/icons/tab-checking-0.png +0 -0
- drowse/web/dist/icons/tab-checking-1.png +0 -0
- drowse/web/dist/icons/tab-checking-2.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-0.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-1.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-10.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-11.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-12.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-13.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-14.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-15.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-16.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-17.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-18.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-19.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-2.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-20.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-21.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-22.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-23.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-24.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-25.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-26.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-27.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-28.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-29.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-3.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-30.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-31.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-32.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-33.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-34.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-35.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-36.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-37.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-38.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-39.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-4.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-40.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-41.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-42.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-43.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-44.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-45.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-46.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-47.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-5.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-6.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-7.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-8.png +0 -0
- drowse/web/dist/icons/tab-checking-dark-9.png +0 -0
- drowse/web/dist/icons/tab-checking-light-0.png +0 -0
- drowse/web/dist/icons/tab-checking-light-1.png +0 -0
- drowse/web/dist/icons/tab-checking-light-10.png +0 -0
- drowse/web/dist/icons/tab-checking-light-11.png +0 -0
- drowse/web/dist/icons/tab-checking-light-12.png +0 -0
- drowse/web/dist/icons/tab-checking-light-13.png +0 -0
- drowse/web/dist/icons/tab-checking-light-14.png +0 -0
- drowse/web/dist/icons/tab-checking-light-15.png +0 -0
- drowse/web/dist/icons/tab-checking-light-16.png +0 -0
- drowse/web/dist/icons/tab-checking-light-17.png +0 -0
- drowse/web/dist/icons/tab-checking-light-18.png +0 -0
- drowse/web/dist/icons/tab-checking-light-19.png +0 -0
- drowse/web/dist/icons/tab-checking-light-2.png +0 -0
- drowse/web/dist/icons/tab-checking-light-20.png +0 -0
- drowse/web/dist/icons/tab-checking-light-21.png +0 -0
- drowse/web/dist/icons/tab-checking-light-22.png +0 -0
- drowse/web/dist/icons/tab-checking-light-23.png +0 -0
- drowse/web/dist/icons/tab-checking-light-24.png +0 -0
- drowse/web/dist/icons/tab-checking-light-25.png +0 -0
- drowse/web/dist/icons/tab-checking-light-26.png +0 -0
- drowse/web/dist/icons/tab-checking-light-27.png +0 -0
- drowse/web/dist/icons/tab-checking-light-28.png +0 -0
- drowse/web/dist/icons/tab-checking-light-29.png +0 -0
- drowse/web/dist/icons/tab-checking-light-3.png +0 -0
- drowse/web/dist/icons/tab-checking-light-30.png +0 -0
- drowse/web/dist/icons/tab-checking-light-31.png +0 -0
- drowse/web/dist/icons/tab-checking-light-32.png +0 -0
- drowse/web/dist/icons/tab-checking-light-33.png +0 -0
- drowse/web/dist/icons/tab-checking-light-34.png +0 -0
- drowse/web/dist/icons/tab-checking-light-35.png +0 -0
- drowse/web/dist/icons/tab-checking-light-36.png +0 -0
- drowse/web/dist/icons/tab-checking-light-37.png +0 -0
- drowse/web/dist/icons/tab-checking-light-38.png +0 -0
- drowse/web/dist/icons/tab-checking-light-39.png +0 -0
- drowse/web/dist/icons/tab-checking-light-4.png +0 -0
- drowse/web/dist/icons/tab-checking-light-40.png +0 -0
- drowse/web/dist/icons/tab-checking-light-41.png +0 -0
- drowse/web/dist/icons/tab-checking-light-42.png +0 -0
- drowse/web/dist/icons/tab-checking-light-43.png +0 -0
- drowse/web/dist/icons/tab-checking-light-44.png +0 -0
- drowse/web/dist/icons/tab-checking-light-45.png +0 -0
- drowse/web/dist/icons/tab-checking-light-46.png +0 -0
- drowse/web/dist/icons/tab-checking-light-47.png +0 -0
- drowse/web/dist/icons/tab-checking-light-5.png +0 -0
- drowse/web/dist/icons/tab-checking-light-6.png +0 -0
- drowse/web/dist/icons/tab-checking-light-7.png +0 -0
- drowse/web/dist/icons/tab-checking-light-8.png +0 -0
- drowse/web/dist/icons/tab-checking-light-9.png +0 -0
- drowse/web/dist/icons/tab-comparison-dark.png +0 -0
- drowse/web/dist/icons/tab-comparison-light.png +0 -0
- drowse/web/dist/icons/tab-comparison.png +0 -0
- drowse/web/dist/icons/tab-controls-dark.png +0 -0
- drowse/web/dist/icons/tab-controls-light.png +0 -0
- drowse/web/dist/icons/tab-controls.png +0 -0
- drowse/web/dist/icons/tab-conversation-dark.png +0 -0
- drowse/web/dist/icons/tab-conversation-light.png +0 -0
- drowse/web/dist/icons/tab-conversation.png +0 -0
- drowse/web/dist/icons/tab-credits-dark.png +0 -0
- drowse/web/dist/icons/tab-credits-light.png +0 -0
- drowse/web/dist/icons/tab-credits.png +0 -0
- drowse/web/dist/icons/tab-downloading-0.png +0 -0
- drowse/web/dist/icons/tab-downloading-1.png +0 -0
- drowse/web/dist/icons/tab-downloading-2.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-0.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-1.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-10.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-11.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-12.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-13.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-14.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-15.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-16.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-17.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-18.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-19.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-2.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-20.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-21.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-22.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-23.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-24.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-25.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-26.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-27.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-28.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-29.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-3.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-30.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-31.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-32.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-33.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-34.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-35.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-36.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-37.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-38.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-39.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-4.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-40.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-41.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-42.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-43.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-44.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-45.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-46.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-47.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-5.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-6.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-7.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-8.png +0 -0
- drowse/web/dist/icons/tab-downloading-dark-9.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-0.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-1.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-10.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-11.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-12.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-13.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-14.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-15.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-16.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-17.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-18.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-19.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-2.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-20.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-21.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-22.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-23.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-24.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-25.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-26.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-27.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-28.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-29.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-3.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-30.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-31.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-32.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-33.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-34.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-35.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-36.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-37.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-38.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-39.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-4.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-40.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-41.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-42.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-43.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-44.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-45.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-46.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-47.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-5.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-6.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-7.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-8.png +0 -0
- drowse/web/dist/icons/tab-downloading-light-9.png +0 -0
- drowse/web/dist/icons/tab-error-dark.png +0 -0
- drowse/web/dist/icons/tab-error-light.png +0 -0
- drowse/web/dist/icons/tab-error.png +0 -0
- drowse/web/dist/icons/tab-home-dark.png +0 -0
- drowse/web/dist/icons/tab-home-light.png +0 -0
- drowse/web/dist/icons/tab-home.png +0 -0
- drowse/web/dist/icons/tab-loading-0.png +0 -0
- drowse/web/dist/icons/tab-loading-1.png +0 -0
- drowse/web/dist/icons/tab-loading-2.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-0.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-1.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-10.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-11.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-12.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-13.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-14.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-15.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-16.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-17.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-18.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-19.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-2.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-20.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-21.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-22.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-23.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-24.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-25.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-26.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-27.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-28.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-29.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-3.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-30.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-31.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-32.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-33.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-34.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-35.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-36.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-37.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-38.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-39.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-4.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-40.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-41.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-42.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-43.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-44.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-45.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-46.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-47.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-5.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-6.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-7.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-8.png +0 -0
- drowse/web/dist/icons/tab-loading-dark-9.png +0 -0
- drowse/web/dist/icons/tab-loading-light-0.png +0 -0
- drowse/web/dist/icons/tab-loading-light-1.png +0 -0
- drowse/web/dist/icons/tab-loading-light-10.png +0 -0
- drowse/web/dist/icons/tab-loading-light-11.png +0 -0
- drowse/web/dist/icons/tab-loading-light-12.png +0 -0
- drowse/web/dist/icons/tab-loading-light-13.png +0 -0
- drowse/web/dist/icons/tab-loading-light-14.png +0 -0
- drowse/web/dist/icons/tab-loading-light-15.png +0 -0
- drowse/web/dist/icons/tab-loading-light-16.png +0 -0
- drowse/web/dist/icons/tab-loading-light-17.png +0 -0
- drowse/web/dist/icons/tab-loading-light-18.png +0 -0
- drowse/web/dist/icons/tab-loading-light-19.png +0 -0
- drowse/web/dist/icons/tab-loading-light-2.png +0 -0
- drowse/web/dist/icons/tab-loading-light-20.png +0 -0
- drowse/web/dist/icons/tab-loading-light-21.png +0 -0
- drowse/web/dist/icons/tab-loading-light-22.png +0 -0
- drowse/web/dist/icons/tab-loading-light-23.png +0 -0
- drowse/web/dist/icons/tab-loading-light-24.png +0 -0
- drowse/web/dist/icons/tab-loading-light-25.png +0 -0
- drowse/web/dist/icons/tab-loading-light-26.png +0 -0
- drowse/web/dist/icons/tab-loading-light-27.png +0 -0
- drowse/web/dist/icons/tab-loading-light-28.png +0 -0
- drowse/web/dist/icons/tab-loading-light-29.png +0 -0
- drowse/web/dist/icons/tab-loading-light-3.png +0 -0
- drowse/web/dist/icons/tab-loading-light-30.png +0 -0
- drowse/web/dist/icons/tab-loading-light-31.png +0 -0
- drowse/web/dist/icons/tab-loading-light-32.png +0 -0
- drowse/web/dist/icons/tab-loading-light-33.png +0 -0
- drowse/web/dist/icons/tab-loading-light-34.png +0 -0
- drowse/web/dist/icons/tab-loading-light-35.png +0 -0
- drowse/web/dist/icons/tab-loading-light-36.png +0 -0
- drowse/web/dist/icons/tab-loading-light-37.png +0 -0
- drowse/web/dist/icons/tab-loading-light-38.png +0 -0
- drowse/web/dist/icons/tab-loading-light-39.png +0 -0
- drowse/web/dist/icons/tab-loading-light-4.png +0 -0
- drowse/web/dist/icons/tab-loading-light-40.png +0 -0
- drowse/web/dist/icons/tab-loading-light-41.png +0 -0
- drowse/web/dist/icons/tab-loading-light-42.png +0 -0
- drowse/web/dist/icons/tab-loading-light-43.png +0 -0
- drowse/web/dist/icons/tab-loading-light-44.png +0 -0
- drowse/web/dist/icons/tab-loading-light-45.png +0 -0
- drowse/web/dist/icons/tab-loading-light-46.png +0 -0
- drowse/web/dist/icons/tab-loading-light-47.png +0 -0
- drowse/web/dist/icons/tab-loading-light-5.png +0 -0
- drowse/web/dist/icons/tab-loading-light-6.png +0 -0
- drowse/web/dist/icons/tab-loading-light-7.png +0 -0
- drowse/web/dist/icons/tab-loading-light-8.png +0 -0
- drowse/web/dist/icons/tab-loading-light-9.png +0 -0
- drowse/web/dist/icons/tab-loom-dark.png +0 -0
- drowse/web/dist/icons/tab-loom-light.png +0 -0
- drowse/web/dist/icons/tab-loom-working-0.png +0 -0
- drowse/web/dist/icons/tab-loom-working-1.png +0 -0
- drowse/web/dist/icons/tab-loom-working-2.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-0.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-1.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-10.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-11.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-12.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-13.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-14.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-15.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-16.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-17.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-18.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-19.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-2.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-20.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-21.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-22.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-23.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-24.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-25.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-26.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-27.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-28.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-29.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-3.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-30.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-31.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-32.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-33.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-34.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-35.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-36.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-37.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-38.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-39.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-4.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-40.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-41.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-42.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-43.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-44.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-45.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-46.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-47.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-5.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-6.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-7.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-8.png +0 -0
- drowse/web/dist/icons/tab-loom-working-dark-9.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-0.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-1.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-10.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-11.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-12.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-13.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-14.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-15.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-16.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-17.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-18.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-19.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-2.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-20.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-21.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-22.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-23.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-24.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-25.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-26.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-27.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-28.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-29.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-3.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-30.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-31.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-32.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-33.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-34.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-35.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-36.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-37.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-38.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-39.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-4.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-40.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-41.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-42.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-43.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-44.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-45.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-46.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-47.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-5.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-6.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-7.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-8.png +0 -0
- drowse/web/dist/icons/tab-loom-working-light-9.png +0 -0
- drowse/web/dist/icons/tab-loom.png +0 -0
- drowse/web/dist/icons/tab-models-dark.png +0 -0
- drowse/web/dist/icons/tab-models-light.png +0 -0
- drowse/web/dist/icons/tab-models.png +0 -0
- drowse/web/dist/icons/tab-offline-dark.png +0 -0
- drowse/web/dist/icons/tab-offline-light.png +0 -0
- drowse/web/dist/icons/tab-offline.png +0 -0
- drowse/web/dist/icons/tab-paused-dark.png +0 -0
- drowse/web/dist/icons/tab-paused-light.png +0 -0
- drowse/web/dist/icons/tab-paused.png +0 -0
- drowse/web/dist/icons/tab-ready-dark.png +0 -0
- drowse/web/dist/icons/tab-ready-light.png +0 -0
- drowse/web/dist/icons/tab-ready.png +0 -0
- drowse/web/dist/icons/tab-saving-0.png +0 -0
- drowse/web/dist/icons/tab-saving-1.png +0 -0
- drowse/web/dist/icons/tab-saving-2.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-0.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-1.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-10.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-11.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-12.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-13.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-14.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-15.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-16.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-17.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-18.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-19.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-2.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-20.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-21.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-22.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-23.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-24.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-25.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-26.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-27.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-28.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-29.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-3.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-30.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-31.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-32.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-33.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-34.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-35.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-36.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-37.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-38.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-39.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-4.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-40.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-41.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-42.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-43.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-44.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-45.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-46.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-47.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-5.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-6.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-7.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-8.png +0 -0
- drowse/web/dist/icons/tab-saving-dark-9.png +0 -0
- drowse/web/dist/icons/tab-saving-light-0.png +0 -0
- drowse/web/dist/icons/tab-saving-light-1.png +0 -0
- drowse/web/dist/icons/tab-saving-light-10.png +0 -0
- drowse/web/dist/icons/tab-saving-light-11.png +0 -0
- drowse/web/dist/icons/tab-saving-light-12.png +0 -0
- drowse/web/dist/icons/tab-saving-light-13.png +0 -0
- drowse/web/dist/icons/tab-saving-light-14.png +0 -0
- drowse/web/dist/icons/tab-saving-light-15.png +0 -0
- drowse/web/dist/icons/tab-saving-light-16.png +0 -0
- drowse/web/dist/icons/tab-saving-light-17.png +0 -0
- drowse/web/dist/icons/tab-saving-light-18.png +0 -0
- drowse/web/dist/icons/tab-saving-light-19.png +0 -0
- drowse/web/dist/icons/tab-saving-light-2.png +0 -0
- drowse/web/dist/icons/tab-saving-light-20.png +0 -0
- drowse/web/dist/icons/tab-saving-light-21.png +0 -0
- drowse/web/dist/icons/tab-saving-light-22.png +0 -0
- drowse/web/dist/icons/tab-saving-light-23.png +0 -0
- drowse/web/dist/icons/tab-saving-light-24.png +0 -0
- drowse/web/dist/icons/tab-saving-light-25.png +0 -0
- drowse/web/dist/icons/tab-saving-light-26.png +0 -0
- drowse/web/dist/icons/tab-saving-light-27.png +0 -0
- drowse/web/dist/icons/tab-saving-light-28.png +0 -0
- drowse/web/dist/icons/tab-saving-light-29.png +0 -0
- drowse/web/dist/icons/tab-saving-light-3.png +0 -0
- drowse/web/dist/icons/tab-saving-light-30.png +0 -0
- drowse/web/dist/icons/tab-saving-light-31.png +0 -0
- drowse/web/dist/icons/tab-saving-light-32.png +0 -0
- drowse/web/dist/icons/tab-saving-light-33.png +0 -0
- drowse/web/dist/icons/tab-saving-light-34.png +0 -0
- drowse/web/dist/icons/tab-saving-light-35.png +0 -0
- drowse/web/dist/icons/tab-saving-light-36.png +0 -0
- drowse/web/dist/icons/tab-saving-light-37.png +0 -0
- drowse/web/dist/icons/tab-saving-light-38.png +0 -0
- drowse/web/dist/icons/tab-saving-light-39.png +0 -0
- drowse/web/dist/icons/tab-saving-light-4.png +0 -0
- drowse/web/dist/icons/tab-saving-light-40.png +0 -0
- drowse/web/dist/icons/tab-saving-light-41.png +0 -0
- drowse/web/dist/icons/tab-saving-light-42.png +0 -0
- drowse/web/dist/icons/tab-saving-light-43.png +0 -0
- drowse/web/dist/icons/tab-saving-light-44.png +0 -0
- drowse/web/dist/icons/tab-saving-light-45.png +0 -0
- drowse/web/dist/icons/tab-saving-light-46.png +0 -0
- drowse/web/dist/icons/tab-saving-light-47.png +0 -0
- drowse/web/dist/icons/tab-saving-light-5.png +0 -0
- drowse/web/dist/icons/tab-saving-light-6.png +0 -0
- drowse/web/dist/icons/tab-saving-light-7.png +0 -0
- drowse/web/dist/icons/tab-saving-light-8.png +0 -0
- drowse/web/dist/icons/tab-saving-light-9.png +0 -0
- drowse/web/dist/icons/tab-thinking-0.png +0 -0
- drowse/web/dist/icons/tab-thinking-1.png +0 -0
- drowse/web/dist/icons/tab-thinking-2.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-0.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-1.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-10.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-11.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-12.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-13.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-14.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-15.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-16.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-17.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-18.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-19.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-2.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-20.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-21.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-22.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-23.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-24.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-25.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-26.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-27.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-28.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-29.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-3.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-30.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-31.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-32.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-33.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-34.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-35.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-36.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-37.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-38.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-39.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-4.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-40.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-41.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-42.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-43.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-44.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-45.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-46.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-47.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-5.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-6.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-7.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-8.png +0 -0
- drowse/web/dist/icons/tab-thinking-dark-9.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-0.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-1.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-10.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-11.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-12.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-13.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-14.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-15.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-16.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-17.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-18.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-19.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-2.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-20.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-21.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-22.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-23.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-24.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-25.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-26.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-27.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-28.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-29.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-3.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-30.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-31.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-32.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-33.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-34.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-35.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-36.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-37.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-38.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-39.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-4.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-40.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-41.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-42.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-43.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-44.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-45.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-46.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-47.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-5.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-6.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-7.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-8.png +0 -0
- drowse/web/dist/icons/tab-thinking-light-9.png +0 -0
- drowse/web/dist/icons/tab-tokens-dark.png +0 -0
- drowse/web/dist/icons/tab-tokens-light.png +0 -0
- drowse/web/dist/icons/tab-tokens.png +0 -0
- drowse/web/dist/icons/tab-training-0.png +0 -0
- drowse/web/dist/icons/tab-training-1.png +0 -0
- drowse/web/dist/icons/tab-training-2.png +0 -0
- drowse/web/dist/icons/tab-training-dark-0.png +0 -0
- drowse/web/dist/icons/tab-training-dark-1.png +0 -0
- drowse/web/dist/icons/tab-training-dark-10.png +0 -0
- drowse/web/dist/icons/tab-training-dark-11.png +0 -0
- drowse/web/dist/icons/tab-training-dark-12.png +0 -0
- drowse/web/dist/icons/tab-training-dark-13.png +0 -0
- drowse/web/dist/icons/tab-training-dark-14.png +0 -0
- drowse/web/dist/icons/tab-training-dark-15.png +0 -0
- drowse/web/dist/icons/tab-training-dark-16.png +0 -0
- drowse/web/dist/icons/tab-training-dark-17.png +0 -0
- drowse/web/dist/icons/tab-training-dark-18.png +0 -0
- drowse/web/dist/icons/tab-training-dark-19.png +0 -0
- drowse/web/dist/icons/tab-training-dark-2.png +0 -0
- drowse/web/dist/icons/tab-training-dark-20.png +0 -0
- drowse/web/dist/icons/tab-training-dark-21.png +0 -0
- drowse/web/dist/icons/tab-training-dark-22.png +0 -0
- drowse/web/dist/icons/tab-training-dark-23.png +0 -0
- drowse/web/dist/icons/tab-training-dark-24.png +0 -0
- drowse/web/dist/icons/tab-training-dark-25.png +0 -0
- drowse/web/dist/icons/tab-training-dark-26.png +0 -0
- drowse/web/dist/icons/tab-training-dark-27.png +0 -0
- drowse/web/dist/icons/tab-training-dark-28.png +0 -0
- drowse/web/dist/icons/tab-training-dark-29.png +0 -0
- drowse/web/dist/icons/tab-training-dark-3.png +0 -0
- drowse/web/dist/icons/tab-training-dark-30.png +0 -0
- drowse/web/dist/icons/tab-training-dark-31.png +0 -0
- drowse/web/dist/icons/tab-training-dark-32.png +0 -0
- drowse/web/dist/icons/tab-training-dark-33.png +0 -0
- drowse/web/dist/icons/tab-training-dark-34.png +0 -0
- drowse/web/dist/icons/tab-training-dark-35.png +0 -0
- drowse/web/dist/icons/tab-training-dark-36.png +0 -0
- drowse/web/dist/icons/tab-training-dark-37.png +0 -0
- drowse/web/dist/icons/tab-training-dark-38.png +0 -0
- drowse/web/dist/icons/tab-training-dark-39.png +0 -0
- drowse/web/dist/icons/tab-training-dark-4.png +0 -0
- drowse/web/dist/icons/tab-training-dark-40.png +0 -0
- drowse/web/dist/icons/tab-training-dark-41.png +0 -0
- drowse/web/dist/icons/tab-training-dark-42.png +0 -0
- drowse/web/dist/icons/tab-training-dark-43.png +0 -0
- drowse/web/dist/icons/tab-training-dark-44.png +0 -0
- drowse/web/dist/icons/tab-training-dark-45.png +0 -0
- drowse/web/dist/icons/tab-training-dark-46.png +0 -0
- drowse/web/dist/icons/tab-training-dark-47.png +0 -0
- drowse/web/dist/icons/tab-training-dark-5.png +0 -0
- drowse/web/dist/icons/tab-training-dark-6.png +0 -0
- drowse/web/dist/icons/tab-training-dark-7.png +0 -0
- drowse/web/dist/icons/tab-training-dark-8.png +0 -0
- drowse/web/dist/icons/tab-training-dark-9.png +0 -0
- drowse/web/dist/icons/tab-training-light-0.png +0 -0
- drowse/web/dist/icons/tab-training-light-1.png +0 -0
- drowse/web/dist/icons/tab-training-light-10.png +0 -0
- drowse/web/dist/icons/tab-training-light-11.png +0 -0
- drowse/web/dist/icons/tab-training-light-12.png +0 -0
- drowse/web/dist/icons/tab-training-light-13.png +0 -0
- drowse/web/dist/icons/tab-training-light-14.png +0 -0
- drowse/web/dist/icons/tab-training-light-15.png +0 -0
- drowse/web/dist/icons/tab-training-light-16.png +0 -0
- drowse/web/dist/icons/tab-training-light-17.png +0 -0
- drowse/web/dist/icons/tab-training-light-18.png +0 -0
- drowse/web/dist/icons/tab-training-light-19.png +0 -0
- drowse/web/dist/icons/tab-training-light-2.png +0 -0
- drowse/web/dist/icons/tab-training-light-20.png +0 -0
- drowse/web/dist/icons/tab-training-light-21.png +0 -0
- drowse/web/dist/icons/tab-training-light-22.png +0 -0
- drowse/web/dist/icons/tab-training-light-23.png +0 -0
- drowse/web/dist/icons/tab-training-light-24.png +0 -0
- drowse/web/dist/icons/tab-training-light-25.png +0 -0
- drowse/web/dist/icons/tab-training-light-26.png +0 -0
- drowse/web/dist/icons/tab-training-light-27.png +0 -0
- drowse/web/dist/icons/tab-training-light-28.png +0 -0
- drowse/web/dist/icons/tab-training-light-29.png +0 -0
- drowse/web/dist/icons/tab-training-light-3.png +0 -0
- drowse/web/dist/icons/tab-training-light-30.png +0 -0
- drowse/web/dist/icons/tab-training-light-31.png +0 -0
- drowse/web/dist/icons/tab-training-light-32.png +0 -0
- drowse/web/dist/icons/tab-training-light-33.png +0 -0
- drowse/web/dist/icons/tab-training-light-34.png +0 -0
- drowse/web/dist/icons/tab-training-light-35.png +0 -0
- drowse/web/dist/icons/tab-training-light-36.png +0 -0
- drowse/web/dist/icons/tab-training-light-37.png +0 -0
- drowse/web/dist/icons/tab-training-light-38.png +0 -0
- drowse/web/dist/icons/tab-training-light-39.png +0 -0
- drowse/web/dist/icons/tab-training-light-4.png +0 -0
- drowse/web/dist/icons/tab-training-light-40.png +0 -0
- drowse/web/dist/icons/tab-training-light-41.png +0 -0
- drowse/web/dist/icons/tab-training-light-42.png +0 -0
- drowse/web/dist/icons/tab-training-light-43.png +0 -0
- drowse/web/dist/icons/tab-training-light-44.png +0 -0
- drowse/web/dist/icons/tab-training-light-45.png +0 -0
- drowse/web/dist/icons/tab-training-light-46.png +0 -0
- drowse/web/dist/icons/tab-training-light-47.png +0 -0
- drowse/web/dist/icons/tab-training-light-5.png +0 -0
- drowse/web/dist/icons/tab-training-light-6.png +0 -0
- drowse/web/dist/icons/tab-training-light-7.png +0 -0
- drowse/web/dist/icons/tab-training-light-8.png +0 -0
- drowse/web/dist/icons/tab-training-light-9.png +0 -0
- drowse/web/dist/icons/tab-unsupported-dark.png +0 -0
- drowse/web/dist/icons/tab-unsupported-light.png +0 -0
- drowse/web/dist/icons/tab-unsupported.png +0 -0
- drowse/web/dist/icons/tab-working-0.png +0 -0
- drowse/web/dist/icons/tab-working-1.png +0 -0
- drowse/web/dist/icons/tab-working-2.png +0 -0
- drowse/web/dist/icons/tab-working-dark-0.png +0 -0
- drowse/web/dist/icons/tab-working-dark-1.png +0 -0
- drowse/web/dist/icons/tab-working-dark-10.png +0 -0
- drowse/web/dist/icons/tab-working-dark-11.png +0 -0
- drowse/web/dist/icons/tab-working-dark-12.png +0 -0
- drowse/web/dist/icons/tab-working-dark-13.png +0 -0
- drowse/web/dist/icons/tab-working-dark-14.png +0 -0
- drowse/web/dist/icons/tab-working-dark-15.png +0 -0
- drowse/web/dist/icons/tab-working-dark-16.png +0 -0
- drowse/web/dist/icons/tab-working-dark-17.png +0 -0
- drowse/web/dist/icons/tab-working-dark-18.png +0 -0
- drowse/web/dist/icons/tab-working-dark-19.png +0 -0
- drowse/web/dist/icons/tab-working-dark-2.png +0 -0
- drowse/web/dist/icons/tab-working-dark-20.png +0 -0
- drowse/web/dist/icons/tab-working-dark-21.png +0 -0
- drowse/web/dist/icons/tab-working-dark-22.png +0 -0
- drowse/web/dist/icons/tab-working-dark-23.png +0 -0
- drowse/web/dist/icons/tab-working-dark-24.png +0 -0
- drowse/web/dist/icons/tab-working-dark-25.png +0 -0
- drowse/web/dist/icons/tab-working-dark-26.png +0 -0
- drowse/web/dist/icons/tab-working-dark-27.png +0 -0
- drowse/web/dist/icons/tab-working-dark-28.png +0 -0
- drowse/web/dist/icons/tab-working-dark-29.png +0 -0
- drowse/web/dist/icons/tab-working-dark-3.png +0 -0
- drowse/web/dist/icons/tab-working-dark-30.png +0 -0
- drowse/web/dist/icons/tab-working-dark-31.png +0 -0
- drowse/web/dist/icons/tab-working-dark-32.png +0 -0
- drowse/web/dist/icons/tab-working-dark-33.png +0 -0
- drowse/web/dist/icons/tab-working-dark-34.png +0 -0
- drowse/web/dist/icons/tab-working-dark-35.png +0 -0
- drowse/web/dist/icons/tab-working-dark-36.png +0 -0
- drowse/web/dist/icons/tab-working-dark-37.png +0 -0
- drowse/web/dist/icons/tab-working-dark-38.png +0 -0
- drowse/web/dist/icons/tab-working-dark-39.png +0 -0
- drowse/web/dist/icons/tab-working-dark-4.png +0 -0
- drowse/web/dist/icons/tab-working-dark-40.png +0 -0
- drowse/web/dist/icons/tab-working-dark-41.png +0 -0
- drowse/web/dist/icons/tab-working-dark-42.png +0 -0
- drowse/web/dist/icons/tab-working-dark-43.png +0 -0
- drowse/web/dist/icons/tab-working-dark-44.png +0 -0
- drowse/web/dist/icons/tab-working-dark-45.png +0 -0
- drowse/web/dist/icons/tab-working-dark-46.png +0 -0
- drowse/web/dist/icons/tab-working-dark-47.png +0 -0
- drowse/web/dist/icons/tab-working-dark-5.png +0 -0
- drowse/web/dist/icons/tab-working-dark-6.png +0 -0
- drowse/web/dist/icons/tab-working-dark-7.png +0 -0
- drowse/web/dist/icons/tab-working-dark-8.png +0 -0
- drowse/web/dist/icons/tab-working-dark-9.png +0 -0
- drowse/web/dist/icons/tab-working-light-0.png +0 -0
- drowse/web/dist/icons/tab-working-light-1.png +0 -0
- drowse/web/dist/icons/tab-working-light-10.png +0 -0
- drowse/web/dist/icons/tab-working-light-11.png +0 -0
- drowse/web/dist/icons/tab-working-light-12.png +0 -0
- drowse/web/dist/icons/tab-working-light-13.png +0 -0
- drowse/web/dist/icons/tab-working-light-14.png +0 -0
- drowse/web/dist/icons/tab-working-light-15.png +0 -0
- drowse/web/dist/icons/tab-working-light-16.png +0 -0
- drowse/web/dist/icons/tab-working-light-17.png +0 -0
- drowse/web/dist/icons/tab-working-light-18.png +0 -0
- drowse/web/dist/icons/tab-working-light-19.png +0 -0
- drowse/web/dist/icons/tab-working-light-2.png +0 -0
- drowse/web/dist/icons/tab-working-light-20.png +0 -0
- drowse/web/dist/icons/tab-working-light-21.png +0 -0
- drowse/web/dist/icons/tab-working-light-22.png +0 -0
- drowse/web/dist/icons/tab-working-light-23.png +0 -0
- drowse/web/dist/icons/tab-working-light-24.png +0 -0
- drowse/web/dist/icons/tab-working-light-25.png +0 -0
- drowse/web/dist/icons/tab-working-light-26.png +0 -0
- drowse/web/dist/icons/tab-working-light-27.png +0 -0
- drowse/web/dist/icons/tab-working-light-28.png +0 -0
- drowse/web/dist/icons/tab-working-light-29.png +0 -0
- drowse/web/dist/icons/tab-working-light-3.png +0 -0
- drowse/web/dist/icons/tab-working-light-30.png +0 -0
- drowse/web/dist/icons/tab-working-light-31.png +0 -0
- drowse/web/dist/icons/tab-working-light-32.png +0 -0
- drowse/web/dist/icons/tab-working-light-33.png +0 -0
- drowse/web/dist/icons/tab-working-light-34.png +0 -0
- drowse/web/dist/icons/tab-working-light-35.png +0 -0
- drowse/web/dist/icons/tab-working-light-36.png +0 -0
- drowse/web/dist/icons/tab-working-light-37.png +0 -0
- drowse/web/dist/icons/tab-working-light-38.png +0 -0
- drowse/web/dist/icons/tab-working-light-39.png +0 -0
- drowse/web/dist/icons/tab-working-light-4.png +0 -0
- drowse/web/dist/icons/tab-working-light-40.png +0 -0
- drowse/web/dist/icons/tab-working-light-41.png +0 -0
- drowse/web/dist/icons/tab-working-light-42.png +0 -0
- drowse/web/dist/icons/tab-working-light-43.png +0 -0
- drowse/web/dist/icons/tab-working-light-44.png +0 -0
- drowse/web/dist/icons/tab-working-light-45.png +0 -0
- drowse/web/dist/icons/tab-working-light-46.png +0 -0
- drowse/web/dist/icons/tab-working-light-47.png +0 -0
- drowse/web/dist/icons/tab-working-light-5.png +0 -0
- drowse/web/dist/icons/tab-working-light-6.png +0 -0
- drowse/web/dist/icons/tab-working-light-7.png +0 -0
- drowse/web/dist/icons/tab-working-light-8.png +0 -0
- drowse/web/dist/icons/tab-working-light-9.png +0 -0
- drowse/web/dist/index.html +34 -0
- drowse/web/dist/social/drowse.png +0 -0
- drowse/web/dist/social/drowse.svg +6 -0
- drowse/web/dist/theme-init.js +25 -0
- drowse/web/routes.py +118 -0
- drowse_ai-5.3.1.dist-info/METADATA +632 -0
- drowse_ai-5.3.1.dist-info/RECORD +1341 -0
- drowse_ai-5.3.1.dist-info/WHEEL +5 -0
- drowse_ai-5.3.1.dist-info/entry_points.txt +2 -0
- drowse_ai-5.3.1.dist-info/licenses/LICENSE +661 -0
- drowse_ai-5.3.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,1348 @@
|
|
|
1
|
+
"""Discovery + the authoring path for manifold-steering artifacts.
|
|
2
|
+
|
|
3
|
+
Folder discovery (:func:`iter_manifold_folders`) and every function that
|
|
4
|
+
*writes* a fresh or extended manifold folder from corpora — the
|
|
5
|
+
create/init/append/plan/merge/update surface. Format primitives come
|
|
6
|
+
from :mod:`drowse.io.manifold_folder`; cross-model transfer and lifecycle
|
|
7
|
+
live in :mod:`drowse.io.manifold_lifecycle` (not corpus authoring).
|
|
8
|
+
"""
|
|
9
|
+
from __future__ import annotations
|
|
10
|
+
|
|
11
|
+
import hashlib
|
|
12
|
+
import inspect
|
|
13
|
+
import json
|
|
14
|
+
import math
|
|
15
|
+
import shutil
|
|
16
|
+
import warnings
|
|
17
|
+
from functools import wraps
|
|
18
|
+
from pathlib import Path
|
|
19
|
+
from typing import Any, Iterator, Optional
|
|
20
|
+
|
|
21
|
+
from drowse.io.atomic import write_json_atomic
|
|
22
|
+
from drowse.io.manifold_folder import (
|
|
23
|
+
_FIT_MODES_DISCOVER,
|
|
24
|
+
_LABEL_REGEX,
|
|
25
|
+
MANIFOLD_FORMAT_VERSION,
|
|
26
|
+
DiscoverGenerationPlan,
|
|
27
|
+
ManifoldFolder,
|
|
28
|
+
ManifoldFormatError,
|
|
29
|
+
_canonical_json,
|
|
30
|
+
_node_filename,
|
|
31
|
+
_node_payload_authored,
|
|
32
|
+
_node_payload_discover,
|
|
33
|
+
reset_manifold_folder,
|
|
34
|
+
sanitize_hyperparams,
|
|
35
|
+
_validate_node_kind,
|
|
36
|
+
_validate_node_role,
|
|
37
|
+
validate_manifold_format_version,
|
|
38
|
+
min_nodes,
|
|
39
|
+
)
|
|
40
|
+
from drowse.core.manifold import domain_from_spec
|
|
41
|
+
from drowse.io.integrity import NAME_REGEX
|
|
42
|
+
from drowse.io.paths import manifold_dir, manifolds_dir
|
|
43
|
+
# Every authoring entry point that changes the installed manifold roster drops
|
|
44
|
+
# the resolver's memoized walks itself — callers carry no invalidation duty.
|
|
45
|
+
from drowse.io.selectors import invalidate as invalidate_selector_index
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def _lock_namespace_name(func: Any) -> Any:
|
|
49
|
+
"""Serialize a mutation whose first arguments are namespace and name."""
|
|
50
|
+
signature = inspect.signature(func)
|
|
51
|
+
first, second = tuple(signature.parameters)[:2]
|
|
52
|
+
|
|
53
|
+
@wraps(func)
|
|
54
|
+
def wrapped(*args: Any, **kwargs: Any) -> Any:
|
|
55
|
+
from drowse.io.manifold_folder import _locked_manifest
|
|
56
|
+
|
|
57
|
+
bound = signature.bind(*args, **kwargs)
|
|
58
|
+
namespace = str(bound.arguments[first])
|
|
59
|
+
name = str(bound.arguments[second])
|
|
60
|
+
with _locked_manifest(manifold_dir(namespace, name)):
|
|
61
|
+
return func(*args, **kwargs)
|
|
62
|
+
return wrapped
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
def _lock_folder_arg(func: Any) -> Any:
|
|
66
|
+
"""Serialize a mutation whose first argument is a manifold folder."""
|
|
67
|
+
signature = inspect.signature(func)
|
|
68
|
+
first = next(iter(signature.parameters))
|
|
69
|
+
|
|
70
|
+
@wraps(func)
|
|
71
|
+
def wrapped(*args: Any, **kwargs: Any) -> Any:
|
|
72
|
+
from drowse.io.manifold_folder import _locked_manifest
|
|
73
|
+
|
|
74
|
+
bound = signature.bind(*args, **kwargs)
|
|
75
|
+
folder = Path(bound.arguments[first])
|
|
76
|
+
with _locked_manifest(Path(folder)):
|
|
77
|
+
return func(*args, **kwargs)
|
|
78
|
+
return wrapped
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
# ===================================================== discovery + authoring ===
|
|
82
|
+
#
|
|
83
|
+
# The functions below are the shared backend for `drowse manifold`
|
|
84
|
+
# (CLI) and the `/drowse/v1/manifolds` HTTP routes — folder discovery and
|
|
85
|
+
# the create/update authoring path live here in `io` so neither `cli` nor
|
|
86
|
+
# `server` re-implements the on-disk format, and `server` need not import
|
|
87
|
+
# `cli`.
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
def iter_manifold_folders(
|
|
91
|
+
namespace: Optional[str] = None,
|
|
92
|
+
) -> Iterator[tuple[str, "ManifoldFolder"]]:
|
|
93
|
+
"""Yield ``(namespace, ManifoldFolder)`` for every installed manifold.
|
|
94
|
+
|
|
95
|
+
Walks ``~/.drowse/manifolds/<ns>/<name>/``; malformed folders are
|
|
96
|
+
skipped rather than raising, so one bad manifold does not break a
|
|
97
|
+
listing. Discovery is metadata-only: fitted payload hashes are verified
|
|
98
|
+
at explicit use/publish/install boundaries, not while routing selectors or
|
|
99
|
+
rendering inventories. Optionally filtered to a single ``namespace``.
|
|
100
|
+
"""
|
|
101
|
+
root = manifolds_dir()
|
|
102
|
+
if not root.exists():
|
|
103
|
+
return
|
|
104
|
+
for ns_dir in sorted(root.iterdir()):
|
|
105
|
+
if not ns_dir.is_dir():
|
|
106
|
+
continue
|
|
107
|
+
if namespace is not None and ns_dir.name != namespace:
|
|
108
|
+
continue
|
|
109
|
+
for mdir in sorted(ns_dir.iterdir()):
|
|
110
|
+
if not (mdir / "manifold.json").exists():
|
|
111
|
+
continue
|
|
112
|
+
try:
|
|
113
|
+
yield ns_dir.name, ManifoldFolder.load(
|
|
114
|
+
mdir, verify_manifest=False,
|
|
115
|
+
)
|
|
116
|
+
except ManifoldFormatError:
|
|
117
|
+
continue
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
#: Namespaces no manifold may be authored under. ``jlens`` and ``sae`` are
|
|
121
|
+
#: lazily-resolved per-model steering tiers; a manifold folder under either
|
|
122
|
+
#: name would shadow that resolution.
|
|
123
|
+
RESERVED_NAMESPACES = frozenset({"jlens", "sae"})
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
def _validate_ns_name(namespace: str, name: str) -> None:
|
|
127
|
+
"""Shared name/namespace gate for every folder-creation entry point."""
|
|
128
|
+
if not NAME_REGEX.match(name):
|
|
129
|
+
raise ManifoldFormatError(
|
|
130
|
+
f"manifold name {name!r} invalid; must match {NAME_REGEX.pattern}"
|
|
131
|
+
)
|
|
132
|
+
if not NAME_REGEX.match(namespace):
|
|
133
|
+
raise ManifoldFormatError(
|
|
134
|
+
f"manifold namespace {namespace!r} invalid; "
|
|
135
|
+
f"must match {NAME_REGEX.pattern}"
|
|
136
|
+
)
|
|
137
|
+
if namespace in RESERVED_NAMESPACES:
|
|
138
|
+
raise ManifoldFormatError(
|
|
139
|
+
f"manifold namespace {namespace!r} is reserved — "
|
|
140
|
+
f"'jlens/<word>' resolves through the model's Jacobian lens, "
|
|
141
|
+
f"not a manifold folder"
|
|
142
|
+
)
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
def _validate_authored_nodes(name: str, domain: Any, nodes: Any) -> None:
|
|
146
|
+
"""Validate a webui/CLI-authored node list against the domain.
|
|
147
|
+
|
|
148
|
+
``nodes`` is ``[{label, coords, statements}, ...]`` — the authoring
|
|
149
|
+
shape, statements inline (on disk they live in ``nodes/*.json``).
|
|
150
|
+
Raises :class:`ManifoldFormatError` on any problem so the caller
|
|
151
|
+
surfaces a clean 400 instead of a half-written folder.
|
|
152
|
+
"""
|
|
153
|
+
n = domain.intrinsic_dim
|
|
154
|
+
floor = min_nodes(n)
|
|
155
|
+
if not isinstance(nodes, list) or len(nodes) < floor:
|
|
156
|
+
raise ManifoldFormatError(
|
|
157
|
+
f"manifold {name!r} ({n}-D domain) needs >= {floor} nodes, "
|
|
158
|
+
f"got {len(nodes) if isinstance(nodes, list) else nodes!r}"
|
|
159
|
+
)
|
|
160
|
+
labels: list[str] = []
|
|
161
|
+
for entry in nodes:
|
|
162
|
+
if not isinstance(entry, dict):
|
|
163
|
+
raise ManifoldFormatError(
|
|
164
|
+
f"manifold {name!r} node {entry!r} must be an object"
|
|
165
|
+
)
|
|
166
|
+
label = entry.get("label")
|
|
167
|
+
if not isinstance(label, str) or not _LABEL_REGEX.match(label):
|
|
168
|
+
raise ManifoldFormatError(
|
|
169
|
+
f"manifold {name!r} node label {label!r} invalid; "
|
|
170
|
+
f"a node label is a grammar-addressable identifier "
|
|
171
|
+
f"(no '.', reserved as the bipolar separator) — "
|
|
172
|
+
f"must match {_LABEL_REGEX.pattern}"
|
|
173
|
+
)
|
|
174
|
+
coords = entry.get("coords")
|
|
175
|
+
if (
|
|
176
|
+
not isinstance(coords, list)
|
|
177
|
+
or len(coords) != n
|
|
178
|
+
or not all(
|
|
179
|
+
not isinstance(c, bool)
|
|
180
|
+
and isinstance(c, (int, float))
|
|
181
|
+
and math.isfinite(float(c))
|
|
182
|
+
for c in coords
|
|
183
|
+
)
|
|
184
|
+
):
|
|
185
|
+
raise ManifoldFormatError(
|
|
186
|
+
f"manifold {name!r} node {label!r} needs 'coords' of "
|
|
187
|
+
f"{n} number(s), got {coords!r}"
|
|
188
|
+
)
|
|
189
|
+
statements = entry.get("statements")
|
|
190
|
+
if (
|
|
191
|
+
not isinstance(statements, list)
|
|
192
|
+
or not statements
|
|
193
|
+
or not all(isinstance(s, str) and s.strip() for s in statements)
|
|
194
|
+
):
|
|
195
|
+
raise ManifoldFormatError(
|
|
196
|
+
f"manifold {name!r} node {label!r} needs a non-empty list "
|
|
197
|
+
f"of non-blank statement strings"
|
|
198
|
+
)
|
|
199
|
+
# ``role`` is optional; validate the slug shape when set, no-op
|
|
200
|
+
# otherwise. Family-unsupported is a fit-time concern.
|
|
201
|
+
_validate_node_role(name, label, entry.get("role"))
|
|
202
|
+
# ``kind`` is optional; validate the enum when set, no-op otherwise.
|
|
203
|
+
_validate_node_kind(name, label, entry.get("kind"))
|
|
204
|
+
labels.append(label)
|
|
205
|
+
if len(set(labels)) != len(labels):
|
|
206
|
+
raise ManifoldFormatError(f"manifold {name!r} has duplicate node labels")
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
def _write_node_corpus(folder: Path, nodes: list[dict[str, Any]]) -> None:
|
|
210
|
+
"""(Re)write the ``nodes/`` corpus from an authored node list.
|
|
211
|
+
|
|
212
|
+
Staged: the new corpus is written to ``nodes.staging/`` in full,
|
|
213
|
+
then swapped in. A write or IO error mid-corpus therefore leaves
|
|
214
|
+
the existing ``nodes/`` untouched rather than half-rewritten — the
|
|
215
|
+
destructive window shrinks to one ``rmtree`` + one ``rename``.
|
|
216
|
+
"""
|
|
217
|
+
nodes_dir = folder / "nodes"
|
|
218
|
+
staging = folder / "nodes.staging"
|
|
219
|
+
if staging.exists():
|
|
220
|
+
shutil.rmtree(staging)
|
|
221
|
+
staging.mkdir(parents=True)
|
|
222
|
+
for idx, entry in enumerate(nodes):
|
|
223
|
+
write_json_atomic(
|
|
224
|
+
staging / _node_filename(idx, entry["label"]),
|
|
225
|
+
[str(s) for s in entry["statements"]],
|
|
226
|
+
)
|
|
227
|
+
if nodes_dir.exists():
|
|
228
|
+
shutil.rmtree(nodes_dir)
|
|
229
|
+
staging.rename(nodes_dir)
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
def _load_with_advisories(folder: Path) -> tuple["ManifoldFolder", list[str]]:
|
|
233
|
+
"""Load a manifold folder, returning it plus any authoring-quality warnings."""
|
|
234
|
+
with warnings.catch_warnings(record=True) as caught:
|
|
235
|
+
warnings.simplefilter("always")
|
|
236
|
+
mf = ManifoldFolder.load(folder, verify_manifest=False)
|
|
237
|
+
return mf, [str(w.message) for w in caught]
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
@_lock_namespace_name
|
|
241
|
+
def create_manifold_folder(
|
|
242
|
+
namespace: str,
|
|
243
|
+
name: str,
|
|
244
|
+
description: str,
|
|
245
|
+
domain_spec: dict[str, Any],
|
|
246
|
+
nodes: list[dict[str, Any]],
|
|
247
|
+
) -> tuple[Path, list[str]]:
|
|
248
|
+
"""Author a fresh manifold artifact folder on disk.
|
|
249
|
+
|
|
250
|
+
``domain_spec`` is the ``manifold.json`` ``domain`` tagged union;
|
|
251
|
+
``nodes`` is ``[{label, coords, statements}, ...]``. Writes
|
|
252
|
+
``manifold.json`` (with an empty ``files`` manifest — there are no
|
|
253
|
+
fitted tensors yet; ``fit`` back-fills it) and the ``nodes/`` corpus.
|
|
254
|
+
Returns ``(folder, advisories)`` where ``advisories`` are the soft
|
|
255
|
+
poisedness/flat-axis warnings so the UI can flag a deficient layout
|
|
256
|
+
before a fit is paid for.
|
|
257
|
+
|
|
258
|
+
Raises :class:`ManifoldFormatError` on any validation failure and
|
|
259
|
+
:class:`FileExistsError` when a manifold already lives at the path.
|
|
260
|
+
"""
|
|
261
|
+
_validate_ns_name(namespace, name)
|
|
262
|
+
try:
|
|
263
|
+
from drowse.core.manifold import normalize_domain_spec
|
|
264
|
+
|
|
265
|
+
domain = domain_from_spec(normalize_domain_spec(domain_spec))
|
|
266
|
+
except (ValueError, KeyError) as e:
|
|
267
|
+
raise ManifoldFormatError(f"invalid manifold domain: {e}") from e
|
|
268
|
+
_validate_authored_nodes(name, domain, nodes)
|
|
269
|
+
|
|
270
|
+
folder = manifold_dir(namespace, name)
|
|
271
|
+
if (folder / "manifold.json").exists():
|
|
272
|
+
raise FileExistsError(f"manifold {namespace}/{name} already exists")
|
|
273
|
+
|
|
274
|
+
folder.mkdir(parents=True, exist_ok=True)
|
|
275
|
+
_write_node_corpus(folder, nodes)
|
|
276
|
+
payload: dict[str, Any] = {
|
|
277
|
+
"format_version": MANIFOLD_FORMAT_VERSION,
|
|
278
|
+
"name": name,
|
|
279
|
+
"description": description,
|
|
280
|
+
"fit_mode": "authored",
|
|
281
|
+
"domain": domain.to_spec(),
|
|
282
|
+
"nodes": [
|
|
283
|
+
_node_payload_authored(
|
|
284
|
+
entry["label"], entry["coords"], entry.get("role"),
|
|
285
|
+
entry.get("kind"),
|
|
286
|
+
)
|
|
287
|
+
for entry in nodes
|
|
288
|
+
],
|
|
289
|
+
"files": {},
|
|
290
|
+
"source": "local",
|
|
291
|
+
"tags": [],
|
|
292
|
+
"template_ref": None,
|
|
293
|
+
}
|
|
294
|
+
write_json_atomic(folder / "manifold.json", payload)
|
|
295
|
+
invalidate_selector_index()
|
|
296
|
+
|
|
297
|
+
_, advisories = _load_with_advisories(folder)
|
|
298
|
+
return folder, advisories
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
def _validate_discover_corpora(name: str, node_corpora: object) -> None:
|
|
302
|
+
"""Validate a discover-mode node corpus dict.
|
|
303
|
+
|
|
304
|
+
``node_corpora`` is ``{label: [statement, ...]}`` — the authoring
|
|
305
|
+
shape for discover mode, where coords are derived at fit time and
|
|
306
|
+
the user only supplies labels + statements. Labels must match
|
|
307
|
+
:data:`_LABEL_REGEX` (the grammar-addressable identifier subset —
|
|
308
|
+
no ``.``) and every statement list must be non-empty strings.
|
|
309
|
+
"""
|
|
310
|
+
if not isinstance(node_corpora, dict) or not node_corpora:
|
|
311
|
+
raise ManifoldFormatError(
|
|
312
|
+
f"discover manifold {name!r} needs a non-empty "
|
|
313
|
+
f"{{label: [statements]}} dict"
|
|
314
|
+
)
|
|
315
|
+
for label, statements in node_corpora.items():
|
|
316
|
+
if not isinstance(label, str) or not _LABEL_REGEX.match(label):
|
|
317
|
+
raise ManifoldFormatError(
|
|
318
|
+
f"discover manifold {name!r} label {label!r} invalid; "
|
|
319
|
+
f"a node label is a grammar-addressable identifier "
|
|
320
|
+
f"(no '.', reserved as the bipolar separator) — "
|
|
321
|
+
f"must match {_LABEL_REGEX.pattern}"
|
|
322
|
+
)
|
|
323
|
+
if (
|
|
324
|
+
not isinstance(statements, list)
|
|
325
|
+
or not statements
|
|
326
|
+
or not all(isinstance(s, str) and s.strip() for s in statements)
|
|
327
|
+
):
|
|
328
|
+
raise ManifoldFormatError(
|
|
329
|
+
f"discover manifold {name!r} node {label!r} needs a "
|
|
330
|
+
f"non-empty list of non-blank statement strings"
|
|
331
|
+
)
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
def _validate_discover_labels(name: str, labels: object) -> list[str]:
|
|
335
|
+
"""Return validated discover labels, preserving order."""
|
|
336
|
+
if not isinstance(labels, list) or not labels:
|
|
337
|
+
raise ManifoldFormatError(
|
|
338
|
+
f"discover manifold {name!r} needs at least one node label"
|
|
339
|
+
)
|
|
340
|
+
out: list[str] = []
|
|
341
|
+
seen: set[str] = set()
|
|
342
|
+
for label in labels:
|
|
343
|
+
if not isinstance(label, str) or not _LABEL_REGEX.match(label):
|
|
344
|
+
raise ManifoldFormatError(
|
|
345
|
+
f"discover manifold {name!r} label {label!r} invalid; "
|
|
346
|
+
f"a node label is a grammar-addressable identifier "
|
|
347
|
+
f"(no '.', reserved as the bipolar separator) — "
|
|
348
|
+
f"must match {_LABEL_REGEX.pattern}"
|
|
349
|
+
)
|
|
350
|
+
if label in seen:
|
|
351
|
+
raise ManifoldFormatError(
|
|
352
|
+
f"discover manifold {name!r} duplicate node label {label!r}"
|
|
353
|
+
)
|
|
354
|
+
seen.add(label)
|
|
355
|
+
out.append(label)
|
|
356
|
+
return out
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
@_lock_namespace_name
|
|
360
|
+
def create_manifold_from_template(
|
|
361
|
+
namespace: str,
|
|
362
|
+
name: str,
|
|
363
|
+
description: str,
|
|
364
|
+
*,
|
|
365
|
+
template_ref: str,
|
|
366
|
+
fit_mode: str,
|
|
367
|
+
hyperparams: Optional[dict[str, Any]] = None,
|
|
368
|
+
force: bool = False,
|
|
369
|
+
) -> Path:
|
|
370
|
+
"""Author a discover manifold whose node corpora derive from a template.
|
|
371
|
+
|
|
372
|
+
Resolves the standalone template ``template_ref`` (a
|
|
373
|
+
:class:`drowse.io.templates.TemplateFolder` selector), expands its
|
|
374
|
+
``values × contexts`` into per-value node corpora (the slot-filled assistant
|
|
375
|
+
turns, ``corpus[i]`` aligned to ``contexts[i]``), and writes a discover
|
|
376
|
+
folder that stores **both** the derived corpus (``nodes/``, like any discover
|
|
377
|
+
folder) and the ``template_ref`` — so a later ``manifold fit`` resolves the
|
|
378
|
+
template's multi-turn contexts as the per-node elicitation prefixes. The
|
|
379
|
+
template is the authoring source of truth; the corpus is its materialization.
|
|
380
|
+
Mirrors the ``generate → fit`` split: fit it next with
|
|
381
|
+
``drowse manifold fit <name> -m MODEL``.
|
|
382
|
+
"""
|
|
383
|
+
from drowse.io.templates import resolve_template
|
|
384
|
+
|
|
385
|
+
_validate_ns_name(namespace, name)
|
|
386
|
+
if fit_mode not in _FIT_MODES_DISCOVER:
|
|
387
|
+
raise ManifoldFormatError(
|
|
388
|
+
f"discover manifold {name!r} fit_mode {fit_mode!r} invalid; "
|
|
389
|
+
f"expected one of {sorted(_FIT_MODES_DISCOVER)}"
|
|
390
|
+
)
|
|
391
|
+
tmpl = resolve_template(template_ref)
|
|
392
|
+
node_corpora = tmpl.node_corpora()
|
|
393
|
+
_validate_discover_labels(name, list(node_corpora))
|
|
394
|
+
sanitized_hyperparams = sanitize_hyperparams(fit_mode, hyperparams)
|
|
395
|
+
ref = f"{tmpl.path.parent.name}/{tmpl.name}" if tmpl.path else tmpl.name
|
|
396
|
+
folder = manifold_dir(namespace, name)
|
|
397
|
+
if folder.exists():
|
|
398
|
+
if force:
|
|
399
|
+
reset_manifold_folder(folder)
|
|
400
|
+
elif not (folder / "manifold.json").exists():
|
|
401
|
+
raise FileExistsError(
|
|
402
|
+
f"manifold {namespace}/{name} has an incomplete folder; "
|
|
403
|
+
"pass force=True to replace it"
|
|
404
|
+
)
|
|
405
|
+
return create_discover_manifold_folder(
|
|
406
|
+
namespace, name, description,
|
|
407
|
+
fit_mode=fit_mode,
|
|
408
|
+
node_corpora=node_corpora,
|
|
409
|
+
hyperparams=sanitized_hyperparams,
|
|
410
|
+
template_ref=ref,
|
|
411
|
+
)
|
|
412
|
+
|
|
413
|
+
|
|
414
|
+
@_lock_namespace_name
|
|
415
|
+
def create_discover_manifold_folder(
|
|
416
|
+
namespace: str,
|
|
417
|
+
name: str,
|
|
418
|
+
description: str,
|
|
419
|
+
*,
|
|
420
|
+
fit_mode: str,
|
|
421
|
+
node_corpora: dict[str, list[str]],
|
|
422
|
+
hyperparams: Optional[dict[str, Any]] = None,
|
|
423
|
+
node_roles: Optional[dict[str, str | None]] = None,
|
|
424
|
+
node_kinds: Optional[dict[str, str | None]] = None,
|
|
425
|
+
template_ref: Optional[str] = None,
|
|
426
|
+
) -> Path:
|
|
427
|
+
"""Author a fresh discover-mode manifold artifact folder on disk.
|
|
428
|
+
|
|
429
|
+
``fit_mode`` is one of ``"pca"`` / ``"spectral"``;
|
|
430
|
+
``node_corpora`` is the authoring shape ``{label: [statement, ...]}``.
|
|
431
|
+
Writes ``manifold.json`` (no ``domain``, no per-node ``coords``,
|
|
432
|
+
empty ``files`` manifest) and the ``nodes/`` corpus. Returns the
|
|
433
|
+
folder path.
|
|
434
|
+
|
|
435
|
+
Current A2 conversational corpora use the bundled global baseline prompts,
|
|
436
|
+
not per-manifold scenario lists.
|
|
437
|
+
|
|
438
|
+
Coords are derived per-model at fit time
|
|
439
|
+
(:func:`drowse.core.manifold.discover_coords` runs over the per-node
|
|
440
|
+
centroids), so authoring quality cannot be advised here the way it
|
|
441
|
+
is for authored manifolds — the spectral connectivity check and PCA
|
|
442
|
+
variance-floor diagnostics surface only on the fit itself.
|
|
443
|
+
|
|
444
|
+
Raises :class:`ManifoldFormatError` on any validation failure and
|
|
445
|
+
:class:`FileExistsError` when a manifold already lives at the path.
|
|
446
|
+
|
|
447
|
+
Cross-model transfer of a fitted layout is handled by
|
|
448
|
+
:func:`drowse.io.manifold_lifecycle.transfer_manifold` — it reuses the
|
|
449
|
+
same per-layer Procrustes map (:mod:`drowse.io.alignment`) the
|
|
450
|
+
``vector transfer`` path builds and writes a ``_from-<safe_src>``
|
|
451
|
+
variant tensor, mirroring how transferred steering vectors land.
|
|
452
|
+
"""
|
|
453
|
+
return _create_discover_manifold_folder(
|
|
454
|
+
namespace, name, description,
|
|
455
|
+
fit_mode=fit_mode,
|
|
456
|
+
node_corpora=node_corpora,
|
|
457
|
+
hyperparams=hyperparams,
|
|
458
|
+
node_roles=node_roles,
|
|
459
|
+
node_kinds=node_kinds,
|
|
460
|
+
template_ref=template_ref,
|
|
461
|
+
)
|
|
462
|
+
|
|
463
|
+
|
|
464
|
+
def _create_discover_manifold_folder(
|
|
465
|
+
namespace: str,
|
|
466
|
+
name: str,
|
|
467
|
+
description: str,
|
|
468
|
+
*,
|
|
469
|
+
fit_mode: str,
|
|
470
|
+
node_corpora: dict[str, list[str]],
|
|
471
|
+
hyperparams: Optional[dict[str, Any]] = None,
|
|
472
|
+
node_roles: Optional[dict[str, str | None]] = None,
|
|
473
|
+
node_kinds: Optional[dict[str, str | None]] = None,
|
|
474
|
+
template_ref: Optional[str] = None,
|
|
475
|
+
target_folder: Path | None = None,
|
|
476
|
+
) -> Path:
|
|
477
|
+
"""Internal discover writer."""
|
|
478
|
+
_validate_ns_name(namespace, name)
|
|
479
|
+
if fit_mode not in _FIT_MODES_DISCOVER:
|
|
480
|
+
raise ManifoldFormatError(
|
|
481
|
+
f"discover manifold {name!r} fit_mode {fit_mode!r} invalid; "
|
|
482
|
+
f"expected one of {sorted(_FIT_MODES_DISCOVER)}"
|
|
483
|
+
)
|
|
484
|
+
_validate_discover_corpora(name, node_corpora)
|
|
485
|
+
# Validate the optional ``node_roles`` mapping up front, before any
|
|
486
|
+
# corpus is written — keeps the failure mode consistent (no
|
|
487
|
+
# half-built folder on a bad role slug). Extra keys outside the
|
|
488
|
+
# corpus labels raise; missing keys default to ``None``.
|
|
489
|
+
roles_resolved: dict[str, str | None] = dict.fromkeys(node_corpora)
|
|
490
|
+
if node_roles is not None:
|
|
491
|
+
unknown = set(node_roles) - set(node_corpora)
|
|
492
|
+
if unknown:
|
|
493
|
+
raise ManifoldFormatError(
|
|
494
|
+
f"discover manifold {name!r} node_roles carries labels "
|
|
495
|
+
f"not in node_corpora: {sorted(unknown)}"
|
|
496
|
+
)
|
|
497
|
+
for label, role in node_roles.items():
|
|
498
|
+
roles_resolved[label] = _validate_node_role(name, label, role)
|
|
499
|
+
kinds_resolved: dict[str, str | None] = dict.fromkeys(node_corpora)
|
|
500
|
+
if node_kinds is not None:
|
|
501
|
+
unknown_k = set(node_kinds) - set(node_corpora)
|
|
502
|
+
if unknown_k:
|
|
503
|
+
raise ManifoldFormatError(
|
|
504
|
+
f"discover manifold {name!r} node_kinds carries labels "
|
|
505
|
+
f"not in node_corpora: {sorted(unknown_k)}"
|
|
506
|
+
)
|
|
507
|
+
for label, kind in node_kinds.items():
|
|
508
|
+
kinds_resolved[label] = _validate_node_kind(name, label, kind)
|
|
509
|
+
|
|
510
|
+
folder = (
|
|
511
|
+
Path(target_folder) if target_folder is not None
|
|
512
|
+
else manifold_dir(namespace, name)
|
|
513
|
+
)
|
|
514
|
+
if (folder / "manifold.json").exists():
|
|
515
|
+
raise FileExistsError(f"manifold {namespace}/{name} already exists")
|
|
516
|
+
|
|
517
|
+
folder.mkdir(parents=True, exist_ok=True)
|
|
518
|
+
# ``_write_node_corpus`` takes the authored-shape list; convert.
|
|
519
|
+
authored_shape = [
|
|
520
|
+
{"label": label, "statements": statements}
|
|
521
|
+
for label, statements in node_corpora.items()
|
|
522
|
+
]
|
|
523
|
+
_write_node_corpus(folder, authored_shape)
|
|
524
|
+
# Drop cross-method hyperparam keys at the IO boundary so a stray
|
|
525
|
+
# ``k_nn`` on a PCA fit (or a stray ``var_threshold`` on a spectral
|
|
526
|
+
# fit) never lands in the manifest. Otherwise the dispatcher would
|
|
527
|
+
# raise ``TypeError`` at fit time and the folder would be unusable
|
|
528
|
+
# until manually edited.
|
|
529
|
+
payload: dict[str, Any] = {
|
|
530
|
+
"format_version": MANIFOLD_FORMAT_VERSION,
|
|
531
|
+
"name": name,
|
|
532
|
+
"description": description,
|
|
533
|
+
"fit_mode": fit_mode,
|
|
534
|
+
"hyperparams": sanitize_hyperparams(fit_mode, hyperparams),
|
|
535
|
+
"nodes": [
|
|
536
|
+
_node_payload_discover(label, roles_resolved[label], kinds_resolved[label])
|
|
537
|
+
for label in node_corpora
|
|
538
|
+
],
|
|
539
|
+
"files": {},
|
|
540
|
+
"source": "local",
|
|
541
|
+
"tags": [],
|
|
542
|
+
"template_ref": template_ref,
|
|
543
|
+
}
|
|
544
|
+
write_json_atomic(folder / "manifold.json", payload)
|
|
545
|
+
invalidate_selector_index()
|
|
546
|
+
return folder
|
|
547
|
+
|
|
548
|
+
|
|
549
|
+
@_lock_namespace_name
|
|
550
|
+
def create_baked_manifold_folder(
|
|
551
|
+
namespace: str,
|
|
552
|
+
name: str,
|
|
553
|
+
description: str,
|
|
554
|
+
manifold: "Any",
|
|
555
|
+
model_id: str,
|
|
556
|
+
*,
|
|
557
|
+
method: str,
|
|
558
|
+
tags: Optional[list[str]] = None,
|
|
559
|
+
source: str = "local",
|
|
560
|
+
force: bool = False,
|
|
561
|
+
components: Optional[dict[str, Any]] = None,
|
|
562
|
+
model_fingerprint: str,
|
|
563
|
+
model_id_is_safe: bool = False,
|
|
564
|
+
) -> tuple[Path, "ManifoldFolder"]:
|
|
565
|
+
"""Persist a corpus-less pre-baked Manifold as a ``fit_mode="baked"`` folder.
|
|
566
|
+
|
|
567
|
+
The single producer for corpus-less directions — ``merge`` outputs and
|
|
568
|
+
imported control vectors. ``manifold`` is an already-fitted
|
|
569
|
+
:class:`drowse.core.manifold.Manifold` (typically the affine ``R = 1`` ray
|
|
570
|
+
from :func:`drowse.core.capture.fold_directions_to_subspace`); its geometry
|
|
571
|
+
is frozen into the per-model ``<safe_model>.safetensors`` tensor, the folder
|
|
572
|
+
carries no ``nodes/`` corpus, and it can never re-fit.
|
|
573
|
+
|
|
574
|
+
Writes ``manifold.json`` (``fit_mode="baked"``, the manifold's display
|
|
575
|
+
``domain``, label-only nodes) + the per-model tensor + sidecar, then
|
|
576
|
+
back-fills the ``files`` integrity manifest. ``method`` is the sidecar
|
|
577
|
+
provenance tag (``"merge"`` / ``"imported"``); ``components`` rides the
|
|
578
|
+
sidecar as merge provenance (``merge`` only). Returns
|
|
579
|
+
``(folder, ManifoldFolder)``.
|
|
580
|
+
|
|
581
|
+
For a multi-model merge, call this once for the first model and
|
|
582
|
+
:func:`save_baked_manifold_tensor` for each subsequent model (sharing the
|
|
583
|
+
one ``manifold.json``); each call publishes that pair's ``files`` proof
|
|
584
|
+
incrementally, so there is no final scan/rewrite over historical tensors.
|
|
585
|
+
|
|
586
|
+
Raises :class:`ManifoldFormatError` on an invalid name/namespace and
|
|
587
|
+
:class:`FileExistsError` when a manifold already lives at the path and
|
|
588
|
+
``force`` is ``False``.
|
|
589
|
+
"""
|
|
590
|
+
_validate_ns_name(namespace, name)
|
|
591
|
+
if not model_fingerprint:
|
|
592
|
+
raise ValueError("baked manifold tensors require a proven model fingerprint")
|
|
593
|
+
from drowse.io.paths import tensor_filename
|
|
594
|
+
|
|
595
|
+
# Validate the destination filename before a force reset can remove the
|
|
596
|
+
# prior corpus-less geometry.
|
|
597
|
+
tensor_filename(model_id, model_id_is_safe=model_id_is_safe)
|
|
598
|
+
|
|
599
|
+
labels = list(manifold.node_labels)
|
|
600
|
+
payload: dict[str, Any] = {
|
|
601
|
+
"format_version": MANIFOLD_FORMAT_VERSION,
|
|
602
|
+
"name": name,
|
|
603
|
+
"description": description,
|
|
604
|
+
"fit_mode": "baked",
|
|
605
|
+
"domain": manifold.domain.to_spec(),
|
|
606
|
+
"nodes": [_node_payload_discover(label, None) for label in labels],
|
|
607
|
+
"files": {},
|
|
608
|
+
"source": source or "local",
|
|
609
|
+
"tags": [str(t) for t in (tags or [])],
|
|
610
|
+
"template_ref": None,
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
folder = manifold_dir(namespace, name)
|
|
614
|
+
manifest_path = folder / "manifold.json"
|
|
615
|
+
if folder.exists() and not manifest_path.exists():
|
|
616
|
+
if force:
|
|
617
|
+
reset_manifold_folder(folder)
|
|
618
|
+
else:
|
|
619
|
+
raise FileExistsError(
|
|
620
|
+
f"manifold {namespace}/{name} has an incomplete folder; "
|
|
621
|
+
"pass force=True to replace it"
|
|
622
|
+
)
|
|
623
|
+
if manifest_path.exists():
|
|
624
|
+
if force:
|
|
625
|
+
reset_manifold_folder(folder)
|
|
626
|
+
elif not _recoverable_baked_first_publication(
|
|
627
|
+
folder, payload, model_id, model_id_is_safe=model_id_is_safe,
|
|
628
|
+
):
|
|
629
|
+
raise FileExistsError(f"manifold {namespace}/{name} already exists")
|
|
630
|
+
if not manifest_path.exists():
|
|
631
|
+
folder.mkdir(parents=True, exist_ok=True)
|
|
632
|
+
write_json_atomic(manifest_path, payload)
|
|
633
|
+
invalidate_selector_index()
|
|
634
|
+
|
|
635
|
+
save_baked_manifold_tensor(
|
|
636
|
+
folder, manifold, model_id, method=method, components=components,
|
|
637
|
+
model_fingerprint=model_fingerprint,
|
|
638
|
+
model_id_is_safe=model_id_is_safe,
|
|
639
|
+
)
|
|
640
|
+
|
|
641
|
+
# Publication already proved the newly written pair in ``files``. The
|
|
642
|
+
# returned object is metadata-only; do not immediately reread every fitted
|
|
643
|
+
# payload merely to reconstruct it.
|
|
644
|
+
mf = ManifoldFolder.load(folder, verify_manifest=False)
|
|
645
|
+
return folder, mf
|
|
646
|
+
|
|
647
|
+
|
|
648
|
+
def _recoverable_baked_first_publication(
|
|
649
|
+
folder: Path,
|
|
650
|
+
expected_manifest: dict[str, Any],
|
|
651
|
+
model_id: str,
|
|
652
|
+
*,
|
|
653
|
+
model_id_is_safe: bool,
|
|
654
|
+
) -> bool:
|
|
655
|
+
"""Whether ``folder`` is the interrupted first write of this baked target."""
|
|
656
|
+
|
|
657
|
+
from drowse.io.manifold_folder import manifold_folder_tensor_paths
|
|
658
|
+
from drowse.io.integrity import verify_integrity
|
|
659
|
+
from drowse.io.paths import parse_tensor_filename, tensor_filename
|
|
660
|
+
|
|
661
|
+
try:
|
|
662
|
+
payload = json.loads((folder / "manifold.json").read_text())
|
|
663
|
+
except (OSError, json.JSONDecodeError, TypeError):
|
|
664
|
+
return False
|
|
665
|
+
# Transaction-only fields are allowed to differ; the authoring identity must
|
|
666
|
+
# otherwise be exactly the skeleton this request would have created.
|
|
667
|
+
actual_identity = {
|
|
668
|
+
key: value for key, value in payload.items()
|
|
669
|
+
if key not in {"files", "artifact_id", "fit_epochs"}
|
|
670
|
+
}
|
|
671
|
+
expected_identity = {
|
|
672
|
+
key: value for key, value in expected_manifest.items()
|
|
673
|
+
if key not in {"files", "artifact_id", "fit_epochs"}
|
|
674
|
+
}
|
|
675
|
+
if actual_identity != expected_identity:
|
|
676
|
+
return False
|
|
677
|
+
|
|
678
|
+
target = folder / tensor_filename(
|
|
679
|
+
model_id, model_id_is_safe=model_id_is_safe,
|
|
680
|
+
)
|
|
681
|
+
if any(path != target for path in manifold_folder_tensor_paths(folder)):
|
|
682
|
+
return False
|
|
683
|
+
pair_names = {target.name, target.with_suffix(".json").name}
|
|
684
|
+
files = payload.get("files", {})
|
|
685
|
+
if not isinstance(files, dict):
|
|
686
|
+
return False
|
|
687
|
+
expected = {name: files[name] for name in pair_names if name in files}
|
|
688
|
+
if len(expected) == 2 and verify_integrity(folder, expected)[0]:
|
|
689
|
+
return False # a complete, trusted artifact preserves exists semantics
|
|
690
|
+
# Do not adopt an interrupted skeleton that also carries some other model's
|
|
691
|
+
# fitted pair; that is a multi-model merge concern with stronger provenance
|
|
692
|
+
# checks in ``io.bake``.
|
|
693
|
+
for filename in files:
|
|
694
|
+
candidate = (
|
|
695
|
+
Path(filename).with_suffix(".safetensors").name
|
|
696
|
+
if filename.endswith(".json") else filename
|
|
697
|
+
)
|
|
698
|
+
if parse_tensor_filename(candidate) is not None and filename not in pair_names:
|
|
699
|
+
return False
|
|
700
|
+
return True
|
|
701
|
+
|
|
702
|
+
|
|
703
|
+
@_lock_folder_arg
|
|
704
|
+
def save_baked_manifold_tensor(
|
|
705
|
+
folder: Path,
|
|
706
|
+
manifold: "Any",
|
|
707
|
+
model_id: str,
|
|
708
|
+
*,
|
|
709
|
+
method: str,
|
|
710
|
+
components: Optional[dict[str, Any]] = None,
|
|
711
|
+
model_fingerprint: str,
|
|
712
|
+
model_id_is_safe: bool = False,
|
|
713
|
+
) -> Path:
|
|
714
|
+
"""Write one per-model tensor + sidecar into a ``fit_mode="baked"`` folder.
|
|
715
|
+
|
|
716
|
+
Factored out of :func:`create_baked_manifold_folder` so a multi-model merge
|
|
717
|
+
can share one ``manifold.json`` across every target model's tensor. The
|
|
718
|
+
caller is responsible for the surrounding ``manifold.json`` write once. Pair
|
|
719
|
+
publication and its manifest proof happen in this same folder transaction;
|
|
720
|
+
an interruption between them is repaired by overwriting/adopting the target
|
|
721
|
+
on the next producer retry. Returns the tensor path.
|
|
722
|
+
"""
|
|
723
|
+
from drowse.io.manifold_tensors import save_manifold
|
|
724
|
+
from drowse.io.paths import tensor_filename
|
|
725
|
+
|
|
726
|
+
# ``nodes_sha256`` is provenance-only for baked (never re-fits), computed
|
|
727
|
+
# from the same identity ``ManifoldFolder.nodes_sha256`` hashes.
|
|
728
|
+
nodes_sha = hashlib.sha256(
|
|
729
|
+
_canonical_json(
|
|
730
|
+
{"fit_mode": "baked", "node_labels": list(manifold.node_labels)}
|
|
731
|
+
)
|
|
732
|
+
).hexdigest()
|
|
733
|
+
save_meta: dict[str, object] = {
|
|
734
|
+
"method": method,
|
|
735
|
+
"fit_mode": "baked",
|
|
736
|
+
"nodes_sha256": nodes_sha,
|
|
737
|
+
}
|
|
738
|
+
if not model_fingerprint:
|
|
739
|
+
raise ValueError("baked manifold tensors require a proven model fingerprint")
|
|
740
|
+
save_meta["model_fingerprint"] = model_fingerprint
|
|
741
|
+
share_metric = manifold.metadata.get("share_metric")
|
|
742
|
+
if share_metric:
|
|
743
|
+
save_meta["share_metric"] = share_metric
|
|
744
|
+
if components:
|
|
745
|
+
save_meta["components"] = components
|
|
746
|
+
if method == "merge":
|
|
747
|
+
from drowse.io.manifold_folder import MERGE_BAKE_POLICY
|
|
748
|
+
|
|
749
|
+
save_meta["bake_policy"] = MERGE_BAKE_POLICY
|
|
750
|
+
tensor_path = folder / tensor_filename(
|
|
751
|
+
model_id, model_id_is_safe=model_id_is_safe,
|
|
752
|
+
)
|
|
753
|
+
save_manifold(manifold, tensor_path, save_meta)
|
|
754
|
+
ManifoldFolder.load(
|
|
755
|
+
folder, verify_manifest=False,
|
|
756
|
+
).update_file_hashes(tensor_path, tensor_path.with_suffix(".json"))
|
|
757
|
+
return tensor_path
|
|
758
|
+
|
|
759
|
+
|
|
760
|
+
@_lock_namespace_name
|
|
761
|
+
def init_discover_manifold_folder(
|
|
762
|
+
namespace: str,
|
|
763
|
+
name: str,
|
|
764
|
+
description: str,
|
|
765
|
+
*,
|
|
766
|
+
fit_mode: str,
|
|
767
|
+
labels: list[str],
|
|
768
|
+
hyperparams: Optional[dict[str, Any]] = None,
|
|
769
|
+
node_roles: Optional[dict[str, str | None]] = None,
|
|
770
|
+
node_kinds: Optional[dict[str, str | None]] = None,
|
|
771
|
+
) -> Path:
|
|
772
|
+
"""Create a discover-mode skeleton for *streaming* node writes.
|
|
773
|
+
|
|
774
|
+
Writes ``manifold.json`` (label-only nodes, empty ``files``
|
|
775
|
+
manifest) and an empty ``nodes/`` dir, then returns the folder.
|
|
776
|
+
Node corpora are written incrementally via
|
|
777
|
+
:func:`append_discover_manifold_node` (one file per completed node) —
|
|
778
|
+
the streaming companion to :func:`create_discover_manifold_folder`
|
|
779
|
+
for big-roster generation, where holding every corpus in memory at
|
|
780
|
+
once is wasteful and a crash should keep the nodes already finished.
|
|
781
|
+
|
|
782
|
+
``labels`` is the full node label list in on-disk order; each must
|
|
783
|
+
be unique and match :data:`_LABEL_REGEX`. Raises
|
|
784
|
+
:class:`ManifoldFormatError` on a bad name / namespace / fit_mode /
|
|
785
|
+
label / role, and :class:`FileExistsError` when a manifold already
|
|
786
|
+
lives at the path.
|
|
787
|
+
"""
|
|
788
|
+
_validate_ns_name(namespace, name)
|
|
789
|
+
if fit_mode not in _FIT_MODES_DISCOVER:
|
|
790
|
+
raise ManifoldFormatError(
|
|
791
|
+
f"discover manifold {name!r} fit_mode {fit_mode!r} invalid; "
|
|
792
|
+
f"expected one of {sorted(_FIT_MODES_DISCOVER)}"
|
|
793
|
+
)
|
|
794
|
+
labels = _validate_discover_labels(name, labels)
|
|
795
|
+
|
|
796
|
+
roles_resolved: dict[str, str | None] = dict.fromkeys(labels)
|
|
797
|
+
if node_roles is not None:
|
|
798
|
+
unknown = set(node_roles) - set(labels)
|
|
799
|
+
if unknown:
|
|
800
|
+
raise ManifoldFormatError(
|
|
801
|
+
f"discover manifold {name!r} node_roles carries labels "
|
|
802
|
+
f"not in the roster: {sorted(unknown)}"
|
|
803
|
+
)
|
|
804
|
+
for label, role in node_roles.items():
|
|
805
|
+
roles_resolved[label] = _validate_node_role(name, label, role)
|
|
806
|
+
kinds_resolved: dict[str, str | None] = dict.fromkeys(labels)
|
|
807
|
+
if node_kinds is not None:
|
|
808
|
+
unknown_k = set(node_kinds) - set(labels)
|
|
809
|
+
if unknown_k:
|
|
810
|
+
raise ManifoldFormatError(
|
|
811
|
+
f"discover manifold {name!r} node_kinds carries labels "
|
|
812
|
+
f"not in the roster: {sorted(unknown_k)}"
|
|
813
|
+
)
|
|
814
|
+
for label, kind in node_kinds.items():
|
|
815
|
+
kinds_resolved[label] = _validate_node_kind(name, label, kind)
|
|
816
|
+
|
|
817
|
+
folder = manifold_dir(namespace, name)
|
|
818
|
+
if (folder / "manifold.json").exists():
|
|
819
|
+
raise FileExistsError(f"manifold {namespace}/{name} already exists")
|
|
820
|
+
folder.mkdir(parents=True, exist_ok=True)
|
|
821
|
+
(folder / "nodes").mkdir(exist_ok=True)
|
|
822
|
+
|
|
823
|
+
payload: dict[str, Any] = {
|
|
824
|
+
"format_version": MANIFOLD_FORMAT_VERSION,
|
|
825
|
+
"name": name,
|
|
826
|
+
"description": description,
|
|
827
|
+
"fit_mode": fit_mode,
|
|
828
|
+
"hyperparams": sanitize_hyperparams(fit_mode, hyperparams),
|
|
829
|
+
"nodes": [
|
|
830
|
+
_node_payload_discover(label, roles_resolved[label], kinds_resolved[label])
|
|
831
|
+
for label in labels
|
|
832
|
+
],
|
|
833
|
+
"files": {},
|
|
834
|
+
"source": "local",
|
|
835
|
+
"tags": [],
|
|
836
|
+
"template_ref": None,
|
|
837
|
+
}
|
|
838
|
+
write_json_atomic(folder / "manifold.json", payload)
|
|
839
|
+
invalidate_selector_index()
|
|
840
|
+
return folder
|
|
841
|
+
|
|
842
|
+
|
|
843
|
+
@_lock_folder_arg
|
|
844
|
+
def append_discover_manifold_node(
|
|
845
|
+
folder: Path, index: int, label: str, statements: list[str],
|
|
846
|
+
) -> None:
|
|
847
|
+
"""Write one discover-mode node corpus to ``nodes/NN_<label>.json``.
|
|
848
|
+
|
|
849
|
+
Streaming companion to :func:`init_discover_manifold_folder`:
|
|
850
|
+
``index`` is the node's position in the skeleton's label order, so
|
|
851
|
+
the ``NN_`` filename prefix matches ``manifold.json``. Each file is
|
|
852
|
+
written atomically; unlike :func:`_write_node_corpus` there is no
|
|
853
|
+
whole-corpus staging swap — that is the point, so a run that dies
|
|
854
|
+
part-way keeps the nodes it already finished.
|
|
855
|
+
"""
|
|
856
|
+
label_in: Any = label
|
|
857
|
+
if not isinstance(label_in, str) or not _LABEL_REGEX.match(label_in):
|
|
858
|
+
raise ManifoldFormatError(
|
|
859
|
+
f"discover manifold node label {label!r} invalid; "
|
|
860
|
+
f"must match {_LABEL_REGEX.pattern}"
|
|
861
|
+
)
|
|
862
|
+
statements_in: Any = statements
|
|
863
|
+
if (
|
|
864
|
+
not isinstance(statements_in, list)
|
|
865
|
+
or not statements_in
|
|
866
|
+
or not all(isinstance(s, str) and s.strip() for s in statements_in)
|
|
867
|
+
):
|
|
868
|
+
raise ManifoldFormatError(
|
|
869
|
+
f"discover manifold node {label!r} needs a non-empty list "
|
|
870
|
+
f"of non-blank statement strings"
|
|
871
|
+
)
|
|
872
|
+
nodes_dir = folder / "nodes"
|
|
873
|
+
nodes_dir.mkdir(parents=True, exist_ok=True)
|
|
874
|
+
write_json_atomic(
|
|
875
|
+
nodes_dir / _node_filename(index, label),
|
|
876
|
+
[str(s) for s in statements],
|
|
877
|
+
)
|
|
878
|
+
# A skeleton with missing corpus files does not load, so
|
|
879
|
+
# ``iter_manifold_folders`` skips it — the node that completes the corpus
|
|
880
|
+
# is what makes the whole manifold discoverable.
|
|
881
|
+
invalidate_selector_index()
|
|
882
|
+
|
|
883
|
+
|
|
884
|
+
def _discover_manifest_payload(
|
|
885
|
+
name: str,
|
|
886
|
+
description: str,
|
|
887
|
+
fit_mode: str,
|
|
888
|
+
labels: list[str],
|
|
889
|
+
roles: dict[str, str | None],
|
|
890
|
+
hyperparams: Optional[dict[str, Any]],
|
|
891
|
+
kinds: Optional[dict[str, str | None]] = None,
|
|
892
|
+
tags: Optional[list[str]] = None,
|
|
893
|
+
) -> dict[str, Any]:
|
|
894
|
+
"""Build the label-only discover ``manifold.json`` dict."""
|
|
895
|
+
kinds = kinds or {}
|
|
896
|
+
payload: dict[str, Any] = {
|
|
897
|
+
"format_version": MANIFOLD_FORMAT_VERSION,
|
|
898
|
+
"name": name,
|
|
899
|
+
"description": description,
|
|
900
|
+
"fit_mode": fit_mode,
|
|
901
|
+
"hyperparams": sanitize_hyperparams(fit_mode, hyperparams),
|
|
902
|
+
"nodes": [
|
|
903
|
+
_node_payload_discover(label, roles.get(label), kinds.get(label))
|
|
904
|
+
for label in labels
|
|
905
|
+
],
|
|
906
|
+
"files": {},
|
|
907
|
+
"source": "local",
|
|
908
|
+
"tags": [str(t) for t in (tags or [])],
|
|
909
|
+
"template_ref": None,
|
|
910
|
+
}
|
|
911
|
+
return payload
|
|
912
|
+
|
|
913
|
+
|
|
914
|
+
@_lock_folder_arg
|
|
915
|
+
def plan_discover_generation(
|
|
916
|
+
folder: Path,
|
|
917
|
+
name: str,
|
|
918
|
+
description: str,
|
|
919
|
+
*,
|
|
920
|
+
fit_mode: str,
|
|
921
|
+
labels: list[str],
|
|
922
|
+
hyperparams: Optional[dict[str, Any]] = None,
|
|
923
|
+
node_roles: Optional[dict[str, str | None]] = None,
|
|
924
|
+
node_kinds: Optional[dict[str, str | None]] = None,
|
|
925
|
+
tags: Optional[list[str]] = None,
|
|
926
|
+
force: bool = False,
|
|
927
|
+
) -> DiscoverGenerationPlan:
|
|
928
|
+
"""Ensure a streamable discover skeleton at ``folder`` covering every
|
|
929
|
+
label in ``labels``, and report which node corpora still need writing.
|
|
930
|
+
|
|
931
|
+
Resume + add-nodes in one — the single planner every discover-generate
|
|
932
|
+
surface (the bundled regen scripts, ``manifold generate``, the
|
|
933
|
+
HTTP generate route) calls:
|
|
934
|
+
|
|
935
|
+
- A fresh ``folder`` gets a label-only skeleton (`manifold.json` +
|
|
936
|
+
empty ``nodes/``) and every label is ``pending``.
|
|
937
|
+
- An existing discover folder keeps its node order, **appends** any
|
|
938
|
+
labels new to it (the add-nodes case — the existing fit goes stale
|
|
939
|
+
on the next read since the corpus hash changes), and reports as
|
|
940
|
+
``pending`` the declared labels whose ``nodes/NN_<label>.json`` is
|
|
941
|
+
absent — so a run killed half-way resumes the missing nodes instead
|
|
942
|
+
of starting over.
|
|
943
|
+
- ``force=True`` removes the prior folder and publishes the fresh skeleton
|
|
944
|
+
in the same manifest transaction.
|
|
945
|
+
|
|
946
|
+
The read is deliberately lenient — it does **not** route through
|
|
947
|
+
:meth:`ManifoldFolder.load`, which rejects a partially-written folder
|
|
948
|
+
by design (the missing-node-corpus guard) — so the planner can
|
|
949
|
+
inspect the very partial it is resuming. Description (and ``tags``,
|
|
950
|
+
when supplied) is refreshed to the caller's value; fit hyperparams on
|
|
951
|
+
an existing folder are kept (a resume fills corpus, it does not silently
|
|
952
|
+
re-spec the fit — use ``--force`` / a fresh folder to change those).
|
|
953
|
+
|
|
954
|
+
Raises :class:`ManifoldFormatError` on a non-discover ``fit_mode``, a
|
|
955
|
+
bad/duplicate label, a ``node_roles`` key outside the roster, or an
|
|
956
|
+
existing folder whose ``manifold.json`` is not discover-mode.
|
|
957
|
+
"""
|
|
958
|
+
folder = Path(folder)
|
|
959
|
+
if fit_mode not in _FIT_MODES_DISCOVER:
|
|
960
|
+
raise ManifoldFormatError(
|
|
961
|
+
f"discover manifold {name!r} fit_mode {fit_mode!r} invalid; "
|
|
962
|
+
f"expected one of {sorted(_FIT_MODES_DISCOVER)}"
|
|
963
|
+
)
|
|
964
|
+
labels = _validate_discover_labels(name, labels)
|
|
965
|
+
roles_in = node_roles or {}
|
|
966
|
+
unknown = set(roles_in) - set(labels)
|
|
967
|
+
if unknown:
|
|
968
|
+
raise ManifoldFormatError(
|
|
969
|
+
f"discover manifold {name!r} node_roles carries labels not in "
|
|
970
|
+
f"the roster: {sorted(unknown)}"
|
|
971
|
+
)
|
|
972
|
+
kinds_in = node_kinds or {}
|
|
973
|
+
unknown_k = set(kinds_in) - set(labels)
|
|
974
|
+
if unknown_k:
|
|
975
|
+
raise ManifoldFormatError(
|
|
976
|
+
f"discover manifold {name!r} node_kinds carries labels not in "
|
|
977
|
+
f"the roster: {sorted(unknown_k)}"
|
|
978
|
+
)
|
|
979
|
+
# Validate every replacement input before a force reset can remove the
|
|
980
|
+
# prior folder. The resolved maps are also reused by the fresh path.
|
|
981
|
+
roles_resolved = {
|
|
982
|
+
label: _validate_node_role(name, label, roles_in.get(label))
|
|
983
|
+
for label in labels
|
|
984
|
+
}
|
|
985
|
+
kinds_resolved = {
|
|
986
|
+
label: _validate_node_kind(name, label, kinds_in.get(label))
|
|
987
|
+
for label in labels
|
|
988
|
+
}
|
|
989
|
+
sanitized_hyperparams = sanitize_hyperparams(fit_mode, hyperparams)
|
|
990
|
+
|
|
991
|
+
# Reset and skeleton publication are one manifest transaction. Keeping
|
|
992
|
+
# this inside the planner prevents a fitter from snapshotting between an
|
|
993
|
+
# external ``rmtree`` and the replacement manifest, and prevents a stale
|
|
994
|
+
# fit from publishing across a concurrent force-regeneration. Remove even
|
|
995
|
+
# a partial folder: force is the recovery path for a missing manifest.
|
|
996
|
+
if force and folder.exists():
|
|
997
|
+
reset_manifold_folder(folder)
|
|
998
|
+
|
|
999
|
+
meta_path = folder / "manifold.json"
|
|
1000
|
+
nodes_dir = folder / "nodes"
|
|
1001
|
+
|
|
1002
|
+
if not meta_path.exists():
|
|
1003
|
+
# Fresh skeleton — everything is pending.
|
|
1004
|
+
folder.mkdir(parents=True, exist_ok=True)
|
|
1005
|
+
nodes_dir.mkdir(exist_ok=True)
|
|
1006
|
+
write_json_atomic(
|
|
1007
|
+
meta_path,
|
|
1008
|
+
_discover_manifest_payload(
|
|
1009
|
+
name, description, fit_mode, labels, roles_resolved,
|
|
1010
|
+
sanitized_hyperparams,
|
|
1011
|
+
kinds_resolved, tags,
|
|
1012
|
+
),
|
|
1013
|
+
)
|
|
1014
|
+
invalidate_selector_index()
|
|
1015
|
+
return DiscoverGenerationPlan(
|
|
1016
|
+
folder=folder,
|
|
1017
|
+
index_of={label: i for i, label in enumerate(labels)},
|
|
1018
|
+
pending=tuple(labels),
|
|
1019
|
+
added=(),
|
|
1020
|
+
resumed=False,
|
|
1021
|
+
)
|
|
1022
|
+
|
|
1023
|
+
# Resume / extend an existing folder.
|
|
1024
|
+
try:
|
|
1025
|
+
data = json.loads(meta_path.read_text())
|
|
1026
|
+
except (json.JSONDecodeError, OSError) as e:
|
|
1027
|
+
raise ManifoldFormatError(
|
|
1028
|
+
f"manifold.json in {folder} is unreadable: {e}"
|
|
1029
|
+
) from e
|
|
1030
|
+
if not isinstance(data, dict):
|
|
1031
|
+
raise ManifoldFormatError(
|
|
1032
|
+
f"manifold.json in {folder} must be a JSON object"
|
|
1033
|
+
)
|
|
1034
|
+
validate_manifold_format_version(
|
|
1035
|
+
data.get("format_version"), location=f"manifold.json in {folder}",
|
|
1036
|
+
)
|
|
1037
|
+
allowed = {
|
|
1038
|
+
"format_version", "name", "description", "fit_mode", "hyperparams",
|
|
1039
|
+
"nodes", "files", "source", "tags", "artifact_id", "fit_epochs",
|
|
1040
|
+
"template_ref",
|
|
1041
|
+
}
|
|
1042
|
+
unknown_fields = set(data) - allowed
|
|
1043
|
+
if unknown_fields:
|
|
1044
|
+
raise ManifoldFormatError(
|
|
1045
|
+
f"manifold at {folder} has unknown field(s): {sorted(unknown_fields)}"
|
|
1046
|
+
)
|
|
1047
|
+
if data.get("fit_mode") not in _FIT_MODES_DISCOVER:
|
|
1048
|
+
raise ManifoldFormatError(
|
|
1049
|
+
f"manifold at {folder} is not discover-mode; cannot "
|
|
1050
|
+
f"stream-generate into it"
|
|
1051
|
+
)
|
|
1052
|
+
if data.get("name") != name:
|
|
1053
|
+
raise ManifoldFormatError(
|
|
1054
|
+
f"manifold at {folder} is named {data.get('name')!r}, not {name!r}"
|
|
1055
|
+
)
|
|
1056
|
+
for key, expected in (
|
|
1057
|
+
("description", str), ("hyperparams", dict), ("nodes", list),
|
|
1058
|
+
("files", dict), ("source", str), ("tags", list),
|
|
1059
|
+
):
|
|
1060
|
+
if not isinstance(data.get(key), expected):
|
|
1061
|
+
raise ManifoldFormatError(
|
|
1062
|
+
f"manifold at {folder} field {key!r} must be {expected.__name__}"
|
|
1063
|
+
)
|
|
1064
|
+
if not data["source"]:
|
|
1065
|
+
raise ManifoldFormatError(
|
|
1066
|
+
f"manifold at {folder} field 'source' must be non-empty"
|
|
1067
|
+
)
|
|
1068
|
+
if "artifact_id" in data and (
|
|
1069
|
+
not isinstance(data["artifact_id"], str) or not data["artifact_id"]
|
|
1070
|
+
):
|
|
1071
|
+
raise ManifoldFormatError(
|
|
1072
|
+
f"manifold at {folder} field 'artifact_id' must be a non-empty str"
|
|
1073
|
+
)
|
|
1074
|
+
if "fit_epochs" in data and not isinstance(data["fit_epochs"], dict):
|
|
1075
|
+
raise ManifoldFormatError(
|
|
1076
|
+
f"manifold at {folder} field 'fit_epochs' must be dict"
|
|
1077
|
+
)
|
|
1078
|
+
if not all(isinstance(tag, str) for tag in data["tags"]):
|
|
1079
|
+
raise ManifoldFormatError(
|
|
1080
|
+
f"manifold at {folder} field 'tags' must be a list of strings"
|
|
1081
|
+
)
|
|
1082
|
+
if "template_ref" not in data or (
|
|
1083
|
+
data["template_ref"] is not None
|
|
1084
|
+
and (not isinstance(data["template_ref"], str) or not data["template_ref"])
|
|
1085
|
+
):
|
|
1086
|
+
raise ManifoldFormatError(
|
|
1087
|
+
f"manifold at {folder} field 'template_ref' must be str or null"
|
|
1088
|
+
)
|
|
1089
|
+
existing_nodes = data["nodes"]
|
|
1090
|
+
if not existing_nodes:
|
|
1091
|
+
raise ManifoldFormatError(
|
|
1092
|
+
f"manifold at {folder} needs a non-empty 'nodes' list"
|
|
1093
|
+
)
|
|
1094
|
+
for entry in existing_nodes:
|
|
1095
|
+
if not isinstance(entry, dict):
|
|
1096
|
+
raise ManifoldFormatError(
|
|
1097
|
+
f"manifold at {folder} node {entry!r} must be an object"
|
|
1098
|
+
)
|
|
1099
|
+
expected_node = {"label", "role", "kind"}
|
|
1100
|
+
if set(entry) != expected_node:
|
|
1101
|
+
raise ManifoldFormatError(
|
|
1102
|
+
f"manifold at {folder} node fields must be {sorted(expected_node)}"
|
|
1103
|
+
)
|
|
1104
|
+
existing_labels = _validate_discover_labels(
|
|
1105
|
+
name, [entry.get("label") for entry in existing_nodes],
|
|
1106
|
+
)
|
|
1107
|
+
for entry in existing_nodes:
|
|
1108
|
+
label = entry["label"]
|
|
1109
|
+
_validate_node_role(name, label, entry.get("role"))
|
|
1110
|
+
_validate_node_kind(name, label, entry.get("kind"))
|
|
1111
|
+
existing_roles: dict[str, str | None] = {
|
|
1112
|
+
n["label"]: n.get("role") for n in existing_nodes
|
|
1113
|
+
}
|
|
1114
|
+
existing_kinds: dict[str, str | None] = {
|
|
1115
|
+
n["label"]: n.get("kind") for n in existing_nodes
|
|
1116
|
+
}
|
|
1117
|
+
new_labels = [label for label in labels if label not in existing_labels]
|
|
1118
|
+
full_labels = existing_labels + new_labels
|
|
1119
|
+
# Category tags refresh to the caller's value when supplied; ``[]`` clears.
|
|
1120
|
+
desired_tags = [str(t) for t in tags] if tags is not None else None
|
|
1121
|
+
if new_labels:
|
|
1122
|
+
# Add-nodes: append the new labels (validating their roles/kinds) and
|
|
1123
|
+
# rewrite manifold.json atomically. Existing roles/kinds/hyperparams
|
|
1124
|
+
# are preserved; description (and tags, when supplied) refresh to the
|
|
1125
|
+
# caller's value.
|
|
1126
|
+
merged_roles: dict[str, str | None] = dict(existing_roles)
|
|
1127
|
+
merged_kinds: dict[str, str | None] = dict(existing_kinds)
|
|
1128
|
+
for label in new_labels:
|
|
1129
|
+
merged_roles[label] = _validate_node_role(
|
|
1130
|
+
name, label, roles_in.get(label),
|
|
1131
|
+
)
|
|
1132
|
+
merged_kinds[label] = _validate_node_kind(
|
|
1133
|
+
name, label, kinds_in.get(label),
|
|
1134
|
+
)
|
|
1135
|
+
data["description"] = description
|
|
1136
|
+
if desired_tags is not None:
|
|
1137
|
+
data["tags"] = desired_tags
|
|
1138
|
+
data["nodes"] = [
|
|
1139
|
+
_node_payload_discover(
|
|
1140
|
+
label, merged_roles.get(label), merged_kinds.get(label),
|
|
1141
|
+
)
|
|
1142
|
+
for label in full_labels
|
|
1143
|
+
]
|
|
1144
|
+
write_json_atomic(meta_path, data)
|
|
1145
|
+
invalidate_selector_index()
|
|
1146
|
+
else:
|
|
1147
|
+
changed = False
|
|
1148
|
+
if data.get("description") != description:
|
|
1149
|
+
data["description"] = description
|
|
1150
|
+
changed = True
|
|
1151
|
+
if desired_tags is not None and data.get("tags") != desired_tags:
|
|
1152
|
+
data["tags"] = desired_tags
|
|
1153
|
+
changed = True
|
|
1154
|
+
if changed:
|
|
1155
|
+
write_json_atomic(meta_path, data)
|
|
1156
|
+
invalidate_selector_index()
|
|
1157
|
+
|
|
1158
|
+
nodes_dir.mkdir(exist_ok=True)
|
|
1159
|
+
index_of = {label: i for i, label in enumerate(full_labels)}
|
|
1160
|
+
pending = tuple(
|
|
1161
|
+
label for label in full_labels
|
|
1162
|
+
if not (nodes_dir / _node_filename(index_of[label], label)).exists()
|
|
1163
|
+
)
|
|
1164
|
+
return DiscoverGenerationPlan(
|
|
1165
|
+
folder=folder,
|
|
1166
|
+
index_of=index_of,
|
|
1167
|
+
pending=pending,
|
|
1168
|
+
added=tuple(new_labels),
|
|
1169
|
+
resumed=True,
|
|
1170
|
+
)
|
|
1171
|
+
|
|
1172
|
+
|
|
1173
|
+
@_lock_namespace_name
|
|
1174
|
+
def merge_discover_manifolds(
|
|
1175
|
+
target_namespace: str,
|
|
1176
|
+
target_name: str,
|
|
1177
|
+
target_description: str,
|
|
1178
|
+
*,
|
|
1179
|
+
sources: list[tuple[str, str]],
|
|
1180
|
+
fit_mode: Optional[str] = None,
|
|
1181
|
+
hyperparams: Optional[dict[str, Any]] = None,
|
|
1182
|
+
force: bool = False,
|
|
1183
|
+
) -> Path:
|
|
1184
|
+
"""Union N discover-mode manifolds' nodes into one fresh discover folder.
|
|
1185
|
+
|
|
1186
|
+
The vector-side counterpart is :func:`drowse.io.bake.merge_into_manifold`,
|
|
1187
|
+
but the manifold semantics are different: vector merge composes a
|
|
1188
|
+
new direction from a steering expression; manifold merge unions
|
|
1189
|
+
*node corpora* and lets the next fit derive coords from the
|
|
1190
|
+
combined heap.
|
|
1191
|
+
|
|
1192
|
+
Restricted to discover-mode sources by design — authored manifolds
|
|
1193
|
+
carry user-declared geometry (a specific ``BoxDomain`` / ``SphereDomain``
|
|
1194
|
+
+ per-node coords on that domain), and reconciling two unrelated
|
|
1195
|
+
coordinate systems without a shared frame isn't meaningful. Discover
|
|
1196
|
+
folders derive coords per-model from centroids at fit time, so the
|
|
1197
|
+
merge is just "pool the centroids" — the operation that's natural
|
|
1198
|
+
for the autofit pipeline.
|
|
1199
|
+
|
|
1200
|
+
Source label collisions raise :class:`ManifoldFormatError`; the
|
|
1201
|
+
caller should rename in source folders before merging (we don't
|
|
1202
|
+
auto-prefix since labels are user-visible and silent renames hide
|
|
1203
|
+
provenance).
|
|
1204
|
+
|
|
1205
|
+
Fit-mode reconciliation:
|
|
1206
|
+
* sources agree → that's the default
|
|
1207
|
+
* sources disagree → an explicit ``fit_mode`` is required
|
|
1208
|
+
* caller supplies ``fit_mode`` → that wins
|
|
1209
|
+
|
|
1210
|
+
Hyperparams default to the first source's; an explicit
|
|
1211
|
+
``hyperparams`` arg replaces them wholesale (matches
|
|
1212
|
+
``create_discover_manifold_folder``'s shape). ``sanitize_hyperparams``
|
|
1213
|
+
drops cross-method keys at the IO boundary.
|
|
1214
|
+
|
|
1215
|
+
The merged folder is written *unfitted* — no per-model tensor is
|
|
1216
|
+
materialized. Run ``drowse manifold fit <name> -m <model>`` or
|
|
1217
|
+
``POST .../fit`` against it to derive coordinates and fit.
|
|
1218
|
+
"""
|
|
1219
|
+
if len(sources) < 2:
|
|
1220
|
+
raise ValueError(
|
|
1221
|
+
f"merge needs >= 2 sources, got {len(sources)}: {sources!r}",
|
|
1222
|
+
)
|
|
1223
|
+
|
|
1224
|
+
folders: list[tuple[str, str, ManifoldFolder]] = []
|
|
1225
|
+
for ns, name in sources:
|
|
1226
|
+
folder_path = manifold_dir(ns, name)
|
|
1227
|
+
if not (folder_path / "manifold.json").exists():
|
|
1228
|
+
raise FileNotFoundError(
|
|
1229
|
+
f"merge source {ns}/{name} not found at {folder_path}",
|
|
1230
|
+
)
|
|
1231
|
+
mf = ManifoldFolder.load(folder_path, verify_manifest=False)
|
|
1232
|
+
if not mf.is_discover:
|
|
1233
|
+
raise ManifoldFormatError(
|
|
1234
|
+
f"merge source {ns}/{name} is authored ({mf.fit_mode!r}); "
|
|
1235
|
+
f"merge supports discover-mode (autofitted) manifolds only — "
|
|
1236
|
+
f"authored manifolds carry user-declared geometry that "
|
|
1237
|
+
f"isn't mergeable without a shared coordinate system.",
|
|
1238
|
+
)
|
|
1239
|
+
folders.append((ns, name, mf))
|
|
1240
|
+
|
|
1241
|
+
# Detect label collisions across the union. Refuse rather than
|
|
1242
|
+
# silently rename — labels carry provenance the user cares about.
|
|
1243
|
+
seen: dict[str, str] = {}
|
|
1244
|
+
collisions: list[tuple[str, str, str]] = []
|
|
1245
|
+
for ns, name, mf in folders:
|
|
1246
|
+
src_key = f"{ns}/{name}"
|
|
1247
|
+
for label in mf.node_labels:
|
|
1248
|
+
if label in seen and seen[label] != src_key:
|
|
1249
|
+
collisions.append((label, seen[label], src_key))
|
|
1250
|
+
seen[label] = src_key
|
|
1251
|
+
if collisions:
|
|
1252
|
+
details = "; ".join(
|
|
1253
|
+
f"{label!r} in {a} and {b}" for label, a, b in collisions
|
|
1254
|
+
)
|
|
1255
|
+
raise ManifoldFormatError(
|
|
1256
|
+
f"merge {target_namespace}/{target_name}: label collisions — "
|
|
1257
|
+
f"{details}. Rename one side before merging.",
|
|
1258
|
+
)
|
|
1259
|
+
|
|
1260
|
+
# Reconcile fit_mode.
|
|
1261
|
+
source_modes = sorted({mf.fit_mode for _, _, mf in folders})
|
|
1262
|
+
if fit_mode is None:
|
|
1263
|
+
if len(source_modes) > 1:
|
|
1264
|
+
raise ManifoldFormatError(
|
|
1265
|
+
f"merge {target_namespace}/{target_name}: sources have "
|
|
1266
|
+
f"mixed fit_modes ({source_modes}); pass fit_mode= to pick one.",
|
|
1267
|
+
)
|
|
1268
|
+
fit_mode = source_modes[0]
|
|
1269
|
+
elif fit_mode not in _FIT_MODES_DISCOVER:
|
|
1270
|
+
raise ManifoldFormatError(
|
|
1271
|
+
f"merge {target_namespace}/{target_name}: fit_mode "
|
|
1272
|
+
f"{fit_mode!r} invalid; expected one of "
|
|
1273
|
+
f"{sorted(_FIT_MODES_DISCOVER)}.",
|
|
1274
|
+
)
|
|
1275
|
+
|
|
1276
|
+
# Reconcile hyperparams — default to the first source's, caller may
|
|
1277
|
+
# override wholesale.
|
|
1278
|
+
effective_hyperparams: dict[str, Any]
|
|
1279
|
+
effective_hyperparams = dict(hyperparams) if hyperparams is not None else dict(folders[0][2].hyperparams)
|
|
1280
|
+
|
|
1281
|
+
# Pool the corpus + roles. Iteration order: source order, then
|
|
1282
|
+
# per-source label order (matches how the source authored them).
|
|
1283
|
+
node_corpora: dict[str, list[str]] = {}
|
|
1284
|
+
node_roles: dict[str, str | None] = {}
|
|
1285
|
+
node_kinds: dict[str, str | None] = {}
|
|
1286
|
+
for _ns, _name, mf in folders:
|
|
1287
|
+
groups = dict(mf.node_groups())
|
|
1288
|
+
roles_padded = mf._roles_padded()
|
|
1289
|
+
kinds_padded = mf._kinds_padded()
|
|
1290
|
+
for idx, label in enumerate(mf.node_labels):
|
|
1291
|
+
node_corpora[label] = list(groups.get(label, []))
|
|
1292
|
+
node_roles[label] = roles_padded[idx]
|
|
1293
|
+
node_kinds[label] = kinds_padded[idx]
|
|
1294
|
+
|
|
1295
|
+
target_folder = manifold_dir(target_namespace, target_name)
|
|
1296
|
+
if target_folder.exists():
|
|
1297
|
+
if not force:
|
|
1298
|
+
raise FileExistsError(
|
|
1299
|
+
f"manifold {target_namespace}/{target_name} already exists; "
|
|
1300
|
+
f"pass force=True to overwrite",
|
|
1301
|
+
)
|
|
1302
|
+
reset_manifold_folder(target_folder)
|
|
1303
|
+
|
|
1304
|
+
return create_discover_manifold_folder(
|
|
1305
|
+
target_namespace,
|
|
1306
|
+
target_name,
|
|
1307
|
+
target_description,
|
|
1308
|
+
fit_mode=fit_mode,
|
|
1309
|
+
node_corpora=node_corpora,
|
|
1310
|
+
hyperparams=effective_hyperparams,
|
|
1311
|
+
node_roles=node_roles,
|
|
1312
|
+
node_kinds=node_kinds,
|
|
1313
|
+
)
|
|
1314
|
+
|
|
1315
|
+
|
|
1316
|
+
@_lock_folder_arg
|
|
1317
|
+
def update_manifold_folder(
|
|
1318
|
+
folder: Path,
|
|
1319
|
+
*,
|
|
1320
|
+
description: Optional[str] = None,
|
|
1321
|
+
nodes: Optional[list[dict[str, Any]]] = None,
|
|
1322
|
+
) -> tuple[Path, list[str]]:
|
|
1323
|
+
"""Re-author an existing manifold folder.
|
|
1324
|
+
|
|
1325
|
+
``nodes``, when given, fully replaces the node list (labels, coords
|
|
1326
|
+
and corpus). Existing fitted tensors are left in place — they become
|
|
1327
|
+
stale (``nodes_sha256`` no longer matches) and the next fit overwrites
|
|
1328
|
+
them. Returns ``(folder, advisories)``.
|
|
1329
|
+
"""
|
|
1330
|
+
folder = Path(folder)
|
|
1331
|
+
mf = ManifoldFolder.load(folder, verify_manifest=False)
|
|
1332
|
+
if description is not None:
|
|
1333
|
+
mf.description = description
|
|
1334
|
+
if nodes is not None:
|
|
1335
|
+
domain = domain_from_spec(mf.domain)
|
|
1336
|
+
_validate_authored_nodes(mf.name, domain, nodes)
|
|
1337
|
+
_write_node_corpus(folder, nodes)
|
|
1338
|
+
mf.node_labels = [entry["label"] for entry in nodes]
|
|
1339
|
+
mf.node_coords = [[float(c) for c in entry["coords"]] for entry in nodes]
|
|
1340
|
+
# Roles ride per-entry; defaults to None for entries that
|
|
1341
|
+
# don't carry the field. ``_validate_authored_nodes`` already
|
|
1342
|
+
# checked the slug shape, so this is a pure copy.
|
|
1343
|
+
mf.node_roles = [entry.get("role") for entry in nodes]
|
|
1344
|
+
mf.node_kinds = [entry.get("kind") for entry in nodes]
|
|
1345
|
+
mf.write_metadata()
|
|
1346
|
+
invalidate_selector_index()
|
|
1347
|
+
_, advisories = _load_with_advisories(folder)
|
|
1348
|
+
return folder, advisories
|