agent-runtime-kit 0.5.3__tar.gz → 0.5.4__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 (79) hide show
  1. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/CHANGELOG.md +18 -0
  2. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/PKG-INFO +3 -3
  3. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/docs/providers.md +20 -3
  4. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/docs/sdk-evolution-agent-design.md +2 -2
  5. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/docs/sdk-evolution-agent.md +4 -4
  6. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/examples/sdk_evolution_agent/stages.py +2 -2
  7. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/pyproject.toml +3 -3
  8. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/src/agent_runtime_kit/adapters/antigravity.py +24 -16
  9. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/src/agent_runtime_kit/compatibility.py +5 -5
  10. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/tests/test_antigravity_adapter.py +103 -0
  11. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/tests/test_sdk_contract.py +46 -0
  12. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/tests/test_sdk_evolution_agent.py +9 -7
  13. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/.gitignore +0 -0
  14. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/LICENSE +0 -0
  15. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/README.md +0 -0
  16. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/docs/api-stability.md +0 -0
  17. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/docs/capability-matrix.md +0 -0
  18. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/docs/live-smoke.md +0 -0
  19. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/docs/quickstart.md +0 -0
  20. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/docs/recipes.md +0 -0
  21. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/docs/task-control.md +0 -0
  22. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/examples/README.md +0 -0
  23. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/examples/__init__.py +0 -0
  24. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/examples/basic_offline.py +0 -0
  25. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/examples/diagnostics.py +0 -0
  26. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/examples/events.py +0 -0
  27. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/examples/provider_task.py +0 -0
  28. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/examples/run_same_task.py +0 -0
  29. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/examples/sdk_evolution_agent/__init__.py +0 -0
  30. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/examples/sdk_evolution_agent/__main__.py +0 -0
  31. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/examples/sdk_evolution_agent/auth.py +0 -0
  32. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/examples/sdk_evolution_agent/behavior.py +0 -0
  33. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/examples/sdk_evolution_agent/cli.py +0 -0
  34. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/examples/sdk_evolution_agent/collectors.py +0 -0
  35. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/examples/sdk_evolution_agent/current_state.py +0 -0
  36. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/examples/sdk_evolution_agent/events.py +0 -0
  37. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/examples/sdk_evolution_agent/inspection.py +0 -0
  38. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/examples/sdk_evolution_agent/models.py +0 -0
  39. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/examples/sdk_evolution_agent/pr.py +0 -0
  40. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/examples/sdk_evolution_agent/release_notes.py +0 -0
  41. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/examples/sdk_evolution_agent/report.py +0 -0
  42. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/examples/sdk_evolution_agent/schemas.py +0 -0
  43. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/examples/sdk_evolution_agent/snapshots.py +0 -0
  44. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/examples/structured_output.py +0 -0
  45. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/src/agent_runtime_kit/__init__.py +0 -0
  46. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/src/agent_runtime_kit/_control.py +0 -0
  47. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/src/agent_runtime_kit/_errors.py +0 -0
  48. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/src/agent_runtime_kit/_kit.py +0 -0
  49. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/src/agent_runtime_kit/_runtime.py +0 -0
  50. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/src/agent_runtime_kit/_schema.py +0 -0
  51. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/src/agent_runtime_kit/_types.py +0 -0
  52. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/src/agent_runtime_kit/adapters/__init__.py +0 -0
  53. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/src/agent_runtime_kit/adapters/_common.py +0 -0
  54. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/src/agent_runtime_kit/adapters/claude.py +0 -0
  55. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/src/agent_runtime_kit/adapters/codex.py +0 -0
  56. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/src/agent_runtime_kit/adapters/diagnostics.py +0 -0
  57. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/src/agent_runtime_kit/events.py +0 -0
  58. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/src/agent_runtime_kit/py.typed +0 -0
  59. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/src/agent_runtime_kit/readiness.py +0 -0
  60. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/src/agent_runtime_kit/registry.py +0 -0
  61. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/src/agent_runtime_kit/support.py +0 -0
  62. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/src/agent_runtime_kit/testing/__init__.py +0 -0
  63. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/src/agent_runtime_kit/testing/fakes.py +0 -0
  64. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/tests/test_adapter_common.py +0 -0
  65. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/tests/test_adapter_protocol.py +0 -0
  66. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/tests/test_claude_adapter.py +0 -0
  67. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/tests/test_codex_adapter.py +0 -0
  68. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/tests/test_control.py +0 -0
  69. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/tests/test_core.py +0 -0
  70. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/tests/test_events.py +0 -0
  71. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/tests/test_kit.py +0 -0
  72. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/tests/test_live_smoke.py +0 -0
  73. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/tests/test_mestre_compatibility.py +0 -0
  74. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/tests/test_optional_dependencies.py +0 -0
  75. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/tests/test_provider_diagnostics.py +0 -0
  76. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/tests/test_readiness.py +0 -0
  77. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/tests/test_schema.py +0 -0
  78. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/tests/test_sdk_evolution_docs.py +0 -0
  79. {agent_runtime_kit-0.5.3 → agent_runtime_kit-0.5.4}/tests/test_support.py +0 -0
