baserun-cli 0.1.1__tar.gz → 0.1.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 (22) hide show
  1. {baserun_cli-0.1.1 → baserun_cli-0.1.2}/PKG-INFO +1 -1
  2. {baserun_cli-0.1.1 → baserun_cli-0.1.2}/baserun_cli/_vendored/cli.py +27 -2
  3. {baserun_cli-0.1.1 → baserun_cli-0.1.2}/baserun_cli.egg-info/PKG-INFO +1 -1
  4. {baserun_cli-0.1.1 → baserun_cli-0.1.2}/pyproject.toml +1 -1
  5. {baserun_cli-0.1.1 → baserun_cli-0.1.2}/README.md +0 -0
  6. {baserun_cli-0.1.1 → baserun_cli-0.1.2}/baserun_cli/__init__.py +0 -0
  7. {baserun_cli-0.1.1 → baserun_cli-0.1.2}/baserun_cli/_vendored/__init__.py +0 -0
  8. {baserun_cli-0.1.1 → baserun_cli-0.1.2}/baserun_cli/_vendored/base.py +0 -0
  9. {baserun_cli-0.1.1 → baserun_cli-0.1.2}/baserun_cli/_vendored/parsers/__init__.py +0 -0
  10. {baserun_cli-0.1.1 → baserun_cli-0.1.2}/baserun_cli/_vendored/parsers/base.py +0 -0
  11. {baserun_cli-0.1.1 → baserun_cli-0.1.2}/baserun_cli/_vendored/parsers/bash_agent.py +0 -0
  12. {baserun_cli-0.1.1 → baserun_cli-0.1.2}/baserun_cli/_vendored/parsers/claude.py +0 -0
  13. {baserun_cli-0.1.1 → baserun_cli-0.1.2}/baserun_cli/_vendored/parsers/codex.py +0 -0
  14. {baserun_cli-0.1.1 → baserun_cli-0.1.2}/baserun_cli/channel.py +0 -0
  15. {baserun_cli-0.1.1 → baserun_cli-0.1.2}/baserun_cli/main.py +0 -0
  16. {baserun_cli-0.1.1 → baserun_cli-0.1.2}/baserun_cli/runner.py +0 -0
  17. {baserun_cli-0.1.1 → baserun_cli-0.1.2}/baserun_cli.egg-info/SOURCES.txt +0 -0
  18. {baserun_cli-0.1.1 → baserun_cli-0.1.2}/baserun_cli.egg-info/dependency_links.txt +0 -0
  19. {baserun_cli-0.1.1 → baserun_cli-0.1.2}/baserun_cli.egg-info/entry_points.txt +0 -0
  20. {baserun_cli-0.1.1 → baserun_cli-0.1.2}/baserun_cli.egg-info/requires.txt +0 -0
  21. {baserun_cli-0.1.1 → baserun_cli-0.1.2}/baserun_cli.egg-info/top_level.txt +0 -0
  22. {baserun_cli-0.1.1 → baserun_cli-0.1.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: baserun-cli
3
- Version: 0.1.1
3
+ Version: 0.1.2
4
4
  Summary: BaseRun agent-side daemon (connects to nchan, spawns CLI agents, publishes run events)
5
5
  Requires-Python: >=3.11
6
6
  Description-Content-Type: text/markdown
@@ -24,6 +24,28 @@ from .base import (
24
24
  from .parsers import extract_session_id, parse_line
25
25
 
26
26
 
27
+ _SUBPROCESS_STREAM_LIMIT = 64 * 1024 * 1024
28
+
29
+
30
+ async def _iter_lines(reader: asyncio.StreamReader) -> AsyncIterator[bytes]:
31
+ """Yield newline-delimited output without StreamReader.readline limits."""
32
+ buf = bytearray()
33
+ while True:
34
+ chunk = await reader.read(64 * 1024)
35
+ if not chunk:
36
+ if buf:
37
+ yield bytes(buf)
38
+ return
39
+ buf.extend(chunk)
40
+ while True:
41
+ pos = buf.find(b"\n")
42
+ if pos < 0:
43
+ break
44
+ line = bytes(buf[:pos])
45
+ del buf[: pos + 1]
46
+ yield line
47
+
48
+
27
49
  class CLIAgentConnector(AgentConnector):
28
50
  """The one connector implementation for all spec-compatible CLI agents."""
29
51
 
@@ -120,6 +142,7 @@ class CLIAgentConnector(AgentConnector):
120
142
  stderr=asyncio.subprocess.PIPE,
121
143
  env=self._env(),
122
144
  cwd=self.spec.workdir,
145
+ limit=_SUBPROCESS_STREAM_LIMIT,
123
146
  )
124
147
  except FileNotFoundError:
125
148
  message = f"CLI not found: {self.spec.bin}. Please install it or configure cli_spec.bin with the correct executable path."
@@ -152,7 +175,7 @@ class CLIAgentConnector(AgentConnector):
152
175
 
153
176
  try:
154
177
  assert proc.stdout is not None
155
- async for raw_line in proc.stdout:
178
+ async for raw_line in _iter_lines(proc.stdout):
156
179
  line = raw_line.decode(errors="replace").strip()
157
180
  if not line:
158
181
  continue
@@ -279,6 +302,7 @@ class CLIAgentConnector(AgentConnector):
279
302
  stderr=asyncio.subprocess.PIPE,
280
303
  env=self._env(),
281
304
  cwd=self.spec.workdir,
305
+ limit=_SUBPROCESS_STREAM_LIMIT,
282
306
  )
283
307
  try:
284
308
  out_b, err_b = await asyncio.wait_for(proc.communicate(), timeout=60.0)
@@ -320,10 +344,11 @@ class CLIAgentConnector(AgentConnector):
320
344
  stderr=asyncio.subprocess.PIPE,
321
345
  env=self._env(),
322
346
  cwd=self.spec.workdir,
347
+ limit=_SUBPROCESS_STREAM_LIMIT,
323
348
  )
324
349
  try:
325
350
  assert proc2.stdout is not None
326
- async for raw_line in proc2.stdout:
351
+ async for raw_line in _iter_lines(proc2.stdout):
327
352
  line = raw_line.decode(errors="replace").strip()
328
353
  if not line:
329
354
  continue
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: baserun-cli
3
- Version: 0.1.1
3
+ Version: 0.1.2
4
4
  Summary: BaseRun agent-side daemon (connects to nchan, spawns CLI agents, publishes run events)
5
5
  Requires-Python: >=3.11
6
6
  Description-Content-Type: text/markdown
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "baserun-cli"
3
- version = "0.1.1"
3
+ version = "0.1.2"
4
4
  description = "BaseRun agent-side daemon (connects to nchan, spawns CLI agents, publishes run events)"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
File without changes
File without changes