create-maa-project 3.7.1__tar.gz → 3.7.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 (204) hide show
  1. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/.release/create-maa-project-manifest.json +24 -24
  2. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/CHANGELOG.md +36 -0
  3. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/PKG-INFO +1 -1
  4. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/docs/commands.en.md +19 -2
  5. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/docs/commands.md +17 -3
  6. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/package.json +1 -1
  7. create_maa_project-3.7.2/py-wrapper/create_maa_project/__init__.py +1 -0
  8. create_maa_project-3.7.2/py-wrapper/create_maa_project/release_manifest.py +2 -0
  9. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/pyproject.toml +1 -1
  10. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/skills/create-maa-project/references/commands.md +13 -1
  11. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/src/assets.ts +64 -14
  12. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/src/doctor.ts +6 -2
  13. create_maa_project-3.7.2/src/maafw-version.ts +25 -0
  14. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/src/scaffold.ts +2 -2
  15. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/src/templates.ts +12 -0
  16. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/src/update.ts +95 -3
  17. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/addons/android/.github/workflows/android-build.yml +21 -0
  18. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/addons/android/tools/android-packaging.mjs +65 -22
  19. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/addons/github/.github/workflows/release.yml +8 -0
  20. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/base/tools/schema/interface.schema.json +32 -0
  21. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/base/tools/schema/interface_import.schema.json +32 -0
  22. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/base/tools/schema/schema-manifest.json +2 -2
  23. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/tests/android-addon.test.ts +40 -0
  24. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/tests/android-packaging.test.ts +60 -0
  25. create_maa_project-3.7.2/tests/maafw-version.test.ts +15 -0
  26. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/tests/scaffold.test.ts +171 -0
  27. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/tests/templates.test.ts +1 -0
  28. create_maa_project-3.7.1/py-wrapper/create_maa_project/__init__.py +0 -1
  29. create_maa_project-3.7.1/py-wrapper/create_maa_project/release_manifest.py +0 -2
  30. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/.editorconfig +0 -0
  31. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/.gitattributes +0 -0
  32. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/.github/cliff.toml +0 -0
  33. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/.github/workflows/ci.yml +0 -0
  34. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/.github/workflows/deps-audit.yml +0 -0
  35. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/.github/workflows/deps-sync.yml +0 -0
  36. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/.github/workflows/network-assets.yml +0 -0
  37. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/.github/workflows/release.yml +0 -0
  38. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/.github/workflows/schema-sync.yml +0 -0
  39. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/.gitignore +0 -0
  40. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/.prettierignore +0 -0
  41. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/.prettierrc.mjs +0 -0
  42. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/AGENTS.md +0 -0
  43. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/LICENSE +0 -0
  44. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/README.en.md +0 -0
  45. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/README.md +0 -0
  46. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/RELEASING.md +0 -0
  47. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/docs/android-packaging-plan.md +0 -0
  48. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/docs/json-report.en.md +0 -0
  49. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/docs/json-report.md +0 -0
  50. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/docs/mcp.en.md +0 -0
  51. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/docs/mcp.md +0 -0
  52. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/pnpm-lock.yaml +0 -0
  53. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/pnpm-workspace.yaml +0 -0
  54. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/py-wrapper/create_maa_project/__main__.py +0 -0
  55. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/scripts/build-sea.mjs +0 -0
  56. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/scripts/build.mjs +0 -0
  57. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/scripts/changelog-notes.mjs +0 -0
  58. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/scripts/check-network-assets.ts +0 -0
  59. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/scripts/create-release-manifest.mjs +0 -0
  60. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/scripts/create-sbom.d.mts +0 -0
  61. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/scripts/create-sbom.mjs +0 -0
  62. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/scripts/prepare-pypi-release.mjs +0 -0
  63. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/scripts/smoke-cli-artifact.mjs +0 -0
  64. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/scripts/sync-release-version.mjs +0 -0
  65. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/scripts/sync-schema.mjs +0 -0
  66. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/scripts/sync-template-deps.ts +0 -0
  67. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/scripts/test-python.mjs +0 -0
  68. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/scripts/update-audit-overrides.ts +0 -0
  69. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/skills/README.md +0 -0
  70. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/skills/create-maa-project/SKILL.md +0 -0
  71. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/skills/create-maa-project/agents/openai.yaml +0 -0
  72. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/skills/create-maa-project/references/json-report.md +0 -0
  73. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/src/addons.ts +0 -0
  74. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/src/android.ts +0 -0
  75. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/src/args.ts +0 -0
  76. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/src/auto-update.ts +0 -0
  77. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/src/command.ts +0 -0
  78. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/src/controllers.ts +0 -0
  79. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/src/features.ts +0 -0
  80. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/src/incremental-addons.ts +0 -0
  81. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/src/index.ts +0 -0
  82. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/src/lang.ts +0 -0
  83. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/src/log.ts +0 -0
  84. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/src/mcp.ts +0 -0
  85. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/src/node-support.ts +0 -0
  86. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/src/project-config.ts +0 -0
  87. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/src/project.ts +0 -0
  88. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/src/prompt.ts +0 -0
  89. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/src/report.ts +0 -0
  90. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/src/semver.ts +0 -0
  91. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/src/sync.ts +0 -0
  92. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/src/template-deps.json +0 -0
  93. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/src/template-deps.ts +0 -0
  94. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/src/types.ts +0 -0
  95. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/src/update-targets.ts +0 -0
  96. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/src/utils.ts +0 -0
  97. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/src/version.ts +0 -0
  98. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/addons/android/.github/workflows/android.yml +0 -0
  99. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/addons/android/Android/README.md +0 -0
  100. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/addons/android/Android/profile.agent.yaml +0 -0
  101. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/addons/android/Android/profile.pipeline.yaml +0 -0
  102. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/addons/auto-format/.github/workflows/format.yml +0 -0
  103. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/addons/community/CONTRIBUTING.md +0 -0
  104. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/addons/community/PULL_REQUEST_TEMPLATE.md +0 -0
  105. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/addons/community/bug_report.yml +0 -0
  106. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/addons/community/feature_request.yml +0 -0
  107. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/addons/community/issue_config.yml +0 -0
  108. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/addons/community/other_issue.yml +0 -0
  109. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/addons/dependabot/.github/dependabot.yml +0 -0
  110. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/addons/dev-tools/.vscode/extensions.agent.json +0 -0
  111. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/addons/dev-tools/.vscode/extensions.json +0 -0
  112. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/addons/dev-tools/.vscode/launch.agent.json +0 -0
  113. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/addons/dev-tools/.vscode/settings.agent.json +0 -0
  114. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/addons/dev-tools/.vscode/settings.json +0 -0
  115. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/addons/dev-tools/.vscode/tasks.agent.json +0 -0
  116. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/addons/dev-tools/.vscode/tasks.json +0 -0
  117. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/addons/dev-tools/package.json +0 -0
  118. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/addons/dev-tools/pnpm-workspace.yaml +0 -0
  119. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/addons/dev-tools/tools/validate-schema.mjs +0 -0
  120. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/addons/git-cliff/.github/cliff.toml +0 -0
  121. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/addons/github/.github/workflows/check.yml +0 -0
  122. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/addons/github/.github/workflows/package-smoke.yml +0 -0
  123. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/addons/github/tools/build-release.mjs +0 -0
  124. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/addons/github/tools/sync-runtime.mjs +0 -0
  125. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/addons/optimize-images/.github/workflows/optimize-images.yml +0 -0
  126. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/addons/optimize-images/tools/optimize-images.mjs +0 -0
  127. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/addons/schema-sync/.github/workflows/schema-sync.yml +0 -0
  128. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/addons/schema-sync/tools/sync-schema.mjs +0 -0
  129. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/agent/README.en.md +0 -0
  130. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/agent/README.md +0 -0
  131. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/agent/agent/__init__.py +0 -0
  132. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/agent/agent/agent_runtime.py +0 -0
  133. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/agent/agent/custom/__init__.py +0 -0
  134. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/agent/agent/custom/action/__init__.py +0 -0
  135. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/agent/agent/custom/action/general.py +0 -0
  136. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/agent/agent/custom/reco/__init__.py +0 -0
  137. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/agent/agent/custom/reco/general.py +0 -0
  138. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/agent/agent/custom/sink/__init__.py +0 -0
  139. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/agent/agent/maafw_paths.py +0 -0
  140. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/agent/agent/main.py +0 -0
  141. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/agent/agent/utils/__init__.py +0 -0
  142. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/agent/agent/utils/logger.py +0 -0
  143. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/agent/agent/utils/maa_types.py +0 -0
  144. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/agent/agent/utils/params.py +0 -0
  145. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/agent/agent/utils/pienv.py +0 -0
  146. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/agent/agent/utils/runtime_paths.py +0 -0
  147. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/agent/pyproject.toml +0 -0
  148. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/agent/requirements.in +0 -0
  149. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/agent/requirements.txt +0 -0
  150. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/agent/tools/schema/custom.action.schema.json +0 -0
  151. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/agent/tools/schema/custom.recognition.schema.json +0 -0
  152. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/agent/uv.lock +0 -0
  153. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/base/.editorconfig +0 -0
  154. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/base/.gitattributes +0 -0
  155. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/base/.gitignore +0 -0
  156. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/base/.prettierignore +0 -0
  157. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/base/.prettierrc.mjs +0 -0
  158. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/base/README.en.md +0 -0
  159. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/base/README.md +0 -0
  160. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/base/gitignore.tmpl +0 -0
  161. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/base/interface.json.tmpl +0 -0
  162. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/base/licenses/AGPL-3.0-or-later.txt +0 -0
  163. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/base/licenses/MIT.txt +0 -0
  164. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/base/maatools.config.mts +0 -0
  165. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/base/resource/base/default_pipeline.json +0 -0
  166. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/base/resource/base/image/empty.png +0 -0
  167. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/base/resource/base/model/ocr/manifest.json +0 -0
  168. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/base/resource/base/pipeline/Tutorial/Tutorial.json +0 -0
  169. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/base/tasks/tutorial.json +0 -0
  170. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/base/tools/schema/custom.action.schema.json +0 -0
  171. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/base/tools/schema/custom.recognition.schema.json +0 -0
  172. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/base/tools/schema/interface_config.schema.json +0 -0
  173. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/templates/base/tools/schema/pipeline.schema.json +0 -0
  174. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/tests/addons.test.ts +0 -0
  175. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/tests/args.test.ts +0 -0
  176. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/tests/auto-update.test.ts +0 -0
  177. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/tests/backup-operations.test.ts +0 -0
  178. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/tests/changelog-notes.test.ts +0 -0
  179. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/tests/child-env.ts +0 -0
  180. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/tests/cli-info.test.ts +0 -0
  181. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/tests/command.test.ts +0 -0
  182. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/tests/doctor-errors.test.ts +0 -0
  183. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/tests/enabled-config.test.ts +0 -0
  184. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/tests/git-initialization.test.ts +0 -0
  185. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/tests/incremental-addons-results.test.ts +0 -0
  186. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/tests/lang.test.ts +0 -0
  187. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/tests/mcp.test.ts +0 -0
  188. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/tests/node-support.test.ts +0 -0
  189. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/tests/ocr-git-registration.test.ts +0 -0
  190. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/tests/package-smoke-workflow.test.ts +0 -0
  191. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/tests/project-config.test.ts +0 -0
  192. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/tests/project.test.ts +0 -0
  193. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/tests/prompt-interactive.test.ts +0 -0
  194. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/tests/prompt.test.ts +0 -0
  195. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/tests/release-smoke.test.ts +0 -0
  196. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/tests/release-workflow.test.ts +0 -0
  197. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/tests/report.test.ts +0 -0
  198. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/tests/sbom.test.ts +0 -0
  199. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/tests/semver.test.ts +0 -0
  200. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/tests/template-deps.test.ts +0 -0
  201. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/tests/test_py_wrapper.py +0 -0
  202. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/tests/update-audit-overrides.test.ts +0 -0
  203. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/tsconfig.json +0 -0
  204. {create_maa_project-3.7.1 → create_maa_project-3.7.2}/vitest.config.ts +0 -0