@@ -5,6 +5,24 @@ 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.4 - 2026-10-18
9
+
10
+ ### Changed
11
+
12
+ - Updated tested Claude Agent SDK to `0.2.168`, Google Antigravity SDK to
13
+ `0.1.22`, and the exactly coupled Codex SDK and CLI to `0.163.0`.
14
+ - Raised the Codex SDK upper bound to `<0.164` after exact candidate inspection.
15
+ - SDK evolution analysis defaults to `gpt-6.1-sol` at maximum reasoning effort
16
+ across AI stages, with the selected model and effort recorded in run artifacts.
17
+
18
+ ### Fixed
19
+
20
+ - Antigravity permission lists preserve the deprecated `start_subagent` alias
21
+ after its rename to `invoke_subagent`.
22
+ - Explicit Antigravity workflow tools enable the SDK's delegation gate,
23
+ including when an independent invocation tool is denied. Strict and read-only
24
+ tasks continue to refuse delegation tools.
25
+
8
26
  ## 0.5.3 - 2026-10-02
9
27
 
10
28
  ### Added
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: agent-runtime-kit
3
- Version: 0.5.3
3
+ Version: 0.5.4
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
@@ -23,13 +23,13 @@ Requires-Dist: tomli<3,>=2; python_version < '3.11'
23
23
  Provides-Extra: all
24
24
  Requires-Dist: claude-agent-sdk<0.3,>=0.2.87; extra == 'all'
25
25
  Requires-Dist: google-antigravity<0.2,>=0.1.2; extra == 'all'
26
- Requires-Dist: openai-codex<0.161,>=0.157.1; extra == 'all'
26
+ Requires-Dist: openai-codex<0.164,>=0.157.1; extra == 'all'
27
27
  Provides-Extra: antigravity
28
28
  Requires-Dist: google-antigravity<0.2,>=0.1.2; extra == 'antigravity'
29
29
  Provides-Extra: claude
30
30
  Requires-Dist: claude-agent-sdk<0.3,>=0.2.87; extra == 'claude'
31
31
  Provides-Extra: codex
32
- Requires-Dist: openai-codex<0.161,>=0.157.1; extra == 'codex'
32
+ Requires-Dist: openai-codex<0.164,>=0.157.1; extra == 'codex'
33
33
  Description-Content-Type: text/markdown
34
34
 
35
35
  # agent-runtime-kit
@@ -171,7 +171,13 @@ escalate beyond the sandbox), `DEFAULT`/`PERMISSIVE` → `auto_review`
171
171
  (escalations auto-adjudicated). Tool audits are parsed from `TurnResult.items`
172
172
  (command executions, MCP tool calls, dynamic tool calls, web searches), and a
173
173
  `TurnResult.status` of `failed`/`interrupted` maps to the matching
