techrevati-runtime 0.3.0.dev1__tar.gz → 0.4.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (308) hide show
  1. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/.github/ISSUE_TEMPLATE/bug.md +1 -1
  2. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/.github/ISSUE_TEMPLATE/feature.md +3 -4
  3. techrevati_runtime-0.4.0/.github/codeql/codeql-config.yml +33 -0
  4. techrevati_runtime-0.4.0/.github/workflows/ci.yml +280 -0
  5. techrevati_runtime-0.4.0/.github/workflows/codeql.yml +56 -0
  6. techrevati_runtime-0.4.0/.github/workflows/docs.yml +85 -0
  7. techrevati_runtime-0.4.0/.github/workflows/release.yml +329 -0
  8. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/.pre-commit-config.yaml +2 -2
  9. techrevati_runtime-0.4.0/CHANGELOG.md +225 -0
  10. techrevati_runtime-0.4.0/CODEOWNERS +1 -0
  11. techrevati_runtime-0.4.0/CONTRIBUTING.md +71 -0
  12. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/LICENSE +1 -1
  13. techrevati_runtime-0.4.0/PKG-INFO +233 -0
  14. techrevati_runtime-0.4.0/README.md +177 -0
  15. techrevati_runtime-0.4.0/SECURITY.md +145 -0
  16. techrevati_runtime-0.4.0/docs/api/agent_events.md +3 -0
  17. techrevati_runtime-0.4.0/docs/api/agent_lifecycle.md +3 -0
  18. techrevati_runtime-0.4.0/docs/api/mcp.md +9 -0
  19. techrevati_runtime-0.4.0/docs/api/memory.md +6 -0
  20. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/docs/api/orchestrator.md +0 -1
  21. techrevati_runtime-0.4.0/docs/api/otel.md +33 -0
  22. techrevati_runtime-0.4.0/docs/api/output_spec.md +6 -0
  23. techrevati_runtime-0.4.0/docs/api/permissions.md +3 -0
  24. techrevati_runtime-0.4.0/docs/api/pilot.md +3 -0
  25. techrevati_runtime-0.4.0/docs/api/policy_engine.md +3 -0
  26. techrevati_runtime-0.4.0/docs/api/quality_gate.md +3 -0
  27. techrevati_runtime-0.4.0/docs/changelog.md +225 -0
  28. techrevati_runtime-0.4.0/docs/compliance/final-diff-review.md +170 -0
  29. techrevati_runtime-0.4.0/docs/compliance/guard-calibration.md +137 -0
  30. techrevati_runtime-0.4.0/docs/compliance/index.md +55 -0
  31. techrevati_runtime-0.4.0/docs/compliance/pilot-dry-run.md +46 -0
  32. techrevati_runtime-0.4.0/docs/compliance/pilot-evidence-template.md +184 -0
  33. techrevati_runtime-0.4.0/docs/compliance/pilot-execution.md +159 -0
  34. techrevati_runtime-0.4.0/docs/compliance/pilot-operations-runbook.md +315 -0
  35. techrevati_runtime-0.4.0/docs/compliance/private-rc-publication.md +196 -0
  36. techrevati_runtime-0.4.0/docs/compliance/production-readiness.md +707 -0
  37. techrevati_runtime-0.4.0/docs/compliance/rc-inventory.md +314 -0
  38. techrevati_runtime-0.4.0/docs/compliance/rc-readiness-summary.md +132 -0
  39. techrevati_runtime-0.4.0/docs/compliance/rc-review-handoff.md +152 -0
  40. techrevati_runtime-0.4.0/docs/compliance/remote-ci-validation.md +136 -0
  41. techrevati_runtime-0.4.0/docs/compliance/rollback-execution.md +173 -0
  42. techrevati_runtime-0.4.0/docs/compliance/rollback-proof-checklist.md +124 -0
  43. techrevati_runtime-0.4.0/docs/compliance/security-review.md +228 -0
  44. techrevati_runtime-0.4.0/docs/compliance/stable-promotion.md +175 -0
  45. techrevati_runtime-0.4.0/docs/compliance/staging-manifest.md +132 -0
  46. techrevati_runtime-0.4.0/docs/consuming-as-a-library.md +80 -0
  47. techrevati_runtime-0.4.0/docs/eu-ai-act/audit-log.md +62 -0
  48. techrevati_runtime-0.4.0/docs/eu-ai-act/conformity-checklist.md +36 -0
  49. techrevati_runtime-0.4.0/docs/eu-ai-act/cybersecurity.md +38 -0
  50. techrevati_runtime-0.4.0/docs/eu-ai-act/human-oversight.md +59 -0
  51. techrevati_runtime-0.4.0/docs/eu-ai-act/incident-reporting.md +49 -0
  52. techrevati_runtime-0.4.0/docs/eu-ai-act/index.md +68 -0
  53. techrevati_runtime-0.4.0/docs/eu-ai-act/risk-management.md +41 -0
  54. techrevati_runtime-0.4.0/docs/eu-ai-act/transparency.md +40 -0
  55. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/docs/getting-started.md +10 -9
  56. techrevati_runtime-0.4.0/docs/index.md +54 -0
  57. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/docs/migrating-from-0.0.x.md +15 -25
  58. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/docs/migrating-from-0.1.x.md +18 -16
  59. techrevati_runtime-0.4.0/docs/migrating-from-0.3.x.md +62 -0
  60. techrevati_runtime-0.4.0/docs/patterns/agent-events.md +106 -0
  61. techrevati_runtime-0.4.0/docs/patterns/durability-postgres.md +96 -0
  62. techrevati_runtime-0.4.0/docs/patterns/durability-redis.md +64 -0
  63. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/docs/patterns/durability.md +34 -7
  64. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/docs/patterns/governance.md +21 -7
  65. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/docs/patterns/hooks.md +27 -18
  66. techrevati_runtime-0.4.0/docs/patterns/mcp.md +63 -0
  67. techrevati_runtime-0.4.0/docs/patterns/memory.md +33 -0
  68. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/docs/patterns/orchestrator.md +53 -23
  69. techrevati_runtime-0.4.0/docs/patterns/pilot-profile.md +43 -0
  70. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/docs/patterns/policy.md +2 -1
  71. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/docs/patterns/rate-limiting.md +7 -5
  72. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/docs/patterns/retry.md +13 -0
  73. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/docs/patterns/routing.md +2 -2
  74. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/docs/patterns/streaming.md +11 -9
  75. techrevati_runtime-0.4.0/docs/patterns/typed-outputs.md +30 -0
  76. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/docs/patterns/usage-tracking.md +11 -0
  77. techrevati_runtime-0.4.0/docs/styles/runtime.css +213 -0
  78. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/docs/tutorials/end-to-end.md +31 -23
  79. techrevati_runtime-0.4.0/docs_theme/404.html +6 -0
  80. techrevati_runtime-0.4.0/docs_theme/main.html +50 -0
  81. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/examples/tiny_agent.py +8 -8
  82. techrevati_runtime-0.4.0/mkdocs.yml +121 -0
  83. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/pyproject.toml +43 -21
  84. techrevati_runtime-0.4.0/scripts/check_changelog.py +144 -0
  85. techrevati_runtime-0.4.0/scripts/check_ci_guardrails.py +161 -0
  86. techrevati_runtime-0.4.0/scripts/check_dependency_vulnerabilities.py +135 -0
  87. techrevati_runtime-0.4.0/scripts/check_distribution.py +821 -0
  88. techrevati_runtime-0.4.0/scripts/check_docs_public_api.py +139 -0
  89. techrevati_runtime-0.4.0/scripts/check_docs_publication.py +200 -0
  90. techrevati_runtime-0.4.0/scripts/check_final_diff_review.py +331 -0
  91. techrevati_runtime-0.4.0/scripts/check_guard_calibration.py +142 -0
  92. techrevati_runtime-0.4.0/scripts/check_maintenance.py +103 -0
  93. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/scripts/check_module_coverage.py +2 -1
  94. techrevati_runtime-0.4.0/scripts/check_operations_runbook.py +150 -0
  95. techrevati_runtime-0.4.0/scripts/check_package_policy.py +132 -0
  96. techrevati_runtime-0.4.0/scripts/check_pilot_dry_run.py +526 -0
  97. techrevati_runtime-0.4.0/scripts/check_pilot_evidence.py +189 -0
  98. techrevati_runtime-0.4.0/scripts/check_pilot_execution.py +220 -0
  99. techrevati_runtime-0.4.0/scripts/check_precommit_config.py +140 -0
  100. techrevati_runtime-0.4.0/scripts/check_private_rc_publication.py +269 -0
  101. techrevati_runtime-0.4.0/scripts/check_public_api.py +271 -0
  102. techrevati_runtime-0.4.0/scripts/check_public_branding.py +148 -0
  103. techrevati_runtime-0.4.0/scripts/check_python_support.py +132 -0
  104. techrevati_runtime-0.4.0/scripts/check_rc_readiness.py +190 -0
  105. techrevati_runtime-0.4.0/scripts/check_rc_review_handoff.py +371 -0
  106. techrevati_runtime-0.4.0/scripts/check_release_evidence.py +443 -0
  107. techrevati_runtime-0.4.0/scripts/check_release_tag.py +73 -0
  108. techrevati_runtime-0.4.0/scripts/check_release_workflow.py +182 -0
  109. techrevati_runtime-0.4.0/scripts/check_remote_ci_validation.py +210 -0
  110. techrevati_runtime-0.4.0/scripts/check_repo_hygiene.py +116 -0
  111. techrevati_runtime-0.4.0/scripts/check_rollback_execution.py +231 -0
  112. techrevati_runtime-0.4.0/scripts/check_secret_leaks.py +186 -0
  113. techrevati_runtime-0.4.0/scripts/check_security_patterns.py +354 -0
  114. techrevati_runtime-0.4.0/scripts/check_security_review.py +229 -0
  115. techrevati_runtime-0.4.0/scripts/check_source_hygiene.py +221 -0
  116. techrevati_runtime-0.4.0/scripts/check_stable_promotion.py +273 -0
  117. techrevati_runtime-0.4.0/scripts/check_staging_manifest.py +373 -0
  118. techrevati_runtime-0.4.0/scripts/check_toolchain_pins.py +103 -0
  119. techrevati_runtime-0.4.0/scripts/check_version_consistency.py +70 -0
  120. techrevati_runtime-0.4.0/scripts/check_workflow_hardening.py +139 -0
  121. techrevati_runtime-0.4.0/scripts/check_workflow_pinning.py +70 -0
  122. techrevati_runtime-0.4.0/scripts/install_toolchain.py +49 -0
  123. techrevati_runtime-0.4.0/scripts/mkdocs_hooks/remove_generator_meta.py +37 -0
  124. techrevati_runtime-0.4.0/scripts/release_preflight.py +235 -0
  125. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/src/techrevati/runtime/__init__.py +35 -3
  126. techrevati_runtime-0.4.0/src/techrevati/runtime/_classify.py +63 -0
  127. techrevati_runtime-0.4.0/src/techrevati/runtime/_internal.py +130 -0
  128. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/src/techrevati/runtime/agent_events.py +284 -4
  129. techrevati_runtime-0.4.0/src/techrevati/runtime/agent_lifecycle.py +305 -0
  130. techrevati_runtime-0.4.0/src/techrevati/runtime/checkpoint.py +615 -0
  131. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/src/techrevati/runtime/circuit_breaker.py +78 -6
  132. techrevati_runtime-0.4.0/src/techrevati/runtime/compliance/__init__.py +110 -0
  133. techrevati_runtime-0.4.0/src/techrevati/runtime/compliance/audit_log.py +531 -0
  134. techrevati_runtime-0.4.0/src/techrevati/runtime/compliance/cybersecurity.py +131 -0
  135. techrevati_runtime-0.4.0/src/techrevati/runtime/compliance/human_oversight.py +338 -0
  136. techrevati_runtime-0.4.0/src/techrevati/runtime/compliance/incidents.py +197 -0
  137. techrevati_runtime-0.4.0/src/techrevati/runtime/compliance/kit.py +278 -0
  138. techrevati_runtime-0.4.0/src/techrevati/runtime/compliance/risk_registry.py +147 -0
  139. techrevati_runtime-0.4.0/src/techrevati/runtime/compliance/transparency.py +171 -0
  140. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/src/techrevati/runtime/governance.py +124 -6
  141. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/src/techrevati/runtime/guardrails.py +91 -23
  142. techrevati_runtime-0.4.0/src/techrevati/runtime/handoffs.py +107 -0
  143. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/src/techrevati/runtime/hooks.py +135 -53
  144. techrevati_runtime-0.4.0/src/techrevati/runtime/mcp.py +165 -0
  145. techrevati_runtime-0.4.0/src/techrevati/runtime/memory.py +197 -0
  146. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/src/techrevati/runtime/orchestrator.py +518 -143
  147. techrevati_runtime-0.4.0/src/techrevati/runtime/otel.py +562 -0
  148. techrevati_runtime-0.4.0/src/techrevati/runtime/output_spec.py +149 -0
  149. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/src/techrevati/runtime/permissions.py +95 -4
  150. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/src/techrevati/runtime/persistence.py +93 -12
  151. techrevati_runtime-0.4.0/src/techrevati/runtime/pilot.py +254 -0
  152. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/src/techrevati/runtime/policy_engine.py +160 -16
  153. techrevati_runtime-0.4.0/src/techrevati/runtime/quality_gate.py +109 -0
  154. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/src/techrevati/runtime/rate_limit.py +121 -31
  155. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/src/techrevati/runtime/retry_policy.py +230 -20
  156. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/src/techrevati/runtime/routing.py +127 -15
  157. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/src/techrevati/runtime/scheduler.py +58 -21
  158. techrevati_runtime-0.4.0/src/techrevati/runtime/sinks.py +272 -0
  159. techrevati_runtime-0.4.0/src/techrevati/runtime/streaming.py +264 -0
  160. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/src/techrevati/runtime/usage_tracking.py +269 -61
  161. techrevati_runtime-0.4.0/tests/compliance/test_audit_log.py +328 -0
  162. techrevati_runtime-0.4.0/tests/compliance/test_audit_session_wiring.py +53 -0
  163. techrevati_runtime-0.4.0/tests/compliance/test_cybersecurity.py +64 -0
  164. techrevati_runtime-0.4.0/tests/compliance/test_human_oversight.py +192 -0
  165. techrevati_runtime-0.4.0/tests/compliance/test_incidents.py +121 -0
  166. techrevati_runtime-0.4.0/tests/compliance/test_kit_integration.py +136 -0
  167. techrevati_runtime-0.4.0/tests/compliance/test_risk_registry.py +127 -0
  168. techrevati_runtime-0.4.0/tests/compliance/test_transparency.py +68 -0
  169. techrevati_runtime-0.4.0/tests/test_agent_events.py +562 -0
  170. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/tests/test_agent_lifecycle.py +116 -0
  171. techrevati_runtime-0.4.0/tests/test_async_circuit_breaker.py +313 -0
  172. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/tests/test_async_orchestrator.py +112 -2
  173. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/tests/test_checkpoint.py +270 -2
  174. techrevati_runtime-0.4.0/tests/test_checkpoint_steps.py +103 -0
  175. techrevati_runtime-0.4.0/tests/test_ci_guardrails.py +105 -0
  176. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/tests/test_circuit_breaker.py +141 -0
  177. techrevati_runtime-0.4.0/tests/test_classify.py +72 -0
  178. techrevati_runtime-0.4.0/tests/test_dependency_vulnerabilities.py +105 -0
  179. techrevati_runtime-0.4.0/tests/test_distribution.py +772 -0
  180. techrevati_runtime-0.4.0/tests/test_docs_public_api.py +103 -0
  181. techrevati_runtime-0.4.0/tests/test_docs_publication.py +275 -0
  182. techrevati_runtime-0.4.0/tests/test_examples.py +38 -0
  183. techrevati_runtime-0.4.0/tests/test_final_diff_review.py +209 -0
  184. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/tests/test_governance.py +125 -0
  185. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/tests/test_governance_integration.py +53 -0
  186. techrevati_runtime-0.4.0/tests/test_guard_calibration.py +153 -0
  187. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/tests/test_guardrails.py +108 -1
  188. techrevati_runtime-0.4.0/tests/test_handoffs.py +249 -0
  189. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/tests/test_hooks.py +125 -4
  190. techrevati_runtime-0.4.0/tests/test_maintenance.py +76 -0
  191. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/tests/test_max_iterations.py +42 -1
  192. techrevati_runtime-0.4.0/tests/test_mcp.py +157 -0
  193. techrevati_runtime-0.4.0/tests/test_memory.py +102 -0
  194. techrevati_runtime-0.4.0/tests/test_operations_runbook.py +105 -0
  195. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/tests/test_orchestrator.py +213 -3
  196. techrevati_runtime-0.4.0/tests/test_otel.py +249 -0
  197. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/tests/test_otel_atexit_cleanup.py +77 -0
  198. techrevati_runtime-0.4.0/tests/test_otel_genai_messages.py +68 -0
  199. techrevati_runtime-0.4.0/tests/test_otel_nesting.py +281 -0
  200. techrevati_runtime-0.4.0/tests/test_output_spec.py +91 -0
  201. techrevati_runtime-0.4.0/tests/test_package_metadata.py +42 -0
  202. techrevati_runtime-0.4.0/tests/test_package_policy.py +75 -0
  203. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/tests/test_pattern_and_prompt_injection_guardrails.py +38 -0
  204. techrevati_runtime-0.4.0/tests/test_permissions.py +286 -0
  205. techrevati_runtime-0.4.0/tests/test_pilot.py +214 -0
  206. techrevati_runtime-0.4.0/tests/test_pilot_dry_run.py +71 -0
  207. techrevati_runtime-0.4.0/tests/test_pilot_evidence.py +126 -0
  208. techrevati_runtime-0.4.0/tests/test_pilot_execution.py +292 -0
  209. techrevati_runtime-0.4.0/tests/test_policy_engine.py +429 -0
  210. techrevati_runtime-0.4.0/tests/test_precommit_config.py +97 -0
  211. techrevati_runtime-0.4.0/tests/test_private_rc_publication.py +415 -0
  212. techrevati_runtime-0.4.0/tests/test_public_api.py +100 -0
  213. techrevati_runtime-0.4.0/tests/test_python_support.py +87 -0
  214. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/tests/test_quality_gate.py +32 -0
  215. techrevati_runtime-0.4.0/tests/test_rate_limit.py +488 -0
  216. techrevati_runtime-0.4.0/tests/test_rc_readiness.py +164 -0
  217. techrevati_runtime-0.4.0/tests/test_rc_review_handoff.py +276 -0
  218. techrevati_runtime-0.4.0/tests/test_release_evidence.py +378 -0
  219. techrevati_runtime-0.4.0/tests/test_release_guards.py +168 -0
  220. techrevati_runtime-0.4.0/tests/test_release_workflow.py +269 -0
  221. techrevati_runtime-0.4.0/tests/test_remote_ci_validation.py +313 -0
  222. techrevati_runtime-0.4.0/tests/test_repo_hygiene.py +60 -0
  223. techrevati_runtime-0.4.0/tests/test_retry_policy.py +456 -0
  224. techrevati_runtime-0.4.0/tests/test_rollback_execution.py +298 -0
  225. techrevati_runtime-0.4.0/tests/test_routing.py +190 -0
  226. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/tests/test_s5_scheduler_persistence_async_policy.py +74 -1
  227. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/tests/test_s5_usage_limits_and_caching.py +30 -0
  228. techrevati_runtime-0.4.0/tests/test_secret_leaks.py +117 -0
  229. techrevati_runtime-0.4.0/tests/test_security_patterns.py +329 -0
  230. techrevati_runtime-0.4.0/tests/test_security_review.py +326 -0
  231. techrevati_runtime-0.4.0/tests/test_sinks.py +542 -0
  232. techrevati_runtime-0.4.0/tests/test_source_hygiene.py +170 -0
  233. techrevati_runtime-0.4.0/tests/test_stable_promotion.py +316 -0
  234. techrevati_runtime-0.4.0/tests/test_staging_manifest.py +224 -0
  235. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/tests/test_streaming.py +186 -5
  236. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/tests/test_usage_tracking.py +175 -0
  237. techrevati_runtime-0.4.0/tests/test_workflow_hardening.py +199 -0
  238. techrevati_runtime-0.4.0/tests/test_workflow_pinning.py +43 -0
  239. techrevati_runtime-0.3.0.dev1/.github/workflows/ci.yml +0 -124
  240. techrevati_runtime-0.3.0.dev1/.github/workflows/codeql.yml +0 -42
  241. techrevati_runtime-0.3.0.dev1/.github/workflows/docs.yml +0 -38
  242. techrevati_runtime-0.3.0.dev1/.github/workflows/release.yml +0 -108
  243. techrevati_runtime-0.3.0.dev1/CHANGELOG.md +0 -560
  244. techrevati_runtime-0.3.0.dev1/CODEOWNERS +0 -26
  245. techrevati_runtime-0.3.0.dev1/CONTRIBUTING.md +0 -167
  246. techrevati_runtime-0.3.0.dev1/PKG-INFO +0 -214
  247. techrevati_runtime-0.3.0.dev1/README.md +0 -173
  248. techrevati_runtime-0.3.0.dev1/SECURITY.md +0 -102
  249. techrevati_runtime-0.3.0.dev1/docs/api/otel.md +0 -5
  250. techrevati_runtime-0.3.0.dev1/docs/changelog.md +0 -1
  251. techrevati_runtime-0.3.0.dev1/docs/index.md +0 -69
  252. techrevati_runtime-0.3.0.dev1/docs/patterns/agent-events.md +0 -53
  253. techrevati_runtime-0.3.0.dev1/mkdocs.yml +0 -86
  254. techrevati_runtime-0.3.0.dev1/src/techrevati/runtime/agent_lifecycle.py +0 -224
  255. techrevati_runtime-0.3.0.dev1/src/techrevati/runtime/checkpoint.py +0 -356
  256. techrevati_runtime-0.3.0.dev1/src/techrevati/runtime/handoffs.py +0 -57
  257. techrevati_runtime-0.3.0.dev1/src/techrevati/runtime/otel.py +0 -308
  258. techrevati_runtime-0.3.0.dev1/src/techrevati/runtime/quality_gate.py +0 -65
  259. techrevati_runtime-0.3.0.dev1/src/techrevati/runtime/sinks.py +0 -115
  260. techrevati_runtime-0.3.0.dev1/src/techrevati/runtime/streaming.py +0 -118
  261. techrevati_runtime-0.3.0.dev1/tests/test_agent_events.py +0 -209
  262. techrevati_runtime-0.3.0.dev1/tests/test_async_circuit_breaker.py +0 -157
  263. techrevati_runtime-0.3.0.dev1/tests/test_deprecation_warnings.py +0 -66
  264. techrevati_runtime-0.3.0.dev1/tests/test_handoffs.py +0 -86
  265. techrevati_runtime-0.3.0.dev1/tests/test_otel.py +0 -125
  266. techrevati_runtime-0.3.0.dev1/tests/test_otel_nesting.py +0 -141
  267. techrevati_runtime-0.3.0.dev1/tests/test_permissions.py +0 -136
  268. techrevati_runtime-0.3.0.dev1/tests/test_policy_engine.py +0 -232
  269. techrevati_runtime-0.3.0.dev1/tests/test_rate_limit.py +0 -237
  270. techrevati_runtime-0.3.0.dev1/tests/test_retry_policy.py +0 -246
  271. techrevati_runtime-0.3.0.dev1/tests/test_routing.py +0 -78
  272. techrevati_runtime-0.3.0.dev1/tests/test_sinks.py +0 -151
  273. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/.github/dependabot.yml +0 -0
  274. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/.gitignore +0 -0
  275. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/docs/api/checkpoint.md +0 -0
  276. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/docs/api/circuit_breaker.md +0 -0
  277. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/docs/api/governance.md +0 -0
  278. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/docs/api/guardrails.md +0 -0
  279. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/docs/api/handoffs.md +0 -0
  280. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/docs/api/hooks.md +0 -0
  281. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/docs/api/persistence.md +0 -0
  282. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/docs/api/rate_limit.md +0 -0
  283. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/docs/api/retry_policy.md +0 -0
  284. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/docs/api/routing.md +0 -0
  285. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/docs/api/scheduler.md +0 -0
  286. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/docs/api/sinks.md +0 -0
  287. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/docs/api/streaming.md +0 -0
  288. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/docs/api/usage_tracking.md +0 -0
  289. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/docs/patterns/circuit-breaker.md +0 -0
  290. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/docs/patterns/lifecycle.md +0 -0
  291. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/docs/patterns/permissions.md +0 -0
  292. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/docs/patterns/quality-gate.md +0 -0
  293. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/examples/durable_agent.py +0 -0
  294. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/examples/parallel_tools.py +0 -0
  295. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/examples/pricing.json +0 -0
  296. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/src/techrevati/__init__.py +0 -0
  297. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/src/techrevati/runtime/data/pricing.json +0 -0
  298. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/src/techrevati/runtime/py.typed +0 -0
  299. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/tests/__init__.py +0 -0
  300. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/tests/conftest.py +0 -0
  301. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/tests/test_async_guardrails.py +0 -0
  302. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/tests/test_governance_events.py +0 -0
  303. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/tests/test_property_circuit_breaker.py +0 -0
  304. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/tests/test_property_retry_policy.py +0 -0
  305. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/tests/test_register_pricing_on_conflict.py +0 -0
  306. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/tests/test_s0_regressions.py +0 -0
  307. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/tests/test_step_retries.py +0 -0
  308. {techrevati_runtime-0.3.0.dev1 → techrevati_runtime-0.4.0}/tests/test_taskgroup_parallel_tools.py +0 -0
