harflow-mcp 0.0.1__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 (370) hide show
  1. harflow_mcp-0.0.1/.github/workflows/release.yml +103 -0
  2. harflow_mcp-0.0.1/.github/workflows/test.yml +18 -0
  3. harflow_mcp-0.0.1/.gitignore +14 -0
  4. harflow_mcp-0.0.1/AGENTS.md +5 -0
  5. harflow_mcp-0.0.1/CHANGELOG.md +44 -0
  6. harflow_mcp-0.0.1/LICENSE +179 -0
  7. harflow_mcp-0.0.1/PKG-INFO +34 -0
  8. harflow_mcp-0.0.1/README.md +22 -0
  9. harflow_mcp-0.0.1/contracts/v1/ctl-batch.json +1 -0
  10. harflow_mcp-0.0.1/contracts/v1/ctl-error.json +1 -0
  11. harflow_mcp-0.0.1/contracts/v1/ctl-event-page-historical-inner.json +1 -0
  12. harflow_mcp-0.0.1/contracts/v1/ctl-event-page.json +1 -0
  13. harflow_mcp-0.0.1/contracts/v1/ctl-success.json +1 -0
  14. harflow_mcp-0.0.1/contracts/v1/ctl-usage.json +1 -0
  15. harflow_mcp-0.0.1/contracts/v1/event-historical-writer.jsonl +1 -0
  16. harflow_mcp-0.0.1/contracts/v1/event-known.jsonl +1 -0
  17. harflow_mcp-0.0.1/contracts/v1/event-unknown.jsonl +1 -0
  18. harflow_mcp-0.0.1/contracts/v1/invalid-boolean-version.json +1 -0
  19. harflow_mcp-0.0.1/contracts/v1/invalid-ctl-inner-event.json +1 -0
  20. harflow_mcp-0.0.1/contracts/v1/invalid-foreign-format.json +1 -0
  21. harflow_mcp-0.0.1/contracts/v1/invalid-foreign-product.json +1 -0
  22. harflow_mcp-0.0.1/contracts/v1/invalid-major-mismatch.json +1 -0
  23. harflow_mcp-0.0.1/contracts/v1/invalid-malformed-product-version.json +1 -0
  24. harflow_mcp-0.0.1/contracts/v1/invalid-minor-mismatch.json +1 -0
  25. harflow_mcp-0.0.1/contracts/v1/invalid-missing-capabilities.json +1 -0
  26. harflow_mcp-0.0.1/contracts/v1/invalid-missing-product.json +1 -0
  27. harflow_mcp-0.0.1/contracts/v1/invalid-overflow-version.json +1 -0
  28. harflow_mcp-0.0.1/contracts/v1/invalid-prerelease.json +1 -0
  29. harflow_mcp-0.0.1/contracts/v1/invalid-unsupported-version.json +1 -0
  30. harflow_mcp-0.0.1/contracts/v1/invalid-workflow-definition-foreign.json +1 -0
  31. harflow_mcp-0.0.1/contracts/v1/invalid-workflow-definition-raw.json +1 -0
  32. harflow_mcp-0.0.1/contracts/v1/invalid-workflow-definition-version.json +1 -0
  33. harflow_mcp-0.0.1/contracts/v1/invalid-workflow-run.json +1 -0
  34. harflow_mcp-0.0.1/contracts/v1/manifest.json +369 -0
  35. harflow_mcp-0.0.1/contracts/v1/manifest.sha256 +1 -0
  36. harflow_mcp-0.0.1/contracts/v1/setup-error.json +1 -0
  37. harflow_mcp-0.0.1/contracts/v1/setup-success.json +1 -0
  38. harflow_mcp-0.0.1/contracts/v1/setup-usage.json +1 -0
  39. harflow_mcp-0.0.1/contracts/v1/version-info-build-metadata.json +1 -0
  40. harflow_mcp-0.0.1/contracts/v1/version-info-patch-backward.json +1 -0
  41. harflow_mcp-0.0.1/contracts/v1/version-info-patch-forward.json +1 -0
  42. harflow_mcp-0.0.1/contracts/v1/version-info.json +1 -0
  43. harflow_mcp-0.0.1/contracts/v1/workflow-definition-patch.json +1 -0
  44. harflow_mcp-0.0.1/contracts/v1/workflow-definition.json +1 -0
  45. harflow_mcp-0.0.1/contracts/v1/workflow-run-patch.json +1 -0
  46. harflow_mcp-0.0.1/contracts/v1/workflow-run.json +1 -0
  47. harflow_mcp-0.0.1/docs/compact-task-reads.md +106 -0
  48. harflow_mcp-0.0.1/docs/contracts.md +207 -0
  49. harflow_mcp-0.0.1/docs/development.md +22 -0
  50. harflow_mcp-0.0.1/docs/extra-writable-paths.md +202 -0
  51. harflow_mcp-0.0.1/docs/getting-started.md +27 -0
  52. harflow_mcp-0.0.1/docs/harness-permissions.md +424 -0
  53. harflow_mcp-0.0.1/docs/multi-task-waiting.md +132 -0
  54. harflow_mcp-0.0.1/docs/releasing.md +19 -0
  55. harflow_mcp-0.0.1/docs/task-artifacts.md +214 -0
  56. harflow_mcp-0.0.1/docs/task-continuation.md +100 -0
  57. harflow_mcp-0.0.1/docs/task-notifications.md +157 -0
  58. harflow_mcp-0.0.1/docs/task-outcomes.md +45 -0
  59. harflow_mcp-0.0.1/docs/workflow-context-benchmarks.md +60 -0
  60. harflow_mcp-0.0.1/docs/workflows.md +1689 -0
  61. harflow_mcp-0.0.1/examples/workflows/implement-review.json +52 -0
  62. harflow_mcp-0.0.1/install.sh +62 -0
  63. harflow_mcp-0.0.1/pyproject.toml +37 -0
  64. harflow_mcp-0.0.1/release-build-constraints.txt +5 -0
  65. harflow_mcp-0.0.1/scripts/benchmark-monitor.py +222 -0
  66. harflow_mcp-0.0.1/scripts/benchmark-parallel.py +147 -0
  67. harflow_mcp-0.0.1/scripts/benchmark-workflow-context.py +54 -0
  68. harflow_mcp-0.0.1/scripts/benchmark-workflow-reads.py +151 -0
  69. harflow_mcp-0.0.1/scripts/check-legacy-names.py +43 -0
  70. harflow_mcp-0.0.1/scripts/check-private-refs.sh +54 -0
  71. harflow_mcp-0.0.1/scripts/legacy-name-allowlist.json +368 -0
  72. harflow_mcp-0.0.1/scripts/probe-macos-git-sandbox.py +63 -0
  73. harflow_mcp-0.0.1/scripts/probe-mcp-client-deadlines.py +226 -0
  74. harflow_mcp-0.0.1/scripts/release.py +202 -0
  75. harflow_mcp-0.0.1/scripts/release_stdio.py +44 -0
  76. harflow_mcp-0.0.1/server.json +21 -0
  77. harflow_mcp-0.0.1/src/harflow_mcp/__init__.py +1 -0
  78. harflow_mcp-0.0.1/src/harflow_mcp/approval_runtime.py +339 -0
  79. harflow_mcp-0.0.1/src/harflow_mcp/approvals.py +314 -0
  80. harflow_mcp-0.0.1/src/harflow_mcp/artifacts.py +862 -0
  81. harflow_mcp-0.0.1/src/harflow_mcp/backends/__init__.py +200 -0
  82. harflow_mcp-0.0.1/src/harflow_mcp/backends/antigravity.py +959 -0
  83. harflow_mcp-0.0.1/src/harflow_mcp/backends/base.py +875 -0
  84. harflow_mcp-0.0.1/src/harflow_mcp/backends/claude.py +1355 -0
  85. harflow_mcp-0.0.1/src/harflow_mcp/backends/claude_approvals.py +87 -0
  86. harflow_mcp-0.0.1/src/harflow_mcp/backends/claude_native.py +202 -0
  87. harflow_mcp-0.0.1/src/harflow_mcp/backends/codex.py +1300 -0
  88. harflow_mcp-0.0.1/src/harflow_mcp/backends/codex_config.py +226 -0
  89. harflow_mcp-0.0.1/src/harflow_mcp/backends/codex_native.py +317 -0
  90. harflow_mcp-0.0.1/src/harflow_mcp/backends/codex_native.toml +12 -0
  91. harflow_mcp-0.0.1/src/harflow_mcp/backends/codex_native_write.toml +14 -0
  92. harflow_mcp-0.0.1/src/harflow_mcp/backends/config_namespaces.py +24 -0
  93. harflow_mcp-0.0.1/src/harflow_mcp/backends/mcp_approval.py +260 -0
  94. harflow_mcp-0.0.1/src/harflow_mcp/backends/native.py +29 -0
  95. harflow_mcp-0.0.1/src/harflow_mcp/backends/normalize.py +204 -0
  96. harflow_mcp-0.0.1/src/harflow_mcp/backends/opencode.py +788 -0
  97. harflow_mcp-0.0.1/src/harflow_mcp/backends/vibe.py +1116 -0
  98. harflow_mcp-0.0.1/src/harflow_mcp/backends/workflow_diagnostics.py +178 -0
  99. harflow_mcp-0.0.1/src/harflow_mcp/bounded_io.py +47 -0
  100. harflow_mcp-0.0.1/src/harflow_mcp/bridge_state.py +49 -0
  101. harflow_mcp-0.0.1/src/harflow_mcp/caller_policy.py +42 -0
  102. harflow_mcp-0.0.1/src/harflow_mcp/canonical_paths.py +103 -0
  103. harflow_mcp-0.0.1/src/harflow_mcp/catalog.py +840 -0
  104. harflow_mcp-0.0.1/src/harflow_mcp/cli.py +48 -0
  105. harflow_mcp-0.0.1/src/harflow_mcp/clients/__init__.py +402 -0
  106. harflow_mcp-0.0.1/src/harflow_mcp/clients/antigravity.py +154 -0
  107. harflow_mcp-0.0.1/src/harflow_mcp/clients/base.py +315 -0
  108. harflow_mcp-0.0.1/src/harflow_mcp/clients/claude_code.py +193 -0
  109. harflow_mcp-0.0.1/src/harflow_mcp/clients/codex.py +131 -0
  110. harflow_mcp-0.0.1/src/harflow_mcp/clients/desktop.py +261 -0
  111. harflow_mcp-0.0.1/src/harflow_mcp/clients/jsonc.py +88 -0
  112. harflow_mcp-0.0.1/src/harflow_mcp/clients/opencode.py +139 -0
  113. harflow_mcp-0.0.1/src/harflow_mcp/clients/vibe.py +400 -0
  114. harflow_mcp-0.0.1/src/harflow_mcp/control.py +915 -0
  115. harflow_mcp-0.0.1/src/harflow_mcp/control_documents.py +86 -0
  116. harflow_mcp-0.0.1/src/harflow_mcp/ctl.py +1222 -0
  117. harflow_mcp-0.0.1/src/harflow_mcp/detached.py +360 -0
  118. harflow_mcp-0.0.1/src/harflow_mcp/event_history.py +192 -0
  119. harflow_mcp-0.0.1/src/harflow_mcp/events.py +629 -0
  120. harflow_mcp-0.0.1/src/harflow_mcp/execution_config.py +34 -0
  121. harflow_mcp-0.0.1/src/harflow_mcp/extra_paths.py +142 -0
  122. harflow_mcp-0.0.1/src/harflow_mcp/followup_documents.py +83 -0
  123. harflow_mcp-0.0.1/src/harflow_mcp/followups.py +978 -0
  124. harflow_mcp-0.0.1/src/harflow_mcp/identity.py +166 -0
  125. harflow_mcp-0.0.1/src/harflow_mcp/inbox.py +398 -0
  126. harflow_mcp-0.0.1/src/harflow_mcp/inbox_documents.py +56 -0
  127. harflow_mcp-0.0.1/src/harflow_mcp/lineage.py +620 -0
  128. harflow_mcp-0.0.1/src/harflow_mcp/mcp_allowlist.py +67 -0
  129. harflow_mcp-0.0.1/src/harflow_mcp/notification_database.py +311 -0
  130. harflow_mcp-0.0.1/src/harflow_mcp/notifications.py +367 -0
  131. harflow_mcp-0.0.1/src/harflow_mcp/read_metrics.py +41 -0
  132. harflow_mcp-0.0.1/src/harflow_mcp/retention.py +754 -0
  133. harflow_mcp-0.0.1/src/harflow_mcp/runtime_loaders.py +142 -0
  134. harflow_mcp-0.0.1/src/harflow_mcp/runtime_paths.py +305 -0
  135. harflow_mcp-0.0.1/src/harflow_mcp/scratch.py +32 -0
  136. harflow_mcp-0.0.1/src/harflow_mcp/server.py +2680 -0
  137. harflow_mcp-0.0.1/src/harflow_mcp/setup_client.py +398 -0
  138. harflow_mcp-0.0.1/src/harflow_mcp/state_access.py +323 -0
  139. harflow_mcp-0.0.1/src/harflow_mcp/state_layout.py +116 -0
  140. harflow_mcp-0.0.1/src/harflow_mcp/state_ownership.py +498 -0
  141. harflow_mcp-0.0.1/src/harflow_mcp/store.py +1284 -0
  142. harflow_mcp-0.0.1/src/harflow_mcp/stream.py +31 -0
  143. harflow_mcp-0.0.1/src/harflow_mcp/takeover.py +517 -0
  144. harflow_mcp-0.0.1/src/harflow_mcp/task_continuation.py +245 -0
  145. harflow_mcp-0.0.1/src/harflow_mcp/task_documents.py +161 -0
  146. harflow_mcp-0.0.1/src/harflow_mcp/task_outcomes.py +222 -0
  147. harflow_mcp-0.0.1/src/harflow_mcp/task_reads.py +153 -0
  148. harflow_mcp-0.0.1/src/harflow_mcp/task_waiting.py +258 -0
  149. harflow_mcp-0.0.1/src/harflow_mcp/tasks.py +4317 -0
  150. harflow_mcp-0.0.1/src/harflow_mcp/wait_policy.py +202 -0
  151. harflow_mcp-0.0.1/src/harflow_mcp/wire_contracts.py +73 -0
  152. harflow_mcp-0.0.1/src/harflow_mcp/workflow_artifact_refs.py +180 -0
  153. harflow_mcp-0.0.1/src/harflow_mcp/workflow_cancellation.py +107 -0
  154. harflow_mcp-0.0.1/src/harflow_mcp/workflow_child_questions.py +134 -0
  155. harflow_mcp-0.0.1/src/harflow_mcp/workflow_child_sessions.py +236 -0
  156. harflow_mcp-0.0.1/src/harflow_mcp/workflow_clarification.py +205 -0
  157. harflow_mcp-0.0.1/src/harflow_mcp/workflow_context.py +198 -0
  158. harflow_mcp-0.0.1/src/harflow_mcp/workflow_definition_documents.py +103 -0
  159. harflow_mcp-0.0.1/src/harflow_mcp/workflow_delegation.py +1554 -0
  160. harflow_mcp-0.0.1/src/harflow_mcp/workflow_execution_policy.py +68 -0
  161. harflow_mcp-0.0.1/src/harflow_mcp/workflow_goals.py +161 -0
  162. harflow_mcp-0.0.1/src/harflow_mcp/workflow_hooks.py +118 -0
  163. harflow_mcp-0.0.1/src/harflow_mcp/workflow_inspection.py +524 -0
  164. harflow_mcp-0.0.1/src/harflow_mcp/workflow_invocation.py +1110 -0
  165. harflow_mcp-0.0.1/src/harflow_mcp/workflow_migration.py +127 -0
  166. harflow_mcp-0.0.1/src/harflow_mcp/workflow_monitor_snapshot.py +119 -0
  167. harflow_mcp-0.0.1/src/harflow_mcp/workflow_native.py +280 -0
  168. harflow_mcp-0.0.1/src/harflow_mcp/workflow_native_batch.py +279 -0
  169. harflow_mcp-0.0.1/src/harflow_mcp/workflow_native_policy.py +189 -0
  170. harflow_mcp-0.0.1/src/harflow_mcp/workflow_node_reads.py +131 -0
  171. harflow_mcp-0.0.1/src/harflow_mcp/workflow_notification_points.py +421 -0
  172. harflow_mcp-0.0.1/src/harflow_mcp/workflow_notifications.py +316 -0
  173. harflow_mcp-0.0.1/src/harflow_mcp/workflow_on_demand.py +403 -0
  174. harflow_mcp-0.0.1/src/harflow_mcp/workflow_prompt_delivery.py +141 -0
  175. harflow_mcp-0.0.1/src/harflow_mcp/workflow_reads.py +230 -0
  176. harflow_mcp-0.0.1/src/harflow_mcp/workflow_receipt_documents.py +73 -0
  177. harflow_mcp-0.0.1/src/harflow_mcp/workflow_receipt_io.py +74 -0
  178. harflow_mcp-0.0.1/src/harflow_mcp/workflow_references.py +255 -0
  179. harflow_mcp-0.0.1/src/harflow_mcp/workflow_responses.py +203 -0
  180. harflow_mcp-0.0.1/src/harflow_mcp/workflow_run_documents.py +436 -0
  181. harflow_mcp-0.0.1/src/harflow_mcp/workflow_traversal.py +76 -0
  182. harflow_mcp-0.0.1/src/harflow_mcp/workflows.py +3785 -0
  183. harflow_mcp-0.0.1/tests/conftest.py +150 -0
  184. harflow_mcp-0.0.1/tests/ctl_driver.py +115 -0
  185. harflow_mcp-0.0.1/tests/execution_helper.py +170 -0
  186. harflow_mcp-0.0.1/tests/fake_claude_agent.py +173 -0
  187. harflow_mcp-0.0.1/tests/fixtures/antigravity_basic.jsonl +5 -0
  188. harflow_mcp-0.0.1/tests/fixtures/antigravity_denied_command.jsonl +9 -0
  189. harflow_mcp-0.0.1/tests/fixtures/antigravity_error.jsonl +1 -0
  190. harflow_mcp-0.0.1/tests/fixtures/antigravity_live_live_resume.jsonl +6 -0
  191. harflow_mcp-0.0.1/tests/fixtures/antigravity_live_midturn.jsonl +11 -0
  192. harflow_mcp-0.0.1/tests/fixtures/antigravity_live_two_turns.jsonl +9 -0
  193. harflow_mcp-0.0.1/tests/fixtures/antigravity_plan_denied_write.jsonl +6 -0
  194. harflow_mcp-0.0.1/tests/fixtures/antigravity_resume.jsonl +6 -0
  195. harflow_mcp-0.0.1/tests/fixtures/antigravity_tools.jsonl +91 -0
  196. harflow_mcp-0.0.1/tests/fixtures/claude_partial_live_resume.jsonl +13 -0
  197. harflow_mcp-0.0.1/tests/fixtures/claude_partial_multiblock.jsonl +34 -0
  198. harflow_mcp-0.0.1/tests/task_polling.py +33 -0
  199. harflow_mcp-0.0.1/tests/test_approval_interfaces.py +75 -0
  200. harflow_mcp-0.0.1/tests/test_approval_lifecycle.py +207 -0
  201. harflow_mcp-0.0.1/tests/test_artifacts.py +1091 -0
  202. harflow_mcp-0.0.1/tests/test_backend_version_loaders.py +66 -0
  203. harflow_mcp-0.0.1/tests/test_backend_workflow_diagnostics.py +135 -0
  204. harflow_mcp-0.0.1/tests/test_backends.py +4552 -0
  205. harflow_mcp-0.0.1/tests/test_backends_real.py +268 -0
  206. harflow_mcp-0.0.1/tests/test_bounded_io.py +66 -0
  207. harflow_mcp-0.0.1/tests/test_bridge_state.py +92 -0
  208. harflow_mcp-0.0.1/tests/test_builder_authority_regressions.py +152 -0
  209. harflow_mcp-0.0.1/tests/test_caller_approvals.py +598 -0
  210. harflow_mcp-0.0.1/tests/test_caller_candidates.py +170 -0
  211. harflow_mcp-0.0.1/tests/test_caller_scan_race.py +294 -0
  212. harflow_mcp-0.0.1/tests/test_cancel.py +1558 -0
  213. harflow_mcp-0.0.1/tests/test_canonical_paths.py +35 -0
  214. harflow_mcp-0.0.1/tests/test_caps.py +520 -0
  215. harflow_mcp-0.0.1/tests/test_case_alias_guards.py +190 -0
  216. harflow_mcp-0.0.1/tests/test_catalog_pages.py +2057 -0
  217. harflow_mcp-0.0.1/tests/test_checkout_catalog.py +186 -0
  218. harflow_mcp-0.0.1/tests/test_claude_approval_resume_cli.py +155 -0
  219. harflow_mcp-0.0.1/tests/test_claude_caller_approvals_cli.py +137 -0
  220. harflow_mcp-0.0.1/tests/test_claude_capped_stdin.py +53 -0
  221. harflow_mcp-0.0.1/tests/test_claude_native_subagent_cli.py +237 -0
  222. harflow_mcp-0.0.1/tests/test_clients.py +2147 -0
  223. harflow_mcp-0.0.1/tests/test_clients_real.py +358 -0
  224. harflow_mcp-0.0.1/tests/test_codex_configuration.py +177 -0
  225. harflow_mcp-0.0.1/tests/test_codex_native.py +331 -0
  226. harflow_mcp-0.0.1/tests/test_codex_native_subagent_cli.py +276 -0
  227. harflow_mcp-0.0.1/tests/test_continuation_transport.py +62 -0
  228. harflow_mcp-0.0.1/tests/test_control.py +979 -0
  229. harflow_mcp-0.0.1/tests/test_ctl.py +665 -0
  230. harflow_mcp-0.0.1/tests/test_ctl_control.py +493 -0
  231. harflow_mcp-0.0.1/tests/test_detached.py +127 -0
  232. harflow_mcp-0.0.1/tests/test_event_history.py +299 -0
  233. harflow_mcp-0.0.1/tests/test_events.py +1240 -0
  234. harflow_mcp-0.0.1/tests/test_execution_config.py +149 -0
  235. harflow_mcp-0.0.1/tests/test_execution_helper.py +186 -0
  236. harflow_mcp-0.0.1/tests/test_extra_path_backends.py +962 -0
  237. harflow_mcp-0.0.1/tests/test_extra_path_cli.py +300 -0
  238. harflow_mcp-0.0.1/tests/test_extra_path_surface.py +286 -0
  239. harflow_mcp-0.0.1/tests/test_extra_path_tasks.py +831 -0
  240. harflow_mcp-0.0.1/tests/test_extra_paths.py +109 -0
  241. harflow_mcp-0.0.1/tests/test_followup_documents.py +153 -0
  242. harflow_mcp-0.0.1/tests/test_followup_queue.py +1499 -0
  243. harflow_mcp-0.0.1/tests/test_goal_transport.py +67 -0
  244. harflow_mcp-0.0.1/tests/test_harflow_identity_policy.py +166 -0
  245. harflow_mcp-0.0.1/tests/test_identity.py +246 -0
  246. harflow_mcp-0.0.1/tests/test_inbox_documents.py +143 -0
  247. harflow_mcp-0.0.1/tests/test_installed_version_info.py +50 -0
  248. harflow_mcp-0.0.1/tests/test_integration.py +113 -0
  249. harflow_mcp-0.0.1/tests/test_interactive_resume_real.py +92 -0
  250. harflow_mcp-0.0.1/tests/test_jsonc.py +97 -0
  251. harflow_mcp-0.0.1/tests/test_lineage.py +593 -0
  252. harflow_mcp-0.0.1/tests/test_lineage_integration.py +840 -0
  253. harflow_mcp-0.0.1/tests/test_live_input.py +2003 -0
  254. harflow_mcp-0.0.1/tests/test_live_input_real.py +356 -0
  255. harflow_mcp-0.0.1/tests/test_mcp_allowlist.py +274 -0
  256. harflow_mcp-0.0.1/tests/test_monitor_benchmark.py +96 -0
  257. harflow_mcp-0.0.1/tests/test_multiwait.py +405 -0
  258. harflow_mcp-0.0.1/tests/test_multiwait_cancellation.py +250 -0
  259. harflow_mcp-0.0.1/tests/test_native_observer_stop.py +108 -0
  260. harflow_mcp-0.0.1/tests/test_native_profiles.py +37 -0
  261. harflow_mcp-0.0.1/tests/test_native_retention.py +184 -0
  262. harflow_mcp-0.0.1/tests/test_normalize.py +989 -0
  263. harflow_mcp-0.0.1/tests/test_notification_database.py +723 -0
  264. harflow_mcp-0.0.1/tests/test_notification_server.py +505 -0
  265. harflow_mcp-0.0.1/tests/test_notifications.py +588 -0
  266. harflow_mcp-0.0.1/tests/test_oct5_harness_feedback.py +260 -0
  267. harflow_mcp-0.0.1/tests/test_open_monitor.py +238 -0
  268. harflow_mcp-0.0.1/tests/test_opencode_prompt_transport.py +81 -0
  269. harflow_mcp-0.0.1/tests/test_parallel_benchmark.py +124 -0
  270. harflow_mcp-0.0.1/tests/test_pending_messages.py +121 -0
  271. harflow_mcp-0.0.1/tests/test_read_metrics.py +50 -0
  272. harflow_mcp-0.0.1/tests/test_registry.py +1279 -0
  273. harflow_mcp-0.0.1/tests/test_release.py +141 -0
  274. harflow_mcp-0.0.1/tests/test_release_stdio.py +116 -0
  275. harflow_mcp-0.0.1/tests/test_retention.py +1066 -0
  276. harflow_mcp-0.0.1/tests/test_runtime_loaders.py +186 -0
  277. harflow_mcp-0.0.1/tests/test_saved_workflow_candidate_authority.py +61 -0
  278. harflow_mcp-0.0.1/tests/test_scratch_retention.py +96 -0
  279. harflow_mcp-0.0.1/tests/test_server.py +1278 -0
  280. harflow_mcp-0.0.1/tests/test_session_successors.py +114 -0
  281. harflow_mcp-0.0.1/tests/test_setup_client.py +586 -0
  282. harflow_mcp-0.0.1/tests/test_state_entrypoints.py +345 -0
  283. harflow_mcp-0.0.1/tests/test_state_layout.py +187 -0
  284. harflow_mcp-0.0.1/tests/test_state_ownership.py +1371 -0
  285. harflow_mcp-0.0.1/tests/test_state_ownership_boundaries.py +573 -0
  286. harflow_mcp-0.0.1/tests/test_state_root_entrypoints.py +156 -0
  287. harflow_mcp-0.0.1/tests/test_state_root_launch_boundaries.py +367 -0
  288. harflow_mcp-0.0.1/tests/test_store.py +1409 -0
  289. harflow_mcp-0.0.1/tests/test_takeover.py +969 -0
  290. harflow_mcp-0.0.1/tests/test_task_continuation.py +579 -0
  291. harflow_mcp-0.0.1/tests/test_task_document_authority.py +450 -0
  292. harflow_mcp-0.0.1/tests/test_task_documents.py +246 -0
  293. harflow_mcp-0.0.1/tests/test_task_outcomes.py +195 -0
  294. harflow_mcp-0.0.1/tests/test_task_polling.py +217 -0
  295. harflow_mcp-0.0.1/tests/test_task_reads.py +217 -0
  296. harflow_mcp-0.0.1/tests/test_usage_limits.py +288 -0
  297. harflow_mcp-0.0.1/tests/test_vibe_prompt_transport.py +86 -0
  298. harflow_mcp-0.0.1/tests/test_waits.py +883 -0
  299. harflow_mcp-0.0.1/tests/test_wire_contracts.py +156 -0
  300. harflow_mcp-0.0.1/tests/test_workflow_artifacts.py +414 -0
  301. harflow_mcp-0.0.1/tests/test_workflow_assigned_inputs.py +138 -0
  302. harflow_mcp-0.0.1/tests/test_workflow_builder_file_transport.py +129 -0
  303. harflow_mcp-0.0.1/tests/test_workflow_caller_decision_retry.py +103 -0
  304. harflow_mcp-0.0.1/tests/test_workflow_child_publication.py +153 -0
  305. harflow_mcp-0.0.1/tests/test_workflow_child_session_contract.py +131 -0
  306. harflow_mcp-0.0.1/tests/test_workflow_child_sessions.py +476 -0
  307. harflow_mcp-0.0.1/tests/test_workflow_codex_native.py +199 -0
  308. harflow_mcp-0.0.1/tests/test_workflow_context.py +145 -0
  309. harflow_mcp-0.0.1/tests/test_workflow_context_integration.py +402 -0
  310. harflow_mcp-0.0.1/tests/test_workflow_contract_recovery.py +286 -0
  311. harflow_mcp-0.0.1/tests/test_workflow_control_text_transport.py +63 -0
  312. harflow_mcp-0.0.1/tests/test_workflow_definition_authority.py +270 -0
  313. harflow_mcp-0.0.1/tests/test_workflow_definition_documents.py +275 -0
  314. harflow_mcp-0.0.1/tests/test_workflow_delegation.py +1669 -0
  315. harflow_mcp-0.0.1/tests/test_workflow_dispatch_reconciliation.py +199 -0
  316. harflow_mcp-0.0.1/tests/test_workflow_end_to_end.py +217 -0
  317. harflow_mcp-0.0.1/tests/test_workflow_execution_policy.py +465 -0
  318. harflow_mcp-0.0.1/tests/test_workflow_explicit_parallel.py +276 -0
  319. harflow_mcp-0.0.1/tests/test_workflow_goals.py +281 -0
  320. harflow_mcp-0.0.1/tests/test_workflow_input_tree.py +261 -0
  321. harflow_mcp-0.0.1/tests/test_workflow_inspection.py +467 -0
  322. harflow_mcp-0.0.1/tests/test_workflow_interfaces.py +382 -0
  323. harflow_mcp-0.0.1/tests/test_workflow_launch_failures.py +147 -0
  324. harflow_mcp-0.0.1/tests/test_workflow_migration.py +72 -0
  325. harflow_mcp-0.0.1/tests/test_workflow_missing_native_adapter.py +45 -0
  326. harflow_mcp-0.0.1/tests/test_workflow_monitor_cancel.py +412 -0
  327. harflow_mcp-0.0.1/tests/test_workflow_monitor_polling.py +77 -0
  328. harflow_mcp-0.0.1/tests/test_workflow_monitor_snapshot.py +253 -0
  329. harflow_mcp-0.0.1/tests/test_workflow_native.py +563 -0
  330. harflow_mcp-0.0.1/tests/test_workflow_native_batch.py +231 -0
  331. harflow_mcp-0.0.1/tests/test_workflow_native_checkout.py +52 -0
  332. harflow_mcp-0.0.1/tests/test_workflow_native_fallback_runtime.py +112 -0
  333. harflow_mcp-0.0.1/tests/test_workflow_native_policy.py +192 -0
  334. harflow_mcp-0.0.1/tests/test_workflow_native_reservation.py +87 -0
  335. harflow_mcp-0.0.1/tests/test_workflow_node_reads.py +259 -0
  336. harflow_mcp-0.0.1/tests/test_workflow_notification_points.py +619 -0
  337. harflow_mcp-0.0.1/tests/test_workflow_notifications.py +436 -0
  338. harflow_mcp-0.0.1/tests/test_workflow_on_demand_builder_preview.py +151 -0
  339. harflow_mcp-0.0.1/tests/test_workflow_on_demand_contract.py +269 -0
  340. harflow_mcp-0.0.1/tests/test_workflow_on_demand_native.py +79 -0
  341. harflow_mcp-0.0.1/tests/test_workflow_on_demand_recovery.py +103 -0
  342. harflow_mcp-0.0.1/tests/test_workflow_on_demand_sessions.py +221 -0
  343. harflow_mcp-0.0.1/tests/test_workflow_optional_consent.py +235 -0
  344. harflow_mcp-0.0.1/tests/test_workflow_optional_protocol.py +76 -0
  345. harflow_mcp-0.0.1/tests/test_workflow_optional_refusal.py +182 -0
  346. harflow_mcp-0.0.1/tests/test_workflow_protocol_repair.py +142 -0
  347. harflow_mcp-0.0.1/tests/test_workflow_read_benchmark.py +22 -0
  348. harflow_mcp-0.0.1/tests/test_workflow_reads.py +346 -0
  349. harflow_mcp-0.0.1/tests/test_workflow_receipt_boundaries.py +255 -0
  350. harflow_mcp-0.0.1/tests/test_workflow_receipt_documents.py +131 -0
  351. harflow_mcp-0.0.1/tests/test_workflow_refusal_evidence.py +164 -0
  352. harflow_mcp-0.0.1/tests/test_workflow_responses.py +181 -0
  353. harflow_mcp-0.0.1/tests/test_workflow_run_documents.py +1234 -0
  354. harflow_mcp-0.0.1/tests/test_workflow_run_node_checklist.py +37 -0
  355. harflow_mcp-0.0.1/tests/test_workflow_run_node_definitions.py +393 -0
  356. harflow_mcp-0.0.1/tests/test_workflow_run_node_execution.py +703 -0
  357. harflow_mcp-0.0.1/tests/test_workflow_run_node_interfaces.py +283 -0
  358. harflow_mcp-0.0.1/tests/test_workflow_run_node_recovery.py +1012 -0
  359. harflow_mcp-0.0.1/tests/test_workflow_run_node_regression.py +33 -0
  360. harflow_mcp-0.0.1/tests/test_workflow_runtime_safety.py +295 -0
  361. harflow_mcp-0.0.1/tests/test_workflow_save_authority.py +75 -0
  362. harflow_mcp-0.0.1/tests/test_workflow_selectable_parallel.py +351 -0
  363. harflow_mcp-0.0.1/tests/test_workflow_traversal.py +78 -0
  364. harflow_mcp-0.0.1/tests/test_workflow_tree_slots.py +95 -0
  365. harflow_mcp-0.0.1/tests/test_workflow_usage_limits.py +584 -0
  366. harflow_mcp-0.0.1/tests/test_workflows.py +2504 -0
  367. harflow_mcp-0.0.1/tests/test_writable_hardlinks.py +145 -0
  368. harflow_mcp-0.0.1/tests/workflow_receipt_fixtures.py +33 -0
  369. harflow_mcp-0.0.1/tests/workflow_run_fixtures.py +31 -0
  370. harflow_mcp-0.0.1/uv.lock +879 -0
