agent-runtime-kit 0.5.0__tar.gz → 0.5.2__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 (78) hide show
  1. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/CHANGELOG.md +75 -0
  2. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/PKG-INFO +4 -4
  3. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/docs/providers.md +24 -8
  4. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/docs/sdk-evolution-agent-design.md +120 -85
  5. agent_runtime_kit-0.5.2/docs/sdk-evolution-agent.md +294 -0
  6. agent_runtime_kit-0.5.2/examples/sdk_evolution_agent/behavior.py +1488 -0
  7. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/examples/sdk_evolution_agent/cli.py +321 -87
  8. agent_runtime_kit-0.5.2/examples/sdk_evolution_agent/collectors.py +941 -0
  9. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/examples/sdk_evolution_agent/current_state.py +9 -0
  10. agent_runtime_kit-0.5.2/examples/sdk_evolution_agent/inspection.py +129 -0
  11. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/examples/sdk_evolution_agent/models.py +61 -1
  12. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/examples/sdk_evolution_agent/release_notes.py +45 -13
  13. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/examples/sdk_evolution_agent/report.py +128 -4
  14. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/examples/sdk_evolution_agent/schemas.py +20 -4
  15. agent_runtime_kit-0.5.2/examples/sdk_evolution_agent/snapshots.py +780 -0
  16. agent_runtime_kit-0.5.2/examples/sdk_evolution_agent/stages.py +1074 -0
  17. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/pyproject.toml +4 -10
  18. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/src/agent_runtime_kit/adapters/antigravity.py +111 -50
  19. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/src/agent_runtime_kit/compatibility.py +5 -5
  20. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/tests/test_antigravity_adapter.py +182 -15
  21. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/tests/test_sdk_contract.py +113 -2
  22. agent_runtime_kit-0.5.2/tests/test_sdk_evolution_agent.py +4461 -0
  23. agent_runtime_kit-0.5.2/tests/test_sdk_evolution_docs.py +358 -0
  24. agent_runtime_kit-0.5.0/docs/sdk-evolution-agent.md +0 -186
  25. agent_runtime_kit-0.5.0/examples/sdk_evolution_agent/behavior.py +0 -529
  26. agent_runtime_kit-0.5.0/examples/sdk_evolution_agent/collectors.py +0 -339
  27. agent_runtime_kit-0.5.0/examples/sdk_evolution_agent/snapshots.py +0 -242
  28. agent_runtime_kit-0.5.0/examples/sdk_evolution_agent/stages.py +0 -648
  29. agent_runtime_kit-0.5.0/tests/test_sdk_evolution_agent.py +0 -1735
  30. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/.gitignore +0 -0
  31. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/LICENSE +0 -0
  32. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/README.md +0 -0
  33. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/docs/api-stability.md +0 -0
  34. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/docs/capability-matrix.md +0 -0
  35. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/docs/live-smoke.md +0 -0
  36. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/docs/quickstart.md +0 -0
  37. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/docs/task-control.md +0 -0
  38. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/examples/__init__.py +0 -0
  39. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/examples/run_same_task.py +0 -0
  40. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/examples/sdk_evolution_agent/__init__.py +0 -0
  41. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/examples/sdk_evolution_agent/__main__.py +0 -0
  42. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/examples/sdk_evolution_agent/auth.py +0 -0
  43. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/examples/sdk_evolution_agent/events.py +0 -0
  44. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/examples/sdk_evolution_agent/pr.py +0 -0
  45. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/src/agent_runtime_kit/__init__.py +0 -0
  46. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/src/agent_runtime_kit/_control.py +0 -0
  47. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/src/agent_runtime_kit/_errors.py +0 -0
  48. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/src/agent_runtime_kit/_kit.py +0 -0
  49. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/src/agent_runtime_kit/_runtime.py +0 -0
  50. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/src/agent_runtime_kit/_schema.py +0 -0
  51. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/src/agent_runtime_kit/_types.py +0 -0
  52. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/src/agent_runtime_kit/adapters/__init__.py +0 -0
  53. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/src/agent_runtime_kit/adapters/_common.py +0 -0
  54. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/src/agent_runtime_kit/adapters/claude.py +0 -0
  55. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/src/agent_runtime_kit/adapters/codex.py +0 -0
  56. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/src/agent_runtime_kit/adapters/diagnostics.py +0 -0
  57. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/src/agent_runtime_kit/events.py +0 -0
  58. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/src/agent_runtime_kit/py.typed +0 -0
  59. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/src/agent_runtime_kit/readiness.py +0 -0
  60. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/src/agent_runtime_kit/registry.py +0 -0
  61. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/src/agent_runtime_kit/support.py +0 -0
  62. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/src/agent_runtime_kit/testing/__init__.py +0 -0
  63. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/src/agent_runtime_kit/testing/fakes.py +0 -0
  64. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/tests/test_adapter_common.py +0 -0
  65. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/tests/test_adapter_protocol.py +0 -0
  66. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/tests/test_claude_adapter.py +0 -0
  67. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/tests/test_codex_adapter.py +0 -0
  68. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/tests/test_control.py +0 -0
  69. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/tests/test_core.py +0 -0
  70. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/tests/test_events.py +0 -0
  71. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/tests/test_kit.py +0 -0
  72. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/tests/test_live_smoke.py +0 -0
  73. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/tests/test_mestre_compatibility.py +0 -0
  74. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/tests/test_optional_dependencies.py +0 -0
  75. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/tests/test_provider_diagnostics.py +0 -0
  76. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/tests/test_readiness.py +0 -0
  77. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/tests/test_schema.py +0 -0
  78. {agent_runtime_kit-0.5.0 → agent_runtime_kit-0.5.2}/tests/test_support.py +0 -0