174
- `finish_reason`. `budget_usd`, `permissions.network`, `allowed_tools`,
174
+ `finish_reason`. Audits are best effort: live checks with SDK/CLI `0.160.0`
175
+ and `0.163.0` observed a nested Code Mode `exec` call in the session log that
176
+ was absent from both `TurnResult.items` and the supported thread-read response, while a direct
177
+ shell call produced normal command items. An empty `tool_calls` tuple therefore
178
+ does not establish that no tools ran. The adapter uses the SDK item surface
179
+ and does not reconstruct execution history from local transcript files.
180
+ `budget_usd`, `permissions.network`, `allowed_tools`,
175
181
  `disallowed_tools`, and `mcp_servers` have no per-task SDK surface and are
176
182
  rejected with typed errors. The constructor defaults to
177
183
  `config_overrides=("features.plugins=false",)` so headless runs are
@@ -256,8 +262,19 @@ read-only toolset, and under `DEFAULT`/`CAUTIOUS` from the nondestructive
256
262
  toolset — `disabled_tools` alone would re-enable every unnamed write or
257
263
  destructive tool. An explicit `allowed_tools` list is rejected if it names a
258
264
  non-read-only tool under a `READ_ONLY` filesystem or `STRICT` mode. An
259
- `allowed_tools` list containing `start_subagent` enables subagents in any mode;
260
- the approval policy still follows the mode (only `STRICT` omits `allow_all`).
265
+ `allowed_tools` list containing a delegation tool enables the SDK's subagent
266
+ gate when the filesystem and mode permit that tool; the approval policy still
267
+ follows the mode.
268
+
269
+ Antigravity 0.1.22 names the invocation tool `invoke_subagent` and retains
270
+ `start_subagent` as a deprecated input alias. The adapter uses the installed
271
+ SDK's enum coercion for allow/deny entries, preserving that alias while still
272
+ rejecting unknown names. Both `invoke_subagent` and `run_workflow` require the
273
+ SDK's subagent gate. Selecting either enables it; denying one keeps the other
274
+ usable. To disable both forms of delegation on 0.1.22, deny both names or use an
275
+ explicit allow-list containing neither. `READ_ONLY` and `STRICT` reject either
276
+ tool, including the legacy alias. Older SDKs retain `start_subagent` support
277
+ and reject names they do not provide.
261
278
 
262
279
  Session and app-data directories are written under
