forge-autonomy 2.3.2__tar.gz → 2.7.20__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 (300) hide show
  1. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/PKG-INFO +92 -1
  2. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/README.md +91 -0
  3. forge_autonomy-2.7.20/forge/__main__.py +202 -0
  4. forge_autonomy-2.7.20/forge/completion/__init__.py +6 -0
  5. forge_autonomy-2.7.20/forge/completion/mission.py +120 -0
  6. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/execution/loop.py +298 -29
  7. forge_autonomy-2.7.20/forge/execution_host_configuration.py +793 -0
  8. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/governance_authority.py +88 -10
  9. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/models/__init__.py +38 -0
  10. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/models/action_derivation.py +74 -5
  11. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/models/execution_host.py +39 -3
  12. forge_autonomy-2.7.20/forge/models/mission_completion.py +195 -0
  13. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/models/mission_planner.py +23 -1
  14. forge_autonomy-2.7.20/forge/models/producer.py +528 -0
  15. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/operator_identity.py +1 -0
  16. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/planner/__init__.py +24 -1
  17. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/planner/action_derivation.py +103 -5
  18. forge_autonomy-2.7.20/forge/planner/codex_cli_session.py +703 -0
  19. forge_autonomy-2.7.20/forge/planner/durable_derivation.py +864 -0
  20. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/planner/openai_responses.py +80 -18
  21. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/planner/provider_adapter.py +12 -1
  22. forge_autonomy-2.7.20/forge/provider_security.py +287 -0
  23. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/qualification/bootstrap_sequence.py +24 -3
  24. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/qualification/installed_smoke.py +11 -0
  25. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/runtime/__init__.py +2 -1
  26. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/runtime/bootstrap.py +64 -6
  27. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/runtime/database.py +1439 -18
  28. forge_autonomy-2.7.20/forge/runtime/dynamic_mission.py +814 -0
  29. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/runtime/runner.py +257 -19
  30. forge_autonomy-2.7.20/forge/scheduler/ep_http_adapter.py +825 -0
  31. forge_autonomy-2.7.20/forge/scheduler/ep_v12.py +452 -0
  32. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/scheduler/scheduler.py +6 -3
  33. forge_autonomy-2.7.20/forge/schemas/engineering-platform-peer-configuration-1.0.schema.json +62 -0
  34. forge_autonomy-2.7.20/forge/schemas/engineering-platform-peer-configuration-1.1.schema.json +64 -0
  35. forge_autonomy-2.7.20/forge/secure_store.py +432 -0
  36. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/state/mission_state.py +126 -13
  37. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge_autonomy.egg-info/PKG-INFO +92 -1
  38. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge_autonomy.egg-info/SOURCES.txt +29 -0
  39. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/product-version.json +1 -1
  40. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_action_derivation.py +77 -4
  41. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_action_derivation_canary_closure.py +2 -2
  42. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_action_derivation_evidence.py +2 -0
  43. forge_autonomy-2.7.20/tests/test_adaptive_action_sizing_design.py +119 -0
  44. forge_autonomy-2.7.20/tests/test_aggregate_health_roadmap.py +49 -0
  45. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_ai_development_projection.py +1 -1
  46. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_bootstrap_mission_runner.py +1 -0
  47. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_bootstrap_mission_scheduler.py +23 -0
  48. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_canonical_data_root.py +9 -0
  49. forge_autonomy-2.7.20/tests/test_codex_cli_session.py +403 -0
  50. forge_autonomy-2.7.20/tests/test_durable_action_derivation.py +663 -0
  51. forge_autonomy-2.7.20/tests/test_dynamic_mission_capability.py +384 -0
  52. forge_autonomy-2.7.20/tests/test_ep_http_adapter.py +989 -0
  53. forge_autonomy-2.7.20/tests/test_execution_host_configuration.py +458 -0
  54. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_execution_loop.py +29 -4
  55. forge_autonomy-2.7.20/tests/test_forge_console_admin_parity_contract.py +123 -0
  56. forge_autonomy-2.7.20/tests/test_forge_console_configuration_contract.py +93 -0
  57. forge_autonomy-2.7.20/tests/test_forge_console_hosting_contract.py +146 -0
  58. forge_autonomy-2.7.20/tests/test_forge_operations_console_roadmap.py +129 -0
  59. forge_autonomy-2.7.20/tests/test_forge_outer_loop_ci_roadmap.py +95 -0
  60. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_governance_authority.py +116 -0
  61. forge_autonomy-2.7.20/tests/test_inner_loop_ci_contract.py +167 -0
  62. forge_autonomy-2.7.20/tests/test_installed_dynamic_mission_runtime.py +576 -0
  63. forge_autonomy-2.7.20/tests/test_live_project_roadmap_contract.py +96 -0
  64. forge_autonomy-2.7.20/tests/test_mission_completion_evaluator.py +106 -0
  65. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_openai_action_derivation.py +16 -1
  66. forge_autonomy-2.7.20/tests/test_producer_contract.py +184 -0
  67. forge_autonomy-2.7.20/tests/test_production_release_workflow.py +329 -0
  68. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_provider_security.py +1 -1
  69. forge_autonomy-2.7.20/tests/test_release_operation.py +199 -0
  70. forge_autonomy-2.7.20/tests/test_role_aware_conversations_contract.py +85 -0
  71. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_runtime_database.py +104 -0
  72. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_runtime_evidence.py +13 -0
  73. forge_autonomy-2.7.20/tests/test_runtime_status_projection.py +73 -0
  74. forge_autonomy-2.7.20/tests/test_secure_store.py +199 -0
  75. forge_autonomy-2.3.2/forge/__main__.py +0 -63
  76. forge_autonomy-2.3.2/forge/completion/__init__.py +0 -5
  77. forge_autonomy-2.3.2/forge/models/producer.py +0 -164
  78. forge_autonomy-2.3.2/forge/provider_security.py +0 -210
  79. forge_autonomy-2.3.2/forge/scheduler/ep_http_adapter.py +0 -231
  80. forge_autonomy-2.3.2/forge/scheduler/ep_v12.py +0 -182
  81. forge_autonomy-2.3.2/tests/test_ep_http_adapter.py +0 -183
  82. forge_autonomy-2.3.2/tests/test_producer_contract.py +0 -69
  83. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/MANIFEST.in +0 -0
  84. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/__init__.py +0 -0
  85. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/_version.py +0 -0
  86. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/action_derivation_canary_closure.py +0 -0
  87. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/action_derivation_evidence.py +0 -0
  88. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/action_derivation_qualification.py +0 -0
  89. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/action_derivation_reattempt.py +0 -0
  90. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/ai_architect/__init__.py +0 -0
  91. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/ai_architect/provider_registry.py +0 -0
  92. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/architecture/__init__.py +0 -0
  93. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/architecture/advisor.py +0 -0
  94. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/architecture/presentation.py +0 -0
  95. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/architecture/workspace.py +0 -0
  96. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/autonomous_orchestrator.py +0 -0
  97. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/business/__init__.py +0 -0
  98. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/business/advisor.py +0 -0
  99. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/business/ingress.py +0 -0
  100. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/business/presentation.py +0 -0
  101. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/business/workspace.py +0 -0
  102. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/canary.py +0 -0
  103. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/capabilities/__init__.py +0 -0
  104. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/capabilities/delegation.py +0 -0
  105. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/completion/assessor.py +0 -0
  106. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/constitutional/__init__.py +0 -0
  107. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/constitutional/assessor.py +0 -0
  108. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/core/__init__.py +0 -0
  109. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/core/json_store.py +0 -0
  110. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/decision_evidence/__init__.py +0 -0
  111. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/decision_evidence/repository.py +0 -0
  112. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/dispatcher/__init__.py +0 -0
  113. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/dispatcher/dispatcher.py +0 -0
  114. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/execution/__init__.py +0 -0
  115. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/execution/presentation.py +0 -0
  116. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/foundation/__init__.py +0 -0
  117. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/foundation/loader.py +0 -0
  118. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/generation_two.py +0 -0
  119. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/generation_two_execution.py +0 -0
  120. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/governance/__init__.py +0 -0
  121. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/governance/execution_policy.py +0 -0
  122. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/governance/profiles.py +0 -0
  123. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/intake.py +0 -0
  124. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/integration/__init__.py +0 -0
  125. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/integration/coordinator.py +0 -0
  126. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/integration/repository.py +0 -0
  127. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/knowledge/__init__.py +0 -0
  128. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/knowledge/consumer.py +0 -0
  129. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/knowledge/registry.py +0 -0
  130. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/lifecycle/__init__.py +0 -0
  131. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/lifecycle/store.py +0 -0
  132. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/mission_amendment.py +0 -0
  133. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/mission_scheduler.py +0 -0
  134. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/models/action.py +0 -0
  135. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/models/agent_policy.py +0 -0
  136. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/models/ai_architect_provider.py +0 -0
  137. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/models/ai_architect_session.py +0 -0
  138. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/models/ai_provider_registry.py +0 -0
  139. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/models/architecture_mission.py +0 -0
  140. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/models/architecture_reasoning.py +0 -0
  141. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/models/architecture_review.py +0 -0
  142. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/models/codex_runtime_prompt.py +0 -0
  143. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/models/constitutional_validation.py +0 -0
  144. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/models/decision_evidence.py +0 -0
  145. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/models/foundation.py +0 -0
  146. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/models/historical_intent.py +0 -0
  147. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/models/integration.py +0 -0
  148. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/models/intent.py +0 -0
  149. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/models/intent_authoring.py +0 -0
  150. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/models/mission.py +0 -0
  151. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/models/mission_candidate.py +0 -0
  152. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/models/mission_recommendation.py +0 -0
  153. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/models/phase_completion.py +0 -0
  154. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/models/planning.py +0 -0
  155. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/models/prompt_artifact.py +0 -0
  156. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/models/proposal.py +0 -0
  157. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/models/runtime_prompt.py +0 -0
  158. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/models/solution_template.py +0 -0
  159. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/planner/engine.py +0 -0
  160. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/planning/__init__.py +0 -0
  161. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/planning/loader.py +0 -0
  162. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/planning/registry.py +0 -0
  163. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/portfolio_intelligence.py +0 -0
  164. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/programme_authorization.py +0 -0
  165. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/prompts/__init__.py +0 -0
  166. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/prompts/codex_cli.py +0 -0
  167. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/prompts/generator.py +0 -0
  168. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/proposals/__init__.py +0 -0
  169. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/proposals/generator.py +0 -0
  170. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/qualification/__init__.py +0 -0
  171. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/qualification/generation_one.py +0 -0
  172. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/recommendations/__init__.py +0 -0
  173. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/recommendations/engine.py +0 -0
  174. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/repository_truth.py +0 -0
  175. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/review/__init__.py +0 -0
  176. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/review/engine.py +0 -0
  177. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/runtime/data_root.py +0 -0
  178. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/runtime/evidence.py +0 -0
  179. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/runtime/execution_context.py +0 -0
  180. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/runtime/service.py +0 -0
  181. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/scheduler/__init__.py +0 -0
  182. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/scheduler/adapter.py +0 -0
  183. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/schemas/capability-registry-1.0.schema.json +0 -0
  184. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/schemas/capability.schema.json +0 -0
  185. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/schemas/common.schema.json +0 -0
  186. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/schemas/decision-evidence-1.0.schema.json +0 -0
  187. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/schemas/engineering-goal-0.5.schema.json +0 -0
  188. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/schemas/engineering-increment-proposal-0.5.schema.json +0 -0
  189. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/schemas/engineering-mode.schema.json +0 -0
  190. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/schemas/engineering-plan-0.5.schema.json +0 -0
  191. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/schemas/engineering-prompt-artifact-0.7.schema.json +0 -0
  192. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/schemas/engineering-proposal-0.6.schema.json +0 -0
  193. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/schemas/evidence-reference-0.5.schema.json +0 -0
  194. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/schemas/foundation-document.schema.json +0 -0
  195. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/schemas/governance-profile.schema.json +0 -0
  196. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/schemas/knowledge-source-0.4.schema.json +0 -0
  197. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/schemas/knowledge-source.schema.json +0 -0
  198. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/schemas/mission-candidate-1.0.schema.json +0 -0
  199. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/schemas/mission-candidate-1.1.schema.json +0 -0
  200. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/schemas/phase-completion-1.0.schema.json +0 -0
  201. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/schemas/planning-document-0.5.schema.json +0 -0
  202. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/schemas/repository-catalog.schema.json +0 -0
  203. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/schemas/repository.schema.json +0 -0
  204. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/schemas/solution-template-1.0.schema.json +0 -0
  205. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/schemas/workspace.schema.json +0 -0
  206. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/solutions/__init__.py +0 -0
  207. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/solutions/catalogue.py +0 -0
  208. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/solutions/generator.py +0 -0
  209. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/state/__init__.py +0 -0
  210. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge/workspace/__init__.py +0 -0
  211. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge_autonomy.egg-info/dependency_links.txt +0 -0
  212. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge_autonomy.egg-info/entry_points.txt +0 -0
  213. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/forge_autonomy.egg-info/top_level.txt +0 -0
  214. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/pyproject.toml +0 -0
  215. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/schemas/capability-registry-1.0.schema.json +0 -0
  216. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/schemas/capability.schema.json +0 -0
  217. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/schemas/common.schema.json +0 -0
  218. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/schemas/decision-evidence-1.0.schema.json +0 -0
  219. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/schemas/engineering-goal-0.5.schema.json +0 -0
  220. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/schemas/engineering-increment-proposal-0.5.schema.json +0 -0
  221. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/schemas/engineering-mode.schema.json +0 -0
  222. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/schemas/engineering-plan-0.5.schema.json +0 -0
  223. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/schemas/engineering-prompt-artifact-0.7.schema.json +0 -0
  224. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/schemas/engineering-proposal-0.6.schema.json +0 -0
  225. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/schemas/evidence-reference-0.5.schema.json +0 -0
  226. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/schemas/foundation-document.schema.json +0 -0
  227. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/schemas/governance-profile.schema.json +0 -0
  228. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/schemas/knowledge-source-0.4.schema.json +0 -0
  229. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/schemas/knowledge-source.schema.json +0 -0
  230. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/schemas/mission-candidate-1.0.schema.json +0 -0
  231. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/schemas/mission-candidate-1.1.schema.json +0 -0
  232. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/schemas/phase-completion-1.0.schema.json +0 -0
  233. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/schemas/planning-document-0.5.schema.json +0 -0
  234. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/schemas/repository-catalog.schema.json +0 -0
  235. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/schemas/repository.schema.json +0 -0
  236. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/schemas/solution-template-1.0.schema.json +0 -0
  237. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/schemas/workspace.schema.json +0 -0
  238. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/setup.cfg +0 -0
  239. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_action_derivation_qualification.py +0 -0
  240. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_agent_policy.py +0 -0
  241. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_ai_architect_provider.py +0 -0
  242. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_ai_architect_session.py +0 -0
  243. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_ai_provider_registry.py +0 -0
  244. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_architecture_reasoning.py +0 -0
  245. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_architecture_review_engine.py +0 -0
  246. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_architecture_workspace.py +0 -0
  247. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_autonomous_orchestrator.py +0 -0
  248. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_bootstrap_adapter.py +0 -0
  249. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_bootstrap_mission_canary.py +0 -0
  250. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_bootstrap_sequence_qualification.py +0 -0
  251. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_business_governance_ingress.py +0 -0
  252. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_business_workspace.py +0 -0
  253. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_capability_delegation.py +0 -0
  254. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_codex_cli_runtime_prompt.py +0 -0
  255. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_constitutional_validation.py +0 -0
  256. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_decision_evidence.py +0 -0
  257. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_default_project_quality_policy.py +0 -0
  258. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_distribution_identity.py +0 -0
  259. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_engineering_action_architecture.py +0 -0
  260. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_engineering_intent_authoring.py +0 -0
  261. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_engineering_intent_lifecycle.py +0 -0
  262. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_engineering_mission.py +0 -0
  263. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_engineering_planning.py +0 -0
  264. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_engineering_prompt_artifacts.py +0 -0
  265. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_engineering_proposals.py +0 -0
  266. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_execution_context.py +0 -0
  267. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_execution_host_contract.py +0 -0
  268. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_forge_v1_bootstrap_scheduler_contract.py +0 -0
  269. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_forge_v1_implementation_dag.py +0 -0
  270. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_foundation_loader.py +0 -0
  271. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_foundation_models.py +0 -0
  272. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_generation_one_bootstrap_qualification.py +0 -0
  273. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_generation_two_execution.py +0 -0
  274. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_generation_two_mission_intake.py +0 -0
  275. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_governed_coverage.py +0 -0
  276. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_historical_engineering_intent.py +0 -0
  277. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_integration_coordination.py +0 -0
  278. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_knowledge_consumption.py +0 -0
  279. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_mission_dispatcher.py +0 -0
  280. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_mission_planner.py +0 -0
  281. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_mission_recommendation_engine.py +0 -0
  282. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_mission_recommendation_lifecycle.py +0 -0
  283. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_mission_runtime_projection.py +0 -0
  284. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_mission_runtime_scheduler.py +0 -0
  285. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_mission_state_store.py +0 -0
  286. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_operator_identity.py +0 -0
  287. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_phase_completion.py +0 -0
  288. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_platform_contract_documents.py +0 -0
  289. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_portfolio_intelligence_operation.py +0 -0
  290. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_product_version_operations.py +0 -0
  291. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_productization_reconciliation.py +0 -0
  292. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_programme_authorization.py +0 -0
  293. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_repository_truth.py +0 -0
  294. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_runtime_bootstrap.py +0 -0
  295. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_runtime_instance_persistence.py +0 -0
  296. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_runtime_prompt_generation.py +0 -0
  297. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_runtime_service.py +0 -0
  298. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_scheduler_dependency_boundary.py +0 -0
  299. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_schemas.py +0 -0
  300. {forge_autonomy-2.3.2 → forge_autonomy-2.7.20}/tests/test_solution_templates.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: forge-autonomy