@@ -5,6 +5,81 @@ All notable changes to this project are documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## 0.5.2 - 2026-09-19
9
+
10
+ ### Changed
11
+
12
+ - Updated tested Claude Agent SDK to `0.2.157`, Google Antigravity SDK to
13
+ `0.1.17`, and the Codex SDK and its exactly coupled CLI to `0.154.0`.
14
+ - SDK evolution supports explicit model, reasoning effort and analysis executable
15
+ options, preserves older locked baselines in implementation history, and
16
+ constructs real Claude options and Codex wire parameters in candidate probes.
17
+ - Upgrade skill invocations now include necessary runtime adaptations,
18
+ verification, and a regular pull request. Explicit report-only and local-only
19
+ requests retain their narrower scope.
20
+
21
+ ### Fixed
22
+
23
+ - Antigravity permissive deny-lists preserve all unrelated tools when the SDK's
24
+ default tool set changes, including the `ask_question` change in 0.1.17.
25
+ - Codex release evidence uses the current official documentation endpoints.
26
+ - Antigravity preserves explicit `vertex=True` with an API key for Vertex
27
+ Express authentication, rejects mixed regional credentials, and refuses older
28
+ SDKs or configurations that would silently drop the requested endpoint.
29
+ - Release-note collection recognizes versions present only in a GitHub
30
+ discussion title and rejects unrelated or longer version-prefix matches.
31
+ - PyPI publication validates and uploads Core Metadata 2.5 distributions with
32
+ matching Twine support.
33
+
34
+ ## 0.5.1 - 2026-08-29
35
+
36
+ ### Added
37
+
38
+ - SDK evolution reports now include recent-release implementation evidence:
39
+ shipped-file fingerprints, Python-definition diffs, opaque-runtime limits,
40
+ and implementation trends grounded in observed upstream artifacts.
41
+ - Exact baseline/candidate behavior probes now exercise adapter-owned semantic
42
+ contracts in reusable, credential-scrubbed disposable environments.
43
+ - Evolution artifacts now preserve independent upstream discovery, current and
44
+ prospective resolver results, exact candidate classifications, implementation
45
+ diffs, and stronger current-state provenance.
46
+
47
+ ### Changed
48
+
49
+ - Updated tested vendor runtimes from Claude Agent SDK `0.2.106` to `0.2.148`,
50
+ OpenAI Codex SDK `0.1.0b3` to `0.147.0`, its coupled CLI binary `0.137.0a4`
51
+ to `0.147.0`, and Google Antigravity SDK `0.1.4` to `0.1.15`.
52
+ - Raised the validated Codex SDK range to `<0.148`; the standalone Codex CLI
53
+ `0.149.0` remains an inspected artifact rather than an install candidate
54
+ because Codex SDK `0.147.0` requires CLI `0.147.0` exactly.
55
+ - SDK freshness checks now bypass repository and ambient UV release cooloffs so
56
+ upstream discovery, prospective resolution, and applied locks describe the
57
+ same current package state.
58
+ - Direction-of-travel analysis now reports trends in actual upstream
59
+ implementations instead of emitting dependency upgrade or hold advice.
60
+ - The repository-owned upgrade skill is the canonical operator workflow for
61
+ report-first discovery, gated implementation, and separately authorized PR
62
+ publication.
63
+
64
+ ### Fixed
65
+
66
+ - Candidate discovery no longer treats the current dependency bounds as proof
67
+ that no newer upstream release exists; excluded releases receive an
68
+ independent prospective resolver check.
69
+ - Missing optional SDKs, failed imports, skipped probes, malformed evidence, and
70
+ mismatched baseline/candidate versions can no longer produce a false-green
71
+ compatibility result or bypass implementation gates.
72
+ - Dependency application now updates project constraints, `uv.lock`, and the
73
+ compatibility manifest atomically, verifies exact inspected versions, and
74
+ restores all three artifacts if resolution or validation fails.
75
+ - Antigravity now maps short public session IDs deterministically to
76
+ provider-safe UUID conversation IDs while preserving the caller-visible
77
+ session identifier.
78
+ - Codex CLI binary snapshots use the correct import surface, and publication is
79
+ skipped for empty, unapplied, rolled-back, or unverified changes.
80
+ - Candidate installation and release-note collection now retry bounded transient
81
+ failures and report progress instead of appearing stalled.
82
+
8
83
  ## 0.5.0 - 2026-07-11