@@ -0,0 +1,103 @@
1
+ name: Engine release
2
+ on:
3
+ release:
4
+ types: [published]
5
+ workflow_dispatch:
6
+ permissions: {}
7
+ jobs:
8
+ build:
9
+ if: github.repository == 'Harflow-Dev/HarflowMCP'
10
+ runs-on: ubuntu-latest
11
+ permissions:
12
+ contents: read
13
+ outputs:
14
+ version: ${{ steps.source.outputs.version }}
15
+ steps:
16
+ - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
17
+ with:
18
+ ref: ${{ github.sha }}
19
+ fetch-depth: 0
20
+ persist-credentials: false
21
+ - uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6
22
+ with:
23
+ version: '0.9.26'
24
+ python-version: '3.13'
25
+ - name: Validate immutable source
26
+ id: source
27
+ env:
28
+ RELEASE_TAG: ${{ github.event.release.tag_name }}
29
+ EVENT_NAME: ${{ github.event_name }}
30
+ EVENT_SHA: ${{ github.sha }}
31
+ run: |
32
+ if [ "$EVENT_NAME" = release ]; then
33
+ version=$(uv run --locked python -I scripts/release.py source --tag "$RELEASE_TAG" --sha "$EVENT_SHA")
34
+ else
35
+ version=$(uv run --locked python -I scripts/release.py source)
36
+ fi
37
+ echo "version=$version" >> "$GITHUB_OUTPUT"
38
+ - name: Build and validate exact packages
39
+ run: |
40
+ uv sync --locked
41
+ uv build --no-create-gitignore --build-constraints release-build-constraints.txt
42
+ uv run --locked python -I scripts/release.py artifacts
43
+ uv run --locked python -I scripts/release.py smoke --file dist/harflow_mcp-${{ steps.source.outputs.version }}-py3-none-any.whl
44
+ - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
45
+ with:
46
+ name: engine-${{ github.sha }}
47
+ path: |
48
+ dist/*
49
+ server.json
50
+ if-no-files-found: error
51
+ pypi:
52
+ if: github.event_name == 'release' && github.repository == 'Harflow-Dev/HarflowMCP'
53
+ needs: build
54
+ runs-on: ubuntu-latest
55
+ environment: pypi
56
+ permissions:
57
+ id-token: write
58
+ steps:
59
+ - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
60
+ with:
61
+ name: engine-${{ github.sha }}
62
+ - name: Verify carried artifacts
63
+ run: cd dist && sha256sum --check SHA256SUMS && rm SHA256SUMS
64
+ - uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3
65
+ with:
66
+ packages-dir: dist/
67
+ registry:
68
+ if: github.event_name == 'release' && github.repository == 'Harflow-Dev/HarflowMCP'
69
+ needs: [build, pypi]
70
+ runs-on: ubuntu-latest
71
+ permissions:
72
+ contents: read
73
+ id-token: write
74
+ steps:
75
+ - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
76
+ with:
77
+ ref: ${{ github.sha }}
78
+ persist-credentials: false
79
+ - uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6
80
+ with:
81
+ version: '0.9.26'
82
+ python-version: '3.13'
83
+ - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
84
+ with:
85
+ name: engine-${{ github.sha }}
86
+ path: release-input
87
+ - name: Validate exact public package and publisher
88
+ env:
89
+ VERSION: ${{ needs.build.outputs.version }}
90
+ run: |
91
+ uv run --locked python -I scripts/release.py checksums --dist release-input/dist
92
+ cmp server.json release-input/server.json
93
+ uv run --locked python -I scripts/release.py source
94
+ uv run --locked python -I scripts/release.py pypi --version "$VERSION" --file "release-input/dist/harflow_mcp-$VERSION-py3-none-any.whl"
95
+ curl --fail --show-error --silent --location --proto '=https' --tlsv1.2 https://github.com/modelcontextprotocol/registry/releases/download/v1.8.1/mcp-publisher_linux_amd64.tar.gz --output publisher.tar.gz
96
+ uv run --locked python -I scripts/release.py publisher --file publisher.tar.gz
97
+ mkdir publisher
98
+ tar -xzf publisher.tar.gz -C publisher mcp-publisher
99
+ publisher/mcp-publisher validate
100
+ - name: Publish registry metadata with GitHub OIDC
101
+ run: |
102
+ publisher/mcp-publisher login github-oidc
103
+ publisher/mcp-publisher publish
@@ -0,0 +1,18 @@
1
+ name: Engine checks
2
+ on: [push, pull_request]
3
+ jobs:
4
+ test:
5
+ strategy:
6
+ matrix:
7
+ os: [ubuntu-latest, macos-latest]
8
+ python: ['3.11', '3.13']
9
+ runs-on: ${{ matrix.os }}
10
+ steps:
11
+ - uses: actions/checkout@v4
12
+ - uses: astral-sh/setup-uv@v6
13
+ with:
14
+ python-version: ${{ matrix.python }}
15
+ - run: uv sync --locked
16
+ - run: uv run pytest --ignore=tests/test_monitor_profile.py --ignore=tests/test_swift_package_runner.py
17
+ - run: bash scripts/check-private-refs.sh
18
+ - run: uv run python scripts/check-legacy-names.py
@@ -0,0 +1,14 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ .venv/
4
+ dist/
5
+ build/
6
+ *.egg-info/
7
+ .pytest_cache/
8
+ .DS_Store
9
+ .build/
10
+ DerivedData/
11
+ xcuserdata/
12
+ macos/build/
13
+ .swiftpm/
14
+ .vscode-build/
@@ -0,0 +1,5 @@
1
+ # Documentation conventions
2
+
3
+ - Keep `README.md` focused on the product: purpose, current capabilities and limitations, prerequisites, getting started, and links to maintained guides.
4
+ - Put version history, release notes, fixes, migration milestones, and other change records in `CHANGELOG.md`. Do not use the README as a changelog or implementation-progress log.
5
+ - Link to `CHANGELOG.md` from the README. Keep detailed current behavior and technical guidance in `docs/`.
@@ -0,0 +1,44 @@
1
+ # Changelog
2
+
3
+ ## Unreleased
4
+
5
+ - Add local package validation and gated PyPI/MCP registry release workflows, with a registry-compatible server alias.
6
+
7
+ - Document the companion app’s exact paired managed runtime and preserve the separate automatic-opening limitation.
8
+
9
+ - Set the initial product version to 0.0.1 while preserving v1 wire and storage contracts.
10
+
11
+ - Qualify the shared notification database before task/workflow access; atomically bootstrap fresh storage, refuse incomplete or foreign schemas and WAL state, and preserve narrowly qualified native rollback recovery.
12
+
13
+ - Qualify task approval ledgers and request task identities with a bounded Harflow header; refuse incompatible sources before decisions while preserving action digests, permanent locks and existing delivery gates.
14
+ - Qualify flat task artifact manifests with filename-bound Harflow identity and finite JSON; refuse unqualified or incompatible manifests without overwrite while preserving metadata-only references, cursor revisions and existing budgets.
15
+ - Qualify individual live-input inbox rows with filename-bound Harflow envelopes before append; skip unqualified rows while preserving permanent locks, byte offsets, close markers and existing delivery evidence.
16
+ - Qualify parsed control phase payloads with filename-bound Harflow envelopes and stable-source reads; preserve existing marker-presence, lease, signal and retention semantics, and refuse older flat development payload authority.
17
+ - Qualify next-continuation follow-up ledgers with filename-bound Harflow envelopes and bounded source checks; refuse unqualified or changed sources before queue mutation, continuation launch or retention deletion.
18
+ - Qualify workflow ownership receipts with filename-bound identity, bounded source checks and stable refusal diagnostics across control and display consumers.
19
+ - Preflight receipt targets before run publication, refuse changed targets without overwrite, and stop same-run supervisor relaunch after blocked settlement while preserving ordered partial-write evidence.
20
+ - Qualify workflow run documents before storage, control, catalog ownership and retention decisions; preserve authored snapshots and public run payloads.
21
+ - Refuse incompatible or unavailable run sources with stable diagnostics and distinguish published runs from incomplete subsequent bookkeeping.
22
+
23
+ - Preserve multi-task caller cancellation during concurrent metadata/existence I/O completion and progress delivery on Python 3.11.
24
+ - Retry caller candidate acquisition once when every refused task source changed during reading, preserving strict complete-history and direct-read checks.
25
+ - Qualify saved workflow definitions and delegation migration backups with Harflow product identity and stable major/minor compatibility. Refuse unqualified sources and observable source changes before mutation.
26
+
27
+ - Qualify task metadata with `harflow.task` identity and stable major/minor compatibility; refuse older unqualified development task documents without adoption.
28
+ - Report task incompatibility and I/O unavailability separately, quarantine stale task-catalog authority, and expose incomplete history in listings and cancellation cascades.
29
+ - Prevent stale task updates and failed final persistence from authorizing overwrite or automatic continuation while preserving process cleanup.
30
+
31
+ - Mark fresh engine stores and enforce compatible shared ownership across processes, operations and background writers.
32
+ - Refuse nonempty unmarked or incompatible stores with explicit `state_incompatible` errors; report bounded ownership contention as `state_busy`.
33
+
34
+ - Centralize engine state-root selection and propagate `HARFLOW_STATE_ROOT` to agents and workflow supervisors.
35
+ - Refuse invalid selected roots at startup and unsupported injected task layouts before launch.
36
+ - Normalize relative explicit state paths and relative HOME defaults to absolute lexical paths against the working directory.
37
+
38
+ - Define explicit Harflow v1 ctl, setup and normalized event envelopes with product identity.
39
+ - Add side-effect-free version-info compatibility reporting and canonical cross-language fixtures.
40
+ - Emit structured setup process and usage errors when JSON output is requested.
41
+
42
+ - Extract the engine into HarflowMCP with independent package, command, environment, and state identities.
43
+ - Preserve current wire-format versions during extraction.
44
+ - Require requalification before enabling renamed native workflow adapters or extra writable path grants.
@@ -0,0 +1,179 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ Copyright 2026 Nayanda Haberty
@@ -0,0 +1,34 @@
1
+ Metadata-Version: 2.5
2
+ Name: harflow-mcp
3
+ Version: 0.0.1
4
+ Summary: Local MCP server that dispatches coding tasks to headless agents (Claude Code, Codex, opencode, vibe, Antigravity)
5
+ Author: Nayanda Haberty
6
+ License-Expression: Apache-2.0
7
+ License-File: LICENSE
8
+ Requires-Python: >=3.11
9
+ Requires-Dist: mcp<3,>=2.0
10
+ Requires-Dist: tomlkit<1,>=0.13
11
+ Description-Content-Type: text/markdown
12
+
13
+ # HarflowMCP
14
+
15
+ <!-- mcp-name: io.github.Harflow-Dev/harflow-mcp -->
16
+
17
+ HarflowMCP is a local MCP server that dispatches coding tasks to Claude Code, Codex, opencode, Vibe, and Antigravity. It provides persistent task history, bounded reads, cancellation, continuation, and reusable workflows.
18
+
19
+ Version 0.0.1 is under development and unreleased. [Harflow](https://github.com/Harflow-Dev/HarflowMac), the companion macOS application, is maintained separately and prepares its own exact paired engine runtime. Its managed runtime and MCP registrations work independently of the app process; see the [managed runtime guide](https://github.com/Harflow-Dev/HarflowMac/blob/main/docs/managed-runtime.md).
20
+
21
+ Use `harflow-ctl version-info --json` to inspect runtime identity and compatibility without initializing state. Engine operations require compatible Harflow state, task metadata, saved workflow definitions, workflow run documents and workflow ownership receipts. Use `HARFLOW_STATE_ROOT` to select a separate fresh state directory; see [state ownership and recovery](docs/contracts.md#state-ownership-and-recovery) for compatibility requirements.
22
+
23
+ - [Getting started](docs/getting-started.md)
24
+ - [Workflows](docs/workflows.md)
25
+ - [Task continuation](docs/task-continuation.md)
26
+ - [Task artifacts](docs/task-artifacts.md)
27
+ - [Task and workflow notifications](docs/task-notifications.md) (qualified Harflow database required)
28
+ - [Public contracts and runtime compatibility](docs/contracts.md)
29
+ - [Release validation and publication](docs/releasing.md)
30
+ - [Development and technical references](docs/development.md)
31
+
32
+ See the [Changelog](CHANGELOG.md) for change history.
33
+
34
+ Licensed under [Apache-2.0](LICENSE). Git history preserves source authorship; the license notice does not assert ownership of prior contributions.
@@ -0,0 +1,22 @@
1
+ # HarflowMCP
2
+
3
+ <!-- mcp-name: io.github.Harflow-Dev/harflow-mcp -->
4
+
5
+ HarflowMCP is a local MCP server that dispatches coding tasks to Claude Code, Codex, opencode, Vibe, and Antigravity. It provides persistent task history, bounded reads, cancellation, continuation, and reusable workflows.
6
+
7
+ Version 0.0.1 is under development and unreleased. [Harflow](https://github.com/Harflow-Dev/HarflowMac), the companion macOS application, is maintained separately and prepares its own exact paired engine runtime. Its managed runtime and MCP registrations work independently of the app process; see the [managed runtime guide](https://github.com/Harflow-Dev/HarflowMac/blob/main/docs/managed-runtime.md).
8
+
9
+ Use `harflow-ctl version-info --json` to inspect runtime identity and compatibility without initializing state. Engine operations require compatible Harflow state, task metadata, saved workflow definitions, workflow run documents and workflow ownership receipts. Use `HARFLOW_STATE_ROOT` to select a separate fresh state directory; see [state ownership and recovery](docs/contracts.md#state-ownership-and-recovery) for compatibility requirements.
10
+
11
+ - [Getting started](docs/getting-started.md)
12
+ - [Workflows](docs/workflows.md)
13
+ - [Task continuation](docs/task-continuation.md)
14
+ - [Task artifacts](docs/task-artifacts.md)
15
+ - [Task and workflow notifications](docs/task-notifications.md) (qualified Harflow database required)
16
+ - [Public contracts and runtime compatibility](docs/contracts.md)
17
+ - [Release validation and publication](docs/releasing.md)
18
+ - [Development and technical references](docs/development.md)
19
+
20
+ See the [Changelog](CHANGELOG.md) for change history.
21
+
22
+ Licensed under [Apache-2.0](LICENSE). Git history preserves source authorship; the license notice does not assert ownership of prior contributions.
@@ -0,0 +1 @@
1
+ {"errors":{"missing":{"code":"not_found","message":"Task not found"}},"format":"harflow.ctl","product":"harflow","product_version":"0.0.1","tasks":[{"status":"completed","task_id":"task-fixture"}],"v":1}
@@ -0,0 +1 @@
1
+ {"error":{"code":"not_found","message":"Task not found"},"format":"harflow.ctl","product":"harflow","product_version":"0.0.1","v":1}
@@ -0,0 +1 @@
1
+ {"format":"harflow.ctl","product":"harflow","product_version":"1.1.2","result":{"events":[{"format":"harflow.event","kind":"assistant_text","observed_at":"2026-10-18T00:00:00+00:00","product":"harflow","product_version":"1.0.7","raw_offset":0,"seq":1,"source_ts":null,"task_id":"task-fixture","text":"Fixture output","v":1}],"has_more":false},"v":1}
@@ -0,0 +1 @@
1
+ {"format":"harflow.ctl","product":"harflow","product_version":"0.0.1","result":{"events":[{"format":"harflow.event","kind":"assistant_text","observed_at":"2026-10-18T00:00:00+00:00","product":"harflow","product_version":"0.0.1","raw_offset":0,"seq":1,"source_ts":null,"task_id":"task-fixture","text":"Fixture output","v":1}],"has_more":false,"next_after_seq":1,"next_before_seq":1},"v":1}
@@ -0,0 +1 @@
1
+ {"format":"harflow.ctl","optional_future_field":{"value":true},"product":"harflow","product_version":"0.0.1","task":{"status":"completed","task_id":"task-fixture"},"v":1}
@@ -0,0 +1 @@
1
+ {"error":{"code":"usage","message":"the following arguments are required: command"},"format":"harflow.ctl","product":"harflow","product_version":"0.0.1","v":1}
@@ -0,0 +1 @@
1
+ {"format":"harflow.event","kind":"assistant_text","observed_at":"2026-10-18T00:00:00+00:00","product":"harflow","product_version":"1.0.7","raw_offset":0,"seq":1,"source_ts":null,"task_id":"task-fixture","text":"Fixture output","v":1}
@@ -0,0 +1 @@
1
+ {"format":"harflow.event","kind":"assistant_text","observed_at":"2026-10-18T00:00:00+00:00","product":"harflow","product_version":"0.0.1","raw_offset":0,"seq":1,"source_ts":null,"task_id":"task-fixture","text":"Fixture output","v":1}
@@ -0,0 +1 @@
1
+ {"format":"harflow.event","kind":"future_event_kind","observed_at":"2026-10-18T00:00:00+00:00","optional_future_field":{"value":true},"product":"harflow","product_version":"0.0.1","raw_offset":0,"seq":1,"source_ts":null,"task_id":"task-fixture","text":"Fixture output","v":1}
@@ -0,0 +1 @@
1
+ {"architecture":"arm64","capabilities":["ctl.v1","setup.v1","events.v1","version-info.v1"],"component":"engine","contracts":{"ctl":{"format":"harflow.ctl","v":1},"events":{"format":"harflow.event","v":1},"setup":{"format":"harflow.setup","v":1}},"format":"harflow.version-info","os":"darwin","product":"harflow","product_version":"0.0.1","state_root":"/tmp/harflow-fixture-home/.harflow","v":true}
@@ -0,0 +1 @@
1
+ {"format":"harflow.ctl","product":"harflow","product_version":"0.0.1","result":{"events":[{"format":"harflow.event","kind":"assistant_text","observed_at":"2026-10-18T00:00:00+00:00","product":"other","product_version":"0.0.1","raw_offset":0,"seq":1,"source_ts":null,"task_id":"task-fixture","text":"Fixture output","v":1}],"has_more":false},"v":1}
@@ -0,0 +1 @@
1
+ {"architecture":"arm64","capabilities":["ctl.v1","setup.v1","events.v1","version-info.v1"],"component":"engine","contracts":{"ctl":{"format":"harflow.ctl","v":1},"events":{"format":"harflow.event","v":1},"setup":{"format":"harflow.setup","v":1}},"format":"harflow.ctl","os":"darwin","product":"harflow","product_version":"0.0.1","state_root":"/tmp/harflow-fixture-home/.harflow","v":1}
@@ -0,0 +1 @@
1
+ {"architecture":"arm64","capabilities":["ctl.v1","setup.v1","events.v1","version-info.v1"],"component":"engine","contracts":{"ctl":{"format":"harflow.ctl","v":1},"events":{"format":"harflow.event","v":1},"setup":{"format":"harflow.setup","v":1}},"format":"harflow.version-info","os":"darwin","product":"other","product_version":"0.0.1","state_root":"/tmp/harflow-fixture-home/.harflow","v":1}
@@ -0,0 +1 @@
1
+ {"architecture":"arm64","capabilities":["ctl.v1","setup.v1","events.v1","version-info.v1"],"component":"engine","contracts":{"ctl":{"format":"harflow.ctl","v":1},"events":{"format":"harflow.event","v":1},"setup":{"format":"harflow.setup","v":1}},"format":"harflow.version-info","os":"darwin","product":"harflow","product_version":"1.0.0","state_root":"/tmp/harflow-fixture-home/.harflow","v":1}
@@ -0,0 +1 @@
1
+ {"architecture":"arm64","capabilities":["ctl.v1","setup.v1","events.v1","version-info.v1"],"component":"engine","contracts":{"ctl":{"format":"harflow.ctl","v":1},"events":{"format":"harflow.event","v":1},"setup":{"format":"harflow.setup","v":1}},"format":"harflow.version-info","os":"darwin","product":"harflow","product_version":"01.0.0","state_root":"/tmp/harflow-fixture-home/.harflow","v":1}
@@ -0,0 +1 @@
1
+ {"architecture":"arm64","capabilities":["ctl.v1","setup.v1","events.v1","version-info.v1"],"component":"engine","contracts":{"ctl":{"format":"harflow.ctl","v":1},"events":{"format":"harflow.event","v":1},"setup":{"format":"harflow.setup","v":1}},"format":"harflow.version-info","os":"darwin","product":"harflow","product_version":"0.1.0","state_root":"/tmp/harflow-fixture-home/.harflow","v":1}
@@ -0,0 +1 @@
1
+ {"architecture":"arm64","capabilities":["version-info.v1"],"component":"engine","contracts":{"ctl":{"format":"harflow.ctl","v":1},"events":{"format":"harflow.event","v":1},"setup":{"format":"harflow.setup","v":1}},"format":"harflow.version-info","os":"darwin","product":"harflow","product_version":"0.0.1","state_root":"/tmp/harflow-fixture-home/.harflow","v":1}
@@ -0,0 +1 @@
1
+ {"architecture":"arm64","capabilities":["ctl.v1","setup.v1","events.v1","version-info.v1"],"component":"engine","contracts":{"ctl":{"format":"harflow.ctl","v":1},"events":{"format":"harflow.event","v":1},"setup":{"format":"harflow.setup","v":1}},"format":"harflow.version-info","os":"darwin","product_version":"0.0.1","state_root":"/tmp/harflow-fixture-home/.harflow","v":1}
@@ -0,0 +1 @@
1
+ {"architecture":"arm64","capabilities":["ctl.v1","setup.v1","events.v1","version-info.v1"],"component":"engine","contracts":{"ctl":{"format":"harflow.ctl","v":1},"events":{"format":"harflow.event","v":1},"setup":{"format":"harflow.setup","v":1}},"format":"harflow.version-info","os":"darwin","product":"harflow","product_version":"2147483648.0.0","state_root":"/tmp/harflow-fixture-home/.harflow","v":1}
@@ -0,0 +1 @@
1
+ {"architecture":"arm64","capabilities":["ctl.v1","setup.v1","events.v1","version-info.v1"],"component":"engine","contracts":{"ctl":{"format":"harflow.ctl","v":1},"events":{"format":"harflow.event","v":1},"setup":{"format":"harflow.setup","v":1}},"format":"harflow.version-info","os":"darwin","product":"harflow","product_version":"0.0.1-beta.1","state_root":"/tmp/harflow-fixture-home/.harflow","v":1}
@@ -0,0 +1 @@
1
+ {"architecture":"arm64","capabilities":["ctl.v1","setup.v1","events.v1","version-info.v1"],"component":"engine","contracts":{"ctl":{"format":"harflow.ctl","v":1},"events":{"format":"harflow.event","v":1},"setup":{"format":"harflow.setup","v":1}},"format":"harflow.version-info","os":"darwin","product":"harflow","product_version":"0.0.1","state_root":"/tmp/harflow-fixture-home/.harflow","v":2}
@@ -0,0 +1 @@
1
+ {"definition":{"connections":[{"id":"begin","source":"start","target":"work"},{"id":"finish","source":"work","target":"end"}],"name":"fixture","nodes":[{"id":"start","type":"start"},{"agent":{"backend":"codex"},"id":"work","instructions":"Do the work","role":"task","type":"agent"},{"id":"end","type":"end"}],"orchestrator":{"backend":"codex"},"routing_mode":"explicit"},"format":"other.workflow.definition","product":"other","product_version":"0.0.1","v":1}
@@ -0,0 +1 @@
1
+ {"connections":[{"id":"begin","source":"start","target":"work"},{"id":"finish","source":"work","target":"end"}],"name":"fixture","nodes":[{"id":"start","type":"start"},{"agent":{"backend":"codex"},"id":"work","instructions":"Do the work","role":"task","type":"agent"},{"id":"end","type":"end"}],"orchestrator":{"backend":"codex"},"routing_mode":"explicit"}
@@ -0,0 +1 @@
1
+ {"definition":{"connections":[{"id":"begin","source":"start","target":"work"},{"id":"finish","source":"work","target":"end"}],"name":"fixture","nodes":[{"id":"start","type":"start"},{"agent":{"backend":"codex"},"id":"work","instructions":"Do the work","role":"task","type":"agent"},{"id":"end","type":"end"}],"orchestrator":{"backend":"codex"},"routing_mode":"explicit"},"format":"harflow.workflow.definition","product":"harflow","product_version":"1.0.0","v":1}
@@ -0,0 +1 @@
1
+ {"format":"harflow.workflow.run","product":"harflow","product_version":"0.0.1","run":{"activations":[],"attempt_grants":{},"created_at":1.0,"definition":{"connections":[],"name":"fixture","nodes":[],"orchestrator":{"backend":"codex"},"revision":1,"workflow_id":"fixture"},"definition_hash":"fixture","decisions":[],"freedom":"read_only","instructions":"","joins":{},"kind":"workflow","name":"Fixture","network":null,"pending":[],"permission_policy":"legacy_ceiling","prompt":"fixture prompt","repo_path":"/tmp/fixture","retry_counts":{},"retry_grants":{},"revision":1,"sequence":0,"sessions":{},"status":"completed","supervisor_pid":null,"suppressed_candidates":[],"tasks":[],"transitions":0,"updated_at":1.0,"workflow_run_id":"fixture-run-invalid"},"v":2}