wafer-cli 0.2.19__py3-none-any.whl → 0.2.20__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.
wafer/cli.py CHANGED
@@ -1327,6 +1327,11 @@ def agent( # noqa: PLR0913
1327
1327
  "-c",
1328
1328
  help="Documentation corpus to use (cuda, cutlass, hip, amd). Must be downloaded first.",
1329
1329
  ),
1330
+ no_sandbox: bool = typer.Option(
1331
+ False,
1332
+ "--no-sandbox",
1333
+ help="Disable OS-level sandboxing (YOU accept liability for any damage caused by the agent)",
1334
+ ),
1330
1335
  ) -> None:
1331
1336
  """AI assistant for GPU kernel development.
1332
1337
 
@@ -1408,6 +1413,13 @@ def agent( # noqa: PLR0913
1408
1413
  raise typer.Exit(1) from None
1409
1414
  corpus_path = str(path)
1410
1415
 
1416
+ # Warn user about sandbox disabled
1417
+ if no_sandbox:
1418
+ print(
1419
+ "Warning: Sandbox disabled. You accept liability for any damage caused by the agent.",
1420
+ file=sys.stderr,
1421
+ )
1422
+
1411
1423
  wevin_main(
1412
1424
  prompt=actual_prompt,
1413
1425
  interactive=use_tui,
@@ -1425,6 +1437,7 @@ def agent( # noqa: PLR0913
1425
1437
  template=template,
1426
1438
  template_args=parsed_template_args,
1427
1439
  corpus_path=corpus_path,
1440
+ no_sandbox=no_sandbox,
1428
1441
  )
1429
1442
 
1430
1443
 
@@ -1455,6 +1468,7 @@ def _make_agent_alias(name: str, doc: str) -> None:
1455
1468
  template: str | None = typer.Option(None, "--template", "-t"),
1456
1469
  template_args: list[str] | None = typer.Option(None, "--args"),
1457
1470
  corpus: str | None = typer.Option(None, "--corpus"),
1471
+ no_sandbox: bool = typer.Option(False, "--no-sandbox"),
1458
1472
  ) -> None:
1459
1473
  agent(
1460
1474
  prompt=prompt,
@@ -1474,6 +1488,7 @@ def _make_agent_alias(name: str, doc: str) -> None:
1474
1488
  template=template,
1475
1489
  template_args=template_args,
1476
1490
  corpus=corpus,
1491
+ no_sandbox=no_sandbox,
1477
1492
  )
1478
1493
 
1479
1494
  alias_cmd.__doc__ = doc
wafer/wevin_cli.py CHANGED
@@ -266,18 +266,22 @@ def _build_environment(
266
266
  tpl: TemplateConfig,
267
267
  tools_override: list[str] | None,
268
268
  corpus_path: str | None,
269
+ no_sandbox: bool = False,
269
270
  ) -> Environment:
270
271
  """Build a CodingEnvironment from template config."""
271
272
  from wafer_core.environments.coding import CodingEnvironment
272
273
  from wafer_core.rollouts.templates import DANGEROUS_BASH_COMMANDS
274
+ from wafer_core.sandbox import SandboxMode
273
275
 
274
276
  working_dir = Path(corpus_path) if corpus_path else Path.cwd()
275
277
  resolved_tools = tools_override or tpl.tools
278
+ sandbox_mode = SandboxMode.DISABLED if no_sandbox else SandboxMode.ENABLED
276
279
  env: Environment = CodingEnvironment(
277
280
  working_dir=working_dir,
278
281
  enabled_tools=resolved_tools,
279
282
  bash_allowlist=tpl.bash_allowlist,
280
283
  bash_denylist=DANGEROUS_BASH_COMMANDS,
284
+ sandbox_mode=sandbox_mode,
281
285
  ) # type: ignore[assignment]
282
286
  return env
283
287
 
@@ -362,6 +366,7 @@ def main( # noqa: PLR0913, PLR0915
362
366
  list_sessions: bool = False,
363
367
  get_session: str | None = None,
364
368
  json_output: bool = False,
369
+ no_sandbox: bool = False,
365
370
  ) -> None:
366
371
  """Run wevin agent in-process via rollouts."""
367
372
  from dataclasses import asdict
@@ -505,7 +510,7 @@ def main( # noqa: PLR0913, PLR0915
505
510
 
506
511
  # Build endpoint and environment
507
512
  endpoint = _build_endpoint(tpl, model, api_base, api_key)
508
- environment = _build_environment(tpl, tools, corpus_path)
513
+ environment = _build_environment(tpl, tools, corpus_path, no_sandbox)
509
514
 
510
515
  # Session store
511
516
  session_store = FileSessionStore()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wafer-cli
3
- Version: 0.2.19
3
+ Version: 0.2.20
4
4
  Summary: CLI tool for running commands on remote GPUs and GPU kernel optimization agent
5
5
  Requires-Python: >=3.11
6
6
  Requires-Dist: typer>=0.12.0
@@ -5,7 +5,7 @@ wafer/api_client.py,sha256=i_Az2b2llC3DSW8yOL-BKqa7LSKuxOr8hSN40s-oQXY,6313
5
5
  wafer/auth.py,sha256=dwss_se5P-FFc9IN38q4kh_dBrA6k-CguDBkivgcdj0,14003
6
6
  wafer/autotuner.py,sha256=41WYP41pTDvMijv2h42vm89bcHtDMJXObDlWmn6xpFU,44416
7
7
  wafer/billing.py,sha256=jbLB2lI4_9f2KD8uEFDi_ixLlowe5hasC0TIZJyIXRg,7163
8
- wafer/cli.py,sha256=lBBTQCcmKREqZDOQh27qSq8i6NedjHW5oh1JiuT9aho,254241
8
+ wafer/cli.py,sha256=cNScdwOsyaSHnaRPtzSIcES6IEx4kWpMqMpZMIbrp3g,254768
9
9
  wafer/config.py,sha256=h5Eo9_yfWqWGoPNdVQikI9GoZVUeysunSYiixf1mKcw,3411
10
10
  wafer/corpus.py,sha256=x5aFhCsTSAtgzFG9AMFpqq92Ej63mXofL-vvvpjj1sM,12913
11
11
  wafer/evaluate.py,sha256=s1NszUBtxdWRonbi8YR3XWfCiCjNm14g2Pp1lu4kmtY,176125
@@ -26,7 +26,7 @@ wafer/target_lock.py,sha256=SDKhNzv2N7gsphGflcNni9FE5YYuAMuEthngAJEo4Gs,7809
26
26
  wafer/targets.py,sha256=9r-iRWoKSH5cQl1LcamaX-T7cNVOg99ngIm_hlRk-qU,26922
27
27
  wafer/targets_ops.py,sha256=jN1oIBx0mutxRNE9xpIc7SaBxPkVmOyus2eqn0kEKNI,21475
28
28
  wafer/tracelens.py,sha256=g9ZIeFyNojZn4uTd3skPqIrRiL7aMJOz_-GOd3aiyy4,7998
29
- wafer/wevin_cli.py,sha256=vF3GNH-qWXO4hAlXaDg98VZpS4uFexVUp94BHsJjjMU,22179
29
+ wafer/wevin_cli.py,sha256=VnGVt__7kpVe2n_UctURSIpael_2TgsAwmqoQjz6CN0,22412
30
30
  wafer/workspaces.py,sha256=iUdioK7kA3z_gOTMNVDn9Q87c6qpkdXF4bOhJWkUPg8,32375
31
31
  wafer/skills/wafer-guide/SKILL.md,sha256=KWetJw2TVTbz11_nzqazqOJWWRlbHRFShs4sOoreiWo,3255
32
32
  wafer/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -34,8 +34,8 @@ wafer/templates/ask_docs.py,sha256=Lxs-faz9v5m4Qa4NjF2X_lE8KwM9ES9MNJkxo7ep56o,2
34
34
  wafer/templates/optimize_kernel.py,sha256=u6AL7Q3uttqlnBLzcoFdsiPq5lV2TV3bgqwCYYlK9gk,2357
35
35
  wafer/templates/optimize_kernelbench.py,sha256=aoOA13zWEl89r6QW03xF9NKxQ7j4mWe9rwua6-mlr4Y,4780
36
36
  wafer/templates/trace_analyze.py,sha256=XE1VqzVkIUsZbXF8EzQdDYgg-AZEYAOFpr6B_vnRELc,2880
37
- wafer_cli-0.2.19.dist-info/METADATA,sha256=vtgRtd_9BCx_t0uZV2JQiKd8CvT3JxA2EkAY6CLoQDc,560
38
- wafer_cli-0.2.19.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
39
- wafer_cli-0.2.19.dist-info/entry_points.txt,sha256=WqB7hB__WhtPY8y1cO2sZiUz7fCq6Ik-usAigpeFvWE,41
40
- wafer_cli-0.2.19.dist-info/top_level.txt,sha256=2MK1IVMWfpLL8BZCQ3E9aG6L6L666gSA_teYlwan4fs,6
41
- wafer_cli-0.2.19.dist-info/RECORD,,
37
+ wafer_cli-0.2.20.dist-info/METADATA,sha256=rZ94ea_wCkSGAhT0X1wN9DFhCr5ojeXucvROQLX0Ox4,560
38
+ wafer_cli-0.2.20.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
39
+ wafer_cli-0.2.20.dist-info/entry_points.txt,sha256=WqB7hB__WhtPY8y1cO2sZiUz7fCq6Ik-usAigpeFvWE,41
40
+ wafer_cli-0.2.20.dist-info/top_level.txt,sha256=2MK1IVMWfpLL8BZCQ3E9aG6L6L666gSA_teYlwan4fs,6
41
+ wafer_cli-0.2.20.dist-info/RECORD,,