android-agent-harness 1.2.2__tar.gz → 1.2.4__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 (258) hide show
  1. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/PKG-INFO +50 -3
  2. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/README.md +49 -2
  3. android_agent_harness-1.2.4/agents/VERSION +1 -0
  4. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/harness.py +32 -2
  5. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/release_checksums.json +12 -12
  6. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_pm_selftest.py +154 -0
  7. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_public_commands.py +1 -1
  8. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_workflow/engine.py +38 -0
  9. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_workflow/router.py +1 -0
  10. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/doctor/engine.py +1 -74
  11. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/incident_reporter.py +190 -37
  12. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/integrations/universal_pm.py +34 -18
  13. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/mutation_guard.py +2 -1
  14. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/self_heal.py +34 -5
  15. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/tool-adapters/GEMINI.md.template +1 -1
  16. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/android_agent_harness.egg-info/PKG-INFO +50 -3
  17. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/pyproject.toml +1 -1
  18. android_agent_harness-1.2.2/agents/VERSION +0 -1
  19. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/LICENSE +0 -0
  20. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/.gitignore +0 -0
  21. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/command-packs/check-strings.md.template +0 -0
  22. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/command-packs/commit-msg.md.template +0 -0
  23. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/command-packs/crash-triage.md.template +0 -0
  24. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/command-packs/debug.md.template +0 -0
  25. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/command-packs/deliver.md.template +0 -0
  26. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/command-packs/doctor.md.template +0 -0
  27. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/command-packs/new-feature.md.template +0 -0
  28. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/command-packs/perf-audit.md.template +0 -0
  29. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/command-packs/preflight.md.template +0 -0
  30. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/command-packs/test-quality-audit.md.template +0 -0
  31. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/command-packs/zoho-sprints.md.template +0 -0
  32. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/harness_shared/__init__.py +0 -0
  33. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/harness_shared/commands.py +0 -0
  34. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/harness_shared/integrity.py +0 -0
  35. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/harness_shared/paths.py +0 -0
  36. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/harness_shared/processes.py +0 -0
  37. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/hooks.json +0 -0
  38. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/mcp_config.json +0 -0
  39. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/pm/mcp_registration.jira.md +0 -0
  40. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/pm/mcp_registration.linear.md +0 -0
  41. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/rules/compose-context.md +0 -0
  42. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/rules/gradle-context.md +0 -0
  43. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/rules/harness-rules.md +0 -0
  44. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/rules/kmp-context.md +0 -0
  45. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_adb_core.py +0 -0
  46. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_adb_core_selftest.py +0 -0
  47. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_android_inspect_selftest.py +0 -0
  48. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_android_scenarios_selftest.py +0 -0
  49. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_android_ui_selftest.py +0 -0
  50. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_antigravity_stability_selftest.py +0 -0
  51. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_architecture_selftest.py +0 -0
  52. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_baseline_selftest.py +0 -0
  53. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_change_decision_selftest.py +0 -0
  54. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_critical_safety_selftest.py +0 -0
  55. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_daily_workflow_selftest.py +0 -0
  56. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_delivery_equivalence_selftest.py +0 -0
  57. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_efficiency_selftest.py +0 -0
  58. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_enforcement.py +0 -0
  59. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_env_codes.py +0 -0
  60. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_env_codes_selftest.py +0 -0
  61. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_environment.py +0 -0
  62. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_external_write_policy_selftest.py +0 -0
  63. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_gate_results.py +0 -0
  64. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_graph_core.py +0 -0
  65. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_graph_discovery_selftest.py +0 -0
  66. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_graph_selftest.py +0 -0
  67. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_hook_selftest.py +0 -0
  68. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_host_continuation_selftest.py +0 -0
  69. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_idempotency.py +0 -0
  70. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_installer_config.py +0 -0
  71. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_live_process.py +0 -0
  72. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_modules.py +0 -0
  73. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_performance_selftest.py +0 -0
  74. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_phase_review_v2_selftest.py +0 -0
  75. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_portability_selftest.py +0 -0
  76. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_product.py +0 -0
  77. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_project_architecture.py +0 -0
  78. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_project_intelligence_selftest.py +0 -0
  79. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_public_cli_selftest.py +0 -0
  80. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_release_safety_selftest.py +0 -0
  81. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_repo_files.py +0 -0
  82. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_review_models_selftest.py +0 -0
  83. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_security_selftest.py +0 -0
  84. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_source_outline.py +0 -0
  85. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_source_text.py +0 -0
  86. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_stabilization_v41_selftest.py +0 -0
  87. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_stabilization_v42_selftest.py +0 -0
  88. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_task_isolation_selftest.py +0 -0
  89. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_variants.py +0 -0
  90. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_verification_recipes.py +0 -0
  91. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_verification_value_selftest.py +0 -0
  92. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_vnext_common.py +0 -0
  93. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_vnext_selftest.py +0 -0
  94. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_workflow/__init__.py +0 -0
  95. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_workflow/phase_routing.py +0 -0
  96. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_workflow/planning.py +0 -0
  97. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_workflow/verification.py +0 -0
  98. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_workflow_insight_selftest.py +0 -0
  99. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/_worktree_handoff_selftest.py +0 -0
  100. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/android_inspect.py +0 -0
  101. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/android_ui.py +0 -0
  102. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/antigravity_contract.py +0 -0
  103. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/antigravity_runtime.py +0 -0
  104. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/antigravity_tools.py +0 -0
  105. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/architecture_drift.py +0 -0
  106. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/architecture_policy.py +0 -0
  107. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/architecture_resolver.py +0 -0
  108. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/artifact_set.py +0 -0
  109. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/baseline_capture.py +0 -0
  110. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/build_execution.py +0 -0
  111. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/capture_screen.py +0 -0
  112. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/cc_pre_tool_safety.py +0 -0
  113. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/change_classifier.py +0 -0
  114. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/change_decision.py +0 -0
  115. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/check_kit_update.py +0 -0
  116. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/check_strings.py +0 -0
  117. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/context_presentation.py +0 -0
  118. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/copilot_pre_tool_safety.py +0 -0
  119. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/delivery_equivalence.py +0 -0
  120. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/delivery_manifest.py +0 -0
  121. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/discovery_receipt.py +0 -0
  122. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/discovery_router.py +0 -0
  123. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/doctor/__init__.py +0 -0
  124. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/doctor/models.py +0 -0
  125. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/ensure_hook_selftest.py +0 -0
  126. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/evidence_store.py +0 -0
  127. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/exported_component_guard.py +0 -0
  128. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/fast_kt_lint.py +0 -0
  129. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/final_verdict.py +0 -0
  130. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/final_verifier.py +0 -0
  131. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/generate_project_context.py +0 -0
  132. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/gradle_error_parser.py +0 -0
  133. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/harness_doctor.py +0 -0
  134. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/host_continuation.py +0 -0
  135. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/install_or_update.py +0 -0
  136. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/install_tool_adapters.py +0 -0
  137. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/integrations/__init__.py +0 -0
  138. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/integrations/base.py +0 -0
  139. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/integrations/external_write_policy.py +0 -0
  140. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/integrations/generic_mcp.py +0 -0
  141. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/integrations/registry.py +0 -0
  142. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/integrations/zoho_sprints/__init__.py +0 -0
  143. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/integrations/zoho_sprints/integration.py +0 -0
  144. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/integrations/zoho_sprints/policy.py +0 -0
  145. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/journey_runner.py +0 -0
  146. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/lifecycle.py +0 -0
  147. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/logcat_doctor.py +0 -0
  148. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/new_feature_scaffold.py +0 -0
  149. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/perf_guard.py +0 -0
  150. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/phase_review.py +0 -0
  151. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/phone_e2e.py +0 -0
  152. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/plan_authority.py +0 -0
  153. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/plan_document.py +0 -0
  154. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/plan_notes.py +0 -0
  155. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/pm_discovery.py +0 -0
  156. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/pm_github.py +0 -0
  157. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/pm_policy.py +0 -0
  158. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/policy_vocab.py +0 -0
  159. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/post_tool_reconcile.py +0 -0
  160. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/pre_invocation_reminder.py +0 -0
  161. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/pre_tool_safety.py +0 -0
  162. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/preflight.py +0 -0
  163. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/preflight_check.py +0 -0
  164. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/project_context.py +0 -0
  165. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/project_graph.py +0 -0
  166. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/record_review.py +0 -0
  167. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/repair.py +0 -0
  168. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/review_budget.py +0 -0
  169. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/review_execution.py +0 -0
  170. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/review_fix_delta.py +0 -0
  171. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/review_models.py +0 -0
  172. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/review_orchestrator.py +0 -0
  173. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/review_package.py +0 -0
  174. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/review_policy.py +0 -0
  175. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/review_reasoning.py +0 -0
  176. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/review_sources.py +0 -0
  177. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/reviewer_host.py +0 -0
  178. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/room_guard.py +0 -0
  179. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/run_device.py +0 -0
  180. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/run_gradle_task.py +0 -0
  181. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/run_tests_gate.py +0 -0
  182. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/setup_wizard.py +0 -0
  183. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/skill_router.py +0 -0
  184. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/task_base.py +0 -0
  185. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/task_context.py +0 -0
  186. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/task_git_lineage.py +0 -0
  187. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/task_merge.py +0 -0
  188. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/task_metrics.py +0 -0
  189. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/verification_contract.py +0 -0
  190. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/verification_steps.py +0 -0
  191. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/wizard/__init__.py +0 -0
  192. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/wizard/discovery.py +0 -0
  193. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/wizard/i18n.py +0 -0
  194. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/wizard/questions.py +0 -0
  195. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/wizard/schema.py +0 -0
  196. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/workflow.py +0 -0
  197. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/zoho_grant.py +0 -0
  198. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/scripts/zoho_sync.py +0 -0
  199. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/settings.json +0 -0
  200. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/skills/android-harness/SKILL.md +0 -0
  201. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/skills/android-harness/references/architecture-guidelines.md +0 -0
  202. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/skills/android-harness/references/automated-skills.md +0 -0
  203. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/skills/android-harness/references/command-contract.md +0 -0
  204. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/skills/android-harness/references/daily-scenarios.md +0 -0
  205. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/skills/android-harness/references/database-and-persistence.md +0 -0
  206. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/skills/android-harness/references/performance-and-optimization.md +0 -0
  207. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/skills/android-harness/references/test-quality-guidelines.md +0 -0
  208. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/skills/android-harness/references/ui-layout-and-theming.md +0 -0
  209. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/skills/android-security-billing/SKILL.md +0 -0
  210. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/skills/brainstorming/SKILL.md +0 -0
  211. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/skills/compose-inspector/SKILL.md +0 -0
  212. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/skills/git-pr-automator/SKILL.md +0 -0
  213. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/skills/gradle-build-optimizer/SKILL.md +0 -0
  214. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/skills/kotlin-coroutines-expert/SKILL.md +0 -0
  215. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/skills/systematic-debugging/SKILL.md +0 -0
  216. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/skills/test-driven-development/SKILL.md +0 -0
  217. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/subagents/android-ui-expert-agent.json +0 -0
  218. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/subagents/arch-regression-reviewer-agent.json +0 -0
  219. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/subagents/bug-test-reviewer-agent.json +0 -0
  220. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/subagents/qa-diagnostics-agent.json +0 -0
  221. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/subagents/re-review-prompt.md +0 -0
  222. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/subagents/review-prompt.md +0 -0
  223. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/subagents/security-perf-reviewer-agent.json +0 -0
  224. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/subagents/spec-compliance-agent.json +0 -0
  225. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/tool-adapters/AGENTS.md.template +0 -0
  226. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/tool-adapters/CLAUDE.md.template +0 -0
  227. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/tool-adapters/CODEX.md.template +0 -0
  228. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/tool-adapters/QWEN.md.template +0 -0
  229. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/tool-adapters/README.md +0 -0
  230. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/tool-adapters/continue-android-harness.md.template +0 -0
  231. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/tool-adapters/copilot-instructions.md.template +0 -0
  232. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/tool-adapters/cursor-android-harness.mdc.template +0 -0
  233. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/tool-adapters/gemini-runtime/android-harness-global.md.template +0 -0
  234. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/tool-adapters/gemini-runtime/config.grants.example.json +0 -0
  235. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/tool-adapters/gemini-runtime/mcp_config.template.json +0 -0
  236. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/tool-adapters/github-instructions.md.template +0 -0
  237. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/tool-adapters/pointer.md.template +0 -0
  238. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/tool-adapters/windsurf-android-harness.md.template +0 -0
  239. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/workflows/android-inspection.md +0 -0
  240. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/workflows/android-ui.md +0 -0
  241. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/workflows/check-strings.md +0 -0
  242. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/workflows/commit-msg.md +0 -0
  243. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/workflows/crash-triage.md +0 -0
  244. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/workflows/debug.md +0 -0
  245. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/workflows/deliver.md +0 -0
  246. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/workflows/efficient-context.md +0 -0
  247. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/workflows/new-feature.md +0 -0
  248. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/workflows/perf-audit.md +0 -0
  249. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/workflows/phone-e2e.md +0 -0
  250. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/workflows/preflight.md +0 -0
  251. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/workflows/test-quality-audit.md +0 -0
  252. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/agents/workflows/zoho-sprints.md +0 -0
  253. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/android_agent_harness.egg-info/SOURCES.txt +0 -0
  254. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/android_agent_harness.egg-info/dependency_links.txt +0 -0
  255. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/android_agent_harness.egg-info/entry_points.txt +0 -0
  256. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/android_agent_harness.egg-info/top_level.txt +0 -0
  257. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/harness_cli.py +0 -0
  258. {android_agent_harness-1.2.2 → android_agent_harness-1.2.4}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: android-agent-harness
