agentshim 0.6.2__tar.gz → 0.6.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.
- {agentshim-0.6.2 → agentshim-0.6.4}/CHANGELOG.md +13 -0
- {agentshim-0.6.2 → agentshim-0.6.4}/PKG-INFO +1 -1
- {agentshim-0.6.2 → agentshim-0.6.4}/agentshim/__init__.py +1 -1
- {agentshim-0.6.2 → agentshim-0.6.4}/agentshim/core/mcp.py +11 -7
- {agentshim-0.6.2 → agentshim-0.6.4}/agentshim/providers/claude/provider.py +3 -0
- {agentshim-0.6.2 → agentshim-0.6.4}/agentshim/providers/codex/provider.py +16 -8
- {agentshim-0.6.2 → agentshim-0.6.4}/agentshim/providers/copilot/provider.py +3 -0
- {agentshim-0.6.2 → agentshim-0.6.4}/agentshim/providers/gemini/provider.py +3 -0
- {agentshim-0.6.2 → agentshim-0.6.4}/agentshim/providers/opencode/provider.py +3 -0
- {agentshim-0.6.2 → agentshim-0.6.4}/pyproject.toml +1 -1
- {agentshim-0.6.2 → agentshim-0.6.4}/.gitignore +0 -0
- {agentshim-0.6.2 → agentshim-0.6.4}/README.md +0 -0
- {agentshim-0.6.2 → agentshim-0.6.4}/agentshim/agent.py +0 -0
- {agentshim-0.6.2 → agentshim-0.6.4}/agentshim/core/__init__.py +0 -0
- {agentshim-0.6.2 → agentshim-0.6.4}/agentshim/core/_files.py +0 -0
- {agentshim-0.6.2 → agentshim-0.6.4}/agentshim/core/env.py +0 -0
- {agentshim-0.6.2 → agentshim-0.6.4}/agentshim/core/errors.py +0 -0
- {agentshim-0.6.2 → agentshim-0.6.4}/agentshim/core/events.py +0 -0
- {agentshim-0.6.2 → agentshim-0.6.4}/agentshim/core/profile.py +0 -0
- {agentshim-0.6.2 → agentshim-0.6.4}/agentshim/core/provider.py +0 -0
- {agentshim-0.6.2 → agentshim-0.6.4}/agentshim/core/schema.py +0 -0
- {agentshim-0.6.2 → agentshim-0.6.4}/agentshim/core/stream.py +0 -0
- {agentshim-0.6.2 → agentshim-0.6.4}/agentshim/core/turn.py +0 -0
- {agentshim-0.6.2 → agentshim-0.6.4}/agentshim/core/usage.py +0 -0
- {agentshim-0.6.2 → agentshim-0.6.4}/agentshim/execution/__init__.py +0 -0
- {agentshim-0.6.2 → agentshim-0.6.4}/agentshim/execution/executor.py +0 -0
- {agentshim-0.6.2 → agentshim-0.6.4}/agentshim/execution/host.py +0 -0
- {agentshim-0.6.2 → agentshim-0.6.4}/agentshim/execution/transform.py +0 -0
- {agentshim-0.6.2 → agentshim-0.6.4}/agentshim/providers/__init__.py +0 -0
- {agentshim-0.6.2 → agentshim-0.6.4}/agentshim/providers/claude/__init__.py +0 -0
- {agentshim-0.6.2 → agentshim-0.6.4}/agentshim/providers/claude/events.py +0 -0
- {agentshim-0.6.2 → agentshim-0.6.4}/agentshim/providers/claude/hooks/__init__.py +0 -0
- {agentshim-0.6.2 → agentshim-0.6.4}/agentshim/providers/claude/hooks/confine_reads.py +0 -0
- {agentshim-0.6.2 → agentshim-0.6.4}/agentshim/providers/claude/parser.py +0 -0
- {agentshim-0.6.2 → agentshim-0.6.4}/agentshim/providers/claude/sandbox.py +0 -0
- {agentshim-0.6.2 → agentshim-0.6.4}/agentshim/providers/claude/scripted.py +0 -0
- {agentshim-0.6.2 → agentshim-0.6.4}/agentshim/providers/codex/__init__.py +0 -0
- {agentshim-0.6.2 → agentshim-0.6.4}/agentshim/providers/codex/events.py +0 -0
- {agentshim-0.6.2 → agentshim-0.6.4}/agentshim/providers/codex/parser.py +0 -0
- {agentshim-0.6.2 → agentshim-0.6.4}/agentshim/providers/codex/scripted.py +0 -0
- {agentshim-0.6.2 → agentshim-0.6.4}/agentshim/providers/copilot/__init__.py +0 -0
- {agentshim-0.6.2 → agentshim-0.6.4}/agentshim/providers/copilot/events.py +0 -0
- {agentshim-0.6.2 → agentshim-0.6.4}/agentshim/providers/copilot/parser.py +0 -0
- {agentshim-0.6.2 → agentshim-0.6.4}/agentshim/providers/copilot/scripted.py +0 -0
- {agentshim-0.6.2 → agentshim-0.6.4}/agentshim/providers/gemini/__init__.py +0 -0
- {agentshim-0.6.2 → agentshim-0.6.4}/agentshim/providers/gemini/events.py +0 -0
- {agentshim-0.6.2 → agentshim-0.6.4}/agentshim/providers/gemini/parser.py +0 -0
- {agentshim-0.6.2 → agentshim-0.6.4}/agentshim/providers/gemini/scripted.py +0 -0
- {agentshim-0.6.2 → agentshim-0.6.4}/agentshim/providers/opencode/__init__.py +0 -0
- {agentshim-0.6.2 → agentshim-0.6.4}/agentshim/providers/opencode/events.py +0 -0
- {agentshim-0.6.2 → agentshim-0.6.4}/agentshim/providers/opencode/parser.py +0 -0
- {agentshim-0.6.2 → agentshim-0.6.4}/agentshim/providers/opencode/scripted.py +0 -0
- {agentshim-0.6.2 → agentshim-0.6.4}/agentshim/py.typed +0 -0
- {agentshim-0.6.2 → agentshim-0.6.4}/agentshim/testing/__init__.py +0 -0
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.6.4 (2026-09-27)
|
|
4
|
+
|
|
5
|
+
- Add optional positive finite `startup_timeout_s` to stdio and HTTP MCP
|
|
6
|
+
server specs. Codex renders it as an invocation-scoped
|
|
7
|
+
`startup_timeout_sec` override, so slow-starting servers can initialize
|
|
8
|
+
without modifying the user's config file.
|
|
9
|
+
|
|
10
|
+
## 0.6.3 (2026-09-26)
|
|
11
|
+
|
|
12
|
+
- Narrow Codex `auth_files` to `.codex/auth.json`. User `config.toml` is not
|
|
13
|
+
authentication state and need not be copied or mounted into an isolated
|
|
14
|
+
agent process; per-turn settings continue to use CLI config overrides.
|
|
15
|
+
|
|
3
16
|
## 0.6.2 (2026-09-26)
|
|
4
17
|
|
|
5
18
|
- Add optional positive finite `tool_timeout_s` to stdio and HTTP MCP server
|
|
@@ -40,15 +40,16 @@ def _no_env() -> Mapping[str, str]:
|
|
|
40
40
|
class StdioMcpServer:
|
|
41
41
|
"""MCP server launched as a subprocess over stdio.
|
|
42
42
|
|
|
43
|
-
``
|
|
44
|
-
|
|
45
|
-
rather than silently dropping it.
|
|
43
|
+
``startup_timeout_s`` bounds initialization and the first tool listing;
|
|
44
|
+
``tool_timeout_s`` bounds one tool call. Providers that cannot express a
|
|
45
|
+
requested per-server timeout reject it rather than silently dropping it.
|
|
46
46
|
"""
|
|
47
47
|
|
|
48
48
|
name: str
|
|
49
49
|
command: str
|
|
50
50
|
args: Sequence[str] = ()
|
|
51
51
|
env: Mapping[str, str] = field(default_factory=_no_env)
|
|
52
|
+
startup_timeout_s: float | None = None
|
|
52
53
|
tool_timeout_s: float | None = None
|
|
53
54
|
|
|
54
55
|
def __post_init__(self) -> None:
|
|
@@ -63,7 +64,8 @@ class StdioMcpServer:
|
|
|
63
64
|
if not self.command:
|
|
64
65
|
msg = f"MCP server {self.name!r} must declare a command"
|
|
65
66
|
raise ValueError(msg)
|
|
66
|
-
|
|
67
|
+
_validate_timeout(self.name, "startup_timeout_s", self.startup_timeout_s)
|
|
68
|
+
_validate_timeout(self.name, "tool_timeout_s", self.tool_timeout_s)
|
|
67
69
|
|
|
68
70
|
|
|
69
71
|
#: The two remote MCP transports the CLIs distinguish.
|
|
@@ -87,6 +89,7 @@ class HttpMcpServer:
|
|
|
87
89
|
url: str
|
|
88
90
|
headers: Mapping[str, str] = field(default_factory=_no_env)
|
|
89
91
|
transport: McpTransport = "http"
|
|
92
|
+
startup_timeout_s: float | None = None
|
|
90
93
|
tool_timeout_s: float | None = None
|
|
91
94
|
|
|
92
95
|
def __post_init__(self) -> None:
|
|
@@ -104,15 +107,16 @@ class HttpMcpServer:
|
|
|
104
107
|
if self.transport not in _TRANSPORTS:
|
|
105
108
|
msg = f"MCP server {self.name!r} transport must be one of {_TRANSPORTS}"
|
|
106
109
|
raise ValueError(msg)
|
|
107
|
-
|
|
110
|
+
_validate_timeout(self.name, "startup_timeout_s", self.startup_timeout_s)
|
|
111
|
+
_validate_timeout(self.name, "tool_timeout_s", self.tool_timeout_s)
|
|
108
112
|
|
|
109
113
|
|
|
110
|
-
def
|
|
114
|
+
def _validate_timeout(name: str, field_name: str, timeout_s: float | None) -> None:
|
|
111
115
|
"""Reject timeout values no provider can apply meaningfully."""
|
|
112
116
|
if timeout_s is None:
|
|
113
117
|
return
|
|
114
118
|
if isinstance(timeout_s, bool) or not math.isfinite(timeout_s) or timeout_s <= 0:
|
|
115
|
-
msg = f"MCP server {name!r}
|
|
119
|
+
msg = f"MCP server {name!r} {field_name} must be a positive finite number"
|
|
116
120
|
raise ValueError(msg)
|
|
117
121
|
|
|
118
122
|
|
|
@@ -162,6 +162,9 @@ def _resumed_session_id(argv: Sequence[str]) -> str | None:
|
|
|
162
162
|
|
|
163
163
|
def mcp_entry(server: McpServer) -> dict[str, Any]:
|
|
164
164
|
"""Render one server the way ``.mcp.json`` describes it."""
|
|
165
|
+
if server.startup_timeout_s is not None:
|
|
166
|
+
msg = "claude cannot configure a per-server MCP startup timeout"
|
|
167
|
+
raise ProviderCapabilityError(msg)
|
|
165
168
|
if server.tool_timeout_s is not None:
|
|
166
169
|
msg = "claude cannot configure a per-server MCP tool timeout"
|
|
167
170
|
raise ProviderCapabilityError(msg)
|
|
@@ -76,7 +76,10 @@ PROFILE = ProviderProfile(
|
|
|
76
76
|
# "Layer $CODEX_HOME/<name>.config.toml on top of the base user config";
|
|
77
77
|
# "auth still uses CODEX_HOME").
|
|
78
78
|
state_root_env="CODEX_HOME",
|
|
79
|
-
|
|
79
|
+
# Authentication is self-contained in auth.json. config.toml is user
|
|
80
|
+
# policy and preferences, so consumers that copy or mount auth state must
|
|
81
|
+
# not needlessly expose it to an agent process.
|
|
82
|
+
auth_files=(".codex/auth.json",),
|
|
80
83
|
# CLI_FLAGS: Codex takes MCP servers as --config overrides, never a file.
|
|
81
84
|
mcp_config_file=None,
|
|
82
85
|
)
|
|
@@ -187,7 +190,7 @@ def _server_flags(server: McpServer) -> list[str]:
|
|
|
187
190
|
# A ``--config`` override carries the address and nothing else, so
|
|
188
191
|
# Codex works the transport out from the endpoint itself.
|
|
189
192
|
flags = ["--config", f"{prefix}.url={_toml_str(server.url)}"]
|
|
190
|
-
return flags +
|
|
193
|
+
return flags + _timeout_flags(prefix, server)
|
|
191
194
|
flags = [
|
|
192
195
|
"--config",
|
|
193
196
|
f"{prefix}.command={_toml_str(server.command)}",
|
|
@@ -196,14 +199,17 @@ def _server_flags(server: McpServer) -> list[str]:
|
|
|
196
199
|
]
|
|
197
200
|
for env_key, env_value in server.env.items():
|
|
198
201
|
flags += ["--config", f"{prefix}.env.{env_key}={_toml_str(env_value)}"]
|
|
199
|
-
return flags +
|
|
202
|
+
return flags + _timeout_flags(prefix, server)
|
|
200
203
|
|
|
201
204
|
|
|
202
|
-
def
|
|
203
|
-
"""Render Codex's per-server
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
205
|
+
def _timeout_flags(prefix: str, server: McpServer) -> list[str]:
|
|
206
|
+
"""Render Codex's per-server timeouts as invocation overrides."""
|
|
207
|
+
flags: list[str] = []
|
|
208
|
+
if server.startup_timeout_s is not None:
|
|
209
|
+
flags += ["--config", f"{prefix}.startup_timeout_sec={server.startup_timeout_s}"]
|
|
210
|
+
if server.tool_timeout_s is not None:
|
|
211
|
+
flags += ["--config", f"{prefix}.tool_timeout_sec={server.tool_timeout_s}"]
|
|
212
|
+
return flags
|
|
207
213
|
|
|
208
214
|
|
|
209
215
|
def _toml_str(value: str) -> str:
|
|
@@ -277,6 +283,8 @@ def _apply_mcp_override(entry: dict[str, Any], field: str, raw_value: str) -> No
|
|
|
277
283
|
entry["transport"] = "http"
|
|
278
284
|
elif field == "tool_timeout_sec":
|
|
279
285
|
entry["tool_timeout_s"] = float(raw_value)
|
|
286
|
+
elif field == "startup_timeout_sec":
|
|
287
|
+
entry["startup_timeout_s"] = float(raw_value)
|
|
280
288
|
elif field.startswith("env."):
|
|
281
289
|
entry.setdefault("env", {})[field.removeprefix("env.")] = _parse_toml_str(raw_value)
|
|
282
290
|
|
|
@@ -135,6 +135,9 @@ class CopilotProvider:
|
|
|
135
135
|
|
|
136
136
|
def mcp_entry(server: McpServer) -> dict[str, Any]:
|
|
137
137
|
"""Render one server the way ``--additional-mcp-config`` describes it."""
|
|
138
|
+
if server.startup_timeout_s is not None:
|
|
139
|
+
msg = "copilot cannot configure a per-server MCP startup timeout"
|
|
140
|
+
raise ProviderCapabilityError(msg)
|
|
138
141
|
if server.tool_timeout_s is not None:
|
|
139
142
|
msg = "copilot cannot configure a per-server MCP tool timeout"
|
|
140
143
|
raise ProviderCapabilityError(msg)
|
|
@@ -154,6 +154,9 @@ def mcp_entry(server: McpServer) -> dict[str, Any]:
|
|
|
154
154
|
``trust: true`` skips Gemini's per-tool approval prompt for servers the
|
|
155
155
|
caller installed on purpose.
|
|
156
156
|
"""
|
|
157
|
+
if server.startup_timeout_s is not None:
|
|
158
|
+
msg = "gemini cannot configure a per-server MCP startup timeout"
|
|
159
|
+
raise ProviderCapabilityError(msg)
|
|
157
160
|
if server.tool_timeout_s is not None:
|
|
158
161
|
msg = "gemini cannot configure a per-server MCP tool timeout"
|
|
159
162
|
raise ProviderCapabilityError(msg)
|
|
@@ -159,6 +159,9 @@ def mcp_entry(server: McpServer) -> dict[str, Any]:
|
|
|
159
159
|
non-interactive ``run`` mode auto-answers permission prompts, so no
|
|
160
160
|
extra ``permission`` block is needed.
|
|
161
161
|
"""
|
|
162
|
+
if server.startup_timeout_s is not None:
|
|
163
|
+
msg = "opencode cannot configure a per-server MCP startup timeout"
|
|
164
|
+
raise ProviderCapabilityError(msg)
|
|
162
165
|
if server.tool_timeout_s is not None:
|
|
163
166
|
msg = "opencode cannot configure a per-server MCP tool timeout"
|
|
164
167
|
raise ProviderCapabilityError(msg)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|