3
- Version: 2.3.2
3
+ Version: 2.7.20
4
4
  Summary: Forge mission planning, producer contracts, and evidence interpretation runtime.
5
5
  Author: Forge maintainers
6
6
  License-Expression: Apache-2.0
@@ -32,6 +32,97 @@ forge --version
32
32
  qualification verify that its value equals the wheel metadata and installed
33
33
  CLI version; a package build never allocates or changes a version.
34
34
 
35
+ ## Engineering Platform peer configuration
36
+
37
+ Forge provides one explicit, durable configuration route for its selected
38
+ Engineering Platform Execution Host peer. Initialize the chosen Forge data
39
+ root first, then configure only already-issued identities and an opaque macOS
40
+ Keychain reference:
41
+
42
+ ```text
43
+ forge --data-root "/path/to/Forge Server" server init
44
+ forge --data-root "/path/to/Forge Server" execution-host configure \
45
+ --binding-id ep-primary \
46
+ --endpoint https://ep.example.invalid \
47
+ --expected-instance-id ep-instance-1 \
48
+ --host-id engineering-platform \
49
+ --project-id forge-project \
50
+ --repository-id forge-repository \
51
+ --repository-identity forge-source \
52
+ --credential-reference keychain://forge.ep/consumer \
53
+ --operator-id local-admin
54
+ forge --data-root "/path/to/Forge Server" execution-host show
55
+ forge --data-root "/path/to/Forge Server" execution-host preflight
56
+ ```
57
+
58
+ `--repository-id` is the EP repository ID. `--repository-identity` is the
59
+ Forge-side identity that every `ExecutionRequest.repository_identity` must
60
+ repeat (legacy callers default it to their repository ID). No project,
61
+ repository, consumer credential, Mission, grant, or submission is created by
62
+ these commands.
63
+
64
+ The only supported credential-reference backend is macOS Keychain generic
65
+ password lookup. Its exact form is
66
+ `keychain://<service>/<account>?namespace=<optional>&version=<optional>`; the
67
+ query values are reference metadata and lookup remains fixed to the explicit
68
+ service/account pair. Put the bearer value in that Keychain item through the
69
+ operator's normal Keychain administration, never on the Forge command line.
70
+ Forge persists and prints the reference, never its value. Unknown schemes,
71
+ missing items, unavailable or access-denied Keychain state fail closed without
72
+ credential discovery or fallback.
73
+
74
+ ### Explicit first Keychain access
75
+
76
+ Before a full EP peer binding exists, a local administrator can explicitly ask
77
+ macOS to perform exactly one read of one already-known credential reference:
78
+
79
+ ```text
80
+ forge execution-host credential-access \
81
+ --interactive \
82
+ --credential-reference keychain://forge.ep/consumer
83
+ ```
84
+
85
+ This is a bounded access-setup action, not general onboarding: it does not
86
+ initialize a data root, create or modify a peer binding, issue an EP
87
+ credential, create a grant, configure a provider, or submit any work. The
88
+ reference is validated before the one existing Keychain reader is called. The
89
+ `--interactive` opt-in is mandatory; without it Forge never asks macOS and
90
+ does not retry or fall back to an interactive read.
91
+
92
+ The setup read waits for at most 120 seconds (adjustable downward with
93
+ `--timeout-seconds`). Forge tells the local user that macOS may ask for
94
+ Keychain access by `/usr/bin/security`, which is the executable that actually
95
+ requests this read. That macOS decision is not a cryptographically
96
+ Forge-exclusive permission; Forge neither automates the prompt nor changes
97
+ Keychain ACLs, partition lists, search domains, entitlements, or signing.
98
+ The command returns only a status and redacted diagnostic, never credential
99
+ material.
100
+
101
+ Normal installed runtime resolution remains a separate, short 5-second read.
102
+ It never increases its timeout, retries, chooses another Keychain item, or
103
+ switches itself to interactive mode. `TIMEOUT` means only that the Keychain
104
+ subprocess did not finish within its bound; it does not by itself prove denial,
105
+ an open prompt, a missing Keychain, or an entitlement problem. Diagnostics
106
+ distinguish `TIMEOUT`, `PROCESS_START_FAILED`, `MISSING`, `ACCESS_DENIED`, and
107
+ `COMMAND_FAILED`, while all non-resolvable states fail closed. A successful
108
+ `INTERACTIVE_CREDENTIAL_READ_SUCCEEDED` result does not claim that a fresh
109
+ normal process can read the item or that EP authentication succeeded; those
110
+ are separate proofs.
111
+
112
+ HTTPS uses normal certificate validation. Plain HTTP requires both a loopback
113
+ origin and `--allow-loopback-http`. URL credentials, paths, queries, fragments,
114
+ redirects, unbounded timeouts, discovery and retargeting are rejected. To
115
+ replace a binding, repeat `configure` with `--replace` plus both the current
116
+ `--expected-revision` and `--expected-digest` from `show`; identical writes are
117
+ idempotent. `show`, `status`, and `preflight` do not initialize or migrate
118
+ storage. Preflight performs only authenticated
119
+ `GET /v1/producer-compatibility`, verifies product, exact instance ID, and the
120
+ explicit `1.2` readback and `1.4` terminal-evidence contracts, and reports project/repository and
121
+ mutation authority as `NOT_VERIFIED` because that route does not prove them.
122
+ The exact instance-ID comparison is consistency evidence, not a newly invented
123
+ cryptographic peer identity; preflight reports the latter as `NOT_ASSERTED`.
124
+ `CONFIGURED` is therefore never presented as `LIVE_READY`.
125
+
35
126
  ## Managed repository status