3
- Version: 1.2.2
3
+ Version: 1.2.4
4
4
  Summary: Approval-first, evidence-bound development harness for supported Gradle Android projects.
5
5
  Author: Rabee Elkholy
6
6
  License-Expression: MIT
@@ -47,6 +47,35 @@ The model focuses on engineering. The harness handles workflow state, proof, and
47
47
 
48
48
  ---
49
49
 
50
+ ## Navigation
51
+
52
+ - [Key Architectural Pillars](#key-architectural-pillars)
53
+ - [Why It Exists & Failure Modes Checked](#why-it-exists)
54
+ - [Daily Developer Experience & Multi-Phase Flow](#what-daily-use-looks-like)
55
+ - [Quick Start (Chat & Terminal)](#quick-start)
56
+ - [6-Tier Dynamic Risk Model](#6-tier-risk-model)
57
+ - [Persistent Project Knowledge & Truth Hierarchy](#persistent-project-knowledge)
58
+ - [Antigravity-First Architecture & Review Protocol V2](#antigravity-first-architecture--review-protocol-v2)
59
+ - [Universal Multi-Provider PM MCP & Resilient Self-Healing](#universal-pm-mcp--resilient-self-healing)
60
+ - [Supported AI Hosts & Enforcement Matrix](#supported-hosts--enforcement-model)
61
+ - [Documentation Map & FAQ](#faq)
62
+
63
+ ---
64
+
65
+ ## Key Architectural Pillars
66
+
67
+ | Pillar | What It Solves | How the Harness Enforces It |
68
+ |---|---|---|
69
+ | **Graph-Backed AST & Symbol Discovery** | Blind grep loops and token-heavy full-file reads across large multi-module repos | Single-pass symbol/dependency graph (`task-context` & `graph`) across Kotlin (`.kt`), Java (`.java`), Android XML (`.xml`), and KMP/iOS Swift (`.swift`), plus codebase reuse candidate detection (`reuse_candidates`). |
70
+ | **Single-Approval Lifecycle & Scope Guard** | Silent scope creep, unapproved refactors, and mid-task confirmation fatigue | One initial plan approval (`plan_sha256` + single-use nonce) covers all phases. Native `PreToolUse` hooks (`hooks.json`) block unapproved file writes while automatically extending in-scope task files at phase/verification checkpoints. |
71
+ | **6-Tier Dynamic Risk & Epistemic Review V2** | Over-reviewing trivial edits or under-reviewing critical Auth/Billing/Room changes | Classifies the final diff from `T0_TRIVIAL` (0 reviewers, instant delivery for docs/prose) to `T5_CRITICAL`, dispatching 3 consolidated domain specialists (`bug-test-reviewer-agent`, `arch-regression-reviewer-agent`, `security-perf-reviewer-agent`) under Goldfish epistemic isolation (`HARNESS_REVIEW_RESULT_V2`). |
72
+ | **Android & KMP Domain Gates** | Room migration crashes, missing locale strings, UI-to-DAO layer bypass, and KMP leaks | Deterministic preflight checks for Room schema migrations, localized string/plural parity (`values-*`), `UI_TO_DATA_SOURCE_BYPASS`, KMP `commonMain` purity (`android.*` / JVM leak blocking), and exported component permission guards. |
73
+ | **Cryptographic Evidence & Physical Device Proof** | Claiming "tests pass" from stale runs or shipping broken UI without device checks | Every test run, review verdict, APK artifact hash, `device install-start` foreground observation, and live `e2e` phone session is bound to `delivery_snapshot_sha256` and `change_set_sha256`. Any post-verification edit invalidates stale proof. |
74
+ | **Self-Healing State & Consent-First Zero-PII Telemetry** | Wedged task state after developer Android Studio edits or unexpected crashes | Automatic stable checkpoint snapshots (`task heal`), preview-bound incremental scope decisions (`task change-decision`), and organized local Zero-PII incident reports (`.agents/state/incidents/<id>.md`) with consent-first `ask_question` GitHub reporting. |
75
+ | **Universal Zero-Config PM MCP Integration** | Accidental ticket closures, overwritten Bug descriptions, or leaked code identifiers in QA reports | Auto-discovers installed PM MCPs (Zoho Projects, Zoho Sprints, Jira, Linear, Monday.com, GitHub, ClickUp, Asana, Trello), enforces mandatory preview-and-approval (`pm authorize`), protects original Bug descriptions, blocks automatic `Done`/`Closed` transitions, and generates 5-section RTL/LTR functional QA reports. |
76
+
77
+ ---
78
+
50
79
  ## Why it exists
51
80
 
52
81
  AI coding agents are good at writing code, but production Android work has a second problem: keeping the agent aligned over time.
@@ -192,7 +221,7 @@ Task A
192
221
  Open your Android project in your AI coding agent (Claude Code, Codex, Gemini CLI / Antigravity, Cursor, Windsurf, Roo Code, or Copilot) and provide this bootstrap prompt:
193
222
 
194
223
  ```text
195
- Read https://raw.githubusercontent.com/rabee-elkholy/android-agent-harness/v1.2.2/docs/install-or-update-prompt.md and follow all instructions.
224
+ Read https://raw.githubusercontent.com/rabee-elkholy/android-agent-harness/v1.2.4/docs/install-or-update-prompt.md and follow all instructions.
196
225
  ```
197
226
 
198
227
  The installer runs non-destructively: it inspects project Gradle modules, asks a few essential setup questions, presents an installation plan, installs the managed engine under `.agents/`, and runs environment diagnostics. The full harness kit source checkout lives outside the target application (`~/.android-harness/kit`), while your Android project receives only the managed harness runtime payload under `.agents/`.
@@ -215,7 +244,7 @@ android-harness doctor --repo /path/to/android-project --json
215
244
  Or run directly from a pinned source clone without global installation:
216
245
 
217
246
  ```bash
218
- git clone --depth 1 --branch v1.2.2 --single-branch \
247
+ git clone --depth 1 --branch v1.2.4 --single-branch \
219
248
  https://github.com/rabee-elkholy/android-agent-harness.git ~/.android-harness/kit
220
249
 
221
250
  python ~/.android-harness/kit/harness_cli.py init \
@@ -427,6 +456,24 @@ For design, migration, compatibility and security decisions the agent asks the d
427
456
 
428
457
  ---
429
458
 
459
+ ## Universal PM MCP & Resilient Self-Healing
460
+
461
+ ### 1. Universal Zero-Config Multi-Provider PM MCP Engine
462
+ The harness dynamically discovers and inspects external Project Management MCP servers installed in the AI host (`zoho-projects_mcp`, `zoho-sprints`, `atlassian-mcp-server` / Jira, Linear, Monday.com, GitHub Projects, ClickUp, Asana, and Trello) without bundling vendor credentials inside the repository:
463
+ - **Mandatory Preview & Approval (`PM_PREVIEW_AND_APPROVAL_REQUIRED`)**: Before any tracker mutation, the agent presents the exact target item ID, status change, and comment/description payload to the developer and records explicit authorization (`python .agents/harness.py pm authorize --proof-reference "<developer approval>"`).
464
+ - **Non-Destructive Tracker Guardrails**: Original Bug/Issue descriptions are strictly protected from being overwritten or cleared (QA reports are posted as comments on Bugs and updated in descriptions on Tasks/Stories). Terminal states (`Done`, `Closed`, `Solved`) and opaque transition IDs are blocked unless the developer explicitly grants `--allow-close`.
465
+ - **5-Section RTL/LTR Functional QA Reports**: `python .agents/harness.py pm prepare-report` generates structured HTML/Markdown QA handoff reports in the project's configured tracker language without leaking internal source filenames, class names, or stack traces.
466
+
467
+ ### 2. Self-Healing Task State & Last-Known-Good Snapshot Rollback
468
+ - **Automatic Checkpoint Snapshots**: At every stable lifecycle boundary (`APPROVED`, `IMPLEMENTING`, `checkpoint-phase`, `VERIFYING`, `READY_FOR_DELIVERY`), the harness persists a cryptographically verified snapshot under `.agents/state/tasks/<id>/snapshots/` bound to the task identity, plan hash, and execution nonce.
469
+ - **One-Command State Recovery (`task heal`)**: If `current-run.json` becomes stale or a developer modifies verified files before committing, `python .agents/harness.py task heal --task-id <id> --prepare-fresh-run` steps internal state back to the nearest valid checkpoint while preserving application source code, Git history, completed phases, and passed reviewer accounting.
470
+
471
+ ### 3. Organized Local Zero-PII Incident Reports & Consent-First Submission
472
+ - **Local Zero-PII Diagnostics**: Unhandled harness exceptions or self-healing events are captured locally in `.agents/state/incidents/<incident_id>.json` and a human-readable `.agents/state/incidents/<incident_id>.md` report with strict Zero-PII redaction (scrubbing emails, phone numbers, IPv4 addresses, local paths, and tokens).
473
+ - **Developer Consent via `ask_question`**: Public reporting never runs silently by default. On an unexpected incident, the harness instructs the agent to ask the developer via `ask_question` whether to submit the allowlisted anonymous metadata once (`python .agents/harness.py report-issue --submit --incident-id <id>`), enable always-auto-submit (`--submit --always-auto-submit`), or keep the report local only.
474
+
475
+ ---
476
+
430
477
  ## Supported hosts / enforcement model
431
478
 
432
479
  | Host | Adapter | Mutation Interception | Review proof | Downstream verifier |
@@ -18,6 +18,35 @@ The model focuses on engineering. The harness handles workflow state, proof, and
18
18
 
19
19
  ---
20
20
 
21
+ ## Navigation
22
+
23
+ - [Key Architectural Pillars](#key-architectural-pillars)
24
+ - [Why It Exists & Failure Modes Checked](#why-it-exists)
25
+ - [Daily Developer Experience & Multi-Phase Flow](#what-daily-use-looks-like)
26
+ - [Quick Start (Chat & Terminal)](#quick-start)
27
+ - [6-Tier Dynamic Risk Model](#6-tier-risk-model)
28
+ - [Persistent Project Knowledge & Truth Hierarchy](#persistent-project-knowledge)
29
+ - [Antigravity-First Architecture & Review Protocol V2](#antigravity-first-architecture--review-protocol-v2)
30
+ - [Universal Multi-Provider PM MCP & Resilient Self-Healing](#universal-pm-mcp--resilient-self-healing)
31
+ - [Supported AI Hosts & Enforcement Matrix](#supported-hosts--enforcement-model)
32
+ - [Documentation Map & FAQ](#faq)
33
+
34
+ ---
35
+
36
+ ## Key Architectural Pillars
37
+
38
+ | Pillar | What It Solves | How the Harness Enforces It |
39
+ |---|---|---|
40
+ | **Graph-Backed AST & Symbol Discovery** | Blind grep loops and token-heavy full-file reads across large multi-module repos | Single-pass symbol/dependency graph (`task-context` & `graph`) across Kotlin (`.kt`), Java (`.java`), Android XML (`.xml`), and KMP/iOS Swift (`.swift`), plus codebase reuse candidate detection (`reuse_candidates`). |
41
+ | **Single-Approval Lifecycle & Scope Guard** | Silent scope creep, unapproved refactors, and mid-task confirmation fatigue | One initial plan approval (`plan_sha256` + single-use nonce) covers all phases. Native `PreToolUse` hooks (`hooks.json`) block unapproved file writes while automatically extending in-scope task files at phase/verification checkpoints. |
42
+ | **6-Tier Dynamic Risk & Epistemic Review V2** | Over-reviewing trivial edits or under-reviewing critical Auth/Billing/Room changes | Classifies the final diff from `T0_TRIVIAL` (0 reviewers, instant delivery for docs/prose) to `T5_CRITICAL`, dispatching 3 consolidated domain specialists (`bug-test-reviewer-agent`, `arch-regression-reviewer-agent`, `security-perf-reviewer-agent`) under Goldfish epistemic isolation (`HARNESS_REVIEW_RESULT_V2`). |
43
+ | **Android & KMP Domain Gates** | Room migration crashes, missing locale strings, UI-to-DAO layer bypass, and KMP leaks | Deterministic preflight checks for Room schema migrations, localized string/plural parity (`values-*`), `UI_TO_DATA_SOURCE_BYPASS`, KMP `commonMain` purity (`android.*` / JVM leak blocking), and exported component permission guards. |
44
+ | **Cryptographic Evidence & Physical Device Proof** | Claiming "tests pass" from stale runs or shipping broken UI without device checks | Every test run, review verdict, APK artifact hash, `device install-start` foreground observation, and live `e2e` phone session is bound to `delivery_snapshot_sha256` and `change_set_sha256`. Any post-verification edit invalidates stale proof. |
45
+ | **Self-Healing State & Consent-First Zero-PII Telemetry** | Wedged task state after developer Android Studio edits or unexpected crashes | Automatic stable checkpoint snapshots (`task heal`), preview-bound incremental scope decisions (`task change-decision`), and organized local Zero-PII incident reports (`.agents/state/incidents/<id>.md`) with consent-first `ask_question` GitHub reporting. |
46
+ | **Universal Zero-Config PM MCP Integration** | Accidental ticket closures, overwritten Bug descriptions, or leaked code identifiers in QA reports | Auto-discovers installed PM MCPs (Zoho Projects, Zoho Sprints, Jira, Linear, Monday.com, GitHub, ClickUp, Asana, Trello), enforces mandatory preview-and-approval (`pm authorize`), protects original Bug descriptions, blocks automatic `Done`/`Closed` transitions, and generates 5-section RTL/LTR functional QA reports. |
47
+
48
+ ---
49
+
21
50
  ## Why it exists
22
51
 
23
52
  AI coding agents are good at writing code, but production Android work has a second problem: keeping the agent aligned over time.
@@ -163,7 +192,7 @@ Task A
163
192
  Open your Android project in your AI coding agent (Claude Code, Codex, Gemini CLI / Antigravity, Cursor, Windsurf, Roo Code, or Copilot) and provide this bootstrap prompt:
164
193
 
165
194
  ```text
166
- Read https://raw.githubusercontent.com/rabee-elkholy/android-agent-harness/v1.2.2/docs/install-or-update-prompt.md and follow all instructions.
195
+ Read https://raw.githubusercontent.com/rabee-elkholy/android-agent-harness/v1.2.4/docs/install-or-update-prompt.md and follow all instructions.
167
196
  ```
168
197
 
169
198
  The installer runs non-destructively: it inspects project Gradle modules, asks a few essential setup questions, presents an installation plan, installs the managed engine under `.agents/`, and runs environment diagnostics. The full harness kit source checkout lives outside the target application (`~/.android-harness/kit`), while your Android project receives only the managed harness runtime payload under `.agents/`.
@@ -186,7 +215,7 @@ android-harness doctor --repo /path/to/android-project --json
186
215
  Or run directly from a pinned source clone without global installation:
187
216
 
188
217
  ```bash
189
- git clone --depth 1 --branch v1.2.2 --single-branch \
218
+ git clone --depth 1 --branch v1.2.4 --single-branch \
190
219
  https://github.com/rabee-elkholy/android-agent-harness.git ~/.android-harness/kit
191
220
 
192
221
  python ~/.android-harness/kit/harness_cli.py init \
@@ -398,6 +427,24 @@ For design, migration, compatibility and security decisions the agent asks the d
398
427
 
399
428
  ---
400
429
 
430
+ ## Universal PM MCP & Resilient Self-Healing
431
+
432
+ ### 1. Universal Zero-Config Multi-Provider PM MCP Engine
433
+ The harness dynamically discovers and inspects external Project Management MCP servers installed in the AI host (`zoho-projects_mcp`, `zoho-sprints`, `atlassian-mcp-server` / Jira, Linear, Monday.com, GitHub Projects, ClickUp, Asana, and Trello) without bundling vendor credentials inside the repository:
434
+ - **Mandatory Preview & Approval (`PM_PREVIEW_AND_APPROVAL_REQUIRED`)**: Before any tracker mutation, the agent presents the exact target item ID, status change, and comment/description payload to the developer and records explicit authorization (`python .agents/harness.py pm authorize --proof-reference "<developer approval>"`).
435
+ - **Non-Destructive Tracker Guardrails**: Original Bug/Issue descriptions are strictly protected from being overwritten or cleared (QA reports are posted as comments on Bugs and updated in descriptions on Tasks/Stories). Terminal states (`Done`, `Closed`, `Solved`) and opaque transition IDs are blocked unless the developer explicitly grants `--allow-close`.
436
+ - **5-Section RTL/LTR Functional QA Reports**: `python .agents/harness.py pm prepare-report` generates structured HTML/Markdown QA handoff reports in the project's configured tracker language without leaking internal source filenames, class names, or stack traces.
437
+
438
+ ### 2. Self-Healing Task State & Last-Known-Good Snapshot Rollback
439
+ - **Automatic Checkpoint Snapshots**: At every stable lifecycle boundary (`APPROVED`, `IMPLEMENTING`, `checkpoint-phase`, `VERIFYING`, `READY_FOR_DELIVERY`), the harness persists a cryptographically verified snapshot under `.agents/state/tasks/<id>/snapshots/` bound to the task identity, plan hash, and execution nonce.
440
+ - **One-Command State Recovery (`task heal`)**: If `current-run.json` becomes stale or a developer modifies verified files before committing, `python .agents/harness.py task heal --task-id <id> --prepare-fresh-run` steps internal state back to the nearest valid checkpoint while preserving application source code, Git history, completed phases, and passed reviewer accounting.
441
+
442
+ ### 3. Organized Local Zero-PII Incident Reports & Consent-First Submission
443
+ - **Local Zero-PII Diagnostics**: Unhandled harness exceptions or self-healing events are captured locally in `.agents/state/incidents/<incident_id>.json` and a human-readable `.agents/state/incidents/<incident_id>.md` report with strict Zero-PII redaction (scrubbing emails, phone numbers, IPv4 addresses, local paths, and tokens).
444
+ - **Developer Consent via `ask_question`**: Public reporting never runs silently by default. On an unexpected incident, the harness instructs the agent to ask the developer via `ask_question` whether to submit the allowlisted anonymous metadata once (`python .agents/harness.py report-issue --submit --incident-id <id>`), enable always-auto-submit (`--submit --always-auto-submit`), or keep the report local only.
445
+
446
+ ---
447
+
401
448
  ## Supported hosts / enforcement model
402
449
 
403
450
  | Host | Adapter | Mutation Interception | Review proof | Downstream verifier |
@@ -0,0 +1 @@
1
+ 1.2.4
@@ -34,7 +34,7 @@ def _run(script: str, args: list[str]) -> int:
34
34
  read_only = read_only or (script == "run_device.py" and args == ["status"])
35
35
  read_only = read_only or (script == "workflow.py" and args[:1] in (["status"], ["coverage"], ["metrics"], ["continue"]))
36
36
  read_only = read_only or (script == "pm_discovery.py" and args[:1] in (["discover"], ["status"]))
37
- read_only = read_only or (script == "incident_reporter.py" and bool({"--list", "--dry-run"} & set(args)))
37
+ read_only = read_only or script == "incident_reporter.py"
38
38
  # Merge checks the execution sessions of every source before applying; preview is read-only.
39
39
  read_only = read_only or (script == "workflow.py" and args[:1] == ["merge"])
40
40
  # The bounded verification runner owns its execution lease, including when
@@ -153,7 +153,37 @@ def main(argv: list[str] | None = None) -> int:
153
153
  monotonic = time.monotonic()
154
154
  from task_metrics import metric_task_id
155
155
  metric_owner = metric_task_id(REPO_ROOT, args)
156
- code = _main(args)
156
+ try:
157
+ code = _main(args)
158
+ except Exception as exc:
159
+ import traceback
160
+ tb_text = traceback.format_exc()
161
+ try:
162
+ from incident_reporter import record_incident
163
+ inc = record_incident(
164
+ REPO_ROOT,
165
+ code="UNEXPECTED_EXCEPTION",
166
+ command=f"harness.py {' '.join(args[:2])}".strip(),
167
+ message=f"{type(exc).__name__}: {exc}",
168
+ task_id=metric_owner or "",
169
+ traceback_text=tb_text,
170
+ )
171
+ inc_id = inc.get("incident_id", "")
172
+ guidance = inc.get("ask_question_guidance") or {}
173
+ sub = inc.get("submission") or {}
174
+ print(f"[FAIL] Unexpected harness exception ({type(exc).__name__}: {exc})", file=sys.stderr)
175
+ print(f"INCIDENT_RECORDED={inc_id}", file=sys.stderr)
176
+ print(f"INCIDENT_LOCAL_REPORT=.agents/state/incidents/{inc_id}.md", file=sys.stderr)
177
+ if sub.get("status") in {"REPORTED", "DEDUPLICATED_EXISTING_ISSUE"}:
178
+ print(f"INCIDENT_AUTO_SUBMITTED={sub.get('issue_url', '')}", file=sys.stderr)
179
+ elif guidance:
180
+ print("TOOL_CALL_REQUIRED=ask_question", file=sys.stderr)
181
+ print(f"INCIDENT_SUBMIT_ONCE={guidance.get('submit_once_command', '')}", file=sys.stderr)
182
+ print(f"INCIDENT_SUBMIT_ALWAYS={guidance.get('submit_always_command', '')}", file=sys.stderr)
183
+ print(f"NEXT_INSTRUCTIONS={guidance.get('instructions', '')}", file=sys.stderr)
184
+ except Exception:
185
+ print(tb_text, file=sys.stderr)
186
+ return 1
157
187
  # Explicit opt-in: feature-off does not read tasks or scan metrics history.
158
188
  if os.environ.get("HARNESS_LOCAL_METRICS") == "1" and args and args[0] in {"task", "task-context", "verify-steps", "phase-review", "preflight", "test", "assemble", "compile", "device", "review", "journey"}:
159
189
  try:
@@ -2,7 +2,7 @@
2
2
  "algorithm": "sha256",
3
3
  "files": {
4
4
  "agents/.gitignore": "8a0eaa7cc8e55d17da96f31f6863b5e9b5aba15bb03fd6e8fb07a8cb89e5715c",
5
- "agents/VERSION": "c62a5cc61ac4525935753f5ec284c0a052a4b1da4b3a3580dce2b7d77a2154ae",
5
+ "agents/VERSION": "563a0b4eec3c77bbc34ac630d4fa5214f5c6726ae01468404fd704473110084e",
6
6
  "agents/command-packs/check-strings.md.template": "688d464d69849d4b5bc68faae49bf79a196d882765ac5eaf9b829bd8df8b9c0b",
7
7
  "agents/command-packs/commit-msg.md.template": "cf8bd58a510a6953a66e2c705c8c9515f0369e4fa454af9bbc9c7f6b1805b80e",
8
8
  "agents/command-packs/crash-triage.md.template": "acea2311229cc8d4f7d1eae515a4d3f3b52246437df25ee75dfa40d3407dc69a",
@@ -14,7 +14,7 @@
14
14
  "agents/command-packs/preflight.md.template": "fc672c964115ddf16dfa10c12afa43c260981432c4ea4e567dbda5b0d8cde9b2",
15
15
  "agents/command-packs/test-quality-audit.md.template": "7064992a4b8f76aa7614097637f14d3539f973fd7051191e186c3ccc5f1b2358",
16
16
  "agents/command-packs/zoho-sprints.md.template": "6b4ad205415759f742d28722ccb017536d3ecac774132fcf21ab8e172fa3a1d0",
17
- "agents/harness.py": "255a351d926ccecc08e6b5bf10d180b565357dfdce3a08b5cd2004715199b900",
17
+ "agents/harness.py": "4b3e0248fbe8c615e30bd6baf33b3789a21f56a99e13328a1f4f667cd622e808",
18
18
  "agents/harness_shared/__init__.py": "123d7a509cad95f35619ff1849fcfc990205aca7e77fcdc2460a27acb029118c",
19
19
  "agents/harness_shared/commands.py": "90bde306439b299607e8aee512a374c04c30b58d8cfa155363263667a19e30bd",
20
20
  "agents/harness_shared/integrity.py": "ab1a9a6edede1545a4ba8ece5175659f4cecdee103b9d09ad4ade3a9e6f9a2a1",
@@ -58,13 +58,13 @@
58
58
  "agents/scripts/_modules.py": "23c3115d221277e661315788a529845e8613fd0ffc6750bde1850b04450be64f",
59
59
  "agents/scripts/_performance_selftest.py": "2d3e289623163f0638cec08cf3cb4bbeba025ec0a4964bb946a20456856b8ebe",
60
60
  "agents/scripts/_phase_review_v2_selftest.py": "10640da41da8dd11cc86411a8d0d3853831d2365921914690b4da99c58ba243a",
61
- "agents/scripts/_pm_selftest.py": "791550a9a732690e381d40c05401750dd58b21804c6ae17a9647b0c2949b44f3",
61
+ "agents/scripts/_pm_selftest.py": "3db78bb2bd7c90ef51773e33bf3c99bcffd20295088b3998a6395889c7b03ceb",
62
62
  "agents/scripts/_portability_selftest.py": "85354e3e8483c46d81f7afc384cd99c5576f9150c86b376dc5cc4a46e736c353",
63
63
  "agents/scripts/_product.py": "87e1d4d6c138667f2e2f5b6b149d2a468ad32b52bcebe79565864dc38a04b0c2",
64
64
  "agents/scripts/_project_architecture.py": "e0776eb82fbe38722d5d6772c6bfd1eb0f8a5496ce62ed578f1243ada87d04a9",
65
65
  "agents/scripts/_project_intelligence_selftest.py": "0f8117e3d1c8ea6b74f584b557bf531fcb2482081d3f1078c99a6539ef8a8a9e",
66
66
  "agents/scripts/_public_cli_selftest.py": "23610078906c1cc7e035bfa954d99f42e8df40acaa62d155a4557318b6966f9d",
67
- "agents/scripts/_public_commands.py": "568905c2c42d6f995e5c65951a0eefb9c98861f2d1be785b4b4d2622c3fa781d",
67
+ "agents/scripts/_public_commands.py": "3aa974d2ce8907f49c5a437e8f3d6c70cd04942be0f09aa0a8ad6ac59a41dc5f",
68
68
  "agents/scripts/_release_safety_selftest.py": "9f9eccb55e7f584f43d2bb4c9d1c58d9f3ff3b4b3d13b4763d67d6c85e51072f",
69
69
  "agents/scripts/_repo_files.py": "69fab31be58f2fcef0dacb44d75b93b6a1f3192fcad1f514217ea2219b837818",
70
70
  "agents/scripts/_review_models_selftest.py": "264162e5e44d4acfa6432457924e7e2f8d41f66c1912eafb3d1bb242c7a713d5",
@@ -80,10 +80,10 @@
80
80
  "agents/scripts/_vnext_common.py": "5036dbaf9e303f3652c66287f213d5eca13197ffbf4fa3438d81fa9dd476c03b",
81
81
  "agents/scripts/_vnext_selftest.py": "1a4f388670a4b01756de2f45085a9da1138ffcaecfe1e42f9cdef8114c669078",
82
82
  "agents/scripts/_workflow/__init__.py": "c22fd03196f70c813422712dfe3cb56689bfcbc32d08089987ffe8b41191675e",
83
- "agents/scripts/_workflow/engine.py": "a3149fadb4256c7bd4566837896f309270ebbe2f9f96da7bc00071ac049805bf",
83
+ "agents/scripts/_workflow/engine.py": "595fd34139ba13ed2467da3067abfc4c710e0d1a0406b087e6b9c482466665af",
84
84
  "agents/scripts/_workflow/phase_routing.py": "5948f0c916f720a522785965e71bf478add3dda1955d8dd8cbf2743498f07e78",
85
85
  "agents/scripts/_workflow/planning.py": "697260f36cbeb5bde9ea557b9fb205123481bb15877d6a8bdf3ebfaee0aec4ef",
86
- "agents/scripts/_workflow/router.py": "9d657c7ba4898c4f0ff9276cdb28f200ce67c5fe2a9152867cc17ce132176d60",
86
+ "agents/scripts/_workflow/router.py": "5c058c9b5659fee690e400d173fd2806a228a1e41aa4308daf854a0763437a51",
87
87
  "agents/scripts/_workflow/verification.py": "184cc95f051b229cf594a52363c746369477b222d9790705c0973a47a5e5ddd5",
88
88
  "agents/scripts/_workflow_insight_selftest.py": "2a2fd37932ac86ca4fca9095f29bc9ccd0ee3e562fc8dc8cf7abf497a2859deb",
89
89
  "agents/scripts/_worktree_handoff_selftest.py": "32af3b679d2c3fab3aa473d2c9d2639209fd7a891ca1735cf12d5a0b582109d4",
@@ -111,7 +111,7 @@
111
111
  "agents/scripts/discovery_receipt.py": "78724878c347fe94aefbf7a756df6a28f8104e5b708d877fd1138db43e7058c1",
112
112
  "agents/scripts/discovery_router.py": "ba8078be4300635aa92803c04d8a116de7990a5c983d5e0ecdfb969a7279d68d",
113
113
  "agents/scripts/doctor/__init__.py": "86a2eddbbf4da8ad0744a6d998110e34f3c9c1f964d8f6fed2e78390221e29f4",
114
- "agents/scripts/doctor/engine.py": "c103b90d989b4fe11709699727127f82a888e768f14ce438dfd94b40b90369b2",
114
+ "agents/scripts/doctor/engine.py": "454bff07a350bbb48e68d8965cdbe6eeb0f3c0a06ca24ff726ecc7b9d5213896",
115
115
  "agents/scripts/doctor/models.py": "d5130b755d2e63b3c9a7d13ba28068c3eaa73f65140d7d00b1b76ebe35a51831",
116
116
  "agents/scripts/ensure_hook_selftest.py": "c7367c8d46d0947baf631420a7f0bd4b201ca560ae3e2061702a650b5d87d6c9",
117
117
  "agents/scripts/evidence_store.py": "30dcdffe280a393258acb93db72dfc923a2cebb0f487b6e3e64e58892f8926b3",
@@ -123,7 +123,7 @@
123
123
  "agents/scripts/gradle_error_parser.py": "964999526572f9ee37fb4f969b48faf1efd1b5f9af9077ef010f2623329b1703",
124
124
  "agents/scripts/harness_doctor.py": "88209e61202bf0a7d756b53a83b574f61f279f09dbb1e48a8bbd0baff91f066e",
125
125
  "agents/scripts/host_continuation.py": "462edf9849ce75b9308ab46a9b96ed5bcd36690bd4bf1aa225b8810bba29c918",
126
- "agents/scripts/incident_reporter.py": "86256dc930c1b947c1845071e6016373abbcf4510bd821333704b2d3015d49b9",
126
+ "agents/scripts/incident_reporter.py": "e05cee8f0b181174608a905c8ffcb912518c7b67c04ab836969ff57ef3d6f3d0",
127
127
  "agents/scripts/install_or_update.py": "8c5d14933819331b330b4693d7f531a997d3361702624eb00447466cba9fe2b7",
128
128
  "agents/scripts/install_tool_adapters.py": "6d07694a06f2eb63aacff4ae9078fc75b363864580668096bc566babb6c13052",
129
129
  "agents/scripts/integrations/__init__.py": "d3b716d27fe4c634c74932d0fb75b6c44f283d0acffcb492d22bcf5b4c2b4d65",
@@ -131,14 +131,14 @@
131
131
  "agents/scripts/integrations/external_write_policy.py": "06f9fbf8793d69b438197adbffb41887583d7652c12cb8c3f68f029110a69f1f",
132
132
  "agents/scripts/integrations/generic_mcp.py": "3cce5a464e3f4e6276578e34592adb23ef7b89a848f23e3145a0ba47f8e8444c",
133
133
  "agents/scripts/integrations/registry.py": "ad2dc4de459a6f32a3673f397f7f38d3fa63a0aba36c9db19d7afafe58115ef0",
134
- "agents/scripts/integrations/universal_pm.py": "208f58d3d9177873cd57edc6091f574e9d39a62add6c64ee27e8cfbb851c0067",
134
+ "agents/scripts/integrations/universal_pm.py": "950bca49a1a1212ad9e3f63523a5289704b3b52c64f4892a66206c06e5fe0fd7",
135
135
  "agents/scripts/integrations/zoho_sprints/__init__.py": "40078f60a56d7446f282d727779e32efefd98458cd033b9af5bccdd3701139a7",
136
136
  "agents/scripts/integrations/zoho_sprints/integration.py": "61d0bd4a052eaa083974b9a28d6aa62d2678ca40bb46ba7397f51e4e3b18cd23",
137
137
  "agents/scripts/integrations/zoho_sprints/policy.py": "723bde1567fbe7c5d4f7ef2625d2b773bdfca2528402f397bc519fb2848a1c24",
138
138
  "agents/scripts/journey_runner.py": "0c9094747be9bb4d8e4c7ebb57858c945766db7451d4d825888f94a9c09e7570",
139
139
  "agents/scripts/lifecycle.py": "3ac9174aa76c394589371636540903101d4e23011e6dcc9ca576a7e4f88b4fce",
140
140
  "agents/scripts/logcat_doctor.py": "d4ca172f1a91bd35106023cf8212ddcbd2409207b306d589b1f5b48dc753524e",
141
- "agents/scripts/mutation_guard.py": "e0335c2949e81c7229a0257d984883dd189117ded22f528e55afc32b3a9fede6",
141
+ "agents/scripts/mutation_guard.py": "2d0809f3b213e172c2e165a311effff9984de25898fc24be64a0e5cd46154dc5",
142
142
  "agents/scripts/new_feature_scaffold.py": "804c8b1195e83030e7cc167ec140870a76bd2ca7cf2dbd8566b7b3a3124fa7fb",
143
143
  "agents/scripts/perf_guard.py": "4fa1f4d3394f650a75bb3b4a08a866b319f8f952979928c85d6f7c601e796333",
144
144
  "agents/scripts/phase_review.py": "36446026058a70958ff08cd08229dd23731a90026671bbc820135bdf5f483235",
@@ -173,7 +173,7 @@
173
173
  "agents/scripts/run_device.py": "4f1d5a799197f750b025ba4e101cd400ffa16a326cbe030751ef1f0fb065a919",
174
174
  "agents/scripts/run_gradle_task.py": "171406ee3bf36bf3bf7fcf5cf2cfa10205da416edf65f4bbe170d4e3da8dea41",
175
175
  "agents/scripts/run_tests_gate.py": "827fff7b404921f1e3bf7399c3d10b6c45ef2d000357d6c46e63f9d869782b3b",
176
- "agents/scripts/self_heal.py": "73541cb962b282279faeae0e1ba1abdb3c8f9a5a49f5cbdcd9c27b91d1ff3852",
176
+ "agents/scripts/self_heal.py": "7f2dbf1d01e4c3d0a65938ba47f92447b29cf56e18c993bff8be8a375f892512",
177
177
  "agents/scripts/setup_wizard.py": "2df1acd7368f6231fe4862e5abb7aa64838ad37493c637c30639b64274f1aaf9",
178
178
  "agents/scripts/skill_router.py": "dc12fb729419e8ce3ee990ccb3fe0b681931e65b16aad4e60337fb5e4ba4f8b8",
179
179
  "agents/scripts/task_base.py": "80638fd4224f4ad6f17b9ce371de7e613f6d4fdbdf7bd18dff31c46bba1d7f7c",
@@ -220,7 +220,7 @@
220
220
  "agents/tool-adapters/AGENTS.md.template": "76480cf043b82bcdf64381999ed4a1101deae46ea704f9d31f7deee01b79feb7",
221
221
  "agents/tool-adapters/CLAUDE.md.template": "011adc69ab7dbde774a373183850f769dc864058dffedb0f78364d0fc0fbd3b7",
222
222
  "agents/tool-adapters/CODEX.md.template": "0b2a7b9a5d990d0abd641970b3a07ad42fbad960f67629514ea7d2b73be8459e",
223
- "agents/tool-adapters/GEMINI.md.template": "99f858a19cb15f0aa837f528b5ba91e96e75a421a422c59e9e2cffc6e68e28ae",
223
+ "agents/tool-adapters/GEMINI.md.template": "b84142de56442d6dc2437b5700c6e0580c394139c360fdc39db71d00e88d44f2",
224
224
  "agents/tool-adapters/QWEN.md.template": "ce8e8380f3a13cace4f4ae1414272eba5f2be744ba96351aa5d3c9f286a658da",
225
225
  "agents/tool-adapters/README.md": "52fdd031b08d16eed1b0608b45b1f494176f5d49e82e48fd9b9028a4966f8109",
226
226
  "agents/tool-adapters/continue-android-harness.md.template": "5b8920658ac12c5746e5d06c3c2d35f61e84553021416189f0319984647533de",
@@ -1270,6 +1270,7 @@ class PmLifecycleTests(unittest.TestCase):
1270
1270
  "ready_delivery_snapshot_sha256": "deadbeef",
1271
1271
  }
1272
1272
  plan["plan_sha256"] = canonical_sha256(plan_payload(plan))
1273
+ plan["approval"]["plan_sha256"] = plan["plan_sha256"]
1273
1274
  save_plan(tdir / "plan.json", plan)
1274
1275
  save_stable_snapshot(self.repo, tid, "ready_for_delivery", plan=plan)
1275
1276
  snap = load_stable_snapshot(self.repo, tid, "ready_for_delivery")
@@ -1284,5 +1285,158 @@ class PmLifecycleTests(unittest.TestCase):
1284
1285
  self.assertEqual(3, healed_plan["review_calls_used"])
1285
1286
 
1286
1287
 
1288
+ class ReviewRegressionTests(unittest.TestCase):
1289
+ def test_incident_export_excludes_free_text_in_all_submission_paths(self):
1290
+ import incident_reporter as ir
1291
+ from urllib.parse import unquote_plus
1292
+ from types import SimpleNamespace
1293
+ secret = "customer@example.test +201012345678 PrivateCustomerName"
1294
+ with tempfile.TemporaryDirectory() as td:
1295
+ repo = Path(td)
1296
+ incident = ir.record_incident(repo, code=secret, command=secret,
1297
+ message=secret, extra={secret: secret}, heal_action=secret,
1298
+ task_state=secret, traceback_text="ValueError: " + secret, auto_submit=False)
1299
+ incident.update(host=secret, os=secret, incident_id=secret, created_at=secret,
1300
+ issue_url="https://example.test/?private=" + secret)
1301
+ self.assertNotIn("customer@example.test", ir.format_issue_markdown(incident))
1302
+ self.assertNotIn("PrivateCustomerName", unquote_plus(ir.build_github_issue_url(incident)))
1303
+ preview = ir.submit_incident_to_github(repo, incident, dry_run=True)
1304
+ self.assertNotIn("PrivateCustomerName", json.dumps(preview))
1305
+ with mock.patch.object(ir.shutil, "which", return_value="gh"), mock.patch.object(
1306
+ ir.subprocess, "run", side_effect=[SimpleNamespace(returncode=0, stdout="[]"),
1307
+ SimpleNamespace(returncode=0, stdout="https://github.com/example/issues/1")]) as run:
1308
+ ir.submit_incident_to_github(repo, incident)
1309
+ self.assertNotIn("PrivateCustomerName", str(run.call_args_list))
1310
+
1311
+ def test_snapshot_rejects_wrong_identity_schema_and_plan_hash(self):
1312
+ from self_heal import heal_task_state, load_stable_snapshot, save_stable_snapshot
1313
+ with tempfile.TemporaryDirectory() as td:
1314
+ repo = Path(td); tdir = repo / ".agents/state/tasks/task-a"
1315
+ plan = {"task_id": "task-a", "status": "CANCELLED", "requested_outcome": "test"}
1316
+ plan["plan_sha256"] = canonical_sha256(plan_payload(plan))
1317
+ save_plan(tdir / "plan.json", plan)
1318
+ self.assertIsNotNone(save_stable_snapshot(repo, "task-a", "cancelled"))
1319
+ good = load_stable_snapshot(repo, "task-a")
1320
+ self.assertIsNotNone(good)
1321
+ for mutate in (lambda x: x.update(task_id="task-b"),
1322
+ lambda x: x["plan"].update(task_id="task-b"),
1323
+ lambda x: x.update(schema_version=99),
1324
+ lambda x: x["plan"].update(requested_outcome="different")):
1325
+ bad = json.loads(json.dumps(good)); mutate(bad)
1326
+ atomic_write_json(tdir / "snapshots/stable-latest.json", bad)
1327
+ (tdir / "plan.json").write_text("{broken", encoding="utf-8")
1328
+ self.assertIsNone(load_stable_snapshot(repo, "task-a"))
1329
+ self.assertEqual("UNRECOVERABLE", heal_task_state(repo, "task-a")["status"])
1330
+ self.assertEqual("{broken", (tdir / "plan.json").read_text())
1331
+ self.assertIsNone(load_stable_snapshot(repo, "task-a", "../../../escape"))
1332
+ atomic_write_json(tdir / "snapshots/stable-latest.json", good)
1333
+ with mock.patch("incident_reporter.record_incident"):
1334
+ self.assertEqual("HEALED", heal_task_state(repo, "task-a")["status"])
1335
+ self.assertEqual("task-a", read_json(tdir / "plan.json")["task_id"])
1336
+
1337
+ def test_snapshot_requires_bound_approval_and_run_identity(self):
1338
+ from self_heal import save_stable_snapshot, load_stable_snapshot
1339
+ with tempfile.TemporaryDirectory() as td:
1340
+ repo = Path(td)
1341
+ plan = {"task_id": "task", "status": "IMPLEMENTING", "requested_outcome": "test",
1342
+ "execution_nonce": "nonce", "approval": {"single_use_nonce": "nonce"}}
1343
+ plan["plan_sha256"] = canonical_sha256(plan_payload(plan))
1344
+ self.assertIsNone(save_stable_snapshot(repo, "task", "implementing", plan=plan))
1345
+ plan["approval"]["plan_sha256"] = plan["plan_sha256"]
1346
+ self.assertIsNotNone(save_stable_snapshot(repo, "task", "implementing", plan=plan))
1347
+ self.assertIsNone(save_stable_snapshot(repo, "task", "implementing", plan=plan,
1348
+ current_run={"task_id": "other"}))
1349
+ self.assertIsNotNone(load_stable_snapshot(repo, "task"))
1350
+ plan["execution_nonce"] = "wrong"
1351
+ self.assertIsNone(save_stable_snapshot(repo, "task", "implementing", plan=plan))
1352
+
1353
+ def test_legacy_incident_url_is_rebuilt_on_load(self):
1354
+ import incident_reporter as ir
1355
+ with tempfile.TemporaryDirectory() as td:
1356
+ repo = Path(td)
1357
+ (repo / ".agents").mkdir()
1358
+ incident = ir.record_incident(repo, code="MANUAL_REPORT", command="test", auto_submit=False)
1359
+ incident["issue_url"] = "https://github.com/issues/new?body=private-customer"
1360
+ incident["message"] = "private-customer"
1361
+ atomic_write_json(repo / ".agents/state/incidents" / (incident["incident_id"] + ".json"), incident)
1362
+ for identifier in (None, incident["incident_id"]):
1363
+ self.assertNotIn("private-customer", ir.load_incident(repo, identifier)["issue_url"])
1364
+
1365
+ def test_pm_nested_named_terminal_states_and_provider_issue_names(self):
1366
+ from integrations.universal_pm import UniversalPmIntegration
1367
+ pm = UniversalPmIntegration()
1368
+ for container in ({"status_name": "Done"}, {"transition_name": "Closed"},
1369
+ {"status": {"name": "Done"}}, {"state": {"name": "Closed"}},
1370
+ {"fields": {"state": "Resolved"}}, {"fields": {"transition": {"name": "Done"}}}):
1371
+ with self.subTest(container=container):
1372
+ self.assertFalse(pm.validate_pm_mutation("jira", "update_issue", container, {}, {})[0])
1373
+ self.assertTrue(pm.validate_pm_mutation("jira", "update_issue", container, {}, {"allow_close": True})[0])
1374
+ for tool in ("editJiraIssue", "jira_update_issue", "linear_update_issue"):
1375
+ self.assertFalse(pm.validate_pm_mutation("jira", tool, {"fields": {"description": ""}}, {}, {})[0])
1376
+ self.assertTrue(pm.validate_pm_mutation("jira", "create_issue", {"description": ""}, {}, {})[0])
1377
+
1378
+ def test_pm_rejects_opaque_status_ids_and_empty_description(self):
1379
+ from integrations.universal_pm import UniversalPmIntegration
1380
+ pm = UniversalPmIntegration()
1381
+ for args in ({"transition": {"id": "31"}}, {"transition": {"id": "31", "name": "In Progress"}},
1382
+ {"status_id": "31"}, {"stateId": "abc-123"}, {"status": 31},
1383
+ {"fields": {"status": {"id": "31"}}}):
1384
+ with self.subTest(args=args):
1385
+ self.assertFalse(pm.validate_pm_mutation("jira", "transition_issue", args, {}, {"allow_close": False})[0])
1386
+ self.assertTrue(pm.validate_pm_mutation("jira", "transition_issue", args, {}, {"allow_close": True})[0])
1387
+ for value in ("", None, {}, []):
1388
+ for args in ({"description": value}, {"fields": {"description": value}}):
1389
+ self.assertFalse(pm.validate_pm_mutation("jira", "update_issue", args, {}, {"allow_close": True})[0])
1390
+ self.assertTrue(pm.validate_pm_mutation("jira", "add_comment", {"body": "test"}, {}, {})[0])
1391
+ self.assertTrue(pm.validate_pm_mutation("jira", "update_issue", {"status": "In Progress"}, {}, {})[0])
1392
+
1393
+ def test_incident_local_markdown_zero_pii_and_consent_flow_by_default(self):
1394
+ import incident_reporter as ir
1395
+ secret_msg = "Crash for user alice@example.com phone +201099887766 ip 192.168.1.55 at C:\\Users\\alice\\Project\\Main.kt"
1396
+ with tempfile.TemporaryDirectory() as td:
1397
+ repo = Path(td)
1398
+ (repo / ".agents").mkdir()
1399
+ self.assertFalse(ir.is_auto_submit_enabled(repo))
1400
+ inc = ir.record_incident(
1401
+ repo,
1402
+ code="UNEXPECTED_EXCEPTION",
1403
+ command="workflow.py status",
1404
+ message=secret_msg,
1405
+ traceback_text="NameError: " + secret_msg,
1406
+ )
1407
+ self.assertEqual("RECORDED", inc["status"])
1408
+ self.assertNotIn("submission", inc)
1409
+ self.assertIn("ask_question_guidance", inc)
1410
+ md_path = repo / ".agents" / "state" / "incidents" / f"{inc['incident_id']}.md"
1411
+ self.assertTrue(md_path.is_file())
1412
+ md_text = md_path.read_text(encoding="utf-8")
1413
+ self.assertNotIn("alice@example.com", md_text)
1414
+ self.assertNotIn("201099887766", md_text)
1415
+ self.assertNotIn("192.168.1.55", md_text)
1416
+ self.assertNotIn("C:\\Users\\alice", md_text)
1417
+ self.assertIn("<REDACTED_EMAIL>", md_text)
1418
+ pref = ir.set_auto_submit_preference(repo, True)
1419
+ self.assertTrue(pref["auto_submit_incidents"])
1420
+ self.assertTrue(ir.is_auto_submit_enabled(repo))
1421
+
1422
+ def test_router_next_delivery_splits_approach_without_name_error(self):
1423
+ from _workflow import router as r_mod
1424
+ with tempfile.TemporaryDirectory() as td:
1425
+ repo = Path(td)
1426
+ plan = {
1427
+ "task_id": "t-deliv",
1428
+ "status": "READY_FOR_DELIVERY",
1429
+ "requested_outcome": "Apply string contract",
1430
+ "approach": "Update string parser; add fallback handling.\nVerify Arabic strings",
1431
+ "expected_files": ["app/src/main/Strings.kt"],
1432
+ }
1433
+ with mock.patch.object(r_mod._engine, "build_manifest", return_value={"delivery_snapshot_sha256": ""}), \
1434
+ mock.patch.object(r_mod._engine, "_ready_external_inputs_changed", return_value=False), \
1435
+ mock.patch.object(r_mod._engine, "_find_uncommitted_task_files", return_value=["app/src/main/Strings.kt"]):
1436
+ res = r_mod._next_delivery(repo, "t-deliv", plan, "antigravity", "--repo . --task-id t-deliv", "", "READY_FOR_DELIVERY", {})
1437
+ self.assertEqual("DEVELOPER_GIT_COMMIT_REQUIRED", res["code"])
1438
+ self.assertIn("- Update string parser.", res["suggested_commit_block"])
1439
+
1440
+
1287
1441
  if __name__ == "__main__":
1288
1442
  unittest.main(verbosity=2)
@@ -97,7 +97,7 @@ PUBLIC_COMMANDS: list[dict[str, Any]] = [
97
97
  "description": "Prepare a universal functional QA report and MCP call recipe for any discovered PM provider."},
98
98
  {"command": "report-issue", "read_only": False,
99
99
  "valid_states": ["ANY"], "required_inputs": [], "model_facing": True,
100
- "description": "List, record, or submit sanitized Zero-PII harness incident reports to GitHub Issues."},
100
+ "description": "Inspect local incident diagnostics or submit allowlisted metadata to GitHub Issues."},
101
101
  {"command": "task merge", "read_only": False,
102
102
  "valid_states": ["AWAITING_DEVELOPER_APPROVAL"],
103
103
  "required_inputs": ["task_id", "from_task_id"], "model_facing": True,
@@ -4025,6 +4025,44 @@ def main(argv: list[str] | None = None) -> int:
4025
4025
  return 1
4026
4026
  print(f"[FAIL] {exc}", file=sys.stderr)
4027
4027
  return 1
4028
+ except Exception as exc:
4029
+ import traceback
4030
+ tb_text = traceback.format_exc()
4031
+ repo_path = Path(getattr(args, "repo", ".") or ".").resolve()
4032
+ t_id = str(getattr(args, "task_id", "") or "")
4033
+ t_state = ""
4034
+ try:
4035
+ if t_id:
4036
+ t_state = str(_load_plan(repo_path, t_id).get("status") or "")
4037
+ except (OSError, ValueError, ValidationError):
4038
+ t_state = ""
4039
+ try:
4040
+ from incident_reporter import record_incident
4041
+ inc = record_incident(
4042
+ repo_path,
4043
+ code="UNEXPECTED_EXCEPTION",
4044
+ command=f"workflow.py {getattr(args, 'action', '')}",
4045
+ message=f"{type(exc).__name__}: {exc}",
4046
+ task_id=t_id,
4047
+ task_state=t_state,
4048
+ traceback_text=tb_text,
4049
+ )
4050
+ inc_id = inc.get("incident_id", "")
4051
+ guidance = inc.get("ask_question_guidance") or {}
4052
+ sub = inc.get("submission") or {}
4053
+ print(f"[FAIL] Unexpected harness exception ({type(exc).__name__}: {exc})", file=sys.stderr)
4054
+ print(f"INCIDENT_RECORDED={inc_id}", file=sys.stderr)
4055
+ print(f"INCIDENT_LOCAL_REPORT=.agents/state/incidents/{inc_id}.md", file=sys.stderr)
4056
+ if sub.get("status") in {"REPORTED", "DEDUPLICATED_EXISTING_ISSUE"}:
4057
+ print(f"INCIDENT_AUTO_SUBMITTED={sub.get('issue_url', '')}", file=sys.stderr)
4058
+ elif guidance:
4059
+ print("TOOL_CALL_REQUIRED=ask_question", file=sys.stderr)
4060
+ print(f"INCIDENT_SUBMIT_ONCE={guidance.get('submit_once_command', '')}", file=sys.stderr)
4061
+ print(f"INCIDENT_SUBMIT_ALWAYS={guidance.get('submit_always_command', '')}", file=sys.stderr)
4062
+ print(f"NEXT_INSTRUCTIONS={guidance.get('instructions', '')}", file=sys.stderr)
4063
+ except Exception:
4064
+ print(tb_text, file=sys.stderr)
4065
+ return 1
4028
4066
  if args.action == "prepare-verification":
4029
4067
  print(f"HARNESS_RUN_ID={result['run_id']}")
4030
4068
  print(f"HARNESS_DELIVERY_SNAPSHOT={result['delivery_snapshot_sha256']}")
@@ -2,6 +2,7 @@
2
2
  from __future__ import annotations
3
3
 
4
4
  from pathlib import Path
5
+ import re
5
6
  from typing import Any
6
7
 
7
8
  from . import engine as _engine