agent-runtime-kit 0.1.1__tar.gz → 0.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 (57) hide show
  1. {agent_runtime_kit-0.1.1 → agent_runtime_kit-0.2.0}/.gitignore +3 -0
  2. {agent_runtime_kit-0.1.1 → agent_runtime_kit-0.2.0}/PKG-INFO +2 -1
  3. {agent_runtime_kit-0.1.1 → agent_runtime_kit-0.2.0}/README.md +1 -0
  4. {agent_runtime_kit-0.1.1 → agent_runtime_kit-0.2.0}/docs/capability-matrix.md +1 -1
  5. agent_runtime_kit-0.2.0/docs/live-smoke.md +35 -0
  6. agent_runtime_kit-0.2.0/docs/providers.md +73 -0
  7. agent_runtime_kit-0.2.0/docs/sdk-evolution-agent-design.md +622 -0
  8. agent_runtime_kit-0.2.0/docs/sdk-evolution-agent.md +163 -0
  9. agent_runtime_kit-0.2.0/examples/__init__.py +1 -0
  10. agent_runtime_kit-0.2.0/examples/sdk_evolution_agent/__init__.py +14 -0
  11. agent_runtime_kit-0.2.0/examples/sdk_evolution_agent/__main__.py +10 -0
  12. agent_runtime_kit-0.2.0/examples/sdk_evolution_agent/behavior.py +484 -0
  13. agent_runtime_kit-0.2.0/examples/sdk_evolution_agent/cli.py +506 -0
  14. agent_runtime_kit-0.2.0/examples/sdk_evolution_agent/collectors.py +339 -0
  15. agent_runtime_kit-0.2.0/examples/sdk_evolution_agent/current_state.py +106 -0
  16. agent_runtime_kit-0.2.0/examples/sdk_evolution_agent/events.py +23 -0
  17. agent_runtime_kit-0.2.0/examples/sdk_evolution_agent/models.py +199 -0
  18. agent_runtime_kit-0.2.0/examples/sdk_evolution_agent/pr.py +94 -0
  19. agent_runtime_kit-0.2.0/examples/sdk_evolution_agent/release_notes.py +248 -0
  20. agent_runtime_kit-0.2.0/examples/sdk_evolution_agent/report.py +192 -0
  21. agent_runtime_kit-0.2.0/examples/sdk_evolution_agent/schemas.py +127 -0
  22. agent_runtime_kit-0.2.0/examples/sdk_evolution_agent/snapshots.py +212 -0
  23. agent_runtime_kit-0.2.0/examples/sdk_evolution_agent/stages.py +610 -0
  24. {agent_runtime_kit-0.1.1 → agent_runtime_kit-0.2.0}/pyproject.toml +1 -1
  25. {agent_runtime_kit-0.1.1 → agent_runtime_kit-0.2.0}/src/agent_runtime_kit/adapters/antigravity.py +90 -10
  26. {agent_runtime_kit-0.1.1 → agent_runtime_kit-0.2.0}/src/agent_runtime_kit/adapters/claude.py +69 -2
  27. {agent_runtime_kit-0.1.1 → agent_runtime_kit-0.2.0}/src/agent_runtime_kit/adapters/codex.py +58 -3
  28. {agent_runtime_kit-0.1.1 → agent_runtime_kit-0.2.0}/tests/test_antigravity_adapter.py +91 -2
  29. {agent_runtime_kit-0.1.1 → agent_runtime_kit-0.2.0}/tests/test_claude_adapter.py +36 -0
  30. {agent_runtime_kit-0.1.1 → agent_runtime_kit-0.2.0}/tests/test_codex_adapter.py +42 -0
  31. agent_runtime_kit-0.2.0/tests/test_sdk_evolution_agent.py +1082 -0
  32. agent_runtime_kit-0.1.1/docs/live-smoke.md +0 -27
  33. agent_runtime_kit-0.1.1/docs/providers.md +0 -55
  34. {agent_runtime_kit-0.1.1 → agent_runtime_kit-0.2.0}/LICENSE +0 -0
  35. {agent_runtime_kit-0.1.1 → agent_runtime_kit-0.2.0}/docs/mestre-migration.md +0 -0
  36. {agent_runtime_kit-0.1.1 → agent_runtime_kit-0.2.0}/docs/publish-checklist.md +0 -0
  37. {agent_runtime_kit-0.1.1 → agent_runtime_kit-0.2.0}/docs/quickstart.md +0 -0
  38. {agent_runtime_kit-0.1.1 → agent_runtime_kit-0.2.0}/examples/run_same_task.py +0 -0
  39. {agent_runtime_kit-0.1.1 → agent_runtime_kit-0.2.0}/src/agent_runtime_kit/__init__.py +0 -0
  40. {agent_runtime_kit-0.1.1 → agent_runtime_kit-0.2.0}/src/agent_runtime_kit/_errors.py +0 -0
  41. {agent_runtime_kit-0.1.1 → agent_runtime_kit-0.2.0}/src/agent_runtime_kit/_runtime.py +0 -0
  42. {agent_runtime_kit-0.1.1 → agent_runtime_kit-0.2.0}/src/agent_runtime_kit/_types.py +0 -0
  43. {agent_runtime_kit-0.1.1 → agent_runtime_kit-0.2.0}/src/agent_runtime_kit/adapters/__init__.py +0 -0
  44. {agent_runtime_kit-0.1.1 → agent_runtime_kit-0.2.0}/src/agent_runtime_kit/adapters/_common.py +0 -0
  45. {agent_runtime_kit-0.1.1 → agent_runtime_kit-0.2.0}/src/agent_runtime_kit/adapters/diagnostics.py +0 -0
  46. {agent_runtime_kit-0.1.1 → agent_runtime_kit-0.2.0}/src/agent_runtime_kit/events.py +0 -0
  47. {agent_runtime_kit-0.1.1 → agent_runtime_kit-0.2.0}/src/agent_runtime_kit/py.typed +0 -0
  48. {agent_runtime_kit-0.1.1 → agent_runtime_kit-0.2.0}/src/agent_runtime_kit/registry.py +0 -0
  49. {agent_runtime_kit-0.1.1 → agent_runtime_kit-0.2.0}/src/agent_runtime_kit/testing/__init__.py +0 -0
  50. {agent_runtime_kit-0.1.1 → agent_runtime_kit-0.2.0}/src/agent_runtime_kit/testing/fakes.py +0 -0
  51. {agent_runtime_kit-0.1.1 → agent_runtime_kit-0.2.0}/tests/test_core.py +0 -0
  52. {agent_runtime_kit-0.1.1 → agent_runtime_kit-0.2.0}/tests/test_events.py +0 -0
  53. {agent_runtime_kit-0.1.1 → agent_runtime_kit-0.2.0}/tests/test_live_smoke.py +0 -0
  54. {agent_runtime_kit-0.1.1 → agent_runtime_kit-0.2.0}/tests/test_mestre_compatibility.py +0 -0
  55. {agent_runtime_kit-0.1.1 → agent_runtime_kit-0.2.0}/tests/test_optional_dependencies.py +0 -0
  56. {agent_runtime_kit-0.1.1 → agent_runtime_kit-0.2.0}/tests/test_provider_diagnostics.py +0 -0
  57. {agent_runtime_kit-0.1.1 → agent_runtime_kit-0.2.0}/tests/test_sdk_contract.py +0 -0
