verifiers 0.3.2.dev37__py3-none-any.whl → 0.3.2.dev38__py3-none-any.whl

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.
@@ -47,10 +47,13 @@ class CompactionConfig(BaseConfig):
47
47
  summarize_at_tokens: PositiveInt | None = None
48
48
  """Compact at this token count. When unset, compact when 16k tokens remain below the
49
49
  model context window when the provider advertises it."""
50
+ max_compactions: PositiveInt | None = None
51
+ """Compactions per session before the engine stops compacting; `None` =
52
+ nano-rlm's default."""
50
53
 
51
54
 
52
55
  class RLMHarnessConfig(HarnessConfig):
53
- version: str = Field(default="240090d", min_length=1)
56
+ version: str = Field(default="dd2c04f", min_length=1)
54
57
  """Git ref (branch, tag, or commit) of nano-rlm to install. Must know every
55
58
  field this harness puts on the wire, i.e. be at least the default ref."""
56
59
  max_depth: NonNegativeInt | None = None
@@ -59,8 +62,11 @@ class RLMHarnessConfig(HarnessConfig):
59
62
  builtin_skills: list[BuiltinSkill] = Field(default_factory=list)
60
63
  """Built-in rlm skills to enable (RLM_SKILLS), e.g. `["edit"]`; empty enables none.
61
64
  The tool set is fixed (ipython); the base `skills` field takes SKILL.md paths."""
62
- compaction: CompactionConfig | None = None
63
- """Context compaction policy. Set an empty config to use automatic thresholds."""
65
+ compaction: CompactionConfig | bool | None = None
66
+ """Context compaction: a `[compaction]` section (or `true`) enables it with the
67
+ given settings, `false` disables it (an overflowing session then fails), and
68
+ unset defers to nano-rlm's default (on, automatic thresholds, bounded by its
69
+ default 1M tree-token budget)."""
64
70
  max_concurrent_subagents: PositiveInt | None = None
65
71
  """Sub-agents running at once per session tree; `None` = nano-rlm's default (4).
66
72
  nano-rlm requires it to be at least `max_depth`."""
@@ -146,6 +152,19 @@ class RLMHarness(ACPHarness[RLMHarnessConfig]):
146
152
  system_prompt: str | None,
147
153
  ) -> JsonObject:
148
154
  compaction = self.config.compaction