36
127
 
37
128
  Forge is the first-class repository [`pcvantol/forge`](https://github.com/pcvantol/forge),
@@ -15,6 +15,97 @@ forge --version
15
15
  qualification verify that its value equals the wheel metadata and installed
16
16
  CLI version; a package build never allocates or changes a version.
17
17
 
18
+ ## Engineering Platform peer configuration
19
+
20
+ Forge provides one explicit, durable configuration route for its selected
21
+ Engineering Platform Execution Host peer. Initialize the chosen Forge data
22
+ root first, then configure only already-issued identities and an opaque macOS
23
+ Keychain reference:
24
+
25
+ ```text
26
+ forge --data-root "/path/to/Forge Server" server init
27
+ forge --data-root "/path/to/Forge Server" execution-host configure \
28
+ --binding-id ep-primary \
29
+ --endpoint https://ep.example.invalid \
30
+ --expected-instance-id ep-instance-1 \
31
+ --host-id engineering-platform \
32
+ --project-id forge-project \
33
+ --repository-id forge-repository \
34
+ --repository-identity forge-source \
35
+ --credential-reference keychain://forge.ep/consumer \
36
+ --operator-id local-admin
37
+ forge --data-root "/path/to/Forge Server" execution-host show
38
+ forge --data-root "/path/to/Forge Server" execution-host preflight
39
+ ```
40
+
41
+ `--repository-id` is the EP repository ID. `--repository-identity` is the
42
+ Forge-side identity that every `ExecutionRequest.repository_identity` must
43
+ repeat (legacy callers default it to their repository ID). No project,
44
+ repository, consumer credential, Mission, grant, or submission is created by
45
+ these commands.
46
+
47
+ The only supported credential-reference backend is macOS Keychain generic
48
+ password lookup. Its exact form is
49
+ `keychain://<service>/<account>?namespace=<optional>&version=<optional>`; the
50
+ query values are reference metadata and lookup remains fixed to the explicit
51
+ service/account pair. Put the bearer value in that Keychain item through the
52
+ operator's normal Keychain administration, never on the Forge command line.
53
+ Forge persists and prints the reference, never its value. Unknown schemes,
54
+ missing items, unavailable or access-denied Keychain state fail closed without
55
+ credential discovery or fallback.
56
+
57
+ ### Explicit first Keychain access
58
+
59
+ Before a full EP peer binding exists, a local administrator can explicitly ask
60
+ macOS to perform exactly one read of one already-known credential reference:
61
+
62
+ ```text
63
+ forge execution-host credential-access \
64
+ --interactive \
65
+ --credential-reference keychain://forge.ep/consumer
66
+ ```
67
+
68
+ This is a bounded access-setup action, not general onboarding: it does not
69
+ initialize a data root, create or modify a peer binding, issue an EP
70
+ credential, create a grant, configure a provider, or submit any work. The
71
+ reference is validated before the one existing Keychain reader is called. The
72
+ `--interactive` opt-in is mandatory; without it Forge never asks macOS and
73
+ does not retry or fall back to an interactive read.
74
+
75
+ The setup read waits for at most 120 seconds (adjustable downward with
76
+ `--timeout-seconds`). Forge tells the local user that macOS may ask for
77
+ Keychain access by `/usr/bin/security`, which is the executable that actually
78
+ requests this read. That macOS decision is not a cryptographically
79
+ Forge-exclusive permission; Forge neither automates the prompt nor changes
80
+ Keychain ACLs, partition lists, search domains, entitlements, or signing.
81
+ The command returns only a status and redacted diagnostic, never credential
82
+ material.
83
+
84
+ Normal installed runtime resolution remains a separate, short 5-second read.
85
+ It never increases its timeout, retries, chooses another Keychain item, or
86
+ switches itself to interactive mode. `TIMEOUT` means only that the Keychain
87
+ subprocess did not finish within its bound; it does not by itself prove denial,
88
+ an open prompt, a missing Keychain, or an entitlement problem. Diagnostics
89
+ distinguish `TIMEOUT`, `PROCESS_START_FAILED`, `MISSING`, `ACCESS_DENIED`, and
90
+ `COMMAND_FAILED`, while all non-resolvable states fail closed. A successful
91
+ `INTERACTIVE_CREDENTIAL_READ_SUCCEEDED` result does not claim that a fresh
92
+ normal process can read the item or that EP authentication succeeded; those
93
+ are separate proofs.
94
+
95
+ HTTPS uses normal certificate validation. Plain HTTP requires both a loopback
96
+ origin and `--allow-loopback-http`. URL credentials, paths, queries, fragments,
97
+ redirects, unbounded timeouts, discovery and retargeting are rejected. To
98
+ replace a binding, repeat `configure` with `--replace` plus both the current
99
+ `--expected-revision` and `--expected-digest` from `show`; identical writes are
100
+ idempotent. `show`, `status`, and `preflight` do not initialize or migrate
101
+ storage. Preflight performs only authenticated
102
+ `GET /v1/producer-compatibility`, verifies product, exact instance ID, and the
103
+ explicit `1.2` readback and `1.4` terminal-evidence contracts, and reports project/repository and
104
+ mutation authority as `NOT_VERIFIED` because that route does not prove them.
105
+ The exact instance-ID comparison is consistency evidence, not a newly invented
106
+ cryptographic peer identity; preflight reports the latter as `NOT_ASSERTED`.
107
+ `CONFIGURED` is therefore never presented as `LIVE_READY`.
108
+
18
109
  ## Managed repository status
19
110
 
20
111
  Forge is the first-class repository [`pcvantol/forge`](https://github.com/pcvantol/forge),
@@ -0,0 +1,202 @@
1
+ """Administration and read-only qualification entrypoint for packaged Forge."""
2
+ from __future__ import annotations
3
+
4
+ import argparse
5
+ import json
6
+ import sqlite3
7
+ import sys
8
+
9
+ from ._version import canonical_version
10
+ from .execution_host_configuration import (
11
+ EngineeringPlatformPeerConfigurationService,
12
+ PeerConfigurationError,
13
+ read_peer_configuration,
14
+ )
15
+ from .runtime.data_root import DataRootResolver
16
+ from .secure_store import CredentialAccessSetupService, SecretReference
17
+
18
+
19
+ def _status(data_root: str | None) -> dict[str, object]:
20
+ """Read only the operator-safe instance projection; never initialise it."""
21
+ root = DataRootResolver(cli_data_root=data_root).resolve()
22
+ database = root / "forge.db"
23
+ marker = root / "instance" / "runtime-instance.json"
24
+ result: dict[str, object] = {"product_version": canonical_version(), "data_root": str(root),
25
+ "initialized": marker.is_file() and database.is_file(),
26
+ "runtime_status": "uninitialized",
27
+ "execution_host_peer": {"status": "NOT_CONFIGURED", "live_status": "NOT_VERIFIED"}}
28
+ if not result["initialized"]:
29
+ return result
30
+ try:
31
+ connection = sqlite3.connect(f"file:{database}?mode=ro", uri=True)
32
+ try:
33
+ metadata = dict(connection.execute("SELECT key, value FROM runtime_metadata"))
34
+ dispatcher = connection.execute(
35
+ "SELECT status FROM dispatcher_state WHERE singleton = 1"
36
+ ).fetchone()
37
+ dispatcher_status = "IDLE" if dispatcher is None else dispatcher[0]
38
+ if dispatcher_status not in {"IDLE", "ACTIVE"}:
39
+ raise sqlite3.DatabaseError("invalid durable dispatcher state")
40
+ finally:
41
+ connection.close()
42
+ except sqlite3.Error:
43
+ result["runtime_status"] = "unavailable"
44
+ result["execution_host_peer"] = {
45
+ "status": "ERROR", "live_status": "NOT_VERIFIED", "error": "Forge runtime storage is unavailable",
46
+ }
47
+ return result
48
+ result.update({"instance_id": metadata.get("runtime_id"), "storage_schema": metadata.get("schema_version"),
49
+ "runtime_status": metadata.get("status", "unavailable")})
50
+ result["dispatcher"] = {"status": dispatcher_status}
51
+ try:
52
+ peer_readback = read_peer_configuration(root)
53
+ peer = peer_readback.configuration
54
+ if peer is not None:
55
+ result["execution_host_peer"] = {
56
+ "status": "CONFIGURED", "live_status": "NOT_VERIFIED",
57
+ "binding_id": peer.binding_id,
58
+ "configuration_revision": peer.configuration_revision,
59
+ "configuration_digest": peer.configuration_digest,
60
+ "owning_forge_runtime_id": peer.owning_forge_runtime_id,
61
+ "ep_consumer_id": peer.ep_consumer_id,
62
+ }
63
+ elif peer_readback.stored_document is not None:
64
+ result["execution_host_peer"] = {
65
+ "status": peer_readback.status,
66
+ "live_status": "NOT_VERIFIED",
67
+ "binding_id": peer_readback.stored_document["binding_id"],
68
+ "configuration_revision": peer_readback.stored_document["configuration_revision"],
69
+ "configuration_digest": peer_readback.stored_document["configuration_digest"],
70
+ "owning_forge_runtime_id": peer_readback.stored_document["owning_forge_runtime_id"],
71
+ }
72
+ except PeerConfigurationError as error:
73
+ result["execution_host_peer"] = {
74
+ "status": "ERROR", "live_status": "NOT_VERIFIED", "error": str(error),
75
+ }
76
+ return result
77
+
78
+
79
+ def _failure(command: str, error: Exception) -> int:
80
+ print(json.dumps({"command": command, "status": "ERROR", "error": str(error)}, sort_keys=True))
81
+ return 1
82
+
83
+
84
+ def main(argv: list[str] | None = None) -> int:
85
+ parser = argparse.ArgumentParser(
86
+ prog="forge",
87
+ description="Forge mission planning and evidence interpretation runtime.",
88
+ )
89
+ parser.add_argument("--version", action="version", version=canonical_version())
90
+ parser.add_argument("--data-root", help="Forge-owned runtime data root")
91
+ subparsers = parser.add_subparsers(dest="command")
92
+ server = subparsers.add_parser("server", help="manage local Forge storage")
93
+ server_commands = server.add_subparsers(dest="server_command", required=True)
94
+ server_commands.add_parser("init", help="create and validate the configured Forge data root")
95
+ server_commands.add_parser("status", help="print read-only runtime status as JSON")
96
+ subparsers.add_parser("status", help="print read-only runtime status as JSON")
97
+ execution_host = subparsers.add_parser("execution-host", help="manage the selected Execution Host peer")
98
+ execution_host_commands = execution_host.add_subparsers(dest="execution_host_command", required=True)
99
+ configure = execution_host_commands.add_parser("configure", help="persist one explicit EP peer binding")
100
+ configure.add_argument("--binding-id", required=True)
101
+ configure.add_argument("--endpoint", required=True)
102
+ configure.add_argument("--expected-instance-id", required=True)
103
+ configure.add_argument("--consumer-id", required=True)
104
+ configure.add_argument("--host-id", required=True)
105
+ configure.add_argument("--project-id", required=True)
106
+ configure.add_argument("--repository-id", required=True)
107
+ configure.add_argument("--repository-identity", required=True)
108
+ configure.add_argument("--credential-reference", required=True)
109
+ configure.add_argument("--operator-id", required=True)
110
+ configure.add_argument("--timeout-seconds", type=float, default=10.0)
111
+ configure.add_argument("--allow-loopback-http", action="store_true")
112
+ configure.add_argument("--replace", action="store_true")
113
+ configure.add_argument("--expected-revision", type=int)
114
+ configure.add_argument("--expected-digest")
115
+ execution_host_commands.add_parser("show", help="print the persisted secret-free EP peer binding")
116
+ execution_host_commands.add_parser("preflight", help="perform read-only EP identity and v1.2 compatibility checks")
117
+ credential_access = execution_host_commands.add_parser(
118
+ "credential-access",
119
+ help="perform one explicit local Keychain credential-access setup read",
120
+ )
121
+ credential_access.add_argument("--credential-reference", required=True, action="append")
122
+ credential_access.add_argument(
123
+ "--interactive",
124
+ action="store_true",
125
+ help="explicitly request the one bounded local Keychain access read",
126
+ )
127
+ credential_access.add_argument(
128
+ "--timeout-seconds",
129
+ type=float,
130
+ default=120.0,
131
+ help="bounded interactive setup timeout in seconds (maximum: 120)",
132
+ )
133
+ args = parser.parse_args(argv)
134
+ if args.command == "server" and args.server_command == "init":
135
+ from .runtime import RuntimeBootstrap
136
+ database = RuntimeBootstrap(data_root=args.data_root, forge_version=canonical_version()).open()
137
+ try:
138
+ print(json.dumps(_status(args.data_root), sort_keys=True))
139
+ finally:
140
+ database.close()
141
+ elif args.command == "status" or (args.command == "server" and args.server_command == "status"):
142
+ print(json.dumps(_status(args.data_root), sort_keys=True))
143
+ elif args.command == "execution-host":
144
+ try:
145
+ if args.execution_host_command == "credential-access":
146
+ if len(args.credential_reference) != 1:
147
+ raise ValueError("credential-access requires exactly one credential reference")
148
+ if args.interactive:
149
+ print(
150
+ "macOS may ask you to allow Keychain access by /usr/bin/security. "
151
+ "This is a macOS Keychain decision, not a Forge-exclusive cryptographic permission.",
152
+ file=sys.stderr,
153
+ )
154
+ result = CredentialAccessSetupService(timeout_seconds=args.timeout_seconds).read(
155
+ SecretReference.parse(args.credential_reference[0]), interactive=args.interactive,
156
+ )
157
+ print(json.dumps(result.to_safe_dict(), sort_keys=True))
158
+ return 0 if result.succeeded else 1
159
+ service = EngineeringPlatformPeerConfigurationService(args.data_root)
160
+ if args.execution_host_command == "configure":
161
+ if args.replace != (args.expected_revision is not None and args.expected_digest is not None):
162
+ raise PeerConfigurationError(
163
+ "--replace requires both --expected-revision and --expected-digest; guards are invalid without --replace"
164
+ )
165
+ configured = service.configure(
166
+ binding_id=args.binding_id,
167
+ endpoint=args.endpoint,
168
+ expected_ep_instance_id=args.expected_instance_id,
169
+ ep_consumer_id=args.consumer_id,
170
+ execution_host_id=args.host_id,
171
+ ep_project_id=args.project_id,
172
+ ep_repository_id=args.repository_id,
173
+ repository_identity=args.repository_identity,
174
+ credential_reference=SecretReference.parse(args.credential_reference),
175
+ operator_id=args.operator_id,
176
+ allow_loopback_http=args.allow_loopback_http,
177
+ timeout_seconds=args.timeout_seconds,
178
+ replace=args.replace,
179
+ expected_revision=args.expected_revision,
180
+ expected_digest=args.expected_digest,
181
+ )
182
+ print(json.dumps({"status": "CONFIGURED", "configuration": configured.to_dict()}, sort_keys=True))
183
+ elif args.execution_host_command == "show":
184
+ readback = service.readback()
185
+ if readback.stored_document is None:
186
+ print(json.dumps({"status": "NOT_CONFIGURED"}, sort_keys=True))
187
+ return 1
188
+ print(json.dumps({
189
+ "status": readback.status,
190
+ "configuration": readback.stored_document,
191
+ }, sort_keys=True))
192
+ if readback.configuration is None:
193
+ return 1
194
+ elif args.execution_host_command == "preflight":
195
+ print(json.dumps(service.preflight(), sort_keys=True))
196
+ except (PeerConfigurationError, ValueError) as error:
197
+ return _failure(f"execution-host {args.execution_host_command}", error)
198
+ return 0
199
+
200
+
201
+ if __name__ == "__main__":
202
+ raise SystemExit(main())
@@ -0,0 +1,6 @@
1
+ """Deterministic, local-only completion assessment."""
2
+
3
+ from .assessor import PhaseCompletionAssessor
4
+ from .mission import MissionCompletionEvaluationError, MissionCompletionEvaluator
5
+
6
+ __all__ = ["MissionCompletionEvaluationError", "MissionCompletionEvaluator", "PhaseCompletionAssessor"]
@@ -0,0 +1,120 @@
1
+ """Deterministic Architecture Mission completion evaluation."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from hashlib import sha256
6
+ import json
7
+ from typing import Any, Mapping, Sequence
8
+
9
+ from forge.models.architecture_mission import ArchitectureMission
10
+ from forge.models.mission_completion import (
11
+ CanonicalExecutionEvidenceReference,
12
+ MissionCompletionEvaluation,
13
+ MissionCompletionEvidence,
14
+ MissionCriterionEvaluation,
15
+ MissionCriterionEvaluationStatus,
16
+ RepositoryTruthReference,
17
+ mission_criterion_id,
18
+ )
19
+
20
+
21
+ class MissionCompletionEvaluationError(ValueError):
22
+ """Completion input is stale, malformed, or outside the approved Mission."""
23
+
24
+
25
+ def _digest(value: object) -> str:
26
+ return "sha256:" + sha256(
27
+ json.dumps(value, sort_keys=True, separators=(",", ":"), ensure_ascii=False).encode("utf-8")
28
+ ).hexdigest()
29
+
30
+
31
+ def _truth_reference(document: Mapping[str, Any]) -> RepositoryTruthReference:
32
+ try:
33
+ values = tuple(document[item] for item in ("source_id", "revision", "locator", "content_digest"))
34
+ if any(not isinstance(item, str) or not item for item in values):
35
+ raise TypeError
36
+ return RepositoryTruthReference(*values)
37
+ except (KeyError, TypeError, ValueError) as error:
38
+ raise MissionCompletionEvaluationError("current Repository Truth provenance is incomplete") from error
39
+
40
+
41
+ def _canonical_execution_references(
42
+ mission_id: str, evidence: Sequence[Mapping[str, Any]],
43
+ ) -> dict[str, CanonicalExecutionEvidenceReference]:
44
+ references: dict[str, CanonicalExecutionEvidenceReference] = {}
45
+ for document in evidence:
46
+ if document.get("outcome") != "complete":
47
+ continue
48
+ repository = document.get("repository_evidence")
49
+ if not isinstance(repository, Mapping) or repository.get("mission_id") != mission_id:
50
+ continue
51
+ try:
52
+ values = (
53
+ document["receipt_id"], repository["action_id"], document["report_id"],
54
+ repository["repository_revision"], repository["content_digest"],
55
+ )
56
+ if any(not isinstance(item, str) or not item for item in values):
57
+ raise TypeError
58
+ reference = CanonicalExecutionEvidenceReference(*values)
59
+ except (KeyError, TypeError, ValueError):
60
+ continue
61
+ if any(document.get(key) != repository.get(key) for key in ("correlation_id", "host_run_id", "report_id")):
62
+ continue
63
+ previous = references.get(reference.receipt_id)
64
+ if previous is not None and previous != reference:
65
+ raise MissionCompletionEvaluationError("execution receipt identity binds conflicting terminal evidence")
66
+ references[reference.receipt_id] = reference
67
+ return references
68
+
69
+
70
+ class MissionCompletionEvaluator:
71
+ """Evaluate explicit evidence associations without accepting prose authority."""
72
+
73
+ def evaluate(
74
+ self,
75
+ mission: ArchitectureMission,
76
+ repository_truth: Mapping[str, Any],
77
+ execution_evidence: Sequence[Mapping[str, Any]],
78
+ evidence: MissionCompletionEvidence | None,
79
+ ) -> MissionCompletionEvaluation:
80
+ if not mission.acceptance_criteria:
81
+ raise MissionCompletionEvaluationError("approved Mission has no acceptance criteria")
82
+ mission_digest = _digest(mission.to_dict())
83
+ truth = _truth_reference(repository_truth)
84
+ identifiers = {mission_criterion_id(mission.id, criterion): criterion for criterion in mission.acceptance_criteria}
85
+ canonical = _canonical_execution_references(mission.id, execution_evidence)
86
+ bindings = {} if evidence is None else {item.criterion_id: item for item in evidence.bindings}
87
+ if evidence is not None:
88
+ if evidence.mission_id != mission.id or evidence.mission_digest != mission_digest:
89
+ raise MissionCompletionEvaluationError("completion evidence does not bind the approved Mission")
90
+ unknown = set(bindings) - set(identifiers)
91
+ if unknown:
92
+ raise MissionCompletionEvaluationError("completion evidence references an unknown Mission criterion")
93
+
94
+ evaluations: list[MissionCriterionEvaluation] = []
95
+ for criterion_id, criterion in identifiers.items():
96
+ binding = bindings.get(criterion_id)
97
+ if binding is None:
98
+ evaluations.append(MissionCriterionEvaluation(
99
+ criterion_id, criterion, MissionCriterionEvaluationStatus.UNSATISFIED, "MISSING_EVIDENCE"
100
+ ))
101
+ continue
102
+ if binding.repository_truth != truth:
103
+ evaluations.append(MissionCriterionEvaluation(
104
+ criterion_id, criterion, MissionCriterionEvaluationStatus.UNSATISFIED,
105
+ "STALE_REPOSITORY_TRUTH", binding.execution_evidence, binding.repository_truth,
106
+ ))
107
+ continue
108
+ if any(canonical.get(reference.receipt_id) != reference for reference in binding.execution_evidence):
109
+ evaluations.append(MissionCriterionEvaluation(
110
+ criterion_id, criterion, MissionCriterionEvaluationStatus.UNSATISFIED,
111
+ "NON_CANONICAL_EXECUTION_EVIDENCE", binding.execution_evidence, truth,
112
+ ))
113
+ continue
114
+ evaluations.append(MissionCriterionEvaluation(
115
+ criterion_id, criterion, MissionCriterionEvaluationStatus.PROVEN,
116
+ "CANONICAL_EXECUTION_AND_REPOSITORY_TRUTH", binding.execution_evidence, truth,
117
+ ))
118
+ return MissionCompletionEvaluation(
119
+ mission.id, mission_digest, tuple(evaluations), None if evidence is None else evidence.digest
120
+ )