porter-workflow 0.3.0__tar.gz → 0.3.2__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.
Files changed (167) hide show
  1. {porter_workflow-0.3.0 → porter_workflow-0.3.2}/.gitignore +12 -6
  2. {porter_workflow-0.3.0 → porter_workflow-0.3.2}/CHANGELOG.md +106 -1
  3. porter_workflow-0.3.2/PKG-INFO +317 -0
  4. porter_workflow-0.3.2/README.md +264 -0
  5. {porter_workflow-0.3.0 → porter_workflow-0.3.2}/THIRD_PARTY_NOTICES.md +1 -2
  6. porter_workflow-0.3.2/docs/README.md +55 -0
  7. porter_workflow-0.3.2/docs/architecture/README.md +24 -0
  8. porter_workflow-0.3.2/docs/architecture/jobs.md +78 -0
  9. porter_workflow-0.3.2/docs/architecture/launcher.md +65 -0
  10. porter_workflow-0.3.2/docs/architecture/layers.md +70 -0
  11. porter_workflow-0.3.2/docs/architecture/media.md +87 -0
  12. porter_workflow-0.3.2/docs/architecture/overview.md +103 -0
  13. porter_workflow-0.3.2/docs/architecture/pipeline.md +86 -0
  14. porter_workflow-0.3.2/docs/architecture/ports.md +56 -0
  15. porter_workflow-0.3.2/docs/architecture/subtitles.md +90 -0
  16. porter_workflow-0.3.2/docs/design/README.md +27 -0
  17. porter_workflow-0.3.2/docs/design/principles.md +95 -0
  18. porter_workflow-0.3.2/docs/design/webui.md +66 -0
  19. porter_workflow-0.3.2/docs/development/README.md +56 -0
  20. porter_workflow-0.3.2/docs/development/docs.md +65 -0
  21. porter_workflow-0.3.2/docs/development/extending.md +75 -0
  22. porter_workflow-0.3.2/docs/development/gate.md +113 -0
  23. porter_workflow-0.3.2/docs/development/release.md +84 -0
  24. porter_workflow-0.3.2/docs/development/setup.md +69 -0
  25. porter_workflow-0.3.2/docs/images/preview.webp +0 -0
  26. porter_workflow-0.3.2/docs/reference/README.md +22 -0
  27. porter_workflow-0.3.2/docs/reference/api.md +119 -0
  28. porter_workflow-0.3.2/docs/reference/cli.md +146 -0
  29. porter_workflow-0.3.2/docs/reference/configuration.md +87 -0
  30. {porter_workflow-0.3.0 → porter_workflow-0.3.2}/pyproject.toml +42 -33
  31. porter_workflow-0.3.2/scripts/README.md +27 -0
  32. porter_workflow-0.3.2/scripts/launcher.py +403 -0
  33. {porter_workflow-0.3.0 → porter_workflow-0.3.2}/skills/porter-skill/README.md +24 -16
  34. porter_workflow-0.3.2/skills/porter-skill/SKILL.md +330 -0
  35. {porter_workflow-0.3.0 → porter_workflow-0.3.2}/skills/porter-skill/assets/config.example.json +10 -1
  36. {porter_workflow-0.3.0 → porter_workflow-0.3.2}/skills/porter-skill/references/ARCHITECTURE.md +10 -11
  37. {porter_workflow-0.3.0 → porter_workflow-0.3.2}/skills/porter-skill/references/CONFIG.md +34 -12
  38. porter_workflow-0.3.2/skills/porter-skill/references/HOSTS.md +49 -0
  39. {porter_workflow-0.3.0 → porter_workflow-0.3.2}/skills/porter-skill/references/MCP.md +25 -3
  40. porter_workflow-0.3.2/skills/porter-skill/references/SETUP.md +175 -0
  41. porter_workflow-0.3.2/skills/porter-skill/references/WEBUI.md +118 -0
  42. {porter_workflow-0.3.0 → porter_workflow-0.3.2}/skills/porter-skill/scripts/inspect.sh +1 -1
  43. porter_workflow-0.3.2/skills/porter-skill/scripts/porter.ps1 +57 -0
  44. porter_workflow-0.3.2/skills/porter-skill/scripts/porter.sh +74 -0
  45. {porter_workflow-0.3.0 → porter_workflow-0.3.2}/src/porter/__init__.py +41 -36
  46. {porter_workflow-0.3.0/src/porter_cli → porter_workflow-0.3.2/src/porter/cli}/__init__.py +4 -4
  47. {porter_workflow-0.3.0/src/porter_cli → porter_workflow-0.3.2/src/porter/cli}/__main__.py +3 -3
  48. {porter_workflow-0.3.0/src/porter_cli → porter_workflow-0.3.2/src/porter/cli}/app.py +14 -8
  49. {porter_workflow-0.3.0/src/porter_cli → porter_workflow-0.3.2/src/porter/cli}/commands/config.py +3 -3
  50. {porter_workflow-0.3.0/src/porter_cli → porter_workflow-0.3.2/src/porter/cli}/commands/doctor.py +6 -11
  51. {porter_workflow-0.3.0/src/porter_cli → porter_workflow-0.3.2/src/porter/cli}/commands/inspect.py +6 -6
  52. {porter_workflow-0.3.0/src/porter_cli → porter_workflow-0.3.2/src/porter/cli}/commands/jobs.py +5 -5
  53. {porter_workflow-0.3.0/src/porter_cli → porter_workflow-0.3.2/src/porter/cli}/commands/plan.py +9 -9
  54. {porter_workflow-0.3.0/src/porter_cli → porter_workflow-0.3.2/src/porter/cli}/commands/run.py +15 -15
  55. {porter_workflow-0.3.0/src/porter_cli → porter_workflow-0.3.2/src/porter/cli}/render.py +2 -2
  56. porter_workflow-0.3.2/src/porter/core/__init__.py +16 -0
  57. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/asr/__init__.py +10 -10
  58. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/asr/base.py +4 -4
  59. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/asr/chain.py +14 -14
  60. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/asr/platform_subs.py +7 -7
  61. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/asr/videocaptioner.py +4 -4
  62. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/asr/whisper_api.py +6 -6
  63. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/asr/whisper_local.py +9 -9
  64. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/config.py +13 -2
  65. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/context.py +8 -8
  66. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/doctor/__init__.py +3 -3
  67. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/doctor/guides.py +1 -1
  68. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/doctor/probes.py +14 -19
  69. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/errors.py +2 -2
  70. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/events.py +5 -5
  71. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/jobs/__init__.py +4 -4
  72. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/jobs/records.py +5 -5
  73. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/jobs/store.py +9 -9
  74. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/logging.py +3 -2
  75. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/media/__init__.py +9 -9
  76. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/media/burn.py +16 -16
  77. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/media/encode.py +4 -4
  78. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/media/enhance.py +2 -2
  79. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/media/ffmpeg.py +6 -6
  80. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/media/prepare.py +11 -11
  81. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/media/probe.py +2 -2
  82. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/media/standardize.py +8 -8
  83. porter_workflow-0.3.2/src/porter/core/models/__init__.py +25 -0
  84. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/models/materials.py +3 -3
  85. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/models/plan.py +4 -4
  86. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/models/request.py +4 -4
  87. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/models/subtitle.py +1 -1
  88. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/pipeline.py +30 -30
  89. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/plan.py +10 -35
  90. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/platforms/__init__.py +8 -8
  91. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/platforms/base.py +17 -17
  92. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/platforms/bilibili.py +3 -3
  93. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/platforms/downloader.py +12 -12
  94. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/platforms/inspector.py +10 -10
  95. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/platforms/instagram.py +2 -2
  96. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/platforms/local.py +13 -13
  97. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/platforms/registry.py +10 -10
  98. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/platforms/spec.py +4 -4
  99. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/platforms/tiktok.py +2 -2
  100. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/platforms/titles.py +1 -1
  101. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/platforms/urls.py +3 -3
  102. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/platforms/x.py +2 -2
  103. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/platforms/ydl.py +7 -7
  104. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/platforms/youtube.py +2 -2
  105. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/ports.py +9 -9
  106. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/refine/__init__.py +3 -3
  107. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/refine/base.py +2 -2
  108. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/refine/llm.py +4 -4
  109. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/refine/passthrough.py +2 -2
  110. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/subtitles/__init__.py +4 -4
  111. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/subtitles/ass.py +3 -3
  112. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/subtitles/phrasing.py +5 -5
  113. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/subtitles/srt.py +5 -5
  114. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/subtitles/transcript.py +6 -6
  115. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/translate/__init__.py +9 -9
  116. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/translate/base.py +5 -5
  117. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/translate/bing.py +3 -3
  118. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/translate/chain.py +18 -18
  119. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/translate/google.py +3 -3
  120. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/translate/llm.py +3 -3
  121. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/translate/mymemory.py +4 -4
  122. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/translate/reuse.py +5 -5
  123. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/translate/videocaptioner.py +7 -7
  124. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/utils/__init__.py +2 -2
  125. {porter_workflow-0.3.0/src/porter_mcp → porter_workflow-0.3.2/src/porter/mcp}/__init__.py +4 -4
  126. {porter_workflow-0.3.0/src/porter_mcp → porter_workflow-0.3.2/src/porter/mcp}/server.py +10 -10
  127. {porter_workflow-0.3.0/src/porter_mcp → porter_workflow-0.3.2/src/porter/mcp}/shutdown.py +4 -4
  128. {porter_workflow-0.3.0/src/porter_mcp → porter_workflow-0.3.2/src/porter/mcp}/tools/__init__.py +2 -2
  129. {porter_workflow-0.3.0/src/porter_mcp → porter_workflow-0.3.2/src/porter/mcp}/tools/config.py +4 -4
  130. {porter_workflow-0.3.0/src/porter_mcp → porter_workflow-0.3.2/src/porter/mcp}/tools/docs.py +8 -8
  131. {porter_workflow-0.3.0/src/porter_mcp → porter_workflow-0.3.2/src/porter/mcp}/tools/doctor.py +5 -5
  132. {porter_workflow-0.3.0/src/porter_mcp → porter_workflow-0.3.2/src/porter/mcp}/tools/inspect.py +9 -9
  133. {porter_workflow-0.3.0/src/porter_mcp → porter_workflow-0.3.2/src/porter/mcp}/tools/jobs.py +13 -13
  134. {porter_workflow-0.3.0/src/porter_mcp → porter_workflow-0.3.2/src/porter/mcp}/tools/meta.py +1 -1
  135. {porter_workflow-0.3.0/src/porter_mcp → porter_workflow-0.3.2/src/porter/mcp}/tools/plan.py +8 -8
  136. {porter_workflow-0.3.0/src/porter_mcp → porter_workflow-0.3.2/src/porter/mcp}/tools/stages.py +15 -15
  137. {porter_workflow-0.3.0/src/porter_web → porter_workflow-0.3.2/src/porter/webui}/__init__.py +3 -3
  138. porter_workflow-0.3.2/src/porter/webui/__main__.py +8 -0
  139. porter_workflow-0.3.2/src/porter/webui/app.py +136 -0
  140. porter_workflow-0.3.2/src/porter/webui/config_io.py +60 -0
  141. porter_workflow-0.3.2/src/porter/webui/doctor_view.py +42 -0
  142. {porter_workflow-0.3.0/src/porter_web → porter_workflow-0.3.2/src/porter/webui}/i18n.py +8 -0
  143. porter_workflow-0.3.2/src/porter/webui/jobs_view.py +101 -0
  144. porter_workflow-0.3.2/src/porter/webui/materials.py +114 -0
  145. porter_workflow-0.3.2/src/porter/webui/tabs/__init__.py +1 -0
  146. porter_workflow-0.3.2/src/porter/webui/tabs/doctor.py +40 -0
  147. porter_workflow-0.3.2/src/porter/webui/tabs/jobs.py +192 -0
  148. porter_workflow-0.3.2/src/porter/webui/tabs/settings.py +352 -0
  149. porter_workflow-0.3.2/src/porter/webui/tabs/workbench.py +333 -0
  150. porter_workflow-0.3.0/PKG-INFO +0 -377
  151. porter_workflow-0.3.0/README.md +0 -321
  152. porter_workflow-0.3.0/skills/porter-skill/SKILL.md +0 -241
  153. porter_workflow-0.3.0/skills/porter-skill/scripts/porter.sh +0 -14
  154. porter_workflow-0.3.0/src/porter/models/__init__.py +0 -25
  155. porter_workflow-0.3.0/src/porter_web/__main__.py +0 -8
  156. porter_workflow-0.3.0/src/porter_web/app.py +0 -1166
  157. {porter_workflow-0.3.0 → porter_workflow-0.3.2}/LICENSE +0 -0
  158. {porter_workflow-0.3.0 → porter_workflow-0.3.2}/skills/porter-skill/scripts/bootstrap.sh +0 -0
  159. {porter_workflow-0.3.0/src/porter_cli → porter_workflow-0.3.2/src/porter/cli}/commands/__init__.py +0 -0
  160. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/mirrors.py +0 -0
  161. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/models/inspection.py +0 -0
  162. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/models/metadata.py +0 -0
  163. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/utils/text.py +0 -0
  164. {porter_workflow-0.3.0/src/porter → porter_workflow-0.3.2/src/porter/core}/utils/time.py +0 -0
  165. {porter_workflow-0.3.0/src/porter_mcp → porter_workflow-0.3.2/src/porter/mcp}/limits.py +0 -0
  166. {porter_workflow-0.3.0/src/porter_mcp → porter_workflow-0.3.2/src/porter/mcp}/stdout_guard.py +0 -0
  167. {porter_workflow-0.3.0 → porter_workflow-0.3.2}/src/porter/py.typed +0 -0
