musespiral 0.5.0__tar.gz
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.
- musespiral-0.5.0/LICENSE +21 -0
- musespiral-0.5.0/PKG-INFO +342 -0
- musespiral-0.5.0/README.md +281 -0
- musespiral-0.5.0/musespiral/__init__.py +7 -0
- musespiral-0.5.0/musespiral/browser/__init__.py +24 -0
- musespiral-0.5.0/musespiral/browser/cookies.py +60 -0
- musespiral-0.5.0/musespiral/browser/flows/__init__.py +115 -0
- musespiral-0.5.0/musespiral/browser/flows/base.py +198 -0
- musespiral-0.5.0/musespiral/browser/flows/bilibili.py +16 -0
- musespiral-0.5.0/musespiral/browser/flows/channels.py +11 -0
- musespiral-0.5.0/musespiral/browser/flows/douyin.py +12 -0
- musespiral-0.5.0/musespiral/browser/flows/juejin.py +16 -0
- musespiral-0.5.0/musespiral/browser/flows/xhs.py +11 -0
- musespiral-0.5.0/musespiral/browser/flows/zhihu.py +16 -0
- musespiral-0.5.0/musespiral/browser/selectors/bilibili.yaml +10 -0
- musespiral-0.5.0/musespiral/browser/selectors/channels.yaml +10 -0
- musespiral-0.5.0/musespiral/browser/selectors/douyin.yaml +10 -0
- musespiral-0.5.0/musespiral/browser/selectors/juejin.yaml +10 -0
- musespiral-0.5.0/musespiral/browser/selectors/xhs.yaml +10 -0
- musespiral-0.5.0/musespiral/browser/selectors/zhihu.yaml +10 -0
- musespiral-0.5.0/musespiral/browser/session.py +80 -0
- musespiral-0.5.0/musespiral/cli.py +98 -0
- musespiral-0.5.0/musespiral/commands/__init__.py +7 -0
- musespiral-0.5.0/musespiral/commands/_shared.py +66 -0
- musespiral-0.5.0/musespiral/commands/agent_cmds.py +260 -0
- musespiral-0.5.0/musespiral/commands/ai_cmds.py +301 -0
- musespiral-0.5.0/musespiral/commands/backup_cmds.py +38 -0
- musespiral-0.5.0/musespiral/commands/booksource_cmds.py +271 -0
- musespiral-0.5.0/musespiral/commands/cards_cmds.py +60 -0
- musespiral-0.5.0/musespiral/commands/compose_cmds.py +156 -0
- musespiral-0.5.0/musespiral/commands/config_cmds.py +142 -0
- musespiral-0.5.0/musespiral/commands/core_cmds.py +231 -0
- musespiral-0.5.0/musespiral/commands/cover_cmds.py +81 -0
- musespiral-0.5.0/musespiral/commands/discover_cmds.py +118 -0
- musespiral-0.5.0/musespiral/commands/fetch_cmds.py +54 -0
- musespiral-0.5.0/musespiral/commands/imagehost_cmds.py +96 -0
- musespiral-0.5.0/musespiral/commands/jobs_cmds.py +46 -0
- musespiral-0.5.0/musespiral/commands/media_cmds.py +86 -0
- musespiral-0.5.0/musespiral/commands/new_cmds.py +140 -0
- musespiral-0.5.0/musespiral/commands/notes_cmds.py +100 -0
- musespiral-0.5.0/musespiral/commands/pipeline_cmds.py +118 -0
- musespiral-0.5.0/musespiral/commands/plan_cmds.py +58 -0
- musespiral-0.5.0/musespiral/commands/platform_cmds.py +297 -0
- musespiral-0.5.0/musespiral/commands/plrun_cmds.py +81 -0
- musespiral-0.5.0/musespiral/commands/poster_cmds.py +59 -0
- musespiral-0.5.0/musespiral/commands/publish_cmds.py +175 -0
- musespiral-0.5.0/musespiral/commands/restore_cmds.py +85 -0
- musespiral-0.5.0/musespiral/commands/site_cmds.py +50 -0
- musespiral-0.5.0/musespiral/commands/status_cmds.py +43 -0
- musespiral-0.5.0/musespiral/commands/studio_cmd.py +39 -0
- musespiral-0.5.0/musespiral/commands/style_cmds.py +143 -0
- musespiral-0.5.0/musespiral/commands/tags_cmds.py +131 -0
- musespiral-0.5.0/musespiral/commands/theme_cmds.py +85 -0
- musespiral-0.5.0/musespiral/commands/topic_radar_cmds.py +93 -0
- musespiral-0.5.0/musespiral/commands/tts_cmds.py +61 -0
- musespiral-0.5.0/musespiral/commands/visual_cmds.py +220 -0
- musespiral-0.5.0/musespiral/config.py +248 -0
- musespiral-0.5.0/musespiral/core/__init__.py +4 -0
- musespiral-0.5.0/musespiral/core/adaptation/__init__.py +21 -0
- musespiral-0.5.0/musespiral/core/adaptation/generator.py +297 -0
- musespiral-0.5.0/musespiral/core/adaptation/specs.py +123 -0
- musespiral-0.5.0/musespiral/core/adaptation/validator.py +41 -0
- musespiral-0.5.0/musespiral/core/agent/__init__.py +22 -0
- musespiral-0.5.0/musespiral/core/agent/budgets.py +160 -0
- musespiral-0.5.0/musespiral/core/agent/interp.py +302 -0
- musespiral-0.5.0/musespiral/core/agent/plan.py +257 -0
- musespiral-0.5.0/musespiral/core/agent/plans_builtin.py +407 -0
- musespiral-0.5.0/musespiral/core/article.py +185 -0
- musespiral-0.5.0/musespiral/core/booksource/__init__.py +12 -0
- musespiral-0.5.0/musespiral/core/booksource/classifier.py +98 -0
- musespiral-0.5.0/musespiral/core/booksource/clean.py +110 -0
- musespiral-0.5.0/musespiral/core/booksource/importer.py +202 -0
- musespiral-0.5.0/musespiral/core/booksource/merge.py +94 -0
- musespiral-0.5.0/musespiral/core/booksource/model.py +291 -0
- musespiral-0.5.0/musespiral/core/composition/__init__.py +150 -0
- musespiral-0.5.0/musespiral/core/composition/blocks.py +189 -0
- musespiral-0.5.0/musespiral/core/composition/merge.py +63 -0
- musespiral-0.5.0/musespiral/core/composition/novel.py +490 -0
- musespiral-0.5.0/musespiral/core/composition/outline.py +116 -0
- musespiral-0.5.0/musespiral/core/composition/protocol.py +149 -0
- musespiral-0.5.0/musespiral/core/composition/session.py +305 -0
- musespiral-0.5.0/musespiral/core/content/__init__.py +0 -0
- musespiral-0.5.0/musespiral/core/content/parser.py +105 -0
- musespiral-0.5.0/musespiral/core/content/renderer.py +195 -0
- musespiral-0.5.0/musespiral/core/content/theme_learn.py +170 -0
- musespiral-0.5.0/musespiral/core/content/themes.py +147 -0
- musespiral-0.5.0/musespiral/core/content/themes_data/default.yaml +44 -0
- musespiral-0.5.0/musespiral/core/content/themes_data/ember.yaml +44 -0
- musespiral-0.5.0/musespiral/core/content/themes_data/lapis.yaml +44 -0
- musespiral-0.5.0/musespiral/core/content/themes_data/mint.yaml +44 -0
- musespiral-0.5.0/musespiral/core/content/themes_data/phycat.yaml +44 -0
- musespiral-0.5.0/musespiral/core/discovery/__init__.py +17 -0
- musespiral-0.5.0/musespiral/core/discovery/scanner.py +223 -0
- musespiral-0.5.0/musespiral/core/discovery/scorer.py +132 -0
- musespiral-0.5.0/musespiral/core/discovery/skeleton.py +147 -0
- musespiral-0.5.0/musespiral/core/discovery/suggester.py +240 -0
- musespiral-0.5.0/musespiral/core/discovery/topic_radar.py +139 -0
- musespiral-0.5.0/musespiral/core/habits.py +178 -0
- musespiral-0.5.0/musespiral/core/materials/__init__.py +8 -0
- musespiral-0.5.0/musespiral/core/materials/confidence.py +61 -0
- musespiral-0.5.0/musespiral/core/materials/model.py +404 -0
- musespiral-0.5.0/musespiral/core/materials/search.py +108 -0
- musespiral-0.5.0/musespiral/core/materials/tags.py +61 -0
- musespiral-0.5.0/musespiral/core/materials/triage.py +104 -0
- musespiral-0.5.0/musespiral/core/materials/vector.py +87 -0
- musespiral-0.5.0/musespiral/core/plugins/__init__.py +9 -0
- musespiral-0.5.0/musespiral/core/plugins/context.py +111 -0
- musespiral-0.5.0/musespiral/core/plugins/manifest.py +314 -0
- musespiral-0.5.0/musespiral/core/plugins/types.py +44 -0
- musespiral-0.5.0/musespiral/core/plugins/version.py +90 -0
- musespiral-0.5.0/musespiral/core/quality/__init__.py +20 -0
- musespiral-0.5.0/musespiral/core/quality/banned_words.py +77 -0
- musespiral-0.5.0/musespiral/core/quality/checks.py +307 -0
- musespiral-0.5.0/musespiral/core/quality/digest.py +174 -0
- musespiral-0.5.0/musespiral/core/quality/factcheck.py +97 -0
- musespiral-0.5.0/musespiral/core/quality/pack_checks.py +208 -0
- musespiral-0.5.0/musespiral/core/quality/render_checks.py +162 -0
- musespiral-0.5.0/musespiral/core/quality/review.py +165 -0
- musespiral-0.5.0/musespiral/core/quality/title.py +233 -0
- musespiral-0.5.0/musespiral/core/site/__init__.py +18 -0
- musespiral-0.5.0/musespiral/core/site/exporter.py +267 -0
- musespiral-0.5.0/musespiral/core/tts/__init__.py +39 -0
- musespiral-0.5.0/musespiral/core/tts/script.py +80 -0
- musespiral-0.5.0/musespiral/core/tts/voice.py +110 -0
- musespiral-0.5.0/musespiral/core/version/__init__.py +34 -0
- musespiral-0.5.0/musespiral/core/version/diff.py +336 -0
- musespiral-0.5.0/musespiral/core/visual/__init__.py +6 -0
- musespiral-0.5.0/musespiral/core/visual/canvas/__init__.py +33 -0
- musespiral-0.5.0/musespiral/core/visual/canvas/layout.py +179 -0
- musespiral-0.5.0/musespiral/core/visual/canvas/model.py +350 -0
- musespiral-0.5.0/musespiral/core/visual/canvas/pillow_render.py +132 -0
- musespiral-0.5.0/musespiral/core/visual/canvas/shapes.py +163 -0
- musespiral-0.5.0/musespiral/core/visual/canvas/svg.py +127 -0
- musespiral-0.5.0/musespiral/core/visual/canvas/templates.py +241 -0
- musespiral-0.5.0/musespiral/core/visual/cards/__init__.py +15 -0
- musespiral-0.5.0/musespiral/core/visual/cards/compose.py +286 -0
- musespiral-0.5.0/musespiral/core/visual/cards/raster.py +55 -0
- musespiral-0.5.0/musespiral/core/visual/cards/templates.py +176 -0
- musespiral-0.5.0/musespiral/core/visual/cover.py +386 -0
- musespiral-0.5.0/musespiral/core/visual/poster.py +232 -0
- musespiral-0.5.0/musespiral/core/web/__init__.py +4 -0
- musespiral-0.5.0/musespiral/core/web/canonical.py +46 -0
- musespiral-0.5.0/musespiral/infra/__init__.py +0 -0
- musespiral-0.5.0/musespiral/infra/ai/__init__.py +46 -0
- musespiral-0.5.0/musespiral/infra/ai/budget.py +229 -0
- musespiral-0.5.0/musespiral/infra/ai/cache.py +233 -0
- musespiral-0.5.0/musespiral/infra/ai/check.py +109 -0
- musespiral-0.5.0/musespiral/infra/ai/client.py +210 -0
- musespiral-0.5.0/musespiral/infra/ai/gateway.py +217 -0
- musespiral-0.5.0/musespiral/infra/ai/habits_inject.py +105 -0
- musespiral-0.5.0/musespiral/infra/ai/profiles.py +454 -0
- musespiral-0.5.0/musespiral/infra/ai/prompts.py +109 -0
- musespiral-0.5.0/musespiral/infra/ai/usage.py +178 -0
- musespiral-0.5.0/musespiral/infra/bookengine.py +252 -0
- musespiral-0.5.0/musespiral/infra/booksource_fetch.py +134 -0
- musespiral-0.5.0/musespiral/infra/booksource_store.py +162 -0
- musespiral-0.5.0/musespiral/infra/embedding.py +222 -0
- musespiral-0.5.0/musespiral/infra/fetcher.py +318 -0
- musespiral-0.5.0/musespiral/infra/images/__init__.py +92 -0
- musespiral-0.5.0/musespiral/infra/images/base.py +76 -0
- musespiral-0.5.0/musespiral/infra/images/github.py +164 -0
- musespiral-0.5.0/musespiral/infra/images/local.py +21 -0
- musespiral-0.5.0/musespiral/infra/media_gen.py +310 -0
- musespiral-0.5.0/musespiral/infra/media_store.py +152 -0
- musespiral-0.5.0/musespiral/infra/plugins_loader.py +362 -0
- musespiral-0.5.0/musespiral/infra/sources/__init__.py +23 -0
- musespiral-0.5.0/musespiral/infra/sources/clipper.py +208 -0
- musespiral-0.5.0/musespiral/infra/sources/crawler.py +142 -0
- musespiral-0.5.0/musespiral/infra/sources/markdown_dir.py +164 -0
- musespiral-0.5.0/musespiral/infra/sources/radarhub.py +112 -0
- musespiral-0.5.0/musespiral/infra/sources/registry.py +325 -0
- musespiral-0.5.0/musespiral/infra/sources/rss.py +181 -0
- musespiral-0.5.0/musespiral/infra/sources/sqlite.py +223 -0
- musespiral-0.5.0/musespiral/infra/sources/url_fetch.py +284 -0
- musespiral-0.5.0/musespiral/infra/storage/__init__.py +25 -0
- musespiral-0.5.0/musespiral/infra/storage/filesystem.py +151 -0
- musespiral-0.5.0/musespiral/infra/storage/jsonl.py +191 -0
- musespiral-0.5.0/musespiral/infra/visual/__init__.py +6 -0
- musespiral-0.5.0/musespiral/infra/visual/raster.py +93 -0
- musespiral-0.5.0/musespiral/infra/wechat/__init__.py +30 -0
- musespiral-0.5.0/musespiral/infra/wechat/analytics.py +405 -0
- musespiral-0.5.0/musespiral/infra/wechat/publisher.py +148 -0
- musespiral-0.5.0/musespiral/infra/wechat/token.py +88 -0
- musespiral-0.5.0/musespiral/infra/wechat/uploader.py +168 -0
- musespiral-0.5.0/musespiral/jobs/__init__.py +25 -0
- musespiral-0.5.0/musespiral/jobs/runner.py +158 -0
- musespiral-0.5.0/musespiral/jobs/store.py +220 -0
- musespiral-0.5.0/musespiral/platforms/__init__.py +24 -0
- musespiral-0.5.0/musespiral/platforms/base.py +62 -0
- musespiral-0.5.0/musespiral/platforms/profiles.py +90 -0
- musespiral-0.5.0/musespiral/platforms/registry.py +81 -0
- musespiral-0.5.0/musespiral/platforms/wechat.py +231 -0
- musespiral-0.5.0/musespiral/plugins_builtin/article-writer/manifest.json +37 -0
- musespiral-0.5.0/musespiral/plugins_builtin/article-writer/plugin.py +620 -0
- musespiral-0.5.0/musespiral/plugins_builtin/doc-extract/manifest.json +28 -0
- musespiral-0.5.0/musespiral/plugins_builtin/doc-extract/plugin.py +486 -0
- musespiral-0.5.0/musespiral/plugins_builtin/duration-switch/manifest.json +25 -0
- musespiral-0.5.0/musespiral/plugins_builtin/duration-switch/plugin.py +73 -0
- musespiral-0.5.0/musespiral/plugins_builtin/frame-grab/manifest.json +27 -0
- musespiral-0.5.0/musespiral/plugins_builtin/frame-grab/plugin.py +229 -0
- musespiral-0.5.0/musespiral/plugins_builtin/key-segment/manifest.json +36 -0
- musespiral-0.5.0/musespiral/plugins_builtin/key-segment/plugin.py +519 -0
- musespiral-0.5.0/musespiral/plugins_builtin/local-file/manifest.json +22 -0
- musespiral-0.5.0/musespiral/plugins_builtin/local-file/plugin.py +86 -0
- musespiral-0.5.0/musespiral/plugins_builtin/local-scan/manifest.json +24 -0
- musespiral-0.5.0/musespiral/plugins_builtin/local-scan/plugin.py +356 -0
- musespiral-0.5.0/musespiral/plugins_builtin/material-sink/manifest.json +26 -0
- musespiral-0.5.0/musespiral/plugins_builtin/material-sink/plugin.py +222 -0
- musespiral-0.5.0/musespiral/plugins_builtin/refine-segments/manifest.json +20 -0
- musespiral-0.5.0/musespiral/plugins_builtin/refine-segments/plugin.py +109 -0
- musespiral-0.5.0/musespiral/plugins_builtin/subtitle/manifest.json +39 -0
- musespiral-0.5.0/musespiral/plugins_builtin/subtitle/plugin.py +245 -0
- musespiral-0.5.0/musespiral/plugins_builtin/transcribe/manifest.json +33 -0
- musespiral-0.5.0/musespiral/plugins_builtin/transcribe/plugin.py +226 -0
- musespiral-0.5.0/musespiral/plugins_builtin/word-count/count.sh +43 -0
- musespiral-0.5.0/musespiral/plugins_builtin/word-count/manifest.json +21 -0
- musespiral-0.5.0/musespiral/preview.py +127 -0
- musespiral-0.5.0/musespiral/services/__init__.py +38 -0
- musespiral-0.5.0/musespiral/services/adapt_service.py +89 -0
- musespiral-0.5.0/musespiral/services/agent_service.py +1046 -0
- musespiral-0.5.0/musespiral/services/annotate_service.py +98 -0
- musespiral-0.5.0/musespiral/services/backup_service.py +75 -0
- musespiral-0.5.0/musespiral/services/book_fetch_service.py +860 -0
- musespiral-0.5.0/musespiral/services/booksource_service.py +551 -0
- musespiral-0.5.0/musespiral/services/collections_service.py +219 -0
- musespiral-0.5.0/musespiral/services/compose/__init__.py +420 -0
- musespiral-0.5.0/musespiral/services/compose/characters.py +147 -0
- musespiral-0.5.0/musespiral/services/compose/foreshadowing.py +140 -0
- musespiral-0.5.0/musespiral/services/compose/generate.py +404 -0
- musespiral-0.5.0/musespiral/services/compose/outline.py +323 -0
- musespiral-0.5.0/musespiral/services/compose/prompt.py +226 -0
- musespiral-0.5.0/musespiral/services/compose/smart.py +252 -0
- musespiral-0.5.0/musespiral/services/compose/store.py +439 -0
- musespiral-0.5.0/musespiral/services/compose/summary.py +348 -0
- musespiral-0.5.0/musespiral/services/compose_service.py +50 -0
- musespiral-0.5.0/musespiral/services/cover_service.py +128 -0
- musespiral-0.5.0/musespiral/services/discover_service.py +225 -0
- musespiral-0.5.0/musespiral/services/editor_ai_service.py +316 -0
- musespiral-0.5.0/musespiral/services/fetch_service.py +60 -0
- musespiral-0.5.0/musespiral/services/ingest_service.py +622 -0
- musespiral-0.5.0/musespiral/services/material_body.py +74 -0
- musespiral-0.5.0/musespiral/services/materials/__init__.py +218 -0
- musespiral-0.5.0/musespiral/services/materials/crud.py +437 -0
- musespiral-0.5.0/musespiral/services/materials/feedback.py +311 -0
- musespiral-0.5.0/musespiral/services/materials/iterations.py +148 -0
- musespiral-0.5.0/musespiral/services/materials/search.py +258 -0
- musespiral-0.5.0/musespiral/services/materials/spark.py +63 -0
- musespiral-0.5.0/musespiral/services/materials/triage.py +167 -0
- musespiral-0.5.0/musespiral/services/materials/upload.py +398 -0
- musespiral-0.5.0/musespiral/services/materials_service.py +49 -0
- musespiral-0.5.0/musespiral/services/media_gen_service.py +315 -0
- musespiral-0.5.0/musespiral/services/novel_service.py +97 -0
- musespiral-0.5.0/musespiral/services/pack_service.py +461 -0
- musespiral-0.5.0/musespiral/services/pipeline/__init__.py +211 -0
- musespiral-0.5.0/musespiral/services/pipeline/adjudicate.py +38 -0
- musespiral-0.5.0/musespiral/services/pipeline/engine.py +587 -0
- musespiral-0.5.0/musespiral/services/pipeline/exec_runtime.py +183 -0
- musespiral-0.5.0/musespiral/services/pipeline/jobs.py +89 -0
- musespiral-0.5.0/musespiral/services/pipeline/plan.py +664 -0
- musespiral-0.5.0/musespiral/services/pipeline/prune.py +66 -0
- musespiral-0.5.0/musespiral/services/pipeline/regenerate.py +385 -0
- musespiral-0.5.0/musespiral/services/pipeline/workspace.py +372 -0
- musespiral-0.5.0/musespiral/services/pipeline_service.py +347 -0
- musespiral-0.5.0/musespiral/services/pipeline_service_plugins.py +91 -0
- musespiral-0.5.0/musespiral/services/plan_service.py +366 -0
- musespiral-0.5.0/musespiral/services/plugins_service.py +150 -0
- musespiral-0.5.0/musespiral/services/publish_log_service.py +144 -0
- musespiral-0.5.0/musespiral/services/publish_service.py +130 -0
- musespiral-0.5.0/musespiral/services/quality_loop.py +139 -0
- musespiral-0.5.0/musespiral/services/refine_service.py +364 -0
- musespiral-0.5.0/musespiral/services/rewrite_service.py +85 -0
- musespiral-0.5.0/musespiral/services/search_service.py +580 -0
- musespiral-0.5.0/musespiral/services/site_service.py +178 -0
- musespiral-0.5.0/musespiral/services/sources_service.py +382 -0
- musespiral-0.5.0/musespiral/services/tag_service.py +332 -0
- musespiral-0.5.0/musespiral/services/title_ab.py +210 -0
- musespiral-0.5.0/musespiral/services/title_service.py +49 -0
- musespiral-0.5.0/musespiral/services/topic_radar_service.py +387 -0
- musespiral-0.5.0/musespiral/services/tts_service.py +154 -0
- musespiral-0.5.0/musespiral/services/version_service.py +184 -0
- musespiral-0.5.0/musespiral/services/visual_service.py +855 -0
- musespiral-0.5.0/musespiral/services/writing_stats.py +186 -0
- musespiral-0.5.0/musespiral/studio/__init__.py +148 -0
- musespiral-0.5.0/musespiral/studio/actions.py +68 -0
- musespiral-0.5.0/musespiral/studio/agent_actions.py +104 -0
- musespiral-0.5.0/musespiral/studio/agent_payload.py +49 -0
- musespiral-0.5.0/musespiral/studio/ai_payload.py +39 -0
- musespiral-0.5.0/musespiral/studio/annotations.py +152 -0
- musespiral-0.5.0/musespiral/studio/assets/core.css +153 -0
- musespiral-0.5.0/musespiral/studio/assets/core.js +1281 -0
- musespiral-0.5.0/musespiral/studio/assets/dual.js +110 -0
- musespiral-0.5.0/musespiral/studio/assets/editor/addon/edit/closebrackets.min.js +1 -0
- musespiral-0.5.0/musespiral/studio/assets/editor/addon/edit/matchbrackets.min.js +1 -0
- musespiral-0.5.0/musespiral/studio/assets/editor/addon/search/search.min.js +1 -0
- musespiral-0.5.0/musespiral/studio/assets/editor/addon/search/searchcursor.min.js +1 -0
- musespiral-0.5.0/musespiral/studio/assets/editor/codemirror.min.css +1 -0
- musespiral-0.5.0/musespiral/studio/assets/editor/codemirror.min.js +1 -0
- musespiral-0.5.0/musespiral/studio/assets/editor/mode/markdown/markdown.min.js +1 -0
- musespiral-0.5.0/musespiral/studio/assets/editor/theme/paper-ink.css +46 -0
- musespiral-0.5.0/musespiral/studio/assets/editor.css +122 -0
- musespiral-0.5.0/musespiral/studio/assets/editor.js +1100 -0
- musespiral-0.5.0/musespiral/studio/assets/iterations.js +135 -0
- musespiral-0.5.0/musespiral/studio/assets/lineage.js +133 -0
- musespiral-0.5.0/musespiral/studio/assets/novel.js +159 -0
- musespiral-0.5.0/musespiral/studio/assets/outline.js +204 -0
- musespiral-0.5.0/musespiral/studio/assets/quickstart.js +243 -0
- musespiral-0.5.0/musespiral/studio/assets/rolling.js +94 -0
- musespiral-0.5.0/musespiral/studio/assets/tts.js +121 -0
- musespiral-0.5.0/musespiral/studio/assets/versions.js +143 -0
- musespiral-0.5.0/musespiral/studio/assets/views/article.css +36 -0
- musespiral-0.5.0/musespiral/studio/assets/views/article.html.js +129 -0
- musespiral-0.5.0/musespiral/studio/assets/views/article.js +584 -0
- musespiral-0.5.0/musespiral/studio/assets/views/books.css +62 -0
- musespiral-0.5.0/musespiral/studio/assets/views/books.html.js +93 -0
- musespiral-0.5.0/musespiral/studio/assets/views/books.js +379 -0
- musespiral-0.5.0/musespiral/studio/assets/views/compose.css +26 -0
- musespiral-0.5.0/musespiral/studio/assets/views/compose.html.js +106 -0
- musespiral-0.5.0/musespiral/studio/assets/views/compose.js +640 -0
- musespiral-0.5.0/musespiral/studio/assets/views/design.css +18 -0
- musespiral-0.5.0/musespiral/studio/assets/views/design.html.js +30 -0
- musespiral-0.5.0/musespiral/studio/assets/views/design.js +319 -0
- musespiral-0.5.0/musespiral/studio/assets/views/insight.css +79 -0
- musespiral-0.5.0/musespiral/studio/assets/views/insight.html.js +37 -0
- musespiral-0.5.0/musespiral/studio/assets/views/insight.js +212 -0
- musespiral-0.5.0/musespiral/studio/assets/views/material-core.js +275 -0
- musespiral-0.5.0/musespiral/studio/assets/views/material-drawer.js +174 -0
- musespiral-0.5.0/musespiral/studio/assets/views/material-media.js +144 -0
- musespiral-0.5.0/musespiral/studio/assets/views/material.css +89 -0
- musespiral-0.5.0/musespiral/studio/assets/views/material.html.js +82 -0
- musespiral-0.5.0/musespiral/studio/assets/views/plugin-run.css +67 -0
- musespiral-0.5.0/musespiral/studio/assets/views/plugin-run.html.js +26 -0
- musespiral-0.5.0/musespiral/studio/assets/views/plugin-run.js +464 -0
- musespiral-0.5.0/musespiral/studio/assets/views/plugins.css +65 -0
- musespiral-0.5.0/musespiral/studio/assets/views/plugins.html.js +23 -0
- musespiral-0.5.0/musespiral/studio/assets/views/plugins.js +271 -0
- musespiral-0.5.0/musespiral/studio/assets/views/publish.js +292 -0
- musespiral-0.5.0/musespiral/studio/assets/views/settings.css +2 -0
- musespiral-0.5.0/musespiral/studio/assets/views/settings.html.js +28 -0
- musespiral-0.5.0/musespiral/studio/assets/views/settings.js +112 -0
- musespiral-0.5.0/musespiral/studio/assets/views/sources.css +9 -0
- musespiral-0.5.0/musespiral/studio/assets/views/sources.html.js +65 -0
- musespiral-0.5.0/musespiral/studio/assets/views/sources.js +180 -0
- musespiral-0.5.0/musespiral/studio/assets.py +222 -0
- musespiral-0.5.0/musespiral/studio/book_actions.py +182 -0
- musespiral-0.5.0/musespiral/studio/booksource_actions.py +177 -0
- musespiral-0.5.0/musespiral/studio/compose_actions.py +557 -0
- musespiral-0.5.0/musespiral/studio/edit_actions.py +142 -0
- musespiral-0.5.0/musespiral/studio/editor_actions.py +90 -0
- musespiral-0.5.0/musespiral/studio/fetch_actions.py +33 -0
- musespiral-0.5.0/musespiral/studio/handlers/__init__.py +24 -0
- musespiral-0.5.0/musespiral/studio/handlers/article.py +52 -0
- musespiral-0.5.0/musespiral/studio/handlers/assist.py +162 -0
- musespiral-0.5.0/musespiral/studio/handlers/compose.py +41 -0
- musespiral-0.5.0/musespiral/studio/handlers/discover.py +195 -0
- musespiral-0.5.0/musespiral/studio/handlers/materials.py +406 -0
- musespiral-0.5.0/musespiral/studio/handlers/platform.py +368 -0
- musespiral-0.5.0/musespiral/studio/health.py +99 -0
- musespiral-0.5.0/musespiral/studio/ingest_actions.py +139 -0
- musespiral-0.5.0/musespiral/studio/media_actions.py +133 -0
- musespiral-0.5.0/musespiral/studio/payload.py +665 -0
- musespiral-0.5.0/musespiral/studio/pipeline_actions.py +65 -0
- musespiral-0.5.0/musespiral/studio/plugin_actions/__init__.py +219 -0
- musespiral-0.5.0/musespiral/studio/plugin_actions/list_detail.py +124 -0
- musespiral-0.5.0/musespiral/studio/plugin_actions/pipeline_crud.py +97 -0
- musespiral-0.5.0/musespiral/studio/plugin_actions/run_adjudicate.py +291 -0
- musespiral-0.5.0/musespiral/studio/plugin_actions/run_read.py +327 -0
- musespiral-0.5.0/musespiral/studio/plugin_actions/segments.py +196 -0
- musespiral-0.5.0/musespiral/studio/quality_actions.py +83 -0
- musespiral-0.5.0/musespiral/studio/routing.py +364 -0
- musespiral-0.5.0/musespiral/studio/scan.py +284 -0
- musespiral-0.5.0/musespiral/studio/security.py +196 -0
- musespiral-0.5.0/musespiral/studio/server.py +272 -0
- musespiral-0.5.0/musespiral/studio/settings.py +222 -0
- musespiral-0.5.0/musespiral/studio/topic_radar_payload.py +21 -0
- musespiral-0.5.0/musespiral/studio/tts_actions.py +119 -0
- musespiral-0.5.0/musespiral/studio/ui.html +178 -0
- musespiral-0.5.0/musespiral/studio/version_actions.py +119 -0
- musespiral-0.5.0/musespiral/studio/visual_actions.py +208 -0
- musespiral-0.5.0/musespiral/studio/visual_payload.py +76 -0
- musespiral-0.5.0/musespiral.egg-info/PKG-INFO +342 -0
- musespiral-0.5.0/musespiral.egg-info/SOURCES.txt +548 -0
- musespiral-0.5.0/musespiral.egg-info/dependency_links.txt +1 -0
- musespiral-0.5.0/musespiral.egg-info/entry_points.txt +2 -0
- musespiral-0.5.0/musespiral.egg-info/requires.txt +35 -0
- musespiral-0.5.0/musespiral.egg-info/top_level.txt +1 -0
- musespiral-0.5.0/pyproject.toml +126 -0
- musespiral-0.5.0/setup.cfg +4 -0
- musespiral-0.5.0/tests/test_adapt.py +405 -0
- musespiral-0.5.0/tests/test_agent_budgets.py +151 -0
- musespiral-0.5.0/tests/test_agent_interp.py +444 -0
- musespiral-0.5.0/tests/test_agent_plan.py +318 -0
- musespiral-0.5.0/tests/test_agent_plans_builtin.py +206 -0
- musespiral-0.5.0/tests/test_agent_service.py +828 -0
- musespiral-0.5.0/tests/test_ai.py +208 -0
- musespiral-0.5.0/tests/test_ai_budget.py +213 -0
- musespiral-0.5.0/tests/test_ai_cache.py +234 -0
- musespiral-0.5.0/tests/test_ai_check.py +213 -0
- musespiral-0.5.0/tests/test_ai_gateway.py +406 -0
- musespiral-0.5.0/tests/test_ai_ops_cmds.py +170 -0
- musespiral-0.5.0/tests/test_ai_usage.py +170 -0
- musespiral-0.5.0/tests/test_aihabits.py +208 -0
- musespiral-0.5.0/tests/test_analytics.py +505 -0
- musespiral-0.5.0/tests/test_arch1_css_split.py +243 -0
- musespiral-0.5.0/tests/test_architecture.py +1643 -0
- musespiral-0.5.0/tests/test_article.py +261 -0
- musespiral-0.5.0/tests/test_assertion_strength.py +347 -0
- musespiral-0.5.0/tests/test_backup.py +85 -0
- musespiral-0.5.0/tests/test_banned_words.py +258 -0
- musespiral-0.5.0/tests/test_batch_cli.py +249 -0
- musespiral-0.5.0/tests/test_book_fetch.py +863 -0
- musespiral-0.5.0/tests/test_book_integration.py +408 -0
- musespiral-0.5.0/tests/test_booksource_fetch.py +166 -0
- musespiral-0.5.0/tests/test_booksource_import_modal.py +489 -0
- musespiral-0.5.0/tests/test_booksource_importer.py +129 -0
- musespiral-0.5.0/tests/test_booksource_merge.py +83 -0
- musespiral-0.5.0/tests/test_booksource_model.py +143 -0
- musespiral-0.5.0/tests/test_booksource_real.py +255 -0
- musespiral-0.5.0/tests/test_booksource_service.py +477 -0
- musespiral-0.5.0/tests/test_booksource_studio.py +325 -0
- musespiral-0.5.0/tests/test_build_ui.py +1534 -0
- musespiral-0.5.0/tests/test_canvas_layout.py +287 -0
- musespiral-0.5.0/tests/test_canvas_model.py +249 -0
- musespiral-0.5.0/tests/test_canvas_pillow.py +123 -0
- musespiral-0.5.0/tests/test_canvas_svg.py +327 -0
- musespiral-0.5.0/tests/test_cards.py +456 -0
- musespiral-0.5.0/tests/test_cli_snapshot.py +166 -0
- musespiral-0.5.0/tests/test_clipper.py +73 -0
- musespiral-0.5.0/tests/test_compose_dual.py +405 -0
- musespiral-0.5.0/tests/test_compose_feat4.py +439 -0
- musespiral-0.5.0/tests/test_compose_novel.py +709 -0
- musespiral-0.5.0/tests/test_compose_novel_ui.py +449 -0
- musespiral-0.5.0/tests/test_compose_outline.py +362 -0
- musespiral-0.5.0/tests/test_compose_rolling_summary.py +543 -0
- musespiral-0.5.0/tests/test_compose_rolling_ui.py +203 -0
- musespiral-0.5.0/tests/test_compose_service.py +526 -0
- musespiral-0.5.0/tests/test_compose_smart.py +405 -0
- musespiral-0.5.0/tests/test_compose_studio.py +309 -0
- musespiral-0.5.0/tests/test_composition.py +385 -0
- musespiral-0.5.0/tests/test_confidence_lineage.py +481 -0
- musespiral-0.5.0/tests/test_cover.py +727 -0
- musespiral-0.5.0/tests/test_dialect_gate.py +112 -0
- musespiral-0.5.0/tests/test_digest.py +91 -0
- musespiral-0.5.0/tests/test_discover_cli_snapshot.py +71 -0
- musespiral-0.5.0/tests/test_discover_cmds.py +111 -0
- musespiral-0.5.0/tests/test_discovery_scanner.py +206 -0
- musespiral-0.5.0/tests/test_discovery_scorer.py +182 -0
- musespiral-0.5.0/tests/test_discovery_service.py +261 -0
- musespiral-0.5.0/tests/test_discovery_skeleton.py +141 -0
- musespiral-0.5.0/tests/test_discovery_suggester.py +191 -0
- musespiral-0.5.0/tests/test_doc_upload_integration.py +201 -0
- musespiral-0.5.0/tests/test_e5_e6_smoke.py +202 -0
- musespiral-0.5.0/tests/test_editor_ai.py +609 -0
- musespiral-0.5.0/tests/test_editor_ghost.py +632 -0
- musespiral-0.5.0/tests/test_editor_ui.py +501 -0
- musespiral-0.5.0/tests/test_embedding.py +237 -0
- musespiral-0.5.0/tests/test_factcheck.py +149 -0
- musespiral-0.5.0/tests/test_feat3_data_reflow.py +158 -0
- musespiral-0.5.0/tests/test_fetcher.py +211 -0
- musespiral-0.5.0/tests/test_images.py +459 -0
- musespiral-0.5.0/tests/test_ingest_rss.py +297 -0
- musespiral-0.5.0/tests/test_ingest_service.py +443 -0
- musespiral-0.5.0/tests/test_ingest_studio.py +297 -0
- musespiral-0.5.0/tests/test_ingest_tick.py +138 -0
- musespiral-0.5.0/tests/test_integration.py +1036 -0
- musespiral-0.5.0/tests/test_jobs.py +335 -0
- musespiral-0.5.0/tests/test_kb_config.py +205 -0
- musespiral-0.5.0/tests/test_license_compliance.py +119 -0
- musespiral-0.5.0/tests/test_linkfoot.py +89 -0
- musespiral-0.5.0/tests/test_materials_feedback.py +470 -0
- musespiral-0.5.0/tests/test_materials_flywheel.py +193 -0
- musespiral-0.5.0/tests/test_materials_model.py +257 -0
- musespiral-0.5.0/tests/test_materials_service.py +591 -0
- musespiral-0.5.0/tests/test_materials_vector.py +127 -0
- musespiral-0.5.0/tests/test_media_gen.py +953 -0
- musespiral-0.5.0/tests/test_new_cmds.py +126 -0
- musespiral-0.5.0/tests/test_notessql.py +269 -0
- musespiral-0.5.0/tests/test_outline_dnd.py +113 -0
- musespiral-0.5.0/tests/test_pack.py +290 -0
- musespiral-0.5.0/tests/test_pack_preview.py +432 -0
- musespiral-0.5.0/tests/test_perf.py +116 -0
- musespiral-0.5.0/tests/test_pipeline_control_flow.py +790 -0
- musespiral-0.5.0/tests/test_pipeline_plugins.py +591 -0
- musespiral-0.5.0/tests/test_pipeline_plugins_fixtures.py +237 -0
- musespiral-0.5.0/tests/test_pipeline_regenerate.py +767 -0
- musespiral-0.5.0/tests/test_pipeline_service.py +403 -0
- musespiral-0.5.0/tests/test_plan_cmds.py +105 -0
- musespiral-0.5.0/tests/test_plan_service.py +190 -0
- musespiral-0.5.0/tests/test_platforms.py +383 -0
- musespiral-0.5.0/tests/test_plugin_endpoints.py +665 -0
- musespiral-0.5.0/tests/test_plugin_runtime_v2.py +480 -0
- musespiral-0.5.0/tests/test_plugins_builtin.py +471 -0
- musespiral-0.5.0/tests/test_plugins_builtin_doc_extract.py +429 -0
- musespiral-0.5.0/tests/test_plugins_builtin_examples.py +483 -0
- musespiral-0.5.0/tests/test_plugins_builtin_local_scan.py +436 -0
- musespiral-0.5.0/tests/test_plugins_builtin_pl5.py +770 -0
- musespiral-0.5.0/tests/test_plugins_builtin_pl6.py +988 -0
- musespiral-0.5.0/tests/test_plugins_builtin_subtitle.py +327 -0
- musespiral-0.5.0/tests/test_plugins_contract.py +441 -0
- musespiral-0.5.0/tests/test_plugins_e2e.py +684 -0
- musespiral-0.5.0/tests/test_plugins_loader.py +327 -0
- musespiral-0.5.0/tests/test_plugins_ui.py +680 -0
- musespiral-0.5.0/tests/test_poster.py +282 -0
- musespiral-0.5.0/tests/test_publish_log_service.py +231 -0
- musespiral-0.5.0/tests/test_quality_gate.py +351 -0
- musespiral-0.5.0/tests/test_quality_loop.py +350 -0
- musespiral-0.5.0/tests/test_quickstart_ui.py +246 -0
- musespiral-0.5.0/tests/test_radarhub_client.py +195 -0
- musespiral-0.5.0/tests/test_refine_iterations.py +383 -0
- musespiral-0.5.0/tests/test_refine_service.py +388 -0
- musespiral-0.5.0/tests/test_render_checks.py +154 -0
- musespiral-0.5.0/tests/test_restore.py +243 -0
- musespiral-0.5.0/tests/test_review.py +132 -0
- musespiral-0.5.0/tests/test_rss_parse.py +153 -0
- musespiral-0.5.0/tests/test_search_service.py +493 -0
- musespiral-0.5.0/tests/test_services.py +254 -0
- musespiral-0.5.0/tests/test_settings_api.py +315 -0
- musespiral-0.5.0/tests/test_site.py +239 -0
- musespiral-0.5.0/tests/test_source_ai_config.py +421 -0
- musespiral-0.5.0/tests/test_sources.py +444 -0
- musespiral-0.5.0/tests/test_sources_service.py +376 -0
- musespiral-0.5.0/tests/test_stats.py +346 -0
- musespiral-0.5.0/tests/test_studio.py +1936 -0
- musespiral-0.5.0/tests/test_studio_cover.py +177 -0
- musespiral-0.5.0/tests/test_studio_discover.py +420 -0
- musespiral-0.5.0/tests/test_studio_materials.py +656 -0
- musespiral-0.5.0/tests/test_studio_plan.py +220 -0
- musespiral-0.5.0/tests/test_studio_refine.py +251 -0
- musespiral-0.5.0/tests/test_studio_sources.py +174 -0
- musespiral-0.5.0/tests/test_studio_sync_stats.py +139 -0
- musespiral-0.5.0/tests/test_studio_ui.py +4083 -0
- musespiral-0.5.0/tests/test_studio_ui_wiring.py +378 -0
- musespiral-0.5.0/tests/test_studio_visual.py +343 -0
- musespiral-0.5.0/tests/test_style_inject.py +362 -0
- musespiral-0.5.0/tests/test_tag_service.py +340 -0
- musespiral-0.5.0/tests/test_theme_learn.py +194 -0
- musespiral-0.5.0/tests/test_themes.py +198 -0
- musespiral-0.5.0/tests/test_title.py +259 -0
- musespiral-0.5.0/tests/test_title_ab.py +228 -0
- musespiral-0.5.0/tests/test_topic_radar.py +354 -0
- musespiral-0.5.0/tests/test_tts.py +633 -0
- musespiral-0.5.0/tests/test_upload_receipt.py +194 -0
- musespiral-0.5.0/tests/test_uploader_browser.py +368 -0
- musespiral-0.5.0/tests/test_version_diff.py +541 -0
- musespiral-0.5.0/tests/test_visual_cmds.py +228 -0
- musespiral-0.5.0/tests/test_visual_raster.py +197 -0
- musespiral-0.5.0/tests/test_visual_service.py +747 -0
- musespiral-0.5.0/tests/test_visual_shapes.py +153 -0
- musespiral-0.5.0/tests/test_visual_templates.py +310 -0
- musespiral-0.5.0/tests/test_wcag_contrast.py +332 -0
- musespiral-0.5.0/tests/test_writing_stats.py +247 -0
musespiral-0.5.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 wagic
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: musespiral
|
|
3
|
+
Version: 0.5.0
|
|
4
|
+
Summary: Open content pipeline: media in, publishable drafts out — every AI judgement stays a suggestion you can accept, regenerate or discard
|
|
5
|
+
License-Expression: MIT
|
|
6
|
+
Project-URL: Homepage, https://github.com/SeekerGalahad/musespiral
|
|
7
|
+
Project-URL: Documentation, https://github.com/SeekerGalahad/musespiral/blob/main/ARCHITECTURE.md
|
|
8
|
+
Project-URL: Repository, https://github.com/SeekerGalahad/musespiral
|
|
9
|
+
Project-URL: Issues, https://github.com/SeekerGalahad/musespiral/issues
|
|
10
|
+
Project-URL: Changelog, https://github.com/SeekerGalahad/musespiral/blob/main/CHANGELOG.md
|
|
11
|
+
Keywords: content-pipeline,ai-writing,video-to-article,human-in-the-loop,llm,markdown,plugin-system,transcription,whisper,wechat,content-creation
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Environment :: Web Environment
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
17
|
+
Classifier: Natural Language :: Chinese (Simplified)
|
|
18
|
+
Classifier: Operating System :: OS Independent
|
|
19
|
+
Classifier: Programming Language :: Python :: 3
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
24
|
+
Classifier: Topic :: Multimedia :: Video
|
|
25
|
+
Classifier: Topic :: Text Processing :: Markup :: Markdown
|
|
26
|
+
Classifier: Topic :: Text Processing :: Linguistic
|
|
27
|
+
Requires-Python: >=3.10
|
|
28
|
+
Description-Content-Type: text/markdown
|
|
29
|
+
License-File: LICENSE
|
|
30
|
+
Requires-Dist: requests>=2.31.0
|
|
31
|
+
Requires-Dist: Pillow>=10.0.0
|
|
32
|
+
Requires-Dist: Pygments>=2.17.0
|
|
33
|
+
Requires-Dist: mistune>=3.0.0
|
|
34
|
+
Requires-Dist: python-frontmatter>=1.0.0
|
|
35
|
+
Requires-Dist: PyYAML>=6.0
|
|
36
|
+
Requires-Dist: click>=8.1.0
|
|
37
|
+
Requires-Dist: pydantic>=2.0.0
|
|
38
|
+
Requires-Dist: feedparser>=6.0
|
|
39
|
+
Requires-Dist: readability-lxml>=0.9
|
|
40
|
+
Requires-Dist: edge-tts>=7.0
|
|
41
|
+
Requires-Dist: beautifulsoup4>=4.12
|
|
42
|
+
Provides-Extra: test
|
|
43
|
+
Requires-Dist: pytest; extra == "test"
|
|
44
|
+
Requires-Dist: pytest-cov; extra == "test"
|
|
45
|
+
Provides-Extra: docs
|
|
46
|
+
Requires-Dist: markitdown; extra == "docs"
|
|
47
|
+
Requires-Dist: mammoth; extra == "docs"
|
|
48
|
+
Provides-Extra: media
|
|
49
|
+
Requires-Dist: faster-whisper; extra == "media"
|
|
50
|
+
Provides-Extra: browser
|
|
51
|
+
Requires-Dist: playwright>=1.40; extra == "browser"
|
|
52
|
+
Provides-Extra: dev
|
|
53
|
+
Requires-Dist: pytest; extra == "dev"
|
|
54
|
+
Requires-Dist: pytest-cov; extra == "dev"
|
|
55
|
+
Requires-Dist: mypy; extra == "dev"
|
|
56
|
+
Requires-Dist: black; extra == "dev"
|
|
57
|
+
Requires-Dist: isort; extra == "dev"
|
|
58
|
+
Requires-Dist: flake8; extra == "dev"
|
|
59
|
+
Requires-Dist: pre-commit; extra == "dev"
|
|
60
|
+
Dynamic: license-file
|
|
61
|
+
|
|
62
|
+
# musespiral
|
|
63
|
+
|
|
64
|
+
> **开源的内容流水线**:素材进来,成稿出去,每个 AI 判断你都能改。
|
|
65
|
+
|
|
66
|
+
[](LICENSE)
|
|
67
|
+
[](https://www.python.org/)
|
|
68
|
+
[](tests/)
|
|
69
|
+
[](https://github.com/psf/black)
|
|
70
|
+
|
|
71
|
+
**视频 / 音频 / 字幕 / 文档 / 网页 / 书籍 → 转写切片 → 结构化成稿 → 多平台发布 → 反哺回素材库**
|
|
72
|
+
|
|
73
|
+

|
|
74
|
+
|
|
75
|
+
> 25 秒看完:素材库 → 创作工坊的逐块裁决 → 文章里的时间戳锚 → 洞察里的写作节奏。
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## 它解决什么问题
|
|
80
|
+
|
|
81
|
+
你有一个 8.5 小时的讲座视频,想把它变成一篇能发布的图文稿。
|
|
82
|
+
|
|
83
|
+
**传统做法**:看视频 → 手记 → 写稿 → 找图 → 排版 → 发布。耗时以天计。
|
|
84
|
+
|
|
85
|
+
**用 SaaS 工具**:上传 → AI 吐一篇稿 → 但你不能改它的判断(哪些是重点?怎么组织?),也不方便接回你的素材库。
|
|
86
|
+
|
|
87
|
+
**musespiral**:跑一条流水线,**每个 AI 判断都是建议,你决定采纳哪些**。
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
# 1. 找本地媒体
|
|
91
|
+
musespiral plugins list # 看 9 个内置插件
|
|
92
|
+
musespiral plrun run \
|
|
93
|
+
--node "local-file:{path: /path/to/lecture.mp4}" \
|
|
94
|
+
--node transcribe \
|
|
95
|
+
--node key-segment \
|
|
96
|
+
--node frame-grab \
|
|
97
|
+
--node article-writer \
|
|
98
|
+
--node material-sink
|
|
99
|
+
|
|
100
|
+
# 2. 产物:带时间戳锚的图文稿,每个 AI 判断都是 draft 态
|
|
101
|
+
# - 切片:AI 建议 8 段 [全部采纳] [逐条审查]
|
|
102
|
+
# - 成稿:AI 建议稿 [采纳] [重新生成] [对比两版]
|
|
103
|
+
|
|
104
|
+
# 3. 有字幕就跳过 ASR(快 100 倍,准确率 100%)
|
|
105
|
+
musespiral plrun run \
|
|
106
|
+
--node "subtitle:{subtitle_path: lecture.srt, media_path: lecture.mp4}" \
|
|
107
|
+
--node key-segment --node frame-grab --node article-writer --node material-sink
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## 三个核心差异
|
|
113
|
+
|
|
114
|
+
### ① 时间戳锚:文章可回溯到视频原处
|
|
115
|
+
|
|
116
|
+
```markdown
|
|
117
|
+
## 多头注意力的并行扩展
|
|
118
|
+
|
|
119
|
+
[00:03:35](#t=215) 上一页我们学会了单个注意力怎么算,可只从一个角度看句子
|
|
120
|
+
难免片面,所以这一页把它升级成多头。
|
|
121
|
+
|
|
122
|
+

|
|
123
|
+
*图:00:03:35 处关键帧(来源片段 00:03:35–00:03:37)*
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
**这是「视频转文章」相对于「看视频」的唯一增量**——不是把视频变成字,是让文字可回溯。
|
|
127
|
+
|
|
128
|
+
现有竞品(markitdown / docling / gpt-researcher / storm)**都没有这个能力**。
|
|
129
|
+
|
|
130
|
+
### ② AI 产物默认是「建议」不是「结论」
|
|
131
|
+
|
|
132
|
+
```
|
|
133
|
+
AI 产出 → [draft 建议] → 人工裁决 → [adopted 正式]
|
|
134
|
+
↓ ↓
|
|
135
|
+
[discarded 弃用] 可用可发布
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
- 每条 AI 判断(切片 / 成稿 / 摘要)带 `draft` 状态 + 琥珀徽章
|
|
139
|
+
- 可**采纳** / **重新生成**(保留旧版供对比)/ **弃用**
|
|
140
|
+
- 一次提炼不满意?带 feedback 重生成 → 进版本链 → 两版 diff → 回退也进链
|
|
141
|
+
|
|
142
|
+
**默认保守,但允许切全自动**(`auto_adopt: true`)——信任 AI 的用户不被强制审查。
|
|
143
|
+
|
|
144
|
+
### ③ 飞轮闭环:发布出去的内容能回流
|
|
145
|
+
|
|
146
|
+
```
|
|
147
|
+
外部源 → 素材池 → 创作 → 发布
|
|
148
|
+
↑ ↓
|
|
149
|
+
└──── 反哺 ←────────────┘
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
- 已发布文章可反哺回素材库(全文归档 / 段落摘取 / AI 提炼论点)
|
|
153
|
+
- `⌘⇧I` 灵感速记:任意视图按一下,一句话进素材库
|
|
154
|
+
- 素材有血统链(`provenance.chain`)+ 打磨版本链(v1/v2/v3 + diff + 回退)
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## 架构总览
|
|
159
|
+
|
|
160
|
+
```mermaid
|
|
161
|
+
flowchart TB
|
|
162
|
+
subgraph IN["① 输入层"]
|
|
163
|
+
direction LR
|
|
164
|
+
I1["视频 / 音频"]
|
|
165
|
+
I2["字幕 SRT/VTT"]
|
|
166
|
+
I3["文档 PDF/DOCX/EPUB"]
|
|
167
|
+
I4["网页 / 书籍"]
|
|
168
|
+
end
|
|
169
|
+
subgraph PROC["② 处理层 · 插件流水线"]
|
|
170
|
+
direction LR
|
|
171
|
+
P0{{"编排:switch / loop<br/>相邻节点契约类型校验"}}
|
|
172
|
+
P1["transcribe<br/>whisper"]
|
|
173
|
+
P2["key-segment"]
|
|
174
|
+
P3["frame-grab"]
|
|
175
|
+
P4["article-writer"]
|
|
176
|
+
end
|
|
177
|
+
subgraph JUDGE["③ 裁决层 · AI 只是建议"]
|
|
178
|
+
direction LR
|
|
179
|
+
J1["draft<br/>琥珀徽章"]
|
|
180
|
+
J2["adopt<br/>进版本链"]
|
|
181
|
+
J3["regenerate<br/>保留旧版对比"]
|
|
182
|
+
end
|
|
183
|
+
subgraph OUT["④ 输出层"]
|
|
184
|
+
direction LR
|
|
185
|
+
O1["公众号"]
|
|
186
|
+
O2["小红书"]
|
|
187
|
+
O3["知乎 / Markdown"]
|
|
188
|
+
end
|
|
189
|
+
LIB[("素材库<br/>血统链 · 打磨版本链")]
|
|
190
|
+
INS[("洞察<br/>写作节奏 · 发布数据")]
|
|
191
|
+
|
|
192
|
+
I1 & I2 & I3 & I4 --> P0
|
|
193
|
+
P0 --> P1 --> P2 --> P3 --> P4
|
|
194
|
+
P4 --> J1
|
|
195
|
+
J1 --> J2
|
|
196
|
+
J1 -.->|不满意| J3
|
|
197
|
+
J3 -.->|feedback 重生| J1
|
|
198
|
+
J2 --> O1 & O2 & O3
|
|
199
|
+
O1 & O2 & O3 -.->|发布数据回流| INS
|
|
200
|
+
INS -.->|反哺素材 / 论点| LIB
|
|
201
|
+
LIB --> P0
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
四个层各自独立可替换:换转写器只动 `transcribe`,换平台只动输出适配器;**裁决层是唯一的人工闸门**,AI 永远只产出 `draft`。
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
## 快速开始
|
|
209
|
+
|
|
210
|
+
```bash
|
|
211
|
+
git clone <repo> && cd musespiral
|
|
212
|
+
python3 -m venv .venv && source .venv/bin/activate
|
|
213
|
+
pip install -e ".[test]"
|
|
214
|
+
|
|
215
|
+
# 可选:音视频转写(约 85MB + 首次下模型 1.6GB)
|
|
216
|
+
pip install faster-whisper
|
|
217
|
+
|
|
218
|
+
# 可选:文档提取(PDF/DOCX,约 7MB)
|
|
219
|
+
pip install pdfplumber python-docx
|
|
220
|
+
|
|
221
|
+
pytest -q # 3212 passed, 1 skipped
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
启动本地工作台(11 个视图,Studio 只绑 127.0.0.1,数据不出本机):
|
|
225
|
+
|
|
226
|
+
```bash
|
|
227
|
+
musespiral studio --root tests/fixtures/studio_demo
|
|
228
|
+
# → http://127.0.0.1:8766
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
视图:发布中心 / 素材库 / 书籍 / 视觉编辑 / 创作工坊 / 洞察 / 源中枢 / 设置 / 文章详情 / 插件清单 / 流水线运行
|
|
232
|
+
|
|
233
|
+
---
|
|
234
|
+
|
|
235
|
+
## 插件系统
|
|
236
|
+
|
|
237
|
+
**契约优先于实现**:插件之间只通过 10 种类型化契约通信,不共享内存、不互相 import。
|
|
238
|
+
|
|
239
|
+
```json
|
|
240
|
+
{
|
|
241
|
+
"id": "transcribe",
|
|
242
|
+
"kind": "process",
|
|
243
|
+
"inputs": { "media_path": {"type": "file/path", "required": true} },
|
|
244
|
+
"outputs": { "transcript": {"type": "segments"} },
|
|
245
|
+
"runtime": { "type": "python", "entry": "plugin.py:run" },
|
|
246
|
+
"permissions": ["fs:read"]
|
|
247
|
+
}
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
**这一条纪律让三件事同时成立**:
|
|
251
|
+
- **可替换**——faster-whisper → FunASR 只换一个插件,下游零改动
|
|
252
|
+
- **可静态校验**——保存流水线时检查相邻节点类型接不接得上
|
|
253
|
+
- **可跨语言**——`exec` runtime 支持任意可执行程序
|
|
254
|
+
|
|
255
|
+
### 内置 12 个插件
|
|
256
|
+
|
|
257
|
+
| 插件 | 类型 | 职责 |
|
|
258
|
+
|---|---|---|
|
|
259
|
+
| `local-file` | source | 校验本地媒体(9 种音视频格式) |
|
|
260
|
+
| `local-scan` | source | 扫描目录找音视频(roots 白名单 + 隐私目录硬排除 + 限额防卡死) |
|
|
261
|
+
| **`transcribe`** | process | 音视频转写(每段带 `avg_logprob` / `no_speech_prob` 质量信号) |
|
|
262
|
+
| **`subtitle`** | process | 字幕直出 segments(跳过 ASR,快 100 倍、准确率 100%) |
|
|
263
|
+
| **`doc-extract`** | process | PDF/DOCX/EPUB/MD/TXT → 文本(**纯标准库解析 EPUB,零 AGPL 依赖**) |
|
|
264
|
+
| `key-segment` | process | 识别关键段落(AI + 规则降级双路径) |
|
|
265
|
+
| `frame-grab` | process | 抽关键帧 / 裁剪片段(避开转场,窗口感知锚) |
|
|
266
|
+
| `article-writer` | process | 组织成带时间戳锚的图文稿(AI + 模板双路径) |
|
|
267
|
+
| `material-sink` | sink | 落库为素材(preview 态 + 血统链) |
|
|
268
|
+
| `duration-switch` | control | 按时长路由(>300s 走完整切片链,短视频直出成稿) |
|
|
269
|
+
| `refine-segments` | process | 循环体工人:逐段精炼口语转写为书面语(loop 语义实战) |
|
|
270
|
+
| `word-count` | sink | 字数/词数/行数统计(`exec` runtime 实战:bash + stdin/stdout JSON) |
|
|
271
|
+
|
|
272
|
+
**写自己的插件**:放一个目录到 `~/.musespiral/plugins/<id>/`,含 `manifest.json` + `plugin.py`。`manifest 即 UI`——插件详情页自动从清单渲染,不用写一行 HTML。
|
|
273
|
+
|
|
274
|
+
---
|
|
275
|
+
|
|
276
|
+
## 代码分层
|
|
277
|
+
|
|
278
|
+
上面的架构总览讲的是**数据怎么流**,这一节讲的是**代码怎么分层**——两者是同一件事的两个视角。
|
|
279
|
+
|
|
280
|
+
```
|
|
281
|
+
表示层 commands/ (CLI) · studio/ (本地 Web 工作台)
|
|
282
|
+
↓
|
|
283
|
+
服务层 services/ (编排:compose / refine / pipeline / materials …)
|
|
284
|
+
↓
|
|
285
|
+
领域层 core/ (纯逻辑:plugins / materials / composition / version / tts …)
|
|
286
|
+
↓
|
|
287
|
+
基础设施 infra/ (AI 网关 / fetcher / media_gen / booksource …)
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
- **零外部依赖前端**:`ui.html` + `assets/core.js` + `assets/views/*.js`,零 CDN、零构建链、零 npm。视图按需懒加载(首屏 143KB / 预算 240KB)
|
|
291
|
+
- **分层用测试强制**:`core` 不得 import `infra`/`services`;`services`/`studio` 零直接网络(必经 `infra/fetcher`)
|
|
292
|
+
|
|
293
|
+
---
|
|
294
|
+
|
|
295
|
+
## 与竞品的关系
|
|
296
|
+
|
|
297
|
+
| 你需要的 | 用谁 |
|
|
298
|
+
|---|---|
|
|
299
|
+
| 只要文档转文本 | [markitdown](https://github.com/microsoft/markitdown)(★197K,格式最全) |
|
|
300
|
+
| 只要深度研究报告 | [gpt-researcher](https://github.com/assafelovic/gpt-researcher) / [storm](https://github.com/stanford-oval/storm) |
|
|
301
|
+
| 只要笔记管理 | [siyuan](https://github.com/siyuan-note/siyuan) / [joplin](https://github.com/laurent22/joplin) |
|
|
302
|
+
| **把素材跑成可发布的多平台内容,且能控制每个 AI 判断** | **musespiral** |
|
|
303
|
+
|
|
304
|
+
musespiral 不与它们竞争单项能力,而是**把「素材 → 成稿 → 发布 → 反哺」串成一条你能中途介入的流水线**。
|
|
305
|
+
|
|
306
|
+
---
|
|
307
|
+
|
|
308
|
+
## 设计原则
|
|
309
|
+
|
|
310
|
+
1. **AI 产物默认是建议**——`draft` 态可用但明确标记,用户决定是否采纳
|
|
311
|
+
2. **契约优先于实现**——插件间只通信类型化契约,可替换可校验
|
|
312
|
+
3. **本地优先**——核心零网络,数据不出本机,Studio 只绑 127.0.0.1
|
|
313
|
+
4. **诚实报错**——扫描版 PDF 明确拒绝而非返回空;缺依赖给可读指引而非 ImportError
|
|
314
|
+
5. **机器门优先于人工审查**——许可证、体积、分层、契约锁全部有测试兜底
|
|
315
|
+
|
|
316
|
+
---
|
|
317
|
+
|
|
318
|
+
## 状态
|
|
319
|
+
|
|
320
|
+
**Beta**(v0.5.0)。核心链路已跑通:
|
|
321
|
+
|
|
322
|
+
- **3212 个测试通过**(1 个 e2e 需真机凭证,默认跳过)
|
|
323
|
+
- 12 个插件、11 个前端视图
|
|
324
|
+
- 真实素材验证:513 秒中文讲座 → 221 段转写 → 8 关键帧 → 带时间戳锚的图文稿 → 素材库
|
|
325
|
+
- 发布链路真机验证:Markdown → 审核 → 图片上传 → 公众号**草稿创建成功**
|
|
326
|
+
|
|
327
|
+
**未完成**:扫描版 PDF 的 OCR、公众号正式发表(freepublish 需认证主体,草稿之后目前人工后台完成)。
|
|
328
|
+
|
|
329
|
+
---
|
|
330
|
+
|
|
331
|
+
## 许可证
|
|
332
|
+
|
|
333
|
+
[MIT](LICENSE)。依赖全部宽松许可(MIT / Apache-2.0 / BSD / LGPL),**零 AGPL/GPL 污染**(有机器门守护:`tests/test_license_compliance.py`)。
|
|
334
|
+
|
|
335
|
+
---
|
|
336
|
+
|
|
337
|
+
## 贡献
|
|
338
|
+
|
|
339
|
+
见 [CONTRIBUTING.md](CONTRIBUTING.md)。两条硬规则:
|
|
340
|
+
|
|
341
|
+
1. **不要引入 AGPL/GPL 依赖**——机器门会拦住你
|
|
342
|
+
2. **加了 AI 能力就要加裁决**——AI 产物默认 `draft`,用户能采纳 / 重生成 / 弃用
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
# musespiral
|
|
2
|
+
|
|
3
|
+
> **开源的内容流水线**:素材进来,成稿出去,每个 AI 判断你都能改。
|
|
4
|
+
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
[](https://www.python.org/)
|
|
7
|
+
[](tests/)
|
|
8
|
+
[](https://github.com/psf/black)
|
|
9
|
+
|
|
10
|
+
**视频 / 音频 / 字幕 / 文档 / 网页 / 书籍 → 转写切片 → 结构化成稿 → 多平台发布 → 反哺回素材库**
|
|
11
|
+
|
|
12
|
+

|
|
13
|
+
|
|
14
|
+
> 25 秒看完:素材库 → 创作工坊的逐块裁决 → 文章里的时间戳锚 → 洞察里的写作节奏。
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## 它解决什么问题
|
|
19
|
+
|
|
20
|
+
你有一个 8.5 小时的讲座视频,想把它变成一篇能发布的图文稿。
|
|
21
|
+
|
|
22
|
+
**传统做法**:看视频 → 手记 → 写稿 → 找图 → 排版 → 发布。耗时以天计。
|
|
23
|
+
|
|
24
|
+
**用 SaaS 工具**:上传 → AI 吐一篇稿 → 但你不能改它的判断(哪些是重点?怎么组织?),也不方便接回你的素材库。
|
|
25
|
+
|
|
26
|
+
**musespiral**:跑一条流水线,**每个 AI 判断都是建议,你决定采纳哪些**。
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
# 1. 找本地媒体
|
|
30
|
+
musespiral plugins list # 看 9 个内置插件
|
|
31
|
+
musespiral plrun run \
|
|
32
|
+
--node "local-file:{path: /path/to/lecture.mp4}" \
|
|
33
|
+
--node transcribe \
|
|
34
|
+
--node key-segment \
|
|
35
|
+
--node frame-grab \
|
|
36
|
+
--node article-writer \
|
|
37
|
+
--node material-sink
|
|
38
|
+
|
|
39
|
+
# 2. 产物:带时间戳锚的图文稿,每个 AI 判断都是 draft 态
|
|
40
|
+
# - 切片:AI 建议 8 段 [全部采纳] [逐条审查]
|
|
41
|
+
# - 成稿:AI 建议稿 [采纳] [重新生成] [对比两版]
|
|
42
|
+
|
|
43
|
+
# 3. 有字幕就跳过 ASR(快 100 倍,准确率 100%)
|
|
44
|
+
musespiral plrun run \
|
|
45
|
+
--node "subtitle:{subtitle_path: lecture.srt, media_path: lecture.mp4}" \
|
|
46
|
+
--node key-segment --node frame-grab --node article-writer --node material-sink
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## 三个核心差异
|
|
52
|
+
|
|
53
|
+
### ① 时间戳锚:文章可回溯到视频原处
|
|
54
|
+
|
|
55
|
+
```markdown
|
|
56
|
+
## 多头注意力的并行扩展
|
|
57
|
+
|
|
58
|
+
[00:03:35](#t=215) 上一页我们学会了单个注意力怎么算,可只从一个角度看句子
|
|
59
|
+
难免片面,所以这一页把它升级成多头。
|
|
60
|
+
|
|
61
|
+

|
|
62
|
+
*图:00:03:35 处关键帧(来源片段 00:03:35–00:03:37)*
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
**这是「视频转文章」相对于「看视频」的唯一增量**——不是把视频变成字,是让文字可回溯。
|
|
66
|
+
|
|
67
|
+
现有竞品(markitdown / docling / gpt-researcher / storm)**都没有这个能力**。
|
|
68
|
+
|
|
69
|
+
### ② AI 产物默认是「建议」不是「结论」
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
AI 产出 → [draft 建议] → 人工裁决 → [adopted 正式]
|
|
73
|
+
↓ ↓
|
|
74
|
+
[discarded 弃用] 可用可发布
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
- 每条 AI 判断(切片 / 成稿 / 摘要)带 `draft` 状态 + 琥珀徽章
|
|
78
|
+
- 可**采纳** / **重新生成**(保留旧版供对比)/ **弃用**
|
|
79
|
+
- 一次提炼不满意?带 feedback 重生成 → 进版本链 → 两版 diff → 回退也进链
|
|
80
|
+
|
|
81
|
+
**默认保守,但允许切全自动**(`auto_adopt: true`)——信任 AI 的用户不被强制审查。
|
|
82
|
+
|
|
83
|
+
### ③ 飞轮闭环:发布出去的内容能回流
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
外部源 → 素材池 → 创作 → 发布
|
|
87
|
+
↑ ↓
|
|
88
|
+
└──── 反哺 ←────────────┘
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
- 已发布文章可反哺回素材库(全文归档 / 段落摘取 / AI 提炼论点)
|
|
92
|
+
- `⌘⇧I` 灵感速记:任意视图按一下,一句话进素材库
|
|
93
|
+
- 素材有血统链(`provenance.chain`)+ 打磨版本链(v1/v2/v3 + diff + 回退)
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## 架构总览
|
|
98
|
+
|
|
99
|
+
```mermaid
|
|
100
|
+
flowchart TB
|
|
101
|
+
subgraph IN["① 输入层"]
|
|
102
|
+
direction LR
|
|
103
|
+
I1["视频 / 音频"]
|
|
104
|
+
I2["字幕 SRT/VTT"]
|
|
105
|
+
I3["文档 PDF/DOCX/EPUB"]
|
|
106
|
+
I4["网页 / 书籍"]
|
|
107
|
+
end
|
|
108
|
+
subgraph PROC["② 处理层 · 插件流水线"]
|
|
109
|
+
direction LR
|
|
110
|
+
P0{{"编排:switch / loop<br/>相邻节点契约类型校验"}}
|
|
111
|
+
P1["transcribe<br/>whisper"]
|
|
112
|
+
P2["key-segment"]
|
|
113
|
+
P3["frame-grab"]
|
|
114
|
+
P4["article-writer"]
|
|
115
|
+
end
|
|
116
|
+
subgraph JUDGE["③ 裁决层 · AI 只是建议"]
|
|
117
|
+
direction LR
|
|
118
|
+
J1["draft<br/>琥珀徽章"]
|
|
119
|
+
J2["adopt<br/>进版本链"]
|
|
120
|
+
J3["regenerate<br/>保留旧版对比"]
|
|
121
|
+
end
|
|
122
|
+
subgraph OUT["④ 输出层"]
|
|
123
|
+
direction LR
|
|
124
|
+
O1["公众号"]
|
|
125
|
+
O2["小红书"]
|
|
126
|
+
O3["知乎 / Markdown"]
|
|
127
|
+
end
|
|
128
|
+
LIB[("素材库<br/>血统链 · 打磨版本链")]
|
|
129
|
+
INS[("洞察<br/>写作节奏 · 发布数据")]
|
|
130
|
+
|
|
131
|
+
I1 & I2 & I3 & I4 --> P0
|
|
132
|
+
P0 --> P1 --> P2 --> P3 --> P4
|
|
133
|
+
P4 --> J1
|
|
134
|
+
J1 --> J2
|
|
135
|
+
J1 -.->|不满意| J3
|
|
136
|
+
J3 -.->|feedback 重生| J1
|
|
137
|
+
J2 --> O1 & O2 & O3
|
|
138
|
+
O1 & O2 & O3 -.->|发布数据回流| INS
|
|
139
|
+
INS -.->|反哺素材 / 论点| LIB
|
|
140
|
+
LIB --> P0
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
四个层各自独立可替换:换转写器只动 `transcribe`,换平台只动输出适配器;**裁决层是唯一的人工闸门**,AI 永远只产出 `draft`。
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## 快速开始
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
git clone <repo> && cd musespiral
|
|
151
|
+
python3 -m venv .venv && source .venv/bin/activate
|
|
152
|
+
pip install -e ".[test]"
|
|
153
|
+
|
|
154
|
+
# 可选:音视频转写(约 85MB + 首次下模型 1.6GB)
|
|
155
|
+
pip install faster-whisper
|
|
156
|
+
|
|
157
|
+
# 可选:文档提取(PDF/DOCX,约 7MB)
|
|
158
|
+
pip install pdfplumber python-docx
|
|
159
|
+
|
|
160
|
+
pytest -q # 3212 passed, 1 skipped
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
启动本地工作台(11 个视图,Studio 只绑 127.0.0.1,数据不出本机):
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
musespiral studio --root tests/fixtures/studio_demo
|
|
167
|
+
# → http://127.0.0.1:8766
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
视图:发布中心 / 素材库 / 书籍 / 视觉编辑 / 创作工坊 / 洞察 / 源中枢 / 设置 / 文章详情 / 插件清单 / 流水线运行
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
## 插件系统
|
|
175
|
+
|
|
176
|
+
**契约优先于实现**:插件之间只通过 10 种类型化契约通信,不共享内存、不互相 import。
|
|
177
|
+
|
|
178
|
+
```json
|
|
179
|
+
{
|
|
180
|
+
"id": "transcribe",
|
|
181
|
+
"kind": "process",
|
|
182
|
+
"inputs": { "media_path": {"type": "file/path", "required": true} },
|
|
183
|
+
"outputs": { "transcript": {"type": "segments"} },
|
|
184
|
+
"runtime": { "type": "python", "entry": "plugin.py:run" },
|
|
185
|
+
"permissions": ["fs:read"]
|
|
186
|
+
}
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
**这一条纪律让三件事同时成立**:
|
|
190
|
+
- **可替换**——faster-whisper → FunASR 只换一个插件,下游零改动
|
|
191
|
+
- **可静态校验**——保存流水线时检查相邻节点类型接不接得上
|
|
192
|
+
- **可跨语言**——`exec` runtime 支持任意可执行程序
|
|
193
|
+
|
|
194
|
+
### 内置 12 个插件
|
|
195
|
+
|
|
196
|
+
| 插件 | 类型 | 职责 |
|
|
197
|
+
|---|---|---|
|
|
198
|
+
| `local-file` | source | 校验本地媒体(9 种音视频格式) |
|
|
199
|
+
| `local-scan` | source | 扫描目录找音视频(roots 白名单 + 隐私目录硬排除 + 限额防卡死) |
|
|
200
|
+
| **`transcribe`** | process | 音视频转写(每段带 `avg_logprob` / `no_speech_prob` 质量信号) |
|
|
201
|
+
| **`subtitle`** | process | 字幕直出 segments(跳过 ASR,快 100 倍、准确率 100%) |
|
|
202
|
+
| **`doc-extract`** | process | PDF/DOCX/EPUB/MD/TXT → 文本(**纯标准库解析 EPUB,零 AGPL 依赖**) |
|
|
203
|
+
| `key-segment` | process | 识别关键段落(AI + 规则降级双路径) |
|
|
204
|
+
| `frame-grab` | process | 抽关键帧 / 裁剪片段(避开转场,窗口感知锚) |
|
|
205
|
+
| `article-writer` | process | 组织成带时间戳锚的图文稿(AI + 模板双路径) |
|
|
206
|
+
| `material-sink` | sink | 落库为素材(preview 态 + 血统链) |
|
|
207
|
+
| `duration-switch` | control | 按时长路由(>300s 走完整切片链,短视频直出成稿) |
|
|
208
|
+
| `refine-segments` | process | 循环体工人:逐段精炼口语转写为书面语(loop 语义实战) |
|
|
209
|
+
| `word-count` | sink | 字数/词数/行数统计(`exec` runtime 实战:bash + stdin/stdout JSON) |
|
|
210
|
+
|
|
211
|
+
**写自己的插件**:放一个目录到 `~/.musespiral/plugins/<id>/`,含 `manifest.json` + `plugin.py`。`manifest 即 UI`——插件详情页自动从清单渲染,不用写一行 HTML。
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## 代码分层
|
|
216
|
+
|
|
217
|
+
上面的架构总览讲的是**数据怎么流**,这一节讲的是**代码怎么分层**——两者是同一件事的两个视角。
|
|
218
|
+
|
|
219
|
+
```
|
|
220
|
+
表示层 commands/ (CLI) · studio/ (本地 Web 工作台)
|
|
221
|
+
↓
|
|
222
|
+
服务层 services/ (编排:compose / refine / pipeline / materials …)
|
|
223
|
+
↓
|
|
224
|
+
领域层 core/ (纯逻辑:plugins / materials / composition / version / tts …)
|
|
225
|
+
↓
|
|
226
|
+
基础设施 infra/ (AI 网关 / fetcher / media_gen / booksource …)
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
- **零外部依赖前端**:`ui.html` + `assets/core.js` + `assets/views/*.js`,零 CDN、零构建链、零 npm。视图按需懒加载(首屏 143KB / 预算 240KB)
|
|
230
|
+
- **分层用测试强制**:`core` 不得 import `infra`/`services`;`services`/`studio` 零直接网络(必经 `infra/fetcher`)
|
|
231
|
+
|
|
232
|
+
---
|
|
233
|
+
|
|
234
|
+
## 与竞品的关系
|
|
235
|
+
|
|
236
|
+
| 你需要的 | 用谁 |
|
|
237
|
+
|---|---|
|
|
238
|
+
| 只要文档转文本 | [markitdown](https://github.com/microsoft/markitdown)(★197K,格式最全) |
|
|
239
|
+
| 只要深度研究报告 | [gpt-researcher](https://github.com/assafelovic/gpt-researcher) / [storm](https://github.com/stanford-oval/storm) |
|
|
240
|
+
| 只要笔记管理 | [siyuan](https://github.com/siyuan-note/siyuan) / [joplin](https://github.com/laurent22/joplin) |
|
|
241
|
+
| **把素材跑成可发布的多平台内容,且能控制每个 AI 判断** | **musespiral** |
|
|
242
|
+
|
|
243
|
+
musespiral 不与它们竞争单项能力,而是**把「素材 → 成稿 → 发布 → 反哺」串成一条你能中途介入的流水线**。
|
|
244
|
+
|
|
245
|
+
---
|
|
246
|
+
|
|
247
|
+
## 设计原则
|
|
248
|
+
|
|
249
|
+
1. **AI 产物默认是建议**——`draft` 态可用但明确标记,用户决定是否采纳
|
|
250
|
+
2. **契约优先于实现**——插件间只通信类型化契约,可替换可校验
|
|
251
|
+
3. **本地优先**——核心零网络,数据不出本机,Studio 只绑 127.0.0.1
|
|
252
|
+
4. **诚实报错**——扫描版 PDF 明确拒绝而非返回空;缺依赖给可读指引而非 ImportError
|
|
253
|
+
5. **机器门优先于人工审查**——许可证、体积、分层、契约锁全部有测试兜底
|
|
254
|
+
|
|
255
|
+
---
|
|
256
|
+
|
|
257
|
+
## 状态
|
|
258
|
+
|
|
259
|
+
**Beta**(v0.5.0)。核心链路已跑通:
|
|
260
|
+
|
|
261
|
+
- **3212 个测试通过**(1 个 e2e 需真机凭证,默认跳过)
|
|
262
|
+
- 12 个插件、11 个前端视图
|
|
263
|
+
- 真实素材验证:513 秒中文讲座 → 221 段转写 → 8 关键帧 → 带时间戳锚的图文稿 → 素材库
|
|
264
|
+
- 发布链路真机验证:Markdown → 审核 → 图片上传 → 公众号**草稿创建成功**
|
|
265
|
+
|
|
266
|
+
**未完成**:扫描版 PDF 的 OCR、公众号正式发表(freepublish 需认证主体,草稿之后目前人工后台完成)。
|
|
267
|
+
|
|
268
|
+
---
|
|
269
|
+
|
|
270
|
+
## 许可证
|
|
271
|
+
|
|
272
|
+
[MIT](LICENSE)。依赖全部宽松许可(MIT / Apache-2.0 / BSD / LGPL),**零 AGPL/GPL 污染**(有机器门守护:`tests/test_license_compliance.py`)。
|
|
273
|
+
|
|
274
|
+
---
|
|
275
|
+
|
|
276
|
+
## 贡献
|
|
277
|
+
|
|
278
|
+
见 [CONTRIBUTING.md](CONTRIBUTING.md)。两条硬规则:
|
|
279
|
+
|
|
280
|
+
1. **不要引入 AGPL/GPL 依赖**——机器门会拦住你
|
|
281
|
+
2. **加了 AI 能力就要加裁决**——AI 产物默认 `draft`,用户能采纳 / 重生成 / 弃用
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"""F16 浏览器上传器 — 填表交给机器、点发布留给人(真机验证留用户)。
|
|
2
|
+
|
|
3
|
+
公开 API:login / publish_flow / dry_run(CLI `musespiral upload` 组接线归集成
|
|
4
|
+
阶段)。playwright 为 browser extra(session 内 lazy import,缺失抛
|
|
5
|
+
BrowserNotInstalled 附安装与镜像提示);选择器外置 selectors/*.yaml 可更新;
|
|
6
|
+
红线①:发布按钮代码永不点击(结构测试 tests/test_browser.py 守护);
|
|
7
|
+
红线②:cookie 只存 ~/.musespiral/cookies/(仓外)。
|
|
8
|
+
"""
|
|
9
|
+
from __future__ import annotations
|
|
10
|
+
|
|
11
|
+
from .cookies import CookieMissing
|
|
12
|
+
from .flows import PLATFORMS, dry_run, get_flow, login, publish_flow
|
|
13
|
+
from .session import BrowserNotInstalled, BrowserSession
|
|
14
|
+
|
|
15
|
+
__all__ = [
|
|
16
|
+
"PLATFORMS",
|
|
17
|
+
"BrowserNotInstalled",
|
|
18
|
+
"BrowserSession",
|
|
19
|
+
"CookieMissing",
|
|
20
|
+
"dry_run",
|
|
21
|
+
"get_flow",
|
|
22
|
+
"login",
|
|
23
|
+
"publish_flow",
|
|
24
|
+
]
|