@@ -1,68 +1,68 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "name": "create-maa-project",
4
- "version": "3.7.1",
5
- "tag": "v3.7.1",
4
+ "version": "3.7.2",
5
+ "tag": "v3.7.2",
6
6
  "assets": [
7
7
  {
8
8
  "kind": "sea",
9
9
  "os": "linux",
10
10
  "arch": "aarch64",
11
- "version": "3.7.1",
11
+ "version": "3.7.2",
12
12
  "name": "create-maa-project-linux-aarch64",
13
- "url": "https://github.com/Windsland52/create-maa-project/releases/download/v3.7.1/create-maa-project-linux-aarch64",
14
- "sha256": "84152254a55537e81a6a94980f4a2e495e4d5eccd76cc8437fd8fe45da597069",
13
+ "url": "https://github.com/Windsland52/create-maa-project/releases/download/v3.7.2/create-maa-project-linux-aarch64",
14
+ "sha256": "433692fa3a105fcf692d861a531ab6883aa6040b13e6da62d2675f9e70c836d1",
15
15
  "size": 124587136
16
16
  },
17
17
  {
18
18
  "kind": "sea",
19
19
  "os": "linux",
20
20
  "arch": "x86_64",
21
- "version": "3.7.1",
21
+ "version": "3.7.2",
22
22
  "name": "create-maa-project-linux-x86_64",
23
- "url": "https://github.com/Windsland52/create-maa-project/releases/download/v3.7.1/create-maa-project-linux-x86_64",
24
- "sha256": "f1ea7cd17c1cdff54e43ffe46daf1e0726064b70bebec9ab517ed1f14fe14b78",
23
+ "url": "https://github.com/Windsland52/create-maa-project/releases/download/v3.7.2/create-maa-project-linux-x86_64",
24
+ "sha256": "b35dc29a502e6b9120dd855f6225c1d4037825fcf293b41b515444b76171739a",
25
25
  "size": 128257216
26
26
  },
27
27
  {
28
28
  "kind": "sea",
29
29
  "os": "macos",
30
30
  "arch": "aarch64",
31
- "version": "3.7.1",
31
+ "version": "3.7.2",
32
32
  "name": "create-maa-project-macos-aarch64",
33
- "url": "https://github.com/Windsland52/create-maa-project/releases/download/v3.7.1/create-maa-project-macos-aarch64",
34
- "sha256": "2f54c9115cde7e69471d64d57d601bc8175e0eec749b192b4ff78bd84bc54564",
35
- "size": 122589888
33
+ "url": "https://github.com/Windsland52/create-maa-project/releases/download/v3.7.2/create-maa-project-macos-aarch64",
34
+ "sha256": "0eb3aea3b1981f3419ec3fe606ce6eb3cbf47da24dd21186317b2f9ad76803ea",
35
+ "size": 122822656
36
36
  },
37
37
  {
38
38
  "kind": "sea",
39
39
  "os": "macos",
40
40
  "arch": "x86_64",
41
- "version": "3.7.1",
41
+ "version": "3.7.2",
42
42
  "name": "create-maa-project-macos-x86_64",
43
- "url": "https://github.com/Windsland52/create-maa-project/releases/download/v3.7.1/create-maa-project-macos-x86_64",
44
- "sha256": "004cf26a3ec5606ecdf9511771ddf179fbc61b23f7ca3eb2ca5c21748978180e",
45
- "size": 125074384
43
+ "url": "https://github.com/Windsland52/create-maa-project/releases/download/v3.7.2/create-maa-project-macos-x86_64",
44
+ "sha256": "abdebfaafeeb16a621689a3964bbee4de2eccc987bcfdc36a67a707961126534",
45
+ "size": 125090896
46
46
  },
47
47
  {
48
48
  "kind": "sea",
49
49
  "os": "win",
50
50
  "arch": "aarch64",
51
- "version": "3.7.1",
51
+ "version": "3.7.2",
52
52
  "name": "create-maa-project-win-aarch64.exe",
53
- "url": "https://github.com/Windsland52/create-maa-project/releases/download/v3.7.1/create-maa-project-win-aarch64.exe",
54
- "sha256": "620aa3f0885f0d9123d9c2c814f0baa0e95926a1f24d2cb78590a1991ef9201a",
55
- "size": 83629568
53
+ "url": "https://github.com/Windsland52/create-maa-project/releases/download/v3.7.2/create-maa-project-win-aarch64.exe",
54
+ "sha256": "e2ddc3979c51a3542799cd6978ccd03db18646cf1f8ec157636a6a51d0983f7a",
55
+ "size": 83642880
56
56
  },
57
57
  {
58
58
  "kind": "sea",
59
59
  "os": "win",
60
60
  "arch": "x86_64",
61
- "version": "3.7.1",
61
+ "version": "3.7.2",
62
62
  "name": "create-maa-project-win-x86_64.exe",
63
- "url": "https://github.com/Windsland52/create-maa-project/releases/download/v3.7.1/create-maa-project-win-x86_64.exe",
64
- "sha256": "59ca9441a0f62edea6f7fcaf3d72633de15e6f115a019ff5091d2e0b8a11f763",
65
- "size": 95328256
63
+ "url": "https://github.com/Windsland52/create-maa-project/releases/download/v3.7.2/create-maa-project-win-x86_64.exe",
64
+ "sha256": "d5aef836ced86c71bc8bf5c0d9b98aea37bf21c76f8bcc735f2ce41970acb87f",
65
+ "size": 95341568
66
66
  }
67
67
  ]
