agentflow-proof 1.1.0__tar.gz → 1.2.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 (88) hide show
  1. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/CHANGELOG.md +131 -1
  2. {agentflow_proof-1.1.0/src/agentflow_proof.egg-info → agentflow_proof-1.2.0}/PKG-INFO +1 -1
  3. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/pyproject.toml +2 -2
  4. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/src/agentflow/__init__.py +1 -1
  5. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/src/agentflow/cli.py +137 -93
  6. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/src/agentflow/cli_contract.py +14 -3
  7. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/src/agentflow/execution.py +17 -5
  8. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/src/agentflow/execution_coverage.py +2 -1
  9. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/src/agentflow/mcp_server.py +12 -3
  10. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/src/agentflow/porcelain.py +282 -83
  11. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0/src/agentflow_proof.egg-info}/PKG-INFO +1 -1
  12. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/tests/test_cli.py +120 -0
  13. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/tests/test_distribution.py +5 -2
  14. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/tests/test_execution_state.py +38 -0
  15. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/tests/test_execution_verification.py +133 -0
  16. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/tests/test_mcp_server.py +15 -0
  17. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/tests/test_porcelain.py +1458 -1
  18. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/tests/test_release.py +9 -3
  19. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/tests/test_stability_policy.py +35 -0
  20. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/tests/test_stop_gate.py +70 -3
  21. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/LICENSE +0 -0
  22. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/MANIFEST.in +0 -0
  23. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/README.md +0 -0
  24. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/setup.cfg +0 -0
  25. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/src/agentflow/__main__.py +0 -0
  26. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/src/agentflow/aggregate.py +0 -0
  27. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/src/agentflow/artifacts.py +0 -0
  28. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/src/agentflow/capabilities.py +0 -0
  29. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/src/agentflow/contracts.py +0 -0
  30. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/src/agentflow/coverage.py +0 -0
  31. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/src/agentflow/draft_plan.py +0 -0
  32. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/src/agentflow/events.py +0 -0
  33. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/src/agentflow/git.py +0 -0
  34. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/src/agentflow/handoff.py +0 -0
  35. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/src/agentflow/hunks.py +0 -0
  36. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/src/agentflow/locks.py +0 -0
  37. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/src/agentflow/packs.py +0 -0
  38. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/src/agentflow/proof.py +0 -0
  39. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/src/agentflow/receipts.py +0 -0
  40. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/src/agentflow/recommend.py +0 -0
  41. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/src/agentflow/review.py +0 -0
  42. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/src/agentflow/review_runner.py +0 -0
  43. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/src/agentflow/risk.py +0 -0
  44. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/src/agentflow/runtime.py +0 -0
  45. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/src/agentflow/stuck.py +0 -0
  46. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/src/agentflow/validation.py +0 -0
  47. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/src/agentflow/versioning.py +0 -0
  48. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/src/agentflow/viewer.py +0 -0
  49. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/src/agentflow/workflow_contract.py +0 -0
  50. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/src/agentflow_proof.egg-info/SOURCES.txt +0 -0
  51. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/src/agentflow_proof.egg-info/dependency_links.txt +0 -0
  52. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/src/agentflow_proof.egg-info/entry_points.txt +0 -0
  53. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/src/agentflow_proof.egg-info/top_level.txt +0 -0
  54. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/tests/test_aggregate.py +0 -0
  55. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/tests/test_ai_kit.py +0 -0
  56. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/tests/test_artifact_versioning.py +0 -0
  57. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/tests/test_build_zipapp.py +0 -0
  58. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/tests/test_capabilities.py +0 -0
  59. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/tests/test_ci_proof_bundle.py +0 -0
  60. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/tests/test_config_contract.py +0 -0
  61. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/tests/test_draft_plan.py +0 -0
  62. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/tests/test_events.py +0 -0
  63. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/tests/test_example_aggregation.py +0 -0
  64. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/tests/test_example_mcp.py +0 -0
  65. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/tests/test_example_workflow_pack.py +0 -0
  66. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/tests/test_examples.py +0 -0
  67. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/tests/test_execution_contract.py +0 -0
  68. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/tests/test_handoff.py +0 -0
  69. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/tests/test_hunks.py +0 -0
  70. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/tests/test_lease_enforcement.py +0 -0
  71. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/tests/test_lease_locking.py +0 -0
  72. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/tests/test_packs.py +0 -0
  73. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/tests/test_proof.py +0 -0
  74. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/tests/test_proof_compatibility.py +0 -0
  75. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/tests/test_public_project_contract.py +0 -0
  76. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/tests/test_receipt_concurrency.py +0 -0
  77. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/tests/test_receipts.py +0 -0
  78. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/tests/test_recommend.py +0 -0
  79. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/tests/test_review.py +0 -0
  80. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/tests/test_review_runner.py +0 -0
  81. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/tests/test_risk.py +0 -0
  82. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/tests/test_runtime.py +0 -0
  83. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/tests/test_schema_contracts.py +0 -0
  84. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/tests/test_schema_soak.py +0 -0
  85. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/tests/test_stuck.py +0 -0
  86. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/tests/test_versioning.py +0 -0
  87. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/tests/test_view_proof.py +0 -0
  88. {agentflow_proof-1.1.0 → agentflow_proof-1.2.0}/tests/test_workflow_contract.py +0 -0