9
84
 
10
85
  ### Added
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.5
2
2
  Name: agent-runtime-kit
3
- Version: 0.5.0
3
+ Version: 0.5.2
4
4
  Summary: One typed runtime API for Claude, Codex, and Antigravity agent SDKs.
5
5
  Project-URL: Homepage, https://github.com/ebarti/agent-runtime-kit
6
6
  Project-URL: Repository, https://github.com/ebarti/agent-runtime-kit
@@ -22,13 +22,13 @@ Requires-Dist: jsonschema<5,>=4.18
22
22
  Provides-Extra: all
23
23
  Requires-Dist: claude-agent-sdk<0.3,>=0.2.87; extra == 'all'
24
24
  Requires-Dist: google-antigravity<0.2,>=0.1.2; extra == 'all'
25
- Requires-Dist: openai-codex<0.2,>=0.1.0b3; extra == 'all'
25
+ Requires-Dist: openai-codex<0.155,>=0.1.0b3; extra == 'all'
26
26
  Provides-Extra: antigravity
27
27
  Requires-Dist: google-antigravity<0.2,>=0.1.2; extra == 'antigravity'
28
28
  Provides-Extra: claude
29
29
  Requires-Dist: claude-agent-sdk<0.3,>=0.2.87; extra == 'claude'
30
30
  Provides-Extra: codex
31
- Requires-Dist: openai-codex<0.2,>=0.1.0b3; extra == 'codex'
31
+ Requires-Dist: openai-codex<0.155,>=0.1.0b3; extra == 'codex'
32
32
  Description-Content-Type: text/markdown
33
33
 
34
34
  # agent-runtime-kit
@@ -188,16 +188,32 @@ constructor, `GEMINI_API_KEY`, or `GOOGLE_API_KEY`. Without an API key, the
188
188
  adapter uses Vertex AI config with Google ADC when a project can be discovered
189
189
  from ADC, `GOOGLE_CLOUD_PROJECT`, or `GCLOUD_PROJECT`; location defaults to
190
190
  `global` unless `GOOGLE_CLOUD_LOCATION`, `GOOGLE_CLOUD_REGION`, or
191
- `CLOUD_ML_REGION` is set. Precedence: an explicit constructor `api_key` is the
192
- most specific request and wins; otherwise an explicit
191
+ `CLOUD_ML_REGION` is set. An explicit constructor `api_key` takes precedence over
192
+ ambient credentials. With `vertex=True`, that key selects Vertex Express mode
193
+ (supported by released `google-antigravity>=0.1.16` versions): no ADC, project,
194
+ or location is required. Older or unverifiable SDK releases raise
195
+ `UnsupportedTaskInputError` for Express mode; their existing authentication
196
+ modes remain available. Explicit project/location arguments cannot be combined
197
+ with Express mode. For example:
198
+
199
+ ```python
200
+ runtime = AntigravityAgentRuntime(vertex=True, api_key=vertex_express_key)
201
+ ```
202
+
203
+ Without an explicit key, an explicit
193
204
  `AntigravityAgentRuntime(vertex=True, ...)` takes precedence over an ambient
194
205
  `GEMINI_API_KEY`/`GOOGLE_API_KEY`, so a Vertex-configured runtime is never