68
68
  }
@@ -2,6 +2,42 @@
2
2
 
3
3
  create-maa-project 的重要更改记录。格式参考 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.1.0/),版本号遵循 [语义化版本](https://semver.org/lang/zh-CN/)。
4
4
 
5
+ ## [3.7.2] - 2026-10-17
6
+
7
+ ### 修复
8
+
9
+ - Android 的 beta 配对现在能真正匹配上。预发布版本在三个地方拼写不同:`requirements.txt` 是 uv 导出的
10
+ PEP 440 归一形式(`maafw==5.15.0b1`),内核 tag 是发布原文(`3.13.15-maafw5.15.0-beta.1`),
11
+ MaaFramework release tag 是 `v5.15.0-beta.1`。resolver 的配对正则原先不认 `-`,`5.15.0b1` 会被判成
12
+ "内核还没发配对"而降级回上一个正式版;现在 tag 解析放行预发布后缀,配对、`AGENT_CORE_TAG` 校验以及
13
+ `maa-project.json` / `requirements.txt` 的一致性比较都先按 PEP 440 归一再比,`maafw_tag` 取 release
14
+ 的真实拼写而不是 `v` 加归一版本。`--doctor` 的 android 钉版检查同样归一后再比,`maafw.version` 写
15
+ `5.15.0b1` 或 `5.15.0-beta.1` 不再互相误报。桌面侧 `--update maafw` 把 `maafw.version` 当 tag 查时,
16
+ 归一形式查不到会补试发布拼写(`5.15.0b1` → `v5.15.0-beta.1`)
17
+
18
+ ### 变更
19
+
20
+ - `--update python-deps` 成为 android 项目的版本对齐点。启用 `android` 的 Agent 项目里,它先确定
21
+ MaaFramework 目标版本(`maa-project.json` 的精确 `maafw.version` 优先,为空则按 `maafw.channel` 解析
22
+ 最新发布,`beta` / `alpha` 含预发布),把 `maafw==X` 钉进 `pyproject.toml` 后再 `uv lock` /
23
+ `uv export`,最后校验 `requirements.txt` 导出的是同一版本(PEP 440 归一后比较),不一致直接报错。
24
+ 没有 `android` 的 Agent 项目保持原行为:`maafw` 浮动,由 uv 与 Dependabot 的 `lockfile-only` 更新
25
+ 驱动,不会和自动更新打架。`--add android` 现在也会改写已有的 `maafw` 钉版(原来只填未钉版的依赖),
26
+ `maafw.version` 改了重跑即可
27
+ - 发版 workflow 自己重导 Python 依赖。Dependabot 的 `uv` 更新只动 `uv.lock`,而桌面包与 APK 都从
28
+ `requirements.txt` 装依赖;现在 `release.yml` 在 `pnpm sync:runtime` 之前、`android-build.yml` 在两个
29
+ job 的 `tools/android-packaging.mjs` 之前都会先跑 `uv export --frozen`,从 lock 重新导出工作区里的
30
+ `requirements.txt`。合并 Dependabot 的 uv PR 后不必再手工跑 `--update python-deps` 才能发版;仓库里
31
+ 那份仍是提交物,本地开发想更新时再跑。`--frozen` 在 `pyproject.toml` 与 `uv.lock` 不一致时直接失败,
32
+ 不会悄悄用旧 lock
33
+
34
+ 已有项目:`tools/android-packaging.mjs` 是受管文件,重跑 `create-maa-project --add android` 即更新。
35
+ 要出 beta 包不用再手改 `pyproject.toml`:把 `maa-project.json` 的 `maafw.channel` 改成 `beta`(或把
36
+ `maafw.version` 写成精确版本)后跑一次 `--update python-deps`,它会自己把 `maafw==5.15.0-beta.1` 钉进
37
+ `pyproject.toml`、导出 `requirements.txt`,内核已有 `3.13.15-maafw5.15.0-beta.1` 配对时 APK 就会用它。
38
+
39
+ [3.7.2]: https://github.com/Windsland52/create-maa-project/compare/v3.7.1...v3.7.2
40
+
5
41
  ## [3.7.1] - 2026-10-13
6
42
 
7
43
  ### 修复
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: create-maa-project
3
- Version: 3.7.1
3
+ Version: 3.7.2
4
4
  Summary: 用于创建和维护 MaaFW 应用项目的脚手架 CLI / Scaffold and maintenance CLI for MaaFW application projects
5
5
  Project-URL: Homepage, https://github.com/Windsland52/create-maa-project
6
6
  Project-URL: Source, https://github.com/Windsland52/create-maa-project
@@ -145,10 +145,14 @@ the files:
145
145
  only ships inside the MaaAgentCoreAndroid kernel release (`X-maafwY` tags), which is what pairs the
146
146
  kernel with the native libraries inside the APK. Without it the add-on records an `android-version`
147
147
  pending action. When `maa-project.json` carries an exact `maafw.version`, `--add android` pins
148
- `pyproject.toml` to it as well, and `--update python-deps` exports that pin to `requirements.txt`.
148
+ `pyproject.toml` to it as well; when it is empty, `--update python-deps` resolves `maafw.channel`
149
+ and pins that version instead. Either way `--update python-deps` exports the pin to `requirements.txt`.
149
150
  When upstream ships a patch release before the kernel catches up, CI degrades to the highest pairing
150
151
  at or below the pin and prints a `::warning::` (the APK stays internally consistent, it is just older
151
- than the pin); only a pin older than every kernel pairing is an error.
152
+ than the pin); only a pin older than every kernel pairing is an error. Pre-releases pair too: kernel
153
+ and release tags keep the released spelling (`3.13.15-maafw5.15.0-beta.1`, `v5.15.0-beta.1`) while
154
+ `requirements.txt` carries the PEP 440-normalized form `uv export` produces (`5.15.0b1`); the resolver
155
+ and `--doctor` compare normalized versions, and `maafw.version` accepts either spelling.
152
156
  - Native Python packages (the ones carrying `.so` files) are probed per package against the Chaquopy
