agentic-runner 3.4.0__tar.gz → 3.4.1__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.
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/PKG-INFO +1 -1
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/__init__.py +1 -1
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/workers/contract_isolation.py +32 -3
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/.gitignore +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/LICENSE +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/README.md +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/pyproject.toml +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/activities.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/attempts.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/auth_mode.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/build.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/callback.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/child_watcher.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/cli.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/cli_floor.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/config.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/credentials.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/device_login_activities.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/egress.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/harness_self_test.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/heartbeat_link.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/hooks.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/host_store.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/integrations/__init__.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/integrations/git/__init__.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/integrations/git/contracts.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/integrations/git/evidence.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/integrations/git/fake_workspace.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/integrations/git/workspace.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/integrations/github/__init__.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/integrations/github/auth.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/integrations/github/fake_client.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/integrations/github/gh_client.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/lifecycle.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/llm_proxy.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/mcp.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/message_store.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/private_state.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/py.typed +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/recipient_key_secret.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/registration.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/runtime/__init__.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/runtime/verifier_command.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/sealed_box.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/service.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/testing/__init__.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/testing/__main__.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/testing/control_plane.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/testing/plugin.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/testing/test_conformance.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/testing/workflow.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/tiny_http.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/triage_activities.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/user_sources.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/workers/__init__.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/workers/_runtime_support.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/workers/agent_runtime.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/workers/claude_runtime.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/workers/codex_runtime.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/workers/command_policy.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/workers/contract_device_login.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/workers/fastapi_client.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/workers/harness_outcome.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/workers/harness_usage.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/workers/mcp_config.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/workers/settings.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/workers/skills.py +0 -0
- {agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/workstation.py +0 -0
{agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/workers/contract_isolation.py
RENAMED
|
@@ -21,11 +21,13 @@ from __future__ import annotations
|
|
|
21
21
|
|
|
22
22
|
import fcntl
|
|
23
23
|
import json
|
|
24
|
+
import logging
|
|
24
25
|
import os
|
|
25
26
|
import re
|
|
26
27
|
import resource
|
|
27
28
|
import shutil
|
|
28
29
|
import stat
|
|
30
|
+
import sys
|
|
29
31
|
from collections.abc import Callable, Iterator
|
|
30
32
|
from contextlib import contextmanager
|
|
31
33
|
from dataclasses import dataclass
|
|
@@ -53,6 +55,8 @@ __all__ = [
|
|
|
53
55
|
# for an Agent-less Work Record).
|
|
54
56
|
NO_CONTRACT: Final[str] = "no-contract"
|
|
55
57
|
|
|
58
|
+
_logger = logging.getLogger(__name__)
|
|
59
|
+
|
|
56
60
|
_HARNESS_DIR: Final[str] = "harness"
|
|
57
61
|
_TMP_DIR: Final[str] = "tmp"
|
|
58
62
|
# Everything directly under a Contract's directory that is not one of its Workspaces.
|
|
@@ -126,12 +130,15 @@ class DirectiveSandbox:
|
|
|
126
130
|
without ``CAP_SETUID``): the directories are still 0700 and per Contract, but the
|
|
127
131
|
process runs as the Runner's own user. ADR-0015 §5 turns that into a declared,
|
|
128
132
|
routing-visible single-Contract mode in M3; M1 only has to not pretend otherwise.
|
|
133
|
+
|
|
134
|
+
``max_memory_bytes`` is None where the kernel cannot hold a memory ceiling (macOS, see
|
|
135
|
+
``ContractIsolation``): the spawn runs without one rather than not at all.
|
|
129
136
|
"""
|
|
130
137
|
|
|
131
138
|
home_dir: Path
|
|
132
139
|
harness_config_dir: Path
|
|
133
140
|
max_processes: int
|
|
134
|
-
max_memory_bytes: int
|
|
141
|
+
max_memory_bytes: int | None
|
|
135
142
|
uid: int | None = None
|
|
136
143
|
gid: int | None = None
|
|
137
144
|
|
|
@@ -185,7 +192,8 @@ class DirectiveSandbox:
|
|
|
185
192
|
|
|
186
193
|
def apply_floor() -> None:
|
|
187
194
|
resource.setrlimit(resource.RLIMIT_NPROC, (max_processes, max_processes))
|
|
188
|
-
|
|
195
|
+
if max_memory_bytes is not None:
|
|
196
|
+
resource.setrlimit(resource.RLIMIT_DATA, (max_memory_bytes, max_memory_bytes))
|
|
189
197
|
|
|
190
198
|
return apply_floor
|
|
191
199
|
|
|
@@ -218,6 +226,7 @@ class ContractIsolation:
|
|
|
218
226
|
max_processes: int,
|
|
219
227
|
memory_limit_bytes: int,
|
|
220
228
|
can_separate_uids: bool | None = None,
|
|
229
|
+
can_limit_memory: bool | None = None,
|
|
221
230
|
) -> None:
|
|
222
231
|
if uid_min <= 0 or uid_max < uid_min:
|
|
223
232
|
raise ValueError("contract uid range must be a positive, non-empty range")
|
|
@@ -233,6 +242,24 @@ class ContractIsolation:
|
|
|
233
242
|
self._can_separate_uids = (
|
|
234
243
|
os.geteuid() == 0 if can_separate_uids is None else can_separate_uids
|
|
235
244
|
)
|
|
245
|
+
# XNU refuses an RLIMIT_DATA below the address space a process already maps, and
|
|
246
|
+
# every arm64 macOS process maps hundreds of GiB of shared cache and reservations
|
|
247
|
+
# before it runs a line — so any ceiling worth setting fails `preexec_fn` and the
|
|
248
|
+
# spawn with it (QTS-1319). macOS enforces neither RLIMIT_AS nor RLIMIT_RSS, so
|
|
249
|
+
# there is no rlimit to fall back to: the floor there is RLIMIT_NPROC alone.
|
|
250
|
+
self._can_limit_memory = (
|
|
251
|
+
sys.platform != "darwin" if can_limit_memory is None else can_limit_memory
|
|
252
|
+
)
|
|
253
|
+
if not self._can_limit_memory:
|
|
254
|
+
_logger.warning(
|
|
255
|
+
"this host refuses RLIMIT_DATA: Directive spawns run without the %d-byte "
|
|
256
|
+
"memory ceiling",
|
|
257
|
+
memory_limit_bytes,
|
|
258
|
+
)
|
|
259
|
+
|
|
260
|
+
@property
|
|
261
|
+
def can_limit_memory(self) -> bool:
|
|
262
|
+
return self._can_limit_memory
|
|
236
263
|
|
|
237
264
|
@property
|
|
238
265
|
def can_separate_uids(self) -> bool:
|
|
@@ -306,7 +333,9 @@ class ContractIsolation:
|
|
|
306
333
|
home_dir=home,
|
|
307
334
|
harness_config_dir=harness,
|
|
308
335
|
max_processes=self._max_processes,
|
|
309
|
-
max_memory_bytes=
|
|
336
|
+
max_memory_bytes=(
|
|
337
|
+
(memory_limit_bytes or self._memory_limit_bytes) if self._can_limit_memory else None
|
|
338
|
+
),
|
|
310
339
|
uid=uid,
|
|
311
340
|
gid=uid,
|
|
312
341
|
)
|
|
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
|
{agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/integrations/git/__init__.py
RENAMED
|
File without changes
|
{agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/integrations/git/contracts.py
RENAMED
|
File without changes
|
{agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/integrations/git/evidence.py
RENAMED
|
File without changes
|
{agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/integrations/git/fake_workspace.py
RENAMED
|
File without changes
|
{agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/integrations/git/workspace.py
RENAMED
|
File without changes
|
{agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/integrations/github/__init__.py
RENAMED
|
File without changes
|
{agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/integrations/github/auth.py
RENAMED
|
File without changes
|
{agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/integrations/github/fake_client.py
RENAMED
|
File without changes
|
{agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/integrations/github/gh_client.py
RENAMED
|
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
|
{agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/runtime/verifier_command.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/testing/test_conformance.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/workers/_runtime_support.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{agentic_runner-3.4.0 → agentic_runner-3.4.1}/src/agentic_runner/workers/contract_device_login.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|