155
+ policy_knobs: dict[str, Any] = {
156
+ "max_depth": self.config.max_depth,
157
+ "max_concurrent_subagents": self.config.max_concurrent_subagents,
158
+ "max_total_turns": self.config.max_total_turns,
159
+ "max_total_tokens": self.config.max_total_tokens,
160
+ "max_tool_output_bytes": self.config.max_tool_output_bytes,
161
+ }
162
+ if isinstance(compaction, bool):
163
+ policy_knobs["compaction"] = compaction
164
+ elif compaction is not None:
165
+ policy_knobs["compaction"] = True
166
+ policy_knobs["summarize_at_tokens"] = compaction.summarize_at_tokens
167
+ policy_knobs["max_compactions"] = compaction.max_compactions
149
168
  appends = [
150
169
  text
151
170
  for text in (system_prompt, self.config.append_to_system_prompt)
@@ -161,19 +180,7 @@ class RLMHarness(ACPHarness[RLMHarnessConfig]):
161
180
  # None = passthrough: the key stays off the wire and nano-rlm's own
162
181
  # default applies.
163
182
  "policy": {
164
- key: value
165
- for key, value in {
166
- "max_depth": self.config.max_depth,
167
- "compaction": compaction is not None,
168
- "summarize_at_tokens": (
169
- compaction.summarize_at_tokens if compaction else None
170
- ),
171
- "max_concurrent_subagents": self.config.max_concurrent_subagents,
172
- "max_total_turns": self.config.max_total_turns,
173
- "max_total_tokens": self.config.max_total_tokens,
174
- "max_tool_output_bytes": self.config.max_tool_output_bytes,
175
- }.items()
176
- if value is not None
183
+ key: value for key, value in policy_knobs.items() if value is not None
177
184
  },
178
185
  "system_prompt_path": None,
179
186
  "append_to_system_prompt": "\n\n".join(appends) or None,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: verifiers
3
- Version: 0.3.2.dev37
3
+ Version: 0.3.2.dev38
4
4
  Summary: Verifiers: Environments for LLM Reinforcement Learning
5
5
  Project-URL: Homepage, https://github.com/primeintellect-ai/verifiers
6
6
  Project-URL: Documentation, https://github.com/primeintellect-ai/verifiers
@@ -109,7 +109,7 @@ verifiers/v1/harnesses/pool/harness.py,sha256=HKAogPbyLK5QpvPQ1teHOh_IyRQX-or2JF
109
109
  verifiers/v1/harnesses/prime_agent/__init__.py,sha256=xfPC4RrlnyYWaf38tPAOZq4YL6M55lMpj5BoRLmaK8I,171
110
110
  verifiers/v1/harnesses/prime_agent/harness.py,sha256=byplbbIOFACCn2BvVZAxBSHdaPKBGERYz_hA1rgBj0E,11205
111
111
  verifiers/v1/harnesses/rlm/__init__.py,sha256=hwx51xTdEWzzYgMj-p4ETNcptoub3IPMDbEdJ4uB8Ns,122
112
- verifiers/v1/harnesses/rlm/harness.py,sha256=uHP8VL2CCviZr65PF0IEfgpXxj0uph0E2t6YRvmF1zM,9845
112
+ verifiers/v1/harnesses/rlm/harness.py,sha256=1a88tUM8l4BRf-In-dPyhtW9ilyH2GJdbh1ezL2BRcQ,10297
113
113
  verifiers/v1/harnesses/terminus_2/__init__.py,sha256=l1pwfg1HyVDEqT9efdnFWcXqaZwtKwe7TrplkyxZSA0,166
114
114
  verifiers/v1/harnesses/terminus_2/harness.py,sha256=kXKhi-aqqsoXGnvet0Tq_v7LYYpRYEzARyQL2MTEGWs,3101
115
115
  verifiers/v1/harnesses/terminus_2/program.py,sha256=X8MZdyItU3gbXGXnGOlJ9LWcUTnqIDaxlhkZvoRiqKY,2703
@@ -185,8 +185,8 @@ verifiers/v1/utils/prime.py,sha256=UTYRjp9cbjNb6CVmBHda-1wWZAIIfxNOmTyNuT7_wL4,9
185
185
  verifiers/v1/utils/retries.py,sha256=Y2ZgrAjn-qNkRKZP_RVNL_7EK0iaRcZeCa404lpGYi4,5417
186
186
  verifiers/v1/utils/score.py,sha256=493yJVMw8teCu9JxapxMFPFzI0hNUqdo0Y2nGW4kckk,6200
187
187
  verifiers/v1/utils/version.py,sha256=-obEo_-l9-D8FLef4hYxncOe-uJpxrM1g2Hig_37Sgs,1607
188
- verifiers-0.3.2.dev37.dist-info/METADATA,sha256=Kba9nRG0TlzRVxS9P51ScU0eYJJ8I4bRKDGEgMZuxY4,4065
189
- verifiers-0.3.2.dev37.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
190
- verifiers-0.3.2.dev37.dist-info/entry_points.txt,sha256=uqQje0TMsr7k6nXlWxlPs13Si0evb3pVCEDF6c-YL80,241
191
- verifiers-0.3.2.dev37.dist-info/licenses/LICENSE,sha256=v0RrUsdV3IDoZhrRce297IXS3xMHNJ-_LdLpFAUWb9k,1072
192
- verifiers-0.3.2.dev37.dist-info/RECORD,,
188
+ verifiers-0.3.2.dev38.dist-info/METADATA,sha256=XtmwcXdAJSovO0iDRdqt2zmGCOe8Mh7oaGIxQNa2Euo,4065
189
+ verifiers-0.3.2.dev38.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
190
+ verifiers-0.3.2.dev38.dist-info/entry_points.txt,sha256=uqQje0TMsr7k6nXlWxlPs13Si0evb3pVCEDF6c-YL80,241
191
+ verifiers-0.3.2.dev38.dist-info/licenses/LICENSE,sha256=v0RrUsdV3IDoZhrRce297IXS3xMHNJ-_LdLpFAUWb9k,1072
192
+ verifiers-0.3.2.dev38.dist-info/RECORD,,