153
157
  index, and the resolver emits the downgrade arguments: a desktop pin with no build for the kernel
154
158
  CPython is pinned to the highest version the index has, a package the index does not carry at all is
@@ -241,6 +245,19 @@ leaves local runs working while the built package ships without the new dependen
241
245
  dependency change, commit `pyproject.toml`, `uv.lock`, `requirements.in`, and `requirements.txt`
242
246
  together.
243
247
 
248
+ For an Agent project with the `android` add-on, `--update python-deps` also reconciles the
249
+ MaaFramework version: the target is an exact `maafw.version` from `maa-project.json`, or the newest
250
+ release of `maafw.channel` (`beta` / `alpha` include prereleases) when that is empty. It pins
251
+ `maafw==X` into `pyproject.toml` before `uv lock` / `uv export`, then verifies the exported
252
+ `requirements.txt` still carries the same version (compared after PEP 440 normalization) and fails
253
+ instead of letting the APK and the desktop package use different frameworks. Agent projects without
254
+ the `android` add-on are untouched: `maafw` stays floating, so uv and Dependabot's `lockfile-only`
255
+ updates own the version. The release workflows (`release.yml` for desktop and `android-build.yml` for
256
+ APKs) re-export `requirements.txt` from `uv.lock` with `uv export --frozen` before packaging, so a
257
+ merged Dependabot uv PR needs no manual re-export; `--update python-deps` only keeps the committed
258
+ file current for local development. `--frozen` fails when `pyproject.toml` and `uv.lock` disagree
259
+ instead of silently exporting the old lock.
260
+
244
261
  `--update python-runtime` takes its platform from `CREATE_MAA_PROJECT_RUNTIME_PLATFORM=<os>-<arch>`
245
262
  (one platform per run), downloads the embedded interpreter into
246
263
  `.create-maa-project/runtime/python/<platform>`, and reinstalls from `requirements.txt`; after a
@@ -124,9 +124,13 @@ dev-tools 的产物(Prettier formatter、`tools/schema/*`、`pnpm install`)
124
124
  - **Agent 项目**需要 `requirements.txt` 里的精确 `maafw==X`:Android 的 Python 绑定只随内核
125
125
  (`MaaAgentCoreAndroid` 的 `X-maafwY` tag)发布,CI 按它配对内核与 APK 内的原生库。拿不到精确版本时
126
126
  登记 `android-version` pending;`maa-project.json` 的 `maafw.version` 填了精确版本时,`--add android`