195
- silently redirected to the Gemini API by an exported environment key. Under
196
- `PERMISSIVE`, `disallowed_tools` maps to `CapabilitiesConfig.disabled_tools`
197
- (the baseline is every tool, so "enable everything else" is exact); under any
198
- other posture the deny-list is folded into an allow-list of the mode's baseline
199
- minus the denied tools, so denying one tool can never re-enable others past the
200
- baseline. An allow-list and a deny-list are mutually exclusive (the SDK forbids
206
+ silently redirected to the Gemini API by an exported environment key. When no
207
+ model is supplied, the adapter preserves the vendor default (`gemini-3.8-flash`
208
+ in Antigravity 0.1.16); supply `default_model` or `AgentTask.model` when a stable
209
+ model selection is required. Under
210
+ `PERMISSIVE`, `disallowed_tools` becomes an explicit `enabled_tools` list of all
211
+ built-in tools minus the denied tools. Antigravity 0.1.17 changed its implicit
212
+ deny-list baseline to exclude `ask_question`; using an explicit list preserves
213
+ the adapter's existing all-tools contract. Under other postures the deny-list
214
+ is subtracted from the mode's narrower baseline, so denying one tool can never
215
+ re-enable others past that baseline. An allow-list and a deny-list are mutually
216
+ exclusive (the SDK forbids
201
217
  combining enabled and disabled tool lists), so supplying both is rejected. Tool
202
218
  names are validated against the
203
219
  `BuiltinTools` enum (`"view_file"`, not `"Read"`). `budget_usd` and
@@ -14,7 +14,8 @@ or manual design stop.
14
14
  The SDK evolution agent should answer these questions for every run:
15
15
 
16
16
  - What package versions are installed, locked, and available upstream?
17
- - Which packages does the resolver actually want to update?
17
+ - Which newer upstream releases exist, which are excluded by current bounds,
18
+ and which exact versions are prospectively resolvable together?
18
19
  - What changed in public API shape?
19
20
  - What changed in documented behavior or product direction?
20
21
  - Which adapter behavior contracts still pass on the candidate versions?
@@ -75,18 +76,22 @@ Step responsibilities:
75
76
  `pyproject.toml`, `uv.lock`, installed distributions, package metadata,
76
77
  configured source hints, local environment facts, and supported auth
77
78
  availability. This produces raw facts, not recommendations.
78
- - **Resolve update candidates**: Run the targeted resolver preview with
79
- freshness cutoffs removed. This step decides which packages are real update
80
- candidates for the run. It should use resolver output rather than only PyPI
81
- `latest` metadata, especially for prerelease packages.
82
- - **Inspect current and candidate APIs**: Load API snapshot and diff artifacts
83
- from the last update run, then focus new inspection on packages that the
84
- resolver selected for update or packages whose evidence is missing, stale, or
85
- incompatible with the current evidence schema. This step owns API snapshot and
86
- API diff artifacts. If the evidence signature changes, the agent may need to
87
- refresh the current-state snapshot or gather more current-state data before
88
- comparing candidates. If an update candidate has no candidate API diff, the
89
- run should not proceed to implementation.
79
+ - **Resolve update candidates**: Build the candidate inventory from independent
80
+ upstream package metadata before consulting current constraints. Run both the
81
+ current targeted resolver preview and, when an upper bound excludes a newer
82
+ release, a no-mutation prospective preview in a temporary manifest with only
83
+ the excluding upper bound widened. Resolver output classifies feasibility; it
84
+ must not define away candidates hidden by the current manifest.
85
+ - **Inspect current and candidate APIs**: Treat `uv.lock` as the baseline and
86
+ inspect every exact compatible candidate. Reuse one credential-scrubbed
87
+ package/version environment for its snapshot and behavior probe. If an update
88
+ candidate has no exact candidate API diff, the run must not proceed to
89
+ implementation.
90
+ - **Inspect recent implementations**: When explicit candidate inspection is
91
+ enabled, inspect the three most recent published releases independently of
92
+ whether an update is pending. Fingerprint shipped files and Python AST
93
+ definitions, compare adjacent releases, and preserve opaque-artifact
94
+ limitations. This evidence is longitudinal analysis, not resolver input.
90
95
  - **Collect changelog and release-note evidence**: Fetch or read official
91
96
  changelogs, release pages, docs changelogs, repository releases, and package
92
97
  metadata links. This step records what changed according to the vendor and
@@ -100,10 +105,12 @@ Step responsibilities:
100
105
  snapshots, API diffs, release-note evidence, behavior probe results, source
101
106
  references, and uncertainty into a compact bundle for the AI stages. This step
102
107
  should preserve provenance so later reasoning can be traced back to evidence.
103
- - **Direction analysis through agent-runtime-kit**: Ask a runtime, via
104
- `AgentTask`, to infer direction-of-travel themes from the evidence. This step
105
- identifies whether changes look isolated or part of a broader SDK direction,
106
- but it does not own the concrete implementation plan.
108
+ - **Implementation-trend analysis through agent-runtime-kit**: Ask a runtime,
109
+ via `AgentTask`, to infer implementation patterns from exact recent-release
110
+ file and definition diffs, corroborated by API, behavior, and release-note
111
+ evidence. This step identifies whether changes look isolated or part of a
112
+ broader SDK implementation direction. It must not recommend upgrade, hold,
113
+ resolver, or lockfile actions; it does not own the implementation plan.
107
114
  - **Architecture decision and update plan through agent-runtime-kit**: Ask a
108
115
  runtime, via `AgentTask`, to turn direction analysis into the concrete plan:
109
116
  adapter-only, test-only, docs-only, capability metadata change,
@@ -123,26 +130,26 @@ Step responsibilities:
123
130
  report with the evidence bundle, analysis, decision, reviewer output,
124
131
  uncertainty, blocked reasons, and the exact manual review questions. This is a
125
132
  valid end state, not a failed run.
126
- - **Apply safe implementation**: Apply only the changes allowed by the accepted
127
- architecture decision and deterministic gates. This may include lockfile
128
- updates, adapter changes, tests, docs, examples, compatibility shims, or report
129
- changes. It must not implement changes that were classified as
130
- `manual_design_required`.
133
+ - **Apply safe implementation**: The built-in deterministic implementation lane
134
+ widens only excluding dependency upper bounds, refreshes the lock to the exact
135
+ inspected compatible versions, and rolls both files back on mismatch or
136
+ verification failure. Adapter, public API, test, or documentation changes are
137
+ scoped coding work triggered by a blocked report; they require regression
138
+ evidence and a green rerun before the dependency lane proceeds.
131
139
  - **Run verification**: Run the verification commands required by the
132
140
  architecture decision. At minimum, this should cover formatting/linting,
133
141
  typing, unit tests, lock checks, report generation checks, and any available
134
142
  live smoke needed for the affected runtime behavior.
135
143
  - **Promote updated state to current baseline**: After implementation and
136
- verification pass, save the updated lock/package/API/release-note/probe state
137
- as the new current-state baseline for the next run. This promotion should be
138
- explicit, atomic, and tied to the verified commit or workspace state. Failed,
139
- blocked, or manual-design-required runs must not replace the current baseline.
144
+ verification pass, record the updated lock/package/API/release-note/probe state
145
+ in `current_state.json`, tied to the verified workspace state. Failed, blocked,
146
+ or manual-design-required runs are never marked promoted.
140
147
  - **Write report and optional draft PR**: Write the final local report with
141
148
  evidence, decisions, implementation summary, baseline-promotion result, test
142
149
  results, uncertainty, and manual checklist. If explicitly configured and
143
150
  authenticated, create or update a draft PR. This step must never auto-merge.
144
151
 
145
- Every box before direction analysis is deterministic. AI stages may interpret
152
+ Every box before implementation-trend analysis is deterministic. AI stages may interpret
146
153
  evidence, but they should not invent evidence that was not collected.
147
154
 
148
155
  ## Operating Modes
@@ -150,27 +157,34 @@ evidence, but they should not invent evidence that was not collected.
150
157
  The default command should be report-only:
151
158
 
152
159
  ```bash
153
- python -m examples.sdk_evolution_agent --runtime fake --refresh-preview
160
+ uv run --locked python -m examples.sdk_evolution_agent \
161
+ --runtime fake \
162
+ --refresh-preview
154
163
  ```
155
164
 
156
165
  This mode collects evidence, writes artifacts, runs the analysis stages through
157
- the selected runtime, and stops before editing the workspace. The fake runtime is
158
- allowed only as a deterministic development harness. It proves the pipeline and
159
- schemas, not the quality of AI reasoning.
166
+ the selected runtime, and stops before editing the workspace. The fake runtime
167
+ is allowed only as a deterministic pipeline-shape harness. It proves the
168
+ pipeline and schemas, not upgrade safety or the quality of AI reasoning. When
169
+ updates exist, the default no-inspection run records incomplete candidate
170
+ evidence.
160
171
 
161
172
  A real analysis run should select one configured runtime:
162
173
 
163
174
  ```bash
164
- python -m examples.sdk_evolution_agent --runtime claude-agent-sdk --refresh-preview
165
- python -m examples.sdk_evolution_agent --runtime codex-agent-sdk --refresh-preview
166
- python -m examples.sdk_evolution_agent --runtime antigravity-agent-sdk --refresh-preview
175
+ uv run --locked --extra claude python -m examples.sdk_evolution_agent \
176
+ --runtime claude-agent-sdk --refresh-preview --inspect-candidates
177
+ uv run --locked --extra codex python -m examples.sdk_evolution_agent \
178
+ --runtime codex-agent-sdk --refresh-preview --inspect-candidates
179
+ uv run --locked --extra antigravity python -m examples.sdk_evolution_agent \
180
+ --runtime antigravity-agent-sdk --refresh-preview --inspect-candidates
167
181
  ```
168
182
 
169
183
  Before a Codex-backed run, prepare the dedicated SDK evolution auth home:
170
184
 
171
185
  ```bash
172
- env -u UV_EXCLUDE_NEWER -u UV_EXCLUDE_NEWER_PACKAGE \
173
- uv run --extra codex python -m examples.sdk_evolution_agent.auth ensure-codex
186
+ env -u UV_EXCLUDE_NEWER \
187
+ uv run --locked --extra codex python -m examples.sdk_evolution_agent.auth ensure-codex
174
188
  ```
175
189
 
176
190
  This helper owns the operator-readiness boundary for Codex-backed runs. It
@@ -188,9 +202,10 @@ Package filters narrow evidence collection for debugging, but normal evolution
188
202
  runs should inspect all tracked packages:
189
203
 
190
204
  ```bash
191
- python -m examples.sdk_evolution_agent \
205
+ uv run --locked --extra antigravity python -m examples.sdk_evolution_agent \
192
206
  --runtime antigravity-agent-sdk \
193
207
  --refresh-preview \
208
+ --inspect-candidates \
194
209
  --package claude-agent-sdk \
195
210
  --package openai-codex \
196
211
  --package openai-codex-cli-bin \
@@ -201,15 +216,18 @@ python -m examples.sdk_evolution_agent \
201
216
  since update candidates without candidate API snapshots are not actionable.
202
217
  The shipped behavior deliberately inverts that default: candidate inspection
203
218
  installs and imports freshly downloaded upstream code, so it is opt-in and
204
- runs in a credential-scrubbed environment, with explicit `skip` records when
205
- it is off.
219
+ runs in a credential-scrubbed environment. The same explicit flag is required
220
+ to install a locked baseline that is missing or drifted in the active
221
+ environment. When inspection is off, those gaps become explicit `skip` records
222
+ rather than claimed observations.
206
223
 
207
224
  Implementation mode should remain explicitly gated:
208
225
 
209
226
  ```bash
210
- python -m examples.sdk_evolution_agent \
227
+ uv run --locked --extra antigravity python -m examples.sdk_evolution_agent \
211
228
  --runtime antigravity-agent-sdk \
212
229
  --refresh-preview \
230
+ --inspect-candidates \
213
231
  --implementation-enabled
214
232
  ```
215
233
 
@@ -230,30 +248,24 @@ The agent checks:
230
248
  - `pyproject.toml` dependency declarations.
231
249
  - `uv.lock` versions.
232
250
  - Installed distributions in the local environment.
233
- - PyPI metadata and recent releases.
234
- - `uv lock --dry-run -P ...` output with freshness cutoffs removed.
251
+ - Independent PyPI latest and recent-release metadata.
252
+ - Current constrained and prospective temporary-manifest
253
+ `uv lock --dry-run --exclude-newer false -P ...` output.
235
254
 
236
- `uv lock --dry-run` is the source of truth for update candidates when it is
237
- available. PyPI `latest` metadata is useful context, but it can be misleading
238
- for prerelease packages. For example, a locked prerelease can be newer than the
239
- stable value reported by package metadata.
255
+ Upstream metadata is the source of truth for whether a newer direct SDK release
256
+ exists. Prospective resolution is the source of truth for the compatible set
257
+ that can be applied. For `openai-codex-cli-bin`, the compatible candidate is the
258
+ exact version required by the Codex SDK candidate; a newer standalone CLI
259
+ release remains visible but is classified as blocked by that coupling.
240
260
 
241
261
  ### 2. API Shape Evidence
242
262
 
243
- The agent should treat the lockfile as the current SDK baseline. If the active
244
- Python environment has drifted from `uv.lock`, the agent inspects the locked
245
- baseline in an isolated virtualenv instead of using the installed package. API
246
- inspection artifacts are reusable evidence from the last update run when their
247
- schema, lockfile version, and artifact hashes still match. A normal run starts
248
- by loading the prior `api_snapshots/` and `api_diffs.json` artifacts, then
249
- inspects only the packages that need fresh facts:
250
-
251
- - packages selected by the resolver for update,
252
- - packages whose prior artifacts are missing,
253
- - packages whose prior artifacts were produced by an older evidence schema,
254
- - packages whose current locked or installed version no longer matches the
255
- artifact baseline,
256
- - packages needed to answer a specific adapter-compatibility question.
263
+ The agent treats the lockfile as the current SDK baseline. If the active Python
264
+ environment has drifted from `uv.lock`, it inspects the locked baseline in an
265
+ isolated virtualenv instead of using the installed package. Each run captures
266
+ fresh evidence for every selected package and every independently discovered
267
+ compatible candidate. A package/version environment is cached only within the
268
+ run, so its API snapshot and behavior probe reuse one exact install.
257
269
 
258
270
  For importable packages, snapshots record:
259
271
 
@@ -272,15 +284,9 @@ This catches obvious adapter risks:
272
284
 
273
285
  API shape is necessary but insufficient. It does not prove behavior.
274
286
 
275
- After a successful implementation, the candidate API snapshots and diffs that
276
- were verified must be promoted to the current-state baseline. That ensures the
277
- next run compares new upstream candidates against the SDK state that was
278
- actually accepted, not against stale pre-update artifacts.
279
-
280
- If the evidence schema changes, promotion should include a schema refresh of the
281
- current package state even when the package version did not change. Otherwise
282
- future runs may compare candidate evidence against artifacts that no longer mean
283
- the same thing.
287
+ After a successful implementation, `uv.lock` becomes the next run's
288
+ authoritative baseline and `current_state.json` records the evidence that was
289
+ accepted.
284
290
 
285
291
  ### 3. Changelog and Release-Note Evidence
286
292
 
@@ -333,7 +339,7 @@ Behavior probes should cover these contracts:
333
339
 
334
340
  | Contract | Why API diffs are not enough | Example probe |
335
341
  | --- | --- | --- |
336
- | Request construction | Constructor signatures can stay stable while fields change meaning. | Assert adapter builds expected SDK options/config objects. |
342
+ | Request construction | Signatures can stay stable while validators or field meaning changes. | Construct the exact SDK options/config object with adapter-owned values; Antigravity includes provider-compatible mapped conversation IDs. |
337
343
  | Permission mapping | Permission mode names can stay present while policy behavior changes. | Strict/default/permissive tests for each adapter. |
338
344
  | Sandbox and workspace semantics | Behavior can shift across SDK or CLI layers without a Python signature change. | Codex sandbox enum and run argument contract tests, plus smoke where possible. |
339
345
  | Streaming and event order | New message types may not break imports but may be dropped. | Feed fake vendor messages and assert emitted event order. |
@@ -347,6 +353,7 @@ Behavior probe output should be a first-class report artifact, for example:
347
353
  ```text
348
354
  behavior_probes.json
349
355
  behavior_diffs.json
356
+ behavior_summary.json
350
357
  ```
351
358
 
352
359
  Each probe result should include:
@@ -358,15 +365,21 @@ Each probe result should include:
358
365
  - stdout/stderr summary,
359
366
  - skipped reason when optional credentials are missing.
360
367
 
361
- `behavior_diffs.json` compares current-environment probes against
362
- candidate-version probes for resolver-selected updates. Breaking candidate probe
363
- changes block implementation deterministically before any local lock update.
368
+ `behavior_diffs.json` compares observed locked-baseline probes against
369
+ candidate-version probes for independently inventoried compatible updates. Breaking candidate
370
+ probe changes block implementation deterministically before any local lock
371
+ update.
364
372
 
365
373
  `behavior_probes.json` may include observed SDK fields or parameters that are
366
374
  not part of the adapter contract. `behavior_diffs.json` compares the required
367
375
  adapter contract, not every optional field. Public API and signature churn
368
376
  remains visible in `api_diffs.json` and probe details, but it should only block
369
377
  implementation when the required behavior contract fails or becomes ambiguous.
378
+ `behavior_summary.json` is the deterministic hand-off: `pass` means complete
379
+ unchanged evidence, `changed` means complete non-breaking evidence,
380
+ `incomplete` means required observations could not be proved, and `fail` means
381
+ a required contract failed or a breaking diff was observed. Missing, malformed,
382
+ or unknown summary states also block implementation.
370
383
 
371
384
  ### 5. Runtime-Generated Analysis
372
385
 
@@ -393,12 +406,19 @@ sequenceDiagram
393
406
 
394
407
  The AI stages should receive compacted, source-referenced evidence. They should
395
408
  not be asked to inspect the filesystem directly during report-only analysis.
409
+ The direction stage receives implementation diffs as primary evidence. Its
410
+ structured package status is `observed`, `opaque-runtime`, `no-transition`, or
411
+ `unavailable`; package freshness and resolver status are not implementation
412
+ trends. A deterministic postcondition replaces operational advice if a runtime
413
+ returns it in a trend field.
396
414
 
397
415
  ## Decision Gates
398
416
 
399
417
  The agent should fail closed. Implementation is blocked when:
400
418
 
401
- - the resolver reports an update but candidate API diffs are missing,
419
+ - independent discovery finds a candidate but the prospective no-cooloff
420
+ resolver preview is missing or failed,
421
+ - an exact candidate API diff is missing,
402
422
  - release notes exist but were not collected,
403
423
  - release notes are unavailable and the API or behavior evidence is ambiguous,
404
424
  - behavior probes fail,
@@ -516,8 +536,11 @@ evidence.json
516
536
  release_notes.json
517
537
  api_snapshots/
518
538
  api_diffs.json
539
+ implementation_snapshots/
540
+ implementation_diffs.json
519
541
  behavior_probes.json
520
542
  behavior_diffs.json
543
+ behavior_summary.json
521
544
  current_state.json
522
545
  direction_analysis.json
523
546
  architecture_decision.json
@@ -534,7 +557,7 @@ report.md
534
557
  - API diff count and affected packages,
535
558
  - behavior probe status,
536
559
  - current-state baseline promotion status,
537
- - direction-of-travel themes,
560
+ - upstream implementation patterns across exact release intervals,
538
561
  - architecture decision,
539
562
  - reviewer status,
540
563
  - implementation result,
@@ -549,9 +572,10 @@ artifact-aware. It should record:
549
572
  - commit SHA or explicit dirty-worktree marker,
550
573
  - lockfile hash,
551
574
  - package names and accepted current versions,
552
- - paths or content hashes for current API snapshots,
575
+ - paths or content hashes for current API and implementation snapshots,
553
576
  - paths or content hashes for release-note evidence,
554
577
  - paths or content hashes for behavior probe results,
578
+ - a path or content hash for the deterministic behavior summary,
555
579
  - whether the baseline was promoted, refreshed, skipped, or blocked.
556
580
 
557
581
  Promotion rules should be conservative:
@@ -569,9 +593,11 @@ Promotion rules should be conservative:
569
593
  Changelogs are incomplete. They often omit small behavior changes and may lag
570
594
  package releases.
571
595
 
572
- API snapshots are shallow. Python introspection can miss behavior encoded in
573
- runtime binaries, generated models, callbacks, subprocesses, environment
574
- variables, or remote services.
596
+ Public API snapshots are shallow. Implementation-history fingerprints add
597
+ file-level and Python-definition evidence, but hashes still cannot explain
598
+ behavior encoded in runtime binaries, generated models, callbacks, subprocesses,
599
+ environment variables, or remote services. Opaque artifacts must remain an
600
+ explicit limitation rather than being reverse-inferred from version numbers.
575
601
 
576
602
  Live probes are environment-sensitive. They prove that one local credential and
577
603
  runtime setup worked at one time. They do not replace unit or contract probes.
@@ -631,13 +657,22 @@ The example implements the deterministic evidence artifacts described above:
631
657
  - `behavior_probes.json` records current and candidate adapter-contract probes.
632
658
  - `behavior_diffs.json` records behavior differences between current and
633
659
  candidate probes.
660
+ - `behavior_summary.json` records the recomputed deterministic status, counts,
661
+ and reasons handed to implementation guards and operators.
634
662
  - `current_state.json` records the run baseline, lockfile hash, accepted
635
663
  package versions, artifact hashes, and promotion status.
636
664
 
637
665
  The implementation path is gated by deterministic checks before the local
638
- lockfile update runs. Missing candidate API diffs, unavailable required
639
- release-note evidence, breaking behavior diffs, reviewer rejection,
640
- `manual_design_required`, and unresolved recursive self-adaptation all block
641
- implementation. When implementation is allowed, the example applies the
642
- resolver-selected SDK lock update locally, runs verification, writes the report
643
- artifacts, commits them, pushes the branch, and opens a draft PR when configured.
666
+ manifest/lock update runs. A missing or failed prospective resolver preview,
667
+ missing candidate API diffs, unavailable required
668
+ release-note evidence, behavior summaries that are failed, incomplete, missing,
669
+ malformed, or unknown, reviewer rejection, `manual_design_required`, and
670
+ unresolved recursive self-adaptation all block implementation. When
671
+ implementation is allowed, the example widens only excluding direct dependency
672
+ bounds, applies the exact prospectively selected SDK set with freshness cutoffs
673
+ disabled, updates the compatibility manifest to the exact tested SDK and
674
+ coupled-runtime versions, verifies the resolved versions, and runs lint, typing,
675
+ tests, and lock checks. It restores the project manifest, lockfile, and
676
+ compatibility manifest on mismatch or verification failure. Only explicitly
677
+ requested draft-PR mode may stage the reported changed paths, commit, push, and
678
+ open a PR, and only after a verified non-empty update.