agentic-runner 3.4.0__tar.gz → 3.4.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 (68) hide show
  1. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/PKG-INFO +1 -1
  2. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/__init__.py +1 -1
  3. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/workers/contract_isolation.py +47 -6
  4. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/.gitignore +0 -0
  5. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/LICENSE +0 -0
  6. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/README.md +0 -0
  7. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/pyproject.toml +0 -0
  8. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/activities.py +0 -0
  9. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/attempts.py +0 -0
  10. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/auth_mode.py +0 -0
  11. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/build.py +0 -0
  12. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/callback.py +0 -0
  13. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/child_watcher.py +0 -0
  14. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/cli.py +0 -0
  15. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/cli_floor.py +0 -0
  16. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/config.py +0 -0
  17. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/credentials.py +0 -0
  18. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/device_login_activities.py +0 -0
  19. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/egress.py +0 -0
  20. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/harness_self_test.py +0 -0
  21. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/heartbeat_link.py +0 -0
  22. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/hooks.py +0 -0
  23. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/host_store.py +0 -0
  24. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/integrations/__init__.py +0 -0
  25. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/integrations/git/__init__.py +0 -0
  26. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/integrations/git/contracts.py +0 -0
  27. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/integrations/git/evidence.py +0 -0
  28. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/integrations/git/fake_workspace.py +0 -0
  29. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/integrations/git/workspace.py +0 -0
  30. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/integrations/github/__init__.py +0 -0
  31. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/integrations/github/auth.py +0 -0
  32. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/integrations/github/fake_client.py +0 -0
  33. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/integrations/github/gh_client.py +0 -0
  34. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/lifecycle.py +0 -0
  35. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/llm_proxy.py +0 -0
  36. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/mcp.py +0 -0
  37. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/message_store.py +0 -0
  38. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/private_state.py +0 -0
  39. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/py.typed +0 -0
  40. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/recipient_key_secret.py +0 -0
  41. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/registration.py +0 -0
  42. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/runtime/__init__.py +0 -0
  43. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/runtime/verifier_command.py +0 -0
  44. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/sealed_box.py +0 -0
  45. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/service.py +0 -0
  46. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/testing/__init__.py +0 -0
  47. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/testing/__main__.py +0 -0
  48. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/testing/control_plane.py +0 -0
  49. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/testing/plugin.py +0 -0
  50. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/testing/test_conformance.py +0 -0
  51. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/testing/workflow.py +0 -0
  52. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/tiny_http.py +0 -0
  53. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/triage_activities.py +0 -0
  54. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/user_sources.py +0 -0
  55. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/workers/__init__.py +0 -0
  56. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/workers/_runtime_support.py +0 -0
  57. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/workers/agent_runtime.py +0 -0
  58. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/workers/claude_runtime.py +0 -0
  59. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/workers/codex_runtime.py +0 -0
  60. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/workers/command_policy.py +0 -0
  61. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/workers/contract_device_login.py +0 -0
  62. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/workers/fastapi_client.py +0 -0
  63. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/workers/harness_outcome.py +0 -0
  64. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/workers/harness_usage.py +0 -0
  65. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/workers/mcp_config.py +0 -0
  66. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/workers/settings.py +0 -0
  67. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/workers/skills.py +0 -0
  68. {agentic_runner-3.4.0 → agentic_runner-3.4.2}/src/agentic_runner/workstation.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: agentic-runner
3
- Version: 3.4.0
3
+ Version: 3.4.2
4
4
  Summary: The Agentic OS Runner: an activity-only Temporal executor for workspaces, Agent Runtimes and verb seams
5
5
  License-Expression: AGPL-3.0-only
6
6
  License-File: LICENSE
@@ -7,6 +7,6 @@ stay on the platform; this package imports none of them, and a CI partition test
7
7
  (``tests/test_package_partition.py``) fails the build if that changes.