127
- 会把 `pyproject.toml` 的 `maafw` 一并钉住,再跑 `--update python-deps` 让 uv 把钉版导出到
128
- `requirements.txt`。上游发了补丁版而内核还没跟上时,CI 会降级到不高于固定版本的最高配对并打
129
- `::warning::`(APK 内仍是同版本,只是比 requirements 固定得旧);固定版本比内核所有配对都旧才报错。
127
+ 会把 `pyproject.toml` 的 `maafw` 一并钉住;为空时由 `--update python-deps` 按 `maafw.channel` 解析并
128
+ 钉住。两条路径都靠 `--update python-deps` 把钉版导出到 `requirements.txt`。上游发了补丁版而内核还没
129
+ 跟上时,CI 会降级到不高于固定版本的最高配对并打 `::warning::`(APK 内仍是同版本,只是比 requirements
130
+ 固定得旧);固定版本比内核所有配对都旧才报错。
131
+ 预发布版本同样能配对:内核 tag 与 release tag 用发布原文(`3.13.15-maafw5.15.0-beta.1`、
132
+ `v5.15.0-beta.1`),`requirements.txt` 里是 uv 导出的归一形式(`5.15.0b1`),resolver 与 `--doctor`
133
+ 都先按 PEP 440 归一再比较,`maa-project.json` 的 `maafw.version` 写哪种拼写都能匹配。
130
134
  - 带 `.so` 的原生 Python 包由 resolver 按 Chaquopy 索引**逐包探测**后给出降级参数:桌面 pin 在索引上
131
135
  没有当前 CPython 的构建就钉到索引最高可用版,索引上没有该包(纯 Python)不钉,索引有构建但没有
132
136
  当前 CPython 时 CI 直接报错,而不是让 pip 在构建中途失败。
@@ -195,6 +199,16 @@ Agent 项目的 Python 依赖是一条两级链路,改依赖时两步都要走
195
199
  包里没有新依赖。每次改完依赖,把 `pyproject.toml`、`uv.lock`、`requirements.in`、`requirements.txt`
196
200
  一起提交。
197
201
 
202
+ 对启用 `android` 的 Agent 项目,`--update python-deps` 还负责对齐 MaaFramework 版本:目标取
203
+ `maa-project.json` 的精确 `maafw.version`,为空则按 `maafw.channel` 解析最新发布(`beta` / `alpha`
204
+ 含预发布),先把该版本钉进 `pyproject.toml` 的 `maafw==X` 再 `uv lock` / `uv export`,最后校验导出的
205
+ `requirements.txt` 仍是同一版本(按 PEP 440 归一后比较,不一致直接报错,不让 APK 与桌面资产各用一套)。
206
+ 没有 `android` 的 Agent 项目不受影响:`maafw` 保持浮动,由 uv 与 Dependabot 的 `lockfile-only` 更新驱动。
207
+ 发版 workflow(桌面 `release.yml` 与 Android 的 `android-build.yml`)在打包前会用 `uv export --frozen`
208
+ 从 `uv.lock` 重新导出 `requirements.txt`,所以合并 Dependabot 的 uv PR 后不用手工重导;`--update
209
+ python-deps` 只负责把仓库里那份文件同步到最新(本地开发与提交用)。`--frozen` 会在 `pyproject.toml` 与
210
+ `uv.lock` 不一致时直接失败,而不是悄悄用旧 lock。
211
+
198
212
  `--update python-runtime` 用 `CREATE_MAA_PROJECT_RUNTIME_PLATFORM=<os>-<arch>` 指定平台(一次一个),
199
213
  把内嵌解释器下载到 `.create-maa-project/runtime/python/<platform>`,并按 `requirements.txt` 重装依赖;
200
214
  依赖变更后要先跑 `python-deps`,`python-runtime` 才能装到新版本。
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-maa-project",
3
- "version": "3.7.1",
3
+ "version": "3.7.2",
4
4
  "description": "用于创建和维护 MaaFW 应用项目的脚手架 CLI / Scaffold and maintenance CLI for MaaFW application projects",