@@ -17,6 +17,9 @@ sdist/
17
17
  MANIFEST
18
18
 
19
19
  # Virtualenvs / tooling caches
20
+ .state/
21
+ .uv-cache/
22
+ .uv-tools/
20
23
  .venv/
21
24
  venv/
22
25
  ENV/
@@ -74,13 +77,9 @@ tmp/
74
77
  *.tmp
75
78
 
76
79
  # ---------------------------------------------------------------------------
77
- # Local-only working area (kept on disk, never published)
80
+ # Skill assets are source media: subtitle samples must be committable.
81
+ # Pipeline output dropped anywhere else is still ignored by the rules above.
78
82
  # ---------------------------------------------------------------------------
79
- docs/
80
-
81
- # Skill assets are the one place media is source, not output: a subtitle sample
82
- # must be committable. Pipeline output dropped anywhere else is still ignored by
83
- # the rules above.
84
83
  !skills/**/*.png
85
84
  !skills/**/*.jpg
86
85
  !skills/**/*.jpeg
@@ -90,10 +89,15 @@ docs/
90
89
  !skills/**/*.srt
91
90
  !skills/**/*.ass
92
91
 
92
+ # Documentation images are source media, not pipeline output.
93
+ !/docs/images/**
94
+
93
95
  # ---------------------------------------------------------------------------
94
96
  # Agent / editor / OS
95
97
  # ---------------------------------------------------------------------------
96
98
  .pi/**
99
+ .agents/**
100
+ skills-lock.json
97
101
  .memory/
98
102
  .cache/
99
103
  .idea/
@@ -108,4 +112,6 @@ desktop.ini
108
112
  # Pi session exports & local scratch
109
113
  pi-session-*.html
110
114
  *.session.html
115
+ session*.jsonl
116
+ *.jsonl
111
117
  scratch/
@@ -7,6 +7,109 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.3.2] - 2026-11-11
11
+
12
+ ### Changed
13
+
14
+ - **Repository layout: one top-level package.** `src/porter` (the engine) now
15
+ lives under `src/porter/core/`; the CLI, MCP server and WebUI moved into
16
+ `src/porter/cli/`, `src/porter/mcp/` and `src/porter/webui/`. The stable
17
+ library surface is unchanged: `from porter import Pipeline, JobOptions, ...`
18
+ still works, and the `porter`, `porter-mcp` and `porter-web` console script
19
+ names are unchanged.
20
+ - **Internal import layout is a breaking change.** Paths such as
21
+ `porter.models`, `porter.pipeline`, `porter.config` and `porter.jobs` no longer
22
+ exist; use the public root API, or `porter.core.*` if you were deliberately
23
+ reaching into internals. The top-level `porter_cli`, `porter_mcp` and
24
+ `porter_web` packages are gone; import `porter.cli`, `porter.mcp` and
25
+ `porter.webui` instead.
26
+ - **Logger names gained a `core` segment.** Modules that call
27
+ `get_logger(__name__)` now report names like `porter.core.asr.chain` instead of
28
+ `porter.asr.chain`. Records still aggregate under the `porter` root logger; any
29
+ log filter or alert keyed on the old names needs updating.
30
+ - **`packaging/` is now `scripts/`.** It only ever contained the release
31
+ launcher, and the new name says it is a development/release helper directory.
32
+ `scripts/launcher.py` is still the PyInstaller entry point; the release
33
+ workflow, tests and docs were updated.
34
+ - **The WebUI is split by tab.** `porter.webui.app` now only assembles the
35
+ application and owns the entry point; each tab lives in `porter.webui.tabs`,
36
+ with configuration, material, job-view and doctor helpers in their own modules.
37
+ The public helper names remain re-exported from `app.py`.
38
+ - **Import contracts cover the remaining modules.** `porter.core.refine` is in
39
+ the backend layer, `porter.core.mirrors` is a leaf, and a new `independence`
40
+ contract enforces that `porter.cli`, `porter.mcp` and `porter.webui` never
41
+ import one another.
42
+ - **The Agent Skill is now an SOP.** `SKILL.md` starts by choosing an execution
43
+ channel (MCP when configured, CLI by default, WebUI for human operation), then
44
+ walks through environment/dependency confirmation, configuration validation,
45
+ inspect → plan → confirm → run → quality check. New references cover setup and
46
+ WebUI operations, and the transcription guidance now includes key-free local
47
+ Whisper instead of treating every key-free path as dead.
48
+ - **`assets/` moved into the documentation tree.** The README preview is now
49
+ `docs/images/preview.webp`, and `docs/` is tracked in git (it was previously
50
+ ignored). The documentation system is Chinese-first; see
51
+ [`docs/README.md`](docs/README.md), with development, architecture, reference
52
+ and design sections.
53
+
54
+ ### Fixed
55
+
56
+ - **TOML configs are never overwritten with JSON.** The WebUI settings tab now
57
+ resolves a JSON target only: when the nearest project config is TOML it logs a
58
+ warning and falls back to the user-level JSON file, leaving the TOML untouched.
59
+ `porter config set --file some.toml` likewise raises a `ConfigError` instead of
60
+ writing JSON into it. Editing TOML remains a manual operation.
61
+
62
+ ### Added
63
+
64
+ - Conditional CI checks for the new artifact layout: the wheel must contain
65
+ `porter/core`, `porter/cli`, `porter/mcp`, `porter/webui` and `py.typed`, and
66
+ the declared entry points; the sdist must ship `docs/` and `scripts/` but not
67
+ `tests/`.
68
+ - The README now leads with the pipeline, supported platforms and the live
69
+ backends for each phase, with build and contribution details in a separate
70
+ section.
71
+
72
+ ### Removed
73
+
74
+ - **The dead `[stt]` extra and its backend.** `SpeechRecognition` (Google Web
75
+ STT) was measured returning no transcription at all; the dependency, extra and
76
+ every live reference are gone. `[all]` no longer includes it.
77
+ - **Remaining dead-endpoint references.** Bcut and Google Web are no longer
78
+ named as available ASR routes in the README, doctor docstrings, tests or
79
+ plan warnings. The ASR chain is `whisper-local` → `whisper-api` →
80
+ `videocaptioner`, all of which are verified.
81
+ - **The unimplemented `doctor --install-binaries` flag.** It was declared and
82
+ documented but never wired to any code, so the documentation now points at the
83
+ per-platform installation guidance `doctor` actually prints.
84
+
85
+ ## [0.3.1] - 2026-10-30
86
+
87
+ A patch release delivering functional fixes for the web workbench, test isolation
88
+ improvements, sandboxed Windows launcher enhancements, and architectural alignment.
89
+
90
+ ### Fixed
91
+
92
+ - **Web workbench config reload parity (`porter_web`).** Fixed an issue where reloading
93
+ configuration via `on_reload_all()` omitted `cookies_file`, causing the form field
94
+ to remain un-synchronized after saving and reloading.
95
+ - **Agent skill test isolation (`tests/unit/test_skill_assets.py`).** Added `.agents` to
96
+ the test discovery ignore filter so that machines running contemporary Agent Skills tooling
97
+ do not trigger false-positive duplicate `SKILL.md` detection failures.
98
+ - **Architectural test coverage (`tests/unit/test_architecture.py`).** Integrated `porter_web`
99
+ into `FRONTEND_PACKAGES` to enforce reciprocal frontend decoupling and prevent the engine
100
+ from importing web dependencies.
101
+ - **CI wheel distribution validation (`.github/workflows/test.yml`).** Upgraded the
102
+ distribution gate to verify all four top-level packages (`porter`, `porter_cli`,
103
+ `porter_mcp`, `porter_web`) are packaged in wheels.
104
+ - **Sandboxed Windows launcher compatibility.** Hardened PowerShell launcher (`porter.ps1`)
105
+ and smoke scripts for restricted workspace environments.
106
+
107
+ ### Changed
108
+
109
+ - Synchronized references, `SKILL.md` metadata, issue templates, and documentation
110
+ to reflect the v0.3 line and accurate ASR fallback chains (`whisper-local`, `whisper-api`,
111
+ `videocaptioner`).
112
+
10
113
  ## [0.3.0] - 2026-10-11
11
114
 
12
115
  A minor release introducing the fourth frontend: `porter-web`, an interactive
@@ -463,7 +566,9 @@ Skill of the same name).
463
566
  assets and a standardised `raw/` + `cooked/` output layout.
464
567
  - Agent Skill packaging (`SKILL.md`, scripts, references, example config).
465
568
 
466
- [Unreleased]: https://github.com/RolinShmily/porter-workflow/compare/v0.3.0...HEAD
569
+ [Unreleased]: https://github.com/RolinShmily/porter-workflow/compare/v0.3.2...HEAD
570
+ [0.3.2]: https://github.com/RolinShmily/porter-workflow/compare/v0.3.1...v0.3.2
571
+ [0.3.1]: https://github.com/RolinShmily/porter-workflow/compare/v0.3.0...v0.3.1
467
572
  [0.3.0]: https://github.com/RolinShmily/porter-workflow/compare/v0.2.8...v0.3.0
468
573
  [0.2.8]: https://github.com/RolinShmily/porter-workflow/compare/v0.2.7...v0.2.8
469
574
  [0.2.7]: https://github.com/RolinShmily/porter-workflow/compare/v0.2.6...v0.2.7
@@ -0,0 +1,317 @@
1
+ Metadata-Version: 2.5
2
+ Name: porter-workflow
3
+ Version: 0.3.2
4
+ Summary: Automated video localization, multi-engine ASR, subtitle translation, and dual-version FFmpeg hardsub pipeline for AI agents, CLI, and MCP hosts.
5
+ Project-URL: Homepage, https://github.com/RolinShmily/porter-workflow
6
+ Project-URL: Repository, https://github.com/RolinShmily/porter-workflow
7
+ Project-URL: Issues, https://github.com/RolinShmily/porter-workflow/issues
8
+ Project-URL: Documentation, https://github.com/RolinShmily/porter-workflow/blob/main/docs/README.md
9
+ Project-URL: Changelog, https://github.com/RolinShmily/porter-workflow/blob/main/CHANGELOG.md
10
+ Author: RoL1n_SrP
11
+ License-Expression: MIT
12
+ License-File: LICENSE
13
+ License-File: THIRD_PARTY_NOTICES.md
14
+ Keywords: agent-skill,asr,ffmpeg,hardsub,mcp,subtitles,translation,video-localization,youtube
15
+ Classifier: Development Status :: 4 - Beta
16
+ Classifier: Environment :: Console
17
+ Classifier: Intended Audience :: Developers
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Topic :: Multimedia :: Video
22
+ Requires-Python: >=3.11
23
+ Requires-Dist: platformdirs>=4.0
24
+ Requires-Dist: pydantic>=2.0
25
+ Requires-Dist: requests>=2.31
26
+ Requires-Dist: yt-dlp[default]>=2025.11.12
27
+ Provides-Extra: all
28
+ Requires-Dist: faster-whisper>=1.0; extra == 'all'
29
+ Requires-Dist: fastmcp>=2.11; extra == 'all'
30
+ Requires-Dist: gradio>=5.0; extra == 'all'
31
+ Requires-Dist: json-repair>=0.30; extra == 'all'
32
+ Requires-Dist: openai>=1.0; extra == 'all'
33
+ Requires-Dist: pillow>=10.0; extra == 'all'
34
+ Provides-Extra: asr-local
35
+ Requires-Dist: faster-whisper>=1.0; extra == 'asr-local'
36
+ Provides-Extra: dev
37
+ Requires-Dist: import-linter>=2.0; extra == 'dev'
38
+ Requires-Dist: mypy>=1.10; extra == 'dev'
39
+ Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
40
+ Requires-Dist: pytest-cov>=5.0; extra == 'dev'
41
+ Requires-Dist: pytest>=8.0; extra == 'dev'
42
+ Requires-Dist: ruff>=0.6; extra == 'dev'
43
+ Provides-Extra: images
44
+ Requires-Dist: pillow>=10.0; extra == 'images'
45
+ Provides-Extra: llm
46
+ Requires-Dist: json-repair>=0.30; extra == 'llm'
47
+ Requires-Dist: openai>=1.0; extra == 'llm'
48
+ Provides-Extra: mcp
49
+ Requires-Dist: fastmcp>=2.11; extra == 'mcp'
50
+ Provides-Extra: web
51
+ Requires-Dist: gradio>=5.0; extra == 'web'
52
+ Description-Content-Type: text/markdown
53
+
54
+ <h1 align="center">Porter Workflow</h1>
55
+
56
+ <p align="center">
57
+ <b>English</b> | <a href="README_zh.md">简体中文</a>
58
+ </p>
59
+
60
+ <p align="center">
61
+ <a href="https://github.com/RolinShmily/porter-workflow/actions/workflows/test.yml"><img alt="CI" src="https://github.com/RolinShmily/porter-workflow/actions/workflows/test.yml/badge.svg"></a>
62
+ <a href="https://pypi.org/project/porter-workflow/"><img alt="PyPI" src="https://img.shields.io/pypi/v/porter-workflow"></a>
63
+ <img alt="Python 3.11 - 3.13" src="https://img.shields.io/badge/python-3.11%20%E2%80%93%203.13-blue">
64
+ <a href="LICENSE"><img alt="License: MIT" src="https://img.shields.io/badge/license-MIT-green"></a>
65
+ </p>
66
+
67
+ <p align="center">
68
+ <img src="https://raw.githubusercontent.com/RolinShmily/porter-workflow/main/docs/images/preview.webp" alt="Porter Workflow: video input, media preparation, subtitle extraction, translation, and subtitled video delivery" width="1200">
69
+ </p>
70
+
71
+ **Porter Workflow** takes a video URL or a local file and produces a localized
72
+ release: a standardized asset bundle, bilingual and Chinese-only subtitles, and
73
+ hard-subbed MP4s.
74
+
75
+ ## How it works
76
+
77
+ ```text
78
+ URL / local file
79
+ │
80
+ ▼
81
+ PREPARE download, standardize, fetch platform subtitles, extract audio
82
+ │
83
+ ▼
84
+ TRANSCRIBE use the platform's subtitle track, or run speech recognition
85
+ │
86
+ ▼
87
+ TRANSLATE produce target-language subtitles (default: zh-Hans)
88
+ │
89
+ ▼
90
+ BURN render bilingual / Chinese-only hard-subbed MP4s
91
+ ```
92
+
93
+ Completed phases are reused on a rerun. `--force` redoes them, `--only-phase`
94
+ stops after one, and `--burn skip` stops before encoding.
95
+
96
+ ### Supported platforms
97
+
98
+ | Platform | URL examples | Platform subtitle track |
99
+ | --- | --- | --- |
100
+ | YouTube | `youtube.com`, `youtu.be` | Yes |
101
+ | Bilibili | `bilibili.com`, `b23.tv`, `bilibili.tv` | Yes (CC may require cookies) |
102
+ | TikTok | `tiktok.com`, `vm.tiktok.com` | Yes |
103
+ | X / Twitter | `x.com`, `twitter.com` | No — ASR runs |
104
+ | Instagram | `instagram.com` | No — ASR runs |
105
+ | Local file | any readable path | No — ASR or `--subtitle-file` |
106
+
107
+ Downloads go through yt-dlp, so other sites it supports may work, but only these
108
+ platforms have explicit specs. A native track is *requested*, not guaranteed:
109
+ rate limiting can make the fetch fail, and the ASR chain then takes over.
110
+
111
+ ## Backends by phase
112
+
113
+ ### PREPARE
114
+
115
+ - **URL** — yt-dlp download; **local file** — used in place.
116
+ - **FFmpeg** normalizes video to H.264/AAC and audio to 16 kHz mono.
117
+ - **Deno** (or Node ≥ 20) is recommended for YouTube's JS challenges.
118
+
119
+ ### TRANSCRIBE
120
+
121
+ | Route | Requires | Notes |
122
+ | --- | --- | --- |
123
+ | Platform subtitles | — | Free and exact; preferred when the platform provides them |
124
+ | `whisper-local` | `[asr-local]` extra | Key-free and offline after the model downloads; tried first |
125
+ | `whisper-api` | `[llm]` extra + API key | Any OpenAI-compatible `/audio/transcriptions` endpoint |
126
+ | `videocaptioner` | External CLI, installed by you | GPL-3.0 and `python<3.13`, so never a declared dependency |
127
+ | `--subtitle-file FILE` | A local SRT | Explicit source track; skips platform tracks and ASR |
128
+
129
+ The first available backend wins. `--asr-engine NAME` moves a named backend to
130
+ the front but keeps the rest as fallbacks. A Chinese platform track skips the
131
+ translation phase entirely.
132
+
133
+ ### TRANSLATE
134
+
135
+ | Backend | Requires | Notes |
136
+ | --- | --- | --- |
137
+ | `llm` | `[llm]` extra + API key | Best quality; can also repair transcription errors |
138
+ | `bing` | Nothing | Key-free endpoint |
139
+ | `google` | Nothing | Key-free endpoint |
140
+ | `mymemory` | Nothing | Key-free public API |
141
+ | `videocaptioner-llm` | External CLI | GPL-3.0, installed by you |
142
+ | `videocaptioner` | External CLI | GPL-3.0, installed by you |
143
+
144
+ The first backend that produces usable text wins. For a Chinese target, a
145
+ response without CJK characters is rejected and the next backend is tried.
146
+ `--translator NAME` promotes a backend to the front, like `--asr-engine`.
147
+ `--target-lang` defaults to `zh-Hans`.
148
+
149
+ ### BURN
150
+
151
+ | Mode | Output |
152
+ | --- | --- |
153
+ | `dual` (default) | `video_bilingual.mp4` + `video_zh.mp4` |
154
+ | `zh_only` | `video_zh.mp4` |
155
+ | `bilingual_only` | `video_bilingual.mp4` |
156
+ | `skip` | Subtitles only, no video encoding |
157
+
158
+ Burning requires **FFmpeg with libass**. Fonts, sizes, colors, margins and fades
159
+ are configurable under the `style` section.
160
+
161
+ ## Install
162
+
163
+ Requires **Python ≥ 3.11**.
164
+
165
+ System dependencies (not Python packages, must be on `PATH`):
166
+
167
+ | Dependency | Needed for | Notes |
168
+ | --- | --- | --- |
169
+ | **FFmpeg + ffprobe** | Everything | Must be built **with `libass`**. Verify: `ffmpeg -filters \| grep subtitles` |
170
+ | **Deno** (recommended) | YouTube downloads | yt-dlp ≥ 2025.11.12 needs an external JS runtime; Node ≥ 20 also works |
171
+
172
+ ```bash
173
+ # Recommended: local, key-free, offline transcription
174
+ uvx --from "porter-workflow[asr-local]" porter "<URL>"
175
+
176
+ # Every optional backend, including WebUI support
177
+ uvx --from "porter-workflow[all]" porter "<URL>"
178
+
179
+ # WebUI workbench
180
+ uvx --from "porter-workflow[web]" porter-web
181
+
182
+ # Persistent install
183
+ pipx install "porter-workflow[all]"
184
+
185
+ # Check the environment
186
+ porter doctor
187
+ ```
188
+
189
+ | Extra | Adds | Enables |
190
+ | --- | --- | --- |
191
+ | `[asr-local]` | `faster-whisper` | Local Whisper — key-free and offline |
192
+ | `[llm]` | `openai`, `json-repair` | LLM translation + Whisper API ASR |
193
+ | `[images]` | `pillow` | Cover image handling |
194
+ | `[mcp]` | `fastmcp` | The `porter-mcp` server |
195
+ | `[web]` | `gradio` | The `porter-web` workbench |
196
+ | `[all]` | all of the above | — |
197
+
198
+ A minimal install without `[asr-local]` or `[llm]` can download and translate,
199
+ but cannot transcribe unless a platform subtitle track exists or the external
200
+ VideoCaptioner CLI is installed. `porter doctor` reports the route a job will
201
+ actually take.
202
+
203
+ ## Usage
204
+
205
+ ```bash
206
+ porter inspect "<URL>" # Inspect a link without downloading
207
+ porter plan "<URL>" # Show the exact route and expected failures
208
+ porter "<URL>" # Full pipeline
209
+ porter "<URL>" -o ./porter_output # Choose the output directory
210
+ porter "<URL>" --burn skip # Subtitles only
211
+ porter doctor # Diagnose the environment
212
+ porter config list # Show resolved config (secrets masked)
213
+ ```
214
+
215
+ ### Output layout
216
+
217
+ ```text
218
+ <output_dir>/<video_id>_<safe_title>/
219
+ ├── raw/
220
+ │ ├── video.mp4 H.264 + AAC + faststart master
221
+ │ ├── audio.wav 16 kHz mono reference track
222
+ │ ├── audio_enhanced.wav denoised track used only for ASR
223
+ │ ├── transcript.json/.txt reconstructed sentence script book
224
+ │ ├── subtitle.srt platform-provided source subtitles, if any
225
+ │ ├── cover.jpg
226
+ │ └── metadata.json
227
+ └── cooked/
228
+ ├── subtitle_bilingual.{srt,ass}
229
+ ├── subtitle_zh.{srt,ass}
230
+ ├── video_bilingual.mp4
231
+ └── video_zh.mp4
232
+ ```
233
+
234
+ ### Frontends
235
+
236
+ | Frontend | Command | For |
237
+ | --- | --- | --- |
238
+ | CLI | `porter` | Humans and shell scripts |
239
+ | MCP | `uvx --from "porter-workflow[mcp]" porter-mcp` | AI agents over stdio JSON-RPC |
240
+ | WebUI | `uvx --from "porter-workflow[web]" porter-web` | Humans and agents using the HITL workbench |
241
+ | Agent Skill | `npx skills add RolinShmily/porter-workflow` | Agents using the Agent Skills spec |
242
+
243
+ All four call the same engine. MCP setup details are in
244
+ [`skills/porter-skill/references/MCP.md`](skills/porter-skill/references/MCP.md);
245
+ restricted Windows hosts are covered in
246
+ [`skills/porter-skill/references/HOSTS.md`](skills/porter-skill/references/HOSTS.md).
247
+
248
+ ## Configuration
249
+
250
+ Resolved in this order, highest priority first:
251
+
252
+ 1. `--config <path>`
253
+ 2. `$PORTER_CONFIG`
254
+ 3. Environment variables (they override the selected file)
255
+ 4. Nearest project config: `porter.json` → `porter.toml` → `config.json`
256
+ 5. User config under `platformdirs` (only if there is no project config)
257
+ 6. Built-in defaults
258
+
259
+ | Section | Keys | Purpose |
260
+ | --- | --- | --- |
261
+ | top level | `output_dir`, `cookies_file`, `cookies_browser` | Output location and gated-media access |
262
+ | `llm` | `api_key`, `api_base`, `model` | LLM translation, refinement and Whisper API fallback |
263
+ | `asr` | `engine`, `language`, `audio_denoise`, `whisper_local_model`, `whisper_local_device`, `whisper_local_compute_type`, `whisper_api_key`, `whisper_api_base`, `whisper_model` | Speech recognition |
264
+ | `refine` | `enabled`, `model` | LLM transcript cleanup before translation |
265
+ | `ffmpeg` | `ffmpeg_path`, `ffprobe_path`, `video_codec`, `preset`, `crf`, `pixel_format`, `audio_codec`, `audio_bitrate`, `audio_sample_rate`, `wav_sample_rate`, `auto_tune` | Encoding and hardware tuning |
266
+ | `style` | `zh_font`, `en_font`, sizes, colors, `outline_*`, `shadow`, `margin_*`, `fade_*` | ASS subtitle appearance |
267
+
268
+ ```bash
269
+ porter config list # Effective values + source, secrets masked
270
+ porter config get llm # Show one section
271
+ porter config set llm.model=deepseek-chat
272
+ porter config set llm.api_key=sk-... # Writes user-level config by default
273
+ ```
274
+
275
+ The complete key table, defaults and examples are in
276
+ [`skills/porter-skill/references/CONFIG.md`](skills/porter-skill/references/CONFIG.md).
277
+
278
+ ## Build and develop
279
+
280
+ Development needs **Python 3.11–3.13**, **uv**, **FFmpeg + libass**, and
281
+ **Deno** or **Node ≥ 20**. The runtime dependencies are `yt-dlp[default]`,
282
+ `requests`, `pydantic` and `platformdirs`; everything else is an optional extra.
283
+
284
+ ```bash
285
+ uv sync --extra all --extra dev # Install exactly what uv.lock pins
286
+
287
+ ruff check src tests scripts # Lint; T20 enforces no print() in the engine
288
+ mypy src scripts # Strict type checking
289
+ lint-imports # Engine/frontend dependency contracts
290
+ pytest -m "not network" # Offline suite
291
+ ```
292
+
293
+ Repository layout:
294
+
295
+ ```text
296
+ src/porter/
297
+ ├── __init__.py stable public API (lazy exports), __version__
298
+ ├── core/ engine — all business logic
299
+ ├── cli/ CLI frontend
300
+ ├── mcp/ MCP frontend
301
+ └── webui/ Gradio WebUI frontend (HITL workbench)
302
+ skills/porter-skill/ Agent Skill assets (SKILL.md, scripts, references)
303
+ scripts/ developer / release helper scripts (launcher.py)
304
+ docs/ development, architecture, reference, design, images
305
+ tests/{unit,regression,integration}/
306
+ ```
307
+
308
+ - [Documentation index](docs/README.md)
309
+ - [Architecture overview](docs/architecture/overview.md)
310
+ - [Development gate](docs/development/gate.md)
311
+ - [CLI reference](docs/reference/cli.md)
312
+ - [Contributing](CONTRIBUTING.md)
313
+
314
+ ## License
315
+
316
+ MIT. See [LICENSE](LICENSE). Third-party components and their licences are
317
+ listed in [`THIRD_PARTY_NOTICES.md`](THIRD_PARTY_NOTICES.md).