8
8
  """
9
9
 
10
- __version__ = "3.4.0"
10
+ __version__ = "3.4.2"
11
11
 
12
12
  __all__ = ["__version__"]
@@ -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,19 @@ 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.
136
+
137
+ ``max_processes`` is None whenever ``uid`` is: ``RLIMIT_NPROC`` counts every process
138
+ the real uid owns, not the spawn's descendants, so on the Runner's own user it is a
139
+ ceiling on the whole login session and the CLI's first fork fails (QTS-1321).
129
140
  """
130
141
 
131
142
  home_dir: Path
132
143
  harness_config_dir: Path
133
- max_processes: int
134
- max_memory_bytes: int
144
+ max_processes: int | None
145
+ max_memory_bytes: int | None
135
146
  uid: int | None = None
136
147
  gid: int | None = None
137
148
 
@@ -184,8 +195,10 @@ class DirectiveSandbox:
184
195
  max_memory_bytes = self.max_memory_bytes
185
196
 
186
197
  def apply_floor() -> None:
187
- resource.setrlimit(resource.RLIMIT_NPROC, (max_processes, max_processes))
188
- resource.setrlimit(resource.RLIMIT_DATA, (max_memory_bytes, max_memory_bytes))
198
+ if max_processes is not None:
199
+ resource.setrlimit(resource.RLIMIT_NPROC, (max_processes, max_processes))
200
+ if max_memory_bytes is not None:
201
+ resource.setrlimit(resource.RLIMIT_DATA, (max_memory_bytes, max_memory_bytes))
189
202
 
190
203
  return apply_floor
191
204
 
@@ -218,6 +231,7 @@ class ContractIsolation:
218
231
  max_processes: int,
219
232
  memory_limit_bytes: int,
220
233
  can_separate_uids: bool | None = None,
234
+ can_limit_memory: bool | None = None,
221
235
  ) -> None:
222
236
  if uid_min <= 0 or uid_max < uid_min:
223
237
  raise ValueError("contract uid range must be a positive, non-empty range")
@@ -233,6 +247,31 @@ class ContractIsolation:
233
247
  self._can_separate_uids = (
234
248
  os.geteuid() == 0 if can_separate_uids is None else can_separate_uids
235
249
  )
250
+ # XNU refuses an RLIMIT_DATA below the address space a process already maps, and
251
+ # every arm64 macOS process maps hundreds of GiB of shared cache and reservations
252
+ # before it runs a line — so any ceiling worth setting fails `preexec_fn` and the
253
+ # spawn with it (QTS-1319). macOS enforces neither RLIMIT_AS nor RLIMIT_RSS, so
254
+ # there is no rlimit to fall back to: the floor there is RLIMIT_NPROC alone.
255
+ self._can_limit_memory = (
256
+ sys.platform != "darwin" if can_limit_memory is None else can_limit_memory
257
+ )
258
+ if not self._can_separate_uids:
259
+ _logger.warning(
260
+ "this host cannot separate Contract uids: Directive spawns run without the "
261
+ "%d-process RLIMIT_NPROC ceiling, which would count every process this "
262
+ "Runner's user owns",
263
+ max_processes,
264
+ )
265
+ if not self._can_limit_memory:
266
+ _logger.warning(
267
+ "this host refuses RLIMIT_DATA: Directive spawns run without the %d-byte "
268
+ "memory ceiling",
269
+ memory_limit_bytes,
270
+ )
271
+
272
+ @property
273
+ def can_limit_memory(self) -> bool:
274
+ return self._can_limit_memory
236
275
 
237
276
  @property
238
277
  def can_separate_uids(self) -> bool:
@@ -305,8 +344,10 @@ class ContractIsolation:
305
344
  return DirectiveSandbox(
306
345
  home_dir=home,
307
346
  harness_config_dir=harness,
308
- max_processes=self._max_processes,
309
- max_memory_bytes=memory_limit_bytes or self._memory_limit_bytes,
347
+ max_processes=self._max_processes if uid is not None else None,
348
+ max_memory_bytes=(
349
+ (memory_limit_bytes or self._memory_limit_bytes) if self._can_limit_memory else None
350
+ ),
310
351
  uid=uid,
311
352
  gid=uid,
312
353
  )
File without changes
File without changes