@@ -12,5 +12,8 @@ wheels/
12
12
  htmlcov/
13
13
  .DS_Store
14
14
 
15
+ # Local generated reports
16
+ reports/sdk-evolution/
17
+
15
18
  # Virtual environments
16
19
  .venv
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agent-runtime-kit
3
- Version: 0.1.1
3
+ Version: 0.2.0
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
@@ -117,3 +117,4 @@ cost, session id, artifacts, tool-call audits, and provider metadata.
117
117
  - [Live smoke tests](https://github.com/ebarti/agent-runtime-kit/blob/main/docs/live-smoke.md)
118
118
  - [Mestre migration notes](https://github.com/ebarti/agent-runtime-kit/blob/main/docs/mestre-migration.md)
119
119
  - [Publish checklist](https://github.com/ebarti/agent-runtime-kit/blob/main/docs/publish-checklist.md)
120
+ - [SDK evolution agent](https://github.com/ebarti/agent-runtime-kit/blob/main/docs/sdk-evolution-agent.md)
@@ -85,3 +85,4 @@ cost, session id, artifacts, tool-call audits, and provider metadata.
85
85
  - [Live smoke tests](https://github.com/ebarti/agent-runtime-kit/blob/main/docs/live-smoke.md)
86
86
  - [Mestre migration notes](https://github.com/ebarti/agent-runtime-kit/blob/main/docs/mestre-migration.md)
87
87
  - [Publish checklist](https://github.com/ebarti/agent-runtime-kit/blob/main/docs/publish-checklist.md)
88
+ - [SDK evolution agent](https://github.com/ebarti/agent-runtime-kit/blob/main/docs/sdk-evolution-agent.md)
@@ -12,7 +12,7 @@
12
12
  | Streaming output events | Yes — incremental output/tool events while the SDK runs | Not enabled in v1 adapter | Yes — from response chunks |
13
13
  | Tool audit events | Yes — from streamed message blocks | Yes — parsed from `TurnResult` items | Yes — from tool chunks |
14
14
  | Missing package diagnostics | Yes (`AgentRuntimeUnavailableError`) | Yes (`AgentRuntimeUnavailableError`) | Yes (`AgentRuntimeUnavailableError`) |
15
- | Missing credential diagnostics | Provider-owned/local auth | Provider-owned/local auth | `GEMINI_API_KEY` or `GOOGLE_API_KEY` |
15
+ | Missing credential diagnostics | Provider-owned/local auth, including API key, Bedrock, Vertex, AWS, and Azure modes | Provider-owned/local auth, including ChatGPT/API key/custom providers/Bedrock | API key or Google ADC / Vertex config |
16
16
  | Live smoke test | Opt-in | Opt-in | Opt-in |
17
17
 
18
18
  The matrix is intentionally not a lowest-common-denominator contract. Adapters
@@ -0,0 +1,35 @@
1
+ # Live Smoke Tests
2
+
3
+ Default tests never call live providers. Live smoke tests are skipped unless
4
+ you opt in explicitly:
5
+
6
+ ```bash
7
+ AGENT_RUNTIME_KIT_LIVE=1 AGENT_RUNTIME_KIT_LIVE_PROVIDER=claude uv run pytest -m live
8
+ ```
9
+
10
+ Provider values:
11
+
12
+ - `claude`
13
+ - `codex`
14
+ - `antigravity`
15
+ - `all`
16
+
17
+ Expected setup:
18
+
19
+ - Claude: install `agent-runtime-kit[claude]` and configure Claude Agent SDK
20
+ auth according to vendor docs. Supported provider modes include Anthropic API
21
+ key auth, Amazon Bedrock via `CLAUDE_CODE_USE_BEDROCK=1` and the AWS SDK
22
+ credential chain, Google Vertex AI, Claude Platform on AWS, and Azure AI
23
+ Foundry.
24
+ - Codex: install `agent-runtime-kit[codex]` and configure local Codex auth/app
25
+ server according to vendor docs. Codex can use ChatGPT sign-in, API-key
26
+ sign-in, access-token setup, custom model providers, and the built-in
27
+ `amazon-bedrock` model provider.
28
+ - Antigravity: install `agent-runtime-kit[antigravity]` and either set
29
+ `GEMINI_API_KEY` / `GOOGLE_API_KEY` or configure Google Application Default
30
+ Credentials for Vertex AI. When using ADC, provide a project through ADC or
31
+ `GOOGLE_CLOUD_PROJECT`; the adapter defaults location to `global` unless
32
+ `GOOGLE_CLOUD_LOCATION`, `GOOGLE_CLOUD_REGION`, or `CLOUD_ML_REGION` is set.
33
+
34
+ The smoke prompt is intentionally small. It verifies adapter construction,
35
+ availability diagnostics, one task invocation, and a non-empty result.
@@ -0,0 +1,73 @@
1
+ # Provider Diagnostics
2
+
3
+ `agent-runtime-kit` keeps provider setup checks explicit. Each runtime exposes
4
+ `availability()` and returns a `RuntimeAvailability` value with:
5
+
6
+ - runtime kind
7
+ - availability flag
8
+ - reason
9
+ - message
10
+ - package name
11
+ - installed version when discoverable
12
+
13
+ Claude uses the `claude-agent-sdk` package and maps working directory,
14
+ permissions, MCP servers, sessions, structured output, tool allow/deny lists,
15
+ runtime environment, and budget where supported by the installed SDK. It
16
+ streams incremental output and tool events while the SDK runs, and sets
17
+ `finish_reason="max_turns"` when a turn is truncated by the max-turns limit.
18
+ `permissions.network` has no SDK surface and is rejected with a typed error.
19
+ Claude auth is provider-owned: use Anthropic API key auth, or configure
20
+ third-party provider modes through Claude Code environment/settings such as
21
+ `CLAUDE_CODE_USE_BEDROCK=1` with the AWS SDK credential chain,
22
+ `CLAUDE_CODE_USE_VERTEX=1` with Google credentials,
23
+ `CLAUDE_CODE_USE_ANTHROPIC_AWS=1`, or `CLAUDE_CODE_USE_FOUNDRY=1`.
24
+ `ClaudeAgentRuntime(env=...)` passes those provider-specific environment values
25
+ to the SDK subprocess without scraping credential files. Any option kwargs
26
+ dropped because a future SDK renamed or removed them are recorded in
27
+ `AgentResult.metadata["dropped_options"]` rather than discarded silently.
28
+
29
+ Codex uses the `openai-codex` package and maps working directory, session
30
+ resume, approval mode, sandbox, structured output, model, and reasoning effort.
31
+ Approval mode follows `PermissionMode`: `STRICT`/`CAUTIOUS` → `deny_all` (never
32
+ escalate beyond the sandbox), `DEFAULT`/`PERMISSIVE` → `auto_review`
33
+ (escalations auto-adjudicated). Tool audits are parsed from `TurnResult.items`
34
+ (command executions, MCP tool calls, dynamic tool calls, web searches), and a
35
+ `TurnResult.status` of `failed`/`interrupted` maps to the matching
36
+ `finish_reason`. `budget_usd`, `permissions.network`, `allowed_tools`,
37
+ `disallowed_tools`, and `mcp_servers` have no per-task SDK surface and are
38
+ rejected with typed errors. The constructor defaults to
39
+ `config_overrides=("features.plugins=false",)` so headless runs are
40
+ deterministic and do not pick up host-local Codex plugin configuration; pass a
41
+ different tuple to opt in. Codex auth is owned by the local Codex runtime:
42
+ ChatGPT sign-in, API-key sign-in, access-token setup, and custom providers stay
43
+ in Codex config. For Amazon Bedrock, pass Codex config overrides such as
44
+ `model_provider=amazon-bedrock` and provider-specific model/profile/region
45
+ settings, and pass AWS environment values with `CodexAgentRuntime(env=...)` when
46
+ they should be scoped to the SDK subprocess.
47
+
48
+ Antigravity uses the `google-antigravity` package and maps API-key or Google
49
+ Application Default Credentials auth, workspace, permission-derived
50
+ capabilities/policies, MCP stdio servers, conversation id, structured output,
51
+ session directories, model, and tool events. API-key auth comes from the
52
+ constructor, `GEMINI_API_KEY`, or `GOOGLE_API_KEY`. Without an API key, the
53
+ adapter uses Vertex AI config with Google ADC when a project can be discovered
54
+ from ADC, `GOOGLE_CLOUD_PROJECT`, or `GCLOUD_PROJECT`; location defaults to
55
+ `global` unless `GOOGLE_CLOUD_LOCATION`, `GOOGLE_CLOUD_REGION`, or
56
+ `CLOUD_ML_REGION` is set. `disallowed_tools` maps to
57
+ `CapabilitiesConfig.disabled_tools`, and an allow-list and a deny-list are
58
+ mutually exclusive (the SDK forbids combining enabled and disabled tool lists),
59
+ so supplying both is rejected. Tool names are validated against the
60
+ `BuiltinTools` enum (`"view_file"`, not `"Read"`). `budget_usd` and
61
+ `permissions.network` are rejected with typed errors, and MCP server configs do
62
+ not accept per-server env values. The default tool posture with no
63
+ `allowed_tools` is:
64
+
65
+ | `PermissionMode` (or `READ_ONLY` filesystem) | Toolset | Policy |
66
+ |----------------------------------------------|---------|--------|
67
+ | `STRICT`, or any `READ_ONLY` filesystem | read-only | none (no `allow_all`) |
68
+ | `CAUTIOUS`, `DEFAULT` | nondestructive (no `run_command`) | `allow_all` |
69
+ | `PERMISSIVE` | all tools | `allow_all` |
70
+
71
+ Session and app-data directories are written under
72
+ `$XDG_CACHE_HOME/agent-runtime-kit` (default `~/.cache/agent-runtime-kit`,
73
+ `0o700`), overridable via `AntigravityAgentRuntime(data_dir=...)`.