@@ -7,6 +7,134 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.2.0] - 2026-10-29
11
+
12
+ Agentflow 1.2.0 shows why a run is stuck. `next-step --explain` reports why
13
+ no step is eligible (#71). `next-action` reports the blockers recorded with
14
+ `block-step` and `fail-step`, and the stop hook prints the current ones when it
15
+ refuses a stop (#72). `next-action` now answers only from the ledger rows it
16
+ validated, and agent-written ledger text reaches the terminal with
17
+ non-printable characters shown as `?`. Every change is additive under
18
+ `docs/stability.md`: a new flag, a new `next-action --json` key, new
19
+ `value_sets` codes in `docs/cli-contract.json` and an optional MCP input. No
20
+ artifact schema or schema-version constant changes.
21
+
22
+ ### Added
23
+
24
+ - `next-action --json` reports `recorded_blockers`. It has one entry per
25
+ attempt closed by `block-step` or `fail-step`, in ledger order, with
26
+ `step_id`, `attempt_id`, `event` (`blocked` or `failed`), `reason`,
27
+ `recorded_at`, `attempt_owner` and `superseded_by` (the first later attempt
28
+ of the same step, or `null` for a current blocker). It is derived from the
29
+ validated step ledger and absent for `uninitialized`, `plan_unlocked`,
30
+ `execution_uninitialized` and `state_invalid`. `state`, `blocking` and the
31
+ recovery actions are unchanged. The MCP `next_action` tool carries the field.
32
+ Human `next-action` output adds one `recorded blocker:` line per current
33
+ blocker, with control characters shown as `?` and the reason cut at 200
34
+ characters. (#72)
35
+
36
+ - `next-step --explain` reports why no step is eligible. With `--json` it
37
+ prints `{step, reason_code, diagnostics}`, where `reason_code` is
38
+ `eligible`, `dependencies_unmet`, `open_attempts` or `steps_complete`.
39
+ `steps_complete` requires that no attempt is open anywhere, amendments
40
+ included; it does not mean the run verifies (use `next-action`). With
41
+ `--explain`, an invalid plan, contract or ledger exits 1 instead of looking
42
+ like a finished run. Plain `next-step` and `next-step --json` are
43
+ unchanged. `docs/cli-contract.json` lists the codes in `value_sets`. MCP
44
+ `next_step` takes an optional `explain` input. (#71)
45
+
46
+ ### Changed
47
+
48
+ - `hooks/stop-gate.sh` prints `agentflow next-action` (the next action and any
49
+ current recorded blocker) and a fixed line pointing to operator interruption
50
+ to stderr when it refuses a stop. Stdout and exit codes are unchanged, and a
51
+ recorded blocker still does not satisfy the gate. (#72)
52
+
53
+ ### Fixed
54
+
55
+ - `next-action` reduces step state and selects the eligible step from the
56
+ `.agent/step-runs.jsonl` rows it validates and derives `recorded_blockers`
57
+ from. It used to read the ledger again for both, so a row appended during
58
+ the call could change the step state or the step offered to claim without
59
+ passing validation. (#72 follow-up)
60
+
61
+ - `next-action` answers from that validated snapshot or not at all. The
62
+ amend, in-flight, run, drift and proof checks read `.agent/` again, so when
63
+ the step, command or file receipt ledgers no longer equal the validated read
64
+ it now reports `state_invalid` ("execution ledgers changed during
65
+ next-action; run it again") instead of an answer steered by a row that never
66
+ passed validation. Malformed or unreadable ledgers encountered by the
67
+ downstream checks produce the same diagnostic. A claim offer comes from the
68
+ snapshot alone and is unaffected. (#72 follow-up)
69
+
70
+ - Standard output of `events`, `next-action`, `next-step --explain`,
71
+ `finish-step`, `finish-run`, `verify-step`, `detect-stuck` and
72
+ `replay-gates` shows non-printable characters in agent-written ledger text
73
+ (reasons, agent, attempt and receipt ids, recorded argv, recorded paths) as
74
+ `?`, as the `recorded blocker:` lines already did, so ANSI escapes, line
75
+ breaks and bidi overrides written to `.agent/` no longer reach the terminal
76
+ through these commands. `events` cuts a reason at 200 characters. `--json`
77
+ and `--jsonl` output is unchanged. The next entry covers the remaining
78
+ human output and error messages. (#71 follow-up)
79
+
80
+ - Human output of `audit-drift`, `verify-run`, `build-proof`, `verify-proof`,
81
+ `status`, `doctor`, `runtime-status` and `lint-handoff`, the acknowledgement
82
+ lines of commands that write `.agent/` ledgers, and error messages on stderr
83
+ also show non-printable characters as `?`. So does that text where it is
84
+ captured: `finish-run --json` `diagnostics`, and MCP `content` text,
85
+ `structuredContent.stdout` and `structuredContent.stderr` (the `status`,
86
+ `audit_drift`, `build_proof` and `verify_proof` tools return human output,
87
+ and a failing tool returns its stderr), including the error text the MCP
88
+ server builds for an unexpected exception. The rendering is deliberately
89
+ lossy: tab, NBSP and ZWJ also become `?`, and a multi-line message such as
90
+ git's own stderr prints as one line. Gate output is sanitized before
91
+ `finish-run` splits it into lines, so a recorded line break no longer adds
92
+ `diagnostics` entries. Captured human text has no byte-stability guarantee.
93
+ JSON keys and types, raw values in other `--json` output and in `.agent/`
94
+ files, flags and exit codes are unchanged. (#71 follow-up)
95
+
96
+ ## [1.1.1] - 2026-10-26
97
+
98
+ Agentflow 1.1.1 closes two gaps through which a step could complete, and a
99
+ proof issue, over a gate whose last run failed. `verify-step` judges a
100
+ structured command gate by its latest receipt in the attempt instead of its
101
+ first (#77), and `complete-step` re-runs that judgment before it closes an
102
+ attempt, as `finish-step` already did (#81). A failed gate run followed by an
103
+ identical passing one now verifies in the same attempt. No flag, artifact
104
+ schema, schema-version constant or `docs/cli-contract.json` change.
105
+
106
+ ### Fixed
107
+
108
+ - `verify-step` judges a structured command gate (`{"kind": "command", "run":
109
+ [...]}`) by the latest receipt in the attempt with the gate's exact argv. It
110
+ used the first one; legacy `step.validation` gates and requirement coverage
111
+ already used the latest. The verdict moves in both directions. It relaxes: a
112
+ failed first run followed by an identical passing run in the same attempt now
113
+ verifies, and `next-action` recommends `finish-step` instead of asking for the
114
+ same run again. It tightens: an identical failing or timed-out run after a
115
+ passing one now fails `verify-step` instead of being masked, so an attempt
116
+ that verified only because its later failure was ignored fails if
117
+ `verify-step` runs on it again. `finish-step`, `next-action` and the MCP
118
+ `verify_step` tool follow, since they use the same check, and the per-gate
119
+ `receipt_id` in the `next-action --json` resumability projection names the
120
+ later receipt. `complete-step` and `finish-step` still refuse an attempt that
121
+ holds a timed-out receipt anywhere in it. No receipt, artifact schema or
122
+ schema-version constant changes. (#77)
123
+ - `complete-step` re-runs the `verify-step` judgment (gates on their latest
124
+ receipts, inspection evidence and file scope) before it closes the attempt, as
125
+ `finish-step` already did. Previously it only checked that `verify-step` had
126
+ passed at some point, so a gate that failed after `verify-step` still
127
+ completed the step, and `verify-run`, `build-proof` and `verify-proof` then
128
+ passed over a failing last run. It now refuses (exit 1, nothing written) with
129
+ `<step> attempt <id> no longer passes verify-step: ...`; rerun the gate to a
130
+ pass, then complete. It reads `.agent/plan.lock.json` for this check and
131
+ refuses (exit 1, `cannot re-check <step> before completing: ...`) when the
132
+ plan is missing, unreadable or not a JSON object. Its other refusals keep
133
+ their messages and order: no or unopened attempt, closed attempt, a command
134
+ still running, a timed-out receipt, no `verify-step` yet, not the owner. The
135
+ MCP `complete_step` tool follows. No flag, artifact schema or schema-version
136
+ constant changes. (#81)
137
+
10
138
  ## [1.1.0] - 2026-10-18
11
139
 
12
140
  Agentflow 1.1.0 closes integrity and recovery gaps in the execution ledger and
@@ -219,7 +347,9 @@ repository, so this heading is intentionally unlinked._
219
347
 
220
348
  - Existing v0.2 proof artifacts remain valid when no execution contract exists.
221
349
 
222
- [Unreleased]: https://github.com/kstruzzieri/agentflow/compare/v1.1.0...HEAD
350
+ [Unreleased]: https://github.com/kstruzzieri/agentflow/compare/v1.2.0...HEAD
351
+ [1.2.0]: https://github.com/kstruzzieri/agentflow/compare/v1.1.1...v1.2.0
352
+ [1.1.1]: https://github.com/kstruzzieri/agentflow/compare/v1.1.0...v1.1.1
223
353
  [1.1.0]: https://github.com/kstruzzieri/agentflow/compare/v1.0.0...v1.1.0
224
354
  [1.0.0]: https://github.com/kstruzzieri/agentflow/releases/tag/v1.0.0
225
355
  [0.4.0]: https://github.com/kstruzzieri/agentflow/releases/tag/v0.4.0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agentflow-proof
3
- Version: 1.1.0
3
+ Version: 1.2.0
4
4
  Summary: A model-agnostic workflow runner for drift-resistant agentic development.
5
5
  Author: Agentflow contributors
6
6
  License-Expression: MIT
@@ -1,10 +1,10 @@
1
1
  [build-system]
2
- requires = ["setuptools==83.0.0"]
2
+ requires = ["setuptools==84.1.0"]
3
3
  build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "agentflow-proof"
7
- version = "1.1.0"
7
+ version = "1.2.0"
8
8
  description = "A model-agnostic workflow runner for drift-resistant agentic development."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -2,4 +2,4 @@
2
2
 
3
3
  __all__ = ["__version__"]
4
4
 
5
- __version__ = "1.1.0"
5
+ __version__ = "1.2.0"