263
280
  `$XDG_CACHE_HOME/agent-runtime-kit` (default `~/.cache/agent-runtime-kit`,
@@ -194,9 +194,9 @@ that exact home, and mirrors the supported normal Codex login cache from
194
194
  ask for access tokens, or inspect unsupported credential stores.
195
195
 
196
196
  When `codex-agent-sdk` is selected for SDK update work, every AI-backed stage
197
- should run on `gpt-5.5` with `reasoning_effort=xhigh`. This is a Codex runtime
197
+ should run on `gpt-6.1-sol` with `reasoning_effort=max`. This is a Codex runtime
198
198
  policy, not a portable metadata field: Claude and Antigravity runs should not
199
- receive a `gpt-5.5` model override.
199
+ receive a `gpt-6.1-sol` model override.
200
200
 
201
201
  Package filters narrow evidence collection for debugging, but normal evolution
202
202
  runs should inspect all tracked packages:
@@ -66,15 +66,15 @@ env -u UV_EXCLUDE_NEWER \
66
66
  uv run --locked --extra codex python -m examples.sdk_evolution_agent.auth ensure-codex
67
67
  ```
68
68
 
69
- Codex-backed SDK evolution runs default to `gpt-5.5` with
70
- `reasoning_effort=xhigh` for the AI stages that analyze direction, decide the
69
+ Codex-backed SDK evolution runs default to `gpt-6.1-sol` with
70
+ `reasoning_effort=max` for the AI stages that analyze direction, decide the
71
71
  update plan, and review the result. Dependency application and verification are
72
72
  deterministic. This model policy
73
73
  is applied only to `codex-agent-sdk`; Claude and Antigravity runs keep their
74
- provider-native model selection because `gpt-5.5` is not a valid model override
74
+ provider-native model selection because `gpt-6.1-sol` is not a valid model override
75
75
  for those adapters.
76
76
  Use `--model` and `--reasoning-effort` to select the requested model explicitly
77
- for every AI stage. For example, use `--model gpt-6-astra --reasoning-effort xhigh`.
77
+ for every AI stage. For example, use `--model gpt-6.1-sol --reasoning-effort max`.
78
78
  These options populate the first-class `AgentTask` fields and are recorded in
79
79
  `config.json`; unsupported provider values remain provider errors.
80
80
 
@@ -57,8 +57,8 @@ class StageExecutionError(RuntimeError):
57
57
 
58
58
 
59
59
  SDK_EVOLUTION_CODEX_HOME = Path("~/.codex_agent_runtime_sdk").expanduser()
60
- SDK_EVOLUTION_CODEX_MODEL = "gpt-5.5"
61
- SDK_EVOLUTION_CODEX_REASONING_EFFORT = "xhigh"
60
+ SDK_EVOLUTION_CODEX_MODEL = "gpt-6.1-sol"
61
+ SDK_EVOLUTION_CODEX_REASONING_EFFORT = "max"
62
62
 
63
63
 
64
64
  class FixtureEvolutionRuntime:
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "agent-runtime-kit"
7
- version = "0.5.3"
7
+ version = "0.5.4"
8
8
  description = "One typed runtime API for Claude, Codex, and Antigravity agent SDKs."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -48,12 +48,12 @@ dependencies = ["jsonschema>=4.18,<5", "tomli>=2,<3; python_version < '3.11'"]
48
48
  claude = ["claude-agent-sdk>=0.2.87,<0.3"]
49
49
  # 0.157.1 is the minimum SDK and CLI pair for native named profiles. Earlier
50
50
  # bundled CLIs do not enforce every profile rule needed by restricted runtimes.
51
- codex = ["openai-codex>=0.157.1,<0.161"]
51
+ codex = ["openai-codex>=0.157.1,<0.164"]
52
52
  antigravity = ["google-antigravity>=0.1.2,<0.2"]
53
53
  all = [
54
54
  "claude-agent-sdk>=0.2.87,<0.3",
55
55
  "google-antigravity>=0.1.2,<0.2",
56
- "openai-codex>=0.157.1,<0.161",
56
+ "openai-codex>=0.157.1,<0.164",
57
57
  ]
58
58
 
59
59
  [project.urls]
@@ -778,7 +778,6 @@ def _capability_policy(
778
778
  kind: AgentRuntimeKind, task: AgentTask, sdk: _AntigravitySDK
779
779
  ) -> tuple[Any, list[Any]]:
780
780
  builtin = sdk.types.BuiltinTools
781
- subagent = getattr(builtin, "START_SUBAGENT", None)
782
781
  is_permissive = task.permissions.mode is PermissionMode.PERMISSIVE
783
782
  if task.permissions.disallowed_tools:
784
783
  # The real CapabilitiesConfig requires enabled_tools and disabled_tools to be
@@ -813,7 +812,7 @@ def _capability_policy(
813
812
  ]
814
813
  capabilities = sdk.types.CapabilitiesConfig(
815
814
  enabled_tools=tools,
816
- enable_subagents=_contains_tool(tools, subagent),
815
+ enable_subagents=_enables_subagents(tools, builtin),
817
816
  )
818
817
  elif is_permissive:
819
818
  # Since 0.1.17 disabled_tools subtracts from default(), which excludes
@@ -830,7 +829,7 @@ def _capability_policy(
830
829
  tools = [tool for tool in all_tools() if getattr(tool, "value", tool) not in denied]
831
830
  capabilities = sdk.types.CapabilitiesConfig(
832
831
  enabled_tools=tools,
833
- enable_subagents=_contains_tool(tools, subagent),
832
+ enable_subagents=_enables_subagents(tools, builtin),
834
833
  )
835
834
  else:
836
835
  # DEFAULT/CAUTIOUS: "enable everything else" would widen access past the
@@ -845,7 +844,7 @@ def _capability_policy(
845
844
  ]
846
845
  capabilities = sdk.types.CapabilitiesConfig(
847
846
  enabled_tools=tools,
848
- enable_subagents=_contains_tool(tools, subagent),
847
+ enable_subagents=_enables_subagents(tools, builtin),
849
848
  )
850
849
  else:
851
850
  if task.permissions.allowed_tools == ():
@@ -862,9 +861,9 @@ def _capability_policy(
862
861
  # (previously STRICT honored any named write tool). Reject rather
863
862
  # than silently widen access.
864
863
  _reject_non_read_only_tools(kind, tools, builtin)
865
- # Honor an explicitly allow-listed subagent tool regardless of mode; gating
866
- # this on PERMISSIVE left an explicit start_subagent request silently inert.
867
- enable_subagents = _contains_tool(tools, subagent)
864
+ # Both invocation and workflow tools use the SDK's delegation gate.
865
+ # Derive it from the selected tools rather than the permission mode.
866
+ enable_subagents = _enables_subagents(tools, builtin)
868
867
  capabilities = sdk.types.CapabilitiesConfig(
869
868
  enabled_tools=tools,
870
869
  enable_subagents=enable_subagents,
@@ -873,11 +872,19 @@ def _capability_policy(
873
872
  return capabilities, policies
874
873
 
875
874
 
876
- def _contains_tool(tools: list[Any], subagent: Any) -> bool:
875
+ def _enables_subagents(tools: list[Any], builtin: Any) -> bool:
876
+ # Prefer the canonical name without touching the deprecated 0.1.22 alias.
877
+ # Older SDKs expose only START_SUBAGENT and have no workflow tool.
878
+ subagent = getattr(builtin, "INVOKE_SUBAGENT", None)
877
879
  if subagent is None:
878
- return False
879
- target = getattr(subagent, "value", subagent)
880
- return any(getattr(tool, "value", tool) == target for tool in tools)
880
+ subagent = getattr(builtin, "START_SUBAGENT", None)
881
+ workflow = getattr(builtin, "RUN_WORKFLOW", None)
882
+ selected = {getattr(tool, "value", tool) for tool in tools}
883
+ return any(
884
+ getattr(target, "value", target) in selected
885
+ for target in (subagent, workflow)
886
+ if target is not None
887
+ )
881
888
 
882
889
 
883
890
  def _env_first(*names: str) -> str | None:
@@ -932,16 +939,17 @@ def _validate_tools(
932
939
  resolved: list[Any] = []
933
940
  for tool in tools:
934
941
  value = getattr(tool, "value", tool)
935
- if value not in valid:
942
+ try:
943
+ # The SDK owns accepted aliases: 0.1.22 still coerces start_subagent
944
+ # to INVOKE_SUBAGENT even though enum iteration omits the old value.
945
+ resolved.append(builtin(value))
946
+ except (TypeError, ValueError):
936
947
  ordered = ", ".join(sorted(valid))
937
948
  raise UnsupportedTaskInputError(
938
949
  kind,
939
950
  f"permissions.{field}",
940
951
  f"{value!r} is not an Antigravity built-in tool; valid values: {ordered}",
941
- )
942
- # Return real enum members so validated allow/deny lists match the type the
943
- # default-tool paths hand CapabilitiesConfig (previously plain strings).
944
- resolved.append(builtin(value))
952
+ ) from None
945
953
  return resolved
946
954
 
947
955
 
@@ -66,17 +66,17 @@ COMPATIBILITY_MANIFEST: tuple[RuntimeCompatibility, ...] = (
66
66
  package="claude-agent-sdk",
67
67
  module="claude_agent_sdk",
68
68
  version_specifier=">=0.2.87,<0.3",
69
- tested_version="0.2.163",
69
+ tested_version="0.2.168",
70
70
  ),
71
71
  RuntimeCompatibility(
72
72
  kind=AgentRuntimeKind.CODEX_AGENT_SDK,
73
73
  extra="codex",
74
74
  package="openai-codex",
75
75
  module="openai_codex",
76
- version_specifier=">=0.157.1,<0.161",
77
- tested_version="0.160.0",
76
+ version_specifier=">=0.157.1,<0.164",
77
+ tested_version="0.163.0",
78
78
  tested_runtime_dependencies=(
79
- PackageVersion(package="openai-codex-cli-bin", version="0.160.0"),
79
+ PackageVersion(package="openai-codex-cli-bin", version="0.163.0"),
80
80
  ),
81
81
  ),
82
82
  RuntimeCompatibility(
@@ -85,7 +85,7 @@ COMPATIBILITY_MANIFEST: tuple[RuntimeCompatibility, ...] = (
85
85
  package="google-antigravity",
86
86
  module="google.antigravity",
87
87
  version_specifier=">=0.1.2,<0.2",
88
- tested_version="0.1.20",
88
+ tested_version="0.1.22",
89
89
  ),
90
90
  )
91
91
 
@@ -91,6 +91,34 @@ class FakeTypes:
91
91
  args: list[str] = field(default_factory=list)
92
92
 
93
93
 
94
+ class ModernBuiltinTools(str, enum.Enum):
95
+ """Canonical delegation names, including the SDK's legacy value coercion."""
96
+
97
+ VIEW_FILE = "view_file"
98
+ EDIT_FILE = "edit_file"
99
+ INVOKE_SUBAGENT = "invoke_subagent"
100
+ RUN_WORKFLOW = "run_workflow"
101
+ FINISH = "finish"
102
+
103
+ @classmethod
104
+ def _missing_(cls, value: object) -> ModernBuiltinTools | None:
105
+ if value == "start_subagent":
106
+ return cls.INVOKE_SUBAGENT
107
+ return None
108
+
109
+ @classmethod
110
+ def read_only(cls) -> list[ModernBuiltinTools]:
111
+ return [cls.VIEW_FILE, cls.FINISH]
112
+
113
+ @classmethod
114
+ def nondestructive(cls) -> list[ModernBuiltinTools]:
115
+ return list(cls)
116
+
117
+ @classmethod
118
+ def all_tools(cls) -> list[ModernBuiltinTools]:
119
+ return list(cls)
120
+
121
+
94
122
  class FakePolicy:
95
123
  @staticmethod
96
124
  def allow_all() -> str:
@@ -1123,6 +1151,81 @@ async def test_antigravity_allowed_subagent_enables_subagents_outside_permissive
1123
1151
  assert config.kwargs["capabilities"].enable_subagents is True
1124
1152
 
1125
1153
 
1154
+ @pytest.mark.asyncio
1155
+ @pytest.mark.parametrize("tool", ["start_subagent", "invoke_subagent", "run_workflow"])
1156
+ async def test_antigravity_modern_delegation_allowlist(
1157
+ tmp_path: Path, monkeypatch: pytest.MonkeyPatch, tool: str
1158
+ ) -> None:
1159
+ monkeypatch.setattr(FakeTypes, "BuiltinTools", ModernBuiltinTools)
1160
+ runtime = make_runtime(data_dir=tmp_path)
1161
+ await runtime.run(
1162
+ AgentTask(goal="task", permissions=PermissionProfile(allowed_tools=(tool,)))
1163
+ )
1164
+ capabilities = FakeAgent.last_config.kwargs["capabilities"]
1165
+ assert capabilities.enabled_tools == [ModernBuiltinTools(tool)]
1166
+ assert capabilities.enable_subagents is True
1167
+
1168
+
1169
+ @pytest.mark.asyncio
1170
+ @pytest.mark.parametrize("mode", [PermissionMode.DEFAULT, PermissionMode.PERMISSIVE])
1171
+ @pytest.mark.parametrize(
1172
+ "denied,delegation_enabled",
1173
+ [
1174
+ (("start_subagent",), True),
1175
+ (("invoke_subagent",), True),
1176
+ (("run_workflow",), True),
1177
+ (("start_subagent", "run_workflow"), False),
1178
+ ],
1179
+ )
1180
+ async def test_antigravity_modern_delegation_denylist(
1181
+ tmp_path: Path,
1182
+ monkeypatch: pytest.MonkeyPatch,
1183
+ mode: PermissionMode,
1184
+ denied: tuple[str, ...],
1185
+ delegation_enabled: bool,
1186
+ ) -> None:
1187
+ monkeypatch.setattr(FakeTypes, "BuiltinTools", ModernBuiltinTools)
1188
+ runtime = make_runtime(data_dir=tmp_path)
1189
+ await runtime.run(
1190
+ AgentTask(goal="task", permissions=PermissionProfile(mode=mode, disallowed_tools=denied))
1191
+ )
1192
+ capabilities = FakeAgent.last_config.kwargs["capabilities"]
1193
+ normalized = {ModernBuiltinTools(tool) for tool in denied}
1194
+ assert capabilities.enabled_tools == [
1195
+ tool for tool in ModernBuiltinTools if tool not in normalized
1196
+ ]
1197
+ assert capabilities.enable_subagents is delegation_enabled
1198
+
1199
+
1200
+ @pytest.mark.asyncio
1201
+ @pytest.mark.parametrize("tool", ["start_subagent", "invoke_subagent", "run_workflow"])
1202
+ @pytest.mark.parametrize(
1203
+ "mode,filesystem",
1204
+ [
1205
+ (PermissionMode.STRICT, FilesystemAccess.WORKSPACE_WRITE),
1206
+ (PermissionMode.DEFAULT, FilesystemAccess.READ_ONLY),
1207
+ ],
1208
+ )
1209
+ async def test_antigravity_modern_delegation_refuses_restricted_allowlist(
1210
+ tmp_path: Path,
1211
+ monkeypatch: pytest.MonkeyPatch,
1212
+ tool: str,
1213
+ mode: PermissionMode,
1214
+ filesystem: FilesystemAccess,
1215
+ ) -> None:
1216
+ monkeypatch.setattr(FakeTypes, "BuiltinTools", ModernBuiltinTools)
1217
+ runtime = make_runtime(data_dir=tmp_path)
1218
+ with pytest.raises(UnsupportedTaskInputError, match="read-only posture"):
1219
+ await runtime.run(
1220
+ AgentTask(
1221
+ goal="task",
1222
+ permissions=PermissionProfile(
1223
+ mode=mode, filesystem=filesystem, allowed_tools=(tool,)
1224
+ ),
1225
+ )
1226
+ )
1227
+
1228
+
1126
1229
  @pytest.mark.asyncio
1127
1230
  async def test_antigravity_read_only_rejects_write_allowed_tool(tmp_path: Path) -> None:
1128
1231
  runtime = make_runtime(data_dir=tmp_path)
@@ -10,6 +10,7 @@ from __future__ import annotations
10
10
  import dataclasses
11
11
  import importlib.metadata
12
12
  import inspect
13
+ import warnings
13
14
  from pathlib import Path
14
15
 
15
16
  import pytest
@@ -260,6 +261,51 @@ def test_antigravity_permissive_deny_list_preserves_other_tools() -> None:
260
261
  assert actual == expected
261
262
 
262
263
 
264
+ @pytest.mark.parametrize("tool", ["start_subagent", "invoke_subagent", "run_workflow"])
265
+ @pytest.mark.parametrize("field", ["allowed_tools", "disallowed_tools"])
266
+ def test_antigravity_delegation_permissions_with_real_sdk(tool: str, field: str) -> None:
267
+ pytest.importorskip("google.antigravity")
268
+ from google.antigravity import types
269
+
270
+ from agent_runtime_kit import (
271
+ AgentTask,
272
+ PermissionMode,
273
+ PermissionProfile,
274
+ UnsupportedTaskInputError,
275
+ )
276
+ from agent_runtime_kit.adapters.antigravity import AntigravityAgentRuntime, _capability_policy
277
+
278
+ runtime = AntigravityAgentRuntime(api_key="test-no-network")
279
+ task = AgentTask(
280
+ goal="Inspect delegation permissions only",
281
+ permissions=PermissionProfile(mode=PermissionMode.PERMISSIVE, **{field: (tool,)}),
282
+ )
283
+ sdk = runtime._load_sdk()
284
+ # The declared floor predates canonical invocation and workflows. New names
285
+ # must still receive a typed refusal there, while legacy names keep working.
286
+ if tool != "start_subagent" and not hasattr(types.BuiltinTools, tool.upper()):
287
+ with pytest.raises(UnsupportedTaskInputError):
288
+ _capability_policy(runtime.kind, task, sdk)
289
+ return
290
+
291
+ with warnings.catch_warnings(record=True) as caught:
292
+ warnings.simplefilter("always", DeprecationWarning)
293
+ capabilities, _ = _capability_policy(runtime.kind, task, sdk)
294
+ selected = types.BuiltinTools(tool)
295
+ if tool != "start_subagent":
296
+ assert not caught
297
+ if field == "allowed_tools":
298
+ assert capabilities.enabled_tools == [selected]
299
+ assert capabilities.enable_subagents is True
300
+ else:
301
+ expected = set(types.BuiltinTools.all_tools()) - {selected}
302
+ assert set(capabilities.enabled_tools) == expected
303
+ delegation_names = {"start_subagent", "invoke_subagent", "run_workflow"}
304
+ assert capabilities.enable_subagents is bool(
305
+ delegation_names.intersection(item.value for item in expected)
306
+ )
307
+
308
+
263
309
  def test_antigravity_policy_and_config() -> None:
264
310
  pytest.importorskip("google.antigravity")
265
311
  from google.antigravity.connections.local.local_connection_config import LocalAgentConfig
@@ -3230,7 +3230,7 @@ async def test_stage_execution_uses_agent_task_runtime_primitives(tmp_path: Path
3230
3230
 
3231
3231
 
3232
3232
  @pytest.mark.asyncio
3233
- async def test_codex_stage_execution_uses_gpt_55_xhigh_thinking(tmp_path: Path) -> None:
3233
+ async def test_codex_stage_execution_uses_gpt_61_sol_max_thinking(tmp_path: Path) -> None:
3234
3234
  runtime = RecordingRuntime(kind=AgentRuntimeKind.CODEX_AGENT_SDK)
3235
3235
  context = RunContext(
3236
3236
  run_id="run-1",
@@ -3251,8 +3251,10 @@ async def test_codex_stage_execution_uses_gpt_55_xhigh_thinking(tmp_path: Path)
3251
3251
  )
3252
3252
 
3253
3253
  assert runtime.task is not None
3254
- assert runtime.task.metadata["model"] == SDK_EVOLUTION_CODEX_MODEL
3255
- assert runtime.task.metadata["reasoning_effort"] == SDK_EVOLUTION_CODEX_REASONING_EFFORT
3254
+ assert runtime.task.metadata["model"] == SDK_EVOLUTION_CODEX_MODEL == "gpt-6.1-sol"
3255
+ assert (
3256
+ runtime.task.metadata["reasoning_effort"] == SDK_EVOLUTION_CODEX_REASONING_EFFORT == "max"
3257
+ )
3256
3258
 
3257
3259
 
3258
3260
  @pytest.mark.asyncio
@@ -4090,16 +4092,16 @@ def test_parse_args_explicit_analysis_driver() -> None:
4090
4092
  "--runtime",
4091
4093
  "codex-agent-sdk",
4092
4094
  "--model",
4093
- "gpt-6-astra",
4095
+ "gpt-6.1-sol",
4094
4096
  "--reasoning-effort",
4095
- "xhigh",
4097
+ "max",
4096
4098
  "--codex-bin",
4097
4099
  "/installed/codex",
4098
4100
  ]
4099
4101
  )
4100
4102
  assert (options.model, options.reasoning_effort, options.codex_bin) == (
4101
- "gpt-6-astra",
4102
- "xhigh",
4103
+ "gpt-6.1-sol",
4104
+ "max",
4103
4105
  "/installed/codex",
4104
4106
  )
4105
4107
  with pytest.raises(SystemExit):