5
5
  "keywords": [
6
6
  "maafw",
@@ -0,0 +1 @@
1
+ __version__ = "3.7.2"
@@ -0,0 +1,2 @@
1
+ # Filled by the release workflow when publishing the PyPI wrapper.
2
+ RELEASE_MANIFEST_SHA256 = "95a455d81605180d0879a4d446efe536ebbe6b4d457b7a1ee33bb0f87109417d"
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "create-maa-project"
3
- version = "3.7.1"
3
+ version = "3.7.2"
4
4
  description = "用于创建和维护 MaaFW 应用项目的脚手架 CLI / Scaffold and maintenance CLI for MaaFW application projects"
5
5
  keywords = ["maafw", "scaffold", "mcp"]
6
6
  readme = "README.md"
@@ -151,7 +151,11 @@ android` fails the clone and lands in that pending action.
151
151
  - An Agent project needs an exact `maafw==X` in `requirements.txt` (the Android Python binding only
152
152
  ships inside the MaaAgentCoreAndroid kernel release); otherwise the add-on records an
153
153
  `android-version` pending action with `create-maa-project --update python-deps` as its command. With
154
- an exact `maafw.version` in `maa-project.json`, `--add android` pins `pyproject.toml` too.
154
+ an exact `maafw.version` in `maa-project.json`, `--add android` pins `pyproject.toml` too; when it is
155
+ empty, `--update python-deps` resolves `maafw.channel` and pins that version instead.
156
+ Pre-releases pair as well: kernel and release tags keep the released spelling
157
+ (`3.13.15-maafw5.15.0-beta.1`, `v5.15.0-beta.1`) while `requirements.txt` carries the PEP 440-normalized
158
+ form `uv export` writes (`5.15.0b1`); the resolver and doctor compare normalized versions.
155
159
  - With `github` enabled, `release.yml` gains an `android` job that runs in parallel with `package`;
156
160
  `release-assets/*.apk` is published, and the release job's `needs` becomes `[package, android]`
157
161
  (`[package, android, git_cliff]` with git-cliff). A tag release without `KEYSTORE_BASE64` fails.
@@ -172,6 +176,14 @@ interpreter for one platform (`CREATE_MAA_PROJECT_RUNTIME_PLATFORM=<os>-<arch>`)
172
176
  `.create-maa-project/runtime/python/<platform>` and reinstalls from `requirements.txt`, so run
173
177
  `python-deps` first after a dependency change.
174
178
 
179
+ With the `android` add-on, `--update python-deps` also reconciles the MaaFramework version: an exact
180
+ `maafw.version` wins, otherwise the newest release of `maafw.channel` (`beta` / `alpha` include
181
+ prereleases). It pins `maafw==X` into `pyproject.toml` before `uv lock` / `uv export`, then verifies
182
+ the exported `requirements.txt` still carries the same version (PEP 440-normalized) and fails on
183
+ drift. Without `android`, `maafw` stays floating so uv and Dependabot's `lockfile-only` updates own
184
+ it. The release workflows re-export `requirements.txt` from `uv.lock` (`uv export --frozen`) before
185
+ packaging, so merged Dependabot uv PRs need no manual re-export.
186
+
175
187
  ## Common options
176
188
 
177
189
  Command modes are mutually exclusive: one mode per invocation. Options below list the modes
@@ -193,6 +193,42 @@ export async function resolveProductAssetManifestFromGithubRelease(
193
193
  return parseGithubReleaseManifest(config, release, channel, selectedPlatform)
194
194
  }
195
195
 
196
+ export type ProductReleaseTagRequest = {
197
+ product: string
198
+ channel?: string
199
+ version?: string
200
+ }
201
+
202
+ export type ProductReleaseTag = {
203
+ tag: string
204
+ version: string
205
+ }
206
+
207
+ export type ProductReleaseTagResolver = (request: ProductReleaseTagRequest) => Promise<ProductReleaseTag | undefined>
208
+
209
+ /**
210
+ * Resolves just the release a product selector points at, without downloading its manifest. Callers
211
+ * that have to pin another file to the same release — an Agent project pins its Python `maafw`
212
+ * binding to the MaaFramework release its Android kernel pairs with — use this so the channel is
213
+ * resolved by one implementation rather than by a second copy of the release rules.
214
+ */
215
+ export async function resolveProductReleaseTag(
216
+ request: ProductReleaseTagRequest,
217
+ options: ProductAssetManifestResolveOptions = {},
218
+ ): Promise<ProductReleaseTag | undefined> {
219
+ const config = productReleaseConfig(request.product)
220
+ if (!config) return undefined
221
+ const channel = normalizeReleaseChannel(request.channel)
222
+ const version = request.version?.trim() ?? ''
223
+ const release = version
224
+ ? await fetchGithubReleaseByTag(config, version, options.fetchJson, options.signal)
225
+ : await fetchGithubReleaseByChannel(config, channel, options.fetchJson, options.signal)
226
+ if (!isRecord(release) || typeof release.tag_name !== 'string' || release.tag_name.trim() === '') {
227
+ throw new Error(`Invalid GitHub release payload for ${config.product}.`)
228
+ }
229
+ return { tag: release.tag_name, version: release.tag_name.replace(/^v/i, '') }
230
+ }
231
+
196
232
  export async function downloadManifestAssets(
197
233
  manifest: AssetManifest,
198
234
  options: {
@@ -612,11 +648,6 @@ function isIgnoredArchiveEntry(path: string): boolean {
612
648
  return lower === '.ds_store' || lower.endsWith('/.ds_store') || lower.startsWith('__macosx/')
613
649
  }
614
650
 
615
- /**
616
- * Upstream tags are v-prefixed (`v5.13.1`) while a pinned version is often written without it, so a
617
- * tag that does not resolve is retried with the other spelling. The first failure is the one that
618
- * surfaces when neither resolves, which keeps the message tied to what the config asked for.
619
- */
620
651
  async function fetchGithubReleaseByTag(
621
652
  config: ProductReleaseConfig,
622
653
  tag: string,
@@ -635,17 +666,36 @@ async function fetchGithubReleaseByTag(
635
666
  throw failure
636
667
  }
637
668
 
669
+ /**
670
+ * Upstream tags are v-prefixed (`v5.13.1`) while a pinned version is often written without it, so a
671
+ * tag that does not resolve is retried with the other spelling. Pre-releases add a second axis:
672
+ * `uv export` and PEP 440 write the normalized form (`5.15.0b1`) while the release tag keeps the
673
+ * released form (`v5.15.0-beta.1`), so the expanded spelling is retried too. The first failure is
674
+ * the one that surfaces when none of them resolve, which keeps the message tied to what the config
675
+ * asked for.
676
+ */
638
677
  function releaseTagCandidates(tag: string): string[] {
639
678
  const pinned = tag.trim()
640
- const alternate = /^v/i.test(pinned) ? pinned.slice(1) : `v${pinned}`
641
- return alternate
642
- ? [
643
- pinned,
644
- alternate,
645
- ]
646
- : [
647
- pinned,
648
- ]
679
+ const candidates: string[] = []
680
+ for (const spelling of new Set([
681
+ pinned,
682
+ expandPrereleaseSpelling(pinned),
683
+ ])) {
684
+ candidates.push(spelling, /^v/i.test(spelling) ? spelling.slice(1) : `v${spelling}`)
685
+ }
686
+ return candidates
687
+ }
688
+
689
+ /** `5.15.0b1` / `v5.15.0b1` -> `v5.15.0-beta.1`; anything already in release form is returned as-is. */
690
+ function expandPrereleaseSpelling(tag: string): string {
691
+ const match = /^(v?)(\d+(?:\.\d+)*)(a|b|rc|c)(\d+)$/i.exec(tag)
692
+ if (match === null) return tag
693
+ const prefix = match[1] ?? ''
694
+ const release = match[2] ?? ''
695
+ const kind = (match[3] ?? '').toLowerCase()
696
+ const number = match[4] ?? ''
697
+ const word = kind === 'a' ? 'alpha' : kind === 'b' ? 'beta' : 'rc'
698
+ return `${prefix}${release}-${word}.${number}`
649
699
  }
650
700
 
651
701
  function fetchTaggedGithubRelease(
@@ -3,6 +3,7 @@ import { dirname, join, resolve } from 'node:path'
3
3
  import { stat } from 'node:fs/promises'
4
4
  import { promisify } from 'node:util'
5
5
  import { readProjectConfig } from './project.js'
6
+ import { normalizeMaafwVersion } from './maafw-version.js'
6
7
  import type { MaaProjectConfig } from './types.js'
7
8
  import { normalizeControllerKind } from './controllers.js'
8
9
  import { enabledResourcePacks, hasDevTools, hasGithubAutomation, isAddonEnabled } from './features.js'
@@ -301,7 +302,7 @@ async function checkAndroidPackaging(root: string, config: MaaProjectConfig, lin
301
302
  ok = false
302
303
  } else {
303
304
  const declared = (config.maafw.version ?? '').trim()
304
- if (declared !== '' && declared !== requirementsPin) {
305
+ if (declared !== '' && normalizeMaafwVersion(declared) !== normalizeMaafwVersion(requirementsPin)) {
305
306
  lines.push(
306
307
  `[ERR] maa-project.json pins maafw ${declared} but requirements.txt pins ${requirementsPin}; the APK would mix two versions.`,
307
308
  )
@@ -311,7 +312,10 @@ async function checkAndroidPackaging(root: string, config: MaaProjectConfig, lin
311
312
  ok = false
312
313
  }
313
314
  const pyprojectPin = await requirementPin(join(root, 'pyproject.toml'), /"maafw==([^"]+)"/)
314
- if (pyprojectPin !== undefined && pyprojectPin !== requirementsPin) {
315
+ if (
316
+ pyprojectPin !== undefined &&
317
+ normalizeMaafwVersion(pyprojectPin) !== normalizeMaafwVersion(requirementsPin)
318
+ ) {
315
319
  lines.push(
316
320
  `[ERR] pyproject.toml pins maafw ${pyprojectPin} but requirements.txt pins ${requirementsPin}; uv has not exported the change.`,
317
321
  )
@@ -0,0 +1,25 @@
1
+ /**
2
+ * The same MaaFramework release is spelled two ways across the toolchain.
3
+ *
4
+ * PyPI and `uv export` carry the PEP 440-normalized form (`5.15.0b1`), while GitHub tags — and the
5
+ * Android kernel tags that copy them — keep the released form (`v5.15.0-beta.1`,
6
+ * `3.13.15-maafw5.15.0-beta.1`). `requirements.txt`, `pyproject.toml` and `maa-project.json` can each
7
+ * hold either one, so anything comparing them has to compare these keys instead of the raw strings.
8
+ */
9
+ export function normalizeMaafwVersion(version: string): string {
10
+ const value = version.trim().replace(/^[vV]/u, '')
11
+ const match = /^(\d+(?:\.\d+)*)(.*)$/u.exec(value)
12
+ if (match === null) return value.toLowerCase()
13
+ return `${match[1] ?? ''}${prereleaseKey(match[2] ?? '')}`
14
+ }
15
+
16
+ /** `-beta.1` / `beta.1` / `b1` -> `b1`, `rc.2` / `c2` -> `rc2`, release -> empty. */
17
+ function prereleaseKey(text: string): string {
18
+ const suffix = text.toLowerCase().replace(/^[-_.]+/u, '')
19
+ if (suffix === '') return ''
20
+ const match = /^(alpha|beta|preview|pre|rc|a|b|c)[-_.]?(\d*)(.*)$/u.exec(suffix)
21
+ if (match === null) return suffix
22
+ const word = match[1] ?? ''
23
+ const short = word === 'a' || word === 'alpha' ? 'a' : word === 'b' || word === 'beta' ? 'b' : 'rc'
24
+ return `${short}${match[2] ?? ''}${match[3] ?? ''}`
25
+ }
@@ -22,7 +22,7 @@ import {
22
22
  interfaceResourceItems,
23
23
  maatoolsConfigFile,
24
24
  optimizeImagesFiles,
25
- pinnedMaafwRequirement,
25
+ pinMaafwToVersion,
26
26
  projectCustomSchemaFiles,
27
27
  releaseWorkflowFile,
28
28
  schemaSyncFiles,
@@ -1024,7 +1024,7 @@ async function pinMaafwForAndroid(root: string, config: MaaProjectConfig, writte
1024
1024
  const fullPath = join(root, relativePath)
1025
1025
  if (!(await exists(fullPath))) return
1026
1026
  const current = await readText(fullPath)
1027
- const next = pinnedMaafwRequirement(current, version)
1027
+ const next = pinMaafwToVersion(current, version)
1028
1028
  if (next === current) return
1029
1029
  await trackProjectPathForBackup(root, relativePath)
1030
1030
  await writeText(fullPath, next)
@@ -967,6 +967,18 @@ export function pinnedMaafwRequirement(content: string, version: string): string
967
967
  return content.replace(/^(\s*)"maafw"(\s*,?\s*)$/m, `$1"maafw==${normalized}"$2`)
968
968
  }
969
969
 
970
+ /**
971
+ * Rewrites whatever `maafw` requirement `pyproject.toml` already carries to an exact pin. Unlike
972
+ * `pinnedMaafwRequirement` this also replaces an existing pin or range: an Agent project with the
973
+ * Android add-on has exactly one owner for that version (`maa-project.json` or the channel), so a
974
+ * stale hand-edited pin has to move with it rather than block the update.
975
+ */
976
+ export function pinMaafwToVersion(content: string, version: string): string {
977
+ const normalized = version.trim()
978
+ if (normalized === '') return content
979
+ return content.replace(/^(\s*)"maafw(?:[<>=!~][^"]*)?"(\s*,?\s*)$/m, `$1"maafw==${normalized}"$2`)
980
+ }
981
+
970
982
  /**
971
983
  * `maafw` is unpinned by default: the desktop project follows whatever uv resolves. An Android
972
984
  * package that carries an agent cannot: the Android binding only ships inside the
@@ -23,6 +23,7 @@ import {
23
23
  downloadManifestAssets,
24
24
  downloadProjectManifestAssets,
25
25
  resolveProductAssetManifest,
26
+ resolveProductReleaseTag,
26
27
  resolveOcrManifestFromEnvironment,
27
28
  resolveRuntimePlatform,
28
29
  writeDownloadedAssets,
@@ -33,8 +34,10 @@ import {
33
34
  PYTHON_EMBED_VERSION,
34
35
  type ProductAssetManifestRequest,
35
36
  type ProductAssetManifestResolver,
37
+ type ProductReleaseTagResolver,
36
38
  } from './assets.js'
37
- import { baseProjectFiles } from './templates.js'
39
+ import { baseProjectFiles, pinMaafwToVersion } from './templates.js'
40
+ import { normalizeMaafwVersion } from './maafw-version.js'
38
41
  import type { CliOptions, MaaProjectConfig, ManagedFileInput, OcrConfig, PendingItem, ScaffoldResult } from './types.js'
39
42
  import {
40
43
  copyFileAtomic,
@@ -113,6 +116,7 @@ type UpdateEnvironment = {
113
116
  commandRunner?: UpdateCommandRunner
114
117
  ocrManifestResolver?: AssetManifestResolver
115
118
  productManifestResolver?: ProductAssetManifestResolver
119
+ productReleaseResolver?: ProductReleaseTagResolver
116
120
  assetDownloader?: AssetDownloader
117
121
  onProgress?: ProgressReporter
118
122
  onDownloadProgress?: DownloadProgressReporter
@@ -177,7 +181,15 @@ export async function recordUpdateRequests(
177
181
  ]) {
178
182
  await trackProjectPathForBackup(root, path)
179
183
  }
180
- await updatePythonDeps(root, commandRunner)
184
+ // The reconciler only writes pyproject.toml for projects that pair with the Android kernel.
185
+ if (isAddonEnabled(config, 'android')) await trackProjectPathForBackup(root, 'pyproject.toml')
186
+ const { pinnedPyproject } = await updatePythonDeps(root, commandRunner, {
187
+ config,
188
+ releaseResolver:
189
+ environment.productReleaseResolver ??
190
+ ((request) =>
191
+ resolveProductReleaseTag(request, environment.signal ? { signal: environment.signal } : {})),
192
+ })
181
193
  for (const path of [
182
194
  'uv.lock',
183
195
  'requirements.in',
@@ -185,6 +197,7 @@ export async function recordUpdateRequests(
185
197
  ]) {
186
198
  if (await exists(join(root, path))) written.add(path)
187
199
  }
200
+ if (pinnedPyproject) written.add('pyproject.toml')
188
201
  continue
189
202
  }
190
203
  if (target === 'python-runtime') {
@@ -410,10 +423,32 @@ async function updateNodeDeps(root: string, commandRunner: UpdateCommandRunner):
410
423
  ])
411
424
  }
412
425
 
413
- async function updatePythonDeps(root: string, commandRunner: UpdateCommandRunner): Promise<void> {
426
+ /**
427
+ * Synchronizes the Agent's Python dependencies. For a project with the Android add-on this is also
428
+ * the one place that reconciles the three files that carry a MaaFramework version: the exact pin is
429
+ * written into `pyproject.toml` before uv locks, so `requirements.txt` (what the APK resolver reads)
430
+ * and the desktop package download (`maafw.channel` / `maafw.version`) cannot drift apart. Desktop
431
+ * only projects keep the old behavior: `maafw` stays floating and uv — and Dependabot's
432
+ * `lockfile-only` updates — own the version.
433
+ */
434
+ async function updatePythonDeps(
435
+ root: string,
436
+ commandRunner: UpdateCommandRunner,
437
+ context: {
438
+ config: MaaProjectConfig
439
+ releaseResolver: ProductReleaseTagResolver
440
+ },
441
+ ): Promise<{ pinnedPyproject: boolean }> {
414
442
  if (!(await exists(join(root, 'pyproject.toml')))) {
415
443
  throw new Error('--update python-deps requires an Agent project with pyproject.toml.')
416
444
  }
445
+ // Only the Android package consumes the exact pin: its kernel release pairs one binding version,
446
+ // so the three copies of that version have to be written from a single resolution. Desktop-only
447
+ // projects leave `maafw` floating on purpose so Dependabot can move `uv.lock`.
448
+ const androidTarget = isAddonEnabled(context.config, 'android')
449
+ ? await resolveAndroidMaafwTarget(context.config, context.releaseResolver)
450
+ : undefined
451
+ const pinnedPyproject = androidTarget !== undefined && (await pinMaafwInPyproject(root, androidTarget))
417
452
  for (const relativePath of ['requirements.in', 'uv.lock', 'requirements.txt']) {
418
453
  const path = join(root, relativePath)
419
454
  if (await exists(path)) await copyFileAtomic(path, path)
@@ -455,6 +490,63 @@ async function updatePythonDeps(root: string, commandRunner: UpdateCommandRunner
455
490
  const headerEnd = lines.findIndex((line) => !line.startsWith('#'))
456
491
  lines.splice(headerEnd < 0 ? lines.length : headerEnd, 0, '# Dependabot: use --universal when updating this file.')
457
492
  await writeFileAtomic(requirementsPath, lines.join('\n'))
493
+ if (androidTarget !== undefined) await assertExportedMaafw(requirementsPath, androidTarget)
494
+ return { pinnedPyproject }
495
+ }
496
+
497
+ /**
498
+ * `maa-project.json` is the declaration, `uv` is the resolver: an exact `maafw.version` wins, and an
499
+ * empty one follows the configured channel so a beta channel pulls the same prerelease the desktop
500
+ * package download uses.
501
+ */
502
+ async function resolveAndroidMaafwTarget(
503
+ config: MaaProjectConfig,
504
+ releaseResolver: ProductReleaseTagResolver,
505
+ ): Promise<string> {
506
+ const declared = (config.maafw.version ?? '').trim()
507
+ if (declared !== '') return declared
508
+ let release: Awaited<ReturnType<ProductReleaseTagResolver>>
509
+ try {
510
+ release = await releaseResolver({ product: 'MaaFramework', channel: config.maafw.channel })
511
+ } catch (error) {
512
+ const reason = error instanceof Error ? error.message : String(error)
513
+ throw new Error(
514
+ `Could not resolve the MaaFramework ${config.maafw.channel || 'stable'} channel: ${reason}. ` +
515
+ 'Set an exact maafw.version in maa-project.json to skip channel resolution, then rerun --update python-deps.',
516
+ )
517
+ }
518
+ if (release === undefined || release.version.trim() === '') {
519
+ throw new Error(
520
+ 'MaaFramework release resolution returned no version; set an exact maafw.version in maa-project.json ' +
521
+ 'to skip channel resolution, then rerun --update python-deps.',
522
+ )
523
+ }
524
+ return release.version
525
+ }
526
+
527
+ async function pinMaafwInPyproject(root: string, version: string): Promise<boolean> {
528
+ const path = join(root, 'pyproject.toml')
529
+ const current = await readText(path)
530
+ const next = pinMaafwToVersion(current, version)
531
+ if (next === current) return false
532
+ await writeFileAtomic(path, next)
533
+ return true
534
+ }
535
+
536
+ async function assertExportedMaafw(requirementsPath: string, target: string): Promise<void> {
537
+ const exported = /^maafw==(\S+)/m.exec(await readText(requirementsPath))?.[1]
538
+ if (exported === undefined) {
539
+ throw new Error(
540
+ 'uv export did not pin maafw, so the Android bundle cannot be paired with a kernel release ' +
541
+ `(expected maafw==${target}). Check [project].dependencies in pyproject.toml.`,
542
+ )
543
+ }
544
+ if (normalizeMaafwVersion(exported) !== normalizeMaafwVersion(target)) {
545
+ throw new Error(
546
+ `uv exported maafw ${exported} but the Android pairing target is ${target}; the APK would mix two ` +
547
+ 'framework versions. Align maafw.version and pyproject.toml, then rerun --update python-deps.',
548
+ )
549
+ }
458
550
  }
459
551
 
460
552
  async function updatePythonRuntime(