@@ -19,7 +19,7 @@ labels: bug
19
19
  ```
20
20
 
21
21
  **Environment**
22
- - techrevati-runtime version: `pip show techrevati-runtime | grep -i version`
22
+ - Package version: `pip show techrevati-runtime | grep -i version`
23
23
  - Python: `python --version`
24
24
  - OS: <e.g. Linux 6.x / macOS 14 / Windows 11>
25
25
 
@@ -19,7 +19,6 @@ labels: enhancement
19
19
  **Alternatives considered**
20
20
  <!-- What would you do today as a workaround? Why doesn't it scale? -->
21
21
 
22
- **Industry priors**
23
- <!-- Has another agent SDK (OpenAI Agents SDK, LangGraph, etc.)
24
- shipped something similar? Link it. We prefer landing
25
- primitives that match industry conventions. -->
22
+ **Prior art**
23
+ <!-- Has another runtime shipped something similar? Link it if useful.
24
+ Prefer primitives that match established conventions. -->
@@ -0,0 +1,33 @@
1
+ name: "techrevati-runtime CodeQL config"
2
+
3
+ # The `security-and-quality` suite (see codeql.yml) keeps full security
4
+ # coverage, but its maintainability/reliability queries produce only
5
+ # false positives on this codebase's idiomatic Python — and overlap with
6
+ # ruff (E,W,F,I,B,C4,UP,N) + mypy --strict, which already run in CI.
7
+ #
8
+ # Tests are not shipped and are not part of the runtime attack surface,
9
+ # and the quality queries flag intentional negative-path test idioms
10
+ # (e.g. `with pytest.raises(ValueError): SomeError(bad_input)` trips
11
+ # py/unused-exception-object because the constructor raises during
12
+ # validation, so the object is intentionally never used). Skip the test
13
+ # tree wholesale.
14
+ paths-ignore:
15
+ - tests
16
+
17
+ # In src/, three quality queries fire on correct, idiomatic code:
18
+ # - py/call/wrong-arguments: a `Callable` dataclass field defaulting to a
19
+ # module-level function (memory.py: TokenBudgetCompaction.estimator) is
20
+ # mis-modelled as a bound method, so the analyser thinks `self.estimator`
21
+ # takes zero args. mypy --strict already verifies real call arity.
22
+ # - py/implicit-string-concatenation-in-list: intentional line-wrapped long
23
+ # string literals inside a list (compliance/kit.py, transparency.py).
24
+ # - py/ineffectual-statement: `...` bodies in Protocol stubs and module
25
+ # docstrings.
26
+ # Drop just these three; everything else in the suite stays active.
27
+ query-filters:
28
+ - exclude:
29
+ id: py/call/wrong-arguments
30
+ - exclude:
31
+ id: py/implicit-string-concatenation-in-list
32
+ - exclude:
33
+ id: py/ineffectual-statement
@@ -0,0 +1,280 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ concurrency:
13
+ group: ${{ github.workflow }}-${{ github.ref }}
14
+ cancel-in-progress: true
15
+
16
+ jobs:
17
+ test:
18
+ name: Test on Python ${{ matrix.python-version }}
19
+ runs-on: ubuntu-latest
20
+ timeout-minutes: 15
21
+ strategy:
22
+ fail-fast: false
23
+ matrix:
24
+ python-version: ['3.11', '3.12', '3.13']
25
+
26
+ steps:
27
+ # actions/checkout v4
28
+ - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
29
+ with:
30
+ persist-credentials: false
31
+
32
+ - name: Set up Python ${{ matrix.python-version }}
33
+ # actions/setup-python v5
34
+ uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
35
+ with:
36
+ python-version: ${{ matrix.python-version }}
37
+ cache: pip
38
+ cache-dependency-path: pyproject.toml
39
+
40
+ - name: Install package + dev dependencies
41
+ run: |
42
+ python -m pip install --upgrade pip
43
+ pip install -e ".[dev]"
44
+ python scripts/install_toolchain.py audit
45
+
46
+ - name: Public branding guard
47
+ run: python scripts/check_public_branding.py
48
+
49
+ - name: Repository hygiene guard
50
+ run: python scripts/check_repo_hygiene.py
51
+
52
+ - name: Source hygiene guard
53
+ run: python scripts/check_source_hygiene.py
54
+
55
+ - name: Security pattern guard
56
+ run: python scripts/check_security_patterns.py
57
+
58
+ - name: Secret leak guard
59
+ run: python scripts/check_secret_leaks.py
60
+
61
+ - name: Security review guard
62
+ if: ${{ startsWith(github.head_ref, 'production-rc-') || startsWith(github.ref_name, 'production-rc-') }}
63
+ run: python scripts/check_security_review.py
64
+
65
+ - name: Package policy guard
66
+ run: python scripts/check_package_policy.py
67
+
68
+ - name: Public API guard
69
+ run: python scripts/check_public_api.py
70
+
71
+ - name: Documented public API guard
72
+ run: python scripts/check_docs_public_api.py
73
+
74
+ - name: Pre-commit config guard
75
+ run: python scripts/check_precommit_config.py
76
+
77
+ - name: CI guardrail guard
78
+ run: python scripts/check_ci_guardrails.py
79
+
80
+ - name: Guard calibration guard
81
+ run: python scripts/check_guard_calibration.py
82
+
83
+ - name: Dependency vulnerability guard
84
+ run: python scripts/check_dependency_vulnerabilities.py
85
+
86
+ - name: Final diff review guard
87
+ if: ${{ startsWith(github.head_ref, 'production-rc-') || startsWith(github.ref_name, 'production-rc-') }}
88
+ run: python scripts/check_final_diff_review.py
89
+
90
+ - name: RC review handoff guard
91
+ if: ${{ startsWith(github.head_ref, 'production-rc-') || startsWith(github.ref_name, 'production-rc-') }}
92
+ run: python scripts/check_rc_review_handoff.py
93
+
94
+ - name: Staging manifest guard
95
+ if: ${{ startsWith(github.head_ref, 'production-rc-') || startsWith(github.ref_name, 'production-rc-') }}
96
+ run: python scripts/check_staging_manifest.py
97
+
98
+ - name: Workflow action pinning guard
99
+ run: python scripts/check_workflow_pinning.py
100
+
101
+ - name: Workflow hardening guard
102
+ run: python scripts/check_workflow_hardening.py
103
+
104
+ - name: Release workflow guard
105
+ run: python scripts/check_release_workflow.py
106
+
107
+ - name: Release evidence guard
108
+ if: ${{ startsWith(github.head_ref, 'production-rc-') || startsWith(github.ref_name, 'production-rc-') }}
109
+ run: python scripts/check_release_evidence.py
110
+
111
+ - name: RC readiness guard
112
+ if: ${{ startsWith(github.head_ref, 'production-rc-') || startsWith(github.ref_name, 'production-rc-') }}
113
+ run: python scripts/check_rc_readiness.py
114
+
115
+ - name: Stable promotion guard
116
+ if: ${{ startsWith(github.head_ref, 'production-rc-') || startsWith(github.ref_name, 'production-rc-') }}
117
+ run: python scripts/check_stable_promotion.py
118
+
119
+ - name: Docs publication guard
120
+ run: python scripts/check_docs_publication.py
121
+
122
+ - name: Rollback execution guard
123
+ if: ${{ startsWith(github.head_ref, 'production-rc-') || startsWith(github.ref_name, 'production-rc-') }}
124
+ run: python scripts/check_rollback_execution.py
125
+
126
+ - name: Operations runbook guard
127
+ if: ${{ startsWith(github.head_ref, 'production-rc-') || startsWith(github.ref_name, 'production-rc-') }}
128
+ run: python scripts/check_operations_runbook.py
129
+
130
+ - name: Pilot dry-run guard
131
+ if: ${{ startsWith(github.head_ref, 'production-rc-') || startsWith(github.ref_name, 'production-rc-') }}
132
+ run: python scripts/check_pilot_dry_run.py
133
+
134
+ - name: Pilot evidence guard
135
+ if: ${{ startsWith(github.head_ref, 'production-rc-') || startsWith(github.ref_name, 'production-rc-') }}
136
+ run: python scripts/check_pilot_evidence.py
137
+
138
+ - name: Pilot execution guard
139
+ if: ${{ startsWith(github.head_ref, 'production-rc-') || startsWith(github.ref_name, 'production-rc-') }}
140
+ run: python scripts/check_pilot_execution.py
141
+
142
+ - name: Private RC publication guard
143
+ if: ${{ startsWith(github.head_ref, 'production-rc-') || startsWith(github.ref_name, 'production-rc-') }}
144
+ run: python scripts/check_private_rc_publication.py
145
+
146
+ - name: Maintenance automation guard
147
+ run: python scripts/check_maintenance.py
148
+
149
+ - name: Python support guard
150
+ run: python scripts/check_python_support.py
151
+
152
+ - name: Remote CI validation guard
153
+ if: ${{ startsWith(github.head_ref, 'production-rc-') || startsWith(github.ref_name, 'production-rc-') }}
154
+ run: python scripts/check_remote_ci_validation.py
155
+
156
+ - name: Toolchain pin guard
157
+ run: python scripts/check_toolchain_pins.py
158
+
159
+ - name: Version consistency guard
160
+ run: python scripts/check_version_consistency.py
161
+
162
+ - name: Changelog version guard
163
+ run: python scripts/check_changelog.py
164
+
165
+ - name: Lint with ruff
166
+ run: ruff check src/ tests/ scripts/
167
+
168
+ - name: Format check with ruff
169
+ run: ruff format --check src/ tests/ scripts/
170
+
171
+ - name: Type check with mypy
172
+ run: mypy src/ --strict
173
+
174
+ - name: Run tests
175
+ run: pytest tests/ -v --cov=src/techrevati --cov-report=term-missing
176
+
177
+ - name: Per-module coverage floor (>= 88%)
178
+ run: python scripts/check_module_coverage.py --threshold 88
179
+
180
+ build:
181
+ name: Build on Python ${{ matrix.python-version }}
182
+ runs-on: ubuntu-latest
183
+ timeout-minutes: 10
184
+ needs: test
185
+ strategy:
186
+ fail-fast: false
187
+ matrix:
188
+ python-version: ['3.11', '3.12', '3.13']
189
+
190
+ steps:
191
+ # actions/checkout v4
192
+ - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
193
+ with:
194
+ persist-credentials: false
195
+
196
+ - name: Set up Python ${{ matrix.python-version }}
197
+ # actions/setup-python v5
198
+ uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
199
+ with:
200
+ python-version: ${{ matrix.python-version }}
201
+
202
+ - name: Install build tools
203
+ run: |
204
+ python -m pip install --upgrade pip
205
+ python scripts/install_toolchain.py build
206
+
207
+ - name: Build distribution
208
+ run: python -m build
209
+
210
+ - name: Check distribution artifacts
211
+ run: python scripts/check_distribution.py dist
212
+
213
+ - name: Check package metadata rendering
214
+ run: python -m twine check dist/*.whl dist/*.tar.gz
215
+
216
+ - name: Check wheel
217
+ run: |
218
+ pip install --no-index --no-deps --find-links dist techrevati-runtime
219
+ python -c "
220
+ import importlib.metadata
221
+ from techrevati import runtime
222
+ assert runtime.__version__ == importlib.metadata.version('techrevati-runtime')
223
+ print(f'techrevati-runtime {runtime.__version__}')
224
+ "
225
+
226
+ zero-deps-smoke:
227
+ name: Zero-deps smoke on Python ${{ matrix.python-version }}
228
+ runs-on: ubuntu-latest
229
+ timeout-minutes: 10
230
+ needs: build
231
+ strategy:
232
+ fail-fast: false
233
+ matrix:
234
+ python-version: ['3.11', '3.12', '3.13']
235
+
236
+ steps:
237
+ # actions/checkout v4
238
+ - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
239
+ with:
240
+ persist-credentials: false
241
+
242
+ - name: Set up Python ${{ matrix.python-version }}
243
+ # actions/setup-python v5
244
+ uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
245
+ with:
246
+ python-version: ${{ matrix.python-version }}
247
+
248
+ - name: Build distribution
249
+ run: |
250
+ python -m pip install --upgrade pip
251
+ python scripts/install_toolchain.py build
252
+ python -m build
253
+ python scripts/check_distribution.py dist
254
+ python -m twine check dist/*.whl dist/*.tar.gz
255
+
256
+ - name: Install in an empty venv (no [dev], no [otel])
257
+ # Spin a fresh venv to verify the zero-runtime-dependency
258
+ # promise: the wheel must import with only stdlib + the wheel
259
+ # itself, no optional extras pulled in.
260
+ run: |
261
+ python -m venv smoke-venv
262
+ smoke-venv/bin/python -m pip install --no-index --no-deps --find-links dist techrevati-runtime
263
+ smoke-venv/bin/python -c "
264
+ import techrevati.runtime as r
265
+ import importlib.metadata
266
+ assert r.__version__, '__version__ missing'
267
+ assert r.__version__ == importlib.metadata.version('techrevati-runtime')
268
+ # Touch the public exports to make sure every module imports
269
+ # without optional deps installed.
270
+ from techrevati.runtime import (
271
+ AgentSession, OrchestrationSession, AsyncOrchestrationSession,
272
+ CircuitBreaker, AsyncCircuitBreaker,
273
+ TokenBucket, AsyncTokenBucket, RateLimiter,
274
+ StaticProviderRouter, RoundRobinProviderRouter,
275
+ InMemorySaver, SqliteSaver,
276
+ SqliteEventSink, SqliteUsageSink,
277
+ UsageLimits, ManualClock, SystemClock,
278
+ )
279
+ print(f'zero-deps smoke OK on techrevati-runtime {r.__version__}')
280
+ "
@@ -0,0 +1,56 @@
1
+ name: Static Analysis
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+ schedule:
9
+ # Weekly scan on Mondays — catches dependency-driven advisories
10
+ # that land after a PR has already been merged.
11
+ - cron: '0 6 * * 1'
12
+
13
+ permissions:
14
+ actions: read
15
+ contents: read
16
+ security-events: write
17
+
18
+ concurrency:
19
+ group: ${{ github.workflow }}-${{ github.ref }}
20
+ cancel-in-progress: true
21
+
22
+ jobs:
23
+ analyze:
24
+ name: Analyze ${{ matrix.language }}
25
+ runs-on: ubuntu-latest
26
+ timeout-minutes: 15
27
+ strategy:
28
+ fail-fast: false
29
+ matrix:
30
+ language: [python]
31
+
32
+ steps:
33
+ # actions/checkout v4
34
+ - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
35
+ with:
36
+ persist-credentials: false
37
+
38
+ - name: Initialize analysis
39
+ # github/codeql-action v3
40
+ uses: github/codeql-action/init@8aad20d150bbac5944a9f9d289da16a4b0d87c1e
41
+ with:
42
+ languages: ${{ matrix.language }}
43
+ queries: security-and-quality
44
+ # paths-ignore (tests) lives in the config file; the quality suite
45
+ # false-positives on intentional negative-path test idioms.
46
+ config-file: ./.github/codeql/codeql-config.yml
47
+
48
+ - name: Autobuild
49
+ # github/codeql-action v3
50
+ uses: github/codeql-action/autobuild@8aad20d150bbac5944a9f9d289da16a4b0d87c1e
51
+
52
+ - name: Perform analysis
53
+ # github/codeql-action v3
54
+ uses: github/codeql-action/analyze@8aad20d150bbac5944a9f9d289da16a4b0d87c1e
55
+ with:
56
+ category: "/language:${{ matrix.language }}"
@@ -0,0 +1,85 @@
1
+ name: Docs
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ concurrency:
13
+ group: ${{ github.workflow }}-${{ github.ref }}
14
+ cancel-in-progress: true
15
+
16
+ jobs:
17
+ docs:
18
+ name: Build docs
19
+ runs-on: ubuntu-latest
20
+ timeout-minutes: 10
21
+
22
+ steps:
23
+ # actions/checkout v4
24
+ - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
25
+ with:
26
+ persist-credentials: false
27
+
28
+ - name: Set up Python
29
+ # actions/setup-python v5
30
+ uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
31
+ with:
32
+ python-version: '3.11'
33
+
34
+ - name: Install dependencies
35
+ run: |
36
+ python -m pip install --upgrade pip
37
+ python scripts/install_toolchain.py docs
38
+
39
+ - name: Build documentation
40
+ # --strict turns broken refs and unresolved nav entries into
41
+ # hard failures so a doc regression cannot silently degrade
42
+ # the published site.
43
+ run: mkdocs build --strict
44
+
45
+ - name: Published HTML branding guard
46
+ run: python scripts/check_public_branding.py site
47
+
48
+ deploy:
49
+ name: Deploy docs
50
+ if: github.event_name == 'push'
51
+ runs-on: ubuntu-latest
52
+ timeout-minutes: 10
53
+ needs: docs
54
+ permissions:
55
+ contents: write
56
+
57
+ steps:
58
+ # actions/checkout v4
59
+ - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
60
+ with:
61
+ persist-credentials: false
62
+
63
+ - name: Set up Python
64
+ # actions/setup-python v5
65
+ uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
66
+ with:
67
+ python-version: '3.11'
68
+
69
+ - name: Install dependencies
70
+ run: |
71
+ python -m pip install --upgrade pip
72
+ python scripts/install_toolchain.py docs
73
+
74
+ - name: Build documentation
75
+ run: mkdocs build --strict
76
+
77
+ - name: Published HTML branding guard
78
+ run: python scripts/check_public_branding.py site
79
+
80
+ - name: Deploy documentation
81
+ # peaceiris/actions-gh-pages v3
82
+ uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847
83
+ with:
84
+ github_token: ${{ secrets.GITHUB_TOKEN }}
85
+ publish_dir: ./site